summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/binutils/ChangeLog697
-rw-r--r--contrib/binutils/MAINTAINERS14
-rw-r--r--contrib/binutils/Makefile.def94
-rw-r--r--contrib/binutils/Makefile.in10796
-rw-r--r--contrib/binutils/Makefile.tpl286
-rw-r--r--contrib/binutils/bfd/ChangeLog2849
-rw-r--r--contrib/binutils/bfd/ChangeLog-020314
-rw-r--r--contrib/binutils/bfd/ChangeLog-20063601
-rw-r--r--contrib/binutils/bfd/Makefile.am208
-rw-r--r--contrib/binutils/bfd/Makefile.in275
-rw-r--r--contrib/binutils/bfd/acinclude.m420
-rw-r--r--contrib/binutils/bfd/aclocal.m439
-rw-r--r--contrib/binutils/bfd/aout-arm.c23
-rw-r--r--contrib/binutils/bfd/aout-target.h6
-rw-r--r--contrib/binutils/bfd/aoutf1.h26
-rw-r--r--contrib/binutils/bfd/aoutx.h50
-rw-r--r--contrib/binutils/bfd/archive.c66
-rw-r--r--contrib/binutils/bfd/archive64.c34
-rw-r--r--contrib/binutils/bfd/archures.c58
-rw-r--r--contrib/binutils/bfd/bfd-in.h86
-rw-r--r--contrib/binutils/bfd/bfd-in2.h354
-rw-r--r--contrib/binutils/bfd/bfd.c320
-rw-r--r--contrib/binutils/bfd/bfdio.c19
-rw-r--r--contrib/binutils/bfd/binary.c16
-rw-r--r--contrib/binutils/bfd/bout.c24
-rw-r--r--contrib/binutils/bfd/cache.c4
-rw-r--r--contrib/binutils/bfd/coff-alpha.c22
-rw-r--r--contrib/binutils/bfd/coff-arm.c109
-rw-r--r--contrib/binutils/bfd/coff-aux.c4
-rw-r--r--contrib/binutils/bfd/coff-i386.c19
-rw-r--r--contrib/binutils/bfd/coff-ia64.c4
-rw-r--r--contrib/binutils/bfd/coff-mips.c21
-rw-r--r--contrib/binutils/bfd/coff-ppc.c25
-rw-r--r--contrib/binutils/bfd/coff-rs6000.c65
-rw-r--r--contrib/binutils/bfd/coff-sparc.c22
-rw-r--r--contrib/binutils/bfd/coff64-rs6000.c32
-rw-r--r--contrib/binutils/bfd/coffcode.h120
-rw-r--r--contrib/binutils/bfd/coffgen.c19
-rw-r--r--contrib/binutils/bfd/cofflink.c27
-rwxr-xr-xcontrib/binutils/bfd/config.bfd198
-rw-r--r--contrib/binutils/bfd/config.in119
-rwxr-xr-xcontrib/binutils/bfd/configure13041
-rw-r--r--contrib/binutils/bfd/configure.in108
-rw-r--r--contrib/binutils/bfd/corefile.c6
-rw-r--r--contrib/binutils/bfd/cpu-alpha.c4
-rw-r--r--contrib/binutils/bfd/cpu-arc.c5
-rw-r--r--contrib/binutils/bfd/cpu-arm.c44
-rw-r--r--contrib/binutils/bfd/cpu-cr16.c40
-rw-r--r--contrib/binutils/bfd/cpu-i386.c4
-rw-r--r--contrib/binutils/bfd/cpu-ia64.c4
-rw-r--r--contrib/binutils/bfd/cpu-mep.c28
-rw-r--r--contrib/binutils/bfd/cpu-mips.c4
-rw-r--r--contrib/binutils/bfd/cpu-powerpc.c4
-rw-r--r--contrib/binutils/bfd/cpu-rs6000.c10
-rw-r--r--contrib/binutils/bfd/cpu-s390.c4
-rw-r--r--contrib/binutils/bfd/cpu-score.c51
-rw-r--r--contrib/binutils/bfd/cpu-sparc.c4
-rw-r--r--contrib/binutils/bfd/cpu-spu.c54
-rw-r--r--contrib/binutils/bfd/doc/ChangeLog49
-rw-r--r--contrib/binutils/bfd/doc/Makefile.am26
-rw-r--r--contrib/binutils/bfd/doc/Makefile.in120
-rw-r--r--contrib/binutils/bfd/doc/aoutx.texi213
-rw-r--r--contrib/binutils/bfd/doc/archive.texi99
-rw-r--r--contrib/binutils/bfd/doc/archures.texi585
-rw-r--r--contrib/binutils/bfd/doc/bfd.texinfo52
-rw-r--r--contrib/binutils/bfd/doc/bfdint.texi52
-rw-r--r--contrib/binutils/bfd/doc/bfdio.texi72
-rw-r--r--contrib/binutils/bfd/doc/bfdt.texi721
-rw-r--r--contrib/binutils/bfd/doc/bfdwin.texi2
-rw-r--r--contrib/binutils/bfd/doc/cache.texi65
-rw-r--r--contrib/binutils/bfd/doc/coffcode.texi608
-rw-r--r--contrib/binutils/bfd/doc/core.texi60
-rw-r--r--contrib/binutils/bfd/doc/elf.texi22
-rw-r--r--contrib/binutils/bfd/doc/elfcode.texi0
-rw-r--r--contrib/binutils/bfd/doc/format.texi112
-rw-r--r--contrib/binutils/bfd/doc/hash.texi247
-rw-r--r--contrib/binutils/bfd/doc/init.texi16
-rw-r--r--contrib/binutils/bfd/doc/libbfd.texi179
-rw-r--r--contrib/binutils/bfd/doc/linker.texi380
-rw-r--r--contrib/binutils/bfd/doc/mmo.texi365
-rw-r--r--contrib/binutils/bfd/doc/opncls.texi365
-rw-r--r--contrib/binutils/bfd/doc/reloc.texi2494
-rw-r--r--contrib/binutils/bfd/doc/section.texi989
-rw-r--r--contrib/binutils/bfd/doc/syms.texi461
-rw-r--r--contrib/binutils/bfd/doc/targets.texi551
-rw-r--r--contrib/binutils/bfd/dwarf1.c4
-rw-r--r--contrib/binutils/bfd/dwarf2.c502
-rw-r--r--contrib/binutils/bfd/ecoff.c24
-rw-r--r--contrib/binutils/bfd/ecofflink.c7
-rw-r--r--contrib/binutils/bfd/efi-app-ia32.c4
-rw-r--r--contrib/binutils/bfd/efi-app-ia64.c4
-rw-r--r--contrib/binutils/bfd/elf-attrs.c628
-rw-r--r--contrib/binutils/bfd/elf-bfd.h299
-rw-r--r--contrib/binutils/bfd/elf-eh-frame.c557
-rw-r--r--contrib/binutils/bfd/elf-strtab.c5
-rw-r--r--contrib/binutils/bfd/elf-vxworks.c46
-rw-r--r--contrib/binutils/bfd/elf.c2792
-rw-r--r--contrib/binutils/bfd/elf32-arc.c20
-rw-r--r--contrib/binutils/bfd/elf32-arm.c4057
-rw-r--r--contrib/binutils/bfd/elf32-avr.h38
-rw-r--r--contrib/binutils/bfd/elf32-cr16.c1433
-rw-r--r--contrib/binutils/bfd/elf32-gen.c5
-rw-r--r--contrib/binutils/bfd/elf32-i386.c264
-rw-r--r--contrib/binutils/bfd/elf32-mep.c959
-rw-r--r--contrib/binutils/bfd/elf32-mips.c119
-rw-r--r--contrib/binutils/bfd/elf32-ppc.c479
-rw-r--r--contrib/binutils/bfd/elf32-ppc.h12
-rw-r--r--contrib/binutils/bfd/elf32-s390.c223
-rw-r--r--contrib/binutils/bfd/elf32-score.c3883
-rw-r--r--contrib/binutils/bfd/elf32-sh-relocs.h1716
-rw-r--r--contrib/binutils/bfd/elf32-sparc.c8
-rw-r--r--contrib/binutils/bfd/elf32-spu.c3154
-rw-r--r--contrib/binutils/bfd/elf32-spu.h57
-rw-r--r--contrib/binutils/bfd/elf64-alpha.c193
-rw-r--r--contrib/binutils/bfd/elf64-gen.c5
-rw-r--r--contrib/binutils/bfd/elf64-mips.c134
-rw-r--r--contrib/binutils/bfd/elf64-ppc.c721
-rw-r--r--contrib/binutils/bfd/elf64-s390.c166
-rw-r--r--contrib/binutils/bfd/elf64-sparc.c25
-rw-r--r--contrib/binutils/bfd/elf64-x86-64.c213
-rw-r--r--contrib/binutils/bfd/elfcode.h145
-rw-r--r--contrib/binutils/bfd/elflink.c2108
-rw-r--r--contrib/binutils/bfd/elfn32-mips.c109
-rw-r--r--contrib/binutils/bfd/elfxx-ia64.c247
-rw-r--r--contrib/binutils/bfd/elfxx-mips.c949
-rw-r--r--contrib/binutils/bfd/elfxx-mips.h10
-rw-r--r--contrib/binutils/bfd/elfxx-sparc.c339
-rw-r--r--contrib/binutils/bfd/elfxx-sparc.h5
-rw-r--r--contrib/binutils/bfd/elfxx-target.h77
-rw-r--r--contrib/binutils/bfd/format.c4
-rw-r--r--contrib/binutils/bfd/freebsd.h4
-rw-r--r--contrib/binutils/bfd/gen-aout.c4
-rw-r--r--contrib/binutils/bfd/hash.c102
-rw-r--r--contrib/binutils/bfd/host-aout.c4
-rw-r--r--contrib/binutils/bfd/i386aout.c6
-rw-r--r--contrib/binutils/bfd/i386bsd.c4
-rw-r--r--contrib/binutils/bfd/i386linux.c16
-rw-r--r--contrib/binutils/bfd/ieee.c32
-rw-r--r--contrib/binutils/bfd/ihex.c21
-rw-r--r--contrib/binutils/bfd/init.c4
-rw-r--r--contrib/binutils/bfd/libaout.h7
-rw-r--r--contrib/binutils/bfd/libbfd-in.h28
-rw-r--r--contrib/binutils/bfd/libbfd.c21
-rw-r--r--contrib/binutils/bfd/libbfd.h142
-rw-r--r--contrib/binutils/bfd/libcoff-in.h2
-rw-r--r--contrib/binutils/bfd/libcoff.h2
-rw-r--r--contrib/binutils/bfd/libecoff.h4
-rw-r--r--contrib/binutils/bfd/libpei.h62
-rw-r--r--contrib/binutils/bfd/linker.c82
-rwxr-xr-xcontrib/binutils/bfd/mep-relocs.pl274
-rw-r--r--contrib/binutils/bfd/merge.c6
-rw-r--r--contrib/binutils/bfd/mipsbsd.c31
-rw-r--r--contrib/binutils/bfd/netbsd-core.c12
-rw-r--r--contrib/binutils/bfd/netbsd.h6
-rw-r--r--contrib/binutils/bfd/opncls.c67
-rw-r--r--contrib/binutils/bfd/osf-core.c11
-rw-r--r--contrib/binutils/bfd/pe-arm-wince.c37
-rw-r--r--contrib/binutils/bfd/pe-arm.c45
-rw-r--r--contrib/binutils/bfd/pe-i386.c11
-rw-r--r--contrib/binutils/bfd/pe-mips.c21
-rw-r--r--contrib/binutils/bfd/pe-ppc.c4
-rw-r--r--contrib/binutils/bfd/pe-x86_64.c53
-rw-r--r--contrib/binutils/bfd/peXXigen.c313
-rw-r--r--contrib/binutils/bfd/pei-arm-wince.c30
-rw-r--r--contrib/binutils/bfd/pei-mips.c4
-rw-r--r--contrib/binutils/bfd/pei-x86_64.c54
-rw-r--r--contrib/binutils/bfd/peicode.h118
-rw-r--r--contrib/binutils/bfd/po/BLD-POTFILES.in1
-rw-r--r--contrib/binutils/bfd/po/Make-in3
-rw-r--r--contrib/binutils/bfd/po/SRC-POTFILES.in15
-rw-r--r--contrib/binutils/bfd/po/bfd.pot1837
-rw-r--r--contrib/binutils/bfd/ppcboot.c25
-rw-r--r--contrib/binutils/bfd/ptrace-core.c21
-rw-r--r--contrib/binutils/bfd/reloc.c380
-rw-r--r--contrib/binutils/bfd/reloc16.c4
-rw-r--r--contrib/binutils/bfd/rs6000-core.c14
-rw-r--r--contrib/binutils/bfd/sco5-core.c7
-rw-r--r--contrib/binutils/bfd/section.c115
-rw-r--r--contrib/binutils/bfd/simple.c5
-rw-r--r--contrib/binutils/bfd/sparclinux.c46
-rw-r--r--contrib/binutils/bfd/srec.c18
-rw-r--r--contrib/binutils/bfd/stabs.c27
-rw-r--r--contrib/binutils/bfd/sunos.c41
-rw-r--r--contrib/binutils/bfd/syms.c12
-rw-r--r--contrib/binutils/bfd/sysdep.h6
-rw-r--r--contrib/binutils/bfd/targets.c91
-rw-r--r--contrib/binutils/bfd/tekhex.c25
-rw-r--r--contrib/binutils/bfd/trad-core.c35
-rw-r--r--contrib/binutils/bfd/version.h5
-rw-r--r--contrib/binutils/bfd/xcoff-target.h4
-rw-r--r--contrib/binutils/bfd/xcofflink.c41
-rw-r--r--contrib/binutils/binutils/ChangeLog779
-rw-r--r--contrib/binutils/binutils/ChangeLog-2006599
-rw-r--r--contrib/binutils/binutils/MAINTAINERS35
-rw-r--r--contrib/binutils/binutils/Makefile.am533
-rw-r--r--contrib/binutils/binutils/Makefile.in680
-rw-r--r--contrib/binutils/binutils/NEWS18
-rw-r--r--contrib/binutils/binutils/acinclude.m41
-rw-r--r--contrib/binutils/binutils/aclocal.m438
-rw-r--r--contrib/binutils/binutils/addr2line.c27
-rw-r--r--contrib/binutils/binutils/ar.c114
-rw-r--r--contrib/binutils/binutils/arparse.y4
-rw-r--r--contrib/binutils/binutils/arsup.c37
-rw-r--r--contrib/binutils/binutils/bin2c.c105
-rw-r--r--contrib/binutils/binutils/binemul.c4
-rw-r--r--contrib/binutils/binutils/binemul.h3
-rw-r--r--contrib/binutils/binutils/bucomm.c97
-rw-r--r--contrib/binutils/binutils/bucomm.h156
-rw-r--r--contrib/binutils/binutils/budemang.c100
-rw-r--r--contrib/binutils/binutils/coffdump.c7
-rw-r--r--contrib/binutils/binutils/coffgrok.c6
-rw-r--r--contrib/binutils/binutils/config.in92
-rwxr-xr-xcontrib/binutils/binutils/configure11035
-rw-r--r--contrib/binutils/binutils/configure.in109
-rw-r--r--contrib/binutils/binutils/cxxfilt.c8
-rw-r--r--contrib/binutils/binutils/debug.c6
-rw-r--r--contrib/binutils/binutils/defparse.c1777
-rw-r--r--contrib/binutils/binutils/defparse.h111
-rw-r--r--contrib/binutils/binutils/defparse.y5
-rw-r--r--contrib/binutils/binutils/dlltool.c160
-rw-r--r--contrib/binutils/binutils/dllwrap.c13
-rw-r--r--contrib/binutils/binutils/doc/Makefile.am31
-rw-r--r--contrib/binutils/binutils/doc/Makefile.in115
-rw-r--r--contrib/binutils/binutils/doc/addr2line.1265
-rw-r--r--contrib/binutils/binutils/doc/ar.1390
-rw-r--r--contrib/binutils/binutils/doc/binutils.texi454
-rw-r--r--contrib/binutils/binutils/doc/cxxfilt.man345
-rw-r--r--contrib/binutils/binutils/doc/dlltool.1478
-rw-r--r--contrib/binutils/binutils/doc/nm.1449
-rw-r--r--contrib/binutils/binutils/doc/objcopy.1795
-rw-r--r--contrib/binutils/binutils/doc/objdump.1634
-rw-r--r--contrib/binutils/binutils/doc/ranlib.1188
-rw-r--r--contrib/binutils/binutils/doc/readelf.1376
-rw-r--r--contrib/binutils/binutils/doc/size.1263
-rw-r--r--contrib/binutils/binutils/doc/strings.1249
-rw-r--r--contrib/binutils/binutils/doc/strip.1383
-rw-r--r--contrib/binutils/binutils/dwarf.c169
-rw-r--r--contrib/binutils/binutils/dwarf.h5
-rw-r--r--contrib/binutils/binutils/embedspu.sh257
-rw-r--r--contrib/binutils/binutils/filemode.c5
-rw-r--r--contrib/binutils/binutils/ieee.c6
-rw-r--r--contrib/binutils/binutils/mclex.c441
-rw-r--r--contrib/binutils/binutils/mcparse.y356
-rw-r--r--contrib/binutils/binutils/nm.c137
-rw-r--r--contrib/binutils/binutils/objcopy.c434
-rw-r--r--contrib/binutils/binutils/objdump.c365
-rw-r--r--contrib/binutils/binutils/po/Make-in3
-rw-r--r--contrib/binutils/binutils/po/POTFILES.in8
-rw-r--r--contrib/binutils/binutils/po/binutils.pot2277
-rw-r--r--contrib/binutils/binutils/prdbg.c82
-rw-r--r--contrib/binutils/binutils/rclex.c2881
-rw-r--r--contrib/binutils/binutils/rclex.l504
-rw-r--r--contrib/binutils/binutils/rcparse.y540
-rw-r--r--contrib/binutils/binutils/rdcoff.c6
-rw-r--r--contrib/binutils/binutils/rddbg.c5
-rw-r--r--contrib/binutils/binutils/readelf.c869
-rw-r--r--contrib/binutils/binutils/rename.c3
-rw-r--r--contrib/binutils/binutils/resbin.c2046
-rw-r--r--contrib/binutils/binutils/rescoff.c289
-rw-r--r--contrib/binutils/binutils/resrc.c1660
-rw-r--r--contrib/binutils/binutils/resres.c544
-rw-r--r--contrib/binutils/binutils/size.c12
-rw-r--r--contrib/binutils/binutils/srconv.c6
-rw-r--r--contrib/binutils/binutils/stabs.c20
-rw-r--r--contrib/binutils/binutils/strings.c15
-rw-r--r--contrib/binutils/binutils/sysdep.h174
-rw-r--r--contrib/binutils/binutils/sysdump.c9
-rw-r--r--contrib/binutils/binutils/version.c9
-rw-r--r--contrib/binutils/binutils/windint.h1088
-rw-r--r--contrib/binutils/binutils/windmc.c1197
-rw-r--r--contrib/binutils/binutils/windmc.h99
-rw-r--r--contrib/binutils/binutils/wrstabs.c7
-rw-r--r--contrib/binutils/config-ml.in8
-rwxr-xr-xcontrib/binutils/config.guess63
-rwxr-xr-xcontrib/binutils/config.rpath548
-rwxr-xr-xcontrib/binutils/config.sub74
-rw-r--r--contrib/binutils/config/ChangeLog180
-rw-r--r--contrib/binutils/config/confsubdir.m4127
-rw-r--r--contrib/binutils/config/ld-symbolic.m445
-rw-r--r--contrib/binutils/config/mt-mep8
-rw-r--r--contrib/binutils/config/mt-spu4
-rw-r--r--contrib/binutils/config/multi.m465
-rw-r--r--contrib/binutils/config/unwind_ipinfo.m422
-rwxr-xr-xcontrib/binutils/configure10739
-rw-r--r--contrib/binutils/configure.ac (renamed from contrib/binutils/configure.in)730
-rw-r--r--contrib/binutils/etc/ChangeLog30
-rw-r--r--contrib/binutils/etc/Makefile.in41
-rw-r--r--contrib/binutils/gas/ChangeLog1776
-rw-r--r--contrib/binutils/gas/ChangeLog-20062756
-rw-r--r--contrib/binutils/gas/Makefile.am2427
-rw-r--r--contrib/binutils/gas/Makefile.in2607
-rw-r--r--contrib/binutils/gas/NEWS8
-rw-r--r--contrib/binutils/gas/acinclude.m418
-rw-r--r--contrib/binutils/gas/aclocal.m433
-rw-r--r--contrib/binutils/gas/app.c77
-rw-r--r--contrib/binutils/gas/as.c48
-rw-r--r--contrib/binutils/gas/as.h14
-rw-r--r--contrib/binutils/gas/atof-generic.c4
-rw-r--r--contrib/binutils/gas/cgen.c336
-rw-r--r--contrib/binutils/gas/cond.c3
-rw-r--r--contrib/binutils/gas/config.in97
-rw-r--r--contrib/binutils/gas/config/atof-vax.c6
-rw-r--r--contrib/binutils/gas/config/obj-coff.c4
-rw-r--r--contrib/binutils/gas/config/obj-coff.h18
-rw-r--r--contrib/binutils/gas/config/obj-elf.c42
-rw-r--r--contrib/binutils/gas/config/obj-elf.h16
-rw-r--r--contrib/binutils/gas/config/obj-ieee.c613
-rw-r--r--contrib/binutils/gas/config/obj-ieee.h46
-rw-r--r--contrib/binutils/gas/config/tc-alpha.c14
-rw-r--r--contrib/binutils/gas/config/tc-alpha.h4
-rw-r--r--contrib/binutils/gas/config/tc-arc.c2
-rw-r--r--contrib/binutils/gas/config/tc-arm.c7846
-rw-r--r--contrib/binutils/gas/config/tc-arm.h58
-rw-r--r--contrib/binutils/gas/config/tc-cr16.c2444
-rw-r--r--contrib/binutils/gas/config/tc-cr16.h73
-rw-r--r--contrib/binutils/gas/config/tc-i386.c1851
-rw-r--r--contrib/binutils/gas/config/tc-i386.h297
-rw-r--r--contrib/binutils/gas/config/tc-ia64.c21
-rw-r--r--contrib/binutils/gas/config/tc-ia64.h4
-rw-r--r--contrib/binutils/gas/config/tc-mep.c1886
-rw-r--r--contrib/binutils/gas/config/tc-mep.h119
-rw-r--r--contrib/binutils/gas/config/tc-mips.c2020
-rw-r--r--contrib/binutils/gas/config/tc-mips.h16
-rw-r--r--contrib/binutils/gas/config/tc-ppc.c658
-rw-r--r--contrib/binutils/gas/config/tc-ppc.h79
-rw-r--r--contrib/binutils/gas/config/tc-s390.c7
-rw-r--r--contrib/binutils/gas/config/tc-s390.h2
-rw-r--r--contrib/binutils/gas/config/tc-score.c6661
-rw-r--r--contrib/binutils/gas/config/tc-score.h83
-rw-r--r--contrib/binutils/gas/config/tc-sparc.c46
-rw-r--r--contrib/binutils/gas/config/tc-sparc.h19
-rw-r--r--contrib/binutils/gas/config/tc-spu.c1083
-rw-r--r--contrib/binutils/gas/config/tc-spu.h107
-rw-r--r--contrib/binutils/gas/config/te-pep.h10
-rwxr-xr-xcontrib/binutils/gas/configure10812
-rw-r--r--contrib/binutils/gas/configure.in67
-rw-r--r--contrib/binutils/gas/debug.c38
-rw-r--r--contrib/binutils/gas/dep-in.sed5
-rw-r--r--contrib/binutils/gas/doc/Makefile.am29
-rw-r--r--contrib/binutils/gas/doc/Makefile.in106
-rw-r--r--contrib/binutils/gas/doc/all.texi4
-rw-r--r--contrib/binutils/gas/doc/as.11109
-rw-r--r--contrib/binutils/gas/doc/as.texinfo460
-rw-r--r--contrib/binutils/gas/doc/c-arc.texi4
-rw-r--r--contrib/binutils/gas/doc/c-arm.texi117
-rw-r--r--contrib/binutils/gas/doc/c-avr.texi364
-rw-r--r--contrib/binutils/gas/doc/c-cr16.texi80
-rw-r--r--contrib/binutils/gas/doc/c-i386.texi56
-rw-r--r--contrib/binutils/gas/doc/c-mips.texi124
-rw-r--r--contrib/binutils/gas/doc/c-ppc.texi18
-rw-r--r--contrib/binutils/gas/doc/gasver.texi1
-rw-r--r--contrib/binutils/gas/doc/internals.texi14
-rw-r--r--contrib/binutils/gas/dw2gencfi.c361
-rw-r--r--contrib/binutils/gas/dwarf2dbg.c206
-rw-r--r--contrib/binutils/gas/ecoff.c4
-rw-r--r--contrib/binutils/gas/expr.c21
-rw-r--r--contrib/binutils/gas/frags.c4
-rw-r--r--contrib/binutils/gas/frags.h2
-rw-r--r--contrib/binutils/gas/gdbinit.in1
-rw-r--r--contrib/binutils/gas/input-file.c33
-rw-r--r--contrib/binutils/gas/input-file.h7
-rw-r--r--contrib/binutils/gas/input-scrub.c52
-rw-r--r--contrib/binutils/gas/itbl-lex.l8
-rw-r--r--contrib/binutils/gas/itbl-ops.c15
-rw-r--r--contrib/binutils/gas/itbl-ops.h12
-rw-r--r--contrib/binutils/gas/itbl-parse.y6
-rw-r--r--contrib/binutils/gas/listing.c19
-rw-r--r--contrib/binutils/gas/macro.c55
-rw-r--r--contrib/binutils/gas/macro.h5
-rw-r--r--contrib/binutils/gas/messages.c38
-rw-r--r--contrib/binutils/gas/output-file.c36
-rw-r--r--contrib/binutils/gas/po/Make-in3
-rw-r--r--contrib/binutils/gas/po/POTFILES.in10
-rw-r--r--contrib/binutils/gas/po/gas.pot7166
-rw-r--r--contrib/binutils/gas/read.c407
-rw-r--r--contrib/binutils/gas/read.h1
-rw-r--r--contrib/binutils/gas/sb.c23
-rw-r--r--contrib/binutils/gas/sb.h13
-rw-r--r--contrib/binutils/gas/subsegs.c202
-rw-r--r--contrib/binutils/gas/subsegs.h16
-rw-r--r--contrib/binutils/gas/symbols.c369
-rw-r--r--contrib/binutils/gas/symbols.h4
-rw-r--r--contrib/binutils/gas/write.c1082
-rw-r--r--contrib/binutils/gas/write.h64
-rw-r--r--contrib/binutils/gprof/mips.c17
-rw-r--r--contrib/binutils/gprof/po/Make-in3
-rw-r--r--contrib/binutils/gprof/po/gprof.pot128
-rw-r--r--contrib/binutils/gprof/po/ms.po561
-rw-r--r--contrib/binutils/include/ChangeLog148
-rw-r--r--contrib/binutils/include/ansidecl.h22
-rw-r--r--contrib/binutils/include/bfdlink.h61
-rw-r--r--contrib/binutils/include/bin-bugs.h3
-rw-r--r--contrib/binutils/include/coff/ChangeLog38
-rw-r--r--contrib/binutils/include/coff/external.h24
-rw-r--r--contrib/binutils/include/coff/pe.h16
-rw-r--r--contrib/binutils/include/coff/rs6000.h6
-rw-r--r--contrib/binutils/include/demangle.h78
-rw-r--r--contrib/binutils/include/dis-asm.h94
-rw-r--r--contrib/binutils/include/elf/ChangeLog166
-rw-r--r--contrib/binutils/include/elf/arm.h38
-rw-r--r--contrib/binutils/include/elf/avr.h5
-rw-r--r--contrib/binutils/include/elf/common.h16
-rw-r--r--contrib/binutils/include/elf/cr16.h56
-rw-r--r--contrib/binutils/include/elf/dwarf2.h1
-rw-r--r--contrib/binutils/include/elf/external.h6
-rw-r--r--contrib/binutils/include/elf/hppa.h50
-rw-r--r--contrib/binutils/include/elf/internal.h58
-rw-r--r--contrib/binutils/include/elf/m68k.h32
-rw-r--r--contrib/binutils/include/elf/mep.h84
-rw-r--r--contrib/binutils/include/elf/mips.h14
-rw-r--r--contrib/binutils/include/elf/ppc.h11
-rw-r--r--contrib/binutils/include/elf/reloc-macros.h2
-rw-r--r--contrib/binutils/include/elf/score.h123
-rw-r--r--contrib/binutils/include/elf/spu.h60
-rw-r--r--contrib/binutils/include/elf/v850.h9
-rw-r--r--contrib/binutils/include/elf/xtensa.h4
-rw-r--r--contrib/binutils/include/filenames.h7
-rw-r--r--contrib/binutils/include/libiberty.h74
-rw-r--r--contrib/binutils/include/opcode/ChangeLog183
-rw-r--r--contrib/binutils/include/opcode/arm.h13
-rw-r--r--contrib/binutils/include/opcode/cr16.h437
-rw-r--r--contrib/binutils/include/opcode/i386.h1680
-rw-r--r--contrib/binutils/include/opcode/mips.h57
-rw-r--r--contrib/binutils/include/opcode/ppc.h72
-rw-r--r--contrib/binutils/include/opcode/s390.h3
-rw-r--r--contrib/binutils/include/opcode/score-datadep.h282
-rw-r--r--contrib/binutils/include/opcode/score-inst.h507
-rw-r--r--contrib/binutils/include/opcode/spu-insns.h417
-rw-r--r--contrib/binutils/include/opcode/spu.h126
-rw-r--r--contrib/binutils/ld/ChangeLog848
-rw-r--r--contrib/binutils/ld/ChangeLog-20061364
-rw-r--r--contrib/binutils/ld/Makefile.am832
-rw-r--r--contrib/binutils/ld/Makefile.in916
-rw-r--r--contrib/binutils/ld/NEWS36
-rw-r--r--contrib/binutils/ld/acinclude.m41
-rw-r--r--contrib/binutils/ld/aclocal.m434
-rw-r--r--contrib/binutils/ld/config.in112
-rwxr-xr-xcontrib/binutils/ld/configure10547
-rw-r--r--contrib/binutils/ld/configure.host6
-rw-r--r--contrib/binutils/ld/configure.in46
-rw-r--r--contrib/binutils/ld/configure.tgt112
-rw-r--r--contrib/binutils/ld/deffilep.y5
-rw-r--r--contrib/binutils/ld/emulparams/arcelf.sh5
-rw-r--r--contrib/binutils/ld/emulparams/arm_wince_pe.sh14
-rw-r--r--contrib/binutils/ld/emulparams/armelf.sh8
-rw-r--r--contrib/binutils/ld/emulparams/armelf_linux.sh6
-rw-r--r--contrib/binutils/ld/emulparams/armelf_nbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/avr6.sh11
-rw-r--r--contrib/binutils/ld/emulparams/elf32_sparc.sh7
-rw-r--r--contrib/binutils/ld/emulparams/elf32_spu.sh20
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmip.sh19
-rw-r--r--contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh17
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32bmipn32.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32btsmipn32.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf32cr16.sh6
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf32mep.sh55
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppccommon.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_s390.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf64bmip-defs.sh3
-rwxr-xr-xcontrib/binutils/ld/emulparams/elf64bmip.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64btsmip.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64ppc.sh7
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_chaos.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_ldso.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf_s390.sh4
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64.sh12
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh1
-rw-r--r--contrib/binutils/ld/emulparams/i386moss.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386nto.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386nw.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386pep.sh9
-rw-r--r--contrib/binutils/ld/emulparams/ppcnw.sh2
-rw-r--r--contrib/binutils/ld/emulparams/scoreelf.sh31
-rw-r--r--contrib/binutils/ld/emulparams/shelf_uclinux.sh4
-rw-r--r--contrib/binutils/ld/emulparams/shelf_vxworks.sh19
-rw-r--r--contrib/binutils/ld/emulparams/shlelf_vxworks.sh2
-rw-r--r--contrib/binutils/ld/emultempl/armcoff.em79
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em95
-rw-r--r--contrib/binutils/ld/emultempl/avrelf.em269
-rw-r--r--contrib/binutils/ld/emultempl/cr16elf.em92
-rw-r--r--contrib/binutils/ld/emultempl/elf-generic.em81
-rw-r--r--contrib/binutils/ld/emultempl/elf32.em190
-rw-r--r--contrib/binutils/ld/emultempl/genelf.em39
-rw-r--r--contrib/binutils/ld/emultempl/generic.em6
-rw-r--r--contrib/binutils/ld/emultempl/linux.em4
-rw-r--r--contrib/binutils/ld/emultempl/mipself.em37
-rw-r--r--contrib/binutils/ld/emultempl/pe.em321
-rw-r--r--contrib/binutils/ld/emultempl/pep.em1706
-rw-r--r--contrib/binutils/ld/emultempl/ppc32elf.em40
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em50
-rw-r--r--contrib/binutils/ld/emultempl/scoreelf.em74
-rw-r--r--contrib/binutils/ld/emultempl/spu_ovl.S294
-rw-r--r--contrib/binutils/ld/emultempl/spu_ovl.obin0 -> 1432 bytes
-rw-r--r--contrib/binutils/ld/emultempl/spuelf.em504
-rw-r--r--contrib/binutils/ld/emultempl/sunos.em16
-rw-r--r--contrib/binutils/ld/emultempl/ticoff.em5
-rw-r--r--contrib/binutils/ld/emultempl/vanilla.em5
-rw-r--r--contrib/binutils/ld/gen-doc.texi7
-rwxr-xr-xcontrib/binutils/ld/genscripts.sh8
-rw-r--r--contrib/binutils/ld/ld.12071
-rw-r--r--contrib/binutils/ld/ld.h106
-rw-r--r--contrib/binutils/ld/ld.texinfo538
-rw-r--r--contrib/binutils/ld/ldcref.c23
-rw-r--r--contrib/binutils/ld/ldctor.c6
-rw-r--r--contrib/binutils/ld/ldemul.c5
-rw-r--r--contrib/binutils/ld/ldexp.c81
-rw-r--r--contrib/binutils/ld/ldexp.h1
-rw-r--r--contrib/binutils/ld/ldfile.c16
-rw-r--r--contrib/binutils/ld/ldgram.y81
-rw-r--r--contrib/binutils/ld/ldint.texinfo46
-rw-r--r--contrib/binutils/ld/ldlang.c868
-rw-r--r--contrib/binutils/ld/ldlang.h35
-rw-r--r--contrib/binutils/ld/ldlex.h1
-rw-r--r--contrib/binutils/ld/ldlex.l25
-rw-r--r--contrib/binutils/ld/ldmain.c128
-rw-r--r--contrib/binutils/ld/ldmisc.c78
-rw-r--r--contrib/binutils/ld/ldmisc.h3
-rw-r--r--contrib/binutils/ld/ldver.c9
-rw-r--r--contrib/binutils/ld/ldver.texi1
-rw-r--r--contrib/binutils/ld/ldwrite.c8
-rw-r--r--contrib/binutils/ld/lexsup.c121
-rw-r--r--contrib/binutils/ld/mri.c4
-rw-r--r--contrib/binutils/ld/pe-dll.c515
-rw-r--r--contrib/binutils/ld/pe-dll.h8
-rw-r--r--contrib/binutils/ld/pep-dll.c58
-rw-r--r--contrib/binutils/ld/pep-dll.h54
-rw-r--r--contrib/binutils/ld/po/Make-in3
-rw-r--r--contrib/binutils/ld/po/POTFILES.in2
-rw-r--r--contrib/binutils/ld/po/ld.pot787
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc52
-rw-r--r--contrib/binutils/ld/scripttempl/elf32cr16.sc175
-rw-r--r--contrib/binutils/ld/scripttempl/mep.sc446
-rw-r--r--contrib/binutils/ld/scripttempl/pep.sc272
-rw-r--r--contrib/binutils/libiberty/ChangeLog316
-rw-r--r--contrib/binutils/libiberty/Makefile.in64
-rw-r--r--contrib/binutils/libiberty/aclocal.m41
-rw-r--r--contrib/binutils/libiberty/argv.c59
-rw-r--r--contrib/binutils/libiberty/bcopy.c4
-rw-r--r--contrib/binutils/libiberty/choose-temp.c5
-rwxr-xr-xcontrib/binutils/libiberty/configure351
-rw-r--r--contrib/binutils/libiberty/cp-demangle.c854
-rw-r--r--contrib/binutils/libiberty/cp-demangle.h15
-rw-r--r--contrib/binutils/libiberty/cplus-dem.c2
-rw-r--r--contrib/binutils/libiberty/filename_cmp.c78
-rw-r--r--contrib/binutils/libiberty/floatformat.c111
-rw-r--r--contrib/binutils/libiberty/functions.texi82
-rw-r--r--contrib/binutils/libiberty/hashtab.c23
-rw-r--r--contrib/binutils/libiberty/hex.c2
-rw-r--r--contrib/binutils/libiberty/make-relative-prefix.c46
-rw-r--r--contrib/binutils/libiberty/mkstemps.c6
-rw-r--r--contrib/binutils/libiberty/strsignal.c6
-rw-r--r--contrib/binutils/libtool.m47386
-rw-r--r--contrib/binutils/ltcf-c.sh828
-rw-r--r--contrib/binutils/ltcf-cxx.sh1024
-rw-r--r--contrib/binutils/ltcf-gcj.sh651
-rwxr-xr-xcontrib/binutils/ltconfig2856
-rw-r--r--contrib/binutils/ltgcc.m460
-rw-r--r--contrib/binutils/ltmain.sh7776
-rw-r--r--contrib/binutils/ltoptions.m4342
-rw-r--r--contrib/binutils/ltsugar.m4111
-rw-r--r--contrib/binutils/ltversion.m423
-rw-r--r--contrib/binutils/opcodes/ChangeLog792
-rw-r--r--contrib/binutils/opcodes/ChangeLog-2006837
-rw-r--r--contrib/binutils/opcodes/Makefile.am671
-rw-r--r--contrib/binutils/opcodes/Makefile.in718
-rw-r--r--contrib/binutils/opcodes/acinclude.m424
-rw-r--r--contrib/binutils/opcodes/aclocal.m439
-rw-r--r--contrib/binutils/opcodes/arm-dis.c2761
-rw-r--r--contrib/binutils/opcodes/config.in113
-rwxr-xr-xcontrib/binutils/opcodes/configure9990
-rw-r--r--contrib/binutils/opcodes/configure.in12
-rw-r--r--contrib/binutils/opcodes/cr16-dis.c820
-rw-r--r--contrib/binutils/opcodes/cr16-opc.c611
-rw-r--r--contrib/binutils/opcodes/disassemble.c38
-rw-r--r--contrib/binutils/opcodes/i386-dis.c4733
-rw-r--r--contrib/binutils/opcodes/i386-gen.c394
-rw-r--r--contrib/binutils/opcodes/i386-opc.c (renamed from contrib/binutils/binutils/budemang.h)25
-rw-r--r--contrib/binutils/opcodes/i386-opc.h239
-rw-r--r--contrib/binutils/opcodes/i386-opc.tbl1489
-rw-r--r--contrib/binutils/opcodes/i386-reg.tbl182
-rw-r--r--contrib/binutils/opcodes/i386-tbl.h4468
-rw-r--r--contrib/binutils/opcodes/ia64-gen.c48
-rw-r--r--contrib/binutils/opcodes/mep-asm.c1398
-rw-r--r--contrib/binutils/opcodes/mep-desc.c2729
-rw-r--r--contrib/binutils/opcodes/mep-desc.h342
-rw-r--r--contrib/binutils/opcodes/mep-dis.c1205
-rw-r--r--contrib/binutils/opcodes/mep-ibld.c2541
-rw-r--r--contrib/binutils/opcodes/mep-opc.c2274
-rw-r--r--contrib/binutils/opcodes/mep-opc.h294
-rw-r--r--contrib/binutils/opcodes/mips-dis.c113
-rw-r--r--contrib/binutils/opcodes/mips-opc.c485
-rw-r--r--contrib/binutils/opcodes/mips16-opc.c270
-rw-r--r--contrib/binutils/opcodes/po/Make-in3
-rw-r--r--contrib/binutils/opcodes/po/POTFILES.in17
-rw-r--r--contrib/binutils/opcodes/po/opcodes.pot473
-rw-r--r--contrib/binutils/opcodes/ppc-dis.c93
-rw-r--r--contrib/binutils/opcodes/ppc-opc.c900
-rw-r--r--contrib/binutils/opcodes/s390-mkopc.c5
-rw-r--r--contrib/binutils/opcodes/s390-opc.c35
-rw-r--r--contrib/binutils/opcodes/s390-opc.txt96
-rw-r--r--contrib/binutils/opcodes/score-dis.c504
-rw-r--r--contrib/binutils/opcodes/score-opc.h487
-rw-r--r--contrib/binutils/opcodes/sh-dis.c4
-rw-r--r--contrib/binutils/opcodes/spu-dis.c260
-rw-r--r--contrib/binutils/opcodes/spu-opc.c44
611 files changed, 198461 insertions, 85282 deletions
diff --git a/contrib/binutils/ChangeLog b/contrib/binutils/ChangeLog
index 1d6afc2..dbb7644 100644
--- a/contrib/binutils/ChangeLog
+++ b/contrib/binutils/ChangeLog
@@ -1,8 +1,691 @@
+2007-06-29 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * configure.ac: Don't add target-libmudflap to noconfigdirs for
+ uclinux and linux-uclibc targets.
+ * configure: Regenerate.
+
+2007-06-28 DJ Delorie <dj@redhat.com>
+
+ * configure.ac (arm*-*-linux-gnueabi): Don't build libgloss if we're
+ not building newlib.
+ * configure: Regenerated.
+
+2007-06-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * src-release (DEVO_SUPPORT): Correct typos.
+
+2007-06-18 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.def: Add dependency from configure-gdb to all-bfd.
+ * Makefile.in: Regenerated.
+
+2007-06-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (cleanstrap): Don't delete the toplevel Makefile.
+ (distclean-stage[+id+]): Possibly delete stage_last.
+ * Makefile.in: Regenerate.
+
+2007-06-07 Ben Elliston <bje@au.ibm.com>
+
+ * config.sub, config.guess: Update from upstream sources.
+
+2007-06-07 Ben Elliston <bje@au.ibm.com>
+
+ * Makefile.tpl: Fix spelling error.
+ * Makefile.in: Regenerate.
+
+2007-06-04 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync with gcc:
+ 2007-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/29382
+ * configure.ac: Don't use -fkeep-inline-functions for GCC < 3.3.1.
+ * configure: Rebuilt.
+
+2007-06-01 Steve Ellcey <sje@cup.hp.com>
+
+ * libtool.m4 (LT_CMD_MAX_LEN): Try using getconf to set
+ lt_cv_sys_max_cmd_len.
+
+2007-05-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * ltgcc.m4: Update from GCC.
+
+2007-05-25 Andreas Tobler <a.tobler@schweiz.org>
+
+ * ltmain.sh: Fix Darwin verstring, remove ${wl}.
+
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
+
+ * ltmain.sh: Update from GCC.
+ * libtool.m4: Update from GCC.
+ * ltsugar.m4: New. Update from GCC.
+ * ltversion.m4: New. Update from GCC.
+ * ltoptions.m4: New. Update from GCC.
+ * ltconfig: Remove.
+ * ltcf-c.sh: Remove.
+ * ltcf-cxx.sh: Remove.
+ * ltcf-gcj.sh: Remove.
+ * src-release: Update with new libtool file list.
+
+2007-05-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (bootstrap_stage): Replace stage_make_flags with
+ stage_cflags.
+ * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS, POSTSTAGE1_FLAGS_TO_PASS):
+ Remove CFLAGS/LIBCFLAGS.
+ (configure-stage[+id+]-[+prefix+][+module+],
+ all-stage[+id+]-[+prefix+][+module+]): Pass it from [+stage_cflags+].
+ * Makefile.in: Regenerate.
+
+2007-04-14 Steve Ellcey <sje@cup.hp.com>
+
+ * config-ml.in: Update from GCC.
+
+2007-04-09 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * src-release (do-proto-toplev): Process the support directories before
+ the tool directory.
+
+2007-03-21 Richard Sandiford <richard@codesourcery.com>
+
+ * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Fix m4 quoting
+ of glob. Quote arguments with single quotes too.
+ * configure: Regenerate.
+
+2007-03-12 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * Makefile.def (fixincludes): Remove unneeded "missing" lines.
+ * Makefile.in: Regenerate
+
+2007-03-07 Andreas Schwab <schwab@suse.de>
+
+ * configure: Regenerate.
+
+2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * configure.ac: Add "--with-pdfdir" configure option,
+ which defines pdfdir variable.
+ * Makefile.def (target=fixincludes): Add install-pdf to
+ missing targets.
+ (recursive_targets): Add install-pdf target.
+ (flags_to_pass): Add pdfdir.
+ * Makefile.tpl: Add pdfdir handling, add do-install-pdf
+ target.
+ * configure: Regenerate
+ * Makefile.in: Regenerate
+
+2007-02-28 Eric Christopher <echristo@apple.com>
+
+ Revert:
+ 2006-12-07 Mike Stump <mrs@apple.com>
+
+ * Makefile.def (dependencies): Add dependency for
+ install-target-libssp and install-target-libgomp on
+ install-gcc.
+ * Makefile.in: Regenerate.
+
+2007-02-27 Matt Kraai <kraai@ftbfs.org>
+
+ * configure: Regenerate.
+ * configure.ac: Move statements after variable declarations.
+
+2007-02-19 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.ac: Adjust for loop syntax.
+ * configure: Regenerate.
+
+2007-02-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt.
+
+2007-02-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.ac: Drop multiple occurrences of --enable-languages,
+ and fix its quoting.
+ * configure: Rebuilt.
+
+2007-02-17 Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Fix quoting.
+ * configure: Regenerate.
+
+2007-02-13 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.ac (target_libraries): Move libgcc before libiberty.
+ * configure: Regenerated.
+
+2007-02-13 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate again?
+
+2007-02-13 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Reapply PR30748 fix which was lost in the previous commit.
+
+2007-02-13 Daniel Jacobowitz <dan@codesourcery.com>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/30753
+ * configure.ac: Remove obsolete build / host tests. Use AC_PROG_CC
+ unconditionally. Use AC_PROG_CXX. Use ACX_TOOL_DIRS to find $prefix.
+ * configure: Regenerated.
+
+2007-02-10 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure: Regenerate.
+
+2007-02-09 Daniel Jacobowitz <dan@codesourcery.com>
+
+ PR bootstrap/30748
+ * configure.ac: Correct syntax for Solaris ksh.
+ * configure: Regenerated.
+
+2007-02-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def: Sync with GCC.
+ * Makefile.tpl: Sync with GCC.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2007-02-09 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.tpl (build_alias, host_alias, target_alias): Use
+ noncanonical equivalents.
+ * configure.in: Rename to...
+ * configure.ac: ...this. Update AC_PREREQ. Prevent error for
+ AS_FOR_TARGET. Set build_noncanonical, host_noncanonical, and
+ target_noncanonical. Use them. Rewrite removal of configure
+ arguments for autoconf 2.59. Discard variable settings. Force
+ program_transform_name for native tools.
+
+ * Makefile.in: Regenerated.
+ * configure: Regenerated with autoconf 2.59.
+
+ * src-release (DEVO_SUPPORT, do-proto-toplev): Expect configure.ac.
+
+2007-02-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.LIBGLOSS: Reformat default Red Hat
+ license to fit within 80 columns.
+ * COPYING.NEWLIB: Ditto.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+
+ * Contribute the following changes:
+ 2006-11-28 DJ Delorie <dj@redhat.com>
+
+ * configure.in: Fix typo for mep's target_makefile_frag.
+ * configure: Regenerated.
+
+ 2005-04-22 Richard Sandiford <rsandifo@redhat.com>
+
+ * configure.in (mep*): Add -mlibrary to FLAGS_FOR_TARGET.
+ * configure: Regenerate.
+
+ 2001-09-19 DJ Delorie <dj@redhat.com>
+
+ * configure.in (target_makefile_frag): use mt-mep
+
+ 2001-06-12 Don Howard <dhoward@redhat.com>
+
+ * configure.in: Remove gdb from MeP skip list.
+
+ 2001-04-05 DJ Delorie <dj@redhat.com>
+
+ * configure.in (noconfigdirs): Remove gcc from MeP skip list.
+
+ 2001-03-20 Ben Elliston <bje@redhat.com>
+
+ * configure.in (noconfigdirs): Add gcc and gdb for MeP.
+
+ 2001-03-19 Ben Elliston <bje@redhat.com>
+
+ * config.sub (mep, mep-*): Add.
+
+2007-01-31 Andreas Schwab <schwab@suse.de>
+
+ * Makefile.tpl (LDFLAGS): Substitute it.
+ * Makefile.in: Regenerate.
+
+2007-01-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Change == to = in test command.
+ * configure: Regenerate.
+
+2007-01-11 Paolo Bonzini <bonzini@gnu.org>
+ Nick Clifton <nickc@redhat.com>
+ Kaveh R. Ghazi <ghazi@caip.rutgets.edu>
+
+ * configure.in (build_configargs, host_configargs, target_configargs):
+ Remove build/host/target parameters.
+ (host_libs): Add gmp and mpfr.
+ (GMP tests): Reorganize to allow in-tree GMP/MPFR.
+ * Makefile.def (gmp, mpfr): New.
+ (gcc): Remove target.
+ * Makefile.tpl (build_os, build_vendor, host_os, host_vendor,
+ target_os, target_vendor): New.
+ (configure): Add host_alias/target_alias arguments. Adjust invocations.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+2007-01-11 Matt Fago <fago@earthlink.net>
+
+ * configure.in: Try to link to functions only in mpfr 2.2.x
+ to improve robustness of configure tests.
+ * configure: Regenerate.
+
+2007-01-08 Kai Tietz <kai.tietz@onevision.com>
+
+ * configure.in: Add support for an x86_64-mingw* target.
+ * configure: Regenerate.
+
+2007-01-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.tpl (all-target): Correct @if conditional for target
+ modules.
+ * configure.in: Omit libiberty if building only target libgcc.
+ * configure, Makefile.in: Regenerated.
+
+2007-01-04 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Use DEV-PHASE to detect the default for --enable-werror.
+ * configure: Regenerate.
+
+2007-01-03 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.def (target_modules): Add libgcc.
+ (lang_env_dependencies): Remove default items. Use no_c and no_gcc.
+ * Makefile.tpl (clean-target-libgcc): Delete.
+ (configure-target-[+module+]): Emit --disable-bootstrap dependencies
+ on gcc even for bootstrapped modules. Rewrite handling of
+ lang_env_dependencies to loop over target_modules.
+ * configure.in (target_libraries): Add target-libgcc.
+ * Makefile.in, configure: Regenerated.
+
+2006-12-29 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync with gcc:
+ 2006-12-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Reorganize recognition of languages. Add
+ --enable-stage1-languages. Show supported languages for the chosen
+ target rather than all recognized languages.
+ * configure: Regenerate.
+
+ 2006-12-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (GCC_STRAP_TARGETS, all-prebootstrap): Remove.
+ * Makefile.in: Regenerate.
+
+ 2006-12-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in: Warn that MPFR 2.2.0 is buggy.
+ * configure: Regenerate.
+
+2006-12-27 Ian Lance Taylor <iant@google.com>
+
+ * configure.in: When removing Makefiles to force a reconfigure, also
+ remove prev-DIR*/Makefile.
+ * configure: Regenerate.
+
+2006-12-23 Kazu Hirata <kazu@codesourcery.com>
+
+ * config.bfd: Recognize fido.
+
+2006-12-19 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync with gcc:
+
+ 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Remove "$build" case for powerpc-*-darwin* since
+ it only affects bootstrap and could be tested on "$host" as well.
+ * configure: Regenerate.
+ * config/mh-ppc-darwin: Add to the stage1 cflags here.
+
+ 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/29544
+ * Makefile.def (flags_to_pass): Add STAGE1_CHECKING.
+ (bootstrap_stage): Add STAGE1_CHECKING to stage1 configure flags,
+ move here comment from Makefile.tpl.
+ * Makefile.tpl: Move some definitions higher in the file.
+ (STAGE1_CHECKING): New.
+ * configure.in: Add --enable-stage1-checking.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+ 2006-12-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in: Update error message for missing GMP/MPFR.
+
+ * configure: Regenerate.
+
+ 2006-12-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in: Update MPFR version in error message.
+
+ * configure: Regenerate.
+
+ 2006-11-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * configure.in (--with-mpfr-dir, --with-gmp-dir): Remove flags.
+ (--with-mpfr-include, --with-mpfr-lib, --with-gmp-include,
+ --with-gmp-lib): New flags.
+
+ * configure: Regenerate.
+
+2006-12-12 Andreas Tobler <a.tobler@schweiz.org>
+
+ PR bootstrap/30134
+ * configure.in: Correct x86 darwin support for libjava to powerpc
+ and i?86 only.
+ * configure: Regenerate.
+
+2006-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in: Handle spu makefile frag.
+ * Makefile.tpl (MAINT): Define
+ (MAINTAINER_MODE_FALSE, MAINTAINER_MODE_TRUE): Define.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+2006-12-11 Ben Elliston <bje@au.ibm.com>
+
+ * config.sub, config.guess: Update from upstream sources.
+
+2006-12-11 Ben Elliston <bje@au.ibm.com>
+
+ * configure.in: Sync with GCC (spu-*-*).
+ * configure: Sync with GCC.
+
+2006-12-07 Mike Stump <mrs@apple.com>
+
+ * Makefile.def (dependencies): Add dependency for
+ install-target-libssp and install-target-libgomp on
+ install-gcc.
+ * Makefile.in: Regenerate.
+
+2006-11-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (clean-target-libgcc): Test for gcc Makefile presence.
+ (unstage): Test for stage_last presence.
+
+ PR bootstrap/29802
+ * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Add HOST_SUBDIR in STAGE_PREFIX.
+ * Makefile.in: Regenerate.
+
+2006-11-14 DJ Delorie <dj@redhat.com>
+
+ * Makefile.tpl (clean-stage*): Sync with GCC (clean).
+ * Makefile.in: Sync with GCC.
+ * configure.in: Sync with GCC (mpfr, gmp).
+ * configure: Sync with GCC.
+
+2006-11-08 Jie Zhang <jie.zhang@analog.com>
+
+ * configure.in: Remove target-libgloss from noconfigdirs for
+ bfin-*-*.
+ * configure: Regenerated.
+
+2006-10-27 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Add spu license.
+ * COPYING.LIBGLOSS: Ditto.
+
+2006-10-17 Brooks Moses <bmoses@stanford.edu>
+
+ * Makefile.def: Added pdf target handling.
+ * Makefile.tpl: Added pdf target handling.
+ * Makefile.in: Regenerated.
+
+2006-10-11 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Updated.
+ * COPYING.LIBGLOSS: Ditto.
+
+2006-09-27 Dave Brolley <brolley@redhat.com>
+
+ * configure.in (RUNTEST): Look for 'runtest' in the source tree by using
+ $s instead of $r.
+ * configure: Regenerated.
+
+2006-09-26 Ben Elliston <bje@au.ibm.com>
+
+ * config.sub, config.guess: Update from upstream sources.
+
+2006-09-20 Thiemo Seufer <ths@mips.com>
+
+ * configure.in: Remove redundant handling of mips*-dec-bsd*. Likewise
+ for mipstx39-*-*. Disable libgloss for mips64*-*-linux*.
+ * configure: Regenerate.
+
+2006-08-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.in: Never build newlib for a Mingw host.
+ Never build newlib as Mingw target library.
+ Test the existence of winsup/cygwin for building a Cygwin newlib,
+ rather than just winsup.
+ Add winsup/mingw and winsup/w32api paths to FLAGS_FOR_TARGET if
+ building a Mingw target.
+ * configure: Regenerate.
+
+2006-08-15 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * config.sub: Add support for sde as alias of mipsisa32-sde-elf.
+
+2006-07-25 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync from GCC:
+ 2006-07-04 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR bootstrap/18058
+ * configure.in: Add -fkeep-inline-functions to CFLAGS for stage 1
+ if the bootstrap compiler is a GCC version that supports it.
+ * configure: Regenerate.
+
+2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Allow mingw32 and cygwin targets to build cross-gdb.
+ * configure: Regenerated.
+
+2006-07-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (configure-stageN-MODULE): Pass --with-build-libsubdir
+ for stages after the first.
+
+2006-07-17 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.def: Add dependencies for configure-opcodes
+ on configure-intl and all-opcodes on all-intl.
+ * Makefile.in: Regenerated.
+
+2006-07-04 Peter O'Gorman <peter@pogma.com>
+
+ * ltconfig: chmod 644 before ranlib during install.
+
+2006-07-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.in: Fix thinkos in previous check-in.
+ * configure: Regenerate.
+
+2006-07-03 Paolo Bonzini <bonzini@gnu.org>
+
+ Sync from gcc:
+
+ 2007-07-03 Paolo Bonzini <bonzini@gnu.org>
+
+ PR other/27063
+ * configure.in: Test subdir_requires and give an appropriate
+ error message.
+ * configure: Regenerate.
+
+ 2006-06-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ PR target/27540
+ * configure.in: Only enable libgomp on IRIX 6.
+ * configure: Regenerate.
+
+2006-06-20 David Ayers <d.ayers@inode.at>
+
+ PR bootstrap/28072
+ * configure.in: Add target-boehm-gc to noconfigdirs depending on
+ whether target-libjava is being configured instead of whether the
+ java front end is enabled.
+ * configure: Regenerate.
+
+2006-06-15 Mark Shinwell <shinwell@codesourcery.com>
+
+ * include/elf/arm.h: Correct names of R_ARM_LDC_G{0,1,2}
+ to R_ARM_LDC_SB_G{0,1,2} respectively.
+
+2006-06-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.tpl (POSTSTAGE1_HOST_EXPORTS): Export CFLAGS and LDFLAGS
+ too.
+ * Makefile.in: Regenerate.
+
+2006-06-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ Sync from gcc:
+
+ 2006-06-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ * configure.in: Don't enable libgomp on hpux10.
+ * configure: Rebuilt.
+
+2006-06-13 David Ayers <d.ayers@inode.at>
+
+ Sync from gcc:
+
+ 2006-06-12 David Ayers <d.ayers@inode.at>
+
+ PR bootstrap/27963
+ PR target/19970
+ * configure.in: Remove target-boehm-gc from noconfigdirs where
+ ${libgcj} is specified.
+ * configure: Regenerate.
+
+2006-06-08 Jeff Johnston <jjohnstn@redhat.com>
+
+ Sync from gcc:
+
+ 2005-01-12 David Edelsohn <edelsohn@gnu.org>
+ Andreas Schwab <schwab@suse.de>
+
+ PR bootstrap/18033
+ * config-ml.in: Eval option if surrounded by single quotes.
+
+2006-06-07 Carlos O'Donell <carlos@codesourcery.com>
+
+ Sync from gcc:
+
+ 2006-06-06 David Ayers <d.ayers@inode.at>
+
+ PR libobjc/13946
+ * Makefile.def: Add dependencies for libobjc which boehm-gc.
+ * Makefile.in: Regenerate.
+ * configure.in: Add --enable-objc-gc at toplevel and have it
+ enable boehm-gc for Objective-C.
+ Remove target-boehm-gc from libgcj.
+ Add target-boehm-gc to target_libraries.
+ Add target-boehm-gc to noconfigdirs where ${libgcj}
+ is specified.
+ Assert that boehm-gc is supported when requested for Objective-C.
+ Only build boehm-gc if needed either for Java or Objective-C.
+ * configure: Regenerate.
+
+ 2006-06-05 Paolo Bonzini <bonzini@gnu.org>
+
+ PR 27674
+ * Makefile.tpl (configure-[+prefix+][+module+],
+ all-[+prefix+][+module+]): Depend on stage_current if bootstrapping.
+ Remove rule to unstage bootstrapped modules.
+ (stage_current): New.
+ * Makefile.in: Regenerate.
+
+ 2006-05-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ Andreas Tobler <a.tobler@schweiz.ch>
+
+ * configure.in: Enable libgcj for hppa*-hp-hpux11*.
+ * configure: Rebuilt.
+
+ Revert
+ 2006-01-31 Richard Guenther <rguenther@suse.de>
+ Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (target_modules): Add libgcc-math target module.
+ * configure.in (target_libraries): Add libgcc-math target library.
+ (--enable-libgcc-math): New configure switch.
+ * Makefile.in: Re-generate.
+ * configure: Re-generate.
+
+2006-06-05 Jeff Johnston <jjohnstn@redhat.com>
+
+ * config-ml.in: Alter CCASFLAGS to include special
+ multilib options the same as is done for CFLAGS.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.def: Added dependencies from sim and gdb on intl, and
+ added configure dependencies to everything with an all dependency
+ on intl.
+ * gettext.m4: Removed.
+ * src-release (DEVO_SUPPORT): Don't mention gettext.m4.
+ (GDB_SUPPORT_DIRS): Add intl.
+ * Makefile.in: Regenerated.
+
+2006-05-25 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * src-release (DEVO_SUPPORT): Add config.rpath.
+
+2006-05-25 Paolo Bonzini <bonzini@gnu.org>
+
+ * Makefile.def (bfd, opcodes): Fix lib_path.
+ * Makefile.tpl (POSTSTAGE1_FLAGS_TO_PASS): Replace ADAC with ADAFLAGS.
+ (restrap): Move under "@if gcc-bootstrap". Fix typo.
+ * Makefile.in: Regenerate.
+
+2006-05-24 Mark Shinwell <shinwell@codesourcery.com>
+
+ * configure.in: Enable gprof for cross builds.
+ * configure: Regenerate.
+
2006-05-17 Daniel Jacobowitz <dan@codesourcery.com>
* src-release (MAKEINFOFLAGS): Define.
(do-proto-toplev): Pass MAKEINFOFLAGS to submakes.
+2006-05-14 Ben Elliston <bje@au.ibm.com>
+
+ * config.sub, config.guess: Update from upstream sources.
+
+2006-05-12 Ben Elliston <bje@au.ibm.com>
+
+ * config.sub, config.guess: Update from upstream sources.
+
+2006-05-04 Steve Ellcey <sje@cup.hp.com>
+
+ * blt, iwidgets, mmalloc: Remove directories.
+
+2006-05-01 DJ Delorie <dj@redhat.com>
+
+ * configure.in: Restore CFLAGS if GMP isn't present.
+ * configure: Regenerate.
+
+2006-04-18 DJ Delorie <dj@redhat.com>
+
+ * configure.in (m32c): Build libstdc++-v3. Pass flags to
+ reference libgloss so that libssp can be built in a combined
+ tree.
+ * configure: Regenerate.
+
2006-04-10 Ben Elliston <bje@au.ibm.com>
* contrib: Remove directory.
@@ -35,7 +718,7 @@
* configure: Regenerate.
2006-02-21 Rafael Avila de Espindola <rafael.espindola@gmail.com>
-
+
* Makefile.tpl (BUILD_CONFIGDIRS): Remove.
(TARGET_CONFIGDIRS): Remove.
* configure.in: Remove AC_SUBST(target_configdirs).
@@ -105,7 +788,7 @@
2006-02-14 Paolo Bonzini <bonzini@gnu.org>
Andreas Schwab <schwab@suse.de>
-
+
* configure: Regenerate.
2006-01-16 Paolo Bonzini <bonzini@gnu.org>
@@ -117,7 +800,7 @@
2006-01-16 Nick Clifton <nickc@redhat.com>
- * config.sub, config.guess: Sync from config repository.
+ * config.sub, config.guess: Sync from config repository.
2006-01-05 Alexandre Oliva <aoliva@redhat.com>
@@ -397,7 +1080,7 @@
CONFIGURED_LIPO_FOR_TARGET, CONFIGURED_STRIP_FOR_TARGET.
* Makefile.in: Regenerate.
* configure: Regenerate.
-
+
2005-09-19 David Edelsohn <edelsohn@gnu.org>
* configure.in (powerpc-*-aix*): Add target-libssp to noconfigdirs.
@@ -464,7 +1147,7 @@
2005-07-27 Mark Mitchell <mark@codesourcery.com>
* Makefile.tpl (EXTRA_TARGET_FLAGS): Set LDFLAGS=LDFLAGS_FOR_TARGET.
- * Makefile.def (flags_to_pass): Add LDFLAGS_FOR_TARGET.
+ * Makefile.def (flags_to_pass): Add LDFLAGS_FOR_TARGET.
* Makefile.in: Regenerated.
2005-07-26 Mark Mitchell <mark@codesourcery.com>
@@ -489,7 +1172,7 @@
* configure.in: Add cases for Renesas m32c.
* configure: Regenerated.
-
+
2005-07-14 Kelley Cook <kcook@gcc.gnu.org>
* COPYING, compile, config-ml.in, config.guess,
@@ -604,7 +1287,7 @@
2005-05-19 Paul Brook <paul@codesourcery.com>
- * configure.in: Rewrite misleading error message when requested
+ * configure.in: Rewrite misleading error message when requested
language cannot be built.
* configure: Regenerate.
diff --git a/contrib/binutils/MAINTAINERS b/contrib/binutils/MAINTAINERS
index b2077e7..6c5f732 100644
--- a/contrib/binutils/MAINTAINERS
+++ b/contrib/binutils/MAINTAINERS
@@ -47,15 +47,15 @@ gdb/; readline/; sim/; GDB's part of include/
include/
See binutils/, gdb/, sid/, gcc/, libiberty/ etc.
-libiberty/; libiberty's part of include/
+intl/; config.rhost; 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. 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.
+ in via a merge. Note: approved patches in gcc's libiberty or
+ intl are automatically approved in this libiberty and intl 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; ltcf-*.sh
libtool: http://www.gnu.org/software/libtool/
@@ -99,7 +99,7 @@ winsup/
See also winsup/MAINTAINERS.
config-ml.in; makefile.vms; mkdep; setup.com;
-etc/; intl/; utils/;
+etc/; utils/;
Any global maintainer can approve changes to these
files and directories.
diff --git a/contrib/binutils/Makefile.def b/contrib/binutils/Makefile.def
index 4c58ab5..3d2c6ee 100644
--- a/contrib/binutils/Makefile.def
+++ b/contrib/binutils/Makefile.def
@@ -30,15 +30,14 @@ build_modules= { module= byacc; };
build_modules= { module= flex; };
build_modules= { module= m4; };
build_modules= { module= texinfo; };
-build_modules= { module= fixincludes;
- extra_configure_args='--target=$(target)'; };
+build_modules= { module= fixincludes; };
host_modules= { module= ash; };
host_modules= { module= autoconf; };
host_modules= { module= automake; };
host_modules= { module= bash; };
-host_modules= { module= bfd; lib_path=.; bootstrap=true; };
-host_modules= { module= opcodes; lib_path=.; bootstrap=true; };
+host_modules= { module= bfd; lib_path=.libs; bootstrap=true; };
+host_modules= { module= opcodes; lib_path=.libs; bootstrap=true; };
host_modules= { module= binutils; bootstrap=true; };
host_modules= { module= bison; no_check_cross= true; };
host_modules= { module= byacc; no_check_cross= true; };
@@ -52,18 +51,23 @@ host_modules= { module= fileutils; };
host_modules= { module= findutils; };
host_modules= { module= find; };
host_modules= { module= fixincludes;
- missing= info;
- missing= dvi;
- missing= TAGS;
- missing= install-info;
- missing= installcheck; };
+ missing= TAGS; };
host_modules= { module= flex; no_check_cross= true; };
host_modules= { module= gas; bootstrap=true; };
host_modules= { module= gcc; bootstrap=true;
- target="`if [ -f stage_last ]; then echo quickstrap ; else echo all; fi`";
extra_make_flags="$(EXTRA_GCC_FLAGS)"; };
host_modules= { module= gawk; };
host_modules= { module= gettext; };
+host_modules= { module= gmp; lib_path=.libs; bootstrap=true;
+ extra_configure_flags='--disable-shared';
+ no_install= true;
+ host="none-${host_vendor}-${host_os}";
+ target="none-${host_vendor}-${host_os}"; };
+host_modules= { module= mpfr; lib_path=.libs; bootstrap=true;
+ extra_configure_flags='--disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp';
+ no_install= true;
+ host="none-${host_vendor}-${host_os}";
+ target="none-${host_vendor}-${host_os}"; };
host_modules= { module= gnuserv; };
host_modules= { module= gprof; };
host_modules= { module= gzip; };
@@ -117,8 +121,8 @@ host_modules= { module= gnattools; };
target_modules = { module= libstdc++-v3; lib_path=.libs; raw_cxx=true; };
target_modules = { module= libmudflap; lib_path=.libs; };
target_modules = { module= libssp; lib_path=.libs; };
-target_modules = { module= libgcc-math; lib_path=.libs; };
target_modules = { module= newlib; };
+target_modules = { module= libgcc; bootstrap=true; no_check=true; };
target_modules = { module= libgfortran; };
target_modules = { module= libobjc; };
target_modules = { module= libtermcap; no_check=true;
@@ -148,6 +152,8 @@ recursive_targets = { make_target= info;
depend=configure; };
recursive_targets = { make_target= dvi;
depend=configure; };
+recursive_targets = { make_target= pdf;
+ depend=configure; };
recursive_targets = { make_target= html;
depend=configure; };
recursive_targets = { make_target= TAGS;
@@ -155,6 +161,9 @@ recursive_targets = { make_target= TAGS;
recursive_targets = { make_target= install-info;
depend=configure;
depend=info; };
+recursive_targets = { make_target= install-pdf;
+ depend=configure;
+ depend=pdf; };
recursive_targets = { make_target= install-html;
depend=configure;
depend=html; };
@@ -178,6 +187,7 @@ flags_to_pass = { flag= includedir ; };
flags_to_pass = { flag= datarootdir ; };
flags_to_pass = { flag= docdir ; };
flags_to_pass = { flag= infodir ; };
+flags_to_pass = { flag= pdfdir ; };
flags_to_pass = { flag= htmldir ; };
flags_to_pass = { flag= libdir ; };
flags_to_pass = { flag= libexecdir ; };
@@ -224,7 +234,10 @@ flags_to_pass = { flag= LDFLAGS ; };
flags_to_pass = { flag= LIBCFLAGS ; };
flags_to_pass = { flag= LIBCXXFLAGS ; };
flags_to_pass = { flag= STAGE1_CFLAGS ; };
+flags_to_pass = { flag= STAGE1_CHECKING ; };
flags_to_pass = { flag= STAGE1_LANGUAGES ; };
+flags_to_pass = { flag= GNATBIND ; };
+flags_to_pass = { flag= GNATMAKE ; };
// Target tools
flags_to_pass = { flag= AR_FOR_TARGET ; };
@@ -271,7 +284,9 @@ dependencies = { module=configure-gcc; on=all-binutils; };
dependencies = { module=configure-gcc; on=all-gas; };
dependencies = { module=configure-gcc; on=all-ld; };
dependencies = { module=all-gcc; on=all-libiberty; hard=true; };
+dependencies = { module=all-gcc; on=all-gmp; };
dependencies = { module=all-gcc; on=all-intl; };
+dependencies = { module=all-gcc; on=all-mpfr; };
dependencies = { module=all-gcc; on=all-build-texinfo; };
dependencies = { module=all-gcc; on=all-build-bison; };
dependencies = { module=all-gcc; on=all-build-byacc; };
@@ -294,11 +309,15 @@ dependencies = { module=all-fixincludes; on=all-libiberty; };
dependencies = { module=all-gnattools; on=all-target-libada; };
+dependencies = { module=configure-mpfr; on=all-gmp; };
+
// Host modules specific to gdb.
+dependencies = { module=configure-gdb; on=configure-intl; };
dependencies = { module=configure-gdb; on=configure-sim; };
+dependencies = { module=configure-gdb; on=all-bfd; };
+dependencies = { module=all-gdb; on=all-intl; };
dependencies = { module=all-gdb; on=all-libiberty; };
dependencies = { module=all-gdb; on=all-opcodes; };
-dependencies = { module=all-gdb; on=all-bfd; };
dependencies = { module=all-gdb; on=all-readline; };
dependencies = { module=all-gdb; on=all-build-bison; };
dependencies = { module=all-gdb; on=all-build-byacc; };
@@ -312,9 +331,11 @@ dependencies = { module=all-libgui; on=all-itcl; };
// Host modules specific to binutils.
dependencies = { module=configure-bfd; on=configure-libiberty; hard=true; };
+dependencies = { module=configure-bfd; on=configure-intl; };
dependencies = { module=all-bfd; on=all-libiberty; };
dependencies = { module=all-bfd; on=all-intl; };
+dependencies = { module=configure-binutils; on=configure-intl; };
dependencies = { module=all-binutils; on=all-libiberty; };
dependencies = { module=all-binutils; on=all-opcodes; };
dependencies = { module=all-binutils; on=all-bfd; };
@@ -331,14 +352,17 @@ dependencies = { module=install-binutils; on=install-opcodes; };
// libopcodes depends on libbfd
dependencies = { module=install-opcodes; on=install-bfd; };
+dependencies = { module=configure-gas; on=configure-intl; };
dependencies = { module=all-gas; on=all-libiberty; };
dependencies = { module=all-gas; on=all-opcodes; };
dependencies = { module=all-gas; on=all-bfd; };
dependencies = { module=all-gas; on=all-intl; };
+dependencies = { module=configure-gprof; on=configure-intl; };
dependencies = { module=all-gprof; on=all-libiberty; };
dependencies = { module=all-gprof; on=all-bfd; };
dependencies = { module=all-gprof; on=all-opcodes; };
dependencies = { module=all-gprof; on=all-intl; };
+dependencies = { module=configure-ld; on=configure-intl; };
dependencies = { module=all-ld; on=all-libiberty; };
dependencies = { module=all-ld; on=all-bfd; };
dependencies = { module=all-ld; on=all-opcodes; };
@@ -347,8 +371,10 @@ dependencies = { module=all-ld; on=all-build-byacc; };
dependencies = { module=all-ld; on=all-build-flex; };
dependencies = { module=all-ld; on=all-intl; };
+dependencies = { module=configure-opcodes; on=configure-intl; };
dependencies = { module=all-opcodes; on=all-bfd; };
dependencies = { module=all-opcodes; on=all-libiberty; };
+dependencies = { module=all-opcodes; on=all-intl; };
// Other host modules in the 'src' repository.
dependencies = { module=all-dejagnu; on=all-tcl; };
@@ -378,6 +404,8 @@ dependencies = { module=all-sid; on=all-tk; };
dependencies = { module=install-sid; on=install-tcl; };
dependencies = { module=install-sid; on=install-tk; };
+dependencies = { module=configure-sim; on=configure-intl; };
+dependencies = { module=all-sim; on=all-intl; };
dependencies = { module=all-sim; on=all-libiberty; };
dependencies = { module=all-sim; on=all-bfd; };
dependencies = { module=all-sim; on=all-opcodes; };
@@ -425,18 +453,17 @@ dependencies = { module=all-tar; on=all-build-texinfo; };
dependencies = { module=all-uudecode; on=all-build-texinfo; };
// Target modules. These can also have dependencies on the language
-// environment (e.g. on libstdc++).
-lang_env_dependencies = { module=boehm-gc; };
+// environment (e.g. on libstdc++). By default target modules depend
+// on libgcc and newlib/libgloss.
lang_env_dependencies = { module=gperf; cxx=true; };
-lang_env_dependencies = { module=libada; };
-lang_env_dependencies = { module=libgfortran; };
-lang_env_dependencies = { module=libffi; };
lang_env_dependencies = { module=libjava; cxx=true; };
-lang_env_dependencies = { module=libmudflap; };
-lang_env_dependencies = { module=libobjc; };
-lang_env_dependencies = { module=libssp; };
-lang_env_dependencies = { module=libstdc++-v3; };
-lang_env_dependencies = { module=zlib; };
+lang_env_dependencies = { module=newlib; no_c=true; };
+lang_env_dependencies = { module=libgloss; no_c=true; };
+lang_env_dependencies = { module=libgcc; no_gcc=true; no_c=true; };
+// libiberty does not depend on newlib or libgloss because it must be
+// built newlib on some targets (e.g. Cygwin). It still needs
+// a dependency on libgcc for native targets to configure.
+lang_env_dependencies = { module=libiberty; no_c=true; };
dependencies = { module=configure-target-boehm-gc; on=configure-target-qthreads; };
dependencies = { module=configure-target-fastjar; on=configure-target-zlib; };
@@ -451,7 +478,9 @@ dependencies = { module=all-target-libjava; on=all-target-zlib; };
dependencies = { module=all-target-libjava; on=all-target-boehm-gc; };
dependencies = { module=all-target-libjava; on=all-target-qthreads; };
dependencies = { module=all-target-libjava; on=all-target-libffi; };
+dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; };
dependencies = { module=all-target-libobjc; on=all-target-libiberty; };
+dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; };
dependencies = { module=all-target-libstdc++-v3; on=all-target-libiberty; };
// Target modules in the 'src' repository.
@@ -468,33 +497,40 @@ dependencies = { module=all-target-winsup; on=all-target-libtermcap; };
// Toplevel bootstrap
bootstrap_stage = {
id=1 ;
- stage_configure_flags='--disable-intermodule \
+
+ // * We force-disable intermodule optimizations, even if
+ // --enable-intermodule was passed, since the installed compiler
+ // probably can't handle them. Luckily, autoconf always respects
+ // the last argument when conflicting --enable arguments are passed.
+ // * Likewise, we force-disable coverage flags, since the installed
+ // compiler probably has never heard of them.
+ stage_configure_flags='--disable-intermodule $(STAGE1_CHECKING) \
--disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"' ;
- stage_make_flags='CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)"' ; };
+ stage_cflags='$(STAGE1_CFLAGS)' ; };
bootstrap_stage = {
id=2 ; prev=1 ;
bootstrap_target=bootstrap2 ;
stage_configure_flags="@stage2_werror_flag@" ;
- stage_make_flags="" ; };
+ stage_cflags="$(BOOT_CFLAGS)" ; };
bootstrap_stage = {
id=3 ; prev=2 ; lean=1 ;
compare_target=compare ;
bootstrap_target=bootstrap ;
cleanstrap_target=cleanstrap ;
stage_configure_flags="@stage2_werror_flag@" ;
- stage_make_flags="" ; };
+ stage_cflags="$(BOOT_CFLAGS)" ; };
bootstrap_stage = {
id=4 ; prev=3 ; lean=2 ;
compare_target=compare3 ;
bootstrap_target=bootstrap4 ;
stage_configure_flags="@stage2_werror_flag@" ;
- stage_make_flags="" ; };
+ stage_cflags="$(BOOT_CFLAGS)" ; };
bootstrap_stage = {
id=profile ; prev=1 ;
stage_configure_flags="@stage2_werror_flag@" ;
- stage_make_flags='CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"' ; };
+ stage_cflags='$(BOOT_CFLAGS) -fprofile-generate' ; };
bootstrap_stage = {
id=feedback ; prev=profile ;
bootstrap_target=profiledbootstrap ;
stage_configure_flags="@stage2_werror_flag@" ;
- stage_make_flags='CFLAGS="$(BOOT_CFLAGS) -fprofile-use"' ; };
+ stage_cflags='$(BOOT_CFLAGS) -fprofile-use' ; };
diff --git a/contrib/binutils/Makefile.in b/contrib/binutils/Makefile.in
index 2d0da2e..e34410c 100644
--- a/contrib/binutils/Makefile.in
+++ b/contrib/binutils/Makefile.in
@@ -25,11 +25,17 @@
# -------------------------------
VPATH=@srcdir@
-build_alias=@build_alias@
+build_alias=@build_noncanonical@
+build_vendor=@build_vendor@
+build_os=@build_os@
build=@build@
-host_alias=@host_alias@
+host_alias=@host_noncanonical@
+host_vendor=@host_vendor@
+host_os=@host_os@
host=@host@
-target_alias=@target_alias@
+target_alias=@target_noncanonical@
+target_vendor=@target_vendor@
+target_os=@target_os@
target=@target@
program_transform_name = @program_transform_name@
@@ -52,6 +58,7 @@ oldincludedir = @oldincludedir@
infodir = @infodir@
datarootdir = @datarootdir@
docdir = @docdir@
+pdfdir = @pdfdir@
htmldir = @htmldir@
mandir = @mandir@
man1dir = $(mandir)/man1
@@ -70,6 +77,9 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
LN = @LN@
LN_S = @LN_S@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
# -------------------------------------------------
# Miscellaneous non-standard autoconf-set variables
@@ -177,7 +187,8 @@ POSTSTAGE1_HOST_EXPORTS = \
CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \
$$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ \
- -B$(build_tooldir)/bin/"; export CC_FOR_BUILD;
+ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
+ LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;
# Target libraries are put under this directory:
TARGET_SUBDIR = @target_subdir@
@@ -285,13 +296,26 @@ RANLIB = @RANLIB@
STRIP = @STRIP@
WINDRES = @WINDRES@
+GNATBIND = @GNATBIND@
+GNATMAKE = @GNATMAKE@
+
CFLAGS = @CFLAGS@
-LDFLAGS =
+LDFLAGS = @LDFLAGS@
LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
PICFLAG =
+# Only build the C compiler for stage1, because that is the only one that
+# we can guarantee will build with the native compiler, and also it is the
+# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
+
+STAGE1_CFLAGS=@stage1_cflags@
+STAGE1_CHECKING=@stage1_checking@
+STAGE1_LANGUAGES=@stage1_languages@
+
# -----------------------------------------------
# Programs producing files for the TARGET machine
# -----------------------------------------------
@@ -354,7 +378,7 @@ all:
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
-TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgcc-math)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)
+TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)
@if target-libstdc++-v3
TARGET_LIB_PATH_libstdc++-v3 = $$r/$(TARGET_SUBDIR)/libstdc++-v3/.libs:
@@ -368,10 +392,6 @@ TARGET_LIB_PATH_libmudflap = $$r/$(TARGET_SUBDIR)/libmudflap/.libs:
TARGET_LIB_PATH_libssp = $$r/$(TARGET_SUBDIR)/libssp/.libs:
@endif target-libssp
-@if target-libgcc-math
-TARGET_LIB_PATH_libgcc-math = $$r/$(TARGET_SUBDIR)/libgcc-math/.libs:
-@endif target-libgcc-math
-
@if target-libgomp
TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
@endif target-libgomp
@@ -380,7 +400,7 @@ TARGET_LIB_PATH_libgomp = $$r/$(TARGET_SUBDIR)/libgomp/.libs:
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that programs built for the host machine work.
-HOST_LIB_PATH = $(HOST_LIB_PATH_bfd)$(HOST_LIB_PATH_opcodes)
+HOST_LIB_PATH = $(HOST_LIB_PATH_bfd)$(HOST_LIB_PATH_opcodes)$(HOST_LIB_PATH_gmp)$(HOST_LIB_PATH_mpfr)
# Define HOST_LIB_PATH_gcc here, for the sake of TARGET_LIB_PATH, ouch
@if gcc
@@ -390,14 +410,24 @@ HOST_LIB_PATH_gcc = $$r/$(HOST_SUBDIR)/gcc:$$r/$(HOST_SUBDIR)/prev-gcc:
@if bfd
HOST_LIB_PATH_bfd = \
- $$r/$(HOST_SUBDIR)/bfd/.:$$r/$(HOST_SUBDIR)/prev-bfd/.:
+ $$r/$(HOST_SUBDIR)/bfd/.libs:$$r/$(HOST_SUBDIR)/prev-bfd/.libs:
@endif bfd
@if opcodes
HOST_LIB_PATH_opcodes = \
- $$r/$(HOST_SUBDIR)/opcodes/.:$$r/$(HOST_SUBDIR)/prev-opcodes/.:
+ $$r/$(HOST_SUBDIR)/opcodes/.libs:$$r/$(HOST_SUBDIR)/prev-opcodes/.libs:
@endif opcodes
+@if gmp
+HOST_LIB_PATH_gmp = \
+ $$r/$(HOST_SUBDIR)/gmp/.libs:$$r/$(HOST_SUBDIR)/prev-gmp/.libs:
+@endif gmp
+
+@if mpfr
+HOST_LIB_PATH_mpfr = \
+ $$r/$(HOST_SUBDIR)/mpfr/.libs:$$r/$(HOST_SUBDIR)/prev-mpfr/.libs:
+@endif mpfr
+
# Flags to pass down to all sub-makes.
BASE_FLAGS_TO_PASS = \
@@ -411,6 +441,7 @@ BASE_FLAGS_TO_PASS = \
"datarootdir=$(datarootdir)" \
"docdir=$(docdir)" \
"infodir=$(infodir)" \
+ "pdfdir=$(pdfdir)" \
"htmldir=$(htmldir)" \
"libdir=$(libdir)" \
"libexecdir=$(libexecdir)" \
@@ -453,7 +484,10 @@ BASE_FLAGS_TO_PASS = \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCXXFLAGS=$(LIBCXXFLAGS)" \
"STAGE1_CFLAGS=$(STAGE1_CFLAGS)" \
+ "STAGE1_CHECKING=$(STAGE1_CHECKING)" \
"STAGE1_LANGUAGES=$(STAGE1_LANGUAGES)" \
+ "GNATBIND=$(GNATBIND)" \
+ "GNATMAKE=$(GNATMAKE)" \
"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
@@ -512,6 +546,14 @@ X11_FLAGS_TO_PASS = \
'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
+# Flags to pass to stage2 and later makes.
+
+POSTSTAGE1_FLAGS_TO_PASS = \
+ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+ GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind" \
+ LDFLAGS="$(BOOT_LDFLAGS)" \
+ "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
+
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; those variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
@@ -577,6 +619,8 @@ configure-host: \
maybe-configure-gcc \
maybe-configure-gawk \
maybe-configure-gettext \
+ maybe-configure-gmp \
+ maybe-configure-mpfr \
maybe-configure-gnuserv \
maybe-configure-gprof \
maybe-configure-gzip \
@@ -626,8 +670,8 @@ configure-target: \
maybe-configure-target-libstdc++-v3 \
maybe-configure-target-libmudflap \
maybe-configure-target-libssp \
- maybe-configure-target-libgcc-math \
maybe-configure-target-newlib \
+ maybe-configure-target-libgcc \
maybe-configure-target-libgfortran \
maybe-configure-target-libobjc \
maybe-configure-target-libtermcap \
@@ -709,6 +753,12 @@ all-host: maybe-all-gcc
@endif gcc-no-bootstrap
all-host: maybe-all-gawk
all-host: maybe-all-gettext
+@if gmp-no-bootstrap
+all-host: maybe-all-gmp
+@endif gmp-no-bootstrap
+@if mpfr-no-bootstrap
+all-host: maybe-all-mpfr
+@endif mpfr-no-bootstrap
all-host: maybe-all-gnuserv
all-host: maybe-all-gprof
all-host: maybe-all-gzip
@@ -771,8 +821,10 @@ all-host: maybe-all-gnattools
all-target: maybe-all-target-libstdc++-v3
all-target: maybe-all-target-libmudflap
all-target: maybe-all-target-libssp
-all-target: maybe-all-target-libgcc-math
all-target: maybe-all-target-newlib
+@if target-libgcc-no-bootstrap
+all-target: maybe-all-target-libgcc
+@endif target-libgcc-no-bootstrap
all-target: maybe-all-target-libgfortran
all-target: maybe-all-target-libobjc
all-target: maybe-all-target-libtermcap
@@ -830,6 +882,8 @@ info-host: maybe-info-gas
info-host: maybe-info-gcc
info-host: maybe-info-gawk
info-host: maybe-info-gettext
+info-host: maybe-info-gmp
+info-host: maybe-info-mpfr
info-host: maybe-info-gnuserv
info-host: maybe-info-gprof
info-host: maybe-info-gzip
@@ -880,8 +934,8 @@ info-host: maybe-info-gnattools
info-target: maybe-info-target-libstdc++-v3
info-target: maybe-info-target-libmudflap
info-target: maybe-info-target-libssp
-info-target: maybe-info-target-libgcc-math
info-target: maybe-info-target-newlib
+info-target: maybe-info-target-libgcc
info-target: maybe-info-target-libgfortran
info-target: maybe-info-target-libobjc
info-target: maybe-info-target-libtermcap
@@ -934,6 +988,8 @@ dvi-host: maybe-dvi-gas
dvi-host: maybe-dvi-gcc
dvi-host: maybe-dvi-gawk
dvi-host: maybe-dvi-gettext
+dvi-host: maybe-dvi-gmp
+dvi-host: maybe-dvi-mpfr
dvi-host: maybe-dvi-gnuserv
dvi-host: maybe-dvi-gprof
dvi-host: maybe-dvi-gzip
@@ -984,8 +1040,8 @@ dvi-host: maybe-dvi-gnattools
dvi-target: maybe-dvi-target-libstdc++-v3
dvi-target: maybe-dvi-target-libmudflap
dvi-target: maybe-dvi-target-libssp
-dvi-target: maybe-dvi-target-libgcc-math
dvi-target: maybe-dvi-target-newlib
+dvi-target: maybe-dvi-target-libgcc
dvi-target: maybe-dvi-target-libgfortran
dvi-target: maybe-dvi-target-libobjc
dvi-target: maybe-dvi-target-libtermcap
@@ -1003,6 +1059,112 @@ dvi-target: maybe-dvi-target-rda
dvi-target: maybe-dvi-target-libada
dvi-target: maybe-dvi-target-libgomp
+.PHONY: do-pdf
+do-pdf:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) pdf-host \
+ pdf-target
+
+
+.PHONY: pdf-host
+
+pdf-host: maybe-pdf-ash
+pdf-host: maybe-pdf-autoconf
+pdf-host: maybe-pdf-automake
+pdf-host: maybe-pdf-bash
+pdf-host: maybe-pdf-bfd
+pdf-host: maybe-pdf-opcodes
+pdf-host: maybe-pdf-binutils
+pdf-host: maybe-pdf-bison
+pdf-host: maybe-pdf-byacc
+pdf-host: maybe-pdf-bzip2
+pdf-host: maybe-pdf-dejagnu
+pdf-host: maybe-pdf-diff
+pdf-host: maybe-pdf-dosutils
+pdf-host: maybe-pdf-etc
+pdf-host: maybe-pdf-fastjar
+pdf-host: maybe-pdf-fileutils
+pdf-host: maybe-pdf-findutils
+pdf-host: maybe-pdf-find
+pdf-host: maybe-pdf-fixincludes
+pdf-host: maybe-pdf-flex
+pdf-host: maybe-pdf-gas
+pdf-host: maybe-pdf-gcc
+pdf-host: maybe-pdf-gawk
+pdf-host: maybe-pdf-gettext
+pdf-host: maybe-pdf-gmp
+pdf-host: maybe-pdf-mpfr
+pdf-host: maybe-pdf-gnuserv
+pdf-host: maybe-pdf-gprof
+pdf-host: maybe-pdf-gzip
+pdf-host: maybe-pdf-hello
+pdf-host: maybe-pdf-indent
+pdf-host: maybe-pdf-intl
+pdf-host: maybe-pdf-tcl
+pdf-host: maybe-pdf-itcl
+pdf-host: maybe-pdf-ld
+pdf-host: maybe-pdf-libcpp
+pdf-host: maybe-pdf-libdecnumber
+pdf-host: maybe-pdf-libgui
+pdf-host: maybe-pdf-libiberty
+pdf-host: maybe-pdf-libtool
+pdf-host: maybe-pdf-m4
+pdf-host: maybe-pdf-make
+pdf-host: maybe-pdf-mmalloc
+pdf-host: maybe-pdf-patch
+pdf-host: maybe-pdf-perl
+pdf-host: maybe-pdf-prms
+pdf-host: maybe-pdf-rcs
+pdf-host: maybe-pdf-readline
+pdf-host: maybe-pdf-release
+pdf-host: maybe-pdf-recode
+pdf-host: maybe-pdf-sed
+pdf-host: maybe-pdf-send-pr
+pdf-host: maybe-pdf-shellutils
+pdf-host: maybe-pdf-sid
+pdf-host: maybe-pdf-sim
+pdf-host: maybe-pdf-tar
+pdf-host: maybe-pdf-texinfo
+pdf-host: maybe-pdf-textutils
+pdf-host: maybe-pdf-time
+pdf-host: maybe-pdf-uudecode
+pdf-host: maybe-pdf-wdiff
+pdf-host: maybe-pdf-zip
+pdf-host: maybe-pdf-zlib
+pdf-host: maybe-pdf-gdb
+pdf-host: maybe-pdf-expect
+pdf-host: maybe-pdf-guile
+pdf-host: maybe-pdf-tk
+pdf-host: maybe-pdf-libtermcap
+pdf-host: maybe-pdf-utils
+pdf-host: maybe-pdf-gnattools
+
+.PHONY: pdf-target
+
+pdf-target: maybe-pdf-target-libstdc++-v3
+pdf-target: maybe-pdf-target-libmudflap
+pdf-target: maybe-pdf-target-libssp
+pdf-target: maybe-pdf-target-newlib
+pdf-target: maybe-pdf-target-libgcc
+pdf-target: maybe-pdf-target-libgfortran
+pdf-target: maybe-pdf-target-libobjc
+pdf-target: maybe-pdf-target-libtermcap
+pdf-target: maybe-pdf-target-winsup
+pdf-target: maybe-pdf-target-libgloss
+pdf-target: maybe-pdf-target-libiberty
+pdf-target: maybe-pdf-target-gperf
+pdf-target: maybe-pdf-target-examples
+pdf-target: maybe-pdf-target-libffi
+pdf-target: maybe-pdf-target-libjava
+pdf-target: maybe-pdf-target-zlib
+pdf-target: maybe-pdf-target-boehm-gc
+pdf-target: maybe-pdf-target-qthreads
+pdf-target: maybe-pdf-target-rda
+pdf-target: maybe-pdf-target-libada
+pdf-target: maybe-pdf-target-libgomp
+
.PHONY: do-html
do-html:
@: $(MAKE); $(unstage)
@@ -1038,6 +1200,8 @@ html-host: maybe-html-gas
html-host: maybe-html-gcc
html-host: maybe-html-gawk
html-host: maybe-html-gettext
+html-host: maybe-html-gmp
+html-host: maybe-html-mpfr
html-host: maybe-html-gnuserv
html-host: maybe-html-gprof
html-host: maybe-html-gzip
@@ -1088,8 +1252,8 @@ html-host: maybe-html-gnattools
html-target: maybe-html-target-libstdc++-v3
html-target: maybe-html-target-libmudflap
html-target: maybe-html-target-libssp
-html-target: maybe-html-target-libgcc-math
html-target: maybe-html-target-newlib
+html-target: maybe-html-target-libgcc
html-target: maybe-html-target-libgfortran
html-target: maybe-html-target-libobjc
html-target: maybe-html-target-libtermcap
@@ -1142,6 +1306,8 @@ TAGS-host: maybe-TAGS-gas
TAGS-host: maybe-TAGS-gcc
TAGS-host: maybe-TAGS-gawk
TAGS-host: maybe-TAGS-gettext
+TAGS-host: maybe-TAGS-gmp
+TAGS-host: maybe-TAGS-mpfr
TAGS-host: maybe-TAGS-gnuserv
TAGS-host: maybe-TAGS-gprof
TAGS-host: maybe-TAGS-gzip
@@ -1192,8 +1358,8 @@ TAGS-host: maybe-TAGS-gnattools
TAGS-target: maybe-TAGS-target-libstdc++-v3
TAGS-target: maybe-TAGS-target-libmudflap
TAGS-target: maybe-TAGS-target-libssp
-TAGS-target: maybe-TAGS-target-libgcc-math
TAGS-target: maybe-TAGS-target-newlib
+TAGS-target: maybe-TAGS-target-libgcc
TAGS-target: maybe-TAGS-target-libgfortran
TAGS-target: maybe-TAGS-target-libobjc
TAGS-target: maybe-TAGS-target-libtermcap
@@ -1246,6 +1412,8 @@ install-info-host: maybe-install-info-gas
install-info-host: maybe-install-info-gcc
install-info-host: maybe-install-info-gawk
install-info-host: maybe-install-info-gettext
+install-info-host: maybe-install-info-gmp
+install-info-host: maybe-install-info-mpfr
install-info-host: maybe-install-info-gnuserv
install-info-host: maybe-install-info-gprof
install-info-host: maybe-install-info-gzip
@@ -1296,8 +1464,8 @@ install-info-host: maybe-install-info-gnattools
install-info-target: maybe-install-info-target-libstdc++-v3
install-info-target: maybe-install-info-target-libmudflap
install-info-target: maybe-install-info-target-libssp
-install-info-target: maybe-install-info-target-libgcc-math
install-info-target: maybe-install-info-target-newlib
+install-info-target: maybe-install-info-target-libgcc
install-info-target: maybe-install-info-target-libgfortran
install-info-target: maybe-install-info-target-libobjc
install-info-target: maybe-install-info-target-libtermcap
@@ -1315,6 +1483,112 @@ install-info-target: maybe-install-info-target-rda
install-info-target: maybe-install-info-target-libada
install-info-target: maybe-install-info-target-libgomp
+.PHONY: do-install-pdf
+do-install-pdf:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) install-pdf-host \
+ install-pdf-target
+
+
+.PHONY: install-pdf-host
+
+install-pdf-host: maybe-install-pdf-ash
+install-pdf-host: maybe-install-pdf-autoconf
+install-pdf-host: maybe-install-pdf-automake
+install-pdf-host: maybe-install-pdf-bash
+install-pdf-host: maybe-install-pdf-bfd
+install-pdf-host: maybe-install-pdf-opcodes
+install-pdf-host: maybe-install-pdf-binutils
+install-pdf-host: maybe-install-pdf-bison
+install-pdf-host: maybe-install-pdf-byacc
+install-pdf-host: maybe-install-pdf-bzip2
+install-pdf-host: maybe-install-pdf-dejagnu
+install-pdf-host: maybe-install-pdf-diff
+install-pdf-host: maybe-install-pdf-dosutils
+install-pdf-host: maybe-install-pdf-etc
+install-pdf-host: maybe-install-pdf-fastjar
+install-pdf-host: maybe-install-pdf-fileutils
+install-pdf-host: maybe-install-pdf-findutils
+install-pdf-host: maybe-install-pdf-find
+install-pdf-host: maybe-install-pdf-fixincludes
+install-pdf-host: maybe-install-pdf-flex
+install-pdf-host: maybe-install-pdf-gas
+install-pdf-host: maybe-install-pdf-gcc
+install-pdf-host: maybe-install-pdf-gawk
+install-pdf-host: maybe-install-pdf-gettext
+install-pdf-host: maybe-install-pdf-gmp
+install-pdf-host: maybe-install-pdf-mpfr
+install-pdf-host: maybe-install-pdf-gnuserv
+install-pdf-host: maybe-install-pdf-gprof
+install-pdf-host: maybe-install-pdf-gzip
+install-pdf-host: maybe-install-pdf-hello
+install-pdf-host: maybe-install-pdf-indent
+install-pdf-host: maybe-install-pdf-intl
+install-pdf-host: maybe-install-pdf-tcl
+install-pdf-host: maybe-install-pdf-itcl
+install-pdf-host: maybe-install-pdf-ld
+install-pdf-host: maybe-install-pdf-libcpp
+install-pdf-host: maybe-install-pdf-libdecnumber
+install-pdf-host: maybe-install-pdf-libgui
+install-pdf-host: maybe-install-pdf-libiberty
+install-pdf-host: maybe-install-pdf-libtool
+install-pdf-host: maybe-install-pdf-m4
+install-pdf-host: maybe-install-pdf-make
+install-pdf-host: maybe-install-pdf-mmalloc
+install-pdf-host: maybe-install-pdf-patch
+install-pdf-host: maybe-install-pdf-perl
+install-pdf-host: maybe-install-pdf-prms
+install-pdf-host: maybe-install-pdf-rcs
+install-pdf-host: maybe-install-pdf-readline
+install-pdf-host: maybe-install-pdf-release
+install-pdf-host: maybe-install-pdf-recode
+install-pdf-host: maybe-install-pdf-sed
+install-pdf-host: maybe-install-pdf-send-pr
+install-pdf-host: maybe-install-pdf-shellutils
+install-pdf-host: maybe-install-pdf-sid
+install-pdf-host: maybe-install-pdf-sim
+install-pdf-host: maybe-install-pdf-tar
+install-pdf-host: maybe-install-pdf-texinfo
+install-pdf-host: maybe-install-pdf-textutils
+install-pdf-host: maybe-install-pdf-time
+install-pdf-host: maybe-install-pdf-uudecode
+install-pdf-host: maybe-install-pdf-wdiff
+install-pdf-host: maybe-install-pdf-zip
+install-pdf-host: maybe-install-pdf-zlib
+install-pdf-host: maybe-install-pdf-gdb
+install-pdf-host: maybe-install-pdf-expect
+install-pdf-host: maybe-install-pdf-guile
+install-pdf-host: maybe-install-pdf-tk
+install-pdf-host: maybe-install-pdf-libtermcap
+install-pdf-host: maybe-install-pdf-utils
+install-pdf-host: maybe-install-pdf-gnattools
+
+.PHONY: install-pdf-target
+
+install-pdf-target: maybe-install-pdf-target-libstdc++-v3
+install-pdf-target: maybe-install-pdf-target-libmudflap
+install-pdf-target: maybe-install-pdf-target-libssp
+install-pdf-target: maybe-install-pdf-target-newlib
+install-pdf-target: maybe-install-pdf-target-libgcc
+install-pdf-target: maybe-install-pdf-target-libgfortran
+install-pdf-target: maybe-install-pdf-target-libobjc
+install-pdf-target: maybe-install-pdf-target-libtermcap
+install-pdf-target: maybe-install-pdf-target-winsup
+install-pdf-target: maybe-install-pdf-target-libgloss
+install-pdf-target: maybe-install-pdf-target-libiberty
+install-pdf-target: maybe-install-pdf-target-gperf
+install-pdf-target: maybe-install-pdf-target-examples
+install-pdf-target: maybe-install-pdf-target-libffi
+install-pdf-target: maybe-install-pdf-target-libjava
+install-pdf-target: maybe-install-pdf-target-zlib
+install-pdf-target: maybe-install-pdf-target-boehm-gc
+install-pdf-target: maybe-install-pdf-target-qthreads
+install-pdf-target: maybe-install-pdf-target-rda
+install-pdf-target: maybe-install-pdf-target-libada
+install-pdf-target: maybe-install-pdf-target-libgomp
+
.PHONY: do-install-html
do-install-html:
@: $(MAKE); $(unstage)
@@ -1350,6 +1624,8 @@ install-html-host: maybe-install-html-gas
install-html-host: maybe-install-html-gcc
install-html-host: maybe-install-html-gawk
install-html-host: maybe-install-html-gettext
+install-html-host: maybe-install-html-gmp
+install-html-host: maybe-install-html-mpfr
install-html-host: maybe-install-html-gnuserv
install-html-host: maybe-install-html-gprof
install-html-host: maybe-install-html-gzip
@@ -1400,8 +1676,8 @@ install-html-host: maybe-install-html-gnattools
install-html-target: maybe-install-html-target-libstdc++-v3
install-html-target: maybe-install-html-target-libmudflap
install-html-target: maybe-install-html-target-libssp
-install-html-target: maybe-install-html-target-libgcc-math
install-html-target: maybe-install-html-target-newlib
+install-html-target: maybe-install-html-target-libgcc
install-html-target: maybe-install-html-target-libgfortran
install-html-target: maybe-install-html-target-libobjc
install-html-target: maybe-install-html-target-libtermcap
@@ -1454,6 +1730,8 @@ installcheck-host: maybe-installcheck-gas
installcheck-host: maybe-installcheck-gcc
installcheck-host: maybe-installcheck-gawk
installcheck-host: maybe-installcheck-gettext
+installcheck-host: maybe-installcheck-gmp
+installcheck-host: maybe-installcheck-mpfr
installcheck-host: maybe-installcheck-gnuserv
installcheck-host: maybe-installcheck-gprof
installcheck-host: maybe-installcheck-gzip
@@ -1504,8 +1782,8 @@ installcheck-host: maybe-installcheck-gnattools
installcheck-target: maybe-installcheck-target-libstdc++-v3
installcheck-target: maybe-installcheck-target-libmudflap
installcheck-target: maybe-installcheck-target-libssp
-installcheck-target: maybe-installcheck-target-libgcc-math
installcheck-target: maybe-installcheck-target-newlib
+installcheck-target: maybe-installcheck-target-libgcc
installcheck-target: maybe-installcheck-target-libgfortran
installcheck-target: maybe-installcheck-target-libobjc
installcheck-target: maybe-installcheck-target-libtermcap
@@ -1558,6 +1836,8 @@ mostlyclean-host: maybe-mostlyclean-gas
mostlyclean-host: maybe-mostlyclean-gcc
mostlyclean-host: maybe-mostlyclean-gawk
mostlyclean-host: maybe-mostlyclean-gettext
+mostlyclean-host: maybe-mostlyclean-gmp
+mostlyclean-host: maybe-mostlyclean-mpfr
mostlyclean-host: maybe-mostlyclean-gnuserv
mostlyclean-host: maybe-mostlyclean-gprof
mostlyclean-host: maybe-mostlyclean-gzip
@@ -1608,8 +1888,8 @@ mostlyclean-host: maybe-mostlyclean-gnattools
mostlyclean-target: maybe-mostlyclean-target-libstdc++-v3
mostlyclean-target: maybe-mostlyclean-target-libmudflap
mostlyclean-target: maybe-mostlyclean-target-libssp
-mostlyclean-target: maybe-mostlyclean-target-libgcc-math
mostlyclean-target: maybe-mostlyclean-target-newlib
+mostlyclean-target: maybe-mostlyclean-target-libgcc
mostlyclean-target: maybe-mostlyclean-target-libgfortran
mostlyclean-target: maybe-mostlyclean-target-libobjc
mostlyclean-target: maybe-mostlyclean-target-libtermcap
@@ -1662,6 +1942,8 @@ clean-host: maybe-clean-gas
clean-host: maybe-clean-gcc
clean-host: maybe-clean-gawk
clean-host: maybe-clean-gettext
+clean-host: maybe-clean-gmp
+clean-host: maybe-clean-mpfr
clean-host: maybe-clean-gnuserv
clean-host: maybe-clean-gprof
clean-host: maybe-clean-gzip
@@ -1712,8 +1994,8 @@ clean-host: maybe-clean-gnattools
clean-target: maybe-clean-target-libstdc++-v3
clean-target: maybe-clean-target-libmudflap
clean-target: maybe-clean-target-libssp
-clean-target: maybe-clean-target-libgcc-math
clean-target: maybe-clean-target-newlib
+clean-target: maybe-clean-target-libgcc
clean-target: maybe-clean-target-libgfortran
clean-target: maybe-clean-target-libobjc
clean-target: maybe-clean-target-libtermcap
@@ -1766,6 +2048,8 @@ distclean-host: maybe-distclean-gas
distclean-host: maybe-distclean-gcc
distclean-host: maybe-distclean-gawk
distclean-host: maybe-distclean-gettext
+distclean-host: maybe-distclean-gmp
+distclean-host: maybe-distclean-mpfr
distclean-host: maybe-distclean-gnuserv
distclean-host: maybe-distclean-gprof
distclean-host: maybe-distclean-gzip
@@ -1816,8 +2100,8 @@ distclean-host: maybe-distclean-gnattools
distclean-target: maybe-distclean-target-libstdc++-v3
distclean-target: maybe-distclean-target-libmudflap
distclean-target: maybe-distclean-target-libssp
-distclean-target: maybe-distclean-target-libgcc-math
distclean-target: maybe-distclean-target-newlib
+distclean-target: maybe-distclean-target-libgcc
distclean-target: maybe-distclean-target-libgfortran
distclean-target: maybe-distclean-target-libobjc
distclean-target: maybe-distclean-target-libtermcap
@@ -1870,6 +2154,8 @@ maintainer-clean-host: maybe-maintainer-clean-gas
maintainer-clean-host: maybe-maintainer-clean-gcc
maintainer-clean-host: maybe-maintainer-clean-gawk
maintainer-clean-host: maybe-maintainer-clean-gettext
+maintainer-clean-host: maybe-maintainer-clean-gmp
+maintainer-clean-host: maybe-maintainer-clean-mpfr
maintainer-clean-host: maybe-maintainer-clean-gnuserv
maintainer-clean-host: maybe-maintainer-clean-gprof
maintainer-clean-host: maybe-maintainer-clean-gzip
@@ -1920,8 +2206,8 @@ maintainer-clean-host: maybe-maintainer-clean-gnattools
maintainer-clean-target: maybe-maintainer-clean-target-libstdc++-v3
maintainer-clean-target: maybe-maintainer-clean-target-libmudflap
maintainer-clean-target: maybe-maintainer-clean-target-libssp
-maintainer-clean-target: maybe-maintainer-clean-target-libgcc-math
maintainer-clean-target: maybe-maintainer-clean-target-newlib
+maintainer-clean-target: maybe-maintainer-clean-target-libgcc
maintainer-clean-target: maybe-maintainer-clean-target-libgfortran
maintainer-clean-target: maybe-maintainer-clean-target-libobjc
maintainer-clean-target: maybe-maintainer-clean-target-libtermcap
@@ -1942,12 +2228,14 @@ maintainer-clean-target: maybe-maintainer-clean-target-libgomp
# Here are the targets which correspond to the do-X targets.
-.PHONY: info installcheck dvi html install-info install-html
+.PHONY: info installcheck dvi pdf html
+.PHONY: install-info install-pdf install-html
.PHONY: clean distclean mostlyclean maintainer-clean realclean
.PHONY: local-clean local-distclean local-maintainer-clean
info: do-info
installcheck: do-installcheck
dvi: do-dvi
+pdf: do-pdf
html: do-html
# Make sure makeinfo is built before we do a `make info', if we're
@@ -1960,6 +2248,8 @@ install-info: do-install-info dir.info
$(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
else true ; fi
+install-pdf: do-install-pdf
+
install-html: do-install-html
local-clean:
@@ -1992,11 +2282,6 @@ maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
maintainer-clean: local-distclean
realclean: maintainer-clean
-# Extra dependency for clean-target, owing to the mixed nature of gcc.
-clean-target: clean-target-libgcc
-clean-target-libgcc:
- test ! -d gcc || (cd gcc && $(MAKE) $@)
-
# Check target.
.PHONY: check do-check
@@ -2029,6 +2314,8 @@ check-host: \
maybe-check-gcc \
maybe-check-gawk \
maybe-check-gettext \
+ maybe-check-gmp \
+ maybe-check-mpfr \
maybe-check-gnuserv \
maybe-check-gprof \
maybe-check-gzip \
@@ -2079,8 +2366,8 @@ check-target: \
maybe-check-target-libstdc++-v3 \
maybe-check-target-libmudflap \
maybe-check-target-libssp \
- maybe-check-target-libgcc-math \
maybe-check-target-newlib \
+ maybe-check-target-libgcc \
maybe-check-target-libgfortran \
maybe-check-target-libobjc \
maybe-check-target-libtermcap \
@@ -2159,6 +2446,8 @@ install-host-nogcc: \
maybe-install-gas \
maybe-install-gawk \
maybe-install-gettext \
+ maybe-install-gmp \
+ maybe-install-mpfr \
maybe-install-gnuserv \
maybe-install-gprof \
maybe-install-gzip \
@@ -2230,6 +2519,8 @@ install-host: \
maybe-install-gcc \
maybe-install-gawk \
maybe-install-gettext \
+ maybe-install-gmp \
+ maybe-install-mpfr \
maybe-install-gnuserv \
maybe-install-gprof \
maybe-install-gzip \
@@ -2280,8 +2571,8 @@ install-target: \
maybe-install-target-libstdc++-v3 \
maybe-install-target-libmudflap \
maybe-install-target-libssp \
- maybe-install-target-libgcc-math \
maybe-install-target-newlib \
+ maybe-install-target-libgcc \
maybe-install-target-libgfortran \
maybe-install-target-libobjc \
maybe-install-target-libtermcap \
@@ -2365,6 +2656,9 @@ TAGS: do-TAGS
.PHONY: configure-build-libiberty maybe-configure-build-libiberty
maybe-configure-build-libiberty:
+@if gcc-bootstrap
+configure-build-libiberty: stage_current
+@endif gcc-bootstrap
@if build-libiberty
maybe-configure-build-libiberty: configure-build-libiberty
configure-build-libiberty:
@@ -2385,7 +2679,8 @@ configure-build-libiberty:
libsrcdir="$$s/libiberty"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
+ $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif build-libiberty
@@ -2395,6 +2690,9 @@ configure-build-libiberty:
.PHONY: all-build-libiberty maybe-all-build-libiberty
maybe-all-build-libiberty:
+@if gcc-bootstrap
+all-build-libiberty: stage_current
+@endif gcc-bootstrap
@if build-libiberty
TARGET-build-libiberty=all
maybe-all-build-libiberty: all-build-libiberty
@@ -2413,6 +2711,9 @@ all-build-libiberty: configure-build-libiberty
.PHONY: configure-build-bison maybe-configure-build-bison
maybe-configure-build-bison:
+@if gcc-bootstrap
+configure-build-bison: stage_current
+@endif gcc-bootstrap
@if build-bison
maybe-configure-build-bison: configure-build-bison
configure-build-bison:
@@ -2433,7 +2734,8 @@ configure-build-bison:
libsrcdir="$$s/bison"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
+ $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif build-bison
@@ -2443,6 +2745,9 @@ configure-build-bison:
.PHONY: all-build-bison maybe-all-build-bison
maybe-all-build-bison:
+@if gcc-bootstrap
+all-build-bison: stage_current
+@endif gcc-bootstrap
@if build-bison
TARGET-build-bison=all
maybe-all-build-bison: all-build-bison
@@ -2461,6 +2766,9 @@ all-build-bison: configure-build-bison
.PHONY: configure-build-byacc maybe-configure-build-byacc
maybe-configure-build-byacc:
+@if gcc-bootstrap
+configure-build-byacc: stage_current
+@endif gcc-bootstrap
@if build-byacc
maybe-configure-build-byacc: configure-build-byacc
configure-build-byacc:
@@ -2481,7 +2789,8 @@ configure-build-byacc:
libsrcdir="$$s/byacc"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
+ $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif build-byacc
@@ -2491,6 +2800,9 @@ configure-build-byacc:
.PHONY: all-build-byacc maybe-all-build-byacc
maybe-all-build-byacc:
+@if gcc-bootstrap
+all-build-byacc: stage_current
+@endif gcc-bootstrap
@if build-byacc
TARGET-build-byacc=all
maybe-all-build-byacc: all-build-byacc
@@ -2509,6 +2821,9 @@ all-build-byacc: configure-build-byacc
.PHONY: configure-build-flex maybe-configure-build-flex
maybe-configure-build-flex:
+@if gcc-bootstrap
+configure-build-flex: stage_current
+@endif gcc-bootstrap
@if build-flex
maybe-configure-build-flex: configure-build-flex
configure-build-flex:
@@ -2529,7 +2844,8 @@ configure-build-flex:
libsrcdir="$$s/flex"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
+ $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif build-flex
@@ -2539,6 +2855,9 @@ configure-build-flex:
.PHONY: all-build-flex maybe-all-build-flex
maybe-all-build-flex:
+@if gcc-bootstrap
+all-build-flex: stage_current
+@endif gcc-bootstrap
@if build-flex
TARGET-build-flex=all
maybe-all-build-flex: all-build-flex
@@ -2557,6 +2876,9 @@ all-build-flex: configure-build-flex
.PHONY: configure-build-m4 maybe-configure-build-m4
maybe-configure-build-m4:
+@if gcc-bootstrap
+configure-build-m4: stage_current
+@endif gcc-bootstrap
@if build-m4
maybe-configure-build-m4: configure-build-m4
configure-build-m4:
@@ -2577,7 +2899,8 @@ configure-build-m4:
libsrcdir="$$s/m4"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
+ $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif build-m4
@@ -2587,6 +2910,9 @@ configure-build-m4:
.PHONY: all-build-m4 maybe-all-build-m4
maybe-all-build-m4:
+@if gcc-bootstrap
+all-build-m4: stage_current
+@endif gcc-bootstrap
@if build-m4
TARGET-build-m4=all
maybe-all-build-m4: all-build-m4
@@ -2605,6 +2931,9 @@ all-build-m4: configure-build-m4
.PHONY: configure-build-texinfo maybe-configure-build-texinfo
maybe-configure-build-texinfo:
+@if gcc-bootstrap
+configure-build-texinfo: stage_current
+@endif gcc-bootstrap
@if build-texinfo
maybe-configure-build-texinfo: configure-build-texinfo
configure-build-texinfo:
@@ -2625,7 +2954,8 @@ configure-build-texinfo:
libsrcdir="$$s/texinfo"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
+ $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif build-texinfo
@@ -2635,6 +2965,9 @@ configure-build-texinfo:
.PHONY: all-build-texinfo maybe-all-build-texinfo
maybe-all-build-texinfo:
+@if gcc-bootstrap
+all-build-texinfo: stage_current
+@endif gcc-bootstrap
@if build-texinfo
TARGET-build-texinfo=all
maybe-all-build-texinfo: all-build-texinfo
@@ -2653,6 +2986,9 @@ all-build-texinfo: configure-build-texinfo
.PHONY: configure-build-fixincludes maybe-configure-build-fixincludes
maybe-configure-build-fixincludes:
+@if gcc-bootstrap
+configure-build-fixincludes: stage_current
+@endif gcc-bootstrap
@if build-fixincludes
maybe-configure-build-fixincludes: configure-build-fixincludes
configure-build-fixincludes:
@@ -2673,7 +3009,8 @@ configure-build-fixincludes:
libsrcdir="$$s/fixincludes"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(BUILD_CONFIGARGS) $${srcdiroption} \
+ $(BUILD_CONFIGARGS) --build=${build_alias} --host=${build_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif build-fixincludes
@@ -2683,6 +3020,9 @@ configure-build-fixincludes:
.PHONY: all-build-fixincludes maybe-all-build-fixincludes
maybe-all-build-fixincludes:
+@if gcc-bootstrap
+all-build-fixincludes: stage_current
+@endif gcc-bootstrap
@if build-fixincludes
TARGET-build-fixincludes=all
maybe-all-build-fixincludes: all-build-fixincludes
@@ -2706,6 +3046,9 @@ all-build-fixincludes: configure-build-fixincludes
.PHONY: configure-ash maybe-configure-ash
maybe-configure-ash:
+@if gcc-bootstrap
+configure-ash: stage_current
+@endif gcc-bootstrap
@if ash
maybe-configure-ash: configure-ash
configure-ash:
@@ -2725,7 +3068,8 @@ configure-ash:
srcdiroption="--srcdir=$${topdir}/ash"; \
libsrcdir="$$s/ash"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif ash
@@ -2735,6 +3079,9 @@ configure-ash:
.PHONY: all-ash maybe-all-ash
maybe-all-ash:
+@if gcc-bootstrap
+all-ash: stage_current
+@endif gcc-bootstrap
@if ash
TARGET-ash=all
maybe-all-ash: all-ash
@@ -2780,7 +3127,7 @@ install-ash: installdirs
@endif ash
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-ash info-ash
maybe-info-ash:
@@ -2834,6 +3181,32 @@ dvi-ash: \
@endif ash
+.PHONY: maybe-pdf-ash pdf-ash
+maybe-pdf-ash:
+@if ash
+maybe-pdf-ash: pdf-ash
+
+pdf-ash: \
+ configure-ash
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in ash" ; \
+ (cd $(HOST_SUBDIR)/ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif ash
+
.PHONY: maybe-html-ash html-ash
maybe-html-ash:
@if ash
@@ -2913,6 +3286,33 @@ install-info-ash: \
@endif ash
+.PHONY: maybe-install-pdf-ash install-pdf-ash
+maybe-install-pdf-ash:
+@if ash
+maybe-install-pdf-ash: install-pdf-ash
+
+install-pdf-ash: \
+ configure-ash \
+ pdf-ash
+ @: $(MAKE); $(unstage)
+ @[ -f ./ash/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in ash" ; \
+ (cd $(HOST_SUBDIR)/ash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif ash
+
.PHONY: maybe-install-html-ash install-html-ash
maybe-install-html-ash:
@if ash
@@ -3070,6 +3470,9 @@ maintainer-clean-ash:
.PHONY: configure-autoconf maybe-configure-autoconf
maybe-configure-autoconf:
+@if gcc-bootstrap
+configure-autoconf: stage_current
+@endif gcc-bootstrap
@if autoconf
maybe-configure-autoconf: configure-autoconf
configure-autoconf:
@@ -3089,7 +3492,8 @@ configure-autoconf:
srcdiroption="--srcdir=$${topdir}/autoconf"; \
libsrcdir="$$s/autoconf"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif autoconf
@@ -3099,6 +3503,9 @@ configure-autoconf:
.PHONY: all-autoconf maybe-all-autoconf
maybe-all-autoconf:
+@if gcc-bootstrap
+all-autoconf: stage_current
+@endif gcc-bootstrap
@if autoconf
TARGET-autoconf=all
maybe-all-autoconf: all-autoconf
@@ -3144,7 +3551,7 @@ install-autoconf: installdirs
@endif autoconf
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-autoconf info-autoconf
maybe-info-autoconf:
@@ -3198,6 +3605,32 @@ dvi-autoconf: \
@endif autoconf
+.PHONY: maybe-pdf-autoconf pdf-autoconf
+maybe-pdf-autoconf:
+@if autoconf
+maybe-pdf-autoconf: pdf-autoconf
+
+pdf-autoconf: \
+ configure-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in autoconf" ; \
+ (cd $(HOST_SUBDIR)/autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif autoconf
+
.PHONY: maybe-html-autoconf html-autoconf
maybe-html-autoconf:
@if autoconf
@@ -3277,6 +3710,33 @@ install-info-autoconf: \
@endif autoconf
+.PHONY: maybe-install-pdf-autoconf install-pdf-autoconf
+maybe-install-pdf-autoconf:
+@if autoconf
+maybe-install-pdf-autoconf: install-pdf-autoconf
+
+install-pdf-autoconf: \
+ configure-autoconf \
+ pdf-autoconf
+ @: $(MAKE); $(unstage)
+ @[ -f ./autoconf/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in autoconf" ; \
+ (cd $(HOST_SUBDIR)/autoconf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif autoconf
+
.PHONY: maybe-install-html-autoconf install-html-autoconf
maybe-install-html-autoconf:
@if autoconf
@@ -3434,6 +3894,9 @@ maintainer-clean-autoconf:
.PHONY: configure-automake maybe-configure-automake
maybe-configure-automake:
+@if gcc-bootstrap
+configure-automake: stage_current
+@endif gcc-bootstrap
@if automake
maybe-configure-automake: configure-automake
configure-automake:
@@ -3453,7 +3916,8 @@ configure-automake:
srcdiroption="--srcdir=$${topdir}/automake"; \
libsrcdir="$$s/automake"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif automake
@@ -3463,6 +3927,9 @@ configure-automake:
.PHONY: all-automake maybe-all-automake
maybe-all-automake:
+@if gcc-bootstrap
+all-automake: stage_current
+@endif gcc-bootstrap
@if automake
TARGET-automake=all
maybe-all-automake: all-automake
@@ -3508,7 +3975,7 @@ install-automake: installdirs
@endif automake
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-automake info-automake
maybe-info-automake:
@@ -3562,6 +4029,32 @@ dvi-automake: \
@endif automake
+.PHONY: maybe-pdf-automake pdf-automake
+maybe-pdf-automake:
+@if automake
+maybe-pdf-automake: pdf-automake
+
+pdf-automake: \
+ configure-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in automake" ; \
+ (cd $(HOST_SUBDIR)/automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif automake
+
.PHONY: maybe-html-automake html-automake
maybe-html-automake:
@if automake
@@ -3641,6 +4134,33 @@ install-info-automake: \
@endif automake
+.PHONY: maybe-install-pdf-automake install-pdf-automake
+maybe-install-pdf-automake:
+@if automake
+maybe-install-pdf-automake: install-pdf-automake
+
+install-pdf-automake: \
+ configure-automake \
+ pdf-automake
+ @: $(MAKE); $(unstage)
+ @[ -f ./automake/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in automake" ; \
+ (cd $(HOST_SUBDIR)/automake && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif automake
+
.PHONY: maybe-install-html-automake install-html-automake
maybe-install-html-automake:
@if automake
@@ -3798,6 +4318,9 @@ maintainer-clean-automake:
.PHONY: configure-bash maybe-configure-bash
maybe-configure-bash:
+@if gcc-bootstrap
+configure-bash: stage_current
+@endif gcc-bootstrap
@if bash
maybe-configure-bash: configure-bash
configure-bash:
@@ -3817,7 +4340,8 @@ configure-bash:
srcdiroption="--srcdir=$${topdir}/bash"; \
libsrcdir="$$s/bash"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif bash
@@ -3827,6 +4351,9 @@ configure-bash:
.PHONY: all-bash maybe-all-bash
maybe-all-bash:
+@if gcc-bootstrap
+all-bash: stage_current
+@endif gcc-bootstrap
@if bash
TARGET-bash=all
maybe-all-bash: all-bash
@@ -3872,7 +4399,7 @@ install-bash: installdirs
@endif bash
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-bash info-bash
maybe-info-bash:
@@ -3926,6 +4453,32 @@ dvi-bash: \
@endif bash
+.PHONY: maybe-pdf-bash pdf-bash
+maybe-pdf-bash:
+@if bash
+maybe-pdf-bash: pdf-bash
+
+pdf-bash: \
+ configure-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in bash" ; \
+ (cd $(HOST_SUBDIR)/bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif bash
+
.PHONY: maybe-html-bash html-bash
maybe-html-bash:
@if bash
@@ -4005,6 +4558,33 @@ install-info-bash: \
@endif bash
+.PHONY: maybe-install-pdf-bash install-pdf-bash
+maybe-install-pdf-bash:
+@if bash
+maybe-install-pdf-bash: install-pdf-bash
+
+install-pdf-bash: \
+ configure-bash \
+ pdf-bash
+ @: $(MAKE); $(unstage)
+ @[ -f ./bash/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in bash" ; \
+ (cd $(HOST_SUBDIR)/bash && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif bash
+
.PHONY: maybe-install-html-bash install-html-bash
maybe-install-html-bash:
@if bash
@@ -4162,14 +4742,12 @@ maintainer-clean-bash:
.PHONY: configure-bfd maybe-configure-bfd
maybe-configure-bfd:
+@if gcc-bootstrap
+configure-bfd: stage_current
+@endif gcc-bootstrap
@if bfd
maybe-configure-bfd: configure-bfd
configure-bfd:
-@endif bfd
-@if bfd-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif bfd-bootstrap
-@if bfd
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
@@ -4185,7 +4763,8 @@ configure-bfd:
srcdiroption="--srcdir=$${topdir}/bfd"; \
libsrcdir="$$s/bfd"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif bfd
@@ -4202,6 +4781,8 @@ configure-stage1-bfd:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/bfd ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
@@ -4213,8 +4794,10 @@ configure-stage1-bfd:
srcdiroption="--srcdir=$${topdir}/bfd"; \
libsrcdir="$$s/bfd"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif bfd-bootstrap
.PHONY: configure-stage2-bfd maybe-configure-stage2-bfd
@@ -4229,6 +4812,8 @@ configure-stage2-bfd:
test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/bfd ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
@@ -4240,7 +4825,9 @@ configure-stage2-bfd:
srcdiroption="--srcdir=$${topdir}/bfd"; \
libsrcdir="$$s/bfd"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif bfd-bootstrap
@@ -4256,6 +4843,8 @@ configure-stage3-bfd:
test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/bfd ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
@@ -4267,7 +4856,9 @@ configure-stage3-bfd:
srcdiroption="--srcdir=$${topdir}/bfd"; \
libsrcdir="$$s/bfd"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif bfd-bootstrap
@@ -4283,6 +4874,8 @@ configure-stage4-bfd:
test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/bfd ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
@@ -4294,7 +4887,9 @@ configure-stage4-bfd:
srcdiroption="--srcdir=$${topdir}/bfd"; \
libsrcdir="$$s/bfd"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif bfd-bootstrap
@@ -4310,6 +4905,8 @@ configure-stageprofile-bfd:
test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/bfd ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
@@ -4321,7 +4918,9 @@ configure-stageprofile-bfd:
srcdiroption="--srcdir=$${topdir}/bfd"; \
libsrcdir="$$s/bfd"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif bfd-bootstrap
@@ -4337,6 +4936,8 @@ configure-stagefeedback-bfd:
test ! -f $(HOST_SUBDIR)/bfd/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/bfd ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/bfd ; \
cd $(HOST_SUBDIR)/bfd || exit 1; \
@@ -4348,7 +4949,9 @@ configure-stagefeedback-bfd:
srcdiroption="--srcdir=$${topdir}/bfd"; \
libsrcdir="$$s/bfd"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif bfd-bootstrap
@@ -4358,15 +4961,13 @@ configure-stagefeedback-bfd:
.PHONY: all-bfd maybe-all-bfd
maybe-all-bfd:
+@if gcc-bootstrap
+all-bfd: stage_current
+@endif gcc-bootstrap
@if bfd
TARGET-bfd=all
maybe-all-bfd: all-bfd
all-bfd: configure-bfd
-@endif bfd
-@if bfd-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif bfd-bootstrap
-@if bfd
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -4390,18 +4991,22 @@ all-stage1-bfd: configure-stage1-bfd
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-bfd)
maybe-clean-stage1-bfd: clean-stage1-bfd
clean-stage1: clean-stage1-bfd
clean-stage1-bfd:
- @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-bfd/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-bfd/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif bfd-bootstrap
@@ -4420,19 +5025,23 @@ all-stage2-bfd: configure-stage2-bfd
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-bfd)
maybe-clean-stage2-bfd: clean-stage2-bfd
clean-stage2: clean-stage2-bfd
clean-stage2-bfd:
- @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-bfd/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-bfd/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif bfd-bootstrap
@@ -4451,19 +5060,23 @@ all-stage3-bfd: configure-stage3-bfd
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-bfd)
maybe-clean-stage3-bfd: clean-stage3-bfd
clean-stage3: clean-stage3-bfd
clean-stage3-bfd:
- @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-bfd/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-bfd/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif bfd-bootstrap
@@ -4482,19 +5095,23 @@ all-stage4-bfd: configure-stage4-bfd
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-bfd)
maybe-clean-stage4-bfd: clean-stage4-bfd
clean-stage4: clean-stage4-bfd
clean-stage4-bfd:
- @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-bfd/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-bfd/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif bfd-bootstrap
@@ -4513,19 +5130,23 @@ all-stageprofile-bfd: configure-stageprofile-bfd
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-bfd)
maybe-clean-stageprofile-bfd: clean-stageprofile-bfd
clean-stageprofile: clean-stageprofile-bfd
clean-stageprofile-bfd:
- @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-bfd/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-bfd/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif bfd-bootstrap
@@ -4544,19 +5165,23 @@ all-stagefeedback-bfd: configure-stagefeedback-bfd
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/bfd && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-bfd)
maybe-clean-stagefeedback-bfd: clean-stagefeedback-bfd
clean-stagefeedback: clean-stagefeedback-bfd
clean-stagefeedback-bfd:
- @[ -f $(HOST_SUBDIR)/bfd/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-bfd/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/bfd/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-bfd/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/bfd && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif bfd-bootstrap
@@ -4593,7 +5218,7 @@ install-bfd: installdirs
@endif bfd
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-bfd info-bfd
maybe-info-bfd:
@@ -4645,6 +5270,31 @@ dvi-bfd: \
@endif bfd
+.PHONY: maybe-pdf-bfd pdf-bfd
+maybe-pdf-bfd:
+@if bfd
+maybe-pdf-bfd: pdf-bfd
+
+pdf-bfd: \
+ configure-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in bfd" ; \
+ (cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif bfd
+
.PHONY: maybe-html-bfd html-bfd
maybe-html-bfd:
@if bfd
@@ -4721,6 +5371,32 @@ install-info-bfd: \
@endif bfd
+.PHONY: maybe-install-pdf-bfd install-pdf-bfd
+maybe-install-pdf-bfd:
+@if bfd
+maybe-install-pdf-bfd: install-pdf-bfd
+
+install-pdf-bfd: \
+ configure-bfd \
+ pdf-bfd
+ @[ -f ./bfd/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in bfd" ; \
+ (cd $(HOST_SUBDIR)/bfd && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif bfd
+
.PHONY: maybe-install-html-bfd install-html-bfd
maybe-install-html-bfd:
@if bfd
@@ -4872,14 +5548,12 @@ maintainer-clean-bfd:
.PHONY: configure-opcodes maybe-configure-opcodes
maybe-configure-opcodes:
+@if gcc-bootstrap
+configure-opcodes: stage_current
+@endif gcc-bootstrap
@if opcodes
maybe-configure-opcodes: configure-opcodes
configure-opcodes:
-@endif opcodes
-@if opcodes-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif opcodes-bootstrap
-@if opcodes
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
@@ -4895,7 +5569,8 @@ configure-opcodes:
srcdiroption="--srcdir=$${topdir}/opcodes"; \
libsrcdir="$$s/opcodes"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif opcodes
@@ -4912,6 +5587,8 @@ configure-stage1-opcodes:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/opcodes ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
@@ -4923,8 +5600,10 @@ configure-stage1-opcodes:
srcdiroption="--srcdir=$${topdir}/opcodes"; \
libsrcdir="$$s/opcodes"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif opcodes-bootstrap
.PHONY: configure-stage2-opcodes maybe-configure-stage2-opcodes
@@ -4939,6 +5618,8 @@ configure-stage2-opcodes:
test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/opcodes ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
@@ -4950,7 +5631,9 @@ configure-stage2-opcodes:
srcdiroption="--srcdir=$${topdir}/opcodes"; \
libsrcdir="$$s/opcodes"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif opcodes-bootstrap
@@ -4966,6 +5649,8 @@ configure-stage3-opcodes:
test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/opcodes ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
@@ -4977,7 +5662,9 @@ configure-stage3-opcodes:
srcdiroption="--srcdir=$${topdir}/opcodes"; \
libsrcdir="$$s/opcodes"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif opcodes-bootstrap
@@ -4993,6 +5680,8 @@ configure-stage4-opcodes:
test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/opcodes ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
@@ -5004,7 +5693,9 @@ configure-stage4-opcodes:
srcdiroption="--srcdir=$${topdir}/opcodes"; \
libsrcdir="$$s/opcodes"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif opcodes-bootstrap
@@ -5020,6 +5711,8 @@ configure-stageprofile-opcodes:
test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/opcodes ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
@@ -5031,7 +5724,9 @@ configure-stageprofile-opcodes:
srcdiroption="--srcdir=$${topdir}/opcodes"; \
libsrcdir="$$s/opcodes"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif opcodes-bootstrap
@@ -5047,6 +5742,8 @@ configure-stagefeedback-opcodes:
test ! -f $(HOST_SUBDIR)/opcodes/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/opcodes ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/opcodes ; \
cd $(HOST_SUBDIR)/opcodes || exit 1; \
@@ -5058,7 +5755,9 @@ configure-stagefeedback-opcodes:
srcdiroption="--srcdir=$${topdir}/opcodes"; \
libsrcdir="$$s/opcodes"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif opcodes-bootstrap
@@ -5068,15 +5767,13 @@ configure-stagefeedback-opcodes:
.PHONY: all-opcodes maybe-all-opcodes
maybe-all-opcodes:
+@if gcc-bootstrap
+all-opcodes: stage_current
+@endif gcc-bootstrap
@if opcodes
TARGET-opcodes=all
maybe-all-opcodes: all-opcodes
all-opcodes: configure-opcodes
-@endif opcodes
-@if opcodes-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif opcodes-bootstrap
-@if opcodes
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -5100,18 +5797,22 @@ all-stage1-opcodes: configure-stage1-opcodes
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-opcodes)
maybe-clean-stage1-opcodes: clean-stage1-opcodes
clean-stage1: clean-stage1-opcodes
clean-stage1-opcodes:
- @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-opcodes/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-opcodes/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif opcodes-bootstrap
@@ -5130,19 +5831,23 @@ all-stage2-opcodes: configure-stage2-opcodes
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-opcodes)
maybe-clean-stage2-opcodes: clean-stage2-opcodes
clean-stage2: clean-stage2-opcodes
clean-stage2-opcodes:
- @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-opcodes/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-opcodes/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif opcodes-bootstrap
@@ -5161,19 +5866,23 @@ all-stage3-opcodes: configure-stage3-opcodes
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-opcodes)
maybe-clean-stage3-opcodes: clean-stage3-opcodes
clean-stage3: clean-stage3-opcodes
clean-stage3-opcodes:
- @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-opcodes/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-opcodes/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif opcodes-bootstrap
@@ -5192,19 +5901,23 @@ all-stage4-opcodes: configure-stage4-opcodes
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-opcodes)
maybe-clean-stage4-opcodes: clean-stage4-opcodes
clean-stage4: clean-stage4-opcodes
clean-stage4-opcodes:
- @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-opcodes/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-opcodes/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif opcodes-bootstrap
@@ -5223,19 +5936,23 @@ all-stageprofile-opcodes: configure-stageprofile-opcodes
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-opcodes)
maybe-clean-stageprofile-opcodes: clean-stageprofile-opcodes
clean-stageprofile: clean-stageprofile-opcodes
clean-stageprofile-opcodes:
- @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-opcodes/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-opcodes/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif opcodes-bootstrap
@@ -5254,19 +5971,23 @@ all-stagefeedback-opcodes: configure-stagefeedback-opcodes
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/opcodes && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-opcodes)
maybe-clean-stagefeedback-opcodes: clean-stagefeedback-opcodes
clean-stagefeedback: clean-stagefeedback-opcodes
clean-stagefeedback-opcodes:
- @[ -f $(HOST_SUBDIR)/opcodes/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-opcodes/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/opcodes/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-opcodes/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/opcodes && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif opcodes-bootstrap
@@ -5303,7 +6024,7 @@ install-opcodes: installdirs
@endif opcodes
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-opcodes info-opcodes
maybe-info-opcodes:
@@ -5355,6 +6076,31 @@ dvi-opcodes: \
@endif opcodes
+.PHONY: maybe-pdf-opcodes pdf-opcodes
+maybe-pdf-opcodes:
+@if opcodes
+maybe-pdf-opcodes: pdf-opcodes
+
+pdf-opcodes: \
+ configure-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in opcodes" ; \
+ (cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif opcodes
+
.PHONY: maybe-html-opcodes html-opcodes
maybe-html-opcodes:
@if opcodes
@@ -5431,6 +6177,32 @@ install-info-opcodes: \
@endif opcodes
+.PHONY: maybe-install-pdf-opcodes install-pdf-opcodes
+maybe-install-pdf-opcodes:
+@if opcodes
+maybe-install-pdf-opcodes: install-pdf-opcodes
+
+install-pdf-opcodes: \
+ configure-opcodes \
+ pdf-opcodes
+ @[ -f ./opcodes/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in opcodes" ; \
+ (cd $(HOST_SUBDIR)/opcodes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif opcodes
+
.PHONY: maybe-install-html-opcodes install-html-opcodes
maybe-install-html-opcodes:
@if opcodes
@@ -5582,14 +6354,12 @@ maintainer-clean-opcodes:
.PHONY: configure-binutils maybe-configure-binutils
maybe-configure-binutils:
+@if gcc-bootstrap
+configure-binutils: stage_current
+@endif gcc-bootstrap
@if binutils
maybe-configure-binutils: configure-binutils
configure-binutils:
-@endif binutils
-@if binutils-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif binutils-bootstrap
-@if binutils
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
@@ -5605,7 +6375,8 @@ configure-binutils:
srcdiroption="--srcdir=$${topdir}/binutils"; \
libsrcdir="$$s/binutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif binutils
@@ -5622,6 +6393,8 @@ configure-stage1-binutils:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/binutils ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
@@ -5633,8 +6406,10 @@ configure-stage1-binutils:
srcdiroption="--srcdir=$${topdir}/binutils"; \
libsrcdir="$$s/binutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif binutils-bootstrap
.PHONY: configure-stage2-binutils maybe-configure-stage2-binutils
@@ -5649,6 +6424,8 @@ configure-stage2-binutils:
test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/binutils ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
@@ -5660,7 +6437,9 @@ configure-stage2-binutils:
srcdiroption="--srcdir=$${topdir}/binutils"; \
libsrcdir="$$s/binutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif binutils-bootstrap
@@ -5676,6 +6455,8 @@ configure-stage3-binutils:
test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/binutils ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
@@ -5687,7 +6468,9 @@ configure-stage3-binutils:
srcdiroption="--srcdir=$${topdir}/binutils"; \
libsrcdir="$$s/binutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif binutils-bootstrap
@@ -5703,6 +6486,8 @@ configure-stage4-binutils:
test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/binutils ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
@@ -5714,7 +6499,9 @@ configure-stage4-binutils:
srcdiroption="--srcdir=$${topdir}/binutils"; \
libsrcdir="$$s/binutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif binutils-bootstrap
@@ -5730,6 +6517,8 @@ configure-stageprofile-binutils:
test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/binutils ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
@@ -5741,7 +6530,9 @@ configure-stageprofile-binutils:
srcdiroption="--srcdir=$${topdir}/binutils"; \
libsrcdir="$$s/binutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif binutils-bootstrap
@@ -5757,6 +6548,8 @@ configure-stagefeedback-binutils:
test ! -f $(HOST_SUBDIR)/binutils/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/binutils ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/binutils ; \
cd $(HOST_SUBDIR)/binutils || exit 1; \
@@ -5768,7 +6561,9 @@ configure-stagefeedback-binutils:
srcdiroption="--srcdir=$${topdir}/binutils"; \
libsrcdir="$$s/binutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif binutils-bootstrap
@@ -5778,15 +6573,13 @@ configure-stagefeedback-binutils:
.PHONY: all-binutils maybe-all-binutils
maybe-all-binutils:
+@if gcc-bootstrap
+all-binutils: stage_current
+@endif gcc-bootstrap
@if binutils
TARGET-binutils=all
maybe-all-binutils: all-binutils
all-binutils: configure-binutils
-@endif binutils
-@if binutils-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif binutils-bootstrap
-@if binutils
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -5810,18 +6603,22 @@ all-stage1-binutils: configure-stage1-binutils
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-binutils)
maybe-clean-stage1-binutils: clean-stage1-binutils
clean-stage1: clean-stage1-binutils
clean-stage1-binutils:
- @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-binutils/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-binutils/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif binutils-bootstrap
@@ -5840,19 +6637,23 @@ all-stage2-binutils: configure-stage2-binutils
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-binutils)
maybe-clean-stage2-binutils: clean-stage2-binutils
clean-stage2: clean-stage2-binutils
clean-stage2-binutils:
- @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-binutils/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-binutils/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif binutils-bootstrap
@@ -5871,19 +6672,23 @@ all-stage3-binutils: configure-stage3-binutils
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-binutils)
maybe-clean-stage3-binutils: clean-stage3-binutils
clean-stage3: clean-stage3-binutils
clean-stage3-binutils:
- @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-binutils/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-binutils/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif binutils-bootstrap
@@ -5902,19 +6707,23 @@ all-stage4-binutils: configure-stage4-binutils
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-binutils)
maybe-clean-stage4-binutils: clean-stage4-binutils
clean-stage4: clean-stage4-binutils
clean-stage4-binutils:
- @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-binutils/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-binutils/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif binutils-bootstrap
@@ -5933,19 +6742,23 @@ all-stageprofile-binutils: configure-stageprofile-binutils
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-binutils)
maybe-clean-stageprofile-binutils: clean-stageprofile-binutils
clean-stageprofile: clean-stageprofile-binutils
clean-stageprofile-binutils:
- @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-binutils/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-binutils/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif binutils-bootstrap
@@ -5964,19 +6777,23 @@ all-stagefeedback-binutils: configure-stagefeedback-binutils
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/binutils && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-binutils)
maybe-clean-stagefeedback-binutils: clean-stagefeedback-binutils
clean-stagefeedback: clean-stagefeedback-binutils
clean-stagefeedback-binutils:
- @[ -f $(HOST_SUBDIR)/binutils/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-binutils/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/binutils/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-binutils/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/binutils && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif binutils-bootstrap
@@ -6013,7 +6830,7 @@ install-binutils: installdirs
@endif binutils
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-binutils info-binutils
maybe-info-binutils:
@@ -6065,6 +6882,31 @@ dvi-binutils: \
@endif binutils
+.PHONY: maybe-pdf-binutils pdf-binutils
+maybe-pdf-binutils:
+@if binutils
+maybe-pdf-binutils: pdf-binutils
+
+pdf-binutils: \
+ configure-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in binutils" ; \
+ (cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif binutils
+
.PHONY: maybe-html-binutils html-binutils
maybe-html-binutils:
@if binutils
@@ -6141,6 +6983,32 @@ install-info-binutils: \
@endif binutils
+.PHONY: maybe-install-pdf-binutils install-pdf-binutils
+maybe-install-pdf-binutils:
+@if binutils
+maybe-install-pdf-binutils: install-pdf-binutils
+
+install-pdf-binutils: \
+ configure-binutils \
+ pdf-binutils
+ @[ -f ./binutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in binutils" ; \
+ (cd $(HOST_SUBDIR)/binutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif binutils
+
.PHONY: maybe-install-html-binutils install-html-binutils
maybe-install-html-binutils:
@if binutils
@@ -6292,6 +7160,9 @@ maintainer-clean-binutils:
.PHONY: configure-bison maybe-configure-bison
maybe-configure-bison:
+@if gcc-bootstrap
+configure-bison: stage_current
+@endif gcc-bootstrap
@if bison
maybe-configure-bison: configure-bison
configure-bison:
@@ -6311,7 +7182,8 @@ configure-bison:
srcdiroption="--srcdir=$${topdir}/bison"; \
libsrcdir="$$s/bison"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif bison
@@ -6321,6 +7193,9 @@ configure-bison:
.PHONY: all-bison maybe-all-bison
maybe-all-bison:
+@if gcc-bootstrap
+all-bison: stage_current
+@endif gcc-bootstrap
@if bison
TARGET-bison=all
maybe-all-bison: all-bison
@@ -6369,7 +7244,7 @@ install-bison: installdirs
@endif bison
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-bison info-bison
maybe-info-bison:
@@ -6423,6 +7298,32 @@ dvi-bison: \
@endif bison
+.PHONY: maybe-pdf-bison pdf-bison
+maybe-pdf-bison:
+@if bison
+maybe-pdf-bison: pdf-bison
+
+pdf-bison: \
+ configure-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in bison" ; \
+ (cd $(HOST_SUBDIR)/bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif bison
+
.PHONY: maybe-html-bison html-bison
maybe-html-bison:
@if bison
@@ -6502,6 +7403,33 @@ install-info-bison: \
@endif bison
+.PHONY: maybe-install-pdf-bison install-pdf-bison
+maybe-install-pdf-bison:
+@if bison
+maybe-install-pdf-bison: install-pdf-bison
+
+install-pdf-bison: \
+ configure-bison \
+ pdf-bison
+ @: $(MAKE); $(unstage)
+ @[ -f ./bison/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in bison" ; \
+ (cd $(HOST_SUBDIR)/bison && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif bison
+
.PHONY: maybe-install-html-bison install-html-bison
maybe-install-html-bison:
@if bison
@@ -6659,6 +7587,9 @@ maintainer-clean-bison:
.PHONY: configure-byacc maybe-configure-byacc
maybe-configure-byacc:
+@if gcc-bootstrap
+configure-byacc: stage_current
+@endif gcc-bootstrap
@if byacc
maybe-configure-byacc: configure-byacc
configure-byacc:
@@ -6678,7 +7609,8 @@ configure-byacc:
srcdiroption="--srcdir=$${topdir}/byacc"; \
libsrcdir="$$s/byacc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif byacc
@@ -6688,6 +7620,9 @@ configure-byacc:
.PHONY: all-byacc maybe-all-byacc
maybe-all-byacc:
+@if gcc-bootstrap
+all-byacc: stage_current
+@endif gcc-bootstrap
@if byacc
TARGET-byacc=all
maybe-all-byacc: all-byacc
@@ -6736,7 +7671,7 @@ install-byacc: installdirs
@endif byacc
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-byacc info-byacc
maybe-info-byacc:
@@ -6790,6 +7725,32 @@ dvi-byacc: \
@endif byacc
+.PHONY: maybe-pdf-byacc pdf-byacc
+maybe-pdf-byacc:
+@if byacc
+maybe-pdf-byacc: pdf-byacc
+
+pdf-byacc: \
+ configure-byacc
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in byacc" ; \
+ (cd $(HOST_SUBDIR)/byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif byacc
+
.PHONY: maybe-html-byacc html-byacc
maybe-html-byacc:
@if byacc
@@ -6869,6 +7830,33 @@ install-info-byacc: \
@endif byacc
+.PHONY: maybe-install-pdf-byacc install-pdf-byacc
+maybe-install-pdf-byacc:
+@if byacc
+maybe-install-pdf-byacc: install-pdf-byacc
+
+install-pdf-byacc: \
+ configure-byacc \
+ pdf-byacc
+ @: $(MAKE); $(unstage)
+ @[ -f ./byacc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in byacc" ; \
+ (cd $(HOST_SUBDIR)/byacc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif byacc
+
.PHONY: maybe-install-html-byacc install-html-byacc
maybe-install-html-byacc:
@if byacc
@@ -7026,6 +8014,9 @@ maintainer-clean-byacc:
.PHONY: configure-bzip2 maybe-configure-bzip2
maybe-configure-bzip2:
+@if gcc-bootstrap
+configure-bzip2: stage_current
+@endif gcc-bootstrap
@if bzip2
maybe-configure-bzip2: configure-bzip2
configure-bzip2:
@@ -7045,7 +8036,8 @@ configure-bzip2:
srcdiroption="--srcdir=$${topdir}/bzip2"; \
libsrcdir="$$s/bzip2"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif bzip2
@@ -7055,6 +8047,9 @@ configure-bzip2:
.PHONY: all-bzip2 maybe-all-bzip2
maybe-all-bzip2:
+@if gcc-bootstrap
+all-bzip2: stage_current
+@endif gcc-bootstrap
@if bzip2
TARGET-bzip2=all
maybe-all-bzip2: all-bzip2
@@ -7100,7 +8095,7 @@ install-bzip2: installdirs
@endif bzip2
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-bzip2 info-bzip2
maybe-info-bzip2:
@@ -7154,6 +8149,32 @@ dvi-bzip2: \
@endif bzip2
+.PHONY: maybe-pdf-bzip2 pdf-bzip2
+maybe-pdf-bzip2:
+@if bzip2
+maybe-pdf-bzip2: pdf-bzip2
+
+pdf-bzip2: \
+ configure-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in bzip2" ; \
+ (cd $(HOST_SUBDIR)/bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif bzip2
+
.PHONY: maybe-html-bzip2 html-bzip2
maybe-html-bzip2:
@if bzip2
@@ -7233,6 +8254,33 @@ install-info-bzip2: \
@endif bzip2
+.PHONY: maybe-install-pdf-bzip2 install-pdf-bzip2
+maybe-install-pdf-bzip2:
+@if bzip2
+maybe-install-pdf-bzip2: install-pdf-bzip2
+
+install-pdf-bzip2: \
+ configure-bzip2 \
+ pdf-bzip2
+ @: $(MAKE); $(unstage)
+ @[ -f ./bzip2/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in bzip2" ; \
+ (cd $(HOST_SUBDIR)/bzip2 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif bzip2
+
.PHONY: maybe-install-html-bzip2 install-html-bzip2
maybe-install-html-bzip2:
@if bzip2
@@ -7390,6 +8438,9 @@ maintainer-clean-bzip2:
.PHONY: configure-dejagnu maybe-configure-dejagnu
maybe-configure-dejagnu:
+@if gcc-bootstrap
+configure-dejagnu: stage_current
+@endif gcc-bootstrap
@if dejagnu
maybe-configure-dejagnu: configure-dejagnu
configure-dejagnu:
@@ -7409,7 +8460,8 @@ configure-dejagnu:
srcdiroption="--srcdir=$${topdir}/dejagnu"; \
libsrcdir="$$s/dejagnu"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif dejagnu
@@ -7419,6 +8471,9 @@ configure-dejagnu:
.PHONY: all-dejagnu maybe-all-dejagnu
maybe-all-dejagnu:
+@if gcc-bootstrap
+all-dejagnu: stage_current
+@endif gcc-bootstrap
@if dejagnu
TARGET-dejagnu=all
maybe-all-dejagnu: all-dejagnu
@@ -7464,7 +8519,7 @@ install-dejagnu: installdirs
@endif dejagnu
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-dejagnu info-dejagnu
maybe-info-dejagnu:
@@ -7518,6 +8573,32 @@ dvi-dejagnu: \
@endif dejagnu
+.PHONY: maybe-pdf-dejagnu pdf-dejagnu
+maybe-pdf-dejagnu:
+@if dejagnu
+maybe-pdf-dejagnu: pdf-dejagnu
+
+pdf-dejagnu: \
+ configure-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in dejagnu" ; \
+ (cd $(HOST_SUBDIR)/dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif dejagnu
+
.PHONY: maybe-html-dejagnu html-dejagnu
maybe-html-dejagnu:
@if dejagnu
@@ -7597,6 +8678,33 @@ install-info-dejagnu: \
@endif dejagnu
+.PHONY: maybe-install-pdf-dejagnu install-pdf-dejagnu
+maybe-install-pdf-dejagnu:
+@if dejagnu
+maybe-install-pdf-dejagnu: install-pdf-dejagnu
+
+install-pdf-dejagnu: \
+ configure-dejagnu \
+ pdf-dejagnu
+ @: $(MAKE); $(unstage)
+ @[ -f ./dejagnu/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in dejagnu" ; \
+ (cd $(HOST_SUBDIR)/dejagnu && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif dejagnu
+
.PHONY: maybe-install-html-dejagnu install-html-dejagnu
maybe-install-html-dejagnu:
@if dejagnu
@@ -7754,6 +8862,9 @@ maintainer-clean-dejagnu:
.PHONY: configure-diff maybe-configure-diff
maybe-configure-diff:
+@if gcc-bootstrap
+configure-diff: stage_current
+@endif gcc-bootstrap
@if diff
maybe-configure-diff: configure-diff
configure-diff:
@@ -7773,7 +8884,8 @@ configure-diff:
srcdiroption="--srcdir=$${topdir}/diff"; \
libsrcdir="$$s/diff"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif diff
@@ -7783,6 +8895,9 @@ configure-diff:
.PHONY: all-diff maybe-all-diff
maybe-all-diff:
+@if gcc-bootstrap
+all-diff: stage_current
+@endif gcc-bootstrap
@if diff
TARGET-diff=all
maybe-all-diff: all-diff
@@ -7828,7 +8943,7 @@ install-diff: installdirs
@endif diff
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-diff info-diff
maybe-info-diff:
@@ -7882,6 +8997,32 @@ dvi-diff: \
@endif diff
+.PHONY: maybe-pdf-diff pdf-diff
+maybe-pdf-diff:
+@if diff
+maybe-pdf-diff: pdf-diff
+
+pdf-diff: \
+ configure-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in diff" ; \
+ (cd $(HOST_SUBDIR)/diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif diff
+
.PHONY: maybe-html-diff html-diff
maybe-html-diff:
@if diff
@@ -7961,6 +9102,33 @@ install-info-diff: \
@endif diff
+.PHONY: maybe-install-pdf-diff install-pdf-diff
+maybe-install-pdf-diff:
+@if diff
+maybe-install-pdf-diff: install-pdf-diff
+
+install-pdf-diff: \
+ configure-diff \
+ pdf-diff
+ @: $(MAKE); $(unstage)
+ @[ -f ./diff/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in diff" ; \
+ (cd $(HOST_SUBDIR)/diff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif diff
+
.PHONY: maybe-install-html-diff install-html-diff
maybe-install-html-diff:
@if diff
@@ -8118,6 +9286,9 @@ maintainer-clean-diff:
.PHONY: configure-dosutils maybe-configure-dosutils
maybe-configure-dosutils:
+@if gcc-bootstrap
+configure-dosutils: stage_current
+@endif gcc-bootstrap
@if dosutils
maybe-configure-dosutils: configure-dosutils
configure-dosutils:
@@ -8137,7 +9308,8 @@ configure-dosutils:
srcdiroption="--srcdir=$${topdir}/dosutils"; \
libsrcdir="$$s/dosutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif dosutils
@@ -8147,6 +9319,9 @@ configure-dosutils:
.PHONY: all-dosutils maybe-all-dosutils
maybe-all-dosutils:
+@if gcc-bootstrap
+all-dosutils: stage_current
+@endif gcc-bootstrap
@if dosutils
TARGET-dosutils=all
maybe-all-dosutils: all-dosutils
@@ -8186,7 +9361,7 @@ install-dosutils: installdirs
@endif dosutils
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-dosutils info-dosutils
maybe-info-dosutils:
@@ -8240,6 +9415,32 @@ dvi-dosutils: \
@endif dosutils
+.PHONY: maybe-pdf-dosutils pdf-dosutils
+maybe-pdf-dosutils:
+@if dosutils
+maybe-pdf-dosutils: pdf-dosutils
+
+pdf-dosutils: \
+ configure-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in dosutils" ; \
+ (cd $(HOST_SUBDIR)/dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif dosutils
+
.PHONY: maybe-html-dosutils html-dosutils
maybe-html-dosutils:
@if dosutils
@@ -8319,6 +9520,33 @@ install-info-dosutils: \
@endif dosutils
+.PHONY: maybe-install-pdf-dosutils install-pdf-dosutils
+maybe-install-pdf-dosutils:
+@if dosutils
+maybe-install-pdf-dosutils: install-pdf-dosutils
+
+install-pdf-dosutils: \
+ configure-dosutils \
+ pdf-dosutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./dosutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in dosutils" ; \
+ (cd $(HOST_SUBDIR)/dosutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif dosutils
+
.PHONY: maybe-install-html-dosutils install-html-dosutils
maybe-install-html-dosutils:
@if dosutils
@@ -8476,6 +9704,9 @@ maintainer-clean-dosutils:
.PHONY: configure-etc maybe-configure-etc
maybe-configure-etc:
+@if gcc-bootstrap
+configure-etc: stage_current
+@endif gcc-bootstrap
@if etc
maybe-configure-etc: configure-etc
configure-etc:
@@ -8495,7 +9726,8 @@ configure-etc:
srcdiroption="--srcdir=$${topdir}/etc"; \
libsrcdir="$$s/etc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif etc
@@ -8505,6 +9737,9 @@ configure-etc:
.PHONY: all-etc maybe-all-etc
maybe-all-etc:
+@if gcc-bootstrap
+all-etc: stage_current
+@endif gcc-bootstrap
@if etc
TARGET-etc=all
maybe-all-etc: all-etc
@@ -8550,7 +9785,7 @@ install-etc: installdirs
@endif etc
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-etc info-etc
maybe-info-etc:
@@ -8604,6 +9839,32 @@ dvi-etc: \
@endif etc
+.PHONY: maybe-pdf-etc pdf-etc
+maybe-pdf-etc:
+@if etc
+maybe-pdf-etc: pdf-etc
+
+pdf-etc: \
+ configure-etc
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in etc" ; \
+ (cd $(HOST_SUBDIR)/etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif etc
+
.PHONY: maybe-html-etc html-etc
maybe-html-etc:
@if etc
@@ -8683,6 +9944,33 @@ install-info-etc: \
@endif etc
+.PHONY: maybe-install-pdf-etc install-pdf-etc
+maybe-install-pdf-etc:
+@if etc
+maybe-install-pdf-etc: install-pdf-etc
+
+install-pdf-etc: \
+ configure-etc \
+ pdf-etc
+ @: $(MAKE); $(unstage)
+ @[ -f ./etc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in etc" ; \
+ (cd $(HOST_SUBDIR)/etc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif etc
+
.PHONY: maybe-install-html-etc install-html-etc
maybe-install-html-etc:
@if etc
@@ -8840,6 +10128,9 @@ maintainer-clean-etc:
.PHONY: configure-fastjar maybe-configure-fastjar
maybe-configure-fastjar:
+@if gcc-bootstrap
+configure-fastjar: stage_current
+@endif gcc-bootstrap
@if fastjar
maybe-configure-fastjar: configure-fastjar
configure-fastjar:
@@ -8859,7 +10150,8 @@ configure-fastjar:
srcdiroption="--srcdir=$${topdir}/fastjar"; \
libsrcdir="$$s/fastjar"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif fastjar
@@ -8869,6 +10161,9 @@ configure-fastjar:
.PHONY: all-fastjar maybe-all-fastjar
maybe-all-fastjar:
+@if gcc-bootstrap
+all-fastjar: stage_current
+@endif gcc-bootstrap
@if fastjar
TARGET-fastjar=all
maybe-all-fastjar: all-fastjar
@@ -8917,7 +10212,7 @@ install-fastjar: installdirs
@endif fastjar
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-fastjar info-fastjar
maybe-info-fastjar:
@@ -8971,6 +10266,32 @@ dvi-fastjar: \
@endif fastjar
+.PHONY: maybe-pdf-fastjar pdf-fastjar
+maybe-pdf-fastjar:
+@if fastjar
+maybe-pdf-fastjar: pdf-fastjar
+
+pdf-fastjar: \
+ configure-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in fastjar" ; \
+ (cd $(HOST_SUBDIR)/fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif fastjar
+
.PHONY: maybe-html-fastjar html-fastjar
maybe-html-fastjar:
@if fastjar
@@ -9050,6 +10371,33 @@ install-info-fastjar: \
@endif fastjar
+.PHONY: maybe-install-pdf-fastjar install-pdf-fastjar
+maybe-install-pdf-fastjar:
+@if fastjar
+maybe-install-pdf-fastjar: install-pdf-fastjar
+
+install-pdf-fastjar: \
+ configure-fastjar \
+ pdf-fastjar
+ @: $(MAKE); $(unstage)
+ @[ -f ./fastjar/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in fastjar" ; \
+ (cd $(HOST_SUBDIR)/fastjar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif fastjar
+
.PHONY: maybe-install-html-fastjar install-html-fastjar
maybe-install-html-fastjar:
@if fastjar
@@ -9207,6 +10555,9 @@ maintainer-clean-fastjar:
.PHONY: configure-fileutils maybe-configure-fileutils
maybe-configure-fileutils:
+@if gcc-bootstrap
+configure-fileutils: stage_current
+@endif gcc-bootstrap
@if fileutils
maybe-configure-fileutils: configure-fileutils
configure-fileutils:
@@ -9226,7 +10577,8 @@ configure-fileutils:
srcdiroption="--srcdir=$${topdir}/fileutils"; \
libsrcdir="$$s/fileutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif fileutils
@@ -9236,6 +10588,9 @@ configure-fileutils:
.PHONY: all-fileutils maybe-all-fileutils
maybe-all-fileutils:
+@if gcc-bootstrap
+all-fileutils: stage_current
+@endif gcc-bootstrap
@if fileutils
TARGET-fileutils=all
maybe-all-fileutils: all-fileutils
@@ -9281,7 +10636,7 @@ install-fileutils: installdirs
@endif fileutils
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-fileutils info-fileutils
maybe-info-fileutils:
@@ -9335,6 +10690,32 @@ dvi-fileutils: \
@endif fileutils
+.PHONY: maybe-pdf-fileutils pdf-fileutils
+maybe-pdf-fileutils:
+@if fileutils
+maybe-pdf-fileutils: pdf-fileutils
+
+pdf-fileutils: \
+ configure-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in fileutils" ; \
+ (cd $(HOST_SUBDIR)/fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif fileutils
+
.PHONY: maybe-html-fileutils html-fileutils
maybe-html-fileutils:
@if fileutils
@@ -9414,6 +10795,33 @@ install-info-fileutils: \
@endif fileutils
+.PHONY: maybe-install-pdf-fileutils install-pdf-fileutils
+maybe-install-pdf-fileutils:
+@if fileutils
+maybe-install-pdf-fileutils: install-pdf-fileutils
+
+install-pdf-fileutils: \
+ configure-fileutils \
+ pdf-fileutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./fileutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in fileutils" ; \
+ (cd $(HOST_SUBDIR)/fileutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif fileutils
+
.PHONY: maybe-install-html-fileutils install-html-fileutils
maybe-install-html-fileutils:
@if fileutils
@@ -9571,6 +10979,9 @@ maintainer-clean-fileutils:
.PHONY: configure-findutils maybe-configure-findutils
maybe-configure-findutils:
+@if gcc-bootstrap
+configure-findutils: stage_current
+@endif gcc-bootstrap
@if findutils
maybe-configure-findutils: configure-findutils
configure-findutils:
@@ -9590,7 +11001,8 @@ configure-findutils:
srcdiroption="--srcdir=$${topdir}/findutils"; \
libsrcdir="$$s/findutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif findutils
@@ -9600,6 +11012,9 @@ configure-findutils:
.PHONY: all-findutils maybe-all-findutils
maybe-all-findutils:
+@if gcc-bootstrap
+all-findutils: stage_current
+@endif gcc-bootstrap
@if findutils
TARGET-findutils=all
maybe-all-findutils: all-findutils
@@ -9645,7 +11060,7 @@ install-findutils: installdirs
@endif findutils
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-findutils info-findutils
maybe-info-findutils:
@@ -9699,6 +11114,32 @@ dvi-findutils: \
@endif findutils
+.PHONY: maybe-pdf-findutils pdf-findutils
+maybe-pdf-findutils:
+@if findutils
+maybe-pdf-findutils: pdf-findutils
+
+pdf-findutils: \
+ configure-findutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in findutils" ; \
+ (cd $(HOST_SUBDIR)/findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif findutils
+
.PHONY: maybe-html-findutils html-findutils
maybe-html-findutils:
@if findutils
@@ -9778,6 +11219,33 @@ install-info-findutils: \
@endif findutils
+.PHONY: maybe-install-pdf-findutils install-pdf-findutils
+maybe-install-pdf-findutils:
+@if findutils
+maybe-install-pdf-findutils: install-pdf-findutils
+
+install-pdf-findutils: \
+ configure-findutils \
+ pdf-findutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./findutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in findutils" ; \
+ (cd $(HOST_SUBDIR)/findutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif findutils
+
.PHONY: maybe-install-html-findutils install-html-findutils
maybe-install-html-findutils:
@if findutils
@@ -9935,6 +11403,9 @@ maintainer-clean-findutils:
.PHONY: configure-find maybe-configure-find
maybe-configure-find:
+@if gcc-bootstrap
+configure-find: stage_current
+@endif gcc-bootstrap
@if find
maybe-configure-find: configure-find
configure-find:
@@ -9954,7 +11425,8 @@ configure-find:
srcdiroption="--srcdir=$${topdir}/find"; \
libsrcdir="$$s/find"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif find
@@ -9964,6 +11436,9 @@ configure-find:
.PHONY: all-find maybe-all-find
maybe-all-find:
+@if gcc-bootstrap
+all-find: stage_current
+@endif gcc-bootstrap
@if find
TARGET-find=all
maybe-all-find: all-find
@@ -10009,7 +11484,7 @@ install-find: installdirs
@endif find
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-find info-find
maybe-info-find:
@@ -10063,6 +11538,32 @@ dvi-find: \
@endif find
+.PHONY: maybe-pdf-find pdf-find
+maybe-pdf-find:
+@if find
+maybe-pdf-find: pdf-find
+
+pdf-find: \
+ configure-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in find" ; \
+ (cd $(HOST_SUBDIR)/find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif find
+
.PHONY: maybe-html-find html-find
maybe-html-find:
@if find
@@ -10142,6 +11643,33 @@ install-info-find: \
@endif find
+.PHONY: maybe-install-pdf-find install-pdf-find
+maybe-install-pdf-find:
+@if find
+maybe-install-pdf-find: install-pdf-find
+
+install-pdf-find: \
+ configure-find \
+ pdf-find
+ @: $(MAKE); $(unstage)
+ @[ -f ./find/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in find" ; \
+ (cd $(HOST_SUBDIR)/find && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif find
+
.PHONY: maybe-install-html-find install-html-find
maybe-install-html-find:
@if find
@@ -10299,6 +11827,9 @@ maintainer-clean-find:
.PHONY: configure-fixincludes maybe-configure-fixincludes
maybe-configure-fixincludes:
+@if gcc-bootstrap
+configure-fixincludes: stage_current
+@endif gcc-bootstrap
@if fixincludes
maybe-configure-fixincludes: configure-fixincludes
configure-fixincludes:
@@ -10318,7 +11849,8 @@ configure-fixincludes:
srcdiroption="--srcdir=$${topdir}/fixincludes"; \
libsrcdir="$$s/fixincludes"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif fixincludes
@@ -10328,6 +11860,9 @@ configure-fixincludes:
.PHONY: all-fixincludes maybe-all-fixincludes
maybe-all-fixincludes:
+@if gcc-bootstrap
+all-fixincludes: stage_current
+@endif gcc-bootstrap
@if fixincludes
TARGET-fixincludes=all
maybe-all-fixincludes: all-fixincludes
@@ -10373,15 +11908,31 @@ install-fixincludes: installdirs
@endif fixincludes
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-fixincludes info-fixincludes
maybe-info-fixincludes:
@if fixincludes
maybe-info-fixincludes: info-fixincludes
-# fixincludes doesn't support info.
-info-fixincludes:
+info-fixincludes: \
+ configure-fixincludes
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in fixincludes" ; \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
@endif fixincludes
@@ -10390,8 +11941,50 @@ maybe-dvi-fixincludes:
@if fixincludes
maybe-dvi-fixincludes: dvi-fixincludes
-# fixincludes doesn't support dvi.
-dvi-fixincludes:
+dvi-fixincludes: \
+ configure-fixincludes
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in fixincludes" ; \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+@endif fixincludes
+
+.PHONY: maybe-pdf-fixincludes pdf-fixincludes
+maybe-pdf-fixincludes:
+@if fixincludes
+maybe-pdf-fixincludes: pdf-fixincludes
+
+pdf-fixincludes: \
+ configure-fixincludes
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in fixincludes" ; \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
@endif fixincludes
@@ -10436,8 +12029,52 @@ maybe-install-info-fixincludes:
@if fixincludes
maybe-install-info-fixincludes: install-info-fixincludes
-# fixincludes doesn't support install-info.
-install-info-fixincludes:
+install-info-fixincludes: \
+ configure-fixincludes \
+ info-fixincludes
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in fixincludes" ; \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+@endif fixincludes
+
+.PHONY: maybe-install-pdf-fixincludes install-pdf-fixincludes
+maybe-install-pdf-fixincludes:
+@if fixincludes
+maybe-install-pdf-fixincludes: install-pdf-fixincludes
+
+install-pdf-fixincludes: \
+ configure-fixincludes \
+ pdf-fixincludes
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in fixincludes" ; \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
@endif fixincludes
@@ -10473,8 +12110,24 @@ maybe-installcheck-fixincludes:
@if fixincludes
maybe-installcheck-fixincludes: installcheck-fixincludes
-# fixincludes doesn't support installcheck.
-installcheck-fixincludes:
+installcheck-fixincludes: \
+ configure-fixincludes
+ @: $(MAKE); $(unstage)
+ @[ -f ./fixincludes/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in fixincludes" ; \
+ (cd $(HOST_SUBDIR)/fixincludes && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
@endif fixincludes
@@ -10582,6 +12235,9 @@ maintainer-clean-fixincludes:
.PHONY: configure-flex maybe-configure-flex
maybe-configure-flex:
+@if gcc-bootstrap
+configure-flex: stage_current
+@endif gcc-bootstrap
@if flex
maybe-configure-flex: configure-flex
configure-flex:
@@ -10601,7 +12257,8 @@ configure-flex:
srcdiroption="--srcdir=$${topdir}/flex"; \
libsrcdir="$$s/flex"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif flex
@@ -10611,6 +12268,9 @@ configure-flex:
.PHONY: all-flex maybe-all-flex
maybe-all-flex:
+@if gcc-bootstrap
+all-flex: stage_current
+@endif gcc-bootstrap
@if flex
TARGET-flex=all
maybe-all-flex: all-flex
@@ -10659,7 +12319,7 @@ install-flex: installdirs
@endif flex
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-flex info-flex
maybe-info-flex:
@@ -10713,6 +12373,32 @@ dvi-flex: \
@endif flex
+.PHONY: maybe-pdf-flex pdf-flex
+maybe-pdf-flex:
+@if flex
+maybe-pdf-flex: pdf-flex
+
+pdf-flex: \
+ configure-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in flex" ; \
+ (cd $(HOST_SUBDIR)/flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif flex
+
.PHONY: maybe-html-flex html-flex
maybe-html-flex:
@if flex
@@ -10792,6 +12478,33 @@ install-info-flex: \
@endif flex
+.PHONY: maybe-install-pdf-flex install-pdf-flex
+maybe-install-pdf-flex:
+@if flex
+maybe-install-pdf-flex: install-pdf-flex
+
+install-pdf-flex: \
+ configure-flex \
+ pdf-flex
+ @: $(MAKE); $(unstage)
+ @[ -f ./flex/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in flex" ; \
+ (cd $(HOST_SUBDIR)/flex && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif flex
+
.PHONY: maybe-install-html-flex install-html-flex
maybe-install-html-flex:
@if flex
@@ -10949,14 +12662,12 @@ maintainer-clean-flex:
.PHONY: configure-gas maybe-configure-gas
maybe-configure-gas:
+@if gcc-bootstrap
+configure-gas: stage_current
+@endif gcc-bootstrap
@if gas
maybe-configure-gas: configure-gas
configure-gas:
-@endif gas
-@if gas-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif gas-bootstrap
-@if gas
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
@@ -10972,7 +12683,8 @@ configure-gas:
srcdiroption="--srcdir=$${topdir}/gas"; \
libsrcdir="$$s/gas"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gas
@@ -10989,6 +12701,8 @@ configure-stage1-gas:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/gas ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
cd $(HOST_SUBDIR)/gas || exit 1; \
@@ -11000,8 +12714,10 @@ configure-stage1-gas:
srcdiroption="--srcdir=$${topdir}/gas"; \
libsrcdir="$$s/gas"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif gas-bootstrap
.PHONY: configure-stage2-gas maybe-configure-stage2-gas
@@ -11016,6 +12732,8 @@ configure-stage2-gas:
test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/gas ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
cd $(HOST_SUBDIR)/gas || exit 1; \
@@ -11027,7 +12745,9 @@ configure-stage2-gas:
srcdiroption="--srcdir=$${topdir}/gas"; \
libsrcdir="$$s/gas"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gas-bootstrap
@@ -11043,6 +12763,8 @@ configure-stage3-gas:
test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/gas ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
cd $(HOST_SUBDIR)/gas || exit 1; \
@@ -11054,7 +12776,9 @@ configure-stage3-gas:
srcdiroption="--srcdir=$${topdir}/gas"; \
libsrcdir="$$s/gas"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gas-bootstrap
@@ -11070,6 +12794,8 @@ configure-stage4-gas:
test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/gas ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
cd $(HOST_SUBDIR)/gas || exit 1; \
@@ -11081,7 +12807,9 @@ configure-stage4-gas:
srcdiroption="--srcdir=$${topdir}/gas"; \
libsrcdir="$$s/gas"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gas-bootstrap
@@ -11097,6 +12825,8 @@ configure-stageprofile-gas:
test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/gas ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
cd $(HOST_SUBDIR)/gas || exit 1; \
@@ -11108,7 +12838,9 @@ configure-stageprofile-gas:
srcdiroption="--srcdir=$${topdir}/gas"; \
libsrcdir="$$s/gas"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gas-bootstrap
@@ -11124,6 +12856,8 @@ configure-stagefeedback-gas:
test ! -f $(HOST_SUBDIR)/gas/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/gas ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gas ; \
cd $(HOST_SUBDIR)/gas || exit 1; \
@@ -11135,7 +12869,9 @@ configure-stagefeedback-gas:
srcdiroption="--srcdir=$${topdir}/gas"; \
libsrcdir="$$s/gas"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gas-bootstrap
@@ -11145,15 +12881,13 @@ configure-stagefeedback-gas:
.PHONY: all-gas maybe-all-gas
maybe-all-gas:
+@if gcc-bootstrap
+all-gas: stage_current
+@endif gcc-bootstrap
@if gas
TARGET-gas=all
maybe-all-gas: all-gas
all-gas: configure-gas
-@endif gas
-@if gas-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif gas-bootstrap
-@if gas
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -11177,18 +12911,22 @@ all-stage1-gas: configure-stage1-gas
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-gas)
maybe-clean-stage1-gas: clean-stage1-gas
clean-stage1: clean-stage1-gas
clean-stage1-gas:
- @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-gas/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-gas/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif gas-bootstrap
@@ -11207,19 +12945,23 @@ all-stage2-gas: configure-stage2-gas
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-gas)
maybe-clean-stage2-gas: clean-stage2-gas
clean-stage2: clean-stage2-gas
clean-stage2-gas:
- @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-gas/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-gas/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif gas-bootstrap
@@ -11238,19 +12980,23 @@ all-stage3-gas: configure-stage3-gas
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-gas)
maybe-clean-stage3-gas: clean-stage3-gas
clean-stage3: clean-stage3-gas
clean-stage3-gas:
- @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-gas/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-gas/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif gas-bootstrap
@@ -11269,19 +13015,23 @@ all-stage4-gas: configure-stage4-gas
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-gas)
maybe-clean-stage4-gas: clean-stage4-gas
clean-stage4: clean-stage4-gas
clean-stage4-gas:
- @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-gas/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-gas/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif gas-bootstrap
@@ -11300,19 +13050,23 @@ all-stageprofile-gas: configure-stageprofile-gas
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-gas)
maybe-clean-stageprofile-gas: clean-stageprofile-gas
clean-stageprofile: clean-stageprofile-gas
clean-stageprofile-gas:
- @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-gas/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-gas/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif gas-bootstrap
@@ -11331,19 +13085,23 @@ all-stagefeedback-gas: configure-stagefeedback-gas
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gas && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-gas)
maybe-clean-stagefeedback-gas: clean-stagefeedback-gas
clean-stagefeedback: clean-stagefeedback-gas
clean-stagefeedback-gas:
- @[ -f $(HOST_SUBDIR)/gas/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-gas/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/gas/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-gas/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/gas && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif gas-bootstrap
@@ -11380,7 +13138,7 @@ install-gas: installdirs
@endif gas
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gas info-gas
maybe-info-gas:
@@ -11432,6 +13190,31 @@ dvi-gas: \
@endif gas
+.PHONY: maybe-pdf-gas pdf-gas
+maybe-pdf-gas:
+@if gas
+maybe-pdf-gas: pdf-gas
+
+pdf-gas: \
+ configure-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gas" ; \
+ (cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gas
+
.PHONY: maybe-html-gas html-gas
maybe-html-gas:
@if gas
@@ -11508,6 +13291,32 @@ install-info-gas: \
@endif gas
+.PHONY: maybe-install-pdf-gas install-pdf-gas
+maybe-install-pdf-gas:
+@if gas
+maybe-install-pdf-gas: install-pdf-gas
+
+install-pdf-gas: \
+ configure-gas \
+ pdf-gas
+ @[ -f ./gas/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gas" ; \
+ (cd $(HOST_SUBDIR)/gas && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gas
+
.PHONY: maybe-install-html-gas install-html-gas
maybe-install-html-gas:
@if gas
@@ -11659,14 +13468,12 @@ maintainer-clean-gas:
.PHONY: configure-gcc maybe-configure-gcc
maybe-configure-gcc:
-@if gcc
-maybe-configure-gcc: configure-gcc
-configure-gcc:
-@endif gcc
@if gcc-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
+configure-gcc: stage_current
@endif gcc-bootstrap
@if gcc
+maybe-configure-gcc: configure-gcc
+configure-gcc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
@@ -11682,7 +13489,8 @@ configure-gcc:
srcdiroption="--srcdir=$${topdir}/gcc"; \
libsrcdir="$$s/gcc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gcc
@@ -11699,6 +13507,8 @@ configure-stage1-gcc:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/gcc ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
@@ -11710,8 +13520,10 @@ configure-stage1-gcc:
srcdiroption="--srcdir=$${topdir}/gcc"; \
libsrcdir="$$s/gcc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif gcc-bootstrap
.PHONY: configure-stage2-gcc maybe-configure-stage2-gcc
@@ -11726,6 +13538,8 @@ configure-stage2-gcc:
test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/gcc ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
@@ -11737,7 +13551,9 @@ configure-stage2-gcc:
srcdiroption="--srcdir=$${topdir}/gcc"; \
libsrcdir="$$s/gcc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gcc-bootstrap
@@ -11753,6 +13569,8 @@ configure-stage3-gcc:
test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/gcc ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
@@ -11764,7 +13582,9 @@ configure-stage3-gcc:
srcdiroption="--srcdir=$${topdir}/gcc"; \
libsrcdir="$$s/gcc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gcc-bootstrap
@@ -11780,6 +13600,8 @@ configure-stage4-gcc:
test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/gcc ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
@@ -11791,7 +13613,9 @@ configure-stage4-gcc:
srcdiroption="--srcdir=$${topdir}/gcc"; \
libsrcdir="$$s/gcc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gcc-bootstrap
@@ -11807,6 +13631,8 @@ configure-stageprofile-gcc:
test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/gcc ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
@@ -11818,7 +13644,9 @@ configure-stageprofile-gcc:
srcdiroption="--srcdir=$${topdir}/gcc"; \
libsrcdir="$$s/gcc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gcc-bootstrap
@@ -11834,6 +13662,8 @@ configure-stagefeedback-gcc:
test ! -f $(HOST_SUBDIR)/gcc/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/gcc ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gcc ; \
cd $(HOST_SUBDIR)/gcc || exit 1; \
@@ -11845,7 +13675,9 @@ configure-stagefeedback-gcc:
srcdiroption="--srcdir=$${topdir}/gcc"; \
libsrcdir="$$s/gcc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif gcc-bootstrap
@@ -11855,15 +13687,13 @@ configure-stagefeedback-gcc:
.PHONY: all-gcc maybe-all-gcc
maybe-all-gcc:
-@if gcc
-TARGET-gcc=`if [ -f stage_last ]; then echo quickstrap ; else echo all; fi`
-maybe-all-gcc: all-gcc
-all-gcc: configure-gcc
-@endif gcc
@if gcc-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
+all-gcc: stage_current
@endif gcc-bootstrap
@if gcc
+TARGET-gcc=all
+maybe-all-gcc: all-gcc
+all-gcc: configure-gcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -11887,18 +13717,22 @@ all-stage1-gcc: configure-stage1-gcc
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) \
$(TARGET-stage1-gcc)
maybe-clean-stage1-gcc: clean-stage1-gcc
clean-stage1: clean-stage1-gcc
clean-stage1-gcc:
- @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-gcc/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-gcc/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" $(EXTRA_GCC_FLAGS) clean
+ $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -11917,19 +13751,23 @@ all-stage2-gcc: configure-stage2-gcc
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
$(TARGET-stage2-gcc)
maybe-clean-stage2-gcc: clean-stage2-gcc
clean-stage2: clean-stage2-gcc
clean-stage2-gcc:
- @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-gcc/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-gcc/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -11948,19 +13786,23 @@ all-stage3-gcc: configure-stage3-gcc
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
$(TARGET-stage3-gcc)
maybe-clean-stage3-gcc: clean-stage3-gcc
clean-stage3: clean-stage3-gcc
clean-stage3-gcc:
- @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-gcc/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-gcc/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -11979,19 +13821,23 @@ all-stage4-gcc: configure-stage4-gcc
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
$(TARGET-stage4-gcc)
maybe-clean-stage4-gcc: clean-stage4-gcc
clean-stage4: clean-stage4-gcc
clean-stage4-gcc:
- @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-gcc/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-gcc/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- $(EXTRA_GCC_FLAGS) clean
+ $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -12010,19 +13856,23 @@ all-stageprofile-gcc: configure-stageprofile-gcc
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(EXTRA_GCC_FLAGS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
$(TARGET-stageprofile-gcc)
maybe-clean-stageprofile-gcc: clean-stageprofile-gcc
clean-stageprofile: clean-stageprofile-gcc
clean-stageprofile-gcc:
- @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-gcc/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-gcc/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(EXTRA_GCC_FLAGS) clean
+ $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -12041,19 +13891,23 @@ all-stagefeedback-gcc: configure-stagefeedback-gcc
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/gcc && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(EXTRA_GCC_FLAGS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS) \
$(TARGET-stagefeedback-gcc)
maybe-clean-stagefeedback-gcc: clean-stagefeedback-gcc
clean-stagefeedback: clean-stagefeedback-gcc
clean-stagefeedback-gcc:
- @[ -f $(HOST_SUBDIR)/gcc/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-gcc/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/gcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-gcc/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/gcc && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(EXTRA_GCC_FLAGS) clean
+ $(EXTRA_GCC_FLAGS) clean
@endif gcc-bootstrap
@@ -12090,7 +13944,7 @@ install-gcc: installdirs
@endif gcc
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gcc info-gcc
maybe-info-gcc:
@@ -12142,6 +13996,31 @@ dvi-gcc: \
@endif gcc
+.PHONY: maybe-pdf-gcc pdf-gcc
+maybe-pdf-gcc:
+@if gcc
+maybe-pdf-gcc: pdf-gcc
+
+pdf-gcc: \
+ configure-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gcc" ; \
+ (cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gcc
+
.PHONY: maybe-html-gcc html-gcc
maybe-html-gcc:
@if gcc
@@ -12218,6 +14097,32 @@ install-info-gcc: \
@endif gcc
+.PHONY: maybe-install-pdf-gcc install-pdf-gcc
+maybe-install-pdf-gcc:
+@if gcc
+maybe-install-pdf-gcc: install-pdf-gcc
+
+install-pdf-gcc: \
+ configure-gcc \
+ pdf-gcc
+ @[ -f ./gcc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_GCC_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gcc" ; \
+ (cd $(HOST_SUBDIR)/gcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gcc
+
.PHONY: maybe-install-html-gcc install-html-gcc
maybe-install-html-gcc:
@if gcc
@@ -12369,6 +14274,9 @@ maintainer-clean-gcc:
.PHONY: configure-gawk maybe-configure-gawk
maybe-configure-gawk:
+@if gcc-bootstrap
+configure-gawk: stage_current
+@endif gcc-bootstrap
@if gawk
maybe-configure-gawk: configure-gawk
configure-gawk:
@@ -12388,7 +14296,8 @@ configure-gawk:
srcdiroption="--srcdir=$${topdir}/gawk"; \
libsrcdir="$$s/gawk"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gawk
@@ -12398,6 +14307,9 @@ configure-gawk:
.PHONY: all-gawk maybe-all-gawk
maybe-all-gawk:
+@if gcc-bootstrap
+all-gawk: stage_current
+@endif gcc-bootstrap
@if gawk
TARGET-gawk=all
maybe-all-gawk: all-gawk
@@ -12443,7 +14355,7 @@ install-gawk: installdirs
@endif gawk
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gawk info-gawk
maybe-info-gawk:
@@ -12497,6 +14409,32 @@ dvi-gawk: \
@endif gawk
+.PHONY: maybe-pdf-gawk pdf-gawk
+maybe-pdf-gawk:
+@if gawk
+maybe-pdf-gawk: pdf-gawk
+
+pdf-gawk: \
+ configure-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gawk" ; \
+ (cd $(HOST_SUBDIR)/gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gawk
+
.PHONY: maybe-html-gawk html-gawk
maybe-html-gawk:
@if gawk
@@ -12576,6 +14514,33 @@ install-info-gawk: \
@endif gawk
+.PHONY: maybe-install-pdf-gawk install-pdf-gawk
+maybe-install-pdf-gawk:
+@if gawk
+maybe-install-pdf-gawk: install-pdf-gawk
+
+install-pdf-gawk: \
+ configure-gawk \
+ pdf-gawk
+ @: $(MAKE); $(unstage)
+ @[ -f ./gawk/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gawk" ; \
+ (cd $(HOST_SUBDIR)/gawk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gawk
+
.PHONY: maybe-install-html-gawk install-html-gawk
maybe-install-html-gawk:
@if gawk
@@ -12733,6 +14698,9 @@ maintainer-clean-gawk:
.PHONY: configure-gettext maybe-configure-gettext
maybe-configure-gettext:
+@if gcc-bootstrap
+configure-gettext: stage_current
+@endif gcc-bootstrap
@if gettext
maybe-configure-gettext: configure-gettext
configure-gettext:
@@ -12752,7 +14720,8 @@ configure-gettext:
srcdiroption="--srcdir=$${topdir}/gettext"; \
libsrcdir="$$s/gettext"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gettext
@@ -12762,6 +14731,9 @@ configure-gettext:
.PHONY: all-gettext maybe-all-gettext
maybe-all-gettext:
+@if gcc-bootstrap
+all-gettext: stage_current
+@endif gcc-bootstrap
@if gettext
TARGET-gettext=all
maybe-all-gettext: all-gettext
@@ -12807,7 +14779,7 @@ install-gettext: installdirs
@endif gettext
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gettext info-gettext
maybe-info-gettext:
@@ -12861,6 +14833,32 @@ dvi-gettext: \
@endif gettext
+.PHONY: maybe-pdf-gettext pdf-gettext
+maybe-pdf-gettext:
+@if gettext
+maybe-pdf-gettext: pdf-gettext
+
+pdf-gettext: \
+ configure-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gettext" ; \
+ (cd $(HOST_SUBDIR)/gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gettext
+
.PHONY: maybe-html-gettext html-gettext
maybe-html-gettext:
@if gettext
@@ -12940,6 +14938,33 @@ install-info-gettext: \
@endif gettext
+.PHONY: maybe-install-pdf-gettext install-pdf-gettext
+maybe-install-pdf-gettext:
+@if gettext
+maybe-install-pdf-gettext: install-pdf-gettext
+
+install-pdf-gettext: \
+ configure-gettext \
+ pdf-gettext
+ @: $(MAKE); $(unstage)
+ @[ -f ./gettext/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gettext" ; \
+ (cd $(HOST_SUBDIR)/gettext && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gettext
+
.PHONY: maybe-install-html-gettext install-html-gettext
maybe-install-html-gettext:
@if gettext
@@ -13095,8 +15120,1611 @@ maintainer-clean-gettext:
+.PHONY: configure-gmp maybe-configure-gmp
+maybe-configure-gmp:
+@if gcc-bootstrap
+configure-gmp: stage_current
+@endif gcc-bootstrap
+@if gmp
+maybe-configure-gmp: configure-gmp
+configure-gmp:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/gmp; \
+ cd "$(HOST_SUBDIR)/gmp" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gmp"; \
+ libsrcdir="$$s/gmp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared \
+ || exit 1
+@endif gmp
+
+
+
+.PHONY: configure-stage1-gmp maybe-configure-stage1-gmp
+maybe-configure-stage1-gmp:
+@if gmp-bootstrap
+maybe-configure-stage1-gmp: configure-stage1-gmp
+configure-stage1-gmp:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gmp"; \
+ libsrcdir="$$s/gmp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" --disable-shared
+@endif gmp-bootstrap
+
+.PHONY: configure-stage2-gmp maybe-configure-stage2-gmp
+maybe-configure-stage2-gmp:
+@if gmp-bootstrap
+maybe-configure-stage2-gmp: configure-stage2-gmp
+configure-stage2-gmp:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gmp"; \
+ libsrcdir="$$s/gmp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared
+@endif gmp-bootstrap
+
+.PHONY: configure-stage3-gmp maybe-configure-stage3-gmp
+maybe-configure-stage3-gmp:
+@if gmp-bootstrap
+maybe-configure-stage3-gmp: configure-stage3-gmp
+configure-stage3-gmp:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gmp"; \
+ libsrcdir="$$s/gmp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared
+@endif gmp-bootstrap
+
+.PHONY: configure-stage4-gmp maybe-configure-stage4-gmp
+maybe-configure-stage4-gmp:
+@if gmp-bootstrap
+maybe-configure-stage4-gmp: configure-stage4-gmp
+configure-stage4-gmp:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gmp"; \
+ libsrcdir="$$s/gmp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared
+@endif gmp-bootstrap
+
+.PHONY: configure-stageprofile-gmp maybe-configure-stageprofile-gmp
+maybe-configure-stageprofile-gmp:
+@if gmp-bootstrap
+maybe-configure-stageprofile-gmp: configure-stageprofile-gmp
+configure-stageprofile-gmp:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gmp"; \
+ libsrcdir="$$s/gmp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared
+@endif gmp-bootstrap
+
+.PHONY: configure-stagefeedback-gmp maybe-configure-stagefeedback-gmp
+maybe-configure-stagefeedback-gmp:
+@if gmp-bootstrap
+maybe-configure-stagefeedback-gmp: configure-stagefeedback-gmp
+configure-stagefeedback-gmp:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/gmp/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/gmp ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/gmp ; \
+ cd $(HOST_SUBDIR)/gmp || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/gmp/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/gmp"; \
+ libsrcdir="$$s/gmp"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared
+@endif gmp-bootstrap
+
+
+
+
+
+.PHONY: all-gmp maybe-all-gmp
+maybe-all-gmp:
+@if gcc-bootstrap
+all-gmp: stage_current
+@endif gcc-bootstrap
+@if gmp
+TARGET-gmp=all
+maybe-all-gmp: all-gmp
+all-gmp: configure-gmp
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-gmp))
+@endif gmp
+
+
+
+.PHONY: all-stage1-gmp maybe-all-stage1-gmp
+.PHONY: clean-stage1-gmp maybe-clean-stage1-gmp
+maybe-all-stage1-gmp:
+maybe-clean-stage1-gmp:
+@if gmp-bootstrap
+maybe-all-stage1-gmp: all-stage1-gmp
+all-stage1: all-stage1-gmp
+TARGET-stage1-gmp = $(TARGET-gmp)
+all-stage1-gmp: configure-stage1-gmp
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(TARGET-stage1-gmp)
+
+maybe-clean-stage1-gmp: clean-stage1-gmp
+clean-stage1: clean-stage1-gmp
+clean-stage1-gmp:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/gmp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-gmp/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ clean
+@endif gmp-bootstrap
+
+
+.PHONY: all-stage2-gmp maybe-all-stage2-gmp
+.PHONY: clean-stage2-gmp maybe-clean-stage2-gmp
+maybe-all-stage2-gmp:
+maybe-clean-stage2-gmp:
+@if gmp-bootstrap
+maybe-all-stage2-gmp: all-stage2-gmp
+all-stage2: all-stage2-gmp
+TARGET-stage2-gmp = $(TARGET-gmp)
+all-stage2-gmp: configure-stage2-gmp
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-gmp)
+
+maybe-clean-stage2-gmp: clean-stage2-gmp
+clean-stage2: clean-stage2-gmp
+clean-stage2-gmp:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/gmp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-gmp/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gmp-bootstrap
+
+
+.PHONY: all-stage3-gmp maybe-all-stage3-gmp
+.PHONY: clean-stage3-gmp maybe-clean-stage3-gmp
+maybe-all-stage3-gmp:
+maybe-clean-stage3-gmp:
+@if gmp-bootstrap
+maybe-all-stage3-gmp: all-stage3-gmp
+all-stage3: all-stage3-gmp
+TARGET-stage3-gmp = $(TARGET-gmp)
+all-stage3-gmp: configure-stage3-gmp
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-gmp)
+
+maybe-clean-stage3-gmp: clean-stage3-gmp
+clean-stage3: clean-stage3-gmp
+clean-stage3-gmp:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/gmp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-gmp/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gmp-bootstrap
+
+
+.PHONY: all-stage4-gmp maybe-all-stage4-gmp
+.PHONY: clean-stage4-gmp maybe-clean-stage4-gmp
+maybe-all-stage4-gmp:
+maybe-clean-stage4-gmp:
+@if gmp-bootstrap
+maybe-all-stage4-gmp: all-stage4-gmp
+all-stage4: all-stage4-gmp
+TARGET-stage4-gmp = $(TARGET-gmp)
+all-stage4-gmp: configure-stage4-gmp
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-gmp)
+
+maybe-clean-stage4-gmp: clean-stage4-gmp
+clean-stage4: clean-stage4-gmp
+clean-stage4-gmp:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/gmp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-gmp/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gmp-bootstrap
+
+
+.PHONY: all-stageprofile-gmp maybe-all-stageprofile-gmp
+.PHONY: clean-stageprofile-gmp maybe-clean-stageprofile-gmp
+maybe-all-stageprofile-gmp:
+maybe-clean-stageprofile-gmp:
+@if gmp-bootstrap
+maybe-all-stageprofile-gmp: all-stageprofile-gmp
+all-stageprofile: all-stageprofile-gmp
+TARGET-stageprofile-gmp = $(TARGET-gmp)
+all-stageprofile-gmp: configure-stageprofile-gmp
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-gmp)
+
+maybe-clean-stageprofile-gmp: clean-stageprofile-gmp
+clean-stageprofile: clean-stageprofile-gmp
+clean-stageprofile-gmp:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/gmp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-gmp/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gmp-bootstrap
+
+
+.PHONY: all-stagefeedback-gmp maybe-all-stagefeedback-gmp
+.PHONY: clean-stagefeedback-gmp maybe-clean-stagefeedback-gmp
+maybe-all-stagefeedback-gmp:
+maybe-clean-stagefeedback-gmp:
+@if gmp-bootstrap
+maybe-all-stagefeedback-gmp: all-stagefeedback-gmp
+all-stagefeedback: all-stagefeedback-gmp
+TARGET-stagefeedback-gmp = $(TARGET-gmp)
+all-stagefeedback-gmp: configure-stagefeedback-gmp
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-gmp)
+
+maybe-clean-stagefeedback-gmp: clean-stagefeedback-gmp
+clean-stagefeedback: clean-stagefeedback-gmp
+clean-stagefeedback-gmp:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/gmp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-gmp/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif gmp-bootstrap
+
+
+
+
+
+.PHONY: check-gmp maybe-check-gmp
+maybe-check-gmp:
+@if gmp
+maybe-check-gmp: check-gmp
+
+check-gmp:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif gmp
+
+.PHONY: install-gmp maybe-install-gmp
+maybe-install-gmp:
+@if gmp
+maybe-install-gmp: install-gmp
+
+install-gmp:
+
+@endif gmp
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-gmp info-gmp
+maybe-info-gmp:
+@if gmp
+maybe-info-gmp: info-gmp
+
+info-gmp: \
+ configure-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-dvi-gmp dvi-gmp
+maybe-dvi-gmp:
+@if gmp
+maybe-dvi-gmp: dvi-gmp
+
+dvi-gmp: \
+ configure-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-pdf-gmp pdf-gmp
+maybe-pdf-gmp:
+@if gmp
+maybe-pdf-gmp: pdf-gmp
+
+pdf-gmp: \
+ configure-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-html-gmp html-gmp
+maybe-html-gmp:
+@if gmp
+maybe-html-gmp: html-gmp
+
+html-gmp: \
+ configure-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing html in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ html) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-TAGS-gmp TAGS-gmp
+maybe-TAGS-gmp:
+@if gmp
+maybe-TAGS-gmp: TAGS-gmp
+
+TAGS-gmp: \
+ configure-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-install-info-gmp install-info-gmp
+maybe-install-info-gmp:
+@if gmp
+maybe-install-info-gmp: install-info-gmp
+
+install-info-gmp: \
+ configure-gmp \
+ info-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-install-pdf-gmp install-pdf-gmp
+maybe-install-pdf-gmp:
+@if gmp
+maybe-install-pdf-gmp: install-pdf-gmp
+
+install-pdf-gmp: \
+ configure-gmp \
+ pdf-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-install-html-gmp install-html-gmp
+maybe-install-html-gmp:
+@if gmp
+maybe-install-html-gmp: install-html-gmp
+
+install-html-gmp: \
+ configure-gmp \
+ html-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-html in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-html) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-installcheck-gmp installcheck-gmp
+maybe-installcheck-gmp:
+@if gmp
+maybe-installcheck-gmp: installcheck-gmp
+
+installcheck-gmp: \
+ configure-gmp
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-mostlyclean-gmp mostlyclean-gmp
+maybe-mostlyclean-gmp:
+@if gmp
+maybe-mostlyclean-gmp: mostlyclean-gmp
+
+mostlyclean-gmp:
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-clean-gmp clean-gmp
+maybe-clean-gmp:
+@if gmp
+maybe-clean-gmp: clean-gmp
+
+clean-gmp:
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-distclean-gmp distclean-gmp
+maybe-distclean-gmp:
+@if gmp
+maybe-distclean-gmp: distclean-gmp
+
+distclean-gmp:
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+@endif gmp
+
+.PHONY: maybe-maintainer-clean-gmp maintainer-clean-gmp
+maybe-maintainer-clean-gmp:
+@if gmp
+maybe-maintainer-clean-gmp: maintainer-clean-gmp
+
+maintainer-clean-gmp:
+ @[ -f ./gmp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in gmp" ; \
+ (cd $(HOST_SUBDIR)/gmp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif gmp
+
+
+
+.PHONY: configure-mpfr maybe-configure-mpfr
+maybe-configure-mpfr:
+@if gcc-bootstrap
+configure-mpfr: stage_current
+@endif gcc-bootstrap
+@if mpfr
+maybe-configure-mpfr: configure-mpfr
+configure-mpfr:
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ $(HOST_EXPORTS) \
+ echo Configuring in $(HOST_SUBDIR)/mpfr; \
+ cd "$(HOST_SUBDIR)/mpfr" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/mpfr"; \
+ libsrcdir="$$s/mpfr"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp \
+ || exit 1
+@endif mpfr
+
+
+
+.PHONY: configure-stage1-mpfr maybe-configure-stage1-mpfr
+maybe-configure-stage1-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stage1-mpfr: configure-stage1-mpfr
+configure-stage1-mpfr:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/mpfr"; \
+ libsrcdir="$$s/mpfr"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)" --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stage2-mpfr maybe-configure-stage2-mpfr
+maybe-configure-stage2-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stage2-mpfr: configure-stage2-mpfr
+configure-stage2-mpfr:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/mpfr"; \
+ libsrcdir="$$s/mpfr"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stage3-mpfr maybe-configure-stage3-mpfr
+maybe-configure-stage3-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stage3-mpfr: configure-stage3-mpfr
+configure-stage3-mpfr:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/mpfr"; \
+ libsrcdir="$$s/mpfr"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stage4-mpfr maybe-configure-stage4-mpfr
+maybe-configure-stage4-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stage4-mpfr: configure-stage4-mpfr
+configure-stage4-mpfr:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/mpfr"; \
+ libsrcdir="$$s/mpfr"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stageprofile-mpfr maybe-configure-stageprofile-mpfr
+maybe-configure-stageprofile-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stageprofile-mpfr: configure-stageprofile-mpfr
+configure-stageprofile-mpfr:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/mpfr"; \
+ libsrcdir="$$s/mpfr"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+.PHONY: configure-stagefeedback-mpfr maybe-configure-stagefeedback-mpfr
+maybe-configure-stagefeedback-mpfr:
+@if mpfr-bootstrap
+maybe-configure-stagefeedback-mpfr: configure-stagefeedback-mpfr
+configure-stagefeedback-mpfr:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ test ! -f $(HOST_SUBDIR)/mpfr/Makefile || exit 0; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(HOST_SUBDIR)/mpfr ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/mpfr ; \
+ cd $(HOST_SUBDIR)/mpfr || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(HOST_SUBDIR)/mpfr/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/mpfr"; \
+ libsrcdir="$$s/mpfr"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=none-${host_vendor}-${host_os} \
+ --target=none-${host_vendor}-${host_os} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@ --disable-shared --with-gmp-build=$$r/$(HOST_SUBDIR)/gmp
+@endif mpfr-bootstrap
+
+
+
+
+
+.PHONY: all-mpfr maybe-all-mpfr
+maybe-all-mpfr:
+@if gcc-bootstrap
+all-mpfr: stage_current
+@endif gcc-bootstrap
+@if mpfr
+TARGET-mpfr=all
+maybe-all-mpfr: all-mpfr
+all-mpfr: configure-mpfr
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) $(TARGET-mpfr))
+@endif mpfr
+
+
+
+.PHONY: all-stage1-mpfr maybe-all-stage1-mpfr
+.PHONY: clean-stage1-mpfr maybe-clean-stage1-mpfr
+maybe-all-stage1-mpfr:
+maybe-clean-stage1-mpfr:
+@if mpfr-bootstrap
+maybe-all-stage1-mpfr: all-stage1-mpfr
+all-stage1: all-stage1-mpfr
+TARGET-stage1-mpfr = $(TARGET-mpfr)
+all-stage1-mpfr: configure-stage1-mpfr
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(TARGET-stage1-mpfr)
+
+maybe-clean-stage1-mpfr: clean-stage1-mpfr
+clean-stage1: clean-stage1-mpfr
+clean-stage1-mpfr:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-mpfr/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stage2-mpfr maybe-all-stage2-mpfr
+.PHONY: clean-stage2-mpfr maybe-clean-stage2-mpfr
+maybe-all-stage2-mpfr:
+maybe-clean-stage2-mpfr:
+@if mpfr-bootstrap
+maybe-all-stage2-mpfr: all-stage2-mpfr
+all-stage2: all-stage2-mpfr
+TARGET-stage2-mpfr = $(TARGET-mpfr)
+all-stage2-mpfr: configure-stage2-mpfr
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage2-mpfr)
+
+maybe-clean-stage2-mpfr: clean-stage2-mpfr
+clean-stage2: clean-stage2-mpfr
+clean-stage2-mpfr:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-mpfr/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stage3-mpfr maybe-all-stage3-mpfr
+.PHONY: clean-stage3-mpfr maybe-clean-stage3-mpfr
+maybe-all-stage3-mpfr:
+maybe-clean-stage3-mpfr:
+@if mpfr-bootstrap
+maybe-all-stage3-mpfr: all-stage3-mpfr
+all-stage3: all-stage3-mpfr
+TARGET-stage3-mpfr = $(TARGET-mpfr)
+all-stage3-mpfr: configure-stage3-mpfr
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage3-mpfr)
+
+maybe-clean-stage3-mpfr: clean-stage3-mpfr
+clean-stage3: clean-stage3-mpfr
+clean-stage3-mpfr:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-mpfr/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stage4-mpfr maybe-all-stage4-mpfr
+.PHONY: clean-stage4-mpfr maybe-clean-stage4-mpfr
+maybe-all-stage4-mpfr:
+maybe-clean-stage4-mpfr:
+@if mpfr-bootstrap
+maybe-all-stage4-mpfr: all-stage4-mpfr
+all-stage4: all-stage4-mpfr
+TARGET-stage4-mpfr = $(TARGET-mpfr)
+all-stage4-mpfr: configure-stage4-mpfr
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stage4-mpfr)
+
+maybe-clean-stage4-mpfr: clean-stage4-mpfr
+clean-stage4: clean-stage4-mpfr
+clean-stage4-mpfr:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-mpfr/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stageprofile-mpfr maybe-all-stageprofile-mpfr
+.PHONY: clean-stageprofile-mpfr maybe-clean-stageprofile-mpfr
+maybe-all-stageprofile-mpfr:
+maybe-clean-stageprofile-mpfr:
+@if mpfr-bootstrap
+maybe-all-stageprofile-mpfr: all-stageprofile-mpfr
+all-stageprofile: all-stageprofile-mpfr
+TARGET-stageprofile-mpfr = $(TARGET-mpfr)
+all-stageprofile-mpfr: configure-stageprofile-mpfr
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stageprofile-mpfr)
+
+maybe-clean-stageprofile-mpfr: clean-stageprofile-mpfr
+clean-stageprofile: clean-stageprofile-mpfr
+clean-stageprofile-mpfr:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-mpfr/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif mpfr-bootstrap
+
+
+.PHONY: all-stagefeedback-mpfr maybe-all-stagefeedback-mpfr
+.PHONY: clean-stagefeedback-mpfr maybe-clean-stagefeedback-mpfr
+maybe-all-stagefeedback-mpfr:
+maybe-clean-stagefeedback-mpfr:
+@if mpfr-bootstrap
+maybe-all-stagefeedback-mpfr: all-stagefeedback-mpfr
+all-stagefeedback: all-stagefeedback-mpfr
+TARGET-stagefeedback-mpfr = $(TARGET-mpfr)
+all-stagefeedback-mpfr: configure-stagefeedback-mpfr
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ $(POSTSTAGE1_HOST_EXPORTS) \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(TARGET-stagefeedback-mpfr)
+
+maybe-clean-stagefeedback-mpfr: clean-stagefeedback-mpfr
+clean-stagefeedback: clean-stagefeedback-mpfr
+clean-stagefeedback-mpfr:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/mpfr/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-mpfr/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ $(POSTSTAGE1_FLAGS_TO_PASS) \
+ clean
+@endif mpfr-bootstrap
+
+
+
+
+
+.PHONY: check-mpfr maybe-check-mpfr
+maybe-check-mpfr:
+@if mpfr
+maybe-check-mpfr: check-mpfr
+
+check-mpfr:
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(FLAGS_TO_PASS) check)
+
+@endif mpfr
+
+.PHONY: install-mpfr maybe-install-mpfr
+maybe-install-mpfr:
+@if mpfr
+maybe-install-mpfr: install-mpfr
+
+install-mpfr:
+
+@endif mpfr
+
+# Other targets (info, dvi, pdf, etc.)
+
+.PHONY: maybe-info-mpfr info-mpfr
+maybe-info-mpfr:
+@if mpfr
+maybe-info-mpfr: info-mpfr
+
+info-mpfr: \
+ configure-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing info in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ info) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-dvi-mpfr dvi-mpfr
+maybe-dvi-mpfr:
+@if mpfr
+maybe-dvi-mpfr: dvi-mpfr
+
+dvi-mpfr: \
+ configure-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing dvi in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ dvi) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-pdf-mpfr pdf-mpfr
+maybe-pdf-mpfr:
+@if mpfr
+maybe-pdf-mpfr: pdf-mpfr
+
+pdf-mpfr: \
+ configure-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-html-mpfr html-mpfr
+maybe-html-mpfr:
+@if mpfr
+maybe-html-mpfr: html-mpfr
+
+html-mpfr: \
+ configure-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing html in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ html) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-TAGS-mpfr TAGS-mpfr
+maybe-TAGS-mpfr:
+@if mpfr
+maybe-TAGS-mpfr: TAGS-mpfr
+
+TAGS-mpfr: \
+ configure-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing TAGS in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ TAGS) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-install-info-mpfr install-info-mpfr
+maybe-install-info-mpfr:
+@if mpfr
+maybe-install-info-mpfr: install-info-mpfr
+
+install-info-mpfr: \
+ configure-mpfr \
+ info-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-info in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-info) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-install-pdf-mpfr install-pdf-mpfr
+maybe-install-pdf-mpfr:
+@if mpfr
+maybe-install-pdf-mpfr: install-pdf-mpfr
+
+install-pdf-mpfr: \
+ configure-mpfr \
+ pdf-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-install-html-mpfr install-html-mpfr
+maybe-install-html-mpfr:
+@if mpfr
+maybe-install-html-mpfr: install-html-mpfr
+
+install-html-mpfr: \
+ configure-mpfr \
+ html-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-html in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-html) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-installcheck-mpfr installcheck-mpfr
+maybe-installcheck-mpfr:
+@if mpfr
+maybe-installcheck-mpfr: installcheck-mpfr
+
+installcheck-mpfr: \
+ configure-mpfr
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing installcheck in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ installcheck) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-mostlyclean-mpfr mostlyclean-mpfr
+maybe-mostlyclean-mpfr:
+@if mpfr
+maybe-mostlyclean-mpfr: mostlyclean-mpfr
+
+mostlyclean-mpfr:
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing mostlyclean in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ mostlyclean) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-clean-mpfr clean-mpfr
+maybe-clean-mpfr:
+@if mpfr
+maybe-clean-mpfr: clean-mpfr
+
+clean-mpfr:
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing clean in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ clean) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-distclean-mpfr distclean-mpfr
+maybe-distclean-mpfr:
+@if mpfr
+maybe-distclean-mpfr: distclean-mpfr
+
+distclean-mpfr:
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing distclean in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ distclean) \
+ || exit 1
+
+@endif mpfr
+
+.PHONY: maybe-maintainer-clean-mpfr maintainer-clean-mpfr
+maybe-maintainer-clean-mpfr:
+@if mpfr
+maybe-maintainer-clean-mpfr: maintainer-clean-mpfr
+
+maintainer-clean-mpfr:
+ @[ -f ./mpfr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing maintainer-clean in mpfr" ; \
+ (cd $(HOST_SUBDIR)/mpfr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ maintainer-clean) \
+ || exit 1
+
+@endif mpfr
+
+
+
.PHONY: configure-gnuserv maybe-configure-gnuserv
maybe-configure-gnuserv:
+@if gcc-bootstrap
+configure-gnuserv: stage_current
+@endif gcc-bootstrap
@if gnuserv
maybe-configure-gnuserv: configure-gnuserv
configure-gnuserv:
@@ -13116,7 +16744,8 @@ configure-gnuserv:
srcdiroption="--srcdir=$${topdir}/gnuserv"; \
libsrcdir="$$s/gnuserv"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gnuserv
@@ -13126,6 +16755,9 @@ configure-gnuserv:
.PHONY: all-gnuserv maybe-all-gnuserv
maybe-all-gnuserv:
+@if gcc-bootstrap
+all-gnuserv: stage_current
+@endif gcc-bootstrap
@if gnuserv
TARGET-gnuserv=all
maybe-all-gnuserv: all-gnuserv
@@ -13171,7 +16803,7 @@ install-gnuserv: installdirs
@endif gnuserv
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gnuserv info-gnuserv
maybe-info-gnuserv:
@@ -13225,6 +16857,32 @@ dvi-gnuserv: \
@endif gnuserv
+.PHONY: maybe-pdf-gnuserv pdf-gnuserv
+maybe-pdf-gnuserv:
+@if gnuserv
+maybe-pdf-gnuserv: pdf-gnuserv
+
+pdf-gnuserv: \
+ configure-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gnuserv" ; \
+ (cd $(HOST_SUBDIR)/gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gnuserv
+
.PHONY: maybe-html-gnuserv html-gnuserv
maybe-html-gnuserv:
@if gnuserv
@@ -13304,6 +16962,33 @@ install-info-gnuserv: \
@endif gnuserv
+.PHONY: maybe-install-pdf-gnuserv install-pdf-gnuserv
+maybe-install-pdf-gnuserv:
+@if gnuserv
+maybe-install-pdf-gnuserv: install-pdf-gnuserv
+
+install-pdf-gnuserv: \
+ configure-gnuserv \
+ pdf-gnuserv
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnuserv/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gnuserv" ; \
+ (cd $(HOST_SUBDIR)/gnuserv && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gnuserv
+
.PHONY: maybe-install-html-gnuserv install-html-gnuserv
maybe-install-html-gnuserv:
@if gnuserv
@@ -13461,6 +17146,9 @@ maintainer-clean-gnuserv:
.PHONY: configure-gprof maybe-configure-gprof
maybe-configure-gprof:
+@if gcc-bootstrap
+configure-gprof: stage_current
+@endif gcc-bootstrap
@if gprof
maybe-configure-gprof: configure-gprof
configure-gprof:
@@ -13480,7 +17168,8 @@ configure-gprof:
srcdiroption="--srcdir=$${topdir}/gprof"; \
libsrcdir="$$s/gprof"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gprof
@@ -13490,6 +17179,9 @@ configure-gprof:
.PHONY: all-gprof maybe-all-gprof
maybe-all-gprof:
+@if gcc-bootstrap
+all-gprof: stage_current
+@endif gcc-bootstrap
@if gprof
TARGET-gprof=all
maybe-all-gprof: all-gprof
@@ -13535,7 +17227,7 @@ install-gprof: installdirs
@endif gprof
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gprof info-gprof
maybe-info-gprof:
@@ -13589,6 +17281,32 @@ dvi-gprof: \
@endif gprof
+.PHONY: maybe-pdf-gprof pdf-gprof
+maybe-pdf-gprof:
+@if gprof
+maybe-pdf-gprof: pdf-gprof
+
+pdf-gprof: \
+ configure-gprof
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gprof" ; \
+ (cd $(HOST_SUBDIR)/gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gprof
+
.PHONY: maybe-html-gprof html-gprof
maybe-html-gprof:
@if gprof
@@ -13668,6 +17386,33 @@ install-info-gprof: \
@endif gprof
+.PHONY: maybe-install-pdf-gprof install-pdf-gprof
+maybe-install-pdf-gprof:
+@if gprof
+maybe-install-pdf-gprof: install-pdf-gprof
+
+install-pdf-gprof: \
+ configure-gprof \
+ pdf-gprof
+ @: $(MAKE); $(unstage)
+ @[ -f ./gprof/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gprof" ; \
+ (cd $(HOST_SUBDIR)/gprof && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gprof
+
.PHONY: maybe-install-html-gprof install-html-gprof
maybe-install-html-gprof:
@if gprof
@@ -13825,6 +17570,9 @@ maintainer-clean-gprof:
.PHONY: configure-gzip maybe-configure-gzip
maybe-configure-gzip:
+@if gcc-bootstrap
+configure-gzip: stage_current
+@endif gcc-bootstrap
@if gzip
maybe-configure-gzip: configure-gzip
configure-gzip:
@@ -13844,7 +17592,8 @@ configure-gzip:
srcdiroption="--srcdir=$${topdir}/gzip"; \
libsrcdir="$$s/gzip"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gzip
@@ -13854,6 +17603,9 @@ configure-gzip:
.PHONY: all-gzip maybe-all-gzip
maybe-all-gzip:
+@if gcc-bootstrap
+all-gzip: stage_current
+@endif gcc-bootstrap
@if gzip
TARGET-gzip=all
maybe-all-gzip: all-gzip
@@ -13899,7 +17651,7 @@ install-gzip: installdirs
@endif gzip
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gzip info-gzip
maybe-info-gzip:
@@ -13953,6 +17705,32 @@ dvi-gzip: \
@endif gzip
+.PHONY: maybe-pdf-gzip pdf-gzip
+maybe-pdf-gzip:
+@if gzip
+maybe-pdf-gzip: pdf-gzip
+
+pdf-gzip: \
+ configure-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gzip" ; \
+ (cd $(HOST_SUBDIR)/gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gzip
+
.PHONY: maybe-html-gzip html-gzip
maybe-html-gzip:
@if gzip
@@ -14032,6 +17810,33 @@ install-info-gzip: \
@endif gzip
+.PHONY: maybe-install-pdf-gzip install-pdf-gzip
+maybe-install-pdf-gzip:
+@if gzip
+maybe-install-pdf-gzip: install-pdf-gzip
+
+install-pdf-gzip: \
+ configure-gzip \
+ pdf-gzip
+ @: $(MAKE); $(unstage)
+ @[ -f ./gzip/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gzip" ; \
+ (cd $(HOST_SUBDIR)/gzip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gzip
+
.PHONY: maybe-install-html-gzip install-html-gzip
maybe-install-html-gzip:
@if gzip
@@ -14189,6 +17994,9 @@ maintainer-clean-gzip:
.PHONY: configure-hello maybe-configure-hello
maybe-configure-hello:
+@if gcc-bootstrap
+configure-hello: stage_current
+@endif gcc-bootstrap
@if hello
maybe-configure-hello: configure-hello
configure-hello:
@@ -14208,7 +18016,8 @@ configure-hello:
srcdiroption="--srcdir=$${topdir}/hello"; \
libsrcdir="$$s/hello"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif hello
@@ -14218,6 +18027,9 @@ configure-hello:
.PHONY: all-hello maybe-all-hello
maybe-all-hello:
+@if gcc-bootstrap
+all-hello: stage_current
+@endif gcc-bootstrap
@if hello
TARGET-hello=all
maybe-all-hello: all-hello
@@ -14263,7 +18075,7 @@ install-hello: installdirs
@endif hello
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-hello info-hello
maybe-info-hello:
@@ -14317,6 +18129,32 @@ dvi-hello: \
@endif hello
+.PHONY: maybe-pdf-hello pdf-hello
+maybe-pdf-hello:
+@if hello
+maybe-pdf-hello: pdf-hello
+
+pdf-hello: \
+ configure-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in hello" ; \
+ (cd $(HOST_SUBDIR)/hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif hello
+
.PHONY: maybe-html-hello html-hello
maybe-html-hello:
@if hello
@@ -14396,6 +18234,33 @@ install-info-hello: \
@endif hello
+.PHONY: maybe-install-pdf-hello install-pdf-hello
+maybe-install-pdf-hello:
+@if hello
+maybe-install-pdf-hello: install-pdf-hello
+
+install-pdf-hello: \
+ configure-hello \
+ pdf-hello
+ @: $(MAKE); $(unstage)
+ @[ -f ./hello/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in hello" ; \
+ (cd $(HOST_SUBDIR)/hello && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif hello
+
.PHONY: maybe-install-html-hello install-html-hello
maybe-install-html-hello:
@if hello
@@ -14553,6 +18418,9 @@ maintainer-clean-hello:
.PHONY: configure-indent maybe-configure-indent
maybe-configure-indent:
+@if gcc-bootstrap
+configure-indent: stage_current
+@endif gcc-bootstrap
@if indent
maybe-configure-indent: configure-indent
configure-indent:
@@ -14572,7 +18440,8 @@ configure-indent:
srcdiroption="--srcdir=$${topdir}/indent"; \
libsrcdir="$$s/indent"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif indent
@@ -14582,6 +18451,9 @@ configure-indent:
.PHONY: all-indent maybe-all-indent
maybe-all-indent:
+@if gcc-bootstrap
+all-indent: stage_current
+@endif gcc-bootstrap
@if indent
TARGET-indent=all
maybe-all-indent: all-indent
@@ -14627,7 +18499,7 @@ install-indent: installdirs
@endif indent
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-indent info-indent
maybe-info-indent:
@@ -14681,6 +18553,32 @@ dvi-indent: \
@endif indent
+.PHONY: maybe-pdf-indent pdf-indent
+maybe-pdf-indent:
+@if indent
+maybe-pdf-indent: pdf-indent
+
+pdf-indent: \
+ configure-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in indent" ; \
+ (cd $(HOST_SUBDIR)/indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif indent
+
.PHONY: maybe-html-indent html-indent
maybe-html-indent:
@if indent
@@ -14760,6 +18658,33 @@ install-info-indent: \
@endif indent
+.PHONY: maybe-install-pdf-indent install-pdf-indent
+maybe-install-pdf-indent:
+@if indent
+maybe-install-pdf-indent: install-pdf-indent
+
+install-pdf-indent: \
+ configure-indent \
+ pdf-indent
+ @: $(MAKE); $(unstage)
+ @[ -f ./indent/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in indent" ; \
+ (cd $(HOST_SUBDIR)/indent && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif indent
+
.PHONY: maybe-install-html-indent install-html-indent
maybe-install-html-indent:
@if indent
@@ -14917,14 +18842,12 @@ maintainer-clean-indent:
.PHONY: configure-intl maybe-configure-intl
maybe-configure-intl:
+@if gcc-bootstrap
+configure-intl: stage_current
+@endif gcc-bootstrap
@if intl
maybe-configure-intl: configure-intl
configure-intl:
-@endif intl
-@if intl-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif intl-bootstrap
-@if intl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
@@ -14940,7 +18863,8 @@ configure-intl:
srcdiroption="--srcdir=$${topdir}/intl"; \
libsrcdir="$$s/intl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif intl
@@ -14957,6 +18881,8 @@ configure-stage1-intl:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/intl ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
cd $(HOST_SUBDIR)/intl || exit 1; \
@@ -14968,8 +18894,10 @@ configure-stage1-intl:
srcdiroption="--srcdir=$${topdir}/intl"; \
libsrcdir="$$s/intl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif intl-bootstrap
.PHONY: configure-stage2-intl maybe-configure-stage2-intl
@@ -14984,6 +18912,8 @@ configure-stage2-intl:
test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/intl ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
cd $(HOST_SUBDIR)/intl || exit 1; \
@@ -14995,7 +18925,9 @@ configure-stage2-intl:
srcdiroption="--srcdir=$${topdir}/intl"; \
libsrcdir="$$s/intl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif intl-bootstrap
@@ -15011,6 +18943,8 @@ configure-stage3-intl:
test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/intl ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
cd $(HOST_SUBDIR)/intl || exit 1; \
@@ -15022,7 +18956,9 @@ configure-stage3-intl:
srcdiroption="--srcdir=$${topdir}/intl"; \
libsrcdir="$$s/intl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif intl-bootstrap
@@ -15038,6 +18974,8 @@ configure-stage4-intl:
test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/intl ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
cd $(HOST_SUBDIR)/intl || exit 1; \
@@ -15049,7 +18987,9 @@ configure-stage4-intl:
srcdiroption="--srcdir=$${topdir}/intl"; \
libsrcdir="$$s/intl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif intl-bootstrap
@@ -15065,6 +19005,8 @@ configure-stageprofile-intl:
test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/intl ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
cd $(HOST_SUBDIR)/intl || exit 1; \
@@ -15076,7 +19018,9 @@ configure-stageprofile-intl:
srcdiroption="--srcdir=$${topdir}/intl"; \
libsrcdir="$$s/intl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif intl-bootstrap
@@ -15092,6 +19036,8 @@ configure-stagefeedback-intl:
test ! -f $(HOST_SUBDIR)/intl/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/intl ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/intl ; \
cd $(HOST_SUBDIR)/intl || exit 1; \
@@ -15103,7 +19049,9 @@ configure-stagefeedback-intl:
srcdiroption="--srcdir=$${topdir}/intl"; \
libsrcdir="$$s/intl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif intl-bootstrap
@@ -15113,15 +19061,13 @@ configure-stagefeedback-intl:
.PHONY: all-intl maybe-all-intl
maybe-all-intl:
+@if gcc-bootstrap
+all-intl: stage_current
+@endif gcc-bootstrap
@if intl
TARGET-intl=all
maybe-all-intl: all-intl
all-intl: configure-intl
-@endif intl
-@if intl-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif intl-bootstrap
-@if intl
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -15145,18 +19091,22 @@ all-stage1-intl: configure-stage1-intl
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-intl)
maybe-clean-stage1-intl: clean-stage1-intl
clean-stage1: clean-stage1-intl
clean-stage1-intl:
- @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-intl/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-intl/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif intl-bootstrap
@@ -15175,19 +19125,23 @@ all-stage2-intl: configure-stage2-intl
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-intl)
maybe-clean-stage2-intl: clean-stage2-intl
clean-stage2: clean-stage2-intl
clean-stage2-intl:
- @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-intl/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-intl/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif intl-bootstrap
@@ -15206,19 +19160,23 @@ all-stage3-intl: configure-stage3-intl
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-intl)
maybe-clean-stage3-intl: clean-stage3-intl
clean-stage3: clean-stage3-intl
clean-stage3-intl:
- @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-intl/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-intl/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif intl-bootstrap
@@ -15237,19 +19195,23 @@ all-stage4-intl: configure-stage4-intl
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-intl)
maybe-clean-stage4-intl: clean-stage4-intl
clean-stage4: clean-stage4-intl
clean-stage4-intl:
- @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-intl/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-intl/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif intl-bootstrap
@@ -15268,19 +19230,23 @@ all-stageprofile-intl: configure-stageprofile-intl
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-intl)
maybe-clean-stageprofile-intl: clean-stageprofile-intl
clean-stageprofile: clean-stageprofile-intl
clean-stageprofile-intl:
- @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-intl/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-intl/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif intl-bootstrap
@@ -15299,19 +19265,23 @@ all-stagefeedback-intl: configure-stagefeedback-intl
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/intl && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-intl)
maybe-clean-stagefeedback-intl: clean-stagefeedback-intl
clean-stagefeedback: clean-stagefeedback-intl
clean-stagefeedback-intl:
- @[ -f $(HOST_SUBDIR)/intl/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-intl/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/intl/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-intl/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/intl && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif intl-bootstrap
@@ -15348,7 +19318,7 @@ install-intl: installdirs
@endif intl
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-intl info-intl
maybe-info-intl:
@@ -15400,6 +19370,31 @@ dvi-intl: \
@endif intl
+.PHONY: maybe-pdf-intl pdf-intl
+maybe-pdf-intl:
+@if intl
+maybe-pdf-intl: pdf-intl
+
+pdf-intl: \
+ configure-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in intl" ; \
+ (cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif intl
+
.PHONY: maybe-html-intl html-intl
maybe-html-intl:
@if intl
@@ -15476,6 +19471,32 @@ install-info-intl: \
@endif intl
+.PHONY: maybe-install-pdf-intl install-pdf-intl
+maybe-install-pdf-intl:
+@if intl
+maybe-install-pdf-intl: install-pdf-intl
+
+install-pdf-intl: \
+ configure-intl \
+ pdf-intl
+ @[ -f ./intl/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in intl" ; \
+ (cd $(HOST_SUBDIR)/intl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif intl
+
.PHONY: maybe-install-html-intl install-html-intl
maybe-install-html-intl:
@if intl
@@ -15627,6 +19648,9 @@ maintainer-clean-intl:
.PHONY: configure-tcl maybe-configure-tcl
maybe-configure-tcl:
+@if gcc-bootstrap
+configure-tcl: stage_current
+@endif gcc-bootstrap
@if tcl
maybe-configure-tcl: configure-tcl
configure-tcl:
@@ -15646,7 +19670,8 @@ configure-tcl:
srcdiroption="--srcdir=$${topdir}/tcl"; \
libsrcdir="$$s/tcl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif tcl
@@ -15656,6 +19681,9 @@ configure-tcl:
.PHONY: all-tcl maybe-all-tcl
maybe-all-tcl:
+@if gcc-bootstrap
+all-tcl: stage_current
+@endif gcc-bootstrap
@if tcl
TARGET-tcl=all
maybe-all-tcl: all-tcl
@@ -15701,7 +19729,7 @@ install-tcl: installdirs
@endif tcl
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-tcl info-tcl
maybe-info-tcl:
@@ -15755,6 +19783,32 @@ dvi-tcl: \
@endif tcl
+.PHONY: maybe-pdf-tcl pdf-tcl
+maybe-pdf-tcl:
+@if tcl
+maybe-pdf-tcl: pdf-tcl
+
+pdf-tcl: \
+ configure-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in tcl" ; \
+ (cd $(HOST_SUBDIR)/tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif tcl
+
.PHONY: maybe-html-tcl html-tcl
maybe-html-tcl:
@if tcl
@@ -15834,6 +19888,33 @@ install-info-tcl: \
@endif tcl
+.PHONY: maybe-install-pdf-tcl install-pdf-tcl
+maybe-install-pdf-tcl:
+@if tcl
+maybe-install-pdf-tcl: install-pdf-tcl
+
+install-pdf-tcl: \
+ configure-tcl \
+ pdf-tcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./tcl/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in tcl" ; \
+ (cd $(HOST_SUBDIR)/tcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif tcl
+
.PHONY: maybe-install-html-tcl install-html-tcl
maybe-install-html-tcl:
@if tcl
@@ -15976,6 +20057,9 @@ maintainer-clean-tcl:
.PHONY: configure-itcl maybe-configure-itcl
maybe-configure-itcl:
+@if gcc-bootstrap
+configure-itcl: stage_current
+@endif gcc-bootstrap
@if itcl
maybe-configure-itcl: configure-itcl
configure-itcl:
@@ -15995,7 +20079,8 @@ configure-itcl:
srcdiroption="--srcdir=$${topdir}/itcl"; \
libsrcdir="$$s/itcl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif itcl
@@ -16005,6 +20090,9 @@ configure-itcl:
.PHONY: all-itcl maybe-all-itcl
maybe-all-itcl:
+@if gcc-bootstrap
+all-itcl: stage_current
+@endif gcc-bootstrap
@if itcl
TARGET-itcl=all
maybe-all-itcl: all-itcl
@@ -16050,7 +20138,7 @@ install-itcl: installdirs
@endif itcl
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-itcl info-itcl
maybe-info-itcl:
@@ -16104,6 +20192,32 @@ dvi-itcl: \
@endif itcl
+.PHONY: maybe-pdf-itcl pdf-itcl
+maybe-pdf-itcl:
+@if itcl
+maybe-pdf-itcl: pdf-itcl
+
+pdf-itcl: \
+ configure-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in itcl" ; \
+ (cd $(HOST_SUBDIR)/itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif itcl
+
.PHONY: maybe-html-itcl html-itcl
maybe-html-itcl:
@if itcl
@@ -16183,6 +20297,33 @@ install-info-itcl: \
@endif itcl
+.PHONY: maybe-install-pdf-itcl install-pdf-itcl
+maybe-install-pdf-itcl:
+@if itcl
+maybe-install-pdf-itcl: install-pdf-itcl
+
+install-pdf-itcl: \
+ configure-itcl \
+ pdf-itcl
+ @: $(MAKE); $(unstage)
+ @[ -f ./itcl/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in itcl" ; \
+ (cd $(HOST_SUBDIR)/itcl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif itcl
+
.PHONY: maybe-install-html-itcl install-html-itcl
maybe-install-html-itcl:
@if itcl
@@ -16340,14 +20481,12 @@ maintainer-clean-itcl:
.PHONY: configure-ld maybe-configure-ld
maybe-configure-ld:
+@if gcc-bootstrap
+configure-ld: stage_current
+@endif gcc-bootstrap
@if ld
maybe-configure-ld: configure-ld
configure-ld:
-@endif ld
-@if ld-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif ld-bootstrap
-@if ld
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
@@ -16363,7 +20502,8 @@ configure-ld:
srcdiroption="--srcdir=$${topdir}/ld"; \
libsrcdir="$$s/ld"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif ld
@@ -16380,6 +20520,8 @@ configure-stage1-ld:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/ld ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
cd $(HOST_SUBDIR)/ld || exit 1; \
@@ -16391,8 +20533,10 @@ configure-stage1-ld:
srcdiroption="--srcdir=$${topdir}/ld"; \
libsrcdir="$$s/ld"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif ld-bootstrap
.PHONY: configure-stage2-ld maybe-configure-stage2-ld
@@ -16407,6 +20551,8 @@ configure-stage2-ld:
test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/ld ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
cd $(HOST_SUBDIR)/ld || exit 1; \
@@ -16418,7 +20564,9 @@ configure-stage2-ld:
srcdiroption="--srcdir=$${topdir}/ld"; \
libsrcdir="$$s/ld"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif ld-bootstrap
@@ -16434,6 +20582,8 @@ configure-stage3-ld:
test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/ld ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
cd $(HOST_SUBDIR)/ld || exit 1; \
@@ -16445,7 +20595,9 @@ configure-stage3-ld:
srcdiroption="--srcdir=$${topdir}/ld"; \
libsrcdir="$$s/ld"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif ld-bootstrap
@@ -16461,6 +20613,8 @@ configure-stage4-ld:
test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/ld ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
cd $(HOST_SUBDIR)/ld || exit 1; \
@@ -16472,7 +20626,9 @@ configure-stage4-ld:
srcdiroption="--srcdir=$${topdir}/ld"; \
libsrcdir="$$s/ld"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif ld-bootstrap
@@ -16488,6 +20644,8 @@ configure-stageprofile-ld:
test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/ld ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
cd $(HOST_SUBDIR)/ld || exit 1; \
@@ -16499,7 +20657,9 @@ configure-stageprofile-ld:
srcdiroption="--srcdir=$${topdir}/ld"; \
libsrcdir="$$s/ld"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif ld-bootstrap
@@ -16515,6 +20675,8 @@ configure-stagefeedback-ld:
test ! -f $(HOST_SUBDIR)/ld/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/ld ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/ld ; \
cd $(HOST_SUBDIR)/ld || exit 1; \
@@ -16526,7 +20688,9 @@ configure-stagefeedback-ld:
srcdiroption="--srcdir=$${topdir}/ld"; \
libsrcdir="$$s/ld"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif ld-bootstrap
@@ -16536,15 +20700,13 @@ configure-stagefeedback-ld:
.PHONY: all-ld maybe-all-ld
maybe-all-ld:
+@if gcc-bootstrap
+all-ld: stage_current
+@endif gcc-bootstrap
@if ld
TARGET-ld=all
maybe-all-ld: all-ld
all-ld: configure-ld
-@endif ld
-@if ld-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif ld-bootstrap
-@if ld
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -16568,18 +20730,22 @@ all-stage1-ld: configure-stage1-ld
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-ld)
maybe-clean-stage1-ld: clean-stage1-ld
clean-stage1: clean-stage1-ld
clean-stage1-ld:
- @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-ld/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-ld/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif ld-bootstrap
@@ -16598,19 +20764,23 @@ all-stage2-ld: configure-stage2-ld
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-ld)
maybe-clean-stage2-ld: clean-stage2-ld
clean-stage2: clean-stage2-ld
clean-stage2-ld:
- @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-ld/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-ld/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif ld-bootstrap
@@ -16629,19 +20799,23 @@ all-stage3-ld: configure-stage3-ld
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-ld)
maybe-clean-stage3-ld: clean-stage3-ld
clean-stage3: clean-stage3-ld
clean-stage3-ld:
- @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-ld/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-ld/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif ld-bootstrap
@@ -16660,19 +20834,23 @@ all-stage4-ld: configure-stage4-ld
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-ld)
maybe-clean-stage4-ld: clean-stage4-ld
clean-stage4: clean-stage4-ld
clean-stage4-ld:
- @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-ld/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-ld/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif ld-bootstrap
@@ -16691,19 +20869,23 @@ all-stageprofile-ld: configure-stageprofile-ld
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-ld)
maybe-clean-stageprofile-ld: clean-stageprofile-ld
clean-stageprofile: clean-stageprofile-ld
clean-stageprofile-ld:
- @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-ld/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-ld/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif ld-bootstrap
@@ -16722,19 +20904,23 @@ all-stagefeedback-ld: configure-stagefeedback-ld
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/ld && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-ld)
maybe-clean-stagefeedback-ld: clean-stagefeedback-ld
clean-stagefeedback: clean-stagefeedback-ld
clean-stagefeedback-ld:
- @[ -f $(HOST_SUBDIR)/ld/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-ld/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/ld/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-ld/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/ld && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif ld-bootstrap
@@ -16771,7 +20957,7 @@ install-ld: installdirs
@endif ld
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-ld info-ld
maybe-info-ld:
@@ -16823,6 +21009,31 @@ dvi-ld: \
@endif ld
+.PHONY: maybe-pdf-ld pdf-ld
+maybe-pdf-ld:
+@if ld
+maybe-pdf-ld: pdf-ld
+
+pdf-ld: \
+ configure-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in ld" ; \
+ (cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif ld
+
.PHONY: maybe-html-ld html-ld
maybe-html-ld:
@if ld
@@ -16899,6 +21110,32 @@ install-info-ld: \
@endif ld
+.PHONY: maybe-install-pdf-ld install-pdf-ld
+maybe-install-pdf-ld:
+@if ld
+maybe-install-pdf-ld: install-pdf-ld
+
+install-pdf-ld: \
+ configure-ld \
+ pdf-ld
+ @[ -f ./ld/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in ld" ; \
+ (cd $(HOST_SUBDIR)/ld && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif ld
+
.PHONY: maybe-install-html-ld install-html-ld
maybe-install-html-ld:
@if ld
@@ -17050,14 +21287,12 @@ maintainer-clean-ld:
.PHONY: configure-libcpp maybe-configure-libcpp
maybe-configure-libcpp:
+@if gcc-bootstrap
+configure-libcpp: stage_current
+@endif gcc-bootstrap
@if libcpp
maybe-configure-libcpp: configure-libcpp
configure-libcpp:
-@endif libcpp
-@if libcpp-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif libcpp-bootstrap
-@if libcpp
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
@@ -17073,7 +21308,8 @@ configure-libcpp:
srcdiroption="--srcdir=$${topdir}/libcpp"; \
libsrcdir="$$s/libcpp"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif libcpp
@@ -17090,6 +21326,8 @@ configure-stage1-libcpp:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/libcpp ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
@@ -17101,8 +21339,10 @@ configure-stage1-libcpp:
srcdiroption="--srcdir=$${topdir}/libcpp"; \
libsrcdir="$$s/libcpp"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif libcpp-bootstrap
.PHONY: configure-stage2-libcpp maybe-configure-stage2-libcpp
@@ -17117,6 +21357,8 @@ configure-stage2-libcpp:
test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/libcpp ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
@@ -17128,7 +21370,9 @@ configure-stage2-libcpp:
srcdiroption="--srcdir=$${topdir}/libcpp"; \
libsrcdir="$$s/libcpp"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libcpp-bootstrap
@@ -17144,6 +21388,8 @@ configure-stage3-libcpp:
test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/libcpp ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
@@ -17155,7 +21401,9 @@ configure-stage3-libcpp:
srcdiroption="--srcdir=$${topdir}/libcpp"; \
libsrcdir="$$s/libcpp"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libcpp-bootstrap
@@ -17171,6 +21419,8 @@ configure-stage4-libcpp:
test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/libcpp ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
@@ -17182,7 +21432,9 @@ configure-stage4-libcpp:
srcdiroption="--srcdir=$${topdir}/libcpp"; \
libsrcdir="$$s/libcpp"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libcpp-bootstrap
@@ -17198,6 +21450,8 @@ configure-stageprofile-libcpp:
test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/libcpp ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
@@ -17209,7 +21463,9 @@ configure-stageprofile-libcpp:
srcdiroption="--srcdir=$${topdir}/libcpp"; \
libsrcdir="$$s/libcpp"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libcpp-bootstrap
@@ -17225,6 +21481,8 @@ configure-stagefeedback-libcpp:
test ! -f $(HOST_SUBDIR)/libcpp/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/libcpp ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libcpp ; \
cd $(HOST_SUBDIR)/libcpp || exit 1; \
@@ -17236,7 +21494,9 @@ configure-stagefeedback-libcpp:
srcdiroption="--srcdir=$${topdir}/libcpp"; \
libsrcdir="$$s/libcpp"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libcpp-bootstrap
@@ -17246,15 +21506,13 @@ configure-stagefeedback-libcpp:
.PHONY: all-libcpp maybe-all-libcpp
maybe-all-libcpp:
+@if gcc-bootstrap
+all-libcpp: stage_current
+@endif gcc-bootstrap
@if libcpp
TARGET-libcpp=all
maybe-all-libcpp: all-libcpp
all-libcpp: configure-libcpp
-@endif libcpp
-@if libcpp-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif libcpp-bootstrap
-@if libcpp
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -17278,18 +21536,22 @@ all-stage1-libcpp: configure-stage1-libcpp
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-libcpp)
maybe-clean-stage1-libcpp: clean-stage1-libcpp
clean-stage1: clean-stage1-libcpp
clean-stage1-libcpp:
- @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libcpp/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-libcpp/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif libcpp-bootstrap
@@ -17308,19 +21570,23 @@ all-stage2-libcpp: configure-stage2-libcpp
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-libcpp)
maybe-clean-stage2-libcpp: clean-stage2-libcpp
clean-stage2: clean-stage2-libcpp
clean-stage2-libcpp:
- @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libcpp/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-libcpp/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libcpp-bootstrap
@@ -17339,19 +21605,23 @@ all-stage3-libcpp: configure-stage3-libcpp
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-libcpp)
maybe-clean-stage3-libcpp: clean-stage3-libcpp
clean-stage3: clean-stage3-libcpp
clean-stage3-libcpp:
- @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libcpp/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-libcpp/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libcpp-bootstrap
@@ -17370,19 +21640,23 @@ all-stage4-libcpp: configure-stage4-libcpp
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-libcpp)
maybe-clean-stage4-libcpp: clean-stage4-libcpp
clean-stage4: clean-stage4-libcpp
clean-stage4-libcpp:
- @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libcpp/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-libcpp/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libcpp-bootstrap
@@ -17401,19 +21675,23 @@ all-stageprofile-libcpp: configure-stageprofile-libcpp
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-libcpp)
maybe-clean-stageprofile-libcpp: clean-stageprofile-libcpp
clean-stageprofile: clean-stageprofile-libcpp
clean-stageprofile-libcpp:
- @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libcpp/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-libcpp/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif libcpp-bootstrap
@@ -17432,19 +21710,23 @@ all-stagefeedback-libcpp: configure-stagefeedback-libcpp
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libcpp && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-libcpp)
maybe-clean-stagefeedback-libcpp: clean-stagefeedback-libcpp
clean-stagefeedback: clean-stagefeedback-libcpp
clean-stagefeedback-libcpp:
- @[ -f $(HOST_SUBDIR)/libcpp/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libcpp/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/libcpp/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-libcpp/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/libcpp && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif libcpp-bootstrap
@@ -17481,7 +21763,7 @@ install-libcpp: installdirs
@endif libcpp
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-libcpp info-libcpp
maybe-info-libcpp:
@@ -17533,6 +21815,31 @@ dvi-libcpp: \
@endif libcpp
+.PHONY: maybe-pdf-libcpp pdf-libcpp
+maybe-pdf-libcpp:
+@if libcpp
+maybe-pdf-libcpp: pdf-libcpp
+
+pdf-libcpp: \
+ configure-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libcpp" ; \
+ (cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif libcpp
+
.PHONY: maybe-html-libcpp html-libcpp
maybe-html-libcpp:
@if libcpp
@@ -17609,6 +21916,32 @@ install-info-libcpp: \
@endif libcpp
+.PHONY: maybe-install-pdf-libcpp install-pdf-libcpp
+maybe-install-pdf-libcpp:
+@if libcpp
+maybe-install-pdf-libcpp: install-pdf-libcpp
+
+install-pdf-libcpp: \
+ configure-libcpp \
+ pdf-libcpp
+ @[ -f ./libcpp/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in libcpp" ; \
+ (cd $(HOST_SUBDIR)/libcpp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif libcpp
+
.PHONY: maybe-install-html-libcpp install-html-libcpp
maybe-install-html-libcpp:
@if libcpp
@@ -17760,14 +22093,12 @@ maintainer-clean-libcpp:
.PHONY: configure-libdecnumber maybe-configure-libdecnumber
maybe-configure-libdecnumber:
+@if gcc-bootstrap
+configure-libdecnumber: stage_current
+@endif gcc-bootstrap
@if libdecnumber
maybe-configure-libdecnumber: configure-libdecnumber
configure-libdecnumber:
-@endif libdecnumber
-@if libdecnumber-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif libdecnumber-bootstrap
-@if libdecnumber
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
@@ -17783,7 +22114,8 @@ configure-libdecnumber:
srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
libsrcdir="$$s/libdecnumber"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif libdecnumber
@@ -17800,6 +22132,8 @@ configure-stage1-libdecnumber:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/libdecnumber ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
@@ -17811,8 +22145,10 @@ configure-stage1-libdecnumber:
srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
libsrcdir="$$s/libdecnumber"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif libdecnumber-bootstrap
.PHONY: configure-stage2-libdecnumber maybe-configure-stage2-libdecnumber
@@ -17827,6 +22163,8 @@ configure-stage2-libdecnumber:
test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/libdecnumber ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
@@ -17838,7 +22176,9 @@ configure-stage2-libdecnumber:
srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
libsrcdir="$$s/libdecnumber"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libdecnumber-bootstrap
@@ -17854,6 +22194,8 @@ configure-stage3-libdecnumber:
test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/libdecnumber ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
@@ -17865,7 +22207,9 @@ configure-stage3-libdecnumber:
srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
libsrcdir="$$s/libdecnumber"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libdecnumber-bootstrap
@@ -17881,6 +22225,8 @@ configure-stage4-libdecnumber:
test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/libdecnumber ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
@@ -17892,7 +22238,9 @@ configure-stage4-libdecnumber:
srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
libsrcdir="$$s/libdecnumber"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libdecnumber-bootstrap
@@ -17908,6 +22256,8 @@ configure-stageprofile-libdecnumber:
test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/libdecnumber ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
@@ -17919,7 +22269,9 @@ configure-stageprofile-libdecnumber:
srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
libsrcdir="$$s/libdecnumber"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libdecnumber-bootstrap
@@ -17935,6 +22287,8 @@ configure-stagefeedback-libdecnumber:
test ! -f $(HOST_SUBDIR)/libdecnumber/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/libdecnumber ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libdecnumber ; \
cd $(HOST_SUBDIR)/libdecnumber || exit 1; \
@@ -17946,7 +22300,9 @@ configure-stagefeedback-libdecnumber:
srcdiroption="--srcdir=$${topdir}/libdecnumber"; \
libsrcdir="$$s/libdecnumber"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libdecnumber-bootstrap
@@ -17956,15 +22312,13 @@ configure-stagefeedback-libdecnumber:
.PHONY: all-libdecnumber maybe-all-libdecnumber
maybe-all-libdecnumber:
+@if gcc-bootstrap
+all-libdecnumber: stage_current
+@endif gcc-bootstrap
@if libdecnumber
TARGET-libdecnumber=all
maybe-all-libdecnumber: all-libdecnumber
all-libdecnumber: configure-libdecnumber
-@endif libdecnumber
-@if libdecnumber-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif libdecnumber-bootstrap
-@if libdecnumber
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -17988,18 +22342,22 @@ all-stage1-libdecnumber: configure-stage1-libdecnumber
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-libdecnumber)
maybe-clean-stage1-libdecnumber: clean-stage1-libdecnumber
clean-stage1: clean-stage1-libdecnumber
clean-stage1-libdecnumber:
- @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libdecnumber/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-libdecnumber/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif libdecnumber-bootstrap
@@ -18018,19 +22376,23 @@ all-stage2-libdecnumber: configure-stage2-libdecnumber
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-libdecnumber)
maybe-clean-stage2-libdecnumber: clean-stage2-libdecnumber
clean-stage2: clean-stage2-libdecnumber
clean-stage2-libdecnumber:
- @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libdecnumber/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-libdecnumber/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libdecnumber-bootstrap
@@ -18049,19 +22411,23 @@ all-stage3-libdecnumber: configure-stage3-libdecnumber
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-libdecnumber)
maybe-clean-stage3-libdecnumber: clean-stage3-libdecnumber
clean-stage3: clean-stage3-libdecnumber
clean-stage3-libdecnumber:
- @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libdecnumber/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-libdecnumber/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libdecnumber-bootstrap
@@ -18080,19 +22446,23 @@ all-stage4-libdecnumber: configure-stage4-libdecnumber
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-libdecnumber)
maybe-clean-stage4-libdecnumber: clean-stage4-libdecnumber
clean-stage4: clean-stage4-libdecnumber
clean-stage4-libdecnumber:
- @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libdecnumber/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-libdecnumber/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libdecnumber-bootstrap
@@ -18111,19 +22481,23 @@ all-stageprofile-libdecnumber: configure-stageprofile-libdecnumber
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-libdecnumber)
maybe-clean-stageprofile-libdecnumber: clean-stageprofile-libdecnumber
clean-stageprofile: clean-stageprofile-libdecnumber
clean-stageprofile-libdecnumber:
- @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libdecnumber/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-libdecnumber/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif libdecnumber-bootstrap
@@ -18142,19 +22516,23 @@ all-stagefeedback-libdecnumber: configure-stagefeedback-libdecnumber
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libdecnumber && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-libdecnumber)
maybe-clean-stagefeedback-libdecnumber: clean-stagefeedback-libdecnumber
clean-stagefeedback: clean-stagefeedback-libdecnumber
clean-stagefeedback-libdecnumber:
- @[ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libdecnumber/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/libdecnumber/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-libdecnumber/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/libdecnumber && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif libdecnumber-bootstrap
@@ -18191,7 +22569,7 @@ install-libdecnumber: installdirs
@endif libdecnumber
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-libdecnumber info-libdecnumber
maybe-info-libdecnumber:
@@ -18243,6 +22621,31 @@ dvi-libdecnumber: \
@endif libdecnumber
+.PHONY: maybe-pdf-libdecnumber pdf-libdecnumber
+maybe-pdf-libdecnumber:
+@if libdecnumber
+maybe-pdf-libdecnumber: pdf-libdecnumber
+
+pdf-libdecnumber: \
+ configure-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libdecnumber" ; \
+ (cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif libdecnumber
+
.PHONY: maybe-html-libdecnumber html-libdecnumber
maybe-html-libdecnumber:
@if libdecnumber
@@ -18319,6 +22722,32 @@ install-info-libdecnumber: \
@endif libdecnumber
+.PHONY: maybe-install-pdf-libdecnumber install-pdf-libdecnumber
+maybe-install-pdf-libdecnumber:
+@if libdecnumber
+maybe-install-pdf-libdecnumber: install-pdf-libdecnumber
+
+install-pdf-libdecnumber: \
+ configure-libdecnumber \
+ pdf-libdecnumber
+ @[ -f ./libdecnumber/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in libdecnumber" ; \
+ (cd $(HOST_SUBDIR)/libdecnumber && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif libdecnumber
+
.PHONY: maybe-install-html-libdecnumber install-html-libdecnumber
maybe-install-html-libdecnumber:
@if libdecnumber
@@ -18470,6 +22899,9 @@ maintainer-clean-libdecnumber:
.PHONY: configure-libgui maybe-configure-libgui
maybe-configure-libgui:
+@if gcc-bootstrap
+configure-libgui: stage_current
+@endif gcc-bootstrap
@if libgui
maybe-configure-libgui: configure-libgui
configure-libgui:
@@ -18489,7 +22921,8 @@ configure-libgui:
srcdiroption="--srcdir=$${topdir}/libgui"; \
libsrcdir="$$s/libgui"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif libgui
@@ -18499,6 +22932,9 @@ configure-libgui:
.PHONY: all-libgui maybe-all-libgui
maybe-all-libgui:
+@if gcc-bootstrap
+all-libgui: stage_current
+@endif gcc-bootstrap
@if libgui
TARGET-libgui=all
maybe-all-libgui: all-libgui
@@ -18544,7 +22980,7 @@ install-libgui: installdirs
@endif libgui
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-libgui info-libgui
maybe-info-libgui:
@@ -18598,6 +23034,32 @@ dvi-libgui: \
@endif libgui
+.PHONY: maybe-pdf-libgui pdf-libgui
+maybe-pdf-libgui:
+@if libgui
+maybe-pdf-libgui: pdf-libgui
+
+pdf-libgui: \
+ configure-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libgui" ; \
+ (cd $(HOST_SUBDIR)/libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif libgui
+
.PHONY: maybe-html-libgui html-libgui
maybe-html-libgui:
@if libgui
@@ -18677,6 +23139,33 @@ install-info-libgui: \
@endif libgui
+.PHONY: maybe-install-pdf-libgui install-pdf-libgui
+maybe-install-pdf-libgui:
+@if libgui
+maybe-install-pdf-libgui: install-pdf-libgui
+
+install-pdf-libgui: \
+ configure-libgui \
+ pdf-libgui
+ @: $(MAKE); $(unstage)
+ @[ -f ./libgui/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in libgui" ; \
+ (cd $(HOST_SUBDIR)/libgui && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif libgui
+
.PHONY: maybe-install-html-libgui install-html-libgui
maybe-install-html-libgui:
@if libgui
@@ -18834,14 +23323,12 @@ maintainer-clean-libgui:
.PHONY: configure-libiberty maybe-configure-libiberty
maybe-configure-libiberty:
+@if gcc-bootstrap
+configure-libiberty: stage_current
+@endif gcc-bootstrap
@if libiberty
maybe-configure-libiberty: configure-libiberty
configure-libiberty:
-@endif libiberty
-@if libiberty-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif libiberty-bootstrap
-@if libiberty
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
@@ -18857,7 +23344,8 @@ configure-libiberty:
srcdiroption="--srcdir=$${topdir}/libiberty"; \
libsrcdir="$$s/libiberty"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif libiberty
@@ -18874,6 +23362,8 @@ configure-stage1-libiberty:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/libiberty ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
@@ -18885,8 +23375,10 @@ configure-stage1-libiberty:
srcdiroption="--srcdir=$${topdir}/libiberty"; \
libsrcdir="$$s/libiberty"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif libiberty-bootstrap
.PHONY: configure-stage2-libiberty maybe-configure-stage2-libiberty
@@ -18901,6 +23393,8 @@ configure-stage2-libiberty:
test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/libiberty ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
@@ -18912,7 +23406,9 @@ configure-stage2-libiberty:
srcdiroption="--srcdir=$${topdir}/libiberty"; \
libsrcdir="$$s/libiberty"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libiberty-bootstrap
@@ -18928,6 +23424,8 @@ configure-stage3-libiberty:
test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/libiberty ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
@@ -18939,7 +23437,9 @@ configure-stage3-libiberty:
srcdiroption="--srcdir=$${topdir}/libiberty"; \
libsrcdir="$$s/libiberty"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libiberty-bootstrap
@@ -18955,6 +23455,8 @@ configure-stage4-libiberty:
test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/libiberty ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
@@ -18966,7 +23468,9 @@ configure-stage4-libiberty:
srcdiroption="--srcdir=$${topdir}/libiberty"; \
libsrcdir="$$s/libiberty"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libiberty-bootstrap
@@ -18982,6 +23486,8 @@ configure-stageprofile-libiberty:
test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/libiberty ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
@@ -18993,7 +23499,9 @@ configure-stageprofile-libiberty:
srcdiroption="--srcdir=$${topdir}/libiberty"; \
libsrcdir="$$s/libiberty"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libiberty-bootstrap
@@ -19009,6 +23517,8 @@ configure-stagefeedback-libiberty:
test ! -f $(HOST_SUBDIR)/libiberty/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/libiberty ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/libiberty ; \
cd $(HOST_SUBDIR)/libiberty || exit 1; \
@@ -19020,7 +23530,9 @@ configure-stagefeedback-libiberty:
srcdiroption="--srcdir=$${topdir}/libiberty"; \
libsrcdir="$$s/libiberty"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif libiberty-bootstrap
@@ -19030,15 +23542,13 @@ configure-stagefeedback-libiberty:
.PHONY: all-libiberty maybe-all-libiberty
maybe-all-libiberty:
+@if gcc-bootstrap
+all-libiberty: stage_current
+@endif gcc-bootstrap
@if libiberty
TARGET-libiberty=all
maybe-all-libiberty: all-libiberty
all-libiberty: configure-libiberty
-@endif libiberty
-@if libiberty-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif libiberty-bootstrap
-@if libiberty
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -19062,18 +23572,22 @@ all-stage1-libiberty: configure-stage1-libiberty
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-libiberty)
maybe-clean-stage1-libiberty: clean-stage1-libiberty
clean-stage1: clean-stage1-libiberty
clean-stage1-libiberty:
- @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-libiberty/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-libiberty/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif libiberty-bootstrap
@@ -19092,19 +23606,23 @@ all-stage2-libiberty: configure-stage2-libiberty
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-libiberty)
maybe-clean-stage2-libiberty: clean-stage2-libiberty
clean-stage2: clean-stage2-libiberty
clean-stage2-libiberty:
- @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-libiberty/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-libiberty/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libiberty-bootstrap
@@ -19123,19 +23641,23 @@ all-stage3-libiberty: configure-stage3-libiberty
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-libiberty)
maybe-clean-stage3-libiberty: clean-stage3-libiberty
clean-stage3: clean-stage3-libiberty
clean-stage3-libiberty:
- @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-libiberty/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-libiberty/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libiberty-bootstrap
@@ -19154,19 +23676,23 @@ all-stage4-libiberty: configure-stage4-libiberty
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-libiberty)
maybe-clean-stage4-libiberty: clean-stage4-libiberty
clean-stage4: clean-stage4-libiberty
clean-stage4-libiberty:
- @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-libiberty/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-libiberty/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif libiberty-bootstrap
@@ -19185,19 +23711,23 @@ all-stageprofile-libiberty: configure-stageprofile-libiberty
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-libiberty)
maybe-clean-stageprofile-libiberty: clean-stageprofile-libiberty
clean-stageprofile: clean-stageprofile-libiberty
clean-stageprofile-libiberty:
- @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-libiberty/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-libiberty/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif libiberty-bootstrap
@@ -19216,19 +23746,23 @@ all-stagefeedback-libiberty: configure-stagefeedback-libiberty
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/libiberty && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-libiberty)
maybe-clean-stagefeedback-libiberty: clean-stagefeedback-libiberty
clean-stagefeedback: clean-stagefeedback-libiberty
clean-stagefeedback-libiberty:
- @[ -f $(HOST_SUBDIR)/libiberty/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-libiberty/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/libiberty/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-libiberty/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/libiberty && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif libiberty-bootstrap
@@ -19265,7 +23799,7 @@ install-libiberty: installdirs
@endif libiberty
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-libiberty info-libiberty
maybe-info-libiberty:
@@ -19317,6 +23851,31 @@ dvi-libiberty: \
@endif libiberty
+.PHONY: maybe-pdf-libiberty pdf-libiberty
+maybe-pdf-libiberty:
+@if libiberty
+maybe-pdf-libiberty: pdf-libiberty
+
+pdf-libiberty: \
+ configure-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libiberty" ; \
+ (cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif libiberty
+
.PHONY: maybe-html-libiberty html-libiberty
maybe-html-libiberty:
@if libiberty
@@ -19393,6 +23952,32 @@ install-info-libiberty: \
@endif libiberty
+.PHONY: maybe-install-pdf-libiberty install-pdf-libiberty
+maybe-install-pdf-libiberty:
+@if libiberty
+maybe-install-pdf-libiberty: install-pdf-libiberty
+
+install-pdf-libiberty: \
+ configure-libiberty \
+ pdf-libiberty
+ @[ -f ./libiberty/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in libiberty" ; \
+ (cd $(HOST_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif libiberty
+
.PHONY: maybe-install-html-libiberty install-html-libiberty
maybe-install-html-libiberty:
@if libiberty
@@ -19544,6 +24129,9 @@ maintainer-clean-libiberty:
.PHONY: configure-libtool maybe-configure-libtool
maybe-configure-libtool:
+@if gcc-bootstrap
+configure-libtool: stage_current
+@endif gcc-bootstrap
@if libtool
maybe-configure-libtool: configure-libtool
configure-libtool:
@@ -19563,7 +24151,8 @@ configure-libtool:
srcdiroption="--srcdir=$${topdir}/libtool"; \
libsrcdir="$$s/libtool"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif libtool
@@ -19573,6 +24162,9 @@ configure-libtool:
.PHONY: all-libtool maybe-all-libtool
maybe-all-libtool:
+@if gcc-bootstrap
+all-libtool: stage_current
+@endif gcc-bootstrap
@if libtool
TARGET-libtool=all
maybe-all-libtool: all-libtool
@@ -19618,7 +24210,7 @@ install-libtool: installdirs
@endif libtool
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-libtool info-libtool
maybe-info-libtool:
@@ -19672,6 +24264,32 @@ dvi-libtool: \
@endif libtool
+.PHONY: maybe-pdf-libtool pdf-libtool
+maybe-pdf-libtool:
+@if libtool
+maybe-pdf-libtool: pdf-libtool
+
+pdf-libtool: \
+ configure-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libtool" ; \
+ (cd $(HOST_SUBDIR)/libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif libtool
+
.PHONY: maybe-html-libtool html-libtool
maybe-html-libtool:
@if libtool
@@ -19751,6 +24369,33 @@ install-info-libtool: \
@endif libtool
+.PHONY: maybe-install-pdf-libtool install-pdf-libtool
+maybe-install-pdf-libtool:
+@if libtool
+maybe-install-pdf-libtool: install-pdf-libtool
+
+install-pdf-libtool: \
+ configure-libtool \
+ pdf-libtool
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtool/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in libtool" ; \
+ (cd $(HOST_SUBDIR)/libtool && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif libtool
+
.PHONY: maybe-install-html-libtool install-html-libtool
maybe-install-html-libtool:
@if libtool
@@ -19908,6 +24553,9 @@ maintainer-clean-libtool:
.PHONY: configure-m4 maybe-configure-m4
maybe-configure-m4:
+@if gcc-bootstrap
+configure-m4: stage_current
+@endif gcc-bootstrap
@if m4
maybe-configure-m4: configure-m4
configure-m4:
@@ -19927,7 +24575,8 @@ configure-m4:
srcdiroption="--srcdir=$${topdir}/m4"; \
libsrcdir="$$s/m4"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif m4
@@ -19937,6 +24586,9 @@ configure-m4:
.PHONY: all-m4 maybe-all-m4
maybe-all-m4:
+@if gcc-bootstrap
+all-m4: stage_current
+@endif gcc-bootstrap
@if m4
TARGET-m4=all
maybe-all-m4: all-m4
@@ -19982,7 +24634,7 @@ install-m4: installdirs
@endif m4
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-m4 info-m4
maybe-info-m4:
@@ -20036,6 +24688,32 @@ dvi-m4: \
@endif m4
+.PHONY: maybe-pdf-m4 pdf-m4
+maybe-pdf-m4:
+@if m4
+maybe-pdf-m4: pdf-m4
+
+pdf-m4: \
+ configure-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in m4" ; \
+ (cd $(HOST_SUBDIR)/m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif m4
+
.PHONY: maybe-html-m4 html-m4
maybe-html-m4:
@if m4
@@ -20115,6 +24793,33 @@ install-info-m4: \
@endif m4
+.PHONY: maybe-install-pdf-m4 install-pdf-m4
+maybe-install-pdf-m4:
+@if m4
+maybe-install-pdf-m4: install-pdf-m4
+
+install-pdf-m4: \
+ configure-m4 \
+ pdf-m4
+ @: $(MAKE); $(unstage)
+ @[ -f ./m4/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in m4" ; \
+ (cd $(HOST_SUBDIR)/m4 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif m4
+
.PHONY: maybe-install-html-m4 install-html-m4
maybe-install-html-m4:
@if m4
@@ -20272,6 +24977,9 @@ maintainer-clean-m4:
.PHONY: configure-make maybe-configure-make
maybe-configure-make:
+@if gcc-bootstrap
+configure-make: stage_current
+@endif gcc-bootstrap
@if make
maybe-configure-make: configure-make
configure-make:
@@ -20291,7 +24999,8 @@ configure-make:
srcdiroption="--srcdir=$${topdir}/make"; \
libsrcdir="$$s/make"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif make
@@ -20301,6 +25010,9 @@ configure-make:
.PHONY: all-make maybe-all-make
maybe-all-make:
+@if gcc-bootstrap
+all-make: stage_current
+@endif gcc-bootstrap
@if make
TARGET-make=all
maybe-all-make: all-make
@@ -20346,7 +25058,7 @@ install-make: installdirs
@endif make
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-make info-make
maybe-info-make:
@@ -20400,6 +25112,32 @@ dvi-make: \
@endif make
+.PHONY: maybe-pdf-make pdf-make
+maybe-pdf-make:
+@if make
+maybe-pdf-make: pdf-make
+
+pdf-make: \
+ configure-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in make" ; \
+ (cd $(HOST_SUBDIR)/make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif make
+
.PHONY: maybe-html-make html-make
maybe-html-make:
@if make
@@ -20479,6 +25217,33 @@ install-info-make: \
@endif make
+.PHONY: maybe-install-pdf-make install-pdf-make
+maybe-install-pdf-make:
+@if make
+maybe-install-pdf-make: install-pdf-make
+
+install-pdf-make: \
+ configure-make \
+ pdf-make
+ @: $(MAKE); $(unstage)
+ @[ -f ./make/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in make" ; \
+ (cd $(HOST_SUBDIR)/make && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif make
+
.PHONY: maybe-install-html-make install-html-make
maybe-install-html-make:
@if make
@@ -20636,6 +25401,9 @@ maintainer-clean-make:
.PHONY: configure-mmalloc maybe-configure-mmalloc
maybe-configure-mmalloc:
+@if gcc-bootstrap
+configure-mmalloc: stage_current
+@endif gcc-bootstrap
@if mmalloc
maybe-configure-mmalloc: configure-mmalloc
configure-mmalloc:
@@ -20655,7 +25423,8 @@ configure-mmalloc:
srcdiroption="--srcdir=$${topdir}/mmalloc"; \
libsrcdir="$$s/mmalloc"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif mmalloc
@@ -20665,6 +25434,9 @@ configure-mmalloc:
.PHONY: all-mmalloc maybe-all-mmalloc
maybe-all-mmalloc:
+@if gcc-bootstrap
+all-mmalloc: stage_current
+@endif gcc-bootstrap
@if mmalloc
TARGET-mmalloc=all
maybe-all-mmalloc: all-mmalloc
@@ -20704,7 +25476,7 @@ install-mmalloc: installdirs
@endif mmalloc
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-mmalloc info-mmalloc
maybe-info-mmalloc:
@@ -20758,6 +25530,32 @@ dvi-mmalloc: \
@endif mmalloc
+.PHONY: maybe-pdf-mmalloc pdf-mmalloc
+maybe-pdf-mmalloc:
+@if mmalloc
+maybe-pdf-mmalloc: pdf-mmalloc
+
+pdf-mmalloc: \
+ configure-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in mmalloc" ; \
+ (cd $(HOST_SUBDIR)/mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif mmalloc
+
.PHONY: maybe-html-mmalloc html-mmalloc
maybe-html-mmalloc:
@if mmalloc
@@ -20837,6 +25635,33 @@ install-info-mmalloc: \
@endif mmalloc
+.PHONY: maybe-install-pdf-mmalloc install-pdf-mmalloc
+maybe-install-pdf-mmalloc:
+@if mmalloc
+maybe-install-pdf-mmalloc: install-pdf-mmalloc
+
+install-pdf-mmalloc: \
+ configure-mmalloc \
+ pdf-mmalloc
+ @: $(MAKE); $(unstage)
+ @[ -f ./mmalloc/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in mmalloc" ; \
+ (cd $(HOST_SUBDIR)/mmalloc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif mmalloc
+
.PHONY: maybe-install-html-mmalloc install-html-mmalloc
maybe-install-html-mmalloc:
@if mmalloc
@@ -20994,6 +25819,9 @@ maintainer-clean-mmalloc:
.PHONY: configure-patch maybe-configure-patch
maybe-configure-patch:
+@if gcc-bootstrap
+configure-patch: stage_current
+@endif gcc-bootstrap
@if patch
maybe-configure-patch: configure-patch
configure-patch:
@@ -21013,7 +25841,8 @@ configure-patch:
srcdiroption="--srcdir=$${topdir}/patch"; \
libsrcdir="$$s/patch"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif patch
@@ -21023,6 +25852,9 @@ configure-patch:
.PHONY: all-patch maybe-all-patch
maybe-all-patch:
+@if gcc-bootstrap
+all-patch: stage_current
+@endif gcc-bootstrap
@if patch
TARGET-patch=all
maybe-all-patch: all-patch
@@ -21068,7 +25900,7 @@ install-patch: installdirs
@endif patch
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-patch info-patch
maybe-info-patch:
@@ -21122,6 +25954,32 @@ dvi-patch: \
@endif patch
+.PHONY: maybe-pdf-patch pdf-patch
+maybe-pdf-patch:
+@if patch
+maybe-pdf-patch: pdf-patch
+
+pdf-patch: \
+ configure-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in patch" ; \
+ (cd $(HOST_SUBDIR)/patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif patch
+
.PHONY: maybe-html-patch html-patch
maybe-html-patch:
@if patch
@@ -21201,6 +26059,33 @@ install-info-patch: \
@endif patch
+.PHONY: maybe-install-pdf-patch install-pdf-patch
+maybe-install-pdf-patch:
+@if patch
+maybe-install-pdf-patch: install-pdf-patch
+
+install-pdf-patch: \
+ configure-patch \
+ pdf-patch
+ @: $(MAKE); $(unstage)
+ @[ -f ./patch/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in patch" ; \
+ (cd $(HOST_SUBDIR)/patch && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif patch
+
.PHONY: maybe-install-html-patch install-html-patch
maybe-install-html-patch:
@if patch
@@ -21358,6 +26243,9 @@ maintainer-clean-patch:
.PHONY: configure-perl maybe-configure-perl
maybe-configure-perl:
+@if gcc-bootstrap
+configure-perl: stage_current
+@endif gcc-bootstrap
@if perl
maybe-configure-perl: configure-perl
configure-perl:
@@ -21377,7 +26265,8 @@ configure-perl:
srcdiroption="--srcdir=$${topdir}/perl"; \
libsrcdir="$$s/perl"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif perl
@@ -21387,6 +26276,9 @@ configure-perl:
.PHONY: all-perl maybe-all-perl
maybe-all-perl:
+@if gcc-bootstrap
+all-perl: stage_current
+@endif gcc-bootstrap
@if perl
TARGET-perl=all
maybe-all-perl: all-perl
@@ -21432,7 +26324,7 @@ install-perl: installdirs
@endif perl
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-perl info-perl
maybe-info-perl:
@@ -21486,6 +26378,32 @@ dvi-perl: \
@endif perl
+.PHONY: maybe-pdf-perl pdf-perl
+maybe-pdf-perl:
+@if perl
+maybe-pdf-perl: pdf-perl
+
+pdf-perl: \
+ configure-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in perl" ; \
+ (cd $(HOST_SUBDIR)/perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif perl
+
.PHONY: maybe-html-perl html-perl
maybe-html-perl:
@if perl
@@ -21565,6 +26483,33 @@ install-info-perl: \
@endif perl
+.PHONY: maybe-install-pdf-perl install-pdf-perl
+maybe-install-pdf-perl:
+@if perl
+maybe-install-pdf-perl: install-pdf-perl
+
+install-pdf-perl: \
+ configure-perl \
+ pdf-perl
+ @: $(MAKE); $(unstage)
+ @[ -f ./perl/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in perl" ; \
+ (cd $(HOST_SUBDIR)/perl && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif perl
+
.PHONY: maybe-install-html-perl install-html-perl
maybe-install-html-perl:
@if perl
@@ -21722,6 +26667,9 @@ maintainer-clean-perl:
.PHONY: configure-prms maybe-configure-prms
maybe-configure-prms:
+@if gcc-bootstrap
+configure-prms: stage_current
+@endif gcc-bootstrap
@if prms
maybe-configure-prms: configure-prms
configure-prms:
@@ -21741,7 +26689,8 @@ configure-prms:
srcdiroption="--srcdir=$${topdir}/prms"; \
libsrcdir="$$s/prms"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif prms
@@ -21751,6 +26700,9 @@ configure-prms:
.PHONY: all-prms maybe-all-prms
maybe-all-prms:
+@if gcc-bootstrap
+all-prms: stage_current
+@endif gcc-bootstrap
@if prms
TARGET-prms=all
maybe-all-prms: all-prms
@@ -21796,7 +26748,7 @@ install-prms: installdirs
@endif prms
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-prms info-prms
maybe-info-prms:
@@ -21850,6 +26802,32 @@ dvi-prms: \
@endif prms
+.PHONY: maybe-pdf-prms pdf-prms
+maybe-pdf-prms:
+@if prms
+maybe-pdf-prms: pdf-prms
+
+pdf-prms: \
+ configure-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in prms" ; \
+ (cd $(HOST_SUBDIR)/prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif prms
+
.PHONY: maybe-html-prms html-prms
maybe-html-prms:
@if prms
@@ -21929,6 +26907,33 @@ install-info-prms: \
@endif prms
+.PHONY: maybe-install-pdf-prms install-pdf-prms
+maybe-install-pdf-prms:
+@if prms
+maybe-install-pdf-prms: install-pdf-prms
+
+install-pdf-prms: \
+ configure-prms \
+ pdf-prms
+ @: $(MAKE); $(unstage)
+ @[ -f ./prms/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in prms" ; \
+ (cd $(HOST_SUBDIR)/prms && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif prms
+
.PHONY: maybe-install-html-prms install-html-prms
maybe-install-html-prms:
@if prms
@@ -22086,6 +27091,9 @@ maintainer-clean-prms:
.PHONY: configure-rcs maybe-configure-rcs
maybe-configure-rcs:
+@if gcc-bootstrap
+configure-rcs: stage_current
+@endif gcc-bootstrap
@if rcs
maybe-configure-rcs: configure-rcs
configure-rcs:
@@ -22105,7 +27113,8 @@ configure-rcs:
srcdiroption="--srcdir=$${topdir}/rcs"; \
libsrcdir="$$s/rcs"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif rcs
@@ -22115,6 +27124,9 @@ configure-rcs:
.PHONY: all-rcs maybe-all-rcs
maybe-all-rcs:
+@if gcc-bootstrap
+all-rcs: stage_current
+@endif gcc-bootstrap
@if rcs
TARGET-rcs=all
maybe-all-rcs: all-rcs
@@ -22160,7 +27172,7 @@ install-rcs: installdirs
@endif rcs
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-rcs info-rcs
maybe-info-rcs:
@@ -22214,6 +27226,32 @@ dvi-rcs: \
@endif rcs
+.PHONY: maybe-pdf-rcs pdf-rcs
+maybe-pdf-rcs:
+@if rcs
+maybe-pdf-rcs: pdf-rcs
+
+pdf-rcs: \
+ configure-rcs
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in rcs" ; \
+ (cd $(HOST_SUBDIR)/rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif rcs
+
.PHONY: maybe-html-rcs html-rcs
maybe-html-rcs:
@if rcs
@@ -22293,6 +27331,33 @@ install-info-rcs: \
@endif rcs
+.PHONY: maybe-install-pdf-rcs install-pdf-rcs
+maybe-install-pdf-rcs:
+@if rcs
+maybe-install-pdf-rcs: install-pdf-rcs
+
+install-pdf-rcs: \
+ configure-rcs \
+ pdf-rcs
+ @: $(MAKE); $(unstage)
+ @[ -f ./rcs/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in rcs" ; \
+ (cd $(HOST_SUBDIR)/rcs && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif rcs
+
.PHONY: maybe-install-html-rcs install-html-rcs
maybe-install-html-rcs:
@if rcs
@@ -22450,6 +27515,9 @@ maintainer-clean-rcs:
.PHONY: configure-readline maybe-configure-readline
maybe-configure-readline:
+@if gcc-bootstrap
+configure-readline: stage_current
+@endif gcc-bootstrap
@if readline
maybe-configure-readline: configure-readline
configure-readline:
@@ -22469,7 +27537,8 @@ configure-readline:
srcdiroption="--srcdir=$${topdir}/readline"; \
libsrcdir="$$s/readline"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif readline
@@ -22479,6 +27548,9 @@ configure-readline:
.PHONY: all-readline maybe-all-readline
maybe-all-readline:
+@if gcc-bootstrap
+all-readline: stage_current
+@endif gcc-bootstrap
@if readline
TARGET-readline=all
maybe-all-readline: all-readline
@@ -22524,7 +27596,7 @@ install-readline: installdirs
@endif readline
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-readline info-readline
maybe-info-readline:
@@ -22578,6 +27650,32 @@ dvi-readline: \
@endif readline
+.PHONY: maybe-pdf-readline pdf-readline
+maybe-pdf-readline:
+@if readline
+maybe-pdf-readline: pdf-readline
+
+pdf-readline: \
+ configure-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in readline" ; \
+ (cd $(HOST_SUBDIR)/readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif readline
+
.PHONY: maybe-html-readline html-readline
maybe-html-readline:
@if readline
@@ -22657,6 +27755,33 @@ install-info-readline: \
@endif readline
+.PHONY: maybe-install-pdf-readline install-pdf-readline
+maybe-install-pdf-readline:
+@if readline
+maybe-install-pdf-readline: install-pdf-readline
+
+install-pdf-readline: \
+ configure-readline \
+ pdf-readline
+ @: $(MAKE); $(unstage)
+ @[ -f ./readline/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in readline" ; \
+ (cd $(HOST_SUBDIR)/readline && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif readline
+
.PHONY: maybe-install-html-readline install-html-readline
maybe-install-html-readline:
@if readline
@@ -22814,6 +27939,9 @@ maintainer-clean-readline:
.PHONY: configure-release maybe-configure-release
maybe-configure-release:
+@if gcc-bootstrap
+configure-release: stage_current
+@endif gcc-bootstrap
@if release
maybe-configure-release: configure-release
configure-release:
@@ -22833,7 +27961,8 @@ configure-release:
srcdiroption="--srcdir=$${topdir}/release"; \
libsrcdir="$$s/release"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif release
@@ -22843,6 +27972,9 @@ configure-release:
.PHONY: all-release maybe-all-release
maybe-all-release:
+@if gcc-bootstrap
+all-release: stage_current
+@endif gcc-bootstrap
@if release
TARGET-release=all
maybe-all-release: all-release
@@ -22876,7 +28008,7 @@ install-release:
@endif release
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-release info-release
maybe-info-release:
@@ -22930,6 +28062,32 @@ dvi-release: \
@endif release
+.PHONY: maybe-pdf-release pdf-release
+maybe-pdf-release:
+@if release
+maybe-pdf-release: pdf-release
+
+pdf-release: \
+ configure-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in release" ; \
+ (cd $(HOST_SUBDIR)/release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif release
+
.PHONY: maybe-html-release html-release
maybe-html-release:
@if release
@@ -23009,6 +28167,33 @@ install-info-release: \
@endif release
+.PHONY: maybe-install-pdf-release install-pdf-release
+maybe-install-pdf-release:
+@if release
+maybe-install-pdf-release: install-pdf-release
+
+install-pdf-release: \
+ configure-release \
+ pdf-release
+ @: $(MAKE); $(unstage)
+ @[ -f ./release/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in release" ; \
+ (cd $(HOST_SUBDIR)/release && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif release
+
.PHONY: maybe-install-html-release install-html-release
maybe-install-html-release:
@if release
@@ -23166,6 +28351,9 @@ maintainer-clean-release:
.PHONY: configure-recode maybe-configure-recode
maybe-configure-recode:
+@if gcc-bootstrap
+configure-recode: stage_current
+@endif gcc-bootstrap
@if recode
maybe-configure-recode: configure-recode
configure-recode:
@@ -23185,7 +28373,8 @@ configure-recode:
srcdiroption="--srcdir=$${topdir}/recode"; \
libsrcdir="$$s/recode"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif recode
@@ -23195,6 +28384,9 @@ configure-recode:
.PHONY: all-recode maybe-all-recode
maybe-all-recode:
+@if gcc-bootstrap
+all-recode: stage_current
+@endif gcc-bootstrap
@if recode
TARGET-recode=all
maybe-all-recode: all-recode
@@ -23240,7 +28432,7 @@ install-recode: installdirs
@endif recode
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-recode info-recode
maybe-info-recode:
@@ -23294,6 +28486,32 @@ dvi-recode: \
@endif recode
+.PHONY: maybe-pdf-recode pdf-recode
+maybe-pdf-recode:
+@if recode
+maybe-pdf-recode: pdf-recode
+
+pdf-recode: \
+ configure-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in recode" ; \
+ (cd $(HOST_SUBDIR)/recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif recode
+
.PHONY: maybe-html-recode html-recode
maybe-html-recode:
@if recode
@@ -23373,6 +28591,33 @@ install-info-recode: \
@endif recode
+.PHONY: maybe-install-pdf-recode install-pdf-recode
+maybe-install-pdf-recode:
+@if recode
+maybe-install-pdf-recode: install-pdf-recode
+
+install-pdf-recode: \
+ configure-recode \
+ pdf-recode
+ @: $(MAKE); $(unstage)
+ @[ -f ./recode/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in recode" ; \
+ (cd $(HOST_SUBDIR)/recode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif recode
+
.PHONY: maybe-install-html-recode install-html-recode
maybe-install-html-recode:
@if recode
@@ -23530,6 +28775,9 @@ maintainer-clean-recode:
.PHONY: configure-sed maybe-configure-sed
maybe-configure-sed:
+@if gcc-bootstrap
+configure-sed: stage_current
+@endif gcc-bootstrap
@if sed
maybe-configure-sed: configure-sed
configure-sed:
@@ -23549,7 +28797,8 @@ configure-sed:
srcdiroption="--srcdir=$${topdir}/sed"; \
libsrcdir="$$s/sed"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif sed
@@ -23559,6 +28808,9 @@ configure-sed:
.PHONY: all-sed maybe-all-sed
maybe-all-sed:
+@if gcc-bootstrap
+all-sed: stage_current
+@endif gcc-bootstrap
@if sed
TARGET-sed=all
maybe-all-sed: all-sed
@@ -23604,7 +28856,7 @@ install-sed: installdirs
@endif sed
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-sed info-sed
maybe-info-sed:
@@ -23658,6 +28910,32 @@ dvi-sed: \
@endif sed
+.PHONY: maybe-pdf-sed pdf-sed
+maybe-pdf-sed:
+@if sed
+maybe-pdf-sed: pdf-sed
+
+pdf-sed: \
+ configure-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in sed" ; \
+ (cd $(HOST_SUBDIR)/sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif sed
+
.PHONY: maybe-html-sed html-sed
maybe-html-sed:
@if sed
@@ -23737,6 +29015,33 @@ install-info-sed: \
@endif sed
+.PHONY: maybe-install-pdf-sed install-pdf-sed
+maybe-install-pdf-sed:
+@if sed
+maybe-install-pdf-sed: install-pdf-sed
+
+install-pdf-sed: \
+ configure-sed \
+ pdf-sed
+ @: $(MAKE); $(unstage)
+ @[ -f ./sed/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in sed" ; \
+ (cd $(HOST_SUBDIR)/sed && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif sed
+
.PHONY: maybe-install-html-sed install-html-sed
maybe-install-html-sed:
@if sed
@@ -23894,6 +29199,9 @@ maintainer-clean-sed:
.PHONY: configure-send-pr maybe-configure-send-pr
maybe-configure-send-pr:
+@if gcc-bootstrap
+configure-send-pr: stage_current
+@endif gcc-bootstrap
@if send-pr
maybe-configure-send-pr: configure-send-pr
configure-send-pr:
@@ -23913,7 +29221,8 @@ configure-send-pr:
srcdiroption="--srcdir=$${topdir}/send-pr"; \
libsrcdir="$$s/send-pr"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif send-pr
@@ -23923,6 +29232,9 @@ configure-send-pr:
.PHONY: all-send-pr maybe-all-send-pr
maybe-all-send-pr:
+@if gcc-bootstrap
+all-send-pr: stage_current
+@endif gcc-bootstrap
@if send-pr
TARGET-send-pr=all
maybe-all-send-pr: all-send-pr
@@ -23968,7 +29280,7 @@ install-send-pr: installdirs
@endif send-pr
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-send-pr info-send-pr
maybe-info-send-pr:
@@ -24022,6 +29334,32 @@ dvi-send-pr: \
@endif send-pr
+.PHONY: maybe-pdf-send-pr pdf-send-pr
+maybe-pdf-send-pr:
+@if send-pr
+maybe-pdf-send-pr: pdf-send-pr
+
+pdf-send-pr: \
+ configure-send-pr
+ @: $(MAKE); $(unstage)
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in send-pr" ; \
+ (cd $(HOST_SUBDIR)/send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif send-pr
+
.PHONY: maybe-html-send-pr html-send-pr
maybe-html-send-pr:
@if send-pr
@@ -24101,6 +29439,33 @@ install-info-send-pr: \
@endif send-pr
+.PHONY: maybe-install-pdf-send-pr install-pdf-send-pr
+maybe-install-pdf-send-pr:
+@if send-pr
+maybe-install-pdf-send-pr: install-pdf-send-pr
+
+install-pdf-send-pr: \
+ configure-send-pr \
+ pdf-send-pr
+ @: $(MAKE); $(unstage)
+ @[ -f ./send-pr/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in send-pr" ; \
+ (cd $(HOST_SUBDIR)/send-pr && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif send-pr
+
.PHONY: maybe-install-html-send-pr install-html-send-pr
maybe-install-html-send-pr:
@if send-pr
@@ -24258,6 +29623,9 @@ maintainer-clean-send-pr:
.PHONY: configure-shellutils maybe-configure-shellutils
maybe-configure-shellutils:
+@if gcc-bootstrap
+configure-shellutils: stage_current
+@endif gcc-bootstrap
@if shellutils
maybe-configure-shellutils: configure-shellutils
configure-shellutils:
@@ -24277,7 +29645,8 @@ configure-shellutils:
srcdiroption="--srcdir=$${topdir}/shellutils"; \
libsrcdir="$$s/shellutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif shellutils
@@ -24287,6 +29656,9 @@ configure-shellutils:
.PHONY: all-shellutils maybe-all-shellutils
maybe-all-shellutils:
+@if gcc-bootstrap
+all-shellutils: stage_current
+@endif gcc-bootstrap
@if shellutils
TARGET-shellutils=all
maybe-all-shellutils: all-shellutils
@@ -24332,7 +29704,7 @@ install-shellutils: installdirs
@endif shellutils
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-shellutils info-shellutils
maybe-info-shellutils:
@@ -24386,6 +29758,32 @@ dvi-shellutils: \
@endif shellutils
+.PHONY: maybe-pdf-shellutils pdf-shellutils
+maybe-pdf-shellutils:
+@if shellutils
+maybe-pdf-shellutils: pdf-shellutils
+
+pdf-shellutils: \
+ configure-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in shellutils" ; \
+ (cd $(HOST_SUBDIR)/shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif shellutils
+
.PHONY: maybe-html-shellutils html-shellutils
maybe-html-shellutils:
@if shellutils
@@ -24465,6 +29863,33 @@ install-info-shellutils: \
@endif shellutils
+.PHONY: maybe-install-pdf-shellutils install-pdf-shellutils
+maybe-install-pdf-shellutils:
+@if shellutils
+maybe-install-pdf-shellutils: install-pdf-shellutils
+
+install-pdf-shellutils: \
+ configure-shellutils \
+ pdf-shellutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./shellutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in shellutils" ; \
+ (cd $(HOST_SUBDIR)/shellutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif shellutils
+
.PHONY: maybe-install-html-shellutils install-html-shellutils
maybe-install-html-shellutils:
@if shellutils
@@ -24622,6 +30047,9 @@ maintainer-clean-shellutils:
.PHONY: configure-sid maybe-configure-sid
maybe-configure-sid:
+@if gcc-bootstrap
+configure-sid: stage_current
+@endif gcc-bootstrap
@if sid
maybe-configure-sid: configure-sid
configure-sid:
@@ -24641,7 +30069,8 @@ configure-sid:
srcdiroption="--srcdir=$${topdir}/sid"; \
libsrcdir="$$s/sid"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif sid
@@ -24651,6 +30080,9 @@ configure-sid:
.PHONY: all-sid maybe-all-sid
maybe-all-sid:
+@if gcc-bootstrap
+all-sid: stage_current
+@endif gcc-bootstrap
@if sid
TARGET-sid=all
maybe-all-sid: all-sid
@@ -24696,7 +30128,7 @@ install-sid: installdirs
@endif sid
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-sid info-sid
maybe-info-sid:
@@ -24750,6 +30182,32 @@ dvi-sid: \
@endif sid
+.PHONY: maybe-pdf-sid pdf-sid
+maybe-pdf-sid:
+@if sid
+maybe-pdf-sid: pdf-sid
+
+pdf-sid: \
+ configure-sid
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in sid" ; \
+ (cd $(HOST_SUBDIR)/sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif sid
+
.PHONY: maybe-html-sid html-sid
maybe-html-sid:
@if sid
@@ -24829,6 +30287,33 @@ install-info-sid: \
@endif sid
+.PHONY: maybe-install-pdf-sid install-pdf-sid
+maybe-install-pdf-sid:
+@if sid
+maybe-install-pdf-sid: install-pdf-sid
+
+install-pdf-sid: \
+ configure-sid \
+ pdf-sid
+ @: $(MAKE); $(unstage)
+ @[ -f ./sid/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in sid" ; \
+ (cd $(HOST_SUBDIR)/sid && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif sid
+
.PHONY: maybe-install-html-sid install-html-sid
maybe-install-html-sid:
@if sid
@@ -24986,6 +30471,9 @@ maintainer-clean-sid:
.PHONY: configure-sim maybe-configure-sim
maybe-configure-sim:
+@if gcc-bootstrap
+configure-sim: stage_current
+@endif gcc-bootstrap
@if sim
maybe-configure-sim: configure-sim
configure-sim:
@@ -25005,7 +30493,8 @@ configure-sim:
srcdiroption="--srcdir=$${topdir}/sim"; \
libsrcdir="$$s/sim"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif sim
@@ -25015,6 +30504,9 @@ configure-sim:
.PHONY: all-sim maybe-all-sim
maybe-all-sim:
+@if gcc-bootstrap
+all-sim: stage_current
+@endif gcc-bootstrap
@if sim
TARGET-sim=all
maybe-all-sim: all-sim
@@ -25060,7 +30552,7 @@ install-sim: installdirs
@endif sim
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-sim info-sim
maybe-info-sim:
@@ -25114,6 +30606,32 @@ dvi-sim: \
@endif sim
+.PHONY: maybe-pdf-sim pdf-sim
+maybe-pdf-sim:
+@if sim
+maybe-pdf-sim: pdf-sim
+
+pdf-sim: \
+ configure-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in sim" ; \
+ (cd $(HOST_SUBDIR)/sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif sim
+
.PHONY: maybe-html-sim html-sim
maybe-html-sim:
@if sim
@@ -25193,6 +30711,33 @@ install-info-sim: \
@endif sim
+.PHONY: maybe-install-pdf-sim install-pdf-sim
+maybe-install-pdf-sim:
+@if sim
+maybe-install-pdf-sim: install-pdf-sim
+
+install-pdf-sim: \
+ configure-sim \
+ pdf-sim
+ @: $(MAKE); $(unstage)
+ @[ -f ./sim/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in sim" ; \
+ (cd $(HOST_SUBDIR)/sim && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif sim
+
.PHONY: maybe-install-html-sim install-html-sim
maybe-install-html-sim:
@if sim
@@ -25350,6 +30895,9 @@ maintainer-clean-sim:
.PHONY: configure-tar maybe-configure-tar
maybe-configure-tar:
+@if gcc-bootstrap
+configure-tar: stage_current
+@endif gcc-bootstrap
@if tar
maybe-configure-tar: configure-tar
configure-tar:
@@ -25369,7 +30917,8 @@ configure-tar:
srcdiroption="--srcdir=$${topdir}/tar"; \
libsrcdir="$$s/tar"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif tar
@@ -25379,6 +30928,9 @@ configure-tar:
.PHONY: all-tar maybe-all-tar
maybe-all-tar:
+@if gcc-bootstrap
+all-tar: stage_current
+@endif gcc-bootstrap
@if tar
TARGET-tar=all
maybe-all-tar: all-tar
@@ -25424,7 +30976,7 @@ install-tar: installdirs
@endif tar
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-tar info-tar
maybe-info-tar:
@@ -25478,6 +31030,32 @@ dvi-tar: \
@endif tar
+.PHONY: maybe-pdf-tar pdf-tar
+maybe-pdf-tar:
+@if tar
+maybe-pdf-tar: pdf-tar
+
+pdf-tar: \
+ configure-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in tar" ; \
+ (cd $(HOST_SUBDIR)/tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif tar
+
.PHONY: maybe-html-tar html-tar
maybe-html-tar:
@if tar
@@ -25557,6 +31135,33 @@ install-info-tar: \
@endif tar
+.PHONY: maybe-install-pdf-tar install-pdf-tar
+maybe-install-pdf-tar:
+@if tar
+maybe-install-pdf-tar: install-pdf-tar
+
+install-pdf-tar: \
+ configure-tar \
+ pdf-tar
+ @: $(MAKE); $(unstage)
+ @[ -f ./tar/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in tar" ; \
+ (cd $(HOST_SUBDIR)/tar && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif tar
+
.PHONY: maybe-install-html-tar install-html-tar
maybe-install-html-tar:
@if tar
@@ -25714,6 +31319,9 @@ maintainer-clean-tar:
.PHONY: configure-texinfo maybe-configure-texinfo
maybe-configure-texinfo:
+@if gcc-bootstrap
+configure-texinfo: stage_current
+@endif gcc-bootstrap
@if texinfo
maybe-configure-texinfo: configure-texinfo
configure-texinfo:
@@ -25733,7 +31341,8 @@ configure-texinfo:
srcdiroption="--srcdir=$${topdir}/texinfo"; \
libsrcdir="$$s/texinfo"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif texinfo
@@ -25743,6 +31352,9 @@ configure-texinfo:
.PHONY: all-texinfo maybe-all-texinfo
maybe-all-texinfo:
+@if gcc-bootstrap
+all-texinfo: stage_current
+@endif gcc-bootstrap
@if texinfo
TARGET-texinfo=all
maybe-all-texinfo: all-texinfo
@@ -25782,7 +31394,7 @@ install-texinfo:
@endif texinfo
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-texinfo info-texinfo
maybe-info-texinfo:
@@ -25836,6 +31448,32 @@ dvi-texinfo: \
@endif texinfo
+.PHONY: maybe-pdf-texinfo pdf-texinfo
+maybe-pdf-texinfo:
+@if texinfo
+maybe-pdf-texinfo: pdf-texinfo
+
+pdf-texinfo: \
+ configure-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in texinfo" ; \
+ (cd $(HOST_SUBDIR)/texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif texinfo
+
.PHONY: maybe-html-texinfo html-texinfo
maybe-html-texinfo:
@if texinfo
@@ -25915,6 +31553,33 @@ install-info-texinfo: \
@endif texinfo
+.PHONY: maybe-install-pdf-texinfo install-pdf-texinfo
+maybe-install-pdf-texinfo:
+@if texinfo
+maybe-install-pdf-texinfo: install-pdf-texinfo
+
+install-pdf-texinfo: \
+ configure-texinfo \
+ pdf-texinfo
+ @: $(MAKE); $(unstage)
+ @[ -f ./texinfo/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in texinfo" ; \
+ (cd $(HOST_SUBDIR)/texinfo && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif texinfo
+
.PHONY: maybe-install-html-texinfo install-html-texinfo
maybe-install-html-texinfo:
@if texinfo
@@ -26072,6 +31737,9 @@ maintainer-clean-texinfo:
.PHONY: configure-textutils maybe-configure-textutils
maybe-configure-textutils:
+@if gcc-bootstrap
+configure-textutils: stage_current
+@endif gcc-bootstrap
@if textutils
maybe-configure-textutils: configure-textutils
configure-textutils:
@@ -26091,7 +31759,8 @@ configure-textutils:
srcdiroption="--srcdir=$${topdir}/textutils"; \
libsrcdir="$$s/textutils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif textutils
@@ -26101,6 +31770,9 @@ configure-textutils:
.PHONY: all-textutils maybe-all-textutils
maybe-all-textutils:
+@if gcc-bootstrap
+all-textutils: stage_current
+@endif gcc-bootstrap
@if textutils
TARGET-textutils=all
maybe-all-textutils: all-textutils
@@ -26146,7 +31818,7 @@ install-textutils: installdirs
@endif textutils
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-textutils info-textutils
maybe-info-textutils:
@@ -26200,6 +31872,32 @@ dvi-textutils: \
@endif textutils
+.PHONY: maybe-pdf-textutils pdf-textutils
+maybe-pdf-textutils:
+@if textutils
+maybe-pdf-textutils: pdf-textutils
+
+pdf-textutils: \
+ configure-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in textutils" ; \
+ (cd $(HOST_SUBDIR)/textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif textutils
+
.PHONY: maybe-html-textutils html-textutils
maybe-html-textutils:
@if textutils
@@ -26279,6 +31977,33 @@ install-info-textutils: \
@endif textutils
+.PHONY: maybe-install-pdf-textutils install-pdf-textutils
+maybe-install-pdf-textutils:
+@if textutils
+maybe-install-pdf-textutils: install-pdf-textutils
+
+install-pdf-textutils: \
+ configure-textutils \
+ pdf-textutils
+ @: $(MAKE); $(unstage)
+ @[ -f ./textutils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in textutils" ; \
+ (cd $(HOST_SUBDIR)/textutils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif textutils
+
.PHONY: maybe-install-html-textutils install-html-textutils
maybe-install-html-textutils:
@if textutils
@@ -26436,6 +32161,9 @@ maintainer-clean-textutils:
.PHONY: configure-time maybe-configure-time
maybe-configure-time:
+@if gcc-bootstrap
+configure-time: stage_current
+@endif gcc-bootstrap
@if time
maybe-configure-time: configure-time
configure-time:
@@ -26455,7 +32183,8 @@ configure-time:
srcdiroption="--srcdir=$${topdir}/time"; \
libsrcdir="$$s/time"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif time
@@ -26465,6 +32194,9 @@ configure-time:
.PHONY: all-time maybe-all-time
maybe-all-time:
+@if gcc-bootstrap
+all-time: stage_current
+@endif gcc-bootstrap
@if time
TARGET-time=all
maybe-all-time: all-time
@@ -26510,7 +32242,7 @@ install-time: installdirs
@endif time
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-time info-time
maybe-info-time:
@@ -26564,6 +32296,32 @@ dvi-time: \
@endif time
+.PHONY: maybe-pdf-time pdf-time
+maybe-pdf-time:
+@if time
+maybe-pdf-time: pdf-time
+
+pdf-time: \
+ configure-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in time" ; \
+ (cd $(HOST_SUBDIR)/time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif time
+
.PHONY: maybe-html-time html-time
maybe-html-time:
@if time
@@ -26643,6 +32401,33 @@ install-info-time: \
@endif time
+.PHONY: maybe-install-pdf-time install-pdf-time
+maybe-install-pdf-time:
+@if time
+maybe-install-pdf-time: install-pdf-time
+
+install-pdf-time: \
+ configure-time \
+ pdf-time
+ @: $(MAKE); $(unstage)
+ @[ -f ./time/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in time" ; \
+ (cd $(HOST_SUBDIR)/time && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif time
+
.PHONY: maybe-install-html-time install-html-time
maybe-install-html-time:
@if time
@@ -26800,6 +32585,9 @@ maintainer-clean-time:
.PHONY: configure-uudecode maybe-configure-uudecode
maybe-configure-uudecode:
+@if gcc-bootstrap
+configure-uudecode: stage_current
+@endif gcc-bootstrap
@if uudecode
maybe-configure-uudecode: configure-uudecode
configure-uudecode:
@@ -26819,7 +32607,8 @@ configure-uudecode:
srcdiroption="--srcdir=$${topdir}/uudecode"; \
libsrcdir="$$s/uudecode"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif uudecode
@@ -26829,6 +32618,9 @@ configure-uudecode:
.PHONY: all-uudecode maybe-all-uudecode
maybe-all-uudecode:
+@if gcc-bootstrap
+all-uudecode: stage_current
+@endif gcc-bootstrap
@if uudecode
TARGET-uudecode=all
maybe-all-uudecode: all-uudecode
@@ -26874,7 +32666,7 @@ install-uudecode: installdirs
@endif uudecode
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-uudecode info-uudecode
maybe-info-uudecode:
@@ -26928,6 +32720,32 @@ dvi-uudecode: \
@endif uudecode
+.PHONY: maybe-pdf-uudecode pdf-uudecode
+maybe-pdf-uudecode:
+@if uudecode
+maybe-pdf-uudecode: pdf-uudecode
+
+pdf-uudecode: \
+ configure-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in uudecode" ; \
+ (cd $(HOST_SUBDIR)/uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif uudecode
+
.PHONY: maybe-html-uudecode html-uudecode
maybe-html-uudecode:
@if uudecode
@@ -27007,6 +32825,33 @@ install-info-uudecode: \
@endif uudecode
+.PHONY: maybe-install-pdf-uudecode install-pdf-uudecode
+maybe-install-pdf-uudecode:
+@if uudecode
+maybe-install-pdf-uudecode: install-pdf-uudecode
+
+install-pdf-uudecode: \
+ configure-uudecode \
+ pdf-uudecode
+ @: $(MAKE); $(unstage)
+ @[ -f ./uudecode/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in uudecode" ; \
+ (cd $(HOST_SUBDIR)/uudecode && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif uudecode
+
.PHONY: maybe-install-html-uudecode install-html-uudecode
maybe-install-html-uudecode:
@if uudecode
@@ -27164,6 +33009,9 @@ maintainer-clean-uudecode:
.PHONY: configure-wdiff maybe-configure-wdiff
maybe-configure-wdiff:
+@if gcc-bootstrap
+configure-wdiff: stage_current
+@endif gcc-bootstrap
@if wdiff
maybe-configure-wdiff: configure-wdiff
configure-wdiff:
@@ -27183,7 +33031,8 @@ configure-wdiff:
srcdiroption="--srcdir=$${topdir}/wdiff"; \
libsrcdir="$$s/wdiff"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif wdiff
@@ -27193,6 +33042,9 @@ configure-wdiff:
.PHONY: all-wdiff maybe-all-wdiff
maybe-all-wdiff:
+@if gcc-bootstrap
+all-wdiff: stage_current
+@endif gcc-bootstrap
@if wdiff
TARGET-wdiff=all
maybe-all-wdiff: all-wdiff
@@ -27238,7 +33090,7 @@ install-wdiff: installdirs
@endif wdiff
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-wdiff info-wdiff
maybe-info-wdiff:
@@ -27292,6 +33144,32 @@ dvi-wdiff: \
@endif wdiff
+.PHONY: maybe-pdf-wdiff pdf-wdiff
+maybe-pdf-wdiff:
+@if wdiff
+maybe-pdf-wdiff: pdf-wdiff
+
+pdf-wdiff: \
+ configure-wdiff
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in wdiff" ; \
+ (cd $(HOST_SUBDIR)/wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif wdiff
+
.PHONY: maybe-html-wdiff html-wdiff
maybe-html-wdiff:
@if wdiff
@@ -27371,6 +33249,33 @@ install-info-wdiff: \
@endif wdiff
+.PHONY: maybe-install-pdf-wdiff install-pdf-wdiff
+maybe-install-pdf-wdiff:
+@if wdiff
+maybe-install-pdf-wdiff: install-pdf-wdiff
+
+install-pdf-wdiff: \
+ configure-wdiff \
+ pdf-wdiff
+ @: $(MAKE); $(unstage)
+ @[ -f ./wdiff/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in wdiff" ; \
+ (cd $(HOST_SUBDIR)/wdiff && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif wdiff
+
.PHONY: maybe-install-html-wdiff install-html-wdiff
maybe-install-html-wdiff:
@if wdiff
@@ -27528,6 +33433,9 @@ maintainer-clean-wdiff:
.PHONY: configure-zip maybe-configure-zip
maybe-configure-zip:
+@if gcc-bootstrap
+configure-zip: stage_current
+@endif gcc-bootstrap
@if zip
maybe-configure-zip: configure-zip
configure-zip:
@@ -27547,7 +33455,8 @@ configure-zip:
srcdiroption="--srcdir=$${topdir}/zip"; \
libsrcdir="$$s/zip"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif zip
@@ -27557,6 +33466,9 @@ configure-zip:
.PHONY: all-zip maybe-all-zip
maybe-all-zip:
+@if gcc-bootstrap
+all-zip: stage_current
+@endif gcc-bootstrap
@if zip
TARGET-zip=all
maybe-all-zip: all-zip
@@ -27605,7 +33517,7 @@ install-zip: installdirs
@endif zip
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-zip info-zip
maybe-info-zip:
@@ -27659,6 +33571,32 @@ dvi-zip: \
@endif zip
+.PHONY: maybe-pdf-zip pdf-zip
+maybe-pdf-zip:
+@if zip
+maybe-pdf-zip: pdf-zip
+
+pdf-zip: \
+ configure-zip
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in zip" ; \
+ (cd $(HOST_SUBDIR)/zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif zip
+
.PHONY: maybe-html-zip html-zip
maybe-html-zip:
@if zip
@@ -27738,6 +33676,33 @@ install-info-zip: \
@endif zip
+.PHONY: maybe-install-pdf-zip install-pdf-zip
+maybe-install-pdf-zip:
+@if zip
+maybe-install-pdf-zip: install-pdf-zip
+
+install-pdf-zip: \
+ configure-zip \
+ pdf-zip
+ @: $(MAKE); $(unstage)
+ @[ -f ./zip/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in zip" ; \
+ (cd $(HOST_SUBDIR)/zip && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif zip
+
.PHONY: maybe-install-html-zip install-html-zip
maybe-install-html-zip:
@if zip
@@ -27895,14 +33860,12 @@ maintainer-clean-zip:
.PHONY: configure-zlib maybe-configure-zlib
maybe-configure-zlib:
+@if gcc-bootstrap
+configure-zlib: stage_current
+@endif gcc-bootstrap
@if zlib
maybe-configure-zlib: configure-zlib
configure-zlib:
-@endif zlib
-@if zlib-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif zlib-bootstrap
-@if zlib
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
@@ -27918,7 +33881,8 @@ configure-zlib:
srcdiroption="--srcdir=$${topdir}/zlib"; \
libsrcdir="$$s/zlib"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif zlib
@@ -27935,6 +33899,8 @@ configure-stage1-zlib:
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
$(HOST_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 1 in $(HOST_SUBDIR)/zlib ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
@@ -27946,8 +33912,10 @@ configure-stage1-zlib:
srcdiroption="--srcdir=$${topdir}/zlib"; \
libsrcdir="$$s/zlib"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
- --disable-intermodule --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
@endif zlib-bootstrap
.PHONY: configure-stage2-zlib maybe-configure-stage2-zlib
@@ -27962,6 +33930,8 @@ configure-stage2-zlib:
test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 2 in $(HOST_SUBDIR)/zlib ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
@@ -27973,7 +33943,9 @@ configure-stage2-zlib:
srcdiroption="--srcdir=$${topdir}/zlib"; \
libsrcdir="$$s/zlib"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif zlib-bootstrap
@@ -27989,6 +33961,8 @@ configure-stage3-zlib:
test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 3 in $(HOST_SUBDIR)/zlib ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
@@ -28000,7 +33974,9 @@ configure-stage3-zlib:
srcdiroption="--srcdir=$${topdir}/zlib"; \
libsrcdir="$$s/zlib"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif zlib-bootstrap
@@ -28016,6 +33992,8 @@ configure-stage4-zlib:
test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
echo Configuring stage 4 in $(HOST_SUBDIR)/zlib ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
@@ -28027,7 +34005,9 @@ configure-stage4-zlib:
srcdiroption="--srcdir=$${topdir}/zlib"; \
libsrcdir="$$s/zlib"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif zlib-bootstrap
@@ -28043,6 +34023,8 @@ configure-stageprofile-zlib:
test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
echo Configuring stage profile in $(HOST_SUBDIR)/zlib ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
@@ -28054,7 +34036,9 @@ configure-stageprofile-zlib:
srcdiroption="--srcdir=$${topdir}/zlib"; \
libsrcdir="$$s/zlib"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif zlib-bootstrap
@@ -28070,6 +34054,8 @@ configure-stagefeedback-zlib:
test ! -f $(HOST_SUBDIR)/zlib/Makefile || exit 0; \
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
echo Configuring stage feedback in $(HOST_SUBDIR)/zlib ; \
$(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/zlib ; \
cd $(HOST_SUBDIR)/zlib || exit 1; \
@@ -28081,7 +34067,9 @@ configure-stagefeedback-zlib:
srcdiroption="--srcdir=$${topdir}/zlib"; \
libsrcdir="$$s/zlib"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
@stage2_werror_flag@
@endif zlib-bootstrap
@@ -28091,15 +34079,13 @@ configure-stagefeedback-zlib:
.PHONY: all-zlib maybe-all-zlib
maybe-all-zlib:
+@if gcc-bootstrap
+all-zlib: stage_current
+@endif gcc-bootstrap
@if zlib
TARGET-zlib=all
maybe-all-zlib: all-zlib
all-zlib: configure-zlib
-@endif zlib
-@if zlib-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif zlib-bootstrap
-@if zlib
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
@@ -28123,18 +34109,22 @@ all-stage1-zlib: configure-stage1-zlib
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(HOST_EXPORTS) \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(FLAGS_TO_PASS) CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
$(TARGET-stage1-zlib)
maybe-clean-stage1-zlib: clean-stage1-zlib
clean-stage1: clean-stage1-zlib
clean-stage1-zlib:
- @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage1-zlib/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage1 ] || $(MAKE) stage1-start; \
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage1-zlib/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
- CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" clean
+ clean
@endif zlib-bootstrap
@@ -28153,19 +34143,23 @@ all-stage2-zlib: configure-stage2-zlib
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage2-zlib)
maybe-clean-stage2-zlib: clean-stage2-zlib
clean-stage2: clean-stage2-zlib
clean-stage2-zlib:
- @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage2-zlib/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage2 ] || $(MAKE) stage2-start; \
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage2-zlib/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif zlib-bootstrap
@@ -28184,19 +34178,23 @@ all-stage3-zlib: configure-stage3-zlib
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage3-zlib)
maybe-clean-stage3-zlib: clean-stage3-zlib
clean-stage3: clean-stage3-zlib
clean-stage3-zlib:
- @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage3-zlib/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage3 ] || $(MAKE) stage3-start; \
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage3-zlib/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif zlib-bootstrap
@@ -28215,19 +34213,23 @@ all-stage4-zlib: configure-stage4-zlib
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stage4-zlib)
maybe-clean-stage4-zlib: clean-stage4-zlib
clean-stage4: clean-stage4-zlib
clean-stage4-zlib:
- @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stage4-zlib/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage4 ] || $(MAKE) stage4-start; \
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stage4-zlib/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- clean
+ clean
@endif zlib-bootstrap
@@ -28246,19 +34248,23 @@ all-stageprofile-zlib: configure-stageprofile-zlib
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stageprofile-zlib)
maybe-clean-stageprofile-zlib: clean-stageprofile-zlib
clean-stageprofile: clean-stageprofile-zlib
clean-stageprofile-zlib:
- @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stageprofile-zlib/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start; \
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stageprofile-zlib/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" clean
+ clean
@endif zlib-bootstrap
@@ -28277,19 +34283,23 @@ all-stagefeedback-zlib: configure-stagefeedback-zlib
$(HOST_EXPORTS) \
$(POSTSTAGE1_HOST_EXPORTS) \
cd $(HOST_SUBDIR)/zlib && \
- $(MAKE) $(FLAGS_TO_PASS) $(POSTSTAGE1_FLAGS_TO_PASS) CFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" $(POSTSTAGE1_FLAGS_TO_PASS) \
$(TARGET-stagefeedback-zlib)
maybe-clean-stagefeedback-zlib: clean-stagefeedback-zlib
clean-stagefeedback: clean-stagefeedback-zlib
clean-stagefeedback-zlib:
- @[ -f $(HOST_SUBDIR)/zlib/Makefile ] || [ -f $(HOST_SUBDIR)/stagefeedback-zlib/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start; \
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(HOST_SUBDIR)/zlib/Makefile ] || exit 0; \
+ else \
+ [ -f $(HOST_SUBDIR)/stagefeedback-zlib/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
cd $(HOST_SUBDIR)/zlib && \
$(MAKE) $(FLAGS_TO_PASS) \
$(POSTSTAGE1_FLAGS_TO_PASS) \
- CFLAGS="$(BOOT_CFLAGS) -fprofile-use" clean
+ clean
@endif zlib-bootstrap
@@ -28314,7 +34324,7 @@ install-zlib:
@endif zlib
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-zlib info-zlib
maybe-info-zlib:
@@ -28366,6 +34376,31 @@ dvi-zlib: \
@endif zlib
+.PHONY: maybe-pdf-zlib pdf-zlib
+maybe-pdf-zlib:
+@if zlib
+maybe-pdf-zlib: pdf-zlib
+
+pdf-zlib: \
+ configure-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in zlib" ; \
+ (cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif zlib
+
.PHONY: maybe-html-zlib html-zlib
maybe-html-zlib:
@if zlib
@@ -28442,6 +34477,32 @@ install-info-zlib: \
@endif zlib
+.PHONY: maybe-install-pdf-zlib install-pdf-zlib
+maybe-install-pdf-zlib:
+@if zlib
+maybe-install-pdf-zlib: install-pdf-zlib
+
+install-pdf-zlib: \
+ configure-zlib \
+ pdf-zlib
+ @[ -f ./zlib/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in zlib" ; \
+ (cd $(HOST_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif zlib
+
.PHONY: maybe-install-html-zlib install-html-zlib
maybe-install-html-zlib:
@if zlib
@@ -28593,6 +34654,9 @@ maintainer-clean-zlib:
.PHONY: configure-gdb maybe-configure-gdb
maybe-configure-gdb:
+@if gcc-bootstrap
+configure-gdb: stage_current
+@endif gcc-bootstrap
@if gdb
maybe-configure-gdb: configure-gdb
configure-gdb:
@@ -28612,7 +34676,8 @@ configure-gdb:
srcdiroption="--srcdir=$${topdir}/gdb"; \
libsrcdir="$$s/gdb"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gdb
@@ -28622,6 +34687,9 @@ configure-gdb:
.PHONY: all-gdb maybe-all-gdb
maybe-all-gdb:
+@if gcc-bootstrap
+all-gdb: stage_current
+@endif gcc-bootstrap
@if gdb
TARGET-gdb=all
maybe-all-gdb: all-gdb
@@ -28667,7 +34735,7 @@ install-gdb: installdirs
@endif gdb
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gdb info-gdb
maybe-info-gdb:
@@ -28721,6 +34789,32 @@ dvi-gdb: \
@endif gdb
+.PHONY: maybe-pdf-gdb pdf-gdb
+maybe-pdf-gdb:
+@if gdb
+maybe-pdf-gdb: pdf-gdb
+
+pdf-gdb: \
+ configure-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gdb" ; \
+ (cd $(HOST_SUBDIR)/gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gdb
+
.PHONY: maybe-html-gdb html-gdb
maybe-html-gdb:
@if gdb
@@ -28800,6 +34894,33 @@ install-info-gdb: \
@endif gdb
+.PHONY: maybe-install-pdf-gdb install-pdf-gdb
+maybe-install-pdf-gdb:
+@if gdb
+maybe-install-pdf-gdb: install-pdf-gdb
+
+install-pdf-gdb: \
+ configure-gdb \
+ pdf-gdb
+ @: $(MAKE); $(unstage)
+ @[ -f ./gdb/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gdb" ; \
+ (cd $(HOST_SUBDIR)/gdb && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gdb
+
.PHONY: maybe-install-html-gdb install-html-gdb
maybe-install-html-gdb:
@if gdb
@@ -28957,6 +35078,9 @@ maintainer-clean-gdb:
.PHONY: configure-expect maybe-configure-expect
maybe-configure-expect:
+@if gcc-bootstrap
+configure-expect: stage_current
+@endif gcc-bootstrap
@if expect
maybe-configure-expect: configure-expect
configure-expect:
@@ -28976,7 +35100,8 @@ configure-expect:
srcdiroption="--srcdir=$${topdir}/expect"; \
libsrcdir="$$s/expect"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif expect
@@ -28986,6 +35111,9 @@ configure-expect:
.PHONY: all-expect maybe-all-expect
maybe-all-expect:
+@if gcc-bootstrap
+all-expect: stage_current
+@endif gcc-bootstrap
@if expect
TARGET-expect=all
maybe-all-expect: all-expect
@@ -29031,7 +35159,7 @@ install-expect: installdirs
@endif expect
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-expect info-expect
maybe-info-expect:
@@ -29085,6 +35213,32 @@ dvi-expect: \
@endif expect
+.PHONY: maybe-pdf-expect pdf-expect
+maybe-pdf-expect:
+@if expect
+maybe-pdf-expect: pdf-expect
+
+pdf-expect: \
+ configure-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in expect" ; \
+ (cd $(HOST_SUBDIR)/expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif expect
+
.PHONY: maybe-html-expect html-expect
maybe-html-expect:
@if expect
@@ -29164,6 +35318,33 @@ install-info-expect: \
@endif expect
+.PHONY: maybe-install-pdf-expect install-pdf-expect
+maybe-install-pdf-expect:
+@if expect
+maybe-install-pdf-expect: install-pdf-expect
+
+install-pdf-expect: \
+ configure-expect \
+ pdf-expect
+ @: $(MAKE); $(unstage)
+ @[ -f ./expect/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in expect" ; \
+ (cd $(HOST_SUBDIR)/expect && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif expect
+
.PHONY: maybe-install-html-expect install-html-expect
maybe-install-html-expect:
@if expect
@@ -29321,6 +35502,9 @@ maintainer-clean-expect:
.PHONY: configure-guile maybe-configure-guile
maybe-configure-guile:
+@if gcc-bootstrap
+configure-guile: stage_current
+@endif gcc-bootstrap
@if guile
maybe-configure-guile: configure-guile
configure-guile:
@@ -29340,7 +35524,8 @@ configure-guile:
srcdiroption="--srcdir=$${topdir}/guile"; \
libsrcdir="$$s/guile"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif guile
@@ -29350,6 +35535,9 @@ configure-guile:
.PHONY: all-guile maybe-all-guile
maybe-all-guile:
+@if gcc-bootstrap
+all-guile: stage_current
+@endif gcc-bootstrap
@if guile
TARGET-guile=all
maybe-all-guile: all-guile
@@ -29395,7 +35583,7 @@ install-guile: installdirs
@endif guile
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-guile info-guile
maybe-info-guile:
@@ -29449,6 +35637,32 @@ dvi-guile: \
@endif guile
+.PHONY: maybe-pdf-guile pdf-guile
+maybe-pdf-guile:
+@if guile
+maybe-pdf-guile: pdf-guile
+
+pdf-guile: \
+ configure-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in guile" ; \
+ (cd $(HOST_SUBDIR)/guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif guile
+
.PHONY: maybe-html-guile html-guile
maybe-html-guile:
@if guile
@@ -29528,6 +35742,33 @@ install-info-guile: \
@endif guile
+.PHONY: maybe-install-pdf-guile install-pdf-guile
+maybe-install-pdf-guile:
+@if guile
+maybe-install-pdf-guile: install-pdf-guile
+
+install-pdf-guile: \
+ configure-guile \
+ pdf-guile
+ @: $(MAKE); $(unstage)
+ @[ -f ./guile/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in guile" ; \
+ (cd $(HOST_SUBDIR)/guile && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif guile
+
.PHONY: maybe-install-html-guile install-html-guile
maybe-install-html-guile:
@if guile
@@ -29685,6 +35926,9 @@ maintainer-clean-guile:
.PHONY: configure-tk maybe-configure-tk
maybe-configure-tk:
+@if gcc-bootstrap
+configure-tk: stage_current
+@endif gcc-bootstrap
@if tk
maybe-configure-tk: configure-tk
configure-tk:
@@ -29704,7 +35948,8 @@ configure-tk:
srcdiroption="--srcdir=$${topdir}/tk"; \
libsrcdir="$$s/tk"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif tk
@@ -29714,6 +35959,9 @@ configure-tk:
.PHONY: all-tk maybe-all-tk
maybe-all-tk:
+@if gcc-bootstrap
+all-tk: stage_current
+@endif gcc-bootstrap
@if tk
TARGET-tk=all
maybe-all-tk: all-tk
@@ -29759,7 +36007,7 @@ install-tk: installdirs
@endif tk
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-tk info-tk
maybe-info-tk:
@@ -29813,6 +36061,32 @@ dvi-tk: \
@endif tk
+.PHONY: maybe-pdf-tk pdf-tk
+maybe-pdf-tk:
+@if tk
+maybe-pdf-tk: pdf-tk
+
+pdf-tk: \
+ configure-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in tk" ; \
+ (cd $(HOST_SUBDIR)/tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif tk
+
.PHONY: maybe-html-tk html-tk
maybe-html-tk:
@if tk
@@ -29892,6 +36166,33 @@ install-info-tk: \
@endif tk
+.PHONY: maybe-install-pdf-tk install-pdf-tk
+maybe-install-pdf-tk:
+@if tk
+maybe-install-pdf-tk: install-pdf-tk
+
+install-pdf-tk: \
+ configure-tk \
+ pdf-tk
+ @: $(MAKE); $(unstage)
+ @[ -f ./tk/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) $(X11_FLAGS_TO_PASS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in tk" ; \
+ (cd $(HOST_SUBDIR)/tk && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif tk
+
.PHONY: maybe-install-html-tk install-html-tk
maybe-install-html-tk:
@if tk
@@ -30049,6 +36350,9 @@ maintainer-clean-tk:
.PHONY: configure-libtermcap maybe-configure-libtermcap
maybe-configure-libtermcap:
+@if gcc-bootstrap
+configure-libtermcap: stage_current
+@endif gcc-bootstrap
@if libtermcap
maybe-configure-libtermcap: configure-libtermcap
configure-libtermcap:
@@ -30068,7 +36372,8 @@ configure-libtermcap:
srcdiroption="--srcdir=$${topdir}/libtermcap"; \
libsrcdir="$$s/libtermcap"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif libtermcap
@@ -30078,6 +36383,9 @@ configure-libtermcap:
.PHONY: all-libtermcap maybe-all-libtermcap
maybe-all-libtermcap:
+@if gcc-bootstrap
+all-libtermcap: stage_current
+@endif gcc-bootstrap
@if libtermcap
TARGET-libtermcap=all
maybe-all-libtermcap: all-libtermcap
@@ -30117,7 +36425,7 @@ install-libtermcap: installdirs
@endif libtermcap
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-libtermcap info-libtermcap
maybe-info-libtermcap:
@@ -30171,6 +36479,32 @@ dvi-libtermcap: \
@endif libtermcap
+.PHONY: maybe-pdf-libtermcap pdf-libtermcap
+maybe-pdf-libtermcap:
+@if libtermcap
+maybe-pdf-libtermcap: pdf-libtermcap
+
+pdf-libtermcap: \
+ configure-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in libtermcap" ; \
+ (cd $(HOST_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif libtermcap
+
.PHONY: maybe-html-libtermcap html-libtermcap
maybe-html-libtermcap:
@if libtermcap
@@ -30250,6 +36584,33 @@ install-info-libtermcap: \
@endif libtermcap
+.PHONY: maybe-install-pdf-libtermcap install-pdf-libtermcap
+maybe-install-pdf-libtermcap:
+@if libtermcap
+maybe-install-pdf-libtermcap: install-pdf-libtermcap
+
+install-pdf-libtermcap: \
+ configure-libtermcap \
+ pdf-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f ./libtermcap/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in libtermcap" ; \
+ (cd $(HOST_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif libtermcap
+
.PHONY: maybe-install-html-libtermcap install-html-libtermcap
maybe-install-html-libtermcap:
@if libtermcap
@@ -30347,6 +36708,9 @@ maintainer-clean-libtermcap:
.PHONY: configure-utils maybe-configure-utils
maybe-configure-utils:
+@if gcc-bootstrap
+configure-utils: stage_current
+@endif gcc-bootstrap
@if utils
maybe-configure-utils: configure-utils
configure-utils:
@@ -30366,7 +36730,8 @@ configure-utils:
srcdiroption="--srcdir=$${topdir}/utils"; \
libsrcdir="$$s/utils"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif utils
@@ -30376,6 +36741,9 @@ configure-utils:
.PHONY: all-utils maybe-all-utils
maybe-all-utils:
+@if gcc-bootstrap
+all-utils: stage_current
+@endif gcc-bootstrap
@if utils
TARGET-utils=all
maybe-all-utils: all-utils
@@ -30415,7 +36783,7 @@ install-utils: installdirs
@endif utils
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-utils info-utils
maybe-info-utils:
@@ -30469,6 +36837,32 @@ dvi-utils: \
@endif utils
+.PHONY: maybe-pdf-utils pdf-utils
+maybe-pdf-utils:
+@if utils
+maybe-pdf-utils: pdf-utils
+
+pdf-utils: \
+ configure-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in utils" ; \
+ (cd $(HOST_SUBDIR)/utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif utils
+
.PHONY: maybe-html-utils html-utils
maybe-html-utils:
@if utils
@@ -30548,6 +36942,33 @@ install-info-utils: \
@endif utils
+.PHONY: maybe-install-pdf-utils install-pdf-utils
+maybe-install-pdf-utils:
+@if utils
+maybe-install-pdf-utils: install-pdf-utils
+
+install-pdf-utils: \
+ configure-utils \
+ pdf-utils
+ @: $(MAKE); $(unstage)
+ @[ -f ./utils/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in utils" ; \
+ (cd $(HOST_SUBDIR)/utils && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif utils
+
.PHONY: maybe-install-html-utils install-html-utils
maybe-install-html-utils:
@if utils
@@ -30705,6 +37126,9 @@ maintainer-clean-utils:
.PHONY: configure-gnattools maybe-configure-gnattools
maybe-configure-gnattools:
+@if gcc-bootstrap
+configure-gnattools: stage_current
+@endif gcc-bootstrap
@if gnattools
maybe-configure-gnattools: configure-gnattools
configure-gnattools:
@@ -30724,7 +37148,8 @@ configure-gnattools:
srcdiroption="--srcdir=$${topdir}/gnattools"; \
libsrcdir="$$s/gnattools"; \
$(SHELL) $${libsrcdir}/configure \
- $(HOST_CONFIGARGS) $${srcdiroption} \
+ $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif gnattools
@@ -30734,6 +37159,9 @@ configure-gnattools:
.PHONY: all-gnattools maybe-all-gnattools
maybe-all-gnattools:
+@if gcc-bootstrap
+all-gnattools: stage_current
+@endif gcc-bootstrap
@if gnattools
TARGET-gnattools=all
maybe-all-gnattools: all-gnattools
@@ -30779,7 +37207,7 @@ install-gnattools: installdirs
@endif gnattools
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-gnattools info-gnattools
maybe-info-gnattools:
@@ -30833,6 +37261,32 @@ dvi-gnattools: \
@endif gnattools
+.PHONY: maybe-pdf-gnattools pdf-gnattools
+maybe-pdf-gnattools:
+@if gnattools
+maybe-pdf-gnattools: pdf-gnattools
+
+pdf-gnattools: \
+ configure-gnattools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing pdf in gnattools" ; \
+ (cd $(HOST_SUBDIR)/gnattools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif gnattools
+
.PHONY: maybe-html-gnattools html-gnattools
maybe-html-gnattools:
@if gnattools
@@ -30912,6 +37366,33 @@ install-info-gnattools: \
@endif gnattools
+.PHONY: maybe-install-pdf-gnattools install-pdf-gnattools
+maybe-install-pdf-gnattools:
+@if gnattools
+maybe-install-pdf-gnattools: install-pdf-gnattools
+
+install-pdf-gnattools: \
+ configure-gnattools \
+ pdf-gnattools
+ @: $(MAKE); $(unstage)
+ @[ -f ./gnattools/Makefile ] || exit 0; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(HOST_EXPORTS) \
+ for flag in $(EXTRA_HOST_FLAGS) ; do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ echo "Doing install-pdf in gnattools" ; \
+ (cd $(HOST_SUBDIR)/gnattools && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif gnattools
+
.PHONY: maybe-install-html-gnattools install-html-gnattools
maybe-install-html-gnattools:
@if gnattools
@@ -31076,6 +37557,9 @@ maintainer-clean-gnattools:
.PHONY: configure-target-libstdc++-v3 maybe-configure-target-libstdc++-v3
maybe-configure-target-libstdc++-v3:
+@if gcc-bootstrap
+configure-target-libstdc++-v3: stage_current
+@endif gcc-bootstrap
@if target-libstdc++-v3
maybe-configure-target-libstdc++-v3: configure-target-libstdc++-v3
configure-target-libstdc++-v3:
@@ -31109,7 +37593,8 @@ configure-target-libstdc++-v3:
libsrcdir="$$s/libstdc++-v3"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libstdc++-v3
@@ -31119,6 +37604,9 @@ configure-target-libstdc++-v3:
.PHONY: all-target-libstdc++-v3 maybe-all-target-libstdc++-v3
maybe-all-target-libstdc++-v3:
+@if gcc-bootstrap
+all-target-libstdc++-v3: stage_current
+@endif gcc-bootstrap
@if target-libstdc++-v3
TARGET-target-libstdc++-v3=all
maybe-all-target-libstdc++-v3: all-target-libstdc++-v3
@@ -31165,7 +37653,7 @@ install-target-libstdc++-v3: installdirs
@endif target-libstdc++-v3
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libstdc++-v3 info-target-libstdc++-v3
maybe-info-target-libstdc++-v3:
@@ -31219,6 +37707,32 @@ dvi-target-libstdc++-v3: \
@endif target-libstdc++-v3
+.PHONY: maybe-pdf-target-libstdc++-v3 pdf-target-libstdc++-v3
+maybe-pdf-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-pdf-target-libstdc++-v3: pdf-target-libstdc++-v3
+
+pdf-target-libstdc++-v3: \
+ configure-target-libstdc++-v3
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libstdc++-v3
+
.PHONY: maybe-html-target-libstdc++-v3 html-target-libstdc++-v3
maybe-html-target-libstdc++-v3:
@if target-libstdc++-v3
@@ -31298,6 +37812,33 @@ install-info-target-libstdc++-v3: \
@endif target-libstdc++-v3
+.PHONY: maybe-install-pdf-target-libstdc++-v3 install-pdf-target-libstdc++-v3
+maybe-install-pdf-target-libstdc++-v3:
+@if target-libstdc++-v3
+maybe-install-pdf-target-libstdc++-v3: install-pdf-target-libstdc++-v3
+
+install-pdf-target-libstdc++-v3: \
+ configure-target-libstdc++-v3 \
+ pdf-target-libstdc++-v3
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libstdc++-v3/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libstdc++-v3" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libstdc++-v3 && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libstdc++-v3
+
.PHONY: maybe-install-html-target-libstdc++-v3 install-html-target-libstdc++-v3
maybe-install-html-target-libstdc++-v3:
@if target-libstdc++-v3
@@ -31457,6 +37998,9 @@ maintainer-clean-target-libstdc++-v3:
.PHONY: configure-target-libmudflap maybe-configure-target-libmudflap
maybe-configure-target-libmudflap:
+@if gcc-bootstrap
+configure-target-libmudflap: stage_current
+@endif gcc-bootstrap
@if target-libmudflap
maybe-configure-target-libmudflap: configure-target-libmudflap
configure-target-libmudflap:
@@ -31490,7 +38034,8 @@ configure-target-libmudflap:
libsrcdir="$$s/libmudflap"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libmudflap
@@ -31500,6 +38045,9 @@ configure-target-libmudflap:
.PHONY: all-target-libmudflap maybe-all-target-libmudflap
maybe-all-target-libmudflap:
+@if gcc-bootstrap
+all-target-libmudflap: stage_current
+@endif gcc-bootstrap
@if target-libmudflap
TARGET-target-libmudflap=all
maybe-all-target-libmudflap: all-target-libmudflap
@@ -31546,7 +38094,7 @@ install-target-libmudflap: installdirs
@endif target-libmudflap
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libmudflap info-target-libmudflap
maybe-info-target-libmudflap:
@@ -31600,6 +38148,32 @@ dvi-target-libmudflap: \
@endif target-libmudflap
+.PHONY: maybe-pdf-target-libmudflap pdf-target-libmudflap
+maybe-pdf-target-libmudflap:
+@if target-libmudflap
+maybe-pdf-target-libmudflap: pdf-target-libmudflap
+
+pdf-target-libmudflap: \
+ configure-target-libmudflap
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libmudflap
+
.PHONY: maybe-html-target-libmudflap html-target-libmudflap
maybe-html-target-libmudflap:
@if target-libmudflap
@@ -31679,6 +38253,33 @@ install-info-target-libmudflap: \
@endif target-libmudflap
+.PHONY: maybe-install-pdf-target-libmudflap install-pdf-target-libmudflap
+maybe-install-pdf-target-libmudflap:
+@if target-libmudflap
+maybe-install-pdf-target-libmudflap: install-pdf-target-libmudflap
+
+install-pdf-target-libmudflap: \
+ configure-target-libmudflap \
+ pdf-target-libmudflap
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libmudflap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libmudflap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libmudflap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libmudflap
+
.PHONY: maybe-install-html-target-libmudflap install-html-target-libmudflap
maybe-install-html-target-libmudflap:
@if target-libmudflap
@@ -31838,6 +38439,9 @@ maintainer-clean-target-libmudflap:
.PHONY: configure-target-libssp maybe-configure-target-libssp
maybe-configure-target-libssp:
+@if gcc-bootstrap
+configure-target-libssp: stage_current
+@endif gcc-bootstrap
@if target-libssp
maybe-configure-target-libssp: configure-target-libssp
configure-target-libssp:
@@ -31871,7 +38475,8 @@ configure-target-libssp:
libsrcdir="$$s/libssp"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libssp
@@ -31881,6 +38486,9 @@ configure-target-libssp:
.PHONY: all-target-libssp maybe-all-target-libssp
maybe-all-target-libssp:
+@if gcc-bootstrap
+all-target-libssp: stage_current
+@endif gcc-bootstrap
@if target-libssp
TARGET-target-libssp=all
maybe-all-target-libssp: all-target-libssp
@@ -31927,7 +38535,7 @@ install-target-libssp: installdirs
@endif target-libssp
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libssp info-target-libssp
maybe-info-target-libssp:
@@ -31981,6 +38589,32 @@ dvi-target-libssp: \
@endif target-libssp
+.PHONY: maybe-pdf-target-libssp pdf-target-libssp
+maybe-pdf-target-libssp:
+@if target-libssp
+maybe-pdf-target-libssp: pdf-target-libssp
+
+pdf-target-libssp: \
+ configure-target-libssp
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libssp
+
.PHONY: maybe-html-target-libssp html-target-libssp
maybe-html-target-libssp:
@if target-libssp
@@ -32060,6 +38694,33 @@ install-info-target-libssp: \
@endif target-libssp
+.PHONY: maybe-install-pdf-target-libssp install-pdf-target-libssp
+maybe-install-pdf-target-libssp:
+@if target-libssp
+maybe-install-pdf-target-libssp: install-pdf-target-libssp
+
+install-pdf-target-libssp: \
+ configure-target-libssp \
+ pdf-target-libssp
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libssp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libssp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libssp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libssp
+
.PHONY: maybe-install-html-target-libssp install-html-target-libssp
maybe-install-html-target-libssp:
@if target-libssp
@@ -32217,116 +38878,123 @@ maintainer-clean-target-libssp:
-.PHONY: configure-target-libgcc-math maybe-configure-target-libgcc-math
-maybe-configure-target-libgcc-math:
-@if target-libgcc-math
-maybe-configure-target-libgcc-math: configure-target-libgcc-math
-configure-target-libgcc-math:
+.PHONY: configure-target-newlib maybe-configure-target-newlib
+maybe-configure-target-newlib:
+@if gcc-bootstrap
+configure-target-newlib: stage_current
+@endif gcc-bootstrap
+@if target-newlib
+maybe-configure-target-newlib: configure-target-newlib
+configure-target-newlib:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- echo "Checking multilib configuration for libgcc-math..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc-math ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc-math/multilib.tmp 2> /dev/null ; \
- if test -r $(TARGET_SUBDIR)/libgcc-math/multilib.out; then \
- if cmp -s $(TARGET_SUBDIR)/libgcc-math/multilib.tmp $(TARGET_SUBDIR)/libgcc-math/multilib.out; then \
- rm -f $(TARGET_SUBDIR)/libgcc-math/multilib.tmp; \
+ echo "Checking multilib configuration for newlib..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/newlib/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/newlib/multilib.tmp; \
else \
- rm -f $(TARGET_SUBDIR)/libgcc-math/Makefile; \
- mv $(TARGET_SUBDIR)/libgcc-math/multilib.tmp $(TARGET_SUBDIR)/libgcc-math/multilib.out; \
+ rm -f $(TARGET_SUBDIR)/newlib/Makefile; \
+ mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \
fi; \
else \
- mv $(TARGET_SUBDIR)/libgcc-math/multilib.tmp $(TARGET_SUBDIR)/libgcc-math/multilib.out; \
+ mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \
fi; \
- test ! -f $(TARGET_SUBDIR)/libgcc-math/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc-math ; \
+ test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
$(NORMAL_TARGET_EXPORTS) \
- echo Configuring in $(TARGET_SUBDIR)/libgcc-math; \
- cd "$(TARGET_SUBDIR)/libgcc-math" || exit 1; \
+ echo Configuring in $(TARGET_SUBDIR)/newlib; \
+ cd "$(TARGET_SUBDIR)/newlib" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(TARGET_SUBDIR)/libgcc-math/ | \
+ *) topdir=`echo $(TARGET_SUBDIR)/newlib/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/libgcc-math"; \
- libsrcdir="$$s/libgcc-math"; \
+ srcdiroption="--srcdir=$${topdir}/newlib"; \
+ libsrcdir="$$s/newlib"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: all-target-libgcc-math maybe-all-target-libgcc-math
-maybe-all-target-libgcc-math:
-@if target-libgcc-math
-TARGET-target-libgcc-math=all
-maybe-all-target-libgcc-math: all-target-libgcc-math
-all-target-libgcc-math: configure-target-libgcc-math
+.PHONY: all-target-newlib maybe-all-target-newlib
+maybe-all-target-newlib:
+@if gcc-bootstrap
+all-target-newlib: stage_current
+@endif gcc-bootstrap
+@if target-newlib
+TARGET-target-newlib=all
+maybe-all-target-newlib: all-target-newlib
+all-target-newlib: configure-target-newlib
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgcc-math))
-@endif target-libgcc-math
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-newlib))
+@endif target-newlib
-.PHONY: check-target-libgcc-math maybe-check-target-libgcc-math
-maybe-check-target-libgcc-math:
-@if target-libgcc-math
-maybe-check-target-libgcc-math: check-target-libgcc-math
+.PHONY: check-target-newlib maybe-check-target-newlib
+maybe-check-target-newlib:
+@if target-newlib
+maybe-check-target-newlib: check-target-newlib
-check-target-libgcc-math:
+check-target-newlib:
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) check)
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: install-target-libgcc-math maybe-install-target-libgcc-math
-maybe-install-target-libgcc-math:
-@if target-libgcc-math
-maybe-install-target-libgcc-math: install-target-libgcc-math
+.PHONY: install-target-newlib maybe-install-target-newlib
+maybe-install-target-newlib:
+@if target-newlib
+maybe-install-target-newlib: install-target-newlib
-install-target-libgcc-math: installdirs
+install-target-newlib: installdirs
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-@endif target-libgcc-math
+@endif target-newlib
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
-.PHONY: maybe-info-target-libgcc-math info-target-libgcc-math
-maybe-info-target-libgcc-math:
-@if target-libgcc-math
-maybe-info-target-libgcc-math: info-target-libgcc-math
+.PHONY: maybe-info-target-newlib info-target-newlib
+maybe-info-target-newlib:
+@if target-newlib
+maybe-info-target-newlib: info-target-newlib
-info-target-libgcc-math: \
- configure-target-libgcc-math
+info-target-newlib: \
+ configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32334,25 +39002,25 @@ info-target-libgcc-math: \
info) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-dvi-target-libgcc-math dvi-target-libgcc-math
-maybe-dvi-target-libgcc-math:
-@if target-libgcc-math
-maybe-dvi-target-libgcc-math: dvi-target-libgcc-math
+.PHONY: maybe-dvi-target-newlib dvi-target-newlib
+maybe-dvi-target-newlib:
+@if target-newlib
+maybe-dvi-target-newlib: dvi-target-newlib
-dvi-target-libgcc-math: \
- configure-target-libgcc-math
+dvi-target-newlib: \
+ configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32360,25 +39028,51 @@ dvi-target-libgcc-math: \
dvi) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
+
+.PHONY: maybe-pdf-target-newlib pdf-target-newlib
+maybe-pdf-target-newlib:
+@if target-newlib
+maybe-pdf-target-newlib: pdf-target-newlib
+
+pdf-target-newlib: \
+ configure-target-newlib
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-newlib
-.PHONY: maybe-html-target-libgcc-math html-target-libgcc-math
-maybe-html-target-libgcc-math:
-@if target-libgcc-math
-maybe-html-target-libgcc-math: html-target-libgcc-math
+.PHONY: maybe-html-target-newlib html-target-newlib
+maybe-html-target-newlib:
+@if target-newlib
+maybe-html-target-newlib: html-target-newlib
-html-target-libgcc-math: \
- configure-target-libgcc-math
+html-target-newlib: \
+ configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing html in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32386,25 +39080,25 @@ html-target-libgcc-math: \
html) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-TAGS-target-libgcc-math TAGS-target-libgcc-math
-maybe-TAGS-target-libgcc-math:
-@if target-libgcc-math
-maybe-TAGS-target-libgcc-math: TAGS-target-libgcc-math
+.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib
+maybe-TAGS-target-newlib:
+@if target-newlib
+maybe-TAGS-target-newlib: TAGS-target-newlib
-TAGS-target-libgcc-math: \
- configure-target-libgcc-math
+TAGS-target-newlib: \
+ configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32412,26 +39106,26 @@ TAGS-target-libgcc-math: \
TAGS) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-install-info-target-libgcc-math install-info-target-libgcc-math
-maybe-install-info-target-libgcc-math:
-@if target-libgcc-math
-maybe-install-info-target-libgcc-math: install-info-target-libgcc-math
+.PHONY: maybe-install-info-target-newlib install-info-target-newlib
+maybe-install-info-target-newlib:
+@if target-newlib
+maybe-install-info-target-newlib: install-info-target-newlib
-install-info-target-libgcc-math: \
- configure-target-libgcc-math \
- info-target-libgcc-math
+install-info-target-newlib: \
+ configure-target-newlib \
+ info-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32439,26 +39133,53 @@ install-info-target-libgcc-math: \
install-info) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-install-html-target-libgcc-math install-html-target-libgcc-math
-maybe-install-html-target-libgcc-math:
-@if target-libgcc-math
-maybe-install-html-target-libgcc-math: install-html-target-libgcc-math
+.PHONY: maybe-install-pdf-target-newlib install-pdf-target-newlib
+maybe-install-pdf-target-newlib:
+@if target-newlib
+maybe-install-pdf-target-newlib: install-pdf-target-newlib
-install-html-target-libgcc-math: \
- configure-target-libgcc-math \
- html-target-libgcc-math
+install-pdf-target-newlib: \
+ configure-target-newlib \
+ pdf-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-newlib
+
+.PHONY: maybe-install-html-target-newlib install-html-target-newlib
+maybe-install-html-target-newlib:
+@if target-newlib
+maybe-install-html-target-newlib: install-html-target-newlib
+
+install-html-target-newlib: \
+ configure-target-newlib \
+ html-target-newlib
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html in $(TARGET_SUBDIR)/newlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32466,25 +39187,25 @@ install-html-target-libgcc-math: \
install-html) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-installcheck-target-libgcc-math installcheck-target-libgcc-math
-maybe-installcheck-target-libgcc-math:
-@if target-libgcc-math
-maybe-installcheck-target-libgcc-math: installcheck-target-libgcc-math
+.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib
+maybe-installcheck-target-newlib:
+@if target-newlib
+maybe-installcheck-target-newlib: installcheck-target-newlib
-installcheck-target-libgcc-math: \
- configure-target-libgcc-math
+installcheck-target-newlib: \
+ configure-target-newlib
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32492,24 +39213,24 @@ installcheck-target-libgcc-math: \
installcheck) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-mostlyclean-target-libgcc-math mostlyclean-target-libgcc-math
-maybe-mostlyclean-target-libgcc-math:
-@if target-libgcc-math
-maybe-mostlyclean-target-libgcc-math: mostlyclean-target-libgcc-math
+.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib
+maybe-mostlyclean-target-newlib:
+@if target-newlib
+maybe-mostlyclean-target-newlib: mostlyclean-target-newlib
-mostlyclean-target-libgcc-math:
+mostlyclean-target-newlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32517,24 +39238,24 @@ mostlyclean-target-libgcc-math:
mostlyclean) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-clean-target-libgcc-math clean-target-libgcc-math
-maybe-clean-target-libgcc-math:
-@if target-libgcc-math
-maybe-clean-target-libgcc-math: clean-target-libgcc-math
+.PHONY: maybe-clean-target-newlib clean-target-newlib
+maybe-clean-target-newlib:
+@if target-newlib
+maybe-clean-target-newlib: clean-target-newlib
-clean-target-libgcc-math:
+clean-target-newlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32542,24 +39263,24 @@ clean-target-libgcc-math:
clean) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-distclean-target-libgcc-math distclean-target-libgcc-math
-maybe-distclean-target-libgcc-math:
-@if target-libgcc-math
-maybe-distclean-target-libgcc-math: distclean-target-libgcc-math
+.PHONY: maybe-distclean-target-newlib distclean-target-newlib
+maybe-distclean-target-newlib:
+@if target-newlib
+maybe-distclean-target-newlib: distclean-target-newlib
-distclean-target-libgcc-math:
+distclean-target-newlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32567,24 +39288,24 @@ distclean-target-libgcc-math:
distclean) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: maybe-maintainer-clean-target-libgcc-math maintainer-clean-target-libgcc-math
-maybe-maintainer-clean-target-libgcc-math:
-@if target-libgcc-math
-maybe-maintainer-clean-target-libgcc-math: maintainer-clean-target-libgcc-math
+.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib
+maybe-maintainer-clean-target-newlib:
+@if target-newlib
+maybe-maintainer-clean-target-newlib: maintainer-clean-target-newlib
-maintainer-clean-target-libgcc-math:
+maintainer-clean-target-newlib:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/libgcc-math/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgcc-math" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/libgcc-math && \
+ (cd $(TARGET_SUBDIR)/newlib && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32592,122 +39313,591 @@ maintainer-clean-target-libgcc-math:
maintainer-clean) \
|| exit 1
-@endif target-libgcc-math
+@endif target-newlib
-.PHONY: configure-target-newlib maybe-configure-target-newlib
-maybe-configure-target-newlib:
-@if target-newlib
-maybe-configure-target-newlib: configure-target-newlib
-configure-target-newlib:
- @: $(MAKE); $(unstage)
+.PHONY: configure-target-libgcc maybe-configure-target-libgcc
+maybe-configure-target-libgcc:
+@if gcc-bootstrap
+configure-target-libgcc: stage_current
+@endif gcc-bootstrap
+@if target-libgcc
+maybe-configure-target-libgcc: configure-target-libgcc
+configure-target-libgcc:
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- echo "Checking multilib configuration for newlib..."; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
- $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/newlib/multilib.tmp 2> /dev/null ; \
- if test -r $(TARGET_SUBDIR)/newlib/multilib.out; then \
- if cmp -s $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; then \
- rm -f $(TARGET_SUBDIR)/newlib/multilib.tmp; \
+ echo "Checking multilib configuration for libgcc..."; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
else \
- rm -f $(TARGET_SUBDIR)/newlib/Makefile; \
- mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \
+ rm -f $(TARGET_SUBDIR)/libgcc/Makefile; \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
fi; \
else \
- mv $(TARGET_SUBDIR)/newlib/multilib.tmp $(TARGET_SUBDIR)/newlib/multilib.out; \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
fi; \
- test ! -f $(TARGET_SUBDIR)/newlib/Makefile || exit 0; \
- $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/newlib ; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
$(NORMAL_TARGET_EXPORTS) \
- echo Configuring in $(TARGET_SUBDIR)/newlib; \
- cd "$(TARGET_SUBDIR)/newlib" || exit 1; \
+ echo Configuring in $(TARGET_SUBDIR)/libgcc; \
+ cd "$(TARGET_SUBDIR)/libgcc" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir=`echo $(TARGET_SUBDIR)/newlib/ | \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
esac; \
- srcdiroption="--srcdir=$${topdir}/newlib"; \
- libsrcdir="$$s/newlib"; \
+ srcdiroption="--srcdir=$${topdir}/libgcc"; \
+ libsrcdir="$$s/libgcc"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
+.PHONY: configure-stage1-target-libgcc maybe-configure-stage1-target-libgcc
+maybe-configure-stage1-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-configure-stage1-target-libgcc: configure-stage1-target-libgcc
+configure-stage1-target-libgcc:
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libgcc..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgcc/Makefile; \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ CFLAGS="$(STAGE1_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(STAGE1_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 1 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libgcc"; \
+ libsrcdir="$$s/libgcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ \
+ --disable-intermodule $(STAGE1_CHECKING) --disable-coverage --enable-languages="$(STAGE1_LANGUAGES)"
+@endif target-libgcc-bootstrap
+
+.PHONY: configure-stage2-target-libgcc maybe-configure-stage2-target-libgcc
+maybe-configure-stage2-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-configure-stage2-target-libgcc: configure-stage2-target-libgcc
+configure-stage2-target-libgcc:
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libgcc..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgcc/Makefile; \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 2 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libgcc"; \
+ libsrcdir="$$s/libgcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libgcc-bootstrap
+.PHONY: configure-stage3-target-libgcc maybe-configure-stage3-target-libgcc
+maybe-configure-stage3-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-configure-stage3-target-libgcc: configure-stage3-target-libgcc
+configure-stage3-target-libgcc:
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libgcc..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgcc/Makefile; \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 3 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libgcc"; \
+ libsrcdir="$$s/libgcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libgcc-bootstrap
-.PHONY: all-target-newlib maybe-all-target-newlib
-maybe-all-target-newlib:
-@if target-newlib
-TARGET-target-newlib=all
-maybe-all-target-newlib: all-target-newlib
-all-target-newlib: configure-target-newlib
- @: $(MAKE); $(unstage)
+.PHONY: configure-stage4-target-libgcc maybe-configure-stage4-target-libgcc
+maybe-configure-stage4-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-configure-stage4-target-libgcc: configure-stage4-target-libgcc
+configure-stage4-target-libgcc:
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libgcc..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgcc/Makefile; \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(BOOT_CFLAGS)"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS)"; export LIBCFLAGS; \
+ echo Configuring stage 4 in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libgcc"; \
+ libsrcdir="$$s/libgcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libgcc-bootstrap
+
+.PHONY: configure-stageprofile-target-libgcc maybe-configure-stageprofile-target-libgcc
+maybe-configure-stageprofile-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-configure-stageprofile-target-libgcc: configure-stageprofile-target-libgcc
+configure-stageprofile-target-libgcc:
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libgcc..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgcc/Makefile; \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate"; export LIBCFLAGS; \
+ echo Configuring stage profile in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libgcc"; \
+ libsrcdir="$$s/libgcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libgcc-bootstrap
+
+.PHONY: configure-stagefeedback-target-libgcc maybe-configure-stagefeedback-target-libgcc
+maybe-configure-stagefeedback-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-configure-stagefeedback-target-libgcc: configure-stagefeedback-target-libgcc
+configure-stagefeedback-target-libgcc:
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @$(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ echo "Checking multilib configuration for libgcc..."; \
+ $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/libgcc/multilib.tmp 2> /dev/null ; \
+ if test -r $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ if cmp -s $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; then \
+ rm -f $(TARGET_SUBDIR)/libgcc/multilib.tmp; \
+ else \
+ rm -f $(TARGET_SUBDIR)/libgcc/Makefile; \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ else \
+ mv $(TARGET_SUBDIR)/libgcc/multilib.tmp $(TARGET_SUBDIR)/libgcc/multilib.out; \
+ fi; \
+ test ! -f $(TARGET_SUBDIR)/libgcc/Makefile || exit 0; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export CFLAGS; \
+ LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use"; export LIBCFLAGS; \
+ echo Configuring stage feedback in $(TARGET_SUBDIR)/libgcc ; \
+ $(SHELL) $(srcdir)/mkinstalldirs $(TARGET_SUBDIR)/libgcc ; \
+ cd $(TARGET_SUBDIR)/libgcc || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
+ *) topdir=`echo $(TARGET_SUBDIR)/libgcc/ | \
+ sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \
+ esac; \
+ srcdiroption="--srcdir=$${topdir}/libgcc"; \
+ libsrcdir="$$s/libgcc"; \
+ $(SHELL) $${libsrcdir}/configure \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
+ --with-build-libsubdir=$(HOST_SUBDIR) \
+ @stage2_werror_flag@
+@endif target-libgcc-bootstrap
+
+
+
+
+
+.PHONY: all-target-libgcc maybe-all-target-libgcc
+maybe-all-target-libgcc:
+@if gcc-bootstrap
+all-target-libgcc: stage_current
+@endif gcc-bootstrap
+@if target-libgcc
+TARGET-target-libgcc=all
+maybe-all-target-libgcc: all-target-libgcc
+all-target-libgcc: configure-target-libgcc
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-newlib))
-@endif target-newlib
+ (cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) $(TARGET-target-libgcc))
+@endif target-libgcc
+.PHONY: all-stage1-target-libgcc maybe-all-stage1-target-libgcc
+.PHONY: clean-stage1-target-libgcc maybe-clean-stage1-target-libgcc
+maybe-all-stage1-target-libgcc:
+maybe-clean-stage1-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-all-stage1-target-libgcc: all-stage1-target-libgcc
+all-stage1: all-stage1-target-libgcc
+TARGET-stage1-target-libgcc = $(TARGET-target-libgcc)
+all-stage1-target-libgcc: configure-stage1-target-libgcc
+ @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ CFLAGS="$(STAGE1_CFLAGS)" LIBCFLAGS="$(STAGE1_CFLAGS)" \
+ $(TARGET-stage1-target-libgcc)
+maybe-clean-stage1-target-libgcc: clean-stage1-target-libgcc
+clean-stage1: clean-stage1-target-libgcc
+clean-stage1-target-libgcc:
+ @if [ $(current_stage) = stage1 ]; then \
+ [ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage1-libgcc/Makefile ] || exit 0; \
+ $(MAKE) stage1-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ clean
+@endif target-libgcc-bootstrap
+
+
+.PHONY: all-stage2-target-libgcc maybe-all-stage2-target-libgcc
+.PHONY: clean-stage2-target-libgcc maybe-clean-stage2-target-libgcc
+maybe-all-stage2-target-libgcc:
+maybe-clean-stage2-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-all-stage2-target-libgcc: all-stage2-target-libgcc
+all-stage2: all-stage2-target-libgcc
+TARGET-stage2-target-libgcc = $(TARGET-target-libgcc)
+all-stage2-target-libgcc: configure-stage2-target-libgcc
+ @[ $(current_stage) = stage2 ] || $(MAKE) stage2-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" \
+ $(TARGET-stage2-target-libgcc)
-.PHONY: check-target-newlib maybe-check-target-newlib
-maybe-check-target-newlib:
-@if target-newlib
-maybe-check-target-newlib: check-target-newlib
+maybe-clean-stage2-target-libgcc: clean-stage2-target-libgcc
+clean-stage2: clean-stage2-target-libgcc
+clean-stage2-target-libgcc:
+ @if [ $(current_stage) = stage2 ]; then \
+ [ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage2-libgcc/Makefile ] || exit 0; \
+ $(MAKE) stage2-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ \
+ clean
+@endif target-libgcc-bootstrap
+
+
+.PHONY: all-stage3-target-libgcc maybe-all-stage3-target-libgcc
+.PHONY: clean-stage3-target-libgcc maybe-clean-stage3-target-libgcc
+maybe-all-stage3-target-libgcc:
+maybe-clean-stage3-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-all-stage3-target-libgcc: all-stage3-target-libgcc
+all-stage3: all-stage3-target-libgcc
+TARGET-stage3-target-libgcc = $(TARGET-target-libgcc)
+all-stage3-target-libgcc: configure-stage3-target-libgcc
+ @[ $(current_stage) = stage3 ] || $(MAKE) stage3-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" \
+ $(TARGET-stage3-target-libgcc)
-check-target-newlib:
- @: $(MAKE); $(unstage)
+maybe-clean-stage3-target-libgcc: clean-stage3-target-libgcc
+clean-stage3: clean-stage3-target-libgcc
+clean-stage3-target-libgcc:
+ @if [ $(current_stage) = stage3 ]; then \
+ [ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage3-libgcc/Makefile ] || exit 0; \
+ $(MAKE) stage3-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ \
+ clean
+@endif target-libgcc-bootstrap
+
+
+.PHONY: all-stage4-target-libgcc maybe-all-stage4-target-libgcc
+.PHONY: clean-stage4-target-libgcc maybe-clean-stage4-target-libgcc
+maybe-all-stage4-target-libgcc:
+maybe-clean-stage4-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-all-stage4-target-libgcc: all-stage4-target-libgcc
+all-stage4: all-stage4-target-libgcc
+TARGET-stage4-target-libgcc = $(TARGET-target-libgcc)
+all-stage4-target-libgcc: configure-stage4-target-libgcc
+ @[ $(current_stage) = stage4 ] || $(MAKE) stage4-start
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/newlib && \
- $(MAKE) $(TARGET_FLAGS_TO_PASS) check)
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS)" LIBCFLAGS="$(BOOT_CFLAGS)" \
+ $(TARGET-stage4-target-libgcc)
-@endif target-newlib
+maybe-clean-stage4-target-libgcc: clean-stage4-target-libgcc
+clean-stage4: clean-stage4-target-libgcc
+clean-stage4-target-libgcc:
+ @if [ $(current_stage) = stage4 ]; then \
+ [ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stage4-libgcc/Makefile ] || exit 0; \
+ $(MAKE) stage4-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ \
+ clean
+@endif target-libgcc-bootstrap
+
+
+.PHONY: all-stageprofile-target-libgcc maybe-all-stageprofile-target-libgcc
+.PHONY: clean-stageprofile-target-libgcc maybe-clean-stageprofile-target-libgcc
+maybe-all-stageprofile-target-libgcc:
+maybe-clean-stageprofile-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-all-stageprofile-target-libgcc: all-stageprofile-target-libgcc
+all-stageprofile: all-stageprofile-target-libgcc
+TARGET-stageprofile-target-libgcc = $(TARGET-target-libgcc)
+all-stageprofile-target-libgcc: configure-stageprofile-target-libgcc
+ @[ $(current_stage) = stageprofile ] || $(MAKE) stageprofile-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-generate" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-generate" \
+ $(TARGET-stageprofile-target-libgcc)
-.PHONY: install-target-newlib maybe-install-target-newlib
-maybe-install-target-newlib:
-@if target-newlib
-maybe-install-target-newlib: install-target-newlib
+maybe-clean-stageprofile-target-libgcc: clean-stageprofile-target-libgcc
+clean-stageprofile: clean-stageprofile-target-libgcc
+clean-stageprofile-target-libgcc:
+ @if [ $(current_stage) = stageprofile ]; then \
+ [ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stageprofile-libgcc/Makefile ] || exit 0; \
+ $(MAKE) stageprofile-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ \
+ clean
+@endif target-libgcc-bootstrap
+
+
+.PHONY: all-stagefeedback-target-libgcc maybe-all-stagefeedback-target-libgcc
+.PHONY: clean-stagefeedback-target-libgcc maybe-clean-stagefeedback-target-libgcc
+maybe-all-stagefeedback-target-libgcc:
+maybe-clean-stagefeedback-target-libgcc:
+@if target-libgcc-bootstrap
+maybe-all-stagefeedback-target-libgcc: all-stagefeedback-target-libgcc
+all-stagefeedback: all-stagefeedback-target-libgcc
+TARGET-stagefeedback-target-libgcc = $(TARGET-target-libgcc)
+all-stagefeedback-target-libgcc: configure-stagefeedback-target-libgcc
+ @[ $(current_stage) = stagefeedback ] || $(MAKE) stagefeedback-start
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ CFLAGS="$(BOOT_CFLAGS) -fprofile-use" LIBCFLAGS="$(BOOT_CFLAGS) -fprofile-use" \
+ $(TARGET-stagefeedback-target-libgcc)
-install-target-newlib: installdirs
+maybe-clean-stagefeedback-target-libgcc: clean-stagefeedback-target-libgcc
+clean-stagefeedback: clean-stagefeedback-target-libgcc
+clean-stagefeedback-target-libgcc:
+ @if [ $(current_stage) = stagefeedback ]; then \
+ [ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0; \
+ else \
+ [ -f $(TARGET_SUBDIR)/stagefeedback-libgcc/Makefile ] || exit 0; \
+ $(MAKE) stagefeedback-start; \
+ fi; \
+ cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) \
+ \
+ clean
+@endif target-libgcc-bootstrap
+
+
+
+
+
+
+.PHONY: check-target-libgcc maybe-check-target-libgcc
+maybe-check-target-libgcc:
+@if target-libgcc
+maybe-check-target-libgcc: check-target-libgcc
+
+# Dummy target for uncheckable module.
+check-target-libgcc:
+
+@endif target-libgcc
+
+.PHONY: install-target-libgcc maybe-install-target-libgcc
+maybe-install-target-libgcc:
+@if target-libgcc
+maybe-install-target-libgcc: install-target-libgcc
+
+install-target-libgcc: installdirs
@: $(MAKE); $(unstage)
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install)
-@endif target-newlib
+@endif target-libgcc
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
-.PHONY: maybe-info-target-newlib info-target-newlib
-maybe-info-target-newlib:
-@if target-newlib
-maybe-info-target-newlib: info-target-newlib
+.PHONY: maybe-info-target-libgcc info-target-libgcc
+maybe-info-target-libgcc:
+@if target-libgcc
+maybe-info-target-libgcc: info-target-libgcc
-info-target-newlib: \
- configure-target-newlib
+info-target-libgcc: \
+ configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing info in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing info in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32715,25 +39905,25 @@ info-target-newlib: \
info) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-dvi-target-newlib dvi-target-newlib
-maybe-dvi-target-newlib:
-@if target-newlib
-maybe-dvi-target-newlib: dvi-target-newlib
+.PHONY: maybe-dvi-target-libgcc dvi-target-libgcc
+maybe-dvi-target-libgcc:
+@if target-libgcc
+maybe-dvi-target-libgcc: dvi-target-libgcc
-dvi-target-newlib: \
- configure-target-newlib
+dvi-target-libgcc: \
+ configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing dvi in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing dvi in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32741,25 +39931,51 @@ dvi-target-newlib: \
dvi) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-html-target-newlib html-target-newlib
-maybe-html-target-newlib:
-@if target-newlib
-maybe-html-target-newlib: html-target-newlib
+.PHONY: maybe-pdf-target-libgcc pdf-target-libgcc
+maybe-pdf-target-libgcc:
+@if target-libgcc
+maybe-pdf-target-libgcc: pdf-target-libgcc
-html-target-newlib: \
- configure-target-newlib
+pdf-target-libgcc: \
+ configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing html in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libgcc
+
+.PHONY: maybe-html-target-libgcc html-target-libgcc
+maybe-html-target-libgcc:
+@if target-libgcc
+maybe-html-target-libgcc: html-target-libgcc
+
+html-target-libgcc: \
+ configure-target-libgcc
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing html in $(TARGET_SUBDIR)/libgcc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32767,25 +39983,25 @@ html-target-newlib: \
html) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-TAGS-target-newlib TAGS-target-newlib
-maybe-TAGS-target-newlib:
-@if target-newlib
-maybe-TAGS-target-newlib: TAGS-target-newlib
+.PHONY: maybe-TAGS-target-libgcc TAGS-target-libgcc
+maybe-TAGS-target-libgcc:
+@if target-libgcc
+maybe-TAGS-target-libgcc: TAGS-target-libgcc
-TAGS-target-newlib: \
- configure-target-newlib
+TAGS-target-libgcc: \
+ configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing TAGS in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing TAGS in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32793,26 +40009,26 @@ TAGS-target-newlib: \
TAGS) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-install-info-target-newlib install-info-target-newlib
-maybe-install-info-target-newlib:
-@if target-newlib
-maybe-install-info-target-newlib: install-info-target-newlib
+.PHONY: maybe-install-info-target-libgcc install-info-target-libgcc
+maybe-install-info-target-libgcc:
+@if target-libgcc
+maybe-install-info-target-libgcc: install-info-target-libgcc
-install-info-target-newlib: \
- configure-target-newlib \
- info-target-newlib
+install-info-target-libgcc: \
+ configure-target-libgcc \
+ info-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-info in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing install-info in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32820,26 +40036,53 @@ install-info-target-newlib: \
install-info) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-install-html-target-newlib install-html-target-newlib
-maybe-install-html-target-newlib:
-@if target-newlib
-maybe-install-html-target-newlib: install-html-target-newlib
+.PHONY: maybe-install-pdf-target-libgcc install-pdf-target-libgcc
+maybe-install-pdf-target-libgcc:
+@if target-libgcc
+maybe-install-pdf-target-libgcc: install-pdf-target-libgcc
-install-html-target-newlib: \
- configure-target-newlib \
- html-target-newlib
+install-pdf-target-libgcc: \
+ configure-target-libgcc \
+ pdf-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing install-html in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libgcc
+
+.PHONY: maybe-install-html-target-libgcc install-html-target-libgcc
+maybe-install-html-target-libgcc:
+@if target-libgcc
+maybe-install-html-target-libgcc: install-html-target-libgcc
+
+install-html-target-libgcc: \
+ configure-target-libgcc \
+ html-target-libgcc
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-html in $(TARGET_SUBDIR)/libgcc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32847,25 +40090,25 @@ install-html-target-newlib: \
install-html) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-installcheck-target-newlib installcheck-target-newlib
-maybe-installcheck-target-newlib:
-@if target-newlib
-maybe-installcheck-target-newlib: installcheck-target-newlib
+.PHONY: maybe-installcheck-target-libgcc installcheck-target-libgcc
+maybe-installcheck-target-libgcc:
+@if target-libgcc
+maybe-installcheck-target-libgcc: installcheck-target-libgcc
-installcheck-target-newlib: \
- configure-target-newlib
+installcheck-target-libgcc: \
+ configure-target-libgcc
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing installcheck in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing installcheck in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32873,24 +40116,24 @@ installcheck-target-newlib: \
installcheck) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-mostlyclean-target-newlib mostlyclean-target-newlib
-maybe-mostlyclean-target-newlib:
-@if target-newlib
-maybe-mostlyclean-target-newlib: mostlyclean-target-newlib
+.PHONY: maybe-mostlyclean-target-libgcc mostlyclean-target-libgcc
+maybe-mostlyclean-target-libgcc:
+@if target-libgcc
+maybe-mostlyclean-target-libgcc: mostlyclean-target-libgcc
-mostlyclean-target-newlib:
+mostlyclean-target-libgcc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing mostlyclean in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing mostlyclean in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32898,24 +40141,24 @@ mostlyclean-target-newlib:
mostlyclean) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-clean-target-newlib clean-target-newlib
-maybe-clean-target-newlib:
-@if target-newlib
-maybe-clean-target-newlib: clean-target-newlib
+.PHONY: maybe-clean-target-libgcc clean-target-libgcc
+maybe-clean-target-libgcc:
+@if target-libgcc
+maybe-clean-target-libgcc: clean-target-libgcc
-clean-target-newlib:
+clean-target-libgcc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing clean in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing clean in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32923,24 +40166,24 @@ clean-target-newlib:
clean) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-distclean-target-newlib distclean-target-newlib
-maybe-distclean-target-newlib:
-@if target-newlib
-maybe-distclean-target-newlib: distclean-target-newlib
+.PHONY: maybe-distclean-target-libgcc distclean-target-libgcc
+maybe-distclean-target-libgcc:
+@if target-libgcc
+maybe-distclean-target-libgcc: distclean-target-libgcc
-distclean-target-newlib:
+distclean-target-libgcc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing distclean in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing distclean in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32948,24 +40191,24 @@ distclean-target-newlib:
distclean) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
-.PHONY: maybe-maintainer-clean-target-newlib maintainer-clean-target-newlib
-maybe-maintainer-clean-target-newlib:
-@if target-newlib
-maybe-maintainer-clean-target-newlib: maintainer-clean-target-newlib
+.PHONY: maybe-maintainer-clean-target-libgcc maintainer-clean-target-libgcc
+maybe-maintainer-clean-target-libgcc:
+@if target-libgcc
+maybe-maintainer-clean-target-libgcc: maintainer-clean-target-libgcc
-maintainer-clean-target-newlib:
+maintainer-clean-target-libgcc:
@: $(MAKE); $(unstage)
- @[ -f $(TARGET_SUBDIR)/newlib/Makefile ] || exit 0 ; \
+ @[ -f $(TARGET_SUBDIR)/libgcc/Makefile ] || exit 0 ; \
r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
$(NORMAL_TARGET_EXPORTS) \
- echo "Doing maintainer-clean in $(TARGET_SUBDIR)/newlib" ; \
+ echo "Doing maintainer-clean in $(TARGET_SUBDIR)/libgcc" ; \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- (cd $(TARGET_SUBDIR)/newlib && \
+ (cd $(TARGET_SUBDIR)/libgcc && \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
@@ -32973,7 +40216,7 @@ maintainer-clean-target-newlib:
maintainer-clean) \
|| exit 1
-@endif target-newlib
+@endif target-libgcc
@@ -32981,6 +40224,9 @@ maintainer-clean-target-newlib:
.PHONY: configure-target-libgfortran maybe-configure-target-libgfortran
maybe-configure-target-libgfortran:
+@if gcc-bootstrap
+configure-target-libgfortran: stage_current
+@endif gcc-bootstrap
@if target-libgfortran
maybe-configure-target-libgfortran: configure-target-libgfortran
configure-target-libgfortran:
@@ -33014,7 +40260,8 @@ configure-target-libgfortran:
libsrcdir="$$s/libgfortran"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libgfortran
@@ -33024,6 +40271,9 @@ configure-target-libgfortran:
.PHONY: all-target-libgfortran maybe-all-target-libgfortran
maybe-all-target-libgfortran:
+@if gcc-bootstrap
+all-target-libgfortran: stage_current
+@endif gcc-bootstrap
@if target-libgfortran
TARGET-target-libgfortran=all
maybe-all-target-libgfortran: all-target-libgfortran
@@ -33070,7 +40320,7 @@ install-target-libgfortran: installdirs
@endif target-libgfortran
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libgfortran info-target-libgfortran
maybe-info-target-libgfortran:
@@ -33124,6 +40374,32 @@ dvi-target-libgfortran: \
@endif target-libgfortran
+.PHONY: maybe-pdf-target-libgfortran pdf-target-libgfortran
+maybe-pdf-target-libgfortran:
+@if target-libgfortran
+maybe-pdf-target-libgfortran: pdf-target-libgfortran
+
+pdf-target-libgfortran: \
+ configure-target-libgfortran
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgfortran" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libgfortran
+
.PHONY: maybe-html-target-libgfortran html-target-libgfortran
maybe-html-target-libgfortran:
@if target-libgfortran
@@ -33203,6 +40479,33 @@ install-info-target-libgfortran: \
@endif target-libgfortran
+.PHONY: maybe-install-pdf-target-libgfortran install-pdf-target-libgfortran
+maybe-install-pdf-target-libgfortran:
+@if target-libgfortran
+maybe-install-pdf-target-libgfortran: install-pdf-target-libgfortran
+
+install-pdf-target-libgfortran: \
+ configure-target-libgfortran \
+ pdf-target-libgfortran
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgfortran/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgfortran" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgfortran && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libgfortran
+
.PHONY: maybe-install-html-target-libgfortran install-html-target-libgfortran
maybe-install-html-target-libgfortran:
@if target-libgfortran
@@ -33362,6 +40665,9 @@ maintainer-clean-target-libgfortran:
.PHONY: configure-target-libobjc maybe-configure-target-libobjc
maybe-configure-target-libobjc:
+@if gcc-bootstrap
+configure-target-libobjc: stage_current
+@endif gcc-bootstrap
@if target-libobjc
maybe-configure-target-libobjc: configure-target-libobjc
configure-target-libobjc:
@@ -33395,7 +40701,8 @@ configure-target-libobjc:
libsrcdir="$$s/libobjc"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libobjc
@@ -33405,6 +40712,9 @@ configure-target-libobjc:
.PHONY: all-target-libobjc maybe-all-target-libobjc
maybe-all-target-libobjc:
+@if gcc-bootstrap
+all-target-libobjc: stage_current
+@endif gcc-bootstrap
@if target-libobjc
TARGET-target-libobjc=all
maybe-all-target-libobjc: all-target-libobjc
@@ -33451,7 +40761,7 @@ install-target-libobjc: installdirs
@endif target-libobjc
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libobjc info-target-libobjc
maybe-info-target-libobjc:
@@ -33505,6 +40815,32 @@ dvi-target-libobjc: \
@endif target-libobjc
+.PHONY: maybe-pdf-target-libobjc pdf-target-libobjc
+maybe-pdf-target-libobjc:
+@if target-libobjc
+maybe-pdf-target-libobjc: pdf-target-libobjc
+
+pdf-target-libobjc: \
+ configure-target-libobjc
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libobjc
+
.PHONY: maybe-html-target-libobjc html-target-libobjc
maybe-html-target-libobjc:
@if target-libobjc
@@ -33584,6 +40920,33 @@ install-info-target-libobjc: \
@endif target-libobjc
+.PHONY: maybe-install-pdf-target-libobjc install-pdf-target-libobjc
+maybe-install-pdf-target-libobjc:
+@if target-libobjc
+maybe-install-pdf-target-libobjc: install-pdf-target-libobjc
+
+install-pdf-target-libobjc: \
+ configure-target-libobjc \
+ pdf-target-libobjc
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libobjc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libobjc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libobjc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libobjc
+
.PHONY: maybe-install-html-target-libobjc install-html-target-libobjc
maybe-install-html-target-libobjc:
@if target-libobjc
@@ -33743,6 +41106,9 @@ maintainer-clean-target-libobjc:
.PHONY: configure-target-libtermcap maybe-configure-target-libtermcap
maybe-configure-target-libtermcap:
+@if gcc-bootstrap
+configure-target-libtermcap: stage_current
+@endif gcc-bootstrap
@if target-libtermcap
maybe-configure-target-libtermcap: configure-target-libtermcap
configure-target-libtermcap:
@@ -33776,7 +41142,8 @@ configure-target-libtermcap:
libsrcdir="$$s/libtermcap"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libtermcap
@@ -33786,6 +41153,9 @@ configure-target-libtermcap:
.PHONY: all-target-libtermcap maybe-all-target-libtermcap
maybe-all-target-libtermcap:
+@if gcc-bootstrap
+all-target-libtermcap: stage_current
+@endif gcc-bootstrap
@if target-libtermcap
TARGET-target-libtermcap=all
maybe-all-target-libtermcap: all-target-libtermcap
@@ -33827,7 +41197,7 @@ install-target-libtermcap: installdirs
@endif target-libtermcap
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libtermcap info-target-libtermcap
maybe-info-target-libtermcap:
@@ -33881,6 +41251,32 @@ dvi-target-libtermcap: \
@endif target-libtermcap
+.PHONY: maybe-pdf-target-libtermcap pdf-target-libtermcap
+maybe-pdf-target-libtermcap:
+@if target-libtermcap
+maybe-pdf-target-libtermcap: pdf-target-libtermcap
+
+pdf-target-libtermcap: \
+ configure-target-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libtermcap
+
.PHONY: maybe-html-target-libtermcap html-target-libtermcap
maybe-html-target-libtermcap:
@if target-libtermcap
@@ -33960,6 +41356,33 @@ install-info-target-libtermcap: \
@endif target-libtermcap
+.PHONY: maybe-install-pdf-target-libtermcap install-pdf-target-libtermcap
+maybe-install-pdf-target-libtermcap:
+@if target-libtermcap
+maybe-install-pdf-target-libtermcap: install-pdf-target-libtermcap
+
+install-pdf-target-libtermcap: \
+ configure-target-libtermcap \
+ pdf-target-libtermcap
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libtermcap/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libtermcap" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libtermcap && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libtermcap
+
.PHONY: maybe-install-html-target-libtermcap install-html-target-libtermcap
maybe-install-html-target-libtermcap:
@if target-libtermcap
@@ -34059,6 +41482,9 @@ maintainer-clean-target-libtermcap:
.PHONY: configure-target-winsup maybe-configure-target-winsup
maybe-configure-target-winsup:
+@if gcc-bootstrap
+configure-target-winsup: stage_current
+@endif gcc-bootstrap
@if target-winsup
maybe-configure-target-winsup: configure-target-winsup
configure-target-winsup:
@@ -34092,7 +41518,8 @@ configure-target-winsup:
libsrcdir="$$s/winsup"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-winsup
@@ -34102,6 +41529,9 @@ configure-target-winsup:
.PHONY: all-target-winsup maybe-all-target-winsup
maybe-all-target-winsup:
+@if gcc-bootstrap
+all-target-winsup: stage_current
+@endif gcc-bootstrap
@if target-winsup
TARGET-target-winsup=all
maybe-all-target-winsup: all-target-winsup
@@ -34148,7 +41578,7 @@ install-target-winsup: installdirs
@endif target-winsup
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-winsup info-target-winsup
maybe-info-target-winsup:
@@ -34202,6 +41632,32 @@ dvi-target-winsup: \
@endif target-winsup
+.PHONY: maybe-pdf-target-winsup pdf-target-winsup
+maybe-pdf-target-winsup:
+@if target-winsup
+maybe-pdf-target-winsup: pdf-target-winsup
+
+pdf-target-winsup: \
+ configure-target-winsup
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-winsup
+
.PHONY: maybe-html-target-winsup html-target-winsup
maybe-html-target-winsup:
@if target-winsup
@@ -34281,6 +41737,33 @@ install-info-target-winsup: \
@endif target-winsup
+.PHONY: maybe-install-pdf-target-winsup install-pdf-target-winsup
+maybe-install-pdf-target-winsup:
+@if target-winsup
+maybe-install-pdf-target-winsup: install-pdf-target-winsup
+
+install-pdf-target-winsup: \
+ configure-target-winsup \
+ pdf-target-winsup
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/winsup/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/winsup" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/winsup && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-winsup
+
.PHONY: maybe-install-html-target-winsup install-html-target-winsup
maybe-install-html-target-winsup:
@if target-winsup
@@ -34440,6 +41923,9 @@ maintainer-clean-target-winsup:
.PHONY: configure-target-libgloss maybe-configure-target-libgloss
maybe-configure-target-libgloss:
+@if gcc-bootstrap
+configure-target-libgloss: stage_current
+@endif gcc-bootstrap
@if target-libgloss
maybe-configure-target-libgloss: configure-target-libgloss
configure-target-libgloss:
@@ -34473,7 +41959,8 @@ configure-target-libgloss:
libsrcdir="$$s/libgloss"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libgloss
@@ -34483,6 +41970,9 @@ configure-target-libgloss:
.PHONY: all-target-libgloss maybe-all-target-libgloss
maybe-all-target-libgloss:
+@if gcc-bootstrap
+all-target-libgloss: stage_current
+@endif gcc-bootstrap
@if target-libgloss
TARGET-target-libgloss=all
maybe-all-target-libgloss: all-target-libgloss
@@ -34524,7 +42014,7 @@ install-target-libgloss: installdirs
@endif target-libgloss
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libgloss info-target-libgloss
maybe-info-target-libgloss:
@@ -34578,6 +42068,32 @@ dvi-target-libgloss: \
@endif target-libgloss
+.PHONY: maybe-pdf-target-libgloss pdf-target-libgloss
+maybe-pdf-target-libgloss:
+@if target-libgloss
+maybe-pdf-target-libgloss: pdf-target-libgloss
+
+pdf-target-libgloss: \
+ configure-target-libgloss
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libgloss
+
.PHONY: maybe-html-target-libgloss html-target-libgloss
maybe-html-target-libgloss:
@if target-libgloss
@@ -34657,6 +42173,33 @@ install-info-target-libgloss: \
@endif target-libgloss
+.PHONY: maybe-install-pdf-target-libgloss install-pdf-target-libgloss
+maybe-install-pdf-target-libgloss:
+@if target-libgloss
+maybe-install-pdf-target-libgloss: install-pdf-target-libgloss
+
+install-pdf-target-libgloss: \
+ configure-target-libgloss \
+ pdf-target-libgloss
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgloss/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgloss" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgloss && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libgloss
+
.PHONY: maybe-install-html-target-libgloss install-html-target-libgloss
maybe-install-html-target-libgloss:
@if target-libgloss
@@ -34816,6 +42359,9 @@ maintainer-clean-target-libgloss:
.PHONY: configure-target-libiberty maybe-configure-target-libiberty
maybe-configure-target-libiberty:
+@if gcc-bootstrap
+configure-target-libiberty: stage_current
+@endif gcc-bootstrap
@if target-libiberty
maybe-configure-target-libiberty: configure-target-libiberty
configure-target-libiberty:
@@ -34849,7 +42395,8 @@ configure-target-libiberty:
libsrcdir="$$s/libiberty"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libiberty
@@ -34859,6 +42406,9 @@ configure-target-libiberty:
.PHONY: all-target-libiberty maybe-all-target-libiberty
maybe-all-target-libiberty:
+@if gcc-bootstrap
+all-target-libiberty: stage_current
+@endif gcc-bootstrap
@if target-libiberty
TARGET-target-libiberty=all
maybe-all-target-libiberty: all-target-libiberty
@@ -34905,7 +42455,7 @@ install-target-libiberty: installdirs
@endif target-libiberty
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libiberty info-target-libiberty
maybe-info-target-libiberty:
@@ -34959,6 +42509,32 @@ dvi-target-libiberty: \
@endif target-libiberty
+.PHONY: maybe-pdf-target-libiberty pdf-target-libiberty
+maybe-pdf-target-libiberty:
+@if target-libiberty
+maybe-pdf-target-libiberty: pdf-target-libiberty
+
+pdf-target-libiberty: \
+ configure-target-libiberty
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libiberty
+
.PHONY: maybe-html-target-libiberty html-target-libiberty
maybe-html-target-libiberty:
@if target-libiberty
@@ -35038,6 +42614,33 @@ install-info-target-libiberty: \
@endif target-libiberty
+.PHONY: maybe-install-pdf-target-libiberty install-pdf-target-libiberty
+maybe-install-pdf-target-libiberty:
+@if target-libiberty
+maybe-install-pdf-target-libiberty: install-pdf-target-libiberty
+
+install-pdf-target-libiberty: \
+ configure-target-libiberty \
+ pdf-target-libiberty
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libiberty/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libiberty" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libiberty && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libiberty
+
.PHONY: maybe-install-html-target-libiberty install-html-target-libiberty
maybe-install-html-target-libiberty:
@if target-libiberty
@@ -35197,6 +42800,9 @@ maintainer-clean-target-libiberty:
.PHONY: configure-target-gperf maybe-configure-target-gperf
maybe-configure-target-gperf:
+@if gcc-bootstrap
+configure-target-gperf: stage_current
+@endif gcc-bootstrap
@if target-gperf
maybe-configure-target-gperf: configure-target-gperf
configure-target-gperf:
@@ -35230,7 +42836,8 @@ configure-target-gperf:
libsrcdir="$$s/gperf"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-gperf
@@ -35240,6 +42847,9 @@ configure-target-gperf:
.PHONY: all-target-gperf maybe-all-target-gperf
maybe-all-target-gperf:
+@if gcc-bootstrap
+all-target-gperf: stage_current
+@endif gcc-bootstrap
@if target-gperf
TARGET-target-gperf=all
maybe-all-target-gperf: all-target-gperf
@@ -35286,7 +42896,7 @@ install-target-gperf: installdirs
@endif target-gperf
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-gperf info-target-gperf
maybe-info-target-gperf:
@@ -35340,6 +42950,32 @@ dvi-target-gperf: \
@endif target-gperf
+.PHONY: maybe-pdf-target-gperf pdf-target-gperf
+maybe-pdf-target-gperf:
+@if target-gperf
+maybe-pdf-target-gperf: pdf-target-gperf
+
+pdf-target-gperf: \
+ configure-target-gperf
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-gperf
+
.PHONY: maybe-html-target-gperf html-target-gperf
maybe-html-target-gperf:
@if target-gperf
@@ -35419,6 +43055,33 @@ install-info-target-gperf: \
@endif target-gperf
+.PHONY: maybe-install-pdf-target-gperf install-pdf-target-gperf
+maybe-install-pdf-target-gperf:
+@if target-gperf
+maybe-install-pdf-target-gperf: install-pdf-target-gperf
+
+install-pdf-target-gperf: \
+ configure-target-gperf \
+ pdf-target-gperf
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/gperf/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/gperf" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/gperf && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-gperf
+
.PHONY: maybe-install-html-target-gperf install-html-target-gperf
maybe-install-html-target-gperf:
@if target-gperf
@@ -35578,6 +43241,9 @@ maintainer-clean-target-gperf:
.PHONY: configure-target-examples maybe-configure-target-examples
maybe-configure-target-examples:
+@if gcc-bootstrap
+configure-target-examples: stage_current
+@endif gcc-bootstrap
@if target-examples
maybe-configure-target-examples: configure-target-examples
configure-target-examples:
@@ -35611,7 +43277,8 @@ configure-target-examples:
libsrcdir="$$s/examples"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-examples
@@ -35621,6 +43288,9 @@ configure-target-examples:
.PHONY: all-target-examples maybe-all-target-examples
maybe-all-target-examples:
+@if gcc-bootstrap
+all-target-examples: stage_current
+@endif gcc-bootstrap
@if target-examples
TARGET-target-examples=all
maybe-all-target-examples: all-target-examples
@@ -35657,7 +43327,7 @@ install-target-examples:
@endif target-examples
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-examples info-target-examples
maybe-info-target-examples:
@@ -35711,6 +43381,32 @@ dvi-target-examples: \
@endif target-examples
+.PHONY: maybe-pdf-target-examples pdf-target-examples
+maybe-pdf-target-examples:
+@if target-examples
+maybe-pdf-target-examples: pdf-target-examples
+
+pdf-target-examples: \
+ configure-target-examples
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-examples
+
.PHONY: maybe-html-target-examples html-target-examples
maybe-html-target-examples:
@if target-examples
@@ -35790,6 +43486,33 @@ install-info-target-examples: \
@endif target-examples
+.PHONY: maybe-install-pdf-target-examples install-pdf-target-examples
+maybe-install-pdf-target-examples:
+@if target-examples
+maybe-install-pdf-target-examples: install-pdf-target-examples
+
+install-pdf-target-examples: \
+ configure-target-examples \
+ pdf-target-examples
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/examples/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/examples" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/examples && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-examples
+
.PHONY: maybe-install-html-target-examples install-html-target-examples
maybe-install-html-target-examples:
@if target-examples
@@ -35949,6 +43672,9 @@ maintainer-clean-target-examples:
.PHONY: configure-target-libffi maybe-configure-target-libffi
maybe-configure-target-libffi:
+@if gcc-bootstrap
+configure-target-libffi: stage_current
+@endif gcc-bootstrap
@if target-libffi
maybe-configure-target-libffi: configure-target-libffi
configure-target-libffi:
@@ -35982,7 +43708,8 @@ configure-target-libffi:
libsrcdir="$$s/libffi"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libffi
@@ -35992,6 +43719,9 @@ configure-target-libffi:
.PHONY: all-target-libffi maybe-all-target-libffi
maybe-all-target-libffi:
+@if gcc-bootstrap
+all-target-libffi: stage_current
+@endif gcc-bootstrap
@if target-libffi
TARGET-target-libffi=all
maybe-all-target-libffi: all-target-libffi
@@ -36038,7 +43768,7 @@ install-target-libffi: installdirs
@endif target-libffi
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libffi info-target-libffi
maybe-info-target-libffi:
@@ -36092,6 +43822,32 @@ dvi-target-libffi: \
@endif target-libffi
+.PHONY: maybe-pdf-target-libffi pdf-target-libffi
+maybe-pdf-target-libffi:
+@if target-libffi
+maybe-pdf-target-libffi: pdf-target-libffi
+
+pdf-target-libffi: \
+ configure-target-libffi
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libffi
+
.PHONY: maybe-html-target-libffi html-target-libffi
maybe-html-target-libffi:
@if target-libffi
@@ -36171,6 +43927,33 @@ install-info-target-libffi: \
@endif target-libffi
+.PHONY: maybe-install-pdf-target-libffi install-pdf-target-libffi
+maybe-install-pdf-target-libffi:
+@if target-libffi
+maybe-install-pdf-target-libffi: install-pdf-target-libffi
+
+install-pdf-target-libffi: \
+ configure-target-libffi \
+ pdf-target-libffi
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libffi/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libffi" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libffi && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libffi
+
.PHONY: maybe-install-html-target-libffi install-html-target-libffi
maybe-install-html-target-libffi:
@if target-libffi
@@ -36330,6 +44113,9 @@ maintainer-clean-target-libffi:
.PHONY: configure-target-libjava maybe-configure-target-libjava
maybe-configure-target-libjava:
+@if gcc-bootstrap
+configure-target-libjava: stage_current
+@endif gcc-bootstrap
@if target-libjava
maybe-configure-target-libjava: configure-target-libjava
configure-target-libjava:
@@ -36363,7 +44149,8 @@ configure-target-libjava:
libsrcdir="$$s/libjava"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libjava
@@ -36373,6 +44160,9 @@ configure-target-libjava:
.PHONY: all-target-libjava maybe-all-target-libjava
maybe-all-target-libjava:
+@if gcc-bootstrap
+all-target-libjava: stage_current
+@endif gcc-bootstrap
@if target-libjava
TARGET-target-libjava=all
maybe-all-target-libjava: all-target-libjava
@@ -36419,7 +44209,7 @@ install-target-libjava: installdirs
@endif target-libjava
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libjava info-target-libjava
maybe-info-target-libjava:
@@ -36473,6 +44263,32 @@ dvi-target-libjava: \
@endif target-libjava
+.PHONY: maybe-pdf-target-libjava pdf-target-libjava
+maybe-pdf-target-libjava:
+@if target-libjava
+maybe-pdf-target-libjava: pdf-target-libjava
+
+pdf-target-libjava: \
+ configure-target-libjava
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libjava
+
.PHONY: maybe-html-target-libjava html-target-libjava
maybe-html-target-libjava:
@if target-libjava
@@ -36552,6 +44368,33 @@ install-info-target-libjava: \
@endif target-libjava
+.PHONY: maybe-install-pdf-target-libjava install-pdf-target-libjava
+maybe-install-pdf-target-libjava:
+@if target-libjava
+maybe-install-pdf-target-libjava: install-pdf-target-libjava
+
+install-pdf-target-libjava: \
+ configure-target-libjava \
+ pdf-target-libjava
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libjava/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(RAW_CXX_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libjava" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libjava && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libjava
+
.PHONY: maybe-install-html-target-libjava install-html-target-libjava
maybe-install-html-target-libjava:
@if target-libjava
@@ -36711,6 +44554,9 @@ maintainer-clean-target-libjava:
.PHONY: configure-target-zlib maybe-configure-target-zlib
maybe-configure-target-zlib:
+@if gcc-bootstrap
+configure-target-zlib: stage_current
+@endif gcc-bootstrap
@if target-zlib
maybe-configure-target-zlib: configure-target-zlib
configure-target-zlib:
@@ -36744,7 +44590,8 @@ configure-target-zlib:
libsrcdir="$$s/zlib"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-zlib
@@ -36754,6 +44601,9 @@ configure-target-zlib:
.PHONY: all-target-zlib maybe-all-target-zlib
maybe-all-target-zlib:
+@if gcc-bootstrap
+all-target-zlib: stage_current
+@endif gcc-bootstrap
@if target-zlib
TARGET-target-zlib=all
maybe-all-target-zlib: all-target-zlib
@@ -36800,7 +44650,7 @@ install-target-zlib: installdirs
@endif target-zlib
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-zlib info-target-zlib
maybe-info-target-zlib:
@@ -36854,6 +44704,32 @@ dvi-target-zlib: \
@endif target-zlib
+.PHONY: maybe-pdf-target-zlib pdf-target-zlib
+maybe-pdf-target-zlib:
+@if target-zlib
+maybe-pdf-target-zlib: pdf-target-zlib
+
+pdf-target-zlib: \
+ configure-target-zlib
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-zlib
+
.PHONY: maybe-html-target-zlib html-target-zlib
maybe-html-target-zlib:
@if target-zlib
@@ -36933,6 +44809,33 @@ install-info-target-zlib: \
@endif target-zlib
+.PHONY: maybe-install-pdf-target-zlib install-pdf-target-zlib
+maybe-install-pdf-target-zlib:
+@if target-zlib
+maybe-install-pdf-target-zlib: install-pdf-target-zlib
+
+install-pdf-target-zlib: \
+ configure-target-zlib \
+ pdf-target-zlib
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/zlib/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/zlib" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/zlib && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-zlib
+
.PHONY: maybe-install-html-target-zlib install-html-target-zlib
maybe-install-html-target-zlib:
@if target-zlib
@@ -37092,6 +44995,9 @@ maintainer-clean-target-zlib:
.PHONY: configure-target-boehm-gc maybe-configure-target-boehm-gc
maybe-configure-target-boehm-gc:
+@if gcc-bootstrap
+configure-target-boehm-gc: stage_current
+@endif gcc-bootstrap
@if target-boehm-gc
maybe-configure-target-boehm-gc: configure-target-boehm-gc
configure-target-boehm-gc:
@@ -37125,7 +45031,8 @@ configure-target-boehm-gc:
libsrcdir="$$s/boehm-gc"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-boehm-gc
@@ -37135,6 +45042,9 @@ configure-target-boehm-gc:
.PHONY: all-target-boehm-gc maybe-all-target-boehm-gc
maybe-all-target-boehm-gc:
+@if gcc-bootstrap
+all-target-boehm-gc: stage_current
+@endif gcc-bootstrap
@if target-boehm-gc
TARGET-target-boehm-gc=all
maybe-all-target-boehm-gc: all-target-boehm-gc
@@ -37181,7 +45091,7 @@ install-target-boehm-gc: installdirs
@endif target-boehm-gc
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-boehm-gc info-target-boehm-gc
maybe-info-target-boehm-gc:
@@ -37235,6 +45145,32 @@ dvi-target-boehm-gc: \
@endif target-boehm-gc
+.PHONY: maybe-pdf-target-boehm-gc pdf-target-boehm-gc
+maybe-pdf-target-boehm-gc:
+@if target-boehm-gc
+maybe-pdf-target-boehm-gc: pdf-target-boehm-gc
+
+pdf-target-boehm-gc: \
+ configure-target-boehm-gc
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-boehm-gc
+
.PHONY: maybe-html-target-boehm-gc html-target-boehm-gc
maybe-html-target-boehm-gc:
@if target-boehm-gc
@@ -37314,6 +45250,33 @@ install-info-target-boehm-gc: \
@endif target-boehm-gc
+.PHONY: maybe-install-pdf-target-boehm-gc install-pdf-target-boehm-gc
+maybe-install-pdf-target-boehm-gc:
+@if target-boehm-gc
+maybe-install-pdf-target-boehm-gc: install-pdf-target-boehm-gc
+
+install-pdf-target-boehm-gc: \
+ configure-target-boehm-gc \
+ pdf-target-boehm-gc
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/boehm-gc/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/boehm-gc" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/boehm-gc && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-boehm-gc
+
.PHONY: maybe-install-html-target-boehm-gc install-html-target-boehm-gc
maybe-install-html-target-boehm-gc:
@if target-boehm-gc
@@ -37473,6 +45436,9 @@ maintainer-clean-target-boehm-gc:
.PHONY: configure-target-qthreads maybe-configure-target-qthreads
maybe-configure-target-qthreads:
+@if gcc-bootstrap
+configure-target-qthreads: stage_current
+@endif gcc-bootstrap
@if target-qthreads
maybe-configure-target-qthreads: configure-target-qthreads
configure-target-qthreads:
@@ -37506,7 +45472,8 @@ configure-target-qthreads:
libsrcdir="$$s/qthreads"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-qthreads
@@ -37516,6 +45483,9 @@ configure-target-qthreads:
.PHONY: all-target-qthreads maybe-all-target-qthreads
maybe-all-target-qthreads:
+@if gcc-bootstrap
+all-target-qthreads: stage_current
+@endif gcc-bootstrap
@if target-qthreads
TARGET-target-qthreads=all
maybe-all-target-qthreads: all-target-qthreads
@@ -37562,7 +45532,7 @@ install-target-qthreads: installdirs
@endif target-qthreads
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-qthreads info-target-qthreads
maybe-info-target-qthreads:
@@ -37616,6 +45586,32 @@ dvi-target-qthreads: \
@endif target-qthreads
+.PHONY: maybe-pdf-target-qthreads pdf-target-qthreads
+maybe-pdf-target-qthreads:
+@if target-qthreads
+maybe-pdf-target-qthreads: pdf-target-qthreads
+
+pdf-target-qthreads: \
+ configure-target-qthreads
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-qthreads
+
.PHONY: maybe-html-target-qthreads html-target-qthreads
maybe-html-target-qthreads:
@if target-qthreads
@@ -37695,6 +45691,33 @@ install-info-target-qthreads: \
@endif target-qthreads
+.PHONY: maybe-install-pdf-target-qthreads install-pdf-target-qthreads
+maybe-install-pdf-target-qthreads:
+@if target-qthreads
+maybe-install-pdf-target-qthreads: install-pdf-target-qthreads
+
+install-pdf-target-qthreads: \
+ configure-target-qthreads \
+ pdf-target-qthreads
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/qthreads/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/qthreads" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/qthreads && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-qthreads
+
.PHONY: maybe-install-html-target-qthreads install-html-target-qthreads
maybe-install-html-target-qthreads:
@if target-qthreads
@@ -37854,6 +45877,9 @@ maintainer-clean-target-qthreads:
.PHONY: configure-target-rda maybe-configure-target-rda
maybe-configure-target-rda:
+@if gcc-bootstrap
+configure-target-rda: stage_current
+@endif gcc-bootstrap
@if target-rda
maybe-configure-target-rda: configure-target-rda
configure-target-rda:
@@ -37887,7 +45913,8 @@ configure-target-rda:
libsrcdir="$$s/rda"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-rda
@@ -37897,6 +45924,9 @@ configure-target-rda:
.PHONY: all-target-rda maybe-all-target-rda
maybe-all-target-rda:
+@if gcc-bootstrap
+all-target-rda: stage_current
+@endif gcc-bootstrap
@if target-rda
TARGET-target-rda=all
maybe-all-target-rda: all-target-rda
@@ -37943,7 +45973,7 @@ install-target-rda: installdirs
@endif target-rda
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-rda info-target-rda
maybe-info-target-rda:
@@ -37997,6 +46027,32 @@ dvi-target-rda: \
@endif target-rda
+.PHONY: maybe-pdf-target-rda pdf-target-rda
+maybe-pdf-target-rda:
+@if target-rda
+maybe-pdf-target-rda: pdf-target-rda
+
+pdf-target-rda: \
+ configure-target-rda
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-rda
+
.PHONY: maybe-html-target-rda html-target-rda
maybe-html-target-rda:
@if target-rda
@@ -38076,6 +46132,33 @@ install-info-target-rda: \
@endif target-rda
+.PHONY: maybe-install-pdf-target-rda install-pdf-target-rda
+maybe-install-pdf-target-rda:
+@if target-rda
+maybe-install-pdf-target-rda: install-pdf-target-rda
+
+install-pdf-target-rda: \
+ configure-target-rda \
+ pdf-target-rda
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/rda/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/rda" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/rda && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-rda
+
.PHONY: maybe-install-html-target-rda install-html-target-rda
maybe-install-html-target-rda:
@if target-rda
@@ -38235,6 +46318,9 @@ maintainer-clean-target-rda:
.PHONY: configure-target-libada maybe-configure-target-libada
maybe-configure-target-libada:
+@if gcc-bootstrap
+configure-target-libada: stage_current
+@endif gcc-bootstrap
@if target-libada
maybe-configure-target-libada: configure-target-libada
configure-target-libada:
@@ -38268,7 +46354,8 @@ configure-target-libada:
libsrcdir="$$s/libada"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libada
@@ -38278,6 +46365,9 @@ configure-target-libada:
.PHONY: all-target-libada maybe-all-target-libada
maybe-all-target-libada:
+@if gcc-bootstrap
+all-target-libada: stage_current
+@endif gcc-bootstrap
@if target-libada
TARGET-target-libada=all
maybe-all-target-libada: all-target-libada
@@ -38324,7 +46414,7 @@ install-target-libada: installdirs
@endif target-libada
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libada info-target-libada
maybe-info-target-libada:
@@ -38378,6 +46468,32 @@ dvi-target-libada: \
@endif target-libada
+.PHONY: maybe-pdf-target-libada pdf-target-libada
+maybe-pdf-target-libada:
+@if target-libada
+maybe-pdf-target-libada: pdf-target-libada
+
+pdf-target-libada: \
+ configure-target-libada
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libada" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libada && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libada
+
.PHONY: maybe-html-target-libada html-target-libada
maybe-html-target-libada:
@if target-libada
@@ -38457,6 +46573,33 @@ install-info-target-libada: \
@endif target-libada
+.PHONY: maybe-install-pdf-target-libada install-pdf-target-libada
+maybe-install-pdf-target-libada:
+@if target-libada
+maybe-install-pdf-target-libada: install-pdf-target-libada
+
+install-pdf-target-libada: \
+ configure-target-libada \
+ pdf-target-libada
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libada/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libada" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libada && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libada
+
.PHONY: maybe-install-html-target-libada install-html-target-libada
maybe-install-html-target-libada:
@if target-libada
@@ -38616,6 +46759,9 @@ maintainer-clean-target-libada:
.PHONY: configure-target-libgomp maybe-configure-target-libgomp
maybe-configure-target-libgomp:
+@if gcc-bootstrap
+configure-target-libgomp: stage_current
+@endif gcc-bootstrap
@if target-libgomp
maybe-configure-target-libgomp: configure-target-libgomp
configure-target-libgomp:
@@ -38649,7 +46795,8 @@ configure-target-libgomp:
libsrcdir="$$s/libgomp"; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(TARGET_CONFIGARGS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) --build=${build_alias} --host=${target_alias} \
+ --target=${target_alias} $${srcdiroption} \
|| exit 1
@endif target-libgomp
@@ -38659,6 +46806,9 @@ configure-target-libgomp:
.PHONY: all-target-libgomp maybe-all-target-libgomp
maybe-all-target-libgomp:
+@if gcc-bootstrap
+all-target-libgomp: stage_current
+@endif gcc-bootstrap
@if target-libgomp
TARGET-target-libgomp=all
maybe-all-target-libgomp: all-target-libgomp
@@ -38705,7 +46855,7 @@ install-target-libgomp: installdirs
@endif target-libgomp
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
.PHONY: maybe-info-target-libgomp info-target-libgomp
maybe-info-target-libgomp:
@@ -38759,6 +46909,32 @@ dvi-target-libgomp: \
@endif target-libgomp
+.PHONY: maybe-pdf-target-libgomp pdf-target-libgomp
+maybe-pdf-target-libgomp:
+@if target-libgomp
+maybe-pdf-target-libgomp: pdf-target-libgomp
+
+pdf-target-libgomp: \
+ configure-target-libgomp
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing pdf in $(TARGET_SUBDIR)/libgomp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgomp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ pdf) \
+ || exit 1
+
+@endif target-libgomp
+
.PHONY: maybe-html-target-libgomp html-target-libgomp
maybe-html-target-libgomp:
@if target-libgomp
@@ -38838,6 +47014,33 @@ install-info-target-libgomp: \
@endif target-libgomp
+.PHONY: maybe-install-pdf-target-libgomp install-pdf-target-libgomp
+maybe-install-pdf-target-libgomp:
+@if target-libgomp
+maybe-install-pdf-target-libgomp: install-pdf-target-libgomp
+
+install-pdf-target-libgomp: \
+ configure-target-libgomp \
+ pdf-target-libgomp
+ @: $(MAKE); $(unstage)
+ @[ -f $(TARGET_SUBDIR)/libgomp/Makefile ] || exit 0 ; \
+ r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(NORMAL_TARGET_EXPORTS) \
+ echo "Doing install-pdf in $(TARGET_SUBDIR)/libgomp" ; \
+ for flag in $(EXTRA_TARGET_FLAGS); do \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
+ done; \
+ (cd $(TARGET_SUBDIR)/libgomp && \
+ $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
+ "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
+ "RANLIB=$${RANLIB}" \
+ "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \
+ install-pdf) \
+ || exit 1
+
+@endif target-libgomp
+
.PHONY: maybe-install-html-target-libgomp install-html-target-libgomp
maybe-install-html-target-libgomp:
@if target-libgomp
@@ -38998,60 +47201,6 @@ maintainer-clean-target-libgomp:
# ----------
@if gcc-no-bootstrap
-# GCC has some more recursive targets, which trigger the old
-# (but still current, until the toplevel bootstrap project
-# is finished) compiler bootstrapping rules.
-
-GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
-.PHONY: $(GCC_STRAP_TARGETS)
-$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- echo "Bootstrapping the compiler"; \
- $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,:[ :]*,:,g;s,^[ :]*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
- cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- case "$@" in \
- *bootstrap4-lean ) \
- msg="Comparing stage3 and stage4 of the compiler"; \
- compare=compare3-lean ;; \
- *bootstrap4 ) \
- msg="Comparing stage3 and stage4 of the compiler"; \
- compare=compare3 ;; \
- *-lean ) \
- msg="Comparing stage2 and stage3 of the compiler"; \
- compare=compare-lean ;; \
- * ) \
- msg="Comparing stage2 and stage3 of the compiler"; \
- compare=compare ;; \
- esac; \
- $(HOST_EXPORTS) \
- echo "$$msg"; \
- cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- echo "Building runtime libraries"; \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-
-profiledbootstrap: all-prebootstrap configure-gcc
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,:[ :]*,:,g;s,^[ :]*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
- echo "Bootstrapping training compiler"; \
- cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- echo "Building feedback based compiler"; \
- cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- echo "Building runtime libraries"; \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-
.PHONY: cross
cross: all-build all-gas all-ld
@r=`${PWD_COMMAND}`; export r; \
@@ -39121,7 +47270,7 @@ stage = :
current_stage = ""
@if gcc-bootstrap
-unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
+unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi
stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi
current_stage = "`cat stage_current 2> /dev/null`"
@endif gcc-bootstrap
@@ -39149,36 +47298,9 @@ LEAN = false
# 'touch' doesn't work right on some platforms.
STAMP = echo timestamp >
-# Only build the C compiler for stage1, because that is the only one that
-# we can guarantee will build with the native compiler, and also it is the
-# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
-# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
-# overrideable (for a bootstrap build stage1 also builds gcc.info).
-
-STAGE1_CFLAGS=@stage1_cflags@
-STAGE1_LANGUAGES=@stage1_languages@
-
# We only want to compare .o files, so set this!
objext = .o
-# Flags to pass to stage2 and later makes.
-POSTSTAGE1_FLAGS_TO_PASS = \
- CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
- STAGE_PREFIX=$$r/prev-gcc/ \
- CFLAGS="$(BOOT_CFLAGS)" \
- LIBCFLAGS="$(BOOT_CFLAGS)" \
- LDFLAGS="$(BOOT_LDFLAGS)" \
- ADAC="\$$(CC)"
-
-# For stage 1:
-# * We force-disable intermodule optimizations, even if
-# --enable-intermodule was passed, since the installed compiler probably
-# can't handle them. Luckily, autoconf always respects
-# the last argument when conflicting --enable arguments are passed.
-# * Likewise, we force-disable coverage flags, since the installed compiler
-# probably has never heard of them.
-# * We build only C (and possibly Ada).
-
.PHONY: stage1-start stage1-end
@@ -39212,6 +47334,16 @@ stage1-start::
mkdir stage1-gcc; \
mv stage1-gcc gcc
@endif gcc
+@if gmp
+ @cd $(HOST_SUBDIR); [ -d stage1-gmp ] || \
+ mkdir stage1-gmp; \
+ mv stage1-gmp gmp
+@endif gmp
+@if mpfr
+ @cd $(HOST_SUBDIR); [ -d stage1-mpfr ] || \
+ mkdir stage1-mpfr; \
+ mv stage1-mpfr mpfr
+@endif mpfr
@if intl
@cd $(HOST_SUBDIR); [ -d stage1-intl ] || \
mkdir stage1-intl; \
@@ -39272,6 +47404,16 @@ stage1-end::
cd $(HOST_SUBDIR); mv gcc stage1-gcc ; \
fi
@endif gcc
+@if gmp
+ @if test -d $(HOST_SUBDIR)/gmp ; then \
+ cd $(HOST_SUBDIR); mv gmp stage1-gmp ; \
+ fi
+@endif gmp
+@if mpfr
+ @if test -d $(HOST_SUBDIR)/mpfr ; then \
+ cd $(HOST_SUBDIR); mv mpfr stage1-mpfr ; \
+ fi
+@endif mpfr
@if intl
@if test -d $(HOST_SUBDIR)/intl ; then \
cd $(HOST_SUBDIR); mv intl stage1-intl ; \
@@ -39307,7 +47449,7 @@ stage1-end::
fi
rm -f stage_current
-# Bubble a bugfix through all the stages up to stage 1. They are
+# Bubble a bug fix through all the stages up to stage 1. They are
# remade, but not reconfigured. The next stage (if any) will not be
# reconfigured as well.
.PHONY: stage1-bubble
@@ -39336,6 +47478,7 @@ do-clean: clean-stage1
.PHONY: distclean-stage1
distclean-stage1::
@: $(MAKE); $(stage)
+ @test "`cat stage_last`" != stage1 || rm -f stage_last
rm -rf stage1-*
@@ -39379,6 +47522,18 @@ stage2-start::
mv stage2-gcc gcc ; \
mv stage1-gcc prev-gcc || test -f stage1-lean
@endif gcc
+@if gmp
+ @cd $(HOST_SUBDIR); [ -d stage2-gmp ] || \
+ mkdir stage2-gmp; \
+ mv stage2-gmp gmp ; \
+ mv stage1-gmp prev-gmp || test -f stage1-lean
+@endif gmp
+@if mpfr
+ @cd $(HOST_SUBDIR); [ -d stage2-mpfr ] || \
+ mkdir stage2-mpfr; \
+ mv stage2-mpfr mpfr ; \
+ mv stage1-mpfr prev-mpfr || test -f stage1-lean
+@endif mpfr
@if intl
@cd $(HOST_SUBDIR); [ -d stage2-intl ] || \
mkdir stage2-intl; \
@@ -39451,6 +47606,18 @@ stage2-end::
mv prev-gcc stage1-gcc ; : ; \
fi
@endif gcc
+@if gmp
+ @if test -d $(HOST_SUBDIR)/gmp ; then \
+ cd $(HOST_SUBDIR); mv gmp stage2-gmp ; \
+ mv prev-gmp stage1-gmp ; : ; \
+ fi
+@endif gmp
+@if mpfr
+ @if test -d $(HOST_SUBDIR)/mpfr ; then \
+ cd $(HOST_SUBDIR); mv mpfr stage2-mpfr ; \
+ mv prev-mpfr stage1-mpfr ; : ; \
+ fi
+@endif mpfr
@if intl
@if test -d $(HOST_SUBDIR)/intl ; then \
cd $(HOST_SUBDIR); mv intl stage2-intl ; \
@@ -39493,7 +47660,7 @@ stage2-end::
fi
rm -f stage_current
-# Bubble a bugfix through all the stages up to stage 2. They are
+# Bubble a bug fix through all the stages up to stage 2. They are
# remade, but not reconfigured. The next stage (if any) will not be
# reconfigured as well.
.PHONY: stage2-bubble
@@ -39543,6 +47710,7 @@ distclean-stage1:: distclean-stage2
.PHONY: distclean-stage2
distclean-stage2::
@: $(MAKE); $(stage)
+ @test "`cat stage_last`" != stage2 || rm -f stage_last
rm -rf stage2-*
@@ -39586,6 +47754,18 @@ stage3-start::
mv stage3-gcc gcc ; \
mv stage2-gcc prev-gcc || test -f stage2-lean
@endif gcc
+@if gmp
+ @cd $(HOST_SUBDIR); [ -d stage3-gmp ] || \
+ mkdir stage3-gmp; \
+ mv stage3-gmp gmp ; \
+ mv stage2-gmp prev-gmp || test -f stage2-lean
+@endif gmp
+@if mpfr
+ @cd $(HOST_SUBDIR); [ -d stage3-mpfr ] || \
+ mkdir stage3-mpfr; \
+ mv stage3-mpfr mpfr ; \
+ mv stage2-mpfr prev-mpfr || test -f stage2-lean
+@endif mpfr
@if intl
@cd $(HOST_SUBDIR); [ -d stage3-intl ] || \
mkdir stage3-intl; \
@@ -39658,6 +47838,18 @@ stage3-end::
mv prev-gcc stage2-gcc ; : ; \
fi
@endif gcc
+@if gmp
+ @if test -d $(HOST_SUBDIR)/gmp ; then \
+ cd $(HOST_SUBDIR); mv gmp stage3-gmp ; \
+ mv prev-gmp stage2-gmp ; : ; \
+ fi
+@endif gmp
+@if mpfr
+ @if test -d $(HOST_SUBDIR)/mpfr ; then \
+ cd $(HOST_SUBDIR); mv mpfr stage3-mpfr ; \
+ mv prev-mpfr stage2-mpfr ; : ; \
+ fi
+@endif mpfr
@if intl
@if test -d $(HOST_SUBDIR)/intl ; then \
cd $(HOST_SUBDIR); mv intl stage3-intl ; \
@@ -39700,7 +47892,7 @@ stage3-end::
fi
rm -f stage_current
-# Bubble a bugfix through all the stages up to stage 3. They are
+# Bubble a bug fix through all the stages up to stage 3. They are
# remade, but not reconfigured. The next stage (if any) will not be
# reconfigured as well.
.PHONY: stage3-bubble
@@ -39793,11 +47985,20 @@ distclean-stage2:: distclean-stage3
.PHONY: distclean-stage3
distclean-stage3::
@: $(MAKE); $(stage)
+ @test "`cat stage_last`" != stage3 || rm -f stage_last
rm -rf stage3-* compare
.PHONY: cleanstrap
-cleanstrap: distclean bootstrap
+cleanstrap: do-distclean local-clean
+ echo stage3 > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage3-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
@endif gcc-bootstrap
@@ -39839,6 +48040,18 @@ stage4-start::
mv stage4-gcc gcc ; \
mv stage3-gcc prev-gcc || test -f stage3-lean
@endif gcc
+@if gmp
+ @cd $(HOST_SUBDIR); [ -d stage4-gmp ] || \
+ mkdir stage4-gmp; \
+ mv stage4-gmp gmp ; \
+ mv stage3-gmp prev-gmp || test -f stage3-lean
+@endif gmp
+@if mpfr
+ @cd $(HOST_SUBDIR); [ -d stage4-mpfr ] || \
+ mkdir stage4-mpfr; \
+ mv stage4-mpfr mpfr ; \
+ mv stage3-mpfr prev-mpfr || test -f stage3-lean
+@endif mpfr
@if intl
@cd $(HOST_SUBDIR); [ -d stage4-intl ] || \
mkdir stage4-intl; \
@@ -39911,6 +48124,18 @@ stage4-end::
mv prev-gcc stage3-gcc ; : ; \
fi
@endif gcc
+@if gmp
+ @if test -d $(HOST_SUBDIR)/gmp ; then \
+ cd $(HOST_SUBDIR); mv gmp stage4-gmp ; \
+ mv prev-gmp stage3-gmp ; : ; \
+ fi
+@endif gmp
+@if mpfr
+ @if test -d $(HOST_SUBDIR)/mpfr ; then \
+ cd $(HOST_SUBDIR); mv mpfr stage4-mpfr ; \
+ mv prev-mpfr stage3-mpfr ; : ; \
+ fi
+@endif mpfr
@if intl
@if test -d $(HOST_SUBDIR)/intl ; then \
cd $(HOST_SUBDIR); mv intl stage4-intl ; \
@@ -39953,7 +48178,7 @@ stage4-end::
fi
rm -f stage_current
-# Bubble a bugfix through all the stages up to stage 4. They are
+# Bubble a bug fix through all the stages up to stage 4. They are
# remade, but not reconfigured. The next stage (if any) will not be
# reconfigured as well.
.PHONY: stage4-bubble
@@ -40046,6 +48271,7 @@ distclean-stage3:: distclean-stage4
.PHONY: distclean-stage4
distclean-stage4::
@: $(MAKE); $(stage)
+ @test "`cat stage_last`" != stage4 || rm -f stage_last
rm -rf stage4-* compare3
@@ -40089,6 +48315,18 @@ stageprofile-start::
mv stageprofile-gcc gcc ; \
mv stage1-gcc prev-gcc || test -f stage1-lean
@endif gcc
+@if gmp
+ @cd $(HOST_SUBDIR); [ -d stageprofile-gmp ] || \
+ mkdir stageprofile-gmp; \
+ mv stageprofile-gmp gmp ; \
+ mv stage1-gmp prev-gmp || test -f stage1-lean
+@endif gmp
+@if mpfr
+ @cd $(HOST_SUBDIR); [ -d stageprofile-mpfr ] || \
+ mkdir stageprofile-mpfr; \
+ mv stageprofile-mpfr mpfr ; \
+ mv stage1-mpfr prev-mpfr || test -f stage1-lean
+@endif mpfr
@if intl
@cd $(HOST_SUBDIR); [ -d stageprofile-intl ] || \
mkdir stageprofile-intl; \
@@ -40161,6 +48399,18 @@ stageprofile-end::
mv prev-gcc stage1-gcc ; : ; \
fi
@endif gcc
+@if gmp
+ @if test -d $(HOST_SUBDIR)/gmp ; then \
+ cd $(HOST_SUBDIR); mv gmp stageprofile-gmp ; \
+ mv prev-gmp stage1-gmp ; : ; \
+ fi
+@endif gmp
+@if mpfr
+ @if test -d $(HOST_SUBDIR)/mpfr ; then \
+ cd $(HOST_SUBDIR); mv mpfr stageprofile-mpfr ; \
+ mv prev-mpfr stage1-mpfr ; : ; \
+ fi
+@endif mpfr
@if intl
@if test -d $(HOST_SUBDIR)/intl ; then \
cd $(HOST_SUBDIR); mv intl stageprofile-intl ; \
@@ -40203,7 +48453,7 @@ stageprofile-end::
fi
rm -f stage_current
-# Bubble a bugfix through all the stages up to stage profile. They are
+# Bubble a bug fix through all the stages up to stage profile. They are
# remade, but not reconfigured. The next stage (if any) will not be
# reconfigured as well.
.PHONY: stageprofile-bubble
@@ -40232,6 +48482,7 @@ distclean-stage1:: distclean-stageprofile
.PHONY: distclean-stageprofile
distclean-stageprofile::
@: $(MAKE); $(stage)
+ @test "`cat stage_last`" != stageprofile || rm -f stage_last
rm -rf stageprofile-*
@@ -40275,6 +48526,18 @@ stagefeedback-start::
mv stagefeedback-gcc gcc ; \
mv stageprofile-gcc prev-gcc || test -f stageprofile-lean
@endif gcc
+@if gmp
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-gmp ] || \
+ mkdir stagefeedback-gmp; \
+ mv stagefeedback-gmp gmp ; \
+ mv stageprofile-gmp prev-gmp || test -f stageprofile-lean
+@endif gmp
+@if mpfr
+ @cd $(HOST_SUBDIR); [ -d stagefeedback-mpfr ] || \
+ mkdir stagefeedback-mpfr; \
+ mv stagefeedback-mpfr mpfr ; \
+ mv stageprofile-mpfr prev-mpfr || test -f stageprofile-lean
+@endif mpfr
@if intl
@cd $(HOST_SUBDIR); [ -d stagefeedback-intl ] || \
mkdir stagefeedback-intl; \
@@ -40347,6 +48610,18 @@ stagefeedback-end::
mv prev-gcc stageprofile-gcc ; : ; \
fi
@endif gcc
+@if gmp
+ @if test -d $(HOST_SUBDIR)/gmp ; then \
+ cd $(HOST_SUBDIR); mv gmp stagefeedback-gmp ; \
+ mv prev-gmp stageprofile-gmp ; : ; \
+ fi
+@endif gmp
+@if mpfr
+ @if test -d $(HOST_SUBDIR)/mpfr ; then \
+ cd $(HOST_SUBDIR); mv mpfr stagefeedback-mpfr ; \
+ mv prev-mpfr stageprofile-mpfr ; : ; \
+ fi
+@endif mpfr
@if intl
@if test -d $(HOST_SUBDIR)/intl ; then \
cd $(HOST_SUBDIR); mv intl stagefeedback-intl ; \
@@ -40389,7 +48664,7 @@ stagefeedback-end::
fi
rm -f stage_current
-# Bubble a bugfix through all the stages up to stage feedback. They are
+# Bubble a bug fix through all the stages up to stage feedback. They are
# remade, but not reconfigured. The next stage (if any) will not be
# reconfigured as well.
.PHONY: stagefeedback-bubble
@@ -40439,6 +48714,7 @@ distclean-stageprofile:: distclean-stagefeedback
.PHONY: distclean-stagefeedback
distclean-stagefeedback::
@: $(MAKE); $(stage)
+ @test "`cat stage_last`" != stagefeedback || rm -f stage_last
rm -rf stagefeedback-*
@@ -40466,13 +48742,18 @@ do-distclean: distclean-stage1
# not work as a dependency, just as the minimum necessary to avoid errors.
stage_last:
$(MAKE) $(RECURSE_FLAGS_TO_PASS) stage1-bubble
-@endif gcc-bootstrap
+
+# Same as unstage, but not phony and defaulting to stage1-start. We place
+# it in the dependency so that for example `make -j3 all-gcc' works.
+stage_current:
+ @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
.PHONY: restrap
restrap:
@: $(MAKE); $(stage)
- rm -rf stage1-$(TARGET_SUBDIR) stage2 stage3 stage4 stageprofile stagefeedback
+ rm -rf stage1-$(TARGET_SUBDIR) stage2-* stage3-* stage4-* stageprofile-* stagefeedback-*
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
+@endif gcc-bootstrap
# --------------------------------------
# Dependencies between different modules
@@ -40483,8 +48764,13 @@ restrap:
configure-target-libstdc++-v3: stage_last
configure-target-libmudflap: stage_last
configure-target-libssp: stage_last
-configure-target-libgcc-math: stage_last
configure-target-newlib: stage_last
+configure-stage1-target-libgcc: maybe-all-stage1-gcc
+configure-stage2-target-libgcc: maybe-all-stage2-gcc
+configure-stage3-target-libgcc: maybe-all-stage3-gcc
+configure-stage4-target-libgcc: maybe-all-stage4-gcc
+configure-stageprofile-target-libgcc: maybe-all-stageprofile-gcc
+configure-stagefeedback-target-libgcc: maybe-all-stagefeedback-gcc
configure-target-libgfortran: stage_last
configure-target-libobjc: stage_last
configure-target-libtermcap: stage_last
@@ -40507,8 +48793,8 @@ configure-target-libgomp: stage_last
configure-target-libstdc++-v3: maybe-all-gcc
configure-target-libmudflap: maybe-all-gcc
configure-target-libssp: maybe-all-gcc
-configure-target-libgcc-math: maybe-all-gcc
configure-target-newlib: maybe-all-gcc
+configure-target-libgcc: maybe-all-gcc
configure-target-libgfortran: maybe-all-gcc
configure-target-libobjc: maybe-all-gcc
configure-target-libtermcap: maybe-all-gcc
@@ -40528,42 +48814,6 @@ configure-target-libgomp: maybe-all-gcc
@endif gcc-no-bootstrap
-
-configure-target-boehm-gc: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-gperf: maybe-all-target-newlib maybe-all-target-libgloss
-configure-target-gperf: maybe-all-target-libstdc++-v3
-
-configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-libgfortran: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
-configure-target-libjava: maybe-all-target-libstdc++-v3
-
-configure-target-libmudflap: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-libobjc: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-libssp: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-libstdc++-v3: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-zlib: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-examples: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-libtermcap: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-rda: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-winsup: maybe-all-target-newlib maybe-all-target-libgloss
-
-configure-target-qthreads: maybe-all-target-newlib maybe-all-target-libgloss
-
-
# There are two types of dependencies here: 'hard' dependencies, where one
# module simply won't build without the other; and 'soft' dependencies, where
# if the depended-on module is missing, the depending module will do without
@@ -40630,6 +48880,14 @@ all-stage3-gcc: all-stage3-libiberty
all-stage4-gcc: all-stage4-libiberty
all-stageprofile-gcc: all-stageprofile-libiberty
all-stagefeedback-gcc: all-stagefeedback-libiberty
+all-gcc: maybe-all-gmp
+
+all-stage1-gcc: maybe-all-stage1-gmp
+all-stage2-gcc: maybe-all-stage2-gmp
+all-stage3-gcc: maybe-all-stage3-gmp
+all-stage4-gcc: maybe-all-stage4-gmp
+all-stageprofile-gcc: maybe-all-stageprofile-gmp
+all-stagefeedback-gcc: maybe-all-stagefeedback-gmp
all-gcc: maybe-all-intl
all-stage1-gcc: maybe-all-stage1-intl
@@ -40638,6 +48896,14 @@ all-stage3-gcc: maybe-all-stage3-intl
all-stage4-gcc: maybe-all-stage4-intl
all-stageprofile-gcc: maybe-all-stageprofile-intl
all-stagefeedback-gcc: maybe-all-stagefeedback-intl
+all-gcc: maybe-all-mpfr
+
+all-stage1-gcc: maybe-all-stage1-mpfr
+all-stage2-gcc: maybe-all-stage2-mpfr
+all-stage3-gcc: maybe-all-stage3-mpfr
+all-stage4-gcc: maybe-all-stage4-mpfr
+all-stageprofile-gcc: maybe-all-stageprofile-mpfr
+all-stagefeedback-gcc: maybe-all-stagefeedback-mpfr
all-gcc: maybe-all-build-texinfo
all-stage1-gcc: maybe-all-build-texinfo
@@ -40646,7 +48912,6 @@ all-stage3-gcc: maybe-all-build-texinfo
all-stage4-gcc: maybe-all-build-texinfo
all-stageprofile-gcc: maybe-all-build-texinfo
all-stagefeedback-gcc: maybe-all-build-texinfo
-all-prebootstrap: maybe-all-build-texinfo
all-gcc: maybe-all-build-bison
all-stage1-gcc: maybe-all-build-bison
@@ -40655,7 +48920,6 @@ all-stage3-gcc: maybe-all-build-bison
all-stage4-gcc: maybe-all-build-bison
all-stageprofile-gcc: maybe-all-build-bison
all-stagefeedback-gcc: maybe-all-build-bison
-all-prebootstrap: maybe-all-build-bison
all-gcc: maybe-all-build-byacc
all-stage1-gcc: maybe-all-build-byacc
@@ -40664,7 +48928,6 @@ all-stage3-gcc: maybe-all-build-byacc
all-stage4-gcc: maybe-all-build-byacc
all-stageprofile-gcc: maybe-all-build-byacc
all-stagefeedback-gcc: maybe-all-build-byacc
-all-prebootstrap: maybe-all-build-byacc
all-gcc: maybe-all-build-flex
all-stage1-gcc: maybe-all-build-flex
@@ -40673,7 +48936,6 @@ all-stage3-gcc: maybe-all-build-flex
all-stage4-gcc: maybe-all-build-flex
all-stageprofile-gcc: maybe-all-build-flex
all-stagefeedback-gcc: maybe-all-build-flex
-all-prebootstrap: maybe-all-build-flex
all-gcc: maybe-all-build-libiberty
all-stage1-gcc: maybe-all-build-libiberty
@@ -40682,7 +48944,6 @@ all-stage3-gcc: maybe-all-build-libiberty
all-stage4-gcc: maybe-all-build-libiberty
all-stageprofile-gcc: maybe-all-build-libiberty
all-stagefeedback-gcc: maybe-all-build-libiberty
-all-prebootstrap: maybe-all-build-libiberty
all-gcc: maybe-all-build-fixincludes
all-stage1-gcc: maybe-all-build-fixincludes
@@ -40691,7 +48952,6 @@ all-stage3-gcc: maybe-all-build-fixincludes
all-stage4-gcc: maybe-all-build-fixincludes
all-stageprofile-gcc: maybe-all-build-fixincludes
all-stagefeedback-gcc: maybe-all-build-fixincludes
-all-prebootstrap: maybe-all-build-fixincludes
all-gcc: maybe-all-zlib
all-stage1-gcc: maybe-all-stage1-zlib
@@ -40760,10 +49020,20 @@ all-stageprofile-libcpp: maybe-all-stageprofile-intl
all-stagefeedback-libcpp: maybe-all-stagefeedback-intl
all-fixincludes: maybe-all-libiberty
all-gnattools: maybe-all-target-libada
+configure-mpfr: maybe-all-gmp
+
+configure-stage1-mpfr: maybe-all-stage1-gmp
+configure-stage2-mpfr: maybe-all-stage2-gmp
+configure-stage3-mpfr: maybe-all-stage3-gmp
+configure-stage4-mpfr: maybe-all-stage4-gmp
+configure-stageprofile-mpfr: maybe-all-stageprofile-gmp
+configure-stagefeedback-mpfr: maybe-all-stagefeedback-gmp
+configure-gdb: maybe-configure-intl
configure-gdb: maybe-configure-sim
+configure-gdb: maybe-all-bfd
+all-gdb: maybe-all-intl
all-gdb: maybe-all-libiberty
all-gdb: maybe-all-opcodes
-all-gdb: maybe-all-bfd
all-gdb: maybe-all-readline
all-gdb: maybe-all-build-bison
all-gdb: maybe-all-build-byacc
@@ -40781,6 +49051,14 @@ configure-stage3-bfd: configure-stage3-libiberty
configure-stage4-bfd: configure-stage4-libiberty
configure-stageprofile-bfd: configure-stageprofile-libiberty
configure-stagefeedback-bfd: configure-stagefeedback-libiberty
+configure-bfd: maybe-configure-intl
+
+configure-stage1-bfd: maybe-configure-stage1-intl
+configure-stage2-bfd: maybe-configure-stage2-intl
+configure-stage3-bfd: maybe-configure-stage3-intl
+configure-stage4-bfd: maybe-configure-stage4-intl
+configure-stageprofile-bfd: maybe-configure-stageprofile-intl
+configure-stagefeedback-bfd: maybe-configure-stagefeedback-intl
all-bfd: maybe-all-libiberty
all-stage1-bfd: maybe-all-stage1-libiberty
@@ -40797,6 +49075,14 @@ all-stage3-bfd: maybe-all-stage3-intl
all-stage4-bfd: maybe-all-stage4-intl
all-stageprofile-bfd: maybe-all-stageprofile-intl
all-stagefeedback-bfd: maybe-all-stagefeedback-intl
+configure-binutils: maybe-configure-intl
+
+configure-stage1-binutils: maybe-configure-stage1-intl
+configure-stage2-binutils: maybe-configure-stage2-intl
+configure-stage3-binutils: maybe-configure-stage3-intl
+configure-stage4-binutils: maybe-configure-stage4-intl
+configure-stageprofile-binutils: maybe-configure-stageprofile-intl
+configure-stagefeedback-binutils: maybe-configure-stagefeedback-intl
all-binutils: maybe-all-libiberty
all-stage1-binutils: maybe-all-stage1-libiberty
@@ -40829,7 +49115,6 @@ all-stage3-binutils: maybe-all-build-flex
all-stage4-binutils: maybe-all-build-flex
all-stageprofile-binutils: maybe-all-build-flex
all-stagefeedback-binutils: maybe-all-build-flex
-all-prebootstrap: maybe-all-build-flex
all-binutils: maybe-all-build-bison
all-stage1-binutils: maybe-all-build-bison
@@ -40838,7 +49123,6 @@ all-stage3-binutils: maybe-all-build-bison
all-stage4-binutils: maybe-all-build-bison
all-stageprofile-binutils: maybe-all-build-bison
all-stagefeedback-binutils: maybe-all-build-bison
-all-prebootstrap: maybe-all-build-bison
all-binutils: maybe-all-build-byacc
all-stage1-binutils: maybe-all-build-byacc
@@ -40847,7 +49131,6 @@ all-stage3-binutils: maybe-all-build-byacc
all-stage4-binutils: maybe-all-build-byacc
all-stageprofile-binutils: maybe-all-build-byacc
all-stagefeedback-binutils: maybe-all-build-byacc
-all-prebootstrap: maybe-all-build-byacc
all-binutils: maybe-all-intl
all-stage1-binutils: maybe-all-stage1-intl
@@ -40858,6 +49141,14 @@ all-stageprofile-binutils: maybe-all-stageprofile-intl
all-stagefeedback-binutils: maybe-all-stagefeedback-intl
install-binutils: maybe-install-opcodes
install-opcodes: maybe-install-bfd
+configure-gas: maybe-configure-intl
+
+configure-stage1-gas: maybe-configure-stage1-intl
+configure-stage2-gas: maybe-configure-stage2-intl
+configure-stage3-gas: maybe-configure-stage3-intl
+configure-stage4-gas: maybe-configure-stage4-intl
+configure-stageprofile-gas: maybe-configure-stageprofile-intl
+configure-stagefeedback-gas: maybe-configure-stagefeedback-intl
all-gas: maybe-all-libiberty
all-stage1-gas: maybe-all-stage1-libiberty
@@ -40890,10 +49181,19 @@ all-stage3-gas: maybe-all-stage3-intl
all-stage4-gas: maybe-all-stage4-intl
all-stageprofile-gas: maybe-all-stageprofile-intl
all-stagefeedback-gas: maybe-all-stagefeedback-intl
+configure-gprof: maybe-configure-intl
all-gprof: maybe-all-libiberty
all-gprof: maybe-all-bfd
all-gprof: maybe-all-opcodes
all-gprof: maybe-all-intl
+configure-ld: maybe-configure-intl
+
+configure-stage1-ld: maybe-configure-stage1-intl
+configure-stage2-ld: maybe-configure-stage2-intl
+configure-stage3-ld: maybe-configure-stage3-intl
+configure-stage4-ld: maybe-configure-stage4-intl
+configure-stageprofile-ld: maybe-configure-stageprofile-intl
+configure-stagefeedback-ld: maybe-configure-stagefeedback-intl
all-ld: maybe-all-libiberty
all-stage1-ld: maybe-all-stage1-libiberty
@@ -40926,7 +49226,6 @@ all-stage3-ld: maybe-all-build-bison
all-stage4-ld: maybe-all-build-bison
all-stageprofile-ld: maybe-all-build-bison
all-stagefeedback-ld: maybe-all-build-bison
-all-prebootstrap: maybe-all-build-bison
all-ld: maybe-all-build-byacc
all-stage1-ld: maybe-all-build-byacc
@@ -40935,7 +49234,6 @@ all-stage3-ld: maybe-all-build-byacc
all-stage4-ld: maybe-all-build-byacc
all-stageprofile-ld: maybe-all-build-byacc
all-stagefeedback-ld: maybe-all-build-byacc
-all-prebootstrap: maybe-all-build-byacc
all-ld: maybe-all-build-flex
all-stage1-ld: maybe-all-build-flex
@@ -40944,7 +49242,6 @@ all-stage3-ld: maybe-all-build-flex
all-stage4-ld: maybe-all-build-flex
all-stageprofile-ld: maybe-all-build-flex
all-stagefeedback-ld: maybe-all-build-flex
-all-prebootstrap: maybe-all-build-flex
all-ld: maybe-all-intl
all-stage1-ld: maybe-all-stage1-intl
@@ -40953,6 +49250,14 @@ all-stage3-ld: maybe-all-stage3-intl
all-stage4-ld: maybe-all-stage4-intl
all-stageprofile-ld: maybe-all-stageprofile-intl
all-stagefeedback-ld: maybe-all-stagefeedback-intl
+configure-opcodes: maybe-configure-intl
+
+configure-stage1-opcodes: maybe-configure-stage1-intl
+configure-stage2-opcodes: maybe-configure-stage2-intl
+configure-stage3-opcodes: maybe-configure-stage3-intl
+configure-stage4-opcodes: maybe-configure-stage4-intl
+configure-stageprofile-opcodes: maybe-configure-stageprofile-intl
+configure-stagefeedback-opcodes: maybe-configure-stagefeedback-intl
all-opcodes: maybe-all-bfd
all-stage1-opcodes: maybe-all-stage1-bfd
@@ -40969,6 +49274,14 @@ all-stage3-opcodes: maybe-all-stage3-libiberty
all-stage4-opcodes: maybe-all-stage4-libiberty
all-stageprofile-opcodes: maybe-all-stageprofile-libiberty
all-stagefeedback-opcodes: maybe-all-stagefeedback-libiberty
+all-opcodes: maybe-all-intl
+
+all-stage1-opcodes: maybe-all-stage1-intl
+all-stage2-opcodes: maybe-all-stage2-intl
+all-stage3-opcodes: maybe-all-stage3-intl
+all-stage4-opcodes: maybe-all-stage4-intl
+all-stageprofile-opcodes: maybe-all-stageprofile-intl
+all-stagefeedback-opcodes: maybe-all-stagefeedback-intl
all-dejagnu: maybe-all-tcl
all-dejagnu: maybe-all-expect
all-dejagnu: maybe-all-tk
@@ -40990,6 +49303,8 @@ all-sid: maybe-all-tcl
all-sid: maybe-all-tk
install-sid: maybe-install-tcl
install-sid: maybe-install-tk
+configure-sim: maybe-configure-intl
+all-sim: maybe-all-intl
all-sim: maybe-all-libiberty
all-sim: maybe-all-bfd
all-sim: maybe-all-opcodes
@@ -41044,29 +49359,88 @@ all-target-libjava: maybe-all-target-zlib
all-target-libjava: maybe-all-target-boehm-gc
all-target-libjava: maybe-all-target-qthreads
all-target-libjava: maybe-all-target-libffi
+configure-target-libobjc: maybe-configure-target-boehm-gc
all-target-libobjc: maybe-all-target-libiberty
+all-target-libobjc: maybe-all-target-boehm-gc
all-target-libstdc++-v3: maybe-all-target-libiberty
all-target-libgloss: maybe-configure-target-newlib
all-target-winsup: maybe-all-target-libiberty
all-target-winsup: maybe-all-target-libtermcap
-# Non-toplevel bootstrap rules must depend on several packages, to be built
-# before gcc. Another wart that will go away, hopefully soon.
-@if gcc-no-bootstrap
+# Dependencies for target modules on other target modules are
+# described by lang_env_dependencies; the defaults apply to anything
+# not mentioned there.
+
-all-prebootstrap: maybe-all-bfd
-all-prebootstrap: maybe-all-opcodes
-all-prebootstrap: maybe-all-binutils
-all-prebootstrap: maybe-all-gas
-all-prebootstrap: maybe-all-intl
-all-prebootstrap: maybe-all-ld
-all-prebootstrap: maybe-all-libcpp
-all-prebootstrap: maybe-all-libdecnumber
-all-prebootstrap: maybe-all-libiberty
-all-prebootstrap: maybe-all-zlib
+@if gcc-bootstrap
+@endif gcc-bootstrap
+
+@if gcc-no-bootstrap
+configure-target-libstdc++-v3: maybe-all-target-libgcc
+configure-target-libmudflap: maybe-all-target-libgcc
+configure-target-libssp: maybe-all-target-libgcc
+configure-target-newlib: maybe-all-target-libgcc
+configure-target-libgfortran: maybe-all-target-libgcc
+configure-target-libobjc: maybe-all-target-libgcc
+configure-target-libtermcap: maybe-all-target-libgcc
+configure-target-winsup: maybe-all-target-libgcc
+configure-target-libgloss: maybe-all-target-libgcc
+configure-target-libiberty: maybe-all-target-libgcc
+configure-target-gperf: maybe-all-target-libgcc
+configure-target-examples: maybe-all-target-libgcc
+configure-target-libffi: maybe-all-target-libgcc
+configure-target-libjava: maybe-all-target-libgcc
+configure-target-zlib: maybe-all-target-libgcc
+configure-target-boehm-gc: maybe-all-target-libgcc
+configure-target-qthreads: maybe-all-target-libgcc
+configure-target-rda: maybe-all-target-libgcc
+configure-target-libada: maybe-all-target-libgcc
+configure-target-libgomp: maybe-all-target-libgcc
@endif gcc-no-bootstrap
+
+configure-target-libstdc++-v3: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libmudflap: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libssp: maybe-all-target-newlib maybe-all-target-libgloss
+
+
+
+configure-target-libgfortran: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libobjc: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libtermcap: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-winsup: maybe-all-target-newlib maybe-all-target-libgloss
+
+
+
+configure-target-gperf: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-gperf: maybe-all-target-libstdc++-v3
+
+configure-target-examples: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libffi: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libjava: maybe-all-target-newlib maybe-all-target-libgloss
+configure-target-libjava: maybe-all-target-libstdc++-v3
+
+configure-target-zlib: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-boehm-gc: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-qthreads: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-rda: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libada: maybe-all-target-newlib maybe-all-target-libgloss
+
+configure-target-libgomp: maybe-all-target-newlib maybe-all-target-libgloss
+
+
CONFIGURE_GDB_TK = @CONFIGURE_GDB_TK@
GDB_TK = @GDB_TK@
INSTALL_GDB_TK = @INSTALL_GDB_TK@
@@ -41097,7 +49471,7 @@ config.status: configure
# Rebuilding configure.
AUTOCONF = autoconf
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
cd $(srcdir) && $(AUTOCONF)
# ------------------------------
diff --git a/contrib/binutils/Makefile.tpl b/contrib/binutils/Makefile.tpl
index b83d8d5..6164a41 100644
--- a/contrib/binutils/Makefile.tpl
+++ b/contrib/binutils/Makefile.tpl
@@ -28,11 +28,17 @@ in
# -------------------------------
VPATH=@srcdir@
-build_alias=@build_alias@
+build_alias=@build_noncanonical@
+build_vendor=@build_vendor@
+build_os=@build_os@
build=@build@
-host_alias=@host_alias@
+host_alias=@host_noncanonical@
+host_vendor=@host_vendor@
+host_os=@host_os@
host=@host@
-target_alias=@target_alias@
+target_alias=@target_noncanonical@
+target_vendor=@target_vendor@
+target_os=@target_os@
target=@target@
program_transform_name = @program_transform_name@
@@ -55,6 +61,7 @@ oldincludedir = @oldincludedir@
infodir = @infodir@
datarootdir = @datarootdir@
docdir = @docdir@
+pdfdir = @pdfdir@
htmldir = @htmldir@
mandir = @mandir@
man1dir = $(mandir)/man1
@@ -73,6 +80,9 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
LN = @LN@
LN_S = @LN_S@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
# -------------------------------------------------
# Miscellaneous non-standard autoconf-set variables
@@ -180,7 +190,8 @@ POSTSTAGE1_HOST_EXPORTS = \
CC_FOR_BUILD="$(STAGE_CC_WRAPPER) \
$$r/$(HOST_SUBDIR)/prev-gcc/xgcc$(exeext) \
-B$$r/$(HOST_SUBDIR)/prev-gcc/ \
- -B$(build_tooldir)/bin/"; export CC_FOR_BUILD;
+ -B$(build_tooldir)/bin/"; export CC_FOR_BUILD; \
+ LDFLAGS="$(BOOT_LDFLAGS)"; export LDFLAGS;
# Target libraries are put under this directory:
TARGET_SUBDIR = @target_subdir@
@@ -288,13 +299,26 @@ RANLIB = @RANLIB@
STRIP = @STRIP@
WINDRES = @WINDRES@
+GNATBIND = @GNATBIND@
+GNATMAKE = @GNATMAKE@
+
CFLAGS = @CFLAGS@
-LDFLAGS =
+LDFLAGS = @LDFLAGS@
LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
PICFLAG =
+# Only build the C compiler for stage1, because that is the only one that
+# we can guarantee will build with the native compiler, and also it is the
+# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
+# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
+# overrideable (for a bootstrap build stage1 also builds gcc.info).
+
+STAGE1_CFLAGS=@stage1_cflags@
+STAGE1_CHECKING=@stage1_checking@
+STAGE1_LANGUAGES=@stage1_languages@
+
# -----------------------------------------------
# Programs producing files for the TARGET machine
# -----------------------------------------------
@@ -426,6 +450,14 @@ X11_FLAGS_TO_PASS = \
'X11_EXTRA_CFLAGS=$(X11_EXTRA_CFLAGS)' \
'X11_EXTRA_LIBS=$(X11_EXTRA_LIBS)'
+# Flags to pass to stage2 and later makes.
+
+POSTSTAGE1_FLAGS_TO_PASS = \
+ CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
+ GNATBIND="$$r/$(HOST_SUBDIR)/prev-gcc/gnatbind" \
+ LDFLAGS="$(BOOT_LDFLAGS)" \
+ "`echo 'ADAFLAGS=$(BOOT_ADAFLAGS)' | sed -e s'/[^=][^=]*=$$/XFOO=/'`"
+
# Flags to pass down to makes which are built with the target environment.
# The double $ decreases the length of the command line; those variables
# are set in BASE_FLAGS_TO_PASS, and the sub-make will expand them. The
@@ -506,9 +538,10 @@ all-host: maybe-all-[+module+][+ IF bootstrap +]
.PHONY: all-target
[+ FOR target_modules +][+ IF bootstrap +]
-@if [+module+]-no-bootstrap[+ ENDIF bootstrap +]
+@if target-[+module+]-no-bootstrap[+ ENDIF bootstrap +]
all-target: maybe-all-target-[+module+][+ IF bootstrap +]
-@endif [+module+]-no-bootstrap[+ ENDIF bootstrap +][+ ENDFOR target_modules +]
+@endif target-[+module+]-no-bootstrap[+
+ ENDIF bootstrap +][+ ENDFOR target_modules +]
# Do a target for all the subdirectories. A ``make do-X'' will do a
# ``make X'' in all subdirectories (because, in general, there is a
@@ -535,12 +568,14 @@ do-[+make_target+]:
# Here are the targets which correspond to the do-X targets.
-.PHONY: info installcheck dvi html install-info install-html
+.PHONY: info installcheck dvi pdf html
+.PHONY: install-info install-pdf install-html
.PHONY: clean distclean mostlyclean maintainer-clean realclean
.PHONY: local-clean local-distclean local-maintainer-clean
info: do-info
installcheck: do-installcheck
dvi: do-dvi
+pdf: do-pdf
html: do-html
# Make sure makeinfo is built before we do a `make info', if we're
@@ -553,6 +588,8 @@ install-info: do-install-info dir.info
$(INSTALL_DATA) dir.info $(DESTDIR)$(infodir)/dir.info ; \
else true ; fi
+install-pdf: do-install-pdf
+
install-html: do-install-html
local-clean:
@@ -585,11 +622,6 @@ maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
maintainer-clean: local-distclean
realclean: maintainer-clean
-# Extra dependency for clean-target, owing to the mixed nature of gcc.
-clean-target: clean-target-libgcc
-clean-target-libgcc:
- test ! -d gcc || (cd gcc && $(MAKE) $@)
-
# Check target.
.PHONY: check do-check
@@ -720,14 +752,12 @@ TAGS: do-TAGS
[+ DEFINE configure +]
.PHONY: configure-[+prefix+][+module+] maybe-configure-[+prefix+][+module+]
maybe-configure-[+prefix+][+module+]:
+@if gcc-bootstrap
+configure-[+prefix+][+module+]: stage_current
+@endif gcc-bootstrap
@if [+prefix+][+module+]
maybe-configure-[+prefix+][+module+]: configure-[+prefix+][+module+]
-configure-[+prefix+][+module+]: [+ IF bootstrap +]
-@endif [+prefix+][+module+]
-@if [+prefix+][+module+]-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif [+prefix+][+module+]-bootstrap
-@if [+prefix+][+module+][+ ELSE bootstrap +]
+configure-[+prefix+][+module+]: [+ IF bootstrap +][+ ELSE +]
@: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -759,7 +789,8 @@ configure-[+prefix+][+module+]: [+ IF bootstrap +]
libsrcdir="$$s/[+module+]"; \
[+ IF no-config-site +]rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file [+ ENDIF +]$(SHELL) $${libsrcdir}/configure \
- [+args+] $${srcdiroption} [+extra_configure_flags+] \
+ [+args+] --build=${build_alias} --host=[+host_alias+] \
+ --target=[+target_alias+] $${srcdiroption} [+extra_configure_flags+] \
|| exit 1
@endif [+prefix+][+module+]
@@ -790,6 +821,8 @@ configure-stage[+id+]-[+prefix+][+module+]:
[+ ENDIF check_multilibs +]test ! -f [+subdir+]/[+module+]/Makefile || exit 0; \
[+exports+][+ IF prev +] \
[+poststage1_exports+][+ ENDIF prev +] \
+ CFLAGS="[+stage_cflags+]"; export CFLAGS; \
+ LIBCFLAGS="[+stage_cflags+]"; export LIBCFLAGS; \
echo Configuring stage [+id+] in [+subdir+]/[+module+] ; \
$(SHELL) $(srcdir)/mkinstalldirs [+subdir+]/[+module+] ; \
cd [+subdir+]/[+module+] || exit 1; \
@@ -801,7 +834,9 @@ configure-stage[+id+]-[+prefix+][+module+]:
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
libsrcdir="$$s/[+module+]"; \
$(SHELL) $${libsrcdir}/configure \
- [+args+] $${srcdiroption} \
+ [+args+] --build=${build_alias} --host=[+host_alias+] \
+ --target=[+target_alias+] $${srcdiroption} \
+ [+ IF prev +]--with-build-libsubdir=$(HOST_SUBDIR)[+ ENDIF prev +] \
[+stage_configure_flags+] [+extra_configure_flags+]
@endif [+prefix+][+module+]-bootstrap
[+ ENDFOR bootstrap_stage +]
@@ -811,16 +846,14 @@ configure-stage[+id+]-[+prefix+][+module+]:
[+ DEFINE all +]
.PHONY: all-[+prefix+][+module+] maybe-all-[+prefix+][+module+]
maybe-all-[+prefix+][+module+]:
+@if gcc-bootstrap
+all-[+prefix+][+module+]: stage_current
+@endif gcc-bootstrap
@if [+prefix+][+module+]
TARGET-[+prefix+][+module+]=[+
- IF target +][+target+][+ ELSE +]all[+ ENDIF target +]
+ IF all_target +][+all_target+][+ ELSE +]all[+ ENDIF all_target +]
maybe-all-[+prefix+][+module+]: all-[+prefix+][+module+]
-all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +]
-@endif [+prefix+][+module+]
-@if [+prefix+][+module+]-bootstrap
- @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
-@endif [+prefix+][+module+]-bootstrap
-@if [+prefix+][+module+][+ ELSE bootstrap +]
+all-[+prefix+][+module+]: configure-[+prefix+][+module+][+ IF bootstrap +][+ ELSE +]
@: $(MAKE); $(unstage)[+ ENDIF bootstrap +]
@r=`${PWD_COMMAND}`; export r; \
s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
@@ -846,21 +879,25 @@ all-stage[+id+]-[+prefix+][+module+]: configure-stage[+id+]-[+prefix+][+module+]
[+exports+][+ IF prev +] \
[+poststage1_exports+][+ ENDIF prev +] \
cd [+subdir+]/[+module+] && \
- $(MAKE) [+args+] [+ IF prev
- +][+poststage1_args+][+ ENDIF prev
- +] [+stage_make_flags+] [+extra_make_flags+] \
+ $(MAKE) [+args+] \
+ CFLAGS="[+stage_cflags+]" LIBCFLAGS="[+stage_cflags+]" [+
+ IF prev +][+poststage1_args+][+ ENDIF prev
+ +] [+extra_make_flags+] \
$(TARGET-stage[+id+]-[+prefix+][+module+])
maybe-clean-stage[+id+]-[+prefix+][+module+]: clean-stage[+id+]-[+prefix+][+module+]
clean-stage[+id+]: clean-stage[+id+]-[+prefix+][+module+]
clean-stage[+id+]-[+prefix+][+module+]:
- @[ -f [+subdir+]/[+module+]/Makefile ] || [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] \
- || exit 0 ; \
- [ $(current_stage) = stage[+id+] ] || $(MAKE) stage[+id+]-start; \
+ @if [ $(current_stage) = stage[+id+] ]; then \
+ [ -f [+subdir+]/[+module+]/Makefile ] || exit 0; \
+ else \
+ [ -f [+subdir+]/stage[+id+]-[+module+]/Makefile ] || exit 0; \
+ $(MAKE) stage[+id+]-start; \
+ fi; \
cd [+subdir+]/[+module+] && \
$(MAKE) [+args+] [+ IF prev +] \
[+poststage1_args+] [+ ENDIF prev +] \
- [+stage_make_flags+] [+extra_make_flags+] clean
+ [+extra_make_flags+] clean
@endif [+prefix+][+module+]-bootstrap
[+ ENDFOR bootstrap_stage +]
@@ -872,6 +909,8 @@ clean-stage[+id+]-[+prefix+][+module+]:
# --------------------------------------
[+ FOR build_modules +]
[+ configure prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)"
+ host_alias=(get "host" "${build_alias}")
+ target_alias=(get "target" "${target_alias}")
args="$(BUILD_CONFIGARGS)" no-config-site=true +]
[+ all prefix="build-" subdir="$(BUILD_SUBDIR)" exports="$(BUILD_EXPORTS)" +]
@@ -884,6 +923,8 @@ clean-stage[+id+]-[+prefix+][+module+]:
[+ configure prefix="" subdir="$(HOST_SUBDIR)"
exports="$(HOST_EXPORTS)"
poststage1_exports="$(POSTSTAGE1_HOST_EXPORTS)"
+ host_alias=(get "host" "${host_alias}")
+ target_alias=(get "target" "${target_alias}")
args="$(HOST_CONFIGARGS)" +]
[+ all prefix="" subdir="$(HOST_SUBDIR)"
@@ -937,7 +978,7 @@ install-[+module+]: installdirs
[+ ENDIF no_install +]
@endif [+module+]
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
[+ FOR recursive_targets +]
.PHONY: maybe-[+make_target+]-[+module+] [+make_target+]-[+module+]
maybe-[+make_target+]-[+module+]:
@@ -981,6 +1022,8 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
check_multilibs=true
exports="$(RAW_CXX_TARGET_EXPORTS)"
+ host_alias=(get "host" "${target_alias}")
+ target_alias=(get "target" "${target_alias}")
args="$(TARGET_CONFIGARGS)" no-config-site=true +]
[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
@@ -990,6 +1033,8 @@ maybe-[+make_target+]-[+module+]: [+make_target+]-[+module+]
[+ configure prefix="target-" subdir="$(TARGET_SUBDIR)"
check_multilibs=true
exports="$(NORMAL_TARGET_EXPORTS)"
+ host_alias=(get "host" "${target_alias}")
+ target_alias=(get "target" "${target_alias}")
args="$(TARGET_CONFIGARGS)" no-config-site=true +]
[+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
@@ -1045,7 +1090,7 @@ ENDIF raw_cxx +]
[+ ENDIF no_install +]
@endif target-[+module+]
-# Other targets (info, dvi, etc.)
+# Other targets (info, dvi, pdf, etc.)
[+ FOR recursive_targets +]
.PHONY: maybe-[+make_target+]-target-[+module+] [+make_target+]-target-[+module+]
maybe-[+make_target+]-target-[+module+]:
@@ -1089,60 +1134,6 @@ ENDIF raw_cxx +]
# ----------
@if gcc-no-bootstrap
-# GCC has some more recursive targets, which trigger the old
-# (but still current, until the toplevel bootstrap project
-# is finished) compiler bootstrapping rules.
-
-GCC_STRAP_TARGETS = bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean bootstrap4 bootstrap4-lean bubblestrap quickstrap cleanstrap restrap
-.PHONY: $(GCC_STRAP_TARGETS)
-$(GCC_STRAP_TARGETS): all-prebootstrap configure-gcc
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- echo "Bootstrapping the compiler"; \
- $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,:[ :]*,:,g;s,^[ :]*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
- cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $@
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- case "$@" in \
- *bootstrap4-lean ) \
- msg="Comparing stage3 and stage4 of the compiler"; \
- compare=compare3-lean ;; \
- *bootstrap4 ) \
- msg="Comparing stage3 and stage4 of the compiler"; \
- compare=compare3 ;; \
- *-lean ) \
- msg="Comparing stage2 and stage3 of the compiler"; \
- compare=compare-lean ;; \
- * ) \
- msg="Comparing stage2 and stage3 of the compiler"; \
- compare=compare ;; \
- esac; \
- $(HOST_EXPORTS) \
- echo "$$msg"; \
- cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) $$compare
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- echo "Building runtime libraries"; \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-
-profiledbootstrap: all-prebootstrap configure-gcc
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,:[ :]*,:,g;s,^[ :]*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
- echo "Bootstrapping training compiler"; \
- cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stageprofile_build
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
- $(HOST_EXPORTS) \
- echo "Building feedback based compiler"; \
- cd gcc && $(MAKE) $(GCC_FLAGS_TO_PASS) stagefeedback_build
- @r=`${PWD_COMMAND}`; export r; \
- s=`cd $(srcdir); ${PWD_COMMAND}` ; export s; \
- echo "Building runtime libraries"; \
- $(MAKE) $(RECURSE_FLAGS_TO_PASS) all
-
.PHONY: cross
cross: all-build all-gas all-ld
@r=`${PWD_COMMAND}`; export r; \
@@ -1212,7 +1203,7 @@ stage = :
current_stage = ""
@if gcc-bootstrap
-unstage = [ -f stage_current ] || $(MAKE) `cat stage_last`-start
+unstage = if [ -f stage_last ]; then [ -f stage_current ] || $(MAKE) `cat stage_last`-start || exit 1; else :; fi
stage = if [ -f stage_current ]; then $(MAKE) `cat stage_current`-end || exit 1; else :; fi
current_stage = "`cat stage_current 2> /dev/null`"
@endif gcc-bootstrap
@@ -1240,36 +1231,9 @@ LEAN = false
# 'touch' doesn't work right on some platforms.
STAMP = echo timestamp >
-# Only build the C compiler for stage1, because that is the only one that
-# we can guarantee will build with the native compiler, and also it is the
-# only thing useful for building stage2. STAGE1_CFLAGS (via CFLAGS),
-# MAKEINFO and MAKEINFOFLAGS are explicitly passed here to make them
-# overrideable (for a bootstrap build stage1 also builds gcc.info).
-
-STAGE1_CFLAGS=@stage1_cflags@
-STAGE1_LANGUAGES=@stage1_languages@
-
# We only want to compare .o files, so set this!
objext = .o
-# Flags to pass to stage2 and later makes.
-POSTSTAGE1_FLAGS_TO_PASS = \
- CC="$${CC}" CC_FOR_BUILD="$${CC_FOR_BUILD}" \
- STAGE_PREFIX=$$r/prev-gcc/ \
- CFLAGS="$(BOOT_CFLAGS)" \
- LIBCFLAGS="$(BOOT_CFLAGS)" \
- LDFLAGS="$(BOOT_LDFLAGS)" \
- ADAC="\$$(CC)"
-
-# For stage 1:
-# * We force-disable intermodule optimizations, even if
-# --enable-intermodule was passed, since the installed compiler probably
-# can't handle them. Luckily, autoconf always respects
-# the last argument when conflicting --enable arguments are passed.
-# * Likewise, we force-disable coverage flags, since the installed compiler
-# probably has never heard of them.
-# * We build only C (and possibly Ada).
-
[+ FOR bootstrap-stage +]
.PHONY: stage[+id+]-start stage[+id+]-end
@@ -1303,7 +1267,7 @@ stage[+id+]-end:: [+ FOR host_modules +][+ IF bootstrap +]
fi
rm -f stage_current
-# Bubble a bugfix through all the stages up to stage [+id+]. They are
+# Bubble a bug fix through all the stages up to stage [+id+]. They are
# remade, but not reconfigured. The next stage (if any) will not be
# reconfigured as well.
.PHONY: stage[+id+]-bubble
@@ -1397,12 +1361,21 @@ do-clean: clean-stage[+id+]
.PHONY: distclean-stage[+id+]
distclean-stage[+id+]::
@: $(MAKE); $(stage)
+ @test "`cat stage_last`" != stage[+id+] || rm -f stage_last
rm -rf stage[+id+]-* [+
IF compare-target +][+compare-target+] [+ ENDIF compare-target +]
[+ IF cleanstrap-target +]
.PHONY: [+cleanstrap-target+]
-[+cleanstrap-target+]: distclean [+bootstrap-target+]
+[+cleanstrap-target+]: do-distclean local-clean
+ echo stage[+id+] > stage_final
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(RECURSE_FLAGS_TO_PASS) stage[+id+]-bubble
+ @: $(MAKE); $(unstage)
+ @r=`${PWD_COMMAND}`; export r; \
+ s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all-host all-target
[+ ENDIF cleanstrap-target +]
@endif gcc-bootstrap
@@ -1428,14 +1401,19 @@ do-distclean: distclean-stage1
# not work as a dependency, just as the minimum necessary to avoid errors.
stage_last:
$(MAKE) $(RECURSE_FLAGS_TO_PASS) stage1-bubble
-@endif gcc-bootstrap
+
+# Same as unstage, but not phony and defaulting to stage1-start. We place
+# it in the dependency so that for example `make -j3 all-gcc' works.
+stage_current:
+ @if test -f stage_last; then $(unstage); else $(MAKE) stage1-start; fi
.PHONY: restrap
restrap:
@: $(MAKE); $(stage)
rm -rf stage1-$(TARGET_SUBDIR) [+ FOR bootstrap-stage +][+ IF prev
- +]stage[+id+] [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
+ +]stage[+id+]-* [+ ENDIF prev +][+ ENDFOR bootstrap-stage +]
$(MAKE) $(RECURSE_FLAGS_TO_PASS) all
+@endif gcc-bootstrap
# --------------------------------------
# Dependencies between different modules
@@ -1450,18 +1428,12 @@ configure-target-[+module+]: stage_last[+
ENDIF bootstrap +][+ ENDFOR target_modules +]
@endif gcc-bootstrap
-@if gcc-no-bootstrap[+ FOR target_modules +][+ IF bootstrap
- +][+ ELSE +]
+@if gcc-no-bootstrap[+ FOR target_modules +]
configure-target-[+module+]: maybe-all-gcc[+
- ENDIF bootstrap +][+ ENDFOR target_modules +]
+ ENDFOR target_modules +]
@endif gcc-no-bootstrap
-[+ FOR lang_env_dependencies +]
-configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
-[+ IF cxx +]configure-target-[+module+]: maybe-all-target-libstdc++-v3
-[+ ENDIF cxx +][+ ENDFOR lang_env_dependencies +]
-
# There are two types of dependencies here: 'hard' dependencies, where one
# module simply won't build without the other; and 'soft' dependencies, where
# if the depended-on module is missing, the depending module will do without
@@ -1550,7 +1522,6 @@ configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss
+][+ FOR bootstrap_stage +]
[+ (make-dep (dep-stage) "") +][+
ENDFOR bootstrap_stage +]
-all-prebootstrap: [+ (dep-target "" "on" (exist? "hard")) +]
[+ == "bootstrap"
+][+ FOR bootstrap_stage +]
[+ (make-dep (dep-stage) (dep-stage)) +][+
@@ -1558,17 +1529,48 @@ all-prebootstrap: [+ (dep-target "" "on" (exist? "hard")) +]
[+ ESAC +][+
ENDFOR dependencies +]
-# Non-toplevel bootstrap rules must depend on several packages, to be built
-# before gcc. Another wart that will go away, hopefully soon.
-@if gcc-no-bootstrap
-[+ FOR host_modules +][+
- IF (and (not (= (get "module") "gcc"))
- (hash-ref boot-modules (get "module"))) +]
-all-prebootstrap: maybe-all-[+module+][+
- ENDIF +][+
-ENDFOR host_modules +]
+# Dependencies for target modules on other target modules are
+# described by lang_env_dependencies; the defaults apply to anything
+# not mentioned there.
+[+
+ ;; Predicate for whether LANG was specified in lang_env_dependencies.
+ (define lang-dep (lambda (lang)
+ (hash-ref lang-env-deps (string-append (get "module") "-" lang))))
+
+ ;; Build the hash table we will need.
+ (define lang-env-deps (make-hash-table 7))
++][+ FOR lang_env_dependencies +][+
+ (if (exist? "cxx")
+ (hash-create-handle! lang-env-deps
+ (string-append (get "module") "-" "cxx") #t))
+
+ (if (exist? "no_c")
+ (hash-create-handle! lang-env-deps
+ (string-append (get "module") "-" "no_c") #t))
+
+ (if (exist? "no_gcc")
+ (hash-create-handle! lang-env-deps
+ (string-append (get "module") "-" "no_gcc") #t))
+ "" +][+ ENDFOR lang_env_dependencies +]
+
+@if gcc-bootstrap[+ FOR target_modules +][+ IF (not (lang-dep "no_gcc"))
+ +][+ IF bootstrap +][+ FOR bootstrap_stage +]
+configure-stage[+id+]-target-[+module+]: maybe-all-stage[+id+]-target-libgcc[+
+ ENDFOR +][+ ENDIF bootstrap +][+ ENDIF +][+ ENDFOR target_modules +]
+@endif gcc-bootstrap
+
+@if gcc-no-bootstrap[+ FOR target_modules +][+ IF (not (lang-dep "no_gcc")) +]
+configure-target-[+module+]: maybe-all-target-libgcc[+
+ ENDIF +][+ ENDFOR target_modules +]
@endif gcc-no-bootstrap
+[+ FOR target_modules +][+ IF (not (lang-dep "no_c")) +]
+configure-target-[+module+]: maybe-all-target-newlib maybe-all-target-libgloss[+
+ ENDIF +][+ IF (lang-dep "cxx") +]
+configure-target-[+module+]: maybe-all-target-libstdc++-v3[+
+ ENDIF +]
+[+ ENDFOR target_modules +]
+
CONFIGURE_GDB_TK = @CONFIGURE_GDB_TK@
GDB_TK = @GDB_TK@
INSTALL_GDB_TK = @INSTALL_GDB_TK@
@@ -1599,7 +1601,7 @@ config.status: configure
# Rebuilding configure.
AUTOCONF = autoconf
-$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/config/acx.m4
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(srcdir)/config/acx.m4
cd $(srcdir) && $(AUTOCONF)
# ------------------------------
diff --git a/contrib/binutils/bfd/ChangeLog b/contrib/binutils/bfd/ChangeLog
index 5bb5bb2..e006595 100644
--- a/contrib/binutils/bfd/ChangeLog
+++ b/contrib/binutils/bfd/ChangeLog
@@ -1,1359 +1,1788 @@
-2006-12-11 Eric Botcazou <ebotcazou@adacore.com>
+2007-07-02 Joseph Myers <joseph@codesourcery.com>
- * elflink.c (bfd_elf_gc_sections): Also search for corresponding
- sections with .gnu.linkonce.t. prefix.
+ * elfxx-mips.c (mips_elf_calculate_relocation): Handle
+ R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64.
+ * elf64-mips.c (mips_elf64_howto_table_rela): Support
+ R_MIPS_TLS_DTPREL64.
-2006-08-08 Nick Clifton <nickc@redhat.com>
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
- PR binutils/2724
- * coffcode.h (coff_new_section_hook): Only modify the section
- symbol of sections which were created by the user.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+ * po/bfd.pot: Regenerate.
+
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
+ symsec != NULL tests.
+
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4712
+ * elf.c (assign_file_positions_for_load_sections): Adjust lma
+ by p_vaddr_offset.
+
+2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * aclocal.m4: Regenerated.
+ * Makefile.in: Likewise.
+
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * elf32-ppc.c (ppc_elf_merge_obj_attributes): New.
+ (ppc_elf_merge_private_bfd_data): Call it.
+
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * elfxx-mips.c (mips_elf_merge_obj_attributes): New.
+ (_bfd_mips_elf_merge_private_bfd_data): Call it.
+
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * elf-attrs.c: New.
+ * Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo.
+ (BFD32_BACKENDS_CFILES): Add elf-attrs.c.
+ (elf-attrs.lo): Generate dependencies.
+ * Makefile.in: Regenerate.
+ * configure.in (elf): Add elf-attrs.lo.
+ * configure: Regenerate.
+ * elf-bfd.h (struct elf_backend_data): Add entries for object
+ attributes.
+ (NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list,
+ OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST,
+ Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility):
+ New.
+ (struct elf_obj_tdata): Add entries for object attributes.
+ (elf_known_obj_attributes, elf_other_obj_attributes,
+ elf_known_obj_attributes_proc, elf_other_obj_attributes_proc):
+ New.
+ (bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents,
+ bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int,
+ bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string,
+ bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat,
+ bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup,
+ _bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type,
+ _bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New.
+ * elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes.
+ (bfd_section_from_shdr): Handle attributes sections.
+ * elflink.c (bfd_elf_final_link): Handle attributes sections.
+ * elfxx-target.h (elf_backend_obj_attrs_vendor,
+ elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type,
+ elf_backend_obj_attrs_section_type): New.
+ (elfNN_bed): Update.
+ * elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute,
+ aeabi_attribute_list): Remove.
+ (struct elf32_arm_obj_tdata): Remove object attributes fields.
+ (check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2,
+ elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes):
+ Update for new object attributes interfaces.
+ (uleb128_size, is_default_attr, eabi_attr_size,
+ elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
+ elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
+ elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int,
+ elf32_arm_add_eabi_attr_int, attr_strdup,
+ elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
+ copy_eabi_attributes, elf32_arm_parse_attributes): Remove. Moved
+ to generic code in elf-attrs.c.
+ (elf32_arm_obj_attrs_arg_type): New.
+ (elf32_arm_fake_sections): Do not handle .ARM.attributes.
+ (elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES.
+ (bfd_elf32_bfd_final_link): Remove.
+ (elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section,
+ elf_backend_obj_attrs_arg_type,
+ elf_backend_obj_attrs_section_type): New.
+ * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object
+ attributes.
+ * elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise.
+ * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise.
+ * elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise.
+ * elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise.
+ * elf32-sh.c (sh_elf_copy_private_data): Likewise.
+ * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
+
+2007-06-29 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Suppress
+ call veneers for call relocations against undefined symbols.
+ (elf32_arm_final_link_relocate): Turn call to undefined symbol
+ into a jump to the next instruction.
+
+2007-06-29 Michael Snyder <msnyder@svkmacdonelllnx>
+
+ * bfd.c (bfd_demangle): Plug memory leak (Coverity).
+
+2007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+ * Makefile.am: Add cr16 related entry
+ * Makefile.in: Regenerate
+ * archures.c: Add bfd_cr16_arch
+ * bfd-in2.h: Regenerate
+ * config.bfd: Add cr16-elf
+ * configure.in: Add bfd_elf32_cr16_vec
+ * configure: Regenerate.
+ * targets.c: Added cr16 related information
+ * cpu-cr16.c: New file.
+ * elf32-cr16.c: New file.
+ * reloc.c: Added cr16 relocs.
+
+2007-06-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (_bfd_elf_link_assign_sym_version): Improve error
+ message for undefined version nodes.
+ (elf_gc_sweep): Don't warn when zero size sections are
+ removed.
+
+2007-06-29 Nathan Froyd <froydnj@codesourcery.com>
+
+ * elf32-ppc.c (ppc_elf_info_to_howto): Check for invalid relocation
+ types.
+
+2007-06-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.c (spu_elf_fake_sections): New function.
+ (elf_backend_fake_sections): Define.
+
+2007-06-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (assign_file_positions_for_load_sections): Use elf
+ section header sh_size rather than bfd section size, simplifying
+ .tbss handling.
+
+2007-06-29 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/4701
+ * elf.c (assign_file_positions_for_load_sections): Ensure bss
+ segments meet gABI alignment requirements. Don't allocate
+ file space for bss sections in a segment also containing file
+ or program headers.
-2006-07-19 Alan Modra <amodra@bigpond.net.au>
+2007-06-27 Alan Modra <amodra@bigpond.net.au>
- * bfd-in.h (enum notice_asneeded_action): Define.
+ * bfd.c (struct bfd): Rename "next" to "archive_next".
+ * archive.c: Rename uses throughout file.
+ * archive64.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * ecoff.c: Likewise.
+ * som.c: Likewise.
* bfd-in2.h: Regenerate.
- * elflink.c (elf_link_add_object_symbols): Call linker "notice"
- function with NULL name for as-needed handling.
-2006-07-12 Matthew R. Dempsky <mrd@alkemio.org>
+ * elf32-ppc.c (ppc_elf_select_plt_layout): Properly iterate over
+ input bfds.
+ * elf32-spu.c (spu_elf_create_sections): Likewise.
+
+2007-06-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * dwarf2.c (find_line): New. Contains the duplicated code from:
+ (_bfd_dwarf2_find_nearest_line): Use it.
+ (_bfd_dwarf2_find_line): Use it.
+
+2007-06-26 Joseph Myers <joseph@codesourcery.com>
+
+ * elf32-arm.c (copy_eabi_attributes): Copy type of attributes.
+
+2007-06-25 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Allow local stubs
+ to be used for calls from MIPS16 code.
+
+2007-06-23 Andreas Schwab <schwab@suse.de>
+
+ * configure.in (--with-separate-debug-dir): New option.
+ * configure: Regenerate.
+ * Makefile.am (dwarf2.lo): Add rule to pass DEBUGDIR.
+ * Makefile.in: Regenerate.
+ * dwarf2.c (_bfd_dwarf2_find_nearest_line): Pass DEBUGDIR to
+ bfd_follow_gnu_debuglink.
+ (_bfd_dwarf2_find_line): Likewise.
+
+2007-06-22 Nick Clifton <nickc@redhat.com>
+
+ * dwarf2.c: Add support for reading in debug information via a
+ .gnu_debuglink section:
+ (struct dwarf2_debug): Add bfd field to record the bfd containing
+ the debug info.
+ (parse_comp_unit): Remove ABFD parameter. Instead use the bfd
+ field in the dwarf2_debug structure.
+ (_bfd_dwarf2_find_nearest_line): If a debug info section could not
+ be found in the current bfd call bfd_follow_gnu_debuglink to see
+ if another file contains the debug information. If it does, open
+ it and continue.
+ (_bfd_dwarf2_find_line): Likewise.
+
+2007-06-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/4590
+ * elfxx-ia64.c (sort_dyn_sym_info): Keep the valid got_offset
+ when removing duplicated entries.
+ (get_dyn_sym_info): Initialize the got_offset field to -1.
+ Update call to sort_dyn_sym_info.
+ (elfNN_ia64_relocate_section): Call sort_dyn_sym_info to sort
+ array of addend and remove duplicates.
+
+2007-06-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * libpei.h (_bfd_XXi_final_link_postscript): Remove
+ duplication.
+ (bfd_target_pei_p): New.
+ (bfd_target_pei_arch): New
+ (bfd_target_efi_p): Likewise.
+ (bfd_target_efi_arch): New
+ (bfd_pe_executable_p): Use bfd_target_pei_p and
+ bfd_target_efi_p.
+
+ * peicode.h (arch_type): New enum.
+ (pe_arch): New function.
+ (pe_bfd_object_p): Don't match PE/EFI target with EFI/PE file
+ if there is an EFI/PE target.
+
+2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
- * cpu-m68k.c (bfd_m68k_compatible): Handle CPU32.
+ * Makefile.am (ACLOCAL_AMFLAGS): Add -I . -I ../config.
-2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
+ * acinclude.m4: Don't include m4 files. Remove libtool
+ kludge.
- * Makefile.am: Clear RELEASE.
* Makefile.in: Regenerated.
+ * aclocal.m4: Likewise.
+ * configure: Likewise.
-2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
+2007-06-11 Sterling Augustine <sterling@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
- * configure.in: Update version to 2.17.
- * Makefile.am: Set RELEASE.
- * configure, Makefile.in: Regenerated.
+ * elf32-xtensa.c (extend_ebb_bounds_forward): Use renamed
+ XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
+ (extend_ebb_bounds_backward, compute_text_actions): Likewise.
+ (compute_ebb_proposed_actions, coalesce_shared_literal): Likewise.
+ (xtensa_get_property_predef_flags): Likewise.
+ (compute_removed_literals): Pass new arguments to is_removable_literal.
+ (is_removable_literal): Add sec, prop_table and ptblsize arguments.
+ Do not remove literal if the NO_TRANSFORM property flag is set.
-2006-06-12 Daniel Jacobowitz <dan@codesourcery.com>
+2007-05-31 Richard Sandiford <rsandifo@nildram.co.uk>
- * configure.in: Update version to 2.16.94.
- * configure: Regenerated.
+ * elfxx-mips.c (mips_elf_initialize_tls_index): When processing a
+ type (3) single-GOT entry, read tls_type from the hash table entry
+ rather than the GOT entry.
-2006-06-11 Richard Sandiford <richard@codesourcery.com>
- Thiemo Seufer <ths@mips.com>
-
- * elfxx-mips.c (mips_elf_link_hash_table): Add function_stub_size.
- (STUB_ORI): New macro.
- (STUB_LI16U): Fix formatting.
- (MIPS_FUNCTION_STUB_SIZE): Delete.
- (MIPS_FUNCTION_STUB_MAX_SIZE): Likewise.
- (MIPS_FUNCTION_STUB_NORMAL_SIZE): New macro.
- (MIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
- (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->function_stub_size
- instead of MIPS_FUNCTION_STUB_SIZE.
- (count_section_dynsyms): New function, split out from
- _bfd_mips_elf_final_link.
- (_bfd_mips_elf_always_size_sections): Get a worst-case estimate
- of the number of dynamic symbols needed and use it to set up
- function_stub_size. Use function_stub_size rather than
- MIPS_FUNCTION_STUB_SIZE to determine the size of the stub section.
- Use 16-byte stubs for 0x10000 dynamic symbols.
- (_bfd_mips_elf_size_dynamic_sections): Use htab->function_stub_size
- instead of MIPS_FUNCTION_STUB_SIZE. Fix formatting.
- (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Change the
- size of the stub buffer from MIPS_FUNCTION_STUB_MAX_SIZE to
- MIPS_FUNCTION_STUB_BIG_SIZE. Tweak the check for unhandled dynindxes.
- Use MIPS_FUNCTION_STUB_BIG_SIZE rather than a hard-coded 20.
- Use STUB_ORI rather than STUB_LI16U for big stubs.
- (_bfd_mips_elf_link_hash_table_create): Initialize function_stub_size.
- (_bfd_mips_elf_final_link): Use count_section_dynsyms.
-
-2006-06-08 David Daney <ddaney@avtrex.com>
-
- * elfxx-mips.c (STUB_LI16): Removed.
- (STUB_LUI): New macro.
- (STUB_LI16U): Ditto.
- (STUB_LI16S): Ditto.
- (MIPS_FUNCTION_STUB_SIZE): Rewrote to take info parameter.
- (_bfd_mips_elf_adjust_dynamic_symbol): Pass info parameter to
- MIPS_FUNCTION_STUB_SIZE.
- (_bfd_mips_elf_always_size_sections): Ditto.
- (_bfd_mips_elf_size_dynamic_sections): Ditto.
- (_bfd_mips_elf_finish_dynamic_sections): Ditto.
- (_bfd_mips_elf_finish_dynamic_symbol): Rewrote stub generation
- to allow larger symbol table indexes.
-
-2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
-
- * po/Make-in (pdf, ps): New dummy targets.
-
-2006-06-01 Daniel Jacobowitz <dan@codesourcery.com>
-
- Backport:
- 2006-05-23 H.J. Lu <hongjiu.lu@intel.com>
- PR ld/2655
- PR ld/2657
- * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Properly
- update CIE/FDE length. Don't pad to the section alignment.
-
-2006-05-30 Nick Clifton <nickc@redhat.com>
-
- * po/es.po: Updated Spanish translation.
-
-2006-05-23 Alan Modra <amodra@bigpond.net.au>
-
- * elf64-ppc.c (compare_symbols): Prefer strong dynamic global
- function syms over other syms.
-
-2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
-
- * elflink.c (_bfd_elf_add_dynamic_entry): Remove DT_TEXTREL
- check.
- (bfd_elf_final_link): Add a late DT_TEXTREL check.
- * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): Define.
- (mips_elf_create_dynamic_relocation): Set DF_TEXTREL.
- (_bfd_mips_elf_check_relocs): Delete MIPS_READONLY_SECTION.
- Use MIPS_ELF_READONLY_SECTION.
- (_bfd_mips_elf_size_dynamic_sections): Clear DF_TEXTREL after
- creating DT_TEXTREL.
- (_bfd_mips_elf_finish_dynamic_sections): Clear textrel markers
- if no text relocations were generated.
-
-2006-05-17 Daniel Jacobowitz <dan@codesourcery.com>
-
- * configure.in: Update version to 2.16.93.
- * configure: Regenerated.
+2007-06-01 Alan Modra <amodra@bigpond.net.au>
-2006-05-17 Alan Modra <amodra@bigpond.net.au>
+ * simple.c (bfd_simple_get_relocated_section_contents): Init
+ input_bfds_tail.
- * elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
- non-load sections if they have relocs.
+2007-05-30 Alan Modra <amodra@bigpond.net.au>
-2006-05-16 Andreas Schwab <schwab@suse.de>
+ * elf.c (elf_fake_sections): Adjust test for SHT_NOBITS sections
+ created by objcopy --only-keep-debug.
+ (_bfd_elf_init_private_section_data): Only change elf_section_type
+ if it is SHT_NULL.
- * aoutf1.h (struct external_sparc_core): Declare c_regs as struct
- regs instead of an array of int.
- (struct external_solaris_bcp_core): Likewise.
- (swapcore_sun3): Use offsetof instead of computing the offset
- manually.
- (swapcore_sparc): Likewise. Simplify reference to c_regs.
- (swapcore_solaris_bcp): Likewise.
+ * elf.c (assign_file_positions_for_load_sections): Correct sh_type
+ to SHT_NOBITS earlier. Base actions in rest of function on sh_type
+ and sh_flags instead of bfd section flags. Delete voff and code
+ keeping nobits segments aligned.
-2006-05-15 Alan Modra <amodra@bigpond.net.au>
+2007-05-25 Eric Christopher <echristo@apple.com>
- PR 2658
- * elf32-ppc.c (ppc_elf_relax_section): Don't segfault on non-pic
- -shared link.
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame):
+ Check that sym_sec isn't NULL before accessing.
-2006-05-11 Michael Matz <matz@suse.de>
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
- * elflink.c (match_group_member): Correctly iterate group
- members.
+ * Makefile.in: Regnerate.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * doc/Makefile.in: Regenerate.
-2006-05-11 Nick Clifton <nickc@redhat.com>
+2007-05-22 Paul Brook <paul@codesourcery.com>
- PR ld/2607
- * elfcode.h (valid_section_index_p): New function: Checks for a
- valid section index. Allows indicies in the range SHN_LOPROC to
- SHN_HIOS.
- (elf_object_p): Use valid_section_index_p.
+ * elf32-arm.c (output_arch_syminfo): Replace plt_shndx and plt_offset
+ with sec and sec_shndx.
+ (elf32_arm_ouput_plt_map_sym): Use them.
+ (elf32_arm_output_arch_local_syms): Output mapping symbols for
+ interworking glue.
-2006-05-11 Nick Clifton <nickc@redhat.com>
+2007-05-18 Paul Brook <paul@codesourcery.com>
- PR ld/2257
- * elfcode.h (elf_object_p): Allow files with corrupt e_shstrndx
- fields to still be handled as ELF files.
+ * elf32-arm.c (ARM2THUMB_V5_STATIC_GLUE_SIZE): Define.
+ (a2t1v5_ldr_insn, a2t1v5_ldr_insn): New.
+ (record_arm_to_thumb_glue): Add v5t non-pic glue.
+ (elf32_arm_create_thumb_stub): Ditto.
-2006-05-10 Alan Modra <amodra@bigpond.net.au>
+2007-05-16 H.J. Lu <hongjiu.lu@intel.com>
+ Alan Modra <amodra@bigpond.net.au>
- PR 2342
- * elflink.c (_bfd_elf_default_action_discarded): Revert 2006-02-16.
+ * elflink.c (_bfd_elf_adjust_dynamic_copy): Align dynamic bss
+ section to the minimum alignment.
-2006-05-10 Alan Modra <amodra@bigpond.net.au>
+2007-05-15 H.J. Lu <hongjiu.lu@intel.com>
+ Alan Modra <amodra@bigpond.net.au>
- * elf64-ppc.c (ppc64_elf_tls_optimize): Only optimize
- R_PPC64_TPREL64 and R_PPC64_DTPMOD64 relocs when they are in
- the .toc and referenced by a TLS code sequence.
- (ppc64_elf_edit_toc): Cater for the unlikely situation that
- .toc is the first section in a file.
+ PR ld/4504
+ * elf-bfd.h (_bfd_elf_adjust_dynamic_copy): New.
+ * elflink.c (_bfd_elf_adjust_dynamic_copy): New.
+
+ * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Call
+ _bfd_elf_adjust_dynamic_copy to adjust for the copy in dynamic
+ bss section.
+ * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
+ * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
+ * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
+ * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
+ * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+ * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
+ * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+ * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
+ * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
+
+2007-05-15 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (mips_elf_create_local_got_entry): Remove
+ input_section argument. Create .rela.dyn relocations against
+ symbol 0 rather than the section symbol.
+ (mips_elf_local_got_index): Remove input_section argument.
+ Update call to mips_elf_create_local_got_entry.
+ (mips_elf_got_page, mips_elf_got16_entry): Likewise.
+ (mips_elf_calculate_relocation): Update calls to
+ mips_elf_local_got_index, mips_elf_got16_entry and mips_elf_got_page.
+
+2007-05-15 Mark Shinwell <shinwell@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Correctly
+ handle the Thumb-2 JUMP19 relocation.
+
+2007-05-15 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4479
+ * elf.c (elf_fake_sections): Don't allow backend to change
+ SHT_NOBITS if called for strip/objcopy --only-keep-debug.
+ * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove similar
+ fix from here.
+
+2007-05-14 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (bfd_elf_string_from_elf_section): Return NULL on
+ invalid shstrndx.
+ (bfd_elf_get_str_section): Likewise.
+
+2007-05-12 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4497
+ * elf-eh-frame.c (struct cie): Add "local_personality". Make
+ "personality" a union.
+ (cie_eq): Compare local_personality too. Adjust personality
+ comparison.
+ (_bfd_elf_discard_section_eh_frame): Check binding on personality
+ reloc sym to allow for bad symtab. Use stashed local syms rather
+ than reading personality local sym. Handle discarded sections.
+
+2007-05-12 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.c (elf_howto_table): Add howto for R_SPU_ADDR16X.
+
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.h (ppc_elf_select_plt_layout): Update prototype.
+ (enum ppc_elf_plt_type): Move from..
+ * elf32-ppc.c: ..here.
+ (struct ppc_elf_obj_tdata): Add makes_plt_call and has_rel16.
+ (struct ppc_elf_link_hash_table): Reorder. Add old_bfd. Delete
+ can_use_new_plt. Make is_vxworks a bitfield.
+ (ppc_elf_link_hash_table_create): Don't clear is_vxworks (again).
+ (ppc_elf_check_relocs): Update setting of reloc flags. Set old_bfd.
+ (ppc_elf_select_plt_layout): Modify parameters. Use bfd reloc
+ flags to better detect object files needing old bss-style plt.
+ Allow secure plt to be used without rel16 relocs being detected.
+ Warn if secure plt request cannot be allowed.
+
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
+
+ * reloc.c (BFD_RELOC_SPU_PPU32, BFD_RELOC_SPU_PPU64): Define.
+ * elf-bfd.h (struct elf_backend_data): Change return type of
+ elf_backend_relocate_section to int.
+ * elf32-spu.c (elf_howto_table): Add howtos for R_SPU_PPU32 and
+ R_SPU_PPU64.
+ (spu_elf_bfd_to_reloc_type): Convert new relocs.
+ (spu_elf_count_relocs): New function.
+ (elf_backend_count_relocs): Define.
+ (spu_elf_relocate_section): Arrange to emit R_SPU_PPU32 and
+ R_SPU_PPU64 relocs.
+ * elflink.c (elf_link_input_bfd): Emit relocs if relocate_section
+ returns 2.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
-2006-05-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+2007-05-10 Richard Sandiford <richard@codesourcery.com>
- PR binutils/2584
- * tekhex.c (getvalue): Change return type to bfd_boolean and
- add the new parameter. Return false if the unexpected character
- is found.
- (getsym): Likewise.
- (first_phase): Change return type to bfd_boolean and return
- false if the unexpected character is found. Replace abort
- with returning false.
- (pass_over): Change return type to bfd_boolean and the type of
- the second argument to bfd_boolean (*) (bfd *, int, char *).
- Return false if FUNC returns false.
- (tekhex_object_p): Return NULL if pass_over fails.
+ * elf32-arm.c (elf32_arm_check_relocs): Don't create PLT entries
+ for R_ARM_ABS12 relocs.
+ (elf32_arm_finish_dynamic_symbol): Fix the loop that creates
+ non-shared VxWorks PLT entries.
-2006-05-02 Paul Brook <paul@codesourcery.com>
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
- * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit
- for R_ARM_REL32.
+ PR 4454
+ * elf-eh-frame.c (struct cie): Make "personality" a bfd_vma.
+ (_bfd_elf_discard_section_eh_frame): Handle local syms on
+ personality relocation.
-2006-04-27 Alan Modra <amodra@bigpond.net.au>
+2007-05-10 Richard Sandiford <richard@codesourcery.com>
- * coff-rs6000.c (xcoff_write_archive_contents_old): Warning fix.
+ * elf.c (assign_file_positions_for_load_sections): Use p_memsz
+ rather than p_filesz to calculate the LMA of the end of a segment.
-2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+2007-05-10 Jakub Jelinek <jakub@redhat.com>
- * configure.in: Update version to 2.16.92.
- * configure: Regenerated.
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't do copyreloc
+ processing if symbol is defined in the executable.
+
+2007-05-10 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-frv.c (_frvfdpic_check_discarded_relocs): New.
+ (frvfdpic_elf_discard_info): New.
+ (elf_backend_discard_info): Define for FDPIC.
+
+2007-05-09 Mark Shinwell <shinwell@codesourcery.com>
+
+ * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Don't
+ attempt to scan if the bfd doesn't correspond to an ELF image.
+ (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
+
+2007-05-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-frv.c (elf32_frv_relocate_section): Discard dynamic relocs
+ for which _bfd_elf_section_offset returns -1.
+
+2007-05-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.c (spu_elf_size_stubs): Use "void *" for psyms.
+ (mark_functions_via_relocs): Likewise.
+
+2007-05-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (bfd_elf_final_link): Correct reloc handling for
+ elf_backend_count_relocs.
+ (bfd_elf_discard_info): Print an error if we can't read syms.
+
+2007-05-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.c (spu_elf_reloc_type_lookup): Return NULL on
+ invalid reloc code.
+ (spu_elf_gc_mark_hook, spu_elf_section_processing): Delete functions.
+ (elf_backend_gc_mark_hook, elf_backend_section_processing): Don't
+ define.
+
+2007-05-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (assign_file_positions_for_load_sections): Don't check
+ core segment.
+
+2007-05-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (elf_link_sort_relocs): Return if both .rela.dyn
+ and .rel.dyn aren't present.
+
+2007-05-04 Nick Clifton <nickc@redhat.com>
+
+ * elflink.c (elf_link_sort_relocs): If both .rela.dyn and .rel.dyn
+ sections are present examine the indirect sections in an attempt
+ to compute the correct relocation size. If there is any
+ ambiguity, produce an error and refuse to sort.
+
+2007-05-03 Sandra Loosemore <sandra@codesourcery.com>
+
+ * elf32-arm.c (allocate_dynrelocs): Fix typo in comment.
+
+2007-05-03 Vincent Riviere <vincent.riviere@freesbee.fr>
+ Nick Clifton <nickc@redhat.com>
+
+ PR gas/3041
+ * aoutx.h (swap_std_reloc_out): Treat relocs against weak symbols
+ in the same way as relocs against external symbols.
+
+2007-05-02 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (assign_file_positions_for_load_sections): Set sh_offset
+ here. Set sh_type to SHT_NOBITS if we won't be allocating
+ file space. Don't bump p_memsz for non-alloc sections. Adjust
+ section-in-segment check.
+ (assign_file_positions_for_non_load_sections): Don't set sh_offset
+ here for sections that have already been handled above.
-2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+2007-04-30 Alan Modra <amodra@bigpond.net.au>
- * po/SRC-POTFILES.in: Regenerated.
+ * elf32-spu.c (struct spu_link_hash_table): Add stack_analysis
+ and emit_stack_syms bitfields.
+ (get_sym_h): Read all symbols if stack analysis will be done.
+ (spu_elf_create_sections): Add stack_analysis and emit_stack_syms
+ params, and stash in hash table.
+ (is_hint): Split off from..
+ (is_branch): ..here. Adjust callers.
+ (spu_elf_size_stubs): Add stack_analysis param. Arrange to read
+ and keep all syms.
+ (write_one_stub): Fix mem leak.
+ (find_function_stack_adjust): New function.
+ (sort_syms_syms, sort_syms_psecs): New vars.
+ (sort_syms): New function.
+ (struct call_info, struct function_info): New.
+ (struct spu_elf_stack_info): New.
+ (alloc_stack_info, maybe_insert_function, func_name): New functions.
+ (is_nop, insns_at_end, check_function_ranges): Likewise.
+ (find_function, insert_callee, mark_functions_via_relocs): Likewise.
+ (pasted_function, interesting_section, discover_functions): Likewise.
+ (mark_non_root, call_graph_traverse, build_call_tree): Likewise.
+ (sum_stack, spu_elf_stack_analysis, spu_elf_final_link): Likewise.
+ (bfd_elf32_bfd_final_link): Define.
+ * elf32-spu.h (struct _spu_elf_section_data): Add stack_info field.
+ (spu_elf_create_sections, spu_elf_size_stubs): Update prototypes.
-2006-04-14 David Heine <dlheine@tensilica.com>
+2007-04-28 Sergey Rogozhkin <rogozhkin@niisi.msk.ru>
- * elf32-xtensa.c (build_reloc_opcodes): New.
- (compute_text_actions): Use it to decode opcodes outside inner loop.
- (check_section_ebb_pcrels_fit): Add "reloc_opcodes" argument, and if
- it is set, use it to get the opcodes for relocations.
- (move_shared_literal): Adjust call to check_section_ebb_pcrels_fit.
+ * elfxx-mips.c (mips_elf_create_dynamic_relocation): Don't access
+ memory which we might not own.
-2006-04-08 H.J. Lu <hongjiu.lu@intel.com>
+2007-04-27 Bob Wilson <bob.wilson@acm.org>
- PR ld/2513
- * elf32-i386.c (GOT_TLS_MASK): New macro for tls_type.
- (GOT_TLS_IE_IE): Likewise.
- (GOT_TLS_IE_GD): Likewise.
- (GOT_TLS_IE_MASK): Likewise.
- (elf_i386_check_relocs): For global symbols, set GOT_TLS_IE_GD
- and GOT_TLS_IE_IE for R_386_TLS_GD and R_386_TLS_IE
- respectively.
- (allocate_dynrelocs): If both GOT_TLS_IE_IE and GOT_TLS_IE_GD
- are set, treat tls_type as GOT_TLS_IE_BOTH.
- (elf_i386_relocate_section): Likewise.
+ * elf32-xtensa.c (elf_xtensa_make_sym_local): Restore deleted function.
+ (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Likewise.
+ (elf_xtensa_allocate_dynrelocs): Use elf_xtensa_make_sym_local.
-2006-04-07 Randolph Chung <tausq@debian.org>
+2007-04-27 Bob Wilson <bob.wilson@acm.org>
- * elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
- (elf64_hppa_grok_psinfo): Likewise.
- (elf_backend_grok_pstatus, elf_backend_grok_psinfo): Define.
+ * elf32-xtensa.c (xtensa_read_table_entries): Step through table
+ contents and relocs in parallel.
-2006-04-06 DJ Delorie <dj@redhat.com>
+2007-04-27 Bob Wilson <bob.wilson@acm.org>
- * elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
- each plt entry we create.
+ * elf32-xtensa.c (relax_property_section): Remove extra irel increment.
-2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+2007-04-27 Alan Modra <amodra@bigpond.net.au>
- * po/Make-in: Add install-html target.
- * Makefile.am: Rename docdir to bfddocdir. Add datarootdir, docdir
- htmldir. Add install-html and install-html-recursive targets.
+ * cpu-rs6000.c: Write Mimi's name in ASCII.
+ * coff-rs6000.c: Likewise.
+ * rs6000-core.c: Likewise.
+
+2007-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ * sysdep.h: Include config.h first.
+ Many files: Include sysdep.h before bfd.h.
+ * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
- * configure.in: AC_SUBST for datarootdir, docdir and htmldir.
- * configure: Regenerate.
-2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
+2007-04-25 Alan Modra <amodra@bigpond.net.au>
- * elfxx-ia64.c (elfNN_ia64_relax_section): Skip unneeded passes
- with the skip_relax_pass_0 and skip_relax_pass_1 bits in the
- section structure.
+ * sysdep.h: Revert last change.
-2006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
+2007-04-24 Nick Clifton <nickc@redhat.com>
- * elf32-bfin.c (bfinfdpic_relocs_info_hash): Sprinkle casts to
- eliminate warnings.
+ * coffcode.h (coff_slurp_reloc_table): Initialise dst.r_offset.
+ * coff-m68k.c (m68kcoff_rtype_to_howto): Initialize relent.howto.
-2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
- James E Wilson <wilson@specifixinc.com>
+2007-04-24 Alan Modra <amodra@bigpond.net.au>
- PR ld/2442
- * elfxx-ia64.c (elfNN_ia64_dyn_sym_info): Remove next.
- (elfNN_ia64_local_hash_entry): Add count, sorted_count and
- size.
- (elfNN_ia64_link_hash_entry): Likewise.
- (elfNN_ia64_new_elf_hash_entry): Initialize count, sorted_count
- and size.
- (elfNN_ia64_hash_copy_indirect): Updated elfNN_ia64_dyn_sym_info
- processing.
- (elfNN_ia64_hash_hide_symbol): Likewise.
- (elfNN_ia64_global_dyn_sym_thunk): Likewise.
- (elfNN_ia64_local_dyn_sym_thunk): Likewise.
- (elfNN_ia64_global_dyn_info_free): New function.
- (elfNN_ia64_local_dyn_info_free): Likewise.
- (elfNN_ia64_hash_table_free): Free local and global
- elfNN_ia64_dyn_sym_info.
- (addend_compare): New function.
- (sort_dyn_sym_info): Likewise.
- (get_dyn_sym_info): Updated to use binary search for addend.
- (elfNN_ia64_check_relocs): Scan relocations to create dynamic
- relocation arrays first.
-
-2006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
-
- * elf32-bfin.c (_bfin_create_got_section): Don't generate a _gp
- symbol.
-
-2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/2411
- * elflink.c (check_dynsym): New.
- (elf_link_output_extsym): Use it.
- (bfd_elf_final_link): Likewise.
-
-2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
-
- PR ld/2404
- * elflink.c (_bfd_elf_merge_symbol): Skip the default indirect
- symbol from the dynamic definition with the default version if
- its type and the type of existing regular definition mismatch.
-
-2006-04-05 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
-
- * config.bfd (sparc-*-vxworks*): New stanza.
- * configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
- (bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Warn if
+ eh_frame_hdr table won't be created.
+
+2007-04-24 Alan Modra <amodra@bigpond.net.au>
+
+ * acinclude.m4: Include config/stdint.m4.
+ * configure.in: Invoke GCC_HEADER_STDINT.
+ * sysdep.h: Don't include ansidecl.h here.
* configure: Regenerate.
- * elf32-sparc.c: Include elf-vxworks.h.
- (elf32_sparc_vxworks_link_hash_table_create: New.
- (elf32_sparc_vxworks_final_write_processing): New.
- (TARGET_BIG_SYM): Override for VxWorks.
- (TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
- (bfd_elf32_bfd_link_hash_table_create): Likewise.
- (elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
- (elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
- (elf_backend_link_output_symbol_hook): Likewise.
- (elf_backend_emit_relocs): Likewise.
- (elf_backend_final_write_processing, elf32_bed): Likewise.
- * elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
- (sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
- (sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
- (_bfd_sparc_elf_link_hash_table_create): Don't initialize
- build_plt_entry here.
- (create_got_section): Initialize sgotplt for VxWorks.
- (_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
- plt_header_size and plt_entry_size, with new VxWorks-specific settings.
- Call elf_vxworks_create_dynamic_sections for VxWorks.
- (allocate_dynrelocs): Use plt_header_size and plt_entry_size.
- Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
- (_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
- for VxWorks. Check for the .got.plt section.
- (sparc_vxworks_build_plt_entry): New function.
- (_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
- Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
- absolute on VxWorks.
- (sparc32_finish_dyn): Add special handling for DT_RELASZ
- and DT_PLTGOT on VxWorks.
- (sparc_vxworks_finish_exec_plt): New.
- (sparc_vxworks_finish_shared_plt): New.
- (_bfd_sparc_elf_finish_dynamic_sections): Call them.
- Use plt_header_size and plt_entry_size.
- * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
- srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
- * Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
- (elf32-sparc.lo): Likewise.
+ * config.in: Regenerate.
* Makefile.in: Regenerate.
- * targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
- (_bfd_target_vector): Add a pointer to it.
-
-2006-03-30 Ben Elliston <bje@au.ibm.com>
-
- PR ld/2267
- * elflink.c (elf_fixup_link_order): Ensure `elfsec' is not a
- special section number that exceeds the number of ELF sections
- (eg. SHN_MIPS_SCOMMON).
-
-2006-03-27 Richard Sandiford <richard@codesourcery.com>
-
- * elfxx-mips.c (mips_got_entry): Add more commentary.
- (mips_elf_local_got_index): Use the hash table entry to record
- the GOT index of forced-local symbols.
- (mips_elf_initialize_tls_index): Rearrange code. Store the index
- in either the hash table entry or the mips_got_entry, not both.
- Add more commentary.
- (mips_elf_multi_got): Make sure the g->next is nonnull when calling
- mips_elf_initialize_tls_index.
-
-2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
-
- * elf32-bfin.c (bfd_const_reloc, bfd_oper_reloc, bfin_push_reloc,
- RELOC_STACK_SIZE, reloc_stack, reloc_stack_tos, is_reloc_stack_empty,
- reloc_stack_push, reloc_stack_pop, reloc_stack_operate,
- bfin_areloc_howto_table): Delete. All
- uses deleted as well.
- (bfin_reloc_map): Delete all stack relocs.
- (bfin_info_to_howto, bfin_bfd_reloc_type_lookup,
- bfin_reloc_type_lookup): Don't support them.
- (bfin_relocate_section): Don't try to handle them.
-
- * config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
- * configure.in: Likewise.
- * configure: Regenerate.
- * elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
- (BFIN_RELOC_MAX): Now 0x21.
- (bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
- (bfd_elf32_bfinfdpic_vec): Declare.
- (IS_FDPIC): New macro.
- (struct bfinfdpic_elf_link_hash_table): New struct.
- (bfinfdpic_hash_table, bfinfdpic_got_section,
- bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
- bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
- bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
- bfinfdpic_plt_initial_offset): Accessor macros for it.
- (BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
- (struct bfinfdpic_relocs_info): New struct.
- (LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
- BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
- DEFAULT_STACK_SIZE): New macros.
- (bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
- bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
- bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
- bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
- _bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
- _bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
- bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
- _bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
- elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
- _bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
- _bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
- _bfinfdpic_resolve_final_relocs_info,
- elf32_bfinfdpic_size_dynamic_sections,
- elf32_bfinfdpic_always_size_sections,
- elf32_bfinfdpic_modify_segment_map,
- _bfinfdpic_count_got_plt_entries,
- elf32_bfinfdpic_finish_dynamic_sections,
- elf32_bfinfdpic_adjust_dynamic_symbol,
- elf32_bfinfdpic_finish_dynamic_symbol,
- elf32_bfinfdpic_elf_use_relative_eh_frame,
- elf32_bfinfdpic_elf_encode_eh_address,
- elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
- elf32_bfinfdpic_copy_private_bfd_data,
- (struct _bfinfdpic_dynamic_got_info,
- struct _bfinfdpic_dynamic_got_plt_info): New structs.
- (elf32_bfin_print_private_bfd_data): Print PIC flags.
- (elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
- (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
- elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
- elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
- bfd_elf32_bfd_copy_private_bfd_data,
- elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
- elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
- elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
- elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
- elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
- elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
- elf_backend_omit_section_dynsym): Redefine these macros and include
- "elf32-target.h" again to create the elf32-bfinfdpic target.
- * reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
- BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
- BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
- BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
- BFD_RELOC_BFIN_GOTOFFLO): New.
- * targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
- (_bfd_target_vector): Add it.
- * bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate.
-2006-03-25 Richard Sandiford <richard@codesourcery.com>
+2007-04-23 Nathan Sidwell <nathan@codesourcery.com>
- * cpu-m68k.c (bfd_m68k_compatible): Treat ISA A+ and ISA B code as
- incompatible. Likewise MAC and EMAC code.
- * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Use
- bfd_get_compatible to set the new bfd architecture. Rely on it
- to detect incompatibilities.
+ * archures.c (bfd_mach_mcf_isa_c, bfd_mach_mcf_isa_c_mac,
+ bfd_mach_mcf_isa_c_emac): New.
+ * elf32-m68k.c (ISAC_PLT_ENTRY_SIZE, elf_isac_plt0_entry,
+ elf_isac_plt_entry, elf_isac_plt_info): New.
+ (elf32_m68k_object_p): Add ISA_C.
+ (elf32_m68k_print_private_bfd_data): Print ISA_C.
+ (elf32_m68k_get_plt_info): Detect ISA_C.
+ * cpu-m68k.c (arch_info): Add ISAC.
+ (m68k_arch_features): Likewise,
+ (bfd_m68k_compatible): ISAs B & C are not compatible.
-2006-03-22 Bob Wilson <bob.wilson@acm.org>
+2007-04-21 Nick Clifton <nickc@redhat.com>
- * elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
- rel->r_addend is zero.
+ * ecoff.c (_bfd_ecoff_write_armap): Initialise rehash.
+ (ecoff_link_add_archive_symbols): Likewise.
+ * coff-m68k.c (m68kcoff_common_addend_rtype_to_howto): Initialise
+ relent.howto.
+ * ieee.c (parse_int): Initialise x.
+ (must_parse_int): Initialise result.
+ (ieee_slurp_external_symbols): Initialise value.
-2006-03-22 Richard Sandiford <richard@codesourcery.com>
+2007-04-21 Alan Modra <amodra@bigpond.net.au>
- * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Fix type
- of "loc".
+ * config.bfd (spu-*-elf): Delete targ_selvecs.
-2006-03-22 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Phil Edwards <phil@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Mark Mitchell <mark@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
+2007-04-19 Nick Clifton <nickc@redhat.com>
+
+ * coffcode.h (coff_rtype_to_howto): Initialise genrel.howto.
+
+2007-04-19 Alan Modra <amodra@bigpond.net.au>
+ * bfd.c (bfd_demangle): New function.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
* bfd-in2.h: Regenerate.
- * config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
- * configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
- (bfd_elf32_littlemips_vxworks_vec): Likewise.
- (bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
- (bfd_elf32_littlemips_vec): Likewise.
- (bfd_elf32_nbigmips_vec): Likewise.
- (bfd_elf32_nlittlemips_vec): Likewise.
- (bfd_elf32_ntradbigmips_vec): Likewise.
- (bfd_elf32_ntradlittlemips_vec): Likewise.
- (bfd_elf32_tradbigmips_vec): Likewise.
- (bfd_elf32_tradlittlemips_vec): Likewise.
- (bfd_elf64_bigmips_vec): Likewise.
- (bfd_elf64_littlemips_vec): Likewise.
- (bfd_elf64_tradbigmips_vec): Likewise.
- (bfd_elf64_tradlittlemips_vec): Likewise.
- * elf32-mips.c: Include elf-vxworks.h.
- (mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
- instead of calling mips_elf32_rtype_to_howto directly.
- (mips_vxworks_copy_howto_rela): New reloc howto.
- (mips_vxworks_jump_slot_howto_rela): Likewise.
- (mips_vxworks_bfd_reloc_type_lookup): New function.
- (mips_vxworks_rtype_to_howto): Likewise.
- (mips_vxworks_final_write_processing): Likewise.
- (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
- (TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
- (elf_backend_want_got_plt): Likewise.
- (elf_backend_want_plt_sym): Likewise.
- (elf_backend_got_symbol_offset): Likewise.
- (elf_backend_want_dynbss): Likewise.
- (elf_backend_may_use_rel_p): Likewise.
- (elf_backend_may_use_rela_p): Likewise.
- (elf_backend_default_use_rela_p): Likewise.
- (elf_backend_got_header_size: Likewise.
- (elf_backend_plt_readonly): Likewise.
- (bfd_elf32_bfd_reloc_type_lookup): Likewise.
- (elf_backend_mips_rtype_to_howto): Likewise.
- (elf_backend_adjust_dynamic_symbol): Likewise.
- (elf_backend_finish_dynamic_symbol): Likewise.
- (bfd_elf32_bfd_link_hash_table_create): Likewise.
- (elf_backend_add_symbol_hook): Likewise.
- (elf_backend_link_output_symbol_hook): Likewise.
- (elf_backend_emit_relocs): Likewise.
- (elf_backend_final_write_processing: Likewise.
- (elf_backend_additional_program_headers): Likewise.
- (elf_backend_modify_segment_map): Likewise.
- (elf_backend_symbol_processing): Likewise.
- * elfxx-mips.c: Include elf-vxworks.h.
- (mips_elf_link_hash_entry): Add is_relocation_target and
- is_branch_target fields.
- (mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
- srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
- (MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
- (MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
- Return 3 for VxWorks.
- (ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
- mips_elf_link_hash_table. Return 0 for VxWorks.
- (MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
- mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
- (mips_vxworks_exec_plt0_entry): New variable.
- (mips_vxworks_exec_plt_entry): Likewise.
- (mips_vxworks_shared_plt0_entry): Likewise.
- (mips_vxworks_shared_plt_entry): Likewise.
- (mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
- (mips_elf_rel_dyn_section): Change the bfd argument to a
- mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
- the name of the section.
- (mips_elf_initialize_tls_slots): Update the call to
- mips_elf_rel_dyn_section.
- (mips_elf_gotplt_index): New function.
- (mips_elf_local_got_index): Add an input_section argument.
- Update the call to mips_elf_create_local_got_entry.
- (mips_elf_got_page): Likewise.
- (mips_elf_got16_entry): Likewise.
- (mips_elf_create_local_got_entry): Add bfd_link_info and input_section
- arguments. Create dynamic relocations for each entry on VxWorks.
- (mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
- (mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
- and MIPS_RESERVED_GOTNO.
- (mips_elf_create_got_section): Update the uses of
- MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
- (is_gott_symbol): New function.
- (mips_elf_calculate_relocation): Use a dynobj local variable.
- Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
- mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
- VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
- relocations on VxWorks. Add dynamic relocations for references
- to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
- create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
- in VxWorks executables.
- (mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
- Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
- Don't allocate a null entry on VxWorks.
- (mips_elf_create_dynamic_relocation): Update the call to
- mips_elf_rel_dyn_section. Use absolute rather than relative
- relocations for VxWorks, and make them RELA rather than REL.
- (_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
- read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
- Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
- VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
- Call elf_vxworks_create_dynamic_sections for VxWorks and
- initialize the plt_header_size and plt_entry_size fields.
- (_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
- used in VxWorks executables. Don't allocate dynamic relocations
- for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
- Set is_relocation_target for each symbol referenced by a relocation.
- Allocate .rela.dyn entries for relocations against the special
- VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
- entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
- a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
- R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
- to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
- Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
- relocations. Don't set no_fn_stub on VxWorks.
- (_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
- mips_elf_allocate_dynamic_relocations.
- (_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
- (_bfd_mips_elf_always_size_sections): Do not allocate GOT page
- entries for VxWorks, and do not create multiple GOTs.
- (_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
- Handle .got specially for VxWorks. Update the uses of
- MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
- Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
- once its final size is known. Set DF_TEXTREL for VxWorks. Add
- DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
- tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
- (_bfd_mips_vxworks_finish_dynamic_symbol): New function.
- (mips_vxworks_finish_exec_plt): Likewise.
- (mips_vxworks_finish_shared_plt): Likewise.
- (_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
- to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
- DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
- DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
- and mips_elf_rel_dyn_section. Use a different GOT header for
- VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
- (_bfd_mips_elf_link_hash_table_create): Initialize the new
- mips_elf_link_hash_table fields.
- (_bfd_mips_vxworks_link_hash_table_create): New function.
- (_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
- on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
- * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
- (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
- (_bfd_mips_vxworks_link_hash_table_create): Likewise.
- * libbfd.h: Regenerate.
- * Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
- (elf32-mips.lo): Likewise.
+
+2007-04-18 Matthias Klose <doko@ubuntu.com>
+
+ * Makefile.am (libbfd_la_LDFLAGS): Use bfd soversion.
+ (bfdver.h): Use the date in non-release builds for the soversion.
* Makefile.in: Regenerate.
- * reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
- * targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
- (bfd_elf32_littlemips_vxworks_vec): Likewise.
- (_bfd_target_vector): Add entries for them.
-2006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2007-04-17 Paul Brook <paul@codesourcery.com>
- * elf64-hppa.c (elf64_hppa_special_sections): Change flags for .tbss
- section from SHF_PARISC_WEAKORDER to SHF_HP_TLS.
- (elf_backend_special_sections): Remove #undef.
+ * elf.c (_bfd_elf_is_function_type): New function.
+ * elflink.c (_bfd_elf_merge_symbol): Use bed->is_function_type.
+ (_bfd_elf_dynamic_symbol_p, _bfd_elf_symbol_refs_local_p,
+ is_global_data_symbol_definition, elf_link_add_object_symbols): Ditto.
+ * elf-bfd.h (elf_backend_data): Add is_function_type.
+ (_bfd_elf_is_function_type): Add prototype.
+ * elfxx-target.h (elf_backend_is_function_type): Add default
+ definition.
+ (elfNN_bed): Add elf_backend_is_function_type.
+ * elf32-arm.c (elf32_arm_is_function_type): New function.
+ (elf_backend_is_function_type): Define.
-2006-03-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2007-04-17 Daniel Jacobowitz <dan@codesourcery.com>
- * elf64-hppa.c (allocate_global_data_opd): Don't create an OPD entry
- for undefined weak symbols.
+ * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Put
+ DT_MIPS_RLD_MAP before DT_DEBUG again.
-2006-03-17 Daniel Jacobowitz <dan@codesourcery.com>
+2007-04-14 Steve Ellcey <sje@cup.hp.com>
- PR ld/2462
- * elflink.c (bfd_elf_final_link): Remove
- bed->elf_backend_emit_relocs from emit_relocs.
+ * Makefile.am: Add ACLOCAL_AMFLAGS.
+ * configure.in: Change macro call order.
+ * Makefile.in: Regnerate.
+ * doc/Makefile.in: Regenerate.
+ * configure: Regenerate.
-2006-03-17 Alexandre Oliva <aoliva@redhat.com>
+2007-04-14 Jakub Jelinek <jakub@redhat.com>
- * elf32-ppc.c (ppc_elf_relocate_section): Copy addend from
- first relocation to the second when relaxing TLS GD to LE;
- zero it out when relaxing to IE.
+ * elflink.c (bfd_elf_final_link): Don't free symbuf for
+ non-elf input bfds.
+ (bfd_elf_size_dynamic_sections): Don't access elf_section_data
+ for non-elf input bfds.
-2006-03-17 Alan Modra <amodra@bigpond.net.au>
+2007-04-12 Richard Sandiford <richard@codesourcery.com>
- PR 2434
- * elflink.c (elf_link_add_object_symbols): Save and restore
- warning sym's linked sym.
+ * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
+ DT_MIPS_RTLD_MAP for PIEs.
-2006-03-16 Alan Modra <amodra@bigpond.net.au>
+2007-04-12 Richard Sandiford <richard@codesourcery.com>
- PR 2434
- * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete.
- (elf_link_add_object_symbols): Delete unnecessary locals. Rename
- hash_table -> htab. Formatting. Save entire symbol table
- before loading as-needed syms, and restore afterwards if lib not
- needed. Use bfd_hash_allocate rather than bfd_alloc for sym
- name. Free some buffers earlier.
- * bfd-in.h (struct bfd_hash_table): Add entsize.
- (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype.
- * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise
- * hash.c (bfd_hash_table_init_n): Add entsize param, save to
- hash table.
- (bfd_hash_table_init): Add param, adjust calls.
- * aoutx.h: Adjust all hash_table_init functions and calls.
- * bfd.c: Likewise.
- * coff-arm.c: Likewise.
- * coff-h8300.c: Likewise.
- * coff-ppc.c: Likewise.
- * cofflink.c: Likewise.
- * ecoff.c: Likewise.
- * ecofflink.c: Likewise.
- * elf-m10300.c: Likewise.
- * elf-strtab.c: Likewise.
- * elf.c: Likewise.
- * elf32-arm.c: Likewise.
- * elf32-bfin.c: Likewise.
- * elf32-cris.c: Likewise.
- * elf32-frv.c: Likewise.
- * elf32-hppa.c: Likewise.
- * elf32-i386.c: Likewise.
- * elf32-m32r.c: Likewise.
- * elf32-m68hc1x.c: Likewise.
- * elf32-m68k.c: Likewise.
- * elf32-ppc.c: Likewise.
- * elf32-s390.c: Likewise.
- * elf32-sh.c: Likewise.
- * elf32-vax.c: Likewise.
- * elf64-alpha.c: Likewise.
- * elf64-hppa.c: Likewise.
- * elf64-ppc.c: Likewise.
- * elf64-s390.c: Likewise.
- * elf64-sh64.c: Likewise.
- * elf64-x86-64.c: Likewise.
- * elfxx-ia64.c: Likewise.
- * elfxx-mips.c: Likewise.
- * elfxx-sparc.c: Likewise.
- * i386linux.c: Likewise.
- * libaout.h: Likewise.
- * libbfd-in.h: Likewise.
- * libcoff-in.h: Likewise.
- * linker.c: Likewise.
- * m68klinux.c: Likewise.
- * merge.c: Likewise.
- * opncls.c: Likewise.
- * pdp11.c: Likewise.
- * sparclinux.c: Likewise.
- * stabs.c: Likewise.
- * sunos.c: Likewise.
- * vms.c: Likewise.
- * xcofflink.c: Likewise.
- * section.c (struct section_hash_entry): Move to..
- * libbfd-in.h: ..here.
- * Makefile.am: Run "make dep-am"
- * Makefile.in: Regenerate.
- * bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate.
- * libcoff.h: Regenerate.
+ * elfxx-mips.c (mips_elf_calculate_relocation): Set DT_TEXTREL
+ when creating a __GOTT_BASE__ or __GOTT_INDEX__ relocation
+ in a read-only section.
+ (_bfd_mips_elf_check_relocs): Likewise.
+
+2007-04-12 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (xtensa_is_insntable_section): New.
+ (xtensa_is_proptable_section): New.
+ (elf_xtensa_discard_info_for_section): Handle "full" .xt.prop property
+ tables with 12-byte entries, as well as tables with 8-byte entries.
+ Sort the relocations before examining them.
+ (relax_property_section): Use xtensa_is_proptable_section and
+ xtensa_is_littable_section. Rewrite code for combining table entries
+ to be more robust in case of unexpected relocations. Do not set offset
+ of unused relocations to less than zero.
+ (xtensa_is_property_section): Use other functions instead of
+ duplicating section name comparisons.
+ (xtensa_is_littable_section): Use CONST_STRNEQ for ".gnu.linkonce.p.".
+ (xtensa_get_property_predef_flags): Use xtensa_is_insntable_section.
+
+2007-04-12 Bob Wilson <bob.wilson@acm.org>
-2006-03-16 Alan Modra <amodra@bigpond.net.au>
+ * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references
+ from Xtensa property sections.
- * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs
- against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak
- last change to REL32 relocs so that they are counted as
- possibly dynamic as per REL24 and REL14.
+2007-04-12 Alan Modra <amodra@bigpond.net.au>
-2006-03-16 Alan Modra <amodra@bigpond.net.au>
+ * elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
+ is non-NULL before dereferencing.
- * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24
- checks from REL32.
+2007-04-11 Nathan Sidwell <nathan@codesourcery.com>
-2006-03-15 Ben Elliston <bje@au.ibm.com>
+ * elf-vxworks.c (elf_vxworks_emit_relocs): Remap weakdef PLT slot
+ relocs too.
- * elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
- in_list elements, not just the first.
-
-2006-03-14 Richard Sandiford <richard@codesourcery.com>
+2007-04-10 Richard Henderson <rth@redhat.com>
- * elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
- out from...
- (_bfd_mips_elf_relocate_section): ...here. Use it to adjust r_addend
- for final links too.
+ * elf64-alpha.c (struct alpha_elf_link_hash_table): Add relax_trip.
+ (elf64_alpha_size_got_sections): Remove unused something_changed local.
+ (elf64_alpha_size_plt_section): Return void.
+ (elf64_alpha_size_rela_got_section): Likewise.
+ (elf64_alpha_relax_section): Only regenerate got+plt if the
+ relax_trip counter has changed.
-2006-03-13 Richard Sandiford <richard@codesourcery.com>
+2007-04-09 Daniel Jacobowitz <dan@codesourcery.com>
- * elfxx-mips.c (mips_elf_create_got_section): Initialize hgot.
+ * Makefile.am (bfdver.h): Do not generate doc/bfdver.texi.
+ * doc/Makefile.am (DOCFILES): Add bfdver.texi.
+ (bfdver.texi): New rule.
+ * Makefile.in, doc/Makefile.in: Regenerated.
-2006-03-11 H.J. Lu <hongjiu.lu@intel.com>
+2007-04-03 Matt Thomas <matt@netbsd.org>
- PR ld/2443
- * dwarf2.c (concat_filename): Don't issue an error if file is
- 0.
+ * elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
+ in a shared object if it is not in a CODE section or if it is against
+ a section symbol. This allows DWARF2 to use pcrel format.
-2006-03-10 Paul Brook <paul@codesourcery.com>
+2007-04-05 H.J. Lu <hongjiu.lu@intel.com>
- * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
- (elf32_arm_print_private_bfd_data): Ditto.
+ PR ld/4304
+ * elflink.c (bfd_elf_final_link): Call einfo callback in
+ bfd_link_info instead of _bfd_error_handler for DT_TEXTREL
+ warning.
-2006-03-09 Paul Brook <paul@codesourcery.com>
+2007-04-05 Alan Modra <amodra@bigpond.net.au>
- * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
- mapping symbols.
+ * elf32-spu.c (spu_elf_output_symbol_hook): New function.
+ (elf_backend_link_output_symbol_hook): Define.
-2006-03-09 Khem Raj <khem@mvista.com>
+2007-04-02 Nick Clifton <nickc@redhat.com>
- * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
- char type.
+ PR binutils/4292
+ * bfd.c (bfd_fprintf_vma): Do not print addresses of 32-bit
+ targets as 64-bit values, even if running on a 64-bit host.
+ * coffgen.c (coff_print_symbol): Likewise.
-2006-03-08 H.J. Lu <hongjiu.lu@intel.com>
+2007-03-29 Nick Clifton <nickc@redhat.com>
- * elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
+ PR binutils/4110
+ * elf.c (IS_VALID_GROUP_SECTION_HEADER): New macro.
+ (setup_group): Use it. Report corrupt group section headers.
+ (bfd_section_from_shdr): Use new macro. Replace constant 4 with
+ GRP_ENTRY_SIZE. Cope with NULLs in the group section table.
+ (elf_fake_section): Replace constant 4 with GRP_ENTRY_SIZE.
-2006-03-07 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
- Paul Brook <paul@codesourcery.com>
- Ricardo Anguiano <anguiano@codesourcery.com>
+2007-03-29 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/4267
+ * elflink.c (evaluate_complex_relocation_symbols): Use bfd_vma
+ for rel->r_info values.
+ (bfd_elf_perform_complex_relocation): Likewise.
+ * elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for
+ unused entries. Don't clear plt.plist in loop.
+
+2007-03-28 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove append_rela.
+ * elfxx-sparc.c (sparc_elf_append_rela_64, sparc_elf_append_rela_32):
+ Merge into...
+ (sparc_elf_append_rela): ...this new function.
+ (SPARC_ELF_APPEND_RELA): Delete.
+ (_bfd_sparc_elf_link_hash_table_create): Don't initialize
+ the deleted append_rela field.
+ (_bfd_sparc_elf_relocate_section): Use sparc_elf_append_rela
+ instead of SPARC_ELF_APPEND_RELA.
+ (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. Use the
+ elf_size_info structure to find the size of a RELA entry and
+ the associated swap-out function.
+ (sparc64_finish_dyn, sparc64_finish_dyn): Merge into...
+ (sparc_finish_dyn): ...this new function.
+ (_bfd_sparc_elf_finish_dynamic_sections): Update calls accordingly.
+
+2007-03-28 Richard Sandiford <richard@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
- * configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
- (bfd_elf32_bigarm_symbian_vec): Likewise.
- (bfd_elf32_bigarm_vxworks_vec): Likewise.
- (bfd_elf32_littlearm_vec): Likewise.
- (bfd_elf32_littlearm_symbian_vec): Likewise.
- (bfd_elf32_littlearm_vxworks_vec): Likewise.
- * configure: Regenerate.
- * elf32-arm.c: Include libiberty.h and elf-vxworks.h.
- (RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
- (elf32_arm_vxworks_bed): Add forward declaration.
- (elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
- (elf32_arm_vxworks_exec_plt0_entry): New table.
- (elf32_arm_vxworks_exec_plt_entry): Likewise.
- (elf32_arm_vxworks_shared_plt_entry): Likewise.
- (elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
- (reloc_section_p): New function.
- (create_got_section): Use RELOC_SECTION.
- (elf32_arm_create_dynamic_sections): Likewise. Call
- elf_vxworks_create_dynamic_sections for VxWorks targets.
- Choose between the two possible values of plt_header_size
- and plt_entry_size.
- (elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
- (elf32_arm_abs12_reloc): New function.
- (elf32_arm_final_link_relocate): Call it. Allow the creation of
- dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
- RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
- r_addend fields of relocs. On rela targets, skip any code that
- adjusts in-place addends. When using _bfd_link_final_relocate
- to perform a final relocation, pass rel->r_addend as the addend
- argument.
- (elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
- object, ignore flags that are not standard on VxWorks.
- (elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
- relocs on VxWorks. Use reloc_section_p.
- (elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
- (allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
- .rela.plt.unloaded relocs on VxWorks targets.
- (elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
- .rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
- instead of DT_REL* tags on RELA targets.
- (elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
- and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
- PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
- (elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
- and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
- like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
- Correct the .rela.plt.unreloaded symbol indexes.
- (elf32_arm_output_symbol_hook): Call the VxWorks version of this
- hook on VxWorks targets.
- (elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
- Minor formatting tweak.
- (elf32_arm_vxworks_final_write_processing): New function.
- (elf_backend_add_symbol_hook): Override for VxWorks and reset
- for Symbian.
- (elf_backend_final_write_processing): Likewise.
- (elf_backend_emit_relocs): Likewise.
- (elf_backend_want_plt_sym): Likewise.
- (ELF_MAXPAGESIZE): Likewise.
- (elf_backend_may_use_rel_p): Minor formatting tweak.
- (elf_backend_may_use_rela_p): Likewise.
- (elf_backend_default_use_rela_p): Likewise.
- (elf_backend_rela_normal): Likewise.
- * Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
-
-2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
-
- * archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp):
- New. Adjust other variants.
- (bfd_default_scan): Update.
- * bfd-in2.h: Rebuilt.
- * cpu-m68k.c: Adjust.
- (bfd_m68k_compatible): New. Use it for architectures.
- * elf32-m68k.c (elf32_m68k_object_p): Adjust.
- (elf32_m68k_merge_private_bfd_data): Adjust. Correct isa-a/b
- mismatch.
- (elf32_m68k_print_private_bfd_data): Adjust.
- * ieee.c (ieee_write_processor): Adjust.
-
-2006-03-06 Alan Modra <amodra@bigpond.net.au>
-
- * dwarf2.c: Formatting.
- (add_line_info): Remove outer loop.
-
-2006-03-05 H.J. Lu <hongjiu.lu@intel.com>
- Alan Modra <amodra@bigpond.net.au>
+ * doc/bfd.texinfo: Put the contents after the title page rather
+ than at the end of the document.
- PR binutils/2338
- * dwarf2.c (loadable_section): New struct.
- (dwarf2_debug): Add loadable_section_count and
- loadable_sections.
- (new_line_sorts_after): New.
- (add_line_info): Use new_line_sorts_after to compare line
- addresses.
- (check_function_name): Removed.
- (unset_sections): New.
- (place_sections): New.
- (_bfd_dwarf2_find_nearest_line): Updated. Call place_sections
- and unset_sections on relocatable files.
- (_bfd_dwarf2_find_line): Likewise.
+2007-03-27 Andreas Schwab <schwab@suse.de>
-2006-03-03 Nick Clifton <nickc@redhat.com>
+ * elfxx-ia64.c (elf_backend_default_execstack): Define to 0.
- * cpu-avr.c: Update to ISO-C90 formatting.
- * elf32-avr.c: Likewise.
+2007-03-26 H.J. Lu <hongjiu.lu@intel.com>
-2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
+ * configure: Regenerated.
- * elf32-avr.c (avr_reloc_map): Insert BFD_RELOC_AVR_MS8_LDI
- and R_AVR_MS8_LDI
- (bfd_elf_avr_final_write_processing): Set
- EF_AVR_LINKRELAX_PREPARED in e_flags field.
- (elf32_avr_relax_section): New function.
- (elf32_avr_relax_delete_bytes): New function.
- (elf32_avr_get_relocated_section_contents): New function.
- (avr_pc_wrap_around): New function.
- (avr_relative_distance_considering_wrap_around): New function.
- (avr_final_link_relocate): Handle negative int8t_t immediate for R_AVR_LDI.
- * reloc.c: Add BFD_RELOC_AVR_MS8_LDI and BFD_RELOC_AVR_LDI_NEG
+2007-03-26 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.c (struct stubarr): Add stub_hash_table and err fields.
+ (allocate_spuear_stubs): New function.
+ (spu_elf_size_stubs): Call allocate_spuear_stubs.
+
+2007-03-26 Alan Modra <amodra@bigpond.net.au>
+
+ * aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
+ * aout-arm.c (MY_bfd_reloc_name_lookup): Define.
+ (MY (bfd_reloc_name_lookup)): New function.
+ * aout-ns32k.c (MY (bfd_reloc_name_lookup)): New function.
+ * aout-target.h (NAME (aout, reloc_name_lookup)): Declare.
+ (MY_bfd_reloc_name_lookup): Define.
+ * aout-tic30.c (tic30_aout_reloc_name_lookup): New function.
+ (MY_bfd_reloc_name_lookup): Define.
+ * aoutx.h (NAME (aout, reloc_type_lookup)): Don't declare.
+ (NAME (aout, reloc_name_lookup)): New function.
+ * bout.c (b_out_bfd_reloc_name_lookup): New function.
+ * coff-alpha.c (alpha_bfd_reloc_name_lookup): New function.
+ (_bfd_ecoff_bfd_reloc_name_lookup): Define.
+ * coff-arm.c (coff_arm_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-i386.c (coff_bfd_reloc_name_lookup): Define.
+ (coff_i386_reloc_name_lookup): New function.
+ * coff-i860.c (coff_i860_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-i960.c (coff_i960_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-m68k.c (m68k_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-maxq.c (maxq_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-mcore.c (mcore_coff_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-mips.c (mips_bfd_reloc_name_lookup): New function.
+ (_bfd_ecoff_bfd_reloc_name_lookup): Define.
+ * coff-ppc.c (ppc_coff_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-rs6000.c (coff_bfd_reloc_name_lookup): Define.
+ (_bfd_xcoff_reloc_name_lookup): New function.
+ (rs6000coff_vec, pmac_xcoff_vec): Init new field.
+ * coff-sh.c (coff_bfd_reloc_name_lookup): Define.
+ (sh_coff_reloc_name_lookup): New function.
+ * coff-sparc.c (coff_sparc_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-tic30.c (coff_bfd_reloc_name_lookup): Define.
+ (tic30_coff_reloc_name_lookup): New function.
+ * coff-tic4x.c (coff_bfd_reloc_name_lookup): Define.
+ (tic4x_coff_reloc_name_lookup): New function.
+ * coff-tic54x.c (coff_bfd_reloc_name_lookup): Define.
+ (tic54x_coff_reloc_name_lookup): New function.
+ * coff-x86_64.c (coff_bfd_reloc_name_lookup): Define.
+ (coff_amd64_reloc_name_lookup): New function.
+ * coff-z80.c (coff_z80_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff-z8k.c (coff_z8k_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * coff64-rs6000.c (coff_bfd_reloc_name_lookup): Define.
+ (xcoff64_reloc_name_lookup): New function.
+ (rs6000coff64_vec, aix5coff64_vec): Init new field.
+ * coffcode.h (coff_bfd_reloc_name_lookup): Define.
+ * elf-hppa.h (elf_hppa_reloc_name_lookup): New function.
+ * elf-m10200.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf-m10300.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-arc.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-arm.c (elf32_arm_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-avr.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-bfin.c (bfin_bfd_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-cr16c.c (elf_cr16c_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-cris.c (cris_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-crx.c (elf_crx_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-d10v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-d30v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-dlx.c (elf32_dlx_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-fr30.c (fr30_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-frv.c (frv_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-gen.c (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-h8300.c (elf32_h8_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-hppa.c (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-i370.c (i370_elf_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-i386.c (elf_i386_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-i860.c (elf32_i860_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-i960.c (elf32_i960_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-ip2k.c (ip2k_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-iq2000.c (iq2000_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-m32c.c (m32c_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-m32r.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-m68hc11.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-m68hc12.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-m68k.c (reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-m88k.c (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-mcore.c (mcore_elf_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-mep.c (mep_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ (mips_vxworks_bfd_reloc_name_lookup): Likewise.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-msp430.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-mt.c (mt_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-openrisc.c (openrisc_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-or32.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elf32-pj.c (pj_elf_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-ppc.c (ppc_elf_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-s390.c (elf_s390_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-score.c (elf32_score_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-sh.c (sh_elf_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-sparc.c (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-spu.c (spu_elf_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-v850.c (v850_elf_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-vax.c (reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-xc16x.c (xc16x_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-xstormy16.c (xstormy16_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf32-xtensa.c (elf_xtensa_reloc_name_lookup): New function.
+ (bfd_elf32_bfd_reloc_name_lookup): Define.
+ * elf64-alpha.c (elf64_alpha_bfd_reloc_name_lookup): New function.
+ (bfd_elf64_bfd_reloc_name_lookup): Define.
+ * elf64-gen.c (bfd_elf64_bfd_reloc_name_lookup): Define.
+ * elf64-hppa.c (bfd_elf64_bfd_reloc_name_lookup): Define.
+ * elf64-mips.c (bfd_elf64_bfd_reloc_name_lookup): New function.
+ * elf64-mmix.c (bfd_elf64_bfd_reloc_name_lookup): New function.
+ * elf64-ppc.c (ppc64_elf_reloc_name_lookup): New function.
+ (bfd_elf64_bfd_reloc_name_lookup): Define.
+ * elf64-s390.c (elf_s390_reloc_name_lookup): New function.
+ (bfd_elf64_bfd_reloc_name_lookup): Define.
+ * elf64-sh64.c (sh_elf64_reloc_name_lookup): New function.
+ (bfd_elf64_bfd_reloc_name_lookup): Define.
+ * elf64-sparc.c (bfd_elf64_bfd_reloc_name_lookup): Define.
+ * elf64-x86-64.c (elf64_x86_64_reloc_name_lookup): New function.
+ (bfd_elf64_bfd_reloc_name_lookup): Define.
+ * elfn32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
+ * elfxx-ia64.c (elfNN_ia64_reloc_name_lookup): New function.
+ (bfd_elfNN_bfd_reloc_name_lookup): Define.
+ * elfxx-sparc.c (_bfd_sparc_elf_reloc_name_lookup): New function.
+ * elfxx-sparc.h (_bfd_sparc_elf_reloc_name_lookup): Declare.
+ * i386msdos.c (msdos_bfd_reloc_name_lookup): Define.
+ * i386os9k.c (aout_32_bfd_reloc_name_lookup): Define.
+ * ieee.c (ieee_bfd_reloc_name_lookup): Define.
+ * libaout.h (NAME (aout, reloc_name_lookup)): Declare.
+ * libbfd-in.h (_bfd_norelocs_bfd_reloc_name_lookup): Declare.
+ * mipsbsd.c (MY_bfd_reloc_name_lookup): Define.
+ (MY(reloc_type_lookup)): Rename from MY(reloc_howto_type_lookup).
+ (MY(reloc_name_lookup)): New function.
+ * nlm-target.h (nlm_bfd_reloc_name_lookup): Define.
+ * oasys.c (oasys_bfd_reloc_name_lookup): Define.
+ * pdp11.c (NAME (aout, reloc_name_lookup)): New function.
+ * pe-mips.c (coff_mips_reloc_name_lookup): New function.
+ (coff_bfd_reloc_name_lookup): Define.
+ * reloc.c (bfd_reloc_name_lookup): New function.
+ * riscix.c (riscix_reloc_name_lookup): New function.
+ (MY_bfd_reloc_name_lookup): Define.
+ * som.c (som_bfd_reloc_name_lookup): New function.
+ * targets.c (struct bfd_target): Add reloc_name_lookup.
+ (BFD_JUMP_TABLE_RELOCS): Add NAME##_bfd_reloc_name_lookup.
+ * versados.c (versados_bfd_reloc_name_lookup): Define.
+ * vms.c (vms_bfd_reloc_name_lookup): New function.
+ * bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
+
+2007-03-26 Thiemo Seufer <ths@mips.com>
+
+ PR ld/4208
+ * elfxx-mips.c (mips_elf_next_relocation): Don't signal an error if no
+ matching relocation is found.
+ (_bfd_mips_elf_relocate_section): Only warn about missing relocations.
+
+2007-03-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure: Regenerated.
+
+2007-03-23 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in: Use ACX_PKGVERSION and ACX_BUGURL.
+ * configure: Regenerate.
+
+2007-03-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.c (spu_stub_name): Don't put input section in stub name.
+ Remove input_sec param. Adjust all calls.
+ (write_one_stub): Adjust stub symbol.
+ (needs_ovl_stub): New function, extracted from..
+ (spu_elf_size_stubs): ..here.
+ (spu_elf_relocate_section): Use needs_ovl_stub.
+
+2007-03-22 Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile.am (bfdver.h): Only set VERSION_PACKAGE in bfdver.texi
+ if nonempty.
+ * configure.in (REPORT_BUGS_TO): Do not use "URL:" prefix.
+ * Makefile.in, configure, doc/Makefile.in: Regenerate.
+
+2007-03-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/4210
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the virtual
+ address and virtual size of the last section for the image
+ size.
+
+2007-03-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/4007
+ * elf.c (assign_file_positions_for_load_sections): Check if
+ all sections are in the segment.
+
+2007-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/4208
+ * elfxx-mips.c (_bfd_mips_elf_relocate_section): Report missing
+ matching LO16 relocation for HI16 relocation.
+
+2007-03-20 Paul Brook <paul@codesourcery.com>
+
+ * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
* bfd-in2.h: Regenerate.
+ * elf32-arm.c (elf32_arm_link_hash_table): Add pic_veneer.
+ (record_arm_to_thumb_glue): Use globals->pic_veneer.
+ (elf32_arm_create_thumb_stub): Ditto.
+ (bfd_elf32_arm_set_target_relocs): Set globals->pic_veneer.
-2006-03-02 DJ Delorie <dj@redhat.com>
-
- * elf32-m32c.c (m32c_offset_for_reloc): Fix local symbol
- calculations.
-
-2006-03-02 Richard Sandiford <richard@codesourcery.com>
-
- * elf32-ppc.c (is_ppc_elf_target): Return true if the target is
- bfd_elf32_powerpc_vxworks_vec.
-
-2006-03-02 Nick Clifton <nickc@redhat.com>
-
- * elf32-m32c.c (m32c_elf_relax_section): Initialise 'gap'.
-
-2006-03-02 Richard Sandiford <richard@codesourcery.com>
-
- * elf32-i386.c (elf_i386_create_dynamic_sections): Use
- elf_vxworks_create_dynamic_sections.
- (elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT
- symbol handling.
- * elf32-ppc.c (ppc_elf_create_dynamic_sections): Use
- elf_vxworks_create_dynamic_sections.
- (ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT
- symbol handling.
- * elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function.
- * elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare.
-
-2006-03-02 Richard Sandiford <richard@codesourcery.com>
-
- * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
- (elf_backend_link_output_symbol_hook): Use
- elf_vxworks_link_output_symbol_hook instead.
- * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
- (elf_backend_link_output_symbol_hook): Use
- elf_vxworks_link_output_symbol_hook instead.
- * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the
- same interface as elf_backend_link_output_symbol_hook.
- * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update
- prototype accordingly.
-
-2006-03-02 Richard Sandiford <richard@codesourcery.com>
-
- * elf32-ppc.c (ppc_elf_plt_type): New enumeration.
- (ppc_elf_link_hash_table): Replace old_got and new_got with
- plt_type and can_use_new_plt.
- (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS,
- SEC_LOAD and SEC_READONLY to the VxWorks .plt flags.
- (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt.
- Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt.
- (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to
- either plt_type == PLT_OLD or plt_type == PLT_NEW. Assert that
- this function should not be called for VxWorks targets.
- (ppc_elf_tls_setup): Use plt_type instead of old_got.
- (allocate_got): Likewise. Rearrange so that max_before_header
- is only used for PLT_OLD and PLT_NEW.
- (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks.
- (ppc_elf_size_dynamic_sections): Likewise.
- (ppc_elf_relax_section): Likewise.
- (ppc_elf_relocate_section): Likewise.
- (ppc_elf_finish_dynamic_symbol): Likewise.
- (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type.
-
-2006-02-28 Richard Sandiford <richard@codesourcery.com>
-
- * elf32-i386.c (elf_i386_link_hash_table): Add next_tls_desc_index.
- (elf_i386_link_hash_table_create): Initialize it.
- (elf_i386_compute_jump_table_size): Use it instead of
- srelplt->reloc_count.
- (allocate_dynrelocs): Likewise.
- (elf_i386_size_dynamic_sections): Likewise.
- (elf_i386_relocate_section): Likewise.
-
-2006-02-27 Jakub Jelinek <jakub@redhat.com>
-
- * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag.
- (_bfd_elf_write_section_eh_frame): Likewise.
-
-2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
-
- * po/Make-in: Add html target.
-
-2006-02-27 Richard Sandiford <richard@codesourcery.com>
-
- * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
- cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
- * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
- * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
- * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
- * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
- * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
- * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
- * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
- * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
- * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
- * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
- * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
- * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
- * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
- * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. Also use
- the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
- * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
- * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
- * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
- * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
-
-2006-02-25 Richard Sandiford <richard@codesourcery.com>
-
- * elf-bfd.h (elf_link_hash_table): Add hplt field.
- * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it.
- * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
- * elf32-frv.c (_frv_create_got_section): Likewise.
- * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
- * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
- * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
- * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
- * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt.
- (elf_i386_link_hash_table_create): Don't initialize them.
- (elf_i386_size_dynamic_sections): Use the generic ELF hplt and
- hgot fields.
- (elf_i386_finish_dynamic_symbol): Likewise.
- * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
- (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
- (ppc_elf_finish_dynamic_symbol): Likewise.
-
-2006-02-24 DJ Delorie <dj@redhat.com>
-
- * elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
- (m32c_elf_relocate_section): Don't relocate them.
- (compare_reloc): New.
- (relax_reloc): Remove.
- (m32c_offset_for_reloc): New.
- (m16c_addr_encodings): New.
- (m16c_jmpaddr_encodings): New.
- (m32c_addr_encodings): New.
- (m32c_elf_relax_section): Relax jumps and address displacements.
- (m32c_elf_relax_delete_bytes): Adjust for internal syms. Fix up
- short jumps.
-
- * reloc.c: Add m32c relax relocs.
- * libbfd.h: Regenerate.
+2007-03-18 Mark Shinwell <shinwell@codesourcery.com>
+
+ * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add "bfd *"
+ argument and extra last argument.
* bfd-in2.h: Regenerate.
-
-2006-02-24 H.J. Lu <hongjiu.lu@intel.com>
+ * elf32-arm.c (elf32_arm_obj_tdata): Add no_enum_size_warning
+ member.
+ (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and
+ extra last argument. Set no_enum_size_warning appropriately.
+ (elf32_arm_merge_eabi_attributes): Improve enum sizes
+ diagnostic, suppressing it when no_enum_size_warning dictates.
- PR ld/2218
- * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol.
- (_bfd_elf_link_hash_fixup_symbol): New.
+2007-03-20 Nick Clifton <nickc@redhat.com>
- * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
- (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
- it isn't NULL.
+ PR binutils/3535
+ * elf.c (copy_private_bfd_data): Widen the scope of Solaris
+ specific conditions that need the program headers to be
+ rewritten.
- * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
+2007-03-19 H.J. Lu <hongjiu.lu@intel.com>
- * elfxx-target.h (elf_backend_fixup_symbol): New.
- (elfNN_bed): Initialize elf_backend_fixup_symbol.
+ * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Store Magic,
+ MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
+ SizeOfInitializedData, SizeOfUninitializedData,
+ AddressOfEntryPoint, BaseOfCode and BaseOfData in internal
+ extra PE a.out header.
+ (IMAGE_NT_OPTIONAL_HDR_MAGIC): Defined as 0x10b if not defined.
+ (IMAGE_NT_OPTIONAL_HDR64_MAGIC): Defined as 0x20b if not
+ defined.
+ (IMAGE_NT_OPTIONAL_HDRROM_MAGIC): Defined as 0x107 if not
+ defined.
+ (_bfd_XX_print_private_bfd_data_common): Also print Magic,
+ MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
+ SizeOfInitializedData, SizeOfUninitializedData,
+ AddressOfEntryPoint, BaseOfCode and BaseOfData from internal
+ extra PE a.out header.
-2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
+2007-03-18 H.J. Lu <hongjiu.lu@intel.com>
- * cpu-ia64-opc.c (ins_immu5b): New.
- (ext_immu5b): Likewise.
- (elf64_ia64_operands): Add IMMU5b.
+ * targets.c (_bfd_target_vector): Add bfd_efi_app_x86_64_vec
+ only if BFD64 is defined.
-2006-02-21 Alan Modra <amodra@bigpond.net.au>
+2007-03-17 Alan Modra <amodra@bigpond.net.au>
- PR ld/2218
- * elf32-arm.c (allocate_dynrelocs): Ensure undef weak sym in pie
- is dynamic.
- * elf32-hppa.c (allocate_dynrelocs): Likewise.
- * elf32-i386.c (allocate_dynrelocs): Likewise.
- * elf32-s390.c (allocate_dynrelocs): Likewise.
- * elf32-sh.c (allocate_dynrelocs): Likewise.
- * elf64-s390.c (allocate_dynrelocs): Likewise.
- * elf64-x86-64.c (allocate_dynrelocs): Likewise.
- * elf32-m32r.c (allocate_dynrelocs): Likewise. Discard relocs
- on undef weak with non-default visibility too.
- * elfxx-sparc.c (allocate_dynrelocs): Ditto.
+ * elf32-spu.c (spu_elf_size_stubs): Always use an overlay stub
+ on setjmp calls.
-2006-02-21 Alan Modra <amodra@bigpond.net.au>
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
- * bfd.c: (_bfd_default_error_handler): Don't call abort on
- error, instead call _exit.
- (_bfd_abort): Call _exit not xexit.
+ * doc/Makefile.in: Regenerated.
-2006-02-17 Kevin Buettner <kevinb@redhat.com>
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
- * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
- New functions.
- * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
+ * Makefile.am (bfdver.h): Substitute report_bugs_to. Also
+ create doc/bfdver.texi.
+ * Makefile.in: Regenerated.
-2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
- Anil Paranjape <anilp1@kpitcummins.com>
- Shilin Shakti <shilins@kpitcummins.com>
+ * configure.in (--with-bugurl): New option.
+ * configure: Regenerated.
- * Makefile.am: Add xc16x related entry
- * Makefile.in: Regenerate
- * archures.c: Add bfd_xc16x_arch
- * bfd-in2.h: Regenerate
- * config.bfd: Add xc16x-*-elf
- * configure.in: Add bfd_elf32_xc16x_vec
+ * version.h (REPORT_BUGS_TO): New.
+
+2007-03-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3826
+ * elf-bfd.h (elf_backend_data): Add elf_osabi.
+ (_bfd_elf_set_osabi): New.
+
+ * elf.c (_bfd_elf_set_osabi): New.
+
+ * elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
+ (elf_backend_post_process_headers): Defined with
+ _bfd_elf_set_osabi.
+ (ELF_OSABI): Properly defined for each target.
+
+ * elf32-i370.c (i370_elf_post_process_headers): Removed.
+ (ELF_OSABI): Defined.
+ (elf_backend_post_process_headers): Defined with
+ _bfd_elf_set_osabi.
+
+ * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
+ freebsd.
+ (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
+
+ * elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
+ (ELF_OSABI): Defined.
+ (elf_backend_post_process_headers): Defined with
+ _bfd_elf_set_osabi.
+
+ * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
+ freebsd.
+ (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
+ elf_osabi.
+
+ * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
+ with elf_osabi.
+ (ELF_OSABI): Properly defined for each target.
+ (elf_backend_post_process_headers): Defined with
+ _bfd_elf_set_osabi for Linux.
+
+ * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
+ (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
+ (elf_backend_post_process_headers): Defined with
+ _bfd_elf_set_osabi.
+
+ * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
+ (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
+ (elf_backend_post_process_headers): Defined with
+ _bfd_elf_set_osabi.
+
+ * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
+ with any ELF target of the compatible machine for which we do not
+ have a specific backend.
+
+ * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
+ with elf_osabi.
+
+ * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
+ (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
+
+2007-03-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out
+ V850_OTHER_* bits.
+
+2007-03-08 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (BFD64_BACKENDS): Add efi-app-x86_64.lo.
+ (BFD64_BACKENDS_CFILES): Add efi-app-x86_64.c.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2007-03-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec.
+ (x86_64-*-kfreebsd*-gnu): Likewise.
+ (x86_64-*-netbsd*): Likewise.
+ (x86_64-*-openbsd*): Likewise.
+ (x86_64-*-linux-*): Likewise.
+
+ * configure.in: Support bfd_efi_app_x86_64_vec.
+ * configure: Regenerated.
+
+ * efi-app-x86_64.c: New file.
+
+ * targets.c (bfd_efi_app_x86_64_vec): New.
+ (_bfd_target_vector): Add bfd_efi_app_x86_64_vec.
+
+2007-03-07 Kai Tietz <kai.tietz@onevision.com>
+
+ * reloc.c (bfd_generic_get_relocated_section_contents): Remove
+ const for type reloc_howto_type.
+
+2007-03-07 Alan Modra <amodra@bigpond.net.au>
+
+ PR 3958
+ * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link.
+ (elf_discarded_section): Move..
+ * bfd-in.h: ..to here.
+ * bfd-in2.h: Regenerate.
+ * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols
+ from discarded sections before relocate_section has done its job.
+ * reloc.c (bfd_generic_get_relocated_section_contents): Handle
+ relocs against symbols from discarded sections.
+ * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on
+ SECREL32.
+ (elf_hppa_relocate_section): Handle relocatable link after setting
+ sec, sym, h etc. for final link. Squash error messages for
+ relocatable link. Clear section contents for relocs against
+ symbols in discarded sections, and zero reloc. Remove existing
+ zero r_symndx code.
+ * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
+ * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+ * elf32-arm.c (elf32_arm_relocate_section): Likewise.
+ * elf32-avr.c (elf32_avr_relocate_section): Likewise.
+ * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
+ (bfin_relocate_section): Likewise.
+ * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-crx.c (elf32_crx_relocate_section): Likewise.
+ * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+ * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
+ * elf32-frv.c (elf32_frv_relocate_section): 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-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-i860.c (elf32_i860_relocate_section): Likewise.
+ * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
+ * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
+ * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-mep.c (mep_elf_relocate_section): Likewise.
+ * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
+ * elf32-mt.c (mt_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-score.c (_bfd_score_elf_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-spu.c (spu_elf_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_relocate_section): Likewise.
+ * elf32-vax.c (elf_vax_relocate_section): Likewise.
+ * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
+ (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-sh64.c (sh_elf64_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
+
+ * elf32-arm.c (elf32_arm_relocate_section): Always adjust section
+ symbols for relocatable link. Don't use always-zero st_value.
+ (elf_backend_rela_normal): Don't define.
+ * elf32-bfin.c (bfinfdpic_relocate_section): Use
+ RELOC_FOR_GLOBAL_SYMBOL.
+ * elf32-frv.c (elf32_frv_relocate_section): Likewise.
+ * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE
+ section symbol adjustments with same for relocatable link.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move..
+ (elf32_m68hc11_check_relocs): ..to here.
+ * elf32-score.c (score_elf_final_link_relocate): Remove zero
+ r_symndx code.
+ * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
+
+2007-03-07 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4144
+ * elf.c (assign_file_positions_for_load_sections): Don't
+ adjust p_memsz for !SEC_LOAD section vma modulo page size.
+ Instead, use the same lma based adjustment for SEC_LOAD
+ sections.
+
+2007-03-01 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
+ (find_relaxable_sections): Do not increment src_count for unknown
+ opcodes. Decode only once instead of calling is_l32r_relocation.
+ (compute_text_actions): Remove unused no_insn_move flag. Assert that
+ src_next matches src_count in relax_info.
+
+2007-03-01 Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile.am (bfdver.h): Use "." not " " between version number
+ and date.
+ * Makefile.in: Regenerate.
+ * configure.in (PKGVERSION): Default to "(GNU Binutils) ".
* configure: Regenerate.
- * targets.c: Added xc16x related information
- * cpu-xc16x.c: New file
- * reloc.c: Add new relocations specific to xc16x:
- BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
- BFD_RELOC_XC16X_SOF
- * elf32-xc16x.c: New file.
-
-2006-02-17 Alan Modra <amodra@bigpond.net.au>
-
- * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
- * elf64-ppc.c (allocate_dynrelocs): Likewise.
-
-2006-02-17 Alan Modra <amodra@bigpond.net.au>
- PR ld/2218
- * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is
- dynamic.
- (ppc64_elf_relocate_section): Check output reloc section size.
- * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
+2007-02-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
+
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
+ * elf32-spu.c (ovl_mgr_pread): Add const to casts.
+
+2007-02-23 Carlos O'Donell <carlos@codesourcery.com>
+
+ * dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
+ DWARF even with 64-bit addresses.
+ (_bfd_dwarf2_find_nearest_line): Likewise.
+
+2007-02-23 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/3535
+ * elf.c (copy_private_bfd_data): Always rewrite the program
+ headers when a Solaris interpreter segment is involved.
+
+2007-02-22 Paul Brook <paul@codesourcery.com>
+
+ * elflink.c (gc_mark_hook_fn): Remove.
+ (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn.
+ (bfd_elf_gc_sections): Ditto. Call gc_mark_extra_sections.
+ * elf-bfd.h (elf_gc_mark_hook_fn): Define.
+ (elf_backend_data): Add gc_mark_extra_sections.
+ * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default
+ definition.
+ (elfNN_bed): Add elf_backend_gc_mark_extra_sections.
+ * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function.
+ (elf_backend_gc_mark_extra_sections): Define.
+
+2007-02-21 Nick Clifton <nickc@redhat.com>
+
+ * elf.c (_bfd_elf_map_sections_to_segments): If the
+ override_segment_assignment callback is defined then call it.
+
+2007-02-21 Alan Modra <amodra@bigpond.net.au>
-2006-02-16 H.J. Lu <hongjiu.lu@intel.com>
+ * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args.
- PR ld/2322
- * elf.c (get_segment_type): New function.
- (_bfd_elf_print_private_bfd_data): Use it.
- (print_segment_map): New function.
- (assign_file_positions_for_segments): Call print_segment_map
- when there are not enough room for program headers.
+2007-02-19 Thiemo Seufer <ths@mips.com>
-2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
+ * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Remove
+ translation marker from untranslatable strings.
- * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
- traditional MIPS ELF targets.
-
-2006-02-15 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/2338
- * dwarf2.c (check_function_name): New function.
- (_bfd_dwarf2_find_nearest_line): Use check_function_name to
- check if function is correct.
-
-2006-02-16 Alan Modra <amodra@bigpond.net.au>
-
- * elflink.c (_bfd_elf_default_action_discarded): Return 0 for
- debug sections.
- (elf_link_input_bfd): Adjust comments.
-
-2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
-
- * elf.c (copy_private_bfd_data): Minor update.
-
-2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/2258
- * elf.c (copy_private_bfd_data): Renamed to ...
- (rewrite_elf_program_header): This.
- (copy_elf_program_header): New function.
- (copy_private_bfd_data): Likewise.
-
-2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
-
- * archures.c (bfd_mach_mcf5200, bfd_mach_mcf5206e,
- bfd_mach_mcf5307, bfd_mach_mcf5407, bfd_mach_mcf528x,
- bfd_mach_mcfv4e, bfd_mach_mcf521x, bfd_mach_mcf5249,
- bfd_mach_mcf547x, bfd_mach_mcf548x): Remove.
- (bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_div,
- bfd_mach_mcf_isa_a_div_mac, bfd_mach_mcf_isa_a_div_emac,
- bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
- bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_aplus_usp,
- bfd_mach_mcf_isa_aplus_usp_mac, bfd_mach_mcf_isa_aplus_usp_emac,
- bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac,
- bfd_mach_mcf_isa_b_usp_float, bfd_mach_mcf_isa_b_usp_float_mac,
- bfd_mach_mcf_isa_b_usp_float_emac): New.
- (bfd_default_scan): Update coldfire mapping.
- * bfd-in.h (bfd_m68k_mach_to_features,
- bfd_m68k_features_to_mach): Declare.
- * bfd-in2.h: Rebuilt.
- * cpu-m68k.c (arch_info_struct): Add new coldfire machines,
- adjust legacy names.
- (m68k_arch_features): New.
- (bfd_m68k_mach_to_features,
- bfd_m68k_features_to_mach): Define.
- * elf32-m68k.c (elf32_m68k_object_p): New.
- (elf32_m68k_merge_private_bfd_data): Merge the CF EF flags.
- (elf32_m68k_print_private_bfd_data): Print the CF EF flags.
- (elf_backend_object_p): Define.
- * ieee.c (ieee_write_processor): Update coldfire machines.
- * libbfd.h: Rebuilt.
-
-2006-02-06 Steve Ellcey <sje@cup.hp.com>
-
- * elfxx-ia64.c (elfNN_ia64_fake_sections): Set SHF_IA_64_HP_TLS
- if SHF_TLS is set.
-
-2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
-
- * coff-z80.c (r_imm24): New howto.
- (rtype2howto): New case R_IMM24.
- (coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
- (extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
-
-2006-02-04 Richard Sandiford <richard@codesourcery.com>
-
- * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
- has already been assigned a GOT index, copy that index to the
- current hash table entry.
-
-2006-02-01 Eric Botcazou <ebotcazou@libertysurf.fr>
-
- * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
- for call-to-undefweak reloc overflow.
-
-2006-01-31 Eric Botcazou <ebotcazou@libertysurf.fr>
-
- * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
- for 32-bit relocs overflow.
-
-2006-01-27 Paul Brook <paul@codesourcery.com>
-
- * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
- objects.
-
-2006-01-18 Alexandre Oliva <aoliva@redhat.com>
-
- Introduce TLS descriptors for i386 and x86_64.
- * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
- BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
- BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
- * libbfd.h, bfd-in2.h: Rebuilt.
- * elf32-i386.c (elf_howto_table): New relocations.
- (R_386_tls): Adjust.
- (elf_i386_reloc_type_lookup): Map new relocations.
- (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
- (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
- (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
- (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
- (elf_i386_local_tlsdesc_gotent): New macro.
- (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
- (elf_i386_compute_jump_table_size): New macro.
- (link_hash_newfunc): Initialize tlsdesc_got.
- (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
- (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
- R_386_TLS_DESC_CALL.
- (elf_i386_check_relocs): Likewise. Allocate space for
- local_tlsdesc_gotent.
- (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
- R_386_TLS_DESC_CALL.
- (allocate_dynrelocs): Count function PLT relocations. Reserve
- space for TLS descriptors and relocations.
- (elf_i386_size_dynamic_sections): Reserve space for TLS
- descriptors and relocations. Set up sgotplt_jump_table_size.
- Don't zero reloc_count in srelplt.
- (elf_i386_always_size_sections): New. Set up _TLS_MODULE_BASE_.
- (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
- R_386_TLS_DESC_CALL.
- (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
- (elf_backend_always_size_sections): Define.
- * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
- R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
- (R_X86_64_standard): Adjust.
- (x86_64_reloc_map): Map new relocs.
- (elf64_x86_64_rtype_to_howto): New, split out of...
- (elf64_x86_64_info_to_howto): ... this function, and...
- (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
- (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
- (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
- (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
- (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
- (elf64_x86_64_local_tlsdesc_gotent): New macro.
- (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
- tlsdesc_got and sgotplt_jump_table_size fields.
- (elf64_x86_64_compute_jump_table_size): New macro.
- (link_hash_newfunc): Initialize tlsdesc_got.
- (elf64_x86_64_link_hash_table_create): Initialize new fields.
- (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
- R_X86_64_TLSDESC_CALL.
- (elf64_x86_64_check_relocs): Likewise. Allocate space for
- local_tlsdesc_gotent.
- (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
- R_X86_64_TLSDESC_CALL.
- (allocate_dynrelocs): Count function PLT relocations. Reserve
- space for TLS descriptors and relocations.
- (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
- descriptors and relocations. Set up sgotplt_jump_table_size,
- tlsdesc_plt and tlsdesc_got. Make room for them. Don't zero
- reloc_count in srelplt. Add dynamic entries for DT_TLSDESC_PLT
- and DT_TLSDESC_GOT.
- (elf64_x86_64_always_size_sections): New. Set up
- _TLS_MODULE_BASE_.
- (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
- R_386_TLS_DESC_CALL.
- (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
- (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
- DT_TLSDESC_GOT. Set up TLS descriptor lazy resolver PLT entry.
- (elf_backend_always_size_sections): Define.
-
-2006-01-17 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/2096
- * dwarf2.c (comp_unit_contains_address): Update comment.
- (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
- lma. Return TRUE only if both comp_unit_contains_address and
- comp_unit_find_nearest_line return TRUE.
- (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
-
-2006-01-18 Alan Modra <amodra@bigpond.net.au>
-
- * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
- (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
- * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
- elf_gc_mark_dynamic_ref_symbol. Make global.
- (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
- * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
+2007-02-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_backend_data): Add default_execstack.
+ * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
+ * elfxx-target.h (elf_backend_default_execstack): Define to 1.
(elfNN_bed): Init new field.
- * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
- (ppc64_elf_gc_mark_dynamic_ref): New function.
+ * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
+
+2007-02-17 Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in (--with-pkgversion): New option.
+ * configure: Regenerate.
+ * Makefile.am (bfdver.h): Substitute for @bfd_version_package@.
+ * Makefile.in: Regenerate.
+ * version.h (BFD_VERSION_STRING): Define using
+ @bfd_version_package@.
+
+2007-02-16 Carlos O'Donell <carlos@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
+ Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
+ and EF_MIPS_UCODE.
+
+2007-02-15 Alan Modra <amodra@bigpond.net.au>
+
+ * libbfd-in.h (_bfd_norelocs_get_reloc_upper_bound): Don't define,
+ declare.
+ (_bfd_norelocs_canonicalize_reloc): Likewise.
+ * libbfd.h: Regenerate.
+ * libbfd.c (_bfd_norelocs_get_reloc_upper_bound): New function.
+ (_bfd_norelocs_canonicalize_reloc): Likewise.
+ * binary.c (binary_bfd_reloc_type_lookup): Don't define.
+ (binary_get_reloc_upper_bound, binary_canonicalize_reloc): Likewise.
+ (binary_vec): Use _bfd_norelocs in BFD_JUMP_TABLE_RELOCS.
+ * ihex.c: Similarly.
+ * mach-o-target.c: Similarly.
+ * mach-o.c: Similarly.
+ * mmo.c: Similarly.
+ * pef.c: Similarly.
+ * ppcboot.c: Similarly.
+ * srec.c: Similarly.
+ * xsym.c: Similarly.
+
+2007-02-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3953
+ * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
+ when adding default symbol.
+
+2007-02-13 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
+ for branch lookup table.
+
+2007-02-12 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (create_linkage_sections): Don't create
+ .rela.rodata.brlt for --emit-relocs.
+ (ppc_build_one_stub): Create relocs for brlt --emit-relocs here.
+ (ppc_size_one_stub): Count them. Simplify test of stub type
+ when counting stub relocs. Set SEC_RELOC too.
+ (ppc64_elf_size_stubs): Clear reloc_count and SEC_RELOC.
+ (ppc64_elf_finish_dynamic_sections): Output brlt relocs.
+
+2007-02-12 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (evaluate_complex_relocation_symbols): Ignore relocs
+ with a zero symbol index.
+
+2007-02-12 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (bfd_elf_discard_info): Tidy setting of "eh".
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+ Stan Cox <scox@redhat.com>
+
+ PR ld/3972
+ * elflink.c (elf_link_input_bfd): Always setup finfo->internal_syms.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
+ Stan Cox <scox@redhat.com>
+ Nick Clifton <nickc@redhat.com>
+ DJ Delorie <dj@redhat.com>
+ Frank Ch. Eigler <fche@redhat.com>
+ Ben Elliston <bje@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-mep.lo.
+ (ALL_MACHINES_CFILES): Add CPU_MEP.c.
+ (BFD32_BACKENDS): Add elf32-mep.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-mep.c.
+ (cpu-mep.lo,elf32-mep.lo): New targets.
+ * archures.c (bfd_arch_mep): New enumerator.
+ (bfd_mach_mep, bfd_mach_mep_h1): New macros.
+ (bfd_mep_arch): New external variable.
+ (bfd_archures_list): Add bfd_mep_arch.
+ * config.bfd: Support mep-*-elf.
+ * configure.in: Support bfd_elf32_mep_vec and bfd_elf32_mep_little_vec.
+ * reloc.c (BFD_RELOC_MEP_*): New relocation numbers.
+ * targets.c (bfd_elf32_mep_vec,bfd_elf32_mep_little_vec): New extern
+ declarations.
+ (_bfd_target_vector): Add bfd_elf32_mep_vec and
+ bfd_elf32_mep_little_vec.
+ * mep-relocs.pl: New file.
+ * cpu-mep.c: New file.
+ * elf32-mep.c: New file.
+ * bfd-in2.h: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * libbfd.h: Regenerate.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
-2006-01-17 Alan Modra <amodra@bigpond.net.au>
+2007-02-05 Dave Brolley <brolley@redhat.com>
+
+ * elflink.c (evaluate_complex_relocation_symbols): Check for
+ STT_SRELC for global symbols.
+ (perform_complex_relocations): Renamed to
+ perform_complex_relocation and now examines only one relocation.
+ (elf_link_input_bfd): Don't call perform_complex_relocations.
+ * elf-bfd.h (bfd_elf_perform_complex_relocation_: New prototype.
+ * elf32-mep.c (mep_elf_howto_table): Add R_RELC.
+ (OD,OS,OU): #undefs corrected to N, S and U repectively.
+ (mep_reloc_type_lookup): Handle BFD_RELOC_RELC.
+ (complex_reloc_installation_howto): Removed.
+ (mep_info_to_howto_rela): Remove special case for r_type==0xff.
+ (mep_elf_relocate_section): Call bfd_elf_perform_complex_relocation.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
+ DJ Delorie <dj@redhat.com>
+ Graydon Hoare <graydon@redhat.com>
+ Nick Clifton <nickc@cambridge.redhat.com>
+ Jeff Holcomb <jeffh@redhat.com>
+ Frank Ch. Eigler <fche@redhat.com>
+
+ * elf-bfd.h (bfd_elf_perform_complex_relocations): New prototype.
+ * elf.c (swap_out_syms): Handle BSF_RELC and BSF_SRELC.
+ * elfcode.h (elf_slurp_symbol_table): Handle STT_RELC and STT_SRELC.
+ * elflink.c (set_symbolValue): New static function.
+ (resolve_symbol): Likewise.
+ (resolve_section): Likewise.
+ (undefined_reference): Likewise.
+ (eval_symbol): Likewise.
+ (evaluate_complex_relocation_symbols): Likewise.
+ (put_value): Likewise.
+ (get_value): Likewise.
+ (decode_complex_addend):
+ (bfd_elf_perform_complex_relocation): New function.
+ (elf_link_input_bfd): Call evaluate_complex_relocation_symbols.
+ * reloc.c (BFD_RELOC_RELC): New relocation number.
+ * syms.c (BSF_RELC,BSF_SRELC): New macros.
+
+2007-02-05 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_make_sym_local): Delete.
+ (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Delete.
+ (elf_xtensa_fix_refcounts, elf_xtensa_allocate_plt_size)
+ (elf_xtensa_allocate_got_size): Replace these with...
+ (elf_xtensa_allocate_dynrelocs): ...this new function.
+ (elf_xtensa_size_dynamic_sections): Use it.
+
+2007-02-05 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
+ <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
+ Set src_mask to zero.
+ <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise. Also fix dst_mask.
+ <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
+
+2007-02-02 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
+ (elf_xtensa_dynamic_symbol_p): ...this.
+
+2007-02-02 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (plt_reloc_count): Move into link hash table.
+ (struct elf_xtensa_link_hash_table): New.
+ (elf_xtensa_hash_table): New.
+ (elf_xtensa_link_hash_table_create): New.
+ (elf_xtensa_check_relocs): Update plt_reloc_count references.
+ Update arguments to add_extra_plt_sections.
+ (elf_xtensa_create_dynamic_sections): Record new sections in the hash
+ table. Update for plt_reloc_count and add_extra_plt_sections.
+ (add_extra_plt_sections, elf_xtensa_create_plt_entry): Replace dynobj
+ argument with link info. Update calls to elf_xtensa_get_plt_section
+ and elf_xtensa_get_gotplt_section.
+ (elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections)
+ (elf_xtensa_relocate_section, elf_xtensa_finish_dynamic_sections)
+ (elf_xtensa_discard_info_for_section, shrink_dynamic_reloc_sections)
+ (relax_property_section): Get sections from the hash table and update
+ function calls.
+ (elf_xtensa_get_plt_section, elf_xtensa_get_gotplt_section): Replace
+ dynobj argument with link info. Get sections for first plt chunk from
+ the hash table.
+ (bfd_elf32_bfd_link_hash_table_create): Define.
+
+2007-02-02 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
+ * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
+ (struct elf_symbol): Change first member into union.
+ (elf_sort_elf_symbol): Compare pointers to internal syms rather than
+ internal syms. Only compare st_shndx fields.
+ (elf_create_symbuf): New function.
+ (bfd_elf_match_symbols_in_sections): Use it. If symbufs are available
+ for bfds, use a binary search, otherwise don't qsort symbols
+ unnecessarily only to select which symbols are for the particular
+ shndx.
+
+2007-02-01 Nick Clifton <nickc@redhat.com>
+
+ PR ld/3852
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
+ in the elf_link_hash_table structure.
+
+2007-02-01 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
+ * elfxx-target.h (elf_backend_write_core_note): Define and use.
+ * elf.c (elfcore_write_prpsinfo): Call the above. Add support for
+ 32-bit core note on 64-bit target.
+ (elfcore_write_prstatus): Likewise.
+ (elfcore_write_lwpstatus): Make note_name const.
+ (elfcore_write_prfpreg): Likewise.
+ (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
+ target.
+ * elf32-ppc.c (ppc_elf_write_core_note): New function.
+ (elf_backend_write_core_note): Define.
+ * elf64-ppc.c (ppc64_elf_write_core_note): New function.
+ (elf_backend_write_core_note): Define.
+
+2007-01-31 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-cris.c (INCLUDED_TARGET_FILE): Removed.
+ (elf32_bed): Defined for elf32-us-cris.
+
+ * elf64-sh64.c (elf64_bed): Defined for Linux.
+ (INCLUDED_TARGET_FILE): Removed.
+
+ * elfxx-target.h (elfNN_bed): Always define. Don't check
+ INCLUDED_TARGET_FILE.
+
+2007-01-31 DJ Delorie <dj@redhat.com>
+
+ * elf-m10300.c (mn10300_elf_relocate_section): Clarify the warning
+ message for dangerous relocs, special case the common user error.
+
+2007-01-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (copy_elf_program_header): Start from the first section
+ in a segment and stop when all sections in a segment are
+ accounted for.
+
+2007-01-29 Julian Brown <julian@codesourcery.com>
- * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
+ * bfd-in2.h: Regenerate.
+ * bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11
+ instruction scanning should be done.
+ (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan)
+ (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes.
+ (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to
+ prototype.
+ * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info
+ argument.
+ * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME)
+ (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros.
+ (elf32_vfp11_erratum_type): New enum.
+ (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to
+ veneers.
+ (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist.
+ (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size,
+ vfp11_fix and num_vfp11_fixes fields.
+ (elf32_arm_link_hash_table_create): Initialise vfp11_fix,
+ vfp11_erratum_glue_size, num_vfp11_fixes fields.
+ (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer.
+ (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
+ glue section.
+ (elf32_arm_section_map_add): Add an code/data mapping symbol entry
+ to a section's map.
+ (record_vfp11_erratum_veneer): Create a single veneer, and its
+ associated symbols.
+ (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue.
+ (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input
+ BFDs.
+ (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround
+ required.
+ (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes.
+ (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn.
+ (bfd_arm_vfp11_write_mask): Update write mask according to coded
+ register number.
+ (bfd_arm_vfp11_antidependency): New function.
+ (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn.
+ (elf32_arm_compare_mapping): Declare.
+ (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input
+ BFD for potential erratum-triggering insns. Record results.
+ (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers
+ and branches to veneers have been placed in virtual memory after
+ layout.
+ (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global
+ hash table.
+ (elf32_arm_output_symbol_hook): Remove.
+ (elf32_arm_write_section): Output veneers, and branches to veneers.
+ Use maps from input sections, not output sections, for code
+ byte-swapping.
+ * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument.
+ * elf32-score.c (_bfd_score_elf_write_section): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise.
+ * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
+
+2007-01-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-hppa.c (elf64_bed): Defined for HPUX and Linux.
+ (INCLUDED_TARGET_FILE): Removed.
+
+2007-01-27 Mike Frysinger <vapier@gentoo.org>
+
+ * elf32-hppa.c (elf32_bed): Define for hpux, linux and netbsd.
+ (INCLUDED_TARGET_FILE): Remove.
+
+2007-01-25 DJ Delorie <dj@redhat.com>
+
+ * elf32-m32c.c (m32c_elf_howto_table): Don't complain about
+ R_M32C_16 or R_M32C_24 relocs.
+
+2007-01-25 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/3874
+ * elf32-avr.c (avr_link_hash_table): Check to make sure that the
+ hash table was created by elf32_avr_link_hash_table_create before
+ using it.
+ (elf32_avr_link_hash_newfunc): New function. Just pass the call
+ through to _bfd_elf_link_hash_newfunc.
+ (elf32_avr_link_hash_table_create): Use
+ elf32_avr_link_hash_newfunc instead of
+ _bfd_elf_link_hash_newfunc.
+ (elf32_avr_relocate_section): Check for the hash table pointer
+ being NULL.
+ (elf32_avr_relax_section, avr_build_one_stub,
+ elf32_avr_setup_params, get_local_syms, elf32_avr_size_stubs,
+ elf32_avr_build_stubs): Likewise.
+
+2007-01-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3831
+ * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
+ argument, Elf_Internal_Sym *.
+
+ * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
+ symbol dynamic if info->dynamic_data is TRUE.
+ (bfd_elf_record_link_assignment): Updated call to
+ bfd_elf_record_link_assignment.
+ (_bfd_elf_merge_symbol): Likewise. Always call
+ bfd_elf_link_mark_dynamic_symbol.
+
+2007-01-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (BFD_LIBS): Removed.
+ * Makefile.in: Regenerated.
+
+2007-01-11 H.J. Lu <hongjiu.lu@intel.com>
-2006-01-17 Nick Clifton <nickc@redhat.com>
+ PR binutils/3631
+ * Makefile.am (OFILES): Add @bfd64_libs@.
+ (libbfd_la_SOURCES): Remove $(BFD64_LIBS_CFILES).
+ * Makefile.in: Regenerated.
- PR binutils/2159
- * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
- parameters.
+ * configure.in (bfd_libs): Replaced by ...
+ (bfd64_libs): This.
+ * configure: Regenerated.
+
+2007-01-11 Nathan Sidwell <nathan@codesourcery.com>
+
+ * elf.c (assign_file_positions_for_load_sections): We can
+ require fewer phdrs than expected.
+
+2007-01-08 Kazu Hirata <kazu@codesourcery.com>
+
+ * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
+ * bfd-in2.h: Regenerate.
+ * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
+ bfd_mach_cpu32_fido.
+ (m68k_arch_features): Use fido_a instead of cpu32.
+ (bfd_m68k_compatible): Reject the combination of Fido and
+ ColdFire. Accept the combination of CPU32 and Fido with a
+ warning.
+ * elf32-m68k.c (elf32_m68k_object_p,
+ elf32_m68k_merge_private_bfd_data,
+ elf32_m68k_print_private_bfd_data): Treat Fido as an
+ architecture by itself.
-2006-01-11 Nick Clifton <nickc@redhat.com>
+2007-01-08 Kai Tietz <kai.tietz@onevision.com>
- * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
- into the newly (re)allocated map array.
+ * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
-2006-01-09 Alexis Wilke <alexis_wilke@yahoo.com>
+2007-01-05 Jakub Jelinek <jakub@redhat.com>
- * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
+ * texhex.c (first_phase): Don't fall through into the default
+ case.
+ (pass_over): Replace abort () calls with return FALSE. Fix
+ buffer overflow.
-2006-01-01 Jakub Jelinek <jakub@redhat.com>
+2007-01-04 Jie Zhang <jie.zhang@analog.com>
- * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
- for .toc1 section.
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
+ SEC_EXCLUDE on zero size .eh_frame.
-For older changes see ChangeLog-2005
+For older changes see ChangeLog-2006
Local Variables:
mode: change-log
diff --git a/contrib/binutils/bfd/ChangeLog-0203 b/contrib/binutils/bfd/ChangeLog-0203
index f99029a..1b1abb1 100644
--- a/contrib/binutils/bfd/ChangeLog-0203
+++ b/contrib/binutils/bfd/ChangeLog-0203
@@ -858,7 +858,7 @@
Bernardo Innocenti <bernie@develer.com>
* archures.c: Add MCF528x (MCFv4) support.
- * bfd/cpu-m68k.c (arch_info_struct): Likewise.
+ * cpu-m68k.c (arch_info_struct): Likewise.
* bfd-in2.h: Regenerate.
2003-10-20 Andrew Cagney <cagney@redhat.com>
@@ -1953,10 +1953,10 @@
2003-07-12 Jeff Baker <jbaker@qnx.com>
- * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
- * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
- * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
- * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
+ * config.bfd (__QNXTARGET__): Define for Neutrino architectures.
+ * elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
+ * elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
+ * elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
@@ -2196,13 +2196,13 @@
2003-07-09 Richard Sandiford <rsandifo@redhat.com>
- * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
+ * elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
forced-local symbols like other locals. Don't create relocations
against STN_UNDEF in irix objects.
2003-07-09 Richard Sandiford <rsandifo@redhat.com>
- * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
+ * elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
compatible objects, add the values of defined external symbols
to the addend.
diff --git a/contrib/binutils/bfd/ChangeLog-2006 b/contrib/binutils/bfd/ChangeLog-2006
new file mode 100644
index 0000000..82216d6
--- /dev/null
+++ b/contrib/binutils/bfd/ChangeLog-2006
@@ -0,0 +1,3601 @@
+2006-12-31 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfd.c (bfd_record_phdr): Call bfd_zalloc instead of bfd_alloc
+ to allocate elf_segment_map.
+
+2006-12-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elflink.c (elf_link_add_object_symbols): Remember the symbol
+ size only if it is defined.
+
+2006-12-25 Kazu Hirata <kazu@codesourcery.com>
+
+ * archures.c (bfd_mach_cpu32_fido): New.
+ (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_a,
+ bfd_mach_mcf_isa_a_mac, bfd_mach_mcf_isa_a_emac,
+ bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
+ bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_b_nousp,
+ bfd_mach_mcf_isa_b_nousp_mac, bfd_mach_mcf_isa_b_nousp_emac,
+ bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac,
+ bfd_mach_mcf_isa_b_emac, bfd_mach_mcf_isa_b_float,
+ bfd_mach_mcf_isa_b_float_mac, bfd_mach_mcf_isa_b_float_emac):
+ Increment the defined values.
+ * bfd-in2.h: Regenerate.
+ * cpu-m68k.c (arch_info_struct): Add en entry for
+ bfd_mach_cpu32_fido.
+ * elf32-m68k.c (elf32_m68k_object_p): Handle
+ EF_M68K_CPU32_FIDO_A.
+ (elf32_m68k_merge_private_bfd_data): Use EF_M68K_CPU32_MASK.
+ (elf32_m68k_print_private_bfd_data): Handle
+ EF_M68K_CPU32_FIDO_A.
+
+2006-12-25 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * elf32-score.c (score_elf_got_lo16_reloc): Change some variables
+ type from unsigned to signed.
+ (score_elf_final_link_relocate): Fix bugs of handling relocation
+ type R_SCORE_GOT15, R_SCORE_GOT_LO16, and R_SCORE_REL32.
+ (_bfd_score_elf_relocate_section): Handle R_SCORE_GOT_LO16
+ specially.
+
+2006-12-23 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-bfd.h (struct elf_backend_data): Add as_needed_cleanup hook.
+ * elfxx-target.h (elf_backend_as_needed_cleanup): Define.
+ (elfNN_bed): Add as_needed_cleanup hook.
+ * elflink.c (elf_link_add_object_symbols): Call it when reverting
+ hash table changes for unneeded --as-needed input.
+ * elf64-ppc64.c (elf_backend_as_needed_cleanup): Define.
+ (ppc64_elf_as_needed_cleanup): New function.
+
+2006-12-19 Kazu Hirata <kazu@codesourcery.com>
+
+ * elf32-m68k.c (elf32_m68k_object_p,
+ elf32_m68k_print_private_bfd_data): Use EF_M68K_ARCH_MASK to
+ extract architecture mask.
+
+2006-12-19 Nathan Sidwell <nathan@codesourcery.com>
+
+ * elf.c (assign_file_positions_for_load_sections): Adjust p_vaddr
+ by p_vaddr_offset. Copy alignment & use if it is valid.
+ (rewrite_elf_program_headers): Cope with leading padding in a
+ segment that does not contain file or program headers.
+ (copy_elf_program_header): Likewise.
+
+2006-12-15 Mark Kettenis <kettenis@gnu.org>
+
+ * config.bfd: (sh*-*-openbsd*): Add target.
+ * configure.in (sh*-*-openbsd*): Set COREFILE to netbsd-core.lo.
+ * configure: Regenerate.
+
+2006-12-15 Alan Modra <amodra@bigpond.net.au>
+
+ * opncls.c (bfd_openr_iovec): Add "stat" parameter.
+ (struct opncls): Add "stat" field.
+ (opncls_bstat): Call vec->stat.
+ * bfd-in2.h: Regenerate.
+ * elf32-spu.c (spu_elf_open_builtin_lib): Adjust.
+
+2006-12-14 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct bfd_elf_section_data): Clarify sec_group
+ and next_in_group usage.
+
+2006-12-14 Alan Modra <amodra@bigpond.net.au>
+
+ PR 3704
+ * bfdio.c (bfd_bread): Don't read past end of archive elements.
+
+2006-12-12 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * doc/Makefile.am (bfd_TEXINFOS): Set.
+ (bfd.info bfd.dvi bfd.html): Delete rule.
+ * doc/Makefile.in: Regenerated.
+
+2006-12-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Define GENINSRC_NEVER.
+ * doc/Makefile.am (bfd.info): Remove srcdir prefix.
+ (MAINTAINERCLEANFILES): Add info file.
+ (DISTCLEANFILES): Pretend to add info file.
+ * po/Make-in (.po.gmo): Put gmo files in objdir.
+ * configure, Makefile.in, doc/Makefile.in: Regenerated.
+
+2006-12-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * elflink.c (bfd_elf_gc_sections): Also search for corresponding
+ sections with .gnu.linkonce.t. prefix.
+
+2006-12-07 Kazu Hirata <kazu@codesourcery.com>
+
+ * elf32-m68k.c: Update uses of EF_M68K_*.
+
+2006-12-07 H.J. Lu <hjl@gnu.org>
+
+ PR ld/3666
+ * elflink.c (elf_link_add_object_symbols): Keep symbol
+ visibility for symbols from discarded section.
+
+2006-12-06 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-alpha.c (elf64_alpha_merge_symbol_attribute): New function.
+ (elf_backend_merge_symbol_attribute): Define.
+
+2006-12-04 Jan Beulich <jbeulich@novell.com>
+
+ * elflink.c (_bfd_elf_link_create_dynamic_sections): Don't create
+ .eh_frame_hdr section from here anymore.
+ (bfd_elf_size_dynamic_sections): Call _bfd_elf_maybe_strip_eh_frame_hdr
+ a little earlier.
+
+2006-12-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3609
+ * elf.c (rewrite_elf_program_header): Preserve segment physical
+ address in the output segment if the first section in the
+ corresponding input segment is null.
+
+2006-12-01 Nick Clifton <nickc@redhat.com>
+
+ PR 3609
+ * elf.c (rewrite_elf_program_header): Do not use the first_section
+ pointer if it is null.
+
+2006-11-29 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_to_thumb_export_stub): Assert that output
+ section is present.
+ (allocate_dynrelocs): Only add export stub for symbols defined in
+ this object.
+
+2006-11-29 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_to_thumb_export_stub): Assert that output
+ section is present.
+ (allocate_dynrelocs): Only add export stub for symbols defined in
+ this object.
+
+2006-11-29 Paul Brook <paul@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
+
+ * elf32-arm.c (copy_eabi_attributes): Correct starting offset.
+ (elf32_arm_merge_eabi_attributes): Mark output as initialized.
+ Only set Tag_CPU_name and Tag_ABI_PCS_R9_use if input attribute
+ is present.
+
+2006-11-27 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_special_sections): Add .xtensa.info.
+
+2006-11-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (IS_SECTION_IN_INPUT_SEGMENT): New.
+ (INCLUDE_SECTION_IN_SEGMENT): Use IS_SECTION_IN_INPUT_SEGMENT.
+ (rewrite_elf_program_header): Don't preserve segment physical
+ address in the output segment if the first section in the
+ corresponding input segment is removed.
+
+2006-11-22 Alan Modra <amodra@bigpond.net.au>
+
+ * pef.c (bfd_pef_make_empty_symbol): Delete function. Define instead.
+ * xsym.c (bfd_sym_make_empty_symbol): Likewise.
+ * xsym.h (bfd_sym_make_empty_symbol): Delete.
+
+2006-11-21 Greg McGary <greg@mcgary.org>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Fixup D field
+ at proper offset in little-endian mode.
+ * elf64-ppc.c (ppc_elf_relocate_section): Likewise.
+
+2006-11-21 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-eh-frame.c (struct cie): New type.
+ (cie_compare): Removed.
+ (cie_eq, cie_hash, cie_compute_hash): New functions.
+ (_bfd_elf_discard_section_eh_frame): Rewrite not to rely on FDEs
+ pointing only to last CIE and allow merging of any duplicate CIEs,
+ not just duplicate consecutive CIEs.
+ (_bfd_elf_discard_section_eh_frame_hdr): Delete cies hash table.
+ * elf-bfd.h (struct cie_header, struct cie): Removed.
+ (struct eh_frame_sec_info): Remove alloced field.
+ (struct eh_frame_hdr_info): Remove last_cie, last_cie_sec
+ and last_cie_inf fields. Add cies field.
+
+2006-11-20 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd-in.h (struct stat): Don't typedef.
+ * bfdio.c (bfd_get_size): Return a file_ptr.
+ * cisco-core.c (cisco_core_file_validate): Use bfd_size_type for nread.
+ * mmo.c (mmo_scan): Use file_ptr for curpos.
+ * trad-core.c (trad_unix_core): Don't cast statbuf.st_size to
+ unsigned long.
+ * bfd-in2.h: Regenerate.
+
+2006-11-20 Alan Modra <amodra@bigpond.net.au>
+
+ PR 3532
+ * bfd-in.h (struct bfd_hash_table): Reorganize. Add "frozen".
+ * hash.c (bfd_hash_table_init_n): Init frozen.
+ (bfd_hash_lookup): Don't grow if frozen.
+ (bfd_hash_traverse): Freeze hash table during traversal.
+ * bfd-in2.h: Regenerate.
+
+2006-11-18 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (_bfd_elf_check_kept_section): Test for kept group
+ section. Save result of checks in kept_section.
+ (_bfd_elf_section_already_linked): Tidy. Correct comments.
+ Ignore all group member sections. Handle special matching of
+ single-member groups against linkonce sections via their group
+ section. When such a match is found, set kept_section to the
+ group member section rather than to the group.
+
+2006-11-14 Phil Lello <phil.lello@homecall.co.uk>
+
+ * peXXigen.c: Updates for PE/COFF V8.0, and clarification
+ (dir_names): Added CLR Runtime Header to dir_names[].
+ (_bfd_XX_print_private_bfd_data_common): Added EFI_ROM and XBOX
+ subsystem names
+ (_bfd_XXi_swap_aouthdr_in, _bfd_XXi_swap_aouthdr_out)
+ (pe_print_idata, pe_print_edata)
+ (_bfd_XX_bfd_copy_private_bfd_data_common)
+ (_bfd_XXi_final_link_postscript): Use #DEFINEs for index into
+ DataDirectory.
+
+2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
+ prototype.
+ (bfd_elf32_arm_set_byteswap_code): New prototype.
+ * bfd-in2.h: Regenerate.
+ * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Don't take
+ byteswap_code as an argument. Revert 2006-11-01 change.
+ (bfd_elf32_arm_set_byteswap_code): New.
+ (elf32_arm_size_dynamic_sections): Call
+ bfd_elf32_arm_process_before_allocation.
+
+2006-11-10 Thiemo Seufer <ths@mips.com>
+
+ * config.bfd (mips*el-sde-elf*, mips*-sde-elf*): Drop ECOFF support
+ for SDE configs.
+
+2006-11-10 Nick Clifton <nickc@redhat.com>
+
+ * config.bfd: Move previously obsoleted targets to the REMOVED
+ list.
+ Add maxq-*-coff to the obsolete list.
+
+2006-11-10 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-arm-wince.c (LOCAL_LABEL_PREFIX): Define as ".".
+ * pei-arm-wince.c (LOCAL_LABEL_PREFIX): Likewise.
+ * coff-arm.c (LOCAL_LABEL_PREFIX): Only define if not defined before.
+
+2006-11-07 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * elf32-arm.c (find_thumb_glue): Add ERROR_MESSAGE argument; set it
+ on error.
+ (find_arm_glue): Likewise.
+ (elf32_thumb_to_arm_stub, elf32_arm_create_thumb_stub)
+ (elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate): Add
+ ERROR_MESSAGE argument and pass it through.
+ (elf32_arm_to_thumb_export_stub): Update.
+ (elf32_arm_relocate_section): Use ERROR_MESSAGE and reloc_dangerous.
+
+2006-11-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (enum _ppc64_sec_type): New.
+ (struct _ppc64_elf_section_data): Move "t_symndx" into opd union,
+ and rename fields. Add sec_type and has_14bit_branch.
+ (struct ppc_link_hash_table): Remove has_14bit_branch.
+ (get_opd_info, get_tls_mask, ppc64_elf_edit_opd): Adjust.
+ (ppc64_elf_relocate_section): Likewise.
+ (ppc64_elf_check_relocs): Likewise. Set per-section has_14bit_branch.
+ (ppc64_elf_size_stubs): Don't set default group size here.
+ (group_sections): Instead do so here, and group sections using
+ their individual requirements.
+
+2006-11-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc64_elf_obj_tdata): Remove "has_dotsym"
+ and union.
+ (struct ppc_link_hash_entry): Add "next_dot_sym".
+ (struct ppc_link_hash_table): Add "dot_syms".
+ (link_hash_newfunc): Make list of syms starting with a dot.
+ (ppc_get_stub_entry, adjust_opd_syms): Adjust.
+ (ppc64_elf_add_symbol_hook): Don't set has_dotsym.
+ (struct add_symbol_adjust_data): Delete.
+ (add_symbol_adjust): Simplify params and return.
+ (ppc64_elf_check_directives): Just process the "dot_syms" lists,
+ not all syms.
+
+2006-11-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * libbfd-in.h (_bfd_clear_contents): New prototype.
+ * reloc.c (_bfd_clear_contents): New.
+ * libbfd.h: Regenerated.
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Use
+ _bfd_clear_contents.
+ * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
+
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Set value to
+ zero for discarded symbols.
+ * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
+
+2006-11-01 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * elf-bfd.h (local_call_stubs): New member.
+ * elfxx-mips.c (FN_STUB_P, CALL_STUB_P, CALL_FP_STUB_P): New macros.
+ (mips_elf_calculate_relocation): Handle local mips16 call stubs.
+ (mips16_stub_section_p): Rename from mips_elf_stub_section_p, use
+ the new stub macros.
+ (_bfd_mips_elf_check_relocs): Handle call stubs for code which
+ mixes mips16 and mips32 functions. Use mips16_stub_section_p. Mark
+ used stubs with SEC_KEEP. Use the new stub macros.
+
+2006-11-01 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Correct
+ check for PLT usage.
+
+2006-11-01 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * elfxx-mips.c (mips_elf_merge_gots): Always use maxcnt.
+
+2006-10-31 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (elfcore_write_note): Pad note descriptor to 4-byte
+ boundary. Tidy. Comment.
+
+2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3111
+ * elf-bfd.h (elf_obj_tdata): Add symbuf.
+ (_bfd_elf_section_already_linked): Add struct bfd_link_info *.
+ (_bfd_elf_check_kept_section): Likewise.
+ (bfd_elf_match_symbols_in_sections): Likewise.
+
+ * elf.c (assign_section_numbers): Updated to add
+ struct bfd_link_info *.
+ (bfd_elf_match_symbols_in_sections): Updated. Cache symbol
+ buffer if info->reduce_memory_overheads is false.
+
+ * elflink.c (match_group_member): Updated to add
+ struct bfd_link_info *.
+ (_bfd_elf_check_kept_section): Likewise.
+ (elf_link_input_bfd): Likewise.
+ (_bfd_elf_section_already_linked): Likewise.
+ (bfd_elf_final_link): Free symbol buffer if
+ info->reduce_memory_overheads is false.
+
+ * libbfd-in.h (_bfd_nolink_section_already_linked): Add
+ struct bfd_link_info *.
+ (_bfd_generic_section_already_linked): Likewise.
+ * libbfd.h: Regenerated.
+
+ * linker.c (bfd_section_already_linked): Add
+ struct bfd_link_info *.
+ (_bfd_generic_section_already_linked): Likewise.
+ * targets.c (bfd_target): Add struct bfd_link_info * to
+ _section_already_linked.
+ * bfd-in2.h: Regenerated.
+
+2006-10-30 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (bfd_error_type): Add bfd_error_on_input.
+ (input_bfd, input_error): New static vars.
+ (bfd_set_error): Handle bfd_error_on_input.
+ (bfd_errmsg): Likewise.
+ (bfd_perror): Simplify.
+ * archive.c (_bfd_write_archive_contents): Report errors on input.
+ * bfd-in2.h: Regenerate.
+
+2006-10-30 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (elfcore_write_note): Pad to 4-byte boundary.
+
+2006-10-28 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-mips.c (elf_mips_howto_table_rel): Add R_MIPS_GLOB_DAT.
+ * elfn32-mips.c (elf_mips_howto_table_rel): Likewise.
+ (elf_mips_howto_table_rela): Likewise.
+ * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
+ (mips_elf64_howto_table_rela): Likewise.
+
+2006-10-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (_bfd_elf_init_private_section_data): Assert output
+ section ELF type instead of check if it is SHT_NULL. Copy
+ OS/PROC specific flags from input section to output section.
+
+2006-10-27 Alan Modra <amodra@bigpond.net.au>
+
+ * section.c (SEC_KEEP): Update comment.
+ * bfd-in2.h: Regenerate.
+ * elflink.c (bfd_elf_gc_sections): Ignore SEC_EXCLUDE sections.
+ * merge.c (_bfd_merge_sections): Set SEC_KEEP on excluded sections.
+ * stabs.c (_bfd_discard_section_stabs): Likewise.
+ (_bfd_link_section_stabs): Likewise. Simplify abs_section check.
+
+2006-10-26 Ben Elliston <bje@au.ibm.com>
+
+ * reloc.c (_bfd_relocate_contents): Remove explicit case 0.
+
+ * elf.c (bfd_section_from_shdr): Remove extraneous breaks.
+ * targets.c (find_target): Remove extraneous break.
+
+2006-10-26 Ben Elliston <bje@au.ibm.com>
+
+ * coff-maxq.c (coff_maxq20_reloc): Remove unused variable `howto'.
+ (struct maxq_reloc_map): Unused; remove.
+ (maxq_reloc_map): Likewise.
+ (maxq_reloc_type_lookup): Remove loop over maxq_reloc_map.
+
+2006-10-26 Ben Elliston <bje@au.ibm.com>
+
+ * elf.c (bfd_elf_set_dyn_lib_class): Change second argument type
+ from int to enum dynamic_lib_link_class lib_class.
+ * bfd-in.h (bfd_elf_set_dyn_lib_class): Likewise.
+ * bfd-in2.h: Regenerate.
+
+2006-10-25 Alan Modra <amodra@bigpond.net.au>
+ Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+
+ * cpu-spu.c: New file.
+ * elf32-spu.c: New file.
+ * elf32-spu.h: New file.
+ * archures.c: Add SPU support.
+ * config.bfd: Likewise.
+ * configure.in: Likewise.
+ * reloc.c: Likewise.
+ * targets.c: Likewise.
+ * Makefile.am: Likewise. Run "make dep-am".
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2006-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_edit_opd): Clarify comment.
+
+2006-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-score.c: Formatting.
+ (elf_backend_omit_section_dynsym): Define.
+ (score_elf_create_dynamic_relocation): Remove code copied from mips.
+ Don't use section syms in dynamic relocs. Remove unused param.
+ (score_elf_final_link_relocate): Remove unused param.
+
+2006-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * linker.c (fix_syms): Choose best of previous and next
+ section based on section flags and vma.
+
+2006-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh64.c (sh64_elf_merge_symbol_attribute): Do merging
+ only when the non visibility part of st_other is non-zero.
+ * elf64-sh64.c (sh64_elf64_merge_symbol_attribute): Likewise.
+
+2006-10-20 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't extend
+ PT_DYNAMIC on GNU/Linux targets.
+
+2006-10-20 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Make the
+ size of .rel.dyn reflect the value of DT_RELSZ.
+
+2006-10-20 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_additional_program_headers): Allocate
+ a PT_NULL header for dynamic objects.
+ (_bfd_mips_elf_modify_segment_map): Add it.
+
+2006-10-19 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * elf32-score.c (score_elf_rel_dyn_section): Replace
+ bfd_make_section with bfd_make_section_with_flags.
+ (_bfd_score_elf_create_dynamic_sections): Ditto.
+ (score_elf_create_got_section): Ditto.
+ (score_elf_final_link_relocate): Delete referrence to
+ EF_SCORE_HASENTRY.
+
+2006-10-19 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (sort_dynamic_relocs): Sort relocations against the
+ same symbol by increasing r_offset.
+ (sort_dynamic_relocs_64): Likewise. Fix comparisons between very
+ large and very small symbol indexes.
+
+2006-10-19 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG
+ and DT_MIPS_RLD_MAP tags for position-independent executables.
+ Do not add DT_DEBUG to shared libraries for any MIPS target.
+
+2006-10-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3290
+ * elflink.c (elf_link_add_object_symbols): Hide definitions in
+ debug sections.
+
+2006-10-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-arm.c (bfd_elf32_arm_allocate_interworking_sect): Check,
+ don't set, glue section size.
+ (record_arm_to_thumb_glue): Set glue section size here.
+ (record_thumb_to_arm_glue): Likewise.
+ (bfd_elf32_arm_add_glue_sections_to_bfd): Formatting.
+ (bfd_elf32_arm_process_before_allocation): Ignore exluded sections.
+
+2006-10-18 Roy Marples <uberlord@gentoo.org>
+
+ * elf64-sparc.c: Add FreeBSD support.
+ (elf64_sparc_fbsd_post_process_headers): New function.
+ * targets.c (_bfd_target_vector): Add bfd_elf64_sparc_freebsd_vec.
+ * config.bfd (sparc64-*-freebsd*): Set targ_defvec to bfd_elf64_sparc_freebsd_vec.
+ * configure.in: Add entry for bfd_elf64_sparc_freebsd_vec.
+ * configure: Regenerate.
+
+2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Add support for
+ R_ARM_MOVW_BREL_NC, R_ARM_MOVW_BREL, R_ARM_MOVT_BREL,
+ R_ARM_THM_MOVW_BREL_NC, R_ARM_THM_MOVW_BREL and
+ R_ARM_THM_MOVT_BREL relocations.
+
+2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_howto_table_1): Change offset for
+ R_THM_CALL to 25 and remove FIXME comment.
+ (using_thumb2): New function.
+ (elf32_arm_final_link_relocate): Cope with Thumb-2 BL encoding.
+
+2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Add cases
+ for R_ARM_ABS32_NOI and R_ARM_REL32_NOI.
+ (elf32_arm_gc_sweep_hook): Likewise.
+ (elf32_arm_check_relocs): Likewise.
+ (allocate_dynrelocs): Likewise.
+
+2006-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_link_hash_table): Reorder. Add
+ text_index_section and data_index_section.
+ (struct elf_backend_data): Add elf_backend_init_index_section.
+ (_bfd_elf_init_1_index_section): Declare.
+ (_bfd_elf_init_2_index_sections): Declare.
+ * elfxx-target.h (elf_backend_init_index_section): Define.
+ (elfNN_bed): Init new field.
+ * elflink.c (_bfd_elf_link_omit_section_dynsym): Keep first tls
+ section and text_index_section plus data_index_section.
+ (_bfd_elf_link_renumber_dynsyms): Clear dynindx on omitted sections.
+ (_bfd_elf_init_1_index_section): New function.
+ (_bfd_elf_init_2_index_sections): New function.
+ (bfd_elf_size_dynsym_hash_dynstr): Call elf_backend_init_index_section.
+ (elf_link_input_bfd): When emitting relocs, use text_index_section
+ and data_index_section for removed sections.
+ * elf-m10300.c (elf_backend_omit_section_dynsym): Define.
+ * elf32-i386.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-xstormy16.c: Likewise.
+ * elf32-xtensa.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-mmix.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elf32-arm.c (elf32_arm_final_link_relocate): Use text_index_section
+ and data_index_section sym for relocs against sections with no dynamic
+ section sym.
+ (elf_backend_init_index_section): Define.
+ * elf32-cris.c: Similarly.
+ * elf32-hppa.c: Similarly.
+ * elf32-i370.c: Similarly.
+ * elf32-m68k.c: Similarly.
+ * elf32-mips.c: Similarly.
+ * elf32-ppc.c: Similarly.
+ * elf32-s390.c: Similarly.
+ * elf32-sparc.c: Similarly.
+ * elf32-vax.c: Similarly.
+ * elf64-mips.c: Similarly.
+ * elf64-ppc.c: Similarly.
+ * elf64-s390.c: Similarly.
+ * elf64-sparc.c: Similarly.
+ * elf64-x86-64.c: Similarly.
+ * elfn32-mips.c: Similarly.
+ * elfxx-mips.c: Similarly.
+ * elfxx-sparc.c: Similarly.
+ * linker.c (fix_syms): Base symbols in removed sections on
+ previous section in preference to using absolute section.
+
+2006-10-16 Andreas Schwab <schwab@suse.de>
+
+ * elfxx-ia64.c (addend_compare): Properly compute return value.
+
+2006-10-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3314
+ * elf.c (assign_file_positions_for_non_load_sections): Don't
+ page align empty SHF_ALLOC sections.
+
+2006-10-13 Jakub Jelinek <jakub@redhat.com>
+
+ * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_sections): Set
+ .plt sh_entsize to 0 if plt header size isn't multiple of
+ plt entry size or for 32-bit which adds a nop insn at the
+ end of the .plt section.
+
+2006-10-12 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_action_discarded): New.
+ (elf_backend_action_discarded): Define.
+
+2006-10-11 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_relocate_section): Return after
+ unresolvable relocation error.
+ (elf_xtensa_finish_dynamic_symbol): Set value of undefined, weak
+ symbols to zero.
+
+2006-10-10 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Add DT_DEBUG
+ for PIE executables.
+
+2006-10-03 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-bfd.h (struct eh_cie_fde): Add set_loc pointer.
+ * elf-eh-frame.c (skip_cfa_op): Fix handling of DW_CFA_advance_loc.
+ Handle DW_CFA_{remember,restore}_state, DW_CFA_GNU_window_save,
+ DW_CFA_val_{offset{,_sf},expression}.
+ (skip_non_nops): Record number of DW_CFA_set_loc ops.
+ (_bfd_elf_discard_section_eh_frame): Require skip_non_nops recognizes
+ all ops. If there are any DW_CFA_set_loc ops and they are pcrel
+ or going to be pcrel, compute set_loc array.
+ (_bfd_elf_eh_frame_section_offset): If make_relative, kill relocations
+ against DW_CFA_set_loc operands.
+ (_bfd_elf_write_section_eh_frame): Handle DW_CFA_set_loc adjusting.
+
+2006-10-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * elflink.c (_bfd_elf_merge_symbol): Discard references to TLS
+ symbols from the --just-syms file.
+
+2006-10-01 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_build_stubs): Test glink size for
+ existence of PLT.
+
+2006-09-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3283
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Don't ignore
+ relocation overflow on branches to undefweaks.
+
+2006-09-29 Alan Modra <amodra@bigpond.net.au>
+
+ * po/BLD-POTFILES.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2006-09-29 Danny Smith <dannysmith@users.sourceforge.net>
+
+ PR 3276
+ * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
+ alignment for .data$, .rdata$ and .text$ sections so that sse
+ and sse2 code will work for linkonce sections too.
+ * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
+
+2006-09-28 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (_bfd_elf_gc_mark_hook): New function.
+ * elf-bfd.h (_bfd_elf_gc_mark_hook): Declare.
+ * elfxx-target.h (elf_backend_gc_mark_hook): Default to above.
+ * elf-m10300.c (mn10300_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
+ * elf32-arm.c (elf32_arm_gc_mark_hook): Likewise.
+ * elf32-cris.c (cris_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-ppc.c (ppc_elf_gc_mark_hook): Likewise.
+ * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
+ * elf32-score.c (_bfd_score_elf_gc_mark_hook): Likewise.
+ * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
+ * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
+ * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Likewise.
+ * elf64-mmix.c (mmix_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.
+ * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise.
+ * elf32-bfin.c (bfin_gc_mark_hook): Likewise.
+ (bfinfdpic_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define for elf32-bfinfdpic.
+ * elf32-d10v.c (elf32_d10v_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
+ (elf32_d10v_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-fr30.c (fr30_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
+ (fr30_elf_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-frv.c (elf32_frv_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
+ (elf32_frv_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-iq2000.c (iq2000_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
+ (iq2000_elf_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Use
+ _bfd_elf_gc_mark_hook.
+ (openrisc_elf_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-v850.c (v850_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
+ (v850_elf_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Use
+ _bfd_elf_gc_mark_hook.
+ (xstormy16_elf_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf64-sh64.c (sh_elf64_gc_mark_hook): Use _bfd_elf_gc_mark_hook.
+ (sh_elf64_gc_sweep_hook): Delete.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-avr.c (elf32_avr_gc_mark_hook): Delete.
+ (elf32_avr_gc_sweep_hook): Delete.
+ (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
+ * elf32-cr16c.c (elf32_cr16c_gc_mark_hook): Delete.
+ (elf32_cr16c_gc_sweep_hook): Delete.
+ (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
+ * elf32-crx.c (elf32_crx_gc_mark_hook): Delete.
+ (elf32_crx_gc_sweep_hook): Delete.
+ (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
+ * elf32-h8300.c (elf32_h8_gc_mark_hook): Delete.
+ (elf32_h8_gc_sweep_hook): Delete.
+ (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
+ * elf32-ip2k.c (ip2k_elf_gc_mark_hook): Delete.
+ (ip2k_elf_gc_sweep_hook): Delete.
+ (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
+ * elf32-m32c.c (m32c_elf_gc_mark_hook, m32c_elf_gc_sweep_hook): Delete.
+ (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
+ * elf32-m68hc11.c (elf_backend_gc_mark_hook): Don't define.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-m68hc12.c (elf_backend_gc_mark_hook): Don't define.
+ (elf_backend_gc_sweep_hook): Don't define.
+ * elf32-m68hc1x.c (elf32_m68hc11_gc_mark_hook): Delete.
+ (elf32_m68hc11_gc_sweep_hook): Delete.
+ * elf32-m68hc1x.h (elf32_m68hc11_gc_mark_hook): Delete.
+ (elf32_m68hc11_gc_sweep_hook): Delete.
+ * elf32-msp430.c (elf32_msp430_gc_mark_hook): Delete.
+ (elf32_msp430_gc_sweep_hook): Delete.
+ (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
+ * elf32-mt.c (mt_elf_gc_mark_hook, mt_elf_gc_sweep_hook): Delete.
+ (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
+
+2006-09-25 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * bfd-in.h (CONST_STRNCPY) : Delete.
+ (LITSTRCPY) : New.
+ (LITMEMCPY) : New.
+ * bfd-in2.h : Regenerate.
+ * elflink.c (bfd_elf_gc_sections) : Use LITMEMCPY. Don't manually
+ calculate string lengths.
+ * nlmcode.h (nlm_swap_auxiliary_headers_in) : Use LITMEMCPY.
+
+2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3223
+ PR ld/3267
+ * elf.c (assign_file_positions_for_non_load_sections): Don't
+ warn zero size allocated sections.
+
+2006-09-27 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-score.c (_bfd_score_elf_relocate_section): Move assignment
+ to "name" so that compiler realizes it is never uninitialized.
+ Use bfd_elf_sym_name.
+
+2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3262
+ * elf.c (rewrite_elf_program_header): Use bfd_zalloc instead of
+ bfd_alloc to allocate segment map.
+ (copy_elf_program_header): Likewise.
+
+2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Ian Lance Taylor <ian@wasabisystems.com>
+ Ben Elliston <bje@wasabisystems.com>
+
+ * archures.c: Add definition for bfd_mach_arm_iWMMXt2.
+ * cpu-arm.c (processors): Add bfd_mach_arm_iWMMXt2.
+ (arch_info_struct, bfd_arm_update_notes): Likewise.
+ (architectures): Likewise.
+ (bfd_arm_merge_machines): Check for iWMMXt2.
+ * bfd-in2.h: Rebuild.
+
+2006-09-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure: Regenerated.
+
+2006-09-22 Alan Modra <amodra@bigpond.net.au>
+
+ * elfcode.h (elf_swap_symbol_in): Return bfd_boolean. Don't abort
+ on error.
+ * elf-bfd.h (elf_size_info <swap_symbol_in>): Adjust decl.
+ (bfd_elf32_swap_symbol_in, bfd_elf64_swap_symbol_in): Likewise.
+ * elf.c (bfd_elf_get_elf_syms): Test return of swap_symbol_in,
+ and report error.
+ * elf32-arm.c (elf32_arm_swap_symbol_in): Return bfd_boolean.
+
+2006-09-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * elf32-s390.c (elf_s390_relocate_section): Remove check for code
+ section in LD to LE linker relaxation for R_390_TLS_LDO32.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise for
+ R_390_TLS_LDO64.
+
+2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
+
+ * configure.in: Added new target-vectors x86_64coff_vec,
+ x86_64pe_vec, and x86_64pei_vec.
+ * configure: Regenerate.
+ * config.bfd: Adjusted x86_64 target architecture detection.
+ * bfd.c: Add for new target "coff-x86-64"
+ (bfd_get_sign_extend): Add target vector idents for pe-x86-64. and pei-x86-64.
+ * coff-x86_64.c: Add new file for x86_64 (AMD64) coff support.
+ * libpei.h: Adjustments for COFF_WITH_pex64.
+ * coffcode.h: Add for new target machine, architecture, signature, and internal
+ signature handler.
+ * Makefile.am: Add new files to target-all and define make-rule for pex64igen.c
+ * Makefile.in: Regenerate.
+ * pe-x86_64.c: Add for new target "pe-x86-64".
+ * pei-x86_64.c: Add for new target "pei-x86-64".
+ * peicode.h: Adjusts for new targets.
+ (coff_swap_filehdr_out): Set for this target to
+ _bfd_pex64_only_swap_filehdr_out.
+ (SIZEOF_IDATA4): Define it as 8 byte size for this target.
+ (SIZEOF_IDATA5): Define it as 8 byte size for this target.
+ (jump_table jtab): Add for AMD64MAGIC.
+ (pe_ILF_build_a_bfd): Adjusts for new size of SIZEOF_IDATA4 and SIZE_IDATA5.
+ (pe_ILF_object_p): Add coff image-file signature to internal
+ signature translation.
+ * peXXigen.c: Adjust proper include of target coff-header and
+ introduced target specific code
+ (COFF_WITH_pex64): New macro for this target.
+ (pe_print_idata): New dumping method for import section of PE+ files.
+ * targets.c: Add new target vectors declarations for x86_64 coff targets.
+ * coffcode.h: Support code to support the x86_64 PE magic number.
+ * coff-x86_64.c: New file.
+
+2006-09-17 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf.c (special_sections_s): Revert last STRING_COMMA_LEN change
+ for .stabstr entry, explain why.
+
+2006-09-17 Anton Blanchard <anton@samba.org>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf2.c (concat_filename): Apply DW_AT_comp_dir if dir table
+ entry isn't absolute.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * cpu-score.c: New file.
+ * elf32-score.c: New file.
+ * config.bfd: Add Score target.
+ * Makefile.am: Add Score files.
+ * Makefile.in: Regenerate.
+ * archures.c: Add Score architecture.
+ * reloc.c: Add Score relocs.
+ * targets.c: Add Score target vectors.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * configure.in: Add Score target.
+ * configure: Regenerate.
+
+2006-09-16 Nick Clifton <nickc@redhat.com>
+ Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * bfd-in.h (STRING_COMMA_LEN): New macro. Takes one constant
+ string as its argument and emits the string followed by a comma
+ and then the length of the string.
+ (CONST_STRNEQ): New macro. Checks to see if a variable string
+ has a constant string as its initial characters.
+ (CONST_STRNCPY): New macro. Copies a constant string to the start
+ of a variable string.
+ * bfd-in2.h: Regenerate.
+ * archive.c: Make use of the new macros.
+ * archive64.c: Likewise.
+ * bfd.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-stgo32.c: Likewise.
+ * coffcode.h: Likewise.
+ * cofflink.c: Likewise.
+ * cpu-i960.c: Likewise.
+ * dwarf2.c: Likewise.
+ * ecoff.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-arm.c: Likewise.
+ * elf32-bfin.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-iq2000.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68hc11.c: Likewise.
+ * elf32-m68hc12.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-sh-symbian.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-sh64.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf32-xtensa.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-mmix.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elflink.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * elfxx-sparc.c: Likewise.
+ * hpux-core.c: Likewise.
+ * i386linux.c: Likewise.
+ * ieee.c: Likewise.
+ * libpei.h: Likewise.
+ * linker.c: Likewise.
+ * m68klinux.c: Likewise.
+ * mmo.c: Likewise.
+ * nlmcode.h: Likewise.
+ * osf-core.c: Likewise.
+ * pef.c: Likewise.
+ * som.c: Likewise.
+ * sparclinux.c: Likewise.
+ * vms-hdr.c: Likewise.
+
+2006-09-14 Alan Modra <amodra@bigpond.net.au>
+
+ PR 3181
+ * elf.c (_bfd_elf_copy_private_header_data): Fix group members
+ that have had their SHT_GROUP section removed.
+
+2006-09-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3197
+ * elflink.c (elf_link_output_extsym): Compute bucket only if
+ needed.
+
+2006-09-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3186
+ * elf.c (_bfd_elf_make_section_from_shdr): Correct length of
+ "gnu.linkonce.wi.".
+
+2006-09-08 Vladimir Prus <vladimir@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_swap_symbol_out): Remove
+ unconditional setting of low bit for Thumb symbol
+ mistakenly left behind after check for external
+ symbols was added. Fix comment typo.
+
+2006-09-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf-bfd.h (elf_link_hash_entry): Add a dynamic field.
+ (bfd_elf_link_mark_dynamic_symbol): New.
+ (SYMBOLIC_BIND): New.
+
+ * elf32-i386.c (elf_i386_check_relocs): Replace info->symbolic
+ with SYMBOLIC_BIND (info, h).
+ (elf_i386_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
+ (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
+
+ * elflink.c (bfd_elf_link_mark_dynamic_symbol): New.
+ (bfd_elf_record_link_assignment): Call
+ bfd_elf_link_mark_dynamic_symbol on new entry.
+ (_bfd_elf_merge_symbol): Likewise.
+ (_bfd_elf_export_symbol): Return if the symbol isn't exported.
+ (_bfd_elf_fix_symbol_flags): Replace info->symbolic with
+ SYMBOLIC_BIND (info, h).
+ (_bfd_elf_dynamic_symbol_p): Likewise.
+ (_bfd_elf_symbol_refs_local_p): Likewise.
+ (bfd_elf_size_dynamic_sections): Updated.
+
+2006-09-05 Bibo Mao <bibo.mao@intel.com>
+
+ PR binutils/3171
+ * coffcode.h (coff_write_object_contents): Set the optional
+ header magic number to PE32PMAGIC instead of ZMAGIC for ia64.
+
+2006-09-04 Mark Shinwell <shinwell@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_howto_table_1): Adjust entries for
+ R_ARM_THM_ALU_PREL_11_0 and R_ARM_THM_PC12 relocations.
+ (elf32_arm_final_link_relocate): Handle R_ARM_THM_ALU_PREL_11_0
+ and R_ARM_THM_PC12 relocations.
+
+2006-08-24 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (xtensa_get_property_section_name): Delete.
+ (xtensa_get_property_section): New.
+ (xtensa_read_table_entries): Use xtensa_get_property_section.
+ (relax_property_section, xtensa_get_property_predef_flags): Handle
+ group name suffixes in property section names.
+ (match_section_group): New.
+
+2006-08-23 Frediano Ziglio <Frediano.Ziglio@vodafone.com>
+
+ * archive.c (hpux_uid_gid_encode): Fix thinko decrementing "cnt"
+ variable.
+
+2006-08-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_copy_indirect_symbol): Only copy
+ plt_thumb_refcount from indirect symbols.
+
+2006-08-22 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Correct GOT and PLT HA
+ reloc handling.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+
+2006-08-21 Mark Shinwell <shinwell@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_link_hash_table): Correct typo in
+ comment for target1_is_rel.
+
+2006-08-21 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * Makefile.am: Add rules to build pe-arm-wince.lo
+ and pei-arm-wince.lo objects.
+ * Makefile.in: Regenerate.
+ * pe-arm-wince.c: New file.
+ * pei-arm-wince.c: New file.
+ * pei-arm.c: Remove ARM_WINCE block.
+ * pe-arm.c: Remove ARM_WINCE block. Rename
+ bfd_arm_pe_allocate_interworking_sections,
+ bfd_arm_pe_get_bfd_for_interworking, and
+ bfd_arm_pe_process_before_allocation to
+ bfd_armpe_allocate_interworking_sections,
+ bfd_armpe_get_bfd_for_interworking, and
+ bfd_armpe_process_before_allocation. Move them before
+ including bfd.h.
+ * bfd.c: ARM wince bfd format names were renamed. Adjust.
+ * coff-arm.c [ARM_WINCE]: Adjust so Windows CE doesn't end up
+ with unexpected/conflicting relocs.
+ * targets.c: The arm-wince-pe target got its own new vector.
+ Adjust.
+ * config.bfd: Likewise.
+ * configure.in: Likewise.
+ * configure: Regenerate.
+
+2006-08-18 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_link_hash_entry): Add export_glue.
+ (elf32_arm_link_hash_newfunc): Initialize export_glue.
+ (record_arm_to_thumb_glue): Return stub symbol.
+ (elf32_arm_create_thumb_stub): New function.
+ (elf32_arm_to_thumb_stub): Use it.
+ (elf32_arm_to_thumb_export_stub): New function.
+ (elf32_arm_begin_write_processing): New function.
+ (allocate_dynrelocs): Allocate Arm stubs.
+ (elf_backend_begin_write_processing): Define.
+ (elf32_arm_symbian_begin_write_processing): Remove ATTRIBUTE_UNUSED.
+ Call elf32_arm_begin_write_processing.
+
+2006-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (create_linkage_sections): Align .glink to 8 bytes.
+ (ppc64_elf_build_stubs): Use new lazy linking stub.
+
+2006-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_size_stubs): Ignore non-code sections.
+
+2006-08-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3015
+ * elf.c (get_program_header_size): Add a PT_GNU_RELRO segment
+ only if there is a PT_DYNAMIC segment.
+ (_bfd_elf_map_sections_to_segments): Likewise.
+ (assign_file_positions_for_load_sections): Set PT_GNU_RELRO
+ segment alignment to 1.
+
+2006-08-15 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * elf32-mips.c, elf64-mips.c, elfn32-mips.c
+ (elf_backend_merge_symbol_attribute): Define.
+ * elflink.c (elf_link_add_object_symbols): Merge only the ELF
+ visibility flags.
+ * elfxx-mips.c (_bfd_mips_elf_merge_symbol_attribute): New function.
+
+2006-08-15 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * config.bfd: Add configurations for mips*el-sde-elf* and
+ mips*-sde-elf*.
+
+2006-08-14 DJ Delorie <dj@redhat.com>
+
+ * elf-m10300.c (elf32_mn10300_link_hash_entry): Add value.
+ (elf32_mn10300_count_hash_table_entries): New.
+ (elf32_mn10300_list_hash_table_entries): New.
+ (sort_by_value): New.
+ (mn10300_elf_relax_section): Don't skip data sections; restrict
+ code-specific tests to code-specific areas so that potential
+ indirect calls can be detected. Check for multiple local symbols
+ at the same address and merge their flags.
+ (elf32_mn10300_link_hash_newfunc): Initialize value.
+
+2006-08-14 Thiemo Seufer <ths@mips.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_symbol_processing,
+ _bfd_mips_elf_add_symbol_hook): Don't try to place small common TLS
+ symbols in .scommon.
+
+2006-08-11 Thiemo Seufer <ths@mips.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Set
+ sh_entsize only when sgot was already initialized.
+
+2006-08-08 DJ Delorie <dj@redhat.com>
+
+ * elf32-sh.c (sh_elf_relax_section): Allow for branches across
+ non-moving .align directives. Preserve any DIR32 offset when
+ converting bsr's to jsr's.
+
+2006-08-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_build_stubs): Clear relbrlt reloc_count
+ after stubs have been built.
+
+2006-08-07 Nick Clifton <nickc@redhat.com>
+
+ * elf32-sh.c (vxworks_object_p): Only check for vxworks target
+ vectors if they are going to be created.
+
+2006-08-07 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (bfd_elf32_shnbsd_vec): Fix typo.
+ * configure: Regenerate.
+
+2006-08-07 Nick Clifton <nickc@redhat.com>
+
+ * coff-arm.c (coff_arm_rtype_to_howto): Only check for ARM_SECREL
+ relocation types if the target is ARM_WINCE.
+
+2006-08-05 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * bfd.c (bfd_get_sign_extend_vma): Add cases for pe-arm-little
+ and pei-arm-little.
+ * coff-arm.c (coff_arm_rtype_to_howto) [COFF_WITH_PE]: Handle
+ ARM_SECREL.
+ (coff_arm_reloc_type_lookup): Map BFD_RELOC_32_SECREL to
+ ARM_SECREL.
+ * pe-arm.c [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
+ * pei-arm.c [TARGET_UNDERSCORE]: Define for ARM_WINCE like in
+ pe-arm.c.
+ [COFF_SECTION_ALIGNMENT_ENTRIES]: Define.
+
+2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
+
+ * elflink.c (elf_gc_sweep): If info.print_gc_sections is true,
+ list removed sections to stderr.
+
+2006-08-04 Richard Sandiford <richard@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+
+ * config.bfd (sh-*-vxworks): Use bfd_elf32_shvxworks_vec and
+ bfd_elf32_shlvxworks_vec.
+ * configure.in (bfd_elf32_sh64_vec): Add elf-vxworks.lo.
+ (bfd_elf32_sh64l_vec, bfd_elf32_sh64lin_vec): Likewise.
+ (bfd_elf32_sh64blin_vec, bfd_elf32_sh64lnbsd_vec): Likewise.
+ (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh_vec): Likewise.
+ (bfd_elf32_shblin_vec, bfd_elf32_shl_vec): Likewise.
+ (bfd_elf32_shl_symbian_vec, bfd_elf32_shlin_vec): Likewise.
+ (bfd_elf32_shlnbsd_vec, bfd_elf32_shnbsd_vec): Likewise.
+ (bfd_elf32_shlvxworks_vec, bfd_elf32_shvxworks_vec): New stanzas.
+ * configure: Regenerate.
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
+ * elf-vxworks.c (elf_vxworks_gott_symbol_p): New function.
+ (elf_vxworks_add_symbol_hook): Use it.
+ (elf_vxworks_link_output_symbol_hook): Likewise. Use the hash
+ table entry to check for weak undefined symbols and to obtain
+ the original bfd.
+ (elf_vxworks_emit_relocs): Use target_index instead of this_idx.
+ * elf32-sh-relocs.h: New file, split from elf32-sh.c.
+ (R_SH_DIR32): Use SH_PARTIAL32 for the partial_inplace field,
+ SH_SRC_MASK32 for the src_mask field, and SH_ELF_RELOC for the
+ special_function field.
+ (R_SH_REL32): Use SH_PARTIAL32 and SH_SRC_MASK32 here too.
+ (R_SH_REL32, R_SH_TLS_GD_32, R_SH_TLS_LD_32): Likewise.
+ (R_SH_TLS_LDO_32, R_SH_TLS_IE_32, R_SH_TLS_LE_32): Likewise.
+ (R_SH_TLS_DTPMOD32, R_SH_TLS_DTPOFF32, R_SH_TLS_TPOFF32): Likewise.
+ (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT): Likewise.
+ (R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): Likewise.
+ (SH_PARTIAL32, SH_SRC_MASK32, SH_ELF_RELOC): Undefine at end of file.
+ * elf32-sh.c: Include elf32-vxworks.h.
+ (MINUS_ONE): Define.
+ (sh_elf_howto_table): Include elf32-sh-relocs.h with SH_PARTIAL32
+ set to TRUE, SH_SRC_MASK32 set to 0xffffffff, and SH_ELF_RELOC set
+ to sh_elf_reloc.
+ (sh_vxworks_howto_table): New variable. Include elf32-sh-relocs.h
+ with SH_PARTIAL32 set to FALSE, SH_SRC_MASK32 set to 0, and
+ SH_ELF_RELOC set to bfd_elf_generic_reloc.
+ (vxworks_object_p, get_howto_table): New functions.
+ (sh_elf_reloc_type_lookup): Fix typo. Use get_howto_table.
+ (sh_elf_info_to_howto): Use get_howto_table.
+ (sh_elf_relax_section): Honor the partial_inplace field of the
+ R_SH_DIR32 howto.
+ (sh_elf_relax_delete_bytes): Likewise.
+ (elf_sh_plt_info): New structure.
+ (PLT_ENTRY_SIZE): Replace both definitions with...
+ (ELF_PLT_ENTRY_SIZE): ...this new macro, with separate definitions for
+ INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
+ (elf_sh_plt0_entry_be): Update sizes of both definitions accordingly.
+ (elf_sh_plt0_entry_le): Likewise.
+ (elf_sh_plt_entry_be, elf_sh_plt_entry_le): Likewise.
+ (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le): Likewise.
+ (elf_sh_plts): New structure, with separate definitions for
+ INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
+ (elf_sh_plt0_entry): Delete both definitions.
+ (elf_sh_plt_entry, elf_sh_pic_plt_entry): Likewise.
+ (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset): Likewise.
+ (elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset): Likewise.
+ (elf_sh_plt_reloc_offset): Likewise.
+ (movi_shori_putval): Delete in favor of...
+ (install_plt_field): ...this new function, with separate definitions
+ for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
+ (get_plt_info): New function, with separate definitions
+ for INCLUDE_SHMEDIA and !INCLUDE_SHMEDIA.
+ (elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset): Delete.
+ (VXWORKS_PLT_HEADER_SIZE, VXWORKS_PLT_ENTRY_SIZE): New macros.
+ (vxworks_sh_plt0_entry_be, vxworks_sh_plt0_entry_le): New constants.
+ (vxworks_sh_plt_entry_be, vxworks_sh_plt_entry_le): Likewise.
+ (vxworks_sh_pic_plt_entry_be, vxworks_sh_pic_plt_entry_le): Likewise.
+ (get_plt_index, get_plt_offset): New functions.
+ (elf_sh_link_hash_table): Add srelplt2, plt_info and vxworks_p fields.
+ (sh_elf_link_hash_table_create): Initialize them.
+ (sh_elf_create_dynamic_sections): Call
+ elf_vxworks_create_dynamic_sections for VxWorks.
+ (allocate_dynrelocs): Use htab->plt_info to get the size of PLT
+ entries. Allocate relocation entries in .rela.plt.unloaded if
+ generating a VxWorks executable.
+ (sh_elf_always_size_sections): New function.
+ (sh_elf_size_dynamic_sections): Extend .rela.plt handling to
+ .rela.plt.unloaded.
+ (sh_elf_relocate_section): Use get_howto_table. Honor
+ partial_inplace when calculating the addend for dynamic
+ relocations. Use get_plt_index.
+ (sh_elf_finish_dynamic_symbol): Use get_plt_index, install_plt_field
+ and htab->plt_info. Fill in the bra .plt offset for VxWorks
+ executables. Populate .rela.plt.unloaded. Do not make
+ _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
+ (sh_elf_finish_dynamic_sections): Use install_plt_field and
+ htab->plt_info. Handle cases where there is no special PLT header.
+ Populate the first relocation in .rela.plt.unloaded and fix up
+ the remaining entries.
+ (sh_elf_plt_sym_val): Use get_plt_info.
+ (elf_backend_always_size_sections): Define.
+ (TARGET_BIG_SYM, TARGET_BIG_NAME): Override for VxWorks.
+ (TARGET_LITTLE_SYM, TARGET_BIG_SYM): Likewise.
+ (elf32_bed, elf_backend_want_plt_sym): Likewise.
+ (elf_symbol_leading_char, elf_backend_want_got_underscore): Likewise.
+ (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Likewise.
+ (elf_backend_add_symbol_hook): Likewise.
+ (elf_backend_link_output_symbol_hook): Likewise.
+ (elf_backend_emit_relocs): Likewise.
+ (elf_backend_final_write_processing): Likewise.
+ (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): Likewise.
+ * targets.c (bfd_elf32_shlvxworks_vec): Declare.
+ (bfd_elf32_shvxworks_vec): Likewise.
+ (_bfd_target_vector): Include bfd_elf32_shlvxworks_vec and
+ bfd_elf32_shvxworks_vec.
+
+2006-08-02 Mark Kettenis <kettenis@gnu.org>
+
+ * configure.in (arm-*-openbsd*): Set COREFILE to netbsd-core.lo.
+ * configure: Regenerate.
+
+2006-08-02 Petr Salinger <Petr.Salinger@seznam.cz>
+
+ PR binutils/2983
+ * elf64-x86-64.c: Add FreeBSD support.
+ (elf64_x86_64_fbsd_post_process_headers): New function.
+ * targets.c (_bfd_target_vector): Add bfd_elf64_x86_64_freebsd_vec.
+ * config.bfd (x64_64-*-freebsd*): Add bfd_elf64_x86_64_freebsd_vec
+ to the targ_selvecs.
+ * configure.in: Add entry for bfd_elf64_x86_64_freebsd_vec.
+ * configure: Regenerate.
+
+2006-07-26 Andreas Schwab <schwab@suse.de>
+
+ * elfxx-ia64.c (elfNN_ia64_choose_gp): Use rawsize if set.
+
+2006-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (elf_modify_segment_map): Delete empty PT_LOAD segments.
+ * elf32-xtensa.c (elf_xtensa_modify_segment_map): Delete.
+ (define elf_backend_modify_segment_map): Don't define.
+
+2006-07-25 Thiemo Seufer <ths@networkno.de>
+
+ * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Allow
+ linking of objects for compatible machine types.
+
+2006-07-25 Thiemo Seufer <ths@networkno.de>
+
+ * elfxx-mips.c (mips_elf_next_relocation): Tighten check to test
+ also for same symbol.
+
+2006-07-25 Thiemo Seufer <ths@mips.com>
+
+ * elfxx-mips.c (mips_elf_calculate_relocation): Remove magic constant.
+
+2006-07-24 Michael Wetherell <mike.wetherell@ntlworld.com>
+
+ * elf.c (bfd_section_from_shdr): Reject unrecognised OS-specific
+ sections only if the SHF_OS_NONCONFORMING flag is present.
+
+2006-07-24 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2729
+ * peXXigen.c (_bfd_XXi_final_link_postscript): Check for the
+ existance of output sections before putting their entries into the
+ DataDictionary.
+
+2006-07-20 Thiemo Seufer <ths@mips.com>
+
+ * elf32-mips.c (mips16_jump_reloc): Remove function.
+ (elf_mips16_howto_table_rel): Use _bfd_mips_elf_generic_reloc
+ instead of mips16_jump_reloc.
+ * elf64_mips.c, wlfn32-mips.c (mips16_jump_reloc): Remove function.
+ (elf_mips16_howto_table_rel, elf_mips16_howto_table_rela): Use
+ _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc.
+
+2006-07-19 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd-in.h (enum notice_asneeded_action): Define.
+ * bfd-in2.h: Regenerate.
+ * elflink.c (elf_link_add_object_symbols): Call linker "notice"
+ function with NULL name for as-needed handling.
+
+2006-07-18 Paul Brook <paul@codesourcery.com>
+
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * reloc.c: Add BFD_RELOC_ARM_T32_ADD_IMM.
+
+2006-07-18 Nick Clifton <nickc@redhat.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_common_definition): New function.
+ Consider SHN_MIPS_ACOMMON and SHN_MIPS_SCOMMON as being common
+ sections.
+ * elfxx-mips.h (_bfd_mips_elf_common_definition): Prototype.
+
+2006-07-14 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Fix cinfo.shift2 value.
+
+2006-07-14 Mark Kettenis <kettenis@gnu.org>
+
+ * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Move declarations
+ to the start of a block.
+
+2006-07-13 Nick Clifton <nickc@redhat.com>
+
+ * coff-sh.c (_bfd_sh_align_load_span): Catch sh_insn_info()
+ returning a NULL value.
+
+2006-07-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2884
+ * elflink.c (_bfd_elf_merge_symbol): Copy the symbol info from
+ the old versioned dynamic definition to the new one with
+ non-default visibility. Hide the symbol if it is hidden or
+ internal.
+
+2006-07-12 Matthew R. Dempsky <mrd@alkemio.org>
+
+ * cpu-m68k.c (bfd_m68k_compatible): Handle CPU32.
+
+2006-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_GNU_HASH.
+ (bfd_section_from_shdr, elf_fake_sections, assign_section_numbers):
+ Handle SHT_GNU_HASH.
+ (special_sections_g): Include .gnu.hash section.
+ (bfd_elf_gnu_hash): New function.
+ * elf-bfd.h (bfd_elf_gnu_hash, _bfd_elf_hash_symbol): New prototypes.
+ (struct elf_backend_data): Add elf_hash_symbol method.
+ * elflink.c (_bfd_elf_link_create_dynamic_sections): Create .hash
+ only if info->emit_hash, create .gnu.hash section if
+ info->emit_gnu_hash.
+ (struct collect_gnu_hash_codes): New type.
+ (elf_collect_gnu_hash_codes, elf_renumber_gnu_hash_syms,
+ _bfd_elf_hash_symbol): New functions.
+ (compute_bucket_count): Don't compute HASHCODES array, instead add
+ that and NSYMS as arguments. Use bed->s->sizeof_hash_entry
+ instead of bed->s->arch_size / 8. Fix .hash size estimation.
+ When not optimizing, use the number of hashed symbols rather than
+ dynsymcount.
+ (bfd_elf_size_dynamic_sections): Only add DT_HASH if info->emit_hash,
+ and ADD DT_GNU_HASH if info->emit_gnu_hash.
+ (bfd_elf_size_dynsym_hash_dynstr): Size .hash only if info->emit_hash,
+ adjust compute_bucket_count caller. Create and populate .gnu.hash
+ section if info->emit_gnu_hash.
+ (elf_link_output_extsym): Only populate .hash section if
+ finfo->hash_sec != NULL.
+ (bfd_elf_final_link): Adjust assertion. Handle DT_GNU_HASH.
+ * elfxx-target.h (elf_backend_hash_symbol): Define if not yet defined.
+ (elfNN_bed): Add elf_backend_hash_symbol.
+ * elf64-x86-64.c (elf64_x86_64_hash_symbol): New function.
+ (elf_backend_hash_symbol): Define.
+ * elf32-i386.c (elf_i386_hash_symbol): New function.
+ (elf_backend_hash_symbol): Define.
+
+2006-07-05 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2659
+ * cofflink.c (_bfd_coff_link_input_bfd): Fix selection of aux
+ entry when multiple definitions of a symbol are encountered.
+
+2006-06-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Use xchg %ax,%ax
+ instead of 2 nops.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ (elf64_x86_64_plt0_entry): Use nopl 0(%rax) instead of 4 nops.
+
+2006-06-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR ld/2513
+ * elf32-i386.c (GOT_TLS_MASK, GOT_TLS_IE_IE, GOT_TLS_IE_GD,
+ GOT_TLS_IE_MASK, elf_i386_check_relocs, allocate_dynrelocs): Revert
+ 2006-04-08 changes.
+ (elf_i386_relocate_section): Likewise. For GD->IE transition
+ change subl into addl whenever tls_type is GOT_TLS_IE_POS.
+
+2006-06-23 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/2754
+ * elf.c (bfd_elf_mkobject): Don't alloc if already done. Set
+ program_header_size to -1.
+ (_bfd_elf_map_sections_to_segments): Adjust program_header_size check.
+ (assign_file_positions_for_load_sections ): Likewise.
+ (_bfd_elf_sizeof_headers): Use saved program_header_size if
+ available.
+ * elf32-arm.c (elf32_arm_mkobject): Call bfd_elf_mkobject, don't
+ alloc if already done.
+ * elf32-i386.c (elf_i386_mkobject): Likewise.
+ * elf32-ppc.c (ppc_elf_mkobject): Likewise.
+ * elf32-s390.c (elf_s390_mkobject): Likewise.
+ * elf32-sh.c (sh_elf_mkobject): Likewise.
+ * elf64-alpha.c (elf64_alpha_mkobject): Likewise.
+ * elf64-ppc.c (ppc64_elf_mkobject): Likewise.
+ * elf64-s390.c (elf_s390_mkobject): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_mkobject): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Likewise.
+
+2006-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.c (elf_link_add_object_symbols): Don't create .tcommon
+ section for relocatable link.
+
+2006-06-21 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_backend_data): Add
+ elf_backend_modify_program_headers.
+ * elfxx-target.h (elf_backend_modify_program_headers): Define.
+ (elfNN_bed): Init new field.
+ * elf.c (elf_modify_segment_map): Remove comment.
+ (assign_file_positions_for_load_sections): Only call
+ elf_modify_segment_map for objcopy/strip.
+ (assign_file_positions_except_relocs): Call
+ elf_backend_modify_program_headers.
+ * elf32-frv.c (elf32_frvfdpic_always_size_sections): Don't make
+ .stack section.
+ (elf32_frvfdpic_modify_segment_map): Delete.
+ (elf32_frvfdpic_modify_program_headers): New.
+ (elf_backend_modify_segment_map): Don't define.
+ (elf_backend_modify_program_headers): Define.
+ * elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Don't make
+ .stack section.
+ (elf32_bfinfdpic_modify_segment_map): Delete.
+ (elf32_bfinfdpic_modify_program_headers): New.
+ (elf_backend_modify_segment_map): Don't define.
+ (elf_backend_modify_program_headers): Define.
+ * elfxx-ia64.c (elfNN_ia64_modify_program_headers): New function.
+ Split out from..
+ (elfNN_ia64_modify_segment_map): ..here.
+ (elf_backend_modify_program_headers): Define.
+
+2006-06-20 Jakub Jelinek <jakub@redhat.com>
+
+ * bfd.c (bfd_record_phdr): Clear p_align and p_align_valid fields.
+ * elf.c (_bfd_elf_link_hash_table_init): Clear hplt field.
+
+2006-06-20 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h: Formatting.
+ (_bfd_elf_map_sections_to_segments): Declare.
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame_hdr): Don't
+ clear program_header_size.
+ * elf.c (get_program_header_size): Move. Don't use or set saved
+ program_header_size here.
+ (elf_modify_segment_map): New function. Split out from..
+ (assign_file_positions_for_load_sections): ..here. Assert
+ header size is correct. Remove dead code.
+ (_bfd_elf_map_sections_to_segments): Rename from
+ map_sections_to_segments. Make global. Use get_program_header_size
+ when we need estimate of header size. Call elf_modify_segment_map.
+ Set program_header_size.
+ (print_segment_map): Delete.
+ (_bfd_elf_sizeof_headers): If segment_map available, get the
+ actual size.
+ * elf32-arm.c (elf32_arm_symbian_modify_segment_map): Make safe
+ for calling more than once.
+ * elf32-bfin.c (elf32_bfinfdpic_modify_segment_map): Likewise.
+ * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
+ * elf32-i370.c (elf_backend_add_symbol_hook): Delete.
+ (elf_backend_additional_program_headers): Delete.
+ (elf_backend_modify_segment_map): Delete.
+ * elf64-hppa.c (elf64_hppa_modify_segment_map): Convert to ISO C.
+ * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
+ * doc/bfdint.texi: Delete SIZEOF_HEADERS difficulties.
+
+2006-06-19 Vladimir Prus <vladimir@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_swap_symbol_out): Don't set low
+ bit for undefined symbols.
+
+2006-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_backend_data): Add bfd_link_info pointer
+ parameter.
+ (_bfd_elf_sizeof_headers): Replace bfd_boolean param with
+ bfd_link_info pointer.
+ * targets.c (struct bfd_target <_bfd_sizeof_headers>): Likewise.
+ * bfd.c (bfd_sizeof_headers): Tweak param name.
+ * aout-adobe.c (aout_adobe_sizeof_headers): Adjust.
+ * aoutx.h (NAME (aout, sizeof_headers)): Adjust.
+ * binary.c (binary_sizeof_headers): Adjust.
+ * bout.c (b_out_sizeof_headers): Adjust.
+ * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust.
+ * coff64-rs6000.c (xcoff64_sizeof_headers): Adjust.
+ * coffgen.c (coff_sizeof_headers): Adjust.
+ * ecoff.c (_bfd_ecoff_sizeof_headers): Adjust.
+ (ecoff_compute_section_file_positions): Adjust.
+ (_bfd_ecoff_write_object_contents): Adjust.
+ * elf.c (get_program_header_size, _bfd_elf_sizeof_headers): Adjust.
+ * elf32-arm.c (elf32_arm_additional_program_headers): Adjust.
+ * elf32-i370.c (elf_backend_additional_program_headers): Adjust.
+ * elf32-ppc.c (ppc_elf_additional_program_headers): Adjust.
+ * elf64-hppa.c (elf64_hppa_additional_program_headers): Adjust.
+ * elf64-x86-64.c (elf64_x86_64_additional_program_headers): Adjust.
+ * elfxx-ia64.c (elfNN_ia64_additional_program_headers): Adjust.
+ * elfxx-mips.c (_bfd_mips_elf_additional_program_headers): Adjust.
+ * elfxx-mips.h (_bfd_mips_elf_additional_program_headers): Adjust.
+ * i386msdos.c: Convert to ISO C.
+ (msdos_sizeof_headers): Adjust.
+ * i386os9k.c: Convert to ISO C.
+ (os9k_sizeof_headers): Adjust.
+ * ieee.c (ieee_sizeof_headers): Adjust.
+ * ihex.c (ihex_sizeof_headers): Adjust.
+ * libaout.h (NAME (aout, sizeof_headers)): Adjust.
+ * libbfd-in.h (_bfd_nolink_sizeof_headers): Adjust.
+ * libcoff-in.h (coff_sizeof_headers): Adjust.
+ * libecoff.h (_bfd_ecoff_sizeof_headers): Adjust.
+ * mach-o.c (bfd_mach_o_sizeof_headers): Adjust.
+ * mmo.c (mmo_sizeof_headers): Adjust.
+ * oasys.c (oasys_sizeof_headers): Adjust.
+ * pdp11.c (NAME (aout, sizeof_headers)): Adjust.
+ * pef.c (bfd_pef_sizeof_headers): Adjust.
+ * ppcboot.c (ppcboot_sizeof_headers): Adjust.
+ * som.c (som_sizeof_headers): Adjust.
+ * srec.c (srec_sizeof_headers): Adjust.
+ * tekhex.c (tekhex_sizeof_headers): Adjust.
+ * versados.c (versados_sizeof_headers): Adjust.
+ * vms.c (vms_sizeof_headers): Adjust.
+ * xcoff-target.h (_bfd_xcoff_sizeof_headers): Adjust.
+ * xsym.c (bfd_sym_sizeof_headers): Adjust.
+ * xsym.h (bfd_sym_sizeof_headers): Adjust.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
+
+2006-06-15 Mark Shinwell <shinwell@codesourcery.com>
+
+ * bfd-in2.h: Regenerate.
+ * elf32-arm.c (R_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G0,
+ R_ARM_ALU_PC_G1_NC, R_ARM_ALU_PC_G1, R_ARM_ALU_PC_G2,
+ R_ARM_LDR_PC_G1, R_ARM_LDR_PC_G2, R_ARM_LDRS_PC_G0,
+ R_ARM_LDRS_PC_G1, R_ARM_LDRS_PC_G2, R_ARM_LDC_PC_G0,
+ R_ARM_LDC_PC_G1, R_ARM_LDC_PC_G2, R_ARM_ALU_SB_G0_NC,
+ R_ARM_ALU_SB_G0, R_ARM_ALU_SB_G1_NC, R_ARM_ALU_SB_G1,
+ R_ARM_ALU_SB_G2, R_ARM_LDR_SB_G0, R_ARM_LDR_SB_G1,
+ R_ARM_LDR_SB_G2, R_ARM_LDRS_SB_G0, R_ARM_LDRS_SB_G1,
+ R_ARM_LDRS_SB_G2, R_ARM_LDC_SB_G0, R_ARM_LDC_SB_G1,
+ R_ARM_LDC_SB_G2): New relocation types.
+ (R_ARM_PC13): Rename to AAELF name R_ARM_LDR_PC_G0 and
+ adjust HOWTO entry to be consistent with R_ARM_LDR_PC_G1
+ and friends.
+ (elf32_arm_howto_table_3): Delete; contents merged into
+ elf32_arm_howto_table_2.
+ (elf32_arm_howto_from_type): Adjust correspondingly.
+ (elf32_arm_reloc_map): Extend with the above relocations.
+ (calculate_group_reloc_mask): New function.
+ (identify_add_or_sub): New function.
+ (elf32_arm_final_link_relocate): Support for the above
+ relocations.
+ * reloc.c: Add enumeration entries for BFD_RELOC_ARM_...
+ codes to correspond to the above relocations.
+
+2006-06-14 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-m68k.c (elf_m68k_plt_info): New structure.
+ (elf_m68k_plt0_entry): Add R_68K_PC32-style in-place addends.
+ (elf_m68k_plt_entry): Likewise.
+ (elf_m68k_plt_info): New table.
+ (CFV4E_PLT_ENTRY_SIZE): Rename to...
+ (ISAB_PLT_ENTRY_SIZE): ...this.
+ (CFV4E_FLAG): Delete.
+ (elf_cfv4e_plt0_entry): Rename to...
+ (elf_isab_plt0_entry): ...this. Adjust comments. Use (-6,%pc,%d0)
+ for the second instruction too.
+ (elf_cfv4e_plt_entry): Rename to...
+ (elf_isab_plt_entry): ...this. Adjust comments and use (-6,%pc,%d0).
+ (elf_isab_plt_info): New table.
+ (CPU32_FLAG): Delete.
+ (PLT_CPU32_ENTRY_SIZE): Rename to...
+ (CPU32_PLT_ENTRY_SIZE): ...this.
+ (elf_cpu32_plt0_entry): Update bounds accordingly. Add R_68K_PC32-
+ style in-place addends.
+ (elf_cpu32_plt_entry): Likewise.
+ (elf_cpu32_plt_info): New table.
+ (elf_m68k_link_hash_table): Add a plt_info field.
+ (elf_m68k_link_hash_table_create): Initialize it.
+ (elf_m68k_get_plt_info): New function.
+ (elf_m68k_always_size_sections): Likewise.
+ (elf_m68k_adjust_dynamic_symbol): Use the plt_info hash table field.
+ (elf_m68k_install_pc32): New function.
+ (elf_m68k_finish_dynamic_symbol): Factor code using plt_info and
+ elf_m68k_install_pc32.
+ (elf_m68k_finish_dynamic_sections): Likewise.
+ (elf_m68k_plt_sym_val): Use elf_m68k_get_plt_info.
+ (elf_backend_always_size_sections): Define.
+
+2006-06-14 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_link_add_object_symbols): Save and restore
+ struct bfd_hash_table table, size and count fields for
+ as-needed libs.
+
+2006-06-12 Thiemo Seufer <ths@mips.com>
+
+ * elf32-mips.c: Expand comment about ABI-mandated pagesize values.
+ (ELF_MAXPAGESIZE, ELF_COMMONPAGESIZE): define in a more obvious way.
+ * elf64-mips.c, elfn32-mips.c (ELF_MAXPAGESIZE): Fix value for IRIX6.
+ Delete old comments.
+ (ELF_COMMONPAGESIZE): Define in a more obvious way.
+
+2006-06-12 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/2735
+ * elflink.c (elf_link_add_object_symbols): Fix the warning message
+ about mismatched alignments to allow for the case where the common
+ alignment has been deduced from the section alignment.
+ * bfd.c (_bfd_default_error_handler): Update comment to explain
+ why bfd and asection varargs are out of order. Explicitly catch
+ and abort on NULL bfd and asection arguments.
+
+2006-06-11 Richard Sandiford <richard@codesourcery.com>
+ Thiemo Seufer <ths@mips.com>
+
+ * elfxx-mips.c (mips_elf_link_hash_table): Add function_stub_size.
+ (STUB_ORI): New macro.
+ (STUB_LI16U): Fix formatting.
+ (MIPS_FUNCTION_STUB_SIZE): Delete.
+ (MIPS_FUNCTION_STUB_MAX_SIZE): Likewise.
+ (MIPS_FUNCTION_STUB_NORMAL_SIZE): New macro.
+ (MIPS_FUNCTION_STUB_BIG_SIZE): Likewise.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->function_stub_size
+ instead of MIPS_FUNCTION_STUB_SIZE.
+ (count_section_dynsyms): New function, split out from
+ _bfd_mips_elf_final_link.
+ (_bfd_mips_elf_always_size_sections): Get a worst-case estimate
+ of the number of dynamic symbols needed and use it to set up
+ function_stub_size. Use function_stub_size rather than
+ MIPS_FUNCTION_STUB_SIZE to determine the size of the stub section.
+ Use 16-byte stubs for 0x10000 dynamic symbols.
+ (_bfd_mips_elf_size_dynamic_sections): Use htab->function_stub_size
+ instead of MIPS_FUNCTION_STUB_SIZE. Fix formatting.
+ (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Change the
+ size of the stub buffer from MIPS_FUNCTION_STUB_MAX_SIZE to
+ MIPS_FUNCTION_STUB_BIG_SIZE. Tweak the check for unhandled dynindxes.
+ Use MIPS_FUNCTION_STUB_BIG_SIZE rather than a hard-coded 20.
+ Use STUB_ORI rather than STUB_LI16U for big stubs.
+ (_bfd_mips_elf_link_hash_table_create): Initialize function_stub_size.
+ (_bfd_mips_elf_final_link): Use count_section_dynsyms.
+
+2006-06-09 David Ung <davidu@mips.com>
+
+ * bfd/elfxx-mips.c (mips_elf_calculate_relocation): Fix mode for stub
+ calling relocations.
+
+2006-06-08 David Daney <ddaney@avtrex.com>
+
+ * elfxx-mips.c (STUB_LI16): Removed.
+ (STUB_LUI): New macro.
+ (STUB_LI16U): Ditto.
+ (STUB_LI16S): Ditto.
+ (MIPS_FUNCTION_STUB_SIZE): Rewrote to take info parameter.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Pass info parameter to
+ MIPS_FUNCTION_STUB_SIZE.
+ (_bfd_mips_elf_always_size_sections): Ditto.
+ (_bfd_mips_elf_size_dynamic_sections): Ditto.
+ (_bfd_mips_elf_finish_dynamic_sections): Ditto.
+ (_bfd_mips_elf_finish_dynamic_symbol): Rewrote stub generation
+ to allow larger symbol table indexes.
+
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+
+ * po/Make-in (pdf, ps): New dummy targets.
+
+2006-06-06 Alan Modra <amodra@bigpond.net.au>
+
+ * hash.c (bfd_hash_lookup): Correct stray line.
+
+ * elf.c (_bfd_elf_init_private_section_data): Comment typo.
+ (elfcore_grok_nto_status): Use long instead of pid_t.
+ (elfcore_grok_nto_regs, elfcore_grok_nto_note): Likewise.
+
+2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/Make-in (top_builddir): Define.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * config.in: Regenerate.
+
+2006-06-02 Alan Modra <amodra@bigpond.net.au>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2723
+ * elflink.c (bfd_elf_final_link): Don't output section symbols
+ for special ELF sections.
+
+2006-06-01 Alan Modra <amodra@bigpond.net.au>
+
+ * stabs.c (_bfd_link_section_stabs): Use bfd_make_section*_with_flags
+ instead of bfd_make_section*.
+ * aix386-core.c: Likewise.
+ * aix5ppc-core.c: Likewise.
+ * aout-adobe.c: Likewise.
+ * aoutf1.h: Likewise.
+ * binary.c: Likewise.
+ * cisco-core.c: Likewise.
+ * coff-arm.c: Likewise.
+ * coff-h8300.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-bfin.c: Likewise.
+ * elf32-m32c.c: Likewise.
+ * hppabsd-core.c: Likewise.
+ * hpux-core.c: Likewise.
+ * i386linux.c: Likewise.
+ * ieee.c: Likewise.
+ * ihex.c: Likewise.
+ * irix-core.c: Likewise.
+ * lynx-core.c: Likewise.
+ * m68klinux.c: Likewise.
+ * mach-o.c: Likewise.
+ * netbsd-core.c: Likewise.
+ * nlmcode.h: Likewise.
+ * opncls.c: Likewise.
+ * osf-core.c: Likewise.
+ * peXXigen.c: Likewise.
+ * ppcboot.c: Likewise.
+ * ptrace-core.c: Likewise.
+ * rs6000-core.c: Likewise.
+ * sco5-core.c: Likewise.
+ * sparclinux.c: Likewise.
+ * srec.c: Likewise.
+ * sunos.c: Likewise.
+ * trad-core.c: Likewise.
+ * xcofflink.c: Likewise.
+ * xsym.c: Likewise.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (INCLUDES): Use @INCINTL@.
+ * acinclude.m4: Include new gettext macros.
+ * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
+ Manually substitute POFILES and GMOFILES.
+ * Makefile.in, aclocal.m4, configure, doc/Makefile.in: Regenerated.
+
+2006-05-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfd.c (bfd_emul_get_maxpagesize): New.
+ (bfd_elf_set_pagesize): Likewise.
+ (bfd_emul_set_maxpagesize): Likewise.
+ (bfd_emul_get_commonpagesize): Likewise.
+ (bfd_emul_set_commonpagesize): Likewise.
+ * bfd-in2.h: Regenerated.
+
+ * elf-bfd.h (elf_backend_data): Add commonpagesize.
+ (xvec_get_elf_backend_data): New.
+ (get_elf_backend_data): Use xvec_get_elf_backend_data.
+
+ * elf32-arm.c (elf32_arm_vxworks_bed): Remove const.
+ * elfxx-target.h (elfNN_bed): Likewise.
+
+ * elf32-arm.c (ELF_COMMONPAGESIZE): Defined.
+ * elf32-mips.c (ELF_COMMONPAGESIZE): Likewise.
+ * elf32-ppc.c (ELF_COMMONPAGESIZE): Likewise.
+ * elf32-sh.c (ELF_COMMONPAGESIZE): Likewise.
+ * elf32-sh64.c (ELF_COMMONPAGESIZE): Likewise.
+ * elf32-sparc.c (ELF_COMMONPAGESIZE): Likewise.
+ * elf64-alpha.c (ELF_COMMONPAGESIZE): Likewise.
+ * elf64-ppc.c (ELF_COMMONPAGESIZE): Likewise.
+ * elf64-sparc.c (ELF_COMMONPAGESIZE): Likewise.
+ * elf64-x86-64.c (ELF_COMMONPAGESIZE): Likewise.
+ * elfn32-mips.c (ELF_COMMONPAGESIZE): Likewise.
+ * elfxx-ia64.c (ELF_COMMONPAGESIZE): Likewise.
+
+ * elfxx-target.h (ELF_COMMONPAGESIZE): Define if not defined.
+ (elfNN_bed): Initialize commonpagesize with ELF_COMMONPAGESIZE.
+
+ * targets.c (bfd_find_target): Support NULL abfd.
+
+2006-05-30 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2006-05-27 Alan Modra <amodra@bigpond.net.au>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (assign_file_positions_for_load_sections): Retrieve
+ maxpagesize from m->p_align if it is valid. Set p_vaddr,
+ p_paddr and p_align earlier. Revert 2006-05-19 change to p_align.
+ (copy_elf_program_header): Copy p_align. Set p_align_valid.
+
+2006-05-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-x86-64.c (ELF_MINPAGESIZE): Changed to 0x1000.
+
+2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-x86-64.c (ELF_MINPAGESIZE): Set to 0x100000.
+
+2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf64-x86-64.c (ELF_MAXPAGESIZE): Updated to 0x200000.
+
+2006-05-26 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (sym_is_global): Return a bfd_boolean.
+ (ignore_section_sym): New function.
+ (elf_map_symbols): Use ignore_section_sym to discard some syms.
+ (_bfd_elf_symbol_from_bfd_symbol): Ensure section belongs to
+ bfd before using elf_section_syms.
+
+2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.bfd: (sh-*-linux*): Treat as 64bit target.
+ (sh*l*-*-netbsdelf*): Likewise.
+ (sh-*-netbsdelf*): Likewise.
+ (shl*-*-elf*): Likewise.
+ (sh[1234]l*-*-elf*): Likewise.
+ (sh3el*-*-elf*): Likewise.
+ (shl*-*-kaos*): Likewise.
+ (sh-*-elf*): Likewise.
+ (sh[1234]*-elf*): Likewise.
+ (sh-*-rtems*): Likewise.
+ (sh-*-kaos*): Likewise.
+
+2006-05-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/1485
+ * config.bfd: Set want64 to true if 64bit bfd is used.
+ (sh-*-linux*): Use targ64_selvecs for 64bit targets.
+ (sh*l*-*-netbsdelf*): Likewise.
+ (sh-*-netbsdelf*): Likewise.
+ (shl*-*-elf*): Likewise.
+ (sh[1234]l*-*-elf*): Likewise.
+ (sh3el*-*-elf*): Likewise.
+ (shl*-*-kaos*): Likewise.
+ (sh-*-elf*): Likewise.
+ (sh[1234]*-elf*): Likewise.
+ (sh-*-rtems*): Likewise.
+ (sh-*-kaos*): Likewise.
+
+2006-05-24 Paul Brook <paul@codesourcery.com>
+
+ * elf-bfd.h (elf_backend_data): Add elf_backend_output_arch_local_syms
+ * elf32-arm.c (output_arch_syminfo): Define.
+ (elf32_arm_ouput_plt_map_sym, elf32_arm_output_plt_map,
+ elf32_arm_output_arch_local_syms): New functions.
+ (elf_backend_output_arch_local_syms): Define.
+ * elflink.c (bfd_elf_final_link): Call
+ elf_backend_output_arch_local_syms.
+ * elfxx-target.h (elf_backend_output_arch_local_syms): Provide default
+ definition.
+ (elfNN_bed): Add elf_backend_output_arch_local_syms.
+
+2006-05-24 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (put_arm_insn, put_thumb_insn): New functions.
+ (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
+ elf32_arm_finish_dynamic_symbol): Use them.
+
+2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
+ Randolph Chung <tausq@debian.org>
+
+ * elf-hppa.h (reloc_hppa_howto_table): Check bitfield for
+ TPREL21L/TPREL14R relocations. Handle LTOFF_TP14R relocations.
+ Add handling for TLS relocations.
+ (elf_hpp_reloc_final_type): Handle TLS relocs.
+ * elf32-hppa.c: Add authors for cleanup and TLS support.
+ (hppa_elf_local_got_tls_type, hh_name, eh_name): Define.
+ (elf32_hppa_link_hash_entry): Add tls_type.
+ (elf32_hppa_link_hash_table): Add tld_ldm_got.
+ (hppa_link_has_newfunc): Set tls_type.
+ (elf32_hppa_link_hash_table_create): Set tls_ldm_got refcount.
+ (hppa_stub_name): Use hh_name macro.
+ (elf32_hppa_copy_indirect_symbol): Copy TLS information.
+ (elf32_hppa_check_relocs): Call elf32_hppa_optimized_tls_reloc.
+ Handle TLS relocs.
+ (elf32_hppa_gc_sweep_hook): Likewise.
+ (allocate_dynrelocs): Handle TLS relocs.
+ (elf32_hppa_size_dynamic_sections): Count space required by TLS
+ relocs. Use hh_name macro.
+ (dtpoff_base): New function.
+ (tpoff): Likewise.
+ (elf32_hppa_optimized_tls_reloc): Likewise.
+ (final_link_relocate): Handle TLS relocs.
+ (elf32_hppa_relocate_section): Handle TLS relocs. Use eh_name
+ and hh_name macros.
+ (elf32_hppa_finish_dynamic_symbol): Setup TLS got entries. Use
+ hh_name and eh_name macros.
+ (elf32_hppa_reloc_type_clas): Handle TLS relocs.
+
+2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * archures.c: Add bfd_mach_avr6.
+ * cpu-avr.c: Likewise.
+ * reloc.c (BFD_RELOC_AVR_LO8_LDI_GS, BFD_RELOC_AVR_HI8_LDI_GS):
+ New relocations.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h:Regenerate.
+ * elf32-avr.h: New file. Protoypes for functions accessed from ld.
+ * elf32-avr.c: Add elf32-avr.h to include list.
+ (elf32_avr_stub_hash_entry): New function.
+ (elf32_avr_link_hash_table): New struct.
+ (avr_link_hash_table): Likewise.
+ (avr_stub_hash_entry): Likewise.
+ (avr_stub_hash_lookup): New function.
+ (stub_hash_newfunc): New function.
+ (elf32_avr_link_hash_table_create): New function.
+ (elf32_avr_link_hash_table_free): New function.
+ (avr_get_stub_addr): New function.
+ (debug_relax, debug_stubs): Add new global variables controlling
+ debugging printout to stdout.
+ (avr_pc_wrap_around): Change the type to bfd_vma.
+ (avr_replace_call_ret_sequences): Add a new variable controling
+ linkrelax optimizations.
+ (avr_stub_is_required_for_16_bit_reloc): New function.
+ (avr_final_link_relocate):
+ Add linker hash table to parameter list. Use stub addr. if necessary.
+ (elf32_avr_relocate_section):
+ Add linker hashtable to parameter list of avr_final_link_relocate.
+ (bfd_elf_avr_final_write_processing): Add support for bfd_mach_avr6.
+ (elf32_avr_object_p): Add support for E_AVR_MACH_AVR6.
+ (elf32_avr_relax_delete_bytes):
+ Iterate over all sections of a bfd when adjusting relocs addends.
+ (elf32_avr_relax_section):
+ Evaluate avr_replace_call_ret_sequences and recalculate the size of
+ stub section.
+ (avr_stub_name): New function.
+ (avr_get_stub_entry): New function.
+ (avr_add_stub): New function.
+ (avr_build_one_stub): New function.
+ (avr_size_one_stub): New function.
+ (elf32_avr_setup_params): New function.
+ (elf32_avr_setup_section_lists): New function.
+ (get_local_syms): New function.
+ (elf32_avr_size_stubs): New function.
+ (bfd_elf32_bfd_link_hash_table_create): New function.
+ (bfd_elf32_bfd_link_hash_table_free): New function.
+
+2006-05-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2655
+ PR ld/2657
+ * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Properly
+ update CIE/FDE length. Don't pad to the section alignment.
+
+2006-05-23 Jie Zhang <jie.zhang@analog.com>
+
+ * elf32-bfin.c (bfinfdpic_relocate_section): Clear reloc for
+ deteted entries in .eh_frame section.
+
+2006-05-23 Jie Zhang <jie.zhang@analog.com>
+
+ * elf32-bfin.c (bfin_check_relocs): Use __GLOBAL_OFFSET_TABLE_
+ instead of _GLOBAL_OFFSET_TABLE_.
+ (bfin_relocate_section): Ditto.
+ (_bfin_create_got_section): Ditto.
+ (elf32_bfinfdpic_create_dynamic_sections): Use
+ __PROCEDURE_LINKAGE_TABLE_ instead of _PROCEDURE_LINKAGE_TABLE_.
+ (bfin_finish_dynamic_symbol): Use __DYNAMIC instead of _DYNAMIC.
+
+2006-05-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (compare_symbols): Prefer strong dynamic global
+ function syms over other syms.
+
+2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * elflink.c (_bfd_elf_add_dynamic_entry): Remove DT_TEXTREL
+ check.
+ (bfd_elf_final_link): Add a late DT_TEXTREL check.
+ * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): Define.
+ (mips_elf_create_dynamic_relocation): Set DF_TEXTREL.
+ (_bfd_mips_elf_check_relocs): Delete MIPS_READONLY_SECTION.
+ Use MIPS_ELF_READONLY_SECTION.
+ (_bfd_mips_elf_size_dynamic_sections): Clear DF_TEXTREL after
+ creating DT_TEXTREL.
+ (_bfd_mips_elf_finish_dynamic_sections): Clear textrel markers
+ if no text relocations were generated.
+
+2006-05-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (ELF_MAXPAGESIZE): Fix a typo in comment.
+
+2006-05-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (elf_fake_sections): Formatting.
+ (assign_file_positions_for_load_sections): Only add SEC_ALLOC
+ sections to p_memsz. Remove hack for PT_NOTE sections. Allow
+ section alignment to increase p_align for PT_LOAD.
+ (assign_file_positions_for_non_load_sections): Remove ARM BPABI
+ hack for PT_DYNAMIC. Instead, set p_filesz for all segments
+ other than PT_LOAD, and PT_NOTE in core.
+
+2006-05-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (assign_file_positions_for_segments): Split into..
+ (assign_file_positions_for_load_sections): ..this, and..
+ (assign_file_positions_for_non_load_sections): ..this new function,..
+ (assign_file_positions_except_relocs): ..writing program headers here.
+
+2006-05-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (elf_gc_sweep): Don't specially keep non-alloc,
+ non-load sections if they have relocs.
+
+2006-05-15 Paul Brook <paul@codesourcery.com>
+
+ * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename ...
+ (bfd_is_arm_special_symbol_name): ... to this. Add type argument.
+ Check symbol name is of specified type.
+ * elf32-arm.c (elf32_arm_is_target_special_symbol,
+ arm_elf_find_function, elf32_arm_output_symbol_hook): Use
+ bfd_is_arm_special_symbol_name.
+ * bfd-in.h (BFD_ARM_SPECIAL_SYM_TYPE_MAP,
+ BFD_ARM_SPECIAL_SYM_TYPE_TAG, BFD_ARM_SPECIAL_SYM_TYPE_OTHER,
+ BFD_ARM_SPECIAL_SYM_TYPE_ANY): Define.
+ (bfd_is_arm_mapping_symbol_name): Remove prototype.
+ (bfd_is_arm_special_symbol_name): Add prototype.
+ * bfd-in2.h: Regenerate.
+
+2006-05-15 David Heine <dlheine@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (check_loop_aligned): Fix reversed check for
+ undefined opcode. Clean up assertions.
+ (narrow_instruction, widen_instruction): Remove "do_it" parameters.
+ Factor most of the code into separate functions....
+ (can_narrow_instruction, can_widen_instruction): New.
+ (prev_instr_is_a_loop): New.
+ (compute_ebb_proposed_actions): Combine error handling code for
+ decode errors. Replace call to insn_decode_len with inline code.
+ Use can_narrow_instruction and can_widen_instruction. Handle errors
+ from call to xtensa_opcode_is_loop.
+ (relax_section): Adjust calls to narrow_instruction and
+ widen_instruction.
+
+2006-05-15 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2658
+ * elf32-ppc.c (ppc_elf_relax_section): Don't segfault on non-pic
+ -shared link.
+
+2006-05-11 Michael Matz <matz@suse.de>
+
+ * elflink.c (match_group_member): Correctly iterate group
+ members.
+
+2006-05-11 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_reloc_map): Add MOVW and MOVT relocs.
+ (elf32_arm_final_link_relocate): Handle MOVW and MOVT relocs.
+ (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
+ * reloc.c: Ditto.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
+
+2006-05-11 Mike Bland <mbland@google.com>
+
+ * elf.c (_bfd_elf_init_private_section_data): Don't change
+ section type if already set.
+
+2006-05-10 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2607
+ * elfcode.h (valid_section_index_p): New function: Checks for a
+ valid section index. Allows indicies in the range SHN_LOPROC to
+ SHN_HIOS.
+ (elf_object_p): Use valid_section_index_p.
+
+2006-05-11 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * coff-arm.c (ARM_26D, ARM_32, ARM_RVA_32, ARM_SECTION,
+ ARM_SECREL): Mark WinCE versions of these relocs as partial
+ inplace.
+ (coff_arm_relocate_section): Adjust addend for WinCE.
+
+2006-05-10 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2342
+ * elflink.c (_bfd_elf_default_action_discarded): Revert 2006-02-16.
+
+2006-05-09 Nick Clifton <nickc@redhat.com>
+
+ * coffcode.h (coff_write_relocs): Produce an error message if a an
+ out-of-range symbol index is detected in a reloc.
+
+2006-05-09 Ben Elliston <bje@au.ibm.com>
+
+ * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Remove unused
+ local variable `dynobj'.
+
+2006-05-05 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * elf32-avr.c (elf32_avr_relax_delete_bytes): Iterate over all
+ of the bfd's sections for the reloc-addend adjustments.
+
+2006-05-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * elf32-s390.c (invalid_tls_insn): Call bfd_set_error.
+ (elf_s390_relocate_section): Add code to do the GD->LE and
+ LD->LE TLS linker optimizations if a brasl instruction is used
+ for the __tls_get_offset function call.
+ * elf64-s390.c (invalid_tls_insn): Call bfd_set_error.
+
+2006-05-05 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_tls_optimize): Only optimize
+ R_PPC64_TPREL64 and R_PPC64_DTPMOD64 relocs when they are in
+ the .toc and referenced by a TLS code sequence.
+ (ppc64_elf_edit_toc): Cater for the unlikely situation that
+ .toc is the first section in a file.
+
+2006-05-04 Andreas Schwab <schwab@suse.de>
+
+ * aoutf1.h (struct external_sparc_core): Declare c_regs as struct
+ regs instead of an array of int.
+ (struct external_solaris_bcp_core): Likewise.
+ (swapcore_sun3): Use offsetof instead of computing the offset
+ manually.
+ (swapcore_sparc): Likewise. Simplify reference to c_regs.
+ (swapcore_solaris_bcp): Likewise.
+
+2006-05-04 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Adjust handling
+ for missing GOTs.
+
+2006-05-04 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Accept more
+ mapping symbols.
+
+2006-05-04 Ben Elliston <bje@au.ibm.com>
+
+ * coff-or32.c (bfd_section_from_shdr): Remove unused local
+ variable `ptr'.
+ * cofflink.c (process_embedded_commands): Remove unused local
+ variables `had_read' and `had_shared'.
+ * ecofflink.c (bfd_ecoff_debug_accumulate): Remove unused local
+ variable `fdr_adr'.
+ * ihex.c (ihex_read_section): Remove unused local variable `addr'.
+
+2006-05-03 Alan Modra <amodra@bigpond.net.au>
+
+ * libbfd-in.h (_bfd_generic_new_section_hook): Declare.
+ * section.c (bfd_abs_symbol, bfd_com_symbol): Delete.
+ (bfd_und_symbol, bfd_ind_symbol): Delete.
+ (BFD_FAKE_SECTION): Remove SYM_PTR param, set symbol_ptr_ptr to
+ &SEC.symbol.
+ (STD_SECTION): Adjust.
+ (_bfd_generic_new_section_hook): New function, extracted from..
+ (bfd_section_init): ..here.
+ (bfd_make_section_old_way): Call new_section_hook for abs, com,
+ und and ind sections.
+ * elf.c (_bfd_elf_large_com_section): Adjust.
+ * aoutx.h (new_section_hook): Call _bfd_generic_new_section_hook.
+ * pdp11.c (new_section_hook): Likewise.
+ * coffcode.h (coff_new_section_hook): Likewise.
+ * ecoff.c (_bfd_ecoff_new_section_hook): Likewise.
+ * elf.c (_bfd_elf_new_section_hook): Likewise.
+ * vms.c (vms_new_section_hook): Likwise.
+ * elf32-arm.c (elf32_arm_new_section_hook): Check used_by_bfd isn't
+ already set.
+ * elf32-sh64.c (sh64_elf_new_section_hook): Likewise.
+ * elf32-xtensa.c (elf_xtensa_new_section_hook): Likewise.
+ * elf64-mmix.c (mmix_elf_new_section_hook): Likewise.
+ * elf64-ppc.c (ppc64_elf_new_section_hook): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_new_section_hook): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_new_section_hook): Likewise.
+ * ieee.c (ieee_new_section_hook): Likewise. Call
+ _bfd_generic_new_section_hook too.
+ * mmo.c (mmo_new_section_hook): Likewise.
+ * oasys.c (oasys_new_section_hook): Likewise.
+ * som.c (som_new_section_hook): Likewise.
+ * coff-w65.c (reloc_processing): Don't use bfd_abs_symbol.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2006-05-03 Alan Modra <amodra@bigpond.net.au>
+
+ * hash.c (DEFAULT_SIZE): Revert last change.
+ (higher_prime_number): Correct test for no larger prime. Don't
+ abort on error, instead return 0. Depopulate primes[].
+ (bfd_hash_lookup): If we overflow size, refuse to grow table.
+
+2006-05-02 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_final_link_relocate): Set thumb funciton bit
+ for R_ARM_REL32.
+
+2006-05-02 Ben Elliston <bje@au.ibm.com>
+
+ * archive.c (bfd_generic_archive_p): Remove unused local variable
+ `fail'.
+ * dwarf2.c (decode_line_info): Remove unused local variable
+ `basic_block'.
+ * elfcode.h (elf_slurp_reloc_table_from_section): Remove unused
+ local variable `s'.
+ * tekhex.c (tekhex_write_object_contents): Remove unused local
+ variable `bytes_written'.
+ * aout-ns32k.c (MY_swap_std_reloc_out): Remove unused local
+ variable `r_addend'.
+ * elf32-dlx.c (dlx_rtype_to_howto): Remove breaks after returns.
+ * elfxx-mips.c (_bfd_elf_mips_mach): Remove breaks after returns.
+ (_bfd_ns32k_relocate_contents): Remove break after return.
+ * elf.c (bfd_section_from_shdr): Remove breaks after returns.
+
+2006-05-02 Nick Clifton <nickc@redhat.com>
+
+ * elf32-sh-symbian.c: Rename local define DEBUG to SYMBIAN_DEBUG
+ in order to avoid conflicts with the global DEBUG define.
+
+2006-05-02 Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf2.c: Formatting.
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Simplify
+ output section check.
+ * elf32-i370.c: Warning fixes inside #ifdef DEBUG.
+ * elf32-m32c.c: Similarly.
+ * elf32-ppc.c: Similarly.
+ * elf32-v850.c: Similarly.
+ * nlm32-sparc.c: Similarly.
+ * elfcode.h: Similarly.
+ (elf_symbol_flags): Delete.
+ * elflink.c (elf_link_input_bfd): Comment typo.
+
+2006-05-01 DJ Delorie <dj@redhat.com>
+
+ * bfd-in.h (bfd_hash_table): Add count field.
+ * bfd-in2.h: Regenerate.
+ * hash.c (higher_prime_number): New.
+ (bfd_hash_table_inint_n): Init count field.
+ (bfd_hash_lookup): Grow table as needed.
+
+2006-04-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ PR binutils/2584
+ * tekhex.c (getvalue): Change return type to bfd_boolean and
+ add the new parameter. Return false if the unexpected character
+ is found.
+ (getsym): Likewise.
+ (first_phase): Change return type to bfd_boolean and return
+ false if the unexpected character is found. Replace abort
+ with returning false.
+ (pass_over): Change return type to bfd_boolean and the type of
+ the second argument to bfd_boolean (*) (bfd *, int, char *).
+ Return false if FUNC returns false.
+ (tekhex_object_p): Return NULL if pass_over fails.
+
+2006-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ * coff-rs6000.c (xcoff_write_archive_contents_old): Warning fix.
+
+2006-04-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2593
+ * elf.c (_bfd_elf_new_section_hook): Don't set section ELF type
+ and flags if its BFD flags have been set.
+ (_bfd_elf_init_private_section_data): Don't copy the output ELF
+ section type from input if it has been set to something
+ different.
+
+2006-04-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2467
+ * elf.c (_bfd_elf_close_and_cleanup): Check elf_tdata (abfd)
+ is NULL first.
+
+ * elf32-arm.c (elf32_arm_close_and_cleanup): Check if
+ abfd->sections is NULL.
+ (elf32_arm_bfd_free_cached_info): New.
+ (bfd_elf32_bfd_free_cached_info): Defined.
+
+ * elfxx-target.h (bfd_elfNN_bfd_free_cached_info): Default it
+ to _bfd_free_cached_info.
+
+ * libbfd-in.h (_bfd_free_cached_info): New.
+ * libbfd: Regenerated.
+
+ * opncls.c (_bfd_delete_bfd): Check if abfd->memory is NULL.
+ (_bfd_free_cached_info): New.
+
+2006-04-21 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (assign_file_positions_except_relocs): Move code setting
+ file position of non-loaded sections..
+ (assign_file_positions_for_segments): ..to here.
+
+2006-04-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2537
+ * elf.c (bfd_section_from_shdr): Allow sections reserved for
+ applications. Issue an error on sections we don't know how
+ to handle.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * warning.m4 (--enable-werror): Format help message.
+ (--enable-build-warnings): Likewise.
+ * configure: Regenerate.
+
+2006-04-18 Nick Clifton <nickc@redhat.com>
+
+ PR 2257
+ * elfcode.h (elf_object_p): Allow files with corrupt e_shstrndx
+ fields to still be handled as ELF files.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/SRC-POTFILES.in: Regenerated.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Update version to 2.17.50.
+ * configure: Regenerated.
+
+2006-04-14 David Heine <dlheine@tensilica.com>
+
+ * elf32-xtensa.c (build_reloc_opcodes): New.
+ (compute_text_actions): Use it to decode opcodes outside inner loop.
+ (check_section_ebb_pcrels_fit): Add "reloc_opcodes" argument, and if
+ it is set, use it to get the opcodes for relocations.
+ (move_shared_literal): Adjust call to check_section_ebb_pcrels_fit.
+
+2006-04-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2513
+ * elf32-i386.c (GOT_TLS_MASK): New macro for tls_type.
+ (GOT_TLS_IE_IE): Likewise.
+ (GOT_TLS_IE_GD): Likewise.
+ (GOT_TLS_IE_MASK): Likewise.
+ (elf_i386_check_relocs): For global symbols, set GOT_TLS_IE_GD
+ and GOT_TLS_IE_IE for R_386_TLS_GD and R_386_TLS_IE
+ respectively.
+ (allocate_dynrelocs): If both GOT_TLS_IE_IE and GOT_TLS_IE_GD
+ are set, treat tls_type as GOT_TLS_IE_BOTH.
+ (elf_i386_relocate_section): Likewise.
+
+2006-04-07 Randolph Chung <tausq@debian.org>
+
+ * elf64-hppa.c (elf64_hppa_grok_prstatus): New function.
+ (elf64_hppa_grok_psinfo): Likewise.
+ (elf_backend_grok_pstatus, elf_backend_grok_psinfo): Define.
+
+2006-04-06 DJ Delorie <dj@redhat.com>
+
+ * elf32-m32c.c (m32c_elf_relocate_section): Generate a symbol for
+ each plt entry we create.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * po/Make-in: Add install-html target.
+ * Makefile.am: Rename docdir to bfddocdir. Add datarootdir, docdir
+ htmldir. Add install-html and install-html-recursive targets.
+ * Makefile.in: Regenerate.
+ * configure.in: AC_SUBST for datarootdir, docdir and htmldir.
+ * configure: Regenerate.
+
+2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Skip unneeded passes
+ with the skip_relax_pass_0 and skip_relax_pass_1 bits in the
+ section structure.
+
+2006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * elf32-bfin.c (bfinfdpic_relocs_info_hash): Sprinkle casts to
+ eliminate warnings.
+
+2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
+ James E Wilson <wilson@specifixinc.com>
+
+ PR ld/2442
+ * elfxx-ia64.c (elfNN_ia64_dyn_sym_info): Remove next.
+ (elfNN_ia64_local_hash_entry): Add count, sorted_count and
+ size.
+ (elfNN_ia64_link_hash_entry): Likewise.
+ (elfNN_ia64_new_elf_hash_entry): Initialize count, sorted_count
+ and size.
+ (elfNN_ia64_hash_copy_indirect): Updated elfNN_ia64_dyn_sym_info
+ processing.
+ (elfNN_ia64_hash_hide_symbol): Likewise.
+ (elfNN_ia64_global_dyn_sym_thunk): Likewise.
+ (elfNN_ia64_local_dyn_sym_thunk): Likewise.
+ (elfNN_ia64_global_dyn_info_free): New function.
+ (elfNN_ia64_local_dyn_info_free): Likewise.
+ (elfNN_ia64_hash_table_free): Free local and global
+ elfNN_ia64_dyn_sym_info.
+ (addend_compare): New function.
+ (sort_dyn_sym_info): Likewise.
+ (get_dyn_sym_info): Updated to use binary search for addend.
+ (elfNN_ia64_check_relocs): Scan relocations to create dynamic
+ relocation arrays first.
+
+2006-04-05 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * elf32-bfin.c (_bfin_create_got_section): Don't generate a _gp
+ symbol.
+
+2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2411
+ * elflink.c (check_dynsym): New.
+ (elf_link_output_extsym): Use it.
+ (bfd_elf_final_link): Likewise.
+
+2006-04-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2404
+ * elflink.c (_bfd_elf_merge_symbol): Skip the default indirect
+ symbol from the dynamic definition with the default version if
+ its type and the type of existing regular definition mismatch.
+
+2006-04-05 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config.bfd (sparc-*-vxworks*): New stanza.
+ * configure.in (bfd_elf32_sparc_vxworks_vec): New stanza.
+ (bfd_elf32_sparc_vec, bfd_elf64_sparc_vec): Add elf-vxworks.lo.
+ * configure: Regenerate.
+ * elf32-sparc.c: Include elf-vxworks.h.
+ (elf32_sparc_vxworks_link_hash_table_create: New.
+ (elf32_sparc_vxworks_final_write_processing): New.
+ (TARGET_BIG_SYM): Override for VxWorks.
+ (TARGET_BIG_NAME, ELF_MINPAGESIZE): Likewise.
+ (bfd_elf32_bfd_link_hash_table_create): Likewise.
+ (elf_backend_want_got_plt, elf_backend_plt_readonly): Likewise.
+ (elf_backend_got_header_size, elf_backend_add_symbol_hook): Likewise.
+ (elf_backend_link_output_symbol_hook): Likewise.
+ (elf_backend_emit_relocs): Likewise.
+ (elf_backend_final_write_processing, elf32_bed): Likewise.
+ * elfxx-sparc.c: Include libiberty.h and elf-vxworks.h.
+ (sparc_vxworks_exec_plt0_entry, sparc_vxworks_exec_plt_entry): New.
+ (sparc_vxworks_shared_plt0_entry, sparc_vxworks_shared_plt_entry): New.
+ (_bfd_sparc_elf_link_hash_table_create): Don't initialize
+ build_plt_entry here.
+ (create_got_section): Initialize sgotplt for VxWorks.
+ (_bfd_sparc_elf_create_dynamic_sections): Initialize build_plt_entry,
+ plt_header_size and plt_entry_size, with new VxWorks-specific settings.
+ Call elf_vxworks_create_dynamic_sections for VxWorks.
+ (allocate_dynrelocs): Use plt_header_size and plt_entry_size.
+ Allocate room for .got.plt and .rela.plt.unloaded entries on VxWorks.
+ (_bfd_sparc_elf_size_dynamic_sections): Don't allocate a nop in .plt
+ for VxWorks. Check for the .got.plt section.
+ (sparc_vxworks_build_plt_entry): New function.
+ (_bfd_sparc_elf_finish_dynamic_symbol): Add handling of VxWorks PLTs.
+ Don't make _GLOBAL_OFFSET_TABLE_ and _PROCEDURE_LINKAGE_TABLE_
+ absolute on VxWorks.
+ (sparc32_finish_dyn): Add special handling for DT_RELASZ
+ and DT_PLTGOT on VxWorks.
+ (sparc_vxworks_finish_exec_plt): New.
+ (sparc_vxworks_finish_shared_plt): New.
+ (_bfd_sparc_elf_finish_dynamic_sections): Call them.
+ Use plt_header_size and plt_entry_size.
+ * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add is_vxworks,
+ srelplt2, sgotplt, plt_header_size and plt_entry_size fields.
+ * Makefile.am (elfxx-sparc.lo): Depend on elf-vxworks.h.
+ (elf32-sparc.lo): Likewise.
+ * Makefile.in: Regenerate.
+ * targets.c (bfd_elf32_sparc_vxworks_vec): Declare.
+ (_bfd_target_vector): Add a pointer to it.
+
+2006-03-30 Ben Elliston <bje@au.ibm.com>
+
+ PR ld/2267
+ * elflink.c (elf_fixup_link_order): Ensure `elfsec' is not a
+ special section number that exceeds the number of ELF sections
+ (eg. SHN_MIPS_SCOMMON).
+
+2006-03-27 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (mips_got_entry): Add more commentary.
+ (mips_elf_local_got_index): Use the hash table entry to record
+ the GOT index of forced-local symbols.
+ (mips_elf_initialize_tls_index): Rearrange code. Store the index
+ in either the hash table entry or the mips_got_entry, not both.
+ Add more commentary.
+ (mips_elf_multi_got): Make sure the g->next is nonnull when calling
+ mips_elf_initialize_tls_index.
+
+2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * elf32-bfin.c (bfd_const_reloc, bfd_oper_reloc, bfin_push_reloc,
+ RELOC_STACK_SIZE, reloc_stack, reloc_stack_tos, is_reloc_stack_empty,
+ reloc_stack_push, reloc_stack_pop, reloc_stack_operate,
+ bfin_areloc_howto_table): Delete. All
+ uses deleted as well.
+ (bfin_reloc_map): Delete all stack relocs.
+ (bfin_info_to_howto, bfin_bfd_reloc_type_lookup,
+ bfin_reloc_type_lookup): Don't support them.
+ (bfin_relocate_section): Don't try to handle them.
+
+ * config.bfd (bfin-*-*): Add bfd_elf32_bfinfdpic_vec.
+ * configure.in: Likewise.
+ * configure: Regenerate.
+ * elf32-bfin.c: Include "elf/dwarf2.h" and "hashtab.h".
+ (BFIN_RELOC_MAX): Now 0x21.
+ (bfin_howto_table, bfin_reloc_map): Add FD-PIC relocs.
+ (bfd_elf32_bfinfdpic_vec): Declare.
+ (IS_FDPIC): New macro.
+ (struct bfinfdpic_elf_link_hash_table): New struct.
+ (bfinfdpic_hash_table, bfinfdpic_got_section,
+ bfinfdpic_gotrel_section, bfinfdpic_gotfixup_section,
+ bfinfdpic_plt_setion, bfinfdpic_pltrel_section,
+ bfinfdpic_relocs_info, bfinfdpic_got_initial_offset,
+ bfinfdpic_plt_initial_offset): Accessor macros for it.
+ (BFINFDPIC_SYM_LOCAL, BFINFDPIC_FUNCDESC_LOCAL): New macros.
+ (struct bfinfdpic_relocs_info): New struct.
+ (LZPLT_RESOLVER_EXTRA, LZPLT_NORMAL_SIZE, LZPLT_ENTRIES,
+ BFINFDPIC_LZPLT_BLOCK_SIZE, BFINFDPIC_LZPLT_RESOLV_LOC,
+ DEFAULT_STACK_SIZE): New macros.
+ (bfinfdpic_elf_link_hash_table_create, bfinfdpic_relocs_info_hash,
+ bfinfdpic_relocs_info_eq, bfinfdpics_relocs_info_find,
+ bfinfdpic_relocs_info_for_global, bfinfdpic_relocs_info_for_local,
+ bfinfdpic_pic_merge_early_relocs_info, _bfinfdpic_add_dyn_reloc,
+ _bfinfdpic_add_rofixup, _bfinfdpic_osec_to_segment,
+ _bfinfdpic_osec_readonly_p, bfinfdpic_relocate_section,
+ bfinfdpic_check_relocs, bfinfdpic_gc_sweep_hook,
+ _bfinfdpic_link_omit_section_dynsym, _bfin_create_got_section,
+ elf32_bfinfdpic_create_dynamic_sections, _bfinfdpic_get_fd_entry,
+ _bfinfdpic_compute_got_alloc_data, _bfinfdpic_get_got_entry,
+ _bfinfdpic_assign_got_entries, _bfinfdpic_assign_plt_entries,
+ _bfinfdpic_resolve_final_relocs_info,
+ elf32_bfinfdpic_size_dynamic_sections,
+ elf32_bfinfdpic_always_size_sections,
+ elf32_bfinfdpic_modify_segment_map,
+ _bfinfdpic_count_got_plt_entries,
+ elf32_bfinfdpic_finish_dynamic_sections,
+ elf32_bfinfdpic_adjust_dynamic_symbol,
+ elf32_bfinfdpic_finish_dynamic_symbol,
+ elf32_bfinfdpic_elf_use_relative_eh_frame,
+ elf32_bfinfdpic_elf_encode_eh_address,
+ elf32_bfin_object_p, bfin_elf_copy_private_bfd_data,
+ elf32_bfinfdpic_copy_private_bfd_data,
+ (struct _bfinfdpic_dynamic_got_info,
+ struct _bfinfdpic_dynamic_got_plt_info): New structs.
+ (elf32_bfin_print_private_bfd_data): Print PIC flags.
+ (elf32_bfin_merge_private_bfd_data): Extend to support FD-PIC.
+ (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, elf32_bed,
+ elf_backend_got_header_size, bfd_elf32_bfd_link_hash_table_create,
+ elf_backend_always_size_sectinos, elf_backend_modify_segment_map,
+ bfd_elf32_bfd_copy_private_bfd_data,
+ elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
+ elf_backend_size_dynamic_sections, elf_backend_finish_dynamic_symbol,
+ elf_backend_finish_dynamic_sections, elf_backend_relocate_section,
+ elf_backend_can_make_relative_eh_frame, elf_backend_check_relocs,
+ elf_backend_can_make_ldsa_relative_eh_frame, elf_backend_may_use_rel_p,
+ elf_backend_may_use_rela_p, elf_backend_default_use_rela_p,
+ elf_backend_omit_section_dynsym): Redefine these macros and include
+ "elf32-target.h" again to create the elf32-bfinfdpic target.
+ * reloc.c (BFD_RELOC_BFIN_GOT17M4, BFD_RELOC_BFIN_GOTHI,
+ BFD_RELOC_BFIN_GOTLO, BFD_RELOC_BFIN_FUNCDESC,
+ BFD_RELOC_BFIN_FUNCDESC_GOT17M4, BFD_RELOC_BFIN_FUNCDESC_GOTHI,
+ BFD_RELOC_BFIN_FUNCDESC_GOTLO, BFD_RELOC_BFIN_FUNCDESC_VALUE,
+ BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4, BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI,
+ BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO, BFD_RELOC_BFIN_GOTOFFHI,
+ BFD_RELOC_BFIN_GOTOFFLO): New.
+ * targets.c (bfd_elf32_bfinfdpic_vec): New bfd_target.
+ (_bfd_target_vector): Add it.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2006-03-25 Richard Sandiford <richard@codesourcery.com>
+
+ * cpu-m68k.c (bfd_m68k_compatible): Treat ISA A+ and ISA B code as
+ incompatible. Likewise MAC and EMAC code.
+ * elf32-m68k.c (elf32_m68k_merge_private_bfd_data): Use
+ bfd_get_compatible to set the new bfd architecture. Rely on it
+ to detect incompatibilities.
+
+2006-03-23 Michael Matz <matz@suse.de>
+
+ * reloc.c: Add BFD_RELOC_X86_64_GOT64, BFD_RELOC_X86_64_GOTPCREL64,
+ BFD_RELOC_X86_64_GOTPC64, BFD_RELOC_X86_64_GOTPLT64,
+ BFD_RELOC_X86_64_PLTOFF64.
+ * bfd-in2.h: Regenerated.
+ * libbfd.h: Regenerated.
+ * elf64-x86-64.c (x86_64_elf_howto_table): Correct comment.
+ Add howtos for above relocs.
+ (x86_64_reloc_map): Add mappings for new relocs.
+ (elf64_x86_64_check_relocs): R_X86_64_GOT64, R_X86_64_GOTPCREL64,
+ R_X86_64_GOTPLT64 need a got entry. R_X86_64_GOTPLT64 also a PLT
+ entry. R_X86_64_GOTPC64 needs a .got section. R_X86_64_PLTOFF64
+ needs a PLT entry.
+ (elf64_x86_64_gc_sweep_hook): Reflect changes from
+ elf64_x86_64_check_relocs for the new relocs.
+ (elf64_x86_64_relocate_section): Handle new relocs.
+
+2006-03-22 Bob Wilson <bob.wilson@acm.org>
+
+ * elf32-xtensa.c (xtensa_read_table_entries): Remove assertion that
+ rel->r_addend is zero.
+
+2006-03-22 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_vxworks_finish_dynamic_symbol): Fix type
+ of "loc".
+
+2006-03-22 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+
+ * bfd-in2.h: Regenerate.
+ * config.bfd (mips*-*-vxworks*, mips*el-*-vxworks*): New stanzas.
+ * configure.in (bfd_elf32_bigmips_vxworks_vec): New stanza.
+ (bfd_elf32_littlemips_vxworks_vec): Likewise.
+ (bfd_elf32_bigmips_vec): Add elf-vxworks.lo.
+ (bfd_elf32_littlemips_vec): Likewise.
+ (bfd_elf32_nbigmips_vec): Likewise.
+ (bfd_elf32_nlittlemips_vec): Likewise.
+ (bfd_elf32_ntradbigmips_vec): Likewise.
+ (bfd_elf32_ntradlittlemips_vec): Likewise.
+ (bfd_elf32_tradbigmips_vec): Likewise.
+ (bfd_elf32_tradlittlemips_vec): Likewise.
+ (bfd_elf64_bigmips_vec): Likewise.
+ (bfd_elf64_littlemips_vec): Likewise.
+ (bfd_elf64_tradbigmips_vec): Likewise.
+ (bfd_elf64_tradlittlemips_vec): Likewise.
+ * elf32-mips.c: Include elf-vxworks.h.
+ (mips_info_to_howto_rel): Use elf_backend_mips_rtype_to_howto
+ instead of calling mips_elf32_rtype_to_howto directly.
+ (mips_vxworks_copy_howto_rela): New reloc howto.
+ (mips_vxworks_jump_slot_howto_rela): Likewise.
+ (mips_vxworks_bfd_reloc_type_lookup): New function.
+ (mips_vxworks_rtype_to_howto): Likewise.
+ (mips_vxworks_final_write_processing): Likewise.
+ (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Override for VxWorks.
+ (TARGET_BIG_SYM, TARGET_BIG_NAME, elf_bed, ELF_MAXPAGESIZE): Likewise.
+ (elf_backend_want_got_plt): Likewise.
+ (elf_backend_want_plt_sym): Likewise.
+ (elf_backend_got_symbol_offset): Likewise.
+ (elf_backend_want_dynbss): Likewise.
+ (elf_backend_may_use_rel_p): Likewise.
+ (elf_backend_may_use_rela_p): Likewise.
+ (elf_backend_default_use_rela_p): Likewise.
+ (elf_backend_got_header_size: Likewise.
+ (elf_backend_plt_readonly): Likewise.
+ (bfd_elf32_bfd_reloc_type_lookup): Likewise.
+ (elf_backend_mips_rtype_to_howto): Likewise.
+ (elf_backend_adjust_dynamic_symbol): Likewise.
+ (elf_backend_finish_dynamic_symbol): Likewise.
+ (bfd_elf32_bfd_link_hash_table_create): Likewise.
+ (elf_backend_add_symbol_hook): Likewise.
+ (elf_backend_link_output_symbol_hook): Likewise.
+ (elf_backend_emit_relocs): Likewise.
+ (elf_backend_final_write_processing: Likewise.
+ (elf_backend_additional_program_headers): Likewise.
+ (elf_backend_modify_segment_map): Likewise.
+ (elf_backend_symbol_processing): Likewise.
+ * elfxx-mips.c: Include elf-vxworks.h.
+ (mips_elf_link_hash_entry): Add is_relocation_target and
+ is_branch_target fields.
+ (mips_elf_link_hash_table): Add is_vxworks, srelbss, sdynbss, srelplt,
+ srelplt2, sgotplt, splt, plt_header_size and plt_entry_size fields.
+ (MIPS_ELF_RELA_SIZE, MIPS_ELF_REL_DYN_NAME): New macros.
+ (MIPS_RESERVED_GOTNO): Take a mips_elf_link_hash_table argument.
+ Return 3 for VxWorks.
+ (ELF_MIPS_GP_OFFSET): Change the argument from a bfd to a
+ mips_elf_link_hash_table. Return 0 for VxWorks.
+ (MIPS_ELF_GOT_MAX_SIZE): Change the argument from a bfd to a
+ mips_elf_link_hash_table. Update the call to ELF_MIPS_GP_OFFSET.
+ (mips_vxworks_exec_plt0_entry): New variable.
+ (mips_vxworks_exec_plt_entry): Likewise.
+ (mips_vxworks_shared_plt0_entry): Likewise.
+ (mips_vxworks_shared_plt_entry): Likewise.
+ (mips_elf_link_hash_newfunc): Initialize the new hash_entry fields.
+ (mips_elf_rel_dyn_section): Change the bfd argument to a
+ mips_elf_link_hash_table. Use MIPS_ELF_REL_DYN_NAME to get
+ the name of the section.
+ (mips_elf_initialize_tls_slots): Update the call to
+ mips_elf_rel_dyn_section.
+ (mips_elf_gotplt_index): New function.
+ (mips_elf_local_got_index): Add an input_section argument.
+ Update the call to mips_elf_create_local_got_entry.
+ (mips_elf_got_page): Likewise.
+ (mips_elf_got16_entry): Likewise.
+ (mips_elf_create_local_got_entry): Add bfd_link_info and input_section
+ arguments. Create dynamic relocations for each entry on VxWorks.
+ (mips_elf_merge_gots): Update the use of MIPS_ELF_GOT_MAX_SIZE.
+ (mips_elf_multi_got): Update the uses of MIPS_ELF_GOT_MAX_SIZE
+ and MIPS_RESERVED_GOTNO.
+ (mips_elf_create_got_section): Update the uses of
+ MIPS_ELF_GOT_MAX_SIZE. Create .got.plt on VxWorks.
+ (is_gott_symbol): New function.
+ (mips_elf_calculate_relocation): Use a dynobj local variable.
+ Update the calls to mips_elf_local_got_index, mips_elf_got16_entry and
+ mips_elf_got_page_entry. Set G to the .got.plt entry when calculating
+ VxWorks R_MIPS_CALL* relocations. Calculate and use G for all GOT
+ relocations on VxWorks. Add dynamic relocations for references
+ to the VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Don't
+ create dynamic relocations for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64
+ in VxWorks executables.
+ (mips_elf_allocate_dynamic_relocations): Add a bfd_link_info argument.
+ Use MIPS_ELF_RELA_SIZE to calculate the size of a VxWorks entry.
+ Don't allocate a null entry on VxWorks.
+ (mips_elf_create_dynamic_relocation): Update the call to
+ mips_elf_rel_dyn_section. Use absolute rather than relative
+ relocations for VxWorks, and make them RELA rather than REL.
+ (_bfd_mips_elf_create_dynamic_sections): Don't make .dynamic
+ read-only on VxWorks. Update the call to mips_elf_rel_dyn_section.
+ Create the .plt, .rela.plt, .dynbss and .rela.bss sections on
+ VxWorks. Likewise create the _PROCEDURE_LINKAGE_TABLE symbol.
+ Call elf_vxworks_create_dynamic_sections for VxWorks and
+ initialize the plt_header_size and plt_entry_size fields.
+ (_bfd_mips_elf_check_relocs): Don't allow GOT relocations to be
+ used in VxWorks executables. Don't allocate dynamic relocations
+ for R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 in VxWorks executables.
+ Set is_relocation_target for each symbol referenced by a relocation.
+ Allocate .rela.dyn entries for relocations against the special
+ VxWorks __GOTT_BASE__ and __GOTT_INDEX__ symbols. Create GOT
+ entries for all VxWorks R_MIPS_GOT16 relocations. Don't allocate
+ a global GOT entry for symbols mentioned in VxWorks R_MIPS_CALL*,
+ R_MIPS_32, R_MIPS_REL32 or R_MIPS_64 relocations. Update the calls
+ to mips_elf_rel_dyn_section and mips_elf_allocate_dynamic_relocations.
+ Set is_branch_target for symbols mentioned in R_MIPS_PC16 or R_MIPS_26
+ relocations. Don't set no_fn_stub on VxWorks.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Update the call to
+ mips_elf_allocate_dynamic_relocations.
+ (_bfd_mips_vxworks_adjust_dynamic_symbol): New function.
+ (_bfd_mips_elf_always_size_sections): Do not allocate GOT page
+ entries for VxWorks, and do not create multiple GOTs.
+ (_bfd_mips_elf_size_dynamic_sections): Use MIPS_ELF_REL_DYN_NAME.
+ Handle .got specially for VxWorks. Update the uses of
+ MIPS_RESERVED_GOTNO and mips_elf_allocate_dynamic_relocations.
+ Check for sgotplt and splt. Allocate the .rel(a).dyn contents last,
+ once its final size is known. Set DF_TEXTREL for VxWorks. Add
+ DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL, DT_PLTRELSZ and DT_JMPREL
+ tags on VxWorks. Do not add the MIPS-specific tags for VxWorks.
+ (_bfd_mips_vxworks_finish_dynamic_symbol): New function.
+ (mips_vxworks_finish_exec_plt): Likewise.
+ (mips_vxworks_finish_shared_plt): Likewise.
+ (_bfd_mips_elf_finish_dynamic_sections): Remove an unncessary call
+ to mips_elf_rel_dyn_section. Use a VxWorks-specific value of
+ DT_PLTGOT. Handle DT_RELA, DT_RELASZ, DT_RELAENT, DT_PLTREL,
+ DT_PLTRELSZ and DT_JMPREL. Update the uses of MIPS_RESERVED_GOTNO
+ and mips_elf_rel_dyn_section. Use a different GOT header for
+ VxWorks. Don't sort .rela.dyn on VxWorks. Finish the PLT on VxWorks.
+ (_bfd_mips_elf_link_hash_table_create): Initialize the new
+ mips_elf_link_hash_table fields.
+ (_bfd_mips_vxworks_link_hash_table_create): New function.
+ (_bfd_mips_elf_final_link): Set the GP value to _GLOBAL_OFFSET_TABLE_
+ on VxWorks. Update the call to ELF_MIPS_GP_OFFSET.
+ * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Declare.
+ (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
+ (_bfd_mips_vxworks_link_hash_table_create): Likewise.
+ * libbfd.h: Regenerate.
+ * Makefile.am (elfxx-mips.lo): Depend on elf-vxworks.h.
+ (elf32-mips.lo): Likewise.
+ * Makefile.in: Regenerate.
+ * reloc.c (BFD_RELOC_MIPS_COPY, BFD_RELOC_MIPS_JUMP_SLOT): Declare.
+ * targets.c (bfd_elf32_bigmips_vxworks_vec): Declare.
+ (bfd_elf32_littlemips_vxworks_vec): Likewise.
+ (_bfd_target_vector): Add entries for them.
+
+2006-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * elf64-hppa.c (elf64_hppa_special_sections): Change flags for .tbss
+ section from SHF_PARISC_WEAKORDER to SHF_HP_TLS.
+ (elf_backend_special_sections): Remove #undef.
+
+2006-03-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * elf64-hppa.c (allocate_global_data_opd): Don't create an OPD entry
+ for undefined weak symbols.
+
+2006-03-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ PR ld/2462
+ * elflink.c (bfd_elf_final_link): Remove
+ bed->elf_backend_emit_relocs from emit_relocs.
+
+2006-03-17 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Copy addend from
+ first relocation to the second when relaxing TLS GD to LE;
+ zero it out when relaxing to IE.
+
+2006-03-17 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2434
+ * elflink.c (elf_link_add_object_symbols): Save and restore
+ warning sym's linked sym.
+
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2434
+ * elflink.c (struct elf_smash_syms_data, elf_smash_syms): Delete.
+ (elf_link_add_object_symbols): Delete unnecessary locals. Rename
+ hash_table -> htab. Formatting. Save entire symbol table
+ before loading as-needed syms, and restore afterwards if lib not
+ needed. Use bfd_hash_allocate rather than bfd_alloc for sym
+ name. Free some buffers earlier.
+ * bfd-in.h (struct bfd_hash_table): Add entsize.
+ (bfd_hash_table_init, bfd_hash_table_init_n): Adjust prototype.
+ * elf-bfd.h (_bfd_elf_link_hash_table_init): Likewise
+ * hash.c (bfd_hash_table_init_n): Add entsize param, save to
+ hash table.
+ (bfd_hash_table_init): Add param, adjust calls.
+ * aoutx.h: Adjust all hash_table_init functions and calls.
+ * bfd.c: Likewise.
+ * coff-arm.c: Likewise.
+ * coff-h8300.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * cofflink.c: Likewise.
+ * ecoff.c: Likewise.
+ * ecofflink.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elf-strtab.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-arm.c: Likewise.
+ * elf32-bfin.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-frv.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68hc1x.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-vax.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sh64.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elfxx-mips.c: Likewise.
+ * elfxx-sparc.c: Likewise.
+ * i386linux.c: Likewise.
+ * libaout.h: Likewise.
+ * libbfd-in.h: Likewise.
+ * libcoff-in.h: Likewise.
+ * linker.c: Likewise.
+ * m68klinux.c: Likewise.
+ * merge.c: Likewise.
+ * opncls.c: Likewise.
+ * pdp11.c: Likewise.
+ * sparclinux.c: Likewise.
+ * stabs.c: Likewise.
+ * sunos.c: Likewise.
+ * vms.c: Likewise.
+ * xcofflink.c: Likewise.
+ * section.c (struct section_hash_entry): Move to..
+ * libbfd-in.h: ..here.
+ * Makefile.am: Run "make dep-am"
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
+
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): REL24 and REL14 relocs
+ against __GLOBAL_OFFSET_TABLE__ need never be dynamic. Tweak
+ last change to REL32 relocs so that they are counted as
+ possibly dynamic as per REL24 and REL14.
+
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Don't fall into REL24
+ checks from REL32.
+
+2006-03-15 Ben Elliston <bje@au.ibm.com>
+
+ * elf32-arm.c (elf32_arm_merge_eabi_attributes): Iterate over all
+ in_list elements, not just the first.
+
+2006-03-14 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-mips.c (mips_elf_adjust_addend): New function, mostly split
+ out from...
+ (_bfd_mips_elf_relocate_section): ...here. Use it to adjust r_addend
+ for final links too.
+
+2006-03-13 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (mips_elf_create_got_section): Initialize hgot.
+
+2006-03-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2443
+ * dwarf2.c (concat_filename): Don't issue an error if file is 0.
+
+2006-03-10 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (INTERWORK_FLAG): Handle EABIv5.
+ (elf32_arm_print_private_bfd_data): Ditto.
+
+2006-03-09 Paul Brook <paul@codesourcery.com>
+
+ * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
+ mapping symbols.
+
+2006-03-09 Khem Raj <khem@mvista.com>
+
+ * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
+ char type.
+
+2006-03-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elfxx-ia64.c (elfNN_ia64_choose_gp): Properly choose gp.
+
+2006-03-07 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Paul Brook <paul@codesourcery.com>
+ Ricardo Anguiano <anguiano@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
+ (bfd_elf32_bigarm_symbian_vec): Likewise.
+ (bfd_elf32_bigarm_vxworks_vec): Likewise.
+ (bfd_elf32_littlearm_vec): Likewise.
+ (bfd_elf32_littlearm_symbian_vec): Likewise.
+ (bfd_elf32_littlearm_vxworks_vec): Likewise.
+ * configure: Regenerate.
+ * elf32-arm.c: Include libiberty.h and elf-vxworks.h.
+ (RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
+ (elf32_arm_vxworks_bed): Add forward declaration.
+ (elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
+ (elf32_arm_vxworks_exec_plt0_entry): New table.
+ (elf32_arm_vxworks_exec_plt_entry): Likewise.
+ (elf32_arm_vxworks_shared_plt_entry): Likewise.
+ (elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
+ (reloc_section_p): New function.
+ (create_got_section): Use RELOC_SECTION.
+ (elf32_arm_create_dynamic_sections): Likewise. Call
+ elf_vxworks_create_dynamic_sections for VxWorks targets.
+ Choose between the two possible values of plt_header_size
+ and plt_entry_size.
+ (elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
+ (elf32_arm_abs12_reloc): New function.
+ (elf32_arm_final_link_relocate): Call it. Allow the creation of
+ dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
+ RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
+ r_addend fields of relocs. On rela targets, skip any code that
+ adjusts in-place addends. When using _bfd_link_final_relocate
+ to perform a final relocation, pass rel->r_addend as the addend
+ argument.
+ (elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
+ object, ignore flags that are not standard on VxWorks.
+ (elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
+ relocs on VxWorks. Use reloc_section_p.
+ (elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
+ (allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
+ .rela.plt.unloaded relocs on VxWorks targets.
+ (elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
+ .rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
+ instead of DT_REL* tags on RELA targets.
+ (elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
+ and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
+ PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
+ (elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
+ and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
+ like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
+ Correct the .rela.plt.unreloaded symbol indexes.
+ (elf32_arm_output_symbol_hook): Call the VxWorks version of this
+ hook on VxWorks targets.
+ (elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
+ Minor formatting tweak.
+ (elf32_arm_vxworks_final_write_processing): New function.
+ (elf_backend_add_symbol_hook): Override for VxWorks and reset
+ for Symbian.
+ (elf_backend_final_write_processing): Likewise.
+ (elf_backend_emit_relocs): Likewise.
+ (elf_backend_want_plt_sym): Likewise.
+ (ELF_MAXPAGESIZE): Likewise.
+ (elf_backend_may_use_rel_p): Minor formatting tweak.
+ (elf_backend_may_use_rela_p): Likewise.
+ (elf_backend_default_use_rela_p): Likewise.
+ (elf_backend_rela_normal): Likewise.
+ * Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
+
+2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * archures.c (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_b_nousp):
+ New. Adjust other variants.
+ (bfd_default_scan): Update.
+ * bfd-in2.h: Rebuilt.
+ * cpu-m68k.c: Adjust.
+ (bfd_m68k_compatible): New. Use it for architectures.
+ * elf32-m68k.c (elf32_m68k_object_p): Adjust.
+ (elf32_m68k_merge_private_bfd_data): Adjust. Correct isa-a/b
+ mismatch.
+ (elf32_m68k_print_private_bfd_data): Adjust.
+ * ieee.c (ieee_write_processor): Adjust.
+
+2006-03-06 Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf2.c: Formatting.
+ (add_line_info): Remove outer loop.
+
+2006-03-05 H.J. Lu <hongjiu.lu@intel.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ PR binutils/2338
+ * dwarf2.c (loadable_section): New struct.
+ (dwarf2_debug): Add loadable_section_count and
+ loadable_sections.
+ (new_line_sorts_after): New.
+ (add_line_info): Use new_line_sorts_after to compare line
+ addresses.
+ (check_function_name): Removed.
+ (unset_sections): New.
+ (place_sections): New.
+ (_bfd_dwarf2_find_nearest_line): Updated. Call place_sections
+ and unset_sections on relocatable files.
+ (_bfd_dwarf2_find_line): Likewise.
+
+2006-03-03 Nick Clifton <nickc@redhat.com>
+
+ * cpu-avr.c: Update to ISO-C90 formatting.
+ * elf32-avr.c: Likewise.
+
+2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * elf32-avr.c (avr_reloc_map): Insert BFD_RELOC_AVR_MS8_LDI
+ and R_AVR_MS8_LDI
+ (bfd_elf_avr_final_write_processing): Set
+ EF_AVR_LINKRELAX_PREPARED in e_flags field.
+ (elf32_avr_relax_section): New function.
+ (elf32_avr_relax_delete_bytes): New function.
+ (elf32_avr_get_relocated_section_contents): New function.
+ (avr_pc_wrap_around): New function.
+ (avr_relative_distance_considering_wrap_around): New function.
+ (avr_final_link_relocate): Handle negative int8t_t immediate for R_AVR_LDI.
+ * reloc.c: Add BFD_RELOC_AVR_MS8_LDI and BFD_RELOC_AVR_LDI_NEG
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2006-03-02 DJ Delorie <dj@redhat.com>
+
+ * elf32-m32c.c (m32c_offset_for_reloc): Fix local symbol
+ calculations.
+
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-ppc.c (is_ppc_elf_target): Return true if the target is
+ bfd_elf32_powerpc_vxworks_vec.
+
+2006-03-02 Nick Clifton <nickc@redhat.com>
+
+ * elf32-m32c.c (m32c_elf_relax_section): Initialise 'gap'.
+
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-i386.c (elf_i386_create_dynamic_sections): Use
+ elf_vxworks_create_dynamic_sections.
+ (elf_i386_size_dynamic_sections): Remove VxWorks GOT and PLT
+ symbol handling.
+ * elf32-ppc.c (ppc_elf_create_dynamic_sections): Use
+ elf_vxworks_create_dynamic_sections.
+ (ppc_elf_size_dynamic_sections): Remove VxWorks GOT and PLT
+ symbol handling.
+ * elf-vxworks.c (elf_vxworks_create_dynamic_sections): New function.
+ * elf-vxworks.h (elf_vxworks_create_dynamic_sections): Declare.
+
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-i386.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
+ (elf_backend_link_output_symbol_hook): Use
+ elf_vxworks_link_output_symbol_hook instead.
+ * elf32-ppc.c (elf_i386_vxworks_link_output_symbol_hook): Delete.
+ (elf_backend_link_output_symbol_hook): Use
+ elf_vxworks_link_output_symbol_hook instead.
+ * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Provide the
+ same interface as elf_backend_link_output_symbol_hook.
+ * elf-vxworks.h (elf_vxworks_link_output_symbol_hook): Update
+ prototype accordingly.
+
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-ppc.c (ppc_elf_plt_type): New enumeration.
+ (ppc_elf_link_hash_table): Replace old_got and new_got with
+ plt_type and can_use_new_plt.
+ (ppc_elf_create_dynamic_sections): Add SEC_HAS_CONTENTS,
+ SEC_LOAD and SEC_READONLY to the VxWorks .plt flags.
+ (ppc_elf_check_relocs): Set can_use_new_plt instead of new_plt.
+ Move from plt_type == PLT_UNSET to PLT_OLD instead of setting old_plt.
+ (ppc_elf_select_plt_layout): Move from plt_type == PLT_UNSET to
+ either plt_type == PLT_OLD or plt_type == PLT_NEW. Assert that
+ this function should not be called for VxWorks targets.
+ (ppc_elf_tls_setup): Use plt_type instead of old_got.
+ (allocate_got): Likewise. Rearrange so that max_before_header
+ is only used for PLT_OLD and PLT_NEW.
+ (allocate_dynrelocs): Use plt_type instead of old_got and is_vxworks.
+ (ppc_elf_size_dynamic_sections): Likewise.
+ (ppc_elf_relax_section): Likewise.
+ (ppc_elf_relocate_section): Likewise.
+ (ppc_elf_finish_dynamic_symbol): Likewise.
+ (ppc_elf_vxworks_link_hash_table_create): Initialize plt_type.
+
+2006-02-28 Richard Sandiford <richard@codesourcery.com>
+
+ * elf32-i386.c (elf_i386_link_hash_table): Add next_tls_desc_index.
+ (elf_i386_link_hash_table_create): Initialize it.
+ (elf_i386_compute_jump_table_size): Use it instead of
+ srelplt->reloc_count.
+ (allocate_dynrelocs): Likewise.
+ (elf_i386_size_dynamic_sections): Likewise.
+ (elf_i386_relocate_section): Likewise.
+
+2006-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle S flag.
+ (_bfd_elf_write_section_eh_frame): Likewise.
+
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * po/Make-in: Add html target.
+
+2006-02-27 Richard Sandiford <richard@codesourcery.com>
+
+ * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Use the
+ cached hgot entry to check for _GLOBAL_OFFSET_TABLE_.
+ * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
+ * elf32-bfin.c (bfin_finish_dynamic_symbol): Likewise.
+ * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
+ * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
+ * elf32-i386.c (elf_i386_finish_dynamic_symbol): Likewise.
+ * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
+ * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Likewise.
+ * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
+ * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
+ * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
+ * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
+ * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise. Also use
+ the cached hplt entry to check for _PROCEDURE_LINKAGE_TABLE_.
+ * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
+ * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
+
+2006-02-25 Richard Sandiford <richard@codesourcery.com>
+
+ * elf-bfd.h (elf_link_hash_table): Add hplt field.
+ * elflink.c (_bfd_elf_create_dynamic_sections): Initialize it.
+ * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
+ * elf32-frv.c (_frv_create_got_section): Likewise.
+ * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
+ * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
+ * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
+ * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
+ * elf32-i386.c (elf_i386_link_hash_table): Remove hgot and hplt.
+ (elf_i386_link_hash_table_create): Don't initialize them.
+ (elf_i386_size_dynamic_sections): Use the generic ELF hplt and
+ hgot fields.
+ (elf_i386_finish_dynamic_symbol): Likewise.
+ * elf32-ppc.c (ppc_elf_link_hash_table): Remove hplt.
+ (ppc_elf_size_dynamic_sections): Use the generic ELF hplt fields.
+ (ppc_elf_finish_dynamic_symbol): Likewise.
+
+2006-02-24 DJ Delorie <dj@redhat.com>
+
+ * elf32-m32c.c (m32c_elf_howto_table): Add relaxation relocs.
+ (m32c_elf_relocate_section): Don't relocate them.
+ (compare_reloc): New.
+ (relax_reloc): Remove.
+ (m32c_offset_for_reloc): New.
+ (m16c_addr_encodings): New.
+ (m16c_jmpaddr_encodings): New.
+ (m32c_addr_encodings): New.
+ (m32c_elf_relax_section): Relax jumps and address displacements.
+ (m32c_elf_relax_delete_bytes): Adjust for internal syms. Fix up
+ short jumps.
+
+ * reloc.c: Add m32c relax relocs.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2006-02-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2218
+ * elf-bfd.h (elf_backend_data): Add elf_backend_fixup_symbol.
+ (_bfd_elf_link_hash_fixup_symbol): New.
+
+ * elflink.c (_bfd_elf_link_hash_fixup_symbol): New.
+ (_bfd_elf_fix_symbol_flags): Call elf_backend_fixup_symbol if
+ it isn't NULL.
+
+ * elfxx-ia64.c (elf_backend_fixup_symbol): Defined.
+
+ * elfxx-target.h (elf_backend_fixup_symbol): New.
+ (elfNN_bed): Initialize elf_backend_fixup_symbol.
+
+2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * cpu-ia64-opc.c (ins_immu5b): New.
+ (ext_immu5b): Likewise.
+ (elf64_ia64_operands): Add IMMU5b.
+
+2006-02-21 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/2218
+ * elf32-arm.c (allocate_dynrelocs): Ensure undef weak sym in pie
+ is dynamic.
+ * elf32-hppa.c (allocate_dynrelocs): Likewise.
+ * elf32-i386.c (allocate_dynrelocs): Likewise.
+ * elf32-s390.c (allocate_dynrelocs): Likewise.
+ * elf32-sh.c (allocate_dynrelocs): Likewise.
+ * elf64-s390.c (allocate_dynrelocs): Likewise.
+ * elf64-x86-64.c (allocate_dynrelocs): Likewise.
+ * elf32-m32r.c (allocate_dynrelocs): Likewise. Discard relocs
+ on undef weak with non-default visibility too.
+ * elfxx-sparc.c (allocate_dynrelocs): Ditto.
+
+2006-02-21 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c: (_bfd_default_error_handler): Don't call abort on
+ error, instead call _exit.
+ (_bfd_abort): Call _exit not xexit.
+
+2006-02-17 Kevin Buettner <kevinb@redhat.com>
+
+ * elf32-frv.c (elf32_frv_grok_prstatus, elf32_frv_grok_psinfo):
+ New functions.
+ * elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
+
+2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
+
+ * Makefile.am: Add xc16x related entry
+ * Makefile.in: Regenerate
+ * archures.c: Add bfd_xc16x_arch
+ * bfd-in2.h: Regenerate
+ * config.bfd: Add xc16x-*-elf
+ * configure.in: Add bfd_elf32_xc16x_vec
+ * configure: Regenerate.
+ * targets.c: Added xc16x related information
+ * cpu-xc16x.c: New file
+ * reloc.c: Add new relocations specific to xc16x:
+ BFD_RELOC_XC16X_PAG, BFD_RELOC_XC16X_POF, BFD_RELOC_XC16X_SEG,
+ BFD_RELOC_XC16X_SOF
+ * elf32-xc16x.c: New file.
+
+2006-02-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-ppc.c (allocate_dynrelocs): Tweak undef weak handling.
+ * elf64-ppc.c (allocate_dynrelocs): Likewise.
+
+2006-02-17 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/2218
+ * elf64-ppc.c (allocate_dynrelocs): Ensure undef weak sym is
+ dynamic.
+ (ppc64_elf_relocate_section): Check output reloc section size.
+ * elf32-ppc.c (allocate_dynrelocs): Simplify undef weak test.
+
+2006-02-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2322
+ * elf.c (get_segment_type): New function.
+ (_bfd_elf_print_private_bfd_data): Use it.
+ (print_segment_map): New function.
+ (assign_file_positions_for_segments): Call print_segment_map
+ when there are not enough room for program headers.
+
+2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
+
+ * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Use
+ traditional MIPS ELF targets.
+
+2006-02-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2338
+ * dwarf2.c (check_function_name): New function.
+ (_bfd_dwarf2_find_nearest_line): Use check_function_name to
+ check if function is correct.
+
+2006-02-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (_bfd_elf_default_action_discarded): Return 0 for
+ debug sections.
+ (elf_link_input_bfd): Adjust comments.
+
+2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * elf.c (copy_private_bfd_data): Minor update.
+
+2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2258
+ * elf.c (copy_private_bfd_data): Renamed to ...
+ (rewrite_elf_program_header): This.
+ (copy_elf_program_header): New function.
+ (copy_private_bfd_data): Likewise.
+
+2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * archures.c (bfd_mach_mcf5200, bfd_mach_mcf5206e,
+ bfd_mach_mcf5307, bfd_mach_mcf5407, bfd_mach_mcf528x,
+ bfd_mach_mcfv4e, bfd_mach_mcf521x, bfd_mach_mcf5249,
+ bfd_mach_mcf547x, bfd_mach_mcf548x): Remove.
+ (bfd_mach_mcf_isa_a, bfd_mach_mcf_isa_a_div,
+ bfd_mach_mcf_isa_a_div_mac, bfd_mach_mcf_isa_a_div_emac,
+ bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
+ bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_aplus_usp,
+ bfd_mach_mcf_isa_aplus_usp_mac, bfd_mach_mcf_isa_aplus_usp_emac,
+ bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac, bfd_mach_mcf_isa_b_emac,
+ bfd_mach_mcf_isa_b_usp_float, bfd_mach_mcf_isa_b_usp_float_mac,
+ bfd_mach_mcf_isa_b_usp_float_emac): New.
+ (bfd_default_scan): Update coldfire mapping.
+ * bfd-in.h (bfd_m68k_mach_to_features,
+ bfd_m68k_features_to_mach): Declare.
+ * bfd-in2.h: Rebuilt.
+ * cpu-m68k.c (arch_info_struct): Add new coldfire machines,
+ adjust legacy names.
+ (m68k_arch_features): New.
+ (bfd_m68k_mach_to_features,
+ bfd_m68k_features_to_mach): Define.
+ * elf32-m68k.c (elf32_m68k_object_p): New.
+ (elf32_m68k_merge_private_bfd_data): Merge the CF EF flags.
+ (elf32_m68k_print_private_bfd_data): Print the CF EF flags.
+ (elf_backend_object_p): Define.
+ * ieee.c (ieee_write_processor): Update coldfire machines.
+ * libbfd.h: Rebuilt.
+
+2006-02-06 Steve Ellcey <sje@cup.hp.com>
+
+ * elfxx-ia64.c (elfNN_ia64_fake_sections): Set SHF_IA_64_HP_TLS
+ if SHF_TLS is set.
+
+2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * coff-z80.c (r_imm24): New howto.
+ (rtype2howto): New case R_IMM24.
+ (coff_z80_reloc_type_lookup): New case BFD_RELOC_24.
+ (extra_case): Use bfd_get_8 for R_IMM8, new case R_IMM24.
+
+2006-02-04 Richard Sandiford <richard@codesourcery.com>
+
+ * elfxx-mips.c (mips_elf_initialize_tls_index): If a TLS symbol
+ has already been assigned a GOT index, copy that index to the
+ current hash table entry.
+
+2006-02-01 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
+ for call-to-undefweak reloc overflow.
+
+2006-01-31 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
+ for 32-bit relocs overflow.
+
+2006-01-27 Paul Brook <paul@codesourcery.com>
+
+ * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb
+ objects.
+
+2006-01-18 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce TLS descriptors for i386 and x86_64.
+ * reloc.c (BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC,
+ BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_GOTPC32_TLSDESC,
+ BFD_RELOC_X86_64_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL): New.
+ * libbfd.h, bfd-in2.h: Rebuilt.
+ * elf32-i386.c (elf_howto_table): New relocations.
+ (R_386_tls): Adjust.
+ (elf_i386_reloc_type_lookup): Map new relocations.
+ (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
+ (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
+ (struct elf_i386_link_hash_entry): Add tlsdesc_got field.
+ (struct elf_i386_obj_tdata): Add local_tlsdesc_gotent field.
+ (elf_i386_local_tlsdesc_gotent): New macro.
+ (struct elf_i386_link_hash_table): Add sgotplt_jump_table_size.
+ (elf_i386_compute_jump_table_size): New macro.
+ (link_hash_newfunc): Initialize tlsdesc_got.
+ (elf_i386_link_hash_table_create): Set sgotplt_jump_table_size.
+ (elf_i386_tls_transition): Handle R_386_TLS_GOTDESC and
+ R_386_TLS_DESC_CALL.
+ (elf_i386_check_relocs): Likewise. Allocate space for
+ local_tlsdesc_gotent.
+ (elf_i386_gc_sweep_hook): Handle R_386_TLS_GOTDESC and
+ R_386_TLS_DESC_CALL.
+ (allocate_dynrelocs): Count function PLT relocations. Reserve
+ space for TLS descriptors and relocations.
+ (elf_i386_size_dynamic_sections): Reserve space for TLS
+ descriptors and relocations. Set up sgotplt_jump_table_size.
+ Don't zero reloc_count in srelplt.
+ (elf_i386_always_size_sections): New. Set up _TLS_MODULE_BASE_.
+ (elf_i386_relocate_section): Handle R_386_TLS_GOTDESC and
+ R_386_TLS_DESC_CALL.
+ (elf_i386_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
+ (elf_backend_always_size_sections): Define.
+ * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_GOTPC32_TLSDESC,
+ R_X86_64_TLSDESC, R_X86_64_TLSDESC_CALL.
+ (R_X86_64_standard): Adjust.
+ (x86_64_reloc_map): Map new relocs.
+ (elf64_x86_64_rtype_to_howto): New, split out of...
+ (elf64_x86_64_info_to_howto): ... this function, and...
+ (elf64_x86_64_reloc_type_lookup): ... use it to map elf_reloc_val.
+ (GOT_TLS_GDESC, GOT_TLS_GD_BOTH_P): New macros.
+ (GOT_TLS_GD_P, GOT_TLS_GDESC_P, GOT_TLS_GD_ANY_P): New macros.
+ (struct elf64_x86_64_link_hash_entry): Add tlsdesc_got field.
+ (struct elf64_x86_64_obj_tdata): Add local_tlsdesc_gotent field.
+ (elf64_x86_64_local_tlsdesc_gotent): New macro.
+ (struct elf64_x86_64_link_hash_table): Add tlsdesc_plt,
+ tlsdesc_got and sgotplt_jump_table_size fields.
+ (elf64_x86_64_compute_jump_table_size): New macro.
+ (link_hash_newfunc): Initialize tlsdesc_got.
+ (elf64_x86_64_link_hash_table_create): Initialize new fields.
+ (elf64_x86_64_tls_transition): Handle R_X86_64_GOTPC32_TLSDESC and
+ R_X86_64_TLSDESC_CALL.
+ (elf64_x86_64_check_relocs): Likewise. Allocate space for
+ local_tlsdesc_gotent.
+ (elf64_x86_64_gc_sweep_hook): Handle R_X86_64_GOTPC32_TLSDESC and
+ R_X86_64_TLSDESC_CALL.
+ (allocate_dynrelocs): Count function PLT relocations. Reserve
+ space for TLS descriptors and relocations.
+ (elf64_x86_64_size_dynamic_sections): Reserve space for TLS
+ descriptors and relocations. Set up sgotplt_jump_table_size,
+ tlsdesc_plt and tlsdesc_got. Make room for them. Don't zero
+ reloc_count in srelplt. Add dynamic entries for DT_TLSDESC_PLT
+ and DT_TLSDESC_GOT.
+ (elf64_x86_64_always_size_sections): New. Set up
+ _TLS_MODULE_BASE_.
+ (elf64_x86_64_relocate_section): Handle R_386_TLS_GOTDESC and
+ R_386_TLS_DESC_CALL.
+ (elf64_x86_64_finish_dynamic_symbol): Use GOT_TLS_GD_ANY_P.
+ (elf64_x86_64_finish_dynamic_sections): Set DT_TLSDESC_PLT and
+ DT_TLSDESC_GOT. Set up TLS descriptor lazy resolver PLT entry.
+ (elf_backend_always_size_sections): Define.
+
+2006-01-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2096
+ * dwarf2.c (comp_unit_contains_address): Update comment.
+ (_bfd_dwarf2_find_nearest_line): Use section's vma, instead of
+ lma. Return TRUE only if both comp_unit_contains_address and
+ comp_unit_find_nearest_line return TRUE.
+ (_bfd_dwarf2_find_line): Use section's vma, instead of lma.
+
+2006-01-18 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_backend_data): Add gc_mark_dynamic_ref.
+ (bfd_elf_gc_mark_dynamic_ref_symbol): Declare.
+ * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Rename from
+ elf_gc_mark_dynamic_ref_symbol. Make global.
+ (bfd_elf_gc_sections): Call bed->gc_mark_dynamic_ref.
+ * elfxx-target.h (elf_backend_gc_mark_dynamic_ref): Define.
+ (elfNN_bed): Init new field.
+ * elf64-ppc.c (elf_backend_gc_mark_dynamic_ref): Define.
+ (ppc64_elf_gc_mark_dynamic_ref): New function.
+
+2006-01-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_gc_mark_hook): Don't hang forever in loop.
+
+2006-01-17 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/2159
+ * elf.c (elfcore_write_pstatus): Add ATTRIBUTE_UNUSED to unused
+ parameters.
+
+2006-01-11 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arm.c (elf32_arm_output_symbol_hook): Install new entry
+ into the newly (re)allocated map array.
+
+2006-01-09 Alexis Wilke <alexis_wilke@yahoo.com>
+
+ * peXXigen.c (tbl): Add comma after "HIGH3ADJ".
+
+2006-01-01 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-ppc.c (ppc64_elf_action_discarded): Return 0
+ for .toc1 section.
+
+For older changes see ChangeLog-2005
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/bfd/Makefile.am b/contrib/binutils/bfd/Makefile.am
index 77278a83..48919af 100644
--- a/contrib/binutils/bfd/Makefile.am
+++ b/contrib/binutils/bfd/Makefile.am
@@ -1,6 +1,7 @@
## Process this file with automake to generate Makefile.in
AUTOMAKE_OPTIONS = 1.9 cygnus
+ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# Uncomment the following line when doing a release.
# RELEASE=y
@@ -63,6 +64,7 @@ ALL_MACHINES = \
cpu-arm.lo \
cpu-avr.lo \
cpu-bfin.lo \
+ cpu-cr16.lo \
cpu-cr16c.lo \
cpu-cris.lo \
cpu-crx.lo \
@@ -91,6 +93,7 @@ ALL_MACHINES = \
cpu-m10300.lo \
cpu-maxq.lo \
cpu-mcore.lo \
+ cpu-mep.lo \
cpu-mips.lo \
cpu-mmix.lo \
cpu-mt.lo \
@@ -103,8 +106,10 @@ ALL_MACHINES = \
cpu-powerpc.lo \
cpu-rs6000.lo \
cpu-s390.lo \
+ cpu-score.lo \
cpu-sh.lo \
cpu-sparc.lo \
+ cpu-spu.lo \
cpu-tic30.lo \
cpu-tic4x.lo \
cpu-tic54x.lo \
@@ -125,6 +130,7 @@ ALL_MACHINES_CFILES = \
cpu-arm.c \
cpu-avr.c \
cpu-bfin.c \
+ cpu-cr16.c \
cpu-cris.c \
cpu-cr16c.c \
cpu-crx.c \
@@ -153,6 +159,7 @@ ALL_MACHINES_CFILES = \
cpu-m10300.c \
cpu-maxq.c \
cpu-mcore.c \
+ cpu-mep.c \
cpu-mips.c \
cpu-mmix.c \
cpu-mt.c \
@@ -165,8 +172,10 @@ ALL_MACHINES_CFILES = \
cpu-powerpc.c \
cpu-rs6000.c \
cpu-s390.c \
+ cpu-score.c \
cpu-sh.c \
cpu-sparc.c \
+ cpu-spu.c \
cpu-tic30.c \
cpu-tic4x.c \
cpu-tic54x.c \
@@ -235,6 +244,7 @@ BFD32_BACKENDS = \
elf32-arm.lo \
elf32-avr.lo \
elf32-bfin.lo \
+ elf32-cr16.lo \
elf32-cr16c.lo \
elf32-cris.lo \
elf32-crx.lo \
@@ -262,6 +272,7 @@ BFD32_BACKENDS = \
elf-m10200.lo \
elf-m10300.lo \
elf32-mcore.lo \
+ elf32-mep.lo \
elfxx-mips.lo \
elf32-mips.lo \
elf32-mt.lo \
@@ -271,12 +282,14 @@ BFD32_BACKENDS = \
elf32-pj.lo \
elf32-ppc.lo \
elf32-s390.lo \
+ elf32-score.lo \
elf32-sh.lo \
elf32-sh-symbian.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
elfxx-sparc.lo \
elf32-sparc.lo \
+ elf32-spu.lo \
elf32-v850.lo \
elf32-vax.lo \
elf32-xstormy16.lo \
@@ -284,6 +297,7 @@ BFD32_BACKENDS = \
elf32-xc16x.lo \
elf32.lo \
elflink.lo \
+ elf-attrs.lo \
elf-strtab.lo \
elf-eh-frame.lo \
elf-vxworks.lo \
@@ -323,6 +337,8 @@ BFD32_BACKENDS = \
pef.lo \
pe-arm.lo \
pei-arm.lo \
+ pe-arm-wince.lo \
+ pei-arm-wince.lo \
pe-i386.lo \
pei-i386.lo \
pe-mcore.lo \
@@ -407,6 +423,7 @@ BFD32_BACKENDS_CFILES = \
elf32-arm.c \
elf32-avr.c \
elf32-bfin.c \
+ elf32-cr16.c \
elf32-cr16c.c \
elf32-cris.c \
elf32-crx.c \
@@ -434,6 +451,7 @@ BFD32_BACKENDS_CFILES = \
elf-m10200.c \
elf-m10300.c \
elf32-mcore.c \
+ elf32-mep.c \
elfxx-mips.c \
elf32-mips.c \
elf32-mt.c \
@@ -445,10 +463,12 @@ BFD32_BACKENDS_CFILES = \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
+ elf32-score.c \
elf32-sh.c \
elf32-sh-symbian.c \
elfxx-sparc.c \
elf32-sparc.c \
+ elf32-spu.c \
elf32-v850.c \
elf32-vax.c \
elf32-xstormy16.c \
@@ -456,6 +476,7 @@ BFD32_BACKENDS_CFILES = \
elf32-xc16x.c \
elf32.c \
elflink.c \
+ elf-attrs.c \
elf-strtab.c \
elf-eh-frame.c \
elf-vxworks.c \
@@ -495,6 +516,8 @@ BFD32_BACKENDS_CFILES = \
pef.c \
pe-arm.c \
pei-arm.c \
+ pe-arm-wince.c \
+ pei-arm-wince.c \
pe-i386.c \
pei-i386.c \
pe-mcore.c \
@@ -538,6 +561,7 @@ BFD64_BACKENDS = \
coff64-rs6000.lo \
demo64.lo \
efi-app-ia64.lo \
+ efi-app-x86_64.lo \
elf64-x86-64.lo \
elf64-alpha.lo \
elf64-hppa.lo \
@@ -555,7 +579,11 @@ BFD64_BACKENDS = \
mmo.lo \
nlm32-alpha.lo \
nlm64.lo \
- pepigen.lo
+ coff-x86_64.lo \
+ pe-x86_64.lo \
+ pei-x86_64.lo \
+ pepigen.lo \
+ pex64igen.lo
BFD64_BACKENDS_CFILES = \
aix5ppc-core.c \
@@ -564,6 +592,7 @@ BFD64_BACKENDS_CFILES = \
coff64-rs6000.c \
demo64.c \
efi-app-ia64.c \
+ efi-app-x86_64.c \
elf64-x86-64.c \
elf64-alpha.c \
elf64-hppa.c \
@@ -578,7 +607,10 @@ BFD64_BACKENDS_CFILES = \
elf64.c \
mmo.c \
nlm32-alpha.c \
- nlm64.c
+ nlm64.c \
+ coff-x86_64.c \
+ pe-x86_64.c \
+ pei-x86_64.c
OPTIONAL_BACKENDS = \
aix386-core.lo \
@@ -612,11 +644,10 @@ CONFIG_STATUS_DEPENDENCIES = \
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
BFD_BACKENDS = @bfd_backends@
-BFD_LIBS = @bfd_libs@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
-INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
+INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) @INCINTL@
# C source files that correspond to .o's.
SOURCE_CFILES = \
@@ -628,7 +659,7 @@ SOURCE_CFILES = \
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
+ elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
@@ -698,7 +729,8 @@ install-html-recursive:
# BFD_BACKENDS Routines the configured targets need.
# BFD_MACHINES Architecture-specific routines the configured targets need.
# COREFILE Core file routines for a native configuration
-OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
+# bfd64_libs Routines for 64bit support
+OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@
stamp-ofiles: Makefile
rm -f tofiles
@@ -715,10 +747,12 @@ stamp-ofiles: Makefile
ofiles: stamp-ofiles ; @true
-libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) $(BFD64_LIBS_CFILES)
+# Since BFD64_LIBS is optional and we can't have substitution in
+# libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead.
+libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
-libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
+libbfd_la_LDFLAGS = -release `cat libtool-soversion` @WIN32LDFLAGS@
# libtool will build .libs/libbfd.a. We create libbfd.a in the build
# directory so that we don't have to convert all the programs that use
@@ -756,6 +790,9 @@ targets.lo: targets.c Makefile
archures.lo: archures.c Makefile
$(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c
+dwarf2.lo: dwarf2.c Makefile
+ $(LIBTOOL) --mode=compile $(COMPILE) -c -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c
+
elf32-target.h : elfxx-target.h
rm -f elf32-target.h
sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
@@ -786,6 +823,11 @@ pepigen.c : peXXigen.c
sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
mv -f pepigen.new pepigen.c
+pex64igen.c: peXXigen.c
+ rm -f pex64igen.c
+ sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
+ mv -f pex64igen.new pex64igen.c
+
BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
LOCAL_H_DEPS= libbfd.h sysdep.h config.h
$(BFD32_LIBS) \
@@ -929,17 +971,26 @@ MOSTLYCLEANFILES = ofiles stamp-ofiles
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
-DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
+DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
@echo "creating $@"
@bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
+ bfd_soversion="$(VERSION)" ;\
+ bfd_version_package="\"$(PKGVERSION)\"" ;\
+ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
if test "x$(RELEASE)" = x ; then \
bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
- bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
+ bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
+ bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
fi ;\
- sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
+ sed -e "s,@bfd_version@,$$bfd_version," \
+ -e "s,@bfd_version_string@,$$bfd_version_string," \
+ -e "s,@bfd_version_package@,$$bfd_version_package," \
+ -e "s,@report_bugs_to@,$$report_bugs_to," \
+ < $(srcdir)/version.h > $@; \
+ echo "$${bfd_soversion}" > libtool-soversion
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -950,11 +1001,12 @@ archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/safe-ctype.h
-bfd.lo: bfd.c bfdver.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h libcoff.h \
- libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+bfd.lo: bfd.c $(INCDIR)/filenames.h bfdver.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h
bfdio.lo: bfdio.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
bfdwin.lo: bfdwin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cache.lo: cache.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
@@ -1008,6 +1060,7 @@ cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h
cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-bfin.lo: cpu-bfin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-cr16.lo: cpu-cr16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-cr16c.lo: cpu-cr16c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-crx.lo: cpu-crx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1040,6 +1093,7 @@ cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-maxq.lo: cpu-maxq.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-mep.lo: cpu-mep.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-mt.lo: cpu-mt.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1055,9 +1109,11 @@ cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h
cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-score.lo: cpu-score.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(srcdir)/../opcodes/sh-opc.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-spu.lo: cpu-spu.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1127,7 +1183,8 @@ coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
- coff-m68k.c $(INCDIR)/hashtab.h libcoff.h $(INCDIR)/bfdlink.h \
+ coff-m68k.c $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \
@@ -1197,7 +1254,7 @@ coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h \
$(INCDIR)/coff/ti.h $(INCDIR)/coff/internal.h libcoff.h \
coffcode.h coffswap.h
-coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
+coff-tic80.lo: coff-tic80.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \
@@ -1260,11 +1317,16 @@ elf32-arm.lo: elf32-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ $(INCDIR)/elf/reloc-macros.h elf32-avr.h elf32-target.h
elf32-bfin.lo: elf32-bfin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/bfin.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \
+ elf32-target.h
+elf32-cr16.lo: elf32-cr16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/cr16.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-cr16c.lo: elf32-cr16c.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/cr16c.h \
$(INCDIR)/elf/reloc-macros.h elf-bfd.h $(INCDIR)/elf/common.h \
@@ -1378,19 +1440,24 @@ elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-mep.lo: elf32-mep.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mep.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ elf32-target.h
elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elfxx-mips.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h elf-vxworks.h
+ elf-vxworks.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h
elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h elf-vxworks.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
- ecoffswap.h elf32-target.h elf-vxworks.h
+ ecoffswap.h elf32-target.h
elf32-mt.lo: elf32-mt.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mt.h \
@@ -1422,9 +1489,9 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
- elf32-sh64.h elf32-sh.c $(INCDIR)/hashtab.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
- $(srcdir)/../opcodes/sh-opc.h elf32-target.h
+ elf32-sh64.h elf32-sh.c $(INCDIR)/hashtab.h elf-vxworks.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h
elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
@@ -1434,27 +1501,36 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.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-score.lo: elf32-score.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
- $(srcdir)/../opcodes/sh-opc.h elf32-target.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf-vxworks.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h
elf32-sh-symbian.lo: elf32-sh-symbian.c elf32-sh.c \
$(INCDIR)/filenames.h $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/libiberty.h $(srcdir)/../opcodes/sh-opc.h \
- elf32-target.h
+ $(INCDIR)/elf/external.h elf-vxworks.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h
elfxx-sparc.lo: elfxx-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \
- elfxx-sparc.h elf-vxworks.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/sparc.h elfxx-sparc.h elf-vxworks.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \
- elfxx-sparc.h elf32-target.h elf-vxworks.h
+ elfxx-sparc.h elf-vxworks.h elf32-target.h
+elf32-spu.lo: elf32-spu.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/spu.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-spu.h elf32-target.h
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h \
@@ -1486,6 +1562,9 @@ elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/libiberty.h $(INCDIR)/objalloc.h
+elf-attrs.lo: elf-attrs.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h
@@ -1570,7 +1649,7 @@ m88kopenbsd.lo: m88kopenbsd.c netbsd.h $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h
-mach-o.lo: mach-o.c mach-o.h $(INCDIR)/filenames.h \
+mach-o.lo: mach-o.c $(INCDIR)/filenames.h mach-o.h \
$(INCDIR)/hashtab.h $(INCDIR)/libiberty.h mach-o-target.c
mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
@@ -1610,8 +1689,8 @@ pdp11.lo: pdp11.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
$(INCDIR)/safe-ctype.h
-pef.lo: pef.c $(INCDIR)/safe-ctype.h pef.h pef-traceback.h \
- $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
+pef.lo: pef.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ pef.h pef-traceback.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
$(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
@@ -1620,6 +1699,16 @@ pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \
$(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+pe-arm-wince.lo: pe-arm-wince.c pe-arm.c $(INCDIR)/filenames.h \
+ coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+pei-arm-wince.lo: pei-arm-wince.c pei-arm.c $(INCDIR)/filenames.h \
+ coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \
$(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
@@ -1662,7 +1751,7 @@ pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \
$(INCDIR)/hashtab.h $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-ppcboot.lo: ppcboot.c $(INCDIR)/safe-ctype.h $(INCDIR)/filenames.h \
+ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/hashtab.h
reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \
@@ -1703,7 +1792,7 @@ vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h vms.h
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h vms.h
-vms-hdr.lo: vms-hdr.c bfdver.h $(INCDIR)/filenames.h \
+vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h bfdver.h \
$(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h \
vms.h
vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
@@ -1713,12 +1802,12 @@ vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
libcoff.h libxcoff.h
-xsym.lo: xsym.c xsym.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+xsym.lo: xsym.c $(INCDIR)/filenames.h xsym.h $(INCDIR)/hashtab.h
xtensa-isa.lo: xtensa-isa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-isa-internal.h
xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa.h \
$(INCDIR)/xtensa-isa-internal.h
-aix5ppc-core.lo: aix5ppc-core.c
+aix5ppc-core.lo: aix5ppc-core.c $(INCDIR)/filenames.h
aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
@@ -1740,6 +1829,11 @@ efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
+efi-app-x86_64.lo: efi-app-x86_64.c $(INCDIR)/filenames.h \
+ coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
+ coffcode.h peicode.h libpei.h
elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/x86-64.h \
@@ -1808,6 +1902,21 @@ nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h
+coff-x86_64.lo: coff-x86_64.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
+ coffswap.h
+pe-x86_64.lo: pe-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
+ peicode.h libpei.h
+pei-x86_64.lo: pei-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
+ peicode.h libpei.h
aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
@@ -1824,16 +1933,19 @@ elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \
$(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \
- elf32-target.h
+ $(INCDIR)/hashtab.h elf32-target.h
elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \
$(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \
- elf64-target.h
+ $(INCDIR)/hashtab.h elf64-target.h
peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
+pex64igen.lo: pex64igen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/bfd/Makefile.in b/contrib/binutils/bfd/Makefile.in
index 8ed9056..8f4580e 100644
--- a/contrib/binutils/bfd/Makefile.in
+++ b/contrib/binutils/bfd/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,8 +15,6 @@
@SET_MAKE@
-SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -49,10 +47,17 @@ DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub README \
$(srcdir)/../config.sub
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../config/stdint.m4 $(top_srcdir)/../libtool.m4 \
+ $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+ $(top_srcdir)/../ltversion.m4 $(top_srcdir)/bfd.m4 \
+ $(top_srcdir)/warning.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -80,19 +85,18 @@ am__objects_1 = archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo \
opncls.lo reloc.lo section.lo syms.lo targets.lo hash.lo \
linker.lo srec.lo binary.lo tekhex.lo ihex.lo stabs.lo \
stab-syms.lo merge.lo dwarf2.lo simple.lo
-am__objects_2 = archive64.lo
-am_libbfd_la_OBJECTS = $(am__objects_1) $(am__objects_2)
+am_libbfd_la_OBJECTS = $(am__objects_1)
libbfd_la_OBJECTS = $(am_libbfd_la_OBJECTS)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(libbfd_a_SOURCES) $(libbfd_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -105,7 +109,6 @@ ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
@@ -131,20 +134,24 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
+DEBUGDIR = @DEBUGDIR@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GMOFILES = @GMOFILES@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
+GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
+GREP = @GREP@
HDEFINES = @HDEFINES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
@@ -152,10 +159,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -167,6 +174,8 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -176,14 +185,16 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-POFILES = @POFILES@
+PKGVERSION = @PKGVERSION@
POSUB = @POSUB@
RANLIB = @RANLIB@
+REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@
+REPORT_BUGS_TO = @REPORT_BUGS_TO@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TDEFINES = @TDEFINES@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
@@ -192,6 +203,7 @@ WIN32LIBADD = @WIN32LIBADD@
XGETTEXT = @XGETTEXT@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_backends = @all_backends@
@@ -202,10 +214,10 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+bfd64_libs = @bfd64_libs@
bfd_backends = @bfd_backends@
bfd_default_target_size = @bfd_default_target_size@
bfd_file_ptr = @bfd_file_ptr@
-bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
bfd_ufile_ptr = @bfd_ufile_ptr@
bfdincludedir = @bfdincludedir@
@@ -230,10 +242,10 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -251,6 +263,7 @@ target_vendor = @target_vendor@
tdefaults = @tdefaults@
wordsize = @wordsize@
AUTOMAKE_OPTIONS = 1.9 cygnus
+ACLOCAL_AMFLAGS = -I . -I .. -I ../config
# Uncomment the following line when doing a release.
# RELEASE=y
@@ -299,6 +312,7 @@ ALL_MACHINES = \
cpu-arm.lo \
cpu-avr.lo \
cpu-bfin.lo \
+ cpu-cr16.lo \
cpu-cr16c.lo \
cpu-cris.lo \
cpu-crx.lo \
@@ -327,6 +341,7 @@ ALL_MACHINES = \
cpu-m10300.lo \
cpu-maxq.lo \
cpu-mcore.lo \
+ cpu-mep.lo \
cpu-mips.lo \
cpu-mmix.lo \
cpu-mt.lo \
@@ -339,8 +354,10 @@ ALL_MACHINES = \
cpu-powerpc.lo \
cpu-rs6000.lo \
cpu-s390.lo \
+ cpu-score.lo \
cpu-sh.lo \
cpu-sparc.lo \
+ cpu-spu.lo \
cpu-tic30.lo \
cpu-tic4x.lo \
cpu-tic54x.lo \
@@ -361,6 +378,7 @@ ALL_MACHINES_CFILES = \
cpu-arm.c \
cpu-avr.c \
cpu-bfin.c \
+ cpu-cr16.c \
cpu-cris.c \
cpu-cr16c.c \
cpu-crx.c \
@@ -389,6 +407,7 @@ ALL_MACHINES_CFILES = \
cpu-m10300.c \
cpu-maxq.c \
cpu-mcore.c \
+ cpu-mep.c \
cpu-mips.c \
cpu-mmix.c \
cpu-mt.c \
@@ -401,8 +420,10 @@ ALL_MACHINES_CFILES = \
cpu-powerpc.c \
cpu-rs6000.c \
cpu-s390.c \
+ cpu-score.c \
cpu-sh.c \
cpu-sparc.c \
+ cpu-spu.c \
cpu-tic30.c \
cpu-tic4x.c \
cpu-tic54x.c \
@@ -472,6 +493,7 @@ BFD32_BACKENDS = \
elf32-arm.lo \
elf32-avr.lo \
elf32-bfin.lo \
+ elf32-cr16.lo \
elf32-cr16c.lo \
elf32-cris.lo \
elf32-crx.lo \
@@ -499,6 +521,7 @@ BFD32_BACKENDS = \
elf-m10200.lo \
elf-m10300.lo \
elf32-mcore.lo \
+ elf32-mep.lo \
elfxx-mips.lo \
elf32-mips.lo \
elf32-mt.lo \
@@ -508,12 +531,14 @@ BFD32_BACKENDS = \
elf32-pj.lo \
elf32-ppc.lo \
elf32-s390.lo \
+ elf32-score.lo \
elf32-sh.lo \
elf32-sh-symbian.lo \
elf32-sh64.lo \
elf32-sh64-com.lo \
elfxx-sparc.lo \
elf32-sparc.lo \
+ elf32-spu.lo \
elf32-v850.lo \
elf32-vax.lo \
elf32-xstormy16.lo \
@@ -521,6 +546,7 @@ BFD32_BACKENDS = \
elf32-xc16x.lo \
elf32.lo \
elflink.lo \
+ elf-attrs.lo \
elf-strtab.lo \
elf-eh-frame.lo \
elf-vxworks.lo \
@@ -560,6 +586,8 @@ BFD32_BACKENDS = \
pef.lo \
pe-arm.lo \
pei-arm.lo \
+ pe-arm-wince.lo \
+ pei-arm-wince.lo \
pe-i386.lo \
pei-i386.lo \
pe-mcore.lo \
@@ -644,6 +672,7 @@ BFD32_BACKENDS_CFILES = \
elf32-arm.c \
elf32-avr.c \
elf32-bfin.c \
+ elf32-cr16.c \
elf32-cr16c.c \
elf32-cris.c \
elf32-crx.c \
@@ -671,6 +700,7 @@ BFD32_BACKENDS_CFILES = \
elf-m10200.c \
elf-m10300.c \
elf32-mcore.c \
+ elf32-mep.c \
elfxx-mips.c \
elf32-mips.c \
elf32-mt.c \
@@ -682,10 +712,12 @@ BFD32_BACKENDS_CFILES = \
elf32-sh64.c \
elf32-sh64-com.c \
elf32-s390.c \
+ elf32-score.c \
elf32-sh.c \
elf32-sh-symbian.c \
elfxx-sparc.c \
elf32-sparc.c \
+ elf32-spu.c \
elf32-v850.c \
elf32-vax.c \
elf32-xstormy16.c \
@@ -693,6 +725,7 @@ BFD32_BACKENDS_CFILES = \
elf32-xc16x.c \
elf32.c \
elflink.c \
+ elf-attrs.c \
elf-strtab.c \
elf-eh-frame.c \
elf-vxworks.c \
@@ -732,6 +765,8 @@ BFD32_BACKENDS_CFILES = \
pef.c \
pe-arm.c \
pei-arm.c \
+ pe-arm-wince.c \
+ pei-arm-wince.c \
pe-i386.c \
pei-i386.c \
pe-mcore.c \
@@ -776,6 +811,7 @@ BFD64_BACKENDS = \
coff64-rs6000.lo \
demo64.lo \
efi-app-ia64.lo \
+ efi-app-x86_64.lo \
elf64-x86-64.lo \
elf64-alpha.lo \
elf64-hppa.lo \
@@ -793,7 +829,11 @@ BFD64_BACKENDS = \
mmo.lo \
nlm32-alpha.lo \
nlm64.lo \
- pepigen.lo
+ coff-x86_64.lo \
+ pe-x86_64.lo \
+ pei-x86_64.lo \
+ pepigen.lo \
+ pex64igen.lo
BFD64_BACKENDS_CFILES = \
aix5ppc-core.c \
@@ -802,6 +842,7 @@ BFD64_BACKENDS_CFILES = \
coff64-rs6000.c \
demo64.c \
efi-app-ia64.c \
+ efi-app-x86_64.c \
elf64-x86-64.c \
elf64-alpha.c \
elf64-hppa.c \
@@ -816,7 +857,10 @@ BFD64_BACKENDS_CFILES = \
elf64.c \
mmo.c \
nlm32-alpha.c \
- nlm64.c
+ nlm64.c \
+ coff-x86_64.c \
+ pe-x86_64.c \
+ pei-x86_64.c
OPTIONAL_BACKENDS = \
aix386-core.lo \
@@ -852,10 +896,9 @@ CONFIG_STATUS_DEPENDENCIES = \
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
BFD_BACKENDS = @bfd_backends@
-BFD_LIBS = @bfd_libs@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
-INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) -I$(srcdir)/../intl -I../intl
+INCLUDES = @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES) @INCINTL@
# C source files that correspond to .o's.
SOURCE_CFILES = \
@@ -867,7 +910,7 @@ SOURCE_CFILES = \
$(OPTIONAL_BACKENDS_CFILES)
BUILD_CFILES = \
- elf32-ia64.c elf64-ia64.c peigen.c pepigen.c
+ elf32-ia64.c elf64-ia64.c peigen.c pepigen.c pex64igen.c
CFILES = $(SOURCE_CFILES) $(BUILD_CFILES)
SOURCE_HFILES = \
@@ -892,11 +935,15 @@ BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
# BFD_BACKENDS Routines the configured targets need.
# BFD_MACHINES Architecture-specific routines the configured targets need.
# COREFILE Core file routines for a native configuration
-OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
-libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) $(BFD64_LIBS_CFILES)
+# bfd64_libs Routines for 64bit support
+OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@ @bfd64_libs@
+
+# Since BFD64_LIBS is optional and we can't have substitution in
+# libbfd_la_SOURCES, we put BFD64_LIBS in OFILES instead.
+libbfd_la_SOURCES = $(BFD32_LIBS_CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
-libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
+libbfd_la_LDFLAGS = -release `cat libtool-soversion` @WIN32LDFLAGS@
# libtool will build .libs/libbfd.a. We create libbfd.a in the build
# directory so that we don't have to convert all the programs that use
@@ -919,7 +966,7 @@ MOSTLYCLEANFILES = ofiles stamp-ofiles
CLEANFILES = bfd.h dep.sed stmp-bfd-h DEP DEPA DEP1 DEP2 libbfd.a stamp-lib \
stmp-bin2-h stmp-lbfd-h stmp-lcoff-h
-DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES)
+DISTCLEANFILES = $(BUILD_CFILES) $(BUILD_HFILES) libtool-soversion
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -931,15 +978,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
+ cd $(srcdir) && $(AUTOMAKE) --cygnus \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
+ $(AUTOMAKE) --cygnus Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -1340,6 +1387,9 @@ targets.lo: targets.c Makefile
archures.lo: archures.c Makefile
$(LIBTOOL) --mode=compile $(COMPILE) -c $(TDEFAULTS) $(srcdir)/archures.c
+dwarf2.lo: dwarf2.c Makefile
+ $(LIBTOOL) --mode=compile $(COMPILE) -c -DDEBUGDIR=\"$(DEBUGDIR)\" $(srcdir)/dwarf2.c
+
elf32-target.h : elfxx-target.h
rm -f elf32-target.h
sed -e s/NN/32/g < $(srcdir)/elfxx-target.h > elf32-target.new
@@ -1369,6 +1419,11 @@ pepigen.c : peXXigen.c
rm -f pepigen.c
sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
mv -f pepigen.new pepigen.c
+
+pex64igen.c: peXXigen.c
+ rm -f pex64igen.c
+ sed -e s/XX/pex64/g < $(srcdir)/peXXigen.c > pex64igen.new
+ mv -f pex64igen.new pex64igen.c
$(BFD32_LIBS) \
$(BFD64_LIBS) \
$(ALL_MACHINES) \
@@ -1501,11 +1556,20 @@ bfdver.h: $(srcdir)/version.h $(srcdir)/Makefile.in
@echo "creating $@"
@bfd_version=`echo "$(VERSION)" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$$/\1\2\3\4\5/'` ;\
bfd_version_string="\"$(VERSION)\"" ;\
+ bfd_soversion="$(VERSION)" ;\
+ bfd_version_package="\"$(PKGVERSION)\"" ;\
+ report_bugs_to="\"$(REPORT_BUGS_TO)\"" ;\
if test "x$(RELEASE)" = x ; then \
bfd_version_date=`sed -n -e 's/.*DATE //p' < $(srcdir)/version.h` ;\
- bfd_version_string="\"$(VERSION) $${bfd_version_date}\"" ;\
+ bfd_version_string="\"$(VERSION).$${bfd_version_date}\"" ;\
+ bfd_soversion="$(VERSION).$${bfd_version_date}" ;\
fi ;\
- sed -e "s/@bfd_version@/$$bfd_version/" -e "s/@bfd_version_string@/$$bfd_version_string/" < $(srcdir)/version.h > $@
+ sed -e "s,@bfd_version@,$$bfd_version," \
+ -e "s,@bfd_version_string@,$$bfd_version_string," \
+ -e "s,@bfd_version_package@,$$bfd_version_package," \
+ -e "s,@report_bugs_to@,$$report_bugs_to," \
+ < $(srcdir)/version.h > $@; \
+ echo "$${bfd_soversion}" > libtool-soversion
# What appears below is generated by a hacked mkdep using gcc -MM.
@@ -1516,11 +1580,12 @@ archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/safe-ctype.h
-bfd.lo: bfd.c bfdver.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h libcoff.h \
- libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+bfd.lo: bfd.c $(INCDIR)/filenames.h bfdver.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h
bfdio.lo: bfdio.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
bfdwin.lo: bfdwin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cache.lo: cache.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
@@ -1574,6 +1639,7 @@ cpu-arm.lo: cpu-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h
cpu-avr.lo: cpu-avr.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-bfin.lo: cpu-bfin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-cr16.lo: cpu-cr16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-cris.lo: cpu-cris.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-cr16c.lo: cpu-cr16c.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-crx.lo: cpu-crx.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1606,6 +1672,7 @@ cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-maxq.lo: cpu-maxq.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-mep.lo: cpu-mep.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-mt.lo: cpu-mt.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1621,9 +1688,11 @@ cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h
cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-score.lo: cpu-score.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(srcdir)/../opcodes/sh-opc.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+cpu-spu.lo: cpu-spu.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic4x.lo: cpu-tic4x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
@@ -1693,7 +1762,8 @@ coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
- coff-m68k.c $(INCDIR)/hashtab.h libcoff.h $(INCDIR)/bfdlink.h \
+ coff-m68k.c $(INCDIR)/hashtab.h $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/h8300.h \
@@ -1763,7 +1833,7 @@ coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h \
$(INCDIR)/coff/ti.h $(INCDIR)/coff/internal.h libcoff.h \
coffcode.h coffswap.h
-coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
+coff-tic80.lo: coff-tic80.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \
@@ -1826,11 +1896,16 @@ elf32-arm.lo: elf32-arm.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf32-avr.lo: elf32-avr.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/avr.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ $(INCDIR)/elf/reloc-macros.h elf32-avr.h elf32-target.h
elf32-bfin.lo: elf32-bfin.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/bfin.h \
- $(INCDIR)/elf/reloc-macros.h elf32-target.h
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/dwarf2.h \
+ elf32-target.h
+elf32-cr16.lo: elf32-cr16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/elf/cr16.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-cr16c.lo: elf32-cr16c.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/cr16c.h \
$(INCDIR)/elf/reloc-macros.h elf-bfd.h $(INCDIR)/elf/common.h \
@@ -1944,19 +2019,24 @@ elf32-mcore.lo: elf32-mcore.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/mcore.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-mep.lo: elf32-mep.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mep.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ elf32-target.h
elfxx-mips.lo: elfxx-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/libiberty.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
elfxx-mips.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h elf-vxworks.h
+ elf-vxworks.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h
elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/bfdlink.h genlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfxx-mips.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h elf-vxworks.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
- ecoffswap.h elf32-target.h elf-vxworks.h
+ ecoffswap.h elf32-target.h
elf32-mt.lo: elf32-mt.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/mt.h \
@@ -1988,9 +2068,9 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf32-sh64.lo: elf32-sh64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(srcdir)/../opcodes/sh64-opc.h \
- elf32-sh64.h elf32-sh.c $(INCDIR)/hashtab.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
- $(srcdir)/../opcodes/sh-opc.h elf32-target.h
+ elf32-sh64.h elf32-sh.c $(INCDIR)/hashtab.h elf-vxworks.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h
elf32-sh64-com.lo: elf32-sh64-com.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
@@ -2000,27 +2080,36 @@ elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.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-score.lo: elf32-score.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
- $(srcdir)/../opcodes/sh-opc.h elf32-target.h
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elf-vxworks.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h
elf32-sh-symbian.lo: elf32-sh-symbian.c elf32-sh.c \
$(INCDIR)/filenames.h $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/libiberty.h $(srcdir)/../opcodes/sh-opc.h \
- elf32-target.h
+ $(INCDIR)/elf/external.h elf-vxworks.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ $(srcdir)/../opcodes/sh-opc.h elf32-sh-relocs.h elf32-target.h
elfxx-sparc.lo: elfxx-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \
- elfxx-sparc.h elf-vxworks.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/sparc.h elfxx-sparc.h elf-vxworks.h
elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sparc.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/sparc.h \
- elfxx-sparc.h elf32-target.h elf-vxworks.h
+ elfxx-sparc.h elf-vxworks.h elf32-target.h
+elf32-spu.lo: elf32-spu.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/spu.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-spu.h elf32-target.h
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h \
@@ -2052,6 +2141,9 @@ elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/libiberty.h $(INCDIR)/objalloc.h
+elf-attrs.lo: elf-attrs.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h
@@ -2136,7 +2228,7 @@ m88kopenbsd.lo: m88kopenbsd.c netbsd.h $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h libaout.h $(INCDIR)/bfdlink.h aout-target.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h
-mach-o.lo: mach-o.c mach-o.h $(INCDIR)/filenames.h \
+mach-o.lo: mach-o.c $(INCDIR)/filenames.h mach-o.h \
$(INCDIR)/hashtab.h $(INCDIR)/libiberty.h mach-o-target.c
mipsbsd.lo: mipsbsd.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
@@ -2176,8 +2268,8 @@ pdp11.lo: pdp11.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
$(INCDIR)/safe-ctype.h
-pef.lo: pef.c $(INCDIR)/safe-ctype.h pef.h pef-traceback.h \
- $(INCDIR)/filenames.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
+pef.lo: pef.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ pef.h pef-traceback.h $(INCDIR)/hashtab.h $(INCDIR)/libiberty.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
$(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
@@ -2186,6 +2278,16 @@ pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \
$(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+pe-arm-wince.lo: pe-arm-wince.c pe-arm.c $(INCDIR)/filenames.h \
+ coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+pei-arm-wince.lo: pei-arm-wince.c pei-arm.c $(INCDIR)/filenames.h \
+ coff-arm.c $(INCDIR)/hashtab.h $(INCDIR)/coff/arm.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \
$(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
@@ -2228,7 +2330,7 @@ pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \
$(INCDIR)/hashtab.h $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
$(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
-ppcboot.lo: ppcboot.c $(INCDIR)/safe-ctype.h $(INCDIR)/filenames.h \
+ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/hashtab.h
reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/bfdlink.h genlink.h $(INCDIR)/coff/internal.h \
@@ -2269,7 +2371,7 @@ vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h vms.h
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h vms.h
-vms-hdr.lo: vms-hdr.c bfdver.h $(INCDIR)/filenames.h \
+vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h bfdver.h \
$(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/hashtab.h \
vms.h
vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
@@ -2279,12 +2381,12 @@ vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/hashtab.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
libcoff.h libxcoff.h
-xsym.lo: xsym.c xsym.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
+xsym.lo: xsym.c $(INCDIR)/filenames.h xsym.h $(INCDIR)/hashtab.h
xtensa-isa.lo: xtensa-isa.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-isa-internal.h
xtensa-modules.lo: xtensa-modules.c $(INCDIR)/xtensa-isa.h \
$(INCDIR)/xtensa-isa-internal.h
-aix5ppc-core.lo: aix5ppc-core.c
+aix5ppc-core.lo: aix5ppc-core.c $(INCDIR)/filenames.h
aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/bfdlink.h libaout.h $(INCDIR)/hashtab.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
@@ -2306,6 +2408,11 @@ efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
$(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
+efi-app-x86_64.lo: efi-app-x86_64.c $(INCDIR)/filenames.h \
+ coff-x86_64.c $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h \
+ coffcode.h peicode.h libpei.h
elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/x86-64.h \
@@ -2374,6 +2481,21 @@ nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
libnlm.h $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h \
$(INCDIR)/nlm/external.h
+coff-x86_64.lo: coff-x86_64.c $(INCDIR)/filenames.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
+ coffswap.h
+pe-x86_64.lo: pe-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
+ peicode.h libpei.h
+pei-x86_64.lo: pei-x86_64.c $(INCDIR)/filenames.h coff-x86_64.c \
+ $(INCDIR)/hashtab.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h coffcode.h \
+ peicode.h libpei.h
aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
$(INCDIR)/hashtab.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h
@@ -2390,18 +2512,21 @@ elf32-ia64.lo: elf32-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \
$(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \
- elf32-target.h
+ $(INCDIR)/hashtab.h elf32-target.h
elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h \
$(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/objalloc.h \
- elf64-target.h
+ $(INCDIR)/hashtab.h elf64-target.h
peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
+pex64igen.lo: pex64igen.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h libpei.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/binutils/bfd/acinclude.m4 b/contrib/binutils/bfd/acinclude.m4
index 95e3d4a..cd4fd55 100644
--- a/contrib/binutils/bfd/acinclude.m4
+++ b/contrib/binutils/bfd/acinclude.m4
@@ -1,7 +1,3 @@
-sinclude(../config/acx.m4)
-sinclude(../bfd/bfd.m4)
-sinclude(../bfd/warning.m4)
-
dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
AC_DEFUN([BFD_BINARY_FOPEN],
[AC_REQUIRE([AC_CANONICAL_TARGET])
@@ -45,22 +41,6 @@ else
fi
AC_SUBST(EXEEXT_FOR_BUILD)])dnl
-sinclude(../libtool.m4)
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_DEFUN([AM_DISABLE_SHARED],)
-AC_SUBST(LIBTOOL)
-])
-
-sinclude(../gettext.m4)
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
-])
-
AC_DEFUN([AM_INSTALL_LIBBFD],
[AC_MSG_CHECKING([whether to install libbfd])
AC_ARG_ENABLE(install-libbfd,
diff --git a/contrib/binutils/bfd/aclocal.m4 b/contrib/binutils/bfd/aclocal.m4
index d5f3158..9dfea06 100644
--- a/contrib/binutils/bfd/aclocal.m4
+++ b/contrib/binutils/bfd/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
@@ -28,7 +28,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.5])])
+ [AM_AUTOMAKE_VERSION([1.9.6])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -480,27 +480,6 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
@@ -889,4 +868,18 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([../config/acx.m4])
+m4_include([../config/depstand.m4])
+m4_include([../config/gettext-sister.m4])
+m4_include([../config/lead-dot.m4])
+m4_include([../config/nls.m4])
+m4_include([../config/po.m4])
+m4_include([../config/progtest.m4])
+m4_include([../config/stdint.m4])
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
+m4_include([bfd.m4])
+m4_include([warning.m4])
m4_include([acinclude.m4])
diff --git a/contrib/binutils/bfd/aout-arm.c b/contrib/binutils/bfd/aout-arm.c
index d8834a4..4b0d42c 100644
--- a/contrib/binutils/bfd/aout-arm.c
+++ b/contrib/binutils/bfd/aout-arm.c
@@ -1,6 +1,6 @@
/* BFD back-end for raw ARM a.out binaries.
- Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005,
+ 2007 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
/* Avoid multiple definitions from aoutx if supporting standard a.out
as well as our own. */
@@ -50,6 +50,7 @@
#define N_MAGIC(x) ((x).a_info & ~07200)
#define MY_bfd_reloc_type_lookup aoutarm_bfd_reloc_type_lookup
+#define MY_bfd_reloc_name_lookup aoutarm_bfd_reloc_name_lookup
#include "libaout.h"
#include "aout/aout64.h"
@@ -317,6 +318,22 @@ MY (bfd_reloc_type_lookup) (bfd *abfd,
}
}
+static reloc_howto_type *
+MY (bfd_reloc_name_lookup) (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (MY (howto_table)) / sizeof (MY (howto_table)[0]);
+ i++)
+ if (MY (howto_table)[i].name != NULL
+ && strcasecmp (MY (howto_table)[i].name, r_name) == 0)
+ return &MY (howto_table)[i];
+
+ return NULL;
+}
+
#define MY_swap_std_reloc_in MY (swap_std_reloc_in)
#define MY_swap_std_reloc_out MY (swap_std_reloc_out)
#define MY_get_section_contents _bfd_generic_get_section_contents
diff --git a/contrib/binutils/bfd/aout-target.h b/contrib/binutils/bfd/aout-target.h
index 5a30eda..3e5fa91 100644
--- a/contrib/binutils/bfd/aout-target.h
+++ b/contrib/binutils/bfd/aout-target.h
@@ -1,6 +1,6 @@
/* Define a target vector and some small routines for a variant of a.out.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -29,6 +29,7 @@
#endif
extern reloc_howto_type * NAME (aout, reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
+extern reloc_howto_type * NAME (aout, reloc_name_lookup) (bfd *, const char *);
/* Set parameters about this a.out file that are machine-dependent.
This routine is called from some_aout_object_p just before it returns. */
@@ -494,6 +495,9 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup NAME (aout, reloc_type_lookup)
#endif
+#ifndef MY_bfd_reloc_name_lookup
+#define MY_bfd_reloc_name_lookup NAME (aout, reloc_name_lookup)
+#endif
#ifndef MY_bfd_make_debug_symbol
#define MY_bfd_make_debug_symbol 0
#endif
diff --git a/contrib/binutils/bfd/aoutf1.h b/contrib/binutils/bfd/aoutf1.h
index cba4fbb..0353bfd 100644
--- a/contrib/binutils/bfd/aoutf1.h
+++ b/contrib/binutils/bfd/aoutf1.h
@@ -1,6 +1,6 @@
/* A.out "format 1" file handling code for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "aout/sun4.h"
@@ -566,6 +566,7 @@ sunos4_core_file_p (bfd *abfd)
struct internal_sunos_core internal_sunos_core;
char external_core[1];
} *mergem;
+ flagword flags;
if (bfd_bread ((void *) longbuf, (bfd_size_type) sizeof (longbuf), abfd)
!= sizeof (longbuf))
@@ -627,28 +628,31 @@ sunos4_core_file_p (bfd *abfd)
abfd->tdata.sun_core_data->hdr = core;
/* Create the sections. */
- core_stacksec (abfd) = bfd_make_section_anyway (abfd, ".stack");
+ flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
+ core_stacksec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".stack",
+ flags);
if (core_stacksec (abfd) == NULL)
/* bfd_release frees everything allocated after it's arg. */
goto loser;
- core_datasec (abfd) = bfd_make_section_anyway (abfd, ".data");
+ flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
+ core_datasec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".data",
+ flags);
if (core_datasec (abfd) == NULL)
goto loser;
- core_regsec (abfd) = bfd_make_section_anyway (abfd, ".reg");
+ flags = SEC_HAS_CONTENTS;
+ core_regsec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".reg",
+ flags);
if (core_regsec (abfd) == NULL)
goto loser;
- core_reg2sec (abfd) = bfd_make_section_anyway (abfd, ".reg2");
+ flags = SEC_HAS_CONTENTS;
+ core_reg2sec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".reg2",
+ flags);
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;
- core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
- core_reg2sec (abfd)->flags = SEC_HAS_CONTENTS;
-
core_stacksec (abfd)->size = core->c_ssize;
core_datasec (abfd)->size = core->c_dsize;
core_regsec (abfd)->size = core->c_regs_size;
diff --git a/contrib/binutils/bfd/aoutx.h b/contrib/binutils/bfd/aoutx.h
index 7dce072..09331aa 100644
--- a/contrib/binutils/bfd/aoutx.h
+++ b/contrib/binutils/bfd/aoutx.h
@@ -1,6 +1,6 @@
/* BFD semi-generic back-end for a.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -118,8 +118,8 @@ DESCRIPTION
#define KEEPIT udata.i
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "safe-ctype.h"
#include "bfdlink.h"
@@ -129,8 +129,6 @@ DESCRIPTION
#include "aout/stab_gnu.h"
#include "aout/ar.h"
-reloc_howto_type * NAME (aout, reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
-
/*
SUBSECTION
Relocations
@@ -319,6 +317,31 @@ NAME (aout, reloc_type_lookup) (bfd *abfd, bfd_reloc_code_real_type code)
}
}
+reloc_howto_type *
+NAME (aout, reloc_name_lookup) (bfd *abfd, const char *r_name)
+{
+ unsigned int i, size;
+ reloc_howto_type *howto_table;
+
+ if (obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE)
+ {
+ howto_table = howto_table_ext;
+ size = sizeof (howto_table_ext) / sizeof (howto_table_ext[0]);
+ }
+ else
+ {
+ howto_table = howto_table_std;
+ size = sizeof (howto_table_std) / sizeof (howto_table_std[0]);
+ }
+
+ for (i = 0; i < size; i++)
+ if (howto_table[i].name != NULL
+ && strcasecmp (howto_table[i].name, r_name) == 0)
+ return &howto_table[i];
+
+ return NULL;
+}
+
/*
SUBSECTION
Internal entry points
@@ -1193,26 +1216,21 @@ NAME (aout, new_section_hook) (bfd *abfd, asection *newsect)
{
obj_textsec (abfd)= newsect;
newsect->target_index = N_TEXT;
- return TRUE;
}
-
- if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
+ else 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"))
+ else if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
{
obj_bsssec (abfd) = newsect;
newsect->target_index = N_BSS;
- return TRUE;
}
}
/* We allow more than three sections internally. */
- return TRUE;
+ return _bfd_generic_new_section_hook (abfd, newsect);
}
bfd_boolean
@@ -1934,7 +1952,10 @@ NAME (aout, swap_std_reloc_out) (bfd *abfd,
if (bfd_is_com_section (output_section)
|| bfd_is_abs_section (output_section)
- || bfd_is_und_section (output_section))
+ || bfd_is_und_section (output_section)
+ /* PR gas/3041 a.out relocs against weak symbols
+ must be treated as if they were against externs. */
+ || (sym->flags & BSF_WEAK))
{
if (bfd_abs_section_ptr->symbol == sym)
{
@@ -2785,7 +2806,8 @@ NAME (aout, find_nearest_line) (bfd *abfd,
}
int
-NAME (aout, sizeof_headers) (bfd *abfd, bfd_boolean execable ATTRIBUTE_UNUSED)
+NAME (aout, sizeof_headers) (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return adata (abfd).exec_bytes_size;
}
diff --git a/contrib/binutils/bfd/archive.c b/contrib/binutils/bfd/archive.c
index 5a12f01..053ad47 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, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
@@ -129,8 +129,8 @@ SUBSECTION
" 18 " - Long name 18 characters long, extended pseudo-BSD.
*/
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "libbfd.h"
#include "aout/ar.h"
@@ -666,10 +666,7 @@ bfd_generic_archive_p (bfd *abfd)
first = bfd_openr_next_archived_file (abfd, NULL);
if (first != NULL)
{
- bfd_boolean fail;
-
first->target_defaulted = FALSE;
- fail = FALSE;
if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec)
{
@@ -915,12 +912,12 @@ bfd_slurp_armap (bfd *abfd)
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return FALSE;
- if (!strncmp (nextname, "__.SYMDEF ", 16)
- || !strncmp (nextname, "__.SYMDEF/ ", 16)) /* old Linux archives */
+ if (CONST_STRNEQ (nextname, "__.SYMDEF ")
+ || CONST_STRNEQ (nextname, "__.SYMDEF/ ")) /* Old Linux archives. */
return do_slurp_bsd_armap (abfd);
- else if (!strncmp (nextname, "/ ", 16))
+ else if (CONST_STRNEQ (nextname, "/ "))
return do_slurp_coff_armap (abfd);
- else if (!strncmp (nextname, "/SYM64/ ", 16))
+ else if (CONST_STRNEQ (nextname, "/SYM64/ "))
{
/* 64bit ELF (Irix 6) archive. */
#ifdef BFD64
@@ -966,11 +963,11 @@ bfd_slurp_bsd_armap_f2 (bfd *abfd)
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return FALSE;
- if (!strncmp (nextname, "__.SYMDEF ", 16)
- || !strncmp (nextname, "__.SYMDEF/ ", 16)) /* Old Linux archives. */
+ if (CONST_STRNEQ (nextname, "__.SYMDEF ")
+ || CONST_STRNEQ (nextname, "__.SYMDEF/ ")) /* Old Linux archives. */
return do_slurp_bsd_armap (abfd);
- if (strncmp (nextname, "/ ", 16))
+ if (! CONST_STRNEQ (nextname, "/ "))
{
bfd_has_map (abfd) = FALSE;
return TRUE;
@@ -1066,8 +1063,8 @@ _bfd_slurp_extended_name_table (bfd *abfd)
if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return FALSE;
- if (strncmp (nextname, "ARFILENAMES/ ", 16) != 0 &&
- strncmp (nextname, "// ", 16) != 0)
+ if (! CONST_STRNEQ (nextname, "ARFILENAMES/ ")
+ && ! CONST_STRNEQ (nextname, "// "))
{
bfd_ardata (abfd)->extended_names = NULL;
bfd_ardata (abfd)->extended_names_size = 0;
@@ -1237,7 +1234,9 @@ _bfd_construct_extended_name_table (bfd *abfd,
*tablen = 0;
/* Figure out how long the table should be. */
- for (current = abfd->archive_head; current != NULL; current = current->next)
+ for (current = abfd->archive_head;
+ current != NULL;
+ current = current->archive_next)
{
const char *normal;
unsigned int thislen;
@@ -1289,8 +1288,9 @@ _bfd_construct_extended_name_table (bfd *abfd,
*tablen = total_namelen;
strptr = *tabloc;
- for (current = abfd->archive_head; current != NULL; current =
- current->next)
+ for (current = abfd->archive_head;
+ current != NULL;
+ current = current->archive_next)
{
const char *normal;
unsigned int thislen;
@@ -1339,7 +1339,7 @@ hpux_uid_gid_encode (char str[6], long int id)
str[5] = '@' + (id & 3);
id >>= 2;
- for (cnt = 4; cnt >= 0; ++cnt, id >>= 6)
+ for (cnt = 4; cnt >= 0; --cnt, id >>= 6)
str[cnt] = ' ' + (id & 0x3f);
}
#endif /* HPUX_LARGE_AR_IDS */
@@ -1640,7 +1640,9 @@ _bfd_write_archive_contents (bfd *arch)
/* Verify the viability of all entries; if any of them live in the
filesystem (as opposed to living in an archive open for input)
then construct a fresh ar_hdr for them. */
- for (current = arch->archive_head; current; current = current->next)
+ for (current = arch->archive_head;
+ current != NULL;
+ current = current->archive_next)
{
/* This check is checking the bfds for the objects we're reading
from (which are usually either an object file or archive on
@@ -1650,14 +1652,14 @@ _bfd_write_archive_contents (bfd *arch)
if (bfd_write_p (current))
{
bfd_set_error (bfd_error_invalid_operation);
- return FALSE;
+ goto input_err;
}
if (!current->arelt_data)
{
current->arelt_data =
bfd_ar_hdr_from_filesystem (arch, current->filename, current);
if (!current->arelt_data)
- return FALSE;
+ goto input_err;
/* Put in the file name. */
BFD_SEND (arch, _bfd_truncate_arname,
@@ -1708,7 +1710,9 @@ _bfd_write_archive_contents (bfd *arch)
}
}
- for (current = arch->archive_head; current; current = current->next)
+ for (current = arch->archive_head;
+ current != NULL;
+ current = current->archive_next)
{
char buffer[DEFAULT_BUFFERSIZE];
unsigned int remaining = arelt_size (current);
@@ -1719,7 +1723,7 @@ _bfd_write_archive_contents (bfd *arch)
!= sizeof (*hdr))
return FALSE;
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
- return FALSE;
+ goto input_err;
while (remaining)
{
unsigned int amt = DEFAULT_BUFFERSIZE;
@@ -1729,8 +1733,8 @@ _bfd_write_archive_contents (bfd *arch)
if (bfd_bread (buffer, amt, current) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_malformed_archive);
- return FALSE;
+ bfd_set_error (bfd_error_file_truncated);
+ goto input_err;
}
if (bfd_bwrite (buffer, amt, arch) != amt)
return FALSE;
@@ -1763,6 +1767,10 @@ _bfd_write_archive_contents (bfd *arch)
}
return TRUE;
+
+ input_err:
+ bfd_set_error (bfd_error_on_input, current, bfd_get_error ());
+ return FALSE;
}
/* Note that the namidx for the first symbol is 0. */
@@ -1801,12 +1809,12 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength)
/* Drop all the files called __.SYMDEF, we're going to make our own. */
while (arch->archive_head &&
strcmp (arch->archive_head->filename, "__.SYMDEF") == 0)
- arch->archive_head = arch->archive_head->next;
+ arch->archive_head = arch->archive_head->archive_next;
/* Map over each element. */
for (current = arch->archive_head;
current != NULL;
- current = current->next, elt_no++)
+ current = current->archive_next, elt_no++)
{
if (bfd_check_format (current, bfd_object)
&& (bfd_get_file_flags (current) & HAS_SYMS) != 0)
@@ -1963,7 +1971,7 @@ bsd_write_armap (bfd *arch,
{
firstreal += arelt_size (current) + sizeof (struct ar_hdr);
firstreal += firstreal % 2;
- current = current->next;
+ current = current->archive_next;
}
while (current != map[count].u.abfd);
}
@@ -2133,7 +2141,7 @@ coff_write_armap (bfd *arch,
archive_member_file_ptr += arelt_size (current) + sizeof (struct ar_hdr);
/* Remember aboout the even alignment. */
archive_member_file_ptr += archive_member_file_ptr % 2;
- current = current->next;
+ current = current->archive_next;
}
/* Now write the strings themselves. */
diff --git a/contrib/binutils/bfd/archive64.c b/contrib/binutils/bfd/archive64.c
index 3b28f85..5e2bf11 100644
--- a/contrib/binutils/bfd/archive64.c
+++ b/contrib/binutils/bfd/archive64.c
@@ -1,30 +1,30 @@
/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007
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 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 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file supports the 64-bit (MIPS) ELF archives. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "aout/ar.h"
@@ -65,10 +65,10 @@ bfd_elf64_archive_slurp_armap (bfd *abfd)
return FALSE;
/* Archives with traditional armaps are still permitted. */
- if (strncmp (nextname, "/ ", 16) == 0)
+ if (CONST_STRNEQ (nextname, "/ "))
return bfd_slurp_armap (abfd);
- if (strncmp (nextname, "/SYM64/ ", 16) != 0)
+ if (! CONST_STRNEQ (nextname, "/SYM64/ "))
{
bfd_has_map (abfd) = FALSE;
return TRUE;
@@ -215,7 +215,7 @@ bfd_elf64_archive_write_armap (bfd *arch,
+ sizeof (struct ar_hdr));
/* remember about the even alignment */
archive_member_file_ptr += archive_member_file_ptr % 2;
- current = current->next;
+ current = current->archive_next;
}
/* now write the strings themselves */
diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c
index 137c828..d14ac38 100644
--- a/contrib/binutils/bfd/archures.c
+++ b/contrib/binutils/bfd/archures.c
@@ -1,6 +1,6 @@
/* BFD library support routines for architectures.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Hacked by John Gilmore and Steve Chamberlain of Cygnus Support.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "safe-ctype.h"
@@ -80,22 +80,26 @@ DESCRIPTION
.#define bfd_mach_m68040 6
.#define bfd_mach_m68060 7
.#define bfd_mach_cpu32 8
-.#define bfd_mach_mcf_isa_a_nodiv 9
-.#define bfd_mach_mcf_isa_a 10
-.#define bfd_mach_mcf_isa_a_mac 11
-.#define bfd_mach_mcf_isa_a_emac 12
-.#define bfd_mach_mcf_isa_aplus 13
-.#define bfd_mach_mcf_isa_aplus_mac 14
-.#define bfd_mach_mcf_isa_aplus_emac 15
-.#define bfd_mach_mcf_isa_b_nousp 16
-.#define bfd_mach_mcf_isa_b_nousp_mac 17
-.#define bfd_mach_mcf_isa_b_nousp_emac 18
-.#define bfd_mach_mcf_isa_b 19
-.#define bfd_mach_mcf_isa_b_mac 20
-.#define bfd_mach_mcf_isa_b_emac 21
-.#define bfd_mach_mcf_isa_b_float 22
-.#define bfd_mach_mcf_isa_b_float_mac 23
-.#define bfd_mach_mcf_isa_b_float_emac 24
+.#define bfd_mach_fido 9
+.#define bfd_mach_mcf_isa_a_nodiv 10
+.#define bfd_mach_mcf_isa_a 11
+.#define bfd_mach_mcf_isa_a_mac 12
+.#define bfd_mach_mcf_isa_a_emac 13
+.#define bfd_mach_mcf_isa_aplus 14
+.#define bfd_mach_mcf_isa_aplus_mac 15
+.#define bfd_mach_mcf_isa_aplus_emac 16
+.#define bfd_mach_mcf_isa_b_nousp 17
+.#define bfd_mach_mcf_isa_b_nousp_mac 18
+.#define bfd_mach_mcf_isa_b_nousp_emac 19
+.#define bfd_mach_mcf_isa_b 20
+.#define bfd_mach_mcf_isa_b_mac 21
+.#define bfd_mach_mcf_isa_b_emac 22
+.#define bfd_mach_mcf_isa_b_float 23
+.#define bfd_mach_mcf_isa_b_float_mac 24
+.#define bfd_mach_mcf_isa_b_float_emac 25
+.#define bfd_mach_mcf_isa_c 26
+.#define bfd_mach_mcf_isa_c_mac 27
+.#define bfd_mach_mcf_isa_c_emac 28
. bfd_arch_vax, {* DEC Vax *}
. bfd_arch_i960, {* Intel 960 *}
. {* The order of the following is important.
@@ -136,6 +140,8 @@ DESCRIPTION
.{* Nonzero if MACH is a 64 bit sparc architecture. *}
.#define bfd_mach_sparc_64bit_p(mach) \
. ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
+. bfd_arch_spu, {* PowerPC SPU *}
+.#define bfd_mach_spu 256
. bfd_arch_mips, {* MIPS Rxxxx *}
.#define bfd_mach_mips3000 3000
.#define bfd_mach_mips3900 3900
@@ -274,6 +280,7 @@ DESCRIPTION
.#define bfd_mach_arm_XScale 10
.#define bfd_mach_arm_ep9312 11
.#define bfd_mach_arm_iWMMXt 12
+.#define bfd_mach_arm_iWMMXt2 13
. bfd_arch_ns32k, {* National Semiconductors ns32000 *}
. bfd_arch_w65, {* WDC 65816 *}
. bfd_arch_tic30, {* Texas Instruments TMS320C30 *}
@@ -315,6 +322,9 @@ DESCRIPTION
.#define bfd_mach_fr500 500
.#define bfd_mach_fr550 550
. bfd_arch_mcore,
+. bfd_arch_mep,
+.#define bfd_mach_mep 1
+.#define bfd_mach_mep_h1 0x6831
. bfd_arch_ia64, {* HP/Intel ia64 *}
.#define bfd_mach_ia64_elf64 64
.#define bfd_mach_ia64_elf32 32
@@ -335,8 +345,11 @@ DESCRIPTION
.#define bfd_mach_avr3 3
.#define bfd_mach_avr4 4
.#define bfd_mach_avr5 5
+.#define bfd_mach_avr6 6
. bfd_arch_bfin, {* ADI Blackfin *}
.#define bfd_mach_bfin 1
+. bfd_arch_cr16, {* National Semiconductor CompactRISC (ie CR16). *}
+.#define bfd_mach_cr16 1
. bfd_arch_cr16c, {* National Semiconductor CompactRISC. *}
.#define bfd_mach_cr16c 1
. bfd_arch_crx, {* National Semiconductor CRX. *}
@@ -348,6 +361,7 @@ DESCRIPTION
. bfd_arch_s390, {* IBM s390 *}
.#define bfd_mach_s390_31 31
.#define bfd_mach_s390_64 64
+. bfd_arch_score, {* Sunplus score *}
. bfd_arch_openrisc, {* OpenRISC *}
. bfd_arch_mmix, {* Donald Knuth's educational processor. *}
. bfd_arch_xstormy16,
@@ -425,6 +439,7 @@ extern const bfd_arch_info_type bfd_arc_arch;
extern const bfd_arch_info_type bfd_arm_arch;
extern const bfd_arch_info_type bfd_avr_arch;
extern const bfd_arch_info_type bfd_bfin_arch;
+extern const bfd_arch_info_type bfd_cr16_arch;
extern const bfd_arch_info_type bfd_cr16c_arch;
extern const bfd_arch_info_type bfd_cris_arch;
extern const bfd_arch_info_type bfd_crx_arch;
@@ -451,6 +466,7 @@ extern const bfd_arch_info_type bfd_m68k_arch;
extern const bfd_arch_info_type bfd_m88k_arch;
extern const bfd_arch_info_type bfd_maxq_arch;
extern const bfd_arch_info_type bfd_mcore_arch;
+extern const bfd_arch_info_type bfd_mep_arch;
extern const bfd_arch_info_type bfd_mips_arch;
extern const bfd_arch_info_type bfd_mmix_arch;
extern const bfd_arch_info_type bfd_mn10200_arch;
@@ -466,8 +482,10 @@ extern const bfd_arch_info_type bfd_powerpc_archs[];
#define bfd_powerpc_arch bfd_powerpc_archs[0]
extern const bfd_arch_info_type bfd_rs6000_arch;
extern const bfd_arch_info_type bfd_s390_arch;
+extern const bfd_arch_info_type bfd_score_arch;
extern const bfd_arch_info_type bfd_sh_arch;
extern const bfd_arch_info_type bfd_sparc_arch;
+extern const bfd_arch_info_type bfd_spu_arch;
extern const bfd_arch_info_type bfd_tic30_arch;
extern const bfd_arch_info_type bfd_tic4x_arch;
extern const bfd_arch_info_type bfd_tic54x_arch;
@@ -492,6 +510,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_arm_arch,
&bfd_avr_arch,
&bfd_bfin_arch,
+ &bfd_cr16_arch,
&bfd_cr16c_arch,
&bfd_cris_arch,
&bfd_crx_arch,
@@ -518,6 +537,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_m88k_arch,
&bfd_maxq_arch,
&bfd_mcore_arch,
+ &bfd_mep_arch,
&bfd_mips_arch,
&bfd_mmix_arch,
&bfd_mn10200_arch,
@@ -531,8 +551,10 @@ static const bfd_arch_info_type * const bfd_archures_list[] =
&bfd_powerpc_arch,
&bfd_rs6000_arch,
&bfd_s390_arch,
+ &bfd_score_arch,
&bfd_sh_arch,
&bfd_sparc_arch,
+ &bfd_spu_arch,
&bfd_tic30_arch,
&bfd_tic4x_arch,
&bfd_tic54x_arch,
diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h
index 33b649d..617aa07 100644
--- a/contrib/binutils/bfd/bfd-in.h
+++ b/contrib/binutils/bfd/bfd-in.h
@@ -1,7 +1,7 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -43,6 +43,30 @@ extern "C" {
#endif
#endif
+/* This is a utility macro to handle the situation where the code
+ wants to place a constant string into the code, followed by a
+ comma and then the length of the string. Doing this by hand
+ is error prone, so using this macro is safer. The macro will
+ also safely handle the case where a NULL is passed as the arg. */
+#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
+/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
+ to create the arguments to another macro, since the preprocessor
+ will mis-count the number of arguments to the outer macro (by not
+ evaluating STRING_COMMA_LEN and so missing the comma). This is a
+ problem for example when trying to use STRING_COMMA_LEN to build
+ the arguments to the strncmp() macro. Hence this alternative
+ definition of strncmp is provided here.
+
+ Note - these macros do NOT work if STR2 is not a constant string. */
+#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
+ /* strcpy() can have a similar problem, but since we know we are
+ copying a constant string, we can use memcpy which will be faster
+ since there is no need to check for a NUL byte inside STR. We
+ can also save time if we do not need to copy the terminating NUL. */
+#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
+#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
+
+
/* 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. */
@@ -326,7 +350,15 @@ typedef struct bfd_section *sec_ptr;
(((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
/ bfd_octets_per_byte (bfd))
-typedef struct stat stat_type;
+/* Return TRUE if section has been discarded. */
+#define elf_discarded_section(sec) \
+ (!bfd_is_abs_section (sec) \
+ && bfd_is_abs_section ((sec)->output_section) \
+ && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
+ && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
+
+/* Forward define. */
+struct stat;
typedef enum bfd_print_symbol
{
@@ -374,10 +406,6 @@ struct bfd_hash_table
{
/* The hash array. */
struct bfd_hash_entry **table;
- /* The number of slots in the hash table. */
- unsigned int size;
- /* The size of elements. */
- unsigned int entsize;
/* A function used to create new elements in the hash table. The
first entry is itself a pointer to an element. When this
function is first invoked, this pointer will be NULL. However,
@@ -390,6 +418,14 @@ struct bfd_hash_table
/* An objalloc for this hash table. This is a struct objalloc *,
but we use void * to avoid requiring the inclusion of objalloc.h. */
void *memory;
+ /* The number of slots in the hash table. */
+ unsigned int size;
+ /* The number of entries in the hash table. */
+ unsigned int count;
+ /* The size of elements. */
+ unsigned int entsize;
+ /* If non-zero, don't grow the hash table. */
+ unsigned int frozen:1;
};
/* Initialize a hash table. */
@@ -660,7 +696,7 @@ extern void bfd_elf_set_dt_needed_name
extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
- (bfd *, int);
+ (bfd *, enum dynamic_lib_link_class);
extern int bfd_elf_get_dyn_lib_class
(bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
@@ -817,6 +853,27 @@ extern bfd_boolean bfd_coff_set_symbol_class
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
+/* ARM VFP11 erratum workaround support. */
+typedef enum
+{
+ BFD_ARM_VFP11_FIX_DEFAULT,
+ BFD_ARM_VFP11_FIX_NONE,
+ BFD_ARM_VFP11_FIX_SCALAR,
+ BFD_ARM_VFP11_FIX_VECTOR
+} bfd_arm_vfp11_fix;
+
+extern void bfd_elf32_arm_init_maps
+ (bfd *);
+
+extern void bfd_elf32_arm_set_vfp11_fix
+ (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
+ (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_vfp11_fix_veneer_locations
+ (bfd *, struct bfd_link_info *);
+
/* ARM Interworking support. Called from linker. */
extern bfd_boolean bfd_arm_allocate_interworking_sections
(struct bfd_link_info *);
@@ -842,10 +899,11 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
(struct bfd_link_info *);
extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
+ (bfd *, struct bfd_link_info *);
void bfd_elf32_arm_set_target_relocs
- (struct bfd_link_info *, int, char *, int, int);
+ (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
+ int, int);
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
@@ -854,8 +912,14 @@ extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
(bfd *, struct bfd_link_info *);
/* ELF ARM mapping symbol support */
-extern bfd_boolean bfd_is_arm_mapping_symbol_name
- (const char * name);
+#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
+#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
+#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
+#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
+extern bfd_boolean bfd_is_arm_special_symbol_name
+ (const char * name, int type);
+
+extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int);
/* ARM Note section processing. */
extern bfd_boolean bfd_arm_merge_machines
diff --git a/contrib/binutils/bfd/bfd-in2.h b/contrib/binutils/bfd/bfd-in2.h
index ddcda23..8ea1cdd 100644
--- a/contrib/binutils/bfd/bfd-in2.h
+++ b/contrib/binutils/bfd/bfd-in2.h
@@ -8,7 +8,7 @@
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -50,6 +50,30 @@ extern "C" {
#endif
#endif
+/* This is a utility macro to handle the situation where the code
+ wants to place a constant string into the code, followed by a
+ comma and then the length of the string. Doing this by hand
+ is error prone, so using this macro is safer. The macro will
+ also safely handle the case where a NULL is passed as the arg. */
+#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
+/* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
+ to create the arguments to another macro, since the preprocessor
+ will mis-count the number of arguments to the outer macro (by not
+ evaluating STRING_COMMA_LEN and so missing the comma). This is a
+ problem for example when trying to use STRING_COMMA_LEN to build
+ the arguments to the strncmp() macro. Hence this alternative
+ definition of strncmp is provided here.
+
+ Note - these macros do NOT work if STR2 is not a constant string. */
+#define CONST_STRNEQ(STR1,STR2) (strncmp ((STR1), (STR2), sizeof (STR2) - 1) == 0)
+ /* strcpy() can have a similar problem, but since we know we are
+ copying a constant string, we can use memcpy which will be faster
+ since there is no need to check for a NUL byte inside STR. We
+ can also save time if we do not need to copy the terminating NUL. */
+#define LITMEMCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2) - 1)
+#define LITSTRCPY(DEST,STR2) memcpy ((DEST), (STR2), sizeof (STR2))
+
+
/* 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. */
@@ -333,7 +357,15 @@ typedef struct bfd_section *sec_ptr;
(((sec)->rawsize ? (sec)->rawsize : (sec)->size) \
/ bfd_octets_per_byte (bfd))
-typedef struct stat stat_type;
+/* Return TRUE if section has been discarded. */
+#define elf_discarded_section(sec) \
+ (!bfd_is_abs_section (sec) \
+ && bfd_is_abs_section ((sec)->output_section) \
+ && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
+ && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
+
+/* Forward define. */
+struct stat;
typedef enum bfd_print_symbol
{
@@ -381,10 +413,6 @@ struct bfd_hash_table
{
/* The hash array. */
struct bfd_hash_entry **table;
- /* The number of slots in the hash table. */
- unsigned int size;
- /* The size of elements. */
- unsigned int entsize;
/* A function used to create new elements in the hash table. The
first entry is itself a pointer to an element. When this
function is first invoked, this pointer will be NULL. However,
@@ -397,6 +425,14 @@ struct bfd_hash_table
/* An objalloc for this hash table. This is a struct objalloc *,
but we use void * to avoid requiring the inclusion of objalloc.h. */
void *memory;
+ /* The number of slots in the hash table. */
+ unsigned int size;
+ /* The number of entries in the hash table. */
+ unsigned int count;
+ /* The size of elements. */
+ unsigned int entsize;
+ /* If non-zero, don't grow the hash table. */
+ unsigned int frozen:1;
};
/* Initialize a hash table. */
@@ -667,7 +703,7 @@ extern void bfd_elf_set_dt_needed_name
extern const char *bfd_elf_get_dt_soname
(bfd *);
extern void bfd_elf_set_dyn_lib_class
- (bfd *, int);
+ (bfd *, enum dynamic_lib_link_class);
extern int bfd_elf_get_dyn_lib_class
(bfd *);
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
@@ -824,6 +860,27 @@ extern bfd_boolean bfd_coff_set_symbol_class
extern bfd_boolean bfd_m68k_coff_create_embedded_relocs
(bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **);
+/* ARM VFP11 erratum workaround support. */
+typedef enum
+{
+ BFD_ARM_VFP11_FIX_DEFAULT,
+ BFD_ARM_VFP11_FIX_NONE,
+ BFD_ARM_VFP11_FIX_SCALAR,
+ BFD_ARM_VFP11_FIX_VECTOR
+} bfd_arm_vfp11_fix;
+
+extern void bfd_elf32_arm_init_maps
+ (bfd *);
+
+extern void bfd_elf32_arm_set_vfp11_fix
+ (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan
+ (bfd *, struct bfd_link_info *);
+
+extern void bfd_elf32_arm_vfp11_fix_veneer_locations
+ (bfd *, struct bfd_link_info *);
+
/* ARM Interworking support. Called from linker. */
extern bfd_boolean bfd_arm_allocate_interworking_sections
(struct bfd_link_info *);
@@ -849,10 +906,11 @@ extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections
(struct bfd_link_info *);
extern bfd_boolean bfd_elf32_arm_process_before_allocation
- (bfd *, struct bfd_link_info *, int);
+ (bfd *, struct bfd_link_info *);
void bfd_elf32_arm_set_target_relocs
- (struct bfd_link_info *, int, char *, int, int);
+ (bfd *, struct bfd_link_info *, int, char *, int, int, bfd_arm_vfp11_fix,
+ int, int);
extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking
(bfd *, struct bfd_link_info *);
@@ -861,8 +919,14 @@ extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd
(bfd *, struct bfd_link_info *);
/* ELF ARM mapping symbol support */
-extern bfd_boolean bfd_is_arm_mapping_symbol_name
- (const char * name);
+#define BFD_ARM_SPECIAL_SYM_TYPE_MAP (1 << 0)
+#define BFD_ARM_SPECIAL_SYM_TYPE_TAG (1 << 1)
+#define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2)
+#define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0)
+extern bfd_boolean bfd_is_arm_special_symbol_name
+ (const char * name, int type);
+
+extern void bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *, int);
/* ARM Note section processing. */
extern bfd_boolean bfd_arm_merge_machines
@@ -935,7 +999,10 @@ bfd *bfd_openr_iovec (const char *filename, const char *target,
file_ptr nbytes,
file_ptr offset),
int (*close) (struct bfd *nbfd,
- void *stream));
+ void *stream),
+ int (*stat) (struct bfd *abfd,
+ void *stream,
+ struct stat *sb));
bfd *bfd_openw (const char *filename, const char *target);
@@ -1076,7 +1143,7 @@ bfd_boolean bfd_fill_in_gnu_debuglink_section
/* Extracted from bfdio.c. */
long bfd_get_mtime (bfd *abfd);
-long bfd_get_size (bfd *abfd);
+file_ptr bfd_get_size (bfd *abfd);
/* Extracted from bfdwin.c. */
/* Extracted from section.c. */
@@ -1225,7 +1292,9 @@ typedef struct bfd_section
else up the line will take care of it later. */
#define SEC_LINKER_CREATED 0x200000
- /* This section should not be subject to garbage collection. */
+ /* This section should not be subject to garbage collection.
+ Also set to inform the linker that this section should not be
+ listed in the link map as discarded. */
#define SEC_KEEP 0x400000
/* This section contains "short" data, and should be placed
@@ -1471,11 +1540,6 @@ extern asection bfd_ind_section;
|| ((SEC) == bfd_com_section_ptr) \
|| ((SEC) == bfd_ind_section_ptr))
-extern const struct bfd_symbol * const bfd_abs_symbol;
-extern const struct bfd_symbol * const bfd_com_symbol;
-extern const struct bfd_symbol * const bfd_und_symbol;
-extern const struct bfd_symbol * const bfd_ind_symbol;
-
/* 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. */
@@ -1566,7 +1630,7 @@ extern const struct bfd_symbol * const bfd_ind_symbol;
#define bfd_section_removed_from_list(ABFD, S) \
((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
-#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, SYM_PTR, NAME, IDX) \
+#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
/* name, id, index, next, prev, flags, user_set_vma, */ \
{ NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
\
@@ -1597,11 +1661,8 @@ extern const struct bfd_symbol * const bfd_ind_symbol;
/* target_index, used_by_bfd, constructor_chain, owner, */ \
0, NULL, NULL, NULL, \
\
- /* symbol, */ \
- (struct bfd_symbol *) SYM, \
- \
- /* symbol_ptr_ptr, */ \
- (struct bfd_symbol **) SYM_PTR, \
+ /* symbol, symbol_ptr_ptr, */ \
+ (struct bfd_symbol *) SYM, &SEC.symbol, \
\
/* map_head, map_tail */ \
{ NULL }, { NULL } \
@@ -1683,22 +1744,26 @@ enum bfd_architecture
#define bfd_mach_m68040 6
#define bfd_mach_m68060 7
#define bfd_mach_cpu32 8
-#define bfd_mach_mcf_isa_a_nodiv 9
-#define bfd_mach_mcf_isa_a 10
-#define bfd_mach_mcf_isa_a_mac 11
-#define bfd_mach_mcf_isa_a_emac 12
-#define bfd_mach_mcf_isa_aplus 13
-#define bfd_mach_mcf_isa_aplus_mac 14
-#define bfd_mach_mcf_isa_aplus_emac 15
-#define bfd_mach_mcf_isa_b_nousp 16
-#define bfd_mach_mcf_isa_b_nousp_mac 17
-#define bfd_mach_mcf_isa_b_nousp_emac 18
-#define bfd_mach_mcf_isa_b 19
-#define bfd_mach_mcf_isa_b_mac 20
-#define bfd_mach_mcf_isa_b_emac 21
-#define bfd_mach_mcf_isa_b_float 22
-#define bfd_mach_mcf_isa_b_float_mac 23
-#define bfd_mach_mcf_isa_b_float_emac 24
+#define bfd_mach_fido 9
+#define bfd_mach_mcf_isa_a_nodiv 10
+#define bfd_mach_mcf_isa_a 11
+#define bfd_mach_mcf_isa_a_mac 12
+#define bfd_mach_mcf_isa_a_emac 13
+#define bfd_mach_mcf_isa_aplus 14
+#define bfd_mach_mcf_isa_aplus_mac 15
+#define bfd_mach_mcf_isa_aplus_emac 16
+#define bfd_mach_mcf_isa_b_nousp 17
+#define bfd_mach_mcf_isa_b_nousp_mac 18
+#define bfd_mach_mcf_isa_b_nousp_emac 19
+#define bfd_mach_mcf_isa_b 20
+#define bfd_mach_mcf_isa_b_mac 21
+#define bfd_mach_mcf_isa_b_emac 22
+#define bfd_mach_mcf_isa_b_float 23
+#define bfd_mach_mcf_isa_b_float_mac 24
+#define bfd_mach_mcf_isa_b_float_emac 25
+#define bfd_mach_mcf_isa_c 26
+#define bfd_mach_mcf_isa_c_mac 27
+#define bfd_mach_mcf_isa_c_emac 28
bfd_arch_vax, /* DEC Vax */
bfd_arch_i960, /* Intel 960 */
/* The order of the following is important.
@@ -1739,6 +1804,8 @@ enum bfd_architecture
/* Nonzero if MACH is a 64 bit sparc architecture. */
#define bfd_mach_sparc_64bit_p(mach) \
((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
+ bfd_arch_spu, /* PowerPC SPU */
+#define bfd_mach_spu 256
bfd_arch_mips, /* MIPS Rxxxx */
#define bfd_mach_mips3000 3000
#define bfd_mach_mips3900 3900
@@ -1876,6 +1943,7 @@ enum bfd_architecture
#define bfd_mach_arm_XScale 10
#define bfd_mach_arm_ep9312 11
#define bfd_mach_arm_iWMMXt 12
+#define bfd_mach_arm_iWMMXt2 13
bfd_arch_ns32k, /* National Semiconductors ns32000 */
bfd_arch_w65, /* WDC 65816 */
bfd_arch_tic30, /* Texas Instruments TMS320C30 */
@@ -1917,6 +1985,9 @@ enum bfd_architecture
#define bfd_mach_fr500 500
#define bfd_mach_fr550 550
bfd_arch_mcore,
+ bfd_arch_mep,
+#define bfd_mach_mep 1
+#define bfd_mach_mep_h1 0x6831
bfd_arch_ia64, /* HP/Intel ia64 */
#define bfd_mach_ia64_elf64 64
#define bfd_mach_ia64_elf32 32
@@ -1937,8 +2008,11 @@ enum bfd_architecture
#define bfd_mach_avr3 3
#define bfd_mach_avr4 4
#define bfd_mach_avr5 5
+#define bfd_mach_avr6 6
bfd_arch_bfin, /* ADI Blackfin */
#define bfd_mach_bfin 1
+ bfd_arch_cr16, /* National Semiconductor CompactRISC (ie CR16). */
+#define bfd_mach_cr16 1
bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
#define bfd_mach_cr16c 1
bfd_arch_crx, /* National Semiconductor CRX. */
@@ -1950,6 +2024,7 @@ enum bfd_architecture
bfd_arch_s390, /* IBM s390 */
#define bfd_mach_s390_31 31
#define bfd_mach_s390_64 64
+ bfd_arch_score, /* Sunplus score */
bfd_arch_openrisc, /* OpenRISC */
bfd_arch_mmix, /* Donald Knuth's educational processor. */
bfd_arch_xstormy16,
@@ -2427,6 +2502,22 @@ relocation types already defined. */
BFD_RELOC_SPARC_TLS_TPOFF32,
BFD_RELOC_SPARC_TLS_TPOFF64,
+/* SPU Relocations. */
+ BFD_RELOC_SPU_IMM7,
+ BFD_RELOC_SPU_IMM8,
+ BFD_RELOC_SPU_IMM10,
+ BFD_RELOC_SPU_IMM10W,
+ BFD_RELOC_SPU_IMM16,
+ BFD_RELOC_SPU_IMM16W,
+ BFD_RELOC_SPU_IMM18,
+ BFD_RELOC_SPU_PCREL9a,
+ BFD_RELOC_SPU_PCREL9b,
+ BFD_RELOC_SPU_PCREL16,
+ BFD_RELOC_SPU_LO16,
+ BFD_RELOC_SPU_HI16,
+ BFD_RELOC_SPU_PPU32,
+ BFD_RELOC_SPU_PPU64,
+
/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or
"addend" in some special way.
For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
@@ -2909,6 +3000,16 @@ pc-relative or some form of GOT-indirect relocation. */
/* 31-bit PC relative address. */
BFD_RELOC_ARM_PREL31,
+/* Low and High halfword relocations for MOVW and MOVT instructions. */
+ BFD_RELOC_ARM_MOVW,
+ BFD_RELOC_ARM_MOVT,
+ BFD_RELOC_ARM_MOVW_PCREL,
+ BFD_RELOC_ARM_MOVT_PCREL,
+ BFD_RELOC_ARM_THUMB_MOVW,
+ BFD_RELOC_ARM_THUMB_MOVT,
+ BFD_RELOC_ARM_THUMB_MOVW_PCREL,
+ BFD_RELOC_ARM_THUMB_MOVT_PCREL,
+
/* Relocations for setting up GOTs and PLTs for shared libraries. */
BFD_RELOC_ARM_JUMP_SLOT,
BFD_RELOC_ARM_GLOB_DAT,
@@ -2928,11 +3029,42 @@ pc-relative or some form of GOT-indirect relocation. */
BFD_RELOC_ARM_TLS_IE32,
BFD_RELOC_ARM_TLS_LE32,
+/* ARM group relocations. */
+ BFD_RELOC_ARM_ALU_PC_G0_NC,
+ BFD_RELOC_ARM_ALU_PC_G0,
+ BFD_RELOC_ARM_ALU_PC_G1_NC,
+ BFD_RELOC_ARM_ALU_PC_G1,
+ BFD_RELOC_ARM_ALU_PC_G2,
+ BFD_RELOC_ARM_LDR_PC_G0,
+ BFD_RELOC_ARM_LDR_PC_G1,
+ BFD_RELOC_ARM_LDR_PC_G2,
+ BFD_RELOC_ARM_LDRS_PC_G0,
+ BFD_RELOC_ARM_LDRS_PC_G1,
+ BFD_RELOC_ARM_LDRS_PC_G2,
+ BFD_RELOC_ARM_LDC_PC_G0,
+ BFD_RELOC_ARM_LDC_PC_G1,
+ BFD_RELOC_ARM_LDC_PC_G2,
+ BFD_RELOC_ARM_ALU_SB_G0_NC,
+ BFD_RELOC_ARM_ALU_SB_G0,
+ BFD_RELOC_ARM_ALU_SB_G1_NC,
+ BFD_RELOC_ARM_ALU_SB_G1,
+ BFD_RELOC_ARM_ALU_SB_G2,
+ BFD_RELOC_ARM_LDR_SB_G0,
+ BFD_RELOC_ARM_LDR_SB_G1,
+ BFD_RELOC_ARM_LDR_SB_G2,
+ BFD_RELOC_ARM_LDRS_SB_G0,
+ BFD_RELOC_ARM_LDRS_SB_G1,
+ BFD_RELOC_ARM_LDRS_SB_G2,
+ BFD_RELOC_ARM_LDC_SB_G0,
+ BFD_RELOC_ARM_LDC_SB_G1,
+ BFD_RELOC_ARM_LDC_SB_G2,
+
/* These relocs are only used within the ARM assembler. They are not
(at present) written to any object files. */
BFD_RELOC_ARM_IMMEDIATE,
BFD_RELOC_ARM_ADRL_IMMEDIATE,
BFD_RELOC_ARM_T32_IMMEDIATE,
+ BFD_RELOC_ARM_T32_ADD_IMM,
BFD_RELOC_ARM_T32_IMM12,
BFD_RELOC_ARM_T32_ADD_PC12,
BFD_RELOC_ARM_SHIFT_IMM,
@@ -3446,6 +3578,29 @@ short offset into 11 bits. */
BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
BFD_RELOC_MCORE_RVA,
+/* Toshiba Media Processor Relocations. */
+ BFD_RELOC_MEP_8,
+ BFD_RELOC_MEP_16,
+ BFD_RELOC_MEP_32,
+ BFD_RELOC_MEP_PCREL8A2,
+ BFD_RELOC_MEP_PCREL12A2,
+ BFD_RELOC_MEP_PCREL17A2,
+ BFD_RELOC_MEP_PCREL24A2,
+ BFD_RELOC_MEP_PCABS24A2,
+ BFD_RELOC_MEP_LOW16,
+ BFD_RELOC_MEP_HI16U,
+ BFD_RELOC_MEP_HI16S,
+ BFD_RELOC_MEP_GPREL,
+ BFD_RELOC_MEP_TPREL,
+ BFD_RELOC_MEP_TPREL7,
+ BFD_RELOC_MEP_TPREL7A2,
+ BFD_RELOC_MEP_TPREL7A4,
+ BFD_RELOC_MEP_UIMM24,
+ BFD_RELOC_MEP_ADDR24A4,
+ BFD_RELOC_MEP_GNU_VTINHERIT,
+ BFD_RELOC_MEP_GNU_VTENTRY,
+
+
/* These are relocations for the GETA instruction. */
BFD_RELOC_MMIX_GETA,
BFD_RELOC_MMIX_GETA_1,
@@ -3545,10 +3700,22 @@ of 32 bit value) into 8 bit immediate value of LDI insn. */
command address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_LO8_LDI_PM,
+/* This is a 16 bit reloc for the AVR that stores 8 bit value
+(command address) into 8 bit immediate value of LDI insn. If the address
+is beyond the 128k boundary, the linker inserts a jump stub for this reloc
+in the lower 128k. */
+ BFD_RELOC_AVR_LO8_LDI_GS,
+
/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
of command address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_HI8_LDI_PM,
+/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
+of command address) into 8 bit immediate value of LDI insn. If the address
+is beyond the 128k boundary, the linker inserts a jump stub for this reloc
+below 128k. */
+ BFD_RELOC_AVR_HI8_LDI_GS,
+
/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
of command address) into 8 bit immediate value of LDI insn. */
BFD_RELOC_AVR_HH8_LDI_PM,
@@ -3689,6 +3856,31 @@ instructions */
BFD_RELOC_390_GOTPLT20,
BFD_RELOC_390_TLS_GOTIE20,
+/* Score relocations */
+ BFD_RELOC_SCORE_DUMMY1,
+
+/* Low 16 bit for load/store */
+ BFD_RELOC_SCORE_GPREL15,
+
+/* This is a 24-bit reloc with the right 1 bit assumed to be 0 */
+ BFD_RELOC_SCORE_DUMMY2,
+ BFD_RELOC_SCORE_JMP,
+
+/* This is a 19-bit reloc with the right 1 bit assumed to be 0 */
+ BFD_RELOC_SCORE_BRANCH,
+
+/* This is a 11-bit reloc with the right 1 bit assumed to be 0 */
+ BFD_RELOC_SCORE16_JMP,
+
+/* This is a 8-bit reloc with the right 1 bit assumed to be 0 */
+ BFD_RELOC_SCORE16_BRANCH,
+
+/* Undocumented Score relocs */
+ BFD_RELOC_SCORE_GOT15,
+ BFD_RELOC_SCORE_GOT_LO16,
+ BFD_RELOC_SCORE_CALL15,
+ BFD_RELOC_SCORE_DUMMY_HI16,
+
/* Scenix IP2K - 9-bit register number / data address */
BFD_RELOC_IP2K_FR9,
@@ -3913,6 +4105,35 @@ This is the 5 bits of a value. */
BFD_RELOC_16C_IMM32,
BFD_RELOC_16C_IMM32_C,
+/* NS CR16 Relocations. */
+ BFD_RELOC_CR16_NUM8,
+ BFD_RELOC_CR16_NUM16,
+ BFD_RELOC_CR16_NUM32,
+ BFD_RELOC_CR16_NUM32a,
+ BFD_RELOC_CR16_REGREL0,
+ BFD_RELOC_CR16_REGREL4,
+ BFD_RELOC_CR16_REGREL4a,
+ BFD_RELOC_CR16_REGREL14,
+ BFD_RELOC_CR16_REGREL14a,
+ BFD_RELOC_CR16_REGREL16,
+ BFD_RELOC_CR16_REGREL20,
+ BFD_RELOC_CR16_REGREL20a,
+ BFD_RELOC_CR16_ABS20,
+ BFD_RELOC_CR16_ABS24,
+ BFD_RELOC_CR16_IMM4,
+ BFD_RELOC_CR16_IMM8,
+ BFD_RELOC_CR16_IMM16,
+ BFD_RELOC_CR16_IMM20,
+ BFD_RELOC_CR16_IMM24,
+ BFD_RELOC_CR16_IMM32,
+ BFD_RELOC_CR16_IMM32a,
+ BFD_RELOC_CR16_DISP4,
+ BFD_RELOC_CR16_DISP8,
+ BFD_RELOC_CR16_DISP16,
+ BFD_RELOC_CR16_DISP20,
+ BFD_RELOC_CR16_DISP24,
+ BFD_RELOC_CR16_DISP24a,
+
/* NS CRX Relocations. */
BFD_RELOC_CRX_REL4,
BFD_RELOC_CRX_REL8,
@@ -4026,6 +4247,10 @@ This is the 5 bits of a value. */
BFD_RELOC_XSTORMY16_24,
BFD_RELOC_XSTORMY16_FPTR16,
+/* Self-describing complex relocations. */
+ BFD_RELOC_RELC,
+
+
/* Infineon Relocations. */
BFD_RELOC_XC16X_PAG,
BFD_RELOC_XC16X_POF,
@@ -4163,6 +4388,8 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *bfd_reloc_type_lookup
(bfd *abfd, bfd_reloc_code_real_type code);
+reloc_howto_type *bfd_reloc_name_lookup
+ (bfd *abfd, const char *reloc_name);
const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
@@ -4275,6 +4502,14 @@ typedef struct bfd_symbol
/* This symbol is thread local. Used in ELF. */
#define BSF_THREAD_LOCAL 0x40000
+ /* This symbol represents a complex relocation expression,
+ with the expression tree serialized in the symbol name. */
+#define BSF_RELC 0x80000
+
+ /* This symbol represents a signed complex relocation expression,
+ with the expression tree serialized in the symbol name. */
+#define BSF_SRELC 0x100000
+
flagword flags;
/* A pointer to the section to which this symbol is
@@ -4442,7 +4677,7 @@ struct bfd
/* Stuff only useful for archives. */
void *arelt_data;
struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *next; /* The next BFD in the archive. */
+ struct bfd *archive_next; /* The next BFD in the archive. */
struct bfd *archive_head; /* The first BFD in the archive. */
bfd_boolean has_armap;
@@ -4524,13 +4759,14 @@ typedef enum bfd_error
bfd_error_bad_value,
bfd_error_file_truncated,
bfd_error_file_too_big,
+ bfd_error_on_input,
bfd_error_invalid_error_code
}
bfd_error_type;
bfd_error_type bfd_get_error (void);
-void bfd_set_error (bfd_error_type error_tag);
+void bfd_set_error (bfd_error_type error_tag, ...);
const char *bfd_errmsg (bfd_error_type error_tag);
@@ -4585,8 +4821,8 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
#define bfd_set_private_flags(abfd, flags) \
BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-#define bfd_sizeof_headers(abfd, reloc) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
+#define bfd_sizeof_headers(abfd, info) \
+ BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
BFD_SEND (abfd, _bfd_find_nearest_line, \
@@ -4694,6 +4930,16 @@ void bfd_preserve_restore (bfd *, struct bfd_preserve *);
void bfd_preserve_finish (bfd *, struct bfd_preserve *);
+bfd_vma bfd_emul_get_maxpagesize (const char *);
+
+void bfd_emul_set_maxpagesize (const char *, bfd_vma);
+
+bfd_vma bfd_emul_get_commonpagesize (const char *);
+
+void bfd_emul_set_commonpagesize (const char *, bfd_vma);
+
+char *bfd_demangle (bfd *, const char *, int);
+
/* Extracted from archive.c. */
symindex bfd_get_next_mapent
(bfd *abfd, symindex previous, carsym **sym);
@@ -4992,7 +5238,8 @@ typedef struct bfd_target
#define BFD_JUMP_TABLE_RELOCS(NAME) \
NAME##_get_reloc_upper_bound, \
NAME##_canonicalize_reloc, \
- NAME##_bfd_reloc_type_lookup
+ NAME##_bfd_reloc_type_lookup, \
+ NAME##_bfd_reloc_name_lookup
long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
long (*_bfd_canonicalize_reloc)
@@ -5000,6 +5247,9 @@ typedef struct bfd_target
/* See documentation on reloc types. */
reloc_howto_type *
(*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
+ reloc_howto_type *
+ (*reloc_name_lookup) (bfd *, const char *);
+
/* Routines used when writing an object file. */
#define BFD_JUMP_TABLE_WRITE(NAME) \
@@ -5028,7 +5278,7 @@ typedef struct bfd_target
NAME##_bfd_discard_group, \
NAME##_section_already_linked \
- int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
+ int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
bfd_byte * (*_bfd_get_relocated_section_contents)
(bfd *, struct bfd_link_info *, struct bfd_link_order *,
bfd_byte *, bfd_boolean, struct bfd_symbol **);
@@ -5071,7 +5321,8 @@ typedef struct bfd_target
/* Check if SEC has been already linked during a reloceatable or
final link. */
- void (*_section_already_linked) (bfd *, struct bfd_section *);
+ void (*_section_already_linked) (bfd *, struct bfd_section *,
+ struct bfd_link_info *);
/* Routines to handle dynamic symbols and relocs. */
#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
@@ -5131,10 +5382,11 @@ bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
#define bfd_link_split_section(abfd, sec) \
BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-void bfd_section_already_linked (bfd *abfd, asection *sec);
+void bfd_section_already_linked (bfd *abfd, asection *sec,
+ struct bfd_link_info *info);
-#define bfd_section_already_linked(abfd, sec) \
- BFD_SEND (abfd, _section_already_linked, (abfd, sec))
+#define bfd_section_already_linked(abfd, sec, info) \
+ BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
/* Extracted from simple.c. */
bfd_byte *bfd_simple_get_relocated_section_contents
diff --git a/contrib/binutils/bfd/bfd.c b/contrib/binutils/bfd/bfd.c
index 733f6ee..510df0a 100644
--- a/contrib/binutils/bfd/bfd.c
+++ b/contrib/binutils/bfd/bfd.c
@@ -1,6 +1,6 @@
/* Generic BFD library interface and support routines.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -139,7 +139,7 @@ CODE_FRAGMENT
. {* Stuff only useful for archives. *}
. void *arelt_data;
. struct bfd *my_archive; {* The containing archive BFD. *}
-. struct bfd *next; {* The next BFD in the archive. *}
+. struct bfd *archive_next; {* The next BFD in the archive. *}
. struct bfd *archive_head; {* The first BFD in the archive. *}
. bfd_boolean has_armap;
.
@@ -202,11 +202,12 @@ CODE_FRAGMENT
.
*/
-#include "bfd.h"
-#include "bfdver.h"
#include "sysdep.h"
#include <stdarg.h>
+#include "bfd.h"
+#include "bfdver.h"
#include "libiberty.h"
+#include "demangle.h"
#include "safe-ctype.h"
#include "bfdlink.h"
#include "libbfd.h"
@@ -271,6 +272,7 @@ CODE_FRAGMENT
. bfd_error_bad_value,
. bfd_error_file_truncated,
. bfd_error_file_too_big,
+. bfd_error_on_input,
. bfd_error_invalid_error_code
.}
.bfd_error_type;
@@ -278,6 +280,8 @@ CODE_FRAGMENT
*/
static bfd_error_type bfd_error = bfd_error_no_error;
+static bfd *input_bfd = NULL;
+static bfd_error_type input_error = bfd_error_no_error;
const char *const bfd_errmsgs[] =
{
@@ -300,6 +304,7 @@ const char *const bfd_errmsgs[] =
N_("Bad value"),
N_("File truncated"),
N_("File too big"),
+ N_("Error reading %s: %s"),
N_("#<Invalid error code>")
};
@@ -325,16 +330,32 @@ FUNCTION
bfd_set_error
SYNOPSIS
- void bfd_set_error (bfd_error_type error_tag);
+ void bfd_set_error (bfd_error_type error_tag, ...);
DESCRIPTION
Set the BFD error condition to be @var{error_tag}.
+ If @var{error_tag} is bfd_error_on_input, then this function
+ takes two more parameters, the input bfd where the error
+ occurred, and the bfd_error_type error.
*/
void
-bfd_set_error (bfd_error_type error_tag)
+bfd_set_error (bfd_error_type error_tag, ...)
{
bfd_error = error_tag;
+ if (error_tag == bfd_error_on_input)
+ {
+ /* This is an error that occurred during bfd_close when
+ writing an archive, but on one of the input files. */
+ va_list ap;
+
+ va_start (ap, error_tag);
+ input_bfd = va_arg (ap, bfd *);
+ input_error = va_arg (ap, int);
+ if (input_error >= bfd_error_on_input)
+ abort ();
+ va_end (ap);
+ }
}
/*
@@ -355,6 +376,19 @@ bfd_errmsg (bfd_error_type error_tag)
#ifndef errno
extern int errno;
#endif
+ if (error_tag == bfd_error_on_input)
+ {
+ char *buf;
+ const char *msg = bfd_errmsg (input_error);
+
+ if (asprintf (&buf, _(bfd_errmsgs [error_tag]), input_bfd->filename, msg)
+ != -1)
+ return buf;
+
+ /* Ick, what to do on out of memory? */
+ return msg;
+ }
+
if (error_tag == bfd_error_system_call)
return xstrerror (errno);
@@ -382,16 +416,10 @@ DESCRIPTION
void
bfd_perror (const char *message)
{
- if (bfd_get_error () == bfd_error_system_call)
- /* Must be a system error then. */
- perror ((char *) message);
+ if (message == NULL || *message == '\0')
+ fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
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 ()));
- }
+ fprintf (stderr, "%s: %s\n", message, bfd_errmsg (bfd_get_error ()));
}
/*
@@ -419,6 +447,23 @@ static const char *_bfd_error_program_name;
%A section name from section. For group components, print group name too.
%B file name from bfd. For archive components, prints archive too.
+
+ Note - because these two extra format specifiers require special handling
+ they are scanned for and processed in this function, before calling
+ vfprintf. This means that the *arguments* for these format specifiers
+ must be the first ones in the variable argument list, regardless of where
+ the specifiers appear in the format string. Thus for example calling
+ this function with a format string of:
+
+ "blah %s blah %A blah %d blah %B"
+
+ would involve passing the arguments as:
+
+ "blah %s blah %A blah %d blah %B",
+ asection_for_the_%A,
+ bfd_for_the_%B,
+ string_for_the_%s,
+ integer_for_the_%d);
*/
void
@@ -483,7 +528,11 @@ _bfd_default_error_handler (const char *fmt, ...)
if (p[1] == 'B')
{
bfd *abfd = va_arg (ap, bfd *);
- if (abfd->my_archive)
+
+ if (abfd == NULL)
+ /* Invoking %B with a null bfd pointer is an internal error. */
+ abort ();
+ else if (abfd->my_archive)
snprintf (bufp, avail, "%s(%s)",
abfd->my_archive->filename, abfd->filename);
else
@@ -492,10 +541,14 @@ _bfd_default_error_handler (const char *fmt, ...)
else
{
asection *sec = va_arg (ap, asection *);
- bfd *abfd = sec->owner;
+ bfd *abfd;
const char *group = NULL;
struct coff_comdat_info *ci;
+ if (sec == NULL)
+ /* Invoking %A with a null section pointer is an internal error. */
+ abort ();
+ abfd = sec->owner;
if (abfd != NULL
&& bfd_get_flavour (abfd) == bfd_target_elf_flavour
&& elf_next_in_group (sec) != NULL
@@ -851,14 +904,16 @@ bfd_get_sign_extend_vma (bfd *abfd)
name = bfd_get_target (abfd);
- /* Return a proper value for DJGPP & PE COFF (x86 COFF variants).
+ /* Return a proper value for DJGPP & PE COFF.
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
+ if (CONST_STRNEQ (name, "coff-go32")
|| strcmp (name, "pe-i386") == 0
- || strcmp (name, "pei-i386") == 0)
+ || strcmp (name, "pei-i386") == 0
+ || strcmp (name, "pe-arm-wince-little") == 0
+ || strcmp (name, "pei-arm-wince-little") == 0)
return 1;
bfd_set_error (bfd_error_wrong_format);
@@ -1158,8 +1213,8 @@ FUNCTION
DESCRIPTION
The following functions exist but have not yet been documented.
-.#define bfd_sizeof_headers(abfd, reloc) \
-. BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
+.#define bfd_sizeof_headers(abfd, info) \
+. BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, info))
.
.#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
. BFD_SEND (abfd, _bfd_find_nearest_line, \
@@ -1298,11 +1353,10 @@ bfd_record_phdr (bfd *abfd,
amt = sizeof (struct elf_segment_map);
amt += ((bfd_size_type) count - 1) * sizeof (asection *);
- m = bfd_alloc (abfd, amt);
+ m = bfd_zalloc (abfd, amt);
if (m == NULL)
return FALSE;
- m->next = NULL;
m->p_type = type;
m->p_flags = flags;
m->p_paddr = at;
@@ -1335,6 +1389,15 @@ bfd_fprintf_vma (bfd *abfd, void *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);
+#ifdef BFD64
+ /* fprintf_vma() on a 64-bit enabled host will always print a 64-bit
+ value, but really we want to display the address in the target's
+ address size. Since we do not have a field in the bfd structure
+ to tell us this, we take a guess, based on the target's name. */
+ else if (strstr (bfd_get_target (abfd), "64") == NULL
+ && strcmp (bfd_get_target (abfd), "mmo") != 0)
+ fprintf ((FILE *) stream, "%08lx", (unsigned long) (value & 0xffffffff));
+#endif
else
fprintf_vma ((FILE *) stream, value);
}
@@ -1513,3 +1576,212 @@ bfd_preserve_finish (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_preserve *preserve)
objalloc. */
bfd_hash_table_free (&preserve->section_htab);
}
+
+/*
+FUNCTION
+ bfd_emul_get_maxpagesize
+
+SYNOPSIS
+ bfd_vma bfd_emul_get_maxpagesize (const char *);
+
+DESCRIPTION
+ Returns the maximum page size, in bytes, as determined by
+ emulation.
+
+RETURNS
+ Returns the maximum page size in bytes for ELF, abort
+ otherwise.
+*/
+
+bfd_vma
+bfd_emul_get_maxpagesize (const char *emul)
+{
+ const bfd_target *target;
+
+ target = bfd_find_target (emul, NULL);
+ if (target != NULL
+ && target->flavour == bfd_target_elf_flavour)
+ return xvec_get_elf_backend_data (target)->maxpagesize;
+
+ abort ();
+ return 0;
+}
+
+static void
+bfd_elf_set_pagesize (const bfd_target *target, bfd_vma size,
+ int offset, const bfd_target *orig_target)
+{
+ if (target->flavour == bfd_target_elf_flavour)
+ {
+ const struct elf_backend_data *bed;
+
+ bed = xvec_get_elf_backend_data (target);
+ *((bfd_vma *) ((char *) bed + offset)) = size;
+ }
+
+ if (target->alternative_target
+ && target->alternative_target != orig_target)
+ bfd_elf_set_pagesize (target->alternative_target, size, offset,
+ orig_target);
+}
+
+/*
+FUNCTION
+ bfd_emul_set_maxpagesize
+
+SYNOPSIS
+ void bfd_emul_set_maxpagesize (const char *, bfd_vma);
+
+DESCRIPTION
+ For ELF, set the maximum page size for the emulation. It is
+ a no-op for other formats.
+
+*/
+
+void
+bfd_emul_set_maxpagesize (const char *emul, bfd_vma size)
+{
+ const bfd_target *target;
+
+ target = bfd_find_target (emul, NULL);
+ if (target)
+ bfd_elf_set_pagesize (target, size,
+ offsetof (struct elf_backend_data,
+ maxpagesize), target);
+}
+
+/*
+FUNCTION
+ bfd_emul_get_commonpagesize
+
+SYNOPSIS
+ bfd_vma bfd_emul_get_commonpagesize (const char *);
+
+DESCRIPTION
+ Returns the common page size, in bytes, as determined by
+ emulation.
+
+RETURNS
+ Returns the common page size in bytes for ELF, abort otherwise.
+*/
+
+bfd_vma
+bfd_emul_get_commonpagesize (const char *emul)
+{
+ const bfd_target *target;
+
+ target = bfd_find_target (emul, NULL);
+ if (target != NULL
+ && target->flavour == bfd_target_elf_flavour)
+ return xvec_get_elf_backend_data (target)->commonpagesize;
+
+ abort ();
+ return 0;
+}
+
+/*
+FUNCTION
+ bfd_emul_set_commonpagesize
+
+SYNOPSIS
+ void bfd_emul_set_commonpagesize (const char *, bfd_vma);
+
+DESCRIPTION
+ For ELF, set the common page size for the emulation. It is
+ a no-op for other formats.
+
+*/
+
+void
+bfd_emul_set_commonpagesize (const char *emul, bfd_vma size)
+{
+ const bfd_target *target;
+
+ target = bfd_find_target (emul, NULL);
+ if (target)
+ bfd_elf_set_pagesize (target, size,
+ offsetof (struct elf_backend_data,
+ commonpagesize), target);
+}
+
+/*
+FUNCTION
+ bfd_demangle
+
+SYNOPSIS
+ char *bfd_demangle (bfd *, const char *, int);
+
+DESCRIPTION
+ Wrapper around cplus_demangle. Strips leading underscores and
+ other such chars that would otherwise confuse the demangler.
+ If passed a g++ v3 ABI mangled name, returns a buffer allocated
+ with malloc holding the demangled name. Returns NULL otherwise
+ and on memory alloc failure.
+*/
+
+char *
+bfd_demangle (bfd *abfd, const char *name, int options)
+{
+ char *res, *alloc;
+ const char *pre, *suf;
+ size_t pre_len;
+
+ if (abfd != NULL
+ && *name != '\0'
+ && bfd_get_symbol_leading_char (abfd) == *name)
+ ++name;
+
+ /* 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 to avoid
+ confusing the demangler. */
+ pre = name;
+ while (*name == '.' || *name == '$')
+ ++name;
+ pre_len = name - pre;
+
+ /* Strip off @plt and suchlike too. */
+ alloc = NULL;
+ suf = strchr (name, '@');
+ if (suf != NULL)
+ {
+ alloc = bfd_malloc (suf - name + 1);
+ if (alloc == NULL)
+ return NULL;
+ memcpy (alloc, name, suf - name);
+ alloc[suf - name] = '\0';
+ name = alloc;
+ }
+
+ res = cplus_demangle (name, options);
+
+ if (alloc != NULL)
+ free (alloc);
+
+ if (res == NULL)
+ return NULL;
+
+ /* Put back any prefix or suffix. */
+ if (pre_len != 0 || suf != NULL)
+ {
+ size_t len;
+ size_t suf_len;
+ char *final;
+
+ len = strlen (res);
+ if (suf == NULL)
+ suf = res + len;
+ suf_len = strlen (suf) + 1;
+ final = bfd_malloc (pre_len + len + suf_len);
+ if (final != NULL)
+ {
+ memcpy (final, pre, pre_len);
+ memcpy (final + pre_len, res, len);
+ memcpy (final + pre_len + len, suf, suf_len);
+ }
+ free (res);
+ res = final;
+ }
+
+ return res;
+}
diff --git a/contrib/binutils/bfd/bfdio.c b/contrib/binutils/bfd/bfdio.c
index 22ea886..0df25c3 100644
--- a/contrib/binutils/bfd/bfdio.c
+++ b/contrib/binutils/bfd/bfdio.c
@@ -1,7 +1,7 @@
/* Low-level I/O routines for BFDs.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -23,12 +23,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include "sysdep.h"
-
+#include <limits.h>
#include "bfd.h"
#include "libbfd.h"
-#include <limits.h>
-
#ifndef S_IXUSR
#define S_IXUSR 0100 /* Execute by owner. */
#endif
@@ -116,6 +114,15 @@ bfd_bread (void *ptr, bfd_size_type size, bfd *abfd)
{
size_t nread;
+ /* If this is an archive element, don't read past the end of
+ this element. */
+ if (abfd->arelt_data != NULL)
+ {
+ size_t maxbytes = ((struct areltdata *) abfd->arelt_data)->parsed_size;
+ if (size > maxbytes)
+ size = maxbytes;
+ }
+
if ((abfd->flags & BFD_IN_MEMORY) != 0)
{
struct bfd_in_memory *bim;
@@ -401,7 +408,7 @@ FUNCTION
bfd_get_size
SYNOPSIS
- long bfd_get_size (bfd *abfd);
+ file_ptr bfd_get_size (bfd *abfd);
DESCRIPTION
Return the file size (as read from file system) for the file
@@ -429,7 +436,7 @@ DESCRIPTION
size reasonable?".
*/
-long
+file_ptr
bfd_get_size (bfd *abfd)
{
struct stat buf;
diff --git a/contrib/binutils/bfd/binary.c b/contrib/binutils/bfd/binary.c
index 458626f..b5347dd 100644
--- a/contrib/binutils/bfd/binary.c
+++ b/contrib/binutils/bfd/binary.c
@@ -1,6 +1,6 @@
/* BFD back-end for binary objects.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -32,8 +32,8 @@
the file. objcopy cooperates by specially setting the start
address to zero by default. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "safe-ctype.h"
#include "libbfd.h"
@@ -63,6 +63,7 @@ binary_object_p (bfd *abfd)
{
struct stat statbuf;
asection *sec;
+ flagword flags;
if (abfd->target_defaulted)
{
@@ -80,10 +81,10 @@ binary_object_p (bfd *abfd)
}
/* One data section. */
- sec = bfd_make_section (abfd, ".data");
+ flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS;
+ sec = bfd_make_section_with_flags (abfd, ".data", flags);
if (sec == NULL)
return NULL;
- sec->flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_HAS_CONTENTS;
sec->vma = 0;
sec->size = statbuf.st_size;
sec->filepos = 0;
@@ -220,9 +221,6 @@ binary_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED,
#define binary_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define binary_read_minisymbols _bfd_generic_read_minisymbols
#define binary_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
-#define binary_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
-#define binary_get_reloc_upper_bound ((long (*) (bfd *, asection *)) bfd_0l)
-#define binary_canonicalize_reloc ((long (*) (bfd *, asection *, arelent **, asymbol **)) bfd_0l)
#define binary_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
/* Set the architecture of a binary file. */
@@ -305,7 +303,7 @@ binary_set_section_contents (bfd *abfd,
static int
binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean exec ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
@@ -367,7 +365,7 @@ const bfd_target binary_vec =
BFD_JUMP_TABLE_CORE (_bfd_nocore),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (binary),
- BFD_JUMP_TABLE_RELOCS (binary),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (binary),
BFD_JUMP_TABLE_LINK (binary),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
diff --git a/contrib/binutils/bfd/bout.c b/contrib/binutils/bfd/bout.c
index 5102ba7..fe13212 100644
--- a/contrib/binutils/bfd/bout.c
+++ b/contrib/binutils/bfd/bout.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel 960 b.out binaries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "bfdlink.h"
#include "genlink.h"
@@ -635,7 +635,8 @@ callj_callback (bfd *abfd,
}
static reloc_howto_type *
-b_out_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code)
+b_out_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
{
switch (code)
{
@@ -651,6 +652,20 @@ b_out_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_typ
}
}
+static reloc_howto_type *
+b_out_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ if (strcasecmp (howto_reloc_callj.name, r_name) == 0)
+ return &howto_reloc_callj;
+ if (strcasecmp (howto_reloc_abs32.name, r_name) == 0)
+ return &howto_reloc_abs32;
+ if (strcasecmp (howto_reloc_pcrel24.name, r_name) == 0)
+ return &howto_reloc_pcrel24;
+
+ return NULL;
+}
+
/* Allocate enough room for all the reloc entries, plus pointers to them all. */
static bfd_boolean
@@ -990,7 +1005,8 @@ b_out_set_arch_mach (bfd *abfd,
}
static int
-b_out_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED, bfd_boolean ignore ATTRIBUTE_UNUSED)
+b_out_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return sizeof (struct external_exec);
}
diff --git a/contrib/binutils/bfd/cache.c b/contrib/binutils/bfd/cache.c
index 6db6a6b..5252cc9 100644
--- a/contrib/binutils/bfd/cache.c
+++ b/contrib/binutils/bfd/cache.c
@@ -1,7 +1,7 @@
/* BFD library -- caching of file descriptors.
Copyright 1990, 1991, 1992, 1993, 1994, 1996, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Hacked by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
@@ -40,8 +40,8 @@ SUBSECTION
Caching functions
*/
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libiberty.h"
diff --git a/contrib/binutils/bfd/coff-alpha.c b/contrib/binutils/bfd/coff-alpha.c
index d9b8905..dcb182b 100644
--- a/contrib/binutils/bfd/coff-alpha.c
+++ b/contrib/binutils/bfd/coff-alpha.c
@@ -1,6 +1,6 @@
/* BFD back-end for ALPHA Extended-Coff files.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Modified from coff-mips.c by Steve Chamberlain <sac@cygnus.com> and
Ian Lance Taylor <ian@cygnus.com>.
@@ -20,8 +20,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "coff/internal.h"
@@ -1244,6 +1244,22 @@ alpha_bfd_reloc_type_lookup (abfd, code)
return &alpha_howto_table[alpha_type];
}
+
+static reloc_howto_type *
+alpha_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (alpha_howto_table) / sizeof (alpha_howto_table[0]);
+ i++)
+ if (alpha_howto_table[i].name != NULL
+ && strcasecmp (alpha_howto_table[i].name, r_name) == 0)
+ return &alpha_howto_table[i];
+
+ return NULL;
+}
/* A helper routine for alpha_relocate_section which converts an
external reloc when generating relocatable output. Returns the
@@ -2361,6 +2377,8 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
/* Looking up a reloc type is Alpha specific. */
#define _bfd_ecoff_bfd_reloc_type_lookup alpha_bfd_reloc_type_lookup
+#define _bfd_ecoff_bfd_reloc_name_lookup \
+ alpha_bfd_reloc_name_lookup
/* So is getting relocated section contents. */
#define _bfd_ecoff_bfd_get_relocated_section_contents \
diff --git a/contrib/binutils/bfd/coff-arm.c b/contrib/binutils/bfd/coff-arm.c
index 6b83dc7..28cd4e7 100644
--- a/contrib/binutils/bfd/coff-arm.c
+++ b/contrib/binutils/bfd/coff-arm.c
@@ -1,6 +1,6 @@
/* BFD back-end for ARM COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "coff/arm.h"
#include "coff/internal.h"
@@ -163,6 +163,19 @@ coff_arm_reloc (bfd *abfd,
/* These most certainly belong somewhere else. Just had to get rid of
the manifest constants in the code. */
+
+#ifdef ARM_WINCE
+
+#define ARM_26D 0
+#define ARM_32 1
+#define ARM_RVA32 2
+#define ARM_26 3
+#define ARM_THUMB12 4
+#define ARM_SECTION 14
+#define ARM_SECREL 15
+
+#else
+
#define ARM_8 0
#define ARM_16 1
#define ARM_32 2
@@ -179,20 +192,6 @@ coff_arm_reloc (bfd *abfd,
#define ARM_THUMB12 13
#define ARM_THUMB23 14
-#ifdef ARM_WINCE
-#undef ARM_32
-#undef ARM_RVA32
-#undef ARM_26
-#undef ARM_THUMB12
-#undef ARM_26D
-
-#define ARM_26D 0
-#define ARM_32 1
-#define ARM_RVA32 2
-#define ARM_26 3
-#define ARM_THUMB12 4
-#define ARM_SECTION 14
-#define ARM_SECREL 15
#endif
static bfd_reloc_status_type aoutarm_fix_pcrel_26_done
@@ -220,7 +219,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
complain_overflow_dont,
aoutarm_fix_pcrel_26_done,
"ARM_26D",
- FALSE,
+ TRUE, /* partial_inplace. */
0x00ffffff,
0x0,
PCRELOFFSET),
@@ -233,7 +232,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_32",
- FALSE,
+ TRUE, /* partial_inplace. */
0xffffffff,
0xffffffff,
PCRELOFFSET),
@@ -246,7 +245,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_RVA32",
- FALSE,
+ TRUE, /* partial_inplace. */
0xffffffff,
0xffffffff,
PCRELOFFSET),
@@ -294,7 +293,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_SECTION",
- FALSE,
+ TRUE, /* partial_inplace. */
0x0000ffff,
0x0000ffff,
PCRELOFFSET),
@@ -307,7 +306,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
complain_overflow_bitfield,
coff_arm_reloc,
"ARM_SECREL",
- FALSE,
+ TRUE, /* partial_inplace. */
0xffffffff,
0xffffffff,
PCRELOFFSET),
@@ -539,6 +538,32 @@ coff_arm_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
if (rel->r_type == ARM_RVA32)
*addendp -= pe_data (sec->output_section->owner)->pe_opthdr.ImageBase;
+#if defined COFF_WITH_PE && defined ARM_WINCE
+ if (rel->r_type == ARM_SECREL)
+ {
+ bfd_vma osect_vma;
+
+ if (h && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak))
+ osect_vma = h->root.u.def.section->output_section->vma;
+ else
+ {
+ asection *sec;
+ int i;
+
+ /* Sigh, the only way to get the section to offset against
+ is to find it the hard way. */
+
+ for (sec = abfd->sections, i = 1; i < sym->n_scnum; i++)
+ sec = sec->next;
+
+ osect_vma = sec->output_section->vma;
+ }
+
+ *addendp -= osect_vma;
+ }
+#endif
+
return howto;
}
@@ -808,6 +833,7 @@ coff_arm_reloc_type_lookup (bfd * abfd, bfd_reloc_code_real_type code)
ASTD (BFD_RELOC_RVA, ARM_RVA32);
ASTD (BFD_RELOC_ARM_PCREL_BRANCH, ARM_26);
ASTD (BFD_RELOC_THUMB_PCREL_BRANCH12, ARM_THUMB12);
+ ASTD (BFD_RELOC_32_SECREL, ARM_SECREL);
#else
ASTD (BFD_RELOC_8, ARM_8);
ASTD (BFD_RELOC_16, ARM_16);
@@ -827,6 +853,23 @@ coff_arm_reloc_type_lookup (bfd * abfd, bfd_reloc_code_real_type code)
}
}
+static reloc_howto_type *
+coff_arm_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (aoutarm_std_reloc_howto)
+ / sizeof (aoutarm_std_reloc_howto[0]));
+ i++)
+ if (aoutarm_std_reloc_howto[i].name != NULL
+ && strcasecmp (aoutarm_std_reloc_howto[i].name, r_name) == 0)
+ return &aoutarm_std_reloc_howto[i];
+
+ return NULL;
+}
+
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 2
#define COFF_PAGE_SIZE 0x1000
@@ -1209,12 +1252,14 @@ coff_arm_relocate_section (bfd *output_bfd,
generation of bl's instruction offset. */
addend -= 8;
#endif
- howto = &fake_arm26_reloc;
+ howto = & fake_arm26_reloc;
}
#ifdef ARM_WINCE
/* MS ARM-CE makes the reloc relative to the opcode's pc, not
the next opcode's pc, so is off by one. */
+ if (howto->pc_relative && !info->relocatable)
+ addend -= 8;
#endif
/* If we are doing a relocatable link, then we can just ignore
@@ -1938,12 +1983,11 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd,
if (sec == NULL)
{
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
-
- sec = bfd_make_section (abfd, ARM2THUMB_GLUE_SECTION_NAME);
-
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY);
+ sec = bfd_make_section_with_flags (abfd, ARM2THUMB_GLUE_SECTION_NAME,
+ flags);
if (sec == NULL
- || ! bfd_set_section_flags (abfd, sec, flags)
|| ! bfd_set_section_alignment (abfd, sec, 2))
return FALSE;
}
@@ -1952,12 +1996,12 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd,
if (sec == NULL)
{
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
-
- sec = bfd_make_section (abfd, THUMB2ARM_GLUE_SECTION_NAME);
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY);
+ sec = bfd_make_section_with_flags (abfd, THUMB2ARM_GLUE_SECTION_NAME,
+ flags);
if (sec == NULL
- || ! bfd_set_section_flags (abfd, sec, flags)
|| ! bfd_set_section_alignment (abfd, sec, 2))
return FALSE;
}
@@ -2085,6 +2129,7 @@ bfd_arm_process_before_allocation (bfd * abfd,
#endif /* ! defined (COFF_IMAGE_WITH_PE) */
#define coff_bfd_reloc_type_lookup coff_arm_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup coff_arm_reloc_name_lookup
#define coff_relocate_section coff_arm_relocate_section
#define coff_bfd_is_local_label_name coff_arm_is_local_label_name
#define coff_adjust_symndx coff_arm_adjust_symndx
@@ -2397,7 +2442,9 @@ Warning: Clearing the interworking flag of %B because non-interworking code in %
/* Note: the definitions here of LOCAL_LABEL_PREFIX and USER_LABEL_PREIFX
*must* match the definitions in gcc/config/arm/{coff|semi|aout}.h. */
+#ifndef LOCAL_LABEL_PREFIX
#define LOCAL_LABEL_PREFIX ""
+#endif
#ifndef USER_LABEL_PREFIX
#define USER_LABEL_PREFIX "_"
#endif
diff --git a/contrib/binutils/bfd/coff-aux.c b/contrib/binutils/bfd/coff-aux.c
index e22d855..f28a948 100644
--- a/contrib/binutils/bfd/coff-aux.c
+++ b/contrib/binutils/bfd/coff-aux.c
@@ -1,5 +1,5 @@
/* BFD back-end for Apple M68K COFF A/UX 3.x files.
- Copyright 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 2000, 2002, 2007 Free Software Foundation, Inc.
Written by Richard Henderson <rth@tamu.edu>.
This file is part of BFD, the Binary File Descriptor library.
@@ -37,8 +37,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define COFF_COMMON_ADDEND
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
static bfd_boolean coff_m68k_aux_link_add_one_symbol
PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
diff --git a/contrib/binutils/bfd/coff-i386.c b/contrib/binutils/bfd/coff-i386.c
index 0d71cd0..81d3800 100644
--- a/contrib/binutils/bfd/coff-i386.c
+++ b/contrib/binutils/bfd/coff-i386.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel 386 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004
+ 2000, 2001, 2002, 2003, 2004, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "coff/i386.h"
@@ -546,6 +546,7 @@ coff_i386_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
}
#define coff_bfd_reloc_type_lookup coff_i386_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup coff_i386_reloc_name_lookup
static reloc_howto_type *
coff_i386_reloc_type_lookup (abfd, code)
@@ -578,6 +579,20 @@ coff_i386_reloc_type_lookup (abfd, code)
}
}
+static reloc_howto_type *
+coff_i386_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0; i < sizeof (howto_table) / sizeof (howto_table[0]); i++)
+ if (howto_table[i].name != NULL
+ && strcasecmp (howto_table[i].name, r_name) == 0)
+ return &howto_table[i];
+
+ return NULL;
+}
+
#define coff_rtype_to_howto coff_i386_rtype_to_howto
#ifdef TARGET_UNDERSCORE
diff --git a/contrib/binutils/bfd/coff-ia64.c b/contrib/binutils/bfd/coff-ia64.c
index 1e3b344..32702a8 100644
--- a/contrib/binutils/bfd/coff-ia64.c
+++ b/contrib/binutils/bfd/coff-ia64.c
@@ -1,5 +1,5 @@
/* BFD back-end for HP/Intel IA-64 COFF files.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
Contributed by David Mosberger <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "coff/ia64.h"
#include "coff/internal.h"
diff --git a/contrib/binutils/bfd/coff-mips.c b/contrib/binutils/bfd/coff-mips.c
index 34b072c..d5dafc7 100644
--- a/contrib/binutils/bfd/coff-mips.c
+++ b/contrib/binutils/bfd/coff-mips.c
@@ -1,6 +1,6 @@
/* BFD back-end for MIPS Extended-Coff files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004
+ 2000, 2001, 2002, 2003, 2004, 2007
Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -21,8 +21,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "coff/internal.h"
@@ -769,6 +769,22 @@ mips_bfd_reloc_type_lookup (abfd, code)
return &mips_howto_table[mips_type];
}
+
+static reloc_howto_type *
+mips_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (mips_howto_table) / sizeof (mips_howto_table[0]);
+ i++)
+ if (mips_howto_table[i].name != NULL
+ && strcasecmp (mips_howto_table[i].name, r_name) == 0)
+ return &mips_howto_table[i];
+
+ return NULL;
+}
/* A helper routine for mips_relocate_section which handles the REFHI
relocations. The REFHI relocation must be followed by a REFLO
@@ -1375,6 +1391,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
/* Looking up a reloc type is MIPS specific. */
#define _bfd_ecoff_bfd_reloc_type_lookup mips_bfd_reloc_type_lookup
+#define _bfd_ecoff_bfd_reloc_name_lookup mips_bfd_reloc_name_lookup
/* Getting relocated section contents is generic. */
#define _bfd_ecoff_bfd_get_relocated_section_contents \
diff --git a/contrib/binutils/bfd/coff-ppc.c b/contrib/binutils/bfd/coff-ppc.c
index b442793..72ade4e 100644
--- a/contrib/binutils/bfd/coff-ppc.c
+++ b/contrib/binutils/bfd/coff-ppc.c
@@ -1,6 +1,6 @@
/* BFD back-end for PowerPC Microsoft Portable Executable files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Original version pieced together by Kim Knuttila (krk@cygnus.com)
@@ -33,9 +33,8 @@
- dlltool will not produce correct output in some .reloc cases, and will
not produce the right glue code for dll function calls. */
-#include "bfd.h"
#include "sysdep.h"
-
+#include "bfd.h"
#include "libbfd.h"
#include "coff/powerpc.h"
@@ -1332,7 +1331,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
DUMP_RELOC2 (howto->name, rel);
- if (strncmp(".idata$2",input_section->name,8) == 0 && first_thunk_address == 0)
+ if (CONST_STRNEQ (input_section->name, ".idata$2") && first_thunk_address == 0)
{
/* Set magic values. */
int idata5offset;
@@ -1961,8 +1960,23 @@ ppc_coff_reloc_type_lookup (abfd, code)
return NULL;
}
}
-
#undef HOW2MAP
+
+static reloc_howto_type *
+ppc_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (ppc_coff_howto_table) / sizeof (ppc_coff_howto_table[0]);
+ i++)
+ if (ppc_coff_howto_table[i].name != NULL
+ && strcasecmp (ppc_coff_howto_table[i].name, r_name) == 0)
+ return &ppc_coff_howto_table[i];
+
+ return NULL;
+}
/* Tailor coffcode.h -- macro heaven. */
@@ -1971,6 +1985,7 @@ ppc_coff_reloc_type_lookup (abfd, code)
/* We use the special COFF backend linker, with our own special touch. */
#define coff_bfd_reloc_type_lookup ppc_coff_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup ppc_coff_reloc_name_lookup
#define coff_rtype_to_howto coff_ppc_rtype_to_howto
#define coff_relocate_section coff_ppc_relocate_section
#define coff_bfd_final_link ppc_bfd_coff_final_link
diff --git a/contrib/binutils/bfd/coff-rs6000.c b/contrib/binutils/bfd/coff-rs6000.c
index 951587f..f446f49 100644
--- a/contrib/binutils/bfd/coff-rs6000.c
+++ b/contrib/binutils/bfd/coff-rs6000.c
@@ -1,12 +1,7 @@
/* BFD back-end for IBM RS/6000 "XCOFF" files.
- Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1990-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
- FIXME: Can someone provide a transliteration of this name into ASCII?
- Using the following chars caused a compiler warning on HIUX (so I replaced
- them with octal escapes), and isn't useful without an understanding of what
- character set it is.
- Written by Metin G. Ozisik, Mimi Ph\373\364ng-Th\345o V\365,
- and John Gilmore.
+ Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
Archive support from Damon A. Permezel.
Contributed by IBM Corporation and Cygnus Support.
@@ -26,8 +21,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "coff/internal.h"
@@ -59,7 +54,7 @@ extern bfd_boolean _bfd_xcoff_write_armap
extern bfd_boolean _bfd_xcoff_write_archive_contents
PARAMS ((bfd *));
extern int _bfd_xcoff_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ PARAMS ((bfd *, struct bfd_link_info *));
extern void _bfd_xcoff_swap_sym_in
PARAMS ((bfd *, PTR, PTR));
extern unsigned int _bfd_xcoff_swap_sym_out
@@ -98,6 +93,7 @@ void xcoff_rtype2howto
#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
+#define coff_bfd_reloc_name_lookup _bfd_xcoff_reloc_name_lookup
#ifdef AIX_CORE
extern const bfd_target * rs6000coff_core_p
PARAMS ((bfd *abfd));
@@ -1051,6 +1047,21 @@ _bfd_xcoff_reloc_type_lookup (abfd, code)
}
}
+static reloc_howto_type *
+_bfd_xcoff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (xcoff_howto_table) / sizeof (xcoff_howto_table[0]);
+ i++)
+ if (xcoff_howto_table[i].name != NULL
+ && strcasecmp (xcoff_howto_table[i].name, r_name) == 0)
+ return &xcoff_howto_table[i];
+
+ return NULL;
+}
/* XCOFF archive support. The original version of this code was by
Damon A. Permezel. It was enhanced to permit cross support, and
@@ -1638,7 +1649,7 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
+ SXCOFFARFMAG
+ arelt_size (sub));
fileoff = (fileoff + 1) &~ 1;
- sub = sub->next;
+ sub = sub->archive_next;
}
for (i = 0; i < orl_count; i++)
@@ -1809,7 +1820,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
}
i++;
}
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -1913,7 +1924,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
+ SXCOFFARFMAG
+ arelt_size (current_bfd));
fileoff += fileoff & 1;
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -1934,7 +1945,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
}
i++;
}
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -2009,7 +2020,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
+ SXCOFFARFMAG
+ arelt_size (current_bfd));
fileoff += fileoff & 1;
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -2030,7 +2041,7 @@ xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
}
i++;
}
- current_bfd = current_bfd->next;
+ current_bfd = current_bfd->archive_next;
if (current_bfd != NULL)
arch_info = bfd_get_arch_info (current_bfd);
}
@@ -2089,7 +2100,7 @@ xcoff_write_archive_contents_old (abfd)
count = 0;
total_namlen = 0;
- for (sub = abfd->archive_head; sub != NULL; sub = sub->next)
+ for (sub = abfd->archive_head; sub != NULL; sub = sub->archive_next)
{
++count;
total_namlen += strlen (normalize_filename (sub)) + 1;
@@ -2105,7 +2116,9 @@ xcoff_write_archive_contents_old (abfd)
hasobjects = FALSE;
prevoff = 0;
nextoff = SIZEOF_AR_FILE_HDR;
- for (sub = abfd->archive_head, i = 0; sub != NULL; sub = sub->next, i++)
+ for (sub = abfd->archive_head, i = 0;
+ sub != NULL;
+ sub = sub->archive_next, i++)
{
const char *name;
bfd_size_type namlen;
@@ -2253,7 +2266,7 @@ xcoff_write_archive_contents_old (abfd)
abfd) != XCOFFARMAG_ELEMENT_SIZE)
return FALSE;
}
- for (sub = abfd->archive_head; sub != NULL; sub = sub->next)
+ for (sub = abfd->archive_head; sub != NULL; sub = sub->archive_next)
{
const char *name;
bfd_size_type namlen;
@@ -2323,7 +2336,7 @@ xcoff_write_archive_contents_big (abfd)
hasobjects = FALSE;
for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0;
current_bfd != NULL;
- current_bfd = current_bfd->next, count++)
+ current_bfd = current_bfd->archive_next, count++)
{
total_namlen += strlen (normalize_filename (current_bfd)) + 1;
@@ -2345,7 +2358,7 @@ xcoff_write_archive_contents_big (abfd)
nextoff = SIZEOF_AR_FILE_HDR_BIG;
for (current_bfd = abfd->archive_head, i = 0;
current_bfd != NULL;
- current_bfd = current_bfd->next, i++)
+ current_bfd = current_bfd->archive_next, i++)
{
const char *name;
bfd_size_type namlen;
@@ -2512,8 +2525,9 @@ xcoff_write_archive_contents_big (abfd)
offsets = NULL;
}
- for (current_bfd = abfd->archive_head; current_bfd != NULL;
- current_bfd = current_bfd->next)
+ for (current_bfd = abfd->archive_head;
+ current_bfd != NULL;
+ current_bfd = current_bfd->archive_next)
{
const char *name;
size_t namlen;
@@ -2573,9 +2587,8 @@ _bfd_xcoff_write_archive_contents (abfd)
always uses an a.out header. */
int
-_bfd_xcoff_sizeof_headers (abfd, reloc)
- bfd *abfd;
- bfd_boolean reloc ATTRIBUTE_UNUSED;
+_bfd_xcoff_sizeof_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
int size;
@@ -4179,6 +4192,7 @@ const bfd_target rs6000coff_vec =
coff_get_reloc_upper_bound,
coff_canonicalize_reloc,
_bfd_xcoff_reloc_type_lookup,
+ _bfd_xcoff_reloc_name_lookup,
/* Write */
coff_set_arch_mach,
@@ -4429,6 +4443,7 @@ const bfd_target pmac_xcoff_vec =
coff_get_reloc_upper_bound,
coff_canonicalize_reloc,
_bfd_xcoff_reloc_type_lookup,
+ _bfd_xcoff_reloc_name_lookup,
/* Write */
coff_set_arch_mach,
diff --git a/contrib/binutils/bfd/coff-sparc.c b/contrib/binutils/bfd/coff-sparc.c
index 0236f52..236c7bf 100644
--- a/contrib/binutils/bfd/coff-sparc.c
+++ b/contrib/binutils/bfd/coff-sparc.c
@@ -1,6 +1,6 @@
/* BFD back-end for Sparc COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
- 2002, 2003, 2005 Free Software Foundation, Inc.
+ 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "coff/sparc.h"
#include "coff/internal.h"
@@ -158,6 +158,24 @@ coff_sparc_reloc_type_lookup (abfd, code)
}
#define coff_bfd_reloc_type_lookup coff_sparc_reloc_type_lookup
+static reloc_howto_type *
+coff_sparc_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (coff_sparc_howto_table)
+ / sizeof (coff_sparc_howto_table[0]));
+ i++)
+ if (coff_sparc_howto_table[i].name != NULL
+ && strcasecmp (coff_sparc_howto_table[i].name, r_name) == 0)
+ return &coff_sparc_howto_table[i];
+
+ return NULL;
+}
+#define coff_bfd_reloc_name_lookup coff_sparc_reloc_name_lookup
+
static void
rtype2howto (cache_ptr, dst)
arelent *cache_ptr;
diff --git a/contrib/binutils/bfd/coff64-rs6000.c b/contrib/binutils/bfd/coff64-rs6000.c
index e0aa87e..5e0804f 100644
--- a/contrib/binutils/bfd/coff64-rs6000.c
+++ b/contrib/binutils/bfd/coff64-rs6000.c
@@ -1,5 +1,5 @@
/* BFD back-end for IBM RS/6000 "XCOFF64" files.
- Copyright 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written Clinton Popetz.
Contributed by Cygnus Support.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "coff/internal.h"
@@ -127,7 +127,7 @@ extern bfd_boolean _bfd_xcoff_write_armap
extern bfd_boolean _bfd_xcoff_write_archive_contents
PARAMS ((bfd *));
extern int _bfd_xcoff_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ PARAMS ((bfd *, struct bfd_link_info *));
extern void _bfd_xcoff_swap_sym_in
PARAMS ((bfd *, PTR, PTR));
extern unsigned int _bfd_xcoff_swap_sym_out
@@ -161,7 +161,7 @@ static const bfd_target *xcoff64_archive_p
static bfd *xcoff64_openr_next_archived_file
PARAMS ((bfd *, bfd *));
static int xcoff64_sizeof_headers
- PARAMS ((bfd *, bfd_boolean));
+ PARAMS ((bfd *, struct bfd_link_info *));
static asection *xcoff64_create_csect_from_smclas
PARAMS ((bfd *, union internal_auxent *, const char *));
static bfd_boolean xcoff64_is_lineno_count_overflow
@@ -237,6 +237,7 @@ bfd_boolean (*xcoff64_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION])
#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 xcoff64_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup xcoff64_reloc_name_lookup
#ifdef AIX_CORE
extern const bfd_target * rs6000coff_core_p
PARAMS ((bfd *abfd));
@@ -1843,6 +1844,22 @@ xcoff64_reloc_type_lookup (abfd, code)
}
}
+static reloc_howto_type *
+xcoff64_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (xcoff64_howto_table) / sizeof (xcoff64_howto_table[0]);
+ i++)
+ if (xcoff64_howto_table[i].name != NULL
+ && strcasecmp (xcoff64_howto_table[i].name, r_name) == 0)
+ return &xcoff64_howto_table[i];
+
+ return NULL;
+}
+
/* Read in the armap of an XCOFF archive. */
static bfd_boolean
@@ -2056,9 +2073,8 @@ xcoff64_openr_next_archived_file (archive, last_file)
always uses an a.out header. */
static int
-xcoff64_sizeof_headers (abfd, reloc)
- bfd *abfd;
- bfd_boolean reloc ATTRIBUTE_UNUSED;
+xcoff64_sizeof_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
int size;
@@ -2726,6 +2742,7 @@ const bfd_target rs6000coff64_vec =
coff_get_reloc_upper_bound,
coff_canonicalize_reloc,
xcoff64_reloc_type_lookup,
+ xcoff64_reloc_name_lookup,
/* Write */
coff_set_arch_mach,
@@ -2977,6 +2994,7 @@ const bfd_target aix5coff64_vec =
coff_get_reloc_upper_bound,
coff_canonicalize_reloc,
xcoff64_reloc_type_lookup,
+ xcoff64_reloc_name_lookup,
/* Write */
coff_set_arch_mach,
diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h
index 256732c..a2aac5f 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, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -427,7 +427,7 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags)
styp_flags = STYP_LIT;
#endif /* _LIT */
}
- else if (!strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1))
+ else if (CONST_STRNEQ (sec_name, DOT_DEBUG))
{
/* Handle the XCOFF debug section and DWARF2 debug sections. */
if (!sec_name[6])
@@ -435,12 +435,12 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags)
else
styp_flags = STYP_DEBUG_INFO;
}
- else if (!strncmp (sec_name, ".stab", 5))
+ else if (CONST_STRNEQ (sec_name, ".stab"))
{
styp_flags = STYP_DEBUG_INFO;
}
#ifdef COFF_LONG_SECTION_NAMES
- else if (!strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1))
+ else if (CONST_STRNEQ (sec_name, GNU_LINKONCE_WI))
{
styp_flags = STYP_DEBUG_INFO;
}
@@ -529,8 +529,8 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags)
but there are more IMAGE_SCN_* flags. */
/* FIXME: There is no gas syntax to specify the debug section flag. */
- if (strncmp (sec_name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
- || strncmp (sec_name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0)
+ if (CONST_STRNEQ (sec_name, DOT_DEBUG)
+ || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI))
sec_flags = SEC_DEBUGGING;
/* skip LOAD */
@@ -674,14 +674,14 @@ styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED,
#endif
sec_flags |= SEC_ALLOC;
}
- else if (strncmp (name, DOT_DEBUG, sizeof (DOT_DEBUG) - 1) == 0
+ else if (CONST_STRNEQ (name, DOT_DEBUG)
#ifdef _COMMENT
|| strcmp (name, _COMMENT) == 0
#endif
#ifdef COFF_LONG_SECTION_NAMES
- || strncmp (name, GNU_LINKONCE_WI, sizeof (GNU_LINKONCE_WI) - 1) == 0
+ || CONST_STRNEQ (name, GNU_LINKONCE_WI)
#endif
- || strncmp (name, ".stab", 5) == 0)
+ || CONST_STRNEQ (name, ".stab"))
{
#ifdef COFF_PAGE_SIZE
sec_flags |= SEC_DEBUGGING;
@@ -715,7 +715,7 @@ styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED,
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+ if (CONST_STRNEQ (name, ".gnu.linkonce"))
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
@@ -1071,7 +1071,7 @@ styp_to_sec_flags (bfd *abfd,
/* The MS PE spec sets the DISCARDABLE flag on .reloc sections
but we do not want them to be labelled as debug section, since
then strip would remove them. */
- if (strncmp (name, ".reloc", sizeof ".reloc" - 1) != 0)
+ if (! CONST_STRNEQ (name, ".reloc"))
sec_flags |= SEC_DEBUGGING;
break;
case IMAGE_SCN_MEM_SHARED:
@@ -1126,7 +1126,7 @@ styp_to_sec_flags (bfd *abfd,
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0)
+ if (CONST_STRNEQ (name, ".gnu.linkonce"))
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
@@ -1546,6 +1546,9 @@ static const unsigned int coff_section_alignment_table_size =
static bfd_boolean
coff_new_section_hook (bfd * abfd, asection * section)
{
+ combined_entry_type *native;
+ bfd_size_type amt;
+
section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
#ifdef RS6000COFF_C
@@ -1557,34 +1560,31 @@ coff_new_section_hook (bfd * abfd, asection * section)
section->alignment_power = bfd_xcoff_data_align_power (abfd);
#endif
- /* PR binutils/2724: Only real sections have a symbol that
- has the coff_symbol_type structure allocated for it. */
- if (! bfd_is_const_section (section))
- {
- combined_entry_type *native;
- bfd_size_type amt;
+ /* Set up the section symbol. */
+ if (!_bfd_generic_new_section_hook (abfd, section))
+ return FALSE;
- /* Allocate aux records for section symbols, to store size and
- related info.
+ /* Allocate aux records for section symbols, to store size and
+ related info.
- @@ The 10 is a guess at a plausible maximum number of aux entries
- (but shouldn't be a constant). */
- amt = sizeof (combined_entry_type) * 10;
- native = bfd_zalloc (abfd, amt);
- if (native == NULL)
- return FALSE;
+ @@ The 10 is a guess at a plausible maximum number of aux entries
+ (but shouldn't be a constant). */
+ amt = sizeof (combined_entry_type) * 10;
+ native = bfd_zalloc (abfd, amt);
+ if (native == NULL)
+ return FALSE;
- /* We don't need to set up n_name, n_value, or n_scnum in the native
- symbol information, since they'll be overridden by the BFD symbol
- anyhow. However, we do need to set the type and storage class,
- in case this symbol winds up getting written out. The value 0
- for n_numaux is already correct. */
- native->u.syment.n_type = T_NULL;
- native->u.syment.n_sclass = C_STAT;
+ /* We don't need to set up n_name, n_value, or n_scnum in the native
+ symbol information, since they'll be overridden by the BFD symbol
+ anyhow. However, we do need to set the type and storage class,
+ in case this symbol winds up getting written out. The value 0
+ for n_numaux is already correct. */
+
+ native->u.syment.n_type = T_NULL;
+ native->u.syment.n_sclass = C_STAT;
+
+ coffsymbol (section->symbol)->native = native;
- coffsymbol (section->symbol)->native = native;
- }
-
coff_set_custom_section_alignment (abfd, section,
coff_section_alignment_table,
coff_section_alignment_table_size);
@@ -1882,9 +1882,15 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
#ifdef I386MAGIC
case I386MAGIC:
case I386PTXMAGIC:
- case I386AIXMAGIC: /* Danbury PS/2 AIX C Compiler */
- case LYNXCOFFMAGIC: /* shadows the m68k Lynx number below, sigh */
+ case I386AIXMAGIC: /* Danbury PS/2 AIX C Compiler. */
+ case LYNXCOFFMAGIC: /* Shadows the m68k Lynx number below, sigh. */
+ arch = bfd_arch_i386;
+ break;
+#endif
+#ifdef AMD64MAGIC
+ case AMD64MAGIC:
arch = bfd_arch_i386;
+ machine = bfd_mach_x86_64;
break;
#endif
#ifdef IA64MAGIC
@@ -2532,11 +2538,15 @@ coff_write_relocs (bfd * abfd, int first_undef)
else
{
n.r_symndx = get_index ((*(q->sym_ptr_ptr)));
- /* Take notice if the symbol reloc points to a symbol
- we don't have in our symbol table. What should we
- do for this?? */
+ /* Check to see if the symbol reloc points to a symbol
+ we don't have in our symbol table. */
if (n.r_symndx > obj_conv_table_size (abfd))
- abort ();
+ {
+ bfd_set_error (bfd_error_bad_value);
+ _bfd_error_handler (_("%B: reloc against a non-existant symbol index: %ld"),
+ abfd, n.r_symndx);
+ return FALSE;
+ }
}
}
@@ -2717,13 +2727,18 @@ coff_set_flags (bfd * abfd,
return TRUE;
#endif
-#ifdef I386MAGIC
+#if defined(I386MAGIC) || defined(AMD64MAGIC)
case bfd_arch_i386:
+#if defined(I386MAGIC)
*magicp = I386MAGIC;
-#ifdef LYNXOS
+#endif
+#if defined LYNXOS
/* Just overwrite the usual value if we're doing Lynx. */
*magicp = LYNXCOFFMAGIC;
#endif
+#if defined AMD64MAGIC
+ *magicp = AMD64MAGIC;
+#endif
return TRUE;
#endif
@@ -3755,6 +3770,7 @@ coff_write_object_contents (bfd * abfd)
internal_f.f_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE;
#endif
+#ifndef COFF_WITH_pex64
#ifdef COFF_WITH_PE
internal_f.f_flags |= IMAGE_FILE_32BIT_MACHINE;
#else
@@ -3763,6 +3779,7 @@ coff_write_object_contents (bfd * abfd)
else
internal_f.f_flags |= F_AR32W;
#endif
+#endif
#ifdef TI_TARGET_ID
/* Target id is used in TI COFF v1 and later; COFF0 won't use this field,
@@ -3856,16 +3873,18 @@ coff_write_object_contents (bfd * abfd)
#if defined(I386)
#define __A_MAGIC_SET__
-#if defined(LYNXOS)
+#if defined LYNXOS
internal_a.magic = LYNXCOFFMAGIC;
-#else /* LYNXOS */
+#elif defined AMD64
+ internal_a.magic = IMAGE_NT_OPTIONAL_HDR64_MAGIC;
+#else
internal_a.magic = ZMAGIC;
-#endif /* LYNXOS */
+#endif
#endif /* I386 */
#if defined(IA64)
#define __A_MAGIC_SET__
- internal_a.magic = ZMAGIC;
+ internal_a.magic = PE32PMAGIC;
#endif /* IA64 */
#if defined(SPARC)
@@ -4851,6 +4870,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
cache_ptr = reloc_cache + idx;
src = native_relocs + idx;
+ dst.r_offset = 0;
coff_swap_reloc_in (abfd, src, &dst);
#ifdef RELOC_PROCESSING
@@ -4931,6 +4951,7 @@ coff_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
{
arelent genrel;
+ genrel.howto = NULL;
RTYPE2HOWTO (&genrel, rel);
return genrel.howto;
}
@@ -5314,6 +5335,9 @@ static const bfd_coff_backend_data ticoff1_swap_table =
#ifndef coff_bfd_reloc_type_lookup
#define coff_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
#endif
+#ifndef coff_bfd_reloc_name_lookup
+#define coff_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
+#endif
#ifndef coff_bfd_get_relocated_section_contents
#define coff_bfd_get_relocated_section_contents \
diff --git a/contrib/binutils/bfd/coffgen.c b/contrib/binutils/bfd/coffgen.c
index c541e6a..8884a7f 100644
--- a/contrib/binutils/bfd/coffgen.c
+++ b/contrib/binutils/bfd/coffgen.c
@@ -1,6 +1,6 @@
/* Support for the generic parts of COFF, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -37,8 +37,8 @@
Those functions may not use any COFF specific information, such as
coff_data (abfd). */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "coff/internal.h"
#include "libcoff.h"
@@ -1901,7 +1901,16 @@ coff_print_symbol (bfd *abfd,
combined->u.syment.n_type,
combined->u.syment.n_sclass,
combined->u.syment.n_numaux);
- fprintf_vma (file, val);
+#ifdef BFD64
+ /* fprintf_vma() on a 64-bit enabled host will always print a 64-bit
+ value, but really we want to display the address in the target's
+ address size. Since we do not have a field in the bfd structure
+ to tell us this, we take a guess, based on the target's name. */
+ if (strstr (bfd_get_target (abfd), "64") == NULL)
+ fprintf (file, "%08lx", (unsigned long) (val & 0xffffffff));
+ else
+#endif
+ fprintf_vma (file, val);
fprintf (file, " %s", symbol->name);
for (aux = 0; aux < combined->u.syment.n_numaux; aux++)
@@ -2238,11 +2247,11 @@ coff_find_inliner_info (bfd *abfd,
}
int
-coff_sizeof_headers (bfd *abfd, bfd_boolean reloc)
+coff_sizeof_headers (bfd *abfd, struct bfd_link_info *info)
{
size_t size;
- if (! reloc)
+ if (!info->relocatable)
size = bfd_coff_filhsz (abfd) + bfd_coff_aoutsz (abfd);
else
size = bfd_coff_filhsz (abfd);
diff --git a/contrib/binutils/bfd/cofflink.c b/contrib/binutils/bfd/cofflink.c
index a1f6684..1ed7107 100644
--- a/contrib/binutils/bfd/cofflink.c
+++ b/contrib/binutils/bfd/cofflink.c
@@ -1,6 +1,6 @@
/* COFF specific linker code.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -21,8 +21,8 @@
/* This file contains the COFF backend linker code. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "coff/internal.h"
@@ -232,7 +232,7 @@ coff_link_check_ar_symbols (bfd *abfd,
/* Auto import. */
if (!h
&& info->pei386_auto_import
- && !strncmp (name,"__imp_", 6))
+ && CONST_STRNEQ (name, "__imp_"))
h = bfd_link_hash_lookup (info->hash, name + 6, FALSE, FALSE, TRUE);
/* We are only interested in symbols that are currently
@@ -439,7 +439,7 @@ coff_link_add_symbols (bfd *abfd,
|| classification == COFF_SYMBOL_PE_SECTION)
&& coff_section_data (abfd, section) != NULL
&& coff_section_data (abfd, section)->comdat != NULL
- && strncmp (name, "??_", 3) == 0
+ && CONST_STRNEQ (name, "??_")
&& strcmp (name, coff_section_data (abfd, section)->comdat->name) == 0)
{
if (*sym_hash == NULL)
@@ -583,7 +583,7 @@ coff_link_add_symbols (bfd *abfd,
asection *stab;
for (stab = abfd->sections; stab; stab = stab->next)
- if (strncmp (".stab", stab->name, 5) == 0
+ if (CONST_STRNEQ (stab->name, ".stab")
&& (!stab->name[5]
|| (stab->name[5] == '.' && ISDIGIT (stab->name[6]))))
{
@@ -1232,16 +1232,14 @@ process_embedded_commands (bfd *output_bfd,
s++;
continue;
}
- if (strncmp (s, "-attr", 5) == 0)
+ if (CONST_STRNEQ (s, "-attr"))
{
char *name;
char *attribs;
asection *asec;
int loop = 1;
int had_write = 0;
- int had_read = 0;
int had_exec= 0;
- int had_shared= 0;
s += 5;
s = get_name (s, &name);
@@ -1255,10 +1253,8 @@ process_embedded_commands (bfd *output_bfd,
had_write = 1;
break;
case 'R':
- had_read = 1;
break;
case 'S':
- had_shared = 1;
break;
case 'X':
had_exec = 1;
@@ -1276,11 +1272,11 @@ process_embedded_commands (bfd *output_bfd,
asec->flags |= SEC_READONLY;
}
}
- else if (strncmp (s,"-heap", 5) == 0)
- s = dores_com (s+5, output_bfd, 1);
+ else if (CONST_STRNEQ (s, "-heap"))
+ s = dores_com (s + 5, output_bfd, 1);
- else if (strncmp (s,"-stack", 6) == 0)
- s = dores_com (s+6, output_bfd, 0);
+ else if (CONST_STRNEQ (s, "-stack"))
+ s = dores_com (s + 6, output_bfd, 0);
else
s++;
@@ -1925,6 +1921,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
generate two symbols with the same name, but only one
will have aux entries. */
BFD_ASSERT (isymp->n_numaux == 0
+ || h->numaux == 0
|| h->numaux == isymp->n_numaux);
}
@@ -1940,7 +1937,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
union internal_auxent aux;
union internal_auxent *auxp;
- if (h != NULL)
+ if (h != NULL && h->aux != NULL && (h->numaux > i))
auxp = h->aux + i;
else
{
diff --git a/contrib/binutils/bfd/config.bfd b/contrib/binutils/bfd/config.bfd
index b112f4b..9253996 100755
--- a/contrib/binutils/bfd/config.bfd
+++ b/contrib/binutils/bfd/config.bfd
@@ -31,12 +31,7 @@ targ_underscore=no
# Catch obsolete configurations.
case $targ in
- m68*-apple-aux* | \
- m68*-apollo-* | \
- m68*-bull-sysv* | \
- m68*-*-rtemscoff* | \
- i960-*-rtems* | \
- or32-*-rtems* | \
+ maxq-*-coff | \
null)
if test "x$enable_obsolete" != xyes; then
echo "*** Configuration $targ is obsolete." >&2
@@ -48,6 +43,12 @@ case $targ in
esac
case $targ in
+ m68*-apple-aux* | \
+ m68*-apollo-* | \
+ m68*-bull-sysv* | \
+ m68*-*-rtemscoff* | \
+ i960-*-rtems* | \
+ or32-*-rtems* | \
m68*-*-lynxos* | \
sparc-*-lynxos* | \
vax-*-vms* | \
@@ -75,9 +76,11 @@ bfin*) targ_archs=bfd_bfin_arch ;;
c30*) targ_archs=bfd_tic30_arch ;;
c4x*) targ_archs=bfd_tic4x_arch ;;
c54x*) targ_archs=bfd_tic54x_arch ;;
+cr16*) targ_archs=bfd_cr16_arch ;;
crisv32) targ_archs=bfd_cris_arch ;;
crx*) targ_archs=bfd_crx_arch ;;
dlx*) targ_archs=bfd_dlx_arch ;;
+fido*) targ_archs=bfd_m68k_arch ;;
hppa*) targ_archs=bfd_hppa_arch ;;
i[3-7]86) targ_archs=bfd_i386_arch ;;
i370) targ_archs=bfd_i370_arch ;;
@@ -95,10 +98,11 @@ 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 ;;
+spu*) targ_archs=bfd_spu_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 ;;
+x86_64*) targ_archs=bfd_i386_arch ;;
xscale*) targ_archs=bfd_arm_arch ;;
xtensa*) targ_archs=bfd_xtensa_arch ;;
z80|r800) targ_archs=bfd_z80_arch ;;
@@ -137,6 +141,7 @@ case "${targ}" in
alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_alpha_freebsd_vec
targ_selvecs=ecoffalpha_little_vec
+ want64=true
# FreeBSD <= 4.0 supports only the old nonstandard way of ABI labelling.
case "${targ}" in
alpha*-*-freebsd3* | alpha*-*-freebsd4 | alpha*-*-freebsd4.0*)
@@ -146,36 +151,49 @@ case "${targ}" in
alpha*-*-netbsd* | alpha*-*-openbsd*)
targ_defvec=bfd_elf64_alpha_vec
targ_selvecs=ecoffalpha_little_vec
+ want64=true
;;
alpha*-*-netware*)
targ_defvec=ecoffalpha_little_vec
targ_selvecs=nlm32_alpha_vec
+ want64=true
;;
alpha*-*-linuxecoff*)
targ_defvec=ecoffalpha_little_vec
targ_selvecs=bfd_elf64_alpha_vec
+ want64=true
;;
alpha*-*-linux-* | alpha*-*-elf*)
targ_defvec=bfd_elf64_alpha_vec
targ_selvecs=ecoffalpha_little_vec
+ want64=true
;;
alpha*-*-*vms*)
targ_defvec=vms_alpha_vec
+ want64=true
;;
alpha*-*-*)
targ_defvec=ecoffalpha_little_vec
+ want64=true
;;
ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu)
targ_defvec=bfd_elf64_ia64_little_vec
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
+ want64=true
;;
ia64*-*-hpux*)
targ_defvec=bfd_elf32_ia64_hpux_big_vec
targ_selvecs="bfd_elf64_ia64_hpux_big_vec"
+ want64=true
;;
- sparc64-*-freebsd* | sparc64-*-netbsd* | sparc64-*-openbsd* | sparc64-*-kfreebsd*-gnu)
+ sparc64-*-freebsd* | sparc64-*-kfreebsd*-gnu)
+ targ_defvec=bfd_elf64_sparc_freebsd_vec
+ targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
+ ;;
+ sparc64-*-netbsd* | sparc64-*-openbsd*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec"
+ want64=true
;;
#endif /* BFD64 */
@@ -215,8 +233,8 @@ case "${targ}" in
targ_cflags=-DARM_COFF_BUGFIX
;;
arm-wince-pe | arm-*-wince)
- targ_defvec=armpe_little_vec
- targ_selvecs="armpe_little_vec armpe_big_vec armpei_little_vec armpei_big_vec"
+ targ_defvec=arm_wince_pe_little_vec
+ targ_selvecs="arm_wince_pe_little_vec arm_wince_pe_big_vec arm_wince_pei_little_vec arm_wince_pei_big_vec"
targ_underscore=no
targ_cflags="-DARM_WINCE -DARM_COFF_BUGFIX"
;;
@@ -340,6 +358,11 @@ case "${targ}" in
targ_underscore=yes
;;
+ cr16-*-elf*)
+ targ_defvec=bfd_elf32_cr16_vec
+ targ_underscore=yes
+ ;;
+
cr16c-*-elf*)
targ_defvec=bfd_elf32_cr16c_vec
targ_underscore=yes
@@ -369,6 +392,11 @@ case "${targ}" in
targ_defvec=bfd_elf32_d30v_vec
;;
+ fido-*-elf* )
+ targ_defvec=bfd_elf32_m68k_vec
+ targ_selvecs="m68kcoff_vec ieee_vec"
+ ;;
+
fr30-*-elf)
targ_defvec=bfd_elf32_fr30_vec
;;
@@ -407,11 +435,13 @@ case "${targ}" in
hppa*64*-*-linux-*)
targ_defvec=bfd_elf64_hppa_linux_vec
targ_selvecs=bfd_elf64_hppa_vec
+ want64=true
;;
hppa*64*-*-hpux11*)
targ_defvec=bfd_elf64_hppa_vec
targ_selvecs=bfd_elf64_hppa_linux_vec
targ_cflags=-DHPUX_LARGE_AR_IDS
+ want64=true
;;
#endif
@@ -553,18 +583,28 @@ case "${targ}" in
x86_64-*-elf*)
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386coff_vec"
+ want64=true
;;
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
- targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec i386coff_vec bfd_efi_app_ia32_vec"
+ targ_defvec=bfd_elf64_x86_64_freebsd_vec
+ targ_selvecs="bfd_elf32_i386_freebsd_vec i386coff_vec bfd_efi_app_ia32_vec bfd_efi_app_x86_64_vec bfd_elf32_i386_vec bfd_elf64_x86_64_vec"
+ want64=true
;;
x86_64-*-netbsd* | x86_64-*-openbsd*)
targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
+ targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec bfd_efi_app_x86_64_vec"
+ want64=true
;;
x86_64-*-linux-*)
targ_defvec=bfd_elf64_x86_64_vec
- targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
+ targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec bfd_efi_app_x86_64_vec"
+ want64=true
+ ;;
+ x86_64-*-mingw*)
+ targ_defvec=x86_64pe_vec
+ targ_selvecs="x86_64pe_vec x86_64pei_vec x86_64coff_vec bfd_elf64_x86_64_vec"
+ want64=true
+ targ_underscore=yes
;;
#endif
i[3-7]86-*-lynxos*)
@@ -644,7 +684,7 @@ case "${targ}" in
targ_selvecs="b_out_vec_big_host icoff_little_vec icoff_big_vec ieee_vec"
targ_underscore=yes
;;
- i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv* | i960-*-rtems*)
+ i960-*-vxworks5.* | i960-*-coff* | i960-*-sysv*)
targ_defvec=icoff_little_vec
targ_selvecs="icoff_big_vec b_out_vec_little_host b_out_vec_big_host ieee_vec"
targ_underscore=yes
@@ -675,17 +715,14 @@ case "${targ}" in
targ_defvec=bfd_elf32_m32rlelin_vec
targ_selvecs="bfd_elf32_m32rlin_vec bfd_elf32_m32rlelin_vec"
;;
-
m32r*-*-linux*)
targ_defvec=bfd_elf32_m32rlin_vec
targ_selvecs="bfd_elf32_m32rlin_vec bfd_elf32_m32rlelin_vec"
;;
-
m32r*le-*-*)
targ_defvec=bfd_elf32_m32rle_vec
targ_selvecs="bfd_elf32_m32r_vec bfd_elf32_m32rle_vec"
;;
-
m32r-*-*)
targ_defvec=bfd_elf32_m32r_vec
;;
@@ -699,13 +736,6 @@ case "${targ}" in
targ_selvecs="bfd_elf32_m68hc11_vec bfd_elf32_m68hc12_vec"
;;
- m68*-apollo-*)
- targ_defvec=apollocoff_vec
- ;;
- m68*-bull-sysv*)
- targ_defvec=m68kcoffun_vec
- targ_underscore=yes
- ;;
m68*-motorola-sysv*)
targ_defvec=m68ksysvcoff_vec
;;
@@ -721,10 +751,6 @@ case "${targ}" in
targ_selvecs="cisco_core_big_vec ieee_vec"
targ_underscore=yes
;;
- m68*-*-rtemscoff*)
- targ_defvec=m68kcoff_vec
- targ_selvecs="m68kcoff_vec versados_vec ieee_vec aout0_big_vec"
- ;;
m68*-*-elf* | m68*-*-sysv4* | m68*-*-uclinux*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs="m68kcoff_vec ieee_vec"
@@ -788,9 +814,6 @@ case "${targ}" in
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=m68kcoff_vec
;;
- m68*-apple-aux*)
- targ_defvec=m68kaux_coff_vec
- ;;
m68*-*-psos*)
targ_defvec=bfd_elf32_m68k_vec
targ_selvecs=ieee_vec
@@ -827,6 +850,11 @@ case "${targ}" in
targ_selvecs="mcore_pe_big_vec mcore_pe_little_vec mcore_pei_big_vec mcore_pei_little_vec"
;;
+ mep-*-elf)
+ targ_defvec=bfd_elf32_mep_vec
+ targ_selvecs=bfd_elf32_mep_little_vec
+ ;;
+
mips*-big-*)
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
@@ -855,6 +883,7 @@ case "${targ}" in
mips*-*-irix6*)
targ_defvec=bfd_elf32_nbigmips_vec
targ_selvecs="bfd_elf32_nlittlemips_vec bfd_elf32_bigmips_vec bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
+ want64=true
;;
#endif
mips*-*-irix5*)
@@ -881,12 +910,24 @@ case "${targ}" in
mips*el-*-vxworks*)
targ_defvec=bfd_elf32_littlemips_vxworks_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf32_bigmips_vxworks_vec bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
+ want64=true
;;
mips*-*-vxworks*)
targ_defvec=bfd_elf32_bigmips_vxworks_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf32_littlemips_vxworks_vec bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
+ want64=true
;;
#endif
+ mips*el-sde-elf*)
+ targ_defvec=bfd_elf32_tradlittlemips_vec
+ targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+ want64=true
+ ;;
+ mips*-sde-elf*)
+ targ_defvec=bfd_elf32_tradbigmips_vec
+ targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+ want64=true
+ ;;
mips*el-*-elf* | mips*el-*-vxworks* | mips*-*-chorus*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
@@ -903,6 +944,7 @@ case "${targ}" in
mips64*-*-openbsd*)
targ_defvec=bfd_elf64_tradbigmips_vec
targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+ want64=true
;;
#endif
mips*el-*-openbsd*)
@@ -917,10 +959,12 @@ case "${targ}" in
mips64*el-*-linux*)
targ_defvec=bfd_elf32_ntradlittlemips_vec
targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
+ want64=true
;;
mips64*-*-linux*)
targ_defvec=bfd_elf32_ntradbigmips_vec
targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+ want64=true
;;
#endif
mips*el-*-linux*)
@@ -937,6 +981,7 @@ case "${targ}" in
mmix-*-*)
targ_defvec=bfd_elf64_mmix_vec
targ_selvecs=bfd_mmo_vec
+ want64=true
;;
#endif
mn10200-*-*)
@@ -969,7 +1014,7 @@ case "${targ}" in
targ_defvec=bfd_elf32_openrisc_vec
;;
- or32-*-coff | or32-*-rtems* )
+ or32-*-coff)
targ_defvec=or32coff_big_vec
targ_underscore=yes
;;
@@ -1034,15 +1079,18 @@ case "${targ}" in
powerpc64-*-aix*)
targ_defvec=rs6000coff64_vec
targ_selvecs=rs6000coff_vec
+ want64=true
;;
powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux* | \
powerpc64-*-*bsd*)
targ_defvec=bfd_elf64_powerpc_vec
targ_selvecs="bfd_elf64_powerpcle_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec"
+ want64=true
;;
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"
+ want64=true
;;
#endif
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
@@ -1107,40 +1155,49 @@ case "${targ}" in
s390x-*-linux*)
targ_defvec=bfd_elf64_s390_vec
targ_selvecs=bfd_elf32_s390_vec
+ want64=true
;;
s390x-*-tpf*)
targ_defvec=bfd_elf64_s390_vec
+ want64=true
;;
#endif
+ score*-*-elf*)
+ targ_defvec=bfd_elf32_bigscore_vec
+ targ_selvecs=bfd_elf32_littlescore_vec
+ ;;
+
#ifdef BFD64
sh64l*-*-elf*)
targ_defvec=bfd_elf32_sh64l_vec
targ_selvecs="bfd_elf32_sh64_vec bfd_elf64_sh64l_vec bfd_elf64_sh64_vec bfd_elf32_shl_vec bfd_elf32_sh_vec"
targ_underscore=yes
+ want64=true
;;
sh64-*-elf*)
targ_defvec=bfd_elf32_sh64_vec
targ_selvecs="bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec bfd_elf32_sh_vec bfd_elf32_shl_vec"
targ_underscore=yes
+ want64=true
;;
sh64eb-*-linux*)
targ_defvec=bfd_elf32_sh64blin_vec
targ_selvecs="bfd_elf32_sh64lin_vec bfd_elf64_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf32_shblin_vec bfd_elf32_shlin_vec"
+ want64=true
;;
sh64-*-linux*)
targ_defvec=bfd_elf32_sh64lin_vec
targ_selvecs="bfd_elf32_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf64_sh64blin_vec bfd_elf32_shlin_vec bfd_elf32_shblin_vec"
+ want64=true
;;
-#endif /* BFD64 */
-
sh-*-linux*)
targ_defvec=bfd_elf32_shblin_vec
- targ_selvecs=bfd_elf32_shlin_vec
-#ifdef BFD64
- targ_selvecs="${targ_selvecs} bfd_elf32_sh64lin_vec bfd_elf32_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf64_sh64blin_vec"
-#endif
+ targ_selvecs="bfd_elf32_shlin_vec bfd_elf32_sh64lin_vec bfd_elf32_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf64_sh64blin_vec"
+ want64=true
;;
+#endif /* BFD64 */
+
sh*eb-*-linux*)
targ_defvec=bfd_elf32_shblin_vec
targ_selvecs=bfd_elf32_shlin_vec
@@ -1150,40 +1207,49 @@ case "${targ}" in
targ_selvecs=bfd_elf32_shblin_vec
;;
+ sh-*-uclinux* | sh[12]-*-uclinux*)
+ targ_defvec=bfd_elf32_sh_vec
+ targ_selvecs="bfd_elf32_shblin_vec bfd_elf32_shlin_vec"
+#ifdef BFD64
+ targ_selvecs="${targ_selvecs} bfd_elf32_sh64lin_vec bfd_elf32_sh64blin_vec bfd_elf64_sh64lin_vec bfd_elf64_sh64blin_vec"
+#endif
+ ;;
+
#ifdef BFD64
sh5le-*-netbsd*)
targ_defvec=bfd_elf32_sh64lnbsd_vec
targ_selvecs="bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec bfd_elf32_shnbsd_vec bfd_elf32_shlnbsd_vec"
+ want64=true
;;
sh5-*-netbsd*)
targ_defvec=bfd_elf32_sh64nbsd_vec
targ_selvecs="bfd_elf32_sh64lnbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec bfd_elf32_shnbsd_vec bfd_elf32_shlnbsd_vec"
+ want64=true
;;
sh64le-*-netbsd*)
targ_defvec=bfd_elf64_sh64lnbsd_vec
targ_selvecs="bfd_elf64_sh64nbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf32_shnbsd_vec bfd_elf32_shlnbsd_vec"
+ want64=true
;;
sh64-*-netbsd*)
targ_defvec=bfd_elf64_sh64nbsd_vec
targ_selvecs="bfd_elf64_sh64lnbsd_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf32_shnbsd_vec bfd_elf32_shlnbsd_vec"
+ want64=true
;;
-#endif
sh*l*-*-netbsdelf*)
targ_defvec=bfd_elf32_shlnbsd_vec
- targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec"
-#ifdef BFD64
- targ_selvecs="${targ_selvecs} bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
-#endif
+ targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
+ want64=true
;;
sh-*-netbsdelf*)
targ_defvec=bfd_elf32_shnbsd_vec
- targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
-#ifdef BFD64
- targ_selvecs="${targ_selvecs} bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
-#endif
+ targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec bfd_elf32_sh64lnbsd_vec bfd_elf32_sh64nbsd_vec bfd_elf64_sh64lnbsd_vec bfd_elf64_sh64nbsd_vec"
+ want64=true
;;
+#endif
+
sh*-*-netbsdelf*)
targ_defvec=bfd_elf32_shnbsd_vec
targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
@@ -1193,40 +1259,48 @@ case "${targ}" in
targ_selvecs="shlcoff_vec shlcoff_small_vec"
targ_underscore=yes
;;
+
+#ifdef BFD64
shl*-*-elf* | sh[1234]l*-*-elf* | sh3el*-*-elf* | shl*-*-kaos*)
targ_defvec=bfd_elf32_shl_vec
- targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec"
-#ifdef BFD64
- targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
-#endif
+ targ_selvecs="bfd_elf32_sh_vec shlcoff_vec shcoff_vec shlcoff_small_vec shcoff_small_vec bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
targ_underscore=yes
+ want64=true
;;
+#endif
+
sh-*-rtemscoff*)
targ_defvec=shcoff_vec
targ_selvecs="shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
targ_underscore=yes
;;
+
+#ifdef BFD64
sh-*-elf* | sh[1234]*-elf* | sh-*-rtems* | sh-*-kaos*)
targ_defvec=bfd_elf32_sh_vec
- targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
-#ifdef BFD64
- targ_selvecs="${targ_selvecs} bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
-#endif
+ targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec bfd_elf32_sh64_vec bfd_elf32_sh64l_vec bfd_elf64_sh64_vec bfd_elf64_sh64l_vec"
targ_underscore=yes
+ want64=true
;;
+#endif
+
sh-*-nto*)
targ_defvec=bfd_elf32_sh_vec
targ_selvecs="bfd_elf32_shl_vec shcoff_vec shlcoff_vec shcoff_small_vec shlcoff_small_vec"
targ_underscore=yes
;;
+ sh*-*-openbsd*)
+ targ_defvec=bfd_elf32_shlnbsd_vec
+ targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec"
+ ;;
sh-*-pe)
targ_defvec=shlpe_vec
targ_selvecs="shlpe_vec shlpei_vec"
targ_underscore=yes
;;
sh-*-vxworks)
- targ_defvec=bfd_elf32_sh_vec
- targ_selvecs="bfd_elf32_shl_vec"
+ targ_defvec=bfd_elf32_shvxworks_vec
+ targ_selvecs="bfd_elf32_shlvxworks_vec"
# FIXME None of the following are actually used on this target, but
# they're necessary for coff-sh.c (which is unconditionally used) to be
# compiled correctly.
@@ -1287,6 +1361,7 @@ case "${targ}" in
sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*)
targ_defvec=bfd_elf32_sparc_vec
targ_selvecs="bfd_elf64_sparc_vec sunos_big_vec"
+ want64=true
;;
#endif
sparc-*-sysv4*)
@@ -1304,14 +1379,17 @@ case "${targ}" in
sparc64-*-aout*)
targ_defvec=sunos_big_vec
targ_underscore=yes
+ want64=true
;;
sparc64-*-linux-*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec"
+ want64=true
;;
sparc64-*-elf*)
targ_defvec=bfd_elf64_sparc_vec
targ_selvecs=bfd_elf32_sparc_vec
+ want64=true
;;
#endif /* BFD64 */
sparc*-*-coff*)
@@ -1326,6 +1404,10 @@ case "${targ}" in
targ_underscore=yes
;;
+ spu-*-elf)
+ targ_defvec=bfd_elf32_spu_vec
+ ;;
+
#if HAVE_host_aout_vec
tahoe-*-*)
targ_defvec=host_aout_vec
diff --git a/contrib/binutils/bfd/config.in b/contrib/binutils/bfd/config.in
index 6c73825..aa91dd6 100644
--- a/contrib/binutils/bfd/config.in
+++ b/contrib/binutils/bfd/config.in
@@ -1,29 +1,9 @@
/* config.in. Generated from configure.in by autoheader. */
-/* 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 to 1 if using `alloca.c'. */
-#undef C_ALLOCA
-
-/* Define to 1 if NLS is requested */
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
#undef ENABLE_NLS
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
-
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define to 1 if you have the `dcgettext' function. */
-#undef HAVE_DCGETTEXT
-
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#undef HAVE_DECL_BASENAME
@@ -83,6 +63,9 @@
*/
#undef HAVE_DIRENT_H
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
/* Define to 1 if you have the `fcntl' function. */
#undef HAVE_FCNTL
@@ -107,33 +90,18 @@
/* Define to 1 if you have the `ftello64' function. */
#undef HAVE_FTELLO64
-/* Define to 1 if you have the `getcwd' function. */
-#undef HAVE_GETCWD
-
/* Define to 1 if you have the `getgid' function. */
#undef HAVE_GETGID
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
/* Define to 1 if you have the `getuid' function. */
#undef HAVE_GETUID
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
/* Define if <sys/procfs.h> has lwpstatus_t. */
#undef HAVE_LWPSTATUS_T
@@ -149,9 +117,6 @@
/* Define to 1 if you have the `madvise' function. */
#undef HAVE_MADVISE
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
@@ -161,15 +126,9 @@
/* Define to 1 if you have the `mprotect' function. */
#undef HAVE_MPROTECT
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
-
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
-/* Define to 1 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
/* Define if <sys/procfs.h> has prpsinfo32_t. */
#undef HAVE_PRPSINFO32_T
@@ -200,21 +159,12 @@
/* Define if <sys/procfs.h> has pstatus_t. */
#undef HAVE_PSTATUS_T
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
-
/* Define if <sys/procfs.h> has pxstatus_t. */
#undef HAVE_PXSTATUS_T
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
-
/* Define to 1 if you have the `setitimer' function. */
#undef HAVE_SETITIMER
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
@@ -224,15 +174,6 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -259,9 +200,6 @@
*/
#undef HAVE_SYS_NDIR_H
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
/* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
@@ -280,20 +218,12 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
-
/* Define if <sys/procfs.h> has win32_pstatus_t. */
#undef HAVE_WIN32_PSTATUS_T
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
@@ -313,6 +243,12 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* The size of a `char', as computed by sizeof. */
+#undef SIZEOF_CHAR
+
+/* The size of a `int', as computed by sizeof. */
+#undef SIZEOF_INT
+
/* The size of a `long', as computed by sizeof. */
#undef SIZEOF_LONG
@@ -322,13 +258,11 @@
/* The size of a `off_t', as computed by sizeof. */
#undef SIZEOF_OFF_T
-/* If using the C implementation of alloca, define if you know the
- direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown */
-#undef STACK_DIRECTION
+/* The size of a `short', as computed by sizeof. */
+#undef SIZEOF_SHORT
+
+/* The size of a `void *', as computed by sizeof. */
+#undef SIZEOF_VOID_P
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -358,18 +292,3 @@
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* 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/bfd/configure b/contrib/binutils/bfd/configure
index af6c22b..3cff895 100755
--- a/contrib/binutils/bfd/configure
+++ b/contrib/binutils/bfd/configure
@@ -241,6 +241,155 @@ IFS=" $as_nl"
$as_unset CDPATH
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
@@ -309,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l HDEFINES BFD_HOST_64BIT_LONG BFD_HOST_LONG_LONG BFD_HOST_64_BIT_DEFINED BFD_HOST_64_BIT BFD_HOST_U_64_BIT CC_FOR_BUILD EXEEXT_FOR_BUILD COREFILE COREFLAG WIN32LDFLAGS WIN32LIBADD TDEFINES wordsize bfd_libs all_backends bfd_backends bfd_machines bfd_default_target_size bfd_file_ptr bfd_ufile_ptr tdefaults datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S lt_ECHO CPP DEBUGDIR PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GENINSRC_NEVER_TRUE GENINSRC_NEVER_FALSE INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE HDEFINES BFD_HOST_64BIT_LONG BFD_HOST_LONG_LONG BFD_HOST_64_BIT_DEFINED BFD_HOST_64_BIT BFD_HOST_U_64_BIT CC_FOR_BUILD EXEEXT_FOR_BUILD COREFILE COREFLAG WIN32LDFLAGS WIN32LIBADD TDEFINES wordsize bfd64_libs all_backends bfd_backends bfd_machines bfd_default_target_size bfd_file_ptr bfd_ufile_ptr tdefaults datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -852,16 +1001,19 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared=PKGS build shared libraries default=no
- --enable-static=PKGS build static libraries default=yes
- --enable-fast-install=PKGS optimize for fast installation default=yes
+ --enable-shared[=PKGS]
+ build shared libraries [default=no]
+ --enable-static[=PKGS]
+ build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
--enable-targets alternative target configurations
--enable-commonbfdlib build shared BFD/opcodes/libiberty library
--enable-secureplt Default to creating read-only plt entries
- --enable-werror treat compile warnings as errors
- --enable-build-warnings Enable build-time compiler warnings
+ --enable-werror treat compile warnings as errors
+ --enable-build-warnings enable build-time compiler warnings
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--enable-install-libbfd controls installation of libbfd and related headers
@@ -870,10 +1022,16 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-gnu-ld assume the C compiler uses GNU ld default=no
- --with-pic try to use only PIC/non-PIC objects default=use both
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-mmap try using mmap for BFD input files if available
- --with-included-gettext use the GNU gettext library included here
+ --with-separate-debug-dir=DIR
+ Look for global separate debug info in DIR
+ [default=LIBDIR/debug]
+ --with-pkgversion=PKG Use PKG in the version string in place of "GNU
+ Binutils"
+ --with-bugurl=URL Direct users to URL to report a bug
Some influential environment variables:
CC C compiler command
@@ -2836,7 +2994,7 @@ fi
# Define the identity of the package.
PACKAGE=bfd
- VERSION=2.17
+ VERSION=2.17.50
cat >>confdefs.h <<_ACEOF
@@ -3240,1303 +3398,34 @@ fi
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=no
-fi;
-
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi;
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi;
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi;
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
- echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
-fi
-if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- 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 "$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
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-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
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
-if test "${lt_cv_path_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- 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
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- 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
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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 "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
-if test "${lt_cv_deplibs_check_method+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- # this will be overwritten by pass_all, but leave it in just in case
- 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
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | kfreebsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- 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
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | knetbsd*-gnu)
- 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='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'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-
-
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
- esac
-
-fi
-
-if test -n "$lt_cv_sys_max_cmd_len" ; then
- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
-
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- STRIP=$ac_ct_STRIP
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$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.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
-
-fi;
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi;
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 4035 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- lt_cv_cc_needs_belf=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-lt_cv_cc_needs_belf=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
*)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
-echo "$as_me: error: libtool configure failed" >&2;}
- { (exit 1); exit 1; }; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-
-# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
-if test "${enable_64_bit_bfd+set}" = set; then
- enableval="$enable_64_bit_bfd"
- case "${enableval}" in
- yes) want64=true ;;
- no) want64=false ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
-echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- want64=false
-fi; # Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
-echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
-if test "${enable_commonbfdlib+set}" = set; then
- enableval="$enable_commonbfdlib"
- case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for BFD commonbfdlib option" >&5
-echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-fi;
-# Check whether --with-mmap or --without-mmap was given.
-if test "${with_mmap+set}" = set; then
- withval="$with_mmap"
- case "${withval}" in
- yes) want_mmap=true ;;
- no) want_mmap=false ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${withval} for BFD with-mmap option" >&5
-echo "$as_me: error: bad value ${withval} for BFD with-mmap option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- want_mmap=false
-fi;
-# Check whether --enable-secureplt or --disable-secureplt was given.
-if test "${enable_secureplt+set}" = set; then
- enableval="$enable_secureplt"
- case "${enableval}" in
- yes) use_secureplt=true ;;
- no) use_secureplt=false ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for secureplt option" >&5
-echo "$as_me: error: bad value ${enableval} for secureplt option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- use_secureplt=false
-fi; if test $use_secureplt = true; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_SECUREPLT 1
-_ACEOF
-
-fi
-
-
-GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-
-# Check whether --enable-werror or --disable-werror was given.
-if test "${enable_werror+set}" = set; then
- enableval="$enable_werror"
- case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
-echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
-fi;
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-NO_WERROR=
-if test "${ERROR_ON_WARNING}" = yes ; then
- GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
- NO_WERROR="-Wno-error"
-fi
-
-if test "${GCC}" = yes ; then
- WARN_CFLAGS="${GCC_WARN_CFLAGS}"
-fi
-
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
- enableval="$enable_build_warnings"
- case "${enableval}" in
- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
- no) if test "${GCC}" = yes ; then
- WARN_CFLAGS="-w"
- fi;;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-fi;
-
-if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
- echo "Setting warning flags = $WARN_CFLAGS" 6>&1
-fi
-
-
-
-
-
- ac_config_headers="$ac_config_headers config.h:config.in"
-
-
-if test -z "$target" ; then
- { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
-echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
else
- USE_MAINTAINER_MODE=no
-fi;
- echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
-
-
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
-
- MAINT=$MAINTAINER_MODE_TRUE
-
-
- case ${build_alias} in
- "") build_noncanonical=${build} ;;
- *) build_noncanonical=${build_alias} ;;
-esac
-
- case ${host_alias} in
- "") host_noncanonical=${build_noncanonical} ;;
- *) host_noncanonical=${host_alias} ;;
-esac
-
- case ${target_alias} in
- "") target_noncanonical=${host_noncanonical} ;;
- *) target_noncanonical=${target_alias} ;;
-esac
-
-echo "$as_me:$LINENO: checking whether to install libbfd" >&5
-echo $ECHO_N "checking whether to install libbfd... $ECHO_C" >&6
- # Check whether --enable-install-libbfd or --disable-install-libbfd was given.
-if test "${enable_install_libbfd+set}" = set; then
- enableval="$enable_install_libbfd"
- install_libbfd_p=$enableval
-else
- if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
- install_libbfd_p=yes
- else
- install_libbfd_p=no
- fi
+ enable_shared=no
fi;
- echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
-echo "${ECHO_T}$install_libbfd_p" >&6
-if test $install_libbfd_p = yes; then
- INSTALL_LIBBFD_TRUE=
- INSTALL_LIBBFD_FALSE='#'
-else
- INSTALL_LIBBFD_TRUE='#'
- INSTALL_LIBBFD_FALSE=
-fi
- # Need _noncanonical variables for this.
- # libbfd.a is a host library containing target dependent code
- bfdlibdir='$(libdir)'
- bfdincludedir='$(includedir)'
- if test "${host}" != "${target}"; then
- bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
- bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
- fi
-
-
-
-
-host64=false
-target64=false
-bfd_default_target_size=32
-
-# host stuff:
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5273,7 +4162,1149 @@ _ACEOF
-ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi"
+
+
+macro_version='2.1a'
+macro_revision='1.2435'
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Set options
+
+enable_dlopen=no
+
+
+enable_win32_dll=no
+
+
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+ p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi;
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi;
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi;
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for fgrep" >&5
+echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
+if test "${ac_cv_prog_fgrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
+ then ac_cv_prog_fgrep='grep -F'
+ else ac_cv_prog_fgrep='fgrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
+echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
+ FGREP=$ac_cv_prog_fgrep
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ 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 variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+echo "${ECHO_T}$DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
+
+ DUMPBIN=$ac_ct_DUMPBIN
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
+if test "${lt_cv_nm_interface+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:4668: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4671: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4674: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+echo "${ECHO_T}$lt_cv_nm_interface" >&6
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
+ if test -n $lt_cv_sys_max_cmd_len; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+echo "$as_me:$LINENO: result: $xsi_shell" >&5
+echo "${ECHO_T}$xsi_shell" >&6
+
+
+echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+echo "${ECHO_T}$lt_shell_append" >&6
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ 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_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ 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
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ 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*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -5354,6 +5385,533 @@ else
RANLIB="$ac_cv_prog_RANLIB"
fi
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+ echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 5729 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ lt_cv_cc_needs_belf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5589,21 +6147,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
@@ -5770,132 +6313,34 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-fi
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
+$ac_includes_default
+#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5919,47 +6364,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
+ eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- ;;
-esac
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
+fi
+done
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+for ac_header in dlfcn.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -6020,156 +6447,1357 @@ fi
done
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
-ac_cv_type_off_t=no
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
fi
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6829: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6833: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ :
+fi
-ac_cv_type_size_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic='-qnocommon'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7151: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:7155: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works=yes
+ fi
+ else
+ lt_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM conftest*
+ LDFLAGS="$save_LDFLAGS"
fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
+if test x"$lt_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7256: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:7260: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7311: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:7315: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ 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 <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 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'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # 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 | $GREP '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
+ aix_use_runtimelinking=no
+
+ # 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 runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # 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.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$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
+ :
+ 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'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ 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
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <alloca.h>
+
int
main ()
{
-char *p = (char *) alloca (2 * sizeof (int));
+
;
return 0;
}
@@ -6196,62 +7824,49 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_working_alloca_h=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
-
-fi
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; 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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end 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;
}
@@ -6278,125 +7893,277 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_alloca_works=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
-if test $ac_cv_func_alloca_works = yes; then
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
-else
- # 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.
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
-ALLOCA=alloca.$ac_objext
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[012])
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ ;;
+ esac
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ if test "$GCC" = yes ; then
+ if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi-module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm libconftest.dylib
+ fi
+ rm conftest.$ac_ext
+ fi
+fi
-cat >>confdefs.h <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
+ output_verbose_link_cmd=echo
+ if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
+ archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd=echo
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
+ freebsd1*)
+ ld_shlibs=no
+ ;;
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
-fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+ hpux9*)
+ if test "$GCC" = yes; then
+ 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'
+ else
+ 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'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
-#undef $ac_func
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -6420,304 +8187,933 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
+ netbsd*)
+ 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
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
- break
-fi
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
- done
-fi
+ *nto* | *qnx*)
+ ;;
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-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;
-}
+ openbsd*)
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
-int
-main ()
-{
- exit (find_stack_direction () < 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
-fi
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ 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'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
-for ac_header in stdlib.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+withGCC=$GCC
+if test "$withGCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
else
- ac_cpp_err=
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ 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.
+ 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
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # 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.
+ 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}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ if test "$host_cpu" = m68k; then
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ else
+ dynamic_linker=no
+ fi
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $withGCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
-fi
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
-done
+freebsd1*)
+ dynamic_linker=no
+ ;;
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
-for ac_func in getpagesize
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
int
main ()
{
-return f != $ac_func;
+
;
return 0;
}
@@ -6744,200 +9140,236 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
+ shlibpath_overrides_runpath=yes
+fi
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
-fi
-done
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
-echo "$as_me:$LINENO: checking for working mmap" >&5
-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propagated back to all the places they're supposed to be.
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
-#include <fcntl.h>
-#include <sys/mman.h>
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
-#if !STDC_HEADERS && !HAVE_STDLIB_H
-char *malloc ();
-#endif
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
-/* This mess was copied from the GNU getpagesize.h. */
-#if !HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h. */
-# if !HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
+rdos*)
+ dynamic_linker=no
+ ;;
-#endif /* no HAVE_GETPAGESIZE */
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
-int
-main ()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
- pagesize = getpagesize ();
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
- /* First, make a file with some known garbage in it. */
- data = (char *) malloc (pagesize);
- if (!data)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- exit (1);
- if (write (fd, data, pagesize) != pagesize)
- exit (1);
- close (fd);
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
- /* Next, try to mmap the file at a fixed address which already has
- something else allocated at it. If we can, also make sure that
- we see the same garbage. */
- fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- exit (1);
- data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- exit (1);
- data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit (1);
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
- /* Finally, make sure that changes to the mapped area do not
- percolate back to the file as seen by read(). (This is a bug on
- some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- exit (1);
- if (read (fd, data3, pagesize) != pagesize)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit (1);
- close (fd);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
-( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-rm -f conftest.mmap
@@ -6949,155 +9381,13 @@ rm -f conftest.mmap
-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-fi
-done
@@ -7109,62 +9399,159 @@ done
-for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
-{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+char dlopen ();
int
main ()
{
-return f != $ac_func;
+dlopen ();
;
return 0;
}
@@ -7191,35 +9578,35 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
-fi
-done
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+fi
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
+ ;;
-for ac_func in stpcpy
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+ *)
+ echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7228,12 +9615,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+#define shl_load innocuous_shl_load
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
+ which can conflict with char shl_load (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -7243,7 +9630,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef $ac_func
+#undef shl_load
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -7252,14 +9639,14 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
+char shl_load ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
choke me
#else
-char (*f) () = $ac_func;
+char (*f) () = shl_load;
#endif
#ifdef __cplusplus
}
@@ -7268,7 +9655,7 @@ char (*f) () = $ac_func;
int
main ()
{
-return f != $ac_func;
+return f != shl_load;
;
return 0;
}
@@ -7295,52 +9682,46 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_func_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_shl_load=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STPCPY 1
-_ACEOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
+else
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <locale.h>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
int
main ()
{
-return LC_MESSAGES
+shl_load ();
;
return 0;
}
@@ -7367,85 +9748,81 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
+ ac_cv_lib_dld_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-am_cv_val_LC_MESSAGES=no
+ac_cv_lib_dld_shl_load=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
-
- fi
- fi
- echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
-else
- USE_NLS=yes
-fi;
- echo "$as_me:$LINENO: result: $USE_NLS" >&5
-echo "${ECHO_T}$USE_NLS" >&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
-echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-
-# Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
else
- nls_cv_force_use_gnu_gettext=no
-fi;
- echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
-echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=
-
- if test "${ac_cv_header_libintl_h+set}" = set; then
- echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking libintl.h usability" >&5
-echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <libintl.h>
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7459,123 +9836,52 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_func_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_func_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking libintl.h presence" >&5
-echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_libintl_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
-
-fi
-if test $ac_cv_header_libintl_h = yes; then
- echo "$as_me:$LINENO: checking for gettext in libc" >&5
-echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libc+set}" = set; then
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <libintl.h>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
int
main ()
{
-return (int) gettext ("")
+dlopen ();
;
return 0;
}
@@ -7602,27 +9908,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gt_cv_func_gettext_libc=yes
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gt_cv_func_gettext_libc=no
+ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl $LIBS"
+LIBS="-lsvld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7636,11 +9944,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char bindtextdomain ();
+char dlopen ();
int
main ()
{
-bindtextdomain ();
+dlopen ();
;
return 0;
}
@@ -7667,36 +9975,47 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_intl_bindtextdomain=yes
+ ac_cv_lib_svld_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_intl_bindtextdomain=no
+ac_cv_lib_svld_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
-if test $ac_cv_lib_intl_bindtextdomain = yes; then
- echo "$as_me:$LINENO: checking for gettext in libintl" >&5
-echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libintl+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
int
main ()
{
-return (int) gettext ("")
+dld_link ();
;
return 0;
}
@@ -7723,311 +10042,822 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gt_cv_func_gettext_libintl=yes
+ ac_cv_lib_dld_dld_link=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gt_cv_func_gettext_libintl=no
+ac_cv_lib_dld_dld_link=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
fi
- fi
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
+fi
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
-esac
fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+
+
fi
- if test "$MSGFMT" != "no"; then
-for ac_func in dcgettext
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10108 "configure"
+#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
-#ifdef __STDC__
-# include <limits.h>
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
#else
-# include <assert.h>
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
#endif
-#undef $ac_func
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
-/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
-extern "C"
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10208 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
#else
-char (*f) () = $ac_func;
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
#ifdef __cplusplus
-}
+extern "C" void exit (int);
#endif
-int
-main ()
+void fnord() { int i=42;}
+int main ()
{
-return f != $ac_func;
- ;
- return 0;
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
-eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+# Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
+if test "${enable_64_bit_bfd+set}" = set; then
+ enableval="$enable_64_bit_bfd"
+ case "${enableval}" in
+ yes) want64=true ;;
+ no) want64=false ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
+echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ want64=false
+fi; # Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+if test "${enable_commonbfdlib+set}" = set; then
+ enableval="$enable_commonbfdlib"
+ case "${enableval}" in
+ yes) commonbfdlib=true ;;
+ no) commonbfdlib=false ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for BFD commonbfdlib option" >&5
+echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+fi;
+# Check whether --with-mmap or --without-mmap was given.
+if test "${with_mmap+set}" = set; then
+ withval="$with_mmap"
+ case "${withval}" in
+ yes) want_mmap=true ;;
+ no) want_mmap=false ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${withval} for BFD with-mmap option" >&5
+echo "$as_me: error: bad value ${withval} for BFD with-mmap option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ want_mmap=false
+fi;
+# Check whether --enable-secureplt or --disable-secureplt was given.
+if test "${enable_secureplt+set}" = set; then
+ enableval="$enable_secureplt"
+ case "${enableval}" in
+ yes) use_secureplt=true ;;
+ no) use_secureplt=false ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for secureplt option" >&5
+echo "$as_me: error: bad value ${enableval} for secureplt option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ use_secureplt=false
+fi; if test $use_secureplt = true; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_SECUREPLT 1
_ACEOF
fi
-done
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+DEBUGDIR=${libdir}/debug
+
+
+# Check whether --with-separate-debug-dir or --without-separate-debug-dir was given.
+if test "${with_separate_debug_dir+set}" = set; then
+ withval="$with_separate_debug_dir"
+ DEBUGDIR="${withval}"
+fi;
+
+
+
+
+# Check whether --with-pkgversion or --without-pkgversion was given.
+if test "${with_pkgversion+set}" = set; then
+ withval="$with_pkgversion"
+ case "$withval" in
+ yes) { { echo "$as_me:$LINENO: error: package version not specified" >&5
+echo "$as_me: error: package version not specified" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ no) PKGVERSION= ;;
+ *) PKGVERSION="($withval) " ;;
+ esac
else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
+ PKGVERSION="(GNU Binutils) "
+
+fi;
+
+
+
+
+# Check whether --with-bugurl or --without-bugurl was given.
+if test "${with_bugurl+set}" = set; then
+ withval="$with_bugurl"
+ case "$withval" in
+ yes) { { echo "$as_me:$LINENO: error: bug URL not specified" >&5
+echo "$as_me: error: bug URL not specified" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ no) BUGURL=
+ ;;
+ *) BUGURL="$withval"
+ ;;
+ esac
+else
+ BUGURL="http://www.sourceware.org/bugzilla/"
+
+fi;
+ case ${BUGURL} in
+ "")
+ REPORT_BUGS_TO=
+ REPORT_BUGS_TEXI=
+ ;;
*)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
+ REPORT_BUGS_TO="<$BUGURL>"
+ REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
+ ;;
+ esac;
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
+
+
+
+
+GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Check whether --enable-werror or --disable-werror was given.
+if test "${enable_werror+set}" = set; then
+ enableval="$enable_werror"
+ case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+fi;
+
+# Enable -Werror by default when using gcc
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ ERROR_ON_WARNING=yes
+fi
+
+NO_WERROR=
+if test "${ERROR_ON_WARNING}" = yes ; then
+ GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+ NO_WERROR="-Wno-error"
+fi
+
+if test "${GCC}" = yes ; then
+ WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+fi
+
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
+fi;
+
+if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
+ echo "Setting warning flags = $WARN_CFLAGS" 6>&1
fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h:config.in"
+
+
+if test -z "$target" ; then
+ { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ USE_MAINTAINER_MODE=no
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
fi
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+
+if false; then
+ GENINSRC_NEVER_TRUE=
+ GENINSRC_NEVER_FALSE='#'
else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
+ GENINSRC_NEVER_TRUE='#'
+ GENINSRC_NEVER_FALSE=
fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
+
+ case ${build_alias} in
+ "") build_noncanonical=${build} ;;
+ *) build_noncanonical=${build_alias} ;;
+esac
+
+ case ${host_alias} in
+ "") host_noncanonical=${build_noncanonical} ;;
+ *) host_noncanonical=${host_alias} ;;
+esac
+
+ case ${target_alias} in
+ "") target_noncanonical=${host_noncanonical} ;;
+ *) target_noncanonical=${target_alias} ;;
+esac
+
+echo "$as_me:$LINENO: checking whether to install libbfd" >&5
+echo $ECHO_N "checking whether to install libbfd... $ECHO_C" >&6
+ # Check whether --enable-install-libbfd or --disable-install-libbfd was given.
+if test "${enable_install_libbfd+set}" = set; then
+ enableval="$enable_install_libbfd"
+ install_libbfd_p=$enableval
else
+ if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
+ install_libbfd_p=yes
+ else
+ install_libbfd_p=no
+ fi
+fi;
+ echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
+echo "${ECHO_T}$install_libbfd_p" >&6
+
+
+if test $install_libbfd_p = yes; then
+ INSTALL_LIBBFD_TRUE=
+ INSTALL_LIBBFD_FALSE='#'
+else
+ INSTALL_LIBBFD_TRUE='#'
+ INSTALL_LIBBFD_FALSE=
+fi
+
+ # Need _noncanonical variables for this.
+
+
+
+
+ # libbfd.a is a host library containing target dependent code
+ bfdlibdir='$(libdir)'
+ bfdincludedir='$(includedir)'
+ if test "${host}" != "${target}"; then
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
+ fi
+
+
+
+
+
+
+host64=false
+target64=false
+bfd_default_target_size=32
+
+# host stuff:
+
+ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi"
+# If we haven't got the data from the intl directory,
+# assume NLS is disabled.
+USE_NLS=no
+LIBINTL=
+LIBINTL_DEP=
+INCINTL=
+XGETTEXT=
+GMSGFMT=
+POSUB=
+
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
+fi
+echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+if test x"$USE_NLS" != xyes; then
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
-fi
+else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS=
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
+ esac
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
+ fi
+ done
+ LINGUAS="$XLINGUAS"
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
+
+
+ DATADIRNAME=share
+
+ INSTOBJEXT=.mo
+
+ GENCAT=gencat
+
CATOBJEXT=.gmo
- DATADIRNAME=share
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-CATOBJEXT=.mo
- DATADIRNAME=lib
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- INSTOBJEXT=.mo
- fi
- fi
-fi
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
+
+
- if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
- # Neither gettext nor catgets in included in the C library.
- # Fall back on GNU gettext library (assuming it is present).
- nls_cv_use_gnu_gettext=yes
- fi
- fi
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8035,27 +10865,31 @@ if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
+if test "$MSGFMT" != ":"; then
echo "$as_me:$LINENO: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
@@ -8063,7 +10897,7 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8103,7 +10937,37 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "xgettext", so it can be a program name with args.
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8111,27 +10975,31 @@ if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
+ ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
+if test "$XGETTEXT" != ":"; then
echo "$as_me:$LINENO: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
@@ -8139,282 +11007,103 @@ else
echo "${ECHO_T}no" >&6
fi
+ rm -f messages.po
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
-
-
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
- fi
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$as_me:$LINENO: result: $LINGUAS" >&5
-echo "${ECHO_T}$LINGUAS" >&6
- fi
-
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking linux/version.h usability" >&5
-echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <linux/version.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking linux/version.h presence" >&5
-echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <linux/version.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- ac_cpp_err=
+ PATH_SEPARATOR=:
fi
-else
- ac_cpp_err=yes
+ rm -f conf$$.sh
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+rm -f conf$$.file
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
;;
esac
-echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_linux_version_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-
fi
-if test $ac_cv_header_linux_version_h = yes; then
- msgformat=linux
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6
else
- msgformat=xopen
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
+ GMSGFMT=":"
+ fi
+ fi
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
+ XGETTEXT=":"
+ fi
+ rm -f messages.po
+ fi
+ ac_config_commands="$ac_config_commands default-1"
- l=
-
-
- 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
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
# Permit host specific settings.
@@ -9760,6 +12449,2853 @@ fi
done
+
+
+inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'`
+
+acx_cv_header_stdint=stddef.h
+acx_cv_header_stdint_kind="(already complete)"
+for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uintmax_t
+ unset ac_cv_type_int_least32_t
+ unset ac_cv_type_int_fast32_t
+ unset ac_cv_type_uint64_t
+ echo $ECHO_N "looking for a compliant stdint.h in $i, $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for uintmax_t" >&5
+echo $ECHO_N "checking for uintmax_t... $ECHO_C" >&6
+if test "${ac_cv_type_uintmax_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((uintmax_t *) 0)
+ return 0;
+if (sizeof (uintmax_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_uintmax_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uintmax_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uintmax_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintmax_t" >&6
+if test $ac_cv_type_uintmax_t = yes; then
+ acx_cv_header_stdint=$i
+else
+ continue
+fi
+
+ echo "$as_me:$LINENO: checking for uintptr_t" >&5
+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
+if test "${ac_cv_type_uintptr_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((uintptr_t *) 0)
+ return 0;
+if (sizeof (uintptr_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_uintptr_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uintptr_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
+if test $ac_cv_type_uintptr_t = yes; then
+ :
+else
+ acx_cv_header_stdint_kind="(mostly complete)"
+fi
+
+ echo "$as_me:$LINENO: checking for int_least32_t" >&5
+echo $ECHO_N "checking for int_least32_t... $ECHO_C" >&6
+if test "${ac_cv_type_int_least32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((int_least32_t *) 0)
+ return 0;
+if (sizeof (int_least32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_int_least32_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_int_least32_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_int_least32_t" >&5
+echo "${ECHO_T}$ac_cv_type_int_least32_t" >&6
+if test $ac_cv_type_int_least32_t = yes; then
+ :
+else
+ acx_cv_header_stdint_kind="(mostly complete)"
+fi
+
+ echo "$as_me:$LINENO: checking for int_fast32_t" >&5
+echo $ECHO_N "checking for int_fast32_t... $ECHO_C" >&6
+if test "${ac_cv_type_int_fast32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((int_fast32_t *) 0)
+ return 0;
+if (sizeof (int_fast32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_int_fast32_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_int_fast32_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_int_fast32_t" >&5
+echo "${ECHO_T}$ac_cv_type_int_fast32_t" >&6
+if test $ac_cv_type_int_fast32_t = yes; then
+ :
+else
+ acx_cv_header_stdint_kind="(mostly complete)"
+fi
+
+ echo "$as_me:$LINENO: checking for uint64_t" >&5
+echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
+if test "${ac_cv_type_uint64_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((uint64_t *) 0)
+ return 0;
+if (sizeof (uint64_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_uint64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uint64_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
+if test $ac_cv_type_uint64_t = yes; then
+ :
+else
+ acx_cv_header_stdint_kind="(lacks uint64_t)"
+fi
+
+ break
+done
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(lacks uintmax_t)"
+ for i in stdint.h $inttype_headers; do
+ unset ac_cv_type_uintptr_t
+ unset ac_cv_type_uint32_t
+ unset ac_cv_type_uint64_t
+ echo $ECHO_N "looking for an incomplete stdint.h in $i, $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for uint32_t" >&5
+echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6
+if test "${ac_cv_type_uint32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((uint32_t *) 0)
+ return 0;
+if (sizeof (uint32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_uint32_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uint32_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uint32_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint32_t" >&6
+if test $ac_cv_type_uint32_t = yes; then
+ acx_cv_header_stdint=$i
+else
+ continue
+fi
+
+ echo "$as_me:$LINENO: checking for uint64_t" >&5
+echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6
+if test "${ac_cv_type_uint64_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((uint64_t *) 0)
+ return 0;
+if (sizeof (uint64_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_uint64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uint64_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uint64_t" >&5
+echo "${ECHO_T}$ac_cv_type_uint64_t" >&6
+
+ echo "$as_me:$LINENO: checking for uintptr_t" >&5
+echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
+if test "${ac_cv_type_uintptr_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((uintptr_t *) 0)
+ return 0;
+if (sizeof (uintptr_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_uintptr_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_uintptr_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
+echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
+
+ break
+ done
+fi
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(u_intXX_t style)"
+ for i in sys/types.h $inttype_headers; do
+ unset ac_cv_type_u_int32_t
+ unset ac_cv_type_u_int64_t
+ echo $ECHO_N "looking for u_intXX_t types in $i, $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for u_int32_t" >&5
+echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6
+if test "${ac_cv_type_u_int32_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((u_int32_t *) 0)
+ return 0;
+if (sizeof (u_int32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_u_int32_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_u_int32_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6
+if test $ac_cv_type_u_int32_t = yes; then
+ acx_cv_header_stdint=$i
+else
+ continue
+fi
+
+ echo "$as_me:$LINENO: checking for u_int64_t" >&5
+echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6
+if test "${ac_cv_type_u_int64_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$i>
+
+int
+main ()
+{
+if ((u_int64_t *) 0)
+ return 0;
+if (sizeof (u_int64_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_u_int64_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_u_int64_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
+echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6
+
+ break
+ done
+fi
+if test "$acx_cv_header_stdint" = stddef.h; then
+ acx_cv_header_stdint_kind="(using manual detection)"
+fi
+
+test -z "$ac_cv_type_uintptr_t" && ac_cv_type_uintptr_t=no
+test -z "$ac_cv_type_uint64_t" && ac_cv_type_uint64_t=no
+test -z "$ac_cv_type_u_int64_t" && ac_cv_type_u_int64_t=no
+test -z "$ac_cv_type_int_least32_t" && ac_cv_type_int_least32_t=no
+test -z "$ac_cv_type_int_fast32_t" && ac_cv_type_int_fast32_t=no
+
+# ----------------- Summarize what we found so far
+
+echo "$as_me:$LINENO: checking what to include in bfd_stdint.h" >&5
+echo $ECHO_N "checking what to include in bfd_stdint.h... $ECHO_C" >&6
+
+case `$as_basename bfd_stdint.h ||
+$as_expr X/bfd_stdint.h : '.*/\([^/][^/]*\)/*$' \| \
+ Xbfd_stdint.h : 'X\(//\)$' \| \
+ Xbfd_stdint.h : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/bfd_stdint.h |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'` in
+ stdint.h) { echo "$as_me:$LINENO: WARNING: are you sure you want it there?" >&5
+echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
+ inttypes.h) { echo "$as_me:$LINENO: WARNING: are you sure you want it there?" >&5
+echo "$as_me: WARNING: are you sure you want it there?" >&2;} ;;
+ *) ;;
+esac
+
+echo "$as_me:$LINENO: result: $acx_cv_header_stdint $acx_cv_header_stdint_kind" >&5
+echo "${ECHO_T}$acx_cv_header_stdint $acx_cv_header_stdint_kind" >&6
+
+# ----------------- done included file, check C basic types --------
+
+# Lacking an uintptr_t? Test size of void *
+case "$acx_cv_header_stdint:$ac_cv_type_uintptr_t" in
+ stddef.h:* | *:no) echo "$as_me:$LINENO: checking for void *" >&5
+echo $ECHO_N "checking for void *... $ECHO_C" >&6
+if test "${ac_cv_type_void_p+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((void * *) 0)
+ return 0;
+if (sizeof (void *))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_void_p=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_void_p=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
+echo "${ECHO_T}$ac_cv_type_void_p" >&6
+
+echo "$as_me:$LINENO: checking size of void *" >&5
+echo $ECHO_N "checking size of void *... $ECHO_C" >&6
+if test "${ac_cv_sizeof_void_p+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_void_p" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_void_p=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (void *)); }
+unsigned long ulongval () { return (long) (sizeof (void *)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (void *))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (void *))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (void *))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_void_p=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (void *), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_void_p=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
+echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+ ;;
+esac
+
+# Lacking an uint64_t? Test size of long
+case "$acx_cv_header_stdint:$ac_cv_type_uint64_t:$ac_cv_type_u_int64_t" in
+ stddef.h:*:* | *:no:no) echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+ ;;
+esac
+
+if test $acx_cv_header_stdint = stddef.h; then
+ # Lacking a good header? Test size of everything and deduce all types.
+ echo "$as_me:$LINENO: checking for int" >&5
+echo $ECHO_N "checking for int... $ECHO_C" >&6
+if test "${ac_cv_type_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((int *) 0)
+ return 0;
+if (sizeof (int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_int=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
+echo "${ECHO_T}$ac_cv_type_int" >&6
+
+echo "$as_me:$LINENO: checking size of int" >&5
+echo $ECHO_N "checking size of int... $ECHO_C" >&6
+if test "${ac_cv_sizeof_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_int" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_int=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (int)); }
+unsigned long ulongval () { return (long) (sizeof (int)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (int))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (int))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (int))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_int=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_int=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+echo "${ECHO_T}$ac_cv_sizeof_int" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for short" >&5
+echo $ECHO_N "checking for short... $ECHO_C" >&6
+if test "${ac_cv_type_short+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((short *) 0)
+ return 0;
+if (sizeof (short))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_short=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_short=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
+echo "${ECHO_T}$ac_cv_type_short" >&6
+
+echo "$as_me:$LINENO: checking size of short" >&5
+echo $ECHO_N "checking size of short... $ECHO_C" >&6
+if test "${ac_cv_sizeof_short+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_short" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_short=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (short), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (short)); }
+unsigned long ulongval () { return (long) (sizeof (short)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (short))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (short))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (short))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_short=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (short), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_short=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+echo "${ECHO_T}$ac_cv_sizeof_short" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for char" >&5
+echo $ECHO_N "checking for char... $ECHO_C" >&6
+if test "${ac_cv_type_char+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((char *) 0)
+ return 0;
+if (sizeof (char))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_char=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_char=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
+echo "${ECHO_T}$ac_cv_type_char" >&6
+
+echo "$as_me:$LINENO: checking size of char" >&5
+echo $ECHO_N "checking size of char... $ECHO_C" >&6
+if test "${ac_cv_sizeof_char+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_char" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (char))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_char=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (char)); }
+unsigned long ulongval () { return (long) (sizeof (char)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (char))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (char))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (char))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_char=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (char), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (char), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_char=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
+echo "${ECHO_T}$ac_cv_sizeof_char" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
+
+
+
+ echo "$as_me:$LINENO: checking for type equivalent to int8_t" >&5
+echo $ECHO_N "checking for type equivalent to int8_t... $ECHO_C" >&6
+ case "$ac_cv_sizeof_char" in
+ 1) acx_cv_type_int8_t=char ;;
+ *) { { echo "$as_me:$LINENO: error: no 8-bit type" >&5
+echo "$as_me: error: no 8-bit type" >&2;}
+ { (exit please report a bug); exit please report a bug; }; }
+ esac
+ echo "$as_me:$LINENO: result: $acx_cv_type_int8_t" >&5
+echo "${ECHO_T}$acx_cv_type_int8_t" >&6
+
+ echo "$as_me:$LINENO: checking for type equivalent to int16_t" >&5
+echo $ECHO_N "checking for type equivalent to int16_t... $ECHO_C" >&6
+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_short" in
+ 2:*) acx_cv_type_int16_t=int ;;
+ *:2) acx_cv_type_int16_t=short ;;
+ *) { { echo "$as_me:$LINENO: error: no 16-bit type" >&5
+echo "$as_me: error: no 16-bit type" >&2;}
+ { (exit please report a bug); exit please report a bug; }; }
+ esac
+ echo "$as_me:$LINENO: result: $acx_cv_type_int16_t" >&5
+echo "${ECHO_T}$acx_cv_type_int16_t" >&6
+
+ echo "$as_me:$LINENO: checking for type equivalent to int32_t" >&5
+echo $ECHO_N "checking for type equivalent to int32_t... $ECHO_C" >&6
+ case "$ac_cv_sizeof_int:$ac_cv_sizeof_long" in
+ 4:*) acx_cv_type_int32_t=int ;;
+ *:4) acx_cv_type_int32_t=long ;;
+ *) { { echo "$as_me:$LINENO: error: no 32-bit type" >&5
+echo "$as_me: error: no 32-bit type" >&2;}
+ { (exit please report a bug); exit please report a bug; }; }
+ esac
+ echo "$as_me:$LINENO: result: $acx_cv_type_int32_t" >&5
+echo "${ECHO_T}$acx_cv_type_int32_t" >&6
+fi
+
+# These tests are here to make the output prettier
+
+if test "$ac_cv_type_uint64_t" != yes && test "$ac_cv_type_u_int64_t" != yes; then
+ case "$ac_cv_sizeof_long" in
+ 8) acx_cv_type_int64_t=long ;;
+ esac
+ echo "$as_me:$LINENO: checking for type equivalent to int64_t" >&5
+echo $ECHO_N "checking for type equivalent to int64_t... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: ${acx_cv_type_int64_t-'using preprocessor symbols'}" >&5
+echo "${ECHO_T}${acx_cv_type_int64_t-'using preprocessor symbols'}" >&6
+fi
+
+# Now we can use the above types
+
+if test "$ac_cv_type_uintptr_t" != yes; then
+ echo "$as_me:$LINENO: checking for type equivalent to intptr_t" >&5
+echo $ECHO_N "checking for type equivalent to intptr_t... $ECHO_C" >&6
+ case $ac_cv_sizeof_void_p in
+ 2) acx_cv_type_intptr_t=int16_t ;;
+ 4) acx_cv_type_intptr_t=int32_t ;;
+ 8) acx_cv_type_intptr_t=int64_t ;;
+ *) { { echo "$as_me:$LINENO: error: no equivalent for intptr_t" >&5
+echo "$as_me: error: no equivalent for intptr_t" >&2;}
+ { (exit please report a bug); exit please report a bug; }; }
+ esac
+ echo "$as_me:$LINENO: result: $acx_cv_type_intptr_t" >&5
+echo "${ECHO_T}$acx_cv_type_intptr_t" >&6
+fi
+
+# ----------------- done all checks, emit header -------------
+ ac_config_commands="$ac_config_commands bfd_stdint.h"
+
+
+
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
@@ -11467,7 +17003,9 @@ if test "${target}" = "${host}"; then
alpha*-*-*) COREFILE=osf-core.lo ;;
arm-*-freebsd* | arm-*-kfreebsd*-gnu)
COREFILE='' ;;
- arm-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ arm-*-netbsd* | arm-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
arm-*-riscix) COREFILE=trad-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
@@ -11674,7 +17212,9 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
s390*-*-*) COREFILE=trad-core.lo ;;
- sh*-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ sh*-*-netbsd* | sh*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
sparc-*-netbsd* | sparc*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -13038,7 +18578,7 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
+elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
for vec in $selvecs
do
@@ -13057,6 +18597,10 @@ do
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 " ;;
+ arm_wince_pe_big_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_wince_pe_little_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_wince_pei_big_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo cofflink.lo " ;;
+ arm_wince_pei_little_vec) tb="$tb pei-arm-wince.lo 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" ;;
@@ -13067,6 +18611,7 @@ do
b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
+ bfd_efi_app_x86_64_vec) tb="$tb efi-app-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;;
bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
@@ -13082,6 +18627,7 @@ do
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_bigmips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
@@ -13127,6 +18673,8 @@ do
bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
+ bfd_elf32_mep_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
+ bfd_elf32_mep_little_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
@@ -13143,24 +18691,29 @@ do
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
+ bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;;
+ bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
# which needs it but does not list it. Should be fixed in right place.
- bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shblin_vec) tb="$tb elf32-sh.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_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlvxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shvxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_sparc_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
@@ -13192,8 +18745,10 @@ do
bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
@@ -13216,6 +18771,7 @@ do
i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
+ x86_64coff_vec) tb="$tb coff-x86_64.lo cofflink.lo"; target_size=64 ;;
i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
@@ -13227,6 +18783,8 @@ do
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" ;;
+ x86_64pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
+ x86_64pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
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" ;;
@@ -13379,7 +18937,7 @@ fi # all_targets is true
case ${host64}-${target64}-${want64} in
*true*)
wordsize=64
- bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
+ bfd64_libs='$(BFD64_LIBS)'
all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
if test $BFD_HOST_64_BIT_DEFINED = 0; then
{ echo "$as_me:$LINENO: WARNING: You have requested a 64 bit BFD configuration, but" >&5
@@ -13420,7 +18978,6 @@ echo "$as_me: error: A newer version of gcc is needed for the requested 64-bit B
;;
false-false-false)
wordsize=32
- bfd_libs='$(BFD32_LIBS)'
all_backends='$(BFD32_BACKENDS)'
;;
esac
@@ -14524,6 +20081,7 @@ esac
rm -f doc/config.status
ac_config_files="$ac_config_files Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in"
+
ac_config_commands="$ac_config_commands default"
@@ -14643,6 +20201,13 @@ echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${INSTALL_LIBBFD_TRUE}" && test -z "${INSTALL_LIBBFD_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"INSTALL_LIBBFD\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -15086,6 +20651,272 @@ cat >>$CONFIG_STATUS <<_ACEOF
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
+GCC="$GCC"
+CC="$CC"
+acx_cv_header_stdint="$acx_cv_header_stdint"
+acx_cv_type_int8_t="$acx_cv_type_int8_t"
+acx_cv_type_int16_t="$acx_cv_type_int16_t"
+acx_cv_type_int32_t="$acx_cv_type_int32_t"
+acx_cv_type_int64_t="$acx_cv_type_int64_t"
+acx_cv_type_intptr_t="$acx_cv_type_intptr_t"
+ac_cv_type_uintmax_t="$ac_cv_type_uintmax_t"
+ac_cv_type_uintptr_t="$ac_cv_type_uintptr_t"
+ac_cv_type_uint64_t="$ac_cv_type_uint64_t"
+ac_cv_type_u_int64_t="$ac_cv_type_u_int64_t"
+ac_cv_type_u_int32_t="$ac_cv_type_u_int32_t"
+ac_cv_type_int_least32_t="$ac_cv_type_int_least32_t"
+ac_cv_type_int_fast32_t="$ac_cv_type_int_fast32_t"
+ac_cv_sizeof_void_p="$ac_cv_sizeof_void_p"
+
+
+
_ACEOF
@@ -15100,6 +20931,9 @@ do
"bfd-in3.h" ) CONFIG_FILES="$CONFIG_FILES bfd-in3.h:bfd-in2.h" ;;
"po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "bfd_stdint.h" ) CONFIG_COMMANDS="$CONFIG_COMMANDS bfd_stdint.h" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -15241,42 +21075,50 @@ s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LN_S@,$LN_S,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
+s,@SED@,$SED,;t t
+s,@EGREP@,$EGREP,;t t
+s,@FGREP@,$FGREP,;t t
+s,@GREP@,$GREP,;t t
+s,@LD@,$LD,;t t
+s,@DUMPBIN@,$DUMPBIN,;t t
+s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
+s,@NM@,$NM,;t t
+s,@LN_S@,$LN_S,;t t
+s,@lt_ECHO@,$lt_ECHO,;t t
+s,@CPP@,$CPP,;t t
+s,@DEBUGDIR@,$DEBUGDIR,;t t
+s,@PKGVERSION@,$PKGVERSION,;t t
+s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
+s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
+s,@GENINSRC_NEVER_TRUE@,$GENINSRC_NEVER_TRUE,;t t
+s,@GENINSRC_NEVER_FALSE@,$GENINSRC_NEVER_FALSE,;t t
s,@INSTALL_LIBBFD_TRUE@,$INSTALL_LIBBFD_TRUE,;t t
s,@INSTALL_LIBBFD_FALSE@,$INSTALL_LIBBFD_FALSE,;t t
s,@host_noncanonical@,$host_noncanonical,;t t
s,@target_noncanonical@,$target_noncanonical,;t t
s,@bfdlibdir@,$bfdlibdir,;t t
s,@bfdincludedir@,$bfdincludedir,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@ALLOCA@,$ALLOCA,;t t
s,@USE_NLS@,$USE_NLS,;t t
-s,@MSGFMT@,$MSGFMT,;t t
-s,@GMSGFMT@,$GMSGFMT,;t t
+s,@LIBINTL@,$LIBINTL,;t t
+s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
+s,@INCINTL@,$INCINTL,;t t
s,@XGETTEXT@,$XGETTEXT,;t t
-s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@POSUB@,$POSUB,;t t
s,@CATALOGS@,$CATALOGS,;t t
-s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@DATADIRNAME@,$DATADIRNAME,;t t
-s,@GMOFILES@,$GMOFILES,;t t
s,@INSTOBJEXT@,$INSTOBJEXT,;t t
-s,@INTLDEPS@,$INTLDEPS,;t t
-s,@INTLLIBS@,$INTLLIBS,;t t
-s,@INTLOBJS@,$INTLOBJS,;t t
-s,@POFILES@,$POFILES,;t t
-s,@POSUB@,$POSUB,;t t
-s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
-s,@GT_NO@,$GT_NO,;t t
-s,@GT_YES@,$GT_YES,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-s,@l@,$l,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@MSGMERGE@,$MSGMERGE,;t t
s,@HDEFINES@,$HDEFINES,;t t
s,@BFD_HOST_64BIT_LONG@,$BFD_HOST_64BIT_LONG,;t t
s,@BFD_HOST_LONG_LONG@,$BFD_HOST_LONG_LONG,;t t
@@ -15291,7 +21133,7 @@ s,@WIN32LDFLAGS@,$WIN32LDFLAGS,;t t
s,@WIN32LIBADD@,$WIN32LIBADD,;t t
s,@TDEFINES@,$TDEFINES,;t t
s,@wordsize@,$wordsize,;t t
-s,@bfd_libs@,$bfd_libs,;t t
+s,@bfd64_libs@,$bfd64_libs,;t t
s,@all_backends@,$all_backends,;t t
s,@bfd_backends@,$bfd_backends,;t t
s,@bfd_machines@,$bfd_machines,;t t
@@ -15986,7 +21828,1002 @@ echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
done
done
;;
- default ) sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile ;;
+ libtool )
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ default-1 )
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
+ bfd_stdint.h )
+if test "$GCC" = yes; then
+ echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
+else
+ echo "/* generated for $CC */" > tmp-stdint.h
+fi
+
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #ifndef GCC_GENERATED_STDINT_H
+ #define GCC_GENERATED_STDINT_H 1
+
+ #include <sys/types.h>
+EOF
+
+if test "$acx_cv_header_stdint" != stdint.h; then
+ echo "#include <stddef.h>" >> tmp-stdint.h
+fi
+if test "$acx_cv_header_stdint" != stddef.h; then
+ echo "#include <$acx_cv_header_stdint>" >> tmp-stdint.h
+fi
+
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+ /* glibc uses these symbols as guards to prevent redefinitions. */
+ #ifdef __int8_t_defined
+ #define _INT8_T
+ #define _INT16_T
+ #define _INT32_T
+ #endif
+ #ifdef __uint32_t_defined
+ #define _UINT32_T
+ #endif
+
+EOF
+
+# ----------------- done header, emit basic int types -------------
+if test "$acx_cv_header_stdint" = stddef.h; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
+ typedef unsigned $acx_cv_type_int8_t uint8_t;
+ #endif
+ #endif
+
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
+ typedef unsigned $acx_cv_type_int16_t uint16_t;
+ #endif
+ #endif
+
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
+ typedef unsigned $acx_cv_type_int32_t uint32_t;
+ #endif
+ #endif
+
+ #ifndef _INT8_T
+ #define _INT8_T
+ #ifndef __int8_t_defined
+ #define __int8_t_defined
+ typedef $acx_cv_type_int8_t int8_t;
+ #endif
+ #endif
+
+ #ifndef _INT16_T
+ #define _INT16_T
+ #ifndef __int16_t_defined
+ #define __int16_t_defined
+ typedef $acx_cv_type_int16_t int16_t;
+ #endif
+ #endif
+
+ #ifndef _INT32_T
+ #define _INT32_T
+ #ifndef __int32_t_defined
+ #define __int32_t_defined
+ typedef $acx_cv_type_int32_t int32_t;
+ #endif
+ #endif
+EOF
+elif test "$ac_cv_type_u_int32_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* int8_t int16_t int32_t defined by inet code, we do the u_intXX types */
+ #ifndef _INT8_T
+ #define _INT8_T
+ #endif
+ #ifndef _INT16_T
+ #define _INT16_T
+ #endif
+ #ifndef _INT32_T
+ #define _INT32_T
+ #endif
+
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #ifndef __uint8_t_defined
+ #define __uint8_t_defined
+ typedef u_int8_t uint8_t;
+ #endif
+ #endif
+
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #ifndef __uint16_t_defined
+ #define __uint16_t_defined
+ typedef u_int16_t uint16_t;
+ #endif
+ #endif
+
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #ifndef __uint32_t_defined
+ #define __uint32_t_defined
+ typedef u_int32_t uint32_t;
+ #endif
+ #endif
+EOF
+else
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Some systems have guard macros to prevent redefinitions, define them. */
+ #ifndef _INT8_T
+ #define _INT8_T
+ #endif
+ #ifndef _INT16_T
+ #define _INT16_T
+ #endif
+ #ifndef _INT32_T
+ #define _INT32_T
+ #endif
+ #ifndef _UINT8_T
+ #define _UINT8_T
+ #endif
+ #ifndef _UINT16_T
+ #define _UINT16_T
+ #endif
+ #ifndef _UINT32_T
+ #define _UINT32_T
+ #endif
+EOF
+fi
+
+# ------------- done basic int types, emit int64_t types ------------
+if test "$ac_cv_type_uint64_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* system headers have good uint64_t and int64_t */
+ #ifndef _INT64_T
+ #define _INT64_T
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #endif
+EOF
+elif test "$ac_cv_type_u_int64_t" = yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* system headers have an u_int64_t (and int64_t) */
+ #ifndef _INT64_T
+ #define _INT64_T
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
+ typedef u_int64_t uint64_t;
+ #endif
+ #endif
+EOF
+elif test -n "$acx_cv_type_int64_t"; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* architecture has a 64-bit type, $acx_cv_type_int64_t */
+ #ifndef _INT64_T
+ #define _INT64_T
+ typedef $acx_cv_type_int64_t int64_t;
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ #ifndef __uint64_t_defined
+ #define __uint64_t_defined
+ typedef unsigned $acx_cv_type_int64_t uint64_t;
+ #endif
+ #endif
+EOF
+else
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* some common heuristics for int64_t, using compiler-specific tests */
+ #if defined __STDC_VERSION__ && (__STDC_VERSION__-0) >= 199901L
+ #ifndef _INT64_T
+ #define _INT64_T
+ #ifndef __int64_t_defined
+ typedef long long int64_t;
+ #endif
+ #endif
+ #ifndef _UINT64_T
+ #define _UINT64_T
+ typedef unsigned long long uint64_t;
+ #endif
+
+ #elif defined __GNUC__ && defined (__STDC__) && __STDC__-0
+ /* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */
+ # if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+ # define __extension__
+ # endif
+
+ # ifndef _INT64_T
+ # define _INT64_T
+ __extension__ typedef long long int64_t;
+ # endif
+ # ifndef _UINT64_T
+ # define _UINT64_T
+ __extension__ typedef unsigned long long uint64_t;
+ # endif
+
+ #elif !defined __STRICT_ANSI__
+ # if defined _MSC_VER || defined __WATCOMC__ || defined __BORLANDC__
+
+ # ifndef _INT64_T
+ # define _INT64_T
+ typedef __int64 int64_t;
+ # endif
+ # ifndef _UINT64_T
+ # define _UINT64_T
+ typedef unsigned __int64 uint64_t;
+ # endif
+ # endif /* compiler */
+
+ #endif /* ANSI version */
+EOF
+fi
+
+# ------------- done int64_t types, emit intptr types ------------
+if test "$ac_cv_type_uintptr_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define intptr_t based on sizeof(void*) = $ac_cv_sizeof_void_p */
+ #ifndef __uintptr_t_defined
+ typedef u$acx_cv_type_intptr_t uintptr_t;
+ #endif
+ #ifndef __intptr_t_defined
+ typedef $acx_cv_type_intptr_t intptr_t;
+ #endif
+EOF
+fi
+
+# ------------- done intptr types, emit int_least types ------------
+if test "$ac_cv_type_int_least32_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define int_least types */
+ typedef int8_t int_least8_t;
+ typedef int16_t int_least16_t;
+ typedef int32_t int_least32_t;
+ #ifdef _INT64_T
+ typedef int64_t int_least64_t;
+ #endif
+
+ typedef uint8_t uint_least8_t;
+ typedef uint16_t uint_least16_t;
+ typedef uint32_t uint_least32_t;
+ #ifdef _UINT64_T
+ typedef uint64_t uint_least64_t;
+ #endif
+EOF
+fi
+
+# ------------- done intptr types, emit int_fast types ------------
+if test "$ac_cv_type_int_fast32_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define int_fast types. short is often slow */
+ typedef int8_t int_fast8_t;
+ typedef int int_fast16_t;
+ typedef int32_t int_fast32_t;
+ #ifdef _INT64_T
+ typedef int64_t int_fast64_t;
+ #endif
+
+ typedef uint8_t uint_fast8_t;
+ typedef unsigned int uint_fast16_t;
+ typedef uint32_t uint_fast32_t;
+ #ifdef _UINT64_T
+ typedef uint64_t uint_fast64_t;
+ #endif
+EOF
+fi
+
+if test "$ac_cv_type_uintmax_t" != yes; then
+ sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ /* Define intmax based on what we found */
+ #ifdef _INT64_T
+ typedef int64_t intmax_t;
+ #else
+ typedef long intmax_t;
+ #endif
+ #ifdef _UINT64_T
+ typedef uint64_t uintmax_t;
+ #else
+ typedef unsigned long uintmax_t;
+ #endif
+EOF
+fi
+
+sed 's/^ *//' >> tmp-stdint.h <<EOF
+
+ #endif /* GCC_GENERATED_STDINT_H */
+EOF
+
+if test -r bfd_stdint.h && cmp -s tmp-stdint.h bfd_stdint.h; then
+ rm -f tmp-stdint.h
+else
+ mv -f tmp-stdint.h bfd_stdint.h
+fi
+
+ ;;
+ default )
+case "$srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+esac
+POFILES=
+GMOFILES=
+for lang in dummy $OBSOLETE_ALL_LINGUAS; do
+ if test $lang != dummy; then
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ fi
+done
+sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
+ -e '/BLD-POTFILES =/r po/BLD-POTFILES' \
+ -e "s,@POFILES@,$POFILES," \
+ -e "s,@GMOFILES@,$GMOFILES," \
+ po/Makefile.in > po/Makefile ;;
esac
done
_ACEOF
diff --git a/contrib/binutils/bfd/configure.in b/contrib/binutils/bfd/configure.in
index 212f961..1ea98ae 100644
--- a/contrib/binutils/bfd/configure.in
+++ b/contrib/binutils/bfd/configure.in
@@ -8,7 +8,7 @@ AC_CONFIG_SRCDIR([libbfd.c])
AC_CANONICAL_TARGET
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.17)
+AM_INIT_AUTOMAKE(bfd, 2.17.50)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
@@ -19,7 +19,10 @@ dnl Default to a non shared library. This may be overridden by the
dnl configure option --enable-shared.
AM_DISABLE_SHARED
-AM_PROG_LIBTOOL
+AC_PROG_CC
+AC_GNU_SOURCE
+
+AC_PROG_LIBTOOL
AC_ARG_ENABLE(64-bit-bfd,
[ --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)],
@@ -63,6 +66,17 @@ if test $use_secureplt = true; then
[Define if we should default to creating read-only plt entries])
fi
+DEBUGDIR=${libdir}/debug
+
+AC_ARG_WITH(separate-debug-dir,
+ AS_HELP_STRING([--with-separate-debug-dir=DIR],
+ [Look for global separate debug info in DIR [[default=LIBDIR/debug]]]),
+[DEBUGDIR="${withval}"])
+AC_SUBST(DEBUGDIR)
+
+ACX_PKGVERSION([GNU Binutils])
+ACX_BUGURL([http://www.sourceware.org/bugzilla/])
+
AM_BINUTILS_WARNINGS
AM_CONFIG_HEADER(config.h:config.in)
@@ -72,6 +86,7 @@ if test -z "$target" ; then
fi
AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
AM_INSTALL_LIBBFD
AC_EXEEXT
@@ -81,11 +96,9 @@ bfd_default_target_size=32
# host stuff:
-AC_PROG_CC
-AC_GNU_SOURCE
-
ALL_LINGUAS="fr tr ja es sv da zh_CN ro rw vi"
-CY_GNU_GETTEXT
+ZW_GNU_GETTEXT_SISTER_DIR
+AM_PO_SUBDIRS
# Permit host specific settings.
. ${srcdir}/configure.host
@@ -135,6 +148,7 @@ BFD_CC_FOR_BUILD
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h)
+GCC_HEADER_STDINT(bfd_stdint.h)
AC_HEADER_TIME
AC_HEADER_DIRENT
ACX_HEADER_STRING
@@ -178,7 +192,9 @@ if test "${target}" = "${host}"; then
alpha*-*-*) COREFILE=osf-core.lo ;;
arm-*-freebsd* | arm-*-kfreebsd*-gnu)
COREFILE='' ;;
- arm-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ arm-*-netbsd* | arm-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
arm-*-riscix) COREFILE=trad-core.lo ;;
hppa*-*-hpux*) COREFILE=hpux-core.lo ;;
hppa*-*-hiux*) COREFILE=hpux-core.lo ;;
@@ -361,7 +377,9 @@ changequote([,])dnl
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
s390*-*-*) COREFILE=trad-core.lo ;;
- sh*-*-netbsd*) COREFILE=netbsd-core.lo ;;
+ sh*-*-netbsd* | sh*-*-openbsd*)
+ COREFILE=netbsd-core.lo
+ ;;
sparc-*-netbsd* | sparc*-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -551,7 +569,7 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
+elf="elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
for vec in $selvecs
do
@@ -570,6 +588,10 @@ do
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 " ;;
+ arm_wince_pe_big_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_wince_pe_little_vec) tb="$tb pe-arm-wince.lo pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_wince_pei_big_vec) tb="$tb pei-arm-wince.lo pei-arm.lo peigen.lo cofflink.lo " ;;
+ arm_wince_pei_little_vec) tb="$tb pei-arm-wince.lo 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" ;;
@@ -580,6 +602,7 @@ do
b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
+ bfd_efi_app_x86_64_vec) tb="$tb efi-app-x86_64.lo pex64igen.lo cofflink.lo" ;target_size=64;;
bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
bfd_elf32_am33lin_vec) tb="$tb elf32-am33lin.lo elf32.lo $elf" ;;
bfd_elf32_avr_vec) tb="$tb elf32-avr.lo elf32.lo $elf" ;;
@@ -595,6 +618,7 @@ do
bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_bigmips_vxworks_vec)
tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;;
bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;;
bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_crx_vec) tb="$tb elf32-crx.lo elf32.lo $elf" ;;
@@ -640,6 +664,8 @@ do
bfd_elf32_m88k_vec) tb="$tb elf32-m88k.lo elf32.lo $elf" ;;
bfd_elf32_mcore_big_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
bfd_elf32_mcore_little_vec) tb="$tb elf32-mcore.lo elf32.lo $elf" ;;
+ bfd_elf32_mep_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
+ bfd_elf32_mep_little_vec) tb="$tb elf32-mep.lo elf32.lo $elf" ;;
bfd_elf32_mn10200_vec) tb="$tb elf-m10200.lo elf32.lo $elf" ;;
bfd_elf32_mn10300_vec) tb="$tb elf-m10300.lo elf32.lo $elf" ;;
bfd_elf32_mt_vec) tb="$tb elf32-mt.lo elf32.lo $elf" ;;
@@ -656,24 +682,29 @@ do
bfd_elf32_powerpcle_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_powerpc_vxworks_vec) tb="$tb elf32-ppc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
+ bfd_elf32_bigscore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;;
+ bfd_elf32_littlescore_vec) tb="$tb elf32-score.lo elf32.lo $elf" ;;
# FIXME: We include cofflink.lo not because it's needed for
# bfd_elf32_sh64[l]_vec, but because we include bfd_elf32_sh[l]_vec
# which needs it but does not list it. Should be fixed in right place.
- bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
- bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf32.lo $elf cofflink.lo" ;;
- bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shblin_vec) tb="$tb elf32-sh.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_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf32.lo $elf coff-sh.lo" ;;
- bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_sh64_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64l_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64lin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64blin_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" target_size=64 ;;
+ bfd_elf32_sh64lnbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh64nbsd_vec) tb="$tb elf32-sh64.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf cofflink.lo" ;;
+ bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shl_symbian_vec) tb="$tb elf32-sh-symbian.lo elf32-sh64-com.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shlin_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlvxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shvxworks_vec) tb="$tb elf32-sh.lo elf-vxworks.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
bfd_elf32_sparc_vxworks_vec) tb="$tb elf32-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf32.lo $elf" ;;
+ bfd_elf32_spu_vec) tb="$tb elf32-spu.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
@@ -705,8 +736,10 @@ do
bfd_elf64_sh64lnbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sh64nbsd_vec) tb="$tb elf64-sh64.lo elf64.lo $elf" target_size=64 ;;
bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_sparc_freebsd_vec) tb="$tb elf64-sparc.lo elfxx-sparc.lo elf-vxworks.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_x86_64_freebsd_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
@@ -729,6 +762,7 @@ do
i386aout_vec) tb="$tb i386aout.lo aout32.lo" ;;
i386bsd_vec) tb="$tb i386bsd.lo aout32.lo" ;;
i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
+ x86_64coff_vec) tb="$tb coff-x86_64.lo cofflink.lo"; target_size=64 ;;
i386dynix_vec) tb="$tb i386dynix.lo aout32.lo" ;;
i386freebsd_vec) tb="$tb i386freebsd.lo aout32.lo" ;;
i386linux_vec) tb="$tb i386linux.lo aout32.lo" ;;
@@ -740,6 +774,8 @@ do
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" ;;
+ x86_64pe_vec) tb="$tb pe-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
+ x86_64pei_vec) tb="$tb pei-x86_64.lo pex64igen.lo cofflink.lo"; target_size=64 ;;
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" ;;
@@ -890,7 +926,7 @@ fi # all_targets is true
case ${host64}-${target64}-${want64} in
*true*)
wordsize=64
- bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
+ bfd64_libs='$(BFD64_LIBS)'
all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
if test $BFD_HOST_64_BIT_DEFINED = 0; then
AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
@@ -911,13 +947,12 @@ case ${host64}-${target64}-${want64} in
;;
false-false-false)
wordsize=32
- bfd_libs='$(BFD32_LIBS)'
all_backends='$(BFD32_BACKENDS)'
;;
esac
AC_SUBST(wordsize)
-AC_SUBST(bfd_libs)
+AC_SUBST(bfd64_libs)
AC_SUBST(all_backends)
AC_SUBST(bfd_backends)
AC_SUBST(bfd_machines)
@@ -962,7 +997,28 @@ esac
rm -f doc/config.status
AC_CONFIG_FILES([Makefile doc/Makefile bfd-in3.h:bfd-in2.h po/Makefile.in:po/Make-in])
-AC_CONFIG_COMMANDS([default],[[sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' -e '/BLD-POTFILES =/r po/BLD-POTFILES' po/Makefile.in > po/Makefile]],[[]])
+
+dnl We need this duplication, even though we use AM_PO_SUBDIRS, because of
+dnl our two separate POTFILES. Yuck.
+AC_CONFIG_COMMANDS([default],
+[[
+case "$srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+esac
+POFILES=
+GMOFILES=
+for lang in dummy $OBSOLETE_ALL_LINGUAS; do
+ if test $lang != dummy; then
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ fi
+done
+sed -e '/SRC-POTFILES =/r po/SRC-POTFILES' \
+ -e '/BLD-POTFILES =/r po/BLD-POTFILES' \
+ -e "s,@POFILES@,$POFILES," \
+ -e "s,@GMOFILES@,$GMOFILES," \
+ po/Makefile.in > po/Makefile]],[[]])
dnl Required by html and install-html
AC_SUBST(datarootdir)
diff --git a/contrib/binutils/bfd/corefile.c b/contrib/binutils/bfd/corefile.c
index 602de91..58cd7f6 100644
--- a/contrib/binutils/bfd/corefile.c
+++ b/contrib/binutils/bfd/corefile.c
@@ -1,6 +1,6 @@
/* Core file generic interface routines for BFD.
- Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2003, 2005
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001, 2002, 2003, 2005,
+ 2007 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -30,8 +30,8 @@ DESCRIPTION
These are functions pertaining to core files.
*/
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
/*
diff --git a/contrib/binutils/bfd/cpu-alpha.c b/contrib/binutils/bfd/cpu-alpha.c
index 48b748d..db7abfb 100644
--- a/contrib/binutils/bfd/cpu-alpha.c
+++ b/contrib/binutils/bfd/cpu-alpha.c
@@ -1,5 +1,5 @@
/* BFD support for the Alpha architecture.
- Copyright 1992, 1993, 1998, 2000, 2002, 2003
+ Copyright 1992, 1993, 1998, 2000, 2002, 2003, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#define N(BITS_WORD, BITS_ADDR, NUMBER, PRINT, DEFAULT, NEXT) \
diff --git a/contrib/binutils/bfd/cpu-arc.c b/contrib/binutils/bfd/cpu-arc.c
index ef97da0..bf9a739 100644
--- a/contrib/binutils/bfd/cpu-arc.c
+++ b/contrib/binutils/bfd/cpu-arc.c
@@ -1,5 +1,6 @@
/* BFD support for the ARC processor
- Copyright 1994, 1995, 1997, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 2001, 2002, 2007
+ Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#define ARC(mach, print_name, default_p, next) \
diff --git a/contrib/binutils/bfd/cpu-arm.c b/contrib/binutils/bfd/cpu-arm.c
index a28a1f9..a44b983 100644
--- a/contrib/binutils/bfd/cpu-arm.c
+++ b/contrib/binutils/bfd/cpu-arm.c
@@ -1,5 +1,5 @@
/* BFD support for the ARM processor
- Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005
+ Copyright 1994, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
@@ -19,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libiberty.h"
@@ -92,7 +92,8 @@ processors[] =
{ bfd_mach_arm_4, "strongarm1100" },
{ bfd_mach_arm_XScale, "xscale" },
{ bfd_mach_arm_ep9312, "ep9312" },
- { bfd_mach_arm_iWMMXt, "iwmmxt" }
+ { bfd_mach_arm_iWMMXt, "iwmmxt" },
+ { bfd_mach_arm_iWMMXt2, "iwmmxt2" }
};
static bfd_boolean
@@ -137,7 +138,8 @@ static const bfd_arch_info_type arch_info_struct[] =
N (bfd_mach_arm_5TE, "armv5te", FALSE, & arch_info_struct[9]),
N (bfd_mach_arm_XScale, "xscale", FALSE, & arch_info_struct[10]),
N (bfd_mach_arm_ep9312, "ep9312", FALSE, & arch_info_struct[11]),
- N (bfd_mach_arm_iWMMXt,"iwmmxt", FALSE, NULL)
+ N (bfd_mach_arm_iWMMXt, "iwmmxt", FALSE, & arch_info_struct[12]),
+ N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, NULL)
};
const bfd_arch_info_type bfd_arm_arch =
@@ -179,7 +181,9 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd)
Intel XScale binary, since these architecture have co-processors which
will not both be present on the same physical hardware. */
else if (in == bfd_mach_arm_ep9312
- && (out == bfd_mach_arm_XScale || out == bfd_mach_arm_iWMMXt))
+ && (out == bfd_mach_arm_XScale
+ || out == bfd_mach_arm_iWMMXt
+ || out == bfd_mach_arm_iWMMXt2))
{
_bfd_error_handler (_("\
ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
@@ -188,7 +192,9 @@ ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
return FALSE;
}
else if (out == bfd_mach_arm_ep9312
- && (in == bfd_mach_arm_XScale || in == bfd_mach_arm_iWMMXt))
+ && (in == bfd_mach_arm_XScale
+ || in == bfd_mach_arm_iWMMXt
+ || in == bfd_mach_arm_iWMMXt2))
{
_bfd_error_handler (_("\
ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"),
@@ -309,6 +315,7 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section)
case bfd_mach_arm_XScale: expected = "XScale"; break;
case bfd_mach_arm_ep9312: expected = "ep9312"; break;
case bfd_mach_arm_iWMMXt: expected = "iWMMXt"; break;
+ case bfd_mach_arm_iWMMXt2: expected = "iWMMXt2"; break;
}
if (strcmp (arch_string, expected) != 0)
@@ -355,7 +362,8 @@ architectures[] =
{ "armv5te", bfd_mach_arm_5TE },
{ "XScale", bfd_mach_arm_XScale },
{ "ep9312", bfd_mach_arm_ep9312 },
- { "iWMMXt", bfd_mach_arm_iWMMXt }
+ { "iWMMXt", bfd_mach_arm_iWMMXt },
+ { "iWMMXt2", bfd_mach_arm_iWMMXt2 }
};
/* Extract the machine number stored in a note section. */
@@ -402,14 +410,22 @@ bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section)
}
bfd_boolean
-bfd_is_arm_mapping_symbol_name (const char * name)
+bfd_is_arm_special_symbol_name (const char * name, int type)
{
/* The ARM compiler outputs several obsolete forms. Recognize them
- in addition to the standard $a, $t and $d. */
- return (name != NULL)
- && (name[0] == '$')
- && ((name[1] == 'a') || (name[1] == 't') || (name[1] == 'd')
- || (name[1] == 'm') || (name[1] == 'f') || (name[1] == 'p'))
- && (name[2] == 0 || name[2] == '.');
+ in addition to the standard $a, $t and $d. We are somewhat loose
+ in what we accept here, since the full set is not documented. */
+ if (!name || name[0] != '$')
+ return FALSE;
+ if (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
+ type &= BFD_ARM_SPECIAL_SYM_TYPE_MAP;
+ else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p')
+ type &= BFD_ARM_SPECIAL_SYM_TYPE_TAG;
+ else if (name[1] >= 'a' && name[1] <= 'z')
+ type &= BFD_ARM_SPECIAL_SYM_TYPE_OTHER;
+ else
+ return FALSE;
+
+ return (type != 0 && (name[2] == 0 || name[2] == '.'));
}
diff --git a/contrib/binutils/bfd/cpu-cr16.c b/contrib/binutils/bfd/cpu-cr16.c
new file mode 100644
index 0000000..5695f0e
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-cr16.c
@@ -0,0 +1,40 @@
+/* BFD support for the CR16 processor.
+ Copyright 2007 Free Software Foundation, Inc.
+ Written by M R Swami Reddy
+
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+
+const bfd_arch_info_type bfd_cr16_arch =
+ {
+ 16, /* 16 bits in a word. */
+ 32, /* 32 bits in an address. */
+ 8, /* 8 bits in a byte. */
+ bfd_arch_cr16, /* enum bfd_architecture arch. */
+ bfd_mach_cr16,
+ "cr16", /* Arch name. */
+ "cr16", /* Printable name. */
+ 1, /* Unsigned int section alignment power. */
+ TRUE, /* The one and only. */
+ bfd_default_compatible,
+ bfd_default_scan ,
+ 0,
+ };
diff --git a/contrib/binutils/bfd/cpu-i386.c b/contrib/binutils/bfd/cpu-i386.c
index 8886c47..339c7d9 100644
--- a/contrib/binutils/bfd/cpu-i386.c
+++ b/contrib/binutils/bfd/cpu-i386.c
@@ -1,5 +1,5 @@
/* BFD support for the Intel 386 architecture.
- Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004
+ Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
diff --git a/contrib/binutils/bfd/cpu-ia64.c b/contrib/binutils/bfd/cpu-ia64.c
index e172f5a..a38d24d 100644
--- a/contrib/binutils/bfd/cpu-ia64.c
+++ b/contrib/binutils/bfd/cpu-ia64.c
@@ -1,5 +1,5 @@
/* BFD support for the ia64 architecture.
- Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002, 2007 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
const bfd_arch_info_type bfd_ia64_elf32_arch =
diff --git a/contrib/binutils/bfd/cpu-mep.c b/contrib/binutils/bfd/cpu-mep.c
new file mode 100644
index 0000000..d5ee1d6
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-mep.c
@@ -0,0 +1,28 @@
+/* BFD support for the Toshiba Media Engine Processor.
+ Copyright (C) 2001, 2002, 2004, 2007 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+#define MA(x, n, def, y) { 32, 32, 8, bfd_arch_mep, x, "mep", n, \
+ 2, def, bfd_default_compatible, bfd_default_scan, y }
+
+static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", FALSE, NULL);
+const bfd_arch_info_type bfd_mep_arch = MA (bfd_mach_mep, "mep", TRUE, & bfd_h1_arch);
diff --git a/contrib/binutils/bfd/cpu-mips.c b/contrib/binutils/bfd/cpu-mips.c
index c232f85..54bc0cf 100644
--- a/contrib/binutils/bfd/cpu-mips.c
+++ b/contrib/binutils/bfd/cpu-mips.c
@@ -1,6 +1,6 @@
/* bfd back-end for mips support
Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
- 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
static const bfd_arch_info_type *mips_compatible
diff --git a/contrib/binutils/bfd/cpu-powerpc.c b/contrib/binutils/bfd/cpu-powerpc.c
index 2584d65..e358330 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, 2001, 2002, 2003
+ Copyright 1994, 1995, 1996, 2000, 2001, 2002, 2003, 2007
Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
@@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
/* The common PowerPC architecture is compatible with the RS/6000. */
diff --git a/contrib/binutils/bfd/cpu-rs6000.c b/contrib/binutils/bfd/cpu-rs6000.c
index 43c7be7..4ed1d71 100644
--- a/contrib/binutils/bfd/cpu-rs6000.c
+++ b/contrib/binutils/bfd/cpu-rs6000.c
@@ -1,11 +1,7 @@
/* BFD back-end for rs6000 support
- Copyright 1990, 1991, 1993, 1995, 2000, 2002, 2003
+ Copyright 1990, 1991, 1993, 1995, 2000, 2002, 2003, 2007
Free Software Foundation, Inc.
- FIXME: Can someone provide a transliteration of this name into ASCII?
- Using the following chars caused a compiler warning on HIUX (so I replaced
- them with octal escapes), and isn't useful without an understanding of what
- character set it is.
- Written by Mimi Ph\373\364ng-Th\345o V\365 of IBM
+ Written by Mimi Phuong-Thao Vo of IBM
and John Gilmore of Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,8 +20,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
/* The RS/6000 architecture is compatible with the PowerPC common
diff --git a/contrib/binutils/bfd/cpu-s390.c b/contrib/binutils/bfd/cpu-s390.c
index e7c714f..b385a9c 100644
--- a/contrib/binutils/bfd/cpu-s390.c
+++ b/contrib/binutils/bfd/cpu-s390.c
@@ -1,5 +1,5 @@
/* BFD support for the s390 processor.
- Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
Contributed by Carl B. Pedersen and Martin Schwidefsky.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
const bfd_arch_info_type bfd_s390_64_arch =
diff --git a/contrib/binutils/bfd/cpu-score.c b/contrib/binutils/bfd/cpu-score.c
new file mode 100644
index 0000000..90d3113
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-score.c
@@ -0,0 +1,51 @@
+/* BFD support for the score processor
+ Copyright 2006, 2007 Free Software Foundation, Inc.
+ Contributed by
+ Mei Ligang (ligang@sunnorth.com.cn)
+ Pei-Lin Tsai (pltsai@sunplus.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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+const bfd_arch_info_type
+bfd_score_arch =
+{
+ 32, /* There's 32 bits_per_word. */
+ 32, /* There's 32 bits_per_address. */
+ 8, /* There's 8 bits_per_byte. */
+ bfd_arch_score, /* One of enum bfd_architecture, defined
+ in archures.c and provided in
+ generated header files. */
+ 0, /* Only 1 machine, but #255 for
+ historical reasons. */
+ "score", /* The arch_name. */
+ "score", /* The printable name is the same. */
+ 4, /* Section alignment power; each section
+ is aligned to (only) 2^4 bytes. */
+ TRUE, /* This is the default "machine", since
+ there's only one. */
+ bfd_default_compatible, /* A default function for testing
+ "machine" compatibility of two
+ bfd_arch_info_type. */
+ bfd_default_scan, /* Check if an bfd_arch_info_type is a
+ match. */
+ NULL /* Pointer to next bfd_arch_info_type in
+ the same family. */
+};
diff --git a/contrib/binutils/bfd/cpu-sparc.c b/contrib/binutils/bfd/cpu-sparc.c
index 4215326..35a109e 100644
--- a/contrib/binutils/bfd/cpu-sparc.c
+++ b/contrib/binutils/bfd/cpu-sparc.c
@@ -1,5 +1,5 @@
/* BFD support for the SPARC architecture.
- Copyright 1992, 1995, 1996, 1998, 2000, 2002
+ Copyright 1992, 1995, 1996, 1998, 2000, 2002, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
static const bfd_arch_info_type arch_info_struct[] =
diff --git a/contrib/binutils/bfd/cpu-spu.c b/contrib/binutils/bfd/cpu-spu.c
new file mode 100644
index 0000000..540a19f
--- /dev/null
+++ b/contrib/binutils/bfd/cpu-spu.c
@@ -0,0 +1,54 @@
+/* Copyright 2006, 2007 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.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+
+
+static const bfd_arch_info_type *
+spu_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b)
+{
+ BFD_ASSERT (a->arch == bfd_arch_spu);
+ switch (b->arch)
+ {
+ default:
+ return NULL;
+ case bfd_arch_spu:
+ return bfd_default_compatible (a, b);
+ }
+ /*NOTREACHED*/
+}
+
+const bfd_arch_info_type bfd_spu_arch[] =
+{
+ {
+ 32, /* 32 bits in a word */
+ 32, /* 32 bits in an address */
+ 8, /* 8 bits in a byte */
+ bfd_arch_spu, /* architecture */
+ bfd_mach_spu, /* machine */
+ "spu", /* architecture name */
+ "spu:256K", /* printable name */
+ 3, /* aligned power */
+ TRUE, /* the default machine for the architecture */
+ spu_compatible, /* the spu is only compatible with itself, see above */
+ bfd_default_scan,
+ 0, /* next -- there are none! */
+ }
+};
diff --git a/contrib/binutils/bfd/doc/ChangeLog b/contrib/binutils/bfd/doc/ChangeLog
index 7909268..6b96b61 100644
--- a/contrib/binutils/bfd/doc/ChangeLog
+++ b/contrib/binutils/bfd/doc/ChangeLog
@@ -1,7 +1,56 @@
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.in: Likewise.
+
+2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.in: Regenerated.
+
+2007-05-22 Nick Clifton <nickc@redhat.com>
+
+ * bfd.texinfo: Use @copying around the copyright notice.
+ * bfdint.texi: Likewise.
+
+2007-05-21 Nick Clifton <nickc@redhat.com>
+
+ * bfdint.texi: Add GNU Free Documentation License notice.
+
+2007-04-24 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2007-02-17 Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com
+ Joseph Myers <joseph@codesourcery.com>
+
+ * Makefile.in: Regenerate.
+
+2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * bfd..texinfo: Fix spelling mistakes.
+ * bfdint.texinfo: Likewise.
+
+2006-07-18 Nigel Stephens <nigel@mips.com>
+
+ * bfd.texinfo: Add @section for "What to Put Where".
+
2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
* bfd.texinfo: Remove local @tex code.
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2006-05-11 Carlos O'Donell <carlos@codesourcery.com>
+
+ * bfd.texinfo: Rename "Index" to "BFD Index"
+
2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
* Makefile.am: Add install-html and install-html-am targets.
diff --git a/contrib/binutils/bfd/doc/Makefile.am b/contrib/binutils/bfd/doc/Makefile.am
index 6d221fa..6ff434a 100644
--- a/contrib/binutils/bfd/doc/Makefile.am
+++ b/contrib/binutils/bfd/doc/Makefile.am
@@ -8,7 +8,8 @@ DOCFILES = aoutx.texi archive.texi archures.texi \
libbfd.texi bfdwin.texi bfdio.texi \
opncls.texi reloc.texi section.texi \
syms.texi targets.texi init.texi hash.texi linker.texi \
- mmo.texi
+ mmo.texi \
+ bfdver.texi
PROTOS = archive.p archures.p bfd.p \
core.p format.p \
@@ -51,6 +52,7 @@ SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
TEXIDIR = $(srcdir)/../../texinfo/fsf
info_TEXINFOS = bfd.texinfo
+bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi
MKDOC = chew$(EXEEXT_FOR_BUILD)
@@ -68,8 +70,6 @@ chew.o: chew.c
protos: libbfd.h libcoff.h bfd.h
-$(srcdir)/bfd.info bfd.dvi bfd.html: $(DOCFILES) bfdsumm.texi bfd.texinfo
-
# We can't replace these rules with an implicit rule, because
# makes without VPATH support couldn't find the .h files in `..'.
@@ -274,6 +274,17 @@ bfd.h: $(BFD_H_DEP)
echo "#endif" >> $@
echo "#endif" >> $@
+bfdver.texi: $(srcdir)/Makefile.in
+ @echo "creating $@"; \
+ echo "@set VERSION $(VERSION)" > bfdver.texi; \
+ if [ -n "$(PKGVERSION)" ]; then \
+ echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \
+ fi; \
+ echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \
+ if [ -n "$(REPORT_BUGS_TEXI)" ]; then \
+ echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \
+ fi
+
noinst_TEXINFOS = bfdint.texi
MOSTLYCLEANFILES = $(MKDOC) *.o
@@ -309,6 +320,11 @@ install-html-am: $(HTMLS)
fi; \
done
+MAINTAINERCLEANFILES += bfd.info
-
-
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES += bfd.info
+endif
diff --git a/contrib/binutils/bfd/doc/Makefile.in b/contrib/binutils/bfd/doc/Makefile.in
index ad81061..02b15d0 100644
--- a/contrib/binutils/bfd/doc/Makefile.in
+++ b/contrib/binutils/bfd/doc/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -36,13 +36,26 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+@GENINSRC_NEVER_TRUE@am__append_1 = bfd.info
subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(bfd_TEXINFOS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../config/stdint.m4 $(top_srcdir)/../libtool.m4 \
+ $(top_srcdir)/../ltoptions.m4 $(top_srcdir)/../ltsugar.m4 \
+ $(top_srcdir)/../ltversion.m4 $(top_srcdir)/bfd.m4 \
+ $(top_srcdir)/warning.m4 $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@@ -51,7 +64,7 @@ CONFIG_CLEAN_FILES =
depcomp =
am__depfiles_maybe =
SOURCES =
-INFO_DEPS = $(srcdir)/bfd.info
+INFO_DEPS = bfd.info
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
DVIS = bfd.dvi
@@ -69,7 +82,6 @@ MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
DVIPS = dvips
ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
@@ -95,20 +107,24 @@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
+DEBUGDIR = @DEBUGDIR@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GMOFILES = @GMOFILES@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
+GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
+GREP = @GREP@
HDEFINES = @HDEFINES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
@@ -116,10 +132,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -131,6 +147,8 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -140,14 +158,16 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-POFILES = @POFILES@
+PKGVERSION = @PKGVERSION@
POSUB = @POSUB@
RANLIB = @RANLIB@
+REPORT_BUGS_TEXI = @REPORT_BUGS_TEXI@
+REPORT_BUGS_TO = @REPORT_BUGS_TO@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
TDEFINES = @TDEFINES@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
@@ -156,6 +176,7 @@ WIN32LIBADD = @WIN32LIBADD@
XGETTEXT = @XGETTEXT@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
all_backends = @all_backends@
@@ -166,10 +187,10 @@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
+bfd64_libs = @bfd64_libs@
bfd_backends = @bfd_backends@
bfd_default_target_size = @bfd_default_target_size@
bfd_file_ptr = @bfd_file_ptr@
-bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
bfd_ufile_ptr = @bfd_ufile_ptr@
bfdincludedir = @bfdincludedir@
@@ -194,10 +215,10 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -221,7 +242,8 @@ DOCFILES = aoutx.texi archive.texi archures.texi \
libbfd.texi bfdwin.texi bfdio.texi \
opncls.texi reloc.texi section.texi \
syms.texi targets.texi init.texi hash.texi linker.texi \
- mmo.texi
+ mmo.texi \
+ bfdver.texi
PROTOS = archive.p archures.p bfd.p \
core.p format.p \
@@ -263,6 +285,7 @@ SRCIPROT = $(srcdir)/../cache.c $(srcdir)/../libbfd.c \
TEXIDIR = $(srcdir)/../../texinfo/fsf
info_TEXINFOS = bfd.texinfo
+bfd_TEXINFOS = $(DOCFILES) bfdsumm.texi
MKDOC = chew$(EXEEXT_FOR_BUILD)
INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
-I$(srcdir)/../../intl -I../../intl
@@ -314,13 +337,14 @@ BFD_H_DEP = \
noinst_TEXINFOS = bfdint.texi
MOSTLYCLEANFILES = $(MKDOC) *.o
CLEANFILES = *.p *.ip
-DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log
-MAINTAINERCLEANFILES = $(DOCFILES)
+DISTCLEANFILES = bfd.?? bfd.??? bfd.h libbfd.h libcoff.h texput.log \
+ $(am__append_1)
+MAINTAINERCLEANFILES = $(DOCFILES) bfd.info
html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
all: all-am
.SUFFIXES:
-.SUFFIXES: .dvi .html .info .pdf .ps .texinfo
+.SUFFIXES: .dvi .ps
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -330,9 +354,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign doc/Makefile
+ $(AUTOMAKE) --cygnus doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -360,40 +384,38 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
-.texinfo.info:
+bfd.info: bfd.texinfo $(bfd_TEXINFOS)
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
- am__cwd=`pwd` && cd $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
- done; \
- cd "$$am__cwd"; \
+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+ done; \
+ else :; fi && \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $@ $<; \
+ -o $@ `test -f 'bfd.texinfo' || echo '$(srcdir)/'`bfd.texinfo; \
then \
rc=0; \
- cd $(srcdir); \
else \
rc=$$?; \
- cd $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
-.texinfo.dvi:
+bfd.dvi: bfd.texinfo $(bfd_TEXINFOS)
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $<
+ $(TEXI2DVI) -o $@ `test -f 'bfd.texinfo' || echo '$(srcdir)/'`bfd.texinfo
-.texinfo.pdf:
+bfd.pdf: bfd.texinfo $(bfd_TEXINFOS)
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $<
+ $(TEXI2PDF) -o $@ `test -f 'bfd.texinfo' || echo '$(srcdir)/'`bfd.texinfo
-.texinfo.html:
+bfd.html: bfd.texinfo $(bfd_TEXINFOS)
rm -rf $(@:.html=.htp)
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $(@:.html=.htp) $<; \
+ -o $(@:.html=.htp) `test -f 'bfd.texinfo' || echo '$(srcdir)/'`bfd.texinfo; \
then \
rm -rf $@; \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
@@ -403,11 +425,8 @@ distclean-libtool:
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
-$(srcdir)/bfd.info: bfd.texinfo
-bfd.dvi: bfd.texinfo
-bfd.pdf: bfd.texinfo
-bfd.html: bfd.texinfo
.dvi.ps:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $<
uninstall-info-am:
@@ -600,8 +619,6 @@ chew.o: chew.c
protos: libbfd.h libcoff.h bfd.h
-$(srcdir)/bfd.info bfd.dvi bfd.html: $(DOCFILES) bfdsumm.texi bfd.texinfo
-
# We can't replace these rules with an implicit rule, because
# makes without VPATH support couldn't find the .h files in `..'.
@@ -762,6 +779,17 @@ bfd.h: $(BFD_H_DEP)
echo "#endif" >> $@
echo "#endif" >> $@
+bfdver.texi: $(srcdir)/Makefile.in
+ @echo "creating $@"; \
+ echo "@set VERSION $(VERSION)" > bfdver.texi; \
+ if [ -n "$(PKGVERSION)" ]; then \
+ echo "@set VERSION_PACKAGE $(PKGVERSION)" >> bfdver.texi; \
+ fi; \
+ echo "@set UPDATED `date '+%B %Y'`" >> bfdver.texi; \
+ if [ -n "$(REPORT_BUGS_TEXI)" ]; then \
+ echo "@set BUGURL $(REPORT_BUGS_TEXI)" >> bfdver.texi; \
+ fi
+
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install: install-info
diff --git a/contrib/binutils/bfd/doc/aoutx.texi b/contrib/binutils/bfd/doc/aoutx.texi
deleted file mode 100644
index 7cf9787..0000000
--- a/contrib/binutils/bfd/doc/aoutx.texi
+++ /dev/null
@@ -1,213 +0,0 @@
-@section a.out backends
-
-
-@strong{Description}@*
-BFD supports a number of different flavours of a.out format,
-though the major differences are only the sizes of the
-structures on disk, and the shape of the relocation
-information.
-
-The support is split into a basic support file @file{aoutx.h}
-and other files which derive functions from the base. One
-derivation file is @file{aoutf1.h} (for a.out flavour 1), and
-adds to the basic a.out functions support for sun3, sun4, 386
-and 29k a.out files, to create a target jump vector for a
-specific target.
-
-This information is further split out into more specific files
-for each machine, including @file{sunos.c} for sun3 and sun4,
-@file{newsos3.c} for the Sony NEWS, and @file{demo64.c} for a
-demonstration of a 64 bit a.out format.
-
-The base file @file{aoutx.h} defines general mechanisms for
-reading and writing records to and from disk and various
-other methods which BFD requires. It is included by
-@file{aout32.c} and @file{aout64.c} to form the names
-@code{aout_32_swap_exec_header_in}, @code{aout_64_swap_exec_header_in}, etc.
-
-As an example, this is what goes on to make the back end for a
-sun4, from @file{aout32.c}:
-
-@example
- #define ARCH_SIZE 32
- #include "aoutx.h"
-@end example
-
-Which exports names:
-
-@example
- ...
- aout_32_canonicalize_reloc
- aout_32_find_nearest_line
- aout_32_get_lineno
- aout_32_get_reloc_upper_bound
- ...
-@end example
-
-from @file{sunos.c}:
-
-@example
- #define TARGET_NAME "a.out-sunos-big"
- #define VECNAME sunos_big_vec
- #include "aoutf1.h"
-@end example
-
-requires all the names from @file{aout32.c}, and produces the jump vector
-
-@example
- sunos_big_vec
-@end example
-
-The file @file{host-aout.c} is a special case. It is for a large set
-of hosts that use ``more or less standard'' a.out files, and
-for which cross-debugging is not interesting. It uses the
-standard 32-bit a.out support routines, but determines the
-file offsets and addresses of the text, data, and BSS
-sections, the machine architecture and machine type, and the
-entry point address, in a host-dependent manner. Once these
-values have been determined, generic code is used to handle
-the object file.
-
-When porting it to run on a new system, you must supply:
-
-@example
- HOST_PAGE_SIZE
- HOST_SEGMENT_SIZE
- HOST_MACHINE_ARCH (optional)
- HOST_MACHINE_MACHINE (optional)
- HOST_TEXT_START_ADDR
- HOST_STACK_END_ADDR
-@end example
-
-in the file @file{../include/sys/h-@var{XXX}.h} (for your host). These
-values, plus the structures and macros defined in @file{a.out.h} on
-your host system, will produce a BFD target that will access
-ordinary a.out files on your host. To configure a new machine
-to use @file{host-aout.c}, specify:
-
-@example
- TDEFAULTS = -DDEFAULT_VECTOR=host_aout_big_vec
- TDEPFILES= host-aout.o trad-core.o
-@end example
-
-in the @file{config/@var{XXX}.mt} file, and modify @file{configure.in}
-to use the
-@file{@var{XXX}.mt} file (by setting "@code{bfd_target=XXX}") when your
-configuration is selected.
-
-@subsection Relocations
-
-
-@strong{Description}@*
-The file @file{aoutx.h} provides for both the @emph{standard}
-and @emph{extended} forms of a.out relocation records.
-
-The standard records contain only an
-address, a symbol index, and a type field. The extended records
-(used on 29ks and sparcs) also have a full integer for an
-addend.
-
-@subsection Internal entry points
-
-
-@strong{Description}@*
-@file{aoutx.h} exports several routines for accessing the
-contents of an a.out file, which are gathered and exported in
-turn by various format specific files (eg sunos.c).
-
-@findex aout_@var{size}_swap_exec_header_in
-@subsubsection @code{aout_@var{size}_swap_exec_header_in}
-@strong{Synopsis}
-@example
-void aout_@var{size}_swap_exec_header_in,
- (bfd *abfd,
- struct external_exec *bytes,
- struct internal_exec *execp);
-@end example
-@strong{Description}@*
-Swap the information in an executable header @var{raw_bytes} taken
-from a raw byte stream memory image into the internal exec header
-structure @var{execp}.
-
-@findex aout_@var{size}_swap_exec_header_out
-@subsubsection @code{aout_@var{size}_swap_exec_header_out}
-@strong{Synopsis}
-@example
-void aout_@var{size}_swap_exec_header_out
- (bfd *abfd,
- struct internal_exec *execp,
- struct external_exec *raw_bytes);
-@end example
-@strong{Description}@*
-Swap the information in an internal exec header structure
-@var{execp} into the buffer @var{raw_bytes} ready for writing to disk.
-
-@findex aout_@var{size}_some_aout_object_p
-@subsubsection @code{aout_@var{size}_some_aout_object_p}
-@strong{Synopsis}
-@example
-const bfd_target *aout_@var{size}_some_aout_object_p
- (bfd *abfd,
- struct internal_exec *execp,
- const bfd_target *(*callback_to_real_object_p) (bfd *));
-@end example
-@strong{Description}@*
-Some a.out variant thinks that the file open in @var{abfd}
-checking is an a.out file. Do some more checking, and set up
-for access if it really is. Call back to the calling
-environment's "finish up" function just before returning, to
-handle any last-minute setup.
-
-@findex aout_@var{size}_mkobject
-@subsubsection @code{aout_@var{size}_mkobject}
-@strong{Synopsis}
-@example
-bfd_boolean aout_@var{size}_mkobject, (bfd *abfd);
-@end example
-@strong{Description}@*
-Initialize BFD @var{abfd} for use with a.out files.
-
-@findex aout_@var{size}_machine_type
-@subsubsection @code{aout_@var{size}_machine_type}
-@strong{Synopsis}
-@example
-enum machine_type aout_@var{size}_machine_type
- (enum bfd_architecture arch,
- unsigned long machine,
- bfd_boolean *unknown);
-@end example
-@strong{Description}@*
-Keep track of machine architecture and machine type for
-a.out's. Return the @code{machine_type} for a particular
-architecture and machine, or @code{M_UNKNOWN} if that exact architecture
-and machine can't be represented in a.out format.
-
-If the architecture is understood, machine type 0 (default)
-is always understood.
-
-@findex aout_@var{size}_set_arch_mach
-@subsubsection @code{aout_@var{size}_set_arch_mach}
-@strong{Synopsis}
-@example
-bfd_boolean aout_@var{size}_set_arch_mach,
- (bfd *,
- enum bfd_architecture arch,
- unsigned long machine);
-@end example
-@strong{Description}@*
-Set the architecture and the machine of the BFD @var{abfd} to the
-values @var{arch} and @var{machine}. Verify that @var{abfd}'s format
-can support the architecture required.
-
-@findex aout_@var{size}_new_section_hook
-@subsubsection @code{aout_@var{size}_new_section_hook}
-@strong{Synopsis}
-@example
-bfd_boolean aout_@var{size}_new_section_hook,
- (bfd *abfd,
- asection *newsect);
-@end example
-@strong{Description}@*
-Called by the BFD in response to a @code{bfd_make_section}
-request.
-
diff --git a/contrib/binutils/bfd/doc/archive.texi b/contrib/binutils/bfd/doc/archive.texi
deleted file mode 100644
index 3d0a97d..0000000
--- a/contrib/binutils/bfd/doc/archive.texi
+++ /dev/null
@@ -1,99 +0,0 @@
-@section Archives
-
-
-@strong{Description}@*
-An archive (or library) is just another BFD. It has a symbol
-table, although there's not much a user program will do with it.
-
-The big difference between an archive BFD and an ordinary BFD
-is that the archive doesn't have sections. Instead it has a
-chain of BFDs that are considered its contents. These BFDs can
-be manipulated like any other. The BFDs contained in an
-archive opened for reading will all be opened for reading. You
-may put either input or output BFDs into an archive opened for
-output; they will be handled correctly when the archive is closed.
-
-Use @code{bfd_openr_next_archived_file} to step through
-the contents of an archive opened for input. You don't
-have to read the entire archive if you don't want
-to! Read it until you find what you want.
-
-Archive contents of output BFDs are chained through the
-@code{next} pointer in a BFD. The first one is findable through
-the @code{archive_head} slot of the archive. Set it with
-@code{bfd_set_archive_head} (q.v.). A given BFD may be in only one
-open output archive at a time.
-
-As expected, the BFD archive code is more general than the
-archive code of any given environment. BFD archives may
-contain files of different formats (e.g., a.out and coff) and
-even different architectures. You may even place archives
-recursively into archives!
-
-This can cause unexpected confusion, since some archive
-formats are more expressive than others. For instance, Intel
-COFF archives can preserve long filenames; SunOS a.out archives
-cannot. If you move a file from the first to the second
-format and back again, the filename may be truncated.
-Likewise, different a.out environments have different
-conventions as to how they truncate filenames, whether they
-preserve directory names in filenames, etc. When
-interoperating with native tools, be sure your files are
-homogeneous.
-
-Beware: most of these formats do not react well to the
-presence of spaces in filenames. We do the best we can, but
-can't always handle this case due to restrictions in the format of
-archives. Many Unix utilities are braindead in regards to
-spaces and such in filenames anyway, so this shouldn't be much
-of a restriction.
-
-Archives are supported in BFD in @code{archive.c}.
-
-@subsection Archive functions
-
-
-@findex bfd_get_next_mapent
-@subsubsection @code{bfd_get_next_mapent}
-@strong{Synopsis}
-@example
-symindex bfd_get_next_mapent
- (bfd *abfd, symindex previous, carsym **sym);
-@end example
-@strong{Description}@*
-Step through archive @var{abfd}'s symbol table (if it
-has one). Successively update @var{sym} with the next symbol's
-information, returning that symbol's (internal) index into the
-symbol table.
-
-Supply @code{BFD_NO_MORE_SYMBOLS} as the @var{previous} entry to get
-the first one; returns @code{BFD_NO_MORE_SYMBOLS} when you've already
-got the last one.
-
-A @code{carsym} is a canonical archive symbol. The only
-user-visible element is its name, a null-terminated string.
-
-@findex bfd_set_archive_head
-@subsubsection @code{bfd_set_archive_head}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head);
-@end example
-@strong{Description}@*
-Set the head of the chain of
-BFDs contained in the archive @var{output} to @var{new_head}.
-
-@findex bfd_openr_next_archived_file
-@subsubsection @code{bfd_openr_next_archived_file}
-@strong{Synopsis}
-@example
-bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous);
-@end example
-@strong{Description}@*
-Provided a BFD, @var{archive}, containing an archive and NULL, open
-an input BFD on the first contained element and returns that.
-Subsequent calls should pass
-the archive and the previous return value to return a created
-BFD to the next contained element. NULL is returned when there
-are no more.
-
diff --git a/contrib/binutils/bfd/doc/archures.texi b/contrib/binutils/bfd/doc/archures.texi
deleted file mode 100644
index bf72179..0000000
--- a/contrib/binutils/bfd/doc/archures.texi
+++ /dev/null
@@ -1,585 +0,0 @@
-@section Architectures
-BFD keeps one atom in a BFD describing the
-architecture of the data attached to the BFD: a pointer to a
-@code{bfd_arch_info_type}.
-
-Pointers to structures can be requested independently of a BFD
-so that an architecture's information can be interrogated
-without access to an open BFD.
-
-The architecture information is provided by each architecture package.
-The set of default architectures is selected by the macro
-@code{SELECT_ARCHITECTURES}. This is normally set up in the
-@file{config/@var{target}.mt} file of your choice. If the name is not
-defined, then all the architectures supported are included.
-
-When BFD starts up, all the architectures are called with an
-initialize method. It is up to the architecture back end to
-insert as many items into the list of architectures as it wants to;
-generally this would be one for each machine and one for the
-default case (an item with a machine field of 0).
-
-BFD's idea of an architecture is implemented in @file{archures.c}.
-
-@subsection bfd_architecture
-
-
-@strong{Description}@*
-This enum gives the object file's CPU architecture, in a
-global sense---i.e., what processor family does it belong to?
-Another field indicates which processor within
-the family is in use. The machine gives a number which
-distinguishes different versions of the architecture,
-containing, for example, 2 and 3 for Intel i960 KA and i960 KB,
-and 68020 and 68030 for Motorola 68020 and 68030.
-@example
-enum bfd_architecture
-@{
- bfd_arch_unknown, /* File arch not known. */
- bfd_arch_obscure, /* Arch known, not one of these. */
- bfd_arch_m68k, /* Motorola 68xxx */
-#define bfd_mach_m68000 1
-#define bfd_mach_m68008 2
-#define bfd_mach_m68010 3
-#define bfd_mach_m68020 4
-#define bfd_mach_m68030 5
-#define bfd_mach_m68040 6
-#define bfd_mach_m68060 7
-#define bfd_mach_cpu32 8
-#define bfd_mach_mcf_isa_a_nodiv 9
-#define bfd_mach_mcf_isa_a 10
-#define bfd_mach_mcf_isa_a_mac 11
-#define bfd_mach_mcf_isa_a_emac 12
-#define bfd_mach_mcf_isa_aplus 13
-#define bfd_mach_mcf_isa_aplus_mac 14
-#define bfd_mach_mcf_isa_aplus_emac 15
-#define bfd_mach_mcf_isa_b_nousp 16
-#define bfd_mach_mcf_isa_b_nousp_mac 17
-#define bfd_mach_mcf_isa_b_nousp_emac 18
-#define bfd_mach_mcf_isa_b 19
-#define bfd_mach_mcf_isa_b_mac 20
-#define bfd_mach_mcf_isa_b_emac 21
-#define bfd_mach_mcf_isa_b_float 22
-#define bfd_mach_mcf_isa_b_float_mac 23
-#define bfd_mach_mcf_isa_b_float_emac 24
- bfd_arch_vax, /* DEC Vax */
- bfd_arch_i960, /* Intel 960 */
- /* The order of the following is important.
- lower number indicates a machine type that
- only accepts a subset of the instructions
- available to machines with higher numbers.
- The exception is the "ca", which is
- incompatible with all other machines except
- "core". */
-
-#define bfd_mach_i960_core 1
-#define bfd_mach_i960_ka_sa 2
-#define bfd_mach_i960_kb_sb 3
-#define bfd_mach_i960_mc 4
-#define bfd_mach_i960_xa 5
-#define bfd_mach_i960_ca 6
-#define bfd_mach_i960_jx 7
-#define bfd_mach_i960_hx 8
-
- bfd_arch_or32, /* OpenRISC 32 */
-
- bfd_arch_sparc, /* SPARC */
-#define bfd_mach_sparc 1
-/* The difference between v8plus and v9 is that v9 is a true 64 bit env. */
-#define bfd_mach_sparc_sparclet 2
-#define bfd_mach_sparc_sparclite 3
-#define bfd_mach_sparc_v8plus 4
-#define bfd_mach_sparc_v8plusa 5 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_sparclite_le 6
-#define bfd_mach_sparc_v9 7
-#define bfd_mach_sparc_v9a 8 /* with ultrasparc add'ns. */
-#define bfd_mach_sparc_v8plusb 9 /* with cheetah add'ns. */
-#define bfd_mach_sparc_v9b 10 /* with cheetah add'ns. */
-/* Nonzero if MACH has the v9 instruction set. */
-#define bfd_mach_sparc_v9_p(mach) \
- ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
- && (mach) != bfd_mach_sparc_sparclite_le)
-/* Nonzero if MACH is a 64 bit sparc architecture. */
-#define bfd_mach_sparc_64bit_p(mach) \
- ((mach) >= bfd_mach_sparc_v9 && (mach) != bfd_mach_sparc_v8plusb)
- bfd_arch_mips, /* MIPS Rxxxx */
-#define bfd_mach_mips3000 3000
-#define bfd_mach_mips3900 3900
-#define bfd_mach_mips4000 4000
-#define bfd_mach_mips4010 4010
-#define bfd_mach_mips4100 4100
-#define bfd_mach_mips4111 4111
-#define bfd_mach_mips4120 4120
-#define bfd_mach_mips4300 4300
-#define bfd_mach_mips4400 4400
-#define bfd_mach_mips4600 4600
-#define bfd_mach_mips4650 4650
-#define bfd_mach_mips5000 5000
-#define bfd_mach_mips5400 5400
-#define bfd_mach_mips5500 5500
-#define bfd_mach_mips6000 6000
-#define bfd_mach_mips7000 7000
-#define bfd_mach_mips8000 8000
-#define bfd_mach_mips9000 9000
-#define bfd_mach_mips10000 10000
-#define bfd_mach_mips12000 12000
-#define bfd_mach_mips16 16
-#define bfd_mach_mips5 5
-#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
-#define bfd_mach_mipsisa32 32
-#define bfd_mach_mipsisa32r2 33
-#define bfd_mach_mipsisa64 64
-#define bfd_mach_mipsisa64r2 65
- bfd_arch_i386, /* Intel 386 */
-#define bfd_mach_i386_i386 1
-#define bfd_mach_i386_i8086 2
-#define bfd_mach_i386_i386_intel_syntax 3
-#define bfd_mach_x86_64 64
-#define bfd_mach_x86_64_intel_syntax 65
- bfd_arch_we32k, /* AT&T WE32xxx */
- bfd_arch_tahoe, /* CCI/Harris Tahoe */
- bfd_arch_i860, /* Intel 860 */
- bfd_arch_i370, /* IBM 360/370 Mainframes */
- bfd_arch_romp, /* IBM ROMP PC/RT */
- bfd_arch_convex, /* Convex */
- bfd_arch_m88k, /* Motorola 88xxx */
- bfd_arch_m98k, /* Motorola 98xxx */
- bfd_arch_pyramid, /* Pyramid Technology */
- bfd_arch_h8300, /* Renesas H8/300 (formerly Hitachi H8/300) */
-#define bfd_mach_h8300 1
-#define bfd_mach_h8300h 2
-#define bfd_mach_h8300s 3
-#define bfd_mach_h8300hn 4
-#define bfd_mach_h8300sn 5
-#define bfd_mach_h8300sx 6
-#define bfd_mach_h8300sxn 7
- bfd_arch_pdp11, /* DEC PDP-11 */
- bfd_arch_powerpc, /* PowerPC */
-#define bfd_mach_ppc 32
-#define bfd_mach_ppc64 64
-#define bfd_mach_ppc_403 403
-#define bfd_mach_ppc_403gc 4030
-#define bfd_mach_ppc_505 505
-#define bfd_mach_ppc_601 601
-#define bfd_mach_ppc_602 602
-#define bfd_mach_ppc_603 603
-#define bfd_mach_ppc_ec603e 6031
-#define bfd_mach_ppc_604 604
-#define bfd_mach_ppc_620 620
-#define bfd_mach_ppc_630 630
-#define bfd_mach_ppc_750 750
-#define bfd_mach_ppc_860 860
-#define bfd_mach_ppc_a35 35
-#define bfd_mach_ppc_rs64ii 642
-#define bfd_mach_ppc_rs64iii 643
-#define bfd_mach_ppc_7400 7400
-#define bfd_mach_ppc_e500 500
- bfd_arch_rs6000, /* IBM RS/6000 */
-#define bfd_mach_rs6k 6000
-#define bfd_mach_rs6k_rs1 6001
-#define bfd_mach_rs6k_rsc 6003
-#define bfd_mach_rs6k_rs2 6002
- bfd_arch_hppa, /* HP PA RISC */
-#define bfd_mach_hppa10 10
-#define bfd_mach_hppa11 11
-#define bfd_mach_hppa20 20
-#define bfd_mach_hppa20w 25
- bfd_arch_d10v, /* Mitsubishi D10V */
-#define bfd_mach_d10v 1
-#define bfd_mach_d10v_ts2 2
-#define bfd_mach_d10v_ts3 3
- bfd_arch_d30v, /* Mitsubishi D30V */
- bfd_arch_dlx, /* DLX */
- bfd_arch_m68hc11, /* Motorola 68HC11 */
- bfd_arch_m68hc12, /* Motorola 68HC12 */
-#define bfd_mach_m6812_default 0
-#define bfd_mach_m6812 1
-#define bfd_mach_m6812s 2
- bfd_arch_z8k, /* Zilog Z8000 */
-#define bfd_mach_z8001 1
-#define bfd_mach_z8002 2
- bfd_arch_h8500, /* Renesas H8/500 (formerly Hitachi H8/500) */
- bfd_arch_sh, /* Renesas / SuperH SH (formerly Hitachi SH) */
-#define bfd_mach_sh 1
-#define bfd_mach_sh2 0x20
-#define bfd_mach_sh_dsp 0x2d
-#define bfd_mach_sh2a 0x2a
-#define bfd_mach_sh2a_nofpu 0x2b
-#define bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu 0x2a1
-#define bfd_mach_sh2a_nofpu_or_sh3_nommu 0x2a2
-#define bfd_mach_sh2a_or_sh4 0x2a3
-#define bfd_mach_sh2a_or_sh3e 0x2a4
-#define bfd_mach_sh2e 0x2e
-#define bfd_mach_sh3 0x30
-#define bfd_mach_sh3_nommu 0x31
-#define bfd_mach_sh3_dsp 0x3d
-#define bfd_mach_sh3e 0x3e
-#define bfd_mach_sh4 0x40
-#define bfd_mach_sh4_nofpu 0x41
-#define bfd_mach_sh4_nommu_nofpu 0x42
-#define bfd_mach_sh4a 0x4a
-#define bfd_mach_sh4a_nofpu 0x4b
-#define bfd_mach_sh4al_dsp 0x4d
-#define bfd_mach_sh5 0x50
- bfd_arch_alpha, /* Dec Alpha */
-#define bfd_mach_alpha_ev4 0x10
-#define bfd_mach_alpha_ev5 0x20
-#define bfd_mach_alpha_ev6 0x30
- bfd_arch_arm, /* Advanced Risc Machines ARM. */
-#define bfd_mach_arm_unknown 0
-#define bfd_mach_arm_2 1
-#define bfd_mach_arm_2a 2
-#define bfd_mach_arm_3 3
-#define bfd_mach_arm_3M 4
-#define bfd_mach_arm_4 5
-#define bfd_mach_arm_4T 6
-#define bfd_mach_arm_5 7
-#define bfd_mach_arm_5T 8
-#define bfd_mach_arm_5TE 9
-#define bfd_mach_arm_XScale 10
-#define bfd_mach_arm_ep9312 11
-#define bfd_mach_arm_iWMMXt 12
- bfd_arch_ns32k, /* National Semiconductors ns32000 */
- bfd_arch_w65, /* WDC 65816 */
- bfd_arch_tic30, /* Texas Instruments TMS320C30 */
- bfd_arch_tic4x, /* Texas Instruments TMS320C3X/4X */
-#define bfd_mach_tic3x 30
-#define bfd_mach_tic4x 40
- bfd_arch_tic54x, /* Texas Instruments TMS320C54X */
- bfd_arch_tic80, /* TI TMS320c80 (MVP) */
- bfd_arch_v850, /* NEC V850 */
-#define bfd_mach_v850 1
-#define bfd_mach_v850e 'E'
-#define bfd_mach_v850e1 '1'
- bfd_arch_arc, /* ARC Cores */
-#define bfd_mach_arc_5 5
-#define bfd_mach_arc_6 6
-#define bfd_mach_arc_7 7
-#define bfd_mach_arc_8 8
- bfd_arch_m32c, /* Renesas M16C/M32C. */
-#define bfd_mach_m16c 0x75
-#define bfd_mach_m32c 0x78
- bfd_arch_m32r, /* Renesas M32R (formerly Mitsubishi M32R/D) */
-#define bfd_mach_m32r 1 /* For backwards compatibility. */
-#define bfd_mach_m32rx 'x'
-#define bfd_mach_m32r2 '2'
- bfd_arch_mn10200, /* Matsushita MN10200 */
- bfd_arch_mn10300, /* Matsushita MN10300 */
-#define bfd_mach_mn10300 300
-#define bfd_mach_am33 330
-#define bfd_mach_am33_2 332
- bfd_arch_fr30,
-#define bfd_mach_fr30 0x46523330
- bfd_arch_frv,
-#define bfd_mach_frv 1
-#define bfd_mach_frvsimple 2
-#define bfd_mach_fr300 300
-#define bfd_mach_fr400 400
-#define bfd_mach_fr450 450
-#define bfd_mach_frvtomcat 499 /* fr500 prototype */
-#define bfd_mach_fr500 500
-#define bfd_mach_fr550 550
- bfd_arch_mcore,
- bfd_arch_ia64, /* HP/Intel ia64 */
-#define bfd_mach_ia64_elf64 64
-#define bfd_mach_ia64_elf32 32
- bfd_arch_ip2k, /* Ubicom IP2K microcontrollers. */
-#define bfd_mach_ip2022 1
-#define bfd_mach_ip2022ext 2
- bfd_arch_iq2000, /* Vitesse IQ2000. */
-#define bfd_mach_iq2000 1
-#define bfd_mach_iq10 2
- bfd_arch_mt,
-#define bfd_mach_ms1 1
-#define bfd_mach_mrisc2 2
-#define bfd_mach_ms2 3
- bfd_arch_pj,
- bfd_arch_avr, /* Atmel AVR microcontrollers. */
-#define bfd_mach_avr1 1
-#define bfd_mach_avr2 2
-#define bfd_mach_avr3 3
-#define bfd_mach_avr4 4
-#define bfd_mach_avr5 5
- bfd_arch_bfin, /* ADI Blackfin */
-#define bfd_mach_bfin 1
- bfd_arch_cr16c, /* National Semiconductor CompactRISC. */
-#define bfd_mach_cr16c 1
- bfd_arch_crx, /* National Semiconductor CRX. */
-#define bfd_mach_crx 1
- bfd_arch_cris, /* Axis CRIS */
-#define bfd_mach_cris_v0_v10 255
-#define bfd_mach_cris_v32 32
-#define bfd_mach_cris_v10_v32 1032
- bfd_arch_s390, /* IBM s390 */
-#define bfd_mach_s390_31 31
-#define bfd_mach_s390_64 64
- bfd_arch_openrisc, /* OpenRISC */
- bfd_arch_mmix, /* Donald Knuth's educational processor. */
- bfd_arch_xstormy16,
-#define bfd_mach_xstormy16 1
- bfd_arch_msp430, /* Texas Instruments MSP430 architecture. */
-#define bfd_mach_msp11 11
-#define bfd_mach_msp110 110
-#define bfd_mach_msp12 12
-#define bfd_mach_msp13 13
-#define bfd_mach_msp14 14
-#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
-#define bfd_mach_msp21 21
-#define bfd_mach_msp31 31
-#define bfd_mach_msp32 32
-#define bfd_mach_msp33 33
-#define bfd_mach_msp41 41
-#define bfd_mach_msp42 42
-#define bfd_mach_msp43 43
-#define bfd_mach_msp44 44
- bfd_arch_xc16x, /* Infineon's XC16X Series. */
-#define bfd_mach_xc16x 1
-#define bfd_mach_xc16xl 2
-#define bfd_mach_xc16xs 3
- bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
-#define bfd_mach_xtensa 1
- bfd_arch_maxq, /* Dallas MAXQ 10/20 */
-#define bfd_mach_maxq10 10
-#define bfd_mach_maxq20 20
- bfd_arch_z80,
-#define bfd_mach_z80strict 1 /* No undocumented opcodes. */
-#define bfd_mach_z80 3 /* With ixl, ixh, iyl, and iyh. */
-#define bfd_mach_z80full 7 /* All undocumented instructions. */
-#define bfd_mach_r800 11 /* R800: successor with multiplication. */
- bfd_arch_last
- @};
-@end example
-
-@subsection bfd_arch_info
-
-
-@strong{Description}@*
-This structure contains information on architectures for use
-within BFD.
-@example
-
-typedef struct bfd_arch_info
-@{
- int bits_per_word;
- int bits_per_address;
- int bits_per_byte;
- enum bfd_architecture arch;
- unsigned long mach;
- const char *arch_name;
- const char *printable_name;
- unsigned int section_align_power;
- /* TRUE if this is the default machine for the architecture.
- The default arch should be the first entry for an arch so that
- all the entries for that arch can be accessed via @code{next}. */
- bfd_boolean the_default;
- const struct bfd_arch_info * (*compatible)
- (const struct bfd_arch_info *a, const struct bfd_arch_info *b);
-
- bfd_boolean (*scan) (const struct bfd_arch_info *, const char *);
-
- const struct bfd_arch_info *next;
-@}
-bfd_arch_info_type;
-
-@end example
-
-@findex bfd_printable_name
-@subsubsection @code{bfd_printable_name}
-@strong{Synopsis}
-@example
-const char *bfd_printable_name (bfd *abfd);
-@end example
-@strong{Description}@*
-Return a printable string representing the architecture and machine
-from the pointer to the architecture info structure.
-
-@findex bfd_scan_arch
-@subsubsection @code{bfd_scan_arch}
-@strong{Synopsis}
-@example
-const bfd_arch_info_type *bfd_scan_arch (const char *string);
-@end example
-@strong{Description}@*
-Figure out if BFD supports any cpu which could be described with
-the name @var{string}. Return a pointer to an @code{arch_info}
-structure if a machine is found, otherwise NULL.
-
-@findex bfd_arch_list
-@subsubsection @code{bfd_arch_list}
-@strong{Synopsis}
-@example
-const char **bfd_arch_list (void);
-@end example
-@strong{Description}@*
-Return a freshly malloced NULL-terminated vector of the names
-of all the valid BFD architectures. Do not modify the names.
-
-@findex bfd_arch_get_compatible
-@subsubsection @code{bfd_arch_get_compatible}
-@strong{Synopsis}
-@example
-const bfd_arch_info_type *bfd_arch_get_compatible
- (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns);
-@end example
-@strong{Description}@*
-Determine whether two BFDs' architectures and machine types
-are compatible. Calculates the lowest common denominator
-between the two architectures and machine types implied by
-the BFDs and returns a pointer to an @code{arch_info} structure
-describing the compatible machine.
-
-@findex bfd_default_arch_struct
-@subsubsection @code{bfd_default_arch_struct}
-@strong{Description}@*
-The @code{bfd_default_arch_struct} is an item of
-@code{bfd_arch_info_type} which has been initialized to a fairly
-generic state. A BFD starts life by pointing to this
-structure, until the correct back end has determined the real
-architecture of the file.
-@example
-extern const bfd_arch_info_type bfd_default_arch_struct;
-@end example
-
-@findex bfd_set_arch_info
-@subsubsection @code{bfd_set_arch_info}
-@strong{Synopsis}
-@example
-void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg);
-@end example
-@strong{Description}@*
-Set the architecture info of @var{abfd} to @var{arg}.
-
-@findex bfd_default_set_arch_mach
-@subsubsection @code{bfd_default_set_arch_mach}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_default_set_arch_mach
- (bfd *abfd, enum bfd_architecture arch, unsigned long mach);
-@end example
-@strong{Description}@*
-Set the architecture and machine type in BFD @var{abfd}
-to @var{arch} and @var{mach}. Find the correct
-pointer to a structure and insert it into the @code{arch_info}
-pointer.
-
-@findex bfd_get_arch
-@subsubsection @code{bfd_get_arch}
-@strong{Synopsis}
-@example
-enum bfd_architecture bfd_get_arch (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the enumerated type which describes the BFD @var{abfd}'s
-architecture.
-
-@findex bfd_get_mach
-@subsubsection @code{bfd_get_mach}
-@strong{Synopsis}
-@example
-unsigned long bfd_get_mach (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the long type which describes the BFD @var{abfd}'s
-machine.
-
-@findex bfd_arch_bits_per_byte
-@subsubsection @code{bfd_arch_bits_per_byte}
-@strong{Synopsis}
-@example
-unsigned int bfd_arch_bits_per_byte (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the number of bits in one of the BFD @var{abfd}'s
-architecture's bytes.
-
-@findex bfd_arch_bits_per_address
-@subsubsection @code{bfd_arch_bits_per_address}
-@strong{Synopsis}
-@example
-unsigned int bfd_arch_bits_per_address (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the number of bits in one of the BFD @var{abfd}'s
-architecture's addresses.
-
-@findex bfd_default_compatible
-@subsubsection @code{bfd_default_compatible}
-@strong{Synopsis}
-@example
-const bfd_arch_info_type *bfd_default_compatible
- (const bfd_arch_info_type *a, const bfd_arch_info_type *b);
-@end example
-@strong{Description}@*
-The default function for testing for compatibility.
-
-@findex bfd_default_scan
-@subsubsection @code{bfd_default_scan}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_default_scan
- (const struct bfd_arch_info *info, const char *string);
-@end example
-@strong{Description}@*
-The default function for working out whether this is an
-architecture hit and a machine hit.
-
-@findex bfd_get_arch_info
-@subsubsection @code{bfd_get_arch_info}
-@strong{Synopsis}
-@example
-const bfd_arch_info_type *bfd_get_arch_info (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the architecture info struct in @var{abfd}.
-
-@findex bfd_lookup_arch
-@subsubsection @code{bfd_lookup_arch}
-@strong{Synopsis}
-@example
-const bfd_arch_info_type *bfd_lookup_arch
- (enum bfd_architecture arch, unsigned long machine);
-@end example
-@strong{Description}@*
-Look for the architecture info structure which matches the
-arguments @var{arch} and @var{machine}. A machine of 0 matches the
-machine/architecture structure which marks itself as the
-default.
-
-@findex bfd_printable_arch_mach
-@subsubsection @code{bfd_printable_arch_mach}
-@strong{Synopsis}
-@example
-const char *bfd_printable_arch_mach
- (enum bfd_architecture arch, unsigned long machine);
-@end example
-@strong{Description}@*
-Return a printable string representing the architecture and
-machine type.
-
-This routine is depreciated.
-
-@findex bfd_octets_per_byte
-@subsubsection @code{bfd_octets_per_byte}
-@strong{Synopsis}
-@example
-unsigned int bfd_octets_per_byte (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the number of octets (8-bit quantities) per target byte
-(minimum addressable unit). In most cases, this will be one, but some
-DSP targets have 16, 32, or even 48 bits per byte.
-
-@findex bfd_arch_mach_octets_per_byte
-@subsubsection @code{bfd_arch_mach_octets_per_byte}
-@strong{Synopsis}
-@example
-unsigned int bfd_arch_mach_octets_per_byte
- (enum bfd_architecture arch, unsigned long machine);
-@end example
-@strong{Description}@*
-See bfd_octets_per_byte.
-
-This routine is provided for those cases where a bfd * is not
-available
-
diff --git a/contrib/binutils/bfd/doc/bfd.texinfo b/contrib/binutils/bfd/doc/bfd.texinfo
index 432e052..04b4266 100644
--- a/contrib/binutils/bfd/doc/bfd.texinfo
+++ b/contrib/binutils/bfd/doc/bfd.texinfo
@@ -1,7 +1,7 @@
\input texinfo.tex
@setfilename bfd.info
@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000,
-@c 2001, 2002, 2003
+@c 2001, 2002, 2003, 2006, 2007
@c Free Software Foundation, Inc.
@c
@synindex fn cp
@@ -14,26 +14,29 @@ END-INFO-DIR-ENTRY
@end format
@end ifinfo
-@ifinfo
+@copying
This file documents the BFD library.
-Copyright (C) 1991, 2000, 2001, 2003 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 2000, 2001, 2003, 2006, 2007 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 the
+Invariant Sections being ``GNU General Public License'' and ``Funding
+Free Software'', the Front-Cover texts being (a) (see below), and with
+the Back-Cover Texts being (b) (see below). 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 copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
+(a) The FSF's Front-Cover Text is:
-@end ignore
-@end ifinfo
+ A GNU Manual
+
+(b) The FSF's Back-Cover Text is:
+
+ You have freedom to copy and modify this GNU Manual, like GNU
+ software. Copies published by the Free Software Foundation raise
+ funds for GNU development.
+@end copying
@iftex
@c@finalout
@setchapternewpage on
@@ -43,7 +46,7 @@ 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 % Since no product is stable berfore version 3.0 :-)
+@subtitle First Edition---BFD version < 3.0 % Since no product is stable before version 3.0 :-)
@subtitle Original Document Created: April 1991
@author {Steve Chamberlain}
@author {Cygnus Support}
@@ -62,7 +65,7 @@ notice identical to this one except for the removal of this paragraph
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 2001, 2003 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 2001, 2003, 2006 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
@@ -73,6 +76,7 @@ Copyright @copyright{} 1991, 2001, 2003 Free Software Foundation, Inc.
@end titlepage
@end iftex
+@contents
@node Top, Overview, (dir), (dir)
@ifinfo
@@ -84,7 +88,7 @@ This file documents the binary file descriptor library libbfd.
* BFD front end:: BFD front end
* BFD back ends:: BFD back ends
* GNU Free Documentation License:: GNU Free Documentation License
-* Index:: Index
+* BFD Index:: BFD Index
@end menu
@node Overview, BFD front end, Top, Top
@@ -144,7 +148,7 @@ To use the library, include @file{bfd.h} and link with @file{libbfd.a}.
BFD provides a common interface to the parts of an object file
for a calling application.
-When an application sucessfully opens a target file (object, archive, or
+When an application successfully opens a target file (object, archive, or
whatever), a pointer to an internal structure is returned. This pointer
points to a structure called @code{bfd}, described in
@file{bfd.h}. Our convention is to call this pointer a BFD, and
@@ -294,6 +298,7 @@ structures.
@end ignore
@end menu
@node What to Put Where, aout, BFD back ends, BFD back ends
+@section What to Put Where
All of BFD lives in one directory.
@node aout, coff, What to Put Where, BFD back ends
@@ -310,11 +315,11 @@ All of BFD lives in one directory.
@node mmo, , elf, BFD back ends
@include mmo.texi
-@node GNU Free Documentation License, Index, BFD back ends, Top
+@node GNU Free Documentation License, BFD Index, BFD back ends, Top
@include fdl.texi
-@node Index, , GNU Free Documentation License, Top
-@unnumbered Index
+@node BFD Index, , GNU Free Documentation License, Top
+@unnumbered BFD Index
@printindex cp
@tex
@@ -332,5 +337,4 @@ All of BFD lives in one directory.
% Blame: doc@cygnus.com, 28mar91.
@end tex
-@contents
@bye
diff --git a/contrib/binutils/bfd/doc/bfdint.texi b/contrib/binutils/bfd/doc/bfdint.texi
index 98826fd..b7e7c54 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, 2001, 2002, 2003, 2004
+@c 2000, 2001, 2002, 2003, 2004, 2006, 2007
@c Free Software Foundation, Inc.
@setfilename bfdint.info
@@ -13,6 +13,33 @@
@page
@end iftex
+@copying
+This file documents the internals of the BFD library.
+
+Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
+1996, 1998, 2000, 2001, 2002, 2003, 2004, 2006, 2007
+Free Software Foundation, Inc.
+Contributed by Cygnus Support.
+
+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 ``GNU General Public License'' and ``Funding
+Free Software'', the Front-Cover texts being (a) (see below), and with
+the Back-Cover Texts being (b) (see below). A copy of the license is
+included in the section entitled ``GNU Free Documentation License''.
+
+(a) The FSF's Front-Cover Text is:
+
+ A GNU Manual
+
+(b) The FSF's Back-Cover Text is:
+
+ You have freedom to copy and modify this GNU Manual, like GNU
+ software. Copies published by the Free Software Foundation raise
+ funds for GNU development.
+@end copying
+
@node Top
@top BFD Internals
@raisesections
@@ -189,7 +216,7 @@ and handle it using the special hooks.
In some cases there is also implicit information which BFD can not
represent. For example, the MIPS processor distinguishes small and
-large symbols, and requires that all small symbls be within 32K of the
+large symbols, and requires that all small symbols be within 32K of the
GP register. This means that the MIPS assembler must be able to mark
variables as either small or large, and the MIPS linker must know to put
small symbols within range of the GP register. Since BFD can not
@@ -230,7 +257,7 @@ Follow the GNU coding standards.
Avoid global variables. We ideally want BFD to be fully reentrant, so
that it can be used in multiple threads. All uses of global or static
variables interfere with that. Initialized constant variables are OK,
-and they should be explicitly marked with const. Instead of global
+and they should be explicitly marked with @samp{const}. Instead of global
variables, use data attached to a BFD or to a linker hash table.
@item
@@ -1391,7 +1418,7 @@ constants used by the generic support.
@subsection ELF sections and segments
The ELF ABI permits a file to have either sections or segments or both.
-Relocateable object files conventionally have only sections.
+Relocatable object files conventionally have only sections.
Executables conventionally have both. Core files conventionally have
only program segments.
@@ -1744,23 +1771,6 @@ support.
The processor function hooks and constants are ad hoc and need better
documentation.
-When a linker script uses @samp{SIZEOF_HEADERS}, the ELF backend must
-guess at the number of program segments which will be required, in
-@samp{get_program_header_size}. This is because the linker calls
-@samp{bfd_sizeof_headers} before it knows all the section addresses and
-sizes. The ELF backend may later discover, when creating program
-segments, that more program segments are required. This is currently
-reported as an error in @samp{assign_file_positions_for_segments}.
-
-In practice this makes it difficult to use @samp{SIZEOF_HEADERS} except
-with a carefully defined linker script. Unfortunately,
-@samp{SIZEOF_HEADERS} is required for fast program loading on a native
-system, since it permits the initial code section to appear on the same
-page as the program segments, saving a page read when the program starts
-running. Fortunately, native systems permit careful definition of the
-linker script. Still, ideally it would be possible to use relaxation to
-compute the number of program segments.
-
@node BFD glossary
@section BFD glossary
@cindex glossary for bfd
diff --git a/contrib/binutils/bfd/doc/bfdio.texi b/contrib/binutils/bfd/doc/bfdio.texi
deleted file mode 100644
index eb7e31d..0000000
--- a/contrib/binutils/bfd/doc/bfdio.texi
+++ /dev/null
@@ -1,72 +0,0 @@
-@findex struct bfd_iovec
-@subsubsection @code{struct bfd_iovec}
-@strong{Description}@*
-The @code{struct bfd_iovec} contains the internal file I/O class.
-Each @code{BFD} has an instance of this class and all file I/O is
-routed through it (it is assumed that the instance implements
-all methods listed below).
-@example
-struct bfd_iovec
-@{
- /* To avoid problems with macros, a "b" rather than "f"
- prefix is prepended to each method name. */
- /* Attempt to read/write NBYTES on ABFD's IOSTREAM storing/fetching
- bytes starting at PTR. Return the number of bytes actually
- transfered (a read past end-of-file returns less than NBYTES),
- or -1 (setting @code{bfd_error}) if an error occurs. */
- file_ptr (*bread) (struct bfd *abfd, void *ptr, file_ptr nbytes);
- file_ptr (*bwrite) (struct bfd *abfd, const void *ptr,
- file_ptr nbytes);
- /* Return the current IOSTREAM file offset, or -1 (setting @code{bfd_error}
- if an error occurs. */
- file_ptr (*btell) (struct bfd *abfd);
- /* For the following, on successful completion a value of 0 is returned.
- Otherwise, a value of -1 is returned (and @code{bfd_error} is set). */
- int (*bseek) (struct bfd *abfd, file_ptr offset, int whence);
- int (*bclose) (struct bfd *abfd);
- int (*bflush) (struct bfd *abfd);
- int (*bstat) (struct bfd *abfd, struct stat *sb);
-@};
-@end example
-
-@findex bfd_get_mtime
-@subsubsection @code{bfd_get_mtime}
-@strong{Synopsis}
-@example
-long bfd_get_mtime (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the file modification time (as read from the file system, or
-from the archive header for archive members).
-
-@findex bfd_get_size
-@subsubsection @code{bfd_get_size}
-@strong{Synopsis}
-@example
-long bfd_get_size (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the file size (as read from file system) for the file
-associated with BFD @var{abfd}.
-
-The initial motivation for, and use of, this routine is not
-so we can get the exact size of the object the BFD applies to, since
-that might not be generally possible (archive members for example).
-It would be ideal if someone could eventually modify
-it so that such results were guaranteed.
-
-Instead, we want to ask questions like "is this NNN byte sized
-object I'm about to try read from file offset YYY reasonable?"
-As as example of where we might do this, some object formats
-use string tables for which the first @code{sizeof (long)} bytes of the
-table contain the size of the table itself, including the size bytes.
-If an application tries to read what it thinks is one of these
-string tables, without some way to validate the size, and for
-some reason the size is wrong (byte swapping error, wrong location
-for the string table, etc.), the only clue is likely to be a read
-error when it tries to read the table, or a "virtual memory
-exhausted" error when it tries to allocate 15 bazillon bytes
-of space for the 15 bazillon byte table it is about to read.
-This function at least allows us to answer the question, "is the
-size reasonable?".
-
diff --git a/contrib/binutils/bfd/doc/bfdt.texi b/contrib/binutils/bfd/doc/bfdt.texi
deleted file mode 100644
index a22fe38..0000000
--- a/contrib/binutils/bfd/doc/bfdt.texi
+++ /dev/null
@@ -1,721 +0,0 @@
-@section @code{typedef bfd}
-A BFD has type @code{bfd}; objects of this type are the
-cornerstone of any application using BFD. Using BFD
-consists of making references though the BFD and to data in the BFD.
-
-Here is the structure that defines the type @code{bfd}. It
-contains the major data about the file and pointers
-to the rest of the data.
-
-
-@example
-
-struct bfd
-@{
- /* A unique identifier of the BFD */
- unsigned int id;
-
- /* The filename the application opened the BFD with. */
- const char *filename;
-
- /* A pointer to the target jump table. */
- const struct bfd_target *xvec;
-
- /* The IOSTREAM, and corresponding IO vector that provide access
- to the file backing the BFD. */
- void *iostream;
- const struct bfd_iovec *iovec;
-
- /* Is the file descriptor being cached? That is, can it be closed as
- needed, and re-opened when accessed later? */
- bfd_boolean cacheable;
-
- /* Marks whether there was a default target specified when the
- BFD was opened. This is used to select which matching algorithm
- to use to choose the back end. */
- bfd_boolean target_defaulted;
-
- /* The caching routines use these to maintain a
- least-recently-used list of BFDs. */
- struct bfd *lru_prev, *lru_next;
-
- /* When a file is closed by the caching routines, BFD retains
- state information on the file here... */
- ufile_ptr where;
-
- /* ... and here: (``once'' means at least once). */
- bfd_boolean opened_once;
-
- /* Set if we have a locally maintained mtime value, rather than
- getting it from the file each time. */
- bfd_boolean mtime_set;
-
- /* File modified time, if mtime_set is TRUE. */
- long mtime;
-
- /* Reserved for an unimplemented file locking extension. */
- int ifd;
-
- /* The format which belongs to the BFD. (object, core, etc.) */
- bfd_format format;
-
- /* The direction with which the BFD was opened. */
- enum bfd_direction
- @{
- no_direction = 0,
- read_direction = 1,
- write_direction = 2,
- both_direction = 3
- @}
- direction;
-
- /* Format_specific flags. */
- flagword flags;
-
- /* Currently my_archive is tested before adding origin to
- anything. I believe that this can become always an add of
- origin, with origin set to 0 for non archive files. */
- ufile_ptr origin;
-
- /* Remember when output has begun, to stop strange things
- from happening. */
- bfd_boolean output_has_begun;
-
- /* A hash table for section names. */
- struct bfd_hash_table section_htab;
-
- /* Pointer to linked list of sections. */
- struct bfd_section *sections;
-
- /* The last section on the section list. */
- struct bfd_section *section_last;
-
- /* The number of sections. */
- unsigned int section_count;
-
- /* Stuff only useful for object files:
- The start address. */
- bfd_vma start_address;
-
- /* Used for input and output. */
- unsigned int symcount;
-
- /* Symbol table for output BFD (with symcount entries). */
- struct bfd_symbol **outsymbols;
-
- /* Used for slurped dynamic symbol tables. */
- unsigned int dynsymcount;
-
- /* Pointer to structure which contains architecture information. */
- const struct bfd_arch_info *arch_info;
-
- /* Flag set if symbols from this BFD should not be exported. */
- bfd_boolean no_export;
-
- /* Stuff only useful for archives. */
- void *arelt_data;
- struct bfd *my_archive; /* The containing archive BFD. */
- struct bfd *next; /* The next BFD in the archive. */
- struct bfd *archive_head; /* The first BFD in the archive. */
- bfd_boolean has_armap;
-
- /* A chain of BFD structures involved in a link. */
- struct bfd *link_next;
-
- /* A field used by _bfd_generic_link_add_archive_symbols. This will
- be used only for archive elements. */
- int archive_pass;
-
- /* Used by the back end to hold private data. */
- union
- @{
- struct aout_data_struct *aout_data;
- struct artdata *aout_ar_data;
- struct _oasys_data *oasys_obj_data;
- struct _oasys_ar_data *oasys_ar_data;
- struct coff_tdata *coff_obj_data;
- struct pe_tdata *pe_obj_data;
- struct xcoff_tdata *xcoff_obj_data;
- struct ecoff_tdata *ecoff_obj_data;
- struct ieee_data_struct *ieee_data;
- struct ieee_ar_data_struct *ieee_ar_data;
- struct srec_data_struct *srec_data;
- struct ihex_data_struct *ihex_data;
- struct tekhex_data_struct *tekhex_data;
- 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;
- struct som_data_struct *som_data;
- struct hpux_core_struct *hpux_core_data;
- struct hppabsd_core_struct *hppabsd_core_data;
- struct sgi_core_struct *sgi_core_data;
- struct lynx_core_struct *lynx_core_data;
- struct osf_core_struct *osf_core_data;
- struct cisco_core_struct *cisco_core_data;
- struct versados_data_struct *versados_data;
- struct netbsd_core_struct *netbsd_core_data;
- struct mach_o_data_struct *mach_o_data;
- struct mach_o_fat_data_struct *mach_o_fat_data;
- struct bfd_pef_data_struct *pef_data;
- struct bfd_pef_xlib_data_struct *pef_xlib_data;
- struct bfd_sym_data_struct *sym_data;
- void *any;
- @}
- tdata;
-
- /* Used by the application to hold private data. */
- void *usrdata;
-
- /* Where all the allocated stuff under this BFD goes. This is a
- struct objalloc *, but we use void * to avoid requiring the inclusion
- of objalloc.h. */
- void *memory;
-@};
-
-@end example
-@section Error reporting
-Most BFD functions return nonzero on success (check their
-individual documentation for precise semantics). On an error,
-they call @code{bfd_set_error} to set an error condition that callers
-can check by calling @code{bfd_get_error}.
-If that returns @code{bfd_error_system_call}, then check
-@code{errno}.
-
-The easiest way to report a BFD error to the user is to
-use @code{bfd_perror}.
-
-@subsection Type @code{bfd_error_type}
-The values returned by @code{bfd_get_error} are defined by the
-enumerated type @code{bfd_error_type}.
-
-
-@example
-
-typedef enum bfd_error
-@{
- bfd_error_no_error = 0,
- 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,
- bfd_error_no_armap,
- bfd_error_no_more_archived_files,
- bfd_error_malformed_archive,
- bfd_error_file_not_recognized,
- bfd_error_file_ambiguously_recognized,
- bfd_error_no_contents,
- bfd_error_nonrepresentable_section,
- bfd_error_no_debug_section,
- bfd_error_bad_value,
- bfd_error_file_truncated,
- bfd_error_file_too_big,
- bfd_error_invalid_error_code
-@}
-bfd_error_type;
-
-@end example
-@findex bfd_get_error
-@subsubsection @code{bfd_get_error}
-@strong{Synopsis}
-@example
-bfd_error_type bfd_get_error (void);
-@end example
-@strong{Description}@*
-Return the current BFD error condition.
-
-@findex bfd_set_error
-@subsubsection @code{bfd_set_error}
-@strong{Synopsis}
-@example
-void bfd_set_error (bfd_error_type error_tag);
-@end example
-@strong{Description}@*
-Set the BFD error condition to be @var{error_tag}.
-
-@findex bfd_errmsg
-@subsubsection @code{bfd_errmsg}
-@strong{Synopsis}
-@example
-const char *bfd_errmsg (bfd_error_type error_tag);
-@end example
-@strong{Description}@*
-Return a string describing the error @var{error_tag}, or
-the system error if @var{error_tag} is @code{bfd_error_system_call}.
-
-@findex bfd_perror
-@subsubsection @code{bfd_perror}
-@strong{Synopsis}
-@example
-void bfd_perror (const char *message);
-@end example
-@strong{Description}@*
-Print to the standard error stream a string describing the
-last BFD error that occurred, or the last system error if
-the last BFD error was a system call failure. If @var{message}
-is non-NULL and non-empty, the error string printed is preceded
-by @var{message}, a colon, and a space. It is followed by a newline.
-
-@subsection BFD error handler
-Some BFD functions want to print messages describing the
-problem. They call a BFD error handler function. This
-function may be overridden by the program.
-
-The BFD error handler acts like printf.
-
-
-@example
-
-typedef void (*bfd_error_handler_type) (const char *, ...);
-
-@end example
-@findex bfd_set_error_handler
-@subsubsection @code{bfd_set_error_handler}
-@strong{Synopsis}
-@example
-bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
-@end example
-@strong{Description}@*
-Set the BFD error handler function. Returns the previous
-function.
-
-@findex bfd_set_error_program_name
-@subsubsection @code{bfd_set_error_program_name}
-@strong{Synopsis}
-@example
-void bfd_set_error_program_name (const char *);
-@end example
-@strong{Description}@*
-Set the program name to use when printing a BFD error. This
-is printed before the error message followed by a colon and
-space. The string must not be changed after it is passed to
-this function.
-
-@findex bfd_get_error_handler
-@subsubsection @code{bfd_get_error_handler}
-@strong{Synopsis}
-@example
-bfd_error_handler_type bfd_get_error_handler (void);
-@end example
-@strong{Description}@*
-Return the BFD error handler function.
-
-@section Miscellaneous
-
-
-@subsection Miscellaneous functions
-
-
-@findex bfd_get_reloc_upper_bound
-@subsubsection @code{bfd_get_reloc_upper_bound}
-@strong{Synopsis}
-@example
-long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
-@end example
-@strong{Description}@*
-Return the number of bytes required to store the
-relocation information associated with section @var{sect}
-attached to bfd @var{abfd}. If an error occurs, return -1.
-
-@findex bfd_canonicalize_reloc
-@subsubsection @code{bfd_canonicalize_reloc}
-@strong{Synopsis}
-@example
-long bfd_canonicalize_reloc
- (bfd *abfd, asection *sec, arelent **loc, asymbol **syms);
-@end example
-@strong{Description}@*
-Call the back end associated with the open BFD
-@var{abfd} and translate the external form of the relocation
-information attached to @var{sec} into the internal canonical
-form. Place the table into memory at @var{loc}, which has
-been preallocated, usually by a call to
-@code{bfd_get_reloc_upper_bound}. Returns the number of relocs, or
--1 on error.
-
-The @var{syms} table is also needed for horrible internal magic
-reasons.
-
-@findex bfd_set_reloc
-@subsubsection @code{bfd_set_reloc}
-@strong{Synopsis}
-@example
-void bfd_set_reloc
- (bfd *abfd, asection *sec, arelent **rel, unsigned int count);
-@end example
-@strong{Description}@*
-Set the relocation pointer and count within
-section @var{sec} to the values @var{rel} and @var{count}.
-The argument @var{abfd} is ignored.
-
-@findex bfd_set_file_flags
-@subsubsection @code{bfd_set_file_flags}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags);
-@end example
-@strong{Description}@*
-Set the flag word in the BFD @var{abfd} to the value @var{flags}.
-
-Possible errors are:
-@itemize @bullet
-
-@item
-@code{bfd_error_wrong_format} - The target bfd was not of object format.
-@item
-@code{bfd_error_invalid_operation} - The target bfd was open for reading.
-@item
-@code{bfd_error_invalid_operation} -
-The flag word contained a bit which was not applicable to the
-type of file. E.g., an attempt was made to set the @code{D_PAGED} bit
-on a BFD format which does not support demand paging.
-@end itemize
-
-@findex bfd_get_arch_size
-@subsubsection @code{bfd_get_arch_size}
-@strong{Synopsis}
-@example
-int bfd_get_arch_size (bfd *abfd);
-@end example
-@strong{Description}@*
-Returns the architecture address size, in bits, as determined
-by the object file's format. For ELF, this information is
-included in the header.
-
-@strong{Returns}@*
-Returns the arch size in bits if known, @code{-1} otherwise.
-
-@findex bfd_get_sign_extend_vma
-@subsubsection @code{bfd_get_sign_extend_vma}
-@strong{Synopsis}
-@example
-int bfd_get_sign_extend_vma (bfd *abfd);
-@end example
-@strong{Description}@*
-Indicates if the target architecture "naturally" sign extends
-an address. Some architectures implicitly sign extend address
-values when they are converted to types larger than the size
-of an address. For instance, bfd_get_start_address() will
-return an address sign extended to fill a bfd_vma when this is
-the case.
-
-@strong{Returns}@*
-Returns @code{1} if the target architecture is known to sign
-extend addresses, @code{0} if the target architecture is known to
-not sign extend addresses, and @code{-1} otherwise.
-
-@findex bfd_set_start_address
-@subsubsection @code{bfd_set_start_address}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma);
-@end example
-@strong{Description}@*
-Make @var{vma} the entry point of output BFD @var{abfd}.
-
-@strong{Returns}@*
-Returns @code{TRUE} on success, @code{FALSE} otherwise.
-
-@findex bfd_get_gp_size
-@subsubsection @code{bfd_get_gp_size}
-@strong{Synopsis}
-@example
-unsigned int bfd_get_gp_size (bfd *abfd);
-@end example
-@strong{Description}@*
-Return the maximum size of objects to be optimized using the GP
-register under MIPS ECOFF. This is typically set by the @code{-G}
-argument to the compiler, assembler or linker.
-
-@findex bfd_set_gp_size
-@subsubsection @code{bfd_set_gp_size}
-@strong{Synopsis}
-@example
-void bfd_set_gp_size (bfd *abfd, unsigned int i);
-@end example
-@strong{Description}@*
-Set the maximum size of objects to be optimized using the GP
-register under ECOFF or MIPS ELF. This is typically set by
-the @code{-G} argument to the compiler, assembler or linker.
-
-@findex bfd_scan_vma
-@subsubsection @code{bfd_scan_vma}
-@strong{Synopsis}
-@example
-bfd_vma bfd_scan_vma (const char *string, const char **end, int base);
-@end example
-@strong{Description}@*
-Convert, like @code{strtoul}, a numerical expression
-@var{string} into a @code{bfd_vma} integer, and return that integer.
-(Though without as many bells and whistles as @code{strtoul}.)
-The expression is assumed to be unsigned (i.e., positive).
-If given a @var{base}, it is used as the base for conversion.
-A base of 0 causes the function to interpret the string
-in hex if a leading "0x" or "0X" is found, otherwise
-in octal if a leading zero is found, otherwise in decimal.
-
-If the value would overflow, the maximum @code{bfd_vma} value is
-returned.
-
-@findex bfd_copy_private_header_data
-@subsubsection @code{bfd_copy_private_header_data}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd);
-@end example
-@strong{Description}@*
-Copy private BFD header information from the BFD @var{ibfd} to the
-the BFD @var{obfd}. This copies information that may require
-sections to exist, but does not require symbol tables. Return
-@code{true} on success, @code{false} on error.
-Possible error returns are:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_no_memory} -
-Not enough memory exists to create private data for @var{obfd}.
-@end itemize
-@example
-#define bfd_copy_private_header_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_header_data, \
- (ibfd, obfd))
-@end example
-
-@findex bfd_copy_private_bfd_data
-@subsubsection @code{bfd_copy_private_bfd_data}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd);
-@end example
-@strong{Description}@*
-Copy private BFD information from the BFD @var{ibfd} to the
-the BFD @var{obfd}. Return @code{TRUE} on success, @code{FALSE} on error.
-Possible error returns are:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_no_memory} -
-Not enough memory exists to create private data for @var{obfd}.
-@end itemize
-@example
-#define bfd_copy_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
- (ibfd, obfd))
-@end example
-
-@findex bfd_merge_private_bfd_data
-@subsubsection @code{bfd_merge_private_bfd_data}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_merge_private_bfd_data (bfd *ibfd, bfd *obfd);
-@end example
-@strong{Description}@*
-Merge private BFD information from the BFD @var{ibfd} to the
-the output file BFD @var{obfd} when linking. Return @code{TRUE}
-on success, @code{FALSE} on error. Possible error returns are:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_no_memory} -
-Not enough memory exists to create private data for @var{obfd}.
-@end itemize
-@example
-#define bfd_merge_private_bfd_data(ibfd, obfd) \
- BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
- (ibfd, obfd))
-@end example
-
-@findex bfd_set_private_flags
-@subsubsection @code{bfd_set_private_flags}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags);
-@end example
-@strong{Description}@*
-Set private BFD flag information in the BFD @var{abfd}.
-Return @code{TRUE} on success, @code{FALSE} on error. Possible error
-returns are:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_no_memory} -
-Not enough memory exists to create private data for @var{obfd}.
-@end itemize
-@example
-#define bfd_set_private_flags(abfd, flags) \
- BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags))
-@end example
-
-@findex Other functions
-@subsubsection @code{Other functions}
-@strong{Description}@*
-The following functions exist but have not yet been documented.
-@example
-#define bfd_sizeof_headers(abfd, reloc) \
- BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
-
-#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
- BFD_SEND (abfd, _bfd_find_nearest_line, \
- (abfd, sec, syms, off, file, func, line))
-
-#define bfd_find_line(abfd, syms, sym, file, line) \
- BFD_SEND (abfd, _bfd_find_line, \
- (abfd, syms, sym, file, line))
-
-#define bfd_find_inliner_info(abfd, file, func, line) \
- BFD_SEND (abfd, _bfd_find_inliner_info, \
- (abfd, file, func, line))
-
-#define bfd_debug_info_start(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
-
-#define bfd_debug_info_end(abfd) \
- BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
-
-#define bfd_debug_info_accumulate(abfd, section) \
- BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
-
-#define bfd_stat_arch_elt(abfd, stat) \
- BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
-
-#define bfd_update_armap_timestamp(abfd) \
- BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
-
-#define bfd_set_arch_mach(abfd, arch, mach)\
- BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
-
-#define bfd_relax_section(abfd, section, link_info, again) \
- BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
-
-#define bfd_gc_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
-
-#define bfd_merge_sections(abfd, link_info) \
- BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
-
-#define bfd_is_group_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_is_group_section, (abfd, sec))
-
-#define bfd_discard_group(abfd, sec) \
- BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
-
-#define bfd_link_hash_table_create(abfd) \
- BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
-
-#define bfd_link_hash_table_free(abfd, hash) \
- BFD_SEND (abfd, _bfd_link_hash_table_free, (hash))
-
-#define bfd_link_add_symbols(abfd, info) \
- BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-
-#define bfd_link_just_syms(abfd, sec, info) \
- BFD_SEND (abfd, _bfd_link_just_syms, (sec, info))
-
-#define bfd_final_link(abfd, info) \
- BFD_SEND (abfd, _bfd_final_link, (abfd, info))
-
-#define bfd_free_cached_info(abfd) \
- BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
-
-#define bfd_get_dynamic_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
-
-#define bfd_print_private_bfd_data(abfd, file)\
- BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
-
-#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
-
-#define bfd_get_synthetic_symtab(abfd, count, syms, dyncount, dynsyms, ret) \
- BFD_SEND (abfd, _bfd_get_synthetic_symtab, (abfd, count, syms, \
- dyncount, dynsyms, ret))
-
-#define bfd_get_dynamic_reloc_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
-
-#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
- BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
-
-extern bfd_byte *bfd_get_relocated_section_contents
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *,
- bfd_boolean, asymbol **);
-
-@end example
-
-@findex bfd_alt_mach_code
-@subsubsection @code{bfd_alt_mach_code}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative);
-@end example
-@strong{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 (alternative == 0) and any others. Currently,
-only ELF supports this feature, with up to two alternate
-machine codes.
-
-
-@example
-struct bfd_preserve
-@{
- void *marker;
- void *tdata;
- flagword flags;
- const struct bfd_arch_info *arch_info;
- struct bfd_section *sections;
- struct bfd_section *section_last;
- unsigned int section_count;
- struct bfd_hash_table section_htab;
-@};
-
-@end example
-@findex bfd_preserve_save
-@subsubsection @code{bfd_preserve_save}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_preserve_save (bfd *, struct bfd_preserve *);
-@end example
-@strong{Description}@*
-When testing an object for compatibility with a particular
-target back-end, the back-end object_p function needs to set
-up certain fields in the bfd on successfully recognizing the
-object. This typically happens in a piecemeal fashion, with
-failures possible at many points. On failure, the bfd is
-supposed to be restored to its initial state, which is
-virtually impossible. However, restoring a subset of the bfd
-state works in practice. This function stores the subset and
-reinitializes the bfd.
-
-@findex bfd_preserve_restore
-@subsubsection @code{bfd_preserve_restore}
-@strong{Synopsis}
-@example
-void bfd_preserve_restore (bfd *, struct bfd_preserve *);
-@end example
-@strong{Description}@*
-This function restores bfd state saved by bfd_preserve_save.
-If MARKER is non-NULL in struct bfd_preserve then that block
-and all subsequently bfd_alloc'd memory is freed.
-
-@findex bfd_preserve_finish
-@subsubsection @code{bfd_preserve_finish}
-@strong{Synopsis}
-@example
-void bfd_preserve_finish (bfd *, struct bfd_preserve *);
-@end example
-@strong{Description}@*
-This function should be called when the bfd state saved by
-bfd_preserve_save is no longer needed. ie. when the back-end
-object_p function returns with success.
-
diff --git a/contrib/binutils/bfd/doc/bfdwin.texi b/contrib/binutils/bfd/doc/bfdwin.texi
deleted file mode 100644
index b1fd7d5..0000000
--- a/contrib/binutils/bfd/doc/bfdwin.texi
+++ /dev/null
@@ -1,2 +0,0 @@
-@findex
-@subsubsection @code{}
diff --git a/contrib/binutils/bfd/doc/cache.texi b/contrib/binutils/bfd/doc/cache.texi
deleted file mode 100644
index 5820a2a..0000000
--- a/contrib/binutils/bfd/doc/cache.texi
+++ /dev/null
@@ -1,65 +0,0 @@
-@section File caching
-The file caching mechanism is embedded within BFD and allows
-the application to open as many BFDs as it wants without
-regard to the underlying operating system's file descriptor
-limit (often as low as 20 open files). The module in
-@code{cache.c} maintains a least recently used list of
-@code{BFD_CACHE_MAX_OPEN} files, and exports the name
-@code{bfd_cache_lookup}, which runs around and makes sure that
-the required BFD is open. If not, then it chooses a file to
-close, closes it and opens the one wanted, returning its file
-handle.
-
-@subsection Caching functions
-
-
-@findex bfd_cache_init
-@subsubsection @code{bfd_cache_init}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_cache_init (bfd *abfd);
-@end example
-@strong{Description}@*
-Add a newly opened BFD to the cache.
-
-@findex bfd_cache_close
-@subsubsection @code{bfd_cache_close}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_cache_close (bfd *abfd);
-@end example
-@strong{Description}@*
-Remove the BFD @var{abfd} from the cache. If the attached file is open,
-then close it too.
-
-@strong{Returns}@*
-@code{FALSE} is returned if closing the file fails, @code{TRUE} is
-returned if all is well.
-
-@findex bfd_cache_close_all
-@subsubsection @code{bfd_cache_close_all}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_cache_close_all (void);
-@end example
-@strong{Description}@*
-Remove all BFDs from the cache. If the attached file is open,
-then close it too.
-
-@strong{Returns}@*
-@code{FALSE} is returned if closing one of the file fails, @code{TRUE} is
-returned if all is well.
-
-@findex bfd_open_file
-@subsubsection @code{bfd_open_file}
-@strong{Synopsis}
-@example
-FILE* bfd_open_file (bfd *abfd);
-@end example
-@strong{Description}@*
-Call the OS to open a file for @var{abfd}. Return the @code{FILE *}
-(possibly @code{NULL}) that results from this operation. Set up the
-BFD so that future accesses know the file is open. If the @code{FILE *}
-returned is @code{NULL}, then it won't have been put in the
-cache, so it won't have to be removed from it.
-
diff --git a/contrib/binutils/bfd/doc/coffcode.texi b/contrib/binutils/bfd/doc/coffcode.texi
deleted file mode 100644
index 6689009..0000000
--- a/contrib/binutils/bfd/doc/coffcode.texi
+++ /dev/null
@@ -1,608 +0,0 @@
-@section coff backends
-BFD supports a number of different flavours of coff format.
-The major differences between formats are the sizes and
-alignments of fields in structures on disk, and the occasional
-extra field.
-
-Coff in all its varieties is implemented with a few common
-files and a number of implementation specific files. For
-example, The 88k bcs coff format is implemented in the file
-@file{coff-m88k.c}. This file @code{#include}s
-@file{coff/m88k.h} which defines the external structure of the
-coff format for the 88k, and @file{coff/internal.h} which
-defines the internal structure. @file{coff-m88k.c} also
-defines the relocations used by the 88k format
-@xref{Relocations}.
-
-The Intel i960 processor version of coff is implemented in
-@file{coff-i960.c}. This file has the same structure as
-@file{coff-m88k.c}, except that it includes @file{coff/i960.h}
-rather than @file{coff-m88k.h}.
-
-@subsection Porting to a new version of coff
-The recommended method is to select from the existing
-implementations the version of coff which is most like the one
-you want to use. For example, we'll say that i386 coff is
-the one you select, and that your coff flavour is called foo.
-Copy @file{i386coff.c} to @file{foocoff.c}, copy
-@file{../include/coff/i386.h} to @file{../include/coff/foo.h},
-and add the lines to @file{targets.c} and @file{Makefile.in}
-so that your new back end is used. Alter the shapes of the
-structures in @file{../include/coff/foo.h} so that they match
-what you need. You will probably also have to add
-@code{#ifdef}s to the code in @file{coff/internal.h} and
-@file{coffcode.h} if your version of coff is too wild.
-
-You can verify that your new BFD backend works quite simply by
-building @file{objdump} from the @file{binutils} directory,
-and making sure that its version of what's going on and your
-host system's idea (assuming it has the pretty standard coff
-dump utility, usually called @code{att-dump} or just
-@code{dump}) are the same. Then clean up your code, and send
-what you've done to Cygnus. Then your stuff will be in the
-next release, and you won't have to keep integrating it.
-
-@subsection How the coff backend works
-
-
-@subsubsection File layout
-The Coff backend is split into generic routines that are
-applicable to any Coff target and routines that are specific
-to a particular target. The target-specific routines are
-further split into ones which are basically the same for all
-Coff targets except that they use the external symbol format
-or use different values for certain constants.
-
-The generic routines are in @file{coffgen.c}. These routines
-work for any Coff target. They use some hooks into the target
-specific code; the hooks are in a @code{bfd_coff_backend_data}
-structure, one of which exists for each target.
-
-The essentially similar target-specific routines are in
-@file{coffcode.h}. This header file includes executable C code.
-The various Coff targets first include the appropriate Coff
-header file, make any special defines that are needed, and
-then include @file{coffcode.h}.
-
-Some of the Coff targets then also have additional routines in
-the target source file itself.
-
-For example, @file{coff-i960.c} includes
-@file{coff/internal.h} and @file{coff/i960.h}. It then
-defines a few constants, such as @code{I960}, and includes
-@file{coffcode.h}. Since the i960 has complex relocation
-types, @file{coff-i960.c} also includes some code to
-manipulate the i960 relocs. This code is not in
-@file{coffcode.h} because it would not be used by any other
-target.
-
-@subsubsection Bit twiddling
-Each flavour of coff supported in BFD has its own header file
-describing the external layout of the structures. There is also
-an internal description of the coff layout, in
-@file{coff/internal.h}. A major function of the
-coff backend is swapping the bytes and twiddling the bits to
-translate the external form of the structures into the normal
-internal form. This is all performed in the
-@code{bfd_swap}_@i{thing}_@i{direction} routines. Some
-elements are different sizes between different versions of
-coff; it is the duty of the coff version specific include file
-to override the definitions of various packing routines in
-@file{coffcode.h}. E.g., the size of line number entry in coff is
-sometimes 16 bits, and sometimes 32 bits. @code{#define}ing
-@code{PUT_LNSZ_LNNO} and @code{GET_LNSZ_LNNO} will select the
-correct one. No doubt, some day someone will find a version of
-coff which has a varying field size not catered to at the
-moment. To port BFD, that person will have to add more @code{#defines}.
-Three of the bit twiddling routines are exported to
-@code{gdb}; @code{coff_swap_aux_in}, @code{coff_swap_sym_in}
-and @code{coff_swap_lineno_in}. @code{GDB} reads the symbol
-table on its own, but uses BFD to fix things up. More of the
-bit twiddlers are exported for @code{gas};
-@code{coff_swap_aux_out}, @code{coff_swap_sym_out},
-@code{coff_swap_lineno_out}, @code{coff_swap_reloc_out},
-@code{coff_swap_filehdr_out}, @code{coff_swap_aouthdr_out},
-@code{coff_swap_scnhdr_out}. @code{Gas} currently keeps track
-of all the symbol table and reloc drudgery itself, thereby
-saving the internal BFD overhead, but uses BFD to swap things
-on the way out, making cross ports much safer. Doing so also
-allows BFD (and thus the linker) to use the same header files
-as @code{gas}, which makes one avenue to disaster disappear.
-
-@subsubsection Symbol reading
-The simple canonical form for symbols used by BFD is not rich
-enough to keep all the information available in a coff symbol
-table. The back end gets around this problem by keeping the original
-symbol table around, "behind the scenes".
-
-When a symbol table is requested (through a call to
-@code{bfd_canonicalize_symtab}), a request gets through to
-@code{coff_get_normalized_symtab}. This reads the symbol table from
-the coff file and swaps all the structures inside into the
-internal form. It also fixes up all the pointers in the table
-(represented in the file by offsets from the first symbol in
-the table) into physical pointers to elements in the new
-internal table. This involves some work since the meanings of
-fields change depending upon context: a field that is a
-pointer to another structure in the symbol table at one moment
-may be the size in bytes of a structure at the next. Another
-pass is made over the table. All symbols which mark file names
-(@code{C_FILE} symbols) are modified so that the internal
-string points to the value in the auxent (the real filename)
-rather than the normal text associated with the symbol
-(@code{".file"}).
-
-At this time the symbol names are moved around. Coff stores
-all symbols less than nine characters long physically
-within the symbol table; longer strings are kept at the end of
-the file in the string table. This pass moves all strings
-into memory and replaces them with pointers to the strings.
-
-The symbol table is massaged once again, this time to create
-the canonical table used by the BFD application. Each symbol
-is inspected in turn, and a decision made (using the
-@code{sclass} field) about the various flags to set in the
-@code{asymbol}. @xref{Symbols}. The generated canonical table
-shares strings with the hidden internal symbol table.
-
-Any linenumbers are read from the coff file too, and attached
-to the symbols which own the functions the linenumbers belong to.
-
-@subsubsection Symbol writing
-Writing a symbol to a coff file which didn't come from a coff
-file will lose any debugging information. The @code{asymbol}
-structure remembers the BFD from which the symbol was taken, and on
-output the back end makes sure that the same destination target as
-source target is present.
-
-When the symbols have come from a coff file then all the
-debugging information is preserved.
-
-Symbol tables are provided for writing to the back end in a
-vector of pointers to pointers. This allows applications like
-the linker to accumulate and output large symbol tables
-without having to do too much byte copying.
-
-This function runs through the provided symbol table and
-patches each symbol marked as a file place holder
-(@code{C_FILE}) to point to the next file place holder in the
-list. It also marks each @code{offset} field in the list with
-the offset from the first symbol of the current symbol.
-
-Another function of this procedure is to turn the canonical
-value form of BFD into the form used by coff. Internally, BFD
-expects symbol values to be offsets from a section base; so a
-symbol physically at 0x120, but in a section starting at
-0x100, would have the value 0x20. Coff expects symbols to
-contain their final value, so symbols have their values
-changed at this point to reflect their sum with their owning
-section. This transformation uses the
-@code{output_section} field of the @code{asymbol}'s
-@code{asection} @xref{Sections}.
-
-@itemize @bullet
-
-@item
-@code{coff_mangle_symbols}
-@end itemize
-This routine runs though the provided symbol table and uses
-the offsets generated by the previous pass and the pointers
-generated when the symbol table was read in to create the
-structured hierarchy required by coff. It changes each pointer
-to a symbol into the index into the symbol table of the asymbol.
-
-@itemize @bullet
-
-@item
-@code{coff_write_symbols}
-@end itemize
-This routine runs through the symbol table and patches up the
-symbols from their internal form into the coff way, calls the
-bit twiddlers, and writes out the table to the file.
-
-@findex coff_symbol_type
-@subsubsection @code{coff_symbol_type}
-@strong{Description}@*
-The hidden information for an @code{asymbol} is described in a
-@code{combined_entry_type}:
-
-
-@example
-
-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;
-@} combined_entry_type;
-
-
-/* Each canonical asymbol really looks like this: */
-
-typedef struct coff_symbol_struct
-@{
- /* 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 linenumber information for this symbol */
- struct lineno_cache_entry *lineno;
-
- /* Have the line numbers been relocated yet ? */
- bfd_boolean done_lineno;
-@} coff_symbol_type;
-@end example
-@findex bfd_coff_backend_data
-@subsubsection @code{bfd_coff_backend_data}
-
-@example
-/* COFF symbol classifications. */
-
-enum coff_symbol_classification
-@{
- /* Global symbol. */
- COFF_SYMBOL_GLOBAL,
- /* Common symbol. */
- COFF_SYMBOL_COMMON,
- /* Undefined symbol. */
- COFF_SYMBOL_UNDEFINED,
- /* Local symbol. */
- COFF_SYMBOL_LOCAL,
- /* PE section symbol. */
- COFF_SYMBOL_PE_SECTION
-@};
-
-@end example
-Special entry points for gdb to swap in coff symbol table parts:
-@example
-typedef struct
-@{
- void (*_bfd_coff_swap_aux_in)
- (bfd *, void *, int, int, int, int, void *);
-
- void (*_bfd_coff_swap_sym_in)
- (bfd *, void *, void *);
-
- void (*_bfd_coff_swap_lineno_in)
- (bfd *, void *, void *);
-
- unsigned int (*_bfd_coff_swap_aux_out)
- (bfd *, void *, int, int, int, int, void *);
-
- unsigned int (*_bfd_coff_swap_sym_out)
- (bfd *, void *, void *);
-
- unsigned int (*_bfd_coff_swap_lineno_out)
- (bfd *, void *, void *);
-
- unsigned int (*_bfd_coff_swap_reloc_out)
- (bfd *, void *, void *);
-
- unsigned int (*_bfd_coff_swap_filehdr_out)
- (bfd *, void *, void *);
-
- unsigned int (*_bfd_coff_swap_aouthdr_out)
- (bfd *, void *, void *);
-
- unsigned int (*_bfd_coff_swap_scnhdr_out)
- (bfd *, void *, void *);
-
- 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;
- bfd_boolean _bfd_coff_long_filenames;
- bfd_boolean _bfd_coff_long_section_names;
- unsigned int _bfd_coff_default_section_alignment_power;
- bfd_boolean _bfd_coff_force_symnames_in_strings;
- unsigned int _bfd_coff_debug_string_prefix_length;
-
- void (*_bfd_coff_swap_filehdr_in)
- (bfd *, void *, void *);
-
- void (*_bfd_coff_swap_aouthdr_in)
- (bfd *, void *, void *);
-
- void (*_bfd_coff_swap_scnhdr_in)
- (bfd *, void *, void *);
-
- void (*_bfd_coff_swap_reloc_in)
- (bfd *abfd, void *, void *);
-
- bfd_boolean (*_bfd_coff_bad_format_hook)
- (bfd *, void *);
-
- bfd_boolean (*_bfd_coff_set_arch_mach_hook)
- (bfd *, void *);
-
- void * (*_bfd_coff_mkobject_hook)
- (bfd *, void *, void *);
-
- bfd_boolean (*_bfd_styp_to_sec_flags_hook)
- (bfd *, void *, const char *, asection *, flagword *);
-
- void (*_bfd_set_alignment_hook)
- (bfd *, asection *, void *);
-
- bfd_boolean (*_bfd_coff_slurp_symbol_table)
- (bfd *);
-
- bfd_boolean (*_bfd_coff_symname_in_debug)
- (bfd *, struct internal_syment *);
-
- bfd_boolean (*_bfd_coff_pointerize_aux_hook)
- (bfd *, combined_entry_type *, combined_entry_type *,
- unsigned int, combined_entry_type *);
-
- bfd_boolean (*_bfd_coff_print_aux)
- (bfd *, FILE *, combined_entry_type *, combined_entry_type *,
- combined_entry_type *, unsigned int);
-
- void (*_bfd_coff_reloc16_extra_cases)
- (bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
- bfd_byte *, unsigned int *, unsigned int *);
-
- int (*_bfd_coff_reloc16_estimate)
- (bfd *, asection *, arelent *, unsigned int,
- struct bfd_link_info *);
-
- enum coff_symbol_classification (*_bfd_coff_classify_symbol)
- (bfd *, struct internal_syment *);
-
- bfd_boolean (*_bfd_coff_compute_section_file_positions)
- (bfd *);
-
- bfd_boolean (*_bfd_coff_start_final_link)
- (bfd *, struct bfd_link_info *);
-
- bfd_boolean (*_bfd_coff_relocate_section)
- (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
- struct internal_reloc *, struct internal_syment *, asection **);
-
- reloc_howto_type *(*_bfd_coff_rtype_to_howto)
- (bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *);
-
- bfd_boolean (*_bfd_coff_adjust_symndx)
- (bfd *, struct bfd_link_info *, bfd *, asection *,
- struct internal_reloc *, bfd_boolean *);
-
- bfd_boolean (*_bfd_coff_link_add_one_symbol)
- (struct bfd_link_info *, bfd *, const char *, flagword,
- asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean,
- struct bfd_link_hash_entry **);
-
- bfd_boolean (*_bfd_coff_link_output_has_begun)
- (bfd *, struct coff_final_link_info *);
-
- bfd_boolean (*_bfd_coff_final_link_postscript)
- (bfd *, struct coff_final_link_info *);
-
-@} bfd_coff_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))
-
-#define 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))
-
-#define 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))
-
-#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))
-
-#define 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))
-
-#define 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))
-
-#define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
-#define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
-#define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz)
-#define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz)
-#define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz)
-#define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz)
-#define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz)
-#define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen)
-#define bfd_coff_long_filenames(abfd) \
- (coff_backend_info (abfd)->_bfd_coff_long_filenames)
-#define bfd_coff_long_section_names(abfd) \
- (coff_backend_info (abfd)->_bfd_coff_long_section_names)
-#define bfd_coff_default_section_alignment_power(abfd) \
- (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
-#define bfd_coff_swap_filehdr_in(abfd, i,o) \
- ((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))
-
-#define 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))
-
-#define 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))
-#define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
- ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook)\
- (abfd, filehdr, aouthdr))
-
-#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, 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))
-
-#define 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))
-
-#define bfd_coff_force_symnames_in_strings(abfd)\
- (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
-
-#define bfd_coff_debug_string_prefix_length(abfd)\
- (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
-
-#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
- ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
- (abfd, file, base, symbol, aux, indaux))
-
-#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))
-
-#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))
-
-#define bfd_coff_classify_symbol(abfd, sym)\
- ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
- (abfd, sym))
-
-#define bfd_coff_compute_section_file_positions(abfd)\
- ((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))
-#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))
-#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))
-#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))
-#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))
-
-#define bfd_coff_link_output_has_begun(a,p) \
- ((coff_backend_info (a)->_bfd_coff_link_output_has_begun) (a, p))
-#define bfd_coff_final_link_postscript(a,p) \
- ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a, p))
-
-@end example
-@subsubsection Writing relocations
-To write relocations, the back end steps though the
-canonical relocation table and create an
-@code{internal_reloc}. The symbol index to use is removed from
-the @code{offset} field in the symbol table supplied. The
-address comes directly from the sum of the section base
-address and the relocation offset; the type is dug directly
-from the howto field. Then the @code{internal_reloc} is
-swapped into the shape of an @code{external_reloc} and written
-out to disk.
-
-@subsubsection Reading linenumbers
-Creating the linenumber table is done by reading in the entire
-coff linenumber table, and creating another table for internal use.
-
-A coff linenumber table is structured so that each function
-is marked as having a line number of 0. Each line within the
-function is an offset from the first line in the function. The
-base of the line number information for the table is stored in
-the symbol associated with the function.
-
-Note: The PE format uses line number 0 for a flag indicating a
-new source file.
-
-The information is copied from the external to the internal
-table, and each symbol which marks a function is marked by
-pointing its...
-
-How does this work ?
-
-@subsubsection Reading relocations
-Coff relocations are easily transformed into the internal BFD form
-(@code{arelent}).
-
-Reading a coff relocation table is done in the following stages:
-
-@itemize @bullet
-
-@item
-Read the entire coff relocation table into memory.
-
-@item
-Process each relocation in turn; first swap it from the
-external to the internal form.
-
-@item
-Turn the symbol referenced in the relocation's symbol index
-into a pointer into the canonical symbol table.
-This table is the same as the one returned by a call to
-@code{bfd_canonicalize_symtab}. The back end will call that
-routine and save the result if a canonicalization hasn't been done.
-
-@item
-The reloc index is turned into a pointer to a howto
-structure, in a back end specific way. For instance, the 386
-and 960 use the @code{r_type} to directly produce an index
-into a howto table vector; the 88k subtracts a number from the
-@code{r_type} field and creates an addend field.
-@end itemize
-
diff --git a/contrib/binutils/bfd/doc/core.texi b/contrib/binutils/bfd/doc/core.texi
deleted file mode 100644
index 1f09445e..0000000
--- a/contrib/binutils/bfd/doc/core.texi
+++ /dev/null
@@ -1,60 +0,0 @@
-@section Core files
-
-
-@subsection Core file functions
-
-
-@strong{Description}@*
-These are functions pertaining to core files.
-
-@findex bfd_core_file_failing_command
-@subsubsection @code{bfd_core_file_failing_command}
-@strong{Synopsis}
-@example
-const char *bfd_core_file_failing_command (bfd *abfd);
-@end example
-@strong{Description}@*
-Return a read-only string explaining which program was running
-when it failed and produced the core file @var{abfd}.
-
-@findex bfd_core_file_failing_signal
-@subsubsection @code{bfd_core_file_failing_signal}
-@strong{Synopsis}
-@example
-int bfd_core_file_failing_signal (bfd *abfd);
-@end example
-@strong{Description}@*
-Returns the signal number which caused the core dump which
-generated the file the BFD @var{abfd} is attached to.
-
-@findex core_file_matches_executable_p
-@subsubsection @code{core_file_matches_executable_p}
-@strong{Synopsis}
-@example
-bfd_boolean core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-@end example
-@strong{Description}@*
-Return @code{TRUE} if the core file attached to @var{core_bfd}
-was generated by a run of the executable file attached to
-@var{exec_bfd}, @code{FALSE} otherwise.
-
-@findex generic_core_file_matches_executable_p
-@subsubsection @code{generic_core_file_matches_executable_p}
-@strong{Synopsis}
-@example
-bfd_boolean generic_core_file_matches_executable_p
- (bfd *core_bfd, bfd *exec_bfd);
-@end example
-@strong{Description}@*
-Return TRUE if the core file attached to @var{core_bfd}
-was generated by a run of the executable file attached
-to @var{exec_bfd}. The match is based on executable
-basenames only.
-
-Note: When not able to determine the core file failing
-command or the executable name, we still return TRUE even
-though we're not sure that core file and executable match.
-This is to avoid generating a false warning in situations
-where we really don't know whether they match or not.
-
diff --git a/contrib/binutils/bfd/doc/elf.texi b/contrib/binutils/bfd/doc/elf.texi
deleted file mode 100644
index 4f9434c..0000000
--- a/contrib/binutils/bfd/doc/elf.texi
+++ /dev/null
@@ -1,22 +0,0 @@
-@section ELF backends
-BFD support for ELF formats is being worked on.
-Currently, the best supported back ends are for sparc and i386
-(running svr4 or Solaris 2).
-
-Documentation of the internals of the support code still needs
-to be written. The code is changing quickly enough that we
-haven't bothered yet.
-
-@findex bfd_elf_find_section
-@subsubsection @code{bfd_elf_find_section}
-@strong{Synopsis}
-@example
-struct elf_internal_shdr *bfd_elf_find_section (bfd *abfd, char *name);
-@end example
-@strong{Description}@*
-Helper functions for GDB to locate the string tables.
-Since BFD hides string tables from callers, GDB needs to use an
-internal hook to find them. Sun's .stabstr, in particular,
-isn't even pointed to by the .stab section, so ordinary
-mechanisms wouldn't work to find it, even if we had some.
-
diff --git a/contrib/binutils/bfd/doc/elfcode.texi b/contrib/binutils/bfd/doc/elfcode.texi
deleted file mode 100644
index e69de29..0000000
--- a/contrib/binutils/bfd/doc/elfcode.texi
+++ /dev/null
diff --git a/contrib/binutils/bfd/doc/format.texi b/contrib/binutils/bfd/doc/format.texi
deleted file mode 100644
index 9674acf..0000000
--- a/contrib/binutils/bfd/doc/format.texi
+++ /dev/null
@@ -1,112 +0,0 @@
-@section File formats
-A format is a BFD concept of high level file contents type. The
-formats supported by BFD are:
-
-@itemize @bullet
-
-@item
-@code{bfd_object}
-@end itemize
-The BFD may contain data, symbols, relocations and debug info.
-
-@itemize @bullet
-
-@item
-@code{bfd_archive}
-@end itemize
-The BFD contains other BFDs and an optional index.
-
-@itemize @bullet
-
-@item
-@code{bfd_core}
-@end itemize
-The BFD contains the result of an executable core dump.
-
-@subsection File format functions
-
-
-@findex bfd_check_format
-@subsubsection @code{bfd_check_format}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_check_format (bfd *abfd, bfd_format format);
-@end example
-@strong{Description}@*
-Verify if the file attached to the BFD @var{abfd} is compatible
-with the format @var{format} (i.e., one of @code{bfd_object},
-@code{bfd_archive} or @code{bfd_core}).
-
-If the BFD has been set to a specific target before the
-call, only the named target and format combination is
-checked. If the target has not been set, or has been set to
-@code{default}, then all the known target backends is
-interrogated to determine a match. If the default target
-matches, it is used. If not, exactly one target must recognize
-the file, or an error results.
-
-The function returns @code{TRUE} on success, otherwise @code{FALSE}
-with one of the following error codes:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_invalid_operation} -
-if @code{format} is not one of @code{bfd_object}, @code{bfd_archive} or
-@code{bfd_core}.
-
-@item
-@code{bfd_error_system_call} -
-if an error occured during a read - even some file mismatches
-can cause bfd_error_system_calls.
-
-@item
-@code{file_not_recognised} -
-none of the backends recognised the file format.
-
-@item
-@code{bfd_error_file_ambiguously_recognized} -
-more than one backend recognised the file format.
-@end itemize
-
-@findex bfd_check_format_matches
-@subsubsection @code{bfd_check_format_matches}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_check_format_matches
- (bfd *abfd, bfd_format format, char ***matching);
-@end example
-@strong{Description}@*
-Like @code{bfd_check_format}, except when it returns FALSE with
-@code{bfd_errno} set to @code{bfd_error_file_ambiguously_recognized}. In that
-case, if @var{matching} is not NULL, it will be filled in with
-a NULL-terminated list of the names of the formats that matched,
-allocated with @code{malloc}.
-Then the user may choose a format and try again.
-
-When done with the list that @var{matching} points to, the caller
-should free it.
-
-@findex bfd_set_format
-@subsubsection @code{bfd_set_format}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_format (bfd *abfd, bfd_format format);
-@end example
-@strong{Description}@*
-This function sets the file format of the BFD @var{abfd} to the
-format @var{format}. If the target set in the BFD does not
-support the format requested, the format is invalid, or the BFD
-is not open for writing, then an error occurs.
-
-@findex bfd_format_string
-@subsubsection @code{bfd_format_string}
-@strong{Synopsis}
-@example
-const char *bfd_format_string (bfd_format format);
-@end example
-@strong{Description}@*
-Return a pointer to a const string
-@code{invalid}, @code{object}, @code{archive}, @code{core}, or @code{unknown},
-depending upon the value of @var{format}.
-
diff --git a/contrib/binutils/bfd/doc/hash.texi b/contrib/binutils/bfd/doc/hash.texi
deleted file mode 100644
index 88d9585..0000000
--- a/contrib/binutils/bfd/doc/hash.texi
+++ /dev/null
@@ -1,247 +0,0 @@
-@section Hash Tables
-@cindex Hash tables
-BFD provides a simple set of hash table functions. Routines
-are provided to initialize a hash table, to free a hash table,
-to look up a string in a hash table and optionally create an
-entry for it, and to traverse a hash table. There is
-currently no routine to delete an string from a hash table.
-
-The basic hash table does not permit any data to be stored
-with a string. However, a hash table is designed to present a
-base class from which other types of hash tables may be
-derived. These derived types may store additional information
-with the string. Hash tables were implemented in this way,
-rather than simply providing a data pointer in a hash table
-entry, because they were designed for use by the linker back
-ends. The linker may create thousands of hash table entries,
-and the overhead of allocating private data and storing and
-following pointers becomes noticeable.
-
-The basic hash table code is in @code{hash.c}.
-
-@menu
-* Creating and Freeing a Hash Table::
-* Looking Up or Entering a String::
-* Traversing a Hash Table::
-* Deriving a New Hash Table Type::
-@end menu
-
-@node Creating and Freeing a Hash Table, Looking Up or Entering a String, Hash Tables, Hash Tables
-@subsection Creating and freeing a hash table
-@findex bfd_hash_table_init
-@findex bfd_hash_table_init_n
-To create a hash table, create an instance of a @code{struct
-bfd_hash_table} (defined in @code{bfd.h}) and call
-@code{bfd_hash_table_init} (if you know approximately how many
-entries you will need, the function @code{bfd_hash_table_init_n},
-which takes a @var{size} argument, may be used).
-@code{bfd_hash_table_init} returns @code{FALSE} if some sort of
-error occurs.
-
-@findex bfd_hash_newfunc
-The function @code{bfd_hash_table_init} take as an argument a
-function to use to create new entries. For a basic hash
-table, use the function @code{bfd_hash_newfunc}. @xref{Deriving
-a New Hash Table Type}, for why you would want to use a
-different value for this argument.
-
-@findex bfd_hash_allocate
-@code{bfd_hash_table_init} will create an objalloc which will be
-used to allocate new entries. You may allocate memory on this
-objalloc using @code{bfd_hash_allocate}.
-
-@findex bfd_hash_table_free
-Use @code{bfd_hash_table_free} to free up all the memory that has
-been allocated for a hash table. This will not free up the
-@code{struct bfd_hash_table} itself, which you must provide.
-
-@findex bfd_hash_set_default_size
-Use @code{bfd_hash_set_default_size} to set the default size of
-hash table to use.
-
-@node Looking Up or Entering a String, Traversing a Hash Table, Creating and Freeing a Hash Table, Hash Tables
-@subsection Looking up or entering a string
-@findex bfd_hash_lookup
-The function @code{bfd_hash_lookup} is used both to look up a
-string in the hash table and to create a new entry.
-
-If the @var{create} argument is @code{FALSE}, @code{bfd_hash_lookup}
-will look up a string. If the string is found, it will
-returns a pointer to a @code{struct bfd_hash_entry}. If the
-string is not found in the table @code{bfd_hash_lookup} will
-return @code{NULL}. You should not modify any of the fields in
-the returns @code{struct bfd_hash_entry}.
-
-If the @var{create} argument is @code{TRUE}, the string will be
-entered into the hash table if it is not already there.
-Either way a pointer to a @code{struct bfd_hash_entry} will be
-returned, either to the existing structure or to a newly
-created one. In this case, a @code{NULL} return means that an
-error occurred.
-
-If the @var{create} argument is @code{TRUE}, and a new entry is
-created, the @var{copy} argument is used to decide whether to
-copy the string onto the hash table objalloc or not. If
-@var{copy} is passed as @code{FALSE}, you must be careful not to
-deallocate or modify the string as long as the hash table
-exists.
-
-@node Traversing a Hash Table, Deriving a New Hash Table Type, Looking Up or Entering a String, Hash Tables
-@subsection Traversing a hash table
-@findex bfd_hash_traverse
-The function @code{bfd_hash_traverse} may be used to traverse a
-hash table, calling a function on each element. The traversal
-is done in a random order.
-
-@code{bfd_hash_traverse} takes as arguments a function and a
-generic @code{void *} pointer. The function is called with a
-hash table entry (a @code{struct bfd_hash_entry *}) and the
-generic pointer passed to @code{bfd_hash_traverse}. The function
-must return a @code{boolean} value, which indicates whether to
-continue traversing the hash table. If the function returns
-@code{FALSE}, @code{bfd_hash_traverse} will stop the traversal and
-return immediately.
-
-@node Deriving a New Hash Table Type, , Traversing a Hash Table, Hash Tables
-@subsection Deriving a new hash table type
-Many uses of hash tables want to store additional information
-which each entry in the hash table. Some also find it
-convenient to store additional information with the hash table
-itself. This may be done using a derived hash table.
-
-Since C is not an object oriented language, creating a derived
-hash table requires sticking together some boilerplate
-routines with a few differences specific to the type of hash
-table you want to create.
-
-An example of a derived hash table is the linker hash table.
-The structures for this are defined in @code{bfdlink.h}. The
-functions are in @code{linker.c}.
-
-You may also derive a hash table from an already derived hash
-table. For example, the a.out linker backend code uses a hash
-table derived from the linker hash table.
-
-@menu
-* Define the Derived Structures::
-* Write the Derived Creation Routine::
-* Write Other Derived Routines::
-@end menu
-
-@node Define the Derived Structures, Write the Derived Creation Routine, Deriving a New Hash Table Type, Deriving a New Hash Table Type
-@subsubsection Define the derived structures
-You must define a structure for an entry in the hash table,
-and a structure for the hash table itself.
-
-The first field in the structure for an entry in the hash
-table must be of the type used for an entry in the hash table
-you are deriving from. If you are deriving from a basic hash
-table this is @code{struct bfd_hash_entry}, which is defined in
-@code{bfd.h}. The first field in the structure for the hash
-table itself must be of the type of the hash table you are
-deriving from itself. If you are deriving from a basic hash
-table, this is @code{struct bfd_hash_table}.
-
-For example, the linker hash table defines @code{struct
-bfd_link_hash_entry} (in @code{bfdlink.h}). The first field,
-@code{root}, is of type @code{struct bfd_hash_entry}. Similarly,
-the first field in @code{struct bfd_link_hash_table}, @code{table},
-is of type @code{struct bfd_hash_table}.
-
-@node Write the Derived Creation Routine, Write Other Derived Routines, Define the Derived Structures, Deriving a New Hash Table Type
-@subsubsection Write the derived creation routine
-You must write a routine which will create and initialize an
-entry in the hash table. This routine is passed as the
-function argument to @code{bfd_hash_table_init}.
-
-In order to permit other hash tables to be derived from the
-hash table you are creating, this routine must be written in a
-standard way.
-
-The first argument to the creation routine is a pointer to a
-hash table entry. This may be @code{NULL}, in which case the
-routine should allocate the right amount of space. Otherwise
-the space has already been allocated by a hash table type
-derived from this one.
-
-After allocating space, the creation routine must call the
-creation routine of the hash table type it is derived from,
-passing in a pointer to the space it just allocated. This
-will initialize any fields used by the base hash table.
-
-Finally the creation routine must initialize any local fields
-for the new hash table type.
-
-Here is a boilerplate example of a creation routine.
-@var{function_name} is the name of the routine.
-@var{entry_type} is the type of an entry in the hash table you
-are creating. @var{base_newfunc} is the name of the creation
-routine of the hash table type your hash table is derived
-from.
-
-
-@example
-struct bfd_hash_entry *
-@var{function_name} (struct bfd_hash_entry *entry,
- struct bfd_hash_table *table,
- const char *string)
-@{
- struct @var{entry_type} *ret = (@var{entry_type} *) entry;
-
- /* Allocate the structure if it has not already been allocated by a
- derived class. */
- if (ret == NULL)
- @{
- ret = bfd_hash_allocate (table, sizeof (* ret));
- if (ret == NULL)
- return NULL;
- @}
-
- /* Call the allocation method of the base class. */
- ret = ((@var{entry_type} *)
- @var{base_newfunc} ((struct bfd_hash_entry *) ret, table, string));
-
- /* Initialize the local fields here. */
-
- return (struct bfd_hash_entry *) ret;
-@}
-@end example
-@strong{Description}@*
-The creation routine for the linker hash table, which is in
-@code{linker.c}, looks just like this example.
-@var{function_name} is @code{_bfd_link_hash_newfunc}.
-@var{entry_type} is @code{struct bfd_link_hash_entry}.
-@var{base_newfunc} is @code{bfd_hash_newfunc}, the creation
-routine for a basic hash table.
-
-@code{_bfd_link_hash_newfunc} also initializes the local fields
-in a linker hash table entry: @code{type}, @code{written} and
-@code{next}.
-
-@node Write Other Derived Routines, , Write the Derived Creation Routine, Deriving a New Hash Table Type
-@subsubsection Write other derived routines
-You will want to write other routines for your new hash table,
-as well.
-
-You will want an initialization routine which calls the
-initialization routine of the hash table you are deriving from
-and initializes any other local fields. For the linker hash
-table, this is @code{_bfd_link_hash_table_init} in @code{linker.c}.
-
-You will want a lookup routine which calls the lookup routine
-of the hash table you are deriving from and casts the result.
-The linker hash table uses @code{bfd_link_hash_lookup} in
-@code{linker.c} (this actually takes an additional argument which
-it uses to decide how to return the looked up value).
-
-You may want a traversal routine. This should just call the
-traversal routine of the hash table you are deriving from with
-appropriate casts. The linker hash table uses
-@code{bfd_link_hash_traverse} in @code{linker.c}.
-
-These routines may simply be defined as macros. For example,
-the a.out backend linker hash table, which is derived from the
-linker hash table, uses macros for the lookup and traversal
-routines. These are @code{aout_link_hash_lookup} and
-@code{aout_link_hash_traverse} in aoutx.h.
-
diff --git a/contrib/binutils/bfd/doc/init.texi b/contrib/binutils/bfd/doc/init.texi
deleted file mode 100644
index ab735f8e..0000000
--- a/contrib/binutils/bfd/doc/init.texi
+++ /dev/null
@@ -1,16 +0,0 @@
-@section Initialization
-
-
-@subsection Initialization functions
-These are the functions that handle initializing a BFD.
-
-@findex bfd_init
-@subsubsection @code{bfd_init}
-@strong{Synopsis}
-@example
-void bfd_init (void);
-@end example
-@strong{Description}@*
-This routine must be called before any other BFD function to
-initialize magical internal data structures.
-
diff --git a/contrib/binutils/bfd/doc/libbfd.texi b/contrib/binutils/bfd/doc/libbfd.texi
deleted file mode 100644
index fef6e0e..0000000
--- a/contrib/binutils/bfd/doc/libbfd.texi
+++ /dev/null
@@ -1,179 +0,0 @@
-@section Implementation details
-
-
-@subsection Internal functions
-
-
-@strong{Description}@*
-These routines are used within BFD.
-They are not intended for export, but are documented here for
-completeness.
-
-@findex bfd_write_bigendian_4byte_int
-@subsubsection @code{bfd_write_bigendian_4byte_int}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
-@end example
-@strong{Description}@*
-Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big
-endian order regardless of what else is going on. This is useful in
-archives.
-
-@findex bfd_put_size
-@subsubsection @code{bfd_put_size}
-@findex bfd_get_size
-@subsubsection @code{bfd_get_size}
-@strong{Description}@*
-These macros as used for reading and writing raw data in
-sections; each access (except for bytes) is vectored through
-the target format of the BFD and mangled accordingly. The
-mangling performs any necessary endian translations and
-removes alignment restrictions. Note that types accepted and
-returned by these macros are identical so they can be swapped
-around in macros---for example, @file{libaout.h} defines @code{GET_WORD}
-to either @code{bfd_get_32} or @code{bfd_get_64}.
-
-In the put routines, @var{val} must be a @code{bfd_vma}. If we are on a
-system without prototypes, the caller is responsible for making
-sure that is true, with a cast if necessary. We don't cast
-them in the macro definitions because that would prevent @code{lint}
-or @code{gcc -Wall} from detecting sins such as passing a pointer.
-To detect calling these with less than a @code{bfd_vma}, use
-@code{gcc -Wconversion} on a host with 64 bit @code{bfd_vma}'s.
-@example
-
-/* Byte swapping macros for user section data. */
-
-#define bfd_put_8(abfd, val, ptr) \
- ((void) (*((unsigned char *) (ptr)) = (val) & 0xff))
-#define bfd_put_signed_8 \
- bfd_put_8
-#define bfd_get_8(abfd, ptr) \
- (*(unsigned char *) (ptr) & 0xff)
-#define bfd_get_signed_8(abfd, ptr) \
- (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
-
-#define bfd_put_16(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx16, ((val),(ptr)))
-#define bfd_put_signed_16 \
- bfd_put_16
-#define bfd_get_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx16, (ptr))
-#define bfd_get_signed_16(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
-
-#define bfd_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx32, ((val),(ptr)))
-#define bfd_put_signed_32 \
- bfd_put_32
-#define bfd_get_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx32, (ptr))
-#define bfd_get_signed_32(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_32, (ptr))
-
-#define bfd_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_putx64, ((val), (ptr)))
-#define bfd_put_signed_64 \
- bfd_put_64
-#define bfd_get_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx64, (ptr))
-#define bfd_get_signed_64(abfd, ptr) \
- BFD_SEND (abfd, bfd_getx_signed_64, (ptr))
-
-#define bfd_get(bits, 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) == 16 ? bfd_put_16 (abfd, val, ptr) \
- : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
- : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
- : (abort (), (void) 0))
-
-@end example
-
-@findex bfd_h_put_size
-@subsubsection @code{bfd_h_put_size}
-@strong{Description}@*
-These macros have the same function as their @code{bfd_get_x}
-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.
-@example
-
-/* Byte swapping macros for file header data. */
-
-#define bfd_h_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)
-#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
-#define bfd_h_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))
-#define bfd_h_put_signed_16 \
- bfd_h_put_16
-#define bfd_h_get_16(abfd, 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))
-
-#define bfd_h_put_32(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
-#define bfd_h_put_signed_32 \
- bfd_h_put_32
-#define bfd_h_get_32(abfd, 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))
-
-#define bfd_h_put_64(abfd, val, ptr) \
- BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
-#define bfd_h_put_signed_64 \
- bfd_h_put_64
-#define bfd_h_get_64(abfd, 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))
-
-/* Aliases for the above, which should eventually go away. */
-
-#define H_PUT_64 bfd_h_put_64
-#define H_PUT_32 bfd_h_put_32
-#define H_PUT_16 bfd_h_put_16
-#define H_PUT_8 bfd_h_put_8
-#define H_PUT_S64 bfd_h_put_signed_64
-#define H_PUT_S32 bfd_h_put_signed_32
-#define H_PUT_S16 bfd_h_put_signed_16
-#define H_PUT_S8 bfd_h_put_signed_8
-#define H_GET_64 bfd_h_get_64
-#define H_GET_32 bfd_h_get_32
-#define H_GET_16 bfd_h_get_16
-#define H_GET_8 bfd_h_get_8
-#define H_GET_S64 bfd_h_get_signed_64
-#define H_GET_S32 bfd_h_get_signed_32
-#define H_GET_S16 bfd_h_get_signed_16
-#define H_GET_S8 bfd_h_get_signed_8
-
-
-@end example
-
-@findex bfd_log2
-@subsubsection @code{bfd_log2}
-@strong{Synopsis}
-@example
-unsigned int bfd_log2 (bfd_vma x);
-@end example
-@strong{Description}@*
-Return the log base 2 of the value supplied, rounded up. E.g., an
-@var{x} of 1025 returns 11. A @var{x} of 0 returns 0.
-
diff --git a/contrib/binutils/bfd/doc/linker.texi b/contrib/binutils/bfd/doc/linker.texi
deleted file mode 100644
index 8a55006..0000000
--- a/contrib/binutils/bfd/doc/linker.texi
+++ /dev/null
@@ -1,380 +0,0 @@
-@section Linker Functions
-@cindex Linker
-The linker uses three special entry points in the BFD target
-vector. It is not necessary to write special routines for
-these entry points when creating a new BFD back end, since
-generic versions are provided. However, writing them can
-speed up linking and make it use significantly less runtime
-memory.
-
-The first routine creates a hash table used by the other
-routines. The second routine adds the symbols from an object
-file to the hash table. The third routine takes all the
-object files and links them together to create the output
-file. These routines are designed so that the linker proper
-does not need to know anything about the symbols in the object
-files that it is linking. The linker merely arranges the
-sections as directed by the linker script and lets BFD handle
-the details of symbols and relocs.
-
-The second routine and third routines are passed a pointer to
-a @code{struct bfd_link_info} structure (defined in
-@code{bfdlink.h}) which holds information relevant to the link,
-including the linker hash table (which was created by the
-first routine) and a set of callback functions to the linker
-proper.
-
-The generic linker routines are in @code{linker.c}, and use the
-header file @code{genlink.h}. As of this writing, the only back
-ends which have implemented versions of these routines are
-a.out (in @code{aoutx.h}) and ECOFF (in @code{ecoff.c}). The a.out
-routines are used as examples throughout this section.
-
-@menu
-* Creating a Linker Hash Table::
-* Adding Symbols to the Hash Table::
-* Performing the Final Link::
-@end menu
-
-@node Creating a Linker Hash Table, Adding Symbols to the Hash Table, Linker Functions, Linker Functions
-@subsection Creating a linker hash table
-@cindex _bfd_link_hash_table_create in target vector
-@cindex target vector (_bfd_link_hash_table_create)
-The linker routines must create a hash table, which must be
-derived from @code{struct bfd_link_hash_table} described in
-@code{bfdlink.c}. @xref{Hash Tables}, for information on how to
-create a derived hash table. This entry point is called using
-the target vector of the linker output file.
-
-The @code{_bfd_link_hash_table_create} entry point must allocate
-and initialize an instance of the desired hash table. If the
-back end does not require any additional information to be
-stored with the entries in the hash table, the entry point may
-simply create a @code{struct bfd_link_hash_table}. Most likely,
-however, some additional information will be needed.
-
-For example, with each entry in the hash table the a.out
-linker keeps the index the symbol has in the final output file
-(this index number is used so that when doing a relocatable
-link the symbol index used in the output file can be quickly
-filled in when copying over a reloc). The a.out linker code
-defines the required structures and functions for a hash table
-derived from @code{struct bfd_link_hash_table}. The a.out linker
-hash table is created by the function
-@code{NAME(aout,link_hash_table_create)}; it simply allocates
-space for the hash table, initializes it, and returns a
-pointer to it.
-
-When writing the linker routines for a new back end, you will
-generally not know exactly which fields will be required until
-you have finished. You should simply create a new hash table
-which defines no additional fields, and then simply add fields
-as they become necessary.
-
-@node Adding Symbols to the Hash Table, Performing the Final Link, Creating a Linker Hash Table, Linker Functions
-@subsection Adding symbols to the hash table
-@cindex _bfd_link_add_symbols in target vector
-@cindex target vector (_bfd_link_add_symbols)
-The linker proper will call the @code{_bfd_link_add_symbols}
-entry point for each object file or archive which is to be
-linked (typically these are the files named on the command
-line, but some may also come from the linker script). The
-entry point is responsible for examining the file. For an
-object file, BFD must add any relevant symbol information to
-the hash table. For an archive, BFD must determine which
-elements of the archive should be used and adding them to the
-link.
-
-The a.out version of this entry point is
-@code{NAME(aout,link_add_symbols)}.
-
-@menu
-* Differing file formats::
-* Adding symbols from an object file::
-* Adding symbols from an archive::
-@end menu
-
-@node Differing file formats, Adding symbols from an object file, Adding Symbols to the Hash Table, Adding Symbols to the Hash Table
-@subsubsection Differing file formats
-Normally all the files involved in a link will be of the same
-format, but it is also possible to link together different
-format object files, and the back end must support that. The
-@code{_bfd_link_add_symbols} entry point is called via the target
-vector of the file to be added. This has an important
-consequence: the function may not assume that the hash table
-is the type created by the corresponding
-@code{_bfd_link_hash_table_create} vector. All the
-@code{_bfd_link_add_symbols} function can assume about the hash
-table is that it is derived from @code{struct
-bfd_link_hash_table}.
-
-Sometimes the @code{_bfd_link_add_symbols} function must store
-some information in the hash table entry to be used by the
-@code{_bfd_final_link} function. In such a case the @code{creator}
-field of the hash table must be checked to make sure that the
-hash table was created by an object file of the same format.
-
-The @code{_bfd_final_link} routine must be prepared to handle a
-hash entry without any extra information added by the
-@code{_bfd_link_add_symbols} function. A hash entry without
-extra information will also occur when the linker script
-directs the linker to create a symbol. Note that, regardless
-of how a hash table entry is added, all the fields will be
-initialized to some sort of null value by the hash table entry
-initialization function.
-
-See @code{ecoff_link_add_externals} for an example of how to
-check the @code{creator} field before saving information (in this
-case, the ECOFF external symbol debugging information) in a
-hash table entry.
-
-@node Adding symbols from an object file, Adding symbols from an archive, Differing file formats, Adding Symbols to the Hash Table
-@subsubsection Adding symbols from an object file
-When the @code{_bfd_link_add_symbols} routine is passed an object
-file, it must add all externally visible symbols in that
-object file to the hash table. The actual work of adding the
-symbol to the hash table is normally handled by the function
-@code{_bfd_generic_link_add_one_symbol}. The
-@code{_bfd_link_add_symbols} routine is responsible for reading
-all the symbols from the object file and passing the correct
-information to @code{_bfd_generic_link_add_one_symbol}.
-
-The @code{_bfd_link_add_symbols} routine should not use
-@code{bfd_canonicalize_symtab} to read the symbols. The point of
-providing this routine is to avoid the overhead of converting
-the symbols into generic @code{asymbol} structures.
-
-@findex _bfd_generic_link_add_one_symbol
-@code{_bfd_generic_link_add_one_symbol} handles the details of
-combining common symbols, warning about multiple definitions,
-and so forth. It takes arguments which describe the symbol to
-add, notably symbol flags, a section, and an offset. The
-symbol flags include such things as @code{BSF_WEAK} or
-@code{BSF_INDIRECT}. The section is a section in the object
-file, or something like @code{bfd_und_section_ptr} for an undefined
-symbol or @code{bfd_com_section_ptr} for a common symbol.
-
-If the @code{_bfd_final_link} routine is also going to need to
-read the symbol information, the @code{_bfd_link_add_symbols}
-routine should save it somewhere attached to the object file
-BFD. However, the information should only be saved if the
-@code{keep_memory} field of the @code{info} argument is TRUE, so
-that the @code{-no-keep-memory} linker switch is effective.
-
-The a.out function which adds symbols from an object file is
-@code{aout_link_add_object_symbols}, and most of the interesting
-work is in @code{aout_link_add_symbols}. The latter saves
-pointers to the hash tables entries created by
-@code{_bfd_generic_link_add_one_symbol} indexed by symbol number,
-so that the @code{_bfd_final_link} routine does not have to call
-the hash table lookup routine to locate the entry.
-
-@node Adding symbols from an archive, , Adding symbols from an object file, Adding Symbols to the Hash Table
-@subsubsection Adding symbols from an archive
-When the @code{_bfd_link_add_symbols} routine is passed an
-archive, it must look through the symbols defined by the
-archive and decide which elements of the archive should be
-included in the link. For each such element it must call the
-@code{add_archive_element} linker callback, and it must add the
-symbols from the object file to the linker hash table.
-
-@findex _bfd_generic_link_add_archive_symbols
-In most cases the work of looking through the symbols in the
-archive should be done by the
-@code{_bfd_generic_link_add_archive_symbols} function. This
-function builds a hash table from the archive symbol table and
-looks through the list of undefined symbols to see which
-elements should be included.
-@code{_bfd_generic_link_add_archive_symbols} is passed a function
-to call to make the final decision about adding an archive
-element to the link and to do the actual work of adding the
-symbols to the linker hash table.
-
-The function passed to
-@code{_bfd_generic_link_add_archive_symbols} must read the
-symbols of the archive element and decide whether the archive
-element should be included in the link. If the element is to
-be included, the @code{add_archive_element} linker callback
-routine must be called with the element as an argument, and
-the elements symbols must be added to the linker hash table
-just as though the element had itself been passed to the
-@code{_bfd_link_add_symbols} function.
-
-When the a.out @code{_bfd_link_add_symbols} function receives an
-archive, it calls @code{_bfd_generic_link_add_archive_symbols}
-passing @code{aout_link_check_archive_element} as the function
-argument. @code{aout_link_check_archive_element} calls
-@code{aout_link_check_ar_symbols}. If the latter decides to add
-the element (an element is only added if it provides a real,
-non-common, definition for a previously undefined or common
-symbol) it calls the @code{add_archive_element} callback and then
-@code{aout_link_check_archive_element} calls
-@code{aout_link_add_symbols} to actually add the symbols to the
-linker hash table.
-
-The ECOFF back end is unusual in that it does not normally
-call @code{_bfd_generic_link_add_archive_symbols}, because ECOFF
-archives already contain a hash table of symbols. The ECOFF
-back end searches the archive itself to avoid the overhead of
-creating a new hash table.
-
-@node Performing the Final Link, , Adding Symbols to the Hash Table, Linker Functions
-@subsection Performing the final link
-@cindex _bfd_link_final_link in target vector
-@cindex target vector (_bfd_final_link)
-When all the input files have been processed, the linker calls
-the @code{_bfd_final_link} entry point of the output BFD. This
-routine is responsible for producing the final output file,
-which has several aspects. It must relocate the contents of
-the input sections and copy the data into the output sections.
-It must build an output symbol table including any local
-symbols from the input files and the global symbols from the
-hash table. When producing relocatable output, it must
-modify the input relocs and write them into the output file.
-There may also be object format dependent work to be done.
-
-The linker will also call the @code{write_object_contents} entry
-point when the BFD is closed. The two entry points must work
-together in order to produce the correct output file.
-
-The details of how this works are inevitably dependent upon
-the specific object file format. The a.out
-@code{_bfd_final_link} routine is @code{NAME(aout,final_link)}.
-
-@menu
-* Information provided by the linker::
-* Relocating the section contents::
-* Writing the symbol table::
-@end menu
-
-@node Information provided by the linker, Relocating the section contents, Performing the Final Link, Performing the Final Link
-@subsubsection Information provided by the linker
-Before the linker calls the @code{_bfd_final_link} entry point,
-it sets up some data structures for the function to use.
-
-The @code{input_bfds} field of the @code{bfd_link_info} structure
-will point to a list of all the input files included in the
-link. These files are linked through the @code{link_next} field
-of the @code{bfd} structure.
-
-Each section in the output file will have a list of
-@code{link_order} structures attached to the @code{map_head.link_order}
-field (the @code{link_order} structure is defined in
-@code{bfdlink.h}). These structures describe how to create the
-contents of the output section in terms of the contents of
-various input sections, fill constants, and, eventually, other
-types of information. They also describe relocs that must be
-created by the BFD backend, but do not correspond to any input
-file; this is used to support -Ur, which builds constructors
-while generating a relocatable object file.
-
-@node Relocating the section contents, Writing the symbol table, Information provided by the linker, Performing the Final Link
-@subsubsection Relocating the section contents
-The @code{_bfd_final_link} function should look through the
-@code{link_order} structures attached to each section of the
-output file. Each @code{link_order} structure should either be
-handled specially, or it should be passed to the function
-@code{_bfd_default_link_order} which will do the right thing
-(@code{_bfd_default_link_order} is defined in @code{linker.c}).
-
-For efficiency, a @code{link_order} of type
-@code{bfd_indirect_link_order} whose associated section belongs
-to a BFD of the same format as the output BFD must be handled
-specially. This type of @code{link_order} describes part of an
-output section in terms of a section belonging to one of the
-input files. The @code{_bfd_final_link} function should read the
-contents of the section and any associated relocs, apply the
-relocs to the section contents, and write out the modified
-section contents. If performing a relocatable link, the
-relocs themselves must also be modified and written out.
-
-@findex _bfd_relocate_contents
-@findex _bfd_final_link_relocate
-The functions @code{_bfd_relocate_contents} and
-@code{_bfd_final_link_relocate} provide some general support for
-performing the actual relocations, notably overflow checking.
-Their arguments include information about the symbol the
-relocation is against and a @code{reloc_howto_type} argument
-which describes the relocation to perform. These functions
-are defined in @code{reloc.c}.
-
-The a.out function which handles reading, relocating, and
-writing section contents is @code{aout_link_input_section}. The
-actual relocation is done in @code{aout_link_input_section_std}
-and @code{aout_link_input_section_ext}.
-
-@node Writing the symbol table, , Relocating the section contents, Performing the Final Link
-@subsubsection Writing the symbol table
-The @code{_bfd_final_link} function must gather all the symbols
-in the input files and write them out. It must also write out
-all the symbols in the global hash table. This must be
-controlled by the @code{strip} and @code{discard} fields of the
-@code{bfd_link_info} structure.
-
-The local symbols of the input files will not have been
-entered into the linker hash table. The @code{_bfd_final_link}
-routine must consider each input file and include the symbols
-in the output file. It may be convenient to do this when
-looking through the @code{link_order} structures, or it may be
-done by stepping through the @code{input_bfds} list.
-
-The @code{_bfd_final_link} routine must also traverse the global
-hash table to gather all the externally visible symbols. It
-is possible that most of the externally visible symbols may be
-written out when considering the symbols of each input file,
-but it is still necessary to traverse the hash table since the
-linker script may have defined some symbols that are not in
-any of the input files.
-
-The @code{strip} field of the @code{bfd_link_info} structure
-controls which symbols are written out. The possible values
-are listed in @code{bfdlink.h}. If the value is @code{strip_some},
-then the @code{keep_hash} field of the @code{bfd_link_info}
-structure is a hash table of symbols to keep; each symbol
-should be looked up in this hash table, and only symbols which
-are present should be included in the output file.
-
-If the @code{strip} field of the @code{bfd_link_info} structure
-permits local symbols to be written out, the @code{discard} field
-is used to further controls which local symbols are included
-in the output file. If the value is @code{discard_l}, then all
-local symbols which begin with a certain prefix are discarded;
-this is controlled by the @code{bfd_is_local_label_name} entry point.
-
-The a.out backend handles symbols by calling
-@code{aout_link_write_symbols} on each input BFD and then
-traversing the global hash table with the function
-@code{aout_link_write_other_symbol}. It builds a string table
-while writing out the symbols, which is written to the output
-file at the end of @code{NAME(aout,final_link)}.
-
-@findex bfd_link_split_section
-@subsubsection @code{bfd_link_split_section}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec);
-@end example
-@strong{Description}@*
-Return nonzero if @var{sec} should be split during a
-reloceatable or final link.
-@example
-#define bfd_link_split_section(abfd, sec) \
- BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec))
-
-@end example
-
-@findex bfd_section_already_linked
-@subsubsection @code{bfd_section_already_linked}
-@strong{Synopsis}
-@example
-void bfd_section_already_linked (bfd *abfd, asection *sec);
-@end example
-@strong{Description}@*
-Check if @var{sec} has been already linked during a reloceatable
-or final link.
-@example
-#define bfd_section_already_linked(abfd, sec) \
- BFD_SEND (abfd, _section_already_linked, (abfd, sec))
-
-@end example
-
diff --git a/contrib/binutils/bfd/doc/mmo.texi b/contrib/binutils/bfd/doc/mmo.texi
deleted file mode 100644
index b0d726a..0000000
--- a/contrib/binutils/bfd/doc/mmo.texi
+++ /dev/null
@@ -1,365 +0,0 @@
-@section mmo backend
-The mmo object format is used exclusively together with Professor
-Donald E.@: Knuth's educational 64-bit processor MMIX. The simulator
-@command{mmix} which is available at
-@url{http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz}
-understands this format. That package also includes a combined
-assembler and linker called @command{mmixal}. The mmo format has
-no advantages feature-wise compared to e.g. ELF. It is a simple
-non-relocatable object format with no support for archives or
-debugging information, except for symbol value information and
-line numbers (which is not yet implemented in BFD). See
-@url{http://www-cs-faculty.stanford.edu/~knuth/mmix.html} for more
-information about MMIX. The ELF format is used for intermediate
-object files in the BFD implementation.
-
-@c We want to xref the symbol table node. A feature in "chew"
-@c requires that "commands" do not contain spaces in the
-@c arguments. Hence the hyphen in "Symbol-table".
-@menu
-* File layout::
-* Symbol-table::
-* mmo section mapping::
-@end menu
-
-@node File layout, Symbol-table, mmo, mmo
-@subsection File layout
-The mmo file contents is not partitioned into named sections as
-with e.g.@: ELF. Memory areas is formed by specifying the
-location of the data that follows. Only the memory area
-@samp{0x0000@dots{}00} to @samp{0x01ff@dots{}ff} is executable, so
-it is used for code (and constants) and the area
-@samp{0x2000@dots{}00} to @samp{0x20ff@dots{}ff} is used for
-writable data. @xref{mmo section mapping}.
-
-There is provision for specifying ``special data'' of 65536
-different types. We use type 80 (decimal), arbitrarily chosen the
-same as the ELF @code{e_machine} number for MMIX, filling it with
-section information normally found in ELF objects. @xref{mmo
-section mapping}.
-
-Contents is entered as 32-bit words, xor:ed over previous
-contents, always zero-initialized. A word that starts with the
-byte @samp{0x98} forms a command called a @samp{lopcode}, where
-the next byte distinguished between the thirteen lopcodes. The
-two remaining bytes, called the @samp{Y} and @samp{Z} fields, or
-the @samp{YZ} field (a 16-bit big-endian number), are used for
-various purposes different for each lopcode. As documented in
-@url{http://www-cs-faculty.stanford.edu/~knuth/mmixal-intro.ps.gz},
-the lopcodes are:
-
-@table @code
-@item lop_quote
-0x98000001. The next word is contents, regardless of whether it
-starts with 0x98 or not.
-
-@item lop_loc
-0x9801YYZZ, where @samp{Z} is 1 or 2. This is a location
-directive, setting the location for the next data to the next
-32-bit word (for @math{Z = 1}) or 64-bit word (for @math{Z = 2}),
-plus @math{Y * 2^56}. Normally @samp{Y} is 0 for the text segment
-and 2 for the data segment.
-
-@item lop_skip
-0x9802YYZZ. Increase the current location by @samp{YZ} bytes.
-
-@item lop_fixo
-0x9803YYZZ, where @samp{Z} is 1 or 2. Store the current location
-as 64 bits into the location pointed to by the next 32-bit
-(@math{Z = 1}) or 64-bit (@math{Z = 2}) word, plus @math{Y *
-2^56}.
-
-@item lop_fixr
-0x9804YYZZ. @samp{YZ} is stored into the current location plus
-@math{2 - 4 * YZ}.
-
-@item lop_fixrx
-0x980500ZZ. @samp{Z} is 16 or 24. A value @samp{L} derived from
-the following 32-bit word are used in a manner similar to
-@samp{YZ} in lop_fixr: it is xor:ed into the current location
-minus @math{4 * L}. The first byte of the word is 0 or 1. If it
-is 1, then @math{L = (@var{lowest 24 bits of word}) - 2^Z}, if 0,
-then @math{L = (@var{lowest 24 bits of word})}.
-
-@item lop_file
-0x9806YYZZ. @samp{Y} is the file number, @samp{Z} is count of
-32-bit words. Set the file number to @samp{Y} and the line
-counter to 0. The next @math{Z * 4} bytes contain the file name,
-padded with zeros if the count is not a multiple of four. The
-same @samp{Y} may occur multiple times, but @samp{Z} must be 0 for
-all but the first occurrence.
-
-@item lop_line
-0x9807YYZZ. @samp{YZ} is the line number. Together with
-lop_file, it forms the source location for the next 32-bit word.
-Note that for each non-lopcode 32-bit word, line numbers are
-assumed incremented by one.
-
-@item lop_spec
-0x9808YYZZ. @samp{YZ} is the type number. Data until the next
-lopcode other than lop_quote forms special data of type @samp{YZ}.
-@xref{mmo section mapping}.
-
-Other types than 80, (or type 80 with a content that does not
-parse) is stored in sections named @code{.MMIX.spec_data.@var{n}}
-where @var{n} is the @samp{YZ}-type. The flags for such a
-sections say not to allocate or load the data. The vma is 0.
-Contents of multiple occurrences of special data @var{n} is
-concatenated to the data of the previous lop_spec @var{n}s. The
-location in data or code at which the lop_spec occurred is lost.
-
-@item lop_pre
-0x980901ZZ. The first lopcode in a file. The @samp{Z} field forms the
-length of header information in 32-bit words, where the first word
-tells the time in seconds since @samp{00:00:00 GMT Jan 1 1970}.
-
-@item lop_post
-0x980a00ZZ. @math{Z > 32}. This lopcode follows after all
-content-generating lopcodes in a program. The @samp{Z} field
-denotes the value of @samp{rG} at the beginning of the program.
-The following @math{256 - Z} big-endian 64-bit words are loaded
-into global registers @samp{$G} @dots{} @samp{$255}.
-
-@item lop_stab
-0x980b0000. The next-to-last lopcode in a program. Must follow
-immediately after the lop_post lopcode and its data. After this
-lopcode follows all symbols in a compressed format
-(@pxref{Symbol-table}).
-
-@item lop_end
-0x980cYYZZ. The last lopcode in a program. It must follow the
-lop_stab lopcode and its data. The @samp{YZ} field contains the
-number of 32-bit words of symbol table information after the
-preceding lop_stab lopcode.
-@end table
-
-Note that the lopcode "fixups"; @code{lop_fixr}, @code{lop_fixrx} and
-@code{lop_fixo} are not generated by BFD, but are handled. They are
-generated by @code{mmixal}.
-
-This trivial one-label, one-instruction file:
-
-@example
- :Main TRAP 1,2,3
-@end example
-
-can be represented this way in mmo:
-
-@example
- 0x98090101 - lop_pre, one 32-bit word with timestamp.
- <timestamp>
- 0x98010002 - lop_loc, text segment, using a 64-bit address.
- Note that mmixal does not emit this for the file above.
- 0x00000000 - Address, high 32 bits.
- 0x00000000 - Address, low 32 bits.
- 0x98060002 - lop_file, 2 32-bit words for file-name.
- 0x74657374 - "test"
- 0x2e730000 - ".s\0\0"
- 0x98070001 - lop_line, line 1.
- 0x00010203 - TRAP 1,2,3
- 0x980a00ff - lop_post, setting $255 to 0.
- 0x00000000
- 0x00000000
- 0x980b0000 - lop_stab for ":Main" = 0, serial 1.
- 0x203a4040 @xref{Symbol-table}.
- 0x10404020
- 0x4d206120
- 0x69016e00
- 0x81000000
- 0x980c0005 - lop_end; symbol table contained five 32-bit words.
-@end example
-@node Symbol-table, mmo section mapping, File layout, mmo
-@subsection Symbol table format
-From mmixal.w (or really, the generated mmixal.tex) in
-@url{http://www-cs-faculty.stanford.edu/~knuth/programs/mmix.tar.gz}):
-``Symbols are stored and retrieved by means of a @samp{ternary
-search trie}, following ideas of Bentley and Sedgewick. (See
-ACM--SIAM Symp.@: on Discrete Algorithms @samp{8} (1997), 360--369;
-R.@:Sedgewick, @samp{Algorithms in C} (Reading, Mass.@:
-Addison--Wesley, 1998), @samp{15.4}.) Each trie node stores a
-character, and there are branches to subtries for the cases where
-a given character is less than, equal to, or greater than the
-character in the trie. There also is a pointer to a symbol table
-entry if a symbol ends at the current node.''
-
-So it's a tree encoded as a stream of bytes. The stream of bytes
-acts on a single virtual global symbol, adding and removing
-characters and signalling complete symbol points. Here, we read
-the stream and create symbols at the completion points.
-
-First, there's a control byte @code{m}. If any of the listed bits
-in @code{m} is nonzero, we execute what stands at the right, in
-the listed order:
-
-@example
- (MMO3_LEFT)
- 0x40 - Traverse left trie.
- (Read a new command byte and recurse.)
-
- (MMO3_SYMBITS)
- 0x2f - Read the next byte as a character and store it in the
- current character position; increment character position.
- Test the bits of @code{m}:
-
- (MMO3_WCHAR)
- 0x80 - The character is 16-bit (so read another byte,
- merge into current character.
-
- (MMO3_TYPEBITS)
- 0xf - We have a complete symbol; parse the type, value
- and serial number and do what should be done
- with a symbol. The type and length information
- is in j = (m & 0xf).
-
- (MMO3_REGQUAL_BITS)
- j == 0xf: A register variable. The following
- byte tells which register.
- j <= 8: An absolute symbol. Read j bytes as the
- big-endian number the symbol equals.
- A j = 2 with two zero bytes denotes an
- unknown symbol.
- j > 8: As with j <= 8, but add (0x20 << 56)
- to the value in the following j - 8
- bytes.
-
- Then comes the serial number, as a variant of
- uleb128, but better named ubeb128:
- Read bytes and shift the previous value left 7
- (multiply by 128). Add in the new byte, repeat
- until a byte has bit 7 set. The serial number
- is the computed value minus 128.
-
- (MMO3_MIDDLE)
- 0x20 - Traverse middle trie. (Read a new command byte
- and recurse.) Decrement character position.
-
- (MMO3_RIGHT)
- 0x10 - Traverse right trie. (Read a new command byte and
- recurse.)
-@end example
-
-Let's look again at the @code{lop_stab} for the trivial file
-(@pxref{File layout}).
-
-@example
- 0x980b0000 - lop_stab for ":Main" = 0, serial 1.
- 0x203a4040
- 0x10404020
- 0x4d206120
- 0x69016e00
- 0x81000000
-@end example
-
-This forms the trivial trie (note that the path between ``:'' and
-``M'' is redundant):
-
-@example
- 203a ":"
- 40 /
- 40 /
- 10 \
- 40 /
- 40 /
- 204d "M"
- 2061 "a"
- 2069 "i"
- 016e "n" is the last character in a full symbol, and
- with a value represented in one byte.
- 00 The value is 0.
- 81 The serial number is 1.
-@end example
-
-@node mmo section mapping, , Symbol-table, mmo
-@subsection mmo section mapping
-The implementation in BFD uses special data type 80 (decimal) to
-encapsulate and describe named sections, containing e.g.@: debug
-information. If needed, any datum in the encapsulation will be
-quoted using lop_quote. First comes a 32-bit word holding the
-number of 32-bit words containing the zero-terminated zero-padded
-segment name. After the name there's a 32-bit word holding flags
-describing the section type. Then comes a 64-bit big-endian word
-with the section length (in bytes), then another with the section
-start address. Depending on the type of section, the contents
-might follow, zero-padded to 32-bit boundary. For a loadable
-section (such as data or code), the contents might follow at some
-later point, not necessarily immediately, as a lop_loc with the
-same start address as in the section description, followed by the
-contents. This in effect forms a descriptor that must be emitted
-before the actual contents. Sections described this way must not
-overlap.
-
-For areas that don't have such descriptors, synthetic sections are
-formed by BFD. Consecutive contents in the two memory areas
-@samp{0x0000@dots{}00} to @samp{0x01ff@dots{}ff} and
-@samp{0x2000@dots{}00} to @samp{0x20ff@dots{}ff} are entered in
-sections named @code{.text} and @code{.data} respectively. If an area
-is not otherwise described, but would together with a neighboring
-lower area be less than @samp{0x40000000} bytes long, it is joined
-with the lower area and the gap is zero-filled. For other cases,
-a new section is formed, named @code{.MMIX.sec.@var{n}}. Here,
-@var{n} is a number, a running count through the mmo file,
-starting at 0.
-
-A loadable section specified as:
-
-@example
- .section secname,"ax"
- TETRA 1,2,3,4,-1,-2009
- BYTE 80
-@end example
-
-and linked to address @samp{0x4}, is represented by the sequence:
-
-@example
- 0x98080050 - lop_spec 80
- 0x00000002 - two 32-bit words for the section name
- 0x7365636e - "secn"
- 0x616d6500 - "ame\0"
- 0x00000033 - flags CODE, READONLY, LOAD, ALLOC
- 0x00000000 - high 32 bits of section length
- 0x0000001c - section length is 28 bytes; 6 * 4 + 1 + alignment to 32 bits
- 0x00000000 - high 32 bits of section address
- 0x00000004 - section address is 4
- 0x98010002 - 64 bits with address of following data
- 0x00000000 - high 32 bits of address
- 0x00000004 - low 32 bits: data starts at address 4
- 0x00000001 - 1
- 0x00000002 - 2
- 0x00000003 - 3
- 0x00000004 - 4
- 0xffffffff - -1
- 0xfffff827 - -2009
- 0x50000000 - 80 as a byte, padded with zeros.
-@end example
-
-Note that the lop_spec wrapping does not include the section
-contents. Compare this to a non-loaded section specified as:
-
-@example
- .section thirdsec
- TETRA 200001,100002
- BYTE 38,40
-@end example
-
-This, when linked to address @samp{0x200000000000001c}, is
-represented by:
-
-@example
- 0x98080050 - lop_spec 80
- 0x00000002 - two 32-bit words for the section name
- 0x7365636e - "thir"
- 0x616d6500 - "dsec"
- 0x00000010 - flag READONLY
- 0x00000000 - high 32 bits of section length
- 0x0000000c - section length is 12 bytes; 2 * 4 + 2 + alignment to 32 bits
- 0x20000000 - high 32 bits of address
- 0x0000001c - low 32 bits of address 0x200000000000001c
- 0x00030d41 - 200001
- 0x000186a2 - 100002
- 0x26280000 - 38, 40 as bytes, padded with zeros
-@end example
-
-For the latter example, the section contents must not be
-loaded in memory, and is therefore specified as part of the
-special data. The address is usually unimportant but might
-provide information for e.g.@: the DWARF 2 debugging format.
diff --git a/contrib/binutils/bfd/doc/opncls.texi b/contrib/binutils/bfd/doc/opncls.texi
deleted file mode 100644
index 6b47adf..0000000
--- a/contrib/binutils/bfd/doc/opncls.texi
+++ /dev/null
@@ -1,365 +0,0 @@
-@section Opening and closing BFDs
-
-
-@subsection Functions for opening and closing
-
-
-@findex bfd_fopen
-@subsubsection @code{bfd_fopen}
-@strong{Synopsis}
-@example
-bfd *bfd_fopen (const char *filename, const char *target,
- const char *mode, int fd);
-@end example
-@strong{Description}@*
-Open the file @var{filename} with the target @var{target}.
-Return a pointer to the created BFD. If @var{fd} is not -1,
-then @code{fdopen} is used to open the file; otherwise, @code{fopen}
-is used. @var{mode} is passed directly to @code{fopen} or
-@code{fdopen}.
-
-Calls @code{bfd_find_target}, so @var{target} is interpreted as by
-that function.
-
-The new BFD is marked as cacheable iff @var{fd} is -1.
-
-If @code{NULL} is returned then an error has occured. Possible errors
-are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or
-@code{system_call} error.
-
-@findex bfd_openr
-@subsubsection @code{bfd_openr}
-@strong{Synopsis}
-@example
-bfd *bfd_openr (const char *filename, const char *target);
-@end example
-@strong{Description}@*
-Open the file @var{filename} (using @code{fopen}) with the target
-@var{target}. Return a pointer to the created BFD.
-
-Calls @code{bfd_find_target}, so @var{target} is interpreted as by
-that function.
-
-If @code{NULL} is returned then an error has occured. Possible errors
-are @code{bfd_error_no_memory}, @code{bfd_error_invalid_target} or
-@code{system_call} error.
-
-@findex bfd_fdopenr
-@subsubsection @code{bfd_fdopenr}
-@strong{Synopsis}
-@example
-bfd *bfd_fdopenr (const char *filename, const char *target, int fd);
-@end example
-@strong{Description}@*
-@code{bfd_fdopenr} is to @code{bfd_fopenr} much like @code{fdopen} is to
-@code{fopen}. It opens a BFD on a file already described by the
-@var{fd} supplied.
-
-When the file is later @code{bfd_close}d, the file descriptor will
-be closed. If the caller desires that this file descriptor be
-cached by BFD (opened as needed, closed as needed to free
-descriptors for other opens), with the supplied @var{fd} used as
-an initial file descriptor (but subject to closure at any time),
-call bfd_set_cacheable(bfd, 1) on the returned BFD. The default
-is to assume no caching; the file descriptor will remain open
-until @code{bfd_close}, and will not be affected by BFD operations
-on other files.
-
-Possible errors are @code{bfd_error_no_memory},
-@code{bfd_error_invalid_target} and @code{bfd_error_system_call}.
-
-@findex bfd_openstreamr
-@subsubsection @code{bfd_openstreamr}
-@strong{Synopsis}
-@example
-bfd *bfd_openstreamr (const char *, const char *, void *);
-@end example
-@strong{Description}@*
-Open a BFD for read access on an existing stdio stream. When
-the BFD is passed to @code{bfd_close}, the stream will be closed.
-
-@findex bfd_openr_iovec
-@subsubsection @code{bfd_openr_iovec}
-@strong{Synopsis}
-@example
-bfd *bfd_openr_iovec (const char *filename, const char *target,
- void *(*open) (struct bfd *nbfd,
- void *open_closure),
- void *open_closure,
- file_ptr (*pread) (struct bfd *nbfd,
- void *stream,
- void *buf,
- file_ptr nbytes,
- file_ptr offset),
- int (*close) (struct bfd *nbfd,
- void *stream));
-@end example
-@strong{Description}@*
-Create and return a BFD backed by a read-only @var{stream}.
-The @var{stream} is created using @var{open}, accessed using
-@var{pread} and destroyed using @var{close}.
-
-Calls @code{bfd_find_target}, so @var{target} is interpreted as by
-that function.
-
-Calls @var{open} (which can call @code{bfd_zalloc} and
-@code{bfd_get_filename}) to obtain the read-only stream backing
-the BFD. @var{open} either succeeds returning the
-non-@code{NULL} @var{stream}, or fails returning @code{NULL}
-(setting @code{bfd_error}).
-
-Calls @var{pread} to request @var{nbytes} of data from
-@var{stream} starting at @var{offset} (e.g., via a call to
-@code{bfd_read}). @var{pread} either succeeds returning the
-number of bytes read (which can be less than @var{nbytes} when
-end-of-file), or fails returning -1 (setting @code{bfd_error}).
-
-Calls @var{close} when the BFD is later closed using
-@code{bfd_close}. @var{close} either succeeds returning 0, or
-fails returning -1 (setting @code{bfd_error}).
-
-If @code{bfd_openr_iovec} returns @code{NULL} then an error has
-occurred. Possible errors are @code{bfd_error_no_memory},
-@code{bfd_error_invalid_target} and @code{bfd_error_system_call}.
-
-@findex bfd_openw
-@subsubsection @code{bfd_openw}
-@strong{Synopsis}
-@example
-bfd *bfd_openw (const char *filename, const char *target);
-@end example
-@strong{Description}@*
-Create a BFD, associated with file @var{filename}, using the
-file format @var{target}, and return a pointer to it.
-
-Possible errors are @code{bfd_error_system_call}, @code{bfd_error_no_memory},
-@code{bfd_error_invalid_target}.
-
-@findex bfd_close
-@subsubsection @code{bfd_close}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_close (bfd *abfd);
-@end example
-@strong{Description}@*
-Close a BFD. If the BFD was open for writing, then pending
-operations are completed and the file written out and closed.
-If the created file is executable, then @code{chmod} is called
-to mark it as such.
-
-All memory attached to the BFD is released.
-
-The file descriptor associated with the BFD is closed (even
-if it was passed in to BFD by @code{bfd_fdopenr}).
-
-@strong{Returns}@*
-@code{TRUE} is returned if all is ok, otherwise @code{FALSE}.
-
-@findex bfd_close_all_done
-@subsubsection @code{bfd_close_all_done}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_close_all_done (bfd *);
-@end example
-@strong{Description}@*
-Close a BFD. Differs from @code{bfd_close} since it does not
-complete any pending operations. This routine would be used
-if the application had just used BFD for swapping and didn't
-want to use any of the writing code.
-
-If the created file is executable, then @code{chmod} is called
-to mark it as such.
-
-All memory attached to the BFD is released.
-
-@strong{Returns}@*
-@code{TRUE} is returned if all is ok, otherwise @code{FALSE}.
-
-@findex bfd_create
-@subsubsection @code{bfd_create}
-@strong{Synopsis}
-@example
-bfd *bfd_create (const char *filename, bfd *templ);
-@end example
-@strong{Description}@*
-Create a new BFD in the manner of @code{bfd_openw}, but without
-opening a file. The new BFD takes the target from the target
-used by @var{template}. The format is always set to @code{bfd_object}.
-
-@findex bfd_make_writable
-@subsubsection @code{bfd_make_writable}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_make_writable (bfd *abfd);
-@end example
-@strong{Description}@*
-Takes a BFD as created by @code{bfd_create} and converts it
-into one like as returned by @code{bfd_openw}. It does this
-by converting the BFD to BFD_IN_MEMORY. It's assumed that
-you will call @code{bfd_make_readable} on this bfd later.
-
-@strong{Returns}@*
-@code{TRUE} is returned if all is ok, otherwise @code{FALSE}.
-
-@findex bfd_make_readable
-@subsubsection @code{bfd_make_readable}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_make_readable (bfd *abfd);
-@end example
-@strong{Description}@*
-Takes a BFD as created by @code{bfd_create} and
-@code{bfd_make_writable} and converts it into one like as
-returned by @code{bfd_openr}. It does this by writing the
-contents out to the memory buffer, then reversing the
-direction.
-
-@strong{Returns}@*
-@code{TRUE} is returned if all is ok, otherwise @code{FALSE}.
-
-@findex bfd_alloc
-@subsubsection @code{bfd_alloc}
-@strong{Synopsis}
-@example
-void *bfd_alloc (bfd *abfd, bfd_size_type wanted);
-@end example
-@strong{Description}@*
-Allocate a block of @var{wanted} bytes of memory attached to
-@code{abfd} and return a pointer to it.
-
-@findex bfd_alloc2
-@subsubsection @code{bfd_alloc2}
-@strong{Synopsis}
-@example
-void *bfd_alloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
-@end example
-@strong{Description}@*
-Allocate a block of @var{nmemb} elements of @var{size} bytes each
-of memory attached to @code{abfd} and return a pointer to it.
-
-@findex bfd_zalloc
-@subsubsection @code{bfd_zalloc}
-@strong{Synopsis}
-@example
-void *bfd_zalloc (bfd *abfd, bfd_size_type wanted);
-@end example
-@strong{Description}@*
-Allocate a block of @var{wanted} bytes of zeroed memory
-attached to @code{abfd} and return a pointer to it.
-
-@findex bfd_zalloc2
-@subsubsection @code{bfd_zalloc2}
-@strong{Synopsis}
-@example
-void *bfd_zalloc2 (bfd *abfd, bfd_size_type nmemb, bfd_size_type size);
-@end example
-@strong{Description}@*
-Allocate a block of @var{nmemb} elements of @var{size} bytes each
-of zeroed memory attached to @code{abfd} and return a pointer to it.
-
-@findex bfd_calc_gnu_debuglink_crc32
-@subsubsection @code{bfd_calc_gnu_debuglink_crc32}
-@strong{Synopsis}
-@example
-unsigned long bfd_calc_gnu_debuglink_crc32
- (unsigned long crc, const unsigned char *buf, bfd_size_type len);
-@end example
-@strong{Description}@*
-Computes a CRC value as used in the .gnu_debuglink section.
-Advances the previously computed @var{crc} value by computing
-and adding in the crc32 for @var{len} bytes of @var{buf}.
-
-@strong{Returns}@*
-Return the updated CRC32 value.
-
-@findex get_debug_link_info
-@subsubsection @code{get_debug_link_info}
-@strong{Synopsis}
-@example
-char *get_debug_link_info (bfd *abfd, unsigned long *crc32_out);
-@end example
-@strong{Description}@*
-fetch the filename and CRC32 value for any separate debuginfo
-associated with @var{abfd}. Return NULL if no such info found,
-otherwise return filename and update @var{crc32_out}.
-
-@findex separate_debug_file_exists
-@subsubsection @code{separate_debug_file_exists}
-@strong{Synopsis}
-@example
-bfd_boolean separate_debug_file_exists
- (char *name, unsigned long crc32);
-@end example
-@strong{Description}@*
-Checks to see if @var{name} is a file and if its contents
-match @var{crc32}.
-
-@findex find_separate_debug_file
-@subsubsection @code{find_separate_debug_file}
-@strong{Synopsis}
-@example
-char *find_separate_debug_file (bfd *abfd);
-@end example
-@strong{Description}@*
-Searches @var{abfd} for a reference to separate debugging
-information, scans various locations in the filesystem, including
-the file tree rooted at @var{debug_file_directory}, and returns a
-filename of such debugging information if the file is found and has
-matching CRC32. Returns NULL if no reference to debugging file
-exists, or file cannot be found.
-
-@findex bfd_follow_gnu_debuglink
-@subsubsection @code{bfd_follow_gnu_debuglink}
-@strong{Synopsis}
-@example
-char *bfd_follow_gnu_debuglink (bfd *abfd, const char *dir);
-@end example
-@strong{Description}@*
-Takes a BFD and searches it for a .gnu_debuglink section. If this
-section is found, it examines the section for the name and checksum
-of a '.debug' file containing auxiliary debugging information. It
-then searches the filesystem for this .debug file in some standard
-locations, including the directory tree rooted at @var{dir}, and if
-found returns the full filename.
-
-If @var{dir} is NULL, it will search a default path configured into
-libbfd at build time. [XXX this feature is not currently
-implemented].
-
-@strong{Returns}@*
-@code{NULL} on any errors or failure to locate the .debug file,
-otherwise a pointer to a heap-allocated string containing the
-filename. The caller is responsible for freeing this string.
-
-@findex bfd_create_gnu_debuglink_section
-@subsubsection @code{bfd_create_gnu_debuglink_section}
-@strong{Synopsis}
-@example
-struct bfd_section *bfd_create_gnu_debuglink_section
- (bfd *abfd, const char *filename);
-@end example
-@strong{Description}@*
-Takes a @var{BFD} and adds a .gnu_debuglink section to it. The section is sized
-to be big enough to contain a link to the specified @var{filename}.
-
-@strong{Returns}@*
-A pointer to the new section is returned if all is ok. Otherwise @code{NULL} is
-returned and bfd_error is set.
-
-@findex bfd_fill_in_gnu_debuglink_section
-@subsubsection @code{bfd_fill_in_gnu_debuglink_section}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_fill_in_gnu_debuglink_section
- (bfd *abfd, struct bfd_section *sect, const char *filename);
-@end example
-@strong{Description}@*
-Takes a @var{BFD} and containing a .gnu_debuglink section @var{SECT}
-and fills in the contents of the section to contain a link to the
-specified @var{filename}. The filename should be relative to the
-current directory.
-
-@strong{Returns}@*
-@code{TRUE} is returned if all is ok. Otherwise @code{FALSE} is returned
-and bfd_error is set.
-
diff --git a/contrib/binutils/bfd/doc/reloc.texi b/contrib/binutils/bfd/doc/reloc.texi
deleted file mode 100644
index 0540be8..0000000
--- a/contrib/binutils/bfd/doc/reloc.texi
+++ /dev/null
@@ -1,2494 +0,0 @@
-@section Relocations
-BFD maintains relocations in much the same way it maintains
-symbols: they are left alone until required, then read in
-en-masse and translated into an internal form. A common
-routine @code{bfd_perform_relocation} acts upon the
-canonical form to do the fixup.
-
-Relocations are maintained on a per section basis,
-while symbols are maintained on a per BFD basis.
-
-All that a back end has to do to fit the BFD interface is to create
-a @code{struct reloc_cache_entry} for each relocation
-in a particular section, and fill in the right bits of the structures.
-
-@menu
-* typedef arelent::
-* howto manager::
-@end menu
-
-
-@node typedef arelent, howto manager, Relocations, Relocations
-@subsection typedef arelent
-This is the structure of a relocation entry:
-
-
-@example
-
-typedef enum bfd_reloc_status
-@{
- /* No errors detected. */
- bfd_reloc_ok,
-
- /* The relocation was performed, but there was an overflow. */
- bfd_reloc_overflow,
-
- /* The address to relocate was not within the section supplied. */
- bfd_reloc_outofrange,
-
- /* Used by special functions. */
- bfd_reloc_continue,
-
- /* Unsupported relocation size requested. */
- bfd_reloc_notsupported,
-
- /* Unused. */
- bfd_reloc_other,
-
- /* 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. */
- bfd_reloc_dangerous
- @}
- bfd_reloc_status_type;
-
-
-typedef struct reloc_cache_entry
-@{
- /* A pointer into the canonical table of pointers. */
- struct bfd_symbol **sym_ptr_ptr;
-
- /* offset in section. */
- bfd_size_type address;
-
- /* addend for relocation value. */
- bfd_vma addend;
-
- /* Pointer to how to perform the required relocation. */
- reloc_howto_type *howto;
-
-@}
-arelent;
-
-@end example
-@strong{Description}@*
-Here is a description of each of the fields within an @code{arelent}:
-
-@itemize @bullet
-
-@item
-@code{sym_ptr_ptr}
-@end itemize
-The symbol table pointer points to a pointer to the symbol
-associated with the relocation request. It is the pointer
-into the table returned by the back end's
-@code{canonicalize_symtab} action. @xref{Symbols}. The symbol is
-referenced through a pointer to a pointer so that tools like
-the linker can fix up all the symbols of the same name by
-modifying only one pointer. The relocation routine looks in
-the symbol and uses the base of the section the symbol is
-attached to and the value of the symbol as the initial
-relocation offset. If the symbol pointer is zero, then the
-section provided is looked up.
-
-@itemize @bullet
-
-@item
-@code{address}
-@end itemize
-The @code{address} field gives the offset in bytes from the base of
-the section data which owns the relocation record to the first
-byte of relocatable information. The actual data relocated
-will be relative to this point; for example, a relocation
-type which modifies the bottom two bytes of a four byte word
-would not touch the first byte pointed to in a big endian
-world.
-
-@itemize @bullet
-
-@item
-@code{addend}
-@end itemize
-The @code{addend} is a value provided by the back end to be added (!)
-to the relocation offset. Its interpretation is dependent upon
-the howto. For example, on the 68k the code:
-
-@example
- char foo[];
- main()
- @{
- return foo[0x12345678];
- @}
-@end example
-
-Could be compiled into:
-
-@example
- linkw fp,#-4
- moveb @@#12345678,d0
- extbl d0
- unlk fp
- rts
-@end example
-
-This could create a reloc pointing to @code{foo}, but leave the
-offset in the data, something like:
-
-@example
-RELOCATION RECORDS FOR [.text]:
-offset type value
-00000006 32 _foo
-
-00000000 4e56 fffc ; linkw fp,#-4
-00000004 1039 1234 5678 ; moveb @@#12345678,d0
-0000000a 49c0 ; extbl d0
-0000000c 4e5e ; unlk fp
-0000000e 4e75 ; rts
-@end example
-
-Using coff and an 88k, some instructions don't have enough
-space in them to represent the full address range, and
-pointers have to be loaded in two parts. So you'd get something like:
-
-@example
- or.u r13,r0,hi16(_foo+0x12345678)
- ld.b r2,r13,lo16(_foo+0x12345678)
- jmp r1
-@end example
-
-This should create two relocs, both pointing to @code{_foo}, and with
-0x12340000 in their addend field. The data would consist of:
-
-@example
-RELOCATION RECORDS FOR [.text]:
-offset type value
-00000002 HVRT16 _foo+0x12340000
-00000006 LVRT16 _foo+0x12340000
-
-00000000 5da05678 ; or.u r13,r0,0x5678
-00000004 1c4d5678 ; ld.b r2,r13,0x5678
-00000008 f400c001 ; jmp r1
-@end example
-
-The relocation routine digs out the value from the data, adds
-it to the addend to get the original offset, and then adds the
-value of @code{_foo}. Note that all 32 bits have to be kept around
-somewhere, to cope with carry from bit 15 to bit 16.
-
-One further example is the sparc and the a.out format. The
-sparc has a similar problem to the 88k, in that some
-instructions don't have room for an entire offset, but on the
-sparc the parts are created in odd sized lumps. The designers of
-the a.out format chose to not use the data within the section
-for storing part of the offset; all the offset is kept within
-the reloc. Anything in the data should be ignored.
-
-@example
- save %sp,-112,%sp
- sethi %hi(_foo+0x12345678),%g2
- ldsb [%g2+%lo(_foo+0x12345678)],%i0
- ret
- restore
-@end example
-
-Both relocs contain a pointer to @code{foo}, and the offsets
-contain junk.
-
-@example
-RELOCATION RECORDS FOR [.text]:
-offset type value
-00000004 HI22 _foo+0x12345678
-00000008 LO10 _foo+0x12345678
-
-00000000 9de3bf90 ; save %sp,-112,%sp
-00000004 05000000 ; sethi %hi(_foo+0),%g2
-00000008 f048a000 ; ldsb [%g2+%lo(_foo+0)],%i0
-0000000c 81c7e008 ; ret
-00000010 81e80000 ; restore
-@end example
-
-@itemize @bullet
-
-@item
-@code{howto}
-@end itemize
-The @code{howto} field can be imagined as a
-relocation instruction. It is a pointer to a structure which
-contains information on what to do with all of the other
-information in the reloc record and data section. A back end
-would normally have a relocation instruction set and turn
-relocations into pointers to the correct structure on input -
-but it would be possible to create each howto field on demand.
-
-@subsubsection @code{enum complain_overflow}
-Indicates what sort of overflow checking should be done when
-performing a relocation.
-
-
-@example
-
-enum complain_overflow
-@{
- /* Do not complain on overflow. */
- complain_overflow_dont,
-
- /* Complain if the value overflows when considered as a signed
- number one bit larger than the field. ie. A bitfield of N bits
- is allowed to represent -2**n to 2**n-1. */
- complain_overflow_bitfield,
-
- /* Complain if the value overflows when considered as a signed
- number. */
- complain_overflow_signed,
-
- /* Complain if the value overflows when considered as an
- unsigned number. */
- complain_overflow_unsigned
-@};
-@end example
-@subsubsection @code{reloc_howto_type}
-The @code{reloc_howto_type} is a structure which contains all the
-information that libbfd needs to know to tie up a back end's data.
-
-
-@example
-struct bfd_symbol; /* Forward declaration. */
-
-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. */
- unsigned int type;
-
- /* 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. */
- int size;
-
- /* 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. */
- bfd_boolean pc_relative;
-
- /* 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. */
- 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 accommodated (e.g., i960 callj
- instructions). */
- bfd_reloc_status_type (*special_function)
- (bfd *, arelent *, struct bfd_symbol *, void *, 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. */
- bfd_boolean partial_inplace;
-
- /* src_mask selects the part of the instruction (or data) to be used
- in the relocation sum. If the target relocations don't have an
- addend in the reloc, eg. ELF USE_REL, src_mask will normally equal
- dst_mask to extract the addend from the section contents. If
- relocations do have an addend in the reloc, eg. ELF USE_RELA, this
- field should be zero. Non-zero values for ELF USE_RELA targets are
- bogus as in those cases the value in the dst_mask part of the
- section contents should be treated as garbage. */
- bfd_vma src_mask;
-
- /* dst_mask selects which parts of the instruction (or data) are
- replaced with a relocated value. */
- 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. */
- bfd_boolean pcrel_offset;
-@};
-
-@end example
-@findex The HOWTO Macro
-@subsubsection @code{The HOWTO Macro}
-@strong{Description}@*
-The HOWTO define is horrible and will go away.
-@example
-#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 @}
-@end example
-
-@strong{Description}@*
-And will be replaced with the totally magic way. But for the
-moment, we are compatible, so do it this way.
-@example
-#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
- HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
- NAME, FALSE, 0, 0, IN)
-
-@end example
-
-@strong{Description}@*
-This is used to fill in an empty howto entry in an array.
-@example
-#define EMPTY_HOWTO(C) \
- HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \
- NULL, FALSE, 0, 0, FALSE)
-
-@end example
-
-@strong{Description}@*
-Helper routine to turn a symbol into a relocation value.
-@example
-#define HOWTO_PREPARE(relocation, symbol) \
- @{ \
- if (symbol != NULL) \
- @{ \
- if (bfd_is_com_section (symbol->section)) \
- @{ \
- relocation = 0; \
- @} \
- else \
- @{ \
- relocation = symbol->value; \
- @} \
- @} \
- @}
-
-@end example
-
-@findex bfd_get_reloc_size
-@subsubsection @code{bfd_get_reloc_size}
-@strong{Synopsis}
-@example
-unsigned int bfd_get_reloc_size (reloc_howto_type *);
-@end example
-@strong{Description}@*
-For a reloc_howto_type that operates on a fixed number of bytes,
-this returns the number of bytes operated on.
-
-@findex arelent_chain
-@subsubsection @code{arelent_chain}
-@strong{Description}@*
-How relocs are tied together in an @code{asection}:
-@example
-typedef struct relent_chain
-@{
- arelent relent;
- struct relent_chain *next;
-@}
-arelent_chain;
-
-@end example
-
-@findex bfd_check_overflow
-@subsubsection @code{bfd_check_overflow}
-@strong{Synopsis}
-@example
-bfd_reloc_status_type bfd_check_overflow
- (enum complain_overflow how,
- unsigned int bitsize,
- unsigned int rightshift,
- unsigned int addrsize,
- bfd_vma relocation);
-@end example
-@strong{Description}@*
-Perform overflow checking on @var{relocation} which has
-@var{bitsize} significant bits and will be shifted right by
-@var{rightshift} bits, on a machine with addresses containing
-@var{addrsize} significant bits. The result is either of
-@code{bfd_reloc_ok} or @code{bfd_reloc_overflow}.
-
-@findex bfd_perform_relocation
-@subsubsection @code{bfd_perform_relocation}
-@strong{Synopsis}
-@example
-bfd_reloc_status_type bfd_perform_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message);
-@end example
-@strong{Description}@*
-If @var{output_bfd} is supplied to this function, the
-generated image will be relocatable; the relocations are
-copied to the output file after they have been changed to
-reflect the new state of the world. There are two ways of
-reflecting the results of partial linkage in an output file:
-by modifying the output data in place, and by modifying the
-relocation record. Some native formats (e.g., basic a.out and
-basic coff) have no way of specifying an addend in the
-relocation type, so the addend has to go in the output data.
-This is no big deal since in these formats the output data
-slot will always be big enough for the addend. Complex reloc
-types with addends were invented to solve just this problem.
-The @var{error_message} argument is set to an error message if
-this return @code{bfd_reloc_dangerous}.
-
-@findex bfd_install_relocation
-@subsubsection @code{bfd_install_relocation}
-@strong{Synopsis}
-@example
-bfd_reloc_status_type bfd_install_relocation
- (bfd *abfd,
- arelent *reloc_entry,
- void *data, bfd_vma data_start,
- asection *input_section,
- char **error_message);
-@end example
-@strong{Description}@*
-This looks remarkably like @code{bfd_perform_relocation}, except it
-does not expect that the section contents have been filled in.
-I.e., it's suitable for use when creating, rather than applying
-a relocation.
-
-For now, this function should be considered reserved for the
-assembler.
-
-
-@node howto manager, , typedef arelent, Relocations
-@subsection The howto manager
-When an application wants to create a relocation, but doesn't
-know what the target machine might call it, it can find out by
-using this bit of code.
-
-@findex bfd_reloc_code_type
-@subsubsection @code{bfd_reloc_code_type}
-@strong{Description}@*
-The insides of a reloc code. The idea is that, eventually, there
-will be one enumerator for every type of relocation we ever do.
-Pass one of these values to @code{bfd_reloc_type_lookup}, and it'll
-return a howto pointer.
-
-This does mean that the application must determine the correct
-enumerator value; you can't get a howto pointer from a random set
-of attributes.
-
-Here are the possible values for @code{enum bfd_reloc_code_real}:
-
-@deffn {} BFD_RELOC_64
-@deffnx {} BFD_RELOC_32
-@deffnx {} BFD_RELOC_26
-@deffnx {} BFD_RELOC_24
-@deffnx {} BFD_RELOC_16
-@deffnx {} BFD_RELOC_14
-@deffnx {} BFD_RELOC_8
-Basic absolute relocations of N bits.
-@end deffn
-@deffn {} BFD_RELOC_64_PCREL
-@deffnx {} BFD_RELOC_32_PCREL
-@deffnx {} BFD_RELOC_24_PCREL
-@deffnx {} BFD_RELOC_16_PCREL
-@deffnx {} BFD_RELOC_12_PCREL
-@deffnx {} BFD_RELOC_8_PCREL
-PC-relative relocations. Sometimes these are relative to the address
-of the relocation itself; sometimes they are relative to the start of
-the section containing the relocation. It depends on the specific target.
-
-The 24-bit relocation is used in some Intel 960 configurations.
-@end deffn
-@deffn {} BFD_RELOC_32_SECREL
-Section relative relocations. Some targets need this for DWARF2.
-@end deffn
-@deffn {} BFD_RELOC_32_GOT_PCREL
-@deffnx {} BFD_RELOC_16_GOT_PCREL
-@deffnx {} BFD_RELOC_8_GOT_PCREL
-@deffnx {} BFD_RELOC_32_GOTOFF
-@deffnx {} BFD_RELOC_16_GOTOFF
-@deffnx {} BFD_RELOC_LO16_GOTOFF
-@deffnx {} BFD_RELOC_HI16_GOTOFF
-@deffnx {} BFD_RELOC_HI16_S_GOTOFF
-@deffnx {} BFD_RELOC_8_GOTOFF
-@deffnx {} BFD_RELOC_64_PLT_PCREL
-@deffnx {} BFD_RELOC_32_PLT_PCREL
-@deffnx {} BFD_RELOC_24_PLT_PCREL
-@deffnx {} BFD_RELOC_16_PLT_PCREL
-@deffnx {} BFD_RELOC_8_PLT_PCREL
-@deffnx {} BFD_RELOC_64_PLTOFF
-@deffnx {} BFD_RELOC_32_PLTOFF
-@deffnx {} BFD_RELOC_16_PLTOFF
-@deffnx {} BFD_RELOC_LO16_PLTOFF
-@deffnx {} BFD_RELOC_HI16_PLTOFF
-@deffnx {} BFD_RELOC_HI16_S_PLTOFF
-@deffnx {} BFD_RELOC_8_PLTOFF
-For ELF.
-@end deffn
-@deffn {} BFD_RELOC_68K_GLOB_DAT
-@deffnx {} BFD_RELOC_68K_JMP_SLOT
-@deffnx {} BFD_RELOC_68K_RELATIVE
-Relocations used by 68K ELF.
-@end deffn
-@deffn {} BFD_RELOC_32_BASEREL
-@deffnx {} BFD_RELOC_16_BASEREL
-@deffnx {} BFD_RELOC_LO16_BASEREL
-@deffnx {} BFD_RELOC_HI16_BASEREL
-@deffnx {} BFD_RELOC_HI16_S_BASEREL
-@deffnx {} BFD_RELOC_8_BASEREL
-@deffnx {} BFD_RELOC_RVA
-Linkage-table relative.
-@end deffn
-@deffn {} BFD_RELOC_8_FFnn
-Absolute 8-bit relocation, but used to form an address like 0xFFnn.
-@end deffn
-@deffn {} BFD_RELOC_32_PCREL_S2
-@deffnx {} BFD_RELOC_16_PCREL_S2
-@deffnx {} BFD_RELOC_23_PCREL_S2
-These PC-relative relocations are stored as word displacements --
-i.e., byte displacements shifted right two bits. The 30-bit word
-displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
-SPARC. (SPARC tools generally refer to this as <<WDISP30>>.) The
-signed 16-bit displacement is used on the MIPS, and the 23-bit
-displacement is used on the Alpha.
-@end deffn
-@deffn {} BFD_RELOC_HI22
-@deffnx {} BFD_RELOC_LO10
-High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
-the target word. These are used on the SPARC.
-@end deffn
-@deffn {} BFD_RELOC_GPREL16
-@deffnx {} BFD_RELOC_GPREL32
-For systems that allocate a Global Pointer register, these are
-displacements off that register. These relocation types are
-handled specially, because the value the register will have is
-decided relatively late.
-@end deffn
-@deffn {} BFD_RELOC_I960_CALLJ
-Reloc types used for i960/b.out.
-@end deffn
-@deffn {} BFD_RELOC_NONE
-@deffnx {} BFD_RELOC_SPARC_WDISP22
-@deffnx {} BFD_RELOC_SPARC22
-@deffnx {} BFD_RELOC_SPARC13
-@deffnx {} BFD_RELOC_SPARC_GOT10
-@deffnx {} BFD_RELOC_SPARC_GOT13
-@deffnx {} BFD_RELOC_SPARC_GOT22
-@deffnx {} BFD_RELOC_SPARC_PC10
-@deffnx {} BFD_RELOC_SPARC_PC22
-@deffnx {} BFD_RELOC_SPARC_WPLT30
-@deffnx {} BFD_RELOC_SPARC_COPY
-@deffnx {} BFD_RELOC_SPARC_GLOB_DAT
-@deffnx {} BFD_RELOC_SPARC_JMP_SLOT
-@deffnx {} BFD_RELOC_SPARC_RELATIVE
-@deffnx {} BFD_RELOC_SPARC_UA16
-@deffnx {} BFD_RELOC_SPARC_UA32
-@deffnx {} BFD_RELOC_SPARC_UA64
-SPARC ELF relocations. There is probably some overlap with other
-relocation types already defined.
-@end deffn
-@deffn {} BFD_RELOC_SPARC_BASE13
-@deffnx {} BFD_RELOC_SPARC_BASE22
-I think these are specific to SPARC a.out (e.g., Sun 4).
-@end deffn
-@deffn {} BFD_RELOC_SPARC_64
-@deffnx {} BFD_RELOC_SPARC_10
-@deffnx {} BFD_RELOC_SPARC_11
-@deffnx {} BFD_RELOC_SPARC_OLO10
-@deffnx {} BFD_RELOC_SPARC_HH22
-@deffnx {} BFD_RELOC_SPARC_HM10
-@deffnx {} BFD_RELOC_SPARC_LM22
-@deffnx {} BFD_RELOC_SPARC_PC_HH22
-@deffnx {} BFD_RELOC_SPARC_PC_HM10
-@deffnx {} BFD_RELOC_SPARC_PC_LM22
-@deffnx {} BFD_RELOC_SPARC_WDISP16
-@deffnx {} BFD_RELOC_SPARC_WDISP19
-@deffnx {} BFD_RELOC_SPARC_7
-@deffnx {} BFD_RELOC_SPARC_6
-@deffnx {} BFD_RELOC_SPARC_5
-@deffnx {} BFD_RELOC_SPARC_DISP64
-@deffnx {} BFD_RELOC_SPARC_PLT32
-@deffnx {} BFD_RELOC_SPARC_PLT64
-@deffnx {} BFD_RELOC_SPARC_HIX22
-@deffnx {} BFD_RELOC_SPARC_LOX10
-@deffnx {} BFD_RELOC_SPARC_H44
-@deffnx {} BFD_RELOC_SPARC_M44
-@deffnx {} BFD_RELOC_SPARC_L44
-@deffnx {} BFD_RELOC_SPARC_REGISTER
-SPARC64 relocations
-@end deffn
-@deffn {} BFD_RELOC_SPARC_REV32
-SPARC little endian relocation
-@end deffn
-@deffn {} BFD_RELOC_SPARC_TLS_GD_HI22
-@deffnx {} BFD_RELOC_SPARC_TLS_GD_LO10
-@deffnx {} BFD_RELOC_SPARC_TLS_GD_ADD
-@deffnx {} BFD_RELOC_SPARC_TLS_GD_CALL
-@deffnx {} BFD_RELOC_SPARC_TLS_LDM_HI22
-@deffnx {} BFD_RELOC_SPARC_TLS_LDM_LO10
-@deffnx {} BFD_RELOC_SPARC_TLS_LDM_ADD
-@deffnx {} BFD_RELOC_SPARC_TLS_LDM_CALL
-@deffnx {} BFD_RELOC_SPARC_TLS_LDO_HIX22
-@deffnx {} BFD_RELOC_SPARC_TLS_LDO_LOX10
-@deffnx {} BFD_RELOC_SPARC_TLS_LDO_ADD
-@deffnx {} BFD_RELOC_SPARC_TLS_IE_HI22
-@deffnx {} BFD_RELOC_SPARC_TLS_IE_LO10
-@deffnx {} BFD_RELOC_SPARC_TLS_IE_LD
-@deffnx {} BFD_RELOC_SPARC_TLS_IE_LDX
-@deffnx {} BFD_RELOC_SPARC_TLS_IE_ADD
-@deffnx {} BFD_RELOC_SPARC_TLS_LE_HIX22
-@deffnx {} BFD_RELOC_SPARC_TLS_LE_LOX10
-@deffnx {} BFD_RELOC_SPARC_TLS_DTPMOD32
-@deffnx {} BFD_RELOC_SPARC_TLS_DTPMOD64
-@deffnx {} BFD_RELOC_SPARC_TLS_DTPOFF32
-@deffnx {} BFD_RELOC_SPARC_TLS_DTPOFF64
-@deffnx {} BFD_RELOC_SPARC_TLS_TPOFF32
-@deffnx {} BFD_RELOC_SPARC_TLS_TPOFF64
-SPARC TLS relocations
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_GPDISP_HI16
-Alpha ECOFF and ELF relocations. Some of these treat the symbol or
-"addend" in some special way.
-For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
-writing; when reading, it will be the absolute section symbol. The
-addend is the displacement in bytes of the "lda" instruction from
-the "ldah" instruction (which is at the address of this reloc).
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_GPDISP_LO16
-For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
-with GPDISP_HI16 relocs. The addend is ignored when writing the
-relocations out, and is filled in with the file's GP value on
-reading, for convenience.
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_GPDISP
-The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
-relocation except that there is no accompanying GPDISP_LO16
-relocation.
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_LITERAL
-@deffnx {} BFD_RELOC_ALPHA_ELF_LITERAL
-@deffnx {} BFD_RELOC_ALPHA_LITUSE
-The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
-the assembler turns it into a LDQ instruction to load the address of
-the symbol, and then fills in a register in the real instruction.
-
-The LITERAL reloc, at the LDQ instruction, refers to the .lita
-section symbol. The addend is ignored when writing, but is filled
-in with the file's GP value on reading, for convenience, as with the
-GPDISP_LO16 reloc.
-
-The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
-It should refer to the symbol to be referenced, as with 16_GOTOFF,
-but it generates output not based on the position within the .got
-section, but relative to the GP value chosen for the file during the
-final link stage.
-
-The LITUSE reloc, on the instruction using the loaded address, gives
-information to the linker that it might be able to use to optimize
-away some literal section references. The symbol is ignored (read
-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)
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_HINT
-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.
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_LINKAGE
-The LINKAGE relocation outputs a linkage pair in the object file,
-which is filled by the linker.
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_CODEADDR
-The CODEADDR relocation outputs a STO_CA in the object file,
-which is filled by the linker.
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_GPREL_HI16
-@deffnx {} BFD_RELOC_ALPHA_GPREL_LO16
-The GPREL_HI/LO relocations together form a 32-bit offset from the
-GP register.
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_BRSGP
-Like BFD_RELOC_23_PCREL_S2, except that the source and target must
-share a common GP, and the target address is adjusted for
-STO_ALPHA_STD_GPLOAD.
-@end deffn
-@deffn {} BFD_RELOC_ALPHA_TLSGD
-@deffnx {} BFD_RELOC_ALPHA_TLSLDM
-@deffnx {} BFD_RELOC_ALPHA_DTPMOD64
-@deffnx {} BFD_RELOC_ALPHA_GOTDTPREL16
-@deffnx {} BFD_RELOC_ALPHA_DTPREL64
-@deffnx {} BFD_RELOC_ALPHA_DTPREL_HI16
-@deffnx {} BFD_RELOC_ALPHA_DTPREL_LO16
-@deffnx {} BFD_RELOC_ALPHA_DTPREL16
-@deffnx {} BFD_RELOC_ALPHA_GOTTPREL16
-@deffnx {} BFD_RELOC_ALPHA_TPREL64
-@deffnx {} BFD_RELOC_ALPHA_TPREL_HI16
-@deffnx {} BFD_RELOC_ALPHA_TPREL_LO16
-@deffnx {} BFD_RELOC_ALPHA_TPREL16
-Alpha thread-local storage relocations.
-@end deffn
-@deffn {} BFD_RELOC_MIPS_JMP
-Bits 27..2 of the relocation address shifted right 2 bits;
-simple reloc otherwise.
-@end deffn
-@deffn {} BFD_RELOC_MIPS16_JMP
-The MIPS16 jump instruction.
-@end deffn
-@deffn {} BFD_RELOC_MIPS16_GPREL
-MIPS16 GP relative reloc.
-@end deffn
-@deffn {} BFD_RELOC_HI16
-High 16 bits of 32-bit value; simple reloc.
-@end deffn
-@deffn {} BFD_RELOC_HI16_S
-High 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added.
-@end deffn
-@deffn {} BFD_RELOC_LO16
-Low 16 bits.
-@end deffn
-@deffn {} BFD_RELOC_HI16_PCREL
-High 16 bits of 32-bit pc-relative value
-@end deffn
-@deffn {} BFD_RELOC_HI16_S_PCREL
-High 16 bits of 32-bit pc-relative value, adjusted
-@end deffn
-@deffn {} BFD_RELOC_LO16_PCREL
-Low 16 bits of pc-relative value
-@end deffn
-@deffn {} BFD_RELOC_MIPS16_HI16
-MIPS16 high 16 bits of 32-bit value.
-@end deffn
-@deffn {} BFD_RELOC_MIPS16_HI16_S
-MIPS16 high 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result. If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added.
-@end deffn
-@deffn {} BFD_RELOC_MIPS16_LO16
-MIPS16 low 16 bits.
-@end deffn
-@deffn {} BFD_RELOC_MIPS_LITERAL
-Relocation against a MIPS literal section.
-@end deffn
-@deffn {} BFD_RELOC_MIPS_GOT16
-@deffnx {} BFD_RELOC_MIPS_CALL16
-@deffnx {} BFD_RELOC_MIPS_GOT_HI16
-@deffnx {} BFD_RELOC_MIPS_GOT_LO16
-@deffnx {} BFD_RELOC_MIPS_CALL_HI16
-@deffnx {} BFD_RELOC_MIPS_CALL_LO16
-@deffnx {} BFD_RELOC_MIPS_SUB
-@deffnx {} BFD_RELOC_MIPS_GOT_PAGE
-@deffnx {} BFD_RELOC_MIPS_GOT_OFST
-@deffnx {} BFD_RELOC_MIPS_GOT_DISP
-@deffnx {} BFD_RELOC_MIPS_SHIFT5
-@deffnx {} BFD_RELOC_MIPS_SHIFT6
-@deffnx {} BFD_RELOC_MIPS_INSERT_A
-@deffnx {} BFD_RELOC_MIPS_INSERT_B
-@deffnx {} BFD_RELOC_MIPS_DELETE
-@deffnx {} BFD_RELOC_MIPS_HIGHEST
-@deffnx {} BFD_RELOC_MIPS_HIGHER
-@deffnx {} BFD_RELOC_MIPS_SCN_DISP
-@deffnx {} BFD_RELOC_MIPS_REL16
-@deffnx {} BFD_RELOC_MIPS_RELGOT
-@deffnx {} BFD_RELOC_MIPS_JALR
-@deffnx {} BFD_RELOC_MIPS_TLS_DTPMOD32
-@deffnx {} BFD_RELOC_MIPS_TLS_DTPREL32
-@deffnx {} BFD_RELOC_MIPS_TLS_DTPMOD64
-@deffnx {} BFD_RELOC_MIPS_TLS_DTPREL64
-@deffnx {} BFD_RELOC_MIPS_TLS_GD
-@deffnx {} BFD_RELOC_MIPS_TLS_LDM
-@deffnx {} BFD_RELOC_MIPS_TLS_DTPREL_HI16
-@deffnx {} BFD_RELOC_MIPS_TLS_DTPREL_LO16
-@deffnx {} BFD_RELOC_MIPS_TLS_GOTTPREL
-@deffnx {} BFD_RELOC_MIPS_TLS_TPREL32
-@deffnx {} BFD_RELOC_MIPS_TLS_TPREL64
-@deffnx {} BFD_RELOC_MIPS_TLS_TPREL_HI16
-@deffnx {} BFD_RELOC_MIPS_TLS_TPREL_LO16
-MIPS ELF relocations.
-@end deffn
-@deffn {} BFD_RELOC_MIPS_COPY
-@deffnx {} BFD_RELOC_MIPS_JUMP_SLOT
-MIPS ELF relocations (VxWorks extensions).
-@end deffn
-@deffn {} BFD_RELOC_FRV_LABEL16
-@deffnx {} BFD_RELOC_FRV_LABEL24
-@deffnx {} BFD_RELOC_FRV_LO16
-@deffnx {} BFD_RELOC_FRV_HI16
-@deffnx {} BFD_RELOC_FRV_GPREL12
-@deffnx {} BFD_RELOC_FRV_GPRELU12
-@deffnx {} BFD_RELOC_FRV_GPREL32
-@deffnx {} BFD_RELOC_FRV_GPRELHI
-@deffnx {} BFD_RELOC_FRV_GPRELLO
-@deffnx {} BFD_RELOC_FRV_GOT12
-@deffnx {} BFD_RELOC_FRV_GOTHI
-@deffnx {} BFD_RELOC_FRV_GOTLO
-@deffnx {} BFD_RELOC_FRV_FUNCDESC
-@deffnx {} BFD_RELOC_FRV_FUNCDESC_GOT12
-@deffnx {} BFD_RELOC_FRV_FUNCDESC_GOTHI
-@deffnx {} BFD_RELOC_FRV_FUNCDESC_GOTLO
-@deffnx {} BFD_RELOC_FRV_FUNCDESC_VALUE
-@deffnx {} BFD_RELOC_FRV_FUNCDESC_GOTOFF12
-@deffnx {} BFD_RELOC_FRV_FUNCDESC_GOTOFFHI
-@deffnx {} BFD_RELOC_FRV_FUNCDESC_GOTOFFLO
-@deffnx {} BFD_RELOC_FRV_GOTOFF12
-@deffnx {} BFD_RELOC_FRV_GOTOFFHI
-@deffnx {} BFD_RELOC_FRV_GOTOFFLO
-@deffnx {} BFD_RELOC_FRV_GETTLSOFF
-@deffnx {} BFD_RELOC_FRV_TLSDESC_VALUE
-@deffnx {} BFD_RELOC_FRV_GOTTLSDESC12
-@deffnx {} BFD_RELOC_FRV_GOTTLSDESCHI
-@deffnx {} BFD_RELOC_FRV_GOTTLSDESCLO
-@deffnx {} BFD_RELOC_FRV_TLSMOFF12
-@deffnx {} BFD_RELOC_FRV_TLSMOFFHI
-@deffnx {} BFD_RELOC_FRV_TLSMOFFLO
-@deffnx {} BFD_RELOC_FRV_GOTTLSOFF12
-@deffnx {} BFD_RELOC_FRV_GOTTLSOFFHI
-@deffnx {} BFD_RELOC_FRV_GOTTLSOFFLO
-@deffnx {} BFD_RELOC_FRV_TLSOFF
-@deffnx {} BFD_RELOC_FRV_TLSDESC_RELAX
-@deffnx {} BFD_RELOC_FRV_GETTLSOFF_RELAX
-@deffnx {} BFD_RELOC_FRV_TLSOFF_RELAX
-@deffnx {} BFD_RELOC_FRV_TLSMOFF
-Fujitsu Frv Relocations.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_GOTOFF24
-This is a 24bit GOT-relative reloc for the mn10300.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_GOT32
-This is a 32bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_GOT24
-This is a 24bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_GOT16
-This is a 16bit GOT-relative reloc for the mn10300, offset by two bytes
-in the instruction.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_COPY
-Copy symbol at runtime.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_GLOB_DAT
-Create GOT entry.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_JMP_SLOT
-Create PLT entry.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_RELATIVE
-Adjust by program base.
-@end deffn
-@deffn {} BFD_RELOC_386_GOT32
-@deffnx {} BFD_RELOC_386_PLT32
-@deffnx {} BFD_RELOC_386_COPY
-@deffnx {} BFD_RELOC_386_GLOB_DAT
-@deffnx {} BFD_RELOC_386_JUMP_SLOT
-@deffnx {} BFD_RELOC_386_RELATIVE
-@deffnx {} BFD_RELOC_386_GOTOFF
-@deffnx {} BFD_RELOC_386_GOTPC
-@deffnx {} BFD_RELOC_386_TLS_TPOFF
-@deffnx {} BFD_RELOC_386_TLS_IE
-@deffnx {} BFD_RELOC_386_TLS_GOTIE
-@deffnx {} BFD_RELOC_386_TLS_LE
-@deffnx {} BFD_RELOC_386_TLS_GD
-@deffnx {} BFD_RELOC_386_TLS_LDM
-@deffnx {} BFD_RELOC_386_TLS_LDO_32
-@deffnx {} BFD_RELOC_386_TLS_IE_32
-@deffnx {} BFD_RELOC_386_TLS_LE_32
-@deffnx {} BFD_RELOC_386_TLS_DTPMOD32
-@deffnx {} BFD_RELOC_386_TLS_DTPOFF32
-@deffnx {} BFD_RELOC_386_TLS_TPOFF32
-@deffnx {} BFD_RELOC_386_TLS_GOTDESC
-@deffnx {} BFD_RELOC_386_TLS_DESC_CALL
-@deffnx {} BFD_RELOC_386_TLS_DESC
-i386/elf relocations
-@end deffn
-@deffn {} BFD_RELOC_X86_64_GOT32
-@deffnx {} BFD_RELOC_X86_64_PLT32
-@deffnx {} BFD_RELOC_X86_64_COPY
-@deffnx {} BFD_RELOC_X86_64_GLOB_DAT
-@deffnx {} BFD_RELOC_X86_64_JUMP_SLOT
-@deffnx {} BFD_RELOC_X86_64_RELATIVE
-@deffnx {} BFD_RELOC_X86_64_GOTPCREL
-@deffnx {} BFD_RELOC_X86_64_32S
-@deffnx {} BFD_RELOC_X86_64_DTPMOD64
-@deffnx {} BFD_RELOC_X86_64_DTPOFF64
-@deffnx {} BFD_RELOC_X86_64_TPOFF64
-@deffnx {} BFD_RELOC_X86_64_TLSGD
-@deffnx {} BFD_RELOC_X86_64_TLSLD
-@deffnx {} BFD_RELOC_X86_64_DTPOFF32
-@deffnx {} BFD_RELOC_X86_64_GOTTPOFF
-@deffnx {} BFD_RELOC_X86_64_TPOFF32
-@deffnx {} BFD_RELOC_X86_64_GOTOFF64
-@deffnx {} BFD_RELOC_X86_64_GOTPC32
-@deffnx {} BFD_RELOC_X86_64_GOT64
-@deffnx {} BFD_RELOC_X86_64_GOTPCREL64
-@deffnx {} BFD_RELOC_X86_64_GOTPC64
-@deffnx {} BFD_RELOC_X86_64_GOTPLT64
-@deffnx {} BFD_RELOC_X86_64_PLTOFF64
-@deffnx {} BFD_RELOC_X86_64_GOTPC32_TLSDESC
-@deffnx {} BFD_RELOC_X86_64_TLSDESC_CALL
-@deffnx {} BFD_RELOC_X86_64_TLSDESC
-x86-64/elf relocations
-@end deffn
-@deffn {} BFD_RELOC_NS32K_IMM_8
-@deffnx {} BFD_RELOC_NS32K_IMM_16
-@deffnx {} BFD_RELOC_NS32K_IMM_32
-@deffnx {} BFD_RELOC_NS32K_IMM_8_PCREL
-@deffnx {} BFD_RELOC_NS32K_IMM_16_PCREL
-@deffnx {} BFD_RELOC_NS32K_IMM_32_PCREL
-@deffnx {} BFD_RELOC_NS32K_DISP_8
-@deffnx {} BFD_RELOC_NS32K_DISP_16
-@deffnx {} BFD_RELOC_NS32K_DISP_32
-@deffnx {} BFD_RELOC_NS32K_DISP_8_PCREL
-@deffnx {} BFD_RELOC_NS32K_DISP_16_PCREL
-@deffnx {} BFD_RELOC_NS32K_DISP_32_PCREL
-ns32k relocations
-@end deffn
-@deffn {} BFD_RELOC_PDP11_DISP_8_PCREL
-@deffnx {} BFD_RELOC_PDP11_DISP_6_PCREL
-PDP11 relocations
-@end deffn
-@deffn {} BFD_RELOC_PJ_CODE_HI16
-@deffnx {} BFD_RELOC_PJ_CODE_LO16
-@deffnx {} BFD_RELOC_PJ_CODE_DIR16
-@deffnx {} BFD_RELOC_PJ_CODE_DIR32
-@deffnx {} BFD_RELOC_PJ_CODE_REL16
-@deffnx {} BFD_RELOC_PJ_CODE_REL32
-Picojava relocs. Not all of these appear in object files.
-@end deffn
-@deffn {} BFD_RELOC_PPC_B26
-@deffnx {} BFD_RELOC_PPC_BA26
-@deffnx {} BFD_RELOC_PPC_TOC16
-@deffnx {} BFD_RELOC_PPC_B16
-@deffnx {} BFD_RELOC_PPC_B16_BRTAKEN
-@deffnx {} BFD_RELOC_PPC_B16_BRNTAKEN
-@deffnx {} BFD_RELOC_PPC_BA16
-@deffnx {} BFD_RELOC_PPC_BA16_BRTAKEN
-@deffnx {} BFD_RELOC_PPC_BA16_BRNTAKEN
-@deffnx {} BFD_RELOC_PPC_COPY
-@deffnx {} BFD_RELOC_PPC_GLOB_DAT
-@deffnx {} BFD_RELOC_PPC_JMP_SLOT
-@deffnx {} BFD_RELOC_PPC_RELATIVE
-@deffnx {} BFD_RELOC_PPC_LOCAL24PC
-@deffnx {} BFD_RELOC_PPC_EMB_NADDR32
-@deffnx {} BFD_RELOC_PPC_EMB_NADDR16
-@deffnx {} BFD_RELOC_PPC_EMB_NADDR16_LO
-@deffnx {} BFD_RELOC_PPC_EMB_NADDR16_HI
-@deffnx {} BFD_RELOC_PPC_EMB_NADDR16_HA
-@deffnx {} BFD_RELOC_PPC_EMB_SDAI16
-@deffnx {} BFD_RELOC_PPC_EMB_SDA2I16
-@deffnx {} BFD_RELOC_PPC_EMB_SDA2REL
-@deffnx {} BFD_RELOC_PPC_EMB_SDA21
-@deffnx {} BFD_RELOC_PPC_EMB_MRKREF
-@deffnx {} BFD_RELOC_PPC_EMB_RELSEC16
-@deffnx {} BFD_RELOC_PPC_EMB_RELST_LO
-@deffnx {} BFD_RELOC_PPC_EMB_RELST_HI
-@deffnx {} BFD_RELOC_PPC_EMB_RELST_HA
-@deffnx {} BFD_RELOC_PPC_EMB_BIT_FLD
-@deffnx {} BFD_RELOC_PPC_EMB_RELSDA
-@deffnx {} BFD_RELOC_PPC64_HIGHER
-@deffnx {} BFD_RELOC_PPC64_HIGHER_S
-@deffnx {} BFD_RELOC_PPC64_HIGHEST
-@deffnx {} BFD_RELOC_PPC64_HIGHEST_S
-@deffnx {} BFD_RELOC_PPC64_TOC16_LO
-@deffnx {} BFD_RELOC_PPC64_TOC16_HI
-@deffnx {} BFD_RELOC_PPC64_TOC16_HA
-@deffnx {} BFD_RELOC_PPC64_TOC
-@deffnx {} BFD_RELOC_PPC64_PLTGOT16
-@deffnx {} BFD_RELOC_PPC64_PLTGOT16_LO
-@deffnx {} BFD_RELOC_PPC64_PLTGOT16_HI
-@deffnx {} BFD_RELOC_PPC64_PLTGOT16_HA
-@deffnx {} BFD_RELOC_PPC64_ADDR16_DS
-@deffnx {} BFD_RELOC_PPC64_ADDR16_LO_DS
-@deffnx {} BFD_RELOC_PPC64_GOT16_DS
-@deffnx {} BFD_RELOC_PPC64_GOT16_LO_DS
-@deffnx {} BFD_RELOC_PPC64_PLT16_LO_DS
-@deffnx {} BFD_RELOC_PPC64_SECTOFF_DS
-@deffnx {} BFD_RELOC_PPC64_SECTOFF_LO_DS
-@deffnx {} BFD_RELOC_PPC64_TOC16_DS
-@deffnx {} BFD_RELOC_PPC64_TOC16_LO_DS
-@deffnx {} BFD_RELOC_PPC64_PLTGOT16_DS
-@deffnx {} BFD_RELOC_PPC64_PLTGOT16_LO_DS
-Power(rs6000) and PowerPC relocations.
-@end deffn
-@deffn {} BFD_RELOC_PPC_TLS
-@deffnx {} BFD_RELOC_PPC_DTPMOD
-@deffnx {} BFD_RELOC_PPC_TPREL16
-@deffnx {} BFD_RELOC_PPC_TPREL16_LO
-@deffnx {} BFD_RELOC_PPC_TPREL16_HI
-@deffnx {} BFD_RELOC_PPC_TPREL16_HA
-@deffnx {} BFD_RELOC_PPC_TPREL
-@deffnx {} BFD_RELOC_PPC_DTPREL16
-@deffnx {} BFD_RELOC_PPC_DTPREL16_LO
-@deffnx {} BFD_RELOC_PPC_DTPREL16_HI
-@deffnx {} BFD_RELOC_PPC_DTPREL16_HA
-@deffnx {} BFD_RELOC_PPC_DTPREL
-@deffnx {} BFD_RELOC_PPC_GOT_TLSGD16
-@deffnx {} BFD_RELOC_PPC_GOT_TLSGD16_LO
-@deffnx {} BFD_RELOC_PPC_GOT_TLSGD16_HI
-@deffnx {} BFD_RELOC_PPC_GOT_TLSGD16_HA
-@deffnx {} BFD_RELOC_PPC_GOT_TLSLD16
-@deffnx {} BFD_RELOC_PPC_GOT_TLSLD16_LO
-@deffnx {} BFD_RELOC_PPC_GOT_TLSLD16_HI
-@deffnx {} BFD_RELOC_PPC_GOT_TLSLD16_HA
-@deffnx {} BFD_RELOC_PPC_GOT_TPREL16
-@deffnx {} BFD_RELOC_PPC_GOT_TPREL16_LO
-@deffnx {} BFD_RELOC_PPC_GOT_TPREL16_HI
-@deffnx {} BFD_RELOC_PPC_GOT_TPREL16_HA
-@deffnx {} BFD_RELOC_PPC_GOT_DTPREL16
-@deffnx {} BFD_RELOC_PPC_GOT_DTPREL16_LO
-@deffnx {} BFD_RELOC_PPC_GOT_DTPREL16_HI
-@deffnx {} BFD_RELOC_PPC_GOT_DTPREL16_HA
-@deffnx {} BFD_RELOC_PPC64_TPREL16_DS
-@deffnx {} BFD_RELOC_PPC64_TPREL16_LO_DS
-@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHER
-@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHERA
-@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHEST
-@deffnx {} BFD_RELOC_PPC64_TPREL16_HIGHESTA
-@deffnx {} BFD_RELOC_PPC64_DTPREL16_DS
-@deffnx {} BFD_RELOC_PPC64_DTPREL16_LO_DS
-@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHER
-@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHERA
-@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHEST
-@deffnx {} BFD_RELOC_PPC64_DTPREL16_HIGHESTA
-PowerPC and PowerPC64 thread-local storage relocations.
-@end deffn
-@deffn {} BFD_RELOC_I370_D12
-IBM 370/390 relocations
-@end deffn
-@deffn {} BFD_RELOC_CTOR
-The type of reloc used to build a constructor table - at the moment
-probably a 32 bit wide absolute relocation, but the target can choose.
-It generally does map to one of the other relocation types.
-@end deffn
-@deffn {} BFD_RELOC_ARM_PCREL_BRANCH
-ARM 26 bit pc-relative branch. The lowest two bits must be zero and are
-not stored in the instruction.
-@end deffn
-@deffn {} BFD_RELOC_ARM_PCREL_BLX
-ARM 26 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction.
-@end deffn
-@deffn {} BFD_RELOC_THUMB_PCREL_BLX
-Thumb 22 bit pc-relative branch. The lowest bit must be zero and is
-not stored in the instruction. The 2nd lowest bit comes from a 1 bit
-field in the instruction.
-@end deffn
-@deffn {} BFD_RELOC_ARM_PCREL_CALL
-ARM 26-bit pc-relative branch for an unconditional BL or BLX instruction.
-@end deffn
-@deffn {} BFD_RELOC_ARM_PCREL_JUMP
-ARM 26-bit pc-relative branch for B or conditional BL instruction.
-@end deffn
-@deffn {} BFD_RELOC_THUMB_PCREL_BRANCH7
-@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH9
-@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH12
-@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH20
-@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH23
-@deffnx {} BFD_RELOC_THUMB_PCREL_BRANCH25
-Thumb 7-, 9-, 12-, 20-, 23-, and 25-bit pc-relative branches.
-The lowest bit must be zero and is not stored in the instruction.
-Note that the corresponding ELF R_ARM_THM_JUMPnn constant has an
-"nn" one smaller in all cases. Note further that BRANCH23
-corresponds to R_ARM_THM_CALL.
-@end deffn
-@deffn {} BFD_RELOC_ARM_OFFSET_IMM
-12-bit immediate offset, used in ARM-format ldr and str instructions.
-@end deffn
-@deffn {} BFD_RELOC_ARM_THUMB_OFFSET
-5-bit immediate offset, used in Thumb-format ldr and str instructions.
-@end deffn
-@deffn {} BFD_RELOC_ARM_TARGET1
-Pc-relative or absolute relocation depending on target. Used for
-entries in .init_array sections.
-@end deffn
-@deffn {} BFD_RELOC_ARM_ROSEGREL32
-Read-only segment base relative address.
-@end deffn
-@deffn {} BFD_RELOC_ARM_SBREL32
-Data segment base relative address.
-@end deffn
-@deffn {} BFD_RELOC_ARM_TARGET2
-This reloc is used for references to RTTI data from exception handling
-tables. The actual definition depends on the target. It may be a
-pc-relative or some form of GOT-indirect relocation.
-@end deffn
-@deffn {} BFD_RELOC_ARM_PREL31
-31-bit PC relative address.
-@end deffn
-@deffn {} BFD_RELOC_ARM_JUMP_SLOT
-@deffnx {} BFD_RELOC_ARM_GLOB_DAT
-@deffnx {} BFD_RELOC_ARM_GOT32
-@deffnx {} BFD_RELOC_ARM_PLT32
-@deffnx {} BFD_RELOC_ARM_RELATIVE
-@deffnx {} BFD_RELOC_ARM_GOTOFF
-@deffnx {} BFD_RELOC_ARM_GOTPC
-Relocations for setting up GOTs and PLTs for shared libraries.
-@end deffn
-@deffn {} BFD_RELOC_ARM_TLS_GD32
-@deffnx {} BFD_RELOC_ARM_TLS_LDO32
-@deffnx {} BFD_RELOC_ARM_TLS_LDM32
-@deffnx {} BFD_RELOC_ARM_TLS_DTPOFF32
-@deffnx {} BFD_RELOC_ARM_TLS_DTPMOD32
-@deffnx {} BFD_RELOC_ARM_TLS_TPOFF32
-@deffnx {} BFD_RELOC_ARM_TLS_IE32
-@deffnx {} BFD_RELOC_ARM_TLS_LE32
-ARM thread-local storage relocations.
-@end deffn
-@deffn {} BFD_RELOC_ARM_IMMEDIATE
-@deffnx {} BFD_RELOC_ARM_ADRL_IMMEDIATE
-@deffnx {} BFD_RELOC_ARM_T32_IMMEDIATE
-@deffnx {} BFD_RELOC_ARM_T32_IMM12
-@deffnx {} BFD_RELOC_ARM_T32_ADD_PC12
-@deffnx {} BFD_RELOC_ARM_SHIFT_IMM
-@deffnx {} BFD_RELOC_ARM_SMC
-@deffnx {} BFD_RELOC_ARM_SWI
-@deffnx {} BFD_RELOC_ARM_MULTI
-@deffnx {} BFD_RELOC_ARM_CP_OFF_IMM
-@deffnx {} BFD_RELOC_ARM_CP_OFF_IMM_S2
-@deffnx {} BFD_RELOC_ARM_T32_CP_OFF_IMM
-@deffnx {} BFD_RELOC_ARM_T32_CP_OFF_IMM_S2
-@deffnx {} BFD_RELOC_ARM_ADR_IMM
-@deffnx {} BFD_RELOC_ARM_LDR_IMM
-@deffnx {} BFD_RELOC_ARM_LITERAL
-@deffnx {} BFD_RELOC_ARM_IN_POOL
-@deffnx {} BFD_RELOC_ARM_OFFSET_IMM8
-@deffnx {} BFD_RELOC_ARM_T32_OFFSET_U8
-@deffnx {} BFD_RELOC_ARM_T32_OFFSET_IMM
-@deffnx {} BFD_RELOC_ARM_HWLITERAL
-@deffnx {} BFD_RELOC_ARM_THUMB_ADD
-@deffnx {} BFD_RELOC_ARM_THUMB_IMM
-@deffnx {} BFD_RELOC_ARM_THUMB_SHIFT
-These relocs are only used within the ARM assembler. They are not
-(at present) written to any object files.
-@end deffn
-@deffn {} BFD_RELOC_SH_PCDISP8BY2
-@deffnx {} BFD_RELOC_SH_PCDISP12BY2
-@deffnx {} BFD_RELOC_SH_IMM3
-@deffnx {} BFD_RELOC_SH_IMM3U
-@deffnx {} BFD_RELOC_SH_DISP12
-@deffnx {} BFD_RELOC_SH_DISP12BY2
-@deffnx {} BFD_RELOC_SH_DISP12BY4
-@deffnx {} BFD_RELOC_SH_DISP12BY8
-@deffnx {} BFD_RELOC_SH_DISP20
-@deffnx {} BFD_RELOC_SH_DISP20BY8
-@deffnx {} BFD_RELOC_SH_IMM4
-@deffnx {} BFD_RELOC_SH_IMM4BY2
-@deffnx {} BFD_RELOC_SH_IMM4BY4
-@deffnx {} BFD_RELOC_SH_IMM8
-@deffnx {} BFD_RELOC_SH_IMM8BY2
-@deffnx {} BFD_RELOC_SH_IMM8BY4
-@deffnx {} BFD_RELOC_SH_PCRELIMM8BY2
-@deffnx {} BFD_RELOC_SH_PCRELIMM8BY4
-@deffnx {} BFD_RELOC_SH_SWITCH16
-@deffnx {} BFD_RELOC_SH_SWITCH32
-@deffnx {} BFD_RELOC_SH_USES
-@deffnx {} BFD_RELOC_SH_COUNT
-@deffnx {} BFD_RELOC_SH_ALIGN
-@deffnx {} BFD_RELOC_SH_CODE
-@deffnx {} BFD_RELOC_SH_DATA
-@deffnx {} BFD_RELOC_SH_LABEL
-@deffnx {} BFD_RELOC_SH_LOOP_START
-@deffnx {} BFD_RELOC_SH_LOOP_END
-@deffnx {} BFD_RELOC_SH_COPY
-@deffnx {} BFD_RELOC_SH_GLOB_DAT
-@deffnx {} BFD_RELOC_SH_JMP_SLOT
-@deffnx {} BFD_RELOC_SH_RELATIVE
-@deffnx {} BFD_RELOC_SH_GOTPC
-@deffnx {} BFD_RELOC_SH_GOT_LOW16
-@deffnx {} BFD_RELOC_SH_GOT_MEDLOW16
-@deffnx {} BFD_RELOC_SH_GOT_MEDHI16
-@deffnx {} BFD_RELOC_SH_GOT_HI16
-@deffnx {} BFD_RELOC_SH_GOTPLT_LOW16
-@deffnx {} BFD_RELOC_SH_GOTPLT_MEDLOW16
-@deffnx {} BFD_RELOC_SH_GOTPLT_MEDHI16
-@deffnx {} BFD_RELOC_SH_GOTPLT_HI16
-@deffnx {} BFD_RELOC_SH_PLT_LOW16
-@deffnx {} BFD_RELOC_SH_PLT_MEDLOW16
-@deffnx {} BFD_RELOC_SH_PLT_MEDHI16
-@deffnx {} BFD_RELOC_SH_PLT_HI16
-@deffnx {} BFD_RELOC_SH_GOTOFF_LOW16
-@deffnx {} BFD_RELOC_SH_GOTOFF_MEDLOW16
-@deffnx {} BFD_RELOC_SH_GOTOFF_MEDHI16
-@deffnx {} BFD_RELOC_SH_GOTOFF_HI16
-@deffnx {} BFD_RELOC_SH_GOTPC_LOW16
-@deffnx {} BFD_RELOC_SH_GOTPC_MEDLOW16
-@deffnx {} BFD_RELOC_SH_GOTPC_MEDHI16
-@deffnx {} BFD_RELOC_SH_GOTPC_HI16
-@deffnx {} BFD_RELOC_SH_COPY64
-@deffnx {} BFD_RELOC_SH_GLOB_DAT64
-@deffnx {} BFD_RELOC_SH_JMP_SLOT64
-@deffnx {} BFD_RELOC_SH_RELATIVE64
-@deffnx {} BFD_RELOC_SH_GOT10BY4
-@deffnx {} BFD_RELOC_SH_GOT10BY8
-@deffnx {} BFD_RELOC_SH_GOTPLT10BY4
-@deffnx {} BFD_RELOC_SH_GOTPLT10BY8
-@deffnx {} BFD_RELOC_SH_GOTPLT32
-@deffnx {} BFD_RELOC_SH_SHMEDIA_CODE
-@deffnx {} BFD_RELOC_SH_IMMU5
-@deffnx {} BFD_RELOC_SH_IMMS6
-@deffnx {} BFD_RELOC_SH_IMMS6BY32
-@deffnx {} BFD_RELOC_SH_IMMU6
-@deffnx {} BFD_RELOC_SH_IMMS10
-@deffnx {} BFD_RELOC_SH_IMMS10BY2
-@deffnx {} BFD_RELOC_SH_IMMS10BY4
-@deffnx {} BFD_RELOC_SH_IMMS10BY8
-@deffnx {} BFD_RELOC_SH_IMMS16
-@deffnx {} BFD_RELOC_SH_IMMU16
-@deffnx {} BFD_RELOC_SH_IMM_LOW16
-@deffnx {} BFD_RELOC_SH_IMM_LOW16_PCREL
-@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16
-@deffnx {} BFD_RELOC_SH_IMM_MEDLOW16_PCREL
-@deffnx {} BFD_RELOC_SH_IMM_MEDHI16
-@deffnx {} BFD_RELOC_SH_IMM_MEDHI16_PCREL
-@deffnx {} BFD_RELOC_SH_IMM_HI16
-@deffnx {} BFD_RELOC_SH_IMM_HI16_PCREL
-@deffnx {} BFD_RELOC_SH_PT_16
-@deffnx {} BFD_RELOC_SH_TLS_GD_32
-@deffnx {} BFD_RELOC_SH_TLS_LD_32
-@deffnx {} BFD_RELOC_SH_TLS_LDO_32
-@deffnx {} BFD_RELOC_SH_TLS_IE_32
-@deffnx {} BFD_RELOC_SH_TLS_LE_32
-@deffnx {} BFD_RELOC_SH_TLS_DTPMOD32
-@deffnx {} BFD_RELOC_SH_TLS_DTPOFF32
-@deffnx {} BFD_RELOC_SH_TLS_TPOFF32
-Renesas / SuperH SH relocs. Not all of these appear in object files.
-@end deffn
-@deffn {} BFD_RELOC_ARC_B22_PCREL
-ARC Cores relocs.
-ARC 22 bit pc-relative branch. The lowest two bits must be zero and are
-not stored in the instruction. The high 20 bits are installed in bits 26
-through 7 of the instruction.
-@end deffn
-@deffn {} BFD_RELOC_ARC_B26
-ARC 26 bit absolute branch. The lowest two bits must be zero and are not
-stored in the instruction. The high 24 bits are installed in bits 23
-through 0.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_16_IMM
-ADI Blackfin 16 bit immediate absolute reloc.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_16_HIGH
-ADI Blackfin 16 bit immediate absolute reloc higher 16 bits.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_4_PCREL
-ADI Blackfin 'a' part of LSETUP.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_5_PCREL
-ADI Blackfin.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_16_LOW
-ADI Blackfin 16 bit immediate absolute reloc lower 16 bits.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_10_PCREL
-ADI Blackfin.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_11_PCREL
-ADI Blackfin 'b' part of LSETUP.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_12_PCREL_JUMP
-ADI Blackfin.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_12_PCREL_JUMP_S
-ADI Blackfin Short jump, pcrel.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_24_PCREL_CALL_X
-ADI Blackfin Call.x not implemented.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_24_PCREL_JUMP_L
-ADI Blackfin Long Jump pcrel.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_GOT17M4
-@deffnx {} BFD_RELOC_BFIN_GOTHI
-@deffnx {} BFD_RELOC_BFIN_GOTLO
-@deffnx {} BFD_RELOC_BFIN_FUNCDESC
-@deffnx {} BFD_RELOC_BFIN_FUNCDESC_GOT17M4
-@deffnx {} BFD_RELOC_BFIN_FUNCDESC_GOTHI
-@deffnx {} BFD_RELOC_BFIN_FUNCDESC_GOTLO
-@deffnx {} BFD_RELOC_BFIN_FUNCDESC_VALUE
-@deffnx {} BFD_RELOC_BFIN_FUNCDESC_GOTOFF17M4
-@deffnx {} BFD_RELOC_BFIN_FUNCDESC_GOTOFFHI
-@deffnx {} BFD_RELOC_BFIN_FUNCDESC_GOTOFFLO
-@deffnx {} BFD_RELOC_BFIN_GOTOFF17M4
-@deffnx {} BFD_RELOC_BFIN_GOTOFFHI
-@deffnx {} BFD_RELOC_BFIN_GOTOFFLO
-ADI Blackfin FD-PIC relocations.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_GOT
-ADI Blackfin GOT relocation.
-@end deffn
-@deffn {} BFD_RELOC_BFIN_PLTPC
-ADI Blackfin PLTPC relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_PUSH
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_CONST
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_ADD
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_SUB
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_MULT
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_DIV
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_MOD
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_LSHIFT
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_RSHIFT
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_AND
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_OR
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_XOR
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_LAND
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_LOR
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_LEN
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_NEG
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_COMP
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_PAGE
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_HWPAGE
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_ARELOC_BFIN_ADDR
-ADI Blackfin arithmetic relocation.
-@end deffn
-@deffn {} BFD_RELOC_D10V_10_PCREL_R
-Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_D10V_10_PCREL_L
-Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. This is the same as the previous reloc
-except it is in the left container, i.e.,
-shifted left 15 bits.
-@end deffn
-@deffn {} BFD_RELOC_D10V_18
-This is an 18-bit reloc with the right 2 bits
-assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_D10V_18_PCREL
-This is an 18-bit reloc with the right 2 bits
-assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_D30V_6
-Mitsubishi D30V relocs.
-This is a 6-bit absolute reloc.
-@end deffn
-@deffn {} BFD_RELOC_D30V_9_PCREL
-This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_D30V_9_PCREL_R
-This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container.
-@end deffn
-@deffn {} BFD_RELOC_D30V_15
-This is a 12-bit absolute reloc with the
-right 3 bitsassumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_D30V_15_PCREL
-This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_D30V_15_PCREL_R
-This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container.
-@end deffn
-@deffn {} BFD_RELOC_D30V_21
-This is an 18-bit absolute reloc with
-the right 3 bits assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_D30V_21_PCREL
-This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_D30V_21_PCREL_R
-This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container.
-@end deffn
-@deffn {} BFD_RELOC_D30V_32
-This is a 32-bit absolute reloc.
-@end deffn
-@deffn {} BFD_RELOC_D30V_32_PCREL
-This is a 32-bit pc-relative reloc.
-@end deffn
-@deffn {} BFD_RELOC_DLX_HI16_S
-DLX relocs
-@end deffn
-@deffn {} BFD_RELOC_DLX_LO16
-DLX relocs
-@end deffn
-@deffn {} BFD_RELOC_DLX_JMP26
-DLX relocs
-@end deffn
-@deffn {} BFD_RELOC_M32C_HI8
-@deffnx {} BFD_RELOC_M32C_RL_JUMP
-@deffnx {} BFD_RELOC_M32C_RL_1ADDR
-@deffnx {} BFD_RELOC_M32C_RL_2ADDR
-Renesas M16C/M32C Relocations.
-@end deffn
-@deffn {} BFD_RELOC_M32R_24
-Renesas M32R (formerly Mitsubishi M32R) relocs.
-This is a 24 bit absolute address.
-@end deffn
-@deffn {} BFD_RELOC_M32R_10_PCREL
-This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_M32R_18_PCREL
-This is an 18-bit reloc with the right 2 bits assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_M32R_26_PCREL
-This is a 26-bit reloc with the right 2 bits assumed to be 0.
-@end deffn
-@deffn {} BFD_RELOC_M32R_HI16_ULO
-This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as unsigned.
-@end deffn
-@deffn {} BFD_RELOC_M32R_HI16_SLO
-This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as signed.
-@end deffn
-@deffn {} BFD_RELOC_M32R_LO16
-This is a 16-bit reloc containing the lower 16 bits of an address.
-@end deffn
-@deffn {} BFD_RELOC_M32R_SDA16
-This is a 16-bit reloc containing the small data area offset for use in
-add3, load, and store instructions.
-@end deffn
-@deffn {} BFD_RELOC_M32R_GOT24
-@deffnx {} BFD_RELOC_M32R_26_PLTREL
-@deffnx {} BFD_RELOC_M32R_COPY
-@deffnx {} BFD_RELOC_M32R_GLOB_DAT
-@deffnx {} BFD_RELOC_M32R_JMP_SLOT
-@deffnx {} BFD_RELOC_M32R_RELATIVE
-@deffnx {} BFD_RELOC_M32R_GOTOFF
-@deffnx {} BFD_RELOC_M32R_GOTOFF_HI_ULO
-@deffnx {} BFD_RELOC_M32R_GOTOFF_HI_SLO
-@deffnx {} BFD_RELOC_M32R_GOTOFF_LO
-@deffnx {} BFD_RELOC_M32R_GOTPC24
-@deffnx {} BFD_RELOC_M32R_GOT16_HI_ULO
-@deffnx {} BFD_RELOC_M32R_GOT16_HI_SLO
-@deffnx {} BFD_RELOC_M32R_GOT16_LO
-@deffnx {} BFD_RELOC_M32R_GOTPC_HI_ULO
-@deffnx {} BFD_RELOC_M32R_GOTPC_HI_SLO
-@deffnx {} BFD_RELOC_M32R_GOTPC_LO
-For PIC.
-@end deffn
-@deffn {} BFD_RELOC_V850_9_PCREL
-This is a 9-bit reloc
-@end deffn
-@deffn {} BFD_RELOC_V850_22_PCREL
-This is a 22-bit reloc
-@end deffn
-@deffn {} BFD_RELOC_V850_SDA_16_16_OFFSET
-This is a 16 bit offset from the short data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_SDA_15_16_OFFSET
-This is a 16 bit offset (of which only 15 bits are used) from the
-short data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_ZDA_16_16_OFFSET
-This is a 16 bit offset from the zero data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_ZDA_15_16_OFFSET
-This is a 16 bit offset (of which only 15 bits are used) from the
-zero data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_TDA_6_8_OFFSET
-This is an 8 bit offset (of which only 6 bits are used) from the
-tiny data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_TDA_7_8_OFFSET
-This is an 8bit offset (of which only 7 bits are used) from the tiny
-data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_TDA_7_7_OFFSET
-This is a 7 bit offset from the tiny data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_TDA_16_16_OFFSET
-This is a 16 bit offset from the tiny data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_TDA_4_5_OFFSET
-This is a 5 bit offset (of which only 4 bits are used) from the tiny
-data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_TDA_4_4_OFFSET
-This is a 4 bit offset from the tiny data area pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET
-This is a 16 bit offset from the short data area pointer, with the
-bits placed non-contiguously in the instruction.
-@end deffn
-@deffn {} BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET
-This is a 16 bit offset from the zero data area pointer, with the
-bits placed non-contiguously in the instruction.
-@end deffn
-@deffn {} BFD_RELOC_V850_CALLT_6_7_OFFSET
-This is a 6 bit offset from the call table base pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_CALLT_16_16_OFFSET
-This is a 16 bit offset from the call table base pointer.
-@end deffn
-@deffn {} BFD_RELOC_V850_LONGCALL
-Used for relaxing indirect function calls.
-@end deffn
-@deffn {} BFD_RELOC_V850_LONGJUMP
-Used for relaxing indirect jumps.
-@end deffn
-@deffn {} BFD_RELOC_V850_ALIGN
-Used to maintain alignment whilst relaxing.
-@end deffn
-@deffn {} BFD_RELOC_V850_LO16_SPLIT_OFFSET
-This is a variation of BFD_RELOC_LO16 that can be used in v850e ld.bu
-instructions.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_32_PCREL
-This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction.
-@end deffn
-@deffn {} BFD_RELOC_MN10300_16_PCREL
-This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction.
-@end deffn
-@deffn {} BFD_RELOC_TIC30_LDP
-This is a 8bit DP reloc for the tms320c30, where the most
-significant 8 bits of a 24 bit word are placed into the least
-significant 8 bits of the opcode.
-@end deffn
-@deffn {} BFD_RELOC_TIC54X_PARTLS7
-This is a 7bit reloc for the tms320c54x, where the least
-significant 7 bits of a 16 bit word are placed into the least
-significant 7 bits of the opcode.
-@end deffn
-@deffn {} BFD_RELOC_TIC54X_PARTMS9
-This is a 9bit DP reloc for the tms320c54x, where the most
-significant 9 bits of a 16 bit word are placed into the least
-significant 9 bits of the opcode.
-@end deffn
-@deffn {} BFD_RELOC_TIC54X_23
-This is an extended address 23-bit reloc for the tms320c54x.
-@end deffn
-@deffn {} BFD_RELOC_TIC54X_16_OF_23
-This is a 16-bit reloc for the tms320c54x, where the least
-significant 16 bits of a 23-bit extended address are placed into
-the opcode.
-@end deffn
-@deffn {} BFD_RELOC_TIC54X_MS7_OF_23
-This is a reloc for the tms320c54x, where the most
-significant 7 bits of a 23-bit extended address are placed into
-the opcode.
-@end deffn
-@deffn {} BFD_RELOC_FR30_48
-This is a 48 bit reloc for the FR30 that stores 32 bits.
-@end deffn
-@deffn {} BFD_RELOC_FR30_20
-This is a 32 bit reloc for the FR30 that stores 20 bits split up into
-two sections.
-@end deffn
-@deffn {} BFD_RELOC_FR30_6_IN_4
-This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
-4 bits.
-@end deffn
-@deffn {} BFD_RELOC_FR30_8_IN_8
-This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
-into 8 bits.
-@end deffn
-@deffn {} BFD_RELOC_FR30_9_IN_8
-This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
-into 8 bits.
-@end deffn
-@deffn {} BFD_RELOC_FR30_10_IN_8
-This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
-into 8 bits.
-@end deffn
-@deffn {} BFD_RELOC_FR30_9_PCREL
-This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
-short offset into 8 bits.
-@end deffn
-@deffn {} BFD_RELOC_FR30_12_PCREL
-This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
-short offset into 11 bits.
-@end deffn
-@deffn {} BFD_RELOC_MCORE_PCREL_IMM8BY4
-@deffnx {} BFD_RELOC_MCORE_PCREL_IMM11BY2
-@deffnx {} BFD_RELOC_MCORE_PCREL_IMM4BY2
-@deffnx {} BFD_RELOC_MCORE_PCREL_32
-@deffnx {} BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2
-@deffnx {} BFD_RELOC_MCORE_RVA
-Motorola Mcore relocations.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_GETA
-@deffnx {} BFD_RELOC_MMIX_GETA_1
-@deffnx {} BFD_RELOC_MMIX_GETA_2
-@deffnx {} BFD_RELOC_MMIX_GETA_3
-These are relocations for the GETA instruction.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_CBRANCH
-@deffnx {} BFD_RELOC_MMIX_CBRANCH_J
-@deffnx {} BFD_RELOC_MMIX_CBRANCH_1
-@deffnx {} BFD_RELOC_MMIX_CBRANCH_2
-@deffnx {} BFD_RELOC_MMIX_CBRANCH_3
-These are relocations for a conditional branch instruction.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_PUSHJ
-@deffnx {} BFD_RELOC_MMIX_PUSHJ_1
-@deffnx {} BFD_RELOC_MMIX_PUSHJ_2
-@deffnx {} BFD_RELOC_MMIX_PUSHJ_3
-@deffnx {} BFD_RELOC_MMIX_PUSHJ_STUBBABLE
-These are relocations for the PUSHJ instruction.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_JMP
-@deffnx {} BFD_RELOC_MMIX_JMP_1
-@deffnx {} BFD_RELOC_MMIX_JMP_2
-@deffnx {} BFD_RELOC_MMIX_JMP_3
-These are relocations for the JMP instruction.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_ADDR19
-This is a relocation for a relative address as in a GETA instruction or
-a branch.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_ADDR27
-This is a relocation for a relative address as in a JMP instruction.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_REG_OR_BYTE
-This is a relocation for an instruction field that may be a general
-register or a value 0..255.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_REG
-This is a relocation for an instruction field that may be a general
-register.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_BASE_PLUS_OFFSET
-This is a relocation for two instruction fields holding a register and
-an offset, the equivalent of the relocation.
-@end deffn
-@deffn {} BFD_RELOC_MMIX_LOCAL
-This relocation is an assertion that the expression is not allocated as
-a global register. It does not modify contents.
-@end deffn
-@deffn {} BFD_RELOC_AVR_7_PCREL
-This is a 16 bit reloc for the AVR that stores 8 bit pc relative
-short offset into 7 bits.
-@end deffn
-@deffn {} BFD_RELOC_AVR_13_PCREL
-This is a 16 bit reloc for the AVR that stores 13 bit pc relative
-short offset into 12 bits.
-@end deffn
-@deffn {} BFD_RELOC_AVR_16_PM
-This is a 16 bit reloc for the AVR that stores 17 bit value (usually
-program memory address) into 16 bits.
-@end deffn
-@deffn {} BFD_RELOC_AVR_LO8_LDI
-This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-data memory address) into 8 bit immediate value of LDI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_HI8_LDI
-This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of data memory address) into 8 bit immediate value of LDI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_HH8_LDI
-This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of program memory address) into 8 bit immediate value of LDI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_MS8_LDI
-This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of 32 bit value) into 8 bit immediate value of LDI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_LO8_LDI_NEG
-This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually data memory address) into 8 bit immediate value of SUBI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_HI8_LDI_NEG
-This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of data memory address) into 8 bit immediate value of
-SUBI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_HH8_LDI_NEG
-This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(most high 8 bit of program memory address) into 8 bit immediate value
-of LDI or SUBI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_MS8_LDI_NEG
-This is a 16 bit reloc for the AVR that stores negated 8 bit value (msb
-of 32 bit value) into 8 bit immediate value of LDI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_LO8_LDI_PM
-This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-command address) into 8 bit immediate value of LDI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_HI8_LDI_PM
-This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_HH8_LDI_PM
-This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of command address) into 8 bit immediate value of LDI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_LO8_LDI_PM_NEG
-This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually command address) into 8 bit immediate value of SUBI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_HI8_LDI_PM_NEG
-This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of 16 bit command address) into 8 bit immediate value
-of SUBI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_HH8_LDI_PM_NEG
-This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 6 bit of 22 bit command address) into 8 bit immediate
-value of SUBI insn.
-@end deffn
-@deffn {} BFD_RELOC_AVR_CALL
-This is a 32 bit reloc for the AVR that stores 23 bit value
-into 22 bits.
-@end deffn
-@deffn {} BFD_RELOC_AVR_LDI
-This is a 16 bit reloc for the AVR that stores all needed bits
-for absolute addressing with ldi with overflow check to linktime
-@end deffn
-@deffn {} BFD_RELOC_AVR_6
-This is a 6 bit reloc for the AVR that stores offset for ldd/std
-instructions
-@end deffn
-@deffn {} BFD_RELOC_AVR_6_ADIW
-This is a 6 bit reloc for the AVR that stores offset for adiw/sbiw
-instructions
-@end deffn
-@deffn {} BFD_RELOC_390_12
-Direct 12 bit.
-@end deffn
-@deffn {} BFD_RELOC_390_GOT12
-12 bit GOT offset.
-@end deffn
-@deffn {} BFD_RELOC_390_PLT32
-32 bit PC relative PLT address.
-@end deffn
-@deffn {} BFD_RELOC_390_COPY
-Copy symbol at runtime.
-@end deffn
-@deffn {} BFD_RELOC_390_GLOB_DAT
-Create GOT entry.
-@end deffn
-@deffn {} BFD_RELOC_390_JMP_SLOT
-Create PLT entry.
-@end deffn
-@deffn {} BFD_RELOC_390_RELATIVE
-Adjust by program base.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTPC
-32 bit PC relative offset to GOT.
-@end deffn
-@deffn {} BFD_RELOC_390_GOT16
-16 bit GOT offset.
-@end deffn
-@deffn {} BFD_RELOC_390_PC16DBL
-PC relative 16 bit shifted by 1.
-@end deffn
-@deffn {} BFD_RELOC_390_PLT16DBL
-16 bit PC rel. PLT shifted by 1.
-@end deffn
-@deffn {} BFD_RELOC_390_PC32DBL
-PC relative 32 bit shifted by 1.
-@end deffn
-@deffn {} BFD_RELOC_390_PLT32DBL
-32 bit PC rel. PLT shifted by 1.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTPCDBL
-32 bit PC rel. GOT shifted by 1.
-@end deffn
-@deffn {} BFD_RELOC_390_GOT64
-64 bit GOT offset.
-@end deffn
-@deffn {} BFD_RELOC_390_PLT64
-64 bit PC relative PLT address.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTENT
-32 bit rel. offset to GOT entry.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTOFF64
-64 bit offset to GOT.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTPLT12
-12-bit offset to symbol-entry within GOT, with PLT handling.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTPLT16
-16-bit offset to symbol-entry within GOT, with PLT handling.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTPLT32
-32-bit offset to symbol-entry within GOT, with PLT handling.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTPLT64
-64-bit offset to symbol-entry within GOT, with PLT handling.
-@end deffn
-@deffn {} BFD_RELOC_390_GOTPLTENT
-32-bit rel. offset to symbol-entry within GOT, with PLT handling.
-@end deffn
-@deffn {} BFD_RELOC_390_PLTOFF16
-16-bit rel. offset from the GOT to a PLT entry.
-@end deffn
-@deffn {} BFD_RELOC_390_PLTOFF32
-32-bit rel. offset from the GOT to a PLT entry.
-@end deffn
-@deffn {} BFD_RELOC_390_PLTOFF64
-64-bit rel. offset from the GOT to a PLT entry.
-@end deffn
-@deffn {} BFD_RELOC_390_TLS_LOAD
-@deffnx {} BFD_RELOC_390_TLS_GDCALL
-@deffnx {} BFD_RELOC_390_TLS_LDCALL
-@deffnx {} BFD_RELOC_390_TLS_GD32
-@deffnx {} BFD_RELOC_390_TLS_GD64
-@deffnx {} BFD_RELOC_390_TLS_GOTIE12
-@deffnx {} BFD_RELOC_390_TLS_GOTIE32
-@deffnx {} BFD_RELOC_390_TLS_GOTIE64
-@deffnx {} BFD_RELOC_390_TLS_LDM32
-@deffnx {} BFD_RELOC_390_TLS_LDM64
-@deffnx {} BFD_RELOC_390_TLS_IE32
-@deffnx {} BFD_RELOC_390_TLS_IE64
-@deffnx {} BFD_RELOC_390_TLS_IEENT
-@deffnx {} BFD_RELOC_390_TLS_LE32
-@deffnx {} BFD_RELOC_390_TLS_LE64
-@deffnx {} BFD_RELOC_390_TLS_LDO32
-@deffnx {} BFD_RELOC_390_TLS_LDO64
-@deffnx {} BFD_RELOC_390_TLS_DTPMOD
-@deffnx {} BFD_RELOC_390_TLS_DTPOFF
-@deffnx {} BFD_RELOC_390_TLS_TPOFF
-s390 tls relocations.
-@end deffn
-@deffn {} BFD_RELOC_390_20
-@deffnx {} BFD_RELOC_390_GOT20
-@deffnx {} BFD_RELOC_390_GOTPLT20
-@deffnx {} BFD_RELOC_390_TLS_GOTIE20
-Long displacement extension.
-@end deffn
-@deffn {} BFD_RELOC_IP2K_FR9
-Scenix IP2K - 9-bit register number / data address
-@end deffn
-@deffn {} BFD_RELOC_IP2K_BANK
-Scenix IP2K - 4-bit register/data bank number
-@end deffn
-@deffn {} BFD_RELOC_IP2K_ADDR16CJP
-Scenix IP2K - low 13 bits of instruction word address
-@end deffn
-@deffn {} BFD_RELOC_IP2K_PAGE3
-Scenix IP2K - high 3 bits of instruction word address
-@end deffn
-@deffn {} BFD_RELOC_IP2K_LO8DATA
-@deffnx {} BFD_RELOC_IP2K_HI8DATA
-@deffnx {} BFD_RELOC_IP2K_EX8DATA
-Scenix IP2K - ext/low/high 8 bits of data address
-@end deffn
-@deffn {} BFD_RELOC_IP2K_LO8INSN
-@deffnx {} BFD_RELOC_IP2K_HI8INSN
-Scenix IP2K - low/high 8 bits of instruction word address
-@end deffn
-@deffn {} BFD_RELOC_IP2K_PC_SKIP
-Scenix IP2K - even/odd PC modifier to modify snb pcl.0
-@end deffn
-@deffn {} BFD_RELOC_IP2K_TEXT
-Scenix IP2K - 16 bit word address in text section.
-@end deffn
-@deffn {} BFD_RELOC_IP2K_FR_OFFSET
-Scenix IP2K - 7-bit sp or dp offset
-@end deffn
-@deffn {} BFD_RELOC_VPE4KMATH_DATA
-@deffnx {} BFD_RELOC_VPE4KMATH_INSN
-Scenix VPE4K coprocessor - data/insn-space addressing
-@end deffn
-@deffn {} BFD_RELOC_VTABLE_INHERIT
-@deffnx {} BFD_RELOC_VTABLE_ENTRY
-These two relocations are used by the linker to determine which of
-the entries in a C++ virtual function table are actually used. When
-the --gc-sections option is given, the linker will zero out the entries
-that are not used, so that the code for those functions need not be
-included in the output.
-
-VTABLE_INHERIT is a zero-space relocation used to describe to the
-linker the inheritance tree of a C++ virtual function table. The
-relocation's symbol should be the parent class' vtable, and the
-relocation should be located at the child vtable.
-
-VTABLE_ENTRY is a zero-space relocation that describes the use of a
-virtual function table entry. The reloc's symbol should refer to the
-table of the class mentioned in the code. Off of that base, an offset
-describes the entry that is being used. For Rela hosts, this offset
-is stored in the reloc's addend. For Rel hosts, we are forced to put
-this offset in the reloc's section offset.
-@end deffn
-@deffn {} BFD_RELOC_IA64_IMM14
-@deffnx {} BFD_RELOC_IA64_IMM22
-@deffnx {} BFD_RELOC_IA64_IMM64
-@deffnx {} BFD_RELOC_IA64_DIR32MSB
-@deffnx {} BFD_RELOC_IA64_DIR32LSB
-@deffnx {} BFD_RELOC_IA64_DIR64MSB
-@deffnx {} BFD_RELOC_IA64_DIR64LSB
-@deffnx {} BFD_RELOC_IA64_GPREL22
-@deffnx {} BFD_RELOC_IA64_GPREL64I
-@deffnx {} BFD_RELOC_IA64_GPREL32MSB
-@deffnx {} BFD_RELOC_IA64_GPREL32LSB
-@deffnx {} BFD_RELOC_IA64_GPREL64MSB
-@deffnx {} BFD_RELOC_IA64_GPREL64LSB
-@deffnx {} BFD_RELOC_IA64_LTOFF22
-@deffnx {} BFD_RELOC_IA64_LTOFF64I
-@deffnx {} BFD_RELOC_IA64_PLTOFF22
-@deffnx {} BFD_RELOC_IA64_PLTOFF64I
-@deffnx {} BFD_RELOC_IA64_PLTOFF64MSB
-@deffnx {} BFD_RELOC_IA64_PLTOFF64LSB
-@deffnx {} BFD_RELOC_IA64_FPTR64I
-@deffnx {} BFD_RELOC_IA64_FPTR32MSB
-@deffnx {} BFD_RELOC_IA64_FPTR32LSB
-@deffnx {} BFD_RELOC_IA64_FPTR64MSB
-@deffnx {} BFD_RELOC_IA64_FPTR64LSB
-@deffnx {} BFD_RELOC_IA64_PCREL21B
-@deffnx {} BFD_RELOC_IA64_PCREL21BI
-@deffnx {} BFD_RELOC_IA64_PCREL21M
-@deffnx {} BFD_RELOC_IA64_PCREL21F
-@deffnx {} BFD_RELOC_IA64_PCREL22
-@deffnx {} BFD_RELOC_IA64_PCREL60B
-@deffnx {} BFD_RELOC_IA64_PCREL64I
-@deffnx {} BFD_RELOC_IA64_PCREL32MSB
-@deffnx {} BFD_RELOC_IA64_PCREL32LSB
-@deffnx {} BFD_RELOC_IA64_PCREL64MSB
-@deffnx {} BFD_RELOC_IA64_PCREL64LSB
-@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR22
-@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64I
-@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR32MSB
-@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR32LSB
-@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64MSB
-@deffnx {} BFD_RELOC_IA64_LTOFF_FPTR64LSB
-@deffnx {} BFD_RELOC_IA64_SEGREL32MSB
-@deffnx {} BFD_RELOC_IA64_SEGREL32LSB
-@deffnx {} BFD_RELOC_IA64_SEGREL64MSB
-@deffnx {} BFD_RELOC_IA64_SEGREL64LSB
-@deffnx {} BFD_RELOC_IA64_SECREL32MSB
-@deffnx {} BFD_RELOC_IA64_SECREL32LSB
-@deffnx {} BFD_RELOC_IA64_SECREL64MSB
-@deffnx {} BFD_RELOC_IA64_SECREL64LSB
-@deffnx {} BFD_RELOC_IA64_REL32MSB
-@deffnx {} BFD_RELOC_IA64_REL32LSB
-@deffnx {} BFD_RELOC_IA64_REL64MSB
-@deffnx {} BFD_RELOC_IA64_REL64LSB
-@deffnx {} BFD_RELOC_IA64_LTV32MSB
-@deffnx {} BFD_RELOC_IA64_LTV32LSB
-@deffnx {} BFD_RELOC_IA64_LTV64MSB
-@deffnx {} BFD_RELOC_IA64_LTV64LSB
-@deffnx {} BFD_RELOC_IA64_IPLTMSB
-@deffnx {} BFD_RELOC_IA64_IPLTLSB
-@deffnx {} BFD_RELOC_IA64_COPY
-@deffnx {} BFD_RELOC_IA64_LTOFF22X
-@deffnx {} BFD_RELOC_IA64_LDXMOV
-@deffnx {} BFD_RELOC_IA64_TPREL14
-@deffnx {} BFD_RELOC_IA64_TPREL22
-@deffnx {} BFD_RELOC_IA64_TPREL64I
-@deffnx {} BFD_RELOC_IA64_TPREL64MSB
-@deffnx {} BFD_RELOC_IA64_TPREL64LSB
-@deffnx {} BFD_RELOC_IA64_LTOFF_TPREL22
-@deffnx {} BFD_RELOC_IA64_DTPMOD64MSB
-@deffnx {} BFD_RELOC_IA64_DTPMOD64LSB
-@deffnx {} BFD_RELOC_IA64_LTOFF_DTPMOD22
-@deffnx {} BFD_RELOC_IA64_DTPREL14
-@deffnx {} BFD_RELOC_IA64_DTPREL22
-@deffnx {} BFD_RELOC_IA64_DTPREL64I
-@deffnx {} BFD_RELOC_IA64_DTPREL32MSB
-@deffnx {} BFD_RELOC_IA64_DTPREL32LSB
-@deffnx {} BFD_RELOC_IA64_DTPREL64MSB
-@deffnx {} BFD_RELOC_IA64_DTPREL64LSB
-@deffnx {} BFD_RELOC_IA64_LTOFF_DTPREL22
-Intel IA64 Relocations.
-@end deffn
-@deffn {} BFD_RELOC_M68HC11_HI8
-Motorola 68HC11 reloc.
-This is the 8 bit high part of an absolute address.
-@end deffn
-@deffn {} BFD_RELOC_M68HC11_LO8
-Motorola 68HC11 reloc.
-This is the 8 bit low part of an absolute address.
-@end deffn
-@deffn {} BFD_RELOC_M68HC11_3B
-Motorola 68HC11 reloc.
-This is the 3 bit of a value.
-@end deffn
-@deffn {} BFD_RELOC_M68HC11_RL_JUMP
-Motorola 68HC11 reloc.
-This reloc marks the beginning of a jump/call instruction.
-It is used for linker relaxation to correctly identify beginning
-of instruction and change some branches to use PC-relative
-addressing mode.
-@end deffn
-@deffn {} BFD_RELOC_M68HC11_RL_GROUP
-Motorola 68HC11 reloc.
-This reloc marks a group of several instructions that gcc generates
-and for which the linker relaxation pass can modify and/or remove
-some of them.
-@end deffn
-@deffn {} BFD_RELOC_M68HC11_LO16
-Motorola 68HC11 reloc.
-This is the 16-bit lower part of an address. It is used for 'call'
-instruction to specify the symbol address without any special
-transformation (due to memory bank window).
-@end deffn
-@deffn {} BFD_RELOC_M68HC11_PAGE
-Motorola 68HC11 reloc.
-This is a 8-bit reloc that specifies the page number of an address.
-It is used by 'call' instruction to specify the page number of
-the symbol.
-@end deffn
-@deffn {} BFD_RELOC_M68HC11_24
-Motorola 68HC11 reloc.
-This is a 24-bit reloc that represents the address with a 16-bit
-value and a 8-bit page number. The symbol address is transformed
-to follow the 16K memory bank of 68HC12 (seen as mapped in the window).
-@end deffn
-@deffn {} BFD_RELOC_M68HC12_5B
-Motorola 68HC12 reloc.
-This is the 5 bits of a value.
-@end deffn
-@deffn {} BFD_RELOC_16C_NUM08
-@deffnx {} BFD_RELOC_16C_NUM08_C
-@deffnx {} BFD_RELOC_16C_NUM16
-@deffnx {} BFD_RELOC_16C_NUM16_C
-@deffnx {} BFD_RELOC_16C_NUM32
-@deffnx {} BFD_RELOC_16C_NUM32_C
-@deffnx {} BFD_RELOC_16C_DISP04
-@deffnx {} BFD_RELOC_16C_DISP04_C
-@deffnx {} BFD_RELOC_16C_DISP08
-@deffnx {} BFD_RELOC_16C_DISP08_C
-@deffnx {} BFD_RELOC_16C_DISP16
-@deffnx {} BFD_RELOC_16C_DISP16_C
-@deffnx {} BFD_RELOC_16C_DISP24
-@deffnx {} BFD_RELOC_16C_DISP24_C
-@deffnx {} BFD_RELOC_16C_DISP24a
-@deffnx {} BFD_RELOC_16C_DISP24a_C
-@deffnx {} BFD_RELOC_16C_REG04
-@deffnx {} BFD_RELOC_16C_REG04_C
-@deffnx {} BFD_RELOC_16C_REG04a
-@deffnx {} BFD_RELOC_16C_REG04a_C
-@deffnx {} BFD_RELOC_16C_REG14
-@deffnx {} BFD_RELOC_16C_REG14_C
-@deffnx {} BFD_RELOC_16C_REG16
-@deffnx {} BFD_RELOC_16C_REG16_C
-@deffnx {} BFD_RELOC_16C_REG20
-@deffnx {} BFD_RELOC_16C_REG20_C
-@deffnx {} BFD_RELOC_16C_ABS20
-@deffnx {} BFD_RELOC_16C_ABS20_C
-@deffnx {} BFD_RELOC_16C_ABS24
-@deffnx {} BFD_RELOC_16C_ABS24_C
-@deffnx {} BFD_RELOC_16C_IMM04
-@deffnx {} BFD_RELOC_16C_IMM04_C
-@deffnx {} BFD_RELOC_16C_IMM16
-@deffnx {} BFD_RELOC_16C_IMM16_C
-@deffnx {} BFD_RELOC_16C_IMM20
-@deffnx {} BFD_RELOC_16C_IMM20_C
-@deffnx {} BFD_RELOC_16C_IMM24
-@deffnx {} BFD_RELOC_16C_IMM24_C
-@deffnx {} BFD_RELOC_16C_IMM32
-@deffnx {} BFD_RELOC_16C_IMM32_C
-NS CR16C Relocations.
-@end deffn
-@deffn {} BFD_RELOC_CRX_REL4
-@deffnx {} BFD_RELOC_CRX_REL8
-@deffnx {} BFD_RELOC_CRX_REL8_CMP
-@deffnx {} BFD_RELOC_CRX_REL16
-@deffnx {} BFD_RELOC_CRX_REL24
-@deffnx {} BFD_RELOC_CRX_REL32
-@deffnx {} BFD_RELOC_CRX_REGREL12
-@deffnx {} BFD_RELOC_CRX_REGREL22
-@deffnx {} BFD_RELOC_CRX_REGREL28
-@deffnx {} BFD_RELOC_CRX_REGREL32
-@deffnx {} BFD_RELOC_CRX_ABS16
-@deffnx {} BFD_RELOC_CRX_ABS32
-@deffnx {} BFD_RELOC_CRX_NUM8
-@deffnx {} BFD_RELOC_CRX_NUM16
-@deffnx {} BFD_RELOC_CRX_NUM32
-@deffnx {} BFD_RELOC_CRX_IMM16
-@deffnx {} BFD_RELOC_CRX_IMM32
-@deffnx {} BFD_RELOC_CRX_SWITCH8
-@deffnx {} BFD_RELOC_CRX_SWITCH16
-@deffnx {} BFD_RELOC_CRX_SWITCH32
-NS CRX Relocations.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_BDISP8
-@deffnx {} BFD_RELOC_CRIS_UNSIGNED_5
-@deffnx {} BFD_RELOC_CRIS_SIGNED_6
-@deffnx {} BFD_RELOC_CRIS_UNSIGNED_6
-@deffnx {} BFD_RELOC_CRIS_SIGNED_8
-@deffnx {} BFD_RELOC_CRIS_UNSIGNED_8
-@deffnx {} BFD_RELOC_CRIS_SIGNED_16
-@deffnx {} BFD_RELOC_CRIS_UNSIGNED_16
-@deffnx {} BFD_RELOC_CRIS_LAPCQ_OFFSET
-@deffnx {} BFD_RELOC_CRIS_UNSIGNED_4
-These relocs are only used within the CRIS assembler. They are not
-(at present) written to any object files.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_COPY
-@deffnx {} BFD_RELOC_CRIS_GLOB_DAT
-@deffnx {} BFD_RELOC_CRIS_JUMP_SLOT
-@deffnx {} BFD_RELOC_CRIS_RELATIVE
-Relocs used in ELF shared libraries for CRIS.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_32_GOT
-32-bit offset to symbol-entry within GOT.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_16_GOT
-16-bit offset to symbol-entry within GOT.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_32_GOTPLT
-32-bit offset to symbol-entry within GOT, with PLT handling.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_16_GOTPLT
-16-bit offset to symbol-entry within GOT, with PLT handling.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_32_GOTREL
-32-bit offset to symbol, relative to GOT.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_32_PLT_GOTREL
-32-bit offset to symbol with PLT entry, relative to GOT.
-@end deffn
-@deffn {} BFD_RELOC_CRIS_32_PLT_PCREL
-32-bit offset to symbol with PLT entry, relative to this relocation.
-@end deffn
-@deffn {} BFD_RELOC_860_COPY
-@deffnx {} BFD_RELOC_860_GLOB_DAT
-@deffnx {} BFD_RELOC_860_JUMP_SLOT
-@deffnx {} BFD_RELOC_860_RELATIVE
-@deffnx {} BFD_RELOC_860_PC26
-@deffnx {} BFD_RELOC_860_PLT26
-@deffnx {} BFD_RELOC_860_PC16
-@deffnx {} BFD_RELOC_860_LOW0
-@deffnx {} BFD_RELOC_860_SPLIT0
-@deffnx {} BFD_RELOC_860_LOW1
-@deffnx {} BFD_RELOC_860_SPLIT1
-@deffnx {} BFD_RELOC_860_LOW2
-@deffnx {} BFD_RELOC_860_SPLIT2
-@deffnx {} BFD_RELOC_860_LOW3
-@deffnx {} BFD_RELOC_860_LOGOT0
-@deffnx {} BFD_RELOC_860_SPGOT0
-@deffnx {} BFD_RELOC_860_LOGOT1
-@deffnx {} BFD_RELOC_860_SPGOT1
-@deffnx {} BFD_RELOC_860_LOGOTOFF0
-@deffnx {} BFD_RELOC_860_SPGOTOFF0
-@deffnx {} BFD_RELOC_860_LOGOTOFF1
-@deffnx {} BFD_RELOC_860_SPGOTOFF1
-@deffnx {} BFD_RELOC_860_LOGOTOFF2
-@deffnx {} BFD_RELOC_860_LOGOTOFF3
-@deffnx {} BFD_RELOC_860_LOPC
-@deffnx {} BFD_RELOC_860_HIGHADJ
-@deffnx {} BFD_RELOC_860_HAGOT
-@deffnx {} BFD_RELOC_860_HAGOTOFF
-@deffnx {} BFD_RELOC_860_HAPC
-@deffnx {} BFD_RELOC_860_HIGH
-@deffnx {} BFD_RELOC_860_HIGOT
-@deffnx {} BFD_RELOC_860_HIGOTOFF
-Intel i860 Relocations.
-@end deffn
-@deffn {} BFD_RELOC_OPENRISC_ABS_26
-@deffnx {} BFD_RELOC_OPENRISC_REL_26
-OpenRISC Relocations.
-@end deffn
-@deffn {} BFD_RELOC_H8_DIR16A8
-@deffnx {} BFD_RELOC_H8_DIR16R8
-@deffnx {} BFD_RELOC_H8_DIR24A8
-@deffnx {} BFD_RELOC_H8_DIR24R8
-@deffnx {} BFD_RELOC_H8_DIR32A16
-H8 elf Relocations.
-@end deffn
-@deffn {} BFD_RELOC_XSTORMY16_REL_12
-@deffnx {} BFD_RELOC_XSTORMY16_12
-@deffnx {} BFD_RELOC_XSTORMY16_24
-@deffnx {} BFD_RELOC_XSTORMY16_FPTR16
-Sony Xstormy16 Relocations.
-@end deffn
-@deffn {} BFD_RELOC_XC16X_PAG
-@deffnx {} BFD_RELOC_XC16X_POF
-@deffnx {} BFD_RELOC_XC16X_SEG
-@deffnx {} BFD_RELOC_XC16X_SOF
-Infineon Relocations.
-@end deffn
-@deffn {} BFD_RELOC_VAX_GLOB_DAT
-@deffnx {} BFD_RELOC_VAX_JMP_SLOT
-@deffnx {} BFD_RELOC_VAX_RELATIVE
-Relocations used by VAX ELF.
-@end deffn
-@deffn {} BFD_RELOC_MT_PC16
-Morpho MT - 16 bit immediate relocation.
-@end deffn
-@deffn {} BFD_RELOC_MT_HI16
-Morpho MT - Hi 16 bits of an address.
-@end deffn
-@deffn {} BFD_RELOC_MT_LO16
-Morpho MT - Low 16 bits of an address.
-@end deffn
-@deffn {} BFD_RELOC_MT_GNU_VTINHERIT
-Morpho MT - Used to tell the linker which vtable entries are used.
-@end deffn
-@deffn {} BFD_RELOC_MT_GNU_VTENTRY
-Morpho MT - Used to tell the linker which vtable entries are used.
-@end deffn
-@deffn {} BFD_RELOC_MT_PCINSN8
-Morpho MT - 8 bit immediate relocation.
-@end deffn
-@deffn {} BFD_RELOC_MSP430_10_PCREL
-@deffnx {} BFD_RELOC_MSP430_16_PCREL
-@deffnx {} BFD_RELOC_MSP430_16
-@deffnx {} BFD_RELOC_MSP430_16_PCREL_BYTE
-@deffnx {} BFD_RELOC_MSP430_16_BYTE
-@deffnx {} BFD_RELOC_MSP430_2X_PCREL
-@deffnx {} BFD_RELOC_MSP430_RL_PCREL
-msp430 specific relocation codes
-@end deffn
-@deffn {} BFD_RELOC_IQ2000_OFFSET_16
-@deffnx {} BFD_RELOC_IQ2000_OFFSET_21
-@deffnx {} BFD_RELOC_IQ2000_UHI16
-IQ2000 Relocations.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_RTLD
-Special Xtensa relocation used only by PLT entries in ELF shared
-objects to indicate that the runtime linker should set the value
-to one of its own internal functions or data structures.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_GLOB_DAT
-@deffnx {} BFD_RELOC_XTENSA_JMP_SLOT
-@deffnx {} BFD_RELOC_XTENSA_RELATIVE
-Xtensa relocations for ELF shared objects.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_PLT
-Xtensa relocation used in ELF object files for symbols that may require
-PLT entries. Otherwise, this is just a generic 32-bit relocation.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_DIFF8
-@deffnx {} BFD_RELOC_XTENSA_DIFF16
-@deffnx {} BFD_RELOC_XTENSA_DIFF32
-Xtensa relocations to mark the difference of two local symbols.
-These are only needed to support linker relaxation and can be ignored
-when not relaxing. The field is set to the value of the difference
-assuming no relaxation. The relocation encodes the position of the
-first symbol so the linker can determine whether to adjust the field
-value.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_SLOT0_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT1_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT2_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT3_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT4_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT5_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT6_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT7_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT8_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT9_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT10_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT11_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT12_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT13_OP
-@deffnx {} BFD_RELOC_XTENSA_SLOT14_OP
-Generic Xtensa relocations for instruction operands. Only the slot
-number is encoded in the relocation. The relocation applies to the
-last PC-relative immediate operand, or if there are no PC-relative
-immediates, to the last immediate operand.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_SLOT0_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT1_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT2_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT3_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT4_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT5_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT6_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT7_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT8_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT9_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT10_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT11_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT12_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT13_ALT
-@deffnx {} BFD_RELOC_XTENSA_SLOT14_ALT
-Alternate Xtensa relocations. Only the slot is encoded in the
-relocation. The meaning of these relocations is opcode-specific.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_OP0
-@deffnx {} BFD_RELOC_XTENSA_OP1
-@deffnx {} BFD_RELOC_XTENSA_OP2
-Xtensa relocations for backward compatibility. These have all been
-replaced by BFD_RELOC_XTENSA_SLOT0_OP.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_ASM_EXPAND
-Xtensa relocation to mark that the assembler expanded the
-instructions from an original target. The expansion size is
-encoded in the reloc size.
-@end deffn
-@deffn {} BFD_RELOC_XTENSA_ASM_SIMPLIFY
-Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
-BFD_RELOC_XTENSA_ASM_EXPAND.
-@end deffn
-@deffn {} BFD_RELOC_Z80_DISP8
-8 bit signed offset in (ix+d) or (iy+d).
-@end deffn
-@deffn {} BFD_RELOC_Z8K_DISP7
-DJNZ offset.
-@end deffn
-@deffn {} BFD_RELOC_Z8K_CALLR
-CALR offset.
-@end deffn
-@deffn {} BFD_RELOC_Z8K_IMM4L
-4 bit value.
-@end deffn
-
-@example
-
-typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-@end example
-@findex bfd_reloc_type_lookup
-@subsubsection @code{bfd_reloc_type_lookup}
-@strong{Synopsis}
-@example
-reloc_howto_type *bfd_reloc_type_lookup
- (bfd *abfd, bfd_reloc_code_real_type code);
-@end example
-@strong{Description}@*
-Return a pointer to a howto structure which, when
-invoked, will perform the relocation @var{code} on data from the
-architecture noted.
-
-@findex bfd_default_reloc_type_lookup
-@subsubsection @code{bfd_default_reloc_type_lookup}
-@strong{Synopsis}
-@example
-reloc_howto_type *bfd_default_reloc_type_lookup
- (bfd *abfd, bfd_reloc_code_real_type code);
-@end example
-@strong{Description}@*
-Provides a default relocation lookup routine for any architecture.
-
-@findex bfd_get_reloc_code_name
-@subsubsection @code{bfd_get_reloc_code_name}
-@strong{Synopsis}
-@example
-const char *bfd_get_reloc_code_name (bfd_reloc_code_real_type code);
-@end example
-@strong{Description}@*
-Provides a printable name for the supplied relocation code.
-Useful mainly for printing error messages.
-
-@findex bfd_generic_relax_section
-@subsubsection @code{bfd_generic_relax_section}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_generic_relax_section
- (bfd *abfd,
- asection *section,
- struct bfd_link_info *,
- bfd_boolean *);
-@end example
-@strong{Description}@*
-Provides default handling for relaxing for back ends which
-don't do relaxing.
-
-@findex bfd_generic_gc_sections
-@subsubsection @code{bfd_generic_gc_sections}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_generic_gc_sections
- (bfd *, struct bfd_link_info *);
-@end example
-@strong{Description}@*
-Provides default handling for relaxing for back ends which
-don't do section gc -- i.e., does nothing.
-
-@findex bfd_generic_merge_sections
-@subsubsection @code{bfd_generic_merge_sections}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_generic_merge_sections
- (bfd *, struct bfd_link_info *);
-@end example
-@strong{Description}@*
-Provides default handling for SEC_MERGE section merging for back ends
-which don't have SEC_MERGE support -- i.e., does nothing.
-
-@findex bfd_generic_get_relocated_section_contents
-@subsubsection @code{bfd_generic_get_relocated_section_contents}
-@strong{Synopsis}
-@example
-bfd_byte *bfd_generic_get_relocated_section_contents
- (bfd *abfd,
- struct bfd_link_info *link_info,
- struct bfd_link_order *link_order,
- bfd_byte *data,
- bfd_boolean relocatable,
- asymbol **symbols);
-@end example
-@strong{Description}@*
-Provides default handling of relocation effort for back ends
-which can't be bothered to do it efficiently.
-
diff --git a/contrib/binutils/bfd/doc/section.texi b/contrib/binutils/bfd/doc/section.texi
deleted file mode 100644
index 4347679..0000000
--- a/contrib/binutils/bfd/doc/section.texi
+++ /dev/null
@@ -1,989 +0,0 @@
-@section Sections
-The raw data contained within a BFD is maintained through the
-section abstraction. A single BFD may have any number of
-sections. It keeps hold of them by pointing to the first;
-each one points to the next in the list.
-
-Sections are supported in BFD in @code{section.c}.
-
-@menu
-* Section Input::
-* Section Output::
-* typedef asection::
-* section prototypes::
-@end menu
-
-@node Section Input, Section Output, Sections, Sections
-@subsection Section input
-When a BFD is opened for reading, the section structures are
-created and attached to the BFD.
-
-Each section has a name which describes the section in the
-outside world---for example, @code{a.out} would contain at least
-three sections, called @code{.text}, @code{.data} and @code{.bss}.
-
-Names need not be unique; for example a COFF file may have several
-sections named @code{.data}.
-
-Sometimes a BFD will contain more than the ``natural'' number of
-sections. A back end may attach other sections containing
-constructor data, or an application may add a section (using
-@code{bfd_make_section}) to the sections attached to an already open
-BFD. For example, the linker creates an extra section
-@code{COMMON} for each input file's BFD to hold information about
-common storage.
-
-The raw data is not necessarily read in when
-the section descriptor is created. Some targets may leave the
-data in place until a @code{bfd_get_section_contents} call is
-made. Other back ends may read in all the data at once. For
-example, an S-record file has to be read once to determine the
-size of the data. An IEEE-695 file doesn't contain raw data in
-sections, but data and relocation expressions intermixed, so
-the data area has to be parsed to get out the data and
-relocations.
-
-@node Section Output, typedef asection, Section Input, Sections
-@subsection Section output
-To write a new object style BFD, the various sections to be
-written have to be created. They are attached to the BFD in
-the same way as input sections; data is written to the
-sections using @code{bfd_set_section_contents}.
-
-Any program that creates or combines sections (e.g., the assembler
-and linker) must use the @code{asection} fields @code{output_section} and
-@code{output_offset} to indicate the file sections to which each
-section must be written. (If the section is being created from
-scratch, @code{output_section} should probably point to the section
-itself and @code{output_offset} should probably be zero.)
-
-The data to be written comes from input sections attached
-(via @code{output_section} pointers) to
-the output sections. The output section structure can be
-considered a filter for the input section: the output section
-determines the vma of the output data and the name, but the
-input section determines the offset into the output section of
-the data to be written.
-
-E.g., to create a section "O", starting at 0x100, 0x123 long,
-containing two subsections, "A" at offset 0x0 (i.e., at vma
-0x100) and "B" at offset 0x20 (i.e., at vma 0x120) the @code{asection}
-structures would look like:
-
-@example
- section name "A"
- output_offset 0x00
- size 0x20
- output_section -----------> section name "O"
- | vma 0x100
- section name "B" | size 0x123
- output_offset 0x20 |
- size 0x103 |
- output_section --------|
-@end example
-
-@subsection Link orders
-The data within a section is stored in a @dfn{link_order}.
-These are much like the fixups in @code{gas}. The link_order
-abstraction allows a section to grow and shrink within itself.
-
-A link_order knows how big it is, and which is the next
-link_order and where the raw data for it is; it also points to
-a list of relocations which apply to it.
-
-The link_order is used by the linker to perform relaxing on
-final code. The compiler creates code which is as big as
-necessary to make it work without relaxing, and the user can
-select whether to relax. Sometimes relaxing takes a lot of
-time. The linker runs around the relocations to see if any
-are attached to data which can be shrunk, if so it does it on
-a link_order by link_order basis.
-
-
-@node typedef asection, section prototypes, Section Output, Sections
-@subsection typedef asection
-Here is the section structure:
-
-
-@example
-
-typedef struct bfd_section
-@{
- /* The name of the section; the name isn't a copy, the pointer is
- the same as that passed to bfd_make_section. */
- const char *name;
-
- /* A unique sequence number. */
- int id;
-
- /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
- int index;
-
- /* The next section in the list belonging to the BFD, or NULL. */
- struct bfd_section *next;
-
- /* The previous section in the list belonging to the BFD, or NULL. */
- struct bfd_section *prev;
-
- /* The field flags contains attributes of the section. Some
- flags are read in from the object file, and some are
- synthesized from other information. */
- flagword flags;
-
-#define SEC_NO_FLAGS 0x000
-
- /* Tells the OS to allocate space for this section when loading.
- This is clear for a section containing debug information only. */
-#define SEC_ALLOC 0x001
-
- /* Tells the OS to load the section from the file when loading.
- This is clear for a .bss section. */
-#define SEC_LOAD 0x002
-
- /* The section contains data still to be relocated, so there is
- some relocation information too. */
-#define SEC_RELOC 0x004
-
- /* A signal to the OS that the section contains read only data. */
-#define SEC_READONLY 0x008
-
- /* The section contains code only. */
-#define SEC_CODE 0x010
-
- /* The section contains data only. */
-#define SEC_DATA 0x020
-
- /* The section will reside in ROM. */
-#define SEC_ROM 0x040
-
- /* The section contains constructor information. This section
- type is used by the linker to create lists of constructors and
- destructors used by @code{g++}. When a back end sees a symbol
- which should be used in a constructor list, it creates a new
- section for the type of name (e.g., @code{__CTOR_LIST__}), attaches
- the symbol to it, and builds a relocation. To build the lists
- of constructors, all the linker has to do is catenate all the
- sections called @code{__CTOR_LIST__} and relocate the data
- contained within - exactly the operations it would peform on
- standard data. */
-#define SEC_CONSTRUCTOR 0x080
-
- /* The section has contents - a data section could be
- @code{SEC_ALLOC} | @code{SEC_HAS_CONTENTS}; a debug section could be
- @code{SEC_HAS_CONTENTS} */
-#define SEC_HAS_CONTENTS 0x100
-
- /* An instruction to the linker to not output the section
- even if it has information which would normally be written. */
-#define SEC_NEVER_LOAD 0x200
-
- /* The section contains thread local data. */
-#define SEC_THREAD_LOCAL 0x400
-
- /* The section has GOT references. This flag is only for the
- linker, and is currently only used by the elf32-hppa back end.
- It will be set if global offset table references were detected
- in this section, which indicate to the linker that the section
- contains PIC code, and must be handled specially when doing a
- static link. */
-#define SEC_HAS_GOT_REF 0x800
-
- /* The section contains common symbols (symbols may be defined
- multiple times, the value of a symbol is the amount of
- space it requires, and the largest symbol value is the one
- used). Most targets have exactly one of these (which we
- translate to bfd_com_section_ptr), but ECOFF has two. */
-#define SEC_IS_COMMON 0x1000
-
- /* The section contains only debugging information. For
- example, this is set for ELF .debug and .stab sections.
- strip tests this flag to see if a section can be
- discarded. */
-#define SEC_DEBUGGING 0x2000
-
- /* The contents of this section are held in memory pointed to
- by the contents field. This is checked by bfd_get_section_contents,
- and the data is retrieved from memory if appropriate. */
-#define SEC_IN_MEMORY 0x4000
-
- /* The contents of this section are to be excluded by the
- linker for executable and shared objects unless those
- objects are to be further relocated. */
-#define SEC_EXCLUDE 0x8000
-
- /* 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 0x10000
-
- /* When linking, duplicate sections of the same name should be
- discarded, rather than being combined into a single section as
- is usually done. This is similar to how common symbols are
- handled. See SEC_LINK_DUPLICATES below. */
-#define SEC_LINK_ONCE 0x20000
-
- /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
- should handle duplicate sections. */
-#define SEC_LINK_DUPLICATES 0x40000
-
- /* This value for SEC_LINK_DUPLICATES means that duplicate
- sections with the same name should simply be discarded. */
-#define SEC_LINK_DUPLICATES_DISCARD 0x0
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if there are any duplicate sections, although
- it should still only link one copy. */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x80000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections are a different size. */
-#define SEC_LINK_DUPLICATES_SAME_SIZE 0x100000
-
- /* This value for SEC_LINK_DUPLICATES means that the linker
- should warn if any duplicate sections contain different
- contents. */
-#define SEC_LINK_DUPLICATES_SAME_CONTENTS \
- (SEC_LINK_DUPLICATES_ONE_ONLY | SEC_LINK_DUPLICATES_SAME_SIZE)
-
- /* This section was created by the linker as part of dynamic
- relocation or other arcane processing. It is skipped when
- going through the first-pass output, trusting that someone
- else up the line will take care of it later. */
-#define SEC_LINKER_CREATED 0x200000
-
- /* This section should not be subject to garbage collection. */
-#define SEC_KEEP 0x400000
-
- /* This section contains "short" data, and should be placed
- "near" the GP. */
-#define SEC_SMALL_DATA 0x800000
-
- /* Attempt to merge identical entities in the section.
- Entity size is given in the entsize field. */
-#define SEC_MERGE 0x1000000
-
- /* 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 0x2000000
-
- /* This section contains data about section groups. */
-#define SEC_GROUP 0x4000000
-
- /* The section is a COFF shared library section. This flag is
- only for the linker. If this type of section appears in
- the input file, the linker must copy it to the output file
- without changing the vma or size. FIXME: Although this
- was originally intended to be general, it really is COFF
- specific (and the flag was renamed to indicate this). It
- might be cleaner to have some more general mechanism to
- allow the back end to control what the linker does with
- sections. */
-#define SEC_COFF_SHARED_LIBRARY 0x10000000
-
- /* This section contains data which may be shared with other
- executables or shared objects. This is for COFF only. */
-#define SEC_COFF_SHARED 0x20000000
-
- /* When a section with this flag is being linked, then if the size of
- the input section is less than a page, it should not cross a page
- boundary. If the size of the input section is one page or more,
- it should be aligned on a page boundary. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_BLOCK 0x40000000
-
- /* Conditionally link this section; do not link if there are no
- references found to any symbol in the section. This is for TI
- TMS320C54X only. */
-#define SEC_TIC54X_CLINK 0x80000000
-
- /* End of section flags. */
-
- /* Some internal packed boolean fields. */
-
- /* See the vma field. */
- unsigned int user_set_vma : 1;
-
- /* A mark flag used by some of the linker backends. */
- unsigned int linker_mark : 1;
-
- /* Another mark flag used by some of the linker backends. Set for
- output sections that have an input section. */
- unsigned int linker_has_input : 1;
-
- /* Mark flags used by some linker backends for garbage collection. */
- unsigned int gc_mark : 1;
- unsigned int gc_mark_from_eh : 1;
-
- /* The following flags are used by the ELF linker. */
-
- /* Mark sections which have been allocated to segments. */
- unsigned int segment_mark : 1;
-
- /* Type of sec_info information. */
- unsigned int sec_info_type:3;
-#define ELF_INFO_TYPE_NONE 0
-#define ELF_INFO_TYPE_STABS 1
-#define ELF_INFO_TYPE_MERGE 2
-#define ELF_INFO_TYPE_EH_FRAME 3
-#define ELF_INFO_TYPE_JUST_SYMS 4
-
- /* Nonzero if this section uses RELA relocations, rather than REL. */
- unsigned int use_rela_p:1;
-
- /* Bits used by various backends. The generic code doesn't touch
- these fields. */
-
- /* Nonzero if this section has TLS related relocations. */
- unsigned int has_tls_reloc:1;
-
- /* Nonzero if this section has a gp reloc. */
- unsigned int has_gp_reloc:1;
-
- /* Nonzero if this section needs the relax finalize pass. */
- unsigned int need_finalize_relax:1;
-
- /* Whether relocations have been processed. */
- unsigned int reloc_done : 1;
-
- /* End of internal packed boolean fields. */
-
- /* The virtual memory address of the section - where it will be
- at run time. The symbols are relocated against this. The
- user_set_vma flag is maintained by bfd; if it's not set, the
- backend can assign addresses (for example, in @code{a.out}, where
- the default address for @code{.data} is dependent on the specific
- target and various flags). */
- bfd_vma vma;
-
- /* The load address of the section - where it would be in a
- rom image; really only used for writing section header
- information. */
- bfd_vma lma;
-
- /* The size of the section in octets, as it will be output.
- Contains a value even if the section has no contents (e.g., the
- size of @code{.bss}). */
- bfd_size_type size;
-
- /* For input sections, the original size on disk of the section, in
- octets. This field is used by the linker relaxation code. It is
- currently only set for sections where the linker relaxation scheme
- doesn't cache altered section and reloc contents (stabs, eh_frame,
- SEC_MERGE, some coff relaxing targets), and thus the original size
- needs to be kept to read the section multiple times.
- For output sections, rawsize holds the section size calculated on
- a previous linker relaxation pass. */
- bfd_size_type rawsize;
-
- /* If this section is going to be output, then this value is the
- offset in *bytes* into the output section of the first byte in the
- input section (byte ==> smallest addressable unit on the
- target). In most cases, if this was going to start at the
- 100th octet (8-bit quantity) in the output section, this value
- would be 100. However, if the target byte size is 16 bits
- (bfd_octets_per_byte is "2"), this value would be 50. */
- bfd_vma output_offset;
-
- /* The output section through which to map on output. */
- struct bfd_section *output_section;
-
- /* The alignment requirement of the section, as an exponent of 2 -
- e.g., 3 aligns to 2^3 (or 8). */
- unsigned int alignment_power;
-
- /* If an input section, a pointer to a vector of relocation
- records for the data in this section. */
- struct reloc_cache_entry *relocation;
-
- /* If an output section, a pointer to a vector of pointers to
- relocation records for the data in this section. */
- struct reloc_cache_entry **orelocation;
-
- /* The number of relocation records in one of the above. */
- unsigned reloc_count;
-
- /* Information below is back end specific - and not always used
- or updated. */
-
- /* File position of section data. */
- file_ptr filepos;
-
- /* File position of relocation info. */
- file_ptr rel_filepos;
-
- /* File position of line data. */
- file_ptr line_filepos;
-
- /* Pointer to data for applications. */
- void *userdata;
-
- /* If the SEC_IN_MEMORY flag is set, this points to the actual
- contents. */
- unsigned char *contents;
-
- /* Attached line number information. */
- alent *lineno;
-
- /* Number of line number records. */
- unsigned int lineno_count;
-
- /* Entity size for merging purposes. */
- unsigned int entsize;
-
- /* Points to the kept section if this section is a link-once section,
- and is discarded. */
- struct bfd_section *kept_section;
-
- /* When a section is being output, this value changes as more
- linenumbers are written out. */
- file_ptr moving_line_filepos;
-
- /* What the section number is in the target world. */
- int target_index;
-
- void *used_by_bfd;
-
- /* If this is a constructor section then here is a list of the
- relocations created to relocate items within it. */
- struct relent_chain *constructor_chain;
-
- /* The BFD which owns the section. */
- bfd *owner;
-
- /* A symbol which points at this section only. */
- struct bfd_symbol *symbol;
- struct bfd_symbol **symbol_ptr_ptr;
-
- /* Early in the link process, map_head and map_tail are used to build
- a list of input sections attached to an output section. Later,
- output sections use these fields for a list of bfd_link_order
- structs. */
- union @{
- struct bfd_link_order *link_order;
- struct bfd_section *s;
- @} map_head, map_tail;
-@} asection;
-
-/* These sections are global, and are managed by BFD. The application
- and target back end are not permitted to change the values in
- these sections. New code should use the section_ptr macros rather
- than referring directly to the const sections. The const sections
- may eventually vanish. */
-#define BFD_ABS_SECTION_NAME "*ABS*"
-#define BFD_UND_SECTION_NAME "*UND*"
-#define BFD_COM_SECTION_NAME "*COM*"
-#define BFD_IND_SECTION_NAME "*IND*"
-
-/* The absolute section. */
-extern asection bfd_abs_section;
-#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-/* Pointer to the undefined section. */
-extern asection bfd_und_section;
-#define bfd_und_section_ptr ((asection *) &bfd_und_section)
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-/* Pointer to the common section. */
-extern asection bfd_com_section;
-#define bfd_com_section_ptr ((asection *) &bfd_com_section)
-/* Pointer to the indirect section. */
-extern 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 bfd_symbol * const bfd_abs_symbol;
-extern const struct bfd_symbol * const bfd_com_symbol;
-extern const struct bfd_symbol * const bfd_und_symbol;
-extern const struct bfd_symbol * const bfd_ind_symbol;
-
-/* 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, S) \
- do \
- @{ \
- asection *_s = S; \
- asection *_next = _s->next; \
- asection *_prev = _s->prev; \
- if (_prev) \
- _prev->next = _next; \
- else \
- (ABFD)->sections = _next; \
- if (_next) \
- _next->prev = _prev; \
- else \
- (ABFD)->section_last = _prev; \
- @} \
- while (0)
-#define bfd_section_list_append(ABFD, S) \
- do \
- @{ \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->next = NULL; \
- if (_abfd->section_last) \
- @{ \
- _s->prev = _abfd->section_last; \
- _abfd->section_last->next = _s; \
- @} \
- else \
- @{ \
- _s->prev = NULL; \
- _abfd->sections = _s; \
- @} \
- _abfd->section_last = _s; \
- @} \
- while (0)
-#define bfd_section_list_prepend(ABFD, S) \
- do \
- @{ \
- asection *_s = S; \
- bfd *_abfd = ABFD; \
- _s->prev = NULL; \
- if (_abfd->sections) \
- @{ \
- _s->next = _abfd->sections; \
- _abfd->sections->prev = _s; \
- @} \
- else \
- @{ \
- _s->next = NULL; \
- _abfd->section_last = _s; \
- @} \
- _abfd->sections = _s; \
- @} \
- while (0)
-#define bfd_section_list_insert_after(ABFD, A, S) \
- do \
- @{ \
- asection *_a = A; \
- asection *_s = S; \
- asection *_next = _a->next; \
- _s->next = _next; \
- _s->prev = _a; \
- _a->next = _s; \
- if (_next) \
- _next->prev = _s; \
- else \
- (ABFD)->section_last = _s; \
- @} \
- while (0)
-#define bfd_section_list_insert_before(ABFD, B, S) \
- do \
- @{ \
- asection *_b = B; \
- asection *_s = S; \
- asection *_prev = _b->prev; \
- _s->prev = _prev; \
- _s->next = _b; \
- _b->prev = _s; \
- if (_prev) \
- _prev->next = _s; \
- else \
- (ABFD)->sections = _s; \
- @} \
- while (0)
-#define bfd_section_removed_from_list(ABFD, S) \
- ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
-
-#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, SYM_PTR, NAME, IDX) \
- /* name, id, index, next, prev, flags, user_set_vma, */ \
- @{ NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
- \
- /* linker_mark, linker_has_input, gc_mark, gc_mark_from_eh, */ \
- 0, 0, 1, 0, \
- \
- /* segment_mark, sec_info_type, use_rela_p, has_tls_reloc, */ \
- 0, 0, 0, 0, \
- \
- /* has_gp_reloc, need_finalize_relax, reloc_done, */ \
- 0, 0, 0, \
- \
- /* vma, lma, size, rawsize */ \
- 0, 0, 0, 0, \
- \
- /* output_offset, output_section, alignment_power, */ \
- 0, (struct bfd_section *) &SEC, 0, \
- \
- /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ \
- NULL, NULL, 0, 0, 0, \
- \
- /* line_filepos, userdata, contents, lineno, lineno_count, */ \
- 0, NULL, NULL, NULL, 0, \
- \
- /* entsize, kept_section, moving_line_filepos, */ \
- 0, NULL, 0, \
- \
- /* target_index, used_by_bfd, constructor_chain, owner, */ \
- 0, NULL, NULL, NULL, \
- \
- /* symbol, */ \
- (struct bfd_symbol *) SYM, \
- \
- /* symbol_ptr_ptr, */ \
- (struct bfd_symbol **) SYM_PTR, \
- \
- /* map_head, map_tail */ \
- @{ NULL @}, @{ NULL @} \
- @}
-
-@end example
-
-@node section prototypes, , typedef asection, Sections
-@subsection Section prototypes
-These are the functions exported by the section handling part of BFD.
-
-@findex bfd_section_list_clear
-@subsubsection @code{bfd_section_list_clear}
-@strong{Synopsis}
-@example
-void bfd_section_list_clear (bfd *);
-@end example
-@strong{Description}@*
-Clears the section list, and also resets the section count and
-hash table entries.
-
-@findex bfd_get_section_by_name
-@subsubsection @code{bfd_get_section_by_name}
-@strong{Synopsis}
-@example
-asection *bfd_get_section_by_name (bfd *abfd, const char *name);
-@end example
-@strong{Description}@*
-Run through @var{abfd} and return the one of the
-@code{asection}s whose name matches @var{name}, otherwise @code{NULL}.
-@xref{Sections}, for more information.
-
-This should only be used in special cases; the normal way to process
-all sections of a given name is to use @code{bfd_map_over_sections} and
-@code{strcmp} on the name (or better yet, base it on the section flags
-or something else) for each section.
-
-@findex bfd_get_section_by_name_if
-@subsubsection @code{bfd_get_section_by_name_if}
-@strong{Synopsis}
-@example
-asection *bfd_get_section_by_name_if
- (bfd *abfd,
- const char *name,
- bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-@end example
-@strong{Description}@*
-Call the provided function @var{func} for each section
-attached to the BFD @var{abfd} whose name matches @var{name},
-passing @var{obj} as an argument. The function will be called
-as if by
-
-@example
- func (abfd, the_section, obj);
-@end example
-
-It returns the first section for which @var{func} returns true,
-otherwise @code{NULL}.
-
-@findex bfd_get_unique_section_name
-@subsubsection @code{bfd_get_unique_section_name}
-@strong{Synopsis}
-@example
-char *bfd_get_unique_section_name
- (bfd *abfd, const char *templat, int *count);
-@end example
-@strong{Description}@*
-Invent a section name that is unique in @var{abfd} by tacking
-a dot and a digit suffix onto the original @var{templat}. If
-@var{count} is non-NULL, then it specifies the first number
-tried as a suffix to generate a unique name. The value
-pointed to by @var{count} will be incremented in this case.
-
-@findex bfd_make_section_old_way
-@subsubsection @code{bfd_make_section_old_way}
-@strong{Synopsis}
-@example
-asection *bfd_make_section_old_way (bfd *abfd, const char *name);
-@end example
-@strong{Description}@*
-Create a new empty section called @var{name}
-and attach it to the end of the chain of sections for the
-BFD @var{abfd}. An attempt to create a section with a name which
-is already in use returns its pointer without changing the
-section chain.
-
-It has the funny name since this is the way it used to be
-before it was rewritten....
-
-Possible errors are:
-@itemize @bullet
-
-@item
-@code{bfd_error_invalid_operation} -
-If output has already started for this BFD.
-@item
-@code{bfd_error_no_memory} -
-If memory allocation fails.
-@end itemize
-
-@findex bfd_make_section_anyway_with_flags
-@subsubsection @code{bfd_make_section_anyway_with_flags}
-@strong{Synopsis}
-@example
-asection *bfd_make_section_anyway_with_flags
- (bfd *abfd, const char *name, flagword flags);
-@end example
-@strong{Description}@*
-Create a new empty section called @var{name} and attach it to the end of
-the chain of sections for @var{abfd}. Create a new section even if there
-is already a section with that name. Also set the attributes of the
-new section to the value @var{flags}.
-
-Return @code{NULL} and set @code{bfd_error} on error; possible errors are:
-@itemize @bullet
-
-@item
-@code{bfd_error_invalid_operation} - If output has already started for @var{abfd}.
-@item
-@code{bfd_error_no_memory} - If memory allocation fails.
-@end itemize
-
-@findex bfd_make_section_anyway
-@subsubsection @code{bfd_make_section_anyway}
-@strong{Synopsis}
-@example
-asection *bfd_make_section_anyway (bfd *abfd, const char *name);
-@end example
-@strong{Description}@*
-Create a new empty section called @var{name} and attach it to the end of
-the chain of sections for @var{abfd}. Create a new section even if there
-is already a section with that name.
-
-Return @code{NULL} and set @code{bfd_error} on error; possible errors are:
-@itemize @bullet
-
-@item
-@code{bfd_error_invalid_operation} - If output has already started for @var{abfd}.
-@item
-@code{bfd_error_no_memory} - If memory allocation fails.
-@end itemize
-
-@findex bfd_make_section_with_flags
-@subsubsection @code{bfd_make_section_with_flags}
-@strong{Synopsis}
-@example
-asection *bfd_make_section_with_flags
- (bfd *, const char *name, flagword flags);
-@end example
-@strong{Description}@*
-Like @code{bfd_make_section_anyway}, but return @code{NULL} (without calling
-bfd_set_error ()) without changing the section chain if there is already a
-section named @var{name}. Also set the attributes of the new section to
-the value @var{flags}. If there is an error, return @code{NULL} and set
-@code{bfd_error}.
-
-@findex bfd_make_section
-@subsubsection @code{bfd_make_section}
-@strong{Synopsis}
-@example
-asection *bfd_make_section (bfd *, const char *name);
-@end example
-@strong{Description}@*
-Like @code{bfd_make_section_anyway}, but return @code{NULL} (without calling
-bfd_set_error ()) without changing the section chain if there is already a
-section named @var{name}. If there is an error, return @code{NULL} and set
-@code{bfd_error}.
-
-@findex bfd_set_section_flags
-@subsubsection @code{bfd_set_section_flags}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_section_flags
- (bfd *abfd, asection *sec, flagword flags);
-@end example
-@strong{Description}@*
-Set the attributes of the section @var{sec} in the BFD
-@var{abfd} to the value @var{flags}. Return @code{TRUE} on success,
-@code{FALSE} on error. Possible error returns are:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_invalid_operation} -
-The section cannot have one or more of the attributes
-requested. For example, a .bss section in @code{a.out} may not
-have the @code{SEC_HAS_CONTENTS} field set.
-@end itemize
-
-@findex bfd_map_over_sections
-@subsubsection @code{bfd_map_over_sections}
-@strong{Synopsis}
-@example
-void bfd_map_over_sections
- (bfd *abfd,
- void (*func) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-@end example
-@strong{Description}@*
-Call the provided function @var{func} for each section
-attached to the BFD @var{abfd}, passing @var{obj} as an
-argument. The function will be called as if by
-
-@example
- func (abfd, the_section, obj);
-@end example
-
-This is the preferred method for iterating over sections; an
-alternative would be to use a loop:
-
-@example
- section *p;
- for (p = abfd->sections; p != NULL; p = p->next)
- func (abfd, p, ...)
-@end example
-
-@findex bfd_sections_find_if
-@subsubsection @code{bfd_sections_find_if}
-@strong{Synopsis}
-@example
-asection *bfd_sections_find_if
- (bfd *abfd,
- bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj),
- void *obj);
-@end example
-@strong{Description}@*
-Call the provided function @var{operation} for each section
-attached to the BFD @var{abfd}, passing @var{obj} as an
-argument. The function will be called as if by
-
-@example
- operation (abfd, the_section, obj);
-@end example
-
-It returns the first section for which @var{operation} returns true.
-
-@findex bfd_set_section_size
-@subsubsection @code{bfd_set_section_size}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_section_size
- (bfd *abfd, asection *sec, bfd_size_type val);
-@end example
-@strong{Description}@*
-Set @var{sec} to the size @var{val}. If the operation is
-ok, then @code{TRUE} is returned, else @code{FALSE}.
-
-Possible error returns:
-@itemize @bullet
-
-@item
-@code{bfd_error_invalid_operation} -
-Writing has started to the BFD, so setting the size is invalid.
-@end itemize
-
-@findex bfd_set_section_contents
-@subsubsection @code{bfd_set_section_contents}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_section_contents
- (bfd *abfd, asection *section, const void *data,
- file_ptr offset, bfd_size_type count);
-@end example
-@strong{Description}@*
-Sets the contents of the section @var{section} in BFD
-@var{abfd} to the data starting in memory at @var{data}. The
-data is written to the output section starting at offset
-@var{offset} for @var{count} octets.
-
-Normally @code{TRUE} is returned, else @code{FALSE}. Possible error
-returns are:
-@itemize @bullet
-
-@item
-@code{bfd_error_no_contents} -
-The output section does not have the @code{SEC_HAS_CONTENTS}
-attribute, so nothing can be written to it.
-@item
-and some more too
-@end itemize
-This routine is front end to the back end function
-@code{_bfd_set_section_contents}.
-
-@findex bfd_get_section_contents
-@subsubsection @code{bfd_get_section_contents}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_get_section_contents
- (bfd *abfd, asection *section, void *location, file_ptr offset,
- bfd_size_type count);
-@end example
-@strong{Description}@*
-Read data from @var{section} in BFD @var{abfd}
-into memory starting at @var{location}. The data is read at an
-offset of @var{offset} from the start of the input section,
-and is read for @var{count} bytes.
-
-If the contents of a constructor with the @code{SEC_CONSTRUCTOR}
-flag set are requested or if the section does not have the
-@code{SEC_HAS_CONTENTS} flag set, then the @var{location} is filled
-with zeroes. If no errors occur, @code{TRUE} is returned, else
-@code{FALSE}.
-
-@findex bfd_malloc_and_get_section
-@subsubsection @code{bfd_malloc_and_get_section}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_malloc_and_get_section
- (bfd *abfd, asection *section, bfd_byte **buf);
-@end example
-@strong{Description}@*
-Read all data from @var{section} in BFD @var{abfd}
-into a buffer, *@var{buf}, malloc'd by this function.
-
-@findex bfd_copy_private_section_data
-@subsubsection @code{bfd_copy_private_section_data}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_copy_private_section_data
- (bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
-@end example
-@strong{Description}@*
-Copy private section information from @var{isec} in the BFD
-@var{ibfd} to the section @var{osec} in the BFD @var{obfd}.
-Return @code{TRUE} on success, @code{FALSE} on error. Possible error
-returns are:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_no_memory} -
-Not enough memory exists to create private data for @var{osec}.
-@end itemize
-@example
-#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
- BFD_SEND (obfd, _bfd_copy_private_section_data, \
- (ibfd, isection, obfd, osection))
-@end example
-
-@findex bfd_generic_is_group_section
-@subsubsection @code{bfd_generic_is_group_section}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec);
-@end example
-@strong{Description}@*
-Returns TRUE if @var{sec} is a member of a group.
-
-@findex bfd_generic_discard_group
-@subsubsection @code{bfd_generic_discard_group}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group);
-@end example
-@strong{Description}@*
-Remove all members of @var{group} from the output.
-
diff --git a/contrib/binutils/bfd/doc/syms.texi b/contrib/binutils/bfd/doc/syms.texi
deleted file mode 100644
index dc56bbc..0000000
--- a/contrib/binutils/bfd/doc/syms.texi
+++ /dev/null
@@ -1,461 +0,0 @@
-@section Symbols
-BFD tries to maintain as much symbol information as it can when
-it moves information from file to file. BFD passes information
-to applications though the @code{asymbol} structure. When the
-application requests the symbol table, BFD reads the table in
-the native form and translates parts of it into the internal
-format. To maintain more than the information passed to
-applications, some targets keep some information ``behind the
-scenes'' in a structure only the particular back end knows
-about. For example, the coff back end keeps the original
-symbol table structure as well as the canonical structure when
-a BFD is read in. On output, the coff back end can reconstruct
-the output symbol table so that no information is lost, even
-information unique to coff which BFD doesn't know or
-understand. If a coff symbol table were read, but were written
-through an a.out back end, all the coff specific information
-would be lost. The symbol table of a BFD
-is not necessarily read in until a canonicalize request is
-made. Then the BFD back end fills in a table provided by the
-application with pointers to the canonical information. To
-output symbols, the application provides BFD with a table of
-pointers to pointers to @code{asymbol}s. This allows applications
-like the linker to output a symbol as it was read, since the ``behind
-the scenes'' information will be still available.
-@menu
-* Reading Symbols::
-* Writing Symbols::
-* Mini Symbols::
-* typedef asymbol::
-* symbol handling functions::
-@end menu
-
-@node Reading Symbols, Writing Symbols, Symbols, Symbols
-@subsection Reading symbols
-There are two stages to reading a symbol table from a BFD:
-allocating storage, and the actual reading process. This is an
-excerpt from an application which reads the symbol table:
-
-@example
- long storage_needed;
- asymbol **symbol_table;
- long number_of_symbols;
- long i;
-
- storage_needed = bfd_get_symtab_upper_bound (abfd);
-
- if (storage_needed < 0)
- FAIL
-
- if (storage_needed == 0)
- return;
-
- symbol_table = xmalloc (storage_needed);
- ...
- number_of_symbols =
- bfd_canonicalize_symtab (abfd, symbol_table);
-
- if (number_of_symbols < 0)
- FAIL
-
- for (i = 0; i < number_of_symbols; i++)
- process_symbol (symbol_table[i]);
-@end example
-
-All storage for the symbols themselves is in an objalloc
-connected to the BFD; it is freed when the BFD is closed.
-
-@node Writing Symbols, Mini Symbols, Reading Symbols, Symbols
-@subsection Writing symbols
-Writing of a symbol table is automatic when a BFD open for
-writing is closed. The application attaches a vector of
-pointers to pointers to symbols to the BFD being written, and
-fills in the symbol count. The close and cleanup code reads
-through the table provided and performs all the necessary
-operations. The BFD output code must always be provided with an
-``owned'' symbol: one which has come from another BFD, or one
-which has been created using @code{bfd_make_empty_symbol}. Here is an
-example showing the creation of a symbol table with only one element:
-
-@example
- #include "bfd.h"
- int main (void)
- @{
- bfd *abfd;
- asymbol *ptrs[2];
- asymbol *new;
-
- abfd = bfd_openw ("foo","a.out-sunos-big");
- bfd_set_format (abfd, bfd_object);
- new = bfd_make_empty_symbol (abfd);
- new->name = "dummy_symbol";
- new->section = bfd_make_section_old_way (abfd, ".text");
- new->flags = BSF_GLOBAL;
- new->value = 0x12345;
-
- ptrs[0] = new;
- ptrs[1] = 0;
-
- bfd_set_symtab (abfd, ptrs, 1);
- bfd_close (abfd);
- return 0;
- @}
-
- ./makesym
- nm foo
- 00012345 A dummy_symbol
-@end example
-
-Many formats cannot represent arbitrary symbol information; for
-instance, the @code{a.out} object format does not allow an
-arbitrary number of sections. A symbol pointing to a section
-which is not one of @code{.text}, @code{.data} or @code{.bss} cannot
-be described.
-
-@node Mini Symbols, typedef asymbol, Writing Symbols, Symbols
-@subsection Mini Symbols
-Mini symbols provide read-only access to the symbol table.
-They use less memory space, but require more time to access.
-They can be useful for tools like nm or objdump, which may
-have to handle symbol tables of extremely large executables.
-
-The @code{bfd_read_minisymbols} function will read the symbols
-into memory in an internal form. It will return a @code{void *}
-pointer to a block of memory, a symbol count, and the size of
-each symbol. The pointer is allocated using @code{malloc}, and
-should be freed by the caller when it is no longer needed.
-
-The function @code{bfd_minisymbol_to_symbol} will take a pointer
-to a minisymbol, and a pointer to a structure returned by
-@code{bfd_make_empty_symbol}, and return a @code{asymbol} structure.
-The return value may or may not be the same as the value from
-@code{bfd_make_empty_symbol} which was passed in.
-
-
-@node typedef asymbol, symbol handling functions, Mini Symbols, Symbols
-@subsection typedef asymbol
-An @code{asymbol} has the form:
-
-
-@example
-
-typedef struct bfd_symbol
-@{
- /* A pointer to the BFD which owns the symbol. This information
- is necessary so that a back end can work out what additional
- information (invisible to the application writer) is carried
- with the symbol.
-
- This field is *almost* redundant, since you can use section->owner
- instead, except that some symbols point to the global sections
- bfd_@{abs,com,und@}_section. This could be fixed by making
- these globals be per-bfd (or per-target-flavor). FIXME. */
- struct bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
-
- /* The text of the symbol. The name is left alone, and not copied; the
- application may not alter it. */
- const char *name;
-
- /* The value of the symbol. This really should be a union of a
- numeric value with a pointer, since some flags indicate that
- a pointer to another symbol is stored here. */
- symvalue value;
-
- /* Attributes of a symbol. */
-#define BSF_NO_FLAGS 0x00
-
- /* The symbol has local scope; @code{static} in @code{C}. The value
- is the offset into the section of the data. */
-#define BSF_LOCAL 0x01
-
- /* The symbol has global scope; initialized data in @code{C}. The
- value is the offset into the section of the data. */
-#define BSF_GLOBAL 0x02
-
- /* The symbol has global scope and is exported. The value is
- the offset into the section of the data. */
-#define BSF_EXPORT BSF_GLOBAL /* No real difference. */
-
- /* A normal C symbol would be one of:
- @code{BSF_LOCAL}, @code{BSF_FORT_COMM}, @code{BSF_UNDEFINED} or
- @code{BSF_GLOBAL}. */
-
- /* The symbol is a debugging record. The value has an arbitrary
- meaning, unless BSF_DEBUGGING_RELOC is also set. */
-#define BSF_DEBUGGING 0x08
-
- /* The symbol denotes a function entry point. Used in ELF,
- perhaps others someday. */
-#define BSF_FUNCTION 0x10
-
- /* Used by the linker. */
-#define BSF_KEEP 0x20
-#define BSF_KEEP_G 0x40
-
- /* A weak global symbol, overridable without warnings by
- a regular global symbol of the same name. */
-#define BSF_WEAK 0x80
-
- /* This symbol was created to point to a section, e.g. ELF's
- STT_SECTION symbols. */
-#define BSF_SECTION_SYM 0x100
-
- /* The symbol used to be a common symbol, but now it is
- allocated. */
-#define BSF_OLD_COMMON 0x200
-
- /* The default value for common data. */
-#define BFD_FORT_COMM_DEFAULT_VALUE 0
-
- /* In some files the type of a symbol sometimes alters its
- location in an output file - ie in coff a @code{ISFCN} symbol
- which is also @code{C_EXT} symbol appears where it was
- declared and not at the end of a section. This bit is set
- by the target BFD part to convey this information. */
-#define BSF_NOT_AT_END 0x400
-
- /* Signal that the symbol is the label of constructor section. */
-#define BSF_CONSTRUCTOR 0x800
-
- /* Signal that the symbol is a warning symbol. The name is a
- warning. The name of the next symbol is the one to warn about;
- if a reference is made to a symbol with the same name as the next
- symbol, a warning is issued by the linker. */
-#define BSF_WARNING 0x1000
-
- /* Signal that the symbol is indirect. This symbol is an indirect
- pointer to the symbol with the same name as the next symbol. */
-#define BSF_INDIRECT 0x2000
-
- /* BSF_FILE marks symbols that contain a file name. This is used
- for ELF STT_FILE symbols. */
-#define BSF_FILE 0x4000
-
- /* Symbol is from dynamic linking information. */
-#define BSF_DYNAMIC 0x8000
-
- /* The symbol denotes a data object. Used in ELF, and perhaps
- others someday. */
-#define BSF_OBJECT 0x10000
-
- /* This symbol is a debugging symbol. The value is the offset
- into the section of the data. BSF_DEBUGGING should be set
- as well. */
-#define BSF_DEBUGGING_RELOC 0x20000
-
- /* This symbol is thread local. Used in ELF. */
-#define BSF_THREAD_LOCAL 0x40000
-
- flagword flags;
-
- /* A pointer to the section to which this symbol is
- relative. This will always be non NULL, there are special
- sections for undefined and absolute symbols. */
- struct bfd_section *section;
-
- /* Back end special data. */
- union
- @{
- void *p;
- bfd_vma i;
- @}
- udata;
-@}
-asymbol;
-
-@end example
-
-@node symbol handling functions, , typedef asymbol, Symbols
-@subsection Symbol handling functions
-
-
-@findex bfd_get_symtab_upper_bound
-@subsubsection @code{bfd_get_symtab_upper_bound}
-@strong{Description}@*
-Return the number of bytes required to store a vector of pointers
-to @code{asymbols} for all the symbols in the BFD @var{abfd},
-including a terminal NULL pointer. If there are no symbols in
-the BFD, then return 0. If an error occurs, return -1.
-@example
-#define bfd_get_symtab_upper_bound(abfd) \
- BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-
-@end example
-
-@findex bfd_is_local_label
-@subsubsection @code{bfd_is_local_label}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym);
-@end example
-@strong{Description}@*
-Return TRUE if the given symbol @var{sym} in the BFD @var{abfd} is
-a compiler generated local label, else return FALSE.
-
-@findex bfd_is_local_label_name
-@subsubsection @code{bfd_is_local_label_name}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name);
-@end example
-@strong{Description}@*
-Return TRUE if a symbol with the name @var{name} in the BFD
-@var{abfd} is a compiler generated local label, else return
-FALSE. This just checks whether the name has the form of a
-local label.
-@example
-#define bfd_is_local_label_name(abfd, name) \
- BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
-
-@end example
-
-@findex bfd_is_target_special_symbol
-@subsubsection @code{bfd_is_target_special_symbol}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym);
-@end example
-@strong{Description}@*
-Return TRUE iff a symbol @var{sym} in the BFD @var{abfd} is something
-special to the particular target represented by the BFD. Such symbols
-should normally not be mentioned to the user.
-@example
-#define bfd_is_target_special_symbol(abfd, sym) \
- BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym))
-
-@end example
-
-@findex bfd_canonicalize_symtab
-@subsubsection @code{bfd_canonicalize_symtab}
-@strong{Description}@*
-Read the symbols from the BFD @var{abfd}, and fills in
-the vector @var{location} with pointers to the symbols and
-a trailing NULL.
-Return the actual number of symbol pointers, not
-including the NULL.
-@example
-#define bfd_canonicalize_symtab(abfd, location) \
- BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location))
-
-@end example
-
-@findex bfd_set_symtab
-@subsubsection @code{bfd_set_symtab}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_symtab
- (bfd *abfd, asymbol **location, unsigned int count);
-@end example
-@strong{Description}@*
-Arrange that when the output BFD @var{abfd} is closed,
-the table @var{location} of @var{count} pointers to symbols
-will be written.
-
-@findex bfd_print_symbol_vandf
-@subsubsection @code{bfd_print_symbol_vandf}
-@strong{Synopsis}
-@example
-void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol);
-@end example
-@strong{Description}@*
-Print the value and flags of the @var{symbol} supplied to the
-stream @var{file}.
-
-@findex bfd_make_empty_symbol
-@subsubsection @code{bfd_make_empty_symbol}
-@strong{Description}@*
-Create a new @code{asymbol} structure for the BFD @var{abfd}
-and return a pointer to it.
-
-This routine is necessary because each back end has private
-information surrounding the @code{asymbol}. Building your own
-@code{asymbol} and pointing to it will not create the private
-information, and will cause problems later on.
-@example
-#define bfd_make_empty_symbol(abfd) \
- BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
-
-@end example
-
-@findex _bfd_generic_make_empty_symbol
-@subsubsection @code{_bfd_generic_make_empty_symbol}
-@strong{Synopsis}
-@example
-asymbol *_bfd_generic_make_empty_symbol (bfd *);
-@end example
-@strong{Description}@*
-Create a new @code{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.
-
-@findex bfd_make_debug_symbol
-@subsubsection @code{bfd_make_debug_symbol}
-@strong{Description}@*
-Create a new @code{asymbol} structure for the BFD @var{abfd},
-to be used as a debugging symbol. Further details of its use have
-yet to be worked out.
-@example
-#define bfd_make_debug_symbol(abfd,ptr,size) \
- BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-
-@end example
-
-@findex bfd_decode_symclass
-@subsubsection @code{bfd_decode_symclass}
-@strong{Description}@*
-Return a character corresponding to the symbol
-class of @var{symbol}, or '?' for an unknown class.
-
-@strong{Synopsis}
-@example
-int bfd_decode_symclass (asymbol *symbol);
-@end example
-@findex bfd_is_undefined_symclass
-@subsubsection @code{bfd_is_undefined_symclass}
-@strong{Description}@*
-Returns non-zero if the class symbol returned by
-bfd_decode_symclass represents an undefined symbol.
-Returns zero otherwise.
-
-@strong{Synopsis}
-@example
-bfd_boolean bfd_is_undefined_symclass (int symclass);
-@end example
-@findex bfd_symbol_info
-@subsubsection @code{bfd_symbol_info}
-@strong{Description}@*
-Fill in the basic info about symbol that nm needs.
-Additional info may be added by the back-ends after
-calling this function.
-
-@strong{Synopsis}
-@example
-void bfd_symbol_info (asymbol *symbol, symbol_info *ret);
-@end example
-@findex bfd_copy_private_symbol_data
-@subsubsection @code{bfd_copy_private_symbol_data}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_copy_private_symbol_data
- (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym);
-@end example
-@strong{Description}@*
-Copy private symbol information from @var{isym} in the BFD
-@var{ibfd} to the symbol @var{osym} in the BFD @var{obfd}.
-Return @code{TRUE} on success, @code{FALSE} on error. Possible error
-returns are:
-
-@itemize @bullet
-
-@item
-@code{bfd_error_no_memory} -
-Not enough memory exists to create private data for @var{osec}.
-@end itemize
-@example
-#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
- BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
- (ibfd, isymbol, obfd, osymbol))
-
-@end example
-
diff --git a/contrib/binutils/bfd/doc/targets.texi b/contrib/binutils/bfd/doc/targets.texi
deleted file mode 100644
index a85c849..0000000
--- a/contrib/binutils/bfd/doc/targets.texi
+++ /dev/null
@@ -1,551 +0,0 @@
-@section Targets
-
-
-@strong{Description}@*
-Each port of BFD to a different machine requires the creation
-of a target back end. All the back end provides to the root
-part of BFD is a structure containing pointers to functions
-which perform certain low level operations on files. BFD
-translates the applications's requests through a pointer into
-calls to the back end routines.
-
-When a file is opened with @code{bfd_openr}, its format and
-target are unknown. BFD uses various mechanisms to determine
-how to interpret the file. The operations performed are:
-
-@itemize @bullet
-
-@item
-Create a BFD by calling the internal routine
-@code{_bfd_new_bfd}, then call @code{bfd_find_target} with the
-target string supplied to @code{bfd_openr} and the new BFD pointer.
-
-@item
-If a null target string was provided to @code{bfd_find_target},
-look up the environment variable @code{GNUTARGET} and use
-that as the target string.
-
-@item
-If the target string is still @code{NULL}, or the target string is
-@code{default}, then use the first item in the target vector
-as the target type, and set @code{target_defaulted} in the BFD to
-cause @code{bfd_check_format} to loop through all the targets.
-@xref{bfd_target}. @xref{Formats}.
-
-@item
-Otherwise, inspect the elements in the target vector
-one by one, until a match on target name is found. When found,
-use it.
-
-@item
-Otherwise return the error @code{bfd_error_invalid_target} to
-@code{bfd_openr}.
-
-@item
-@code{bfd_openr} attempts to open the file using
-@code{bfd_open_file}, and returns the BFD.
-@end itemize
-Once the BFD has been opened and the target selected, the file
-format may be determined. This is done by calling
-@code{bfd_check_format} on the BFD with a suggested format.
-If @code{target_defaulted} has been set, each possible target
-type is tried to see if it recognizes the specified format.
-@code{bfd_check_format} returns @code{TRUE} when the caller guesses right.
-@menu
-* bfd_target::
-@end menu
-
-@node bfd_target, , Targets, Targets
-
-@subsection bfd_target
-
-
-@strong{Description}@*
-This structure contains everything that BFD knows about a
-target. It includes things like its byte order, name, and which
-routines to call to do various operations.
-
-Every BFD points to a target structure with its @code{xvec}
-member.
-
-The macros below are used to dispatch to functions through the
-@code{bfd_target} vector. They are used in a number of macros further
-down in @file{bfd.h}, and are also used when calling various
-routines by hand inside the BFD implementation. The @var{arglist}
-argument must be parenthesized; it contains all the arguments
-to the called function.
-
-They make the documentation (more) unpleasant to read, so if
-someone wants to fix this and not break the above, please do.
-@example
-#define BFD_SEND(bfd, message, arglist) \
- ((*((bfd)->xvec->message)) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND
-#define BFD_SEND(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- ((*((bfd)->xvec->message)) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-@end example
-For operations which index on the BFD format:
-@example
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND_FMT
-#define BFD_SEND_FMT(bfd, message, arglist) \
- (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
- (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
- (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-
-@end example
-This is the structure which defines the type of BFD this is. The
-@code{xvec} member of the struct @code{bfd} itself points here. Each
-module that implements access to a different target under BFD,
-defines one of these.
-
-FIXME, these names should be rationalised with the names of
-the entry points which call them. Too bad we can't have one
-macro to define them both!
-@example
-enum bfd_flavour
-@{
- bfd_target_unknown_flavour,
- bfd_target_aout_flavour,
- bfd_target_coff_flavour,
- bfd_target_ecoff_flavour,
- bfd_target_xcoff_flavour,
- bfd_target_elf_flavour,
- bfd_target_ieee_flavour,
- bfd_target_nlm_flavour,
- bfd_target_oasys_flavour,
- bfd_target_tekhex_flavour,
- bfd_target_srec_flavour,
- bfd_target_ihex_flavour,
- bfd_target_som_flavour,
- bfd_target_os9k_flavour,
- bfd_target_versados_flavour,
- bfd_target_msdos_flavour,
- bfd_target_ovax_flavour,
- bfd_target_evax_flavour,
- bfd_target_mmo_flavour,
- bfd_target_mach_o_flavour,
- bfd_target_pef_flavour,
- bfd_target_pef_xlib_flavour,
- bfd_target_sym_flavour
-@};
-
-enum bfd_endian @{ BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN @};
-
-/* Forward declaration. */
-typedef struct bfd_link_info _bfd_link_info;
-
-typedef struct bfd_target
-@{
- /* Identifies the kind of target, e.g., SunOS4, Ultrix, etc. */
- char *name;
-
- /* The "flavour" of a back end is a general indication about
- the contents of a file. */
- enum bfd_flavour flavour;
-
- /* The order of bytes within the data area of a file. */
- enum bfd_endian byteorder;
-
- /* The order of bytes within the header parts of a file. */
- enum bfd_endian header_byteorder;
-
- /* A mask of all the flags which an executable may have set -
- from the set @code{BFD_NO_FLAGS}, @code{HAS_RELOC}, ...@code{D_PAGED}. */
- flagword object_flags;
-
- /* A mask of all the flags which a section may have set - from
- the set @code{SEC_NO_FLAGS}, @code{SEC_ALLOC}, ...@code{SET_NEVER_LOAD}. */
- flagword section_flags;
-
- /* The character normally found at the front of a symbol.
- (if any), perhaps `_'. */
- char symbol_leading_char;
-
- /* The pad character for file names within an archive header. */
- char ar_pad_char;
-
- /* The maximum number of characters in an archive header. */
- unsigned short ar_max_namelen;
-
- /* Entries for byte swapping for data. These are different from the
- other entry points, since they don't take a BFD as the first argument.
- Certain other handlers could do the same. */
- bfd_uint64_t (*bfd_getx64) (const void *);
- bfd_int64_t (*bfd_getx_signed_64) (const void *);
- void (*bfd_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_getx32) (const void *);
- bfd_signed_vma (*bfd_getx_signed_32) (const void *);
- void (*bfd_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_getx16) (const void *);
- bfd_signed_vma (*bfd_getx_signed_16) (const void *);
- void (*bfd_putx16) (bfd_vma, void *);
-
- /* Byte swapping for the headers. */
- bfd_uint64_t (*bfd_h_getx64) (const void *);
- bfd_int64_t (*bfd_h_getx_signed_64) (const void *);
- void (*bfd_h_putx64) (bfd_uint64_t, void *);
- bfd_vma (*bfd_h_getx32) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_32) (const void *);
- void (*bfd_h_putx32) (bfd_vma, void *);
- bfd_vma (*bfd_h_getx16) (const void *);
- bfd_signed_vma (*bfd_h_getx_signed_16) (const void *);
- void (*bfd_h_putx16) (bfd_vma, void *);
-
- /* Format dependent routines: these are vectors of entry points
- within the target vector structure, one for each format to check. */
-
- /* Check the format of a file being read. Return a @code{bfd_target *} or zero. */
- const struct bfd_target *(*_bfd_check_format[bfd_type_end]) (bfd *);
-
- /* Set the format of a file being written. */
- bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *);
-
- /* Write cached information into a file being written, at @code{bfd_close}. */
- bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *);
-
-@end example
-The general target vector. These vectors are initialized using the
-BFD_JUMP_TABLE macros.
-@example
-
- /* Generic entry points. */
-#define BFD_JUMP_TABLE_GENERIC(NAME) \
- NAME##_close_and_cleanup, \
- NAME##_bfd_free_cached_info, \
- NAME##_new_section_hook, \
- NAME##_get_section_contents, \
- NAME##_get_section_contents_in_window
-
- /* Called when the BFD is being closed to do any necessary cleanup. */
- bfd_boolean (*_close_and_cleanup) (bfd *);
- /* Ask the BFD to free all cached information. */
- bfd_boolean (*_bfd_free_cached_info) (bfd *);
- /* Called when a new section is created. */
- bfd_boolean (*_new_section_hook) (bfd *, sec_ptr);
- /* Read the contents of a section. */
- bfd_boolean (*_bfd_get_section_contents)
- (bfd *, sec_ptr, void *, file_ptr, bfd_size_type);
- bfd_boolean (*_bfd_get_section_contents_in_window)
- (bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type);
-
- /* Entry points to copy private data. */
-#define BFD_JUMP_TABLE_COPY(NAME) \
- NAME##_bfd_copy_private_bfd_data, \
- NAME##_bfd_merge_private_bfd_data, \
- _bfd_generic_init_private_section_data, \
- NAME##_bfd_copy_private_section_data, \
- NAME##_bfd_copy_private_symbol_data, \
- NAME##_bfd_copy_private_header_data, \
- NAME##_bfd_set_private_flags, \
- NAME##_bfd_print_private_bfd_data
-
- /* Called to copy BFD general private data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *);
- /* Called to merge BFD general private data from one object file
- to a common output file when linking. */
- bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, bfd *);
- /* Called to initialize BFD private section data from one object file
- to another. */
-#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \
- BFD_SEND (obfd, _bfd_init_private_section_data, (ibfd, isec, obfd, osec, link_info))
- bfd_boolean (*_bfd_init_private_section_data)
- (bfd *, sec_ptr, bfd *, sec_ptr, struct bfd_link_info *);
- /* Called to copy BFD private section data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_section_data)
- (bfd *, sec_ptr, bfd *, sec_ptr);
- /* Called to copy BFD private symbol data from one symbol
- to another. */
- bfd_boolean (*_bfd_copy_private_symbol_data)
- (bfd *, asymbol *, bfd *, asymbol *);
- /* Called to copy BFD private header data from one object file
- to another. */
- bfd_boolean (*_bfd_copy_private_header_data)
- (bfd *, bfd *);
- /* Called to set private backend flags. */
- bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword);
-
- /* Called to print private BFD data. */
- bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *);
-
- /* Core file entry points. */
-#define BFD_JUMP_TABLE_CORE(NAME) \
- NAME##_core_file_failing_command, \
- NAME##_core_file_failing_signal, \
- NAME##_core_file_matches_executable_p
-
- char * (*_core_file_failing_command) (bfd *);
- int (*_core_file_failing_signal) (bfd *);
- bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *);
-
- /* Archive entry points. */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
- NAME##_slurp_armap, \
- NAME##_slurp_extended_name_table, \
- NAME##_construct_extended_name_table, \
- NAME##_truncate_arname, \
- NAME##_write_armap, \
- NAME##_read_ar_hdr, \
- NAME##_openr_next_archived_file, \
- NAME##_get_elt_at_index, \
- NAME##_generic_stat_arch_elt, \
- NAME##_update_armap_timestamp
-
- bfd_boolean (*_bfd_slurp_armap) (bfd *);
- bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *);
- bfd_boolean (*_bfd_construct_extended_name_table)
- (bfd *, char **, bfd_size_type *, const char **);
- void (*_bfd_truncate_arname) (bfd *, const char *, char *);
- bfd_boolean (*write_armap)
- (bfd *, unsigned int, struct orl *, unsigned int, int);
- void * (*_bfd_read_ar_hdr_fn) (bfd *);
- bfd * (*openr_next_archived_file) (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) (bfd *, symindex);
- int (*_bfd_stat_arch_elt) (bfd *, struct stat *);
- bfd_boolean (*_bfd_update_armap_timestamp) (bfd *);
-
- /* Entry points used for symbols. */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
- NAME##_get_symtab_upper_bound, \
- NAME##_canonicalize_symtab, \
- NAME##_make_empty_symbol, \
- NAME##_print_symbol, \
- NAME##_get_symbol_info, \
- NAME##_bfd_is_local_label_name, \
- NAME##_bfd_is_target_special_symbol, \
- NAME##_get_lineno, \
- NAME##_find_nearest_line, \
- _bfd_generic_find_line, \
- NAME##_find_inliner_info, \
- NAME##_bfd_make_debug_symbol, \
- NAME##_read_minisymbols, \
- NAME##_minisymbol_to_symbol
-
- long (*_bfd_get_symtab_upper_bound) (bfd *);
- long (*_bfd_canonicalize_symtab)
- (bfd *, struct bfd_symbol **);
- struct bfd_symbol *
- (*_bfd_make_empty_symbol) (bfd *);
- void (*_bfd_print_symbol)
- (bfd *, void *, struct bfd_symbol *, 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)
- (bfd *, struct bfd_symbol *, symbol_info *);
-#define bfd_get_symbol_info(b,p,e) BFD_SEND (b, _bfd_get_symbol_info, (b,p,e))
- bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *);
- bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *);
- alent * (*_get_lineno) (bfd *, struct bfd_symbol *);
- bfd_boolean (*_bfd_find_nearest_line)
- (bfd *, struct bfd_section *, struct bfd_symbol **, bfd_vma,
- const char **, const char **, unsigned int *);
- bfd_boolean (*_bfd_find_line)
- (bfd *, struct bfd_symbol **, struct bfd_symbol *,
- const char **, unsigned int *);
- bfd_boolean (*_bfd_find_inliner_info)
- (bfd *, 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)
- (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)
- (bfd *, bfd_boolean, void **, 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)
- (bfd *, bfd_boolean, const void *, asymbol *);
-
- /* Routines for relocs. */
-#define BFD_JUMP_TABLE_RELOCS(NAME) \
- NAME##_get_reloc_upper_bound, \
- NAME##_canonicalize_reloc, \
- NAME##_bfd_reloc_type_lookup
-
- long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
- long (*_bfd_canonicalize_reloc)
- (bfd *, sec_ptr, arelent **, struct bfd_symbol **);
- /* See documentation on reloc types. */
- reloc_howto_type *
- (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
-
- /* Routines used when writing an object file. */
-#define BFD_JUMP_TABLE_WRITE(NAME) \
- NAME##_set_arch_mach, \
- NAME##_set_section_contents
-
- bfd_boolean (*_bfd_set_arch_mach)
- (bfd *, enum bfd_architecture, unsigned long);
- bfd_boolean (*_bfd_set_section_contents)
- (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type);
-
- /* Routines used by the linker. */
-#define BFD_JUMP_TABLE_LINK(NAME) \
- NAME##_sizeof_headers, \
- NAME##_bfd_get_relocated_section_contents, \
- NAME##_bfd_relax_section, \
- NAME##_bfd_link_hash_table_create, \
- NAME##_bfd_link_hash_table_free, \
- NAME##_bfd_link_add_symbols, \
- NAME##_bfd_link_just_syms, \
- NAME##_bfd_final_link, \
- NAME##_bfd_link_split_section, \
- NAME##_bfd_gc_sections, \
- NAME##_bfd_merge_sections, \
- NAME##_bfd_is_group_section, \
- NAME##_bfd_discard_group, \
- NAME##_section_already_linked \
-
- int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
- bfd_byte * (*_bfd_get_relocated_section_contents)
- (bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, bfd_boolean, struct bfd_symbol **);
-
- bfd_boolean (*_bfd_relax_section)
- (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_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) (bfd *);
-
- /* Release the memory associated with the linker hash table. */
- void (*_bfd_link_hash_table_free) (struct bfd_link_hash_table *);
-
- /* Add symbols from this object file into the hash table. */
- bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *);
-
- /* Indicate that we are only retrieving symbol values from this section. */
- void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *);
-
- /* Do a link based on the link_order structures attached to each
- section of the BFD. */
- bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *);
-
- /* Should this section be split up into smaller pieces during linking. */
- bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *);
-
- /* Remove sections that are not referenced from the output. */
- bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *);
-
- /* Attempt to merge SEC_MERGE sections. */
- bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *);
-
- /* Is this section a member of a group? */
- bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *);
-
- /* Discard members of a group. */
- bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *);
-
- /* Check if SEC has been already linked during a reloceatable or
- final link. */
- void (*_section_already_linked) (bfd *, struct bfd_section *);
-
- /* Routines to handle dynamic symbols and relocs. */
-#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
- NAME##_get_dynamic_symtab_upper_bound, \
- NAME##_canonicalize_dynamic_symtab, \
- NAME##_get_synthetic_symtab, \
- NAME##_get_dynamic_reloc_upper_bound, \
- NAME##_canonicalize_dynamic_reloc
-
- /* Get the amount of memory required to hold the dynamic symbols. */
- long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *);
- /* Read in the dynamic symbols. */
- long (*_bfd_canonicalize_dynamic_symtab)
- (bfd *, struct bfd_symbol **);
- /* Create synthetized symbols. */
- long (*_bfd_get_synthetic_symtab)
- (bfd *, long, struct bfd_symbol **, long, struct bfd_symbol **,
- struct bfd_symbol **);
- /* Get the amount of memory required to hold the dynamic relocs. */
- long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *);
- /* Read in the dynamic relocs. */
- long (*_bfd_canonicalize_dynamic_reloc)
- (bfd *, arelent **, struct bfd_symbol **);
-
-@end example
-A pointer to an alternative bfd_target in case the current one is not
-satisfactory. This can happen when the target cpu supports both big
-and little endian code, and target chosen by the linker has the wrong
-endianness. The function open_output() in ld/ldlang.c uses this field
-to find an alternative output format that is suitable.
-@example
- /* Opposite endian version of this target. */
- const struct bfd_target * alternative_target;
-
- /* Data for use by back-end routines, which isn't
- generic enough to belong in this structure. */
- const void *backend_data;
-
-@} bfd_target;
-
-@end example
-
-@findex bfd_set_default_target
-@subsubsection @code{bfd_set_default_target}
-@strong{Synopsis}
-@example
-bfd_boolean bfd_set_default_target (const char *name);
-@end example
-@strong{Description}@*
-Set the default target vector to use when recognizing a BFD.
-This takes the name of the target, which may be a BFD target
-name or a configuration triplet.
-
-@findex bfd_find_target
-@subsubsection @code{bfd_find_target}
-@strong{Synopsis}
-@example
-const bfd_target *bfd_find_target (const char *target_name, bfd *abfd);
-@end example
-@strong{Description}@*
-Return a pointer to the transfer vector for the object target
-named @var{target_name}. If @var{target_name} is @code{NULL}, choose the
-one in the environment variable @code{GNUTARGET}; if that is null or not
-defined, then choose the first entry in the target list.
-Passing in the string "default" or setting the environment
-variable to "default" will cause the first entry in the target
-list to be returned, and "target_defaulted" will be set in the
-BFD. This causes @code{bfd_check_format} to loop over all the
-targets to find the one that matches the file being read.
-
-@findex bfd_target_list
-@subsubsection @code{bfd_target_list}
-@strong{Synopsis}
-@example
-const char ** bfd_target_list (void);
-@end example
-@strong{Description}@*
-Return a freshly malloced NULL-terminated
-vector of the names of all the valid BFD targets. Do not
-modify the names.
-
-@findex bfd_seach_for_target
-@subsubsection @code{bfd_seach_for_target}
-@strong{Synopsis}
-@example
-const bfd_target *bfd_search_for_target
- (int (*search_func) (const bfd_target *, void *),
- void *);
-@end example
-@strong{Description}@*
-Return a pointer to the first transfer vector in the list of
-transfer vectors maintained by BFD that produces a non-zero
-result when passed to the function @var{search_func}. The
-parameter @var{data} is passed, unexamined, to the search
-function.
-
diff --git a/contrib/binutils/bfd/dwarf1.c b/contrib/binutils/bfd/dwarf1.c
index 5d6c1e3..d722df3 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, 2001, 2002, 2004, 2005
+ Copyright 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2007
Free Software Foundation, Inc.
Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "libbfd.h"
#include "elf-bfd.h"
diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c
index ae68d18..411a715 100644
--- a/contrib/binutils/bfd/dwarf2.c
+++ b/contrib/binutils/bfd/dwarf2.c
@@ -1,6 +1,6 @@
/* DWARF 2 support.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Adapted from gdb/dwarf2read.c by Gavin Koch of Cygnus Solutions
(gavin@cygnus.com).
@@ -29,8 +29,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -93,8 +93,10 @@ struct dwarf2_debug
/* Pointer to the end of the .debug_info section memory buffer. */
bfd_byte *info_ptr_end;
- /* Pointer to the section and address of the beginning of the
- section. */
+ /* Pointer to the bfd, section and address of the beginning of the
+ section. The bfd might be different than expected because of
+ gnu_debuglink sections. */
+ bfd * bfd;
asection *sec;
bfd_byte *sec_info_ptr;
@@ -874,24 +876,45 @@ concat_filename (struct line_info_table *table, unsigned int file)
filename = table->files[file - 1].name;
- if (! IS_ABSOLUTE_PATH (filename))
+ if (!IS_ABSOLUTE_PATH (filename))
{
- char *dirname = (table->files[file - 1].dir
- ? table->dirs[table->files[file - 1].dir - 1]
- : table->comp_dir);
+ char *dirname = NULL;
+ char *subdirname = NULL;
+ char *name;
+ size_t len;
+
+ if (table->files[file - 1].dir)
+ subdirname = table->dirs[table->files[file - 1].dir - 1];
+
+ if (!subdirname || !IS_ABSOLUTE_PATH (subdirname))
+ dirname = table->comp_dir;
- /* Not all tools set DW_AT_comp_dir, so dirname may be unknown.
- The best we can do is return the filename part. */
- if (dirname != NULL)
+ if (!dirname)
{
- unsigned int len = strlen (dirname) + strlen (filename) + 2;
- char * name;
+ dirname = subdirname;
+ subdirname = NULL;
+ }
+
+ if (!dirname)
+ return strdup (filename);
+ len = strlen (dirname) + strlen (filename) + 2;
+
+ if (subdirname)
+ {
+ len += strlen (subdirname) + 1;
+ name = bfd_malloc (len);
+ if (name)
+ sprintf (name, "%s/%s/%s", dirname, subdirname, filename);
+ }
+ else
+ {
name = bfd_malloc (len);
if (name)
sprintf (name, "%s/%s", dirname, filename);
- return name;
}
+
+ return name;
}
return strdup (filename);
@@ -1117,7 +1140,6 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
unsigned int line = 1;
unsigned int column = 0;
int is_stmt = lh.default_is_stmt;
- int basic_block = 0;
int end_sequence = 0;
/* eraxxon@alumni.rice.edu: Against the DWARF2 specs, some
compilers generate address sequences that are wildly out of
@@ -1142,7 +1164,6 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
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 (address < low_pc)
low_pc = address;
if (address > high_pc)
@@ -1214,7 +1235,6 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
break;
case DW_LNS_copy:
add_line_info (table, address, filename, line, column, 0);
- basic_block = 0;
if (address < low_pc)
low_pc = address;
if (address > high_pc)
@@ -1250,7 +1270,6 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
is_stmt = (!is_stmt);
break;
case DW_LNS_set_basic_block:
- basic_block = 1;
break;
case DW_LNS_const_add_pc:
address += lh.minimum_instruction_length
@@ -1625,7 +1644,7 @@ read_rangelist (struct comp_unit *unit, struct arange *arange, bfd_uint64_t offs
if (low_pc == -1UL && high_pc != -1UL)
base_address = high_pc;
else
- arange_add (unit->abfd, arange, base_address + low_pc, base_address + high_pc);
+ arange_add (unit->abfd, arange, base_address + low_pc, base_address + high_pc);
}
}
@@ -1871,8 +1890,7 @@ scan_unit_for_symbols (struct comp_unit *unit)
to get to the line number information for the compilation unit. */
static struct comp_unit *
-parse_comp_unit (bfd *abfd,
- struct dwarf2_debug *stash,
+parse_comp_unit (struct dwarf2_debug *stash,
bfd_vma unit_length,
bfd_byte *info_ptr_unit,
unsigned int offset_size)
@@ -1890,6 +1908,7 @@ parse_comp_unit (bfd *abfd,
bfd_size_type amt;
bfd_vma low_pc = 0;
bfd_vma high_pc = 0;
+ bfd *abfd = stash->bfd;
version = read_2_bytes (abfd, info_ptr);
info_ptr += 2;
@@ -2175,17 +2194,14 @@ find_debug_info (bfd *abfd, asection *after_sec)
{
asection * msec;
- if (after_sec)
- msec = after_sec->next;
- else
- msec = abfd->sections;
+ msec = after_sec != NULL ? after_sec->next : abfd->sections;
while (msec)
{
if (strcmp (msec->name, DWARF2_DEBUG_INFO) == 0)
return msec;
- if (strncmp (msec->name, GNU_LINKONCE_INFO, strlen (GNU_LINKONCE_INFO)) == 0)
+ if (CONST_STRNEQ (msec->name, GNU_LINKONCE_INFO))
return msec;
msec = msec->next;
@@ -2285,22 +2301,28 @@ place_sections (bfd *abfd, struct dwarf2_debug *stash)
return TRUE;
}
-/* The DWARF2 version of find_nearest_line. Return TRUE if the line
- is found without error. ADDR_SIZE is the number of bytes in the
- initial .debug_info length field and in the abbreviation offset.
- You may use zero to indicate that the default value should be
- used. */
+/* Find the source code location of SYMBOL. If SYMBOL is NULL
+ then find the nearest source code location corresponding to
+ the address SECTION + OFFSET.
+ Returns TRUE if the line is found without error and fills in
+ FILENAME_PTR and LINENUMBER_PTR. In the case where SYMBOL was
+ NULL the FUNCTIONNAME_PTR is also filled in.
+ SYMBOLS contains the symbol table for ABFD.
+ ADDR_SIZE is the number of bytes in the initial .debug_info length
+ field and in the abbreviation offset, or zero to indicate that the
+ default value should be used. */
-bfd_boolean
-_bfd_dwarf2_find_nearest_line (bfd *abfd,
- asection *section,
- asymbol **symbols,
- bfd_vma offset,
- const char **filename_ptr,
- const char **functionname_ptr,
- unsigned int *linenumber_ptr,
- unsigned int addr_size,
- void **pinfo)
+static bfd_boolean
+find_line (bfd *abfd,
+ asection *section,
+ bfd_vma offset,
+ asymbol *symbol,
+ asymbol **symbols,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *linenumber_ptr,
+ unsigned int addr_size,
+ void **pinfo)
{
/* Read each compilation unit from the section .debug_info, and check
to see if it contains the address we are searching for. If yes,
@@ -2311,13 +2333,11 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
a pointer to the next un-read compilation unit. Check the
previously read units before reading more. */
struct dwarf2_debug *stash;
-
/* What address are we looking for? */
bfd_vma addr;
-
struct comp_unit* each;
-
bfd_vma found = FALSE;
+ bfd_boolean do_line;
stash = *pinfo;
@@ -2338,7 +2358,22 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
return FALSE;
}
- addr = offset;
+ do_line = (section == NULL
+ && offset == 0
+ && functionname_ptr == NULL
+ && symbol != NULL);
+ if (do_line)
+ {
+ addr = symbol->value;
+ section = bfd_get_section (symbol);
+ }
+ else if (section != NULL
+ && functionname_ptr != NULL
+ && symbol == NULL)
+ addr = offset;
+ else
+ abort ();
+
if (section->output_section)
addr += section->output_section->vma + section->output_offset;
else
@@ -2347,260 +2382,57 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd,
*functionname_ptr = NULL;
*linenumber_ptr = 0;
- /* The DWARF2 spec says that the initial length field, and the
- offset of the abbreviation table, should both be 4-byte values.
- However, some compilers do things differently. */
- if (addr_size == 0)
- addr_size = 4;
- BFD_ASSERT (addr_size == 4 || addr_size == 8);
-
if (! *pinfo)
{
+ bfd *debug_bfd;
bfd_size_type total_size;
asection *msec;
*pinfo = stash;
msec = find_debug_info (abfd, NULL);
- if (! msec)
- /* No dwarf2 info. Note that at this point the stash
- has been allocated, but contains zeros, this lets
- future calls to this function fail quicker. */
- goto done;
-
- /* There can be more than one DWARF2 info section in a BFD these days.
- Read them all in and produce one large stash. We do this in two
- passes - in the first pass we just accumulate the section sizes.
- In the second pass we read in the section's contents. The allows
- us to avoid reallocing the data as we add sections to the stash. */
- for (total_size = 0; msec; msec = find_debug_info (abfd, msec))
- total_size += msec->size;
-
- stash->info_ptr = bfd_alloc (abfd, total_size);
- if (stash->info_ptr == NULL)
- goto done;
-
- stash->info_ptr_end = stash->info_ptr;
-
- for (msec = find_debug_info (abfd, NULL);
- msec;
- msec = find_debug_info (abfd, msec))
- {
- bfd_size_type size;
- bfd_size_type start;
-
- size = msec->size;
- if (size == 0)
- continue;
-
- start = stash->info_ptr_end - stash->info_ptr;
-
- if ((bfd_simple_get_relocated_section_contents
- (abfd, msec, stash->info_ptr + start, symbols)) == NULL)
- continue;
-
- stash->info_ptr_end = stash->info_ptr + start + 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;
- }
-
- /* A null info_ptr indicates that there is no dwarf2 info
- (or that an error occured while setting up the stash). */
- if (! stash->info_ptr)
- goto done;
-
- stash->inliner_chain = NULL;
-
- /* Check the previously read comp. units first. */
- for (each = stash->all_comp_units; each; each = each->next_unit)
- if (comp_unit_contains_address (each, addr)
- && comp_unit_find_nearest_line (each, addr, filename_ptr,
- functionname_ptr,
- linenumber_ptr, stash))
- {
- found = TRUE;
- goto done;
- }
-
- /* Read each remaining comp. units checking each as they are read. */
- while (stash->info_ptr < stash->info_ptr_end)
- {
- bfd_vma length;
- unsigned int offset_size = addr_size;
- bfd_byte *info_ptr_unit = stash->info_ptr;
-
- length = read_4_bytes (abfd, stash->info_ptr);
- /* A 0xffffff length is the DWARF3 way of indicating we use
- 64-bit offsets, instead of 32-bit offsets. */
- if (length == 0xffffffff)
- {
- offset_size = 8;
- length = read_8_bytes (abfd, stash->info_ptr + 4);
- stash->info_ptr += 12;
- }
- /* A zero length is the IRIX way of indicating 64-bit offsets,
- mostly because the 64-bit length will generally fit in 32
- bits, and the endianness helps. */
- else if (length == 0)
+ if (msec == NULL)
{
- offset_size = 8;
- length = read_4_bytes (abfd, stash->info_ptr + 4);
- stash->info_ptr += 8;
- }
- /* In the absence of the hints above, we assume addr_size-sized
- offsets, for backward-compatibility with pre-DWARF3 64-bit
- platforms. */
- else if (addr_size == 8)
- {
- length = read_8_bytes (abfd, stash->info_ptr);
- stash->info_ptr += 8;
- }
- else
- stash->info_ptr += 4;
-
- if (length > 0)
- {
- each = parse_comp_unit (abfd, stash, length, info_ptr_unit,
- offset_size);
- stash->info_ptr += length;
-
- if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
- == stash->sec->size)
+ char * debug_filename = bfd_follow_gnu_debuglink (abfd, DEBUGDIR);
+
+ if (debug_filename == NULL)
+ /* No dwarf2 info, and no gnu_debuglink to follow.
+ Note that at this point the stash has been allocated, but
+ contains zeros. This lets future calls to this function
+ fail more quickly. */
+ goto done;
+
+ if ((debug_bfd = bfd_openr (debug_filename, NULL)) == NULL
+ || ! bfd_check_format (debug_bfd, bfd_object)
+ || (msec = find_debug_info (debug_bfd, NULL)) == NULL)
{
- stash->sec = find_debug_info (abfd, stash->sec);
- stash->sec_info_ptr = stash->info_ptr;
- }
-
- if (each)
- {
- each->next_unit = stash->all_comp_units;
- stash->all_comp_units = each;
-
- /* DW_AT_low_pc and DW_AT_high_pc are optional for
- compilation units. If we don't have them (i.e.,
- unit->high == 0), we need to consult the line info
- table to see if a compilation unit contains the given
- address. */
- if ((each->arange.high == 0
- || comp_unit_contains_address (each, addr))
- && comp_unit_find_nearest_line (each, addr,
- filename_ptr,
- functionname_ptr,
- linenumber_ptr,
- stash))
- {
- found = TRUE;
- goto done;
- }
+ if (debug_bfd)
+ bfd_close (debug_bfd);
+ /* FIXME: Should we report our failure to follow the debuglink ? */
+ free (debug_filename);
+ goto done;
}
}
- }
-
-done:
- if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
- unset_sections (stash);
-
- return found;
-}
-
-/* The DWARF2 version of find_line. Return TRUE if the line is found
- without error. */
-
-bfd_boolean
-_bfd_dwarf2_find_line (bfd *abfd,
- asymbol **symbols,
- asymbol *symbol,
- const char **filename_ptr,
- unsigned int *linenumber_ptr,
- unsigned int addr_size,
- void **pinfo)
-{
- /* Read each compilation unit from the section .debug_info, and check
- to see if it contains the address we are searching for. If yes,
- lookup the address, and return the line number info. If no, go
- on to the next compilation unit.
-
- We keep a list of all the previously read compilation units, and
- a pointer to the next un-read compilation unit. Check the
- previously read units before reading more. */
- struct dwarf2_debug *stash;
-
- /* What address are we looking for? */
- bfd_vma addr;
-
- struct comp_unit* each;
-
- asection *section;
-
- bfd_boolean found = FALSE;
-
- section = bfd_get_section (symbol);
-
- stash = *pinfo;
-
- if (! stash)
- {
- bfd_size_type amt = sizeof (struct dwarf2_debug);
-
- stash = bfd_zalloc (abfd, amt);
- if (! stash)
- return FALSE;
- }
-
- /* In a relocatable file, 2 functions may have the same address.
- We change the section vma so that they won't overlap. */
- if (!stash && (abfd->flags & (EXEC_P | DYNAMIC)) == 0)
- {
- if (! place_sections (abfd, stash))
- return FALSE;
- }
-
- addr = symbol->value;
- if (section->output_section)
- addr += section->output_section->vma + section->output_offset;
- else
- addr += section->vma;
-
- *filename_ptr = NULL;
- *filename_ptr = NULL;
- *linenumber_ptr = 0;
-
- if (! *pinfo)
- {
- bfd_size_type total_size;
- asection *msec;
-
- *pinfo = stash;
-
- msec = find_debug_info (abfd, NULL);
- if (! msec)
- /* No dwarf2 info. Note that at this point the stash
- has been allocated, but contains zeros, this lets
- future calls to this function fail quicker. */
- goto done;
+ else
+ debug_bfd = abfd;
/* There can be more than one DWARF2 info section in a BFD these days.
Read them all in and produce one large stash. We do this in two
passes - in the first pass we just accumulate the section sizes.
In the second pass we read in the section's contents. The allows
us to avoid reallocing the data as we add sections to the stash. */
- for (total_size = 0; msec; msec = find_debug_info (abfd, msec))
+ for (total_size = 0; msec; msec = find_debug_info (debug_bfd, msec))
total_size += msec->size;
- stash->info_ptr = bfd_alloc (abfd, total_size);
+ stash->info_ptr = bfd_alloc (debug_bfd, total_size);
if (stash->info_ptr == NULL)
goto done;
stash->info_ptr_end = stash->info_ptr;
- for (msec = find_debug_info (abfd, NULL);
+ for (msec = find_debug_info (debug_bfd, NULL);
msec;
- msec = find_debug_info (abfd, msec))
+ msec = find_debug_info (debug_bfd, msec))
{
bfd_size_type size;
bfd_size_type start;
@@ -2612,7 +2444,7 @@ _bfd_dwarf2_find_line (bfd *abfd,
start = stash->info_ptr_end - stash->info_ptr;
if ((bfd_simple_get_relocated_section_contents
- (abfd, msec, stash->info_ptr + start, symbols)) == NULL)
+ (debug_bfd, msec, stash->info_ptr + start, symbols)) == NULL)
continue;
stash->info_ptr_end = stash->info_ptr + start + size;
@@ -2620,9 +2452,10 @@ _bfd_dwarf2_find_line (bfd *abfd,
BFD_ASSERT (stash->info_ptr_end == stash->info_ptr + total_size);
- stash->sec = find_debug_info (abfd, NULL);
+ stash->sec = find_debug_info (debug_bfd, NULL);
stash->sec_info_ptr = stash->info_ptr;
stash->syms = symbols;
+ stash->bfd = debug_bfd;
}
/* A null info_ptr indicates that there is no dwarf2 info
@@ -2634,14 +2467,23 @@ _bfd_dwarf2_find_line (bfd *abfd,
/* Check the previously read comp. units first. */
for (each = stash->all_comp_units; each; each = each->next_unit)
- if ((symbol->flags & BSF_FUNCTION) == 0
- || comp_unit_contains_address (each, addr))
- {
- found = comp_unit_find_line (each, symbol, addr, filename_ptr,
- linenumber_ptr, stash);
- if (found)
- goto done;
- }
+ {
+ if (do_line)
+ found = (((symbol->flags & BSF_FUNCTION) == 0
+ || comp_unit_contains_address (each, addr))
+ && comp_unit_find_line (each, symbol, addr,
+ filename_ptr, linenumber_ptr,
+ stash));
+ else
+ found = (comp_unit_contains_address (each, addr)
+ && comp_unit_find_nearest_line (each, addr,
+ filename_ptr,
+ functionname_ptr,
+ linenumber_ptr,
+ stash));
+ if (found)
+ goto done;
+ }
/* The DWARF2 spec says that the initial length field, and the
offset of the abbreviation table, should both be 4-byte values.
@@ -2657,13 +2499,13 @@ _bfd_dwarf2_find_line (bfd *abfd,
unsigned int offset_size = addr_size;
bfd_byte *info_ptr_unit = stash->info_ptr;
- length = read_4_bytes (abfd, stash->info_ptr);
- /* A 0xffffff length is the DWARF3 way of indicating we use
- 64-bit offsets, instead of 32-bit offsets. */
+ length = read_4_bytes (stash->bfd, stash->info_ptr);
+ /* A 0xffffff length is the DWARF3 way of indicating
+ we use 64-bit offsets, instead of 32-bit offsets. */
if (length == 0xffffffff)
{
offset_size = 8;
- length = read_8_bytes (abfd, stash->info_ptr + 4);
+ length = read_8_bytes (stash->bfd, stash->info_ptr + 4);
stash->info_ptr += 12;
}
/* A zero length is the IRIX way of indicating 64-bit offsets,
@@ -2672,30 +2514,36 @@ _bfd_dwarf2_find_line (bfd *abfd,
else if (length == 0)
{
offset_size = 8;
- length = read_4_bytes (abfd, stash->info_ptr + 4);
+ length = read_4_bytes (stash->bfd, stash->info_ptr + 4);
stash->info_ptr += 8;
}
- /* In the absence of the hints above, we assume addr_size-sized
- offsets, for backward-compatibility with pre-DWARF3 64-bit
- platforms. */
+ /* In the absence of the hints above, we assume 32-bit DWARF2
+ offsets even for targets with 64-bit addresses, because:
+ a) most of the time these targets will not have generated
+ more than 2Gb of debug info and so will not need 64-bit
+ offsets,
+ and
+ b) if they do use 64-bit offsets but they are not using
+ the size hints that are tested for above then they are
+ not conforming to the DWARF3 standard anyway. */
else if (addr_size == 8)
{
- length = read_8_bytes (abfd, stash->info_ptr);
- stash->info_ptr += 8;
+ offset_size = 4;
+ stash->info_ptr += 4;
}
else
stash->info_ptr += 4;
if (length > 0)
{
- each = parse_comp_unit (abfd, stash, length, info_ptr_unit,
+ each = parse_comp_unit (stash, length, info_ptr_unit,
offset_size);
stash->info_ptr += length;
if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
== stash->sec->size)
{
- stash->sec = find_debug_info (abfd, stash->sec);
+ stash->sec = find_debug_info (stash->bfd, stash->sec);
stash->sec_info_ptr = stash->info_ptr;
}
@@ -2709,13 +2557,22 @@ _bfd_dwarf2_find_line (bfd *abfd,
unit->high == 0), we need to consult the line info
table to see if a compilation unit contains the given
address. */
- found = (((symbol->flags & BSF_FUNCTION) == 0
- || each->arange.high <= 0
- || comp_unit_contains_address (each, addr))
- && comp_unit_find_line (each, symbol, addr,
- filename_ptr,
- linenumber_ptr,
- stash));
+ if (do_line)
+ found = (((symbol->flags & BSF_FUNCTION) == 0
+ || each->arange.high == 0
+ || comp_unit_contains_address (each, addr))
+ && comp_unit_find_line (each, symbol, addr,
+ filename_ptr,
+ linenumber_ptr,
+ stash));
+ else
+ found = ((each->arange.high == 0
+ || comp_unit_contains_address (each, addr))
+ && comp_unit_find_nearest_line (each, addr,
+ filename_ptr,
+ functionname_ptr,
+ linenumber_ptr,
+ stash));
if (found)
goto done;
}
@@ -2729,6 +2586,42 @@ done:
return found;
}
+/* The DWARF2 version of find_nearest_line.
+ Return TRUE if the line is found without error. */
+
+bfd_boolean
+_bfd_dwarf2_find_nearest_line (bfd *abfd,
+ asection *section,
+ asymbol **symbols,
+ bfd_vma offset,
+ const char **filename_ptr,
+ const char **functionname_ptr,
+ unsigned int *linenumber_ptr,
+ unsigned int addr_size,
+ void **pinfo)
+{
+ return find_line (abfd, section, offset, NULL, symbols, filename_ptr,
+ functionname_ptr, linenumber_ptr, addr_size,
+ pinfo);
+}
+
+/* The DWARF2 version of find_line.
+ Return TRUE if the line is found without error. */
+
+bfd_boolean
+_bfd_dwarf2_find_line (bfd *abfd,
+ asymbol **symbols,
+ asymbol *symbol,
+ const char **filename_ptr,
+ unsigned int *linenumber_ptr,
+ unsigned int addr_size,
+ void **pinfo)
+{
+ return find_line (abfd, NULL, 0, symbol, symbols, filename_ptr,
+ NULL, linenumber_ptr, addr_size,
+ pinfo);
+}
+
bfd_boolean
_bfd_dwarf2_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
const char **filename_ptr,
@@ -2742,17 +2635,18 @@ _bfd_dwarf2_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED,
if (stash)
{
struct funcinfo *func = stash->inliner_chain;
+
if (func && func->caller_func)
{
*filename_ptr = func->caller_file;
*functionname_ptr = func->caller_func->name;
*linenumber_ptr = func->caller_line;
stash->inliner_chain = func->caller_func;
- return (TRUE);
+ return TRUE;
}
}
- return (FALSE);
+ return FALSE;
}
void
diff --git a/contrib/binutils/bfd/ecoff.c b/contrib/binutils/bfd/ecoff.c
index 75e1cc2..45cdb1d 100644
--- a/contrib/binutils/bfd/ecoff.c
+++ b/contrib/binutils/bfd/ecoff.c
@@ -1,6 +1,6 @@
/* Generic ECOFF (Extended-COFF) routines.
Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Original version by Per Bothner.
Full support added by Ian Lance Taylor, ian@cygnus.com.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "aout/ar.h"
@@ -140,8 +140,7 @@ _bfd_ecoff_mkobject_hook (bfd *abfd, void * filehdr, void * aouthdr)
/* Initialize a new section. */
bfd_boolean
-_bfd_ecoff_new_section_hook (bfd *abfd ATTRIBUTE_UNUSED,
- asection *section)
+_bfd_ecoff_new_section_hook (bfd *abfd, asection *section)
{
unsigned int i;
static struct
@@ -181,7 +180,7 @@ _bfd_ecoff_new_section_hook (bfd *abfd ATTRIBUTE_UNUSED,
uncertain about .init on some systems and I don't know how shared
libraries work. */
- return TRUE;
+ return _bfd_generic_new_section_hook (abfd, section);
}
/* Determine the machine architecture and type. This is called from
@@ -1863,7 +1862,8 @@ _bfd_ecoff_set_arch_mach (bfd *abfd,
/* Get the size of the section headers. */
int
-_bfd_ecoff_sizeof_headers (bfd *abfd, bfd_boolean reloc ATTRIBUTE_UNUSED)
+_bfd_ecoff_sizeof_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *current;
int c;
@@ -1937,7 +1937,7 @@ ecoff_compute_section_file_positions (bfd *abfd)
const bfd_vma round = ecoff_backend (abfd)->round;
bfd_size_type amt;
- sofar = _bfd_ecoff_sizeof_headers (abfd, FALSE);
+ sofar = _bfd_ecoff_sizeof_headers (abfd, NULL);
file_sofar = sofar;
/* Sort the sections by VMA. */
@@ -2358,7 +2358,7 @@ _bfd_ecoff_write_object_contents (bfd *abfd)
}
if ((abfd->flags & D_PAGED) != 0)
- text_size = _bfd_ecoff_sizeof_headers (abfd, FALSE);
+ text_size = _bfd_ecoff_sizeof_headers (abfd, NULL);
else
text_size = 0;
text_start = 0;
@@ -2861,7 +2861,7 @@ _bfd_ecoff_slurp_armap (bfd *abfd)
bfd_slurp_armap, but that seems inappropriate since no other
target uses this format. Instead, we check directly for a COFF
armap. */
- if (strneq (nextname, "/ ", 16))
+ if (CONST_STRNEQ (nextname, "/ "))
return bfd_slurp_armap (abfd);
/* See if the first element is an armap. */
@@ -3087,7 +3087,7 @@ _bfd_ecoff_write_armap (bfd *abfd,
last_elt = current;
for (i = 0; i < orl_count; i++)
{
- unsigned int hash, rehash;
+ unsigned int hash, rehash = 0;
/* Advance firstreal to the file position of this archive
element. */
@@ -3097,7 +3097,7 @@ _bfd_ecoff_write_armap (bfd *abfd,
{
firstreal += arelt_size (current) + sizeof (struct ar_hdr);
firstreal += firstreal % 2;
- current = current->next;
+ current = current->archive_next;
}
while (current != map[i].u.abfd);
}
@@ -3757,7 +3757,7 @@ ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info)
while (*pundef != NULL)
{
struct bfd_link_hash_entry *h;
- unsigned int hash, rehash;
+ unsigned int hash, rehash = 0;
unsigned int file_offset;
const char *name;
bfd *element;
diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c
index 4246e94..8ee68e0 100644
--- a/contrib/binutils/bfd/ecofflink.c
+++ b/contrib/binutils/bfd/ecofflink.c
@@ -1,6 +1,6 @@
/* Routines to link ECOFF debugging information.
Copyright 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "objalloc.h"
@@ -782,7 +782,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
fdr_ptr += fdr_add, i++)
{
FDR fdr;
- bfd_vma fdr_adr;
bfd_byte *sym_out;
bfd_byte *lraw_src;
bfd_byte *lraw_end;
@@ -799,8 +798,6 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
else
(*input_swap->swap_fdr_in) (input_bfd, (PTR) fdr_ptr, &fdr);
- fdr_adr = fdr.adr;
-
/* FIXME: It is conceivable that this FDR points to the .init or
.fini section, in which case this will not do the right
thing. */
diff --git a/contrib/binutils/bfd/efi-app-ia32.c b/contrib/binutils/bfd/efi-app-ia32.c
index b186f90..06ed805 100644
--- a/contrib/binutils/bfd/efi-app-ia32.c
+++ b/contrib/binutils/bfd/efi-app-ia32.c
@@ -1,5 +1,5 @@
/* BFD back-end for Intel IA-32 EFI application files.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
Contributed by David Mosberger <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#define TARGET_SYM bfd_efi_app_ia32_vec
#define TARGET_NAME "efi-app-ia32"
diff --git a/contrib/binutils/bfd/efi-app-ia64.c b/contrib/binutils/bfd/efi-app-ia64.c
index c2a77ac..b60ca73 100644
--- a/contrib/binutils/bfd/efi-app-ia64.c
+++ b/contrib/binutils/bfd/efi-app-ia64.c
@@ -1,5 +1,5 @@
/* BFD back-end for HP/Intel IA-64 EFI application files.
- Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
Contributed by David Mosberger <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#define TARGET_SYM bfd_efi_app_ia64_vec
#define TARGET_NAME "efi-app-ia64"
diff --git a/contrib/binutils/bfd/elf-attrs.c b/contrib/binutils/bfd/elf-attrs.c
new file mode 100644
index 0000000..d1a64f4
--- /dev/null
+++ b/contrib/binutils/bfd/elf-attrs.c
@@ -0,0 +1,628 @@
+/* ELF attributes support (based on ARM EABI attributes).
+ Copyright 2005, 2006, 2007
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libiberty.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+
+/* Return the number of bytes needed by I in uleb128 format. */
+static int
+uleb128_size (unsigned int i)
+{
+ int size;
+ size = 1;
+ while (i >= 0x80)
+ {
+ i >>= 7;
+ size++;
+ }
+ return size;
+}
+
+/* Return TRUE if the attribute has the default value (0/""). */
+static bfd_boolean
+is_default_attr (obj_attribute *attr)
+{
+ if ((attr->type & 1) && attr->i != 0)
+ return FALSE;
+ if ((attr->type & 2) && attr->s && *attr->s)
+ return FALSE;
+
+ return TRUE;
+}
+
+/* Return the size of a single attribute. */
+static bfd_vma
+obj_attr_size (int tag, obj_attribute *attr)
+{
+ bfd_vma size;
+
+ if (is_default_attr (attr))
+ return 0;
+
+ size = uleb128_size (tag);
+ if (attr->type & 1)
+ size += uleb128_size (attr->i);
+ if (attr->type & 2)
+ size += strlen ((char *)attr->s) + 1;
+ return size;
+}
+
+/* Return the vendor name for a given object attributes section. */
+static const char *
+vendor_obj_attr_name (bfd *abfd, int vendor)
+{
+ return (vendor == OBJ_ATTR_PROC
+ ? get_elf_backend_data (abfd)->obj_attrs_vendor
+ : "gnu");
+}
+
+/* Return the size of the object attributes section for VENDOR
+ (OBJ_ATTR_PROC or OBJ_ATTR_GNU), or 0 if there are no attributes
+ for that vendor to record and the vendor is OBJ_ATTR_GNU. */
+static bfd_vma
+vendor_obj_attr_size (bfd *abfd, int vendor)
+{
+ bfd_vma size;
+ obj_attribute *attr;
+ obj_attribute_list *list;
+ int i;
+ const char *vendor_name = vendor_obj_attr_name (abfd, vendor);
+
+ if (!vendor_name)
+ return 0;
+
+ attr = elf_known_obj_attributes (abfd)[vendor];
+ size = 0;
+ for (i = 4; i < NUM_KNOWN_OBJ_ATTRIBUTES; i++)
+ size += obj_attr_size (i, &attr[i]);
+
+ for (list = elf_other_obj_attributes (abfd)[vendor];
+ list;
+ list = list->next)
+ size += obj_attr_size (list->tag, &list->attr);
+
+ /* <size> <vendor_name> NUL 0x1 <size> */
+ return ((size || vendor == OBJ_ATTR_PROC)
+ ? size + 10 + strlen (vendor_name)
+ : 0);
+}
+
+/* Return the size of the object attributes section. */
+bfd_vma
+bfd_elf_obj_attr_size (bfd *abfd)
+{
+ bfd_vma size;
+
+ size = vendor_obj_attr_size (abfd, OBJ_ATTR_PROC);
+ size += vendor_obj_attr_size (abfd, OBJ_ATTR_GNU);
+
+ /* 'A' <sections for each vendor> */
+ return (size ? size + 1 : 0);
+}
+
+/* Write VAL in uleb128 format to P, returning a pointer to the
+ following byte. */
+static bfd_byte *
+write_uleb128 (bfd_byte *p, unsigned int val)
+{
+ bfd_byte c;
+ do
+ {
+ c = val & 0x7f;
+ val >>= 7;
+ if (val)
+ c |= 0x80;
+ *(p++) = c;
+ }
+ while (val);
+ return p;
+}
+
+/* Write attribute ATTR to butter P, and return a pointer to the following
+ byte. */
+static bfd_byte *
+write_obj_attribute (bfd_byte *p, int tag, obj_attribute *attr)
+{
+ /* Suppress default entries. */
+ if (is_default_attr (attr))
+ return p;
+
+ p = write_uleb128 (p, tag);
+ if (attr->type & 1)
+ p = write_uleb128 (p, attr->i);
+ if (attr->type & 2)
+ {
+ int len;
+
+ len = strlen (attr->s) + 1;
+ memcpy (p, attr->s, len);
+ p += len;
+ }
+
+ return p;
+}
+
+/* Write the contents of the object attributes section (length SIZE)
+ for VENDOR to CONTENTS. */
+static void
+vendor_set_obj_attr_contents (bfd *abfd, bfd_byte *contents, bfd_vma size,
+ int vendor)
+{
+ bfd_byte *p;
+ obj_attribute *attr;
+ obj_attribute_list *list;
+ int i;
+ const char *vendor_name = vendor_obj_attr_name (abfd, vendor);
+ size_t vendor_length = strlen (vendor_name) + 1;
+
+ p = contents;
+ bfd_put_32 (abfd, size, p);
+ p += 4;
+ memcpy (p, vendor_name, vendor_length);
+ p += vendor_length;
+ *(p++) = Tag_File;
+ bfd_put_32 (abfd, size - 4 - vendor_length, p);
+ p += 4;
+
+ attr = elf_known_obj_attributes (abfd)[vendor];
+ for (i = 4; i < NUM_KNOWN_OBJ_ATTRIBUTES; i++)
+ p = write_obj_attribute (p, i, &attr[i]);
+
+ for (list = elf_other_obj_attributes (abfd)[vendor];
+ list;
+ list = list->next)
+ p = write_obj_attribute (p, list->tag, &list->attr);
+}
+
+/* Write the contents of the object attributes section to CONTENTS. */
+void
+bfd_elf_set_obj_attr_contents (bfd *abfd, bfd_byte *contents, bfd_vma size)
+{
+ bfd_byte *p;
+ int vendor;
+ bfd_vma my_size;
+
+ p = contents;
+ *(p++) = 'A';
+ my_size = 1;
+ for (vendor = OBJ_ATTR_FIRST; vendor <= OBJ_ATTR_LAST; vendor++)
+ {
+ bfd_vma vendor_size = vendor_obj_attr_size (abfd, vendor);
+ if (vendor_size)
+ vendor_set_obj_attr_contents (abfd, p, vendor_size, vendor);
+ p += vendor_size;
+ my_size += vendor_size;
+ }
+
+ if (size != my_size)
+ abort ();
+}
+
+/* Allocate/find an object attribute. */
+static obj_attribute *
+elf_new_obj_attr (bfd *abfd, int vendor, int tag)
+{
+ obj_attribute *attr;
+ obj_attribute_list *list;
+ obj_attribute_list *p;
+ obj_attribute_list **lastp;
+
+
+ if (tag < NUM_KNOWN_OBJ_ATTRIBUTES)
+ {
+ /* Knwon tags are preallocated. */
+ attr = &elf_known_obj_attributes (abfd)[vendor][tag];
+ }
+ else
+ {
+ /* Create a new tag. */
+ list = (obj_attribute_list *)
+ bfd_alloc (abfd, sizeof (obj_attribute_list));
+ memset (list, 0, sizeof (obj_attribute_list));
+ list->tag = tag;
+ /* Keep the tag list in order. */
+ lastp = &elf_other_obj_attributes (abfd)[vendor];
+ for (p = *lastp; p; p = p->next)
+ {
+ if (tag < p->tag)
+ break;
+ lastp = &p->next;
+ }
+ list->next = *lastp;
+ *lastp = list;
+ attr = &list->attr;
+ }
+
+ return attr;
+}
+
+/* Return the value of an integer object attribute. */
+int
+bfd_elf_get_obj_attr_int (bfd *abfd, int vendor, int tag)
+{
+ obj_attribute_list *p;
+
+ if (tag < NUM_KNOWN_OBJ_ATTRIBUTES)
+ {
+ /* Knwon tags are preallocated. */
+ return elf_known_obj_attributes (abfd)[vendor][tag].i;
+ }
+ else
+ {
+ for (p = elf_other_obj_attributes (abfd)[vendor];
+ p;
+ p = p->next)
+ {
+ if (tag == p->tag)
+ return p->attr.i;
+ if (tag < p->tag)
+ break;
+ }
+ return 0;
+ }
+}
+
+/* Add an integer object attribute. */
+void
+bfd_elf_add_obj_attr_int (bfd *abfd, int vendor, int tag, unsigned int i)
+{
+ obj_attribute *attr;
+
+ attr = elf_new_obj_attr (abfd, vendor, tag);
+ attr->type = 1;
+ attr->i = i;
+}
+
+/* Duplicate an object attribute string value. */
+char *
+_bfd_elf_attr_strdup (bfd *abfd, const char * s)
+{
+ char * p;
+ int len;
+
+ len = strlen (s) + 1;
+ p = (char *) bfd_alloc (abfd, len);
+ return memcpy (p, s, len);
+}
+
+/* Add a string object attribute. */
+void
+bfd_elf_add_obj_attr_string (bfd *abfd, int vendor, int tag, const char *s)
+{
+ obj_attribute *attr;
+
+ attr = elf_new_obj_attr (abfd, vendor, tag);
+ attr->type = 2;
+ attr->s = _bfd_elf_attr_strdup (abfd, s);
+}
+
+/* Add a Tag_compatibility object attribute. */
+void
+bfd_elf_add_obj_attr_compat (bfd *abfd, int vendor, unsigned int i,
+ const char *s)
+{
+ obj_attribute_list *list;
+ obj_attribute_list *p;
+ obj_attribute_list **lastp;
+
+ list = (obj_attribute_list *)
+ bfd_alloc (abfd, sizeof (obj_attribute_list));
+ memset (list, 0, sizeof (obj_attribute_list));
+ list->tag = Tag_compatibility;
+ list->attr.type = 3;
+ list->attr.i = i;
+ list->attr.s = _bfd_elf_attr_strdup (abfd, s);
+
+ lastp = &elf_other_obj_attributes (abfd)[vendor];
+ for (p = *lastp; p; p = p->next)
+ {
+ int cmp;
+ if (p->tag != Tag_compatibility)
+ break;
+ cmp = strcmp(s, p->attr.s);
+ if (cmp < 0 || (cmp == 0 && i < p->attr.i))
+ break;
+ lastp = &p->next;
+ }
+ list->next = *lastp;
+ *lastp = list;
+}
+
+/* Copy the object attributes from IBFD to OBFD. */
+void
+_bfd_elf_copy_obj_attributes (bfd *ibfd, bfd *obfd)
+{
+ obj_attribute *in_attr;
+ obj_attribute *out_attr;
+ obj_attribute_list *list;
+ int i;
+ int vendor;
+
+ for (vendor = OBJ_ATTR_FIRST; vendor <= OBJ_ATTR_LAST; vendor++)
+ {
+ in_attr = &elf_known_obj_attributes (ibfd)[vendor][4];
+ out_attr = &elf_known_obj_attributes (obfd)[vendor][4];
+ for (i = 4; i < NUM_KNOWN_OBJ_ATTRIBUTES; i++)
+ {
+ out_attr->type = in_attr->type;
+ out_attr->i = in_attr->i;
+ if (in_attr->s && *in_attr->s)
+ out_attr->s = _bfd_elf_attr_strdup (obfd, in_attr->s);
+ in_attr++;
+ out_attr++;
+ }
+
+ for (list = elf_other_obj_attributes (ibfd)[vendor];
+ list;
+ list = list->next)
+ {
+ in_attr = &list->attr;
+ switch (in_attr->type)
+ {
+ case 1:
+ bfd_elf_add_obj_attr_int (obfd, vendor, list->tag, in_attr->i);
+ break;
+ case 2:
+ bfd_elf_add_obj_attr_string (obfd, vendor, list->tag,
+ in_attr->s);
+ break;
+ case 3:
+ bfd_elf_add_obj_attr_compat (obfd, vendor, in_attr->i,
+ in_attr->s);
+ break;
+ default:
+ abort ();
+ }
+ }
+ }
+}
+
+/* Determine whether a GNU object attribute tag takes an integer, a
+ string or both. */
+static int
+gnu_obj_attrs_arg_type (int tag)
+{
+ /* Except for Tag_compatibility, for GNU attributes we follow the
+ same rule ARM ones > 32 follow: odd-numbered tags take strings
+ and even-numbered tags take integers. In addition, tag & 2 is
+ nonzero for architecture-independent tags and zero for
+ architecture-dependent ones. */
+ if (tag == Tag_compatibility)
+ return 3;
+ else
+ return (tag & 1) != 0 ? 2 : 1;
+}
+
+/* Determine what arguments an attribute tag takes. */
+int
+_bfd_elf_obj_attrs_arg_type (bfd *abfd, int vendor, int tag)
+{
+ switch (vendor)
+ {
+ case OBJ_ATTR_PROC:
+ return get_elf_backend_data (abfd)->obj_attrs_arg_type (tag);
+ break;
+ case OBJ_ATTR_GNU:
+ return gnu_obj_attrs_arg_type (tag);
+ break;
+ default:
+ abort ();
+ }
+}
+
+/* Parse an object attributes section. */
+void
+_bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr)
+{
+ bfd_byte *contents;
+ bfd_byte *p;
+ bfd_vma len;
+ const char *std_section;
+
+ contents = bfd_malloc (hdr->sh_size);
+ if (!contents)
+ return;
+ if (!bfd_get_section_contents (abfd, hdr->bfd_section, contents, 0,
+ hdr->sh_size))
+ {
+ free (contents);
+ return;
+ }
+ p = contents;
+ std_section = get_elf_backend_data (abfd)->obj_attrs_vendor;
+ if (*(p++) == 'A')
+ {
+ len = hdr->sh_size - 1;
+ while (len > 0)
+ {
+ int namelen;
+ bfd_vma section_len;
+ int vendor;
+
+ section_len = bfd_get_32 (abfd, p);
+ p += 4;
+ if (section_len > len)
+ section_len = len;
+ len -= section_len;
+ namelen = strlen ((char *)p) + 1;
+ section_len -= namelen + 4;
+ if (std_section && strcmp ((char *)p, std_section) == 0)
+ vendor = OBJ_ATTR_PROC;
+ else if (strcmp ((char *)p, "gnu") == 0)
+ vendor = OBJ_ATTR_GNU;
+ else
+ {
+ /* Other vendor section. Ignore it. */
+ p += namelen + section_len;
+ continue;
+ }
+
+ p += namelen;
+ while (section_len > 0)
+ {
+ int tag;
+ unsigned int n;
+ unsigned int val;
+ bfd_vma subsection_len;
+ bfd_byte *end;
+
+ tag = read_unsigned_leb128 (abfd, p, &n);
+ p += n;
+ subsection_len = bfd_get_32 (abfd, p);
+ p += 4;
+ if (subsection_len > section_len)
+ subsection_len = section_len;
+ section_len -= subsection_len;
+ subsection_len -= n + 4;
+ end = p + subsection_len;
+ switch (tag)
+ {
+ case Tag_File:
+ while (p < end)
+ {
+ int type;
+
+ tag = read_unsigned_leb128 (abfd, p, &n);
+ p += n;
+ type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag);
+ switch (type)
+ {
+ case 3:
+ val = read_unsigned_leb128 (abfd, p, &n);
+ p += n;
+ bfd_elf_add_obj_attr_compat (abfd, vendor, val,
+ (char *)p);
+ p += strlen ((char *)p) + 1;
+ break;
+ case 2:
+ bfd_elf_add_obj_attr_string (abfd, vendor, tag,
+ (char *)p);
+ p += strlen ((char *)p) + 1;
+ break;
+ case 1:
+ val = read_unsigned_leb128 (abfd, p, &n);
+ p += n;
+ bfd_elf_add_obj_attr_int (abfd, vendor, tag, val);
+ break;
+ default:
+ abort ();
+ }
+ }
+ break;
+ case Tag_Section:
+ case Tag_Symbol:
+ /* Don't have anywhere convenient to attach these.
+ Fall through for now. */
+ default:
+ /* Ignore things we don't kow about. */
+ p += subsection_len;
+ subsection_len = 0;
+ break;
+ }
+ }
+ }
+ }
+ free (contents);
+}
+
+/* Merge common object attributes from IBFD into OBFD. Raise an error
+ if there are conflicting attributes. Any processor-specific
+ attributes have already been merged. This must be called from the
+ bfd_elfNN_bfd_merge_private_bfd_data hook for each individual
+ target, along with any target-specific merging. Because there are
+ no common attributes other than Tag_compatibility at present, and
+ non-"gnu" Tag_compatibility is not expected in "gnu" sections, this
+ is not presently called for targets without their own
+ attributes. */
+
+bfd_boolean
+_bfd_elf_merge_object_attributes (bfd *ibfd, bfd *obfd)
+{
+ obj_attribute *in_attr;
+ obj_attribute *out_attr;
+ obj_attribute_list *in_list;
+ obj_attribute_list *out_list;
+ int vendor;
+
+ /* The only common attribute is currently Tag_compatibility,
+ accepted in both processor and "gnu" sections. */
+ for (vendor = OBJ_ATTR_FIRST; vendor <= OBJ_ATTR_LAST; vendor++)
+ {
+ in_list = elf_other_obj_attributes (ibfd)[vendor];
+ out_list = elf_other_obj_attributes (ibfd)[vendor];
+ while (in_list && in_list->tag == Tag_compatibility)
+ {
+ in_attr = &in_list->attr;
+ if (in_attr->i == 0)
+ continue;
+ if (in_attr->i == 1 && strcmp (in_attr->s, "gnu") != 0)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B: Must be processed by '%s' toolchain"),
+ ibfd, in_attr->s);
+ return FALSE;
+ }
+ if (!out_list || out_list->tag != Tag_compatibility
+ || strcmp (in_attr->s, out_list->attr.s) != 0)
+ {
+ /* Add this compatibility tag to the output. */
+ bfd_elf_add_proc_attr_compat (obfd, in_attr->i, in_attr->s);
+ continue;
+ }
+ out_attr = &out_list->attr;
+ /* Check all the input tags with the same identifier. */
+ for (;;)
+ {
+ if (out_list->tag != Tag_compatibility
+ || in_attr->i != out_attr->i
+ || strcmp (in_attr->s, out_attr->s) != 0)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B: Incompatible object tag '%s':%d"),
+ ibfd, in_attr->s, in_attr->i);
+ return FALSE;
+ }
+ in_list = in_list->next;
+ if (in_list->tag != Tag_compatibility
+ || strcmp (in_attr->s, in_list->attr.s) != 0)
+ break;
+ in_attr = &in_list->attr;
+ out_list = out_list->next;
+ if (out_list)
+ out_attr = &out_list->attr;
+ }
+
+ /* Check the output doesn't have extra tags with this identifier. */
+ if (out_list && out_list->tag == Tag_compatibility
+ && strcmp (in_attr->s, out_list->attr.s) == 0)
+ {
+ _bfd_error_handler
+ (_("ERROR: %B: Incompatible object tag '%s':%d"),
+ ibfd, in_attr->s, out_list->attr.i);
+ return FALSE;
+ }
+ }
+ }
+
+ return TRUE;
+}
diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h
index 3fba1c2..f4c3a0a 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,
- 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -155,6 +155,8 @@ struct elf_link_hash_entry
unsigned int hidden : 1;
/* Symbol was forced to local scope due to a version script file. */
unsigned int forced_local : 1;
+ /* Symbol was forced to be dynamic due to a version script file. */
+ unsigned int dynamic : 1;
/* Symbol was marked during garbage collection. */
unsigned int mark : 1;
/* Symbol is referenced by a non-GOT/non-PLT relocation. This is
@@ -259,31 +261,6 @@ struct elf_link_loaded_list
};
/* Structures used by the eh_frame optimization code. */
-struct cie_header
-{
- unsigned int length;
- unsigned int id;
-};
-
-struct cie
-{
- struct cie_header hdr;
- unsigned char version;
- char augmentation[20];
- bfd_vma code_align;
- bfd_signed_vma data_align;
- bfd_vma ra_column;
- bfd_vma 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
{
/* For FDEs, this points to the CIE used. */
@@ -302,12 +279,12 @@ struct eh_cie_fde
unsigned int make_lsda_relative : 1;
unsigned int need_lsda_relative : 1;
unsigned int per_encoding_relative : 1;
+ unsigned int *set_loc;
};
struct eh_frame_sec_info
{
unsigned int count;
- unsigned int alloced;
struct eh_cie_fde entry[1];
};
@@ -317,11 +294,11 @@ struct eh_frame_array_ent
bfd_vma fde;
};
+struct htab;
+
struct eh_frame_hdr_info
{
- struct cie last_cie;
- asection *last_cie_sec;
- struct eh_cie_fde *last_cie_inf;
+ struct htab *cies;
asection *hdr_sec;
unsigned int fde_count, array_count;
struct eh_frame_array_ent *array;
@@ -342,6 +319,10 @@ struct elf_link_hash_table
when linking against or generating a shared object. */
bfd_boolean dynamic_sections_created;
+ /* True if this target has relocatable executables, so needs dynamic
+ section symbols. */
+ bfd_boolean is_relocatable_executable;
+
/* 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. */
@@ -375,6 +356,12 @@ struct elf_link_hash_table
included in the link. */
struct bfd_link_needed_list *needed;
+ /* Sections in the output bfd that provides a section symbol
+ to be used by relocations emitted against local symbols.
+ Most targets will not use data_index_section. */
+ asection *text_index_section;
+ asection *data_index_section;
+
/* The _GLOBAL_OFFSET_TABLE_ symbol. */
struct elf_link_hash_entry *hgot;
@@ -403,10 +390,6 @@ struct elf_link_hash_table
/* A linked list of BFD's loaded in the link. */
struct elf_link_loaded_list *loaded;
-
- /* True if this target has relocatable executables, so needs dynamic
- section symbols. */
- bfd_boolean is_relocatable_executable;
};
/* Look up an entry in an ELF linker hash table. */
@@ -466,7 +449,7 @@ struct elf_size_info {
(*write_shdrs_and_ehdr) (bfd *);
void (*write_relocs)
(bfd *, asection *, void *);
- void (*swap_symbol_in)
+ bfd_boolean (*swap_symbol_in)
(bfd *, const void *, const void *, Elf_Internal_Sym *);
void (*swap_symbol_out)
(bfd *, const Elf_Internal_Sym *, void *, void *);
@@ -555,6 +538,10 @@ enum action_discarded
PRETEND = 2
};
+typedef asection * (*elf_gc_mark_hook_fn)
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
+
struct elf_backend_data
{
/* The architecture for this backend. */
@@ -563,6 +550,9 @@ struct elf_backend_data
/* The ELF machine code (EM_xxxx) for this backend. */
int elf_machine_code;
+ /* EI_OSABI. */
+ int elf_osabi;
+
/* The maximum page size for this backend. */
bfd_vma maxpagesize;
@@ -571,6 +561,9 @@ struct elf_backend_data
pages at least this large. May be smaller than maxpagesize. */
bfd_vma minpagesize;
+ /* The common page size for this backend. */
+ bfd_vma commonpagesize;
+
/* The BFD flags applied to sections created for dynamic linking. */
flagword dynamic_sec_flags;
@@ -725,6 +718,13 @@ struct elf_backend_data
bfd_boolean (*check_directives)
(bfd *abfd, struct bfd_link_info *info);
+ /* The AS_NEEDED_CLEANUP function is called once per --as-needed
+ input file that was not needed by the add_symbols phase of the
+ ELF backend linker. The function must undo any target specific
+ changes in the symbol hash table. */
+ bfd_boolean (*as_needed_cleanup)
+ (bfd *abfd, struct bfd_link_info *info);
+
/* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend
linker for every symbol which is defined by a dynamic object and
referenced by a regular object. This is called after all the
@@ -760,6 +760,11 @@ struct elf_backend_data
bfd_boolean (*elf_backend_size_dynamic_sections)
(bfd *output_bfd, struct bfd_link_info *info);
+ /* Set TEXT_INDEX_SECTION and DATA_INDEX_SECTION, the output sections
+ we keep to use as a base for relocs and symbols. */
+ void (*elf_backend_init_index_section)
+ (bfd *output_bfd, struct bfd_link_info *info);
+
/* The RELOCATE_SECTION function is called by the ELF backend linker
to handle the relocations for a section.
@@ -787,8 +792,11 @@ struct elf_backend_data
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. */
- bfd_boolean (*elf_backend_relocate_section)
+ accordingly.
+
+ Returns FALSE on error, TRUE on success, 2 if successful and
+ relocations should be written for this section. */
+ int (*elf_backend_relocate_section)
(bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd,
asection *input_section, bfd_byte *contents, Elf_Internal_Rela *relocs,
Elf_Internal_Sym *local_syms, asection **local_sections);
@@ -826,13 +834,18 @@ struct elf_backend_data
return the number of additional program segments which this BFD
will need. It should return -1 on error. */
int (*elf_backend_additional_program_headers)
- (bfd *);
+ (bfd *, struct bfd_link_info *);
/* This function is called to modify an existing segment map in a
backend specific fashion. */
bfd_boolean (*elf_backend_modify_segment_map)
(bfd *, struct bfd_link_info *);
+ /* This function is called to modify program headers just before
+ they are written. */
+ bfd_boolean (*elf_backend_modify_program_headers)
+ (bfd *, struct bfd_link_info *);
+
/* This function is called during section garbage collection to
mark sections that define global symbols. */
bfd_boolean (*gc_mark_dynamic_ref)
@@ -840,9 +853,12 @@ struct elf_backend_data
/* This function is called during section gc to discover the section a
particular relocation refers to. */
- asection * (*gc_mark_hook)
- (asection *sec, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *h, Elf_Internal_Sym *);
+ elf_gc_mark_hook_fn gc_mark_hook;
+
+ /* This function, if defined, is called after the first gc marking pass
+ to allow the backend to mark additional sections. */
+ bfd_boolean (*gc_mark_extra_sections)
+ (struct bfd_link_info *info, elf_gc_mark_hook_fn gc_mark_hook);
/* This function, if defined, is called during the sweep phase of gc
in order that a backend might update any data structures it might
@@ -865,8 +881,16 @@ struct elf_backend_data
/* This function, if defined, is called after all local symbols and
global symbols converted to locals are emitted into the symtab
- section. It allows the backend to emit special global symbols
+ section. It allows the backend to emit special local symbols
not handled in the hash table. */
+ bfd_boolean (*elf_backend_output_arch_local_syms)
+ (bfd *, struct bfd_link_info *, void *,
+ bfd_boolean (*) (void *, const char *, Elf_Internal_Sym *, asection *,
+ struct elf_link_hash_entry *));
+
+ /* This function, if defined, is called after all symbols are emitted
+ into the symtab section. It allows the backend to emit special
+ global symbols not handled in the hash table. */
bfd_boolean (*elf_backend_output_arch_syms)
(bfd *, struct bfd_link_info *, void *,
bfd_boolean (*) (void *, const char *, Elf_Internal_Sym *, asection *,
@@ -913,15 +937,19 @@ struct elf_backend_data
(asection *, Elf_Internal_Rela *);
/* This function, if defined, is called when an NT_PRSTATUS note is found
- in a core file. */
+ in a core file. */
bfd_boolean (*elf_backend_grok_prstatus)
(bfd *, Elf_Internal_Note *);
/* This function, if defined, is called when an NT_PSINFO or NT_PRPSINFO
- note is found in a core file. */
+ note is found in a core file. */
bfd_boolean (*elf_backend_grok_psinfo)
(bfd *, Elf_Internal_Note *);
+ /* This function, if defined, is called to write a note to a corefile. */
+ char *(*elf_backend_write_core_note)
+ (bfd *abfd, char *buf, int *bufsiz, int note_type, ...);
+
/* Functions to print VMAs. Special code to handle 64 bit ELF files. */
void (* elf_backend_sprintf_vma)
(bfd *, char *, bfd_vma);
@@ -974,7 +1002,7 @@ struct elf_backend_data
/* This function, if defined, may write out the given section.
Returns TRUE if it did so and FALSE if the caller should. */
bfd_boolean (*elf_backend_write_section)
- (bfd *, asection *, bfd_byte *);
+ (bfd *, struct bfd_link_info *, asection *, bfd_byte *);
/* The level of IRIX compatibility we're striving for.
MIPS ELF specific function. */
@@ -1022,6 +1050,12 @@ struct elf_backend_data
bfd_boolean *, bfd_boolean *,
bfd *, asection **);
+ /* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
+ bfd_boolean (*elf_hash_symbol) (struct elf_link_hash_entry *);
+
+ /* Return TRUE if type is a function symbol type. */
+ bfd_boolean (*is_function_type) (unsigned int type);
+
/* Used to handle bad SHF_LINK_ORDER input. */
bfd_error_handler_type link_order_error_handler;
@@ -1041,6 +1075,19 @@ struct elf_backend_data
so-called reserved entries on some systems. */
bfd_vma got_header_size;
+ /* The vendor name to use for a processor-standard attributes section. */
+ const char *obj_attrs_vendor;
+
+ /* The section name to use for a processor-standard attributes section. */
+ const char *obj_attrs_section;
+
+ /* Return 1, 2 or 3 to indicate what type of arguments a
+ processor-specific tag takes. */
+ int (*obj_attrs_arg_type) (int);
+
+ /* The section type to use for an attributes section. */
+ unsigned int obj_attrs_section_type;
+
/* This is TRUE if the linker should act like collect and gather
global constructors and destructors by name. This is TRUE for
MIPS ELF because the Irix 5 tools can not handle the .init
@@ -1088,10 +1135,17 @@ struct elf_backend_data
unsigned can_refcount : 1;
unsigned want_got_sym : 1;
unsigned want_dynbss : 1;
- /* Targets which do not support physical addressing often require
- that the p_paddr field in the section header to be set to zero.
- This field indicates whether this behavior is required. */
+
+ /* Targets which do not support physical addressing often require
+ that the p_paddr field in the section header to be set to zero.
+ This field indicates whether this behavior is required. */
unsigned want_p_paddr_set_to_zero : 1;
+
+ /* True if an object file lacking a .note.GNU-stack section
+ should be assumed to be requesting exec stack. At least one
+ other file in the link needs to have a .note.GNU-stack section
+ for a PT_GNU_STACK segment to be created. */
+ unsigned default_execstack : 1;
};
/* Information stored for each BFD section in an ELF file. This
@@ -1160,12 +1214,12 @@ struct bfd_elf_section_data
struct bfd_symbol *id;
} group;
- /* Optional information about section group; NULL if it doesn't
- belongs to any section group. */
+ /* For a member of a group, points to the SHT_GROUP section.
+ NULL for the SHT_GROUP section itself and non-group sections. */
asection *sec_group;
- /* A linked list of sections in the group. Circular when used by
- the linker. */
+ /* A linked list of member sections in the group. Circular when used by
+ the linker. For the SHT_GROUP section, points at first member. */
asection *next_in_group;
/* A pointer used for various section optimizations. */
@@ -1181,15 +1235,11 @@ struct bfd_elf_section_data
#define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
#define elf_sec_group(sec) (elf_section_data(sec)->sec_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) \
- && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
- && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
+#define xvec_get_elf_backend_data(xvec) \
+ ((struct elf_backend_data *) (xvec)->backend_data)
#define get_elf_backend_data(abfd) \
- ((const struct elf_backend_data *) (abfd)->xvec->backend_data)
+ xvec_get_elf_backend_data ((abfd)->xvec)
/* This struct is used to pass information to routines called via
elf_link_hash_traverse which must return failure. */
@@ -1231,6 +1281,46 @@ struct elf_find_verdep_info
bfd_boolean failed;
};
+/* The maximum number of known object attributes for any target. */
+#define NUM_KNOWN_OBJ_ATTRIBUTES 32
+
+/* The value of an object attribute. type & 1 indicates whether there
+ is an integer value; type & 2 indicates whether there is a string
+ value. */
+
+typedef struct obj_attribute
+{
+ int type;
+ unsigned int i;
+ char *s;
+} obj_attribute;
+
+typedef struct obj_attribute_list
+{
+ struct obj_attribute_list *next;
+ int tag;
+ obj_attribute attr;
+} obj_attribute_list;
+
+/* Object attributes may either be defined by the processor ABI, index
+ OBJ_ATTR_PROC in the *_obj_attributes arrays, or be GNU-specific
+ (and possibly also processor-specific), index OBJ_ATTR_GNU. */
+#define OBJ_ATTR_PROC 0
+#define OBJ_ATTR_GNU 1
+#define OBJ_ATTR_FIRST OBJ_ATTR_PROC
+#define OBJ_ATTR_LAST OBJ_ATTR_GNU
+
+/* The following object attribute tags are taken as generic, for all
+ targets and for "gnu" where there is no target standard. */
+enum
+{
+ Tag_NULL = 0,
+ Tag_File = 1,
+ Tag_Section = 2,
+ Tag_Symbol = 3,
+ Tag_compatibility = 32
+};
+
/* Some private data is stashed away for future use using the tdata pointer
in the bfd structure. */
@@ -1317,6 +1407,7 @@ struct elf_obj_tdata
MIPS ELF linker. FIXME: We should figure out some way to only
include this field for a MIPS ELF target. */
asection **local_stubs;
+ asection **local_call_stubs;
/* Used to determine if PT_GNU_EH_FRAME segment header should be
created. */
@@ -1368,6 +1459,12 @@ struct elf_obj_tdata
/* Used to determine if the e_flags field has been initialized */
bfd_boolean flags_init;
+
+ /* Symbol buffer. */
+ void *symbuf;
+
+ obj_attribute known_obj_attributes[2][NUM_KNOWN_OBJ_ATTRIBUTES];
+ obj_attribute_list *other_obj_attributes[2];
};
#define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data)
@@ -1397,6 +1494,12 @@ struct elf_obj_tdata
#define elf_dyn_lib_class(bfd) (elf_tdata(bfd) -> dyn_lib_class)
#define elf_bad_symtab(bfd) (elf_tdata(bfd) -> bad_symtab)
#define elf_flags_init(bfd) (elf_tdata(bfd) -> flags_init)
+#define elf_known_obj_attributes(bfd) (elf_tdata (bfd) -> known_obj_attributes)
+#define elf_other_obj_attributes(bfd) (elf_tdata (bfd) -> other_obj_attributes)
+#define elf_known_obj_attributes_proc(bfd) \
+ (elf_known_obj_attributes (bfd) [OBJ_ATTR_PROC])
+#define elf_other_obj_attributes_proc(bfd) \
+ (elf_other_obj_attributes (bfd) [OBJ_ATTR_PROC])
extern void _bfd_elf_swap_verdef_in
(bfd *, const Elf_External_Verdef *, Elf_Internal_Verdef *);
@@ -1462,6 +1565,8 @@ extern bfd_vma _bfd_elf_section_offset
extern unsigned long bfd_elf_hash
(const char *);
+extern unsigned long bfd_elf_gnu_hash
+ (const char *);
extern bfd_reloc_status_type bfd_elf_generic_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
@@ -1500,11 +1605,11 @@ extern bfd_boolean _bfd_elf_match_sections_by_type
extern bfd_boolean bfd_elf_is_group_section
(bfd *, const struct bfd_section *);
extern void _bfd_elf_section_already_linked
- (bfd *, struct bfd_section *);
+ (bfd *, struct bfd_section *, struct bfd_link_info *);
extern void bfd_elf_set_group_contents
(bfd *, asection *, void *);
extern asection *_bfd_elf_check_kept_section
- (asection *);
+ (asection *, struct bfd_link_info *);
extern void _bfd_elf_link_just_syms
(asection *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_copy_private_header_data
@@ -1562,7 +1667,7 @@ extern bfd_boolean _bfd_elf_find_inliner_info
#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
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elf_new_section_hook
(bfd *, asection *);
extern bfd_boolean _bfd_elf_init_reloc_shdr
@@ -1632,6 +1737,8 @@ extern bfd_boolean _bfd_elf_merge_symbol
struct elf_link_hash_entry **, bfd_boolean *,
bfd_boolean *, bfd_boolean *, bfd_boolean *);
+extern bfd_boolean _bfd_elf_hash_symbol (struct elf_link_hash_entry *);
+
extern bfd_boolean _bfd_elf_add_default_symbol
(bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
const char *, Elf_Internal_Sym *, asection **, bfd_vma *,
@@ -1668,6 +1775,10 @@ extern bfd_boolean _bfd_elf_create_got_section
(bfd *, struct bfd_link_info *);
extern struct elf_link_hash_entry *_bfd_elf_define_linkage_sym
(bfd *, struct bfd_link_info *, asection *, const char *);
+extern void _bfd_elf_init_1_index_section
+ (bfd *, struct bfd_link_info *);
+extern void _bfd_elf_init_2_index_sections
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_elfcore_make_pseudosection
(bfd *, char *, size_t, ufile_ptr);
@@ -1690,6 +1801,9 @@ extern bfd_boolean _bfd_elf_fix_symbol_flags
extern bfd_boolean _bfd_elf_adjust_dynamic_symbol
(struct elf_link_hash_entry *, void *);
+extern bfd_boolean _bfd_elf_adjust_dynamic_copy
+ (struct elf_link_hash_entry *, asection *);
+
extern bfd_boolean _bfd_elf_link_sec_merge_syms
(struct elf_link_hash_entry *, void *);
@@ -1700,11 +1814,23 @@ extern bfd_boolean _bfd_elf_symbol_refs_local_p
(struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean);
extern bfd_boolean bfd_elf_match_symbols_in_sections
- (asection *sec1, asection *sec2);
+ (asection *, asection *, struct bfd_link_info *);
+
+extern void bfd_elf_perform_complex_relocation
+ (bfd * output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info,
+ bfd * input_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * rel,
+ Elf_Internal_Sym * local_syms,
+ asection ** local_sections);
extern bfd_boolean _bfd_elf_setup_sections
(bfd *);
+extern void _bfd_elf_set_osabi (bfd * , struct bfd_link_info *);
+
extern const bfd_target *bfd_elf32_object_p
(bfd *);
extern const bfd_target *bfd_elf32_core_file_p
@@ -1716,7 +1842,7 @@ extern int bfd_elf32_core_file_failing_signal
extern bfd_boolean bfd_elf32_core_file_matches_executable_p
(bfd *, bfd *);
-extern void bfd_elf32_swap_symbol_in
+extern bfd_boolean bfd_elf32_swap_symbol_in
(bfd *, const void *, const void *, Elf_Internal_Sym *);
extern void bfd_elf32_swap_symbol_out
(bfd *, const Elf_Internal_Sym *, void *, void *);
@@ -1758,7 +1884,7 @@ extern int bfd_elf64_core_file_failing_signal
extern bfd_boolean bfd_elf64_core_file_matches_executable_p
(bfd *, bfd *);
-extern void bfd_elf64_swap_symbol_in
+extern bfd_boolean bfd_elf64_swap_symbol_in
(bfd *, const void *, const void *, Elf_Internal_Sym *);
extern void bfd_elf64_swap_symbol_out
(bfd *, const Elf_Internal_Sym *, void *, void *);
@@ -1802,6 +1928,10 @@ extern bfd_boolean bfd_elf_link_record_dynamic_symbol
extern int bfd_elf_link_record_local_dynamic_symbol
(struct bfd_link_info *, bfd *, long);
+extern void bfd_elf_link_mark_dynamic_symbol
+ (struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *);
+
extern bfd_boolean _bfd_elf_close_and_cleanup
(bfd *);
@@ -1836,6 +1966,10 @@ extern bfd_boolean bfd_elf_gc_record_vtinherit
extern bfd_boolean bfd_elf_gc_record_vtentry
(bfd *, asection *, struct elf_link_hash_entry *, bfd_vma);
+extern asection *_bfd_elf_gc_mark_hook
+ (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *);
+
extern bfd_boolean _bfd_elf_gc_mark
(struct bfd_link_info *, asection *,
asection * (*) (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
@@ -1850,10 +1984,14 @@ extern bfd_boolean bfd_elf_gc_common_final_link
extern bfd_boolean bfd_elf_reloc_symbol_deleted_p
(bfd_vma, void *);
-extern struct elf_segment_map *
-_bfd_elf_make_dynamic_segment
+extern struct elf_segment_map * _bfd_elf_make_dynamic_segment
(bfd *, asection *);
+extern bfd_boolean _bfd_elf_map_sections_to_segments
+ (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean _bfd_elf_is_function_type (unsigned int);
+
/* Exported interface for writing elf corefile notes. */
extern char *elfcore_write_note
(bfd *, char *, int *, const char *, int, const void *, int);
@@ -1877,6 +2015,26 @@ extern bfd *_bfd_elf64_bfd_from_remote_memory
(bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
int (*target_read_memory) (bfd_vma, bfd_byte *, int));
+extern bfd_vma bfd_elf_obj_attr_size (bfd *);
+extern void bfd_elf_set_obj_attr_contents (bfd *, bfd_byte *, bfd_vma);
+extern int bfd_elf_get_obj_attr_int (bfd *, int, int);
+extern void bfd_elf_add_obj_attr_int (bfd *, int, int, unsigned int);
+#define bfd_elf_add_proc_attr_int(BFD, TAG, VALUE) \
+ bfd_elf_add_obj_attr_int ((BFD), OBJ_ATTR_PROC, (TAG), (VALUE))
+extern void bfd_elf_add_obj_attr_string (bfd *, int, int, const char *);
+#define bfd_elf_add_proc_attr_string(BFD, TAG, VALUE) \
+ bfd_elf_add_obj_attr_string ((BFD), OBJ_ATTR_PROC, (TAG), (VALUE))
+extern void bfd_elf_add_obj_attr_compat (bfd *, int, unsigned int,
+ const char *);
+#define bfd_elf_add_proc_attr_compat(BFD, INTVAL, STRVAL) \
+ bfd_elf_add_obj_attr_compat ((BFD), OBJ_ATTR_PROC, (INTVAL), (STRVAL))
+
+extern char *_bfd_elf_attr_strdup (bfd *, const char *);
+extern void _bfd_elf_copy_obj_attributes (bfd *, bfd *);
+extern int _bfd_elf_obj_attrs_arg_type (bfd *, int, int);
+extern void _bfd_elf_parse_attributes (bfd *, Elf_Internal_Shdr *);
+extern bfd_boolean _bfd_elf_merge_object_attributes (bfd *, bfd *);
+
/* Large common section. */
extern asection _bfd_elf_large_com_section;
@@ -1936,7 +2094,7 @@ extern bfd_boolean _sh_elf_set_mach_from_flags
else if (info->unresolved_syms_in_objects == RM_IGNORE \
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \
; \
- else \
+ else if (!info->relocatable) \
{ \
bfd_boolean err; \
err = (info->unresolved_syms_in_objects == RM_GENERATE_ERROR \
@@ -1952,4 +2110,9 @@ extern bfd_boolean _sh_elf_set_mach_from_flags
} \
while (0)
+/* Will a symbol be bound to the the definition within the shared
+ library, if any. */
+#define SYMBOLIC_BIND(INFO, H) \
+ ((INFO)->symbolic || ((INFO)->dynamic && !(H)->dynamic))
+
#endif /* _LIBELF_H_ */
diff --git a/contrib/binutils/bfd/elf-eh-frame.c b/contrib/binutils/bfd/elf-eh-frame.c
index 5100e72..092c2c5 100644
--- a/contrib/binutils/bfd/elf-eh-frame.c
+++ b/contrib/binutils/bfd/elf-eh-frame.c
@@ -1,5 +1,6 @@
/* .eh_frame section optimization.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,14 +19,42 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/dwarf2.h"
#define EH_FRAME_HDR_SIZE 8
+struct cie
+{
+ unsigned int length;
+ unsigned int hash;
+ unsigned char version;
+ unsigned char local_personality;
+ char augmentation[20];
+ bfd_vma code_align;
+ bfd_signed_vma data_align;
+ bfd_vma ra_column;
+ bfd_vma augmentation_size;
+ union {
+ struct elf_link_hash_entry *h;
+ bfd_vma val;
+ } personality;
+ asection *output_sec;
+ struct eh_cie_fde *cie_inf;
+ 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];
+};
+
+
+
/* If *ITER hasn't reached END yet, read the next byte into *RESULT and
move onto the next byte. Return true on success. */
@@ -180,20 +209,27 @@ write_value (bfd *abfd, bfd_byte *buf, bfd_vma value, int width)
}
}
-/* Return zero if C1 and C2 CIEs can be merged. */
+/* Return one if C1 and C2 CIEs can be merged. */
-static
-int cie_compare (struct cie *c1, struct cie *c2)
+static int
+cie_eq (const void *e1, const void *e2)
{
- if (c1->hdr.length == c2->hdr.length
+ const struct cie *c1 = e1;
+ const struct cie *c2 = e2;
+
+ if (c1->hash == c2->hash
+ && c1->length == c2->length
&& c1->version == c2->version
+ && c1->local_personality == c2->local_personality
&& 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
+ && memcmp (&c1->personality, &c2->personality,
+ sizeof (c1->personality)) == 0
+ && c1->output_sec == c2->output_sec
&& c1->per_encoding == c2->per_encoding
&& c1->lsda_encoding == c2->lsda_encoding
&& c1->fde_encoding == c2->fde_encoding
@@ -201,9 +237,38 @@ int cie_compare (struct cie *c1, struct cie *c2)
&& memcmp (c1->initial_instructions,
c2->initial_instructions,
c1->initial_insn_length) == 0)
- return 0;
+ return 1;
+
+ return 0;
+}
+
+static hashval_t
+cie_hash (const void *e)
+{
+ const struct cie *c = e;
+ return c->hash;
+}
- return 1;
+static hashval_t
+cie_compute_hash (struct cie *c)
+{
+ hashval_t h = 0;
+ h = iterative_hash_object (c->length, h);
+ h = iterative_hash_object (c->version, h);
+ h = iterative_hash (c->augmentation, strlen (c->augmentation) + 1, h);
+ h = iterative_hash_object (c->code_align, h);
+ h = iterative_hash_object (c->data_align, h);
+ h = iterative_hash_object (c->ra_column, h);
+ h = iterative_hash_object (c->augmentation_size, h);
+ h = iterative_hash_object (c->personality, h);
+ h = iterative_hash_object (c->output_sec, h);
+ h = iterative_hash_object (c->per_encoding, h);
+ h = iterative_hash_object (c->lsda_encoding, h);
+ h = iterative_hash_object (c->fde_encoding, h);
+ h = iterative_hash_object (c->initial_insn_length, h);
+ h = iterative_hash (c->initial_instructions, c->initial_insn_length, h);
+ c->hash = h;
+ return h;
}
/* Return the number of extra bytes that we'll be inserting into
@@ -273,11 +338,14 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
if (!read_byte (iter, end, &op))
return FALSE;
- switch (op & 0x80 ? op & 0xc0 : op)
+ switch (op & 0xc0 ? op & 0xc0 : op)
{
case DW_CFA_nop:
case DW_CFA_advance_loc:
case DW_CFA_restore:
+ case DW_CFA_remember_state:
+ case DW_CFA_restore_state:
+ case DW_CFA_GNU_window_save:
/* No arguments. */
return TRUE;
@@ -292,6 +360,8 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
/* One leb128 argument. */
return skip_leb128 (iter, end);
+ case DW_CFA_val_offset:
+ case DW_CFA_val_offset_sf:
case DW_CFA_offset_extended:
case DW_CFA_register:
case DW_CFA_def_cfa:
@@ -308,6 +378,7 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
&& skip_bytes (iter, end, length));
case DW_CFA_expression:
+ case DW_CFA_val_expression:
/* A leb128 followed by a variable-length argument. */
return (skip_leb128 (iter, end)
&& read_uleb128 (iter, end, &length)
@@ -339,7 +410,8 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width)
ENCODED_PTR_WIDTH is as for skip_cfa_op. */
static bfd_byte *
-skip_non_nops (bfd_byte *buf, bfd_byte *end, unsigned int encoded_ptr_width)
+skip_non_nops (bfd_byte *buf, bfd_byte *end, unsigned int encoded_ptr_width,
+ unsigned int *set_loc_count)
{
bfd_byte *last;
@@ -349,6 +421,8 @@ skip_non_nops (bfd_byte *buf, bfd_byte *end, unsigned int encoded_ptr_width)
buf++;
else
{
+ if (*buf == DW_CFA_set_loc)
+ ++*set_loc_count;
if (!skip_cfa_op (&buf, end, encoded_ptr_width))
return 0;
last = buf;
@@ -374,15 +448,24 @@ _bfd_elf_discard_section_eh_frame
while (0)
bfd_byte *ehbuf = NULL, *buf;
- bfd_byte *last_cie, *last_fde;
- struct eh_cie_fde *ent, *last_cie_inf, *this_inf;
- struct cie_header hdr;
- struct cie cie;
+ bfd_byte *last_fde;
+ struct eh_cie_fde *ent, *this_inf;
+ unsigned int hdr_length, hdr_id;
+ struct extended_cie
+ {
+ struct cie cie;
+ unsigned int offset;
+ unsigned int usage_count;
+ unsigned int entry;
+ } *ecies = NULL, *ecie;
+ unsigned int ecie_count = 0, ecie_alloced = 0;
+ struct cie *cie;
struct elf_link_hash_table *htab;
struct eh_frame_hdr_info *hdr_info;
struct eh_frame_sec_info *sec_info = NULL;
- unsigned int cie_usage_count, offset;
+ unsigned int offset;
unsigned int ptr_size;
+ unsigned int entry_alloced;
if (sec->size == 0)
{
@@ -390,8 +473,7 @@ _bfd_elf_discard_section_eh_frame
return FALSE;
}
- if ((sec->output_section != NULL
- && bfd_is_abs_section (sec->output_section)))
+ if (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. */
@@ -401,6 +483,9 @@ _bfd_elf_discard_section_eh_frame
htab = elf_hash_table (info);
hdr_info = &htab->eh_info;
+ if (hdr_info->cies == NULL && !info->relocatable)
+ hdr_info->cies = htab_try_create (1, cie_hash, cie_eq, free);
+
/* Read the frame unwind information from abfd. */
REQUIRE (bfd_malloc_and_get_section (abfd, sec, &ehbuf));
@@ -423,15 +508,11 @@ _bfd_elf_discard_section_eh_frame
REQUIRE (ptr_size != 0);
buf = ehbuf;
- last_cie = NULL;
- last_cie_inf = NULL;
- memset (&cie, 0, sizeof (cie));
- cie_usage_count = 0;
sec_info = bfd_zmalloc (sizeof (struct eh_frame_sec_info)
+ 99 * sizeof (struct eh_cie_fde));
REQUIRE (sec_info);
- sec_info->alloced = 100;
+ entry_alloced = 100;
#define ENSURE_NO_RELOCS(buf) \
REQUIRE (!(cookie->rel < cookie->relend \
@@ -454,118 +535,84 @@ _bfd_elf_discard_section_eh_frame
for (;;)
{
char *aug;
- bfd_byte *start, *end, *insns;
+ bfd_byte *start, *end, *insns, *insns_end;
bfd_size_type length;
+ unsigned int set_loc_count;
- if (sec_info->count == sec_info->alloced)
+ if (sec_info->count == entry_alloced)
{
- struct eh_cie_fde *old_entry = sec_info->entry;
sec_info = bfd_realloc (sec_info,
sizeof (struct eh_frame_sec_info)
- + ((sec_info->alloced + 99)
+ + ((entry_alloced + 99)
* sizeof (struct eh_cie_fde)));
REQUIRE (sec_info);
- memset (&sec_info->entry[sec_info->alloced], 0,
+ memset (&sec_info->entry[entry_alloced], 0,
100 * sizeof (struct eh_cie_fde));
- sec_info->alloced += 100;
-
- /* Now fix any pointers into the array. */
- if (last_cie_inf >= old_entry
- && last_cie_inf < old_entry + sec_info->count)
- last_cie_inf = sec_info->entry + (last_cie_inf - old_entry);
+ entry_alloced += 100;
}
this_inf = sec_info->entry + sec_info->count;
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->size)
- {
- hdr.length = 0;
- hdr.id = (unsigned int) -1;
- end = buf;
- }
- else
- {
- /* Read the length of the entry. */
- REQUIRE (skip_bytes (&buf, ehbuf + sec->size, 4));
- hdr.length = bfd_get_32 (abfd, buf - 4);
+ break;
- /* 64-bit .eh_frame is not supported. */
- REQUIRE (hdr.length != 0xffffffff);
+ /* Read the length of the entry. */
+ REQUIRE (skip_bytes (&buf, ehbuf + sec->size, 4));
+ hdr_length = bfd_get_32 (abfd, buf - 4);
- /* The CIE/FDE must be fully contained in this input section. */
- REQUIRE ((bfd_size_type) (buf - ehbuf) + hdr.length <= sec->size);
- end = buf + hdr.length;
+ /* 64-bit .eh_frame is not supported. */
+ REQUIRE (hdr_length != 0xffffffff);
- this_inf->offset = last_fde - ehbuf;
- this_inf->size = 4 + hdr.length;
+ /* The CIE/FDE must be fully contained in this input section. */
+ REQUIRE ((bfd_size_type) (buf - ehbuf) + hdr_length <= sec->size);
+ end = buf + hdr_length;
- if (hdr.length == 0)
- {
- /* A zero-length CIE should only be found at the end of
- the section. */
- REQUIRE ((bfd_size_type) (buf - ehbuf) == sec->size);
- ENSURE_NO_RELOCS (buf);
- sec_info->count++;
- /* Now just finish last encountered CIE processing and break
- the loop. */
- hdr.id = (unsigned int) -1;
- }
- else
- {
- REQUIRE (skip_bytes (&buf, end, 4));
- hdr.id = bfd_get_32 (abfd, buf - 4);
- REQUIRE (hdr.id != (unsigned int) -1);
- }
+ this_inf->offset = last_fde - ehbuf;
+ this_inf->size = 4 + hdr_length;
+
+ if (hdr_length == 0)
+ {
+ /* A zero-length CIE should only be found at the end of
+ the section. */
+ REQUIRE ((bfd_size_type) (buf - ehbuf) == sec->size);
+ ENSURE_NO_RELOCS (buf);
+ sec_info->count++;
+ break;
}
- if (hdr.id == 0 || hdr.id == (unsigned int) -1)
+ REQUIRE (skip_bytes (&buf, end, 4));
+ hdr_id = bfd_get_32 (abfd, buf - 4);
+
+ if (hdr_id == 0)
{
unsigned int initial_insn_length;
/* CIE */
- if (last_cie != NULL)
+ this_inf->cie = 1;
+
+ if (ecie_count == ecie_alloced)
{
- /* Now check if this CIE is identical to the 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 it. */
- if ((!info->relocatable
- && hdr_info->last_cie_sec
- && (sec->output_section
- == hdr_info->last_cie_sec->output_section)
- && cie_compare (&cie, &hdr_info->last_cie) == 0)
- || cie_usage_count == 0)
- last_cie_inf->removed = 1;
- else
- {
- hdr_info->last_cie = cie;
- hdr_info->last_cie_sec = sec;
- last_cie_inf->make_relative = cie.make_relative;
- last_cie_inf->make_lsda_relative = cie.make_lsda_relative;
- last_cie_inf->per_encoding_relative
- = (cie.per_encoding & 0x70) == DW_EH_PE_pcrel;
- }
+ ecies = bfd_realloc (ecies,
+ (ecie_alloced + 20) * sizeof (*ecies));
+ REQUIRE (ecies);
+ memset (&ecies[ecie_alloced], 0, 20 * sizeof (*ecies));
+ ecie_alloced += 20;
}
- if (hdr.id == (unsigned int) -1)
- break;
-
- last_cie_inf = this_inf;
- this_inf->cie = 1;
-
- cie_usage_count = 0;
- memset (&cie, 0, sizeof (cie));
- cie.hdr = hdr;
- REQUIRE (read_byte (&buf, end, &cie.version));
+ cie = &ecies[ecie_count].cie;
+ ecies[ecie_count].offset = this_inf->offset;
+ ecies[ecie_count++].entry = sec_info->count;
+ cie->length = hdr_length;
+ start = buf;
+ REQUIRE (read_byte (&buf, end, &cie->version));
/* Cannot handle unknown versions. */
- REQUIRE (cie.version == 1 || cie.version == 3);
- REQUIRE (strlen ((char *) buf) < sizeof (cie.augmentation));
+ REQUIRE (cie->version == 1 || cie->version == 3);
+ REQUIRE (strlen ((char *) buf) < sizeof (cie->augmentation));
- strcpy (cie.augmentation, (char *) buf);
+ strcpy (cie->augmentation, (char *) buf);
buf = (bfd_byte *) strchr ((char *) buf, '\0') + 1;
ENSURE_NO_RELOCS (buf);
if (buf[0] == 'e' && buf[1] == 'h')
@@ -577,26 +624,26 @@ _bfd_elf_discard_section_eh_frame
REQUIRE (skip_bytes (&buf, end, ptr_size));
SKIP_RELOCS (buf);
}
- REQUIRE (read_uleb128 (&buf, end, &cie.code_align));
- REQUIRE (read_sleb128 (&buf, end, &cie.data_align));
- if (cie.version == 1)
+ REQUIRE (read_uleb128 (&buf, end, &cie->code_align));
+ REQUIRE (read_sleb128 (&buf, end, &cie->data_align));
+ if (cie->version == 1)
{
REQUIRE (buf < end);
- cie.ra_column = *buf++;
+ cie->ra_column = *buf++;
}
else
- REQUIRE (read_uleb128 (&buf, end, &cie.ra_column));
+ REQUIRE (read_uleb128 (&buf, end, &cie->ra_column));
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;
+ 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++;
- REQUIRE (read_uleb128 (&buf, end, &cie.augmentation_size));
+ REQUIRE (read_uleb128 (&buf, end, &cie->augmentation_size));
ENSURE_NO_RELOCS (buf);
}
@@ -604,14 +651,14 @@ _bfd_elf_discard_section_eh_frame
switch (*aug++)
{
case 'L':
- REQUIRE (read_byte (&buf, end, &cie.lsda_encoding));
+ REQUIRE (read_byte (&buf, end, &cie->lsda_encoding));
ENSURE_NO_RELOCS (buf);
- REQUIRE (get_DW_EH_PE_width (cie.lsda_encoding, ptr_size));
+ REQUIRE (get_DW_EH_PE_width (cie->lsda_encoding, ptr_size));
break;
case 'R':
- REQUIRE (read_byte (&buf, end, &cie.fde_encoding));
+ REQUIRE (read_byte (&buf, end, &cie->fde_encoding));
ENSURE_NO_RELOCS (buf);
- REQUIRE (get_DW_EH_PE_width (cie.fde_encoding, ptr_size));
+ REQUIRE (get_DW_EH_PE_width (cie->fde_encoding, ptr_size));
break;
case 'S':
break;
@@ -619,18 +666,17 @@ _bfd_elf_discard_section_eh_frame
{
int per_width;
- REQUIRE (read_byte (&buf, end, &cie.per_encoding));
- per_width = get_DW_EH_PE_width (cie.per_encoding,
+ REQUIRE (read_byte (&buf, end, &cie->per_encoding));
+ per_width = get_DW_EH_PE_width (cie->per_encoding,
ptr_size);
REQUIRE (per_width);
- if ((cie.per_encoding & 0xf0) == DW_EH_PE_aligned)
+ if ((cie->per_encoding & 0xf0) == DW_EH_PE_aligned)
{
length = -(buf - ehbuf) & (per_width - 1);
REQUIRE (skip_bytes (&buf, end, length));
}
ENSURE_NO_RELOCS (buf);
- /* Ensure we have a reloc here, against
- a global symbol. */
+ /* Ensure we have a reloc here. */
if (GET_RELOC (buf) != NULL)
{
unsigned long r_symndx;
@@ -641,7 +687,9 @@ _bfd_elf_discard_section_eh_frame
else
#endif
r_symndx = ELF32_R_SYM (cookie->rel->r_info);
- if (r_symndx >= cookie->locsymcount)
+ if (r_symndx >= cookie->locsymcount
+ || ELF_ST_BIND (cookie->locsyms[r_symndx]
+ .st_info) != STB_LOCAL)
{
struct elf_link_hash_entry *h;
@@ -653,14 +701,39 @@ _bfd_elf_discard_section_eh_frame
h = (struct elf_link_hash_entry *)
h->root.u.i.link;
- cie.personality = h;
+ cie->personality.h = h;
}
+ else
+ {
+ Elf_Internal_Sym *sym;
+ asection *sym_sec;
+ bfd_vma val;
+
+ sym = &cookie->locsyms[r_symndx];
+ sym_sec = (bfd_section_from_elf_index
+ (abfd, sym->st_shndx));
+ if (sym_sec != NULL)
+ {
+ if (sym_sec->kept_section != NULL)
+ sym_sec = sym_sec->kept_section;
+ if (sym_sec->output_section != NULL)
+ {
+ val = (sym->st_value
+ + sym_sec->output_offset
+ + sym_sec->output_section->vma);
+ cie->personality.val = val;
+ cie->local_personality = 1;
+ }
+ }
+ }
+
/* Cope with MIPS-style composite relocations. */
do
cookie->rel++;
while (GET_RELOC (buf) != NULL);
}
REQUIRE (skip_bytes (&buf, end, per_width));
+ REQUIRE (cie->local_personality || cie->personality.h);
}
break;
default:
@@ -676,18 +749,18 @@ _bfd_elf_discard_section_eh_frame
->elf_backend_can_make_relative_eh_frame
(abfd, info, sec)))
{
- if ((cie.fde_encoding & 0xf0) == DW_EH_PE_absptr)
- cie.make_relative = 1;
+ if ((cie->fde_encoding & 0xf0) == DW_EH_PE_absptr)
+ cie->make_relative = 1;
/* If the CIE doesn't already have an 'R' entry, it's fairly
easy to add one, provided that there's no aligned data
after the augmentation string. */
- else if (cie.fde_encoding == DW_EH_PE_omit
- && (cie.per_encoding & 0xf0) != DW_EH_PE_aligned)
+ else if (cie->fde_encoding == DW_EH_PE_omit
+ && (cie->per_encoding & 0xf0) != DW_EH_PE_aligned)
{
- if (*cie.augmentation == 0)
+ if (*cie->augmentation == 0)
this_inf->add_augmentation_size = 1;
this_inf->add_fde_encoding = 1;
- cie.make_relative = 1;
+ cie->make_relative = 1;
}
}
@@ -695,30 +768,36 @@ _bfd_elf_discard_section_eh_frame
&& (get_elf_backend_data (abfd)
->elf_backend_can_make_lsda_relative_eh_frame
(abfd, info, sec))
- && (cie.lsda_encoding & 0xf0) == DW_EH_PE_absptr)
- cie.make_lsda_relative = 1;
+ && (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;
+ if (cie->fde_encoding == DW_EH_PE_omit)
+ cie->fde_encoding = DW_EH_PE_absptr;
initial_insn_length = end - buf;
- if (initial_insn_length <= 50)
+ if (initial_insn_length <= sizeof (cie->initial_instructions))
{
- cie.initial_insn_length = initial_insn_length;
- memcpy (cie.initial_instructions, buf, initial_insn_length);
+ cie->initial_insn_length = initial_insn_length;
+ memcpy (cie->initial_instructions, buf, initial_insn_length);
}
insns = buf;
buf += initial_insn_length;
ENSURE_NO_RELOCS (buf);
- last_cie = last_fde;
}
else
{
- /* Ensure this FDE uses the last CIE encountered. */
- REQUIRE (last_cie);
- REQUIRE (hdr.id == (unsigned int) (buf - 4 - last_cie));
+ /* Find the corresponding CIE. */
+ unsigned int cie_offset = this_inf->offset + 4 - hdr_id;
+ for (ecie = ecies; ecie < ecies + ecie_count; ++ecie)
+ if (cie_offset == ecie->offset)
+ break;
+
+ /* Ensure this FDE references one of the CIEs in this input
+ section. */
+ REQUIRE (ecie != ecies + ecie_count);
+ cie = &ecie->cie;
ENSURE_NO_RELOCS (buf);
REQUIRE (GET_RELOC (buf));
@@ -730,26 +809,31 @@ _bfd_elf_discard_section_eh_frame
else
{
if (info->shared
- && (((cie.fde_encoding & 0xf0) == DW_EH_PE_absptr
- && cie.make_relative == 0)
- || (cie.fde_encoding & 0xf0) == DW_EH_PE_aligned))
+ && (((cie->fde_encoding & 0xf0) == DW_EH_PE_absptr
+ && cie->make_relative == 0)
+ || (cie->fde_encoding & 0xf0) == DW_EH_PE_aligned))
{
/* If a shared library uses absolute pointers
which we cannot turn into PC relative,
don't create the binary search table,
since it is affected by runtime relocations. */
hdr_info->table = FALSE;
+ (*info->callbacks->einfo)
+ (_("%P: fde encoding in %B(%A) prevents .eh_frame_hdr"
+ " table being created.\n"), abfd, sec);
}
- cie_usage_count++;
+ ecie->usage_count++;
hdr_info->fde_count++;
+ this_inf->cie_inf = (void *) (ecie - ecies);
}
+
/* Skip the initial location and address range. */
start = buf;
- length = get_DW_EH_PE_width (cie.fde_encoding, ptr_size);
+ length = get_DW_EH_PE_width (cie->fde_encoding, ptr_size);
REQUIRE (skip_bytes (&buf, end, 2 * length));
/* Skip the augmentation size, if present. */
- if (cie.augmentation[0] == 'z')
+ if (cie->augmentation[0] == 'z')
REQUIRE (read_uleb128 (&buf, end, &length));
else
length = 0;
@@ -757,12 +841,12 @@ _bfd_elf_discard_section_eh_frame
/* Of the supported augmentation characters above, only 'L'
adds augmentation data to the FDE. This code would need to
be adjusted if any future augmentations do the same thing. */
- if (cie.lsda_encoding != DW_EH_PE_omit)
+ if (cie->lsda_encoding != DW_EH_PE_omit)
{
this_inf->lsda_offset = buf - start;
/* If there's no 'z' augmentation, we don't know where the
CFA insns begin. Assume no padding. */
- if (cie.augmentation[0] != 'z')
+ if (cie->augmentation[0] != 'z')
length = end - buf;
}
@@ -770,57 +854,131 @@ _bfd_elf_discard_section_eh_frame
REQUIRE (skip_bytes (&buf, end, length));
insns = buf;
- buf = last_fde + 4 + hdr.length;
+ buf = last_fde + 4 + hdr_length;
SKIP_RELOCS (buf);
}
/* Try to interpret the CFA instructions and find the first
padding nop. Shrink this_inf's size so that it doesn't
- including the padding. */
- length = get_DW_EH_PE_width (cie.fde_encoding, ptr_size);
- insns = skip_non_nops (insns, end, length);
- if (insns != 0)
- this_inf->size -= end - insns;
-
- this_inf->fde_encoding = cie.fde_encoding;
- this_inf->lsda_encoding = cie.lsda_encoding;
+ include the padding. */
+ length = get_DW_EH_PE_width (cie->fde_encoding, ptr_size);
+ set_loc_count = 0;
+ insns_end = skip_non_nops (insns, end, length, &set_loc_count);
+ /* If we don't understand the CFA instructions, we can't know
+ what needs to be adjusted there. */
+ if (insns_end == NULL
+ /* For the time being we don't support DW_CFA_set_loc in
+ CIE instructions. */
+ || (set_loc_count && this_inf->cie))
+ goto free_no_table;
+ this_inf->size -= end - insns_end;
+ if (insns_end != end && this_inf->cie)
+ {
+ cie->initial_insn_length -= end - insns_end;
+ cie->length -= end - insns_end;
+ }
+ if (set_loc_count
+ && ((cie->fde_encoding & 0xf0) == DW_EH_PE_pcrel
+ || cie->make_relative))
+ {
+ unsigned int cnt;
+ bfd_byte *p;
+
+ this_inf->set_loc = bfd_malloc ((set_loc_count + 1)
+ * sizeof (unsigned int));
+ REQUIRE (this_inf->set_loc);
+ this_inf->set_loc[0] = set_loc_count;
+ p = insns;
+ cnt = 0;
+ while (p < end)
+ {
+ if (*p == DW_CFA_set_loc)
+ this_inf->set_loc[++cnt] = p + 1 - start;
+ REQUIRE (skip_cfa_op (&p, end, length));
+ }
+ }
+
+ this_inf->fde_encoding = cie->fde_encoding;
+ this_inf->lsda_encoding = cie->lsda_encoding;
sec_info->count++;
}
elf_section_data (sec)->sec_info = sec_info;
sec->sec_info_type = ELF_INFO_TYPE_EH_FRAME;
+ /* Look at all CIEs in this section and determine which can be
+ removed as unused, which can be merged with previous duplicate
+ CIEs and which need to be kept. */
+ for (ecie = ecies; ecie < ecies + ecie_count; ++ecie)
+ {
+ if (ecie->usage_count == 0)
+ {
+ sec_info->entry[ecie->entry].removed = 1;
+ continue;
+ }
+ ecie->cie.output_sec = sec->output_section;
+ ecie->cie.cie_inf = sec_info->entry + ecie->entry;
+ cie_compute_hash (&ecie->cie);
+ if (hdr_info->cies != NULL)
+ {
+ void **loc = htab_find_slot_with_hash (hdr_info->cies, &ecie->cie,
+ ecie->cie.hash, INSERT);
+ if (loc != NULL)
+ {
+ if (*loc != HTAB_EMPTY_ENTRY)
+ {
+ sec_info->entry[ecie->entry].removed = 1;
+ ecie->cie.cie_inf = ((struct cie *) *loc)->cie_inf;
+ continue;
+ }
+
+ *loc = malloc (sizeof (struct cie));
+ if (*loc == NULL)
+ *loc = HTAB_DELETED_ENTRY;
+ else
+ memcpy (*loc, &ecie->cie, sizeof (struct cie));
+ }
+ }
+ ecie->cie.cie_inf->make_relative = ecie->cie.make_relative;
+ ecie->cie.cie_inf->make_lsda_relative = ecie->cie.make_lsda_relative;
+ ecie->cie.cie_inf->per_encoding_relative
+ = (ecie->cie.per_encoding & 0x70) == DW_EH_PE_pcrel;
+ }
+
/* Ok, now we can assign new offsets. */
offset = 0;
- last_cie_inf = hdr_info->last_cie_inf;
for (ent = sec_info->entry; ent < sec_info->entry + sec_info->count; ++ent)
if (!ent->removed)
{
- if (ent->cie)
- last_cie_inf = ent;
- else
- ent->cie_inf = last_cie_inf;
+ if (!ent->cie)
+ {
+ ecie = ecies + (unsigned long) ent->cie_inf;
+ ent->cie_inf = ecie->cie.cie_inf;
+ }
ent->new_offset = offset;
offset += size_of_output_cie_fde (ent, ptr_size);
}
- hdr_info->last_cie_inf = last_cie_inf;
/* Resize the sec as needed. */
sec->rawsize = sec->size;
sec->size = offset;
- if (sec->size == 0)
- sec->flags |= SEC_EXCLUDE;
free (ehbuf);
+ if (ecies)
+ free (ecies);
return offset != sec->rawsize;
free_no_table:
+ (*info->callbacks->einfo)
+ (_("%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"),
+ abfd, sec);
if (ehbuf)
free (ehbuf);
if (sec_info)
free (sec_info);
+ if (ecies)
+ free (ecies);
hdr_info->table = FALSE;
- hdr_info->last_cie.hdr.length = 0;
return FALSE;
#undef REQUIRE
@@ -839,6 +997,13 @@ _bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
htab = elf_hash_table (info);
hdr_info = &htab->eh_info;
+
+ if (hdr_info->cies != NULL)
+ {
+ htab_delete (hdr_info->cies);
+ hdr_info->cies = NULL;
+ }
+
sec = hdr_info->hdr_sec;
if (sec == NULL)
return FALSE;
@@ -847,8 +1012,6 @@ _bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info)
if (hdr_info->table)
sec->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 = sec;
return TRUE;
}
@@ -968,6 +1131,23 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
return (bfd_vma) -2;
}
+ /* If converting to DW_EH_PE_pcrel, there will be no need for run-time
+ relocation against DW_CFA_set_loc's arguments. */
+ if (sec_info->entry[mid].set_loc
+ && (sec_info->entry[mid].cie
+ ? sec_info->entry[mid].make_relative
+ : sec_info->entry[mid].cie_inf->make_relative)
+ && (offset >= sec_info->entry[mid].offset + 8
+ + sec_info->entry[mid].set_loc[1]))
+ {
+ unsigned int cnt;
+
+ for (cnt = 1; cnt <= sec_info->entry[mid].set_loc[0]; cnt++)
+ if (offset == sec_info->entry[mid].offset + 8
+ + sec_info->entry[mid].set_loc[cnt])
+ return (bfd_vma) -2;
+ }
+
if (hdr_info->offsets_adjusted)
offset -= sec->output_offset;
/* Any new augmentation bytes go before the first relocation. */
@@ -1192,6 +1372,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
/* FDE */
bfd_vma value, address;
unsigned int width;
+ bfd_byte *start;
/* Skip length. */
buf += 4;
@@ -1228,6 +1409,8 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
write_value (abfd, buf, value, width);
}
+ start = buf;
+
if (hdr_info)
{
hdr_info->array[hdr_info->array_count].initial_loc = address;
@@ -1260,12 +1443,42 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
memmove (buf + 1, buf, end - buf);
*buf = 0;
}
+
+ if (ent->set_loc)
+ {
+ /* Adjust DW_CFA_set_loc. */
+ unsigned int cnt, width;
+ bfd_vma new_offset;
+
+ width = get_DW_EH_PE_width (ent->fde_encoding, ptr_size);
+ new_offset = ent->new_offset + 8
+ + extra_augmentation_string_bytes (ent)
+ + extra_augmentation_data_bytes (ent);
+
+ for (cnt = 1; cnt <= ent->set_loc[0]; cnt++)
+ {
+ bfd_vma value;
+ buf = start + ent->set_loc[cnt];
+
+ value = read_value (abfd, buf, width,
+ get_DW_EH_PE_signed (ent->fde_encoding));
+ if (!value)
+ continue;
+
+ if ((ent->fde_encoding & 0xf0) == DW_EH_PE_pcrel)
+ value += ent->offset + 8 - new_offset;
+ if (ent->cie_inf->make_relative)
+ value -= sec->output_section->vma + new_offset
+ + ent->set_loc[cnt];
+ write_value (abfd, buf, value, width);
+ }
+ }
}
}
/* We don't align the section to its section alignment since the
runtime library only expects all CIE/FDE records aligned at
- the pointer size. _bfd_elf_discard_section_eh_frame should
+ the pointer size. _bfd_elf_discard_section_eh_frame should
have padded CIE/FDE records to multiple of pointer size with
size_of_output_cie_fde. */
if ((sec->size % ptr_size) != 0)
diff --git a/contrib/binutils/bfd/elf-strtab.c b/contrib/binutils/bfd/elf-strtab.c
index a0ce1d7..f5d6db1 100644
--- a/contrib/binutils/bfd/elf-strtab.c
+++ b/contrib/binutils/bfd/elf-strtab.c
@@ -1,5 +1,6 @@
/* ELF strtab with GC and suffix merging support.
- Copyright 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+ Copyright 2001, 2002, 2003, 2005, 2006, 2007
+ Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "hashtab.h"
diff --git a/contrib/binutils/bfd/elf-vxworks.c b/contrib/binutils/bfd/elf-vxworks.c
index 90e620a..7b0d590 100644
--- a/contrib/binutils/bfd/elf-vxworks.c
+++ b/contrib/binutils/bfd/elf-vxworks.c
@@ -1,5 +1,5 @@
/* VxWorks support for ELF
- Copyright 2005 Free Software Foundation, Inc.
+ Copyright 2005, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -20,15 +20,34 @@
/* This file provides routines used by all VxWorks targets. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf-vxworks.h"
+/* Return true if symbol NAME, as defined by ABFD, is one of the special
+ __GOTT_BASE__ or __GOTT_INDEX__ symbols. */
+
+static bfd_boolean
+elf_vxworks_gott_symbol_p (bfd *abfd, const char *name)
+{
+ char leading;
+
+ leading = bfd_get_symbol_leading_char (abfd);
+ if (leading)
+ {
+ if (*name != leading)
+ return FALSE;
+ name++;
+ }
+ return (strcmp (name, "__GOTT_BASE__") == 0
+ || strcmp (name, "__GOTT_INDEX__") == 0);
+}
+
/* Tweak magic VxWorks symbols as they are loaded. */
bfd_boolean
-elf_vxworks_add_symbol_hook (bfd *abfd ATTRIBUTE_UNUSED,
+elf_vxworks_add_symbol_hook (bfd *abfd,
struct bfd_link_info *info,
Elf_Internal_Sym *sym,
const char **namep,
@@ -45,8 +64,7 @@ elf_vxworks_add_symbol_hook (bfd *abfd ATTRIBUTE_UNUSED,
This transformation will be undone in
elf_i386_vxworks_link_output_symbol_hook. */
if ((info->shared || abfd->flags & DYNAMIC)
- && (strcmp (*namep, "__GOTT_INDEX__") == 0
- || strcmp (*namep, "__GOTT_BASE__") == 0))
+ && elf_vxworks_gott_symbol_p (abfd, *namep))
{
sym->st_info = ELF_ST_INFO (STB_WEAK, ELF_ST_TYPE (sym->st_info));
*flagsp |= BSF_WEAK;
@@ -114,16 +132,12 @@ elf_vxworks_link_output_symbol_hook (struct bfd_link_info *info
const char *name,
Elf_Internal_Sym *sym,
asection *input_sec ATTRIBUTE_UNUSED,
- struct elf_link_hash_entry *h
- ATTRIBUTE_UNUSED)
+ struct elf_link_hash_entry *h)
{
- /* Ignore the first dummy symbol. */
- if (!name)
- return TRUE;
-
/* Reverse the effects of the hack in elf_vxworks_add_symbol_hook. */
- if (strcmp (name, "__GOTT_INDEX__") == 0
- || strcmp (name, "__GOTT_BASE__") == 0)
+ if (h
+ && h->root.type == bfd_link_hash_undefweak
+ && elf_vxworks_gott_symbol_p (h->root.u.undef.abfd, name))
sym->st_info = ELF_ST_INFO (STB_GLOBAL, ELF_ST_TYPE (sym->st_info));
return TRUE;
@@ -156,7 +170,8 @@ elf_vxworks_emit_relocs (bfd *output_bfd,
&& *rel_hash
&& (*rel_hash)->def_dynamic
&& !(*rel_hash)->def_regular
- && (*rel_hash)->root.type == bfd_link_hash_defined
+ && ((*rel_hash)->root.type == bfd_link_hash_defined
+ || (*rel_hash)->root.type == bfd_link_hash_defweak)
&& (*rel_hash)->root.u.def.section->output_section != NULL)
{
/* This is a relocation from an executable or shared library
@@ -171,8 +186,7 @@ elf_vxworks_emit_relocs (bfd *output_bfd,
for (j = 0; j < bed->s->int_rels_per_ext_rel; j++)
{
asection *sec = (*rel_hash)->root.u.def.section;
- int this_idx =
- elf_section_data (sec->output_section)->this_idx;
+ int this_idx = sec->output_section->target_index;
irela[j].r_info = ELF32_R_INFO (this_idx,
ELF32_R_TYPE (irela[j].r_info));
diff --git a/contrib/binutils/bfd/elf.c b/contrib/binutils/bfd/elf.c
index c2ee684..e819609 100644
--- a/contrib/binutils/bfd/elf.c
+++ b/contrib/binutils/bfd/elf.c
@@ -1,7 +1,7 @@
/* ELF executable support for BFD.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -37,8 +37,8 @@ SECTION
/* For sparc64-cross-sparc32. */
#define _SYSCALL32
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#define ARCH_SIZE 0
@@ -210,16 +210,32 @@ bfd_elf_hash (const char *namearg)
return h & 0xffffffff;
}
+/* DT_GNU_HASH hash function. Do not change this function; you will
+ cause invalid hash tables to be generated. */
+
+unsigned long
+bfd_elf_gnu_hash (const char *namearg)
+{
+ const unsigned char *name = (const unsigned char *) namearg;
+ unsigned long h = 5381;
+ unsigned char ch;
+
+ while ((ch = *name++) != '\0')
+ h = (h << 5) + h + ch;
+ return h & 0xffffffff;
+}
+
bfd_boolean
bfd_elf_mkobject (bfd *abfd)
{
- /* This just does initialization. */
- /* coff_mkobject zalloc's space for tdata.coff_obj_data ... */
- elf_tdata (abfd) = bfd_zalloc (abfd, sizeof (struct elf_obj_tdata));
- if (elf_tdata (abfd) == 0)
- return FALSE;
- /* Since everything is done at close time, do we need any
- initialization? */
+ if (abfd->tdata.any == NULL)
+ {
+ abfd->tdata.any = bfd_zalloc (abfd, sizeof (struct elf_obj_tdata));
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+
+ elf_tdata (abfd)->program_header_size = (bfd_size_type) -1;
return TRUE;
}
@@ -240,7 +256,9 @@ bfd_elf_get_str_section (bfd *abfd, unsigned int shindex)
bfd_size_type shstrtabsize;
i_shdrp = elf_elfsections (abfd);
- if (i_shdrp == 0 || i_shdrp[shindex] == 0)
+ if (i_shdrp == 0
+ || shindex >= elf_numsections (abfd)
+ || i_shdrp[shindex] == 0)
return NULL;
shstrtab = i_shdrp[shindex]->contents;
@@ -279,6 +297,9 @@ bfd_elf_string_from_elf_section (bfd *abfd,
if (strindex == 0)
return "";
+ if (elf_elfsections (abfd) == NULL || shindex >= elf_numsections (abfd))
+ return NULL;
+
hdr = elf_elfsections (abfd)[shindex];
if (hdr->contents == NULL
@@ -388,7 +409,15 @@ bfd_elf_get_elf_syms (bfd *ibfd,
for (esym = extsym_buf, isym = intsym_buf, shndx = extshndx_buf;
isym < isymend;
esym += extsym_size, isym++, shndx = shndx != NULL ? shndx + 1 : NULL)
- (*bed->s->swap_symbol_in) (ibfd, esym, shndx, isym);
+ if (!(*bed->s->swap_symbol_in) (ibfd, esym, shndx, isym))
+ {
+ symoffset += (esym - (bfd_byte *) extsym_buf) / extsym_size;
+ (*_bfd_error_handler) (_("%B symbol number %lu references "
+ "nonexistent SHT_SYMTAB_SHNDX section"),
+ ibfd, (unsigned long) symoffset);
+ intsym_buf = NULL;
+ goto out;
+ }
out:
if (alloc_ext != NULL)
@@ -481,10 +510,18 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
section with just a flag word (ie. sh_size is 4), ignore it. */
shnum = elf_numsections (abfd);
num_group = 0;
+
+#define IS_VALID_GROUP_SECTION_HEADER(shdr) \
+ ( (shdr)->sh_type == SHT_GROUP \
+ && (shdr)->sh_size >= (2 * GRP_ENTRY_SIZE) \
+ && (shdr)->sh_entsize == GRP_ENTRY_SIZE \
+ && ((shdr)->sh_size % GRP_ENTRY_SIZE) == 0)
+
for (i = 0; i < shnum; i++)
{
Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[i];
- if (shdr->sh_type == SHT_GROUP && shdr->sh_size >= 8)
+
+ if (IS_VALID_GROUP_SECTION_HEADER (shdr))
num_group += 1;
}
@@ -509,7 +546,8 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
for (i = 0; i < shnum; i++)
{
Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[i];
- if (shdr->sh_type == SHT_GROUP && shdr->sh_size >= 8)
+
+ if (IS_VALID_GROUP_SECTION_HEADER (shdr))
{
unsigned char *src;
Elf_Internal_Group *dest;
@@ -523,8 +561,18 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect)
amt = shdr->sh_size * sizeof (*dest) / 4;
shdr->contents = bfd_alloc2 (abfd, shdr->sh_size,
sizeof (*dest) / 4);
- if (shdr->contents == NULL
- || bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0
+ /* PR binutils/4110: Handle corrupt group headers. */
+ if (shdr->contents == NULL)
+ {
+ _bfd_error_handler
+ (_("%B: Corrupt size field in group section header: 0x%lx"), abfd, shdr->sh_size);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ memset (shdr->contents, 0, amt);
+
+ if (bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0
|| (bfd_bread (shdr->contents, shdr->sh_size, abfd)
!= shdr->sh_size))
return FALSE;
@@ -804,24 +852,24 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
int len;
} debug_sections [] =
{
- { "debug", 5 }, /* 'd' */
+ { STRING_COMMA_LEN ("debug") }, /* 'd' */
{ NULL, 0 }, /* 'e' */
{ NULL, 0 }, /* 'f' */
- { "gnu.linkonce.wi.", 17 }, /* 'g' */
+ { STRING_COMMA_LEN ("gnu.linkonce.wi.") }, /* 'g' */
{ NULL, 0 }, /* 'h' */
{ NULL, 0 }, /* 'i' */
{ NULL, 0 }, /* 'j' */
{ NULL, 0 }, /* 'k' */
- { "line", 4 }, /* 'l' */
+ { STRING_COMMA_LEN ("line") }, /* 'l' */
{ NULL, 0 }, /* 'm' */
{ NULL, 0 }, /* 'n' */
{ NULL, 0 }, /* 'o' */
{ NULL, 0 }, /* 'p' */
{ NULL, 0 }, /* 'q' */
{ NULL, 0 }, /* 'r' */
- { "stab", 4 } /* 's' */
+ { STRING_COMMA_LEN ("stab") } /* 's' */
};
-
+
if (name [0] == '.')
{
int i = name [1] - 'd';
@@ -840,7 +888,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
The symbols will be defined as weak, so that multiple definitions
are permitted. The GNU linker extension is to actually discard
all but one of the sections. */
- if (strncmp (name, ".gnu.linkonce", sizeof ".gnu.linkonce" - 1) == 0
+ if (CONST_STRNEQ (name, ".gnu.linkonce")
&& elf_next_in_group (newsect) == NULL)
flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
@@ -858,8 +906,8 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
unsigned int i;
/* Look through the phdrs to see if we need to adjust the lma.
- If all the p_paddr fields are zero, we ignore them, since
- some ELF linkers produce such output. */
+ If all the p_paddr fields are zero, we ignore them, since
+ some ELF linkers produce such output. */
phdr = elf_tdata (abfd)->phdr;
for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++)
{
@@ -880,9 +928,9 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
refuse to set the LMA if it was 0. This is wrong
though, as a perfectly valid initialised segment can
have a p_paddr of zero. Some architectures, eg ARM,
- place special significance on the address 0 and
- executables need to be able to have a segment which
- covers this address. */
+ place special significance on the address 0 and
+ executables need to be able to have a segment which
+ covers this address. */
if (phdr->p_type == PT_LOAD
&& (bfd_vma) hdr->sh_offset >= phdr->p_offset
&& (hdr->sh_offset + hdr->sh_size
@@ -1069,6 +1117,10 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
elf_gp (obfd) = elf_gp (ibfd);
elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
elf_flags_init (obfd) = TRUE;
+
+ /* Copy object attributes. */
+ _bfd_elf_copy_obj_attributes (ibfd, obfd);
+
return TRUE;
}
@@ -1243,6 +1295,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg)
case DT_AUXILIARY: name = "AUXILIARY"; stringp = TRUE; break;
case DT_USED: name = "USED"; break;
case DT_FILTER: name = "FILTER"; stringp = TRUE; break;
+ case DT_GNU_HASH: name = "GNU_HASH"; break;
}
fprintf (f, " %-11s ", name);
@@ -1476,9 +1529,9 @@ _bfd_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
memset (&ret->size, 0, (sizeof (struct elf_link_hash_entry)
- offsetof (struct elf_link_hash_entry, size)));
/* Assume that we have been called by a non-ELF symbol reader.
- This flag is then reset by the code which reads an ELF input
- file. This ensures that a symbol created by a non-ELF symbol
- reader will have the flag set correctly. */
+ This flag is then reset by the code which reads an ELF input
+ file. This ensures that a symbol created by a non-ELF symbol
+ reader will have the flag set correctly. */
ret->non_elf = 1;
}
@@ -1571,27 +1624,13 @@ _bfd_elf_link_hash_table_init
bfd_boolean ret;
int can_refcount = get_elf_backend_data (abfd)->can_refcount;
- table->dynamic_sections_created = FALSE;
- table->dynobj = NULL;
+ memset (table, 0, sizeof * table);
table->init_got_refcount.refcount = can_refcount - 1;
table->init_plt_refcount.refcount = can_refcount - 1;
table->init_got_offset.offset = -(bfd_vma) 1;
table->init_plt_offset.offset = -(bfd_vma) 1;
/* The first dynamic symbol is a dummy. */
table->dynsymcount = 1;
- table->dynstr = NULL;
- table->bucketcount = 0;
- table->needed = NULL;
- table->hgot = NULL;
- table->merge_info = NULL;
- memset (&table->stab_info, 0, sizeof (table->stab_info));
- memset (&table->eh_info, 0, sizeof (table->eh_info));
- table->dynlocal = NULL;
- table->runpath = NULL;
- table->tls_sec = NULL;
- table->tls_size = 0;
- table->loaded = NULL;
- table->is_relocatable_executable = FALSE;
ret = _bfd_link_hash_table_init (&table->root, abfd, newfunc, entsize);
table->root.type = bfd_link_elf_hash_table;
@@ -1646,7 +1685,7 @@ bfd_elf_get_dyn_lib_class (bfd *abfd)
}
void
-bfd_elf_set_dyn_lib_class (bfd *abfd, int lib_class)
+bfd_elf_set_dyn_lib_class (bfd *abfd, enum dynamic_lib_link_class lib_class)
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
&& bfd_get_format (abfd) == bfd_object)
@@ -1826,6 +1865,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
case SHT_FINI_ARRAY: /* .fini_array section. */
case SHT_PREINIT_ARRAY: /* .preinit_array section. */
case SHT_GNU_LIBLIST: /* .gnu.liblist section. */
+ case SHT_GNU_HASH: /* .gnu.hash section. */
return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
case SHT_DYNAMIC: /* Dynamic linking information. */
@@ -1877,11 +1917,11 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
abfd->flags |= HAS_SYMS;
/* Sometimes a shared object will map in the symbol table. If
- SHF_ALLOC is set, and this is a shared object, then we also
- treat this section as a BFD section. We can not base the
- decision purely on SHF_ALLOC, because that flag is sometimes
- set in a relocatable object file, which would confuse the
- linker. */
+ SHF_ALLOC is set, and this is a shared object, then we also
+ treat this section as a BFD section. We can not base the
+ decision purely on SHF_ALLOC, because that flag is sometimes
+ set in a relocatable object file, which would confuse the
+ linker. */
if ((hdr->sh_flags & SHF_ALLOC) != 0
&& (abfd->flags & DYNAMIC) != 0
&& ! _bfd_elf_make_section_from_shdr (abfd, hdr, name,
@@ -2103,13 +2143,11 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
abfd->flags |= HAS_RELOC;
return TRUE;
}
- break;
case SHT_GNU_verdef:
elf_dynverdef (abfd) = shindex;
elf_tdata (abfd)->dynverdef_hdr = *hdr;
return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
- break;
case SHT_GNU_versym:
if (hdr->sh_entsize != sizeof (Elf_External_Versym))
@@ -2117,13 +2155,11 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
elf_dynversym (abfd) = shindex;
elf_tdata (abfd)->dynversym_hdr = *hdr;
return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
- break;
case SHT_GNU_verneed:
elf_dynverref (abfd) = shindex;
elf_tdata (abfd)->dynverref_hdr = *hdr;
return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
- break;
case SHT_SHLIB:
return TRUE;
@@ -2132,7 +2168,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
/* We need a BFD section for objcopy and relocatable linking,
and it's handy to have the signature available as the section
name. */
- if (hdr->sh_entsize != GRP_ENTRY_SIZE)
+ if (! IS_VALID_GROUP_SECTION_HEADER (hdr))
return FALSE;
name = group_signature (abfd, hdr);
if (name == NULL)
@@ -2142,7 +2178,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
if (hdr->contents != NULL)
{
Elf_Internal_Group *idx = (Elf_Internal_Group *) hdr->contents;
- unsigned int n_elt = hdr->sh_size / 4;
+ unsigned int n_elt = hdr->sh_size / GRP_ENTRY_SIZE;
asection *s;
if (idx->flags & GRP_COMDAT)
@@ -2152,19 +2188,78 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
/* We try to keep the same section order as it comes in. */
idx += n_elt;
while (--n_elt != 0)
- if ((s = (--idx)->shdr->bfd_section) != NULL
- && elf_next_in_group (s) != NULL)
- {
- elf_next_in_group (hdr->bfd_section) = s;
- break;
- }
+ {
+ --idx;
+
+ if (idx->shdr != NULL
+ && (s = idx->shdr->bfd_section) != NULL
+ && elf_next_in_group (s) != NULL)
+ {
+ elf_next_in_group (hdr->bfd_section) = s;
+ break;
+ }
+ }
}
break;
default:
+ /* Possibly an attributes section. */
+ if (hdr->sh_type == SHT_GNU_ATTRIBUTES
+ || hdr->sh_type == bed->obj_attrs_section_type)
+ {
+ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
+ return FALSE;
+ _bfd_elf_parse_attributes (abfd, hdr);
+ return TRUE;
+ }
+
/* Check for any processor-specific section types. */
- return bed->elf_backend_section_from_shdr (abfd, hdr, name,
- shindex);
+ if (bed->elf_backend_section_from_shdr (abfd, hdr, name, shindex))
+ return TRUE;
+
+ if (hdr->sh_type >= SHT_LOUSER && hdr->sh_type <= SHT_HIUSER)
+ {
+ if ((hdr->sh_flags & SHF_ALLOC) != 0)
+ /* FIXME: How to properly handle allocated section reserved
+ for applications? */
+ (*_bfd_error_handler)
+ (_("%B: don't know how to handle allocated, application "
+ "specific section `%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+ else
+ /* Allow sections reserved for applications. */
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
+ shindex);
+ }
+ else if (hdr->sh_type >= SHT_LOPROC
+ && hdr->sh_type <= SHT_HIPROC)
+ /* FIXME: We should handle this section. */
+ (*_bfd_error_handler)
+ (_("%B: don't know how to handle processor specific section "
+ "`%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+ else if (hdr->sh_type >= SHT_LOOS && hdr->sh_type <= SHT_HIOS)
+ {
+ /* Unrecognised OS-specific sections. */
+ if ((hdr->sh_flags & SHF_OS_NONCONFORMING) != 0)
+ /* SHF_OS_NONCONFORMING indicates that special knowledge is
+ required to correctly process the section and the file should
+ be rejected with an error message. */
+ (*_bfd_error_handler)
+ (_("%B: don't know how to handle OS specific section "
+ "`%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+ else
+ /* Otherwise it should be processed. */
+ return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
+ }
+ else
+ /* FIXME: We should handle this section. */
+ (*_bfd_error_handler)
+ (_("%B: don't know how to handle section `%s' [0x%8x]"),
+ abfd, name, hdr->sh_type);
+
+ return FALSE;
}
return TRUE;
@@ -2224,108 +2319,111 @@ bfd_section_from_elf_index (bfd *abfd, unsigned int index)
static const struct bfd_elf_special_section special_sections_b[] =
{
- { ".bss", 4, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".bss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_c[] =
{
- { ".comment", 8, 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".comment"), 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_d[] =
{
- { ".data", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".data1", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".debug", 6, 0, SHT_PROGBITS, 0 },
- { ".debug_line", 11, 0, SHT_PROGBITS, 0 },
- { ".debug_info", 11, 0, SHT_PROGBITS, 0 },
- { ".debug_abbrev", 13, 0, SHT_PROGBITS, 0 },
- { ".debug_aranges", 14, 0, SHT_PROGBITS, 0 },
- { ".dynamic", 8, 0, SHT_DYNAMIC, SHF_ALLOC },
- { ".dynstr", 7, 0, SHT_STRTAB, SHF_ALLOC },
- { ".dynsym", 7, 0, SHT_DYNSYM, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".data"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".data1"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".debug"), 0, SHT_PROGBITS, 0 },
+ { STRING_COMMA_LEN (".debug_line"), 0, SHT_PROGBITS, 0 },
+ { STRING_COMMA_LEN (".debug_info"), 0, SHT_PROGBITS, 0 },
+ { STRING_COMMA_LEN (".debug_abbrev"), 0, SHT_PROGBITS, 0 },
+ { STRING_COMMA_LEN (".debug_aranges"), 0, SHT_PROGBITS, 0 },
+ { STRING_COMMA_LEN (".dynamic"), 0, SHT_DYNAMIC, SHF_ALLOC },
+ { STRING_COMMA_LEN (".dynstr"), 0, SHT_STRTAB, SHF_ALLOC },
+ { STRING_COMMA_LEN (".dynsym"), 0, SHT_DYNSYM, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_f[] =
{
- { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".fini_array", 11, 0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".fini"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { STRING_COMMA_LEN (".fini_array"), 0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_g[] =
{
- { ".gnu.linkonce.b",15, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".got", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".gnu.version", 12, 0, SHT_GNU_versym, 0 },
- { ".gnu.version_d", 14, 0, SHT_GNU_verdef, 0 },
- { ".gnu.version_r", 14, 0, SHT_GNU_verneed, 0 },
- { ".gnu.liblist", 12, 0, SHT_GNU_LIBLIST, SHF_ALLOC },
- { ".gnu.conflict", 13, 0, SHT_RELA, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".gnu.linkonce.b"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".got"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".gnu.version"), 0, SHT_GNU_versym, 0 },
+ { STRING_COMMA_LEN (".gnu.version_d"), 0, SHT_GNU_verdef, 0 },
+ { STRING_COMMA_LEN (".gnu.version_r"), 0, SHT_GNU_verneed, 0 },
+ { STRING_COMMA_LEN (".gnu.liblist"), 0, SHT_GNU_LIBLIST, SHF_ALLOC },
+ { STRING_COMMA_LEN (".gnu.conflict"), 0, SHT_RELA, SHF_ALLOC },
+ { STRING_COMMA_LEN (".gnu.hash"), 0, SHT_GNU_HASH, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_h[] =
{
- { ".hash", 5, 0, SHT_HASH, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".hash"), 0, SHT_HASH, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_i[] =
{
- { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".init_array", 11, 0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".interp", 7, 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".init"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { STRING_COMMA_LEN (".init_array"), 0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".interp"), 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_l[] =
{
- { ".line", 5, 0, SHT_PROGBITS, 0 },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".line"), 0, SHT_PROGBITS, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_n[] =
{
- { ".note.GNU-stack",15, 0, SHT_PROGBITS, 0 },
- { ".note", 5, -1, SHT_NOTE, 0 },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".note.GNU-stack"), 0, SHT_PROGBITS, 0 },
+ { STRING_COMMA_LEN (".note"), -1, SHT_NOTE, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_p[] =
{
- { ".preinit_array", 14, 0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
- { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".preinit_array"), 0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".plt"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_r[] =
{
- { ".rodata", 7, -2, SHT_PROGBITS, SHF_ALLOC },
- { ".rodata1", 8, 0, SHT_PROGBITS, SHF_ALLOC },
- { ".rela", 5, -1, SHT_RELA, 0 },
- { ".rel", 4, -1, SHT_REL, 0 },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".rodata"), -2, SHT_PROGBITS, SHF_ALLOC },
+ { STRING_COMMA_LEN (".rodata1"), 0, SHT_PROGBITS, SHF_ALLOC },
+ { STRING_COMMA_LEN (".rela"), -1, SHT_RELA, 0 },
+ { STRING_COMMA_LEN (".rel"), -1, SHT_REL, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_s[] =
{
- { ".shstrtab", 9, 0, SHT_STRTAB, 0 },
- { ".strtab", 7, 0, SHT_STRTAB, 0 },
- { ".symtab", 7, 0, SHT_SYMTAB, 0 },
- { ".stabstr", 5, 3, SHT_STRTAB, 0 },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".shstrtab"), 0, SHT_STRTAB, 0 },
+ { STRING_COMMA_LEN (".strtab"), 0, SHT_STRTAB, 0 },
+ { STRING_COMMA_LEN (".symtab"), 0, SHT_SYMTAB, 0 },
+ /* See struct bfd_elf_special_section declaration for the semantics of
+ this special case where .prefix_length != strlen (.prefix). */
+ { ".stabstr", 5, 3, SHT_STRTAB, 0 },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section special_sections_t[] =
{
- { ".text", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".tbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { ".tdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".text"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { STRING_COMMA_LEN (".tbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
+ { STRING_COMMA_LEN (".tdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS },
+ { NULL, 0, 0, 0, 0 }
};
static const struct bfd_elf_special_section *special_sections[] =
@@ -2456,10 +2554,13 @@ _bfd_elf_new_section_hook (bfd *abfd, asection *sec)
bed = get_elf_backend_data (abfd);
sec->use_rela_p = bed->default_use_rela_p;
- /* When we read a file, we don't need section type and flags unless
- it is a linker created section. They will be overridden in
- _bfd_elf_make_section_from_shdr anyway. */
- if (abfd->direction != read_direction
+ /* When we read a file, we don't need to set ELF section type and
+ flags. They will be overridden in _bfd_elf_make_section_from_shdr
+ anyway. We will set ELF section type and flags for all linker
+ created sections. If user specifies BFD section flags, we will
+ set ELF section type and flags based on BFD section flags in
+ elf_fake_sections. */
+ if ((!sec->flags && abfd->direction != read_direction)
|| (sec->flags & SEC_LINKER_CREATED) != 0)
{
ssect = (*bed->get_sec_type_attr) (abfd, sec);
@@ -2470,7 +2571,7 @@ _bfd_elf_new_section_hook (bfd *abfd, asection *sec)
}
}
- return TRUE;
+ return _bfd_generic_new_section_hook (abfd, sec);
}
/* Create a new bfd section from an ELF program header.
@@ -2661,11 +2762,12 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
bfd_boolean *failedptr = failedptrarg;
Elf_Internal_Shdr *this_hdr;
+ unsigned int sh_type;
if (*failedptr)
{
/* We already failed; just get out of the bfd_map_over_sections
- loop. */
+ loop. */
return;
}
@@ -2704,8 +2806,8 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
if ((asect->flags & SEC_GROUP) != 0)
this_hdr->sh_type = SHT_GROUP;
else if ((asect->flags & SEC_ALLOC) != 0
- && (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
- || (asect->flags & SEC_NEVER_LOAD) != 0))
+ && (((asect->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ || (asect->flags & SEC_NEVER_LOAD) != 0))
this_hdr->sh_type = SHT_NOBITS;
else
this_hdr->sh_type = SHT_PROGBITS;
@@ -2754,8 +2856,8 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
case SHT_GNU_verdef:
this_hdr->sh_entsize = 0;
/* objcopy or strip will copy over sh_info, but may not set
- cverdefs. The linker will set cverdefs, but sh_info will be
- zero. */
+ cverdefs. The linker will set cverdefs, but sh_info will be
+ zero. */
if (this_hdr->sh_info == 0)
this_hdr->sh_info = elf_tdata (abfd)->cverdefs;
else
@@ -2766,8 +2868,8 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
case SHT_GNU_verneed:
this_hdr->sh_entsize = 0;
/* objcopy or strip will copy over sh_info, but may not set
- cverrefs. The linker will set cverrefs, but sh_info will be
- zero. */
+ cverrefs. The linker will set cverrefs, but sh_info will be
+ zero. */
if (this_hdr->sh_info == 0)
this_hdr->sh_info = elf_tdata (abfd)->cverrefs;
else
@@ -2776,7 +2878,11 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
break;
case SHT_GROUP:
- this_hdr->sh_entsize = 4;
+ this_hdr->sh_entsize = GRP_ENTRY_SIZE;
+ break;
+
+ case SHT_GNU_HASH:
+ this_hdr->sh_entsize = bed->s->arch_size == 64 ? 0 : 4;
break;
}
@@ -2814,10 +2920,18 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
}
/* Check for processor-specific section types. */
+ sh_type = this_hdr->sh_type;
if (bed->elf_backend_fake_sections
&& !(*bed->elf_backend_fake_sections) (abfd, this_hdr, asect))
*failedptr = TRUE;
+ if (sh_type == SHT_NOBITS && asect->size != 0)
+ {
+ /* Don't change the header type from NOBITS if we are being
+ called for objcopy --only-keep-debug. */
+ this_hdr->sh_type = sh_type;
+ }
+
/* If the section has relocs, set up a section header for the
SHT_REL[A] section. If two relocation sections are required for
this section, it is up to the processor-specific back-end to
@@ -2939,14 +3053,14 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
d = elf_section_data (sec);
if (d->this_hdr.sh_type == SHT_GROUP)
- {
+ {
if (sec->flags & SEC_LINKER_CREATED)
{
/* Remove the linker created SHT_GROUP sections. */
bfd_section_list_remove (abfd, sec);
abfd->section_count--;
}
- else
+ else
{
if (section_number == SHN_LORESERVE)
section_number += SHN_HIRESERVE + 1 - SHN_LORESERVE;
@@ -3100,7 +3214,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
s, s->owner);
/* Point to the kept section if it has the same
size as the discarded one. */
- kept = _bfd_elf_check_kept_section (s);
+ kept = _bfd_elf_check_kept_section (s, link_info);
if (kept == NULL)
{
bfd_set_error (bfd_error_bad_value);
@@ -3133,7 +3247,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
The Intel C compiler generates SHT_IA_64_UNWIND with
SHF_LINK_ORDER. But it doesn't set the sh_link or
sh_info fields. Hence we could get the situation
- where s is NULL. */
+ where s is NULL. */
const struct elf_backend_data *bed
= get_elf_backend_data (abfd);
if (bed->link_order_error_handler)
@@ -3173,7 +3287,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
string section. We look for a section with the same name
but without the trailing ``str'', and set its sh_link
field to point to this section. */
- if (strncmp (sec->name, ".stab", sizeof ".stab" - 1) == 0
+ if (CONST_STRNEQ (sec->name, ".stab")
&& strcmp (sec->name + strlen (sec->name) - 3, "str") == 0)
{
size_t len;
@@ -3213,9 +3327,8 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
case SHT_GNU_LIBLIST:
/* sh_link is the section header index of the prelink library
- list
- used for the dynamic entries, or the symbol table, or the
- version strings. */
+ list used for the dynamic entries, or the symbol table, or
+ the version strings. */
s = bfd_get_section_by_name (abfd, (sec->flags & SEC_ALLOC)
? ".dynstr" : ".gnu.libstr");
if (s != NULL)
@@ -3223,6 +3336,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
break;
case SHT_HASH:
+ case SHT_GNU_HASH:
case SHT_GNU_versym:
/* sh_link is the section header index of the symbol table
this hash table or version table is for. */
@@ -3248,7 +3362,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
/* Map symbol from it's internal number to the external number, moving
all local symbols to be at the head of the list. */
-static int
+static bfd_boolean
sym_is_global (bfd *abfd, asymbol *sym)
{
/* If the backend has a special mapping, use it. */
@@ -3261,6 +3375,20 @@ sym_is_global (bfd *abfd, asymbol *sym)
|| bfd_is_com_section (bfd_get_section (sym)));
}
+/* Don't output section symbols for sections that are not going to be
+ output. Also, don't output section symbols for reloc and other
+ special sections. */
+
+static bfd_boolean
+ignore_section_sym (bfd *abfd, asymbol *sym)
+{
+ return ((sym->flags & BSF_SECTION_SYM) != 0
+ && (sym->value != 0
+ || (sym->section->owner != abfd
+ && (sym->section->output_section->owner != abfd
+ || sym->section->output_offset != 0))));
+}
+
static bfd_boolean
elf_map_symbols (bfd *abfd)
{
@@ -3301,51 +3429,29 @@ elf_map_symbols (bfd *abfd)
asymbol *sym = syms[idx];
if ((sym->flags & BSF_SECTION_SYM) != 0
- && sym->value == 0)
+ && !ignore_section_sym (abfd, sym))
{
- asection *sec;
+ asection *sec = sym->section;
- sec = sym->section;
+ if (sec->owner != abfd)
+ sec = sec->output_section;
- if (sec->owner != NULL)
- {
- if (sec->owner != abfd)
- {
- if (sec->output_offset != 0)
- continue;
-
- sec = sec->output_section;
-
- /* Empty sections in the input files may have had a
- section symbol created for them. (See the comment
- near the end of _bfd_generic_link_output_symbols in
- linker.c). If the linker script discards such
- sections then we will reach this point. Since we know
- that we cannot avoid this case, we detect it and skip
- the abort and the assignment to the sect_syms array.
- To reproduce this particular case try running the
- linker testsuite test ld-scripts/weak.exp for an ELF
- port that uses the generic linker. */
- if (sec->owner == NULL)
- continue;
-
- BFD_ASSERT (sec->owner == abfd);
- }
- sect_syms[sec->index] = syms[idx];
- }
+ sect_syms[sec->index] = syms[idx];
}
}
/* Classify all of the symbols. */
for (idx = 0; idx < symcount; idx++)
{
+ if (ignore_section_sym (abfd, syms[idx]))
+ continue;
if (!sym_is_global (abfd, syms[idx]))
num_locals++;
else
num_globals++;
}
- /* We will be adding a section symbol for each BFD section. Most normal
+ /* We will be adding a section symbol for each normal BFD section. Most
sections will already have a section symbol in outsymbols, but
eg. SHT_GROUP sections will not, and we need the section symbol mapped
at least in that case. */
@@ -3371,6 +3477,8 @@ elf_map_symbols (bfd *abfd)
asymbol *sym = syms[idx];
unsigned int i;
+ if (ignore_section_sym (abfd, sym))
+ continue;
if (!sym_is_global (abfd, sym))
i = num_locals2++;
else
@@ -3522,7 +3630,7 @@ _bfd_elf_compute_section_file_positions (bfd *abfd,
elf_tdata (abfd)->next_file_pos = off;
/* Now that we know where the .strtab section goes, write it
- out. */
+ out. */
if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0
|| ! _bfd_stringtab_emit (abfd, strtab))
return FALSE;
@@ -3534,6 +3642,90 @@ _bfd_elf_compute_section_file_positions (bfd *abfd,
return TRUE;
}
+/* Make an initial estimate of the size of the program header. If we
+ get the number wrong here, we'll redo section placement. */
+
+static bfd_size_type
+get_program_header_size (bfd *abfd, struct bfd_link_info *info)
+{
+ size_t segs;
+ asection *s;
+ const struct elf_backend_data *bed;
+
+ /* Assume we will need exactly two PT_LOAD segments: one for text
+ and one for data. */
+ segs = 2;
+
+ s = bfd_get_section_by_name (abfd, ".interp");
+ if (s != NULL && (s->flags & SEC_LOAD) != 0)
+ {
+ /* If we have a loadable interpreter section, we need a
+ PT_INTERP segment. In this case, assume we also need a
+ PT_PHDR segment, although that may not be true for all
+ targets. */
+ segs += 2;
+ }
+
+ if (bfd_get_section_by_name (abfd, ".dynamic") != NULL)
+ {
+ /* We need a PT_DYNAMIC segment. */
+ ++segs;
+
+ if (elf_tdata (abfd)->relro)
+ {
+ /* We need a PT_GNU_RELRO segment only when there is a
+ PT_DYNAMIC segment. */
+ ++segs;
+ }
+ }
+
+ if (elf_tdata (abfd)->eh_frame_hdr)
+ {
+ /* We need a PT_GNU_EH_FRAME segment. */
+ ++segs;
+ }
+
+ if (elf_tdata (abfd)->stack_flags)
+ {
+ /* We need a PT_GNU_STACK segment. */
+ ++segs;
+ }
+
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ if ((s->flags & SEC_LOAD) != 0
+ && CONST_STRNEQ (s->name, ".note"))
+ {
+ /* We need a PT_NOTE segment. */
+ ++segs;
+ }
+ }
+
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ if (s->flags & SEC_THREAD_LOCAL)
+ {
+ /* We need a PT_TLS segment. */
+ ++segs;
+ break;
+ }
+ }
+
+ /* Let the backend count up any program headers it might need. */
+ bed = get_elf_backend_data (abfd);
+ if (bed->elf_backend_additional_program_headers)
+ {
+ int a;
+
+ a = (*bed->elf_backend_additional_program_headers) (abfd, info);
+ if (a == -1)
+ abort ();
+ segs += a;
+ }
+
+ return segs * bed->s->sizeof_phdr;
+}
+
/* Create a mapping from a set of sections to a program segment. */
static struct elf_segment_map *
@@ -3584,363 +3776,421 @@ _bfd_elf_make_dynamic_segment (bfd *abfd, asection *dynsec)
m->p_type = PT_DYNAMIC;
m->count = 1;
m->sections[0] = dynsec;
-
+
return m;
}
-/* Set up a mapping from BFD sections to program segments. */
+/* Possibly add or remove segments from the segment map. */
static bfd_boolean
-map_sections_to_segments (bfd *abfd)
+elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
{
- asection **sections = NULL;
- asection *s;
- unsigned int i;
- unsigned int count;
- struct elf_segment_map *mfirst;
- struct elf_segment_map **pm;
- struct elf_segment_map *m;
- asection *last_hdr;
- bfd_vma last_size;
- unsigned int phdr_index;
- bfd_vma maxpagesize;
- asection **hdrpp;
- bfd_boolean phdr_in_segment = TRUE;
- bfd_boolean writable;
- int tls_count = 0;
- asection *first_tls = NULL;
- asection *dynsec, *eh_frame_hdr;
- bfd_size_type amt;
-
- if (elf_tdata (abfd)->segment_map != NULL)
- return TRUE;
+ struct elf_segment_map **m;
+ const struct elf_backend_data *bed;
- if (bfd_count_sections (abfd) == 0)
- return TRUE;
+ /* The placement algorithm assumes that non allocated sections are
+ not in PT_LOAD segments. We ensure this here by removing such
+ sections from the segment map. We also remove excluded
+ sections. Finally, any PT_LOAD segment without sections is
+ removed. */
+ m = &elf_tdata (abfd)->segment_map;
+ while (*m)
+ {
+ unsigned int i, new_count;
- /* Select the allocated sections, and sort them. */
+ for (new_count = 0, i = 0; i < (*m)->count; i++)
+ {
+ if (((*m)->sections[i]->flags & SEC_EXCLUDE) == 0
+ && (((*m)->sections[i]->flags & SEC_ALLOC) != 0
+ || (*m)->p_type != PT_LOAD))
+ {
+ (*m)->sections[new_count] = (*m)->sections[i];
+ new_count++;
+ }
+ }
+ (*m)->count = new_count;
- sections = bfd_malloc2 (bfd_count_sections (abfd), sizeof (asection *));
- if (sections == NULL)
- goto error_return;
+ if ((*m)->p_type == PT_LOAD && (*m)->count == 0)
+ *m = (*m)->next;
+ else
+ m = &(*m)->next;
+ }
- i = 0;
- for (s = abfd->sections; s != NULL; s = s->next)
+ bed = get_elf_backend_data (abfd);
+ if (bed->elf_backend_modify_segment_map != NULL)
{
- if ((s->flags & SEC_ALLOC) != 0)
- {
- sections[i] = s;
- ++i;
- }
+ if (!(*bed->elf_backend_modify_segment_map) (abfd, info))
+ return FALSE;
}
- BFD_ASSERT (i <= bfd_count_sections (abfd));
- count = i;
- qsort (sections, (size_t) count, sizeof (asection *), elf_sort_sections);
+ return TRUE;
+}
- /* Build the mapping. */
+/* Set up a mapping from BFD sections to program segments. */
- mfirst = NULL;
- pm = &mfirst;
+bfd_boolean
+_bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info)
+{
+ unsigned int count;
+ struct elf_segment_map *m;
+ asection **sections = NULL;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- /* If we have a .interp section, then create a PT_PHDR segment for
- the program headers and a PT_INTERP segment for the .interp
- section. */
- s = bfd_get_section_by_name (abfd, ".interp");
- if (s != NULL && (s->flags & SEC_LOAD) != 0)
+ if (elf_tdata (abfd)->segment_map == NULL
+ && bfd_count_sections (abfd) != 0)
{
- amt = sizeof (struct elf_segment_map);
- m = bfd_zalloc (abfd, amt);
- if (m == NULL)
- goto error_return;
- m->next = NULL;
- m->p_type = PT_PHDR;
- /* FIXME: UnixWare and Solaris set PF_X, Irix 5 does not. */
- m->p_flags = PF_R | PF_X;
- m->p_flags_valid = 1;
- m->includes_phdrs = 1;
+ asection *s;
+ unsigned int i;
+ struct elf_segment_map *mfirst;
+ struct elf_segment_map **pm;
+ asection *last_hdr;
+ bfd_vma last_size;
+ unsigned int phdr_index;
+ bfd_vma maxpagesize;
+ asection **hdrpp;
+ bfd_boolean phdr_in_segment = TRUE;
+ bfd_boolean writable;
+ int tls_count = 0;
+ asection *first_tls = NULL;
+ asection *dynsec, *eh_frame_hdr;
+ bfd_size_type amt;
- *pm = m;
- pm = &m->next;
+ /* Select the allocated sections, and sort them. */
- amt = sizeof (struct elf_segment_map);
- m = bfd_zalloc (abfd, amt);
- if (m == NULL)
+ sections = bfd_malloc2 (bfd_count_sections (abfd), sizeof (asection *));
+ if (sections == NULL)
goto error_return;
- m->next = NULL;
- m->p_type = PT_INTERP;
- m->count = 1;
- m->sections[0] = s;
-
- *pm = m;
- pm = &m->next;
- }
-
- /* Look through the sections. We put sections in the same program
- segment when the start of the second section can be placed within
- a few bytes of the end of the first section. */
- last_hdr = NULL;
- last_size = 0;
- phdr_index = 0;
- maxpagesize = get_elf_backend_data (abfd)->maxpagesize;
- writable = FALSE;
- dynsec = bfd_get_section_by_name (abfd, ".dynamic");
- if (dynsec != NULL
- && (dynsec->flags & SEC_LOAD) == 0)
- dynsec = NULL;
-
- /* Deal with -Ttext or something similar such that the first section
- is not adjacent to the program headers. This is an
- approximation, since at this point we don't know exactly how many
- program headers we will need. */
- if (count > 0)
- {
- bfd_size_type phdr_size;
-
- phdr_size = elf_tdata (abfd)->program_header_size;
- if (phdr_size == 0)
- phdr_size = get_elf_backend_data (abfd)->s->sizeof_phdr;
- if ((abfd->flags & D_PAGED) == 0
- || sections[0]->lma < phdr_size
- || sections[0]->lma % maxpagesize < phdr_size % maxpagesize)
- phdr_in_segment = FALSE;
- }
-
- for (i = 0, hdrpp = sections; i < count; i++, hdrpp++)
- {
- asection *hdr;
- bfd_boolean new_segment;
-
- hdr = *hdrpp;
-
- /* See if this section and the last one will fit in the same
- segment. */
- if (last_hdr == NULL)
- {
- /* If we don't have a segment yet, then we don't need a new
- one (we build the last one after this loop). */
- new_segment = FALSE;
- }
- else if (last_hdr->lma - last_hdr->vma != hdr->lma - hdr->vma)
- {
- /* If this section has a different relation between the
- virtual address and the load address, then we need a new
- segment. */
- new_segment = TRUE;
- }
- else if (BFD_ALIGN (last_hdr->lma + last_size, maxpagesize)
- < BFD_ALIGN (hdr->lma, maxpagesize))
- {
- /* If putting this section in this segment would force us to
- skip a page in the segment, then we need a new segment. */
- new_segment = TRUE;
- }
- else if ((last_hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) == 0
- && (hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) != 0)
+ i = 0;
+ for (s = abfd->sections; s != NULL; s = s->next)
{
- /* We don't want to put a loadable section after a
- nonloadable section in the same segment.
- Consider .tbss sections as loadable for this purpose. */
- new_segment = TRUE;
- }
- else if ((abfd->flags & D_PAGED) == 0)
- {
- /* If the file is not demand paged, which means that we
- don't require the sections to be correctly aligned in the
- file, then there is no other reason for a new segment. */
- new_segment = FALSE;
+ if ((s->flags & SEC_ALLOC) != 0)
+ {
+ sections[i] = s;
+ ++i;
+ }
}
- else if (! writable
- && (hdr->flags & SEC_READONLY) == 0
- && (((last_hdr->lma + last_size - 1)
- & ~(maxpagesize - 1))
- != (hdr->lma & ~(maxpagesize - 1))))
+ BFD_ASSERT (i <= bfd_count_sections (abfd));
+ count = i;
+
+ qsort (sections, (size_t) count, sizeof (asection *), elf_sort_sections);
+
+ /* Build the mapping. */
+
+ mfirst = NULL;
+ pm = &mfirst;
+
+ /* If we have a .interp section, then create a PT_PHDR segment for
+ the program headers and a PT_INTERP segment for the .interp
+ section. */
+ s = bfd_get_section_by_name (abfd, ".interp");
+ if (s != NULL && (s->flags & SEC_LOAD) != 0)
{
- /* We don't want to put a writable section in a read only
- segment, unless they are on the same page in memory
- anyhow. We already know that the last section does not
- bring us past the current section on the page, so the
- only case in which the new section is not on the same
- page as the previous section is when the previous section
- ends precisely on a page boundary. */
- new_segment = TRUE;
+ amt = sizeof (struct elf_segment_map);
+ m = bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_PHDR;
+ /* FIXME: UnixWare and Solaris set PF_X, Irix 5 does not. */
+ m->p_flags = PF_R | PF_X;
+ m->p_flags_valid = 1;
+ m->includes_phdrs = 1;
+
+ *pm = m;
+ pm = &m->next;
+
+ amt = sizeof (struct elf_segment_map);
+ m = bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_INTERP;
+ m->count = 1;
+ m->sections[0] = s;
+
+ *pm = m;
+ pm = &m->next;
}
- else
+
+ /* Look through the sections. We put sections in the same program
+ segment when the start of the second section can be placed within
+ a few bytes of the end of the first section. */
+ last_hdr = NULL;
+ last_size = 0;
+ phdr_index = 0;
+ maxpagesize = bed->maxpagesize;
+ writable = FALSE;
+ dynsec = bfd_get_section_by_name (abfd, ".dynamic");
+ if (dynsec != NULL
+ && (dynsec->flags & SEC_LOAD) == 0)
+ dynsec = NULL;
+
+ /* Deal with -Ttext or something similar such that the first section
+ is not adjacent to the program headers. This is an
+ approximation, since at this point we don't know exactly how many
+ program headers we will need. */
+ if (count > 0)
{
- /* Otherwise, we can use the same segment. */
- new_segment = FALSE;
+ bfd_size_type phdr_size = elf_tdata (abfd)->program_header_size;
+
+ if (phdr_size == (bfd_size_type) -1)
+ phdr_size = get_program_header_size (abfd, info);
+ if ((abfd->flags & D_PAGED) == 0
+ || sections[0]->lma < phdr_size
+ || sections[0]->lma % maxpagesize < phdr_size % maxpagesize)
+ phdr_in_segment = FALSE;
}
- if (! new_segment)
+ for (i = 0, hdrpp = sections; i < count; i++, hdrpp++)
{
+ asection *hdr;
+ bfd_boolean new_segment;
+
+ hdr = *hdrpp;
+
+ /* See if this section and the last one will fit in the same
+ segment. */
+
+ if (last_hdr == NULL)
+ {
+ /* If we don't have a segment yet, then we don't need a new
+ one (we build the last one after this loop). */
+ new_segment = FALSE;
+ }
+ else if (last_hdr->lma - last_hdr->vma != hdr->lma - hdr->vma)
+ {
+ /* If this section has a different relation between the
+ virtual address and the load address, then we need a new
+ segment. */
+ new_segment = TRUE;
+ }
+ else if (BFD_ALIGN (last_hdr->lma + last_size, maxpagesize)
+ < BFD_ALIGN (hdr->lma, maxpagesize))
+ {
+ /* If putting this section in this segment would force us to
+ skip a page in the segment, then we need a new segment. */
+ new_segment = TRUE;
+ }
+ else if ((last_hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) == 0
+ && (hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) != 0)
+ {
+ /* We don't want to put a loadable section after a
+ nonloadable section in the same segment.
+ Consider .tbss sections as loadable for this purpose. */
+ new_segment = TRUE;
+ }
+ else if ((abfd->flags & D_PAGED) == 0)
+ {
+ /* If the file is not demand paged, which means that we
+ don't require the sections to be correctly aligned in the
+ file, then there is no other reason for a new segment. */
+ new_segment = FALSE;
+ }
+ else if (! writable
+ && (hdr->flags & SEC_READONLY) == 0
+ && (((last_hdr->lma + last_size - 1)
+ & ~(maxpagesize - 1))
+ != (hdr->lma & ~(maxpagesize - 1))))
+ {
+ /* We don't want to put a writable section in a read only
+ segment, unless they are on the same page in memory
+ anyhow. We already know that the last section does not
+ bring us past the current section on the page, so the
+ only case in which the new section is not on the same
+ page as the previous section is when the previous section
+ ends precisely on a page boundary. */
+ new_segment = TRUE;
+ }
+ else
+ {
+ /* Otherwise, we can use the same segment. */
+ new_segment = FALSE;
+ }
+
+ /* Allow interested parties a chance to override our decision. */
+ if (last_hdr && info->callbacks->override_segment_assignment)
+ new_segment = info->callbacks->override_segment_assignment (info, abfd, hdr, last_hdr, new_segment);
+
+ if (! new_segment)
+ {
+ if ((hdr->flags & SEC_READONLY) == 0)
+ writable = TRUE;
+ last_hdr = hdr;
+ /* .tbss sections effectively have zero size. */
+ if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD))
+ != SEC_THREAD_LOCAL)
+ last_size = hdr->size;
+ else
+ last_size = 0;
+ continue;
+ }
+
+ /* We need a new program segment. We must create a new program
+ header holding all the sections from phdr_index until hdr. */
+
+ m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
+ if (m == NULL)
+ goto error_return;
+
+ *pm = m;
+ pm = &m->next;
+
if ((hdr->flags & SEC_READONLY) == 0)
writable = TRUE;
+ else
+ writable = FALSE;
+
last_hdr = hdr;
/* .tbss sections effectively have zero size. */
if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) != SEC_THREAD_LOCAL)
last_size = hdr->size;
else
last_size = 0;
- continue;
+ phdr_index = i;
+ phdr_in_segment = FALSE;
}
- /* We need a new program segment. We must create a new program
- header holding all the sections from phdr_index until hdr. */
+ /* Create a final PT_LOAD program segment. */
+ if (last_hdr != NULL)
+ {
+ m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
+ if (m == NULL)
+ goto error_return;
- m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
- if (m == NULL)
- goto error_return;
+ *pm = m;
+ pm = &m->next;
+ }
- *pm = m;
- pm = &m->next;
+ /* If there is a .dynamic section, throw in a PT_DYNAMIC segment. */
+ if (dynsec != NULL)
+ {
+ m = _bfd_elf_make_dynamic_segment (abfd, dynsec);
+ if (m == NULL)
+ goto error_return;
+ *pm = m;
+ pm = &m->next;
+ }
- if ((hdr->flags & SEC_READONLY) == 0)
- writable = TRUE;
- else
- writable = FALSE;
+ /* For each loadable .note section, add a PT_NOTE segment. We don't
+ use bfd_get_section_by_name, because if we link together
+ nonloadable .note sections and loadable .note sections, we will
+ generate two .note sections in the output file. FIXME: Using
+ names for section types is bogus anyhow. */
+ for (s = abfd->sections; s != NULL; s = s->next)
+ {
+ if ((s->flags & SEC_LOAD) != 0
+ && CONST_STRNEQ (s->name, ".note"))
+ {
+ amt = sizeof (struct elf_segment_map);
+ m = bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_NOTE;
+ m->count = 1;
+ m->sections[0] = s;
- last_hdr = hdr;
- /* .tbss sections effectively have zero size. */
- if ((hdr->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) != SEC_THREAD_LOCAL)
- last_size = hdr->size;
- else
- last_size = 0;
- phdr_index = i;
- phdr_in_segment = FALSE;
- }
+ *pm = m;
+ pm = &m->next;
+ }
+ if (s->flags & SEC_THREAD_LOCAL)
+ {
+ if (! tls_count)
+ first_tls = s;
+ tls_count++;
+ }
+ }
- /* Create a final PT_LOAD program segment. */
- if (last_hdr != NULL)
- {
- m = make_mapping (abfd, sections, phdr_index, i, phdr_in_segment);
- if (m == NULL)
- goto error_return;
+ /* If there are any SHF_TLS output sections, add PT_TLS segment. */
+ if (tls_count > 0)
+ {
+ int i;
- *pm = m;
- pm = &m->next;
- }
+ amt = sizeof (struct elf_segment_map);
+ amt += (tls_count - 1) * sizeof (asection *);
+ m = bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_TLS;
+ m->count = tls_count;
+ /* Mandated PF_R. */
+ m->p_flags = PF_R;
+ m->p_flags_valid = 1;
+ for (i = 0; i < tls_count; ++i)
+ {
+ BFD_ASSERT (first_tls->flags & SEC_THREAD_LOCAL);
+ m->sections[i] = first_tls;
+ first_tls = first_tls->next;
+ }
- /* If there is a .dynamic section, throw in a PT_DYNAMIC segment. */
- if (dynsec != NULL)
- {
- m = _bfd_elf_make_dynamic_segment (abfd, dynsec);
- if (m == NULL)
- goto error_return;
- *pm = m;
- pm = &m->next;
- }
+ *pm = m;
+ pm = &m->next;
+ }
- /* For each loadable .note section, add a PT_NOTE segment. We don't
- use bfd_get_section_by_name, because if we link together
- nonloadable .note sections and loadable .note sections, we will
- generate two .note sections in the output file. FIXME: Using
- names for section types is bogus anyhow. */
- for (s = abfd->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_LOAD) != 0
- && strncmp (s->name, ".note", 5) == 0)
+ /* If there is a .eh_frame_hdr section, throw in a PT_GNU_EH_FRAME
+ segment. */
+ eh_frame_hdr = elf_tdata (abfd)->eh_frame_hdr;
+ if (eh_frame_hdr != NULL
+ && (eh_frame_hdr->output_section->flags & SEC_LOAD) != 0)
{
amt = sizeof (struct elf_segment_map);
m = bfd_zalloc (abfd, amt);
if (m == NULL)
goto error_return;
m->next = NULL;
- m->p_type = PT_NOTE;
+ m->p_type = PT_GNU_EH_FRAME;
m->count = 1;
- m->sections[0] = s;
+ m->sections[0] = eh_frame_hdr->output_section;
*pm = m;
pm = &m->next;
}
- if (s->flags & SEC_THREAD_LOCAL)
- {
- if (! tls_count)
- first_tls = s;
- tls_count++;
- }
- }
- /* If there are any SHF_TLS output sections, add PT_TLS segment. */
- if (tls_count > 0)
- {
- int i;
-
- amt = sizeof (struct elf_segment_map);
- amt += (tls_count - 1) * sizeof (asection *);
- m = bfd_zalloc (abfd, amt);
- if (m == NULL)
- goto error_return;
- m->next = NULL;
- m->p_type = PT_TLS;
- m->count = tls_count;
- /* Mandated PF_R. */
- m->p_flags = PF_R;
- m->p_flags_valid = 1;
- for (i = 0; i < tls_count; ++i)
+ if (elf_tdata (abfd)->stack_flags)
{
- BFD_ASSERT (first_tls->flags & SEC_THREAD_LOCAL);
- m->sections[i] = first_tls;
- first_tls = first_tls->next;
- }
-
- *pm = m;
- pm = &m->next;
- }
+ amt = sizeof (struct elf_segment_map);
+ m = bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_GNU_STACK;
+ m->p_flags = elf_tdata (abfd)->stack_flags;
+ m->p_flags_valid = 1;
- /* If there is a .eh_frame_hdr section, throw in a PT_GNU_EH_FRAME
- segment. */
- eh_frame_hdr = elf_tdata (abfd)->eh_frame_hdr;
- if (eh_frame_hdr != NULL
- && (eh_frame_hdr->output_section->flags & SEC_LOAD) != 0)
- {
- amt = sizeof (struct elf_segment_map);
- m = bfd_zalloc (abfd, amt);
- if (m == NULL)
- goto error_return;
- m->next = NULL;
- m->p_type = PT_GNU_EH_FRAME;
- m->count = 1;
- m->sections[0] = eh_frame_hdr->output_section;
+ *pm = m;
+ pm = &m->next;
+ }
- *pm = m;
- pm = &m->next;
- }
+ if (dynsec != NULL && elf_tdata (abfd)->relro)
+ {
+ /* We make a PT_GNU_RELRO segment only when there is a
+ PT_DYNAMIC segment. */
+ amt = sizeof (struct elf_segment_map);
+ m = bfd_zalloc (abfd, amt);
+ if (m == NULL)
+ goto error_return;
+ m->next = NULL;
+ m->p_type = PT_GNU_RELRO;
+ m->p_flags = PF_R;
+ m->p_flags_valid = 1;
- if (elf_tdata (abfd)->stack_flags)
- {
- amt = sizeof (struct elf_segment_map);
- m = bfd_zalloc (abfd, amt);
- if (m == NULL)
- goto error_return;
- m->next = NULL;
- m->p_type = PT_GNU_STACK;
- m->p_flags = elf_tdata (abfd)->stack_flags;
- m->p_flags_valid = 1;
+ *pm = m;
+ pm = &m->next;
+ }
- *pm = m;
- pm = &m->next;
+ free (sections);
+ elf_tdata (abfd)->segment_map = mfirst;
}
- if (elf_tdata (abfd)->relro)
- {
- amt = sizeof (struct elf_segment_map);
- m = bfd_zalloc (abfd, amt);
- if (m == NULL)
- goto error_return;
- m->next = NULL;
- m->p_type = PT_GNU_RELRO;
- m->p_flags = PF_R;
- m->p_flags_valid = 1;
-
- *pm = m;
- pm = &m->next;
- }
+ if (!elf_modify_segment_map (abfd, info))
+ return FALSE;
- free (sections);
- sections = NULL;
+ for (count = 0, m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ ++count;
+ elf_tdata (abfd)->program_header_size = count * bed->s->sizeof_phdr;
- elf_tdata (abfd)->segment_map = mfirst;
return TRUE;
error_return:
@@ -4027,7 +4277,7 @@ elf_sort_sections (const void *arg1, const void *arg2)
adjustment = vma_offset + bed->maxpagesize - off_offset;
else
adjustment = vma_offset - off_offset;
-
+
which can can be collapsed into the expression below. */
static file_ptr
@@ -4036,154 +4286,69 @@ vma_page_aligned_bias (bfd_vma vma, ufile_ptr off, bfd_vma maxpagesize)
return ((vma - off) % maxpagesize);
}
-static void
-print_segment_map (bfd *abfd)
-{
- struct elf_segment_map *m;
- unsigned int i, j;
-
- fprintf (stderr, _(" Section to Segment mapping:\n"));
- fprintf (stderr, _(" Segment Sections...\n"));
-
- for (i= 0, m = elf_tdata (abfd)->segment_map;
- m != NULL;
- i++, m = m->next)
- {
- const char *pt = get_segment_type (m->p_type);
- char buf[32];
-
- if (pt == NULL)
- {
- if (m->p_type >= PT_LOPROC && m->p_type <= PT_HIPROC)
- sprintf (buf, "LOPROC+%7.7x",
- (unsigned int) (m->p_type - PT_LOPROC));
- else if (m->p_type >= PT_LOOS && m->p_type <= PT_HIOS)
- sprintf (buf, "LOOS+%7.7x",
- (unsigned int) (m->p_type - PT_LOOS));
- else
- snprintf (buf, sizeof (buf), "%8.8x",
- (unsigned int) m->p_type);
- pt = buf;
- }
- fprintf (stderr, " %2.2d: %14.14s: ", i, pt);
- for (j = 0; j < m->count; j++)
- fprintf (stderr, "%s ", m->sections [j]->name);
- putc ('\n',stderr);
- }
-}
-
/* Assign file positions to the sections based on the mapping from
sections to segments. This function also sets up some fields in
- the file header, and writes out the program headers. */
+ the file header. */
static bfd_boolean
-assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
+assign_file_positions_for_load_sections (bfd *abfd,
+ struct bfd_link_info *link_info)
{
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- unsigned int count;
struct elf_segment_map *m;
- unsigned int alloc;
Elf_Internal_Phdr *phdrs;
- file_ptr off, voff;
- bfd_vma filehdr_vaddr, filehdr_paddr;
- bfd_vma phdrs_vaddr, phdrs_paddr;
Elf_Internal_Phdr *p;
+ file_ptr off;
+ bfd_size_type maxpagesize;
+ unsigned int alloc;
+ unsigned int i, j;
- if (elf_tdata (abfd)->segment_map == NULL)
- {
- if (! map_sections_to_segments (abfd))
- return FALSE;
- }
- else
- {
- /* The placement algorithm assumes that non allocated sections are
- not in PT_LOAD segments. We ensure this here by removing such
- sections from the segment map. We also remove excluded
- sections. */
- for (m = elf_tdata (abfd)->segment_map;
- m != NULL;
- m = m->next)
- {
- unsigned int new_count;
- unsigned int i;
-
- new_count = 0;
- for (i = 0; i < m->count; i ++)
- {
- if ((m->sections[i]->flags & SEC_EXCLUDE) == 0
- && ((m->sections[i]->flags & SEC_ALLOC) != 0
- || m->p_type != PT_LOAD))
- {
- if (i != new_count)
- m->sections[new_count] = m->sections[i];
-
- new_count ++;
- }
- }
-
- if (new_count != m->count)
- m->count = new_count;
- }
- }
-
- if (bed->elf_backend_modify_segment_map)
- {
- if (! (*bed->elf_backend_modify_segment_map) (abfd, link_info))
- return FALSE;
- }
+ if (link_info == NULL
+ && !elf_modify_segment_map (abfd, link_info))
+ return FALSE;
- count = 0;
+ alloc = 0;
for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
- ++count;
+ ++alloc;
elf_elfheader (abfd)->e_phoff = bed->s->sizeof_ehdr;
elf_elfheader (abfd)->e_phentsize = bed->s->sizeof_phdr;
- elf_elfheader (abfd)->e_phnum = count;
+ elf_elfheader (abfd)->e_phnum = alloc;
+
+ if (elf_tdata (abfd)->program_header_size == (bfd_size_type) -1)
+ elf_tdata (abfd)->program_header_size = alloc * bed->s->sizeof_phdr;
+ else
+ BFD_ASSERT (elf_tdata (abfd)->program_header_size
+ >= alloc * bed->s->sizeof_phdr);
- if (count == 0)
+ if (alloc == 0)
{
elf_tdata (abfd)->next_file_pos = bed->s->sizeof_ehdr;
return TRUE;
}
- /* If we already counted the number of program segments, make sure
- that we allocated enough space. This happens when SIZEOF_HEADERS
- is used in a linker script. */
- alloc = elf_tdata (abfd)->program_header_size / bed->s->sizeof_phdr;
- if (alloc != 0 && count > alloc)
- {
- ((*_bfd_error_handler)
- (_("%B: Not enough room for program headers (allocated %u, need %u)"),
- abfd, alloc, count));
- print_segment_map (abfd);
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
- if (alloc == 0)
- alloc = count;
-
phdrs = bfd_alloc2 (abfd, alloc, sizeof (Elf_Internal_Phdr));
+ elf_tdata (abfd)->phdr = phdrs;
if (phdrs == NULL)
return FALSE;
+ maxpagesize = 1;
+ if ((abfd->flags & D_PAGED) != 0)
+ maxpagesize = bed->maxpagesize;
+
off = bed->s->sizeof_ehdr;
off += alloc * bed->s->sizeof_phdr;
- filehdr_vaddr = 0;
- filehdr_paddr = 0;
- phdrs_vaddr = 0;
- phdrs_paddr = 0;
-
- for (m = elf_tdata (abfd)->segment_map, p = phdrs;
+ for (m = elf_tdata (abfd)->segment_map, p = phdrs, j = 0;
m != NULL;
- m = m->next, p++)
+ m = m->next, p++, j++)
{
- unsigned int i;
asection **secpp;
+ bfd_vma off_adjust;
+ bfd_boolean no_contents;
/* If elf_segment_map is not from map_sections_to_segments, the
- sections may not be correctly ordered. NOTE: sorting should
+ sections may not be correctly ordered. NOTE: sorting should
not be done to the PT_NOTE section of a corefile, which may
contain several pseudo-sections artificially created by bfd.
Sorting these pseudo-sections breaks things badly. */
@@ -4197,58 +4362,109 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
number of sections with contents contributing to both p_filesz
and p_memsz, followed by a number of sections with no contents
that just contribute to p_memsz. In this loop, OFF tracks next
- available file offset for PT_LOAD and PT_NOTE segments. VOFF is
- an adjustment we use for segments that have no file contents
- but need zero filled memory allocation. */
- voff = 0;
+ available file offset for PT_LOAD and PT_NOTE segments. */
p->p_type = m->p_type;
p->p_flags = m->p_flags;
+ if (m->count == 0)
+ p->p_vaddr = 0;
+ else
+ p->p_vaddr = m->sections[0]->vma - m->p_vaddr_offset;
+
+ if (m->p_paddr_valid)
+ p->p_paddr = m->p_paddr;
+ else if (m->count == 0)
+ p->p_paddr = 0;
+ else
+ p->p_paddr = m->sections[0]->lma - m->p_vaddr_offset;
+
+ if (p->p_type == PT_LOAD
+ && (abfd->flags & D_PAGED) != 0)
+ {
+ /* p_align in demand paged PT_LOAD segments effectively stores
+ the maximum page size. When copying an executable with
+ objcopy, we set m->p_align from the input file. Use this
+ value for maxpagesize rather than bed->maxpagesize, which
+ may be different. Note that we use maxpagesize for PT_TLS
+ segment alignment later in this function, so we are relying
+ on at least one PT_LOAD segment appearing before a PT_TLS
+ segment. */
+ if (m->p_align_valid)
+ maxpagesize = m->p_align;
+
+ p->p_align = maxpagesize;
+ }
+ else if (m->count == 0)
+ p->p_align = 1 << bed->s->log_file_align;
+ else if (m->p_align_valid)
+ p->p_align = m->p_align;
+ else
+ p->p_align = 0;
+
+ no_contents = FALSE;
+ off_adjust = 0;
if (p->p_type == PT_LOAD
&& m->count > 0)
{
bfd_size_type align;
- bfd_vma adjust;
unsigned int align_power = 0;
- for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
+ if (m->p_align_valid)
+ align = p->p_align;
+ else
{
- unsigned int secalign;
+ for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
+ {
+ unsigned int secalign;
- secalign = bfd_get_section_alignment (abfd, *secpp);
- if (secalign > align_power)
- align_power = secalign;
+ secalign = bfd_get_section_alignment (abfd, *secpp);
+ if (secalign > align_power)
+ align_power = secalign;
+ }
+ align = (bfd_size_type) 1 << align_power;
+ if (align < maxpagesize)
+ align = maxpagesize;
}
- align = (bfd_size_type) 1 << align_power;
-
- if ((abfd->flags & D_PAGED) != 0 && bed->maxpagesize > align)
- align = bed->maxpagesize;
- adjust = vma_page_aligned_bias (m->sections[0]->vma, off, align);
- off += adjust;
- if (adjust != 0
- && !m->includes_filehdr
- && !m->includes_phdrs
- && (ufile_ptr) off >= align)
+ for (i = 0; i < m->count; i++)
+ if ((m->sections[i]->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ /* If we aren't making room for this section, then
+ it must be SHT_NOBITS regardless of what we've
+ set via struct bfd_elf_special_section. */
+ elf_section_type (m->sections[i]) = SHT_NOBITS;
+
+ /* Find out whether this segment contains any loadable
+ sections. If the first section isn't loadable, the same
+ holds for any other sections. */
+ i = 0;
+ while (elf_section_type (m->sections[i]) == SHT_NOBITS)
{
- /* If the first section isn't loadable, the same holds for
- any other sections. Since the segment won't need file
- space, we can make p_offset overlap some prior segment.
- However, .tbss is special. If a segment starts with
- .tbss, we need to look at the next section to decide
- whether the segment has any loadable sections. */
- i = 0;
- while ((m->sections[i]->flags & SEC_LOAD) == 0)
+ /* If a segment starts with .tbss, we need to look
+ at the next section to decide whether the segment
+ has any loadable sections. */
+ if ((elf_section_flags (m->sections[i]) & SHF_TLS) == 0
+ || ++i >= m->count)
{
- if ((m->sections[i]->flags & SEC_THREAD_LOCAL) == 0
- || ++i >= m->count)
- {
- off -= adjust;
- voff = adjust - align;
- break;
- }
+ no_contents = TRUE;
+ break;
}
}
+
+ off_adjust = vma_page_aligned_bias (m->sections[0]->vma, off, align);
+ off += off_adjust;
+ if (no_contents)
+ {
+ /* We shouldn't need to align the segment on disk since
+ the segment doesn't need file space, but the gABI
+ arguably requires the alignment and glibc ld.so
+ checks it. So to comply with the alignment
+ requirement but not waste file space, we adjust
+ p_offset for just this segment. (OFF_ADJUST is
+ subtracted from OFF later.) This may put p_offset
+ past the end of file, but that shouldn't matter. */
+ }
+ else
+ off_adjust = 0;
}
/* Make sure the .dynamic section is the first section in the
PT_DYNAMIC segment. */
@@ -4263,35 +4479,14 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
return FALSE;
}
- if (m->count == 0)
- p->p_vaddr = 0;
- else
- p->p_vaddr = m->sections[0]->vma;
-
- if (m->p_paddr_valid)
- p->p_paddr = m->p_paddr;
- else if (m->count == 0)
- p->p_paddr = 0;
- else
- p->p_paddr = m->sections[0]->lma;
-
- if (p->p_type == PT_LOAD
- && (abfd->flags & D_PAGED) != 0)
- p->p_align = bed->maxpagesize;
- else if (m->count == 0)
- p->p_align = 1 << bed->s->log_file_align;
- else
- p->p_align = 0;
-
p->p_offset = 0;
p->p_filesz = 0;
p->p_memsz = 0;
if (m->includes_filehdr)
{
- if (! m->p_flags_valid)
+ if (!m->p_flags_valid)
p->p_flags |= PF_R;
- p->p_offset = 0;
p->p_filesz = bed->s->sizeof_ehdr;
p->p_memsz = bed->s->sizeof_ehdr;
if (m->count > 0)
@@ -4308,30 +4503,17 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
}
p->p_vaddr -= off;
- if (! m->p_paddr_valid)
+ if (!m->p_paddr_valid)
p->p_paddr -= off;
}
- if (p->p_type == PT_LOAD)
- {
- filehdr_vaddr = p->p_vaddr;
- filehdr_paddr = p->p_paddr;
- }
}
if (m->includes_phdrs)
{
- if (! m->p_flags_valid)
+ if (!m->p_flags_valid)
p->p_flags |= PF_R;
- if (m->includes_filehdr)
- {
- if (p->p_type == PT_LOAD)
- {
- phdrs_vaddr = p->p_vaddr + bed->s->sizeof_ehdr;
- phdrs_paddr = p->p_paddr + bed->s->sizeof_ehdr;
- }
- }
- else
+ if (!m->includes_filehdr)
{
p->p_offset = bed->s->sizeof_ehdr;
@@ -4339,17 +4521,9 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
{
BFD_ASSERT (p->p_type == PT_LOAD);
p->p_vaddr -= off - p->p_offset;
- if (! m->p_paddr_valid)
+ if (!m->p_paddr_valid)
p->p_paddr -= off - p->p_offset;
}
-
- if (p->p_type == PT_LOAD)
- {
- phdrs_vaddr = p->p_vaddr;
- phdrs_paddr = p->p_paddr;
- }
- else
- phdrs_vaddr = bed->maxpagesize + bed->s->sizeof_ehdr;
}
p->p_filesz += alloc * bed->s->sizeof_phdr;
@@ -4359,36 +4533,44 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
if (p->p_type == PT_LOAD
|| (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core))
{
- if (! m->includes_filehdr && ! m->includes_phdrs)
- p->p_offset = off + voff;
+ if (!m->includes_filehdr && !m->includes_phdrs)
+ p->p_offset = off;
else
{
file_ptr adjust;
adjust = off - (p->p_offset + p->p_filesz);
- p->p_filesz += adjust;
+ if (!no_contents)
+ p->p_filesz += adjust;
p->p_memsz += adjust;
}
}
+ /* Set up p_filesz, p_memsz, p_align and p_flags from the section
+ maps. Set filepos for sections in PT_LOAD segments, and in
+ core files, for sections in PT_NOTE segments.
+ assign_file_positions_for_non_load_sections will set filepos
+ for other sections and update p_filesz for other segments. */
for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
{
asection *sec;
- flagword flags;
bfd_size_type align;
+ Elf_Internal_Shdr *this_hdr;
sec = *secpp;
- flags = sec->flags;
- align = 1 << bfd_get_section_alignment (abfd, sec);
+ this_hdr = &elf_section_data (sec)->this_hdr;
+ align = (bfd_size_type) 1 << bfd_get_section_alignment (abfd, sec);
if (p->p_type == PT_LOAD
|| p->p_type == PT_TLS)
{
- bfd_signed_vma adjust;
+ bfd_signed_vma adjust = sec->lma - (p->p_paddr + p->p_memsz);
- if ((flags & SEC_LOAD) != 0)
+ if (this_hdr->sh_type != SHT_NOBITS
+ || ((this_hdr->sh_flags & SHF_ALLOC) != 0
+ && ((this_hdr->sh_flags & SHF_TLS) == 0
+ || p->p_type == PT_TLS)))
{
- adjust = sec->lma - (p->p_paddr + p->p_filesz);
if (adjust < 0)
{
(*_bfd_error_handler)
@@ -4396,24 +4578,13 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
abfd, sec, (unsigned long) sec->lma);
adjust = 0;
}
- off += adjust;
- p->p_filesz += adjust;
- p->p_memsz += adjust;
- }
- /* .tbss is special. It doesn't contribute to p_memsz of
- normal segments. */
- else if ((flags & SEC_THREAD_LOCAL) == 0
- || p->p_type == PT_TLS)
- {
- /* The section VMA must equal the file position
- modulo the page size. */
- bfd_size_type page = align;
- if ((abfd->flags & D_PAGED) != 0 && bed->maxpagesize > page)
- page = bed->maxpagesize;
- adjust = vma_page_aligned_bias (sec->vma,
- p->p_vaddr + p->p_memsz,
- page);
p->p_memsz += adjust;
+
+ if (this_hdr->sh_type != SHT_NOBITS)
+ {
+ off += adjust;
+ p->p_filesz += adjust;
+ }
}
}
@@ -4423,9 +4594,9 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
everything. */
if (i == 0)
{
- sec->filepos = off;
- off += sec->size;
- p->p_filesz = sec->size;
+ this_hdr->sh_offset = sec->filepos = off;
+ off += this_hdr->sh_size;
+ p->p_filesz = this_hdr->sh_size;
p->p_memsz = 0;
p->p_align = 1;
}
@@ -4442,96 +4613,200 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
{
if (p->p_type == PT_LOAD)
{
- sec->filepos = off;
- /* FIXME: The SEC_HAS_CONTENTS test here dates back to
- 1997, and the exact reason for it isn't clear. One
- plausible explanation is that it is to work around
- a problem we have with linker scripts using data
- statements in NOLOAD sections. I don't think it
- makes a great deal of sense to have such a section
- assigned to a PT_LOAD segment, but apparently
- people do this. The data statement results in a
- bfd_data_link_order being built, and these need
- section contents to write into. Eventually, we get
- to _bfd_elf_write_object_contents which writes any
- section with contents to the output. Make room
- here for the write, so that following segments are
- not trashed. */
- if ((flags & SEC_LOAD) != 0
- || (flags & SEC_HAS_CONTENTS) != 0)
- off += sec->size;
+ this_hdr->sh_offset = sec->filepos = off;
+ if (this_hdr->sh_type != SHT_NOBITS)
+ off += this_hdr->sh_size;
}
- if ((flags & SEC_LOAD) != 0)
+ if (this_hdr->sh_type != SHT_NOBITS)
{
- p->p_filesz += sec->size;
- p->p_memsz += sec->size;
+ p->p_filesz += this_hdr->sh_size;
+ /* A load section without SHF_ALLOC is something like
+ a note section in a PT_NOTE segment. These take
+ file space but are not loaded into memory. */
+ if ((this_hdr->sh_flags & SHF_ALLOC) != 0)
+ p->p_memsz += this_hdr->sh_size;
}
- /* PR ld/594: Sections in note segments which are not loaded
- contribute to the file size but not the in-memory size. */
- else if (p->p_type == PT_NOTE
- && (flags & SEC_HAS_CONTENTS) != 0)
- p->p_filesz += sec->size;
-
- /* .tbss is special. It doesn't contribute to p_memsz of
- normal segments. */
- else if ((flags & SEC_THREAD_LOCAL) == 0
- || p->p_type == PT_TLS)
- p->p_memsz += sec->size;
-
- if (p->p_type == PT_TLS
- && sec->size == 0
- && (sec->flags & SEC_HAS_CONTENTS) == 0)
+ else if ((this_hdr->sh_flags & SHF_ALLOC) != 0)
{
- struct bfd_link_order *o = sec->map_tail.link_order;
- if (o != NULL)
- p->p_memsz += o->offset + o->size;
+ if (p->p_type == PT_TLS)
+ p->p_memsz += this_hdr->sh_size;
+
+ /* .tbss is special. It doesn't contribute to p_memsz of
+ normal segments. */
+ else if ((this_hdr->sh_flags & SHF_TLS) == 0)
+ p->p_memsz += this_hdr->sh_size;
}
- if (align > p->p_align
- && (p->p_type != PT_LOAD || (abfd->flags & D_PAGED) == 0))
+ if (p->p_type == PT_GNU_RELRO)
+ p->p_align = 1;
+ else if (align > p->p_align
+ && !m->p_align_valid
+ && (p->p_type != PT_LOAD
+ || (abfd->flags & D_PAGED) == 0))
p->p_align = align;
}
- if (! m->p_flags_valid)
+ if (!m->p_flags_valid)
{
p->p_flags |= PF_R;
- if ((flags & SEC_CODE) != 0)
+ if ((this_hdr->sh_flags & SHF_EXECINSTR) != 0)
p->p_flags |= PF_X;
- if ((flags & SEC_READONLY) == 0)
+ if ((this_hdr->sh_flags & SHF_WRITE) != 0)
p->p_flags |= PF_W;
}
}
+ off -= off_adjust;
+
+ /* Check that all sections are in a PT_LOAD segment.
+ Don't check funky gdb generated core files. */
+ if (p->p_type == PT_LOAD && bfd_get_format (abfd) != bfd_core)
+ for (i = 0, secpp = m->sections; i < m->count; i++, secpp++)
+ {
+ Elf_Internal_Shdr *this_hdr;
+ asection *sec;
+
+ sec = *secpp;
+ this_hdr = &(elf_section_data(sec)->this_hdr);
+ if (this_hdr->sh_size != 0
+ && !ELF_IS_SECTION_IN_SEGMENT_FILE (this_hdr, p))
+ {
+ (*_bfd_error_handler)
+ (_("%B: section `%A' can't be allocated in segment %d"),
+ abfd, sec, j);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ }
+ }
+
+ elf_tdata (abfd)->next_file_pos = off;
+ return TRUE;
+}
+
+/* Assign file positions for the other sections. */
+
+static bfd_boolean
+assign_file_positions_for_non_load_sections (bfd *abfd,
+ struct bfd_link_info *link_info)
+{
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ Elf_Internal_Shdr **i_shdrpp;
+ Elf_Internal_Shdr **hdrpp;
+ Elf_Internal_Phdr *phdrs;
+ Elf_Internal_Phdr *p;
+ struct elf_segment_map *m;
+ bfd_vma filehdr_vaddr, filehdr_paddr;
+ bfd_vma phdrs_vaddr, phdrs_paddr;
+ file_ptr off;
+ unsigned int num_sec;
+ unsigned int i;
+ unsigned int count;
+
+ i_shdrpp = elf_elfsections (abfd);
+ num_sec = elf_numsections (abfd);
+ off = elf_tdata (abfd)->next_file_pos;
+ for (i = 1, hdrpp = i_shdrpp + 1; i < num_sec; i++, hdrpp++)
+ {
+ struct elf_obj_tdata *tdata = elf_tdata (abfd);
+ Elf_Internal_Shdr *hdr;
+
+ hdr = *hdrpp;
+ if (hdr->bfd_section != NULL
+ && (hdr->bfd_section->filepos != 0
+ || (hdr->sh_type == SHT_NOBITS
+ && hdr->contents == NULL)))
+ BFD_ASSERT (hdr->sh_offset == hdr->bfd_section->filepos);
+ else if ((hdr->sh_flags & SHF_ALLOC) != 0)
+ {
+ if (hdr->sh_size != 0)
+ ((*_bfd_error_handler)
+ (_("%B: warning: allocated section `%s' not in segment"),
+ abfd,
+ (hdr->bfd_section == NULL
+ ? "*unknown*"
+ : hdr->bfd_section->name)));
+ /* We don't need to page align empty sections. */
+ if ((abfd->flags & D_PAGED) != 0 && hdr->sh_size != 0)
+ off += vma_page_aligned_bias (hdr->sh_addr, off,
+ bed->maxpagesize);
+ else
+ off += vma_page_aligned_bias (hdr->sh_addr, off,
+ hdr->sh_addralign);
+ off = _bfd_elf_assign_file_position_for_section (hdr, off,
+ FALSE);
+ }
+ else if (((hdr->sh_type == SHT_REL || hdr->sh_type == SHT_RELA)
+ && hdr->bfd_section == NULL)
+ || hdr == i_shdrpp[tdata->symtab_section]
+ || hdr == i_shdrpp[tdata->symtab_shndx_section]
+ || hdr == i_shdrpp[tdata->strtab_section])
+ hdr->sh_offset = -1;
+ else
+ off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
+
+ if (i == SHN_LORESERVE - 1)
+ {
+ i += SHN_HIRESERVE + 1 - SHN_LORESERVE;
+ hdrpp += SHN_HIRESERVE + 1 - SHN_LORESERVE;
+ }
}
/* Now that we have set the section file positions, we can set up
the file positions for the non PT_LOAD segments. */
+ count = 0;
+ filehdr_vaddr = 0;
+ filehdr_paddr = 0;
+ phdrs_vaddr = bed->maxpagesize + bed->s->sizeof_ehdr;
+ phdrs_paddr = 0;
+ phdrs = elf_tdata (abfd)->phdr;
for (m = elf_tdata (abfd)->segment_map, p = phdrs;
m != NULL;
m = m->next, p++)
{
- if (p->p_type != PT_LOAD && m->count > 0)
+ ++count;
+ if (p->p_type != PT_LOAD)
+ continue;
+
+ if (m->includes_filehdr)
{
- BFD_ASSERT (! m->includes_filehdr && ! m->includes_phdrs);
- /* If the section has not yet been assigned a file position,
- do so now. The ARM BPABI requires that .dynamic section
- not be marked SEC_ALLOC because it is not part of any
- PT_LOAD segment, so it will not be processed above. */
- if (p->p_type == PT_DYNAMIC && m->sections[0]->filepos == 0)
+ filehdr_vaddr = p->p_vaddr;
+ filehdr_paddr = p->p_paddr;
+ }
+ if (m->includes_phdrs)
+ {
+ phdrs_vaddr = p->p_vaddr;
+ phdrs_paddr = p->p_paddr;
+ if (m->includes_filehdr)
{
- unsigned int i;
- Elf_Internal_Shdr ** const i_shdrpp = elf_elfsections (abfd);
-
- i = 1;
- while (i_shdrpp[i]->bfd_section != m->sections[0])
- ++i;
- off = (_bfd_elf_assign_file_position_for_section
- (i_shdrpp[i], off, TRUE));
- p->p_filesz = m->sections[0]->size;
+ phdrs_vaddr += bed->s->sizeof_ehdr;
+ phdrs_paddr += bed->s->sizeof_ehdr;
}
- p->p_offset = m->sections[0]->filepos;
}
- if (m->count == 0)
+ }
+
+ for (m = elf_tdata (abfd)->segment_map, p = phdrs;
+ m != NULL;
+ m = m->next, p++)
+ {
+ if (m->count != 0)
+ {
+ if (p->p_type != PT_LOAD
+ && (p->p_type != PT_NOTE || bfd_get_format (abfd) != bfd_core))
+ {
+ Elf_Internal_Shdr *hdr;
+ BFD_ASSERT (!m->includes_filehdr && !m->includes_phdrs);
+
+ hdr = &elf_section_data (m->sections[m->count - 1])->this_hdr;
+ p->p_filesz = (m->sections[m->count - 1]->filepos
+ - m->sections[0]->filepos);
+ if (hdr->sh_type != SHT_NOBITS)
+ p->p_filesz += hdr->sh_size;
+
+ p->p_offset = m->sections[0]->filepos;
+ }
+ }
+ else
{
if (m->includes_filehdr)
{
@@ -4554,8 +4829,8 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
if (lp->p_type == PT_LOAD
&& lp->p_vaddr <= link_info->relro_end
&& lp->p_vaddr >= link_info->relro_start
- && lp->p_vaddr + lp->p_filesz
- >= link_info->relro_end)
+ && (lp->p_vaddr + lp->p_filesz
+ >= link_info->relro_end))
break;
}
@@ -4579,131 +4854,11 @@ assign_file_positions_for_segments (bfd *abfd, struct bfd_link_info *link_info)
}
}
- /* Clear out any program headers we allocated but did not use. */
- for (; count < alloc; count++, p++)
- {
- memset (p, 0, sizeof *p);
- p->p_type = PT_NULL;
- }
-
- elf_tdata (abfd)->phdr = phdrs;
-
elf_tdata (abfd)->next_file_pos = off;
- /* Write out the program headers. */
- if (bfd_seek (abfd, (bfd_signed_vma) bed->s->sizeof_ehdr, SEEK_SET) != 0
- || bed->s->write_out_phdrs (abfd, phdrs, alloc) != 0)
- return FALSE;
-
return TRUE;
}
-/* Get the size of the program header.
-
- If this is called by the linker before any of the section VMA's are set, it
- can't calculate the correct value for a strange memory layout. This only
- happens when SIZEOF_HEADERS is used in a linker script. In this case,
- SORTED_HDRS is NULL and we assume the normal scenario of one text and one
- data segment (exclusive of .interp and .dynamic).
-
- ??? User written scripts must either not use SIZEOF_HEADERS, or assume there
- will be two segments. */
-
-static bfd_size_type
-get_program_header_size (bfd *abfd)
-{
- size_t segs;
- asection *s;
- const struct elf_backend_data *bed = get_elf_backend_data (abfd);
-
- /* We can't return a different result each time we're called. */
- if (elf_tdata (abfd)->program_header_size != 0)
- return elf_tdata (abfd)->program_header_size;
-
- if (elf_tdata (abfd)->segment_map != NULL)
- {
- struct elf_segment_map *m;
-
- segs = 0;
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
- ++segs;
- elf_tdata (abfd)->program_header_size = segs * bed->s->sizeof_phdr;
- return elf_tdata (abfd)->program_header_size;
- }
-
- /* Assume we will need exactly two PT_LOAD segments: one for text
- and one for data. */
- segs = 2;
-
- s = bfd_get_section_by_name (abfd, ".interp");
- if (s != NULL && (s->flags & SEC_LOAD) != 0)
- {
- /* If we have a loadable interpreter section, we need a
- PT_INTERP segment. In this case, assume we also need a
- PT_PHDR segment, although that may not be true for all
- targets. */
- segs += 2;
- }
-
- if (bfd_get_section_by_name (abfd, ".dynamic") != NULL)
- {
- /* We need a PT_DYNAMIC segment. */
- ++segs;
- }
-
- if (elf_tdata (abfd)->eh_frame_hdr)
- {
- /* We need a PT_GNU_EH_FRAME segment. */
- ++segs;
- }
-
- if (elf_tdata (abfd)->stack_flags)
- {
- /* We need a PT_GNU_STACK segment. */
- ++segs;
- }
-
- if (elf_tdata (abfd)->relro)
- {
- /* We need a PT_GNU_RELRO segment. */
- ++segs;
- }
-
- for (s = abfd->sections; s != NULL; s = s->next)
- {
- if ((s->flags & SEC_LOAD) != 0
- && strncmp (s->name, ".note", 5) == 0)
- {
- /* We need a PT_NOTE segment. */
- ++segs;
- }
- }
-
- for (s = abfd->sections; s != NULL; s = s->next)
- {
- if (s->flags & SEC_THREAD_LOCAL)
- {
- /* We need a PT_TLS segment. */
- ++segs;
- break;
- }
- }
-
- /* Let the backend count up any program headers it might need. */
- if (bed->elf_backend_additional_program_headers)
- {
- int a;
-
- a = (*bed->elf_backend_additional_program_headers) (abfd);
- if (a == -1)
- abort ();
- segs += a;
- }
-
- elf_tdata (abfd)->program_header_size = segs * bed->s->sizeof_phdr;
- return elf_tdata (abfd)->program_header_size;
-}
-
/* Work out the file positions of all the sections. This is called by
_bfd_elf_compute_section_file_positions. All the section sizes and
VMAs must be known before this is called.
@@ -4722,16 +4877,16 @@ static bfd_boolean
assign_file_positions_except_relocs (bfd *abfd,
struct bfd_link_info *link_info)
{
- struct elf_obj_tdata * const tdata = elf_tdata (abfd);
- Elf_Internal_Ehdr * const i_ehdrp = elf_elfheader (abfd);
- Elf_Internal_Shdr ** const i_shdrpp = elf_elfsections (abfd);
- unsigned int num_sec = elf_numsections (abfd);
+ struct elf_obj_tdata *tdata = elf_tdata (abfd);
+ Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
file_ptr off;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0
&& bfd_get_format (abfd) != bfd_core)
{
+ Elf_Internal_Shdr ** const i_shdrpp = elf_elfsections (abfd);
+ unsigned int num_sec = elf_numsections (abfd);
Elf_Internal_Shdr **hdrpp;
unsigned int i;
@@ -4766,58 +4921,30 @@ assign_file_positions_except_relocs (bfd *abfd,
}
else
{
- unsigned int i;
- Elf_Internal_Shdr **hdrpp;
+ unsigned int alloc;
/* Assign file positions for the loaded sections based on the
- assignment of sections to segments. */
- if (! assign_file_positions_for_segments (abfd, link_info))
+ assignment of sections to segments. */
+ if (!assign_file_positions_for_load_sections (abfd, link_info))
return FALSE;
- /* Assign file positions for the other sections. */
+ /* And for non-load sections. */
+ if (!assign_file_positions_for_non_load_sections (abfd, link_info))
+ return FALSE;
- off = elf_tdata (abfd)->next_file_pos;
- for (i = 1, hdrpp = i_shdrpp + 1; i < num_sec; i++, hdrpp++)
+ if (bed->elf_backend_modify_program_headers != NULL)
{
- Elf_Internal_Shdr *hdr;
+ if (!(*bed->elf_backend_modify_program_headers) (abfd, link_info))
+ return FALSE;
+ }
- hdr = *hdrpp;
- if (hdr->bfd_section != NULL
- && hdr->bfd_section->filepos != 0)
- hdr->sh_offset = hdr->bfd_section->filepos;
- else if ((hdr->sh_flags & SHF_ALLOC) != 0)
- {
- if (hdr->sh_size != 0)
- ((*_bfd_error_handler)
- (_("%B: warning: allocated section `%s' not in segment"),
- abfd,
- (hdr->bfd_section == NULL
- ? "*unknown*"
- : hdr->bfd_section->name)));
- if ((abfd->flags & D_PAGED) != 0)
- off += vma_page_aligned_bias (hdr->sh_addr, off,
- bed->maxpagesize);
- else
- off += vma_page_aligned_bias (hdr->sh_addr, off,
- hdr->sh_addralign);
- off = _bfd_elf_assign_file_position_for_section (hdr, off,
- FALSE);
- }
- else if (((hdr->sh_type == SHT_REL || hdr->sh_type == SHT_RELA)
- && hdr->bfd_section == NULL)
- || hdr == i_shdrpp[tdata->symtab_section]
- || hdr == i_shdrpp[tdata->symtab_shndx_section]
- || hdr == i_shdrpp[tdata->strtab_section])
- hdr->sh_offset = -1;
- else
- off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE);
+ /* Write out the program headers. */
+ alloc = tdata->program_header_size / bed->s->sizeof_phdr;
+ if (bfd_seek (abfd, (bfd_signed_vma) bed->s->sizeof_ehdr, SEEK_SET) != 0
+ || bed->s->write_out_phdrs (abfd, tdata->phdr, alloc) != 0)
+ return FALSE;
- if (i == SHN_LORESERVE - 1)
- {
- i += SHN_HIRESERVE + 1 - SHN_LORESERVE;
- hdrpp += SHN_HIRESERVE + 1 - SHN_LORESERVE;
- }
- }
+ off = tdata->next_file_pos;
}
/* Place the section headers. */
@@ -4825,7 +4952,7 @@ assign_file_positions_except_relocs (bfd *abfd,
i_ehdrp->e_shoff = off;
off += i_ehdrp->e_shnum * i_ehdrp->e_shentsize;
- elf_tdata (abfd)->next_file_pos = off;
+ tdata->next_file_pos = off;
return TRUE;
}
@@ -4994,7 +5121,7 @@ _bfd_elf_write_object_contents (bfd *abfd)
/* Write out the section header names. */
if (elf_shstrtab (abfd) != NULL
&& (bfd_seek (abfd, elf_tdata (abfd)->shstrtab_hdr.sh_offset, SEEK_SET) != 0
- || ! _bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd))))
+ || !_bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd))))
return FALSE;
if (bed->elf_backend_final_write_processing)
@@ -5066,13 +5193,14 @@ _bfd_elf_symbol_from_bfd_symbol (bfd *abfd, asymbol **asym_ptr_ptr)
&& (flags & BSF_SECTION_SYM)
&& asym_ptr->section)
{
+ asection *sec;
int indx;
- if (asym_ptr->section->output_section != NULL)
- indx = asym_ptr->section->output_section->index;
- else
- indx = asym_ptr->section->index;
- if (indx < elf_num_section_syms (abfd)
+ sec = asym_ptr->section;
+ if (sec->owner != abfd && sec->output_section != NULL)
+ sec = sec->output_section;
+ if (sec->owner == abfd
+ && (indx = sec->index) < elf_num_section_syms (abfd)
&& elf_section_syms (abfd)[indx] != NULL)
asym_ptr->udata.i = elf_section_syms (abfd)[indx]->udata.i;
}
@@ -5082,7 +5210,7 @@ _bfd_elf_symbol_from_bfd_symbol (bfd *abfd, asymbol **asym_ptr_ptr)
if (idx == 0)
{
/* This case can occur when using --strip-symbol on a symbol
- which is used in a relocation entry. */
+ which is used in a relocation entry. */
(*_bfd_error_handler)
(_("%B: symbol `%s' required but not present"),
abfd, bfd_asymbol_name (asym_ptr));
@@ -5161,7 +5289,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
&& bfd_get_format (ibfd) == bfd_core \
&& s->vma == 0 && s->lma == 0 \
&& (bfd_vma) s->filepos >= p->p_offset \
- && ((bfd_vma) s->filepos + s->size \
+ && ((bfd_vma) s->filepos + s->size \
<= p->p_offset + p->p_filesz))
/* The complicated case when p_vaddr is 0 is to handle the Solaris
@@ -5175,13 +5303,13 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
&& (s->flags & SEC_HAS_CONTENTS) != 0 \
&& s->size > 0 \
&& (bfd_vma) s->filepos >= p->p_offset \
- && ((bfd_vma) s->filepos + s->size \
+ && ((bfd_vma) s->filepos + s->size \
<= p->p_offset + p->p_filesz))
/* Decide if the given section should be included in the given segment.
A section will be included if:
1. It is within the address space of the segment -- we use the LMA
- if that is set for the segment and the VMA otherwise,
+ if that is set for the segment and the VMA otherwise,
2. It is an allocated segment,
3. There is an output section associated with it,
4. The section has not already been allocated to a previous segment.
@@ -5189,14 +5317,13 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
6. PT_TLS segment includes only SHF_TLS sections.
7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
8. PT_DYNAMIC should not contain empty sections at the beginning
- (with the possible exception of .dynamic). */
-#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \
+ (with the possible exception of .dynamic). */
+#define IS_SECTION_IN_INPUT_SEGMENT(section, segment, bed) \
((((segment->p_paddr \
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
: IS_CONTAINED_BY_VMA (section, segment)) \
&& (section->flags & SEC_ALLOC) != 0) \
|| IS_COREFILE_NOTE (segment, section)) \
- && section->output_section != NULL \
&& segment->p_type != PT_GNU_STACK \
&& (segment->p_type != PT_TLS \
|| (section->flags & SEC_THREAD_LOCAL)) \
@@ -5206,12 +5333,18 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
&& (segment->p_type != PT_DYNAMIC \
|| SECTION_SIZE (section, segment) > 0 \
|| (segment->p_paddr \
- ? segment->p_paddr != section->lma \
- : segment->p_vaddr != section->vma) \
+ ? segment->p_paddr != section->lma \
+ : segment->p_vaddr != section->vma) \
|| (strcmp (bfd_get_section_name (ibfd, section), ".dynamic") \
- == 0)) \
+ == 0)) \
&& ! section->segment_mark)
+/* If the output section of a section in the input segment is NULL,
+ it is removed from the corresponding output segment. */
+#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \
+ (IS_SECTION_IN_INPUT_SEGMENT (section, segment, bed) \
+ && section->output_section != NULL)
+
/* Returns TRUE iff seg1 starts after the end of seg2. */
#define SEGMENT_AFTER_SEGMENT(seg1, seg2, field) \
(seg1->field >= SEGMENT_END (seg2, seg2->field))
@@ -5224,9 +5357,9 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
LMA. */
#define SEGMENT_OVERLAPS(seg1, seg2) \
( !(SEGMENT_AFTER_SEGMENT (seg1, seg2, p_vaddr) \
- || SEGMENT_AFTER_SEGMENT (seg2, seg1, p_vaddr)) \
+ || SEGMENT_AFTER_SEGMENT (seg2, seg1, p_vaddr)) \
&& !(SEGMENT_AFTER_SEGMENT (seg1, seg2, p_paddr) \
- || SEGMENT_AFTER_SEGMENT (seg2, seg1, p_paddr)))
+ || SEGMENT_AFTER_SEGMENT (seg2, seg1, p_paddr)))
/* Initialise the segment mark field. */
for (section = ibfd->sections; section != NULL; section = section->next)
@@ -5269,7 +5402,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
if (segment2->p_vaddr < segment->p_vaddr)
{
/* Extend SEGMENT2 to include SEGMENT and then delete
- SEGMENT. */
+ SEGMENT. */
extra_length =
SEGMENT_END (segment, segment->p_vaddr)
- SEGMENT_END (segment2, segment2->p_vaddr);
@@ -5290,7 +5423,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
else
{
/* Extend SEGMENT to include SEGMENT2 and then delete
- SEGMENT2. */
+ SEGMENT2. */
extra_length =
SEGMENT_END (segment2, segment2->p_vaddr)
- SEGMENT_END (segment, segment->p_vaddr);
@@ -5319,22 +5452,33 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
bfd_vma suggested_lma;
unsigned int j;
bfd_size_type amt;
+ asection * first_section;
if (segment->p_type == PT_NULL)
continue;
+ first_section = NULL;
/* Compute how many sections might be placed into this segment. */
for (section = ibfd->sections, section_count = 0;
section != NULL;
section = section->next)
- if (INCLUDE_SECTION_IN_SEGMENT (section, segment, bed))
- ++section_count;
+ {
+ /* Find the first section in the input segment, which may be
+ removed from the corresponding output segment. */
+ if (IS_SECTION_IN_INPUT_SEGMENT (section, segment, bed))
+ {
+ if (first_section == NULL)
+ first_section = section;
+ if (section->output_section != NULL)
+ ++section_count;
+ }
+ }
/* Allocate a segment map big enough to contain
all of the sections we have selected. */
amt = sizeof (struct elf_segment_map);
amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
- map = bfd_alloc (obfd, amt);
+ map = bfd_zalloc (obfd, amt);
if (map == NULL)
return FALSE;
@@ -5344,8 +5488,15 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
map->p_type = segment->p_type;
map->p_flags = segment->p_flags;
map->p_flags_valid = 1;
- map->p_paddr = segment->p_paddr;
- map->p_paddr_valid = 1;
+
+ /* If the first section in the input segment is removed, there is
+ no need to preserve segment physical address in the corresponding
+ output segment. */
+ if (!first_section || first_section->output_section != NULL)
+ {
+ map->p_paddr = segment->p_paddr;
+ map->p_paddr_valid = 1;
+ }
/* Determine if this segment contains the ELF file header
and if it contains the program headers themselves. */
@@ -5462,8 +5613,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr)
|| IS_COREFILE_NOTE (segment, section)
|| (bed->want_p_paddr_set_to_zero &&
- IS_CONTAINED_BY_VMA (output_section, segment))
- )
+ IS_CONTAINED_BY_VMA (output_section, segment)))
{
if (matching_lma == 0)
matching_lma = output_section->lma;
@@ -5492,6 +5642,13 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
*pointer_to_map = map;
pointer_to_map = &map->next;
+ if (matching_lma != map->p_paddr
+ && !map->includes_filehdr && !map->includes_phdrs)
+ /* There is some padding before the first section in the
+ segment. So, we must account for that in the output
+ segment's vma. */
+ map->p_vaddr_offset = matching_lma - map->p_paddr;
+
free (sections);
continue;
}
@@ -5675,6 +5832,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd)
#undef IS_CONTAINED_BY_LMA
#undef IS_COREFILE_NOTE
#undef IS_SOLARIS_PT_INTERP
+#undef IS_SECTION_IN_INPUT_SEGMENT
#undef INCLUDE_SECTION_IN_SEGMENT
#undef SEGMENT_AFTER_SEGMENT
#undef SEGMENT_OVERLAPS
@@ -5709,6 +5867,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
unsigned int section_count;
bfd_size_type amt;
Elf_Internal_Shdr *this_hdr;
+ asection *first_section = NULL;
/* FIXME: Do we need to copy PT_NULL segment? */
if (segment->p_type == PT_NULL)
@@ -5721,7 +5880,11 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
{
this_hdr = &(elf_section_data(section)->this_hdr);
if (ELF_IS_SECTION_IN_SEGMENT_FILE (this_hdr, segment))
- section_count++;
+ {
+ if (!first_section)
+ first_section = section;
+ section_count++;
+ }
}
/* Allocate a segment map big enough to contain
@@ -5729,7 +5892,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
amt = sizeof (struct elf_segment_map);
if (section_count != 0)
amt += ((bfd_size_type) section_count - 1) * sizeof (asection *);
- map = bfd_alloc (obfd, amt);
+ map = bfd_zalloc (obfd, amt);
if (map == NULL)
return FALSE;
@@ -5741,6 +5904,9 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
map->p_flags_valid = 1;
map->p_paddr = segment->p_paddr;
map->p_paddr_valid = 1;
+ map->p_align = segment->p_align;
+ map->p_align_valid = 1;
+ map->p_vaddr_offset = 0;
/* Determine if this segment contains the ELF file header
and if it contains the program headers themselves. */
@@ -5760,17 +5926,26 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd)
phdr_included = TRUE;
}
+ if (!map->includes_phdrs && !map->includes_filehdr)
+ /* There is some other padding before the first section. */
+ map->p_vaddr_offset = ((first_section ? first_section->lma : 0)
+ - segment->p_paddr);
+
if (section_count != 0)
{
unsigned int isec = 0;
- for (section = ibfd->sections;
+ for (section = first_section;
section != NULL;
section = section->next)
{
this_hdr = &(elf_section_data(section)->this_hdr);
if (ELF_IS_SECTION_IN_SEGMENT_FILE (this_hdr, segment))
- map->sections[isec++] = section->output_section;
+ {
+ map->sections[isec++] = section->output_section;
+ if (isec == section_count)
+ break;
+ }
}
}
@@ -5798,8 +5973,8 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
if (ibfd->xvec == obfd->xvec)
{
- /* Check if any sections in the input BFD covered by ELF program
- header are changed. */
+ /* Check to see if any sections in the input BFD
+ covered by ELF program header have changed. */
Elf_Internal_Phdr *segment;
asection *section, *osec;
unsigned int i, num_segments;
@@ -5815,6 +5990,15 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
i < num_segments;
i++, segment++)
{
+ /* PR binutils/3535. The Solaris linker always sets the p_paddr
+ and p_memsz fields of special segments (DYNAMIC, INTERP) to 0
+ which severly confuses things, so always regenerate the segment
+ map in this case. */
+ if (segment->p_paddr == 0
+ && segment->p_memsz == 0
+ && (segment->p_type == PT_INTERP || segment->p_type == PT_DYNAMIC))
+ goto rewrite;
+
for (section = ibfd->sections;
section != NULL; section = section->next)
{
@@ -5842,7 +6026,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
}
}
- /* Check to see if any output section doesn't come from the
+ /* Check to see if any output section do not come from the
input BFD. */
for (section = obfd->sections; section != NULL;
section = section->next)
@@ -5877,16 +6061,22 @@ _bfd_elf_init_private_section_data (bfd *ibfd,
|| obfd->xvec->flavour != bfd_target_elf_flavour)
return TRUE;
- /* FIXME: What if the output ELF section type has been set to
- something different? */
- if (elf_section_type (osec) == SHT_NULL)
+ /* Don't copy the output ELF section type from input if the
+ output BFD section flags have been set to something different.
+ elf_fake_sections will set ELF section type based on BFD
+ section flags. */
+ if (elf_section_type (osec) == SHT_NULL
+ && (osec->flags == isec->flags || !osec->flags))
elf_section_type (osec) = elf_section_type (isec);
+ /* FIXME: Is this correct for all OS/PROC specific flags? */
+ elf_section_flags (osec) |= (elf_section_flags (isec)
+ & (SHF_MASKOS | SHF_MASKPROC));
+
/* Set things up for objcopy and relocatable link. The output
SHT_GROUP section will have its elf_next_in_group pointing back
to the input group members. Ignore linker created group section.
See elfNN_ia64_object_p in elfxx-ia64.c. */
-
if (need_group)
{
if (elf_sec_group (isec) == NULL
@@ -5951,6 +6141,8 @@ _bfd_elf_copy_private_section_data (bfd *ibfd,
bfd_boolean
_bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd)
{
+ asection *isec;
+
if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
|| bfd_get_flavour (obfd) != bfd_target_elf_flavour)
return TRUE;
@@ -5966,6 +6158,27 @@ _bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd)
return FALSE;
}
+ /* _bfd_elf_copy_private_section_data copied over the SHF_GROUP flag
+ but this might be wrong if we deleted the group section. */
+ for (isec = ibfd->sections; isec != NULL; isec = isec->next)
+ if (elf_section_type (isec) == SHT_GROUP
+ && isec->output_section == NULL)
+ {
+ asection *first = elf_next_in_group (isec);
+ asection *s = first;
+ while (s != NULL)
+ {
+ if (s->output_section != NULL)
+ {
+ elf_section_flags (s->output_section) &= ~SHF_GROUP;
+ elf_group_name (s->output_section) = NULL;
+ }
+ s = elf_next_in_group (s);
+ if (s == first)
+ break;
+ }
+ }
+
return TRUE;
}
@@ -6238,6 +6451,10 @@ Unable to find equivalent output section for symbol '%s' from section '%s'"),
type = STT_FUNC;
else if ((flags & BSF_OBJECT) != 0)
type = STT_OBJECT;
+ else if ((flags & BSF_RELC) != 0)
+ type = STT_RELC;
+ else if ((flags & BSF_SRELC) != 0)
+ type = STT_SRELC;
else
type = STT_NOTYPE;
@@ -7036,13 +7253,31 @@ _bfd_elf_find_inliner_info (bfd *abfd,
}
int
-_bfd_elf_sizeof_headers (bfd *abfd, bfd_boolean reloc)
+_bfd_elf_sizeof_headers (bfd *abfd, struct bfd_link_info *info)
{
- int ret;
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ int ret = bed->s->sizeof_ehdr;
+
+ if (!info->relocatable)
+ {
+ bfd_size_type phdr_size = elf_tdata (abfd)->program_header_size;
+
+ if (phdr_size == (bfd_size_type) -1)
+ {
+ struct elf_segment_map *m;
+
+ phdr_size = 0;
+ for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ phdr_size += bed->s->sizeof_phdr;
+
+ if (phdr_size == 0)
+ phdr_size = get_program_header_size (abfd, info);
+ }
+
+ elf_tdata (abfd)->program_header_size = phdr_size;
+ ret += phdr_size;
+ }
- ret = get_elf_backend_data (abfd)->s->sizeof_ehdr;
- if (! reloc)
- ret += get_program_header_size (abfd);
return ret;
}
@@ -7178,7 +7413,7 @@ _bfd_elf_close_and_cleanup (bfd *abfd)
{
if (bfd_get_format (abfd) == bfd_object)
{
- if (elf_shstrtab (abfd) != NULL)
+ if (elf_tdata (abfd) != NULL && elf_shstrtab (abfd) != NULL)
_bfd_elf_strtab_free (elf_shstrtab (abfd));
_bfd_dwarf2_cleanup_debug_info (abfd);
}
@@ -7232,13 +7467,12 @@ elfcore_maybe_make_sect (bfd *abfd, char *name, asection *sect)
if (bfd_get_section_by_name (abfd, name) != NULL)
return TRUE;
- sect2 = bfd_make_section (abfd, name);
+ sect2 = bfd_make_section_with_flags (abfd, name, sect->flags);
if (sect2 == NULL)
return FALSE;
sect2->size = sect->size;
sect2->filepos = sect->filepos;
- sect2->flags = sect->flags;
sect2->alignment_power = sect->alignment_power;
return TRUE;
}
@@ -7270,12 +7504,12 @@ _bfd_elfcore_make_pseudosection (bfd *abfd,
return FALSE;
memcpy (threaded_name, buf, len);
- sect = bfd_make_section_anyway (abfd, threaded_name);
+ sect = bfd_make_section_anyway_with_flags (abfd, threaded_name,
+ SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
sect->size = size;
sect->filepos = filepos;
- sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
return elfcore_maybe_make_sect (abfd, name, sect);
@@ -7554,7 +7788,7 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
memcpy (name, buf, len);
- sect = bfd_make_section_anyway (abfd, name);
+ sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
@@ -7569,7 +7803,6 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
sect->filepos = note->descpos + offsetof (lwpstatus_t, pr_reg);
#endif
- sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
if (!elfcore_maybe_make_sect (abfd, ".reg", sect))
@@ -7584,7 +7817,7 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
return FALSE;
memcpy (name, buf, len);
- sect = bfd_make_section_anyway (abfd, name);
+ sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
@@ -7599,7 +7832,6 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note)
sect->filepos = note->descpos + offsetof (lwpstatus_t, pr_fpreg);
#endif
- sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
return elfcore_maybe_make_sect (abfd, ".reg2", sect);
@@ -7640,7 +7872,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
memcpy (name, buf, len);
- sect = bfd_make_section_anyway (abfd, name);
+ sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
@@ -7648,7 +7880,6 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
sect->filepos = (note->descpos
+ offsetof (struct win32_pstatus,
data.thread_info.thread_context));
- sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
if (pstatus.data.thread_info.is_active_thread)
@@ -7668,14 +7899,13 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note)
memcpy (name, buf, len);
- sect = bfd_make_section_anyway (abfd, name);
+ sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
sect->size = note->descsz;
sect->filepos = note->descpos;
- sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
break;
@@ -7745,13 +7975,13 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note)
case NT_AUXV:
{
- asection *sect = bfd_make_section_anyway (abfd, ".auxv");
+ asection *sect = bfd_make_section_anyway_with_flags (abfd, ".auxv",
+ SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
sect->size = note->descsz;
sect->filepos = note->descpos;
- sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32;
return TRUE;
@@ -7776,7 +8006,6 @@ elfcore_netbsd_get_lwpid (Elf_Internal_Note *note, int *lwpidp)
static bfd_boolean
elfcore_grok_netbsd_procinfo (bfd *abfd, Elf_Internal_Note *note)
{
-
/* Signal number at offset 0x08. */
elf_tdata (abfd)->core_signal
= bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + 0x08);
@@ -7804,9 +8033,9 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note)
if (note->type == NT_NETBSDCORE_PROCINFO)
{
/* NetBSD-specific core "procinfo". Note that we expect to
- find this note before any of the others, which is fine,
- since the kernel writes this note out first when it
- creates a core file. */
+ find this note before any of the others, which is fine,
+ since the kernel writes this note out first when it
+ creates a core file. */
return elfcore_grok_netbsd_procinfo (abfd, note);
}
@@ -7822,44 +8051,44 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note)
switch (bfd_get_arch (abfd))
{
- /* On the Alpha, SPARC (32-bit and 64-bit), PT_GETREGS == mach+0 and
- PT_GETFPREGS == mach+2. */
+ /* On the Alpha, SPARC (32-bit and 64-bit), PT_GETREGS == mach+0 and
+ PT_GETFPREGS == mach+2. */
case bfd_arch_alpha:
case bfd_arch_sparc:
switch (note->type)
- {
- case NT_NETBSDCORE_FIRSTMACH+0:
- return elfcore_make_note_pseudosection (abfd, ".reg", note);
+ {
+ case NT_NETBSDCORE_FIRSTMACH+0:
+ return elfcore_make_note_pseudosection (abfd, ".reg", note);
- case NT_NETBSDCORE_FIRSTMACH+2:
- return elfcore_make_note_pseudosection (abfd, ".reg2", note);
+ case NT_NETBSDCORE_FIRSTMACH+2:
+ return elfcore_make_note_pseudosection (abfd, ".reg2", note);
- default:
- return TRUE;
- }
+ default:
+ return TRUE;
+ }
- /* On all other arch's, PT_GETREGS == mach+1 and
- PT_GETFPREGS == mach+3. */
+ /* On all other arch's, PT_GETREGS == mach+1 and
+ PT_GETFPREGS == mach+3. */
default:
switch (note->type)
- {
- case NT_NETBSDCORE_FIRSTMACH+1:
- return elfcore_make_note_pseudosection (abfd, ".reg", note);
+ {
+ case NT_NETBSDCORE_FIRSTMACH+1:
+ return elfcore_make_note_pseudosection (abfd, ".reg", note);
- case NT_NETBSDCORE_FIRSTMACH+3:
- return elfcore_make_note_pseudosection (abfd, ".reg2", note);
+ case NT_NETBSDCORE_FIRSTMACH+3:
+ return elfcore_make_note_pseudosection (abfd, ".reg2", note);
- default:
- return TRUE;
- }
+ default:
+ return TRUE;
+ }
}
/* NOTREACHED */
}
static bfd_boolean
-elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
+elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid)
{
void *ddata = note->descdata;
char buf[100];
@@ -7891,20 +8120,19 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
elf_tdata (abfd)->core_lwpid = *tid;
/* Make a ".qnx_core_status/%d" section. */
- sprintf (buf, ".qnx_core_status/%ld", (long) *tid);
+ sprintf (buf, ".qnx_core_status/%ld", *tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
return FALSE;
strcpy (name, buf);
- sect = bfd_make_section_anyway (abfd, name);
+ sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
sect->size = note->descsz;
sect->filepos = note->descpos;
- sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
return (elfcore_maybe_make_sect (abfd, ".qnx_core_status", sect));
@@ -7913,7 +8141,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, pid_t *tid)
static bfd_boolean
elfcore_grok_nto_regs (bfd *abfd,
Elf_Internal_Note *note,
- pid_t tid,
+ long tid,
char *base)
{
char buf[100];
@@ -7921,20 +8149,19 @@ elfcore_grok_nto_regs (bfd *abfd,
asection *sect;
/* Make a "(base)/%d" section. */
- sprintf (buf, "%s/%ld", base, (long) tid);
+ sprintf (buf, "%s/%ld", base, tid);
name = bfd_alloc (abfd, strlen (buf) + 1);
if (name == NULL)
return FALSE;
strcpy (name, buf);
- sect = bfd_make_section_anyway (abfd, name);
+ sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS);
if (sect == NULL)
return FALSE;
sect->size = note->descsz;
sect->filepos = note->descpos;
- sect->flags = SEC_HAS_CONTENTS;
sect->alignment_power = 2;
/* This is the current thread. */
@@ -7955,7 +8182,7 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note)
/* Every GREG section has a STATUS section before it. Store the
tid from the previous call to pass down to the next gregs
function. */
- static pid_t tid = 1;
+ static long tid = 1;
switch (note->type)
{
@@ -7975,45 +8202,42 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note)
/* Function: elfcore_write_note
Inputs:
- buffer to hold note
+ buffer to hold note, and current size of buffer
name of note
type of note
data for note
size of data for note
+ Writes note to end of buffer. ELF64 notes are written exactly as
+ for ELF32, despite the current (as of 2006) ELF gabi specifying
+ that they ought to have 8-byte namesz and descsz field, and have
+ 8-byte alignment. Other writers, eg. Linux kernel, do the same.
+
Return:
- End of buffer containing note. */
+ Pointer to realloc'd buffer, *BUFSIZ updated. */
char *
-elfcore_write_note (bfd *abfd,
+elfcore_write_note (bfd *abfd,
char *buf,
- int *bufsiz,
+ int *bufsiz,
const char *name,
- int type,
+ int type,
const void *input,
- int size)
+ int size)
{
Elf_External_Note *xnp;
size_t namesz;
- size_t pad;
size_t newspace;
- char *p, *dest;
+ char *dest;
namesz = 0;
- pad = 0;
if (name != NULL)
- {
- const struct elf_backend_data *bed;
-
- namesz = strlen (name) + 1;
- bed = get_elf_backend_data (abfd);
- pad = -namesz & ((1 << bed->s->log_file_align) - 1);
- }
+ namesz = strlen (name) + 1;
- newspace = 12 + namesz + pad + size;
+ newspace = 12 + ((namesz + 3) & -4) + ((size + 3) & -4);
- p = realloc (buf, *bufsiz + newspace);
- dest = p + *bufsiz;
+ buf = realloc (buf, *bufsiz + newspace);
+ dest = buf + *bufsiz;
*bufsiz += newspace;
xnp = (Elf_External_Note *) dest;
H_PUT_32 (abfd, namesz, xnp->namesz);
@@ -8024,14 +8248,20 @@ elfcore_write_note (bfd *abfd,
{
memcpy (dest, name, namesz);
dest += namesz;
- while (pad != 0)
+ while (namesz & 3)
{
*dest++ = '\0';
- --pad;
+ ++namesz;
}
}
memcpy (dest, input, size);
- return p;
+ dest += size;
+ while (size & 3)
+ {
+ *dest++ = '\0';
+ ++size;
+ }
+ return buf;
}
#if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T)
@@ -8042,22 +8272,52 @@ elfcore_write_prpsinfo (bfd *abfd,
const char *fname,
const char *psargs)
{
- int note_type;
- char *note_name = "CORE";
+ const char *note_name = "CORE";
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+
+ if (bed->elf_backend_write_core_note != NULL)
+ {
+ char *ret;
+ ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz,
+ NT_PRPSINFO, fname, psargs);
+ if (ret != NULL)
+ return ret;
+ }
+
+#if defined (HAVE_PRPSINFO32_T) || defined (HAVE_PSINFO32_T)
+ if (bed->s->elfclass == ELFCLASS32)
+ {
+#if defined (HAVE_PSINFO32_T)
+ psinfo32_t data;
+ int note_type = NT_PSINFO;
+#else
+ prpsinfo32_t data;
+ int note_type = NT_PRPSINFO;
+#endif
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, note_type, &data, sizeof (data));
+ }
+ else
+#endif
+ {
#if defined (HAVE_PSINFO_T)
- psinfo_t data;
- note_type = NT_PSINFO;
+ psinfo_t data;
+ int note_type = NT_PSINFO;
#else
- prpsinfo_t data;
- note_type = NT_PRPSINFO;
+ prpsinfo_t data;
+ int note_type = NT_PRPSINFO;
#endif
- memset (&data, 0, sizeof (data));
- strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
- strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
- return elfcore_write_note (abfd, buf, bufsiz,
- note_name, note_type, &data, sizeof (data));
+ memset (&data, 0, sizeof (data));
+ strncpy (data.pr_fname, fname, sizeof (data.pr_fname));
+ strncpy (data.pr_psargs, psargs, sizeof (data.pr_psargs));
+ return elfcore_write_note (abfd, buf, bufsiz,
+ note_name, note_type, &data, sizeof (data));
+ }
}
#endif /* PSINFO_T or PRPSINFO_T */
@@ -8070,15 +8330,43 @@ elfcore_write_prstatus (bfd *abfd,
int cursig,
const void *gregs)
{
- prstatus_t prstat;
- char *note_name = "CORE";
+ const char *note_name = "CORE";
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- memset (&prstat, 0, sizeof (prstat));
- prstat.pr_pid = pid;
- prstat.pr_cursig = cursig;
- memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
- return elfcore_write_note (abfd, buf, bufsiz,
- note_name, NT_PRSTATUS, &prstat, sizeof (prstat));
+ if (bed->elf_backend_write_core_note != NULL)
+ {
+ char *ret;
+ ret = (*bed->elf_backend_write_core_note) (abfd, buf, bufsiz,
+ NT_PRSTATUS,
+ pid, cursig, gregs);
+ if (ret != NULL)
+ return ret;
+ }
+
+#if defined (HAVE_PRSTATUS32_T)
+ if (bed->s->elfclass == ELFCLASS32)
+ {
+ prstatus32_t prstat;
+
+ memset (&prstat, 0, sizeof (prstat));
+ prstat.pr_pid = pid;
+ prstat.pr_cursig = cursig;
+ memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
+ return elfcore_write_note (abfd, buf, bufsiz, note_name,
+ NT_PRSTATUS, &prstat, sizeof (prstat));
+ }
+ else
+#endif
+ {
+ prstatus_t prstat;
+
+ memset (&prstat, 0, sizeof (prstat));
+ prstat.pr_pid = pid;
+ prstat.pr_cursig = cursig;
+ memcpy (&prstat.pr_reg, gregs, sizeof (prstat.pr_reg));
+ return elfcore_write_note (abfd, buf, bufsiz, note_name,
+ NT_PRSTATUS, &prstat, sizeof (prstat));
+ }
}
#endif /* HAVE_PRSTATUS_T */
@@ -8092,7 +8380,7 @@ elfcore_write_lwpstatus (bfd *abfd,
const void *gregs)
{
lwpstatus_t lwpstat;
- char *note_name = "CORE";
+ const char *note_name = "CORE";
memset (&lwpstat, 0, sizeof (lwpstat));
lwpstat.pr_lwpid = pid >> 16;
@@ -8122,14 +8410,31 @@ elfcore_write_pstatus (bfd *abfd,
int cursig ATTRIBUTE_UNUSED,
const void *gregs ATTRIBUTE_UNUSED)
{
- pstatus_t pstat;
- char *note_name = "CORE";
+ const char *note_name = "CORE";
+#if defined (HAVE_PSTATUS32_T)
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
- memset (&pstat, 0, sizeof (pstat));
- pstat.pr_pid = pid & 0xffff;
- buf = elfcore_write_note (abfd, buf, bufsiz, note_name,
- NT_PSTATUS, &pstat, sizeof (pstat));
- return buf;
+ if (bed->s->elfclass == ELFCLASS32)
+ {
+ pstatus32_t pstat;
+
+ memset (&pstat, 0, sizeof (pstat));
+ pstat.pr_pid = pid & 0xffff;
+ buf = elfcore_write_note (abfd, buf, bufsiz, note_name,
+ NT_PSTATUS, &pstat, sizeof (pstat));
+ return buf;
+ }
+ else
+#endif
+ {
+ pstatus_t pstat;
+
+ memset (&pstat, 0, sizeof (pstat));
+ pstat.pr_pid = pid & 0xffff;
+ buf = elfcore_write_note (abfd, buf, bufsiz, note_name,
+ NT_PSTATUS, &pstat, sizeof (pstat));
+ return buf;
+ }
}
#endif /* HAVE_PSTATUS_T */
@@ -8140,7 +8445,7 @@ elfcore_write_prfpreg (bfd *abfd,
const void *fpregs,
int size)
{
- char *note_name = "CORE";
+ const char *note_name = "CORE";
return elfcore_write_note (abfd, buf, bufsiz,
note_name, NT_FPREGSET, fpregs, size);
}
@@ -8196,21 +8501,21 @@ elfcore_read_notes (bfd *abfd, file_ptr offset, bfd_size_type size)
in.descdata = in.namedata + BFD_ALIGN (in.namesz, 4);
in.descpos = offset + (in.descdata - buf);
- if (strncmp (in.namedata, "NetBSD-CORE", 11) == 0)
- {
- if (! elfcore_grok_netbsd_note (abfd, &in))
- goto error;
- }
- else if (strncmp (in.namedata, "QNX", 3) == 0)
+ if (CONST_STRNEQ (in.namedata, "NetBSD-CORE"))
+ {
+ if (! elfcore_grok_netbsd_note (abfd, &in))
+ goto error;
+ }
+ else if (CONST_STRNEQ (in.namedata, "QNX"))
{
if (! elfcore_grok_nto_note (abfd, &in))
goto error;
}
else
- {
- if (! elfcore_grok_note (abfd, &in))
- goto error;
- }
+ {
+ if (! elfcore_grok_note (abfd, &in))
+ goto error;
+ }
p = in.descdata + BFD_ALIGN (in.descsz, 4);
}
@@ -8516,39 +8821,41 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd,
return n;
}
-/* Sort symbol by binding and section. We want to put definitions
- sorted by section at the beginning. */
-
-static int
-elf_sort_elf_symbol (const void *arg1, const void *arg2)
+struct elf_symbuf_symbol
{
- const Elf_Internal_Sym *s1;
- const Elf_Internal_Sym *s2;
- int shndx;
-
- /* Make sure that undefined symbols are at the end. */
- s1 = (const Elf_Internal_Sym *) arg1;
- if (s1->st_shndx == SHN_UNDEF)
- return 1;
- s2 = (const Elf_Internal_Sym *) arg2;
- if (s2->st_shndx == SHN_UNDEF)
- return -1;
-
- /* Sorted by section index. */
- shndx = s1->st_shndx - s2->st_shndx;
- if (shndx != 0)
- return shndx;
+ 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 */
+};
- /* Sorted by binding. */
- return ELF_ST_BIND (s1->st_info) - ELF_ST_BIND (s2->st_info);
-}
+struct elf_symbuf_head
+{
+ struct elf_symbuf_symbol *ssym;
+ bfd_size_type count;
+ unsigned int st_shndx;
+};
struct elf_symbol
{
- Elf_Internal_Sym *sym;
+ union
+ {
+ Elf_Internal_Sym *isym;
+ struct elf_symbuf_symbol *ssym;
+ } u;
const char *name;
};
+/* Sort references to symbols by ascending section number. */
+
+static int
+elf_sort_elf_symbol (const void *arg1, const void *arg2)
+{
+ const Elf_Internal_Sym *s1 = *(const Elf_Internal_Sym **) arg1;
+ const Elf_Internal_Sym *s2 = *(const Elf_Internal_Sym **) arg2;
+
+ return s1->st_shndx - s2->st_shndx;
+}
+
static int
elf_sym_name_compare (const void *arg1, const void *arg2)
{
@@ -8557,20 +8864,79 @@ elf_sym_name_compare (const void *arg1, const void *arg2)
return strcmp (s1->name, s2->name);
}
+static struct elf_symbuf_head *
+elf_create_symbuf (bfd_size_type symcount, Elf_Internal_Sym *isymbuf)
+{
+ Elf_Internal_Sym **ind, **indbufend, **indbuf
+ = bfd_malloc2 (symcount, sizeof (*indbuf));
+ struct elf_symbuf_symbol *ssym;
+ struct elf_symbuf_head *ssymbuf, *ssymhead;
+ bfd_size_type i, shndx_count;
+
+ if (indbuf == NULL)
+ return NULL;
+
+ for (ind = indbuf, i = 0; i < symcount; i++)
+ if (isymbuf[i].st_shndx != SHN_UNDEF)
+ *ind++ = &isymbuf[i];
+ indbufend = ind;
+
+ qsort (indbuf, indbufend - indbuf, sizeof (Elf_Internal_Sym *),
+ elf_sort_elf_symbol);
+
+ shndx_count = 0;
+ if (indbufend > indbuf)
+ for (ind = indbuf, shndx_count++; ind < indbufend - 1; ind++)
+ if (ind[0]->st_shndx != ind[1]->st_shndx)
+ shndx_count++;
+
+ ssymbuf = bfd_malloc ((shndx_count + 1) * sizeof (*ssymbuf)
+ + (indbufend - indbuf) * sizeof (*ssymbuf));
+ if (ssymbuf == NULL)
+ {
+ free (indbuf);
+ return NULL;
+ }
+
+ ssym = (struct elf_symbuf_symbol *) (ssymbuf + shndx_count);
+ ssymbuf->ssym = NULL;
+ ssymbuf->count = shndx_count;
+ ssymbuf->st_shndx = 0;
+ for (ssymhead = ssymbuf, ind = indbuf; ind < indbufend; ssym++, ind++)
+ {
+ if (ind == indbuf || ssymhead->st_shndx != (*ind)->st_shndx)
+ {
+ ssymhead++;
+ ssymhead->ssym = ssym;
+ ssymhead->count = 0;
+ ssymhead->st_shndx = (*ind)->st_shndx;
+ }
+ ssym->st_name = (*ind)->st_name;
+ ssym->st_info = (*ind)->st_info;
+ ssym->st_other = (*ind)->st_other;
+ ssymhead->count++;
+ }
+ BFD_ASSERT ((bfd_size_type) (ssymhead - ssymbuf) == shndx_count);
+
+ free (indbuf);
+ return ssymbuf;
+}
+
/* Check if 2 sections define the same set of local and global
symbols. */
bfd_boolean
-bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2)
+bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2,
+ struct bfd_link_info *info)
{
bfd *bfd1, *bfd2;
const struct elf_backend_data *bed1, *bed2;
Elf_Internal_Shdr *hdr1, *hdr2;
bfd_size_type symcount1, symcount2;
Elf_Internal_Sym *isymbuf1, *isymbuf2;
- Elf_Internal_Sym *isymstart1 = NULL, *isymstart2 = NULL, *isym;
- Elf_Internal_Sym *isymend;
- struct elf_symbol *symp, *symtable1 = NULL, *symtable2 = NULL;
+ struct elf_symbuf_head *ssymbuf1, *ssymbuf2;
+ Elf_Internal_Sym *isym, *isymend;
+ struct elf_symbol *symtable1 = NULL, *symtable2 = NULL;
bfd_size_type count1, count2, i;
int shndx1, shndx2;
bfd_boolean result;
@@ -8580,10 +8946,8 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2)
/* If both are .gnu.linkonce sections, they have to have the same
section name. */
- if (strncmp (sec1->name, ".gnu.linkonce",
- sizeof ".gnu.linkonce" - 1) == 0
- && strncmp (sec2->name, ".gnu.linkonce",
- sizeof ".gnu.linkonce" - 1) == 0)
+ if (CONST_STRNEQ (sec1->name, ".gnu.linkonce")
+ && CONST_STRNEQ (sec2->name, ".gnu.linkonce"))
return strcmp (sec1->name + sizeof ".gnu.linkonce",
sec2->name + sizeof ".gnu.linkonce") == 0;
@@ -8619,84 +8983,155 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2)
if (symcount1 == 0 || symcount2 == 0)
return FALSE;
- isymbuf1 = bfd_elf_get_elf_syms (bfd1, hdr1, symcount1, 0,
- NULL, NULL, NULL);
- isymbuf2 = bfd_elf_get_elf_syms (bfd2, hdr2, symcount2, 0,
- NULL, NULL, NULL);
-
result = FALSE;
- if (isymbuf1 == NULL || isymbuf2 == NULL)
- goto done;
+ isymbuf1 = NULL;
+ isymbuf2 = NULL;
+ ssymbuf1 = elf_tdata (bfd1)->symbuf;
+ ssymbuf2 = elf_tdata (bfd2)->symbuf;
- /* Sort symbols by binding and section. Global definitions are at
- the beginning. */
- qsort (isymbuf1, symcount1, sizeof (Elf_Internal_Sym),
- elf_sort_elf_symbol);
- qsort (isymbuf2, symcount2, sizeof (Elf_Internal_Sym),
- elf_sort_elf_symbol);
+ if (ssymbuf1 == NULL)
+ {
+ isymbuf1 = bfd_elf_get_elf_syms (bfd1, hdr1, symcount1, 0,
+ NULL, NULL, NULL);
+ if (isymbuf1 == NULL)
+ goto done;
- /* Count definitions in the section. */
- count1 = 0;
- for (isym = isymbuf1, isymend = isym + symcount1;
- isym < isymend; isym++)
+ if (!info->reduce_memory_overheads)
+ elf_tdata (bfd1)->symbuf = ssymbuf1
+ = elf_create_symbuf (symcount1, isymbuf1);
+ }
+
+ if (ssymbuf1 == NULL || ssymbuf2 == NULL)
{
- if (isym->st_shndx == (unsigned int) shndx1)
- {
- if (count1 == 0)
- isymstart1 = isym;
- count1++;
- }
+ isymbuf2 = bfd_elf_get_elf_syms (bfd2, hdr2, symcount2, 0,
+ NULL, NULL, NULL);
+ if (isymbuf2 == NULL)
+ goto done;
- if (count1 && isym->st_shndx != (unsigned int) shndx1)
- break;
+ if (ssymbuf1 != NULL && !info->reduce_memory_overheads)
+ elf_tdata (bfd2)->symbuf = ssymbuf2
+ = elf_create_symbuf (symcount2, isymbuf2);
}
- count2 = 0;
- for (isym = isymbuf2, isymend = isym + symcount2;
- isym < isymend; isym++)
+ if (ssymbuf1 != NULL && ssymbuf2 != NULL)
{
- if (isym->st_shndx == (unsigned int) shndx2)
+ /* Optimized faster version. */
+ bfd_size_type lo, hi, mid;
+ struct elf_symbol *symp;
+ struct elf_symbuf_symbol *ssym, *ssymend;
+
+ lo = 0;
+ hi = ssymbuf1->count;
+ ssymbuf1++;
+ count1 = 0;
+ while (lo < hi)
{
- if (count2 == 0)
- isymstart2 = isym;
- count2++;
+ mid = (lo + hi) / 2;
+ if ((unsigned int) shndx1 < ssymbuf1[mid].st_shndx)
+ hi = mid;
+ else if ((unsigned int) shndx1 > ssymbuf1[mid].st_shndx)
+ lo = mid + 1;
+ else
+ {
+ count1 = ssymbuf1[mid].count;
+ ssymbuf1 += mid;
+ break;
+ }
}
- if (count2 && isym->st_shndx != (unsigned int) shndx2)
- break;
+ lo = 0;
+ hi = ssymbuf2->count;
+ ssymbuf2++;
+ count2 = 0;
+ while (lo < hi)
+ {
+ mid = (lo + hi) / 2;
+ if ((unsigned int) shndx2 < ssymbuf2[mid].st_shndx)
+ hi = mid;
+ else if ((unsigned int) shndx2 > ssymbuf2[mid].st_shndx)
+ lo = mid + 1;
+ else
+ {
+ count2 = ssymbuf2[mid].count;
+ ssymbuf2 += mid;
+ break;
+ }
+ }
+
+ if (count1 == 0 || count2 == 0 || count1 != count2)
+ goto done;
+
+ symtable1 = bfd_malloc (count1 * sizeof (struct elf_symbol));
+ symtable2 = bfd_malloc (count2 * sizeof (struct elf_symbol));
+ if (symtable1 == NULL || symtable2 == NULL)
+ goto done;
+
+ symp = symtable1;
+ for (ssym = ssymbuf1->ssym, ssymend = ssym + count1;
+ ssym < ssymend; ssym++, symp++)
+ {
+ symp->u.ssym = ssym;
+ symp->name = bfd_elf_string_from_elf_section (bfd1,
+ hdr1->sh_link,
+ ssym->st_name);
+ }
+
+ symp = symtable2;
+ for (ssym = ssymbuf2->ssym, ssymend = ssym + count2;
+ ssym < ssymend; ssym++, symp++)
+ {
+ symp->u.ssym = ssym;
+ symp->name = bfd_elf_string_from_elf_section (bfd2,
+ hdr2->sh_link,
+ ssym->st_name);
+ }
+
+ /* Sort symbol by name. */
+ qsort (symtable1, count1, sizeof (struct elf_symbol),
+ elf_sym_name_compare);
+ qsort (symtable2, count1, sizeof (struct elf_symbol),
+ elf_sym_name_compare);
+
+ for (i = 0; i < count1; i++)
+ /* Two symbols must have the same binding, type and name. */
+ if (symtable1 [i].u.ssym->st_info != symtable2 [i].u.ssym->st_info
+ || symtable1 [i].u.ssym->st_other != symtable2 [i].u.ssym->st_other
+ || strcmp (symtable1 [i].name, symtable2 [i].name) != 0)
+ goto done;
+
+ result = TRUE;
+ goto done;
}
- if (count1 == 0 || count2 == 0 || count1 != count2)
+ symtable1 = bfd_malloc (symcount1 * sizeof (struct elf_symbol));
+ symtable2 = bfd_malloc (symcount2 * sizeof (struct elf_symbol));
+ if (symtable1 == NULL || symtable2 == NULL)
goto done;
- symtable1 = bfd_malloc (count1 * sizeof (struct elf_symbol));
- symtable2 = bfd_malloc (count1 * sizeof (struct elf_symbol));
+ /* Count definitions in the section. */
+ count1 = 0;
+ for (isym = isymbuf1, isymend = isym + symcount1; isym < isymend; isym++)
+ if (isym->st_shndx == (unsigned int) shndx1)
+ symtable1[count1++].u.isym = isym;
- if (symtable1 == NULL || symtable2 == NULL)
+ count2 = 0;
+ for (isym = isymbuf2, isymend = isym + symcount2; isym < isymend; isym++)
+ if (isym->st_shndx == (unsigned int) shndx2)
+ symtable2[count2++].u.isym = isym;
+
+ if (count1 == 0 || count2 == 0 || count1 != count2)
goto done;
- symp = symtable1;
- for (isym = isymstart1, isymend = isym + count1;
- isym < isymend; isym++)
- {
- symp->sym = isym;
- symp->name = bfd_elf_string_from_elf_section (bfd1,
- hdr1->sh_link,
- isym->st_name);
- symp++;
- }
-
- symp = symtable2;
- for (isym = isymstart2, isymend = isym + count1;
- isym < isymend; isym++)
- {
- symp->sym = isym;
- symp->name = bfd_elf_string_from_elf_section (bfd2,
- hdr2->sh_link,
- isym->st_name);
- symp++;
- }
-
+ for (i = 0; i < count1; i++)
+ symtable1[i].name
+ = bfd_elf_string_from_elf_section (bfd1, hdr1->sh_link,
+ symtable1[i].u.isym->st_name);
+
+ for (i = 0; i < count2; i++)
+ symtable2[i].name
+ = bfd_elf_string_from_elf_section (bfd2, hdr2->sh_link,
+ symtable2[i].u.isym->st_name);
+
/* Sort symbol by name. */
qsort (symtable1, count1, sizeof (struct elf_symbol),
elf_sym_name_compare);
@@ -8705,8 +9140,8 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2)
for (i = 0; i < count1; i++)
/* Two symbols must have the same binding, type and name. */
- if (symtable1 [i].sym->st_info != symtable2 [i].sym->st_info
- || symtable1 [i].sym->st_other != symtable2 [i].sym->st_other
+ if (symtable1 [i].u.isym->st_info != symtable2 [i].u.isym->st_info
+ || symtable1 [i].u.isym->st_other != symtable2 [i].u.isym->st_other
|| strcmp (symtable1 [i].name, symtable2 [i].name) != 0)
goto done;
@@ -8728,8 +9163,7 @@ done:
/* It is only used by x86-64 so far. */
asection _bfd_elf_large_com_section
= BFD_FAKE_SECTION (_bfd_elf_large_com_section,
- SEC_IS_COMMON, NULL, NULL, "LARGE_COMMON",
- 0);
+ SEC_IS_COMMON, NULL, "LARGE_COMMON", 0);
/* Return TRUE if 2 section types are compatible. */
@@ -8745,3 +9179,25 @@ _bfd_elf_match_sections_by_type (bfd *abfd, const asection *asec,
return elf_section_type (asec) == elf_section_type (bsec);
}
+
+void
+_bfd_elf_set_osabi (bfd * abfd,
+ struct bfd_link_info * link_info ATTRIBUTE_UNUSED)
+{
+ Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */
+
+ i_ehdrp = elf_elfheader (abfd);
+
+ i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
+}
+
+
+/* Return TRUE for ELF symbol types that represent functions.
+ This is the default version of this function, which is sufficient for
+ most targets. It returns true if TYPE is STT_FUNC. */
+
+bfd_boolean
+_bfd_elf_is_function_type (unsigned int type)
+{
+ return (type == STT_FUNC);
+}
diff --git a/contrib/binutils/bfd/elf32-arc.c b/contrib/binutils/bfd/elf32-arc.c
index a6011bd..58d6301 100644
--- a/contrib/binutils/bfd/elf32-arc.c
+++ b/contrib/binutils/bfd/elf32-arc.c
@@ -1,5 +1,5 @@
/* ARC-specific support for 32-bit ELF
- Copyright 1994, 1995, 1997, 1999, 2001, 2002, 2005
+ Copyright 1994, 1995, 1997, 1999, 2001, 2002, 2005, 2007
Free Software Foundation, Inc.
Contributed by Doug Evans (dje@cygnus.com).
@@ -20,8 +20,8 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/arc.h"
@@ -147,6 +147,22 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return NULL;
}
+static reloc_howto_type *
+bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (elf_arc_howto_table) / sizeof (elf_arc_howto_table[0]);
+ i++)
+ if (elf_arc_howto_table[i].name != NULL
+ && strcasecmp (elf_arc_howto_table[i].name, r_name) == 0)
+ return &elf_arc_howto_table[i];
+
+ return NULL;
+}
+
/* Set the howto pointer for an ARC ELF reloc. */
static void
diff --git a/contrib/binutils/bfd/elf32-arm.c b/contrib/binutils/bfd/elf32-arm.c
index 4c65de1..8e1caa8 100644
--- a/contrib/binutils/bfd/elf32-arm.c
+++ b/contrib/binutils/bfd/elf32-arm.c
@@ -1,5 +1,5 @@
/* 32-bit ELF support for ARM
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -66,7 +66,7 @@
#define ARM_ELF_OS_ABI_VERSION ELFOSABI_ARM
#endif
-static const struct elf_backend_data elf32_arm_vxworks_bed;
+static struct elf_backend_data elf32_arm_vxworks_bed;
/* 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
@@ -134,19 +134,19 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
TRUE), /* pcrel_offset */
/* 8 bit absolute - R_ARM_LDR_PC_G0 in AAELF */
- HOWTO (R_ARM_PC13, /* type */
+ HOWTO (R_ARM_LDR_PC_G0, /* type */
0, /* rightshift */
0, /* size (0 = byte, 1 = short, 2 = long) */
- 8, /* bitsize */
- FALSE, /* pc_relative */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_bitfield,/* complain_on_overflow */
+ complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
- "R_ARM_PC13", /* name */
+ "R_ARM_LDR_PC_G0", /* name */
FALSE, /* partial_inplace */
- 0x000000ff, /* src_mask */
- 0x000000ff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
/* 16 bit absolute */
HOWTO (R_ARM_ABS16, /* type */
@@ -221,11 +221,10 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
- /* FIXME: Has two more bits of offset in Thumb32. */
HOWTO (R_ARM_THM_CALL, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 23, /* bitsize */
+ 25, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
@@ -839,12 +838,12 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
13, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
+ complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_ALU_PREL_11_0",/* name */
FALSE, /* partial_inplace */
- 0x040070ff, /* src_mask */
- 0x040070ff, /* dst_mask */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_THM_PC12, /* type */
@@ -853,12 +852,12 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
13, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
- complain_overflow_signed,/* complain_on_overflow */
+ complain_overflow_dont,/* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARM_THM_PC12", /* name */
FALSE, /* partial_inplace */
- 0x040070ff, /* src_mask */
- 0x040070ff, /* dst_mask */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
TRUE), /* pcrel_offset */
HOWTO (R_ARM_ABS32_NOI, /* type */
@@ -888,13 +887,389 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
FALSE), /* pcrel_offset */
-};
-/* Relocations 57 .. 83 are the "group relocations" which we do not
- support. */
+ /* Group relocations. */
+
+ HOWTO (R_ARM_ALU_PC_G0_NC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_PC_G0_NC", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_PC_G0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_PC_G0", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_PC_G1_NC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_PC_G1_NC", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_PC_G1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_PC_G1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_PC_G2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_PC_G2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDR_PC_G1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDR_PC_G1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDR_PC_G2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDR_PC_G2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDRS_PC_G0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDRS_PC_G0", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDRS_PC_G1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDRS_PC_G1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDRS_PC_G2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDRS_PC_G2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDC_PC_G0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDC_PC_G0", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDC_PC_G1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDC_PC_G1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDC_PC_G2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDC_PC_G2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SB_G0_NC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SB_G0_NC", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SB_G0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SB_G0", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SB_G1_NC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SB_G1_NC", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SB_G1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SB_G1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_ALU_SB_G2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_ALU_SB_G2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDR_SB_G0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDR_SB_G0", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDR_SB_G1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDR_SB_G1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDR_SB_G2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDR_SB_G2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDRS_SB_G0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDRS_SB_G0", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDRS_SB_G1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDRS_SB_G1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDRS_SB_G2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDRS_SB_G2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDC_SB_G0, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDC_SB_G0", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDC_SB_G1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDC_SB_G1", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_ARM_LDC_SB_G2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_ARM_LDC_SB_G2", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* End of group relocations. */
-static reloc_howto_type elf32_arm_howto_table_2[] =
-{
HOWTO (R_ARM_MOVW_BREL_NC, /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
@@ -1234,7 +1609,7 @@ static reloc_howto_type elf32_arm_howto_table_2[] =
249-255 extended, currently unused, relocations: */
-static reloc_howto_type elf32_arm_howto_table_3[4] =
+static reloc_howto_type elf32_arm_howto_table_2[4] =
{
HOWTO (R_ARM_RREL32, /* type */
0, /* rightshift */
@@ -1299,13 +1674,9 @@ elf32_arm_howto_from_type (unsigned int r_type)
if (r_type < NUM_ELEM (elf32_arm_howto_table_1))
return &elf32_arm_howto_table_1[r_type];
- if (r_type >= R_ARM_MOVW_BREL_NC
- && r_type < R_ARM_MOVW_BREL_NC + NUM_ELEM (elf32_arm_howto_table_2))
- return &elf32_arm_howto_table_2[r_type - R_ARM_MOVW_BREL_NC];
-
if (r_type >= R_ARM_RREL32
&& r_type < R_ARM_RREL32 + NUM_ELEM (elf32_arm_howto_table_2))
- return &elf32_arm_howto_table_3[r_type - R_ARM_RREL32];
+ return &elf32_arm_howto_table_2[r_type - R_ARM_RREL32];
return NULL;
}
@@ -1370,6 +1741,42 @@ static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
{BFD_RELOC_ARM_TLS_LE32, R_ARM_TLS_LE32},
{BFD_RELOC_VTABLE_INHERIT, R_ARM_GNU_VTINHERIT},
{BFD_RELOC_VTABLE_ENTRY, R_ARM_GNU_VTENTRY},
+ {BFD_RELOC_ARM_MOVW, R_ARM_MOVW_ABS_NC},
+ {BFD_RELOC_ARM_MOVT, R_ARM_MOVT_ABS},
+ {BFD_RELOC_ARM_MOVW_PCREL, R_ARM_MOVW_PREL_NC},
+ {BFD_RELOC_ARM_MOVT_PCREL, R_ARM_MOVT_PREL},
+ {BFD_RELOC_ARM_THUMB_MOVW, R_ARM_THM_MOVW_ABS_NC},
+ {BFD_RELOC_ARM_THUMB_MOVT, R_ARM_THM_MOVT_ABS},
+ {BFD_RELOC_ARM_THUMB_MOVW_PCREL, R_ARM_THM_MOVW_PREL_NC},
+ {BFD_RELOC_ARM_THUMB_MOVT_PCREL, R_ARM_THM_MOVT_PREL},
+ {BFD_RELOC_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G0_NC},
+ {BFD_RELOC_ARM_ALU_PC_G0, R_ARM_ALU_PC_G0},
+ {BFD_RELOC_ARM_ALU_PC_G1_NC, R_ARM_ALU_PC_G1_NC},
+ {BFD_RELOC_ARM_ALU_PC_G1, R_ARM_ALU_PC_G1},
+ {BFD_RELOC_ARM_ALU_PC_G2, R_ARM_ALU_PC_G2},
+ {BFD_RELOC_ARM_LDR_PC_G0, R_ARM_LDR_PC_G0},
+ {BFD_RELOC_ARM_LDR_PC_G1, R_ARM_LDR_PC_G1},
+ {BFD_RELOC_ARM_LDR_PC_G2, R_ARM_LDR_PC_G2},
+ {BFD_RELOC_ARM_LDRS_PC_G0, R_ARM_LDRS_PC_G0},
+ {BFD_RELOC_ARM_LDRS_PC_G1, R_ARM_LDRS_PC_G1},
+ {BFD_RELOC_ARM_LDRS_PC_G2, R_ARM_LDRS_PC_G2},
+ {BFD_RELOC_ARM_LDC_PC_G0, R_ARM_LDC_PC_G0},
+ {BFD_RELOC_ARM_LDC_PC_G1, R_ARM_LDC_PC_G1},
+ {BFD_RELOC_ARM_LDC_PC_G2, R_ARM_LDC_PC_G2},
+ {BFD_RELOC_ARM_ALU_SB_G0_NC, R_ARM_ALU_SB_G0_NC},
+ {BFD_RELOC_ARM_ALU_SB_G0, R_ARM_ALU_SB_G0},
+ {BFD_RELOC_ARM_ALU_SB_G1_NC, R_ARM_ALU_SB_G1_NC},
+ {BFD_RELOC_ARM_ALU_SB_G1, R_ARM_ALU_SB_G1},
+ {BFD_RELOC_ARM_ALU_SB_G2, R_ARM_ALU_SB_G2},
+ {BFD_RELOC_ARM_LDR_SB_G0, R_ARM_LDR_SB_G0},
+ {BFD_RELOC_ARM_LDR_SB_G1, R_ARM_LDR_SB_G1},
+ {BFD_RELOC_ARM_LDR_SB_G2, R_ARM_LDR_SB_G2},
+ {BFD_RELOC_ARM_LDRS_SB_G0, R_ARM_LDRS_SB_G0},
+ {BFD_RELOC_ARM_LDRS_SB_G1, R_ARM_LDRS_SB_G1},
+ {BFD_RELOC_ARM_LDRS_SB_G2, R_ARM_LDRS_SB_G2},
+ {BFD_RELOC_ARM_LDC_SB_G0, R_ARM_LDC_SB_G0},
+ {BFD_RELOC_ARM_LDC_SB_G1, R_ARM_LDC_SB_G1},
+ {BFD_RELOC_ARM_LDC_SB_G2, R_ARM_LDC_SB_G2}
};
static reloc_howto_type *
@@ -1384,6 +1791,31 @@ elf32_arm_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return NULL;
}
+static reloc_howto_type *
+elf32_arm_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (elf32_arm_howto_table_1)
+ / sizeof (elf32_arm_howto_table_1[0]));
+ i++)
+ if (elf32_arm_howto_table_1[i].name != NULL
+ && strcasecmp (elf32_arm_howto_table_1[i].name, r_name) == 0)
+ return &elf32_arm_howto_table_1[i];
+
+ for (i = 0;
+ i < (sizeof (elf32_arm_howto_table_2)
+ / sizeof (elf32_arm_howto_table_2[0]));
+ i++)
+ if (elf32_arm_howto_table_2[i].name != NULL
+ && strcasecmp (elf32_arm_howto_table_2[i].name, r_name) == 0)
+ return &elf32_arm_howto_table_2[i];
+
+ return NULL;
+}
+
/* Support for core dump NOTE sections */
static bfd_boolean
elf32_arm_nabi_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
@@ -1485,6 +1917,9 @@ typedef unsigned short int insn16;
#define ARM2THUMB_GLUE_SECTION_NAME ".glue_7"
#define ARM2THUMB_GLUE_ENTRY_NAME "__%s_from_arm"
+#define VFP11_ERRATUM_VENEER_SECTION_NAME ".vfp11_veneer"
+#define VFP11_ERRATUM_VENEER_ENTRY_NAME "__vfp11_veneer_%x"
+
/* The name of the dynamic interpreter. This is put in the .interp
section. */
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
@@ -1597,11 +2032,46 @@ typedef struct elf32_elf_section_map
}
elf32_arm_section_map;
+/* Information about a VFP11 erratum veneer, or a branch to such a veneer. */
+
+typedef enum
+{
+ VFP11_ERRATUM_BRANCH_TO_ARM_VENEER,
+ VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER,
+ VFP11_ERRATUM_ARM_VENEER,
+ VFP11_ERRATUM_THUMB_VENEER
+}
+elf32_vfp11_erratum_type;
+
+typedef struct elf32_vfp11_erratum_list
+{
+ struct elf32_vfp11_erratum_list *next;
+ bfd_vma vma;
+ union
+ {
+ struct
+ {
+ struct elf32_vfp11_erratum_list *veneer;
+ unsigned int vfp_insn;
+ } b;
+ struct
+ {
+ struct elf32_vfp11_erratum_list *branch;
+ unsigned int id;
+ } v;
+ } u;
+ elf32_vfp11_erratum_type type;
+}
+elf32_vfp11_erratum_list;
+
typedef struct _arm_elf_section_data
{
struct bfd_elf_section_data elf;
unsigned int mapcount;
+ unsigned int mapsize;
elf32_arm_section_map *map;
+ unsigned int erratumcount;
+ elf32_vfp11_erratum_list *erratumlist;
}
_arm_elf_section_data;
@@ -1611,22 +2081,6 @@ _arm_elf_section_data;
/* The size of the thread control block. */
#define TCB_SIZE 8
-#define NUM_KNOWN_ATTRIBUTES 32
-
-typedef struct aeabi_attribute
-{
- int type;
- unsigned int i;
- char *s;
-} aeabi_attribute;
-
-typedef struct aeabi_attribute_list
-{
- struct aeabi_attribute_list *next;
- int tag;
- aeabi_attribute attr;
-} aeabi_attribute_list;
-
struct elf32_arm_obj_tdata
{
struct elf_obj_tdata root;
@@ -1634,8 +2088,8 @@ struct elf32_arm_obj_tdata
/* tls_type for each local got entry. */
char *local_got_tls_type;
- aeabi_attribute known_eabi_attributes[NUM_KNOWN_ATTRIBUTES];
- aeabi_attribute_list *other_eabi_attributes;
+ /* Zero to warn when linking objects with incompatible enum sizes. */
+ int no_enum_size_warning;
};
#define elf32_arm_tdata(abfd) \
@@ -1647,11 +2101,14 @@ struct elf32_arm_obj_tdata
static bfd_boolean
elf32_arm_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct elf32_arm_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct elf32_arm_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
/* The ARM linker needs to keep track of the number of relocs that it
@@ -1698,6 +2155,10 @@ struct elf32_arm_link_hash_entry
#define GOT_TLS_GD 2
#define GOT_TLS_IE 4
unsigned char tls_type;
+
+ /* The symbol marking the real symbol location for exported thumb
+ symbols with Arm stubs. */
+ struct elf_link_hash_entry *export_glue;
};
/* Traverse an arm ELF linker hash table. */
@@ -1723,6 +2184,10 @@ struct elf32_arm_link_hash_table
/* The size in bytes of the section containing the ARM-to-Thumb glue. */
bfd_size_type arm_glue_size;
+ /* The size in bytes of the section containing glue for VFP11 erratum
+ veneers. */
+ bfd_size_type vfp11_erratum_glue_size;
+
/* An arbitrary input BFD chosen to hold the glue sections. */
bfd * bfd_of_glue_owner;
@@ -1730,7 +2195,7 @@ struct elf32_arm_link_hash_table
int byteswap_code;
/* Zero if R_ARM_TARGET1 means R_ARM_ABS32.
- Nonzero if R_ARM_TARGET1 means R_ARM_ABS32. */
+ Nonzero if R_ARM_TARGET1 means R_ARM_REL32. */
int target1_is_rel;
/* The relocation to use for R_ARM_TARGET2 relocations. */
@@ -1742,6 +2207,16 @@ struct elf32_arm_link_hash_table
/* Nonzero if the ARM/Thumb BLX instructions are available for use. */
int use_blx;
+ /* What sort of code sequences we should look for which may trigger the
+ VFP11 denorm erratum. */
+ bfd_arm_vfp11_fix vfp11_fix;
+
+ /* Global counter for the number of fixes we have emitted. */
+ int num_vfp11_fixes;
+
+ /* Nonzero to force PIC branch veneers. */
+ int pic_veneer;
+
/* The number of bytes in the initial entry in the PLT. */
bfd_size_type plt_header_size;
@@ -1809,6 +2284,7 @@ elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry,
ret->tls_type = GOT_UNKNOWN;
ret->plt_thumb_refcount = 0;
ret->plt_got_offset = -1;
+ ret->export_glue = NULL;
}
return (struct bfd_hash_entry *) ret;
@@ -1822,9 +2298,9 @@ reloc_section_p (struct elf32_arm_link_hash_table *htab,
const char *name, asection *s)
{
if (htab->use_rel)
- return strncmp (name, ".rel", 4) == 0 && strcmp (s->name, name + 4) == 0;
+ return CONST_STRNEQ (name, ".rel") && strcmp (s->name, name + 4) == 0;
else
- return strncmp (name, ".rela", 5) == 0 && strcmp (s->name, name + 5) == 0;
+ return CONST_STRNEQ (name, ".rela") && strcmp (s->name, name + 5) == 0;
}
/* Create .got, .gotplt, and .rel(a).got sections in DYNOBJ, and set up
@@ -1957,15 +2433,17 @@ elf32_arm_copy_indirect_symbol (struct bfd_link_info *info,
eind->relocs_copied = NULL;
}
- /* Copy over PLT info. */
- edir->plt_thumb_refcount += eind->plt_thumb_refcount;
- eind->plt_thumb_refcount = 0;
-
- if (ind->root.type == bfd_link_hash_indirect
- && dir->got.refcount <= 0)
+ if (ind->root.type == bfd_link_hash_indirect)
{
- edir->tls_type = eind->tls_type;
- eind->tls_type = GOT_UNKNOWN;
+ /* Copy over PLT info. */
+ edir->plt_thumb_refcount += eind->plt_thumb_refcount;
+ eind->plt_thumb_refcount = 0;
+
+ if (dir->got.refcount <= 0)
+ {
+ edir->tls_type = eind->tls_type;
+ eind->tls_type = GOT_UNKNOWN;
+ }
}
_bfd_elf_link_hash_copy_indirect (info, dir, ind);
@@ -2001,6 +2479,9 @@ elf32_arm_link_hash_table_create (bfd *abfd)
ret->srelplt2 = NULL;
ret->thumb_glue_size = 0;
ret->arm_glue_size = 0;
+ ret->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
+ ret->vfp11_erratum_glue_size = 0;
+ ret->num_vfp11_fixes = 0;
ret->bfd_of_glue_owner = NULL;
ret->byteswap_code = 0;
ret->target1_is_rel = 0;
@@ -2029,7 +2510,7 @@ elf32_arm_link_hash_table_create (bfd *abfd)
static struct elf_link_hash_entry *
find_thumb_glue (struct bfd_link_info *link_info,
const char *name,
- bfd *input_bfd)
+ char **error_message)
{
char *tmp_name;
struct elf_link_hash_entry *hash;
@@ -2049,9 +2530,8 @@ find_thumb_glue (struct bfd_link_info *link_info,
(&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
if (hash == NULL)
- /* xgettext:c-format */
- (*_bfd_error_handler) (_("%B: unable to find THUMB glue '%s' for `%s'"),
- input_bfd, tmp_name, name);
+ asprintf (error_message, _("unable to find THUMB glue '%s' for '%s'"),
+ tmp_name, name);
free (tmp_name);
@@ -2063,7 +2543,7 @@ find_thumb_glue (struct bfd_link_info *link_info,
static struct elf_link_hash_entry *
find_arm_glue (struct bfd_link_info *link_info,
const char *name,
- bfd *input_bfd)
+ char **error_message)
{
char *tmp_name;
struct elf_link_hash_entry *myh;
@@ -2083,9 +2563,8 @@ find_arm_glue (struct bfd_link_info *link_info,
(&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE);
if (myh == NULL)
- /* xgettext:c-format */
- (*_bfd_error_handler) (_("%B: unable to find ARM glue '%s' for `%s'"),
- input_bfd, tmp_name, name);
+ asprintf (error_message, _("unable to find ARM glue '%s' for '%s'"),
+ tmp_name, name);
free (tmp_name);
@@ -2101,6 +2580,13 @@ find_arm_glue (struct bfd_link_info *link_info,
__func_addr:
.word func @ behave as if you saw a ARM_32 reloc.
+ (v5t static images)
+ .arm
+ __func_from_arm:
+ ldr pc, __func_addr
+ __func_addr:
+ .word func @ behave as if you saw a ARM_32 reloc.
+
(relocatable images)
.arm
__func_from_arm:
@@ -2116,6 +2602,10 @@ static const insn32 a2t1_ldr_insn = 0xe59fc000;
static const insn32 a2t2_bx_r12_insn = 0xe12fff1c;
static const insn32 a2t3_func_addr_insn = 0x00000001;
+#define ARM2THUMB_V5_STATIC_GLUE_SIZE 8
+static const insn32 a2t1v5_ldr_insn = 0xe51ff004;
+static const insn32 a2t2v5_func_addr_insn = 0x00000001;
+
#define ARM2THUMB_PIC_GLUE_SIZE 16
static const insn32 a2t1p_ldr_insn = 0xe59fc004;
static const insn32 a2t2p_add_pc_insn = 0xe08cc00f;
@@ -2142,6 +2632,8 @@ static const insn16 t2a1_bx_pc_insn = 0x4778;
static const insn16 t2a2_noop_insn = 0x46c0;
static const insn32 t2a3_b_insn = 0xea000000;
+#define VFP11_ERRATUM_VENEER_SIZE 8
+
#ifndef ELFARM_NABI_C_INCLUDED
bfd_boolean
bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
@@ -2165,7 +2657,7 @@ bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
foo = bfd_alloc (globals->bfd_of_glue_owner, globals->arm_glue_size);
- s->size = globals->arm_glue_size;
+ BFD_ASSERT (s->size == globals->arm_glue_size);
s->contents = foo;
}
@@ -2180,14 +2672,32 @@ bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info)
foo = bfd_alloc (globals->bfd_of_glue_owner, globals->thumb_glue_size);
- s->size = globals->thumb_glue_size;
+ BFD_ASSERT (s->size == globals->thumb_glue_size);
+ s->contents = foo;
+ }
+
+ if (globals->vfp11_erratum_glue_size != 0)
+ {
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name
+ (globals->bfd_of_glue_owner, VFP11_ERRATUM_VENEER_SECTION_NAME);
+
+ BFD_ASSERT (s != NULL);
+
+ foo = bfd_alloc (globals->bfd_of_glue_owner,
+ globals->vfp11_erratum_glue_size);
+
+ BFD_ASSERT (s->size == globals->vfp11_erratum_glue_size);
s->contents = foo;
}
return TRUE;
}
-static void
+/* Allocate space and symbols for calling a Thumb function from Arm mode.
+ returns the symbol identifying teh stub. */
+static struct elf_link_hash_entry *
record_arm_to_thumb_glue (struct bfd_link_info * link_info,
struct elf_link_hash_entry * h)
{
@@ -2198,6 +2708,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info,
struct bfd_link_hash_entry * bh;
struct elf32_arm_link_hash_table * globals;
bfd_vma val;
+ bfd_size_type size;
globals = elf32_arm_hash_table (link_info);
@@ -2222,7 +2733,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info,
{
/* We've already seen this guy. */
free (tmp_name);
- return;
+ return myh;
}
/* The only trick here is using hash_table->arm_glue_size as the value.
@@ -2240,12 +2751,18 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info,
free (tmp_name);
- if ((link_info->shared || globals->root.is_relocatable_executable))
- globals->arm_glue_size += ARM2THUMB_PIC_GLUE_SIZE;
+ if (link_info->shared || globals->root.is_relocatable_executable
+ || globals->pic_veneer)
+ size = ARM2THUMB_PIC_GLUE_SIZE;
+ else if (globals->use_blx)
+ size = ARM2THUMB_V5_STATIC_GLUE_SIZE;
else
- globals->arm_glue_size += ARM2THUMB_STATIC_GLUE_SIZE;
+ size = ARM2THUMB_STATIC_GLUE_SIZE;
- return;
+ s->size += size;
+ globals->arm_glue_size += size;
+
+ return myh;
}
static void
@@ -2319,11 +2836,162 @@ record_thumb_to_arm_glue (struct bfd_link_info *link_info,
free (tmp_name);
+ s->size += THUMB2ARM_GLUE_SIZE;
hash_table->thumb_glue_size += THUMB2ARM_GLUE_SIZE;
return;
}
+
+/* Add an entry to the code/data map for section SEC. */
+
+static void
+elf32_arm_section_map_add (asection *sec, char type, bfd_vma vma)
+{
+ struct _arm_elf_section_data *sec_data = elf32_arm_section_data (sec);
+ unsigned int newidx;
+
+ if (sec_data->map == NULL)
+ {
+ sec_data->map = bfd_malloc (sizeof (elf32_arm_section_map));
+ sec_data->mapcount = 0;
+ sec_data->mapsize = 1;
+ }
+
+ newidx = sec_data->mapcount++;
+
+ if (sec_data->mapcount > sec_data->mapsize)
+ {
+ sec_data->mapsize *= 2;
+ sec_data->map = bfd_realloc (sec_data->map, sec_data->mapsize
+ * sizeof (elf32_arm_section_map));
+ }
+
+ sec_data->map[newidx].vma = vma;
+ sec_data->map[newidx].type = type;
+}
+
+
+/* Record information about a VFP11 denorm-erratum veneer. Only ARM-mode
+ veneers are handled for now. */
+
+static bfd_vma
+record_vfp11_erratum_veneer (struct bfd_link_info *link_info,
+ elf32_vfp11_erratum_list *branch,
+ bfd *branch_bfd,
+ asection *branch_sec,
+ unsigned int offset)
+{
+ asection *s;
+ struct elf32_arm_link_hash_table *hash_table;
+ char *tmp_name;
+ struct elf_link_hash_entry *myh;
+ struct bfd_link_hash_entry *bh;
+ bfd_vma val;
+ struct _arm_elf_section_data *sec_data;
+ int errcount;
+ elf32_vfp11_erratum_list *newerr;
+
+ hash_table = elf32_arm_hash_table (link_info);
+
+ BFD_ASSERT (hash_table != NULL);
+ BFD_ASSERT (hash_table->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name
+ (hash_table->bfd_of_glue_owner, VFP11_ERRATUM_VENEER_SECTION_NAME);
+
+ sec_data = elf32_arm_section_data (s);
+
+ BFD_ASSERT (s != NULL);
+
+ tmp_name = bfd_malloc ((bfd_size_type) strlen
+ (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
+
+ BFD_ASSERT (tmp_name);
+
+ sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
+ hash_table->num_vfp11_fixes);
+
+ myh = elf_link_hash_lookup
+ (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE);
+
+ BFD_ASSERT (myh == NULL);
+
+ bh = NULL;
+ val = hash_table->vfp11_erratum_glue_size;
+ _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
+ tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val,
+ NULL, TRUE, FALSE, &bh);
+
+ myh = (struct elf_link_hash_entry *) bh;
+ myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
+ myh->forced_local = 1;
+
+ /* Link veneer back to calling location. */
+ errcount = ++(sec_data->erratumcount);
+ newerr = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
+
+ newerr->type = VFP11_ERRATUM_ARM_VENEER;
+ newerr->vma = -1;
+ newerr->u.v.branch = branch;
+ newerr->u.v.id = hash_table->num_vfp11_fixes;
+ branch->u.b.veneer = newerr;
+
+ newerr->next = sec_data->erratumlist;
+ sec_data->erratumlist = newerr;
+
+ /* A symbol for the return from the veneer. */
+ sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME "_r",
+ hash_table->num_vfp11_fixes);
+
+ myh = elf_link_hash_lookup
+ (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE);
+
+ if (myh != NULL)
+ abort ();
+
+ bh = NULL;
+ val = offset + 4;
+ _bfd_generic_link_add_one_symbol (link_info, branch_bfd, tmp_name, BSF_LOCAL,
+ branch_sec, val, NULL, TRUE, FALSE, &bh);
+
+ myh = (struct elf_link_hash_entry *) bh;
+ myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC);
+ myh->forced_local = 1;
+
+ free (tmp_name);
+
+ /* Generate a mapping symbol for the veneer section, and explicitly add an
+ entry for that symbol to the code/data map for the section. */
+ if (hash_table->vfp11_erratum_glue_size == 0)
+ {
+ bh = NULL;
+ /* FIXME: Creates an ARM symbol. Thumb mode will need attention if it
+ ever requires this erratum fix. */
+ _bfd_generic_link_add_one_symbol (link_info,
+ hash_table->bfd_of_glue_owner, "$a",
+ BSF_LOCAL, s, 0, NULL,
+ TRUE, FALSE, &bh);
+
+ myh = (struct elf_link_hash_entry *) bh;
+ myh->type = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE);
+ myh->forced_local = 1;
+
+ /* The elf32_arm_init_maps function only cares about symbols from input
+ BFDs. We must make a note of this generated mapping symbol
+ ourselves so that code byteswapping works properly in
+ elf32_arm_write_section. */
+ elf32_arm_section_map_add (s, 'a', 0);
+ }
+
+ s->size += VFP11_ERRATUM_VENEER_SIZE;
+ hash_table->vfp11_erratum_glue_size += VFP11_ERRATUM_VENEER_SIZE;
+ hash_table->num_vfp11_fixes++;
+
+ /* The offset of the veneer. */
+ return val;
+}
+
/* Add the glue sections to ABFD. This function is called from the
linker scripts in ld/emultempl/{armelf}.em. */
@@ -2346,7 +3014,8 @@ bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
/* Note: we do not include the flag SEC_LINKER_CREATED, as this
will prevent elf_link_input_bfd() from processing the contents
of this section. */
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_CODE | SEC_READONLY;
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY);
sec = bfd_make_section_with_flags (abfd,
ARM2THUMB_GLUE_SECTION_NAME,
@@ -2365,8 +3034,8 @@ bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
if (sec == NULL)
{
- flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
- | SEC_CODE | SEC_READONLY;
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY);
sec = bfd_make_section_with_flags (abfd,
THUMB2ARM_GLUE_SECTION_NAME,
@@ -2379,6 +3048,24 @@ bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd,
sec->gc_mark = 1;
}
+ sec = bfd_get_section_by_name (abfd, VFP11_ERRATUM_VENEER_SECTION_NAME);
+
+ if (sec == NULL)
+ {
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_CODE | SEC_READONLY);
+
+ sec = bfd_make_section_with_flags (abfd,
+ VFP11_ERRATUM_VENEER_SECTION_NAME,
+ flags);
+
+ if (sec == NULL
+ || !bfd_set_section_alignment (abfd, sec, 2))
+ return FALSE;
+
+ sec->gc_mark = 1;
+ }
+
return TRUE;
}
@@ -2414,14 +3101,14 @@ bfd_elf32_arm_get_bfd_for_interworking (bfd *abfd, struct bfd_link_info *info)
static void check_use_blx(struct elf32_arm_link_hash_table *globals)
{
- if (elf32_arm_get_eabi_attr_int (globals->obfd, Tag_CPU_arch) > 2)
+ if (bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
+ Tag_CPU_arch) > 2)
globals->use_blx = 1;
}
bfd_boolean
bfd_elf32_arm_process_before_allocation (bfd *abfd,
- struct bfd_link_info *link_info,
- int byteswap_code)
+ struct bfd_link_info *link_info)
{
Elf_Internal_Shdr *symtab_hdr;
Elf_Internal_Rela *internal_relocs = NULL;
@@ -2444,13 +3131,12 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
BFD_ASSERT (globals != NULL);
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
- if (byteswap_code && !bfd_big_endian (abfd))
+ if (globals->byteswap_code && !bfd_big_endian (abfd))
{
_bfd_error_handler (_("%B: BE8 images only valid in big-endian mode."),
abfd);
return FALSE;
}
- globals->byteswap_code = byteswap_code;
/* Rummage around all the relocs and map the glue vectors. */
sec = abfd->sections;
@@ -2463,6 +3149,9 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
if (sec->reloc_count == 0)
continue;
+ if ((sec->flags & SEC_EXCLUDE) != 0)
+ continue;
+
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
/* Load the relocs. */
@@ -2546,7 +3235,8 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd,
/* This one is a call from thumb code. We look
up the target of the call. If it is not a thumb
target, we insert glue. */
- if (ELF_ST_TYPE (h->type) != STT_ARM_TFUNC && !globals->use_blx)
+ if (ELF_ST_TYPE (h->type) != STT_ARM_TFUNC && !globals->use_blx
+ && h->root.type != bfd_link_hash_undefweak)
record_thumb_to_arm_glue (link_info, h);
break;
@@ -2581,14 +3271,654 @@ error_return:
#endif
+/* Initialise maps of ARM/Thumb/data for input BFDs. */
+
+void
+bfd_elf32_arm_init_maps (bfd *abfd)
+{
+ Elf_Internal_Sym *isymbuf;
+ Elf_Internal_Shdr *hdr;
+ unsigned int i, localsyms;
+
+ if ((abfd->flags & DYNAMIC) != 0)
+ return;
+
+ hdr = &elf_tdata (abfd)->symtab_hdr;
+ localsyms = hdr->sh_info;
+
+ /* Obtain a buffer full of symbols for this BFD. The hdr->sh_info field
+ should contain the number of local symbols, which should come before any
+ global symbols. Mapping symbols are always local. */
+ isymbuf = bfd_elf_get_elf_syms (abfd, hdr, localsyms, 0, NULL, NULL,
+ NULL);
+
+ /* No internal symbols read? Skip this BFD. */
+ if (isymbuf == NULL)
+ return;
+
+ for (i = 0; i < localsyms; i++)
+ {
+ Elf_Internal_Sym *isym = &isymbuf[i];
+ asection *sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ const char *name;
+
+ if (sec != NULL
+ && ELF_ST_BIND (isym->st_info) == STB_LOCAL)
+ {
+ name = bfd_elf_string_from_elf_section (abfd,
+ hdr->sh_link, isym->st_name);
+
+ if (bfd_is_arm_special_symbol_name (name,
+ BFD_ARM_SPECIAL_SYM_TYPE_MAP))
+ elf32_arm_section_map_add (sec, name[1], isym->st_value);
+ }
+ }
+}
+
+
+void
+bfd_elf32_arm_set_vfp11_fix (bfd *obfd, struct bfd_link_info *link_info)
+{
+ struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
+ obj_attribute *out_attr = elf_known_obj_attributes_proc (obfd);
+
+ /* We assume that ARMv7+ does not need the VFP11 denorm erratum fix. */
+ if (out_attr[Tag_CPU_arch].i >= TAG_CPU_ARCH_V7)
+ {
+ switch (globals->vfp11_fix)
+ {
+ case BFD_ARM_VFP11_FIX_DEFAULT:
+ case BFD_ARM_VFP11_FIX_NONE:
+ globals->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
+ break;
+
+ default:
+ /* Give a warning, but do as the user requests anyway. */
+ (*_bfd_error_handler) (_("%B: warning: selected VFP11 erratum "
+ "workaround is not necessary for target architecture"), obfd);
+ }
+ }
+ else if (globals->vfp11_fix == BFD_ARM_VFP11_FIX_DEFAULT)
+ /* For earlier architectures, we might need the workaround, but do not
+ enable it by default. If users is running with broken hardware, they
+ must enable the erratum fix explicitly. */
+ globals->vfp11_fix = BFD_ARM_VFP11_FIX_NONE;
+}
+
+
+enum bfd_arm_vfp11_pipe {
+ VFP11_FMAC,
+ VFP11_LS,
+ VFP11_DS,
+ VFP11_BAD
+};
+
+/* Return a VFP register number. This is encoded as RX:X for single-precision
+ registers, or X:RX for double-precision registers, where RX is the group of
+ four bits in the instruction encoding and X is the single extension bit.
+ RX and X fields are specified using their lowest (starting) bit. The return
+ value is:
+
+ 0...31: single-precision registers s0...s31
+ 32...63: double-precision registers d0...d31.
+
+ Although X should be zero for VFP11 (encoding d0...d15 only), we might
+ encounter VFP3 instructions, so we allow the full range for DP registers. */
+
+static unsigned int
+bfd_arm_vfp11_regno (unsigned int insn, bfd_boolean is_double, unsigned int rx,
+ unsigned int x)
+{
+ if (is_double)
+ return (((insn >> rx) & 0xf) | (((insn >> x) & 1) << 4)) + 32;
+ else
+ return (((insn >> rx) & 0xf) << 1) | ((insn >> x) & 1);
+}
+
+/* Set bits in *WMASK according to a register number REG as encoded by
+ bfd_arm_vfp11_regno(). Ignore d16-d31. */
+
+static void
+bfd_arm_vfp11_write_mask (unsigned int *wmask, unsigned int reg)
+{
+ if (reg < 32)
+ *wmask |= 1 << reg;
+ else if (reg < 48)
+ *wmask |= 3 << ((reg - 32) * 2);
+}
+
+/* Return TRUE if WMASK overwrites anything in REGS. */
+
+static bfd_boolean
+bfd_arm_vfp11_antidependency (unsigned int wmask, int *regs, int numregs)
+{
+ int i;
+
+ for (i = 0; i < numregs; i++)
+ {
+ unsigned int reg = regs[i];
+
+ if (reg < 32 && (wmask & (1 << reg)) != 0)
+ return TRUE;
+
+ reg -= 32;
+
+ if (reg >= 16)
+ continue;
+
+ if ((wmask & (3 << (reg * 2))) != 0)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* In this function, we're interested in two things: finding input registers
+ for VFP data-processing instructions, and finding the set of registers which
+ arbitrary VFP instructions may write to. We use a 32-bit unsigned int to
+ hold the written set, so FLDM etc. are easy to deal with (we're only
+ interested in 32 SP registers or 16 dp registers, due to the VFP version
+ implemented by the chip in question). DP registers are marked by setting
+ both SP registers in the write mask). */
+
+static enum bfd_arm_vfp11_pipe
+bfd_arm_vfp11_insn_decode (unsigned int insn, unsigned int *destmask, int *regs,
+ int *numregs)
+{
+ enum bfd_arm_vfp11_pipe pipe = VFP11_BAD;
+ bfd_boolean is_double = ((insn & 0xf00) == 0xb00) ? 1 : 0;
+
+ if ((insn & 0x0f000e10) == 0x0e000a00) /* A data-processing insn. */
+ {
+ unsigned int pqrs;
+ unsigned int fd = bfd_arm_vfp11_regno (insn, is_double, 12, 22);
+ unsigned int fm = bfd_arm_vfp11_regno (insn, is_double, 0, 5);
+
+ pqrs = ((insn & 0x00800000) >> 20)
+ | ((insn & 0x00300000) >> 19)
+ | ((insn & 0x00000040) >> 6);
+
+ switch (pqrs)
+ {
+ case 0: /* fmac[sd]. */
+ case 1: /* fnmac[sd]. */
+ case 2: /* fmsc[sd]. */
+ case 3: /* fnmsc[sd]. */
+ pipe = VFP11_FMAC;
+ bfd_arm_vfp11_write_mask (destmask, fd);
+ regs[0] = fd;
+ regs[1] = bfd_arm_vfp11_regno (insn, is_double, 16, 7); /* Fn. */
+ regs[2] = fm;
+ *numregs = 3;
+ break;
+
+ case 4: /* fmul[sd]. */
+ case 5: /* fnmul[sd]. */
+ case 6: /* fadd[sd]. */
+ case 7: /* fsub[sd]. */
+ pipe = VFP11_FMAC;
+ goto vfp_binop;
+
+ case 8: /* fdiv[sd]. */
+ pipe = VFP11_DS;
+ vfp_binop:
+ bfd_arm_vfp11_write_mask (destmask, fd);
+ regs[0] = bfd_arm_vfp11_regno (insn, is_double, 16, 7); /* Fn. */
+ regs[1] = fm;
+ *numregs = 2;
+ break;
+
+ case 15: /* extended opcode. */
+ {
+ unsigned int extn = ((insn >> 15) & 0x1e)
+ | ((insn >> 7) & 1);
+
+ switch (extn)
+ {
+ case 0: /* fcpy[sd]. */
+ case 1: /* fabs[sd]. */
+ case 2: /* fneg[sd]. */
+ case 8: /* fcmp[sd]. */
+ case 9: /* fcmpe[sd]. */
+ case 10: /* fcmpz[sd]. */
+ case 11: /* fcmpez[sd]. */
+ case 16: /* fuito[sd]. */
+ case 17: /* fsito[sd]. */
+ case 24: /* ftoui[sd]. */
+ case 25: /* ftouiz[sd]. */
+ case 26: /* ftosi[sd]. */
+ case 27: /* ftosiz[sd]. */
+ /* These instructions will not bounce due to underflow. */
+ *numregs = 0;
+ pipe = VFP11_FMAC;
+ break;
+
+ case 3: /* fsqrt[sd]. */
+ /* fsqrt cannot underflow, but it can (perhaps) overwrite
+ registers to cause the erratum in previous instructions. */
+ bfd_arm_vfp11_write_mask (destmask, fd);
+ pipe = VFP11_DS;
+ break;
+
+ case 15: /* fcvt{ds,sd}. */
+ {
+ int rnum = 0;
+
+ bfd_arm_vfp11_write_mask (destmask, fd);
+
+ /* Only FCVTSD can underflow. */
+ if ((insn & 0x100) != 0)
+ regs[rnum++] = fm;
+
+ *numregs = rnum;
+
+ pipe = VFP11_FMAC;
+ }
+ break;
+
+ default:
+ return VFP11_BAD;
+ }
+ }
+ break;
+
+ default:
+ return VFP11_BAD;
+ }
+ }
+ /* Two-register transfer. */
+ else if ((insn & 0x0fe00ed0) == 0x0c400a10)
+ {
+ unsigned int fm = bfd_arm_vfp11_regno (insn, is_double, 0, 5);
+
+ if ((insn & 0x100000) == 0)
+ {
+ if (is_double)
+ bfd_arm_vfp11_write_mask (destmask, fm);
+ else
+ {
+ bfd_arm_vfp11_write_mask (destmask, fm);
+ bfd_arm_vfp11_write_mask (destmask, fm + 1);
+ }
+ }
+
+ pipe = VFP11_LS;
+ }
+ else if ((insn & 0x0e100e00) == 0x0c100a00) /* A load insn. */
+ {
+ int fd = bfd_arm_vfp11_regno (insn, is_double, 12, 22);
+ unsigned int puw = ((insn >> 21) & 0x1) | (((insn >> 23) & 3) << 1);
+
+ switch (puw)
+ {
+ case 0: /* Two-reg transfer. We should catch these above. */
+ abort ();
+
+ case 2: /* fldm[sdx]. */
+ case 3:
+ case 5:
+ {
+ unsigned int i, offset = insn & 0xff;
+
+ if (is_double)
+ offset >>= 1;
+
+ for (i = fd; i < fd + offset; i++)
+ bfd_arm_vfp11_write_mask (destmask, i);
+ }
+ break;
+
+ case 4: /* fld[sd]. */
+ case 6:
+ bfd_arm_vfp11_write_mask (destmask, fd);
+ break;
+
+ default:
+ return VFP11_BAD;
+ }
+
+ pipe = VFP11_LS;
+ }
+ /* Single-register transfer. Note L==0. */
+ else if ((insn & 0x0f100e10) == 0x0e000a10)
+ {
+ unsigned int opcode = (insn >> 21) & 7;
+ unsigned int fn = bfd_arm_vfp11_regno (insn, is_double, 16, 7);
+
+ switch (opcode)
+ {
+ case 0: /* fmsr/fmdlr. */
+ case 1: /* fmdhr. */
+ /* Mark fmdhr and fmdlr as writing to the whole of the DP
+ destination register. I don't know if this is exactly right,
+ but it is the conservative choice. */
+ bfd_arm_vfp11_write_mask (destmask, fn);
+ break;
+
+ case 7: /* fmxr. */
+ break;
+ }
+
+ pipe = VFP11_LS;
+ }
+
+ return pipe;
+}
+
+
+static int elf32_arm_compare_mapping (const void * a, const void * b);
+
+
+/* Look for potentially-troublesome code sequences which might trigger the
+ VFP11 denormal/antidependency erratum. See, e.g., the ARM1136 errata sheet
+ (available from ARM) for details of the erratum. A short version is
+ described in ld.texinfo. */
+
+bfd_boolean
+bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info)
+{
+ asection *sec;
+ bfd_byte *contents = NULL;
+ int state = 0;
+ int regs[3], numregs = 0;
+ struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
+ int use_vector = (globals->vfp11_fix == BFD_ARM_VFP11_FIX_VECTOR);
+
+ /* We use a simple FSM to match troublesome VFP11 instruction sequences.
+ The states transition as follows:
+
+ 0 -> 1 (vector) or 0 -> 2 (scalar)
+ A VFP FMAC-pipeline instruction has been seen. Fill
+ regs[0]..regs[numregs-1] with its input operands. Remember this
+ instruction in 'first_fmac'.
+
+ 1 -> 2
+ Any instruction, except for a VFP instruction which overwrites
+ regs[*].
+
+ 1 -> 3 [ -> 0 ] or
+ 2 -> 3 [ -> 0 ]
+ A VFP instruction has been seen which overwrites any of regs[*].
+ We must make a veneer! Reset state to 0 before examining next
+ instruction.
+
+ 2 -> 0
+ If we fail to match anything in state 2, reset to state 0 and reset
+ the instruction pointer to the instruction after 'first_fmac'.
+
+ If the VFP11 vector mode is in use, there must be at least two unrelated
+ instructions between anti-dependent VFP11 instructions to properly avoid
+ triggering the erratum, hence the use of the extra state 1.
+ */
+
+ /* If we are only performing a partial link do not bother
+ to construct any glue. */
+ if (link_info->relocatable)
+ return TRUE;
+
+ /* We should have chosen a fix type by the time we get here. */
+ BFD_ASSERT (globals->vfp11_fix != BFD_ARM_VFP11_FIX_DEFAULT);
+
+ if (globals->vfp11_fix == BFD_ARM_VFP11_FIX_NONE)
+ return TRUE;
+
+ /* Skip if this bfd does not correspond to an ELF image. */
+ if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ for (sec = abfd->sections; sec != NULL; sec = sec->next)
+ {
+ unsigned int i, span, first_fmac = 0, veneer_of_insn = 0;
+ struct _arm_elf_section_data *sec_data;
+
+ /* If we don't have executable progbits, we're not interested in this
+ section. Also skip if section is to be excluded. */
+ if (elf_section_type (sec) != SHT_PROGBITS
+ || (elf_section_flags (sec) & SHF_EXECINSTR) == 0
+ || (sec->flags & SEC_EXCLUDE) != 0
+ || strcmp (sec->name, VFP11_ERRATUM_VENEER_SECTION_NAME) == 0)
+ continue;
+
+ sec_data = elf32_arm_section_data (sec);
+
+ if (sec_data->mapcount == 0)
+ continue;
+
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ contents = elf_section_data (sec)->this_hdr.contents;
+ else if (! bfd_malloc_and_get_section (abfd, sec, &contents))
+ goto error_return;
+
+ qsort (sec_data->map, sec_data->mapcount, sizeof (elf32_arm_section_map),
+ elf32_arm_compare_mapping);
+
+ for (span = 0; span < sec_data->mapcount; span++)
+ {
+ unsigned int span_start = sec_data->map[span].vma;
+ unsigned int span_end = (span == sec_data->mapcount - 1)
+ ? sec->size : sec_data->map[span + 1].vma;
+ char span_type = sec_data->map[span].type;
+
+ /* FIXME: Only ARM mode is supported at present. We may need to
+ support Thumb-2 mode also at some point. */
+ if (span_type != 'a')
+ continue;
+
+ for (i = span_start; i < span_end;)
+ {
+ unsigned int next_i = i + 4;
+ unsigned int insn = bfd_big_endian (abfd)
+ ? (contents[i] << 24)
+ | (contents[i + 1] << 16)
+ | (contents[i + 2] << 8)
+ | contents[i + 3]
+ : (contents[i + 3] << 24)
+ | (contents[i + 2] << 16)
+ | (contents[i + 1] << 8)
+ | contents[i];
+ unsigned int writemask = 0;
+ enum bfd_arm_vfp11_pipe pipe;
+
+ switch (state)
+ {
+ case 0:
+ pipe = bfd_arm_vfp11_insn_decode (insn, &writemask, regs,
+ &numregs);
+ /* I'm assuming the VFP11 erratum can trigger with denorm
+ operands on either the FMAC or the DS pipeline. This might
+ lead to slightly overenthusiastic veneer insertion. */
+ if (pipe == VFP11_FMAC || pipe == VFP11_DS)
+ {
+ state = use_vector ? 1 : 2;
+ first_fmac = i;
+ veneer_of_insn = insn;
+ }
+ break;
+
+ case 1:
+ {
+ int other_regs[3], other_numregs;
+ pipe = bfd_arm_vfp11_insn_decode (insn, &writemask,
+ other_regs,
+ &other_numregs);
+ if (pipe != VFP11_BAD
+ && bfd_arm_vfp11_antidependency (writemask, regs,
+ numregs))
+ state = 3;
+ else
+ state = 2;
+ }
+ break;
+
+ case 2:
+ {
+ int other_regs[3], other_numregs;
+ pipe = bfd_arm_vfp11_insn_decode (insn, &writemask,
+ other_regs,
+ &other_numregs);
+ if (pipe != VFP11_BAD
+ && bfd_arm_vfp11_antidependency (writemask, regs,
+ numregs))
+ state = 3;
+ else
+ {
+ state = 0;
+ next_i = first_fmac + 4;
+ }
+ }
+ break;
+
+ case 3:
+ abort (); /* Should be unreachable. */
+ }
+
+ if (state == 3)
+ {
+ elf32_vfp11_erratum_list *newerr
+ = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
+ int errcount;
+
+ errcount = ++(elf32_arm_section_data (sec)->erratumcount);
+
+ newerr->u.b.vfp_insn = veneer_of_insn;
+
+ switch (span_type)
+ {
+ case 'a':
+ newerr->type = VFP11_ERRATUM_BRANCH_TO_ARM_VENEER;
+ break;
+
+ default:
+ abort ();
+ }
+
+ record_vfp11_erratum_veneer (link_info, newerr, abfd, sec,
+ first_fmac);
+
+ newerr->vma = -1;
+
+ newerr->next = sec_data->erratumlist;
+ sec_data->erratumlist = newerr;
+
+ state = 0;
+ }
+
+ i = next_i;
+ }
+ }
+
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
+ contents = NULL;
+ }
+
+ return TRUE;
+
+error_return:
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
+
+ return FALSE;
+}
+
+/* Find virtual-memory addresses for VFP11 erratum veneers and return locations
+ after sections have been laid out, using specially-named symbols. */
+
+void
+bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *abfd,
+ struct bfd_link_info *link_info)
+{
+ asection *sec;
+ struct elf32_arm_link_hash_table *globals;
+ char *tmp_name;
+
+ if (link_info->relocatable)
+ return;
+
+ /* Skip if this bfd does not correspond to an ELF image. */
+ if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
+ return;
+
+ globals = elf32_arm_hash_table (link_info);
+
+ tmp_name = bfd_malloc ((bfd_size_type) strlen
+ (VFP11_ERRATUM_VENEER_ENTRY_NAME) + 10);
+
+ for (sec = abfd->sections; sec != NULL; sec = sec->next)
+ {
+ struct _arm_elf_section_data *sec_data = elf32_arm_section_data (sec);
+ elf32_vfp11_erratum_list *errnode = sec_data->erratumlist;
+
+ for (; errnode != NULL; errnode = errnode->next)
+ {
+ struct elf_link_hash_entry *myh;
+ bfd_vma vma;
+
+ switch (errnode->type)
+ {
+ case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
+ case VFP11_ERRATUM_BRANCH_TO_THUMB_VENEER:
+ /* Find veneer symbol. */
+ sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME,
+ errnode->u.b.veneer->u.v.id);
+
+ myh = elf_link_hash_lookup
+ (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+
+ if (myh == NULL)
+ (*_bfd_error_handler) (_("%B: unable to find VFP11 veneer "
+ "`%s'"), abfd, tmp_name);
+
+ vma = myh->root.u.def.section->output_section->vma
+ + myh->root.u.def.section->output_offset
+ + myh->root.u.def.value;
+
+ errnode->u.b.veneer->vma = vma;
+ break;
+
+ case VFP11_ERRATUM_ARM_VENEER:
+ case VFP11_ERRATUM_THUMB_VENEER:
+ /* Find return location. */
+ sprintf (tmp_name, VFP11_ERRATUM_VENEER_ENTRY_NAME "_r",
+ errnode->u.v.id);
+
+ myh = elf_link_hash_lookup
+ (&(globals)->root, tmp_name, FALSE, FALSE, TRUE);
+
+ if (myh == NULL)
+ (*_bfd_error_handler) (_("%B: unable to find VFP11 veneer "
+ "`%s'"), abfd, tmp_name);
+
+ vma = myh->root.u.def.section->output_section->vma
+ + myh->root.u.def.section->output_offset
+ + myh->root.u.def.value;
+
+ errnode->u.v.branch->vma = vma;
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ }
+
+ free (tmp_name);
+}
+
+
/* Set target relocation values needed during linking. */
void
-bfd_elf32_arm_set_target_relocs (struct bfd_link_info *link_info,
+bfd_elf32_arm_set_target_relocs (struct bfd *output_bfd,
+ struct bfd_link_info *link_info,
int target1_is_rel,
char * target2_type,
int fix_v4bx,
- int use_blx)
+ int use_blx,
+ bfd_arm_vfp11_fix vfp11_fix,
+ int no_enum_warn, int pic_veneer)
{
struct elf32_arm_link_hash_table *globals;
@@ -2608,6 +3938,10 @@ bfd_elf32_arm_set_target_relocs (struct bfd_link_info *link_info,
}
globals->fix_v4bx = fix_v4bx;
globals->use_blx |= use_blx;
+ globals->vfp11_fix = vfp11_fix;
+ globals->pic_veneer = pic_veneer;
+
+ elf32_arm_tdata (output_bfd)->no_enum_size_warning = no_enum_warn;
}
/* The thumb form of a long branch is a bit finicky, because the offset
@@ -2664,6 +3998,35 @@ insert_thumb_branch (insn32 br_insn, int rel_off)
return br_insn;
}
+
+/* Store an Arm insn into an output section not processed by
+ elf32_arm_write_section. */
+
+static void
+put_arm_insn (struct elf32_arm_link_hash_table *htab,
+ bfd * output_bfd, bfd_vma val, void * ptr)
+{
+ if (htab->byteswap_code != bfd_little_endian (output_bfd))
+ bfd_putl32 (val, ptr);
+ else
+ bfd_putb32 (val, ptr);
+}
+
+
+/* Store a 16-bit Thumb insn into an output section not processed by
+ elf32_arm_write_section. */
+
+static void
+put_thumb_insn (struct elf32_arm_link_hash_table *htab,
+ bfd * output_bfd, bfd_vma val, void * ptr)
+{
+ if (htab->byteswap_code != bfd_little_endian (output_bfd))
+ bfd_putl16 (val, ptr);
+ else
+ bfd_putb16 (val, ptr);
+}
+
+
/* Thumb code calling an ARM function. */
static int
@@ -2676,7 +4039,8 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info,
asection * sym_sec,
bfd_vma offset,
bfd_signed_vma addend,
- bfd_vma val)
+ bfd_vma val,
+ char **error_message)
{
asection * s = 0;
bfd_vma my_offset;
@@ -2685,7 +4049,7 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info,
struct elf_link_hash_entry * myh;
struct elf32_arm_link_hash_table * globals;
- myh = find_thumb_glue (info, name, input_bfd);
+ myh = find_thumb_glue (info, name, error_message);
if (myh == NULL)
return FALSE;
@@ -2720,11 +4084,11 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info,
--my_offset;
myh->root.u.def.value = my_offset;
- bfd_put_16 (output_bfd, (bfd_vma) t2a1_bx_pc_insn,
- s->contents + my_offset);
+ put_thumb_insn (globals, output_bfd, (bfd_vma) t2a1_bx_pc_insn,
+ s->contents + my_offset);
- bfd_put_16 (output_bfd, (bfd_vma) t2a2_noop_insn,
- s->contents + my_offset + 2);
+ put_thumb_insn (globals, output_bfd, (bfd_vma) t2a2_noop_insn,
+ s->contents + my_offset + 2);
ret_offset =
/* Address of destination of the stub. */
@@ -2742,9 +4106,9 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info,
/* ARM branches work from the pc of the instruction + 8. */
+ 8);
- bfd_put_32 (output_bfd,
- (bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
- s->contents + my_offset + 4);
+ put_arm_insn (globals, output_bfd,
+ (bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
+ s->contents + my_offset + 4);
}
BFD_ASSERT (my_offset <= globals->thumb_glue_size);
@@ -2771,30 +4135,26 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info,
return TRUE;
}
-/* Arm code calling a Thumb function. */
+/* Populate an Arm to Thumb stub. Returns the stub symbol. */
-static int
-elf32_arm_to_thumb_stub (struct bfd_link_info * info,
- const char * name,
- bfd * input_bfd,
- bfd * output_bfd,
- asection * input_section,
- bfd_byte * hit_data,
- asection * sym_sec,
- bfd_vma offset,
- bfd_signed_vma addend,
- bfd_vma val)
+static struct elf_link_hash_entry *
+elf32_arm_create_thumb_stub (struct bfd_link_info * info,
+ const char * name,
+ bfd * input_bfd,
+ bfd * output_bfd,
+ asection * sym_sec,
+ bfd_vma val,
+ asection *s,
+ char **error_message)
{
- unsigned long int tmp;
bfd_vma my_offset;
- asection * s;
long int ret_offset;
struct elf_link_hash_entry * myh;
struct elf32_arm_link_hash_table * globals;
- myh = find_arm_glue (info, name, input_bfd);
+ myh = find_arm_glue (info, name, error_message);
if (myh == NULL)
- return FALSE;
+ return NULL;
globals = elf32_arm_hash_table (info);
@@ -2802,11 +4162,6 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info,
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
my_offset = myh->root.u.def.value;
- s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
- ARM2THUMB_GLUE_SECTION_NAME);
- BFD_ASSERT (s != NULL);
- BFD_ASSERT (s->contents != NULL);
- BFD_ASSERT (s->output_section != NULL);
if ((my_offset & 0x01) == 0x01)
{
@@ -2823,18 +4178,19 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info,
--my_offset;
myh->root.u.def.value = my_offset;
- if ((info->shared || globals->root.is_relocatable_executable))
+ if (info->shared || globals->root.is_relocatable_executable
+ || globals->pic_veneer)
{
/* For relocatable objects we can't use absolute addresses,
so construct the address from a relative offset. */
/* TODO: If the offset is small it's probably worth
constructing the address with adds. */
- bfd_put_32 (output_bfd, (bfd_vma) a2t1p_ldr_insn,
- s->contents + my_offset);
- bfd_put_32 (output_bfd, (bfd_vma) a2t2p_add_pc_insn,
- s->contents + my_offset + 4);
- bfd_put_32 (output_bfd, (bfd_vma) a2t3p_bx_r12_insn,
- s->contents + my_offset + 8);
+ put_arm_insn (globals, output_bfd, (bfd_vma) a2t1p_ldr_insn,
+ s->contents + my_offset);
+ put_arm_insn (globals, output_bfd, (bfd_vma) a2t2p_add_pc_insn,
+ s->contents + my_offset + 4);
+ put_arm_insn (globals, output_bfd, (bfd_vma) a2t3p_bx_r12_insn,
+ s->contents + my_offset + 8);
/* Adjust the offset by 4 for the position of the add,
and 8 for the pipeline offset. */
ret_offset = (val - (s->output_offset
@@ -2844,13 +4200,22 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info,
bfd_put_32 (output_bfd, ret_offset,
s->contents + my_offset + 12);
}
- else
+ else if (globals->use_blx)
{
- bfd_put_32 (output_bfd, (bfd_vma) a2t1_ldr_insn,
- s->contents + my_offset);
+ put_arm_insn (globals, output_bfd, (bfd_vma) a2t1v5_ldr_insn,
+ s->contents + my_offset);
- bfd_put_32 (output_bfd, (bfd_vma) a2t2_bx_r12_insn,
+ /* It's a thumb address. Add the low order bit. */
+ bfd_put_32 (output_bfd, val | a2t2v5_func_addr_insn,
s->contents + my_offset + 4);
+ }
+ else
+ {
+ put_arm_insn (globals, output_bfd, (bfd_vma) a2t1_ldr_insn,
+ s->contents + my_offset);
+
+ put_arm_insn (globals, output_bfd, (bfd_vma) a2t2_bx_r12_insn,
+ s->contents + my_offset + 4);
/* It's a thumb address. Add the low order bit. */
bfd_put_32 (output_bfd, val | a2t3_func_addr_insn,
@@ -2860,6 +4225,48 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info,
BFD_ASSERT (my_offset <= globals->arm_glue_size);
+ return myh;
+}
+
+/* Arm code calling a Thumb function. */
+
+static int
+elf32_arm_to_thumb_stub (struct bfd_link_info * info,
+ const char * name,
+ bfd * input_bfd,
+ bfd * output_bfd,
+ asection * input_section,
+ bfd_byte * hit_data,
+ asection * sym_sec,
+ bfd_vma offset,
+ bfd_signed_vma addend,
+ bfd_vma val,
+ char **error_message)
+{
+ unsigned long int tmp;
+ bfd_vma my_offset;
+ asection * s;
+ long int ret_offset;
+ struct elf_link_hash_entry * myh;
+ struct elf32_arm_link_hash_table * globals;
+
+ globals = elf32_arm_hash_table (info);
+
+ BFD_ASSERT (globals != NULL);
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
+ ARM2THUMB_GLUE_SECTION_NAME);
+ BFD_ASSERT (s != NULL);
+ BFD_ASSERT (s->contents != NULL);
+ BFD_ASSERT (s->output_section != NULL);
+
+ myh = elf32_arm_create_thumb_stub (info, name, input_bfd, output_bfd,
+ sym_sec, val, s, error_message);
+ if (!myh)
+ return FALSE;
+
+ my_offset = myh->root.u.def.value;
tmp = bfd_get_32 (input_bfd, hit_data);
tmp = tmp & 0xFF000000;
@@ -2879,6 +4286,70 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info,
return TRUE;
}
+/* Populate Arm stub for an exported Thumb function. */
+
+static bfd_boolean
+elf32_arm_to_thumb_export_stub (struct elf_link_hash_entry *h, void * inf)
+{
+ struct bfd_link_info * info = (struct bfd_link_info *) inf;
+ asection * s;
+ struct elf_link_hash_entry * myh;
+ struct elf32_arm_link_hash_entry *eh;
+ struct elf32_arm_link_hash_table * globals;
+ asection *sec;
+ bfd_vma val;
+ char *error_message;
+
+ eh = elf32_arm_hash_entry(h);
+ /* Allocate stubs for exported Thumb functions on v4t. */
+ if (eh->export_glue == NULL)
+ return TRUE;
+
+ globals = elf32_arm_hash_table (info);
+
+ BFD_ASSERT (globals != NULL);
+ BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
+
+ s = bfd_get_section_by_name (globals->bfd_of_glue_owner,
+ ARM2THUMB_GLUE_SECTION_NAME);
+ BFD_ASSERT (s != NULL);
+ BFD_ASSERT (s->contents != NULL);
+ BFD_ASSERT (s->output_section != NULL);
+
+ sec = eh->export_glue->root.u.def.section;
+
+ BFD_ASSERT (sec->output_section != NULL);
+
+ val = eh->export_glue->root.u.def.value + sec->output_offset
+ + sec->output_section->vma;
+ myh = elf32_arm_create_thumb_stub (info, h->root.root.string,
+ h->root.u.def.section->owner,
+ globals->obfd, sec, val, s,
+ &error_message);
+ BFD_ASSERT (myh);
+ return TRUE;
+}
+
+/* Generate Arm stubs for exported Thumb symbols. */
+static void
+elf32_arm_begin_write_processing (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *link_info)
+{
+ struct elf32_arm_link_hash_table * globals;
+
+ if (!link_info)
+ return;
+
+ globals = elf32_arm_hash_table (link_info);
+ /* If blx is available then exported Thumb symbols are OK and there is
+ nothing to do. */
+ if (globals->use_blx)
+ return;
+
+ elf_link_hash_traverse (&globals->root, elf32_arm_to_thumb_export_stub,
+ link_info);
+}
+
/* Some relocations map to different relocations depending on the
target. Return the real relocation. */
static int
@@ -2944,6 +4415,83 @@ elf32_arm_abs12_reloc (bfd *abfd, void *data, bfd_vma value)
return bfd_reloc_ok;
}
+/* For a given value of n, calculate the value of G_n as required to
+ deal with group relocations. We return it in the form of an
+ encoded constant-and-rotation, together with the final residual. If n is
+ specified as less than zero, then final_residual is filled with the
+ input value and no further action is performed. */
+
+static bfd_vma
+calculate_group_reloc_mask (bfd_vma value, int n, bfd_vma *final_residual)
+{
+ int current_n;
+ bfd_vma g_n;
+ bfd_vma encoded_g_n = 0;
+ bfd_vma residual = value; /* Also known as Y_n. */
+
+ for (current_n = 0; current_n <= n; current_n++)
+ {
+ int shift;
+
+ /* Calculate which part of the value to mask. */
+ if (residual == 0)
+ shift = 0;
+ else
+ {
+ int msb;
+
+ /* Determine the most significant bit in the residual and
+ align the resulting value to a 2-bit boundary. */
+ for (msb = 30; msb >= 0; msb -= 2)
+ if (residual & (3 << msb))
+ break;
+
+ /* The desired shift is now (msb - 6), or zero, whichever
+ is the greater. */
+ shift = msb - 6;
+ if (shift < 0)
+ shift = 0;
+ }
+
+ /* Calculate g_n in 32-bit as well as encoded constant+rotation form. */
+ g_n = residual & (0xff << shift);
+ encoded_g_n = (g_n >> shift)
+ | ((g_n <= 0xff ? 0 : (32 - shift) / 2) << 8);
+
+ /* Calculate the residual for the next time around. */
+ residual &= ~g_n;
+ }
+
+ *final_residual = residual;
+
+ return encoded_g_n;
+}
+
+/* Given an ARM instruction, determine whether it is an ADD or a SUB.
+ Returns 1 if it is an ADD, -1 if it is a SUB, and 0 otherwise. */
+static int
+identify_add_or_sub(bfd_vma insn)
+{
+ int opcode = insn & 0x1e00000;
+
+ if (opcode == 1 << 23) /* ADD */
+ return 1;
+
+ if (opcode == 1 << 22) /* SUB */
+ return -1;
+
+ return 0;
+}
+
+/* Determine if we're dealing with a Thumb-2 object. */
+
+static int using_thumb2 (struct elf32_arm_link_hash_table *globals)
+{
+ int arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC,
+ Tag_CPU_arch);
+ return arch == TAG_CPU_ARCH_V6T2 || arch >= TAG_CPU_ARCH_V7;
+}
+
/* Perform a relocation as part of a final link. */
static bfd_reloc_status_type
@@ -2959,7 +4507,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
const char * sym_name,
int sym_flags,
struct elf_link_hash_entry * h,
- bfd_boolean * unresolved_reloc_p)
+ bfd_boolean * unresolved_reloc_p,
+ char **error_message)
{
unsigned long r_type = howto->type;
unsigned long r_symndx;
@@ -3036,23 +4585,20 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
case R_ARM_PC24:
case R_ARM_ABS32:
+ case R_ARM_ABS32_NOI:
case R_ARM_REL32:
+ case R_ARM_REL32_NOI:
case R_ARM_CALL:
case R_ARM_JUMP24:
case R_ARM_XPC25:
case R_ARM_PREL31:
case R_ARM_PLT32:
- /* 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)
- return bfd_reloc_ok;
-
/* Handle relocations which should use the PLT entry. ABS32/REL32
will use the symbol's value, which may point to a PLT entry, but we
don't need to handle that here. If we created a PLT entry, all
branches in this object should go to it. */
- if ((r_type != R_ARM_ABS32 && r_type != R_ARM_REL32)
+ if ((r_type != R_ARM_ABS32 && r_type != R_ARM_REL32
+ && r_type != R_ARM_ABS32_NOI && r_type != R_ARM_REL32_NOI)
&& h != NULL
&& splt != NULL
&& h->plt.offset != (bfd_vma) -1)
@@ -3076,7 +4622,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
run time. */
if ((info->shared || globals->root.is_relocatable_executable)
&& (input_section->flags & SEC_ALLOC)
- && (r_type != R_ARM_REL32
+ && ((r_type != R_ARM_REL32 && r_type != R_ARM_REL32_NOI)
|| !SYMBOL_CALLS_LOCAL (info, h))
&& (h == NULL
|| ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
@@ -3141,6 +4687,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
value |= 1;
if (globals->symbian_p)
{
+ asection *osec;
+
/* On Symbian OS, the data segment and text segement
can be relocated independently. Therefore, we
must indicate the segment to which this
@@ -3148,11 +4696,27 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
use any symbol in the right segment; we just use
the section symbol as it is convenient. (We
cannot use the symbol given by "h" directly as it
- will not appear in the dynamic symbol table.) */
+ will not appear in the dynamic symbol table.)
+
+ Note that the dynamic linker ignores the section
+ symbol value, so we don't subtract osec->vma
+ from the emitted reloc addend. */
if (sym_sec)
- symbol = elf_section_data (sym_sec->output_section)->dynindx;
+ osec = sym_sec->output_section;
else
- symbol = elf_section_data (input_section->output_section)->dynindx;
+ osec = input_section->output_section;
+ symbol = elf_section_data (osec)->dynindx;
+ if (symbol == 0)
+ {
+ struct elf_link_hash_table *htab = elf_hash_table (info);
+
+ if ((osec->flags & SEC_READONLY) == 0
+ && htab->data_index_section != NULL)
+ osec = htab->data_index_section;
+ else
+ osec = htab->text_index_section;
+ symbol = elf_section_data (osec)->dynindx;
+ }
BFD_ASSERT (symbol != 0);
}
else
@@ -3207,11 +4771,14 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
/* Check for Arm calling Thumb function. */
if (sym_flags == STT_ARM_TFUNC)
{
- elf32_arm_to_thumb_stub (info, sym_name, input_bfd,
- output_bfd, input_section,
- hit_data, sym_sec, rel->r_offset,
- signed_addend, value);
- return bfd_reloc_ok;
+ if (elf32_arm_to_thumb_stub (info, sym_name, input_bfd,
+ output_bfd, input_section,
+ hit_data, sym_sec, rel->r_offset,
+ signed_addend, value,
+ error_message))
+ return bfd_reloc_ok;
+ else
+ return bfd_reloc_dangerous;
}
}
@@ -3246,40 +4813,43 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
signed_addend = value;
signed_addend >>= howto->rightshift;
- /* It is not an error for an undefined weak reference to be
- out of range. Any program that branches to such a symbol
- is going to crash anyway, so there is no point worrying
- about getting the destination exactly right. */
- if (! h || h->root.type != bfd_link_hash_undefweak)
+ /* A branch to an undefined weak symbol is turned into a jump to
+ the next instruction. */
+ if (h && h->root.type == bfd_link_hash_undefweak)
+ {
+ value = (bfd_get_32 (input_bfd, hit_data) & 0xf0000000)
+ | 0x0affffff;
+ }
+ else
{
/* Perform a signed range check. */
if ( signed_addend > ((bfd_signed_vma) (howto->dst_mask >> 1))
|| signed_addend < - ((bfd_signed_vma) ((howto->dst_mask + 1) >> 1)))
return bfd_reloc_overflow;
- }
- addend = (value & 2);
+ addend = (value & 2);
- value = (signed_addend & howto->dst_mask)
- | (bfd_get_32 (input_bfd, hit_data) & (~ howto->dst_mask));
+ value = (signed_addend & howto->dst_mask)
+ | (bfd_get_32 (input_bfd, hit_data) & (~ howto->dst_mask));
- /* Set the H bit in the BLX instruction. */
- if (sym_flags == STT_ARM_TFUNC)
- {
- if (addend)
- value |= (1 << 24);
- else
- value &= ~(bfd_vma)(1 << 24);
- }
- if (r_type == R_ARM_CALL)
- {
- /* Select the correct instruction (BL or BLX). */
+ /* Set the H bit in the BLX instruction. */
if (sym_flags == STT_ARM_TFUNC)
- value |= (1 << 28);
- else
{
- value &= ~(bfd_vma)(1 << 28);
- value |= (1 << 24);
+ if (addend)
+ value |= (1 << 24);
+ else
+ value &= ~(bfd_vma)(1 << 24);
+ }
+ if (r_type == R_ARM_CALL)
+ {
+ /* Select the correct instruction (BL or BLX). */
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= (1 << 28);
+ else
+ {
+ value &= ~(bfd_vma)(1 << 28);
+ value |= (1 << 24);
+ }
}
}
break;
@@ -3290,6 +4860,10 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
value |= 1;
break;
+ case R_ARM_ABS32_NOI:
+ value += addend;
+ break;
+
case R_ARM_REL32:
value += addend;
if (sym_flags == STT_ARM_TFUNC)
@@ -3298,6 +4872,12 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
+ input_section->output_offset + rel->r_offset);
break;
+ case R_ARM_REL32_NOI:
+ value += addend;
+ value -= (input_section->output_section->vma
+ + input_section->output_offset + rel->r_offset);
+ break;
+
case R_ARM_PREL31:
value -= (input_section->output_section->vma
+ input_section->output_offset + rel->r_offset);
@@ -3355,27 +4935,122 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
bfd_put_16 (input_bfd, value, hit_data);
return bfd_reloc_ok;
+ case R_ARM_THM_ALU_PREL_11_0:
+ /* Corresponds to: addw.w reg, pc, #offset (and similarly for subw). */
+ {
+ bfd_vma insn;
+ bfd_signed_vma relocation;
+
+ insn = (bfd_get_16 (input_bfd, hit_data) << 16)
+ | bfd_get_16 (input_bfd, hit_data + 2);
+
+ if (globals->use_rel)
+ {
+ signed_addend = (insn & 0xff) | ((insn & 0x7000) >> 4)
+ | ((insn & (1 << 26)) >> 15);
+ if (insn & 0xf00000)
+ signed_addend = -signed_addend;
+ }
+
+ relocation = value + signed_addend;
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+
+ value = abs (relocation);
+
+ if (value >= 0x1000)
+ return bfd_reloc_overflow;
+
+ insn = (insn & 0xfb0f8f00) | (value & 0xff)
+ | ((value & 0x700) << 4)
+ | ((value & 0x800) << 15);
+ if (relocation < 0)
+ insn |= 0xa00000;
+
+ bfd_put_16 (input_bfd, insn >> 16, hit_data);
+ bfd_put_16 (input_bfd, insn & 0xffff, hit_data + 2);
+
+ return bfd_reloc_ok;
+ }
+
+ case R_ARM_THM_PC12:
+ /* Corresponds to: ldr.w reg, [pc, #offset]. */
+ {
+ bfd_vma insn;
+ bfd_signed_vma relocation;
+
+ insn = (bfd_get_16 (input_bfd, hit_data) << 16)
+ | bfd_get_16 (input_bfd, hit_data + 2);
+
+ if (globals->use_rel)
+ {
+ signed_addend = insn & 0xfff;
+ if (!(insn & (1 << 23)))
+ signed_addend = -signed_addend;
+ }
+
+ relocation = value + signed_addend;
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+
+ value = abs (relocation);
+
+ if (value >= 0x1000)
+ return bfd_reloc_overflow;
+
+ insn = (insn & 0xff7ff000) | value;
+ if (relocation >= 0)
+ insn |= (1 << 23);
+
+ bfd_put_16 (input_bfd, insn >> 16, hit_data);
+ bfd_put_16 (input_bfd, insn & 0xffff, hit_data + 2);
+
+ return bfd_reloc_ok;
+ }
+
case R_ARM_THM_XPC22:
case R_ARM_THM_CALL:
/* Thumb BL (branch long instruction). */
{
bfd_vma relocation;
+ bfd_vma reloc_sign;
bfd_boolean overflow = FALSE;
bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data);
bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2);
- bfd_signed_vma reloc_signed_max = ((1 << (howto->bitsize - 1)) - 1) >> howto->rightshift;
- bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
+ bfd_signed_vma reloc_signed_max;
+ bfd_signed_vma reloc_signed_min;
bfd_vma check;
bfd_signed_vma signed_check;
+ int bitsize;
+ int thumb2 = using_thumb2 (globals);
+
+ /* A branch to an undefined weak symbol is turned into a jump to
+ the next instruction. */
+ if (h && h->root.type == bfd_link_hash_undefweak)
+ {
+ bfd_put_16 (input_bfd, 0xe000, hit_data);
+ bfd_put_16 (input_bfd, 0xbf00, hit_data + 2);
+ return bfd_reloc_ok;
+ }
- /* Need to refetch the addend and squish the two 11 bit pieces
- together. */
+ /* Fetch the addend. We use the Thumb-2 encoding (backwards compatible
+ with Thumb-1) involving the J1 and J2 bits. */
if (globals->use_rel)
{
- bfd_vma upper = upper_insn & 0x7ff;
- bfd_vma lower = lower_insn & 0x7ff;
- upper = (upper ^ 0x400) - 0x400; /* Sign extend. */
- addend = (upper << 12) | (lower << 1);
+ bfd_vma s = (upper_insn & (1 << 10)) >> 10;
+ bfd_vma upper = upper_insn & 0x3ff;
+ bfd_vma lower = lower_insn & 0x7ff;
+ bfd_vma j1 = (lower_insn & (1 << 13)) >> 13;
+ bfd_vma j2 = (lower_insn & (1 << 11)) >> 11;
+ bfd_vma i1 = j1 ^ s ? 0 : 1;
+ bfd_vma i2 = j2 ^ s ? 0 : 1;
+
+ addend = (i1 << 23) | (i2 << 22) | (upper << 12) | (lower << 1);
+ /* Sign extend. */
+ addend = (addend | ((s ? 0 : 1) << 24)) - (1 << 24);
+
signed_addend = addend;
}
@@ -3407,7 +5082,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
}
else if (elf32_thumb_to_arm_stub
(info, sym_name, input_bfd, output_bfd, input_section,
- hit_data, sym_sec, rel->r_offset, signed_addend, value))
+ hit_data, sym_sec, rel->r_offset, signed_addend, value,
+ error_message))
return bfd_reloc_ok;
else
return bfd_reloc_dangerous;
@@ -3452,6 +5128,15 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
else
signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
+ /* Calculate the permissable maximum and minimum values for
+ this relocation according to whether we're relocating for
+ Thumb-2 or not. */
+ bitsize = howto->bitsize;
+ if (!thumb2)
+ bitsize -= 2;
+ reloc_signed_max = ((1 << (bitsize - 1)) - 1) >> howto->rightshift;
+ reloc_signed_min = ~reloc_signed_max;
+
/* Assumes two's complement. */
if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
overflow = TRUE;
@@ -3463,9 +5148,17 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
1 of the base address. */
relocation = (relocation + 2) & ~ 3;
- /* Put RELOCATION back into the insn. */
- upper_insn = (upper_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 12) & 0x7ff);
- lower_insn = (lower_insn & ~(bfd_vma) 0x7ff) | ((relocation >> 1) & 0x7ff);
+ /* Put RELOCATION back into the insn. Assumes two's complement.
+ We use the Thumb-2 encoding, which is safe even if dealing with
+ a Thumb-1 instruction by virtue of our overflow check above. */
+ reloc_sign = (signed_check < 0) ? 1 : 0;
+ upper_insn = (upper_insn & ~(bfd_vma) 0x7ff)
+ | ((relocation >> 12) & 0x3ff)
+ | (reloc_sign << 10);
+ lower_insn = (lower_insn & ~(bfd_vma) 0x2fff)
+ | (((!((relocation >> 23) & 1)) ^ reloc_sign) << 13)
+ | (((!((relocation >> 22) & 1)) ^ reloc_sign) << 11)
+ | ((relocation >> 1) & 0x7ff);
/* Put the relocated value back in the object file: */
bfd_put_16 (input_bfd, upper_insn, hit_data);
@@ -3555,9 +5248,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
bfd_boolean overflow = FALSE;
bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data);
bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2);
- bfd_signed_vma reloc_signed_max = ((1 << (howto->bitsize - 1)) - 1) >> howto->rightshift;
- bfd_signed_vma reloc_signed_min = ~ reloc_signed_max;
- bfd_vma check;
+ bfd_signed_vma reloc_signed_max = 0xffffe;
+ bfd_signed_vma reloc_signed_min = -0x100000;
bfd_signed_vma signed_check;
/* Need to refetch the addend, reconstruct the top three bits,
@@ -3565,14 +5257,14 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
if (globals->use_rel)
{
bfd_vma S = (upper_insn & 0x0400) >> 10;
- bfd_vma upper = (upper_insn & 0x001f);
+ bfd_vma upper = (upper_insn & 0x003f);
bfd_vma J1 = (lower_insn & 0x2000) >> 13;
bfd_vma J2 = (lower_insn & 0x0800) >> 11;
bfd_vma lower = (lower_insn & 0x07ff);
- upper |= J2 << 6;
- upper |= J1 << 7;
- upper |= ~S << 8;
+ upper |= J1 << 6;
+ upper |= J2 << 7;
+ upper |= (!S) << 8;
upper -= 0x0100; /* Sign extend. */
addend = (upper << 12) | (lower << 1);
@@ -3586,17 +5278,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
relocation -= (input_section->output_section->vma
+ input_section->output_offset
+ rel->r_offset);
+ signed_check = (bfd_signed_vma) relocation;
- check = relocation >> howto->rightshift;
-
- /* If this is a signed value, the rightshift just dropped
- leading 1 bits (assuming twos complement). */
- if ((bfd_signed_vma) relocation >= 0)
- signed_check = check;
- else
- signed_check = check | ~((bfd_vma) -1 >> howto->rightshift);
-
- /* Assumes two's complement. */
if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
overflow = TRUE;
@@ -3608,7 +5291,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
bfd_vma hi = (relocation & 0x0003f000) >> 12;
bfd_vma lo = (relocation & 0x00000ffe) >> 1;
- upper_insn = (upper_insn & 0xfb30) | (S << 10) | hi;
+ upper_insn = (upper_insn & 0xfbc0) | (S << 10) | hi;
lower_insn = (lower_insn & 0xd000) | (J1 << 13) | (J2 << 11) | lo;
}
@@ -4097,199 +5780,499 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
}
return bfd_reloc_ok;
- default:
- return bfd_reloc_notsupported;
- }
-}
+ case R_ARM_MOVW_ABS_NC:
+ case R_ARM_MOVT_ABS:
+ case R_ARM_MOVW_PREL_NC:
+ case R_ARM_MOVT_PREL:
+ /* Until we properly support segment-base-relative addressing then
+ we assume the segment base to be zero, as for the group relocations.
+ Thus R_ARM_MOVW_BREL_NC has the same semantics as R_ARM_MOVW_ABS_NC
+ and R_ARM_MOVT_BREL has the same semantics as R_ARM_MOVT_ABS. */
+ case R_ARM_MOVW_BREL_NC:
+ case R_ARM_MOVW_BREL:
+ case R_ARM_MOVT_BREL:
+ {
+ bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
+ if (globals->use_rel)
+ {
+ addend = ((insn >> 4) & 0xf000) | (insn & 0xfff);
+ signed_addend = (addend ^ 0x10000) - 0x10000;
+ }
-static int
-uleb128_size (unsigned int i)
-{
- int size;
- size = 1;
- while (i >= 0x80)
- {
- i >>= 7;
- size++;
- }
- return size;
-}
+ value += signed_addend;
-/* Return TRUE if the attribute has the default value (0/""). */
-static bfd_boolean
-is_default_attr (aeabi_attribute *attr)
-{
- if ((attr->type & 1) && attr->i != 0)
- return FALSE;
- if ((attr->type & 2) && attr->s && *attr->s)
- return FALSE;
+ if (r_type == R_ARM_MOVW_PREL_NC || r_type == R_ARM_MOVT_PREL)
+ value -= (input_section->output_section->vma
+ + input_section->output_offset + rel->r_offset);
- return TRUE;
-}
+ if (r_type == R_ARM_MOVW_BREL && value >= 0x10000)
+ return bfd_reloc_overflow;
-/* Return the size of a single attribute. */
-static bfd_vma
-eabi_attr_size(int tag, aeabi_attribute *attr)
-{
- bfd_vma size;
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
- if (is_default_attr (attr))
- return 0;
+ if (r_type == R_ARM_MOVT_ABS || r_type == R_ARM_MOVT_PREL
+ || r_type == R_ARM_MOVT_BREL)
+ value >>= 16;
- size = uleb128_size (tag);
- if (attr->type & 1)
- size += uleb128_size (attr->i);
- if (attr->type & 2)
- size += strlen ((char *)attr->s) + 1;
- return size;
-}
-
-/* Returns the size of the eabi object attributess section. */
-bfd_vma
-elf32_arm_eabi_attr_size (bfd *abfd)
-{
- bfd_vma size;
- aeabi_attribute *attr;
- aeabi_attribute_list *list;
- int i;
+ insn &= 0xfff0f000;
+ insn |= value & 0xfff;
+ insn |= (value & 0xf000) << 4;
+ bfd_put_32 (input_bfd, insn, hit_data);
+ }
+ return bfd_reloc_ok;
+
+ case R_ARM_THM_MOVW_ABS_NC:
+ case R_ARM_THM_MOVT_ABS:
+ case R_ARM_THM_MOVW_PREL_NC:
+ case R_ARM_THM_MOVT_PREL:
+ /* Until we properly support segment-base-relative addressing then
+ we assume the segment base to be zero, as for the above relocations.
+ Thus R_ARM_THM_MOVW_BREL_NC has the same semantics as
+ R_ARM_THM_MOVW_ABS_NC and R_ARM_THM_MOVT_BREL has the same semantics
+ as R_ARM_THM_MOVT_ABS. */
+ case R_ARM_THM_MOVW_BREL_NC:
+ case R_ARM_THM_MOVW_BREL:
+ case R_ARM_THM_MOVT_BREL:
+ {
+ bfd_vma insn;
+
+ insn = bfd_get_16 (input_bfd, hit_data) << 16;
+ insn |= bfd_get_16 (input_bfd, hit_data + 2);
- attr = elf32_arm_tdata (abfd)->known_eabi_attributes;
- size = 16; /* 'A' <size> "aeabi" 0x1 <size>. */
- for (i = 4; i < NUM_KNOWN_ATTRIBUTES; i++)
- size += eabi_attr_size (i, &attr[i]);
+ if (globals->use_rel)
+ {
+ addend = ((insn >> 4) & 0xf000)
+ | ((insn >> 15) & 0x0800)
+ | ((insn >> 4) & 0x0700)
+ | (insn & 0x00ff);
+ signed_addend = (addend ^ 0x10000) - 0x10000;
+ }
- for (list = elf32_arm_tdata (abfd)->other_eabi_attributes;
- list;
- list = list->next)
- size += eabi_attr_size (list->tag, &list->attr);
+ value += signed_addend;
- return size;
-}
+ if (r_type == R_ARM_THM_MOVW_PREL_NC || r_type == R_ARM_THM_MOVT_PREL)
+ value -= (input_section->output_section->vma
+ + input_section->output_offset + rel->r_offset);
-static bfd_byte *
-write_uleb128 (bfd_byte *p, unsigned int val)
-{
- bfd_byte c;
- do
- {
- c = val & 0x7f;
- val >>= 7;
- if (val)
- c |= 0x80;
- *(p++) = c;
- }
- while (val);
- return p;
-}
+ if (r_type == R_ARM_THM_MOVW_BREL && value >= 0x10000)
+ return bfd_reloc_overflow;
-/* Write attribute ATTR to butter P, and return a pointer to the following
- byte. */
-static bfd_byte *
-write_eabi_attribute (bfd_byte *p, int tag, aeabi_attribute *attr)
-{
- /* Suppress default entries. */
- if (is_default_attr(attr))
- return p;
-
- p = write_uleb128 (p, tag);
- if (attr->type & 1)
- p = write_uleb128 (p, attr->i);
- if (attr->type & 2)
- {
- int len;
+ if (sym_flags == STT_ARM_TFUNC)
+ value |= 1;
- len = strlen (attr->s) + 1;
- memcpy (p, attr->s, len);
- p += len;
- }
+ if (r_type == R_ARM_THM_MOVT_ABS || r_type == R_ARM_THM_MOVT_PREL
+ || r_type == R_ARM_THM_MOVT_BREL)
+ value >>= 16;
- return p;
-}
+ insn &= 0xfbf08f00;
+ insn |= (value & 0xf000) << 4;
+ insn |= (value & 0x0800) << 15;
+ insn |= (value & 0x0700) << 4;
+ insn |= (value & 0x00ff);
-/* Write the contents of the eabi attributes section to p. */
-void
-elf32_arm_set_eabi_attr_contents (bfd *abfd, bfd_byte *contents, bfd_vma size)
-{
- bfd_byte *p;
- aeabi_attribute *attr;
- aeabi_attribute_list *list;
- int i;
+ bfd_put_16 (input_bfd, insn >> 16, hit_data);
+ bfd_put_16 (input_bfd, insn & 0xffff, hit_data + 2);
+ }
+ return bfd_reloc_ok;
- p = contents;
- *(p++) = 'A';
- bfd_put_32 (abfd, size - 1, p);
- p += 4;
- memcpy (p, "aeabi", 6);
- p += 6;
- *(p++) = Tag_File;
- bfd_put_32 (abfd, size - 11, p);
- p += 4;
-
- attr = elf32_arm_tdata (abfd)->known_eabi_attributes;
- for (i = 4; i < NUM_KNOWN_ATTRIBUTES; i++)
- p = write_eabi_attribute (p, i, &attr[i]);
-
- for (list = elf32_arm_tdata (abfd)->other_eabi_attributes;
- list;
- list = list->next)
- p = write_eabi_attribute (p, list->tag, &list->attr);
-}
+ case R_ARM_ALU_PC_G0_NC:
+ case R_ARM_ALU_PC_G1_NC:
+ case R_ARM_ALU_PC_G0:
+ case R_ARM_ALU_PC_G1:
+ case R_ARM_ALU_PC_G2:
+ case R_ARM_ALU_SB_G0_NC:
+ case R_ARM_ALU_SB_G1_NC:
+ case R_ARM_ALU_SB_G0:
+ case R_ARM_ALU_SB_G1:
+ case R_ARM_ALU_SB_G2:
+ {
+ bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
+ bfd_vma pc = input_section->output_section->vma
+ + input_section->output_offset + rel->r_offset;
+ /* sb should be the origin of the *segment* containing the symbol.
+ It is not clear how to obtain this OS-dependent value, so we
+ make an arbitrary choice of zero. */
+ bfd_vma sb = 0;
+ bfd_vma residual;
+ bfd_vma g_n;
+ bfd_signed_vma signed_value;
+ int group = 0;
+
+ /* Determine which group of bits to select. */
+ switch (r_type)
+ {
+ case R_ARM_ALU_PC_G0_NC:
+ case R_ARM_ALU_PC_G0:
+ case R_ARM_ALU_SB_G0_NC:
+ case R_ARM_ALU_SB_G0:
+ group = 0;
+ break;
+
+ case R_ARM_ALU_PC_G1_NC:
+ case R_ARM_ALU_PC_G1:
+ case R_ARM_ALU_SB_G1_NC:
+ case R_ARM_ALU_SB_G1:
+ group = 1;
+ break;
+
+ case R_ARM_ALU_PC_G2:
+ case R_ARM_ALU_SB_G2:
+ group = 2;
+ break;
+
+ default:
+ abort();
+ }
-/* Override final_link to handle EABI object attribute sections. */
+ /* If REL, extract the addend from the insn. If RELA, it will
+ have already been fetched for us. */
+ if (globals->use_rel)
+ {
+ int negative;
+ bfd_vma constant = insn & 0xff;
+ bfd_vma rotation = (insn & 0xf00) >> 8;
+
+ if (rotation == 0)
+ signed_addend = constant;
+ else
+ {
+ /* Compensate for the fact that in the instruction, the
+ rotation is stored in multiples of 2 bits. */
+ rotation *= 2;
+
+ /* Rotate "constant" right by "rotation" bits. */
+ signed_addend = (constant >> rotation) |
+ (constant << (8 * sizeof (bfd_vma) - rotation));
+ }
+
+ /* Determine if the instruction is an ADD or a SUB.
+ (For REL, this determines the sign of the addend.) */
+ negative = identify_add_or_sub (insn);
+ if (negative == 0)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group relocations"),
+ input_bfd, input_section,
+ (long) rel->r_offset, howto->name);
+ return bfd_reloc_overflow;
+ }
+
+ signed_addend *= negative;
+ }
-static bfd_boolean
-elf32_arm_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
-{
- asection *o;
- struct bfd_link_order *p;
- asection *attr_section = NULL;
- bfd_byte *contents;
- bfd_vma size = 0;
-
- /* elf32_arm_merge_private_bfd_data will already have merged the
- object attributes. Remove the input sections from the link, and set
- the contents of the output secton. */
- for (o = abfd->sections; o != NULL; o = o->next)
- {
- if (strcmp (o->name, ".ARM.attributes") == 0)
- {
- for (p = o->map_head.link_order; p != NULL; p = p->next)
- {
- asection *input_section;
-
- if (p->type != bfd_indirect_link_order)
- continue;
- input_section = p->u.indirect.section;
- /* Hack: reset the SEC_HAS_CONTENTS flag so that
- elf_link_input_bfd ignores this section. */
- input_section->flags &= ~SEC_HAS_CONTENTS;
- }
-
- size = elf32_arm_eabi_attr_size (abfd);
- bfd_set_section_size (abfd, o, size);
- attr_section = o;
- /* Skip this section later on. */
- o->map_head.link_order = NULL;
- }
- }
- /* Invoke the ELF linker to do all the work. */
- if (!bfd_elf_final_link (abfd, info))
- return FALSE;
+ /* Compute the value (X) to go in the place. */
+ if (r_type == R_ARM_ALU_PC_G0_NC
+ || r_type == R_ARM_ALU_PC_G1_NC
+ || r_type == R_ARM_ALU_PC_G0
+ || r_type == R_ARM_ALU_PC_G1
+ || r_type == R_ARM_ALU_PC_G2)
+ /* PC relative. */
+ signed_value = value - pc + signed_addend;
+ else
+ /* Section base relative. */
+ signed_value = value - sb + signed_addend;
+
+ /* If the target symbol is a Thumb function, then set the
+ Thumb bit in the address. */
+ if (sym_flags == STT_ARM_TFUNC)
+ signed_value |= 1;
+
+ /* Calculate the value of the relevant G_n, in encoded
+ constant-with-rotation format. */
+ g_n = calculate_group_reloc_mask (abs (signed_value), group,
+ &residual);
+
+ /* Check for overflow if required. */
+ if ((r_type == R_ARM_ALU_PC_G0
+ || r_type == R_ARM_ALU_PC_G1
+ || r_type == R_ARM_ALU_PC_G2
+ || r_type == R_ARM_ALU_SB_G0
+ || r_type == R_ARM_ALU_SB_G1
+ || r_type == R_ARM_ALU_SB_G2) && residual != 0)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
+ input_bfd, input_section,
+ (long) rel->r_offset, abs (signed_value), howto->name);
+ return bfd_reloc_overflow;
+ }
- if (attr_section)
- {
- contents = bfd_malloc(size);
- if (contents == NULL)
- return FALSE;
- elf32_arm_set_eabi_attr_contents (abfd, contents, size);
- bfd_set_section_contents (abfd, attr_section, contents, 0, size);
- free (contents);
+ /* Mask out the value and the ADD/SUB part of the opcode; take care
+ not to destroy the S bit. */
+ insn &= 0xff1ff000;
+
+ /* Set the opcode according to whether the value to go in the
+ place is negative. */
+ if (signed_value < 0)
+ insn |= 1 << 22;
+ else
+ insn |= 1 << 23;
+
+ /* Encode the offset. */
+ insn |= g_n;
+
+ bfd_put_32 (input_bfd, insn, hit_data);
+ }
+ return bfd_reloc_ok;
+
+ case R_ARM_LDR_PC_G0:
+ case R_ARM_LDR_PC_G1:
+ case R_ARM_LDR_PC_G2:
+ case R_ARM_LDR_SB_G0:
+ case R_ARM_LDR_SB_G1:
+ case R_ARM_LDR_SB_G2:
+ {
+ bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
+ bfd_vma pc = input_section->output_section->vma
+ + input_section->output_offset + rel->r_offset;
+ bfd_vma sb = 0; /* See note above. */
+ bfd_vma residual;
+ bfd_signed_vma signed_value;
+ int group = 0;
+
+ /* Determine which groups of bits to calculate. */
+ switch (r_type)
+ {
+ case R_ARM_LDR_PC_G0:
+ case R_ARM_LDR_SB_G0:
+ group = 0;
+ break;
+
+ case R_ARM_LDR_PC_G1:
+ case R_ARM_LDR_SB_G1:
+ group = 1;
+ break;
+
+ case R_ARM_LDR_PC_G2:
+ case R_ARM_LDR_SB_G2:
+ group = 2;
+ break;
+
+ default:
+ abort();
+ }
+
+ /* If REL, extract the addend from the insn. If RELA, it will
+ have already been fetched for us. */
+ if (globals->use_rel)
+ {
+ int negative = (insn & (1 << 23)) ? 1 : -1;
+ signed_addend = negative * (insn & 0xfff);
+ }
+
+ /* Compute the value (X) to go in the place. */
+ if (r_type == R_ARM_LDR_PC_G0
+ || r_type == R_ARM_LDR_PC_G1
+ || r_type == R_ARM_LDR_PC_G2)
+ /* PC relative. */
+ signed_value = value - pc + signed_addend;
+ else
+ /* Section base relative. */
+ signed_value = value - sb + signed_addend;
+
+ /* Calculate the value of the relevant G_{n-1} to obtain
+ the residual at that stage. */
+ calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+
+ /* Check for overflow. */
+ if (residual >= 0x1000)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
+ input_bfd, input_section,
+ (long) rel->r_offset, abs (signed_value), howto->name);
+ return bfd_reloc_overflow;
+ }
+
+ /* Mask out the value and U bit. */
+ insn &= 0xff7ff000;
+
+ /* Set the U bit if the value to go in the place is non-negative. */
+ if (signed_value >= 0)
+ insn |= 1 << 23;
+
+ /* Encode the offset. */
+ insn |= residual;
+
+ bfd_put_32 (input_bfd, insn, hit_data);
+ }
+ return bfd_reloc_ok;
+
+ case R_ARM_LDRS_PC_G0:
+ case R_ARM_LDRS_PC_G1:
+ case R_ARM_LDRS_PC_G2:
+ case R_ARM_LDRS_SB_G0:
+ case R_ARM_LDRS_SB_G1:
+ case R_ARM_LDRS_SB_G2:
+ {
+ bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
+ bfd_vma pc = input_section->output_section->vma
+ + input_section->output_offset + rel->r_offset;
+ bfd_vma sb = 0; /* See note above. */
+ bfd_vma residual;
+ bfd_signed_vma signed_value;
+ int group = 0;
+
+ /* Determine which groups of bits to calculate. */
+ switch (r_type)
+ {
+ case R_ARM_LDRS_PC_G0:
+ case R_ARM_LDRS_SB_G0:
+ group = 0;
+ break;
+
+ case R_ARM_LDRS_PC_G1:
+ case R_ARM_LDRS_SB_G1:
+ group = 1;
+ break;
+
+ case R_ARM_LDRS_PC_G2:
+ case R_ARM_LDRS_SB_G2:
+ group = 2;
+ break;
+
+ default:
+ abort();
+ }
+
+ /* If REL, extract the addend from the insn. If RELA, it will
+ have already been fetched for us. */
+ if (globals->use_rel)
+ {
+ int negative = (insn & (1 << 23)) ? 1 : -1;
+ signed_addend = negative * (((insn & 0xf00) >> 4) + (insn & 0xf));
+ }
+
+ /* Compute the value (X) to go in the place. */
+ if (r_type == R_ARM_LDRS_PC_G0
+ || r_type == R_ARM_LDRS_PC_G1
+ || r_type == R_ARM_LDRS_PC_G2)
+ /* PC relative. */
+ signed_value = value - pc + signed_addend;
+ else
+ /* Section base relative. */
+ signed_value = value - sb + signed_addend;
+
+ /* Calculate the value of the relevant G_{n-1} to obtain
+ the residual at that stage. */
+ calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+
+ /* Check for overflow. */
+ if (residual >= 0x100)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
+ input_bfd, input_section,
+ (long) rel->r_offset, abs (signed_value), howto->name);
+ return bfd_reloc_overflow;
+ }
+
+ /* Mask out the value and U bit. */
+ insn &= 0xff7ff0f0;
+
+ /* Set the U bit if the value to go in the place is non-negative. */
+ if (signed_value >= 0)
+ insn |= 1 << 23;
+
+ /* Encode the offset. */
+ insn |= ((residual & 0xf0) << 4) | (residual & 0xf);
+
+ bfd_put_32 (input_bfd, insn, hit_data);
+ }
+ return bfd_reloc_ok;
+
+ case R_ARM_LDC_PC_G0:
+ case R_ARM_LDC_PC_G1:
+ case R_ARM_LDC_PC_G2:
+ case R_ARM_LDC_SB_G0:
+ case R_ARM_LDC_SB_G1:
+ case R_ARM_LDC_SB_G2:
+ {
+ bfd_vma insn = bfd_get_32 (input_bfd, hit_data);
+ bfd_vma pc = input_section->output_section->vma
+ + input_section->output_offset + rel->r_offset;
+ bfd_vma sb = 0; /* See note above. */
+ bfd_vma residual;
+ bfd_signed_vma signed_value;
+ int group = 0;
+
+ /* Determine which groups of bits to calculate. */
+ switch (r_type)
+ {
+ case R_ARM_LDC_PC_G0:
+ case R_ARM_LDC_SB_G0:
+ group = 0;
+ break;
+
+ case R_ARM_LDC_PC_G1:
+ case R_ARM_LDC_SB_G1:
+ group = 1;
+ break;
+
+ case R_ARM_LDC_PC_G2:
+ case R_ARM_LDC_SB_G2:
+ group = 2;
+ break;
+
+ default:
+ abort();
+ }
+
+ /* If REL, extract the addend from the insn. If RELA, it will
+ have already been fetched for us. */
+ if (globals->use_rel)
+ {
+ int negative = (insn & (1 << 23)) ? 1 : -1;
+ signed_addend = negative * ((insn & 0xff) << 2);
+ }
+
+ /* Compute the value (X) to go in the place. */
+ if (r_type == R_ARM_LDC_PC_G0
+ || r_type == R_ARM_LDC_PC_G1
+ || r_type == R_ARM_LDC_PC_G2)
+ /* PC relative. */
+ signed_value = value - pc + signed_addend;
+ else
+ /* Section base relative. */
+ signed_value = value - sb + signed_addend;
+
+ /* Calculate the value of the relevant G_{n-1} to obtain
+ the residual at that stage. */
+ calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+
+ /* Check for overflow. (The absolute value to go in the place must be
+ divisible by four and, after having been divided by four, must
+ fit in eight bits.) */
+ if ((residual & 0x3) != 0 || residual >= 0x400)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
+ input_bfd, input_section,
+ (long) rel->r_offset, abs (signed_value), howto->name);
+ return bfd_reloc_overflow;
+ }
+
+ /* Mask out the value and U bit. */
+ insn &= 0xff7fff00;
+
+ /* Set the U bit if the value to go in the place is non-negative. */
+ if (signed_value >= 0)
+ insn |= 1 << 23;
+
+ /* Encode the offset. */
+ insn |= residual >> 2;
+
+ bfd_put_32 (input_bfd, insn, hit_data);
+ }
+ return bfd_reloc_ok;
+
+ default:
+ return bfd_reloc_notsupported;
}
- return TRUE;
}
-
/* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. */
static void
arm_add_to_rel (bfd * abfd,
@@ -4392,8 +6375,6 @@ elf32_arm_relocate_section (bfd * output_bfd,
struct elf32_arm_link_hash_table * globals;
globals = elf32_arm_hash_table (info);
- if (info->relocatable && !globals->use_rel)
- return TRUE;
symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -4413,6 +6394,7 @@ elf32_arm_relocate_section (bfd * output_bfd,
arelent bfd_reloc;
char sym_type;
bfd_boolean unresolved_reloc = FALSE;
+ char *error_message = NULL;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
@@ -4425,29 +6407,6 @@ elf32_arm_relocate_section (bfd * output_bfd,
bfd_reloc.howto = elf32_arm_howto_from_type (r_type);
howto = bfd_reloc.howto;
- if (info->relocatable && globals->use_rel)
- {
- /* 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 (ELF_ST_TYPE (sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- arm_add_to_rel (input_bfd, contents + rel->r_offset,
- howto,
- (bfd_signed_vma) (sec->output_offset
- + sym->st_value));
- }
- }
-
- continue;
- }
-
- /* This is a final link. */
h = NULL;
sym = NULL;
sec = NULL;
@@ -4462,8 +6421,9 @@ elf32_arm_relocate_section (bfd * output_bfd,
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
- if ((sec->flags & SEC_MERGE)
- && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ if (!info->relocatable
+ && (sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
{
asection *msec;
bfd_vma addend, value;
@@ -4513,6 +6473,34 @@ elf32_arm_relocate_section (bfd * output_bfd,
sym_type = h->type;
}
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ {
+ /* 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 (sym != NULL && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ if (globals->use_rel)
+ arm_add_to_rel (input_bfd, contents + rel->r_offset,
+ howto, (bfd_signed_vma) sec->output_offset);
+ else
+ rel->r_addend += sec->output_offset;
+ }
+ continue;
+ }
+
if (h != NULL)
name = h->root.root.string;
else
@@ -4546,7 +6534,7 @@ elf32_arm_relocate_section (bfd * output_bfd,
relocation, info, sec, name,
(h ? ELF_ST_TYPE (h->type) :
ELF_ST_TYPE (sym->st_info)), h,
- &unresolved_reloc);
+ &unresolved_reloc, &error_message);
/* Dynamic relocs are not propagated for SEC_DEBUGGING sections
because such sections are not SEC_ALLOC and thus ld.so will
@@ -4567,8 +6555,6 @@ elf32_arm_relocate_section (bfd * output_bfd,
if (r != bfd_reloc_ok)
{
- const char * msg = (const char *) 0;
-
switch (r)
{
case bfd_reloc_overflow:
@@ -4592,24 +6578,25 @@ elf32_arm_relocate_section (bfd * output_bfd,
break;
case bfd_reloc_outofrange:
- msg = _("internal error: out of range error");
+ error_message = _("out of range");
goto common_error;
case bfd_reloc_notsupported:
- msg = _("internal error: unsupported relocation error");
+ error_message = _("unsupported relocation");
goto common_error;
case bfd_reloc_dangerous:
- msg = _("internal error: dangerous error");
+ /* error_message should already be set. */
goto common_error;
default:
- msg = _("internal error: unknown error");
+ error_message = _("unknown error");
/* fall through */
common_error:
- if (!((*info->callbacks->warning)
- (info, msg, name, input_bfd, input_section,
+ BFD_ASSERT (error_message != NULL);
+ if (!((*info->callbacks->reloc_dangerous)
+ (info, error_message, input_bfd, input_section,
rel->r_offset)))
return FALSE;
break;
@@ -4620,130 +6607,6 @@ elf32_arm_relocate_section (bfd * output_bfd,
return TRUE;
}
-/* Allocate/find an object attribute. */
-static aeabi_attribute *
-elf32_arm_new_eabi_attr (bfd *abfd, int tag)
-{
- aeabi_attribute *attr;
- aeabi_attribute_list *list;
- aeabi_attribute_list *p;
- aeabi_attribute_list **lastp;
-
-
- if (tag < NUM_KNOWN_ATTRIBUTES)
- {
- /* Knwon tags are preallocated. */
- attr = &elf32_arm_tdata (abfd)->known_eabi_attributes[tag];
- }
- else
- {
- /* Create a new tag. */
- list = (aeabi_attribute_list *)
- bfd_alloc (abfd, sizeof (aeabi_attribute_list));
- memset (list, 0, sizeof (aeabi_attribute_list));
- list->tag = tag;
- /* Keep the tag list in order. */
- lastp = &elf32_arm_tdata (abfd)->other_eabi_attributes;
- for (p = *lastp; p; p = p->next)
- {
- if (tag < p->tag)
- break;
- lastp = &p->next;
- }
- list->next = *lastp;
- *lastp = list;
- attr = &list->attr;
- }
-
- return attr;
-}
-
-int
-elf32_arm_get_eabi_attr_int (bfd *abfd, int tag)
-{
- aeabi_attribute_list *p;
-
- if (tag < NUM_KNOWN_ATTRIBUTES)
- {
- /* Knwon tags are preallocated. */
- return elf32_arm_tdata (abfd)->known_eabi_attributes[tag].i;
- }
- else
- {
- for (p = elf32_arm_tdata (abfd)->other_eabi_attributes;
- p;
- p = p->next)
- {
- if (tag == p->tag)
- return p->attr.i;
- if (tag < p->tag)
- break;
- }
- return 0;
- }
-}
-
-void
-elf32_arm_add_eabi_attr_int (bfd *abfd, int tag, unsigned int i)
-{
- aeabi_attribute *attr;
-
- attr = elf32_arm_new_eabi_attr (abfd, tag);
- attr->type = 1;
- attr->i = i;
-}
-
-static char *
-attr_strdup (bfd *abfd, const char * s)
-{
- char * p;
- int len;
-
- len = strlen (s) + 1;
- p = (char *)bfd_alloc(abfd, len);
- return memcpy (p, s, len);
-}
-
-void
-elf32_arm_add_eabi_attr_string (bfd *abfd, int tag, const char *s)
-{
- aeabi_attribute *attr;
-
- attr = elf32_arm_new_eabi_attr (abfd, tag);
- attr->type = 2;
- attr->s = attr_strdup (abfd, s);
-}
-
-void
-elf32_arm_add_eabi_attr_compat (bfd *abfd, unsigned int i, const char *s)
-{
- aeabi_attribute_list *list;
- aeabi_attribute_list *p;
- aeabi_attribute_list **lastp;
-
- list = (aeabi_attribute_list *)
- bfd_alloc (abfd, sizeof (aeabi_attribute_list));
- memset (list, 0, sizeof (aeabi_attribute_list));
- list->tag = Tag_compatibility;
- list->attr.type = 3;
- list->attr.i = i;
- list->attr.s = attr_strdup (abfd, s);
-
- lastp = &elf32_arm_tdata (abfd)->other_eabi_attributes;
- for (p = *lastp; p; p = p->next)
- {
- int cmp;
- if (p->tag != Tag_compatibility)
- break;
- cmp = strcmp(s, p->attr.s);
- if (cmp < 0 || (cmp == 0 && i < p->attr.i))
- break;
- lastp = &p->next;
- }
- list->next = *lastp;
- *lastp = list;
-}
-
/* Set the right machine number. */
static bfd_boolean
@@ -4794,49 +6657,6 @@ elf32_arm_set_private_flags (bfd *abfd, flagword flags)
return TRUE;
}
-/* Copy the eabi object attribute from IBFD to OBFD. */
-static void
-copy_eabi_attributes (bfd *ibfd, bfd *obfd)
-{
- aeabi_attribute *in_attr;
- aeabi_attribute *out_attr;
- aeabi_attribute_list *list;
- int i;
-
- in_attr = elf32_arm_tdata (ibfd)->known_eabi_attributes;
- out_attr = elf32_arm_tdata (obfd)->known_eabi_attributes;
- for (i = 4; i < NUM_KNOWN_ATTRIBUTES; i++)
- {
- out_attr->i = in_attr->i;
- if (in_attr->s && *in_attr->s)
- out_attr->s = attr_strdup (obfd, in_attr->s);
- in_attr++;
- out_attr++;
- }
-
- for (list = elf32_arm_tdata (ibfd)->other_eabi_attributes;
- list;
- list = list->next)
- {
- in_attr = &list->attr;
- switch (in_attr->type)
- {
- case 1:
- elf32_arm_add_eabi_attr_int (obfd, list->tag, in_attr->i);
- break;
- case 2:
- elf32_arm_add_eabi_attr_string (obfd, list->tag, in_attr->s);
- break;
- case 3:
- elf32_arm_add_eabi_attr_compat (obfd, in_attr->i, in_attr->s);
- break;
- default:
- abort();
- }
- }
-}
-
-
/* Copy backend specific data from one object module to another. */
static bfd_boolean
@@ -4888,8 +6708,8 @@ elf32_arm_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
elf_elfheader (obfd)->e_ident[EI_OSABI] =
elf_elfheader (ibfd)->e_ident[EI_OSABI];
- /* Copy EABI object attributes. */
- copy_eabi_attributes (ibfd, obfd);
+ /* Copy object attributes. */
+ _bfd_elf_copy_obj_attributes (ibfd, obfd);
return TRUE;
}
@@ -4921,33 +6741,48 @@ enum
AEABI_enum_forced_wide
};
+/* Determine whether an object attribute tag takes an integer, a
+ string or both. */
+static int
+elf32_arm_obj_attrs_arg_type (int tag)
+{
+ if (tag == Tag_compatibility)
+ return 3;
+ else if (tag == 4 || tag == 5)
+ return 2;
+ else if (tag < 32)
+ return 1;
+ else
+ return (tag & 1) != 0 ? 2 : 1;
+}
+
/* Merge EABI object attributes from IBFD into OBFD. Raise an error if there
are conflicting attributes. */
static bfd_boolean
elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
{
- aeabi_attribute *in_attr;
- aeabi_attribute *out_attr;
- aeabi_attribute_list *in_list;
- aeabi_attribute_list *out_list;
+ obj_attribute *in_attr;
+ obj_attribute *out_attr;
+ obj_attribute_list *in_list;
/* Some tags have 0 = don't care, 1 = strong requirement,
2 = weak requirement. */
static const int order_312[3] = {3, 1, 2};
int i;
- if (!elf32_arm_tdata (ibfd)->known_eabi_attributes[0].i)
+ if (!elf_known_obj_attributes_proc (obfd)[0].i)
{
/* This is the first object. Copy the attributes. */
- copy_eabi_attributes (ibfd, obfd);
+ _bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+ /* Use the Tag_null value to indicate the attributes have been
+ initialized. */
+ elf_known_obj_attributes_proc (obfd)[0].i = 1;
+
return TRUE;
}
- /* Use the Tag_null value to indicate the attributes have been
- initialized. */
- elf32_arm_tdata (ibfd)->known_eabi_attributes[0].i = 1;
-
- in_attr = elf32_arm_tdata (ibfd)->known_eabi_attributes;
- out_attr = elf32_arm_tdata (obfd)->known_eabi_attributes;
+ in_attr = elf_known_obj_attributes_proc (ibfd);
+ out_attr = elf_known_obj_attributes_proc (obfd);
/* This needs to happen before Tag_ABI_FP_number_model is merged. */
if (in_attr[Tag_ABI_VFP_args].i != out_attr[Tag_ABI_VFP_args].i)
{
@@ -4963,16 +6798,19 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
}
}
- for (i = 4; i < NUM_KNOWN_ATTRIBUTES; i++)
+ for (i = 4; i < NUM_KNOWN_OBJ_ATTRIBUTES; i++)
{
/* Merge this attribute with existing attributes. */
switch (i)
{
case Tag_CPU_raw_name:
case Tag_CPU_name:
- /* Use whichever has the greatest architecture requirements. */
- if (in_attr[Tag_CPU_arch].i > out_attr[Tag_CPU_arch].i)
- out_attr[i].s = attr_strdup(obfd, in_attr[i].s);
+ /* Use whichever has the greatest architecture requirements. We
+ won't necessarily have both the above tags, so make sure input
+ name is non-NULL. */
+ if (in_attr[Tag_CPU_arch].i > out_attr[Tag_CPU_arch].i
+ && in_attr[i].s)
+ out_attr[i].s = _bfd_elf_attr_strdup (obfd, in_attr[i].s);
break;
case Tag_ABI_optimization_goals:
@@ -5023,7 +6861,8 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
}
break;
case Tag_ABI_PCS_R9_use:
- if (out_attr[i].i != AEABI_R9_unused
+ if (in_attr[i].i != out_attr[i].i
+ && out_attr[i].i != AEABI_R9_unused
&& in_attr[i].i != AEABI_R9_unused)
{
_bfd_error_handler
@@ -5084,10 +6923,15 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
out_attr[i].i = in_attr[i].i;
}
else if (in_attr[i].i != AEABI_enum_forced_wide
- && out_attr[i].i != in_attr[i].i)
+ && out_attr[i].i != in_attr[i].i
+ && !elf32_arm_tdata (obfd)->no_enum_size_warning)
{
+ const char *aeabi_enum_names[] =
+ { "", "variable-size", "32-bit", "" };
_bfd_error_handler
- (_("ERROR: %B: Conflicting enum sizes"), ibfd);
+ (_("warning: %B uses %s enums yet the output is to use %s enums; use of enum values across objects may fail"),
+ ibfd, aeabi_enum_names[in_attr[i].i],
+ aeabi_enum_names[out_attr[i].i]);
}
}
break;
@@ -5108,60 +6952,13 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, bfd *obfd)
}
}
- in_list = elf32_arm_tdata (ibfd)->other_eabi_attributes;
- out_list = elf32_arm_tdata (ibfd)->other_eabi_attributes;
- while (in_list && in_list->tag == Tag_compatibility)
- {
- in_attr = &in_list->attr;
- if (in_attr->i == 0)
- continue;
- if (in_attr->i == 1)
- {
- _bfd_error_handler
- (_("ERROR: %B: Must be processed by '%s' toolchain"),
- ibfd, in_attr->s);
- return FALSE;
- }
- if (!out_list || out_list->tag != Tag_compatibility
- || strcmp (in_attr->s, out_list->attr.s) != 0)
- {
- /* Add this compatibility tag to the output. */
- elf32_arm_add_eabi_attr_compat (obfd, in_attr->i, in_attr->s);
- continue;
- }
- out_attr = &out_list->attr;
- /* Check all the input tags with the same identifier. */
- for (;;)
- {
- if (out_list->tag != Tag_compatibility
- || in_attr->i != out_attr->i
- || strcmp (in_attr->s, out_attr->s) != 0)
- {
- _bfd_error_handler
- (_("ERROR: %B: Incompatible object tag '%s':%d"),
- ibfd, in_attr->s, in_attr->i);
- return FALSE;
- }
- in_list = in_list->next;
- if (in_list->tag != Tag_compatibility
- || strcmp (in_attr->s, in_list->attr.s) != 0)
- break;
- in_attr = &in_list->attr;
- out_list = out_list->next;
- if (out_list)
- out_attr = &out_list->attr;
- }
+ /* Merge Tag_compatibility attributes and any common GNU ones. */
+ _bfd_elf_merge_object_attributes (ibfd, obfd);
- /* Check the output doesn't have extra tags with this identifier. */
- if (out_list && out_list->tag == Tag_compatibility
- && strcmp (in_attr->s, out_list->attr.s) == 0)
- {
- _bfd_error_handler
- (_("ERROR: %B: Incompatible object tag '%s':%d"),
- ibfd, in_attr->s, out_list->attr.i);
- return FALSE;
- }
- }
+ /* Check for any attributes not known on ARM. */
+ in_list = elf_other_obj_attributes_proc (ibfd);
+ while (in_list && in_list->tag == Tag_compatibility)
+ in_list = in_list->next;
for (; in_list; in_list = in_list->next)
{
@@ -5563,39 +7360,21 @@ elf32_arm_get_symbol_type (Elf_Internal_Sym * elf_sym, int type)
}
static asection *
-elf32_arm_gc_mark_hook (asection * sec,
- struct bfd_link_info * info ATTRIBUTE_UNUSED,
- Elf_Internal_Rela * rel,
- struct elf_link_hash_entry * h,
- Elf_Internal_Sym * sym)
+elf32_arm_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
if (h != NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
+ switch (ELF32_R_TYPE (rel->r_info))
{
case R_ARM_GNU_VTINHERIT:
case R_ARM_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ return NULL;
+ }
- return NULL;
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got entry reference counts for the section being removed. */
@@ -5661,13 +7440,23 @@ elf32_arm_gc_sweep_hook (bfd * abfd,
break;
case R_ARM_ABS32:
+ case R_ARM_ABS32_NOI:
case R_ARM_REL32:
+ case R_ARM_REL32_NOI:
case R_ARM_PC24:
case R_ARM_PLT32:
case R_ARM_CALL:
case R_ARM_JUMP24:
case R_ARM_PREL31:
case R_ARM_THM_CALL:
+ case R_ARM_MOVW_ABS_NC:
+ case R_ARM_MOVT_ABS:
+ case R_ARM_MOVW_PREL_NC:
+ case R_ARM_MOVT_PREL:
+ case R_ARM_THM_MOVW_ABS_NC:
+ case R_ARM_THM_MOVT_ABS:
+ case R_ARM_THM_MOVW_PREL_NC:
+ case R_ARM_THM_MOVT_PREL:
/* Should the interworking branches be here also? */
if (h != NULL)
@@ -5686,14 +7475,17 @@ elf32_arm_gc_sweep_hook (bfd * abfd,
}
if (r_type == R_ARM_ABS32
- || r_type == R_ARM_REL32)
+ || r_type == R_ARM_REL32
+ || r_type == R_ARM_ABS32_NOI
+ || r_type == R_ARM_REL32_NOI)
{
for (pp = &eh->relocs_copied; (p = *pp) != NULL;
pp = &p->next)
if (p->section == sec)
{
p->count -= 1;
- if (ELF32_R_TYPE (rel->r_info) == R_ARM_REL32)
+ if (ELF32_R_TYPE (rel->r_info) == R_ARM_REL32
+ || ELF32_R_TYPE (rel->r_info) == R_ARM_REL32_NOI)
p->pc_count -= 1;
if (p->count == 0)
*pp = p->next;
@@ -5871,13 +7663,23 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* Fall through */
case R_ARM_ABS32:
+ case R_ARM_ABS32_NOI:
case R_ARM_REL32:
+ case R_ARM_REL32_NOI:
case R_ARM_PC24:
case R_ARM_PLT32:
case R_ARM_CALL:
case R_ARM_JUMP24:
case R_ARM_PREL31:
case R_ARM_THM_CALL:
+ case R_ARM_MOVW_ABS_NC:
+ case R_ARM_MOVT_ABS:
+ case R_ARM_MOVW_PREL_NC:
+ case R_ARM_MOVT_PREL:
+ case R_ARM_THM_MOVW_ABS_NC:
+ case R_ARM_THM_MOVT_ABS:
+ case R_ARM_THM_MOVW_PREL_NC:
+ case R_ARM_THM_MOVT_PREL:
/* Should the interworking branches be listed here? */
if (h != NULL)
{
@@ -5894,12 +7696,11 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
refers to is in a different object. We can't tell for
sure yet, because something later might force the
symbol local. */
- if (r_type == R_ARM_PC24
- || r_type == R_ARM_CALL
- || r_type == R_ARM_JUMP24
- || r_type == R_ARM_PREL31
- || r_type == R_ARM_PLT32
- || r_type == R_ARM_THM_CALL)
+ if (r_type != R_ARM_ABS32
+ && r_type != R_ARM_REL32
+ && r_type != R_ARM_ABS32_NOI
+ && r_type != R_ARM_REL32_NOI
+ && r_type != R_ARM_ABS12)
h->needs_plt = 1;
/* If we create a PLT entry, this relocation will reference
@@ -5924,7 +7725,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
relocs_copied field of the hash table entry. */
if ((info->shared || htab->root.is_relocatable_executable)
&& (sec->flags & SEC_ALLOC) != 0
- && (r_type == R_ARM_ABS32
+ && ((r_type == R_ARM_ABS32 || r_type == R_ARM_ABS32_NOI)
|| (h != NULL && ! h->needs_plt
&& (! info->symbolic || ! h->def_regular))))
{
@@ -6008,7 +7809,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
p->pc_count = 0;
}
- if (r_type == R_ARM_REL32)
+ if (r_type == R_ARM_REL32 || r_type == R_ARM_REL32_NOI)
p->pc_count += 1;
p->count += 1;
}
@@ -6033,12 +7834,57 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
return TRUE;
}
+/* Unwinding tables are not referenced directly. This pass marks them as
+ required if the corresponding code section is marked. */
+
+static bfd_boolean
+elf32_arm_gc_mark_extra_sections(struct bfd_link_info *info,
+ elf_gc_mark_hook_fn gc_mark_hook)
+{
+ bfd *sub;
+ Elf_Internal_Shdr **elf_shdrp;
+ bfd_boolean again;
+
+ /* Marking EH data may cause additional code sections to be marked,
+ requiring multiple passes. */
+ again = TRUE;
+ while (again)
+ {
+ again = FALSE;
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ {
+ asection *o;
+
+ if (bfd_get_flavour (sub) != bfd_target_elf_flavour)
+ continue;
+
+ elf_shdrp = elf_elfsections (sub);
+ for (o = sub->sections; o != NULL; o = o->next)
+ {
+ Elf_Internal_Shdr *hdr;
+ hdr = &elf_section_data (o)->this_hdr;
+ if (hdr->sh_type == SHT_ARM_EXIDX && hdr->sh_link
+ && !o->gc_mark
+ && elf_shdrp[hdr->sh_link]->bfd_section->gc_mark)
+ {
+ again = TRUE;
+ if (!_bfd_elf_gc_mark (info, o, gc_mark_hook))
+ return FALSE;
+ }
+ }
+ }
+ }
+
+ return TRUE;
+}
+
/* Treat mapping symbols as special target symbols. */
static bfd_boolean
elf32_arm_is_target_special_symbol (bfd * abfd ATTRIBUTE_UNUSED, asymbol * sym)
{
- return bfd_is_arm_mapping_symbol_name (sym->name);
+ return bfd_is_arm_special_symbol_name (sym->name,
+ BFD_ARM_SPECIAL_SYM_TYPE_ANY);
}
/* This is a copy of elf_find_function() from elf.c except that
@@ -6074,9 +7920,10 @@ arm_elf_find_function (bfd * abfd ATTRIBUTE_UNUSED,
case STT_FUNC:
case STT_ARM_TFUNC:
case STT_NOTYPE:
- /* Skip $a and $t symbols. */
+ /* Skip mapping symbols. */
if ((q->symbol.flags & BSF_LOCAL)
- && bfd_is_arm_mapping_symbol_name (q->symbol.name))
+ && bfd_is_arm_special_symbol_name (q->symbol.name,
+ BFD_ARM_SPECIAL_SYM_TYPE_ANY))
continue;
/* Fall through. */
if (bfd_get_section (&q->symbol) == section
@@ -6177,7 +8024,6 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
{
bfd * dynobj;
asection * s;
- unsigned int power_of_two;
struct elf32_arm_link_hash_entry * eh;
struct elf32_arm_link_hash_table *globals;
@@ -6290,28 +8136,7 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info,
h->needs_copy = 1;
}
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 3)
- power_of_two = 3;
-
- /* Apply the required alignment. */
- s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
- if (power_of_two > bfd_get_section_alignment (dynobj, s))
- {
- if (! bfd_set_section_alignment (dynobj, s, power_of_two))
- return FALSE;
- }
-
- /* Define the symbol as being at this point in the section. */
- h->root.u.def.section = s;
- h->root.u.def.value = s->size;
-
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
-
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* Allocate space in .plt, .got and associated reloc sections for
@@ -6500,6 +8325,37 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
else
h->got.offset = (bfd_vma) -1;
+ /* Allocate stubs for exported Thumb functions on v4t. */
+ if (!htab->use_blx && h->dynindx != -1
+ && h->def_regular
+ && ELF_ST_TYPE (h->type) == STT_ARM_TFUNC
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+ {
+ struct elf_link_hash_entry * th;
+ struct bfd_link_hash_entry * bh;
+ struct elf_link_hash_entry * myh;
+ char name[1024];
+ asection *s;
+ bh = NULL;
+ /* Create a new symbol to regist the real location of the function. */
+ s = h->root.u.def.section;
+ sprintf(name, "__real_%s", h->root.root.string);
+ _bfd_generic_link_add_one_symbol (info, s->owner,
+ name, BSF_GLOBAL, s,
+ h->root.u.def.value,
+ NULL, TRUE, FALSE, &bh);
+
+ myh = (struct elf_link_hash_entry *) bh;
+ myh->type = ELF_ST_INFO (STB_LOCAL, STT_ARM_TFUNC);
+ myh->forced_local = 1;
+ eh->export_glue = myh;
+ th = record_arm_to_thumb_glue (info, h);
+ /* Point the symbol at the stub. */
+ h->type = ELF_ST_INFO (ELF_ST_BIND (h->type), STT_FUNC);
+ h->root.u.def.section = th->root.u.def.section;
+ h->root.u.def.value = th->root.u.def.value & ~1;
+ }
+
if (eh->relocs_copied == NULL)
return TRUE;
@@ -6511,12 +8367,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf)
if (info->shared || htab->root.is_relocatable_executable)
{
- /* The only reloc that uses pc_count is R_ARM_REL32, which will
- appear on something like ".long foo - .". We want calls to
- protected symbols to resolve directly to the function rather
- than going via the plt. If people want function pointer
- comparisons to work as expected then they should avoid
- writing assembly like ".long foo - .". */
+ /* The only relocs that use pc_count are R_ARM_REL32 and
+ R_ARM_REL32_NOI, which will appear on something like
+ ".long foo - .". We want calls to protected symbols to resolve
+ directly to the function rather than going via the plt. If people
+ want function pointer comparisons to work as expected then they
+ should avoid writing assembly like ".long foo - .". */
if (SYMBOL_CALLS_LOCAL (info, h))
{
struct elf32_arm_relocs_copied **pp;
@@ -6633,6 +8489,16 @@ elf32_arm_readonly_dynrelocs (struct elf_link_hash_entry *h, PTR inf)
return TRUE;
}
+void
+bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *info,
+ int byteswap_code)
+{
+ struct elf32_arm_link_hash_table *globals;
+
+ globals = elf32_arm_hash_table (info);
+ globals->byteswap_code = byteswap_code;
+}
+
/* Set the sizes of the dynamic sections. */
static bfd_boolean
@@ -6748,6 +8614,19 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
sym dynamic relocs. */
elf_link_hash_traverse (& htab->root, allocate_dynrelocs, info);
+ /* Here we rummage through the found bfds to collect glue information. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ /* Initialise mapping tables for code/data. */
+ bfd_elf32_arm_init_maps (ibfd);
+
+ if (!bfd_elf32_arm_process_before_allocation (ibfd, info)
+ || !bfd_elf32_arm_vfp11_erratum_scan (ibfd, info))
+ /* xgettext:c-format */
+ _bfd_error_handler (_("Errors encountered processing file %s"),
+ ibfd->filename);
+ }
+
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
@@ -6769,7 +8648,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
/* Remember whether there is a PLT. */
plt = s->size != 0;
}
- else if (strncmp (name, ".rel", 4) == 0)
+ else if (CONST_STRNEQ (name, ".rel"))
{
if (s->size != 0)
{
@@ -6783,7 +8662,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".got", 4) != 0
+ else if (! CONST_STRNEQ (name, ".got")
&& strcmp (name, ".dynbss") != 0)
{
/* It's not one of our sections, so don't allocate space. */
@@ -6910,16 +8789,17 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
/* Fill in the entry in the procedure linkage table. */
if (htab->symbian_p)
{
- unsigned i;
- for (i = 0; i < htab->plt_entry_size / 4; ++i)
- bfd_put_32 (output_bfd,
- elf32_arm_symbian_plt_entry[i],
- splt->contents + h->plt.offset + 4 * i);
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_symbian_plt_entry[0],
+ splt->contents + h->plt.offset);
+ bfd_put_32 (output_bfd,
+ elf32_arm_symbian_plt_entry[1],
+ splt->contents + h->plt.offset + 4);
/* Fill in the entry in the .rel.plt section. */
rel.r_offset = (splt->output_section->vma
+ splt->output_offset
- + h->plt.offset + 4 * (i - 1));
+ + h->plt.offset + 4);
rel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT);
/* Get the index in the procedure linkage table which
@@ -6934,6 +8814,7 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
bfd_vma got_offset, got_address, plt_address;
bfd_vma got_displacement;
asection * sgot;
+ bfd_byte * ptr;
sgot = bfd_get_section_by_name (dynobj, ".got.plt");
BFD_ASSERT (sgot != NULL);
@@ -6959,20 +8840,23 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
+ splt->output_offset
+ h->plt.offset);
+ ptr = htab->splt->contents + h->plt.offset;
if (htab->vxworks_p && info->shared)
{
unsigned int i;
bfd_vma val;
- for (i = 0; i != htab->plt_entry_size / 4; i++)
+ for (i = 0; i != htab->plt_entry_size / 4; i++, ptr += 4)
{
val = elf32_arm_vxworks_shared_plt_entry[i];
if (i == 2)
val |= got_address - sgot->output_section->vma;
if (i == 5)
val |= plt_index * RELOC_SIZE (htab);
- bfd_put_32 (output_bfd, val,
- htab->splt->contents + h->plt.offset + i * 4);
+ if (i == 2 || i == 5)
+ bfd_put_32 (output_bfd, val, ptr);
+ else
+ put_arm_insn (htab, output_bfd, val, ptr);
}
}
else if (htab->vxworks_p)
@@ -6980,7 +8864,7 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
unsigned int i;
bfd_vma val;
- for (i = 0; i != htab->plt_entry_size / 4; i++)
+ for (i = 0; i != htab->plt_entry_size / 4; i++, ptr += 4)
{
val = elf32_arm_vxworks_exec_plt_entry[i];
if (i == 2)
@@ -6989,8 +8873,10 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
val |= 0xffffff & -((h->plt.offset + i * 4 + 8) >> 2);
if (i == 5)
val |= plt_index * RELOC_SIZE (htab);
- bfd_put_32 (output_bfd, val,
- htab->splt->contents + h->plt.offset + i * 4);
+ if (i == 2 || i == 5)
+ bfd_put_32 (output_bfd, val, ptr);
+ else
+ put_arm_insn (htab, output_bfd, val, ptr);
}
loc = (htab->srelplt2->contents
@@ -7023,27 +8909,26 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info,
if (!htab->use_blx && eh->plt_thumb_refcount > 0)
{
- bfd_put_16 (output_bfd, elf32_arm_plt_thumb_stub[0],
- splt->contents + h->plt.offset - 4);
- bfd_put_16 (output_bfd, elf32_arm_plt_thumb_stub[1],
- splt->contents + h->plt.offset - 2);
+ put_thumb_insn (htab, output_bfd,
+ elf32_arm_plt_thumb_stub[0], ptr - 4);
+ put_thumb_insn (htab, output_bfd,
+ elf32_arm_plt_thumb_stub[1], ptr - 2);
}
- bfd_put_32 (output_bfd,
- elf32_arm_plt_entry[0]
- | ((got_displacement & 0x0ff00000) >> 20),
- splt->contents + h->plt.offset + 0);
- bfd_put_32 (output_bfd,
- elf32_arm_plt_entry[1]
- | ((got_displacement & 0x000ff000) >> 12),
- splt->contents + h->plt.offset + 4);
- bfd_put_32 (output_bfd,
- elf32_arm_plt_entry[2]
- | (got_displacement & 0x00000fff),
- splt->contents + h->plt.offset + 8);
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_plt_entry[0]
+ | ((got_displacement & 0x0ff00000) >> 20),
+ ptr + 0);
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_plt_entry[1]
+ | ((got_displacement & 0x000ff000) >> 12),
+ ptr+ 4);
+ put_arm_insn (htab, output_bfd,
+ elf32_arm_plt_entry[2]
+ | (got_displacement & 0x00000fff),
+ ptr + 8);
#ifdef FOUR_WORD_PLT
- bfd_put_32 (output_bfd, elf32_arm_plt_entry[3],
- splt->contents + h->plt.offset + 12);
+ bfd_put_32 (output_bfd, elf32_arm_plt_entry[3], ptr + 12);
#endif
}
@@ -7353,9 +9238,12 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info
Elf_Internal_Rela rel;
plt0_entry = elf32_arm_vxworks_exec_plt0_entry;
- bfd_put_32 (output_bfd, plt0_entry[0], splt->contents + 0);
- bfd_put_32 (output_bfd, plt0_entry[1], splt->contents + 4);
- bfd_put_32 (output_bfd, plt0_entry[2], splt->contents + 8);
+ put_arm_insn (htab, output_bfd, plt0_entry[0],
+ splt->contents + 0);
+ put_arm_insn (htab, output_bfd, plt0_entry[1],
+ splt->contents + 4);
+ put_arm_insn (htab, output_bfd, plt0_entry[2],
+ splt->contents + 8);
bfd_put_32 (output_bfd, got_address, splt->contents + 12);
/* Generate a relocation for _GLOBAL_OFFSET_TABLE_. */
@@ -7370,10 +9258,14 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info
got_displacement = got_address - (plt_address + 16);
plt0_entry = elf32_arm_plt0_entry;
- bfd_put_32 (output_bfd, plt0_entry[0], splt->contents + 0);
- bfd_put_32 (output_bfd, plt0_entry[1], splt->contents + 4);
- bfd_put_32 (output_bfd, plt0_entry[2], splt->contents + 8);
- bfd_put_32 (output_bfd, plt0_entry[3], splt->contents + 12);
+ put_arm_insn (htab, output_bfd, plt0_entry[0],
+ splt->contents + 0);
+ put_arm_insn (htab, output_bfd, plt0_entry[1],
+ splt->contents + 4);
+ put_arm_insn (htab, output_bfd, plt0_entry[2],
+ splt->contents + 8);
+ put_arm_insn (htab, output_bfd, plt0_entry[3],
+ splt->contents + 12);
#ifdef FOUR_WORD_PLT
/* The displacement value goes in the otherwise-unused
@@ -7387,7 +9279,8 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info
/* UnixWare sets the entsize of .plt to 4, although that doesn't
really seem like the right value. */
- elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
+ if (splt->output_section->owner == output_bfd)
+ elf_section_data (splt->output_section)->this_hdr.sh_entsize = 4;
if (htab->vxworks_p && !info->shared && htab->splt->size > 0)
{
@@ -7498,12 +9391,8 @@ elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED
static bfd_boolean
is_arm_elf_unwind_section_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name)
{
- size_t len1, len2;
-
- len1 = sizeof (ELF_STRING_ARM_unwind) - 1;
- len2 = sizeof (ELF_STRING_ARM_unwind_once) - 1;
- return (strncmp (name, ELF_STRING_ARM_unwind, len1) == 0
- || strncmp (name, ELF_STRING_ARM_unwind_once, len2) == 0);
+ return (CONST_STRNEQ (name, ELF_STRING_ARM_unwind)
+ || CONST_STRNEQ (name, ELF_STRING_ARM_unwind_once));
}
@@ -7522,125 +9411,9 @@ elf32_arm_fake_sections (bfd * abfd, Elf_Internal_Shdr * hdr, asection * sec)
hdr->sh_type = SHT_ARM_EXIDX;
hdr->sh_flags |= SHF_LINK_ORDER;
}
- else if (strcmp(name, ".ARM.attributes") == 0)
- {
- hdr->sh_type = SHT_ARM_ATTRIBUTES;
- }
return TRUE;
}
-/* Parse an Arm EABI attributes section. */
-static void
-elf32_arm_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr)
-{
- bfd_byte *contents;
- bfd_byte *p;
- bfd_vma len;
-
- contents = bfd_malloc (hdr->sh_size);
- if (!contents)
- return;
- if (!bfd_get_section_contents (abfd, hdr->bfd_section, contents, 0,
- hdr->sh_size))
- {
- free (contents);
- return;
- }
- p = contents;
- if (*(p++) == 'A')
- {
- len = hdr->sh_size - 1;
- while (len > 0)
- {
- int namelen;
- bfd_vma section_len;
-
- section_len = bfd_get_32 (abfd, p);
- p += 4;
- if (section_len > len)
- section_len = len;
- len -= section_len;
- namelen = strlen ((char *)p) + 1;
- section_len -= namelen + 4;
- if (strcmp((char *)p, "aeabi") != 0)
- {
- /* Vendor section. Ignore it. */
- p += namelen + section_len;
- }
- else
- {
- p += namelen;
- while (section_len > 0)
- {
- int tag;
- unsigned int n;
- unsigned int val;
- bfd_vma subsection_len;
- bfd_byte *end;
-
- tag = read_unsigned_leb128 (abfd, p, &n);
- p += n;
- subsection_len = bfd_get_32 (abfd, p);
- p += 4;
- if (subsection_len > section_len)
- subsection_len = section_len;
- section_len -= subsection_len;
- subsection_len -= n + 4;
- end = p + subsection_len;
- switch (tag)
- {
- case Tag_File:
- while (p < end)
- {
- bfd_boolean is_string;
-
- tag = read_unsigned_leb128 (abfd, p, &n);
- p += n;
- if (tag == 4 || tag == 5)
- is_string = 1;
- else if (tag < 32)
- is_string = 0;
- else
- is_string = (tag & 1) != 0;
- if (tag == Tag_compatibility)
- {
- val = read_unsigned_leb128 (abfd, p, &n);
- p += n;
- elf32_arm_add_eabi_attr_compat (abfd, val,
- (char *)p);
- p += strlen ((char *)p) + 1;
- }
- else if (is_string)
- {
- elf32_arm_add_eabi_attr_string (abfd, tag,
- (char *)p);
- p += strlen ((char *)p) + 1;
- }
- else
- {
- val = read_unsigned_leb128 (abfd, p, &n);
- p += n;
- elf32_arm_add_eabi_attr_int (abfd, tag, val);
- }
- }
- break;
- case Tag_Section:
- case Tag_Symbol:
- /* Don't have anywhere convenient to attach these.
- Fall through for now. */
- default:
- /* Ignore things we don't kow about. */
- p += subsection_len;
- subsection_len = 0;
- break;
- }
- }
- }
- }
- }
- free (contents);
-}
-
/* Handle an ARM specific section when reading an object file. This is
called when bfd_section_from_shdr finds a section with an unknown
type. */
@@ -7670,8 +9443,6 @@ elf32_arm_section_from_shdr (bfd *abfd,
if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex))
return FALSE;
- if (hdr->sh_type == SHT_ARM_ATTRIBUTES)
- elf32_arm_parse_attributes(abfd, hdr);
return TRUE;
}
@@ -7776,61 +9547,218 @@ unrecord_section_with_arm_elf_section_data (asection * sec)
}
}
-/* Called for each symbol. Builds a section map based on mapping symbols.
- Does not alter any of the symbols. */
-static bfd_boolean
-elf32_arm_output_symbol_hook (struct bfd_link_info *info,
- const char *name,
- Elf_Internal_Sym *elfsym,
- asection *input_sec,
- struct elf_link_hash_entry *h)
+typedef struct
{
- int mapcount;
- elf32_arm_section_map *map;
- elf32_arm_section_map *newmap;
- _arm_elf_section_data *arm_data;
- struct elf32_arm_link_hash_table *globals;
+ void *finfo;
+ struct bfd_link_info *info;
+ asection *sec;
+ int sec_shndx;
+ bfd_boolean (*func) (void *, const char *, Elf_Internal_Sym *,
+ asection *, struct elf_link_hash_entry *);
+} output_arch_syminfo;
- globals = elf32_arm_hash_table (info);
- if (globals->vxworks_p
- && !elf_vxworks_link_output_symbol_hook (info, name, elfsym,
- input_sec, h))
+enum map_symbol_type
+{
+ ARM_MAP_ARM,
+ ARM_MAP_THUMB,
+ ARM_MAP_DATA
+};
+
+
+/* Output a single PLT mapping symbol. */
+
+static bfd_boolean
+elf32_arm_ouput_plt_map_sym (output_arch_syminfo *osi,
+ enum map_symbol_type type,
+ bfd_vma offset)
+{
+ static const char *names[3] = {"$a", "$t", "$d"};
+ struct elf32_arm_link_hash_table *htab;
+ Elf_Internal_Sym sym;
+
+ htab = elf32_arm_hash_table (osi->info);
+ sym.st_value = osi->sec->output_section->vma
+ + osi->sec->output_offset
+ + offset;
+ sym.st_size = 0;
+ sym.st_other = 0;
+ sym.st_info = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE);
+ sym.st_shndx = osi->sec_shndx;
+ if (!osi->func (osi->finfo, names[type], &sym, osi->sec, NULL))
return FALSE;
+ return TRUE;
+}
- /* Only do this on final link. */
- if (info->relocatable)
- return TRUE;
- /* Only build a map if we need to byteswap code. */
- if (!globals->byteswap_code)
- return TRUE;
+/* Output mapping symbols for PLT entries associated with H. */
- /* We only want mapping symbols. */
- if (! bfd_is_arm_mapping_symbol_name (name))
+static bfd_boolean
+elf32_arm_output_plt_map (struct elf_link_hash_entry *h, void *inf)
+{
+ output_arch_syminfo *osi = (output_arch_syminfo *) inf;
+ struct elf32_arm_link_hash_table *htab;
+ struct elf32_arm_link_hash_entry *eh;
+ bfd_vma addr;
+
+ htab = elf32_arm_hash_table (osi->info);
+
+ if (h->root.type == bfd_link_hash_indirect)
return TRUE;
- /* If this section has not been allocated an _arm_elf_section_data
- structure then we cannot record anything. */
- arm_data = get_arm_elf_section_data (input_sec);
- if (arm_data == NULL)
+ if (h->root.type == bfd_link_hash_warning)
+ /* When warning symbols are created, they **replace** the "real"
+ entry in the hash table, thus we never get to see the real
+ symbol in a hash traversal. So look at it now. */
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (h->plt.offset == (bfd_vma) -1)
return TRUE;
- mapcount = arm_data->mapcount + 1;
- map = arm_data->map;
+ eh = (struct elf32_arm_link_hash_entry *) h;
+ addr = h->plt.offset;
+ if (htab->symbian_p)
+ {
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_ARM, addr))
+ return FALSE;
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_DATA, addr + 4))
+ return FALSE;
+ }
+ else if (htab->vxworks_p)
+ {
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_ARM, addr))
+ return FALSE;
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_DATA, addr + 8))
+ return FALSE;
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_ARM, addr + 12))
+ return FALSE;
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_DATA, addr + 20))
+ return FALSE;
+ }
+ else
+ {
+ bfd_boolean thumb_stub;
+
+ thumb_stub = eh->plt_thumb_refcount > 0 && !htab->use_blx;
+ if (thumb_stub)
+ {
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_THUMB, addr - 4))
+ return FALSE;
+ }
+#ifdef FOUR_WORD_PLT
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_ARM, addr))
+ return FALSE;
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_DATA, addr + 12))
+ return FALSE;
+#else
+ /* A three-word PLT with no Thumb thunk contains only Arm code,
+ so only need to output a mapping symbol for the first PLT entry and
+ entries with thumb thunks. */
+ if (thumb_stub || addr == 20)
+ {
+ if (!elf32_arm_ouput_plt_map_sym (osi, ARM_MAP_ARM, addr))
+ return FALSE;
+ }
+#endif
+ }
- /* TODO: This may be inefficient, but we probably don't usually have many
- mapping symbols per section. */
- newmap = bfd_realloc (map, mapcount * sizeof (* map));
- if (newmap != NULL)
+ return TRUE;
+}
+
+
+/* Output mapping symbols for linker generated sections. */
+
+static bfd_boolean
+elf32_arm_output_arch_local_syms (bfd *output_bfd,
+ struct bfd_link_info *info,
+ void *finfo, bfd_boolean (*func) (void *, const char *,
+ Elf_Internal_Sym *,
+ asection *,
+ struct elf_link_hash_entry *))
+{
+ output_arch_syminfo osi;
+ struct elf32_arm_link_hash_table *htab;
+ bfd_vma offset;
+ bfd_size_type size;
+
+ htab = elf32_arm_hash_table (info);
+ check_use_blx(htab);
+
+ osi.finfo = finfo;
+ osi.info = info;
+ osi.func = func;
+
+ /* ARM->Thumb glue. */
+ if (htab->arm_glue_size > 0)
{
- arm_data->map = newmap;
- arm_data->mapcount = mapcount;
+ osi.sec = bfd_get_section_by_name (htab->bfd_of_glue_owner,
+ ARM2THUMB_GLUE_SECTION_NAME);
+
+ osi.sec_shndx = _bfd_elf_section_from_bfd_section
+ (output_bfd, osi.sec->output_section);
+ if (info->shared || htab->root.is_relocatable_executable
+ || htab->pic_veneer)
+ size = ARM2THUMB_PIC_GLUE_SIZE;
+ else if (htab->use_blx)
+ size = ARM2THUMB_V5_STATIC_GLUE_SIZE;
+ else
+ size = ARM2THUMB_STATIC_GLUE_SIZE;
+
+ for (offset = 0; offset < htab->arm_glue_size; offset += size)
+ {
+ elf32_arm_ouput_plt_map_sym (&osi, ARM_MAP_ARM, offset);
+ elf32_arm_ouput_plt_map_sym (&osi, ARM_MAP_DATA, offset + size - 4);
+ }
+ }
+
+ /* Thumb->ARM glue. */
+ if (htab->thumb_glue_size > 0)
+ {
+ osi.sec = bfd_get_section_by_name (htab->bfd_of_glue_owner,
+ THUMB2ARM_GLUE_SECTION_NAME);
+
+ osi.sec_shndx = _bfd_elf_section_from_bfd_section
+ (output_bfd, osi.sec->output_section);
+ size = THUMB2ARM_GLUE_SIZE;
+
+ for (offset = 0; offset < htab->thumb_glue_size; offset += size)
+ {
+ elf32_arm_ouput_plt_map_sym (&osi, ARM_MAP_THUMB, offset);
+ elf32_arm_ouput_plt_map_sym (&osi, ARM_MAP_ARM, offset + 4);
+ }
+ }
+
+ /* Finally, output mapping symbols for the PLT. */
+ if (!htab->splt || htab->splt->size == 0)
+ return TRUE;
- newmap[mapcount - 1].vma = elfsym->st_value;
- newmap[mapcount - 1].type = name[1];
+ osi.sec_shndx = _bfd_elf_section_from_bfd_section (output_bfd,
+ htab->splt->output_section);
+ osi.sec = htab->splt;
+ /* Output mapping symbols for the plt header. SymbianOS does not have a
+ plt header. */
+ if (htab->vxworks_p)
+ {
+ /* VxWorks shared libraries have no PLT header. */
+ if (!info->shared)
+ {
+ if (!elf32_arm_ouput_plt_map_sym (&osi, ARM_MAP_ARM, 0))
+ return FALSE;
+ if (!elf32_arm_ouput_plt_map_sym (&osi, ARM_MAP_DATA, 12))
+ return FALSE;
+ }
+ }
+ else if (!htab->symbian_p)
+ {
+ if (!elf32_arm_ouput_plt_map_sym (&osi, ARM_MAP_ARM, 0))
+ return FALSE;
+#ifndef FOUR_WORD_PLT
+ if (!elf32_arm_ouput_plt_map_sym (&osi, ARM_MAP_DATA, 16))
+ return FALSE;
+#endif
}
+ elf_link_hash_traverse (&htab->root, elf32_arm_output_plt_map, (void *) &osi);
return TRUE;
}
@@ -7839,13 +9767,16 @@ elf32_arm_output_symbol_hook (struct bfd_link_info *info,
static bfd_boolean
elf32_arm_new_section_hook (bfd *abfd, asection *sec)
{
- _arm_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
+ if (!sec->used_by_bfd)
+ {
+ _arm_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
- sdata = bfd_zalloc (abfd, amt);
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = sdata;
+ sdata = bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = sdata;
+ }
record_section_with_arm_elf_section_data (sec);
@@ -7867,15 +9798,18 @@ elf32_arm_compare_mapping (const void * a, const void * b)
written out as normal. */
static bfd_boolean
-elf32_arm_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, asection *sec,
+elf32_arm_write_section (bfd *output_bfd,
+ struct bfd_link_info *link_info, asection *sec,
bfd_byte *contents)
{
- int mapcount;
+ int mapcount, errcount;
_arm_elf_section_data *arm_data;
+ struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info);
elf32_arm_section_map *map;
+ elf32_vfp11_erratum_list *errnode;
bfd_vma ptr;
bfd_vma end;
- bfd_vma offset;
+ bfd_vma offset = sec->output_section->vma + sec->output_offset;
bfd_byte tmp;
int i;
@@ -7887,57 +9821,136 @@ elf32_arm_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, asection *sec,
mapcount = arm_data->mapcount;
map = arm_data->map;
+ errcount = arm_data->erratumcount;
+
+ if (errcount != 0)
+ {
+ unsigned int endianflip = bfd_big_endian (output_bfd) ? 3 : 0;
+
+ for (errnode = arm_data->erratumlist; errnode != 0;
+ errnode = errnode->next)
+ {
+ bfd_vma index = errnode->vma - offset;
+
+ switch (errnode->type)
+ {
+ case VFP11_ERRATUM_BRANCH_TO_ARM_VENEER:
+ {
+ bfd_vma branch_to_veneer;
+ /* Original condition code of instruction, plus bit mask for
+ ARM B instruction. */
+ unsigned int insn = (errnode->u.b.vfp_insn & 0xf0000000)
+ | 0x0a000000;
+
+ /* The instruction is before the label. */
+ index -= 4;
+
+ /* Above offset included in -4 below. */
+ branch_to_veneer = errnode->u.b.veneer->vma
+ - errnode->vma - 4;
+
+ if ((signed) branch_to_veneer < -(1 << 25)
+ || (signed) branch_to_veneer >= (1 << 25))
+ (*_bfd_error_handler) (_("%B: error: VFP11 veneer out of "
+ "range"), output_bfd);
+
+ insn |= (branch_to_veneer >> 2) & 0xffffff;
+ contents[endianflip ^ index] = insn & 0xff;
+ contents[endianflip ^ (index + 1)] = (insn >> 8) & 0xff;
+ contents[endianflip ^ (index + 2)] = (insn >> 16) & 0xff;
+ contents[endianflip ^ (index + 3)] = (insn >> 24) & 0xff;
+ }
+ break;
+
+ case VFP11_ERRATUM_ARM_VENEER:
+ {
+ bfd_vma branch_from_veneer;
+ unsigned int insn;
+
+ /* Take size of veneer into account. */
+ branch_from_veneer = errnode->u.v.branch->vma
+ - errnode->vma - 12;
+
+ if ((signed) branch_from_veneer < -(1 << 25)
+ || (signed) branch_from_veneer >= (1 << 25))
+ (*_bfd_error_handler) (_("%B: error: VFP11 veneer out of "
+ "range"), output_bfd);
+
+ /* Original instruction. */
+ insn = errnode->u.v.branch->u.b.vfp_insn;
+ contents[endianflip ^ index] = insn & 0xff;
+ contents[endianflip ^ (index + 1)] = (insn >> 8) & 0xff;
+ contents[endianflip ^ (index + 2)] = (insn >> 16) & 0xff;
+ contents[endianflip ^ (index + 3)] = (insn >> 24) & 0xff;
+
+ /* Branch back to insn after original insn. */
+ insn = 0xea000000 | ((branch_from_veneer >> 2) & 0xffffff);
+ contents[endianflip ^ (index + 4)] = insn & 0xff;
+ contents[endianflip ^ (index + 5)] = (insn >> 8) & 0xff;
+ contents[endianflip ^ (index + 6)] = (insn >> 16) & 0xff;
+ contents[endianflip ^ (index + 7)] = (insn >> 24) & 0xff;
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ }
if (mapcount == 0)
return FALSE;
- qsort (map, mapcount, sizeof (* map), elf32_arm_compare_mapping);
-
- offset = sec->output_section->vma + sec->output_offset;
- ptr = map[0].vma - offset;
- for (i = 0; i < mapcount; i++)
+ if (globals->byteswap_code)
{
- if (i == mapcount - 1)
- end = sec->size;
- else
- end = map[i + 1].vma - offset;
+ qsort (map, mapcount, sizeof (* map), elf32_arm_compare_mapping);
- switch (map[i].type)
- {
- case 'a':
- /* Byte swap code words. */
- while (ptr + 3 < end)
- {
- tmp = contents[ptr];
- contents[ptr] = contents[ptr + 3];
- contents[ptr + 3] = tmp;
- tmp = contents[ptr + 1];
- contents[ptr + 1] = contents[ptr + 2];
- contents[ptr + 2] = tmp;
- ptr += 4;
- }
- break;
+ ptr = map[0].vma;
+ for (i = 0; i < mapcount; i++)
+ {
+ if (i == mapcount - 1)
+ end = sec->size;
+ else
+ end = map[i + 1].vma;
- case 't':
- /* Byte swap code halfwords. */
- while (ptr + 1 < end)
+ switch (map[i].type)
{
- tmp = contents[ptr];
- contents[ptr] = contents[ptr + 1];
- contents[ptr + 1] = tmp;
- ptr += 2;
- }
- break;
+ case 'a':
+ /* Byte swap code words. */
+ while (ptr + 3 < end)
+ {
+ tmp = contents[ptr];
+ contents[ptr] = contents[ptr + 3];
+ contents[ptr + 3] = tmp;
+ tmp = contents[ptr + 1];
+ contents[ptr + 1] = contents[ptr + 2];
+ contents[ptr + 2] = tmp;
+ ptr += 4;
+ }
+ break;
- case 'd':
- /* Leave data alone. */
- break;
- }
- ptr = end;
+ case 't':
+ /* Byte swap code halfwords. */
+ while (ptr + 1 < end)
+ {
+ tmp = contents[ptr];
+ contents[ptr] = contents[ptr + 1];
+ contents[ptr + 1] = tmp;
+ ptr += 2;
+ }
+ break;
+
+ case 'd':
+ /* Leave data alone. */
+ break;
+ }
+ ptr = end;
+ }
}
free (map);
arm_data->mapcount = 0;
+ arm_data->mapsize = 0;
arm_data->map = NULL;
unrecord_section_with_arm_elf_section_data (sec);
@@ -7955,11 +9968,25 @@ unrecord_section_via_map_over_sections (bfd * abfd ATTRIBUTE_UNUSED,
static bfd_boolean
elf32_arm_close_and_cleanup (bfd * abfd)
{
- bfd_map_over_sections (abfd, unrecord_section_via_map_over_sections, NULL);
+ if (abfd->sections)
+ bfd_map_over_sections (abfd,
+ unrecord_section_via_map_over_sections,
+ NULL);
return _bfd_elf_close_and_cleanup (abfd);
}
+static bfd_boolean
+elf32_arm_bfd_free_cached_info (bfd * abfd)
+{
+ if (abfd->sections)
+ bfd_map_over_sections (abfd,
+ unrecord_section_via_map_over_sections,
+ NULL);
+
+ return _bfd_free_cached_info (abfd);
+}
+
/* Display STT_ARM_TFUNC symbols as functions. */
static void
@@ -7975,13 +10002,14 @@ elf32_arm_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
/* Mangle thumb function symbols as we read them in. */
-static void
+static bfd_boolean
elf32_arm_swap_symbol_in (bfd * abfd,
const void *psrc,
const void *pshn,
Elf_Internal_Sym *dst)
{
- bfd_elf32_swap_symbol_in (abfd, psrc, pshn, dst);
+ if (!bfd_elf32_swap_symbol_in (abfd, psrc, pshn, dst))
+ return FALSE;
/* New EABI objects mark thumb function symbols by setting the low bit of
the address. Turn these into STT_ARM_TFUNC. */
@@ -7991,6 +10019,7 @@ elf32_arm_swap_symbol_in (bfd * abfd,
dst->st_info = ELF_ST_INFO (ELF_ST_BIND (dst->st_info), STT_ARM_TFUNC);
dst->st_value &= ~(bfd_vma) 1;
}
+ return TRUE;
}
@@ -8012,7 +10041,18 @@ elf32_arm_swap_symbol_out (bfd *abfd,
{
newsym = *src;
newsym.st_info = ELF_ST_INFO (ELF_ST_BIND (src->st_info), STT_FUNC);
- newsym.st_value |= 1;
+ if (newsym.st_shndx != SHN_UNDEF)
+ {
+ /* Do this only for defined symbols. At link type, the static
+ linker will simulate the work of dynamic linker of resolving
+ symbols and will carry over the thumbness of found symbols to
+ the output symbol table. It's not clear how it happens, but
+ the thumbness of undefined symbols can well be different at
+ runtime, and writing '1' for them will be confusing for users
+ and possibly for dynamic linker itself.
+ */
+ newsym.st_value |= 1;
+ }
src = &newsym;
}
@@ -8057,7 +10097,8 @@ elf32_arm_modify_segment_map (bfd *abfd,
/* We may add a PT_ARM_EXIDX program header. */
static int
-elf32_arm_additional_program_headers (bfd *abfd)
+elf32_arm_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *sec;
@@ -8068,6 +10109,13 @@ elf32_arm_additional_program_headers (bfd *abfd)
return 0;
}
+/* We have two function types: STT_FUNC and STT_ARM_TFUNC. */
+static bfd_boolean
+elf32_arm_is_function_type (unsigned int type)
+{
+ return (type == STT_FUNC) || (type == STT_ARM_TFUNC);
+}
+
/* We use this to override swap_symbol_in and swap_symbol_out. */
const struct elf_size_info elf32_arm_size_info = {
sizeof (Elf32_External_Ehdr),
@@ -8105,6 +10153,7 @@ const struct elf_size_info elf32_arm_size_info = {
#define ELF_MAXPAGESIZE 0x8000
#endif
#define ELF_MINPAGESIZE 0x1000
+#define ELF_COMMONPAGESIZE 0x1000
#define bfd_elf32_mkobject elf32_arm_mkobject
@@ -8114,15 +10163,17 @@ const struct elf_size_info elf32_arm_size_info = {
#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_name_lookup elf32_arm_reloc_name_lookup
#define bfd_elf32_find_nearest_line elf32_arm_find_nearest_line
#define bfd_elf32_find_inliner_info elf32_arm_find_inliner_info
#define bfd_elf32_new_section_hook elf32_arm_new_section_hook
#define bfd_elf32_bfd_is_target_special_symbol elf32_arm_is_target_special_symbol
#define bfd_elf32_close_and_cleanup elf32_arm_close_and_cleanup
-#define bfd_elf32_bfd_final_link elf32_arm_bfd_final_link
+#define bfd_elf32_bfd_free_cached_info elf32_arm_bfd_free_cached_info
#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_mark_extra_sections elf32_arm_gc_mark_extra_sections
#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
@@ -8131,8 +10182,8 @@ const struct elf_size_info elf32_arm_size_info = {
#define elf_backend_create_dynamic_sections elf32_arm_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_link_output_symbol_hook elf32_arm_output_symbol_hook
#define elf_backend_size_dynamic_sections elf32_arm_size_dynamic_sections
+#define elf_backend_init_index_section _bfd_elf_init_2_index_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_object_p elf32_arm_object_p
@@ -8146,6 +10197,11 @@ const struct elf_size_info elf32_arm_size_info = {
#define elf_backend_modify_segment_map elf32_arm_modify_segment_map
#define elf_backend_additional_program_headers \
elf32_arm_additional_program_headers
+#define elf_backend_output_arch_local_syms \
+ elf32_arm_output_arch_local_syms
+#define elf_backend_begin_write_processing \
+ elf32_arm_begin_write_processing
+#define elf_backend_is_function_type elf32_arm_is_function_type
#define elf_backend_can_refcount 1
#define elf_backend_can_gc_sections 1
@@ -8155,10 +10211,18 @@ const struct elf_size_info elf32_arm_size_info = {
#define elf_backend_may_use_rel_p 1
#define elf_backend_may_use_rela_p 0
#define elf_backend_default_use_rela_p 0
-#define elf_backend_rela_normal 0
#define elf_backend_got_header_size 12
+#undef elf_backend_obj_attrs_vendor
+#define elf_backend_obj_attrs_vendor "aeabi"
+#undef elf_backend_obj_attrs_section
+#define elf_backend_obj_attrs_section ".ARM.attributes"
+#undef elf_backend_obj_attrs_arg_type
+#define elf_backend_obj_attrs_arg_type elf32_arm_obj_attrs_arg_type
+#undef elf_backend_obj_attrs_section_type
+#define elf_backend_obj_attrs_section_type SHT_ARM_ATTRIBUTES
+
#include "elf32-target.h"
/* VxWorks Targets */
@@ -8219,8 +10283,6 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
#define elf_backend_may_use_rela_p 1
#undef elf_backend_default_use_rela_p
#define elf_backend_default_use_rela_p 1
-#undef elf_backend_rela_normal
-#define elf_backend_rela_normal 1
#undef elf_backend_want_plt_sym
#define elf_backend_want_plt_sym 1
#undef ELF_MAXPAGESIZE
@@ -8271,24 +10333,23 @@ elf32_arm_symbian_special_sections[] =
the loadable read-only segment. The post-linker may wish to
refer to these sections, but they are not part of the final
program image. */
- { ".dynamic", 8, 0, SHT_DYNAMIC, 0 },
- { ".dynstr", 7, 0, SHT_STRTAB, 0 },
- { ".dynsym", 7, 0, SHT_DYNSYM, 0 },
- { ".got", 4, 0, SHT_PROGBITS, 0 },
- { ".hash", 5, 0, SHT_HASH, 0 },
+ { STRING_COMMA_LEN (".dynamic"), 0, SHT_DYNAMIC, 0 },
+ { STRING_COMMA_LEN (".dynstr"), 0, SHT_STRTAB, 0 },
+ { STRING_COMMA_LEN (".dynsym"), 0, SHT_DYNSYM, 0 },
+ { STRING_COMMA_LEN (".got"), 0, SHT_PROGBITS, 0 },
+ { STRING_COMMA_LEN (".hash"), 0, SHT_HASH, 0 },
/* These sections do not need to be writable as the SymbianOS
postlinker will arrange things so that no dynamic relocation is
required. */
- { ".init_array", 11, 0, SHT_INIT_ARRAY, SHF_ALLOC },
- { ".fini_array", 11, 0, SHT_FINI_ARRAY, SHF_ALLOC },
- { ".preinit_array", 14, 0, SHT_PREINIT_ARRAY, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".init_array"), 0, SHT_INIT_ARRAY, SHF_ALLOC },
+ { STRING_COMMA_LEN (".fini_array"), 0, SHT_FINI_ARRAY, SHF_ALLOC },
+ { STRING_COMMA_LEN (".preinit_array"), 0, SHT_PREINIT_ARRAY, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
static void
elf32_arm_symbian_begin_write_processing (bfd *abfd,
- struct bfd_link_info *link_info
- ATTRIBUTE_UNUSED)
+ struct bfd_link_info *link_info)
{
/* BPABI objects are never loaded directly by an OS kernel; they are
processed by a postlinker first, into an OS-specific format. If
@@ -8299,6 +10360,7 @@ elf32_arm_symbian_begin_write_processing (bfd *abfd,
recognize that the program headers should not be mapped into any
loadable segment. */
abfd->flags &= ~D_PAGED;
+ elf32_arm_begin_write_processing(abfd, link_info);
}
static bfd_boolean
@@ -8315,9 +10377,16 @@ elf32_arm_symbian_modify_segment_map (bfd *abfd,
dynsec = bfd_get_section_by_name (abfd, ".dynamic");
if (dynsec)
{
- m = _bfd_elf_make_dynamic_segment (abfd, dynsec);
- m->next = elf_tdata (abfd)->segment_map;
- elf_tdata (abfd)->segment_map = m;
+ for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ if (m->p_type == PT_DYNAMIC)
+ break;
+
+ if (m == NULL)
+ {
+ m = _bfd_elf_make_dynamic_segment (abfd, dynsec);
+ m->next = elf_tdata (abfd)->segment_map;
+ elf_tdata (abfd)->segment_map = m;
+ }
}
/* Also call the generic arm routine. */
@@ -8366,8 +10435,6 @@ elf32_arm_symbian_modify_segment_map (bfd *abfd,
#define elf_backend_may_use_rela_p 0
#undef elf_backend_default_use_rela_p
#define elf_backend_default_use_rela_p 0
-#undef elf_backend_rela_normal
-#define elf_backend_rela_normal 0
#undef elf_backend_want_plt_sym
#define elf_backend_want_plt_sym 0
#undef ELF_MAXPAGESIZE
diff --git a/contrib/binutils/bfd/elf32-avr.h b/contrib/binutils/bfd/elf32-avr.h
new file mode 100644
index 0000000..4b9035f
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-avr.h
@@ -0,0 +1,38 @@
+/* AVR-specific support for 32-bit ELF.
+ Copyright 2006 Free Software Foundation, Inc.
+
+ Written by Bjoern Haase <bjoern.m.haase@web.de>
+
+ 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., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+
+/* These four functions will be called from the ld back-end. */
+
+extern void
+elf32_avr_setup_params (struct bfd_link_info *, bfd *, asection *,
+ bfd_boolean, bfd_boolean, bfd_boolean,
+ bfd_vma, bfd_boolean);
+
+extern int
+elf32_avr_setup_section_lists (bfd *, struct bfd_link_info *);
+
+extern bfd_boolean
+elf32_avr_size_stubs (bfd *, struct bfd_link_info *, bfd_boolean);
+
+extern bfd_boolean
+elf32_avr_build_stubs (struct bfd_link_info *);
diff --git a/contrib/binutils/bfd/elf32-cr16.c b/contrib/binutils/bfd/elf32-cr16.c
new file mode 100644
index 0000000..197bff7
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-cr16.c
@@ -0,0 +1,1433 @@
+/* BFD back-end for National Semiconductor's CR16 ELF
+ Copyright 2007 Free Software Foundation, Inc.
+ Written by M R Swami Reddy.
+
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "libiberty.h"
+#include "elf-bfd.h"
+#include "elf/cr16.h"
+
+/* cr16_reloc_map array maps BFD relocation enum into a CRGAS relocation type. */
+
+struct cr16_reloc_map
+{
+ bfd_reloc_code_real_type bfd_reloc_enum; /* BFD relocation enum. */
+ unsigned short cr16_reloc_type; /* CR16 relocation type. */
+};
+
+static const struct cr16_reloc_map cr16_reloc_map[R_CR16_MAX] =
+{
+ {BFD_RELOC_NONE, R_CR16_NONE},
+ {BFD_RELOC_CR16_NUM8, R_CR16_NUM8},
+ {BFD_RELOC_CR16_NUM16, R_CR16_NUM16},
+ {BFD_RELOC_CR16_NUM32, R_CR16_NUM32},
+ {BFD_RELOC_CR16_NUM32a, R_CR16_NUM32a},
+ {BFD_RELOC_CR16_REGREL4, R_CR16_REGREL4},
+ {BFD_RELOC_CR16_REGREL4a, R_CR16_REGREL4a},
+ {BFD_RELOC_CR16_REGREL14, R_CR16_REGREL14},
+ {BFD_RELOC_CR16_REGREL14a, R_CR16_REGREL14a},
+ {BFD_RELOC_CR16_REGREL16, R_CR16_REGREL16},
+ {BFD_RELOC_CR16_REGREL20, R_CR16_REGREL20},
+ {BFD_RELOC_CR16_REGREL20a, R_CR16_REGREL20a},
+ {BFD_RELOC_CR16_ABS20, R_CR16_ABS20},
+ {BFD_RELOC_CR16_ABS24, R_CR16_ABS24},
+ {BFD_RELOC_CR16_IMM4, R_CR16_IMM4},
+ {BFD_RELOC_CR16_IMM8, R_CR16_IMM8},
+ {BFD_RELOC_CR16_IMM16, R_CR16_IMM16},
+ {BFD_RELOC_CR16_IMM20, R_CR16_IMM20},
+ {BFD_RELOC_CR16_IMM24, R_CR16_IMM24},
+ {BFD_RELOC_CR16_IMM32, R_CR16_IMM32},
+ {BFD_RELOC_CR16_IMM32a, R_CR16_IMM32a},
+ {BFD_RELOC_CR16_DISP4, R_CR16_DISP4},
+ {BFD_RELOC_CR16_DISP8, R_CR16_DISP8},
+ {BFD_RELOC_CR16_DISP16, R_CR16_DISP16},
+ {BFD_RELOC_CR16_DISP24, R_CR16_DISP24},
+ {BFD_RELOC_CR16_DISP24a, R_CR16_DISP24a}
+};
+
+static reloc_howto_type cr16_elf_howto_table[] =
+{
+ HOWTO (R_CR16_NONE, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_NONE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_NUM8, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_NUM8", /* name */
+ FALSE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_NUM16, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_NUM16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_NUM32, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_NUM32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_NUM32a, /* type */
+ 1, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_NUM32a", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_REGREL4, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_REGREL4", /* name */
+ FALSE, /* partial_inplace */
+ 0xf, /* src_mask */
+ 0xf, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_REGREL4a, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_REGREL4a", /* name */
+ FALSE, /* partial_inplace */
+ 0xf, /* src_mask */
+ 0xf, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_REGREL14, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 14, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_REGREL14", /* name */
+ FALSE, /* partial_inplace */
+ 0x3fff, /* src_mask */
+ 0x3fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_REGREL14a, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 14, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_REGREL14a", /* name */
+ FALSE, /* partial_inplace */
+ 0x3fff, /* src_mask */
+ 0x3fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_REGREL16, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_REGREL16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_REGREL20, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 20, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_REGREL20", /* name */
+ FALSE, /* partial_inplace */
+ 0xfffff, /* src_mask */
+ 0xfffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_REGREL20a, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 20, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_REGREL20a", /* name */
+ FALSE, /* partial_inplace */
+ 0xfffff, /* src_mask */
+ 0xfffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_ABS20, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 20, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_ABS20", /* name */
+ FALSE, /* partial_inplace */
+ 0xfffff, /* src_mask */
+ 0xfffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_ABS24, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 24, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_ABS24", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffff, /* src_mask */
+ 0xffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_IMM4, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_IMM4", /* name */
+ FALSE, /* partial_inplace */
+ 0xf, /* src_mask */
+ 0xf, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_IMM8, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_IMM8", /* name */
+ FALSE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_IMM16, /* type */
+ 0, /* rightshift */
+ 1, /* size */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_IMM16", /* name */
+ FALSE, /* partial_inplace */
+ 0xffff, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_IMM20, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 20, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_IMM20", /* name */
+ FALSE, /* partial_inplace */
+ 0xfffff, /* src_mask */
+ 0xfffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_IMM24, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 24, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_IMM24", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffff, /* src_mask */
+ 0xffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_IMM32, /* type */
+ 0, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_IMM32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_IMM32a, /* type */
+ 1, /* rightshift */
+ 2, /* size */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_IMM32a", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_DISP4, /* type */
+ 1, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 4, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_DISP4", /* name */
+ FALSE, /* partial_inplace */
+ 0xf, /* src_mask */
+ 0xf, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_DISP8, /* type */
+ 1, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_DISP8", /* name */
+ FALSE, /* partial_inplace */
+ 0x1ff, /* src_mask */
+ 0x1ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_DISP16, /* type */
+ 0, /* rightshift REVIITS: To sync with WinIDEA*/
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_DISP16", /* name */
+ FALSE, /* partial_inplace */
+ 0x1ffff, /* src_mask */
+ 0x1ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+ /* REVISIT: DISP24 should be left-shift by 2 as per ISA doc
+ but its not done, to sync with WinIDEA and CR16 4.1 tools */
+ HOWTO (R_CR16_DISP24, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_DISP24", /* name */
+ FALSE, /* partial_inplace */
+ 0x1ffffff, /* src_mask */
+ 0x1ffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_CR16_DISP24a, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_CR16_DISP24a", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffff, /* src_mask */
+ 0xffffff, /* dst_mask */
+ FALSE) /* pcrel_offset */
+};
+
+/* Retrieve a howto ptr using a BFD reloc_code. */
+
+static reloc_howto_type *
+elf_cr16_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
+{
+ unsigned int i;
+
+ for (i = 0; i < R_CR16_MAX; i++)
+ if (code == cr16_reloc_map[i].bfd_reloc_enum)
+ return &cr16_elf_howto_table[cr16_reloc_map[i].cr16_reloc_type];
+
+ _bfd_error_handler ("Unsupported CR16 relocation type: 0x%x\n", code);
+ return NULL;
+}
+
+static reloc_howto_type *
+elf_cr16_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0; ARRAY_SIZE (cr16_elf_howto_table); i++)
+ if (cr16_elf_howto_table[i].name != NULL
+ && strcasecmp (cr16_elf_howto_table[i].name, r_name) == 0)
+ return cr16_elf_howto_table + i;
+
+ return NULL;
+}
+
+/* Retrieve a howto ptr using an internal relocation entry. */
+
+static void
+elf_cr16_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
+{
+ unsigned int r_type = ELF32_R_TYPE (dst->r_info);
+
+ BFD_ASSERT (r_type < (unsigned int) R_CR16_MAX);
+ cache_ptr->howto = &cr16_elf_howto_table[r_type];
+}
+
+/* Perform a relocation as part of a final link. */
+
+static bfd_reloc_status_type
+cr16_elf_final_link_relocate (reloc_howto_type *howto,
+ bfd *input_bfd,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ asection *input_section,
+ bfd_byte *contents,
+ bfd_vma offset,
+ bfd_vma Rvalue,
+ bfd_vma addend,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ int is_local ATTRIBUTE_UNUSED)
+{
+ unsigned short r_type = howto->type;
+ bfd_byte *hit_data = contents + offset;
+ bfd_vma reloc_bits, check, Rvalue1;
+
+ switch (r_type)
+ {
+ case R_CR16_IMM4:
+ case R_CR16_IMM8:
+ case R_CR16_IMM16:
+ case R_CR16_IMM20:
+ case R_CR16_IMM32:
+ case R_CR16_IMM32a:
+ case R_CR16_REGREL4:
+ case R_CR16_REGREL4a:
+ case R_CR16_REGREL14:
+ case R_CR16_REGREL14a:
+ case R_CR16_REGREL16:
+ case R_CR16_REGREL20:
+ case R_CR16_ABS20:
+ case R_CR16_ABS24:
+ case R_CR16_DISP16:
+ case R_CR16_DISP24:
+ /* 'hit_data' is relative to the start of the instruction, not the
+ relocation offset. Advance it to account for the exact offset. */
+ hit_data += 2;
+ break;
+
+ case R_CR16_NONE:
+ return bfd_reloc_ok;
+ break;
+
+ case R_CR16_DISP4:
+ case R_CR16_DISP8:
+ case R_CR16_DISP24a:
+ /* We only care about the addend, where the difference between
+ expressions is kept. */
+ if (is_local) Rvalue -= -1;
+
+ default:
+ break;
+ }
+
+ if (howto->pc_relative)
+ {
+ /* Subtract the address of the section containing the location. */
+ Rvalue -= (input_section->output_section->vma
+ + input_section->output_offset);
+ /* Subtract the position of the location within the section. */
+ Rvalue -= offset;
+ }
+
+ /* Add in supplied addend. */
+ Rvalue += addend;
+
+ /* Complain if the bitfield overflows, whether it is considered
+ as signed or unsigned. */
+ check = Rvalue >> howto->rightshift;
+
+ /* Assumes two's complement. This expression avoids
+ overflow if howto->bitsize is the number of bits in
+ bfd_vma. */
+ reloc_bits = (((1 << (howto->bitsize - 1)) - 1) << 1) | 1;
+
+ if (((bfd_vma) check & ~reloc_bits) != 0
+ && (((bfd_vma) check & ~reloc_bits)
+ != (-(bfd_vma) 1 & ~reloc_bits)))
+ {
+ /* The above right shift is incorrect for a signed
+ value. See if turning on the upper bits fixes the
+ overflow. */
+ if (howto->rightshift && (bfd_signed_vma) Rvalue < 0)
+ {
+ check |= ((bfd_vma) - 1
+ & ~((bfd_vma) - 1
+ >> howto->rightshift));
+
+ if (((bfd_vma) check & ~reloc_bits)
+ != (-(bfd_vma) 1 & ~reloc_bits))
+ return bfd_reloc_overflow;
+ }
+ else
+ return bfd_reloc_overflow;
+ }
+
+ /* Drop unwanted bits from the value we are relocating to. */
+ Rvalue >>= (bfd_vma) howto->rightshift;
+
+ /* Apply dst_mask to select only relocatable part of the insn. */
+ Rvalue &= howto->dst_mask;
+
+ switch (howto->size)
+ {
+ case 0:
+ if ((r_type == R_CR16_IMM4)
+ || (r_type == R_CR16_DISP4)
+ || (r_type == R_CR16_DISP8))
+ {
+ Rvalue1 = bfd_get_16 (input_bfd, hit_data);
+ Rvalue = ((Rvalue1 & 0xf000) | ((Rvalue << 4) & 0xf00)
+ | (Rvalue1 & 0x00f0) | (Rvalue & 0xf));
+ bfd_put_16 (input_bfd, Rvalue, hit_data);
+ }
+ break;
+
+ case 1:
+ if (r_type == R_CR16_DISP16)
+ {
+ Rvalue |= (bfd_get_16 (input_bfd, hit_data));
+ Rvalue = ((Rvalue & 0xfffe) | ((Rvalue >> 16) & 0x1));
+
+ bfd_put_16 (input_bfd, Rvalue, hit_data);
+ }
+ break;
+
+ case 2:
+ if (r_type == R_CR16_ABS20)
+ {
+ Rvalue |= (((bfd_get_16 (input_bfd, hit_data) << 16)
+ | (bfd_get_16 (input_bfd, hit_data + 2)))
+ & ~howto->dst_mask);
+ Rvalue |= (bfd_get_16 (input_bfd, hit_data + 2) << 16);
+
+ /* Relocation on INSTRUCTIONS is different : Instructions are
+ word-addressable, that is, each word itself is arranged according
+ to little-endian convention, whereas the words are arranged with
+ respect to one another in BIG ENDIAN fashion.
+ When there is an immediate value that spans a word boundary,
+ it is split in a big-endian way with respect to the words. */
+ bfd_put_16 (input_bfd, (Rvalue) & 0xffff, hit_data);
+ bfd_put_16 (input_bfd, (Rvalue >> 16)& 0xffff, hit_data + 2);
+ }
+ else if (r_type == R_CR16_ABS24)
+ {
+ Rvalue = ((((Rvalue >> 20)& 0xf)
+ | (((Rvalue >> 16) & 0xf) << 8)
+ | (bfd_get_16 (input_bfd, hit_data)))
+ | ((Rvalue & 0xffff) << 16));
+
+ bfd_put_32 (input_bfd, Rvalue, hit_data);
+ }
+ else if (r_type == R_CR16_DISP24)
+ {
+ Rvalue = ((((Rvalue >> 20)& 0xf) | (((Rvalue >> 16) & 0xf)<<8)
+ | (bfd_get_16 (input_bfd, hit_data)))
+ | (((Rvalue & 0xfffE) | ((Rvalue >> 24) & 0x1)) << 16));
+
+ bfd_put_32 (input_bfd, Rvalue, hit_data);
+ }
+ else if ((r_type == R_CR16_IMM32) || (r_type == R_CR16_IMM32a))
+ {
+ Rvalue = (((Rvalue >> 16)& 0xffff)
+ | (bfd_get_16 (input_bfd, hit_data)))
+ | ((Rvalue & 0xffff) << 16);
+ bfd_put_32 (input_bfd, Rvalue, hit_data);
+ }
+ else if (r_type == R_CR16_DISP24a)
+ {
+ Rvalue = (((Rvalue & 0xfffffe) | (Rvalue >> 23)));
+ Rvalue = ((Rvalue >> 16) & 0xff) | ((Rvalue & 0xffff) << 16)
+ | (bfd_get_32 (input_bfd, hit_data));
+
+ bfd_put_32 (input_bfd, Rvalue, hit_data);
+ }
+ else if ((r_type == R_CR16_NUM32) || (r_type == R_CR16_NUM32a))
+ {
+ bfd_put_32 (input_bfd, Rvalue, hit_data);
+ }
+ break;
+
+ default:
+ return bfd_reloc_notsupported;
+ }
+
+ return bfd_reloc_ok;
+}
+
+/* Delete some bytes from a section while relaxing. */
+
+static bfd_boolean
+elf32_cr16_relax_delete_bytes (struct bfd_link_info *link_info, bfd *abfd,
+ asection *sec, bfd_vma addr, int count)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ unsigned int sec_shndx;
+ bfd_byte *contents;
+ Elf_Internal_Rela *irel, *irelend;
+ Elf_Internal_Rela *irelalign;
+ bfd_vma toaddr;
+ Elf_Internal_Sym *isym;
+ Elf_Internal_Sym *isymend;
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry **end_hashes;
+ struct elf_link_hash_entry **start_hashes;
+ unsigned int symcount;
+
+ sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec);
+
+ contents = elf_section_data (sec)->this_hdr.contents;
+
+ /* The deletion must stop at the next ALIGN reloc for an aligment
+ power larger than the number of bytes we are deleting. */
+ irelalign = NULL;
+ toaddr = sec->size;
+
+ irel = elf_section_data (sec)->relocs;
+ irelend = irel + sec->reloc_count;
+
+ /* Actually delete the bytes. */
+ memmove (contents + addr, contents + addr + count,
+ (size_t) (toaddr - addr - count));
+ sec->size -= count;
+
+ /* Adjust all the relocs. */
+ for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+ /* Get the new reloc address. */
+ if ((irel->r_offset > addr && irel->r_offset < toaddr))
+ irel->r_offset -= count;
+
+ /* Adjust the local symbols defined in this section. */
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ isym = (Elf_Internal_Sym *) symtab_hdr->contents;
+ for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++)
+ {
+ if (isym->st_shndx == sec_shndx
+ && isym->st_value > addr
+ && isym->st_value < toaddr)
+ {
+ /* Adjust the addend of SWITCH relocations in this section,
+ which reference this local symbol. */
+ for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++)
+ {
+ unsigned long r_symndx;
+ Elf_Internal_Sym *rsym;
+ bfd_vma addsym, subsym;
+
+ r_symndx = ELF32_R_SYM (irel->r_info);
+ rsym = (Elf_Internal_Sym *) symtab_hdr->contents + r_symndx;
+
+ /* Skip if not the local adjusted symbol. */
+ if (rsym != isym)
+ continue;
+
+ addsym = isym->st_value;
+ subsym = addsym - irel->r_addend;
+
+ /* Fix the addend only when -->> (addsym > addr >= subsym). */
+ if (subsym <= addr)
+ irel->r_addend -= count;
+ else
+ continue;
+ }
+
+ isym->st_value -= count;
+ }
+ }
+
+ /* Now adjust the global symbols defined in this section. */
+ symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym)
+ - symtab_hdr->sh_info);
+ sym_hashes = start_hashes = elf_sym_hashes (abfd);
+ end_hashes = sym_hashes + symcount;
+
+ for (; sym_hashes < end_hashes; sym_hashes++)
+ {
+ struct elf_link_hash_entry *sym_hash = *sym_hashes;
+
+ /* The '--wrap SYMBOL' option is causing a pain when the object file,
+ containing the definition of __wrap_SYMBOL, includes a direct
+ call to SYMBOL as well. Since both __wrap_SYMBOL and SYMBOL reference
+ the same symbol (which is __wrap_SYMBOL), but still exist as two
+ different symbols in 'sym_hashes', we don't want to adjust
+ the global symbol __wrap_SYMBOL twice.
+ This check is only relevant when symbols are being wrapped. */
+ if (link_info->wrap_hash != NULL)
+ {
+ struct elf_link_hash_entry **cur_sym_hashes;
+
+ /* Loop only over the symbols whom been already checked. */
+ for (cur_sym_hashes = start_hashes; cur_sym_hashes < sym_hashes;
+ cur_sym_hashes++)
+ /* If the current symbol is identical to 'sym_hash', that means
+ the symbol was already adjusted (or at least checked). */
+ if (*cur_sym_hashes == sym_hash)
+ break;
+
+ /* Don't adjust the symbol again. */
+ if (cur_sym_hashes < sym_hashes)
+ continue;
+ }
+
+ if ((sym_hash->root.type == bfd_link_hash_defined
+ || sym_hash->root.type == bfd_link_hash_defweak)
+ && sym_hash->root.u.def.section == sec
+ && sym_hash->root.u.def.value > addr
+ && sym_hash->root.u.def.value < toaddr)
+ sym_hash->root.u.def.value -= count;
+ }
+
+ return TRUE;
+}
+
+/* Relocate a CR16 ELF section. */
+
+static bfd_boolean
+elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+ bfd *input_bfd, asection *input_section,
+ bfd_byte *contents, Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ Elf_Internal_Rela *rel, *relend;
+
+ if (info->relocatable)
+ return TRUE;
+
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ struct elf_link_hash_entry *h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+ howto = cr16_elf_howto_table + (r_type);
+
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
+ }
+ else
+ {
+ bfd_boolean unresolved_reloc, warned;
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
+ }
+
+ r = cr16_elf_final_link_relocate (howto, input_bfd, output_bfd,
+ input_section,
+ contents, rel->r_offset,
+ relocation, rel->r_addend,
+ info, sec, h == NULL);
+
+ if (r != bfd_reloc_ok)
+ {
+ const char *name;
+ const char *msg = NULL;
+
+ if (h != NULL)
+ name = h->root.root.string;
+ else
+ {
+ name = (bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name));
+ if (name == NULL || *name == '\0')
+ name = bfd_section_name (input_bfd, sec);
+ }
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ if (!((*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section,
+ rel->r_offset)))
+ return FALSE;
+ break;
+
+ case bfd_reloc_undefined:
+ if (!((*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section,
+ rel->r_offset, TRUE)))
+ return FALSE;
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _("internal error: out of range error");
+ goto common_error;
+
+ case bfd_reloc_notsupported:
+ msg = _("internal error: unsupported relocation error");
+ goto common_error;
+
+ case bfd_reloc_dangerous:
+ msg = _("internal error: dangerous error");
+ goto common_error;
+
+ default:
+ msg = _("internal error: unknown error");
+ /* Fall through. */
+
+ common_error:
+ if (!((*info->callbacks->warning)
+ (info, msg, name, input_bfd, input_section,
+ rel->r_offset)))
+ return FALSE;
+ break;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+/* This is a version of bfd_generic_get_relocated_section_contents
+ which uses elf32_cr16_relocate_section. */
+
+static bfd_byte *
+elf32_cr16_get_relocated_section_contents (bfd *output_bfd,
+ struct bfd_link_info *link_info,
+ struct bfd_link_order *link_order,
+ bfd_byte *data,
+ bfd_boolean relocatable,
+ asymbol **symbols)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *input_section = link_order->u.indirect.section;
+ bfd *input_bfd = input_section->owner;
+ asection **sections = NULL;
+ Elf_Internal_Rela *internal_relocs = NULL;
+ Elf_Internal_Sym *isymbuf = NULL;
+
+ /* We only need to handle the case of relaxing, or of having a
+ particular set of section contents, specially. */
+ if (relocatable
+ || elf_section_data (input_section)->this_hdr.contents == NULL)
+ return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
+ link_order, data,
+ relocatable,
+ symbols);
+
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+
+ memcpy (data, elf_section_data (input_section)->this_hdr.contents,
+ (size_t) input_section->size);
+
+ if ((input_section->flags & SEC_RELOC) != 0
+ && input_section->reloc_count > 0)
+ {
+ Elf_Internal_Sym *isym;
+ Elf_Internal_Sym *isymend;
+ asection **secpp;
+ bfd_size_type amt;
+
+ internal_relocs = _bfd_elf_link_read_relocs (input_bfd, input_section,
+ NULL, NULL, FALSE);
+ if (internal_relocs == NULL)
+ goto error_return;
+
+ if (symtab_hdr->sh_info != 0)
+ {
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms (input_bfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ goto error_return;
+ }
+
+ amt = symtab_hdr->sh_info;
+ amt *= sizeof (asection *);
+ sections = bfd_malloc (amt);
+ if (sections == NULL && amt != 0)
+ goto error_return;
+
+ isymend = isymbuf + symtab_hdr->sh_info;
+ for (isym = isymbuf, secpp = sections; isym < isymend; ++isym, ++secpp)
+ {
+ asection *isec;
+
+ if (isym->st_shndx == SHN_UNDEF)
+ isec = bfd_und_section_ptr;
+ else if (isym->st_shndx == SHN_ABS)
+ isec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ isec = bfd_com_section_ptr;
+ else
+ isec = bfd_section_from_elf_index (input_bfd, isym->st_shndx);
+
+ *secpp = isec;
+ }
+
+ if (! elf32_cr16_relocate_section (output_bfd, link_info, input_bfd,
+ input_section, data, internal_relocs,
+ isymbuf, sections))
+ goto error_return;
+
+ if (sections != NULL)
+ free (sections);
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (elf_section_data (input_section)->relocs != internal_relocs)
+ free (internal_relocs);
+ }
+
+ return data;
+
+ error_return:
+ if (sections != NULL)
+ free (sections);
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (internal_relocs != NULL
+ && elf_section_data (input_section)->relocs != internal_relocs)
+ free (internal_relocs);
+ return NULL;
+}
+
+/* This function handles relaxing for the CR16.
+
+ There's quite a few relaxing opportunites available on the CR16:
+
+ * bcond:24 -> bcond:16 2 bytes
+ * bcond:16 -> bcond:8 2 bytes
+ * arithmetic imm32 -> arithmetic imm16 2 bytes
+
+ Symbol- and reloc-reading infrastructure copied from elf-m10200.c. */
+
+static bfd_boolean
+elf32_cr16_relax_section (bfd *abfd, asection *sec,
+ struct bfd_link_info *link_info, bfd_boolean *again)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Rela *internal_relocs;
+ Elf_Internal_Rela *irel, *irelend;
+ bfd_byte *contents = NULL;
+ Elf_Internal_Sym *isymbuf = NULL;
+
+ /* Assume nothing changes. */
+ *again = FALSE;
+
+ /* We don't have to do anything for a relocatable link, if
+ this section does not have relocs, or if this is not a
+ code section. */
+ if (link_info->relocatable
+ || (sec->flags & SEC_RELOC) == 0
+ || sec->reloc_count == 0
+ || (sec->flags & SEC_CODE) == 0)
+ return TRUE;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+
+ /* Get a copy of the native relocations. */
+ internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL,
+ link_info->keep_memory);
+ if (internal_relocs == NULL)
+ goto error_return;
+
+ /* Walk through them looking for relaxing opportunities. */
+ irelend = internal_relocs + sec->reloc_count;
+ for (irel = internal_relocs; irel < irelend; irel++)
+ {
+ bfd_vma symval;
+
+ /* If this isn't something that can be relaxed, then ignore
+ this reloc. */
+ if (ELF32_R_TYPE (irel->r_info) != (int) R_CR16_DISP16
+ && ELF32_R_TYPE (irel->r_info) != (int) R_CR16_DISP24)
+ continue;
+
+ /* Get the section contents if we haven't done so already. */
+ if (contents == NULL)
+ {
+ /* Get cached copy if it exists. */
+ if (elf_section_data (sec)->this_hdr.contents != NULL)
+ contents = elf_section_data (sec)->this_hdr.contents;
+ /* Go get them off disk. */
+ else if (!bfd_malloc_and_get_section (abfd, sec, &contents))
+ goto error_return;
+ }
+
+ /* Read this BFD's local symbols if we haven't done so already. */
+ if (isymbuf == NULL && symtab_hdr->sh_info != 0)
+ {
+ isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (isymbuf == NULL)
+ isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr,
+ symtab_hdr->sh_info, 0,
+ NULL, NULL, NULL);
+ if (isymbuf == NULL)
+ goto error_return;
+ }
+
+ /* Get the value of the symbol referred to by the reloc. */
+ if (ELF32_R_SYM (irel->r_info) < symtab_hdr->sh_info)
+ {
+ /* A local symbol. */
+ Elf_Internal_Sym *isym;
+ asection *sym_sec;
+
+ isym = isymbuf + ELF32_R_SYM (irel->r_info);
+ if (isym->st_shndx == SHN_UNDEF)
+ sym_sec = bfd_und_section_ptr;
+ else if (isym->st_shndx == SHN_ABS)
+ sym_sec = bfd_abs_section_ptr;
+ else if (isym->st_shndx == SHN_COMMON)
+ sym_sec = bfd_com_section_ptr;
+ else
+ sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
+ symval = (isym->st_value
+ + sym_sec->output_section->vma
+ + sym_sec->output_offset);
+ }
+ else
+ {
+ unsigned long indx;
+ struct elf_link_hash_entry *h;
+
+ /* An external symbol. */
+ indx = ELF32_R_SYM (irel->r_info) - symtab_hdr->sh_info;
+ h = elf_sym_hashes (abfd)[indx];
+ BFD_ASSERT (h != NULL);
+
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ /* This appears to be a reference to an undefined
+ symbol. Just ignore it--it will be caught by the
+ regular reloc processing. */
+ continue;
+
+ symval = (h->root.u.def.value
+ + h->root.u.def.section->output_section->vma
+ + h->root.u.def.section->output_offset);
+ }
+
+ /* For simplicity of coding, we are going to modify the section
+ contents, the section relocs, and the BFD symbol table. We
+ must tell the rest of the code not to free up this
+ information. It would be possible to instead create a table
+ of changes which have to be made, as is done in coff-mips.c;
+ that would be more work, but would require less memory when
+ the linker is run. */
+
+ /* Try to turn a 24 branch/call into a 16bit relative
+ * branch/call. */
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_CR16_DISP24)
+ {
+ bfd_vma value = symval;
+
+ /* Deal with pc-relative gunk. */
+ value -= (sec->output_section->vma + sec->output_offset);
+ value -= irel->r_offset;
+ value += irel->r_addend;
+
+ /* See if the value will fit in 16 bits, note the high value is
+ 0xfffe + 2 as the target will be two bytes closer if we are
+ able to relax. */
+ if ((long) value < 0x10000 && (long) value > -0x10002)
+ {
+ unsigned int code;
+
+ /* Get the opcode. */
+ code = (unsigned int) bfd_get_32 (abfd, contents + irel->r_offset);
+
+ /* Verify it's a 'bcond' and fix the opcode. */
+ if ((code & 0xffff) == 0x0010)
+ {
+ bfd_put_16 (abfd, 0x1800 | ((0xf & (code >>20))<<4), contents + irel->r_offset);
+ bfd_put_16 (abfd, value, contents + irel->r_offset+2);
+ }
+ else
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_CR16_DISP16);
+
+ /* Delete two bytes of data. */
+ if (!elf32_cr16_relax_delete_bytes (link_info, abfd, sec,
+ irel->r_offset + 2, 2))
+ goto error_return;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+
+ /* Try to turn a 16bit pc-relative branch into an
+ 8bit pc-relative branch. */
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_CR16_DISP16)
+ {
+ bfd_vma value = symval;
+
+ /* Deal with pc-relative gunk. */
+ value -= (sec->output_section->vma + sec->output_offset);
+ value -= irel->r_offset;
+ value += irel->r_addend;
+
+ /* See if the value will fit in 8 bits, note the high value is
+ 0xfc + 2 as the target will be two bytes closer if we are
+ able to relax. */
+ if ((long) value < 0xfe && (long) value > -0x100)
+ {
+ unsigned short code;
+
+ /* Get the opcode. */
+ code = (unsigned short) bfd_get_16 (abfd, contents + irel->r_offset);
+
+ /* Verify it's a 'bcond' opcode. */
+ if ((code & 0xff00) == 0x1800)
+ {
+ bfd_put_8 (abfd, 0x1 | ((0xf & (code>>4))<<4), contents + irel->r_offset);
+ bfd_put_8 (abfd, value, contents + irel->r_offset+2);
+ }
+ else
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_CR16_DISP8);
+
+ /* Delete two bytes of data. */
+ if (!elf32_cr16_relax_delete_bytes (link_info, abfd, sec,
+ irel->r_offset + 2, 2))
+ goto error_return;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+
+#if 0 // REVISIT: To support IMM relaxation in CR16 target
+ /* Try to turn a 32bit immediate address into
+ a 20bit immediate address. */
+ if (ELF32_R_TYPE (irel->r_info) == (int) R_CR16_IMM32)
+ {
+ bfd_vma value = symval;
+
+ /* See if the value will fit in 20 bits. */
+ if ((long) value < 0x7ffff && (long) value > -0x80000)
+ {
+ unsigned short code;
+
+ /* Get the opcode. */
+ code = (unsigned short) bfd_get_16 (abfd, contents + irel->r_offset);
+
+ /* Verify it's a 'arithmetic double'. */
+ if ((code & 0xfff0) != 0x0070)
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the opcode. */
+ bfd_put_8 (abfd, (code & 0xff) - 0x10, contents + irel->r_offset);
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_CR16_IMM20);
+
+ /* Delete two bytes of data. */
+ if (!elf32_cr16_relax_delete_bytes (link_info, abfd, sec,
+ irel->r_offset + 2, 2))
+ goto error_return;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+ /* Try to turn a 20bit/16bit immediate address into
+ a 4bit immediate address. */
+ if ((ELF32_R_TYPE (irel->r_info) == (int) R_CR16_IMM20)
+ || (ELF32_R_TYPE (irel->r_info) == (int) R_CR16_IMM16))
+ {
+ bfd_vma value = symval;
+
+ /* See if the value will fit in 4 bits. */
+ if ((long) value < 0x7 && (long) value > -0x8)
+ {
+ unsigned short code;
+
+ /* Get the opcode. */
+ code = (unsigned short) bfd_get_8 (abfd, contents + irel->r_offset);
+
+ /* Verify it's a 'arithmetic double'. */
+ if (((code & 0xff) != 0x50) || ((code & 0xff) != 0x45))
+ continue;
+
+ /* Note that we've changed the relocs, section contents, etc. */
+ elf_section_data (sec)->relocs = internal_relocs;
+ elf_section_data (sec)->this_hdr.contents = contents;
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+
+ /* Fix the opcode. */
+ bfd_put_8 (abfd, (code & 0xff) - 0x10, contents + irel->r_offset);
+
+ /* Fix the relocation's type. */
+ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info),
+ R_CR16_IMM4);
+
+ /* Delete two bytes of data. */
+ if (!elf32_cr16_relax_delete_bytes (link_info, abfd, sec,
+ irel->r_offset + 2, 2))
+ goto error_return;
+
+ /* That will change things, so, we should relax again.
+ Note that this is not required, and it may be slow. */
+ *again = TRUE;
+ }
+ }
+#endif
+ }
+
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ {
+ if (! link_info->keep_memory)
+ free (isymbuf);
+ else
+ {
+ /* Cache the symbols for elf_link_input_bfd. */
+ symtab_hdr->contents = (unsigned char *) isymbuf;
+ }
+ }
+
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ {
+ if (! link_info->keep_memory)
+ free (contents);
+ else
+ {
+ /* Cache the section contents for elf_link_input_bfd. */
+ elf_section_data (sec)->this_hdr.contents = contents;
+ }
+ }
+
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+
+ return TRUE;
+
+ error_return:
+ if (isymbuf != NULL
+ && symtab_hdr->contents != (unsigned char *) isymbuf)
+ free (isymbuf);
+ if (contents != NULL
+ && elf_section_data (sec)->this_hdr.contents != contents)
+ free (contents);
+ if (internal_relocs != NULL
+ && elf_section_data (sec)->relocs != internal_relocs)
+ free (internal_relocs);
+
+ return FALSE;
+}
+
+static asection *
+elf32_cr16_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h == NULL)
+ return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ return NULL;
+ }
+}
+
+/* Update the got entry reference counts for the section being removed. */
+
+static bfd_boolean
+elf32_cr16_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
+{
+ /* We don't support garbage collection of GOT and PLT relocs yet. */
+ return TRUE;
+}
+
+/* Definitions for setting CR16 target vector. */
+#define TARGET_LITTLE_SYM bfd_elf32_cr16_vec
+#define TARGET_LITTLE_NAME "elf32-cr16"
+#define ELF_ARCH bfd_arch_cr16
+#define ELF_MACHINE_CODE EM_CR16
+#define ELF_MAXPAGESIZE 0x1
+#define elf_symbol_leading_char '_'
+
+#define bfd_elf32_bfd_reloc_type_lookup elf_cr16_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup elf_cr16_reloc_name_lookup
+#define elf_info_to_howto elf_cr16_info_to_howto
+#define elf_info_to_howto_rel 0
+#define elf_backend_relocate_section elf32_cr16_relocate_section
+#define bfd_elf32_bfd_relax_section elf32_cr16_relax_section
+#define bfd_elf32_bfd_get_relocated_section_contents \
+ elf32_cr16_get_relocated_section_contents
+#define elf_backend_gc_mark_hook elf32_cr16_gc_mark_hook
+#define elf_backend_gc_sweep_hook elf32_cr16_gc_sweep_hook
+#define elf_backend_can_gc_sections 1
+#define elf_backend_rela_normal 1
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-gen.c b/contrib/binutils/bfd/elf32-gen.c
index 23c7476..ef7d4e2 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, 2001, 2002, 2004, 2005
+ Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004, 2005, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -94,6 +94,7 @@ elf32_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
#define ELF_MACHINE_CODE EM_NONE
#define ELF_MAXPAGESIZE 0x1
#define bfd_elf32_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
#define bfd_elf32_bfd_link_add_symbols elf32_generic_link_add_symbols
#define elf_info_to_howto elf_generic_info_to_howto
#define elf_info_to_howto_rel elf_generic_info_to_howto_rel
diff --git a/contrib/binutils/bfd/elf32-i386.c b/contrib/binutils/bfd/elf32-i386.c
index 754aa52..0e023df 100644
--- a/contrib/binutils/bfd/elf32-i386.c
+++ b/contrib/binutils/bfd/elf32-i386.c
@@ -1,6 +1,6 @@
/* Intel 80386/80486-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -330,6 +330,20 @@ elf_i386_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return 0;
}
+static reloc_howto_type *
+elf_i386_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0; i < sizeof (elf_howto_table) / sizeof (elf_howto_table[0]); i++)
+ if (elf_howto_table[i].name != NULL
+ && strcasecmp (elf_howto_table[i].name, r_name) == 0)
+ return &elf_howto_table[i];
+
+ return NULL;
+}
+
static void
elf_i386_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
arelent *cache_ptr,
@@ -582,10 +596,6 @@ struct elf_i386_link_hash_entry
#define GOT_TLS_IE_NEG 6
#define GOT_TLS_IE_BOTH 7
#define GOT_TLS_GDESC 8
-#define GOT_TLS_MASK 0x0f
-#define GOT_TLS_IE_IE 0x10
-#define GOT_TLS_IE_GD 0x20
-#define GOT_TLS_IE_MASK 0x30
#define GOT_TLS_GD_BOTH_P(type) \
((type) == (GOT_TLS_GD | GOT_TLS_GDESC))
#define GOT_TLS_GD_P(type) \
@@ -626,11 +636,14 @@ struct elf_i386_obj_tdata
static bfd_boolean
elf_i386_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct elf_i386_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct elf_i386_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
/* i386 ELF linker hash table. */
@@ -1011,25 +1024,12 @@ elf_i386_check_relocs (bfd *abfd,
case R_386_TLS_IE_32:
if (ELF32_R_TYPE (rel->r_info) == r_type)
tls_type = GOT_TLS_IE_NEG;
- else if (h
- && ELF32_R_TYPE (rel->r_info) == R_386_TLS_GD)
- /* If this is a GD->IE transition, we may use either
- of R_386_TLS_TPOFF and R_386_TLS_TPOFF32. But if
- we may have both R_386_TLS_IE and R_386_TLS_GD,
- we can't share the same R_386_TLS_TPOFF since
- they require different offsets. So we remember
- it comes from R_386_TLS_GD. */
- tls_type = GOT_TLS_IE | GOT_TLS_IE_GD;
else
+ /* If this is a GD->IE transition, we may use either of
+ R_386_TLS_TPOFF and R_386_TLS_TPOFF32. */
tls_type = GOT_TLS_IE;
break;
case R_386_TLS_IE:
- if (h)
- {
- /* We remember it comes from R_386_TLS_IE. */
- tls_type = GOT_TLS_IE_POS | GOT_TLS_IE_IE;
- break;
- }
case R_386_TLS_GOTIE:
tls_type = GOT_TLS_IE_POS; break;
}
@@ -1069,8 +1069,7 @@ elf_i386_check_relocs (bfd *abfd,
tls_type |= old_tls_type;
/* If a TLS symbol is accessed using IE at least once,
there is no point to use dynamic model for it. */
- else if (old_tls_type != tls_type
- && old_tls_type != GOT_UNKNOWN
+ else if (old_tls_type != tls_type && old_tls_type != GOT_UNKNOWN
&& (! GOT_TLS_GD_ANY_P (old_tls_type)
|| (tls_type & GOT_TLS_IE) == 0))
{
@@ -1165,7 +1164,7 @@ elf_i386_check_relocs (bfd *abfd,
&& (sec->flags & SEC_ALLOC) != 0
&& (r_type != R_386_PC32
|| (h != NULL
- && (! info->symbolic
+ && (! SYMBOLIC_BIND (info, h)
|| h->root.type == bfd_link_hash_defweak
|| !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
@@ -1192,7 +1191,7 @@ elf_i386_check_relocs (bfd *abfd,
if (name == NULL)
return FALSE;
- if (strncmp (name, ".rel", 4) != 0
+ if (! CONST_STRNEQ (name, ".rel")
|| strcmp (bfd_get_section_name (abfd, sec),
name + 4) != 0)
{
@@ -1294,38 +1293,20 @@ elf_i386_check_relocs (bfd *abfd,
static asection *
elf_i386_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_386_GNU_VTINHERIT:
- case R_386_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
-
- return NULL;
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_386_GNU_VTINHERIT:
+ case R_386_GNU_VTENTRY:
+ return NULL;
+ }
+
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got entry reference counts for the section being removed. */
@@ -1438,7 +1419,6 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
{
struct elf_i386_link_hash_table *htab;
asection *s;
- unsigned int power_of_two;
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later,
@@ -1558,29 +1538,9 @@ elf_i386_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_copy = 1;
}
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 3)
- power_of_two = 3;
-
- /* Apply the required alignment. */
s = htab->sdynbss;
- s->size = BFD_ALIGN (s->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->size;
-
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* Allocate space in .plt, .got and associated reloc sections for
@@ -1700,14 +1660,6 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
asection *s;
bfd_boolean dyn;
int tls_type = elf_i386_hash_entry(h)->tls_type;
-
- /* If we have both R_386_TLS_IE and R_386_TLS_GD, GOT_TLS_IE_BOTH
- should be used. */
- if ((tls_type & GOT_TLS_IE_MASK)
- == (GOT_TLS_IE_IE | GOT_TLS_IE_GD))
- tls_type = GOT_TLS_IE_BOTH;
- else
- tls_type &= GOT_TLS_MASK;
/* Make sure this symbol is output as a dynamic symbol.
Undefined weak syms won't yet be marked as dynamic. */
@@ -2052,7 +2004,7 @@ elf_i386_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
if (htab->elf.hplt != NULL)
strip_section = FALSE;
}
- else if (strncmp (bfd_get_section_name (dynobj, s), ".rel", 4) == 0)
+ else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rel"))
{
if (s->size != 0 && s != htab->srelplt && s != htab->srelplt2)
relocs = TRUE;
@@ -2305,51 +2257,6 @@ elf_i386_relocate_section (bfd *output_bfd,
howto = elf_howto_table + indx;
r_symndx = ELF32_R_SYM (rel->r_info);
-
- if (info->relocatable)
- {
- bfd_vma val;
- bfd_byte *where;
-
- /* 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)
- continue;
-
- sym = local_syms + r_symndx;
- if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
- continue;
-
- sec = local_sections[r_symndx];
- val = sec->output_offset;
- if (val == 0)
- continue;
-
- where = contents + rel->r_offset;
- switch (howto->size)
- {
- /* FIXME: overflow checks. */
- case 0:
- val += bfd_get_8 (input_bfd, where);
- bfd_put_8 (input_bfd, val, where);
- break;
- case 1:
- val += bfd_get_16 (input_bfd, where);
- bfd_put_16 (input_bfd, val, where);
- break;
- case 2:
- val += bfd_get_32 (input_bfd, where);
- bfd_put_32 (input_bfd, val, where);
- break;
- default:
- abort ();
- }
- continue;
- }
-
- /* This is a final link. */
h = NULL;
sym = NULL;
sec = NULL;
@@ -2361,10 +2268,12 @@ elf_i386_relocate_section (bfd *output_bfd,
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
- if ((sec->flags & SEC_MERGE)
- && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+
+ if (ELF_ST_TYPE (sym->st_info) == STT_SECTION
+ && ((sec->flags & SEC_MERGE) != 0
+ || (info->relocatable
+ && sec->output_offset != 0)))
{
- asection *msec;
bfd_vma addend;
bfd_byte *where = contents + rel->r_offset;
@@ -2398,10 +2307,16 @@ elf_i386_relocate_section (bfd *output_bfd,
abort ();
}
- msec = sec;
- addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend);
- addend -= relocation;
- addend += msec->output_section->vma + msec->output_offset;
+ if (info->relocatable)
+ addend += sec->output_offset;
+ else
+ {
+ asection *msec = sec;
+ addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec,
+ addend);
+ addend -= relocation;
+ addend += msec->output_section->vma + msec->output_offset;
+ }
switch (howto->size)
{
@@ -2434,21 +2349,20 @@ elf_i386_relocate_section (bfd *output_bfd,
unresolved_reloc, warned);
}
- if (r_symndx == 0)
+ if (sec != NULL && elf_discarded_section (sec))
{
- /* r_symndx will be zero only for relocs against symbols from
- removed linkonce sections, or sections discarded by a linker
- script. For these relocs, we just want the section contents
- zeroed. Avoid any special processing in the switch below. */
- r_type = R_386_NONE;
-
- relocation = 0;
- if (howto->pc_relative)
- relocation = (input_section->output_section->vma
- + input_section->output_offset
- + rel->r_offset);
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
}
+ if (info->relocatable)
+ continue;
+
switch (r_type)
{
case R_386_GOT32:
@@ -2652,7 +2566,7 @@ elf_i386_relocate_section (bfd *output_bfd,
&& h->dynindx != -1
&& (r_type == R_386_PC32
|| !info->shared
- || !info->symbolic
+ || !SYMBOLIC_BIND (info, h)
|| !h->def_regular))
outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
else
@@ -2711,13 +2625,6 @@ elf_i386_relocate_section (bfd *output_bfd,
else if (h != NULL)
{
tls_type = elf_i386_hash_entry(h)->tls_type;
- /* If we have both R_386_TLS_IE and R_386_TLS_GD,
- GOT_TLS_IE_BOTH should be used. */
- if ((tls_type & GOT_TLS_IE_MASK)
- == (GOT_TLS_IE_IE | GOT_TLS_IE_GD))
- tls_type = GOT_TLS_IE_BOTH;
- else
- tls_type &= GOT_TLS_MASK;
if (!info->shared && h->dynindx == -1 && (tls_type & GOT_TLS_IE))
r_type = R_386_TLS_LE_32;
}
@@ -2851,8 +2758,9 @@ elf_i386_relocate_section (bfd *output_bfd,
val = bfd_get_8 (input_bfd, contents + roff + 1);
BFD_ASSERT (val == 0x10);
- /* Now modify the instruction as appropriate. */
- bfd_put_8 (output_bfd, 0x90, contents + roff);
+ /* Now modify the instruction as appropriate. Use
+ xchg %ax,%ax instead of 2 nops. */
+ bfd_put_8 (output_bfd, 0x66, contents + roff);
bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
continue;
}
@@ -3172,12 +3080,8 @@ elf_i386_relocate_section (bfd *output_bfd,
subl $foo@gottpoff(%reg), %eax
into:
addl $foo@gotntpoff(%reg), %eax. */
- if (r_type == R_386_TLS_GOTIE)
- {
- contents[roff + 6] = 0x03;
- if (tls_type == GOT_TLS_IE_BOTH)
- off += 4;
- }
+ if (tls_type == GOT_TLS_IE_POS)
+ contents[roff + 6] = 0x03;
bfd_put_32 (output_bfd,
htab->sgot->output_section->vma
+ htab->sgot->output_offset + off
@@ -3261,8 +3165,8 @@ elf_i386_relocate_section (bfd *output_bfd,
/* Now modify the instruction as appropriate. */
if (tls_type != GOT_TLS_IE_NEG)
{
- /* nop; nop */
- bfd_put_8 (output_bfd, 0x90, contents + roff);
+ /* xchg %ax,%ax */
+ bfd_put_8 (output_bfd, 0x66, contents + roff);
bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
}
else
@@ -3872,6 +3776,18 @@ elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
return plt->vma + (i + 1) * PLT_ENTRY_SIZE;
}
+/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
+
+static bfd_boolean
+elf_i386_hash_symbol (struct elf_link_hash_entry *h)
+{
+ if (h->plt.offset != (bfd_vma) -1
+ && !h->def_regular
+ && !h->pointer_equality_needed)
+ return FALSE;
+
+ return _bfd_elf_hash_symbol (h);
+}
#define TARGET_LITTLE_SYM bfd_elf32_i386_vec
#define TARGET_LITTLE_NAME "elf32-i386"
@@ -3895,6 +3811,7 @@ elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
#define bfd_elf32_bfd_is_local_label_name elf_i386_is_local_label_name
#define bfd_elf32_bfd_link_hash_table_create elf_i386_link_hash_table_create
#define bfd_elf32_bfd_reloc_type_lookup elf_i386_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup elf_i386_reloc_name_lookup
#define elf_backend_adjust_dynamic_symbol elf_i386_adjust_dynamic_symbol
#define elf_backend_check_relocs elf_i386_check_relocs
@@ -3911,7 +3828,10 @@ elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
#define elf_backend_relocate_section elf_i386_relocate_section
#define elf_backend_size_dynamic_sections elf_i386_size_dynamic_sections
#define elf_backend_always_size_sections elf_i386_always_size_sections
+#define elf_backend_omit_section_dynsym \
+ ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_plt_sym_val elf_i386_plt_sym_val
+#define elf_backend_hash_symbol elf_i386_hash_symbol
#include "elf32-target.h"
@@ -3921,6 +3841,8 @@ elf_i386_plt_sym_val (bfd_vma i, const asection *plt,
#define TARGET_LITTLE_SYM bfd_elf32_i386_freebsd_vec
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf32-i386-freebsd"
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_FREEBSD
/* The kernel recognizes executables as valid only if they carry a
"FreeBSD" label in the ELF header. So we put this label on all
@@ -3935,7 +3857,7 @@ elf_i386_post_process_headers (bfd *abfd,
i_ehdrp = elf_elfheader (abfd);
/* Put an ABI label supported by FreeBSD >= 4.1. */
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
+ i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
#ifdef OLD_FREEBSD_ABI_LABEL
/* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
@@ -3955,7 +3877,7 @@ elf_i386_post_process_headers (bfd *abfd,
#define TARGET_LITTLE_SYM bfd_elf32_i386_vxworks_vec
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf32-i386-vxworks"
-
+#undef ELF_OSABI
/* Like elf_i386_link_hash_table_create but with tweaks for VxWorks. */
diff --git a/contrib/binutils/bfd/elf32-mep.c b/contrib/binutils/bfd/elf32-mep.c
new file mode 100644
index 0000000..169da44
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-mep.c
@@ -0,0 +1,959 @@
+/* MeP-specific support for 32-bit ELF.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/mep.h"
+#include "libiberty.h"
+
+/* Forward declarations. */
+
+/* Private relocation functions. */
+
+#define MEPREL(type, size, bits, right, left, pcrel, overflow, mask) \
+ {(unsigned)type, right, size, bits, pcrel, left, overflow, mep_reloc, #type, FALSE, 0, mask, 0 }
+
+#define N complain_overflow_dont
+#define S complain_overflow_signed
+#define U complain_overflow_unsigned
+
+static bfd_reloc_status_type mep_reloc (bfd *, arelent *, struct bfd_symbol *,
+ void *, asection *, bfd *, char **);
+
+static reloc_howto_type mep_elf_howto_table [] =
+{
+ /* type, size, bits, leftshift, rightshift, pcrel, OD/OS/OU, mask. */
+ MEPREL (R_MEP_NONE, 0, 0, 0, 0, 0, N, 0),
+ MEPREL (R_RELC, 0, 0, 0, 0, 0, N, 0),
+ /* MEPRELOC:HOWTO */
+ /* This section generated from bfd/mep-relocs.pl from include/elf/mep.h. */
+ MEPREL (R_MEP_8, 0, 8, 0, 0, 0, U, 0xff),
+ MEPREL (R_MEP_16, 1, 16, 0, 0, 0, U, 0xffff),
+ MEPREL (R_MEP_32, 2, 32, 0, 0, 0, U, 0xffffffff),
+ MEPREL (R_MEP_PCREL8A2, 1, 8, 1, 1, 1, S, 0x00fe),
+ MEPREL (R_MEP_PCREL12A2,1, 12, 1, 1, 1, S, 0x0ffe),
+ MEPREL (R_MEP_PCREL17A2,2, 17, 0, 1, 1, S, 0x0000ffff),
+ MEPREL (R_MEP_PCREL24A2,2, 24, 0, 1, 1, S, 0x07f0ffff),
+ MEPREL (R_MEP_PCABS24A2,2, 24, 0, 1, 0, U, 0x07f0ffff),
+ MEPREL (R_MEP_LOW16, 2, 16, 0, 0, 0, N, 0x0000ffff),
+ MEPREL (R_MEP_HI16U, 2, 32, 0,16, 0, N, 0x0000ffff),
+ MEPREL (R_MEP_HI16S, 2, 32, 0,16, 0, N, 0x0000ffff),
+ MEPREL (R_MEP_GPREL, 2, 16, 0, 0, 0, S, 0x0000ffff),
+ MEPREL (R_MEP_TPREL, 2, 16, 0, 0, 0, S, 0x0000ffff),
+ MEPREL (R_MEP_TPREL7, 1, 7, 0, 0, 0, U, 0x007f),
+ MEPREL (R_MEP_TPREL7A2, 1, 7, 1, 1, 0, U, 0x007e),
+ MEPREL (R_MEP_TPREL7A4, 1, 7, 2, 2, 0, U, 0x007c),
+ MEPREL (R_MEP_UIMM24, 2, 24, 0, 0, 0, U, 0x00ffffff),
+ MEPREL (R_MEP_ADDR24A4, 2, 24, 0, 2, 0, U, 0x00fcffff),
+ MEPREL (R_MEP_GNU_VTINHERIT,1, 0,16,32, 0, N, 0x0000),
+ MEPREL (R_MEP_GNU_VTENTRY,1, 0,16,32, 0, N, 0x0000),
+ /* MEPRELOC:END */
+};
+
+#define VALID_MEP_RELOC(N) ((N) >= 0 \
+ && (N) < ARRAY_SIZE (mep_elf_howto_table)
+
+#undef N
+#undef S
+#undef U
+
+static bfd_reloc_status_type
+mep_reloc
+ (bfd * abfd ATTRIBUTE_UNUSED,
+ arelent * reloc_entry ATTRIBUTE_UNUSED,
+ struct bfd_symbol * symbol ATTRIBUTE_UNUSED,
+ void * data ATTRIBUTE_UNUSED,
+ asection * input_section ATTRIBUTE_UNUSED,
+ bfd * output_bfd ATTRIBUTE_UNUSED,
+ char ** error_message ATTRIBUTE_UNUSED)
+{
+ return bfd_reloc_ok;
+}
+
+
+
+#define BFD_RELOC_MEP_NONE BFD_RELOC_NONE
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define MAP(n) case BFD_RELOC_MEP_##n: type = R_MEP_##n; break
+#else
+#define MAP(n) case BFD_RELOC_MEP_/**/n: type = R_MEP_/**/n; break
+#endif
+
+static reloc_howto_type *
+mep_reloc_type_lookup
+ (bfd * abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
+{
+ unsigned int type = 0;
+
+ switch (code)
+ {
+ MAP(NONE);
+ case BFD_RELOC_8:
+ type = R_MEP_8;
+ break;
+ case BFD_RELOC_16:
+ type = R_MEP_16;
+ break;
+ case BFD_RELOC_32:
+ type = R_MEP_32;
+ break;
+ case BFD_RELOC_VTABLE_ENTRY:
+ type = R_MEP_GNU_VTENTRY;
+ break;
+ case BFD_RELOC_VTABLE_INHERIT:
+ type = R_MEP_GNU_VTINHERIT;
+ break;
+ case BFD_RELOC_RELC:
+ type = R_RELC;
+ break;
+
+ /* MEPRELOC:MAP */
+ /* This section generated from bfd/mep-relocs.pl from include/elf/mep.h. */
+ MAP(8);
+ MAP(16);
+ MAP(32);
+ MAP(PCREL8A2);
+ MAP(PCREL12A2);
+ MAP(PCREL17A2);
+ MAP(PCREL24A2);
+ MAP(PCABS24A2);
+ MAP(LOW16);
+ MAP(HI16U);
+ MAP(HI16S);
+ MAP(GPREL);
+ MAP(TPREL);
+ MAP(TPREL7);
+ MAP(TPREL7A2);
+ MAP(TPREL7A4);
+ MAP(UIMM24);
+ MAP(ADDR24A4);
+ MAP(GNU_VTINHERIT);
+ MAP(GNU_VTENTRY);
+ /* MEPRELOC:END */
+
+ default:
+ /* Pacify gcc -Wall. */
+ fprintf (stderr, "mep: no reloc for code %d\n", code);
+ return NULL;
+ }
+
+ if (mep_elf_howto_table[type].type != type)
+ {
+ fprintf (stderr, "MeP: howto %d has type %d\n", type, mep_elf_howto_table[type].type);
+ abort ();
+ }
+
+ return mep_elf_howto_table + type;
+}
+
+#undef MAP
+
+static reloc_howto_type *
+mep_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (mep_elf_howto_table) / sizeof (mep_elf_howto_table[0]);
+ i++)
+ if (mep_elf_howto_table[i].name != NULL
+ && strcasecmp (mep_elf_howto_table[i].name, r_name) == 0)
+ return &mep_elf_howto_table[i];
+
+ return NULL;
+}
+
+/* Perform a single relocation. */
+
+static struct bfd_link_info *mep_info;
+static int warn_tp = 0, warn_sda = 0;
+
+static bfd_vma
+mep_lookup_global
+ (char * name,
+ bfd_vma ofs,
+ bfd_vma * cache,
+ int * warn)
+{
+ struct bfd_link_hash_entry *h;
+
+ if (*cache || *warn)
+ return *cache;
+
+ h = bfd_link_hash_lookup (mep_info->hash, name, FALSE, FALSE, TRUE);
+ if (h == 0 || h->type != bfd_link_hash_defined)
+ {
+ *warn = ofs + 1;
+ return 0;
+ }
+ *cache = (h->u.def.value
+ + h->u.def.section->output_section->vma
+ + h->u.def.section->output_offset);
+ return *cache;
+}
+
+static bfd_vma
+mep_tpoff_base (bfd_vma ofs)
+{
+ static bfd_vma cache = 0;
+ return mep_lookup_global ("__tpbase", ofs, &cache, &warn_tp);
+}
+
+static bfd_vma
+mep_sdaoff_base (bfd_vma ofs)
+{
+ static bfd_vma cache = 0;
+ return mep_lookup_global ("__sdabase", ofs, &cache, &warn_sda);
+}
+
+static bfd_reloc_status_type
+mep_final_link_relocate
+ (reloc_howto_type * howto,
+ bfd * input_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * rel,
+ bfd_vma relocation)
+{
+ unsigned long u;
+ long s;
+ unsigned char *byte;
+ bfd_vma pc;
+ bfd_reloc_status_type r = bfd_reloc_ok;
+ int e2, e4;
+
+ if (bfd_big_endian (input_bfd))
+ {
+ e2 = 0;
+ e4 = 0;
+ }
+ else
+ {
+ e2 = 1;
+ e4 = 3;
+ }
+
+ pc = (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+
+ s = relocation + rel->r_addend;
+
+ byte = (unsigned char *)contents + rel->r_offset;
+
+ if (howto->type == R_MEP_PCREL24A2
+ && s == 0
+ && pc >= 0x800000)
+ {
+ /* This is an unreachable branch to an undefined weak function.
+ Silently ignore it, since the opcode can't do that but should
+ never be executed anyway. */
+ return bfd_reloc_ok;
+ }
+
+ if (howto->pc_relative)
+ s -= pc;
+
+ u = (unsigned long) s;
+
+ switch (howto->type)
+ {
+ /* MEPRELOC:APPLY */
+ /* This section generated from bfd/mep-relocs.pl from include/elf/mep.h. */
+ case R_MEP_8: /* 76543210 */
+ if (u > 255) r = bfd_reloc_overflow;
+ byte[0] = (u & 0xff);
+ break;
+ case R_MEP_16: /* fedcba9876543210 */
+ if (u > 65535) r = bfd_reloc_overflow;
+ byte[0^e2] = ((u >> 8) & 0xff);
+ byte[1^e2] = (u & 0xff);
+ break;
+ case R_MEP_32: /* vutsrqponmlkjihgfedcba9876543210 */
+ byte[0^e4] = ((u >> 24) & 0xff);
+ byte[1^e4] = ((u >> 16) & 0xff);
+ byte[2^e4] = ((u >> 8) & 0xff);
+ byte[3^e4] = (u & 0xff);
+ break;
+ case R_MEP_PCREL8A2: /* --------7654321- */
+ if (-128 > s || s > 127) r = bfd_reloc_overflow;
+ byte[1^e2] = (byte[1^e2] & 0x01) | (s & 0xfe);
+ break;
+ case R_MEP_PCREL12A2: /* ----ba987654321- */
+ if (-2048 > s || s > 2047) r = bfd_reloc_overflow;
+ byte[0^e2] = (byte[0^e2] & 0xf0) | ((s >> 8) & 0x0f);
+ byte[1^e2] = (byte[1^e2] & 0x01) | (s & 0xfe);
+ break;
+ case R_MEP_PCREL17A2: /* ----------------gfedcba987654321 */
+ if (-65536 > s || s > 65535) r = bfd_reloc_overflow;
+ byte[2^e2] = ((s >> 9) & 0xff);
+ byte[3^e2] = ((s >> 1) & 0xff);
+ break;
+ case R_MEP_PCREL24A2: /* -----7654321----nmlkjihgfedcba98 */
+ if (-8388608 > s || s > 8388607) r = bfd_reloc_overflow;
+ byte[0^e2] = (byte[0^e2] & 0xf8) | ((s >> 5) & 0x07);
+ byte[1^e2] = (byte[1^e2] & 0x0f) | ((s << 3) & 0xf0);
+ byte[2^e2] = ((s >> 16) & 0xff);
+ byte[3^e2] = ((s >> 8) & 0xff);
+ break;
+ case R_MEP_PCABS24A2: /* -----7654321----nmlkjihgfedcba98 */
+ if (u > 16777215) r = bfd_reloc_overflow;
+ byte[0^e2] = (byte[0^e2] & 0xf8) | ((u >> 5) & 0x07);
+ byte[1^e2] = (byte[1^e2] & 0x0f) | ((u << 3) & 0xf0);
+ byte[2^e2] = ((u >> 16) & 0xff);
+ byte[3^e2] = ((u >> 8) & 0xff);
+ break;
+ case R_MEP_LOW16: /* ----------------fedcba9876543210 */
+ byte[2^e2] = ((u >> 8) & 0xff);
+ byte[3^e2] = (u & 0xff);
+ break;
+ case R_MEP_HI16U: /* ----------------vutsrqponmlkjihg */
+ byte[2^e2] = ((u >> 24) & 0xff);
+ byte[3^e2] = ((u >> 16) & 0xff);
+ break;
+ case R_MEP_HI16S: /* ----------------vutsrqponmlkjihg */
+ byte[2^e2] = ((s >> 24) & 0xff);
+ byte[3^e2] = ((s >> 16) & 0xff);
+ break;
+ case R_MEP_GPREL: /* ----------------fedcba9876543210 */
+ s -= mep_sdaoff_base(rel->r_offset);
+ if (-32768 > s || s > 32767) r = bfd_reloc_overflow;
+ byte[2^e2] = ((s >> 8) & 0xff);
+ byte[3^e2] = (s & 0xff);
+ break;
+ case R_MEP_TPREL: /* ----------------fedcba9876543210 */
+ s -= mep_tpoff_base(rel->r_offset);
+ if (-32768 > s || s > 32767) r = bfd_reloc_overflow;
+ byte[2^e2] = ((s >> 8) & 0xff);
+ byte[3^e2] = (s & 0xff);
+ break;
+ case R_MEP_TPREL7: /* ---------6543210 */
+ u -= mep_tpoff_base(rel->r_offset);
+ if (u > 127) r = bfd_reloc_overflow;
+ byte[1^e2] = (byte[1^e2] & 0x80) | (u & 0x7f);
+ break;
+ case R_MEP_TPREL7A2: /* ---------654321- */
+ u -= mep_tpoff_base(rel->r_offset);
+ if (u > 127) r = bfd_reloc_overflow;
+ byte[1^e2] = (byte[1^e2] & 0x81) | (u & 0x7e);
+ break;
+ case R_MEP_TPREL7A4: /* ---------65432-- */
+ u -= mep_tpoff_base(rel->r_offset);
+ if (u > 127) r = bfd_reloc_overflow;
+ byte[1^e2] = (byte[1^e2] & 0x83) | (u & 0x7c);
+ break;
+ case R_MEP_UIMM24: /* --------76543210nmlkjihgfedcba98 */
+ if (u > 16777215) r = bfd_reloc_overflow;
+ byte[1^e2] = (u & 0xff);
+ byte[2^e2] = ((u >> 16) & 0xff);
+ byte[3^e2] = ((u >> 8) & 0xff);
+ break;
+ case R_MEP_ADDR24A4: /* --------765432--nmlkjihgfedcba98 */
+ if (u > 16777215) r = bfd_reloc_overflow;
+ byte[1^e2] = (byte[1^e2] & 0x03) | (u & 0xfc);
+ byte[2^e2] = ((u >> 16) & 0xff);
+ byte[3^e2] = ((u >> 8) & 0xff);
+ break;
+ case R_MEP_GNU_VTINHERIT: /* ---------------- */
+ break;
+ case R_MEP_GNU_VTENTRY: /* ---------------- */
+ break;
+ /* MEPRELOC:END */
+ default:
+ abort ();
+ }
+
+ return r;
+}
+
+/* Set the howto pointer for a MEP ELF reloc. */
+
+static void
+mep_info_to_howto_rela
+ (bfd * abfd ATTRIBUTE_UNUSED,
+ arelent * cache_ptr,
+ Elf_Internal_Rela * dst)
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (dst->r_info);
+ cache_ptr->howto = & mep_elf_howto_table [r_type];
+}
+
+/* Look through the relocs for a section during the first phase.
+ Since we don't do .gots or .plts, we just need to consider the
+ virtual table relocs for gc. */
+
+static bfd_boolean
+mep_elf_check_relocs
+ (bfd * abfd,
+ struct bfd_link_info * info,
+ asection * sec,
+ const Elf_Internal_Rela * relocs)
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ struct elf_link_hash_entry ** sym_hashes_end;
+ const Elf_Internal_Rela * rel;
+ const Elf_Internal_Rela * rel_end;
+
+ if (info->relocatable)
+ return TRUE;
+
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ sym_hashes_end = sym_hashes + symtab_hdr->sh_size / sizeof (Elf32_External_Sym);
+ if (!elf_bad_symtab (abfd))
+ sym_hashes_end -= symtab_hdr->sh_info;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ struct elf_link_hash_entry *h;
+ unsigned long r_symndx;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ }
+ return TRUE;
+}
+
+
+/* Relocate a MEP ELF section.
+ There is some attempt to make this function usable for many architectures,
+ both USE_REL and USE_RELA ['twould be nice if such a critter existed],
+ if only to serve as a learning tool.
+
+ The RELOCATE_SECTION function is called by the new 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 adjusting the section contents as
+ necessary, and (if using Rela relocs and generating a relocatable
+ 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 relocatable 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 bfd_boolean
+mep_elf_relocate_section
+ (bfd * output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info,
+ bfd * input_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * relocs,
+ Elf_Internal_Sym * local_syms,
+ asection ** local_sections)
+{
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ Elf_Internal_Rela * rel;
+ Elf_Internal_Rela * relend;
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ relend = relocs + input_section->reloc_count;
+
+ mep_info = info;
+
+ for (rel = relocs; rel < relend; rel ++)
+ {
+ reloc_howto_type * howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym * sym;
+ asection * sec;
+ struct elf_link_hash_entry * h;
+ bfd_vma relocation;
+ bfd_reloc_status_type r;
+ const char * name = NULL;
+ int r_type;
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+ /* Is this a complex relocation? */
+ if (!info->relocatable && ELF32_R_TYPE (rel->r_info) == R_RELC)
+ {
+ bfd_elf_perform_complex_relocation (output_bfd, info,
+ input_bfd, input_section, contents,
+ rel, local_syms, local_sections);
+ continue;
+ }
+
+ howto = mep_elf_howto_table + ELF32_R_TYPE (rel->r_info);
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections [r_symndx];
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
+
+ name = bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name);
+ name = (name == NULL) ? bfd_section_name (input_bfd, sec) : name;
+#if 0
+ fprintf (stderr, "local: sec: %s, sym: %s (%d), value: %x + %x + %x addend %x\n",
+ sec->name, name, sym->st_name,
+ sec->output_section->vma, sec->output_offset,
+ sym->st_value, rel->r_addend);
+#endif
+ }
+ else
+ {
+ relocation = 0;
+ h = 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;
+
+ name = h->root.root.string;
+
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.u.def.section;
+ relocation = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+#if 0
+ fprintf (stderr,
+ "defined: sec: %s, name: %s, value: %x + %x + %x gives: %x\n",
+ sec->name, name, h->root.u.def.value,
+ sec->output_section->vma, sec->output_offset, relocation);
+#endif
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ {
+#if 0
+ fprintf (stderr, "undefined: sec: %s, name: %s\n",
+ sec->name, name);
+#endif
+ }
+ else if (!info->relocatable)
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ (!info->shared && info->unresolved_syms_in_objects == RM_GENERATE_ERROR))))
+ return FALSE;
+#if 0
+ fprintf (stderr, "unknown: name: %s\n", name);
+#endif
+ }
+ }
+
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ {
+ /* 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 (sym != NULL && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ rel->r_addend += sec->output_offset;
+ continue;
+ }
+
+ switch (r_type)
+ {
+ default:
+ r = mep_final_link_relocate (howto, input_bfd, input_section,
+ contents, rel, relocation);
+ break;
+ }
+
+ if (r != bfd_reloc_ok)
+ {
+ const char * msg = (const char *) NULL;
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ r = info->callbacks->reloc_overflow
+ (info, (h ? &h->root : NULL), name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset);
+ break;
+
+ case bfd_reloc_undefined:
+ r = info->callbacks->undefined_symbol
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE);
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _("internal error: out of range error");
+ break;
+
+ case bfd_reloc_notsupported:
+ msg = _("internal error: unsupported relocation error");
+ break;
+
+ case bfd_reloc_dangerous:
+ msg = _("internal error: dangerous relocation");
+ break;
+
+ default:
+ msg = _("internal error: unknown error");
+ break;
+ }
+
+ if (msg)
+ r = info->callbacks->warning
+ (info, msg, name, input_bfd, input_section, rel->r_offset);
+
+ if (! r)
+ return FALSE;
+ }
+ }
+
+ if (warn_tp)
+ info->callbacks->undefined_symbol
+ (info, "__tpbase", input_bfd, input_section, warn_tp-1, TRUE);
+ if (warn_sda)
+ info->callbacks->undefined_symbol
+ (info, "__sdabase", input_bfd, input_section, warn_sda-1, TRUE);
+ if (warn_sda || warn_tp)
+ return FALSE;
+
+ return TRUE;
+}
+
+
+/* Update the got entry reference counts for the section being
+ removed. */
+
+static bfd_boolean
+mep_elf_gc_sweep_hook
+ (bfd * abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ asection * sec ATTRIBUTE_UNUSED,
+ const Elf_Internal_Rela * relocs ATTRIBUTE_UNUSED)
+{
+ return TRUE;
+}
+
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+mep_elf_gc_mark_hook
+ (asection * sec,
+ struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela * rel,
+ struct elf_link_hash_entry * h,
+ Elf_Internal_Sym * sym)
+{
+ if (h != NULL)
+ {
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ default:
+ switch (h->root.type)
+ {
+ case bfd_link_hash_defined:
+ case bfd_link_hash_defweak:
+ return h->root.u.def.section;
+
+ case bfd_link_hash_common:
+ return h->root.u.c.p->section;
+
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ if (!(elf_bad_symtab (sec->owner)
+ && 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 (sec->owner, sym->st_shndx);
+ }
+
+ return NULL;
+}
+
+
+/* Function to set the ELF flag bits. */
+
+static bfd_boolean
+mep_elf_set_private_flags (bfd * abfd,
+ flagword flags)
+{
+ elf_elfheader (abfd)->e_flags = flags;
+ elf_flags_init (abfd) = TRUE;
+ return TRUE;
+}
+
+static bfd_boolean
+mep_elf_copy_private_bfd_data (bfd * ibfd, bfd * obfd)
+{
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
+ elf_flags_init (obfd) = TRUE;
+
+ /* Copy object attributes. */
+ _bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+ return TRUE;
+}
+
+/* Merge backend specific data from an object file to the output
+ object file when linking. */
+
+static bfd_boolean
+mep_elf_merge_private_bfd_data (bfd * ibfd, bfd * obfd)
+{
+ static bfd *last_ibfd = 0;
+ flagword old_flags, new_flags;
+ flagword old_partial, new_partial;
+
+ /* Check if we have the same endianess. */
+ if (_bfd_generic_verify_endian_match (ibfd, obfd) == FALSE)
+ return FALSE;
+
+ new_flags = elf_elfheader (ibfd)->e_flags;
+ old_flags = elf_elfheader (obfd)->e_flags;
+
+#ifdef DEBUG
+ _bfd_error_handler ("%B: old_flags = 0x%.8lx, new_flags = 0x%.8lx, init = %s",
+ ibfd, old_flags, new_flags, elf_flags_init (obfd) ? "yes" : "no");
+#endif
+
+ /* First call, no flags set. */
+ if (!elf_flags_init (obfd))
+ {
+ elf_flags_init (obfd) = TRUE;
+ old_flags = new_flags;
+ }
+ else if ((new_flags | old_flags) & EF_MEP_LIBRARY)
+ {
+ /* Non-library flags trump library flags. The choice doesn't really
+ matter if both OLD_FLAGS and NEW_FLAGS have EF_MEP_LIBRARY set. */
+ if (old_flags & EF_MEP_LIBRARY)
+ old_flags = new_flags;
+ }
+ else
+ {
+ /* Make sure they're for the same mach. Allow upgrade from the "mep"
+ mach. */
+ new_partial = (new_flags & EF_MEP_CPU_MASK);
+ old_partial = (old_flags & EF_MEP_CPU_MASK);
+ if (new_partial == old_partial)
+ ;
+ else if (new_partial == EF_MEP_CPU_MEP)
+ ;
+ else if (old_partial == EF_MEP_CPU_MEP)
+ old_flags = (old_flags & ~EF_MEP_CPU_MASK) | new_partial;
+ else
+ {
+ _bfd_error_handler (_("%B and %B are for different cores"), last_ibfd, ibfd);
+ bfd_set_error (bfd_error_invalid_target);
+ return FALSE;
+ }
+
+ /* Make sure they're for the same me_module. Allow basic config to
+ mix with any other. */
+ new_partial = (new_flags & EF_MEP_INDEX_MASK);
+ old_partial = (old_flags & EF_MEP_INDEX_MASK);
+ if (new_partial == old_partial)
+ ;
+ else if (new_partial == 0)
+ ;
+ else if (old_partial == 0)
+ old_flags = (old_flags & ~EF_MEP_INDEX_MASK) | new_partial;
+ else
+ {
+ _bfd_error_handler (_("%B and %B are for different configurations"), last_ibfd, ibfd);
+ bfd_set_error (bfd_error_invalid_target);
+ return FALSE;
+ }
+ }
+
+ elf_elfheader (obfd)->e_flags = old_flags;
+ last_ibfd = ibfd;
+ return TRUE;
+}
+
+/* This will be edited by the MeP configration tool. */
+static const char * config_names[] =
+{
+ "basic"
+ /* start-mepcfgtool */
+ ,"simple"
+ ,"fmax"
+ /* end-mepcfgtool */
+};
+
+static const char * core_names[] =
+{
+ "MeP", "MeP-c2", "MeP-c3", "MeP-h1"
+};
+
+static bfd_boolean
+mep_elf_print_private_bfd_data (bfd * abfd, void * ptr)
+{
+ FILE * file = (FILE *) ptr;
+ flagword flags, partial_flags;
+
+ BFD_ASSERT (abfd != NULL && ptr != NULL);
+
+ /* Print normal ELF private data. */
+ _bfd_elf_print_private_bfd_data (abfd, ptr);
+
+ flags = elf_elfheader (abfd)->e_flags;
+ fprintf (file, _("private flags = 0x%lx"), (long)flags);
+
+ partial_flags = (flags & EF_MEP_CPU_MASK) >> 24;
+ if (partial_flags < ARRAY_SIZE (core_names))
+ fprintf (file, " core: %s", core_names[(long)partial_flags]);
+
+ partial_flags = flags & EF_MEP_INDEX_MASK;
+ if (partial_flags < ARRAY_SIZE (config_names))
+ fprintf (file, " me_module: %s", config_names[(long)partial_flags]);
+
+ fputc ('\n', file);
+
+ return TRUE;
+}
+
+/* Return the machine subcode from the ELF e_flags header. */
+
+static int
+elf32_mep_machine (bfd * abfd)
+{
+ switch (elf_elfheader (abfd)->e_flags & EF_MEP_CPU_MASK)
+ {
+ default: break;
+ case EF_MEP_CPU_C2: return bfd_mach_mep;
+ case EF_MEP_CPU_C3: return bfd_mach_mep;
+ case EF_MEP_CPU_C4: return bfd_mach_mep;
+ case EF_MEP_CPU_H1: return bfd_mach_mep_h1;
+ }
+
+ return bfd_mach_mep;
+}
+
+static bfd_boolean
+mep_elf_object_p (bfd * abfd)
+{
+ /* Irix 5 and 6 is broken. Object file symbol tables are not always
+ sorted correctly such that local symbols preceed global symbols,
+ and the sh_info field in the symbol table is not always right. */
+ /* This is needed for the RELC support code. */
+ elf_bad_symtab (abfd) = TRUE;
+ bfd_default_set_arch_mach (abfd, bfd_arch_mep, elf32_mep_machine (abfd));
+ return TRUE;
+}
+
+static bfd_boolean
+mep_elf_section_flags (flagword * flags, const Elf_Internal_Shdr * hdr)
+{
+ if (hdr->sh_flags & SHF_MEP_VLIW)
+ * flags |= SEC_MEP_VLIW;
+ return TRUE;
+}
+
+static bfd_boolean
+mep_elf_fake_sections (bfd * abfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr * hdr,
+ asection * sec)
+{
+ if (sec->flags & SEC_MEP_VLIW)
+ hdr->sh_flags |= SHF_MEP_VLIW;
+ return TRUE;
+}
+
+
+#define ELF_ARCH bfd_arch_mep
+#define ELF_MACHINE_CODE EM_CYGNUS_MEP
+#define ELF_MAXPAGESIZE 0x1000
+
+#define TARGET_BIG_SYM bfd_elf32_mep_vec
+#define TARGET_BIG_NAME "elf32-mep"
+
+#define TARGET_LITTLE_SYM bfd_elf32_mep_little_vec
+#define TARGET_LITTLE_NAME "elf32-mep-little"
+
+#define elf_info_to_howto_rel NULL
+#define elf_info_to_howto mep_info_to_howto_rela
+#define elf_backend_relocate_section mep_elf_relocate_section
+#define elf_backend_gc_mark_hook mep_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook mep_elf_gc_sweep_hook
+#define elf_backend_check_relocs mep_elf_check_relocs
+#define elf_backend_object_p mep_elf_object_p
+#define elf_backend_section_flags mep_elf_section_flags
+#define elf_backend_fake_sections mep_elf_fake_sections
+
+#define elf_backend_can_gc_sections 1
+
+#define bfd_elf32_bfd_reloc_type_lookup mep_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup mep_reloc_name_lookup
+#define bfd_elf32_bfd_set_private_flags mep_elf_set_private_flags
+#define bfd_elf32_bfd_copy_private_bfd_data mep_elf_copy_private_bfd_data
+#define bfd_elf32_bfd_merge_private_bfd_data mep_elf_merge_private_bfd_data
+#define bfd_elf32_bfd_print_private_bfd_data mep_elf_print_private_bfd_data
+
+/* We use only the RELA entries. */
+#define USE_RELA
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-mips.c b/contrib/binutils/bfd/elf32-mips.c
index 6ed4ad3..3843b85 100644
--- a/contrib/binutils/bfd/elf32-mips.c
+++ b/contrib/binutils/bfd/elf32-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -29,8 +29,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
different MIPS ELF from other targets. This matters when linking.
This file supports both, switching at runtime. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "bfdlink.h"
#include "genlink.h"
@@ -68,8 +68,6 @@ static bfd_boolean mips_elf32_object_p
(bfd *);
static bfd_boolean mips_elf_is_local_label_name
(bfd *, const char *);
-static bfd_reloc_status_type mips16_jump_reloc
- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips16_gprel_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips_elf_final_gp
@@ -702,6 +700,21 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* 32 bit relocation with no addend. */
+ HOWTO (R_MIPS_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_GLOB_DAT", /* name */
+ FALSE, /* partial_inplace */
+ 0x0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* The reloc used for BFD_RELOC_CTOR when doing a 64 bit link. This
@@ -734,7 +747,7 @@ static reloc_howto_type elf_mips16_howto_table_rel[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -1112,36 +1125,6 @@ mips32_64bit_reloc (bfd *abfd, arelent *reloc_entry,
return r;
}
-/* Handle a mips16 jump. */
-
-static bfd_reloc_status_type
-mips16_jump_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
- asymbol *symbol, void *data ATTRIBUTE_UNUSED,
- asection *input_section, bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
-{
- if (output_bfd != NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* FIXME. */
- {
- static bfd_boolean warned;
-
- if (! warned)
- (*_bfd_error_handler)
- (_("Linking mips16 objects into %s format is not supported"),
- bfd_get_target (input_section->output_section->owner));
- warned = TRUE;
- }
-
- return bfd_reloc_undefined;
-}
-
/* Handle a mips16 GP relative reloc. */
static bfd_reloc_status_type
@@ -1291,6 +1274,40 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
}
}
+static reloc_howto_type *
+bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (elf_mips_howto_table_rel)
+ / sizeof (elf_mips_howto_table_rel[0]));
+ i++)
+ if (elf_mips_howto_table_rel[i].name != NULL
+ && strcasecmp (elf_mips_howto_table_rel[i].name, r_name) == 0)
+ return &elf_mips_howto_table_rel[i];
+
+ for (i = 0;
+ i < (sizeof (elf_mips16_howto_table_rel)
+ / sizeof (elf_mips16_howto_table_rel[0]));
+ i++)
+ if (elf_mips16_howto_table_rel[i].name != NULL
+ && strcasecmp (elf_mips16_howto_table_rel[i].name, r_name) == 0)
+ return &elf_mips16_howto_table_rel[i];
+
+ if (strcasecmp (elf_mips_gnu_pcrel32.name, r_name) == 0)
+ return &elf_mips_gnu_pcrel32;
+ if (strcasecmp (elf_mips_gnu_rel16_s2.name, r_name) == 0)
+ return &elf_mips_gnu_rel16_s2;
+ if (strcasecmp (elf_mips_gnu_vtinherit_howto.name, r_name) == 0)
+ return &elf_mips_gnu_vtinherit_howto;
+ if (strcasecmp (elf_mips_gnu_vtentry_howto.name, r_name) == 0)
+ return &elf_mips_gnu_vtentry_howto;
+
+ return NULL;
+}
+
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
static reloc_howto_type *
@@ -1537,12 +1554,15 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define elf_backend_create_dynamic_sections \
_bfd_mips_elf_create_dynamic_sections
#define elf_backend_check_relocs _bfd_mips_elf_check_relocs
+#define elf_backend_merge_symbol_attribute \
+ _bfd_mips_elf_merge_symbol_attribute
#define elf_backend_adjust_dynamic_symbol \
_bfd_mips_elf_adjust_dynamic_symbol
#define elf_backend_always_size_sections \
_bfd_mips_elf_always_size_sections
#define elf_backend_size_dynamic_sections \
_bfd_mips_elf_size_dynamic_sections
+#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
#define elf_backend_finish_dynamic_symbol \
_bfd_mips_elf_finish_dynamic_symbol
@@ -1599,6 +1619,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses
a value of 0x1000, and we are compatible. */
#define ELF_MAXPAGESIZE 0x1000
+#define ELF_COMMONPAGESIZE 0x1000
#include "elf32-target.h"
@@ -1609,15 +1630,20 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#undef TARGET_BIG_NAME
#undef ELF_MAXPAGESIZE
+#undef ELF_COMMONPAGESIZE
#define TARGET_LITTLE_SYM bfd_elf32_tradlittlemips_vec
#define TARGET_LITTLE_NAME "elf32-tradlittlemips"
#define TARGET_BIG_SYM bfd_elf32_tradbigmips_vec
#define TARGET_BIG_NAME "elf32-tradbigmips"
-/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
- page sizes of up to that limit, so we need to respect it. */
+/* The MIPS ABI says at Page 5-1:
+ Virtual addresses and file offsets for MIPS segments are congruent
+ modulo 64 KByte (0x10000) or larger powers of 2. Because 64 KBytes
+ is the maximum page size, the files are suitable for paging
+ regardless of physical page size. */
#define ELF_MAXPAGESIZE 0x10000
+#define ELF_COMMONPAGESIZE 0x1000
#define elf32_bed elf32_tradbed
/* Include the target file again for this target. */
@@ -1672,6 +1698,17 @@ mips_vxworks_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
}
}
+static reloc_howto_type *
+mips_vxworks_bfd_reloc_name_lookup (bfd *abfd, const char *r_name)
+{
+ if (strcasecmp (mips_vxworks_copy_howto_rela.name, r_name) == 0)
+ return &mips_vxworks_copy_howto_rela;
+ if (strcasecmp (mips_vxworks_jump_slot_howto_rela.name, r_name) == 0)
+ return &mips_vxworks_jump_slot_howto_rela;
+
+ return bfd_elf32_bfd_reloc_name_lookup (abfd, r_name);
+}
+
/* Implement elf_backend_mips_rtype_to_lookup for VxWorks. */
static reloc_howto_type *
@@ -1702,6 +1739,9 @@ mips_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
#undef TARGET_BIG_SYM
#undef TARGET_BIG_NAME
+#undef ELF_MAXPAGESIZE
+#undef ELF_COMMONPAGESIZE
+
#define TARGET_LITTLE_SYM bfd_elf32_littlemips_vxworks_vec
#define TARGET_LITTLE_NAME "elf32-littlemips-vxworks"
#define TARGET_BIG_SYM bfd_elf32_bigmips_vxworks_vec
@@ -1710,8 +1750,8 @@ mips_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
#undef elf32_bed
#define elf32_bed elf32_mips_vxworks_bed
-#undef ELF_MAXPAGESIZE
#define ELF_MAXPAGESIZE 0x1000
+#define ELF_COMMONPAGESIZE 0x1000
#undef elf_backend_want_got_plt
#define elf_backend_want_got_plt 1
@@ -1735,6 +1775,9 @@ mips_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker)
#undef bfd_elf32_bfd_reloc_type_lookup
#define bfd_elf32_bfd_reloc_type_lookup \
mips_vxworks_bfd_reloc_type_lookup
+#undef bfd_elf32_bfd_reloc_name_lookup
+#define bfd_elf32_bfd_reloc_name_lookup \
+ mips_vxworks_bfd_reloc_name_lookup
#undef elf_backend_mips_rtype_to_howto
#define elf_backend_mips_rtype_to_howto \
mips_vxworks_rtype_to_howto
diff --git a/contrib/binutils/bfd/elf32-ppc.c b/contrib/binutils/bfd/elf32-ppc.c
index 53d1046..d67ad86 100644
--- a/contrib/binutils/bfd/elf32-ppc.c
+++ b/contrib/binutils/bfd/elf32-ppc.c
@@ -1,6 +1,6 @@
/* PowerPC-specific support for 32-bit ELF
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -25,8 +25,9 @@
suggestions from the in-progress Embedded PowerPC ABI, and that
information may also not match. */
-#include "bfd.h"
#include "sysdep.h"
+#include <stdarg.h>
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -1577,6 +1578,22 @@ ppc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return ppc_elf_howto_table[r];
};
+static reloc_howto_type *
+ppc_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (ppc_elf_howto_raw) / sizeof (ppc_elf_howto_raw[0]);
+ i++)
+ if (ppc_elf_howto_raw[i].name != NULL
+ && strcasecmp (ppc_elf_howto_raw[i].name, r_name) == 0)
+ return &ppc_elf_howto_raw[i];
+
+ return NULL;
+}
+
/* Set the howto pointer for a PowerPC ELF reloc. */
static void
@@ -1590,6 +1607,17 @@ ppc_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
BFD_ASSERT (ELF32_R_TYPE (dst->r_info) < (unsigned int) R_PPC_max);
cache_ptr->howto = ppc_elf_howto_table[ELF32_R_TYPE (dst->r_info)];
+
+ /* Just because the above assert didn't trigger doesn't mean that
+ ELF32_R_TYPE (dst->r_info) is necessarily a valid relocation. */
+ if (!cache_ptr->howto)
+ {
+ (*_bfd_error_handler) (_("%B: invalid relocation type %d"),
+ abfd, ELF32_R_TYPE (dst->r_info));
+ bfd_set_error (bfd_error_bad_value);
+
+ cache_ptr->howto = ppc_elf_howto_table[R_PPC_NONE];
+ }
}
/* Handle the R_PPC_ADDR16_HA and R_PPC_REL16_HA relocs. */
@@ -1695,6 +1723,10 @@ struct ppc_elf_obj_tdata
/* A mapping from local symbols to offsets into the various linker
sections added. This is index by the symbol index. */
elf_linker_section_pointers_t **linker_section_pointers;
+
+ /* Flags used to auto-detect plt type. */
+ unsigned int makes_plt_call : 1;
+ unsigned int has_rel16 : 1;
};
#define ppc_elf_tdata(bfd) \
@@ -1708,11 +1740,14 @@ struct ppc_elf_obj_tdata
static bfd_boolean
ppc_elf_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct ppc_elf_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct ppc_elf_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
/* Fix bad default arch selected for a 32 bit input bfd when the
@@ -1810,6 +1845,52 @@ ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return TRUE;
}
+static char *
+ppc_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type, ...)
+{
+ switch (note_type)
+ {
+ default:
+ return NULL;
+
+ case NT_PRPSINFO:
+ {
+ char data[128];
+ va_list ap;
+
+ va_start (ap, note_type);
+ memset (data, 0, 32);
+ strncpy (data + 32, va_arg (ap, const char *), 16);
+ strncpy (data + 48, va_arg (ap, const char *), 80);
+ va_end (ap);
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", note_type, data, sizeof (data));
+ }
+
+ case NT_PRSTATUS:
+ {
+ char data[268];
+ va_list ap;
+ long pid;
+ int cursig;
+ const void *greg;
+
+ va_start (ap, note_type);
+ memset (data, 0, 72);
+ pid = va_arg (ap, long);
+ bfd_put_32 (abfd, pid, data + 24);
+ cursig = va_arg (ap, int);
+ bfd_put_16 (abfd, cursig, data + 12);
+ greg = va_arg (ap, const void *);
+ memcpy (data + 72, greg, 192);
+ memset (data + 264, 0, 4);
+ va_end (ap);
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", note_type, data, sizeof (data));
+ }
+ }
+}
+
/* Return address for Ith PLT stub in section PLT, for relocation REL
or (bfd_vma) -1 if it should not be included. */
@@ -1869,7 +1950,8 @@ ppc_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
need to bump up the number of section headers. */
static int
-ppc_elf_additional_program_headers (bfd *abfd)
+ppc_elf_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
int ret = 0;
@@ -1892,21 +1974,21 @@ ppc_elf_additional_program_headers (bfd *abfd)
static const struct bfd_elf_special_section ppc_elf_special_sections[] =
{
- { ".plt", 4, 0, SHT_NOBITS, SHF_ALLOC + SHF_EXECINSTR },
- { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".sbss2", 6, -2, SHT_PROGBITS, SHF_ALLOC },
- { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".sdata2", 7, -2, SHT_PROGBITS, SHF_ALLOC },
- { ".tags", 5, 0, SHT_ORDERED, SHF_ALLOC },
- { ".PPC.EMB.apuinfo", 16, 0, SHT_NOTE, 0 },
- { ".PPC.EMB.sbss0", 14, 0, SHT_PROGBITS, SHF_ALLOC },
- { ".PPC.EMB.sdata0", 15, 0, SHT_PROGBITS, SHF_ALLOC },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".plt"), 0, SHT_NOBITS, SHF_ALLOC + SHF_EXECINSTR },
+ { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".sbss2"), -2, SHT_PROGBITS, SHF_ALLOC },
+ { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".sdata2"), -2, SHT_PROGBITS, SHF_ALLOC },
+ { STRING_COMMA_LEN (".tags"), 0, SHT_ORDERED, SHF_ALLOC },
+ { STRING_COMMA_LEN (".PPC.EMB.apuinfo"), 0, SHT_NOTE, 0 },
+ { STRING_COMMA_LEN (".PPC.EMB.sbss0"), 0, SHT_PROGBITS, SHF_ALLOC },
+ { STRING_COMMA_LEN (".PPC.EMB.sdata0"), 0, SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
};
/* This is what we want for new plt/got. */
static struct bfd_elf_special_section ppc_alt_plt =
- { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC };
+ { STRING_COMMA_LEN (".plt"), 0, SHT_PROGBITS, SHF_ALLOC };
static const struct bfd_elf_special_section *
ppc_elf_get_sec_type_attr (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
@@ -2147,6 +2229,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info)
static bfd_boolean
ppc_elf_write_section (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
asection *asec,
bfd_byte *contents ATTRIBUTE_UNUSED)
{
@@ -2313,13 +2396,6 @@ struct ppc_elf_link_hash_entry
#define ppc_elf_hash_entry(ent) ((struct ppc_elf_link_hash_entry *) (ent))
-enum ppc_elf_plt_type {
- PLT_UNSET,
- PLT_OLD,
- PLT_NEW,
- PLT_VXWORKS
-};
-
/* PPC ELF linker hash table. */
struct ppc_elf_link_hash_table
@@ -2339,9 +2415,18 @@ struct ppc_elf_link_hash_table
elf_linker_section_t sdata[2];
asection *sbss;
+ /* The (unloaded but important) .rela.plt.unloaded on VxWorks. */
+ asection *srelplt2;
+
+ /* The .got.plt section (VxWorks only)*/
+ asection *sgotplt;
+
/* Shortcut to .__tls_get_addr. */
struct elf_link_hash_entry *tls_get_addr;
+ /* The bfd that forced an old-style PLT. */
+ bfd *old_bfd;
+
/* TLS local dynamic got entry handling. */
union {
bfd_signed_vma refcount;
@@ -2359,23 +2444,11 @@ struct ppc_elf_link_hash_table
/* The type of PLT we have chosen to use. */
enum ppc_elf_plt_type plt_type;
- /* Whether we can use the new PLT layout. */
- unsigned int can_use_new_plt:1;
-
/* Set if we should emit symbols for stubs. */
unsigned int emit_stub_syms:1;
- /* Small local sym to section mapping cache. */
- struct sym_sec_cache sym_sec;
-
- /* The (unloaded but important) .rela.plt.unloaded on VxWorks. */
- asection *srelplt2;
-
- /* The .got.plt section (VxWorks only)*/
- asection *sgotplt;
-
/* True if the target system is VxWorks. */
- int is_vxworks;
+ unsigned int is_vxworks:1;
/* The size of PLT entries. */
int plt_entry_size;
@@ -2383,6 +2456,9 @@ struct ppc_elf_link_hash_table
int plt_slot_size;
/* The size of the first PLT entry. */
int plt_initial_entry_size;
+
+ /* Small local sym to section mapping cache. */
+ struct sym_sec_cache sym_sec;
};
/* Get the PPC ELF linker hash table from a link_info structure. */
@@ -2454,8 +2530,6 @@ ppc_elf_link_hash_table_create (bfd *abfd)
ret->plt_entry_size = 12;
ret->plt_slot_size = 8;
ret->plt_initial_entry_size = 72;
-
- ret->is_vxworks = 0;
return &ret->elf.root;
}
@@ -3225,8 +3299,13 @@ ppc_elf_check_relocs (bfd *abfd,
}
else
{
- bfd_vma addend = r_type == R_PPC_PLTREL24 ? rel->r_addend : 0;
+ bfd_vma addend = 0;
+ if (r_type == R_PPC_PLTREL24)
+ {
+ ppc_elf_tdata (abfd)->makes_plt_call = 1;
+ addend = rel->r_addend;
+ }
h->needs_plt = 1;
if (!update_plt_info (abfd, h, got2, addend))
return FALSE;
@@ -3251,7 +3330,7 @@ ppc_elf_check_relocs (bfd *abfd,
case R_PPC_REL16_LO:
case R_PPC_REL16_HI:
case R_PPC_REL16_HA:
- htab->can_use_new_plt = 1;
+ ppc_elf_tdata (abfd)->has_rel16 = 1;
break;
/* These are just markers. */
@@ -3280,7 +3359,10 @@ ppc_elf_check_relocs (bfd *abfd,
/* This refers only to functions defined in the shared library. */
case R_PPC_LOCAL24PC:
if (h && h == htab->elf.hgot && htab->plt_type == PLT_UNSET)
- htab->plt_type = PLT_OLD;
+ {
+ htab->plt_type = PLT_OLD;
+ htab->old_bfd = abfd;
+ }
break;
/* This relocation describes the C++ object vtable hierarchy.
@@ -3334,7 +3416,10 @@ ppc_elf_check_relocs (bfd *abfd,
s = bfd_section_from_r_symndx (abfd, &htab->sym_sec, sec,
r_symndx);
if (s == got2)
- htab->plt_type = PLT_OLD;
+ {
+ htab->plt_type = PLT_OLD;
+ htab->old_bfd = abfd;
+ }
}
if (h == NULL || h == htab->elf.hgot)
break;
@@ -3349,7 +3434,10 @@ ppc_elf_check_relocs (bfd *abfd,
if (h == htab->elf.hgot)
{
if (htab->plt_type == PLT_UNSET)
- htab->plt_type = PLT_OLD;
+ {
+ htab->plt_type = PLT_OLD;
+ htab->old_bfd = abfd;
+ }
break;
}
/* fall through */
@@ -3432,7 +3520,7 @@ ppc_elf_check_relocs (bfd *abfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ BFD_ASSERT (CONST_STRNEQ (name, ".rela")
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -3506,6 +3594,62 @@ ppc_elf_check_relocs (bfd *abfd,
return TRUE;
}
+
+/* Merge object attributes from IBFD into OBFD. Raise an error if
+ there are conflicting attributes. */
+static bfd_boolean
+ppc_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
+{
+ obj_attribute *in_attr;
+ obj_attribute *out_attr;
+
+ if (!elf_known_obj_attributes_proc (obfd)[0].i)
+ {
+ /* This is the first object. Copy the attributes. */
+ _bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+ /* Use the Tag_null value to indicate the attributes have been
+ initialized. */
+ elf_known_obj_attributes_proc (obfd)[0].i = 1;
+
+ return TRUE;
+ }
+
+ /* Check for conflicting Tag_GNU_Power_ABI_FP attributes and merge
+ non-conflicting ones. */
+ in_attr = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU];
+ out_attr = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU];
+ if (in_attr[Tag_GNU_Power_ABI_FP].i != out_attr[Tag_GNU_Power_ABI_FP].i)
+ {
+ out_attr[Tag_GNU_Power_ABI_FP].type = 1;
+ if (out_attr[Tag_GNU_Power_ABI_FP].i == 0)
+ out_attr[Tag_GNU_Power_ABI_FP].i = in_attr[Tag_GNU_Power_ABI_FP].i;
+ else if (in_attr[Tag_GNU_Power_ABI_FP].i == 0)
+ ;
+ else if (out_attr[Tag_GNU_Power_ABI_FP].i == 1
+ && in_attr[Tag_GNU_Power_ABI_FP].i == 2)
+ _bfd_error_handler
+ (_("Warning: %B uses hard float, %B uses soft float"), obfd, ibfd);
+ else if (out_attr[Tag_GNU_Power_ABI_FP].i == 2
+ && in_attr[Tag_GNU_Power_ABI_FP].i == 1)
+ _bfd_error_handler
+ (_("Warning: %B uses hard float, %B uses soft float"), ibfd, obfd);
+ else if (in_attr[Tag_GNU_Power_ABI_FP].i > 2)
+ _bfd_error_handler
+ (_("Warning: %B uses unknown floating point ABI %d"), ibfd,
+ in_attr[Tag_GNU_Power_ABI_FP].i);
+ else
+ _bfd_error_handler
+ (_("Warning: %B uses unknown floating point ABI %d"), obfd,
+ out_attr[Tag_GNU_Power_ABI_FP].i);
+ }
+
+ /* Merge Tag_compatibility attributes and any common GNU ones. */
+ _bfd_elf_merge_object_attributes (ibfd, obfd);
+
+ return TRUE;
+}
+
/* Merge backend specific data from an object file to the output
object file when linking. */
@@ -3524,6 +3668,9 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
if (! _bfd_generic_verify_endian_match (ibfd, obfd))
return FALSE;
+ if (!ppc_elf_merge_obj_attributes (ibfd, obfd))
+ return FALSE;
+
new_flags = elf_elfheader (ibfd)->e_flags;
old_flags = elf_elfheader (obfd)->e_flags;
if (!elf_flags_init (obfd))
@@ -3603,7 +3750,7 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
int
ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info,
- int force_old_plt,
+ enum ppc_elf_plt_type plt_style,
int emit_stub_syms)
{
struct ppc_elf_link_hash_table *htab;
@@ -3612,8 +3759,37 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED,
htab = ppc_elf_hash_table (info);
if (htab->plt_type == PLT_UNSET)
- htab->plt_type = (force_old_plt || !htab->can_use_new_plt
- ? PLT_OLD : PLT_NEW);
+ {
+ if (plt_style == PLT_OLD)
+ htab->plt_type = PLT_OLD;
+ else
+ {
+ bfd *ibfd;
+ enum ppc_elf_plt_type plt_type = plt_style;
+
+ /* Look through the reloc flags left by ppc_elf_check_relocs.
+ Use the old style bss plt if a file makes plt calls
+ without using the new relocs, and if ld isn't given
+ --secure-plt and we never see REL16 relocs. */
+ if (plt_type == PLT_UNSET)
+ plt_type = PLT_OLD;
+ for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link_next)
+ if (is_ppc_elf_target (ibfd->xvec))
+ {
+ if (ppc_elf_tdata (ibfd)->has_rel16)
+ plt_type = PLT_NEW;
+ else if (ppc_elf_tdata (ibfd)->makes_plt_call)
+ {
+ plt_type = PLT_OLD;
+ htab->old_bfd = ibfd;
+ break;
+ }
+ }
+ htab->plt_type = plt_type;
+ }
+ }
+ if (htab->plt_type == PLT_OLD && plt_style == PLT_NEW)
+ info->callbacks->info (_("Using bss-plt due to %B"), htab->old_bfd);
htab->emit_stub_syms = emit_stub_syms;
@@ -3649,38 +3825,20 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED,
static asection *
ppc_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_PPC_GNU_VTINHERIT:
- case R_PPC_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_PPC_GNU_VTINHERIT:
+ case R_PPC_GNU_VTENTRY:
+ return NULL;
+ }
- return NULL;
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got, plt and dynamic reloc reference counts for the
@@ -4048,7 +4206,6 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
{
struct ppc_elf_link_hash_table *htab;
asection *s;
- unsigned int power_of_two;
#ifdef DEBUG
fprintf (stderr, "ppc_elf_adjust_dynamic_symbol called for %s\n",
@@ -4190,28 +4347,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_copy = 1;
}
- /* 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->size = BFD_ALIGN (s->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->size;
-
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
-
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* Generate a symbol to mark plt call stubs. For non-PIC code the sym is
@@ -4450,13 +4586,15 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
}
else
ent->plt.offset = (bfd_vma) -1;
-
- if (!doneone)
- {
- h->plt.plist = NULL;
- h->needs_plt = 0;
- }
}
+ else
+ ent->plt.offset = (bfd_vma) -1;
+
+ if (!doneone)
+ {
+ h->plt.plist = NULL;
+ h->needs_plt = 0;
+ }
}
else
{
@@ -4860,7 +4998,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
{
/* Strip these too. */
}
- else if (strncmp (bfd_get_section_name (dynobj, s), ".rela", 5) == 0)
+ else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
{
if (s->size != 0)
{
@@ -5518,6 +5656,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
asection *got2, *sreloc = NULL;
bfd_vma *local_got_offsets;
bfd_boolean ret = TRUE;
+ bfd_vma d_offset = (bfd_big_endian (output_bfd) ? 2 : 0);
#ifdef DEBUG
_bfd_error_handler ("ppc_elf_relocate_section called for %B section %A, "
@@ -5529,29 +5668,6 @@ ppc_elf_relocate_section (bfd *output_bfd,
got2 = bfd_get_section_by_name (input_bfd, ".got2");
- if (info->relocatable)
- {
- if (got2 == NULL)
- return TRUE;
-
- rel = relocs;
- relend = relocs + input_section->reloc_count;
- for (; rel < relend; rel++)
- {
- enum elf_ppc_reloc_type r_type;
-
- r_type = ELF32_R_TYPE (rel->r_info);
- if (r_type == R_PPC_PLTREL24
- && rel->r_addend >= 32768)
- {
- /* R_PPC_PLTREL24 is rather special. If non-zero, the
- addend specifies the GOT pointer offset within .got2. */
- rel->r_addend += got2->output_offset;
- }
- }
- return TRUE;
- }
-
/* Initialize howto table if not already done. */
if (!ppc_elf_howto_table[R_PPC_ADDR32])
ppc_elf_howto_init ();
@@ -5605,6 +5721,33 @@ ppc_elf_relocate_section (bfd *output_bfd,
sym_name = h->root.root.string;
}
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ howto = NULL;
+ if (r_type < R_PPC_max)
+ howto = ppc_elf_howto_table[r_type];
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ {
+ if (got2 != NULL
+ && r_type == R_PPC_PLTREL24
+ && rel->r_addend >= 32768)
+ {
+ /* R_PPC_PLTREL24 is rather special. If non-zero, the
+ addend specifies the GOT pointer offset within .got2. */
+ rel->r_addend += got2->output_offset;
+ }
+ continue;
+ }
+
/* TLS optimizations. Replace instruction sequences and relocs
based on information we collected in tls_optimize. We edit
RELOCS so that --emit-relocs will output something sensible
@@ -5644,10 +5787,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
&& (tls_mask & TLS_TPREL) == 0)
{
bfd_vma insn;
- insn = bfd_get_32 (output_bfd, contents + rel->r_offset - 2);
+ insn = bfd_get_32 (output_bfd, contents + rel->r_offset - d_offset);
insn &= 31 << 21;
insn |= 0x3c020000; /* addis 0,2,0 */
- bfd_put_32 (output_bfd, insn, contents + rel->r_offset - 2);
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset - d_offset);
r_type = R_PPC_TPREL16_HA;
rel->r_info = ELF32_R_INFO (r_symndx, r_type);
}
@@ -5691,9 +5834,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
r_type = R_PPC_TPREL16_LO;
rel->r_info = ELF32_R_INFO (r_symndx, r_type);
+
/* Was PPC_TLS which sits on insn boundary, now
- PPC_TPREL16_LO which is at insn+2. */
- rel->r_offset += 2;
+ PPC_TPREL16_LO which is at low-order half-word. */
+ rel->r_offset += d_offset;
}
break;
@@ -5715,7 +5859,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
else
{
bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
- rel->r_offset -= 2;
+ rel->r_offset -= d_offset;
r_type = R_PPC_NONE;
}
rel->r_info = ELF32_R_INFO (r_symndx, r_type);
@@ -5764,7 +5908,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
/* OK, it checks out. Replace the call. */
offset = rel[1].r_offset;
insn1 = bfd_get_32 (output_bfd,
- contents + rel->r_offset - 2);
+ contents + rel->r_offset - d_offset);
if ((tls_mask & tls_gd) != 0)
{
/* IE */
@@ -5792,10 +5936,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
rel->r_info = ELF32_R_INFO (r_symndx, r_type);
rel[1].r_info = ELF32_R_INFO (r_symndx,
R_PPC_TPREL16_LO);
- rel[1].r_offset += 2;
+ rel[1].r_offset += d_offset;
rel[1].r_addend = rel->r_addend;
}
- bfd_put_32 (output_bfd, insn1, contents + rel->r_offset - 2);
+ bfd_put_32 (output_bfd, insn1, contents + rel->r_offset - d_offset);
bfd_put_32 (output_bfd, insn2, contents + offset);
if (tls_gd == 0)
{
@@ -6189,14 +6333,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_ADDR14_BRNTAKEN:
case R_PPC_UADDR32:
case R_PPC_UADDR16:
- /* r_symndx will be zero only for relocs against symbols
- from removed linkonce sections, or sections discarded by
- a linker script. */
dodyn:
- if (r_symndx == 0)
- break;
- /* Fall thru. */
-
if ((input_section->flags & SEC_ALLOC) == 0)
break;
/* Fall thru. */
@@ -6238,7 +6375,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
if (name == NULL)
return FALSE;
- BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ BFD_ASSERT (CONST_STRNEQ (name, ".rela")
&& strcmp (bfd_get_section_name (input_bfd,
input_section),
name + 5) == 0);
@@ -6294,10 +6431,15 @@ ppc_elf_relocate_section (bfd *output_bfd,
but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
- BFD_ASSERT (indx > 0);
+ if (indx == 0)
+ {
+ osec = htab->elf.text_index_section;
+ indx = elf_section_data (osec)->dynindx;
+ }
+ BFD_ASSERT (indx != 0);
#ifdef DEBUG
- if (indx <= 0)
- printf ("indx=%d section=%s flags=%08x name=%s\n",
+ if (indx == 0)
+ printf ("indx=%ld section=%s flags=%08x name=%s\n",
indx, osec->name, osec->flags,
h->root.root.string);
#endif
@@ -6441,9 +6583,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
- if (! ((strncmp (name, ".sdata", 6) == 0
+ if (! ((CONST_STRNEQ (name, ".sdata")
&& (name[6] == 0 || name[6] == '.'))
- || (strncmp (name, ".sbss", 5) == 0
+ || (CONST_STRNEQ (name, ".sbss")
&& (name[5] == 0 || name[5] == '.'))))
{
(*_bfd_error_handler)
@@ -6469,8 +6611,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
- if (! (strncmp (name, ".sdata2", 7) == 0
- || strncmp (name, ".sbss2", 6) == 0))
+ if (! (CONST_STRNEQ (name, ".sdata2")
+ || CONST_STRNEQ (name, ".sbss2")))
{
(*_bfd_error_handler)
(_("%B: the target (%s) of a %s relocation is "
@@ -6501,9 +6643,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
BFD_ASSERT (sec != NULL);
name = bfd_get_section_name (abfd, sec->output_section);
- if (((strncmp (name, ".sdata", 6) == 0
+ if (((CONST_STRNEQ (name, ".sdata")
&& (name[6] == 0 || name[6] == '.'))
- || (strncmp (name, ".sbss", 5) == 0
+ || (CONST_STRNEQ (name, ".sbss")
&& (name[5] == 0 || name[5] == '.'))))
{
reg = 13;
@@ -6513,8 +6655,8 @@ ppc_elf_relocate_section (bfd *output_bfd,
+ sh->root.u.def.section->output_section->vma);
}
- else if (strncmp (name, ".sdata2", 7) == 0
- || strncmp (name, ".sbss2", 6) == 0)
+ else if (CONST_STRNEQ (name, ".sdata2")
+ || CONST_STRNEQ (name, ".sbss2"))
{
reg = 2;
sh = htab->sdata[1].sym;
@@ -6605,25 +6747,28 @@ ppc_elf_relocate_section (bfd *output_bfd,
case R_PPC_ADDR16_HA:
case R_PPC_REL16_HA:
- case R_PPC_GOT16_HA:
- case R_PPC_PLT16_HA:
case R_PPC_SECTOFF_HA:
case R_PPC_TPREL16_HA:
case R_PPC_DTPREL16_HA:
- case R_PPC_GOT_TLSGD16_HA:
- case R_PPC_GOT_TLSLD16_HA:
- case R_PPC_GOT_TPREL16_HA:
- case R_PPC_GOT_DTPREL16_HA:
case R_PPC_EMB_NADDR16_HA:
case R_PPC_EMB_RELST_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.
- Bits 0:15 are not used. */
- addend += 0x8000;
+ if (sec == NULL)
+ break;
+ /* Fall thru */
+
+ case R_PPC_PLT16_HA:
+ case R_PPC_GOT16_HA:
+ case R_PPC_GOT_TLSGD16_HA:
+ case R_PPC_GOT_TLSLD16_HA:
+ case R_PPC_GOT_TPREL16_HA:
+ case R_PPC_GOT_DTPREL16_HA:
+ /* Add 0x10000 if sign bit in 0:15 is set.
+ Bits 0:15 are not used. */
+ addend += 0x8000;
break;
}
@@ -7436,6 +7581,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
#define ELF_MAXPAGESIZE 0x10000
#endif
#define ELF_MINPAGESIZE 0x1000
+#define ELF_COMMONPAGESIZE 0x1000
#define elf_info_to_howto ppc_elf_info_to_howto
#ifdef EM_CYGNUS_POWERPC
@@ -7455,6 +7601,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
#define bfd_elf32_bfd_merge_private_bfd_data ppc_elf_merge_private_bfd_data
#define bfd_elf32_bfd_relax_section ppc_elf_relax_section
#define bfd_elf32_bfd_reloc_type_lookup ppc_elf_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup ppc_elf_reloc_name_lookup
#define bfd_elf32_bfd_set_private_flags ppc_elf_set_private_flags
#define bfd_elf32_bfd_link_hash_table_create ppc_elf_link_hash_table_create
@@ -7475,6 +7622,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
#define elf_backend_additional_program_headers ppc_elf_additional_program_headers
#define elf_backend_grok_prstatus ppc_elf_grok_prstatus
#define elf_backend_grok_psinfo ppc_elf_grok_psinfo
+#define elf_backend_write_core_note ppc_elf_write_core_note
#define elf_backend_reloc_type_class ppc_elf_reloc_type_class
#define elf_backend_begin_write_processing ppc_elf_begin_write_processing
#define elf_backend_final_write_processing ppc_elf_final_write_processing
@@ -7482,6 +7630,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
#define elf_backend_get_sec_type_attr ppc_elf_get_sec_type_attr
#define elf_backend_plt_sym_val ppc_elf_plt_sym_val
#define elf_backend_action_discarded ppc_elf_action_discarded
+#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-ppc.h b/contrib/binutils/bfd/elf32-ppc.h
index 5f8f63a..f5383a7 100644
--- a/contrib/binutils/bfd/elf32-ppc.h
+++ b/contrib/binutils/bfd/elf32-ppc.h
@@ -1,5 +1,5 @@
/* PowerPC-specific support for 64-bit ELF.
- Copyright 2003, 2005 Free Software Foundation, Inc.
+ Copyright 2003, 2005, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,15 @@ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-int ppc_elf_select_plt_layout (bfd *, struct bfd_link_info *, int, int);
+enum ppc_elf_plt_type {
+ PLT_UNSET,
+ PLT_OLD,
+ PLT_NEW,
+ PLT_VXWORKS
+};
+
+int ppc_elf_select_plt_layout (bfd *, struct bfd_link_info *,
+ enum ppc_elf_plt_type, int);
asection *ppc_elf_tls_setup (bfd *, struct bfd_link_info *);
bfd_boolean ppc_elf_tls_optimize (bfd *, struct bfd_link_info *);
void ppc_elf_set_sdata_syms (bfd *, struct bfd_link_info *);
diff --git a/contrib/binutils/bfd/elf32-s390.c b/contrib/binutils/bfd/elf32-s390.c
index eb8e172..9e36a5d 100644
--- a/contrib/binutils/bfd/elf32-s390.c
+++ b/contrib/binutils/bfd/elf32-s390.c
@@ -1,5 +1,5 @@
/* IBM S/390-specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Carl B. Pedersen and Martin Schwidefsky.
@@ -20,8 +20,8 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -46,12 +46,6 @@ static void elf_s390_copy_indirect_symbol
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
-static asection *elf_s390_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean elf_s390_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
struct elf_s390_link_hash_entry;
static void elf_s390_adjust_gotplt
PARAMS ((struct elf_s390_link_hash_entry *));
@@ -73,8 +67,6 @@ static enum elf_reloc_type_class elf_s390_reloc_type_class
PARAMS ((const Elf_Internal_Rela *));
static bfd_boolean elf_s390_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf_s390_mkobject
- PARAMS ((bfd *));
static bfd_boolean elf_s390_object_p
PARAMS ((bfd *));
static bfd_boolean elf_s390_grok_prstatus
@@ -342,6 +334,25 @@ elf_s390_reloc_type_lookup (abfd, code)
return 0;
}
+static reloc_howto_type *
+elf_s390_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0; i < sizeof (elf_howto_table) / sizeof (elf_howto_table[0]); i++)
+ if (elf_howto_table[i].name != NULL
+ && strcasecmp (elf_howto_table[i].name, r_name) == 0)
+ return &elf_howto_table[i];
+
+ if (strcasecmp (elf32_s390_vtinherit_howto.name, r_name) == 0)
+ return &elf32_s390_vtinherit_howto;
+ if (strcasecmp (elf32_s390_vtentry_howto.name, r_name) == 0)
+ return &elf32_s390_vtentry_howto;
+
+ return NULL;
+}
+
/* We need to use ELF32_R_TYPE so we have our own copy of this function,
and elf32-s390.c has its own copy. */
@@ -678,14 +689,16 @@ struct elf_s390_obj_tdata
(elf_s390_tdata (abfd)->local_got_tls_type)
static bfd_boolean
-elf_s390_mkobject (abfd)
- bfd *abfd;
+elf_s390_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
static bfd_boolean
@@ -1273,7 +1286,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (name == NULL)
return FALSE;
- if (strncmp (name, ".rela", 5) != 0
+ if (! CONST_STRNEQ (name, ".rela")
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
@@ -1379,50 +1392,30 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-elf_s390_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf_s390_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
if (h != NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
- {
- case R_390_GNU_VTINHERIT:
- case R_390_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_390_GNU_VTINHERIT:
+ case R_390_GNU_VTENTRY:
+ return NULL;
+ }
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
-
- return NULL;
}
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf_s390_gc_sweep_hook (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -1589,7 +1582,6 @@ elf_s390_adjust_dynamic_symbol (info, h)
{
struct elf_s390_link_hash_table *htab;
asection *s;
- unsigned int power_of_two;
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later
@@ -1710,29 +1702,9 @@ elf_s390_adjust_dynamic_symbol (info, h)
h->needs_copy = 1;
}
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 3)
- power_of_two = 3;
-
- /* Apply the required alignment. */
s = htab->sdynbss;
- s->size = BFD_ALIGN (s->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->size;
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
-
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* Allocate space in .plt, .got and associated reloc sections for
@@ -2126,7 +2098,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
/* 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)
+ else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
{
if (s->size != 0)
relocs = TRUE;
@@ -2268,6 +2240,7 @@ invalid_tls_insn (input_bfd, input_section, rel)
input_section,
(long) rel->r_offset,
howto->name);
+ bfd_set_error (bfd_error_bad_value);
}
/* Relocate a 390 ELF section. */
@@ -2291,9 +2264,6 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocatable)
- return TRUE;
-
htab = elf_s390_hash_table (info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -2328,7 +2298,6 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
howto = elf_howto_table + r_type;
r_symndx = ELF32_R_SYM (rel->r_info);
- /* This is a final link. */
h = NULL;
sym = NULL;
sec = NULL;
@@ -2349,6 +2318,20 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
unresolved_reloc, warned);
}
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ continue;
+
switch (r_type)
{
case R_390_GOTPLT12:
@@ -2565,11 +2548,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
case R_390_PC16DBL:
case R_390_PC32DBL:
case R_390_PC32:
- /* 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
- || (input_section->flags & SEC_ALLOC) == 0)
+ if ((input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2655,14 +2634,18 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
osec = sec->output_section;
sindx = elf_section_data (osec)->dynindx;
- BFD_ASSERT (sindx > 0);
+ if (sindx == 0)
+ {
+ osec = htab->elf.text_index_section;
+ sindx = elf_section_data (osec)->dynindx;
+ }
+ BFD_ASSERT (sindx != 0);
/* 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 = ELF32_R_INFO (sindx, r_type);
@@ -2926,7 +2909,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
case R_390_TLS_LDO32:
- if (info->shared || (input_section->flags & SEC_CODE) == 0)
+ if (info->shared)
relocation -= dtpoff_base (info);
else
/* When converting LDO to LE, we must negate. */
@@ -2982,16 +2965,44 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
unsigned int insn;
insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- if ((insn & 0xff000fff) != 0x4d000000)
+ if ((insn & 0xff000fff) != 0x4d000000 &&
+ (insn & 0xffff0000) != 0xc0e50000)
invalid_tls_insn (input_bfd, input_section, rel);
if (!info->shared && (h == NULL || h->dynindx == -1))
- /* GD->LE transition.
- bas %r14,0(%rx,%r13) -> bc 0,0 */
- insn = 0x47000000;
+ {
+ if ((insn & 0xff000000) == 0x4d000000)
+ {
+ /* GD->LE transition.
+ bas %r14,0(%rx,%r13) -> bc 0,0 */
+ insn = 0x47000000;
+ }
+ else
+ {
+ /* GD->LE transition.
+ brasl %r14,_tls_get_addr@plt -> brcl 0,. */
+ insn = 0xc0040000;
+ bfd_put_16 (output_bfd, 0x0000,
+ contents + rel->r_offset + 4);
+ }
+ }
else
- /* GD->IE transition.
- bas %r14,0(%rx,%r13) -> l %r2,0(%r2,%r12) */
- insn = 0x5822c000;
+ {
+ if ((insn & 0xff000000) == 0x4d000000)
+ {
+ /* GD->IE transition.
+ bas %r14,0(%rx,%r13) -> l %r2,0(%r2,%r12) */
+ insn = 0x5822c000;
+ }
+ else
+ {
+ /* GD->IE transition.
+ brasl %r14,__tls_get_addr@plt ->
+ l %r2,0(%r2,%r12) ; bcr 0,0 */
+ insn = 0x5822c000;
+ bfd_put_16 (output_bfd, 0x0700,
+ contents + rel->r_offset + 4);
+ }
+ }
bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
}
else if (r_type == R_390_TLS_LDCALL)
@@ -3001,11 +3012,23 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
unsigned int insn;
insn = bfd_get_32 (input_bfd, contents + rel->r_offset);
- if ((insn & 0xff000fff) != 0x4d000000)
+ if ((insn & 0xff000fff) != 0x4d000000 &&
+ (insn & 0xffff0000) != 0xc0e50000)
invalid_tls_insn (input_bfd, input_section, rel);
- /* LD->LE transition.
- bas %r14,0(%rx,%r13) -> bc 0,0 */
- insn = 0x47000000;
+ if ((insn & 0xff000000) == 0x4d000000)
+ {
+ /* LD->LE transition.
+ bas %r14,0(%rx,%r13) -> bc 0,0 */
+ insn = 0x47000000;
+ }
+ else
+ {
+ /* LD->LE transition.
+ brasl %r14,__tls_get_addr@plt -> brcl 0,. */
+ insn = 0xc0040000;
+ bfd_put_16 (output_bfd, 0x0000,
+ contents + rel->r_offset + 4);
+ }
bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
}
}
@@ -3515,6 +3538,7 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
#define bfd_elf32_bfd_is_local_label_name elf_s390_is_local_label_name
#define bfd_elf32_bfd_link_hash_table_create elf_s390_link_hash_table_create
#define bfd_elf32_bfd_reloc_type_lookup elf_s390_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup elf_s390_reloc_name_lookup
#define elf_backend_adjust_dynamic_symbol elf_s390_adjust_dynamic_symbol
#define elf_backend_check_relocs elf_s390_check_relocs
@@ -3527,6 +3551,7 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_relocate_section elf_s390_relocate_section
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
+#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_grok_prstatus elf_s390_grok_prstatus
#define elf_backend_plt_sym_val elf_s390_plt_sym_val
diff --git a/contrib/binutils/bfd/elf32-score.c b/contrib/binutils/bfd/elf32-score.c
new file mode 100644
index 0000000..070177b
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-score.c
@@ -0,0 +1,3883 @@
+/* 32-bit ELF support for S+core.
+ Copyright 2006, 2007 Free Software Foundation, Inc.
+ Contributed by
+ Mei Ligang (ligang@sunnorth.com.cn)
+ Pei-Lin Tsai (pltsai@sunplus.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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "libbfd.h"
+#include "libiberty.h"
+#include "elf-bfd.h"
+#include "elf/score.h"
+#include "elf/common.h"
+#include "elf/internal.h"
+#include "hashtab.h"
+
+
+/* Score ELF linker hash table. */
+
+struct score_elf_link_hash_table
+{
+ /* The main hash table. */
+ struct elf_link_hash_table root;
+};
+
+/* The SCORE ELF linker needs additional information for each symbol in
+ the global hash table. */
+
+struct score_elf_link_hash_entry
+{
+ struct elf_link_hash_entry root;
+
+ /* Number of R_SCORE_ABS32, R_SCORE_REL32 relocs against this symbol. */
+ unsigned int possibly_dynamic_relocs;
+
+ /* If the R_SCORE_ABS32, R_SCORE_REL32 reloc is against a readonly section. */
+ bfd_boolean readonly_reloc;
+
+ /* We must not create a stub for a symbol that has relocations related to
+ taking the function's address, i.e. any but R_SCORE_CALL15 ones. */
+ bfd_boolean no_fn_stub;
+
+ /* Are we forced local? This will only be set if we have converted
+ the initial global GOT entry to a local GOT entry. */
+ bfd_boolean forced_local;
+};
+
+/* Traverse a score ELF linker hash table. */
+#define score_elf_link_hash_traverse(table, func, info) \
+ (elf_link_hash_traverse \
+ (&(table)->root, \
+ (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \
+ (info)))
+
+/* Get the SCORE elf linker hash table from a link_info structure. */
+#define score_elf_hash_table(info) \
+ ((struct score_elf_link_hash_table *) ((info)->hash))
+
+/* This structure is used to hold .got entries while estimating got sizes. */
+struct score_got_entry
+{
+ /* The input bfd in which the symbol is defined. */
+ bfd *abfd;
+ /* The index of the symbol, as stored in the relocation r_info, if
+ we have a local symbol; -1 otherwise. */
+ long symndx;
+ union
+ {
+ /* If abfd == NULL, an address that must be stored in the got. */
+ bfd_vma address;
+ /* If abfd != NULL && symndx != -1, the addend of the relocation
+ that should be added to the symbol value. */
+ bfd_vma addend;
+ /* If abfd != NULL && symndx == -1, the hash table entry
+ corresponding to a global symbol in the got (or, local, if
+ h->forced_local). */
+ struct score_elf_link_hash_entry *h;
+ } d;
+
+ /* The offset from the beginning of the .got section to the entry
+ corresponding to this symbol+addend. If it's a global symbol
+ whose offset is yet to be decided, it's going to be -1. */
+ long gotidx;
+};
+
+/* This structure is passed to score_elf_sort_hash_table_f when sorting
+ the dynamic symbols. */
+
+struct score_elf_hash_sort_data
+{
+ /* The symbol in the global GOT with the lowest dynamic symbol table index. */
+ struct elf_link_hash_entry *low;
+ /* The least dynamic symbol table index corresponding to a symbol with a GOT entry. */
+ long min_got_dynindx;
+ /* The greatest dynamic symbol table index corresponding to a symbol
+ with a GOT entry that is not referenced (e.g., a dynamic symbol
+ with dynamic relocations pointing to it from non-primary GOTs). */
+ long max_unref_got_dynindx;
+ /* The greatest dynamic symbol table index not corresponding to a
+ symbol without a GOT entry. */
+ long max_non_got_dynindx;
+};
+
+struct score_got_info
+{
+ /* The global symbol in the GOT with the lowest index in the dynamic
+ symbol table. */
+ struct elf_link_hash_entry *global_gotsym;
+ /* The number of global .got entries. */
+ unsigned int global_gotno;
+ /* The number of local .got entries. */
+ unsigned int local_gotno;
+ /* The number of local .got entries we have used. */
+ unsigned int assigned_gotno;
+ /* A hash table holding members of the got. */
+ struct htab *got_entries;
+ /* In multi-got links, a pointer to the next got (err, rather, most
+ of the time, it points to the previous got). */
+ struct score_got_info *next;
+};
+
+/* A structure used to count GOT entries, for GOT entry or ELF symbol table traversal. */
+struct _score_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+ union
+ {
+ struct score_got_info *got_info;
+ bfd_byte *tdata;
+ }
+ u;
+};
+
+#define score_elf_section_data(sec) \
+ ((struct _score_elf_section_data *) elf_section_data (sec))
+
+/* The size of a symbol-table entry. */
+#define SCORE_ELF_SYM_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->sizeof_sym)
+
+/* 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)
+#define MINUS_TWO (((bfd_vma)0) - 2)
+
+#define PDR_SIZE 32
+
+
+/* The number of local .got entries we reserve. */
+#define SCORE_RESERVED_GOTNO (2)
+#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+
+/* The offset of $gp from the beginning of the .got section. */
+#define ELF_SCORE_GP_OFFSET(abfd) (0x3ff0)
+/* The maximum size of the GOT for it to be addressable using 15-bit offsets from $gp. */
+#define SCORE_ELF_GOT_MAX_SIZE(abfd) (ELF_SCORE_GP_OFFSET(abfd) + 0x3fff)
+
+#define SCORE_ELF_STUB_SECTION_NAME (".SCORE.stub")
+#define SCORE_FUNCTION_STUB_SIZE (16)
+
+#define STUB_LW 0xc3bcc010 /* lw r29, [r28, -0x3ff0] */
+#define STUB_MOVE 0x8363bc56 /* mv r27, r3 */
+#define STUB_LI16 0x87548000 /* ori r26, .dynsym_index */
+#define STUB_BRL 0x801dbc09 /* brl r29 */
+
+#define SCORE_ELF_GOT_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->arch_size / 8)
+
+#define SCORE_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
+ (_bfd_elf_add_dynamic_entry (info, (bfd_vma) tag, (bfd_vma) val))
+
+/* The size of an external dynamic table entry. */
+#define SCORE_ELF_DYN_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->sizeof_dyn)
+
+/* The size of an external REL relocation. */
+#define SCORE_ELF_REL_SIZE(abfd) \
+ (get_elf_backend_data (abfd)->s->sizeof_rel)
+
+/* The default alignment for sections, as a power of two. */
+#define SCORE_ELF_LOG_FILE_ALIGN(abfd)\
+ (get_elf_backend_data (abfd)->s->log_file_align)
+
+#ifndef NUM_ELEM
+#define NUM_ELEM(a) (sizeof (a) / (sizeof (a)[0]))
+#endif
+
+static bfd_byte *hi16_rel_addr;
+
+/* This will be used when we sort the dynamic relocation records. */
+static bfd *reldyn_sorting_bfd;
+
+/* SCORE ELF uses two common sections. One is the usual one, and the
+ other is for small objects. All the small objects are kept
+ together, and then referenced via the gp pointer, which yields
+ faster assembler code. This is what we use for the small common
+ section. This approach is copied from ecoff.c. */
+static asection score_elf_scom_section;
+static asymbol score_elf_scom_symbol;
+static asymbol *score_elf_scom_symbol_ptr;
+
+static bfd_reloc_status_type
+score_elf_hi16_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data,
+ asection *input_section ATTRIBUTE_UNUSED,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ hi16_rel_addr = (bfd_byte *) data + reloc_entry->address;
+ return bfd_reloc_ok;
+}
+
+static bfd_reloc_status_type
+score_elf_lo16_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma addend = 0, offset = 0;
+ unsigned long val;
+ unsigned long hi16_offset, hi16_value, uvalue;
+
+ hi16_value = bfd_get_32 (abfd, hi16_rel_addr);
+ hi16_offset = ((((hi16_value >> 16) & 0x3) << 15) | (hi16_value & 0x7fff)) >> 1;
+ addend = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1;
+ val = reloc_entry->addend;
+ if (reloc_entry->address > input_section->size)
+ return bfd_reloc_outofrange;
+ uvalue = ((hi16_offset << 16) | (offset & 0xffff)) + val;
+ hi16_offset = (uvalue >> 16) << 1;
+ hi16_value = (hi16_value & ~0x37fff) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
+ bfd_put_32 (abfd, hi16_value, hi16_rel_addr);
+ offset = (uvalue & 0xffff) << 1;
+ addend = (addend & ~0x37fff) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
+ bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address);
+ return bfd_reloc_ok;
+}
+
+/* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a
+ dangerous relocation. */
+
+static bfd_boolean
+score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp)
+{
+ unsigned int count;
+ asymbol **sym;
+ unsigned int i;
+
+ /* If we've already figured out what GP will be, just return it. */
+ *pgp = _bfd_get_gp_value (output_bfd);
+ if (*pgp)
+ return TRUE;
+
+ count = bfd_get_symcount (output_bfd);
+ sym = bfd_get_outsymbols (output_bfd);
+
+ /* The linker script will have created a symbol named `_gp' with the
+ appropriate value. */
+ if (sym == NULL)
+ i = count;
+ else
+ {
+ for (i = 0; i < count; i++, sym++)
+ {
+ const char *name;
+
+ name = bfd_asymbol_name (*sym);
+ if (*name == '_' && strcmp (name, "_gp") == 0)
+ {
+ *pgp = bfd_asymbol_value (*sym);
+ _bfd_set_gp_value (output_bfd, *pgp);
+ break;
+ }
+ }
+ }
+
+ if (i >= count)
+ {
+ /* Only get the error once. */
+ *pgp = 4;
+ _bfd_set_gp_value (output_bfd, *pgp);
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/* We have to figure out the gp value, so that we can adjust the
+ symbol value correctly. We look up the symbol _gp in the output
+ BFD. If we can't find it, we're stuck. We cache it in the ELF
+ target data. We don't need to adjust the symbol value for an
+ external symbol if we are producing relocatable output. */
+
+static bfd_reloc_status_type
+score_elf_final_gp (bfd *output_bfd,
+ asymbol *symbol,
+ bfd_boolean relocatable,
+ char **error_message,
+ bfd_vma *pgp)
+{
+ if (bfd_is_und_section (symbol->section)
+ && ! relocatable)
+ {
+ *pgp = 0;
+ return bfd_reloc_undefined;
+ }
+
+ *pgp = _bfd_get_gp_value (output_bfd);
+ if (*pgp == 0
+ && (! relocatable
+ || (symbol->flags & BSF_SECTION_SYM) != 0))
+ {
+ if (relocatable)
+ {
+ /* Make up a value. */
+ *pgp = symbol->section->output_section->vma + 0x4000;
+ _bfd_set_gp_value (output_bfd, *pgp);
+ }
+ else if (!score_elf_assign_gp (output_bfd, pgp))
+ {
+ *error_message =
+ (char *) _("GP relative relocation when _gp not defined");
+ return bfd_reloc_dangerous;
+ }
+ }
+
+ return bfd_reloc_ok;
+}
+
+static bfd_reloc_status_type
+score_elf_gprel15_with_gp (bfd *abfd,
+ asymbol *symbol,
+ arelent *reloc_entry,
+ asection *input_section,
+ bfd_boolean relocateable,
+ void * data,
+ bfd_vma gp ATTRIBUTE_UNUSED)
+{
+ bfd_vma relocation;
+ unsigned long insn;
+
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+ if (reloc_entry->address > input_section->size)
+ return bfd_reloc_outofrange;
+
+ insn = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ if (((reloc_entry->addend & 0xffffc000) != 0)
+ && ((reloc_entry->addend & 0xffffc000) != 0xffffc000))
+ return bfd_reloc_overflow;
+
+ insn = (insn & ~0x7fff) | (reloc_entry->addend & 0x7fff);
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
+ if (relocateable)
+ reloc_entry->address += input_section->output_offset;
+
+ return bfd_reloc_ok;
+}
+
+static bfd_reloc_status_type
+gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry,
+ asection *input_section, bfd_boolean relocatable,
+ void *data, bfd_vma gp)
+{
+ bfd_vma relocation;
+ bfd_vma val;
+
+ if (bfd_is_com_section (symbol->section))
+ relocation = 0;
+ else
+ relocation = symbol->value;
+
+ relocation += symbol->section->output_section->vma;
+ relocation += symbol->section->output_offset;
+
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
+ return bfd_reloc_outofrange;
+
+ /* Set val to the offset into the section or symbol. */
+ val = reloc_entry->addend;
+
+ if (reloc_entry->howto->partial_inplace)
+ val += bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+
+ /* Adjust val for the final section location and GP value. If we
+ are producing relocatable output, we don't want to do this for
+ an external symbol. */
+ if (! relocatable
+ || (symbol->flags & BSF_SECTION_SYM) != 0)
+ val += relocation - gp;
+
+ if (reloc_entry->howto->partial_inplace)
+ bfd_put_32 (abfd, val, (bfd_byte *) data + reloc_entry->address);
+ else
+ reloc_entry->addend = val;
+
+ if (relocatable)
+ reloc_entry->address += input_section->output_offset;
+
+ return bfd_reloc_ok;
+}
+
+static bfd_reloc_status_type
+score_elf_gprel15_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd,
+ char **error_message)
+{
+ bfd_boolean relocateable;
+ bfd_reloc_status_type ret;
+ bfd_vma gp;
+
+ if (output_bfd != (bfd *) NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0 && reloc_entry->addend == 0)
+ {
+ reloc_entry->address += input_section->output_offset;
+ return bfd_reloc_ok;
+ }
+ if (output_bfd != (bfd *) NULL)
+ relocateable = TRUE;
+ else
+ {
+ relocateable = FALSE;
+ output_bfd = symbol->section->output_section->owner;
+ }
+
+ ret = score_elf_final_gp (output_bfd, symbol, relocateable, error_message, &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
+
+ return score_elf_gprel15_with_gp (abfd, symbol, reloc_entry,
+ input_section, relocateable, data, gp);
+}
+
+/* Do a R_SCORE_GPREL32 relocation. This is a 32 bit value which must
+ become the offset from the gp register. */
+
+static bfd_reloc_status_type
+score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section, bfd *output_bfd,
+ char **error_message)
+{
+ bfd_boolean relocatable;
+ bfd_reloc_status_type ret;
+ bfd_vma gp;
+
+ /* R_SCORE_GPREL32 relocations are defined for local symbols only. */
+ if (output_bfd != NULL
+ && (symbol->flags & BSF_SECTION_SYM) == 0
+ && (symbol->flags & BSF_LOCAL) != 0)
+ {
+ *error_message = (char *)
+ _("32bits gp relative relocation occurs for an external symbol");
+ return bfd_reloc_outofrange;
+ }
+
+ if (output_bfd != NULL)
+ relocatable = TRUE;
+ else
+ {
+ relocatable = FALSE;
+ output_bfd = symbol->section->output_section->owner;
+ }
+
+ ret = score_elf_final_gp (output_bfd, symbol, relocatable, error_message, &gp);
+ if (ret != bfd_reloc_ok)
+ return ret;
+
+ gp = 0; /* FIXME. */
+ return gprel32_with_gp (abfd, symbol, reloc_entry, input_section,
+ relocatable, data, gp);
+}
+
+/* A howto special_function for R_SCORE_GOT15 relocations. This is just
+ like any other 16-bit relocation when applied to global symbols, but is
+ treated in the same as R_SCORE_HI16 when applied to local symbols. */
+
+static bfd_reloc_status_type
+score_elf_got15_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
+{
+ if ((symbol->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
+ || bfd_is_und_section (bfd_get_section (symbol))
+ || bfd_is_com_section (bfd_get_section (symbol)))
+ /* The relocation is against a global symbol. */
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd,
+ error_message);
+
+ return score_elf_hi16_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
+}
+
+static bfd_reloc_status_type
+score_elf_got_lo16_reloc (bfd *abfd,
+ arelent *reloc_entry,
+ asymbol *symbol ATTRIBUTE_UNUSED,
+ void * data,
+ asection *input_section,
+ bfd *output_bfd ATTRIBUTE_UNUSED,
+ char **error_message ATTRIBUTE_UNUSED)
+{
+ bfd_vma addend = 0, offset = 0;
+ signed long val;
+ signed long hi16_offset, hi16_value, uvalue;
+
+ hi16_value = bfd_get_32 (abfd, hi16_rel_addr);
+ hi16_offset = ((((hi16_value >> 16) & 0x3) << 15) | (hi16_value & 0x7fff)) >> 1;
+ addend = bfd_get_32 (abfd, (bfd_byte *) data + reloc_entry->address);
+ offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1;
+ val = reloc_entry->addend;
+ if (reloc_entry->address > input_section->size)
+ return bfd_reloc_outofrange;
+ uvalue = ((hi16_offset << 16) | (offset & 0xffff)) + val;
+ if ((uvalue > -0x8000) && (uvalue < 0x7fff))
+ hi16_offset = 0;
+ else
+ hi16_offset = (uvalue >> 16) & 0x7fff;
+ hi16_value = (hi16_value & ~0x37fff) | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
+ bfd_put_32 (abfd, hi16_value, hi16_rel_addr);
+ offset = (uvalue & 0xffff) << 1;
+ addend = (addend & ~0x37fff) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
+ bfd_put_32 (abfd, addend, (bfd_byte *) data + reloc_entry->address);
+ return bfd_reloc_ok;
+}
+
+static reloc_howto_type elf32_score_howto_table[] =
+{
+ /* No relocation. */
+ HOWTO (R_SCORE_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_SCORE_NONE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* R_SCORE_HI16 */
+ HOWTO (R_SCORE_HI16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ score_elf_hi16_reloc, /* special_function */
+ "R_SCORE_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x37fff, /* src_mask */
+ 0x37fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* R_SCORE_LO16 */
+ HOWTO (R_SCORE_LO16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ score_elf_lo16_reloc, /* special_function */
+ "R_SCORE_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x37fff, /* src_mask */
+ 0x37fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* R_SCORE_DUMMY1 */
+ HOWTO (R_SCORE_DUMMY1, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SCORE_DUMMY1", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /*R_SCORE_24 */
+ HOWTO (R_SCORE_24, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 24, /* bitsize */
+ FALSE, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SCORE_24", /* name */
+ FALSE, /* partial_inplace */
+ 0x3ff7fff, /* src_mask */
+ 0x3ff7fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /*R_SCORE_PC19 */
+ HOWTO (R_SCORE_PC19, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 19, /* bitsize */
+ TRUE, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SCORE_PC19", /* name */
+ FALSE, /* partial_inplace */
+ 0x3ff03fe, /* src_mask */
+ 0x3ff03fe, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /*R_SCORE16_11 */
+ HOWTO (R_SCORE16_11, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 11, /* bitsize */
+ FALSE, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SCORE16_11", /* name */
+ FALSE, /* partial_inplace */
+ 0x000000ffe, /* src_mask */
+ 0x000000ffe, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* R_SCORE16_PC8 */
+ HOWTO (R_SCORE16_PC8, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SCORE16_PC8", /* name */
+ FALSE, /* partial_inplace */
+ 0x000000ff, /* src_mask */
+ 0x000000ff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 32 bit absolute */
+ HOWTO (R_SCORE_ABS32, /* type 8 */
+ 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_SCORE_ABS32", /* name */
+ FALSE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 16 bit absolute */
+ HOWTO (R_SCORE_ABS16, /* type 11 */
+ 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_SCORE_ABS16", /* name */
+ FALSE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* R_SCORE_DUMMY2 */
+ HOWTO (R_SCORE_DUMMY2, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SCORE_DUMMY2", /* name */
+ TRUE, /* partial_inplace */
+ 0x00007fff, /* src_mask */
+ 0x00007fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* R_SCORE_GP15 */
+ HOWTO (R_SCORE_GP15, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ score_elf_gprel15_reloc,/* special_function */
+ "R_SCORE_GP15", /* name */
+ TRUE, /* partial_inplace */
+ 0x00007fff, /* src_mask */
+ 0x00007fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable hierarchy. */
+ HOWTO (R_SCORE_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_SCORE_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_SCORE_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_SCORE_GNU_VTENTRY", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Reference to global offset table. */
+ HOWTO (R_SCORE_GOT15, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ score_elf_got15_reloc, /* special_function */
+ "R_SCORE_GOT15", /* name */
+ TRUE, /* partial_inplace */
+ 0x00007fff, /* src_mask */
+ 0x00007fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Low 16 bits of displacement in global offset table. */
+ HOWTO (R_SCORE_GOT_LO16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ score_elf_got_lo16_reloc, /* special_function */
+ "R_SCORE_GOT_LO16", /* name */
+ TRUE, /* partial_inplace */
+ 0x37ffe, /* src_mask */
+ 0x37ffe, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 15 bit call through global offset table. */
+ HOWTO (R_SCORE_CALL15, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SCORE_CALL15", /* name */
+ TRUE, /* partial_inplace */
+ 0x0000ffff, /* src_mask */
+ 0x0000ffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 32 bit GP relative reference. */
+ HOWTO (R_SCORE_GPREL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ score_elf_gprel32_reloc, /* special_function */
+ "R_SCORE_GPREL32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 32 bit symbol relative relocation. */
+ HOWTO (R_SCORE_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SCORE_REL32", /* name */
+ TRUE, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* R_SCORE_DUMMY_HI16 */
+ HOWTO (R_SCORE_DUMMY_HI16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 1, /* bitpos */
+ complain_overflow_dont,/* complain_on_overflow */
+ score_elf_hi16_reloc, /* special_function */
+ "R_SCORE_DUMMY_HI16", /* name */
+ TRUE, /* partial_inplace */
+ 0x37fff, /* src_mask */
+ 0x37fff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+};
+
+struct score_reloc_map
+{
+ bfd_reloc_code_real_type bfd_reloc_val;
+ unsigned char elf_reloc_val;
+};
+
+static const struct score_reloc_map elf32_score_reloc_map[] =
+{
+ {BFD_RELOC_NONE, R_SCORE_NONE},
+ {BFD_RELOC_HI16_S, R_SCORE_HI16},
+ {BFD_RELOC_LO16, R_SCORE_LO16},
+ {BFD_RELOC_SCORE_DUMMY1, R_SCORE_DUMMY1},
+ {BFD_RELOC_SCORE_JMP, R_SCORE_24},
+ {BFD_RELOC_SCORE_BRANCH, R_SCORE_PC19},
+ {BFD_RELOC_SCORE16_JMP, R_SCORE16_11},
+ {BFD_RELOC_SCORE16_BRANCH, R_SCORE16_PC8},
+ {BFD_RELOC_32, R_SCORE_ABS32},
+ {BFD_RELOC_16, R_SCORE_ABS16},
+ {BFD_RELOC_SCORE_DUMMY2, R_SCORE_DUMMY2},
+ {BFD_RELOC_SCORE_GPREL15, R_SCORE_GP15},
+ {BFD_RELOC_VTABLE_INHERIT, R_SCORE_GNU_VTINHERIT},
+ {BFD_RELOC_VTABLE_ENTRY, R_SCORE_GNU_VTENTRY},
+ {BFD_RELOC_SCORE_GOT15, R_SCORE_GOT15},
+ {BFD_RELOC_SCORE_GOT_LO16, R_SCORE_GOT_LO16},
+ {BFD_RELOC_SCORE_CALL15, R_SCORE_CALL15},
+ {BFD_RELOC_GPREL32, R_SCORE_GPREL32},
+ {BFD_RELOC_32_PCREL, R_SCORE_REL32},
+ {BFD_RELOC_SCORE_DUMMY_HI16, R_SCORE_DUMMY_HI16},
+};
+
+/* got_entries only match if they're identical, except for gotidx, so
+ use all fields to compute the hash, and compare the appropriate
+ union members. */
+
+static hashval_t
+score_elf_got_entry_hash (const void *entry_)
+{
+ const struct score_got_entry *entry = (struct score_got_entry *)entry_;
+
+ return entry->symndx
+ + (!entry->abfd ? entry->d.address : entry->abfd->id);
+}
+
+static int
+score_elf_got_entry_eq (const void *entry1, const void *entry2)
+{
+ const struct score_got_entry *e1 = (struct score_got_entry *)entry1;
+ const struct score_got_entry *e2 = (struct score_got_entry *)entry2;
+
+ return e1->abfd == e2->abfd && e1->symndx == e2->symndx
+ && (! e1->abfd ? e1->d.address == e2->d.address
+ : e1->symndx >= 0 ? e1->d.addend == e2->d.addend
+ : e1->d.h == e2->d.h);
+}
+
+/* If H needs a GOT entry, assign it the highest available dynamic
+ index. Otherwise, assign it the lowest available dynamic
+ index. */
+
+static bfd_boolean
+score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data)
+{
+ struct score_elf_hash_sort_data *hsd = data;
+
+ if (h->root.root.type == bfd_link_hash_warning)
+ h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
+
+ /* Symbols without dynamic symbol table entries aren't interesting at all. */
+ if (h->root.dynindx == -1)
+ return TRUE;
+
+ /* Global symbols that need GOT entries that are not explicitly
+ referenced are marked with got offset 2. Those that are
+ referenced get a 1, and those that don't need GOT entries get
+ -1. */
+ if (h->root.got.offset == 2)
+ {
+ if (hsd->max_unref_got_dynindx == hsd->min_got_dynindx)
+ hsd->low = (struct elf_link_hash_entry *) h;
+ h->root.dynindx = hsd->max_unref_got_dynindx++;
+ }
+ else if (h->root.got.offset != 1)
+ h->root.dynindx = hsd->max_non_got_dynindx++;
+ else
+ {
+ h->root.dynindx = --hsd->min_got_dynindx;
+ hsd->low = (struct elf_link_hash_entry *) h;
+ }
+
+ return TRUE;
+}
+
+static asection *
+score_elf_got_section (bfd *abfd, bfd_boolean maybe_excluded)
+{
+ asection *sgot = bfd_get_section_by_name (abfd, ".got");
+
+ if (sgot == NULL || (! maybe_excluded && (sgot->flags & SEC_EXCLUDE) != 0))
+ return NULL;
+ return sgot;
+}
+
+/* Returns the GOT information associated with the link indicated by
+ INFO. If SGOTP is non-NULL, it is filled in with the GOT section. */
+
+static struct score_got_info *
+score_elf_got_info (bfd *abfd, asection **sgotp)
+{
+ asection *sgot;
+ struct score_got_info *g;
+
+ sgot = score_elf_got_section (abfd, TRUE);
+ BFD_ASSERT (sgot != NULL);
+ BFD_ASSERT (elf_section_data (sgot) != NULL);
+ g = score_elf_section_data (sgot)->u.got_info;
+ BFD_ASSERT (g != NULL);
+
+ if (sgotp)
+ *sgotp = sgot;
+ return g;
+}
+
+/* Sort the dynamic symbol table so that symbols that need GOT entries
+ appear towards the end. This reduces the amount of GOT space
+ required. MAX_LOCAL is used to set the number of local symbols
+ known to be in the dynamic symbol table. During
+ _bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the
+ section symbols are added and the count is higher. */
+
+static bfd_boolean
+score_elf_sort_hash_table (struct bfd_link_info *info,
+ unsigned long max_local)
+{
+ struct score_elf_hash_sort_data hsd;
+ struct score_got_info *g;
+ bfd *dynobj;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ g = score_elf_got_info (dynobj, NULL);
+
+ hsd.low = NULL;
+ hsd.max_unref_got_dynindx =
+ hsd.min_got_dynindx = elf_hash_table (info)->dynsymcount
+ /* In the multi-got case, assigned_gotno of the master got_info
+ indicate the number of entries that aren't referenced in the
+ primary GOT, but that must have entries because there are
+ dynamic relocations that reference it. Since they aren't
+ referenced, we move them to the end of the GOT, so that they
+ don't prevent other entries that are referenced from getting
+ too large offsets. */
+ - (g->next ? g->assigned_gotno : 0);
+ hsd.max_non_got_dynindx = max_local;
+ score_elf_link_hash_traverse (((struct score_elf_link_hash_table *)
+ elf_hash_table (info)),
+ score_elf_sort_hash_table_f,
+ &hsd);
+
+ /* There should have been enough room in the symbol table to
+ accommodate both the GOT and non-GOT symbols. */
+ BFD_ASSERT (hsd.max_non_got_dynindx <= hsd.min_got_dynindx);
+ BFD_ASSERT ((unsigned long)hsd.max_unref_got_dynindx
+ <= elf_hash_table (info)->dynsymcount);
+
+ /* Now we know which dynamic symbol has the lowest dynamic symbol
+ table index in the GOT. */
+ g->global_gotsym = hsd.low;
+
+ return TRUE;
+}
+
+/* Create an entry in an score ELF linker hash table. */
+
+static struct bfd_hash_entry *
+score_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
+{
+ struct score_elf_link_hash_entry *ret = (struct score_elf_link_hash_entry *)entry;
+
+ /* Allocate the structure if it has not already been allocated by a subclass. */
+ if (ret == NULL)
+ ret = bfd_hash_allocate (table, sizeof (struct score_elf_link_hash_entry));
+ if (ret == NULL)
+ return (struct bfd_hash_entry *)ret;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct score_elf_link_hash_entry *)
+ _bfd_elf_link_hash_newfunc ((struct bfd_hash_entry *)ret, table, string));
+
+ if (ret != NULL)
+ {
+ ret->possibly_dynamic_relocs = 0;
+ ret->readonly_reloc = FALSE;
+ ret->no_fn_stub = FALSE;
+ ret->forced_local = FALSE;
+ }
+
+ return (struct bfd_hash_entry *)ret;
+}
+
+/* Returns the first relocation of type r_type found, beginning with
+ RELOCATION. RELEND is one-past-the-end of the relocation table. */
+
+static const Elf_Internal_Rela *
+score_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type,
+ const Elf_Internal_Rela *relocation,
+ const Elf_Internal_Rela *relend)
+{
+ while (relocation < relend)
+ {
+ if (ELF32_R_TYPE (relocation->r_info) == r_type)
+ return relocation;
+
+ ++relocation;
+ }
+
+ /* We didn't find it. */
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+}
+
+/* This function is called via qsort() to sort the dynamic relocation
+ entries by increasing r_symndx value. */
+
+static int
+score_elf_sort_dynamic_relocs (const void *arg1, const void *arg2)
+{
+ Elf_Internal_Rela int_reloc1;
+ Elf_Internal_Rela int_reloc2;
+
+ bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, arg1, &int_reloc1);
+ bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, arg2, &int_reloc2);
+
+ return (ELF32_R_SYM (int_reloc1.r_info) - ELF32_R_SYM (int_reloc2.r_info));
+}
+
+/* Return whether a relocation is against a local symbol. */
+
+static bfd_boolean
+score_elf_local_relocation_p (bfd *input_bfd,
+ const Elf_Internal_Rela *relocation,
+ asection **local_sections,
+ bfd_boolean check_forced)
+{
+ unsigned long r_symndx;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct score_elf_link_hash_entry *h;
+ size_t extsymoff;
+
+ r_symndx = ELF32_R_SYM (relocation->r_info);
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
+
+ if (r_symndx < extsymoff)
+ return TRUE;
+ if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL)
+ return TRUE;
+
+ if (check_forced)
+ {
+ /* Look up the hash table to check whether the symbol was forced local. */
+ h = (struct score_elf_link_hash_entry *)
+ elf_sym_hashes (input_bfd) [r_symndx - extsymoff];
+ /* Find the real hash-table entry for this symbol. */
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
+ if (h->root.forced_local)
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* Returns the dynamic relocation section for DYNOBJ. */
+
+static asection *
+score_elf_rel_dyn_section (bfd *dynobj, bfd_boolean create_p)
+{
+ static const char dname[] = ".rel.dyn";
+ asection *sreloc;
+
+ sreloc = bfd_get_section_by_name (dynobj, dname);
+ if (sreloc == NULL && create_p)
+ {
+ sreloc = bfd_make_section_with_flags (dynobj, dname,
+ (SEC_ALLOC
+ | SEC_LOAD
+ | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED
+ | SEC_READONLY));
+ if (sreloc == NULL
+ || ! bfd_set_section_alignment (dynobj, sreloc,
+ SCORE_ELF_LOG_FILE_ALIGN (dynobj)))
+ return NULL;
+ }
+ return sreloc;
+}
+
+static void
+score_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n)
+{
+ asection *s;
+
+ s = score_elf_rel_dyn_section (abfd, FALSE);
+ BFD_ASSERT (s != NULL);
+
+ if (s->size == 0)
+ {
+ /* Make room for a null element. */
+ s->size += SCORE_ELF_REL_SIZE (abfd);
+ ++s->reloc_count;
+ }
+ s->size += n * SCORE_ELF_REL_SIZE (abfd);
+}
+
+/* Create a rel.dyn relocation for the dynamic linker to resolve. REL
+ is the original relocation, which is now being transformed into a
+ dynamic relocation. The ADDENDP is adjusted if necessary; the
+ caller should store the result in place of the original addend. */
+
+static bfd_boolean
+score_elf_create_dynamic_relocation (bfd *output_bfd,
+ struct bfd_link_info *info,
+ const Elf_Internal_Rela *rel,
+ struct score_elf_link_hash_entry *h,
+ bfd_vma symbol,
+ bfd_vma *addendp, asection *input_section)
+{
+ Elf_Internal_Rela outrel[3];
+ asection *sreloc;
+ bfd *dynobj;
+ int r_type;
+ long indx;
+ bfd_boolean defined_p;
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+ dynobj = elf_hash_table (info)->dynobj;
+ sreloc = score_elf_rel_dyn_section (dynobj, FALSE);
+ BFD_ASSERT (sreloc != NULL);
+ BFD_ASSERT (sreloc->contents != NULL);
+ BFD_ASSERT (sreloc->reloc_count * SCORE_ELF_REL_SIZE (output_bfd) < sreloc->size);
+
+ outrel[0].r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section, rel[0].r_offset);
+ outrel[1].r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section, rel[1].r_offset);
+ outrel[2].r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section, rel[2].r_offset);
+
+ if (outrel[0].r_offset == MINUS_ONE)
+ /* The relocation field has been deleted. */
+ return TRUE;
+
+ if (outrel[0].r_offset == MINUS_TWO)
+ {
+ /* The relocation field has been converted into a relative value of
+ some sort. Functions like _bfd_elf_write_section_eh_frame expect
+ the field to be fully relocated, so add in the symbol's value. */
+ *addendp += symbol;
+ return TRUE;
+ }
+
+ /* We must now calculate the dynamic symbol table index to use
+ in the relocation. */
+ if (h != NULL
+ && (! info->symbolic || !h->root.def_regular)
+ /* h->root.dynindx may be -1 if this symbol was marked to
+ become local. */
+ && h->root.dynindx != -1)
+ {
+ indx = h->root.dynindx;
+ /* ??? glibc's ld.so just adds the final GOT entry to the
+ relocation field. It therefore treats relocs against
+ defined symbols in the same way as relocs against
+ undefined symbols. */
+ defined_p = FALSE;
+ }
+ else
+ {
+ indx = 0;
+ defined_p = TRUE;
+ }
+
+ /* If the relocation was previously an absolute relocation and
+ this symbol will not be referred to by the relocation, we must
+ adjust it by the value we give it in the dynamic symbol table.
+ Otherwise leave the job up to the dynamic linker. */
+ if (defined_p && r_type != R_SCORE_REL32)
+ *addendp += symbol;
+
+ /* The relocation is always an REL32 relocation because we don't
+ know where the shared library will wind up at load-time. */
+ outrel[0].r_info = ELF32_R_INFO ((unsigned long) indx, R_SCORE_REL32);
+
+ /* For strict adherence to the ABI specification, we should
+ generate a R_SCORE_64 relocation record by itself before the
+ _REL32/_64 record as well, such that the addend is read in as
+ a 64-bit value (REL32 is a 32-bit relocation, after all).
+ However, since none of the existing ELF64 SCORE dynamic
+ loaders seems to care, we don't waste space with these
+ artificial relocations. If this turns out to not be true,
+ score_elf_allocate_dynamic_relocations() should be tweaked so
+ as to make room for a pair of dynamic relocations per
+ invocation if ABI_64_P, and here we should generate an
+ additional relocation record with R_SCORE_64 by itself for a
+ NULL symbol before this relocation record. */
+ outrel[1].r_info = ELF32_R_INFO (0, R_SCORE_NONE);
+ outrel[2].r_info = ELF32_R_INFO (0, R_SCORE_NONE);
+
+ /* Adjust the output offset of the relocation to reference the
+ correct location in the output file. */
+ outrel[0].r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+ outrel[1].r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+ outrel[2].r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+
+ /* Put the relocation back out. We have to use the special
+ relocation outputter in the 64-bit case since the 64-bit
+ relocation format is non-standard. */
+ bfd_elf32_swap_reloc_out
+ (output_bfd, &outrel[0],
+ (sreloc->contents + sreloc->reloc_count * sizeof (Elf32_External_Rel)));
+
+ /* We've now added another relocation. */
+ ++sreloc->reloc_count;
+
+ /* Make sure the output section is writable. The dynamic linker
+ will be writing to it. */
+ elf_section_data (input_section->output_section)->this_hdr.sh_flags |= SHF_WRITE;
+
+ return TRUE;
+}
+
+static bfd_boolean
+score_elf_create_got_section (bfd *abfd,
+ struct bfd_link_info *info,
+ bfd_boolean maybe_exclude)
+{
+ flagword flags;
+ asection *s;
+ struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
+ struct score_got_info *g;
+ bfd_size_type amt;
+
+ /* This function may be called more than once. */
+ s = score_elf_got_section (abfd, TRUE);
+ if (s)
+ {
+ if (! maybe_exclude)
+ s->flags &= ~SEC_EXCLUDE;
+ return TRUE;
+ }
+
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+
+ if (maybe_exclude)
+ flags |= SEC_EXCLUDE;
+
+ /* We have to use an alignment of 2**4 here because this is hardcoded
+ in the function stub generation and in the linker script. */
+ s = bfd_make_section_with_flags (abfd, ".got", flags);
+ if (s == NULL
+ || ! bfd_set_section_alignment (abfd, s, 4))
+ return FALSE;
+
+ /* Define the symbol _GLOBAL_OFFSET_TABLE_. 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. */
+ bh = NULL;
+ if (! (_bfd_generic_link_add_one_symbol
+ (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
+ 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
+ return FALSE;
+
+ h = (struct elf_link_hash_entry *) bh;
+ h->non_elf = 0;
+ h->def_regular = 1;
+ h->type = STT_OBJECT;
+
+ if (info->shared && ! bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+
+ amt = sizeof (struct score_got_info);
+ g = bfd_alloc (abfd, amt);
+ if (g == NULL)
+ return FALSE;
+
+ g->global_gotsym = NULL;
+ g->global_gotno = 0;
+
+ g->local_gotno = SCORE_RESERVED_GOTNO;
+ g->assigned_gotno = SCORE_RESERVED_GOTNO;
+ g->next = NULL;
+
+ g->got_entries = htab_try_create (1, score_elf_got_entry_hash,
+ score_elf_got_entry_eq, NULL);
+ if (g->got_entries == NULL)
+ return FALSE;
+ score_elf_section_data (s)->u.got_info = g;
+ score_elf_section_data (s)->elf.this_hdr.sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL;
+
+ return TRUE;
+}
+
+/* Calculate the %high function. */
+
+static bfd_vma
+score_elf_high (bfd_vma value)
+{
+ return ((value + (bfd_vma) 0x8000) >> 16) & 0xffff;
+}
+
+/* Create a local GOT entry for VALUE. Return the index of the entry,
+ or -1 if it could not be created. */
+
+static struct score_got_entry *
+score_elf_create_local_got_entry (bfd *abfd,
+ bfd *ibfd ATTRIBUTE_UNUSED,
+ struct score_got_info *gg,
+ asection *sgot, bfd_vma value,
+ unsigned long r_symndx ATTRIBUTE_UNUSED,
+ struct score_elf_link_hash_entry *h ATTRIBUTE_UNUSED,
+ int r_type ATTRIBUTE_UNUSED)
+{
+ struct score_got_entry entry, **loc;
+ struct score_got_info *g;
+
+ entry.abfd = NULL;
+ entry.symndx = -1;
+ entry.d.address = value;
+
+ g = gg;
+ loc = (struct score_got_entry **) htab_find_slot (g->got_entries, &entry, INSERT);
+ if (*loc)
+ return *loc;
+
+ entry.gotidx = SCORE_ELF_GOT_SIZE (abfd) * g->assigned_gotno++;
+
+ *loc = bfd_alloc (abfd, sizeof entry);
+
+ if (! *loc)
+ return NULL;
+
+ memcpy (*loc, &entry, sizeof entry);
+
+ if (g->assigned_gotno >= g->local_gotno)
+ {
+ (*loc)->gotidx = -1;
+ /* We didn't allocate enough space in the GOT. */
+ (*_bfd_error_handler)
+ (_("not enough GOT space for local GOT entries"));
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+ }
+
+ bfd_put_32 (abfd, value, (sgot->contents + entry.gotidx));
+
+ return *loc;
+}
+
+/* Find a GOT entry whose higher-order 16 bits are the same as those
+ for value. Return the index into the GOT for this entry. */
+
+static bfd_vma
+score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
+ bfd_vma value, bfd_boolean external)
+{
+ asection *sgot;
+ struct score_got_info *g;
+ struct score_got_entry *entry;
+
+ if (!external)
+ {
+ /* Although the ABI says that it is "the high-order 16 bits" that we
+ want, it is really the %high value. The complete value is
+ calculated with a `addiu' of a LO16 relocation, just as with a
+ HI16/LO16 pair. */
+ value = score_elf_high (value) << 16;
+ }
+
+ g = score_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
+
+ entry = score_elf_create_local_got_entry (abfd, ibfd, g, sgot, value, 0, NULL,
+ R_SCORE_GOT15);
+ if (entry)
+ return entry->gotidx;
+ else
+ return MINUS_ONE;
+}
+
+static void
+_bfd_score_elf_hide_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *entry,
+ bfd_boolean force_local)
+{
+ bfd *dynobj;
+ asection *got;
+ struct score_got_info *g;
+ struct score_elf_link_hash_entry *h;
+
+ h = (struct score_elf_link_hash_entry *) entry;
+ if (h->forced_local)
+ return;
+ h->forced_local = TRUE;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ if (dynobj != NULL && force_local)
+ {
+ got = score_elf_got_section (dynobj, FALSE);
+ if (got == NULL)
+ return;
+ g = score_elf_section_data (got)->u.got_info;
+
+ if (g->next)
+ {
+ struct score_got_entry e;
+ struct score_got_info *gg = g;
+
+ /* Since we're turning what used to be a global symbol into a
+ local one, bump up the number of local entries of each GOT
+ that had an entry for it. This will automatically decrease
+ the number of global entries, since global_gotno is actually
+ the upper limit of global entries. */
+ e.abfd = dynobj;
+ e.symndx = -1;
+ e.d.h = h;
+
+ for (g = g->next; g != gg; g = g->next)
+ if (htab_find (g->got_entries, &e))
+ {
+ BFD_ASSERT (g->global_gotno > 0);
+ g->local_gotno++;
+ g->global_gotno--;
+ }
+
+ /* If this was a global symbol forced into the primary GOT, we
+ no longer need an entry for it. We can't release the entry
+ at this point, but we must at least stop counting it as one
+ of the symbols that required a forced got entry. */
+ if (h->root.got.offset == 2)
+ {
+ BFD_ASSERT (gg->assigned_gotno > 0);
+ gg->assigned_gotno--;
+ }
+ }
+ else if (g->global_gotno == 0 && g->global_gotsym == NULL)
+ /* If we haven't got through GOT allocation yet, just bump up the
+ number of local entries, as this symbol won't be counted as
+ global. */
+ g->local_gotno++;
+ else if (h->root.got.offset == 1)
+ {
+ /* If we're past non-multi-GOT allocation and this symbol had
+ been marked for a global got entry, give it a local entry
+ instead. */
+ BFD_ASSERT (g->global_gotno > 0);
+ g->local_gotno++;
+ g->global_gotno--;
+ }
+ }
+
+ _bfd_elf_link_hash_hide_symbol (info, &h->root, force_local);
+}
+
+/* If H is a symbol that needs a global GOT entry, but has a dynamic
+ symbol table index lower than any we've seen to date, record it for
+ posterity. */
+
+static bfd_boolean
+score_elf_record_global_got_symbol (struct elf_link_hash_entry *h,
+ bfd *abfd,
+ struct bfd_link_info *info,
+ struct score_got_info *g)
+{
+ struct score_got_entry entry, **loc;
+
+ /* A global symbol in the GOT must also be in the dynamic symbol table. */
+ if (h->dynindx == -1)
+ {
+ switch (ELF_ST_VISIBILITY (h->other))
+ {
+ case STV_INTERNAL:
+ case STV_HIDDEN:
+ _bfd_score_elf_hide_symbol (info, h, TRUE);
+ break;
+ }
+ if (!bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ entry.abfd = abfd;
+ entry.symndx = -1;
+ entry.d.h = (struct score_elf_link_hash_entry *)h;
+
+ loc = (struct score_got_entry **)htab_find_slot (g->got_entries, &entry, INSERT);
+
+ /* If we've already marked this entry as needing GOT space, we don't
+ need to do it again. */
+ if (*loc)
+ return TRUE;
+
+ *loc = bfd_alloc (abfd, sizeof entry);
+ if (! *loc)
+ return FALSE;
+
+ entry.gotidx = -1;
+
+ memcpy (*loc, &entry, sizeof (entry));
+
+ if (h->got.offset != MINUS_ONE)
+ return TRUE;
+
+ /* By setting this to a value other than -1, we are indicating that
+ there needs to be a GOT entry for H. Avoid using zero, as the
+ generic ELF copy_indirect_symbol tests for <= 0. */
+ h->got.offset = 1;
+
+ return TRUE;
+}
+
+/* Reserve space in G for a GOT entry containing the value of symbol
+ SYMNDX in input bfd ABDF, plus ADDEND. */
+
+static bfd_boolean
+score_elf_record_local_got_symbol (bfd *abfd,
+ long symndx,
+ bfd_vma addend,
+ struct score_got_info *g)
+{
+ struct score_got_entry entry, **loc;
+
+ entry.abfd = abfd;
+ entry.symndx = symndx;
+ entry.d.addend = addend;
+ loc = (struct score_got_entry **)htab_find_slot (g->got_entries, &entry, INSERT);
+
+ if (*loc)
+ return TRUE;
+
+ entry.gotidx = g->local_gotno++;
+
+ *loc = bfd_alloc (abfd, sizeof(entry));
+ if (! *loc)
+ return FALSE;
+
+ memcpy (*loc, &entry, sizeof (entry));
+
+ return TRUE;
+}
+
+/* Returns the GOT offset at which the indicated address can be found.
+ If there is not yet a GOT entry for this value, create one.
+ Returns -1 if no satisfactory GOT offset can be found. */
+
+static bfd_vma
+score_elf_local_got_index (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
+ bfd_vma value, unsigned long r_symndx,
+ struct score_elf_link_hash_entry *h, int r_type)
+{
+ asection *sgot;
+ struct score_got_info *g;
+ struct score_got_entry *entry;
+
+ g = score_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
+
+ entry = score_elf_create_local_got_entry (abfd, ibfd, g, sgot, value,
+ r_symndx, h, r_type);
+ if (!entry)
+ return MINUS_ONE;
+
+ else
+ return entry->gotidx;
+}
+
+/* Returns the GOT index for the global symbol indicated by H. */
+
+static bfd_vma
+score_elf_global_got_index (bfd *abfd, struct elf_link_hash_entry *h)
+{
+ bfd_vma index;
+ asection *sgot;
+ struct score_got_info *g;
+ long global_got_dynindx = 0;
+
+ g = score_elf_got_info (abfd, &sgot);
+ if (g->global_gotsym != NULL)
+ global_got_dynindx = g->global_gotsym->dynindx;
+
+ /* Once we determine the global GOT entry with the lowest dynamic
+ symbol table index, we must put all dynamic symbols with greater
+ indices into the GOT. That makes it easy to calculate the GOT
+ offset. */
+ BFD_ASSERT (h->dynindx >= global_got_dynindx);
+ index = ((h->dynindx - global_got_dynindx + g->local_gotno) * SCORE_ELF_GOT_SIZE (abfd));
+ BFD_ASSERT (index < sgot->size);
+
+ return index;
+}
+
+/* Returns the offset for the entry at the INDEXth position in the GOT. */
+
+static bfd_vma
+score_elf_got_offset_from_index (bfd *dynobj, bfd *output_bfd,
+ bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma index)
+{
+ asection *sgot;
+ bfd_vma gp;
+ struct score_got_info *g;
+
+ g = score_elf_got_info (dynobj, &sgot);
+ gp = _bfd_get_gp_value (output_bfd);
+
+ return sgot->output_section->vma + sgot->output_offset + index - gp;
+}
+
+/* Follow indirect and warning hash entries so that each got entry
+ points to the final symbol definition. P must point to a pointer
+ to the hash table we're traversing. Since this traversal may
+ modify the hash table, we set this pointer to NULL to indicate
+ we've made a potentially-destructive change to the hash table, so
+ the traversal must be restarted. */
+static int
+score_elf_resolve_final_got_entry (void **entryp, void *p)
+{
+ struct score_got_entry *entry = (struct score_got_entry *)*entryp;
+ htab_t got_entries = *(htab_t *)p;
+
+ if (entry->abfd != NULL && entry->symndx == -1)
+ {
+ struct score_elf_link_hash_entry *h = entry->d.h;
+
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
+
+ if (entry->d.h == h)
+ return 1;
+
+ entry->d.h = h;
+
+ /* If we can't find this entry with the new bfd hash, re-insert
+ it, and get the traversal restarted. */
+ if (! htab_find (got_entries, entry))
+ {
+ htab_clear_slot (got_entries, entryp);
+ entryp = htab_find_slot (got_entries, entry, INSERT);
+ if (! *entryp)
+ *entryp = entry;
+ /* Abort the traversal, since the whole table may have
+ moved, and leave it up to the parent to restart the
+ process. */
+ *(htab_t *)p = NULL;
+ return 0;
+ }
+ /* We might want to decrement the global_gotno count, but it's
+ either too early or too late for that at this point. */
+ }
+
+ return 1;
+}
+
+/* Turn indirect got entries in a got_entries table into their final locations. */
+static void
+score_elf_resolve_final_got_entries (struct score_got_info *g)
+{
+ htab_t got_entries;
+
+ do
+ {
+ got_entries = g->got_entries;
+
+ htab_traverse (got_entries,
+ score_elf_resolve_final_got_entry,
+ &got_entries);
+ }
+ while (got_entries == NULL);
+}
+
+/* Add INCREMENT to the reloc (of type HOWTO) at ADDRESS. for -r */
+
+static void
+score_elf_add_to_rel (bfd *abfd,
+ bfd_byte *address,
+ reloc_howto_type *howto,
+ bfd_signed_vma increment)
+{
+ bfd_signed_vma addend;
+ bfd_vma contents;
+ unsigned long offset;
+ unsigned long r_type = howto->type;
+ unsigned long hi16_addend, hi16_offset, hi16_value, uvalue;
+
+ contents = bfd_get_32 (abfd, address);
+ /* Get the (signed) value from the instruction. */
+ addend = contents & howto->src_mask;
+ if (addend & ((howto->src_mask + 1) >> 1))
+ {
+ bfd_signed_vma mask;
+
+ mask = -1;
+ mask &= ~howto->src_mask;
+ addend |= mask;
+ }
+ /* Add in the increment, (which is a byte value). */
+ switch (r_type)
+ {
+ case R_SCORE_PC19:
+ offset =
+ (((contents & howto->src_mask) & 0x3ff0000) >> 6) | ((contents & howto->src_mask) & 0x3ff);
+ offset += increment;
+ contents =
+ (contents & ~howto->
+ src_mask) | (((offset << 6) & howto->src_mask) & 0x3ff0000) | (offset & 0x3ff);
+ bfd_put_32 (abfd, contents, address);
+ break;
+ case R_SCORE_HI16:
+ break;
+ case R_SCORE_LO16:
+ hi16_addend = bfd_get_32 (abfd, address - 4);
+ hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1;
+ offset = ((((contents >> 16) & 0x3) << 15) | (contents & 0x7fff)) >> 1;
+ offset = (hi16_offset << 16) | (offset & 0xffff);
+ uvalue = increment + offset;
+ hi16_offset = (uvalue >> 16) << 1;
+ hi16_value = (hi16_addend & (~(howto->dst_mask)))
+ | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
+ bfd_put_32 (abfd, hi16_value, address - 4);
+ offset = (uvalue & 0xffff) << 1;
+ contents = (contents & (~(howto->dst_mask))) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
+ bfd_put_32 (abfd, contents, address);
+ break;
+ case R_SCORE_24:
+ offset =
+ (((contents & howto->src_mask) >> 1) & 0x1ff8000) | ((contents & howto->src_mask) & 0x7fff);
+ offset += increment;
+ contents =
+ (contents & ~howto->
+ src_mask) | (((offset << 1) & howto->src_mask) & 0x3ff0000) | (offset & 0x7fff);
+ bfd_put_32 (abfd, contents, address);
+ break;
+ case R_SCORE16_11:
+
+ contents = bfd_get_16 (abfd, address);
+ offset = contents & howto->src_mask;
+ offset += increment;
+ contents = (contents & ~howto->src_mask) | (offset & howto->src_mask);
+ bfd_put_16 (abfd, contents, address);
+
+ break;
+ case R_SCORE16_PC8:
+
+ contents = bfd_get_16 (abfd, address);
+ offset = (contents & howto->src_mask) + ((increment >> 1) & 0xff);
+ contents = (contents & (~howto->src_mask)) | (offset & howto->src_mask);
+ bfd_put_16 (abfd, contents, address);
+
+ break;
+ default:
+ addend += increment;
+ contents = (contents & ~howto->dst_mask) | (addend & howto->dst_mask);
+ bfd_put_32 (abfd, contents, address);
+ break;
+ }
+}
+
+/* Perform a relocation as part of a final link. */
+
+static bfd_reloc_status_type
+score_elf_final_link_relocate (reloc_howto_type *howto,
+ bfd *input_bfd,
+ bfd *output_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *rel,
+ Elf_Internal_Rela *relocs,
+ bfd_vma symbol,
+ struct bfd_link_info *info,
+ const char *sym_name ATTRIBUTE_UNUSED,
+ int sym_flags ATTRIBUTE_UNUSED,
+ struct score_elf_link_hash_entry *h,
+ asection **local_sections,
+ bfd_boolean gp_disp_p)
+{
+ unsigned long r_type;
+ unsigned long r_symndx;
+ bfd_byte *hit_data = contents + rel->r_offset;
+ bfd_vma addend;
+ /* The final GP value to be used for the relocatable, executable, or
+ shared object file being produced. */
+ bfd_vma gp = MINUS_ONE;
+ /* The place (section offset or address) of the storage unit being relocated. */
+ bfd_vma rel_addr;
+ /* The value of GP used to create the relocatable object. */
+ bfd_vma gp0 = MINUS_ONE;
+ /* The offset into the global offset table at which the address of the relocation entry
+ symbol, adjusted by the addend, resides during execution. */
+ bfd_vma g = MINUS_ONE;
+ /* TRUE if the symbol referred to by this relocation is a local symbol. */
+ bfd_boolean local_p;
+ /* The eventual value we will relocate. */
+ bfd_vma value = symbol;
+ unsigned long hi16_addend, hi16_offset, hi16_value, uvalue, offset, abs_value = 0;
+
+ if (elf_gp (output_bfd) == 0)
+ {
+ struct bfd_link_hash_entry *bh;
+ asection *o;
+
+ bh = bfd_link_hash_lookup (info->hash, "_gp", 0, 0, 1);
+ if (bh != (struct bfd_link_hash_entry *)NULL && bh->type == bfd_link_hash_defined)
+ elf_gp (output_bfd) = (bh->u.def.value
+ + bh->u.def.section->output_section->vma
+ + bh->u.def.section->output_offset);
+ else if (info->relocatable)
+ {
+ bfd_vma lo = -1;
+
+ /* Find the GP-relative section with the lowest offset. */
+ for (o = output_bfd->sections; o != (asection *) NULL; o = o->next)
+ if (o->vma < lo)
+ lo = o->vma;
+ /* And calculate GP relative to that. */
+ elf_gp (output_bfd) = lo + ELF_SCORE_GP_OFFSET (input_bfd);
+ }
+ else
+ {
+ /* If the relocate_section function needs to do a reloc
+ involving the GP value, it should make a reloc_dangerous
+ callback to warn that GP is not defined. */
+ }
+ }
+
+ /* Parse the relocation. */
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+ rel_addr = (input_section->output_section->vma + input_section->output_offset + rel->r_offset);
+ local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, TRUE);
+
+ if (r_type == R_SCORE_GOT15)
+ {
+ const Elf_Internal_Rela *relend;
+ const Elf_Internal_Rela *lo16_rel;
+ const struct elf_backend_data *bed;
+ bfd_vma lo_value = 0;
+
+ bed = get_elf_backend_data (output_bfd);
+ relend = relocs + input_section->reloc_count * bed->s->int_rels_per_ext_rel;
+ lo16_rel = score_elf_next_relocation (input_bfd, R_SCORE_GOT_LO16, rel, relend);
+ if ((local_p) && (lo16_rel != NULL))
+ {
+ bfd_vma tmp = 0;
+ tmp = bfd_get_32 (input_bfd, contents + lo16_rel->r_offset);
+ lo_value = (((tmp >> 16) & 0x3) << 14) | ((tmp & 0x7fff) >> 1);
+ }
+ addend = lo_value;
+ }
+ else
+ {
+ addend = (bfd_get_32 (input_bfd, hit_data) >> howto->bitpos) & howto->src_mask;
+ }
+
+ /* If we haven't already determined the GOT offset, or the GP value,
+ and we're going to need it, get it now. */
+ switch (r_type)
+ {
+ case R_SCORE_CALL15:
+ case R_SCORE_GOT15:
+ if (!local_p)
+ {
+ g = score_elf_global_got_index (elf_hash_table (info)->dynobj,
+ (struct elf_link_hash_entry *) h);
+ if ((! elf_hash_table(info)->dynamic_sections_created
+ || (info->shared
+ && (info->symbolic || h->root.dynindx == -1)
+ && h->root.def_regular)))
+ {
+ /* This is a static link or a -Bsymbolic link. The
+ symbol is defined locally, or was forced to be local.
+ We must initialize this entry in the GOT. */
+ bfd *tmpbfd = elf_hash_table (info)->dynobj;
+ asection *sgot = score_elf_got_section (tmpbfd, FALSE);
+ bfd_put_32 (tmpbfd, value, sgot->contents + g);
+ }
+ }
+ else if (r_type == R_SCORE_GOT15 || r_type == R_SCORE_CALL15)
+ {
+ /* There's no need to create a local GOT entry here; the
+ calculation for a local GOT15 entry does not involve G. */
+ ;
+ }
+ else
+ {
+ g = score_elf_local_got_index (output_bfd, input_bfd, info,
+ symbol + addend, r_symndx, h, r_type);
+ if (g == MINUS_ONE)
+ return bfd_reloc_outofrange;
+ }
+
+ /* Convert GOT indices to actual offsets. */
+ g = score_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
+ output_bfd, input_bfd, g);
+ break;
+
+ case R_SCORE_HI16:
+ case R_SCORE_LO16:
+ case R_SCORE_GPREL32:
+ gp0 = _bfd_get_gp_value (input_bfd);
+ gp = _bfd_get_gp_value (output_bfd);
+ break;
+
+ case R_SCORE_GP15:
+ gp = _bfd_get_gp_value (output_bfd);
+
+ default:
+ break;
+ }
+
+ switch (r_type)
+ {
+ case R_SCORE_NONE:
+ return bfd_reloc_ok;
+
+ case R_SCORE_ABS32:
+ case R_SCORE_REL32:
+ if ((info->shared
+ || (elf_hash_table (info)->dynamic_sections_created
+ && h != NULL
+ && h->root.def_dynamic
+ && !h->root.def_regular))
+ && r_symndx != 0
+ && (input_section->flags & SEC_ALLOC) != 0)
+ {
+ /* If we're creating a shared library, or this relocation is against a symbol
+ in a shared library, then we can't know where the symbol will end up.
+ So, we create a relocation record in the output, and leave the job up
+ to the dynamic linker. */
+ value = addend;
+ if (!score_elf_create_dynamic_relocation (output_bfd, info, rel, h,
+ symbol, &value,
+ input_section))
+ return bfd_reloc_undefined;
+ }
+ else
+ {
+ if (r_type != R_SCORE_REL32)
+ value = symbol + addend;
+ else
+ value = addend;
+ }
+ value &= howto->dst_mask;
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_ABS16:
+ value += addend;
+ if ((long)value > 0x7fff || (long)value < -0x8000)
+ return bfd_reloc_overflow;
+ bfd_put_16 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_24:
+ addend = bfd_get_32 (input_bfd, hit_data);
+ offset = (((addend & howto->src_mask) >> 1) & 0x1ff8000) | ((addend & howto->src_mask) & 0x7fff);
+ if ((offset & 0x1000000) != 0)
+ offset |= 0xfe000000;
+ value += offset;
+ addend = (addend & ~howto->src_mask)
+ | (((value << 1) & howto->src_mask) & 0x3ff0000) | (value & 0x7fff);
+ bfd_put_32 (input_bfd, addend, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_PC19:
+ addend = bfd_get_32 (input_bfd, hit_data);
+ offset = (((addend & howto->src_mask) & 0x3ff0000) >> 6) | ((addend & howto->src_mask) & 0x3ff);
+ if ((offset & 0x80000) != 0)
+ offset |= 0xfff00000;
+ abs_value = value = value - rel_addr + offset;
+ /* exceed 20 bit : overflow. */
+ if ((abs_value & 0x80000000) == 0x80000000)
+ abs_value = 0xffffffff - value + 1;
+ if ((abs_value & 0xfff80000) != 0)
+ return bfd_reloc_overflow;
+ addend = (addend & ~howto->src_mask)
+ | (((value << 6) & howto->src_mask) & 0x3ff0000) | (value & 0x3ff);
+ bfd_put_32 (input_bfd, addend, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE16_11:
+ addend = bfd_get_16 (input_bfd, hit_data);
+ offset = addend & howto->src_mask;
+ if ((offset & 0x800) != 0) /* Offset is negative. */
+ offset |= 0xfffff000;
+ value += offset;
+ addend = (addend & ~howto->src_mask) | (value & howto->src_mask);
+ bfd_put_16 (input_bfd, addend, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE16_PC8:
+ addend = bfd_get_16 (input_bfd, hit_data);
+ offset = (addend & howto->src_mask) << 1;
+ if ((offset & 0x100) != 0) /* Offset is negative. */
+ offset |= 0xfffffe00;
+ abs_value = value = value - rel_addr + offset;
+ /* Sign bit + exceed 9 bit. */
+ if (((value & 0xffffff00) != 0) && ((value & 0xffffff00) != 0xffffff00))
+ return bfd_reloc_overflow;
+ value >>= 1;
+ addend = (addend & ~howto->src_mask) | (value & howto->src_mask);
+ bfd_put_16 (input_bfd, addend, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_HI16:
+ return bfd_reloc_ok;
+
+ case R_SCORE_LO16:
+ hi16_addend = bfd_get_32 (input_bfd, hit_data - 4);
+ hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1;
+ addend = bfd_get_32 (input_bfd, hit_data);
+ offset = ((((addend >> 16) & 0x3) << 15) | (addend & 0x7fff)) >> 1;
+ offset = (hi16_offset << 16) | (offset & 0xffff);
+
+ if (!gp_disp_p)
+ uvalue = value + offset;
+ else
+ uvalue = offset + gp - rel_addr + 4;
+
+ hi16_offset = (uvalue >> 16) << 1;
+ hi16_value = (hi16_addend & (~(howto->dst_mask)))
+ | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
+ bfd_put_32 (input_bfd, hi16_value, hit_data - 4);
+ offset = (uvalue & 0xffff) << 1;
+ value = (addend & (~(howto->dst_mask))) | (offset & 0x7fff) | ((offset << 1) & 0x30000);
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_GP15:
+ addend = bfd_get_32 (input_bfd, hit_data);
+ offset = addend & 0x7fff;
+ if ((offset & 0x4000) == 0x4000)
+ offset |= 0xffffc000;
+ value = value + offset - gp;
+ if (((value & 0xffffc000) != 0) && ((value & 0xffffc000) != 0xffffc000))
+ return bfd_reloc_overflow;
+ value = (addend & ~howto->src_mask) | (value & howto->src_mask);
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_GOT15:
+ case R_SCORE_CALL15:
+ if (local_p)
+ {
+ bfd_boolean forced;
+
+ /* The special case is when the symbol is forced to be local. We need the
+ full address in the GOT since no R_SCORE_GOT_LO16 relocation follows. */
+ forced = ! score_elf_local_relocation_p (input_bfd, rel,
+ local_sections, FALSE);
+ value = score_elf_got16_entry (output_bfd, input_bfd, info,
+ symbol + addend, forced);
+ if (value == MINUS_ONE)
+ return bfd_reloc_outofrange;
+ value = score_elf_got_offset_from_index (elf_hash_table (info)->dynobj,
+ output_bfd, input_bfd, value);
+ }
+ else
+ {
+ value = g;
+ }
+
+ if ((long) value > 0x3fff || (long) value < -0x4000)
+ return bfd_reloc_overflow;
+
+ addend = bfd_get_32 (input_bfd, hit_data);
+ value = (addend & ~howto->dst_mask) | (value & howto->dst_mask);
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_GPREL32:
+ value = (addend + symbol - gp);
+ value &= howto->dst_mask;
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_GOT_LO16:
+ addend = bfd_get_32 (input_bfd, hit_data);
+ value = (((addend >> 16) & 0x3) << 14) | ((addend & 0x7fff) >> 1);
+ value += symbol;
+ value = (addend & (~(howto->dst_mask))) | ((value & 0x3fff) << 1)
+ | (((value >> 14) & 0x3) << 16);
+
+ bfd_put_32 (input_bfd, value, hit_data);
+ return bfd_reloc_ok;
+
+ case R_SCORE_DUMMY_HI16:
+ return bfd_reloc_ok;
+
+ case R_SCORE_GNU_VTINHERIT:
+ case R_SCORE_GNU_VTENTRY:
+ /* We don't do anything with these at present. */
+ return bfd_reloc_continue;
+
+ default:
+ return bfd_reloc_notsupported;
+ }
+}
+
+/* Score backend functions. */
+
+static void
+_bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *bfd_reloc,
+ Elf_Internal_Rela *elf_reloc)
+{
+ unsigned int r_type;
+
+ r_type = ELF32_R_TYPE (elf_reloc->r_info);
+ if (r_type >= NUM_ELEM (elf32_score_howto_table))
+ bfd_reloc->howto = NULL;
+ else
+ bfd_reloc->howto = &elf32_score_howto_table[r_type];
+}
+
+/* Relocate an score ELF section. */
+
+static bfd_boolean
+_bfd_score_elf_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
+ const char *name;
+ unsigned long offset;
+ unsigned long hi16_addend, hi16_offset, hi16_value, uvalue;
+ size_t extsymoff;
+ bfd_boolean gp_disp_p = FALSE;
+
+ /* Sort dynsym. */
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ bfd_size_type dynsecsymcount = 0;
+ if (info->shared)
+ {
+ asection * p;
+ const struct elf_backend_data *bed = get_elf_backend_data (output_bfd);
+
+ for (p = output_bfd->sections; p ; p = p->next)
+ if ((p->flags & SEC_EXCLUDE) == 0
+ && (p->flags & SEC_ALLOC) != 0
+ && !(*bed->elf_backend_omit_section_dynsym) (output_bfd, info, p))
+ ++ dynsecsymcount;
+ }
+
+ if (!score_elf_sort_hash_table (info, dynsecsymcount + 1))
+ return FALSE;
+ }
+
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ struct score_elf_link_hash_entry *h;
+ bfd_vma relocation = 0;
+ bfd_reloc_status_type r;
+ arelent bfd_reloc;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ _bfd_score_info_to_howto (input_bfd, &bfd_reloc, (Elf_Internal_Rela *) rel);
+ howto = bfd_reloc.howto;
+
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+
+ if (r_symndx < extsymoff)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ relocation = (sec->output_section->vma
+ + sec->output_offset
+ + sym->st_value);
+ name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
+
+ if (!info->relocatable
+ && (sec->flags & SEC_MERGE) != 0
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ asection *msec;
+ bfd_vma addend, value;
+
+ switch (r_type)
+ {
+ case R_SCORE_HI16:
+ break;
+ case R_SCORE_LO16:
+ hi16_addend = bfd_get_32 (input_bfd, contents + rel->r_offset - 4);
+ hi16_offset = ((((hi16_addend >> 16) & 0x3) << 15) | (hi16_addend & 0x7fff)) >> 1;
+ value = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ offset = ((((value >> 16) & 0x3) << 15) | (value & 0x7fff)) >> 1;
+ addend = (hi16_offset << 16) | (offset & 0xffff);
+ msec = sec;
+ addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend);
+ addend -= relocation;
+ addend += msec->output_section->vma + msec->output_offset;
+ uvalue = addend;
+ hi16_offset = (uvalue >> 16) << 1;
+ hi16_value = (hi16_addend & (~(howto->dst_mask)))
+ | (hi16_offset & 0x7fff) | ((hi16_offset << 1) & 0x30000);
+ bfd_put_32 (input_bfd, hi16_value, contents + rel->r_offset - 4);
+ offset = (uvalue & 0xffff) << 1;
+ value = (value & (~(howto->dst_mask)))
+ | (offset & 0x7fff) | ((offset << 1) & 0x30000);
+ bfd_put_32 (input_bfd, value, contents + rel->r_offset);
+ break;
+ case R_SCORE_GOT_LO16:
+ value = bfd_get_32 (input_bfd, contents + rel->r_offset);
+ addend = (((value >> 16) & 0x3) << 14) | ((value & 0x7fff) >> 1);
+ msec = sec;
+ addend = _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend) - relocation;
+ addend += msec->output_section->vma + msec->output_offset;
+ value = (value & (~(howto->dst_mask))) | ((addend & 0x3fff) << 1)
+ | (((addend >> 14) & 0x3) << 16);
+
+ bfd_put_32 (input_bfd, value, contents + rel->r_offset);
+ break;
+ default:
+ 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);
+ break;
+ }
+ }
+ }
+ else
+ {
+ /* For global symbols we look up the symbol in the hash-table. */
+ h = ((struct score_elf_link_hash_entry *)
+ elf_sym_hashes (input_bfd) [r_symndx - extsymoff]);
+ /* Find the real hash-table entry for this symbol. */
+ while (h->root.root.type == bfd_link_hash_indirect
+ || h->root.root.type == bfd_link_hash_warning)
+ h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link;
+
+ /* Record the name of this symbol, for our caller. */
+ name = h->root.root.root.string;
+
+ /* See if this is the special GP_DISP_LABEL symbol. Note that such a
+ symbol must always be a global symbol. */
+ if (strcmp (name, GP_DISP_LABEL) == 0)
+ {
+ /* Relocations against GP_DISP_LABEL are permitted only with
+ R_SCORE_HI16 and R_SCORE_LO16 relocations. */
+ if (r_type != R_SCORE_HI16 && r_type != R_SCORE_LO16)
+ return bfd_reloc_notsupported;
+
+ gp_disp_p = TRUE;
+ }
+
+ /* If this symbol is defined, calculate its address. Note that
+ GP_DISP_LABEL is a magic symbol, always implicitly defined by the
+ linker, so it's inappropriate to check to see whether or not
+ its defined. */
+ else if ((h->root.root.type == bfd_link_hash_defined
+ || h->root.root.type == bfd_link_hash_defweak)
+ && h->root.root.u.def.section)
+ {
+ sec = h->root.root.u.def.section;
+ if (sec->output_section)
+ relocation = (h->root.root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ else
+ {
+ relocation = h->root.root.u.def.value;
+ }
+ }
+ else if (h->root.root.type == bfd_link_hash_undefweak)
+ /* We allow relocations against undefined weak symbols, giving
+ it the value zero, so that you can undefined weak functions
+ and check to see if they exist by looking at their addresses. */
+ relocation = 0;
+ else if (info->unresolved_syms_in_objects == RM_IGNORE
+ && ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT)
+ relocation = 0;
+ else if (strcmp (name, "_DYNAMIC_LINK") == 0)
+ {
+ /* If this is a dynamic link, we should have created a _DYNAMIC_LINK symbol
+ in _bfd_score_elf_create_dynamic_sections. Otherwise, we should define
+ the symbol with a value of 0. */
+ BFD_ASSERT (! info->shared);
+ BFD_ASSERT (bfd_get_section_by_name (output_bfd, ".dynamic") == NULL);
+ relocation = 0;
+ }
+ else if (!info->relocatable)
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ (info->unresolved_syms_in_objects == RM_GENERATE_ERROR)
+ || ELF_ST_VISIBILITY (h->root.other))))
+ return bfd_reloc_undefined;
+ relocation = 0;
+ }
+ }
+
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ {
+ /* 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 (sym != NULL && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ score_elf_add_to_rel (input_bfd, contents + rel->r_offset,
+ howto, (bfd_signed_vma) sec->output_offset);
+ continue;
+ }
+
+ r = score_elf_final_link_relocate (howto, input_bfd, output_bfd,
+ input_section, contents, rel, relocs,
+ relocation, info, name,
+ (h ? ELF_ST_TYPE ((unsigned int)h->root.root.type) :
+ ELF_ST_TYPE ((unsigned int)sym->st_info)), h, local_sections,
+ gp_disp_p);
+
+ if (r != bfd_reloc_ok)
+ {
+ const char *msg = (const char *)0;
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ /* If the overflowing reloc was to an undefined symbol,
+ we have already printed one error message and there
+ is no point complaining again. */
+ if (((!h) || (h->root.root.type != bfd_link_hash_undefined))
+ && (!((*info->callbacks->reloc_overflow)
+ (info, NULL, name, howto->name, (bfd_vma) 0,
+ input_bfd, input_section, rel->r_offset))))
+ return FALSE;
+ break;
+ case bfd_reloc_undefined:
+ if (!((*info->callbacks->undefined_symbol)
+ (info, name, input_bfd, input_section, rel->r_offset, TRUE)))
+ return FALSE;
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _("internal error: out of range error");
+ goto common_error;
+
+ case bfd_reloc_notsupported:
+ msg = _("internal error: unsupported relocation error");
+ goto common_error;
+
+ case bfd_reloc_dangerous:
+ msg = _("internal error: dangerous error");
+ goto common_error;
+
+ default:
+ msg = _("internal error: unknown error");
+ /* fall through */
+
+ common_error:
+ if (!((*info->callbacks->warning)
+ (info, msg, name, input_bfd, input_section, rel->r_offset)))
+ return FALSE;
+ break;
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+/* Look through the relocs for a section during the first phase, and
+ allocate space in the global offset table. */
+
+static bfd_boolean
+_bfd_score_elf_check_relocs (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
+{
+ const char *name;
+ bfd *dynobj;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ struct score_got_info *g;
+ size_t extsymoff;
+ const Elf_Internal_Rela *rel;
+ const Elf_Internal_Rela *rel_end;
+ asection *sgot;
+ asection *sreloc;
+ const struct elf_backend_data *bed;
+
+ if (info->relocatable)
+ return TRUE;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (abfd);
+ extsymoff = (elf_bad_symtab (abfd)) ? 0 : symtab_hdr->sh_info;
+
+ name = bfd_get_section_name (abfd, sec);
+
+ if (dynobj == NULL)
+ {
+ sgot = NULL;
+ g = NULL;
+ }
+ else
+ {
+ sgot = score_elf_got_section (dynobj, FALSE);
+ if (sgot == NULL)
+ g = NULL;
+ else
+ {
+ BFD_ASSERT (score_elf_section_data (sgot) != NULL);
+ g = score_elf_section_data (sgot)->u.got_info;
+ BFD_ASSERT (g != NULL);
+ }
+ }
+
+ sreloc = NULL;
+ bed = get_elf_backend_data (abfd);
+ rel_end = relocs + sec->reloc_count * bed->s->int_rels_per_ext_rel;
+ for (rel = relocs; rel < rel_end; ++rel)
+ {
+ unsigned long r_symndx;
+ unsigned int r_type;
+ struct elf_link_hash_entry *h;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+
+ if (r_symndx < extsymoff)
+ {
+ h = NULL;
+ }
+ else if (r_symndx >= extsymoff + NUM_SHDR_ENTRIES (symtab_hdr))
+ {
+ (*_bfd_error_handler) (_("%s: Malformed reloc detected for section %s"), abfd, name);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ else
+ {
+ h = sym_hashes[r_symndx - extsymoff];
+
+ /* This may be an indirect symbol created because of a version. */
+ if (h != NULL)
+ {
+ while (h->root.type == bfd_link_hash_indirect)
+ h = (struct elf_link_hash_entry *)h->root.u.i.link;
+ }
+ }
+
+ /* Some relocs require a global offset table. */
+ if (dynobj == NULL || sgot == NULL)
+ {
+ switch (r_type)
+ {
+ case R_SCORE_GOT15:
+ case R_SCORE_CALL15:
+ if (dynobj == NULL)
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ if (!score_elf_create_got_section (dynobj, info, FALSE))
+ return FALSE;
+ g = score_elf_got_info (dynobj, &sgot);
+ break;
+ case R_SCORE_ABS32:
+ case R_SCORE_REL32:
+ if (dynobj == NULL && (info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0)
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!h && (r_type == R_SCORE_GOT_LO16))
+ {
+ if (! score_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, g))
+ return FALSE;
+ }
+
+ switch (r_type)
+ {
+ case R_SCORE_CALL15:
+ if (h == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%B: CALL15 reloc at 0x%lx not against global symbol"),
+ abfd, (unsigned long) rel->r_offset);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+ else
+ {
+ /* This symbol requires a global offset table entry. */
+ if (! score_elf_record_global_got_symbol (h, abfd, info, g))
+ return FALSE;
+
+ /* We need a stub, not a plt entry for the undefined function. But we record
+ it as if it needs plt. See _bfd_elf_adjust_dynamic_symbol. */
+ h->needs_plt = 1;
+ h->type = STT_FUNC;
+ }
+ break;
+ case R_SCORE_GOT15:
+ if (h && ! score_elf_record_global_got_symbol (h, abfd, info, g))
+ return FALSE;
+ break;
+ case R_SCORE_ABS32:
+ case R_SCORE_REL32:
+ if ((info->shared || h != NULL) && (sec->flags & SEC_ALLOC) != 0)
+ {
+ if (sreloc == NULL)
+ {
+ sreloc = score_elf_rel_dyn_section (dynobj, TRUE);
+ if (sreloc == NULL)
+ return FALSE;
+ }
+#define SCORE_READONLY_SECTION (SEC_ALLOC | SEC_LOAD | SEC_READONLY)
+ if (info->shared)
+ {
+ /* When creating a shared object, we must copy these reloc types into
+ the output file as R_SCORE_REL32 relocs. We make room for this reloc
+ in the .rel.dyn reloc section. */
+ score_elf_allocate_dynamic_relocations (dynobj, 1);
+ if ((sec->flags & SCORE_READONLY_SECTION)
+ == SCORE_READONLY_SECTION)
+ /* We tell the dynamic linker that there are
+ relocations against the text segment. */
+ info->flags |= DF_TEXTREL;
+ }
+ else
+ {
+ struct score_elf_link_hash_entry *hscore;
+
+ /* We only need to copy this reloc if the symbol is
+ defined in a dynamic object. */
+ hscore = (struct score_elf_link_hash_entry *)h;
+ ++hscore->possibly_dynamic_relocs;
+ if ((sec->flags & SCORE_READONLY_SECTION)
+ == SCORE_READONLY_SECTION)
+ /* We need it to tell the dynamic linker if there
+ are relocations against the text segment. */
+ hscore->readonly_reloc = TRUE;
+ }
+
+ /* Even though we don't directly need a GOT entry for this symbol,
+ a symbol must have a dynamic symbol table index greater that
+ DT_SCORE_GOTSYM if there are dynamic relocations against it. */
+ if (h != NULL)
+ {
+ if (dynobj == NULL)
+ elf_hash_table (info)->dynobj = dynobj = abfd;
+ if (! score_elf_create_got_section (dynobj, info, TRUE))
+ return FALSE;
+ g = score_elf_got_info (dynobj, &sgot);
+ if (! score_elf_record_global_got_symbol (h, abfd, info, g))
+ return FALSE;
+ }
+ }
+ break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_SCORE_GNU_VTINHERIT:
+ if (!bfd_elf_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_SCORE_GNU_VTENTRY:
+ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ return FALSE;
+ break;
+ default:
+ break;
+ }
+
+ /* We must not create a stub for a symbol that has relocations
+ related to taking the function's address. */
+ switch (r_type)
+ {
+ default:
+ if (h != NULL)
+ {
+ struct score_elf_link_hash_entry *sh;
+
+ sh = (struct score_elf_link_hash_entry *) h;
+ sh->no_fn_stub = TRUE;
+ }
+ break;
+ case R_SCORE_CALL15:
+ break;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+_bfd_score_elf_add_symbol_hook (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Sym *sym,
+ const char **namep ATTRIBUTE_UNUSED,
+ flagword *flagsp ATTRIBUTE_UNUSED,
+ asection **secp,
+ bfd_vma *valp)
+{
+ switch (sym->st_shndx)
+ {
+ case SHN_COMMON:
+ if (sym->st_size > elf_gp_size (abfd))
+ break;
+ /* Fall through. */
+ case SHN_SCORE_SCOMMON:
+ *secp = bfd_make_section_old_way (abfd, ".scommon");
+ (*secp)->flags |= SEC_IS_COMMON;
+ *valp = sym->st_size;
+ break;
+ }
+
+ return TRUE;
+}
+
+static void
+_bfd_score_elf_symbol_processing (bfd *abfd, asymbol *asym)
+{
+ elf_symbol_type *elfsym;
+
+ elfsym = (elf_symbol_type *) asym;
+ switch (elfsym->internal_elf_sym.st_shndx)
+ {
+ case SHN_COMMON:
+ if (asym->value > elf_gp_size (abfd))
+ break;
+ /* Fall through. */
+ case SHN_SCORE_SCOMMON:
+ if (score_elf_scom_section.name == NULL)
+ {
+ /* Initialize the small common section. */
+ score_elf_scom_section.name = ".scommon";
+ score_elf_scom_section.flags = SEC_IS_COMMON;
+ score_elf_scom_section.output_section = &score_elf_scom_section;
+ score_elf_scom_section.symbol = &score_elf_scom_symbol;
+ score_elf_scom_section.symbol_ptr_ptr = &score_elf_scom_symbol_ptr;
+ score_elf_scom_symbol.name = ".scommon";
+ score_elf_scom_symbol.flags = BSF_SECTION_SYM;
+ score_elf_scom_symbol.section = &score_elf_scom_section;
+ score_elf_scom_symbol_ptr = &score_elf_scom_symbol;
+ }
+ asym->section = &score_elf_scom_section;
+ asym->value = elfsym->internal_elf_sym.st_size;
+ break;
+ }
+}
+
+static bfd_boolean
+_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ const char *name ATTRIBUTE_UNUSED,
+ Elf_Internal_Sym *sym,
+ asection *input_sec,
+ struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
+{
+ /* If we see a common symbol, which implies a relocatable link, then
+ if a symbol was small common in an input file, mark it as small
+ common in the output file. */
+ if (sym->st_shndx == SHN_COMMON && strcmp (input_sec->name, ".scommon") == 0)
+ sym->st_shndx = SHN_SCORE_SCOMMON;
+
+ return TRUE;
+}
+
+static bfd_boolean
+_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec,
+ int *retval)
+{
+ if (strcmp (bfd_get_section_name (abfd, sec), ".scommon") == 0)
+ {
+ *retval = SHN_SCORE_SCOMMON;
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* 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 bfd_boolean
+_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h)
+{
+ bfd *dynobj;
+ struct score_elf_link_hash_entry *hscore;
+ asection *s;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ /* Make sure we know what is going on here. */
+ BFD_ASSERT (dynobj != NULL
+ && (h->needs_plt
+ || h->u.weakdef != NULL
+ || (h->def_dynamic && h->ref_regular && !h->def_regular)));
+
+ /* If this symbol is defined in a dynamic object, we need to copy
+ any R_SCORE_ABS32 or R_SCORE_REL32 relocs against it into the output
+ file. */
+ hscore = (struct score_elf_link_hash_entry *)h;
+ if (!info->relocatable
+ && hscore->possibly_dynamic_relocs != 0
+ && (h->root.type == bfd_link_hash_defweak || !h->def_regular))
+ {
+ score_elf_allocate_dynamic_relocations (dynobj, hscore->possibly_dynamic_relocs);
+ if (hscore->readonly_reloc)
+ /* We tell the dynamic linker that there are relocations
+ against the text segment. */
+ info->flags |= DF_TEXTREL;
+ }
+
+ /* For a function, create a stub, if allowed. */
+ if (!hscore->no_fn_stub && h->needs_plt)
+ {
+ if (!elf_hash_table (info)->dynamic_sections_created)
+ return TRUE;
+
+ /* If this symbol is not defined in a regular file, then set
+ the symbol to the stub location. This is required to make
+ function pointers compare as equal between the normal
+ executable and the shared library. */
+ if (!h->def_regular)
+ {
+ /* We need .stub section. */
+ s = bfd_get_section_by_name (dynobj, SCORE_ELF_STUB_SECTION_NAME);
+ BFD_ASSERT (s != NULL);
+
+ h->root.u.def.section = s;
+ h->root.u.def.value = s->size;
+
+ /* XXX Write this stub address somewhere. */
+ h->plt.offset = s->size;
+
+ /* Make room for this stub code. */
+ s->size += SCORE_FUNCTION_STUB_SIZE;
+
+ /* The last half word of the stub will be filled with the index
+ of this symbol in .dynsym section. */
+ return TRUE;
+ }
+ }
+ else if ((h->type == STT_FUNC) && !h->needs_plt)
+ {
+ /* This will set the entry for this symbol in the GOT to 0, and
+ the dynamic linker will take care of this. */
+ h->root.u.def.value = 0;
+ return TRUE;
+ }
+
+ /* If this is a weak symbol, and there is a real definition, the
+ processor independent code will have arranged for us to see the
+ real definition first, and we can just use the same value. */
+ if (h->u.weakdef != NULL)
+ {
+ BFD_ASSERT (h->u.weakdef->root.type == bfd_link_hash_defined
+ || h->u.weakdef->root.type == bfd_link_hash_defweak);
+ h->root.u.def.section = h->u.weakdef->root.u.def.section;
+ h->root.u.def.value = h->u.weakdef->root.u.def.value;
+ return TRUE;
+ }
+
+ /* This is a reference to a symbol defined by a dynamic object which
+ is not a function. */
+ return TRUE;
+}
+
+/* This function is called after all the input files have been read,
+ and the input sections have been assigned to output sections. */
+
+static bfd_boolean
+_bfd_score_elf_always_size_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
+{
+ bfd *dynobj;
+ asection *s;
+ struct score_got_info *g;
+ int i;
+ bfd_size_type loadable_size = 0;
+ bfd_size_type local_gotno;
+ bfd *sub;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ if (dynobj == NULL)
+ /* Relocatable links don't have it. */
+ return TRUE;
+
+ g = score_elf_got_info (dynobj, &s);
+ if (s == NULL)
+ return TRUE;
+
+ /* Calculate the total loadable size of the output. That will give us the
+ maximum number of GOT_PAGE entries required. */
+ for (sub = info->input_bfds; sub; sub = sub->link_next)
+ {
+ asection *subsection;
+
+ for (subsection = sub->sections;
+ subsection;
+ subsection = subsection->next)
+ {
+ if ((subsection->flags & SEC_ALLOC) == 0)
+ continue;
+ loadable_size += ((subsection->size + 0xf)
+ &~ (bfd_size_type) 0xf);
+ }
+ }
+
+ /* There has to be a global GOT entry for every symbol with
+ a dynamic symbol table index of DT_SCORE_GOTSYM or
+ higher. Therefore, it make sense to put those symbols
+ that need GOT entries at the end of the symbol table. We
+ do that here. */
+ if (! score_elf_sort_hash_table (info, 1))
+ return FALSE;
+
+ if (g->global_gotsym != NULL)
+ i = elf_hash_table (info)->dynsymcount - g->global_gotsym->dynindx;
+ else
+ /* If there are no global symbols, or none requiring
+ relocations, then GLOBAL_GOTSYM will be NULL. */
+ i = 0;
+
+ /* In the worst case, we'll get one stub per dynamic symbol. */
+ loadable_size += SCORE_FUNCTION_STUB_SIZE * i;
+
+ /* Assume there are two loadable segments consisting of
+ contiguous sections. Is 5 enough? */
+ local_gotno = (loadable_size >> 16) + 5;
+
+ g->local_gotno += local_gotno;
+ s->size += g->local_gotno * SCORE_ELF_GOT_SIZE (output_bfd);
+
+ g->global_gotno = i;
+ s->size += i * SCORE_ELF_GOT_SIZE (output_bfd);
+
+ score_elf_resolve_final_got_entries (g);
+
+ if (s->size > SCORE_ELF_GOT_MAX_SIZE (output_bfd))
+ {
+ /* Fixme. Error message or Warning message should be issued here. */
+ }
+
+ return TRUE;
+}
+
+/* Set the sizes of the dynamic sections. */
+
+static bfd_boolean
+_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
+{
+ bfd *dynobj;
+ asection *s;
+ bfd_boolean reltext;
+
+ dynobj = elf_hash_table (info)->dynobj;
+ BFD_ASSERT (dynobj != NULL);
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Set the contents of the .interp section to the interpreter. */
+ if (!info->shared)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ BFD_ASSERT (s != NULL);
+ s->size = strlen (ELF_DYNAMIC_INTERPRETER) + 1;
+ s->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER;
+ }
+ }
+
+ /* The check_relocs and adjust_dynamic_symbol entry points have
+ determined the sizes of the various dynamic sections. Allocate
+ memory for them. */
+ reltext = FALSE;
+ for (s = dynobj->sections; s != NULL; s = s->next)
+ {
+ const char *name;
+
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
+
+ /* It's OK to base decisions on the section name, because none
+ of the dynobj section names depend upon the input files. */
+ name = bfd_get_section_name (dynobj, s);
+
+ if (CONST_STRNEQ (name, ".rel"))
+ {
+ if (s->size == 0)
+ {
+ /* We only strip the section if the output section name
+ has the same name. Otherwise, there might be several
+ input sections for this output section. FIXME: This
+ code is probably not needed these days anyhow, since
+ the linker now does not create empty output sections. */
+ if (s->output_section != NULL
+ && strcmp (name,
+ bfd_get_section_name (s->output_section->owner,
+ s->output_section)) == 0)
+ s->flags |= SEC_EXCLUDE;
+ }
+ else
+ {
+ const char *outname;
+ asection *target;
+
+ /* If this relocation section applies to a read only
+ section, then we probably need a DT_TEXTREL entry.
+ If the relocation section is .rel.dyn, we always
+ assert a DT_TEXTREL entry rather than testing whether
+ there exists a relocation to a read only section or
+ not. */
+ 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) || strcmp (outname, ".rel.dyn") == 0)
+ reltext = TRUE;
+
+ /* We use the reloc_count field as a counter if we need
+ to copy relocs into the output file. */
+ if (strcmp (name, ".rel.dyn") != 0)
+ s->reloc_count = 0;
+ }
+ }
+ else if (CONST_STRNEQ (name, ".got"))
+ {
+ /* _bfd_score_elf_always_size_sections() has already done
+ most of the work, but some symbols may have been mapped
+ to versions that we must now resolve in the got_entries
+ hash tables. */
+ }
+ else if (strcmp (name, SCORE_ELF_STUB_SECTION_NAME) == 0)
+ {
+ /* IRIX rld assumes that the function stub isn't at the end
+ of .text section. So put a dummy. XXX */
+ s->size += SCORE_FUNCTION_STUB_SIZE;
+ }
+ else if (! CONST_STRNEQ (name, ".init"))
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
+
+ /* Allocate memory for the section contents. */
+ s->contents = bfd_zalloc (dynobj, s->size);
+ if (s->contents == NULL && s->size != 0)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return FALSE;
+ }
+ }
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in _bfd_score_elf_finish_dynamic_sections, but we
+ must add the entries now so that we get the correct size for
+ the .dynamic section. The DT_DEBUG entry is filled in by the
+ dynamic linker and used by the debugger. */
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
+ return FALSE;
+
+ if (reltext)
+ info->flags |= DF_TEXTREL;
+
+ if ((info->flags & DF_TEXTREL) != 0)
+ {
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0))
+ return FALSE;
+ }
+
+ if (! SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0))
+ return FALSE;
+
+ if (score_elf_rel_dyn_section (dynobj, FALSE))
+ {
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0))
+ return FALSE;
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0))
+ return FALSE;
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0))
+ return FALSE;
+ }
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_BASE_ADDRESS, 0))
+ return FALSE;
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_LOCAL_GOTNO, 0))
+ return FALSE;
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_SYMTABNO, 0))
+ return FALSE;
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_UNREFEXTNO, 0))
+ return FALSE;
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_GOTSYM, 0))
+ return FALSE;
+
+ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_HIPAGENO, 0))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
+{
+ struct elf_link_hash_entry *h;
+ struct bfd_link_hash_entry *bh;
+ flagword flags;
+ asection *s;
+
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY
+ | SEC_LINKER_CREATED | SEC_READONLY);
+
+ /* ABI requests the .dynamic section to be read only. */
+ s = bfd_get_section_by_name (abfd, ".dynamic");
+ if (s != NULL)
+ {
+ if (!bfd_set_section_flags (abfd, s, flags))
+ return FALSE;
+ }
+
+ /* We need to create .got section. */
+ if (!score_elf_create_got_section (abfd, info, FALSE))
+ return FALSE;
+
+ if (!score_elf_rel_dyn_section (elf_hash_table (info)->dynobj, TRUE))
+ return FALSE;
+
+ /* Create .stub section. */
+ if (bfd_get_section_by_name (abfd, SCORE_ELF_STUB_SECTION_NAME) == NULL)
+ {
+ s = bfd_make_section_with_flags (abfd, SCORE_ELF_STUB_SECTION_NAME,
+ flags | SEC_CODE);
+ if (s == NULL
+ || !bfd_set_section_alignment (abfd, s, 2))
+
+ return FALSE;
+ }
+
+ if (!info->shared)
+ {
+ const char *name;
+
+ name = "_DYNAMIC_LINK";
+ bh = NULL;
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr,
+ (bfd_vma) 0, (const char *)NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh)))
+ return FALSE;
+
+ h = (struct elf_link_hash_entry *)bh;
+ h->non_elf = 0;
+ h->def_regular = 1;
+ h->type = STT_SECTION;
+
+ if (!bfd_elf_link_record_dynamic_symbol (info, h))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+static bfd_boolean
+_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd,
+ struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ bfd *dynobj;
+ asection *sgot;
+ struct score_got_info *g;
+ const char *name;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ if (h->plt.offset != MINUS_ONE)
+ {
+ asection *s;
+ bfd_byte stub[SCORE_FUNCTION_STUB_SIZE];
+
+ /* This symbol has a stub. Set it up. */
+ BFD_ASSERT (h->dynindx != -1);
+
+ s = bfd_get_section_by_name (dynobj, SCORE_ELF_STUB_SECTION_NAME);
+ BFD_ASSERT (s != NULL);
+
+ /* FIXME: Can h->dynindex be more than 64K? */
+ if (h->dynindx & 0xffff0000)
+ return FALSE;
+
+ /* Fill the stub. */
+ bfd_put_32 (output_bfd, STUB_LW, stub);
+ bfd_put_32 (output_bfd, STUB_MOVE, stub + 4);
+ bfd_put_32 (output_bfd, STUB_LI16 | (h->dynindx << 1), stub + 8);
+ bfd_put_32 (output_bfd, STUB_BRL, stub + 12);
+
+ BFD_ASSERT (h->plt.offset <= s->size);
+ memcpy (s->contents + h->plt.offset, stub, SCORE_FUNCTION_STUB_SIZE);
+
+ /* Mark the symbol as undefined. plt.offset != -1 occurs
+ only for the referenced symbol. */
+ sym->st_shndx = SHN_UNDEF;
+
+ /* The run-time linker uses the st_value field of the symbol
+ to reset the global offset table entry for this external
+ to its stub address when unlinking a shared object. */
+ sym->st_value = (s->output_section->vma + s->output_offset + h->plt.offset);
+ }
+
+ BFD_ASSERT (h->dynindx != -1 || h->forced_local);
+
+ sgot = score_elf_got_section (dynobj, FALSE);
+ BFD_ASSERT (sgot != NULL);
+ BFD_ASSERT (score_elf_section_data (sgot) != NULL);
+ g = score_elf_section_data (sgot)->u.got_info;
+ BFD_ASSERT (g != NULL);
+
+ /* Run through the global symbol table, creating GOT entries for all
+ the symbols that need them. */
+ if (g->global_gotsym != NULL && h->dynindx >= g->global_gotsym->dynindx)
+ {
+ bfd_vma offset;
+ bfd_vma value;
+
+ value = sym->st_value;
+ offset = score_elf_global_got_index (dynobj, h);
+ bfd_put_32 (output_bfd, value, sgot->contents + offset);
+ }
+
+ /* Mark _DYNAMIC and _GLOBAL_OFFSET_TABLE_ as absolute. */
+ name = h->root.root.string;
+ if (strcmp (name, "_DYNAMIC") == 0 || strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
+ sym->st_shndx = SHN_ABS;
+ else if (strcmp (name, "_DYNAMIC_LINK") == 0)
+ {
+ sym->st_shndx = SHN_ABS;
+ sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
+ sym->st_value = 1;
+ }
+ else if (strcmp (name, GP_DISP_LABEL) == 0)
+ {
+ sym->st_shndx = SHN_ABS;
+ sym->st_info = ELF_ST_INFO (STB_GLOBAL, STT_SECTION);
+ sym->st_value = elf_gp (output_bfd);
+ }
+
+ return TRUE;
+}
+
+/* Finish up the dynamic sections. */
+
+static bfd_boolean
+_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd,
+ struct bfd_link_info *info)
+{
+ bfd *dynobj;
+ asection *sdyn;
+ asection *sgot;
+ asection *s;
+ struct score_got_info *g;
+
+ dynobj = elf_hash_table (info)->dynobj;
+
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ sgot = score_elf_got_section (dynobj, FALSE);
+ if (sgot == NULL)
+ g = NULL;
+ else
+ {
+ BFD_ASSERT (score_elf_section_data (sgot) != NULL);
+ g = score_elf_section_data (sgot)->u.got_info;
+ BFD_ASSERT (g != NULL);
+ }
+
+ if (elf_hash_table (info)->dynamic_sections_created)
+ {
+ bfd_byte *b;
+
+ BFD_ASSERT (sdyn != NULL);
+ BFD_ASSERT (g != NULL);
+
+ for (b = sdyn->contents;
+ b < sdyn->contents + sdyn->size;
+ b += SCORE_ELF_DYN_SIZE (dynobj))
+ {
+ Elf_Internal_Dyn dyn;
+ const char *name;
+ size_t elemsize;
+ bfd_boolean swap_out_p;
+
+ /* Read in the current dynamic entry. */
+ (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn);
+
+ /* Assume that we're going to modify it and write it out. */
+ swap_out_p = TRUE;
+
+ switch (dyn.d_tag)
+ {
+ case DT_RELENT:
+ s = score_elf_rel_dyn_section (dynobj, FALSE);
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_val = SCORE_ELF_REL_SIZE (dynobj);
+ break;
+
+ case DT_STRSZ:
+ /* Rewrite DT_STRSZ. */
+ dyn.d_un.d_val = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
+ break;
+
+ case DT_PLTGOT:
+ name = ".got";
+ s = bfd_get_section_by_name (output_bfd, name);
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_ptr = s->vma;
+ break;
+
+ case DT_SCORE_BASE_ADDRESS:
+ s = output_bfd->sections;
+ BFD_ASSERT (s != NULL);
+ dyn.d_un.d_ptr = s->vma & ~(bfd_vma) 0xffff;
+ break;
+
+ case DT_SCORE_LOCAL_GOTNO:
+ dyn.d_un.d_val = g->local_gotno;
+ break;
+
+ case DT_SCORE_UNREFEXTNO:
+ /* The index into the dynamic symbol table which is the
+ entry of the first external symbol that is not
+ referenced within the same object. */
+ dyn.d_un.d_val = bfd_count_sections (output_bfd) + 1;
+ break;
+
+ case DT_SCORE_GOTSYM:
+ if (g->global_gotsym)
+ {
+ dyn.d_un.d_val = g->global_gotsym->dynindx;
+ break;
+ }
+ /* In case if we don't have global got symbols we default
+ to setting DT_SCORE_GOTSYM to the same value as
+ DT_SCORE_SYMTABNO, so we just fall through. */
+
+ case DT_SCORE_SYMTABNO:
+ name = ".dynsym";
+ elemsize = SCORE_ELF_SYM_SIZE (output_bfd);
+ s = bfd_get_section_by_name (output_bfd, name);
+ BFD_ASSERT (s != NULL);
+
+ dyn.d_un.d_val = s->size / elemsize;
+ break;
+
+ case DT_SCORE_HIPAGENO:
+ dyn.d_un.d_val = g->local_gotno - SCORE_RESERVED_GOTNO;
+ break;
+
+ default:
+ swap_out_p = FALSE;
+ break;
+ }
+
+ if (swap_out_p)
+ (*get_elf_backend_data (dynobj)->s->swap_dyn_out) (dynobj, &dyn, b);
+ }
+ }
+
+ /* The first entry of the global offset table will be filled at
+ runtime. The second entry will be used by some runtime loaders.
+ This isn't the case of IRIX rld. */
+ if (sgot != NULL && sgot->size > 0)
+ {
+ bfd_put_32 (output_bfd, 0, sgot->contents);
+ bfd_put_32 (output_bfd, 0x80000000, sgot->contents + SCORE_ELF_GOT_SIZE (output_bfd));
+ }
+
+ if (sgot != NULL)
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize
+ = SCORE_ELF_GOT_SIZE (output_bfd);
+
+
+ /* We need to sort the entries of the dynamic relocation section. */
+ s = score_elf_rel_dyn_section (dynobj, FALSE);
+
+ if (s != NULL && s->size > (bfd_vma)2 * SCORE_ELF_REL_SIZE (output_bfd))
+ {
+ reldyn_sorting_bfd = output_bfd;
+ qsort ((Elf32_External_Rel *) s->contents + 1, s->reloc_count - 1,
+ sizeof (Elf32_External_Rel), score_elf_sort_dynamic_relocs);
+ }
+
+ return TRUE;
+}
+
+/* This function set up the ELF section header for a BFD section in preparation for writing
+ it out. This is where the flags and type fields are set for unusual sections. */
+
+static bfd_boolean
+_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr *hdr,
+ asection *sec)
+{
+ const char *name;
+
+ name = bfd_get_section_name (abfd, sec);
+
+ if (strcmp (name, ".got") == 0
+ || strcmp (name, ".srdata") == 0
+ || strcmp (name, ".sdata") == 0
+ || strcmp (name, ".sbss") == 0)
+ hdr->sh_flags |= SHF_SCORE_GPREL;
+
+ return TRUE;
+}
+
+/* This function do additional processing on the ELF section header before writing
+ it out. This is used to set the flags and type fields for some sections. */
+
+/* assign_file_positions_except_relocs() check section flag and if it is allocatable,
+ warning message will be issued. backend_fake_section is called before
+ assign_file_positions_except_relocs(); backend_section_processing after it. so, we
+ modify section flag there, but not backend_fake_section. */
+
+static bfd_boolean
+_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr)
+{
+ if (hdr->bfd_section != NULL)
+ {
+ const char *name = bfd_get_section_name (abfd, hdr->bfd_section);
+
+ if (strcmp (name, ".sdata") == 0)
+ {
+ hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL;
+ hdr->sh_type = SHT_PROGBITS;
+ }
+ else if (strcmp (name, ".sbss") == 0)
+ {
+ hdr->sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL;
+ hdr->sh_type = SHT_NOBITS;
+ }
+ else if (strcmp (name, ".srdata") == 0)
+ {
+ hdr->sh_flags |= SHF_ALLOC | SHF_SCORE_GPREL;
+ hdr->sh_type = SHT_PROGBITS;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+_bfd_score_elf_write_section (bfd *output_bfd,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ asection *sec, bfd_byte *contents)
+{
+ bfd_byte *to, *from, *end;
+ int i;
+
+ if (strcmp (sec->name, ".pdr") != 0)
+ return FALSE;
+
+ if (score_elf_section_data (sec)->u.tdata == NULL)
+ return FALSE;
+
+ to = contents;
+ end = contents + sec->size;
+ for (from = contents, i = 0; from < end; from += PDR_SIZE, i++)
+ {
+ if ((score_elf_section_data (sec)->u.tdata)[i] == 1)
+ continue;
+
+ if (to != from)
+ memcpy (to, from, PDR_SIZE);
+
+ to += PDR_SIZE;
+ }
+ bfd_set_section_contents (output_bfd, sec->output_section, contents,
+ (file_ptr) sec->output_offset, sec->size);
+
+ return TRUE;
+}
+
+/* Copy data from a SCORE ELF indirect symbol to its direct symbol, hiding the old
+ indirect symbol. Process additional relocation information. */
+
+static void
+_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *dir,
+ struct elf_link_hash_entry *ind)
+{
+ struct score_elf_link_hash_entry *dirscore, *indscore;
+
+ _bfd_elf_link_hash_copy_indirect (info, dir, ind);
+
+ if (ind->root.type != bfd_link_hash_indirect)
+ return;
+
+ dirscore = (struct score_elf_link_hash_entry *) dir;
+ indscore = (struct score_elf_link_hash_entry *) ind;
+ dirscore->possibly_dynamic_relocs += indscore->possibly_dynamic_relocs;
+
+ if (indscore->readonly_reloc)
+ dirscore->readonly_reloc = TRUE;
+
+ if (indscore->no_fn_stub)
+ dirscore->no_fn_stub = TRUE;
+}
+
+/* Remove information about discarded functions from other sections which mention them. */
+
+static bfd_boolean
+_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie,
+ struct bfd_link_info *info)
+{
+ asection *o;
+ bfd_boolean ret = FALSE;
+ unsigned char *tdata;
+ size_t i, skip;
+
+ o = bfd_get_section_by_name (abfd, ".pdr");
+ if ((!o) || (o->size == 0) || (o->size % PDR_SIZE != 0)
+ || (o->output_section != NULL && bfd_is_abs_section (o->output_section)))
+ return FALSE;
+
+ tdata = bfd_zmalloc (o->size / PDR_SIZE);
+ if (!tdata)
+ return FALSE;
+
+ cookie->rels = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory);
+ if (!cookie->rels)
+ {
+ free (tdata);
+ return FALSE;
+ }
+
+ cookie->rel = cookie->rels;
+ cookie->relend = cookie->rels + o->reloc_count;
+
+ for (i = 0, skip = 0; i < o->size; i++)
+ {
+ if (bfd_elf_reloc_symbol_deleted_p (i * PDR_SIZE, cookie))
+ {
+ tdata[i] = 1;
+ skip++;
+ }
+ }
+
+ if (skip != 0)
+ {
+ score_elf_section_data (o)->u.tdata = tdata;
+ o->size -= skip * PDR_SIZE;
+ ret = TRUE;
+ }
+ else
+ free (tdata);
+
+ if (!info->keep_memory)
+ free (cookie->rels);
+
+ return ret;
+}
+
+/* Signal that discard_info() has removed the discarded relocations for this section. */
+
+static bfd_boolean
+_bfd_score_elf_ignore_discarded_relocs (asection *sec)
+{
+ if (strcmp (sec->name, ".pdr") == 0)
+ return TRUE;
+ return FALSE;
+}
+
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+_bfd_score_elf_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h != NULL)
+ switch (ELF32_R_TYPE (rel->r_info))
+ {
+ case R_SCORE_GNU_VTINHERIT:
+ case R_SCORE_GNU_VTENTRY:
+ return NULL;
+ }
+
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
+}
+
+/* Support for core dump NOTE sections. */
+
+static bfd_boolean
+_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note)
+{
+ int offset;
+ unsigned int raw_size;
+
+ switch (note->descsz)
+ {
+ default:
+ return FALSE;
+
+ case 148: /* Linux/Score 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 bfd_boolean
+_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
+{
+ switch (note->descsz)
+ {
+ default:
+ return FALSE;
+
+ case 124: /* Linux/Score 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;
+}
+
+
+/* Score BFD functions. */
+
+static reloc_howto_type *
+elf32_score_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_real_type code)
+{
+ unsigned int i;
+
+ for (i = 0; i < NUM_ELEM (elf32_score_reloc_map); i++)
+ if (elf32_score_reloc_map[i].bfd_reloc_val == code)
+ return &elf32_score_howto_table[elf32_score_reloc_map[i].elf_reloc_val];
+
+ return NULL;
+}
+
+static reloc_howto_type *
+elf32_score_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (elf32_score_howto_table)
+ / sizeof (elf32_score_howto_table[0]));
+ i++)
+ if (elf32_score_howto_table[i].name != NULL
+ && strcasecmp (elf32_score_howto_table[i].name, r_name) == 0)
+ return &elf32_score_howto_table[i];
+
+ return NULL;
+}
+
+/* Create a score elf linker hash table. */
+
+static struct bfd_link_hash_table *
+elf32_score_link_hash_table_create (bfd *abfd)
+{
+ struct score_elf_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct score_elf_link_hash_table);
+
+ ret = bfd_malloc (amt);
+ if (ret == NULL)
+ return NULL;
+
+ if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, score_elf_link_hash_newfunc,
+ sizeof (struct score_elf_link_hash_entry)))
+ {
+ free (ret);
+ return NULL;
+ }
+
+ return &ret->root.root;
+}
+
+static bfd_boolean
+elf32_score_print_private_bfd_data (bfd *abfd, void * ptr)
+{
+ FILE *file = (FILE *) ptr;
+
+ BFD_ASSERT (abfd != NULL && ptr != NULL);
+
+ /* Print normal ELF private data. */
+ _bfd_elf_print_private_bfd_data (abfd, ptr);
+
+ /* xgettext:c-format */
+ fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
+ if (elf_elfheader (abfd)->e_flags & EF_SCORE_PIC)
+ {
+ fprintf (file, _(" [pic]"));
+ }
+ if (elf_elfheader (abfd)->e_flags & EF_SCORE_FIXDEP)
+ {
+ fprintf (file, _(" [fix dep]"));
+ }
+ fputc ('\n', file);
+
+ return TRUE;
+}
+
+static bfd_boolean
+elf32_score_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
+{
+ flagword in_flags;
+ flagword out_flags;
+
+ if (!_bfd_generic_verify_endian_match (ibfd, obfd))
+ return FALSE;
+
+ in_flags = elf_elfheader (ibfd)->e_flags;
+ out_flags = elf_elfheader (obfd)->e_flags;
+
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
+ || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
+ return TRUE;
+
+ in_flags = elf_elfheader (ibfd)->e_flags;
+ out_flags = elf_elfheader (obfd)->e_flags;
+
+ if (! elf_flags_init (obfd))
+ {
+ elf_flags_init (obfd) = TRUE;
+ elf_elfheader (obfd)->e_flags = in_flags;
+
+ if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
+ && bfd_get_arch_info (obfd)->the_default)
+ {
+ return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd));
+ }
+
+ return TRUE;
+ }
+
+ if (((in_flags & EF_SCORE_PIC) != 0) != ((out_flags & EF_SCORE_PIC) != 0))
+ {
+ (*_bfd_error_handler) (_("%B: warning: linking PIC files with non-PIC files"), ibfd);
+ }
+
+ /* FIXME: Maybe dependency fix compatibility should be checked here. */
+
+ return TRUE;
+}
+
+static bfd_boolean
+elf32_score_new_section_hook (bfd *abfd, asection *sec)
+{
+ struct _score_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
+
+ sdata = bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = sdata;
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
+
+
+#define USE_REL 1
+#define TARGET_LITTLE_SYM bfd_elf32_littlescore_vec
+#define TARGET_LITTLE_NAME "elf32-littlescore"
+#define TARGET_BIG_SYM bfd_elf32_bigscore_vec
+#define TARGET_BIG_NAME "elf32-bigscore"
+#define ELF_ARCH bfd_arch_score
+#define ELF_MACHINE_CODE EM_SCORE
+#define ELF_MAXPAGESIZE 0x8000
+
+#define elf_info_to_howto 0
+#define elf_info_to_howto_rel _bfd_score_info_to_howto
+#define elf_backend_relocate_section _bfd_score_elf_relocate_section
+#define elf_backend_check_relocs _bfd_score_elf_check_relocs
+#define elf_backend_add_symbol_hook _bfd_score_elf_add_symbol_hook
+#define elf_backend_symbol_processing _bfd_score_elf_symbol_processing
+#define elf_backend_link_output_symbol_hook \
+ _bfd_score_elf_link_output_symbol_hook
+#define elf_backend_section_from_bfd_section \
+ _bfd_score_elf_section_from_bfd_section
+#define elf_backend_adjust_dynamic_symbol \
+ _bfd_score_elf_adjust_dynamic_symbol
+#define elf_backend_always_size_sections \
+ _bfd_score_elf_always_size_sections
+#define elf_backend_size_dynamic_sections \
+ _bfd_score_elf_size_dynamic_sections
+#define elf_backend_omit_section_dynsym \
+ ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
+#define elf_backend_create_dynamic_sections \
+ _bfd_score_elf_create_dynamic_sections
+#define elf_backend_finish_dynamic_symbol \
+ _bfd_score_elf_finish_dynamic_symbol
+#define elf_backend_finish_dynamic_sections \
+ _bfd_score_elf_finish_dynamic_sections
+#define elf_backend_fake_sections _bfd_score_elf_fake_sections
+#define elf_backend_section_processing _bfd_score_elf_section_processing
+#define elf_backend_write_section _bfd_score_elf_write_section
+#define elf_backend_copy_indirect_symbol _bfd_score_elf_copy_indirect_symbol
+#define elf_backend_hide_symbol _bfd_score_elf_hide_symbol
+#define elf_backend_discard_info _bfd_score_elf_discard_info
+#define elf_backend_ignore_discarded_relocs \
+ _bfd_score_elf_ignore_discarded_relocs
+#define elf_backend_gc_mark_hook _bfd_score_elf_gc_mark_hook
+#define elf_backend_grok_prstatus _bfd_score_elf_grok_prstatus
+#define elf_backend_grok_psinfo _bfd_score_elf_grok_psinfo
+#define elf_backend_can_gc_sections 1
+#define elf_backend_want_plt_sym 0
+#define elf_backend_got_header_size (4 * SCORE_RESERVED_GOTNO)
+#define elf_backend_plt_header_size 0
+#define elf_backend_collect TRUE
+#define elf_backend_type_change_ok TRUE
+
+#define bfd_elf32_bfd_reloc_type_lookup elf32_score_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup \
+ elf32_score_reloc_name_lookup
+#define bfd_elf32_bfd_link_hash_table_create elf32_score_link_hash_table_create
+#define bfd_elf32_bfd_print_private_bfd_data elf32_score_print_private_bfd_data
+#define bfd_elf32_bfd_merge_private_bfd_data elf32_score_merge_private_bfd_data
+#define bfd_elf32_new_section_hook elf32_score_new_section_hook
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-sh-relocs.h b/contrib/binutils/bfd/elf32-sh-relocs.h
new file mode 100644
index 0000000..3488ef4
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-sh-relocs.h
@@ -0,0 +1,1716 @@
+ /* No relocation. */
+ HOWTO (R_SH_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 */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_NONE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 32 bit absolute relocation. Setting partial_inplace to TRUE and
+ src_mask to a non-zero value is similar to the COFF toolchain. */
+ HOWTO (R_SH_DIR32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ SH_ELF_RELOC, /* special_function */
+ "R_SH_DIR32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* 32 bit PC relative relocation. */
+ HOWTO (R_SH_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_REL32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit PC relative branch divided by 2. */
+ HOWTO (R_SH_DIR8WPN, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_DIR8WPN", /* name */
+ TRUE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 12 bit PC relative branch divided by 2. */
+ /* This cannot be partial_inplace because relaxation can't know the
+ eventual value of a symbol. */
+ HOWTO (R_SH_IND12W, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ NULL, /* special_function */
+ "R_SH_IND12W", /* name */
+ FALSE, /* partial_inplace */
+ 0x0, /* src_mask */
+ 0xfff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit unsigned PC relative divided by 4. */
+ HOWTO (R_SH_DIR8WPL, /* type */
+ 2, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_DIR8WPL", /* name */
+ TRUE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit unsigned PC relative divided by 2. */
+ HOWTO (R_SH_DIR8WPZ, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_DIR8WPZ", /* name */
+ TRUE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit GBR relative. FIXME: This only makes sense if we have some
+ special symbol for the GBR relative area, and that is not
+ implemented. */
+ HOWTO (R_SH_DIR8BP, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_DIR8BP", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit GBR relative divided by 2. FIXME: This only makes sense if
+ we have some special symbol for the GBR relative area, and that
+ is not implemented. */
+ HOWTO (R_SH_DIR8W, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_DIR8W", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit GBR relative divided by 4. FIXME: This only makes sense if
+ we have some special symbol for the GBR relative area, and that
+ is not implemented. */
+ HOWTO (R_SH_DIR8L, /* type */
+ 2, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_DIR8L", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit PC relative divided by 2 - but specified in a very odd way. */
+ HOWTO (R_SH_LOOP_START, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_LOOP_START", /* name */
+ TRUE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* 8 bit PC relative divided by 2 - but specified in a very odd way. */
+ HOWTO (R_SH_LOOP_END, /* type */
+ 1, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_LOOP_END", /* name */
+ TRUE, /* partial_inplace */
+ 0xff, /* src_mask */
+ 0xff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ EMPTY_HOWTO (12),
+ EMPTY_HOWTO (13),
+ EMPTY_HOWTO (14),
+ EMPTY_HOWTO (15),
+ EMPTY_HOWTO (16),
+ EMPTY_HOWTO (17),
+ EMPTY_HOWTO (18),
+ EMPTY_HOWTO (19),
+ EMPTY_HOWTO (20),
+ EMPTY_HOWTO (21),
+
+ /* The remaining relocs are a GNU extension used for relaxing. The
+ final pass of the linker never needs to do anything with any of
+ these relocs. Any required operations are handled by the
+ relaxation code. */
+
+ /* GNU extension to record C++ vtable hierarchy */
+ HOWTO (R_SH_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_SH_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_SH_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_SH_GNU_VTENTRY", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* An 8 bit switch table entry. This is generated for an expression
+ such as ``.word L1 - L2''. The offset holds the difference
+ between the reloc address and L2. */
+ HOWTO (R_SH_SWITCH8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_SWITCH8", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* A 16 bit switch table entry. This is generated for an expression
+ such as ``.word L1 - L2''. The offset holds the difference
+ between the reloc address and L2. */
+ HOWTO (R_SH_SWITCH16, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_SWITCH16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* A 32 bit switch table entry. This is generated for an expression
+ such as ``.long L1 - L2''. The offset holds the difference
+ between the reloc address and L2. */
+ HOWTO (R_SH_SWITCH32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_SWITCH32", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Indicates a .uses pseudo-op. The compiler will generate .uses
+ pseudo-ops when it finds a function call which can be relaxed.
+ The offset field holds the PC relative offset to the instruction
+ which loads the register used in the function call. */
+ HOWTO (R_SH_USES, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_USES", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* The assembler will generate this reloc for addresses referred to
+ by the register loads associated with USES relocs. The offset
+ field holds the number of times the address is referenced in the
+ object file. */
+ HOWTO (R_SH_COUNT, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_COUNT", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Indicates an alignment statement. The offset field is the power
+ of 2 to which subsequent portions of the object file must be
+ aligned. */
+ HOWTO (R_SH_ALIGN, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_ALIGN", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* The assembler will generate this reloc before a block of
+ instructions. A section should be processed as assuming it
+ contains data, unless this reloc is seen. */
+ HOWTO (R_SH_CODE, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_CODE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* The assembler will generate this reloc after a block of
+ instructions when it sees data that is not instructions. */
+ HOWTO (R_SH_DATA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_DATA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* The assembler generates this reloc for each label within a block
+ of instructions. This permits the linker to avoid swapping
+ instructions which are the targets of branches. */
+ HOWTO (R_SH_LABEL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_LABEL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* The next 12 are only supported via linking in SHC-generated objects. */
+ HOWTO (R_SH_DIR16, /* 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_SH_DIR16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR8, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR8UL, /* type */
+ 2, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8UL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR8UW, /* type */
+ 1, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8UW", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR8U, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8U", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR8SW, /* type */
+ 1, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8SW", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR8S, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 8, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR8S", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR4UL, /* type */
+ 2, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR4UL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR4UW, /* type */
+ 1, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR4UW", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_DIR4U, /* type */
+ 0, /* rightshift */
+ 0, /* size (0 = byte, 1 = short, 2 = long) */
+ 4, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR4U", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_PSHA, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 7, /* bitsize */
+ FALSE, /* pc_relative */
+ 4, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PSHA", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_PSHL, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 7, /* bitsize */
+ FALSE, /* pc_relative */
+ 4, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PSHL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x0f, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+#ifdef INCLUDE_SHMEDIA
+ /* Used in SHLLI.L and SHLRI.L. */
+ HOWTO (R_SH_DIR5U, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 5, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR5U", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in SHARI, SHLLI et al. */
+ HOWTO (R_SH_DIR6U, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 6, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR6U", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in BxxI, LDHI.L et al. */
+ HOWTO (R_SH_DIR6S, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 6, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR6S", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in ADDI, ANDI et al. */
+ HOWTO (R_SH_DIR10S, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 10, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR10S", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in LD.UW, ST.W et al. */
+ HOWTO (R_SH_DIR10SW, /* type */
+ 1, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 11, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR10SW", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in LD.L, FLD.S et al. */
+ HOWTO (R_SH_DIR10SL, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR10SL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in FLD.D, FST.P et al. */
+ HOWTO (R_SH_DIR10SQ, /* type */
+ 3, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 13, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_DIR10SQ", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+#else
+ EMPTY_HOWTO (45),
+ EMPTY_HOWTO (46),
+ EMPTY_HOWTO (47),
+ EMPTY_HOWTO (48),
+ EMPTY_HOWTO (49),
+ EMPTY_HOWTO (50),
+ EMPTY_HOWTO (51),
+#endif
+
+ EMPTY_HOWTO (52),
+
+ HOWTO (R_SH_DIR16S, /* 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_SH_DIR16S", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (54),
+ EMPTY_HOWTO (55),
+ EMPTY_HOWTO (56),
+ EMPTY_HOWTO (57),
+ EMPTY_HOWTO (58),
+ EMPTY_HOWTO (59),
+ EMPTY_HOWTO (60),
+ EMPTY_HOWTO (61),
+ EMPTY_HOWTO (62),
+ EMPTY_HOWTO (63),
+ EMPTY_HOWTO (64),
+ EMPTY_HOWTO (65),
+ EMPTY_HOWTO (66),
+ EMPTY_HOWTO (67),
+ EMPTY_HOWTO (68),
+ EMPTY_HOWTO (69),
+ EMPTY_HOWTO (70),
+ EMPTY_HOWTO (71),
+ EMPTY_HOWTO (72),
+ EMPTY_HOWTO (73),
+ EMPTY_HOWTO (74),
+ EMPTY_HOWTO (75),
+ EMPTY_HOWTO (76),
+ EMPTY_HOWTO (77),
+ EMPTY_HOWTO (78),
+ EMPTY_HOWTO (79),
+ EMPTY_HOWTO (80),
+ EMPTY_HOWTO (81),
+ EMPTY_HOWTO (82),
+ EMPTY_HOWTO (83),
+ EMPTY_HOWTO (84),
+ EMPTY_HOWTO (85),
+ EMPTY_HOWTO (86),
+ EMPTY_HOWTO (87),
+ EMPTY_HOWTO (88),
+ EMPTY_HOWTO (89),
+ EMPTY_HOWTO (90),
+ EMPTY_HOWTO (91),
+ EMPTY_HOWTO (92),
+ EMPTY_HOWTO (93),
+ EMPTY_HOWTO (94),
+ EMPTY_HOWTO (95),
+ EMPTY_HOWTO (96),
+ EMPTY_HOWTO (97),
+ EMPTY_HOWTO (98),
+ EMPTY_HOWTO (99),
+ EMPTY_HOWTO (100),
+ EMPTY_HOWTO (101),
+ EMPTY_HOWTO (102),
+ EMPTY_HOWTO (103),
+ EMPTY_HOWTO (104),
+ EMPTY_HOWTO (105),
+ EMPTY_HOWTO (106),
+ EMPTY_HOWTO (107),
+ EMPTY_HOWTO (108),
+ EMPTY_HOWTO (109),
+ EMPTY_HOWTO (110),
+ EMPTY_HOWTO (111),
+ EMPTY_HOWTO (112),
+ EMPTY_HOWTO (113),
+ EMPTY_HOWTO (114),
+ EMPTY_HOWTO (115),
+ EMPTY_HOWTO (116),
+ EMPTY_HOWTO (117),
+ EMPTY_HOWTO (118),
+ EMPTY_HOWTO (119),
+ EMPTY_HOWTO (120),
+ EMPTY_HOWTO (121),
+ EMPTY_HOWTO (122),
+ EMPTY_HOWTO (123),
+ EMPTY_HOWTO (124),
+ EMPTY_HOWTO (125),
+ EMPTY_HOWTO (126),
+ EMPTY_HOWTO (127),
+ EMPTY_HOWTO (128),
+ EMPTY_HOWTO (129),
+ EMPTY_HOWTO (130),
+ EMPTY_HOWTO (131),
+ EMPTY_HOWTO (132),
+ EMPTY_HOWTO (133),
+ EMPTY_HOWTO (134),
+ EMPTY_HOWTO (135),
+ EMPTY_HOWTO (136),
+ EMPTY_HOWTO (137),
+ EMPTY_HOWTO (138),
+ EMPTY_HOWTO (139),
+ EMPTY_HOWTO (140),
+ EMPTY_HOWTO (141),
+ EMPTY_HOWTO (142),
+ EMPTY_HOWTO (143),
+
+ HOWTO (R_SH_TLS_GD_32, /* 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, /* */
+ "R_SH_TLS_GD_32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_LD_32, /* 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, /* */
+ "R_SH_TLS_LD_32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_LDO_32, /* 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, /* */
+ "R_SH_TLS_LDO_32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_IE_32, /* 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, /* */
+ "R_SH_TLS_IE_32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_LE_32, /* 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, /* */
+ "R_SH_TLS_LE_32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_DTPMOD32, /* 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, /* */
+ "R_SH_TLS_DTPMOD32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_DTPOFF32, /* 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, /* */
+ "R_SH_TLS_DTPOFF32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_TLS_TPOFF32, /* 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, /* */
+ "R_SH_TLS_TPOFF32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (152),
+ EMPTY_HOWTO (153),
+ EMPTY_HOWTO (154),
+ EMPTY_HOWTO (155),
+ EMPTY_HOWTO (156),
+ EMPTY_HOWTO (157),
+ EMPTY_HOWTO (158),
+ EMPTY_HOWTO (159),
+
+ HOWTO (R_SH_GOT32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_GOT32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_PLT32, /* 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, /* */
+ "R_SH_PLT32", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_SH_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, /* */
+ "R_SH_COPY", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_GLOB_DAT", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_JMP_SLOT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_JMP_SLOT", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_RELATIVE, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_RELATIVE", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_GOTOFF, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_GOTOFF", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_GOTPC, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ TRUE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* */
+ "R_SH_GOTPC", /* name */
+ SH_PARTIAL32, /* partial_inplace */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ HOWTO (R_SH_GOTPLT32, /* 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, /* */
+ "R_SH_GOTPLT32", /* name */
+ FALSE, /* partial_inplace */
+ /* ??? Why not 0? */
+ SH_SRC_MASK32, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+#ifdef INCLUDE_SHMEDIA
+ /* Used in MOVI and SHORI (x & 65536). */
+ HOWTO (R_SH_GOT_LOW16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOT_LOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 16) & 65536). */
+ HOWTO (R_SH_GOT_MEDLOW16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOT_MEDLOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 32) & 65536). */
+ HOWTO (R_SH_GOT_MEDHI16, /* type */
+ 32, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOT_MEDHI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 48) & 65536). */
+ HOWTO (R_SH_GOT_HI16, /* type */
+ 48, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOT_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI (x & 65536). */
+ HOWTO (R_SH_GOTPLT_LOW16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPLT_LOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 16) & 65536). */
+ HOWTO (R_SH_GOTPLT_MEDLOW16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPLT_MEDLOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 32) & 65536). */
+ HOWTO (R_SH_GOTPLT_MEDHI16, /* type */
+ 32, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPLT_MEDHI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 48) & 65536). */
+ HOWTO (R_SH_GOTPLT_HI16, /* type */
+ 48, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPLT_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI (x & 65536). */
+ HOWTO (R_SH_PLT_LOW16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PLT_LOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 16) & 65536). */
+ HOWTO (R_SH_PLT_MEDLOW16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PLT_MEDLOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 32) & 65536). */
+ HOWTO (R_SH_PLT_MEDHI16, /* type */
+ 32, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PLT_MEDHI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 48) & 65536). */
+ HOWTO (R_SH_PLT_HI16, /* type */
+ 48, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PLT_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI (x & 65536). */
+ HOWTO (R_SH_GOTOFF_LOW16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTOFF_LOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 16) & 65536). */
+ HOWTO (R_SH_GOTOFF_MEDLOW16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTOFF_MEDLOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 32) & 65536). */
+ HOWTO (R_SH_GOTOFF_MEDHI16, /* type */
+ 32, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTOFF_MEDHI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 48) & 65536). */
+ HOWTO (R_SH_GOTOFF_HI16, /* type */
+ 48, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTOFF_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI (x & 65536). */
+ HOWTO (R_SH_GOTPC_LOW16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPC_LOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 16) & 65536). */
+ HOWTO (R_SH_GOTPC_MEDLOW16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPC_MEDLOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 32) & 65536). */
+ HOWTO (R_SH_GOTPC_MEDHI16, /* type */
+ 32, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPC_MEDHI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 48) & 65536). */
+ HOWTO (R_SH_GOTPC_HI16, /* type */
+ 48, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPC_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in LD.L, FLD.S et al. */
+ HOWTO (R_SH_GOT10BY4, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOT10BY4", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in LD.L, FLD.S et al. */
+ HOWTO (R_SH_GOTPLT10BY4, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 12, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPLT10BY4", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in FLD.D, FST.P et al. */
+ HOWTO (R_SH_GOT10BY8, /* type */
+ 3, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 13, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOT10BY8", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in FLD.D, FST.P et al. */
+ HOWTO (R_SH_GOTPLT10BY8, /* type */
+ 3, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 13, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GOTPLT10BY8", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_COPY64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_COPY64", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ((bfd_vma) 0) - 1, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_GLOB_DAT64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_GLOB_DAT64", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ((bfd_vma) 0) - 1, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_JMP_SLOT64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_JMP_SLOT64", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ((bfd_vma) 0) - 1, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ HOWTO (R_SH_RELATIVE64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_RELATIVE64", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ((bfd_vma) 0) - 1, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ EMPTY_HOWTO (197),
+ EMPTY_HOWTO (198),
+ EMPTY_HOWTO (199),
+ EMPTY_HOWTO (200),
+ EMPTY_HOWTO (201),
+ EMPTY_HOWTO (202),
+ EMPTY_HOWTO (203),
+ EMPTY_HOWTO (204),
+ EMPTY_HOWTO (205),
+ EMPTY_HOWTO (206),
+ EMPTY_HOWTO (207),
+ EMPTY_HOWTO (208),
+ EMPTY_HOWTO (209),
+ EMPTY_HOWTO (210),
+ EMPTY_HOWTO (211),
+ EMPTY_HOWTO (212),
+ EMPTY_HOWTO (213),
+ EMPTY_HOWTO (214),
+ EMPTY_HOWTO (215),
+ EMPTY_HOWTO (216),
+ EMPTY_HOWTO (217),
+ EMPTY_HOWTO (218),
+ EMPTY_HOWTO (219),
+ EMPTY_HOWTO (220),
+ EMPTY_HOWTO (221),
+ EMPTY_HOWTO (222),
+ EMPTY_HOWTO (223),
+ EMPTY_HOWTO (224),
+ EMPTY_HOWTO (225),
+ EMPTY_HOWTO (226),
+ EMPTY_HOWTO (227),
+ EMPTY_HOWTO (228),
+ EMPTY_HOWTO (229),
+ EMPTY_HOWTO (230),
+ EMPTY_HOWTO (231),
+ EMPTY_HOWTO (232),
+ EMPTY_HOWTO (233),
+ EMPTY_HOWTO (234),
+ EMPTY_HOWTO (235),
+ EMPTY_HOWTO (236),
+ EMPTY_HOWTO (237),
+ EMPTY_HOWTO (238),
+ EMPTY_HOWTO (239),
+ EMPTY_HOWTO (240),
+ EMPTY_HOWTO (241),
+
+ /* Relocations for SHmedia code. None of these are partial_inplace or
+ use the field being relocated (except R_SH_PT_16). */
+
+ /* The assembler will generate this reloc before a block of SHmedia
+ instructions. A section should be processed as assuming it contains
+ data, unless this reloc is seen. Note that a block of SHcompact
+ instructions are instead preceded by R_SH_CODE.
+ This is currently not implemented, but should be used for SHmedia
+ linker relaxation. */
+ HOWTO (R_SH_SHMEDIA_CODE, /* type */
+ 0, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 0, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ sh_elf_ignore_reloc, /* special_function */
+ "R_SH_SHMEDIA_CODE", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* The assembler will generate this reloc at a PTA or PTB instruction,
+ and the linker checks the right type of target, or changes a PTA to a
+ PTB, if the original insn was PT. */
+ HOWTO (R_SH_PT_16, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 18, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_PT_16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in unexpanded MOVI. */
+ HOWTO (R_SH_IMMS16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMMS16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in SHORI. */
+ HOWTO (R_SH_IMMU16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_unsigned, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMMU16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI (x & 65536). */
+ HOWTO (R_SH_IMM_LOW16, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMM_LOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x - $) & 65536). */
+ HOWTO (R_SH_IMM_LOW16_PCREL, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMM_LOW16_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 16) & 65536). */
+ HOWTO (R_SH_IMM_MEDLOW16, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMM_MEDLOW16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI (((x - $) >> 16) & 65536). */
+ HOWTO (R_SH_IMM_MEDLOW16_PCREL, /* type */
+ 16, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMM_MEDLOW16_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 32) & 65536). */
+ HOWTO (R_SH_IMM_MEDHI16, /* type */
+ 32, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMM_MEDHI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI (((x - $) >> 32) & 65536). */
+ HOWTO (R_SH_IMM_MEDHI16_PCREL, /* type */
+ 32, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMM_MEDHI16_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI ((x >> 48) & 65536). */
+ HOWTO (R_SH_IMM_HI16, /* type */
+ 48, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMM_HI16", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* Used in MOVI and SHORI (((x - $) >> 48) & 65536). */
+ HOWTO (R_SH_IMM_HI16_PCREL, /* type */
+ 48, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_IMM_HI16_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffc00, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+ /* For the .uaquad pseudo. */
+ HOWTO (R_SH_64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_64", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ((bfd_vma) 0) - 1, /* dst_mask */
+ FALSE), /* pcrel_offset */
+
+ /* For the .uaquad pseudo, (x - $). */
+ HOWTO (R_SH_64_PCREL, /* type */
+ 48, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ TRUE, /* pc_relative */
+ 10, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_SH_64_PCREL", /* name */
+ FALSE, /* partial_inplace */
+ 0, /* src_mask */
+ ((bfd_vma) 0) - 1, /* dst_mask */
+ TRUE), /* pcrel_offset */
+
+#endif
+#undef SH_PARTIAL32
+#undef SH_SRC_MASK32
+#undef SH_ELF_RELOC
diff --git a/contrib/binutils/bfd/elf32-sparc.c b/contrib/binutils/bfd/elf32-sparc.c
index 3bfb38a..f8a3bff 100644
--- a/contrib/binutils/bfd/elf32-sparc.c
+++ b/contrib/binutils/bfd/elf32-sparc.c
@@ -1,6 +1,6 @@
/* SPARC-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -172,6 +172,7 @@ elf32_sparc_reloc_type_class (const Elf_Internal_Rela *rela)
#define ELF_MACHINE_CODE EM_SPARC
#define ELF_MACHINE_ALT1 EM_SPARC32PLUS
#define ELF_MAXPAGESIZE 0x10000
+#define ELF_COMMONPAGESIZE 0x2000
#define bfd_elf32_bfd_merge_private_bfd_data \
elf32_sparc_merge_private_bfd_data
@@ -182,6 +183,8 @@ elf32_sparc_reloc_type_class (const Elf_Internal_Rela *rela)
#define elf_info_to_howto _bfd_sparc_elf_info_to_howto
#define bfd_elf32_bfd_reloc_type_lookup _bfd_sparc_elf_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup \
+ _bfd_sparc_elf_reloc_name_lookup
#define bfd_elf32_bfd_link_hash_table_create \
_bfd_sparc_elf_link_hash_table_create
#define bfd_elf32_bfd_relax_section _bfd_sparc_elf_relax_section
@@ -206,6 +209,7 @@ elf32_sparc_reloc_type_class (const Elf_Internal_Rela *rela)
#define elf_backend_gc_mark_hook _bfd_sparc_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook _bfd_sparc_elf_gc_sweep_hook
#define elf_backend_plt_sym_val _bfd_sparc_elf_plt_sym_val
+#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
diff --git a/contrib/binutils/bfd/elf32-spu.c b/contrib/binutils/bfd/elf32-spu.c
new file mode 100644
index 0000000..d652117
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-spu.c
@@ -0,0 +1,3154 @@
+/* SPU specific support for 32-bit ELF
+
+ Copyright 2006, 2007 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.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/spu.h"
+#include "elf32-spu.h"
+
+/* We use RELA style relocs. Don't define USE_REL. */
+
+static bfd_reloc_status_type spu_elf_rel9 (bfd *, arelent *, asymbol *,
+ void *, asection *,
+ bfd *, char **);
+
+/* Values of type 'enum elf_spu_reloc_type' are used to index this
+ array, so it must be declared in the order of that type. */
+
+static reloc_howto_type elf_howto_table[] = {
+ HOWTO (R_SPU_NONE, 0, 0, 0, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "SPU_NONE",
+ FALSE, 0, 0x00000000, FALSE),
+ HOWTO (R_SPU_ADDR10, 4, 2, 10, FALSE, 14, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "SPU_ADDR10",
+ FALSE, 0, 0x00ffc000, FALSE),
+ HOWTO (R_SPU_ADDR16, 2, 2, 16, FALSE, 7, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "SPU_ADDR16",
+ FALSE, 0, 0x007fff80, FALSE),
+ HOWTO (R_SPU_ADDR16_HI, 16, 2, 16, FALSE, 7, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "SPU_ADDR16_HI",
+ FALSE, 0, 0x007fff80, FALSE),
+ HOWTO (R_SPU_ADDR16_LO, 0, 2, 16, FALSE, 7, complain_overflow_dont,
+ bfd_elf_generic_reloc, "SPU_ADDR16_LO",
+ FALSE, 0, 0x007fff80, FALSE),
+ HOWTO (R_SPU_ADDR18, 0, 2, 18, FALSE, 7, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "SPU_ADDR18",
+ FALSE, 0, 0x01ffff80, FALSE),
+ HOWTO (R_SPU_ADDR32, 0, 2, 32, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "SPU_ADDR32",
+ FALSE, 0, 0xffffffff, FALSE),
+ HOWTO (R_SPU_REL16, 2, 2, 16, TRUE, 7, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "SPU_REL16",
+ FALSE, 0, 0x007fff80, TRUE),
+ HOWTO (R_SPU_ADDR7, 0, 2, 7, FALSE, 14, complain_overflow_dont,
+ bfd_elf_generic_reloc, "SPU_ADDR7",
+ FALSE, 0, 0x001fc000, FALSE),
+ HOWTO (R_SPU_REL9, 2, 2, 9, TRUE, 0, complain_overflow_signed,
+ spu_elf_rel9, "SPU_REL9",
+ FALSE, 0, 0x0180007f, TRUE),
+ HOWTO (R_SPU_REL9I, 2, 2, 9, TRUE, 0, complain_overflow_signed,
+ spu_elf_rel9, "SPU_REL9I",
+ FALSE, 0, 0x0000c07f, TRUE),
+ HOWTO (R_SPU_ADDR10I, 0, 2, 10, FALSE, 14, complain_overflow_signed,
+ bfd_elf_generic_reloc, "SPU_ADDR10I",
+ FALSE, 0, 0x00ffc000, FALSE),
+ HOWTO (R_SPU_ADDR16I, 0, 2, 16, FALSE, 7, complain_overflow_signed,
+ bfd_elf_generic_reloc, "SPU_ADDR16I",
+ FALSE, 0, 0x007fff80, FALSE),
+ HOWTO (R_SPU_REL32, 0, 2, 32, TRUE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "SPU_REL32",
+ FALSE, 0, 0xffffffff, TRUE),
+ HOWTO (R_SPU_ADDR16X, 0, 2, 16, FALSE, 7, complain_overflow_bitfield,
+ bfd_elf_generic_reloc, "SPU_ADDR16X",
+ FALSE, 0, 0x007fff80, FALSE),
+ HOWTO (R_SPU_PPU32, 0, 2, 32, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "SPU_PPU32",
+ FALSE, 0, 0xffffffff, FALSE),
+ HOWTO (R_SPU_PPU64, 0, 4, 64, FALSE, 0, complain_overflow_dont,
+ bfd_elf_generic_reloc, "SPU_PPU64",
+ FALSE, 0, -1, FALSE),
+};
+
+static struct bfd_elf_special_section const spu_elf_special_sections[] = {
+ { ".toe", 4, 0, SHT_NOBITS, SHF_ALLOC },
+ { NULL, 0, 0, 0, 0 }
+};
+
+static enum elf_spu_reloc_type
+spu_elf_bfd_to_reloc_type (bfd_reloc_code_real_type code)
+{
+ switch (code)
+ {
+ default:
+ return R_SPU_NONE;
+ case BFD_RELOC_SPU_IMM10W:
+ return R_SPU_ADDR10;
+ case BFD_RELOC_SPU_IMM16W:
+ return R_SPU_ADDR16;
+ case BFD_RELOC_SPU_LO16:
+ return R_SPU_ADDR16_LO;
+ case BFD_RELOC_SPU_HI16:
+ return R_SPU_ADDR16_HI;
+ case BFD_RELOC_SPU_IMM18:
+ return R_SPU_ADDR18;
+ case BFD_RELOC_SPU_PCREL16:
+ return R_SPU_REL16;
+ case BFD_RELOC_SPU_IMM7:
+ return R_SPU_ADDR7;
+ case BFD_RELOC_SPU_IMM8:
+ return R_SPU_NONE;
+ case BFD_RELOC_SPU_PCREL9a:
+ return R_SPU_REL9;
+ case BFD_RELOC_SPU_PCREL9b:
+ return R_SPU_REL9I;
+ case BFD_RELOC_SPU_IMM10:
+ return R_SPU_ADDR10I;
+ case BFD_RELOC_SPU_IMM16:
+ return R_SPU_ADDR16I;
+ case BFD_RELOC_32:
+ return R_SPU_ADDR32;
+ case BFD_RELOC_32_PCREL:
+ return R_SPU_REL32;
+ case BFD_RELOC_SPU_PPU32:
+ return R_SPU_PPU32;
+ case BFD_RELOC_SPU_PPU64:
+ return R_SPU_PPU64;
+ }
+}
+
+static void
+spu_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
+ arelent *cache_ptr,
+ Elf_Internal_Rela *dst)
+{
+ enum elf_spu_reloc_type r_type;
+
+ r_type = (enum elf_spu_reloc_type) ELF32_R_TYPE (dst->r_info);
+ BFD_ASSERT (r_type < R_SPU_max);
+ cache_ptr->howto = &elf_howto_table[(int) r_type];
+}
+
+static reloc_howto_type *
+spu_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ bfd_reloc_code_real_type code)
+{
+ enum elf_spu_reloc_type r_type = spu_elf_bfd_to_reloc_type (code);
+
+ if (r_type == R_SPU_NONE)
+ return NULL;
+
+ return elf_howto_table + r_type;
+}
+
+static reloc_howto_type *
+spu_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0; i < sizeof (elf_howto_table) / sizeof (elf_howto_table[0]); i++)
+ if (elf_howto_table[i].name != NULL
+ && strcasecmp (elf_howto_table[i].name, r_name) == 0)
+ return &elf_howto_table[i];
+
+ return NULL;
+}
+
+/* Apply R_SPU_REL9 and R_SPU_REL9I relocs. */
+
+static bfd_reloc_status_type
+spu_elf_rel9 (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
+ void *data, asection *input_section,
+ bfd *output_bfd, char **error_message)
+{
+ bfd_size_type octets;
+ bfd_vma val;
+ long insn;
+
+ /* If this is a relocatable link (output_bfd test tells us), just
+ call the generic function. Any adjustment will be done at final
+ link time. */
+ if (output_bfd != NULL)
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
+
+ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section))
+ return bfd_reloc_outofrange;
+ octets = reloc_entry->address * bfd_octets_per_byte (abfd);
+
+ /* Get symbol value. */
+ val = 0;
+ if (!bfd_is_com_section (symbol->section))
+ val = symbol->value;
+ if (symbol->section->output_section)
+ val += symbol->section->output_section->vma;
+
+ val += reloc_entry->addend;
+
+ /* Make it pc-relative. */
+ val -= input_section->output_section->vma + input_section->output_offset;
+
+ val >>= 2;
+ if (val + 256 >= 512)
+ return bfd_reloc_overflow;
+
+ insn = bfd_get_32 (abfd, (bfd_byte *) data + octets);
+
+ /* Move two high bits of value to REL9I and REL9 position.
+ The mask will take care of selecting the right field. */
+ val = (val & 0x7f) | ((val & 0x180) << 7) | ((val & 0x180) << 16);
+ insn &= ~reloc_entry->howto->dst_mask;
+ insn |= val & reloc_entry->howto->dst_mask;
+ bfd_put_32 (abfd, insn, (bfd_byte *) data + octets);
+ return bfd_reloc_ok;
+}
+
+static bfd_boolean
+spu_elf_new_section_hook (bfd *abfd, asection *sec)
+{
+ if (!sec->used_by_bfd)
+ {
+ struct _spu_elf_section_data *sdata;
+
+ sdata = bfd_zalloc (abfd, sizeof (*sdata));
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = sdata;
+ }
+
+ return _bfd_elf_new_section_hook (abfd, sec);
+}
+
+/* Specially mark defined symbols named _EAR_* with BSF_KEEP so that
+ strip --strip-unneeded will not remove them. */
+
+static void
+spu_elf_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym)
+{
+ if (sym->name != NULL
+ && sym->section != bfd_abs_section_ptr
+ && strncmp (sym->name, "_EAR_", 5) == 0)
+ sym->flags |= BSF_KEEP;
+}
+
+/* SPU ELF linker hash table. */
+
+struct spu_link_hash_table
+{
+ struct elf_link_hash_table elf;
+
+ /* The stub hash table. */
+ struct bfd_hash_table stub_hash_table;
+
+ /* Shortcuts to overlay sections. */
+ asection *stub;
+ asection *ovtab;
+
+ struct elf_link_hash_entry *ovly_load;
+
+ /* An array of two output sections per overlay region, chosen such that
+ the first section vma is the overlay buffer vma (ie. the section has
+ the lowest vma in the group that occupy the region), and the second
+ section vma+size specifies the end of the region. We keep pointers
+ to sections like this because section vmas may change when laying
+ them out. */
+ asection **ovl_region;
+
+ /* Number of overlay buffers. */
+ unsigned int num_buf;
+
+ /* Total number of overlays. */
+ unsigned int num_overlays;
+
+ /* Set if we should emit symbols for stubs. */
+ unsigned int emit_stub_syms:1;
+
+ /* Set if we want stubs on calls out of overlay regions to
+ non-overlay regions. */
+ unsigned int non_overlay_stubs : 1;
+
+ /* Set on error. */
+ unsigned int stub_overflow : 1;
+
+ /* Set if stack size analysis should be done. */
+ unsigned int stack_analysis : 1;
+
+ /* Set if __stack_* syms will be emitted. */
+ unsigned int emit_stack_syms : 1;
+};
+
+#define spu_hash_table(p) \
+ ((struct spu_link_hash_table *) ((p)->hash))
+
+struct spu_stub_hash_entry
+{
+ struct bfd_hash_entry root;
+
+ /* Destination of this stub. */
+ asection *target_section;
+ bfd_vma target_off;
+
+ /* Offset of entry in stub section. */
+ bfd_vma off;
+
+ /* Offset from this stub to stub that loads the overlay index. */
+ bfd_vma delta;
+};
+
+/* Create an entry in a spu stub hash table. */
+
+static struct bfd_hash_entry *
+stub_hash_newfunc (struct bfd_hash_entry *entry,
+ struct bfd_hash_table *table,
+ const char *string)
+{
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table, sizeof (struct spu_stub_hash_entry));
+ if (entry == NULL)
+ return entry;
+ }
+
+ /* Call the allocation method of the superclass. */
+ entry = bfd_hash_newfunc (entry, table, string);
+ if (entry != NULL)
+ {
+ struct spu_stub_hash_entry *sh = (struct spu_stub_hash_entry *) entry;
+
+ sh->target_section = NULL;
+ sh->target_off = 0;
+ sh->off = 0;
+ sh->delta = 0;
+ }
+
+ return entry;
+}
+
+/* Create a spu ELF linker hash table. */
+
+static struct bfd_link_hash_table *
+spu_elf_link_hash_table_create (bfd *abfd)
+{
+ struct spu_link_hash_table *htab;
+
+ htab = bfd_malloc (sizeof (*htab));
+ if (htab == NULL)
+ return NULL;
+
+ if (!_bfd_elf_link_hash_table_init (&htab->elf, abfd,
+ _bfd_elf_link_hash_newfunc,
+ sizeof (struct elf_link_hash_entry)))
+ {
+ free (htab);
+ return NULL;
+ }
+
+ /* Init the stub hash table too. */
+ if (!bfd_hash_table_init (&htab->stub_hash_table, stub_hash_newfunc,
+ sizeof (struct spu_stub_hash_entry)))
+ return NULL;
+
+ memset (&htab->stub, 0,
+ sizeof (*htab) - offsetof (struct spu_link_hash_table, stub));
+
+ return &htab->elf.root;
+}
+
+/* Free the derived linker hash table. */
+
+static void
+spu_elf_link_hash_table_free (struct bfd_link_hash_table *hash)
+{
+ struct spu_link_hash_table *ret = (struct spu_link_hash_table *) hash;
+
+ bfd_hash_table_free (&ret->stub_hash_table);
+ _bfd_generic_link_hash_table_free (hash);
+}
+
+/* Find the symbol for the given R_SYMNDX in IBFD and set *HP and *SYMP
+ to (hash, NULL) for global symbols, and (NULL, sym) for locals. Set
+ *SYMSECP to the symbol's section. *LOCSYMSP caches local syms. */
+
+static bfd_boolean
+get_sym_h (struct elf_link_hash_entry **hp,
+ Elf_Internal_Sym **symp,
+ asection **symsecp,
+ Elf_Internal_Sym **locsymsp,
+ unsigned long r_symndx,
+ bfd *ibfd)
+{
+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (ibfd);
+ struct elf_link_hash_entry *h;
+
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (hp != NULL)
+ *hp = h;
+
+ if (symp != NULL)
+ *symp = NULL;
+
+ if (symsecp != NULL)
+ {
+ asection *symsec = NULL;
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ symsec = h->root.u.def.section;
+ *symsecp = symsec;
+ }
+ }
+ else
+ {
+ Elf_Internal_Sym *sym;
+ Elf_Internal_Sym *locsyms = *locsymsp;
+
+ if (locsyms == NULL)
+ {
+ locsyms = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (locsyms == NULL)
+ {
+ size_t symcount = symtab_hdr->sh_info;
+
+ /* If we are reading symbols into the contents, then
+ read the global syms too. This is done to cache
+ syms for later stack analysis. */
+ if ((unsigned char **) locsymsp == &symtab_hdr->contents)
+ symcount = symtab_hdr->sh_size / symtab_hdr->sh_entsize;
+ locsyms = bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, 0,
+ NULL, NULL, NULL);
+ }
+ if (locsyms == NULL)
+ return FALSE;
+ *locsymsp = locsyms;
+ }
+ sym = locsyms + r_symndx;
+
+ if (hp != NULL)
+ *hp = NULL;
+
+ if (symp != NULL)
+ *symp = sym;
+
+ if (symsecp != NULL)
+ {
+ asection *symsec = NULL;
+ if ((sym->st_shndx != SHN_UNDEF
+ && sym->st_shndx < SHN_LORESERVE)
+ || sym->st_shndx > SHN_HIRESERVE)
+ symsec = bfd_section_from_elf_index (ibfd, sym->st_shndx);
+ *symsecp = symsec;
+ }
+ }
+
+ return TRUE;
+}
+
+/* Build a name for an entry in the stub hash table. We can't use a
+ local symbol name because ld -r might generate duplicate local symbols. */
+
+static char *
+spu_stub_name (const asection *sym_sec,
+ const struct elf_link_hash_entry *h,
+ const Elf_Internal_Rela *rel)
+{
+ char *stub_name;
+ bfd_size_type len;
+
+ if (h)
+ {
+ len = strlen (h->root.root.string) + 1 + 8 + 1;
+ stub_name = bfd_malloc (len);
+ if (stub_name == NULL)
+ return stub_name;
+
+ sprintf (stub_name, "%s+%x",
+ h->root.root.string,
+ (int) rel->r_addend & 0xffffffff);
+ len -= 8;
+ }
+ else
+ {
+ len = 8 + 1 + 8 + 1 + 8 + 1;
+ stub_name = bfd_malloc (len);
+ if (stub_name == NULL)
+ return stub_name;
+
+ sprintf (stub_name, "%x:%x+%x",
+ sym_sec->id & 0xffffffff,
+ (int) ELF32_R_SYM (rel->r_info) & 0xffffffff,
+ (int) rel->r_addend & 0xffffffff);
+ len = strlen (stub_name);
+ }
+
+ if (stub_name[len - 2] == '+'
+ && stub_name[len - 1] == '0'
+ && stub_name[len] == 0)
+ stub_name[len - 2] = 0;
+
+ return stub_name;
+}
+
+/* Create the note section if not already present. This is done early so
+ that the linker maps the sections to the right place in the output. */
+
+bfd_boolean
+spu_elf_create_sections (bfd *output_bfd,
+ struct bfd_link_info *info,
+ int stack_analysis,
+ int emit_stack_syms)
+{
+ bfd *ibfd;
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+
+ /* Stash some options away where we can get at them later. */
+ htab->stack_analysis = stack_analysis;
+ htab->emit_stack_syms = emit_stack_syms;
+
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ if (bfd_get_section_by_name (ibfd, SPU_PTNOTE_SPUNAME) != NULL)
+ break;
+
+ if (ibfd == NULL)
+ {
+ /* Make SPU_PTNOTE_SPUNAME section. */
+ asection *s;
+ size_t name_len;
+ size_t size;
+ bfd_byte *data;
+ flagword flags;
+
+ ibfd = info->input_bfds;
+ flags = SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY;
+ s = bfd_make_section_anyway_with_flags (ibfd, SPU_PTNOTE_SPUNAME, flags);
+ if (s == NULL
+ || !bfd_set_section_alignment (ibfd, s, 4))
+ return FALSE;
+
+ name_len = strlen (bfd_get_filename (output_bfd)) + 1;
+ size = 12 + ((sizeof (SPU_PLUGIN_NAME) + 3) & -4);
+ size += (name_len + 3) & -4;
+
+ if (!bfd_set_section_size (ibfd, s, size))
+ return FALSE;
+
+ data = bfd_zalloc (ibfd, size);
+ if (data == NULL)
+ return FALSE;
+
+ bfd_put_32 (ibfd, sizeof (SPU_PLUGIN_NAME), data + 0);
+ bfd_put_32 (ibfd, name_len, data + 4);
+ bfd_put_32 (ibfd, 1, data + 8);
+ memcpy (data + 12, SPU_PLUGIN_NAME, sizeof (SPU_PLUGIN_NAME));
+ memcpy (data + 12 + ((sizeof (SPU_PLUGIN_NAME) + 3) & -4),
+ bfd_get_filename (output_bfd), name_len);
+ s->contents = data;
+ }
+
+ return TRUE;
+}
+
+/* qsort predicate to sort sections by vma. */
+
+static int
+sort_sections (const void *a, const void *b)
+{
+ const asection *const *s1 = a;
+ const asection *const *s2 = b;
+ bfd_signed_vma delta = (*s1)->vma - (*s2)->vma;
+
+ if (delta != 0)
+ return delta < 0 ? -1 : 1;
+
+ return (*s1)->index - (*s2)->index;
+}
+
+/* Identify overlays in the output bfd, and number them. */
+
+bfd_boolean
+spu_elf_find_overlays (bfd *output_bfd, struct bfd_link_info *info)
+{
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+ asection **alloc_sec;
+ unsigned int i, n, ovl_index, num_buf;
+ asection *s;
+ bfd_vma ovl_end;
+
+ if (output_bfd->section_count < 2)
+ return FALSE;
+
+ alloc_sec = bfd_malloc (output_bfd->section_count * sizeof (*alloc_sec));
+ if (alloc_sec == NULL)
+ return FALSE;
+
+ /* Pick out all the alloced sections. */
+ for (n = 0, s = output_bfd->sections; s != NULL; s = s->next)
+ if ((s->flags & SEC_ALLOC) != 0
+ && (s->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) != SEC_THREAD_LOCAL
+ && s->size != 0)
+ alloc_sec[n++] = s;
+
+ if (n == 0)
+ {
+ free (alloc_sec);
+ return FALSE;
+ }
+
+ /* Sort them by vma. */
+ qsort (alloc_sec, n, sizeof (*alloc_sec), sort_sections);
+
+ /* Look for overlapping vmas. Any with overlap must be overlays.
+ Count them. Also count the number of overlay regions and for
+ each region save a section from that region with the lowest vma
+ and another section with the highest end vma. */
+ ovl_end = alloc_sec[0]->vma + alloc_sec[0]->size;
+ for (ovl_index = 0, num_buf = 0, i = 1; i < n; i++)
+ {
+ s = alloc_sec[i];
+ if (s->vma < ovl_end)
+ {
+ asection *s0 = alloc_sec[i - 1];
+
+ if (spu_elf_section_data (s0)->ovl_index == 0)
+ {
+ spu_elf_section_data (s0)->ovl_index = ++ovl_index;
+ alloc_sec[num_buf * 2] = s0;
+ alloc_sec[num_buf * 2 + 1] = s0;
+ num_buf++;
+ }
+ spu_elf_section_data (s)->ovl_index = ++ovl_index;
+ if (ovl_end < s->vma + s->size)
+ {
+ ovl_end = s->vma + s->size;
+ alloc_sec[num_buf * 2 - 1] = s;
+ }
+ }
+ else
+ ovl_end = s->vma + s->size;
+ }
+
+ htab->num_overlays = ovl_index;
+ htab->num_buf = num_buf;
+ if (ovl_index == 0)
+ {
+ free (alloc_sec);
+ return FALSE;
+ }
+
+ alloc_sec = bfd_realloc (alloc_sec, num_buf * 2 * sizeof (*alloc_sec));
+ if (alloc_sec == NULL)
+ return FALSE;
+
+ htab->ovl_region = alloc_sec;
+ return TRUE;
+}
+
+/* One of these per stub. */
+#define SIZEOF_STUB1 8
+#define ILA_79 0x4200004f /* ila $79,function_address */
+#define BR 0x32000000 /* br stub2 */
+
+/* One of these per overlay. */
+#define SIZEOF_STUB2 8
+#define ILA_78 0x4200004e /* ila $78,overlay_number */
+ /* br __ovly_load */
+#define NOP 0x40200000
+
+/* Return true for all relative and absolute branch instructions.
+ bra 00110000 0..
+ brasl 00110001 0..
+ br 00110010 0..
+ brsl 00110011 0..
+ brz 00100000 0..
+ brnz 00100001 0..
+ brhz 00100010 0..
+ brhnz 00100011 0.. */
+
+static bfd_boolean
+is_branch (const unsigned char *insn)
+{
+ return (insn[0] & 0xec) == 0x20 && (insn[1] & 0x80) == 0;
+}
+
+/* Return true for branch hint instructions.
+ hbra 0001000..
+ hbrr 0001001.. */
+
+static bfd_boolean
+is_hint (const unsigned char *insn)
+{
+ return (insn[0] & 0xfc) == 0x10;
+}
+
+/* Return TRUE if this reloc symbol should possibly go via an overlay stub. */
+
+static bfd_boolean
+needs_ovl_stub (const char *sym_name,
+ asection *sym_sec,
+ asection *input_section,
+ struct spu_link_hash_table *htab,
+ bfd_boolean is_branch)
+{
+ if (htab->num_overlays == 0)
+ return FALSE;
+
+ if (sym_sec == NULL
+ || sym_sec->output_section == NULL
+ || spu_elf_section_data (sym_sec->output_section) == NULL)
+ return FALSE;
+
+ /* setjmp always goes via an overlay stub, because then the return
+ and hence the longjmp goes via __ovly_return. That magically
+ makes setjmp/longjmp between overlays work. */
+ if (strncmp (sym_name, "setjmp", 6) == 0
+ && (sym_name[6] == '\0' || sym_name[6] == '@'))
+ return TRUE;
+
+ /* Usually, symbols in non-overlay sections don't need stubs. */
+ if (spu_elf_section_data (sym_sec->output_section)->ovl_index == 0
+ && !htab->non_overlay_stubs)
+ return FALSE;
+
+ /* A reference from some other section to a symbol in an overlay
+ section needs a stub. */
+ if (spu_elf_section_data (sym_sec->output_section)->ovl_index
+ != spu_elf_section_data (input_section->output_section)->ovl_index)
+ return TRUE;
+
+ /* If this insn isn't a branch then we are possibly taking the
+ address of a function and passing it out somehow. */
+ return !is_branch;
+}
+
+struct stubarr {
+ struct bfd_hash_table *stub_hash_table;
+ struct spu_stub_hash_entry **sh;
+ unsigned int count;
+ int err;
+};
+
+/* Called via elf_link_hash_traverse to allocate stubs for any _SPUEAR_
+ symbols. */
+
+static bfd_boolean
+allocate_spuear_stubs (struct elf_link_hash_entry *h, void *inf)
+{
+ /* Symbols starting with _SPUEAR_ need a stub because they may be
+ invoked by the PPU. */
+ if ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->def_regular
+ && strncmp (h->root.root.string, "_SPUEAR_", 8) == 0)
+ {
+ struct stubarr *stubs = inf;
+ static Elf_Internal_Rela zero_rel;
+ char *stub_name = spu_stub_name (h->root.u.def.section, h, &zero_rel);
+ struct spu_stub_hash_entry *sh;
+
+ if (stub_name == NULL)
+ {
+ stubs->err = 1;
+ return FALSE;
+ }
+
+ sh = (struct spu_stub_hash_entry *)
+ bfd_hash_lookup (stubs->stub_hash_table, stub_name, TRUE, FALSE);
+ if (sh == NULL)
+ {
+ free (stub_name);
+ return FALSE;
+ }
+
+ /* If this entry isn't new, we already have a stub. */
+ if (sh->target_section != NULL)
+ {
+ free (stub_name);
+ return TRUE;
+ }
+
+ sh->target_section = h->root.u.def.section;
+ sh->target_off = h->root.u.def.value;
+ stubs->count += 1;
+ }
+
+ return TRUE;
+}
+
+/* Called via bfd_hash_traverse to set up pointers to all symbols
+ in the stub hash table. */
+
+static bfd_boolean
+populate_stubs (struct bfd_hash_entry *bh, void *inf)
+{
+ struct stubarr *stubs = inf;
+
+ stubs->sh[--stubs->count] = (struct spu_stub_hash_entry *) bh;
+ return TRUE;
+}
+
+/* qsort predicate to sort stubs by overlay number. */
+
+static int
+sort_stubs (const void *a, const void *b)
+{
+ const struct spu_stub_hash_entry *const *sa = a;
+ const struct spu_stub_hash_entry *const *sb = b;
+ int i;
+ bfd_signed_vma d;
+
+ i = spu_elf_section_data ((*sa)->target_section->output_section)->ovl_index;
+ i -= spu_elf_section_data ((*sb)->target_section->output_section)->ovl_index;
+ if (i != 0)
+ return i;
+
+ d = ((*sa)->target_section->output_section->vma
+ + (*sa)->target_section->output_offset
+ + (*sa)->target_off
+ - (*sb)->target_section->output_section->vma
+ - (*sb)->target_section->output_offset
+ - (*sb)->target_off);
+ if (d != 0)
+ return d < 0 ? -1 : 1;
+
+ /* Two functions at the same address. Aliases perhaps. */
+ i = strcmp ((*sb)->root.string, (*sa)->root.string);
+ BFD_ASSERT (i != 0);
+ return i;
+}
+
+/* Allocate space for overlay call and return stubs. */
+
+bfd_boolean
+spu_elf_size_stubs (bfd *output_bfd,
+ struct bfd_link_info *info,
+ int non_overlay_stubs,
+ int stack_analysis,
+ asection **stub,
+ asection **ovtab,
+ asection **toe)
+{
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+ bfd *ibfd;
+ struct stubarr stubs;
+ unsigned i, group;
+ flagword flags;
+
+ htab->non_overlay_stubs = non_overlay_stubs;
+ stubs.stub_hash_table = &htab->stub_hash_table;
+ stubs.count = 0;
+ stubs.err = 0;
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ extern const bfd_target bfd_elf32_spu_vec;
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *section;
+ Elf_Internal_Sym *local_syms = NULL;
+ void *psyms;
+
+ if (ibfd->xvec != &bfd_elf32_spu_vec)
+ continue;
+
+ /* We'll need the symbol table in a second. */
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ if (symtab_hdr->sh_info == 0)
+ continue;
+
+ /* Arrange to read and keep global syms for later stack analysis. */
+ psyms = &local_syms;
+ if (stack_analysis)
+ psyms = &symtab_hdr->contents;
+
+ /* Walk over each section attached to the input bfd. */
+ for (section = ibfd->sections; section != NULL; section = section->next)
+ {
+ Elf_Internal_Rela *internal_relocs, *irelaend, *irela;
+
+ /* If there aren't any relocs, then there's nothing more to do. */
+ if ((section->flags & SEC_RELOC) == 0
+ || (section->flags & SEC_ALLOC) == 0
+ || (section->flags & SEC_LOAD) == 0
+ || section->reloc_count == 0)
+ continue;
+
+ /* If this section is a link-once section that will be
+ discarded, then don't create any stubs. */
+ if (section->output_section == NULL
+ || section->output_section->owner != output_bfd)
+ continue;
+
+ /* Get the relocs. */
+ internal_relocs
+ = _bfd_elf_link_read_relocs (ibfd, section, NULL, NULL,
+ info->keep_memory);
+ if (internal_relocs == NULL)
+ goto error_ret_free_local;
+
+ /* Now examine each relocation. */
+ irela = internal_relocs;
+ irelaend = irela + section->reloc_count;
+ for (; irela < irelaend; irela++)
+ {
+ enum elf_spu_reloc_type r_type;
+ unsigned int r_indx;
+ asection *sym_sec;
+ Elf_Internal_Sym *sym;
+ struct elf_link_hash_entry *h;
+ const char *sym_name;
+ char *stub_name;
+ struct spu_stub_hash_entry *sh;
+ unsigned int sym_type;
+ enum _insn_type { non_branch, branch, call } insn_type;
+
+ r_type = ELF32_R_TYPE (irela->r_info);
+ r_indx = ELF32_R_SYM (irela->r_info);
+
+ if (r_type >= R_SPU_max)
+ {
+ bfd_set_error (bfd_error_bad_value);
+ goto error_ret_free_internal;
+ }
+
+ /* Determine the reloc target section. */
+ if (!get_sym_h (&h, &sym, &sym_sec, psyms, r_indx, ibfd))
+ goto error_ret_free_internal;
+
+ if (sym_sec == NULL
+ || sym_sec->output_section == NULL
+ || sym_sec->output_section->owner != output_bfd)
+ continue;
+
+ /* Ensure no stubs for user supplied overlay manager syms. */
+ if (h != NULL
+ && (strcmp (h->root.root.string, "__ovly_load") == 0
+ || strcmp (h->root.root.string, "__ovly_return") == 0))
+ continue;
+
+ insn_type = non_branch;
+ if (r_type == R_SPU_REL16
+ || r_type == R_SPU_ADDR16)
+ {
+ unsigned char insn[4];
+
+ if (!bfd_get_section_contents (ibfd, section, insn,
+ irela->r_offset, 4))
+ goto error_ret_free_internal;
+
+ if (is_branch (insn) || is_hint (insn))
+ {
+ insn_type = branch;
+ if ((insn[0] & 0xfd) == 0x31)
+ insn_type = call;
+ }
+ }
+
+ /* We are only interested in function symbols. */
+ if (h != NULL)
+ {
+ sym_type = h->type;
+ sym_name = h->root.root.string;
+ }
+ else
+ {
+ sym_type = ELF_ST_TYPE (sym->st_info);
+ sym_name = bfd_elf_sym_name (sym_sec->owner,
+ symtab_hdr,
+ sym,
+ sym_sec);
+ }
+ if (sym_type != STT_FUNC)
+ {
+ /* It's common for people to write assembly and forget
+ to give function symbols the right type. Handle
+ calls to such symbols, but warn so that (hopefully)
+ people will fix their code. We need the symbol
+ type to be correct to distinguish function pointer
+ initialisation from other pointer initialisation. */
+ if (insn_type == call)
+ (*_bfd_error_handler) (_("warning: call to non-function"
+ " symbol %s defined in %B"),
+ sym_sec->owner, sym_name);
+ else
+ continue;
+ }
+
+ if (!needs_ovl_stub (sym_name, sym_sec, section, htab,
+ insn_type != non_branch))
+ continue;
+
+ stub_name = spu_stub_name (sym_sec, h, irela);
+ if (stub_name == NULL)
+ goto error_ret_free_internal;
+
+ sh = (struct spu_stub_hash_entry *)
+ bfd_hash_lookup (&htab->stub_hash_table, stub_name,
+ TRUE, FALSE);
+ if (sh == NULL)
+ {
+ free (stub_name);
+ error_ret_free_internal:
+ if (elf_section_data (section)->relocs != internal_relocs)
+ free (internal_relocs);
+ error_ret_free_local:
+ if (local_syms != NULL
+ && (symtab_hdr->contents
+ != (unsigned char *) local_syms))
+ free (local_syms);
+ return FALSE;
+ }
+
+ /* If this entry isn't new, we already have a stub. */
+ if (sh->target_section != NULL)
+ {
+ free (stub_name);
+ continue;
+ }
+
+ sh->target_section = sym_sec;
+ if (h != NULL)
+ sh->target_off = h->root.u.def.value;
+ else
+ sh->target_off = sym->st_value;
+ sh->target_off += irela->r_addend;
+
+ stubs.count += 1;
+ }
+
+ /* We're done with the internal relocs, free them. */
+ if (elf_section_data (section)->relocs != internal_relocs)
+ free (internal_relocs);
+ }
+
+ if (local_syms != NULL
+ && symtab_hdr->contents != (unsigned char *) local_syms)
+ {
+ if (!info->keep_memory)
+ free (local_syms);
+ else
+ symtab_hdr->contents = (unsigned char *) local_syms;
+ }
+ }
+
+ elf_link_hash_traverse (&htab->elf, allocate_spuear_stubs, &stubs);
+ if (stubs.err)
+ return FALSE;
+
+ *stub = NULL;
+ if (stubs.count == 0)
+ return TRUE;
+
+ ibfd = info->input_bfds;
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY);
+ htab->stub = bfd_make_section_anyway_with_flags (ibfd, ".stub", flags);
+ *stub = htab->stub;
+ if (htab->stub == NULL
+ || !bfd_set_section_alignment (ibfd, htab->stub, 2))
+ return FALSE;
+
+ flags = (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY);
+ htab->ovtab = bfd_make_section_anyway_with_flags (ibfd, ".ovtab", flags);
+ *ovtab = htab->ovtab;
+ if (htab->ovtab == NULL
+ || !bfd_set_section_alignment (ibfd, htab->stub, 4))
+ return FALSE;
+
+ *toe = bfd_make_section_anyway_with_flags (ibfd, ".toe", SEC_ALLOC);
+ if (*toe == NULL
+ || !bfd_set_section_alignment (ibfd, *toe, 4))
+ return FALSE;
+ (*toe)->size = 16;
+
+ /* Retrieve all the stubs and sort. */
+ stubs.sh = bfd_malloc (stubs.count * sizeof (*stubs.sh));
+ if (stubs.sh == NULL)
+ return FALSE;
+ i = stubs.count;
+ bfd_hash_traverse (&htab->stub_hash_table, populate_stubs, &stubs);
+ BFD_ASSERT (stubs.count == 0);
+
+ stubs.count = i;
+ qsort (stubs.sh, stubs.count, sizeof (*stubs.sh), sort_stubs);
+
+ /* Now that the stubs are sorted, place them in the stub section.
+ Stubs are grouped per overlay
+ . ila $79,func1
+ . br 1f
+ . ila $79,func2
+ . br 1f
+ .
+ .
+ . ila $79,funcn
+ . nop
+ . 1:
+ . ila $78,ovl_index
+ . br __ovly_load */
+
+ group = 0;
+ for (i = 0; i < stubs.count; i++)
+ {
+ if (spu_elf_section_data (stubs.sh[group]->target_section
+ ->output_section)->ovl_index
+ != spu_elf_section_data (stubs.sh[i]->target_section
+ ->output_section)->ovl_index)
+ {
+ htab->stub->size += SIZEOF_STUB2;
+ for (; group != i; group++)
+ stubs.sh[group]->delta
+ = stubs.sh[i - 1]->off - stubs.sh[group]->off;
+ }
+ if (group == i
+ || ((stubs.sh[i - 1]->target_section->output_section->vma
+ + stubs.sh[i - 1]->target_section->output_offset
+ + stubs.sh[i - 1]->target_off)
+ != (stubs.sh[i]->target_section->output_section->vma
+ + stubs.sh[i]->target_section->output_offset
+ + stubs.sh[i]->target_off)))
+ {
+ stubs.sh[i]->off = htab->stub->size;
+ htab->stub->size += SIZEOF_STUB1;
+ }
+ else
+ stubs.sh[i]->off = stubs.sh[i - 1]->off;
+ }
+ if (group != i)
+ htab->stub->size += SIZEOF_STUB2;
+ for (; group != i; group++)
+ stubs.sh[group]->delta = stubs.sh[i - 1]->off - stubs.sh[group]->off;
+
+ /* htab->ovtab consists of two arrays.
+ . struct {
+ . u32 vma;
+ . u32 size;
+ . u32 file_off;
+ . u32 buf;
+ . } _ovly_table[];
+ .
+ . struct {
+ . u32 mapped;
+ . } _ovly_buf_table[]; */
+
+ htab->ovtab->alignment_power = 4;
+ htab->ovtab->size = htab->num_overlays * 16 + htab->num_buf * 4;
+
+ return TRUE;
+}
+
+/* Functions to handle embedded spu_ovl.o object. */
+
+static void *
+ovl_mgr_open (struct bfd *nbfd ATTRIBUTE_UNUSED, void *stream)
+{
+ return stream;
+}
+
+static file_ptr
+ovl_mgr_pread (struct bfd *abfd ATTRIBUTE_UNUSED,
+ void *stream,
+ void *buf,
+ file_ptr nbytes,
+ file_ptr offset)
+{
+ struct _ovl_stream *os;
+ size_t count;
+ size_t max;
+
+ os = (struct _ovl_stream *) stream;
+ max = (const char *) os->end - (const char *) os->start;
+
+ if ((ufile_ptr) offset >= max)
+ return 0;
+
+ count = nbytes;
+ if (count > max - offset)
+ count = max - offset;
+
+ memcpy (buf, (const char *) os->start + offset, count);
+ return count;
+}
+
+bfd_boolean
+spu_elf_open_builtin_lib (bfd **ovl_bfd, const struct _ovl_stream *stream)
+{
+ *ovl_bfd = bfd_openr_iovec ("builtin ovl_mgr",
+ "elf32-spu",
+ ovl_mgr_open,
+ (void *) stream,
+ ovl_mgr_pread,
+ NULL,
+ NULL);
+ return *ovl_bfd != NULL;
+}
+
+/* Fill in the ila and br for a stub. On the last stub for a group,
+ write the stub that sets the overlay number too. */
+
+static bfd_boolean
+write_one_stub (struct bfd_hash_entry *bh, void *inf)
+{
+ struct spu_stub_hash_entry *ent = (struct spu_stub_hash_entry *) bh;
+ struct spu_link_hash_table *htab = inf;
+ asection *sec = htab->stub;
+ asection *s = ent->target_section;
+ unsigned int ovl;
+ bfd_vma val;
+
+ val = ent->target_off + s->output_offset + s->output_section->vma;
+ bfd_put_32 (sec->owner, ILA_79 + ((val << 7) & 0x01ffff80),
+ sec->contents + ent->off);
+ val = ent->delta + 4;
+ bfd_put_32 (sec->owner, BR + ((val << 5) & 0x007fff80),
+ sec->contents + ent->off + 4);
+
+ /* If this is the last stub of this group, write stub2. */
+ if (ent->delta == 0)
+ {
+ bfd_put_32 (sec->owner, NOP,
+ sec->contents + ent->off + 4);
+
+ ovl = spu_elf_section_data (s->output_section)->ovl_index;
+ bfd_put_32 (sec->owner, ILA_78 + ((ovl << 7) & 0x01ffff80),
+ sec->contents + ent->off + 8);
+
+ val = (htab->ovly_load->root.u.def.section->output_section->vma
+ + htab->ovly_load->root.u.def.section->output_offset
+ + htab->ovly_load->root.u.def.value
+ - (sec->output_section->vma
+ + sec->output_offset
+ + ent->off + 12));
+
+ if (val + 0x20000 >= 0x40000)
+ htab->stub_overflow = TRUE;
+
+ bfd_put_32 (sec->owner, BR + ((val << 5) & 0x007fff80),
+ sec->contents + ent->off + 12);
+ }
+
+ if (htab->emit_stub_syms)
+ {
+ struct elf_link_hash_entry *h;
+ size_t len1, len2;
+ char *name;
+
+ len1 = sizeof ("00000000.ovl_call.") - 1;
+ len2 = strlen (ent->root.string);
+ name = bfd_malloc (len1 + len2 + 1);
+ if (name == NULL)
+ return FALSE;
+ memcpy (name, "00000000.ovl_call.", len1);
+ memcpy (name + len1, ent->root.string, len2 + 1);
+ h = elf_link_hash_lookup (&htab->elf, name, TRUE, TRUE, FALSE);
+ free (name);
+ if (h == NULL)
+ return FALSE;
+ if (h->root.type == bfd_link_hash_new)
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = sec;
+ h->root.u.def.value = ent->off;
+ h->size = (ent->delta == 0
+ ? SIZEOF_STUB1 + SIZEOF_STUB2 : SIZEOF_STUB1);
+ h->type = STT_FUNC;
+ h->ref_regular = 1;
+ h->def_regular = 1;
+ h->ref_regular_nonweak = 1;
+ h->forced_local = 1;
+ h->non_elf = 0;
+ }
+ }
+
+ return TRUE;
+}
+
+/* Define an STT_OBJECT symbol. */
+
+static struct elf_link_hash_entry *
+define_ovtab_symbol (struct spu_link_hash_table *htab, const char *name)
+{
+ struct elf_link_hash_entry *h;
+
+ h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE);
+ if (h == NULL)
+ return NULL;
+
+ if (h->root.type != bfd_link_hash_defined
+ || !h->def_regular)
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = htab->ovtab;
+ h->type = STT_OBJECT;
+ h->ref_regular = 1;
+ h->def_regular = 1;
+ h->ref_regular_nonweak = 1;
+ h->non_elf = 0;
+ }
+ else
+ {
+ (*_bfd_error_handler) (_("%B is not allowed to define %s"),
+ h->root.u.def.section->owner,
+ h->root.root.string);
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+ }
+
+ return h;
+}
+
+/* Fill in all stubs and the overlay tables. */
+
+bfd_boolean
+spu_elf_build_stubs (struct bfd_link_info *info, int emit_syms, asection *toe)
+{
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+ struct elf_link_hash_entry *h;
+ bfd_byte *p;
+ asection *s;
+ bfd *obfd;
+ unsigned int i;
+
+ htab->emit_stub_syms = emit_syms;
+ htab->stub->contents = bfd_zalloc (htab->stub->owner, htab->stub->size);
+ if (htab->stub->contents == NULL)
+ return FALSE;
+
+ h = elf_link_hash_lookup (&htab->elf, "__ovly_load", FALSE, FALSE, FALSE);
+ htab->ovly_load = h;
+ BFD_ASSERT (h != NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->def_regular);
+
+ s = h->root.u.def.section->output_section;
+ if (spu_elf_section_data (s)->ovl_index)
+ {
+ (*_bfd_error_handler) (_("%s in overlay section"),
+ h->root.u.def.section->owner);
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ /* Write out all the stubs. */
+ bfd_hash_traverse (&htab->stub_hash_table, write_one_stub, htab);
+
+ if (htab->stub_overflow)
+ {
+ (*_bfd_error_handler) (_("overlay stub relocation overflow"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
+ htab->ovtab->contents = bfd_zalloc (htab->ovtab->owner, htab->ovtab->size);
+ if (htab->ovtab->contents == NULL)
+ return FALSE;
+
+ /* Write out _ovly_table. */
+ p = htab->ovtab->contents;
+ obfd = htab->ovtab->output_section->owner;
+ for (s = obfd->sections; s != NULL; s = s->next)
+ {
+ unsigned int ovl_index = spu_elf_section_data (s)->ovl_index;
+
+ if (ovl_index != 0)
+ {
+ unsigned int lo, hi, mid;
+ unsigned long off = (ovl_index - 1) * 16;
+ bfd_put_32 (htab->ovtab->owner, s->vma, p + off);
+ bfd_put_32 (htab->ovtab->owner, (s->size + 15) & -16, p + off + 4);
+ /* file_off written later in spu_elf_modify_program_headers. */
+
+ lo = 0;
+ hi = htab->num_buf;
+ while (lo < hi)
+ {
+ mid = (lo + hi) >> 1;
+ if (htab->ovl_region[2 * mid + 1]->vma
+ + htab->ovl_region[2 * mid + 1]->size <= s->vma)
+ lo = mid + 1;
+ else if (htab->ovl_region[2 * mid]->vma > s->vma)
+ hi = mid;
+ else
+ {
+ bfd_put_32 (htab->ovtab->owner, mid + 1, p + off + 12);
+ break;
+ }
+ }
+ BFD_ASSERT (lo < hi);
+ }
+ }
+
+ /* Write out _ovly_buf_table. */
+ p = htab->ovtab->contents + htab->num_overlays * 16;
+ for (i = 0; i < htab->num_buf; i++)
+ {
+ bfd_put_32 (htab->ovtab->owner, 0, p);
+ p += 4;
+ }
+
+ h = define_ovtab_symbol (htab, "_ovly_table");
+ if (h == NULL)
+ return FALSE;
+ h->root.u.def.value = 0;
+ h->size = htab->num_overlays * 16;
+
+ h = define_ovtab_symbol (htab, "_ovly_table_end");
+ if (h == NULL)
+ return FALSE;
+ h->root.u.def.value = htab->num_overlays * 16;
+ h->size = 0;
+
+ h = define_ovtab_symbol (htab, "_ovly_buf_table");
+ if (h == NULL)
+ return FALSE;
+ h->root.u.def.value = htab->num_overlays * 16;
+ h->size = htab->num_buf * 4;
+
+ h = define_ovtab_symbol (htab, "_ovly_buf_table_end");
+ if (h == NULL)
+ return FALSE;
+ h->root.u.def.value = htab->num_overlays * 16 + htab->num_buf * 4;
+ h->size = 0;
+
+ h = define_ovtab_symbol (htab, "_EAR_");
+ if (h == NULL)
+ return FALSE;
+ h->root.u.def.section = toe;
+ h->root.u.def.value = 0;
+ h->size = 16;
+
+ return TRUE;
+}
+
+/* OFFSET in SEC (presumably) is the beginning of a function prologue.
+ Search for stack adjusting insns, and return the sp delta. */
+
+static int
+find_function_stack_adjust (asection *sec, bfd_vma offset)
+{
+ int unrecog;
+ int reg[128];
+
+ memset (reg, 0, sizeof (reg));
+ for (unrecog = 0; offset + 4 <= sec->size && unrecog < 32; offset += 4)
+ {
+ unsigned char buf[4];
+ int rt, ra;
+ int imm;
+
+ /* Assume no relocs on stack adjusing insns. */
+ if (!bfd_get_section_contents (sec->owner, sec, buf, offset, 4))
+ break;
+
+ if (buf[0] == 0x24 /* stqd */)
+ continue;
+
+ rt = buf[3] & 0x7f;
+ ra = ((buf[2] & 0x3f) << 1) | (buf[3] >> 7);
+ /* Partly decoded immediate field. */
+ imm = (buf[1] << 9) | (buf[2] << 1) | (buf[3] >> 7);
+
+ if (buf[0] == 0x1c /* ai */)
+ {
+ imm >>= 7;
+ imm = (imm ^ 0x200) - 0x200;
+ reg[rt] = reg[ra] + imm;
+
+ if (rt == 1 /* sp */)
+ {
+ if (imm > 0)
+ break;
+ return reg[rt];
+ }
+ }
+ else if (buf[0] == 0x18 && (buf[1] & 0xe0) == 0 /* a */)
+ {
+ int rb = ((buf[1] & 0x1f) << 2) | ((buf[2] & 0xc0) >> 6);
+
+ reg[rt] = reg[ra] + reg[rb];
+ if (rt == 1)
+ return reg[rt];
+ }
+ else if ((buf[0] & 0xfc) == 0x40 /* il, ilh, ilhu, ila */)
+ {
+ if (buf[0] >= 0x42 /* ila */)
+ imm |= (buf[0] & 1) << 17;
+ else
+ {
+ imm &= 0xffff;
+
+ if (buf[0] == 0x40 /* il */)
+ {
+ if ((buf[1] & 0x80) == 0)
+ goto unknown_insn;
+ imm = (imm ^ 0x8000) - 0x8000;
+ }
+ else if ((buf[1] & 0x80) == 0 /* ilhu */)
+ imm <<= 16;
+ }
+ reg[rt] = imm;
+ continue;
+ }
+ else if (buf[0] == 0x60 && (buf[1] & 0x80) != 0 /* iohl */)
+ {
+ reg[rt] |= imm & 0xffff;
+ continue;
+ }
+ else if (buf[0] == 0x04 /* ori */)
+ {
+ imm >>= 7;
+ imm = (imm ^ 0x200) - 0x200;
+ reg[rt] = reg[ra] | imm;
+ continue;
+ }
+ else if ((buf[0] == 0x33 && imm == 1 /* brsl .+4 */)
+ || (buf[0] == 0x08 && (buf[1] & 0xe0) == 0 /* sf */))
+ {
+ /* Used in pic reg load. Say rt is trashed. */
+ reg[rt] = 0;
+ continue;
+ }
+ else if (is_branch (buf))
+ /* If we hit a branch then we must be out of the prologue. */
+ break;
+ unknown_insn:
+ ++unrecog;
+ }
+
+ return 0;
+}
+
+/* qsort predicate to sort symbols by section and value. */
+
+static Elf_Internal_Sym *sort_syms_syms;
+static asection **sort_syms_psecs;
+
+static int
+sort_syms (const void *a, const void *b)
+{
+ Elf_Internal_Sym *const *s1 = a;
+ Elf_Internal_Sym *const *s2 = b;
+ asection *sec1,*sec2;
+ bfd_signed_vma delta;
+
+ sec1 = sort_syms_psecs[*s1 - sort_syms_syms];
+ sec2 = sort_syms_psecs[*s2 - sort_syms_syms];
+
+ if (sec1 != sec2)
+ return sec1->index - sec2->index;
+
+ delta = (*s1)->st_value - (*s2)->st_value;
+ if (delta != 0)
+ return delta < 0 ? -1 : 1;
+
+ delta = (*s2)->st_size - (*s1)->st_size;
+ if (delta != 0)
+ return delta < 0 ? -1 : 1;
+
+ return *s1 < *s2 ? -1 : 1;
+}
+
+struct call_info
+{
+ struct function_info *fun;
+ struct call_info *next;
+ int is_tail;
+};
+
+struct function_info
+{
+ /* List of functions called. Also branches to hot/cold part of
+ function. */
+ struct call_info *call_list;
+ /* For hot/cold part of function, point to owner. */
+ struct function_info *start;
+ /* Symbol at start of function. */
+ union {
+ Elf_Internal_Sym *sym;
+ struct elf_link_hash_entry *h;
+ } u;
+ /* Function section. */
+ asection *sec;
+ /* Address range of (this part of) function. */
+ bfd_vma lo, hi;
+ /* Stack usage. */
+ int stack;
+ /* Set if global symbol. */
+ unsigned int global : 1;
+ /* Set if known to be start of function (as distinct from a hunk
+ in hot/cold section. */
+ unsigned int is_func : 1;
+ /* Flags used during call tree traversal. */
+ unsigned int visit1 : 1;
+ unsigned int non_root : 1;
+ unsigned int visit2 : 1;
+ unsigned int marking : 1;
+ unsigned int visit3 : 1;
+};
+
+struct spu_elf_stack_info
+{
+ int num_fun;
+ int max_fun;
+ /* Variable size array describing functions, one per contiguous
+ address range belonging to a function. */
+ struct function_info fun[1];
+};
+
+/* Allocate a struct spu_elf_stack_info with MAX_FUN struct function_info
+ entries for section SEC. */
+
+static struct spu_elf_stack_info *
+alloc_stack_info (asection *sec, int max_fun)
+{
+ struct _spu_elf_section_data *sec_data = spu_elf_section_data (sec);
+ bfd_size_type amt;
+
+ amt = sizeof (struct spu_elf_stack_info);
+ amt += (max_fun - 1) * sizeof (struct function_info);
+ sec_data->stack_info = bfd_zmalloc (amt);
+ if (sec_data->stack_info != NULL)
+ sec_data->stack_info->max_fun = max_fun;
+ return sec_data->stack_info;
+}
+
+/* Add a new struct function_info describing a (part of a) function
+ starting at SYM_H. Keep the array sorted by address. */
+
+static struct function_info *
+maybe_insert_function (asection *sec,
+ void *sym_h,
+ bfd_boolean global,
+ bfd_boolean is_func)
+{
+ struct _spu_elf_section_data *sec_data = spu_elf_section_data (sec);
+ struct spu_elf_stack_info *sinfo = sec_data->stack_info;
+ int i;
+ bfd_vma off, size;
+
+ if (sinfo == NULL)
+ {
+ sinfo = alloc_stack_info (sec, 20);
+ if (sinfo == NULL)
+ return NULL;
+ }
+
+ if (!global)
+ {
+ Elf_Internal_Sym *sym = sym_h;
+ off = sym->st_value;
+ size = sym->st_size;
+ }
+ else
+ {
+ struct elf_link_hash_entry *h = sym_h;
+ off = h->root.u.def.value;
+ size = h->size;
+ }
+
+ for (i = sinfo->num_fun; --i >= 0; )
+ if (sinfo->fun[i].lo <= off)
+ break;
+
+ if (i >= 0)
+ {
+ /* Don't add another entry for an alias, but do update some
+ info. */
+ if (sinfo->fun[i].lo == off)
+ {
+ /* Prefer globals over local syms. */
+ if (global && !sinfo->fun[i].global)
+ {
+ sinfo->fun[i].global = TRUE;
+ sinfo->fun[i].u.h = sym_h;
+ }
+ if (is_func)
+ sinfo->fun[i].is_func = TRUE;
+ return &sinfo->fun[i];
+ }
+ /* Ignore a zero-size symbol inside an existing function. */
+ else if (sinfo->fun[i].hi > off && size == 0)
+ return &sinfo->fun[i];
+ }
+
+ if (++i < sinfo->num_fun)
+ memmove (&sinfo->fun[i + 1], &sinfo->fun[i],
+ (sinfo->num_fun - i) * sizeof (sinfo->fun[i]));
+ else if (i >= sinfo->max_fun)
+ {
+ bfd_size_type amt = sizeof (struct spu_elf_stack_info);
+ bfd_size_type old = amt;
+
+ old += (sinfo->max_fun - 1) * sizeof (struct function_info);
+ sinfo->max_fun += 20 + (sinfo->max_fun >> 1);
+ amt += (sinfo->max_fun - 1) * sizeof (struct function_info);
+ sinfo = bfd_realloc (sinfo, amt);
+ if (sinfo == NULL)
+ return NULL;
+ memset ((char *) sinfo + old, 0, amt - old);
+ sec_data->stack_info = sinfo;
+ }
+ sinfo->fun[i].is_func = is_func;
+ sinfo->fun[i].global = global;
+ sinfo->fun[i].sec = sec;
+ if (global)
+ sinfo->fun[i].u.h = sym_h;
+ else
+ sinfo->fun[i].u.sym = sym_h;
+ sinfo->fun[i].lo = off;
+ sinfo->fun[i].hi = off + size;
+ sinfo->fun[i].stack = -find_function_stack_adjust (sec, off);
+ sinfo->num_fun += 1;
+ return &sinfo->fun[i];
+}
+
+/* Return the name of FUN. */
+
+static const char *
+func_name (struct function_info *fun)
+{
+ asection *sec;
+ bfd *ibfd;
+ Elf_Internal_Shdr *symtab_hdr;
+
+ while (fun->start != NULL)
+ fun = fun->start;
+
+ if (fun->global)
+ return fun->u.h->root.root.string;
+
+ sec = fun->sec;
+ if (fun->u.sym->st_name == 0)
+ {
+ size_t len = strlen (sec->name);
+ char *name = bfd_malloc (len + 10);
+ if (name == NULL)
+ return "(null)";
+ sprintf (name, "%s+%lx", sec->name,
+ (unsigned long) fun->u.sym->st_value & 0xffffffff);
+ return name;
+ }
+ ibfd = sec->owner;
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ return bfd_elf_sym_name (ibfd, symtab_hdr, fun->u.sym, sec);
+}
+
+/* Read the instruction at OFF in SEC. Return true iff the instruction
+ is a nop, lnop, or stop 0 (all zero insn). */
+
+static bfd_boolean
+is_nop (asection *sec, bfd_vma off)
+{
+ unsigned char insn[4];
+
+ if (off + 4 > sec->size
+ || !bfd_get_section_contents (sec->owner, sec, insn, off, 4))
+ return FALSE;
+ if ((insn[0] & 0xbf) == 0 && (insn[1] & 0xe0) == 0x20)
+ return TRUE;
+ if (insn[0] == 0 && insn[1] == 0 && insn[2] == 0 && insn[3] == 0)
+ return TRUE;
+ return FALSE;
+}
+
+/* Extend the range of FUN to cover nop padding up to LIMIT.
+ Return TRUE iff some instruction other than a NOP was found. */
+
+static bfd_boolean
+insns_at_end (struct function_info *fun, bfd_vma limit)
+{
+ bfd_vma off = (fun->hi + 3) & -4;
+
+ while (off < limit && is_nop (fun->sec, off))
+ off += 4;
+ if (off < limit)
+ {
+ fun->hi = off;
+ return TRUE;
+ }
+ fun->hi = limit;
+ return FALSE;
+}
+
+/* Check and fix overlapping function ranges. Return TRUE iff there
+ are gaps in the current info we have about functions in SEC. */
+
+static bfd_boolean
+check_function_ranges (asection *sec, struct bfd_link_info *info)
+{
+ struct _spu_elf_section_data *sec_data = spu_elf_section_data (sec);
+ struct spu_elf_stack_info *sinfo = sec_data->stack_info;
+ int i;
+ bfd_boolean gaps = FALSE;
+
+ if (sinfo == NULL)
+ return FALSE;
+
+ for (i = 1; i < sinfo->num_fun; i++)
+ if (sinfo->fun[i - 1].hi > sinfo->fun[i].lo)
+ {
+ /* Fix overlapping symbols. */
+ const char *f1 = func_name (&sinfo->fun[i - 1]);
+ const char *f2 = func_name (&sinfo->fun[i]);
+
+ info->callbacks->einfo (_("warning: %s overlaps %s\n"), f1, f2);
+ sinfo->fun[i - 1].hi = sinfo->fun[i].lo;
+ }
+ else if (insns_at_end (&sinfo->fun[i - 1], sinfo->fun[i].lo))
+ gaps = TRUE;
+
+ if (sinfo->num_fun == 0)
+ gaps = TRUE;
+ else
+ {
+ if (sinfo->fun[0].lo != 0)
+ gaps = TRUE;
+ if (sinfo->fun[sinfo->num_fun - 1].hi > sec->size)
+ {
+ const char *f1 = func_name (&sinfo->fun[sinfo->num_fun - 1]);
+
+ info->callbacks->einfo (_("warning: %s exceeds section size\n"), f1);
+ sinfo->fun[sinfo->num_fun - 1].hi = sec->size;
+ }
+ else if (insns_at_end (&sinfo->fun[sinfo->num_fun - 1], sec->size))
+ gaps = TRUE;
+ }
+ return gaps;
+}
+
+/* Search current function info for a function that contains address
+ OFFSET in section SEC. */
+
+static struct function_info *
+find_function (asection *sec, bfd_vma offset, struct bfd_link_info *info)
+{
+ struct _spu_elf_section_data *sec_data = spu_elf_section_data (sec);
+ struct spu_elf_stack_info *sinfo = sec_data->stack_info;
+ int lo, hi, mid;
+
+ lo = 0;
+ hi = sinfo->num_fun;
+ while (lo < hi)
+ {
+ mid = (lo + hi) / 2;
+ if (offset < sinfo->fun[mid].lo)
+ hi = mid;
+ else if (offset >= sinfo->fun[mid].hi)
+ lo = mid + 1;
+ else
+ return &sinfo->fun[mid];
+ }
+ info->callbacks->einfo (_("%A:0x%v not found in function table\n"),
+ sec, offset);
+ return NULL;
+}
+
+/* Add CALLEE to CALLER call list if not already present. */
+
+static bfd_boolean
+insert_callee (struct function_info *caller, struct call_info *callee)
+{
+ struct call_info *p;
+ for (p = caller->call_list; p != NULL; p = p->next)
+ if (p->fun == callee->fun)
+ {
+ /* Tail calls use less stack than normal calls. Retain entry
+ for normal call over one for tail call. */
+ if (p->is_tail > callee->is_tail)
+ p->is_tail = callee->is_tail;
+ return FALSE;
+ }
+ callee->next = caller->call_list;
+ caller->call_list = callee;
+ return TRUE;
+}
+
+/* Rummage through the relocs for SEC, looking for function calls.
+ If CALL_TREE is true, fill in call graph. If CALL_TREE is false,
+ mark destination symbols on calls as being functions. Also
+ look at branches, which may be tail calls or go to hot/cold
+ section part of same function. */
+
+static bfd_boolean
+mark_functions_via_relocs (asection *sec,
+ struct bfd_link_info *info,
+ int call_tree)
+{
+ Elf_Internal_Rela *internal_relocs, *irelaend, *irela;
+ Elf_Internal_Shdr *symtab_hdr = &elf_tdata (sec->owner)->symtab_hdr;
+ Elf_Internal_Sym *syms;
+ void *psyms;
+ static bfd_boolean warned;
+
+ internal_relocs = _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL,
+ info->keep_memory);
+ if (internal_relocs == NULL)
+ return FALSE;
+
+ symtab_hdr = &elf_tdata (sec->owner)->symtab_hdr;
+ psyms = &symtab_hdr->contents;
+ syms = *(Elf_Internal_Sym **) psyms;
+ irela = internal_relocs;
+ irelaend = irela + sec->reloc_count;
+ for (; irela < irelaend; irela++)
+ {
+ enum elf_spu_reloc_type r_type;
+ unsigned int r_indx;
+ asection *sym_sec;
+ Elf_Internal_Sym *sym;
+ struct elf_link_hash_entry *h;
+ bfd_vma val;
+ unsigned char insn[4];
+ bfd_boolean is_call;
+ struct function_info *caller;
+ struct call_info *callee;
+
+ r_type = ELF32_R_TYPE (irela->r_info);
+ if (r_type != R_SPU_REL16
+ && r_type != R_SPU_ADDR16)
+ continue;
+
+ r_indx = ELF32_R_SYM (irela->r_info);
+ if (!get_sym_h (&h, &sym, &sym_sec, psyms, r_indx, sec->owner))
+ return FALSE;
+
+ if (sym_sec == NULL
+ || sym_sec->output_section == NULL
+ || sym_sec->output_section->owner != sec->output_section->owner)
+ continue;
+
+ if (!bfd_get_section_contents (sec->owner, sec, insn,
+ irela->r_offset, 4))
+ return FALSE;
+ if (!is_branch (insn))
+ continue;
+
+ if ((sym_sec->flags & (SEC_ALLOC | SEC_LOAD | SEC_CODE))
+ != (SEC_ALLOC | SEC_LOAD | SEC_CODE))
+ {
+ if (!call_tree)
+ warned = TRUE;
+ if (!call_tree || !warned)
+ info->callbacks->einfo (_("%B(%A+0x%v): call to non-code section"
+ " %B(%A), stack analysis incomplete\n"),
+ sec->owner, sec, irela->r_offset,
+ sym_sec->owner, sym_sec);
+ continue;
+ }
+
+ is_call = (insn[0] & 0xfd) == 0x31;
+
+ if (h)
+ val = h->root.u.def.value;
+ else
+ val = sym->st_value;
+ val += irela->r_addend;
+
+ if (!call_tree)
+ {
+ struct function_info *fun;
+
+ if (irela->r_addend != 0)
+ {
+ Elf_Internal_Sym *fake = bfd_zmalloc (sizeof (*fake));
+ if (fake == NULL)
+ return FALSE;
+ fake->st_value = val;
+ fake->st_shndx
+ = _bfd_elf_section_from_bfd_section (sym_sec->owner, sym_sec);
+ sym = fake;
+ }
+ if (sym)
+ fun = maybe_insert_function (sym_sec, sym, FALSE, is_call);
+ else
+ fun = maybe_insert_function (sym_sec, h, TRUE, is_call);
+ if (fun == NULL)
+ return FALSE;
+ if (irela->r_addend != 0
+ && fun->u.sym != sym)
+ free (sym);
+ continue;
+ }
+
+ caller = find_function (sec, irela->r_offset, info);
+ if (caller == NULL)
+ return FALSE;
+ callee = bfd_malloc (sizeof *callee);
+ if (callee == NULL)
+ return FALSE;
+
+ callee->fun = find_function (sym_sec, val, info);
+ if (callee->fun == NULL)
+ return FALSE;
+ callee->is_tail = !is_call;
+ if (!insert_callee (caller, callee))
+ free (callee);
+ else if (!is_call
+ && !callee->fun->is_func
+ && callee->fun->stack == 0)
+ {
+ /* This is either a tail call or a branch from one part of
+ the function to another, ie. hot/cold section. If the
+ destination has been called by some other function then
+ it is a separate function. We also assume that functions
+ are not split across input files. */
+ if (callee->fun->start != NULL
+ || sec->owner != sym_sec->owner)
+ {
+ callee->fun->start = NULL;
+ callee->fun->is_func = TRUE;
+ }
+ else
+ callee->fun->start = caller;
+ }
+ }
+
+ return TRUE;
+}
+
+/* Handle something like .init or .fini, which has a piece of a function.
+ These sections are pasted together to form a single function. */
+
+static bfd_boolean
+pasted_function (asection *sec, struct bfd_link_info *info)
+{
+ struct bfd_link_order *l;
+ struct _spu_elf_section_data *sec_data;
+ struct spu_elf_stack_info *sinfo;
+ Elf_Internal_Sym *fake;
+ struct function_info *fun, *fun_start;
+
+ fake = bfd_zmalloc (sizeof (*fake));
+ if (fake == NULL)
+ return FALSE;
+ fake->st_value = 0;
+ fake->st_size = sec->size;
+ fake->st_shndx
+ = _bfd_elf_section_from_bfd_section (sec->owner, sec);
+ fun = maybe_insert_function (sec, fake, FALSE, FALSE);
+ if (!fun)
+ return FALSE;
+
+ /* Find a function immediately preceding this section. */
+ fun_start = NULL;
+ for (l = sec->output_section->map_head.link_order; l != NULL; l = l->next)
+ {
+ if (l->u.indirect.section == sec)
+ {
+ if (fun_start != NULL)
+ {
+ if (fun_start->start)
+ fun_start = fun_start->start;
+ fun->start = fun_start;
+ }
+ return TRUE;
+ }
+ if (l->type == bfd_indirect_link_order
+ && (sec_data = spu_elf_section_data (l->u.indirect.section)) != NULL
+ && (sinfo = sec_data->stack_info) != NULL
+ && sinfo->num_fun != 0)
+ fun_start = &sinfo->fun[sinfo->num_fun - 1];
+ }
+
+ info->callbacks->einfo (_("%A link_order not found\n"), sec);
+ return FALSE;
+}
+
+/* We're only interested in code sections. */
+
+static bfd_boolean
+interesting_section (asection *s, bfd *obfd, struct spu_link_hash_table *htab)
+{
+ return (s != htab->stub
+ && s->output_section != NULL
+ && s->output_section->owner == obfd
+ && ((s->flags & (SEC_ALLOC | SEC_LOAD | SEC_CODE))
+ == (SEC_ALLOC | SEC_LOAD | SEC_CODE))
+ && s->size != 0);
+}
+
+/* Map address ranges in code sections to functions. */
+
+static bfd_boolean
+discover_functions (bfd *output_bfd, struct bfd_link_info *info)
+{
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+ bfd *ibfd;
+ int bfd_idx;
+ Elf_Internal_Sym ***psym_arr;
+ asection ***sec_arr;
+ bfd_boolean gaps = FALSE;
+
+ bfd_idx = 0;
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ bfd_idx++;
+
+ psym_arr = bfd_zmalloc (bfd_idx * sizeof (*psym_arr));
+ if (psym_arr == NULL)
+ return FALSE;
+ sec_arr = bfd_zmalloc (bfd_idx * sizeof (*sec_arr));
+ if (sec_arr == NULL)
+ return FALSE;
+
+
+ for (ibfd = info->input_bfds, bfd_idx = 0;
+ ibfd != NULL;
+ ibfd = ibfd->link_next, bfd_idx++)
+ {
+ extern const bfd_target bfd_elf32_spu_vec;
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *sec;
+ size_t symcount;
+ Elf_Internal_Sym *syms, *sy, **psyms, **psy;
+ asection **psecs, **p;
+
+ if (ibfd->xvec != &bfd_elf32_spu_vec)
+ continue;
+
+ /* Read all the symbols. */
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ symcount = symtab_hdr->sh_size / symtab_hdr->sh_entsize;
+ if (symcount == 0)
+ continue;
+
+ syms = (Elf_Internal_Sym *) symtab_hdr->contents;
+ if (syms == NULL)
+ {
+ syms = bfd_elf_get_elf_syms (ibfd, symtab_hdr, symcount, 0,
+ NULL, NULL, NULL);
+ symtab_hdr->contents = (void *) syms;
+ if (syms == NULL)
+ return FALSE;
+ }
+
+ /* Select defined function symbols that are going to be output. */
+ psyms = bfd_malloc ((symcount + 1) * sizeof (*psyms));
+ if (psyms == NULL)
+ return FALSE;
+ psym_arr[bfd_idx] = psyms;
+ psecs = bfd_malloc (symcount * sizeof (*psecs));
+ if (psecs == NULL)
+ return FALSE;
+ sec_arr[bfd_idx] = psecs;
+ for (psy = psyms, p = psecs, sy = syms; sy < syms + symcount; ++p, ++sy)
+ if (ELF_ST_TYPE (sy->st_info) == STT_NOTYPE
+ || ELF_ST_TYPE (sy->st_info) == STT_FUNC)
+ {
+ asection *s;
+
+ *p = s = bfd_section_from_elf_index (ibfd, sy->st_shndx);
+ if (s != NULL && interesting_section (s, output_bfd, htab))
+ *psy++ = sy;
+ }
+ symcount = psy - psyms;
+ *psy = NULL;
+
+ /* Sort them by section and offset within section. */
+ sort_syms_syms = syms;
+ sort_syms_psecs = psecs;
+ qsort (psyms, symcount, sizeof (*psyms), sort_syms);
+
+ /* Now inspect the function symbols. */
+ for (psy = psyms; psy < psyms + symcount; )
+ {
+ asection *s = psecs[*psy - syms];
+ Elf_Internal_Sym **psy2;
+
+ for (psy2 = psy; ++psy2 < psyms + symcount; )
+ if (psecs[*psy2 - syms] != s)
+ break;
+
+ if (!alloc_stack_info (s, psy2 - psy))
+ return FALSE;
+ psy = psy2;
+ }
+
+ /* First install info about properly typed and sized functions.
+ In an ideal world this will cover all code sections, except
+ when partitioning functions into hot and cold sections,
+ and the horrible pasted together .init and .fini functions. */
+ for (psy = psyms; psy < psyms + symcount; ++psy)
+ {
+ sy = *psy;
+ if (ELF_ST_TYPE (sy->st_info) == STT_FUNC)
+ {
+ asection *s = psecs[sy - syms];
+ if (!maybe_insert_function (s, sy, FALSE, TRUE))
+ return FALSE;
+ }
+ }
+
+ for (sec = ibfd->sections; sec != NULL && !gaps; sec = sec->next)
+ if (interesting_section (sec, output_bfd, htab))
+ gaps |= check_function_ranges (sec, info);
+ }
+
+ if (gaps)
+ {
+ /* See if we can discover more function symbols by looking at
+ relocations. */
+ for (ibfd = info->input_bfds, bfd_idx = 0;
+ ibfd != NULL;
+ ibfd = ibfd->link_next, bfd_idx++)
+ {
+ asection *sec;
+
+ if (psym_arr[bfd_idx] == NULL)
+ continue;
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ if (interesting_section (sec, output_bfd, htab)
+ && sec->reloc_count != 0)
+ {
+ if (!mark_functions_via_relocs (sec, info, FALSE))
+ return FALSE;
+ }
+ }
+
+ for (ibfd = info->input_bfds, bfd_idx = 0;
+ ibfd != NULL;
+ ibfd = ibfd->link_next, bfd_idx++)
+ {
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *sec;
+ Elf_Internal_Sym *syms, *sy, **psyms, **psy;
+ asection **psecs;
+
+ if ((psyms = psym_arr[bfd_idx]) == NULL)
+ continue;
+
+ psecs = sec_arr[bfd_idx];
+
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ syms = (Elf_Internal_Sym *) symtab_hdr->contents;
+
+ gaps = FALSE;
+ for (sec = ibfd->sections; sec != NULL && !gaps; sec = sec->next)
+ if (interesting_section (sec, output_bfd, htab))
+ gaps |= check_function_ranges (sec, info);
+ if (!gaps)
+ continue;
+
+ /* Finally, install all globals. */
+ for (psy = psyms; (sy = *psy) != NULL; ++psy)
+ {
+ asection *s;
+
+ s = psecs[sy - syms];
+
+ /* Global syms might be improperly typed functions. */
+ if (ELF_ST_TYPE (sy->st_info) != STT_FUNC
+ && ELF_ST_BIND (sy->st_info) == STB_GLOBAL)
+ {
+ if (!maybe_insert_function (s, sy, FALSE, FALSE))
+ return FALSE;
+ }
+ }
+
+ /* Some of the symbols we've installed as marking the
+ beginning of functions may have a size of zero. Extend
+ the range of such functions to the beginning of the
+ next symbol of interest. */
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ if (interesting_section (sec, output_bfd, htab))
+ {
+ struct _spu_elf_section_data *sec_data;
+ struct spu_elf_stack_info *sinfo;
+
+ sec_data = spu_elf_section_data (sec);
+ sinfo = sec_data->stack_info;
+ if (sinfo != NULL)
+ {
+ int fun_idx;
+ bfd_vma hi = sec->size;
+
+ for (fun_idx = sinfo->num_fun; --fun_idx >= 0; )
+ {
+ sinfo->fun[fun_idx].hi = hi;
+ hi = sinfo->fun[fun_idx].lo;
+ }
+ }
+ /* No symbols in this section. Must be .init or .fini
+ or something similar. */
+ else if (!pasted_function (sec, info))
+ return FALSE;
+ }
+ }
+ }
+
+ for (ibfd = info->input_bfds, bfd_idx = 0;
+ ibfd != NULL;
+ ibfd = ibfd->link_next, bfd_idx++)
+ {
+ if (psym_arr[bfd_idx] == NULL)
+ continue;
+
+ free (psym_arr[bfd_idx]);
+ free (sec_arr[bfd_idx]);
+ }
+
+ free (psym_arr);
+ free (sec_arr);
+
+ return TRUE;
+}
+
+/* Mark nodes in the call graph that are called by some other node. */
+
+static void
+mark_non_root (struct function_info *fun)
+{
+ struct call_info *call;
+
+ fun->visit1 = TRUE;
+ for (call = fun->call_list; call; call = call->next)
+ {
+ call->fun->non_root = TRUE;
+ if (!call->fun->visit1)
+ mark_non_root (call->fun);
+ }
+}
+
+/* Remove cycles from the call graph. */
+
+static void
+call_graph_traverse (struct function_info *fun, struct bfd_link_info *info)
+{
+ struct call_info **callp, *call;
+
+ fun->visit2 = TRUE;
+ fun->marking = TRUE;
+
+ callp = &fun->call_list;
+ while ((call = *callp) != NULL)
+ {
+ if (!call->fun->visit2)
+ call_graph_traverse (call->fun, info);
+ else if (call->fun->marking)
+ {
+ const char *f1 = func_name (fun);
+ const char *f2 = func_name (call->fun);
+
+ info->callbacks->info (_("Stack analysis will ignore the call "
+ "from %s to %s\n"),
+ f1, f2);
+ *callp = call->next;
+ continue;
+ }
+ callp = &call->next;
+ }
+ fun->marking = FALSE;
+}
+
+/* Populate call_list for each function. */
+
+static bfd_boolean
+build_call_tree (bfd *output_bfd, struct bfd_link_info *info)
+{
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+ bfd *ibfd;
+
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ extern const bfd_target bfd_elf32_spu_vec;
+ asection *sec;
+
+ if (ibfd->xvec != &bfd_elf32_spu_vec)
+ continue;
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ if (!interesting_section (sec, output_bfd, htab)
+ || sec->reloc_count == 0)
+ continue;
+
+ if (!mark_functions_via_relocs (sec, info, TRUE))
+ return FALSE;
+ }
+
+ /* Transfer call info from hot/cold section part of function
+ to main entry. */
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ struct _spu_elf_section_data *sec_data;
+ struct spu_elf_stack_info *sinfo;
+
+ if ((sec_data = spu_elf_section_data (sec)) != NULL
+ && (sinfo = sec_data->stack_info) != NULL)
+ {
+ int i;
+ for (i = 0; i < sinfo->num_fun; ++i)
+ {
+ if (sinfo->fun[i].start != NULL)
+ {
+ struct call_info *call = sinfo->fun[i].call_list;
+
+ while (call != NULL)
+ {
+ struct call_info *call_next = call->next;
+ if (!insert_callee (sinfo->fun[i].start, call))
+ free (call);
+ call = call_next;
+ }
+ sinfo->fun[i].call_list = NULL;
+ sinfo->fun[i].non_root = TRUE;
+ }
+ }
+ }
+ }
+ }
+
+ /* Find the call graph root(s). */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ extern const bfd_target bfd_elf32_spu_vec;
+ asection *sec;
+
+ if (ibfd->xvec != &bfd_elf32_spu_vec)
+ continue;
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ struct _spu_elf_section_data *sec_data;
+ struct spu_elf_stack_info *sinfo;
+
+ if ((sec_data = spu_elf_section_data (sec)) != NULL
+ && (sinfo = sec_data->stack_info) != NULL)
+ {
+ int i;
+ for (i = 0; i < sinfo->num_fun; ++i)
+ if (!sinfo->fun[i].visit1)
+ mark_non_root (&sinfo->fun[i]);
+ }
+ }
+ }
+
+ /* Remove cycles from the call graph. We start from the root node(s)
+ so that we break cycles in a reasonable place. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ extern const bfd_target bfd_elf32_spu_vec;
+ asection *sec;
+
+ if (ibfd->xvec != &bfd_elf32_spu_vec)
+ continue;
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ struct _spu_elf_section_data *sec_data;
+ struct spu_elf_stack_info *sinfo;
+
+ if ((sec_data = spu_elf_section_data (sec)) != NULL
+ && (sinfo = sec_data->stack_info) != NULL)
+ {
+ int i;
+ for (i = 0; i < sinfo->num_fun; ++i)
+ if (!sinfo->fun[i].non_root)
+ call_graph_traverse (&sinfo->fun[i], info);
+ }
+ }
+ }
+
+ return TRUE;
+}
+
+/* Descend the call graph for FUN, accumulating total stack required. */
+
+static bfd_vma
+sum_stack (struct function_info *fun,
+ struct bfd_link_info *info,
+ int emit_stack_syms)
+{
+ struct call_info *call;
+ struct function_info *max = NULL;
+ bfd_vma max_stack = fun->stack;
+ bfd_vma stack;
+ const char *f1;
+
+ if (fun->visit3)
+ return max_stack;
+
+ for (call = fun->call_list; call; call = call->next)
+ {
+ stack = sum_stack (call->fun, info, emit_stack_syms);
+ /* Include caller stack for normal calls, don't do so for
+ tail calls. fun->stack here is local stack usage for
+ this function. */
+ if (!call->is_tail)
+ stack += fun->stack;
+ if (max_stack < stack)
+ {
+ max_stack = stack;
+ max = call->fun;
+ }
+ }
+
+ f1 = func_name (fun);
+ info->callbacks->minfo (_("%s: 0x%v 0x%v\n"), f1, fun->stack, max_stack);
+
+ if (fun->call_list)
+ {
+ info->callbacks->minfo (_(" calls:\n"));
+ for (call = fun->call_list; call; call = call->next)
+ {
+ const char *f2 = func_name (call->fun);
+ const char *ann1 = call->fun == max ? "*" : " ";
+ const char *ann2 = call->is_tail ? "t" : " ";
+
+ info->callbacks->minfo (_(" %s%s %s\n"), ann1, ann2, f2);
+ }
+ }
+
+ /* Now fun->stack holds cumulative stack. */
+ fun->stack = max_stack;
+ fun->visit3 = TRUE;
+
+ if (emit_stack_syms)
+ {
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+ char *name = bfd_malloc (18 + strlen (f1));
+ struct elf_link_hash_entry *h;
+
+ if (name != NULL)
+ {
+ if (fun->global || ELF_ST_BIND (fun->u.sym->st_info) == STB_GLOBAL)
+ sprintf (name, "__stack_%s", f1);
+ else
+ sprintf (name, "__stack_%x_%s", fun->sec->id & 0xffffffff, f1);
+
+ h = elf_link_hash_lookup (&htab->elf, name, TRUE, TRUE, FALSE);
+ free (name);
+ if (h != NULL
+ && (h->root.type == bfd_link_hash_new
+ || h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak))
+ {
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.section = bfd_abs_section_ptr;
+ h->root.u.def.value = max_stack;
+ h->size = 0;
+ h->type = 0;
+ h->ref_regular = 1;
+ h->def_regular = 1;
+ h->ref_regular_nonweak = 1;
+ h->forced_local = 1;
+ h->non_elf = 0;
+ }
+ }
+ }
+
+ return max_stack;
+}
+
+/* Provide an estimate of total stack required. */
+
+static bfd_boolean
+spu_elf_stack_analysis (bfd *output_bfd,
+ struct bfd_link_info *info,
+ int emit_stack_syms)
+{
+ bfd *ibfd;
+ bfd_vma max_stack = 0;
+
+ if (!discover_functions (output_bfd, info))
+ return FALSE;
+
+ if (!build_call_tree (output_bfd, info))
+ return FALSE;
+
+ info->callbacks->info (_("Stack size for call graph root nodes.\n"));
+ info->callbacks->minfo (_("\nStack size for functions. "
+ "Annotations: '*' max stack, 't' tail call\n"));
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ extern const bfd_target bfd_elf32_spu_vec;
+ asection *sec;
+
+ if (ibfd->xvec != &bfd_elf32_spu_vec)
+ continue;
+
+ for (sec = ibfd->sections; sec != NULL; sec = sec->next)
+ {
+ struct _spu_elf_section_data *sec_data;
+ struct spu_elf_stack_info *sinfo;
+
+ if ((sec_data = spu_elf_section_data (sec)) != NULL
+ && (sinfo = sec_data->stack_info) != NULL)
+ {
+ int i;
+ for (i = 0; i < sinfo->num_fun; ++i)
+ {
+ if (!sinfo->fun[i].non_root)
+ {
+ bfd_vma stack;
+ const char *f1;
+
+ stack = sum_stack (&sinfo->fun[i], info,
+ emit_stack_syms);
+ f1 = func_name (&sinfo->fun[i]);
+ info->callbacks->info (_(" %s: 0x%v\n"),
+ f1, stack);
+ if (max_stack < stack)
+ max_stack = stack;
+ }
+ }
+ }
+ }
+ }
+
+ info->callbacks->info (_("Maximum stack required is 0x%v\n"), max_stack);
+ return TRUE;
+}
+
+/* Perform a final link. */
+
+static bfd_boolean
+spu_elf_final_link (bfd *output_bfd, struct bfd_link_info *info)
+{
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+
+ if (htab->stack_analysis
+ && !spu_elf_stack_analysis (output_bfd, info, htab->emit_stack_syms))
+ info->callbacks->einfo ("%X%P: stack analysis error: %E\n");
+
+ return bfd_elf_final_link (output_bfd, info);
+}
+
+/* Called when not normally emitting relocs, ie. !info->relocatable
+ and !info->emitrelocations. Returns a count of special relocs
+ that need to be emitted. */
+
+static unsigned int
+spu_elf_count_relocs (asection *sec, Elf_Internal_Rela *relocs)
+{
+ unsigned int count = 0;
+ Elf_Internal_Rela *relend = relocs + sec->reloc_count;
+
+ for (; relocs < relend; relocs++)
+ {
+ int r_type = ELF32_R_TYPE (relocs->r_info);
+ if (r_type == R_SPU_PPU32 || r_type == R_SPU_PPU64)
+ ++count;
+ }
+
+ return count;
+}
+
+/* Apply RELOCS to CONTENTS of INPUT_SECTION from INPUT_BFD. */
+
+static bfd_boolean
+spu_elf_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
+{
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ Elf_Internal_Rela *rel, *relend;
+ struct spu_link_hash_table *htab;
+ bfd_boolean ret = TRUE;
+ bfd_boolean emit_these_relocs = FALSE;
+
+ htab = spu_hash_table (info);
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = (struct elf_link_hash_entry **) (elf_sym_hashes (input_bfd));
+
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+ reloc_howto_type *howto;
+ unsigned long r_symndx;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ struct elf_link_hash_entry *h;
+ const char *sym_name;
+ bfd_vma relocation;
+ bfd_vma addend;
+ bfd_reloc_status_type r;
+ bfd_boolean unresolved_reloc;
+ bfd_boolean warned;
+ bfd_boolean branch;
+
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ r_type = ELF32_R_TYPE (rel->r_info);
+ if (r_type == R_SPU_PPU32 || r_type == R_SPU_PPU64)
+ {
+ emit_these_relocs = TRUE;
+ continue;
+ }
+
+ howto = elf_howto_table + r_type;
+ unresolved_reloc = FALSE;
+ warned = FALSE;
+ h = NULL;
+ sym = NULL;
+ sec = NULL;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ sym_name = bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sec);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
+ }
+ else
+ {
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+ h, sec, relocation,
+ unresolved_reloc, warned);
+ sym_name = h->root.root.string;
+ }
+
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ continue;
+
+ if (unresolved_reloc)
+ {
+ (*_bfd_error_handler)
+ (_("%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"),
+ input_bfd,
+ bfd_get_section_name (input_bfd, input_section),
+ (long) rel->r_offset,
+ howto->name,
+ sym_name);
+ ret = FALSE;
+ }
+
+ /* If this symbol is in an overlay area, we may need to relocate
+ to the overlay stub. */
+ addend = rel->r_addend;
+ branch = (is_branch (contents + rel->r_offset)
+ || is_hint (contents + rel->r_offset));
+ if (needs_ovl_stub (sym_name, sec, input_section, htab, branch))
+ {
+ char *stub_name;
+ struct spu_stub_hash_entry *sh;
+
+ stub_name = spu_stub_name (sec, h, rel);
+ if (stub_name == NULL)
+ return FALSE;
+
+ sh = (struct spu_stub_hash_entry *)
+ bfd_hash_lookup (&htab->stub_hash_table, stub_name, FALSE, FALSE);
+ if (sh != NULL)
+ {
+ relocation = (htab->stub->output_section->vma
+ + htab->stub->output_offset
+ + sh->off);
+ addend = 0;
+ }
+ free (stub_name);
+ }
+
+ r = _bfd_final_link_relocate (howto,
+ input_bfd,
+ input_section,
+ contents,
+ rel->r_offset, relocation, addend);
+
+ if (r != bfd_reloc_ok)
+ {
+ const char *msg = (const char *) 0;
+
+ switch (r)
+ {
+ case bfd_reloc_overflow:
+ if (!((*info->callbacks->reloc_overflow)
+ (info, (h ? &h->root : NULL), sym_name, howto->name,
+ (bfd_vma) 0, input_bfd, input_section, rel->r_offset)))
+ return FALSE;
+ break;
+
+ case bfd_reloc_undefined:
+ if (!((*info->callbacks->undefined_symbol)
+ (info, sym_name, input_bfd, input_section,
+ rel->r_offset, TRUE)))
+ return FALSE;
+ break;
+
+ case bfd_reloc_outofrange:
+ msg = _("internal error: out of range error");
+ goto common_error;
+
+ case bfd_reloc_notsupported:
+ msg = _("internal error: unsupported relocation error");
+ goto common_error;
+
+ case bfd_reloc_dangerous:
+ msg = _("internal error: dangerous error");
+ goto common_error;
+
+ default:
+ msg = _("internal error: unknown error");
+ /* fall through */
+
+ common_error:
+ if (!((*info->callbacks->warning)
+ (info, msg, sym_name, input_bfd, input_section,
+ rel->r_offset)))
+ return FALSE;
+ break;
+ }
+ }
+ }
+
+ if (ret
+ && emit_these_relocs
+ && !info->relocatable
+ && !info->emitrelocations)
+ {
+ Elf_Internal_Rela *wrel;
+ Elf_Internal_Shdr *rel_hdr;
+
+ wrel = rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ int r_type;
+
+ r_type = ELF32_R_TYPE (rel->r_info);
+ if (r_type == R_SPU_PPU32 || r_type == R_SPU_PPU64)
+ *wrel++ = *rel;
+ }
+ input_section->reloc_count = wrel - relocs;
+ /* Backflips for _bfd_elf_link_output_relocs. */
+ rel_hdr = &elf_section_data (input_section)->rel_hdr;
+ rel_hdr->sh_size = input_section->reloc_count * rel_hdr->sh_entsize;
+ ret = 2;
+ }
+
+ return ret;
+}
+
+/* Adjust _SPUEAR_ syms to point at their overlay stubs. */
+
+static bfd_boolean
+spu_elf_output_symbol_hook (struct bfd_link_info *info,
+ const char *sym_name ATTRIBUTE_UNUSED,
+ Elf_Internal_Sym *sym,
+ asection *sym_sec ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h)
+{
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+
+ if (!info->relocatable
+ && htab->num_overlays != 0
+ && h != NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->def_regular
+ && strncmp (h->root.root.string, "_SPUEAR_", 8) == 0)
+ {
+ static Elf_Internal_Rela zero_rel;
+ char *stub_name = spu_stub_name (h->root.u.def.section, h, &zero_rel);
+ struct spu_stub_hash_entry *sh;
+
+ if (stub_name == NULL)
+ return FALSE;
+ sh = (struct spu_stub_hash_entry *)
+ bfd_hash_lookup (&htab->stub_hash_table, stub_name, FALSE, FALSE);
+ free (stub_name);
+ if (sh == NULL)
+ return TRUE;
+ sym->st_shndx
+ = _bfd_elf_section_from_bfd_section (htab->stub->output_section->owner,
+ htab->stub->output_section);
+ sym->st_value = (htab->stub->output_section->vma
+ + htab->stub->output_offset
+ + sh->off);
+ }
+
+ return TRUE;
+}
+
+static int spu_plugin = 0;
+
+void
+spu_elf_plugin (int val)
+{
+ spu_plugin = val;
+}
+
+/* Set ELF header e_type for plugins. */
+
+static void
+spu_elf_post_process_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ if (spu_plugin)
+ {
+ Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
+
+ i_ehdrp->e_type = ET_DYN;
+ }
+}
+
+/* We may add an extra PT_LOAD segment for .toe. We also need extra
+ segments for overlays. */
+
+static int
+spu_elf_additional_program_headers (bfd *abfd, struct bfd_link_info *info)
+{
+ struct spu_link_hash_table *htab = spu_hash_table (info);
+ int extra = htab->num_overlays;
+ asection *sec;
+
+ if (extra)
+ ++extra;
+
+ sec = bfd_get_section_by_name (abfd, ".toe");
+ if (sec != NULL && (sec->flags & SEC_LOAD) != 0)
+ ++extra;
+
+ return extra;
+}
+
+/* Remove .toe section from other PT_LOAD segments and put it in
+ a segment of its own. Put overlays in separate segments too. */
+
+static bfd_boolean
+spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info)
+{
+ asection *toe, *s;
+ struct elf_segment_map *m;
+ unsigned int i;
+
+ if (info == NULL)
+ return TRUE;
+
+ toe = bfd_get_section_by_name (abfd, ".toe");
+ for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ if (m->p_type == PT_LOAD && m->count > 1)
+ for (i = 0; i < m->count; i++)
+ if ((s = m->sections[i]) == toe
+ || spu_elf_section_data (s)->ovl_index != 0)
+ {
+ struct elf_segment_map *m2;
+ bfd_vma amt;
+
+ if (i + 1 < m->count)
+ {
+ amt = sizeof (struct elf_segment_map);
+ amt += (m->count - (i + 2)) * sizeof (m->sections[0]);
+ m2 = bfd_zalloc (abfd, amt);
+ if (m2 == NULL)
+ return FALSE;
+ m2->count = m->count - (i + 1);
+ memcpy (m2->sections, m->sections + i + 1,
+ m2->count * sizeof (m->sections[0]));
+ m2->p_type = PT_LOAD;
+ m2->next = m->next;
+ m->next = m2;
+ }
+ m->count = 1;
+ if (i != 0)
+ {
+ m->count = i;
+ amt = sizeof (struct elf_segment_map);
+ m2 = bfd_zalloc (abfd, amt);
+ if (m2 == NULL)
+ return FALSE;
+ m2->p_type = PT_LOAD;
+ m2->count = 1;
+ m2->sections[0] = s;
+ m2->next = m->next;
+ m->next = m2;
+ }
+ break;
+ }
+
+ return TRUE;
+}
+
+/* Check that all loadable section VMAs lie in the range
+ LO .. HI inclusive. */
+
+asection *
+spu_elf_check_vma (bfd *abfd, bfd_vma lo, bfd_vma hi)
+{
+ struct elf_segment_map *m;
+ unsigned int i;
+
+ for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ if (m->p_type == PT_LOAD)
+ for (i = 0; i < m->count; i++)
+ if (m->sections[i]->size != 0
+ && (m->sections[i]->vma < lo
+ || m->sections[i]->vma > hi
+ || m->sections[i]->vma + m->sections[i]->size - 1 > hi))
+ return m->sections[i];
+
+ return NULL;
+}
+
+/* Tweak the section type of .note.spu_name. */
+
+static bfd_boolean
+spu_elf_fake_sections (bfd *obfd ATTRIBUTE_UNUSED,
+ Elf_Internal_Shdr *hdr,
+ asection *sec)
+{
+ if (strcmp (sec->name, SPU_PTNOTE_SPUNAME) == 0)
+ hdr->sh_type = SHT_NOTE;
+ return TRUE;
+}
+
+/* Tweak phdrs before writing them out. */
+
+static int
+spu_elf_modify_program_headers (bfd *abfd, struct bfd_link_info *info)
+{
+ const struct elf_backend_data *bed;
+ struct elf_obj_tdata *tdata;
+ Elf_Internal_Phdr *phdr, *last;
+ struct spu_link_hash_table *htab;
+ unsigned int count;
+ unsigned int i;
+
+ if (info == NULL)
+ return TRUE;
+
+ bed = get_elf_backend_data (abfd);
+ tdata = elf_tdata (abfd);
+ phdr = tdata->phdr;
+ count = tdata->program_header_size / bed->s->sizeof_phdr;
+ htab = spu_hash_table (info);
+ if (htab->num_overlays != 0)
+ {
+ struct elf_segment_map *m;
+ unsigned int o;
+
+ for (i = 0, m = elf_tdata (abfd)->segment_map; m; ++i, m = m->next)
+ if (m->count != 0
+ && (o = spu_elf_section_data (m->sections[0])->ovl_index) != 0)
+ {
+ /* Mark this as an overlay header. */
+ phdr[i].p_flags |= PF_OVERLAY;
+
+ if (htab->ovtab != NULL && htab->ovtab->size != 0)
+ {
+ bfd_byte *p = htab->ovtab->contents;
+ unsigned int off = (o - 1) * 16 + 8;
+
+ /* Write file_off into _ovly_table. */
+ bfd_put_32 (htab->ovtab->owner, phdr[i].p_offset, p + off);
+ }
+ }
+ }
+
+ /* Round up p_filesz and p_memsz of PT_LOAD segments to multiples
+ of 16. This should always be possible when using the standard
+ linker scripts, but don't create overlapping segments if
+ someone is playing games with linker scripts. */
+ last = NULL;
+ for (i = count; i-- != 0; )
+ if (phdr[i].p_type == PT_LOAD)
+ {
+ unsigned adjust;
+
+ adjust = -phdr[i].p_filesz & 15;
+ if (adjust != 0
+ && last != NULL
+ && phdr[i].p_offset + phdr[i].p_filesz > last->p_offset - adjust)
+ break;
+
+ adjust = -phdr[i].p_memsz & 15;
+ if (adjust != 0
+ && last != NULL
+ && phdr[i].p_filesz != 0
+ && phdr[i].p_vaddr + phdr[i].p_memsz > last->p_vaddr - adjust
+ && phdr[i].p_vaddr + phdr[i].p_memsz <= last->p_vaddr)
+ break;
+
+ if (phdr[i].p_filesz != 0)
+ last = &phdr[i];
+ }
+
+ if (i == (unsigned int) -1)
+ for (i = count; i-- != 0; )
+ if (phdr[i].p_type == PT_LOAD)
+ {
+ unsigned adjust;
+
+ adjust = -phdr[i].p_filesz & 15;
+ phdr[i].p_filesz += adjust;
+
+ adjust = -phdr[i].p_memsz & 15;
+ phdr[i].p_memsz += adjust;
+ }
+
+ return TRUE;
+}
+
+#define TARGET_BIG_SYM bfd_elf32_spu_vec
+#define TARGET_BIG_NAME "elf32-spu"
+#define ELF_ARCH bfd_arch_spu
+#define ELF_MACHINE_CODE EM_SPU
+/* This matches the alignment need for DMA. */
+#define ELF_MAXPAGESIZE 0x80
+#define elf_backend_rela_normal 1
+#define elf_backend_can_gc_sections 1
+
+#define bfd_elf32_bfd_reloc_type_lookup spu_elf_reloc_type_lookup
+#define bfd_elf32_bfd_reloc_name_lookup spu_elf_reloc_name_lookup
+#define elf_info_to_howto spu_elf_info_to_howto
+#define elf_backend_count_relocs spu_elf_count_relocs
+#define elf_backend_relocate_section spu_elf_relocate_section
+#define elf_backend_symbol_processing spu_elf_backend_symbol_processing
+#define elf_backend_link_output_symbol_hook spu_elf_output_symbol_hook
+#define bfd_elf32_new_section_hook spu_elf_new_section_hook
+#define bfd_elf32_bfd_link_hash_table_create spu_elf_link_hash_table_create
+#define bfd_elf32_bfd_link_hash_table_free spu_elf_link_hash_table_free
+
+#define elf_backend_additional_program_headers spu_elf_additional_program_headers
+#define elf_backend_modify_segment_map spu_elf_modify_segment_map
+#define elf_backend_modify_program_headers spu_elf_modify_program_headers
+#define elf_backend_post_process_headers spu_elf_post_process_headers
+#define elf_backend_fake_sections spu_elf_fake_sections
+#define elf_backend_special_sections spu_elf_special_sections
+#define bfd_elf32_bfd_final_link spu_elf_final_link
+
+#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-spu.h b/contrib/binutils/bfd/elf32-spu.h
new file mode 100644
index 0000000..b74c310
--- /dev/null
+++ b/contrib/binutils/bfd/elf32-spu.h
@@ -0,0 +1,57 @@
+/* SPU specific support for 32-bit ELF.
+
+ Copyright 2006, 2007 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. */
+
+/* Extra info kept for SPU sections. */
+
+struct spu_elf_stack_info;
+
+struct _spu_elf_section_data
+{
+ struct bfd_elf_section_data elf;
+
+ /* Stack analysis info kept for this section. */
+
+ struct spu_elf_stack_info *stack_info;
+
+ /* Non-zero for overlay output sections. */
+ unsigned int ovl_index;
+};
+
+#define spu_elf_section_data(sec) \
+ ((struct _spu_elf_section_data *) elf_section_data (sec))
+
+struct _ovl_stream
+{
+ const void *start;
+ const void *end;
+};
+
+extern void spu_elf_plugin (int);
+extern bfd_boolean spu_elf_open_builtin_lib (bfd **,
+ const struct _ovl_stream *);
+extern bfd_boolean spu_elf_create_sections (bfd *,
+ struct bfd_link_info *, int, int);
+extern bfd_boolean spu_elf_find_overlays (bfd *, struct bfd_link_info *);
+extern bfd_boolean spu_elf_size_stubs (bfd *, struct bfd_link_info *, int, int,
+ asection **, asection **,
+ asection **);
+extern bfd_boolean spu_elf_build_stubs (struct bfd_link_info *, int,
+ asection *);
+extern asection *spu_elf_check_vma (bfd *, bfd_vma, bfd_vma);
diff --git a/contrib/binutils/bfd/elf64-alpha.c b/contrib/binutils/bfd/elf64-alpha.c
index 76d0661..3d4350d 100644
--- a/contrib/binutils/bfd/elf64-alpha.c
+++ b/contrib/binutils/bfd/elf64-alpha.c
@@ -1,6 +1,6 @@
/* Alpha specific support for 64-bit ELF
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006 Free Software Foundation, Inc.
+ 2006, 2007 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,8 +22,8 @@
/* We need a published ABI spec for this. Until one comes out, don't
assume this'll remain unchanged forever. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -184,6 +184,10 @@ struct alpha_elf_link_hash_table
/* The head of a list of .got subsections linked through
alpha_elf_tdata(abfd)->got_link_next. */
bfd *got_list;
+
+ /* The most recent relax pass that we've seen. The GOTs
+ should be regenerated if this doesn't match. */
+ int relax_trip;
};
/* Look up an entry in a Alpha ELF linker hash table. */
@@ -321,11 +325,14 @@ struct alpha_elf_obj_tdata
static bfd_boolean
elf64_alpha_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct alpha_elf_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct alpha_elf_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
static bfd_boolean
@@ -1052,6 +1059,23 @@ elf64_alpha_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return 0;
}
+static reloc_howto_type *
+elf64_alpha_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (elf64_alpha_howto_table)
+ / sizeof (elf64_alpha_howto_table[0]));
+ i++)
+ if (elf64_alpha_howto_table[i].name != NULL
+ && strcasecmp (elf64_alpha_howto_table[i].name, r_name) == 0)
+ return &elf64_alpha_howto_table[i];
+
+ return NULL;
+}
+
/* Given an Alpha ELF reloc type, fill in an arelent structure. */
static void
@@ -1898,7 +1922,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (rel_sec_name == NULL)
return FALSE;
- BFD_ASSERT (strncmp (rel_sec_name, ".rela", 5) == 0
+ BFD_ASSERT (CONST_STRNEQ (rel_sec_name, ".rela")
&& strcmp (bfd_get_section_name (abfd, sec),
rel_sec_name+5) == 0);
}
@@ -2032,6 +2056,19 @@ elf64_alpha_adjust_dynamic_symbol (struct bfd_link_info *info,
return TRUE;
}
+/* Record STO_ALPHA_NOPV and STO_ALPHA_STD_GPLOAD. */
+
+static void
+elf64_alpha_merge_symbol_attribute (struct elf_link_hash_entry *h,
+ const Elf_Internal_Sym *isym,
+ bfd_boolean definition,
+ bfd_boolean dynamic)
+{
+ if (!dynamic && definition)
+ h->other = ((h->other & ELF_ST_VISIBILITY (-1))
+ | (isym->st_other & ~ELF_ST_VISIBILITY (-1)));
+}
+
/* Symbol versioning can create new symbols, and make our old symbols
indirect to the new ones. Consolidate the got and reloc information
in these situations. */
@@ -2342,7 +2379,6 @@ static bfd_boolean
elf64_alpha_size_got_sections (struct bfd_link_info *info)
{
bfd *i, *got_list, *cur_got_obj = NULL;
- int something_changed = 0;
got_list = alpha_elf_hash_table (info)->got_list;
@@ -2380,9 +2416,6 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info)
return TRUE;
alpha_elf_hash_table (info)->got_list = got_list;
-
- /* Force got offsets to be recalculated. */
- something_changed = 1;
}
cur_got_obj = got_list;
@@ -2396,8 +2429,6 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info)
alpha_elf_tdata(i)->got->size = 0;
i = alpha_elf_tdata(i)->got_link_next;
alpha_elf_tdata(cur_got_obj)->got_link_next = i;
-
- something_changed = 1;
}
else
{
@@ -2408,8 +2439,7 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info)
/* Once the gots have been merged, fill in the got offsets for
everything therein. */
- if (1 || something_changed)
- elf64_alpha_calc_got_offsets (info);
+ elf64_alpha_calc_got_offsets (info);
return TRUE;
}
@@ -2444,10 +2474,10 @@ elf64_alpha_size_plt_section_1 (struct alpha_elf_link_hash_entry *h, PTR data)
return TRUE;
}
-/* Called from relax_section to rebuild the PLT in light of
- potential changes in the function's status. */
+/* Called from relax_section to rebuild the PLT in light of potential changes
+ in the function's status. */
-static bfd_boolean
+static void
elf64_alpha_size_plt_section (struct bfd_link_info *info)
{
asection *splt, *spltrel, *sgotplt;
@@ -2457,7 +2487,7 @@ elf64_alpha_size_plt_section (struct bfd_link_info *info)
dynobj = elf_hash_table(info)->dynobj;
splt = bfd_get_section_by_name (dynobj, ".plt");
if (splt == NULL)
- return TRUE;
+ return;
splt->size = 0;
@@ -2466,6 +2496,7 @@ elf64_alpha_size_plt_section (struct bfd_link_info *info)
/* Every plt entry requires a JMP_SLOT relocation. */
spltrel = bfd_get_section_by_name (dynobj, ".rela.plt");
+ entries = 0;
if (splt->size)
{
if (elf64_alpha_use_secureplt)
@@ -2473,8 +2504,6 @@ elf64_alpha_size_plt_section (struct bfd_link_info *info)
else
entries = (splt->size - OLD_PLT_HEADER_SIZE) / OLD_PLT_ENTRY_SIZE;
}
- else
- entries = 0;
spltrel->size = entries * sizeof (Elf64_External_Rela);
/* When using the secureplt, we need two words somewhere in the data
@@ -2485,8 +2514,6 @@ elf64_alpha_size_plt_section (struct bfd_link_info *info)
sgotplt = bfd_get_section_by_name (dynobj, ".got.plt");
sgotplt->size = entries ? 16 : 0;
}
-
- return TRUE;
}
static bfd_boolean
@@ -2657,7 +2684,7 @@ elf64_alpha_size_rela_got_1 (struct alpha_elf_link_hash_entry *h,
/* Set the sizes of the dynamic relocation sections. */
-static bfd_boolean
+static void
elf64_alpha_size_rela_got_section (struct bfd_link_info *info)
{
unsigned long entries;
@@ -2696,15 +2723,13 @@ elf64_alpha_size_rela_got_section (struct bfd_link_info *info)
if (!srel)
{
BFD_ASSERT (entries == 0);
- return TRUE;
+ return;
}
srel->size = sizeof (Elf64_External_Rela) * entries;
/* Now do the non-local symbols. */
alpha_elf_link_hash_traverse (alpha_elf_hash_table (info),
elf64_alpha_size_rela_got_1, info);
-
- return TRUE;
}
/* Set the sizes of the dynamic sections. */
@@ -2758,7 +2783,7 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
of the dynobj section names depend upon the input files. */
name = bfd_get_section_name (dynobj, s);
- if (strncmp (name, ".rela", 5) == 0)
+ if (CONST_STRNEQ (name, ".rela"))
{
if (s->size != 0)
{
@@ -2770,7 +2795,7 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
s->reloc_count = 0;
}
}
- else if (strncmp (name, ".got", 4) != 0
+ else if (! CONST_STRNEQ (name, ".got")
&& strcmp (name, ".plt") != 0
&& strcmp (name, ".dynbss") != 0)
{
@@ -3576,7 +3601,7 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec,
struct alpha_elf_got_entry **local_got_entries;
struct alpha_relax_info info;
- /* We are not currently changing any sizes, so only one pass. */
+ /* There's nothing to change, yet. */
*again = FALSE;
if (link_info->relocatable
@@ -3585,6 +3610,22 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec,
|| sec->reloc_count == 0)
return TRUE;
+ /* Make sure our GOT and PLT tables are up-to-date. */
+ if (alpha_elf_hash_table(link_info)->relax_trip != link_info->relax_trip)
+ {
+ alpha_elf_hash_table(link_info)->relax_trip = link_info->relax_trip;
+
+ /* This should never fail after the initial round, since the only
+ error is GOT overflow, and relaxation only shrinks the table. */
+ if (!elf64_alpha_size_got_sections (link_info))
+ abort ();
+ if (elf_hash_table (link_info)->dynamic_sections_created)
+ {
+ elf64_alpha_size_plt_section (link_info);
+ elf64_alpha_size_rela_got_section (link_info);
+ }
+ }
+
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
local_got_entries = alpha_elf_tdata(abfd)->local_got_entries;
@@ -3794,13 +3835,6 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec,
}
}
- if (!elf64_alpha_size_plt_section (link_info))
- return FALSE;
- if (!elf64_alpha_size_got_sections (link_info))
- return FALSE;
- if (!elf64_alpha_size_rela_got_section (link_info))
- return FALSE;
-
if (isymbuf != NULL
&& symtab_hdr->contents != (unsigned char *) isymbuf)
{
@@ -3896,9 +3930,11 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
unsigned long symtab_hdr_sh_info;
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
+ struct elf_link_hash_entry **sym_hashes;
bfd_boolean ret_val = TRUE;
symtab_hdr_sh_info = elf_tdata (input_bfd)->symtab_hdr.sh_info;
+ sym_hashes = elf_sym_hashes (input_bfd);
relend = relocs + input_section->reloc_count;
for (rel = relocs; rel < relend; rel++)
@@ -3908,7 +3944,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
asection *sec;
unsigned long r_type;
- r_type = ELF64_R_TYPE(rel->r_info);
+ r_type = ELF64_R_TYPE (rel->r_info);
if (r_type >= R_ALPHA_max)
{
(*_bfd_error_handler)
@@ -3919,22 +3955,49 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
continue;
}
- r_symndx = ELF64_R_SYM(rel->r_info);
-
/* The symbol associated with GPDISP and LITUSE is
immaterial. Only the addend is significant. */
if (r_type == R_ALPHA_GPDISP || r_type == R_ALPHA_LITUSE)
continue;
+ r_symndx = ELF64_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr_sh_info)
{
sym = local_syms + r_symndx;
- if (ELF_ST_TYPE(sym->st_info) == STT_SECTION)
- {
- sec = local_sections[r_symndx];
- rel->r_addend += sec->output_offset + sym->st_value;
- }
+ sec = local_sections[r_symndx];
}
+ else
+ {
+ struct elf_link_hash_entry *h;
+
+ h = sym_hashes[r_symndx - symtab_hdr_sh_info];
+
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ continue;
+
+ sym = NULL;
+ sec = h->root.u.def.section;
+ }
+
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. */
+ _bfd_clear_contents (elf64_alpha_howto_table + r_type,
+ input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (sym != NULL && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ rel->r_addend += sec->output_offset;
}
return ret_val;
@@ -4134,6 +4197,17 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
gotent = h->got_entries;
}
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
addend = rel->r_addend;
value += addend;
@@ -4193,18 +4267,6 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
goto default_reloc;
case R_ALPHA_GPREL32:
- /* If the target section was a removed linkonce section,
- r_symndx will be zero. In this case, assume that the
- switch will not be used, so don't fill it in. If we
- do nothing here, we'll get relocation truncated messages,
- due to the placement of the application above 4GB. */
- if (r_symndx == 0)
- {
- r = bfd_reloc_ok;
- break;
- }
- /* FALLTHRU */
-
case R_ALPHA_GPREL16:
case R_ALPHA_GPRELLOW:
if (dynamic_symbol_p)
@@ -5145,9 +5207,9 @@ elf64_alpha_reloc_type_class (const Elf_Internal_Rela *rela)
static const struct bfd_elf_special_section elf64_alpha_special_sections[] =
{
- { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
- { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+ { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+ { NULL, 0, 0, 0, 0 }
};
/* ECOFF swapping routines. These are used when dealing with the
@@ -5231,12 +5293,15 @@ static const struct elf_size_info alpha_elf_size_info =
#define ELF_ARCH bfd_arch_alpha
#define ELF_MACHINE_CODE EM_ALPHA
#define ELF_MAXPAGESIZE 0x10000
+#define ELF_COMMONPAGESIZE 0x2000
#define bfd_elf64_bfd_link_hash_table_create \
elf64_alpha_bfd_link_hash_table_create
#define bfd_elf64_bfd_reloc_type_lookup \
elf64_alpha_bfd_reloc_type_lookup
+#define bfd_elf64_bfd_reloc_name_lookup \
+ elf64_alpha_bfd_reloc_name_lookup
#define elf_info_to_howto \
elf64_alpha_info_to_howto
@@ -5267,10 +5332,14 @@ static const struct elf_size_info alpha_elf_size_info =
elf64_alpha_create_dynamic_sections
#define elf_backend_adjust_dynamic_symbol \
elf64_alpha_adjust_dynamic_symbol
+#define elf_backend_merge_symbol_attribute \
+ elf64_alpha_merge_symbol_attribute
#define elf_backend_always_size_sections \
elf64_alpha_always_size_sections
#define elf_backend_size_dynamic_sections \
elf64_alpha_size_dynamic_sections
+#define elf_backend_omit_section_dynsym \
+ ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_relocate_section \
elf64_alpha_relocate_section
#define elf_backend_finish_dynamic_symbol \
@@ -5305,6 +5374,8 @@ static const struct elf_size_info alpha_elf_size_info =
#define TARGET_LITTLE_SYM bfd_elf64_alpha_freebsd_vec
#undef TARGET_LITTLE_NAME
#define TARGET_LITTLE_NAME "elf64-alpha-freebsd"
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_FREEBSD
/* The kernel recognizes executables as valid only if they carry a
"FreeBSD" label in the ELF header. So we put this label on all
@@ -5319,7 +5390,7 @@ elf64_alpha_fbsd_post_process_headers (bfd * abfd,
i_ehdrp = elf_elfheader (abfd);
/* Put an ABI label supported by FreeBSD >= 4.1. */
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_FREEBSD;
+ i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
#ifdef OLD_FREEBSD_ABI_LABEL
/* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */
memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8);
diff --git a/contrib/binutils/bfd/elf64-gen.c b/contrib/binutils/bfd/elf64-gen.c
index 49b8d9c..05a94f0 100644
--- a/contrib/binutils/bfd/elf64-gen.c
+++ b/contrib/binutils/bfd/elf64-gen.c
@@ -1,5 +1,5 @@
/* Generic support for 64-bit ELF
- Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004, 2005
+ Copyright 1993, 1995, 1998, 1999, 2001, 2002, 2004, 2005, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -94,6 +94,7 @@ elf64_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
#define ELF_MACHINE_CODE EM_NONE
#define ELF_MAXPAGESIZE 0x1
#define bfd_elf64_bfd_reloc_type_lookup bfd_default_reloc_type_lookup
+#define bfd_elf64_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
#define bfd_elf64_bfd_link_add_symbols elf64_generic_link_add_symbols
#define elf_info_to_howto elf_generic_info_to_howto
#define elf_info_to_howto_rel elf_generic_info_to_howto_rel
diff --git a/contrib/binutils/bfd/elf64-mips.c b/contrib/binutils/bfd/elf64-mips.c
index c8f3127..e64b50c 100644
--- a/contrib/binutils/bfd/elf64-mips.c
+++ b/contrib/binutils/bfd/elf64-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for 64-bit ELF
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2007 Free Software Foundation, Inc.
Ian Lance Taylor, Cygnus Support
Linker support added by Mark Mitchell, CodeSourcery, LLC.
<mark@codesourcery.com>
@@ -40,8 +40,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
. the OldABI version is still lying around and should be removed.
*/
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "aout/ar.h"
#include "bfdlink.h"
@@ -112,8 +112,6 @@ static bfd_reloc_status_type mips_elf64_gprel32_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips_elf64_shift6_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static bfd_reloc_status_type mips16_jump_reloc
- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips16_gprel_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_boolean mips_elf64_assign_gp
@@ -791,6 +789,21 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* 32 bit relocation with no addend. */
+ HOWTO (R_MIPS_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_GLOB_DAT", /* name */
+ FALSE, /* partial_inplace */
+ 0x0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* The relocation table used for SHT_RELA sections. */
@@ -1314,7 +1327,20 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32),
EMPTY_HOWTO (R_MIPS_TLS_DTPREL32),
EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64),
- EMPTY_HOWTO (R_MIPS_TLS_DTPREL64),
+
+ HOWTO (R_MIPS_TLS_DTPREL64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0 = byte, 1 = short, 2 = long) */
+ 64, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_TLS_DTPREL64", /* name */
+ TRUE, /* partial_inplace */
+ MINUS_ONE, /* src_mask */
+ MINUS_ONE, /* dst_mask */
+ FALSE), /* pcrel_offset */
/* TLS general dynamic variable reference. */
HOWTO (R_MIPS_TLS_GD, /* type */
@@ -1423,6 +1449,21 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* 32 bit relocation with no addend. */
+ HOWTO (R_MIPS_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_GLOB_DAT", /* name */
+ FALSE, /* partial_inplace */
+ 0x0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
static reloc_howto_type mips16_elf64_howto_table_rel[] =
@@ -1438,7 +1479,7 @@ static reloc_howto_type mips16_elf64_howto_table_rel[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -1510,7 +1551,7 @@ static reloc_howto_type mips16_elf64_howto_table_rela[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
FALSE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -2044,37 +2085,6 @@ mips_elf64_shift6_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
error_message);
}
-/* Handle a mips16 jump. */
-
-static bfd_reloc_status_type
-mips16_jump_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
- asymbol *symbol, void *data ATTRIBUTE_UNUSED,
- asection *input_section, bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
-{
- if (output_bfd != NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* FIXME. */
- {
- static bfd_boolean warned;
-
- if (! warned)
- (*_bfd_error_handler)
- (_("Linking mips16 objects into %s format is not supported"),
- bfd_get_target (input_section->output_section->owner));
- warned = TRUE;
- }
-
- return bfd_reloc_undefined;
-}
-
/* Handle a mips16 GP relative reloc. */
static bfd_reloc_status_type
@@ -2227,6 +2237,39 @@ bfd_elf64_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
}
}
+static reloc_howto_type *
+bfd_elf64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (mips_elf64_howto_table_rela)
+ / sizeof (mips_elf64_howto_table_rela[0])); i++)
+ if (mips_elf64_howto_table_rela[i].name != NULL
+ && strcasecmp (mips_elf64_howto_table_rela[i].name, r_name) == 0)
+ return &mips_elf64_howto_table_rela[i];
+
+ for (i = 0;
+ i < (sizeof (mips16_elf64_howto_table_rela)
+ / sizeof (mips16_elf64_howto_table_rela[0]));
+ i++)
+ if (mips16_elf64_howto_table_rela[i].name != NULL
+ && strcasecmp (mips16_elf64_howto_table_rela[i].name, r_name) == 0)
+ return &mips16_elf64_howto_table_rela[i];
+
+ if (strcasecmp (elf_mips_gnu_vtinherit_howto.name, r_name) == 0)
+ return &elf_mips_gnu_vtinherit_howto;
+ if (strcasecmp (elf_mips_gnu_vtentry_howto.name, r_name) == 0)
+ return &elf_mips_gnu_vtentry_howto;
+ if (strcasecmp (elf_mips_gnu_rel16_s2.name, r_name) == 0)
+ return &elf_mips_gnu_rel16_s2;
+ if (strcasecmp (elf_mips_gnu_rela16_s2.name, r_name) == 0)
+ return &elf_mips_gnu_rela16_s2;
+
+ return NULL;
+}
+
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
static reloc_howto_type *
@@ -3059,12 +3102,15 @@ const struct elf_size_info mips_elf64_size_info =
#define elf_backend_create_dynamic_sections \
_bfd_mips_elf_create_dynamic_sections
#define elf_backend_check_relocs _bfd_mips_elf_check_relocs
+#define elf_backend_merge_symbol_attribute \
+ _bfd_mips_elf_merge_symbol_attribute
#define elf_backend_adjust_dynamic_symbol \
_bfd_mips_elf_adjust_dynamic_symbol
#define elf_backend_always_size_sections \
_bfd_mips_elf_always_size_sections
#define elf_backend_size_dynamic_sections \
_bfd_mips_elf_size_dynamic_sections
+#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
#define elf_backend_finish_dynamic_symbol \
_bfd_mips_elf_finish_dynamic_symbol
@@ -3152,10 +3198,8 @@ extern bfd_boolean bfd_elf64_archive_write_armap
#define TARGET_BIG_SYM bfd_elf64_bigmips_vec
#define TARGET_BIG_NAME "elf64-bigmips"
-/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses
- a value of 0x1000, and we are compatible.
- FIXME: How does this affect NewABI? */
-#define ELF_MAXPAGESIZE 0x1000
+#define ELF_MAXPAGESIZE 0x10000
+#define ELF_COMMONPAGESIZE 0x1000
#include "elf64-target.h"
@@ -3166,15 +3210,15 @@ extern bfd_boolean bfd_elf64_archive_write_armap
#undef TARGET_BIG_NAME
#undef ELF_MAXPAGESIZE
+#undef ELF_COMMONPAGESIZE
#define TARGET_LITTLE_SYM bfd_elf64_tradlittlemips_vec
#define TARGET_LITTLE_NAME "elf64-tradlittlemips"
#define TARGET_BIG_SYM bfd_elf64_tradbigmips_vec
#define TARGET_BIG_NAME "elf64-tradbigmips"
-/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
- page sizes of up to that limit, so we need to respect it. */
#define ELF_MAXPAGESIZE 0x10000
+#define ELF_COMMONPAGESIZE 0x1000
#define elf64_bed elf64_tradbed
/* Include the target file again for this target. */
diff --git a/contrib/binutils/bfd/elf64-ppc.c b/contrib/binutils/bfd/elf64-ppc.c
index 698f8e4..d7decd8 100644
--- a/contrib/binutils/bfd/elf64-ppc.c
+++ b/contrib/binutils/bfd/elf64-ppc.c
@@ -1,5 +1,5 @@
/* PowerPC64-specific support for 64-bit ELF.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Linus Nordberg, Swox AB <info@swox.com>,
based on elf32-ppc.c by Ian Lance Taylor.
@@ -25,8 +25,9 @@
http://www.linuxbase.org/spec/ELF/ppc64/PPC-elf64abi.txt, and
http://www.linuxbase.org/spec/ELF/ppc64/spec/book1.html */
-#include "bfd.h"
#include "sysdep.h"
+#include <stdarg.h>
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -61,6 +62,7 @@ static bfd_vma opd_entry_value
#define ELF_ARCH bfd_arch_powerpc
#define ELF_MACHINE_CODE EM_PPC64
#define ELF_MAXPAGESIZE 0x10000
+#define ELF_COMMONPAGESIZE 0x1000
#define elf_info_to_howto ppc64_elf_info_to_howto
#define elf_backend_want_got_sym 0
@@ -71,9 +73,11 @@ static bfd_vma opd_entry_value
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
#define elf_backend_rela_normal 1
+#define elf_backend_default_execstack 0
#define bfd_elf64_mkobject ppc64_elf_mkobject
#define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup
+#define bfd_elf64_bfd_reloc_name_lookup ppc64_elf_reloc_name_lookup
#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
#define bfd_elf64_new_section_hook ppc64_elf_new_section_hook
#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
@@ -83,10 +87,12 @@ static bfd_vma opd_entry_value
#define elf_backend_object_p ppc64_elf_object_p
#define elf_backend_grok_prstatus ppc64_elf_grok_prstatus
#define elf_backend_grok_psinfo ppc64_elf_grok_psinfo
+#define elf_backend_write_core_note ppc64_elf_write_core_note
#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_add_symbol_hook ppc64_elf_add_symbol_hook
#define elf_backend_check_directives ppc64_elf_check_directives
+#define elf_backend_as_needed_cleanup ppc64_elf_as_needed_cleanup
#define elf_backend_archive_symbol_lookup ppc64_elf_archive_symbol_lookup
#define elf_backend_check_relocs ppc64_elf_check_relocs
#define elf_backend_gc_mark_dynamic_ref ppc64_elf_gc_mark_dynamic_ref
@@ -96,6 +102,7 @@ static bfd_vma opd_entry_value
#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_init_index_section _bfd_elf_init_2_index_sections
#define elf_backend_action_discarded ppc64_elf_action_discarded
#define elf_backend_relocate_section ppc64_elf_relocate_section
#define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol
@@ -134,30 +141,29 @@ static bfd_vma opd_entry_value
#define BCTR 0x4e800420 /* bctr */
+#define ADDIS_R12_R12 0x3d8c0000 /* addis %r12,%r12,off@ha */
#define ADDIS_R2_R2 0x3c420000 /* addis %r2,%r2,off@ha */
#define ADDI_R2_R2 0x38420000 /* addi %r2,%r2,off@l */
#define LD_R2_40R1 0xe8410028 /* ld %r2,40(%r1) */
-/* glink call stub instructions. We enter with the index in R0, and the
- address of glink entry in CTR. From that, we can calculate PLT0. */
+/* glink call stub instructions. We enter with the index in R0. */
#define GLINK_CALL_STUB_SIZE (16*4)
-#define MFCTR_R12 0x7d8902a6 /* mfctr %r12 */
-#define SLDI_R11_R0_3 0x780b1f24 /* sldi %r11,%r0,3 */
-#define ADDIC_R2_R0_32K 0x34408000 /* addic. %r2,%r0,-32768 */
-#define SUB_R12_R12_R11 0x7d8b6050 /* sub %r12,%r12,%r11 */
-#define SRADI_R2_R2_63 0x7c42fe76 /* sradi %r2,%r2,63 */
-#define SLDI_R11_R0_2 0x780b1764 /* sldi %r11,%r0,2 */
-#define AND_R2_R2_R11 0x7c425838 /* and %r2,%r2,%r11 */
- /* sub %r12,%r12,%r11 */
-#define ADD_R12_R12_R2 0x7d8c1214 /* add %r12,%r12,%r2 */
-#define ADDIS_R12_R12 0x3d8c0000 /* addis %r12,%r12,xxx@ha */
- /* ld %r11,xxx@l(%r12) */
-#define ADDI_R12_R12 0x398c0000 /* addi %r12,%r12,xxx@l */
- /* ld %r2,8(%r12) */
- /* mtctr %r11 */
- /* ld %r11,16(%r12) */
- /* bctr */
+ /* 0: */
+ /* .quad plt0-1f */
+ /* __glink: */
+#define MFLR_R12 0x7d8802a6 /* mflr %12 */
+#define BCL_20_31 0x429f0005 /* bcl 20,31,1f */
+ /* 1: */
+#define MFLR_R11 0x7d6802a6 /* mflr %11 */
+#define LD_R2_M16R11 0xe84bfff0 /* ld %2,(0b-1b)(%11) */
+#define MTLR_R12 0x7d8803a6 /* mtlr %12 */
+#define ADD_R12_R2_R11 0x7d825a14 /* add %12,%2,%11 */
+ /* ld %11,0(%12) */
+ /* ld %2,8(%12) */
+ /* mtctr %11 */
+ /* ld %11,16(%12) */
+ /* bctr */
/* Pad with this. */
#define NOP 0x60000000
@@ -1193,7 +1199,7 @@ static reloc_howto_type ppc64_elf_howto_raw[] = {
/* Like R_PPC64_PLTGOT16, but for instructions with a DS field. */
/* FIXME: R_PPC64_PLTGOT16_DS not implemented. */
- HOWTO (R_PPC64_PLTGOT16_DS, /* type */
+ HOWTO (R_PPC64_PLTGOT16_DS, /* type */
0, /* rightshift */
1, /* size (0 = byte, 1 = short, 2 = long) */
16, /* bitsize */
@@ -2106,6 +2112,22 @@ ppc64_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return ppc64_elf_howto_table[r];
};
+static reloc_howto_type *
+ppc64_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (ppc64_elf_howto_raw) / sizeof (ppc64_elf_howto_raw[0]);
+ i++)
+ if (ppc64_elf_howto_raw[i].name != NULL
+ && strcasecmp (ppc64_elf_howto_raw[i].name, r_name) == 0)
+ return &ppc64_elf_howto_raw[i];
+
+ return NULL;
+}
+
/* Set the howto pointer for a PowerPC ELF reloc. */
static void
@@ -2376,14 +2398,9 @@ struct ppc64_elf_obj_tdata
asection *got;
asection *relgot;
- union {
- /* Used during garbage collection. We attach global symbols defined
- on removed .opd entries to this section so that the sym is removed. */
- asection *deleted_section;
-
- /* Used when adding symbols. */
- bfd_boolean has_dotsym;
- } u;
+ /* Used during garbage collection. We attach global symbols defined
+ on removed .opd entries to this section so that the sym is removed. */
+ asection *deleted_section;
/* TLS local dynamic got entry handling. Suppose for multiple GOT
sections means we potentially need one of these for each input bfd. */
@@ -2407,11 +2424,14 @@ struct ppc64_elf_obj_tdata
static bfd_boolean
ppc64_elf_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct ppc64_elf_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct ppc64_elf_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
/* Return 1 if target is one of ours. */
@@ -2484,6 +2504,53 @@ ppc64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
return TRUE;
}
+static char *
+ppc64_elf_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type,
+ ...)
+{
+ switch (note_type)
+ {
+ default:
+ return NULL;
+
+ case NT_PRPSINFO:
+ {
+ char data[136];
+ va_list ap;
+
+ va_start (ap, note_type);
+ memset (data, 0, 40);
+ strncpy (data + 40, va_arg (ap, const char *), 16);
+ strncpy (data + 56, va_arg (ap, const char *), 80);
+ va_end (ap);
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", note_type, data, sizeof (data));
+ }
+
+ case NT_PRSTATUS:
+ {
+ char data[504];
+ va_list ap;
+ long pid;
+ int cursig;
+ const void *greg;
+
+ va_start (ap, note_type);
+ memset (data, 0, 112);
+ pid = va_arg (ap, long);
+ bfd_put_32 (abfd, pid, data + 32);
+ cursig = va_arg (ap, int);
+ bfd_put_16 (abfd, cursig, data + 12);
+ greg = va_arg (ap, const void *);
+ memcpy (data + 112, greg, 384);
+ memset (data + 496, 0, 8);
+ va_end (ap);
+ return elfcore_write_note (abfd, buf, bufsiz,
+ "CORE", note_type, data, sizeof (data));
+ }
+ }
+}
+
/* Merge backend specific data from an object file to the output
object file when linking. */
@@ -2517,13 +2584,19 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
static const struct bfd_elf_special_section ppc64_elf_special_sections[]=
{
- { ".plt", 4, 0, SHT_NOBITS, 0 },
- { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".toc", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".toc1", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
- { ".tocbss", 7, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".plt"), 0, SHT_NOBITS, 0 },
+ { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".toc"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".toc1"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { STRING_COMMA_LEN (".tocbss"), 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { NULL, 0, 0, 0, 0 }
+};
+
+enum _ppc64_sec_type {
+ sec_normal = 0,
+ sec_opd = 1,
+ sec_toc = 2
};
struct _ppc64_elf_section_data
@@ -2534,14 +2607,20 @@ struct _ppc64_elf_section_data
union
{
/* Points to the function code section for local opd entries. */
- asection **func_sec;
+ asection **opd_func_sec;
/* After editing .opd, adjust references to opd local syms. */
- long *adjust;
- } opd;
+ long *opd_adjust;
- /* An array for toc sections, indexed by offset/8.
- Specifies the relocation symbol index used at a given toc offset. */
- unsigned *t_symndx;
+ /* An array for toc sections, indexed by offset/8.
+ Specifies the relocation symbol index used at a given toc offset. */
+ unsigned *t_symndx;
+ } u;
+
+ enum _ppc64_sec_type sec_type:2;
+
+ /* Flag set when small branches are detected. Used to
+ select suitable defaults for the stub group size. */
+ unsigned int has_14bit_branch:1;
};
#define ppc64_elf_section_data(sec) \
@@ -2550,13 +2629,16 @@ struct _ppc64_elf_section_data
static bfd_boolean
ppc64_elf_new_section_hook (bfd *abfd, asection *sec)
{
- struct _ppc64_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
+ if (!sec->used_by_bfd)
+ {
+ struct _ppc64_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
- sdata = bfd_zalloc (abfd, amt);
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = sdata;
+ sdata = bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = sdata;
+ }
return _bfd_elf_new_section_hook (abfd, sec);
}
@@ -2566,8 +2648,8 @@ get_opd_info (asection * sec)
{
if (sec != NULL
&& ppc64_elf_section_data (sec) != NULL
- && ppc64_elf_section_data (sec)->opd.adjust != NULL)
- return ppc64_elf_section_data (sec)->opd.adjust;
+ && ppc64_elf_section_data (sec)->sec_type == sec_opd)
+ return ppc64_elf_section_data (sec)->u.opd_adjust;
return NULL;
}
@@ -3234,9 +3316,14 @@ struct ppc_link_hash_entry
{
struct elf_link_hash_entry elf;
- /* A pointer to the most recently used stub hash entry against this
- symbol. */
- struct ppc_stub_hash_entry *stub_cache;
+ union {
+ /* A pointer to the most recently used stub hash entry against this
+ symbol. */
+ struct ppc_stub_hash_entry *stub_cache;
+
+ /* A pointer to the next symbol starting with a '.' */
+ struct ppc_link_hash_entry *next_dot_sym;
+ } u;
/* Track dynamic relocs copied for this symbol. */
struct ppc_dyn_relocs *dyn_relocs;
@@ -3314,6 +3401,9 @@ struct ppc_link_hash_table
/* Highest output section index. */
int top_index;
+ /* Used when adding symbols. */
+ struct ppc_link_hash_entry *dot_syms;
+
/* List of input sections for each output section. */
asection **input_list;
@@ -3348,10 +3438,6 @@ struct ppc_link_hash_table
/* Set on error. */
unsigned int stub_error:1;
- /* Flag set when small branches are detected. Used to
- select suitable defaults for the stub group size. */
- unsigned int has_14bit_branch:1;
-
/* Temp used by ppc64_elf_check_directives. */
unsigned int twiddled_syms:1;
@@ -3470,9 +3556,34 @@ link_hash_newfunc (struct bfd_hash_entry *entry,
{
struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) entry;
- memset (&eh->stub_cache, 0,
+ memset (&eh->u.stub_cache, 0,
(sizeof (struct ppc_link_hash_entry)
- - offsetof (struct ppc_link_hash_entry, stub_cache)));
+ - offsetof (struct ppc_link_hash_entry, u.stub_cache)));
+
+ /* When making function calls, old ABI code references function entry
+ points (dot symbols), while new ABI code references the function
+ descriptor symbol. We need to make any combination of reference and
+ definition work together, without breaking archive linking.
+
+ For a defined function "foo" and an undefined call to "bar":
+ An old object defines "foo" and ".foo", references ".bar" (possibly
+ "bar" too).
+ A new object defines "foo" and references "bar".
+
+ A new object thus has no problem with its undefined symbols being
+ satisfied by definitions in an old object. On the other hand, the
+ old object won't have ".bar" satisfied by a new object.
+
+ Keep a list of newly added dot-symbols. */
+
+ if (string[0] == '.')
+ {
+ struct ppc_link_hash_table *htab;
+
+ htab = (struct ppc_link_hash_table *) table;
+ eh->u.next_dot_sym = htab->dot_syms;
+ htab->dot_syms = eh;
+ }
}
return entry;
@@ -3618,11 +3729,11 @@ ppc_get_stub_entry (const asection *input_section,
distinguish between them. */
id_sec = htab->stub_group[input_section->id].link_sec;
- if (h != NULL && h->stub_cache != NULL
- && h->stub_cache->h == h
- && h->stub_cache->id_sec == id_sec)
+ if (h != NULL && h->u.stub_cache != NULL
+ && h->u.stub_cache->h == h
+ && h->u.stub_cache->id_sec == id_sec)
{
- stub_entry = h->stub_cache;
+ stub_entry = h->u.stub_cache;
}
else
{
@@ -3635,7 +3746,7 @@ ppc_get_stub_entry (const asection *input_section,
stub_entry = ppc_stub_hash_lookup (&htab->stub_hash_table,
stub_name, FALSE, FALSE);
if (h != NULL)
- h->stub_cache = stub_entry;
+ h->u.stub_cache = stub_entry;
free (stub_name);
}
@@ -3721,49 +3832,26 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info)
htab->glink = bfd_make_section_anyway_with_flags (dynobj, ".glink",
flags);
if (htab->glink == NULL
- || ! bfd_set_section_alignment (dynobj, htab->glink, 2))
+ || ! bfd_set_section_alignment (dynobj, htab->glink, 3))
return FALSE;
/* Create branch lookup table for plt_branch stubs. */
- if (info->shared)
- {
- flags = (SEC_ALLOC | SEC_LOAD
- | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->brlt
- = bfd_make_section_anyway_with_flags (dynobj, ".data.rel.ro.brlt",
- flags);
- }
- else
- {
- flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
- | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->brlt
- = bfd_make_section_anyway_with_flags (dynobj, ".rodata.brlt", flags);
- }
-
+ flags = (SEC_ALLOC | SEC_LOAD
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ htab->brlt = bfd_make_section_anyway_with_flags (dynobj, ".branch_lt",
+ flags);
if (htab->brlt == NULL
|| ! bfd_set_section_alignment (dynobj, htab->brlt, 3))
return FALSE;
- if (info->shared)
- {
- flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
- | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->relbrlt
- = bfd_make_section_anyway_with_flags (dynobj, ".rela.data.rel.ro.brlt",
- flags);
- }
- else if (info->emitrelocations)
- {
- flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
- | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
- htab->relbrlt
- = bfd_make_section_anyway_with_flags (dynobj, ".rela.rodata.brlt",
- flags);
- }
- else
+ if (!info->shared)
return TRUE;
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ htab->relbrlt = bfd_make_section_anyway_with_flags (dynobj,
+ ".rela.branch_lt",
+ flags);
if (!htab->relbrlt
|| ! bfd_set_section_alignment (dynobj, htab->relbrlt, 3))
return FALSE;
@@ -4044,29 +4132,14 @@ make_fdh (struct bfd_link_info *info,
return fdh;
}
-/* Hacks to support old ABI code.
- When making function calls, old ABI code references function entry
- points (dot symbols), while new ABI code references the function
- descriptor symbol. We need to make any combination of reference and
- definition work together, without breaking archive linking.
-
- For a defined function "foo" and an undefined call to "bar":
- An old object defines "foo" and ".foo", references ".bar" (possibly
- "bar" too).
- A new object defines "foo" and references "bar".
-
- A new object thus has no problem with its undefined symbols being
- satisfied by definitions in an old object. On the other hand, the
- old object won't have ".bar" satisfied by a new object. */
-
/* Fix function descriptor symbols defined in .opd sections to be
function type. */
static bfd_boolean
-ppc64_elf_add_symbol_hook (bfd *ibfd,
+ppc64_elf_add_symbol_hook (bfd *ibfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info ATTRIBUTE_UNUSED,
Elf_Internal_Sym *isym,
- const char **name,
+ const char **name ATTRIBUTE_UNUSED,
flagword *flags ATTRIBUTE_UNUSED,
asection **sec,
bfd_vma *value ATTRIBUTE_UNUSED)
@@ -4075,12 +4148,6 @@ ppc64_elf_add_symbol_hook (bfd *ibfd,
&& strcmp (bfd_get_section_name (ibfd, *sec), ".opd") == 0)
isym->st_info = ELF_ST_INFO (ELF_ST_BIND (isym->st_info), STT_FUNC);
- if ((*name)[0] == '.'
- && ELF_ST_BIND (isym->st_info) == STB_GLOBAL
- && ELF_ST_TYPE (isym->st_info) < STT_SECTION
- && is_ppc64_elf_target (ibfd->xvec))
- ppc64_elf_tdata (ibfd)->u.has_dotsym = 1;
-
return TRUE;
}
@@ -4129,35 +4196,25 @@ ppc64_elf_archive_symbol_lookup (bfd *abfd,
most restrictive visibility of the function descriptor and the
function entry symbol is used. */
-struct add_symbol_adjust_data
-{
- struct bfd_link_info *info;
- bfd_boolean ok;
-};
-
static bfd_boolean
-add_symbol_adjust (struct elf_link_hash_entry *h, void *inf)
+add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info)
{
- struct add_symbol_adjust_data *data;
struct ppc_link_hash_table *htab;
- struct ppc_link_hash_entry *eh;
struct ppc_link_hash_entry *fdh;
- if (h->root.type == bfd_link_hash_indirect)
+ if (eh->elf.root.type == bfd_link_hash_indirect)
return TRUE;
- if (h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ if (eh->elf.root.type == bfd_link_hash_warning)
+ eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link;
- if (h->root.root.string[0] != '.')
- return TRUE;
+ if (eh->elf.root.root.string[0] != '.')
+ abort ();
- data = inf;
- htab = ppc_hash_table (data->info);
- eh = (struct ppc_link_hash_entry *) h;
+ htab = ppc_hash_table (info);
fdh = get_fdh (eh, htab);
if (fdh == NULL
- && !data->info->relocatable
+ && !info->relocatable
&& (eh->elf.root.type == bfd_link_hash_undefined
|| eh->elf.root.type == bfd_link_hash_undefweak)
&& eh->elf.ref_regular)
@@ -4165,9 +4222,9 @@ add_symbol_adjust (struct elf_link_hash_entry *h, void *inf)
/* Make an undefweak function descriptor sym, which is enough to
pull in an --as-needed shared lib, but won't cause link
errors. Archives are handled elsewhere. */
- fdh = make_fdh (data->info, eh);
+ fdh = make_fdh (info, eh);
if (fdh == NULL)
- data->ok = FALSE;
+ return FALSE;
else
fdh->elf.ref_regular = 1;
}
@@ -4193,26 +4250,37 @@ add_symbol_adjust (struct elf_link_hash_entry *h, void *inf)
return TRUE;
}
+/* Process list of dot-symbols we made in link_hash_newfunc. */
+
static bfd_boolean
-ppc64_elf_check_directives (bfd *abfd, struct bfd_link_info *info)
+ppc64_elf_check_directives (bfd *ibfd, struct bfd_link_info *info)
{
struct ppc_link_hash_table *htab;
- struct add_symbol_adjust_data data;
-
- if (!is_ppc64_elf_target (abfd->xvec))
- return TRUE;
-
- if (!ppc64_elf_tdata (abfd)->u.has_dotsym)
- return TRUE;
- ppc64_elf_tdata (abfd)->u.deleted_section = NULL;
+ struct ppc_link_hash_entry **p, *eh;
htab = ppc_hash_table (info);
if (!is_ppc64_elf_target (htab->elf.root.creator))
return TRUE;
- data.info = info;
- data.ok = TRUE;
- elf_link_hash_traverse (&htab->elf, add_symbol_adjust, &data);
+ if (is_ppc64_elf_target (ibfd->xvec))
+ {
+ p = &htab->dot_syms;
+ while ((eh = *p) != NULL)
+ {
+ *p = NULL;
+ if (!add_symbol_adjust (eh, info))
+ return FALSE;
+ p = &eh->u.next_dot_sym;
+ }
+ }
+
+ /* Clear the list for non-ppc64 input files. */
+ p = &htab->dot_syms;
+ while ((eh = *p) != NULL)
+ {
+ *p = NULL;
+ p = &eh->u.next_dot_sym;
+ }
/* We need to fix the undefs list for any syms we have twiddled to
undef_weak. */
@@ -4221,7 +4289,18 @@ ppc64_elf_check_directives (bfd *abfd, struct bfd_link_info *info)
bfd_link_repair_undef_list (&htab->elf.root);
htab->twiddled_syms = 0;
}
- return data.ok;
+ return TRUE;
+}
+
+/* Undo hash table changes when an --as-needed input file is determined
+ not to be needed. */
+
+static bfd_boolean
+ppc64_elf_as_needed_cleanup (bfd *ibfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info)
+{
+ ppc_hash_table (info)->dot_syms = NULL;
+ return TRUE;
}
static bfd_boolean
@@ -4358,7 +4437,9 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
opd_sym_map = bfd_zalloc (abfd, amt);
if (opd_sym_map == NULL)
return FALSE;
- ppc64_elf_section_data (sec)->opd.func_sec = opd_sym_map;
+ ppc64_elf_section_data (sec)->u.opd_func_sec = opd_sym_map;
+ BFD_ASSERT (ppc64_elf_section_data (sec)->sec_type == sec_normal);
+ ppc64_elf_section_data (sec)->sec_type = sec_opd;
}
if (htab->sfpr == NULL
@@ -4372,6 +4453,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
struct elf_link_hash_entry *h;
enum elf_ppc64_reloc_type r_type;
int tls_type = 0;
+ struct _ppc64_elf_section_data *ppc64_sec;
r_symndx = ELF64_R_SYM (rel->r_info);
if (r_symndx < symtab_hdr->sh_info)
@@ -4553,7 +4635,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
dest = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
sec, r_symndx);
if (dest != sec)
- htab->has_14bit_branch = 1;
+ ppc64_elf_section_data (sec)->has_14bit_branch = 1;
}
/* Fall through. */
@@ -4569,7 +4651,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
|| h == &htab->tls_get_addr_fd->elf)
sec->has_tls_reloc = 1;
else if (htab->tls_get_addr == NULL
- && !strncmp (h->root.root.string, ".__tls_get_addr", 15)
+ && CONST_STRNEQ (h->root.root.string, ".__tls_get_addr")
&& (h->root.root.string[15] == 0
|| h->root.root.string[15] == '@'))
{
@@ -4577,7 +4659,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
sec->has_tls_reloc = 1;
}
else if (htab->tls_get_addr_fd == NULL
- && !strncmp (h->root.root.string, "__tls_get_addr", 14)
+ && CONST_STRNEQ (h->root.root.string, "__tls_get_addr")
&& (h->root.root.string[14] == 0
|| h->root.root.string[14] == '@'))
{
@@ -4624,23 +4706,26 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
rel->r_addend, tls_type))
return FALSE;
- if (ppc64_elf_section_data (sec)->t_symndx == NULL)
+ ppc64_sec = ppc64_elf_section_data (sec);
+ if (ppc64_sec->sec_type != sec_toc)
{
/* One extra to simplify get_tls_mask. */
bfd_size_type amt = sec->size * sizeof (unsigned) / 8 + 1;
- ppc64_elf_section_data (sec)->t_symndx = bfd_zalloc (abfd, amt);
- if (ppc64_elf_section_data (sec)->t_symndx == NULL)
+ ppc64_sec->u.t_symndx = bfd_zalloc (abfd, amt);
+ if (ppc64_sec->u.t_symndx == NULL)
return FALSE;
+ BFD_ASSERT (ppc64_sec->sec_type == sec_normal);
+ ppc64_sec->sec_type = sec_toc;
}
BFD_ASSERT (rel->r_offset % 8 == 0);
- ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8] = r_symndx;
+ ppc64_sec->u.t_symndx[rel->r_offset / 8] = r_symndx;
/* Mark the second slot of a GD or LD entry.
-1 to indicate GD and -2 to indicate LD. */
if (tls_type == (TLS_EXPLICIT | TLS_TLS | TLS_GD))
- ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8 + 1] = -1;
+ ppc64_sec->u.t_symndx[rel->r_offset / 8 + 1] = -1;
else if (tls_type == (TLS_EXPLICIT | TLS_TLS | TLS_LD))
- ppc64_elf_section_data (sec)->t_symndx[rel->r_offset / 8 + 1] = -2;
+ ppc64_sec->u.t_symndx[rel->r_offset / 8 + 1] = -2;
goto dodyn;
case R_PPC64_TPREL16:
@@ -4770,7 +4855,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (name == NULL)
return FALSE;
- if (strncmp (name, ".rela", 5) != 0
+ if (! CONST_STRNEQ (name, ".rela")
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
@@ -5714,7 +5799,6 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
{
struct ppc_link_hash_table *htab;
asection *s;
- unsigned int power_of_two;
htab = ppc_hash_table (info);
@@ -5766,6 +5850,10 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
if (!h->non_got_ref)
return TRUE;
+ /* Don't generate a copy reloc for symbols defined in the executable. */
+ if (!h->def_dynamic || !h->ref_regular || h->def_regular)
+ return TRUE;
+
if (ELIMINATE_COPY_RELOCS)
{
struct ppc_link_hash_entry * eh;
@@ -5831,29 +5919,9 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_copy = 1;
}
- /* 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->dynbss;
- s->size = BFD_ALIGN (s->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->size;
-
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
-
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* If given a function descriptor symbol, hide both the function code
@@ -6036,7 +6104,7 @@ get_tls_mask (char **tls_maskp, unsigned long *toc_symndx,
if ((*tls_maskp != NULL && **tls_maskp != 0)
|| sec == NULL
- || ppc64_elf_section_data (sec)->t_symndx == NULL)
+ || ppc64_elf_section_data (sec)->sec_type != sec_toc)
return 1;
/* Look inside a TOC section too. */
@@ -6049,8 +6117,8 @@ get_tls_mask (char **tls_maskp, unsigned long *toc_symndx,
off = sym->st_value;
off += rel->r_addend;
BFD_ASSERT (off % 8 == 0);
- r_symndx = ppc64_elf_section_data (sec)->t_symndx[off / 8];
- next_r = ppc64_elf_section_data (sec)->t_symndx[off / 8 + 1];
+ r_symndx = ppc64_elf_section_data (sec)->u.t_symndx[off / 8];
+ next_r = ppc64_elf_section_data (sec)->u.t_symndx[off / 8 + 1];
if (!get_sym_h (&h, &sym, &sec, tls_maskp, locsymsp, r_symndx, ibfd))
return 0;
if (toc_symndx != NULL)
@@ -6096,13 +6164,13 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
if (adjust == -1)
{
/* This entry has been deleted. */
- asection *dsec = ppc64_elf_tdata (sym_sec->owner)->u.deleted_section;
+ asection *dsec = ppc64_elf_tdata (sym_sec->owner)->deleted_section;
if (dsec == NULL)
{
for (dsec = sym_sec->owner->sections; dsec; dsec = dsec->next)
if (elf_discarded_section (dsec))
{
- ppc64_elf_tdata (sym_sec->owner)->u.deleted_section = dsec;
+ ppc64_elf_tdata (sym_sec->owner)->deleted_section = dsec;
break;
}
}
@@ -6291,7 +6359,9 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
opd_adjust = bfd_alloc (obfd, amt);
if (opd_adjust == NULL)
return FALSE;
- ppc64_elf_section_data (sec)->opd.adjust = opd_adjust;
+ ppc64_elf_section_data (sec)->u.opd_adjust = opd_adjust;
+ BFD_ASSERT (ppc64_elf_section_data (sec)->sec_type == sec_normal);
+ ppc64_elf_section_data (sec)->sec_type = sec_opd;
}
memset (opd_adjust, 0, amt);
@@ -6601,7 +6671,7 @@ ppc64_elf_edit_opd (bfd *obfd, struct bfd_link_info *info,
sec->contents = new_contents;
}
- /* Fudge the size too, as this is used later in
+ /* Fudge the header size too, as this is used later in
elf_bfd_final_link if we are emitting relocs. */
elf_section_data (sec)->rel_hdr.sh_size
= sec->reloc_count * elf_section_data (sec)->rel_hdr.sh_entsize;
@@ -7907,7 +7977,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* 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)
+ else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
{
if (s->size != 0)
{
@@ -8302,6 +8372,33 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
rl += htab->relbrlt->reloc_count++ * sizeof (Elf64_External_Rela);
bfd_elf64_swap_reloca_out (htab->relbrlt->owner, &rela, rl);
}
+ else if (info->emitrelocations)
+ {
+ Elf_Internal_Rela *relocs, *r;
+ struct bfd_elf_section_data *elfsec_data;
+
+ elfsec_data = elf_section_data (htab->brlt);
+ relocs = elfsec_data->relocs;
+ if (relocs == NULL)
+ {
+ bfd_size_type relsize;
+ relsize = htab->brlt->reloc_count * sizeof (*relocs);
+ relocs = bfd_alloc (htab->brlt->owner, relsize);
+ if (relocs == NULL)
+ return FALSE;
+ elfsec_data->relocs = relocs;
+ elfsec_data->rel_hdr.sh_size = relsize;
+ elfsec_data->rel_hdr.sh_entsize = 24;
+ htab->brlt->reloc_count = 0;
+ }
+ r = relocs + htab->brlt->reloc_count;
+ htab->brlt->reloc_count += 1;
+ r->r_offset = (br_entry->offset
+ + htab->brlt->output_offset
+ + htab->brlt->output_section->vma);
+ r->r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
+ r->r_addend = off;
+ }
off = (br_entry->offset
+ htab->brlt->output_offset
@@ -8531,6 +8628,11 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (htab->relbrlt != NULL)
htab->relbrlt->size += sizeof (Elf64_External_Rela);
+ else if (info->emitrelocations)
+ {
+ htab->brlt->reloc_count += 1;
+ htab->brlt->flags |= SEC_RELOC;
+ }
}
stub_entry->stub_type += ppc_stub_plt_branch - ppc_stub_long_branch;
@@ -8538,11 +8640,11 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg)
if (stub_entry->stub_type != ppc_stub_plt_branch)
size = 28;
}
-
- if (info->emitrelocations
- && (stub_entry->stub_type == ppc_stub_long_branch
- || stub_entry->stub_type == ppc_stub_long_branch_r2off))
- stub_entry->stub_sec->reloc_count += 1;
+ else if (info->emitrelocations)
+ {
+ stub_entry->stub_sec->reloc_count += 1;
+ stub_entry->stub_sec->flags |= SEC_RELOC;
+ }
}
stub_entry->stub_sec->size += size;
@@ -8925,7 +9027,29 @@ group_sections (struct ppc_link_hash_table *htab,
bfd_size_type stub_group_size,
bfd_boolean stubs_always_before_branch)
{
- asection **list = htab->input_list + htab->top_index;
+ asection **list;
+ bfd_size_type stub14_group_size;
+ bfd_boolean suppress_size_errors;
+
+ suppress_size_errors = FALSE;
+ stub14_group_size = stub_group_size;
+ if (stub_group_size == 1)
+ {
+ /* Default values. */
+ if (stubs_always_before_branch)
+ {
+ stub_group_size = 0x1e00000;
+ stub14_group_size = 0x7800;
+ }
+ else
+ {
+ stub_group_size = 0x1c00000;
+ stub14_group_size = 0x7000;
+ }
+ suppress_size_errors = TRUE;
+ }
+
+ list = htab->input_list + htab->top_index;
do
{
asection *tail = *list;
@@ -8939,15 +9063,17 @@ group_sections (struct ppc_link_hash_table *htab,
curr = tail;
total = tail->size;
- big_sec = total > stub_group_size;
- if (big_sec)
+ big_sec = total > (ppc64_elf_section_data (tail)->has_14bit_branch
+ ? stub14_group_size : stub_group_size);
+ if (big_sec && !suppress_size_errors)
(*_bfd_error_handler) (_("%B section %A exceeds stub group size"),
tail->owner, tail);
curr_toc = htab->stub_group[tail->id].toc_off;
while ((prev = PREV_SEC (curr)) != NULL
&& ((total += curr->output_offset - prev->output_offset)
- < stub_group_size)
+ < (ppc64_elf_section_data (prev)->has_14bit_branch
+ ? stub14_group_size : stub_group_size))
&& htab->stub_group[prev->id].toc_off == curr_toc)
curr = prev;
@@ -8979,7 +9105,8 @@ group_sections (struct ppc_link_hash_table *htab,
total = 0;
while (prev != NULL
&& ((total += tail->output_offset - prev->output_offset)
- < stub_group_size)
+ < (ppc64_elf_section_data (prev)->has_14bit_branch
+ ? stub14_group_size : stub_group_size))
&& htab->stub_group[prev->id].toc_off == curr_toc)
{
tail = prev;
@@ -9020,22 +9147,6 @@ ppc64_elf_size_stubs (bfd *output_bfd,
stub_group_size = -group_size;
else
stub_group_size = group_size;
- if (stub_group_size == 1)
- {
- /* Default values. */
- if (stubs_always_before_branch)
- {
- stub_group_size = 0x1e00000;
- if (htab->has_14bit_branch)
- stub_group_size = 0x7800;
- }
- else
- {
- stub_group_size = 0x1c00000;
- if (htab->has_14bit_branch)
- stub_group_size = 0x7000;
- }
- }
group_sections (htab, stub_group_size, stubs_always_before_branch);
@@ -9073,6 +9184,9 @@ ppc64_elf_size_stubs (bfd *output_bfd,
/* If there aren't any relocs, then there's nothing more
to do. */
if ((section->flags & SEC_RELOC) == 0
+ || (section->flags & SEC_ALLOC) == 0
+ || (section->flags & SEC_LOAD) == 0
+ || (section->flags & SEC_CODE) == 0
|| section->reloc_count == 0)
continue;
@@ -9322,9 +9436,12 @@ ppc64_elf_size_stubs (bfd *output_bfd,
stub_sec->rawsize = stub_sec->size;
stub_sec->size = 0;
stub_sec->reloc_count = 0;
+ stub_sec->flags &= ~SEC_RELOC;
}
htab->brlt->size = 0;
+ htab->brlt->reloc_count = 0;
+ htab->brlt->flags &= ~SEC_RELOC;
if (htab->relbrlt != NULL)
htab->relbrlt->size = 0;
@@ -9442,24 +9559,12 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
stub_sec->size = 0;
}
- if (htab->glink != NULL && htab->glink->contents != NULL)
+ if (htab->glink != NULL && htab->glink->size != 0)
{
unsigned int indx;
bfd_vma plt0;
/* Build the .glink plt call stub. */
- plt0 = (htab->plt->output_section->vma
- + htab->plt->output_offset
- - (htab->glink->output_section->vma
- + htab->glink->output_offset
- + GLINK_CALL_STUB_SIZE));
- if (plt0 + 0x80008000 > 0xffffffff)
- {
- (*_bfd_error_handler) (_(".glink and .plt too far apart"));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
-
if (htab->emit_stub_syms)
{
struct elf_link_hash_entry *h;
@@ -9470,7 +9575,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
{
h->root.type = bfd_link_hash_defined;
h->root.u.def.section = htab->glink;
- h->root.u.def.value = 0;
+ h->root.u.def.value = 8;
h->ref_regular = 1;
h->def_regular = 1;
h->ref_regular_nonweak = 1;
@@ -9479,29 +9584,26 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
}
}
p = htab->glink->contents;
- bfd_put_32 (htab->glink->owner, MFCTR_R12, p);
- p += 4;
- bfd_put_32 (htab->glink->owner, SLDI_R11_R0_3, p);
- p += 4;
- bfd_put_32 (htab->glink->owner, ADDIC_R2_R0_32K, p);
- p += 4;
- bfd_put_32 (htab->glink->owner, SUB_R12_R12_R11, p);
- p += 4;
- bfd_put_32 (htab->glink->owner, SRADI_R2_R2_63, p);
- p += 4;
- bfd_put_32 (htab->glink->owner, SLDI_R11_R0_2, p);
+ plt0 = (htab->plt->output_section->vma
+ + htab->plt->output_offset
+ - (htab->glink->output_section->vma
+ + htab->glink->output_offset
+ + 16));
+ bfd_put_64 (htab->glink->owner, plt0, p);
+ p += 8;
+ bfd_put_32 (htab->glink->owner, MFLR_R12, p);
p += 4;
- bfd_put_32 (htab->glink->owner, AND_R2_R2_R11, p);
+ bfd_put_32 (htab->glink->owner, BCL_20_31, p);
p += 4;
- bfd_put_32 (htab->glink->owner, SUB_R12_R12_R11, p);
+ bfd_put_32 (htab->glink->owner, MFLR_R11, p);
p += 4;
- bfd_put_32 (htab->glink->owner, ADD_R12_R12_R2, p);
+ bfd_put_32 (htab->glink->owner, LD_R2_M16R11, p);
p += 4;
- bfd_put_32 (htab->glink->owner, ADDIS_R12_R12 | PPC_HA (plt0), p);
+ bfd_put_32 (htab->glink->owner, MTLR_R12, p);
p += 4;
- bfd_put_32 (htab->glink->owner, LD_R11_0R12 | PPC_LO (plt0), p);
+ bfd_put_32 (htab->glink->owner, ADD_R12_R2_R11, p);
p += 4;
- bfd_put_32 (htab->glink->owner, ADDI_R12_R12 | PPC_LO (plt0), p);
+ bfd_put_32 (htab->glink->owner, LD_R11_0R12, p);
p += 4;
bfd_put_32 (htab->glink->owner, LD_R2_0R12 | 8, p);
p += 4;
@@ -9511,6 +9613,11 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
p += 4;
bfd_put_32 (htab->glink->owner, BCTR, p);
p += 4;
+ while (p - htab->glink->contents < GLINK_CALL_STUB_SIZE)
+ {
+ bfd_put_32 (htab->glink->owner, NOP, p);
+ p += 4;
+ }
/* Build the .glink lazy link call stubs. */
indx = 0;
@@ -9529,7 +9636,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
p += 4;
}
bfd_put_32 (htab->glink->owner,
- B_DOT | ((htab->glink->contents - p) & 0x3fffffc), p);
+ B_DOT | ((htab->glink->contents - p + 8) & 0x3fffffc), p);
indx++;
p += 4;
}
@@ -9554,6 +9661,9 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms,
/* Build the stubs as directed by the stub hash table. */
bfd_hash_traverse (&htab->stub_hash_table, ppc_build_one_stub, info);
+ if (htab->relbrlt != NULL)
+ htab->relbrlt->reloc_count = 0;
+
for (stub_sec = htab->stub_bfd->sections;
stub_sec != NULL;
stub_sec = stub_sec->next)
@@ -9698,6 +9808,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
bfd_boolean is_opd;
/* Disabled until we sort out how ld should choose 'y' vs 'at'. */
bfd_boolean is_power4 = FALSE;
+ bfd_vma d_offset = (bfd_big_endian (output_bfd) ? 2 : 0);
/* Initialize howto table if needed. */
if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
@@ -9713,7 +9824,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
TOCstart = elf_gp (output_bfd);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
- is_opd = ppc64_elf_section_data (input_section)->opd.adjust != NULL;
+ is_opd = ppc64_elf_section_data (input_section)->sec_type == sec_opd;
rel = relocs;
relend = relocs + input_section->reloc_count;
@@ -9788,13 +9899,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
relocation += adjust;
}
}
- if (info->relocatable)
- continue;
}
else
{
- if (info->relocatable)
- continue;
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
r_symndx, symtab_hdr, sym_hashes,
h_elf, sec, relocation,
@@ -9804,6 +9911,21 @@ ppc64_elf_relocate_section (bfd *output_bfd,
}
h = (struct ppc_link_hash_entry *) h_elf;
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (ppc64_elf_howto_table[r_type], input_bfd,
+ contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ continue;
+
/* TLS optimizations. Replace instruction sequences and relocs
based on information we collected in tls_optimize. We edit
RELOCS so that --emit-relocs will output something sensible
@@ -9927,10 +10049,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
&& (tls_mask & TLS_TPREL) == 0)
{
toctprel:
- insn = bfd_get_32 (output_bfd, contents + rel->r_offset - 2);
+ insn = bfd_get_32 (output_bfd, contents + rel->r_offset - d_offset);
insn &= 31 << 21;
insn |= 0x3c0d0000; /* addis 0,13,0 */
- bfd_put_32 (output_bfd, insn, contents + rel->r_offset - 2);
+ bfd_put_32 (output_bfd, insn, contents + rel->r_offset - d_offset);
r_type = R_PPC64_TPREL16_HA;
if (toc_symndx != 0)
{
@@ -9982,8 +10104,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
insn |= rtra;
bfd_put_32 (output_bfd, insn, contents + rel->r_offset);
/* Was PPC64_TLS which sits on insn boundary, now
- PPC64_TPREL16_LO which is at insn+2. */
- rel->r_offset += 2;
+ PPC64_TPREL16_LO which is at low-order half-word. */
+ rel->r_offset += d_offset;
r_type = R_PPC64_TPREL16_LO;
if (toc_symndx != 0)
{
@@ -10016,7 +10138,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
else
{
bfd_put_32 (output_bfd, NOP, contents + rel->r_offset);
- rel->r_offset -= 2;
+ rel->r_offset -= d_offset;
r_type = R_PPC64_NONE;
}
rel->r_info = ELF64_R_INFO (r_symndx, r_type);
@@ -10065,7 +10187,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
/* OK, it checks out. Replace the call. */
offset = rel[1].r_offset;
insn1 = bfd_get_32 (output_bfd,
- contents + rel->r_offset - 2);
+ contents + rel->r_offset - d_offset);
insn3 = bfd_get_32 (output_bfd,
contents + offset + 4);
if ((tls_mask & tls_gd) != 0)
@@ -10100,7 +10222,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
rel->r_info = ELF64_R_INFO (r_symndx, r_type);
rel[1].r_info = ELF64_R_INFO (r_symndx,
R_PPC64_TPREL16_LO);
- rel[1].r_offset += 2;
+ rel[1].r_offset += d_offset;
}
if (insn3 == NOP
|| insn3 == CROR_151515 || insn3 == CROR_313131)
@@ -10109,7 +10231,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
insn2 = NOP;
rel[1].r_offset += 4;
}
- bfd_put_32 (output_bfd, insn1, contents + rel->r_offset - 2);
+ bfd_put_32 (output_bfd, insn1, contents + rel->r_offset - d_offset);
bfd_put_32 (output_bfd, insn2, contents + offset);
bfd_put_32 (output_bfd, insn3, contents + offset + 4);
if (tls_gd == 0 || toc_symndx != 0)
@@ -10623,7 +10745,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
relocation += htab->stub_group[sec->id].toc_off;
else
unresolved_reloc = TRUE;
- goto dodyn2;
+ goto dodyn;
/* TOC16 relocs. We want the offset relative to the TOC base,
which is the address of the start of the TOC plus 0x8000.
@@ -10723,15 +10845,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
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. */
dodyn:
- if (r_symndx == 0)
- break;
- /* Fall thru. */
-
- dodyn2:
if ((input_section->flags & SEC_ALLOC) == 0)
break;
@@ -10841,6 +10955,17 @@ ppc64_elf_relocate_section (bfd *output_bfd,
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
+ if (indx == 0)
+ {
+ if ((osec->flags & SEC_READONLY) == 0
+ && htab->elf.data_index_section != NULL)
+ osec = htab->elf.data_index_section;
+ else
+ osec = htab->elf.text_index_section;
+ indx = elf_section_data (osec)->dynindx;
+ }
+ BFD_ASSERT (indx != 0);
+
/* We are turning this relocation into one
against a section symbol, so subtract out
the output section's address but not the
@@ -10929,17 +11054,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
case R_PPC64_ADDR16_HA:
case R_PPC64_ADDR16_HIGHERA:
case R_PPC64_ADDR16_HIGHESTA:
- case R_PPC64_GOT16_HA:
- case R_PPC64_PLTGOT16_HA:
- case R_PPC64_PLT16_HA:
case R_PPC64_TOC16_HA:
case R_PPC64_SECTOFF_HA:
case R_PPC64_TPREL16_HA:
case R_PPC64_DTPREL16_HA:
- case R_PPC64_GOT_TLSGD16_HA:
- case R_PPC64_GOT_TLSLD16_HA:
- case R_PPC64_GOT_TPREL16_HA:
- case R_PPC64_GOT_DTPREL16_HA:
case R_PPC64_TPREL16_HIGHER:
case R_PPC64_TPREL16_HIGHERA:
case R_PPC64_TPREL16_HIGHEST:
@@ -10952,10 +11070,20 @@ ppc64_elf_relocate_section (bfd *output_bfd,
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.
- Bits 0:15 are not used. */
- addend += 0x8000;
+ if (sec == NULL)
+ break;
+ /* Fall thru */
+
+ case R_PPC64_GOT16_HA:
+ case R_PPC64_PLTGOT16_HA:
+ case R_PPC64_PLT16_HA:
+ case R_PPC64_GOT_TLSGD16_HA:
+ case R_PPC64_GOT_TLSLD16_HA:
+ case R_PPC64_GOT_TPREL16_HA:
+ case R_PPC64_GOT_DTPREL16_HA:
+ /* Add 0x10000 if sign bit in 0:15 is set.
+ Bits 0:15 are not used. */
+ addend += 0x8000;
break;
case R_PPC64_ADDR16_DS:
@@ -11128,13 +11256,11 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd,
Elf_Internal_Sym *sym)
{
struct ppc_link_hash_table *htab;
- bfd *dynobj;
struct plt_entry *ent;
Elf_Internal_Rela rela;
bfd_byte *loc;
htab = ppc_hash_table (info);
- dynobj = htab->elf.dynobj;
for (ent = h->plt.plist; ent != NULL; ent = ent->next)
if (ent->plt.offset != (bfd_vma) -1)
@@ -11331,6 +11457,17 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
= PLT_ENTRY_SIZE;
}
+ /* brlt is SEC_LINKER_CREATED, so we need to write out relocs for
+ brlt ourselves if emitrelocations. */
+ if (htab->brlt != NULL
+ && htab->brlt->reloc_count != 0
+ && !_bfd_elf_link_output_relocs (output_bfd,
+ htab->brlt,
+ &elf_section_data (htab->brlt)->rel_hdr,
+ elf_section_data (htab->brlt)->relocs,
+ NULL))
+ return FALSE;
+
/* We need to handle writing out multiple GOT sections ourselves,
since we didn't add them to DYNOBJ. We know dynobj is the first
bfd. */
diff --git a/contrib/binutils/bfd/elf64-s390.c b/contrib/binutils/bfd/elf64-s390.c
index 1fe0c6c..47fbff6 100644
--- a/contrib/binutils/bfd/elf64-s390.c
+++ b/contrib/binutils/bfd/elf64-s390.c
@@ -1,5 +1,5 @@
/* IBM S/390-specific support for 64-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
@@ -20,8 +20,8 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -46,12 +46,6 @@ static void elf_s390_copy_indirect_symbol
static bfd_boolean elf_s390_check_relocs
PARAMS ((bfd *, struct bfd_link_info *, asection *,
const Elf_Internal_Rela *));
-static asection *elf_s390_gc_mark_hook
- PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *));
-static bfd_boolean elf_s390_gc_sweep_hook
- PARAMS ((bfd *, struct bfd_link_info *, asection *,
- const Elf_Internal_Rela *));
struct elf_s390_link_hash_entry;
static void elf_s390_adjust_gotplt
PARAMS ((struct elf_s390_link_hash_entry *));
@@ -73,8 +67,6 @@ static enum elf_reloc_type_class elf_s390_reloc_type_class
PARAMS ((const Elf_Internal_Rela *));
static bfd_boolean elf_s390_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
-static bfd_boolean elf_s390_mkobject
- PARAMS ((bfd *));
static bfd_boolean elf_s390_object_p
PARAMS ((bfd *));
static int elf_s390_tls_transition
@@ -364,6 +356,27 @@ elf_s390_reloc_type_lookup (abfd, code)
return 0;
}
+static reloc_howto_type *
+elf_s390_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (elf_howto_table) / sizeof (elf_howto_table[0]);
+ i++)
+ if (elf_howto_table[i].name != NULL
+ && strcasecmp (elf_howto_table[i].name, r_name) == 0)
+ return &elf_howto_table[i];
+
+ if (strcasecmp (elf64_s390_vtinherit_howto.name, r_name) == 0)
+ return &elf64_s390_vtinherit_howto;
+ if (strcasecmp (elf64_s390_vtentry_howto.name, r_name) == 0)
+ return &elf64_s390_vtentry_howto;
+
+ return NULL;
+}
+
/* We need to use ELF64_R_TYPE so we have our own copy of this function,
and elf64-s390.c has its own copy. */
@@ -631,14 +644,16 @@ struct elf_s390_obj_tdata
(elf_s390_tdata (abfd)->local_got_tls_type)
static bfd_boolean
-elf_s390_mkobject (abfd)
- bfd *abfd;
+elf_s390_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct elf_s390_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
static bfd_boolean
@@ -1238,7 +1253,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
if (name == NULL)
return FALSE;
- if (strncmp (name, ".rela", 5) != 0
+ if (! CONST_STRNEQ (name, ".rela")
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
@@ -1345,50 +1360,30 @@ elf_s390_check_relocs (abfd, info, sec, relocs)
relocation. */
static asection *
-elf_s390_gc_mark_hook (sec, info, rel, h, sym)
- asection *sec;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
- Elf_Internal_Rela *rel;
- struct elf_link_hash_entry *h;
- Elf_Internal_Sym *sym;
+elf_s390_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info,
+ Elf_Internal_Rela *rel,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
{
if (h != NULL)
- {
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_390_GNU_VTINHERIT:
- case R_390_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 (sec->owner, sym->st_shndx);
-
- return NULL;
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_390_GNU_VTINHERIT:
+ case R_390_GNU_VTENTRY:
+ return NULL;
+ }
+
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got entry reference counts for the section being removed. */
static bfd_boolean
-elf_s390_gc_sweep_hook (abfd, info, sec, relocs)
- bfd *abfd;
- struct bfd_link_info *info;
- asection *sec;
- const Elf_Internal_Rela *relocs;
+elf_s390_gc_sweep_hook (bfd *abfd,
+ struct bfd_link_info *info,
+ asection *sec,
+ const Elf_Internal_Rela *relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes;
@@ -1562,7 +1557,6 @@ elf_s390_adjust_dynamic_symbol (info, h)
{
struct elf_s390_link_hash_table *htab;
asection *s;
- unsigned int power_of_two;
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later
@@ -1683,29 +1677,9 @@ elf_s390_adjust_dynamic_symbol (info, h)
h->needs_copy = 1;
}
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 3)
- power_of_two = 3;
-
- /* Apply the required alignment. */
s = htab->sdynbss;
- s->size = BFD_ALIGN (s->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->size;
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
-
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* Allocate space in .plt, .got and associated reloc sections for
@@ -2098,7 +2072,7 @@ elf_s390_size_dynamic_sections (output_bfd, info)
/* 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)
+ else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
{
if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
@@ -2240,6 +2214,7 @@ invalid_tls_insn (input_bfd, input_section, rel)
input_section,
(long) rel->r_offset,
howto->name);
+ bfd_set_error (bfd_error_bad_value);
}
/* Relocate a 390 ELF section. */
@@ -2263,9 +2238,6 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocatable)
- return TRUE;
-
htab = elf_s390_hash_table (info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -2300,7 +2272,6 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
howto = elf_howto_table + r_type;
r_symndx = ELF64_R_SYM (rel->r_info);
- /* This is a final link. */
h = NULL;
sym = NULL;
sec = NULL;
@@ -2321,6 +2292,20 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
unresolved_reloc, warned);
}
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ continue;
+
switch (r_type)
{
case R_390_GOTPLT12:
@@ -2544,11 +2529,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
case R_390_PC32:
case R_390_PC32DBL:
case R_390_PC64:
- /* 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
- || (input_section->flags & SEC_ALLOC) == 0)
+ if ((input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2636,14 +2617,19 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
osec = sec->output_section;
sindx = elf_section_data (osec)->dynindx;
- BFD_ASSERT (sindx > 0);
+
+ if (sindx == 0)
+ {
+ osec = htab->elf.text_index_section;
+ sindx = elf_section_data (osec)->dynindx;
+ }
+ BFD_ASSERT (sindx != 0);
/* 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 (sindx, r_type);
@@ -2908,7 +2894,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
case R_390_TLS_LDO64:
- if (info->shared || (input_section->flags & SEC_CODE) == 0)
+ if (info->shared)
relocation -= dtpoff_base (info);
else
/* When converting LDO to LE, we must negate. */
@@ -3462,6 +3448,7 @@ const struct elf_size_info s390_elf64_size_info =
#define bfd_elf64_bfd_is_local_label_name elf_s390_is_local_label_name
#define bfd_elf64_bfd_link_hash_table_create elf_s390_link_hash_table_create
#define bfd_elf64_bfd_reloc_type_lookup elf_s390_reloc_type_lookup
+#define bfd_elf64_bfd_reloc_name_lookup elf_s390_reloc_name_lookup
#define elf_backend_adjust_dynamic_symbol elf_s390_adjust_dynamic_symbol
#define elf_backend_check_relocs elf_s390_check_relocs
@@ -3474,6 +3461,7 @@ const struct elf_size_info s390_elf64_size_info =
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_relocate_section elf_s390_relocate_section
#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections
+#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_reloc_type_class elf_s390_reloc_type_class
#define elf_backend_plt_sym_val elf_s390_plt_sym_val
diff --git a/contrib/binutils/bfd/elf64-sparc.c b/contrib/binutils/bfd/elf64-sparc.c
index dd1c302..2adddd9 100644
--- a/contrib/binutils/bfd/elf64-sparc.c
+++ b/contrib/binutils/bfd/elf64-sparc.c
@@ -1,6 +1,6 @@
/* SPARC-specific support for 64-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/sparc.h"
@@ -814,6 +814,7 @@ const struct elf_size_info elf64_sparc_size_info =
#define TARGET_BIG_NAME "elf64-sparc"
#define ELF_ARCH bfd_arch_sparc
#define ELF_MAXPAGESIZE 0x100000
+#define ELF_COMMONPAGESIZE 0x2000
/* This is the official ABI value. */
#define ELF_MACHINE_CODE EM_SPARCV9
@@ -858,6 +859,8 @@ const struct elf_size_info elf64_sparc_size_info =
_bfd_sparc_elf_copy_indirect_symbol
#define bfd_elf64_bfd_reloc_type_lookup \
_bfd_sparc_elf_reloc_type_lookup
+#define bfd_elf64_bfd_reloc_name_lookup \
+ _bfd_sparc_elf_reloc_name_lookup
#define bfd_elf64_bfd_relax_section \
_bfd_sparc_elf_relax_section
#define bfd_elf64_new_section_hook \
@@ -888,6 +891,8 @@ const struct elf_size_info elf64_sparc_size_info =
_bfd_sparc_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook \
_bfd_sparc_elf_gc_sweep_hook
+#define elf_backend_init_index_section \
+ _bfd_elf_init_1_index_section
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
@@ -901,3 +906,19 @@ const struct elf_size_info elf64_sparc_size_info =
#define elf_backend_plt_alignment 8
#include "elf64-target.h"
+
+/* FreeBSD support */
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elf64_sparc_freebsd_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elf64-sparc-freebsd"
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_FREEBSD
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers _bfd_elf_set_osabi
+#undef elf64_bed
+#define elf64_bed elf64_sparc_fbsd_bed
+
+#include "elf64-target.h"
+
diff --git a/contrib/binutils/bfd/elf64-x86-64.c b/contrib/binutils/bfd/elf64-x86-64.c
index 9befd69..0ee75ce 100644
--- a/contrib/binutils/bfd/elf64-x86-64.c
+++ b/contrib/binutils/bfd/elf64-x86-64.c
@@ -1,5 +1,5 @@
/* X86-64 specific support for 64-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Jan Hubicka <jh@suse.cz>.
@@ -19,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -246,6 +246,23 @@ elf64_x86_64_reloc_type_lookup (bfd *abfd,
return 0;
}
+static reloc_howto_type *
+elf64_x86_64_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (x86_64_elf_howto_table)
+ / sizeof (x86_64_elf_howto_table[0]));
+ i++)
+ if (x86_64_elf_howto_table[i].name != NULL
+ && strcasecmp (x86_64_elf_howto_table[i].name, r_name) == 0)
+ return &x86_64_elf_howto_table[i];
+
+ return NULL;
+}
+
/* Given an x86_64 ELF reloc type, fill in an arelent structure. */
static void
@@ -350,7 +367,7 @@ static const bfd_byte elf64_x86_64_plt0_entry[PLT_ENTRY_SIZE] =
{
0xff, 0x35, 8, 0, 0, 0, /* pushq GOT+8(%rip) */
0xff, 0x25, 16, 0, 0, 0, /* jmpq *GOT+16(%rip) */
- 0x90, 0x90, 0x90, 0x90 /* pad out to 16 bytes with nops. */
+ 0x0f, 0x1f, 0x40, 0x00 /* nopl 0(%rax) */
};
/* Subsequent entries in a procedure linkage table look like this. */
@@ -676,11 +693,14 @@ elf64_x86_64_copy_indirect_symbol (struct bfd_link_info *info,
static bfd_boolean
elf64_x86_64_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct elf64_x86_64_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct elf64_x86_64_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
static bfd_boolean
@@ -994,7 +1014,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
&& (r_type != R_X86_64_PC32)
&& (r_type != R_X86_64_PC64))
|| (h != NULL
- && (! info->symbolic
+ && (! SYMBOLIC_BIND (info, h)
|| h->root.type == bfd_link_hash_defweak
|| !h->def_regular))))
|| (ELIMINATE_COPY_RELOCS
@@ -1022,7 +1042,7 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
if (name == NULL)
return FALSE;
- if (strncmp (name, ".rela", 5) != 0
+ if (! CONST_STRNEQ (name, ".rela")
|| strcmp (bfd_get_section_name (abfd, sec),
name + 5) != 0)
{
@@ -1131,38 +1151,20 @@ elf64_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec,
static asection *
elf64_x86_64_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- {
- switch (ELF64_R_TYPE (rel->r_info))
- {
- case R_X86_64_GNU_VTINHERIT:
- case R_X86_64_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 (sec->owner, sym->st_shndx);
-
- return NULL;
+ switch (ELF64_R_TYPE (rel->r_info))
+ {
+ case R_X86_64_GNU_VTINHERIT:
+ case R_X86_64_GNU_VTENTRY:
+ return NULL;
+ }
+
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got entry reference counts for the section being removed. */
@@ -1285,7 +1287,6 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
{
struct elf64_x86_64_link_hash_table *htab;
asection *s;
- unsigned int power_of_two;
/* If this is a function, put it in the procedure linkage table. We
will fill in the contents of the procedure linkage table later,
@@ -1403,32 +1404,9 @@ elf64_x86_64_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_copy = 1;
}
- /* We need to figure out the alignment required for this symbol. I
- have no idea how ELF linkers handle this. 16-bytes is the size
- of the largest type that requires hard alignment -- long double. */
- /* FIXME: This is VERY ugly. Should be fixed for all architectures using
- this construct. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 4)
- power_of_two = 4;
-
- /* Apply the required alignment. */
s = htab->sdynbss;
- s->size = BFD_ALIGN (s->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->size;
-
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* Allocate space in .plt, .got and associated reloc sections for
@@ -1880,7 +1858,7 @@ elf64_x86_64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
/* 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)
+ else if (CONST_STRNEQ (bfd_get_section_name (dynobj, s), ".rela"))
{
if (s->size != 0 && s != htab->srelplt)
relocs = TRUE;
@@ -2077,9 +2055,6 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
Elf_Internal_Rela *rel;
Elf_Internal_Rela *relend;
- if (info->relocatable)
- return TRUE;
-
htab = elf64_x86_64_hash_table (info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -2135,6 +2110,21 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
h, sec, relocation,
unresolved_reloc, warned);
}
+
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ continue;
+
/* When generating a shared object, the relocations handled here are
copied into the output file to be resolved at run time. */
switch (r_type)
@@ -2382,11 +2372,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
/* FIXME: The ABI says the linker should make sure the value is
the same when it's zeroextended to 64 bit. */
- /* 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
- || (input_section->flags & SEC_ALLOC) == 0)
+ if ((input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2442,7 +2428,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|| r_type == R_X86_64_PC32
|| r_type == R_X86_64_PC64
|| !info->shared
- || !info->symbolic
+ || !SYMBOLIC_BIND (info, h)
|| !h->def_regular))
{
outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
@@ -2472,9 +2458,19 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
asection *osec;
+ /* We are turning this relocation into one
+ against a section symbol. It would be
+ proper to subtract the symbol's value,
+ osec->vma, from the emitted reloc addend,
+ but ld.so expects buggy relocs. */
osec = sec->output_section;
sindx = elf_section_data (osec)->dynindx;
- BFD_ASSERT (sindx > 0);
+ if (sindx == 0)
+ {
+ asection *oi = htab->elf.text_index_section;
+ sindx = elf_section_data (oi)->dynindx;
+ }
+ BFD_ASSERT (sindx != 0);
}
outrel.r_info = ELF64_R_INFO (sindx, r_type);
@@ -2614,8 +2610,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
val = bfd_get_8 (input_bfd, contents + roff + 1);
BFD_ASSERT (val == 0x10);
- /* Now modify the instruction as appropriate. */
- bfd_put_8 (output_bfd, 0x90, contents + roff);
+ /* Now modify the instruction as appropriate. Use
+ xchg %ax,%ax instead of 2 nops. */
+ bfd_put_8 (output_bfd, 0x66, contents + roff);
bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
continue;
}
@@ -2907,8 +2904,9 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
val = bfd_get_8 (input_bfd, contents + roff + 1);
BFD_ASSERT (val == 0x10);
- /* Now modify the instruction as appropriate. */
- bfd_put_8 (output_bfd, 0x90, contents + roff);
+ /* Now modify the instruction as appropriate. Use
+ xchg %ax,%ax instead of 2 nops. */
+ bfd_put_8 (output_bfd, 0x66, contents + roff);
bfd_put_8 (output_bfd, 0x90, contents + roff + 1);
continue;
@@ -3030,12 +3028,6 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (r == bfd_reloc_overflow)
{
- if (h != NULL
- && h->root.type == bfd_link_hash_undefweak
- && howto->pc_relative)
- /* Ignore reloc overflow on branches to undefweak syms. */
- continue;
-
if (! ((*info->callbacks->reloc_overflow)
(info, (h ? &h->root : NULL), name, howto->name,
(bfd_vma) 0, input_bfd, input_section,
@@ -3594,7 +3586,8 @@ elf64_x86_64_merge_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED,
}
static int
-elf64_x86_64_additional_program_headers (bfd *abfd)
+elf64_x86_64_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
int count = 0;
@@ -3614,23 +3607,38 @@ elf64_x86_64_additional_program_headers (bfd *abfd)
return count;
}
+/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
+
+static bfd_boolean
+elf64_x86_64_hash_symbol (struct elf_link_hash_entry *h)
+{
+ if (h->plt.offset != (bfd_vma) -1
+ && !h->def_regular
+ && !h->pointer_equality_needed)
+ return FALSE;
+
+ return _bfd_elf_hash_symbol (h);
+}
+
static const struct bfd_elf_special_section
elf64_x86_64_special_sections[]=
{
- { ".gnu.linkonce.lb", 16, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
- { ".gnu.linkonce.lr", 16, -2, SHT_PROGBITS, SHF_ALLOC + SHF_X86_64_LARGE},
- { ".gnu.linkonce.lt", 16, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR + SHF_X86_64_LARGE},
- { ".lbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
- { ".ldata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
- { ".lrodata", 8, -2, SHT_PROGBITS, SHF_ALLOC + SHF_X86_64_LARGE},
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".gnu.linkonce.lb"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
+ { STRING_COMMA_LEN (".gnu.linkonce.lr"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_X86_64_LARGE},
+ { STRING_COMMA_LEN (".gnu.linkonce.lt"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR + SHF_X86_64_LARGE},
+ { STRING_COMMA_LEN (".lbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
+ { STRING_COMMA_LEN (".ldata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_X86_64_LARGE},
+ { STRING_COMMA_LEN (".lrodata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_X86_64_LARGE},
+ { NULL, 0, 0, 0, 0 }
};
#define TARGET_LITTLE_SYM bfd_elf64_x86_64_vec
#define TARGET_LITTLE_NAME "elf64-x86-64"
#define ELF_ARCH bfd_arch_i386
#define ELF_MACHINE_CODE EM_X86_64
-#define ELF_MAXPAGESIZE 0x100000
+#define ELF_MAXPAGESIZE 0x200000
+#define ELF_MINPAGESIZE 0x1000
+#define ELF_COMMONPAGESIZE 0x1000
#define elf_backend_can_gc_sections 1
#define elf_backend_can_refcount 1
@@ -3645,6 +3653,8 @@ static const struct bfd_elf_special_section
#define bfd_elf64_bfd_link_hash_table_create \
elf64_x86_64_link_hash_table_create
#define bfd_elf64_bfd_reloc_type_lookup elf64_x86_64_reloc_type_lookup
+#define bfd_elf64_bfd_reloc_name_lookup \
+ elf64_x86_64_reloc_name_lookup
#define elf_backend_adjust_dynamic_symbol elf64_x86_64_adjust_dynamic_symbol
#define elf_backend_check_relocs elf64_x86_64_check_relocs
@@ -3660,6 +3670,7 @@ static const struct bfd_elf_special_section
#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_always_size_sections elf64_x86_64_always_size_sections
+#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_plt_sym_val elf64_x86_64_plt_sym_val
#define elf_backend_object_p elf64_x86_64_elf_object_p
#define bfd_elf64_mkobject elf64_x86_64_mkobject
@@ -3685,5 +3696,25 @@ static const struct bfd_elf_special_section
elf64_x86_64_special_sections
#define elf_backend_additional_program_headers \
elf64_x86_64_additional_program_headers
+#define elf_backend_hash_symbol \
+ elf64_x86_64_hash_symbol
+
+#include "elf64-target.h"
+
+/* FreeBSD support. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elf64_x86_64_freebsd_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elf64-x86-64-freebsd"
+
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_FREEBSD
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers _bfd_elf_set_osabi
+
+#undef elf64_bed
+#define elf64_bed elf64_x86_64_fbsd_bed
#include "elf64-target.h"
diff --git a/contrib/binutils/bfd/elfcode.h b/contrib/binutils/bfd/elfcode.h
index 1f8ec2b..191e124 100644
--- a/contrib/binutils/bfd/elfcode.h
+++ b/contrib/binutils/bfd/elfcode.h
@@ -1,6 +1,7 @@
/* ELF executable support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -64,8 +65,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
it's cast in stone.
*/
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "bfdlink.h"
#include "libbfd.h"
@@ -139,10 +140,11 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define LOG_FILE_ALIGN 2
#endif
-#ifdef DEBUG
+#if DEBUG & 2
static void elf_debug_section (int, Elf_Internal_Shdr *);
+#endif
+#if DEBUG & 1
static void elf_debug_file (Elf_Internal_Ehdr *);
-static char *elf_symbol_flags (flagword);
#endif
/* Structure swapping routines */
@@ -165,7 +167,7 @@ static char *elf_symbol_flags (flagword);
/* Translate an ELF symbol in external format into an ELF symbol in internal
format. */
-void
+bfd_boolean
elf_swap_symbol_in (bfd *abfd,
const void *psrc,
const void *pshn,
@@ -187,9 +189,10 @@ elf_swap_symbol_in (bfd *abfd,
if (dst->st_shndx == SHN_XINDEX)
{
if (shndx == NULL)
- abort ();
+ return FALSE;
dst->st_shndx = H_GET_32 (abfd, shndx->est_shndx);
}
+ return TRUE;
}
/* Translate an ELF symbol in internal format into an ELF symbol in external
@@ -498,6 +501,8 @@ elf_object_p (bfd *abfd)
struct bfd_preserve preserve;
asection *s;
bfd_size_type amt;
+ const bfd_target *target;
+ const bfd_target * const *target_ptr;
preserve.marker = NULL;
@@ -541,10 +546,12 @@ elf_object_p (bfd *abfd)
if (!bfd_preserve_save (abfd, &preserve))
goto got_no_match;
+ target = abfd->xvec;
+
/* Allocate an instance of the elf_obj_tdata structure and hook it up to
the tdata pointer in the bfd. */
- if (! (*abfd->xvec->_bfd_set_format[bfd_object]) (abfd))
+ if (! (*target->_bfd_set_format[bfd_object]) (abfd))
goto got_no_match;
preserve.marker = elf_tdata (abfd);
@@ -584,8 +591,6 @@ elf_object_p (bfd *abfd)
&& (ebd->elf_machine_alt2 == 0
|| i_ehdrp->e_machine != ebd->elf_machine_alt2))
{
- const bfd_target * const *target_ptr;
-
if (ebd->elf_machine_code != EM_NONE)
goto got_wrong_format_error;
@@ -626,6 +631,45 @@ elf_object_p (bfd *abfd)
goto got_no_match;
}
+ if (ebd->elf_machine_code != EM_NONE
+ && i_ehdrp->e_ident[EI_OSABI] != ebd->elf_osabi)
+ {
+ if (ebd->elf_osabi != ELFOSABI_NONE)
+ goto got_wrong_format_error;
+
+ /* This is an ELFOSABI_NONE ELF target. Let it match any ELF
+ target of the compatible machine for which we do not have a
+ backend with matching ELFOSABI. */
+ for (target_ptr = bfd_target_vector;
+ *target_ptr != NULL;
+ target_ptr++)
+ {
+ const struct elf_backend_data *back;
+
+ /* Skip this target and targets with incompatible byte
+ order. */
+ if (*target_ptr == target
+ || (*target_ptr)->flavour != bfd_target_elf_flavour
+ || (*target_ptr)->byteorder != target->byteorder
+ || ((*target_ptr)->header_byteorder
+ != target->header_byteorder))
+ continue;
+
+ back = (const struct elf_backend_data *) (*target_ptr)->backend_data;
+ if (back->elf_osabi == i_ehdrp->e_ident[EI_OSABI]
+ && (back->elf_machine_code == i_ehdrp->e_machine
+ || (back->elf_machine_alt1 != 0
+ && back->elf_machine_alt1 == i_ehdrp->e_machine)
+ || (back->elf_machine_alt2 != 0
+ && back->elf_machine_alt2 == i_ehdrp->e_machine)))
+ {
+ /* target_ptr is an ELF backend which matches this
+ object file, so reject the ELFOSABI_NONE ELF target. */
+ goto got_wrong_format_error;
+ }
+ }
+ }
+
if (i_ehdrp->e_shoff != 0)
{
bfd_signed_vma where = i_ehdrp->e_shoff;
@@ -846,7 +890,7 @@ elf_object_p (bfd *abfd)
}
bfd_preserve_finish (abfd, &preserve);
- return abfd->xvec;
+ return target;
got_wrong_format_error:
/* There is way too much undoing of half-known state here. The caller,
@@ -1235,6 +1279,12 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic)
case STT_TLS:
sym->symbol.flags |= BSF_THREAD_LOCAL;
break;
+ case STT_RELC:
+ sym->symbol.flags |= BSF_RELC;
+ break;
+ case STT_SRELC:
+ sym->symbol.flags |= BSF_SRELC;
+ break;
}
if (dynamic)
@@ -1462,7 +1512,7 @@ elf_slurp_reloc_table (bfd *abfd,
return TRUE;
}
-#ifdef DEBUG
+#if DEBUG & 2
static void
elf_debug_section (int num, Elf_Internal_Shdr *hdr)
{
@@ -1488,7 +1538,9 @@ elf_debug_section (int num, Elf_Internal_Shdr *hdr)
(long) hdr->sh_entsize);
fflush (stderr);
}
+#endif
+#if DEBUG & 1
static void
elf_debug_file (Elf_Internal_Ehdr *ehdrp)
{
@@ -1500,77 +1552,6 @@ elf_debug_file (Elf_Internal_Ehdr *ehdrp)
fprintf (stderr, "e_shnum = %ld\n", (long) ehdrp->e_shnum);
fprintf (stderr, "e_shentsize = %ld\n", (long) ehdrp->e_shentsize);
}
-
-static char *
-elf_symbol_flags (flagword flags)
-{
- static char buffer[1024];
-
- buffer[0] = '\0';
- if (flags & BSF_LOCAL)
- strcat (buffer, " local");
-
- if (flags & BSF_GLOBAL)
- strcat (buffer, " global");
-
- if (flags & BSF_DEBUGGING)
- strcat (buffer, " debug");
-
- if (flags & BSF_FUNCTION)
- strcat (buffer, " function");
-
- if (flags & BSF_KEEP)
- strcat (buffer, " keep");
-
- if (flags & BSF_KEEP_G)
- strcat (buffer, " keep_g");
-
- if (flags & BSF_WEAK)
- strcat (buffer, " weak");
-
- if (flags & BSF_SECTION_SYM)
- strcat (buffer, " section-sym");
-
- if (flags & BSF_OLD_COMMON)
- strcat (buffer, " old-common");
-
- if (flags & BSF_NOT_AT_END)
- strcat (buffer, " not-at-end");
-
- if (flags & BSF_CONSTRUCTOR)
- strcat (buffer, " constructor");
-
- if (flags & BSF_WARNING)
- strcat (buffer, " warning");
-
- if (flags & BSF_INDIRECT)
- strcat (buffer, " indirect");
-
- if (flags & BSF_FILE)
- strcat (buffer, " file");
-
- if (flags & DYNAMIC)
- strcat (buffer, " dynamic");
-
- if (flags & ~(BSF_LOCAL
- | BSF_GLOBAL
- | BSF_DEBUGGING
- | BSF_FUNCTION
- | BSF_KEEP
- | BSF_KEEP_G
- | BSF_WEAK
- | BSF_SECTION_SYM
- | BSF_OLD_COMMON
- | BSF_NOT_AT_END
- | BSF_CONSTRUCTOR
- | BSF_WARNING
- | BSF_INDIRECT
- | BSF_FILE
- | BSF_DYNAMIC))
- strcat (buffer, " unknown-bits");
-
- return buffer;
-}
#endif
/* Create a new BFD as if by bfd_openr. Rather than opening a file,
diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c
index 59d9c3f..9f0efa5 100644
--- a/contrib/binutils/bfd/elflink.c
+++ b/contrib/binutils/bfd/elflink.c
@@ -1,6 +1,6 @@
/* ELF linking support for BFD.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+ 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#define ARCH_SIZE 0
@@ -185,16 +185,6 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
return FALSE;
}
- if (! info->traditional_format)
- {
- s = bfd_make_section_with_flags (abfd, ".eh_frame_hdr",
- flags | SEC_READONLY);
- if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, 2))
- return FALSE;
- elf_hash_table (info)->eh_info.hdr_sec = s;
- }
-
/* Create sections to hold version informations. These are removed
if they are not needed. */
s = bfd_make_section_with_flags (abfd, ".gnu.version_d",
@@ -240,12 +230,30 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info)
if (!_bfd_elf_define_linkage_sym (abfd, info, s, "_DYNAMIC"))
return FALSE;
- s = bfd_make_section_with_flags (abfd, ".hash",
- flags | SEC_READONLY);
- if (s == NULL
- || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
- return FALSE;
- elf_section_data (s)->this_hdr.sh_entsize = bed->s->sizeof_hash_entry;
+ if (info->emit_hash)
+ {
+ s = bfd_make_section_with_flags (abfd, ".hash", flags | SEC_READONLY);
+ if (s == NULL
+ || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+ return FALSE;
+ elf_section_data (s)->this_hdr.sh_entsize = bed->s->sizeof_hash_entry;
+ }
+
+ if (info->emit_gnu_hash)
+ {
+ s = bfd_make_section_with_flags (abfd, ".gnu.hash",
+ flags | SEC_READONLY);
+ if (s == NULL
+ || ! bfd_set_section_alignment (abfd, s, bed->s->log_file_align))
+ return FALSE;
+ /* For 64-bit ELF, .gnu.hash is a non-uniform entity size section:
+ 4 32-bit words followed by variable count of 64-bit words, then
+ variable count of 32-bit words. */
+ if (bed->s->arch_size == 64)
+ elf_section_data (s)->this_hdr.sh_entsize = 0;
+ else
+ elf_section_data (s)->this_hdr.sh_entsize = 4;
+ }
/* Let the backend create the rest of the sections. This lets the
backend set the right flags. The backend will normally create
@@ -426,6 +434,29 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
return TRUE;
}
+/* Mark a symbol dynamic. */
+
+void
+bfd_elf_link_mark_dynamic_symbol (struct bfd_link_info *info,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ struct bfd_elf_dynamic_list *d = info->dynamic_list;
+
+ /* It may be called more than once on the same H. */
+ if(h->dynamic || info->relocatable)
+ return;
+
+ if ((info->dynamic_data
+ && (h->type == STT_OBJECT
+ || (sym != NULL
+ && ELF_ST_TYPE (sym->st_info) == STT_OBJECT)))
+ || (d != NULL
+ && h->root.type == bfd_link_hash_new
+ && (*d->match) (&d->head, NULL, h->root.root.string)))
+ h->dynamic = 1;
+}
+
/* Record an assignment to a symbol made by a linker script. We need
this in case some dynamic object refers to this symbol. */
@@ -459,7 +490,10 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
}
if (h->root.type == bfd_link_hash_new)
- h->non_elf = 0;
+ {
+ bfd_elf_link_mark_dynamic_symbol (info, h, NULL);
+ h->non_elf = 0;
+ }
/* If this symbol is being provided by the linker script, and it is
currently defined by a dynamic object, but not by a regular
@@ -676,6 +710,8 @@ _bfd_elf_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
struct bfd_link_info *info,
asection *p)
{
+ struct elf_link_hash_table *htab;
+
switch (elf_section_data (p)->this_hdr.sh_type)
{
case SHT_PROGBITS:
@@ -683,15 +719,21 @@ _bfd_elf_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED,
/* If sh_type is yet undecided, assume it could be
SHT_PROGBITS/SHT_NOBITS. */
case SHT_NULL:
+ htab = elf_hash_table (info);
+ if (p == htab->tls_sec)
+ return FALSE;
+
+ if (htab->text_index_section != NULL)
+ return p != htab->text_index_section && p != htab->data_index_section;
+
if (strcmp (p->name, ".got") == 0
|| strcmp (p->name, ".got.plt") == 0
|| strcmp (p->name, ".plt") == 0)
{
asection *ip;
- bfd *dynobj = elf_hash_table (info)->dynobj;
- if (dynobj != NULL
- && (ip = bfd_get_section_by_name (dynobj, p->name)) != NULL
+ if (htab->dynobj != NULL
+ && (ip = bfd_get_section_by_name (htab->dynobj, p->name)) != NULL
&& (ip->flags & SEC_LINKER_CREATED)
&& ip->output_section == p)
return TRUE;
@@ -727,6 +769,8 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd,
&& (p->flags & SEC_ALLOC) != 0
&& !(*bed->elf_backend_omit_section_dynsym) (output_bfd, info, p))
elf_section_data (p)->dynindx = ++dynsymcount;
+ else
+ elf_section_data (p)->dynindx = 0;
}
*section_sym_count = dynsymcount;
@@ -796,6 +840,15 @@ _bfd_elf_merge_symbol (bfd *abfd,
sec = *psec;
bind = ELF_ST_BIND (sym->st_info);
+ /* Silently discard TLS symbols from --just-syms. There's no way to
+ combine a static TLS block with a new TLS block for this executable. */
+ if (ELF_ST_TYPE (sym->st_info) == STT_TLS
+ && sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+ {
+ *skip = TRUE;
+ return TRUE;
+ }
+
if (! bfd_is_und_section (sec))
h = elf_link_hash_lookup (elf_hash_table (info), name, TRUE, FALSE, FALSE);
else
@@ -816,6 +869,11 @@ _bfd_elf_merge_symbol (bfd *abfd,
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ /* We have to check it for every instance since the first few may be
+ refereences and not all compilers emit symbol type for undefined
+ symbols. */
+ bfd_elf_link_mark_dynamic_symbol (info, h, sym);
+
/* If we just created the symbol, mark it as being an ELF symbol.
Other than that, there is nothing to do--there is no merge issue
with a newly defined symbol--so we just return. */
@@ -889,6 +947,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
&& h->root.type != bfd_link_hash_undefweak
&& h->root.type != bfd_link_hash_common);
+ bed = get_elf_backend_data (abfd);
/* When we try to create a default indirect symbol from the dynamic
definition with the default version, we skip it if its type and
the type of existing regular definition mismatch. We only do it
@@ -903,7 +962,9 @@ _bfd_elf_merge_symbol (bfd *abfd,
&& (olddef || h->root.type == bfd_link_hash_common)
&& ELF_ST_TYPE (sym->st_info) != h->type
&& ELF_ST_TYPE (sym->st_info) != STT_NOTYPE
- && h->type != STT_NOTYPE)
+ && h->type != STT_NOTYPE
+ && !(bed->is_function_type (ELF_ST_TYPE (sym->st_info))
+ && bed->is_function_type (h->type)))
{
*skip = TRUE;
return TRUE;
@@ -1007,7 +1068,41 @@ _bfd_elf_merge_symbol (bfd *abfd,
relocatable file and the old definition comes from a dynamic
object, we remove the old definition. */
if ((*sym_hash)->root.type == bfd_link_hash_indirect)
- h = *sym_hash;
+ {
+ /* Handle the case where the old dynamic definition is
+ default versioned. We need to copy the symbol info from
+ the symbol with default version to the normal one if it
+ was referenced before. */
+ if (h->ref_regular)
+ {
+ const struct elf_backend_data *bed
+ = get_elf_backend_data (abfd);
+ struct elf_link_hash_entry *vh = *sym_hash;
+ vh->root.type = h->root.type;
+ h->root.type = bfd_link_hash_indirect;
+ (*bed->elf_backend_copy_indirect_symbol) (info, vh, h);
+ /* Protected symbols will override the dynamic definition
+ with default version. */
+ if (ELF_ST_VISIBILITY (sym->st_other) == STV_PROTECTED)
+ {
+ h->root.u.i.link = (struct bfd_link_hash_entry *) vh;
+ vh->dynamic_def = 1;
+ vh->ref_dynamic = 1;
+ }
+ else
+ {
+ h->root.type = vh->root.type;
+ vh->ref_dynamic = 0;
+ /* We have to hide it here since it was made dynamic
+ global with extra bits when the symbol info was
+ copied from the old dynamic definition. */
+ (*bed->elf_backend_hide_symbol) (info, vh, TRUE);
+ }
+ h = vh;
+ }
+ else
+ h = *sym_hash;
+ }
if ((h->root.u.undef.next || info->hash->undefs_tail == &h->root)
&& bfd_is_und_section (sec))
@@ -1060,6 +1155,11 @@ _bfd_elf_merge_symbol (bfd *abfd,
if (olddef && newdyn)
oldweak = FALSE;
+ /* Allow changes between different types of funciton symbol. */
+ if (bed->is_function_type (ELF_ST_TYPE (sym->st_info))
+ && bed->is_function_type (h->type))
+ *type_change_ok = TRUE;
+
/* It's OK to change the type if either the existing symbol or the
new symbol is weak. A type change is also OK if the old symbol
is undefined and the new symbol is defined. */
@@ -1106,7 +1206,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
&& (sec->flags & SEC_ALLOC) != 0
&& (sec->flags & SEC_LOAD) == 0
&& sym->st_size > 0
- && ELF_ST_TYPE (sym->st_info) != STT_FUNC)
+ && !bed->is_function_type (ELF_ST_TYPE (sym->st_info)))
newdyncommon = TRUE;
else
newdyncommon = FALSE;
@@ -1118,14 +1218,13 @@ _bfd_elf_merge_symbol (bfd *abfd,
&& (h->root.u.def.section->flags & SEC_ALLOC) != 0
&& (h->root.u.def.section->flags & SEC_LOAD) == 0
&& h->size > 0
- && h->type != STT_FUNC)
+ && !bed->is_function_type (h->type))
olddyncommon = TRUE;
else
olddyncommon = FALSE;
/* We now know everything about the old and new symbols. We ask the
backend to check if we can merge them. */
- bed = get_elf_backend_data (abfd);
if (bed->merge_symbol
&& !bed->merge_symbol (info, sym_hash, h, sym, psec, pvalue,
pold_alignment, skip, override,
@@ -1180,7 +1279,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
&& (olddef
|| (h->root.type == bfd_link_hash_common
&& (newweak
- || ELF_ST_TYPE (sym->st_info) == STT_FUNC))))
+ || bed->is_function_type (ELF_ST_TYPE (sym->st_info))))))
{
*override = TRUE;
newdef = FALSE;
@@ -1235,7 +1334,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
&& (newdef
|| (bfd_is_com_section (sec)
&& (oldweak
- || h->type == STT_FUNC)))
+ || bed->is_function_type (h->type))))
&& olddyn
&& olddef
&& h->def_dynamic)
@@ -1464,6 +1563,10 @@ _bfd_elf_add_default_symbol (bfd *abfd,
hi = h;
}
+ /* Check if HI is a warning symbol. */
+ if (hi->root.type == bfd_link_hash_warning)
+ hi = (struct elf_link_hash_entry *) hi->root.u.i.link;
+
/* If there is a duplicate definition somewhere, then HI may not
point to an indirect symbol. We will have reported an error to
the user in that case. */
@@ -1574,6 +1677,10 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data)
{
struct elf_info_failed *eif = data;
+ /* Ignore this if we won't export it. */
+ if (!eif->info->export_dynamic && !h->dynamic)
+ return TRUE;
+
/* Ignore indirect symbols. These are added by the versioning code. */
if (h->root.type == bfd_link_hash_indirect)
return TRUE;
@@ -1840,7 +1947,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
/* We could not find the version for a symbol when
generating a shared archive. Return an error. */
(*_bfd_error_handler)
- (_("%B: undefined versioned symbol name %s"),
+ (_("%B: version node not found for symbol %s"),
sinfo->output_bfd, h->root.root.string);
bfd_set_error (bfd_error_bad_value);
sinfo->failed = TRUE;
@@ -2327,7 +2434,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h,
if (h->needs_plt
&& eif->info->shared
&& is_elf_hash_table (eif->info->hash)
- && (eif->info->symbolic
+ && (SYMBOLIC_BIND (eif->info, h)
|| ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
&& h->def_regular)
{
@@ -2502,6 +2609,52 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data)
return TRUE;
}
+/* Adjust the dynamic symbol, H, for copy in the dynamic bss section,
+ DYNBSS. */
+
+bfd_boolean
+_bfd_elf_adjust_dynamic_copy (struct elf_link_hash_entry *h,
+ asection *dynbss)
+{
+ unsigned int power_of_two;
+ bfd_vma mask;
+ asection *sec = h->root.u.def.section;
+
+ /* The section aligment of definition is the maximum alignment
+ requirement of symbols defined in the section. Since we don't
+ know the symbol alignment requirement, we start with the
+ maximum alignment and check low bits of the symbol address
+ for the minimum alignment. */
+ power_of_two = bfd_get_section_alignment (sec->owner, sec);
+ mask = ((bfd_vma) 1 << power_of_two) - 1;
+ while ((h->root.u.def.value & mask) != 0)
+ {
+ mask >>= 1;
+ --power_of_two;
+ }
+
+ if (power_of_two > bfd_get_section_alignment (dynbss->owner,
+ dynbss))
+ {
+ /* Adjust the section alignment if needed. */
+ if (! bfd_set_section_alignment (dynbss->owner, dynbss,
+ power_of_two))
+ return FALSE;
+ }
+
+ /* We make sure that the symbol will be aligned properly. */
+ dynbss->size = BFD_ALIGN (dynbss->size, mask + 1);
+
+ /* Define the symbol as being at this point in DYNBSS. */
+ h->root.u.def.section = dynbss;
+ h->root.u.def.value = dynbss->size;
+
+ /* Increment the size of DYNBSS to make room for the symbol. */
+ dynbss->size += h->size;
+
+ return TRUE;
+}
+
/* Adjust all external symbols pointing into SEC_MERGE sections
to reflect the object merging within the sections. */
@@ -2540,6 +2693,8 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
bfd_boolean ignore_protected)
{
bfd_boolean binding_stays_local_p;
+ const struct elf_backend_data *bed;
+ struct elf_link_hash_table *hash_table;
if (h == NULL)
return FALSE;
@@ -2556,7 +2711,7 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
/* Identify the cases where name binding rules say that a
visible symbol resolves locally. */
- binding_stays_local_p = info->executable || info->symbolic;
+ binding_stays_local_p = info->executable || SYMBOLIC_BIND (info, h);
switch (ELF_ST_VISIBILITY (h->other))
{
@@ -2565,10 +2720,16 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h,
return FALSE;
case STV_PROTECTED:
+ hash_table = elf_hash_table (info);
+ if (!is_elf_hash_table (hash_table))
+ return FALSE;
+
+ bed = get_elf_backend_data (hash_table->dynobj);
+
/* Proper resolution for function pointer equality may require
that these symbols perhaps be resolved dynamically, even though
we should be resolving them to the current module. */
- if (!ignore_protected || h->type != STT_FUNC)
+ if (!ignore_protected || !bed->is_function_type (h->type))
binding_stays_local_p = TRUE;
break;
@@ -2595,6 +2756,9 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
struct bfd_link_info *info,
bfd_boolean local_protected)
{
+ const struct elf_backend_data *bed;
+ struct elf_link_hash_table *hash_table;
+
/* If it's a local sym, of course we resolve locally. */
if (h == NULL)
return TRUE;
@@ -2619,7 +2783,7 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
/* At this point, we know the symbol is defined and dynamic. In an
executable it must resolve locally, likewise when building symbolic
shared libraries. */
- if (info->executable || info->symbolic)
+ if (info->executable || SYMBOLIC_BIND (info, h))
return TRUE;
/* Now deal with defined dynamic symbols in shared libraries. Ones
@@ -2631,8 +2795,14 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
if (ELF_ST_VISIBILITY (h->other) != STV_PROTECTED)
return TRUE;
+ hash_table = elf_hash_table (info);
+ if (!is_elf_hash_table (hash_table))
+ return TRUE;
+
+ bed = get_elf_backend_data (hash_table->dynobj);
+
/* STV_PROTECTED non-function symbols are local. */
- if (h->type != STT_FUNC)
+ if (!bed->is_function_type (h->type))
return TRUE;
/* Function pointer equality tests may require that STV_PROTECTED
@@ -2681,8 +2851,9 @@ is_global_data_symbol_definition (bfd *abfd ATTRIBUTE_UNUSED,
&& ELF_ST_BIND (sym->st_info) < STB_LOOS)
return FALSE;
+ bed = get_elf_backend_data (abfd);
/* Function symbols do not count. */
- if (ELF_ST_TYPE (sym->st_info) == STT_FUNC)
+ if (bed->is_function_type (ELF_ST_TYPE (sym->st_info)))
return FALSE;
/* If the section is undefined, then so is the symbol. */
@@ -2691,7 +2862,6 @@ is_global_data_symbol_definition (bfd *abfd ATTRIBUTE_UNUSED,
/* If the symbol is defined in the common section, then
it is a common definition and so does not count. */
- bed = get_elf_backend_data (abfd);
if (bed->common_definition (sym))
return FALSE;
@@ -3080,6 +3250,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
struct elf_link_hash_table *htab;
bfd_size_type amt;
void *alloc_mark = NULL;
+ struct bfd_hash_entry **old_table = NULL;
+ unsigned int old_size = 0;
+ unsigned int old_count = 0;
void *old_tab = NULL;
void *old_hash;
void *old_ent;
@@ -3126,7 +3299,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
const char *name;
name = bfd_get_section_name (abfd, s);
- if (strncmp (name, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0)
+ if (CONST_STRNEQ (name, ".gnu.warning."))
{
char *msg;
bfd_size_type sz;
@@ -3511,6 +3684,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
memcpy (old_hash, sym_hash, hashsize);
old_undefs = htab->root.undefs;
old_undefs_tail = htab->root.undefs_tail;
+ old_table = htab->root.table.table;
+ old_size = htab->root.table.size;
+ old_count = htab->root.table.count;
old_dynsymcount = htab->dynsymcount;
for (i = 0; i < htab->root.table.size; i++)
@@ -3592,12 +3768,10 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
sec = bfd_abs_section_ptr;
else if (sec->kept_section)
{
- /* Symbols from discarded section are undefined, and have
- default visibility. */
+ /* Symbols from discarded section are undefined. We keep
+ its visibility. */
sec = bfd_und_section_ptr;
isym->st_shndx = SHN_UNDEF;
- isym->st_other = (STV_DEFAULT
- | (isym->st_other & ~ ELF_ST_VISIBILITY (-1)));
}
else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0)
value -= sec->vma;
@@ -3622,7 +3796,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
goto error_free_vers;
if (isym->st_shndx == SHN_COMMON
- && ELF_ST_TYPE (isym->st_info) == STT_TLS)
+ && ELF_ST_TYPE (isym->st_info) == STT_TLS
+ && !info->relocatable)
{
asection *tcomm = bfd_get_section_by_name (abfd, ".tcommon");
@@ -3694,8 +3869,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if it is not a function, because it might be the version
symbol itself. FIXME: What if it isn't? */
if ((iver.vs_vers & VERSYM_HIDDEN) != 0
- || (vernum > 1 && (! bfd_is_abs_section (sec)
- || ELF_ST_TYPE (isym->st_info) == STT_FUNC)))
+ || (vernum > 1
+ && (!bfd_is_abs_section (sec)
+ || bed->is_function_type (ELF_ST_TYPE (isym->st_info)))))
{
const char *verstr;
size_t namelen, verlen, newlen;
@@ -3842,7 +4018,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
if (dynamic
&& definition
&& (flags & BSF_WEAK) != 0
- && ELF_ST_TYPE (isym->st_info) != STT_FUNC
+ && !bed->is_function_type (ELF_ST_TYPE (isym->st_info))
&& is_elf_hash_table (htab)
&& h->u.weakdef == NULL)
{
@@ -3929,18 +4105,30 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
}
if (normal_align < common_align)
- (*_bfd_error_handler)
- (_("Warning: alignment %u of symbol `%s' in %B"
- " is smaller than %u in %B"),
- normal_bfd, common_bfd,
- 1 << normal_align, name, 1 << common_align);
+ {
+ /* PR binutils/2735 */
+ if (normal_bfd == NULL)
+ (*_bfd_error_handler)
+ (_("Warning: alignment %u of common symbol `%s' in %B"
+ " is greater than the alignment (%u) of its section %A"),
+ common_bfd, h->root.u.def.section,
+ 1 << common_align, name, 1 << normal_align);
+ else
+ (*_bfd_error_handler)
+ (_("Warning: alignment %u of symbol `%s' in %B"
+ " is smaller than %u in %B"),
+ normal_bfd, common_bfd,
+ 1 << normal_align, name, 1 << common_align);
+ }
}
- /* Remember the symbol size and type. */
- if (isym->st_size != 0
+ /* Remember the symbol size if it isn't undefined. */
+ if ((isym->st_size != 0 && isym->st_shndx != SHN_UNDEF)
&& (definition || h->size == 0))
{
- if (h->size != 0 && h->size != isym->st_size && ! size_change_ok)
+ if (h->size != 0
+ && h->size != isym->st_size
+ && ! size_change_ok)
(*_bfd_error_handler)
(_("Warning: size of symbol `%s' changed"
" from %lu in %B to %lu in %B"),
@@ -3955,7 +4143,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
to be the size of the common symbol. The code just above
won't fix the size if a common symbol becomes larger. We
don't warn about a size change here, because that is
- covered by --warn-common. */
+ covered by --warn-common. Allow changed between different
+ function types. */
if (h->root.type == bfd_link_hash_common)
h->size = h->root.u.c.size;
@@ -3989,13 +4178,13 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
isym->st_other = (STV_HIDDEN
| (isym->st_other & ~ELF_ST_VISIBILITY (-1)));
- if (isym->st_other != 0 && !dynamic)
+ if (ELF_ST_VISIBILITY (isym->st_other) != 0 && !dynamic)
{
unsigned char hvis, symvis, other, nvis;
- /* Take the balance of OTHER from the definition. */
- other = (definition ? isym->st_other : h->other);
- other &= ~ ELF_ST_VISIBILITY (-1);
+ /* Only merge the visibility. Leave the remainder of the
+ st_other field to elf_backend_merge_symbol_attribute. */
+ other = h->other & ~ELF_ST_VISIBILITY (-1);
/* Combine visibilities, using the most constraining one. */
hvis = ELF_ST_VISIBILITY (h->other);
@@ -4045,6 +4234,13 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
dynsym = TRUE;
}
+ if (definition && (sec->flags & SEC_DEBUGGING))
+ {
+ /* We don't want to make debug symbol dynamic. */
+ (*bed->elf_backend_hide_symbol) (info, h, TRUE);
+ dynsym = FALSE;
+ }
+
/* Check to see if we need to add an indirect symbol for
the default name. */
if (definition || h->root.type == bfd_link_hash_common)
@@ -4145,9 +4341,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
unsigned int i;
/* Restore the symbol table. */
+ if (bed->as_needed_cleanup)
+ (*bed->as_needed_cleanup) (abfd, info);
old_hash = (char *) old_tab + tabsize;
old_ent = (char *) old_hash + hashsize;
sym_hash = elf_sym_hashes (abfd);
+ htab->root.table.table = old_table;
+ htab->root.table.size = old_size;
+ htab->root.table.count = old_count;
memcpy (htab->root.table.table, old_tab, tabsize);
memcpy (sym_hash, old_hash, hashsize);
htab->root.undefs = old_undefs;
@@ -4285,7 +4486,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
h = *hpp;
if (h != NULL
&& h->root.type == bfd_link_hash_defined
- && h->type != STT_FUNC)
+ && !bed->is_function_type (h->type))
{
*sym_hash = h;
sym_hash++;
@@ -4457,7 +4658,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
asection *stab;
for (stab = abfd->sections; stab; stab = stab->next)
- if (strncmp (".stab", stab->name, 5) == 0
+ if (CONST_STRNEQ (stab->name, ".stab")
&& (!stab->name[5] ||
(stab->name[5] == '.' && ISDIGIT (stab->name[6])))
&& (stab->flags & SEC_MERGE) == 0
@@ -4807,6 +5008,131 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data)
return TRUE;
}
+struct collect_gnu_hash_codes
+{
+ bfd *output_bfd;
+ const struct elf_backend_data *bed;
+ unsigned long int nsyms;
+ unsigned long int maskbits;
+ unsigned long int *hashcodes;
+ unsigned long int *hashval;
+ unsigned long int *indx;
+ unsigned long int *counts;
+ bfd_vma *bitmask;
+ bfd_byte *contents;
+ long int min_dynindx;
+ unsigned long int bucketcount;
+ unsigned long int symindx;
+ long int local_indx;
+ long int shift1, shift2;
+ unsigned long int mask;
+};
+
+/* This function will be called though elf_link_hash_traverse to store
+ all hash value of the exported symbols in an array. */
+
+static bfd_boolean
+elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data)
+{
+ struct collect_gnu_hash_codes *s = data;
+ const char *name;
+ char *p;
+ unsigned long ha;
+ char *alc = NULL;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ /* Ignore indirect symbols. These are added by the versioning code. */
+ if (h->dynindx == -1)
+ return TRUE;
+
+ /* Ignore also local symbols and undefined symbols. */
+ if (! (*s->bed->elf_hash_symbol) (h))
+ return TRUE;
+
+ name = h->root.root.string;
+ p = strchr (name, ELF_VER_CHR);
+ if (p != NULL)
+ {
+ alc = bfd_malloc (p - name + 1);
+ memcpy (alc, name, p - name);
+ alc[p - name] = '\0';
+ name = alc;
+ }
+
+ /* Compute the hash value. */
+ ha = bfd_elf_gnu_hash (name);
+
+ /* Store the found hash value in the array for compute_bucket_count,
+ and also for .dynsym reordering purposes. */
+ s->hashcodes[s->nsyms] = ha;
+ s->hashval[h->dynindx] = ha;
+ ++s->nsyms;
+ if (s->min_dynindx < 0 || s->min_dynindx > h->dynindx)
+ s->min_dynindx = h->dynindx;
+
+ if (alc != NULL)
+ free (alc);
+
+ return TRUE;
+}
+
+/* This function will be called though elf_link_hash_traverse to do
+ final dynaminc symbol renumbering. */
+
+static bfd_boolean
+elf_renumber_gnu_hash_syms (struct elf_link_hash_entry *h, void *data)
+{
+ struct collect_gnu_hash_codes *s = data;
+ unsigned long int bucket;
+ unsigned long int val;
+
+ if (h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ /* Ignore indirect symbols. */
+ if (h->dynindx == -1)
+ return TRUE;
+
+ /* Ignore also local symbols and undefined symbols. */
+ if (! (*s->bed->elf_hash_symbol) (h))
+ {
+ if (h->dynindx >= s->min_dynindx)
+ h->dynindx = s->local_indx++;
+ return TRUE;
+ }
+
+ bucket = s->hashval[h->dynindx] % s->bucketcount;
+ val = (s->hashval[h->dynindx] >> s->shift1)
+ & ((s->maskbits >> s->shift1) - 1);
+ s->bitmask[val] |= ((bfd_vma) 1) << (s->hashval[h->dynindx] & s->mask);
+ s->bitmask[val]
+ |= ((bfd_vma) 1) << ((s->hashval[h->dynindx] >> s->shift2) & s->mask);
+ val = s->hashval[h->dynindx] & ~(unsigned long int) 1;
+ if (s->counts[bucket] == 1)
+ /* Last element terminates the chain. */
+ val |= 1;
+ bfd_put_32 (s->output_bfd, val,
+ s->contents + (s->indx[bucket] - s->symindx) * 4);
+ --s->counts[bucket];
+ h->dynindx = s->indx[bucket]++;
+ return TRUE;
+}
+
+/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
+
+bfd_boolean
+_bfd_elf_hash_symbol (struct elf_link_hash_entry *h)
+{
+ return !(h->forced_local
+ || h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak
+ || ((h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->root.u.def.section->output_section == NULL));
+}
+
/* Array used to determine the number of hash table buckets to use
based on the number of symbols there are. If there are fewer than
3 symbols we use 1 bucket, fewer than 17 symbols we use 3 buckets,
@@ -4828,42 +5154,26 @@ static const size_t elf_buckets[] =
Therefore the result is always a good payoff between few collisions
(= short chain lengths) and table size. */
static size_t
-compute_bucket_count (struct bfd_link_info *info)
+compute_bucket_count (struct bfd_link_info *info, unsigned long int *hashcodes,
+ unsigned long int nsyms, int gnu_hash)
{
size_t dynsymcount = elf_hash_table (info)->dynsymcount;
size_t best_size = 0;
- unsigned long int *hashcodes;
- unsigned long int *hashcodesp;
unsigned long int i;
bfd_size_type amt;
- /* Compute the hash values for all exported symbols. At the same
- time store the values in an array so that we could use them for
- optimizations. */
- amt = dynsymcount;
- amt *= sizeof (unsigned long int);
- hashcodes = bfd_malloc (amt);
- if (hashcodes == NULL)
- return 0;
- hashcodesp = hashcodes;
-
- /* Put all hash values in HASHCODES. */
- elf_link_hash_traverse (elf_hash_table (info),
- elf_collect_hash_codes, &hashcodesp);
-
/* We have a problem here. The following code to optimize the table
size requires an integer type with more the 32 bits. If
BFD_HOST_U_64_BIT is set we know about such a type. */
#ifdef BFD_HOST_U_64_BIT
if (info->optimize)
{
- unsigned long int nsyms = hashcodesp - hashcodes;
size_t minsize;
size_t maxsize;
BFD_HOST_U_64_BIT best_chlen = ~((BFD_HOST_U_64_BIT) 0);
- unsigned long int *counts ;
bfd *dynobj = elf_hash_table (info)->dynobj;
const struct elf_backend_data *bed = get_elf_backend_data (dynobj);
+ unsigned long int *counts;
/* Possible optimization parameters: if we have NSYMS symbols we say
that the hashing table must at least have NSYMS/4 and at most
@@ -4872,6 +5182,13 @@ compute_bucket_count (struct bfd_link_info *info)
if (minsize == 0)
minsize = 1;
best_size = maxsize = nsyms * 2;
+ if (gnu_hash)
+ {
+ if (minsize < 2)
+ minsize = 2;
+ if ((best_size & 31) == 0)
+ ++best_size;
+ }
/* Create array where we count the collisions in. We must use bfd_malloc
since the size could be large. */
@@ -4879,10 +5196,7 @@ compute_bucket_count (struct bfd_link_info *info)
amt *= sizeof (unsigned long int);
counts = bfd_malloc (amt);
if (counts == NULL)
- {
- free (hashcodes);
- return 0;
- }
+ return 0;
/* Compute the "optimal" size for the hash table. The criteria is a
minimal chain length. The minor criteria is (of course) the size
@@ -4894,6 +5208,9 @@ compute_bucket_count (struct bfd_link_info *info)
unsigned long int j;
unsigned long int fact;
+ if (gnu_hash && (i & 31) == 0)
+ continue;
+
memset (counts, '\0', i * sizeof (unsigned long int));
/* Determine how often each hash bucket is used. */
@@ -4909,9 +5226,9 @@ compute_bucket_count (struct bfd_link_info *info)
# define BFD_TARGET_PAGESIZE (4096)
# endif
- /* We in any case need 2 + NSYMS entries for the size values and
- the chains. */
- max = (2 + nsyms) * (bed->s->arch_size / 8);
+ /* We in any case need 2 + DYNSYMCOUNT entries for the size values
+ and the chains. */
+ max = (2 + dynsymcount) * bed->s->sizeof_hash_entry;
# if 1
/* Variant 1: optimize for short chains. We add the squares
@@ -4921,7 +5238,7 @@ compute_bucket_count (struct bfd_link_info *info)
max += counts[j] * counts[j];
/* This adds penalties for the overall size of the table. */
- fact = i / (BFD_TARGET_PAGESIZE / (bed->s->arch_size / 8)) + 1;
+ fact = i / (BFD_TARGET_PAGESIZE / bed->s->sizeof_hash_entry) + 1;
max *= fact * fact;
# else
/* Variant 2: Optimize a lot more for small table. Here we
@@ -4932,7 +5249,7 @@ compute_bucket_count (struct bfd_link_info *info)
/* The overall size of the table is considered, but not as
strong as in variant 1, where it is squared. */
- fact = i / (BFD_TARGET_PAGESIZE / (bed->s->arch_size / 8)) + 1;
+ fact = i / (BFD_TARGET_PAGESIZE / bed->s->sizeof_hash_entry) + 1;
max *= fact;
# endif
@@ -4955,14 +5272,13 @@ compute_bucket_count (struct bfd_link_info *info)
for (i = 0; elf_buckets[i] != 0; i++)
{
best_size = elf_buckets[i];
- if (dynsymcount < elf_buckets[i + 1])
+ if (nsyms < elf_buckets[i + 1])
break;
}
+ if (gnu_hash && best_size < 2)
+ best_size = 2;
}
- /* Free the arrays we needed. */
- free (hashcodes);
-
return best_size;
}
@@ -4993,6 +5309,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
if (!is_elf_hash_table (info->hash))
return TRUE;
+ bed = get_elf_backend_data (output_bfd);
elf_tdata (output_bfd)->relro = info->relro;
if (info->execstack)
elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X;
@@ -5019,7 +5336,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
exec = PF_X;
notesec = s;
}
- else
+ else if (bed->default_execstack)
exec = PF_X;
}
if (notesec)
@@ -5040,11 +5357,13 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
/* The backend may have to create some sections regardless of whether
we're dynamic or not. */
- bed = get_elf_backend_data (output_bfd);
if (bed->elf_backend_always_size_sections
&& ! (*bed->elf_backend_always_size_sections) (output_bfd, info))
return FALSE;
+ if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
+ return FALSE;
+
dynobj = elf_hash_table (info)->dynobj;
/* If there were no dynamic objects in the link, there is nothing to
@@ -5052,9 +5371,6 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
if (dynobj == NULL)
return TRUE;
- if (! _bfd_elf_maybe_strip_eh_frame_hdr (info))
- return FALSE;
-
if (elf_hash_table (info)->dynamic_sections_created)
{
struct elf_info_failed eif;
@@ -5135,7 +5451,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
/* If we are supposed to export all symbols into the dynamic symbol
table (this is not the normal case), then do so. */
- if (info->export_dynamic)
+ if (info->export_dynamic
+ || (info->executable && info->dynamic))
{
elf_link_hash_traverse (elf_hash_table (info),
_bfd_elf_export_symbol,
@@ -5277,15 +5594,16 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
for (sub = info->input_bfds; sub != NULL;
sub = sub->link_next)
- for (o = sub->sections; o != NULL; o = o->next)
- if (elf_section_data (o)->this_hdr.sh_type
- == SHT_PREINIT_ARRAY)
- {
- (*_bfd_error_handler)
- (_("%B: .preinit_array section is not allowed in DSO"),
- sub);
- break;
- }
+ if (bfd_get_flavour (sub) == bfd_target_elf_flavour)
+ for (o = sub->sections; o != NULL; o = o->next)
+ if (elf_section_data (o)->this_hdr.sh_type
+ == SHT_PREINIT_ARRAY)
+ {
+ (*_bfd_error_handler)
+ (_("%B: .preinit_array section is not allowed in DSO"),
+ sub);
+ break;
+ }
bfd_set_error (bfd_error_nonrepresentable_section);
return FALSE;
@@ -5320,7 +5638,10 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
bfd_size_type strsize;
strsize = _bfd_elf_strtab_size (elf_hash_table (info)->dynstr);
- if (!_bfd_elf_add_dynamic_entry (info, DT_HASH, 0)
+ if ((info->emit_hash
+ && !_bfd_elf_add_dynamic_entry (info, DT_HASH, 0))
+ || (info->emit_gnu_hash
+ && !_bfd_elf_add_dynamic_entry (info, DT_GNU_HASH, 0))
|| !_bfd_elf_add_dynamic_entry (info, DT_STRTAB, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_SYMTAB, 0)
|| !_bfd_elf_add_dynamic_entry (info, DT_STRSZ, strsize)
@@ -5709,21 +6030,68 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd,
return TRUE;
}
+/* Find the first non-excluded output section. We'll use its
+ section symbol for some emitted relocs. */
+void
+_bfd_elf_init_1_index_section (bfd *output_bfd, struct bfd_link_info *info)
+{
+ asection *s;
+
+ for (s = output_bfd->sections; s != NULL; s = s->next)
+ if ((s->flags & (SEC_EXCLUDE | SEC_ALLOC)) == SEC_ALLOC
+ && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
+ {
+ elf_hash_table (info)->text_index_section = s;
+ break;
+ }
+}
+
+/* Find two non-excluded output sections, one for code, one for data.
+ We'll use their section symbols for some emitted relocs. */
+void
+_bfd_elf_init_2_index_sections (bfd *output_bfd, struct bfd_link_info *info)
+{
+ asection *s;
+
+ for (s = output_bfd->sections; s != NULL; s = s->next)
+ if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY))
+ == (SEC_ALLOC | SEC_READONLY))
+ && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
+ {
+ elf_hash_table (info)->text_index_section = s;
+ break;
+ }
+
+ for (s = output_bfd->sections; s != NULL; s = s->next)
+ if (((s->flags & (SEC_EXCLUDE | SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC)
+ && !_bfd_elf_link_omit_section_dynsym (output_bfd, info, s))
+ {
+ elf_hash_table (info)->data_index_section = s;
+ break;
+ }
+
+ if (elf_hash_table (info)->text_index_section == NULL)
+ elf_hash_table (info)->text_index_section
+ = elf_hash_table (info)->data_index_section;
+}
+
bfd_boolean
bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
{
+ const struct elf_backend_data *bed;
+
if (!is_elf_hash_table (info->hash))
return TRUE;
+ bed = get_elf_backend_data (output_bfd);
+ (*bed->elf_backend_init_index_section) (output_bfd, info);
+
if (elf_hash_table (info)->dynamic_sections_created)
{
bfd *dynobj;
- const struct elf_backend_data *bed;
asection *s;
bfd_size_type dynsymcount;
unsigned long section_sym_count;
- size_t bucketcount = 0;
- size_t hash_entry_size;
unsigned int dtagcount;
dynobj = elf_hash_table (info)->dynobj;
@@ -5759,7 +6127,6 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
section as we went along in elf_link_add_object_symbols. */
s = bfd_get_section_by_name (dynobj, ".dynsym");
BFD_ASSERT (s != NULL);
- bed = get_elf_backend_data (output_bfd);
s->size = dynsymcount * bed->s->sizeof_sym;
if (dynsymcount != 0)
@@ -5774,23 +6141,215 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
memset (s->contents, 0, section_sym_count * bed->s->sizeof_sym);
}
+ elf_hash_table (info)->bucketcount = 0;
+
/* Compute the size of the hashing table. As a side effect this
computes the hash values for all the names we export. */
- bucketcount = compute_bucket_count (info);
+ if (info->emit_hash)
+ {
+ unsigned long int *hashcodes;
+ unsigned long int *hashcodesp;
+ bfd_size_type amt;
+ unsigned long int nsyms;
+ size_t bucketcount;
+ size_t hash_entry_size;
+
+ /* Compute the hash values for all exported symbols. At the same
+ time store the values in an array so that we could use them for
+ optimizations. */
+ amt = dynsymcount * sizeof (unsigned long int);
+ hashcodes = bfd_malloc (amt);
+ if (hashcodes == NULL)
+ return FALSE;
+ hashcodesp = hashcodes;
- s = bfd_get_section_by_name (dynobj, ".hash");
- BFD_ASSERT (s != NULL);
- hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize;
- s->size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
- s->contents = bfd_zalloc (output_bfd, s->size);
- if (s->contents == NULL)
- return FALSE;
+ /* Put all hash values in HASHCODES. */
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_collect_hash_codes, &hashcodesp);
- bfd_put (8 * hash_entry_size, output_bfd, bucketcount, s->contents);
- bfd_put (8 * hash_entry_size, output_bfd, dynsymcount,
- s->contents + hash_entry_size);
+ nsyms = hashcodesp - hashcodes;
+ bucketcount
+ = compute_bucket_count (info, hashcodes, nsyms, 0);
+ free (hashcodes);
- elf_hash_table (info)->bucketcount = bucketcount;
+ if (bucketcount == 0)
+ return FALSE;
+
+ elf_hash_table (info)->bucketcount = bucketcount;
+
+ s = bfd_get_section_by_name (dynobj, ".hash");
+ BFD_ASSERT (s != NULL);
+ hash_entry_size = elf_section_data (s)->this_hdr.sh_entsize;
+ s->size = ((2 + bucketcount + dynsymcount) * hash_entry_size);
+ s->contents = bfd_zalloc (output_bfd, s->size);
+ if (s->contents == NULL)
+ return FALSE;
+
+ bfd_put (8 * hash_entry_size, output_bfd, bucketcount, s->contents);
+ bfd_put (8 * hash_entry_size, output_bfd, dynsymcount,
+ s->contents + hash_entry_size);
+ }
+
+ if (info->emit_gnu_hash)
+ {
+ size_t i, cnt;
+ unsigned char *contents;
+ struct collect_gnu_hash_codes cinfo;
+ bfd_size_type amt;
+ size_t bucketcount;
+
+ memset (&cinfo, 0, sizeof (cinfo));
+
+ /* Compute the hash values for all exported symbols. At the same
+ time store the values in an array so that we could use them for
+ optimizations. */
+ amt = dynsymcount * 2 * sizeof (unsigned long int);
+ cinfo.hashcodes = bfd_malloc (amt);
+ if (cinfo.hashcodes == NULL)
+ return FALSE;
+
+ cinfo.hashval = cinfo.hashcodes + dynsymcount;
+ cinfo.min_dynindx = -1;
+ cinfo.output_bfd = output_bfd;
+ cinfo.bed = bed;
+
+ /* Put all hash values in HASHCODES. */
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_collect_gnu_hash_codes, &cinfo);
+
+ bucketcount
+ = compute_bucket_count (info, cinfo.hashcodes, cinfo.nsyms, 1);
+
+ if (bucketcount == 0)
+ {
+ free (cinfo.hashcodes);
+ return FALSE;
+ }
+
+ s = bfd_get_section_by_name (dynobj, ".gnu.hash");
+ BFD_ASSERT (s != NULL);
+
+ if (cinfo.nsyms == 0)
+ {
+ /* Empty .gnu.hash section is special. */
+ BFD_ASSERT (cinfo.min_dynindx == -1);
+ free (cinfo.hashcodes);
+ s->size = 5 * 4 + bed->s->arch_size / 8;
+ contents = bfd_zalloc (output_bfd, s->size);
+ if (contents == NULL)
+ return FALSE;
+ s->contents = contents;
+ /* 1 empty bucket. */
+ bfd_put_32 (output_bfd, 1, contents);
+ /* SYMIDX above the special symbol 0. */
+ bfd_put_32 (output_bfd, 1, contents + 4);
+ /* Just one word for bitmask. */
+ bfd_put_32 (output_bfd, 1, contents + 8);
+ /* Only hash fn bloom filter. */
+ bfd_put_32 (output_bfd, 0, contents + 12);
+ /* No hashes are valid - empty bitmask. */
+ bfd_put (bed->s->arch_size, output_bfd, 0, contents + 16);
+ /* No hashes in the only bucket. */
+ bfd_put_32 (output_bfd, 0,
+ contents + 16 + bed->s->arch_size / 8);
+ }
+ else
+ {
+ unsigned long int maskwords, maskbitslog2;
+ BFD_ASSERT (cinfo.min_dynindx != -1);
+
+ maskbitslog2 = bfd_log2 (cinfo.nsyms) + 1;
+ if (maskbitslog2 < 3)
+ maskbitslog2 = 5;
+ else if ((1 << (maskbitslog2 - 2)) & cinfo.nsyms)
+ maskbitslog2 = maskbitslog2 + 3;
+ else
+ maskbitslog2 = maskbitslog2 + 2;
+ if (bed->s->arch_size == 64)
+ {
+ if (maskbitslog2 == 5)
+ maskbitslog2 = 6;
+ cinfo.shift1 = 6;
+ }
+ else
+ cinfo.shift1 = 5;
+ cinfo.mask = (1 << cinfo.shift1) - 1;
+ cinfo.shift2 = maskbitslog2;
+ cinfo.maskbits = 1 << maskbitslog2;
+ maskwords = 1 << (maskbitslog2 - cinfo.shift1);
+ amt = bucketcount * sizeof (unsigned long int) * 2;
+ amt += maskwords * sizeof (bfd_vma);
+ cinfo.bitmask = bfd_malloc (amt);
+ if (cinfo.bitmask == NULL)
+ {
+ free (cinfo.hashcodes);
+ return FALSE;
+ }
+
+ cinfo.counts = (void *) (cinfo.bitmask + maskwords);
+ cinfo.indx = cinfo.counts + bucketcount;
+ cinfo.symindx = dynsymcount - cinfo.nsyms;
+ memset (cinfo.bitmask, 0, maskwords * sizeof (bfd_vma));
+
+ /* Determine how often each hash bucket is used. */
+ memset (cinfo.counts, 0, bucketcount * sizeof (cinfo.counts[0]));
+ for (i = 0; i < cinfo.nsyms; ++i)
+ ++cinfo.counts[cinfo.hashcodes[i] % bucketcount];
+
+ for (i = 0, cnt = cinfo.symindx; i < bucketcount; ++i)
+ if (cinfo.counts[i] != 0)
+ {
+ cinfo.indx[i] = cnt;
+ cnt += cinfo.counts[i];
+ }
+ BFD_ASSERT (cnt == dynsymcount);
+ cinfo.bucketcount = bucketcount;
+ cinfo.local_indx = cinfo.min_dynindx;
+
+ s->size = (4 + bucketcount + cinfo.nsyms) * 4;
+ s->size += cinfo.maskbits / 8;
+ contents = bfd_zalloc (output_bfd, s->size);
+ if (contents == NULL)
+ {
+ free (cinfo.bitmask);
+ free (cinfo.hashcodes);
+ return FALSE;
+ }
+
+ s->contents = contents;
+ bfd_put_32 (output_bfd, bucketcount, contents);
+ bfd_put_32 (output_bfd, cinfo.symindx, contents + 4);
+ bfd_put_32 (output_bfd, maskwords, contents + 8);
+ bfd_put_32 (output_bfd, cinfo.shift2, contents + 12);
+ contents += 16 + cinfo.maskbits / 8;
+
+ for (i = 0; i < bucketcount; ++i)
+ {
+ if (cinfo.counts[i] == 0)
+ bfd_put_32 (output_bfd, 0, contents);
+ else
+ bfd_put_32 (output_bfd, cinfo.indx[i], contents);
+ contents += 4;
+ }
+
+ cinfo.contents = contents;
+
+ /* Renumber dynamic symbols, populate .gnu.hash section. */
+ elf_link_hash_traverse (elf_hash_table (info),
+ elf_renumber_gnu_hash_syms, &cinfo);
+
+ contents = s->contents + 16;
+ for (i = 0; i < maskwords; ++i)
+ {
+ bfd_put (bed->s->arch_size, output_bfd, cinfo.bitmask[i],
+ contents);
+ contents += bed->s->arch_size / 8;
+ }
+
+ free (cinfo.bitmask);
+ free (cinfo.hashcodes);
+ }
+ }
s = bfd_get_section_by_name (dynobj, ".dynstr");
BFD_ASSERT (s != NULL);
@@ -5866,6 +6425,719 @@ struct elf_outext_info
struct elf_final_link_info *finfo;
};
+
+/* Support for evaluating a complex relocation.
+
+ Complex relocations are generalized, self-describing relocations. The
+ implementation of them consists of two parts: complex symbols, and the
+ relocations themselves.
+
+ The relocations are use a reserved elf-wide relocation type code (R_RELC
+ external / BFD_RELOC_RELC internal) and an encoding of relocation field
+ information (start bit, end bit, word width, etc) into the addend. This
+ information is extracted from CGEN-generated operand tables within gas.
+
+ Complex symbols are mangled symbols (BSF_RELC external / STT_RELC
+ internal) representing prefix-notation expressions, including but not
+ limited to those sorts of expressions normally encoded as addends in the
+ addend field. The symbol mangling format is:
+
+ <node> := <literal>
+ | <unary-operator> ':' <node>
+ | <binary-operator> ':' <node> ':' <node>
+ ;
+
+ <literal> := 's' <digits=N> ':' <N character symbol name>
+ | 'S' <digits=N> ':' <N character section name>
+ | '#' <hexdigits>
+ ;
+
+ <binary-operator> := as in C
+ <unary-operator> := as in C, plus "0-" for unambiguous negation. */
+
+static void
+set_symbol_value (bfd * bfd_with_globals,
+ struct elf_final_link_info * finfo,
+ int symidx,
+ bfd_vma val)
+{
+ bfd_boolean is_local;
+ Elf_Internal_Sym * sym;
+ struct elf_link_hash_entry ** sym_hashes;
+ struct elf_link_hash_entry * h;
+
+ sym_hashes = elf_sym_hashes (bfd_with_globals);
+ sym = finfo->internal_syms + symidx;
+ is_local = ELF_ST_BIND(sym->st_info) == STB_LOCAL;
+
+ if (is_local)
+ {
+ /* It is a local symbol: move it to the
+ "absolute" section and give it a value. */
+ sym->st_shndx = SHN_ABS;
+ sym->st_value = val;
+ }
+ else
+ {
+ /* It is a global symbol: set its link type
+ to "defined" and give it a value. */
+ h = sym_hashes [symidx];
+ while (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+ h->root.type = bfd_link_hash_defined;
+ h->root.u.def.value = val;
+ h->root.u.def.section = bfd_abs_section_ptr;
+ }
+}
+
+static bfd_boolean
+resolve_symbol (const char * name,
+ bfd * input_bfd,
+ struct elf_final_link_info * finfo,
+ bfd_vma * result,
+ size_t locsymcount)
+{
+ Elf_Internal_Sym * sym;
+ struct bfd_link_hash_entry * global_entry;
+ const char * candidate = NULL;
+ Elf_Internal_Shdr * symtab_hdr;
+ asection * sec = NULL;
+ size_t i;
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+
+ for (i = 0; i < locsymcount; ++ i)
+ {
+ sym = finfo->internal_syms + i;
+ sec = finfo->sections [i];
+
+ if (ELF_ST_BIND (sym->st_info) != STB_LOCAL)
+ continue;
+
+ candidate = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+#ifdef DEBUG
+ printf ("Comparing string: '%s' vs. '%s' = 0x%x\n",
+ name, candidate, (unsigned int)sym->st_value);
+#endif
+ if (candidate && strcmp (candidate, name) == 0)
+ {
+ * result = sym->st_value;
+
+ if (sym->st_shndx > SHN_UNDEF &&
+ sym->st_shndx < SHN_LORESERVE)
+ {
+#ifdef DEBUG
+ printf ("adjusting for sec '%s' @ 0x%x + 0x%x\n",
+ sec->output_section->name,
+ (unsigned int)sec->output_section->vma,
+ (unsigned int)sec->output_offset);
+#endif
+ * result += sec->output_offset + sec->output_section->vma;
+ }
+#ifdef DEBUG
+ printf ("Found symbol with effective value %8.8x\n", (unsigned int)* result);
+#endif
+ return TRUE;
+ }
+ }
+
+ /* Hmm, haven't found it yet. perhaps it is a global. */
+ global_entry = bfd_link_hash_lookup (finfo->info->hash, name, FALSE, FALSE, TRUE);
+ if (!global_entry)
+ return FALSE;
+
+ if (global_entry->type == bfd_link_hash_defined
+ || global_entry->type == bfd_link_hash_defweak)
+ {
+ * result = global_entry->u.def.value
+ + global_entry->u.def.section->output_section->vma
+ + global_entry->u.def.section->output_offset;
+#ifdef DEBUG
+ printf ("Found GLOBAL symbol '%s' with value %8.8x\n",
+ global_entry->root.string, (unsigned int)*result);
+#endif
+ return TRUE;
+ }
+
+ if (global_entry->type == bfd_link_hash_common)
+ {
+ *result = global_entry->u.def.value +
+ bfd_com_section_ptr->output_section->vma +
+ bfd_com_section_ptr->output_offset;
+#ifdef DEBUG
+ printf ("Found COMMON symbol '%s' with value %8.8x\n",
+ global_entry->root.string, (unsigned int)*result);
+#endif
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static bfd_boolean
+resolve_section (const char * name,
+ asection * sections,
+ bfd_vma * result)
+{
+ asection * curr;
+ unsigned int len;
+
+ for (curr = sections; curr; curr = curr->next)
+ if (strcmp (curr->name, name) == 0)
+ {
+ *result = curr->vma;
+ return TRUE;
+ }
+
+ /* Hmm. still haven't found it. try pseudo-section names. */
+ for (curr = sections; curr; curr = curr->next)
+ {
+ len = strlen (curr->name);
+ if (len > strlen (name))
+ continue;
+
+ if (strncmp (curr->name, name, len) == 0)
+ {
+ if (strncmp (".end", name + len, 4) == 0)
+ {
+ *result = curr->vma + curr->size;
+ return TRUE;
+ }
+
+ /* Insert more pseudo-section names here, if you like. */
+ }
+ }
+
+ return FALSE;
+}
+
+static void
+undefined_reference (const char * reftype,
+ const char * name)
+{
+ _bfd_error_handler (_("undefined %s reference in complex symbol: %s"), reftype, name);
+}
+
+static bfd_boolean
+eval_symbol (bfd_vma * result,
+ char * sym,
+ char ** advanced,
+ bfd * input_bfd,
+ struct elf_final_link_info * finfo,
+ bfd_vma addr,
+ bfd_vma section_offset,
+ size_t locsymcount,
+ int signed_p)
+{
+ int len;
+ int symlen;
+ bfd_vma a;
+ bfd_vma b;
+ const int bufsz = 4096;
+ char symbuf [bufsz];
+ const char * symend;
+ bfd_boolean symbol_is_section = FALSE;
+
+ len = strlen (sym);
+ symend = sym + len;
+
+ if (len < 1 || len > bufsz)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
+
+ switch (* sym)
+ {
+ case '.':
+ * result = addr + section_offset;
+ * advanced = sym + 1;
+ return TRUE;
+
+ case '#':
+ ++ sym;
+ * result = strtoul (sym, advanced, 16);
+ return TRUE;
+
+ case 'S':
+ symbol_is_section = TRUE;
+ case 's':
+ ++ sym;
+ symlen = strtol (sym, &sym, 10);
+ ++ sym; /* Skip the trailing ':'. */
+
+ if ((symend < sym) || ((symlen + 1) > bufsz))
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
+
+ memcpy (symbuf, sym, symlen);
+ symbuf [symlen] = '\0';
+ * advanced = sym + symlen;
+
+ /* Is it always possible, with complex symbols, that gas "mis-guessed"
+ the symbol as a section, or vice-versa. so we're pretty liberal in our
+ interpretation here; section means "try section first", not "must be a
+ section", and likewise with symbol. */
+
+ if (symbol_is_section)
+ {
+ if ((resolve_section (symbuf, finfo->output_bfd->sections, result) != TRUE)
+ && (resolve_symbol (symbuf, input_bfd, finfo, result, locsymcount) != TRUE))
+ {
+ undefined_reference ("section", symbuf);
+ return FALSE;
+ }
+ }
+ else
+ {
+ if ((resolve_symbol (symbuf, input_bfd, finfo, result, locsymcount) != TRUE)
+ && (resolve_section (symbuf, finfo->output_bfd->sections,
+ result) != TRUE))
+ {
+ undefined_reference ("symbol", symbuf);
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+
+ /* All that remains are operators. */
+
+#define UNARY_OP(op) \
+ if (strncmp (sym, #op, strlen (#op)) == 0) \
+ { \
+ sym += strlen (#op); \
+ if (* sym == ':') \
+ ++ sym; \
+ if (eval_symbol (& a, sym, & sym, input_bfd, finfo, addr, \
+ section_offset, locsymcount, signed_p) \
+ != TRUE) \
+ return FALSE; \
+ if (signed_p) \
+ * result = op ((signed)a); \
+ else \
+ * result = op a; \
+ * advanced = sym; \
+ return TRUE; \
+ }
+
+#define BINARY_OP(op) \
+ if (strncmp (sym, #op, strlen (#op)) == 0) \
+ { \
+ sym += strlen (#op); \
+ if (* sym == ':') \
+ ++ sym; \
+ if (eval_symbol (& a, sym, & sym, input_bfd, finfo, addr, \
+ section_offset, locsymcount, signed_p) \
+ != TRUE) \
+ return FALSE; \
+ ++ sym; \
+ if (eval_symbol (& b, sym, & sym, input_bfd, finfo, addr, \
+ section_offset, locsymcount, signed_p) \
+ != TRUE) \
+ return FALSE; \
+ if (signed_p) \
+ * result = ((signed) a) op ((signed) b); \
+ else \
+ * result = a op b; \
+ * advanced = sym; \
+ return TRUE; \
+ }
+
+ default:
+ UNARY_OP (0-);
+ BINARY_OP (<<);
+ BINARY_OP (>>);
+ BINARY_OP (==);
+ BINARY_OP (!=);
+ BINARY_OP (<=);
+ BINARY_OP (>=);
+ BINARY_OP (&&);
+ BINARY_OP (||);
+ UNARY_OP (~);
+ UNARY_OP (!);
+ BINARY_OP (*);
+ BINARY_OP (/);
+ BINARY_OP (%);
+ BINARY_OP (^);
+ BINARY_OP (|);
+ BINARY_OP (&);
+ BINARY_OP (+);
+ BINARY_OP (-);
+ BINARY_OP (<);
+ BINARY_OP (>);
+#undef UNARY_OP
+#undef BINARY_OP
+ _bfd_error_handler (_("unknown operator '%c' in complex symbol"), * sym);
+ bfd_set_error (bfd_error_invalid_operation);
+ return FALSE;
+ }
+}
+
+/* Entry point to evaluator, called from elf_link_input_bfd. */
+
+static bfd_boolean
+evaluate_complex_relocation_symbols (bfd * input_bfd,
+ struct elf_final_link_info * finfo,
+ size_t locsymcount)
+{
+ const struct elf_backend_data * bed;
+ Elf_Internal_Shdr * symtab_hdr;
+ struct elf_link_hash_entry ** sym_hashes;
+ asection * reloc_sec;
+ bfd_boolean result = TRUE;
+
+ /* For each section, we're going to check and see if it has any
+ complex relocations, and we're going to evaluate any of them
+ we can. */
+
+ if (finfo->info->relocatable)
+ return TRUE;
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ bed = get_elf_backend_data (input_bfd);
+
+ for (reloc_sec = input_bfd->sections; reloc_sec; reloc_sec = reloc_sec->next)
+ {
+ Elf_Internal_Rela * internal_relocs;
+ unsigned long i;
+
+ /* This section was omitted from the link. */
+ if (! reloc_sec->linker_mark)
+ continue;
+
+ /* Only process sections containing relocs. */
+ if ((reloc_sec->flags & SEC_RELOC) == 0)
+ continue;
+
+ if (reloc_sec->reloc_count == 0)
+ continue;
+
+ /* Read in the relocs for this section. */
+ internal_relocs
+ = _bfd_elf_link_read_relocs (input_bfd, reloc_sec, NULL,
+ (Elf_Internal_Rela *) NULL,
+ FALSE);
+ if (internal_relocs == NULL)
+ continue;
+
+ for (i = reloc_sec->reloc_count; i--;)
+ {
+ Elf_Internal_Rela * rel;
+ char * sym_name;
+ bfd_vma index;
+ Elf_Internal_Sym * sym;
+ bfd_vma result;
+ bfd_vma section_offset;
+ bfd_vma addr;
+ int signed_p = 0;
+
+ rel = internal_relocs + i;
+ section_offset = reloc_sec->output_section->vma
+ + reloc_sec->output_offset;
+ addr = rel->r_offset;
+
+ index = ELF32_R_SYM (rel->r_info);
+ if (bed->s->arch_size == 64)
+ index >>= 24;
+
+ if (index == STN_UNDEF)
+ continue;
+
+ if (index < locsymcount)
+ {
+ /* The symbol is local. */
+ sym = finfo->internal_syms + index;
+
+ /* We're only processing STT_RELC or STT_SRELC type symbols. */
+ if ((ELF_ST_TYPE (sym->st_info) != STT_RELC) &&
+ (ELF_ST_TYPE (sym->st_info) != STT_SRELC))
+ continue;
+
+ sym_name = bfd_elf_string_from_elf_section
+ (input_bfd, symtab_hdr->sh_link, sym->st_name);
+
+ signed_p = (ELF_ST_TYPE (sym->st_info) == STT_SRELC);
+ }
+ else
+ {
+ /* The symbol is global. */
+ struct elf_link_hash_entry * h;
+
+ if (elf_bad_symtab (input_bfd))
+ continue;
+
+ h = sym_hashes [index - locsymcount];
+ while ( h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ h = (struct elf_link_hash_entry *) h->root.u.i.link;
+
+ if (h->type != STT_RELC && h->type != STT_SRELC)
+ continue;
+
+ signed_p = (h->type == STT_SRELC);
+ sym_name = (char *) h->root.root.string;
+ }
+#ifdef DEBUG
+ printf ("Encountered a complex symbol!");
+ printf (" (input_bfd %s, section %s, reloc %ld\n",
+ input_bfd->filename, reloc_sec->name, i);
+ printf (" symbol: idx %8.8lx, name %s\n",
+ index, sym_name);
+ printf (" reloc : info %8.8lx, addr %8.8lx\n",
+ rel->r_info, addr);
+ printf (" Evaluating '%s' ...\n ", sym_name);
+#endif
+ if (eval_symbol (& result, sym_name, & sym_name, input_bfd,
+ finfo, addr, section_offset, locsymcount,
+ signed_p))
+ /* Symbol evaluated OK. Update to absolute value. */
+ set_symbol_value (input_bfd, finfo, index, result);
+
+ else
+ result = FALSE;
+ }
+
+ if (internal_relocs != elf_section_data (reloc_sec)->relocs)
+ free (internal_relocs);
+ }
+
+ /* If nothing went wrong, then we adjusted
+ everything we wanted to adjust. */
+ return result;
+}
+
+static void
+put_value (bfd_vma size,
+ unsigned long chunksz,
+ bfd * input_bfd,
+ bfd_vma x,
+ bfd_byte * location)
+{
+ location += (size - chunksz);
+
+ for (; size; size -= chunksz, location -= chunksz, x >>= (chunksz * 8))
+ {
+ switch (chunksz)
+ {
+ default:
+ case 0:
+ abort ();
+ case 1:
+ bfd_put_8 (input_bfd, x, location);
+ break;
+ case 2:
+ bfd_put_16 (input_bfd, x, location);
+ break;
+ case 4:
+ bfd_put_32 (input_bfd, x, location);
+ break;
+ case 8:
+#ifdef BFD64
+ bfd_put_64 (input_bfd, x, location);
+#else
+ abort ();
+#endif
+ break;
+ }
+ }
+}
+
+static bfd_vma
+get_value (bfd_vma size,
+ unsigned long chunksz,
+ bfd * input_bfd,
+ bfd_byte * location)
+{
+ bfd_vma x = 0;
+
+ for (; size; size -= chunksz, location += chunksz)
+ {
+ switch (chunksz)
+ {
+ default:
+ case 0:
+ abort ();
+ case 1:
+ x = (x << (8 * chunksz)) | bfd_get_8 (input_bfd, location);
+ break;
+ case 2:
+ x = (x << (8 * chunksz)) | bfd_get_16 (input_bfd, location);
+ break;
+ case 4:
+ x = (x << (8 * chunksz)) | bfd_get_32 (input_bfd, location);
+ break;
+ case 8:
+#ifdef BFD64
+ x = (x << (8 * chunksz)) | bfd_get_64 (input_bfd, location);
+#else
+ abort ();
+#endif
+ break;
+ }
+ }
+ return x;
+}
+
+static void
+decode_complex_addend
+ (unsigned long * start, /* in bits */
+ unsigned long * oplen, /* in bits */
+ unsigned long * len, /* in bits */
+ unsigned long * wordsz, /* in bytes */
+ unsigned long * chunksz, /* in bytes */
+ unsigned long * lsb0_p,
+ unsigned long * signed_p,
+ unsigned long * trunc_p,
+ unsigned long encoded)
+{
+ * start = encoded & 0x3F;
+ * len = (encoded >> 6) & 0x3F;
+ * oplen = (encoded >> 12) & 0x3F;
+ * wordsz = (encoded >> 18) & 0xF;
+ * chunksz = (encoded >> 22) & 0xF;
+ * lsb0_p = (encoded >> 27) & 1;
+ * signed_p = (encoded >> 28) & 1;
+ * trunc_p = (encoded >> 29) & 1;
+}
+
+void
+bfd_elf_perform_complex_relocation
+ (bfd * output_bfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info * info,
+ bfd * input_bfd,
+ asection * input_section,
+ bfd_byte * contents,
+ Elf_Internal_Rela * rel,
+ Elf_Internal_Sym * local_syms,
+ asection ** local_sections)
+{
+ const struct elf_backend_data * bed;
+ Elf_Internal_Shdr * symtab_hdr;
+ asection * sec;
+ bfd_vma relocation = 0, shift, x;
+ bfd_vma r_symndx;
+ bfd_vma mask;
+ unsigned long start, oplen, len, wordsz,
+ chunksz, lsb0_p, signed_p, trunc_p;
+
+ /* Perform this reloc, since it is complex.
+ (this is not to say that it necessarily refers to a complex
+ symbol; merely that it is a self-describing CGEN based reloc.
+ i.e. the addend has the complete reloc information (bit start, end,
+ word size, etc) encoded within it.). */
+ r_symndx = ELF32_R_SYM (rel->r_info);
+ bed = get_elf_backend_data (input_bfd);
+ if (bed->s->arch_size == 64)
+ r_symndx >>= 24;
+
+#ifdef DEBUG
+ printf ("Performing complex relocation %ld...\n", r_symndx);
+#endif
+
+ symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr;
+ if (r_symndx < symtab_hdr->sh_info)
+ {
+ /* The symbol is local. */
+ Elf_Internal_Sym * sym;
+
+ sym = local_syms + r_symndx;
+ sec = local_sections [r_symndx];
+ relocation = sym->st_value;
+ if (sym->st_shndx > SHN_UNDEF &&
+ sym->st_shndx < SHN_LORESERVE)
+ relocation += (sec->output_offset +
+ sec->output_section->vma);
+ }
+ else
+ {
+ /* The symbol is global. */
+ struct elf_link_hash_entry **sym_hashes;
+ struct elf_link_hash_entry * h;
+
+ sym_hashes = elf_sym_hashes (input_bfd);
+ h = 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;
+
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ {
+ sec = h->root.u.def.section;
+ relocation = h->root.u.def.value;
+
+ if (! bfd_is_abs_section (sec))
+ relocation += (sec->output_section->vma
+ + sec->output_offset);
+ }
+ if (h->root.type == bfd_link_hash_undefined
+ && !((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd,
+ input_section, rel->r_offset,
+ info->unresolved_syms_in_objects == RM_GENERATE_ERROR
+ || ELF_ST_VISIBILITY (h->other))))
+ return;
+ }
+
+ decode_complex_addend (& start, & oplen, & len, & wordsz,
+ & chunksz, & lsb0_p, & signed_p,
+ & trunc_p, rel->r_addend);
+
+ mask = (((1L << (len - 1)) - 1) << 1) | 1;
+
+ if (lsb0_p)
+ shift = (start + 1) - len;
+ else
+ shift = (8 * wordsz) - (start + len);
+
+ x = get_value (wordsz, chunksz, input_bfd, contents + rel->r_offset);
+
+#ifdef DEBUG
+ printf ("Doing complex reloc: "
+ "lsb0? %ld, signed? %ld, trunc? %ld, wordsz %ld, "
+ "chunksz %ld, start %ld, len %ld, oplen %ld\n"
+ " dest: %8.8lx, mask: %8.8lx, reloc: %8.8lx\n",
+ lsb0_p, signed_p, trunc_p, wordsz, chunksz, start, len,
+ oplen, x, mask, relocation);
+#endif
+
+ if (! trunc_p)
+ {
+ /* Now do an overflow check. */
+ if (bfd_check_overflow ((signed_p ?
+ complain_overflow_signed :
+ complain_overflow_unsigned),
+ len, 0, (8 * wordsz),
+ relocation) == bfd_reloc_overflow)
+ (*_bfd_error_handler)
+ ("%s (%s + 0x%lx): relocation overflow: 0x%lx %sdoes not fit "
+ "within 0x%lx",
+ input_bfd->filename, input_section->name, rel->r_offset,
+ relocation, (signed_p ? "(signed) " : ""), mask);
+ }
+
+ /* Do the deed. */
+ x = (x & ~(mask << shift)) | ((relocation & mask) << shift);
+
+#ifdef DEBUG
+ printf (" relocation: %8.8lx\n"
+ " shifted mask: %8.8lx\n"
+ " shifted/masked reloc: %8.8lx\n"
+ " result: %8.8lx\n",
+ relocation, (mask << shift),
+ ((relocation & mask) << shift), x);
+#endif
+ put_value (wordsz, chunksz, input_bfd, x, contents + rel->r_offset);
+}
+
/* When performing a relocatable link, the input relocations are
preserved. But, if they reference global symbols, the indices
referenced must be updated. Update all the relocations in
@@ -5994,7 +7266,9 @@ elf_link_sort_cmp2 (const void *A, const void *B)
static size_t
elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
{
- asection *reldyn;
+ asection *dynamic_relocs;
+ asection *rela_dyn;
+ asection *rel_dyn;
bfd_size_type count, size;
size_t i, ret, sort_elt, ext_size;
bfd_byte *sort, *s_non_relative, *p;
@@ -6005,39 +7279,170 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *);
struct bfd_link_order *lo;
bfd_vma r_sym_mask;
+ bfd_boolean use_rela;
- reldyn = bfd_get_section_by_name (abfd, ".rela.dyn");
- if (reldyn == NULL || reldyn->size == 0)
+ /* Find a dynamic reloc section. */
+ rela_dyn = bfd_get_section_by_name (abfd, ".rela.dyn");
+ rel_dyn = bfd_get_section_by_name (abfd, ".rel.dyn");
+ if (rela_dyn != NULL && rela_dyn->size > 0
+ && rel_dyn != NULL && rel_dyn->size > 0)
{
- reldyn = bfd_get_section_by_name (abfd, ".rel.dyn");
- if (reldyn == NULL || reldyn->size == 0)
- return 0;
- ext_size = bed->s->sizeof_rel;
- swap_in = bed->s->swap_reloc_in;
- swap_out = bed->s->swap_reloc_out;
+ bfd_boolean use_rela_initialised = FALSE;
+
+ /* This is just here to stop gcc from complaining.
+ It's initialization checking code is not perfect. */
+ use_rela = TRUE;
+
+ /* Both sections are present. Examine the sizes
+ of the indirect sections to help us choose. */
+ for (lo = rela_dyn->map_head.link_order; lo != NULL; lo = lo->next)
+ if (lo->type == bfd_indirect_link_order)
+ {
+ asection *o = lo->u.indirect.section;
+
+ if ((o->size % bed->s->sizeof_rela) == 0)
+ {
+ if ((o->size % bed->s->sizeof_rel) == 0)
+ /* Section size is divisible by both rel and rela sizes.
+ It is of no help to us. */
+ ;
+ else
+ {
+ /* Section size is only divisible by rela. */
+ if (use_rela_initialised && (use_rela == FALSE))
+ {
+ _bfd_error_handler
+ (_("%B: Unable to sort relocs - they are in more than one size"), abfd);
+ bfd_set_error (bfd_error_invalid_operation);
+ return 0;
+ }
+ else
+ {
+ use_rela = TRUE;
+ use_rela_initialised = TRUE;
+ }
+ }
+ }
+ else if ((o->size % bed->s->sizeof_rel) == 0)
+ {
+ /* Section size is only divisible by rel. */
+ if (use_rela_initialised && (use_rela == TRUE))
+ {
+ _bfd_error_handler
+ (_("%B: Unable to sort relocs - they are in more than one size"), abfd);
+ bfd_set_error (bfd_error_invalid_operation);
+ return 0;
+ }
+ else
+ {
+ use_rela = FALSE;
+ use_rela_initialised = TRUE;
+ }
+ }
+ else
+ {
+ /* The section size is not divisible by either - something is wrong. */
+ _bfd_error_handler
+ (_("%B: Unable to sort relocs - they are of an unknown size"), abfd);
+ bfd_set_error (bfd_error_invalid_operation);
+ return 0;
+ }
+ }
+
+ for (lo = rel_dyn->map_head.link_order; lo != NULL; lo = lo->next)
+ if (lo->type == bfd_indirect_link_order)
+ {
+ asection *o = lo->u.indirect.section;
+
+ if ((o->size % bed->s->sizeof_rela) == 0)
+ {
+ if ((o->size % bed->s->sizeof_rel) == 0)
+ /* Section size is divisible by both rel and rela sizes.
+ It is of no help to us. */
+ ;
+ else
+ {
+ /* Section size is only divisible by rela. */
+ if (use_rela_initialised && (use_rela == FALSE))
+ {
+ _bfd_error_handler
+ (_("%B: Unable to sort relocs - they are in more than one size"), abfd);
+ bfd_set_error (bfd_error_invalid_operation);
+ return 0;
+ }
+ else
+ {
+ use_rela = TRUE;
+ use_rela_initialised = TRUE;
+ }
+ }
+ }
+ else if ((o->size % bed->s->sizeof_rel) == 0)
+ {
+ /* Section size is only divisible by rel. */
+ if (use_rela_initialised && (use_rela == TRUE))
+ {
+ _bfd_error_handler
+ (_("%B: Unable to sort relocs - they are in more than one size"), abfd);
+ bfd_set_error (bfd_error_invalid_operation);
+ return 0;
+ }
+ else
+ {
+ use_rela = FALSE;
+ use_rela_initialised = TRUE;
+ }
+ }
+ else
+ {
+ /* The section size is not divisible by either - something is wrong. */
+ _bfd_error_handler
+ (_("%B: Unable to sort relocs - they are of an unknown size"), abfd);
+ bfd_set_error (bfd_error_invalid_operation);
+ return 0;
+ }
+ }
+
+ if (! use_rela_initialised)
+ /* Make a guess. */
+ use_rela = TRUE;
}
+ else if (rela_dyn != NULL && rela_dyn->size > 0)
+ use_rela = TRUE;
+ else if (rel_dyn != NULL && rel_dyn->size > 0)
+ use_rela = FALSE;
else
+ return 0;
+
+ if (use_rela)
{
+ dynamic_relocs = rela_dyn;
ext_size = bed->s->sizeof_rela;
swap_in = bed->s->swap_reloca_in;
swap_out = bed->s->swap_reloca_out;
}
- count = reldyn->size / ext_size;
+ else
+ {
+ dynamic_relocs = rel_dyn;
+ ext_size = bed->s->sizeof_rel;
+ swap_in = bed->s->swap_reloc_in;
+ swap_out = bed->s->swap_reloc_out;
+ }
size = 0;
- for (lo = reldyn->map_head.link_order; lo != NULL; lo = lo->next)
+ for (lo = dynamic_relocs->map_head.link_order; lo != NULL; lo = lo->next)
if (lo->type == bfd_indirect_link_order)
- {
- asection *o = lo->u.indirect.section;
- size += o->size;
- }
+ size += lo->u.indirect.section->size;
- if (size != reldyn->size)
+ if (size != dynamic_relocs->size)
return 0;
sort_elt = (sizeof (struct elf_link_sort_rela)
+ (i2e - 1) * sizeof (Elf_Internal_Rela));
+
+ count = dynamic_relocs->size / ext_size;
sort = bfd_zmalloc (sort_elt * count);
+
if (sort == NULL)
{
(*info->callbacks->warning)
@@ -6050,7 +7455,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
else
r_sym_mask = ~(bfd_vma) 0xffffffff;
- for (lo = reldyn->map_head.link_order; lo != NULL; lo = lo->next)
+ for (lo = dynamic_relocs->map_head.link_order; lo != NULL; lo = lo->next)
if (lo->type == bfd_indirect_link_order)
{
bfd_byte *erel, *erelend;
@@ -6067,9 +7472,11 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
erel = o->contents;
erelend = o->contents + o->size;
p = sort + o->output_offset / ext_size * sort_elt;
+
while (erel < erelend)
{
struct elf_link_sort_rela *s = (struct elf_link_sort_rela *) p;
+
(*swap_in) (abfd, erel, s->rela);
s->type = (*bed->elf_backend_reloc_type_class) (s->rela);
s->u.sym_mask = r_sym_mask;
@@ -6100,7 +7507,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
qsort (s_non_relative, count - ret, sort_elt, elf_link_sort_cmp2);
- for (lo = reldyn->map_head.link_order; lo != NULL; lo = lo->next)
+ for (lo = dynamic_relocs->map_head.link_order; lo != NULL; lo = lo->next)
if (lo->type == bfd_indirect_link_order)
{
bfd_byte *erel, *erelend;
@@ -6119,7 +7526,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
}
free (sort);
- *psec = reldyn;
+ *psec = dynamic_relocs;
return ret;
}
@@ -6657,11 +8064,6 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
if (h->dynindx != -1
&& elf_hash_table (finfo->info)->dynamic_sections_created)
{
- size_t bucketcount;
- size_t bucket;
- size_t hash_entry_size;
- bfd_byte *bucketpos;
- bfd_vma chain;
bfd_byte *esym;
sym.st_name = h->dynstr_index;
@@ -6673,17 +8075,27 @@ elf_link_output_extsym (struct elf_link_hash_entry *h, void *data)
}
bed->s->swap_symbol_out (finfo->output_bfd, &sym, esym, 0);
- bucketcount = elf_hash_table (finfo->info)->bucketcount;
- bucket = h->u.elf_hash_value % bucketcount;
- hash_entry_size
- = elf_section_data (finfo->hash_sec)->this_hdr.sh_entsize;
- bucketpos = ((bfd_byte *) finfo->hash_sec->contents
- + (bucket + 2) * hash_entry_size);
- chain = bfd_get (8 * hash_entry_size, finfo->output_bfd, bucketpos);
- bfd_put (8 * hash_entry_size, finfo->output_bfd, h->dynindx, bucketpos);
- bfd_put (8 * hash_entry_size, finfo->output_bfd, chain,
- ((bfd_byte *) finfo->hash_sec->contents
- + (bucketcount + 2 + h->dynindx) * hash_entry_size));
+ if (finfo->hash_sec != NULL)
+ {
+ size_t hash_entry_size;
+ bfd_byte *bucketpos;
+ bfd_vma chain;
+ size_t bucketcount;
+ size_t bucket;
+
+ bucketcount = elf_hash_table (finfo->info)->bucketcount;
+ bucket = h->u.elf_hash_value % bucketcount;
+
+ hash_entry_size
+ = elf_section_data (finfo->hash_sec)->this_hdr.sh_entsize;
+ bucketpos = ((bfd_byte *) finfo->hash_sec->contents
+ + (bucket + 2) * hash_entry_size);
+ chain = bfd_get (8 * hash_entry_size, finfo->output_bfd, bucketpos);
+ bfd_put (8 * hash_entry_size, finfo->output_bfd, h->dynindx, bucketpos);
+ bfd_put (8 * hash_entry_size, finfo->output_bfd, chain,
+ ((bfd_byte *) finfo->hash_sec->contents
+ + (bucketcount + 2 + h->dynindx) * hash_entry_size));
+ }
if (finfo->symver_sec != NULL && finfo->symver_sec->contents != NULL)
{
@@ -6784,14 +8196,15 @@ _bfd_elf_default_action_discarded (asection *sec)
/* Find a match between a section and a member of a section group. */
static asection *
-match_group_member (asection *sec, asection *group)
+match_group_member (asection *sec, asection *group,
+ struct bfd_link_info *info)
{
asection *first = elf_next_in_group (group);
asection *s = first;
while (s != NULL)
{
- if (bfd_elf_match_symbols_in_sections (s, sec))
+ if (bfd_elf_match_symbols_in_sections (s, sec, info))
return s;
s = elf_next_in_group (s);
@@ -6803,21 +8216,22 @@ match_group_member (asection *sec, asection *group)
}
/* Check if the kept section of a discarded section SEC can be used
- to replace it. Return the replacement if it is OK. Otherwise return
- NULL. */
+ to replace it. Return the replacement if it is OK. Otherwise return
+ NULL. */
asection *
-_bfd_elf_check_kept_section (asection *sec)
+_bfd_elf_check_kept_section (asection *sec, struct bfd_link_info *info)
{
asection *kept;
kept = sec->kept_section;
if (kept != NULL)
{
- if (elf_sec_group (sec) != NULL)
- kept = match_group_member (sec, kept);
+ if ((kept->flags & SEC_GROUP) != 0)
+ kept = match_group_member (sec, kept, info);
if (kept != NULL && sec->size != kept->size)
kept = NULL;
+ sec->kept_section = kept;
}
return kept;
}
@@ -6830,7 +8244,7 @@ _bfd_elf_check_kept_section (asection *sec)
static bfd_boolean
elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
{
- bfd_boolean (*relocate_section)
+ int (*relocate_section)
(bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **);
bfd *output_bfd;
@@ -6844,7 +8258,6 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
asection **ppsection;
asection *o;
const struct elf_backend_data *bed;
- bfd_boolean emit_relocs;
struct elf_link_hash_entry **sym_hashes;
output_bfd = finfo->output_bfd;
@@ -6857,9 +8270,6 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
if ((input_bfd->flags & DYNAMIC) != 0)
return TRUE;
- emit_relocs = (finfo->info->relocatable
- || finfo->info->emitrelocations);
-
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
if (elf_bad_symtab (input_bfd))
{
@@ -6883,6 +8293,15 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
if (isymbuf == NULL)
return FALSE;
}
+ /* evaluate_complex_relocation_symbols looks for symbols in
+ finfo->internal_syms. */
+ else if (isymbuf != NULL && locsymcount != 0)
+ {
+ bfd_elf_get_elf_syms (input_bfd, symtab_hdr, locsymcount, 0,
+ finfo->internal_syms,
+ finfo->external_syms,
+ finfo->locsym_shndx);
+ }
/* Find local symbol sections and adjust values of symbols in
SEC_MERGE sections. Write out those local symbols we know are
@@ -7020,6 +8439,9 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
return FALSE;
}
+ if (! evaluate_complex_relocation_symbols (input_bfd, finfo, locsymcount))
+ return FALSE;
+
/* Relocate the contents of each section. */
sym_hashes = elf_sym_hashes (input_bfd);
for (o = input_bfd->sections; o != NULL; o = o->next)
@@ -7063,6 +8485,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
Elf_Internal_Rela *internal_relocs;
bfd_vma r_type_mask;
int r_sym_shift;
+ int ret;
/* Get the swapped relocs. */
internal_relocs
@@ -7168,23 +8591,14 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
{
asection *kept;
- kept = _bfd_elf_check_kept_section (sec);
+ kept = _bfd_elf_check_kept_section (sec,
+ finfo->info);
if (kept != NULL)
{
*ps = kept;
continue;
}
}
-
- /* Remove the symbol reference from the reloc, but
- don't kill the reloc completely. This is so that
- a zero value will be written into the section,
- which may have non-zero contents put there by the
- assembler. Zero in things like an eh_frame fde
- pc_begin allows stack unwinders to recognize the
- fde as bogus. */
- rel->r_info &= r_type_mask;
- rel->r_addend = 0;
}
}
}
@@ -7209,14 +8623,17 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
corresponding to the output section, which will require
the addend to be adjusted. */
- if (! (*relocate_section) (output_bfd, finfo->info,
+ ret = (*relocate_section) (output_bfd, finfo->info,
input_bfd, o, contents,
internal_relocs,
isymbuf,
- finfo->sections))
+ finfo->sections);
+ if (!ret)
return FALSE;
- if (emit_relocs)
+ if (ret == 2
+ || finfo->info->relocatable
+ || finfo->info->emitrelocations)
{
Elf_Internal_Rela *irela;
Elf_Internal_Rela *irelaend;
@@ -7263,7 +8680,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
/* This is a reloc for a deleted entry or somesuch.
Turn it into an R_*_NONE reloc, at the same
offset as the last reloc. elf_eh_frame.c and
- elf_bfd_discard_info rely on reloc offsets
+ bfd_elf_discard_info rely on reloc offsets
being ordered. */
irela->r_offset = last_offset;
irela->r_info = 0;
@@ -7338,8 +8755,10 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
/* If we have discarded a section, the output
section will be the absolute section. In
- case of discarded link-once and discarded
- SEC_MERGE sections, use the kept section. */
+ case of discarded SEC_MERGE sections, use
+ the kept section. relocate_section should
+ have already handled discarded linkonce
+ sections. */
if (bfd_is_abs_section (osec)
&& sec->kept_section != NULL
&& sec->kept_section->output_section != NULL)
@@ -7351,6 +8770,24 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
if (!bfd_is_abs_section (osec))
{
r_symndx = osec->target_index;
+ if (r_symndx == 0)
+ {
+ struct elf_link_hash_table *htab;
+ asection *oi;
+
+ htab = elf_hash_table (finfo->info);
+ oi = htab->text_index_section;
+ if ((osec->flags & SEC_READONLY) == 0
+ && htab->data_index_section != NULL)
+ oi = htab->data_index_section;
+
+ if (oi != NULL)
+ {
+ irela->r_addend += osec->vma - oi->vma;
+ r_symndx = oi->target_index;
+ }
+ }
+
BFD_ASSERT (r_symndx != 0);
}
}
@@ -7446,7 +8883,8 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
/* Write out the modified section contents. */
if (bed->elf_backend_write_section
- && (*bed->elf_backend_write_section) (output_bfd, o, contents))
+ && (*bed->elf_backend_write_section) (output_bfd, finfo->info, o,
+ contents))
{
/* Section written out. */
}
@@ -7828,6 +9266,9 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
size_t relativecount = 0;
asection *reldyn = 0;
bfd_size_type amt;
+ asection *attr_section = NULL;
+ bfd_vma attr_size = 0;
+ const char *std_attrs_section;
if (! is_elf_hash_table (info->hash))
return FALSE;
@@ -7857,7 +9298,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
finfo.dynsym_sec = bfd_get_section_by_name (dynobj, ".dynsym");
finfo.hash_sec = bfd_get_section_by_name (dynobj, ".hash");
- BFD_ASSERT (finfo.dynsym_sec != NULL && finfo.hash_sec != NULL);
+ BFD_ASSERT (finfo.dynsym_sec != NULL);
finfo.symver_sec = bfd_get_section_by_name (dynobj, ".gnu.version");
/* Note that it is OK if symver_sec is NULL. */
}
@@ -7875,6 +9316,40 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
finfo.symbuf_count = 0;
finfo.shndxbuf_size = 0;
+ /* The object attributes have been merged. Remove the input
+ sections from the link, and set the contents of the output
+ secton. */
+ std_attrs_section = get_elf_backend_data (abfd)->obj_attrs_section;
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ if ((std_attrs_section && strcmp (o->name, std_attrs_section) == 0)
+ || strcmp (o->name, ".gnu.attributes") == 0)
+ {
+ for (p = o->map_head.link_order; p != NULL; p = p->next)
+ {
+ asection *input_section;
+
+ if (p->type != bfd_indirect_link_order)
+ continue;
+ input_section = p->u.indirect.section;
+ /* Hack: reset the SEC_HAS_CONTENTS flag so that
+ elf_link_input_bfd ignores this section. */
+ input_section->flags &= ~SEC_HAS_CONTENTS;
+ }
+
+ attr_size = bfd_elf_obj_attr_size (abfd);
+ if (attr_size)
+ {
+ bfd_set_section_size (abfd, o, attr_size);
+ attr_section = o;
+ /* Skip this section later on. */
+ o->map_head.link_order = NULL;
+ }
+ else
+ o->flags |= SEC_EXCLUDE;
+ }
+ }
+
/* Count up the number of relocations we will output for each output
section, so that we know the sizes of the reloc sections. We
also figure out some maximum sizes. */
@@ -7920,13 +9395,18 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
{
Elf_Internal_Rela * relocs;
- relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL,
+ relocs = _bfd_elf_link_read_relocs (sec->owner, sec,
+ NULL, NULL,
info->keep_memory);
- reloc_count = (*bed->elf_backend_count_relocs) (sec, relocs);
+ if (relocs != NULL)
+ {
+ reloc_count
+ = (*bed->elf_backend_count_relocs) (sec, relocs);
- if (elf_section_data (o)->relocs != relocs)
- free (relocs);
+ if (elf_section_data (sec)->relocs != relocs)
+ free (relocs);
+ }
}
if (sec->rawsize > max_contents_size)
@@ -8141,18 +9621,19 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
elfsym.st_size = 0;
elfsym.st_info = ELF_ST_INFO (STB_LOCAL, STT_SECTION);
elfsym.st_other = 0;
+ elfsym.st_value = 0;
for (i = 1; i < elf_numsections (abfd); i++)
{
o = bfd_section_from_elf_index (abfd, i);
if (o != NULL)
- o->target_index = bfd_get_symcount (abfd);
- elfsym.st_shndx = i;
- if (info->relocatable || o == NULL)
- elfsym.st_value = 0;
- else
- elfsym.st_value = o->vma;
- if (! elf_link_output_sym (&finfo, NULL, &elfsym, o, NULL))
- goto error_return;
+ {
+ o->target_index = bfd_get_symcount (abfd);
+ elfsym.st_shndx = i;
+ if (!info->relocatable)
+ elfsym.st_value = o->vma;
+ if (!elf_link_output_sym (&finfo, NULL, &elfsym, o, NULL))
+ goto error_return;
+ }
if (i == SHN_LORESERVE - 1)
i += SHN_HIRESERVE + 1 - SHN_LORESERVE;
}
@@ -8298,6 +9779,18 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
}
}
+ /* Free symbol buffer if needed. */
+ if (!info->reduce_memory_overheads)
+ {
+ for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
+ if (bfd_get_flavour (sub) == bfd_target_elf_flavour
+ && elf_tdata (sub)->symbuf)
+ {
+ free (elf_tdata (sub)->symbuf);
+ elf_tdata (sub)->symbuf = NULL;
+ }
+ }
+
/* Output any global symbols that got converted to local in a
version script or due to symbol visibility. We do this in a
separate step since ELF requires all local symbols to appear
@@ -8312,6 +9805,19 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (eoinfo.failed)
return FALSE;
+ /* If backend needs to output some local symbols not present in the hash
+ table, do it now. */
+ if (bed->elf_backend_output_arch_local_syms)
+ {
+ typedef bfd_boolean (*out_sym_func)
+ (void *, const char *, Elf_Internal_Sym *, asection *,
+ struct elf_link_hash_entry *);
+
+ if (! ((*bed->elf_backend_output_arch_local_syms)
+ (abfd, info, &finfo, (out_sym_func) elf_link_output_sym)))
+ return FALSE;
+ }
+
/* That wrote out all the local symbols. Finish up the symbol table
with the global symbols. Even if we want to strip everything we
can, we still need to deal with those global symbols that got
@@ -8603,6 +10109,9 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
case DT_HASH:
name = ".hash";
goto get_vma;
+ case DT_GNU_HASH:
+ name = ".gnu.hash";
+ goto get_vma;
case DT_STRTAB:
name = ".dynstr";
goto get_vma;
@@ -8686,8 +10195,8 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
if (dyn.d_tag == DT_TEXTREL)
{
- _bfd_error_handler
- (_("warning: creating a DT_TEXTREL in a shared object."));
+ info->callbacks->einfo
+ (_("%P: warning: creating a DT_TEXTREL in a shared object.\n"));
break;
}
}
@@ -8785,6 +10294,16 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
elf_tdata (abfd)->linker = TRUE;
+ if (attr_section)
+ {
+ bfd_byte *contents = bfd_malloc (attr_size);
+ if (contents == NULL)
+ goto error_return;
+ bfd_elf_set_obj_attr_contents (abfd, contents, attr_size);
+ bfd_set_section_contents (abfd, attr_section, contents, 0, attr_size);
+ free (contents);
+ }
+
return TRUE;
error_return:
@@ -8822,18 +10341,44 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info)
/* Garbage collect unused sections. */
+/* Default gc_mark_hook. */
+
+asection *
+_bfd_elf_gc_mark_hook (asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ Elf_Internal_Rela *rel ATTRIBUTE_UNUSED,
+ struct elf_link_hash_entry *h,
+ Elf_Internal_Sym *sym)
+{
+ if (h != NULL)
+ {
+ 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 (sec->owner, sym->st_shndx);
+
+ return NULL;
+}
+
/* The mark phase of garbage collection. For a given section, mark
it and any sections in this section's group, and all the sections
which define symbols to which it refers. */
-typedef asection * (*gc_mark_hook_fn)
- (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *, Elf_Internal_Sym *);
-
bfd_boolean
_bfd_elf_gc_mark (struct bfd_link_info *info,
asection *sec,
- gc_mark_hook_fn gc_mark_hook)
+ elf_gc_mark_hook_fn gc_mark_hook)
{
bfd_boolean ret;
bfd_boolean is_eh;
@@ -8954,7 +10499,8 @@ _bfd_elf_gc_mark (struct bfd_link_info *info,
/* Sweep symbols in swept sections. Called via elf_link_hash_traverse. */
-struct elf_gc_sweep_symbol_info {
+struct elf_gc_sweep_symbol_info
+{
struct bfd_link_info *info;
void (*hide_symbol) (struct bfd_link_info *, struct elf_link_hash_entry *,
bfd_boolean);
@@ -9017,6 +10563,9 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info)
to remove a section from the output. */
o->flags |= SEC_EXCLUDE;
+ if (info->print_gc_sections && o->size != 0)
+ _bfd_error_handler (_("Removing unused section '%s' in file '%B'"), sub, o->name);
+
/* But we also have to update some of the relocation
info we collected before. */
if (gc_sweep_hook
@@ -9198,9 +10747,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
{
bfd_boolean ok = TRUE;
bfd *sub;
- asection * (*gc_mark_hook)
- (asection *, struct bfd_link_info *, Elf_Internal_Rela *,
- struct elf_link_hash_entry *h, Elf_Internal_Sym *);
+ elf_gc_mark_hook_fn gc_mark_hook;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (!bed->can_gc_sections
@@ -9242,11 +10789,15 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
continue;
for (o = sub->sections; o != NULL; o = o->next)
- if ((o->flags & SEC_KEEP) != 0 && !o->gc_mark)
+ if ((o->flags & (SEC_EXCLUDE | SEC_KEEP)) == SEC_KEEP && !o->gc_mark)
if (!_bfd_elf_gc_mark (info, o, gc_mark_hook))
return FALSE;
}
+ /* Allow the backend to mark additional target specific sections. */
+ if (bed->gc_mark_extra_sections)
+ bed->gc_mark_extra_sections(info, gc_mark_hook);
+
/* ... again for sections marked from eh_frame. */
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
@@ -9262,30 +10813,38 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info)
easily due to needing special relocs to handle the
difference of two symbols in separate sections.
Don't keep code sections referenced by .eh_frame. */
+#define TEXT_PREFIX ".text."
+#define TEXT_PREFIX2 ".gnu.linkonce.t."
+#define GCC_EXCEPT_TABLE_PREFIX ".gcc_except_table."
for (o = sub->sections; o != NULL; o = o->next)
if (!o->gc_mark && o->gc_mark_from_eh && (o->flags & SEC_CODE) == 0)
{
- if (strncmp (o->name, ".gcc_except_table.", 18) == 0)
+ if (CONST_STRNEQ (o->name, GCC_EXCEPT_TABLE_PREFIX))
{
- unsigned long len;
char *fn_name;
+ const char *sec_name;
asection *fn_text;
-
- len = strlen (o->name + 18) + 1;
- fn_name = bfd_malloc (len + 16);
+ unsigned o_name_prefix_len , fn_name_prefix_len, tmp;
+
+ o_name_prefix_len = strlen (GCC_EXCEPT_TABLE_PREFIX);
+ sec_name = o->name + o_name_prefix_len;
+ fn_name_prefix_len = strlen (TEXT_PREFIX);
+ tmp = strlen (TEXT_PREFIX2);
+ if (tmp > fn_name_prefix_len)
+ fn_name_prefix_len = tmp;
+ fn_name
+ = bfd_malloc (fn_name_prefix_len + strlen (sec_name) + 1);
if (fn_name == NULL)
return FALSE;
/* Try the first prefix. */
- memcpy (fn_name, ".text.", 6);
- memcpy (fn_name + 6, o->name + 18, len);
+ sprintf (fn_name, "%s%s", TEXT_PREFIX, sec_name);
fn_text = bfd_get_section_by_name (sub, fn_name);
/* Try the second prefix. */
if (fn_text == NULL)
{
- memcpy (fn_name, ".gnu.linkonce.t.", 16);
- memcpy (fn_name + 16, o->name + 18, len);
+ sprintf (fn_name, "%s%s", TEXT_PREFIX2, sec_name);
fn_text = bfd_get_section_by_name (sub, fn_name);
}
@@ -9637,12 +11196,15 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
if ((abfd->flags & DYNAMIC) != 0)
continue;
- eh = bfd_get_section_by_name (abfd, ".eh_frame");
- if (info->relocatable
- || (eh != NULL
+ eh = NULL;
+ if (!info->relocatable)
+ {
+ eh = bfd_get_section_by_name (abfd, ".eh_frame");
+ if (eh != NULL
&& (eh->size == 0
- || bfd_is_abs_section (eh->output_section))))
- eh = NULL;
+ || bfd_is_abs_section (eh->output_section)))
+ eh = NULL;
+ }
stab = bfd_get_section_by_name (abfd, ".stab");
if (stab != NULL
@@ -9683,7 +11245,10 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
cookie.locsymcount, 0,
NULL, NULL, NULL);
if (cookie.locsyms == NULL)
- return FALSE;
+ {
+ info->callbacks->einfo (_("%P%X: can not read symbols: %E\n"));
+ return FALSE;
+ }
}
if (stab != NULL)
@@ -9753,39 +11318,28 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
}
void
-_bfd_elf_section_already_linked (bfd *abfd, struct bfd_section * sec)
+_bfd_elf_section_already_linked (bfd *abfd, struct bfd_section *sec,
+ struct bfd_link_info *info)
{
flagword flags;
const char *name, *p;
struct bfd_section_already_linked *l;
struct bfd_section_already_linked_hash_entry *already_linked_list;
- asection *group;
- /* A single member comdat group section may be discarded by a
- linkonce section. See below. */
if (sec->output_section == bfd_abs_section_ptr)
return;
flags = sec->flags;
- /* Check if it belongs to a section group. */
- group = elf_sec_group (sec);
-
- /* Return if it isn't a linkonce section nor a member of a group. A
- comdat group section also has SEC_LINK_ONCE set. */
- if ((flags & SEC_LINK_ONCE) == 0 && group == NULL)
+ /* Return if it isn't a linkonce section. A comdat group section
+ also has SEC_LINK_ONCE set. */
+ if ((flags & SEC_LINK_ONCE) == 0)
return;
- if (group)
- {
- /* If this is the member of a single member comdat group, check if
- the group should be discarded. */
- if (elf_next_in_group (sec) == sec
- && (group->flags & SEC_LINK_ONCE) != 0)
- sec = group;
- else
- return;
- }
+ /* Don't put group member sections on our list of already linked
+ sections. They are handled as a group via their group section. */
+ if (elf_sec_group (sec) != NULL)
+ return;
/* FIXME: When doing a relocatable link, we may have trouble
copying relocations in other sections that refer to local symbols
@@ -9806,7 +11360,7 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section * sec)
name = bfd_get_section_name (abfd, sec);
- if (strncmp (name, ".gnu.linkonce.", sizeof (".gnu.linkonce.") - 1) == 0
+ if (CONST_STRNEQ (name, ".gnu.linkonce.")
&& (p = strchr (name + sizeof (".gnu.linkonce.") - 1, '.')) != NULL)
p++;
else
@@ -9816,11 +11370,8 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section * sec)
for (l = already_linked_list->entry; l != NULL; l = l->next)
{
- /* We may have 3 different sections on the list: group section,
- comdat section and linkonce section. SEC may be a linkonce or
- group section. We match a group section with a group section,
- a linkonce section with a linkonce section, and ignore comdat
- section. */
+ /* We may have 2 different types of sections on the list: group
+ sections and linkonce sections. Match like sections. */
if ((flags & SEC_GROUP) == (l->sec->flags & SEC_GROUP)
&& strcmp (name, l->sec->name) == 0
&& bfd_coff_get_comdat_section (l->sec->owner, l->sec) == NULL)
@@ -9908,31 +11459,28 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section * sec)
}
}
- if (group)
+ /* A single member comdat group section may be discarded by a
+ linkonce section and vice versa. */
+
+ if ((flags & SEC_GROUP) != 0)
{
- /* If this is the member of a single member comdat group and the
- group hasn't be discarded, we check if it matches a linkonce
- section. We only record the discarded comdat group. Otherwise
- the undiscarded group will be discarded incorrectly later since
- itself has been recorded. */
- for (l = already_linked_list->entry; l != NULL; l = l->next)
- if ((l->sec->flags & SEC_GROUP) == 0
- && bfd_coff_get_comdat_section (l->sec->owner, l->sec) == NULL
- && bfd_elf_match_symbols_in_sections (l->sec,
- elf_next_in_group (sec)))
- {
- elf_next_in_group (sec)->output_section = bfd_abs_section_ptr;
- elf_next_in_group (sec)->kept_section = l->sec;
- group->output_section = bfd_abs_section_ptr;
- break;
- }
- if (l == NULL)
- return;
+ asection *first = elf_next_in_group (sec);
+
+ if (first != NULL && elf_next_in_group (first) == first)
+ /* Check this single member group against linkonce sections. */
+ for (l = already_linked_list->entry; l != NULL; l = l->next)
+ if ((l->sec->flags & SEC_GROUP) == 0
+ && bfd_coff_get_comdat_section (l->sec->owner, l->sec) == NULL
+ && bfd_elf_match_symbols_in_sections (l->sec, first, info))
+ {
+ first->output_section = bfd_abs_section_ptr;
+ first->kept_section = l->sec;
+ sec->output_section = bfd_abs_section_ptr;
+ break;
+ }
}
else
- /* There is no direct match. But for linkonce section, we should
- check if there is a match with comdat group member. We always
- record the linkonce section, discarded or not. */
+ /* Check this linkonce section against single member groups. */
for (l = already_linked_list->entry; l != NULL; l = l->next)
if (l->sec->flags & SEC_GROUP)
{
@@ -9940,10 +11488,10 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section * sec)
if (first != NULL
&& elf_next_in_group (first) == first
- && bfd_elf_match_symbols_in_sections (first, sec))
+ && bfd_elf_match_symbols_in_sections (first, sec, info))
{
sec->output_section = bfd_abs_section_ptr;
- sec->kept_section = l->sec;
+ sec->kept_section = first;
break;
}
}
diff --git a/contrib/binutils/bfd/elfn32-mips.c b/contrib/binutils/bfd/elfn32-mips.c
index b1211f0..e0994a0 100644
--- a/contrib/binutils/bfd/elfn32-mips.c
+++ b/contrib/binutils/bfd/elfn32-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for 32-bit ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -29,8 +29,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
different MIPS ELF from other targets. This matters when linking.
This file supports both, switching at runtime. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "bfdlink.h"
#include "genlink.h"
@@ -61,8 +61,6 @@ static bfd_reloc_status_type gprel32_with_gp
(bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma);
static bfd_reloc_status_type mips_elf_shift6_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static bfd_reloc_status_type mips16_jump_reloc
- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips16_gprel_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
@@ -756,6 +754,21 @@ static reloc_howto_type elf_mips_howto_table_rel[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* 32 bit relocation with no addend. */
+ HOWTO (R_MIPS_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_GLOB_DAT", /* name */
+ FALSE, /* partial_inplace */
+ 0x0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
/* The relocation table used for SHT_RELA sections. */
@@ -1429,6 +1442,21 @@ static reloc_howto_type elf_mips_howto_table_rela[] =
0x0000ffff, /* src_mask */
0x0000ffff, /* dst_mask */
FALSE), /* pcrel_offset */
+
+ /* 32 bit relocation with no addend. */
+ HOWTO (R_MIPS_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ FALSE, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ _bfd_mips_elf_generic_reloc, /* special_function */
+ "R_MIPS_GLOB_DAT", /* name */
+ FALSE, /* partial_inplace */
+ 0x0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ FALSE), /* pcrel_offset */
};
static reloc_howto_type elf_mips16_howto_table_rel[] =
@@ -1444,7 +1472,7 @@ static reloc_howto_type elf_mips16_howto_table_rel[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -1516,7 +1544,7 @@ static reloc_howto_type elf_mips16_howto_table_rela[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
FALSE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -1901,28 +1929,6 @@ mips_elf_shift6_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
error_message);
}
-/* Handle a mips16 jump. */
-
-static bfd_reloc_status_type
-mips16_jump_reloc (bfd *abfd ATTRIBUTE_UNUSED,
- arelent *reloc_entry ATTRIBUTE_UNUSED,
- asymbol *symbol ATTRIBUTE_UNUSED,
- void *data ATTRIBUTE_UNUSED,
- asection *input_section, bfd *output_bfd ATTRIBUTE_UNUSED,
- char **error_message ATTRIBUTE_UNUSED)
-{
- static bfd_boolean warned = FALSE;
-
- /* FIXME. */
- if (! warned)
- (*_bfd_error_handler)
- (_("Linking mips16 objects into %s format is not supported"),
- bfd_get_target (input_section->output_section->owner));
- warned = TRUE;
-
- return bfd_reloc_undefined;
-}
-
/* Handle a mips16 GP relative reloc. */
static bfd_reloc_status_type
@@ -2075,6 +2081,40 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
}
}
+static reloc_howto_type *
+bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (elf_mips_howto_table_rela)
+ / sizeof (elf_mips_howto_table_rela[0]));
+ i++)
+ if (elf_mips_howto_table_rela[i].name != NULL
+ && strcasecmp (elf_mips_howto_table_rela[i].name, r_name) == 0)
+ return &elf_mips_howto_table_rela[i];
+
+ for (i = 0;
+ i < (sizeof (elf_mips16_howto_table_rela)
+ / sizeof (elf_mips16_howto_table_rela[0]));
+ i++)
+ if (elf_mips16_howto_table_rela[i].name != NULL
+ && strcasecmp (elf_mips16_howto_table_rela[i].name, r_name) == 0)
+ return &elf_mips16_howto_table_rela[i];
+
+ if (strcasecmp (elf_mips_gnu_vtinherit_howto.name, r_name) == 0)
+ return &elf_mips_gnu_vtinherit_howto;
+ if (strcasecmp (elf_mips_gnu_vtentry_howto.name, r_name) == 0)
+ return &elf_mips_gnu_vtentry_howto;
+ if (strcasecmp (elf_mips_gnu_rel16_s2.name, r_name) == 0)
+ return &elf_mips_gnu_rel16_s2;
+ if (strcasecmp (elf_mips_gnu_rela16_s2.name, r_name) == 0)
+ return &elf_mips_gnu_rela16_s2;
+
+ return NULL;
+}
+
/* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */
static reloc_howto_type *
@@ -2317,12 +2357,15 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define elf_backend_create_dynamic_sections \
_bfd_mips_elf_create_dynamic_sections
#define elf_backend_check_relocs _bfd_mips_elf_check_relocs
+#define elf_backend_merge_symbol_attribute \
+ _bfd_mips_elf_merge_symbol_attribute
#define elf_backend_adjust_dynamic_symbol \
_bfd_mips_elf_adjust_dynamic_symbol
#define elf_backend_always_size_sections \
_bfd_mips_elf_always_size_sections
#define elf_backend_size_dynamic_sections \
_bfd_mips_elf_size_dynamic_sections
+#define elf_backend_init_index_section _bfd_elf_init_1_index_section
#define elf_backend_relocate_section _bfd_mips_elf_relocate_section
#define elf_backend_finish_dynamic_symbol \
_bfd_mips_elf_finish_dynamic_symbol
@@ -2380,10 +2423,8 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#define TARGET_BIG_SYM bfd_elf32_nbigmips_vec
#define TARGET_BIG_NAME "elf32-nbigmips"
-/* The SVR4 MIPS ABI says that this should be 0x10000, but Irix 5 uses
- a value of 0x1000, and we are compatible.
- FIXME: How does this affect NewABI? */
-#define ELF_MAXPAGESIZE 0x1000
+#define ELF_MAXPAGESIZE 0x10000
+#define ELF_COMMONPAGESIZE 0x1000
#include "elf32-target.h"
@@ -2394,15 +2435,15 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = {
#undef TARGET_BIG_NAME
#undef ELF_MAXPAGESIZE
+#undef ELF_COMMONPAGESIZE
#define TARGET_LITTLE_SYM bfd_elf32_ntradlittlemips_vec
#define TARGET_LITTLE_NAME "elf32-ntradlittlemips"
#define TARGET_BIG_SYM bfd_elf32_ntradbigmips_vec
#define TARGET_BIG_NAME "elf32-ntradbigmips"
-/* The SVR4 MIPS ABI says that this should be 0x10000, and Linux uses
- page sizes of up to that limit, so we need to respect it. */
#define ELF_MAXPAGESIZE 0x10000
+#define ELF_COMMONPAGESIZE 0x1000
#define elf32_bed elf32_tradbed
/* Include the target file again for this target. */
diff --git a/contrib/binutils/bfd/elfxx-ia64.c b/contrib/binutils/bfd/elfxx-ia64.c
index 6b3257a..68f2010 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, 2002, 2003, 2004, 2005, 2006
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
@@ -19,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "elf-bfd.h"
#include "opcode/ia64.h"
@@ -215,10 +215,6 @@ static bfd_boolean elfNN_ia64_add_symbol_hook
PARAMS ((bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym,
const char **namep, flagword *flagsp, asection **secp,
bfd_vma *valp));
-static int elfNN_ia64_additional_program_headers
- PARAMS ((bfd *abfd));
-static bfd_boolean elfNN_ia64_modify_segment_map
- PARAMS ((bfd *, struct bfd_link_info *));
static bfd_boolean elfNN_ia64_is_local_label_name
PARAMS ((bfd *abfd, const char *name));
static bfd_boolean elfNN_ia64_dynamic_symbol_p
@@ -617,6 +613,22 @@ elfNN_ia64_reloc_type_lookup (abfd, bfd_code)
return lookup_howto (rtype);
}
+static reloc_howto_type *
+elfNN_ia64_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (ia64_howto_table) / sizeof (ia64_howto_table[0]);
+ i++)
+ if (ia64_howto_table[i].name != NULL
+ && strcasecmp (ia64_howto_table[i].name, r_name) == 0)
+ return &ia64_howto_table[i];
+
+ return NULL;
+}
+
/* Given a ELF reloc, return the matching HOWTO structure. */
static void
@@ -1428,22 +1440,15 @@ elfNN_ia64_relax_ldxmov (contents, off)
/* Return TRUE if NAME is an unwind table section name. */
static inline bfd_boolean
-is_unwind_section_name (abfd, name)
- bfd *abfd;
- const char *name;
+is_unwind_section_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;
- return ((strncmp (name, ELF_STRING_ia64_unwind, len1) == 0
- && strncmp (name, ELF_STRING_ia64_unwind_info, len2) != 0)
- || strncmp (name, ELF_STRING_ia64_unwind_once, len3) == 0);
+ return ((CONST_STRNEQ (name, ELF_STRING_ia64_unwind)
+ && ! CONST_STRNEQ (name, ELF_STRING_ia64_unwind_info))
+ || CONST_STRNEQ (name, ELF_STRING_ia64_unwind_once));
}
/* Handle an IA-64 specific section when reading an object file. This
@@ -1637,8 +1642,8 @@ elfNN_ia64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
/* Return the number of additional phdrs we will need. */
static int
-elfNN_ia64_additional_program_headers (abfd)
- bfd *abfd;
+elfNN_ia64_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
int ret = 0;
@@ -1657,9 +1662,8 @@ elfNN_ia64_additional_program_headers (abfd)
}
static bfd_boolean
-elfNN_ia64_modify_segment_map (abfd, info)
- bfd *abfd;
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
+elfNN_ia64_modify_segment_map (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
struct elf_segment_map *m, **pm;
Elf_Internal_Shdr *hdr;
@@ -1742,17 +1746,30 @@ elfNN_ia64_modify_segment_map (abfd, info)
}
}
- /* Turn on PF_IA_64_NORECOV if needed. This involves traversing all of
- the input sections for each output section in the segment and testing
- for SHF_IA_64_NORECOV on each. */
- for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
+ return TRUE;
+}
+
+/* Turn on PF_IA_64_NORECOV if needed. This involves traversing all of
+ the input sections for each output section in the segment and testing
+ for SHF_IA_64_NORECOV on each. */
+
+static bfd_boolean
+elfNN_ia64_modify_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
+{
+ struct elf_obj_tdata *tdata = elf_tdata (abfd);
+ struct elf_segment_map *m;
+ Elf_Internal_Phdr *p;
+
+ for (p = tdata->phdr, m = tdata->segment_map; m != NULL; m = m->next, p++)
if (m->p_type == PT_LOAD)
{
int i;
for (i = m->count - 1; i >= 0; --i)
{
struct bfd_link_order *order = m->sections[i]->map_head.link_order;
- while (order)
+
+ while (order != NULL)
{
if (order->type == bfd_indirect_link_order)
{
@@ -1760,7 +1777,7 @@ elfNN_ia64_modify_segment_map (abfd, info)
bfd_vma flags = elf_section_data(is)->this_hdr.sh_flags;
if (flags & SHF_IA_64_NORECOV)
{
- m->p_flags |= PF_IA_64_NORECOV;
+ p->p_flags |= PF_IA_64_NORECOV;
goto found;
}
}
@@ -2208,7 +2225,7 @@ addend_compare (const void *xp, const void *yp)
const struct elfNN_ia64_dyn_sym_info *y
= (const struct elfNN_ia64_dyn_sym_info *) yp;
- return x->addend - y->addend;
+ return x->addend < y->addend ? -1 : x->addend > y->addend ? 1 : 0;
}
/* Sort elfNN_ia64_dyn_sym_info array and remove duplicates. */
@@ -2217,37 +2234,62 @@ static unsigned int
sort_dyn_sym_info (struct elfNN_ia64_dyn_sym_info *info,
unsigned int count)
{
- bfd_vma curr, prev;
- unsigned int i, dup, diff, dest, src, len;
+ bfd_vma curr, prev, got_offset;
+ unsigned int i, kept, dup, diff, dest, src, len;
qsort (info, count, sizeof (*info), addend_compare);
/* Find the first duplicate. */
prev = info [0].addend;
+ got_offset = info [0].got_offset;
for (i = 1; i < count; i++)
{
curr = info [i].addend;
if (curr == prev)
- break;
+ {
+ /* For duplicates, make sure that GOT_OFFSET is valid. */
+ if (got_offset == (bfd_vma) -1)
+ got_offset = info [i].got_offset;
+ break;
+ }
+ got_offset = info [i].got_offset;
prev = curr;
}
+ /* We may move a block of elements to here. */
+ dest = i++;
+
/* Remove duplicates. */
if (i < count)
{
- /* We need to move a block of elements to here. */
- dest = i++;
while (i < count)
{
+ /* For duplicates, make sure that the kept one has a valid
+ got_offset. */
+ kept = dest - 1;
+ if (got_offset != (bfd_vma) -1)
+ info [kept].got_offset = got_offset;
+
curr = info [i].addend;
+ got_offset = info [i].got_offset;
/* Move a block of elements whose first one is different from
the previous. */
if (curr == prev)
{
for (src = i + 1; src < count; src++)
- if (info [src].addend != curr)
- break;
+ {
+ if (info [src].addend != curr)
+ break;
+ /* For duplicates, make sure that GOT_OFFSET is
+ valid. */
+ if (got_offset == (bfd_vma) -1)
+ got_offset = info [src].got_offset;
+ }
+
+ /* Make sure that the kept one has a valid got_offset. */
+ if (got_offset != (bfd_vma) -1)
+ info [kept].got_offset = got_offset;
}
else
src = i;
@@ -2255,13 +2297,25 @@ sort_dyn_sym_info (struct elfNN_ia64_dyn_sym_info *info,
if (src >= count)
break;
- /* Find the next duplicate. */
+ /* Find the next duplicate. SRC will be kept. */
prev = info [src].addend;
+ got_offset = info [src].got_offset;
for (dup = src + 1; dup < count; dup++)
{
curr = info [dup].addend;
if (curr == prev)
- break;
+ {
+ /* Make sure that got_offset is valid. */
+ if (got_offset == (bfd_vma) -1)
+ got_offset = info [dup].got_offset;
+
+ /* For duplicates, make sure that the kept one has
+ a valid got_offset. */
+ if (got_offset != (bfd_vma) -1)
+ info [dup - 1].got_offset = got_offset;
+ break;
+ }
+ got_offset = info [dup].got_offset;
prev = curr;
}
@@ -2272,20 +2326,41 @@ sort_dyn_sym_info (struct elfNN_ia64_dyn_sym_info *info,
if (len == 1 && dup < count)
{
/* If we only move 1 element, we combine it with the next
- one. Find the next different one. */
+ one. There must be at least a duplicate. Find the
+ next different one. */
for (diff = dup + 1, src++; diff < count; diff++, src++)
- if (info [diff].addend != curr)
- break;
+ {
+ if (info [diff].addend != curr)
+ break;
+ /* Make sure that got_offset is valid. */
+ if (got_offset == (bfd_vma) -1)
+ got_offset = info [diff].got_offset;
+ }
+
+ /* Makre sure that the last duplicated one has an valid
+ offset. */
+ BFD_ASSERT (curr == prev);
+ if (got_offset != (bfd_vma) -1)
+ info [diff - 1].got_offset = got_offset;
if (diff < count)
{
- /* Find the next duplicate. */
+ /* Find the next duplicate. Track the current valid
+ offset. */
prev = info [diff].addend;
+ got_offset = info [diff].got_offset;
for (dup = diff + 1; dup < count; dup++)
{
curr = info [dup].addend;
if (curr == prev)
- break;
+ {
+ /* For duplicates, make sure that GOT_OFFSET
+ is valid. */
+ if (got_offset == (bfd_vma) -1)
+ got_offset = info [dup].got_offset;
+ break;
+ }
+ got_offset = info [dup].got_offset;
prev = curr;
diff++;
}
@@ -2302,6 +2377,19 @@ sort_dyn_sym_info (struct elfNN_ia64_dyn_sym_info *info,
count = dest;
}
+ else
+ {
+ /* When we get here, either there is no duplicate at all or
+ the only duplicate is the last element. */
+ if (dest < count)
+ {
+ /* If the last element is a duplicate, make sure that the
+ kept one has a valid got_offset. We also update count. */
+ if (got_offset != (bfd_vma) -1)
+ info [dest - 1].got_offset = got_offset;
+ count = dest;
+ }
+ }
return count;
}
@@ -2424,6 +2512,7 @@ has_space:
/* Append the new one to the array. */
dyn_i = info + count;
memset (dyn_i, 0, sizeof (*dyn_i));
+ dyn_i->got_offset = (bfd_vma) -1;
dyn_i->addend = addend;
/* We increment count only since the new ones are unsorted and
@@ -2613,10 +2702,10 @@ get_reloc_section (abfd, ia64_info, sec, create)
if (srel_name == NULL)
return NULL;
- BFD_ASSERT ((strncmp (srel_name, ".rela", 5) == 0
+ BFD_ASSERT ((CONST_STRNEQ (srel_name, ".rela")
&& strcmp (bfd_get_section_name (abfd, sec),
srel_name+5) == 0)
- || (strncmp (srel_name, ".rel", 4) == 0
+ || (CONST_STRNEQ (srel_name, ".rel")
&& strcmp (bfd_get_section_name (abfd, sec),
srel_name+4) == 0));
@@ -2733,7 +2822,7 @@ 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 = (h && ((!info->executable
- && (!info->symbolic
+ && (!SYMBOLIC_BIND (info, h)
|| info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| !h->def_regular
|| h->root.type == bfd_link_hash_defweak));
@@ -2905,7 +2994,7 @@ 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 = (h && ((!info->executable
- && (!info->symbolic
+ && (!SYMBOLIC_BIND (info, h)
|| info->unresolved_syms_in_shared_libs == RM_IGNORE))
|| !h->def_regular
|| h->root.type == bfd_link_hash_defweak));
@@ -3694,7 +3783,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
if (strcmp (name, ".got.plt") == 0)
strip = FALSE;
- else if (strncmp (name, ".rel", 4) == 0)
+ else if (CONST_STRNEQ (name, ".rel"))
{
if (!strip)
{
@@ -4358,7 +4447,7 @@ elfNN_ia64_choose_gp (abfd, info)
continue;
lo = os->vma;
- hi = os->vma + os->size;
+ hi = os->vma + (os->rawsize ? os->rawsize : os->size);
if (hi < lo)
hi = (bfd_vma) -1;
@@ -4556,7 +4645,6 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
elf_section_data(input_section->output_section)
->this_hdr.sh_flags |= flags;
- return TRUE;
}
gp_val = _bfd_get_gp_value (output_bfd);
@@ -4605,7 +4693,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
sym_sec = local_sections[r_symndx];
msec = sym_sec;
value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel);
- if ((sym_sec->flags & SEC_MERGE)
+ if (!info->relocatable
+ && (sym_sec->flags & SEC_MERGE) != 0
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
&& sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
{
@@ -4634,9 +4723,15 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
- sym_sec->output_section->vma
- sym_sec->output_offset;
}
-
- qsort (loc_h->info, loc_h->count,
- sizeof (*loc_h->info), addend_compare);
+
+ /* We may have introduced duplicated entries. We need
+ to remove them properly. */
+ count = sort_dyn_sym_info (loc_h->info, loc_h->count);
+ if (count != loc_h->count)
+ {
+ loc_h->count = count;
+ loc_h->sorted_count = count;
+ }
loc_h->sec_merge_done = 1;
}
@@ -4659,6 +4754,20 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
}
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ if (sym_sec != NULL && elf_discarded_section (sym_sec))
+ {
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ continue;
+
hit_addr = contents + rel->r_offset;
value += rel->r_addend;
dynamic_symbol_p = elfNN_ia64_dynamic_symbol_p (h, info, r_type);
@@ -4990,13 +5099,6 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_SEGREL32LSB:
case R_IA64_SEGREL64MSB:
case R_IA64_SEGREL64LSB:
- 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;
@@ -5561,9 +5663,9 @@ elfNN_ia64_reloc_type_class (rela)
static const struct bfd_elf_special_section elfNN_ia64_special_sections[] =
{
- { ".sbss", 5, -1, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { ".sdata", 6, -1, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".sbss"), -1, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
+ { STRING_COMMA_LEN (".sdata"), -1, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
+ { NULL, 0, 0, 0, 0 }
};
static bfd_boolean
@@ -5590,7 +5692,7 @@ elfNN_ia64_object_p (bfd *abfd)
if (elf_sec_group (sec) == NULL
&& ((sec->flags & (SEC_LINK_ONCE | SEC_CODE | SEC_GROUP))
== (SEC_LINK_ONCE | SEC_CODE))
- && strncmp (sec->name, ".gnu.linkonce.t.", 16) == 0)
+ && CONST_STRNEQ (sec->name, ".gnu.linkonce.t."))
{
name = sec->name + 16;
@@ -5673,7 +5775,7 @@ elfNN_hpux_post_process_headers (abfd, info)
{
Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
- i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX;
+ i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi;
i_ehdrp->e_ident[EI_ABIVERSION] = 1;
}
@@ -5717,6 +5819,7 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
#define ELF_MACHINE_ALT1 1999 /* EAS2.3 */
#define ELF_MACHINE_ALT2 1998 /* EAS2.2 */
#define ELF_MAXPAGESIZE 0x10000 /* 64KB */
+#define ELF_COMMONPAGESIZE 0x4000 /* 16KB */
#define elf_backend_section_from_shdr \
elfNN_ia64_section_from_shdr
@@ -5732,11 +5835,15 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
elfNN_ia64_additional_program_headers
#define elf_backend_modify_segment_map \
elfNN_ia64_modify_segment_map
+#define elf_backend_modify_program_headers \
+ elfNN_ia64_modify_program_headers
#define elf_info_to_howto \
elfNN_ia64_info_to_howto
#define bfd_elfNN_bfd_reloc_type_lookup \
elfNN_ia64_reloc_type_lookup
+#define bfd_elfNN_bfd_reloc_name_lookup \
+ elfNN_ia64_reloc_name_lookup
#define bfd_elfNN_bfd_is_local_label_name \
elfNN_ia64_is_local_label_name
#define bfd_elfNN_bfd_relax_section \
@@ -5758,6 +5865,8 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
elfNN_ia64_adjust_dynamic_symbol
#define elf_backend_size_dynamic_sections \
elfNN_ia64_size_dynamic_sections
+#define elf_backend_omit_section_dynsym \
+ ((bfd_boolean (*) (bfd *, struct bfd_link_info *, asection *)) bfd_true)
#define elf_backend_relocate_section \
elfNN_ia64_relocate_section
#define elf_backend_finish_dynamic_symbol \
@@ -5789,6 +5898,7 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
#define elf_backend_reloc_type_class elfNN_ia64_reloc_type_class
#define elf_backend_rela_normal 1
#define elf_backend_special_sections elfNN_ia64_special_sections
+#define elf_backend_default_execstack 0
/* FIXME: PR 290: The Intel C compiler generates SHT_IA_64_UNWIND with
SHF_LINK_ORDER. But it doesn't set the sh_link or sh_info fields.
@@ -5823,7 +5933,10 @@ elfNN_hpux_backend_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED,
#define elf_backend_want_p_paddr_set_to_zero 1
#undef ELF_MAXPAGESIZE
-#define ELF_MAXPAGESIZE 0x1000 /* 1K */
+#define ELF_MAXPAGESIZE 0x1000 /* 4K */
+#undef ELF_COMMONPAGESIZE
+#undef ELF_OSABI
+#define ELF_OSABI ELFOSABI_HPUX
#undef elfNN_bed
#define elfNN_bed elfNN_ia64_hpux_bed
diff --git a/contrib/binutils/bfd/elfxx-mips.c b/contrib/binutils/bfd/elfxx-mips.c
index a9aea66..eac685f 100644
--- a/contrib/binutils/bfd/elfxx-mips.c
+++ b/contrib/binutils/bfd/elfxx-mips.c
@@ -1,6 +1,6 @@
/* MIPS-specific support for ELF
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Most of the information added by Ian Lance Taylor, Cygnus Support,
<ian@cygnus.com>.
@@ -27,8 +27,8 @@
/* This file handles functionality common to the different MIPS ABI's. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libiberty.h"
#include "elf-bfd.h"
@@ -488,12 +488,12 @@ typedef struct runtime_pdr {
static struct mips_got_entry *mips_elf_create_local_got_entry
(bfd *, struct bfd_link_info *, bfd *, struct mips_got_info *, asection *,
- asection *, bfd_vma, unsigned long, struct mips_elf_link_hash_entry *, int);
+ bfd_vma, unsigned long, struct mips_elf_link_hash_entry *, int);
static bfd_boolean mips_elf_sort_hash_table_f
(struct mips_elf_link_hash_entry *, void *);
static bfd_vma mips_elf_high
(bfd_vma);
-static bfd_boolean mips_elf_stub_section_p
+static bfd_boolean mips16_stub_section_p
(bfd *, asection *);
static bfd_boolean mips_elf_create_dynamic_relocation
(bfd *, struct bfd_link_info *, const Elf_Internal_Rela *,
@@ -709,6 +709,10 @@ static bfd *reldyn_sorting_bfd;
#define FN_STUB ".mips16.fn."
#define CALL_STUB ".mips16.call."
#define CALL_FP_STUB ".mips16.call.fp."
+
+#define FN_STUB_P(name) CONST_STRNEQ (name, FN_STUB)
+#define CALL_STUB_P(name) CONST_STRNEQ (name, CALL_STUB)
+#define CALL_FP_STUB_P(name) CONST_STRNEQ (name, CALL_FP_STUB)
/* The format of the first PLT entry in a VxWorks executable. */
static const bfd_vma mips_vxworks_exec_plt0_entry[] = {
@@ -838,13 +842,16 @@ mips_elf_link_hash_newfunc (struct bfd_hash_entry *entry,
bfd_boolean
_bfd_mips_elf_new_section_hook (bfd *abfd, asection *sec)
{
- struct _mips_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
+ if (!sec->used_by_bfd)
+ {
+ struct _mips_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
- sdata = bfd_zalloc (abfd, amt);
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = sdata;
+ sdata = bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = sdata;
+ }
return _bfd_elf_new_section_hook (abfd, sec);
}
@@ -1689,11 +1696,20 @@ sort_dynamic_relocs (const void *arg1, const void *arg2)
{
Elf_Internal_Rela int_reloc1;
Elf_Internal_Rela int_reloc2;
+ int diff;
bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, arg1, &int_reloc1);
bfd_elf32_swap_reloc_in (reldyn_sorting_bfd, arg2, &int_reloc2);
- return ELF32_R_SYM (int_reloc1.r_info) - ELF32_R_SYM (int_reloc2.r_info);
+ diff = ELF32_R_SYM (int_reloc1.r_info) - ELF32_R_SYM (int_reloc2.r_info);
+ if (diff != 0)
+ return diff;
+
+ if (int_reloc1.r_offset < int_reloc2.r_offset)
+ return -1;
+ if (int_reloc1.r_offset > int_reloc2.r_offset)
+ return 1;
+ return 0;
}
/* Like sort_dynamic_relocs, but used for elf64 relocations. */
@@ -1711,8 +1727,16 @@ sort_dynamic_relocs_64 (const void *arg1 ATTRIBUTE_UNUSED,
(*get_elf_backend_data (reldyn_sorting_bfd)->s->swap_reloc_in)
(reldyn_sorting_bfd, arg2, int_reloc2);
- return (ELF64_R_SYM (int_reloc1[0].r_info)
- - ELF64_R_SYM (int_reloc2[0].r_info));
+ if (ELF64_R_SYM (int_reloc1[0].r_info) < ELF64_R_SYM (int_reloc2[0].r_info))
+ return -1;
+ if (ELF64_R_SYM (int_reloc1[0].r_info) > ELF64_R_SYM (int_reloc2[0].r_info))
+ return 1;
+
+ if (int_reloc1[0].r_offset < int_reloc2[0].r_offset)
+ return -1;
+ if (int_reloc1[0].r_offset > int_reloc2[0].r_offset)
+ return 1;
+ return 0;
#else
abort ();
#endif
@@ -2389,16 +2413,14 @@ mips_elf_gotplt_index (struct bfd_link_info *info,
return got_address - got_value;
}
-/* Return the GOT offset for address VALUE, which was derived from
- a symbol belonging to INPUT_SECTION. If there is not yet a GOT
+/* Return the GOT offset for address VALUE. If there is not yet a GOT
entry for this value, create one. If R_SYMNDX refers to a TLS symbol,
create a TLS GOT entry instead. Return -1 if no satisfactory GOT
offset can be found. */
static bfd_vma
mips_elf_local_got_index (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
- asection *input_section, bfd_vma value,
- unsigned long r_symndx,
+ bfd_vma value, unsigned long r_symndx,
struct mips_elf_link_hash_entry *h, int r_type)
{
asection *sgot;
@@ -2408,8 +2430,7 @@ mips_elf_local_got_index (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
entry = mips_elf_create_local_got_entry (abfd, info, ibfd, g, sgot,
- input_section, value,
- r_symndx, h, r_type);
+ value, r_symndx, h, r_type);
if (!entry)
return MINUS_ONE;
@@ -2510,16 +2531,15 @@ mips_elf_global_got_index (bfd *abfd, bfd *ibfd, struct elf_link_hash_entry *h,
return index;
}
-/* Find a GOT page entry that points to within 32KB of VALUE, which was
- calculated from a symbol belonging to INPUT_SECTION. These entries
- are supposed to be placed at small offsets in the GOT, i.e., within
- 32KB of GP. Return the index of the GOT entry, or -1 if no entry
- could be created. If OFFSETP is nonnull, use it to return the
+/* Find a GOT page entry that points to within 32KB of VALUE. These
+ entries are supposed to be placed at small offsets in the GOT, i.e.,
+ within 32KB of GP. Return the index of the GOT entry, or -1 if no
+ entry could be created. If OFFSETP is nonnull, use it to return the
offset of the GOT entry from VALUE. */
static bfd_vma
mips_elf_got_page (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
- asection *input_section, bfd_vma value, bfd_vma *offsetp)
+ bfd_vma value, bfd_vma *offsetp)
{
asection *sgot;
struct mips_got_info *g;
@@ -2530,8 +2550,7 @@ mips_elf_got_page (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
page = (value + 0x8000) & ~(bfd_vma) 0xffff;
entry = mips_elf_create_local_got_entry (abfd, info, ibfd, g, sgot,
- input_section, page, 0,
- NULL, R_MIPS_GOT_PAGE);
+ page, 0, NULL, R_MIPS_GOT_PAGE);
if (!entry)
return MINUS_ONE;
@@ -2544,15 +2563,13 @@ mips_elf_got_page (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
return index;
}
-/* Find a local GOT entry for an R_MIPS_GOT16 relocation against VALUE,
- which was calculated from a symbol belonging to INPUT_SECTION.
+/* Find a local GOT entry for an R_MIPS_GOT16 relocation against VALUE.
EXTERNAL is true if the relocation was against a global symbol
that has been forced local. */
static bfd_vma
mips_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
- asection *input_section, bfd_vma value,
- bfd_boolean external)
+ bfd_vma value, bfd_boolean external)
{
asection *sgot;
struct mips_got_info *g;
@@ -2568,8 +2585,7 @@ mips_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info,
g = mips_elf_got_info (elf_hash_table (info)->dynobj, &sgot);
entry = mips_elf_create_local_got_entry (abfd, info, ibfd, g, sgot,
- input_section, value, 0,
- NULL, R_MIPS_GOT16);
+ value, 0, NULL, R_MIPS_GOT16);
if (entry)
return entry->gotidx;
else
@@ -2602,8 +2618,8 @@ mips_elf_got_offset_from_index (bfd *dynobj, bfd *output_bfd,
static struct mips_got_entry *
mips_elf_create_local_got_entry (bfd *abfd, struct bfd_link_info *info,
bfd *ibfd, struct mips_got_info *gg,
- asection *sgot, asection *input_section,
- bfd_vma value, unsigned long r_symndx,
+ asection *sgot, bfd_vma value,
+ unsigned long r_symndx,
struct mips_elf_link_hash_entry *h,
int r_type)
{
@@ -2684,30 +2700,23 @@ mips_elf_create_local_got_entry (bfd *abfd, struct bfd_link_info *info,
MIPS_ELF_PUT_WORD (abfd, value,
(sgot->contents + entry.gotidx));
- /* These GOT entries need a dynamic relocation on VxWorks. Because
- the offset between segments is not fixed, the relocation must be
- against a symbol in the same segment as the original symbol.
- The easiest way to do this is to take INPUT_SECTION's output
- section and emit a relocation against its section symbol. */
+ /* These GOT entries need a dynamic relocation on VxWorks. */
if (htab->is_vxworks)
{
Elf_Internal_Rela outrel;
- asection *s, *output_section;
+ asection *s;
bfd_byte *loc;
bfd_vma got_address;
- int dynindx;
s = mips_elf_rel_dyn_section (info, FALSE);
- output_section = input_section->output_section;
- dynindx = elf_section_data (output_section)->dynindx;
got_address = (sgot->output_section->vma
+ sgot->output_offset
+ entry.gotidx);
loc = s->contents + (s->reloc_count++ * sizeof (Elf32_External_Rela));
outrel.r_offset = got_address;
- outrel.r_info = ELF32_R_INFO (dynindx, R_MIPS_32);
- outrel.r_addend = value - output_section->vma;
+ outrel.r_info = ELF32_R_INFO (STN_UNDEF, R_MIPS_32);
+ outrel.r_addend = value;
bfd_elf32_swap_reloca_out (abfd, &outrel, loc);
}
@@ -3085,8 +3094,7 @@ mips_elf_merge_gots (void **bfd2got_, void *p)
if (tcount > 0)
{
unsigned int primary_total = lcount + tcount + arg->global_count;
- if (primary_total * MIPS_ELF_GOT_SIZE (bfd2got->bfd)
- >= MIPS_ELF_GOT_MAX_SIZE (arg->info))
+ if (primary_total > maxcnt)
too_many_for_tls = TRUE;
}
@@ -3178,6 +3186,7 @@ mips_elf_initialize_tls_index (void **entryp, void *p)
struct mips_got_entry *entry = (struct mips_got_entry *)*entryp;
struct mips_got_info *g = p;
bfd_vma next_index;
+ unsigned char tls_type;
/* We're only interested in TLS symbols. */
if (entry->tls_type == 0)
@@ -3193,6 +3202,7 @@ mips_elf_initialize_tls_index (void **entryp, void *p)
return 1;
entry->d.h->tls_type |= GOT_TLS_OFFSET_DONE;
entry->d.h->tls_got_offset = next_index;
+ tls_type = entry->d.h->tls_type;
}
else
{
@@ -3209,12 +3219,13 @@ mips_elf_initialize_tls_index (void **entryp, void *p)
g->tls_ldm_offset = next_index;
}
entry->gotidx = next_index;
+ tls_type = entry->tls_type;
}
/* Account for the entries we've just allocated. */
- if (entry->tls_type & (GOT_TLS_GD | GOT_TLS_LDM))
+ if (tls_type & (GOT_TLS_GD | GOT_TLS_LDM))
g->tls_assigned_gotno += 2;
- if (entry->tls_type & GOT_TLS_IE)
+ if (tls_type & GOT_TLS_IE)
g->tls_assigned_gotno += 1;
return 1;
@@ -3580,16 +3591,18 @@ mips_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type,
const Elf_Internal_Rela *relocation,
const Elf_Internal_Rela *relend)
{
+ unsigned long r_symndx = ELF_R_SYM (abfd, relocation->r_info);
+
while (relocation < relend)
{
- if (ELF_R_TYPE (abfd, relocation->r_info) == r_type)
+ if (ELF_R_TYPE (abfd, relocation->r_info) == r_type
+ && ELF_R_SYM (abfd, relocation->r_info) == r_symndx)
return relocation;
++relocation;
}
/* We didn't find it. */
- bfd_set_error (bfd_error_bad_value);
return NULL;
}
@@ -4056,9 +4069,10 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
a stub. */
if (r_type != R_MIPS16_26 && !info->relocatable
&& ((h != NULL && h->fn_stub != NULL)
- || (local_p && elf_tdata (input_bfd)->local_stubs != NULL
+ || (local_p
+ && elf_tdata (input_bfd)->local_stubs != NULL
&& elf_tdata (input_bfd)->local_stubs[r_symndx] != NULL))
- && !mips_elf_stub_section_p (input_bfd, input_section))
+ && !mips16_stub_section_p (input_bfd, input_section))
{
/* This is a 32- or 64-bit call to a 16-bit function. We should
have already noticed that we were going to need the
@@ -4072,38 +4086,46 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
}
symbol = sec->output_section->vma + sec->output_offset;
+ /* The target is 16-bit, but the stub isn't. */
+ target_is_16_bit_code_p = FALSE;
}
/* If this is a 16-bit call to a 32- or 64-bit function with a stub, we
need to redirect the call to the stub. */
else if (r_type == R_MIPS16_26 && !info->relocatable
- && h != NULL
- && (h->call_stub != NULL || h->call_fp_stub != NULL)
+ && ((h != NULL && (h->call_stub != NULL || h->call_fp_stub != NULL))
+ || (local_p
+ && elf_tdata (input_bfd)->local_call_stubs != NULL
+ && elf_tdata (input_bfd)->local_call_stubs[r_symndx] != NULL))
&& !target_is_16_bit_code_p)
{
- /* If both call_stub and call_fp_stub are defined, we can figure
- out which one to use by seeing which one appears in the input
- file. */
- if (h->call_stub != NULL && h->call_fp_stub != NULL)
+ if (local_p)
+ sec = elf_tdata (input_bfd)->local_call_stubs[r_symndx];
+ else
{
- asection *o;
-
- sec = NULL;
- for (o = input_bfd->sections; o != NULL; o = o->next)
+ /* If both call_stub and call_fp_stub are defined, we can figure
+ out which one to use by checking which one appears in the input
+ file. */
+ if (h->call_stub != NULL && h->call_fp_stub != NULL)
{
- if (strncmp (bfd_get_section_name (input_bfd, o),
- CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0)
+ asection *o;
+
+ sec = NULL;
+ for (o = input_bfd->sections; o != NULL; o = o->next)
{
- sec = h->call_fp_stub;
- break;
+ if (CALL_FP_STUB_P (bfd_get_section_name (input_bfd, o)))
+ {
+ sec = h->call_fp_stub;
+ break;
+ }
}
+ if (sec == NULL)
+ sec = h->call_stub;
}
- if (sec == NULL)
+ else if (h->call_stub != NULL)
sec = h->call_stub;
- }
- else if (h->call_stub != NULL)
- sec = h->call_stub;
- else
- sec = h->call_fp_stub;
+ else
+ sec = h->call_fp_stub;
+ }
BFD_ASSERT (sec->size > 0);
symbol = sec->output_section->vma + sec->output_offset;
@@ -4145,7 +4167,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
if (r_type == R_MIPS_TLS_LDM)
{
g = mips_elf_local_got_index (abfd, input_bfd, info,
- sec, 0, 0, NULL, r_type);
+ 0, 0, NULL, r_type);
if (g == MINUS_ONE)
return bfd_reloc_outofrange;
}
@@ -4191,7 +4213,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
break;
else
{
- g = mips_elf_local_got_index (abfd, input_bfd, info, sec,
+ g = mips_elf_local_got_index (abfd, input_bfd, info,
symbol + addend, r_symndx, h, r_type);
if (g == MINUS_ONE)
return bfd_reloc_outofrange;
@@ -4240,6 +4262,13 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
outrel.r_info = ELF32_R_INFO (h->root.dynindx, r_type);
outrel.r_addend = addend;
bfd_elf32_swap_reloca_out (abfd, &outrel, loc);
+
+ /* If we've written this relocation for a readonly section,
+ we need to set DF_TEXTREL again, so that we do not delete the
+ DT_TEXTREL tag. */
+ if (MIPS_ELF_READONLY_SECTION (input_section))
+ info->flags |= DF_TEXTREL;
+
*valuep = 0;
return bfd_reloc_ok;
}
@@ -4326,6 +4355,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
break;
case R_MIPS_TLS_DTPREL_LO16:
+ case R_MIPS_TLS_DTPREL32:
+ case R_MIPS_TLS_DTPREL64:
value = (symbol + addend - dtprel_base (info)) & howto->dst_mask;
break;
@@ -4435,7 +4466,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
forced = ! mips_elf_local_relocation_p (input_bfd, relocation,
local_sections, FALSE);
- value = mips_elf_got16_entry (abfd, input_bfd, info, sec,
+ value = mips_elf_got16_entry (abfd, input_bfd, info,
symbol + addend, forced);
if (value == MINUS_ONE)
return bfd_reloc_outofrange;
@@ -4466,7 +4497,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
case R_MIPS_GNU_REL16_S2:
value = symbol + _bfd_mips_elf_sign_extend (addend, 18) - p;
overflowed_p = mips_elf_overflow_p (value, 18);
- value = (value >> 2) & howto->dst_mask;
+ value >>= howto->rightshift;
+ value &= howto->dst_mask;
break;
case R_MIPS_GOT_HI16:
@@ -4490,8 +4522,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
0. */
if (! local_p)
goto got_disp;
- value = mips_elf_got_page (abfd, input_bfd, info, sec,
- symbol + addend, NULL);
+ value = mips_elf_got_page (abfd, input_bfd, info, symbol + addend, NULL);
if (value == MINUS_ONE)
return bfd_reloc_outofrange;
value = mips_elf_got_offset_from_index (dynobj, abfd, input_bfd, value);
@@ -4500,8 +4531,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
case R_MIPS_GOT_OFST:
if (local_p)
- mips_elf_got_page (abfd, input_bfd, info, sec,
- symbol + addend, &value);
+ mips_elf_got_page (abfd, input_bfd, info, symbol + addend, &value);
else
value = addend;
overflowed_p = mips_elf_overflow_p (value, 16);
@@ -4677,13 +4707,11 @@ mips_elf_perform_relocation (struct bfd_link_info *info,
/* Returns TRUE if SECTION is a MIPS16 stub section. */
static bfd_boolean
-mips_elf_stub_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *section)
+mips16_stub_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *section)
{
const char *name = bfd_get_section_name (abfd, section);
- return (strncmp (name, FN_STUB, sizeof FN_STUB - 1) == 0
- || strncmp (name, CALL_STUB, sizeof CALL_STUB - 1) == 0
- || strncmp (name, CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0);
+ return FN_STUB_P (name) || CALL_STUB_P (name) || CALL_FP_STUB_P (name);
}
/* Add room for N relocations to the .rel(a).dyn section in ABFD. */
@@ -4745,10 +4773,13 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
outrel[0].r_offset =
_bfd_elf_section_offset (output_bfd, info, input_section, rel[0].r_offset);
- outrel[1].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[1].r_offset);
- outrel[2].r_offset =
- _bfd_elf_section_offset (output_bfd, info, input_section, rel[2].r_offset);
+ if (ABI_64_P (output_bfd))
+ {
+ outrel[1].r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section, rel[1].r_offset);
+ outrel[2].r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section, rel[2].r_offset);
+ }
if (outrel[0].r_offset == MINUS_ONE)
/* The relocation field has been deleted. */
@@ -4792,6 +4823,11 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd,
{
indx = elf_section_data (sec->output_section)->dynindx;
if (indx == 0)
+ {
+ asection *osec = htab->root.text_index_section;
+ indx = elf_section_data (osec)->dynindx;
+ }
+ if (indx == 0)
abort ();
}
@@ -4976,39 +5012,30 @@ _bfd_elf_mips_mach (flagword flags)
default:
case E_MIPS_ARCH_1:
return bfd_mach_mips3000;
- break;
case E_MIPS_ARCH_2:
return bfd_mach_mips6000;
- break;
case E_MIPS_ARCH_3:
return bfd_mach_mips4000;
- break;
case E_MIPS_ARCH_4:
return bfd_mach_mips8000;
- break;
case E_MIPS_ARCH_5:
return bfd_mach_mips5;
- break;
case E_MIPS_ARCH_32:
return bfd_mach_mipsisa32;
- break;
case E_MIPS_ARCH_64:
return bfd_mach_mipsisa64;
- break;
case E_MIPS_ARCH_32R2:
return bfd_mach_mipsisa32r2;
- break;
case E_MIPS_ARCH_64R2:
return bfd_mach_mipsisa64r2;
- break;
}
}
@@ -5098,6 +5125,7 @@ _bfd_mips_elf_symbol_processing (bfd *abfd, asymbol *asym)
/* Common symbols less than the GP size are automatically
treated as SHN_MIPS_SCOMMON symbols on IRIX5. */
if (asym->value > elf_gp_size (abfd)
+ || ELF_ST_TYPE (elfsym->internal_elf_sym.st_info) == STT_TLS
|| IRIX_COMPAT (abfd) == ict_irix6)
break;
/* Fall through. */
@@ -5409,7 +5437,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
return FALSE;
break;
case SHT_MIPS_GPTAB:
- if (strncmp (name, ".gptab.", sizeof ".gptab." - 1) != 0)
+ if (! CONST_STRNEQ (name, ".gptab."))
return FALSE;
break;
case SHT_MIPS_UCODE:
@@ -5432,7 +5460,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
return FALSE;
break;
case SHT_MIPS_CONTENT:
- if (strncmp (name, ".MIPS.content", sizeof ".MIPS.content" - 1) != 0)
+ if (! CONST_STRNEQ (name, ".MIPS.content"))
return FALSE;
break;
case SHT_MIPS_OPTIONS:
@@ -5440,7 +5468,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
return FALSE;
break;
case SHT_MIPS_DWARF:
- if (strncmp (name, ".debug_", sizeof ".debug_" - 1) != 0)
+ if (! CONST_STRNEQ (name, ".debug_"))
return FALSE;
break;
case SHT_MIPS_SYMBOL_LIB:
@@ -5448,9 +5476,8 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
return FALSE;
break;
case SHT_MIPS_EVENTS:
- if (strncmp (name, ".MIPS.events", sizeof ".MIPS.events" - 1) != 0
- && strncmp (name, ".MIPS.post_rel",
- sizeof ".MIPS.post_rel" - 1) != 0)
+ if (! CONST_STRNEQ (name, ".MIPS.events")
+ && ! CONST_STRNEQ (name, ".MIPS.post_rel"))
return FALSE;
break;
default:
@@ -5556,11 +5583,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd,
bfd_boolean
_bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
{
- register const char *name;
- unsigned int sh_type;
-
- name = bfd_get_section_name (abfd, sec);
- sh_type = hdr->sh_type;
+ const char *name = bfd_get_section_name (abfd, sec);
if (strcmp (name, ".liblist") == 0)
{
@@ -5570,7 +5593,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
}
else if (strcmp (name, ".conflict") == 0)
hdr->sh_type = SHT_MIPS_CONFLICT;
- else if (strncmp (name, ".gptab.", sizeof ".gptab." - 1) == 0)
+ else if (CONST_STRNEQ (name, ".gptab."))
{
hdr->sh_type = SHT_MIPS_GPTAB;
hdr->sh_entsize = sizeof (Elf32_External_gptab);
@@ -5627,7 +5650,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
hdr->sh_type = SHT_MIPS_IFACE;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
}
- else if (strncmp (name, ".MIPS.content", strlen (".MIPS.content")) == 0)
+ else if (CONST_STRNEQ (name, ".MIPS.content"))
{
hdr->sh_type = SHT_MIPS_CONTENT;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
@@ -5639,7 +5662,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
hdr->sh_entsize = 1;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
}
- else if (strncmp (name, ".debug_", sizeof ".debug_" - 1) == 0)
+ else if (CONST_STRNEQ (name, ".debug_"))
hdr->sh_type = SHT_MIPS_DWARF;
else if (strcmp (name, ".MIPS.symlib") == 0)
{
@@ -5647,9 +5670,8 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
/* The sh_link and sh_info fields are set in
final_write_processing. */
}
- else if (strncmp (name, ".MIPS.events", sizeof ".MIPS.events" - 1) == 0
- || strncmp (name, ".MIPS.post_rel",
- sizeof ".MIPS.post_rel" - 1) == 0)
+ else if (CONST_STRNEQ (name, ".MIPS.events")
+ || CONST_STRNEQ (name, ".MIPS.post_rel"))
{
hdr->sh_type = SHT_MIPS_EVENTS;
hdr->sh_flags |= SHF_MIPS_NOSTRIP;
@@ -5662,12 +5684,6 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
hdr->sh_entsize = 8;
}
- /* In the unlikely event a special section is empty it has to lose its
- special meaning. This may happen e.g. when using `strip' with the
- "--only-keep-debug" option. */
- if (sec->size > 0 && !(sec->flags & SEC_HAS_CONTENTS))
- hdr->sh_type = sh_type;
-
/* The generic elf_fake_sections will set up REL_HDR using the default
kind of relocations. We used to set up a second header for the
non-default kind of relocations here, but only NewABI would use
@@ -5738,6 +5754,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
/* Common symbols less than the GP size are automatically
treated as SHN_MIPS_SCOMMON symbols. */
if (sym->st_size > elf_gp_size (abfd)
+ || ELF_ST_TYPE (sym->st_info) == STT_TLS
|| IRIX_COMPAT (abfd) == ict_irix6)
break;
/* Fall through. */
@@ -6119,7 +6136,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* Check for the mips16 stub sections. */
name = bfd_get_section_name (abfd, sec);
- if (strncmp (name, FN_STUB, sizeof FN_STUB - 1) == 0)
+ if (FN_STUB_P (name))
{
unsigned long r_symndx;
@@ -6144,12 +6161,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* We can ignore stub sections when looking for relocs. */
if ((o->flags & SEC_RELOC) == 0
|| o->reloc_count == 0
- || strncmp (bfd_get_section_name (abfd, o), FN_STUB,
- sizeof FN_STUB - 1) == 0
- || strncmp (bfd_get_section_name (abfd, o), CALL_STUB,
- sizeof CALL_STUB - 1) == 0
- || strncmp (bfd_get_section_name (abfd, o), CALL_FP_STUB,
- sizeof CALL_FP_STUB - 1) == 0)
+ || mips16_stub_section_p (abfd, o))
continue;
sec_relocs
@@ -6201,6 +6213,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
elf_tdata (abfd)->local_stubs = n;
}
+ sec->flags |= SEC_KEEP;
elf_tdata (abfd)->local_stubs[r_symndx] = sec;
/* We don't need to set mips16_stubs_seen in this case.
@@ -6221,12 +6234,23 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
/* H is the symbol this stub is for. */
+ /* If we already have an appropriate stub for this function, we
+ don't need another one, so we can discard this one. Since
+ this function is called before the linker maps input sections
+ to output sections, we can easily discard it by setting the
+ SEC_EXCLUDE flag. */
+ if (h->fn_stub != NULL)
+ {
+ sec->flags |= SEC_EXCLUDE;
+ return TRUE;
+ }
+
+ sec->flags |= SEC_KEEP;
h->fn_stub = sec;
mips_elf_hash_table (info)->mips16_stubs_seen = TRUE;
}
}
- else if (strncmp (name, CALL_STUB, sizeof CALL_STUB - 1) == 0
- || strncmp (name, CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0)
+ else if (CALL_STUB_P (name) || CALL_FP_STUB_P (name))
{
unsigned long r_symndx;
struct mips_elf_link_hash_entry *h;
@@ -6240,42 +6264,106 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (r_symndx < extsymoff
|| sym_hashes[r_symndx - extsymoff] == NULL)
{
- /* This stub was actually built for a static symbol defined
- in the same file. We assume that all static symbols in
- mips16 code are themselves mips16, so we can simply
- discard this stub. Since this function is called before
- the linker maps input sections to output sections, we can
- easily discard it by setting the SEC_EXCLUDE flag. */
- sec->flags |= SEC_EXCLUDE;
- return TRUE;
- }
+ asection *o;
- h = ((struct mips_elf_link_hash_entry *)
- sym_hashes[r_symndx - extsymoff]);
+ /* This stub is for a local symbol. This stub will only be
+ needed if there is some relocation (R_MIPS16_26) in this BFD
+ that refers to this symbol. */
+ for (o = abfd->sections; o != NULL; o = o->next)
+ {
+ Elf_Internal_Rela *sec_relocs;
+ const Elf_Internal_Rela *r, *rend;
+
+ /* We can ignore stub sections when looking for relocs. */
+ if ((o->flags & SEC_RELOC) == 0
+ || o->reloc_count == 0
+ || mips16_stub_section_p (abfd, o))
+ continue;
- /* H is the symbol this stub is for. */
+ sec_relocs
+ = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL,
+ info->keep_memory);
+ if (sec_relocs == NULL)
+ return FALSE;
- if (strncmp (name, CALL_FP_STUB, sizeof CALL_FP_STUB - 1) == 0)
- loc = &h->call_fp_stub;
- else
- loc = &h->call_stub;
-
- /* If we already have an appropriate stub for this function, we
- don't need another one, so we can discard this one. Since
- this function is called before the linker maps input sections
- to output sections, we can easily discard it by setting the
- SEC_EXCLUDE flag. We can also discard this section if we
- happen to already know that this is a mips16 function; it is
- not necessary to check this here, as it is checked later, but
- it is slightly faster to check now. */
- if (*loc != NULL || h->root.other == STO_MIPS16)
- {
- sec->flags |= SEC_EXCLUDE;
- return TRUE;
+ rend = sec_relocs + o->reloc_count;
+ for (r = sec_relocs; r < rend; r++)
+ if (ELF_R_SYM (abfd, r->r_info) == r_symndx
+ && ELF_R_TYPE (abfd, r->r_info) == R_MIPS16_26)
+ break;
+
+ if (elf_section_data (o)->relocs != sec_relocs)
+ free (sec_relocs);
+
+ if (r < rend)
+ break;
+ }
+
+ if (o == NULL)
+ {
+ /* There is no non-call reloc for this stub, so we do
+ not need it. Since this function is called before
+ the linker maps input sections to output sections, we
+ can easily discard it by setting the SEC_EXCLUDE
+ flag. */
+ sec->flags |= SEC_EXCLUDE;
+ return TRUE;
+ }
+
+ /* Record this stub in an array of local symbol call_stubs for
+ this BFD. */
+ if (elf_tdata (abfd)->local_call_stubs == NULL)
+ {
+ unsigned long symcount;
+ asection **n;
+ bfd_size_type amt;
+
+ if (elf_bad_symtab (abfd))
+ symcount = NUM_SHDR_ENTRIES (symtab_hdr);
+ else
+ symcount = symtab_hdr->sh_info;
+ amt = symcount * sizeof (asection *);
+ n = bfd_zalloc (abfd, amt);
+ if (n == NULL)
+ return FALSE;
+ elf_tdata (abfd)->local_call_stubs = n;
+ }
+
+ sec->flags |= SEC_KEEP;
+ elf_tdata (abfd)->local_call_stubs[r_symndx] = sec;
+
+ /* We don't need to set mips16_stubs_seen in this case.
+ That flag is used to see whether we need to look through
+ the global symbol table for stubs. We don't need to set
+ it here, because we just have a local stub. */
}
+ else
+ {
+ h = ((struct mips_elf_link_hash_entry *)
+ sym_hashes[r_symndx - extsymoff]);
+
+ /* H is the symbol this stub is for. */
+
+ if (CALL_FP_STUB_P (name))
+ loc = &h->call_fp_stub;
+ else
+ loc = &h->call_stub;
+
+ /* If we already have an appropriate stub for this function, we
+ don't need another one, so we can discard this one. Since
+ this function is called before the linker maps input sections
+ to output sections, we can easily discard it by setting the
+ SEC_EXCLUDE flag. */
+ if (*loc != NULL)
+ {
+ sec->flags |= SEC_EXCLUDE;
+ return TRUE;
+ }
- *loc = sec;
- mips_elf_hash_table (info)->mips16_stubs_seen = TRUE;
+ sec->flags |= SEC_KEEP;
+ *loc = sec;
+ mips_elf_hash_table (info)->mips16_stubs_seen = TRUE;
+ }
}
if (dynobj == NULL)
@@ -6395,6 +6483,10 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
return FALSE;
}
mips_elf_allocate_dynamic_relocations (dynobj, info, 1);
+ if (MIPS_ELF_READONLY_SECTION (sec))
+ /* We tell the dynamic linker that there are
+ relocations against the text segment. */
+ info->flags |= DF_TEXTREL;
}
}
else if (r_type == R_MIPS_CALL_LO16
@@ -6640,12 +6732,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
References from a stub section do not count. */
if (h != NULL
&& r_type != R_MIPS16_26
- && strncmp (bfd_get_section_name (abfd, sec), FN_STUB,
- sizeof FN_STUB - 1) != 0
- && strncmp (bfd_get_section_name (abfd, sec), CALL_STUB,
- sizeof CALL_STUB - 1) != 0
- && strncmp (bfd_get_section_name (abfd, sec), CALL_FP_STUB,
- sizeof CALL_FP_STUB - 1) != 0)
+ && !mips16_stub_section_p (abfd, sec))
{
struct mips_elf_link_hash_entry *mh;
@@ -6938,7 +7025,6 @@ _bfd_mips_vxworks_adjust_dynamic_symbol (struct bfd_link_info *info,
bfd *dynobj;
struct mips_elf_link_hash_entry *hmips;
struct mips_elf_link_hash_table *htab;
- unsigned int power_of_two;
htab = mips_elf_hash_table (info);
dynobj = elf_hash_table (info)->dynobj;
@@ -7061,26 +7147,7 @@ _bfd_mips_vxworks_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_copy = 1;
}
- /* We need to figure out the alignment required for this symbol. */
- power_of_two = bfd_log2 (h->size);
- if (power_of_two > 4)
- power_of_two = 4;
-
- /* Apply the required alignment. */
- htab->sdynbss->size = BFD_ALIGN (htab->sdynbss->size,
- (bfd_size_type) 1 << power_of_two);
- if (power_of_two > bfd_get_section_alignment (dynobj, htab->sdynbss)
- && !bfd_set_section_alignment (dynobj, htab->sdynbss, power_of_two))
- return FALSE;
-
- /* Define the symbol as being at this point in the section. */
- h->root.u.def.section = htab->sdynbss;
- h->root.u.def.value = htab->sdynbss->size;
-
- /* Increment the section size to make room for the symbol. */
- htab->sdynbss->size += h->size;
-
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, htab->sdynbss);
}
/* Return the number of dynamic section symbols required by OUTPUT_BFD.
@@ -7094,7 +7161,7 @@ count_section_dynsyms (bfd *output_bfd, struct bfd_link_info *info)
bfd_size_type count;
count = 0;
- if (info->shared)
+ if (info->shared || elf_hash_table (info)->is_relocatable_executable)
{
asection *p;
const struct elf_backend_data *bed;
@@ -7293,7 +7360,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
if ((s->flags & SEC_LINKER_CREATED) == 0)
continue;
- if (strncmp (name, ".rel", 4) == 0)
+ if (CONST_STRNEQ (name, ".rel"))
{
if (s->size != 0)
{
@@ -7345,7 +7412,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
mips_elf_allocate_dynamic_relocations (dynobj, info, count);
}
}
- else if (!htab->is_vxworks && strncmp (name, ".got", 4) == 0)
+ else if (!htab->is_vxworks && CONST_STRNEQ (name, ".got"))
{
/* _bfd_mips_elf_always_size_sections() has already done
most of the work, but some symbols may have been mapped
@@ -7421,16 +7488,16 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
}
else if (! info->shared
&& ! mips_elf_hash_table (info)->use_rld_obj_head
- && strncmp (name, ".rld_map", 8) == 0)
+ && CONST_STRNEQ (name, ".rld_map"))
{
/* We add a room for __rld_map. It will be filled in by the
rtld to contain a pointer to the _r_debug structure. */
s->size += 4;
}
else if (SGI_COMPAT (output_bfd)
- && strncmp (name, ".compact_rel", 12) == 0)
+ && CONST_STRNEQ (name, ".compact_rel"))
s->size += mips_elf_hash_table (info)->compact_rel_size;
- else if (strncmp (name, ".init", 5) != 0
+ else if (! CONST_STRNEQ (name, ".init")
&& s != htab->sgotplt
&& s != htab->splt)
{
@@ -7480,29 +7547,22 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
/* Add some entries to the .dynamic section. We fill in the
values later, in _bfd_mips_elf_finish_dynamic_sections, but we
must add the entries now so that we get the correct size for
- the .dynamic section. The DT_DEBUG entry is filled in by the
- dynamic linker and used by the debugger. */
- if (! info->shared)
- {
- /* SGI object has the equivalence of DT_DEBUG in the
- DT_MIPS_RLD_MAP entry. */
- if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0))
- return FALSE;
- if (!SGI_COMPAT (output_bfd))
- {
- if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
- return FALSE;
- }
- }
- else
- {
- /* Shared libraries on traditional mips have DT_DEBUG. */
- if (!SGI_COMPAT (output_bfd))
- {
- if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
- return FALSE;
- }
- }
+ the .dynamic section. */
+
+ /* SGI object has the equivalence of DT_DEBUG in the
+ DT_MIPS_RLD_MAP entry. This must come first because glibc
+ only fills in DT_MIPS_RLD_MAP (not DT_DEBUG) and GDB only
+ looks at the first one it sees. */
+ if (!info->shared
+ && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0))
+ return FALSE;
+
+ /* The DT_DEBUG entry may be filled in by the dynamic linker and
+ used by the debugger. */
+ if (info->executable
+ && !SGI_COMPAT (output_bfd)
+ && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
+ return FALSE;
if (reltext && (SGI_COMPAT (output_bfd) || htab->is_vxworks))
info->flags |= DF_TEXTREL;
@@ -7669,8 +7729,54 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd_boolean rela_relocation_p = TRUE;
unsigned int r_type = ELF_R_TYPE (output_bfd, rel->r_info);
const char *msg;
+ unsigned long r_symndx;
+ asection *sec;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry *h;
/* Find the relocation howto for this relocation. */
+ howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, r_type,
+ NEWABI_P (input_bfd)
+ && (MIPS_RELOC_RELA_P
+ (input_bfd, input_section,
+ rel - relocs)));
+
+ r_symndx = ELF_R_SYM (input_bfd, rel->r_info);
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ if (mips_elf_local_relocation_p (input_bfd, rel, local_sections, FALSE))
+ {
+ sec = local_sections[r_symndx];
+ h = NULL;
+ }
+ else
+ {
+ unsigned long extsymoff;
+
+ extsymoff = 0;
+ if (!elf_bad_symtab (input_bfd))
+ extsymoff = symtab_hdr->sh_info;
+ h = elf_sym_hashes (input_bfd) [r_symndx - extsymoff];
+ 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;
+
+ sec = NULL;
+ if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ sec = h->root.u.def.section;
+ }
+
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce sections,
+ or sections discarded by a linker script, we just want the
+ section contents zeroed. Avoid any special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
if (r_type == R_MIPS_64 && ! NEWABI_P (input_bfd))
{
/* Some 32-bit code uses R_MIPS_64. In particular, people use
@@ -7686,13 +7792,6 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
if (bfd_big_endian (input_bfd))
rel->r_offset += 4;
}
- else
- /* NewABI defaults to RELA relocations. */
- howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, r_type,
- NEWABI_P (input_bfd)
- && (MIPS_RELOC_RELA_P
- (input_bfd, input_section,
- rel - relocs)));
if (!use_saved_addend_p)
{
@@ -7733,10 +7832,8 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
&& mips_elf_local_relocation_p (input_bfd, rel,
local_sections, FALSE)))
{
- bfd_vma l;
const Elf_Internal_Rela *lo16_relocation;
reloc_howto_type *lo16_howto;
- bfd_byte *lo16_location;
int lo16_type;
if (r_type == R_MIPS16_HI16)
@@ -7759,32 +7856,56 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
several relocations for the same address. In
that case, the R_MIPS_LO16 relocation may occur
as one of these. We permit a similar extension
- in general, as that is useful for GCC. */
+ in general, as that is useful for GCC.
+
+ In some cases GCC dead code elimination removes
+ the LO16 but keeps the corresponding HI16. This
+ is strictly speaking a violation of the ABI but
+ not immediately harmful. */
lo16_relocation = mips_elf_next_relocation (input_bfd,
lo16_type,
rel, relend);
if (lo16_relocation == NULL)
- return FALSE;
-
- lo16_location = contents + lo16_relocation->r_offset;
-
- /* Obtain the addend kept there. */
- lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd,
- lo16_type, FALSE);
- _bfd_mips16_elf_reloc_unshuffle (input_bfd, lo16_type, FALSE,
- lo16_location);
- l = mips_elf_obtain_contents (lo16_howto, lo16_relocation,
- input_bfd, contents);
- _bfd_mips16_elf_reloc_shuffle (input_bfd, lo16_type, FALSE,
- lo16_location);
- l &= lo16_howto->src_mask;
- l <<= lo16_howto->rightshift;
- l = _bfd_mips_elf_sign_extend (l, 16);
-
- addend <<= 16;
-
- /* Compute the combined addend. */
- addend += l;
+ {
+ const char *name;
+
+ if (h)
+ name = h->root.root.string;
+ else
+ name = bfd_elf_sym_name (input_bfd, symtab_hdr,
+ local_syms + r_symndx,
+ sec);
+ (*_bfd_error_handler)
+ (_("%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%A'"),
+ input_bfd, input_section, name, howto->name,
+ rel->r_offset);
+ }
+ else
+ {
+ bfd_byte *lo16_location;
+ bfd_vma l;
+
+ lo16_location = contents + lo16_relocation->r_offset;
+
+ /* Obtain the addend kept there. */
+ lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd,
+ lo16_type, FALSE);
+ _bfd_mips16_elf_reloc_unshuffle (input_bfd, lo16_type,
+ FALSE, lo16_location);
+ l = mips_elf_obtain_contents (lo16_howto,
+ lo16_relocation,
+ input_bfd, contents);
+ _bfd_mips16_elf_reloc_shuffle (input_bfd, lo16_type,
+ FALSE, lo16_location);
+ l &= lo16_howto->src_mask;
+ l <<= lo16_howto->rightshift;
+ l = _bfd_mips_elf_sign_extend (l, 16);
+
+ addend <<= 16;
+
+ /* Compute the combined addend. */
+ addend += l;
+ }
}
else
addend <<= howto->rightshift;
@@ -8792,11 +8913,10 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
MIPS_ELF_PUT_WORD (output_bfd, (bfd_vma) 0x80000000,
sgot->contents + MIPS_ELF_GOT_SIZE (output_bfd));
}
- }
- if (sgot != NULL)
- elf_section_data (sgot->output_section)->this_hdr.sh_entsize
- = MIPS_ELF_GOT_SIZE (output_bfd);
+ elf_section_data (sgot->output_section)->this_hdr.sh_entsize
+ = MIPS_ELF_GOT_SIZE (output_bfd);
+ }
/* Generate dynamic relocations for the non-primary gots. */
if (gg != NULL && gg->next)
@@ -8870,6 +8990,10 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
* (ABI_64_P (output_bfd)
? sizeof (Elf64_Mips_External_Rel)
: sizeof (Elf32_External_Rel)));
+ /* Adjust the section size too. Tools like the prelinker
+ can reasonably expect the values to the same. */
+ elf_section_data (s->output_section)->this_hdr.sh_size
+ = dyn.d_un.d_val;
break;
default:
@@ -9095,7 +9219,7 @@ _bfd_mips_elf_final_write_processing (bfd *abfd,
BFD_ASSERT ((*hdrpp)->bfd_section != NULL);
name = bfd_get_section_name (abfd, (*hdrpp)->bfd_section);
BFD_ASSERT (name != NULL
- && strncmp (name, ".gptab.", sizeof ".gptab." - 1) == 0);
+ && CONST_STRNEQ (name, ".gptab."));
sec = bfd_get_section_by_name (abfd, name + sizeof ".gptab" - 1);
BFD_ASSERT (sec != NULL);
(*hdrpp)->sh_info = elf_section_data (sec)->this_idx;
@@ -9105,8 +9229,7 @@ _bfd_mips_elf_final_write_processing (bfd *abfd,
BFD_ASSERT ((*hdrpp)->bfd_section != NULL);
name = bfd_get_section_name (abfd, (*hdrpp)->bfd_section);
BFD_ASSERT (name != NULL
- && strncmp (name, ".MIPS.content",
- sizeof ".MIPS.content" - 1) == 0);
+ && CONST_STRNEQ (name, ".MIPS.content"));
sec = bfd_get_section_by_name (abfd,
name + sizeof ".MIPS.content" - 1);
BFD_ASSERT (sec != NULL);
@@ -9126,13 +9249,12 @@ _bfd_mips_elf_final_write_processing (bfd *abfd,
BFD_ASSERT ((*hdrpp)->bfd_section != NULL);
name = bfd_get_section_name (abfd, (*hdrpp)->bfd_section);
BFD_ASSERT (name != NULL);
- if (strncmp (name, ".MIPS.events", sizeof ".MIPS.events" - 1) == 0)
+ if (CONST_STRNEQ (name, ".MIPS.events"))
sec = bfd_get_section_by_name (abfd,
name + sizeof ".MIPS.events" - 1);
else
{
- BFD_ASSERT (strncmp (name, ".MIPS.post_rel",
- sizeof ".MIPS.post_rel" - 1) == 0);
+ BFD_ASSERT (CONST_STRNEQ (name, ".MIPS.post_rel"));
sec = bfd_get_section_by_name (abfd,
(name
+ sizeof ".MIPS.post_rel" - 1));
@@ -9149,7 +9271,8 @@ _bfd_mips_elf_final_write_processing (bfd *abfd,
segments. */
int
-_bfd_mips_elf_additional_program_headers (bfd *abfd)
+_bfd_mips_elf_additional_program_headers (bfd *abfd,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
asection *s;
int ret = 0;
@@ -9171,6 +9294,12 @@ _bfd_mips_elf_additional_program_headers (bfd *abfd)
&& bfd_get_section_by_name (abfd, ".mdebug"))
++ret;
+ /* Allocate a PT_NULL header in dynamic objects. See
+ _bfd_mips_elf_modify_segment_map for details. */
+ if (!SGI_COMPAT (abfd)
+ && bfd_get_section_by_name (abfd, ".dynamic"))
+ ++ret;
+
return ret;
}
@@ -9240,15 +9369,18 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
|| (*pm)->p_type == PT_INTERP))
pm = &(*pm)->next;
- amt = sizeof (struct elf_segment_map);
- options_segment = bfd_zalloc (abfd, amt);
- options_segment->next = *pm;
- options_segment->p_type = PT_MIPS_OPTIONS;
- options_segment->p_flags = PF_R;
- options_segment->p_flags_valid = TRUE;
- options_segment->count = 1;
- options_segment->sections[0] = s;
- *pm = options_segment;
+ if (*pm == NULL || (*pm)->p_type != PT_MIPS_OPTIONS)
+ {
+ amt = sizeof (struct elf_segment_map);
+ options_segment = bfd_zalloc (abfd, amt);
+ options_segment->next = *pm;
+ options_segment->p_type = PT_MIPS_OPTIONS;
+ options_segment->p_flags = PF_R;
+ options_segment->p_flags_valid = TRUE;
+ options_segment->count = 1;
+ options_segment->sections[0] = s;
+ *pm = options_segment;
+ }
}
}
else
@@ -9318,8 +9450,18 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
m->p_flags_valid = 1;
}
}
- if (m != NULL
- && m->count == 1 && strcmp (m->sections[0]->name, ".dynamic") == 0)
+ /* GNU/Linux binaries do not need the extended PT_DYNAMIC section.
+ glibc's dynamic linker has traditionally derived the number of
+ tags from the p_filesz field, and sometimes allocates stack
+ arrays of that size. An overly-big PT_DYNAMIC segment can
+ be actively harmful in such cases. Making PT_DYNAMIC contain
+ other sections can also make life hard for the prelinker,
+ which might move one of the other sections to a different
+ PT_LOAD segment. */
+ if (SGI_COMPAT (abfd)
+ && m != NULL
+ && m->count == 1
+ && strcmp (m->sections[0]->name, ".dynamic") == 0)
{
static const char *sec_names[] =
{
@@ -9376,6 +9518,38 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
}
}
+ /* Allocate a spare program header in dynamic objects so that tools
+ like the prelinker can add an extra PT_LOAD entry.
+
+ If the prelinker needs to make room for a new PT_LOAD entry, its
+ standard procedure is to move the first (read-only) sections into
+ the new (writable) segment. However, the MIPS ABI requires
+ .dynamic to be in a read-only segment, and the section will often
+ start within sizeof (ElfNN_Phdr) bytes of the last program header.
+
+ Although the prelinker could in principle move .dynamic to a
+ writable segment, it seems better to allocate a spare program
+ header instead, and avoid the need to move any sections.
+ There is a long tradition of allocating spare dynamic tags,
+ so allocating a spare program header seems like a natural
+ extension. */
+ if (!SGI_COMPAT (abfd)
+ && bfd_get_section_by_name (abfd, ".dynamic"))
+ {
+ for (pm = &elf_tdata (abfd)->segment_map; *pm != NULL; pm = &(*pm)->next)
+ if ((*pm)->p_type == PT_NULL)
+ break;
+ if (*pm == NULL)
+ {
+ m = bfd_zalloc (abfd, sizeof (*m));
+ if (m == NULL)
+ return FALSE;
+
+ m->p_type = PT_NULL;
+ *pm = m;
+ }
+ }
+
return TRUE;
}
@@ -9384,7 +9558,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd,
asection *
_bfd_mips_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info,
Elf_Internal_Rela *rel,
struct elf_link_hash_entry *h,
Elf_Internal_Sym *sym)
@@ -9392,32 +9566,14 @@ _bfd_mips_elf_gc_mark_hook (asection *sec,
/* ??? Do mips16 stub sections need to be handled special? */
if (h != NULL)
- {
- switch (ELF_R_TYPE (sec->owner, rel->r_info))
- {
- case R_MIPS_GNU_VTINHERIT:
- case R_MIPS_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
+ switch (ELF_R_TYPE (sec->owner, rel->r_info))
+ {
+ case R_MIPS_GNU_VTINHERIT:
+ case R_MIPS_GNU_VTENTRY:
+ return NULL;
+ }
- return NULL;
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got entry reference counts for the section being removed. */
@@ -9512,7 +9668,7 @@ _bfd_mips_elf_hide_symbol (struct bfd_link_info *info,
dynobj = elf_hash_table (info)->dynobj;
if (dynobj != NULL && force_local && h->root.type != STT_TLS
- && (got = mips_elf_got_section (dynobj, FALSE)) != NULL
+ && (got = mips_elf_got_section (dynobj, TRUE)) != NULL
&& (g = mips_elf_section_data (got)->u.got_info) != NULL)
{
if (g->next)
@@ -9637,8 +9793,9 @@ _bfd_mips_elf_ignore_discarded_relocs (asection *sec)
}
bfd_boolean
-_bfd_mips_elf_write_section (bfd *output_bfd, asection *sec,
- bfd_byte *contents)
+_bfd_mips_elf_write_section (bfd *output_bfd,
+ struct bfd_link_info *link_info ATTRIBUTE_UNUSED,
+ asection *sec, bfd_byte *contents)
{
bfd_byte *to, *from, *end;
int i;
@@ -10437,7 +10594,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info)
mdebug_sec = o;
}
- if (strncmp (o->name, ".gptab.", sizeof ".gptab." - 1) == 0)
+ if (CONST_STRNEQ (o->name, ".gptab."))
{
const char *subname;
unsigned int c;
@@ -10815,6 +10972,112 @@ mips_32bit_flags_p (flagword flags)
}
+/* Merge object attributes from IBFD into OBFD. Raise an error if
+ there are conflicting attributes. */
+static bfd_boolean
+mips_elf_merge_obj_attributes (bfd *ibfd, bfd *obfd)
+{
+ obj_attribute *in_attr;
+ obj_attribute *out_attr;
+
+ if (!elf_known_obj_attributes_proc (obfd)[0].i)
+ {
+ /* This is the first object. Copy the attributes. */
+ _bfd_elf_copy_obj_attributes (ibfd, obfd);
+
+ /* Use the Tag_null value to indicate the attributes have been
+ initialized. */
+ elf_known_obj_attributes_proc (obfd)[0].i = 1;
+
+ return TRUE;
+ }
+
+ /* Check for conflicting Tag_GNU_MIPS_ABI_FP attributes and merge
+ non-conflicting ones. */
+ in_attr = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU];
+ out_attr = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU];
+ if (in_attr[Tag_GNU_MIPS_ABI_FP].i != out_attr[Tag_GNU_MIPS_ABI_FP].i)
+ {
+ out_attr[Tag_GNU_MIPS_ABI_FP].type = 1;
+ if (out_attr[Tag_GNU_MIPS_ABI_FP].i == 0)
+ out_attr[Tag_GNU_MIPS_ABI_FP].i = in_attr[Tag_GNU_MIPS_ABI_FP].i;
+ else if (in_attr[Tag_GNU_MIPS_ABI_FP].i == 0)
+ ;
+ else if (in_attr[Tag_GNU_MIPS_ABI_FP].i > 3)
+ _bfd_error_handler
+ (_("Warning: %B uses unknown floating point ABI %d"), ibfd,
+ in_attr[Tag_GNU_MIPS_ABI_FP].i);
+ else if (out_attr[Tag_GNU_MIPS_ABI_FP].i > 3)
+ _bfd_error_handler
+ (_("Warning: %B uses unknown floating point ABI %d"), obfd,
+ out_attr[Tag_GNU_MIPS_ABI_FP].i);
+ else
+ switch (out_attr[Tag_GNU_MIPS_ABI_FP].i)
+ {
+ case 1:
+ switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
+ {
+ case 2:
+ _bfd_error_handler
+ (_("Warning: %B uses -msingle-float, %B uses -mdouble-float"),
+ obfd, ibfd);
+
+ case 3:
+ _bfd_error_handler
+ (_("Warning: %B uses hard float, %B uses soft float"),
+ obfd, ibfd);
+ break;
+
+ default:
+ abort ();
+ }
+ break;
+
+ case 2:
+ switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
+ {
+ case 1:
+ _bfd_error_handler
+ (_("Warning: %B uses -msingle-float, %B uses -mdouble-float"),
+ ibfd, obfd);
+
+ case 3:
+ _bfd_error_handler
+ (_("Warning: %B uses hard float, %B uses soft float"),
+ obfd, ibfd);
+ break;
+
+ default:
+ abort ();
+ }
+ break;
+
+ case 3:
+ switch (in_attr[Tag_GNU_MIPS_ABI_FP].i)
+ {
+ case 1:
+ case 2:
+ _bfd_error_handler
+ (_("Warning: %B uses hard float, %B uses soft float"),
+ ibfd, obfd);
+ break;
+
+ default:
+ abort ();
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+
+ /* Merge Tag_compatibility attributes and any common GNU ones. */
+ _bfd_elf_merge_object_attributes (ibfd, obfd);
+
+ return TRUE;
+}
+
/* Merge backend specific data from an object file to the output
object file when linking. */
@@ -10848,6 +11111,9 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
return FALSE;
}
+ if (!mips_elf_merge_obj_attributes (ibfd, obfd))
+ return FALSE;
+
new_flags = elf_elfheader (ibfd)->e_flags;
elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_NOREORDER;
old_flags = elf_elfheader (obfd)->e_flags;
@@ -10860,7 +11126,9 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, bfd *obfd)
= elf_elfheader (ibfd)->e_ident[EI_CLASS];
if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
- && bfd_get_arch_info (obfd)->the_default)
+ && (bfd_get_arch_info (obfd)->the_default
+ || mips_mach_extends_p (bfd_get_mach (obfd),
+ bfd_get_mach (ibfd))))
{
if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
bfd_get_mach (ibfd)))
@@ -11071,37 +11339,52 @@ _bfd_mips_elf_print_private_bfd_data (bfd *abfd, void *ptr)
fprintf (file, _(" [no abi set]"));
if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_1)
- fprintf (file, _(" [mips1]"));
+ fprintf (file, " [mips1]");
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_2)
- fprintf (file, _(" [mips2]"));
+ fprintf (file, " [mips2]");
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_3)
- fprintf (file, _(" [mips3]"));
+ fprintf (file, " [mips3]");
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_4)
- fprintf (file, _(" [mips4]"));
+ fprintf (file, " [mips4]");
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_5)
- fprintf (file, _(" [mips5]"));
+ fprintf (file, " [mips5]");
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32)
- fprintf (file, _(" [mips32]"));
+ fprintf (file, " [mips32]");
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64)
- fprintf (file, _(" [mips64]"));
+ fprintf (file, " [mips64]");
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32R2)
- fprintf (file, _(" [mips32r2]"));
+ fprintf (file, " [mips32r2]");
else if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64R2)
- fprintf (file, _(" [mips64r2]"));
+ fprintf (file, " [mips64r2]");
else
fprintf (file, _(" [unknown ISA]"));
if (elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH_ASE_MDMX)
- fprintf (file, _(" [mdmx]"));
+ fprintf (file, " [mdmx]");
if (elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH_ASE_M16)
- fprintf (file, _(" [mips16]"));
+ fprintf (file, " [mips16]");
if (elf_elfheader (abfd)->e_flags & EF_MIPS_32BITMODE)
- fprintf (file, _(" [32bitmode]"));
+ fprintf (file, " [32bitmode]");
else
fprintf (file, _(" [not 32bitmode]"));
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_NOREORDER)
+ fprintf (file, " [noreorder]");
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_PIC)
+ fprintf (file, " [PIC]");
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_CPIC)
+ fprintf (file, " [CPIC]");
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_XGOT)
+ fprintf (file, " [XGOT]");
+
+ if (elf_elfheader (abfd)->e_flags & EF_MIPS_UCODE)
+ fprintf (file, " [UCODE]");
+
fputc ('\n', file);
return TRUE;
@@ -11109,24 +11392,34 @@ _bfd_mips_elf_print_private_bfd_data (bfd *abfd, void *ptr)
const struct bfd_elf_special_section _bfd_mips_elf_special_sections[] =
{
- { ".lit4", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".lit8", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".mdebug", 7, 0, SHT_MIPS_DEBUG, 0 },
- { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
- { ".ucode", 6, 0, SHT_MIPS_UCODE, 0 },
- { NULL, 0, 0, 0, 0 }
+ { STRING_COMMA_LEN (".lit4"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { STRING_COMMA_LEN (".lit8"), 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { STRING_COMMA_LEN (".mdebug"), 0, SHT_MIPS_DEBUG, 0 },
+ { STRING_COMMA_LEN (".sbss"), -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { STRING_COMMA_LEN (".sdata"), -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL },
+ { STRING_COMMA_LEN (".ucode"), 0, SHT_MIPS_UCODE, 0 },
+ { NULL, 0, 0, 0, 0 }
};
-/* Ensure that the STO_OPTIONAL flag is copied into h->other,
- even if this is not a defintion of the symbol. */
+/* Merge non visibility st_other attributes. Ensure that the
+ STO_OPTIONAL flag is copied into h->other, even if this is not a
+ definiton of the symbol. */
void
_bfd_mips_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
const Elf_Internal_Sym *isym,
bfd_boolean definition,
bfd_boolean dynamic ATTRIBUTE_UNUSED)
{
- if (! definition
+ if ((isym->st_other & ~ELF_ST_VISIBILITY (-1)) != 0)
+ {
+ unsigned char other;
+
+ other = (definition ? isym->st_other : h->other);
+ other &= ~ELF_ST_VISIBILITY (-1);
+ h->other = other | ELF_ST_VISIBILITY (h->other);
+ }
+
+ if (!definition
&& ELF_MIPS_IS_OPTIONAL (isym->st_other))
h->other |= STO_OPTIONAL;
}
@@ -11138,3 +11431,11 @@ _bfd_mips_elf_ignore_undef_symbol (struct elf_link_hash_entry *h)
{
return ELF_MIPS_IS_OPTIONAL (h->other) ? TRUE : FALSE;
}
+
+bfd_boolean
+_bfd_mips_elf_common_definition (Elf_Internal_Sym *sym)
+{
+ return (sym->st_shndx == SHN_COMMON
+ || sym->st_shndx == SHN_MIPS_ACOMMON
+ || sym->st_shndx == SHN_MIPS_SCOMMON);
+}
diff --git a/contrib/binutils/bfd/elfxx-mips.h b/contrib/binutils/bfd/elfxx-mips.h
index 6c3c9a3..3e97cc0 100644
--- a/contrib/binutils/bfd/elfxx-mips.h
+++ b/contrib/binutils/bfd/elfxx-mips.h
@@ -1,5 +1,6 @@
/* MIPS ELF specific backend routines.
- Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -68,7 +69,7 @@ extern bfd_boolean _bfd_mips_elf_finish_dynamic_sections
extern void _bfd_mips_elf_final_write_processing
(bfd *, bfd_boolean);
extern int _bfd_mips_elf_additional_program_headers
- (bfd *);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean _bfd_mips_elf_modify_segment_map
(bfd *, struct bfd_link_info *);
extern asection * _bfd_mips_elf_gc_mark_hook
@@ -108,7 +109,7 @@ extern bfd_boolean _bfd_mips_elf_print_private_bfd_data
extern bfd_boolean _bfd_mips_elf_discard_info
(bfd *, struct elf_reloc_cookie *, struct bfd_link_info *);
extern bfd_boolean _bfd_mips_elf_write_section
- (bfd *, asection *, bfd_byte *);
+ (bfd *, struct bfd_link_info *, asection *, bfd_byte *);
extern bfd_boolean _bfd_mips_elf_read_ecoff_info
(bfd *, asection *, struct ecoff_debug_info *);
@@ -141,6 +142,9 @@ extern bfd_boolean _bfd_mips_elf_ignore_undef_symbol
extern const struct bfd_elf_special_section _bfd_mips_elf_special_sections [];
+extern bfd_boolean _bfd_mips_elf_common_definition (Elf_Internal_Sym *);
+
+#define elf_backend_common_definition _bfd_mips_elf_common_definition
#define elf_backend_name_local_section_symbols \
_bfd_mips_elf_name_local_section_symbols
#define elf_backend_special_sections _bfd_mips_elf_special_sections
diff --git a/contrib/binutils/bfd/elfxx-sparc.c b/contrib/binutils/bfd/elfxx-sparc.c
index ef7ff48..708af29 100644
--- a/contrib/binutils/bfd/elfxx-sparc.c
+++ b/contrib/binutils/bfd/elfxx-sparc.c
@@ -1,5 +1,5 @@
/* SPARC-specific support for ELF
- Copyright 2005, 2006 Free Software Foundation, Inc.
+ Copyright 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@
/* This file handles functionality common to the different SPARC ABI's. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "libiberty.h"
@@ -385,6 +385,30 @@ _bfd_sparc_elf_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
}
reloc_howto_type *
+_bfd_sparc_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < (sizeof (_bfd_sparc_elf_howto_table)
+ / sizeof (_bfd_sparc_elf_howto_table[0]));
+ i++)
+ if (_bfd_sparc_elf_howto_table[i].name != NULL
+ && strcasecmp (_bfd_sparc_elf_howto_table[i].name, r_name) == 0)
+ return &_bfd_sparc_elf_howto_table[i];
+
+ if (strcasecmp (sparc_vtinherit_howto.name, r_name) == 0)
+ return &sparc_vtinherit_howto;
+ if (strcasecmp (sparc_vtentry_howto.name, r_name) == 0)
+ return &sparc_vtentry_howto;
+ if (strcasecmp (sparc_rev32_howto.name, r_name) == 0)
+ return &sparc_rev32_howto;
+
+ return NULL;
+}
+
+reloc_howto_type *
_bfd_sparc_elf_info_to_howto_ptr (unsigned int r_type)
{
switch (r_type)
@@ -487,11 +511,14 @@ struct _bfd_sparc_elf_obj_tdata
bfd_boolean
_bfd_sparc_elf_mkobject (bfd *abfd)
{
- bfd_size_type amt = sizeof (struct _bfd_sparc_elf_obj_tdata);
- abfd->tdata.any = bfd_zalloc (abfd, amt);
if (abfd->tdata.any == NULL)
- return FALSE;
- return TRUE;
+ {
+ bfd_size_type amt = sizeof (struct _bfd_sparc_elf_obj_tdata);
+ abfd->tdata.any = bfd_zalloc (abfd, amt);
+ if (abfd->tdata.any == NULL)
+ return FALSE;
+ }
+ return bfd_elf_mkobject (abfd);
}
static void
@@ -507,27 +534,14 @@ sparc_put_word_64 (bfd *bfd, bfd_vma val, void *ptr)
}
static void
-sparc_elf_append_rela_64 (bfd *abfd ATTRIBUTE_UNUSED,
- asection *s ATTRIBUTE_UNUSED,
- Elf_Internal_Rela *rel ATTRIBUTE_UNUSED)
+sparc_elf_append_rela (bfd *abfd, asection *s, Elf_Internal_Rela *rel)
{
-#ifdef BFD64
- Elf64_External_Rela *loc64;
-
- loc64 = (Elf64_External_Rela *) s->contents;
- loc64 += s->reloc_count++;
- bfd_elf64_swap_reloca_out (abfd, rel, (bfd_byte *) loc64);
-#endif
-}
-
-static void
-sparc_elf_append_rela_32 (bfd *abfd, asection *s, Elf_Internal_Rela *rel)
-{
- Elf32_External_Rela *loc32;
+ const struct elf_backend_data *bed;
+ bfd_byte *loc;
- loc32 = (Elf32_External_Rela *) s->contents;
- loc32 += s->reloc_count++;
- bfd_elf32_swap_reloca_out (abfd, rel, (bfd_byte *) loc32);
+ bed = get_elf_backend_data (abfd);
+ loc = s->contents + (s->reloc_count++ * bed->s->sizeof_rela);
+ bed->s->swap_reloca_out (abfd, rel, loc);
}
static bfd_vma
@@ -746,9 +760,6 @@ static const bfd_vma sparc_vxworks_shared_plt_entry[] =
#define SPARC_ELF_PUT_WORD(htab, bfd, val, ptr) \
htab->put_word(bfd, val, ptr)
-#define SPARC_ELF_APPEND_RELA(htab, bfd, sec, rela) \
- htab->append_rela(bfd, sec, rela)
-
#define SPARC_ELF_R_INFO(htab, in_rel, index, type) \
htab->r_info(in_rel, index, type)
@@ -824,7 +835,6 @@ _bfd_sparc_elf_link_hash_table_create (bfd *abfd)
if (ABI_64_P (abfd))
{
ret->put_word = sparc_put_word_64;
- ret->append_rela = sparc_elf_append_rela_64;
ret->r_info = sparc_elf_r_info_64;
ret->r_symndx = sparc_elf_r_symndx_64;
ret->dtpoff_reloc = R_SPARC_TLS_DTPOFF64;
@@ -840,7 +850,6 @@ _bfd_sparc_elf_link_hash_table_create (bfd *abfd)
else
{
ret->put_word = sparc_put_word_32;
- ret->append_rela = sparc_elf_append_rela_32;
ret->r_info = sparc_elf_r_info_32;
ret->r_symndx = sparc_elf_r_symndx_32;
ret->dtpoff_reloc = R_SPARC_TLS_DTPOFF32;
@@ -1427,7 +1436,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info,
if (name == NULL)
return FALSE;
- BFD_ASSERT (strncmp (name, ".rela", 5) == 0
+ BFD_ASSERT (CONST_STRNEQ (name, ".rela")
&& strcmp (bfd_get_section_name (abfd, sec),
name + 5) == 0);
@@ -1529,35 +1538,14 @@ _bfd_sparc_elf_gc_mark_hook (asection *sec,
Elf_Internal_Sym *sym)
{
if (h != NULL)
- {
- struct _bfd_sparc_elf_link_hash_table *htab;
-
- htab = _bfd_sparc_elf_hash_table (info);
- switch (SPARC_ELF_R_TYPE (rel->r_info))
+ switch (SPARC_ELF_R_TYPE (rel->r_info))
{
case R_SPARC_GNU_VTINHERIT:
case R_SPARC_GNU_VTENTRY:
- break;
-
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
+ return NULL;
}
- }
- else
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- return NULL;
+ return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym);
}
/* Update the got entry reference counts for the section being removed. */
@@ -1713,7 +1701,6 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
struct _bfd_sparc_elf_link_hash_entry * eh;
struct _bfd_sparc_elf_dyn_relocs *p;
asection *s;
- unsigned int power_of_two;
htab = _bfd_sparc_elf_hash_table (info);
@@ -1830,29 +1817,9 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info,
h->needs_copy = 1;
}
- /* 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 > htab->align_power_max)
- power_of_two = htab->align_power_max;
-
- /* Apply the required alignment. */
s = htab->sdynbss;
- s->size = BFD_ALIGN (s->size, (bfd_size_type) (1 << power_of_two));
- if (power_of_two > bfd_get_section_alignment (dynobj, s))
- {
- if (! bfd_set_section_alignment (dynobj, s, power_of_two))
- return FALSE;
- }
-
- /* Define the symbol as being at this point in the section. */
- h->root.u.def.section = s;
- h->root.u.def.value = s->size;
-
- /* Increment the section size to make room for the symbol. */
- s->size += h->size;
- return TRUE;
+ return _bfd_elf_adjust_dynamic_copy (h, s);
}
/* Allocate space in .plt, .got and associated reloc sections for
@@ -2287,7 +2254,7 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
/* Strip this section if we don't need it; see the
comment below. */
}
- else if (strncmp (s->name, ".rela", 5) == 0)
+ else if (CONST_STRNEQ (s->name, ".rela"))
{
if (s->size != 0)
{
@@ -2434,13 +2401,16 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
bfd_boolean
_bfd_sparc_elf_new_section_hook (bfd *abfd, asection *sec)
{
- struct _bfd_sparc_elf_section_data *sdata;
- bfd_size_type amt = sizeof (*sdata);
+ if (!sec->used_by_bfd)
+ {
+ struct _bfd_sparc_elf_section_data *sdata;
+ bfd_size_type amt = sizeof (*sdata);
- sdata = (struct _bfd_sparc_elf_section_data *) bfd_zalloc (abfd, amt);
- if (sdata == NULL)
- return FALSE;
- sec->used_by_bfd = (PTR) sdata;
+ sdata = bfd_zalloc (abfd, amt);
+ if (sdata == NULL)
+ return FALSE;
+ sec->used_by_bfd = sdata;
+ }
return _bfd_elf_new_section_hook (abfd, sec);
}
@@ -2486,10 +2456,14 @@ tpoff (struct bfd_link_info *info, bfd_vma address)
/* Relocate a SPARC ELF section. */
bfd_boolean
-_bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
- bfd *input_bfd, asection *input_section,
- bfd_byte *contents, Elf_Internal_Rela *relocs,
- Elf_Internal_Sym *local_syms, asection **local_sections)
+_bfd_sparc_elf_relocate_section (bfd *output_bfd,
+ struct bfd_link_info *info,
+ bfd *input_bfd,
+ asection *input_section,
+ bfd_byte *contents,
+ Elf_Internal_Rela *relocs,
+ Elf_Internal_Sym *local_syms,
+ asection **local_sections)
{
struct _bfd_sparc_elf_link_hash_table *htab;
Elf_Internal_Shdr *symtab_hdr;
@@ -2501,9 +2475,6 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
Elf_Internal_Rela *relend;
int num_relocs;
- if (info->relocatable)
- return TRUE;
-
htab = _bfd_sparc_elf_hash_table (info);
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (input_bfd);
@@ -2547,7 +2518,6 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
howto = _bfd_sparc_elf_howto_table + r_type;
- /* This is a final link. */
r_symndx = SPARC_ELF_R_SYMNDX (htab, rel->r_info);
h = NULL;
sym = NULL;
@@ -2579,6 +2549,21 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
}
+ if (sec != NULL && elf_discarded_section (sec))
+ {
+ /* For relocs against symbols from removed linkonce
+ sections, or sections discarded by a linker script, we
+ just want the section contents zeroed. Avoid any
+ special processing. */
+ _bfd_clear_contents (howto, input_bfd, contents + rel->r_offset);
+ rel->r_info = 0;
+ rel->r_addend = 0;
+ continue;
+ }
+
+ if (info->relocatable)
+ continue;
+
switch (r_type)
{
case R_SPARC_GOT10:
@@ -2660,7 +2645,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
0, R_SPARC_RELATIVE);
outrel.r_addend = relocation;
relocation = 0;
- SPARC_ELF_APPEND_RELA (htab, output_bfd, s, &outrel);
+ sparc_elf_append_rela (output_bfd, s, &outrel);
}
SPARC_ELF_PUT_WORD (htab, output_bfd, relocation,
@@ -2767,11 +2752,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
case R_SPARC_L44:
case R_SPARC_UA64:
r_sparc_plt32:
- /* 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
- || (input_section->flags & SEC_ALLOC) == 0)
+ if ((input_section->flags & SEC_ALLOC) == 0)
break;
if ((info->shared
@@ -2879,6 +2860,8 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
long indx;
+ outrel.r_addend = relocation + rel->r_addend;
+
if (is_plt)
sec = htab->splt;
@@ -2893,9 +2876,20 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
{
asection *osec;
+ /* We are turning this relocation into one
+ against a section symbol. It would be
+ proper to subtract the symbol's value,
+ osec->vma, from the emitted reloc addend,
+ but ld.so expects buggy relocs. */
osec = sec->output_section;
indx = elf_section_data (osec)->dynindx;
+ if (indx == 0)
+ {
+ osec = htab->elf.text_index_section;
+ indx = elf_section_data (osec)->dynindx;
+ }
+
/* FIXME: we really should be able to link non-pic
shared libraries. */
if (indx == 0)
@@ -2909,12 +2903,12 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
}
}
- outrel.r_info = SPARC_ELF_R_INFO (htab, rel, indx, r_type);
- outrel.r_addend = relocation + rel->r_addend;
+ outrel.r_info = SPARC_ELF_R_INFO (htab, rel, indx,
+ r_type);
}
}
- SPARC_ELF_APPEND_RELA (htab, output_bfd, sreloc, &outrel);
+ sparc_elf_append_rela (output_bfd, sreloc, &outrel);
/* This reloc will be computed at runtime, so there's no
need to do anything now. */
@@ -3022,7 +3016,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
else
outrel.r_addend = 0;
outrel.r_info = SPARC_ELF_R_INFO (htab, NULL, indx, dr_type);
- SPARC_ELF_APPEND_RELA (htab, output_bfd, htab->srelgot, &outrel);
+ sparc_elf_append_rela (output_bfd, htab->srelgot, &outrel);
if (r_type == R_SPARC_TLS_GD_HI22
|| r_type == R_SPARC_TLS_GD_LO10)
@@ -3043,7 +3037,8 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
outrel.r_info = SPARC_ELF_R_INFO (htab, NULL, indx,
SPARC_ELF_DTPOFF_RELOC (htab));
outrel.r_offset += SPARC_ELF_WORD_BYTES (htab);
- SPARC_ELF_APPEND_RELA (htab, output_bfd, htab->srelgot, &outrel);
+ sparc_elf_append_rela (output_bfd, htab->srelgot,
+ &outrel);
}
}
else if (dr_type == SPARC_ELF_DTPMOD_RELOC (htab))
@@ -3112,7 +3107,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
+ rel->r_addend;
}
- SPARC_ELF_APPEND_RELA (htab, output_bfd, sreloc, &outrel);
+ sparc_elf_append_rela (output_bfd, sreloc, &outrel);
continue;
}
relocation = tpoff (info, relocation);
@@ -3633,9 +3628,11 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd,
{
bfd *dynobj;
struct _bfd_sparc_elf_link_hash_table *htab;
+ const struct elf_backend_data *bed;
htab = _bfd_sparc_elf_hash_table (info);
dynobj = htab->elf.dynobj;
+ bed = get_elf_backend_data (output_bfd);
if (h->plt.offset != (bfd_vma) -1)
{
@@ -3705,18 +3702,8 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd,
thus .plt[4] has corresponding .rela.plt[0] and so on. */
loc = srela->contents;
-#ifdef BFD64
- if (ABI_64_P (output_bfd))
- {
- loc += rela_index * sizeof (Elf64_External_Rela);
- bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
- }
- else
-#endif
- {
- loc += rela_index * sizeof (Elf32_External_Rela);
- bfd_elf32_swap_reloca_out (output_bfd, &rela, loc);
- }
+ loc += rela_index * bed->s->sizeof_rela;
+ bed->s->swap_reloca_out (output_bfd, &rela, loc);
if (!h->def_regular)
{
@@ -3773,7 +3760,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd,
SPARC_ELF_PUT_WORD (htab, output_bfd, 0,
sgot->contents + (h->got.offset & ~(bfd_vma) 1));
- SPARC_ELF_APPEND_RELA (htab, output_bfd, srela, &rela);
+ sparc_elf_append_rela (output_bfd, srela, &rela);
}
if (h->needs_copy)
@@ -3793,7 +3780,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd,
+ h->root.u.def.section->output_offset);
rela.r_info = SPARC_ELF_R_INFO (htab, NULL, h->dynindx, R_SPARC_COPY);
rela.r_addend = 0;
- SPARC_ELF_APPEND_RELA (htab, output_bfd, s, &rela);
+ sparc_elf_append_rela (output_bfd, s, &rela);
}
/* Mark some specially defined symbols as absolute. On VxWorks,
@@ -3809,83 +3796,30 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd,
/* Finish up the dynamic sections. */
-#ifdef BFD64
static bfd_boolean
-sparc64_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
- bfd *dynobj, asection *sdyn,
- asection *splt ATTRIBUTE_UNUSED)
+sparc_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
+ bfd *dynobj, asection *sdyn,
+ asection *splt ATTRIBUTE_UNUSED)
{
- Elf64_External_Dyn *dyncon, *dynconend;
- int stt_regidx = -1;
-
- dyncon = (Elf64_External_Dyn *) sdyn->contents;
- dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->size);
- for (; dyncon < dynconend; dyncon++)
- {
- Elf_Internal_Dyn dyn;
- const char *name;
- bfd_boolean size;
-
- bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn);
-
- switch (dyn.d_tag)
- {
- case DT_PLTGOT: name = ".plt"; size = FALSE; break;
- case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE; break;
- case DT_JMPREL: name = ".rela.plt"; size = FALSE; break;
- case DT_SPARC_REGISTER:
- if (stt_regidx == -1)
- {
- stt_regidx =
- _bfd_elf_link_lookup_local_dynindx (info, output_bfd, -1);
- if (stt_regidx == -1)
- return FALSE;
- }
- dyn.d_un.d_val = stt_regidx++;
- bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
- /* fallthrough */
- default: name = NULL; size = FALSE; break;
- }
-
- if (name != NULL)
- {
- asection *s;
-
- s = bfd_get_section_by_name (output_bfd, name);
- if (s == NULL)
- dyn.d_un.d_val = 0;
- else
- {
- if (! size)
- dyn.d_un.d_ptr = s->vma;
- else
- dyn.d_un.d_val = s->size;
- }
- bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
- }
- }
- return TRUE;
-}
-#endif
-
-static bfd_boolean
-sparc32_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
- bfd *dynobj, asection *sdyn,
- asection *splt ATTRIBUTE_UNUSED)
-{
- Elf32_External_Dyn *dyncon, *dynconend;
struct _bfd_sparc_elf_link_hash_table *htab;
+ const struct elf_backend_data *bed;
+ bfd_byte *dyncon, *dynconend;
+ size_t dynsize;
+ int stt_regidx = -1;
+ bfd_boolean abi_64_p;
htab = _bfd_sparc_elf_hash_table (info);
- dyncon = (Elf32_External_Dyn *) sdyn->contents;
- dynconend = (Elf32_External_Dyn *) (sdyn->contents + sdyn->size);
- for (; dyncon < dynconend; dyncon++)
+ bed = get_elf_backend_data (output_bfd);
+ dynsize = bed->s->sizeof_dyn;
+ dynconend = sdyn->contents + sdyn->size;
+ abi_64_p = ABI_64_P (output_bfd);
+ for (dyncon = sdyn->contents; dyncon < dynconend; dyncon += dynsize)
{
Elf_Internal_Dyn dyn;
const char *name;
bfd_boolean size;
- bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn);
+ bed->s->swap_dyn_in (dynobj, dyncon, &dyn);
if (htab->is_vxworks && dyn.d_tag == DT_RELASZ)
{
@@ -3894,7 +3828,7 @@ sparc32_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
if (htab->srelplt)
{
dyn.d_un.d_val -= htab->srelplt->size;
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ bed->s->swap_dyn_out (output_bfd, &dyn, dyncon);
}
}
else if (htab->is_vxworks && dyn.d_tag == DT_PLTGOT)
@@ -3905,9 +3839,21 @@ sparc32_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
{
dyn.d_un.d_val = (htab->sgotplt->output_section->vma
+ htab->sgotplt->output_offset);
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ bed->s->swap_dyn_out (output_bfd, &dyn, dyncon);
}
}
+ else if (abi_64_p && dyn.d_tag == DT_SPARC_REGISTER)
+ {
+ if (stt_regidx == -1)
+ {
+ stt_regidx =
+ _bfd_elf_link_lookup_local_dynindx (info, output_bfd, -1);
+ if (stt_regidx == -1)
+ return FALSE;
+ }
+ dyn.d_un.d_val = stt_regidx++;
+ bed->s->swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
else
{
switch (dyn.d_tag)
@@ -3915,7 +3861,7 @@ sparc32_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
case DT_PLTGOT: name = ".plt"; size = FALSE; break;
case DT_PLTRELSZ: name = ".rela.plt"; size = TRUE; break;
case DT_JMPREL: name = ".rela.plt"; size = FALSE; break;
- default: name = NULL; size = FALSE; break;
+ default: name = NULL; size = FALSE; break;
}
if (name != NULL)
@@ -3932,7 +3878,7 @@ sparc32_finish_dyn (bfd *output_bfd, struct bfd_link_info *info,
else
dyn.d_un.d_val = s->size;
}
- bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);
+ bed->s->swap_dyn_out (output_bfd, &dyn, dyncon);
}
}
}
@@ -4046,20 +3992,12 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i
if (elf_hash_table (info)->dynamic_sections_created)
{
asection *splt;
- bfd_boolean ret;
splt = bfd_get_section_by_name (dynobj, ".plt");
BFD_ASSERT (splt != NULL && sdyn != NULL);
-#ifdef BFD64
- if (ABI_64_P (output_bfd))
- ret = sparc64_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
- else
-#endif
- ret = sparc32_finish_dyn (output_bfd, info, dynobj, sdyn, splt);
-
- if (ret != TRUE)
- return ret;
+ if (!sparc_finish_dyn (output_bfd, info, dynobj, sdyn, splt))
+ return FALSE;
/* Initialize the contents of the .plt section. */
if (splt->size > 0)
@@ -4081,7 +4019,8 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i
}
elf_section_data (splt->output_section)->this_hdr.sh_entsize
- = htab->plt_entry_size;
+ = (htab->is_vxworks || !ABI_64_P (output_bfd))
+ ? 0 : htab->plt_entry_size;
}
/* Set the first entry in the global offset table to the address of
diff --git a/contrib/binutils/bfd/elfxx-sparc.h b/contrib/binutils/bfd/elfxx-sparc.h
index 0a5a88b..787fd33 100644
--- a/contrib/binutils/bfd/elfxx-sparc.h
+++ b/contrib/binutils/bfd/elfxx-sparc.h
@@ -1,5 +1,5 @@
/* SPARC ELF specific backend routines.
- Copyright 2005 Free Software Foundation, Inc.
+ Copyright 2005, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -71,7 +71,6 @@ struct _bfd_sparc_elf_link_hash_table
asection *sgotplt;
void (*put_word) (bfd *, bfd_vma, void *);
- void (*append_rela) (bfd *, asection *, Elf_Internal_Rela *);
bfd_vma (*r_info) (Elf_Internal_Rela *, bfd_vma, bfd_vma);
bfd_vma (*r_symndx) (bfd_vma);
int (*build_plt_entry) (bfd *, asection *, bfd_vma, bfd_vma, bfd_vma *);
@@ -97,6 +96,8 @@ struct _bfd_sparc_elf_link_hash_table
extern reloc_howto_type *_bfd_sparc_elf_reloc_type_lookup
(bfd *, bfd_reloc_code_real_type);
+extern reloc_howto_type *_bfd_sparc_elf_reloc_name_lookup
+ (bfd *, const char *);
extern void _bfd_sparc_elf_info_to_howto
(bfd *, arelent *, Elf_Internal_Rela *);
extern reloc_howto_type *_bfd_sparc_elf_info_to_howto_ptr
diff --git a/contrib/binutils/bfd/elfxx-target.h b/contrib/binutils/bfd/elfxx-target.h
index 503726d..be0cfec 100644
--- a/contrib/binutils/bfd/elfxx-target.h
+++ b/contrib/binutils/bfd/elfxx-target.h
@@ -29,7 +29,9 @@
#ifndef bfd_elfNN_close_and_cleanup
#define bfd_elfNN_close_and_cleanup _bfd_elf_close_and_cleanup
#endif
-#define bfd_elfNN_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
+#ifndef bfd_elfNN_bfd_free_cached_info
+#define bfd_elfNN_bfd_free_cached_info _bfd_free_cached_info
+#endif
#ifndef bfd_elfNN_get_section_contents
#define bfd_elfNN_get_section_contents _bfd_generic_get_section_contents
#endif
@@ -101,6 +103,9 @@
#ifndef elf_backend_want_p_paddr_set_to_zero
#define elf_backend_want_p_paddr_set_to_zero 0
#endif
+#ifndef elf_backend_default_execstack
+#define elf_backend_default_execstack 1
+#endif
#define bfd_elfNN_bfd_debug_info_start bfd_void
#define bfd_elfNN_bfd_debug_info_end bfd_void
@@ -129,7 +134,10 @@
#define elf_backend_gc_mark_dynamic_ref bfd_elf_gc_mark_dynamic_ref_symbol
#endif
#ifndef elf_backend_gc_mark_hook
-#define elf_backend_gc_mark_hook NULL
+#define elf_backend_gc_mark_hook _bfd_elf_gc_mark_hook
+#endif
+#ifndef elf_backend_gc_mark_extra_sections
+#define elf_backend_gc_mark_extra_sections NULL
#endif
#ifndef elf_backend_gc_sweep_hook
#define elf_backend_gc_sweep_hook NULL
@@ -283,6 +291,10 @@
#define elf_info_to_howto_rel 0
#endif
+#ifndef ELF_OSABI
+#define ELF_OSABI ELFOSABI_NONE
+#endif
+
#ifndef ELF_MAXPAGESIZE
#error ELF_MAXPAGESIZE is not defined
#define ELF_MAXPAGESIZE 1
@@ -292,6 +304,10 @@
#define ELF_MINPAGESIZE ELF_MAXPAGESIZE
#endif
+#ifndef ELF_COMMONPAGESIZE
+#define ELF_COMMONPAGESIZE ELF_MAXPAGESIZE
+#endif
+
#ifndef ELF_DYNAMIC_SEC_FLAGS
/* Note that we set the SEC_IN_MEMORY flag for these sections. */
#define ELF_DYNAMIC_SEC_FLAGS \
@@ -366,6 +382,9 @@
#ifndef elf_backend_check_directives
#define elf_backend_check_directives 0
#endif
+#ifndef elf_backend_as_needed_cleanup
+#define elf_backend_as_needed_cleanup 0
+#endif
#ifndef elf_backend_adjust_dynamic_symbol
#define elf_backend_adjust_dynamic_symbol 0
#endif
@@ -375,6 +394,10 @@
#ifndef elf_backend_size_dynamic_sections
#define elf_backend_size_dynamic_sections 0
#endif
+#ifndef elf_backend_init_index_section
+#define elf_backend_init_index_section \
+ ((void (*) (bfd *, struct bfd_link_info *)) bfd_void)
+#endif
#ifndef elf_backend_relocate_section
#define elf_backend_relocate_section 0
#endif
@@ -396,6 +419,9 @@
#ifndef elf_backend_modify_segment_map
#define elf_backend_modify_segment_map 0
#endif
+#ifndef elf_backend_modify_program_headers
+#define elf_backend_modify_program_headers 0
+#endif
#ifndef elf_backend_ecoff_debug_swap
#define elf_backend_ecoff_debug_swap 0
#endif
@@ -405,12 +431,27 @@
#ifndef elf_backend_got_header_size
#define elf_backend_got_header_size 0
#endif
+#ifndef elf_backend_obj_attrs_vendor
+#define elf_backend_obj_attrs_vendor NULL
+#endif
+#ifndef elf_backend_obj_attrs_section
+#define elf_backend_obj_attrs_section NULL
+#endif
+#ifndef elf_backend_obj_attrs_arg_type
+#define elf_backend_obj_attrs_arg_type NULL
+#endif
+#ifndef elf_backend_obj_attrs_section_type
+#define elf_backend_obj_attrs_section_type SHT_GNU_ATTRIBUTES
+#endif
#ifndef elf_backend_post_process_headers
#define elf_backend_post_process_headers NULL
#endif
#ifndef elf_backend_print_symbol_all
#define elf_backend_print_symbol_all NULL
#endif
+#ifndef elf_backend_output_arch_local_syms
+#define elf_backend_output_arch_local_syms NULL
+#endif
#ifndef elf_backend_output_arch_syms
#define elf_backend_output_arch_syms NULL
#endif
@@ -441,6 +482,9 @@
#ifndef elf_backend_grok_psinfo
#define elf_backend_grok_psinfo NULL
#endif
+#ifndef elf_backend_write_core_note
+#define elf_backend_write_core_note NULL
+#endif
#ifndef elf_backend_sprintf_vma
#define elf_backend_sprintf_vma _bfd_elf_sprintf_vma
#endif
@@ -551,15 +595,24 @@
#define elf_backend_merge_symbol NULL
#endif
+#ifndef elf_backend_hash_symbol
+#define elf_backend_hash_symbol _bfd_elf_hash_symbol
+#endif
+
+#ifndef elf_backend_is_function_type
+#define elf_backend_is_function_type _bfd_elf_is_function_type
+#endif
+
extern const struct elf_size_info _bfd_elfNN_size_info;
-#ifndef INCLUDED_TARGET_FILE
-static const struct elf_backend_data elfNN_bed =
+static struct elf_backend_data elfNN_bed =
{
ELF_ARCH, /* arch */
ELF_MACHINE_CODE, /* elf_machine_code */
+ ELF_OSABI, /* elf_osabi */
ELF_MAXPAGESIZE, /* maxpagesize */
ELF_MINPAGESIZE, /* minpagesize */
+ ELF_COMMONPAGESIZE, /* commonpagesize */
ELF_DYNAMIC_SEC_FLAGS, /* dynamic_sec_flags */
elf_info_to_howto,
elf_info_to_howto_rel,
@@ -583,9 +636,11 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_omit_section_dynsym,
elf_backend_check_relocs,
elf_backend_check_directives,
+ elf_backend_as_needed_cleanup,
elf_backend_adjust_dynamic_symbol,
elf_backend_always_size_sections,
elf_backend_size_dynamic_sections,
+ elf_backend_init_index_section,
elf_backend_relocate_section,
elf_backend_finish_dynamic_symbol,
elf_backend_finish_dynamic_sections,
@@ -593,11 +648,14 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_final_write_processing,
elf_backend_additional_program_headers,
elf_backend_modify_segment_map,
+ elf_backend_modify_program_headers,
elf_backend_gc_mark_dynamic_ref,
elf_backend_gc_mark_hook,
+ elf_backend_gc_mark_extra_sections,
elf_backend_gc_sweep_hook,
elf_backend_post_process_headers,
elf_backend_print_symbol_all,
+ elf_backend_output_arch_local_syms,
elf_backend_output_arch_syms,
elf_backend_copy_indirect_symbol,
elf_backend_hide_symbol,
@@ -608,6 +666,7 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_count_relocs,
elf_backend_grok_prstatus,
elf_backend_grok_psinfo,
+ elf_backend_write_core_note,
elf_backend_sprintf_vma,
elf_backend_fprintf_vma,
elf_backend_reloc_type_class,
@@ -628,6 +687,8 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_common_section_index,
elf_backend_common_section,
elf_backend_merge_symbol,
+ elf_backend_hash_symbol,
+ elf_backend_is_function_type,
elf_backend_link_order_error_handler,
elf_backend_relplt_name,
ELF_MACHINE_ALT1,
@@ -635,6 +696,10 @@ static const struct elf_backend_data elfNN_bed =
&elf_backend_size_info,
elf_backend_special_sections,
elf_backend_got_header_size,
+ elf_backend_obj_attrs_vendor,
+ elf_backend_obj_attrs_section,
+ elf_backend_obj_attrs_arg_type,
+ elf_backend_obj_attrs_section_type,
elf_backend_collect,
elf_backend_type_change_ok,
elf_backend_may_use_rel_p,
@@ -651,9 +716,9 @@ static const struct elf_backend_data elfNN_bed =
elf_backend_can_refcount,
elf_backend_want_got_sym,
elf_backend_want_dynbss,
- elf_backend_want_p_paddr_set_to_zero
+ elf_backend_want_p_paddr_set_to_zero,
+ elf_backend_default_execstack
};
-#endif
/* Forward declaration for use when initialising alternative_target field. */
#ifdef TARGET_LITTLE_SYM
diff --git a/contrib/binutils/bfd/format.c b/contrib/binutils/bfd/format.c
index 6a34dd2..5143898 100644
--- a/contrib/binutils/bfd/format.c
+++ b/contrib/binutils/bfd/format.c
@@ -1,6 +1,6 @@
/* Generic BFD support for file formats.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001, 2002,
- 2003, 2005 Free Software Foundation, Inc.
+ 2003, 2005, 2007 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -42,8 +42,8 @@ SUBSECTION
File format functions
*/
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
/* IMPORT from targets.c. */
diff --git a/contrib/binutils/bfd/freebsd.h b/contrib/binutils/bfd/freebsd.h
index 5bc5bbc..67e67fc 100644
--- a/contrib/binutils/bfd/freebsd.h
+++ b/contrib/binutils/bfd/freebsd.h
@@ -1,5 +1,5 @@
/* BFD back-end definitions used by all FreeBSD targets.
- Copyright 1990, 1991, 1992, 1996, 1997, 2000, 2001, 2002, 2005
+ Copyright 1990, 1991, 1992, 1996, 1997, 2000, 2001, 2002, 2005, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -60,8 +60,8 @@
((exec).a_info = \
((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libaout.h"
diff --git a/contrib/binutils/bfd/gen-aout.c b/contrib/binutils/bfd/gen-aout.c
index c81d3d0..80e90c0 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, 2001, 2002
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001, 2002, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -99,8 +99,8 @@ main (argc, argv)
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");
printf("#include \"sysdep.h\"\n");
+ printf("#include \"bfd.h\"\n");
printf("#include \"libbfd.h\"\n");
printf("#include \"libaout.h\"\n");
printf("\n#include \"aout-target.h\"\n");
diff --git a/contrib/binutils/bfd/hash.c b/contrib/binutils/bfd/hash.c
index ce9ba5c6..2b67dc5 100644
--- a/contrib/binutils/bfd/hash.c
+++ b/contrib/binutils/bfd/hash.c
@@ -1,6 +1,6 @@
/* hash.c -- hash table routines for BFD
Copyright 1993, 1994, 1995, 1997, 1999, 2001, 2002, 2003, 2004, 2005,
- 2006 Free Software Foundation, Inc.
+ 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "objalloc.h"
#include "libiberty.h"
@@ -299,6 +299,58 @@ SUBSUBSECTION
/* The default number of entries to use when creating a hash table. */
#define DEFAULT_SIZE 4051
+
+/* The following function returns a nearest prime number which is
+ greater than N, and near a power of two. Copied from libiberty.
+ Returns zero for ridiculously large N to signify an error. */
+
+static unsigned long
+higher_prime_number (unsigned long n)
+{
+ /* These are primes that are near, but slightly smaller than, a
+ power of two. */
+ static const unsigned long primes[] = {
+ (unsigned long) 127,
+ (unsigned long) 2039,
+ (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),
+ };
+
+ const unsigned long *low = &primes[0];
+ const unsigned long *high = &primes[sizeof (primes) / sizeof (primes[0])];
+
+ while (low != high)
+ {
+ const unsigned long *mid = low + (high - low) / 2;
+ if (n >= *mid)
+ low = mid + 1;
+ else
+ high = mid;
+ }
+
+ if (n >= *low)
+ return 0;
+
+ return *low;
+}
+
static size_t bfd_default_hash_table_size = DEFAULT_SIZE;
/* Create a new hash table, given a number of entries. */
@@ -330,6 +382,8 @@ bfd_hash_table_init_n (struct bfd_hash_table *table,
memset ((void *) table->table, 0, alloc);
table->size = size;
table->entsize = entsize;
+ table->count = 0;
+ table->frozen = 0;
table->newfunc = newfunc;
return TRUE;
}
@@ -416,6 +470,45 @@ bfd_hash_lookup (struct bfd_hash_table *table,
hashp->hash = hash;
hashp->next = table->table[index];
table->table[index] = hashp;
+ table->count++;
+
+ if (!table->frozen && table->count > table->size * 3 / 4)
+ {
+ unsigned long newsize = higher_prime_number (table->size);
+ struct bfd_hash_entry **newtable;
+ unsigned int hi;
+ unsigned long alloc = newsize * sizeof (struct bfd_hash_entry *);
+
+ /* If we can't find a higher prime, or we can't possibly alloc
+ that much memory, don't try to grow the table. */
+ if (newsize == 0 || alloc / sizeof (struct bfd_hash_entry *) != newsize)
+ {
+ table->frozen = 1;
+ return hashp;
+ }
+
+ newtable = ((struct bfd_hash_entry **)
+ objalloc_alloc ((struct objalloc *) table->memory, alloc));
+ memset ((PTR) newtable, 0, alloc);
+
+ for (hi = 0; hi < table->size; hi ++)
+ while (table->table[hi])
+ {
+ struct bfd_hash_entry *chain = table->table[hi];
+ struct bfd_hash_entry *chain_end = chain;
+ int index;
+
+ while (chain_end->next && chain_end->next->hash == chain->hash)
+ chain_end = chain_end->next;
+
+ table->table[hi] = chain_end->next;
+ index = chain->hash % newsize;
+ chain_end->next = newtable[index];
+ newtable[index] = chain;
+ }
+ table->table = newtable;
+ table->size = newsize;
+ }
return hashp;
}
@@ -480,14 +573,17 @@ bfd_hash_traverse (struct bfd_hash_table *table,
{
unsigned int i;
+ table->frozen = 1;
for (i = 0; i < table->size; i++)
{
struct bfd_hash_entry *p;
for (p = table->table[i]; p != NULL; p = p->next)
if (! (*func) (p, info))
- return;
+ goto out;
}
+ out:
+ table->frozen = 0;
}
void
diff --git a/contrib/binutils/bfd/host-aout.c b/contrib/binutils/bfd/host-aout.c
index 902a020..12e5951 100644
--- a/contrib/binutils/bfd/host-aout.c
+++ b/contrib/binutils/bfd/host-aout.c
@@ -1,5 +1,5 @@
/* BFD backend for local host's a.out binaries
- Copyright 1990, 1991, 1992, 1994, 1995, 2001
+ Copyright 1990, 1991, 1992, 1994, 1995, 2001, 2007
Free Software Foundation, Inc.
Written by Cygnus Support. Probably John Gilmore's fault.
@@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#define ARCH_SIZE 32
diff --git a/contrib/binutils/bfd/i386aout.c b/contrib/binutils/bfd/i386aout.c
index 128e9d2..936ffb2 100644
--- a/contrib/binutils/bfd/i386aout.c
+++ b/contrib/binutils/bfd/i386aout.c
@@ -1,6 +1,6 @@
/* BFD back-end for i386 a.out binaries.
- Copyright 1990, 1991, 1992, 1994, 1996, 1997, 2001, 2002, 2003, 2005
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1996, 1997, 2001, 2002, 2003, 2005,
+ 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -39,8 +39,8 @@
#define TARGETNAME "a.out-i386"
#define NO_WRITE_HEADER_KLUDGE 1
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "aout/aout64.h"
#include "libaout.h"
diff --git a/contrib/binutils/bfd/i386bsd.c b/contrib/binutils/bfd/i386bsd.c
index 3f98ee4..f8b109e 100644
--- a/contrib/binutils/bfd/i386bsd.c
+++ b/contrib/binutils/bfd/i386bsd.c
@@ -1,5 +1,5 @@
/* BFD back-end for i386 a.out binaries under BSD.
- Copyright 1990, 1991, 1992, 1993, 1994, 2001
+ Copyright 1990, 1991, 1992, 1993, 1994, 2001, 2007
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -42,8 +42,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define MY(OP) CONCAT2 (i386bsd_,OP)
#define TARGETNAME "a.out-i386-bsd"
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libaout.h"
diff --git a/contrib/binutils/bfd/i386linux.c b/contrib/binutils/bfd/i386linux.c
index 17c6180..83f9965 100644
--- a/contrib/binutils/bfd/i386linux.c
+++ b/contrib/binutils/bfd/i386linux.c
@@ -1,6 +1,6 @@
/* BFD back-end for linux flavored i386 a.out binaries.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003,
- 2004, 2006 Free Software Foundation, Inc.
+ 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define MACHTYPE_OK(mtype) ((mtype) == M_386 || (mtype) == M_UNKNOWN)
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
@@ -93,8 +93,7 @@ i386linux_write_object_contents (abfd)
#define GOT_REF_PREFIX "__GOT_"
#endif
-#define IS_GOT_SYM(name) \
- (strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0)
+#define IS_GOT_SYM(name) (CONST_STRNEQ (name, GOT_REF_PREFIX))
/* See if a symbol name is a reference to the procedure linkage table. */
@@ -102,8 +101,7 @@ i386linux_write_object_contents (abfd)
#define PLT_REF_PREFIX "__PLT_"
#endif
-#define IS_PLT_SYM(name) \
- (strncmp (name, PLT_REF_PREFIX, sizeof PLT_REF_PREFIX - 1) == 0)
+#define IS_PLT_SYM(name) (CONST_STRNEQ (name, PLT_REF_PREFIX))
/* This string is used to generate specialized error messages. */
@@ -312,9 +310,8 @@ linux_link_create_dynamic_sections (abfd, info)
/* We choose to use the name ".linux-dynamic" for the fixup table.
Why not? */
- s = bfd_make_section (abfd, ".linux-dynamic");
+ s = bfd_make_section_with_flags (abfd, ".linux-dynamic", flags);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
s->size = 0;
@@ -442,8 +439,7 @@ linux_tally_symbols (h, data)
h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
if (h->root.root.type == bfd_link_hash_undefined
- && strncmp (h->root.root.root.string, NEEDS_SHRLIB,
- sizeof NEEDS_SHRLIB - 1) == 0)
+ && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
{
const char *name;
char *p;
diff --git a/contrib/binutils/bfd/ieee.c b/contrib/binutils/bfd/ieee.c
index be8455c..727869e6 100644
--- a/contrib/binutils/bfd/ieee.c
+++ b/contrib/binutils/bfd/ieee.c
@@ -1,6 +1,6 @@
/* BFD back-end for ieee-695 objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -27,8 +27,8 @@
token (which is one byte in this lexicon) lookahead recursive decent
parser. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "ieee.h"
#include "libieee.h"
@@ -370,7 +370,7 @@ parse_int (common_header_type *ieee, bfd_vma *value_ptr)
static int
parse_i (common_header_type *ieee, bfd_boolean *ok)
{
- bfd_vma x;
+ bfd_vma x = 0;
*ok = parse_int (ieee, &x);
return x;
}
@@ -378,7 +378,7 @@ parse_i (common_header_type *ieee, bfd_boolean *ok)
static bfd_vma
must_parse_int (common_header_type *ieee)
{
- bfd_vma result;
+ bfd_vma result = 0;
BFD_ASSERT (parse_int (ieee, &result));
return result;
}
@@ -767,7 +767,7 @@ ieee_slurp_external_symbols (bfd *abfd)
unsigned int symbol_name_index;
unsigned int symbol_type_index;
unsigned int symbol_attribute_def;
- bfd_vma value;
+ bfd_vma value = 0;
switch (read_2bytes (&ieee->h))
{
@@ -1080,7 +1080,6 @@ get_section_entry (bfd *abfd, ieee_data_type *ieee, unsigned int index)
sprintf (tmp, " fsec%4d", index);
section = bfd_make_section (abfd, tmp);
ieee->section_table[index] = section;
- section->flags = SEC_NO_FLAGS;
section->target_index = index;
ieee->section_table[index] = section;
}
@@ -1268,14 +1267,15 @@ ieee_slurp_debug (bfd *abfd)
ieee_data_type *ieee = IEEE_DATA (abfd);
asection *sec;
file_ptr debug_end;
+ flagword flags;
if (ieee->w.r.debug_information_part == 0)
return TRUE;
- sec = bfd_make_section (abfd, ".debug");
+ flags = SEC_DEBUGGING | SEC_HAS_CONTENTS;
+ sec = bfd_make_section_with_flags (abfd, ".debug", flags);
if (sec == NULL)
return FALSE;
- sec->flags |= SEC_DEBUGGING | SEC_HAS_CONTENTS;
sec->filepos = ieee->w.r.debug_information_part;
debug_end = ieee_part_after (ieee, ieee->w.r.debug_information_part);
@@ -1875,8 +1875,8 @@ ieee_object_p (bfd *abfd)
family[9] = '\0';
}
}
- else if ((strncmp (processor, "cpu32", 5) == 0) /* CPU32 and CPU32+ */
- || (strncmp (processor, "CPU32", 5) == 0))
+ else if ((CONST_STRNEQ (processor, "cpu32")) /* CPU32 and CPU32+ */
+ || (CONST_STRNEQ (processor, "CPU32")))
strcpy (family, "68332");
else
{
@@ -2014,12 +2014,15 @@ ieee_print_symbol (bfd *abfd,
static bfd_boolean
ieee_new_section_hook (bfd *abfd, asection *newsect)
{
- newsect->used_by_bfd = bfd_alloc (abfd, (bfd_size_type) sizeof (ieee_per_section_type));
if (!newsect->used_by_bfd)
- return FALSE;
+ {
+ newsect->used_by_bfd = bfd_alloc (abfd, sizeof (ieee_per_section_type));
+ if (!newsect->used_by_bfd)
+ return FALSE;
+ }
ieee_per_section (newsect)->data = NULL;
ieee_per_section (newsect)->section = newsect;
- return TRUE;
+ return _bfd_generic_new_section_hook (abfd, newsect);
}
static long
@@ -3712,7 +3715,7 @@ ieee_generic_stat_arch_elt (bfd *abfd, struct stat *buf)
static int
ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean x ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
@@ -3744,6 +3747,7 @@ ieee_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
#define ieee_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
#define ieee_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
+#define ieee_bfd_reloc_name_lookup _bfd_norelocs_bfd_reloc_name_lookup
#define ieee_set_arch_mach _bfd_generic_set_arch_mach
diff --git a/contrib/binutils/bfd/ihex.c b/contrib/binutils/bfd/ihex.c
index fb2ab96..9f765b3 100644
--- a/contrib/binutils/bfd/ihex.c
+++ b/contrib/binutils/bfd/ihex.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel Hex objects.
- Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006, 2007 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.
@@ -118,8 +118,8 @@ The MRI compiler uses this, which is a repeat of type 5:
18..19 Checksum in hex notation
20..21 Carriage return, line feed. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -355,6 +355,7 @@ ihex_scan (bfd *abfd)
char secbuf[20];
char *secname;
bfd_size_type amt;
+ flagword flags;
sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1);
amt = strlen (secbuf) + 1;
@@ -362,10 +363,10 @@ ihex_scan (bfd *abfd)
if (secname == NULL)
goto error_return;
strcpy (secname, secbuf);
- sec = bfd_make_section (abfd, secname);
+ flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
+ sec = bfd_make_section_with_flags (abfd, secname, flags);
if (sec == NULL)
goto error_return;
- sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
sec->vma = extbase + segbase + addr;
sec->lma = extbase + segbase + addr;
sec->size = len;
@@ -553,7 +554,6 @@ ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents)
{
char hdr[8];
unsigned int len;
- bfd_vma addr;
unsigned int type;
unsigned int i;
@@ -568,7 +568,6 @@ ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents)
goto error_return;
len = HEX2 (hdr);
- addr = HEX4 (hdr + 2);
type = HEX2 (hdr + 6);
/* We should only see type 0 records here. */
@@ -900,7 +899,8 @@ ihex_set_arch_mach (bfd *abfd,
/* Get the size of the headers, for the linker. */
static int
-ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUSED)
+ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
@@ -924,9 +924,6 @@ ihex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean exec ATTRIBUTE_UNUS
#define ihex_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define ihex_read_minisymbols _bfd_nosymbols_read_minisymbols
#define ihex_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
-#define ihex_get_reloc_upper_bound ((long (*) (bfd *, asection *)) bfd_0l)
-#define ihex_canonicalize_reloc ((long (*) (bfd *, asection *, arelent **, asymbol **)) bfd_0l)
-#define ihex_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
#define ihex_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define ihex_bfd_relax_section bfd_generic_relax_section
#define ihex_bfd_gc_sections bfd_generic_gc_sections
@@ -985,7 +982,7 @@ const bfd_target ihex_vec =
BFD_JUMP_TABLE_CORE (_bfd_nocore),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (ihex),
- BFD_JUMP_TABLE_RELOCS (ihex),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (ihex),
BFD_JUMP_TABLE_LINK (ihex),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
diff --git a/contrib/binutils/bfd/init.c b/contrib/binutils/bfd/init.c
index a34acbf..49f5533f 100644
--- a/contrib/binutils/bfd/init.c
+++ b/contrib/binutils/bfd/init.c
@@ -1,5 +1,5 @@
/* bfd initialization stuff
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2003
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2003, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
/*
diff --git a/contrib/binutils/bfd/libaout.h b/contrib/binutils/bfd/libaout.h
index bb3ee80..879de13 100644
--- a/contrib/binutils/bfd/libaout.h
+++ b/contrib/binutils/bfd/libaout.h
@@ -1,6 +1,6 @@
/* BFD back-end data structures for a.out (and similar) files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -525,6 +525,9 @@ extern void NAME (aout, swap_std_reloc_in)
extern reloc_howto_type * NAME (aout, reloc_type_lookup)
(bfd *, bfd_reloc_code_real_type);
+extern reloc_howto_type * NAME (aout, reloc_name_lookup)
+ (bfd *, const char *);
+
extern bfd_boolean NAME (aout, slurp_reloc_table)
(bfd *, sec_ptr, asymbol **);
@@ -557,7 +560,7 @@ extern asymbol * NAME (aout, minisymbol_to_symbol)
(bfd *, bfd_boolean, const void *, asymbol *);
extern int NAME (aout, sizeof_headers)
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean NAME (aout, adjust_sizes_and_vmas)
(bfd *, bfd_size_type *, file_ptr *);
diff --git a/contrib/binutils/bfd/libbfd-in.h b/contrib/binutils/bfd/libbfd-in.h
index ee2484f..3555e6a 100644
--- a/contrib/binutils/bfd/libbfd-in.h
+++ b/contrib/binutils/bfd/libbfd-in.h
@@ -2,7 +2,7 @@
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -155,6 +155,8 @@ bfd * _bfd_new_bfd
(void);
void _bfd_delete_bfd
(bfd *);
+bfd_boolean _bfd_free_cached_info
+ (bfd *);
bfd_boolean bfd_false
(bfd *ignore);
@@ -215,8 +217,8 @@ int bfd_generic_stat_arch_elt
#define _bfd_generic_close_and_cleanup bfd_true
#define _bfd_generic_bfd_free_cached_info bfd_true
-#define _bfd_generic_new_section_hook \
- ((bfd_boolean (*) (bfd *, asection *)) bfd_true)
+extern bfd_boolean _bfd_generic_new_section_hook
+ (bfd *, asection *);
extern bfd_boolean _bfd_generic_get_section_contents
(bfd *, asection *, void *, file_ptr, bfd_size_type);
extern bfd_boolean _bfd_generic_get_section_contents_in_window
@@ -346,12 +348,13 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
/* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc
support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */
-#define _bfd_norelocs_get_reloc_upper_bound \
- ((long (*) (bfd *, asection *)) _bfd_n1)
-#define _bfd_norelocs_canonicalize_reloc \
- ((long (*) (bfd *, asection *, arelent **, asymbol **)) _bfd_n1)
+extern long _bfd_norelocs_get_reloc_upper_bound (bfd *, asection *);
+extern long _bfd_norelocs_canonicalize_reloc (bfd *, asection *,
+ arelent **, asymbol **);
#define _bfd_norelocs_bfd_reloc_type_lookup \
((reloc_howto_type *(*) (bfd *, bfd_reloc_code_real_type)) bfd_nullvoidptr)
+#define _bfd_norelocs_bfd_reloc_name_lookup \
+ ((reloc_howto_type *(*) (bfd *, const char *)) bfd_nullvoidptr)
/* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not
be written. Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite). */
@@ -373,7 +376,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
-#define _bfd_nolink_sizeof_headers ((int (*) (bfd *, bfd_boolean)) bfd_0)
+#define _bfd_nolink_sizeof_headers \
+ ((int (*) (bfd *, struct bfd_link_info *)) bfd_0)
#define _bfd_nolink_bfd_get_relocated_section_contents \
((bfd_byte *(*) (bfd *, struct bfd_link_info *, struct bfd_link_order *, \
bfd_byte *, bfd_boolean, asymbol **)) \
@@ -407,7 +411,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_link_split_section \
((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
#define _bfd_nolink_section_already_linked \
- ((void (*) (bfd *, struct bfd_section *)) bfd_void)
+ ((void (*) (bfd *, struct bfd_section *, struct bfd_link_info *)) bfd_void)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -521,7 +525,7 @@ extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
extern void _bfd_generic_section_already_linked
- (bfd *, struct bfd_section *);
+ (bfd *, struct bfd_section *, struct bfd_link_info *);
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
@@ -544,6 +548,10 @@ extern bfd_reloc_status_type _bfd_final_link_relocate
extern bfd_reloc_status_type _bfd_relocate_contents
(reloc_howto_type *, bfd *, bfd_vma, bfd_byte *);
+/* Clear a given location using a given howto. */
+extern void _bfd_clear_contents (reloc_howto_type *howto, bfd *input_bfd,
+ bfd_byte *location);
+
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
diff --git a/contrib/binutils/bfd/libbfd.c b/contrib/binutils/bfd/libbfd.c
index 57cfabc..7dada1c 100644
--- a/contrib/binutils/bfd/libbfd.c
+++ b/contrib/binutils/bfd/libbfd.c
@@ -1,6 +1,6 @@
/* Assorted BFD support routines, only used internally.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#ifndef HAVE_GETPAGESIZE
@@ -103,6 +103,23 @@ bfd_void (bfd *ignore ATTRIBUTE_UNUSED)
{
}
+long
+_bfd_norelocs_get_reloc_upper_bound (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED)
+{
+ return sizeof (arelent *);
+}
+
+long
+_bfd_norelocs_canonicalize_reloc (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ arelent **relptr,
+ asymbol **symbols ATTRIBUTE_UNUSED)
+{
+ *relptr = NULL;
+ return 0;
+}
+
bfd_boolean
_bfd_nocore_core_file_matches_executable_p
(bfd *ignore_core_bfd ATTRIBUTE_UNUSED,
diff --git a/contrib/binutils/bfd/libbfd.h b/contrib/binutils/bfd/libbfd.h
index 2a590a3..4c1414f 100644
--- a/contrib/binutils/bfd/libbfd.h
+++ b/contrib/binutils/bfd/libbfd.h
@@ -7,7 +7,7 @@
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -160,6 +160,8 @@ bfd * _bfd_new_bfd
(void);
void _bfd_delete_bfd
(bfd *);
+bfd_boolean _bfd_free_cached_info
+ (bfd *);
bfd_boolean bfd_false
(bfd *ignore);
@@ -220,8 +222,8 @@ int bfd_generic_stat_arch_elt
#define _bfd_generic_close_and_cleanup bfd_true
#define _bfd_generic_bfd_free_cached_info bfd_true
-#define _bfd_generic_new_section_hook \
- ((bfd_boolean (*) (bfd *, asection *)) bfd_true)
+extern bfd_boolean _bfd_generic_new_section_hook
+ (bfd *, asection *);
extern bfd_boolean _bfd_generic_get_section_contents
(bfd *, asection *, void *, file_ptr, bfd_size_type);
extern bfd_boolean _bfd_generic_get_section_contents_in_window
@@ -351,12 +353,13 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table
/* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc
support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */
-#define _bfd_norelocs_get_reloc_upper_bound \
- ((long (*) (bfd *, asection *)) _bfd_n1)
-#define _bfd_norelocs_canonicalize_reloc \
- ((long (*) (bfd *, asection *, arelent **, asymbol **)) _bfd_n1)
+extern long _bfd_norelocs_get_reloc_upper_bound (bfd *, asection *);
+extern long _bfd_norelocs_canonicalize_reloc (bfd *, asection *,
+ arelent **, asymbol **);
#define _bfd_norelocs_bfd_reloc_type_lookup \
((reloc_howto_type *(*) (bfd *, bfd_reloc_code_real_type)) bfd_nullvoidptr)
+#define _bfd_norelocs_bfd_reloc_name_lookup \
+ ((reloc_howto_type *(*) (bfd *, const char *)) bfd_nullvoidptr)
/* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not
be written. Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite). */
@@ -378,7 +381,8 @@ extern bfd_boolean _bfd_generic_set_section_contents
/* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not
support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */
-#define _bfd_nolink_sizeof_headers ((int (*) (bfd *, bfd_boolean)) bfd_0)
+#define _bfd_nolink_sizeof_headers \
+ ((int (*) (bfd *, struct bfd_link_info *)) bfd_0)
#define _bfd_nolink_bfd_get_relocated_section_contents \
((bfd_byte *(*) (bfd *, struct bfd_link_info *, struct bfd_link_order *, \
bfd_byte *, bfd_boolean, asymbol **)) \
@@ -412,7 +416,7 @@ extern bfd_boolean _bfd_generic_set_section_contents
#define _bfd_nolink_bfd_link_split_section \
((bfd_boolean (*) (bfd *, struct bfd_section *)) bfd_false)
#define _bfd_nolink_section_already_linked \
- ((void (*) (bfd *, struct bfd_section *)) bfd_void)
+ ((void (*) (bfd *, struct bfd_section *, struct bfd_link_info *)) bfd_void)
/* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not
have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC
@@ -526,7 +530,7 @@ extern bfd_boolean _bfd_generic_link_split_section
(bfd *, struct bfd_section *);
extern void _bfd_generic_section_already_linked
- (bfd *, struct bfd_section *);
+ (bfd *, struct bfd_section *, struct bfd_link_info *);
/* Generic reloc_link_order processing routine. */
extern bfd_boolean _bfd_generic_reloc_link_order
@@ -549,6 +553,10 @@ extern bfd_reloc_status_type _bfd_final_link_relocate
extern bfd_reloc_status_type _bfd_relocate_contents
(reloc_howto_type *, bfd *, bfd_vma, bfd_byte *);
+/* Clear a given location using a given howto. */
+extern void _bfd_clear_contents (reloc_howto_type *howto, bfd *input_bfd,
+ bfd_byte *location);
+
/* Link stabs in sections in the first pass. */
extern bfd_boolean _bfd_link_section_stabs
@@ -899,6 +907,20 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SPARC_TLS_DTPOFF64",
"BFD_RELOC_SPARC_TLS_TPOFF32",
"BFD_RELOC_SPARC_TLS_TPOFF64",
+ "BFD_RELOC_SPU_IMM7",
+ "BFD_RELOC_SPU_IMM8",
+ "BFD_RELOC_SPU_IMM10",
+ "BFD_RELOC_SPU_IMM10W",
+ "BFD_RELOC_SPU_IMM16",
+ "BFD_RELOC_SPU_IMM16W",
+ "BFD_RELOC_SPU_IMM18",
+ "BFD_RELOC_SPU_PCREL9a",
+ "BFD_RELOC_SPU_PCREL9b",
+ "BFD_RELOC_SPU_PCREL16",
+ "BFD_RELOC_SPU_LO16",
+ "BFD_RELOC_SPU_HI16",
+ "BFD_RELOC_SPU_PPU32",
+ "BFD_RELOC_SPU_PPU64",
"BFD_RELOC_ALPHA_GPDISP_HI16",
"BFD_RELOC_ALPHA_GPDISP_LO16",
"BFD_RELOC_ALPHA_GPDISP",
@@ -1206,6 +1228,14 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_SBREL32",
"BFD_RELOC_ARM_TARGET2",
"BFD_RELOC_ARM_PREL31",
+ "BFD_RELOC_ARM_MOVW",
+ "BFD_RELOC_ARM_MOVT",
+ "BFD_RELOC_ARM_MOVW_PCREL",
+ "BFD_RELOC_ARM_MOVT_PCREL",
+ "BFD_RELOC_ARM_THUMB_MOVW",
+ "BFD_RELOC_ARM_THUMB_MOVT",
+ "BFD_RELOC_ARM_THUMB_MOVW_PCREL",
+ "BFD_RELOC_ARM_THUMB_MOVT_PCREL",
"BFD_RELOC_ARM_JUMP_SLOT",
"BFD_RELOC_ARM_GLOB_DAT",
"BFD_RELOC_ARM_GOT32",
@@ -1221,9 +1251,38 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_ARM_TLS_TPOFF32",
"BFD_RELOC_ARM_TLS_IE32",
"BFD_RELOC_ARM_TLS_LE32",
+ "BFD_RELOC_ARM_ALU_PC_G0_NC",
+ "BFD_RELOC_ARM_ALU_PC_G0",
+ "BFD_RELOC_ARM_ALU_PC_G1_NC",
+ "BFD_RELOC_ARM_ALU_PC_G1",
+ "BFD_RELOC_ARM_ALU_PC_G2",
+ "BFD_RELOC_ARM_LDR_PC_G0",
+ "BFD_RELOC_ARM_LDR_PC_G1",
+ "BFD_RELOC_ARM_LDR_PC_G2",
+ "BFD_RELOC_ARM_LDRS_PC_G0",
+ "BFD_RELOC_ARM_LDRS_PC_G1",
+ "BFD_RELOC_ARM_LDRS_PC_G2",
+ "BFD_RELOC_ARM_LDC_PC_G0",
+ "BFD_RELOC_ARM_LDC_PC_G1",
+ "BFD_RELOC_ARM_LDC_PC_G2",
+ "BFD_RELOC_ARM_ALU_SB_G0_NC",
+ "BFD_RELOC_ARM_ALU_SB_G0",
+ "BFD_RELOC_ARM_ALU_SB_G1_NC",
+ "BFD_RELOC_ARM_ALU_SB_G1",
+ "BFD_RELOC_ARM_ALU_SB_G2",
+ "BFD_RELOC_ARM_LDR_SB_G0",
+ "BFD_RELOC_ARM_LDR_SB_G1",
+ "BFD_RELOC_ARM_LDR_SB_G2",
+ "BFD_RELOC_ARM_LDRS_SB_G0",
+ "BFD_RELOC_ARM_LDRS_SB_G1",
+ "BFD_RELOC_ARM_LDRS_SB_G2",
+ "BFD_RELOC_ARM_LDC_SB_G0",
+ "BFD_RELOC_ARM_LDC_SB_G1",
+ "BFD_RELOC_ARM_LDC_SB_G2",
"BFD_RELOC_ARM_IMMEDIATE",
"BFD_RELOC_ARM_ADRL_IMMEDIATE",
"BFD_RELOC_ARM_T32_IMMEDIATE",
+ "BFD_RELOC_ARM_T32_ADD_IMM",
"BFD_RELOC_ARM_T32_IMM12",
"BFD_RELOC_ARM_T32_ADD_PC12",
"BFD_RELOC_ARM_SHIFT_IMM",
@@ -1473,6 +1532,27 @@ 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_MEP_8",
+ "BFD_RELOC_MEP_16",
+ "BFD_RELOC_MEP_32",
+ "BFD_RELOC_MEP_PCREL8A2",
+ "BFD_RELOC_MEP_PCREL12A2",
+ "BFD_RELOC_MEP_PCREL17A2",
+ "BFD_RELOC_MEP_PCREL24A2",
+ "BFD_RELOC_MEP_PCABS24A2",
+ "BFD_RELOC_MEP_LOW16",
+ "BFD_RELOC_MEP_HI16U",
+ "BFD_RELOC_MEP_HI16S",
+ "BFD_RELOC_MEP_GPREL",
+ "BFD_RELOC_MEP_TPREL",
+ "BFD_RELOC_MEP_TPREL7",
+ "BFD_RELOC_MEP_TPREL7A2",
+ "BFD_RELOC_MEP_TPREL7A4",
+ "BFD_RELOC_MEP_UIMM24",
+ "BFD_RELOC_MEP_ADDR24A4",
+ "BFD_RELOC_MEP_GNU_VTINHERIT",
+ "BFD_RELOC_MEP_GNU_VTENTRY",
+
"BFD_RELOC_MMIX_GETA",
"BFD_RELOC_MMIX_GETA_1",
"BFD_RELOC_MMIX_GETA_2",
@@ -1509,7 +1589,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_AVR_HH8_LDI_NEG",
"BFD_RELOC_AVR_MS8_LDI_NEG",
"BFD_RELOC_AVR_LO8_LDI_PM",
+ "BFD_RELOC_AVR_LO8_LDI_GS",
"BFD_RELOC_AVR_HI8_LDI_PM",
+ "BFD_RELOC_AVR_HI8_LDI_GS",
"BFD_RELOC_AVR_HH8_LDI_PM",
"BFD_RELOC_AVR_LO8_LDI_PM_NEG",
"BFD_RELOC_AVR_HI8_LDI_PM_NEG",
@@ -1568,6 +1650,17 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_390_GOT20",
"BFD_RELOC_390_GOTPLT20",
"BFD_RELOC_390_TLS_GOTIE20",
+ "BFD_RELOC_SCORE_DUMMY1",
+ "BFD_RELOC_SCORE_GPREL15",
+ "BFD_RELOC_SCORE_DUMMY2",
+ "BFD_RELOC_SCORE_JMP",
+ "BFD_RELOC_SCORE_BRANCH",
+ "BFD_RELOC_SCORE16_JMP",
+ "BFD_RELOC_SCORE16_BRANCH",
+ "BFD_RELOC_SCORE_GOT15",
+ "BFD_RELOC_SCORE_GOT_LO16",
+ "BFD_RELOC_SCORE_CALL15",
+ "BFD_RELOC_SCORE_DUMMY_HI16",
"BFD_RELOC_IP2K_FR9",
"BFD_RELOC_IP2K_BANK",
"BFD_RELOC_IP2K_ADDR16CJP",
@@ -1712,6 +1805,33 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_16C_IMM24_C",
"BFD_RELOC_16C_IMM32",
"BFD_RELOC_16C_IMM32_C",
+ "BFD_RELOC_CR16_NUM8",
+ "BFD_RELOC_CR16_NUM16",
+ "BFD_RELOC_CR16_NUM32",
+ "BFD_RELOC_CR16_NUM32a",
+ "BFD_RELOC_CR16_REGREL0",
+ "BFD_RELOC_CR16_REGREL4",
+ "BFD_RELOC_CR16_REGREL4a",
+ "BFD_RELOC_CR16_REGREL14",
+ "BFD_RELOC_CR16_REGREL14a",
+ "BFD_RELOC_CR16_REGREL16",
+ "BFD_RELOC_CR16_REGREL20",
+ "BFD_RELOC_CR16_REGREL20a",
+ "BFD_RELOC_CR16_ABS20",
+ "BFD_RELOC_CR16_ABS24",
+ "BFD_RELOC_CR16_IMM4",
+ "BFD_RELOC_CR16_IMM8",
+ "BFD_RELOC_CR16_IMM16",
+ "BFD_RELOC_CR16_IMM20",
+ "BFD_RELOC_CR16_IMM24",
+ "BFD_RELOC_CR16_IMM32",
+ "BFD_RELOC_CR16_IMM32a",
+ "BFD_RELOC_CR16_DISP4",
+ "BFD_RELOC_CR16_DISP8",
+ "BFD_RELOC_CR16_DISP16",
+ "BFD_RELOC_CR16_DISP20",
+ "BFD_RELOC_CR16_DISP24",
+ "BFD_RELOC_CR16_DISP24a",
"BFD_RELOC_CRX_REL4",
"BFD_RELOC_CRX_REL8",
"BFD_RELOC_CRX_REL8_CMP",
@@ -1796,6 +1916,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_XSTORMY16_12",
"BFD_RELOC_XSTORMY16_24",
"BFD_RELOC_XSTORMY16_FPTR16",
+ "BFD_RELOC_RELC",
+
"BFD_RELOC_XC16X_PAG",
"BFD_RELOC_XC16X_POF",
"BFD_RELOC_XC16X_SEG",
diff --git a/contrib/binutils/bfd/libcoff-in.h b/contrib/binutils/bfd/libcoff-in.h
index f2bc264..fdb1a59 100644
--- a/contrib/binutils/bfd/libcoff-in.h
+++ b/contrib/binutils/bfd/libcoff-in.h
@@ -348,7 +348,7 @@ extern bfd_boolean coff_find_nearest_line
extern bfd_boolean coff_find_inliner_info
(bfd *, const char **, const char **, unsigned int *);
extern int coff_sizeof_headers
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_coff_reloc16_relax_section
(bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
diff --git a/contrib/binutils/bfd/libcoff.h b/contrib/binutils/bfd/libcoff.h
index f756f30..e26fce0 100644
--- a/contrib/binutils/bfd/libcoff.h
+++ b/contrib/binutils/bfd/libcoff.h
@@ -352,7 +352,7 @@ extern bfd_boolean coff_find_nearest_line
extern bfd_boolean coff_find_inliner_info
(bfd *, const char **, const char **, unsigned int *);
extern int coff_sizeof_headers
- (bfd *, bfd_boolean);
+ (bfd *, struct bfd_link_info *);
extern bfd_boolean bfd_coff_reloc16_relax_section
(bfd *, asection *, struct bfd_link_info *, bfd_boolean *);
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
diff --git a/contrib/binutils/bfd/libecoff.h b/contrib/binutils/bfd/libecoff.h
index 8c5e218..165e755 100644
--- a/contrib/binutils/bfd/libecoff.h
+++ b/contrib/binutils/bfd/libecoff.h
@@ -1,6 +1,6 @@
/* BFD ECOFF object file private structure.
Copyright 1993, 1994, 1995, 1996, 1999, 2001, 2002, 2003, 2004,
- 2005 Free Software Foundation, Inc.
+ 2005, 2006 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -301,7 +301,7 @@ extern bfd_boolean _bfd_ecoff_set_arch_mach
extern bfd_boolean _bfd_ecoff_set_section_contents
(bfd *, asection *, const void * location, file_ptr, bfd_size_type);
-extern int _bfd_ecoff_sizeof_headers (bfd *, bfd_boolean);
+extern int _bfd_ecoff_sizeof_headers (bfd *, struct bfd_link_info *);
/* ecoff_bfd_get_relocated_section_contents defined by backend. */
/* ecoff_bfd_relax_section defined by backend. */
extern struct bfd_link_hash_table *_bfd_ecoff_bfd_link_hash_table_create
diff --git a/contrib/binutils/bfd/libpei.h b/contrib/binutils/bfd/libpei.h
index f0f6580..0e08e03 100644
--- a/contrib/binutils/bfd/libpei.h
+++ b/contrib/binutils/bfd/libpei.h
@@ -1,5 +1,5 @@
/* Support for the generic parts of PE/PEI; common header information.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
Written by Cygnus Solutions.
@@ -204,7 +204,38 @@
#define PUT_SCNHDR_LNNOPTR H_PUT_32
#endif
-#ifdef COFF_WITH_pep
+#ifdef COFF_WITH_pex64
+
+#define GET_OPTHDR_IMAGE_BASE H_GET_64
+#define PUT_OPTHDR_IMAGE_BASE H_PUT_64
+#define GET_OPTHDR_SIZE_OF_STACK_RESERVE H_GET_64
+#define PUT_OPTHDR_SIZE_OF_STACK_RESERVE H_PUT_64
+#define GET_OPTHDR_SIZE_OF_STACK_COMMIT H_GET_64
+#define PUT_OPTHDR_SIZE_OF_STACK_COMMIT H_PUT_64
+#define GET_OPTHDR_SIZE_OF_HEAP_RESERVE H_GET_64
+#define PUT_OPTHDR_SIZE_OF_HEAP_RESERVE H_PUT_64
+#define GET_OPTHDR_SIZE_OF_HEAP_COMMIT H_GET_64
+#define PUT_OPTHDR_SIZE_OF_HEAP_COMMIT H_PUT_64
+#define GET_PDATA_ENTRY bfd_get_32
+
+#define _bfd_XX_bfd_copy_private_bfd_data_common _bfd_pex64_bfd_copy_private_bfd_data_common
+#define _bfd_XX_bfd_copy_private_section_data _bfd_pex64_bfd_copy_private_section_data
+#define _bfd_XX_get_symbol_info _bfd_pex64_get_symbol_info
+#define _bfd_XX_only_swap_filehdr_out _bfd_pex64_only_swap_filehdr_out
+#define _bfd_XX_print_private_bfd_data_common _bfd_pex64_print_private_bfd_data_common
+#define _bfd_XXi_final_link_postscript _bfd_pex64i_final_link_postscript
+#define _bfd_XXi_only_swap_filehdr_out _bfd_pex64i_only_swap_filehdr_out
+#define _bfd_XXi_swap_aouthdr_in _bfd_pex64i_swap_aouthdr_in
+#define _bfd_XXi_swap_aouthdr_out _bfd_pex64i_swap_aouthdr_out
+#define _bfd_XXi_swap_aux_in _bfd_pex64i_swap_aux_in
+#define _bfd_XXi_swap_aux_out _bfd_pex64i_swap_aux_out
+#define _bfd_XXi_swap_lineno_in _bfd_pex64i_swap_lineno_in
+#define _bfd_XXi_swap_lineno_out _bfd_pex64i_swap_lineno_out
+#define _bfd_XXi_swap_scnhdr_out _bfd_pex64i_swap_scnhdr_out
+#define _bfd_XXi_swap_sym_in _bfd_pex64i_swap_sym_in
+#define _bfd_XXi_swap_sym_out _bfd_pex64i_swap_sym_out
+
+#elif defined COFF_WITH_pep
#define GET_OPTHDR_IMAGE_BASE H_GET_64
#define PUT_OPTHDR_IMAGE_BASE H_PUT_64
@@ -224,7 +255,6 @@
#define _bfd_XX_only_swap_filehdr_out _bfd_pep_only_swap_filehdr_out
#define _bfd_XX_print_private_bfd_data_common _bfd_pep_print_private_bfd_data_common
#define _bfd_XXi_final_link_postscript _bfd_pepi_final_link_postscript
-#define _bfd_XXi_final_link_postscript _bfd_pepi_final_link_postscript
#define _bfd_XXi_only_swap_filehdr_out _bfd_pepi_only_swap_filehdr_out
#define _bfd_XXi_swap_aouthdr_in _bfd_pepi_swap_aouthdr_in
#define _bfd_XXi_swap_aouthdr_out _bfd_pepi_swap_aouthdr_out
@@ -256,7 +286,6 @@
#define _bfd_XX_only_swap_filehdr_out _bfd_pe_only_swap_filehdr_out
#define _bfd_XX_print_private_bfd_data_common _bfd_pe_print_private_bfd_data_common
#define _bfd_XXi_final_link_postscript _bfd_pei_final_link_postscript
-#define _bfd_XXi_final_link_postscript _bfd_pei_final_link_postscript
#define _bfd_XXi_only_swap_filehdr_out _bfd_pei_only_swap_filehdr_out
#define _bfd_XXi_swap_aouthdr_in _bfd_pei_swap_aouthdr_in
#define _bfd_XXi_swap_aouthdr_out _bfd_pei_swap_aouthdr_out
@@ -270,10 +299,27 @@
#endif /* !COFF_WITH_pep */
-/* Macro: Returns true if the bfd is a PE executable as opposed to a PE object file. */
-#define bfd_pe_executable_p(abfd) \
- (strncmp ((abfd)->xvec->name, "pei-", 4) == 0 \
- || strncmp ((abfd)->xvec->name, "efi-app-", 8) == 0)
+/* Returns true if the target is a PE executable target. */
+#define bfd_target_pei_p(xvec) \
+ (CONST_STRNEQ ((xvec)->name, "pei-"))
+
+/* Return the arch string of a PE executable target. */
+#define bfd_target_pei_arch(xvec) \
+ ((xvec)->name + sizeof ("pei-") - 1)
+
+/* Returns true if the target is an EFI target. */
+#define bfd_target_efi_p(xvec) \
+ (CONST_STRNEQ ((xvec)->name, "efi-app-"))
+
+/* Return the arch string of an EFI target. */
+#define bfd_target_efi_arch(xvec) \
+ ((xvec)->name + sizeof ("efi-app-") - 1)
+
+/* Macro: Returns true if the bfd is a PE executable as opposed to a
+ PE object file. */
+#define bfd_pe_executable_p(abfd) \
+ (bfd_target_pei_p ((abfd)->xvec) \
+ || bfd_target_efi_p ((abfd)->xvec))
/* These functions are architecture dependent, and are in peicode.h:
coff_swap_reloc_in
diff --git a/contrib/binutils/bfd/linker.c b/contrib/binutils/bfd/linker.c
index 14eeae4..497b5c2 100644
--- a/contrib/binutils/bfd/linker.c
+++ b/contrib/binutils/bfd/linker.c
@@ -1,6 +1,7 @@
/* linker.c -- BFD linker routines
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "bfdlink.h"
#include "genlink.h"
@@ -562,11 +563,11 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
#undef WRAP
-#undef REAL
+#undef REAL
#define REAL "__real_"
if (*l == '_'
- && strncmp (l, REAL, sizeof REAL - 1) == 0
+ && CONST_STRNEQ (l, REAL)
&& bfd_hash_lookup (info->wrap_hash, l + sizeof REAL - 1,
FALSE, FALSE) != NULL)
{
@@ -1659,8 +1660,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
s = name + 1;
while (*s == '_')
++s;
- if (s[0] == 'G'
- && strncmp (s, CONS_PREFIX, CONS_PREFIX_LEN - 1) == 0)
+ if (s[0] == 'G' && CONST_STRNEQ (s, CONS_PREFIX))
{
char c;
@@ -2877,14 +2877,15 @@ FUNCTION
bfd_section_already_linked
SYNOPSIS
- void bfd_section_already_linked (bfd *abfd, asection *sec);
+ void bfd_section_already_linked (bfd *abfd, asection *sec,
+ struct bfd_link_info *info);
DESCRIPTION
Check if @var{sec} has been already linked during a reloceatable
or final link.
-.#define bfd_section_already_linked(abfd, sec) \
-. BFD_SEND (abfd, _section_already_linked, (abfd, sec))
+.#define bfd_section_already_linked(abfd, sec, info) \
+. BFD_SEND (abfd, _section_already_linked, (abfd, sec, info))
.
*/
@@ -2970,7 +2971,8 @@ bfd_section_already_linked_table_free (void)
/* This is used on non-ELF inputs. */
void
-_bfd_generic_section_already_linked (bfd *abfd, asection *sec)
+_bfd_generic_section_already_linked (bfd *abfd, asection *sec,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
flagword flags;
const char *name;
@@ -3074,7 +3076,7 @@ _bfd_generic_section_already_linked (bfd *abfd, asection *sec)
bfd_section_already_linked_table_insert (already_linked_list, sec);
}
-/* Convert symbols in excluded output sections to absolute. */
+/* Convert symbols in excluded output sections to use a kept section. */
static bfd_boolean
fix_syms (struct bfd_link_hash_entry *h, void *data)
@@ -3093,8 +3095,64 @@ fix_syms (struct bfd_link_hash_entry *h, void *data)
&& (s->output_section->flags & SEC_EXCLUDE) != 0
&& bfd_section_removed_from_list (obfd, s->output_section))
{
+ asection *op, *op1;
+
h->u.def.value += s->output_offset + s->output_section->vma;
- h->u.def.section = bfd_abs_section_ptr;
+
+ /* Find preceding kept section. */
+ for (op1 = s->output_section->prev; op1 != NULL; op1 = op1->prev)
+ if ((op1->flags & SEC_EXCLUDE) == 0
+ && !bfd_section_removed_from_list (obfd, op1))
+ break;
+
+ /* Find following kept section. Start at prev->next because
+ other sections may have been added after S was removed. */
+ if (s->output_section->prev != NULL)
+ op = s->output_section->prev->next;
+ else
+ op = s->output_section->owner->sections;
+ for (; op != NULL; op = op->next)
+ if ((op->flags & SEC_EXCLUDE) == 0
+ && !bfd_section_removed_from_list (obfd, op))
+ break;
+
+ /* Choose better of two sections, based on flags. The idea
+ is to choose a section that will be in the same segment
+ as S would have been if it was kept. */
+ if (op1 == NULL)
+ {
+ if (op == NULL)
+ op = bfd_abs_section_ptr;
+ }
+ else if (op == NULL)
+ op = op1;
+ else if (((op1->flags ^ op->flags)
+ & (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0)
+ {
+ if (((op->flags ^ s->flags)
+ & (SEC_ALLOC | SEC_THREAD_LOCAL)) != 0)
+ op = op1;
+ }
+ else if (((op1->flags ^ op->flags) & SEC_READONLY) != 0)
+ {
+ if (((op->flags ^ s->flags) & SEC_READONLY) != 0)
+ op = op1;
+ }
+ else if (((op1->flags ^ op->flags) & SEC_CODE) != 0)
+ {
+ if (((op->flags ^ s->flags) & SEC_CODE) != 0)
+ op = op1;
+ }
+ else
+ {
+ /* Flags we care about are the same. Prefer the following
+ section if that will result in a positive valued sym. */
+ if (h->u.def.value < op->vma)
+ op = op1;
+ }
+
+ h->u.def.value -= op->vma;
+ h->u.def.section = op;
}
}
diff --git a/contrib/binutils/bfd/mep-relocs.pl b/contrib/binutils/bfd/mep-relocs.pl
new file mode 100755
index 0000000..d227b82
--- /dev/null
+++ b/contrib/binutils/bfd/mep-relocs.pl
@@ -0,0 +1,274 @@
+#!/usr/bin/perl
+# -*- perl -*-
+#
+# Toshiba MeP Media Engine Relocation Generator
+# Copyright (C) 2001, 2007 Free Software Foundation, Inc.
+# This file is part of BFD.
+# Originally written by DJ Delorie <dj@redhat.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+
+# Usage: Run this anywhere inside your source tree. It will read
+# include/elf/mep.h and scan the comments therein. It will renumber
+# the relocs to be sequential (this is needed so that bfd/elf32-mep.h
+# works) if needed. It will then update the reloc list in bfd/reloc.c
+# and the howto, mapping, and apply routines in bfd/elf32-mep.c. You
+# can then regenerate bfd-in2.h and check everything in.
+
+# FIXME: After the relocation list is finalized, change this to
+# *verify* the reloc list, rather than resequence it.
+
+while (! -f "include/elf/mep.h" && ! -f "bfd/reloc.c") {
+ chdir "..";
+ $pwd = `pwd`;
+ if ($pwd !~ m@/.*/@) {
+ print STDERR "Cannot find include/elf/mep.h or bfd/reloc.h\n";
+ exit 1;
+ }
+}
+$pwd = `pwd`;
+print "srctop is $pwd";
+
+printf "Reading include/elf/mep.h ...\n";
+open(MEPH, "include/elf/mep.h");
+open(MEPHO, "> include/elf/mep.h.new") || die("mep.h.new create: $!");
+$val = 0;
+while (<MEPH>) {
+ if (($pre,$rel,$rest) = /(.*RELOC_NUMBER \()([^,]+), *\d+(.*)/) {
+ $rest =~ s/[\r\n]+$//;
+ print (MEPHO "$pre$rel, $val$rest\n") || die("mep.h.new write: $!");
+ $val ++;
+ $rel =~ s/R_MEP_//;
+ push(@relocs, $rel);
+
+ $rest =~ s@.*/\* @@;
+ ($pattern, $sign, $attrs) = $rest =~ m@(.*) ([US]) (.*)\*/@;
+ $pattern =~ s/ //g;
+ push(@pattern, $pattern);
+ push(@sign, $sign);
+ push(@attrs, $attrs);
+
+ printf "%4d $rel p=`$pattern' s=`$sign' a=`$attrs'\n", $#pattern;
+
+ } else {
+ print(MEPHO) || die("mep.h.new write: $!");
+ }
+}
+close(MEPH);
+close(MEPHO) || die("mep.h.new close: $!");
+
+&swapfile("include/elf/mep.h");
+
+redo_file ("bfd/reloc.c",
+ "",
+ "ENUMDOC\n Toshiba Media Processor Relocations.\n\nCOMMENT\n",
+ "ENUM\n BFD_RELOC_MEP_%s\n",
+ "");
+
+$autogen = " /* This section generated from bfd/mep-relocs.pl from include/elf/mep.h. */\n";
+
+redo_file ("bfd/elf32-mep.c",
+ "MEPRELOC:HOWTO",
+ $autogen,
+ "MEPRELOC:END",
+ "",
+ "&emit_howto();",
+ "MEPRELOC:MAP",
+ $autogen,
+ "MEPRELOC:END",
+ "",
+ " MAP(%s);\n",
+ "MEPRELOC:APPLY",
+ $autogen,
+ "MEPRELOC:END",
+ "",
+ "&emit_apply();",
+ );
+
+sub mask2shifts {
+ my ($mask) = @_;
+ my ($bits, $left, $right, $ci, $c, $cv);
+ $bits = 0;
+ $left = 0;
+ $right = 32;
+ for ($ci=0; $ci<length($mask); $ci++) {
+ $c = substr($mask, $ci, 1);
+ $left++;
+ next if $c eq '-';
+ $left = 0;
+ $cv = ord($c) - ord('0');
+ $cv -= ord('a') - ord('9') - 1 if $cv > 9;
+ $right = $cv unless $right < $cv;
+ $bits = $cv+1 unless $bits > $cv+1;
+ }
+ $mask =~ tr/-/1/c;
+ $mask =~ tr/-/0/;
+ ($rmask = $mask) =~ tr/01/10/;
+ $mask = unpack("H*", pack("B*", $mask));
+ $rmask = unpack("H*", pack("B*", $rmask));
+ return ($bits, $left, $right, $mask, $rmask);
+}
+
+sub emit_howto {
+ for ($i=2; $i<=$#relocs; $i++) {
+ $mask = $pattern[$i];
+
+ if (length($mask) == 8) { $bytesize = 0; }
+ elsif (length($mask) == 16) { $bytesize = 1; }
+ elsif (length($mask) == 32) { $bytesize = 2; }
+
+ ($bits, $left, $right, $mask) = mask2shifts ($mask);
+ $bits[$i] = $bits;
+ $pcrel = 0;
+ $pcrel = 1 if $attrs[$i] =~ /pc-rel/i;
+ $overflow = $sign[$i];
+ $overflow = 'N' if $attrs[$i] =~ /no-overflow/;
+
+ $c = "$relocs[$i],";
+ printf(NEW " MEPREL (R_MEP_%-10s%d,%3d,%2d,%2d,%2d,%2s, 0x%s),\n",
+ $c, $bytesize, $bits, $left, $right, $pcrel, $overflow, $mask);
+ }
+}
+
+sub emit_apply {
+ for ($i=2; $i<=$#relocs; $i++) {
+ $v = "u";
+ $v = "s" if $sign[$i] =~ /S/;
+ if (length($pattern[$i]) == 8) {
+ $e = ''; # no endian swap for bytes
+ } elsif ($pattern[$i] =~ /-/ || length($pattern[$i]) == 16) {
+ $e = '^e2'; # endian swap - 2byte words only
+ } else {
+ $e = '^e4' # endian swap for data
+ }
+ print NEW " case R_MEP_$relocs[$i]: /* $pattern[$i] */\n";
+ if ($attrs[$i] =~ /tp-rel/i) {
+ print NEW " $v -= mep_tpoff_base(rel->r_offset);\n";
+ }
+ if ($attrs[$i] =~ /gp-rel/i) {
+ print NEW " $v -= mep_sdaoff_base(rel->r_offset);\n";
+ }
+ if ($attrs[$i] !~ /no-overflow/ && $bits[$i] < 32) {
+ if ($v eq "u") {
+ $max = (1 << $bits[$i]) - 1;
+ print NEW " if (u > $max) r = bfd_reloc_overflow;\n";
+ } else {
+ $min = -(1 << ($bits[$i]-1));
+ $max = (1 << ($bits[$i]-1)) - 1;
+ print NEW " if ($min > s || s > $max) r = bfd_reloc_overflow;\n";
+ }
+ }
+ for ($b=0; $b<length($pattern[$i]); $b += 8) {
+ $mask = substr($pattern[$i], $b, 8);
+ ($bits, $left, $right, $mask, $rmask) = mask2shifts ($mask);
+ if ($left > $right) { $left -= $right; $right = 0; }
+ else { $right -= $left; $left = 0; }
+
+ if ($mask ne "00") {
+ $bb = $b / 8;
+ print NEW " byte[$bb$e] = ";
+ print NEW "(byte[$bb$e] & 0x$rmask) | " if $rmask ne "00";
+ if ($left) {
+ print NEW "(($v << $left) & 0x$mask)";
+ } elsif ($right) {
+ print NEW "(($v >> $right) & 0x$mask)";
+ } else {
+ print NEW "($v & 0x$mask)";
+ }
+ print NEW ";\n";
+ }
+ }
+ print NEW " break;\n";
+ }
+}
+
+
+#-----------------------------------------------------------------------------
+
+sub redo_file {
+ my ($file, @control) = @_;
+ open(OLD, $file);
+ open(NEW, "> $file.new") || die("$file.new create: $!");
+
+ print "Scanning file $file ...\n";
+
+ while (1) {
+ $start = shift @control;
+ $prefix = shift @control;
+ $end = shift @control;
+ $suffix = shift @control;
+ $pattern = shift @control;
+
+ if (!$start) {
+ print NEW while <OLD>;
+ last;
+ }
+
+ print " looking for $start\n";
+ while (<OLD>) {
+ print NEW;
+ last if /\Q$start\E/;
+ }
+ print "can't find $start\n" unless $_;
+ last unless $_;
+
+ print NEW $prefix;
+ if ($pattern =~ /^\&/) {
+ eval $pattern;
+ die("$pattern: $@") if $@;
+ } else {
+ for $i (2..$#relocs) {
+ printf (NEW "$pattern", $relocs[$i]) || die("$file.new write: $!");
+ $pattern =~ s/^ENUM\n/ENUMX\n/;
+ }
+ }
+ print NEW $suffix;
+ while (<OLD>) {
+ last if /\Q$end\E/;
+ }
+ print NEW;
+ }
+
+ close(OLD);
+ close(NEW) || die("$file.new close: $!");
+ &swapfile($file);
+}
+
+#-----------------------------------------------------------------------------
+
+sub swapfile {
+ my ($f) = @_;
+ if ( ! -f "$f.save") {
+ system "cp $f $f.save";
+ }
+ open(ORIG, $f);
+ open(NEW, "$f.new");
+ while (<ORIG>) {
+ $n = <NEW>;
+ if ($n ne $_) {
+ close(ORIG);
+ close(NEW);
+ print " Updating $f\n";
+ rename "$f", "$f.old";
+ rename "$f.new", "$f";
+ return;
+ }
+ }
+ close(ORIG);
+ close(NEW);
+ print " No change to $f\n";
+ unlink "$f.new";
+}
diff --git a/contrib/binutils/bfd/merge.c b/contrib/binutils/bfd/merge.c
index c1795d2..71b31d3 100644
--- a/contrib/binutils/bfd/merge.c
+++ b/contrib/binutils/bfd/merge.c
@@ -1,5 +1,5 @@
/* SEC_MERGE support.
- Copyright 2001, 2002, 2003, 2004, 2005, 2006
+ Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Jakub Jelinek <jakub@redhat.com>.
@@ -22,8 +22,8 @@
/* This file contains support for merging duplicate entities within sections,
as used in ELF SHF_MERGE. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "hashtab.h"
#include "libiberty.h"
@@ -766,7 +766,7 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED,
the hash table at all. */
for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
if (secinfo->first_str == NULL)
- secinfo->sec->flags |= SEC_EXCLUDE;
+ secinfo->sec->flags |= SEC_EXCLUDE | SEC_KEEP;
}
return TRUE;
diff --git a/contrib/binutils/bfd/mipsbsd.c b/contrib/binutils/bfd/mipsbsd.c
index b8621e4..6edb972 100644
--- a/contrib/binutils/bfd/mipsbsd.c
+++ b/contrib/binutils/bfd/mipsbsd.c
@@ -1,6 +1,6 @@
/* BFD backend for MIPS BSD (a.out) binaries.
- Copyright 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2007 Free Software Foundation, Inc.
Written by Ralph Campbell.
This file is part of BFD, the Binary File Descriptor library.
@@ -40,8 +40,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
the tokens. */
#define MY(OP) CONCAT2 (mipsbsd_,OP)
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libaout.h"
@@ -56,7 +56,8 @@ static bfd_boolean MY(write_object_contents) PARAMS ((bfd *abfd));
/* We can't use MY(x) here because it leads to a recursive call to CONCAT2
when expanded inside JUMP_TABLE. */
-#define MY_bfd_reloc_type_lookup mipsbsd_reloc_howto_type_lookup
+#define MY_bfd_reloc_type_lookup mipsbsd_reloc_type_lookup
+#define MY_bfd_reloc_name_lookup mipsbsd_reloc_name_lookup
#define MY_canonicalize_reloc mipsbsd_canonicalize_reloc
#define MY_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
@@ -72,8 +73,6 @@ static bfd_boolean MY(write_object_contents) PARAMS ((bfd *abfd));
static bfd_reloc_status_type mips_fix_jmp_addr
PARAMS ((bfd *, arelent *, struct bfd_symbol *, PTR, asection *,
bfd *, char **));
-static reloc_howto_type *MY(reloc_howto_type_lookup)
- PARAMS ((bfd *, bfd_reloc_code_real_type));
long MY(canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
@@ -302,9 +301,7 @@ static reloc_howto_type mips_howto_table_ext[] = {
};
static reloc_howto_type *
-MY(reloc_howto_type_lookup) (abfd, code)
- bfd *abfd;
- bfd_reloc_code_real_type code;
+MY(reloc_type_lookup) (bfd *abfd, bfd_reloc_code_real_type code)
{
if (bfd_get_arch (abfd) != bfd_arch_mips)
@@ -330,6 +327,22 @@ MY(reloc_howto_type_lookup) (abfd, code)
}
}
+static reloc_howto_type *
+MY(reloc_name_lookup) (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (mips_howto_table_ext) / sizeof (mips_howto_table_ext[0]);
+ i++)
+ if (mips_howto_table_ext[i].name != NULL
+ && strcasecmp (mips_howto_table_ext[i].name, r_name) == 0)
+ return &mips_howto_table_ext[i];
+
+ return NULL;
+}
+
/* This is just like the standard aoutx.h version but we need to do our
own mapping of external reloc type values to howto entries. */
long
diff --git a/contrib/binutils/bfd/netbsd-core.c b/contrib/binutils/bfd/netbsd-core.c
index e9111a9..913e862 100644
--- a/contrib/binutils/bfd/netbsd-core.c
+++ b/contrib/binutils/bfd/netbsd-core.c
@@ -1,6 +1,6 @@
/* BFD back end for NetBSD style core files
Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005
+ 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Paul Kranenburg, EUR
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libaout.h" /* BFD a.out internal data structures. */
@@ -126,11 +126,10 @@ netbsd_core_file_p (bfd *abfd)
flags = SEC_ALLOC + SEC_HAS_CONTENTS;
break;
}
- asect = bfd_make_section_anyway (abfd, sname);
+ asect = bfd_make_section_anyway_with_flags (abfd, sname, flags);
if (asect == NULL)
goto punt;
- asect->flags = flags;
asect->size = coreseg.c_size;
asect->vma = coreseg.c_addr;
asect->filepos = offset;
@@ -159,11 +158,12 @@ netbsd_core_file_p (bfd *abfd)
asect->size = wcookie_offset;
/* And create the .wcookie section. */
- asect = bfd_make_section_anyway (abfd, ".wcookie");
+ flags = SEC_ALLOC + SEC_HAS_CONTENTS;
+ asect = bfd_make_section_anyway_with_flags (abfd, ".wcookie",
+ flags);
if (asect == NULL)
goto punt;
- asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
asect->size = coreseg.c_size - wcookie_offset;
asect->vma = 0;
asect->filepos = offset + wcookie_offset;
diff --git a/contrib/binutils/bfd/netbsd.h b/contrib/binutils/bfd/netbsd.h
index 92f6a7d..7182eda 100644
--- a/contrib/binutils/bfd/netbsd.h
+++ b/contrib/binutils/bfd/netbsd.h
@@ -1,6 +1,6 @@
/* BFD back-end definitions used by all NetBSD targets.
- Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2005
- Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2002,
+ 2005, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -50,8 +50,8 @@
((exec).a_info = \
((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libaout.h"
diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c
index b02b137..4457a79 100644
--- a/contrib/binutils/bfd/opncls.c
+++ b/contrib/binutils/bfd/opncls.c
@@ -1,6 +1,6 @@
/* opncls.c -- open and close a BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -21,8 +21,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "objalloc.h"
#include "libbfd.h"
#include "libiberty.h"
@@ -115,11 +115,35 @@ _bfd_new_bfd_contained_in (bfd *obfd)
void
_bfd_delete_bfd (bfd *abfd)
{
- bfd_hash_table_free (&abfd->section_htab);
- objalloc_free ((struct objalloc *) abfd->memory);
+ if (abfd->memory)
+ {
+ bfd_hash_table_free (&abfd->section_htab);
+ objalloc_free ((struct objalloc *) abfd->memory);
+ }
free (abfd);
}
+/* Free objalloc memory. */
+
+bfd_boolean
+_bfd_free_cached_info (bfd *abfd)
+{
+ if (abfd->memory)
+ {
+ bfd_hash_table_free (&abfd->section_htab);
+ objalloc_free ((struct objalloc *) abfd->memory);
+
+ abfd->sections = NULL;
+ abfd->section_last = NULL;
+ abfd->outsymbols = NULL;
+ abfd->tdata.any = NULL;
+ abfd->usrdata = NULL;
+ abfd->memory = NULL;
+ }
+
+ return TRUE;
+}
+
/*
SECTION
Opening and closing BFDs
@@ -360,7 +384,10 @@ SYNOPSIS
file_ptr nbytes,
file_ptr offset),
int (*close) (struct bfd *nbfd,
- void *stream));
+ void *stream),
+ int (*stat) (struct bfd *abfd,
+ void *stream,
+ struct stat *sb));
DESCRIPTION
@@ -387,6 +414,10 @@ DESCRIPTION
<<bfd_close>>. @var{close} either succeeds returning 0, or
fails returning -1 (setting <<bfd_error>>).
+ Calls @var{stat} to fill in a stat structure for bfd_stat,
+ bfd_get_size, and bfd_get_mtime calls. @var{stat} returns 0
+ on success, or returns -1 on failure (setting <<bfd_error>>).
+
If <<bfd_openr_iovec>> returns <<NULL>> then an error has
occurred. Possible errors are <<bfd_error_no_memory>>,
<<bfd_error_invalid_target>> and <<bfd_error_system_call>>.
@@ -399,6 +430,7 @@ struct opncls
file_ptr (*pread) (struct bfd *abfd, void *stream, void *buf,
file_ptr nbytes, file_ptr offset);
int (*close) (struct bfd *abfd, void *stream);
+ int (*stat) (struct bfd *abfd, void *stream, struct stat *sb);
file_ptr where;
};
@@ -461,10 +493,15 @@ opncls_bflush (struct bfd *abfd ATTRIBUTE_UNUSED)
}
static int
-opncls_bstat (struct bfd *abfd ATTRIBUTE_UNUSED, struct stat *sb)
+opncls_bstat (struct bfd *abfd, struct stat *sb)
{
+ struct opncls *vec = abfd->iostream;
+
memset (sb, 0, sizeof (*sb));
- return 0;
+ if (vec->stat == NULL)
+ return 0;
+
+ return (vec->stat) (abfd, vec->stream, sb);
}
static const struct bfd_iovec opncls_iovec = {
@@ -483,7 +520,10 @@ bfd_openr_iovec (const char *filename, const char *target,
file_ptr nbytes,
file_ptr offset),
int (*close) (struct bfd *nbfd,
- void *stream))
+ void *stream),
+ int (*stat) (struct bfd *abfd,
+ void *stream,
+ struct stat *sb))
{
bfd *nbfd;
const bfd_target *target_vec;
@@ -515,6 +555,7 @@ bfd_openr_iovec (const char *filename, const char *target,
vec->stream = stream;
vec->pread = pread;
vec->close = close;
+ vec->stat = stat;
nbfd->iovec = &opncls_iovec;
nbfd->iostream = vec;
@@ -1321,6 +1362,7 @@ bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename)
{
asection *sect;
bfd_size_type debuglink_size;
+ flagword flags;
if (abfd == NULL || filename == NULL)
{
@@ -1339,16 +1381,11 @@ bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename)
return NULL;
}
- sect = bfd_make_section (abfd, GNU_DEBUGLINK);
+ flags = SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING;
+ sect = bfd_make_section_with_flags (abfd, GNU_DEBUGLINK, flags);
if (sect == NULL)
return NULL;
- if (! bfd_set_section_flags (abfd, sect,
- SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING))
- /* XXX Should we delete the section from the bfd ? */
- return NULL;
-
-
debuglink_size = strlen (filename) + 1;
debuglink_size += 3;
debuglink_size &= ~3;
diff --git a/contrib/binutils/bfd/osf-core.c b/contrib/binutils/bfd/osf-core.c
index cc6c4dc..b9472ab 100644
--- a/contrib/binutils/bfd/osf-core.c
+++ b/contrib/binutils/bfd/osf-core.c
@@ -1,6 +1,6 @@
/* BFD back-end for OSF/1 core files.
- Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
+ 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -21,8 +21,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
/* This file can only be compiled on systems which use OSF/1 style
core files. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include <sys/user.h>
@@ -67,11 +67,10 @@ make_bfd_asection (abfd, name, flags, size, vma, filepos)
{
asection *asect;
- asect = bfd_make_section_anyway (abfd, name);
+ asect = bfd_make_section_anyway_with_flags (abfd, name, flags);
if (!asect)
return NULL;
- asect->flags = flags;
asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
@@ -95,7 +94,7 @@ osf_core_core_file_p (abfd)
if (val != sizeof core_header)
return NULL;
- if (strncmp (core_header.magic, "Core", 4) != 0)
+ if (! CONST_STRNEQ (core_header.magic, "Core"))
return NULL;
core_hdr (abfd) = (struct osf_core_struct *)
diff --git a/contrib/binutils/bfd/pe-arm-wince.c b/contrib/binutils/bfd/pe-arm-wince.c
new file mode 100644
index 0000000..a13594f
--- /dev/null
+++ b/contrib/binutils/bfd/pe-arm-wince.c
@@ -0,0 +1,37 @@
+/* BFD back-end for ARM WINCE PE files.
+ Copyright 2006 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#define TARGET_UNDERSCORE 0
+#define USER_LABEL_PREFIX ""
+
+#define TARGET_LITTLE_SYM arm_wince_pe_little_vec
+#define TARGET_LITTLE_NAME "pe-arm-wince-little"
+#define TARGET_BIG_SYM arm_wince_pe_big_vec
+#define TARGET_BIG_NAME "pe-arm-wince-big"
+
+#define bfd_arm_allocate_interworking_sections \
+ bfd_arm_wince_pe_allocate_interworking_sections
+#define bfd_arm_get_bfd_for_interworking \
+ bfd_arm_wince_pe_get_bfd_for_interworking
+#define bfd_arm_process_before_allocation \
+ bfd_arm_wince_pe_process_before_allocation
+
+#define LOCAL_LABEL_PREFIX "."
+
+#include "pe-arm.c"
diff --git a/contrib/binutils/bfd/pe-arm.c b/contrib/binutils/bfd/pe-arm.c
index dba9c1b..5700e23 100644
--- a/contrib/binutils/bfd/pe-arm.c
+++ b/contrib/binutils/bfd/pe-arm.c
@@ -1,5 +1,6 @@
/* BFD back-end for ARM PECOFF files.
- Copyright 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2000, 2001, 2002, 2007
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,8 +18,19 @@ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
+/* Do this before including bfd.h, so we prototype the right functions. */
+
+#ifndef bfd_arm_allocate_interworking_sections
+#define bfd_arm_allocate_interworking_sections \
+ bfd_armpe_allocate_interworking_sections
+#define bfd_arm_get_bfd_for_interworking \
+ bfd_armpe_get_bfd_for_interworking
+#define bfd_arm_process_before_allocation \
+ bfd_armpe_process_before_allocation
+#endif
+
#include "sysdep.h"
+#include "bfd.h"
#ifndef TARGET_LITTLE_SYM
#define TARGET_LITTLE_SYM armpe_little_vec
@@ -31,17 +43,22 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define PCRELOFFSET TRUE
#define COFF_LONG_SECTION_NAMES
-#ifndef bfd_arm_allocate_interworking_sections
-#define bfd_arm_allocate_interworking_sections \
- bfd_arm_pe_allocate_interworking_sections
-#define bfd_arm_get_bfd_for_interworking \
- bfd_arm_pe_get_bfd_for_interworking
-#define bfd_arm_process_before_allocation \
- bfd_arm_pe_process_before_allocation
-#endif
-
-#ifdef ARM_WINCE
-#define TARGET_UNDERSCORE 0
-#endif
+#define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
#include "coff-arm.c"
diff --git a/contrib/binutils/bfd/pe-i386.c b/contrib/binutils/bfd/pe-i386.c
index 7c102b4..72aacf0 100644
--- a/contrib/binutils/bfd/pe-i386.c
+++ b/contrib/binutils/bfd/pe-i386.c
@@ -1,5 +1,6 @@
/* BFD back-end for Intel 386 PECOFF files.
- Copyright 1995, 1996, 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2001, 2002, 2004, 2007
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,8 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#define TARGET_SYM i386pe_vec
#define TARGET_NAME "pe-i386"
@@ -34,10 +35,16 @@
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".data$"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".rdata$"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".text$"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
diff --git a/contrib/binutils/bfd/pe-mips.c b/contrib/binutils/bfd/pe-mips.c
index 03d6bec..628cecf 100644
--- a/contrib/binutils/bfd/pe-mips.c
+++ b/contrib/binutils/bfd/pe-mips.c
@@ -1,6 +1,6 @@
/* BFD back-end for MIPS PE COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Modified from coff-i386.c by DJ Delorie, dj@cygnus.com
This file is part of BFD, the Binary File Descriptor library.
@@ -23,8 +23,8 @@
#define COFF_LONG_SECTION_NAMES
#define PCRELOFFSET TRUE
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "coff/mipspe.h"
#include "coff/internal.h"
@@ -453,6 +453,7 @@ coff_mips_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED,
#define coff_rtype_to_howto coff_mips_rtype_to_howto
#define coff_bfd_reloc_type_lookup coff_mips_reloc_type_lookup
+#define coff_bfd_reloc_name_lookup coff_mips_reloc_name_lookup
/* Get the howto structure for a generic reloc type. */
@@ -496,6 +497,22 @@ coff_mips_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
return & howto_table [mips_type];
}
+static reloc_howto_type *
+coff_mips_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+ const char *r_name)
+{
+ unsigned int i;
+
+ for (i = 0;
+ i < sizeof (howto_table) / sizeof (howto_table[0]);
+ i++)
+ if (howto_table[i].name != NULL
+ && strcasecmp (howto_table[i].name, r_name) == 0)
+ return &howto_table[i];
+
+ return NULL;
+}
+
static void
mips_swap_reloc_in (bfd * abfd, void * src, void * dst)
{
diff --git a/contrib/binutils/bfd/pe-ppc.c b/contrib/binutils/bfd/pe-ppc.c
index 93cf636..fa6404e 100644
--- a/contrib/binutils/bfd/pe-ppc.c
+++ b/contrib/binutils/bfd/pe-ppc.c
@@ -1,5 +1,5 @@
/* BFD back-end for PowerPC PECOFF files.
- Copyright 1995, 1996, 1999, 2001 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1999, 2001, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -18,8 +18,8 @@ along with this program; if not, write to the Free Software
Foundation, 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#define E_FILENMLEN 18
diff --git a/contrib/binutils/bfd/pe-x86_64.c b/contrib/binutils/bfd/pe-x86_64.c
new file mode 100644
index 0000000..0c6badf
--- /dev/null
+++ b/contrib/binutils/bfd/pe-x86_64.c
@@ -0,0 +1,53 @@
+/* BFD back-end for Intel/AMD x86_64 PECOFF files.
+ Copyright 2006, 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Kai Tietz, OneVision Software GmbH&CoKg. */
+
+#include "sysdep.h"
+#include "bfd.h"
+
+#define TARGET_SYM x86_64pe_vec
+#define TARGET_NAME "pe-x86-64"
+#define COFF_WITH_PE
+#define COFF_WITH_pex64
+#define PCRELOFFSET TRUE
+#define TARGET_UNDERSCORE '_'
+#define COFF_LONG_SECTION_NAMES
+#define COFF_SUPPORT_GNU_LINKONCE
+#define COFF_LONG_FILENAMES
+
+#define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
+
+#include "coff-x86_64.c"
diff --git a/contrib/binutils/bfd/peXXigen.c b/contrib/binutils/bfd/peXXigen.c
index 7130021..f96825f 100644
--- a/contrib/binutils/bfd/peXXigen.c
+++ b/contrib/binutils/bfd/peXXigen.c
@@ -1,6 +1,6 @@
/* Support for the generic parts of PE/PEI; the common executable parts.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+ 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -52,12 +52,12 @@
on this code has a chance of getting something accomplished without
wasting too much time. */
-/* This expands into COFF_WITH_pe or COFF_WITH_pep depending on whether
- we're compiling for straight PE or PE+. */
+/* This expands into COFF_WITH_pe, COFF_WITH_pep, or COFF_WITH_pex64
+ depending on whether we're compiling for straight PE or PE+. */
#define COFF_WITH_XX
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "coff/internal.h"
@@ -67,7 +67,9 @@
within PE/PEI, so we get them from there. FIXME: The lack of
variance is an assumption which may prove to be incorrect if new
PE/PEI targets are created. */
-#ifdef COFF_WITH_pep
+#if defined COFF_WITH_pex64
+# include "coff/x86_64.h"
+#elif defined COFF_WITH_pep
# include "coff/ia64.h"
#else
# include "coff/i386.h"
@@ -77,7 +79,7 @@
#include "libcoff.h"
#include "libpei.h"
-#ifdef COFF_WITH_pep
+#if defined COFF_WITH_pep || defined COFF_WITH_pex64
# undef AOUTSZ
# define AOUTSZ PEPAOUTSZ
# define PEAOUTHDR PEPAOUTHDR
@@ -147,6 +149,7 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1)
int unused_section_number = 0;
asection *sec;
char *name;
+ flagword flags;
for (sec = abfd->sections; sec; sec = sec->next)
if (unused_section_number <= sec->target_index)
@@ -156,7 +159,8 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1)
if (name == NULL)
return;
strcpy (name, in->n_name);
- sec = bfd_make_section_anyway (abfd, name);
+ flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD;
+ sec = bfd_make_section_anyway_with_flags (abfd, name, flags);
sec->vma = 0;
sec->lma = 0;
@@ -169,7 +173,6 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1)
sec->userdata = NULL;
sec->next = NULL;
sec->alignment_power = 2;
- sec->flags = SEC_HAS_CONTENTS | SEC_ALLOC | SEC_DATA | SEC_LOAD;
sec->target_index = unused_section_number;
@@ -385,10 +388,11 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
void * aouthdr_ext1,
void * aouthdr_int1)
{
- struct internal_extra_pe_aouthdr *a;
- PEAOUTHDR * src = (PEAOUTHDR *) (aouthdr_ext1);
+ PEAOUTHDR * src = (PEAOUTHDR *) aouthdr_ext1;
AOUTHDR * aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
- struct internal_aouthdr *aouthdr_int = (struct internal_aouthdr *)aouthdr_int1;
+ struct internal_aouthdr *aouthdr_int
+ = (struct internal_aouthdr *) aouthdr_int1;
+ struct internal_extra_pe_aouthdr *a = &aouthdr_int->pe;
aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
@@ -398,13 +402,21 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
aouthdr_int->text_start =
GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
/* PE32+ does not have data_start member! */
aouthdr_int->data_start =
GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
+ a->BaseOfData = aouthdr_int->data_start;
#endif
- a = &aouthdr_int->pe;
+ a->Magic = aouthdr_int->magic;
+ a->MajorLinkerVersion = H_GET_8 (abfd, aouthdr_ext->vstamp);
+ a->MinorLinkerVersion = H_GET_8 (abfd, aouthdr_ext->vstamp + 1);
+ a->SizeOfCode = aouthdr_int->tsize ;
+ a->SizeOfInitializedData = aouthdr_int->dsize ;
+ a->SizeOfUninitializedData = aouthdr_int->bsize ;
+ a->AddressOfEntryPoint = aouthdr_int->entry;
+ a->BaseOfCode = aouthdr_int->text_start;
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);
@@ -441,6 +453,7 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
/* If data directory is empty, rva also should be 0. */
int size =
H_GET_32 (abfd, src->DataDirectory[idx][1]);
+
a->DataDirectory[idx].Size = size;
if (size)
@@ -454,7 +467,7 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
if (aouthdr_int->entry)
{
aouthdr_int->entry += a->ImageBase;
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
aouthdr_int->entry &= 0xffffffff;
#endif
}
@@ -462,12 +475,12 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
if (aouthdr_int->tsize)
{
aouthdr_int->text_start += a->ImageBase;
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
aouthdr_int->text_start &= 0xffffffff;
#endif
}
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
/* PE32+ does not have data_start member! */
if (aouthdr_int->dsize)
{
@@ -480,9 +493,9 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd,
/* These three fields are normally set up by ppc_relocate_section.
In the case of reading a file in, we can pick them up from the
DataDirectory. */
- first_thunk_address = a->DataDirectory[12].VirtualAddress;
- thunk_size = a->DataDirectory[12].Size;
- import_table_size = a->DataDirectory[1].Size;
+ first_thunk_address = a->DataDirectory[PE_IMPORT_ADDRESS_TABLE].VirtualAddress;
+ thunk_size = a->DataDirectory[PE_IMPORT_ADDRESS_TABLE].Size;
+ import_table_size = a->DataDirectory[PE_IMPORT_TABLE].Size;
#endif
}
@@ -540,14 +553,14 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
fa = extra->FileAlignment;
ib = extra->ImageBase;
- idata2 = pe->pe_opthdr.DataDirectory[1];
- idata5 = pe->pe_opthdr.DataDirectory[12];
- tls = pe->pe_opthdr.DataDirectory[9];
+ idata2 = pe->pe_opthdr.DataDirectory[PE_IMPORT_TABLE];
+ idata5 = pe->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE];
+ tls = pe->pe_opthdr.DataDirectory[PE_TLS_TABLE];
if (aouthdr_in->tsize)
{
aouthdr_in->text_start -= ib;
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
aouthdr_in->text_start &= 0xffffffff;
#endif
}
@@ -555,7 +568,7 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
if (aouthdr_in->dsize)
{
aouthdr_in->data_start -= ib;
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
aouthdr_in->data_start &= 0xffffffff;
#endif
}
@@ -563,7 +576,7 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
if (aouthdr_in->entry)
{
aouthdr_in->entry -= ib;
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
aouthdr_in->entry &= 0xffffffff;
#endif
}
@@ -592,11 +605,11 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
So - we copy the input values into the output values, and then, if
a final link is going to be performed, it can overwrite them. */
- extra->DataDirectory[1] = idata2;
- extra->DataDirectory[12] = idata5;
- extra->DataDirectory[9] = tls;
+ extra->DataDirectory[PE_IMPORT_TABLE] = idata2;
+ extra->DataDirectory[PE_IMPORT_ADDRESS_TABLE] = idata5;
+ extra->DataDirectory[PE_TLS_TABLE] = tls;
- if (extra->DataDirectory[1].VirtualAddress == 0)
+ if (extra->DataDirectory[PE_IMPORT_TABLE].VirtualAddress == 0)
/* Until other .idata fixes are made (pending patch), the entry for
.idata is needed for backwards compatibility. FIXME. */
add_data_entry (abfd, extra, 1, ".idata", ib);
@@ -632,16 +645,22 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
in the virt_size field). Files have been seen (from MSVC
5.0 link.exe) where the file size of the .data segment is
quite small compared to the virtual size. Without this
- fix, strip munges the file. */
+ fix, strip munges the file.
+
+ FIXME: We need to handle holes between sections, which may
+ happpen when we covert from another format. We just use
+ the virtual address and virtual size of the last section
+ for the image size. */
if (coff_section_data (abfd, sec) != NULL
&& pei_section_data (abfd, sec) != NULL)
- isize += SA (FA (pei_section_data (abfd, sec)->virt_size));
+ isize = (sec->vma - extra->ImageBase
+ + SA (FA (pei_section_data (abfd, sec)->virt_size)));
}
aouthdr_in->dsize = dsize;
aouthdr_in->tsize = tsize;
extra->SizeOfHeaders = hsize;
- extra->SizeOfImage = SA (hsize) + isize;
+ extra->SizeOfImage = isize;
}
H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->standard.magic);
@@ -660,7 +679,7 @@ _bfd_XXi_swap_aouthdr_out (bfd * abfd, void * in, void * out)
PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
aouthdr_out->standard.text_start);
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
/* PE32+ does not have data_start member! */
PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
aouthdr_out->standard.data_start);
@@ -1017,7 +1036,7 @@ static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] =
N_("Bound Import Directory"),
N_("Import Address Table Directory"),
N_("Delay Import Directory"),
- N_("Reserved"),
+ N_("CLR Runtime Header"),
N_("Reserved")
};
@@ -1051,9 +1070,9 @@ pe_print_idata (bfd * abfd, void * vfile)
bfd_vma addr;
- addr = extra->DataDirectory[1].VirtualAddress;
+ addr = extra->DataDirectory[PE_IMPORT_TABLE].VirtualAddress;
- if (addr == 0 && extra->DataDirectory[1].Size == 0)
+ if (addr == 0 && extra->DataDirectory[PE_IMPORT_TABLE].Size == 0)
{
/* Maybe the extra header isn't there. Look for the section. */
section = bfd_get_section_by_name (abfd, ".idata");
@@ -1171,7 +1190,7 @@ pe_print_idata (bfd * abfd, void * vfile)
bfd_size_type j;
char *dll;
- /* Print (i + extra->DataDirectory[1].VirtualAddress). */
+ /* Print (i + extra->DataDirectory[PE_IMPORT_TABLE].VirtualAddress). */
fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff));
hint_addr = bfd_get_32 (abfd, data + i + dataoff);
time_stamp = bfd_get_32 (abfd, data + i + 4 + dataoff);
@@ -1212,8 +1231,8 @@ pe_print_idata (bfd * abfd, void * vfile)
ft_data = data;
ft_idx = first_thunk - adj;
ft_allocated = 0;
-
- if (first_thunk != hint_addr)
+
+ if (first_thunk != hint_addr)
{
/* Find the section which contains the first thunk. */
for (ft_section = abfd->sections;
@@ -1261,6 +1280,38 @@ pe_print_idata (bfd * abfd, void * vfile)
}
/* Print HintName vector entries. */
+#ifdef COFF_WITH_pex64
+ for (j = 0; j < datasize; j += 8)
+ {
+ unsigned long member = bfd_get_32 (abfd, data + idx + j);
+ unsigned long member_high = bfd_get_32 (abfd, data + idx + j + 4);
+
+ if (!member && !member_high)
+ break;
+
+ if (member_high & 0x80000000)
+ fprintf (file, "\t%lx%08lx\t %4lx%08lx <none>",
+ member_high,member, member_high & 0x7fffffff, member);
+ else
+ {
+ int ordinal;
+ char *member_name;
+
+ ordinal = bfd_get_16 (abfd, data + member - adj);
+ member_name = (char *) data + member - adj + 2;
+ fprintf (file, "\t%04lx\t %4d %s",member, ordinal, member_name);
+ }
+
+ /* If the time stamp is not zero, the import address
+ table holds actual addresses. */
+ if (time_stamp != 0
+ && first_thunk != 0
+ && first_thunk != hint_addr)
+ fprintf (file, "\t%04lx",
+ (long) bfd_get_32 (abfd, ft_data + ft_idx + j));
+ fprintf (file, "\n");
+ }
+#else
for (j = 0; j < datasize; j += 4)
{
unsigned long member = bfd_get_32 (abfd, data + idx + j);
@@ -1293,7 +1344,7 @@ pe_print_idata (bfd * abfd, void * vfile)
fprintf (file, "\n");
}
-
+#endif
if (ft_allocated)
free (ft_data);
}
@@ -1336,9 +1387,9 @@ pe_print_edata (bfd * abfd, void * vfile)
bfd_vma addr;
- addr = extra->DataDirectory[0].VirtualAddress;
+ addr = extra->DataDirectory[PE_EXPORT_TABLE].VirtualAddress;
- if (addr == 0 && extra->DataDirectory[0].Size == 0)
+ if (addr == 0 && extra->DataDirectory[PE_EXPORT_TABLE].Size == 0)
{
/* Maybe the extra header isn't there. Look for the section. */
section = bfd_get_section_by_name (abfd, ".edata");
@@ -1367,7 +1418,7 @@ pe_print_edata (bfd * abfd, void * vfile)
}
dataoff = addr - section->vma;
- datasize = extra->DataDirectory[0].Size;
+ datasize = extra->DataDirectory[PE_EXPORT_TABLE].Size;
if (datasize > section->size - dataoff)
{
fprintf (file,
@@ -1533,10 +1584,10 @@ pe_print_edata (bfd * abfd, void * vfile)
static bfd_boolean
pe_print_pdata (bfd * abfd, void * vfile)
{
-#ifdef COFF_WITH_pep
-# define PDATA_ROW_SIZE (3*8)
+#if defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+# define PDATA_ROW_SIZE (3 * 8)
#else
-# define PDATA_ROW_SIZE (5*4)
+# define PDATA_ROW_SIZE (5 * 4)
#endif
FILE *file = (FILE *) vfile;
bfd_byte *data = 0;
@@ -1559,7 +1610,7 @@ pe_print_pdata (bfd * abfd, void * vfile)
fprintf (file,
_("\nThe Function Table (interpreted .pdata section contents)\n"));
-#ifdef COFF_WITH_pep
+#if defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
fprintf (file,
_(" vma:\t\t\tBegin Address End Address Unwind Info\n"));
#else
@@ -1613,7 +1664,7 @@ pe_print_pdata (bfd * abfd, void * vfile)
fprintf_vma (file, begin_addr); fputc (' ', file);
fprintf_vma (file, end_addr); fputc (' ', file);
fprintf_vma (file, eh_handler);
-#ifndef COFF_WITH_pep
+#if !defined(COFF_WITH_pep) || defined(COFF_WITH_pex64)
fputc (' ', file);
fprintf_vma (file, eh_data); fputc (' ', file);
fprintf_vma (file, prolog_end_addr);
@@ -1766,6 +1817,7 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
pe_data_type *pe = pe_data (abfd);
struct internal_extra_pe_aouthdr *i = &pe->pe_opthdr;
const char *subsystem_name = NULL;
+ const char *name;
/* The MS dumpbin program reportedly ands with 0xff0f before
printing the characteristics field. Not sure why. No reason to
@@ -1791,6 +1843,52 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
time_t t = pe->coff.timestamp;
fprintf (file, "\nTime/Date\t\t%s", ctime (&t));
}
+
+#ifndef IMAGE_NT_OPTIONAL_HDR_MAGIC
+# define IMAGE_NT_OPTIONAL_HDR_MAGIC 0x10b
+#endif
+#ifndef IMAGE_NT_OPTIONAL_HDR64_MAGIC
+# define IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
+#endif
+#ifndef IMAGE_NT_OPTIONAL_HDRROM_MAGIC
+# define IMAGE_NT_OPTIONAL_HDRROM_MAGIC 0x107
+#endif
+
+ switch (i->Magic)
+ {
+ case IMAGE_NT_OPTIONAL_HDR_MAGIC:
+ name = "PE32";
+ break;
+ case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
+ name = "PE32+";
+ break;
+ case IMAGE_NT_OPTIONAL_HDRROM_MAGIC:
+ name = "ROM";
+ break;
+ default:
+ name = NULL;
+ break;
+ }
+ fprintf (file, "Magic\t\t\t%04x", i->Magic);
+ if (name)
+ fprintf (file, "\t(%s)",name);
+ fprintf (file, "\nMajorLinkerVersion\t%d\n", i->MajorLinkerVersion);
+ fprintf (file, "MinorLinkerVersion\t%d\n", i->MinorLinkerVersion);
+ fprintf (file, "SizeOfCode\t\t%08lx\n", i->SizeOfCode);
+ fprintf (file, "SizeOfInitializedData\t%08lx\n",
+ i->SizeOfInitializedData);
+ fprintf (file, "SizeOfUninitializedData\t%08lx\n",
+ i->SizeOfUninitializedData);
+ fprintf (file, "AddressOfEntryPoint\t");
+ fprintf_vma (file, i->AddressOfEntryPoint);
+ fprintf (file, "\nBaseOfCode\t\t");
+ fprintf_vma (file, i->BaseOfCode);
+#if !defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64)
+ /* PE32+ does not have BaseOfData member! */
+ fprintf (file, "\nBaseOfData\t\t");
+ fprintf_vma (file, i->BaseOfData);
+#endif
+
fprintf (file, "\nImageBase\t\t");
fprintf_vma (file, i->ImageBase);
fprintf (file, "\nSectionAlignment\t");
@@ -1837,6 +1935,16 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile)
case IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER:
subsystem_name = "EFI runtime driver";
break;
+ // These are from revision 8.0 of the MS PE/COFF spec
+ case IMAGE_SUBSYSTEM_EFI_ROM:
+ subsystem_name = "EFI ROM";
+ break;
+ case IMAGE_SUBSYSTEM_XBOX:
+ subsystem_name = "XBOX";
+ break;
+ // Added default case for clarity - subsystem_name is NULL anyway.
+ default:
+ subsystem_name = NULL;
}
fprintf (file, "Subsystem\t\t%08x", i->Subsystem);
@@ -1889,8 +1997,8 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd)
if we don't remove this entry as well. */
if (! pe_data (obfd)->has_reloc_section)
{
- pe_data (obfd)->pe_opthdr.DataDirectory[5].VirtualAddress = 0;
- pe_data (obfd)->pe_opthdr.DataDirectory[5].Size = 0;
+ pe_data (obfd)->pe_opthdr.DataDirectory[PE_BASE_RELOCATION_TABLE].VirtualAddress = 0;
+ pe_data (obfd)->pe_opthdr.DataDirectory[PE_BASE_RELOCATION_TABLE].Size = 0;
}
return TRUE;
}
@@ -1949,6 +2057,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
{
struct coff_link_hash_entry *h1;
struct bfd_link_info *info = pfinfo->info;
+ bfd_boolean result = TRUE;
/* There are a few fields that need to be filled in now while we
have symbol table access.
@@ -1962,49 +2071,103 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo)
".idata$2", FALSE, FALSE, TRUE);
if (h1 != NULL)
{
- pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress =
- (h1->root.u.def.value
- + h1->root.u.def.section->output_section->vma
- + h1->root.u.def.section->output_offset);
+ /* PR ld/2729: We cannot rely upon all the output sections having been
+ created properly, so check before referencing them. Issue a warning
+ message for any sections tht could not be found. */
+ if (h1->root.u.def.section != NULL
+ && h1->root.u.def.section->output_section != NULL)
+ pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_TABLE].VirtualAddress =
+ (h1->root.u.def.value
+ + h1->root.u.def.section->output_section->vma
+ + h1->root.u.def.section->output_offset);
+ else
+ {
+ _bfd_error_handler
+ (_("%B: unable to fill in DataDictionary[1] because .idata$2 is missing"),
+ abfd);
+ result = FALSE;
+ }
+
h1 = coff_link_hash_lookup (coff_hash_table (info),
".idata$4", FALSE, FALSE, TRUE);
- pe_data (abfd)->pe_opthdr.DataDirectory[1].Size =
- ((h1->root.u.def.value
- + h1->root.u.def.section->output_section->vma
- + h1->root.u.def.section->output_offset)
- - pe_data (abfd)->pe_opthdr.DataDirectory[1].VirtualAddress);
+ if (h1 != NULL
+ && h1->root.u.def.section != NULL
+ && h1->root.u.def.section->output_section != NULL)
+ pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_TABLE].Size =
+ ((h1->root.u.def.value
+ + h1->root.u.def.section->output_section->vma
+ + h1->root.u.def.section->output_offset)
+ - pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_TABLE].VirtualAddress);
+ else
+ {
+ _bfd_error_handler
+ (_("%B: unable to fill in DataDictionary[1] because .idata$4 is missing"),
+ abfd);
+ result = FALSE;
+ }
/* The import address table. This is the size/address of
.idata$5. */
h1 = coff_link_hash_lookup (coff_hash_table (info),
".idata$5", FALSE, FALSE, TRUE);
- pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress =
- (h1->root.u.def.value
- + h1->root.u.def.section->output_section->vma
- + h1->root.u.def.section->output_offset);
+ if (h1 != NULL
+ && h1->root.u.def.section != NULL
+ && h1->root.u.def.section->output_section != NULL)
+ pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE].VirtualAddress =
+ (h1->root.u.def.value
+ + h1->root.u.def.section->output_section->vma
+ + h1->root.u.def.section->output_offset);
+ else
+ {
+ _bfd_error_handler
+ (_("%B: unable to fill in DataDictionary[12] because .idata$5 is missing"),
+ abfd);
+ result = FALSE;
+ }
+
h1 = coff_link_hash_lookup (coff_hash_table (info),
".idata$6", FALSE, FALSE, TRUE);
- pe_data (abfd)->pe_opthdr.DataDirectory[12].Size =
- ((h1->root.u.def.value
- + h1->root.u.def.section->output_section->vma
- + h1->root.u.def.section->output_offset)
- - pe_data (abfd)->pe_opthdr.DataDirectory[12].VirtualAddress);
+ if (h1 != NULL
+ && h1->root.u.def.section != NULL
+ && h1->root.u.def.section->output_section != NULL)
+ pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE].Size =
+ ((h1->root.u.def.value
+ + h1->root.u.def.section->output_section->vma
+ + h1->root.u.def.section->output_offset)
+ - pe_data (abfd)->pe_opthdr.DataDirectory[PE_IMPORT_ADDRESS_TABLE].VirtualAddress);
+ else
+ {
+ _bfd_error_handler
+ (_("%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"),
+ abfd);
+ result = FALSE;
+ }
}
h1 = coff_link_hash_lookup (coff_hash_table (info),
"__tls_used", FALSE, FALSE, TRUE);
if (h1 != NULL)
{
- pe_data (abfd)->pe_opthdr.DataDirectory[9].VirtualAddress =
- (h1->root.u.def.value
- + h1->root.u.def.section->output_section->vma
- + h1->root.u.def.section->output_offset
- - pe_data (abfd)->pe_opthdr.ImageBase);
- pe_data (abfd)->pe_opthdr.DataDirectory[9].Size = 0x18;
+ if (h1->root.u.def.section != NULL
+ && h1->root.u.def.section->output_section != NULL)
+ pe_data (abfd)->pe_opthdr.DataDirectory[PE_TLS_TABLE].VirtualAddress =
+ (h1->root.u.def.value
+ + h1->root.u.def.section->output_section->vma
+ + h1->root.u.def.section->output_offset
+ - pe_data (abfd)->pe_opthdr.ImageBase);
+ else
+ {
+ _bfd_error_handler
+ (_("%B: unable to fill in DataDictionary[9] because __tls_used is missing"),
+ abfd);
+ result = FALSE;
+ }
+
+ pe_data (abfd)->pe_opthdr.DataDirectory[PE_TLS_TABLE].Size = 0x18;
}
/* If we couldn't find idata$2, we either have an excessively
trivial program or are in DEEP trouble; we have to assume trivial
program.... */
- return TRUE;
+ return result;
}
diff --git a/contrib/binutils/bfd/pei-arm-wince.c b/contrib/binutils/bfd/pei-arm-wince.c
new file mode 100644
index 0000000..7d5a3be
--- /dev/null
+++ b/contrib/binutils/bfd/pei-arm-wince.c
@@ -0,0 +1,30 @@
+/* BFD back-end for ARM WINCE PE IMAGE COFF files.
+ Copyright 2006 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#define TARGET_UNDERSCORE 0
+#define USER_LABEL_PREFIX ""
+
+#define TARGET_LITTLE_SYM arm_wince_pei_little_vec
+#define TARGET_LITTLE_NAME "pei-arm-wince-little"
+#define TARGET_BIG_SYM arm_wince_pei_big_vec
+#define TARGET_BIG_NAME "pei-arm-wince-big"
+
+#define LOCAL_LABEL_PREFIX "."
+
+#include "pei-arm.c"
diff --git a/contrib/binutils/bfd/pei-mips.c b/contrib/binutils/bfd/pei-mips.c
index 0c9b962..4405c0a 100644
--- a/contrib/binutils/bfd/pei-mips.c
+++ b/contrib/binutils/bfd/pei-mips.c
@@ -1,5 +1,5 @@
/* BFD back-end for MIPS PE IMAGE COFF files.
- Copyright 1995, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1995, 2000, 2001, 2002, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#define TARGET_SYM mipslpei_vec
#define TARGET_NAME "pei-mips"
diff --git a/contrib/binutils/bfd/pei-x86_64.c b/contrib/binutils/bfd/pei-x86_64.c
new file mode 100644
index 0000000..37d9c7f
--- /dev/null
+++ b/contrib/binutils/bfd/pei-x86_64.c
@@ -0,0 +1,54 @@
+/* BFD back-end for Intel 386 PE IMAGE COFF files.
+ Copyright 2006, 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Kai Tietz, OneVision Software GmbH&CoKg. */
+
+#include "sysdep.h"
+#include "bfd.h"
+
+#define TARGET_SYM x86_64pei_vec
+#define TARGET_NAME "pei-x86-64"
+#define COFF_IMAGE_WITH_PE
+#define COFF_WITH_PE
+#define COFF_WITH_pex64
+#define PCRELOFFSET TRUE
+#define TARGET_UNDERSCORE '_'
+#define COFF_LONG_SECTION_NAMES
+#define COFF_SUPPORT_GNU_LINKONCE
+#define COFF_LONG_FILENAMES
+
+#define COFF_SECTION_ALIGNMENT_ENTRIES \
+{ COFF_SECTION_NAME_EXACT_MATCH (".bss"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".data"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".rdata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".text"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 4 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".idata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_EXACT_MATCH (".pdata"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 2 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".debug"), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }, \
+{ COFF_SECTION_NAME_PARTIAL_MATCH (".gnu.linkonce.wi."), \
+ COFF_ALIGNMENT_FIELD_EMPTY, COFF_ALIGNMENT_FIELD_EMPTY, 0 }
+
+#include "coff-x86_64.c"
diff --git a/contrib/binutils/bfd/peicode.h b/contrib/binutils/bfd/peicode.h
index 2061f41..0f4858f 100644
--- a/contrib/binutils/bfd/peicode.h
+++ b/contrib/binutils/bfd/peicode.h
@@ -1,6 +1,6 @@
/* Support for the generic parts of PE/PEI, for BFD.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005 Free Software Foundation, Inc.
+ 2005, 2006 Free Software Foundation, Inc.
Written by Cygnus Solutions.
This file is part of BFD, the Binary File Descriptor library.
@@ -182,6 +182,10 @@ coff_swap_filehdr_in (bfd * abfd, void * src, void * dst)
#ifdef COFF_IMAGE_WITH_PE
# define coff_swap_filehdr_out _bfd_XXi_only_swap_filehdr_out
+#elif defined COFF_WITH_pex64
+# define coff_swap_filehdr_out _bfd_pex64_only_swap_filehdr_out
+#elif defined COFF_WITH_pep
+# define coff_swap_filehdr_out _bfd_pep_only_swap_filehdr_out
#else
# define coff_swap_filehdr_out _bfd_pe_only_swap_filehdr_out
#endif
@@ -217,7 +221,10 @@ coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in)
if (scnhdr_int->s_vaddr != 0)
{
scnhdr_int->s_vaddr += pe_data (abfd)->pe_opthdr.ImageBase;
+ /* Do not cut upper 32-bits for 64-bit vma. */
+#ifndef COFF_WITH_pex64
scnhdr_int->s_vaddr &= 0xffffffff;
+#endif
}
#ifndef COFF_NO_HACK_SCNHDR_SIZE
@@ -405,8 +412,16 @@ pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd)
+ NUM_ILF_SECTIONS * 9 \
+ STRING_SIZE_SIZE)
#define SIZEOF_IDATA2 (5 * 4)
+
+/* For PEx64 idata4 & 5 have thumb size of 8 bytes. */
+#ifdef COFF_WITH_pex64
+#define SIZEOF_IDATA4 (2 * 4)
+#define SIZEOF_IDATA5 (2 * 4)
+#else
#define SIZEOF_IDATA4 (1 * 4)
#define SIZEOF_IDATA5 (1 * 4)
+#endif
+
#define SIZEOF_IDATA6 (2 + strlen (symbol_name) + 1 + 1)
#define SIZEOF_IDATA7 (strlen (source_dll) + 1 + 1)
#define SIZEOF_ILF_SECTIONS (NUM_ILF_SECTIONS * sizeof (struct coff_section_tdata))
@@ -656,9 +671,20 @@ static jump_table jtab[] =
},
#endif
+#ifdef AMD64MAGIC
+ { AMD64MAGIC,
+ { 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90 },
+ 8, 2
+ },
+#endif
+
#ifdef MC68MAGIC
- { MC68MAGIC, { /* XXX fill me in */ }, 0, 0 },
+ { MC68MAGIC,
+ { /* XXX fill me in */ },
+ 0, 0
+ },
#endif
+
#ifdef MIPS_ARCH_MAGIC_WINCE
{ MIPS_ARCH_MAGIC_WINCE,
{ 0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x08, 0x8d,
@@ -830,8 +856,15 @@ pe_ILF_build_a_bfd (bfd * abfd,
/* XXX - treat as IMPORT_NAME ??? */
abort ();
+#ifdef COFF_WITH_pex64
+ ((unsigned int *) id4->contents)[0] = ordinal;
+ ((unsigned int *) id4->contents)[1] = 0x80000000;
+ ((unsigned int *) id5->contents)[0] = ordinal;
+ ((unsigned int *) id5->contents)[1] = 0x80000000;
+#else
* (unsigned int *) id4->contents = ordinal | 0x80000000;
* (unsigned int *) id5->contents = ordinal | 0x80000000;
+#endif
}
else
{
@@ -1071,6 +1104,12 @@ pe_ILF_object_p (bfd * abfd)
#endif
break;
+ case IMAGE_FILE_MACHINE_AMD64:
+#ifdef AMD64MAGIC
+ magic = AMD64MAGIC;
+#endif
+ break;
+
case IMAGE_FILE_MACHINE_M68K:
#ifdef MC68AGIC
magic = MC68MAGIC;
@@ -1195,6 +1234,25 @@ pe_ILF_object_p (bfd * abfd)
return abfd->xvec;
}
+enum arch_type
+{
+ arch_type_unknown,
+ arch_type_i386,
+ arch_type_x86_64
+};
+
+static enum arch_type
+pe_arch (const char *arch)
+{
+ if (strcmp (arch, "i386") == 0 || strcmp (arch, "ia32") == 0)
+ return arch_type_i386;
+
+ if (strcmp (arch, "x86_64") == 0 || strcmp (arch, "x86-64") == 0)
+ return arch_type_x86_64;
+
+ return arch_type_unknown;
+}
+
static const bfd_target *
pe_bfd_object_p (bfd * abfd)
{
@@ -1202,6 +1260,7 @@ pe_bfd_object_p (bfd * abfd)
struct external_PEI_DOS_hdr dos_hdr;
struct external_PEI_IMAGE_hdr image_hdr;
file_ptr offset;
+ const bfd_target *target;
/* Detect if this a Microsoft Import Library Format element. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
@@ -1266,7 +1325,60 @@ pe_bfd_object_p (bfd * abfd)
return NULL;
}
- return coff_object_p (abfd);
+ target = coff_object_p (abfd);
+ if (target)
+ {
+ pe_data_type *pe = pe_data (abfd);
+ struct internal_extra_pe_aouthdr *i = &pe->pe_opthdr;
+ bfd_boolean efi = i->Subsystem == IMAGE_SUBSYSTEM_EFI_APPLICATION;
+ enum arch_type arch;
+ const bfd_target * const *target_ptr;
+
+ /* Get the machine. */
+ if (bfd_target_efi_p (abfd->xvec))
+ arch = pe_arch (bfd_target_efi_arch (abfd->xvec));
+ else
+ arch = pe_arch (bfd_target_pei_arch (abfd->xvec));
+
+ for (target_ptr = bfd_target_vector; *target_ptr != NULL;
+ target_ptr++)
+ {
+ if (*target_ptr == target
+ || (*target_ptr)->flavour != bfd_target_coff_flavour)
+ continue;
+
+ if (bfd_target_efi_p (*target_ptr))
+ {
+ /* Skip incompatible arch. */
+ if (pe_arch (bfd_target_efi_arch (*target_ptr)) != arch)
+ continue;
+
+ if (efi)
+ {
+ /* TARGET_PTR is an EFI backend. Don't match
+ TARGET with a EFI file. */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ }
+ else if (bfd_target_pei_p (*target_ptr))
+ {
+ /* Skip incompatible arch. */
+ if (pe_arch (bfd_target_pei_arch (*target_ptr)) != arch)
+ continue;
+
+ if (!efi)
+ {
+ /* TARGET_PTR is a PE backend. Don't match
+ TARGET with a PE file. */
+ bfd_set_error (bfd_error_wrong_format);
+ return NULL;
+ }
+ }
+ }
+ }
+
+ return target;
}
#define coff_object_p pe_bfd_object_p
diff --git a/contrib/binutils/bfd/po/BLD-POTFILES.in b/contrib/binutils/bfd/po/BLD-POTFILES.in
index 2dbe723..07ad4b3 100644
--- a/contrib/binutils/bfd/po/BLD-POTFILES.in
+++ b/contrib/binutils/bfd/po/BLD-POTFILES.in
@@ -5,4 +5,5 @@ elf64-ia64.c
elf64-target.h
peigen.c
pepigen.c
+pex64igen.c
targmatch.h
diff --git a/contrib/binutils/bfd/po/Make-in b/contrib/binutils/bfd/po/Make-in
index f11ccb4..1a61992 100644
--- a/contrib/binutils/bfd/po/Make-in
+++ b/contrib/binutils/bfd/po/Make-in
@@ -16,6 +16,7 @@ SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
+top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -78,7 +79,7 @@ INSTOBJEXT = @INSTOBJEXT@
$(MSGFMT) -o $@ $<
.po.gmo:
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
diff --git a/contrib/binutils/bfd/po/SRC-POTFILES.in b/contrib/binutils/bfd/po/SRC-POTFILES.in
index 8bcf979..5a3d361 100644
--- a/contrib/binutils/bfd/po/SRC-POTFILES.in
+++ b/contrib/binutils/bfd/po/SRC-POTFILES.in
@@ -57,6 +57,7 @@ coff-tic80.c
coff-u68k.c
coff-w65.c
coff-we32k.c
+coff-x86_64.c
coff-z80.c
coff-z8k.c
corefile.c
@@ -65,6 +66,7 @@ cpu-arc.c
cpu-arm.c
cpu-avr.c
cpu-bfin.c
+cpu-cr16.c
cpu-cr16c.c
cpu-cris.c
cpu-crx.c
@@ -93,6 +95,7 @@ cpu-m68k.c
cpu-m88k.c
cpu-maxq.c
cpu-mcore.c
+cpu-mep.c
cpu-mips.c
cpu-mmix.c
cpu-msp430.c
@@ -105,8 +108,10 @@ cpu-pj.c
cpu-powerpc.c
cpu-rs6000.c
cpu-s390.c
+cpu-score.c
cpu-sh.c
cpu-sparc.c
+cpu-spu.c
cpu-tic30.c
cpu-tic4x.c
cpu-tic54x.c
@@ -128,12 +133,14 @@ ecofflink.c
ecoffswap.h
efi-app-ia32.c
efi-app-ia64.c
+efi-app-x86_64.c
elf32-am33lin.c
elf32-arc.c
elf32-arm.c
elf32-avr.c
elf32-bfin.c
elf32.c
+elf32-cr16.c
elf32-cr16c.c
elf32-cris.c
elf32-crx.c
@@ -160,6 +167,7 @@ elf32-m68hc1x.c
elf32-m68k.c
elf32-m88k.c
elf32-mcore.c
+elf32-mep.c
elf32-mips.c
elf32-msp430.c
elf32-mt.c
@@ -168,11 +176,13 @@ elf32-or32.c
elf32-pj.c
elf32-ppc.c
elf32-s390.c
+elf32-score.c
elf32-sh64.c
elf32-sh64-com.c
elf32-sh.c
elf32-sh-symbian.c
elf32-sparc.c
+elf32-spu.c
elf32-v850.c
elf32-vax.c
elf32-xc16x.c
@@ -190,6 +200,7 @@ elf64-s390.c
elf64-sh64.c
elf64-sparc.c
elf64-x86-64.c
+elf-attrs.c
elf-bfd.h
elf.c
elfcode.h
@@ -271,21 +282,25 @@ osf-core.c
pc532-mach.c
pdp11.c
pe-arm.c
+pe-arm-wince.c
pef.c
pef.h
pef-traceback.h
pe-i386.c
pei-arm.c
+pei-arm-wince.c
peicode.h
pei-i386.c
pei-mcore.c
pei-mips.c
pei-ppc.c
pei-sh.c
+pei-x86_64.c
pe-mcore.c
pe-mips.c
pe-ppc.c
pe-sh.c
+pe-x86_64.c
ppcboot.c
reloc16.c
reloc.c
diff --git a/contrib/binutils/bfd/po/bfd.pot b/contrib/binutils/bfd/po/bfd.pot
index 37c5729..a01ee37 100644
--- a/contrib/binutils/bfd/po/bfd.pot
+++ b/contrib/binutils/bfd/po/bfd.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-10-25 22:24+0930\n"
+"POT-Creation-Date: 2007-07-02 16:16+0930\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -33,153 +33,162 @@ msgstr ""
msgid "%B: Bad relocation record imported: %d"
msgstr ""
-#: aoutx.h:1244 aoutx.h:1578
+#: aoutx.h:1267 aoutx.h:1601
#, c-format
msgid "%s: can not represent section `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1544
+#: aoutx.h:1567
#, c-format
msgid ""
"%s: can not represent section for symbol `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1546
+#: aoutx.h:1569
msgid "*unknown*"
msgstr ""
-#: aoutx.h:5281
+#: aoutx.h:5311
#, c-format
msgid "%s: relocatable link from %s to %s not supported"
msgstr ""
-#: archive.c:1760
+#: archive.c:1764
msgid "Warning: writing archive was slow: rewriting timestamp\n"
msgstr ""
-#: archive.c:2019
+#: archive.c:2027
msgid "Reading archive file mod timestamp"
msgstr ""
-#: archive.c:2043
+#: archive.c:2051
msgid "Writing updated armap timestamp"
msgstr ""
-#: bfd.c:279
+#: bfd.c:288
msgid "No error"
msgstr ""
-#: bfd.c:280
+#: bfd.c:289
msgid "System call error"
msgstr ""
-#: bfd.c:281
+#: bfd.c:290
msgid "Invalid bfd target"
msgstr ""
-#: bfd.c:282
+#: bfd.c:291
msgid "File in wrong format"
msgstr ""
-#: bfd.c:283
+#: bfd.c:292
msgid "Archive object file in wrong format"
msgstr ""
-#: bfd.c:284
+#: bfd.c:293
msgid "Invalid operation"
msgstr ""
-#: bfd.c:285
+#: bfd.c:294
msgid "Memory exhausted"
msgstr ""
-#: bfd.c:286
+#: bfd.c:295
msgid "No symbols"
msgstr ""
-#: bfd.c:287
+#: bfd.c:296
msgid "Archive has no index; run ranlib to add one"
msgstr ""
-#: bfd.c:288
+#: bfd.c:297
msgid "No more archived files"
msgstr ""
-#: bfd.c:289
+#: bfd.c:298
msgid "Malformed archive"
msgstr ""
-#: bfd.c:290
+#: bfd.c:299
msgid "File format not recognized"
msgstr ""
-#: bfd.c:291
+#: bfd.c:300
msgid "File format is ambiguous"
msgstr ""
-#: bfd.c:292
+#: bfd.c:301
msgid "Section has no contents"
msgstr ""
-#: bfd.c:293
+#: bfd.c:302
msgid "Nonrepresentable section on output"
msgstr ""
-#: bfd.c:294
+#: bfd.c:303
msgid "Symbol needs debug section which does not exist"
msgstr ""
-#: bfd.c:295
+#: bfd.c:304
msgid "Bad value"
msgstr ""
-#: bfd.c:296
+#: bfd.c:305
msgid "File truncated"
msgstr ""
-#: bfd.c:297
+#: bfd.c:306
msgid "File too big"
msgstr ""
-#: bfd.c:298
+#: bfd.c:307
+#, c-format
+msgid "Error reading %s: %s"
+msgstr ""
+
+#: bfd.c:308
msgid "#<Invalid error code>"
msgstr ""
-#: bfd.c:771
+#: bfd.c:829
#, c-format
msgid "BFD %s assertion fail %s:%d"
msgstr ""
-#: bfd.c:787
+#: bfd.c:841
#, c-format
msgid "BFD %s internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: bfd.c:791
+#: bfd.c:845
#, c-format
msgid "BFD %s internal error, aborting at %s line %d\n"
msgstr ""
-#: bfd.c:793
+#: bfd.c:847
msgid "Please report this bug.\n"
msgstr ""
-#: bfdwin.c:202
+#: bfdwin.c:207
#, c-format
msgid "not mapping: data=%lx mapped=%d\n"
msgstr ""
-#: bfdwin.c:205
+#: bfdwin.c:210
#, c-format
msgid "not mapping: env var not set\n"
msgstr ""
-#: binary.c:285
+#: binary.c:283
#, c-format
msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
msgstr ""
-#: coff64-rs6000.c:2109 coff-rs6000.c:3610
+#: cache.c:237
+msgid "reopening %B: %s\n"
+msgstr ""
+
+#: coff64-rs6000.c:2125 coff-rs6000.c:3623
msgid "%B: symbol `%s' has unrecognized smclas %d"
msgstr ""
@@ -193,45 +202,45 @@ msgstr ""
msgid "%B: unknown/unsupported relocation type %d"
msgstr ""
-#: coff-alpha.c:898 coff-alpha.c:935 coff-alpha.c:2007 coff-mips.c:985
+#: coff-alpha.c:898 coff-alpha.c:935 coff-alpha.c:2023 coff-mips.c:1001
msgid "GP relative relocation used when GP not defined"
msgstr ""
-#: coff-alpha.c:1484
+#: coff-alpha.c:1500
msgid "using multiple gp values"
msgstr ""
-#: coff-alpha.c:1543
+#: coff-alpha.c:1559
msgid "%B: unsupported relocation: ALPHA_R_GPRELHIGH"
msgstr ""
-#: coff-alpha.c:1550
+#: coff-alpha.c:1566
msgid "%B: unsupported relocation: ALPHA_R_GPRELLOW"
msgstr ""
-#: coff-alpha.c:1557 elf32-m32r.c:2471 elf64-alpha.c:3912 elf64-alpha.c:4038
-#: elf32-ia64.c:4108 elf64-ia64.c:4108
+#: coff-alpha.c:1573 elf32-m32r.c:2486 elf64-alpha.c:3951 elf64-alpha.c:4104
+#: elf32-ia64.c:4674 elf64-ia64.c:4674
msgid "%B: unknown relocation type %d"
msgstr ""
-#: coff-arm.c:990 elf32-arm.c:1926
+#: coff-arm.c:1035
#, c-format
msgid "%B: unable to find THUMB glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1019 elf32-arm.c:1960
+#: coff-arm.c:1064
#, c-format
msgid "%B: unable to find ARM glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1319 elf32-arm.c:2683
+#: coff-arm.c:1366 elf32-arm.c:4156
#, c-format
msgid ""
"%B(%s): warning: interworking not enabled.\n"
" first occurrence: %B: arm call to thumb"
msgstr ""
-#: coff-arm.c:1409
+#: coff-arm.c:1456
#, c-format
msgid ""
"%B(%s): warning: interworking not enabled.\n"
@@ -239,105 +248,105 @@ msgid ""
" consider relinking with --support-old-code enabled"
msgstr ""
-#: coff-arm.c:1702 cofflink.c:3015 coff-tic80.c:695
+#: coff-arm.c:1749 cofflink.c:3014 coff-tic80.c:695
msgid "%B: bad reloc address 0x%lx in section `%A'"
msgstr ""
-#: coff-arm.c:2028
+#: coff-arm.c:2074
msgid "%B: illegal symbol index in reloc: %d"
msgstr ""
-#: coff-arm.c:2158
+#: coff-arm.c:2205
#, c-format
msgid "ERROR: %B is compiled for APCS-%d, whereas %B is compiled for APCS-%d"
msgstr ""
-#: coff-arm.c:2174 elf32-arm.c:5093
+#: coff-arm.c:2221 elf32-arm.c:7103
#, c-format
msgid ""
"ERROR: %B passes floats in float registers, whereas %B passes them in "
"integer registers"
msgstr ""
-#: coff-arm.c:2177 elf32-arm.c:5097
+#: coff-arm.c:2224 elf32-arm.c:7107
#, c-format
msgid ""
"ERROR: %B passes floats in integer registers, whereas %B passes them in "
"float registers"
msgstr ""
-#: coff-arm.c:2191
+#: coff-arm.c:2238
#, c-format
msgid ""
"ERROR: %B is compiled as position independent code, whereas target %B is "
"absolute position"
msgstr ""
-#: coff-arm.c:2194
+#: coff-arm.c:2241
#, c-format
msgid ""
"ERROR: %B is compiled as absolute position code, whereas target %B is "
"position independent"
msgstr ""
-#: coff-arm.c:2222 elf32-arm.c:5162
+#: coff-arm.c:2269 elf32-arm.c:7172
#, c-format
msgid "Warning: %B supports interworking, whereas %B does not"
msgstr ""
-#: coff-arm.c:2225 elf32-arm.c:5168
+#: coff-arm.c:2272 elf32-arm.c:7178
#, c-format
msgid "Warning: %B does not support interworking, whereas %B does"
msgstr ""
-#: coff-arm.c:2249
+#: coff-arm.c:2296
#, c-format
msgid "private flags = %x:"
msgstr ""
-#: coff-arm.c:2257 elf32-arm.c:5219
+#: coff-arm.c:2304 elf32-arm.c:7229
#, c-format
msgid " [floats passed in float registers]"
msgstr ""
-#: coff-arm.c:2259
+#: coff-arm.c:2306
#, c-format
msgid " [floats passed in integer registers]"
msgstr ""
-#: coff-arm.c:2262 elf32-arm.c:5222
+#: coff-arm.c:2309 elf32-arm.c:7232
#, c-format
msgid " [position independent]"
msgstr ""
-#: coff-arm.c:2264
+#: coff-arm.c:2311
#, c-format
msgid " [absolute position]"
msgstr ""
-#: coff-arm.c:2268
+#: coff-arm.c:2315
#, c-format
msgid " [interworking flag not initialised]"
msgstr ""
-#: coff-arm.c:2270
+#: coff-arm.c:2317
#, c-format
msgid " [interworking supported]"
msgstr ""
-#: coff-arm.c:2272
+#: coff-arm.c:2319
#, c-format
msgid " [interworking not supported]"
msgstr ""
-#: coff-arm.c:2318 elf32-arm.c:4571
+#: coff-arm.c:2365 elf32-arm.c:6626
#, c-format
msgid ""
"Warning: Not setting interworking flag of %B since it has already been "
"specified as non-interworking"
msgstr ""
-#: coff-arm.c:2322 elf32-arm.c:4575
+#: coff-arm.c:2369 elf32-arm.c:6630
#, c-format
msgid "Warning: Clearing the interworking flag of %B due to outside request"
msgstr ""
@@ -358,36 +367,40 @@ msgstr ""
msgid "%B (%s): Section flag %s (0x%x) ignored"
msgstr ""
-#: coffcode.h:2204
+#: coffcode.h:2231
#, c-format
msgid "Unrecognized TI COFF target id '0x%x'"
msgstr ""
-#: coffcode.h:4211
+#: coffcode.h:2546
+msgid "%B: reloc against a non-existant symbol index: %ld"
+msgstr ""
+
+#: coffcode.h:4269
msgid "%B: warning: line number table read failed"
msgstr ""
-#: coffcode.h:4243
+#: coffcode.h:4301
msgid "%B: warning: illegal symbol index %ld in line numbers"
msgstr ""
-#: coffcode.h:4257
+#: coffcode.h:4315
msgid "%B: warning: duplicate line number information for `%s'"
msgstr ""
-#: coffcode.h:4597
+#: coffcode.h:4655
msgid "%B: Unrecognized storage class %d for %s symbol `%s'"
msgstr ""
-#: coffcode.h:4723
+#: coffcode.h:4781
msgid "warning: %B: local symbol `%s' has no section"
msgstr ""
-#: coffcode.h:4827 coff-i860.c:586 coff-tic54x.c:376
+#: coffcode.h:4886 coff-i860.c:600 coff-tic54x.c:393
msgid "%B: warning: illegal symbol index %ld in relocs"
msgstr ""
-#: coffcode.h:4865
+#: coffcode.h:4924
msgid "%B: illegal relocation type %d at address 0x%lx"
msgstr ""
@@ -395,7 +408,7 @@ msgstr ""
msgid "%B: bad string table size %lu"
msgstr ""
-#: coff-h8300.c:1126
+#: coff-h8300.c:1121
#, c-format
msgid "cannot handle R_MEM_INDIRECT reloc when using %s output"
msgstr ""
@@ -405,53 +418,54 @@ msgstr ""
msgid "Relocation `%s' not yet implemented\n"
msgstr ""
-#: coff-i960.c:137 coff-i960.c:486
+#: coff-i960.c:137 coff-i960.c:500
msgid "uncertain calling convention for non-COFF symbol"
msgstr ""
-#: cofflink.c:507 elflink.c:3948
+#: cofflink.c:509 elflink.c:4158
msgid "Warning: type of symbol `%s' changed from %d to %d in %B"
msgstr ""
-#: cofflink.c:2293
+#: cofflink.c:2292
msgid "%B: relocs in section `%A', but it has no contents"
msgstr ""
-#: cofflink.c:2624 coffswap.h:823
+#: cofflink.c:2623 coffswap.h:823
#, c-format
msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
msgstr ""
-#: cofflink.c:2633 coffswap.h:809
+#: cofflink.c:2632 coffswap.h:809
#, c-format
msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
msgstr ""
-#: coff-m68k.c:482 elf32-bfin.c:2722 elf32-m68k.c:2193
+#: coff-m68k.c:505 elf32-bfin.c:5434 elf32-m68k.c:2392
msgid "unsupported reloc type"
msgstr ""
-#: coff-maxq.c:128
+#: coff-maxq.c:126
msgid "Can't Make it a Short Jump"
msgstr ""
-#: coff-maxq.c:193
+#: coff-maxq.c:191
msgid "Exceeds Long Jump Range"
msgstr ""
-#: coff-maxq.c:204 coff-maxq.c:278
+#: coff-maxq.c:202 coff-maxq.c:276
msgid "Absolute address Exceeds 16 bit Range"
msgstr ""
-#: coff-maxq.c:242
+#: coff-maxq.c:240
msgid "Absolute address Exceeds 8 bit Range"
msgstr ""
-#: coff-maxq.c:335
+#: coff-maxq.c:333
msgid "Unrecognized Reloc Type"
msgstr ""
-#: coff-mips.c:686 elf32-mips.c:940 elf64-mips.c:1864 elfn32-mips.c:1718
+#: coff-mips.c:686 elf32-mips.c:956 elf32-score.c:344 elf64-mips.c:1896
+#: elfn32-mips.c:1750
msgid "GP relative relocation when _gp not defined"
msgstr ""
@@ -459,22 +473,22 @@ msgstr ""
msgid "Unrecognized reloc"
msgstr ""
-#: coff-rs6000.c:2785
+#: coff-rs6000.c:2798
#, c-format
msgid "%s: unsupported relocation type 0x%02x"
msgstr ""
-#: coff-rs6000.c:2878
+#: coff-rs6000.c:2891
#, c-format
msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
msgstr ""
-#: coff-tic4x.c:174 coff-tic54x.c:282 coff-tic80.c:458
+#: coff-tic4x.c:191 coff-tic54x.c:299 coff-tic80.c:458
#, c-format
msgid "Unrecognized reloc type 0x%x"
msgstr ""
-#: coff-tic4x.c:219
+#: coff-tic4x.c:236
#, c-format
msgid "%s: warning: illegal symbol index %ld in relocs"
msgstr ""
@@ -484,543 +498,644 @@ msgstr ""
msgid "ignoring reloc %s\n"
msgstr ""
-#: cpu-arm.c:184 cpu-arm.c:193
+#: cpu-arm.c:188 cpu-arm.c:199
msgid "ERROR: %B is compiled for the EP9312, whereas %B is compiled for XScale"
msgstr ""
-#: cpu-arm.c:324
+#: cpu-arm.c:331
#, c-format
msgid "warning: unable to update contents of %s section in %s"
msgstr ""
-#: dwarf2.c:315
+#: dwarf2.c:329
msgid "Dwarf Error: Can't find .debug_str section."
msgstr ""
-#: dwarf2.c:333
+#: dwarf2.c:347
#, c-format
msgid ""
"Dwarf Error: DW_FORM_strp offset (%lu) greater than or equal to .debug_str "
"size (%lu)."
msgstr ""
-#: dwarf2.c:426
+#: dwarf2.c:440
msgid "Dwarf Error: Can't find .debug_abbrev section."
msgstr ""
-#: dwarf2.c:441
+#: dwarf2.c:455
#, c-format
msgid ""
"Dwarf Error: Abbrev offset (%lu) greater than or equal to .debug_abbrev size "
"(%lu)."
msgstr ""
-#: dwarf2.c:656
+#: dwarf2.c:670
#, c-format
msgid "Dwarf Error: Invalid or unhandled FORM value: %u."
msgstr ""
-#: dwarf2.c:856
+#: dwarf2.c:873
msgid "Dwarf Error: mangled line number section (bad file number)."
msgstr ""
-#: dwarf2.c:947
+#: dwarf2.c:985
msgid "Dwarf Error: Can't find .debug_line section."
msgstr ""
-#: dwarf2.c:964
+#: dwarf2.c:1002
#, c-format
msgid ""
"Dwarf Error: Line offset (%lu) greater than or equal to .debug_line size (%"
"lu)."
msgstr ""
-#: dwarf2.c:1192
+#: dwarf2.c:1228
msgid "Dwarf Error: mangled line number section."
msgstr ""
-#: dwarf2.c:1382
+#: dwarf2.c:1416
msgid "Dwarf Error: Can't find .debug_ranges section."
msgstr ""
-#: dwarf2.c:1544 dwarf2.c:1660 dwarf2.c:1930
+#: dwarf2.c:1579 dwarf2.c:1695 dwarf2.c:1965
#, c-format
msgid "Dwarf Error: Could not find abbrev number %u."
msgstr ""
-#: dwarf2.c:1891
+#: dwarf2.c:1926
#, c-format
msgid ""
"Dwarf Error: found dwarf version '%u', this reader only handles version 2 "
"information."
msgstr ""
-#: dwarf2.c:1898
+#: dwarf2.c:1933
#, c-format
msgid ""
"Dwarf Error: found address size '%u', this reader can not handle sizes "
"greater than '%u'."
msgstr ""
-#: dwarf2.c:1921
+#: dwarf2.c:1956
#, c-format
msgid "Dwarf Error: Bad abbrev number: %u."
msgstr ""
-#: ecoff.c:1227
+#: ecoff.c:1226
#, c-format
msgid "Unknown basic type %d"
msgstr ""
-#: ecoff.c:1484
+#: ecoff.c:1483
#, c-format
msgid ""
"\n"
" End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1491 ecoff.c:1494
+#: ecoff.c:1490 ecoff.c:1493
#, c-format
msgid ""
"\n"
" First symbol: %ld"
msgstr ""
-#: ecoff.c:1506
+#: ecoff.c:1505
#, c-format
msgid ""
"\n"
" End+1 symbol: %-7ld Type: %s"
msgstr ""
-#: ecoff.c:1513
+#: ecoff.c:1512
#, c-format
msgid ""
"\n"
" Local symbol: %ld"
msgstr ""
-#: ecoff.c:1521
+#: ecoff.c:1520
#, c-format
msgid ""
"\n"
" struct; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1526
+#: ecoff.c:1525
#, c-format
msgid ""
"\n"
" union; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1531
+#: ecoff.c:1530
#, c-format
msgid ""
"\n"
" enum; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1537
+#: ecoff.c:1536
#, c-format
msgid ""
"\n"
" Type: %s"
msgstr ""
-#: elf32-arm.c:2315
+#: elf32-arm.c:2516
+#, c-format
+msgid "unable to find THUMB glue '%s' for '%s'"
+msgstr ""
+
+#: elf32-arm.c:2549
+#, c-format
+msgid "unable to find ARM glue '%s' for '%s'"
+msgstr ""
+
+#: elf32-arm.c:3119
msgid "%B: BE8 images only valid in big-endian mode."
msgstr ""
-#: elf32-arm.c:2471
+#. Give a warning, but do as the user requests anyway.
+#: elf32-arm.c:3320
+msgid ""
+"%B: warning: selected VFP11 erratum workaround is not necessary for target "
+"architecture"
+msgstr ""
+
+#: elf32-arm.c:3854 elf32-arm.c:3874
+msgid "%B: unable to find VFP11 veneer `%s'"
+msgstr ""
+
+#: elf32-arm.c:3919
#, c-format
msgid "Invalid TARGET2 relocation type '%s'."
msgstr ""
-#: elf32-arm.c:2578
+#: elf32-arm.c:4060
msgid ""
"%B(%s): warning: interworking not enabled.\n"
" first occurrence: %B: thumb call to arm"
msgstr ""
-#: elf32-arm.c:3044
+#: elf32-arm.c:4748
msgid "\\%B: Warning: Arm BLX instruction targets Arm function '%s'."
msgstr ""
-#: elf32-arm.c:3227
+#: elf32-arm.c:5047
msgid "%B: Warning: Thumb BLX instruction targets thumb function '%s'."
msgstr ""
-#: elf32-arm.c:3889
+#: elf32-arm.c:5738
msgid "%B(%A+0x%lx): R_ARM_TLS_LE32 relocation not permitted in shared object"
msgstr ""
-#: elf32-arm.c:4290 elf32-sh.c:4618 elf64-sh64.c:1537
+#: elf32-arm.c:5939
+msgid ""
+"%B(%A+0x%lx): Only ADD or SUB instructions are allowed for ALU group "
+"relocations"
+msgstr ""
+
+#: elf32-arm.c:5979 elf32-arm.c:6066 elf32-arm.c:6149 elf32-arm.c:6234
+msgid "%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"
+msgstr ""
+
+#: elf32-arm.c:6417 elf32-sh.c:3303 elf64-sh64.c:1555
msgid "%B(%A+0x%lx): %s relocation against SEC_MERGE section"
msgstr ""
-#: elf32-arm.c:4351 elf64-ppc.c:9672
+#: elf32-arm.c:6506 elf64-ppc.c:9972
msgid "%B(%A+0x%lx): %s used with TLS symbol %s"
msgstr ""
-#: elf32-arm.c:4352 elf64-ppc.c:9673
+#: elf32-arm.c:6507 elf64-ppc.c:9973
msgid "%B(%A+0x%lx): %s used with non-TLS symbol %s"
msgstr ""
-#: elf32-arm.c:4375 elf32-i386.c:3038 elf32-m32r.c:2653 elf32-m68k.c:1737
-#: elf32-ppc.c:6561 elf32-s390.c:3012 elf32-sh.c:4717 elf32-xtensa.c:2311
-#: elf64-ppc.c:10825 elf64-s390.c:3010 elf64-sh64.c:1626 elf64-x86-64.c:2522
-#: elf-hppa.h:1413 elf-m10300.c:1460 elfxx-sparc.c:3137
+#: elf32-arm.c:6530 elf32-i386.c:3305 elf32-m32r.c:2597 elf32-m68k.c:1981
+#: elf32-ppc.c:6791 elf32-s390.c:3048 elf32-sh.c:3407 elf32-xtensa.c:2290
+#: elf64-ppc.c:11137 elf64-s390.c:3009 elf64-sh64.c:1647 elf64-x86-64.c:3001
+#: elf-hppa.h:2193 elf-m10300.c:1459 elfxx-sparc.c:3254
msgid "%B(%A+0x%lx): unresolvable %s relocation against symbol `%s'"
msgstr ""
-#: elf32-arm.c:4411 elf32-avr.c:880 elf32-cr16c.c:773 elf32-cris.c:1502
-#: elf32-crx.c:911 elf32-d10v.c:536 elf32-fr30.c:595 elf32-frv.c:4107
-#: elf32-h8300.c:494 elf32-i860.c:1189 elf32-ip2k.c:1474 elf32-iq2000.c:616
-#: elf32-m32c.c:465 elf32-m32r.c:3111 elf32-m68hc1x.c:1194 elf32-ms1.c:373
-#: elf32-msp430.c:508 elf32-openrisc.c:383 elf32-v850.c:1672
-#: elf32-xstormy16.c:909 elf64-mmix.c:1517 elf-m10200.c:427 elf-m10300.c:1509
-msgid "internal error: out of range error"
+#: elf32-arm.c:6564
+msgid "out of range"
msgstr ""
-#: elf32-arm.c:4415 elf32-avr.c:884 elf32-cr16c.c:777 elf32-cris.c:1506
-#: elf32-crx.c:915 elf32-d10v.c:540 elf32-fr30.c:599 elf32-frv.c:4111
-#: elf32-h8300.c:498 elf32-i860.c:1193 elf32-iq2000.c:620 elf32-m32c.c:469
-#: elf32-m32r.c:3115 elf32-m68hc1x.c:1198 elf32-msp430.c:512
-#: elf32-openrisc.c:387 elf32-v850.c:1676 elf32-xstormy16.c:913
-#: elf64-mmix.c:1521 elf-m10200.c:431 elf-m10300.c:1513 elfxx-mips.c:7212
-msgid "internal error: unsupported relocation error"
+#: elf32-arm.c:6568
+msgid "unsupported relocation"
msgstr ""
-#: elf32-arm.c:4419 elf32-cr16c.c:781 elf32-crx.c:919 elf32-d10v.c:544
-#: elf32-h8300.c:502 elf32-m32r.c:3119 elf32-m68hc1x.c:1202 elf-m10200.c:435
-#: elf-m10300.c:1517
-msgid "internal error: dangerous error"
+#: elf32-arm.c:6576
+msgid "unknown error"
msgstr ""
-#: elf32-arm.c:4423 elf32-avr.c:892 elf32-cr16c.c:785 elf32-cris.c:1514
-#: elf32-crx.c:923 elf32-d10v.c:548 elf32-fr30.c:607 elf32-frv.c:4119
-#: elf32-h8300.c:506 elf32-i860.c:1201 elf32-ip2k.c:1489 elf32-iq2000.c:628
-#: elf32-m32c.c:477 elf32-m32r.c:3123 elf32-m68hc1x.c:1206 elf32-ms1.c:381
-#: elf32-msp430.c:520 elf32-openrisc.c:395 elf32-v850.c:1696
-#: elf32-xstormy16.c:921 elf64-mmix.c:1529 elf-m10200.c:439 elf-m10300.c:1521
-msgid "internal error: unknown error"
-msgstr ""
-
-#: elf32-arm.c:4664
+#: elf32-arm.c:6676
msgid ""
"Warning: Clearing the interworking flag of %B because non-interworking code "
"in %B has been linked with it"
msgstr ""
-#: elf32-arm.c:4751
+#: elf32-arm.c:6778
msgid "ERROR: %B uses VFP register arguments, %B does not"
msgstr ""
-#: elf32-arm.c:4798
+#: elf32-arm.c:6828
msgid "ERROR: %B: Conflicting architecture profiles %c/%c"
msgstr ""
-#: elf32-arm.c:4813
+#: elf32-arm.c:6843
msgid "Warning: %B: Conflicting platform configuration"
msgstr ""
-#: elf32-arm.c:4821
+#: elf32-arm.c:6852
msgid "ERROR: %B: Conflicting use of R9"
msgstr ""
-#: elf32-arm.c:4833
+#: elf32-arm.c:6864
msgid "ERROR: %B: SB relative addressing conflicts with use of R9"
msgstr ""
-#: elf32-arm.c:4855
+#: elf32-arm.c:6886
msgid "ERROR: %B: Conflicting definitions of wchar_t"
msgstr ""
-#: elf32-arm.c:4881
-msgid "ERROR: %B: Conflicting enum sizes"
+#: elf32-arm.c:6915
+msgid ""
+"warning: %B uses %s enums yet the output is to use %s enums; use of enum "
+"values across objects may fail"
msgstr ""
-#: elf32-arm.c:4892
+#: elf32-arm.c:6928
msgid "ERROR: %B uses iWMMXt register arguments, %B does not"
msgstr ""
-#: elf32-arm.c:4912
-msgid "ERROR: %B: Must be processed by '%s' toolchain"
-msgstr ""
-
-#: elf32-arm.c:4932 elf32-arm.c:4951
-msgid "ERROR: %B: Incompatible object tag '%s':%d"
-msgstr ""
-
-#: elf32-arm.c:4961
+#: elf32-arm.c:6951
msgid "Warning: %B: Unknown EABI object attribute %d"
msgstr ""
-#: elf32-arm.c:5069
+#: elf32-arm.c:7076
msgid ""
"ERROR: Source object %B has EABI version %d, but target %B has EABI version %"
"d"
msgstr ""
-#: elf32-arm.c:5082
+#: elf32-arm.c:7092
msgid "ERROR: %B is compiled for APCS-%d, whereas target %B uses APCS-%d"
msgstr ""
-#: elf32-arm.c:5107
+#: elf32-arm.c:7117
msgid "ERROR: %B uses VFP instructions, whereas %B does not"
msgstr ""
-#: elf32-arm.c:5111
+#: elf32-arm.c:7121
msgid "ERROR: %B uses FPA instructions, whereas %B does not"
msgstr ""
-#: elf32-arm.c:5121
+#: elf32-arm.c:7131
msgid "ERROR: %B uses Maverick instructions, whereas %B does not"
msgstr ""
-#: elf32-arm.c:5125
+#: elf32-arm.c:7135
msgid "ERROR: %B does not use Maverick instructions, whereas %B does"
msgstr ""
-#: elf32-arm.c:5144
+#: elf32-arm.c:7154
msgid "ERROR: %B uses software FP, whereas %B uses hardware FP"
msgstr ""
-#: elf32-arm.c:5148
+#: elf32-arm.c:7158
msgid "ERROR: %B uses hardware FP, whereas %B uses software FP"
msgstr ""
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
#. Ignore init flag - it may not be set, despite the flags field containing valid data.
-#: elf32-arm.c:5195 elf32-bfin.c:2164 elf32-cris.c:3243 elf32-m68hc1x.c:1338
-#: elf32-m68k.c:428 elf32-vax.c:528 elfxx-mips.c:9933
+#: elf32-arm.c:7205 elf32-bfin.c:4795 elf32-cris.c:3233 elf32-m68hc1x.c:1276
+#: elf32-m68k.c:619 elf32-score.c:3752 elf32-vax.c:537 elfxx-mips.c:11310
#, c-format
msgid "private flags = %lx:"
msgstr ""
-#: elf32-arm.c:5204
+#: elf32-arm.c:7214
#, c-format
msgid " [interworking enabled]"
msgstr ""
-#: elf32-arm.c:5212
+#: elf32-arm.c:7222
#, c-format
msgid " [VFP float format]"
msgstr ""
-#: elf32-arm.c:5214
+#: elf32-arm.c:7224
#, c-format
msgid " [Maverick float format]"
msgstr ""
-#: elf32-arm.c:5216
+#: elf32-arm.c:7226
#, c-format
msgid " [FPA float format]"
msgstr ""
-#: elf32-arm.c:5225
+#: elf32-arm.c:7235
#, c-format
msgid " [new ABI]"
msgstr ""
-#: elf32-arm.c:5228
+#: elf32-arm.c:7238
#, c-format
msgid " [old ABI]"
msgstr ""
-#: elf32-arm.c:5231
+#: elf32-arm.c:7241
#, c-format
msgid " [software FP]"
msgstr ""
-#: elf32-arm.c:5240
+#: elf32-arm.c:7250
#, c-format
msgid " [Version1 EABI]"
msgstr ""
-#: elf32-arm.c:5243 elf32-arm.c:5254
+#: elf32-arm.c:7253 elf32-arm.c:7264
#, c-format
msgid " [sorted symbol table]"
msgstr ""
-#: elf32-arm.c:5245 elf32-arm.c:5256
+#: elf32-arm.c:7255 elf32-arm.c:7266
#, c-format
msgid " [unsorted symbol table]"
msgstr ""
-#: elf32-arm.c:5251
+#: elf32-arm.c:7261
#, c-format
msgid " [Version2 EABI]"
msgstr ""
-#: elf32-arm.c:5259
+#: elf32-arm.c:7269
#, c-format
msgid " [dynamic symbols use segment index]"
msgstr ""
-#: elf32-arm.c:5262
+#: elf32-arm.c:7272
#, c-format
msgid " [mapping symbols precede others]"
msgstr ""
-#: elf32-arm.c:5269
+#: elf32-arm.c:7279
#, c-format
msgid " [Version3 EABI]"
msgstr ""
-#: elf32-arm.c:5273
+#: elf32-arm.c:7283
#, c-format
msgid " [Version4 EABI]"
msgstr ""
-#: elf32-arm.c:5276
+#: elf32-arm.c:7287
+#, c-format
+msgid " [Version5 EABI]"
+msgstr ""
+
+#: elf32-arm.c:7290
#, c-format
msgid " [BE8]"
msgstr ""
-#: elf32-arm.c:5279
+#: elf32-arm.c:7293
#, c-format
msgid " [LE8]"
msgstr ""
-#: elf32-arm.c:5285
+#: elf32-arm.c:7299
#, c-format
msgid " <EABI version unrecognised>"
msgstr ""
-#: elf32-arm.c:5292
+#: elf32-arm.c:7306
#, c-format
msgid " [relocatable executable]"
msgstr ""
-#: elf32-arm.c:5295
+#: elf32-arm.c:7309
#, c-format
msgid " [has entry point]"
msgstr ""
-#: elf32-arm.c:5300
+#: elf32-arm.c:7314
#, c-format
msgid "<Unrecognised flag bits set>"
msgstr ""
-#: elf32-arm.c:5536 elf32-i386.c:902 elf32-s390.c:989 elf32-xtensa.c:784
-#: elf64-s390.c:942 elf64-x86-64.c:666 elfxx-sparc.c:1016
+#: elf32-arm.c:7545 elf32-i386.c:960 elf32-s390.c:1003 elf32-xtensa.c:814
+#: elf64-s390.c:958 elf64-x86-64.c:772 elfxx-sparc.c:1113
msgid "%B: bad symbol index: %d"
msgstr ""
-#: elf32-arm.c:6023 elf32-cris.c:2385 elf32-hppa.c:1813 elf32-i370.c:491
-#: elf32-i386.c:1465 elf32-m32r.c:1913 elf32-m68k.c:1088 elf32-ppc.c:4145
-#: elf32-s390.c:1686 elf32-sh.c:3920 elf32-vax.c:1059 elf64-ppc.c:5717
-#: elf64-s390.c:1659 elf64-sh64.c:3442 elf64-x86-64.c:1252 elf-m10300.c:4107
-#: elfxx-sparc.c:1720
+#: elf32-arm.c:8091 elf32-cris.c:2399 elf32-hppa.c:1905 elf32-i370.c:506
+#: elf32-i386.c:1517 elf32-m32r.c:1930 elf32-m68k.c:1330 elf32-ppc.c:4309
+#: elf32-s390.c:1679 elf32-sh.c:2583 elf32-vax.c:1049 elf64-ppc.c:5897
+#: elf64-s390.c:1654 elf64-sh64.c:3437 elf64-x86-64.c:1381 elf-m10300.c:4206
+#: elfxx-sparc.c:1795
#, c-format
msgid "dynamic variable `%s' is zero size"
msgstr ""
-#: elf32-avr.c:888 elf32-cris.c:1510 elf32-fr30.c:603 elf32-frv.c:4115
-#: elf32-i860.c:1197 elf32-ip2k.c:1485 elf32-iq2000.c:624 elf32-m32c.c:473
-#: elf32-ms1.c:377 elf32-msp430.c:516 elf32-openrisc.c:391 elf32-v850.c:1680
-#: elf32-xstormy16.c:917 elf64-mmix.c:1525
+#: elf32-arm.c:8609
+#, c-format
+msgid "Errors encountered processing file %s"
+msgstr ""
+
+#: elf32-arm.c:9837 elf32-arm.c:9859
+msgid "%B: error: VFP11 veneer out of range"
+msgstr ""
+
+#: elf32-avr.c:1253 elf32-bfin.c:2795 elf32-cr16.c:887 elf32-cr16c.c:789
+#: elf32-cris.c:1537 elf32-crx.c:932 elf32-d10v.c:517 elf32-fr30.c:615
+#: elf32-frv.c:4128 elf32-h8300.c:515 elf32-i860.c:1217 elf32-ip2k.c:1499
+#: elf32-iq2000.c:647 elf32-m32c.c:560 elf32-m32r.c:3123 elf32-m68hc1x.c:1132
+#: elf32-mep.c:639 elf32-msp430.c:496 elf32-mt.c:401 elf32-openrisc.c:411
+#: elf32-score.c:2455 elf32-spu.c:2813 elf32-v850.c:1700 elf32-xstormy16.c:946
+#: elf64-mmix.c:1531 elf-m10200.c:455 elf-m10300.c:1522
+msgid "internal error: out of range error"
+msgstr ""
+
+#: elf32-avr.c:1257 elf32-bfin.c:2799 elf32-cr16.c:891 elf32-cr16c.c:793
+#: elf32-cris.c:1541 elf32-crx.c:936 elf32-d10v.c:521 elf32-fr30.c:619
+#: elf32-frv.c:4132 elf32-h8300.c:519 elf32-i860.c:1221 elf32-iq2000.c:651
+#: elf32-m32c.c:564 elf32-m32r.c:3127 elf32-m68hc1x.c:1136 elf32-mep.c:643
+#: elf32-msp430.c:500 elf32-openrisc.c:415 elf32-score.c:2459 elf32-spu.c:2817
+#: elf32-v850.c:1704 elf32-xstormy16.c:950 elf64-mmix.c:1535 elf-m10200.c:459
+#: elf-m10300.c:1526 elfxx-mips.c:8019
+msgid "internal error: unsupported relocation error"
+msgstr ""
+
+#: elf32-avr.c:1261 elf32-bfin.c:2803 elf32-cris.c:1545 elf32-fr30.c:623
+#: elf32-frv.c:4136 elf32-i860.c:1225 elf32-ip2k.c:1510 elf32-iq2000.c:655
+#: elf32-m32c.c:568 elf32-mep.c:647 elf32-msp430.c:504 elf32-mt.c:405
+#: elf32-openrisc.c:419 elf32-v850.c:1708 elf32-xstormy16.c:954
+#: elf64-mmix.c:1539
msgid "internal error: dangerous relocation"
msgstr ""
-#: elf32-bfin.c:96
-msgid "Division by zero. "
+#: elf32-avr.c:1265 elf32-bfin.c:2807 elf32-cr16.c:899 elf32-cr16c.c:801
+#: elf32-cris.c:1549 elf32-crx.c:944 elf32-d10v.c:529 elf32-fr30.c:627
+#: elf32-frv.c:4140 elf32-h8300.c:527 elf32-i860.c:1229 elf32-ip2k.c:1514
+#: elf32-iq2000.c:659 elf32-m32c.c:572 elf32-m32r.c:3135 elf32-m68hc1x.c:1144
+#: elf32-mep.c:651 elf32-msp430.c:508 elf32-mt.c:409 elf32-openrisc.c:423
+#: elf32-score.c:2467 elf32-spu.c:2825 elf32-v850.c:1724 elf32-xstormy16.c:958
+#: elf64-mmix.c:1543 elf-m10200.c:467 elf-m10300.c:1539
+msgid "internal error: unknown error"
+msgstr ""
+
+#: elf32-avr.c:2369 elf32-hppa.c:594 elf32-m68hc1x.c:163 elf64-ppc.c:3801
+msgid "%B: cannot create stub entry %s"
+msgstr ""
+
+#: elf32-bfin.c:2274
+msgid "%B: relocation at `%A+0x%x' references symbol `%s' with nonzero addend"
+msgstr ""
+
+#: elf32-bfin.c:2288 elf32-frv.c:2918
+msgid "relocation references symbol not defined in the module"
+msgstr ""
+
+#: elf32-bfin.c:2385
+msgid "R_BFIN_FUNCDESC references dynamic symbol with nonzero addend"
+msgstr ""
+
+#: elf32-bfin.c:2424 elf32-bfin.c:2547 elf32-frv.c:3655 elf32-frv.c:3776
+msgid "cannot emit fixups in read-only section"
+msgstr ""
+
+#: elf32-bfin.c:2452 elf32-bfin.c:2587 elf32-frv.c:3686 elf32-frv.c:3820
+msgid "cannot emit dynamic relocations in read-only section"
+msgstr ""
+
+#: elf32-bfin.c:2505
+msgid "R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
msgstr ""
-#: elf32-bfin.c:1958
+#: elf32-bfin.c:2673
+msgid "relocations between different segments are not supported"
+msgstr ""
+
+#: elf32-bfin.c:2674
+msgid "warning: relocation references a different segment"
+msgstr ""
+
+#: elf32-bfin.c:3083
msgid "%B(%A+0x%lx): unresolvable relocation against symbol `%s'"
msgstr ""
-#: elf32-bfin.c:1991 elf32-i386.c:3079 elf32-m68k.c:1778 elf32-s390.c:3064
-#: elf64-s390.c:3062 elf64-x86-64.c:2567
+#: elf32-bfin.c:3116 elf32-i386.c:3346 elf32-m68k.c:2022 elf32-s390.c:3100
+#: elf64-s390.c:3061 elf64-x86-64.c:3040
msgid "%B(%A+0x%lx): reloc against `%s': error %d"
msgstr ""
-#: elf32-cris.c:1050
+#: elf32-bfin.c:4687 elf32-frv.c:6422
+msgid "%B: unsupported relocation type %i"
+msgstr ""
+
+#: elf32-bfin.c:4868 elf32-frv.c:6830
+#, c-format
+msgid "%s: cannot link non-fdpic object file into fdpic executable"
+msgstr ""
+
+#: elf32-bfin.c:4872 elf32-frv.c:6834
+#, c-format
+msgid "%s: cannot link fdpic object file into non-fdpic executable"
+msgstr ""
+
+#: elf32-cr16.c:895 elf32-cr16c.c:797 elf32-crx.c:940 elf32-d10v.c:525
+#: elf32-h8300.c:523 elf32-m32r.c:3131 elf32-m68hc1x.c:1140 elf32-score.c:2463
+#: elf32-spu.c:2821 elf-m10200.c:463
+msgid "internal error: dangerous error"
+msgstr ""
+
+#: elf32-cris.c:1059
msgid "%B, section %A: unresolvable relocation %s against symbol `%s'"
msgstr ""
-#: elf32-cris.c:1105
+#: elf32-cris.c:1128
msgid "%B, section %A: No PLT nor GOT for relocation %s against symbol `%s'"
msgstr ""
-#: elf32-cris.c:1107
+#: elf32-cris.c:1130
msgid "%B, section %A: No PLT for relocation %s against symbol `%s'"
msgstr ""
-#: elf32-cris.c:1113 elf32-cris.c:1245
+#: elf32-cris.c:1136 elf32-cris.c:1268
msgid "[whose name is lost]"
msgstr ""
-#: elf32-cris.c:1231
+#: elf32-cris.c:1254
msgid ""
"%B, section %A: relocation %s with non-zero addend %d against local symbol"
msgstr ""
-#: elf32-cris.c:1239
+#: elf32-cris.c:1262
msgid ""
"%B, section %A: relocation %s with non-zero addend %d against symbol `%s'"
msgstr ""
-#: elf32-cris.c:1265
+#: elf32-cris.c:1288
msgid "%B, section %A: relocation %s is not allowed for global symbol: `%s'"
msgstr ""
-#: elf32-cris.c:1281
+#: elf32-cris.c:1304
msgid "%B, section %A: relocation %s with no GOT created"
msgstr ""
-#: elf32-cris.c:1399
+#: elf32-cris.c:1422
msgid "%B: Internal inconsistency; no relocation section %s"
msgstr ""
-#: elf32-cris.c:2520
+#: elf32-cris.c:2510
msgid ""
"%B, section %A:\n"
" v10/v32 compatible object %s must not contain a PIC relocation"
msgstr ""
-#: elf32-cris.c:2707 elf32-cris.c:2775
+#: elf32-cris.c:2697 elf32-cris.c:2765
msgid ""
"%B, section %A:\n"
" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
-#: elf32-cris.c:3192
+#: elf32-cris.c:3182
msgid "Unexpected machine number"
msgstr ""
-#: elf32-cris.c:3246
+#: elf32-cris.c:3236
#, c-format
msgid " [symbols have a _ prefix]"
msgstr ""
-#: elf32-cris.c:3249
+#: elf32-cris.c:3239
#, c-format
msgid " [v10 and v32]"
msgstr ""
-#: elf32-cris.c:3252
+#: elf32-cris.c:3242
#, c-format
msgid " [v32]"
msgstr ""
-#: elf32-cris.c:3297
+#: elf32-cris.c:3287
msgid "%B: uses _-prefixed symbols, but writing file with non-prefixed symbols"
msgstr ""
-#: elf32-cris.c:3298
+#: elf32-cris.c:3288
msgid "%B: uses non-prefixed symbols, but writing file with _-prefixed symbols"
msgstr ""
-#: elf32-cris.c:3317
+#: elf32-cris.c:3307
msgid "%B contains CRIS v32 code, incompatible with previous objects"
msgstr ""
-#: elf32-cris.c:3319
+#: elf32-cris.c:3309
msgid "%B contains non-CRIS-v32 code, incompatible with previous objects"
msgstr ""
@@ -1028,119 +1143,93 @@ msgstr ""
msgid "relocation requires zero addend"
msgstr ""
-#: elf32-frv.c:2901
+#: elf32-frv.c:2905
msgid "%B(%A+0x%x): relocation to `%s+%x' may have caused the error above"
msgstr ""
-#: elf32-frv.c:2914
-msgid "relocation references symbol not defined in the module"
-msgstr ""
-
-#: elf32-frv.c:2990
+#: elf32-frv.c:2994
msgid "R_FRV_GETTLSOFF not applied to a call instruction"
msgstr ""
-#: elf32-frv.c:3032
+#: elf32-frv.c:3036
msgid "R_FRV_GOTTLSDESC12 not applied to an lddi instruction"
msgstr ""
-#: elf32-frv.c:3103
+#: elf32-frv.c:3107
msgid "R_FRV_GOTTLSDESCHI not applied to a sethi instruction"
msgstr ""
-#: elf32-frv.c:3140
+#: elf32-frv.c:3144
msgid "R_FRV_GOTTLSDESCLO not applied to a setlo or setlos instruction"
msgstr ""
-#: elf32-frv.c:3188
+#: elf32-frv.c:3192
msgid "R_FRV_TLSDESC_RELAX not applied to an ldd instruction"
msgstr ""
-#: elf32-frv.c:3272
+#: elf32-frv.c:3276
msgid "R_FRV_GETTLSOFF_RELAX not applied to a calll instruction"
msgstr ""
-#: elf32-frv.c:3327
+#: elf32-frv.c:3331
msgid "R_FRV_GOTTLSOFF12 not applied to an ldi instruction"
msgstr ""
-#: elf32-frv.c:3357
+#: elf32-frv.c:3361
msgid "R_FRV_GOTTLSOFFHI not applied to a sethi instruction"
msgstr ""
-#: elf32-frv.c:3386
+#: elf32-frv.c:3390
msgid "R_FRV_GOTTLSOFFLO not applied to a setlo or setlos instruction"
msgstr ""
-#: elf32-frv.c:3417
+#: elf32-frv.c:3421
msgid "R_FRV_TLSOFF_RELAX not applied to an ld instruction"
msgstr ""
-#: elf32-frv.c:3462
+#: elf32-frv.c:3466
msgid "R_FRV_TLSMOFFHI not applied to a sethi instruction"
msgstr ""
-#: elf32-frv.c:3489
+#: elf32-frv.c:3493
msgid "R_FRV_TLSMOFFLO not applied to a setlo or setlos instruction"
msgstr ""
-#: elf32-frv.c:3610
+#: elf32-frv.c:3614
msgid "R_FRV_FUNCDESC references dynamic symbol with nonzero addend"
msgstr ""
-#: elf32-frv.c:3649 elf32-frv.c:3762
-msgid "cannot emit fixups in read-only section"
-msgstr ""
-
-#: elf32-frv.c:3675 elf32-frv.c:3802
-msgid "cannot emit dynamic relocations in read-only section"
-msgstr ""
-
-#: elf32-frv.c:3720
+#: elf32-frv.c:3734
msgid "R_FRV_FUNCDESC_VALUE references dynamic symbol with nonzero addend"
msgstr ""
-#: elf32-frv.c:3970 elf32-frv.c:4126
+#: elf32-frv.c:3991 elf32-frv.c:4147
msgid "%B(%A+0x%lx): reloc against `%s': %s"
msgstr ""
-#: elf32-frv.c:3972 elf32-frv.c:3976
+#: elf32-frv.c:3993 elf32-frv.c:3997
msgid "relocation references a different segment"
msgstr ""
-#: elf32-frv.c:6324
-msgid "%B: unsupported relocation type %i"
-msgstr ""
-
-#: elf32-frv.c:6642
+#: elf32-frv.c:6744
#, c-format
msgid ""
"%s: compiled with %s and linked with modules that use non-pic relocations"
msgstr ""
-#: elf32-frv.c:6695 elf32-iq2000.c:801 elf32-m32c.c:785
+#: elf32-frv.c:6797 elf32-iq2000.c:808 elf32-m32c.c:819
#, c-format
msgid "%s: compiled with %s and linked with modules compiled with %s"
msgstr ""
-#: elf32-frv.c:6707
+#: elf32-frv.c:6809
#, c-format
msgid ""
"%s: uses different unknown e_flags (0x%lx) fields than previous modules (0x%"
"lx)"
msgstr ""
-#: elf32-frv.c:6728
-#, c-format
-msgid "%s: cannot link non-fdpic object file into fdpic executable"
-msgstr ""
-
-#: elf32-frv.c:6732
-#, c-format
-msgid "%s: cannot link fdpic object file into non-fdpic executable"
-msgstr ""
-
-#: elf32-frv.c:6757 elf32-iq2000.c:838 elf32-m32c.c:821 elf32-ms1.c:596
+#: elf32-frv.c:6859 elf32-iq2000.c:845 elf32-m32c.c:855 elf32-mt.c:586
#, c-format
msgid "private flags = 0x%lx:"
msgstr ""
@@ -1149,423 +1238,461 @@ msgstr ""
msgid "%B: Relocations in generic ELF (EM: %d)"
msgstr ""
-#: elf32-hppa.c:569 elf32-m68hc1x.c:161 elf64-ppc.c:3660
-msgid "%B: cannot create stub entry %s"
-msgstr ""
-
-#: elf32-hppa.c:822 elf32-hppa.c:3411
+#: elf32-hppa.c:843 elf32-hppa.c:3576
msgid "%B(%A+0x%lx): cannot reach %s, recompile with -ffunction-sections"
msgstr ""
-#: elf32-hppa.c:1212
+#: elf32-hppa.c:1252
msgid ""
"%B: relocation %s can not be used when making a shared object; recompile "
"with -fPIC"
msgstr ""
-#: elf32-hppa.c:1405
+#: elf32-hppa.c:1505
#, c-format
msgid "Could not find relocation section for %s"
msgstr ""
-#: elf32-hppa.c:2677
+#: elf32-hppa.c:2794
msgid "%B: duplicate export stub %s"
msgstr ""
-#: elf32-hppa.c:3266
+#: elf32-hppa.c:3412
msgid ""
"%B(%A+0x%lx): %s fixup for insn 0x%x is not supported in a non-shared link"
msgstr ""
-#: elf32-hppa.c:3895
+#: elf32-hppa.c:4266
msgid "%B(%A+0x%lx): cannot handle %s for %s"
msgstr ""
-#: elf32-hppa.c:4189
+#: elf32-hppa.c:4573
msgid ".got section not immediately after .plt section"
msgstr ""
-#: elf32-i386.c:327 elf32-s390.c:368 elf64-ppc.c:2124 elf64-s390.c:390
-#: elf64-x86-64.c:204
+#: elf32-i386.c:363 elf32-ppc.c:1615 elf32-s390.c:379 elf64-ppc.c:2147
+#: elf64-s390.c:403 elf64-x86-64.c:220
msgid "%B: invalid relocation type %d"
msgstr ""
-#: elf32-i386.c:1015 elf32-s390.c:1171 elf32-sh.c:6389 elf64-s390.c:1133
-#: elfxx-sparc.c:1144
+#: elf32-i386.c:1084 elf32-s390.c:1185 elf32-sh.c:5062 elf64-s390.c:1149
+#: elfxx-sparc.c:1241
msgid "%B: `%s' accessed both as normal and thread local symbol"
msgstr ""
-#: elf32-i386.c:1130 elf32-s390.c:1280 elf64-ppc.c:4731 elf64-s390.c:1245
-#: elf64-x86-64.c:910
+#: elf32-i386.c:1199 elf32-s390.c:1294 elf64-ppc.c:4863 elf64-s390.c:1261
+#: elf64-x86-64.c:1050
msgid "%B: bad relocation section name `%s'"
msgstr ""
-#: elf32-i386.c:2149
+#: elf32-i386.c:2252
msgid "%B: unrecognized relocation (0x%x) in section `%A'"
msgstr ""
-#: elf32-i386.c:2409
+#: elf32-i386.c:2474
msgid ""
"%B: relocation R_386_GOTOFF against protected function `%s' can not be used "
"when making a shared object"
msgstr ""
-#: elf32-ip2k.c:853 elf32-ip2k.c:859 elf32-ip2k.c:926 elf32-ip2k.c:932
+#: elf32-ip2k.c:868 elf32-ip2k.c:874 elf32-ip2k.c:941 elf32-ip2k.c:947
msgid ""
"ip2k relaxer: switch table without complete matching relocation information."
msgstr ""
-#: elf32-ip2k.c:876 elf32-ip2k.c:959
+#: elf32-ip2k.c:891 elf32-ip2k.c:974
msgid "ip2k relaxer: switch table header corrupt."
msgstr ""
-#: elf32-ip2k.c:1301
+#: elf32-ip2k.c:1316
#, c-format
msgid "ip2k linker: missing page instruction at 0x%08lx (dest = 0x%08lx)."
msgstr ""
-#: elf32-ip2k.c:1317
+#: elf32-ip2k.c:1332
#, c-format
msgid "ip2k linker: redundant page instruction at 0x%08lx (dest = 0x%08lx)."
msgstr ""
#. Only if it's not an unresolved symbol.
-#: elf32-ip2k.c:1481
+#: elf32-ip2k.c:1506
msgid "unsupported relocation between data/insn address spaces"
msgstr ""
-#: elf32-iq2000.c:814 elf32-m32c.c:797
+#: elf32-iq2000.c:821 elf32-m32c.c:831
#, c-format
msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
-#: elf32-m32r.c:1436
+#: elf32-m32r.c:1452
msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr ""
-#: elf32-m32r.c:3048
+#: elf32-m32r.c:3060
msgid "%B: The target (%s) of an %s relocation is in the wrong section (%A)"
msgstr ""
-#: elf32-m32r.c:3576
+#: elf32-m32r.c:3588
msgid "%B: Instruction set mismatch with previous modules"
msgstr ""
-#: elf32-m32r.c:3597
+#: elf32-m32r.c:3609
#, c-format
msgid "private flags = %lx"
msgstr ""
-#: elf32-m32r.c:3602
+#: elf32-m32r.c:3614
#, c-format
msgid ": m32r instructions"
msgstr ""
-#: elf32-m32r.c:3603
+#: elf32-m32r.c:3615
#, c-format
msgid ": m32rx instructions"
msgstr ""
-#: elf32-m32r.c:3604
+#: elf32-m32r.c:3616
#, c-format
msgid ": m32r2 instructions"
msgstr ""
-#: elf32-m68hc1x.c:1106
+#: elf32-m68hc1x.c:1044
#, c-format
msgid ""
"Reference to the far symbol `%s' using a wrong relocation may result in "
"incorrect execution"
msgstr ""
-#: elf32-m68hc1x.c:1129
+#: elf32-m68hc1x.c:1067
#, c-format
msgid ""
"banked address [%lx:%04lx] (%lx) is not in the same bank as current banked "
"address [%lx:%04lx] (%lx)"
msgstr ""
-#: elf32-m68hc1x.c:1148
+#: elf32-m68hc1x.c:1086
#, c-format
msgid ""
"reference to a banked address [%lx:%04lx] in the normal address space at %"
"04lx"
msgstr ""
-#: elf32-m68hc1x.c:1281
+#: elf32-m68hc1x.c:1219
msgid ""
"%B: linking files compiled for 16-bit integers (-mshort) and others for 32-"
"bit integers"
msgstr ""
-#: elf32-m68hc1x.c:1288
+#: elf32-m68hc1x.c:1226
msgid ""
"%B: linking files compiled for 32-bit double (-fshort-double) and others for "
"64-bit double"
msgstr ""
-#: elf32-m68hc1x.c:1297
+#: elf32-m68hc1x.c:1235
msgid "%B: linking files compiled for HCS12 with others compiled for HC12"
msgstr ""
-#: elf32-m68hc1x.c:1313 elf32-ppc.c:3576 elf64-sparc.c:696 elfxx-mips.c:9894
+#: elf32-m68hc1x.c:1251 elf32-ppc.c:3733 elf64-sparc.c:696 elfxx-mips.c:11271
msgid "%B: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
-#: elf32-m68hc1x.c:1341
+#: elf32-m68hc1x.c:1279
#, c-format
msgid "[abi=32-bit int, "
msgstr ""
-#: elf32-m68hc1x.c:1343
+#: elf32-m68hc1x.c:1281
#, c-format
msgid "[abi=16-bit int, "
msgstr ""
-#: elf32-m68hc1x.c:1346
+#: elf32-m68hc1x.c:1284
#, c-format
msgid "64-bit double, "
msgstr ""
-#: elf32-m68hc1x.c:1348
+#: elf32-m68hc1x.c:1286
#, c-format
msgid "32-bit double, "
msgstr ""
-#: elf32-m68hc1x.c:1351
+#: elf32-m68hc1x.c:1289
#, c-format
msgid "cpu=HC11]"
msgstr ""
-#: elf32-m68hc1x.c:1353
+#: elf32-m68hc1x.c:1291
#, c-format
msgid "cpu=HCS12]"
msgstr ""
-#: elf32-m68hc1x.c:1355
+#: elf32-m68hc1x.c:1293
#, c-format
msgid "cpu=HC12]"
msgstr ""
-#: elf32-m68hc1x.c:1358
+#: elf32-m68hc1x.c:1296
#, c-format
msgid " [memory=bank-model]"
msgstr ""
-#: elf32-m68hc1x.c:1360
+#: elf32-m68hc1x.c:1298
#, c-format
msgid " [memory=flat]"
msgstr ""
-#: elf32-m68k.c:431
-#, c-format
-msgid " [cpu32]"
+#: elf32-m68k.c:634 elf32-m68k.c:635
+msgid "unknown"
msgstr ""
-#: elf32-m68k.c:434
-#, c-format
-msgid " [m68000]"
-msgstr ""
-
-#: elf32-mcore.c:98 elf32-mcore.c:428
+#: elf32-mcore.c:98 elf32-mcore.c:441
msgid "%B: Relocation %s (%d) is not currently supported.\n"
msgstr ""
-#: elf32-mcore.c:414
+#: elf32-mcore.c:427
msgid "%B: Unknown relocation type %d\n"
msgstr ""
-#: elf32-mips.c:971 elf64-mips.c:1929 elfn32-mips.c:1774
-msgid "literal relocation occurs for an external symbol"
+#: elf32-mep.c:809
+msgid "%B and %B are for different cores"
msgstr ""
-#: elf32-mips.c:1011 elf64-mips.c:1972 elfn32-mips.c:1815
-msgid "32bits gp relative relocation occurs for an external symbol"
+#: elf32-mep.c:826
+msgid "%B and %B are for different configurations"
msgstr ""
-#: elf32-mips.c:1134 elf64-mips.c:2066 elfn32-mips.c:1915
+#: elf32-mep.c:864
#, c-format
-msgid "Linking mips16 objects into %s format is not supported"
+msgid "private flags = 0x%lx"
+msgstr ""
+
+#: elf32-mips.c:987 elf64-mips.c:1961 elfn32-mips.c:1806
+msgid "literal relocation occurs for an external symbol"
+msgstr ""
+
+#: elf32-mips.c:1027 elf32-score.c:483 elf64-mips.c:2004 elfn32-mips.c:1847
+msgid "32bits gp relative relocation occurs for an external symbol"
msgstr ""
-#: elf32-ppc.c:1652
+#: elf32-ppc.c:1680
#, c-format
msgid "generic linker can't handle %s"
msgstr ""
-#: elf32-ppc.c:2080
+#: elf32-ppc.c:2162
msgid "corrupt or empty %s section in %B"
msgstr ""
-#: elf32-ppc.c:2087
+#: elf32-ppc.c:2169
msgid "unable to read in %s section from %B"
msgstr ""
-#: elf32-ppc.c:2093
+#: elf32-ppc.c:2175
msgid "corrupt %s section in %B"
msgstr ""
-#: elf32-ppc.c:2136
+#: elf32-ppc.c:2218
msgid "warning: unable to set size of %s section in %B"
msgstr ""
-#: elf32-ppc.c:2183
+#: elf32-ppc.c:2266
msgid "failed to allocate space for new APUinfo section."
msgstr ""
-#: elf32-ppc.c:2202
+#: elf32-ppc.c:2285
msgid "failed to compute new APUinfo section."
msgstr ""
-#: elf32-ppc.c:2205
+#: elf32-ppc.c:2288
msgid "failed to install new APUinfo section."
msgstr ""
-#: elf32-ppc.c:2941
+#: elf32-ppc.c:3021
msgid "%B: relocation %s cannot be used when making a shared object"
msgstr ""
#. It does not make sense to have a procedure linkage
#. table entry for a local symbol.
-#: elf32-ppc.c:3211
+#: elf32-ppc.c:3291
msgid "%B(%A+0x%lx): %s reloc against local symbol"
msgstr ""
-#: elf32-ppc.c:3541
+#: elf32-ppc.c:3632 elf32-ppc.c:3636 elfxx-mips.c:11015 elfxx-mips.c:11034
+#: elfxx-mips.c:11049
+msgid "Warning: %B uses hard float, %B uses soft float"
+msgstr ""
+
+#: elf32-ppc.c:3639 elf32-ppc.c:3643 elfxx-mips.c:10996 elfxx-mips.c:11000
+msgid "Warning: %B uses unknown floating point ABI %d"
+msgstr ""
+
+#: elf32-ppc.c:3698
msgid ""
"%B: compiled with -mrelocatable and linked with modules compiled normally"
msgstr ""
-#: elf32-ppc.c:3549
+#: elf32-ppc.c:3706
msgid ""
"%B: compiled normally and linked with modules compiled with -mrelocatable"
msgstr ""
-#: elf32-ppc.c:5768 elf64-ppc.c:10186
+#: elf32-ppc.c:3792
+msgid "Using bss-plt due to %B"
+msgstr ""
+
+#: elf32-ppc.c:5997 elf64-ppc.c:10489
msgid "%B: unknown relocation type %d for symbol %s"
msgstr ""
-#: elf32-ppc.c:6018
+#: elf32-ppc.c:6247
msgid "%B(%A+0x%lx): non-zero addend on %s reloc against `%s'"
msgstr ""
-#: elf32-ppc.c:6365 elf32-ppc.c:6391 elf32-ppc.c:6450
+#: elf32-ppc.c:6592 elf32-ppc.c:6618 elf32-ppc.c:6677
msgid ""
"%B: the target (%s) of a %s relocation is in the wrong output section (%s)"
msgstr ""
-#: elf32-ppc.c:6505
+#: elf32-ppc.c:6732
msgid "%B: relocation %s is not yet supported for symbol %s."
msgstr ""
-#: elf32-ppc.c:6610 elf64-ppc.c:10872
+#: elf32-ppc.c:6840 elf64-ppc.c:11184
msgid "%B(%A+0x%lx): %s reloc against `%s': error %d"
msgstr ""
-#: elf32-s390.c:2253 elf64-s390.c:2225
+#: elf32-s390.c:2238 elf64-s390.c:2212
msgid "%B(%A+0x%lx): invalid instruction for TLS relocation %s"
msgstr ""
-#: elf32-sh64.c:218 elf64-sh64.c:2322
+#: elf32-score.c:1417 elfxx-mips.c:2695
+msgid "not enough GOT space for local GOT entries"
+msgstr ""
+
+#: elf32-score.c:2549
+#, c-format
+msgid "%s: Malformed reloc detected for section %s"
+msgstr ""
+
+#: elf32-score.c:2600
+msgid "%B: CALL15 reloc at 0x%lx not against global symbol"
+msgstr ""
+
+#: elf32-score.c:3755
+#, c-format
+msgid " [pic]"
+msgstr ""
+
+#: elf32-score.c:3759
+#, c-format
+msgid " [fix dep]"
+msgstr ""
+
+#: elf32-score.c:3801 elfxx-mips.c:11180
+msgid "%B: warning: linking PIC files with non-PIC files"
+msgstr ""
+
+#: elf32-sh64.c:221 elf64-sh64.c:2349
#, c-format
msgid "%s: compiled as 32-bit object and %s is 64-bit"
msgstr ""
-#: elf32-sh64.c:221 elf64-sh64.c:2325
+#: elf32-sh64.c:224 elf64-sh64.c:2352
#, c-format
msgid "%s: compiled as 64-bit object and %s is 32-bit"
msgstr ""
-#: elf32-sh64.c:223 elf64-sh64.c:2327
+#: elf32-sh64.c:226 elf64-sh64.c:2354
#, c-format
msgid "%s: object size does not match that of target %s"
msgstr ""
-#: elf32-sh64.c:446 elf64-sh64.c:2899
+#: elf32-sh64.c:449 elf64-sh64.c:2893
#, c-format
msgid "%s: encountered datalabel symbol in input"
msgstr ""
-#: elf32-sh64.c:523
+#: elf32-sh64.c:526
msgid "PTB mismatch: a SHmedia address (bit 0 == 1)"
msgstr ""
-#: elf32-sh64.c:526
+#: elf32-sh64.c:529
msgid "PTA mismatch: a SHcompact address (bit 0 == 0)"
msgstr ""
-#: elf32-sh64.c:544
+#: elf32-sh64.c:547
#, c-format
msgid "%s: GAS error: unexpected PTB insn with R_SH_PT_16"
msgstr ""
-#: elf32-sh64.c:593
+#: elf32-sh64.c:596
msgid "%B: error: unaligned relocation type %d at %08x reloc %p\n"
msgstr ""
-#: elf32-sh64.c:669
+#: elf32-sh64.c:672
#, c-format
msgid "%s: could not write out added .cranges entries"
msgstr ""
-#: elf32-sh64.c:729
+#: elf32-sh64.c:732
#, c-format
msgid "%s: could not write out sorted .cranges entries"
msgstr ""
-#: elf32-sh.c:2176
+#: elf32-sh.c:532
msgid "%B: 0x%lx: warning: bad R_SH_USES offset"
msgstr ""
-#: elf32-sh.c:2188
+#: elf32-sh.c:544
msgid "%B: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
msgstr ""
-#: elf32-sh.c:2205
+#: elf32-sh.c:561
msgid "%B: 0x%lx: warning: bad R_SH_USES load offset"
msgstr ""
-#: elf32-sh.c:2220
+#: elf32-sh.c:576
msgid "%B: 0x%lx: warning: could not find expected reloc"
msgstr ""
-#: elf32-sh.c:2248
+#: elf32-sh.c:604
msgid "%B: 0x%lx: warning: symbol in unexpected section"
msgstr ""
-#: elf32-sh.c:2361
+#: elf32-sh.c:730
msgid "%B: 0x%lx: warning: could not find expected COUNT reloc"
msgstr ""
-#: elf32-sh.c:2370
+#: elf32-sh.c:739
msgid "%B: 0x%lx: warning: bad count"
msgstr ""
-#: elf32-sh.c:2765 elf32-sh.c:3135
+#: elf32-sh.c:1143 elf32-sh.c:1513
msgid "%B: 0x%lx: fatal: reloc overflow while relaxing"
msgstr ""
-#: elf32-sh.c:4566 elf64-sh64.c:1509
+#: elf32-sh.c:3248 elf64-sh64.c:1525
msgid "Unexpected STO_SH5_ISA32 on local symbol is not handled"
msgstr ""
-#: elf32-sh.c:4791
+#: elf32-sh.c:3485
msgid "%B: 0x%lx: fatal: unaligned branch target for relax-support relocation"
msgstr ""
-#: elf32-sh.c:4824 elf32-sh.c:4839
+#: elf32-sh.c:3518 elf32-sh.c:3533
msgid "%B: 0x%lx: fatal: unaligned %s relocation 0x%lx"
msgstr ""
-#: elf32-sh.c:4853
+#: elf32-sh.c:3547
msgid "%B: 0x%lx: fatal: R_SH_PSHA relocation %d not in range -32..32"
msgstr ""
-#: elf32-sh.c:4867
+#: elf32-sh.c:3561
msgid "%B: 0x%lx: fatal: R_SH_PSHL relocation %d not in range -32..32"
msgstr ""
-#: elf32-sh.c:6601 elf64-alpha.c:4466
+#: elf32-sh.c:5274 elf64-alpha.c:4531
msgid "%B: TLS local exec code cannot be linked into shared objects"
msgstr ""
@@ -1581,57 +1708,138 @@ msgstr ""
msgid "%B: Failed to add renamed symbol %s"
msgstr ""
-#: elf32-sparc.c:87
+#: elf32-sparc.c:88
msgid "%B: compiled for a 64 bit system and target is 32 bit"
msgstr ""
-#: elf32-sparc.c:100
+#: elf32-sparc.c:101
msgid "%B: linking little endian files with big endian files"
msgstr ""
-#: elf32-v850.c:160
+#: elf32-spu.c:995
+msgid "warning: call to non-function symbol %s defined in %B"
+msgstr ""
+
+#: elf32-spu.c:1315
+msgid "%B is not allowed to define %s"
+msgstr ""
+
+#: elf32-spu.c:1352
+#, c-format
+msgid "%s in overlay section"
+msgstr ""
+
+#: elf32-spu.c:1363
+msgid "overlay stub relocation overflow"
+msgstr ""
+
+#: elf32-spu.c:1820
+#, c-format
+msgid "warning: %s overlaps %s\n"
+msgstr ""
+
+#: elf32-spu.c:1836
+#, c-format
+msgid "warning: %s exceeds section size\n"
+msgstr ""
+
+#: elf32-spu.c:1867
+msgid "%A:0x%v not found in function table\n"
+msgstr ""
+
+#: elf32-spu.c:1958
+msgid ""
+"%B(%A+0x%v): call to non-code section %B(%A), stack analysis incomplete\n"
+msgstr ""
+
+#: elf32-spu.c:2079
+#, c-format
+msgid "%A link_order not found\n"
+msgstr ""
+
+#: elf32-spu.c:2358
+#, c-format
+msgid "Stack analysis will ignore the call from %s to %s\n"
+msgstr ""
+
+#: elf32-spu.c:2513
+msgid "%s: 0x%v 0x%v\n"
+msgstr ""
+
+#: elf32-spu.c:2517
+msgid " calls:\n"
+msgstr ""
+
+#: elf32-spu.c:2524
+#, c-format
+msgid " %s%s %s\n"
+msgstr ""
+
+#: elf32-spu.c:2585
+msgid "Stack size for call graph root nodes.\n"
+msgstr ""
+
+#: elf32-spu.c:2586
+msgid ""
+"\n"
+"Stack size for functions. Annotations: '*' max stack, 't' tail call\n"
+msgstr ""
+
+#: elf32-spu.c:2615
+msgid " %s: 0x%v\n"
+msgstr ""
+
+#: elf32-spu.c:2625
+msgid "Maximum stack required is 0x%v\n"
+msgstr ""
+
+#: elf32-spu.c:2751
+msgid "%B(%s+0x%lx): unresolvable %s relocation against symbol `%s'"
+msgstr ""
+
+#: elf32-v850.c:162
#, c-format
msgid "Variable `%s' cannot occupy in multiple small data regions"
msgstr ""
-#: elf32-v850.c:163
+#: elf32-v850.c:165
#, c-format
msgid ""
"Variable `%s' can only be in one of the small, zero, and tiny data regions"
msgstr ""
-#: elf32-v850.c:166
+#: elf32-v850.c:168
#, c-format
msgid ""
"Variable `%s' cannot be in both small and zero data regions simultaneously"
msgstr ""
-#: elf32-v850.c:169
+#: elf32-v850.c:171
#, c-format
msgid ""
"Variable `%s' cannot be in both small and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:172
+#: elf32-v850.c:174
#, c-format
msgid ""
"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:475
+#: elf32-v850.c:477
#, c-format
msgid "FAILED to find previous HI16 reloc\n"
msgstr ""
-#: elf32-v850.c:1684
+#: elf32-v850.c:1712
msgid "could not locate special linker symbol __gp"
msgstr ""
-#: elf32-v850.c:1688
+#: elf32-v850.c:1716
msgid "could not locate special linker symbol __ep"
msgstr ""
-#: elf32-v850.c:1692
+#: elf32-v850.c:1720
msgid "could not locate special linker symbol __ctbp"
msgstr ""
@@ -1659,145 +1867,144 @@ msgstr ""
msgid "v850e1 architecture"
msgstr ""
-#: elf32-vax.c:531
+#: elf32-vax.c:540
#, c-format
msgid " [nonpic]"
msgstr ""
-#: elf32-vax.c:534
+#: elf32-vax.c:543
#, c-format
msgid " [d-float]"
msgstr ""
-#: elf32-vax.c:537
+#: elf32-vax.c:546
#, c-format
msgid " [g-float]"
msgstr ""
-#: elf32-vax.c:647
+#: elf32-vax.c:656
#, c-format
msgid ""
"%s: warning: GOT addend of %ld to `%s' does not match previous GOT addend of "
"%ld"
msgstr ""
-#: elf32-vax.c:1604
+#: elf32-vax.c:1583
#, c-format
msgid "%s: warning: PLT addend of %d to `%s' from %s section ignored"
msgstr ""
-#: elf32-vax.c:1728
+#: elf32-vax.c:1720
#, c-format
msgid "%s: warning: %s relocation against symbol `%s' from %s section"
msgstr ""
-#: elf32-vax.c:1734
+#: elf32-vax.c:1726
#, c-format
msgid "%s: warning: %s relocation to 0x%x from %s section"
msgstr ""
-#: elf32-xstormy16.c:425 elf32-ia64.c:2563 elf64-ia64.c:2563
+#: elf32-xstormy16.c:451 elf32-ia64.c:2961 elf64-ia64.c:2961
msgid "non-zero addend in @fptr reloc"
msgstr ""
-#: elf32-xtensa.c:705
+#: elf32-xtensa.c:733
msgid "%B(%A): invalid property table"
msgstr ""
-#: elf32-xtensa.c:2199
+#: elf32-xtensa.c:2177
msgid "%B(%A+0x%lx): relocation offset out of range (size=0x%x)"
msgstr ""
-#: elf32-xtensa.c:2256
+#: elf32-xtensa.c:2234
msgid "dynamic relocation in read-only section"
msgstr ""
-#: elf32-xtensa.c:2421
+#: elf32-xtensa.c:2407
msgid "internal inconsistency in size of .got.loc section"
msgstr ""
-#: elf32-xtensa.c:2735
+#: elf32-xtensa.c:2714
msgid "%B: incompatible machine type. Output is 0x%x. Input is 0x%x"
msgstr ""
-#: elf32-xtensa.c:3881 elf32-xtensa.c:3889
+#: elf32-xtensa.c:3920 elf32-xtensa.c:3928
msgid "Attempt to convert L32R/CALLX to CALL failed"
msgstr ""
-#: elf32-xtensa.c:5467 elf32-xtensa.c:5543 elf32-xtensa.c:6496
-#: elf32-xtensa.c:6550
+#: elf32-xtensa.c:5522 elf32-xtensa.c:5598 elf32-xtensa.c:6714
msgid ""
"%B(%A+0x%lx): could not decode instruction; possible configuration mismatch"
msgstr ""
-#: elf32-xtensa.c:6369 elf32-xtensa.c:6532
+#: elf32-xtensa.c:6454
msgid ""
"%B(%A+0x%lx): could not decode instruction for XTENSA_ASM_SIMPLIFY "
"relocation; possible configuration mismatch"
msgstr ""
-#: elf32-xtensa.c:7855
+#: elf32-xtensa.c:8166
msgid "invalid relocation address"
msgstr ""
-#: elf32-xtensa.c:7904
+#: elf32-xtensa.c:8215
msgid "overflow after relaxation"
msgstr ""
-#: elf32-xtensa.c:9032
+#: elf32-xtensa.c:9341
msgid "%B(%A+0x%lx): unexpected fix for %s relocation"
msgstr ""
-#: elf64-alpha.c:443
+#: elf64-alpha.c:451
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr ""
-#: elf64-alpha.c:2363
+#: elf64-alpha.c:2402
msgid "%B: .got subsegment exceeds 64K (size %d)"
msgstr ""
-#: elf64-alpha.c:4210 elf64-alpha.c:4222
+#: elf64-alpha.c:4275 elf64-alpha.c:4287
msgid "%B: gp-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-alpha.c:4248 elf64-alpha.c:4383
+#: elf64-alpha.c:4313 elf64-alpha.c:4448
msgid "%B: pc-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-alpha.c:4276
+#: elf64-alpha.c:4341
msgid "%B: change in gp: BRSGP %s"
msgstr ""
-#: elf64-alpha.c:4301
+#: elf64-alpha.c:4366
msgid "<unknown>"
msgstr ""
-#: elf64-alpha.c:4306
+#: elf64-alpha.c:4371
msgid "%B: !samegp reloc against symbol without .prologue: %s"
msgstr ""
-#: elf64-alpha.c:4358
+#: elf64-alpha.c:4423
msgid "%B: unhandled dynamic relocation against %s"
msgstr ""
-#: elf64-alpha.c:4390
+#: elf64-alpha.c:4455
msgid "%B: pc-relative relocation against undefined weak symbol %s"
msgstr ""
-#: elf64-alpha.c:4450
+#: elf64-alpha.c:4515
msgid "%B: dtp-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-alpha.c:4473
+#: elf64-alpha.c:4538
msgid "%B: tp-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-hppa.c:2046
+#: elf64-hppa.c:2039
#, c-format
msgid "stub entry for %s cannot load .plt, dp offset = %ld"
msgstr ""
-#: elf64-mmix.c:1163
+#: elf64-mmix.c:1175
#, c-format
msgid ""
"%s: Internal inconsistency error for value for\n"
@@ -1805,126 +2012,122 @@ msgid ""
"08lx\n"
msgstr ""
-#: elf64-mmix.c:1602
+#: elf64-mmix.c:1616
#, c-format
msgid ""
"%s: base-plus-offset relocation against register symbol: (unknown) in %s"
msgstr ""
-#: elf64-mmix.c:1607
+#: elf64-mmix.c:1621
#, c-format
msgid "%s: base-plus-offset relocation against register symbol: %s in %s"
msgstr ""
-#: elf64-mmix.c:1651
+#: elf64-mmix.c:1665
#, c-format
msgid "%s: register relocation against non-register symbol: (unknown) in %s"
msgstr ""
-#: elf64-mmix.c:1656
+#: elf64-mmix.c:1670
#, c-format
msgid "%s: register relocation against non-register symbol: %s in %s"
msgstr ""
-#: elf64-mmix.c:1693
+#: elf64-mmix.c:1707
#, c-format
msgid "%s: directive LOCAL valid only with a register or absolute value"
msgstr ""
-#: elf64-mmix.c:1721
+#: elf64-mmix.c:1735
#, c-format
msgid ""
"%s: LOCAL directive: Register $%ld is not a local register. First global "
"register is $%ld."
msgstr ""
-#: elf64-mmix.c:2207
+#: elf64-mmix.c:2200
#, c-format
msgid ""
"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
"linked file\n"
msgstr ""
-#: elf64-mmix.c:2265
+#: elf64-mmix.c:2258
msgid "Register section has contents\n"
msgstr ""
-#: elf64-mmix.c:2457
+#: elf64-mmix.c:2450
#, c-format
msgid ""
"Internal inconsistency: remaining %u != max %u.\n"
" Please report this bug."
msgstr ""
-#: elf64-ppc.c:2500 libbfd.c:931
+#: elf64-ppc.c:2568 libbfd.c:948
msgid "%B: compiled for a big endian system and target is little endian"
msgstr ""
-#: elf64-ppc.c:2503 libbfd.c:933
+#: elf64-ppc.c:2571 libbfd.c:950
msgid "%B: compiled for a little endian system and target is big endian"
msgstr ""
-#: elf64-ppc.c:5707
+#: elf64-ppc.c:5887
#, c-format
msgid ""
"copy reloc against `%s' requires lazy plt linking; avoid setting "
"LD_BIND_NOW=1 or upgrade gcc"
msgstr ""
-#: elf64-ppc.c:6155
+#: elf64-ppc.c:6315
msgid "dynreloc miscount for %B, section %A"
msgstr ""
-#: elf64-ppc.c:6257
+#: elf64-ppc.c:6419
msgid "%B: .opd is not a regular array of opd entries"
msgstr ""
-#: elf64-ppc.c:6266
+#: elf64-ppc.c:6428
msgid "%B: unexpected reloc type %u in .opd section"
msgstr ""
-#: elf64-ppc.c:6287
+#: elf64-ppc.c:6449
msgid "%B: undefined sym `%s' in .opd section"
msgstr ""
-#: elf64-ppc.c:6939 elf64-ppc.c:7318
+#: elf64-ppc.c:7156 elf64-ppc.c:7536
#, c-format
msgid "%s defined in removed toc entry"
msgstr ""
-#: elf64-ppc.c:8041
+#: elf64-ppc.c:8271
#, c-format
msgid "long branch stub `%s' offset overflow"
msgstr ""
-#: elf64-ppc.c:8116
+#: elf64-ppc.c:8346
#, c-format
msgid "can't find branch stub `%s'"
msgstr ""
-#: elf64-ppc.c:8155 elf64-ppc.c:8231
+#: elf64-ppc.c:8412 elf64-ppc.c:8488
#, c-format
msgid "linkage table error against `%s'"
msgstr ""
-#: elf64-ppc.c:8360
+#: elf64-ppc.c:8617
#, c-format
msgid "can't build branch stub `%s'"
msgstr ""
-#: elf64-ppc.c:8784
+#: elf64-ppc.c:9069
msgid "%B section %A exceeds stub group size"
msgstr ""
-#: elf64-ppc.c:9295
-msgid ".glink and .plt too far apart"
-msgstr ""
-
-#: elf64-ppc.c:9408
+#: elf64-ppc.c:9681
msgid "stubs don't match calculated size"
msgstr ""
-#: elf64-ppc.c:9420
+#: elf64-ppc.c:9693
#, c-format
msgid ""
"linker stubs in %u group%s\n"
@@ -1935,28 +2138,28 @@ msgid ""
" plt call %lu"
msgstr ""
-#: elf64-ppc.c:10075
+#: elf64-ppc.c:10377
msgid ""
"%B(%A+0x%lx): automatic multiple TOCs not supported using your crt files; "
"recompile with -mminimal-toc or upgrade gcc"
msgstr ""
-#: elf64-ppc.c:10083
+#: elf64-ppc.c:10385
msgid ""
"%B(%A+0x%lx): sibling call optimization to `%s' does not allow automatic "
"multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, "
"or make `%s' extern"
msgstr ""
-#: elf64-ppc.c:10727
+#: elf64-ppc.c:11036
msgid "%B: relocation %s is not supported for symbol %s."
msgstr ""
-#: elf64-ppc.c:10806
+#: elf64-ppc.c:11118
msgid "%B: error: relocation %s not a multiple of %d"
msgstr ""
-#: elf64-sh64.c:1676
+#: elf64-sh64.c:1700
#, c-format
msgid "%s: error: unaligned relocation type %d at %08x reloc %08x\n"
msgstr ""
@@ -1981,471 +2184,519 @@ msgstr ""
msgid "%B: linking UltraSPARC specific with HAL specific code"
msgstr ""
-#: elf64-x86-64.c:692 elf64-x86-64.c:818 elf64-x86-64.c:2069
+#: elf64-x86-64.c:798 elf64-x86-64.c:958 elf64-x86-64.c:2359
msgid ""
"%B: relocation %s against `%s' can not be used when making a shared object; "
"recompile with -fPIC"
msgstr ""
-#: elf64-x86-64.c:760
+#: elf64-x86-64.c:889
msgid "%B: %s' accessed both as normal and thread local symbol"
msgstr ""
-#: elf64-x86-64.c:2000
+#: elf64-x86-64.c:2271
msgid ""
"%B: relocation R_X86_64_GOTOFF64 against protected function `%s' can not be "
"used when making a shared object"
msgstr ""
-#: elf64-x86-64.c:2065
+#: elf64-x86-64.c:2355
msgid ""
"%B: relocation R_X86_64_PC32 against protected function `%s' can not be used "
"when making a shared object"
msgstr ""
-#: elf.c:288
+#: elf-attrs.c:581
+msgid "ERROR: %B: Must be processed by '%s' toolchain"
+msgstr ""
+
+#: elf-attrs.c:601 elf-attrs.c:620
+msgid "ERROR: %B: Incompatible object tag '%s':%d"
+msgstr ""
+
+#: elf.c:309
msgid "%B: invalid string offset %u >= %lu for section `%s'"
msgstr ""
-#: elf.c:552
+#: elf.c:411
+msgid "%B symbol number %lu references nonexistent SHT_SYMTAB_SHNDX section"
+msgstr ""
+
+#: elf.c:564
+msgid "%B: Corrupt size field in group section header: 0x%lx"
+msgstr ""
+
+#: elf.c:600
msgid "%B: invalid SHT_GROUP entry"
msgstr ""
-#: elf.c:622
+#: elf.c:670
msgid "%B: no group info for section %A"
msgstr ""
-#: elf.c:652 elf.c:3091 elflink.c:7588
+#: elf.c:700 elf.c:3251 elflink.c:9120
msgid "%B: warning: sh_link not set for section `%A'"
msgstr ""
-#: elf.c:688
+#: elf.c:716
+msgid "%B: sh_link [%d] in section `%A' is incorrect"
+msgstr ""
+
+#: elf.c:751
msgid "%B: unknown [%d] section `%s' in group [%s]"
msgstr ""
-#: elf.c:1071
+#: elf.c:1160
#, c-format
msgid ""
"\n"
"Program Header:\n"
msgstr ""
-#: elf.c:1123
+#: elf.c:1202
#, c-format
msgid ""
"\n"
"Dynamic Section:\n"
msgstr ""
-#: elf.c:1248
+#: elf.c:1328
#, c-format
msgid ""
"\n"
"Version definitions:\n"
msgstr ""
-#: elf.c:1273
+#: elf.c:1353
#, c-format
msgid ""
"\n"
"Version References:\n"
msgstr ""
-#: elf.c:1278
+#: elf.c:1358
#, c-format
msgid " required from %s:\n"
msgstr ""
-#: elf.c:1985
+#: elf.c:2054
msgid "%B: invalid link %lu for reloc section %s (index %u)"
msgstr ""
-#: elf.c:3062
+#: elf.c:2222
+msgid ""
+"%B: don't know how to handle allocated, application specific section `%s' [0x"
+"%8x]"
+msgstr ""
+
+#: elf.c:2234
+msgid "%B: don't know how to handle processor specific section `%s' [0x%8x]"
+msgstr ""
+
+#: elf.c:2245
+msgid "%B: don't know how to handle OS specific section `%s' [0x%8x]"
+msgstr ""
+
+#: elf.c:2255
+msgid "%B: don't know how to handle section `%s' [0x%8x]"
+msgstr ""
+
+#: elf.c:3208
msgid "%B: sh_link of section `%A' points to discarded section `%A' of `%B'"
msgstr ""
-#: elf.c:4070
-msgid "%B: Not enough room for program headers (allocated %u, need %u)"
+#: elf.c:3231
+msgid "%B: sh_link of section `%A' points to removed section `%A' of `%B'"
msgstr ""
-#: elf.c:4173
+#: elf.c:4472
msgid ""
"%B: The first section in the PT_DYNAMIC segment is not the .dynamic section"
msgstr ""
-#: elf.c:4217
+#: elf.c:4495
msgid "%B: Not enough room for program headers, try linking with -N"
msgstr ""
-#: elf.c:4308
+#: elf.c:4573
msgid "%B: section %A lma 0x%lx overlaps previous sections"
msgstr ""
-#: elf.c:4709
+#: elf.c:4671
+msgid "%B: section `%A' can't be allocated in segment %d"
+msgstr ""
+
+#: elf.c:4720
msgid "%B: warning: allocated section `%s' not in segment"
msgstr ""
-#: elf.c:5002
+#: elf.c:5209
msgid "%B: symbol `%s' required but not present"
msgstr ""
-#: elf.c:5299
+#: elf.c:5522
msgid "%B: warning: Empty loadable segment detected, is this intentional ?\n"
msgstr ""
-#: elf.c:5961
+#: elf.c:6425
#, c-format
msgid ""
"Unable to find equivalent output section for symbol '%s' from section '%s'"
msgstr ""
-#: elf.c:6917
+#: elf.c:7399
msgid "%B: unsupported relocation type %s"
msgstr ""
-#: elfcode.h:1110
+#: elfcode.h:810
+#, c-format
+msgid "warning: %s has a corrupt string table index - ignoring"
+msgstr ""
+
+#: elfcode.h:1176
#, c-format
msgid "%s: version count (%ld) does not match symbol count (%ld)"
msgstr ""
-#: elfcode.h:1337
+#: elfcode.h:1409
#, c-format
msgid "%s(%s): relocation %d has invalid symbol index %ld"
msgstr ""
-#: elf-hppa.h:1443 elf-hppa.h:1458
+#: elf-eh-frame.c:822
+msgid ""
+"%P: fde encoding in %B(%A) prevents .eh_frame_hdr table being created.\n"
+msgstr ""
+
+#: elf-eh-frame.c:973
+msgid "%P: error in %B(%A); no .eh_frame_hdr table will be created.\n"
+msgstr ""
+
+#: elf-hppa.h:2218 elf-hppa.h:2232
msgid "%B(%A): warning: unresolvable relocation against symbol `%s'"
msgstr ""
-#: elflink.c:907
+#: elflink.c:1004
msgid ""
"%s: TLS definition in %B section %A mismatches non-TLS definition in %B "
"section %A"
msgstr ""
-#: elflink.c:911
+#: elflink.c:1008
msgid "%s: TLS reference in %B mismatches non-TLS reference in %B"
msgstr ""
-#: elflink.c:915
+#: elflink.c:1012
msgid "%s: TLS definition in %B section %A mismatches non-TLS reference in %B"
msgstr ""
-#: elflink.c:919
+#: elflink.c:1016
msgid "%s: TLS reference in %B mismatches non-TLS definition in %B section %A"
msgstr ""
-#: elflink.c:1491
+#: elflink.c:1630
msgid "%B: unexpected redefinition of indirect versioned symbol `%s'"
msgstr ""
-#: elflink.c:1807
-msgid "%B: undefined versioned symbol name %s"
+#: elflink.c:1950
+msgid "%B: version node not found for symbol %s"
msgstr ""
-#: elflink.c:1955
+#: elflink.c:2098
msgid ""
"%B: bad reloc symbol index (0x%lx >= 0x%lx) for offset 0x%lx in section `%A'"
msgstr ""
-#: elflink.c:2147
+#: elflink.c:2290
msgid "%B: relocation size mismatch in %B section %A"
msgstr ""
-#: elflink.c:2437
+#: elflink.c:2598
#, c-format
msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr ""
-#: elflink.c:2761
-msgid "warning: creating a DT_TEXTREL in a shared object."
-msgstr ""
-
-#: elflink.c:3696
+#: elflink.c:3893
msgid "%B: %s: invalid version %u (max %d)"
msgstr ""
-#: elflink.c:3732
+#: elflink.c:3929
msgid "%B: %s: invalid needed version %d"
msgstr ""
-#: elflink.c:3912
+#: elflink.c:4112
+msgid ""
+"Warning: alignment %u of common symbol `%s' in %B is greater than the "
+"alignment (%u) of its section %A"
+msgstr ""
+
+#: elflink.c:4118
msgid "Warning: alignment %u of symbol `%s' in %B is smaller than %u in %B"
msgstr ""
-#: elflink.c:3924
+#: elflink.c:4133
msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
msgstr ""
-#: elflink.c:4091
+#: elflink.c:4309
#, c-format
msgid "%s: invalid DSO for symbol `%s' definition"
msgstr ""
-#: elflink.c:5152
+#: elflink.c:5535
#, c-format
msgid "%s: undefined version: %s"
msgstr ""
-#: elflink.c:5219
+#: elflink.c:5603
msgid "%B: .preinit_array section is not allowed in DSO"
msgstr ""
-#: elflink.c:5978
+#: elflink.c:6621
+#, c-format
+msgid "undefined %s reference in complex symbol: %s"
+msgstr ""
+
+#: elflink.c:6776
+#, c-format
+msgid "unknown operator '%c' in complex symbol"
+msgstr ""
+
+#: elflink.c:7315 elflink.c:7332 elflink.c:7369 elflink.c:7386
+msgid "%B: Unable to sort relocs - they are in more than one size"
+msgstr ""
+
+#: elflink.c:7346 elflink.c:7400
+msgid "%B: Unable to sort relocs - they are of an unknown size"
+msgstr ""
+
+#: elflink.c:7449
msgid "Not enough memory to sort relocations"
msgstr ""
-#: elflink.c:6369
+#: elflink.c:7636
+msgid "%B: Too many sections: %d (>= %d)"
+msgstr ""
+
+#: elflink.c:7870
msgid "%B: %s symbol `%s' in %B is referenced by DSO"
msgstr ""
-#: elflink.c:6452
+#: elflink.c:7953
msgid "%B: could not find output section %A for input section %A"
msgstr ""
-#: elflink.c:6549
+#: elflink.c:8050
msgid "%B: %s symbol `%s' isn't defined"
msgstr ""
-#: elflink.c:7024
+#: elflink.c:8546
msgid ""
"error: %B contains a reloc (0x%s) for section %A that references a non-"
"existent global symbol"
msgstr ""
-#: elflink.c:7058
+#: elflink.c:8580
msgid ""
"%X`%s' referenced in section `%A' of %B: defined in discarded section `%A' "
"of %B\n"
msgstr ""
-#: elflink.c:7665
+#: elflink.c:9198
msgid "%A has both ordered [`%A' in %B] and unordered [`%A' in %B] sections"
msgstr ""
-#: elflink.c:7670
+#: elflink.c:9203
#, c-format
msgid "%A has both ordered and unordered sections"
msgstr ""
-#: elflink.c:8487 elflink.c:8528
+#: elflink.c:10090 elflink.c:10134
msgid "%B: could not find output section %s"
msgstr ""
-#: elflink.c:8492
+#: elflink.c:10095
#, c-format
msgid "warning: %s section has zero size"
msgstr ""
-#: elflink.c:9087
+#: elflink.c:10199
+msgid "%P: warning: creating a DT_TEXTREL in a shared object.\n"
+msgstr ""
+
+#: elflink.c:10567
+msgid "Removing unused section '%s' in file '%B'"
+msgstr ""
+
+#: elflink.c:10758
msgid "Warning: gc-sections option ignored"
msgstr ""
-#: elflink.c:9704
+#: elflink.c:11249
+msgid "%P%X: can not read symbols: %E\n"
+msgstr ""
+
+#: elflink.c:11391
msgid "%B: ignoring duplicate section `%A'"
msgstr ""
-#: elflink.c:9711 elflink.c:9718
+#: elflink.c:11398 elflink.c:11405
msgid "%B: duplicate section `%A' has different size"
msgstr ""
-#: elflink.c:9726 elflink.c:9731
+#: elflink.c:11413 elflink.c:11418
msgid "%B: warning: could not read contents of section `%A'"
msgstr ""
-#: elflink.c:9735
+#: elflink.c:11422
msgid "%B: warning: duplicate section `%A' has different contents"
msgstr ""
-#: elfxx-mips.c:866
-msgid "static procedure (no name)"
+#: elf-m10300.c:1531
+msgid ""
+"error: inappropriate relocation type for shared library (did you forget -"
+"fpic?)"
msgstr ""
-#: elfxx-mips.c:2513
-msgid "not enough GOT space for local GOT entries"
+#: elf-m10300.c:1534
+msgid "internal error: suspicious relocation type used in shared library"
+msgstr ""
+
+#: elfxx-mips.c:986
+msgid "static procedure (no name)"
msgstr ""
-#: elfxx-mips.c:4356
+#: elfxx-mips.c:4657
msgid "%B: %A+0x%lx: jump to stub routine which is not jal"
msgstr ""
-#: elfxx-mips.c:4993 elfxx-mips.c:5214
+#: elfxx-mips.c:5320 elfxx-mips.c:5540
msgid "%B: Warning: bad `%s' option size %u smaller than its header"
msgstr ""
-#: elfxx-mips.c:5965
+#: elfxx-mips.c:6399
msgid "%B: Malformed reloc detected for section %s"
msgstr ""
-#: elfxx-mips.c:6041
+#: elfxx-mips.c:6441
+msgid "%B: GOT reloc at 0x%lx not expected in executables"
+msgstr ""
+
+#: elfxx-mips.c:6511
msgid "%B: CALL16 reloc at 0x%lx not against global symbol"
msgstr ""
-#: elfxx-mips.c:9380
+#: elfxx-mips.c:7874
+msgid ""
+"%B: Can't find matching LO16 reloc against `%s' for %s at 0x%lx in section `%"
+"A'"
+msgstr ""
+
+#: elfxx-mips.c:10640
#, c-format
msgid "%s: illegal section name `%s'"
msgstr ""
-#: elfxx-mips.c:9719
-msgid "%B: endianness incompatible with that of the selected emulation"
+#: elfxx-mips.c:11010 elfxx-mips.c:11029
+msgid "Warning: %B uses -msingle-float, %B uses -mdouble-float"
msgstr ""
-#: elfxx-mips.c:9731
-msgid "%B: ABI is incompatible with that of the selected emulation"
+#: elfxx-mips.c:11085
+msgid "%B: endianness incompatible with that of the selected emulation"
msgstr ""
-#: elfxx-mips.c:9803
-msgid "%B: warning: linking PIC files with non-PIC files"
+#: elfxx-mips.c:11097
+msgid "%B: ABI is incompatible with that of the selected emulation"
msgstr ""
-#: elfxx-mips.c:9820
+#: elfxx-mips.c:11197
msgid "%B: linking 32-bit code with 64-bit code"
msgstr ""
-#: elfxx-mips.c:9848
+#: elfxx-mips.c:11225
msgid "%B: linking %s module with previous %s modules"
msgstr ""
-#: elfxx-mips.c:9871
+#: elfxx-mips.c:11248
msgid "%B: ABI mismatch: linking %s module with previous %s modules"
msgstr ""
-#: elfxx-mips.c:9936
+#: elfxx-mips.c:11313
#, c-format
msgid " [abi=O32]"
msgstr ""
-#: elfxx-mips.c:9938
+#: elfxx-mips.c:11315
#, c-format
msgid " [abi=O64]"
msgstr ""
-#: elfxx-mips.c:9940
+#: elfxx-mips.c:11317
#, c-format
msgid " [abi=EABI32]"
msgstr ""
-#: elfxx-mips.c:9942
+#: elfxx-mips.c:11319
#, c-format
msgid " [abi=EABI64]"
msgstr ""
-#: elfxx-mips.c:9944
+#: elfxx-mips.c:11321
#, c-format
msgid " [abi unknown]"
msgstr ""
-#: elfxx-mips.c:9946
+#: elfxx-mips.c:11323
#, c-format
msgid " [abi=N32]"
msgstr ""
-#: elfxx-mips.c:9948
+#: elfxx-mips.c:11325
#, c-format
msgid " [abi=64]"
msgstr ""
-#: elfxx-mips.c:9950
+#: elfxx-mips.c:11327
#, c-format
msgid " [no abi set]"
msgstr ""
-#: elfxx-mips.c:9953
-#, c-format
-msgid " [mips1]"
-msgstr ""
-
-#: elfxx-mips.c:9955
-#, c-format
-msgid " [mips2]"
-msgstr ""
-
-#: elfxx-mips.c:9957
-#, c-format
-msgid " [mips3]"
-msgstr ""
-
-#: elfxx-mips.c:9959
-#, c-format
-msgid " [mips4]"
-msgstr ""
-
-#: elfxx-mips.c:9961
-#, c-format
-msgid " [mips5]"
-msgstr ""
-
-#: elfxx-mips.c:9963
-#, c-format
-msgid " [mips32]"
-msgstr ""
-
-#: elfxx-mips.c:9965
-#, c-format
-msgid " [mips64]"
-msgstr ""
-
-#: elfxx-mips.c:9967
-#, c-format
-msgid " [mips32r2]"
-msgstr ""
-
-#: elfxx-mips.c:9969
-#, c-format
-msgid " [mips64r2]"
-msgstr ""
-
-#: elfxx-mips.c:9971
+#: elfxx-mips.c:11348
#, c-format
msgid " [unknown ISA]"
msgstr ""
-#: elfxx-mips.c:9974
-#, c-format
-msgid " [mdmx]"
-msgstr ""
-
-#: elfxx-mips.c:9977
-#, c-format
-msgid " [mips16]"
-msgstr ""
-
-#: elfxx-mips.c:9980
-#, c-format
-msgid " [32bitmode]"
-msgstr ""
-
-#: elfxx-mips.c:9982
+#: elfxx-mips.c:11359
#, c-format
msgid " [not 32bitmode]"
msgstr ""
-#: elfxx-sparc.c:402
+#: elfxx-sparc.c:428
#, c-format
msgid "invalid relocation type %d"
msgstr ""
-#: elfxx-sparc.c:2783
+#: elfxx-sparc.c:2899
msgid "%B: probably compiled without -fPIC?"
msgstr ""
-#: i386linux.c:457 m68klinux.c:461 sparclinux.c:458
+#: i386linux.c:454 m68klinux.c:458 sparclinux.c:453
#, c-format
msgid "Output file requires shared library `%s'\n"
msgstr ""
-#: i386linux.c:465 m68klinux.c:469 sparclinux.c:466
+#: i386linux.c:462 m68klinux.c:466 sparclinux.c:461
#, c-format
msgid "Output file requires shared library `%s.so.%s'\n"
msgstr ""
-#: i386linux.c:654 i386linux.c:704 m68klinux.c:661 m68klinux.c:709
-#: sparclinux.c:656 sparclinux.c:706
+#: i386linux.c:651 i386linux.c:701 m68klinux.c:658 m68klinux.c:706
+#: sparclinux.c:651 sparclinux.c:701
#, c-format
msgid "Symbol %s not defined for fixups\n"
msgstr ""
-#: i386linux.c:728 m68klinux.c:733 sparclinux.c:730
+#: i386linux.c:725 m68klinux.c:730 sparclinux.c:725
msgid "Warning: fixup count mismatch\n"
msgstr ""
@@ -2479,161 +2730,161 @@ msgstr ""
msgid "%B:%u: bad checksum in Intel Hex file (expected %u, found %u)"
msgstr ""
-#: ihex.c:389
+#: ihex.c:390
msgid "%B:%u: bad extended address record length in Intel Hex file"
msgstr ""
-#: ihex.c:406
+#: ihex.c:407
msgid "%B:%u: bad extended start address length in Intel Hex file"
msgstr ""
-#: ihex.c:423
+#: ihex.c:424
msgid "%B:%u: bad extended linear address record length in Intel Hex file"
msgstr ""
-#: ihex.c:440
+#: ihex.c:441
msgid "%B:%u: bad extended linear start address length in Intel Hex file"
msgstr ""
-#: ihex.c:457
+#: ihex.c:458
msgid "%B:%u: unrecognized ihex type %u in Intel Hex file"
msgstr ""
-#: ihex.c:578
+#: ihex.c:577
msgid "%B: internal error in ihex_read_section"
msgstr ""
-#: ihex.c:612
+#: ihex.c:611
msgid "%B: bad section length in ihex_read_section"
msgstr ""
-#: ihex.c:824
+#: ihex.c:823
#, c-format
msgid "%s: address 0x%s out of range for Intel Hex file"
msgstr ""
-#: libbfd.c:961
+#: libbfd.c:978
#, c-format
msgid "Deprecated %s called at %s line %d in %s\n"
msgstr ""
-#: libbfd.c:964
+#: libbfd.c:981
#, c-format
msgid "Deprecated %s called\n"
msgstr ""
-#: linker.c:1873
+#: linker.c:1877
msgid "%B: indirect symbol `%s' to `%s' is a loop"
msgstr ""
-#: linker.c:2740
+#: linker.c:2743
#, c-format
msgid "Attempt to do relocatable link with %s input and %s output"
msgstr ""
-#: linker.c:3037
+#: linker.c:3044
msgid "%B: warning: ignoring duplicate section `%A'\n"
msgstr ""
-#: linker.c:3051
+#: linker.c:3058
msgid "%B: warning: duplicate section `%A' has different size\n"
msgstr ""
-#: merge.c:817
+#: merge.c:818
#, c-format
msgid "%s: access beyond end of merged section (%ld)"
msgstr ""
-#: mmo.c:456
+#: mmo.c:454
#, c-format
msgid "%s: No core to allocate section name %s\n"
msgstr ""
-#: mmo.c:531
+#: mmo.c:529
#, c-format
msgid "%s: No core to allocate a symbol %d bytes long\n"
msgstr ""
-#: mmo.c:1187
+#: mmo.c:1185
#, c-format
msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
msgstr ""
-#: mmo.c:1332
+#: mmo.c:1330
#, c-format
msgid ""
"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
"starting with `%s'\n"
msgstr ""
-#: mmo.c:1566
+#: mmo.c:1564
#, c-format
msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
msgstr ""
-#: mmo.c:1576
+#: mmo.c:1574
#, c-format
msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
msgstr ""
-#: mmo.c:1612
+#: mmo.c:1610
#, c-format
msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
msgstr ""
-#: mmo.c:1658
+#: mmo.c:1656
#, c-format
msgid ""
"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
msgstr ""
-#: mmo.c:1697
+#: mmo.c:1695
#, c-format
msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
msgstr ""
-#: mmo.c:1706
+#: mmo.c:1704
#, c-format
msgid ""
"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
msgstr ""
-#: mmo.c:1729
+#: mmo.c:1727
#, c-format
msgid ""
"%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
"for lop_fixrx\n"
msgstr ""
-#: mmo.c:1752
+#: mmo.c:1750
#, c-format
msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
msgstr ""
-#: mmo.c:1772
+#: mmo.c:1770
#, c-format
msgid ""
"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
msgstr ""
-#: mmo.c:1785
+#: mmo.c:1783
#, c-format
msgid ""
"%s: invalid mmo file: file name for number %d was not specified before use\n"
msgstr ""
-#: mmo.c:1892
+#: mmo.c:1890
#, c-format
msgid ""
"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
msgstr ""
-#: mmo.c:1928
+#: mmo.c:1926
#, c-format
msgid "%s: invalid mmo file: lop_end not last item in file\n"
msgstr ""
-#: mmo.c:1941
+#: mmo.c:1939
#, c-format
msgid ""
"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
@@ -2686,7 +2937,7 @@ msgid ""
"08lx\n"
msgstr ""
-#: oasys.c:876
+#: oasys.c:880
#, c-format
msgid "%s: can not represent section `%s' in oasys"
msgstr ""
@@ -2697,37 +2948,37 @@ msgid "Unhandled OSF/1 core file section type %d\n"
msgstr ""
#. XXX code yet to be written.
-#: peicode.h:731
+#: peicode.h:757
msgid "%B: Unhandled import type; %x"
msgstr ""
-#: peicode.h:736
+#: peicode.h:762
msgid "%B: Unrecognised import type; %x"
msgstr ""
-#: peicode.h:750
+#: peicode.h:776
msgid "%B: Unrecognised import name type; %x"
msgstr ""
-#: peicode.h:1120
+#: peicode.h:1159
msgid "%B: Unrecognised machine type (0x%x) in Import Library Format archive"
msgstr ""
-#: peicode.h:1132
+#: peicode.h:1171
msgid ""
"%B: Recognised but unhandled machine type (0x%x) in Import Library Format "
"archive"
msgstr ""
-#: peicode.h:1150
+#: peicode.h:1189
msgid "%B: size field is zero in Import Library Format header"
msgstr ""
-#: peicode.h:1181
+#: peicode.h:1220
msgid "%B: string not null terminated in ILF object file."
msgstr ""
-#: pe-mips.c:588
+#: pe-mips.c:605
msgid "%B: `ld -r' not supported with PE MIPS objects\n"
msgstr ""
@@ -2735,75 +2986,75 @@ msgstr ""
#. 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:704
+#: pe-mips.c:721
msgid "%B: unimplemented %s\n"
msgstr ""
-#: pe-mips.c:730
+#: pe-mips.c:747
msgid "%B: jump too far away\n"
msgstr ""
-#: pe-mips.c:756
+#: pe-mips.c:773
msgid "%B: bad pair/reflo after refhi\n"
msgstr ""
-#: ppcboot.c:419
+#: ppcboot.c:412
#, c-format
msgid ""
"\n"
"ppcboot header:\n"
msgstr ""
-#: ppcboot.c:420
+#: ppcboot.c:413
#, c-format
msgid "Entry offset = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:421
+#: ppcboot.c:414
#, c-format
msgid "Length = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:424
+#: ppcboot.c:417
#, c-format
msgid "Flag field = 0x%.2x\n"
msgstr ""
-#: ppcboot.c:430
+#: ppcboot.c:423
#, c-format
msgid "Partition name = \"%s\"\n"
msgstr ""
-#: ppcboot.c:449
+#: ppcboot.c:442
#, c-format
msgid ""
"\n"
"Partition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
msgstr ""
-#: ppcboot.c:455
+#: ppcboot.c:448
#, c-format
msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
msgstr ""
-#: ppcboot.c:461
+#: ppcboot.c:454
#, c-format
msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:462
+#: ppcboot.c:455
#, c-format
msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
msgstr ""
-#: som.c:5069
+#: som.c:5088
#, c-format
msgid ""
"\n"
"Exec Auxiliary Header\n"
msgstr ""
-#: som.c:5330
+#: som.c:5349
msgid "som_sizeof_headers unimplemented"
msgstr ""
@@ -2811,11 +3062,11 @@ msgstr ""
msgid "%B:%d: Unexpected character `%s' in S-record file\n"
msgstr ""
-#: stabs.c:276
+#: stabs.c:277
msgid "%B(%A+0x%lx): Stabs entry has invalid string index."
msgstr ""
-#: syms.c:1048
+#: syms.c:1056
msgid "Unsupported .stab relocation"
msgstr ""
@@ -2978,316 +3229,320 @@ msgstr ""
msgid "Unhandled relocation %s"
msgstr ""
-#: xcofflink.c:564
+#: xcofflink.c:565
#, c-format
msgid "%s: XCOFF shared object when not producing XCOFF output"
msgstr ""
-#: xcofflink.c:585
+#: xcofflink.c:586
#, c-format
msgid "%s: dynamic object with no .loader section"
msgstr ""
-#: xcofflink.c:1148
+#: xcofflink.c:1149
msgid "%B: `%s' has line numbers but no enclosing section"
msgstr ""
-#: xcofflink.c:1200
+#: xcofflink.c:1201
msgid "%B: class %d symbol `%s' has no aux entries"
msgstr ""
-#: xcofflink.c:1223
+#: xcofflink.c:1224
msgid "%B: symbol `%s' has unrecognized csect type %d"
msgstr ""
-#: xcofflink.c:1235
+#: xcofflink.c:1236
msgid "%B: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
msgstr ""
-#: xcofflink.c:1271
+#: xcofflink.c:1272
msgid "%B: XMC_TC0 symbol `%s' is class %d scnlen %d"
msgstr ""
-#: xcofflink.c:1417
+#: xcofflink.c:1418
msgid "%B: csect `%s' not in enclosing section"
msgstr ""
-#: xcofflink.c:1524
+#: xcofflink.c:1525
msgid "%B: misplaced XTY_LD `%s'"
msgstr ""
-#: xcofflink.c:1839
+#: xcofflink.c:1841
msgid "%B: reloc %s:%d not in csect"
msgstr ""
-#: xcofflink.c:2637
+#: xcofflink.c:2639
#, c-format
msgid "%s: no such symbol"
msgstr ""
-#: xcofflink.c:2866
+#: xcofflink.c:2868
#, c-format
msgid "warning: attempt to export undefined symbol `%s'"
msgstr ""
-#: xcofflink.c:3033
+#: xcofflink.c:3035
msgid "error: undefined symbol __rtinit"
msgstr ""
-#: xcofflink.c:3653
+#: xcofflink.c:3655
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
msgstr ""
-#: xcofflink.c:4489
+#: xcofflink.c:4491
msgid "%B: loader reloc in unrecognized section `%A'"
msgstr ""
-#: xcofflink.c:4510
+#: xcofflink.c:4512
msgid "%B: `%s' in loader reloc but not loader sym"
msgstr ""
-#: xcofflink.c:4525
+#: xcofflink.c:4527
msgid "%B: loader reloc in read-only section %A"
msgstr ""
-#: xcofflink.c:4934 xcofflink.c:4996 xcofflink.c:5291
+#: xcofflink.c:4936 xcofflink.c:4998 xcofflink.c:5293
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
msgstr ""
-#: xcofflink.c:5302
+#: xcofflink.c:5304
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
msgstr ""
-#: elf32-ia64.c:1139 elf64-ia64.c:1139
+#: elf32-ia64.c:1168 elf64-ia64.c:1168
msgid ""
"%B: Can't relax br at 0x%lx in section `%A'. Please use brl or indirect "
"branch."
msgstr ""
-#: elf32-ia64.c:2508 elf64-ia64.c:2508
+#: elf32-ia64.c:2909 elf64-ia64.c:2909
msgid "@pltoff reloc against local symbol"
msgstr ""
-#: elf32-ia64.c:3955 elf64-ia64.c:3955
+#: elf32-ia64.c:4522 elf64-ia64.c:4522
#, c-format
msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
msgstr ""
-#: elf32-ia64.c:3966 elf64-ia64.c:3966
+#: elf32-ia64.c:4533 elf64-ia64.c:4533
#, c-format
msgid "%s: __gp does not cover short data segment"
msgstr ""
-#: elf32-ia64.c:4213 elf64-ia64.c:4213
+#: elf32-ia64.c:4807 elf64-ia64.c:4807
msgid "%B: non-pic code with imm relocation against dynamic symbol `%s'"
msgstr ""
-#: elf32-ia64.c:4280 elf64-ia64.c:4280
+#: elf32-ia64.c:4874 elf64-ia64.c:4874
msgid "%B: @gprel relocation against dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4343 elf64-ia64.c:4343
+#: elf32-ia64.c:4937 elf64-ia64.c:4937
msgid "%B: linking non-pic code in a position independent executable"
msgstr ""
-#: elf32-ia64.c:4480 elf64-ia64.c:4480
+#: elf32-ia64.c:5074 elf64-ia64.c:5074
msgid "%B: @internal branch to dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4482 elf64-ia64.c:4482
+#: elf32-ia64.c:5076 elf64-ia64.c:5076
msgid "%B: speculation fixup to dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4484 elf64-ia64.c:4484
+#: elf32-ia64.c:5078 elf64-ia64.c:5078
msgid "%B: @pcrel relocation against dynamic symbol %s"
msgstr ""
-#: elf32-ia64.c:4691 elf64-ia64.c:4691
+#: elf32-ia64.c:5278 elf64-ia64.c:5278
msgid "unsupported reloc"
msgstr ""
-#: elf32-ia64.c:4724 elf64-ia64.c:4724
+#: elf32-ia64.c:5311 elf64-ia64.c:5311
msgid ""
"%B: Can't relax br (%s) to `%s' at 0x%lx in section `%A' with size 0x%lx (> "
"0x1000000)."
msgstr ""
-#: elf32-ia64.c:4985 elf64-ia64.c:4985
+#: elf32-ia64.c:5572 elf64-ia64.c:5572
msgid "%B: linking trap-on-NULL-dereference with non-trapping files"
msgstr ""
-#: elf32-ia64.c:4994 elf64-ia64.c:4994
+#: elf32-ia64.c:5581 elf64-ia64.c:5581
msgid "%B: linking big-endian files with little-endian files"
msgstr ""
-#: elf32-ia64.c:5003 elf64-ia64.c:5003
+#: elf32-ia64.c:5590 elf64-ia64.c:5590
msgid "%B: linking 64-bit files with 32-bit files"
msgstr ""
-#: elf32-ia64.c:5012 elf64-ia64.c:5012
+#: elf32-ia64.c:5599 elf64-ia64.c:5599
msgid "%B: linking constant-gp files with non-constant-gp files"
msgstr ""
-#: elf32-ia64.c:5022 elf64-ia64.c:5022
+#: elf32-ia64.c:5609 elf64-ia64.c:5609
msgid "%B: linking auto-pic files with non-auto-pic files"
msgstr ""
-#: peigen.c:979 pepigen.c:979
+#: peigen.c:998 pepigen.c:998 pex64igen.c:998
#, c-format
msgid "%s: line number overflow: 0x%lx > 0xffff"
msgstr ""
-#: peigen.c:1006 pepigen.c:1006
+#: peigen.c:1025 pepigen.c:1025 pex64igen.c:1025
msgid "Export Directory [.edata (or where ever we found it)]"
msgstr ""
-#: peigen.c:1007 pepigen.c:1007
+#: peigen.c:1026 pepigen.c:1026 pex64igen.c:1026
msgid "Import Directory [parts of .idata]"
msgstr ""
-#: peigen.c:1008 pepigen.c:1008
+#: peigen.c:1027 pepigen.c:1027 pex64igen.c:1027
msgid "Resource Directory [.rsrc]"
msgstr ""
-#: peigen.c:1009 pepigen.c:1009
+#: peigen.c:1028 pepigen.c:1028 pex64igen.c:1028
msgid "Exception Directory [.pdata]"
msgstr ""
-#: peigen.c:1010 pepigen.c:1010
+#: peigen.c:1029 pepigen.c:1029 pex64igen.c:1029
msgid "Security Directory"
msgstr ""
-#: peigen.c:1011 pepigen.c:1011
+#: peigen.c:1030 pepigen.c:1030 pex64igen.c:1030
msgid "Base Relocation Directory [.reloc]"
msgstr ""
-#: peigen.c:1012 pepigen.c:1012
+#: peigen.c:1031 pepigen.c:1031 pex64igen.c:1031
msgid "Debug Directory"
msgstr ""
-#: peigen.c:1013 pepigen.c:1013
+#: peigen.c:1032 pepigen.c:1032 pex64igen.c:1032
msgid "Description Directory"
msgstr ""
-#: peigen.c:1014 pepigen.c:1014
+#: peigen.c:1033 pepigen.c:1033 pex64igen.c:1033
msgid "Special Directory"
msgstr ""
-#: peigen.c:1015 pepigen.c:1015
+#: peigen.c:1034 pepigen.c:1034 pex64igen.c:1034
msgid "Thread Storage Directory [.tls]"
msgstr ""
-#: peigen.c:1016 pepigen.c:1016
+#: peigen.c:1035 pepigen.c:1035 pex64igen.c:1035
msgid "Load Configuration Directory"
msgstr ""
-#: peigen.c:1017 pepigen.c:1017
+#: peigen.c:1036 pepigen.c:1036 pex64igen.c:1036
msgid "Bound Import Directory"
msgstr ""
-#: peigen.c:1018 pepigen.c:1018
+#: peigen.c:1037 pepigen.c:1037 pex64igen.c:1037
msgid "Import Address Table Directory"
msgstr ""
-#: peigen.c:1019 pepigen.c:1019
+#: peigen.c:1038 pepigen.c:1038 pex64igen.c:1038
msgid "Delay Import Directory"
msgstr ""
-#: peigen.c:1020 peigen.c:1021 pepigen.c:1020 pepigen.c:1021
+#: peigen.c:1039 pepigen.c:1039 pex64igen.c:1039
+msgid "CLR Runtime Header"
+msgstr ""
+
+#: peigen.c:1040 pepigen.c:1040 pex64igen.c:1040
msgid "Reserved"
msgstr ""
-#: peigen.c:1081 pepigen.c:1081
+#: peigen.c:1100 pepigen.c:1100 pex64igen.c:1100
#, c-format
msgid ""
"\n"
"There is an import table, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1086 pepigen.c:1086
+#: peigen.c:1105 pepigen.c:1105 pex64igen.c:1105
#, c-format
msgid ""
"\n"
"There is an import table in %s at 0x%lx\n"
msgstr ""
-#: peigen.c:1129 pepigen.c:1129
+#: peigen.c:1148 pepigen.c:1148 pex64igen.c:1148
#, c-format
msgid ""
"\n"
"Function descriptor located at the start address: %04lx\n"
msgstr ""
-#: peigen.c:1132 pepigen.c:1132
+#: peigen.c:1151 pepigen.c:1151 pex64igen.c:1151
#, c-format
msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
msgstr ""
-#: peigen.c:1140 pepigen.c:1140
+#: peigen.c:1159 pepigen.c:1159 pex64igen.c:1159
#, c-format
msgid ""
"\n"
"No reldata section! Function descriptor not decoded.\n"
msgstr ""
-#: peigen.c:1145 pepigen.c:1145
+#: peigen.c:1164 pepigen.c:1164 pex64igen.c:1164
#, c-format
msgid ""
"\n"
"The Import Tables (interpreted %s section contents)\n"
msgstr ""
-#: peigen.c:1148 pepigen.c:1148
+#: peigen.c:1167 pepigen.c:1167 pex64igen.c:1167
#, c-format
msgid ""
" vma: Hint Time Forward DLL First\n"
" Table Stamp Chain Name Thunk\n"
msgstr ""
-#: peigen.c:1196 pepigen.c:1196
+#: peigen.c:1215 pepigen.c:1215 pex64igen.c:1215
#, c-format
msgid ""
"\n"
"\tDLL Name: %s\n"
msgstr ""
-#: peigen.c:1207 pepigen.c:1207
+#: peigen.c:1226 pepigen.c:1226 pex64igen.c:1226
#, c-format
msgid "\tvma: Hint/Ord Member-Name Bound-To\n"
msgstr ""
-#: peigen.c:1232 pepigen.c:1232
+#: peigen.c:1251 pepigen.c:1251 pex64igen.c:1251
#, c-format
msgid ""
"\n"
"There is a first thunk, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1365 pepigen.c:1365
+#: peigen.c:1416 pepigen.c:1416 pex64igen.c:1416
#, c-format
msgid ""
"\n"
"There is an export table, but the section containing it could not be found\n"
msgstr ""
-#: peigen.c:1374 pepigen.c:1374
+#: peigen.c:1425 pepigen.c:1425 pex64igen.c:1425
#, c-format
msgid ""
"\n"
"There is an export table in %s, but it does not fit into that section\n"
msgstr ""
-#: peigen.c:1380 pepigen.c:1380
+#: peigen.c:1431 pepigen.c:1431 pex64igen.c:1431
#, c-format
msgid ""
"\n"
"There is an export table in %s at 0x%lx\n"
msgstr ""
-#: peigen.c:1408 pepigen.c:1408
+#: peigen.c:1459 pepigen.c:1459 pex64igen.c:1459
#, c-format
msgid ""
"\n"
@@ -3295,128 +3550,128 @@ msgid ""
"\n"
msgstr ""
-#: peigen.c:1412 pepigen.c:1412
+#: peigen.c:1463 pepigen.c:1463 pex64igen.c:1463
#, c-format
msgid "Export Flags \t\t\t%lx\n"
msgstr ""
-#: peigen.c:1415 pepigen.c:1415
+#: peigen.c:1466 pepigen.c:1466 pex64igen.c:1466
#, c-format
msgid "Time/Date stamp \t\t%lx\n"
msgstr ""
-#: peigen.c:1418 pepigen.c:1418
+#: peigen.c:1469 pepigen.c:1469 pex64igen.c:1469
#, c-format
msgid "Major/Minor \t\t\t%d/%d\n"
msgstr ""
-#: peigen.c:1421 pepigen.c:1421
+#: peigen.c:1472 pepigen.c:1472 pex64igen.c:1472
#, c-format
msgid "Name \t\t\t\t"
msgstr ""
-#: peigen.c:1427 pepigen.c:1427
+#: peigen.c:1478 pepigen.c:1478 pex64igen.c:1478
#, c-format
msgid "Ordinal Base \t\t\t%ld\n"
msgstr ""
-#: peigen.c:1430 pepigen.c:1430
+#: peigen.c:1481 pepigen.c:1481 pex64igen.c:1481
#, c-format
msgid "Number in:\n"
msgstr ""
-#: peigen.c:1433 pepigen.c:1433
+#: peigen.c:1484 pepigen.c:1484 pex64igen.c:1484
#, c-format
msgid "\tExport Address Table \t\t%08lx\n"
msgstr ""
-#: peigen.c:1437 pepigen.c:1437
+#: peigen.c:1488 pepigen.c:1488 pex64igen.c:1488
#, c-format
msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
msgstr ""
-#: peigen.c:1440 pepigen.c:1440
+#: peigen.c:1491 pepigen.c:1491 pex64igen.c:1491
#, c-format
msgid "Table Addresses\n"
msgstr ""
-#: peigen.c:1443 pepigen.c:1443
+#: peigen.c:1494 pepigen.c:1494 pex64igen.c:1494
#, c-format
msgid "\tExport Address Table \t\t"
msgstr ""
-#: peigen.c:1448 pepigen.c:1448
+#: peigen.c:1499 pepigen.c:1499 pex64igen.c:1499
#, c-format
msgid "\tName Pointer Table \t\t"
msgstr ""
-#: peigen.c:1453 pepigen.c:1453
+#: peigen.c:1504 pepigen.c:1504 pex64igen.c:1504
#, c-format
msgid "\tOrdinal Table \t\t\t"
msgstr ""
-#: peigen.c:1467 pepigen.c:1467
+#: peigen.c:1518 pepigen.c:1518 pex64igen.c:1518
#, c-format
msgid ""
"\n"
"Export Address Table -- Ordinal Base %ld\n"
msgstr ""
-#: peigen.c:1486 pepigen.c:1486
+#: peigen.c:1537 pepigen.c:1537 pex64igen.c:1537
msgid "Forwarder RVA"
msgstr ""
-#: peigen.c:1497 pepigen.c:1497
+#: peigen.c:1548 pepigen.c:1548 pex64igen.c:1548
msgid "Export RVA"
msgstr ""
-#: peigen.c:1504 pepigen.c:1504
+#: peigen.c:1555 pepigen.c:1555 pex64igen.c:1555
#, c-format
msgid ""
"\n"
"[Ordinal/Name Pointer] Table\n"
msgstr ""
-#: peigen.c:1557 pepigen.c:1557
+#: peigen.c:1608 pepigen.c:1608 pex64igen.c:1608
#, c-format
msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
msgstr ""
-#: peigen.c:1561 pepigen.c:1561
+#: peigen.c:1612 pepigen.c:1612 pex64igen.c:1612
#, c-format
msgid ""
"\n"
"The Function Table (interpreted .pdata section contents)\n"
msgstr ""
-#: peigen.c:1564 pepigen.c:1564
+#: peigen.c:1615 pepigen.c:1615 pex64igen.c:1615
#, c-format
msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
msgstr ""
-#: peigen.c:1566 pepigen.c:1566
+#: peigen.c:1617 pepigen.c:1617 pex64igen.c:1617
#, c-format
msgid ""
" vma:\t\tBegin End EH EH PrologEnd Exception\n"
" \t\tAddress Address Handler Data Address Mask\n"
msgstr ""
-#: peigen.c:1636 pepigen.c:1636
+#: peigen.c:1687 pepigen.c:1687 pex64igen.c:1687
#, c-format
msgid " Register save millicode"
msgstr ""
-#: peigen.c:1639 pepigen.c:1639
+#: peigen.c:1690 pepigen.c:1690 pex64igen.c:1690
#, c-format
msgid " Register restore millicode"
msgstr ""
-#: peigen.c:1642 pepigen.c:1642
+#: peigen.c:1693 pepigen.c:1693 pex64igen.c:1693
#, c-format
msgid " Glue code sequence"
msgstr ""
-#: peigen.c:1692 pepigen.c:1692
+#: peigen.c:1743 pepigen.c:1743 pex64igen.c:1743
#, c-format
msgid ""
"\n"
@@ -3424,14 +3679,14 @@ msgid ""
"PE File Base Relocations (interpreted .reloc section contents)\n"
msgstr ""
-#: peigen.c:1722 pepigen.c:1722
+#: peigen.c:1773 pepigen.c:1773 pex64igen.c:1773
#, c-format
msgid ""
"\n"
"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
msgstr ""
-#: peigen.c:1735 pepigen.c:1735
+#: peigen.c:1786 pepigen.c:1786 pex64igen.c:1786
#, c-format
msgid "\treloc %4d offset %4x [%4lx] %s"
msgstr ""
@@ -3439,9 +3694,31 @@ msgstr ""
#. The MS dumpbin program reportedly ands with 0xff0f before
#. printing the characteristics field. Not sure why. No reason to
#. emulate it here.
-#: peigen.c:1773 pepigen.c:1773
+#: peigen.c:1825 pepigen.c:1825 pex64igen.c:1825
#, c-format
msgid ""
"\n"
"Characteristics 0x%x\n"
msgstr ""
+
+#: peigen.c:2086 pepigen.c:2086 pex64igen.c:2086
+msgid "%B: unable to fill in DataDictionary[1] because .idata$2 is missing"
+msgstr ""
+
+#: peigen.c:2104 pepigen.c:2104 pex64igen.c:2104
+msgid "%B: unable to fill in DataDictionary[1] because .idata$4 is missing"
+msgstr ""
+
+#: peigen.c:2123 pepigen.c:2123 pex64igen.c:2123
+msgid "%B: unable to fill in DataDictionary[12] because .idata$5 is missing"
+msgstr ""
+
+#: peigen.c:2141 pepigen.c:2141 pex64igen.c:2141
+msgid ""
+"%B: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because ."
+"idata$6 is missing"
+msgstr ""
+
+#: peigen.c:2161 pepigen.c:2161 pex64igen.c:2161
+msgid "%B: unable to fill in DataDictionary[9] because __tls_used is missing"
+msgstr ""
diff --git a/contrib/binutils/bfd/ppcboot.c b/contrib/binutils/bfd/ppcboot.c
index 7c8a419..da8c6b8 100644
--- a/contrib/binutils/bfd/ppcboot.c
+++ b/contrib/binutils/bfd/ppcboot.c
@@ -1,6 +1,6 @@
/* BFD back-end for PPCbug boot records.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006,
+ 2007 Free Software Foundation, Inc.
Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -32,9 +32,9 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
the file. objcopy cooperates by specially setting the start
address to zero by default. */
+#include "sysdep.h"
#include "safe-ctype.h"
#include "bfd.h"
-#include "sysdep.h"
#include "libbfd.h"
/* PPCbug location structure */
@@ -99,7 +99,6 @@ static long ppcboot_canonicalize_symtab PARAMS ((bfd *, asymbol **));
static void ppcboot_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static bfd_boolean ppcboot_set_section_contents
PARAMS ((bfd *, asection *, const PTR, file_ptr, bfd_size_type));
-static int ppcboot_sizeof_headers PARAMS ((bfd *, bfd_boolean));
static bfd_boolean ppcboot_bfd_print_private_bfd_data PARAMS ((bfd *, PTR));
#define ppcboot_set_tdata(abfd, ptr) ((abfd)->tdata.any = (PTR) (ptr))
@@ -151,6 +150,7 @@ ppcboot_object_p (abfd)
ppcboot_hdr_t hdr;
size_t i;
ppcboot_data_t *tdata;
+ flagword flags;
BFD_ASSERT (sizeof (ppcboot_hdr_t) == 1024);
@@ -205,10 +205,10 @@ ppcboot_object_p (abfd)
abfd->symcount = PPCBOOT_SYMS;
/* One data section. */
- sec = bfd_make_section (abfd, ".data");
+ flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_CODE | SEC_HAS_CONTENTS;
+ sec = bfd_make_section_with_flags (abfd, ".data", flags);
if (sec == NULL)
return NULL;
- sec->flags = SEC_ALLOC | SEC_LOAD | SEC_DATA | SEC_CODE | SEC_HAS_CONTENTS;
sec->vma = 0;
sec->size = statbuf.st_size - sizeof (ppcboot_hdr_t);
sec->filepos = sizeof (ppcboot_hdr_t);
@@ -354,12 +354,6 @@ ppcboot_get_symbol_info (ignore_abfd, symbol, ret)
#define ppcboot_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define ppcboot_read_minisymbols _bfd_generic_read_minisymbols
#define ppcboot_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
-
-#define ppcboot_get_reloc_upper_bound \
- ((long (*) PARAMS ((bfd *, asection *))) bfd_0l)
-#define ppcboot_canonicalize_reloc \
- ((long (*) PARAMS ((bfd *, asection *, arelent **, asymbol **))) bfd_0l)
-#define ppcboot_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
/* Write section contents of a ppcboot file. */
@@ -395,9 +389,8 @@ ppcboot_set_section_contents (abfd, sec, data, offset, size)
static int
-ppcboot_sizeof_headers (abfd, exec)
- bfd *abfd ATTRIBUTE_UNUSED;
- bfd_boolean exec ATTRIBUTE_UNUSED;
+ppcboot_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return sizeof (ppcboot_hdr_t);
}
@@ -535,7 +528,7 @@ const bfd_target ppcboot_vec =
BFD_JUMP_TABLE_CORE (_bfd_nocore),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (ppcboot),
- BFD_JUMP_TABLE_RELOCS (ppcboot),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (ppcboot),
BFD_JUMP_TABLE_LINK (ppcboot),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
diff --git a/contrib/binutils/bfd/ptrace-core.c b/contrib/binutils/bfd/ptrace-core.c
index 4ac28aa..8607225 100644
--- a/contrib/binutils/bfd/ptrace-core.c
+++ b/contrib/binutils/bfd/ptrace-core.c
@@ -1,6 +1,6 @@
/* BFD backend for core files which use the ptrace_user structure
- Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004,
+ 2006, 2007 Free Software Foundation, Inc.
The structure of this file is based on trad-core.c written by John Gilmore
of Cygnus Support.
Modified to work with the ptrace_user structure by Kevin A. Buettner.
@@ -24,8 +24,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#ifdef PTRACE_CORE
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include <sys/param.h>
@@ -63,6 +63,7 @@ ptrace_unix_core_file_p (abfd)
struct ptrace_user u;
struct trad_core_struct *rawptr;
bfd_size_type amt;
+ flagword flags;
val = bfd_bread ((void *)&u, (bfd_size_type) sizeof u, abfd);
if (val != sizeof u || u.pt_magic != _BCS_PTRACE_MAGIC
@@ -89,13 +90,17 @@ ptrace_unix_core_file_p (abfd)
/* Create the sections. */
- core_stacksec (abfd) = bfd_make_section_anyway (abfd, ".stack");
+ flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
+ core_stacksec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".stack",
+ flags);
if (core_stacksec (abfd) == NULL)
goto fail;
- core_datasec (abfd) = bfd_make_section_anyway (abfd, ".data");
+ core_datasec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".data",
+ flags);
if (core_datasec (abfd) == NULL)
goto fail;
- core_regsec (abfd) = bfd_make_section_anyway (abfd, ".reg");
+ core_regsec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".reg",
+ SEC_HAS_CONTENTS);
if (core_regsec (abfd) == NULL)
goto fail;
@@ -103,10 +108,6 @@ ptrace_unix_core_file_p (abfd)
text. I don't think that any of these things are supported on the
system on which I am developing this for though. */
- core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
- core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
- core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
-
core_datasec (abfd)->size = u.pt_dsize;
core_stacksec (abfd)->size = u.pt_ssize;
core_regsec (abfd)->size = sizeof (u);
diff --git a/contrib/binutils/bfd/reloc.c b/contrib/binutils/bfd/reloc.c
index f1d09a5..1e5d4bd 100644
--- a/contrib/binutils/bfd/reloc.c
+++ b/contrib/binutils/bfd/reloc.c
@@ -1,6 +1,6 @@
/* BFD support for handling relocation entries.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -47,8 +47,8 @@ SECTION
/* DO compile in the reloc_code name table from libbfd.h. */
#define _BFD_MAKE_TABLE_bfd_reloc_code_real
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
/*
@@ -1522,7 +1522,6 @@ _bfd_relocate_contents (reloc_howto_type *howto,
switch (size)
{
default:
- case 0:
abort ();
case 1:
bfd_put_8 (input_bfd, x, location);
@@ -1545,6 +1544,72 @@ _bfd_relocate_contents (reloc_howto_type *howto,
return flag;
}
+/* Clear a given location using a given howto, by applying a relocation value
+ of zero and discarding any in-place addend. This is used for fixed-up
+ relocations against discarded symbols, to make ignorable debug or unwind
+ information more obvious. */
+
+void
+_bfd_clear_contents (reloc_howto_type *howto,
+ bfd *input_bfd,
+ bfd_byte *location)
+{
+ int size;
+ bfd_vma x = 0;
+
+ /* Get the value we are going to relocate. */
+ size = bfd_get_reloc_size (howto);
+ switch (size)
+ {
+ default:
+ case 0:
+ abort ();
+ case 1:
+ x = bfd_get_8 (input_bfd, location);
+ break;
+ case 2:
+ x = bfd_get_16 (input_bfd, location);
+ break;
+ case 4:
+ x = bfd_get_32 (input_bfd, location);
+ break;
+ case 8:
+#ifdef BFD64
+ x = bfd_get_64 (input_bfd, location);
+#else
+ abort ();
+#endif
+ break;
+ }
+
+ /* Zero out the unwanted bits of X. */
+ x &= ~howto->dst_mask;
+
+ /* Put the relocated value back in the object file. */
+ switch (size)
+ {
+ default:
+ case 0:
+ abort ();
+ case 1:
+ bfd_put_8 (input_bfd, x, location);
+ break;
+ case 2:
+ bfd_put_16 (input_bfd, x, location);
+ break;
+ case 4:
+ bfd_put_32 (input_bfd, x, location);
+ break;
+ case 8:
+#ifdef BFD64
+ bfd_put_64 (input_bfd, x, location);
+#else
+ abort ();
+#endif
+ break;
+ }
+}
+
/*
DOCDD
INODE
@@ -1884,6 +1949,37 @@ ENUMDOC
SPARC TLS relocations
ENUM
+ BFD_RELOC_SPU_IMM7
+ENUMX
+ BFD_RELOC_SPU_IMM8
+ENUMX
+ BFD_RELOC_SPU_IMM10
+ENUMX
+ BFD_RELOC_SPU_IMM10W
+ENUMX
+ BFD_RELOC_SPU_IMM16
+ENUMX
+ BFD_RELOC_SPU_IMM16W
+ENUMX
+ BFD_RELOC_SPU_IMM18
+ENUMX
+ BFD_RELOC_SPU_PCREL9a
+ENUMX
+ BFD_RELOC_SPU_PCREL9b
+ENUMX
+ BFD_RELOC_SPU_PCREL16
+ENUMX
+ BFD_RELOC_SPU_LO16
+ENUMX
+ BFD_RELOC_SPU_HI16
+ENUMX
+ BFD_RELOC_SPU_PPU32
+ENUMX
+ BFD_RELOC_SPU_PPU64
+ENUMDOC
+ SPU Relocations.
+
+ENUM
BFD_RELOC_ALPHA_GPDISP_HI16
ENUMDOC
Alpha ECOFF and ELF relocations. Some of these treat the symbol or
@@ -2701,6 +2797,24 @@ ENUM
BFD_RELOC_ARM_PREL31
ENUMDOC
31-bit PC relative address.
+ENUM
+ BFD_RELOC_ARM_MOVW
+ENUMX
+ BFD_RELOC_ARM_MOVT
+ENUMX
+ BFD_RELOC_ARM_MOVW_PCREL
+ENUMX
+ BFD_RELOC_ARM_MOVT_PCREL
+ENUMX
+ BFD_RELOC_ARM_THUMB_MOVW
+ENUMX
+ BFD_RELOC_ARM_THUMB_MOVT
+ENUMX
+ BFD_RELOC_ARM_THUMB_MOVW_PCREL
+ENUMX
+ BFD_RELOC_ARM_THUMB_MOVT_PCREL
+ENUMDOC
+ Low and High halfword relocations for MOVW and MOVT instructions.
ENUM
BFD_RELOC_ARM_JUMP_SLOT
@@ -2739,12 +2853,73 @@ ENUMDOC
ARM thread-local storage relocations.
ENUM
+ BFD_RELOC_ARM_ALU_PC_G0_NC
+ENUMX
+ BFD_RELOC_ARM_ALU_PC_G0
+ENUMX
+ BFD_RELOC_ARM_ALU_PC_G1_NC
+ENUMX
+ BFD_RELOC_ARM_ALU_PC_G1
+ENUMX
+ BFD_RELOC_ARM_ALU_PC_G2
+ENUMX
+ BFD_RELOC_ARM_LDR_PC_G0
+ENUMX
+ BFD_RELOC_ARM_LDR_PC_G1
+ENUMX
+ BFD_RELOC_ARM_LDR_PC_G2
+ENUMX
+ BFD_RELOC_ARM_LDRS_PC_G0
+ENUMX
+ BFD_RELOC_ARM_LDRS_PC_G1
+ENUMX
+ BFD_RELOC_ARM_LDRS_PC_G2
+ENUMX
+ BFD_RELOC_ARM_LDC_PC_G0
+ENUMX
+ BFD_RELOC_ARM_LDC_PC_G1
+ENUMX
+ BFD_RELOC_ARM_LDC_PC_G2
+ENUMX
+ BFD_RELOC_ARM_ALU_SB_G0_NC
+ENUMX
+ BFD_RELOC_ARM_ALU_SB_G0
+ENUMX
+ BFD_RELOC_ARM_ALU_SB_G1_NC
+ENUMX
+ BFD_RELOC_ARM_ALU_SB_G1
+ENUMX
+ BFD_RELOC_ARM_ALU_SB_G2
+ENUMX
+ BFD_RELOC_ARM_LDR_SB_G0
+ENUMX
+ BFD_RELOC_ARM_LDR_SB_G1
+ENUMX
+ BFD_RELOC_ARM_LDR_SB_G2
+ENUMX
+ BFD_RELOC_ARM_LDRS_SB_G0
+ENUMX
+ BFD_RELOC_ARM_LDRS_SB_G1
+ENUMX
+ BFD_RELOC_ARM_LDRS_SB_G2
+ENUMX
+ BFD_RELOC_ARM_LDC_SB_G0
+ENUMX
+ BFD_RELOC_ARM_LDC_SB_G1
+ENUMX
+ BFD_RELOC_ARM_LDC_SB_G2
+ENUMDOC
+ ARM group relocations.
+
+ENUM
BFD_RELOC_ARM_IMMEDIATE
ENUMX
BFD_RELOC_ARM_ADRL_IMMEDIATE
ENUMX
BFD_RELOC_ARM_T32_IMMEDIATE
ENUMX
+ BFD_RELOC_ARM_T32_ADD_IMM
+ENUMX
BFD_RELOC_ARM_T32_IMM12
ENUMX
BFD_RELOC_ARM_T32_ADD_PC12
@@ -3530,6 +3705,50 @@ ENUMDOC
Motorola Mcore relocations.
ENUM
+ BFD_RELOC_MEP_8
+ENUMX
+ BFD_RELOC_MEP_16
+ENUMX
+ BFD_RELOC_MEP_32
+ENUMX
+ BFD_RELOC_MEP_PCREL8A2
+ENUMX
+ BFD_RELOC_MEP_PCREL12A2
+ENUMX
+ BFD_RELOC_MEP_PCREL17A2
+ENUMX
+ BFD_RELOC_MEP_PCREL24A2
+ENUMX
+ BFD_RELOC_MEP_PCABS24A2
+ENUMX
+ BFD_RELOC_MEP_LOW16
+ENUMX
+ BFD_RELOC_MEP_HI16U
+ENUMX
+ BFD_RELOC_MEP_HI16S
+ENUMX
+ BFD_RELOC_MEP_GPREL
+ENUMX
+ BFD_RELOC_MEP_TPREL
+ENUMX
+ BFD_RELOC_MEP_TPREL7
+ENUMX
+ BFD_RELOC_MEP_TPREL7A2
+ENUMX
+ BFD_RELOC_MEP_TPREL7A4
+ENUMX
+ BFD_RELOC_MEP_UIMM24
+ENUMX
+ BFD_RELOC_MEP_ADDR24A4
+ENUMX
+ BFD_RELOC_MEP_GNU_VTINHERIT
+ENUMX
+ BFD_RELOC_MEP_GNU_VTENTRY
+ENUMDOC
+ Toshiba Media Processor Relocations.
+COMMENT
+
+ENUM
BFD_RELOC_MMIX_GETA
ENUMX
BFD_RELOC_MMIX_GETA_1
@@ -3666,11 +3885,25 @@ ENUMDOC
This is a 16 bit reloc for the AVR that stores 8 bit value (usually
command address) into 8 bit immediate value of LDI insn.
ENUM
+ BFD_RELOC_AVR_LO8_LDI_GS
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit value
+ (command address) into 8 bit immediate value of LDI insn. If the address
+ is beyond the 128k boundary, the linker inserts a jump stub for this reloc
+ in the lower 128k.
+ENUM
BFD_RELOC_AVR_HI8_LDI_PM
ENUMDOC
This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
of command address) into 8 bit immediate value of LDI insn.
ENUM
+ BFD_RELOC_AVR_HI8_LDI_GS
+ENUMDOC
+ This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
+ of command address) into 8 bit immediate value of LDI insn. If the address
+ is beyond the 128k boundary, the linker inserts a jump stub for this reloc
+ below 128k.
+ENUM
BFD_RELOC_AVR_HH8_LDI_PM
ENUMDOC
This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
@@ -3873,6 +4106,43 @@ ENUMDOC
Long displacement extension.
ENUM
+ BFD_RELOC_SCORE_DUMMY1
+ENUMDOC
+ Score relocations
+ENUM
+ BFD_RELOC_SCORE_GPREL15
+ENUMDOC
+ Low 16 bit for load/store
+ENUM
+ BFD_RELOC_SCORE_DUMMY2
+ENUMX
+ BFD_RELOC_SCORE_JMP
+ENUMDOC
+ This is a 24-bit reloc with the right 1 bit assumed to be 0
+ENUM
+ BFD_RELOC_SCORE_BRANCH
+ENUMDOC
+ This is a 19-bit reloc with the right 1 bit assumed to be 0
+ENUM
+ BFD_RELOC_SCORE16_JMP
+ENUMDOC
+ This is a 11-bit reloc with the right 1 bit assumed to be 0
+ENUM
+ BFD_RELOC_SCORE16_BRANCH
+ENUMDOC
+ This is a 8-bit reloc with the right 1 bit assumed to be 0
+ENUM
+ BFD_RELOC_SCORE_GOT15
+ENUMX
+ BFD_RELOC_SCORE_GOT_LO16
+ENUMX
+ BFD_RELOC_SCORE_CALL15
+ENUMX
+ BFD_RELOC_SCORE_DUMMY_HI16
+ENUMDOC
+ Undocumented Score relocs
+
+ENUM
BFD_RELOC_IP2K_FR9
ENUMDOC
Scenix IP2K - 9-bit register number / data address
@@ -4246,6 +4516,63 @@ ENUMDOC
NS CR16C Relocations.
ENUM
+ BFD_RELOC_CR16_NUM8
+ENUMX
+ BFD_RELOC_CR16_NUM16
+ENUMX
+ BFD_RELOC_CR16_NUM32
+ENUMX
+ BFD_RELOC_CR16_NUM32a
+ENUMX
+ BFD_RELOC_CR16_REGREL0
+ENUMX
+ BFD_RELOC_CR16_REGREL4
+ENUMX
+ BFD_RELOC_CR16_REGREL4a
+ENUMX
+ BFD_RELOC_CR16_REGREL14
+ENUMX
+ BFD_RELOC_CR16_REGREL14a
+ENUMX
+ BFD_RELOC_CR16_REGREL16
+ENUMX
+ BFD_RELOC_CR16_REGREL20
+ENUMX
+ BFD_RELOC_CR16_REGREL20a
+ENUMX
+ BFD_RELOC_CR16_ABS20
+ENUMX
+ BFD_RELOC_CR16_ABS24
+ENUMX
+ BFD_RELOC_CR16_IMM4
+ENUMX
+ BFD_RELOC_CR16_IMM8
+ENUMX
+ BFD_RELOC_CR16_IMM16
+ENUMX
+ BFD_RELOC_CR16_IMM20
+ENUMX
+ BFD_RELOC_CR16_IMM24
+ENUMX
+ BFD_RELOC_CR16_IMM32
+ENUMX
+ BFD_RELOC_CR16_IMM32a
+ENUMX
+ BFD_RELOC_CR16_DISP4
+ENUMX
+ BFD_RELOC_CR16_DISP8
+ENUMX
+ BFD_RELOC_CR16_DISP16
+ENUMX
+ BFD_RELOC_CR16_DISP20
+ENUMX
+ BFD_RELOC_CR16_DISP24
+ENUMX
+ BFD_RELOC_CR16_DISP24a
+ENUMDOC
+ NS CR16 Relocations.
+
+ENUM
BFD_RELOC_CRX_REL4
ENUMX
BFD_RELOC_CRX_REL8
@@ -4449,6 +4776,12 @@ ENUMDOC
Sony Xstormy16 Relocations.
ENUM
+ BFD_RELOC_RELC
+ENUMDOC
+ Self-describing complex relocations.
+COMMENT
+
+ENUM
BFD_RELOC_XC16X_PAG
ENUMX
BFD_RELOC_XC16X_POF
@@ -4670,10 +5003,13 @@ CODE_FRAGMENT
/*
FUNCTION
bfd_reloc_type_lookup
+ bfd_reloc_name_lookup
SYNOPSIS
reloc_howto_type *bfd_reloc_type_lookup
(bfd *abfd, bfd_reloc_code_real_type code);
+ reloc_howto_type *bfd_reloc_name_lookup
+ (bfd *abfd, const char *reloc_name);
DESCRIPTION
Return a pointer to a howto structure which, when
@@ -4688,6 +5024,12 @@ bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code)
return BFD_SEND (abfd, reloc_type_lookup, (abfd, code));
}
+reloc_howto_type *
+bfd_reloc_name_lookup (bfd *abfd, const char *reloc_name)
+{
+ return BFD_SEND (abfd, reloc_name_lookup, (abfd, reloc_name));
+}
+
static reloc_howto_type bfd_howto_32 =
HOWTO (0, 00, 2, 32, FALSE, 0, complain_overflow_dont, 0, "VRT32", FALSE, 0xffffffff, 0xffffffff, TRUE);
@@ -4876,13 +5218,31 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
for (parent = reloc_vector; *parent != NULL; parent++)
{
char *error_message = NULL;
- bfd_reloc_status_type r =
- bfd_perform_relocation (input_bfd,
- *parent,
- data,
- input_section,
- relocatable ? abfd : NULL,
- &error_message);
+ asymbol *symbol;
+ bfd_reloc_status_type r;
+
+ symbol = *(*parent)->sym_ptr_ptr;
+ if (symbol->section && elf_discarded_section (symbol->section))
+ {
+ bfd_byte *p;
+ static reloc_howto_type none_howto
+ = HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL,
+ "unused", FALSE, 0, 0, FALSE);
+
+ p = data + (*parent)->address * bfd_octets_per_byte (input_bfd);
+ _bfd_clear_contents ((*parent)->howto, input_bfd, p);
+ (*parent)->sym_ptr_ptr = bfd_abs_section.symbol_ptr_ptr;
+ (*parent)->addend = 0;
+ (*parent)->howto = &none_howto;
+ r = bfd_reloc_ok;
+ }
+ else
+ r = bfd_perform_relocation (input_bfd,
+ *parent,
+ data,
+ input_section,
+ relocatable ? abfd : NULL,
+ &error_message);
if (relocatable)
{
diff --git a/contrib/binutils/bfd/reloc16.c b/contrib/binutils/bfd/reloc16.c
index 3adbbc7..f5c78b2 100644
--- a/contrib/binutils/bfd/reloc16.c
+++ b/contrib/binutils/bfd/reloc16.c
@@ -1,6 +1,6 @@
/* 8 and 16 bit COFF relocation functions, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
- 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -32,8 +32,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
file) (unless info->keep_memory is FALSE, in which case they should
free up the relocs after dealing with them). */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "bfdlink.h"
#include "genlink.h"
diff --git a/contrib/binutils/bfd/rs6000-core.c b/contrib/binutils/bfd/rs6000-core.c
index 280a020..4a2e107 100644
--- a/contrib/binutils/bfd/rs6000-core.c
+++ b/contrib/binutils/bfd/rs6000-core.c
@@ -1,13 +1,8 @@
/* IBM RS/6000 "XCOFF" back-end for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2004
+ 2001, 2002, 2004, 2006, 2007
Free Software Foundation, Inc.
- FIXME: Can someone provide a transliteration of this name into ASCII?
- Using the following chars caused a compiler warning on HIUX (so I replaced
- them with octal escapes), and isn't useful without an understanding of what
- character set it is.
- Written by Metin G. Ozisik, Mimi Ph\373\364ng-Th\345o V\365,
- and John Gilmore.
+ Written by Metin G. Ozisik, Mimi Phuong-Thao Vo, and John Gilmore.
Archive support from Damon A. Permezel.
Contributed by IBM Corporation and Cygnus Support.
@@ -44,8 +39,8 @@
#define _LONG_LONG
#endif
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#ifdef AIX_CORE
@@ -294,11 +289,10 @@ make_bfd_asection (bfd *abfd, const char *name, flagword flags,
{
asection *asect;
- asect = bfd_make_section_anyway (abfd, name);
+ asect = bfd_make_section_anyway_with_flags (abfd, name, flags);
if (!asect)
return NULL;
- asect->flags = flags;
asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
diff --git a/contrib/binutils/bfd/sco5-core.c b/contrib/binutils/bfd/sco5-core.c
index 9a06b88..21631cf 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, 2001, 2002, 2003, 2004, 2005
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Jouke Numan <jnuman@hiscom.nl>
@@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libaout.h" /* BFD a.out internal data structures */
@@ -63,10 +63,9 @@ make_bfd_asection (abfd, name, flags, size, vma, filepos)
{
asection *asect;
- asect = bfd_make_section_anyway (abfd, name);
+ asect = bfd_make_section_anyway_with_flags (abfd, name, flags);
if (!asect)
return NULL;
- asect->flags = flags;
asect->size = size;
asect->vma = vma;
asect->filepos = filepos;
diff --git a/contrib/binutils/bfd/section.c b/contrib/binutils/bfd/section.c
index f870e6b..135f44c 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, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -133,8 +133,8 @@ SUBSECTION
*/
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "bfdlink.h"
@@ -294,7 +294,9 @@ CODE_FRAGMENT
. else up the line will take care of it later. *}
.#define SEC_LINKER_CREATED 0x200000
.
-. {* This section should not be subject to garbage collection. *}
+. {* This section should not be subject to garbage collection.
+. Also set to inform the linker that this section should not be
+. listed in the link map as discarded. *}
.#define SEC_KEEP 0x400000
.
. {* This section contains "short" data, and should be placed
@@ -540,11 +542,6 @@ CODE_FRAGMENT
. || ((SEC) == bfd_com_section_ptr) \
. || ((SEC) == bfd_ind_section_ptr))
.
-.extern const struct bfd_symbol * const bfd_abs_symbol;
-.extern const struct bfd_symbol * const bfd_com_symbol;
-.extern const struct bfd_symbol * const bfd_und_symbol;
-.extern const struct bfd_symbol * const bfd_ind_symbol;
-.
.{* 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. *}
@@ -635,7 +632,7 @@ CODE_FRAGMENT
.#define bfd_section_removed_from_list(ABFD, S) \
. ((S)->next == NULL ? (ABFD)->section_last != (S) : (S)->next->prev != (S))
.
-.#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, SYM_PTR, NAME, IDX) \
+.#define BFD_FAKE_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
. {* name, id, index, next, prev, flags, user_set_vma, *} \
. { NAME, IDX, 0, NULL, NULL, FLAGS, 0, \
. \
@@ -666,11 +663,8 @@ CODE_FRAGMENT
. {* target_index, used_by_bfd, constructor_chain, owner, *} \
. 0, NULL, NULL, NULL, \
. \
-. {* symbol, *} \
-. (struct bfd_symbol *) SYM, \
-. \
-. {* symbol_ptr_ptr, *} \
-. (struct bfd_symbol **) SYM_PTR, \
+. {* symbol, symbol_ptr_ptr, *} \
+. (struct bfd_symbol *) SYM, &SEC.symbol, \
. \
. {* map_head, map_tail *} \
. { NULL }, { NULL } \
@@ -701,16 +695,14 @@ static const asymbol global_syms[] =
GLOBAL_SYM_INIT (BFD_IND_SECTION_NAME, &bfd_ind_section)
};
-#define STD_SECTION(SEC, FLAGS, SYM, NAME, IDX) \
- const asymbol * const SYM = (asymbol *) &global_syms[IDX]; \
- asection SEC = BFD_FAKE_SECTION(SEC, FLAGS, &global_syms[IDX], &SYM, \
+#define STD_SECTION(SEC, FLAGS, NAME, IDX) \
+ asection SEC = BFD_FAKE_SECTION(SEC, FLAGS, &global_syms[IDX], \
NAME, IDX)
-STD_SECTION (bfd_com_section, SEC_IS_COMMON, bfd_com_symbol,
- BFD_COM_SECTION_NAME, 0);
-STD_SECTION (bfd_und_section, 0, bfd_und_symbol, BFD_UND_SECTION_NAME, 1);
-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);
+STD_SECTION (bfd_com_section, SEC_IS_COMMON, BFD_COM_SECTION_NAME, 0);
+STD_SECTION (bfd_und_section, 0, BFD_UND_SECTION_NAME, 1);
+STD_SECTION (bfd_abs_section, 0, BFD_ABS_SECTION_NAME, 2);
+STD_SECTION (bfd_ind_section, 0, BFD_IND_SECTION_NAME, 3);
#undef STD_SECTION
/* Initialize an entry in the section hash table. */
@@ -743,23 +735,16 @@ bfd_section_hash_newfunc (struct bfd_hash_entry *entry,
((struct section_hash_entry *) \
bfd_hash_lookup ((table), (string), (create), (copy)))
-/* Initializes a new section. NEWSECT->NAME is already set. */
+/* 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. */
-static asection *
-bfd_section_init (bfd *abfd, asection *newsect)
+bfd_boolean
+_bfd_generic_new_section_hook (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;
+ return FALSE;
newsect->symbol->name = newsect->name;
newsect->symbol->value = 0;
@@ -767,6 +752,19 @@ bfd_section_init (bfd *abfd, asection *newsect)
newsect->symbol->flags = BSF_SECTION_SYM;
newsect->symbol_ptr_ptr = &newsect->symbol;
+ return TRUE;
+}
+
+/* Initializes a new section. NEWSECT->NAME is already set. */
+
+static asection *
+bfd_section_init (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;
if (! BFD_SEND (abfd, _new_section_hook, (abfd, newsect)))
return NULL;
@@ -964,7 +962,6 @@ DESCRIPTION
asection *
bfd_make_section_old_way (bfd *abfd, const char *name)
{
- struct section_hash_entry *sh;
asection *newsect;
if (abfd->output_has_begun)
@@ -974,30 +971,38 @@ bfd_make_section_old_way (bfd *abfd, const char *name)
}
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;
+ newsect = bfd_abs_section_ptr;
+ else if (strcmp (name, BFD_COM_SECTION_NAME) == 0)
+ newsect = bfd_com_section_ptr;
+ else if (strcmp (name, BFD_UND_SECTION_NAME) == 0)
+ newsect = bfd_und_section_ptr;
+ else if (strcmp (name, BFD_IND_SECTION_NAME) == 0)
+ newsect = bfd_ind_section_ptr;
+ else
+ {
+ struct section_hash_entry *sh;
- if (strcmp (name, BFD_UND_SECTION_NAME) == 0)
- return bfd_und_section_ptr;
+ sh = section_hash_lookup (&abfd->section_htab, name, TRUE, FALSE);
+ if (sh == NULL)
+ return NULL;
- if (strcmp (name, BFD_IND_SECTION_NAME) == 0)
- return bfd_ind_section_ptr;
+ newsect = &sh->section;
+ if (newsect->name != NULL)
+ {
+ /* Section already exists. */
+ return newsect;
+ }
- 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);
}
- newsect->name = name;
- return bfd_section_init (abfd, newsect);
+ /* Call new_section_hook when "creating" the standard abs, com, und
+ and ind sections to tack on format specific section data.
+ Also, create a proper section symbol. */
+ if (! BFD_SEND (abfd, _new_section_hook, (abfd, newsect)))
+ return NULL;
+ return newsect;
}
/*
diff --git a/contrib/binutils/bfd/simple.c b/contrib/binutils/bfd/simple.c
index d06ce2a..8ebc47e 100644
--- a/contrib/binutils/bfd/simple.c
+++ b/contrib/binutils/bfd/simple.c
@@ -1,5 +1,5 @@
/* simple.c -- BFD simple client routines
- Copyright 2002, 2003, 2004, 2005
+ Copyright 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
Contributed by MontaVista Software, Inc.
@@ -19,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "bfdlink.h"
@@ -183,6 +183,7 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
/* Fill in the bare minimum number of fields for our purposes. */
memset (&link_info, 0, sizeof (link_info));
link_info.input_bfds = abfd;
+ link_info.input_bfds_tail = &abfd->link_next;
link_info.hash = _bfd_generic_link_hash_table_create (abfd);
link_info.callbacks = &callbacks;
diff --git a/contrib/binutils/bfd/sparclinux.c b/contrib/binutils/bfd/sparclinux.c
index d8659ee..445a66c 100644
--- a/contrib/binutils/bfd/sparclinux.c
+++ b/contrib/binutils/bfd/sparclinux.c
@@ -1,23 +1,23 @@
/* BFD back-end for linux flavored sparc a.out binaries.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002,
- 2003, 2004, 2006 Free Software Foundation, Inc.
+ 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ 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 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
-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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
+ USA. */
#define TARGET_PAGE_SIZE 4096
#define ZMAGIC_DISK_BLOCK_SIZE 1024
@@ -27,8 +27,8 @@ USA. */
#define MACHTYPE_OK(mtype) ((mtype) == M_SPARC || (mtype) == M_UNKNOWN)
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "aout/aout64.h"
#include "aout/stab_gnu.h"
@@ -94,8 +94,7 @@ sparclinux_write_object_contents (abfd)
#define GOT_REF_PREFIX "__GOT_"
#endif
-#define IS_GOT_SYM(name) \
- (strncmp (name, GOT_REF_PREFIX, sizeof GOT_REF_PREFIX - 1) == 0)
+#define IS_GOT_SYM(name) (CONST_STRNEQ (name, GOT_REF_PREFIX))
/* See if a symbol name is a reference to the procedure linkage table. */
@@ -103,8 +102,7 @@ sparclinux_write_object_contents (abfd)
#define PLT_REF_PREFIX "__PLT_"
#endif
-#define IS_PLT_SYM(name) \
- (strncmp (name, PLT_REF_PREFIX, sizeof PLT_REF_PREFIX - 1) == 0)
+#define IS_PLT_SYM(name) (CONST_STRNEQ (name, PLT_REF_PREFIX))
/* This string is used to generate specialized error messages. */
@@ -313,9 +311,8 @@ linux_link_create_dynamic_sections (abfd, info)
/* We choose to use the name ".linux-dynamic" for the fixup table.
Why not? */
- s = bfd_make_section (abfd, ".linux-dynamic");
+ s = bfd_make_section_with_flags (abfd, ".linux-dynamic", flags);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
s->size = 0;
@@ -429,9 +426,7 @@ linux_add_one_symbol (info, abfd, name, flags, section, value, string,
This function is called via linux_link_hash_traverse. */
static bfd_boolean
-linux_tally_symbols (h, data)
- struct linux_link_hash_entry *h;
- PTR data;
+linux_tally_symbols (struct linux_link_hash_entry *h, void * data)
{
struct bfd_link_info *info = (struct bfd_link_info *) data;
struct fixup *f, *f1;
@@ -443,8 +438,7 @@ linux_tally_symbols (h, data)
h = (struct linux_link_hash_entry *) h->root.root.u.i.link;
if (h->root.root.type == bfd_link_hash_undefined
- && strncmp (h->root.root.root.string, NEEDS_SHRLIB,
- sizeof NEEDS_SHRLIB - 1) == 0)
+ && CONST_STRNEQ (h->root.root.root.string, NEEDS_SHRLIB))
{
const char *name;
char *p;
diff --git a/contrib/binutils/bfd/srec.c b/contrib/binutils/bfd/srec.c
index 2b24f46..354a6ee 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, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -101,8 +101,8 @@
We allow symbols to be anywhere in the data stream - the module names
are always ignored. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -526,15 +526,16 @@ srec_scan (bfd *abfd)
char secbuf[20];
char *secname;
bfd_size_type amt;
+ flagword flags;
sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1);
amt = strlen (secbuf) + 1;
secname = bfd_alloc (abfd, amt);
strcpy (secname, secbuf);
- sec = bfd_make_section (abfd, secname);
+ flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
+ sec = bfd_make_section_with_flags (abfd, secname, flags);
if (sec == NULL)
goto error_return;
- sec->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC;
sec->vma = address;
sec->lma = address;
sec->size = bytes;
@@ -1099,7 +1100,7 @@ symbolsrec_write_object_contents (bfd *abfd)
static int
srec_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean exec ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
@@ -1193,9 +1194,6 @@ srec_print_symbol (bfd *abfd,
#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
-#define srec_get_reloc_upper_bound ((long (*) (bfd *, asection *)) bfd_0l)
-#define srec_canonicalize_reloc ((long (*) (bfd *, asection *, arelent **, asymbol **)) bfd_0l)
-#define srec_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
#define srec_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
#define srec_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define srec_bfd_relax_section bfd_generic_relax_section
@@ -1256,7 +1254,7 @@ const bfd_target srec_vec =
BFD_JUMP_TABLE_CORE (_bfd_nocore),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (srec),
- BFD_JUMP_TABLE_RELOCS (srec),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (srec),
BFD_JUMP_TABLE_LINK (srec),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
@@ -1311,7 +1309,7 @@ const bfd_target symbolsrec_vec =
BFD_JUMP_TABLE_CORE (_bfd_nocore),
BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
BFD_JUMP_TABLE_SYMBOLS (srec),
- BFD_JUMP_TABLE_RELOCS (srec),
+ BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
BFD_JUMP_TABLE_WRITE (srec),
BFD_JUMP_TABLE_LINK (srec),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
diff --git a/contrib/binutils/bfd/stabs.c b/contrib/binutils/bfd/stabs.c
index ba3f934..1192cd1 100644
--- a/contrib/binutils/bfd/stabs.c
+++ b/contrib/binutils/bfd/stabs.c
@@ -1,6 +1,6 @@
/* Stabs in sections linking support.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
- 2006 Free Software Foundation, Inc.
+ 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -22,8 +22,8 @@
/* This file contains support for linking stabs in sections, as used
on COFF and ELF. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "aout/stab_gnu.h"
#include "safe-ctype.h"
@@ -175,10 +175,8 @@ _bfd_link_section_stabs (bfd *abfd,
prepared to handle them. */
return TRUE;
- if ((stabsec->output_section != NULL
- && bfd_is_abs_section (stabsec->output_section))
- || (stabstrsec->output_section != NULL
- && bfd_is_abs_section (stabstrsec->output_section)))
+ if (bfd_is_abs_section (stabsec->output_section)
+ || bfd_is_abs_section (stabstrsec->output_section))
/* At least one of the sections is being discarded from the
link, so we should just ignore them. */
return TRUE;
@@ -187,6 +185,8 @@ _bfd_link_section_stabs (bfd *abfd,
if (sinfo->stabstr == NULL)
{
+ flagword flags;
+
/* Initialize the stabs information we need to keep track of. */
first = TRUE;
sinfo->strings = _bfd_stringtab_init ();
@@ -198,11 +198,12 @@ _bfd_link_section_stabs (bfd *abfd,
stab_link_includes_newfunc,
sizeof (struct stab_link_includes_entry)))
goto error_return;
- sinfo->stabstr = bfd_make_section_anyway (abfd, ".stabstr");
+ flags = (SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING
+ | SEC_LINKER_CREATED);
+ sinfo->stabstr = bfd_make_section_anyway_with_flags (abfd, ".stabstr",
+ flags);
if (sinfo->stabstr == NULL)
goto error_return;
- sinfo->stabstr->flags |= (SEC_HAS_CONTENTS | SEC_READONLY
- | SEC_DEBUGGING | SEC_LINKER_CREATED);
}
/* Initialize the information we are going to store for this .stab
@@ -430,7 +431,7 @@ _bfd_link_section_stabs (bfd *abfd,
++nest;
else if (incl_type == (int) N_EXCL)
/* Keep existing exclusion marks. */
- continue;
+ continue;
else if (nest == 0)
{
*incl_pstridx = (bfd_size_type) -1;
@@ -455,8 +456,8 @@ _bfd_link_section_stabs (bfd *abfd,
for that section. */
stabsec->size = (count - skip) * STABSIZE;
if (stabsec->size == 0)
- stabsec->flags |= SEC_EXCLUDE;
- stabstrsec->flags |= SEC_EXCLUDE;
+ stabsec->flags |= SEC_EXCLUDE | SEC_KEEP;
+ stabstrsec->flags |= SEC_EXCLUDE | SEC_KEEP;
sinfo->stabstr->size = _bfd_stringtab_size (sinfo->strings);
/* Calculate the `cumulative_skips' array now that stabs have been
@@ -608,7 +609,7 @@ _bfd_discard_section_stabs (bfd *abfd,
/* Shrink the stabsec as needed. */
stabsec->size -= skip * STABSIZE;
if (stabsec->size == 0)
- stabsec->flags |= SEC_EXCLUDE;
+ stabsec->flags |= SEC_EXCLUDE | SEC_KEEP;
/* Recalculate the `cumulative_skips' array now that stabs have been
deleted for this section. */
diff --git a/contrib/binutils/bfd/sunos.c b/contrib/binutils/bfd/sunos.c
index 024320f..a9117f4 100644
--- a/contrib/binutils/bfd/sunos.c
+++ b/contrib/binutils/bfd/sunos.c
@@ -745,57 +745,50 @@ sunos_create_dynamic_sections (bfd *abfd,
/* The .dynamic section holds the basic dynamic information: the
sun4_dynamic structure, the dynamic debugger information, and
the sun4_dynamic_link structure. */
- s = bfd_make_section (abfd, ".dynamic");
+ s = bfd_make_section_with_flags (abfd, ".dynamic", flags);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .got section holds the global offset table. The address
is put in the ld_got field. */
- s = bfd_make_section (abfd, ".got");
+ s = bfd_make_section_with_flags (abfd, ".got", flags);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .plt section holds the procedure linkage table. The
address is put in the ld_plt field. */
- s = bfd_make_section (abfd, ".plt");
+ s = bfd_make_section_with_flags (abfd, ".plt", flags | SEC_CODE);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_CODE)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .dynrel section holds the dynamic relocs. The address is
put in the ld_rel field. */
- s = bfd_make_section (abfd, ".dynrel");
+ s = bfd_make_section_with_flags (abfd, ".dynrel", flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .hash section holds the dynamic hash table. The address
is put in the ld_hash field. */
- s = bfd_make_section (abfd, ".hash");
+ s = bfd_make_section_with_flags (abfd, ".hash", flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .dynsym section holds the dynamic symbols. The address
is put in the ld_stab field. */
- s = bfd_make_section (abfd, ".dynsym");
+ s = bfd_make_section_with_flags (abfd, ".dynsym", flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
/* The .dynstr section holds the dynamic symbol string table.
The address is put in the ld_symbols field. */
- s = bfd_make_section (abfd, ".dynstr");
+ s = bfd_make_section_with_flags (abfd, ".dynstr", flags | SEC_READONLY);
if (s == NULL
- || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
|| ! bfd_set_section_alignment (abfd, s, 2))
return FALSE;
@@ -890,14 +883,10 @@ sunos_add_dynamic_symbols (bfd *abfd,
/* 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. */
- asection *s = bfd_make_section (dynobj, ".need");
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_READONLY);
+ asection *s = bfd_make_section_with_flags (dynobj, ".need", flags);
if (s == NULL
- || ! bfd_set_section_flags (dynobj, s,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, s, 2))
return FALSE;
}
@@ -907,14 +896,10 @@ sunos_add_dynamic_symbols (bfd *abfd,
/* The .rules section holds the path to search for shared
objects. The address of this section is put in the ld_rules
field. */
- asection *s = bfd_make_section (dynobj, ".rules");
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_READONLY);
+ asection *s = bfd_make_section_with_flags (dynobj, ".rules", flags);
if (s == NULL
- || ! bfd_set_section_flags (dynobj, s,
- (SEC_ALLOC
- | SEC_LOAD
- | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY
- | SEC_READONLY))
|| ! bfd_set_section_alignment (dynobj, s, 2))
return FALSE;
}
diff --git a/contrib/binutils/bfd/syms.c b/contrib/binutils/bfd/syms.c
index 0ff9416..89c3869 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, 2001, 2002, 2003, 2004
+ 2000, 2001, 2002, 2003, 2004, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -288,6 +288,14 @@ CODE_FRAGMENT
. {* This symbol is thread local. Used in ELF. *}
.#define BSF_THREAD_LOCAL 0x40000
.
+. {* This symbol represents a complex relocation expression,
+. with the expression tree serialized in the symbol name. *}
+.#define BSF_RELC 0x80000
+.
+. {* This symbol represents a signed complex relocation expression,
+. with the expression tree serialized in the symbol name. *}
+.#define BSF_SRELC 0x100000
+.
. flagword flags;
.
. {* A pointer to the section to which this symbol is
@@ -307,8 +315,8 @@ CODE_FRAGMENT
.
*/
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "safe-ctype.h"
#include "bfdlink.h"
diff --git a/contrib/binutils/bfd/sysdep.h b/contrib/binutils/bfd/sysdep.h
index f6313d3..e1b070b 100644
--- a/contrib/binutils/bfd/sysdep.h
+++ b/contrib/binutils/bfd/sysdep.h
@@ -1,5 +1,5 @@
/* sysdep.h -- handle host dependencies for the BFD library
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -22,10 +22,10 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#ifndef BFD_SYSDEP_H
#define BFD_SYSDEP_H
-#include "ansidecl.h"
-
#include "config.h"
+#include "ansidecl.h"
+
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif
diff --git a/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c
index 3b04f60..04b52df 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, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,8 +20,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "fnmatch.h"
@@ -402,7 +402,8 @@ BFD_JUMP_TABLE macros.
.#define BFD_JUMP_TABLE_RELOCS(NAME) \
. NAME##_get_reloc_upper_bound, \
. NAME##_canonicalize_reloc, \
-. NAME##_bfd_reloc_type_lookup
+. NAME##_bfd_reloc_type_lookup, \
+. NAME##_bfd_reloc_name_lookup
.
. long (*_get_reloc_upper_bound) (bfd *, sec_ptr);
. long (*_bfd_canonicalize_reloc)
@@ -410,6 +411,9 @@ BFD_JUMP_TABLE macros.
. {* See documentation on reloc types. *}
. reloc_howto_type *
. (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type);
+. reloc_howto_type *
+. (*reloc_name_lookup) (bfd *, const char *);
+.
.
. {* Routines used when writing an object file. *}
.#define BFD_JUMP_TABLE_WRITE(NAME) \
@@ -438,7 +442,7 @@ BFD_JUMP_TABLE macros.
. NAME##_bfd_discard_group, \
. NAME##_section_already_linked \
.
-. int (*_bfd_sizeof_headers) (bfd *, bfd_boolean);
+. int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *);
. bfd_byte * (*_bfd_get_relocated_section_contents)
. (bfd *, struct bfd_link_info *, struct bfd_link_order *,
. bfd_byte *, bfd_boolean, struct bfd_symbol **);
@@ -481,7 +485,8 @@ BFD_JUMP_TABLE macros.
.
. {* Check if SEC has been already linked during a reloceatable or
. final link. *}
-. void (*_section_already_linked) (bfd *, struct bfd_section *);
+. void (*_section_already_linked) (bfd *, struct bfd_section *,
+. struct bfd_link_info *);
.
. {* Routines to handle dynamic symbols and relocs. *}
.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
@@ -541,6 +546,10 @@ extern const bfd_target arm_epoc_pe_big_vec;
extern const bfd_target arm_epoc_pe_little_vec;
extern const bfd_target arm_epoc_pei_big_vec;
extern const bfd_target arm_epoc_pei_little_vec;
+extern const bfd_target arm_wince_pe_big_vec;
+extern const bfd_target arm_wince_pe_little_vec;
+extern const bfd_target arm_wince_pei_big_vec;
+extern const bfd_target arm_wince_pei_little_vec;
extern const bfd_target armcoff_big_vec;
extern const bfd_target armcoff_little_vec;
extern const bfd_target armnetbsd_vec;
@@ -563,6 +572,7 @@ extern const bfd_target bfd_elf32_bigarm_symbian_vec;
extern const bfd_target bfd_elf32_bigarm_vxworks_vec;
extern const bfd_target bfd_elf32_bigmips_vec;
extern const bfd_target bfd_elf32_bigmips_vxworks_vec;
+extern const bfd_target bfd_elf32_cr16_vec;
extern const bfd_target bfd_elf32_cr16c_vec;
extern const bfd_target bfd_elf32_cris_vec;
extern const bfd_target bfd_elf32_crx_vec;
@@ -605,6 +615,8 @@ extern const bfd_target bfd_elf32_m68k_vec;
extern const bfd_target bfd_elf32_m88k_vec;
extern const bfd_target bfd_elf32_mcore_big_vec;
extern const bfd_target bfd_elf32_mcore_little_vec;
+extern const bfd_target bfd_elf32_mep_vec;
+extern const bfd_target bfd_elf32_mep_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
extern const bfd_target bfd_elf32_mt_vec;
@@ -621,6 +633,8 @@ extern const bfd_target bfd_elf32_powerpc_vec;
extern const bfd_target bfd_elf32_powerpcle_vec;
extern const bfd_target bfd_elf32_powerpc_vxworks_vec;
extern const bfd_target bfd_elf32_s390_vec;
+extern const bfd_target bfd_elf32_bigscore_vec;
+extern const bfd_target bfd_elf32_littlescore_vec;
extern const bfd_target bfd_elf32_sh64_vec;
extern const bfd_target bfd_elf32_sh64l_vec;
extern const bfd_target bfd_elf32_sh64lin_vec;
@@ -633,9 +647,12 @@ extern const bfd_target bfd_elf32_shl_vec;
extern const bfd_target bfd_elf32_shl_symbian_vec;
extern const bfd_target bfd_elf32_shlin_vec;
extern const bfd_target bfd_elf32_shlnbsd_vec;
+extern const bfd_target bfd_elf32_shlvxworks_vec;
extern const bfd_target bfd_elf32_shnbsd_vec;
+extern const bfd_target bfd_elf32_shvxworks_vec;
extern const bfd_target bfd_elf32_sparc_vec;
extern const bfd_target bfd_elf32_sparc_vxworks_vec;
+extern const bfd_target bfd_elf32_spu_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;
@@ -667,8 +684,10 @@ extern const bfd_target bfd_elf64_sh64blin_vec;
extern const bfd_target bfd_elf64_sh64lnbsd_vec;
extern const bfd_target bfd_elf64_sh64nbsd_vec;
extern const bfd_target bfd_elf64_sparc_vec;
+extern const bfd_target bfd_elf64_sparc_freebsd_vec;
extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
+extern const bfd_target bfd_elf64_x86_64_freebsd_vec;
extern const bfd_target bfd_elf64_x86_64_vec;
extern const bfd_target bfd_mmo_vec;
extern const bfd_target bfd_powerpc_pe_vec;
@@ -781,6 +800,9 @@ extern const bfd_target vms_alpha_vec;
extern const bfd_target vms_vax_vec;
extern const bfd_target w65_vec;
extern const bfd_target we32kcoff_vec;
+extern const bfd_target x86_64pe_vec;
+extern const bfd_target x86_64pei_vec;
+extern const bfd_target x86_64coff_vec;
extern const bfd_target z80coff_vec;
extern const bfd_target z8kcoff_vec;
@@ -805,8 +827,8 @@ extern const bfd_target sco5_core_vec;
extern const bfd_target trad_core_vec;
extern const bfd_target bfd_elf32_am33lin_vec;
-static const bfd_target * const _bfd_target_vector[] = {
-
+static const bfd_target * const _bfd_target_vector[] =
+{
#ifdef SELECT_VECS
SELECT_VECS,
@@ -842,6 +864,10 @@ static const bfd_target * const _bfd_target_vector[] = {
&arm_epoc_pe_little_vec,
&arm_epoc_pei_big_vec,
&arm_epoc_pei_little_vec,
+ &arm_wince_pe_big_vec,
+ &arm_wince_pe_little_vec,
+ &arm_wince_pei_big_vec,
+ &arm_wince_pei_little_vec,
&armcoff_big_vec,
&armcoff_little_vec,
&armnetbsd_vec,
@@ -854,6 +880,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_efi_app_ia32_vec,
&bfd_efi_app_x86_64_vec,
#ifdef BFD64
+ &bfd_efi_app_x86_64_vec,
&bfd_efi_app_ia64_vec,
#endif
&bfd_elf32_avr_vec,
@@ -871,6 +898,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_bigarm_vxworks_vec,
&bfd_elf32_bigmips_vec,
&bfd_elf32_bigmips_vxworks_vec,
+ &bfd_elf32_cr16_vec,
&bfd_elf32_cr16c_vec,
&bfd_elf32_cris_vec,
&bfd_elf32_crx_vec,
@@ -917,6 +945,7 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_m88k_vec,
&bfd_elf32_mcore_big_vec,
&bfd_elf32_mcore_little_vec,
+ &bfd_elf32_mep_vec,
&bfd_elf32_mn10200_vec,
&bfd_elf32_mn10300_vec,
&bfd_elf32_mt_vec,
@@ -935,13 +964,17 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf32_powerpc_vxworks_vec,
&bfd_elf32_powerpcle_vec,
&bfd_elf32_s390_vec,
+ &bfd_elf32_bigscore_vec,
+ &bfd_elf32_littlescore_vec,
&bfd_elf32_sh_vec,
&bfd_elf32_shblin_vec,
&bfd_elf32_shl_vec,
&bfd_elf32_shl_symbian_vec,
&bfd_elf32_shlin_vec,
&bfd_elf32_shlnbsd_vec,
+ &bfd_elf32_shlvxworks_vec,
&bfd_elf32_shnbsd_vec,
+ &bfd_elf32_shvxworks_vec,
#ifdef BFD64
&bfd_elf32_sh64_vec,
&bfd_elf32_sh64l_vec,
@@ -952,6 +985,7 @@ static const bfd_target * const _bfd_target_vector[] = {
#endif
&bfd_elf32_sparc_vec,
&bfd_elf32_sparc_vxworks_vec,
+ &bfd_elf32_spu_vec,
&bfd_elf32_tradbigmips_vec,
&bfd_elf32_tradlittlemips_vec,
&bfd_elf32_us_cris_vec,
@@ -984,8 +1018,10 @@ static const bfd_target * const _bfd_target_vector[] = {
&bfd_elf64_sh64lin_vec,
&bfd_elf64_sh64blin_vec,
&bfd_elf64_sparc_vec,
+ &bfd_elf64_sparc_freebsd_vec,
&bfd_elf64_tradbigmips_vec,
&bfd_elf64_tradlittlemips_vec,
+ &bfd_elf64_x86_64_freebsd_vec,
&bfd_elf64_x86_64_vec,
&bfd_mmo_vec,
#endif
@@ -1038,6 +1074,11 @@ static const bfd_target * const _bfd_target_vector[] = {
&i386os9k_vec,
&i386pe_vec,
&i386pei_vec,
+#ifdef BFD64
+ &x86_64coff_vec,
+ &x86_64pe_vec,
+ &x86_64pei_vec,
+#endif
&i860coff_vec,
&icoff_big_vec,
&icoff_little_vec,
@@ -1262,7 +1303,6 @@ find_target (const char *name)
while (match->vector == NULL)
++match;
return match->vector;
- break;
}
}
@@ -1309,14 +1349,15 @@ SYNOPSIS
DESCRIPTION
Return a pointer to the transfer vector for the object target
- named @var{target_name}. If @var{target_name} is <<NULL>>, choose the
- one in the environment variable <<GNUTARGET>>; if that is null or not
- defined, then choose the first entry in the target list.
- Passing in the string "default" or setting the environment
- variable to "default" will cause the first entry in the target
- list to be returned, and "target_defaulted" will be set in the
- BFD. This causes <<bfd_check_format>> to loop over all the
- targets to find the one that matches the file being read.
+ named @var{target_name}. If @var{target_name} is <<NULL>>,
+ choose the one in the environment variable <<GNUTARGET>>; if
+ that is null or not defined, then choose the first entry in the
+ target list. Passing in the string "default" or setting the
+ environment variable to "default" will cause the first entry in
+ the target list to be returned, and "target_defaulted" will be
+ set in the BFD if @var{abfd} isn't <<NULL>>. This causes
+ <<bfd_check_format>> to loop over all the targets to find the
+ one that matches the file being read.
*/
const bfd_target *
@@ -1333,21 +1374,27 @@ bfd_find_target (const char *target_name, bfd *abfd)
/* This is safe; the vector cannot be null. */
if (targname == NULL || strcmp (targname, "default") == 0)
{
- abfd->target_defaulted = TRUE;
if (bfd_default_vector[0] != NULL)
- abfd->xvec = bfd_default_vector[0];
+ target = bfd_default_vector[0];
else
- abfd->xvec = bfd_target_vector[0];
- return abfd->xvec;
+ target = bfd_target_vector[0];
+ if (abfd)
+ {
+ abfd->xvec = target;
+ abfd->target_defaulted = TRUE;
+ }
+ return target;
}
- abfd->target_defaulted = FALSE;
+ if (abfd)
+ abfd->target_defaulted = FALSE;
target = find_target (targname);
if (target == NULL)
return NULL;
- abfd->xvec = target;
+ if (abfd)
+ abfd->xvec = target;
return target;
}
diff --git a/contrib/binutils/bfd/tekhex.c b/contrib/binutils/bfd/tekhex.c
index afe42cc..78deaf9 100644
--- a/contrib/binutils/bfd/tekhex.c
+++ b/contrib/binutils/bfd/tekhex.c
@@ -1,6 +1,6 @@
/* BFD backend for Extended Tektronix Hex Format objects.
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ 2003, 2004, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
This file is part of BFD, the Binary File Descriptor library.
@@ -65,8 +65,8 @@
The data can come out of order, and may be discontigous. This is a
serial protocol, so big files are unlikely, so we keep a list of 8k chunks. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libiberty.h"
@@ -436,6 +436,7 @@ first_phase (bfd *abfd, int type, char *src)
if (!getvalue (&src, &val))
return FALSE;
new->symbol.value = val - section->vma;
+ break;
}
default:
return FALSE;
@@ -457,11 +458,10 @@ pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *))
/* To the front of the file. */
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
- abort ();
+ return FALSE;
while (! eof)
{
- char buffer[MAXCHUNK];
- char *src = buffer;
+ char src[MAXCHUNK];
char type;
/* Find first '%'. */
@@ -471,22 +471,24 @@ pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *))
if (eof)
break;
- src++;
/* Fetch the type and the length and the checksum. */
if (bfd_bread (src, (bfd_size_type) 5, abfd) != 5)
- abort (); /* FIXME. */
+ return FALSE;
type = src[2];
if (!ISHEX (src[0]) || !ISHEX (src[1]))
break;
- /* Already read five char. */
+ /* Already read five chars. */
chars_on_line = HEX (src) - 5;
+ if (chars_on_line >= MAXCHUNK)
+ return FALSE;
+
if (bfd_bread (src, (bfd_size_type) chars_on_line, abfd) != chars_on_line)
- abort (); /* FIXME. */
+ return FALSE;
/* Put a null at the end. */
src[chars_on_line] = 0;
@@ -751,7 +753,6 @@ out (bfd *abfd, int type, char *start, char *end)
static bfd_boolean
tekhex_write_object_contents (bfd *abfd)
{
- int bytes_written;
char buffer[100];
asymbol **p;
asection *s;
@@ -759,8 +760,6 @@ tekhex_write_object_contents (bfd *abfd)
tekhex_init ();
- bytes_written = 0;
-
/* And the raw data. */
for (d = abfd->tdata.tekhex_data->data;
d != NULL;
@@ -868,7 +867,7 @@ tekhex_write_object_contents (bfd *abfd)
static int
tekhex_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
- bfd_boolean exec ATTRIBUTE_UNUSED)
+ struct bfd_link_info *info ATTRIBUTE_UNUSED)
{
return 0;
}
diff --git a/contrib/binutils/bfd/trad-core.c b/contrib/binutils/bfd/trad-core.c
index cb4111f..79b869c 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, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by John Gilmore of Cygnus Support.
@@ -20,8 +20,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libbfd.h"
#include "libaout.h" /* BFD a.out internal data structures */
@@ -79,6 +79,7 @@ trad_unix_core_file_p (abfd)
struct user u;
struct trad_core_struct *rawptr;
bfd_size_type amt;
+ flagword flags;
#ifdef TRAD_CORE_USER_OFFSET
/* If defined, this macro is the file position of the user struct. */
@@ -113,24 +114,24 @@ trad_unix_core_file_p (abfd)
if (bfd_stat (abfd, &statbuf) < 0)
return 0;
- if ((unsigned long) (NBPG * (UPAGES + u.u_dsize
+ if ((ufile_ptr) NBPG * (UPAGES + u.u_dsize
#ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
- - u.u_tsize
+ - u.u_tsize
#endif
- + u.u_ssize))
- > (unsigned long) statbuf.st_size)
+ + u.u_ssize)
+ > (ufile_ptr) statbuf.st_size)
{
bfd_set_error (bfd_error_wrong_format);
return 0;
}
#ifndef TRAD_CORE_ALLOW_ANY_EXTRA_SIZE
- if ((unsigned long) (NBPG * (UPAGES + u.u_dsize + u.u_ssize)
+ if (((ufile_ptr) NBPG * (UPAGES + u.u_dsize + u.u_ssize)
#ifdef TRAD_CORE_EXTRA_SIZE_ALLOWED
/* Some systems write the file too big. */
- + TRAD_CORE_EXTRA_SIZE_ALLOWED
+ + TRAD_CORE_EXTRA_SIZE_ALLOWED
#endif
- )
- < (unsigned long) statbuf.st_size)
+ )
+ < (ufile_ptr) statbuf.st_size)
{
/* The file is too big. Maybe it's not a core file
or we otherwise have bad values for u_dsize and u_ssize). */
@@ -155,20 +156,20 @@ trad_unix_core_file_p (abfd)
/* Create the sections. */
- core_stacksec(abfd) = bfd_make_section_anyway (abfd, ".stack");
+ flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
+ core_stacksec(abfd) = bfd_make_section_anyway_with_flags (abfd, ".stack",
+ flags);
if (core_stacksec (abfd) == NULL)
goto fail;
- core_datasec (abfd) = bfd_make_section_anyway (abfd, ".data");
+ core_datasec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".data",
+ flags);
if (core_datasec (abfd) == NULL)
goto fail;
- core_regsec (abfd) = bfd_make_section_anyway (abfd, ".reg");
+ core_regsec (abfd) = bfd_make_section_anyway_with_flags (abfd, ".reg",
+ SEC_HAS_CONTENTS);
if (core_regsec (abfd) == NULL)
goto fail;
- core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
- core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
- core_regsec (abfd)->flags = SEC_HAS_CONTENTS;
-
core_datasec (abfd)->size = NBPG * u.u_dsize
#ifdef TRAD_CORE_DSIZE_INCLUDES_TSIZE
- NBPG * u.u_tsize
diff --git a/contrib/binutils/bfd/version.h b/contrib/binutils/bfd/version.h
index f0ad1a8..88dbbce 100644
--- a/contrib/binutils/bfd/version.h
+++ b/contrib/binutils/bfd/version.h
@@ -1,3 +1,4 @@
-#define BFD_VERSION_DATE 20070807
+#define BFD_VERSION_DATE 20070703
#define BFD_VERSION @bfd_version@
-#define BFD_VERSION_STRING @bfd_version_string@
+#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
+#define REPORT_BUGS_TO @report_bugs_to@
diff --git a/contrib/binutils/bfd/xcoff-target.h b/contrib/binutils/bfd/xcoff-target.h
index 7e73cf2..b912fdf 100644
--- a/contrib/binutils/bfd/xcoff-target.h
+++ b/contrib/binutils/bfd/xcoff-target.h
@@ -1,5 +1,5 @@
/* Common definitions for backends based on IBM RS/6000 "XCOFF64" files.
- Copyright 2000, 2001, 2002, 2004, 2005
+ Copyright 2000, 2001, 2002, 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by Cygnus Support.
@@ -125,7 +125,7 @@ extern bfd * _bfd_xcoff_openr_next_archived_file (bfd *, bfd *);
extern int _bfd_xcoff_generic_stat_arch_elt (bfd *, struct stat *);
extern bfd_boolean _bfd_xcoff_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int);
extern bfd_boolean _bfd_xcoff_write_archive_contents (bfd *);
-extern int _bfd_xcoff_sizeof_headers (bfd *, bfd_boolean);
+extern int _bfd_xcoff_sizeof_headers (bfd *, struct bfd_link_info *);
extern void _bfd_xcoff_swap_sym_in (bfd *, void *, void *);
extern unsigned int _bfd_xcoff_swap_sym_out (bfd *, void *, void *);
extern void _bfd_xcoff_swap_aux_in (bfd *, void *, int, int, int, int, void *);
diff --git a/contrib/binutils/bfd/xcofflink.c b/contrib/binutils/bfd/xcofflink.c
index 47c330b..b02886a 100644
--- a/contrib/binutils/bfd/xcofflink.c
+++ b/contrib/binutils/bfd/xcofflink.c
@@ -1,6 +1,6 @@
/* POWER/PowerPC XCOFF linker support.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+ 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,8 +19,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "coff/internal.h"
@@ -794,27 +794,27 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info)
if (xcoff_hash_table (info)->loader_section == NULL)
{
asection *lsec;
+ flagword flags = SEC_HAS_CONTENTS | SEC_IN_MEMORY;
- lsec = bfd_make_section_anyway (abfd, ".loader");
+ lsec = bfd_make_section_anyway_with_flags (abfd, ".loader", flags);
if (lsec == NULL)
goto end_return;
xcoff_hash_table (info)->loader_section = lsec;
- lsec->flags |= SEC_HAS_CONTENTS | SEC_IN_MEMORY;
}
/* Likewise for the linkage section. */
if (xcoff_hash_table (info)->linkage_section == NULL)
{
asection *lsec;
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY);
- lsec = bfd_make_section_anyway (abfd, ".gl");
+ lsec = bfd_make_section_anyway_with_flags (abfd, ".gl", flags);
if (lsec == NULL)
goto end_return;
xcoff_hash_table (info)->linkage_section = lsec;
- lsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY);
lsec->alignment_power = 2;
}
@@ -822,14 +822,14 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info)
if (xcoff_hash_table (info)->toc_section == NULL)
{
asection *tsec;
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY);
- tsec = bfd_make_section_anyway (abfd, ".tc");
+ tsec = bfd_make_section_anyway_with_flags (abfd, ".tc", flags);
if (tsec == NULL)
goto end_return;
xcoff_hash_table (info)->toc_section = tsec;
- tsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY);
tsec->alignment_power = 2;
}
@@ -837,14 +837,14 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info)
if (xcoff_hash_table (info)->descriptor_section == NULL)
{
asection *dsec;
+ flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY);
- dsec = bfd_make_section_anyway (abfd, ".ds");
+ dsec = bfd_make_section_anyway_with_flags (abfd, ".ds", flags);
if (dsec == NULL)
goto end_return;
xcoff_hash_table (info)->descriptor_section = dsec;
- dsec->flags |= (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
- | SEC_IN_MEMORY);
dsec->alignment_power = 2;
}
@@ -853,13 +853,13 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info)
&& info->strip != strip_all)
{
asection *dsec;
+ flagword flags = SEC_HAS_CONTENTS | SEC_IN_MEMORY;
- dsec = bfd_make_section_anyway (abfd, ".debug");
+ dsec = bfd_make_section_anyway_with_flags (abfd, ".debug", flags);
if (dsec == NULL)
goto end_return;
xcoff_hash_table (info)->debug_section = dsec;
- dsec->flags |= SEC_HAS_CONTENTS | SEC_IN_MEMORY;
}
}
@@ -1552,16 +1552,17 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info)
{
/* The linker script puts the .td section in the data
section after the .tc section. */
- csect = bfd_make_section_anyway (abfd, ".td");
+ csect = bfd_make_section_anyway_with_flags (abfd, ".td",
+ SEC_ALLOC);
}
else
- csect = bfd_make_section_anyway (abfd, ".bss");
+ csect = bfd_make_section_anyway_with_flags (abfd, ".bss",
+ SEC_ALLOC);
if (csect == NULL)
goto error_return;
csect->vma = sym.n_value;
csect->size = aux.x_csect.x_scnlen.l;
- csect->flags |= SEC_ALLOC;
csect->alignment_power = SMTYP_ALIGN (aux.x_csect.x_smtyp);
/* There are a number of other fields and section flags
which we do not bother to set. */
@@ -5460,8 +5461,8 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info)
that needs padding. This requires unlinking and
relinking the bfd's section list. */
- n = bfd_make_section_anyway (abfd, ".pad");
- n->flags = SEC_HAS_CONTENTS;
+ n = bfd_make_section_anyway_with_flags (abfd, ".pad",
+ SEC_HAS_CONTENTS);
n->alignment_power = 0;
bfd_section_list_remove (abfd, n);
diff --git a/contrib/binutils/binutils/ChangeLog b/contrib/binutils/binutils/ChangeLog
index 2f6520f..574f183 100644
--- a/contrib/binutils/binutils/ChangeLog
+++ b/contrib/binutils/binutils/ChangeLog
@@ -1,267 +1,696 @@
-2006-08-15 Nick Clifton <nickc@redhat.com>
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
- PR binutils/3039
- * wrstabs.c (stab_tag_type): Initialize 'size'.
+ PR 4716
+ * objcopy.c (filter_symbols): Correct relocatable file test.
-2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
- * po/Make-in (pdf, ps): New dummy targets.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * po/binutils.pot: Regenerate.
-2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
+2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
- * doc/Makefile.am (TEXI2DVI): Define.
- * doc/Makefile.in: Regenerate.
+ * aclocal.m4: Regenerated.
+ * doc/Makefile.in: Likewise.
+ * Makefile.in: Likewise.
-2006-06-01 Daniel Jacobowitz <dan@codesourcery.com>
-
- Backport:
- 2006-05-19 Andreas Schwab <schwab@suse.de>
- * doc/Makefile.am (addr2line.1): Depend on $(binutils_TEXINFOS).
- (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/Makefile.in: Regenerated.
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * readelf.c (display_power_gnu_attribute, process_power_specific):
+ New.
+ (process_arch_specific): Call process_power_specific.
+
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * readelf.c (display_mips_gnu_attribute): New.
+ (process_mips_specific): Call process_attributes.
+
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * readelf.c (display_gnu_attribute): New.
+ (process_arm_specific): Rearrange as process_attributes.
+ (process_arm_specific): Replace by wrapper of process_attributes.
+
+2007-06-28 Roland McGrath <roland@frob.com>
+
+ * objcopy.c (setup_section): Don't reset ELF section type to
+ SHT_NOBITS when it is SHT_NOTE.
+ * doc/binutils.texi (objcopy, strip): Mention under --only-keep-debug.
+
+2007-06-27 Alan Modra <amodra@bigpond.net.au>
+
+ * ar.c: Rename uses of bfd.next to bfd.archive_next throughout.
+ * arsup.c: Likewise.
+ * binemul.c: Likewise.
+ * objcopy.c: Likewise.
+ * dlltool.c: Likewise.
+
+2007-06-26 Shantonu Sen <ssen@apple.com>
+
+ PR binutils/4693
+ * Makefile.am (windres_DEPENDENCIES, windmc_DEPENDENCIES): Move
+ dependency on $(LIBICONV) to ...
+ (windres_LDADD, windmc_LDADD) ... here.
+ * Makefile.in: Regenerate.
+
+2007-06-21 Alan Modra <amodra@bigpond.net.au>
+
+ * embedspu.sh (relas): Correct sh_info parsing.
+
+2007-06-19 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * objdump.c: Include sys/stat.h.
+
+2007-06-19 Kai Tietz <kai.tietz@onevision.com>
+
+ * Makefile.am: Add windmc tool.
+ * Makefile.in: Regenerate.
+ * configure.in: Add windmc tool.
+ * configure: Regenerate.
+ * mclex.c: New.
+ * mcparse.y: New.
+ * windmc.c: New.
+ * windmc.h: New.
+ * doc/Makefile.am: Add windmc tool.
+ * doc/Makefile.in: Regenerate.
+ * doc/binutils.texi: Add windmc documentation.
+ * NEWS: Mention new tool.
+
+2007-06-18 Andi Kleen <ak@suse.de>
+
+ * objdump.c: Include sys/mman.h
+ (print_file_list): Remove f, add map, mapsize, linemap, maxline,
+ last_line, first fields.
+ (slurp_file): Add.
+ (index_file): Add.
+ (print_file_open): Call slurp_file and index_file. Initialize new
+ fields.
+ (skip_to_line): Rename to print_line and write only single line.
+ (dump_line): Add.
+ (show_line): Change to new algorithm.
+
+2007-06-18 Thomas Weidenmueller <w3seek@reactos.org>
+
+ * resres.c (probe_binary): Fix test for badly formatted headers.
+
+2007-06-18 Kai Tietz <Kai.Tietz@onevision.com>
+
+ * rclex.c: (cpp_line): Add code_page pragma support.
+ * windres.c: (usage, long_options, main): Add new option
+ --codepage or -c.
+ * winduni.c: (wind_default_codepage, wind_current_codepage): New.
+ (unicode_from_ascii, ascii_from_unicode): Use
+ wind_current_codepage as codepage parameter.
+ (unicode_print): Print 4 characters for hexadecimal values in
+ unicode strings.
+ * winduni.h: (wind_default_codepage, wind_current_codepage):
+ Export.
+ * doc/binutils.texi: Document new option.
+ * NEWS: Mention new features of windres.
+
+2007-06-18 Brian D. Watt <bwatt@us.ibm.com>
+
+ * embedspu.sh: Parse _SPUEAR_ symbol values as hex.
+
+2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
-2006-05-30 Nick Clifton <nickc@redhat.com>
+ * Makefile.am (ACLOCAL_AMFLAGS): Add -I ../config -I ../bfd.
- * po/es.po: Updated Spanish translation.
+ * acinclude.m4: Removed.
-2006-05-24 Nick Clifton <nickc@redhat.com>
+ * Makefile.in: Regenerated.
+ * aclocal.m4: Likewise.
+ * configure: Likewise.
- * po/fr.po: Updated French translation.
+2007-06-11 Nathan Sidwell <nathan@codesourcery.com>
-2006-05-23 Nick Clifton <nickc@redhat.com>
+ * dwarf.c (decode_location_expression): Add DW_OP_form_tls_address.
- * po/vi.po: Updated Vietnamese translation.
+2007-06-06 Kai Tietz <Kai.Tietz@onevision.com>
-2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
+ PR binutils/4356 binutils/591
+ * resrc.c (filename_need_quotes): New function.
+ (look_for_default): If filename_need_quotes is true then quote the
+ filename in the command line being created.
+ (read_rc_file): Likewise.
- * po/ru.po: Updated translation.
+2007-06-06 Ben Elliston <bje@au.ibm.com>
-2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+ * doc/binutils.texi (objdump): Fix capitalisation of "PowerPC".
- * doc/Makefile.am (AM_MAKEINFOFLAGS): New.
- (TEXI2POD): Use AM_MAKEINFOFLAGS.
- (config.texi): Don't set top_srcdir.
- * doc/binutils.texi: Don't use top_srcdir.
- * aclocal.m4, Makefile.in, doc/Makefile.in: Regenerated.
+2007-06-05 Kai Tietz <Kai.Tietz@onevision.com>
-2006-04-12 Nick Clifton <nickc@redhat.com>
+ * Makefile.am: Add LIBICONV to windres.
+ * acinclude.m4: Added missing "lib-*.m4" and "lt*.m4" files.
+ * configure.in: Add AC_CHECK_HEADER for iconv.h and use AM_ICONV.
+ * config.in: Add ICONV defines.
+ * aclocal.m4: Regenerate.
+ * confugure: Regenerate.
+ * winduni.c: (local_iconv_map codepages, wind_language_t,
+ languages, unicode_is_valid_codepage, wind_find_language_by_id,
+ wind_find_language_by_codepage, wind_find_codepage_info,
+ unicode_from_codepage, codepage_from_unicode, iconv_onechar,
+ wind_iconv_cp, wind_MultiByteToWideChar wind_WideCharToMultiByte):
+ New.
+ (ascii_from_unicode): Use codepage_from_unicode.
+ (ascii_from_unicode): Use unicode_from_codepage.
+ Use for cygwin windows API for unicode transformation.
+ * winduni.h: (CP_ACP, CP_UTF7, CP_UTF8, CP_OEM, CP_UTF16): New
+ macros.
+ (wind_language_t, local_iconv_map): New types.
+ (wind_find_language_by_id, wind_find_language_by_codepage,
+ unicode_is_valid_codepage, wind_find_codepage_info,
+ unicode_from_codepage, codepage_from_unicode): New
+ prototypes.
+
+2007-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * embedspu.sh: Handle R_SPU_PPU* relocs with no symbol.
+
+2007-05-30 Alan Modra <amodra@bigpond.net.au>
- * objdump.c (objdump_symbol_at_address): Fix typo in comment.
+ * objcopy.c (copy_object): Revert 2007-05-11 change. Don't
+ avoid calling bfd_copy_private_bfd_data for ELF STRIP_NONDEBUG.
+ (setup_section): Don't modify flags, and don't avoid calling
+ bfd_copy_private_section_data for ELF STRIP_NONDEBUG.
+ * readelf.c (process_program_headers): Ignore .dynamic of type
+ SHT_NOBITS.
-2006-04-10 Ben Elliston <bje@gnu.org>
+2007-05-29 Alan Modra <amodra@bigpond.net.au>
- * MAINTAINERS (CGEN Maintainers): Remove myself.
+ * embedspu.sh: Emit SPU ELF image to .data.rel.ro.speelf if
+ pic or pie and image needs relocs.
-2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
- * po/Make-in: Add install-html target.
- * Makefile.am: Add install-html and install-html-recursive targets.
* Makefile.in: Regenerate.
- * configure.in: AC_SUBST datarootdir, docdir and htmldir.
* configure: Regenerate.
- * doc/Makefile.am: Add install-html and install-html-am targets.
+ * aclocal.m4: Regenerate.
* doc/Makefile.in: Regenerate.
-2006-04-05 Eric Botcazou <ebotcazou@adacore.com>
+2007-05-24 Kai Tietz <Kai.Tietz@onevision.com>
- * addr2line.c (long_options): Add new option 'section'.
- (usage): Document new -j/--section option.
- (find_offset_in_section): New function.
- (translate_addresses): Add 'section' parameter.
- If it is non-null, call find_offset_in_section on it.
- (process_file): Add 'section_name' parameter.
- If it is non-null, look for the section in the BFD object.
- Pass the section to translate_addresses.
- (main): Handle new -j option.
- Pass the section name to process_file.
- * doc/binutils.texi (addr2line): Document new -j/--section option.
+ * rcparse.y: Join strings for elements having no side-effects in
+ "rc"-grammar.
-2006-03-29 Ben Elliston <bje@au.ibm.com>
+2007-05-23 Kai Tietz <Kai.Tietz@onevision.com>
- * resbin.c: Avoid duplicating constants in calls to reswr_alloc.
+ * rclex.c: New file replacing rclex.l.
+ * rclex.l: Removed.
+ * windint.h: New file holding common structure and type
+ definitions.
+ * Makefile.am: Added new header windint.h and exchanged rclex.l by
+ rclex.c.
+ * Makefile.in: Regenerate.
+ * rcparse.y: Renamed some structures.
+ Use in internal representation always bfd_vma instead of long or
+ int.
+ Removed from %union unused stringtable.
+ Added to %union suni structure for unicode strings.
+ Added new tokens for ANICURSOR, ANIICON, DLGINCLUDE,
+ DLGINIT, FONTDIR, HTML, MANIFEST, PLUGPLAY, VXD,
+ TOOLBAR, BUTTON, QUOTEDUNISTRING, and SIZEDUNISTRING.
+ Added support for these new rc file tokens.
+ * resbin.c: Rewrote using bfd and binary structures, and support
+ new resource types.
+ * rescoff.c: Likewise.
+ * resres.c: Likewise.
+ * resrc.c: Likewise. Dumps as RC are now recompilable.
+ * windres.c: As above. Using bfd for res and provide target
+ specific endianess support.
+ * windres.h: Use windint.h as include. Additionally removed K&R
+ syntax.
+ * winduni.c: New printing and unichar support routines.
+ * winduni.h: Prototypes for new unichar helpers.
+ * windint.h: New file.
-2006-03-20 Nathan Sidwell <nathan@codesourcery.com>
+2007-05-22 Paul Brook <paul@codesourcery.com>
- * BRANCHES: Remove binutils-csl-arm-2006q1-branch. Document
- binutils-csl-2_17-branch instead.
+ * objdump.c (find_symbol_for_address): Merge section and target
+ specific filtering code.
-2006-03-20 Paul Brook <paul@codesourcery.com>
+2007-05-22 Nick Clifton <nickc@redhat.com>
- * BRANCHES: Mention binutils-csl-arm-2006q1-branch.
+ * doc/binutils.texi: Use @copying around the copyright notice.
-2006-03-16 Alan Modra <amodra@bigpond.net.au>
+2007-05-21 Richard Sandiford <richard@codesourcery.com>
- PR 2434
- * ieee.c (write_ieee_debugging_info): Adjust bfd_hash_table_init calls.
- * wrstabs.c (write_stabs_in_sections_debugging_info): Likewise.
+ * objdump.c (disassemble_bytes): Ignore disassembler_needs_relocs
+ for executables and shared libraries.
-2006-03-13 Ben Elliston <bje@au.ibm.com>
+2007-05-18 Nathan Sidwell <nathan@codesourcery.com>
- * bucomm.c (display_target_list): Make local variable `a' to be of
- type enum bfd_architecture. Thus no need to cast enums to int.
- (display_info_table): Likewise.
+ * objcopy.c (strip_main): Detect identical input and output file
+ names.
+ (copy_main): Refactor tempname detection and use.
-2006-03-10 Paul Brook <paul@codesourcery.com>
+2007-05-17 Nick Clifton <nickc@redhat.com>
- * readelf.c (decode_ARM_machine_flags): Handle EABIv5.
+ * objdump.c (load_debug_section): Select bias for DWARF debug
+ addresses based on the flavour of the bfd.
-2006-03-10 Alan Modra <amodra@bigpond.net.au>
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
- * dwarf.c (process_extended_line_op): Remove pointer_size param.
- Use length instead to determine address size.
- (get_pointer_size_and_offset_of_comp_unit): Delete.
- (display_debug_lines): Adjust for above.
- (display_debug_aranges): Don't stop on finding two zeros.
- (display_debug_frames): For warning, print offset not pointer.
+ PR 4479
+ * objcopy.c (copy_object): Don't copy ELF program headers for
+ --only-keep-debug.
-2006-03-09 Danny Smith <dannysmith@users.sourceforge.net>
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
- * dlltool.c: Update copyright year.
- * doc/binutils.texi: Likewise.
+ * embedspu.sh (find_prog): Prefer prog in same dir as embedspu
+ over one found on the users path.
+ (main): Generate .reloc for each R_SPU_PPU* reloc.
-2006-03-09 Danny Smith <dannysmith@users.sourceforge.net>
+2007-04-28 Alan Modra <amodra@bigpond.net.au>
- * dlltool.c (add_stdcall_underscore): New flag.
- (xlate): Also add underscore to stdcall symbol if
- add_stdcall_underscore set.
- (usage): Document --add-stdcall-underscore option.
- (OPTION_ADD_STDCALL_UNDERSCORE): New define.
- (long_options): Use it for --add-stdcall-underscore option.
- (main): Handle it.
- * doc/binutils.texi: Document --add-stdcall-underscore option
- and differentiate from --add-underscore.
+ * prdbg.c (tg_variable): Adjust for changed demangler.
+ (tg_start_function): Likewise.
-2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
+2007-04-27 Alan Modra <amodra@bigpond.net.au>
- * readelf.c (get_machine_flags): Adjust.
+ * bucumm.h: Split off host dependencies to..
+ * sysdep.h: ..here.
+ Many files: Include sysdep.h. Remove duplicate headers and reorder.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
-2006-03-03 Jakub Jelinek <jakub@redhat.com>
+2007-04-24 Nick Clifton <nickc@redhat.com>
- * dwarf.c (frame_display_row, display_debug_frames): Handle
- DW_CFA_val_offset, DW_CFA_val_offset_sf and DW_CFA_val_expression.
+ * srconv.c (walk_tree_type_1): Initialise dpt.dunno.
-2006-02-28 Nick Clifton <nickc@redhat.com>
+2007-04-24 Nathan Froyd <froydnj@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
- * objcopy.c (use_alt_mach_code): Change type to unsigned long.
- (copy_object): If bfd_alt_mach_code fails emit a more helpful
- message and if the target architecture is ELF use the alternative
- as replacement value for the e_machine number.
- (copy_main): Use strtoul to parse the number provided with the
- --alt-mach-code switch.
- * doc/binutils.texi (--alt-mach-code): Document that this switch
- can now set the absolute e_machine value.
+ * objcopy.c (filter_symbols): Explicitly stripping a symbol
+ used in relocations is an error.
+ Retype 'keep' to bfd_boolean.
-2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+2007-04-24 Alan Modra <amodra@bigpond.net.au>
- * po/Make-in: Add html target.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
-2006-02-17 Nick Hudson <nick.hudson@dsl.pipex.com>
+2007-04-20 Nathan Froyd <froydnj@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+ Thomas de Lellis <tdel@windriver.com>
- * readelf.c (get_machine_flags): Add logic for missing EF_SH flags.
+ * objcopy.c (reverse_bytes): New variable.
+ (command_line_switch, copy_main): Add OPTION_REVERSE_ENDIAN.
+ (copy_options, copy_usage): Add "reverse-bytes" entry.
+ (copy_section): Reverse bytes within output sections.
+ * doc/binutils.texi: Document new objcopy option.
-2006-02-14 Jakub Jelinek <jakub@redhat.com>
+2007-04-20 Nick Clifton <nickc@redhat.com>
- * config.in: Rebuilt.
+ * rclex.l: Allow underscores at the start of identifiers.
-2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
+2007-04-19 Alan Modra <amodra@bigpond.net.au>
- PR binutils/2258
- * readelf.c (process_program_headers): Use
- ELF_IS_SECTION_IN_SEGMENT_MEMORY.
+ * budemang.c: Delete.
+ * budemang.h: Delete.
+ * addr2line.c (translate_addresses): Call bfd_demangle rather than
+ demangle.
+ * nm.c (print_symname): Likewise.
+ * objdump.c (objdump_print_symname, dump_symbols): Likewise.
+ (dump_bfd): Likewise.
+ * prdbg.c (struct pr_handle <demangler>): Add int param.
+ (tg_variable, tg_start_function): Adjust demangler calls.
+ * Makefile.am: Remove mention of budemang.[ch]. Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
-2006-02-09 Eric Botcazou <ebotcazou@libertysurf.fr>
+2007-04-14 Steve Ellcey <sje@cup.hp.com>
- * configure.in (CHECK_DECLS): Add snprintf and vsnprintf.
+ * Makefile.am: Add ACLOCAL_AMFLAGS.
+ * configure.in: Change macro call order.
+ * Makefile.in: Regenerate.
* configure: Regenerate.
- * objdump.c (fprintf): Remove declaration.
- * bucomm.h (fprintf): Declare if not already declared.
- (snprintf): Likewise.
- (vsnprintf): Likewise.
-2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
+2007-04-13 Nathan Sidwell <nathan@codesourcery.com>
+
+ * Makefile.am (TOOL_PROGS): Add objcopy.
+ * Makefile.in: Rebuilt.
+
+2007-04-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/4348
+ * objcopy.c (copy_object): Don't stop when there are no
+ sections to be copied.
+
+2007-04-10 Vladimir Prus <vladimir@codesourcery.com>
+
+ * NEWS: Mention disjoint histograms support in
+ gprof.
+
+2007-04-09 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * dwarf.c (process_debug_info): Do not require DW_AT_frame_base for
+ DW_TAG_inlined_subroutine.
+
+2007-04-06 Matt Thomas <matt@netbsd.org>
+
+ * MAINTAINERS: Add myself as VAX and NetBSD support maintainer.
+
+2007-04-05 Alan Modra <amodra@bigpond.net.au>
+
+ PR binutils/4292
+ * nm.c (print_value): Cast bfd_vma to unsigned long to suit
+ value_format_32bit.
+
+2007-04-02 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/4292
+ * nm.c (value_format): Replace with value_format_32bit and
+ value_format_64bit.
+ (set_radix): Update setting of value_format.
+ (set_print_width): New function. Compute the address size of a
+ given bfd and set the print_width global appropriately.
+ (display_archive): Use set_print_width.
+ (display_file): Likewise,
+ (print_object_filename_sysv): Update use of print_width.
+ (print_archive_member_sysv): Likewise.
+ (print_symbol_filename_posix): Likewise.
+ (print_sumbol_info_bfd, print_symbol_info_sysv): Likewise.
+
+2007-03-28 Richard Sandiford <richard@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * doc/binutils.texi: Put the contents after the title page rather
+ than at the end of the document.
+
+2007-03-28 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (slurp_rela_relocs): Add newline to end of error
+ messages.
+ (slurp_rel_relocs, request_dump, request_dump_byname,
+ process_program_headers, process_dynamic_section,
+ process_symbol_table, process_mips_specific, main): Likewise.
+
+2007-03-28 Alan Modra <amodra@bigpond.net.au>
+
+ * MAINTAINERS: Update mailing list addresses. Add myself
+ as PPC maintainer.
+
+2007-03-27 Alan Modra <amodra@bigpond.net.au>
+
+ * embedspu.sh: Correct toe_addr quoting.
+
+2007-03-27 Alan Modra <amodra@bigpond.net.au>
+
+ * embedspu.sh: Combine "_EAR_" and "_EAR_*" patterns. Tighten
+ .toe section and .toe address checks. Use .reloc for _EAR*
+ symbols defined in non-BSS sections. Build table for _SPUEAR_
+ symbols.
+
+2007-03-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
- * readelf.c (process_program_headers): Match PT_TLS segment
- only with SHT_TLS sections.
+ PR gas/3811
+ * readelf.c (debug_apply_rela_addends): Do nothing for SH.
-2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+2007-03-22 Joseph Myers <joseph@codesourcery.com>
- * readelf.c (get_machine_flags): Add logic for EF_M68K flags.
+ * doc/binutils.texi: Include VERSION_PACKAGE when reporting
+ version.
-2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
+2007-03-16 Kai Tietz <Kai.Tietz@onevision.com>
- * readelf.c (process_program_headers): Undo the last change.
+ * dlltool.c (make_one_lib_file): Use pc-relative relocation
+ instead of an absolute relocation for x86_64-pc-mingw32 target.
-2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
- * readelf.c (process_program_headers): Undo the change made on
- 2004-09-22. Match PT_DYNAMIC segment only with SHT_DYNAMIC
- sections.
+ * Makefile.am (REPORT_BUGS_TO): Removed.
+ (INCLUDES): Remove -DREPORT_BUGS_TO.
+ * Makefile.in: Regenerated.
-2006-01-30 Nick Clifton <nickc@redhat.com>
+ * bucomm.c: Don't include bfdver.h.
+ * objdump.c: Likewise.
+ * version.c: Likewise.
- * objcopy.c (copy_object): Catch the case where an attempt is made
- to add a section that already exists and produce a more helpful
- warning message.
+ * bucomm.h: Include bfdver.h.
-2006-01-26 Nick Clifton <nickc@redhat.com>
+ * configure.in (--with-bugurl): Removed.
+ * configure: Regenerated.
- * po/vi.po: New Vietnamese translation.
- * configure.in (ALL_LINGUAS): Add vi.
+ * doc/Makefile.am (binutils_TEXINFOS): Removed.
+ (AM_MAKEINFOFLAGS): Add -I ../../bfd/doc.
+ (TEXI2DVI): Likewise.
+ (config.texi): Removed.
+ (MOSTLYCLEANFILES): Remove config.texi.
+ * doc/Makefile.in: Regenerated.
+
+ * doc/binutils.texi: Include bfdver.texi instead of
+ config.texi.
+
+2007-03-13 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (dump_section): Also test for SHT_REL sections when
+ producing the warning about unapplied relocs.
+
+2007-03-07 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in (REPORT_BUGS_TEXI): Define to Texinfo version of
+ bug-reporting URL.
+ * doc/Makefile.am (config.texi): Define BUGURL.
+ * doc/binutils.texi: Use BUGURL. Remove text about large files
+ and uuencoding.
+ * Makefile.in, configure, doc/Makefile.in: Regenerate.
+
+2007-03-01 Phil Edwards <phil@codesourcery.com>
+ Richard Sandiford <richard@codesourcery.com>
+
+ * NEWS: Mention addition of --extract-symbol.
+ * doc/binutils.texi: Document it.
+ * objcopy.c (extract_symbol): New variable.
+ (OPTION_EXTRACT_SYMBOLS): New command_line_switch.
+ (copy_options): Add an entry for --extract-symbol.
+ (copy_usage): Mention --extract-symbol.
+ (copy_object): Set the start address to zero for --extract-symbol.
+ Do not copy private BFD data in that case.
+ (setup_section): Set the size, LMA and VMA to zero for
+ --extract-symbol. Do not copy private BFD data in that case.
+ (copy_section): Do not copy section contents if --extract-symbol
+ is passed.
+ (copy_main): Set extract_symbol to TRUE if --extract-symbol
+ is passed.
+
+2007-03-01 Paul Brook <paul@codesourcery.com>
+
+ * MAINTAINERS: Update my entry.
+
+2007-03-01 Joseph Myers <joseph@codesourcery.com>
+
+ * version.c: Update copyright date.
+
+2007-03-01 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (install-exec-local): Depend on $(noinst_PROGRAMS).
+ Adjust $(EXEEXT) handling for $(RENAMED_PROGS).
+ * Makefile.in, doc/Makefile.in: Regenerate.
+
+2007-03-01 Alan Modra <amodra@bigpond.net.au>
+
+ * embedspu.sh: Set type and size of global program handle symbol.
+
+2007-02-28 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (PROGS): Delete.
+ (RENAMED_PROGS): Define. Extracted from..
+ (noinst_PROGRAMS): ..here. Add BUILD_MISC.
+ (install-exec-local): Adjust.
+ * Makefile.in: Regenerate.
+
+2007-02-28 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (PROGS): Add BUILD_INSTALL_MISC.
+ (bin_PROGRAMS): Replace BUILD_MISC with BUILD_INSTALL_MISC.
+ (EXTRA_PROGRAMS): Remove bin2c.
+ (bin2c$(EXEEXT_FOR_BUILD)): New rule.
+ (bin2c_SOURCES): Delete.
+ (DISTCLEANFILES): Remove sysinfo.
+ (MOSTLYCLEANFILES): Add sysinfo$(EXEEXT_FOR_BUILD) and
+ bin2c$(EXEEXT_FOR_BUILD).
+ * configure.in (BUILD_MISC): Add $(EXEEXT_FOR_BUILD) to bin2c.
+ Move embedspu to..
+ (BUILD_INSTALL_MISC): ..here.
+ * Makefile.in: Regenerate.
* configure: Regenerate.
-2006-01-18 Alexandre Oliva <aoliva@redhat.com>
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
- Introduce TLS descriptors for i386 and x86_64.
- * readelf.c (get_dynamic_type): Handle DT_TLSDESC_GOT and
- DT_TLSDESC_PLT.
+ * bin2c.c: New file.
+ * Makefile.am (EXTRA_PROGRAMS): Add bin2c.
+ (CFILES): Add bin2c.c.
+ (bin2c_SOURCES): Define.
+ (bin2c.o): Dependencies from "make dep-am".
+ * configure.in (BUILD_MISC): Add bin2c.
+ * version.c: Update year.
+ * po/POTFILES.in: Regenerate.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
-2006-01-18 Nick Clifton <nickc@redhat.com>
+2007-02-17 Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com
+ Joseph Myers <joseph@codesourcery.com>
- PR binutils/1391
- * objcopy.c (copy_object): For PE format targets set the VMA of a
- newly created gnu_debuglink section to a non-zero, aligned,
- contiguous value.
- * Makefile.am (objcopy.c): Add a dependency upon libbfd.h.
+ * configure.in (--with-bugurl): New option.
+ * configure: Regenerate.
+ * Makefile.am (REPORT_BUGS_TO): Define.
+ (INCLUDES): Define REPORT_BUGS_TO.
+ Regenerate dependencies.
* Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * bucomm.h: Remove include of bin-bugs.h.
+ * addr2line.c (usage): Don't print empty REPORT_BUGS_TO.
+ * ar.c (usage): Pass s to list_supported_targets. Don't print
+ empty REPORT_BUGS_TO.
+ * coffdump.c (show_usage): Don't print empty REPORT_BUGS_TO.
+ * cxxfilt.c (usage): Print bug url when giving help.
+ * dlltool.c (usage): Likewise.
+ * dllwrap.c (usage): Likewise.
+ * nlmconv.c (show_usage): Don't print empty REPORT_BUGS_TO.
+ * nm.c (usage): Likewise.
+ * objcopy.c (copy_usage, strip_usage): Likewise.
+ * objdump.c (usage): Likewise.
+ * readelf.c ((usage): Likewise. Add STREAM argument. Adjust
+ callers.
+ * size.c (usage): Don't print empty REPORT_BUGS_TO.
+ * srconv.c (show_usage): Likewise.
+ * strings.c (usage): Likewise.
+ * sysdymp.c (show_usage): Likewise.
+ * windres.c (usage): Likewise.
+
+2007-02-13 Alan Modra <amodra@bigpond.net.au>
+
+ * embedspu.sh: Add -W to readelf invocation.
+
+2007-02-06 Dave Brolley <brolley@redhat.com>
+
+ * MAINTAINERS: Add myself as the maintainer of the MeP port.
+
+2007-02-06 Nick Clifton <nickc@redhat.com>
-2006-01-17 Andreas Schwab <schwab@suse.de>
+ PR gas/3800
+ * readelf.c: Include elf/h8.h twice. The first time in order to
+ get the reloc numbers, the second time in order to get the reloc
+ decoder function.
+ (dump_section): Tell the user if the section being displayed has
+ unprocessed relocs associated with it.
+ (get_reloc_size): New function - returns the size of a reloc.
+ (debug_apply_rela_addends): Use get_reloc_size().
+ * dwarf.c (read_and_display_attr_value): Extend number of
+ languages known for the DW_AT_language attribute.
+ (process_debug_info): Display the attribute offset before decoding
+ the attribute, in case there are problems.
- PR binutils/1486
- * configure.in: Don't define DISASSEMBLER_NEEDS_RELOCS.
+2007-02-05 Dave Brolley <brolley@redhat.com>
+
+ * readelf.c (dump_relocations): Don't check for
+ (rtype == NULL && type == R_RELC).
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+
+ * Makefile.am (readelf.o): Depends on $(INCDIR)/elf/mep.h.
+ * Makefile.in: Regenerated.
+ * Contribute the following changes:
+ 2003-10-29 Dave Brolley <brolley@redhat.com>
+
+ * configure.in: Define SKIP_ZEROES and SKIP_ZEROES_AT_END for mep.
+ * configure: Regenerated.
+
+ 2001-04-03 Ben Elliston <bje@redhat.com>
+
+ * readelf.c: Include "elf/mep.h".
+ (guess_is_rela): Handle EM_CYGNUS_MEP.
+ (get_machine_name): Ditto.
+ (dump_relocations): Ditto.
+
+2007-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * MAINTAINERS: Add a space between H.J. and Lu.
+
+2007-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * doc/binutils.texi (objdump): Document the new addr64 option
+ for i386 disassembler.
+
+2007-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3945
+ * configure.in (DLLTOOL_DEFAULT): New. Defined for the first PE
+ target.
+ (DLLTOOL_DEFS): Add $DLLTOOL_DEFAULT.
+ * configure: Regenerated.
+
+ * dlltool.c (mname): Defined with DLLTOOL_DEFAULT_XXX.
+
+2007-02-02 Nick Clifton <nickc@redhat.com>
+
+ * doc/binutils.texi (objdump): Document support for disassembling
+ the 440 PowerPC architecture.
+
+2007-01-31 Nathan Sidwell <nathan@codesourcery.com>
+
+ * dwarf.c (process_debug_info): Protect against bogus length and
+ abbrev offsets.
+
+2007-01-25 Kazu Hirata <kazu@codesourcery.com>
+
+ * ar.c (print_contents, extract_file): Cast the return value
+ of fwrite to size_t.
+
+2007-01-12 Alan Modra <amodra@bigpond.net.au>
+
+ * ar.c (open_inarch): Check fwrite return. Use size_t.
+ (extract_file): Likewise. Remove test for "negative" file size.
+ * readelf.c (process_program_headers): Check fscanf return.
+
+2007-01-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bucomm.c (template_in_dir): Fix typo.
+
+2007-01-11 Alan Modra <amodra@bigpond.net.au>
+
+ * embedspu.sh: New file.
+ * Makefile.am (embedspu): Add rule.
+ * configure.in (BUILD_MISC): Add embedspu for powerpc-linux.
+ * Makefile.in: Regenerate.
* configure: Regenerate.
- * objdump.c (struct objdump_disasm_info): Don't check for
- DISASSEMBLER_NEEDS_RELOCS.
- (objdump_print_addr): Likewise.
- (disassemble_bytes): Check disassembler_needs_relocs from
- disassemble_info at run-time instead of DISASSEMBLER_NEEDS_RELOCS
- at compile-time.
- (disassemble_section): Likewise.
- (disassemble_data): Initialize it.
-2006-01-11 Alan Modra <amodra@bigpond.net.au>
+2007-01-11 Alan Modra <amodra@bigpond.net.au>
+
+ * bucomm.h (make_tempdir): Declare independently of HAVE_MKDTEMP.
+ * bucomm.c (template_in_dir): New function, split out from..
+ (make_tempname): ..here. Open the file with O_EXCL if !HAVE_MKSTEMP.
+ (make_tempdir): Use template_in_dir. Handle directory creation
+ when !HAVE_MKDTEMP.
+ * objcopy.c (MKDIR): Don't define.
+ (copy_archive): Use make_tempdir when !HAVE_MKDTEMP too. Fix
+ error message.
+
+2007-01-08 Kazu Hirata <kazu@codesourcery.com>
+
+ * readelf.c (get_machine_flags): Treat Fido as an architecture
+ by itself.
- * objcopy.c (copy_object): Fix thinko.
+2007-01-08 Kai Tietz <kai.tietz@onevision.com>
- * objcopy.c (copy_object): Set isympp and osympp to NULL after free.
+ * configure.in: Renamed target x86_64-*-mingw64 to
+ x86_64-*-mingw*.
+ * configure: Regenerated.
-2006-01-09 Mike Frysinger <vapier@gentoo.org>:
+2007-01-05 Alan Modra <amodra@bigpond.net.au>
- * readelf.c (guess_is_rela): Add case for Nios/Nios II.
- (get_machine_name): Likewise.
+ * readelf.c (dump_section): Don't print 32-bit values, which
+ were done incorrectly for little-endian. Instead print bytes.
-For older changes see ChangeLog-2005
+For older changes see ChangeLog-2006
Local Variables:
mode: change-log
diff --git a/contrib/binutils/binutils/ChangeLog-2006 b/contrib/binutils/binutils/ChangeLog-2006
new file mode 100644
index 0000000..9961063
--- /dev/null
+++ b/contrib/binutils/binutils/ChangeLog-2006
@@ -0,0 +1,599 @@
+2006-12-25 Kazu Hirata <kazu@codesourcery.com>
+
+ * readelf.c (get_machine_flags): Handle EF_M68K_CPU32_FIDO_A.
+
+2006-12-11 J"orn Rennecke <joern.rennecke@arc.com>
+
+ MAINTAINERS (SH): Remove my entry.
+
+2006-12-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Define GENINSRC_NEVER.
+ * doc/Makefile.am (MAINTAINERCLEANFILES): Add info file.
+ (DISTCLEANFILES): Pretend to add info file.
+ * po/Make-in (.po.gmo): Put gmo files in objdir.
+ * configure, Makefile.in, doc/Makefile.in: Regenerated.
+
+2006-12-07 Kazu Hirata <kazu@codesourcery.com>
+
+ * readelf.c: Update uses of EF_M68K_*.
+
+2006-10-30 Paul Brook <paul@codesourcery.com>
+
+ * objdump.c (disassemble_section): Set info->symtab_pos.
+ (disassemble_data): Set info->symtab and info->symtab_size.
+
+2006-10-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3384
+ * configure.in (AC_CHECK_HEADERS): Add limits.h and sys/param.h.
+ * configure: Regenerated.
+ * config.in: Likewise.
+
+ * readelf.c: Include <limits.h> and <sys/param.h> for PATH_MAX.
+ (program_interpreter): Allocate PATH_MAX bytes instead of 64.
+ (process_program_headers): Don't assume that program interpreter
+ is shorter than 64 characters.
+
+2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c: Add SPU support.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2006-10-13 Robert Connolly <robert@linuxfromscratch.org>
+
+ PR binutils/2876
+ * configure.in: Check for the mkstemp and mkdtemp functions.
+ * configure: Regenerate.
+ * config.in (HAVE_MKDTEMP): New potential define.
+ (MAKE_MKSTEMP): Likewise.
+ * bucomm.c (make_tempname): Use mkstemp if it is available.
+ (make_tempdir): New function: Create a temporary directory using
+ mkdtemp, if it is available.
+ * bucomm.h (make_tempdir): New prototype.
+ * objcopy.c (copy_archive): Use make_tempdir if it is available.
+ (strip_main): Produce an warning message if a temporary file could
+ not be created.
+ (copy_main): Likewise.
+ * ar.c (write_archive): Likewise.
+
+2006-10-10 Andreas Schwab <schwab@suse.de>
+
+ * dwarf.c (display_debug_loc): Don't dereference loc_offsets when
+ there are no location lists.
+ (display_debug_ranges): Similar for range_lists.
+
+2006-10-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (debug_apply_rela_addends): Don't ignore relocation
+ against symbols without type.
+
+2006-09-25 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * nlmconv.c (main) : Use LITMEMCPY.
+ * prdbg.c (tg_class_static_member) : Use LITSTRCPY.
+
+2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3257
+ * strings.c (main): Handle "-T format".
+
+2006-09-26 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add Mei Ligang as maintainer of the Score port.
+
+2006-09-26 Thiemo Seufer <ths@networkno.de>
+
+ * configure.in: Remove broken changequote lines.
+
+2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
+
+ * configure.in: Add new target x86_64-pc-mingw64.
+ * configure: Regenerate.
+ * dlltool.c: Adjust include for this target.
+ (DLLTOOL_MX86_64): Added macro to handle target specific code.
+ (mname): Added default target static as "i386:x86-64".
+ (MX86): Added macro for target ident.
+ (mtable): Added target specific definitions.
+ (rvaafter): Add handling of MX86.
+ (rvabefore): Add handling of MX86.
+ (asmprefix): Add handling of MX86.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * readelf.c: Add support for Score binaries.
+ * Makefile.am: Update readelf's dependencies.
+ * Makefile.in: Regenerate.
+
+2006-09-16 Nick Clifton <nickc@redhat.com>
+ Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * ar.c: Make use of new STRING_COMMA_LEN and CONST_STRNEQ
+ macros defined in bfd.h.
+ * dlltool.c: Likewise.
+ * emul_aix.c: Likewise.
+ * nlmconv.c: Likewise.
+ * objdump.c: Likewise.
+ * prdbg.c: Likewise.
+ * stabs.c: Likewise.
+ * readelf.c (const_strneq): New macro.
+ (process_section_headers, slurp_ia64_unwind_table,
+ slurp_hppa_unwind_table, display_debug_section, process_notes,
+ process_archive): Use the new macro.
+
+2006-09-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3181
+ * objcopy.c (group_signature): Return proper group signature.
+
+2006-09-14 Alan Modra <amodra@bigpond.net.au>
+
+ PR 3181
+ * objcopy.c (group_signature): New function, split out from..
+ (setup_section): ..here.
+ (is_strip_section): Return true for SHT_GROUP sections that are
+ going to lose their group signature symbol.
+
+2006-09-14 Alan Modra <amodra@bigpond.net.au>
+
+ PR 3181
+ * objcopy.c (copy_object): Load symbols earlier.
+ (setup_section): Mark group signature symbols with BSF_KEEP.
+
+2006-09-09 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/3110
+ * objcopy.c (copy_archive): Add new parameter:
+ force_output_target. If not true, then perserve the file formats
+ of each copied archive element, otherwise force them to be one
+ specific file format.
+ (copy_file): Compute force_output_target parameter to pass to
+ copy_archive.
+
+2006-09-05 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/3166
+ * objcopy.c (is_strip_section): Do not treat group sections as
+ debugging sections.
+ * doc/binutils.texi (--only-keep-debug): Document that this switch
+ is only intended for use on fully linked files.
+
+2006-09-01 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/3146
+ * readelf.c (dump_relocations): Check for a NULL value in rtype
+ before using it.
+
+2006-08-21 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * configure.in: Split arm-pe and arm-wince-pe. Build dlltool
+ with -DDLLTOOL_ARM_WINCE for Windows CE case.
+ * configure: Regenerate.
+ * dlltool.c: Add support for arm-wince.
+
+2006-08-15 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/3039
+ * wrstabs.c (stab_tag_type): Initialize 'size'.
+
+2006-08-10 J"orn Rennecke <joern.rennecke@st.com>
+
+ PR binutils/3017
+ * doc/Makefile.am: Use single quotes inside backquotes for
+ date command while generating config.texi.
+ * doc/Makefile.in: Regenerate.
+
+2006-08-08 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/2768
+ * dwarf.c (display_debug_aranges): When the address size is
+ greater than 4 display addresses and lengths as 16 hex digits,
+ otherwise use 8 hex digits.
+
+2006-08-06 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/3001
+ * addr2line.c (process_file): Change function from void to
+ returning an int. Return 0 upon success, 1 otherwise.
+ (main): Use return value from process_file as the exit value.
+ * ar.c (ranlib_only): Change function from void to returning an
+ int. Return 0 upon success, 1 otherwise.
+ (ranlib_touch): Likewise.
+ (main): Use return value from ranlib functions as exit value.
+ * objcopy.c (add_specific_symbol): Set status to 1 if get_file_size
+ fails.
+ (copy_file): Likewise.
+ (strip_main): Likewise.
+ (copy_main): Likewise.
+ * objdump.c (display_file): Set exit_status to 1 if get_file_size
+ fails.
+ * size.c (display_file): Set return_code to 1 if get_file_size
+ fails.
+
+2006-08-02 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * readelf.c (dump_relocations): Handle MIPS-specific
+ SHN_MIPS_SCOMMON and SHN_MIPS_SUNDEFINED.
+ (get_symbol_index_type): Similarly.
+
+2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/binutils.texinfo: Fix spelling mistakes.
+
+2006-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_dynamic_type): Handle DT_GNU_HASH.
+ (get_section_type_name): Handle SHT_GNU_HASH.
+ (dynamic_info_DT_GNU_HASH): New variable.
+ (process_dynamic_section): Handle DT_GNU_HASH.
+ (process_symbol_table): Print also DT_GNU_HASH histogram.
+
+2006-07-06 Mohammed Adnène Trojette <adn@diwi.org>
+
+ PR binutils/2879
+ * doc/binutils.texi (Strings): Document -T shorthand for --target
+ switch.
+ * strings.c: Update comment to include -T option.
+
+ PR binutils/2875
+ * doc/binutils.texi (readelf): Fix spelling typo.
+
+2006-06-30 Nick Clifton <nickc@redhat.com>
+
+ * dwarf.c (display_debug_frames): Catch a corrupt length field
+ generating an end of block address that is beyond the end of the
+ section.
+ When encountering a corrupt CIE pointer do not reset the start
+ pointer as more data still has to be read.
+ Do not warn about user defined call frame instructions.
+
+2006-06-29 DJ Delorie <dj@redhat.com>
+
+ * readelf.c (process_section_headers): Add H8/300 support.
+
+2006-06-23 Richard Sandiford <richard@codesourcery.com>
+
+ * objcopy.c (localize_hidden): New variable.
+ (OPTION_LOCALIZE_HIDDEN): New command_line_switch value.
+ (copy_options): Add --localize-hidden.
+ (copy_usage): Mention --localize-hidden.
+ (is_hidden_symbol): New function.
+ (filter_symbols): Handle localize_hidden.
+ (copy_object): Call filter_symbols if localize_hidden.
+ (copy_main): Handle OPTION_LOCALIZE_HIDDEN.
+ * doc/binutils.texi (--localize-hidden): Document new option.
+
+2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (ar_DEPENDENCIES, ranlib_DEPENDENCIES)
+ (dlltool_DEPENDENCIES, windres_DEPENDENCIES): Remove @LEXLIB@.
+ * Makefile.in: Regenerate.
+
+2006-06-23 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (*_DEPENDENCIES): Add missing dependencies.
+ * Makefile.in: Regenerate.
+
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+
+ * po/Make-in (pdf, ps): New dummy targets.
+
+2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/Make-in (top_builddir): Define.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * config.in: Regenerate.
+
+2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
+
+ * doc/Makefile.am (TEXI2DVI): Define.
+ * doc/Makefile.in: Regenerate.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am: Replace INTLLIBS with LIBINTL everywhere. Add
+ DEPENDENCIES variables for every program.
+ (INTLLIBS): Remove.
+ (INCLUDES): Use @INCINTL@.
+ * acinclude.m4: Include new gettext macros.
+ * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
+ Remove local code for po/Makefile.
+ * Makefile.in, configure, doc/Makefile.in: Regenerated.
+
+2006-05-30 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2006-05-25 J"orn Rennecke <joern.rennecke@st.com>
+
+ * MAINTAINERS: Update my email address.
+
+2006-05-24 Nick Clifton <nickc@redhat.com>
+
+ * po/fr.po: Updated French translation.
+
+2006-05-23 Nick Clifton <nickc@redhat.com>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/ru.po: Updated translation.
+
+2006-05-19 Andreas Schwab <schwab@suse.de>
+
+ * doc/Makefile.am (addr2line.1): Depend on $(binutils_TEXINFOS).
+ (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/Makefile.in: Regenerated.
+
+2006-05-17 Carlos O'Donell <carlos@codesourcery.com>
+
+ * doc/binutils.texi: Use "Binutils Index" for index name.
+
+2006-05-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * dwarf.c (display_debug_frames): Don't return on ZERO
+ terminator.
+
+2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * doc/Makefile.am (AM_MAKEINFOFLAGS): New.
+ (TEXI2POD): Use AM_MAKEINFOFLAGS.
+ (config.texi): Don't set top_srcdir.
+ * doc/binutils.texi: Don't use top_srcdir.
+ * aclocal.m4, Makefile.in, doc/Makefile.in: Regenerated.
+
+2006-04-26 Julian Brown <julian@codesourcery.com>
+
+ * readelf.c (arm_attr_tag_VFP_arch): Add VFPv3.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * configure: Regenerate.
+
+2006-04-18 Nick Clifton <nickc@redhat.com>
+
+ PR 2257
+ * readelf.c (SECTION_NAME): Cope with a missing string table.
+ (process_file_header): Cope with a corrupt e_shstrndx field.
+ (process_section_headers): Correctly handle an e_shstrndx value of
+ SHF_UNDEF.
+
+2006-04-12 Nick Clifton <nickc@redhat.com>
+
+ * objdump.c (objdump_symbol_at_address): Fix typo in comment.
+
+2006-04-10 Ben Elliston <bje@gnu.org>
+
+ * MAINTAINERS (CGEN Maintainers): Remove myself.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * po/Make-in: Add install-html target.
+ * Makefile.am: Add install-html and install-html-recursive targets.
+ * Makefile.in: Regenerate.
+ * configure.in: AC_SUBST datarootdir, docdir and htmldir.
+ * configure: Regenerate.
+ * doc/Makefile.am: Add install-html and install-html-am targets.
+ * doc/Makefile.in: Regenerate.
+
+2006-04-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * addr2line.c (long_options): Add new option 'section'.
+ (usage): Document new -j/--section option.
+ (find_offset_in_section): New function.
+ (translate_addresses): Add 'section' parameter.
+ If it is non-null, call find_offset_in_section on it.
+ (process_file): Add 'section_name' parameter.
+ If it is non-null, look for the section in the BFD object.
+ Pass the section to translate_addresses.
+ (main): Handle new -j option.
+ Pass the section name to process_file.
+ * doc/binutils.texi (addr2line): Document new -j/--section option.
+
+2006-03-29 Ben Elliston <bje@au.ibm.com>
+
+ * resbin.c: Avoid duplicating constants in calls to reswr_alloc.
+
+2006-03-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * BRANCHES: Remove binutils-csl-arm-2006q1-branch. Document
+ binutils-csl-2_17-branch instead.
+
+2006-03-20 Paul Brook <paul@codesourcery.com>
+
+ * BRANCHES: Mention binutils-csl-arm-2006q1-branch.
+
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2434
+ * ieee.c (write_ieee_debugging_info): Adjust bfd_hash_table_init calls.
+ * wrstabs.c (write_stabs_in_sections_debugging_info): Likewise.
+
+2006-03-13 Ben Elliston <bje@au.ibm.com>
+
+ * bucomm.c (display_target_list): Make local variable `a' to be of
+ type enum bfd_architecture. Thus no need to cast enums to int.
+ (display_info_table): Likewise.
+
+2006-03-10 Paul Brook <paul@codesourcery.com>
+
+ * readelf.c (decode_ARM_machine_flags): Handle EABIv5.
+
+2006-03-10 Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf.c (process_extended_line_op): Remove pointer_size param.
+ Use length instead to determine address size.
+ (get_pointer_size_and_offset_of_comp_unit): Delete.
+ (display_debug_lines): Adjust for above.
+ (display_debug_aranges): Don't stop on finding two zeros.
+ (display_debug_frames): For warning, print offset not pointer.
+
+2006-03-09 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * dlltool.c: Update copyright year.
+ * doc/binutils.texi: Likewise.
+
+2006-03-09 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * dlltool.c (add_stdcall_underscore): New flag.
+ (xlate): Also add underscore to stdcall symbol if
+ add_stdcall_underscore set.
+ (usage): Document --add-stdcall-underscore option.
+ (OPTION_ADD_STDCALL_UNDERSCORE): New define.
+ (long_options): Use it for --add-stdcall-underscore option.
+ (main): Handle it.
+ * doc/binutils.texi: Document --add-stdcall-underscore option
+ and differentiate from --add-underscore.
+
+2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * readelf.c (get_machine_flags): Adjust.
+
+2006-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf.c (frame_display_row, display_debug_frames): Handle
+ DW_CFA_val_offset, DW_CFA_val_offset_sf and DW_CFA_val_expression.
+
+2006-02-28 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (use_alt_mach_code): Change type to unsigned long.
+ (copy_object): If bfd_alt_mach_code fails emit a more helpful
+ message and if the target architecture is ELF use the alternative
+ as replacement value for the e_machine number.
+ (copy_main): Use strtoul to parse the number provided with the
+ --alt-mach-code switch.
+ * doc/binutils.texi (--alt-mach-code): Document that this switch
+ can now set the absolute e_machine value.
+
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * po/Make-in: Add html target.
+
+2006-02-17 Nick Hudson <nick.hudson@dsl.pipex.com>
+
+ * readelf.c (get_machine_flags): Add logic for missing EF_SH flags.
+
+2006-02-14 Jakub Jelinek <jakub@redhat.com>
+
+ * config.in: Rebuilt.
+
+2006-02-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2258
+ * readelf.c (process_program_headers): Use
+ ELF_IS_SECTION_IN_SEGMENT_MEMORY.
+
+2006-02-09 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * configure.in (CHECK_DECLS): Add snprintf and vsnprintf.
+ * configure: Regenerate.
+ * objdump.c (fprintf): Remove declaration.
+ * bucomm.h (fprintf): Declare if not already declared.
+ (snprintf): Likewise.
+ (vsnprintf): Likewise.
+
+2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (process_program_headers): Match PT_TLS segment
+ only with SHT_TLS sections.
+
+2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * readelf.c (get_machine_flags): Add logic for EF_M68K flags.
+
+2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (process_program_headers): Undo the last change.
+
+2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * readelf.c (process_program_headers): Undo the change made on
+ 2004-09-22. Match PT_DYNAMIC segment only with SHT_DYNAMIC
+ sections.
+
+2006-01-30 Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (copy_object): Catch the case where an attempt is made
+ to add a section that already exists and produce a more helpful
+ warning message.
+
+2006-01-26 Nick Clifton <nickc@redhat.com>
+
+ * po/vi.po: New Vietnamese translation.
+ * configure.in (ALL_LINGUAS): Add vi.
+ * configure: Regenerate.
+
+2006-01-18 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce TLS descriptors for i386 and x86_64.
+ * readelf.c (get_dynamic_type): Handle DT_TLSDESC_GOT and
+ DT_TLSDESC_PLT.
+
+2006-01-18 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/1391
+ * objcopy.c (copy_object): For PE format targets set the VMA of a
+ newly created gnu_debuglink section to a non-zero, aligned,
+ contiguous value.
+ * Makefile.am (objcopy.c): Add a dependency upon libbfd.h.
+ * Makefile.in: Regenerate.
+
+2006-01-17 Andreas Schwab <schwab@suse.de>
+
+ PR binutils/1486
+ * configure.in: Don't define DISASSEMBLER_NEEDS_RELOCS.
+ * configure: Regenerate.
+ * objdump.c (struct objdump_disasm_info): Don't check for
+ DISASSEMBLER_NEEDS_RELOCS.
+ (objdump_print_addr): Likewise.
+ (disassemble_bytes): Check disassembler_needs_relocs from
+ disassemble_info at run-time instead of DISASSEMBLER_NEEDS_RELOCS
+ at compile-time.
+ (disassemble_section): Likewise.
+ (disassemble_data): Initialize it.
+
+2006-01-11 Alan Modra <amodra@bigpond.net.au>
+
+ * objcopy.c (copy_object): Fix thinko.
+
+ * objcopy.c (copy_object): Set isympp and osympp to NULL after free.
+
+2006-01-09 Mike Frysinger <vapier@gentoo.org>:
+
+ * readelf.c (guess_is_rela): Add case for Nios/Nios II.
+ (get_machine_name): Likewise.
+
+For older changes see ChangeLog-2005
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/binutils/MAINTAINERS b/contrib/binutils/binutils/MAINTAINERS
index f5beb03..a3fdce3 100644
--- a/contrib/binutils/binutils/MAINTAINERS
+++ b/contrib/binutils/binutils/MAINTAINERS
@@ -5,7 +5,7 @@ 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
+GCC and GDB projects (include), so maintainership of those files is
shared amoungst the projects.
The home page for binutils is:
@@ -14,8 +14,8 @@ The home page for binutils is:
and patches should be sent to:
- bug-binutils@gnu.org or binutils@sources.redhat.com
-
+ binutils@sourceware.org
+
with "[Patch]" as part of the subject line. Note - patches to the
top level config.guess and config.sub scripts should be sent to:
@@ -25,13 +25,13 @@ and not to the binutils lists. Patches to the other top level
configure files (configure, configure.in, config-ml.in) should
be sent to the binutils lists, and copied to the gcc and gdb
lists as well (gcc-patches@gcc.gnu.org and
-gdb-patches@sources.redhat.com).
+gdb-patches@sourceware.org).
--------- Blanket Write Privs ---------
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 Lance Taylor <ian@airs.com>
@@ -58,7 +58,7 @@ responsibility among the other maintainers.
ALPHA Richard Henderson <rth@redhat.com>
ARM Nick Clifton <nickc@redhat.com>
ARM Richard Earnshaw <rearnsha@arm.com>
- ARM (Symbian) Paul Brook <paul@codesourcery.com>
+ ARM Paul Brook <paul@codesourcery.com>
ARM (Symbian) Mark Mitchell <mark@codesourcery.com>
AVR Denis Chertykov <denisc@overta.ru>
AVR Marek Michalkiewicz <marekm@amelek.gda.pl>
@@ -73,7 +73,7 @@ responsibility among the other maintainers.
FR30 Dave Brolley <brolley@redhat.com>
FRV Dave Brolley <brolley@redhat.com>
FRV Alexandre Oliva <aoliva@redhat.com>
- H8300 Anil Paranjpe <anilp1@kpitcummins.com>
+ H8300 Anil Paranjpe <anilp1@kpitcummins.com>
HPPA Dave Anglin <dave.anglin@nrc.ca>
HPPA elf32 Alan Modra <amodra@bigpond.net.au>
HPPA elf64 Jeff Law <law@redhat.com> [Basic maintainance only]
@@ -83,33 +83,36 @@ responsibility among the other maintainers.
ix86 Alan Modra <amodra@bigpond.net.au>
ix86 PE Christopher Faylor <cgf@redhat.com>
ix86 COFF DJ Delorie <dj@redhat.com>
- ix86 H.J.Lu <hjl@gnu.org>
+ ix86 H.J. Lu <hjl@gnu.org>
ix86 INTEL MODE Jan Beulich <jbeulich@novell.com>
M68HC11 M68HC12 Stephane Carrez <stcarrez@nerim.fr>
M68k Ben Elliston <bje@gnu.org>
M88k Mark Kettenis <kettenis@gnu.org>
MAXQ Inderpreet Singh <inderpreetb@noida.hcltech.com>
+ MEP Dave Brolley <brolley@redhat.com>
MIPS Eric Christopher <echristo@apple.com>
MIPS Thiemo Seufer <ths@networkno.de>
MMIX Hans-Peter Nilsson <hp@bitrange.com>
MN10300 Eric Christopher <echristo@apple.com>
MN10300 Alexandre Oliva <aoliva@redhat.com>
MSP430 Dmitry Diky <diwil@spec.ru>
+ NetBSD support Matt Thomas <matt@netbsd.org>
PPC Geoff Keating <geoffk@geoffk.org>
+ PPC Alan Modra <amodra@bigpond.net.au>
PPC vector ext Aldy Hernandez <aldyh@redhat.com>
s390, s390x Martin Schwidefsky <schwidefsky@de.ibm.com>
- SH Jörn Rennecke <joern.rennecke@superh.com>
+ SCORE Mei Ligang <ligang@sunnorth.com.cn>
SH Alexandre Oliva <aoliva@redhat.com>
SH Kaz Kojima <kkojima@rr.iij4u.or.jp>
SPARC Jakub Jelinek <jakub@redhat.com>
TESTSUITES Ben Elliston <bje@gnu.org>
TIC4X Svein Seldal <svein@dev.seldal.com>
TIC54X Timothy Wall <twall@alum.mit.edu>
- VAX Jason R Thorpe <thorpej@netbsd.org>
+ VAX Matt Thomas <matt@netbsd.org>
VAX Jan-Benedict Glaw <jbglaw@lug-owl.de>
x86_64 Jan Hubicka <jh@suse.cz>
x86_64 Andreas Jaeger <aj@suse.de>
- x86_64 H.J.Lu <hjl@gnu.org>
+ x86_64 H.J. Lu <hjl@gnu.org>
Xtensa Bob Wilson <bob.wilson@acm.org>
z80 Arnold Metselaar <arnold.metselaar@planet.nl>
z8k Christian Groessler <chris@groessler.org>
@@ -121,11 +124,11 @@ 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.
+CGEN and the files that it creates.
If you have CGEN related problems you can send email to;
- cgen@sources.redhat.com
+ cgen@sourceware.org
The current CGEN maintainers are:
@@ -158,7 +161,7 @@ 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
+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:
@@ -194,7 +197,7 @@ to contributions on a branch.
Before creating the branch, you should select a name for the branch of
the form:
- binutils-<org>-<name>
+ binutils-<org>-<name>
where "org" is the initials of your organization, or your own initials
if you are acting as an individual. For example, for a branch created
@@ -238,7 +241,7 @@ Having selected the branch name, create the branch as follows:
3. Create the branch:
cvs rtag -b -r binutils-<org>-<name>-branchpoint \
- binutils-<org>-<name>-branch
+ binutils-<org>-<name>-branch
4. Document the branch:
diff --git a/contrib/binutils/binutils/Makefile.am b/contrib/binutils/binutils/Makefile.am
index 1b4e85a..34c03ce 100644
--- a/contrib/binutils/binutils/Makefile.am
+++ b/contrib/binutils/binutils/Makefile.am
@@ -1,9 +1,7 @@
## Process this file with automake to generate Makefile.in
-## FIXME: Work around apparent bug in automake.
-INTLLIBS = @INTLLIBS@
-
AUTOMAKE_OPTIONS = cygnus dejagnu
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = doc po
@@ -22,6 +20,7 @@ LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS)
+LIBICONV = @LIBICONV@
# these two are almost the same program
AR_PROG=ar
@@ -49,22 +48,22 @@ ADDR2LINE_PROG=addr2line
NLMCONV_PROG=nlmconv
DLLTOOL_PROG=dlltool
WINDRES_PROG=windres
+WINDMC_PROG=windmc
DLLWRAP_PROG=dllwrap
-SRCONV_PROG=srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
-
-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@
+SRCONV_PROG=srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
-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@
+bin_PROGRAMS = $(SIZE_PROG) $(OBJDUMP_PROG) $(AR_PROG) $(STRINGS_PROG) $(RANLIB_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ @BUILD_WINDMC@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_INSTALL_MISC@
## We need a special rule to install the programs which are built with
## -new, and to rename cxxfilt to c++filt.
-noinst_PROGRAMS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
+RENAMED_PROGS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
+noinst_PROGRAMS = $(RENAMED_PROGS) @BUILD_MISC@
-EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(DLLWRAP_PROG)
+EXTRA_PROGRAMS = $(NLMCONV_PROG) srconv sysdump coffdump $(DLLTOOL_PROG) $(WINDRES_PROG) $(WINDMC_PROG) $(DLLWRAP_PROG)
# Stuff that goes in tooldir/ if appropriate.
-TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump
+TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump objcopy
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
@@ -75,33 +74,35 @@ MKDEP = gcc -MM
INCLUDES = -D_GNU_SOURCE \
-I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
@HDEFINES@ \
- -I$(srcdir)/../intl -I../intl \
+ @INCINTL@ \
-DLOCALEDIR="\"$(datadir)/locale\"" \
-Dbin_dummy_emulation=$(EMULATION_VECTOR)
HFILES = \
- arsup.h binemul.h bucomm.h budbg.h budemang.h \
+ arsup.h binemul.h bucomm.h budbg.h \
coffgrok.h debug.h dlltool.h nlmconv.h \
- windres.h winduni.h
+ windres.h winduni.h windint.h \
+ windmc.h
-GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
+GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h mcparse.h
CFILES = \
- addr2line.c ar.c arsup.c binemul.c bucomm.c budemang.c \
+ addr2line.c ar.c arsup.c bin2c.c binemul.c bucomm.c \
coffdump.c coffgrok.c cxxfilt.c \
dwarf.c debug.c dlltool.c dllwrap.c \
emul_aix.c emul_vanilla.c filemode.c \
ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \
nlmconv.c nm.c not-ranlib.c not-strip.c \
objcopy.c objdump.c prdbg.c \
- rdcoff.c rddbg.c readelf.c rename.c \
+ rclex.c rdcoff.c rddbg.c readelf.c rename.c \
resbin.c rescoff.c resrc.c resres.c \
size.c srconv.c stabs.c strings.c sysdump.c version.c \
- windres.c winduni.c wrstabs.c
+ windres.c winduni.c wrstabs.c \
+ windmc.c mclex.c
GENERATED_CFILES = \
arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
- defparse.c deflex.c nlmheader.c rcparse.c rclex.c
+ defparse.c deflex.c nlmheader.c rcparse.c mcparse.c
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
@@ -117,8 +118,8 @@ LIBIBERTY = ../libiberty/libiberty.a
.PHONY: install-html install-html-am install-html-recursive
-install-html: install-html-recursive
-
+install-html: install-html-recursive
+
install-html-recursive:
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
@@ -182,7 +183,30 @@ check-DEJAGNU: site.exp
installcheck:
/bin/sh $(srcdir)/sanity.sh $(bindir)
-LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
+# There's no global DEPENDENCIES. So, we must explicitly list everything
+# which depends on libintl, since we don't know whether LIBINTL_DEP will be
+# non-empty until configure time. Ugh!
+size_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+objdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) $(OPCODES)
+nm_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+ar_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+strings_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+strip_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+ranlib_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+cxxfilt_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+objcopy_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+nlmconv_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+srconv_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+sysdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+coffdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+dlltool_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+windres_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+windmc_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+addr2line_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+readelf_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
+dllwrap_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
+
+LDADD = $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
size_SOURCES = size.c $(BULIBS)
@@ -191,14 +215,14 @@ objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
strings_SOURCES = strings.c $(BULIBS)
readelf_SOURCES = readelf.c version.c unwind-ia64.c dwarf.c
-readelf_LDADD = $(INTLLIBS) $(LIBIBERTY)
+readelf_LDADD = $(LIBINTL) $(LIBIBERTY)
strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
-nm_new_SOURCES = nm.c budemang.c $(BULIBS)
+nm_new_SOURCES = nm.c $(BULIBS)
-objdump_SOURCES = objdump.c dwarf.c budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
-objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
+objdump_SOURCES = objdump.c dwarf.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
+objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
objdump.o:objdump.c
$(COMPILE) -c $(OBJDUMP_DEFS) $(srcdir)/objdump.c
@@ -207,13 +231,13 @@ cxxfilt_SOURCES = cxxfilt.c $(BULIBS)
ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c binemul.c \
emul_$(EMULATION).c $(BULIBS)
-ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c \
binemul.c emul_$(EMULATION).c $(BULIBS)
-ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
-addr2line_SOURCES = addr2line.c budemang.c $(BULIBS)
+addr2line_SOURCES = addr2line.c $(BULIBS)
# The following is commented out for the conversion to automake.
# This rule creates a single binary that switches between ar and ranlib
@@ -233,7 +257,7 @@ addr2line_SOURCES = addr2line.c budemang.c $(BULIBS)
# -rm -f $(STRIP_PROG)
# -ln $(OBJCOPY_PROG) $(STRIP_PROG)
-sysroff.c: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
+sysroff.c: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
./sysinfo$(EXEEXT_FOR_BUILD) -c <$(srcdir)/sysroff.info >sysroff.c
./sysinfo$(EXEEXT_FOR_BUILD) -i <$(srcdir)/sysroff.info >>sysroff.c
./sysinfo$(EXEEXT_FOR_BUILD) -g <$(srcdir)/sysroff.info >>sysroff.c
@@ -258,15 +282,23 @@ sysinfo.o:
$(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS) $(srcdir)/sysinfo.c -Wno-error ; \
fi
+bin2c$(EXEEXT_FOR_BUILD):
+ $(CC_FOR_BUILD) -o $@ $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) $(srcdir)/bin2c.c $(srcdir)/version.c
+
+embedspu: embedspu.sh
+ sed "s@^program_transform_name=@program_transform_name=$(program_transform_name)@" < $< > $@
+ chmod a+x $@
+
# We need these for parallel make.
arparse.h: arparse.c
defparse.h: defparse.c
nlmheader.h: nlmheader.c
rcparse.h: rcparse.c
+mcparse.h: mcparse.c
sysinfo.h: sysinfo.c
# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
+# yacc will produce working code which contain compile time warnings.
arparse.o:
$(COMPILE) -c $< $(NO_WERROR)
arlex.o:
@@ -281,13 +313,17 @@ nlmheader.o:
$(COMPILE) -c $< $(NO_WERROR)
rcparse.o:
$(COMPILE) -c $< $(NO_WERROR)
+mcparse.o:
+ $(COMPILE) -c $< $(NO_WERROR)
rclex.o:
$(COMPILE) -c $< $(NO_WERROR)
+mclex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
-dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
dlltool.o:
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
@@ -307,22 +343,26 @@ nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
-windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
+windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.c \
winduni.c resres.c $(BULIBS)
-windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) $(LIBICONV)
+
+windmc_SOURCES = windmc.c mcparse.y mclex.c \
+ winduni.c $(BULIBS)
+windmc_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) $(LIBICONV)
dllwrap_SOURCES = dllwrap.c version.c
-dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
+dllwrap_LDADD = $(LIBIBERTY) $(LIBINTL)
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
+ syslex.c deflex.c defparse.h defparse.c rcparse.h rcparse.c \
+ mcparse.h mcparse.c
diststuff: $(EXTRA_DIST) info
all: info
-DISTCLEANFILES = sysinfo sysroff.c sysroff.h \
- site.exp site.bak
+DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
@@ -371,7 +411,8 @@ dep-am: DEP
###
-MOSTLYCLEANFILES = sysinfo binutils.log binutils.sum abcdefgh*
+MOSTLYCLEANFILES = sysinfo$(EXEEXT_FOR_BUILD) bin2c$(EXEEXT_FOR_BUILD) \
+ binutils.log binutils.sum abcdefgh*
mostlyclean-local:
-rm -rf tmpdir
@@ -380,10 +421,10 @@ CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
.PHONY: install-exec-local
install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ @list='$(RENAMED_PROGS)'; for p in $$list; do \
+ if test -f $$p$(EXEEXT); then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p$(EXEEXT) $(bindir)/`echo $$p|sed -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p$(EXEEXT) $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
$(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
@@ -404,208 +445,250 @@ 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 config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h bucomm.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h budemang.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 $(INCDIR)/hashtab.h \
- arsup.h $(INCDIR)/filenames.h binemul.h
-arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h arsup.h $(INCDIR)/libiberty.h bucomm.h \
- config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/filenames.h
-binemul.o: binemul.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
-bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/libiberty.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/filenames.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
-budemang.o: budemang.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
- budemang.h
-coffdump.o: coffdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h coffgrok.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
-coffgrok.o: coffgrok.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h coffgrok.h
-cxxfilt.o: cxxfilt.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h $(INCDIR)/safe-ctype.h
-dwarf.o: dwarf.c dwarf.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/elf/dwarf2.h bucomm.h \
- config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h
-debug.o: debug.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
-dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.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
-dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
-emul_aix.o: emul_aix.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/xcoff.h $(BFDDIR)/libcoff.h $(BFDDIR)/libxcoff.h
-emul_vanilla.o: emul_vanilla.c binemul.h ../bfd/bfd.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
-filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.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
+addr2line.o: addr2line.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
+ bucomm.h
+ar.o: ar.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/progress.h $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h \
+ $(INCDIR)/hashtab.h bucomm.h arsup.h $(INCDIR)/filenames.h \
+ binemul.h
+arsup.o: arsup.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h bucomm.h arsup.h
+bin2c.o: bin2c.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h
+binemul.o: binemul.c binemul.h sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h
+bucomm.o: bucomm.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h \
+ bucomm.h
+coffdump.o: coffdump.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h bucomm.h coffgrok.h
+coffgrok.o: coffgrok.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h bucomm.h coffgrok.h
+cxxfilt.o: cxxfilt.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h bucomm.h
+dwarf.o: dwarf.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/elf/dwarf2.h \
+ dwarf.h
+debug.o: debug.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ debug.h
+dlltool.o: dlltool.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dyn-string.h bucomm.h dlltool.h $(INCDIR)/safe-ctype.h
+dllwrap.o: dllwrap.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dyn-string.h bucomm.h
+emul_aix.o: emul_aix.c binemul.h sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(BFDDIR)/libxcoff.h
+emul_vanilla.o: emul_vanilla.c binemul.h sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h
+filemode.o: filemode.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h
+ieee.o: ieee.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/ieee.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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)/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 budemang.h $(INCDIR)/aout/stab_gnu.h \
+nlmconv.o: nlmconv.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h $(BFDDIR)/libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
+ nlmconv.h bucomm.h
+nm.o: nm.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/progress.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h \
- $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/common.h \
+ bucomm.h
not-ranlib.o: not-ranlib.c
not-strip.o: not-strip.c
-objcopy.o: objcopy.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)/libiberty.h \
+objcopy.o: objcopy.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/progress.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h bucomm.h \
budbg.h $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(BFDDIR)/libbfd.h
-objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/progress.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- dwarf.h $(INCDIR)/elf/dwarf2.h budemang.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 \
+ $(INCDIR)/bfdlink.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
+objdump.o: objdump.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/progress.h \
+ bucomm.h dwarf.h $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h \
+ ../bfd/bfd.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h
+prdbg.o: prdbg.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h debug.h \
budbg.h
-rdcoff.o: rdcoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h bucomm.h \
- config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h budbg.h $(BFDDIR)/libcoff.h \
+rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h windres.h $(INCDIR)/ansidecl.h \
+ winduni.h windint.h rcparse.h
+rdcoff.o: rdcoff.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h bucomm.h debug.h budbg.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
-rddbg.o: rddbg.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
-readelf.o: readelf.c dwarf.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/alpha.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h \
- $(INCDIR)/elf/avr.h $(INCDIR)/elf/bfin.h $(INCDIR)/elf/cris.h \
+rddbg.o: rddbg.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ bucomm.h debug.h budbg.h
+readelf.o: readelf.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h dwarf.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/alpha.h \
+ $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/avr.h \
+ $(INCDIR)/elf/bfin.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/crx.h \
$(INCDIR)/elf/d10v.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/dlx.h \
- $(INCDIR)/elf/fr30.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/h8.h \
- $(INCDIR)/elf/hppa.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/i370.h \
- $(INCDIR)/elf/i860.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/m32c.h $(INCDIR)/elf/m32r.h \
+ $(INCDIR)/elf/fr30.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/i386.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/i860.h \
+ $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/ip2k.h \
+ $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/m32c.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/m68k.h $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/mcore.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h \
- $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/mt.h $(INCDIR)/elf/msp430.h \
- $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/sparc.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h \
- $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/crx.h \
- $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/xtensa.h $(INCDIR)/aout/ar.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h unwind-ia64.h
-rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
-resbin.o: resbin.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 windres.h \
- winduni.h
-rescoff.o: rescoff.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 windres.h \
- winduni.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-resrc.o: resrc.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 $(INCDIR)/safe-ctype.h \
- windres.h winduni.h
-resres.o: resres.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 windres.h \
- winduni.h
-size.o: size.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
-srconv.o: srconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/libiberty.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- sysroff.c
-stabs.o: stabs.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 $(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 \
- $(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
-sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h \
- sysroff.h sysroff.c
-version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ../bfd/bfdver.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
-windres.o: windres.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.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
-wrstabs.o: wrstabs.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 $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/elf/mep.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h \
+ $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/mt.h \
+ $(INCDIR)/elf/msp430.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h \
+ $(INCDIR)/elf/ppc.h $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h \
+ $(INCDIR)/elf/score.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \
+ $(INCDIR)/elf/spu.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h \
+ $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/xtensa.h \
+ $(INCDIR)/aout/ar.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ unwind-ia64.h
+rename.o: rename.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h
+resbin.o: resbin.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ windres.h winduni.h windint.h
+rescoff.o: rescoff.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h windres.h winduni.h windint.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+resrc.o: resrc.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h windres.h winduni.h windint.h
+resres.o: resres.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ windres.h winduni.h windint.h
+size.o: size.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ bucomm.h
+srconv.o: srconv.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h sysroff.h coffgrok.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h sysroff.c
+stabs.o: stabs.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.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 sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h bucomm.h
+sysdump.o: sysdump.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h bucomm.h \
+ sysroff.h sysroff.c $(INCDIR)/ansidecl.h
+version.o: version.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h
+windres.o: windres.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
+ windres.h winduni.h windint.h
+winduni.o: winduni.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h bucomm.h winduni.h $(INCDIR)/safe-ctype.h
+wrstabs.o: wrstabs.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h bucomm.h \
debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def
-arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h arsup.h
+windmc.o: windmc.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h windmc.h \
+ winduni.h windint.h
+mclex.o: mclex.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h windmc.h winduni.h mcparse.h
+arparse.o: arparse.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h arsup.h
arlex.o: arlex.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- arparse.h
+ $(INCDIR)/ansidecl.h arparse.h
sysroff.o: sysroff.c
sysinfo.o: sysinfo.c
syslex.o: syslex.c config.h sysinfo.h
-defparse.o: defparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h dlltool.h
+defparse.o: defparse.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h dlltool.h
deflex.o: deflex.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- defparse.h dlltool.h
-nlmheader.o: nlmheader.c $(INCDIR)/ansidecl.h $(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 \
+ defparse.h dlltool.h $(INCDIR)/ansidecl.h
+nlmheader.o: nlmheader.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h bucomm.h \
nlmconv.h
-rcparse.o: rcparse.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 windres.h \
- winduni.h $(INCDIR)/safe-ctype.h
-rclex.o: rclex.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 $(INCDIR)/safe-ctype.h \
- windres.h winduni.h rcparse.h
+rcparse.o: rcparse.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h windres.h winduni.h windint.h \
+ $(INCDIR)/safe-ctype.h
+mcparse.o: mcparse.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h windmc.h winduni.h $(INCDIR)/safe-ctype.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 8b5ab82..9cf28fd 100644
--- a/contrib/binutils/binutils/Makefile.in
+++ b/contrib/binutils/binutils/Makefile.in
@@ -37,30 +37,40 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-bin_PROGRAMS = $(am__EXEEXT_5) $(am__EXEEXT_6) $(am__EXEEXT_7) \
- $(am__EXEEXT_8) $(am__EXEEXT_9) $(am__EXEEXT_10) \
+bin_PROGRAMS = $(am__EXEEXT_6) $(am__EXEEXT_7) $(am__EXEEXT_8) \
+ $(am__EXEEXT_9) $(am__EXEEXT_10) $(am__EXEEXT_11) \
@BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ \
- $(am__EXEEXT_11) $(am__EXEEXT_12) @BUILD_DLLWRAP@ @BUILD_MISC@
-noinst_PROGRAMS = $(am__EXEEXT_13) $(am__EXEEXT_14) $(am__EXEEXT_15)
+ @BUILD_WINDMC@ $(am__EXEEXT_12) $(am__EXEEXT_13) \
+ @BUILD_DLLWRAP@ @BUILD_INSTALL_MISC@ $(am__empty)
+noinst_PROGRAMS = $(am__EXEEXT_17) @BUILD_MISC@
EXTRA_PROGRAMS = $(am__EXEEXT_1) srconv$(EXEEXT) sysdump$(EXEEXT) \
coffdump$(EXEEXT) $(am__EXEEXT_2) $(am__EXEEXT_3) \
- $(am__EXEEXT_4)
+ $(am__EXEEXT_4) $(am__EXEEXT_5)
DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub NEWS \
README ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.in $(srcdir)/../mkinstalldirs \
$(top_srcdir)/po/Make-in arparse.h arparse.c arlex.c \
defparse.h defparse.c deflex.c nlmheader.h nlmheader.c \
- arparse.h arparse.c arlex.c rcparse.h rcparse.c rclex.c \
- $(srcdir)/../ylwrap $(srcdir)/../ltmain.sh \
+ arparse.h arparse.c arlex.c mcparse.h mcparse.c rcparse.h \
+ rcparse.c $(srcdir)/../ylwrap $(srcdir)/../ltmain.sh \
$(srcdir)/../config.guess $(srcdir)/../config.sub
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../bfd/acinclude.m4 \
- $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
+ $(top_srcdir)/../bfd/warning.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/iconv.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/lib-ld.m4 \
+ $(top_srcdir)/../config/lib-link.m4 \
+ $(top_srcdir)/../config/lib-prefix.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -71,67 +81,53 @@ CONFIG_CLEAN_FILES = po/Makefile.in
am__EXEEXT_1 = nlmconv$(EXEEXT)
am__EXEEXT_2 = dlltool$(EXEEXT)
am__EXEEXT_3 = windres$(EXEEXT)
-am__EXEEXT_4 = dllwrap$(EXEEXT)
-am__EXEEXT_5 = size$(EXEEXT)
-am__EXEEXT_6 = objdump$(EXEEXT)
-am__EXEEXT_7 = ar$(EXEEXT)
-am__EXEEXT_8 = strings$(EXEEXT)
-am__EXEEXT_9 = ranlib$(EXEEXT)
-am__EXEEXT_10 = objcopy$(EXEEXT)
-am__EXEEXT_11 = addr2line$(EXEEXT)
-am__EXEEXT_12 = readelf$(EXEEXT)
+am__EXEEXT_4 = windmc$(EXEEXT)
+am__EXEEXT_5 = dllwrap$(EXEEXT)
+am__EXEEXT_6 = size$(EXEEXT)
+am__EXEEXT_7 = objdump$(EXEEXT)
+am__EXEEXT_8 = ar$(EXEEXT)
+am__EXEEXT_9 = strings$(EXEEXT)
+am__EXEEXT_10 = ranlib$(EXEEXT)
+am__EXEEXT_11 = objcopy$(EXEEXT)
+am__EXEEXT_12 = addr2line$(EXEEXT)
+am__EXEEXT_13 = readelf$(EXEEXT)
am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-am__EXEEXT_13 = nm-new$(EXEEXT)
-am__EXEEXT_14 = strip-new$(EXEEXT)
-am__EXEEXT_15 = cxxfilt$(EXEEXT)
+am__EXEEXT_14 = nm-new$(EXEEXT)
+am__EXEEXT_15 = strip-new$(EXEEXT)
+am__EXEEXT_16 = cxxfilt$(EXEEXT)
+am__EXEEXT_17 = $(am__EXEEXT_14) $(am__EXEEXT_15) $(am__EXEEXT_16)
PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
am__objects_1 = bucomm.$(OBJEXT) version.$(OBJEXT) filemode.$(OBJEXT)
-am_addr2line_OBJECTS = addr2line.$(OBJEXT) budemang.$(OBJEXT) \
- $(am__objects_1)
+am_addr2line_OBJECTS = addr2line.$(OBJEXT) $(am__objects_1)
addr2line_OBJECTS = $(am_addr2line_OBJECTS)
addr2line_LDADD = $(LDADD)
am__DEPENDENCIES_1 = ../bfd/libbfd.la
am__DEPENDENCIES_2 = ../libiberty/libiberty.a
am__DEPENDENCIES_3 =
-addr2line_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_ar_OBJECTS = arparse.$(OBJEXT) arlex.$(OBJEXT) ar.$(OBJEXT) \
not-ranlib.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) \
binemul.$(OBJEXT) emul_$(EMULATION).$(OBJEXT) $(am__objects_1)
ar_OBJECTS = $(am_ar_OBJECTS)
-ar_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_coffdump_OBJECTS = coffdump.$(OBJEXT) coffgrok.$(OBJEXT) \
$(am__objects_1)
coffdump_OBJECTS = $(am_coffdump_OBJECTS)
coffdump_LDADD = $(LDADD)
-coffdump_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_cxxfilt_OBJECTS = cxxfilt.$(OBJEXT) $(am__objects_1)
cxxfilt_OBJECTS = $(am_cxxfilt_OBJECTS)
cxxfilt_LDADD = $(LDADD)
-cxxfilt_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_dlltool_OBJECTS = dlltool.$(OBJEXT) defparse.$(OBJEXT) \
deflex.$(OBJEXT) $(am__objects_1)
dlltool_OBJECTS = $(am_dlltool_OBJECTS)
-dlltool_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_dllwrap_OBJECTS = dllwrap.$(OBJEXT) version.$(OBJEXT)
dllwrap_OBJECTS = $(am_dllwrap_OBJECTS)
-dllwrap_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
am_nlmconv_OBJECTS = nlmconv.$(OBJEXT) nlmheader.$(OBJEXT) \
$(am__objects_1)
nlmconv_OBJECTS = $(am_nlmconv_OBJECTS)
nlmconv_LDADD = $(LDADD)
-nlmconv_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
-am_nm_new_OBJECTS = nm.$(OBJEXT) budemang.$(OBJEXT) $(am__objects_1)
+am_nm_new_OBJECTS = nm.$(OBJEXT) $(am__objects_1)
nm_new_OBJECTS = $(am_nm_new_OBJECTS)
nm_new_LDADD = $(LDADD)
-nm_new_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am__objects_2 = rddbg.$(OBJEXT) debug.$(OBJEXT) stabs.$(OBJEXT) \
ieee.$(OBJEXT) rdcoff.$(OBJEXT)
am__objects_3 = $(am__objects_2) wrstabs.$(OBJEXT)
@@ -139,69 +135,52 @@ am_objcopy_OBJECTS = objcopy.$(OBJEXT) not-strip.$(OBJEXT) \
rename.$(OBJEXT) $(am__objects_3) $(am__objects_1)
objcopy_OBJECTS = $(am_objcopy_OBJECTS)
objcopy_LDADD = $(LDADD)
-objcopy_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
-am_objdump_OBJECTS = objdump.$(OBJEXT) dwarf.$(OBJEXT) \
- budemang.$(OBJEXT) prdbg.$(OBJEXT) $(am__objects_2) \
- $(am__objects_1)
+am_objdump_OBJECTS = objdump.$(OBJEXT) dwarf.$(OBJEXT) prdbg.$(OBJEXT) \
+ $(am__objects_2) $(am__objects_1)
objdump_OBJECTS = $(am_objdump_OBJECTS)
am__DEPENDENCIES_4 = ../opcodes/libopcodes.la
-objdump_DEPENDENCIES = $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_1) \
- $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
am_ranlib_OBJECTS = ar.$(OBJEXT) is-ranlib.$(OBJEXT) arparse.$(OBJEXT) \
arlex.$(OBJEXT) arsup.$(OBJEXT) rename.$(OBJEXT) \
binemul.$(OBJEXT) emul_$(EMULATION).$(OBJEXT) $(am__objects_1)
ranlib_OBJECTS = $(am_ranlib_OBJECTS)
-ranlib_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_readelf_OBJECTS = readelf.$(OBJEXT) version.$(OBJEXT) \
unwind-ia64.$(OBJEXT) dwarf.$(OBJEXT)
readelf_OBJECTS = $(am_readelf_OBJECTS)
-readelf_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_2)
am_size_OBJECTS = size.$(OBJEXT) $(am__objects_1)
size_OBJECTS = $(am_size_OBJECTS)
size_LDADD = $(LDADD)
-size_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_srconv_OBJECTS = srconv.$(OBJEXT) coffgrok.$(OBJEXT) \
$(am__objects_1)
srconv_OBJECTS = $(am_srconv_OBJECTS)
srconv_LDADD = $(LDADD)
-srconv_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_strings_OBJECTS = strings.$(OBJEXT) $(am__objects_1)
strings_OBJECTS = $(am_strings_OBJECTS)
strings_LDADD = $(LDADD)
-strings_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_strip_new_OBJECTS = objcopy.$(OBJEXT) is-strip.$(OBJEXT) \
rename.$(OBJEXT) $(am__objects_3) $(am__objects_1)
strip_new_OBJECTS = $(am_strip_new_OBJECTS)
strip_new_LDADD = $(LDADD)
-strip_new_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
am_sysdump_OBJECTS = sysdump.$(OBJEXT) $(am__objects_1)
sysdump_OBJECTS = $(am_sysdump_OBJECTS)
sysdump_LDADD = $(LDADD)
-sysdump_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
+am_windmc_OBJECTS = windmc.$(OBJEXT) mcparse.$(OBJEXT) mclex.$(OBJEXT) \
+ winduni.$(OBJEXT) $(am__objects_1)
+windmc_OBJECTS = $(am_windmc_OBJECTS)
am_windres_OBJECTS = windres.$(OBJEXT) resrc.$(OBJEXT) \
rescoff.$(OBJEXT) resbin.$(OBJEXT) rcparse.$(OBJEXT) \
rclex.$(OBJEXT) winduni.$(OBJEXT) resres.$(OBJEXT) \
$(am__objects_1)
windres_OBJECTS = $(am_windres_OBJECTS)
-windres_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \
- $(am__DEPENDENCIES_3)
DEFAULT_INCLUDES = -I. -I$(srcdir) -I.
depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
@@ -214,7 +193,8 @@ SOURCES = $(addr2line_SOURCES) $(ar_SOURCES) $(coffdump_SOURCES) \
$(nlmconv_SOURCES) $(nm_new_SOURCES) $(objcopy_SOURCES) \
$(objdump_SOURCES) $(ranlib_SOURCES) $(readelf_SOURCES) \
$(size_SOURCES) $(srconv_SOURCES) $(strings_SOURCES) \
- $(strip_new_SOURCES) $(sysdump_SOURCES) $(windres_SOURCES)
+ $(strip_new_SOURCES) $(sysdump_SOURCES) $(windmc_SOURCES) \
+ $(windres_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-exec-recursive install-info-recursive \
@@ -238,9 +218,11 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_DLLTOOL = @BUILD_DLLTOOL@
BUILD_DLLWRAP = @BUILD_DLLWRAP@
+BUILD_INSTALL_MISC = @BUILD_INSTALL_MISC@
BUILD_MISC = @BUILD_MISC@
BUILD_NLMCONV = @BUILD_NLMCONV@
BUILD_SRCONV = @BUILD_SRCONV@
+BUILD_WINDMC = @BUILD_WINDMC@
BUILD_WINDRES = @BUILD_WINDRES@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
@@ -256,6 +238,7 @@ DEFS = @DEFS@
DEMANGLER_NAME = @DEMANGLER_NAME@
DEPDIR = @DEPDIR@
DLLTOOL_DEFS = @DLLTOOL_DEFS@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -264,28 +247,32 @@ EMULATION = @EMULATION@
EMULATION_VECTOR = @EMULATION_VECTOR@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GMOFILES = @GMOFILES@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
+GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
+GREP = @GREP@
HDEFINES = @HDEFINES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
@@ -293,7 +280,9 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
NLMCONV_DEFS = @NLMCONV_DEFS@
+NM = @NM@
NO_WERROR = @NO_WERROR@
OBJDUMP_DEFS = @OBJDUMP_DEFS@
OBJEXT = @OBJEXT@
@@ -304,19 +293,20 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
@@ -345,10 +335,10 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -363,6 +353,7 @@ target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = cygnus dejagnu
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = doc po
tooldir = $(exec_prefix)/$(target_alias)
YFLAGS = -d
@@ -390,12 +381,13 @@ ADDR2LINE_PROG = addr2line
NLMCONV_PROG = nlmconv
DLLTOOL_PROG = dlltool
WINDRES_PROG = windres
+WINDMC_PROG = windmc
DLLWRAP_PROG = dllwrap
-SRCONV_PROG = srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
-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@
+SRCONV_PROG = srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
+RENAMED_PROGS = $(NM_PROG) $(STRIP_PROG) $(DEMANGLER_PROG)
# Stuff that goes in tooldir/ if appropriate.
-TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump
+TOOL_PROGS = nm-new strip-new ar ranlib dlltool objdump objcopy
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
@@ -403,32 +395,34 @@ MKDEP = gcc -MM
INCLUDES = -D_GNU_SOURCE \
-I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
@HDEFINES@ \
- -I$(srcdir)/../intl -I../intl \
+ @INCINTL@ \
-DLOCALEDIR="\"$(datadir)/locale\"" \
-Dbin_dummy_emulation=$(EMULATION_VECTOR)
HFILES = \
- arsup.h binemul.h bucomm.h budbg.h budemang.h \
+ arsup.h binemul.h bucomm.h budbg.h \
coffgrok.h debug.h dlltool.h nlmconv.h \
- windres.h winduni.h
+ windres.h winduni.h windint.h \
+ windmc.h
-GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h
+GENERATED_HFILES = arparse.h sysroff.h sysinfo.h defparse.h rcparse.h mcparse.h
CFILES = \
- addr2line.c ar.c arsup.c binemul.c bucomm.c budemang.c \
+ addr2line.c ar.c arsup.c bin2c.c binemul.c bucomm.c \
coffdump.c coffgrok.c cxxfilt.c \
dwarf.c debug.c dlltool.c dllwrap.c \
emul_aix.c emul_vanilla.c filemode.c \
ieee.c is-ranlib.c is-strip.c maybe-ranlib.c maybe-strip.c \
nlmconv.c nm.c not-ranlib.c not-strip.c \
objcopy.c objdump.c prdbg.c \
- rdcoff.c rddbg.c readelf.c rename.c \
+ rclex.c rdcoff.c rddbg.c readelf.c rename.c \
resbin.c rescoff.c resrc.c resres.c \
size.c srconv.c stabs.c strings.c sysdump.c version.c \
- windres.c winduni.c wrstabs.c
+ windres.c winduni.c wrstabs.c \
+ windmc.c mclex.c
GENERATED_CFILES = \
arparse.c arlex.c sysroff.c sysinfo.c syslex.c \
- defparse.c deflex.c nlmheader.c rcparse.c rclex.c
+ defparse.c deflex.c nlmheader.c rcparse.c mcparse.c
DEBUG_SRCS = rddbg.c debug.c stabs.c ieee.c rdcoff.c
WRITE_DEBUG_SRCS = $(DEBUG_SRCS) wrstabs.c
@@ -456,47 +450,75 @@ CC_FOR_TARGET = ` \
fi; \
fi`
-LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
+
+# There's no global DEPENDENCIES. So, we must explicitly list everything
+# which depends on libintl, since we don't know whether LIBINTL_DEP will be
+# non-empty until configure time. Ugh!
+size_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+objdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB) $(OPCODES)
+nm_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+ar_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+strings_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+strip_new_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+ranlib_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+cxxfilt_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+objcopy_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+nlmconv_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+srconv_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+sysdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+coffdump_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+dlltool_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+windres_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+windmc_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+addr2line_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY) $(BFDLIB)
+readelf_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
+dllwrap_DEPENDENCIES = $(LIBINTL_DEP) $(LIBIBERTY)
+LDADD = $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
size_SOURCES = size.c $(BULIBS)
objcopy_SOURCES = objcopy.c not-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
strings_SOURCES = strings.c $(BULIBS)
readelf_SOURCES = readelf.c version.c unwind-ia64.c dwarf.c
-readelf_LDADD = $(INTLLIBS) $(LIBIBERTY)
+readelf_LDADD = $(LIBINTL) $(LIBIBERTY)
strip_new_SOURCES = objcopy.c is-strip.c rename.c $(WRITE_DEBUG_SRCS) $(BULIBS)
-nm_new_SOURCES = nm.c budemang.c $(BULIBS)
-objdump_SOURCES = objdump.c dwarf.c budemang.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
-objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
+nm_new_SOURCES = nm.c $(BULIBS)
+objdump_SOURCES = objdump.c dwarf.c prdbg.c $(DEBUG_SRCS) $(BULIBS)
+objdump_LDADD = $(OPCODES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
cxxfilt_SOURCES = cxxfilt.c $(BULIBS)
ar_SOURCES = arparse.y arlex.l ar.c not-ranlib.c arsup.c rename.c binemul.c \
emul_$(EMULATION).c $(BULIBS)
-ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+ar_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
ranlib_SOURCES = ar.c is-ranlib.c arparse.y arlex.l arsup.c rename.c \
binemul.c emul_$(EMULATION).c $(BULIBS)
-ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
-addr2line_SOURCES = addr2line.c budemang.c $(BULIBS)
+ranlib_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
+addr2line_SOURCES = addr2line.c $(BULIBS)
srconv_SOURCES = srconv.c coffgrok.c $(BULIBS)
dlltool_SOURCES = dlltool.c defparse.y deflex.l $(BULIBS)
-dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+dlltool_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL)
coffdump_SOURCES = coffdump.c coffgrok.c $(BULIBS)
sysdump_SOURCES = sysdump.c $(BULIBS)
nlmconv_SOURCES = nlmconv.c nlmheader.y $(BULIBS)
-windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.l \
+windres_SOURCES = windres.c resrc.c rescoff.c resbin.c rcparse.y rclex.c \
winduni.c resres.c $(BULIBS)
-windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
+windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) $(LIBICONV)
+windmc_SOURCES = windmc.c mcparse.y mclex.c \
+ winduni.c $(BULIBS)
+
+windmc_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(LIBINTL) $(LIBICONV)
dllwrap_SOURCES = dllwrap.c version.c
-dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
+dllwrap_LDADD = $(LIBIBERTY) $(LIBINTL)
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
-
-DISTCLEANFILES = sysinfo sysroff.c sysroff.h \
- site.exp site.bak
+ syslex.c deflex.c defparse.h defparse.c rcparse.h rcparse.c \
+ mcparse.h mcparse.c
+DISTCLEANFILES = sysroff.c sysroff.h site.exp site.bak
###
-MOSTLYCLEANFILES = sysinfo binutils.log binutils.sum abcdefgh*
+MOSTLYCLEANFILES = sysinfo$(EXEEXT_FOR_BUILD) bin2c$(EXEEXT_FOR_BUILD) \
+ binutils.log binutils.sum abcdefgh*
+
CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -509,15 +531,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
+ cd $(srcdir) && $(AUTOMAKE) --cygnus \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
+ $(AUTOMAKE) --cygnus Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -641,6 +663,9 @@ strip-new$(EXEEXT): $(strip_new_OBJECTS) $(strip_new_DEPENDENCIES)
sysdump$(EXEEXT): $(sysdump_OBJECTS) $(sysdump_DEPENDENCIES)
@rm -f sysdump$(EXEEXT)
$(LINK) $(sysdump_LDFLAGS) $(sysdump_OBJECTS) $(sysdump_LDADD) $(LIBS)
+windmc$(EXEEXT): $(windmc_OBJECTS) $(windmc_DEPENDENCIES)
+ @rm -f windmc$(EXEEXT)
+ $(LINK) $(windmc_LDFLAGS) $(windmc_OBJECTS) $(windmc_LDADD) $(LIBS)
windres$(EXEEXT): $(windres_OBJECTS) $(windres_DEPENDENCIES)
@rm -f windres$(EXEEXT)
$(LINK) $(windres_LDFLAGS) $(windres_OBJECTS) $(windres_LDADD) $(LIBS)
@@ -872,9 +897,10 @@ maintainer-clean-generic:
-rm -f deflex.c
-rm -f defparse.c
-rm -f defparse.h
+ -rm -f mcparse.c
+ -rm -f mcparse.h
-rm -f nlmheader.c
-rm -f nlmheader.h
- -rm -f rclex.c
-rm -f rcparse.c
-rm -f rcparse.h
clean: clean-recursive
@@ -951,7 +977,7 @@ uninstall-info: uninstall-info-recursive
.PHONY: install-html install-html-am install-html-recursive
-install-html: install-html-recursive
+install-html: install-html-recursive
install-html-recursive:
@failcom='exit 1'; \
@@ -1017,7 +1043,7 @@ objdump.o:objdump.c
# -rm -f $(STRIP_PROG)
# -ln $(OBJCOPY_PROG) $(STRIP_PROG)
-sysroff.c: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
+sysroff.c: sysinfo$(EXEEXT_FOR_BUILD) sysroff.info
./sysinfo$(EXEEXT_FOR_BUILD) -c <$(srcdir)/sysroff.info >sysroff.c
./sysinfo$(EXEEXT_FOR_BUILD) -i <$(srcdir)/sysroff.info >>sysroff.c
./sysinfo$(EXEEXT_FOR_BUILD) -g <$(srcdir)/sysroff.info >>sysroff.c
@@ -1042,15 +1068,23 @@ sysinfo.o:
$(CC_FOR_BUILD) -c -I. $(AM_CFLAGS) $(CFLAGS) $(srcdir)/sysinfo.c -Wno-error ; \
fi
+bin2c$(EXEEXT_FOR_BUILD):
+ $(CC_FOR_BUILD) -o $@ $(INCLUDES) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) $(srcdir)/bin2c.c $(srcdir)/version.c
+
+embedspu: embedspu.sh
+ sed "s@^program_transform_name=@program_transform_name=$(program_transform_name)@" < $< > $@
+ chmod a+x $@
+
# We need these for parallel make.
arparse.h: arparse.c
defparse.h: defparse.c
nlmheader.h: nlmheader.c
rcparse.h: rcparse.c
+mcparse.h: mcparse.c
sysinfo.h: sysinfo.c
# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
+# yacc will produce working code which contain compile time warnings.
arparse.o:
$(COMPILE) -c $< $(NO_WERROR)
arlex.o:
@@ -1065,8 +1099,12 @@ nlmheader.o:
$(COMPILE) -c $< $(NO_WERROR)
rcparse.o:
$(COMPILE) -c $< $(NO_WERROR)
+mcparse.o:
+ $(COMPILE) -c $< $(NO_WERROR)
rclex.o:
$(COMPILE) -c $< $(NO_WERROR)
+mclex.o:
+ $(COMPILE) -c $< $(NO_WERROR)
dlltool.o:
$(COMPILE) -c $(DLLTOOL_DEFS) $(srcdir)/dlltool.c
@@ -1133,10 +1171,10 @@ mostlyclean-local:
.PHONY: install-exec-local
install-exec-local: install-binPROGRAMS $(bin_PROGRAMS) $(noinst_PROGRAMS)
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- if test -f $$p; then \
- echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
- $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/$(EXEEXT)$$//' -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
+ @list='$(RENAMED_PROGS)'; for p in $$list; do \
+ if test -f $$p$(EXEEXT); then \
+ echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p$(EXEEXT) $(bindir)/`echo $$p|sed -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
+ $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p$(EXEEXT) $(DESTDIR)$(bindir)/`echo $$p|sed -e 's/-new//' -e 's/cxxfilt/$(DEMANGLER_NAME)/'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
$(mkinstalldirs) $(DESTDIR)$(tooldir)/bin
@@ -1157,210 +1195,252 @@ 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 config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
- $(INCDIR)/demangle.h bucomm.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h budemang.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 $(INCDIR)/hashtab.h \
- arsup.h $(INCDIR)/filenames.h binemul.h
-arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h arsup.h $(INCDIR)/libiberty.h bucomm.h \
- config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/filenames.h
-binemul.o: binemul.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
-bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/libiberty.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/filenames.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
-budemang.o: budemang.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
- budemang.h
-coffdump.o: coffdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h coffgrok.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
-coffgrok.o: coffgrok.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h coffgrok.h
-cxxfilt.o: cxxfilt.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h $(INCDIR)/safe-ctype.h
-dwarf.o: dwarf.c dwarf.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/elf/dwarf2.h bucomm.h \
- config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h
-debug.o: debug.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
-dlltool.o: dlltool.c ../bfd/bfd.h $(INCDIR)/ansidecl.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
-dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
-emul_aix.o: emul_aix.c binemul.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/xcoff.h $(BFDDIR)/libcoff.h $(BFDDIR)/libxcoff.h
-emul_vanilla.o: emul_vanilla.c binemul.h ../bfd/bfd.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
-filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.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
+addr2line.o: addr2line.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
+ bucomm.h
+ar.o: ar.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/progress.h $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h \
+ $(INCDIR)/hashtab.h bucomm.h arsup.h $(INCDIR)/filenames.h \
+ binemul.h
+arsup.o: arsup.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h bucomm.h arsup.h
+bin2c.o: bin2c.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h
+binemul.o: binemul.c binemul.h sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h
+bucomm.o: bucomm.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h \
+ bucomm.h
+coffdump.o: coffdump.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h bucomm.h coffgrok.h
+coffgrok.o: coffgrok.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h bucomm.h coffgrok.h
+cxxfilt.o: cxxfilt.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h bucomm.h
+dwarf.o: dwarf.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/elf/dwarf2.h \
+ dwarf.h
+debug.o: debug.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ debug.h
+dlltool.o: dlltool.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dyn-string.h bucomm.h dlltool.h $(INCDIR)/safe-ctype.h
+dllwrap.o: dllwrap.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dyn-string.h bucomm.h
+emul_aix.o: emul_aix.c binemul.h sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(BFDDIR)/libxcoff.h
+emul_vanilla.o: emul_vanilla.c binemul.h sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h
+filemode.o: filemode.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h
+ieee.o: ieee.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/ieee.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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)/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 budemang.h $(INCDIR)/aout/stab_gnu.h \
+nlmconv.o: nlmconv.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h $(BFDDIR)/libnlm.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h \
+ nlmconv.h bucomm.h
+nm.o: nm.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/progress.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def $(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h \
- $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/common.h \
+ bucomm.h
not-ranlib.o: not-ranlib.c
not-strip.o: not-strip.c
-objcopy.o: objcopy.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)/libiberty.h \
+objcopy.o: objcopy.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/progress.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h bucomm.h \
budbg.h $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h $(BFDDIR)/elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(BFDDIR)/libbfd.h
-objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ../bfd/bfdver.h $(INCDIR)/progress.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- dwarf.h $(INCDIR)/elf/dwarf2.h budemang.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 \
+ $(INCDIR)/bfdlink.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
+objdump.o: objdump.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/progress.h \
+ bucomm.h dwarf.h $(INCDIR)/safe-ctype.h $(INCDIR)/dis-asm.h \
+ ../bfd/bfd.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h debug.h \
+ budbg.h $(INCDIR)/aout/aout64.h
+prdbg.o: prdbg.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h debug.h \
budbg.h
-rdcoff.o: rdcoff.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h bucomm.h \
- config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h budbg.h $(BFDDIR)/libcoff.h \
+rclex.o: rclex.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h windres.h $(INCDIR)/ansidecl.h \
+ winduni.h windint.h rcparse.h
+rdcoff.o: rdcoff.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h bucomm.h debug.h budbg.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
-rddbg.o: rddbg.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
-readelf.o: readelf.c dwarf.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/alpha.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h \
- $(INCDIR)/elf/avr.h $(INCDIR)/elf/bfin.h $(INCDIR)/elf/cris.h \
+rddbg.o: rddbg.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ bucomm.h debug.h budbg.h
+readelf.o: readelf.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h dwarf.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/external.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/elf/alpha.h \
+ $(INCDIR)/elf/arc.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/avr.h \
+ $(INCDIR)/elf/bfin.h $(INCDIR)/elf/cris.h $(INCDIR)/elf/crx.h \
$(INCDIR)/elf/d10v.h $(INCDIR)/elf/d30v.h $(INCDIR)/elf/dlx.h \
- $(INCDIR)/elf/fr30.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/h8.h \
- $(INCDIR)/elf/hppa.h $(INCDIR)/elf/i386.h $(INCDIR)/elf/i370.h \
- $(INCDIR)/elf/i860.h $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/ip2k.h $(INCDIR)/elf/m32c.h $(INCDIR)/elf/m32r.h \
+ $(INCDIR)/elf/fr30.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/i386.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/i860.h \
+ $(INCDIR)/elf/i960.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/ip2k.h \
+ $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/m32c.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/m68k.h $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/mcore.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/mn10200.h \
- $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/mt.h $(INCDIR)/elf/msp430.h \
- $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/sh.h \
- $(INCDIR)/elf/sparc.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h \
- $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/crx.h \
- $(INCDIR)/elf/iq2000.h $(INCDIR)/elf/xtensa.h $(INCDIR)/aout/ar.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h unwind-ia64.h
-rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h
-resbin.o: resbin.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 windres.h \
- winduni.h
-rescoff.o: rescoff.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 windres.h \
- winduni.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-resrc.o: resrc.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 $(INCDIR)/safe-ctype.h \
- windres.h winduni.h
-resres.o: resres.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 windres.h \
- winduni.h
-size.o: size.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
-srconv.o: srconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h sysroff.h coffgrok.h $(INCDIR)/libiberty.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- sysroff.c
-stabs.o: stabs.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 $(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 \
- $(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
-sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h \
- sysroff.h sysroff.c
-version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ../bfd/bfdver.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
-windres.o: windres.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.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
-wrstabs.o: wrstabs.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 $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/elf/mep.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/mmix.h \
+ $(INCDIR)/elf/mn10200.h $(INCDIR)/elf/mn10300.h $(INCDIR)/elf/mt.h \
+ $(INCDIR)/elf/msp430.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/pj.h \
+ $(INCDIR)/elf/ppc.h $(INCDIR)/elf/ppc64.h $(INCDIR)/elf/s390.h \
+ $(INCDIR)/elf/score.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/sparc.h \
+ $(INCDIR)/elf/spu.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/vax.h \
+ $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/xstormy16.h $(INCDIR)/elf/xtensa.h \
+ $(INCDIR)/aout/ar.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ unwind-ia64.h
+rename.o: rename.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h
+resbin.o: resbin.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ windres.h winduni.h windint.h
+rescoff.o: rescoff.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h windres.h winduni.h windint.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+resrc.o: resrc.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h windres.h winduni.h windint.h
+resres.o: resres.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ windres.h winduni.h windint.h
+size.o: size.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ bucomm.h
+srconv.o: srconv.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h sysroff.h coffgrok.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h sysroff.c
+stabs.o: stabs.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.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 sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h bucomm.h
+sysdump.o: sysdump.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h bucomm.h \
+ sysroff.h sysroff.c $(INCDIR)/ansidecl.h
+version.o: version.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h
+windres.o: windres.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
+ windres.h winduni.h windint.h
+winduni.o: winduni.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h bucomm.h winduni.h $(INCDIR)/safe-ctype.h
+wrstabs.o: wrstabs.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h bucomm.h \
debug.h budbg.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def
-arparse.o: arparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h arsup.h
+windmc.o: windmc.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h windmc.h \
+ winduni.h windint.h
+mclex.o: mclex.c sysdep.h $(INCDIR)/ansidecl.h ../bfd/bfdver.h \
+ config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h windmc.h winduni.h mcparse.h
+arparse.o: arparse.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h arsup.h
arlex.o: arlex.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- arparse.h
+ $(INCDIR)/ansidecl.h arparse.h
sysroff.o: sysroff.c
sysinfo.o: sysinfo.c
syslex.o: syslex.c config.h sysinfo.h
-defparse.o: defparse.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h dlltool.h
+defparse.o: defparse.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h dlltool.h
deflex.o: deflex.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- defparse.h dlltool.h
-nlmheader.o: nlmheader.c $(INCDIR)/ansidecl.h $(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 \
+ defparse.h dlltool.h $(INCDIR)/ansidecl.h
+nlmheader.o: nlmheader.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h bucomm.h \
nlmconv.h
-rcparse.o: rcparse.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 windres.h \
- winduni.h $(INCDIR)/safe-ctype.h
-rclex.o: rclex.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 $(INCDIR)/safe-ctype.h \
- windres.h winduni.h rcparse.h
+rcparse.o: rcparse.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h windres.h winduni.h windint.h \
+ $(INCDIR)/safe-ctype.h
+mcparse.o: mcparse.c sysdep.h $(INCDIR)/ansidecl.h \
+ ../bfd/bfdver.h config.h $(INCDIR)/fopen-same.h ../bfd/bfd.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h bucomm.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h windmc.h winduni.h $(INCDIR)/safe-ctype.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/binutils/binutils/NEWS b/contrib/binutils/binutils/NEWS
index d12450e..ad6058f 100644
--- a/contrib/binutils/binutils/NEWS
+++ b/contrib/binutils/binutils/NEWS
@@ -1,5 +1,20 @@
-*- text -*-
+* A new tool "windmc" has been added for some targets. This is a message
+ compiler which attempts to be compatible with the MS version.
+
+* Add codepage support to the windres tool. It now supports many new
+ resource types (e.g. MANIFEST, TOOLBAR, etc). The output generation
+ for binary files is done now via bfd itself. The endianess problems
+ for different hosts are solved. Dumps of .res files can now be
+ re-compiled by windres without lossing resources or compilation errors.
+ Some problems on dialog resource translations are corrected.
+
+* Add --extract-symbol command line option to objcopy, which will
+ strip everything out of an ordinary object file or executable except
+ for its symbol table. Files containing just symbols can be useful
+ to some OSes.
+
* Add "-x NAME" to readelf in addition to "-x NUMBER".
* Add -i and -t switches to cxxfilt. -i disables the display of implementation
@@ -30,6 +45,9 @@
* Add "--globalize-symbol <name>" and "--globalize-symbols <filename>" switches
to objcopy to convert local symbols into global symbols.
+
+* gprof now allows input files to have histogram records for
+ several memory ranges, provided those ranges are disjoint.
Changes in 2.16:
diff --git a/contrib/binutils/binutils/acinclude.m4 b/contrib/binutils/binutils/acinclude.m4
deleted file mode 100644
index 71b09b9..0000000
--- a/contrib/binutils/binutils/acinclude.m4
+++ /dev/null
@@ -1 +0,0 @@
-sinclude(../bfd/acinclude.m4)
diff --git a/contrib/binutils/binutils/aclocal.m4 b/contrib/binutils/binutils/aclocal.m4
index cd42673..29676ea 100644
--- a/contrib/binutils/binutils/aclocal.m4
+++ b/contrib/binutils/binutils/aclocal.m4
@@ -480,27 +480,6 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
# Free Software Foundation, Inc.
#
@@ -910,4 +889,19 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
-m4_include([acinclude.m4])
+m4_include([../bfd/acinclude.m4])
+m4_include([../bfd/warning.m4])
+m4_include([../config/depstand.m4])
+m4_include([../config/gettext-sister.m4])
+m4_include([../config/iconv.m4])
+m4_include([../config/lead-dot.m4])
+m4_include([../config/lib-ld.m4])
+m4_include([../config/lib-link.m4])
+m4_include([../config/lib-prefix.m4])
+m4_include([../config/nls.m4])
+m4_include([../config/po.m4])
+m4_include([../config/progtest.m4])
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
diff --git a/contrib/binutils/binutils/addr2line.c b/contrib/binutils/binutils/addr2line.c
index 7cd67bc..a7c365a 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, 2001, 2002, 2003, 2004, 2006
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2007
Free Software Foundation, Inc.
Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
@@ -29,15 +29,12 @@
both forms write results to stdout, the second form reads addresses
to be converted from stdin. */
-#include "config.h"
-#include <string.h>
-
+#include "sysdep.h"
#include "bfd.h"
#include "getopt.h"
#include "libiberty.h"
#include "demangle.h"
#include "bucomm.h"
-#include "budemang.h"
static bfd_boolean unwind_inlines; /* -i, unwind inlined functions. */
static bfd_boolean with_functions; /* -f, show function names. */
@@ -68,7 +65,6 @@ static void slurp_symtab (bfd *);
static void find_address_in_section (bfd *, asection *, void *);
static void find_offset_in_section (bfd *, asection *);
static void translate_addresses (bfd *, asection *);
-static void process_file (const char *, const char *, const char *);
/* Print a usage message to STREAM and exit with STATUS. */
@@ -92,7 +88,7 @@ usage (FILE *stream, int status)
\n"));
list_supported_targets (program_name, stream);
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -225,8 +221,9 @@ translate_addresses (bfd *abfd, asection *section)
name = "??";
else if (do_demangle)
{
- alloc = demangle (abfd, name);
- name = alloc;
+ alloc = bfd_demangle (abfd, name, DMGL_ANSI | DMGL_PARAMS);
+ if (alloc != NULL)
+ name = alloc;
}
printf ("%s\n", name);
@@ -261,9 +258,9 @@ translate_addresses (bfd *abfd, asection *section)
}
}
-/* Process a file. */
+/* Process a file. Returns an exit value for main(). */
-static void
+static int
process_file (const char *file_name, const char *section_name,
const char *target)
{
@@ -272,7 +269,7 @@ process_file (const char *file_name, const char *section_name,
char **matching;
if (get_file_size (file_name) < 1)
- return;
+ return 1;
abfd = bfd_openr (file_name, target);
if (abfd == NULL)
@@ -312,6 +309,8 @@ process_file (const char *file_name, const char *section_name,
}
bfd_close (abfd);
+
+ return 0;
}
int
@@ -401,7 +400,5 @@ main (int argc, char **argv)
addr = argv + optind;
naddr = argc - optind;
- process_file (file_name, section_name, target);
-
- return 0;
+ return process_file (file_name, section_name, target);
}
diff --git a/contrib/binutils/binutils/ar.c b/contrib/binutils/binutils/ar.c
index fe1c640..8313df5 100644
--- a/contrib/binutils/binutils/ar.c
+++ b/contrib/binutils/binutils/ar.c
@@ -1,6 +1,6 @@
/* ar.c - Archive modify and extract.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -26,12 +26,13 @@
when name truncated. No way to specify pos_end. Error messages should be
more consistent. */
+#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
#include "progress.h"
-#include "bucomm.h"
#include "aout/ar.h"
#include "libbfd.h"
+#include "bucomm.h"
#include "arsup.h"
#include "filenames.h"
#include "binemul.h"
@@ -68,8 +69,8 @@ static void replace_members
(bfd *, char **files_to_replace, bfd_boolean quick);
static void print_descr (bfd * abfd);
static void write_archive (bfd *);
-static void ranlib_only (const char *archname);
-static void ranlib_touch (const char *archname);
+static int ranlib_only (const char *archname);
+static int ranlib_touch (const char *archname);
static void usage (int);
/** Globals and flags */
@@ -153,7 +154,7 @@ map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count)
if (count == 0)
{
- for (head = arch->next; head; head = head->next)
+ for (head = arch->archive_next; head; head = head->archive_next)
{
PROGRESS (1);
function (head);
@@ -172,7 +173,7 @@ map_over_members (bfd *arch, void (*function)(bfd *), char **files, int count)
bfd_boolean found = FALSE;
match_count = 0;
- for (head = arch->next; head; head = head->next)
+ for (head = arch->archive_next; head; head = head->archive_next)
{
PROGRESS (1);
if (head->filename == NULL)
@@ -257,9 +258,9 @@ usage (int help)
-V --version Print version information\n"));
}
- list_supported_targets (program_name, stderr);
+ list_supported_targets (program_name, s);
- if (help)
+ if (REPORT_BUGS_TO[0] && help)
fprintf (s, _("Report bugs to %s\n"), REPORT_BUGS_TO);
xexit (help ? 0 : 1);
@@ -420,6 +421,7 @@ main (int argc, char **argv)
if (is_ranlib)
{
+ int status = 0;
bfd_boolean touch = FALSE;
if (argc < 2
@@ -429,7 +431,7 @@ main (int argc, char **argv)
usage (0);
if (strcmp (argv[1], "-V") == 0
|| strcmp (argv[1], "-v") == 0
- || strncmp (argv[1], "--v", 3) == 0)
+ || CONST_STRNEQ (argv[1], "--v"))
print_version ("ranlib");
arg_index = 1;
if (strcmp (argv[1], "-t") == 0)
@@ -440,12 +442,12 @@ main (int argc, char **argv)
while (arg_index < argc)
{
if (! touch)
- ranlib_only (argv[arg_index]);
+ status |= ranlib_only (argv[arg_index]);
else
- ranlib_touch (argv[arg_index]);
+ status |= ranlib_touch (argv[arg_index]);
++arg_index;
}
- xexit (0);
+ xexit (status);
}
if (argc == 2 && strcmp (argv[1], "-M") == 0)
@@ -597,10 +599,7 @@ main (int argc, char **argv)
if ((operation == none || operation == print_table)
&& write_armap == 1)
- {
- ranlib_only (argv[arg_index]);
- xexit (0);
- }
+ xexit (ranlib_only (argv[arg_index]));
if (operation == none)
fatal (_("no operation specified"));
@@ -760,7 +759,7 @@ open_inarch (const char *archive_filename, const char *file)
xexit (1);
}
- last_one = &(arch->next);
+ last_one = &(arch->archive_next);
/* Read all the contents right away, regardless. */
for (next_one = bfd_openr_next_archived_file (arch, NULL);
next_one;
@@ -768,7 +767,7 @@ open_inarch (const char *archive_filename, const char *file)
{
PROGRESS (1);
*last_one = next_one;
- last_one = &next_one->next;
+ last_one = &next_one->archive_next;
}
*last_one = (bfd *) NULL;
if (bfd_get_error () != bfd_error_no_more_archived_files)
@@ -779,10 +778,10 @@ open_inarch (const char *archive_filename, const char *file)
static void
print_contents (bfd *abfd)
{
- int ncopied = 0;
+ size_t ncopied = 0;
char *cbuf = xmalloc (BUFSIZE);
struct stat buf;
- long size;
+ size_t size;
if (bfd_stat_arch_elt (abfd, &buf) != 0)
/* xgettext:c-format */
fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
@@ -797,8 +796,8 @@ print_contents (bfd *abfd)
while (ncopied < size)
{
- int nread;
- int tocopy = size - ncopied;
+ size_t nread;
+ size_t tocopy = size - ncopied;
if (tocopy > BUFSIZE)
tocopy = BUFSIZE;
@@ -807,7 +806,12 @@ print_contents (bfd *abfd)
/* xgettext:c-format */
fatal (_("%s is not a valid archive"),
bfd_get_filename (bfd_my_archive (abfd)));
- fwrite (cbuf, 1, nread, stdout);
+
+ /* fwrite in mingw32 may return int instead of size_t. Cast the
+ return value to size_t to avoid comparison between signed and
+ unsigned values. */
+ if ((size_t) fwrite (cbuf, 1, nread, stdout) != nread)
+ fatal ("stdout: %s", strerror (errno));
ncopied += tocopy;
}
free (cbuf);
@@ -828,9 +832,9 @@ extract_file (bfd *abfd)
{
FILE *ostream;
char *cbuf = xmalloc (BUFSIZE);
- int nread, tocopy;
- long ncopied = 0;
- long size;
+ size_t nread, tocopy;
+ size_t ncopied = 0;
+ size_t size;
struct stat buf;
if (bfd_stat_arch_elt (abfd, &buf) != 0)
@@ -838,10 +842,6 @@ extract_file (bfd *abfd)
fatal (_("internal stat error on %s"), bfd_get_filename (abfd));
size = buf.st_size;
- if (size < 0)
- /* xgettext:c-format */
- fatal (_("stat returns negative size for %s"), bfd_get_filename (abfd));
-
if (verbose)
printf ("x - %s\n", bfd_get_filename (abfd));
@@ -890,7 +890,12 @@ extract_file (bfd *abfd)
output_file = ostream;
}
- fwrite (cbuf, 1, nread, ostream);
+
+ /* fwrite in mingw32 may return int instead of size_t. Cast
+ the return value to size_t to avoid comparison between
+ signed and unsigned values. */
+ if ((size_t) fwrite (cbuf, 1, nread, ostream) != nread)
+ fatal ("%s: %s", output_filename, strerror (errno));
ncopied += tocopy;
}
@@ -918,12 +923,15 @@ write_archive (bfd *iarch)
{
bfd *obfd;
char *old_name, *new_name;
- bfd *contents_head = iarch->next;
+ bfd *contents_head = iarch->archive_next;
old_name = xmalloc (strlen (bfd_get_filename (iarch)) + 1);
strcpy (old_name, bfd_get_filename (iarch));
new_name = make_tempname (old_name);
+ if (new_name == NULL)
+ bfd_fatal ("could not create temporary file whilst writing archive");
+
output_filename = new_name;
obfd = bfd_openw (new_name, bfd_get_target (iarch));
@@ -987,15 +995,15 @@ get_pos_bfd (bfd **contents, enum pos default_pos, const char *default_posname)
if (realpos == pos_end)
{
while (*after_bfd)
- after_bfd = &((*after_bfd)->next);
+ after_bfd = &((*after_bfd)->archive_next);
}
else
{
- for (; *after_bfd; after_bfd = &(*after_bfd)->next)
+ for (; *after_bfd; after_bfd = &(*after_bfd)->archive_next)
if (FILENAME_CMP ((*after_bfd)->filename, realposname) == 0)
{
if (realpos == pos_after)
- after_bfd = &(*after_bfd)->next;
+ after_bfd = &(*after_bfd)->archive_next;
break;
}
}
@@ -1027,7 +1035,7 @@ delete_members (bfd *arch, char **files_to_delete)
found = FALSE;
match_count = 0;
- current_ptr_ptr = &(arch->next);
+ current_ptr_ptr = &(arch->archive_next);
while (*current_ptr_ptr)
{
if (FILENAME_CMP (normalize (*files_to_delete, arch),
@@ -1047,12 +1055,12 @@ delete_members (bfd *arch, char **files_to_delete)
if (verbose)
printf ("d - %s\n",
*files_to_delete);
- *current_ptr_ptr = ((*current_ptr_ptr)->next);
+ *current_ptr_ptr = ((*current_ptr_ptr)->archive_next);
goto next_file;
}
}
- current_ptr_ptr = &((*current_ptr_ptr)->next);
+ current_ptr_ptr = &((*current_ptr_ptr)->archive_next);
}
if (verbose && !found)
@@ -1081,7 +1089,7 @@ move_members (bfd *arch, char **files_to_move)
for (; *files_to_move; ++files_to_move)
{
- current_ptr_ptr = &(arch->next);
+ current_ptr_ptr = &(arch->archive_next);
while (*current_ptr_ptr)
{
bfd *current_ptr = *current_ptr_ptr;
@@ -1091,13 +1099,13 @@ move_members (bfd *arch, char **files_to_move)
/* Move this file to the end of the list - first cut from
where it is. */
bfd *link;
- *current_ptr_ptr = current_ptr->next;
+ *current_ptr_ptr = current_ptr->archive_next;
/* Now glue to end */
- after_bfd = get_pos_bfd (&arch->next, pos_end, NULL);
+ after_bfd = get_pos_bfd (&arch->archive_next, pos_end, NULL);
link = *after_bfd;
*after_bfd = current_ptr;
- current_ptr->next = link;
+ current_ptr->archive_next = link;
if (verbose)
printf ("m - %s\n", *files_to_move);
@@ -1105,7 +1113,7 @@ move_members (bfd *arch, char **files_to_move)
goto next_file;
}
- current_ptr_ptr = &((*current_ptr_ptr)->next);
+ current_ptr_ptr = &((*current_ptr_ptr)->archive_next);
}
/* xgettext:c-format */
fatal (_("no entry %s in archive %s!"), *files_to_move, arch->filename);
@@ -1130,7 +1138,7 @@ replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
{
if (! quick)
{
- current_ptr = &arch->next;
+ current_ptr = &arch->archive_next;
while (*current_ptr)
{
current = *current_ptr;
@@ -1160,24 +1168,24 @@ replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
goto next_file;
}
- after_bfd = get_pos_bfd (&arch->next, pos_after,
+ after_bfd = get_pos_bfd (&arch->archive_next, pos_after,
current->filename);
if (ar_emul_replace (after_bfd, *files_to_move,
verbose))
{
/* Snip out this entry from the chain. */
- *current_ptr = (*current_ptr)->next;
+ *current_ptr = (*current_ptr)->archive_next;
changed = TRUE;
}
goto next_file;
}
- current_ptr = &(current->next);
+ current_ptr = &(current->archive_next);
}
}
/* Add to the end of the archive. */
- after_bfd = get_pos_bfd (&arch->next, pos_end, NULL);
+ after_bfd = get_pos_bfd (&arch->archive_next, pos_end, NULL);
if (ar_emul_append (after_bfd, *files_to_move, verbose))
changed = TRUE;
@@ -1193,23 +1201,24 @@ replace_members (bfd *arch, char **files_to_move, bfd_boolean quick)
output_filename = NULL;
}
-static void
+static int
ranlib_only (const char *archname)
{
bfd *arch;
if (get_file_size (archname) < 1)
- return;
+ return 1;
write_armap = 1;
arch = open_inarch (archname, (char *) NULL);
if (arch == NULL)
xexit (1);
write_archive (arch);
+ return 0;
}
/* Update the timestamp of the symbol map of an archive. */
-static void
+static int
ranlib_touch (const char *archname)
{
#ifdef __GO32__
@@ -1221,7 +1230,7 @@ ranlib_touch (const char *archname)
char **matching;
if (get_file_size (archname) < 1)
- return;
+ return 1;
f = open (archname, O_RDWR | O_BINARY, 0);
if (f < 0)
{
@@ -1252,6 +1261,7 @@ ranlib_touch (const char *archname)
if (! bfd_close (arch))
bfd_fatal (archname);
#endif
+ return 0;
}
/* Things which are interesting to map over all or some of the files: */
diff --git a/contrib/binutils/binutils/arparse.y b/contrib/binutils/binutils/arparse.y
index a7ea015..2453b65 100644
--- a/contrib/binutils/binutils/arparse.y
+++ b/contrib/binutils/binutils/arparse.y
@@ -1,7 +1,7 @@
%{
/* arparse.y - Stange script language parser */
-/* Copyright 1992, 1993, 1995, 1997, 1999, 2002, 2003
+/* Copyright 1992, 1993, 1995, 1997, 1999, 2002, 2003, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
#define DONTDECLARE_MALLOC
+#include "sysdep.h"
#include "bfd.h"
-#include "bucomm.h"
#include "arsup.h"
extern int verbose;
extern int yylex (void);
diff --git a/contrib/binutils/binutils/arsup.c b/contrib/binutils/binutils/arsup.c
index 189490b..98f93a6 100644
--- a/contrib/binutils/binutils/arsup.c
+++ b/contrib/binutils/binutils/arsup.c
@@ -1,6 +1,6 @@
/* arsup.c - Archive support for MRI compatibility
Copyright 1992, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ 2004, 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -25,11 +25,12 @@
This file looks after requests from arparse.y, to provide the MRI
style librarian command syntax + 1 word LIST. */
+#include "sysdep.h"
#include "bfd.h"
-#include "arsup.h"
#include "libiberty.h"
-#include "bucomm.h"
#include "filenames.h"
+#include "bucomm.h"
+#include "arsup.h"
static void map_over_list
(bfd *, void (*function) (bfd *, bfd *), struct list *);
@@ -51,10 +52,10 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
{
bfd *next;
- head = arch->next;
+ head = arch->archive_next;
while (head != NULL)
{
- next = head->next;
+ next = head->archive_next;
function (head, (bfd *) NULL);
head = next;
}
@@ -73,7 +74,7 @@ map_over_list (bfd *arch, void (*function) (bfd *, bfd *), struct list *list)
bfd_boolean found = FALSE;
bfd *prev = arch;
- for (head = arch->next; head; head = head->next)
+ for (head = arch->archive_next; head; head = head->archive_next)
{
if (head->filename != NULL
&& FILENAME_CMP (ptr->name, head->filename) == 0)
@@ -197,7 +198,7 @@ ar_open (char *name, int t)
while (element)
{
*ptr = element;
- ptr = &element->next;
+ ptr = &element->archive_next;
element = bfd_openr_next_archived_file (ibfd, element);
}
}
@@ -213,9 +214,9 @@ ar_addlib_doer (bfd *abfd, bfd *prev)
{
/* Add this module to the output bfd. */
if (prev != NULL)
- prev->next = abfd->next;
+ prev->archive_next = abfd->archive_next;
- abfd->next = obfd->archive_head;
+ abfd->archive_next = obfd->archive_head;
obfd->archive_head = abfd;
}
@@ -261,7 +262,7 @@ ar_addmod (struct list *list)
}
else
{
- abfd->next = obfd->archive_head;
+ abfd->archive_next = obfd->archive_head;
obfd->archive_head = abfd;
}
list = list->next;
@@ -298,13 +299,13 @@ ar_delete (struct list *list)
{
if (FILENAME_CMP(member->filename, list->name) == 0)
{
- *prev = member->next;
+ *prev = member->archive_next;
found = 1;
}
else
- prev = &(member->next);
+ prev = &(member->archive_next);
- member = member->next;
+ member = member->archive_next;
}
if (!found)
@@ -372,15 +373,15 @@ ar_replace (struct list *list)
else
{
*prev = abfd;
- abfd->next = member->next;
+ abfd->archive_next = member->archive_next;
found = 1;
}
}
else
{
- prev = &(member->next);
+ prev = &(member->archive_next);
}
- member = member->next;
+ member = member->archive_next;
}
if (!found)
@@ -423,7 +424,7 @@ ar_list (void)
for (abfd = obfd->archive_head;
abfd != (bfd *)NULL;
- abfd = abfd->next)
+ abfd = abfd->archive_next)
ar_directory_doer (abfd, (bfd *) NULL);
}
}
@@ -462,7 +463,7 @@ ar_extract (struct list *list)
found = 1;
}
- member = member->next;
+ member = member->archive_next;
}
if (!found)
diff --git a/contrib/binutils/binutils/bin2c.c b/contrib/binutils/binutils/bin2c.c
new file mode 100644
index 0000000..b83f02d
--- /dev/null
+++ b/contrib/binutils/binutils/bin2c.c
@@ -0,0 +1,105 @@
+/* bin2c.c -- dump binary file in hex format
+ Copyright 2007 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bucomm.h"
+
+#if !defined O_BINARY && defined _O_BINARY
+ /* For MSC-compatible compilers. */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+
+#ifdef __BEOS__
+ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+
+#if O_BINARY
+# ifndef __DJGPP__
+# define setmode _setmode
+# define fileno(_fp) _fileno (_fp)
+# endif /* not DJGPP */
+# define SET_BINARY(_f) \
+ do { if (!isatty (_f)) setmode (_f, O_BINARY); } while (0)
+#else
+# define SET_BINARY(f) (void) 0
+# define O_BINARY 0
+# define O_TEXT 0
+#endif /* O_BINARY */
+
+int
+main (int argc, char *argv[])
+{
+ int c;
+ int i;
+
+#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);
+
+ if (argc != 1)
+ {
+ int ishelp = 0;
+ int isvers = 0;
+ FILE *stream;
+
+ if (argc == 2 && argv[1][0] == '-')
+ {
+ const char *opt = &argv[1][1];
+ if (*opt == '-')
+ ++opt;
+ ishelp = *opt == 'h' || *opt == 'H';
+ isvers = *opt == 'v' || *opt == 'V';
+ }
+
+ if (isvers)
+ print_version ("bin2c");
+
+ stream = ishelp ? stdout : stderr;
+ fprintf (stream, _("Usage: %s < input_file > output_file\n"), argv[0]);
+ fprintf (stream, _("Prints bytes from stdin in hex format.\n"));
+ exit (!ishelp);
+ }
+
+ SET_BINARY (fileno (stdin));
+
+ i = 0;
+ while ((c = getc (stdin)) != EOF)
+ {
+ printf ("0x%02x,", c);
+ if (++i == 16)
+ {
+ printf ("\n");
+ i = 0;
+ }
+ }
+ if (i != 0)
+ printf ("\n");
+
+ exit (0);
+}
diff --git a/contrib/binutils/binutils/binemul.c b/contrib/binutils/binutils/binemul.c
index 7dac32d..83740d0 100644
--- a/contrib/binutils/binutils/binemul.c
+++ b/contrib/binutils/binutils/binemul.c
@@ -58,7 +58,7 @@ ar_emul_default_append (bfd **after_bfd, char *file_name,
AR_EMUL_ELEMENT_CHECK (*after_bfd, file_name);
AR_EMUL_APPEND_PRINT_VERBOSE (verbose, file_name);
- (*after_bfd)->next = temp;
+ (*after_bfd)->archive_next = temp;
return TRUE;
}
@@ -84,7 +84,7 @@ ar_emul_default_replace (bfd **after_bfd, char *file_name,
AR_EMUL_ELEMENT_CHECK (*after_bfd, file_name);
AR_EMUL_REPLACE_PRINT_VERBOSE (verbose, file_name);
- (*after_bfd)->next = temp;
+ (*after_bfd)->archive_next = temp;
return TRUE;
}
diff --git a/contrib/binutils/binutils/binemul.h b/contrib/binutils/binutils/binemul.h
index 53bbbd2..c5d8c78 100644
--- a/contrib/binutils/binutils/binemul.h
+++ b/contrib/binutils/binutils/binemul.h
@@ -1,5 +1,5 @@
/* Binutils emulation layer.
- Copyright 2002, 2003 Free Software Foundation, Inc.
+ Copyright 2002, 2003, 2007 Free Software Foundation, Inc.
Written by Tom Rix, Red Hat Inc.
This file is part of GNU Binutils.
@@ -21,6 +21,7 @@
#ifndef BINEMUL_H
#define BINEMUL_H
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
diff --git a/contrib/binutils/binutils/bucomm.c b/contrib/binutils/binutils/bucomm.c
index 03a4d28..a4c11f0 100644
--- a/contrib/binutils/binutils/bucomm.c
+++ b/contrib/binutils/binutils/bucomm.c
@@ -1,5 +1,6 @@
/* bucomm.c -- Bin Utils COMmon code.
- Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
+ 2003, 2006, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -22,16 +23,16 @@
/* We might put this in a library someday so it could be dynamically
loaded, but for now it's not necessary. */
+#include "sysdep.h"
#include "bfd.h"
-#include "bfdver.h"
#include "libiberty.h"
-#include "bucomm.h"
#include "filenames.h"
#include "libbfd.h"
#include <sys/stat.h>
#include <time.h> /* ctime, maybe time_t */
#include <assert.h>
+#include "bucomm.h"
#ifndef HAVE_TIME_T_IN_TIME_H
#ifndef HAVE_TIME_T_IN_TYPES_H
@@ -386,55 +387,103 @@ print_arelt_descr (FILE *file, bfd *abfd, bfd_boolean verbose)
fprintf (file, "%s\n", bfd_get_filename (abfd));
}
-/* Return the name of a temporary file in the same directory as FILENAME. */
+/* Return a path for a new temporary file in the same directory
+ as file PATH. */
-char *
-make_tempname (char *filename)
+static char *
+template_in_dir (const char *path)
{
- static char template[] = "stXXXXXX";
+#define template "stXXXXXX"
+ const char *slash = strrchr (path, '/');
char *tmpname;
- char *slash = strrchr (filename, '/');
+ size_t len;
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
{
/* We could have foo/bar\\baz, or foo\\bar, or d:bar. */
- char *bslash = strrchr (filename, '\\');
+ char *bslash = strrchr (path, '\\');
+
if (slash == NULL || (bslash != NULL && bslash > slash))
slash = bslash;
- if (slash == NULL && filename[0] != '\0' && filename[1] == ':')
- slash = filename + 1;
+ if (slash == NULL && path[0] != '\0' && path[1] == ':')
+ slash = path + 1;
}
#endif
if (slash != (char *) NULL)
{
- char c;
+ len = slash - path;
+ tmpname = xmalloc (len + sizeof (template) + 2);
+ memcpy (tmpname, path, len);
- c = *slash;
- *slash = 0;
- tmpname = xmalloc (strlen (filename) + sizeof (template) + 2);
- strcpy (tmpname, filename);
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
/* If tmpname is "X:", appending a slash will make it a root
directory on drive X, which is NOT the same as the current
directory on drive X. */
- if (tmpname[1] == ':' && tmpname[2] == '\0')
- strcat (tmpname, ".");
+ if (len == 2 && tmpname[1] == ':')
+ tmpname[len++] = '.';
#endif
- strcat (tmpname, "/");
- strcat (tmpname, template);
- mktemp (tmpname);
- *slash = c;
+ tmpname[len++] = '/';
}
else
{
tmpname = xmalloc (sizeof (template));
- strcpy (tmpname, template);
- mktemp (tmpname);
+ len = 0;
}
+
+ memcpy (tmpname + len, template, sizeof (template));
+ return tmpname;
+#undef template
+}
+
+/* Return the name of a created temporary file in the same directory
+ as FILENAME. */
+
+char *
+make_tempname (char *filename)
+{
+ char *tmpname = template_in_dir (filename);
+ int fd;
+
+#ifdef HAVE_MKSTEMP
+ fd = mkstemp (tmpname);
+#else
+ tmpname = mktemp (tmpname);
+ if (tmpname == NULL)
+ return NULL;
+ fd = open (tmpname, O_RDWR | O_CREAT | O_EXCL, 0600);
+#endif
+ if (fd == -1)
+ return NULL;
+ close (fd);
return tmpname;
}
+/* Return the name of a created temporary directory inside the
+ directory containing FILENAME. */
+
+char *
+make_tempdir (char *filename)
+{
+ char *tmpname = template_in_dir (filename);
+
+#ifdef HAVE_MKDTEMP
+ return mkdtemp (tmpname);
+#else
+ tmpname = mktemp (tmpname);
+ if (tmpname == NULL)
+ return NULL;
+#if defined (_WIN32) && !defined (__CYGWIN32__)
+ if (mkdir (tmpname) != 0)
+ return NULL;
+#else
+ if (mkdir (tmpname, 0700) != 0)
+ return NULL;
+#endif
+ return tmpname;
+#endif
+}
+
/* Parse a string into a VMA, with a fatal error if it can't be
parsed. */
diff --git a/contrib/binutils/binutils/bucomm.h b/contrib/binutils/binutils/bucomm.h
index 9f914ad..95ed2ec 100644
--- a/contrib/binutils/binutils/bucomm.h
+++ b/contrib/binutils/binutils/bucomm.h
@@ -1,6 +1,6 @@
/* bucomm.h -- binutils common include file.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -21,159 +21,6 @@
#ifndef _BUCOMM_H
#define _BUCOMM_H
-#include "ansidecl.h"
-#include <stdio.h>
-#include <sys/types.h>
-
-#include "config.h"
-#include "bin-bugs.h"
-
-#include <stdarg.h>
-
-#ifdef USE_BINARY_FOPEN
-#include "fopen-bin.h"
-#else
-#include "fopen-same.h"
-#endif
-
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#else
-extern char *strchr ();
-extern char *strrchr ();
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#else
-#ifdef HAVE_SYS_FILE_H
-#include <sys/file.h>
-#endif
-#endif
-
-#if !HAVE_DECL_STPCPY
-extern char *stpcpy (char *, const char *);
-#endif
-
-#if !HAVE_DECL_STRSTR
-extern char *strstr ();
-#endif
-
-#ifdef HAVE_SBRK
-#if !HAVE_DECL_SBRK
-extern char *sbrk ();
-#endif
-#endif
-
-#if !HAVE_DECL_GETENV
-extern char *getenv ();
-#endif
-
-#if !HAVE_DECL_ENVIRON
-extern char **environ;
-#endif
-
-#if !HAVE_DECL_FPRINTF
-extern int fprintf (FILE *, const char *, ...);
-#endif
-
-#if !HAVE_DECL_SNPRINTF
-extern int snprintf(char *, size_t, const char *, ...);
-#endif
-
-#if !HAVE_DECL_VSNPRINTF
-extern int vsnprintf(char *, size_t, const char *, va_list);
-#endif
-
-#ifndef O_RDONLY
-#define O_RDONLY 0
-#endif
-
-#ifndef O_RDWR
-#define O_RDWR 2
-#endif
-
-#ifndef SEEK_SET
-#define SEEK_SET 0
-#endif
-#ifndef SEEK_CUR
-#define SEEK_CUR 1
-#endif
-#ifndef SEEK_END
-#define SEEK_END 2
-#endif
-
-#if defined(__GNUC__) && !defined(C_ALLOCA)
-# undef alloca
-# define alloca __builtin_alloca
-#else
-# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
-# include <alloca.h>
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-# if !defined (__STDC__) && !defined (__hpux)
-char *alloca ();
-# else
-void *alloca ();
-# endif /* __STDC__, __hpux */
-# endif /* alloca */
-# endif /* HAVE_ALLOCA_H */
-#endif
-
-
-#ifdef HAVE_LOCALE_H
-# ifndef ENABLE_NLS
- /* The Solaris version of locale.h always includes libintl.h. If we have
- been configured with --disable-nls then ENABLE_NLS will not be defined
- and the dummy definitions of bindtextdomain (et al) below will conflict
- with the defintions in libintl.h. So we define these values to prevent
- the bogus inclusion of libintl.h. */
-# define _LIBINTL_H
-# define _LIBGETTEXT_H
-# endif
-# include <locale.h>
-#endif
-
-#ifdef ENABLE_NLS
-# include <libintl.h>
-# define _(String) gettext (String)
-# ifdef gettext_noop
-# define N_(String) gettext_noop (String)
-# else
-# define N_(String) (String)
-# endif
-#else
-# define gettext(Msgid) (Msgid)
-# define dgettext(Domainname, Msgid) (Msgid)
-# define dcgettext(Domainname, Msgid, Category) (Msgid)
-# define textdomain(Domainname) while (0) /* nothing */
-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
-# define _(String) (String)
-# define N_(String) (String)
-#endif
-
-/* Used by ar.c and objcopy.c. */
-#define BUFSIZE 8192
-
-/* bucomm.c */
-
/* Return the filename in a static buffer. */
const char *bfd_get_archive_filename (bfd *);
@@ -200,6 +47,7 @@ int display_info (void);
void print_arelt_descr (FILE *, bfd *, bfd_boolean);
char *make_tempname (char *);
+char *make_tempdir (char *);
bfd_vma parse_vma (const char *, const char *);
diff --git a/contrib/binutils/binutils/budemang.c b/contrib/binutils/binutils/budemang.c
deleted file mode 100644
index 55f10b7..0000000
--- a/contrib/binutils/binutils/budemang.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/* demangle.c -- A wrapper calling libiberty cplus_demangle
- Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
-
- This file is part of GNU Binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "config.h"
-#include <stdlib.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#include "bfd.h"
-#include "libiberty.h"
-#include "demangle.h"
-#include "budemang.h"
-
-/* Wrapper around cplus_demangle. Strips leading underscores and
- other such chars that would otherwise confuse the demangler. */
-
-char *
-demangle (bfd *abfd, const char *name)
-{
- char *res, *alloc;
- const char *pre, *suf;
- size_t pre_len;
-
- if (abfd != NULL && bfd_get_symbol_leading_char (abfd) == name[0])
- ++name;
-
- /* 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 to avoid
- confusing the demangler. */
- pre = name;
- while (*name == '.')
- ++name;
- pre_len = name - pre;
-
- alloc = NULL;
- suf = strchr (name, '@');
- if (suf != NULL)
- {
- alloc = xmalloc (suf - name + 1);
- memcpy (alloc, name, suf - name);
- alloc[suf - name] = '\0';
- name = alloc;
- }
-
- res = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS);
- if (res != NULL)
- {
- /* Now put back any suffix, or stripped dots. */
- if (pre_len != 0 || suf != NULL)
- {
- size_t len;
- size_t suf_len;
- char *final;
-
- if (alloc != NULL)
- free (alloc);
-
- len = strlen (res);
- if (suf == NULL)
- suf = res + len;
- suf_len = strlen (suf) + 1;
- final = xmalloc (pre_len + len + suf_len);
-
- memcpy (final, pre, pre_len);
- memcpy (final + pre_len, res, len);
- memcpy (final + pre_len + len, suf, suf_len);
- free (res);
- res = final;
- }
-
- return res;
- }
-
- if (alloc != NULL)
- free (alloc);
-
- return xstrdup (pre);
-}
diff --git a/contrib/binutils/binutils/coffdump.c b/contrib/binutils/binutils/coffdump.c
index 5ec23b4..7b6ead4 100644
--- a/contrib/binutils/binutils/coffdump.c
+++ b/contrib/binutils/binutils/coffdump.c
@@ -1,5 +1,5 @@
/* Coff file dumper.
- Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -23,11 +23,12 @@
This module reads a type tree generated by coffgrok and prints
it out so we can test the grokker. */
+#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
+#include "bucomm.h"
#include "coffgrok.h"
-#include "bucomm.h"
#include "getopt.h"
static int atnl;
@@ -462,7 +463,7 @@ show_usage (FILE *file, int status)
-v --version Display the program's version\n\
\n"));
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
diff --git a/contrib/binutils/binutils/coffgrok.c b/contrib/binutils/binutils/coffgrok.c
index a6c05b1..a1e89e12 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, 2001, 2002, 2003, 2004
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -26,13 +26,15 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
-#include "bucomm.h"
#include "coff/internal.h"
#include "../bfd/libcoff.h"
+#include "bucomm.h"
#include "coffgrok.h"
+
static int lofile = 1;
static struct coff_scope *top_scope;
static struct coff_scope *file_scope;
diff --git a/contrib/binutils/binutils/config.in b/contrib/binutils/binutils/config.in
index 93d8e95..6183c37 100644
--- a/contrib/binutils/binutils/config.in
+++ b/contrib/binutils/binutils/config.in
@@ -8,7 +8,8 @@
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
-/* Define to 1 if NLS is requested */
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
#undef ENABLE_NLS
/* Suffix used for executables, if any. */
@@ -21,12 +22,6 @@
*/
#undef HAVE_ALLOCA_H
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define to 1 if you have the `dcgettext' function. */
-#undef HAVE_DCGETTEXT
-
/* Define to 1 if you have the declaration of `environ', and to 0 if you
don't. */
#undef HAVE_DECL_ENVIRON
@@ -66,6 +61,9 @@
don't. */
#undef HAVE_DECL_VSNPRINTF
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
/* Does the platform use an executable suffix? */
#undef HAVE_EXECUTABLE_SUFFIX
@@ -75,60 +73,33 @@
/* Is fopen64 available? */
#undef HAVE_FOPEN64
-/* Define to 1 if you have the `getcwd' function. */
-#undef HAVE_GETCWD
-
/* Define to 1 if you have the `getc_unlocked' function. */
#undef HAVE_GETC_UNLOCKED
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
/* Does <utime.h> define struct utimbuf? */
#undef HAVE_GOOD_UTIME_H
+/* Define if you have the iconv() function. */
+#undef HAVE_ICONV
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
+/* Define to 1 if you have the `mkdtemp' function. */
+#undef HAVE_MKDTEMP
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
-
-/* Define to 1 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
/* Define to 1 if you have the `setmode' function. */
#undef HAVE_SETMODE
@@ -141,15 +112,6 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
/* Define to 1 if you have the `strcoll' function. */
#undef HAVE_STRCOLL
@@ -186,17 +148,12 @@
/* Define to 1 if you have the `utimes' function. */
#undef HAVE_UTIMES
-/* Define to 1 if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
-
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
@@ -250,18 +207,3 @@
/* Enable LFS */
#undef _LARGEFILE64_SOURCE
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* 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/binutils/configure b/contrib/binutils/binutils/configure
index 2d8e0cb..a10a8ad 100755
--- a/contrib/binutils/binutils/configure
+++ b/contrib/binutils/binutils/configure
@@ -241,6 +241,155 @@ IFS=" $as_nl"
$as_unset CDPATH
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
@@ -309,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL WARN_CFLAGS NO_WERROR YACC LEX LEXLIB LEX_OUTPUT_ROOT CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT HDEFINES AR CC_FOR_BUILD EXEEXT_FOR_BUILD DEMANGLER_NAME NLMCONV_DEFS BUILD_NLMCONV BUILD_SRCONV BUILD_DLLTOOL DLLTOOL_DEFS BUILD_WINDRES BUILD_DLLWRAP BUILD_MISC OBJDUMP_DEFS EMULATION EMULATION_VECTOR datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO CPP WARN_CFLAGS NO_WERROR YACC LEX LEXLIB LEX_OUTPUT_ROOT USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GENINSRC_NEVER_TRUE GENINSRC_NEVER_FALSE HDEFINES CC_FOR_BUILD EXEEXT_FOR_BUILD DEMANGLER_NAME ALLOCA LIBICONV LTLIBICONV NLMCONV_DEFS BUILD_NLMCONV BUILD_SRCONV BUILD_DLLTOOL DLLTOOL_DEFS BUILD_WINDRES BUILD_WINDMC BUILD_DLLWRAP BUILD_MISC BUILD_INSTALL_MISC OBJDUMP_DEFS EMULATION EMULATION_VECTOR datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -852,24 +1001,31 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared=PKGS build shared libraries default=yes
- --enable-static=PKGS build static libraries default=yes
- --enable-fast-install=PKGS optimize for fast installation default=yes
+ --enable-shared[=PKGS]
+ build shared libraries [default=yes]
+ --enable-static[=PKGS]
+ build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-targets alternative target configurations
--enable-commonbfdlib build shared BFD/opcodes/libiberty library
- --enable-werror treat compile warnings as errors
- --enable-build-warnings Enable build-time compiler warnings
+ --enable-werror treat compile warnings as errors
+ --enable-build-warnings enable build-time compiler warnings
--disable-nls do not use Native Language Support
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
+ --disable-rpath do not hardcode runtime library paths
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-gnu-ld assume the C compiler uses GNU ld default=no
- --with-pic try to use only PIC/non-PIC objects default=use both
- --with-included-gettext use the GNU gettext library included here
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
Some influential environment variables:
CC C compiler command
@@ -3072,1178 +3228,6 @@ fi
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
- enableval="$enable_shared"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_shared=yes
-fi;
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
- enableval="$enable_static"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_static=yes
-fi;
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
- enableval="$enable_fast_install"
- p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
-else
- enable_fast_install=yes
-fi;
-
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
-else
- with_gnu_ld=no
-fi;
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $ac_prog in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
- done
- test -z "$LD" && LD="$ac_prog"
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ac_prog=ld
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
-elif test "$with_gnu_ld" = yes; then
- echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
- echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
-fi
-if test "${lt_cv_path_LD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- 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 "$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
- fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
- { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-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
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
-if test "${lt_cv_path_NM+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- 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
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- 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
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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 "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi
-fi
-
-NM="$lt_cv_path_NM"
-echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
-
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
- echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
-fi
-
-echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
-if test "${lt_cv_deplibs_check_method+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- # this will be overwritten by pass_all, but leave it in just in case
- 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
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | kfreebsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20*|hpux11*)
- case $host_cpu in
- hppa*)
- 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
- ;;
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd* | knetbsd*-gnu)
- 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='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'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case $host_vendor in
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- esac
- ;;
-esac
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-
-
-
-
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
- esac
-
-fi
-
-if test -n "$lt_cv_sys_max_cmd_len" ; then
- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
-
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_STRIP="${ac_tool_prefix}strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_STRIP="strip"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- STRIP=$ac_ct_STRIP
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$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.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
-
-fi;
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi;
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 3870 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- lt_cv_cc_needs_belf=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-lt_cv_cc_needs_belf=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
-echo "$as_me: error: libtool configure failed" >&2;}
- { (exit 1); exit 1; }; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-
-# Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
-echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
-if test "${enable_commonbfdlib+set}" = set; then
- enableval="$enable_commonbfdlib"
- case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for BFD commonbfdlib option" >&5
-echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-fi;
-
-GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-
-# Check whether --enable-werror or --disable-werror was given.
-if test "${enable_werror+set}" = set; then
- enableval="$enable_werror"
- case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
-echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
-fi;
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-NO_WERROR=
-if test "${ERROR_ON_WARNING}" = yes ; then
- GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
- NO_WERROR="-Wno-error"
-fi
-
-if test "${GCC}" = yes ; then
- WARN_CFLAGS="${GCC_WARN_CFLAGS}"
-fi
-
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
- enableval="$enable_build_warnings"
- case "${enableval}" in
- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
- no) if test "${GCC}" = yes ; then
- WARN_CFLAGS="-w"
- fi;;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-fi;
-
-if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
- echo "Setting warning flags = $WARN_CFLAGS" 6>&1
-fi
-
-
-
-
-
- ac_config_headers="$ac_config_headers config.h:config.in"
-
-
-if test -z "$target" ; then
- { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
-echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "$host" ; then
- { { echo "$as_me:$LINENO: error: Unrecognized host system type; please check config.sub." >&5
-echo "$as_me: error: Unrecognized host system type; please check config.sub." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4980,17 +3964,444 @@ _ACEOF
-for ac_prog in 'bison -y' byacc
+
+macro_version='2.1a'
+macro_revision='1.2435'
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Set options
+
+enable_dlopen=no
+
+
+enable_win32_dll=no
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval="$enable_shared"
+ p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi;
+
+
+
+
+
+
+
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval="$enable_static"
+ p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi;
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi;
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval="$enable_fast_install"
+ p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi;
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for fgrep" >&5
+echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
+if test "${ac_cv_prog_fgrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
+ then ac_cv_prog_fgrep='grep -F'
+ else ac_cv_prog_fgrep='fgrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
+echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
+ FGREP=$ac_cv_prog_fgrep
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi;
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ 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 variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
+if test "${lt_cv_path_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_YACC+set}" = set; then
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$YACC"; then
- ac_cv_prog_YACC="$YACC" # Let the user override the test.
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -4999,7 +4410,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_YACC="$ac_prog"
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -5008,30 +4419,31 @@ done
fi
fi
-YACC=$ac_cv_prog_YACC
-if test -n "$YACC"; then
- echo "$as_me:$LINENO: result: $YACC" >&5
-echo "${ECHO_T}$YACC" >&6
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+echo "${ECHO_T}$DUMPBIN" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- test -n "$YACC" && break
-done
-test -n "$YACC" || YACC="yacc"
-
-for ac_prog in flex lex
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_LEX+set}" = set; then
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$LEX"; then
- ac_cv_prog_LEX="$LEX" # Let the user override the test.
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -5040,7 +4452,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_LEX="$ac_prog"
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -5049,257 +4461,681 @@ done
fi
fi
-LEX=$ac_cv_prog_LEX
-if test -n "$LEX"; then
- echo "$as_me:$LINENO: result: $LEX" >&5
-echo "${ECHO_T}$LEX" >&6
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- test -n "$LEX" && break
+ test -n "$ac_ct_DUMPBIN" && break
done
-test -n "$LEX" || LEX=":"
+test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
-if test -z "$LEXLIB"
-then
- echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
-echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
-if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+ DUMPBIN=$ac_ct_DUMPBIN
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
+if test "${lt_cv_nm_interface+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lfl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char yywrap ();
-int
-main ()
-{
-yywrap ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:4499: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_fl_yywrap=yes
+ (eval echo "\"\$as_me:4502: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4505: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+echo "${ECHO_T}$lt_cv_nm_interface" >&6
+
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
+ if test -n $lt_cv_sys_max_cmd_len; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
-ac_cv_lib_fl_yywrap=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
-echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
-if test $ac_cv_lib_fl_yywrap = yes; then
- LEXLIB="-lfl"
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+echo "$as_me:$LINENO: result: $xsi_shell" >&5
+echo "${ECHO_T}$xsi_shell" >&6
+
+
+echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+echo "${ECHO_T}$lt_shell_append" >&6
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
else
- echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
-echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
-if test "${ac_cv_lib_l_yywrap+set}" = set; then
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ll $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+ lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char yywrap ();
-int
-main ()
-{
-yywrap ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_l_yywrap=yes
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ 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_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ 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
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ 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*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
-ac_cv_lib_l_yywrap=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
-echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
-if test $ac_cv_lib_l_yywrap = yes; then
- LEXLIB="-ll"
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-if test "x$LEX" != "x:"; then
- echo "$as_me:$LINENO: checking lex output file root" >&5
-echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
-if test "${ac_cv_prog_lex_root+set}" = set; then
+ AR=$ac_ct_AR
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # The minimal lex program is just a single line: %%. But some broken lexes
-# (Solaris, I think it was) want two %% lines, so accommodate them.
-cat >conftest.l <<_ACEOF
-%%
-%%
-_ACEOF
-{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
- (eval $LEX conftest.l) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-if test -f lex.yy.c; then
- ac_cv_prog_lex_root=lex.yy
-elif test -f lexyy.c; then
- ac_cv_prog_lex_root=lexyy
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
- { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
-echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
- { (exit 1); exit 1; }; }
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
-rm -f conftest.l
-LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
-echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
-if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # POSIX says lex can declare yytext either as a pointer or an array; the
-# default is implementation-dependent. Figure out which it is, since
-# not all implementations provide the %pointer and %array declarations.
-ac_cv_prog_lex_yytext_pointer=no
-echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
-ac_save_LIBS=$LIBS
-LIBS="$LIBS $LEXLIB"
-cat >conftest.$ac_ext <<_ACEOF
-`cat $LEX_OUTPUT_ROOT.c`
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_lex_yytext_pointer=yes
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+ test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_save_LIBS
-rm -f "${LEX_OUTPUT_ROOT}.c"
+ STRIP=$ac_ct_STRIP
+else
+ STRIP="$ac_cv_prog_STRIP"
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
-echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
-if test $ac_cv_prog_lex_yytext_pointer = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define YYTEXT_POINTER 1
-_ACEOF
+test -z "$STRIP" && STRIP=:
+
+
+
-fi
-fi
-if test "$LEX" = :; then
- LEX=${am_missing_run}flex
-fi
-ALL_LINGUAS="fr tr ja es sv da zh_CN ru ro rw zh_TW fi vi"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
@@ -5380,6 +5216,533 @@ else
RANLIB="$ac_cv_prog_RANLIB"
fi
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+ echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 5560 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ lt_cv_cc_needs_belf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5615,21 +5978,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
@@ -5796,132 +6144,34 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-fi
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
+$ac_includes_default
+#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5945,47 +6195,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
+ eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- ;;
-esac
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
+fi
+done
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+for ac_header in dlfcn.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -6046,98 +6278,1364 @@ fi
done
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
-ac_cv_type_off_t=no
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
fi
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6660: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6664: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic='-qnocommon'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6982: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6986: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works=yes
+ fi
+ else
+ lt_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7087: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:7091: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:7142: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:7146: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ 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 <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 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'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # 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 | $GREP '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
+ aix_use_runtimelinking=no
+
+ # 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 runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # 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.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$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
+ :
+ 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'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ 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
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+
int
main ()
{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -6151,51 +7649,55 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; 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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <alloca.h>
+
int
main ()
{
-char *p = (char *) alloca (2 * sizeof (int));
+
;
return 0;
}
@@ -6222,65 +7724,277 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_working_alloca_h=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
-fi
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[012])
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ ;;
+ esac
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ if test "$GCC" = yes ; then
+ if test "${lt_cv_apple_cc_single_mod+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#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
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi-module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm libconftest.dylib
+ fi
+ rm conftest.$ac_ext
+ fi
+fi
-int
-main ()
-{
-char *p = (char *) alloca (1);
- ;
- return 0;
-}
+ output_verbose_link_cmd=echo
+ if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
+ archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd=echo
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ 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'
+ else
+ 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'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -6304,122 +8018,933 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_alloca_works=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
-if test $ac_cv_func_alloca_works = yes; then
+ netbsd*)
+ 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
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
-else
- # 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.
+ *nto* | *qnx*)
+ ;;
-ALLOCA=alloca.$ac_objext
+ openbsd*)
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
-fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ 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'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+withGCC=$GCC
+if test "$withGCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ 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.
+ 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
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # 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.
+ 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}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ if test "$host_cpu" = m68k; then
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ else
+ dynamic_linker=no
+ fi
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $withGCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
int
main ()
{
-return f != $ac_func;
+
;
return 0;
}
@@ -6446,126 +8971,425 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
+ shlibpath_overrides_runpath=yes
+fi
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
- break
-fi
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
- done
-fi
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
else
- return (&dummy > addr) ? 1 : -1;
-}
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
-int
-main ()
-{
- exit (find_stack_direction () < 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
-fi
-for ac_header in stdlib.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -6579,122 +9403,41 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_dl_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
fi
-done
-
+ ;;
-for ac_func in getpagesize
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+ *)
+ echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6703,12 +9446,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+#define shl_load innocuous_shl_load
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
+ which can conflict with char shl_load (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -6718,7 +9461,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef $ac_func
+#undef shl_load
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -6727,14 +9470,14 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
+char shl_load ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
choke me
#else
-char (*f) () = $ac_func;
+char (*f) () = shl_load;
#endif
#ifdef __cplusplus
}
@@ -6743,7 +9486,7 @@ char (*f) () = $ac_func;
int
main ()
{
-return f != $ac_func;
+return f != shl_load;
;
return 0;
}
@@ -6770,239 +9513,53 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_func_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_shl_load=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-echo "$as_me:$LINENO: checking for working mmap" >&5
-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !STDC_HEADERS && !HAVE_STDLIB_H
-char *malloc ();
-#endif
-
-/* This mess was copied from the GNU getpagesize.h. */
-#if !HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h. */
-# if !HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
int
main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize ();
-
- /* First, make a file with some known garbage in it. */
- data = (char *) malloc (pagesize);
- if (!data)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- exit (1);
- if (write (fd, data, pagesize) != pagesize)
- exit (1);
- close (fd);
-
- /* Next, try to mmap the file at a fixed address which already has
- something else allocated at it. If we can, also make sure that
- we see the same garbage. */
- fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- exit (1);
- data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- exit (1);
- data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit (1);
-
- /* Finally, make sure that changes to the mapped area do not
- percolate back to the file as seen by read(). (This is a bug on
- some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- exit (1);
- if (read (fd, data3, pagesize) != pagesize)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit (1);
- close (fd);
- exit (0);
+shl_load ();
+ ;
+ return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
-
-fi
-rm -f conftest.mmap
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7016,132 +9573,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dld_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_dld_shl_load=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7150,12 +9606,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+#define dlopen innocuous_dlopen
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
+ which can conflict with char dlopen (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -7165,7 +9621,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef $ac_func
+#undef dlopen
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -7174,14 +9630,14 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
+char dlopen ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
choke me
#else
-char (*f) () = $ac_func;
+char (*f) () = dlopen;
#endif
#ifdef __cplusplus
}
@@ -7190,7 +9646,7 @@ char (*f) () = $ac_func;
int
main ()
{
-return f != $ac_func;
+return f != dlopen;
;
return 0;
}
@@ -7217,84 +9673,46 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_func_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
-
-for ac_func in stpcpy
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
-{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+char dlopen ();
int
main ()
{
-return f != $ac_func;
+dlopen ();
;
return 0;
}
@@ -7321,52 +9739,47 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STPCPY 1
-_ACEOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <locale.h>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
int
main ()
{
-return LC_MESSAGES
+dlopen ();
;
return 0;
}
@@ -7393,85 +9806,54 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
+ ac_cv_lib_svld_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-am_cv_val_LC_MESSAGES=no
+ac_cv_lib_svld_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
-
- fi
- fi
- echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
-else
- USE_NLS=yes
-fi;
- echo "$as_me:$LINENO: result: $USE_NLS" >&5
-echo "${ECHO_T}$USE_NLS" >&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
-echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-
-# Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
- nls_cv_force_use_gnu_gettext=no
-fi;
- echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
-echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=
-
- if test "${ac_cv_header_libintl_h+set}" = set; then
- echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking libintl.h usability" >&5
-echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <libintl.h>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7485,170 +9867,588 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dld_dld_link=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking libintl.h presence" >&5
-echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
else
- ac_cpp_err=
+ enable_dlopen=no
fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cpp_err=yes
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9939 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 10039 "configure"
+#include "confdefs.h"
- ac_header_preproc=no
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+rm -fr conftest*
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+if test "${enable_commonbfdlib+set}" = set; then
+ enableval="$enable_commonbfdlib"
+ case "${enableval}" in
+ yes) commonbfdlib=true ;;
+ no) commonbfdlib=false ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for BFD commonbfdlib option" >&5
+echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
+ { (exit 1); exit 1; }; } ;;
esac
-echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
+fi;
+
+GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Check whether --enable-werror or --disable-werror was given.
+if test "${enable_werror+set}" = set; then
+ enableval="$enable_werror"
+ case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+fi;
+
+# Enable -Werror by default when using gcc
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ ERROR_ON_WARNING=yes
+fi
+
+NO_WERROR=
+if test "${ERROR_ON_WARNING}" = yes ; then
+ GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+ NO_WERROR="-Wno-error"
+fi
+
+if test "${GCC}" = yes ; then
+ WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+fi
+
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+esac
+fi;
+
+if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
+ echo "Setting warning flags = $WARN_CFLAGS" 6>&1
+fi
+
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h:config.in"
+
+
+if test -z "$target" ; then
+ { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "$host" ; then
+ { { echo "$as_me:$LINENO: error: Unrecognized host system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized host system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+for ac_prog in 'bison -y' byacc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_header_libintl_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_YACC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
fi
-if test $ac_cv_header_libintl_h = yes; then
- echo "$as_me:$LINENO: checking for gettext in libc" >&5
-echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libc+set}" = set; then
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+for ac_prog in flex lex
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-int
-main ()
-{
-return (int) gettext ("")
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- gt_cv_func_gettext_libc=yes
+ if test -n "$LEX"; then
+ ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LEX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-gt_cv_func_gettext_libc=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+ echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+if test -z "$LEXLIB"
+then
+ echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_yywrap+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl $LIBS"
+LIBS="-lfl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7662,11 +10462,11 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char bindtextdomain ();
+char yywrap ();
int
main ()
{
-bindtextdomain ();
+yywrap ();
;
return 0;
}
@@ -7693,36 +10493,47 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_intl_bindtextdomain=yes
+ ac_cv_lib_fl_yywrap=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_intl_bindtextdomain=no
+ac_cv_lib_fl_yywrap=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
-if test $ac_cv_lib_intl_bindtextdomain = yes; then
- echo "$as_me:$LINENO: checking for gettext in libintl" >&5
-echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libintl+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+if test $ac_cv_lib_fl_yywrap = yes; then
+ LEXLIB="-lfl"
+else
+ echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+if test "${ac_cv_lib_l_yywrap+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ll $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char yywrap ();
int
main ()
{
-return (int) gettext ("")
+yywrap ();
;
return 0;
}
@@ -7749,124 +10560,73 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gt_cv_func_gettext_libintl=yes
+ ac_cv_lib_l_yywrap=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gt_cv_func_gettext_libintl=no
+ac_cv_lib_l_yywrap=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
+echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+if test $ac_cv_lib_l_yywrap = yes; then
+ LEXLIB="-ll"
fi
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
+fi
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
+fi
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
+if test "x$LEX" != "x:"; then
+ echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_root+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
+ # The minimal lex program is just a single line: %%. But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+cat >conftest.l <<_ACEOF
+%%
+%%
+_ACEOF
+{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+ (eval $LEX conftest.l) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+if test -f lex.yy.c; then
+ ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+ ac_cv_prog_lex_root=lexyy
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+ { (exit 1); exit 1; }; }
fi
- if test "$MSGFMT" != "no"; then
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+rm -f conftest.l
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
-for ac_func in dcgettext
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
+ # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS=$LIBS
+LIBS="$LIBS $LEXLIB"
+cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -7890,170 +10650,166 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_prog_lex_yytext_pointer=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define YYTEXT_POINTER 1
_ACEOF
fi
-done
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
fi
-GMSGFMT=$ac_cv_path_GMSGFMT
+if test "$LEX" = :; then
+ LEX=${am_missing_run}flex
+fi
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
+ALL_LINGUAS="fr tr ja es sv da zh_CN ru ro rw zh_TW fi vi"
+# If we haven't got the data from the intl directory,
+# assume NLS is disabled.
+USE_NLS=no
+LIBINTL=
+LIBINTL_DEP=
+INCINTL=
+XGETTEXT=
+GMSGFMT=
+POSUB=
+
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
+fi
+echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+if test x"$USE_NLS" != xyes; then
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS=
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
+ esac
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
fi
done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+ LINGUAS="$XLINGUAS"
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ DATADIRNAME=share
+
+ INSTOBJEXT=.mo
+
+ GENCAT=gencat
+
CATOBJEXT=.gmo
- DATADIRNAME=share
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-CATOBJEXT=.mo
- DATADIRNAME=lib
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- INSTOBJEXT=.mo
- fi
- fi
-fi
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
- # Neither gettext nor catgets in included in the C library.
- # Fall back on GNU gettext library (assuming it is present).
- nls_cv_use_gnu_gettext=yes
- fi
- fi
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8061,27 +10817,31 @@ if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
+if test "$MSGFMT" != ":"; then
echo "$as_me:$LINENO: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
@@ -8089,7 +10849,7 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8129,7 +10889,37 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "xgettext", so it can be a program name with args.
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8137,27 +10927,31 @@ if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
+ ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
+if test "$XGETTEXT" != ":"; then
echo "$as_me:$LINENO: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
@@ -8165,282 +10959,103 @@ else
echo "${ECHO_T}no" >&6
fi
+ rm -f messages.po
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
-
-
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
- fi
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$as_me:$LINENO: result: $LINGUAS" >&5
-echo "${ECHO_T}$LINGUAS" >&6
- fi
-
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking linux/version.h usability" >&5
-echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <linux/version.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking linux/version.h presence" >&5
-echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <linux/version.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- ac_cpp_err=
+ PATH_SEPARATOR=:
fi
-else
- ac_cpp_err=yes
+ rm -f conf$$.sh
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+rm -f conf$$.file
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
;;
esac
-echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_linux_version_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-
fi
-if test $ac_cv_header_linux_version_h = yes; then
- msgformat=linux
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6
else
- msgformat=xopen
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
+ GMSGFMT=":"
+ fi
+ fi
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
-
- l=
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
+ XGETTEXT=":"
+ fi
+ rm -f messages.po
+ fi
+ ac_config_commands="$ac_config_commands default-1"
- 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
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
@@ -8468,6 +11083,16 @@ fi
+
+if false; then
+ GENINSRC_NEVER_TRUE=
+ GENINSRC_NEVER_FALSE='#'
+else
+ GENINSRC_NEVER_TRUE='#'
+ GENINSRC_NEVER_FALSE=
+fi
+
+
if test -n "$EXEEXT"; then
cat >>confdefs.h <<\_ACEOF
@@ -8701,7 +11326,9 @@ esac
-for ac_header in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
+
+
+for ac_header in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h sys/param.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -9386,6 +12013,202 @@ _ACEOF
fi
done
+echo "$as_me:$LINENO: checking for mkstemp" >&5
+echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
+if test "${ac_cv_func_mkstemp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mkstemp to an innocuous variant, in case <limits.h> declares mkstemp.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mkstemp innocuous_mkstemp
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mkstemp (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mkstemp
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char mkstemp ();
+/* 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_mkstemp) || defined (__stub___mkstemp)
+choke me
+#else
+char (*f) () = mkstemp;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != mkstemp;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mkstemp=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_mkstemp=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_mkstemp" >&5
+echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
+if test $ac_cv_func_mkstemp = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MKSTEMP 1
+_ACEOF
+
+fi
+
+echo "$as_me:$LINENO: checking for mkdtemp" >&5
+echo $ECHO_N "checking for mkdtemp... $ECHO_C" >&6
+if test "${ac_cv_func_mkdtemp+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mkdtemp to an innocuous variant, in case <limits.h> declares mkdtemp.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mkdtemp innocuous_mkdtemp
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mkdtemp (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mkdtemp
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char mkdtemp ();
+/* 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_mkdtemp) || defined (__stub___mkdtemp)
+choke me
+#else
+char (*f) () = mkdtemp;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != mkdtemp;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mkdtemp=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_mkdtemp=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_mkdtemp" >&5
+echo "${ECHO_T}$ac_cv_func_mkdtemp" >&6
+if test $ac_cv_func_mkdtemp = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MKDTEMP 1
+_ACEOF
+
+fi
+
# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
# needs to be defined for it
@@ -10660,15 +13483,944 @@ if test -n "$enable_targets"; then
done
fi
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking iconv.h usability" >&5
+echo $ECHO_N "checking iconv.h usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <iconv.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking iconv.h presence" >&5
+echo $ECHO_N "checking iconv.h presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <iconv.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: iconv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: iconv.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: iconv.h: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: iconv.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: iconv.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: iconv.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: iconv.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: iconv.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: iconv.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for iconv.h" >&5
+echo $ECHO_N "checking for iconv.h... $ECHO_C" >&6
+if test "${ac_cv_header_iconv_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_header_iconv_h=$ac_header_preproc
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_iconv_h" >&5
+echo "${ECHO_T}$ac_cv_header_iconv_h" >&6
+
+fi
+
+
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval="$with_gnu_ld"
+ test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi;
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${acl_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_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 "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${acl_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi
+fi
+echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+ echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
+if test "${acl_cv_rpath+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+echo "${ECHO_T}$acl_cv_rpath" >&6
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath or --disable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+ enableval="$enable_rpath"
+ :
+else
+ enable_rpath=yes
+fi;
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+ withval="$with_libiconv_prefix"
+
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+
+fi;
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6
+if test "${am_cv_func_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_func_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+echo "${ECHO_T}$am_cv_func_iconv" >&6
+ if test "$am_cv_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $LIBICONV" >&5
+echo "${ECHO_T}$LIBICONV" >&6
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ echo "$as_me:$LINENO: checking for iconv declaration" >&5
+echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
+ if test "${am_cv_proto_iconv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_proto_iconv_arg1=""
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+am_cv_proto_iconv_arg1="const"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ echo "$as_me:$LINENO: result: ${ac_t:-
+ }$am_cv_proto_iconv" >&5
+echo "${ECHO_T}${ac_t:-
+ }$am_cv_proto_iconv" >&6
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+ fi
+
+
all_targets=false
BUILD_NLMCONV=
NLMCONV_DEFS=
BUILD_SRCONV=
BUILD_DLLTOOL=
DLLTOOL_DEFS=
+DLLTOOL_DEFAULT=
BUILD_WINDRES=
+BUILD_WINDMC=
BUILD_DLLWRAP=
BUILD_MISC=
+BUILD_INSTALL_MISC=
OBJDUMP_DEFS=
for targ in $target $canon_targets
@@ -10678,6 +14430,7 @@ do
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
BUILD_SRCONV='$(SRCONV_PROG)'
NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
+ BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)'
else
case $targ in
i[3-7]86*-*-netware*)
@@ -10703,27 +14456,65 @@ do
case $targ in
arm-epoc-pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ ;;
+ arm-wince-pe* | arm-*-wince)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE"
+ fi
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
- arm-*-pe* | arm-*-wince)
+ arm-*-pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
thumb-*-pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ ;;
+ x86_64-*-mingw*)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64"
+ fi
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
;;
i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
;;
i[3-7]86-*-interix)
BUILD_DLLTOOL='$(DLLTOOL_PROG)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
;;
powerpc*-aix5.[01])
@@ -10733,36 +14524,72 @@ do
;;
powerpc*-*-pe* | powerpc*-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ ;;
+ powerpc*-*-linux* | powerpc*-*-elf*)
+ BUILD_INSTALL_MISC="${BUILD_INSTALL_MISC} embedspu"
;;
sh*-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ ;;
+ spu-*-*)
+ BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)'
;;
mips*-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
mcore-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
mcore-*-elf)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
;;
+ mep-*)
+ OBJDUMP_DEFS="-DSKIP_ZEROES=256 -DSKIP_ZEROES_AT_END=0"
+ ;;
esac
fi
done
+DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT"
+
if test "${with_windres+set}" = set; then
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
fi
+if test "${with_windmc+set}" = set; then
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+fi
+
+
+
@@ -10818,7 +14645,6 @@ done
ac_config_files="$ac_config_files Makefile doc/Makefile po/Makefile.in:po/Make-in"
- ac_config_commands="$ac_config_commands default"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -10931,6 +14757,13 @@ echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -11366,6 +15199,254 @@ cat >>$CONFIG_STATUS <<_ACEOF
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
_ACEOF
@@ -11379,7 +15460,8 @@ do
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -11516,55 +15598,65 @@ s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@SED@,$SED,;t t
+s,@EGREP@,$EGREP,;t t
+s,@FGREP@,$FGREP,;t t
+s,@GREP@,$GREP,;t t
+s,@LD@,$LD,;t t
+s,@DUMPBIN@,$DUMPBIN,;t t
+s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
+s,@NM@,$NM,;t t
s,@LN_S@,$LN_S,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LIBTOOL@,$LIBTOOL,;t t
+s,@lt_ECHO@,$lt_ECHO,;t t
+s,@CPP@,$CPP,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@YACC@,$YACC,;t t
s,@LEX@,$LEX,;t t
s,@LEXLIB@,$LEXLIB,;t t
s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@ALLOCA@,$ALLOCA,;t t
s,@USE_NLS@,$USE_NLS,;t t
-s,@MSGFMT@,$MSGFMT,;t t
-s,@GMSGFMT@,$GMSGFMT,;t t
+s,@LIBINTL@,$LIBINTL,;t t
+s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
+s,@INCINTL@,$INCINTL,;t t
s,@XGETTEXT@,$XGETTEXT,;t t
-s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@POSUB@,$POSUB,;t t
s,@CATALOGS@,$CATALOGS,;t t
-s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@DATADIRNAME@,$DATADIRNAME,;t t
-s,@GMOFILES@,$GMOFILES,;t t
s,@INSTOBJEXT@,$INSTOBJEXT,;t t
-s,@INTLDEPS@,$INTLDEPS,;t t
-s,@INTLLIBS@,$INTLLIBS,;t t
-s,@INTLOBJS@,$INTLOBJS,;t t
-s,@POFILES@,$POFILES,;t t
-s,@POSUB@,$POSUB,;t t
-s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
-s,@GT_NO@,$GT_NO,;t t
-s,@GT_YES@,$GT_YES,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-s,@l@,$l,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@MSGMERGE@,$MSGMERGE,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
+s,@GENINSRC_NEVER_TRUE@,$GENINSRC_NEVER_TRUE,;t t
+s,@GENINSRC_NEVER_FALSE@,$GENINSRC_NEVER_FALSE,;t t
s,@HDEFINES@,$HDEFINES,;t t
-s,@AR@,$AR,;t t
s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
s,@EXEEXT_FOR_BUILD@,$EXEEXT_FOR_BUILD,;t t
s,@DEMANGLER_NAME@,$DEMANGLER_NAME,;t t
+s,@ALLOCA@,$ALLOCA,;t t
+s,@LIBICONV@,$LIBICONV,;t t
+s,@LTLIBICONV@,$LTLIBICONV,;t t
s,@NLMCONV_DEFS@,$NLMCONV_DEFS,;t t
s,@BUILD_NLMCONV@,$BUILD_NLMCONV,;t t
s,@BUILD_SRCONV@,$BUILD_SRCONV,;t t
s,@BUILD_DLLTOOL@,$BUILD_DLLTOOL,;t t
s,@DLLTOOL_DEFS@,$DLLTOOL_DEFS,;t t
s,@BUILD_WINDRES@,$BUILD_WINDRES,;t t
+s,@BUILD_WINDMC@,$BUILD_WINDMC,;t t
s,@BUILD_DLLWRAP@,$BUILD_DLLWRAP,;t t
s,@BUILD_MISC@,$BUILD_MISC,;t t
+s,@BUILD_INSTALL_MISC@,$BUILD_INSTALL_MISC,;t t
s,@OBJDUMP_DEFS@,$OBJDUMP_DEFS,;t t
s,@EMULATION@,$EMULATION,;t t
s,@EMULATION_VECTOR@,$EMULATION_VECTOR,;t t
@@ -12255,11 +16347,656 @@ echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
done
done
;;
- default )
-case "x$CONFIG_FILES" in
-*) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+ libtool )
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+_LT_EOF
esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
;;
+ default-1 )
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
esac
done
_ACEOF
diff --git a/contrib/binutils/binutils/configure.in b/contrib/binutils/binutils/configure.in
index 10afc53..19aaabc 100644
--- a/contrib/binutils/binutils/configure.in
+++ b/contrib/binutils/binutils/configure.in
@@ -11,7 +11,9 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
changequote([,])dnl
AM_INIT_AUTOMAKE(binutils, ${BFD_VERSION})
-AM_PROG_LIBTOOL
+AC_PROG_CC
+AC_GNU_SOURCE
+AC_PROG_LIBTOOL
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
@@ -40,16 +42,15 @@ if test -z "$host" ; then
AC_MSG_ERROR(Unrecognized host system type; please check config.sub.)
fi
-AC_PROG_CC
-AC_GNU_SOURCE
-
AC_PROG_YACC
AM_PROG_LEX
ALL_LINGUAS="fr tr ja es sv da zh_CN ru ro rw zh_TW fi vi"
-CY_GNU_GETTEXT
+ZW_GNU_GETTEXT_SISTER_DIR
+AM_PO_SUBDIRS
AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
AC_EXEEXT
if test -n "$EXEEXT"; then
AC_DEFINE(HAVE_EXECUTABLE_SUFFIX, 1,
@@ -79,10 +80,16 @@ case "${host}" in
esac
AC_SUBST(DEMANGLER_NAME)
-AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h)
+AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h limits.h sys/param.h)
AC_HEADER_SYS_WAIT
AC_FUNC_ALLOCA
AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked strcoll)
+AC_CHECK_FUNC([mkstemp],
+ AC_DEFINE([HAVE_MKSTEMP], 1,
+ [Define to 1 if you have the `mkstemp' function.]))
+AC_CHECK_FUNC([mkdtemp],
+ AC_DEFINE([HAVE_MKDTEMP], 1,
+ [Define to 1 if you have the `mkdtemp' function.]))
# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
# needs to be defined for it
@@ -193,15 +200,21 @@ if test -n "$enable_targets"; then
done
fi
+AC_CHECK_HEADER(iconv.h)
+AM_ICONV
+
all_targets=false
BUILD_NLMCONV=
NLMCONV_DEFS=
BUILD_SRCONV=
BUILD_DLLTOOL=
DLLTOOL_DEFS=
+DLLTOOL_DEFAULT=
BUILD_WINDRES=
+BUILD_WINDMC=
BUILD_DLLWRAP=
BUILD_MISC=
+BUILD_INSTALL_MISC=
OBJDUMP_DEFS=
for targ in $target $canon_targets
@@ -211,6 +224,7 @@ do
BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
BUILD_SRCONV='$(SRCONV_PROG)'
NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
+ BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)'
else
case $targ in
changequote(,)dnl
@@ -238,31 +252,69 @@ changequote([,])dnl
case $targ in
arm-epoc-pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_EPOC"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_EPOC -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
- arm-*-pe* | arm-*-wince)
+ arm-wince-pe* | arm-*-wince)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM_WINCE"
+ fi
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM_WINCE -DDLLTOOL_ARM"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ ;;
+ arm-*-pe*)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
thumb-*-pe*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_ARM"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ ;;
+ x86_64-*-mingw*)
+ BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MX86_64"
+ fi
+ DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MX86_64"
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
;;
changequote(,)dnl
i[3-7]86-*-pe* | i[3-7]86-*-cygwin* | i[3-7]86-*-mingw32** | i[3-7]86-*-netbsdpe*)
changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
;;
changequote(,)dnl
i[3-7]86-*-interix)
changequote([,])dnl
BUILD_DLLTOOL='$(DLLTOOL_PROG)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_I386"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
;;
changequote(,)dnl
@@ -274,44 +326,80 @@ changequote([,])dnl
;;
powerpc*-*-pe* | powerpc*-*-cygwin*)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_PPC"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ ;;
+ powerpc*-*-linux* | powerpc*-*-elf*)
+ BUILD_INSTALL_MISC="${BUILD_INSTALL_MISC} embedspu"
;;
sh*-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_SH"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_SH"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+ ;;
+ spu-*-*)
+ BUILD_MISC="${BUILD_MISC} "'bin2c$(EXEEXT_FOR_BUILD)'
;;
mips*-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MIPS"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MIPS"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
mcore-*-pe)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
;;
mcore-*-elf)
BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
+ if test -z "$DLLTOOL_DEFAULT"; then
+ DLLTOOL_DEFAULT="-DDLLTOOL_DEFAULT_MCORE_ELF"
+ fi
DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
;;
+ mep-*)
+ OBJDUMP_DEFS="-DSKIP_ZEROES=256 -DSKIP_ZEROES_AT_END=0"
+ ;;
esac
fi
done
+DLLTOOL_DEFS="$DLLTOOL_DEFS $DLLTOOL_DEFAULT"
+
if test "${with_windres+set}" = set; then
BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
fi
+if test "${with_windmc+set}" = set; then
+ BUILD_WINDMC='$(WINDMC_PROG)$(EXEEXT)'
+fi
+
AC_SUBST(NLMCONV_DEFS)
AC_SUBST(BUILD_NLMCONV)
AC_SUBST(BUILD_SRCONV)
AC_SUBST(BUILD_DLLTOOL)
AC_SUBST(DLLTOOL_DEFS)
AC_SUBST(BUILD_WINDRES)
+AC_SUBST(BUILD_WINDMC)
AC_SUBST(BUILD_DLLWRAP)
AC_SUBST(BUILD_MISC)
+AC_SUBST(BUILD_INSTALL_MISC)
AC_SUBST(OBJDUMP_DEFS)
AC_DEFINE_UNQUOTED(TARGET, "${target}", [Configured target name.])
@@ -351,9 +439,4 @@ AC_SUBST(datarootdir)
AC_SUBST(docdir)
AC_SUBST(htmldir)
-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 ;;
-esac
-])
+AC_OUTPUT(Makefile doc/Makefile po/Makefile.in:po/Make-in)
diff --git a/contrib/binutils/binutils/cxxfilt.c b/contrib/binutils/binutils/cxxfilt.c
index a8ec43b..bed0537 100644
--- a/contrib/binutils/binutils/cxxfilt.c
+++ b/contrib/binutils/binutils/cxxfilt.c
@@ -1,6 +1,6 @@
/* Demangler for GNU C++ - main program
Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2005, 2007 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
@@ -22,13 +22,13 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "config.h"
+#include "sysdep.h"
#include "bfd.h"
-#include "bucomm.h"
#include "libiberty.h"
#include "demangle.h"
#include "getopt.h"
#include "safe-ctype.h"
+#include "bucomm.h"
static int flags = DMGL_PARAMS | DMGL_ANSI | DMGL_VERBOSE;
static int strip_underscore = TARGET_PREPENDS_UNDERSCORE;
@@ -115,6 +115,8 @@ Options are:\n\
Demangled names are displayed to stdout.\n\
If a name cannot be demangled it is just echoed to stdout.\n\
If no names are provided on the command line, stdin is read.\n");
+ if (REPORT_BUGS_TO[0] && status == 0)
+ fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
exit (status);
}
diff --git a/contrib/binutils/binutils/debug.c b/contrib/binutils/binutils/debug.c
index 07d38ac..1cc518e 100644
--- a/contrib/binutils/binutils/debug.c
+++ b/contrib/binutils/binutils/debug.c
@@ -1,5 +1,5 @@
/* debug.c -- Handle generic debugging information.
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -26,11 +26,9 @@
this was writing a converter from stabs to HP IEEE-695 debugging
format. */
-#include <stdio.h>
+#include "sysdep.h"
#include <assert.h>
-
#include "bfd.h"
-#include "bucomm.h"
#include "libiberty.h"
#include "debug.h"
diff --git a/contrib/binutils/binutils/defparse.c b/contrib/binutils/binutils/defparse.c
deleted file mode 100644
index de34ae0..0000000
--- a/contrib/binutils/binutils/defparse.c
+++ /dev/null
@@ -1,1777 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.1. */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* Written by Richard Stallman by simplifying the original so called
- ``semantic'' parser. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
-
-/* Identify Bison output. */
-#define YYBISON 1
-
-/* Bison version. */
-#define YYBISON_VERSION "2.1"
-
-/* Skeleton name. */
-#define YYSKELETON_NAME "yacc.c"
-
-/* Pure parsers. */
-#define YYPURE 0
-
-/* Using locations. */
-#define YYLSP_NEEDED 0
-
-
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- NAME = 258,
- LIBRARY = 259,
- DESCRIPTION = 260,
- STACKSIZE = 261,
- HEAPSIZE = 262,
- CODE = 263,
- DATA = 264,
- SECTIONS = 265,
- EXPORTS = 266,
- IMPORTS = 267,
- VERSIONK = 268,
- BASE = 269,
- CONSTANT = 270,
- READ = 271,
- WRITE = 272,
- EXECUTE = 273,
- SHARED = 274,
- NONSHARED = 275,
- NONAME = 276,
- PRIVATE = 277,
- SINGLE = 278,
- MULTIPLE = 279,
- INITINSTANCE = 280,
- INITGLOBAL = 281,
- TERMINSTANCE = 282,
- TERMGLOBAL = 283,
- ID = 284,
- NUMBER = 285
- };
-#endif
-/* Tokens. */
-#define NAME 258
-#define LIBRARY 259
-#define DESCRIPTION 260
-#define STACKSIZE 261
-#define HEAPSIZE 262
-#define CODE 263
-#define DATA 264
-#define SECTIONS 265
-#define EXPORTS 266
-#define IMPORTS 267
-#define VERSIONK 268
-#define BASE 269
-#define CONSTANT 270
-#define READ 271
-#define WRITE 272
-#define EXECUTE 273
-#define SHARED 274
-#define NONSHARED 275
-#define NONAME 276
-#define PRIVATE 277
-#define SINGLE 278
-#define MULTIPLE 279
-#define INITINSTANCE 280
-#define INITGLOBAL 281
-#define TERMINSTANCE 282
-#define TERMGLOBAL 283
-#define ID 284
-#define NUMBER 285
-
-
-
-
-/* Copy the first part of user declarations. */
-#line 1 "defparse.y"
- /* defparse.y - parser for .def files */
-
-/* Copyright 1995, 1997, 1998, 1999, 2001, 2004
- Free Software Foundation, Inc.
-
- This file is part of GNU Binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#include "bfd.h"
-#include "bucomm.h"
-#include "dlltool.h"
-
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 27 "defparse.y"
-typedef union YYSTYPE {
- char *id;
- int number;
-} YYSTYPE;
-/* Line 196 of yacc.c. */
-#line 176 "defparse.c"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-/* Copy the second part of user declarations. */
-
-
-/* Line 219 of yacc.c. */
-#line 188 "defparse.c"
-
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
-#ifndef YY_
-# if YYENABLE_NLS
-# if ENABLE_NLS
-# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
-# define YY_(msgid) dgettext ("bison-runtime", msgid)
-# endif
-# endif
-# ifndef YY_
-# define YY_(msgid) msgid
-# endif
-#endif
-
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
-
-/* The parser invokes alloca or malloc; define the necessary symbols. */
-
-# ifdef YYSTACK_USE_ALLOCA
-# if YYSTACK_USE_ALLOCA
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
-# else
-# define YYSTACK_ALLOC alloca
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYINCLUDED_STDLIB_H
-# endif
-# endif
-# endif
-# endif
-
-# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# ifndef YYSTACK_ALLOC_MAXIMUM
- /* The OS might guarantee only one guard page at the bottom of the stack,
- and a page size can be as small as 4096 bytes. So we cannot safely
- invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
- to allow for a few compiler-allocated temporary stack slots. */
-# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
-# endif
-# else
-# define YYSTACK_ALLOC YYMALLOC
-# define YYSTACK_FREE YYFREE
-# ifndef YYSTACK_ALLOC_MAXIMUM
-# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
-# endif
-# ifdef __cplusplus
-extern "C" {
-# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
-# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
- && (defined (__STDC__) || defined (__cplusplus)))
-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifndef YYFREE
-# define YYFREE free
-# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
- && (defined (__STDC__) || defined (__cplusplus)))
-void free (void *); /* INFRINGES ON USER NAME SPACE */
-# endif
-# endif
-# ifdef __cplusplus
-}
-# endif
-# endif
-#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
-
-
-#if (! defined (yyoverflow) \
- && (! defined (__cplusplus) \
- || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
-
-/* A type that is properly aligned for any stack member. */
-union yyalloc
-{
- short int yyss;
- YYSTYPE yyvs;
- };
-
-/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
-
-/* The size of an array large to enough to hold all stacks, each with
- N elements. */
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAXIMUM)
-
-/* Copy COUNT objects from FROM to TO. The source and destination do
- not overlap. */
-# ifndef YYCOPY
-# if defined (__GNUC__) && 1 < __GNUC__
-# define YYCOPY(To, From, Count) \
- __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
-# else
-# define YYCOPY(To, From, Count) \
- do \
- { \
- YYSIZE_T yyi; \
- for (yyi = 0; yyi < (Count); yyi++) \
- (To)[yyi] = (From)[yyi]; \
- } \
- while (0)
-# endif
-# endif
-
-/* Relocate STACK from its old location to the new one. The
- local variables YYSIZE and YYSTACKSIZE give the old and new number of
- elements in the stack, and YYPTR gives the new location of the
- stack. Advance YYPTR to a properly aligned location for the next
- stack. */
-# define YYSTACK_RELOCATE(Stack) \
- do \
- { \
- YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
- yyptr += yynewbytes / sizeof (*yyptr); \
- } \
- while (0)
-
-#endif
-
-#if defined (__STDC__) || defined (__cplusplus)
- typedef signed char yysigned_char;
-#else
- typedef short int yysigned_char;
-#endif
-
-/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 38
-/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 114
-
-/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 35
-/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 23
-/* YYNRULES -- Number of rules. */
-#define YYNRULES 68
-/* YYNRULES -- Number of states. */
-#define YYNSTATES 98
-
-/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
-#define YYUNDEFTOK 2
-#define YYMAXUTOK 285
-
-#define YYTRANSLATE(YYX) \
- ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
-
-/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
-static const unsigned char yytranslate[] =
-{
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 33, 2, 31, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 32, 2, 2, 34, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30
-};
-
-#if YYDEBUG
-/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
- YYRHS. */
-static const unsigned char yyprhs[] =
-{
- 0, 0, 3, 6, 8, 12, 17, 20, 23, 27,
- 31, 34, 37, 40, 43, 46, 51, 52, 55, 63,
- 66, 68, 76, 84, 90, 96, 102, 108, 112, 116,
- 119, 121, 124, 128, 130, 132, 133, 136, 137, 139,
- 141, 143, 145, 147, 149, 151, 153, 154, 156, 157,
- 159, 160, 162, 163, 165, 169, 170, 173, 174, 177,
- 182, 183, 187, 188, 189, 193, 195, 197, 199
-};
-
-/* YYRHS -- A `-1'-separated list of the rules' RHS. */
-static const yysigned_char yyrhs[] =
-{
- 36, 0, -1, 36, 37, -1, 37, -1, 3, 52,
- 55, -1, 4, 52, 55, 56, -1, 11, 38, -1,
- 5, 29, -1, 6, 30, 46, -1, 7, 30, 46,
- -1, 8, 44, -1, 9, 44, -1, 10, 42, -1,
- 12, 40, -1, 13, 30, -1, 13, 30, 31, 30,
- -1, -1, 38, 39, -1, 29, 54, 53, 49, 48,
- 50, 51, -1, 40, 41, -1, 41, -1, 29, 32,
- 29, 31, 29, 31, 29, -1, 29, 32, 29, 31,
- 29, 31, 30, -1, 29, 32, 29, 31, 29, -1,
- 29, 32, 29, 31, 30, -1, 29, 31, 29, 31,
- 29, -1, 29, 31, 29, 31, 30, -1, 29, 31,
- 29, -1, 29, 31, 30, -1, 42, 43, -1, 43,
- -1, 29, 44, -1, 44, 45, 47, -1, 47, -1,
- 33, -1, -1, 33, 30, -1, -1, 16, -1, 17,
- -1, 18, -1, 19, -1, 20, -1, 23, -1, 24,
- -1, 15, -1, -1, 21, -1, -1, 9, -1, -1,
- 22, -1, -1, 29, -1, 29, 31, 29, -1, -1,
- 34, 30, -1, -1, 32, 29, -1, 32, 29, 31,
- 29, -1, -1, 14, 32, 30, -1, -1, -1, 56,
- 45, 57, -1, 25, -1, 26, -1, 27, -1, 28,
- -1
-};
-
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const unsigned char yyrline[] =
-{
- 0, 44, 44, 45, 49, 50, 51, 52, 53, 54,
- 55, 56, 57, 58, 59, 60, 64, 66, 70, 74,
- 75, 79, 80, 81, 82, 83, 84, 85, 86, 90,
- 91, 95, 99, 100, 104, 105, 107, 108, 112, 113,
- 114, 115, 116, 117, 118, 122, 123, 127, 128, 132,
- 133, 137, 138, 141, 142, 148, 152, 153, 157, 158,
- 164, 167, 168, 171, 173, 177, 178, 179, 180
-};
-#endif
-
-#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
-/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
- First, the terminals, then, starting at YYNTOKENS, nonterminals. */
-static const char *const yytname[] =
-{
- "$end", "error", "$undefined", "NAME", "LIBRARY", "DESCRIPTION",
- "STACKSIZE", "HEAPSIZE", "CODE", "DATA", "SECTIONS", "EXPORTS",
- "IMPORTS", "VERSIONK", "BASE", "CONSTANT", "READ", "WRITE", "EXECUTE",
- "SHARED", "NONSHARED", "NONAME", "PRIVATE", "SINGLE", "MULTIPLE",
- "INITINSTANCE", "INITGLOBAL", "TERMINSTANCE", "TERMGLOBAL", "ID",
- "NUMBER", "'.'", "'='", "','", "'@'", "$accept", "start", "command",
- "explist", "expline", "implist", "impline", "seclist", "secline",
- "attr_list", "opt_comma", "opt_number", "attr", "opt_CONSTANT",
- "opt_NONAME", "opt_DATA", "opt_PRIVATE", "opt_name", "opt_ordinal",
- "opt_equal_name", "opt_base", "option_list", "option", 0
-};
-#endif
-
-# ifdef YYPRINT
-/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
- token YYLEX-NUM. */
-static const unsigned short int yytoknum[] =
-{
- 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
- 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
- 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
- 285, 46, 61, 44, 64
-};
-# endif
-
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const unsigned char yyr1[] =
-{
- 0, 35, 36, 36, 37, 37, 37, 37, 37, 37,
- 37, 37, 37, 37, 37, 37, 38, 38, 39, 40,
- 40, 41, 41, 41, 41, 41, 41, 41, 41, 42,
- 42, 43, 44, 44, 45, 45, 46, 46, 47, 47,
- 47, 47, 47, 47, 47, 48, 48, 49, 49, 50,
- 50, 51, 51, 52, 52, 52, 53, 53, 54, 54,
- 54, 55, 55, 56, 56, 57, 57, 57, 57
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const unsigned char yyr2[] =
-{
- 0, 2, 2, 1, 3, 4, 2, 2, 3, 3,
- 2, 2, 2, 2, 2, 4, 0, 2, 7, 2,
- 1, 7, 7, 5, 5, 5, 5, 3, 3, 2,
- 1, 2, 3, 1, 1, 0, 2, 0, 1, 1,
- 1, 1, 1, 1, 1, 1, 0, 1, 0, 1,
- 0, 1, 0, 1, 3, 0, 2, 0, 2, 4,
- 0, 3, 0, 0, 3, 1, 1, 1, 1
-};
-
-/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
- STATE-NUM when YYTABLE doesn't specify something else to do. Zero
- means the default is an error. */
-static const unsigned char yydefact[] =
-{
- 0, 55, 55, 0, 0, 0, 0, 0, 0, 16,
- 0, 0, 0, 3, 53, 62, 62, 7, 37, 37,
- 38, 39, 40, 41, 42, 43, 44, 10, 33, 11,
- 0, 12, 30, 6, 0, 13, 20, 14, 1, 2,
- 0, 0, 4, 63, 0, 8, 9, 34, 0, 31,
- 29, 60, 17, 0, 0, 19, 0, 54, 0, 5,
- 36, 32, 0, 57, 27, 28, 0, 15, 61, 0,
- 58, 0, 48, 0, 0, 65, 66, 67, 68, 64,
- 0, 56, 47, 46, 25, 26, 23, 24, 59, 45,
- 50, 0, 49, 52, 21, 22, 51, 18
-};
-
-/* YYDEFGOTO[NTERM-NUM]. */
-static const yysigned_char yydefgoto[] =
-{
- -1, 12, 13, 33, 52, 35, 36, 31, 32, 27,
- 48, 45, 28, 90, 83, 93, 97, 15, 72, 63,
- 42, 59, 79
-};
-
-/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
- STATE-NUM. */
-#define YYPACT_NINF -26
-static const yysigned_char yypact[] =
-{
- 32, -12, -12, 17, -8, 33, -4, -4, 35, -26,
- 36, 37, 21, -26, 38, 48, 48, -26, 39, 39,
- -26, -26, -26, -26, -26, -26, -26, -15, -26, -15,
- -4, 35, -26, 41, -25, 36, -26, 40, -26, -26,
- 44, 34, -26, -26, 45, -26, -26, -26, -4, -15,
- -26, 42, -26, -19, 47, -26, 49, -26, 50, 22,
- -26, -26, 52, 43, 51, -26, 53, -26, -26, 26,
- 54, 56, 57, 27, 29, -26, -26, -26, -26, -26,
- 58, -26, -26, 68, -26, -26, 59, -26, -26, -26,
- 79, 31, -26, 46, -26, -26, -26, -26
-};
-
-/* YYPGOTO[NTERM-NUM]. */
-static const yysigned_char yypgoto[] =
-{
- -26, -26, 77, -26, -26, -26, 60, -26, 61, -7,
- 55, 72, 62, -26, -26, -26, -26, 91, -26, -26,
- 78, -26, -26
-};
-
-/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
- positive, shift that token. If negative, reduce the rule which
- number is the opposite. If zero, do what YYDEFACT says.
- If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -36
-static const yysigned_char yytable[] =
-{
- 29, -35, -35, -35, -35, -35, 53, 54, -35, -35,
- 64, 65, 20, 21, 22, 23, 24, 14, 47, 25,
- 26, 38, 18, 49, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 17, -35, -35, -35,
- -35, 75, 76, 77, 78, 47, 84, 85, 86, 87,
- 94, 95, 41, 19, 30, 34, 58, 37, 96, 40,
- 51, 56, 44, 57, 62, 60, 66, 71, 82, 67,
- 68, 70, 73, 89, 74, 80, 81, 88, 92, 39,
- 91, 46, 50, 16, 43, 55, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 61, 0, 0, 0, 69
-};
-
-static const yysigned_char yycheck[] =
-{
- 7, 16, 17, 18, 19, 20, 31, 32, 23, 24,
- 29, 30, 16, 17, 18, 19, 20, 29, 33, 23,
- 24, 0, 30, 30, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 29, 25, 26, 27,
- 28, 25, 26, 27, 28, 33, 29, 30, 29, 30,
- 29, 30, 14, 30, 29, 29, 32, 30, 22, 31,
- 29, 31, 33, 29, 32, 30, 29, 34, 21, 30,
- 30, 29, 31, 15, 31, 31, 30, 29, 9, 12,
- 31, 19, 31, 2, 16, 35, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 48, -1, -1, -1, 59
-};
-
-/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
- symbol of state STATE-NUM. */
-static const unsigned char yystos[] =
-{
- 0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 36, 37, 29, 52, 52, 29, 30, 30,
- 16, 17, 18, 19, 20, 23, 24, 44, 47, 44,
- 29, 42, 43, 38, 29, 40, 41, 30, 0, 37,
- 31, 14, 55, 55, 33, 46, 46, 33, 45, 44,
- 43, 29, 39, 31, 32, 41, 31, 29, 32, 56,
- 30, 47, 32, 54, 29, 30, 29, 30, 30, 45,
- 29, 34, 53, 31, 31, 25, 26, 27, 28, 57,
- 31, 30, 21, 49, 29, 30, 29, 30, 29, 15,
- 48, 31, 9, 50, 29, 30, 22, 51
-};
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY (-2)
-#define YYEOF 0
-
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrorlab
-
-
-/* Like YYERROR except do call yyerror. This remains here temporarily
- to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-
-#define YYFAIL goto yyerrlab
-
-#define YYRECOVERING() (!!yyerrstatus)
-
-#define YYBACKUP(Token, Value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { \
- yychar = (Token); \
- yylval = (Value); \
- yytoken = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
- else \
- { \
- yyerror (YY_("syntax error: cannot back up")); \
- YYERROR; \
- } \
-while (0)
-
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-
-/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
- If N is 0, then set CURRENT to the empty location which ends
- the previous symbol: RHS[0] (always defined). */
-
-#define YYRHSLOC(Rhs, K) ((Rhs)[K])
-#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- do \
- if (N) \
- { \
- (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
- (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
- (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
- (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
- } \
- else \
- { \
- (Current).first_line = (Current).last_line = \
- YYRHSLOC (Rhs, 0).last_line; \
- (Current).first_column = (Current).last_column = \
- YYRHSLOC (Rhs, 0).last_column; \
- } \
- while (0)
-#endif
-
-
-/* YY_LOCATION_PRINT -- Print the location on the stream.
- This macro was not mandated originally: define only if we know
- we won't break user code: when these are the locations we know. */
-
-#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
-# define YY_LOCATION_PRINT(File, Loc) \
- fprintf (File, "%d.%d-%d.%d", \
- (Loc).first_line, (Loc).first_column, \
- (Loc).last_line, (Loc).last_column)
-# else
-# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
-# endif
-#endif
-
-
-/* YYLEX -- calling `yylex' with the right arguments. */
-
-#ifdef YYLEX_PARAM
-# define YYLEX yylex (YYLEX_PARAM)
-#else
-# define YYLEX yylex ()
-#endif
-
-/* Enable debugging if requested. */
-#if YYDEBUG
-
-# ifndef YYFPRINTF
-# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
-# define YYFPRINTF fprintf
-# endif
-
-# define YYDPRINTF(Args) \
-do { \
- if (yydebug) \
- YYFPRINTF Args; \
-} while (0)
-
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
-do { \
- if (yydebug) \
- { \
- YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Type, Value); \
- YYFPRINTF (stderr, "\n"); \
- } \
-} while (0)
-
-/*------------------------------------------------------------------.
-| yy_stack_print -- Print the state stack from its BOTTOM up to its |
-| TOP (included). |
-`------------------------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_stack_print (short int *bottom, short int *top)
-#else
-static void
-yy_stack_print (bottom, top)
- short int *bottom;
- short int *top;
-#endif
-{
- YYFPRINTF (stderr, "Stack now");
- for (/* Nothing. */; bottom <= top; ++bottom)
- YYFPRINTF (stderr, " %d", *bottom);
- YYFPRINTF (stderr, "\n");
-}
-
-# define YY_STACK_PRINT(Bottom, Top) \
-do { \
- if (yydebug) \
- yy_stack_print ((Bottom), (Top)); \
-} while (0)
-
-
-/*------------------------------------------------.
-| Report that the YYRULE is going to be reduced. |
-`------------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yy_reduce_print (int yyrule)
-#else
-static void
-yy_reduce_print (yyrule)
- int yyrule;
-#endif
-{
- int yyi;
- unsigned long int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
- yyrule - 1, yylno);
- /* Print the symbols being reduced, and their result. */
- for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
-}
-
-# define YY_REDUCE_PRINT(Rule) \
-do { \
- if (yydebug) \
- yy_reduce_print (Rule); \
-} while (0)
-
-/* Nonzero means print parse trace. It is left uninitialized so that
- multiple parsers can coexist. */
-int yydebug;
-#else /* !YYDEBUG */
-# define YYDPRINTF(Args)
-# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
-# define YY_STACK_PRINT(Bottom, Top)
-# define YY_REDUCE_PRINT(Rule)
-#endif /* !YYDEBUG */
-
-
-/* YYINITDEPTH -- initial size of the parser's stacks. */
-#ifndef YYINITDEPTH
-# define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
- if the built-in stack extension method is used).
-
- Do not make this value too large; the results are undefined if
- YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
- evaluated with infinite-precision integer arithmetic. */
-
-#ifndef YYMAXDEPTH
-# define YYMAXDEPTH 10000
-#endif
-
-
-
-#if YYERROR_VERBOSE
-
-# ifndef yystrlen
-# if defined (__GLIBC__) && defined (_STRING_H)
-# define yystrlen strlen
-# else
-/* Return the length of YYSTR. */
-static YYSIZE_T
-# if defined (__STDC__) || defined (__cplusplus)
-yystrlen (const char *yystr)
-# else
-yystrlen (yystr)
- const char *yystr;
-# endif
-{
- const char *yys = yystr;
-
- while (*yys++ != '\0')
- continue;
-
- return yys - yystr - 1;
-}
-# endif
-# endif
-
-# ifndef yystpcpy
-# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
-# define yystpcpy stpcpy
-# else
-/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
- YYDEST. */
-static char *
-# if defined (__STDC__) || defined (__cplusplus)
-yystpcpy (char *yydest, const char *yysrc)
-# else
-yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-# endif
-{
- char *yyd = yydest;
- const char *yys = yysrc;
-
- while ((*yyd++ = *yys++) != '\0')
- continue;
-
- return yyd - 1;
-}
-# endif
-# endif
-
-# ifndef yytnamerr
-/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
- quotes and backslashes, so that it's suitable for yyerror. The
- heuristic is that double-quoting is unnecessary unless the string
- contains an apostrophe, a comma, or backslash (other than
- backslash-backslash). YYSTR is taken from yytname. If YYRES is
- null, do not copy; instead, return the length of what the result
- would have been. */
-static YYSIZE_T
-yytnamerr (char *yyres, const char *yystr)
-{
- if (*yystr == '"')
- {
- size_t yyn = 0;
- char const *yyp = yystr;
-
- for (;;)
- switch (*++yyp)
- {
- case '\'':
- case ',':
- goto do_not_strip_quotes;
-
- case '\\':
- if (*++yyp != '\\')
- goto do_not_strip_quotes;
- /* Fall through. */
- default:
- if (yyres)
- yyres[yyn] = *yyp;
- yyn++;
- break;
-
- case '"':
- if (yyres)
- yyres[yyn] = '\0';
- return yyn;
- }
- do_not_strip_quotes: ;
- }
-
- if (! yyres)
- return yystrlen (yystr);
-
- return yystpcpy (yyres, yystr) - yyres;
-}
-# endif
-
-#endif /* YYERROR_VERBOSE */
-
-
-
-#if YYDEBUG
-/*--------------------------------.
-| Print this symbol on YYOUTPUT. |
-`--------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yysymprint (yyoutput, yytype, yyvaluep)
- FILE *yyoutput;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
-{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
-
- if (yytype < YYNTOKENS)
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
- else
- YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
-
-
-# ifdef YYPRINT
- if (yytype < YYNTOKENS)
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- switch (yytype)
- {
- default:
- break;
- }
- YYFPRINTF (yyoutput, ")");
-}
-
-#endif /* ! YYDEBUG */
-/*-----------------------------------------------.
-| Release the memory associated to this symbol. |
-`-----------------------------------------------*/
-
-#if defined (__STDC__) || defined (__cplusplus)
-static void
-yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
-#else
-static void
-yydestruct (yymsg, yytype, yyvaluep)
- const char *yymsg;
- int yytype;
- YYSTYPE *yyvaluep;
-#endif
-{
- /* Pacify ``unused variable'' warnings. */
- (void) yyvaluep;
-
- if (!yymsg)
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-
- switch (yytype)
- {
-
- default:
- break;
- }
-}
-
-
-/* Prevent warnings from -Wmissing-prototypes. */
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM);
-# else
-int yyparse ();
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void);
-#else
-int yyparse ();
-#endif
-#endif /* ! YYPARSE_PARAM */
-
-
-
-/* The look-ahead symbol. */
-int yychar;
-
-/* The semantic value of the look-ahead symbol. */
-YYSTYPE yylval;
-
-/* Number of syntax errors so far. */
-int yynerrs;
-
-
-
-/*----------.
-| yyparse. |
-`----------*/
-
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-int yyparse (void *YYPARSE_PARAM)
-# else
-int yyparse (YYPARSE_PARAM)
- void *YYPARSE_PARAM;
-# endif
-#else /* ! YYPARSE_PARAM */
-#if defined (__STDC__) || defined (__cplusplus)
-int
-yyparse (void)
-#else
-int
-yyparse ()
- ;
-#endif
-#endif
-{
-
- int yystate;
- int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Look-ahead token as an internal (translated) token number. */
- int yytoken = 0;
-
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- short int yyssa[YYINITDEPTH];
- short int *yyss = yyssa;
- short int *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- YYSTYPE *yyvsp;
-
-
-
-#define YYPOPSTACK (yyvsp--, yyssp--)
-
- YYSIZE_T yystacksize = YYINITDEPTH;
-
- /* The variables used to return semantic value and location from the
- action routines. */
- YYSTYPE yyval;
-
-
- /* When reducing, the number of symbols on the RHS of the reduced
- rule. */
- int yylen;
-
- YYDPRINTF ((stderr, "Starting parse\n"));
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss;
- yyvsp = yyvs;
-
- goto yysetstate;
-
-/*------------------------------------------------------------.
-| yynewstate -- Push a new state, which is found in yystate. |
-`------------------------------------------------------------*/
- yynewstate:
- /* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks.
- */
- yyssp++;
-
- yysetstate:
- *yyssp = yystate;
-
- if (yyss + yystacksize - 1 <= yyssp)
- {
- /* Get the current used size of the three stacks, in elements. */
- YYSIZE_T yysize = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- {
- /* Give user a chance to reallocate the stack. Use copies of
- these so that the &'s don't force the real ones into
- memory. */
- YYSTYPE *yyvs1 = yyvs;
- short int *yyss1 = yyss;
-
-
- /* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. This used to be a
- conditional around just the two extra args, but that might
- be undefined if yyoverflow is a macro. */
- yyoverflow (YY_("memory exhausted"),
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
-
- &yystacksize);
-
- yyss = yyss1;
- yyvs = yyvs1;
- }
-#else /* no yyoverflow */
-# ifndef YYSTACK_RELOCATE
- goto yyexhaustedlab;
-# else
- /* Extend the stack our own way. */
- if (YYMAXDEPTH <= yystacksize)
- goto yyexhaustedlab;
- yystacksize *= 2;
- if (YYMAXDEPTH < yystacksize)
- yystacksize = YYMAXDEPTH;
-
- {
- short int *yyss1 = yyss;
- union yyalloc *yyptr =
- (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
- if (! yyptr)
- goto yyexhaustedlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-
-# undef YYSTACK_RELOCATE
- if (yyss1 != yyssa)
- YYSTACK_FREE (yyss1);
- }
-# endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + yysize - 1;
- yyvsp = yyvs + yysize - 1;
-
-
- YYDPRINTF ((stderr, "Stack size increased to %lu\n",
- (unsigned long int) yystacksize));
-
- if (yyss + yystacksize - 1 <= yyssp)
- YYABORT;
- }
-
- YYDPRINTF ((stderr, "Entering state %d\n", yystate));
-
- goto yybackup;
-
-/*-----------.
-| yybackup. |
-`-----------*/
-yybackup:
-
-/* Do appropriate processing given the current state. */
-/* Read a look-ahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to look-ahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYPACT_NINF)
- goto yydefault;
-
- /* Not known => get a look-ahead token if don't already have one. */
-
- /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
- if (yychar == YYEMPTY)
- {
- YYDPRINTF ((stderr, "Reading a token: "));
- yychar = YYLEX;
- }
-
- if (yychar <= YYEOF)
- {
- yychar = yytoken = YYEOF;
- YYDPRINTF ((stderr, "Now at end of input.\n"));
- }
- else
- {
- yytoken = YYTRANSLATE (yychar);
- YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
- }
-
- /* If the proper action on seeing token YYTOKEN is to reduce or to
- detect an error, take that action. */
- yyn += yytoken;
- if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
- goto yydefault;
- yyn = yytable[yyn];
- if (yyn <= 0)
- {
- if (yyn == 0 || yyn == YYTABLE_NINF)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the look-ahead token. */
- YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-
-
- /* Count tokens shifted since error; after three, turn off error
- status. */
- if (yyerrstatus)
- yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-----------------------------------------------------------.
-| yydefault -- do the default action for the current state. |
-`-----------------------------------------------------------*/
-yydefault:
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
- goto yyreduce;
-
-
-/*-----------------------------.
-| yyreduce -- Do a reduction. |
-`-----------------------------*/
-yyreduce:
- /* yyn is the number of a rule to reduce with. */
- yylen = yyr2[yyn];
-
- /* If YYLEN is nonzero, implement the default value of the action:
- `$$ = $1'.
-
- Otherwise, the following line sets YYVAL to garbage.
- This behavior is undocumented and Bison
- users should not rely upon it. Assigning to YYVAL
- unconditionally makes the parser a bit smaller, and it avoids a
- GCC warning that YYVAL may be used uninitialized. */
- yyval = yyvsp[1-yylen];
-
-
- YY_REDUCE_PRINT (yyn);
- switch (yyn)
- {
- case 4:
-#line 49 "defparse.y"
- { def_name ((yyvsp[-1].id), (yyvsp[0].number)); }
- break;
-
- case 5:
-#line 50 "defparse.y"
- { def_library ((yyvsp[-2].id), (yyvsp[-1].number)); }
- break;
-
- case 7:
-#line 52 "defparse.y"
- { def_description ((yyvsp[0].id));}
- break;
-
- case 8:
-#line 53 "defparse.y"
- { def_stacksize ((yyvsp[-1].number), (yyvsp[0].number));}
- break;
-
- case 9:
-#line 54 "defparse.y"
- { def_heapsize ((yyvsp[-1].number), (yyvsp[0].number));}
- break;
-
- case 10:
-#line 55 "defparse.y"
- { def_code ((yyvsp[0].number));}
- break;
-
- case 11:
-#line 56 "defparse.y"
- { def_data ((yyvsp[0].number));}
- break;
-
- case 14:
-#line 59 "defparse.y"
- { def_version ((yyvsp[0].number),0);}
- break;
-
- case 15:
-#line 60 "defparse.y"
- { def_version ((yyvsp[-2].number),(yyvsp[0].number));}
- break;
-
- case 18:
-#line 71 "defparse.y"
- { def_exports ((yyvsp[-6].id), (yyvsp[-5].id), (yyvsp[-4].number), (yyvsp[-3].number), (yyvsp[-2].number), (yyvsp[-1].number), (yyvsp[0].number));}
- break;
-
- case 21:
-#line 79 "defparse.y"
- { def_import ((yyvsp[-6].id),(yyvsp[-4].id),(yyvsp[-2].id),(yyvsp[0].id), 0); }
- break;
-
- case 22:
-#line 80 "defparse.y"
- { def_import ((yyvsp[-6].id),(yyvsp[-4].id),(yyvsp[-2].id), 0,(yyvsp[0].number)); }
- break;
-
- case 23:
-#line 81 "defparse.y"
- { def_import ((yyvsp[-4].id),(yyvsp[-2].id), 0,(yyvsp[0].id), 0); }
- break;
-
- case 24:
-#line 82 "defparse.y"
- { def_import ((yyvsp[-4].id),(yyvsp[-2].id), 0, 0,(yyvsp[0].number)); }
- break;
-
- case 25:
-#line 83 "defparse.y"
- { def_import ( 0,(yyvsp[-4].id),(yyvsp[-2].id),(yyvsp[0].id), 0); }
- break;
-
- case 26:
-#line 84 "defparse.y"
- { def_import ( 0,(yyvsp[-4].id),(yyvsp[-2].id), 0,(yyvsp[0].number)); }
- break;
-
- case 27:
-#line 85 "defparse.y"
- { def_import ( 0,(yyvsp[-2].id), 0,(yyvsp[0].id), 0); }
- break;
-
- case 28:
-#line 86 "defparse.y"
- { def_import ( 0,(yyvsp[-2].id), 0, 0,(yyvsp[0].number)); }
- break;
-
- case 31:
-#line 95 "defparse.y"
- { def_section ((yyvsp[-1].id),(yyvsp[0].number));}
- break;
-
- case 36:
-#line 107 "defparse.y"
- { (yyval.number)=(yyvsp[0].number);}
- break;
-
- case 37:
-#line 108 "defparse.y"
- { (yyval.number)=-1;}
- break;
-
- case 38:
-#line 112 "defparse.y"
- { (yyval.number) = 1; }
- break;
-
- case 39:
-#line 113 "defparse.y"
- { (yyval.number) = 2; }
- break;
-
- case 40:
-#line 114 "defparse.y"
- { (yyval.number) = 4; }
- break;
-
- case 41:
-#line 115 "defparse.y"
- { (yyval.number) = 8; }
- break;
-
- case 42:
-#line 116 "defparse.y"
- { (yyval.number) = 0; }
- break;
-
- case 43:
-#line 117 "defparse.y"
- { (yyval.number) = 0; }
- break;
-
- case 44:
-#line 118 "defparse.y"
- { (yyval.number) = 0; }
- break;
-
- case 45:
-#line 122 "defparse.y"
- {(yyval.number)=1;}
- break;
-
- case 46:
-#line 123 "defparse.y"
- {(yyval.number)=0;}
- break;
-
- case 47:
-#line 127 "defparse.y"
- {(yyval.number)=1;}
- break;
-
- case 48:
-#line 128 "defparse.y"
- {(yyval.number)=0;}
- break;
-
- case 49:
-#line 132 "defparse.y"
- { (yyval.number) = 1; }
- break;
-
- case 50:
-#line 133 "defparse.y"
- { (yyval.number) = 0; }
- break;
-
- case 51:
-#line 137 "defparse.y"
- { (yyval.number) = 1; }
- break;
-
- case 52:
-#line 138 "defparse.y"
- { (yyval.number) = 0; }
- break;
-
- case 53:
-#line 141 "defparse.y"
- { (yyval.id) =(yyvsp[0].id); }
- break;
-
- case 54:
-#line 143 "defparse.y"
- {
- char *name = xmalloc (strlen ((yyvsp[-2].id)) + 1 + strlen ((yyvsp[0].id)) + 1);
- sprintf (name, "%s.%s", (yyvsp[-2].id), (yyvsp[0].id));
- (yyval.id) = name;
- }
- break;
-
- case 55:
-#line 148 "defparse.y"
- { (yyval.id)=""; }
- break;
-
- case 56:
-#line 152 "defparse.y"
- { (yyval.number)=(yyvsp[0].number);}
- break;
-
- case 57:
-#line 153 "defparse.y"
- { (yyval.number)=-1;}
- break;
-
- case 58:
-#line 157 "defparse.y"
- { (yyval.id) = (yyvsp[0].id); }
- break;
-
- case 59:
-#line 159 "defparse.y"
- {
- char *name = xmalloc (strlen ((yyvsp[-2].id)) + 1 + strlen ((yyvsp[0].id)) + 1);
- sprintf (name, "%s.%s", (yyvsp[-2].id), (yyvsp[0].id));
- (yyval.id) = name;
- }
- break;
-
- case 60:
-#line 164 "defparse.y"
- { (yyval.id) = 0; }
- break;
-
- case 61:
-#line 167 "defparse.y"
- { (yyval.number)= (yyvsp[0].number);}
- break;
-
- case 62:
-#line 168 "defparse.y"
- { (yyval.number)=-1;}
- break;
-
-
- default: break;
- }
-
-/* Line 1126 of yacc.c. */
-#line 1510 "defparse.c"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-
-
- YY_STACK_PRINT (yyss, yyssp);
-
- *++yyvsp = yyval;
-
-
- /* Now `shift' the result of the reduction. Determine what state
- that goes to, based on the state we popped back to and the rule
- number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
- if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTOKENS];
-
- goto yynewstate;
-
-
-/*------------------------------------.
-| yyerrlab -- here on detecting error |
-`------------------------------------*/
-yyerrlab:
- /* If not already recovering from an error, report this error. */
- if (!yyerrstatus)
- {
- ++yynerrs;
-#if YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (YYPACT_NINF < yyn && yyn < YYLAST)
- {
- int yytype = YYTRANSLATE (yychar);
- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
- YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
- int yysize_overflow = 0;
- char *yymsg = 0;
-# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
- char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
- int yyx;
-
-#if 0
- /* This is so xgettext sees the translatable formats that are
- constructed on the fly. */
- YY_("syntax error, unexpected %s");
- YY_("syntax error, unexpected %s, expecting %s");
- YY_("syntax error, unexpected %s, expecting %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s");
- YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
-#endif
- char *yyfmt;
- char const *yyf;
- static char const yyunexpected[] = "syntax error, unexpected %s";
- static char const yyexpecting[] = ", expecting %s";
- static char const yyor[] = " or %s";
- char yyformat[sizeof yyunexpected
- + sizeof yyexpecting - 1
- + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
- * (sizeof yyor - 1))];
- char const *yyprefix = yyexpecting;
-
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- int yyxbegin = yyn < 0 ? -yyn : 0;
-
- /* Stay within bounds of both yycheck and yytname. */
- int yychecklim = YYLAST - yyn;
- int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 1;
-
- yyarg[0] = yytname[yytype];
- yyfmt = yystpcpy (yyformat, yyunexpected);
-
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
- {
- yycount = 1;
- yysize = yysize0;
- yyformat[sizeof yyunexpected - 1] = '\0';
- break;
- }
- yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (0, yytname[yyx]);
- yysize_overflow |= yysize1 < yysize;
- yysize = yysize1;
- yyfmt = yystpcpy (yyfmt, yyprefix);
- yyprefix = yyor;
- }
-
- yyf = YY_(yyformat);
- yysize1 = yysize + yystrlen (yyf);
- yysize_overflow |= yysize1 < yysize;
- yysize = yysize1;
-
- if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg)
- {
- /* Avoid sprintf, as that infringes on the user's name space.
- Don't have undefined behavior even if the translation
- produced a string with the wrong number of "%s"s. */
- char *yyp = yymsg;
- int yyi = 0;
- while ((*yyp = *yyf))
- {
- if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
- {
- yyp += yytnamerr (yyp, yyarg[yyi++]);
- yyf += 2;
- }
- else
- {
- yyp++;
- yyf++;
- }
- }
- yyerror (yymsg);
- YYSTACK_FREE (yymsg);
- }
- else
- {
- yyerror (YY_("syntax error"));
- goto yyexhaustedlab;
- }
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror (YY_("syntax error"));
- }
-
-
-
- if (yyerrstatus == 3)
- {
- /* If just tried and failed to reuse look-ahead token after an
- error, discard it. */
-
- if (yychar <= YYEOF)
- {
- /* Return failure if at end of input. */
- if (yychar == YYEOF)
- YYABORT;
- }
- else
- {
- yydestruct ("Error: discarding", yytoken, &yylval);
- yychar = YYEMPTY;
- }
- }
-
- /* Else will try to reuse look-ahead token after shifting the error
- token. */
- goto yyerrlab1;
-
-
-/*---------------------------------------------------.
-| yyerrorlab -- error raised explicitly by YYERROR. |
-`---------------------------------------------------*/
-yyerrorlab:
-
- /* Pacify compilers like GCC when the user code never invokes
- YYERROR and the label yyerrorlab therefore never appears in user
- code. */
- if (0)
- goto yyerrorlab;
-
-yyvsp -= yylen;
- yyssp -= yylen;
- yystate = *yyssp;
- goto yyerrlab1;
-
-
-/*-------------------------------------------------------------.
-| yyerrlab1 -- common code for both syntax error and YYERROR. |
-`-------------------------------------------------------------*/
-yyerrlab1:
- yyerrstatus = 3; /* Each real token shifted decrements this. */
-
- for (;;)
- {
- yyn = yypact[yystate];
- if (yyn != YYPACT_NINF)
- {
- yyn += YYTERROR;
- if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
- {
- yyn = yytable[yyn];
- if (0 < yyn)
- break;
- }
- }
-
- /* Pop the current state because it cannot handle the error token. */
- if (yyssp == yyss)
- YYABORT;
-
-
- yydestruct ("Error: popping", yystos[yystate], yyvsp);
- YYPOPSTACK;
- yystate = *yyssp;
- YY_STACK_PRINT (yyss, yyssp);
- }
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- *++yyvsp = yylval;
-
-
- /* Shift the error token. */
- YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
-
- yystate = yyn;
- goto yynewstate;
-
-
-/*-------------------------------------.
-| yyacceptlab -- YYACCEPT comes here. |
-`-------------------------------------*/
-yyacceptlab:
- yyresult = 0;
- goto yyreturn;
-
-/*-----------------------------------.
-| yyabortlab -- YYABORT comes here. |
-`-----------------------------------*/
-yyabortlab:
- yyresult = 1;
- goto yyreturn;
-
-#ifndef yyoverflow
-/*-------------------------------------------------.
-| yyexhaustedlab -- memory exhaustion comes here. |
-`-------------------------------------------------*/
-yyexhaustedlab:
- yyerror (YY_("memory exhausted"));
- yyresult = 2;
- /* Fall through. */
-#endif
-
-yyreturn:
- if (yychar != YYEOF && yychar != YYEMPTY)
- yydestruct ("Cleanup: discarding lookahead",
- yytoken, &yylval);
- while (yyssp != yyss)
- {
- yydestruct ("Cleanup: popping",
- yystos[*yyssp], yyvsp);
- YYPOPSTACK;
- }
-#ifndef yyoverflow
- if (yyss != yyssa)
- YYSTACK_FREE (yyss);
-#endif
- return yyresult;
-}
-
-
-
diff --git a/contrib/binutils/binutils/defparse.h b/contrib/binutils/binutils/defparse.h
deleted file mode 100644
index 0eea9b9..0000000
--- a/contrib/binutils/binutils/defparse.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* A Bison parser, made by GNU Bison 2.1. */
-
-/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* Tokens. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- /* Put the tokens into the symbol table, so that GDB and other debuggers
- know about them. */
- enum yytokentype {
- NAME = 258,
- LIBRARY = 259,
- DESCRIPTION = 260,
- STACKSIZE = 261,
- HEAPSIZE = 262,
- CODE = 263,
- DATA = 264,
- SECTIONS = 265,
- EXPORTS = 266,
- IMPORTS = 267,
- VERSIONK = 268,
- BASE = 269,
- CONSTANT = 270,
- READ = 271,
- WRITE = 272,
- EXECUTE = 273,
- SHARED = 274,
- NONSHARED = 275,
- NONAME = 276,
- PRIVATE = 277,
- SINGLE = 278,
- MULTIPLE = 279,
- INITINSTANCE = 280,
- INITGLOBAL = 281,
- TERMINSTANCE = 282,
- TERMGLOBAL = 283,
- ID = 284,
- NUMBER = 285
- };
-#endif
-/* Tokens. */
-#define NAME 258
-#define LIBRARY 259
-#define DESCRIPTION 260
-#define STACKSIZE 261
-#define HEAPSIZE 262
-#define CODE 263
-#define DATA 264
-#define SECTIONS 265
-#define EXPORTS 266
-#define IMPORTS 267
-#define VERSIONK 268
-#define BASE 269
-#define CONSTANT 270
-#define READ 271
-#define WRITE 272
-#define EXECUTE 273
-#define SHARED 274
-#define NONSHARED 275
-#define NONAME 276
-#define PRIVATE 277
-#define SINGLE 278
-#define MULTIPLE 279
-#define INITINSTANCE 280
-#define INITGLOBAL 281
-#define TERMINSTANCE 282
-#define TERMGLOBAL 283
-#define ID 284
-#define NUMBER 285
-
-
-
-
-#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
-#line 27 "defparse.y"
-typedef union YYSTYPE {
- char *id;
- int number;
-} YYSTYPE;
-/* Line 1447 of yacc.c. */
-#line 103 "defparse.h"
-# define yystype YYSTYPE /* obsolescent; will be withdrawn */
-# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
-#endif
-
-extern YYSTYPE yylval;
-
-
-
diff --git a/contrib/binutils/binutils/defparse.y b/contrib/binutils/binutils/defparse.y
index 81b4c61..8b870d7 100644
--- a/contrib/binutils/binutils/defparse.y
+++ b/contrib/binutils/binutils/defparse.y
@@ -1,6 +1,6 @@
%{ /* defparse.y - parser for .def files */
-/* Copyright 1995, 1997, 1998, 1999, 2001, 2004
+/* Copyright 1995, 1997, 1998, 1999, 2001, 2004, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -19,8 +19,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
-#include "bucomm.h"
+#include "libiberty.h"
#include "dlltool.h"
%}
diff --git a/contrib/binutils/binutils/dlltool.c b/contrib/binutils/binutils/dlltool.c
index 6c231f6..568ad68 100644
--- a/contrib/binutils/binutils/dlltool.c
+++ b/contrib/binutils/binutils/dlltool.c
@@ -1,6 +1,6 @@
/* dlltool.c -- tool to generate stuff for PE style DLLs
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006 Free Software Foundation, Inc.
+ 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -243,12 +243,13 @@
#define PAGE_SIZE 4096
#define PAGE_MASK (-PAGE_SIZE)
+#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
-#include "bucomm.h"
#include "getopt.h"
#include "demangle.h"
#include "dyn-string.h"
+#include "bucomm.h"
#include "dlltool.h"
#include "safe-ctype.h"
@@ -261,6 +262,9 @@
#include "coff/arm.h"
#include "coff/internal.h"
#endif
+#ifdef DLLTOOL_MX86_64
+#include "coff/x86_64.h"
+#endif
/* Forward references. */
static char *look_for_prog (const char *, const char *, int);
@@ -384,35 +388,43 @@ static int verbose;
static FILE *output_def;
static FILE *base_file;
-#ifdef DLLTOOL_ARM
-#ifdef DLLTOOL_ARM_EPOC
-static const char *mname = "arm-epoc";
-#else
+#ifdef DLLTOOL_DEFAULT_ARM
static const char *mname = "arm";
#endif
+
+#ifdef DLLTOOL_DEFAULT_ARM_EPOC
+static const char *mname = "arm-epoc";
+#endif
+
+#ifdef DLLTOOL_DEFAULT_ARM_WINCE
+static const char *mname = "arm-wince";
#endif
-#ifdef DLLTOOL_I386
+#ifdef DLLTOOL_DEFAULT_I386
static const char *mname = "i386";
#endif
-#ifdef DLLTOOL_PPC
+#ifdef DLLTOOL_DEFAULT_MX86_64
+static const char *mname = "i386:x86-64";
+#endif
+
+#ifdef DLLTOOL_DEFAULT_PPC
static const char *mname = "ppc";
#endif
-#ifdef DLLTOOL_SH
+#ifdef DLLTOOL_DEFAULT_SH
static const char *mname = "sh";
#endif
-#ifdef DLLTOOL_MIPS
+#ifdef DLLTOOL_DEFAULT_MIPS
static const char *mname = "mips";
#endif
-#ifdef DLLTOOL_MCORE
+#ifdef DLLTOOL_DEFAULT_MCORE
static const char * mname = "mcore-le";
#endif
-#ifdef DLLTOOL_MCORE_ELF
+#ifdef DLLTOOL_DEFAULT_MCORE_ELF
static const char * mname = "mcore-elf";
static char * mcore_elf_out_file = NULL;
static char * mcore_elf_linker = NULL;
@@ -629,6 +641,23 @@ mtable[] =
arm_jtab, sizeof (arm_jtab), 8
}
,
+ {
+#define MARM_WINCE 10
+ "arm-wince", ".byte", ".short", ".long", ".asciz", "@",
+ "ldr\tip,[pc]\n\tldr\tpc,[ip]\n\t.long",
+ ".global", ".space", ".align\t2",".align\t4", "-mapcs-32",
+ "pe-arm-wince-little", bfd_arch_arm,
+ arm_jtab, sizeof (arm_jtab), 8
+ }
+ ,
+ {
+#define MX86 11
+ "i386:x86-64", ".byte", ".short", ".long", ".asciz", "#",
+ "jmp *", ".global", ".space", ".align\t2",".align\t4", "",
+ "pe-x86-64",bfd_arch_i386,
+ i386_jtab, sizeof (i386_jtab), 2
+ }
+ ,
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
@@ -752,6 +781,7 @@ rvaafter (int machine)
{
case MARM:
case M386:
+ case MX86:
case MPPC:
case MTHUMB:
case MARM_INTERWORK:
@@ -760,6 +790,7 @@ rvaafter (int machine)
case MMCORE_ELF:
case MMCORE_ELF_LE:
case MARM_EPOC:
+ case MARM_WINCE:
break;
default:
/* xgettext:c-format */
@@ -776,6 +807,7 @@ rvabefore (int machine)
{
case MARM:
case M386:
+ case MX86:
case MPPC:
case MTHUMB:
case MARM_INTERWORK:
@@ -784,6 +816,7 @@ rvabefore (int machine)
case MMCORE_ELF:
case MMCORE_ELF_LE:
case MARM_EPOC:
+ case MARM_WINCE:
return ".rva\t";
default:
/* xgettext:c-format */
@@ -807,8 +840,10 @@ asm_prefix (int machine, const char *name)
case MMCORE_ELF:
case MMCORE_ELF_LE:
case MARM_EPOC:
+ case MARM_WINCE:
break;
case M386:
+ case MX86:
/* Symbol names starting with ? do not have a leading underscore. */
if (name && *name == '?')
break;
@@ -1234,7 +1269,7 @@ scan_drectve_symbols (bfd *abfd)
while (p < e)
{
if (p[0] == '-'
- && strncmp (p, "-export:", 8) == 0)
+ && CONST_STRNEQ (p, "-export:"))
{
char * name;
char * c;
@@ -1252,7 +1287,7 @@ scan_drectve_symbols (bfd *abfd)
char *tag_start = ++p;
while (p < e && *p != ' ' && *p != '-')
p++;
- if (strncmp (tag_start, "data", 4) == 0)
+ if (CONST_STRNEQ (tag_start, "data"))
flags &= ~BSF_FUNCTION;
}
@@ -1686,10 +1721,19 @@ generate_idata_ofile (FILE *filvar)
for (headptr = import_list; headptr != NULL; headptr = headptr->next)
{
fprintf (filvar, "listone%d:\n", headindex);
- for ( funcindex = 0; funcindex < headptr->nfuncs; funcindex++ )
+ for (funcindex = 0; funcindex < headptr->nfuncs; funcindex++)
+#ifdef DLLTOOL_MX86_64
+ fprintf (filvar, "\t%sfuncptr%d_%d%s\n%s\t0\n",
+ ASM_RVA_BEFORE, headindex, funcindex, ASM_RVA_AFTER,ASM_LONG);
+#else
fprintf (filvar, "\t%sfuncptr%d_%d%s\n",
ASM_RVA_BEFORE, headindex, funcindex, ASM_RVA_AFTER);
- fprintf (filvar,"\t%s\t0\n", ASM_LONG); /* NULL terminating list */
+#endif
+#ifdef DLLTOOL_MX86_64
+ fprintf (filvar, "\t%s\t0\n\t%s\t0\n", ASM_LONG, ASM_LONG); /* NULL terminating list. */
+#else
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG); /* NULL terminating list. */
+#endif
headindex++;
}
@@ -1698,10 +1742,19 @@ generate_idata_ofile (FILE *filvar)
for (headptr = import_list; headptr != NULL; headptr = headptr->next)
{
fprintf (filvar, "listtwo%d:\n", headindex);
- for ( funcindex = 0; funcindex < headptr->nfuncs; funcindex++ )
+ for (funcindex = 0; funcindex < headptr->nfuncs; funcindex++)
+#ifdef DLLTOOL_MX86_64
+ fprintf (filvar, "\t%sfuncptr%d_%d%s\n%s\t0\n",
+ ASM_RVA_BEFORE, headindex, funcindex, ASM_RVA_AFTER,ASM_LONG);
+#else
fprintf (filvar, "\t%sfuncptr%d_%d%s\n",
ASM_RVA_BEFORE, headindex, funcindex, ASM_RVA_AFTER);
- fprintf (filvar, "\t%s\t0\n", ASM_LONG); /* NULL terminating list */
+#endif
+#ifdef DLLTOOL_MX86_64
+ fprintf (filvar, "\t%s\t0\n\t%s\t0\n", ASM_LONG, ASM_LONG); /* NULL terminating list. */
+#else
+ fprintf (filvar, "\t%s\t0\n", ASM_LONG); /* NULL terminating list. */
+#endif
headindex++;
}
@@ -2344,7 +2397,7 @@ make_one_lib_file (export_type *exp, int i)
si->data = xmalloc (HOW_JTAB_SIZE);
memcpy (si->data, HOW_JTAB, HOW_JTAB_SIZE);
- /* add the reloc into idata$5 */
+ /* Add the reloc into idata$5. */
rel = xmalloc (sizeof (arelent));
rpp = xmalloc (sizeof (arelent *) * 2);
@@ -2360,6 +2413,12 @@ make_one_lib_file (export_type *exp, int i)
BFD_RELOC_16_GOTOFF);
rel->sym_ptr_ptr = iname_pp;
}
+ else if (machine == MX86)
+ {
+ rel->howto = bfd_reloc_type_lookup (abfd,
+ BFD_RELOC_32_PCREL);
+ rel->sym_ptr_ptr = iname_pp;
+ }
else
{
rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_32);
@@ -2374,6 +2433,36 @@ make_one_lib_file (export_type *exp, int i)
/* An idata$4 or idata$5 is one word long, and has an
rva to idata$6. */
+#ifdef DLLTOOL_MX86_64
+ si->data = xmalloc (8);
+ si->size = 8;
+
+ if (exp->noname)
+ {
+ si->data[0] = exp->ordinal ;
+ si->data[1] = exp->ordinal >> 8;
+ si->data[2] = exp->ordinal >> 16;
+ si->data[3] = exp->ordinal >> 24;
+ si->data[4] = 0;
+ si->data[5] = 0;
+ si->data[6] = 0;
+ si->data[7] = 0x80;
+ }
+ else
+ {
+ sec->reloc_count = 1;
+ memset (si->data, 0, si->size);
+ rel = xmalloc (sizeof (arelent));
+ rpp = xmalloc (sizeof (arelent *) * 2);
+ rpp[0] = rel;
+ rpp[1] = 0;
+ rel->address = 0;
+ rel->addend = 0;
+ rel->howto = bfd_reloc_type_lookup (abfd, BFD_RELOC_RVA);
+ rel->sym_ptr_ptr = secdata[IDATA6].sympp;
+ sec->orelocation = rpp;
+ }
+#else
si->data = xmalloc (4);
si->size = 4;
@@ -2398,7 +2487,7 @@ make_one_lib_file (export_type *exp, int i)
rel->sym_ptr_ptr = secdata[IDATA6].sympp;
sec->orelocation = rpp;
}
-
+#endif
break;
case IDATA6:
@@ -2612,14 +2701,17 @@ make_head (void)
if (!no_idata5)
{
fprintf (f, "\t.section\t.idata$5\n");
- fprintf (f, "\t%s\t0\n", ASM_LONG);
+#ifdef DLLTOOL_MX86_64
+ fprintf (f,"\t%s\t0\n\t%s\t0\n", ASM_LONG, ASM_LONG); /* NULL terminating list. */
+#else
+ fprintf (f,"\t%s\t0\n", ASM_LONG); /* NULL terminating list. */
+#endif
fprintf (f, "fthunk:\n");
}
if (!no_idata4)
{
fprintf (f, "\t.section\t.idata$4\n");
-
fprintf (f, "\t%s\t0\n", ASM_LONG);
fprintf (f, "\t.section .idata$4\n");
fprintf (f, "hname:\n");
@@ -2646,13 +2738,21 @@ make_tail (void)
if (!no_idata4)
{
fprintf (f, "\t.section .idata$4\n");
- fprintf (f, "\t%s\t0\n", ASM_LONG);
+#ifdef DLLTOOL_MX86_64
+ fprintf (f,"\t%s\t0\n\t%s\t0\n", ASM_LONG, ASM_LONG); /* NULL terminating list. */
+#else
+ fprintf (f,"\t%s\t0\n", ASM_LONG); /* NULL terminating list. */
+#endif
}
if (!no_idata5)
{
fprintf (f, "\t.section .idata$5\n");
- fprintf (f, "\t%s\t0\n", ASM_LONG);
+#ifdef DLLTOOL_MX86_64
+ fprintf (f,"\t%s\t0\n\t%s\t0\n", ASM_LONG, ASM_LONG); /* NULL terminating list. */
+#else
+ fprintf (f,"\t%s\t0\n", ASM_LONG); /* NULL terminating list. */
+#endif
}
#ifdef DLLTOOL_PPC
@@ -2728,7 +2828,7 @@ gen_lib_file (void)
if (exp->private)
continue;
n = make_one_lib_file (exp, i);
- n->next = head;
+ n->archive_next = head;
head = n;
if (ext_prefix_alias)
{
@@ -2747,14 +2847,14 @@ gen_lib_file (void)
alias_exp.forward = exp->forward;
alias_exp.next = exp->next;
n = make_one_lib_file (&alias_exp, i + PREFIX_ALIAS_BASE);
- n->next = head;
+ n->archive_next = head;
head = n;
}
}
/* Now stick them all into the archive. */
- ar_head->next = head;
- ar_tail->next = ar_head;
+ ar_head->archive_next = head;
+ ar_tail->archive_next = ar_head;
head = ar_tail;
if (! bfd_set_archive_head (outarch, head))
@@ -2765,7 +2865,7 @@ gen_lib_file (void)
while (head != NULL)
{
- bfd *n = head->next;
+ bfd *n = head->archive_next;
bfd_close (head);
head = n;
}
@@ -3068,6 +3168,8 @@ usage (FILE *file, int status)
fprintf (file, _(" -L --linker <name> Use <name> as the linker.\n"));
fprintf (file, _(" -F --linker-flags <flags> Pass <flags> to the linker.\n"));
#endif
+ if (REPORT_BUGS_TO[0] && status == 0)
+ fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
diff --git a/contrib/binutils/binutils/dllwrap.c b/contrib/binutils/binutils/dllwrap.c
index f93c75d..9828a95 100644
--- a/contrib/binutils/binutils/dllwrap.c
+++ b/contrib/binutils/binutils/dllwrap.c
@@ -1,5 +1,6 @@
/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
@@ -26,19 +27,15 @@
#endif
#endif
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
+#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
-#include "bucomm.h"
#include "getopt.h"
#include "dyn-string.h"
+#include "bucomm.h"
#include <time.h>
#include <sys/stat.h>
-#include <stdarg.h>
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
@@ -509,6 +506,8 @@ usage (FILE *file, int status)
fprintf (file, _(" --nodelete Keep temp files.\n"));
fprintf (file, _(" Rest are passed unmodified to the language driver\n"));
fprintf (file, "\n\n");
+ if (REPORT_BUGS_TO[0] && status == 0)
+ fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
diff --git a/contrib/binutils/binutils/doc/Makefile.am b/contrib/binutils/binutils/doc/Makefile.am
index 1d043e7..ceeda41 100644
--- a/contrib/binutils/binutils/doc/Makefile.am
+++ b/contrib/binutils/binutils/doc/Makefile.am
@@ -28,20 +28,16 @@ man_MANS = \
strings.1 \
strip.1 \
windres.1 \
+ windmc.1 \
$(DEMANGLER_NAME).1
info_TEXINFOS = binutils.texi
-binutils_TEXINFOS = config.texi
binutils_TEXI = $(srcdir)/binutils.texi
-AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
-TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
-
-config.texi: $(srcdir)/../../bfd/configure $(binutils_TEXI)
- rm -f config.texi
- eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
- echo "@set VERSION $$VERSION" > $@
- echo "@set UPDATED `date "+%B %Y"`" >> config.texi
+AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+ -I ../../bfd/doc
+TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+ -I ../../bfd/doc
# Man page generation from texinfo
addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
@@ -135,6 +131,13 @@ windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f windres.pod
+windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
+ -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f windmc.pod
+
cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
@@ -142,7 +145,6 @@ cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f $(DEMANGLER_NAME).pod
-MAINTAINERCLEANFILES = config.texi
MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
$(DEMANGLER_NAME).1: cxxfilt.man Makefile
@@ -180,6 +182,15 @@ install-html-am: $(HTMLS)
fi; \
done
+MAINTAINERCLEANFILES = binutils.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES = binutils.info
+endif
+
# Maintenance
# We need it for the taz target in ../../Makefile.in.
diff --git a/contrib/binutils/binutils/doc/Makefile.in b/contrib/binutils/binutils/doc/Makefile.in
index ef28cef..338c9ba 100644
--- a/contrib/binutils/binutils/doc/Makefile.in
+++ b/contrib/binutils/binutils/doc/Makefile.in
@@ -37,14 +37,22 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(binutils_TEXINFOS)
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../bfd/acinclude.m4 \
- $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
+ $(top_srcdir)/../bfd/warning.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/iconv.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/lib-ld.m4 \
+ $(top_srcdir)/../config/lib-link.m4 \
+ $(top_srcdir)/../config/lib-prefix.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@@ -53,7 +61,7 @@ CONFIG_CLEAN_FILES =
depcomp =
am__depfiles_maybe =
SOURCES =
-INFO_DEPS = $(srcdir)/binutils.info
+INFO_DEPS = binutils.info
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
DVIS = binutils.dvi
@@ -81,9 +89,11 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BUILD_DLLTOOL = @BUILD_DLLTOOL@
BUILD_DLLWRAP = @BUILD_DLLWRAP@
+BUILD_INSTALL_MISC = @BUILD_INSTALL_MISC@
BUILD_MISC = @BUILD_MISC@
BUILD_NLMCONV = @BUILD_NLMCONV@
BUILD_SRCONV = @BUILD_SRCONV@
+BUILD_WINDMC = @BUILD_WINDMC@
BUILD_WINDRES = @BUILD_WINDRES@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
@@ -99,6 +109,7 @@ DEFS = @DEFS@
DEMANGLER_NAME = @DEMANGLER_NAME@
DEPDIR = @DEPDIR@
DLLTOOL_DEFS = @DLLTOOL_DEFS@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -107,28 +118,32 @@ EMULATION = @EMULATION@
EMULATION_VECTOR = @EMULATION_VECTOR@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GMOFILES = @GMOFILES@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
+GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
+GREP = @GREP@
HDEFINES = @HDEFINES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
@@ -136,7 +151,9 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
NLMCONV_DEFS = @NLMCONV_DEFS@
+NM = @NM@
NO_WERROR = @NO_WERROR@
OBJDUMP_DEFS = @OBJDUMP_DEFS@
OBJEXT = @OBJEXT@
@@ -147,19 +164,20 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
@@ -188,10 +206,10 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -232,20 +250,29 @@ man_MANS = \
strings.1 \
strip.1 \
windres.1 \
+ windmc.1 \
$(DEMANGLER_NAME).1
info_TEXINFOS = binutils.texi
-binutils_TEXINFOS = config.texi
binutils_TEXI = $(srcdir)/binutils.texi
-AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
-TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
-MAINTAINERCLEANFILES = config.texi
+AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+ -I ../../bfd/doc
+
+TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+ -I ../../bfd/doc
+
MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+MAINTAINERCLEANFILES = binutils.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+@GENINSRC_NEVER_TRUE@DISTCLEANFILES = binutils.info
all: all-am
.SUFFIXES:
-.SUFFIXES: .dvi .html .info .pdf .ps .texi
+.SUFFIXES: .dvi .ps
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -255,9 +282,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign doc/Makefile
+ $(AUTOMAKE) --cygnus doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -285,42 +312,38 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
-.texi.info:
+binutils.info: binutils.texi
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
- am__cwd=`pwd` && cd $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
- cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $@ $<; \
+ -o $@ `test -f 'binutils.texi' || echo '$(srcdir)/'`binutils.texi; \
then \
rc=0; \
- cd $(srcdir); \
else \
rc=$$?; \
- cd $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
-.texi.dvi:
+binutils.dvi: binutils.texi
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $<
+ $(TEXI2DVI) -o $@ `test -f 'binutils.texi' || echo '$(srcdir)/'`binutils.texi
-.texi.pdf:
+binutils.pdf: binutils.texi
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $<
+ $(TEXI2PDF) -o $@ `test -f 'binutils.texi' || echo '$(srcdir)/'`binutils.texi
-.texi.html:
+binutils.html: binutils.texi
rm -rf $(@:.html=.htp)
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $(@:.html=.htp) $<; \
+ -o $(@:.html=.htp) `test -f 'binutils.texi' || echo '$(srcdir)/'`binutils.texi; \
then \
rm -rf $@; \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
@@ -330,10 +353,6 @@ distclean-libtool:
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
-$(srcdir)/binutils.info: binutils.texi $(binutils_TEXINFOS)
-binutils.dvi: binutils.texi $(binutils_TEXINFOS)
-binutils.pdf: binutils.texi $(binutils_TEXINFOS)
-binutils.html: binutils.texi $(binutils_TEXINFOS)
.dvi.ps:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $<
@@ -469,6 +488,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -569,12 +589,6 @@ uninstall-man: uninstall-man1
uninstall-man uninstall-man1
-config.texi: $(srcdir)/../../bfd/configure $(binutils_TEXI)
- rm -f config.texi
- eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
- echo "@set VERSION $$VERSION" > $@
- echo "@set UPDATED `date "+%B %Y"`" >> config.texi
-
# Man page generation from texinfo
addr2line.1: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
@@ -667,6 +681,13 @@ windres.1: $(binutils_TEXI) $(binutils_TEXINFOS)
mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
rm -f windres.pod
+windmc.1: $(binutils_TEXI) $(binutils_TEXINFOS)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dwindmc < $(binutils_TEXI) > windmc.pod
+ -($(POD2MAN) windmc.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f windmc.pod
+
cxxfilt.man: $(binutils_TEXI) $(binutils_TEXINFOS)
touch $@
-$(TEXI2POD) $(MANCONF) -Dcxxfilt < $(binutils_TEXI) > $(DEMANGLER_NAME).pod
diff --git a/contrib/binutils/binutils/doc/addr2line.1 b/contrib/binutils/binutils/doc/addr2line.1
deleted file mode 100644
index 71d1ea7..0000000
--- a/contrib/binutils/binutils/doc/addr2line.1
+++ /dev/null
@@ -1,265 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "ADDR2LINE 1"
-.TH ADDR2LINE 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-addr2line \- convert addresses into file names and line numbers.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-addr2line [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
- [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]]
- [\fB\-e\fR \fIfilename\fR|\fB\-\-exe=\fR\fIfilename\fR]
- [\fB\-f\fR|\fB\-\-functions\fR] [\fB\-s\fR|\fB\-\-basename\fR]
- [\fB\-i\fR|\fB\-\-inlines\fR]
- [\fB\-j\fR|\fB\-\-section=\fR\fIname\fR]
- [\fB\-H\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
- [addr addr ...]
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\fBaddr2line\fR translates addresses into file names and line numbers.
-Given an address in an executable or an offset in a section of a relocatable
-object, it uses the debugging information to figure out which file name and
-line number are associated with it.
-.PP
-The executable or relocatable object to use is specified with the \fB\-e\fR
-option. The default is the file \fIa.out\fR. The section in the relocatable
-object to use is specified with the \fB\-j\fR option.
-.PP
-\&\fBaddr2line\fR has two modes of operation.
-.PP
-In the first, hexadecimal addresses are specified on the command line,
-and \fBaddr2line\fR displays the file name and line number for each
-address.
-.PP
-In the second, \fBaddr2line\fR reads hexadecimal addresses from
-standard input, and prints the file name and line number for each
-address on standard output. In this mode, \fBaddr2line\fR may be used
-in a pipe to convert dynamically chosen addresses.
-.PP
-The format of the output is \fB\s-1FILENAME:LINENO\s0\fR. The file name and
-line number for each address is printed on a separate line. If the
-\&\fB\-f\fR option is used, then each \fB\s-1FILENAME:LINENO\s0\fR line is
-preceded by a \fB\s-1FUNCTIONNAME\s0\fR line which is the name of the function
-containing the address.
-.PP
-If the file name or function name can not be determined,
-\&\fBaddr2line\fR will print two question marks in their place. If the
-line number can not be determined, \fBaddr2line\fR will print 0.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-The long and short forms of options, shown here as alternatives, are
-equivalent.
-.IP "\fB\-b\fR \fIbfdname\fR" 4
-.IX Item "-b bfdname"
-.PD 0
-.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
-.IX Item "--target=bfdname"
-.PD
-Specify that the object-code format for the object files is
-\&\fIbfdname\fR.
-.IP "\fB\-C\fR" 4
-.IX Item "-C"
-.PD 0
-.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
-.IX Item "--demangle[=style]"
-.PD
-Decode (\fIdemangle\fR) 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.
-.IP "\fB\-e\fR \fIfilename\fR" 4
-.IX Item "-e filename"
-.PD 0
-.IP "\fB\-\-exe=\fR\fIfilename\fR" 4
-.IX Item "--exe=filename"
-.PD
-Specify the name of the executable for which addresses should be
-translated. The default file is \fIa.out\fR.
-.IP "\fB\-f\fR" 4
-.IX Item "-f"
-.PD 0
-.IP "\fB\-\-functions\fR" 4
-.IX Item "--functions"
-.PD
-Display function names as well as file and line number information.
-.IP "\fB\-s\fR" 4
-.IX Item "-s"
-.PD 0
-.IP "\fB\-\-basenames\fR" 4
-.IX Item "--basenames"
-.PD
-Display only the base of each file name.
-.IP "\fB\-i\fR" 4
-.IX Item "-i"
-.PD 0
-.IP "\fB\-\-inlines\fR" 4
-.IX Item "--inlines"
-.PD
-If the address belongs to a function that was inlined, the source
-information for all enclosing scopes back to the first non-inlined
-function will also be printed. For example, if \f(CW\*(C`main\*(C'\fR inlines
-\&\f(CW\*(C`callee1\*(C'\fR which inlines \f(CW\*(C`callee2\*(C'\fR, and address is from
-\&\f(CW\*(C`callee2\*(C'\fR, the source information for \f(CW\*(C`callee1\*(C'\fR and \f(CW\*(C`main\*(C'\fR
-will also be printed.
-.IP "\fB\-j\fR" 4
-.IX Item "-j"
-.PD 0
-.IP "\fB\-\-section\fR" 4
-.IX Item "--section"
-.PD
-Read offsets relative to the specified section instead of absolute addresses.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/ar.1 b/contrib/binutils/binutils/doc/ar.1
deleted file mode 100644
index 5985ca1..0000000
--- a/contrib/binutils/binutils/doc/ar.1
+++ /dev/null
@@ -1,390 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "AR 1"
-.TH AR 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-ar \- create, modify, and extract from archives
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-ar [\fB\-X32_64\fR] [\fB\-\fR]\fIp\fR[\fImod\fR [\fIrelpos\fR] [\fIcount\fR]] \fIarchive\fR [\fImember\fR...]
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-The \s-1GNU\s0 \fBar\fR program creates, modifies, and extracts from
-archives. An \fIarchive\fR is a single file holding a collection of
-other files in a structure that makes it possible to retrieve
-the original individual files (called \fImembers\fR of the archive).
-.PP
-The original files' contents, mode (permissions), timestamp, owner, and
-group are preserved in the archive, and can be restored on
-extraction.
-.PP
-\&\s-1GNU\s0 \fBar\fR can maintain archives whose members have names of any
-length; however, depending on how \fBar\fR 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).
-.PP
-\&\fBar\fR is considered a binary utility because archives of this sort
-are most often used as \fIlibraries\fR holding commonly needed
-subroutines.
-.PP
-\&\fBar\fR creates an index to the symbols defined in relocatable
-object modules in the archive when you specify the modifier \fBs\fR.
-Once created, this index is updated in the archive whenever \fBar\fR
-makes a change to its contents (save for the \fBq\fR 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.
-.PP
-You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index
-table. If an archive lacks the table, another form of \fBar\fR called
-\&\fBranlib\fR can be used to add just the table.
-.PP
-\&\s-1GNU\s0 \fBar\fR is designed to be compatible with two different
-facilities. You can control its activity using command-line options,
-like the different varieties of \fBar\fR on Unix systems; or, if you
-specify the single command-line option \fB\-M\fR, you can control it
-with a script supplied via standard input, like the \s-1MRI\s0 \*(L"librarian\*(R"
-program.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-\&\s-1GNU\s0 \fBar\fR allows you to mix the operation code \fIp\fR and modifier
-flags \fImod\fR in any order, within the first command-line argument.
-.PP
-If you wish, you may begin the first command-line argument with a
-dash.
-.PP
-The \fIp\fR keyletter specifies what operation to execute; it may be
-any of the following, but you must specify only one of them:
-.IP "\fBd\fR" 4
-.IX Item "d"
-\&\fIDelete\fR modules from the archive. Specify the names of modules to
-be deleted as \fImember\fR...; the archive is untouched if you
-specify no files to delete.
-.Sp
-If you specify the \fBv\fR modifier, \fBar\fR lists each module
-as it is deleted.
-.IP "\fBm\fR" 4
-.IX Item "m"
-Use this operation to \fImove\fR members in an archive.
-.Sp
-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.
-.Sp
-If no modifiers are used with \f(CW\*(C`m\*(C'\fR, any members you name in the
-\&\fImember\fR arguments are moved to the \fIend\fR of the archive;
-you can use the \fBa\fR, \fBb\fR, or \fBi\fR modifiers to move them to a
-specified place instead.
-.IP "\fBp\fR" 4
-.IX Item "p"
-\&\fIPrint\fR the specified members of the archive, to the standard
-output file. If the \fBv\fR modifier is specified, show the member
-name before copying its contents to standard output.
-.Sp
-If you specify no \fImember\fR arguments, all the files in the archive are
-printed.
-.IP "\fBq\fR" 4
-.IX Item "q"
-\&\fIQuick append\fR; Historically, add the files \fImember\fR... to the end of
-\&\fIarchive\fR, without checking for replacement.
-.Sp
-The modifiers \fBa\fR, \fBb\fR, and \fBi\fR do \fInot\fR affect this
-operation; new members are always placed at the end of the archive.
-.Sp
-The modifier \fBv\fR makes \fBar\fR list each file as it is appended.
-.Sp
-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 \fBar s\fR or
-\&\fBranlib\fR explicitly to update the symbol table index.
-.Sp
-However, too many different systems assume quick append rebuilds the
-index, so \s-1GNU\s0 \fBar\fR implements \fBq\fR as a synonym for \fBr\fR.
-.IP "\fBr\fR" 4
-.IX Item "r"
-Insert the files \fImember\fR... into \fIarchive\fR (with
-\&\fIreplacement\fR). This operation differs from \fBq\fR in that any
-previously existing members are deleted if their names match those being
-added.
-.Sp
-If one of the files named in \fImember\fR... does not exist, \fBar\fR
-displays an error message, and leaves undisturbed any existing members
-of the archive matching that name.
-.Sp
-By default, new members are added at the end of the file; but you may
-use one of the modifiers \fBa\fR, \fBb\fR, or \fBi\fR to request
-placement relative to some existing member.
-.Sp
-The modifier \fBv\fR used with this operation elicits a line of
-output for each file inserted, along with one of the letters \fBa\fR or
-\&\fBr\fR to indicate whether the file was appended (no old member
-deleted) or replaced.
-.IP "\fBt\fR" 4
-.IX Item "t"
-Display a \fItable\fR listing the contents of \fIarchive\fR, or those
-of the files listed in \fImember\fR... 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 \fBv\fR modifier.
-.Sp
-If you do not specify a \fImember\fR, all files in the archive
-are listed.
-.Sp
-If there is more than one file with the same name (say, \fBfie\fR) in
-an archive (say \fBb.a\fR), \fBar t b.a fie\fR lists only the
-first instance; to see them all, you must ask for a complete
-listing\-\-\-in our example, \fBar t b.a\fR.
-.IP "\fBx\fR" 4
-.IX Item "x"
-\&\fIExtract\fR members (named \fImember\fR) from the archive. You can
-use the \fBv\fR modifier with this operation, to request that
-\&\fBar\fR list each name as it extracts it.
-.Sp
-If you do not specify a \fImember\fR, all files in the archive
-are extracted.
-.PP
-A number of modifiers (\fImod\fR) may immediately follow the \fIp\fR
-keyletter, to specify variations on an operation's behavior:
-.IP "\fBa\fR" 4
-.IX Item "a"
-Add new files \fIafter\fR an existing member of the
-archive. If you use the modifier \fBa\fR, the name of an existing archive
-member must be present as the \fIrelpos\fR argument, before the
-\&\fIarchive\fR specification.
-.IP "\fBb\fR" 4
-.IX Item "b"
-Add new files \fIbefore\fR an existing member of the
-archive. If you use the modifier \fBb\fR, the name of an existing archive
-member must be present as the \fIrelpos\fR argument, before the
-\&\fIarchive\fR specification. (same as \fBi\fR).
-.IP "\fBc\fR" 4
-.IX Item "c"
-\&\fICreate\fR the archive. The specified \fIarchive\fR 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.
-.IP "\fBf\fR" 4
-.IX Item "f"
-Truncate names in the archive. \s-1GNU\s0 \fBar\fR will normally permit file
-names of any length. This will cause it to create archives which are
-not compatible with the native \fBar\fR program on some systems. If
-this is a concern, the \fBf\fR modifier may be used to truncate file
-names when putting them in the archive.
-.IP "\fBi\fR" 4
-.IX Item "i"
-Insert new files \fIbefore\fR an existing member of the
-archive. If you use the modifier \fBi\fR, the name of an existing archive
-member must be present as the \fIrelpos\fR argument, before the
-\&\fIarchive\fR specification. (same as \fBb\fR).
-.IP "\fBl\fR" 4
-.IX Item "l"
-This modifier is accepted but not used.
-.IP "\fBN\fR" 4
-.IX Item "N"
-Uses the \fIcount\fR parameter. This is used if there are multiple
-entries in the archive with the same name. Extract or delete instance
-\&\fIcount\fR of the given name from the archive.
-.IP "\fBo\fR" 4
-.IX Item "o"
-Preserve the \fIoriginal\fR 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.
-.IP "\fBP\fR" 4
-.IX Item "P"
-Use the full path name when matching names in the archive. \s-1GNU\s0
-\&\fBar\fR can not create an archive with a full path name (such archives
-are not \s-1POSIX\s0 complaint), but other archive creators can. This option
-will cause \s-1GNU\s0 \fBar\fR 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.
-.IP "\fBs\fR" 4
-.IX Item "s"
-Write an object-file index into the archive, or update an existing one,
-even if no other change is made to the archive. You may use this modifier
-flag either with any operation, or alone. Running \fBar s\fR on an
-archive is equivalent to running \fBranlib\fR on it.
-.IP "\fBS\fR" 4
-.IX Item "S"
-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
-\&\fBS\fR modifier on the last execution of \fBar\fR, or you must run
-\&\fBranlib\fR on the archive.
-.IP "\fBu\fR" 4
-.IX Item "u"
-Normally, \fBar r\fR... inserts all files
-listed into the archive. If you would like to insert \fIonly\fR those
-of the files you list that are newer than existing members of the same
-names, use this modifier. The \fBu\fR modifier is allowed only for the
-operation \fBr\fR (replace). In particular, the combination \fBqu\fR is
-not allowed, since checking the timestamps would lose any speed
-advantage from the operation \fBq\fR.
-.IP "\fBv\fR" 4
-.IX Item "v"
-This modifier requests the \fIverbose\fR version of an operation. Many
-operations display additional information, such as filenames processed,
-when the modifier \fBv\fR is appended.
-.IP "\fBV\fR" 4
-.IX Item "V"
-This modifier shows the version number of \fBar\fR.
-.PP
-\&\fBar\fR ignores an initial option spelt \fB\-X32_64\fR, for
-compatibility with \s-1AIX\s0. The behaviour produced by this option is the
-default for \s-1GNU\s0 \fBar\fR. \fBar\fR does not support any of the other
-\&\fB\-X\fR options; in particular, it does not support \fB\-X32\fR
-which is the default for \s-1AIX\s0 \fBar\fR.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fInm\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/binutils.texi b/contrib/binutils/binutils/doc/binutils.texi
index be571d2..9499634 100644
--- a/contrib/binutils/binutils/doc/binutils.texi
+++ b/contrib/binutils/binutils/doc/binutils.texi
@@ -1,9 +1,10 @@
\input texinfo @c -*- Texinfo -*-
@setfilename binutils.info
-@c Copyright 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+@c Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
+@c Free Software Foundation, Inc.
@c man begin INCLUDE
-@include config.texi
+@include bfdver.texi
@c man end
@ifinfo
@@ -24,15 +25,16 @@ START-INFO-DIR-ENTRY
* addr2line: (binutils)addr2line. Convert addresses to file and line
* nlmconv: (binutils)nlmconv. Converts object code into an NLM
* windres: (binutils)windres. Manipulate Windows resources
+* windmc: (binutils)windmc. Generator for Windows message resources
* dlltool: (binutils)dlltool. Create files needed to build and use DLLs
END-INFO-DIR-ENTRY
@end format
@end ifinfo
-@ifinfo
+@copying
@c man begin COPYRIGHT
Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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
@@ -42,23 +44,16 @@ 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
+@end copying
@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, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-@c 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-@c
+@c Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+@c 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+@c
@c This text may be freely distributed under the terms of the GNU
@c Free Documentation License.
@c
@@ -68,6 +63,9 @@ notice identical to this one except for the removal of this paragraph
@titlepage
@finalout
@title The @sc{gnu} Binary Utilities
+@ifset VERSION_PACKAGE
+@subtitle @value{VERSION_PACKAGE}
+@end ifset
@subtitle Version @value{VERSION}
@sp 1
@subtitle @value{UPDATED}
@@ -83,7 +81,7 @@ notice identical to this one except for the removal of this paragraph
@vskip 0pt plus 1filll
Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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
@@ -93,13 +91,18 @@ Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
section entitled ``GNU Free Documentation License''.
@end titlepage
+@contents
@node Top
@top Introduction
@cindex version
This brief manual contains documentation for the @sc{gnu} binary
-utilities (collectively version @value{VERSION}):
+utilities
+@ifset VERSION_PACKAGE
+@value{VERSION_PACKAGE}
+@end ifset
+version @value{VERSION}:
@iftex
@table @code
@@ -143,6 +146,9 @@ Convert object code into a Netware Loadable Module
@item windres
Manipulate Windows resources
+@item windmc
+Genertor for Windows message resources
+
@item dlltool
Create the files needed to build and use Dynamic Link Libraries
@end table
@@ -167,12 +173,13 @@ section entitled "GNU Free Documentation License".
* addr2line:: Convert addresses to file and line
* nlmconv:: Converts object code into an NLM
* windres:: Manipulate Windows resources
+* windmc:: Generator for Windows message resources
* dlltool:: Create files needed to build and use DLLs
* Common Options:: Command-line options for all utilities
* Selecting The Target System:: How these utilities determine the target.
* Reporting Bugs:: Reporting Bugs
* GNU Free Documentation License:: GNU Free Documentation License
-* Index:: Index
+* Binutils Index:: Binutils Index
@end menu
@node ar
@@ -198,7 +205,7 @@ 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.
+extraction.
@cindex name length
@sc{gnu} @command{ar} can maintain archives whose members have names of any
@@ -289,7 +296,7 @@ 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.
+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;
@@ -413,7 +420,7 @@ member must be present as the @var{relpos} argument, before the
@item l
This modifier is accepted but not used.
@c whaffor ar l modifier??? presumably compat; with
-@c what???---doc@@cygnus.com, 25jan91
+@c what???---doc@@cygnus.com, 25jan91
@item N
Uses the @var{count} parameter. This is used if there are multiple
@@ -546,7 +553,7 @@ to @code{SAVE}, commands affect only the temporary copy of the current
archive.
@table @code
-@item ADDLIB @var{archive}
+@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.
@@ -627,7 +634,7 @@ will not actually affect @var{archive} until you next use @code{SAVE}.
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.
+the current archive, must exist.
Requires prior use of @code{OPEN} or @code{CREATE}.
@@ -639,7 +646,7 @@ When the flag is on, @code{DIRECTORY} output matches output from
@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.
+command.
Requires prior use of @code{OPEN} or @code{CREATE}.
@@ -752,7 +759,7 @@ 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 symbol is determined in a system-specific manner without
-error. On some systems, uppercase indicates that a default value has been
+error. On some systems, uppercase indicates that a default value has been
specified.
@@ -782,7 +789,7 @@ equivalent.
@table @env
@item -A
@itemx -o
-@itemx --print-file-name
+@itemx --print-file-name
@cindex input file name
@cindex file name
@cindex source file name
@@ -791,7 +798,7 @@ in which it was found, rather than identifying the input file once only,
before all of its symbols.
@item -a
-@itemx --debug-syms
+@itemx --debug-syms
@cindex debugging symbols
Display all symbols, even debugger-only symbols; normally these are not
listed.
@@ -807,8 +814,8 @@ The same as @option{--format=bsd} (for compatibility with the MIPS @command{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},
+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
@@ -831,7 +838,7 @@ Only the first character of @var{format} is significant; it can be
either upper or lower case.
@item -g
-@itemx --extern-only
+@itemx --extern-only
@cindex external symbols
Display only external symbols.
@@ -846,12 +853,12 @@ information can be found, print it after the other symbol information.
@item -n
@itemx -v
-@itemx --numeric-sort
+@itemx --numeric-sort
Sort symbols numerically by their addresses, rather than alphabetically
-by their names.
+by their names.
@item -p
-@itemx --no-sort
+@itemx --no-sort
@cindex sorting symbols
Do not bother to sort the symbols in any order; print them in the order
encountered.
@@ -873,15 +880,15 @@ When listing symbols from archive members, include the index: a mapping
contain definitions for which names.
@item -r
-@itemx --reverse-sort
+@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. If the @code{bsd} output format is used the size of the symbol
-is printed, rather than the value, and @samp{-S} must be used in order
+value. If the @code{bsd} output format is used the size of the symbol
+is printed, rather than the value, and @samp{-S} must be used in order
both size and value to be printed.
@item --special-syms
@@ -889,7 +896,7 @@ Display symbols which have a target-specific special meaning. These
symbols are usually used by the target for some special processing and
are not normally helpful when included included in the normal symbol
lists. For example for ARM targets this option would skip the mapping
-symbols used to mark transistions between ARM code, THUMB code and
+symbols used to mark transitions between ARM code, THUMB code and
data.
@item -t @var{radix}
@@ -903,7 +910,7 @@ Specify an object code format other than your system's default format.
@xref{Target Selection}, for more information.
@item -u
-@itemx --undefined-only
+@itemx --undefined-only
@cindex external symbols
@cindex undefined symbols
Display only undefined symbols (those external to each object file).
@@ -952,6 +959,7 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{-N} @var{symbolname}|@option{--strip-symbol=}@var{symbolname}]
[@option{--strip-unneeded-symbol=}@var{symbolname}]
[@option{-G} @var{symbolname}|@option{--keep-global-symbol=}@var{symbolname}]
+ [@option{--localize-hidden}]
[@option{-L} @var{symbolname}|@option{--localize-symbol=}@var{symbolname}]
[@option{--globalize-symbol=}@var{symbolname}]
[@option{-W} @var{symbolname}|@option{--weaken-symbol=}@var{symbolname}]
@@ -977,6 +985,7 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@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{--reverse-bytes=}@var{num}]
[@option{--srec-len=}@var{ival}] [@option{--srec-forceS3}]
[@option{--redefine-sym} @var{old}=@var{new}]
[@option{--redefine-syms=}@var{filename}]
@@ -995,12 +1004,13 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{--add-gnu-debuglink=}@var{path-to-file}]
[@option{--keep-file-symbols}]
[@option{--only-keep-debug}]
+ [@option{--extract-symbol}]
[@option{--writable-text}]
[@option{--readonly-text}]
[@option{--pure}]
[@option{--impure}]
[@option{-v}|@option{--verbose}]
- [@option{-V}|@option{--version}]
+ [@option{-V}|@option{--version}]
[@option{--help}] [@option{--info}]
@var{infile} [@var{outfile}]
@c man end
@@ -1041,6 +1051,7 @@ 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 (e.g., @samp{srec}).
+(However, see the @option{--reverse-bytes} option.)
@c man end
@@ -1079,7 +1090,7 @@ 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.
+an object file and then access it in your code using these symbols.
@item -j @var{sectionname}
@itemx --only-section=@var{sectionname}
@@ -1124,6 +1135,11 @@ 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 --localize-hidden
+In an ELF object, mark all symbols that have hidden or internal visibility
+as local. This option applies on top of symbol-specific localization options
+such as @option{-L}.
+
@item -L @var{symbolname}
@itemx --localize-symbol=@var{symbolname}
Make symbol @var{symbolname} local to the file, so that it is not
@@ -1219,7 +1235,7 @@ 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.
+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}
@@ -1242,7 +1258,7 @@ 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.
+will be issued, unless @option{--no-change-warnings} is used.
@item --change-section-vma @var{section}@{=,+,-@}@var{val}
@cindex changing section VMA
@@ -1256,19 +1272,19 @@ 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.
+@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.
+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.
+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
@@ -1326,13 +1342,37 @@ different conventions for symbol names. This is different from
when appropriate, regardless of the object file format of the output
file.
+@item --reverse-bytes=@var{num}
+Reverse the bytes in a section with output contents. A section length must
+be evenly divisible by the value given in order for the swap to be able to
+take place. Reversing takes place before the interleaving is performed.
+
+This option is used typically in generating ROM images for problematic
+target systems. For example, on some target boards, the 32-bit words
+fetched from 8-bit ROMs are re-assembled in little-endian byte order
+regardless of the CPU byte order. Depending on the programming model, the
+endianness of the ROM may need to be modified.
+
+Consider a simple file with a section containing the following eight
+bytes: @code{12345678}.
+
+Using @samp{--reverse-bytes=2} for the above example, the bytes in the
+output file would be ordered @code{21436587}.
+
+Using @samp{--reverse-bytes=4} for the above example, the bytes in the
+output file would be ordered @code{43218765}.
+
+By using @samp{--reverse-bytes=2} for the above example, followed by
+@samp{--reverse-bytes=4} on the output file, the bytes in the second
+output file would be ordered @code{34127856}.
+
@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,
+Meaningful only for srec output. Avoid generation of S1/S2 records,
creating S3-only record format.
@item --redefine-sym @var{old}=@var{new}
@@ -1397,7 +1437,7 @@ 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
+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. For ELF based architectures if the @var{index}
alternative does not exist then the value is treated as an absolute
@@ -1441,7 +1481,7 @@ which would otherwise get stripped.
@item --only-keep-debug
Strip a file, removing contents of any sections that would not be
stripped by @option{--strip-debug} and leaving the debugging sections
-intact.
+intact. In ELF files, this preserves all note sections in the output.
The intention is that this option will be used in conjunction with
@option{--add-gnu-debuglink} to create a two part executable. One a
@@ -1472,10 +1512,32 @@ optional. You could instead do this:
@item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
@end enumerate
-i.e. the file pointed to by the @option{--add-gnu-debuglink} can be the
+i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the
full executable. It does not have to be a file created by the
@option{--only-keep-debug} switch.
+Note - this switch is only intended for use on fully linked files. It
+does not make sense to use it on object files where the debugging
+information may be incomplete. Besides the gnu_debuglink feature
+currently only supports the presence of one filename containing
+debugging information, not multiple filenames on a one-per-object-file
+basis.
+
+@item --extract-symbol
+Keep the file's section flags and symbols but remove all section data.
+Specifically, the option:
+
+@itemize
+@item sets the virtual and load addresses of every section to zero;
+@item removes the contents of all sections;
+@item sets the size of every section to zero; and
+@item sets the file's start address to zero.
+@end itemize
+
+This option is used to build a @file{.sym} file for a VxWorks kernel.
+It can also be a useful way of reducing the size of a @option{--just-symbols}
+linker input file.
+
@item -V
@itemx --version
Show the version number of @command{objcopy}.
@@ -1612,8 +1674,8 @@ formats available with the @option{-i} option.
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},
+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
@@ -1747,7 +1809,7 @@ 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},
+intel syntax mode and AT&T syntax mode. @option{addr64}, @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
@@ -1758,17 +1820,18 @@ 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. @option{e300} selects
-disassembly for the e300 family.
+disassembly for the e300 family. @option{440} selects disassembly for
+the PowerPC 440.
-For MIPS, this option controls the printing of instruction mneumonic
+For MIPS, this option controls the printing of instruction mnemonic
names and register names in disassembled instructions. Multiple
selections from the following may be specified as a comma separated
string, and invalid options are ignored:
@table @code
@item no-aliases
-Print the 'raw' instruction mneumonic instead of some pseudo
-instruction mneumonic. I.E. print 'daddu' or 'or' instead of 'move',
+Print the 'raw' instruction mnemonic instead of some pseudo
+instruction mnemonic. I.e., print 'daddu' or 'or' instead of 'move',
'sll' instead of 'nop', etc.
@item gpr-names=@var{ABI}
@@ -1811,7 +1874,7 @@ For VAX, you can specify function entry addresses with @option{-M
entry:0xf00ba}. You can use this multiple times to properly
disassemble VAX binary files that don't contain symbol tables (like
ROM dumps). In these cases, the function entry mask would otherwise
-be decoded as VAX instructions, which would probably lead the the rest
+be decoded as VAX instructions, which would probably lead the rest
of the function being wrongly disassembled.
@item -p
@@ -1963,7 +2026,7 @@ ranlib [@option{-vV}] @var{archive}
@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.
+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.
@@ -2008,7 +2071,7 @@ 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}]
+ [@option{--target=}@var{bfdname}] [@option{-V}|@option{--version}]
[@var{objfile}@dots{}]
@c man end
@end smallexample
@@ -2038,13 +2101,13 @@ 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.
+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}:
+@command{size}:
@smallexample
$ size --format=Berkeley ranlib size
text data bss dec hex filename
@@ -2059,18 +2122,18 @@ This is the same data, but displayed closer to System V conventions:
$ size --format=SysV ranlib size
ranlib :
section size addr
-.text 294880 8192
-.data 81920 303104
-.bss 11592 385024
-Total 388392
+.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
+.text 294880 8192
+.data 81920 303104
+.bss 11888 385024
+Total 388688
@end smallexample
@item --help
@@ -2130,7 +2193,7 @@ strings [@option{-afov}] [@option{-}@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{-T} @var{bfdname}] [@option{--target=}@var{bfdname}]
[@option{--help}] [@option{--version}] @var{file}@dots{}
@c man end
@end smallexample
@@ -2191,7 +2254,8 @@ single-8-bit-byte characters, @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}
+@item -T @var{bfdname}
+@itemx --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.
@@ -2348,8 +2412,9 @@ When stripping a file, perhaps with @option{--strip-debug} or
which would otherwise get stripped.
@item --only-keep-debug
-Strip a file, removing any sections that would be stripped by
-@option{--strip-debug} and leaving the debugging sections.
+Strip a file, removing contents of any sections that would not be
+stripped by @option{--strip-debug} and leaving the debugging sections
+intact. In ELF files, this preserves all note sections in the output.
The intention is that this option will be used in conjunction with
@option{--add-gnu-debuglink} to create a two part executable. One a
@@ -2384,6 +2449,13 @@ ie the file pointed to by the @option{--add-gnu-debuglink} can be the
full executable. It does not have to be a file created by the
@option{--only-keep-debug} switch.
+Note - this switch is only intended for use on fully linked files. It
+does not make sense to use it on object files where the debugging
+information may be incomplete. Besides the gnu_debuglink feature
+currently only supports the presence of one filename containing
+debugging information, not multiple filenames on a one-per-object-file
+basis.
+
@item -V
@itemx --version
Show the version number for @command{strip}.
@@ -2432,7 +2504,7 @@ able to distinguish these similarly named functions C++ and Java
encode them into a low-level assembler name which uniquely identifies
each different version. This process is known as @dfn{mangling}. The
@command{c++filt}
-@footnote{MS-DOS does not allow @kbd{+} characters in file names, so on
+@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 they can be read.
@@ -2457,7 +2529,7 @@ names from the standard input instead. All the results are printed on
the standard output. The difference between reading names from the
command line versus reading names from the standard input is that
command line arguments are expected to be just mangled names and no
-checking is performed to seperate them from surrounding text. Thus
+checking is performed to separate them from surrounding text. Thus
for example:
@smallexample
@@ -2571,8 +2643,8 @@ the Info entries for @file{binutils}.
@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,
+a command-line option may be required in the future to decode a name
+passed as an argument on the command line; in other words,
@example
c++filt @var{symbol}
@@ -2659,8 +2731,8 @@ Specify that the object-code format for the object files is
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},
+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}
@@ -2803,6 +2875,168 @@ the Info entries for @file{binutils}.
@c man end
@end ignore
+@node windmc
+@chapter windmc
+
+@command{windmc} may be used to generator Windows message resources.
+
+@quotation
+@emph{Warning:} @command{windmc} is not always built as part of the binary
+utilities, since it is only useful for Windows targets.
+@end quotation
+
+@c man title windmc generates Windows message resources.
+
+@smallexample
+@c man begin SYNOPSIS windres
+windmc [options] input-file
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION windmc
+
+@command{windmc} reads message definitions from an input file (.mc) and
+translate them into a set of output files. The output files may be of
+four kinds:
+
+@table @code
+@item h
+A C header file containing the message definitions.
+
+@item rc
+A resource file compilable by the @command{windres} tool.
+
+@item bin
+One or more binary files containing the resource data for a specific
+message language.
+
+@item dbg
+A C include file that maps message id's to their symbolic name.
+@end table
+
+The exact description of these different formats is available in
+documentation from Microsoft.
+
+When @command{windmc} converts from the @code{mc} format to the @code{bin}
+format, @code{rc}, @code{h}, and optional @code{dbg} it is acting like the
+Windows Message Compiler.
+
+@c man end
+
+@c man begin OPTIONS windmc
+
+@table @env
+@item -a
+@itemx --ascii_in
+Specifies that the input file specified is ANSI. This is the default
+behaviour.
+
+@item -A
+@itemx --ascii_out
+Specifies that messages in the output @code{bin} files should be in ANSI
+format.
+
+@item -b
+@itemx --binprefix
+Specifies that @code{bin} filenames should have to be prefixed by the
+basename of the source file.
+
+@item -c
+@itemx --customflag
+Sets the customer bit in all message id's.
+
+@item -C @var{codepage}
+@itemx --codepage_in @var{codepage}
+Sets the default codepage to be used to convert input file to UTF16. The
+default is ocdepage 1252.
+
+@item -d
+@itemx --decimal_values
+Outputs the constants in the header file in decimal. Default is using
+hexadecimal output.
+
+@item -e @var{ext}
+@itemx --extension @var{ext}
+The extension for the header file. The default is .h extension.
+
+@item -F @var{target}
+@itemx --target @var{target}
+Specify the BFD format to use for a bin file as output. This
+is a BFD target name; you can use the @option{--help} option to see a list
+of supported targets. Normally @command{windmc} will use the default
+format, which is the first one listed by the @option{--help} option.
+@ifclear man
+@ref{Target Selection}.
+@end ifclear
+
+@item -h @var{path}
+@itemx --headerdir @var{path}
+The target directory of the generated header file. The default is the
+current directory.
+
+@item -H
+@itemx --help
+Displays a list of command line options and then exits.
+
+@item -m @var{characters}
+@itemx --maxlength @var{characters}
+Instructs @command{windmc} to generate a warning if the length
+of any message exceeds the number specified.
+
+@item -n
+@itemx --nullterminate
+Terminate message text in @code{bin} files by zero. By default they are
+terminated by CR/LF.
+
+@item -o
+@itemx --hresult_use
+Not yet implemented. Instructs @code{windmc} to generate an OLE2 header
+file, using HRESULT definitions. Status codes are used if the flag is not
+specified.
+
+@item -O @var{codepage}
+@itemx --codepage_out @var{codepage}
+Sets the default codepage to be used to output text files. The default
+is ocdepage 1252.
+
+@item -r @var{path}
+@itemx --rcdir @var{path}
+The target directory for the generated @code{rc} script and the generated
+@code{bin} files that the resource compiler script includes. The default
+is the current directory.
+
+@item -u
+@itemx --unicode_in
+Specifies that the input file is UTF16.
+
+@item -U
+@itemx --unicode_out
+Specifies that messages in the output @code{bin} file should be in UTF16
+format. This is the default behaviour.
+
+@item -v
+@item --verbose
+Enable verbose mode. This tells you what the preprocessor is if you
+didn't specify one.
+
+@item -V
+@item --version
+Prints the version number for @command{windres}.
+
+@item -x @var{path}
+@itemx --xdgb @var{path}
+The path of the @code{dbg} C include file that maps message id's to the
+symbolic name. No such file is generated without specifying the switch.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO windmc
+the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
@node windres
@chapter windres
@@ -2885,7 +3119,7 @@ The name of the output file. If this option is not used, then
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. Note,
-for compatability with @command{rc} the option @option{-fo} is also
+for compatibility with @command{rc} the option @option{-fo} is also
accepted, but its use is not recommended.
@item -J @var{format}
@@ -2922,7 +3156,7 @@ 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. If the argument passed to this command
-matches any of the supported @var{formats} (as descrived in the @option{-J}
+matches any of the supported @var{formats} (as described in the @option{-J}
option), it will issue a deprecation warning, and behave just like the
@option{-J} option. New programs should not use this behaviour. If a
directory happens to match a @var{format}, simple prefix it with @samp{./}
@@ -2945,6 +3179,13 @@ Ignored for compatibility with rc.
Enable verbose mode. This tells you what the preprocessor is if you
didn't specify one.
+@item -c @var{val}
+@item --codepage @var{val}
+Specify the default codepage to use when reading an @code{rc} file.
+@var{val} should be a hexadecimal prefixed by @samp{0x} or decimal
+codepage code. The valid range is from zero up to 0xffff, but the
+validity of the codepage is host and configuration dependent.
+
@item -l @var{val}
@item --language @var{val}
Specify the default language to use when reading an @code{rc} file.
@@ -2953,8 +3194,8 @@ 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
+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).
@@ -3013,7 +3254,7 @@ 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{-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}]
@@ -3025,7 +3266,7 @@ dlltool [@option{-d}|@option{--input-def} @var{def-file-name}]
[@option{-p}|@option{--ext-prefix-alias} @var{prefix}]
[@option{-x}|@option{--no-idata4}] [@option{-c}|@option{--no-idata5}] [@option{-i}|@option{--interwork}]
[@option{-n}|@option{--nodelete}] [@option{-t}|@option{--temp-prefix} @var{prefix}]
- [@option{-v}|@option{--verbose}]
+ [@option{-v}|@option{--verbose}]
[@option{-h}|@option{--help}] [@option{-V}|@option{--version}]
[object-file @dots{}]
@c man end
@@ -3038,8 +3279,8 @@ dlltool [@option{-d}|@option{--input-def} @var{def-file-name}]
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
+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
@@ -3060,7 +3301,7 @@ section of the object file. This can be done in C by using the
asm() operator:
@smallexample
- asm (".section .drectve");
+ asm (".section .drectve");
asm (".ascii \"-export:my_func\"");
int my_func (void) @{ @dots{} @}
@@ -3070,7 +3311,7 @@ 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 @file{.def} file.
+@command{dlltool} when it is creating or reading in a @file{.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
@@ -3192,12 +3433,12 @@ contents of the DLL are actually encode using Thumb instructions.
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!
+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 @emph{all} exported symbols.
+should prepend an underscore to the names of @emph{all} exported symbols.
@item --add-stdcall-underscore
Specifies that when @command{dlltool} is creating the exports file it
@@ -3254,7 +3495,7 @@ file.
@itemx --temp-prefix @var{prefix}
Makes @command{dlltool} use @var{prefix} when constructing the names of
temporary assembler and object files. By default, the temp file prefix
-is generated from the pid.
+is generated from the pid.
@item -v
@itemx --verbose
@@ -3339,7 +3580,7 @@ The Info pages for @file{binutils}.
@smallexample
@c man begin SYNOPSIS readelf
-readelf [@option{-a}|@option{--all}]
+readelf [@option{-a}|@option{--all}]
[@option{-h}|@option{--file-header}]
[@option{-l}|@option{--program-headers}|@option{--segments}]
[@option{-S}|@option{--section-headers}|@option{--sections}]
@@ -3384,15 +3625,15 @@ affected.
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.
+given.
@table @env
@item -a
@itemx --all
-Equivalent to specifiying @option{--file-header},
+Equivalent to specifying @option{--file-header},
@option{--program-headers}, @option{--sections}, @option{--symbols},
@option{--relocs}, @option{--dynamic}, @option{--notes} and
-@option{--version-info}.
+@option{--version-info}.
@item -h
@itemx --file-header
@@ -3564,8 +3805,8 @@ 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::
+* Target Selection::
+* Architecture Selection::
@end menu
@node Target Selection
@@ -3746,8 +3987,10 @@ You can find contact information for many support companies and
individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
+@ifset BUGURL
In any event, we also recommend that you send bug reports for the binary
-utilities to @samp{bug-binutils@@gnu.org}.
+utilities to @value{BUGURL}.
+@end ifset
The fundamental principle of reporting bugs usefully is this:
@strong{report all the facts}. If you are not sure whether to state a
@@ -3806,11 +4049,7 @@ 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.
+generally most helpful to send the actual object files.
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
@@ -3830,7 +4069,7 @@ 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
+copy of the utility is out of sync, 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
@@ -3898,10 +4137,9 @@ things without first using the debugger to find the facts.
@include fdl.texi
-@node Index
-@unnumbered Index
+@node Binutils Index
+@unnumbered Binutils Index
@printindex cp
-@contents
@bye
diff --git a/contrib/binutils/binutils/doc/cxxfilt.man b/contrib/binutils/binutils/doc/cxxfilt.man
deleted file mode 100644
index 08e77f1..0000000
--- a/contrib/binutils/binutils/doc/cxxfilt.man
+++ /dev/null
@@ -1,345 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "C++FILT 1"
-.TH C++FILT 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-cxxfilt \- Demangle C++ and Java symbols.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-c++filt [\fB\-_\fR|\fB\-\-strip\-underscores\fR]
- [\fB\-n\fR|\fB\-\-no\-strip\-underscores\fR]
- [\fB\-p\fR|\fB\-\-no\-params\fR]
- [\fB\-t\fR|\fB\-\-types\fR]
- [\fB\-i\fR|\fB\-\-no\-verbose\fR]
- [\fB\-s\fR \fIformat\fR|\fB\-\-format=\fR\fIformat\fR]
- [\fB\-\-help\fR] [\fB\-\-version\fR] [\fIsymbol\fR...]
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-The \*(C+ and Java languages provide function overloading, which means
-that you can write many functions with the same name, providing that
-each function takes parameters of different types. In order to be
-able to distinguish these similarly named functions \*(C+ and Java
-encode them into a low-level assembler name which uniquely identifies
-each different version. This process is known as \fImangling\fR. The
-\&\fBc++filt\fR
-[1]
-program does the inverse mapping: it decodes (\fIdemangles\fR) low-level
-names into user-level names so that they can be read.
-.PP
-Every alphanumeric word (consisting of letters, digits, underscores,
-dollars, or periods) seen in the input is a potential mangled name.
-If the name decodes into a \*(C+ name, the \*(C+ name replaces the
-low-level name in the output, otherwise the original word is output.
-In this way you can pass an entire assembler source file, containing
-mangled names, through \fBc++filt\fR and see the same source file
-containing demangled names.
-.PP
-You can also use \fBc++filt\fR to decipher individual symbols by
-passing them on the command line:
-.PP
-.Vb 1
-\& c++filt <symbol>
-.Ve
-.PP
-If no \fIsymbol\fR arguments are given, \fBc++filt\fR reads symbol
-names from the standard input instead. All the results are printed on
-the standard output. The difference between reading names from the
-command line versus reading names from the standard input is that
-command line arguments are expected to be just mangled names and no
-checking is performed to seperate them from surrounding text. Thus
-for example:
-.PP
-.Vb 1
-\& c++filt \-n _Z1fv
-.Ve
-.PP
-will work and demangle the name to \*(L"f()\*(R" whereas:
-.PP
-.Vb 1
-\& c++filt \-n _Z1fv,
-.Ve
-.PP
-will not work. (Note the extra comma at the end of the mangled
-name which makes it invalid). This command however will work:
-.PP
-.Vb 1
-\& echo _Z1fv, | c++filt \-n
-.Ve
-.PP
-and will display \*(L"f(),\*(R" ie the demangled name followed by a
-trailing comma. This behaviour is because when the names are read
-from the standard input it is expected that they might be part of an
-assembler source file where there might be extra, extraneous
-characters trailing after a mangled name. eg:
-.PP
-.Vb 1
-\& .type _Z1fv, @function
-.Ve
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-.IP "\fB\-_\fR" 4
-.IX Item "-_"
-.PD 0
-.IP "\fB\-\-strip\-underscores\fR" 4
-.IX Item "--strip-underscores"
-.PD
-On some systems, both the C and \*(C+ compilers put an underscore in front
-of every name. For example, the C name \f(CW\*(C`foo\*(C'\fR gets the low-level
-name \f(CW\*(C`_foo\*(C'\fR. This option removes the initial underscore. Whether
-\&\fBc++filt\fR removes the underscore by default is target dependent.
-.IP "\fB\-j\fR" 4
-.IX Item "-j"
-.PD 0
-.IP "\fB\-\-java\fR" 4
-.IX Item "--java"
-.PD
-Prints demangled names using Java syntax. The default is to use \*(C+
-syntax.
-.IP "\fB\-n\fR" 4
-.IX Item "-n"
-.PD 0
-.IP "\fB\-\-no\-strip\-underscores\fR" 4
-.IX Item "--no-strip-underscores"
-.PD
-Do not remove the initial underscore.
-.IP "\fB\-p\fR" 4
-.IX Item "-p"
-.PD 0
-.IP "\fB\-\-no\-params\fR" 4
-.IX Item "--no-params"
-.PD
-When demangling the name of a function, do not display the types of
-the function's parameters.
-.IP "\fB\-t\fR" 4
-.IX Item "-t"
-.PD 0
-.IP "\fB\-\-types\fR" 4
-.IX Item "--types"
-.PD
-Attempt to demangle types as well as function names. This is disabled
-by default since mangled types are normally only used internally in
-the compiler, and they can be confused with non-mangled names. eg
-a function called \*(L"a\*(R" treated as a mangled type name would be
-demangled to \*(L"signed char\*(R".
-.IP "\fB\-i\fR" 4
-.IX Item "-i"
-.PD 0
-.IP "\fB\-\-no\-verbose\fR" 4
-.IX Item "--no-verbose"
-.PD
-Do not include implementation details (if any) in the demangled
-output.
-.IP "\fB\-s\fR \fIformat\fR" 4
-.IX Item "-s format"
-.PD 0
-.IP "\fB\-\-format=\fR\fIformat\fR" 4
-.IX Item "--format=format"
-.PD
-\&\fBc++filt\fR can decode various methods of mangling, used by
-different compilers. The argument to this option selects which
-method it uses:
-.RS 4
-.ie n .IP """auto""" 4
-.el .IP "\f(CWauto\fR" 4
-.IX Item "auto"
-Automatic selection based on executable (the default method)
-.ie n .IP """gnu""" 4
-.el .IP "\f(CWgnu\fR" 4
-.IX Item "gnu"
-the one used by the \s-1GNU\s0 \*(C+ compiler (g++)
-.ie n .IP """lucid""" 4
-.el .IP "\f(CWlucid\fR" 4
-.IX Item "lucid"
-the one used by the Lucid compiler (lcc)
-.ie n .IP """arm""" 4
-.el .IP "\f(CWarm\fR" 4
-.IX Item "arm"
-the one specified by the \*(C+ Annotated Reference Manual
-.ie n .IP """hp""" 4
-.el .IP "\f(CWhp\fR" 4
-.IX Item "hp"
-the one used by the \s-1HP\s0 compiler (aCC)
-.ie n .IP """edg""" 4
-.el .IP "\f(CWedg\fR" 4
-.IX Item "edg"
-the one used by the \s-1EDG\s0 compiler
-.ie n .IP """gnu\-v3""" 4
-.el .IP "\f(CWgnu\-v3\fR" 4
-.IX Item "gnu-v3"
-the one used by the \s-1GNU\s0 \*(C+ compiler (g++) with the V3 \s-1ABI\s0.
-.ie n .IP """java""" 4
-.el .IP "\f(CWjava\fR" 4
-.IX Item "java"
-the one used by the \s-1GNU\s0 Java compiler (gcj)
-.ie n .IP """gnat""" 4
-.el .IP "\f(CWgnat\fR" 4
-.IX Item "gnat"
-the one used by the \s-1GNU\s0 Ada compiler (\s-1GNAT\s0).
-.RE
-.RS 4
-.RE
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Print a summary of the options to \fBc++filt\fR and exit.
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-Print the version number of \fBc++filt\fR and exit.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "FOOTNOTES"
-.IX Header "FOOTNOTES"
-.IP "1." 4
-MS-DOS does not allow \f(CW\*(C`+\*(C'\fR characters in file names, so on
-MS-DOS this program is named \fB\s-1CXXFILT\s0\fR.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/dlltool.1 b/contrib/binutils/binutils/doc/dlltool.1
deleted file mode 100644
index 44c5a4e..0000000
--- a/contrib/binutils/binutils/doc/dlltool.1
+++ /dev/null
@@ -1,478 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "DLLTOOL 1"
-.TH DLLTOOL 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-dlltool \- Create files needed to build and use DLLs.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-dlltool [\fB\-d\fR|\fB\-\-input\-def\fR \fIdef-file-name\fR]
- [\fB\-b\fR|\fB\-\-base\-file\fR \fIbase-file-name\fR]
- [\fB\-e\fR|\fB\-\-output\-exp\fR \fIexports-file-name\fR]
- [\fB\-z\fR|\fB\-\-output\-def\fR \fIdef-file-name\fR]
- [\fB\-l\fR|\fB\-\-output\-lib\fR \fIlibrary-file-name\fR]
- [\fB\-\-export\-all\-symbols\fR] [\fB\-\-no\-export\-all\-symbols\fR]
- [\fB\-\-exclude\-symbols\fR \fIlist\fR]
- [\fB\-\-no\-default\-excludes\fR]
- [\fB\-S\fR|\fB\-\-as\fR \fIpath-to-assembler\fR] [\fB\-f\fR|\fB\-\-as\-flags\fR \fIoptions\fR]
- [\fB\-D\fR|\fB\-\-dllname\fR \fIname\fR] [\fB\-m\fR|\fB\-\-machine\fR \fImachine\fR]
- [\fB\-a\fR|\fB\-\-add\-indirect\fR]
- [\fB\-U\fR|\fB\-\-add\-underscore\fR] [\fB\-\-add\-stdcall\-underscore\fR]
- [\fB\-k\fR|\fB\-\-kill\-at\fR] [\fB\-A\fR|\fB\-\-add\-stdcall\-alias\fR]
- [\fB\-p\fR|\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR]
- [\fB\-x\fR|\fB\-\-no\-idata4\fR] [\fB\-c\fR|\fB\-\-no\-idata5\fR] [\fB\-i\fR|\fB\-\-interwork\fR]
- [\fB\-n\fR|\fB\-\-nodelete\fR] [\fB\-t\fR|\fB\-\-temp\-prefix\fR \fIprefix\fR]
- [\fB\-v\fR|\fB\-\-verbose\fR]
- [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR]
- [object\-file ...]
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\fBdlltool\fR reads its inputs, which can come from the \fB\-d\fR and
-\&\fB\-b\fR options as well as object files specified on the command
-line. It then processes these inputs and if the \fB\-e\fR option has
-been specified it creates a exports file. If the \fB\-l\fR option
-has been specified it creates a library file and if the \fB\-z\fR option
-has been specified it creates a def file. Any or all of the \fB\-e\fR,
-\&\fB\-l\fR and \fB\-z\fR options can be present in one invocation of
-dlltool.
-.PP
-When creating a \s-1DLL\s0, along with the source for the \s-1DLL\s0, it is necessary
-to have three other files. \fBdlltool\fR can help with the creation of
-these files.
-.PP
-The first file is a \fI.def\fR file which specifies which functions are
-exported from the \s-1DLL\s0, which functions the \s-1DLL\s0 imports, and so on. This
-is a text file and can be created by hand, or \fBdlltool\fR can be used
-to create it using the \fB\-z\fR option. In this case \fBdlltool\fR
-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 \fI.def\fR file it creates.
-.PP
-In order to mark a function as being exported from a \s-1DLL\s0, it needs to
-have an \fB\-export:<name_of_function>\fR entry in the \fB.drectve\fR
-section of the object file. This can be done in C by using the
-\&\fIasm()\fR operator:
-.PP
-.Vb 2
-\& asm (".section .drectve");
-\& asm (".ascii \e"\-export:my_func\e"");
-.Ve
-.PP
-.Vb 1
-\& int my_func (void) { ... }
-.Ve
-.PP
-The second file needed for \s-1DLL\s0 creation is an exports file. This file
-is linked with the object files that make up the body of the \s-1DLL\s0 and it
-handles the interface between the \s-1DLL\s0 and the outside world. This is a
-binary file and it can be created by giving the \fB\-e\fR option to
-\&\fBdlltool\fR when it is creating or reading in a \fI.def\fR file.
-.PP
-The third file needed for \s-1DLL\s0 creation is the library file that programs
-will link with in order to access the functions in the \s-1DLL\s0. This file
-can be created by giving the \fB\-l\fR option to dlltool when it
-is creating or reading in a \fI.def\fR file.
-.PP
-\&\fBdlltool\fR builds the library file by hand, but it builds the
-exports file by creating temporary files containing assembler statements
-and then assembling these. The \fB\-S\fR command line option can be
-used to specify the path to the assembler that dlltool will use,
-and the \fB\-f\fR option can be used to pass specific flags to that
-assembler. The \fB\-n\fR can be used to prevent dlltool from deleting
-these temporary assembler files when it is done, and if \fB\-n\fR is
-specified twice then this will prevent dlltool from deleting the
-temporary object files it used to build the library.
-.PP
-Here is an example of creating a \s-1DLL\s0 from a source file \fBdll.c\fR and
-also creating a program (from an object file called \fBprogram.o\fR)
-that uses that \s-1DLL:\s0
-.PP
-.Vb 4
-\& 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
-.Ve
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-The command line options have the following meanings:
-.IP "\fB\-d\fR \fIfilename\fR" 4
-.IX Item "-d filename"
-.PD 0
-.IP "\fB\-\-input\-def\fR \fIfilename\fR" 4
-.IX Item "--input-def filename"
-.PD
-Specifies the name of a \fI.def\fR file to be read in and processed.
-.IP "\fB\-b\fR \fIfilename\fR" 4
-.IX Item "-b filename"
-.PD 0
-.IP "\fB\-\-base\-file\fR \fIfilename\fR" 4
-.IX Item "--base-file filename"
-.PD
-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.
-.IP "\fB\-e\fR \fIfilename\fR" 4
-.IX Item "-e filename"
-.PD 0
-.IP "\fB\-\-output\-exp\fR \fIfilename\fR" 4
-.IX Item "--output-exp filename"
-.PD
-Specifies the name of the export file to be created by dlltool.
-.IP "\fB\-z\fR \fIfilename\fR" 4
-.IX Item "-z filename"
-.PD 0
-.IP "\fB\-\-output\-def\fR \fIfilename\fR" 4
-.IX Item "--output-def filename"
-.PD
-Specifies the name of the \fI.def\fR file to be created by dlltool.
-.IP "\fB\-l\fR \fIfilename\fR" 4
-.IX Item "-l filename"
-.PD 0
-.IP "\fB\-\-output\-lib\fR \fIfilename\fR" 4
-.IX Item "--output-lib filename"
-.PD
-Specifies the name of the library file to be created by dlltool.
-.IP "\fB\-\-export\-all\-symbols\fR" 4
-.IX 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 \fB\-\-no\-default\-excludes\fR
-option. You may add to the list of symbols to not export by using the
-\&\fB\-\-exclude\-symbols\fR option.
-.IP "\fB\-\-no\-export\-all\-symbols\fR" 4
-.IX Item "--no-export-all-symbols"
-Only export symbols explicitly listed in an input \fI.def\fR file or in
-\&\fB.drectve\fR sections in the input object files. This is the default
-behaviour. The \fB.drectve\fR sections are created by \fBdllexport\fR
-attributes in the source code.
-.IP "\fB\-\-exclude\-symbols\fR \fIlist\fR" 4
-.IX Item "--exclude-symbols list"
-Do not export the symbols in \fIlist\fR. 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
-\&\fB\-\-export\-all\-symbols\fR is used.
-.IP "\fB\-\-no\-default\-excludes\fR" 4
-.IX Item "--no-default-excludes"
-When \fB\-\-export\-all\-symbols\fR is used, it will by default avoid
-exporting certain special symbols. The current list of symbols to avoid
-exporting is \fBDllMain@12\fR, \fBDllEntryPoint@0\fR,
-\&\fBimpure_ptr\fR. You may use the \fB\-\-no\-default\-excludes\fR option
-to go ahead and export these special symbols. This is only meaningful
-when \fB\-\-export\-all\-symbols\fR is used.
-.IP "\fB\-S\fR \fIpath\fR" 4
-.IX Item "-S path"
-.PD 0
-.IP "\fB\-\-as\fR \fIpath\fR" 4
-.IX Item "--as path"
-.PD
-Specifies the path, including the filename, of the assembler to be used
-to create the exports file.
-.IP "\fB\-f\fR \fIoptions\fR" 4
-.IX Item "-f options"
-.PD 0
-.IP "\fB\-\-as\-flags\fR \fIoptions\fR" 4
-.IX Item "--as-flags options"
-.PD
-Specifies any specific command line options to be passed to the
-assembler when building the exports file. This option will work even if
-the \fB\-S\fR 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.
-.IP "\fB\-D\fR \fIname\fR" 4
-.IX Item "-D name"
-.PD 0
-.IP "\fB\-\-dll\-name\fR \fIname\fR" 4
-.IX Item "--dll-name name"
-.PD
-Specifies the name to be stored in the \fI.def\fR file as the name of
-the \s-1DLL\s0 when the \fB\-e\fR option is used. If this option is not
-present, then the filename given to the \fB\-e\fR option will be
-used as the name of the \s-1DLL\s0.
-.IP "\fB\-m\fR \fImachine\fR" 4
-.IX Item "-m machine"
-.PD 0
-.IP "\fB\-machine\fR \fImachine\fR" 4
-.IX Item "-machine machine"
-.PD
-Specifies the type of machine for which the library file should be
-built. \fBdlltool\fR 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 \s-1ARM\s0 processor, when the
-contents of the \s-1DLL\s0 are actually encode using Thumb instructions.
-.IP "\fB\-a\fR" 4
-.IX Item "-a"
-.PD 0
-.IP "\fB\-\-add\-indirect\fR" 4
-.IX Item "--add-indirect"
-.PD
-Specifies that when \fBdlltool\fR 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!
-.IP "\fB\-U\fR" 4
-.IX Item "-U"
-.PD 0
-.IP "\fB\-\-add\-underscore\fR" 4
-.IX Item "--add-underscore"
-.PD
-Specifies that when \fBdlltool\fR is creating the exports file it
-should prepend an underscore to the names of \fIall\fR exported symbols.
-.IP "\fB\-\-add\-stdcall\-underscore\fR" 4
-.IX Item "--add-stdcall-underscore"
-Specifies that when \fBdlltool\fR is creating the exports file it
-should prepend an underscore to the names of exported \fIstdcall\fR
-functions. Variable names and non-stdcall function names are not modified.
-This option is useful when creating GNU-compatible import libs for third
-party DLLs that were built with MS-Windows tools.
-.IP "\fB\-k\fR" 4
-.IX Item "-k"
-.PD 0
-.IP "\fB\-\-kill\-at\fR" 4
-.IX Item "--kill-at"
-.PD
-Specifies that when \fBdlltool\fR is creating the exports file it
-should not append the string \fB@ <number>\fR. These numbers are
-called ordinal numbers and they represent another way of accessing the
-function in a \s-1DLL\s0, other than by name.
-.IP "\fB\-A\fR" 4
-.IX Item "-A"
-.PD 0
-.IP "\fB\-\-add\-stdcall\-alias\fR" 4
-.IX Item "--add-stdcall-alias"
-.PD
-Specifies that when \fBdlltool\fR is creating the exports file it
-should add aliases for stdcall symbols without \fB@ <number>\fR
-in addition to the symbols with \fB@ <number>\fR.
-.IP "\fB\-p\fR" 4
-.IX Item "-p"
-.PD 0
-.IP "\fB\-\-ext\-prefix\-alias\fR \fIprefix\fR" 4
-.IX Item "--ext-prefix-alias prefix"
-.PD
-Causes \fBdlltool\fR to create external aliases for all \s-1DLL\s0
-imports with the specified prefix. The aliases are created for both
-external and import symbols with no leading underscore.
-.IP "\fB\-x\fR" 4
-.IX Item "-x"
-.PD 0
-.IP "\fB\-\-no\-idata4\fR" 4
-.IX Item "--no-idata4"
-.PD
-Specifies that when \fBdlltool\fR is creating the exports and library
-files it should omit the \f(CW\*(C`.idata4\*(C'\fR section. This is for compatibility
-with certain operating systems.
-.IP "\fB\-c\fR" 4
-.IX Item "-c"
-.PD 0
-.IP "\fB\-\-no\-idata5\fR" 4
-.IX Item "--no-idata5"
-.PD
-Specifies that when \fBdlltool\fR is creating the exports and library
-files it should omit the \f(CW\*(C`.idata5\*(C'\fR section. This is for compatibility
-with certain operating systems.
-.IP "\fB\-i\fR" 4
-.IX Item "-i"
-.PD 0
-.IP "\fB\-\-interwork\fR" 4
-.IX Item "--interwork"
-.PD
-Specifies that \fBdlltool\fR should mark the objects in the library
-file and exports file that it produces as supporting interworking
-between \s-1ARM\s0 and Thumb code.
-.IP "\fB\-n\fR" 4
-.IX Item "-n"
-.PD 0
-.IP "\fB\-\-nodelete\fR" 4
-.IX Item "--nodelete"
-.PD
-Makes \fBdlltool\fR 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.
-.IP "\fB\-t\fR \fIprefix\fR" 4
-.IX Item "-t prefix"
-.PD 0
-.IP "\fB\-\-temp\-prefix\fR \fIprefix\fR" 4
-.IX Item "--temp-prefix prefix"
-.PD
-Makes \fBdlltool\fR use \fIprefix\fR when constructing the names of
-temporary assembler and object files. By default, the temp file prefix
-is generated from the pid.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-\-verbose\fR" 4
-.IX Item "--verbose"
-.PD
-Make dlltool describe what it is doing.
-.IP "\fB\-h\fR" 4
-.IX Item "-h"
-.PD 0
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-.PD
-Displays a list of command line options and then exits.
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Displays dlltool's version number and then exits.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-The Info pages for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/nm.1 b/contrib/binutils/binutils/doc/nm.1
deleted file mode 100644
index 9f2271c..0000000
--- a/contrib/binutils/binutils/doc/nm.1
+++ /dev/null
@@ -1,449 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "NM 1"
-.TH NM 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-nm \- list symbols from object files
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-nm [\fB\-a\fR|\fB\-\-debug\-syms\fR] [\fB\-g\fR|\fB\-\-extern\-only\fR]
- [\fB\-B\fR] [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR]] [\fB\-D\fR|\fB\-\-dynamic\fR]
- [\fB\-S\fR|\fB\-\-print\-size\fR] [\fB\-s\fR|\fB\-\-print\-armap\fR]
- [\fB\-A\fR|\fB\-o\fR|\fB\-\-print\-file\-name\fR][\fB\-\-special\-syms\fR]
- [\fB\-n\fR|\fB\-v\fR|\fB\-\-numeric\-sort\fR] [\fB\-p\fR|\fB\-\-no\-sort\fR]
- [\fB\-r\fR|\fB\-\-reverse\-sort\fR] [\fB\-\-size\-sort\fR] [\fB\-u\fR|\fB\-\-undefined\-only\fR]
- [\fB\-t\fR \fIradix\fR|\fB\-\-radix=\fR\fIradix\fR] [\fB\-P\fR|\fB\-\-portability\fR]
- [\fB\-\-target=\fR\fIbfdname\fR] [\fB\-f\fR\fIformat\fR|\fB\-\-format=\fR\fIformat\fR]
- [\fB\-\-defined\-only\fR] [\fB\-l\fR|\fB\-\-line\-numbers\fR] [\fB\-\-no\-demangle\fR]
- [\fB\-V\fR|\fB\-\-version\fR] [\fB\-X 32_64\fR] [\fB\-\-help\fR] [\fIobjfile\fR...]
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\s-1GNU\s0 \fBnm\fR lists the symbols from object files \fIobjfile\fR....
-If no object files are listed as arguments, \fBnm\fR assumes the file
-\&\fIa.out\fR.
-.PP
-For each symbol, \fBnm\fR shows:
-.IP "\(bu" 4
-The symbol value, in the radix selected by options (see below), or
-hexadecimal by default.
-.IP "\(bu" 4
-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).
-.RS 4
-.ie n .IP """A""" 4
-.el .IP "\f(CWA\fR" 4
-.IX Item "A"
-The symbol's value is absolute, and will not be changed by further
-linking.
-.ie n .IP """B""" 4
-.el .IP "\f(CWB\fR" 4
-.IX Item "B"
-The symbol is in the uninitialized data section (known as \s-1BSS\s0).
-.ie n .IP """C""" 4
-.el .IP "\f(CWC\fR" 4
-.IX 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.
-.ie n .IP """D""" 4
-.el .IP "\f(CWD\fR" 4
-.IX Item "D"
-The symbol is in the initialized data section.
-.ie n .IP """G""" 4
-.el .IP "\f(CWG\fR" 4
-.IX 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.
-.ie n .IP """I""" 4
-.el .IP "\f(CWI\fR" 4
-.IX Item "I"
-The symbol is an indirect reference to another symbol. This is a \s-1GNU\s0
-extension to the a.out object file format which is rarely used.
-.ie n .IP """N""" 4
-.el .IP "\f(CWN\fR" 4
-.IX Item "N"
-The symbol is a debugging symbol.
-.ie n .IP """R""" 4
-.el .IP "\f(CWR\fR" 4
-.IX Item "R"
-The symbol is in a read only data section.
-.ie n .IP """S""" 4
-.el .IP "\f(CWS\fR" 4
-.IX Item "S"
-The symbol is in an uninitialized data section for small objects.
-.ie n .IP """T""" 4
-.el .IP "\f(CWT\fR" 4
-.IX Item "T"
-The symbol is in the text (code) section.
-.ie n .IP """U""" 4
-.el .IP "\f(CWU\fR" 4
-.IX Item "U"
-The symbol is undefined.
-.ie n .IP """V""" 4
-.el .IP "\f(CWV\fR" 4
-.IX 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.
-.ie n .IP """W""" 4
-.el .IP "\f(CWW\fR" 4
-.IX 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 symbol is determined in a system-specific manner without
-error. On some systems, uppercase indicates that a default value has been
-specified.
-.ie n .IP """\-""" 4
-.el .IP "\f(CW\-\fR" 4
-.IX 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.
-.ie n .IP """?""" 4
-.el .IP "\f(CW?\fR" 4
-.IX Item "?"
-The symbol type is unknown, or object file format specific.
-.RE
-.RS 4
-.RE
-.IP "\(bu" 4
-The symbol name.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-The long and short forms of options, shown here as alternatives, are
-equivalent.
-.IP "\fB\-A\fR" 4
-.IX Item "-A"
-.PD 0
-.IP "\fB\-o\fR" 4
-.IX Item "-o"
-.IP "\fB\-\-print\-file\-name\fR" 4
-.IX Item "--print-file-name"
-.PD
-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.
-.IP "\fB\-a\fR" 4
-.IX Item "-a"
-.PD 0
-.IP "\fB\-\-debug\-syms\fR" 4
-.IX Item "--debug-syms"
-.PD
-Display all symbols, even debugger-only symbols; normally these are not
-listed.
-.IP "\fB\-B\fR" 4
-.IX Item "-B"
-The same as \fB\-\-format=bsd\fR (for compatibility with the \s-1MIPS\s0 \fBnm\fR).
-.IP "\fB\-C\fR" 4
-.IX Item "-C"
-.PD 0
-.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
-.IX Item "--demangle[=style]"
-.PD
-Decode (\fIdemangle\fR) 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.
-.IP "\fB\-\-no\-demangle\fR" 4
-.IX Item "--no-demangle"
-Do not demangle low-level symbol names. This is the default.
-.IP "\fB\-D\fR" 4
-.IX Item "-D"
-.PD 0
-.IP "\fB\-\-dynamic\fR" 4
-.IX Item "--dynamic"
-.PD
-Display the dynamic symbols rather than the normal symbols. This is
-only meaningful for dynamic objects, such as certain types of shared
-libraries.
-.IP "\fB\-f\fR \fIformat\fR" 4
-.IX Item "-f format"
-.PD 0
-.IP "\fB\-\-format=\fR\fIformat\fR" 4
-.IX Item "--format=format"
-.PD
-Use the output format \fIformat\fR, which can be \f(CW\*(C`bsd\*(C'\fR,
-\&\f(CW\*(C`sysv\*(C'\fR, or \f(CW\*(C`posix\*(C'\fR. The default is \f(CW\*(C`bsd\*(C'\fR.
-Only the first character of \fIformat\fR is significant; it can be
-either upper or lower case.
-.IP "\fB\-g\fR" 4
-.IX Item "-g"
-.PD 0
-.IP "\fB\-\-extern\-only\fR" 4
-.IX Item "--extern-only"
-.PD
-Display only external symbols.
-.IP "\fB\-l\fR" 4
-.IX Item "-l"
-.PD 0
-.IP "\fB\-\-line\-numbers\fR" 4
-.IX Item "--line-numbers"
-.PD
-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.
-.IP "\fB\-n\fR" 4
-.IX Item "-n"
-.PD 0
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.IP "\fB\-\-numeric\-sort\fR" 4
-.IX Item "--numeric-sort"
-.PD
-Sort symbols numerically by their addresses, rather than alphabetically
-by their names.
-.IP "\fB\-p\fR" 4
-.IX Item "-p"
-.PD 0
-.IP "\fB\-\-no\-sort\fR" 4
-.IX Item "--no-sort"
-.PD
-Do not bother to sort the symbols in any order; print them in the order
-encountered.
-.IP "\fB\-P\fR" 4
-.IX Item "-P"
-.PD 0
-.IP "\fB\-\-portability\fR" 4
-.IX Item "--portability"
-.PD
-Use the \s-1POSIX\s0.2 standard output format instead of the default format.
-Equivalent to \fB\-f posix\fR.
-.IP "\fB\-S\fR" 4
-.IX Item "-S"
-.PD 0
-.IP "\fB\-\-print\-size\fR" 4
-.IX Item "--print-size"
-.PD
-Print size, not the value, of defined symbols for the \f(CW\*(C`bsd\*(C'\fR output format.
-.IP "\fB\-s\fR" 4
-.IX Item "-s"
-.PD 0
-.IP "\fB\-\-print\-armap\fR" 4
-.IX Item "--print-armap"
-.PD
-When listing symbols from archive members, include the index: a mapping
-(stored in the archive by \fBar\fR or \fBranlib\fR) of which modules
-contain definitions for which names.
-.IP "\fB\-r\fR" 4
-.IX Item "-r"
-.PD 0
-.IP "\fB\-\-reverse\-sort\fR" 4
-.IX Item "--reverse-sort"
-.PD
-Reverse the order of the sort (whether numeric or alphabetic); let the
-last come first.
-.IP "\fB\-\-size\-sort\fR" 4
-.IX 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. If the \f(CW\*(C`bsd\*(C'\fR output format is used the size of the symbol
-is printed, rather than the value, and \fB\-S\fR must be used in order
-both size and value to be printed.
-.IP "\fB\-\-special\-syms\fR" 4
-.IX Item "--special-syms"
-Display symbols which have a target-specific special meaning. These
-symbols are usually used by the target for some special processing and
-are not normally helpful when included included in the normal symbol
-lists. For example for \s-1ARM\s0 targets this option would skip the mapping
-symbols used to mark transistions between \s-1ARM\s0 code, \s-1THUMB\s0 code and
-data.
-.IP "\fB\-t\fR \fIradix\fR" 4
-.IX Item "-t radix"
-.PD 0
-.IP "\fB\-\-radix=\fR\fIradix\fR" 4
-.IX Item "--radix=radix"
-.PD
-Use \fIradix\fR as the radix for printing the symbol values. It must be
-\&\fBd\fR for decimal, \fBo\fR for octal, or \fBx\fR for hexadecimal.
-.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
-.IX Item "--target=bfdname"
-Specify an object code format other than your system's default format.
-.IP "\fB\-u\fR" 4
-.IX Item "-u"
-.PD 0
-.IP "\fB\-\-undefined\-only\fR" 4
-.IX Item "--undefined-only"
-.PD
-Display only undefined symbols (those external to each object file).
-.IP "\fB\-\-defined\-only\fR" 4
-.IX Item "--defined-only"
-Display only defined symbols for each object file.
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Show the version number of \fBnm\fR and exit.
-.IP "\fB\-X\fR" 4
-.IX Item "-X"
-This option is ignored for compatibility with the \s-1AIX\s0 version of
-\&\fBnm\fR. It takes one parameter which must be the string
-\&\fB32_64\fR. The default mode of \s-1AIX\s0 \fBnm\fR corresponds
-to \fB\-X 32\fR, which is not supported by \s-1GNU\s0 \fBnm\fR.
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Show a summary of the options to \fBnm\fR and exit.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/objcopy.1 b/contrib/binutils/binutils/doc/objcopy.1
deleted file mode 100644
index 828cdde..0000000
--- a/contrib/binutils/binutils/doc/objcopy.1
+++ /dev/null
@@ -1,795 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "OBJCOPY 1"
-.TH OBJCOPY 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-objcopy \- copy and translate object files
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-objcopy [\fB\-F\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
- [\fB\-I\fR \fIbfdname\fR|\fB\-\-input\-target=\fR\fIbfdname\fR]
- [\fB\-O\fR \fIbfdname\fR|\fB\-\-output\-target=\fR\fIbfdname\fR]
- [\fB\-B\fR \fIbfdarch\fR|\fB\-\-binary\-architecture=\fR\fIbfdarch\fR]
- [\fB\-S\fR|\fB\-\-strip\-all\fR]
- [\fB\-g\fR|\fB\-\-strip\-debug\fR]
- [\fB\-K\fR \fIsymbolname\fR|\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
- [\fB\-N\fR \fIsymbolname\fR|\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
- [\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR]
- [\fB\-G\fR \fIsymbolname\fR|\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR]
- [\fB\-L\fR \fIsymbolname\fR|\fB\-\-localize\-symbol=\fR\fIsymbolname\fR]
- [\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR]
- [\fB\-W\fR \fIsymbolname\fR|\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR]
- [\fB\-w\fR|\fB\-\-wildcard\fR]
- [\fB\-x\fR|\fB\-\-discard\-all\fR]
- [\fB\-X\fR|\fB\-\-discard\-locals\fR]
- [\fB\-b\fR \fIbyte\fR|\fB\-\-byte=\fR\fIbyte\fR]
- [\fB\-i\fR \fIinterleave\fR|\fB\-\-interleave=\fR\fIinterleave\fR]
- [\fB\-j\fR \fIsectionname\fR|\fB\-\-only\-section=\fR\fIsectionname\fR]
- [\fB\-R\fR \fIsectionname\fR|\fB\-\-remove\-section=\fR\fIsectionname\fR]
- [\fB\-p\fR|\fB\-\-preserve\-dates\fR]
- [\fB\-\-debugging\fR]
- [\fB\-\-gap\-fill=\fR\fIval\fR]
- [\fB\-\-pad\-to=\fR\fIaddress\fR]
- [\fB\-\-set\-start=\fR\fIval\fR]
- [\fB\-\-adjust\-start=\fR\fIincr\fR]
- [\fB\-\-change\-addresses=\fR\fIincr\fR]
- [\fB\-\-change\-section\-address\fR \fIsection\fR{=,+,\-}\fIval\fR]
- [\fB\-\-change\-section\-lma\fR \fIsection\fR{=,+,\-}\fIval\fR]
- [\fB\-\-change\-section\-vma\fR \fIsection\fR{=,+,\-}\fIval\fR]
- [\fB\-\-change\-warnings\fR] [\fB\-\-no\-change\-warnings\fR]
- [\fB\-\-set\-section\-flags\fR \fIsection\fR=\fIflags\fR]
- [\fB\-\-add\-section\fR \fIsectionname\fR=\fIfilename\fR]
- [\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR[,\fIflags\fR]]
- [\fB\-\-change\-leading\-char\fR] [\fB\-\-remove\-leading\-char\fR]
- [\fB\-\-srec\-len=\fR\fIival\fR] [\fB\-\-srec\-forceS3\fR]
- [\fB\-\-redefine\-sym\fR \fIold\fR=\fInew\fR]
- [\fB\-\-redefine\-syms=\fR\fIfilename\fR]
- [\fB\-\-weaken\fR]
- [\fB\-\-keep\-symbols=\fR\fIfilename\fR]
- [\fB\-\-strip\-symbols=\fR\fIfilename\fR]
- [\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR]
- [\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR]
- [\fB\-\-localize\-symbols=\fR\fIfilename\fR]
- [\fB\-\-globalize\-symbols=\fR\fIfilename\fR]
- [\fB\-\-weaken\-symbols=\fR\fIfilename\fR]
- [\fB\-\-alt\-machine\-code=\fR\fIindex\fR]
- [\fB\-\-prefix\-symbols=\fR\fIstring\fR]
- [\fB\-\-prefix\-sections=\fR\fIstring\fR]
- [\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR]
- [\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR]
- [\fB\-\-keep\-file\-symbols\fR]
- [\fB\-\-only\-keep\-debug\fR]
- [\fB\-\-writable\-text\fR]
- [\fB\-\-readonly\-text\fR]
- [\fB\-\-pure\fR]
- [\fB\-\-impure\fR]
- [\fB\-v\fR|\fB\-\-verbose\fR]
- [\fB\-V\fR|\fB\-\-version\fR]
- [\fB\-\-help\fR] [\fB\-\-info\fR]
- \fIinfile\fR [\fIoutfile\fR]
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-The \s-1GNU\s0 \fBobjcopy\fR utility copies the contents of an object
-file to another. \fBobjcopy\fR uses the \s-1GNU\s0 \s-1BFD\s0 Library to
-read and write the object files. It can write the destination object
-file in a format different from that of the source object file. The
-exact behavior of \fBobjcopy\fR is controlled by command-line options.
-Note that \fBobjcopy\fR should be able to copy a fully linked file
-between any two formats. However, copying a relocatable object file
-between any two formats may not work as expected.
-.PP
-\&\fBobjcopy\fR creates temporary files to do its translations and
-deletes them afterward. \fBobjcopy\fR uses \s-1BFD\s0 to do all its
-translation work; it has access to all the formats described in \s-1BFD\s0
-and thus is able to recognize most formats without being told
-explicitly.
-.PP
-\&\fBobjcopy\fR can be used to generate S\-records by using an output
-target of \fBsrec\fR (e.g., use \fB\-O srec\fR).
-.PP
-\&\fBobjcopy\fR can be used to generate a raw binary file by using an
-output target of \fBbinary\fR (e.g., use \fB\-O binary\fR). When
-\&\fBobjcopy\fR generates a raw binary file, it will essentially produce
-a memory dump of the contents of the input object file. All symbols and
-relocation information will be discarded. The memory dump will start at
-the load address of the lowest section copied into the output file.
-.PP
-When generating an S\-record or a raw binary file, it may be helpful to
-use \fB\-S\fR to remove sections containing debugging information. In
-some cases \fB\-R\fR will be useful to remove sections which contain
-information that is not needed by the binary file.
-.PP
-Note\-\-\-\fBobjcopy\fR is not able to change the endianness of its input
-files. If the input format has an endianness (some formats do not),
-\&\fBobjcopy\fR can only copy the inputs into file formats that have the
-same endianness or which have no endianness (e.g., \fBsrec\fR).
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-.IP "\fIinfile\fR" 4
-.IX Item "infile"
-.PD 0
-.IP "\fIoutfile\fR" 4
-.IX Item "outfile"
-.PD
-The input and output files, respectively.
-If you do not specify \fIoutfile\fR, \fBobjcopy\fR creates a
-temporary file and destructively renames the result with
-the name of \fIinfile\fR.
-.IP "\fB\-I\fR \fIbfdname\fR" 4
-.IX Item "-I bfdname"
-.PD 0
-.IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4
-.IX Item "--input-target=bfdname"
-.PD
-Consider the source file's object format to be \fIbfdname\fR, rather than
-attempting to deduce it.
-.IP "\fB\-O\fR \fIbfdname\fR" 4
-.IX Item "-O bfdname"
-.PD 0
-.IP "\fB\-\-output\-target=\fR\fIbfdname\fR" 4
-.IX Item "--output-target=bfdname"
-.PD
-Write the output file using the object format \fIbfdname\fR.
-.IP "\fB\-F\fR \fIbfdname\fR" 4
-.IX Item "-F bfdname"
-.PD 0
-.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
-.IX Item "--target=bfdname"
-.PD
-Use \fIbfdname\fR as the object format for both the input and the output
-file; i.e., simply transfer data from source to destination with no
-translation.
-.IP "\fB\-B\fR \fIbfdarch\fR" 4
-.IX Item "-B bfdarch"
-.PD 0
-.IP "\fB\-\-binary\-architecture=\fR\fIbfdarch\fR" 4
-.IX Item "--binary-architecture=bfdarch"
-.PD
-Useful when transforming a raw binary input file into an object file.
-In this case the output architecture can be set to \fIbfdarch\fR. This
-option will be ignored if the input file has a known \fIbfdarch\fR. You
-can access this binary data inside a program by referencing the special
-symbols that are created by the conversion process. These symbols are
-called _binary_\fIobjfile\fR_start, _binary_\fIobjfile\fR_end and
-_binary_\fIobjfile\fR_size. e.g. you can transform a picture file into
-an object file and then access it in your code using these symbols.
-.IP "\fB\-j\fR \fIsectionname\fR" 4
-.IX Item "-j sectionname"
-.PD 0
-.IP "\fB\-\-only\-section=\fR\fIsectionname\fR" 4
-.IX Item "--only-section=sectionname"
-.PD
-Copy only the named section from the input file to the output file.
-This option may be given more than once. Note that using this option
-inappropriately may make the output file unusable.
-.IP "\fB\-R\fR \fIsectionname\fR" 4
-.IX Item "-R sectionname"
-.PD 0
-.IP "\fB\-\-remove\-section=\fR\fIsectionname\fR" 4
-.IX Item "--remove-section=sectionname"
-.PD
-Remove any section named \fIsectionname\fR from the output file. This
-option may be given more than once. Note that using this option
-inappropriately may make the output file unusable.
-.IP "\fB\-S\fR" 4
-.IX Item "-S"
-.PD 0
-.IP "\fB\-\-strip\-all\fR" 4
-.IX Item "--strip-all"
-.PD
-Do not copy relocation and symbol information from the source file.
-.IP "\fB\-g\fR" 4
-.IX Item "-g"
-.PD 0
-.IP "\fB\-\-strip\-debug\fR" 4
-.IX Item "--strip-debug"
-.PD
-Do not copy debugging symbols or sections from the source file.
-.IP "\fB\-\-strip\-unneeded\fR" 4
-.IX Item "--strip-unneeded"
-Strip all symbols that are not needed for relocation processing.
-.IP "\fB\-K\fR \fIsymbolname\fR" 4
-.IX Item "-K symbolname"
-.PD 0
-.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--keep-symbol=symbolname"
-.PD
-When stripping symbols, keep symbol \fIsymbolname\fR even if it would
-normally be stripped. This option may be given more than once.
-.IP "\fB\-N\fR \fIsymbolname\fR" 4
-.IX Item "-N symbolname"
-.PD 0
-.IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--strip-symbol=symbolname"
-.PD
-Do not copy symbol \fIsymbolname\fR from the source file. This option
-may be given more than once.
-.IP "\fB\-\-strip\-unneeded\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--strip-unneeded-symbol=symbolname"
-Do not copy symbol \fIsymbolname\fR from the source file unless it is needed
-by a relocation. This option may be given more than once.
-.IP "\fB\-G\fR \fIsymbolname\fR" 4
-.IX Item "-G symbolname"
-.PD 0
-.IP "\fB\-\-keep\-global\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--keep-global-symbol=symbolname"
-.PD
-Keep only symbol \fIsymbolname\fR global. Make all other symbols local
-to the file, so that they are not visible externally. This option may
-be given more than once.
-.IP "\fB\-L\fR \fIsymbolname\fR" 4
-.IX Item "-L symbolname"
-.PD 0
-.IP "\fB\-\-localize\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--localize-symbol=symbolname"
-.PD
-Make symbol \fIsymbolname\fR local to the file, so that it is not
-visible externally. This option may be given more than once.
-.IP "\fB\-W\fR \fIsymbolname\fR" 4
-.IX Item "-W symbolname"
-.PD 0
-.IP "\fB\-\-weaken\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--weaken-symbol=symbolname"
-.PD
-Make symbol \fIsymbolname\fR weak. This option may be given more than once.
-.IP "\fB\-\-globalize\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--globalize-symbol=symbolname"
-Give symbol \fIsymbolname\fR global scoping so that it is visible
-outside of the file in which it is defined. This option may be given
-more than once.
-.IP "\fB\-w\fR" 4
-.IX Item "-w"
-.PD 0
-.IP "\fB\-\-wildcard\fR" 4
-.IX Item "--wildcard"
-.PD
-Permit regular expressions in \fIsymbolname\fRs used in other command
-line options. The question mark (?), asterisk (*), backslash (\e) and
-square brackets ([]) operators can be used anywhere in the symbol
-name. If the first character of the symbol name is the exclamation
-point (!) then the sense of the switch is reversed for that symbol.
-For example:
-.Sp
-.Vb 1
-\& \-w \-W !foo \-W fo*
-.Ve
-.Sp
-would cause objcopy to weaken all symbols that start with \*(L"fo\*(R"
-except for the symbol \*(L"foo\*(R".
-.IP "\fB\-x\fR" 4
-.IX Item "-x"
-.PD 0
-.IP "\fB\-\-discard\-all\fR" 4
-.IX Item "--discard-all"
-.PD
-Do not copy non-global symbols from the source file.
-.IP "\fB\-X\fR" 4
-.IX Item "-X"
-.PD 0
-.IP "\fB\-\-discard\-locals\fR" 4
-.IX Item "--discard-locals"
-.PD
-Do not copy compiler-generated local symbols.
-(These usually start with \fBL\fR or \fB.\fR.)
-.IP "\fB\-b\fR \fIbyte\fR" 4
-.IX Item "-b byte"
-.PD 0
-.IP "\fB\-\-byte=\fR\fIbyte\fR" 4
-.IX Item "--byte=byte"
-.PD
-Keep only every \fIbyte\fRth byte of the input file (header data is not
-affected). \fIbyte\fR can be in the range from 0 to \fIinterleave\fR\-1,
-where \fIinterleave\fR is given by the \fB\-i\fR or \fB\-\-interleave\fR
-option, or the default of 4. This option is useful for creating files
-to program \s-1ROM\s0. It is typically used with an \f(CW\*(C`srec\*(C'\fR output
-target.
-.IP "\fB\-i\fR \fIinterleave\fR" 4
-.IX Item "-i interleave"
-.PD 0
-.IP "\fB\-\-interleave=\fR\fIinterleave\fR" 4
-.IX Item "--interleave=interleave"
-.PD
-Only copy one out of every \fIinterleave\fR bytes. Select which byte to
-copy with the \fB\-b\fR or \fB\-\-byte\fR option. The default is 4.
-\&\fBobjcopy\fR ignores this option if you do not specify either \fB\-b\fR or
-\&\fB\-\-byte\fR.
-.IP "\fB\-p\fR" 4
-.IX Item "-p"
-.PD 0
-.IP "\fB\-\-preserve\-dates\fR" 4
-.IX Item "--preserve-dates"
-.PD
-Set the access and modification dates of the output file to be the same
-as those of the input file.
-.IP "\fB\-\-debugging\fR" 4
-.IX Item "--debugging"
-Convert debugging information, if possible. This is not the default
-because only certain debugging formats are supported, and the
-conversion process can be time consuming.
-.IP "\fB\-\-gap\-fill\fR \fIval\fR" 4
-.IX Item "--gap-fill val"
-Fill gaps between sections with \fIval\fR. This operation applies to
-the \fIload address\fR (\s-1LMA\s0) of the sections. It is done by increasing
-the size of the section with the lower address, and filling in the extra
-space created with \fIval\fR.
-.IP "\fB\-\-pad\-to\fR \fIaddress\fR" 4
-.IX Item "--pad-to address"
-Pad the output file up to the load address \fIaddress\fR. This is
-done by increasing the size of the last section. The extra space is
-filled in with the value specified by \fB\-\-gap\-fill\fR (default zero).
-.IP "\fB\-\-set\-start\fR \fIval\fR" 4
-.IX Item "--set-start val"
-Set the start address of the new file to \fIval\fR. Not all object file
-formats support setting the start address.
-.IP "\fB\-\-change\-start\fR \fIincr\fR" 4
-.IX Item "--change-start incr"
-.PD 0
-.IP "\fB\-\-adjust\-start\fR \fIincr\fR" 4
-.IX Item "--adjust-start incr"
-.PD
-Change the start address by adding \fIincr\fR. Not all object file
-formats support setting the start address.
-.IP "\fB\-\-change\-addresses\fR \fIincr\fR" 4
-.IX Item "--change-addresses incr"
-.PD 0
-.IP "\fB\-\-adjust\-vma\fR \fIincr\fR" 4
-.IX Item "--adjust-vma incr"
-.PD
-Change the \s-1VMA\s0 and \s-1LMA\s0 addresses of all sections, as well as the start
-address, by adding \fIincr\fR. Some object file formats do not permit
-section addresses to be changed arbitrarily. Note that this does not
-relocate the sections; if the program expects sections to be loaded at a
-certain address, and this option is used to change the sections such
-that they are loaded at a different address, the program may fail.
-.IP "\fB\-\-change\-section\-address\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
-.IX Item "--change-section-address section{=,+,-}val"
-.PD 0
-.IP "\fB\-\-adjust\-section\-vma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
-.IX Item "--adjust-section-vma section{=,+,-}val"
-.PD
-Set or change both the \s-1VMA\s0 address and the \s-1LMA\s0 address of the named
-\&\fIsection\fR. If \fB=\fR is used, the section address is set to
-\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
-section address. See the comments under \fB\-\-change\-addresses\fR,
-above. If \fIsection\fR does not exist in the input file, a warning will
-be issued, unless \fB\-\-no\-change\-warnings\fR is used.
-.IP "\fB\-\-change\-section\-lma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
-.IX Item "--change-section-lma section{=,+,-}val"
-Set or change the \s-1LMA\s0 address of the named \fIsection\fR. The \s-1LMA\s0
-address is the address where the section will be loaded into memory at
-program load time. Normally this is the same as the \s-1VMA\s0 address, which
-is the address of the section at program run time, but on some systems,
-especially those where a program is held in \s-1ROM\s0, the two can be
-different. If \fB=\fR is used, the section address is set to
-\&\fIval\fR. Otherwise, \fIval\fR is added to or subtracted from the
-section address. See the comments under \fB\-\-change\-addresses\fR,
-above. If \fIsection\fR does not exist in the input file, a warning
-will be issued, unless \fB\-\-no\-change\-warnings\fR is used.
-.IP "\fB\-\-change\-section\-vma\fR \fIsection\fR\fB{=,+,\-}\fR\fIval\fR" 4
-.IX Item "--change-section-vma section{=,+,-}val"
-Set or change the \s-1VMA\s0 address of the named \fIsection\fR. The \s-1VMA\s0
-address is the address where the section will be located once the
-program has started executing. Normally this is the same as the \s-1LMA\s0
-address, which is the address where the section will be loaded into
-memory, but on some systems, especially those where a program is held in
-\&\s-1ROM\s0, the two can be different. If \fB=\fR is used, the section address
-is set to \fIval\fR. Otherwise, \fIval\fR is added to or subtracted
-from the section address. See the comments under
-\&\fB\-\-change\-addresses\fR, above. If \fIsection\fR does not exist in
-the input file, a warning will be issued, unless
-\&\fB\-\-no\-change\-warnings\fR is used.
-.IP "\fB\-\-change\-warnings\fR" 4
-.IX Item "--change-warnings"
-.PD 0
-.IP "\fB\-\-adjust\-warnings\fR" 4
-.IX Item "--adjust-warnings"
-.PD
-If \fB\-\-change\-section\-address\fR or \fB\-\-change\-section\-lma\fR or
-\&\fB\-\-change\-section\-vma\fR is used, and the named section does not
-exist, issue a warning. This is the default.
-.IP "\fB\-\-no\-change\-warnings\fR" 4
-.IX Item "--no-change-warnings"
-.PD 0
-.IP "\fB\-\-no\-adjust\-warnings\fR" 4
-.IX Item "--no-adjust-warnings"
-.PD
-Do not issue a warning if \fB\-\-change\-section\-address\fR or
-\&\fB\-\-adjust\-section\-lma\fR or \fB\-\-adjust\-section\-vma\fR is used, even
-if the named section does not exist.
-.IP "\fB\-\-set\-section\-flags\fR \fIsection\fR\fB=\fR\fIflags\fR" 4
-.IX Item "--set-section-flags section=flags"
-Set the flags for the named section. The \fIflags\fR argument is a
-comma separated string of flag names. The recognized names are
-\&\fBalloc\fR, \fBcontents\fR, \fBload\fR, \fBnoload\fR,
-\&\fBreadonly\fR, \fBcode\fR, \fBdata\fR, \fBrom\fR, \fBshare\fR, and
-\&\fBdebug\fR. You can set the \fBcontents\fR flag for a section which
-does not have contents, but it is not meaningful to clear the
-\&\fBcontents\fR flag of a section which does have contents\*(--just remove
-the section instead. Not all flags are meaningful for all object file
-formats.
-.IP "\fB\-\-add\-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR" 4
-.IX Item "--add-section sectionname=filename"
-Add a new section named \fIsectionname\fR while copying the file. The
-contents of the new section are taken from the file \fIfilename\fR. The
-size of the section will be the size of the file. This option only
-works on file formats which can support sections with arbitrary names.
-.IP "\fB\-\-rename\-section\fR \fIoldname\fR\fB=\fR\fInewname\fR\fB[,\fR\fIflags\fR\fB]\fR" 4
-.IX Item "--rename-section oldname=newname[,flags]"
-Rename a section from \fIoldname\fR to \fInewname\fR, optionally
-changing the section's flags to \fIflags\fR 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.
-.Sp
-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:
-.Sp
-.Vb 3
-\& objcopy \-I binary \-O <output_format> \-B <architecture> \e
-\& \-\-rename\-section .data=.rodata,alloc,load,readonly,data,contents \e
-\& <input_binary_file> <output_object_file>
-.Ve
-.IP "\fB\-\-change\-leading\-char\fR" 4
-.IX Item "--change-leading-char"
-Some object file formats use special characters at the start of
-symbols. The most common such character is underscore, which compilers
-often add before every symbol. This option tells \fBobjcopy\fR to
-change the leading character of every symbol when it converts between
-object file formats. If the object file formats use the same leading
-character, this option has no effect. Otherwise, it will add a
-character, or remove a character, or change a character, as
-appropriate.
-.IP "\fB\-\-remove\-leading\-char\fR" 4
-.IX Item "--remove-leading-char"
-If the first character of a global symbol is a special symbol leading
-character used by the object file format, remove the character. The
-most common symbol leading character is underscore. This option will
-remove a leading underscore from all global symbols. This can be useful
-if you want to link together objects of different file formats with
-different conventions for symbol names. This is different from
-\&\fB\-\-change\-leading\-char\fR because it always changes the symbol name
-when appropriate, regardless of the object file format of the output
-file.
-.IP "\fB\-\-srec\-len=\fR\fIival\fR" 4
-.IX Item "--srec-len=ival"
-Meaningful only for srec output. Set the maximum length of the Srecords
-being produced to \fIival\fR. This length covers both address, data and
-crc fields.
-.IP "\fB\-\-srec\-forceS3\fR" 4
-.IX Item "--srec-forceS3"
-Meaningful only for srec output. Avoid generation of S1/S2 records,
-creating S3\-only record format.
-.IP "\fB\-\-redefine\-sym\fR \fIold\fR\fB=\fR\fInew\fR" 4
-.IX Item "--redefine-sym old=new"
-Change the name of a symbol \fIold\fR, to \fInew\fR. This can be useful
-when one is trying link two things together for which you have no
-source, and there are name collisions.
-.IP "\fB\-\-redefine\-syms=\fR\fIfilename\fR" 4
-.IX Item "--redefine-syms=filename"
-Apply \fB\-\-redefine\-sym\fR to each symbol pair "\fIold\fR \fInew\fR"
-listed in the file \fIfilename\fR. \fIfilename\fR is simply a flat file,
-with one symbol pair per line. Line comments may be introduced by the hash
-character. This option may be given more than once.
-.IP "\fB\-\-weaken\fR" 4
-.IX Item "--weaken"
-Change all global symbols in the file to be weak. This can be useful
-when building an object which will be linked against other objects using
-the \fB\-R\fR option to the linker. This option is only effective when
-using an object file format which supports weak symbols.
-.IP "\fB\-\-keep\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--keep-symbols=filename"
-Apply \fB\-\-keep\-symbol\fR option to each symbol listed in the file
-\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
-name per line. Line comments may be introduced by the hash character.
-This option may be given more than once.
-.IP "\fB\-\-strip\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--strip-symbols=filename"
-Apply \fB\-\-strip\-symbol\fR option to each symbol listed in the file
-\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
-name per line. Line comments may be introduced by the hash character.
-This option may be given more than once.
-.IP "\fB\-\-strip\-unneeded\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--strip-unneeded-symbols=filename"
-Apply \fB\-\-strip\-unneeded\-symbol\fR option to each symbol listed in
-the file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
-symbol name per line. Line comments may be introduced by the hash
-character. This option may be given more than once.
-.IP "\fB\-\-keep\-global\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--keep-global-symbols=filename"
-Apply \fB\-\-keep\-global\-symbol\fR option to each symbol listed in the
-file \fIfilename\fR. \fIfilename\fR is simply a flat file, with one
-symbol name per line. Line comments may be introduced by the hash
-character. This option may be given more than once.
-.IP "\fB\-\-localize\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--localize-symbols=filename"
-Apply \fB\-\-localize\-symbol\fR option to each symbol listed in the file
-\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
-name per line. Line comments may be introduced by the hash character.
-This option may be given more than once.
-.IP "\fB\-\-globalize\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--globalize-symbols=filename"
-Apply \fB\-\-globalize\-symbol\fR option to each symbol listed in the file
-\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
-name per line. Line comments may be introduced by the hash character.
-This option may be given more than once.
-.IP "\fB\-\-weaken\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--weaken-symbols=filename"
-Apply \fB\-\-weaken\-symbol\fR option to each symbol listed in the file
-\&\fIfilename\fR. \fIfilename\fR is simply a flat file, with one symbol
-name per line. Line comments may be introduced by the hash character.
-This option may be given more than once.
-.IP "\fB\-\-alt\-machine\-code=\fR\fIindex\fR" 4
-.IX Item "--alt-machine-code=index"
-If the output architecture has alternate machine codes, use the
-\&\fIindex\fRth 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. For \s-1ELF\s0 based architectures if the \fIindex\fR
-alternative does not exist then the value is treated as an absolute
-number to be stored in the e_machine field of the \s-1ELF\s0 header.
-.IP "\fB\-\-writable\-text\fR" 4
-.IX Item "--writable-text"
-Mark the output text as writable. This option isn't meaningful for all
-object file formats.
-.IP "\fB\-\-readonly\-text\fR" 4
-.IX Item "--readonly-text"
-Make the output text write protected. This option isn't meaningful for all
-object file formats.
-.IP "\fB\-\-pure\fR" 4
-.IX Item "--pure"
-Mark the output file as demand paged. This option isn't meaningful for all
-object file formats.
-.IP "\fB\-\-impure\fR" 4
-.IX Item "--impure"
-Mark the output file as impure. This option isn't meaningful for all
-object file formats.
-.IP "\fB\-\-prefix\-symbols=\fR\fIstring\fR" 4
-.IX Item "--prefix-symbols=string"
-Prefix all symbols in the output file with \fIstring\fR.
-.IP "\fB\-\-prefix\-sections=\fR\fIstring\fR" 4
-.IX Item "--prefix-sections=string"
-Prefix all section names in the output file with \fIstring\fR.
-.IP "\fB\-\-prefix\-alloc\-sections=\fR\fIstring\fR" 4
-.IX Item "--prefix-alloc-sections=string"
-Prefix all the names of all allocated sections in the output file with
-\&\fIstring\fR.
-.IP "\fB\-\-add\-gnu\-debuglink=\fR\fIpath-to-file\fR" 4
-.IX Item "--add-gnu-debuglink=path-to-file"
-Creates a .gnu_debuglink section which contains a reference to \fIpath-to-file\fR
-and adds it to the output file.
-.IP "\fB\-\-keep\-file\-symbols\fR" 4
-.IX Item "--keep-file-symbols"
-When stripping a file, perhaps with \fB\-\-strip\-debug\fR or
-\&\fB\-\-strip\-unneeded\fR, retain any symbols specifying source file names,
-which would otherwise get stripped.
-.IP "\fB\-\-only\-keep\-debug\fR" 4
-.IX Item "--only-keep-debug"
-Strip a file, removing contents of any sections that would not be
-stripped by \fB\-\-strip\-debug\fR and leaving the debugging sections
-intact.
-.Sp
-The intention is that this option will be used in conjunction with
-\&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a
-stripped binary which will occupy less space in \s-1RAM\s0 and in a
-distribution and the second a debugging information file which is only
-needed if debugging abilities are required. The suggested procedure
-to create these files is as follows:
-.RS 4
-.IP "1.<Link the executable as normal. Assuming that is is called>" 4
-.IX Item "1.<Link the executable as normal. Assuming that is is called>"
-\&\f(CW\*(C`foo\*(C'\fR then...
-.ie n .IP "1.<Run ""objcopy \-\-only\-keep\-debug foo foo.dbg"" to>" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-only\-keep\-debug foo foo.dbg\fR to>" 4
-.IX Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>"
-create a file containing the debugging info.
-.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"" to create a>" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR to create a>" 4
-.IX Item "1.<Run objcopy --strip-debug foo to create a>"
-stripped executable.
-.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.dbg foo"">" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.dbg foo\fR>" 4
-.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>"
-to add a link to the debugging info into the stripped executable.
-.RE
-.RS 4
-.Sp
-Note \- the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
-file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
-optional. You could instead do this:
-.IP "1.<Link the executable as normal.>" 4
-.IX Item "1.<Link the executable as normal.>"
-.PD 0
-.ie n .IP "1.<Copy ""foo""\fR to \f(CW""foo.full"">" 4
-.el .IP "1.<Copy \f(CWfoo\fR to \f(CWfoo.full\fR>" 4
-.IX Item "1.<Copy foo to foo.full>"
-.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"">" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR>" 4
-.IX Item "1.<Run objcopy --strip-debug foo>"
-.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.full foo"">" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.full foo\fR>" 4
-.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"
-.RE
-.RS 4
-.PD
-.Sp
-i.e. the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
-full executable. It does not have to be a file created by the
-\&\fB\-\-only\-keep\-debug\fR switch.
-.RE
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Show the version number of \fBobjcopy\fR.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-\-verbose\fR" 4
-.IX Item "--verbose"
-.PD
-Verbose output: list all object files modified. In the case of
-archives, \fBobjcopy \-V\fR lists all members of the archive.
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Show a summary of the options to \fBobjcopy\fR.
-.IP "\fB\-\-info\fR" 4
-.IX Item "--info"
-Display a list showing all architectures and object formats available.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIld\fR\|(1), \fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/objdump.1 b/contrib/binutils/binutils/doc/objdump.1
deleted file mode 100644
index a27423c..0000000
--- a/contrib/binutils/binutils/doc/objdump.1
+++ /dev/null
@@ -1,634 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "OBJDUMP 1"
-.TH OBJDUMP 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-objdump \- display information from object files.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-objdump [\fB\-a\fR|\fB\-\-archive\-headers\fR]
- [\fB\-b\fR \fIbfdname\fR|\fB\-\-target=\fR\fIbfdname\fR]
- [\fB\-C\fR|\fB\-\-demangle\fR[=\fIstyle\fR] ]
- [\fB\-d\fR|\fB\-\-disassemble\fR]
- [\fB\-D\fR|\fB\-\-disassemble\-all\fR]
- [\fB\-z\fR|\fB\-\-disassemble\-zeroes\fR]
- [\fB\-EB\fR|\fB\-EL\fR|\fB\-\-endian=\fR{big | little }]
- [\fB\-f\fR|\fB\-\-file\-headers\fR]
- [\fB\-\-file\-start\-context\fR]
- [\fB\-g\fR|\fB\-\-debugging\fR]
- [\fB\-e\fR|\fB\-\-debugging\-tags\fR]
- [\fB\-h\fR|\fB\-\-section\-headers\fR|\fB\-\-headers\fR]
- [\fB\-i\fR|\fB\-\-info\fR]
- [\fB\-j\fR \fIsection\fR|\fB\-\-section=\fR\fIsection\fR]
- [\fB\-l\fR|\fB\-\-line\-numbers\fR]
- [\fB\-S\fR|\fB\-\-source\fR]
- [\fB\-m\fR \fImachine\fR|\fB\-\-architecture=\fR\fImachine\fR]
- [\fB\-M\fR \fIoptions\fR|\fB\-\-disassembler\-options=\fR\fIoptions\fR]
- [\fB\-p\fR|\fB\-\-private\-headers\fR]
- [\fB\-r\fR|\fB\-\-reloc\fR]
- [\fB\-R\fR|\fB\-\-dynamic\-reloc\fR]
- [\fB\-s\fR|\fB\-\-full\-contents\fR]
- [\fB\-W\fR|\fB\-\-dwarf\fR]
- [\fB\-G\fR|\fB\-\-stabs\fR]
- [\fB\-t\fR|\fB\-\-syms\fR]
- [\fB\-T\fR|\fB\-\-dynamic\-syms\fR]
- [\fB\-x\fR|\fB\-\-all\-headers\fR]
- [\fB\-w\fR|\fB\-\-wide\fR]
- [\fB\-\-start\-address=\fR\fIaddress\fR]
- [\fB\-\-stop\-address=\fR\fIaddress\fR]
- [\fB\-\-prefix\-addresses\fR]
- [\fB\-\-[no\-]show\-raw\-insn\fR]
- [\fB\-\-adjust\-vma=\fR\fIoffset\fR]
- [\fB\-\-special\-syms\fR]
- [\fB\-V\fR|\fB\-\-version\fR]
- [\fB\-H\fR|\fB\-\-help\fR]
- \fIobjfile\fR...
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\fBobjdump\fR 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.
-.PP
-\&\fIobjfile\fR... are the object files to be examined. When you
-specify archives, \fBobjdump\fR shows information on each of the member
-object files.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-The long and short forms of options, shown here as alternatives, are
-equivalent. At least one option from the list
-\&\fB\-a,\-d,\-D,\-e,\-f,\-g,\-G,\-h,\-H,\-p,\-r,\-R,\-s,\-S,\-t,\-T,\-V,\-x\fR must be given.
-.IP "\fB\-a\fR" 4
-.IX Item "-a"
-.PD 0
-.IP "\fB\-\-archive\-header\fR" 4
-.IX Item "--archive-header"
-.PD
-If any of the \fIobjfile\fR files are archives, display the archive
-header information (in a format similar to \fBls \-l\fR). Besides the
-information you could list with \fBar tv\fR, \fBobjdump \-a\fR shows
-the object file format of each archive member.
-.IP "\fB\-\-adjust\-vma=\fR\fIoffset\fR" 4
-.IX Item "--adjust-vma=offset"
-When dumping information, first add \fIoffset\fR 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.
-.IP "\fB\-b\fR \fIbfdname\fR" 4
-.IX Item "-b bfdname"
-.PD 0
-.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
-.IX Item "--target=bfdname"
-.PD
-Specify that the object-code format for the object files is
-\&\fIbfdname\fR. This option may not be necessary; \fIobjdump\fR can
-automatically recognize many formats.
-.Sp
-For example,
-.Sp
-.Vb 1
-\& objdump \-b oasys \-m vax \-h fu.o
-.Ve
-.Sp
-displays summary information from the section headers (\fB\-h\fR) of
-\&\fIfu.o\fR, which is explicitly identified (\fB\-m\fR) as a \s-1VAX\s0 object
-file in the format produced by Oasys compilers. You can list the
-formats available with the \fB\-i\fR option.
-.IP "\fB\-C\fR" 4
-.IX Item "-C"
-.PD 0
-.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
-.IX Item "--demangle[=style]"
-.PD
-Decode (\fIdemangle\fR) 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.
-.IP "\fB\-g\fR" 4
-.IX Item "-g"
-.PD 0
-.IP "\fB\-\-debugging\fR" 4
-.IX Item "--debugging"
-.PD
-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.
-Some other types are supported by \fBreadelf \-w\fR.
-.IP "\fB\-e\fR" 4
-.IX Item "-e"
-.PD 0
-.IP "\fB\-\-debugging\-tags\fR" 4
-.IX Item "--debugging-tags"
-.PD
-Like \fB\-g\fR, but the information is generated in a format compatible
-with ctags tool.
-.IP "\fB\-d\fR" 4
-.IX Item "-d"
-.PD 0
-.IP "\fB\-\-disassemble\fR" 4
-.IX Item "--disassemble"
-.PD
-Display the assembler mnemonics for the machine instructions from
-\&\fIobjfile\fR. This option only disassembles those sections which are
-expected to contain instructions.
-.IP "\fB\-D\fR" 4
-.IX Item "-D"
-.PD 0
-.IP "\fB\-\-disassemble\-all\fR" 4
-.IX Item "--disassemble-all"
-.PD
-Like \fB\-d\fR, but disassemble the contents of all sections, not just
-those expected to contain instructions.
-.IP "\fB\-\-prefix\-addresses\fR" 4
-.IX Item "--prefix-addresses"
-When disassembling, print the complete address on each line. This is
-the older disassembly format.
-.IP "\fB\-EB\fR" 4
-.IX Item "-EB"
-.PD 0
-.IP "\fB\-EL\fR" 4
-.IX Item "-EL"
-.IP "\fB\-\-endian={big|little}\fR" 4
-.IX Item "--endian={big|little}"
-.PD
-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.
-.IP "\fB\-f\fR" 4
-.IX Item "-f"
-.PD 0
-.IP "\fB\-\-file\-headers\fR" 4
-.IX Item "--file-headers"
-.PD
-Display summary information from the overall header of
-each of the \fIobjfile\fR files.
-.IP "\fB\-\-file\-start\-context\fR" 4
-.IX Item "--file-start-context"
-Specify that when displaying interlisted source code/disassembly
-(assumes \fB\-S\fR) from a file that has not yet been displayed, extend the
-context to the start of the file.
-.IP "\fB\-h\fR" 4
-.IX Item "-h"
-.PD 0
-.IP "\fB\-\-section\-headers\fR" 4
-.IX Item "--section-headers"
-.IP "\fB\-\-headers\fR" 4
-.IX Item "--headers"
-.PD
-Display summary information from the section headers of the
-object file.
-.Sp
-File segments may be relocated to nonstandard addresses, for example by
-using the \fB\-Ttext\fR, \fB\-Tdata\fR, or \fB\-Tbss\fR options to
-\&\fBld\fR. However, some object file formats, such as a.out, do not
-store the starting address of the file segments. In those situations,
-although \fBld\fR relocates the sections correctly, using \fBobjdump
-\&\-h\fR to list the file section headers cannot show the correct addresses.
-Instead, it shows the usual addresses, which are implicit for the
-target.
-.IP "\fB\-H\fR" 4
-.IX Item "-H"
-.PD 0
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-.PD
-Print a summary of the options to \fBobjdump\fR and exit.
-.IP "\fB\-i\fR" 4
-.IX Item "-i"
-.PD 0
-.IP "\fB\-\-info\fR" 4
-.IX Item "--info"
-.PD
-Display a list showing all architectures and object formats available
-for specification with \fB\-b\fR or \fB\-m\fR.
-.IP "\fB\-j\fR \fIname\fR" 4
-.IX Item "-j name"
-.PD 0
-.IP "\fB\-\-section=\fR\fIname\fR" 4
-.IX Item "--section=name"
-.PD
-Display information only for section \fIname\fR.
-.IP "\fB\-l\fR" 4
-.IX Item "-l"
-.PD 0
-.IP "\fB\-\-line\-numbers\fR" 4
-.IX Item "--line-numbers"
-.PD
-Label the display (using debugging information) with the filename and
-source line numbers corresponding to the object code or relocs shown.
-Only useful with \fB\-d\fR, \fB\-D\fR, or \fB\-r\fR.
-.IP "\fB\-m\fR \fImachine\fR" 4
-.IX Item "-m machine"
-.PD 0
-.IP "\fB\-\-architecture=\fR\fImachine\fR" 4
-.IX Item "--architecture=machine"
-.PD
-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 \fB\-i\fR option.
-.IP "\fB\-M\fR \fIoptions\fR" 4
-.IX Item "-M options"
-.PD 0
-.IP "\fB\-\-disassembler\-options=\fR\fIoptions\fR" 4
-.IX Item "--disassembler-options=options"
-.PD
-Pass target specific information to the disassembler. Only supported on
-some targets. If it is necessary to specify more than one
-disassembler option then multiple \fB\-M\fR options can be used or
-can be placed together into a comma separated list.
-.Sp
-If the target is an \s-1ARM\s0 architecture then this switch can be used to
-select which register name set is used during disassembler. Specifying
-\&\fB\-M reg-names-std\fR (the default) will select the register names as
-used in \s-1ARM\s0's instruction set documentation, but with register 13 called
-\&'sp', register 14 called 'lr' and register 15 called 'pc'. Specifying
-\&\fB\-M reg-names-apcs\fR will select the name set used by the \s-1ARM\s0
-Procedure Call Standard, whilst specifying \fB\-M reg-names-raw\fR will
-just use \fBr\fR followed by the register number.
-.Sp
-There are also two variants on the \s-1APCS\s0 register naming scheme enabled
-by \fB\-M reg-names-atpcs\fR and \fB\-M reg-names-special-atpcs\fR which
-use the ARM/Thumb Procedure Call Standard naming conventions. (Either
-with the normal register names or the special register names).
-.Sp
-This option can also be used for \s-1ARM\s0 architectures to force the
-disassembler to interpret all instructions as Thumb instructions by
-using the switch \fB\-\-disassembler\-options=force\-thumb\fR. This can be
-useful when attempting to disassemble thumb code produced by other
-compilers.
-.Sp
-For the x86, some of the options duplicate functions of the \fB\-m\fR
-switch, but allow finer grained control. Multiple selections from the
-following may be specified as a comma separated string.
-\&\fBx86\-64\fR, \fBi386\fR and \fBi8086\fR select disassembly for
-the given architecture. \fBintel\fR and \fBatt\fR select between
-intel syntax mode and \s-1AT&T\s0 syntax mode. \fBaddr32\fR,
-\&\fBaddr16\fR, \fBdata32\fR and \fBdata16\fR specify the default
-address size and operand size. These four options will be overridden if
-\&\fBx86\-64\fR, \fBi386\fR or \fBi8086\fR appear later in the
-option string. Lastly, \fBsuffix\fR, when in \s-1AT&T\s0 mode,
-instructs the disassembler to print a mnemonic suffix even when the
-suffix could be inferred by the operands.
-.Sp
-For \s-1PPC\s0, \fBbooke\fR, \fBbooke32\fR and \fBbooke64\fR select
-disassembly of BookE instructions. \fB32\fR and \fB64\fR select
-PowerPC and PowerPC64 disassembly, respectively. \fBe300\fR selects
-disassembly for the e300 family.
-.Sp
-For \s-1MIPS\s0, this option controls the printing of instruction mneumonic
-names and register names in disassembled instructions. Multiple
-selections from the following may be specified as a comma separated
-string, and invalid options are ignored:
-.RS 4
-.ie n .IP """no\-aliases""" 4
-.el .IP "\f(CWno\-aliases\fR" 4
-.IX Item "no-aliases"
-Print the 'raw' instruction mneumonic instead of some pseudo
-instruction mneumonic. I.E. print 'daddu' or 'or' instead of 'move',
-\&'sll' instead of 'nop', etc.
-.ie n .IP """gpr\-names=\f(CI\s-1ABI\s0\f(CW""" 4
-.el .IP "\f(CWgpr\-names=\f(CI\s-1ABI\s0\f(CW\fR" 4
-.IX Item "gpr-names=ABI"
-Print \s-1GPR\s0 (general\-purpose register) names as appropriate
-for the specified \s-1ABI\s0. By default, \s-1GPR\s0 names are selected according to
-the \s-1ABI\s0 of the binary being disassembled.
-.ie n .IP """fpr\-names=\f(CI\s-1ABI\s0\f(CW""" 4
-.el .IP "\f(CWfpr\-names=\f(CI\s-1ABI\s0\f(CW\fR" 4
-.IX Item "fpr-names=ABI"
-Print \s-1FPR\s0 (floating\-point register) names as
-appropriate for the specified \s-1ABI\s0. By default, \s-1FPR\s0 numbers are printed
-rather than names.
-.ie n .IP """cp0\-names=\f(CI\s-1ARCH\s0\f(CW""" 4
-.el .IP "\f(CWcp0\-names=\f(CI\s-1ARCH\s0\f(CW\fR" 4
-.IX Item "cp0-names=ARCH"
-Print \s-1CP0\s0 (system control coprocessor; coprocessor 0) register names
-as appropriate for the \s-1CPU\s0 or architecture specified by
-\&\fI\s-1ARCH\s0\fR. By default, \s-1CP0\s0 register names are selected according to
-the architecture and \s-1CPU\s0 of the binary being disassembled.
-.ie n .IP """hwr\-names=\f(CI\s-1ARCH\s0\f(CW""" 4
-.el .IP "\f(CWhwr\-names=\f(CI\s-1ARCH\s0\f(CW\fR" 4
-.IX Item "hwr-names=ARCH"
-Print \s-1HWR\s0 (hardware register, used by the \f(CW\*(C`rdhwr\*(C'\fR instruction) names
-as appropriate for the \s-1CPU\s0 or architecture specified by
-\&\fI\s-1ARCH\s0\fR. By default, \s-1HWR\s0 names are selected according to
-the architecture and \s-1CPU\s0 of the binary being disassembled.
-.ie n .IP """reg\-names=\f(CI\s-1ABI\s0\f(CW""" 4
-.el .IP "\f(CWreg\-names=\f(CI\s-1ABI\s0\f(CW\fR" 4
-.IX Item "reg-names=ABI"
-Print \s-1GPR\s0 and \s-1FPR\s0 names as appropriate for the selected \s-1ABI\s0.
-.ie n .IP """reg\-names=\f(CI\s-1ARCH\s0\f(CW""" 4
-.el .IP "\f(CWreg\-names=\f(CI\s-1ARCH\s0\f(CW\fR" 4
-.IX Item "reg-names=ARCH"
-Print CPU-specific register names (\s-1CP0\s0 register and \s-1HWR\s0 names)
-as appropriate for the selected \s-1CPU\s0 or architecture.
-.RE
-.RS 4
-.Sp
-For any of the options listed above, \fI\s-1ABI\s0\fR or
-\&\fI\s-1ARCH\s0\fR may be specified as \fBnumeric\fR to have numbers printed
-rather than names, for the selected types of registers.
-You can list the available values of \fI\s-1ABI\s0\fR and \fI\s-1ARCH\s0\fR using
-the \fB\-\-help\fR option.
-.Sp
-For \s-1VAX\s0, you can specify function entry addresses with \fB\-M
-entry:0xf00ba\fR. You can use this multiple times to properly
-disassemble \s-1VAX\s0 binary files that don't contain symbol tables (like
-\&\s-1ROM\s0 dumps). In these cases, the function entry mask would otherwise
-be decoded as \s-1VAX\s0 instructions, which would probably lead the the rest
-of the function being wrongly disassembled.
-.RE
-.IP "\fB\-p\fR" 4
-.IX Item "-p"
-.PD 0
-.IP "\fB\-\-private\-headers\fR" 4
-.IX Item "--private-headers"
-.PD
-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.
-.IP "\fB\-r\fR" 4
-.IX Item "-r"
-.PD 0
-.IP "\fB\-\-reloc\fR" 4
-.IX Item "--reloc"
-.PD
-Print the relocation entries of the file. If used with \fB\-d\fR or
-\&\fB\-D\fR, the relocations are printed interspersed with the
-disassembly.
-.IP "\fB\-R\fR" 4
-.IX Item "-R"
-.PD 0
-.IP "\fB\-\-dynamic\-reloc\fR" 4
-.IX Item "--dynamic-reloc"
-.PD
-Print the dynamic relocation entries of the file. This is only
-meaningful for dynamic objects, such as certain types of shared
-libraries.
-.IP "\fB\-s\fR" 4
-.IX Item "-s"
-.PD 0
-.IP "\fB\-\-full\-contents\fR" 4
-.IX Item "--full-contents"
-.PD
-Display the full contents of any sections requested. By default all
-non-empty sections are displayed.
-.IP "\fB\-S\fR" 4
-.IX Item "-S"
-.PD 0
-.IP "\fB\-\-source\fR" 4
-.IX Item "--source"
-.PD
-Display source code intermixed with disassembly, if possible. Implies
-\&\fB\-d\fR.
-.IP "\fB\-\-show\-raw\-insn\fR" 4
-.IX Item "--show-raw-insn"
-When disassembling instructions, print the instruction in hex as well as
-in symbolic form. This is the default except when
-\&\fB\-\-prefix\-addresses\fR is used.
-.IP "\fB\-\-no\-show\-raw\-insn\fR" 4
-.IX Item "--no-show-raw-insn"
-When disassembling instructions, do not print the instruction bytes.
-This is the default when \fB\-\-prefix\-addresses\fR is used.
-.IP "\fB\-W\fR" 4
-.IX Item "-W"
-.PD 0
-.IP "\fB\-\-dwarf\fR" 4
-.IX Item "--dwarf"
-.PD
-Displays the contents of the \s-1DWARF\s0 debug sections in the file, if any
-are present.
-.IP "\fB\-G\fR" 4
-.IX Item "-G"
-.PD 0
-.IP "\fB\-\-stabs\fR" 4
-.IX Item "--stabs"
-.PD
-Display the full contents of any sections requested. Display the
-contents of the .stab and .stab.index and .stab.excl sections from an
-\&\s-1ELF\s0 file. This is only useful on systems (such as Solaris 2.0) in which
-\&\f(CW\*(C`.stab\*(C'\fR debugging symbol-table entries are carried in an \s-1ELF\s0
-section. In most other file formats, debugging symbol-table entries are
-interleaved with linkage symbols, and are visible in the \fB\-\-syms\fR
-output.
-.IP "\fB\-\-start\-address=\fR\fIaddress\fR" 4
-.IX Item "--start-address=address"
-Start displaying data at the specified address. This affects the output
-of the \fB\-d\fR, \fB\-r\fR and \fB\-s\fR options.
-.IP "\fB\-\-stop\-address=\fR\fIaddress\fR" 4
-.IX Item "--stop-address=address"
-Stop displaying data at the specified address. This affects the output
-of the \fB\-d\fR, \fB\-r\fR and \fB\-s\fR options.
-.IP "\fB\-t\fR" 4
-.IX Item "-t"
-.PD 0
-.IP "\fB\-\-syms\fR" 4
-.IX Item "--syms"
-.PD
-Print the symbol table entries of the file.
-This is similar to the information provided by the \fBnm\fR program.
-.IP "\fB\-T\fR" 4
-.IX Item "-T"
-.PD 0
-.IP "\fB\-\-dynamic\-syms\fR" 4
-.IX Item "--dynamic-syms"
-.PD
-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 \fBnm\fR
-program when given the \fB\-D\fR (\fB\-\-dynamic\fR) option.
-.IP "\fB\-\-special\-syms\fR" 4
-.IX Item "--special-syms"
-When displaying symbols include those which the target considers to be
-special in some way and which would not normally be of interest to the
-user.
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Print the version number of \fBobjdump\fR and exit.
-.IP "\fB\-x\fR" 4
-.IX Item "-x"
-.PD 0
-.IP "\fB\-\-all\-headers\fR" 4
-.IX Item "--all-headers"
-.PD
-Display all available header information, including the symbol table and
-relocation entries. Using \fB\-x\fR is equivalent to specifying all of
-\&\fB\-a \-f \-h \-p \-r \-t\fR.
-.IP "\fB\-w\fR" 4
-.IX Item "-w"
-.PD 0
-.IP "\fB\-\-wide\fR" 4
-.IX Item "--wide"
-.PD
-Format some lines for output devices that have more than 80 columns.
-Also do not truncate symbol names when they are displayed.
-.IP "\fB\-z\fR" 4
-.IX Item "-z"
-.PD 0
-.IP "\fB\-\-disassemble\-zeroes\fR" 4
-.IX Item "--disassemble-zeroes"
-.PD
-Normally the disassembly output will skip blocks of zeroes. This
-option directs the disassembler to disassemble those blocks, just like
-any other data.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fInm\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/ranlib.1 b/contrib/binutils/binutils/doc/ranlib.1
deleted file mode 100644
index fd03dd0..0000000
--- a/contrib/binutils/binutils/doc/ranlib.1
+++ /dev/null
@@ -1,188 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "RANLIB 1"
-.TH RANLIB 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-ranlib \- generate index to archive.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-ranlib [\fB\-vV\fR] \fIarchive\fR
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\fBranlib\fR 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.
-.PP
-You may use \fBnm \-s\fR or \fBnm \-\-print\-armap\fR to list this index.
-.PP
-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.
-.PP
-The \s-1GNU\s0 \fBranlib\fR program is another form of \s-1GNU\s0 \fBar\fR; running
-\&\fBranlib\fR is completely equivalent to executing \fBar \-s\fR.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Show the version number of \fBranlib\fR.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIar\fR\|(1), \fInm\fR\|(1), and the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/readelf.1 b/contrib/binutils/binutils/doc/readelf.1
deleted file mode 100644
index 14480c7..0000000
--- a/contrib/binutils/binutils/doc/readelf.1
+++ /dev/null
@@ -1,376 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "READELF 1"
-.TH READELF 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-readelf \- Displays information about ELF files.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-readelf [\fB\-a\fR|\fB\-\-all\fR]
- [\fB\-h\fR|\fB\-\-file\-header\fR]
- [\fB\-l\fR|\fB\-\-program\-headers\fR|\fB\-\-segments\fR]
- [\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
- [\fB\-g\fR|\fB\-\-section\-groups\fR]
- [\fB\-t\fR|\fB\-\-section\-details\fR]
- [\fB\-e\fR|\fB\-\-headers\fR]
- [\fB\-s\fR|\fB\-\-syms\fR|\fB\-\-symbols\fR]
- [\fB\-n\fR|\fB\-\-notes\fR]
- [\fB\-r\fR|\fB\-\-relocs\fR]
- [\fB\-u\fR|\fB\-\-unwind\fR]
- [\fB\-d\fR|\fB\-\-dynamic\fR]
- [\fB\-V\fR|\fB\-\-version\-info\fR]
- [\fB\-A\fR|\fB\-\-arch\-specific\fR]
- [\fB\-D\fR|\fB\-\-use\-dynamic\fR]
- [\fB\-x\fR <number or name>|\fB\-\-hex\-dump=\fR<number or name>]
- [\fB\-w[liaprmfFsoR]\fR|
- \fB\-\-debug\-dump\fR[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges]]
- [\fB\-I\fR|\fB\-histogram\fR]
- [\fB\-v\fR|\fB\-\-version\fR]
- [\fB\-W\fR|\fB\-\-wide\fR]
- [\fB\-H\fR|\fB\-\-help\fR]
- \fIelffile\fR...
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\fBreadelf\fR displays information about one or more \s-1ELF\s0 format object
-files. The options control what particular information to display.
-.PP
-\&\fIelffile\fR... are the object files to be examined. 32\-bit and
-64\-bit \s-1ELF\s0 files are supported, as are archives containing \s-1ELF\s0 files.
-.PP
-This program performs a similar function to \fBobjdump\fR but it
-goes into more detail and it exists independently of the \s-1BFD\s0
-library, so if there is a bug in \s-1BFD\s0 then readelf will not be
-affected.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-The long and short forms of options, shown here as alternatives, are
-equivalent. At least one option besides \fB\-v\fR or \fB\-H\fR must be
-given.
-.IP "\fB\-a\fR" 4
-.IX Item "-a"
-.PD 0
-.IP "\fB\-\-all\fR" 4
-.IX Item "--all"
-.PD
-Equivalent to specifiying \fB\-\-file\-header\fR,
-\&\fB\-\-program\-headers\fR, \fB\-\-sections\fR, \fB\-\-symbols\fR,
-\&\fB\-\-relocs\fR, \fB\-\-dynamic\fR, \fB\-\-notes\fR and
-\&\fB\-\-version\-info\fR.
-.IP "\fB\-h\fR" 4
-.IX Item "-h"
-.PD 0
-.IP "\fB\-\-file\-header\fR" 4
-.IX Item "--file-header"
-.PD
-Displays the information contained in the \s-1ELF\s0 header at the start of the
-file.
-.IP "\fB\-l\fR" 4
-.IX Item "-l"
-.PD 0
-.IP "\fB\-\-program\-headers\fR" 4
-.IX Item "--program-headers"
-.IP "\fB\-\-segments\fR" 4
-.IX Item "--segments"
-.PD
-Displays the information contained in the file's segment headers, if it
-has any.
-.IP "\fB\-S\fR" 4
-.IX Item "-S"
-.PD 0
-.IP "\fB\-\-sections\fR" 4
-.IX Item "--sections"
-.IP "\fB\-\-section\-headers\fR" 4
-.IX Item "--section-headers"
-.PD
-Displays the information contained in the file's section headers, if it
-has any.
-.IP "\fB\-g\fR" 4
-.IX Item "-g"
-.PD 0
-.IP "\fB\-\-section\-groups\fR" 4
-.IX Item "--section-groups"
-.PD
-Displays the information contained in the file's section groups, if it
-has any.
-.IP "\fB\-t\fR" 4
-.IX Item "-t"
-.PD 0
-.IP "\fB\-\-section\-details\fR" 4
-.IX Item "--section-details"
-.PD
-Displays the detailed section information. Implies \fB\-S\fR.
-.IP "\fB\-s\fR" 4
-.IX Item "-s"
-.PD 0
-.IP "\fB\-\-symbols\fR" 4
-.IX Item "--symbols"
-.IP "\fB\-\-syms\fR" 4
-.IX Item "--syms"
-.PD
-Displays the entries in symbol table section of the file, if it has one.
-.IP "\fB\-e\fR" 4
-.IX Item "-e"
-.PD 0
-.IP "\fB\-\-headers\fR" 4
-.IX Item "--headers"
-.PD
-Display all the headers in the file. Equivalent to \fB\-h \-l \-S\fR.
-.IP "\fB\-n\fR" 4
-.IX Item "-n"
-.PD 0
-.IP "\fB\-\-notes\fR" 4
-.IX Item "--notes"
-.PD
-Displays the contents of the \s-1NOTE\s0 segments and/or sections, if any.
-.IP "\fB\-r\fR" 4
-.IX Item "-r"
-.PD 0
-.IP "\fB\-\-relocs\fR" 4
-.IX Item "--relocs"
-.PD
-Displays the contents of the file's relocation section, if it has one.
-.IP "\fB\-u\fR" 4
-.IX Item "-u"
-.PD 0
-.IP "\fB\-\-unwind\fR" 4
-.IX Item "--unwind"
-.PD
-Displays the contents of the file's unwind section, if it has one. Only
-the unwind sections for \s-1IA64\s0 \s-1ELF\s0 files are currently supported.
-.IP "\fB\-d\fR" 4
-.IX Item "-d"
-.PD 0
-.IP "\fB\-\-dynamic\fR" 4
-.IX Item "--dynamic"
-.PD
-Displays the contents of the file's dynamic section, if it has one.
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD 0
-.IP "\fB\-\-version\-info\fR" 4
-.IX Item "--version-info"
-.PD
-Displays the contents of the version sections in the file, it they
-exist.
-.IP "\fB\-A\fR" 4
-.IX Item "-A"
-.PD 0
-.IP "\fB\-\-arch\-specific\fR" 4
-.IX Item "--arch-specific"
-.PD
-Displays architecture-specific information in the file, if there
-is any.
-.IP "\fB\-D\fR" 4
-.IX Item "-D"
-.PD 0
-.IP "\fB\-\-use\-dynamic\fR" 4
-.IX Item "--use-dynamic"
-.PD
-When displaying symbols, this option makes \fBreadelf\fR use the
-symbol table in the file's dynamic section, rather than the one in the
-symbols section.
-.IP "\fB\-x <number or name>\fR" 4
-.IX Item "-x <number or name>"
-.PD 0
-.IP "\fB\-\-hex\-dump=<number or name>\fR" 4
-.IX Item "--hex-dump=<number or name>"
-.PD
-Displays the contents of the indicated section as a hexadecimal dump.
-A number identifies a particular section by index in the section table;
-any other string identifies all sections with that name in the object file.
-.IP "\fB\-w[liaprmfFsoR]\fR" 4
-.IX Item "-w[liaprmfFsoR]"
-.PD 0
-.IP "\fB\-\-debug\-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames\-interp,=str,=loc,=Ranges]\fR" 4
-.IX Item "--debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]"
-.PD
-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.
-.IP "\fB\-I\fR" 4
-.IX Item "-I"
-.PD 0
-.IP "\fB\-\-histogram\fR" 4
-.IX Item "--histogram"
-.PD
-Display a histogram of bucket list lengths when displaying the contents
-of the symbol tables.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Display the version number of readelf.
-.IP "\fB\-W\fR" 4
-.IX Item "-W"
-.PD 0
-.IP "\fB\-\-wide\fR" 4
-.IX Item "--wide"
-.PD
-Don't break output lines to fit into 80 columns. By default
-\&\fBreadelf\fR breaks section header and segment listing lines for
-64\-bit \s-1ELF\s0 files, so that they fit into 80 columns. This option causes
-\&\fBreadelf\fR to print each section header resp. each segment one a
-single line, which is far more readable on terminals wider than 80 columns.
-.IP "\fB\-H\fR" 4
-.IX Item "-H"
-.PD 0
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-.PD
-Display the command line options understood by \fBreadelf\fR.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIobjdump\fR\|(1), and the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/size.1 b/contrib/binutils/binutils/doc/size.1
deleted file mode 100644
index 1cf72ac..0000000
--- a/contrib/binutils/binutils/doc/size.1
+++ /dev/null
@@ -1,263 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "SIZE 1"
-.TH SIZE 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-size \- list section sizes and total size.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-size [\fB\-A\fR|\fB\-B\fR|\fB\-\-format=\fR\fIcompatibility\fR]
- [\fB\-\-help\fR]
- [\fB\-d\fR|\fB\-o\fR|\fB\-x\fR|\fB\-\-radix=\fR\fInumber\fR]
- [\fB\-t\fR|\fB\-\-totals\fR]
- [\fB\-\-target=\fR\fIbfdname\fR] [\fB\-V\fR|\fB\-\-version\fR]
- [\fIobjfile\fR...]
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-The \s-1GNU\s0 \fBsize\fR utility lists the section sizes\-\-\-and the total
-size\-\-\-for each of the object or archive files \fIobjfile\fR in its
-argument list. By default, one line of output is generated for each
-object file or each module in an archive.
-.PP
-\&\fIobjfile\fR... are the object files to be examined.
-If none are specified, the file \f(CW\*(C`a.out\*(C'\fR will be used.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-The command line options have the following meanings:
-.IP "\fB\-A\fR" 4
-.IX Item "-A"
-.PD 0
-.IP "\fB\-B\fR" 4
-.IX Item "-B"
-.IP "\fB\-\-format=\fR\fIcompatibility\fR" 4
-.IX Item "--format=compatibility"
-.PD
-Using one of these options, you can choose whether the output from \s-1GNU\s0
-\&\fBsize\fR resembles output from System V \fBsize\fR (using \fB\-A\fR,
-or \fB\-\-format=sysv\fR), or Berkeley \fBsize\fR (using \fB\-B\fR, or
-\&\fB\-\-format=berkeley\fR). The default is the one-line format similar to
-Berkeley's.
-.Sp
-Here is an example of the Berkeley (default) format of output from
-\&\fBsize\fR:
-.Sp
-.Vb 4
-\& $ size \-\-format=Berkeley ranlib size
-\& text data bss dec hex filename
-\& 294880 81920 11592 388392 5ed28 ranlib
-\& 294880 81920 11888 388688 5ee50 size
-.Ve
-.Sp
-This is the same data, but displayed closer to System V conventions:
-.Sp
-.Vb 7
-\& $ size \-\-format=SysV ranlib size
-\& ranlib :
-\& section size addr
-\& .text 294880 8192
-\& .data 81920 303104
-\& .bss 11592 385024
-\& Total 388392
-.Ve
-.Sp
-.Vb 6
-\& size :
-\& section size addr
-\& .text 294880 8192
-\& .data 81920 303104
-\& .bss 11888 385024
-\& Total 388688
-.Ve
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Show a summary of acceptable arguments and options.
-.IP "\fB\-d\fR" 4
-.IX Item "-d"
-.PD 0
-.IP "\fB\-o\fR" 4
-.IX Item "-o"
-.IP "\fB\-x\fR" 4
-.IX Item "-x"
-.IP "\fB\-\-radix=\fR\fInumber\fR" 4
-.IX Item "--radix=number"
-.PD
-Using one of these options, you can control whether the size of each
-section is given in decimal (\fB\-d\fR, or \fB\-\-radix=10\fR); octal
-(\fB\-o\fR, or \fB\-\-radix=8\fR); or hexadecimal (\fB\-x\fR, or
-\&\fB\-\-radix=16\fR). In \fB\-\-radix=\fR\fInumber\fR, only the three
-values (8, 10, 16) are supported. The total size is always given in two
-radices; decimal and hexadecimal for \fB\-d\fR or \fB\-x\fR output, or
-octal and hexadecimal if you're using \fB\-o\fR.
-.IP "\fB\-t\fR" 4
-.IX Item "-t"
-.PD 0
-.IP "\fB\-\-totals\fR" 4
-.IX Item "--totals"
-.PD
-Show totals of all objects listed (Berkeley format listing mode only).
-.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
-.IX Item "--target=bfdname"
-Specify that the object-code format for \fIobjfile\fR is
-\&\fIbfdname\fR. This option may not be necessary; \fBsize\fR can
-automatically recognize many formats.
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Display the version number of \fBsize\fR.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIar\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1), and the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/strings.1 b/contrib/binutils/binutils/doc/strings.1
deleted file mode 100644
index 5cffee1..0000000
--- a/contrib/binutils/binutils/doc/strings.1
+++ /dev/null
@@ -1,249 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "STRINGS 1"
-.TH STRINGS 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-strings \- print the strings of printable characters in files.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-strings [\fB\-afov\fR] [\fB\-\fR\fImin-len\fR]
- [\fB\-n\fR \fImin-len\fR] [\fB\-\-bytes=\fR\fImin-len\fR]
- [\fB\-t\fR \fIradix\fR] [\fB\-\-radix=\fR\fIradix\fR]
- [\fB\-e\fR \fIencoding\fR] [\fB\-\-encoding=\fR\fIencoding\fR]
- [\fB\-\fR] [\fB\-\-all\fR] [\fB\-\-print\-file\-name\fR]
- [\fB\-\-target=\fR\fIbfdname\fR]
- [\fB\-\-help\fR] [\fB\-\-version\fR] \fIfile\fR...
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-For each \fIfile\fR given, \s-1GNU\s0 \fBstrings\fR 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.
-.PP
-\&\fBstrings\fR is mainly useful for determining the contents of non-text
-files.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-.IP "\fB\-a\fR" 4
-.IX Item "-a"
-.PD 0
-.IP "\fB\-\-all\fR" 4
-.IX Item "--all"
-.IP "\fB\-\fR" 4
-.IX Item "-"
-.PD
-Do not scan only the initialized and loaded sections of object files;
-scan the whole files.
-.IP "\fB\-f\fR" 4
-.IX Item "-f"
-.PD 0
-.IP "\fB\-\-print\-file\-name\fR" 4
-.IX Item "--print-file-name"
-.PD
-Print the name of the file before each string.
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Print a summary of the program usage on the standard output and exit.
-.IP "\fB\-\fR\fImin-len\fR" 4
-.IX Item "-min-len"
-.PD 0
-.IP "\fB\-n\fR \fImin-len\fR" 4
-.IX Item "-n min-len"
-.IP "\fB\-\-bytes=\fR\fImin-len\fR" 4
-.IX Item "--bytes=min-len"
-.PD
-Print sequences of characters that are at least \fImin-len\fR characters
-long, instead of the default 4.
-.IP "\fB\-o\fR" 4
-.IX Item "-o"
-Like \fB\-t o\fR. Some other versions of \fBstrings\fR have \fB\-o\fR
-act like \fB\-t d\fR instead. Since we can not be compatible with both
-ways, we simply chose one.
-.IP "\fB\-t\fR \fIradix\fR" 4
-.IX Item "-t radix"
-.PD 0
-.IP "\fB\-\-radix=\fR\fIradix\fR" 4
-.IX Item "--radix=radix"
-.PD
-Print the offset within the file before each string. The single
-character argument specifies the radix of the offset\-\-\-\fBo\fR for
-octal, \fBx\fR for hexadecimal, or \fBd\fR for decimal.
-.IP "\fB\-e\fR \fIencoding\fR" 4
-.IX Item "-e encoding"
-.PD 0
-.IP "\fB\-\-encoding=\fR\fIencoding\fR" 4
-.IX Item "--encoding=encoding"
-.PD
-Select the character encoding of the strings that are to be found.
-Possible values for \fIencoding\fR are: \fBs\fR = single\-7\-bit\-byte
-characters (\s-1ASCII\s0, \s-1ISO\s0 8859, etc., default), \fBS\fR =
-single\-8\-bit\-byte characters, \fBb\fR = 16\-bit bigendian, \fBl\fR =
-16\-bit littleendian, \fBB\fR = 32\-bit bigendian, \fBL\fR = 32\-bit
-littleendian. Useful for finding wide character strings.
-.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
-.IX Item "--target=bfdname"
-Specify an object code format other than your system's default format.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Print the program version number on the standard output and exit.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIar\fR\|(1), \fInm\fR\|(1), \fIobjdump\fR\|(1), \fIranlib\fR\|(1), \fIreadelf\fR\|(1)
-and the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/doc/strip.1 b/contrib/binutils/binutils/doc/strip.1
deleted file mode 100644
index 982255e..0000000
--- a/contrib/binutils/binutils/doc/strip.1
+++ /dev/null
@@ -1,383 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "STRIP 1"
-.TH STRIP 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-strip \- Discard symbols from object files.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-strip [\fB\-F\fR \fIbfdname\fR |\fB\-\-target=\fR\fIbfdname\fR]
- [\fB\-I\fR \fIbfdname\fR |\fB\-\-input\-target=\fR\fIbfdname\fR]
- [\fB\-O\fR \fIbfdname\fR |\fB\-\-output\-target=\fR\fIbfdname\fR]
- [\fB\-s\fR|\fB\-\-strip\-all\fR]
- [\fB\-S\fR|\fB\-g\fR|\fB\-d\fR|\fB\-\-strip\-debug\fR]
- [\fB\-K\fR \fIsymbolname\fR |\fB\-\-keep\-symbol=\fR\fIsymbolname\fR]
- [\fB\-N\fR \fIsymbolname\fR |\fB\-\-strip\-symbol=\fR\fIsymbolname\fR]
- [\fB\-w\fR|\fB\-\-wildcard\fR]
- [\fB\-x\fR|\fB\-\-discard\-all\fR] [\fB\-X\fR |\fB\-\-discard\-locals\fR]
- [\fB\-R\fR \fIsectionname\fR |\fB\-\-remove\-section=\fR\fIsectionname\fR]
- [\fB\-o\fR \fIfile\fR] [\fB\-p\fR|\fB\-\-preserve\-dates\fR]
- [\fB\-\-keep\-file\-symbols\fR]
- [\fB\-\-only\-keep\-debug\fR]
- [\fB\-v\fR |\fB\-\-verbose\fR] [\fB\-V\fR|\fB\-\-version\fR]
- [\fB\-\-help\fR] [\fB\-\-info\fR]
- \fIobjfile\fR...
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\s-1GNU\s0 \fBstrip\fR discards all symbols from object files
-\&\fIobjfile\fR. The list of object files may include archives.
-At least one object file must be given.
-.PP
-\&\fBstrip\fR modifies the files named in its argument,
-rather than writing modified copies under different names.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-.IP "\fB\-F\fR \fIbfdname\fR" 4
-.IX Item "-F bfdname"
-.PD 0
-.IP "\fB\-\-target=\fR\fIbfdname\fR" 4
-.IX Item "--target=bfdname"
-.PD
-Treat the original \fIobjfile\fR as a file with the object
-code format \fIbfdname\fR, and rewrite it in the same format.
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Show a summary of the options to \fBstrip\fR and exit.
-.IP "\fB\-\-info\fR" 4
-.IX Item "--info"
-Display a list showing all architectures and object formats available.
-.IP "\fB\-I\fR \fIbfdname\fR" 4
-.IX Item "-I bfdname"
-.PD 0
-.IP "\fB\-\-input\-target=\fR\fIbfdname\fR" 4
-.IX Item "--input-target=bfdname"
-.PD
-Treat the original \fIobjfile\fR as a file with the object
-code format \fIbfdname\fR.
-.IP "\fB\-O\fR \fIbfdname\fR" 4
-.IX Item "-O bfdname"
-.PD 0
-.IP "\fB\-\-output\-target=\fR\fIbfdname\fR" 4
-.IX Item "--output-target=bfdname"
-.PD
-Replace \fIobjfile\fR with a file in the output format \fIbfdname\fR.
-.IP "\fB\-R\fR \fIsectionname\fR" 4
-.IX Item "-R sectionname"
-.PD 0
-.IP "\fB\-\-remove\-section=\fR\fIsectionname\fR" 4
-.IX Item "--remove-section=sectionname"
-.PD
-Remove any section named \fIsectionname\fR from the output file. This
-option may be given more than once. Note that using this option
-inappropriately may make the output file unusable.
-.IP "\fB\-s\fR" 4
-.IX Item "-s"
-.PD 0
-.IP "\fB\-\-strip\-all\fR" 4
-.IX Item "--strip-all"
-.PD
-Remove all symbols.
-.IP "\fB\-g\fR" 4
-.IX Item "-g"
-.PD 0
-.IP "\fB\-S\fR" 4
-.IX Item "-S"
-.IP "\fB\-d\fR" 4
-.IX Item "-d"
-.IP "\fB\-\-strip\-debug\fR" 4
-.IX Item "--strip-debug"
-.PD
-Remove debugging symbols only.
-.IP "\fB\-\-strip\-unneeded\fR" 4
-.IX Item "--strip-unneeded"
-Remove all symbols that are not needed for relocation processing.
-.IP "\fB\-K\fR \fIsymbolname\fR" 4
-.IX Item "-K symbolname"
-.PD 0
-.IP "\fB\-\-keep\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--keep-symbol=symbolname"
-.PD
-When stripping symbols, keep symbol \fIsymbolname\fR even if it would
-normally be stripped. This option may be given more than once.
-.IP "\fB\-N\fR \fIsymbolname\fR" 4
-.IX Item "-N symbolname"
-.PD 0
-.IP "\fB\-\-strip\-symbol=\fR\fIsymbolname\fR" 4
-.IX Item "--strip-symbol=symbolname"
-.PD
-Remove symbol \fIsymbolname\fR from the source file. This option may be
-given more than once, and may be combined with strip options other than
-\&\fB\-K\fR.
-.IP "\fB\-o\fR \fIfile\fR" 4
-.IX Item "-o file"
-Put the stripped output in \fIfile\fR, rather than replacing the
-existing file. When this argument is used, only one \fIobjfile\fR
-argument may be specified.
-.IP "\fB\-p\fR" 4
-.IX Item "-p"
-.PD 0
-.IP "\fB\-\-preserve\-dates\fR" 4
-.IX Item "--preserve-dates"
-.PD
-Preserve the access and modification dates of the file.
-.IP "\fB\-w\fR" 4
-.IX Item "-w"
-.PD 0
-.IP "\fB\-\-wildcard\fR" 4
-.IX Item "--wildcard"
-.PD
-Permit regular expressions in \fIsymbolname\fRs used in other command
-line options. The question mark (?), asterisk (*), backslash (\e) and
-square brackets ([]) operators can be used anywhere in the symbol
-name. If the first character of the symbol name is the exclamation
-point (!) then the sense of the switch is reversed for that symbol.
-For example:
-.Sp
-.Vb 1
-\& \-w \-K !foo \-K fo*
-.Ve
-.Sp
-would cause strip to only keep symbols that start with the letters
-\&\*(L"fo\*(R", but to discard the symbol \*(L"foo\*(R".
-.IP "\fB\-x\fR" 4
-.IX Item "-x"
-.PD 0
-.IP "\fB\-\-discard\-all\fR" 4
-.IX Item "--discard-all"
-.PD
-Remove non-global symbols.
-.IP "\fB\-X\fR" 4
-.IX Item "-X"
-.PD 0
-.IP "\fB\-\-discard\-locals\fR" 4
-.IX Item "--discard-locals"
-.PD
-Remove compiler-generated local symbols.
-(These usually start with \fBL\fR or \fB.\fR.)
-.IP "\fB\-\-keep\-file\-symbols\fR" 4
-.IX Item "--keep-file-symbols"
-When stripping a file, perhaps with \fB\-\-strip\-debug\fR or
-\&\fB\-\-strip\-unneeded\fR, retain any symbols specifying source file names,
-which would otherwise get stripped.
-.IP "\fB\-\-only\-keep\-debug\fR" 4
-.IX Item "--only-keep-debug"
-Strip a file, removing any sections that would be stripped by
-\&\fB\-\-strip\-debug\fR and leaving the debugging sections.
-.Sp
-The intention is that this option will be used in conjunction with
-\&\fB\-\-add\-gnu\-debuglink\fR to create a two part executable. One a
-stripped binary which will occupy less space in \s-1RAM\s0 and in a
-distribution and the second a debugging information file which is only
-needed if debugging abilities are required. The suggested procedure
-to create these files is as follows:
-.RS 4
-.IP "1.<Link the executable as normal. Assuming that is is called>" 4
-.IX Item "1.<Link the executable as normal. Assuming that is is called>"
-\&\f(CW\*(C`foo\*(C'\fR then...
-.ie n .IP "1.<Run ""objcopy \-\-only\-keep\-debug foo foo.dbg"" to>" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-only\-keep\-debug foo foo.dbg\fR to>" 4
-.IX Item "1.<Run objcopy --only-keep-debug foo foo.dbg to>"
-create a file containing the debugging info.
-.ie n .IP "1.<Run ""objcopy \-\-strip\-debug foo"" to create a>" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-strip\-debug foo\fR to create a>" 4
-.IX Item "1.<Run objcopy --strip-debug foo to create a>"
-stripped executable.
-.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.dbg foo"">" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.dbg foo\fR>" 4
-.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.dbg foo>"
-to add a link to the debugging info into the stripped executable.
-.RE
-.RS 4
-.Sp
-Note \- the choice of \f(CW\*(C`.dbg\*(C'\fR as an extension for the debug info
-file is arbitrary. Also the \f(CW\*(C`\-\-only\-keep\-debug\*(C'\fR step is
-optional. You could instead do this:
-.IP "1.<Link the executable as normal.>" 4
-.IX Item "1.<Link the executable as normal.>"
-.PD 0
-.ie n .IP "1.<Copy ""foo""\fR to \f(CW""foo.full"">" 4
-.el .IP "1.<Copy \f(CWfoo\fR to \f(CWfoo.full\fR>" 4
-.IX Item "1.<Copy foo to foo.full>"
-.ie n .IP "1.<Run ""strip \-\-strip\-debug foo"">" 4
-.el .IP "1.<Run \f(CWstrip \-\-strip\-debug foo\fR>" 4
-.IX Item "1.<Run strip --strip-debug foo>"
-.ie n .IP "1.<Run ""objcopy \-\-add\-gnu\-debuglink=foo.full foo"">" 4
-.el .IP "1.<Run \f(CWobjcopy \-\-add\-gnu\-debuglink=foo.full foo\fR>" 4
-.IX Item "1.<Run objcopy --add-gnu-debuglink=foo.full foo>"
-.RE
-.RS 4
-.PD
-.Sp
-ie the file pointed to by the \fB\-\-add\-gnu\-debuglink\fR can be the
-full executable. It does not have to be a file created by the
-\&\fB\-\-only\-keep\-debug\fR switch.
-.RE
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.PD
-Show the version number for \fBstrip\fR.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-\-verbose\fR" 4
-.IX Item "--verbose"
-.PD
-Verbose output: list all object files modified. In the case of
-archives, \fBstrip \-v\fR lists all members of the archive.
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-the Info entries for \fIbinutils\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/binutils/dwarf.c b/contrib/binutils/binutils/dwarf.c
index c69cab2..cc37b25b 100644
--- a/contrib/binutils/binutils/dwarf.c
+++ b/contrib/binutils/binutils/dwarf.c
@@ -1,5 +1,5 @@
/* dwarf.c -- display DWARF contents of a BFD binary file
- Copyright 2005, 2006
+ Copyright 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -19,12 +19,12 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <stdio.h>
-
-#include "dwarf.h"
-
-#include "bucomm.h"
+#include "sysdep.h"
#include "libiberty.h"
+#include "bfd.h"
+#include "bucomm.h"
+#include "elf/dwarf2.h"
+#include "dwarf.h"
static int have_frame_base;
static int need_base_address;
@@ -895,6 +895,9 @@ decode_location_expression (unsigned char * data,
case DW_OP_call_ref:
printf ("DW_OP_call_ref");
break;
+ case DW_OP_form_tls_address:
+ printf ("DW_OP_form_tls_address");
+ break;
/* GNU extensions. */
case DW_OP_GNU_push_tls_address:
@@ -1213,26 +1216,37 @@ read_and_display_attr_value (unsigned long attribute,
case DW_AT_language:
switch (uvalue)
{
- case DW_LANG_C: printf ("(non-ANSI C)"); break;
+ /* Ordered by the numeric value of these constants. */
case DW_LANG_C89: printf ("(ANSI C)"); break;
+ case DW_LANG_C: printf ("(non-ANSI C)"); break;
+ case DW_LANG_Ada83: printf ("(Ada)"); break;
case DW_LANG_C_plus_plus: printf ("(C++)"); break;
+ case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
+ case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
case DW_LANG_Fortran77: printf ("(FORTRAN 77)"); break;
case DW_LANG_Fortran90: printf ("(Fortran 90)"); break;
- case DW_LANG_Modula2: printf ("(Modula 2)"); break;
case DW_LANG_Pascal83: printf ("(ANSI Pascal)"); break;
- case DW_LANG_Ada83: printf ("(Ada)"); break;
- case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
- case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
+ case DW_LANG_Modula2: printf ("(Modula 2)"); break;
/* DWARF 2.1 values. */
+ case DW_LANG_Java: printf ("(Java)"); break;
case DW_LANG_C99: printf ("(ANSI C99)"); break;
case DW_LANG_Ada95: printf ("(ADA 95)"); break;
case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
+ /* DWARF 3 values. */
+ case DW_LANG_PLI: printf ("(PLI)"); break;
+ case DW_LANG_ObjC: printf ("(Objective C)"); break;
+ case DW_LANG_ObjC_plus_plus: printf ("(Objective C++)"); break;
+ case DW_LANG_UPC: printf ("(Unified Parallel C)"); break;
+ case DW_LANG_D: printf ("(D)"); break;
/* MIPS extension. */
case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
/* UPC extension. */
case DW_LANG_Upc: printf ("(Unified Parallel C)"); break;
default:
- printf ("(Unknown: %lx)", uvalue);
+ if (uvalue >= DW_LANG_lo_user && uvalue <= DW_LANG_hi_user)
+ printf ("(implementation defined: %lx)", uvalue);
+ else
+ printf ("(Unknown: %lx)", uvalue);
break;
}
break;
@@ -1604,7 +1618,6 @@ process_debug_info (struct dwarf_section *section, void *file,
hdrptr += 2;
cu_offset = start - section_begin;
- start += compunit.cu_length + initial_length_size;
cu_abbrev_offset_ptr = hdrptr;
compunit.cu_abbrev_offset = byte_get (hdrptr, offset_size);
@@ -1628,8 +1641,6 @@ process_debug_info (struct dwarf_section *section, void *file,
debug_information [unit].num_range_lists = 0;
}
- tags = hdrptr;
-
if (!do_loc)
{
printf (_(" Compilation Unit @ offset 0x%lx:\n"), cu_offset);
@@ -1639,6 +1650,16 @@ process_debug_info (struct dwarf_section *section, void *file,
printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size);
}
+ if (cu_offset + compunit.cu_length + initial_length_size
+ > section->size)
+ {
+ warn (_("Debug info is corrupted, length is invalid (section is %lu bytes)\n"),
+ (unsigned long)section->size);
+ break;
+ }
+ tags = hdrptr;
+ start += compunit.cu_length + initial_length_size;
+
if (compunit.cu_version != 2 && compunit.cu_version != 3)
{
warn (_("Only version 2 and 3 DWARF debug information is currently supported.\n"));
@@ -1649,11 +1670,15 @@ process_debug_info (struct dwarf_section *section, void *file,
/* Process the abbrevs used by this compilation unit. DWARF
sections under Mach-O have non-zero addresses. */
- process_abbrev_section
- ((unsigned char *) debug_displays [abbrev].section.start
- + compunit.cu_abbrev_offset - debug_displays [abbrev].section.address,
- (unsigned char *) debug_displays [abbrev].section.start
- + debug_displays [abbrev].section.size);
+ if (compunit.cu_abbrev_offset >= debug_displays [abbrev].section.size)
+ warn (_("Debug info is corrupted, abbrev offset is invalid (section is %lu bytes)\n"),
+ (unsigned long)debug_displays [abbrev].section.size);
+ else
+ process_abbrev_section
+ ((unsigned char *) debug_displays [abbrev].section.start
+ + compunit.cu_abbrev_offset - debug_displays [abbrev].section.address,
+ (unsigned char *) debug_displays [abbrev].section.start
+ + debug_displays [abbrev].section.size);
level = 0;
while (tags < start)
@@ -1673,6 +1698,13 @@ process_debug_info (struct dwarf_section *section, void *file,
continue;
}
+ if (!do_loc)
+ printf (_(" <%d><%lx>: Abbrev Number: %lu"),
+ level,
+ (unsigned long) (tags - section_begin
+ - bytes_read),
+ abbrev_number);
+
/* Scan through the abbreviation list until we reach the
correct entry. */
for (entry = first_abbrev;
@@ -1682,18 +1714,18 @@ process_debug_info (struct dwarf_section *section, void *file,
if (entry == NULL)
{
+ if (!do_loc)
+ {
+ printf ("\n");
+ fflush (stdout);
+ }
warn (_("Unable to locate entry %lu in the abbreviation table\n"),
abbrev_number);
return 0;
}
if (!do_loc)
- printf (_(" <%d><%lx>: Abbrev Number: %lu (%s)\n"),
- level,
- (unsigned long) (tags - section_begin
- - bytes_read),
- abbrev_number,
- get_TAG_name (entry->tag));
+ printf (_(" (%s)\n"), get_TAG_name (entry->tag));
switch (entry->tag)
{
@@ -1704,7 +1736,6 @@ process_debug_info (struct dwarf_section *section, void *file,
need_base_address = 1;
break;
case DW_TAG_entry_point:
- case DW_TAG_inlined_subroutine:
case DW_TAG_subprogram:
need_base_address = 0;
/* Assuming that there is no DW_AT_frame_base. */
@@ -1713,14 +1744,20 @@ process_debug_info (struct dwarf_section *section, void *file,
}
for (attr = entry->first_attr; attr; attr = attr->next)
- tags = read_and_display_attr (attr->attribute,
- attr->form,
- tags, cu_offset,
- compunit.cu_pointer_size,
- offset_size,
- compunit.cu_version,
- &debug_information [unit],
- do_loc);
+ {
+ if (! do_loc)
+ /* Show the offset from where the tag was extracted. */
+ printf (" <%2lx>", (unsigned long)(tags - section_begin));
+
+ tags = read_and_display_attr (attr->attribute,
+ attr->form,
+ tags, cu_offset,
+ compunit.cu_pointer_size,
+ offset_size,
+ compunit.cu_version,
+ &debug_information [unit],
+ do_loc);
+ }
if (entry->children)
++level;
@@ -2315,7 +2352,8 @@ display_debug_loc (struct dwarf_section *section, void *file)
error (_("No location lists in .debug_info section!\n"));
/* DWARF sections under Mach-O have non-zero addresses. */
- if (debug_information [first].loc_offsets [0] != section->address)
+ if (debug_information [first].num_loc_offsets > 0
+ && debug_information [first].loc_offsets [0] != section->address)
warn (_("Location lists in %s section start at 0x%lx\n"),
section->name, debug_information [first].loc_offsets [0]);
@@ -2495,7 +2533,6 @@ display_debug_str (struct dwarf_section *section,
return 1;
}
-
static int
display_debug_info (struct dwarf_section *section, void *file)
{
@@ -2519,6 +2556,7 @@ display_debug_aranges (struct dwarf_section *section,
unsigned char *ranges;
unsigned long length;
unsigned long address;
+ unsigned char address_size;
int excess;
int offset_size;
int initial_length_size;
@@ -2565,28 +2603,45 @@ display_debug_aranges (struct dwarf_section *section,
printf (_(" Pointer Size: %d\n"), arange.ar_pointer_size);
printf (_(" Segment Size: %d\n"), arange.ar_segment_size);
- printf (_("\n Address Length\n"));
+ address_size = arange.ar_pointer_size + arange.ar_segment_size;
+
+ /* The DWARF spec does not require that the address size be a power
+ of two, but we do. This will have to change if we ever encounter
+ an uneven architecture. */
+ if ((address_size & (address_size - 1)) != 0)
+ {
+ warn (_("Pointer size + Segment size is not a power of two.\n"));
+ break;
+ }
+
+ if (address_size > 4)
+ printf (_("\n Address Length\n"));
+ else
+ printf (_("\n Address Length\n"));
ranges = hdrptr;
- /* Must pad to an alignment boundary that is twice the pointer size. */
- excess = (hdrptr - start) % (2 * arange.ar_pointer_size);
+ /* Must pad to an alignment boundary that is twice the address size. */
+ excess = (hdrptr - start) % (2 * address_size);
if (excess)
- ranges += (2 * arange.ar_pointer_size) - excess;
+ ranges += (2 * address_size) - excess;
start += arange.ar_length + initial_length_size;
- while (ranges + 2 * arange.ar_pointer_size <= start)
+ while (ranges + 2 * address_size <= start)
{
- address = byte_get (ranges, arange.ar_pointer_size);
+ address = byte_get (ranges, address_size);
- ranges += arange.ar_pointer_size;
+ ranges += address_size;
- length = byte_get (ranges, arange.ar_pointer_size);
+ length = byte_get (ranges, address_size);
- ranges += arange.ar_pointer_size;
+ ranges += address_size;
- printf (" %8.8lx %lu\n", address, length);
+ if (address_size > 4)
+ printf (" 0x%16.16lx 0x%lx\n", address, length);
+ else
+ printf (" 0x%8.8lx 0x%lx\n", address, length);
}
}
@@ -2668,7 +2723,8 @@ display_debug_ranges (struct dwarf_section *section,
error (_("No range lists in .debug_info section!\n"));
/* DWARF sections under Mach-O have non-zero addresses. */
- if (debug_information [first].range_lists [0] != section->address)
+ if (debug_information [first].num_range_lists > 0
+ && debug_information [first].range_lists [0] != section->address)
warn (_("Range lists in %s section start at 0x%lx\n"),
section->name, debug_information [first].range_lists [0]);
@@ -2879,6 +2935,7 @@ static dwarf_vma
get_encoded_value (unsigned char *data, int encoding)
{
int size = size_of_encoded_value (encoding);
+
if (encoding & DW_EH_PE_signed)
return byte_get_signed (data, size);
else
@@ -2927,7 +2984,7 @@ display_debug_frames (struct dwarf_section *section,
{
printf ("\n%08lx ZERO terminator\n\n",
(unsigned long)(saved_start - section_start));
- return 1;
+ continue;
}
if (length == 0xffffffff)
@@ -2944,6 +3001,12 @@ display_debug_frames (struct dwarf_section *section,
}
block_end = saved_start + length + initial_length_size;
+ if (block_end > end)
+ {
+ warn ("Invalid length %#08lx in FDE at %#08lx\n",
+ length, (unsigned long)(saved_start - section_start));
+ block_end = end;
+ }
cie_id = byte_get (start, offset_size); start += offset_size;
if (is_eh ? (cie_id == 0) : (cie_id == DW_CIE_ID))
@@ -3078,9 +3141,8 @@ display_debug_frames (struct dwarf_section *section,
if (!cie)
{
- warn ("Invalid CIE pointer %08lx in FDE at %08lx\n",
+ warn ("Invalid CIE pointer %#08lx in FDE at %#08lx\n",
cie_id, (unsigned long)(saved_start - section_start));
- start = block_end;
fc->ncols = 0;
fc->col_type = xmalloc (sizeof (short int));
fc->col_offset = xmalloc (sizeof (int));
@@ -3584,7 +3646,10 @@ display_debug_frames (struct dwarf_section *section,
break;
default:
- warn (_("unsupported or unknown DW_CFA_%d\n"), op);
+ if (op >= DW_CFA_lo_user && op <= DW_CFA_hi_user)
+ printf (_(" DW_CFA_??? (User defined call frame op: %#x)\n"), op);
+ else
+ warn (_("unsupported or unknown Dwarf Call Frame Instruction number: %#x\n"), op);
start = block_end;
}
}
diff --git a/contrib/binutils/binutils/dwarf.h b/contrib/binutils/binutils/dwarf.h
index 907ac93..6b46742 100644
--- a/contrib/binutils/binutils/dwarf.h
+++ b/contrib/binutils/binutils/dwarf.h
@@ -1,5 +1,5 @@
/* dwwrf.h - DWARF support header file
- Copyright 2005
+ Copyright 2005, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -18,9 +18,6 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
-#include "elf/dwarf2.h"
-
#if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
/* We can't use any bfd types here since readelf may define BFD64 and
objdump may not. */
diff --git a/contrib/binutils/binutils/embedspu.sh b/contrib/binutils/binutils/embedspu.sh
new file mode 100644
index 0000000..6611172
--- /dev/null
+++ b/contrib/binutils/binutils/embedspu.sh
@@ -0,0 +1,257 @@
+#! /bin/sh
+# Embed an SPU ELF executable into a PowerPC object file.
+#
+# Copyright 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Binutils.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+usage ()
+{
+ echo "Usage: embedspu [flags] symbol_name input_filename output_filename"
+ echo
+ echo " input_filename: SPU ELF executable to be embedded"
+ echo " output_filename: Resulting PowerPC object file"
+ echo " symbol_name: Name of program handle struct to be defined"
+ echo " flags: GCC flags defining PowerPC object file format"
+ echo " (e.g. -m32 or -m64)"
+ exit 1
+}
+
+program_transform_name=
+mydir=`dirname "$0"`
+
+find_prog ()
+{
+ prog=`echo $1 | sed "$program_transform_name"`
+ prog="$mydir/$prog"
+ test -x "$prog" && return 0
+ prog="$mydir/$1"
+ test -x "$prog" && return 0
+ prog=`echo $1 | sed "$program_transform_name"`
+ which $prog > /dev/null 2> /dev/null && return 0
+ return 1
+}
+
+SYMBOL=
+INFILE=
+OUTFILE=
+FLAGS=
+
+parse_args ()
+{
+ while test -n "$1"; do
+ case "$1" in
+ -*) FLAGS="${FLAGS} $1" ;;
+ *) if test -z "$SYMBOL"; then
+ SYMBOL="$1"
+ elif test -z "$INFILE"; then
+ INFILE="$1"
+ elif test -z "$OUTFILE"; then
+ OUTFILE="$1"
+ else
+ echo "Too many arguments!"
+ usage
+ fi ;;
+ esac
+ shift
+ done
+ if test -z "$OUTFILE"; then
+ usage
+ fi
+ if test ! -r "$INFILE"; then
+ echo "${INFILE}: File not found"
+ usage
+ fi
+}
+
+main ()
+{
+ parse_args "$@"
+
+ # Find a powerpc gcc. Support running from a combined tree build.
+ if test -x "$mydir/../gcc/xgcc"; then
+ CC="$mydir/../gcc/xgcc -B$mydir/../gcc/"
+ else
+ find_prog gcc
+ if test $? -ne 0; then
+ echo "Cannot find $prog"
+ exit 1
+ fi
+ CC="$prog"
+ fi
+
+ # Find readelf. Any old readelf should do.
+ find_prog readelf
+ if test $? -ne 0; then
+ if which readelf > /dev/null 2> /dev/null; then
+ prog=readelf
+ else
+ echo "Cannot find $prog"
+ exit 1
+ fi
+ fi
+ READELF="$prog"
+
+ # Sanity check the input file
+ if ! ${READELF} -h ${INFILE} | grep 'Class:.*ELF32' >/dev/null 2>/dev/null \
+ || ! ${READELF} -h ${INFILE} | grep 'Type:.*EXEC' >/dev/null 2>/dev/null \
+ || ! ${READELF} -h ${INFILE} | egrep 'Machine:.*(SPU|17)' >/dev/null 2>/dev/null
+ then
+ echo "${INFILE}: Does not appear to be an SPU executable"
+ exit 1
+ fi
+
+ toe=`${READELF} -S ${INFILE} | sed -n -e 's, *\[ *\([0-9]*\)\] *\.toe *[PROGN]*BITS *\([0-9a-f]*\).*,\1 \2,p'`
+ toe_addr=`echo $toe | sed -n -e 's,.* ,,p'`
+ toe=`echo $toe | sed -n -e 's, .*,,p'`
+ # For loaded sections, pick off section number, address, and file offset
+ sections=`${READELF} -S ${INFILE} | sed -n -e 's, *\[ *\([0-9]*\)\] *[^ ]* *PROGBITS *\([0-9a-f]*\) *\([0-9a-f]*\).*,\1 \2 \3,p'`
+ sections=`echo ${sections}`
+ # For relocation sections, pick off file offset and info (points to
+ # section where relocs apply)
+ relas=`${READELF} -S ${INFILE} | sed -n -e 's, *\[ *[0-9]*\] *[^ ]* *RELA *[0-9a-f]* *0*\([0-9a-f][0-9a-f]*\).* \([0-9a-f][0-9a-f]*\) *[0-9a-f][0-9a-f]*$,\1 \2,p'`
+ relas=`echo ${relas}`
+
+ # Build embedded SPU image.
+ # 1. The whole SPU ELF file is written to .rodata.speelf
+ # 2. Symbols starting with the string "_EAR_" in the SPU ELF image are
+ # special. They allow an SPU program to access corresponding symbols
+ # (ie. minus the _EAR_ prefix), in the PowerPC program. _EAR_ without
+ # a suffix is used to refer to the addrress of the SPU image in
+ # PowerPC address space. _EAR_* symbols must all be defined in .toe
+ # at 16 byte intervals, or they must be defined in other non-bss
+ # sections.
+ # Find all _EAR_ symbols in .toe using readelf, sort by address, and
+ # write the address of the corresponding PowerPC symbol in a table
+ # built in .data.spetoe. For _EAE_ symbols not in .toe, create
+ # .reloc commands to relocate their location directly.
+ # 3. Look for R_SPU_PPU32 and R_SPU_PPU64 relocations in the SPU ELF image
+ # and create .reloc commands for them.
+ # 4. Write a struct spe_program_handle to .data.
+ # 5. Write a table of _SPUEAR_ symbols.
+ ${CC} ${FLAGS} -x assembler-with-cpp -nostartfiles -nostdlib \
+ -Wa,-mbig -Wl,-r -Wl,-x -o ${OUTFILE} - <<EOF
+ .section .data.spetoe,"aw",@progbits
+ .p2align 7
+__spetoe__:
+`${READELF} -s -W ${INFILE} | grep ' _EAR_' | sort -k 2 | awk \
+'BEGIN { \
+ addr = strtonum ("0x" "'${toe_addr-0}'"); \
+ split ("'"${sections}"'", s, " "); \
+ for (i = 1; i in s; i += 3) { \
+ sec_off[s[i]] = strtonum ("0x" s[i+2]) - strtonum ("0x" s[i+1]); \
+ } \
+} \
+$7 == "'${toe}'" && strtonum ("0x" $2) != addr { \
+ print "#error Symbol " $8 " not in 16 byte element toe array!"; \
+} \
+$7 == "'${toe}'" { \
+ addr = addr + 16; \
+} \
+$7 == "'${toe}'" { \
+ print "#ifdef _LP64"; \
+ print " .quad " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)) ", 0"; \
+ print "#else"; \
+ print " .int 0, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)) ", 0, 0"; \
+ print "#endif"; \
+} \
+$7 != "'${toe}'" && $7 in sec_off { \
+ print "#ifdef _LP64"; \
+ print " .reloc __speelf__+" strtonum ("0x" $2) + sec_off[$7] ", R_PPC64_ADDR64, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)); \
+ print "#else"; \
+ print " .reloc __speelf__+" strtonum ("0x" $2) + sec_off[$7] + 4 ", R_PPC_ADDR32, " ($8 == "_EAR_" ? "__speelf__" : substr($8, 6)); \
+ print "#endif"; \
+ if (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \
+} \
+$7 != "'${toe}'" && ! $7 in sec_off { \
+ print "#error Section not found for " $8; \
+} \
+'`
+`test -z "${relas}" || ${READELF} -r -W ${INFILE} | awk \
+'BEGIN { \
+ split ("'"${sections}"'", s, " "); \
+ for (i = 1; i in s; i += 3) { \
+ sec_off[s[i]] = strtonum ("0x" s[i+2]) - strtonum ("0x" s[i+1]); \
+ } \
+ split ("'"${relas}"'", s, " "); \
+ for (i = 1; i in s; i += 2) { \
+ rela[s[i]] = strtonum (s[i+1]); \
+ } \
+} \
+/^Relocation section/ { \
+ sec = substr($6, 3); \
+} \
+$3 ~ /R_SPU_PPU/ { \
+ print "#ifdef _LP64"; \
+ print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] ", R_PPC64_ADDR" substr($3, 10) ", " ($5 != "" ? $5 "+0x" $7 : "__speelf__ + 0x" $4); \
+ print "#else"; \
+ print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] + (substr($3, 10) == "64" ? 4 : 0)", R_PPC_ADDR32, " ($5 != "" ? $5 "+0x" $7 : "__speelf__ + 0x" $4); \
+ print "#endif"; \
+ if (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \
+} \
+$3 ~ /unrecognized:/ { \
+ print "#ifdef _LP64"; \
+ print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] ", R_PPC64_ADDR" ($4 == "f" ? "64" : "32") ", " ($6 != "" ? $6 "+0x" $8 : "__speelf__ + 0x" $5); \
+ print "#else"; \
+ print " .reloc __speelf__+" strtonum ("0x" $1) + sec_off[rela[sec]] + ($4 == "f" ? 4 : 0)", R_PPC_ADDR32, " ($6 != "" ? $6 "+0x" $8 : "__speelf__ + 0x" $5); \
+ print "#endif"; \
+ if (!donedef) { print "#define HAS_RELOCS 1"; donedef = 1; }; \
+} \
+'`
+#if defined (HAS_RELOCS) && (defined (__PIC__) || defined (__PIE__))
+ .section .data.rel.ro.speelf,"a",@progbits
+#else
+ .section .rodata.speelf,"a",@progbits
+#endif
+ .p2align 7
+__speelf__:
+ .incbin "${INFILE}"
+
+ .section .data,"aw",@progbits
+ .globl ${SYMBOL}
+ .type ${SYMBOL}, @object
+# fill in a struct spe_program_handle
+#ifdef _LP64
+ .p2align 3
+${SYMBOL}:
+ .int 24
+ .int 0
+ .quad __speelf__
+ .quad __spetoe__
+#else
+ .p2align 2
+${SYMBOL}:
+ .int 12
+ .int __speelf__
+ .int __spetoe__
+#endif
+ .size ${SYMBOL}, . - ${SYMBOL}
+
+`${READELF} -s -W ${INFILE} | grep ' _SPUEAR_' | sort -k 2 | awk \
+'{ \
+ print " .globl '${SYMBOL}'_" substr($8, 9); \
+ print " .type '${SYMBOL}'_" substr($8, 9) ", @object"; \
+ print " .size '${SYMBOL}'_" substr($8, 9) ", 4"; \
+ print "'${SYMBOL}'_" substr($8, 9) ":"; \
+ print " .int 0x" $2; \
+} \
+'`
+EOF
+}
+
+main "$@"
diff --git a/contrib/binutils/binutils/filemode.c b/contrib/binutils/binutils/filemode.c
index 78578c8..9c44709 100644
--- a/contrib/binutils/binutils/filemode.c
+++ b/contrib/binutils/binutils/filemode.c
@@ -1,6 +1,6 @@
/* filemode.c -- make a string describing file modes
- Copyright 1985, 1990, 1991, 1994, 1995, 1997, 1999, 2002, 2003, 2005
- Free Software Foundation, Inc.
+ Copyright 1985, 1990, 1991, 1994, 1995, 1997, 1999, 2002, 2003, 2005,
+ 2007 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,6 +17,7 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
diff --git a/contrib/binutils/binutils/ieee.c b/contrib/binutils/binutils/ieee.c
index 98ec30d..987420b 100644
--- a/contrib/binutils/binutils/ieee.c
+++ b/contrib/binutils/binutils/ieee.c
@@ -1,5 +1,5 @@
/* ieee.c -- Read and write IEEE-695 debugging information.
- Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006
+ Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -22,12 +22,10 @@
/* This file reads and writes IEEE-695 debugging information. */
-#include <stdio.h>
+#include "sysdep.h"
#include <assert.h>
-
#include "bfd.h"
#include "ieee.h"
-#include "bucomm.h"
#include "libiberty.h"
#include "debug.h"
#include "budbg.h"
diff --git a/contrib/binutils/binutils/mclex.c b/contrib/binutils/binutils/mclex.c
new file mode 100644
index 0000000..f6cedd9
--- /dev/null
+++ b/contrib/binutils/binutils/mclex.c
@@ -0,0 +1,441 @@
+/* mclex.c -- lexer for Windows mc files parser.
+ Copyright 2007
+ Free Software Foundation, Inc.
+
+ Written by Kai Tietz, Onevision.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* This is a lexer used by the Windows rc file parser.
+ It basically just recognized a bunch of keywords. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bucomm.h"
+#include "libiberty.h"
+#include "safe-ctype.h"
+#include "windmc.h"
+#include "mcparse.h"
+
+#include <assert.h>
+
+/* Exported globals. */
+bfd_boolean mclex_want_nl = FALSE;
+bfd_boolean mclex_want_line = FALSE;
+bfd_boolean mclex_want_filename = FALSE;
+
+/* Local globals. */
+static unichar *input_stream = NULL;
+static unichar *input_stream_pos = NULL;
+static int input_line = 1;
+static const char *input_filename = NULL;
+
+void
+mc_set_content (const unichar *src)
+{
+ if (!src)
+ return;
+ input_stream = input_stream_pos = unichar_dup (src);
+}
+
+void
+mc_set_inputfile (const char *name)
+{
+ if (! name || *name == 0)
+ input_filename = "-";
+ else
+ {
+ const char *s1 = strrchr (name, '/');
+ const char *s2 = strrchr (name, '\\');
+
+ if (! s1)
+ s1 = s2;
+ if (s1 && s2 && s1 < s2)
+ s1 = s2;
+ if (! s1)
+ s1 = name;
+ else
+ s1++;
+ s1 = xstrdup (s1);
+ input_filename = s1;
+ }
+}
+
+static void
+show_msg (const char *kind, const char *msg, va_list argp)
+{
+ fprintf (stderr, "In %s at line %d: %s: ", input_filename, input_line, kind);
+ vfprintf (stderr, msg, argp);
+ fprintf (stderr, ".\n");
+}
+
+void
+mc_warn (const char *s, ...)
+{
+ va_list argp;
+ va_start (argp, s);
+ show_msg ("warning", s, argp);
+ va_end (argp);
+}
+
+void
+mc_fatal (const char *s, ...)
+{
+ va_list argp;
+ va_start (argp, s);
+ show_msg ("fatal", s, argp);
+ va_end (argp);
+ xexit (1);
+}
+
+
+int
+yyerror (const char *s, ...)
+{
+ va_list argp;
+ va_start (argp, s);
+ show_msg ("parser", s, argp);
+ va_end (argp);
+ return 1;
+}
+
+static unichar *
+get_diff (unichar *end, unichar *start)
+{
+ unichar *ret;
+ unichar save = *end;
+
+ *end = 0;
+ ret = unichar_dup (start);
+ *end = save;
+ return ret;
+}
+
+static rc_uint_type
+parse_digit (unichar ch)
+{
+ rc_uint_type base = 10, v = 0, c;
+
+ if (ch == '0')
+ {
+ base = 8;
+ switch (input_stream_pos[0])
+ {
+ case 'x': case 'X': base = 16; input_stream_pos++; break;
+ case 'o': case 'O': base = 8; input_stream_pos++; break;
+ case 'b': case 'B': base = 2; input_stream_pos++; break;
+ }
+ }
+ else
+ v = (rc_uint_type) (ch - '0');
+
+ while ((ch = input_stream_pos[0]) != 0)
+ {
+ if (ch >= 'A' && ch <= 'F')
+ c = (rc_uint_type) (ch - 'A') + 10;
+ else if (ch >= 'a' && ch <= 'f')
+ c = (rc_uint_type) (ch - 'a') + 10;
+ else if (ch >= '0' && ch <= '9')
+ c = (rc_uint_type) (ch - '0');
+ else
+ break;
+ v *= base;
+ v += c;
+ ++input_stream_pos;
+ }
+ if (input_stream_pos[0] == 'U' || input_stream_pos[0] == 'u')
+ input_stream_pos++;
+ if (input_stream_pos[0] == 'L' || input_stream_pos[0] == 'l')
+ input_stream_pos++;
+ if (input_stream_pos[0] == 'L' || input_stream_pos[0] == 'l')
+ input_stream_pos++;
+ return v;
+}
+
+static mc_keyword *keyword_top = NULL;
+
+const mc_keyword *
+enum_facility (int e)
+{
+ mc_keyword *h = keyword_top;
+
+ while (h != NULL)
+ {
+ while (h && strcmp (h->group_name, "facility") != 0)
+ h = h->next;
+ if (e == 0)
+ return h;
+ --e;
+ if (h)
+ h = h->next;
+ }
+ return h;
+}
+
+const mc_keyword *
+enum_severity (int e)
+{
+ mc_keyword *h = keyword_top;
+
+ while (h != NULL)
+ {
+ while (h && strcmp (h->group_name, "severity") != 0)
+ h = h->next;
+ if (e == 0)
+ return h;
+ --e;
+ if (h)
+ h = h->next;
+ }
+ return h;
+}
+
+static void
+mc_add_keyword_ascii (const char *sz, int rid, const char *grp, rc_uint_type nv, const char *sv)
+{
+ unichar *usz, *usv = NULL;
+ rc_uint_type usz_len;
+
+ unicode_from_codepage (&usz_len, &usz, sz, CP_ACP);
+ if (sv)
+ unicode_from_codepage (&usz_len, &usv, sv, CP_ACP);
+ mc_add_keyword (usz, rid, grp, nv, usv);
+}
+
+void
+mc_add_keyword (unichar *usz, int rid, const char *grp, rc_uint_type nv, unichar *sv)
+{
+ mc_keyword *p, *c, *n;
+ size_t len = unichar_len (usz);
+
+ c = keyword_top;
+ p = NULL;
+ while (c != NULL)
+ {
+ if (c->len > len)
+ break;
+ if (c->len == len)
+ {
+ int e = memcmp (usz, c->usz, len * sizeof (unichar));
+
+ if (e < 0)
+ break;
+ if (! e)
+ {
+ if (! strcmp (grp, "keyword") || strcmp (c->group_name, grp) != 0)
+ fatal (_("Duplicate symbol entered into keyword list."));
+ c->rid = rid;
+ c->nval = nv;
+ c->sval = (!sv ? NULL : unichar_dup (sv));
+ if (! strcmp (grp, "language"))
+ {
+ const wind_language_t *lag = wind_find_language_by_id ((unsigned) nv);
+
+ if (lag == NULL)
+ fatal ("Language ident 0x%lx is not resolvable.\n", (long) nv);
+ memcpy (&c->lang_info, lag, sizeof (*lag));
+ }
+ return;
+ }
+ }
+ c = (p = c)->next;
+ }
+ n = xmalloc (sizeof (mc_keyword));
+ n->next = c;
+ n->len = len;
+ n->group_name = grp;
+ n->usz = usz;
+ n->rid = rid;
+ n->nval = nv;
+ n->sval = (!sv ? NULL : unichar_dup (sv));
+ if (! strcmp (grp, "language"))
+ {
+ const wind_language_t *lag = wind_find_language_by_id ((unsigned) nv);
+ if (lag == NULL)
+ fatal ("Language ident 0x%lx is not resolvable.\n", (long) nv);
+ memcpy (&n->lang_info, lag, sizeof (*lag));
+ }
+ if (! p)
+ keyword_top = n;
+ else
+ p->next = n;
+}
+
+static int
+mc_token (const unichar *t, size_t len)
+{
+ static int was_init = 0;
+ mc_keyword *k;
+
+ if (! was_init)
+ {
+ was_init = 1;
+ mc_add_keyword_ascii ("OutputBase", MCOUTPUTBASE, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("MessageIdTypedef", MCMESSAGEIDTYPEDEF, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("SeverityNames", MCSEVERITYNAMES, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("FacilityNames", MCFACILITYNAMES, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("LanguageNames", MCLANGUAGENAMES, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("MessageId", MCMESSAGEID, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("Severity", MCSEVERITY, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("Facility", MCFACILITY, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("SymbolicName", MCSYMBOLICNAME, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("Language", MCLANGUAGE, "keyword", 0, NULL);
+ mc_add_keyword_ascii ("Success", MCTOKEN, "severity", 0, NULL);
+ mc_add_keyword_ascii ("Informational", MCTOKEN, "severity", 1, NULL);
+ mc_add_keyword_ascii ("Warning", MCTOKEN, "severity", 2, NULL);
+ mc_add_keyword_ascii ("Error", MCTOKEN, "severity", 3, NULL);
+ mc_add_keyword_ascii ("System", MCTOKEN, "facility", 0xff, NULL);
+ mc_add_keyword_ascii ("Application", MCTOKEN, "facility", 0xfff, NULL);
+ mc_add_keyword_ascii ("English", MCTOKEN, "language", 0x409, "MSG00001");
+ }
+ k = keyword_top;
+ if (!len || !t || *t == 0)
+ return -1;
+ while (k != NULL)
+ {
+ if (k->len > len)
+ break;
+ if (k->len == len)
+ {
+ if (! memcmp (k->usz, t, len * sizeof (unichar)))
+ {
+ if (k->rid == MCTOKEN)
+ yylval.tok = k;
+ return k->rid;
+ }
+ }
+ k = k->next;
+ }
+ return -1;
+}
+
+int
+yylex (void)
+{
+ unichar *start_token;
+ unichar ch;
+
+ if (! input_stream_pos)
+ {
+ fatal ("Input stream not setuped.\n");
+ return -1;
+ }
+ if (mclex_want_line)
+ {
+ start_token = input_stream_pos;
+ if (input_stream_pos[0] == '.'
+ && (input_stream_pos[1] == '\n'
+ || (input_stream_pos[1] == '\r' && input_stream_pos[2] == '\n')))
+ {
+ mclex_want_line = FALSE;
+ while (input_stream_pos[0] != 0 && input_stream_pos[0] != '\n')
+ ++input_stream_pos;
+ if (input_stream_pos[0] == '\n')
+ ++input_stream_pos;
+ return MCENDLINE;
+ }
+ while (input_stream_pos[0] != 0 && input_stream_pos[0] != '\n')
+ ++input_stream_pos;
+ if (input_stream_pos[0] == '\n')
+ ++input_stream_pos;
+ yylval.ustr = get_diff (input_stream_pos, start_token);
+ return MCLINE;
+ }
+ while ((ch = input_stream_pos[0]) <= 0x20)
+ {
+ if (ch == 0)
+ return -1;
+ ++input_stream_pos;
+ if (ch == '\n')
+ input_line += 1;
+ if (mclex_want_nl && ch == '\n')
+ {
+ mclex_want_nl = FALSE;
+ return NL;
+ }
+ }
+ start_token = input_stream_pos;
+ ++input_stream_pos;
+ if (mclex_want_filename)
+ {
+ mclex_want_filename = FALSE;
+ if (ch == '"')
+ {
+ start_token++;
+ while ((ch = input_stream_pos[0]) != 0)
+ {
+ if (ch == '"')
+ break;
+ ++input_stream_pos;
+ }
+ yylval.ustr = get_diff (input_stream_pos, start_token);
+ if (ch == '"')
+ ++input_stream_pos;
+ }
+ else
+ {
+ while ((ch = input_stream_pos[0]) != 0)
+ {
+ if (ch <= 0x20 || ch == ')')
+ break;
+ ++input_stream_pos;
+ }
+ yylval.ustr = get_diff (input_stream_pos, start_token);
+ }
+ return MCFILENAME;
+ }
+ switch (ch)
+ {
+ case ';':
+ ++start_token;
+ while (input_stream_pos[0] != '\n' && input_stream_pos[0] != 0)
+ ++input_stream_pos;
+ if (input_stream_pos[0] == '\n')
+ input_stream_pos++;
+ yylval.ustr = get_diff (input_stream_pos, start_token);
+ return MCCOMMENT;
+ case '=':
+ return '=';
+ case '(':
+ return '(';
+ case ')':
+ return ')';
+ case '+':
+ return '+';
+ case ':':
+ return ':';
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ yylval.ival = parse_digit (ch);
+ return MCNUMBER;
+ default:
+ if (ch >= 0x40)
+ {
+ int ret;
+ while (input_stream_pos[0] >= 0x40 || (input_stream_pos[0] >= '0' && input_stream_pos[0] <= '9'))
+ ++input_stream_pos;
+ ret = mc_token (start_token, (size_t) (input_stream_pos - start_token));
+ if (ret != -1)
+ return ret;
+ yylval.ustr = get_diff (input_stream_pos, start_token);
+ return MCIDENT;
+ }
+ yyerror ("illegal character 0x%x.", ch);
+ }
+ return -1;
+}
diff --git a/contrib/binutils/binutils/mcparse.y b/contrib/binutils/binutils/mcparse.y
new file mode 100644
index 0000000..9aaba9b
--- /dev/null
+++ b/contrib/binutils/binutils/mcparse.y
@@ -0,0 +1,356 @@
+%{ /* mcparse.y -- parser for Windows mc files
+ Copyright 2007
+ Free Software Foundation, Inc.
+
+ Parser for Windows mc files
+ Written by Kai Tietz, Onevision.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* This is a parser for Windows rc files. It is based on the parser
+ by Gunther Ebert <gunther.ebert@ixos-leipzig.de>. */
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bucomm.h"
+#include "libiberty.h"
+#include "windmc.h"
+#include "safe-ctype.h"
+
+static rc_uint_type mc_last_id = 0;
+static rc_uint_type mc_sefa_val = 0;
+static unichar *mc_last_symbol = NULL;
+static const mc_keyword *mc_cur_severity = NULL;
+static const mc_keyword *mc_cur_facility = NULL;
+static mc_node *cur_node = NULL;
+
+%}
+
+%union
+{
+ rc_uint_type ival;
+ unichar *ustr;
+ const mc_keyword *tok;
+ mc_node *nod;
+};
+
+%start input
+
+%token NL
+%token<ustr> MCIDENT MCFILENAME MCLINE MCCOMMENT
+%token<tok> MCTOKEN
+%token MCENDLINE
+%token MCLANGUAGENAMES MCFACILITYNAMES MCSEVERITYNAMES MCOUTPUTBASE MCMESSAGEIDTYPEDEF
+%token MCLANGUAGE MCMESSAGEID MCSEVERITY MCFACILITY MCSYMBOLICNAME
+%token <ival> MCNUMBER
+
+%type<ival> id vid sefasy_def
+%type<ustr> alias_name token lines comments
+%type<tok> lang
+
+%%
+input: entities
+ ;
+
+entities:
+ /* empty */
+ | entities entity
+ ;
+entity: global_section
+ | message
+ | comments
+ {
+ cur_node = mc_add_node ();
+ cur_node->user_text = $1;
+ }
+ | error { mc_fatal ("syntax error"); }
+;
+
+global_section:
+ MCSEVERITYNAMES '=' '(' severitymaps ')'
+ | MCSEVERITYNAMES '=' '(' severitymaps error { mc_fatal ("missing ')' in SeverityNames"); }
+ | MCSEVERITYNAMES '=' error { mc_fatal ("missing '(' in SeverityNames"); }
+ | MCSEVERITYNAMES error { mc_fatal ("missing '=' for SeverityNames"); }
+ | MCLANGUAGENAMES '=' '(' langmaps ')'
+ | MCLANGUAGENAMES '=' '(' langmaps error { mc_fatal ("missing ')' in LanguageNames"); }
+ | MCLANGUAGENAMES '=' error { mc_fatal ("missing '(' in LanguageNames"); }
+ | MCLANGUAGENAMES error { mc_fatal ("missing '=' for LanguageNames"); }
+ | MCFACILITYNAMES '=' '(' facilitymaps ')'
+ | MCFACILITYNAMES '=' '(' facilitymaps error { mc_fatal ("missing ')' in FacilityNames"); }
+ | MCFACILITYNAMES '=' error { mc_fatal ("missing '(' in FacilityNames"); }
+ | MCFACILITYNAMES error { mc_fatal ("missing '=' for FacilityNames"); }
+ | MCOUTPUTBASE '=' MCNUMBER
+ {
+ if ($3 != 10 && $3 != 16)
+ mc_fatal ("OutputBase allows 10 or 16 as value");
+ mcset_out_values_are_decimal = ($3 == 10 ? 1 : 0);
+ }
+ | MCMESSAGEIDTYPEDEF '=' MCIDENT
+ {
+ mcset_msg_id_typedef = $3;
+ }
+ | MCMESSAGEIDTYPEDEF '=' error
+ {
+ mc_fatal ("MessageIdTypedef expects an identifier");
+ }
+ | MCMESSAGEIDTYPEDEF error
+ {
+ mc_fatal ("missing '=' for MessageIdTypedef");
+ }
+;
+
+severitymaps:
+ severitymap
+ | severitymaps severitymap
+ | error { mc_fatal ("severity ident missing"); }
+;
+
+severitymap:
+ token '=' MCNUMBER alias_name
+ {
+ mc_add_keyword ($1, MCTOKEN, "severity", $3, $4);
+ }
+ | token '=' error { mc_fatal ("severity number missing"); }
+ | token error { mc_fatal ("severity missing '='"); }
+;
+
+facilitymaps:
+ facilitymap
+ | facilitymaps facilitymap
+ | error { mc_fatal ("missing ident in FacilityNames"); }
+;
+
+facilitymap:
+ token '=' MCNUMBER alias_name
+ {
+ mc_add_keyword ($1, MCTOKEN, "facility", $3, $4);
+ }
+ | token '=' error { mc_fatal ("facility number missing"); }
+ | token error { mc_fatal ("facility missing '='"); }
+;
+
+langmaps:
+ langmap
+ | langmaps langmap
+ | error { mc_fatal ("missing ident in LanguageNames"); }
+;
+
+langmap:
+ token '=' MCNUMBER lex_want_filename ':' MCFILENAME
+ {
+ mc_add_keyword ($1, MCTOKEN, "language", $3, $6);
+ }
+ | token '=' MCNUMBER lex_want_filename ':' error { mc_fatal ("missing filename in LanguageNames"); }
+ | token '=' MCNUMBER error { mc_fatal ("missing ':' in LanguageNames"); }
+ | token '=' error { mc_fatal ("missing language code in LanguageNames"); }
+ | token error { mc_fatal ("missing '=' for LanguageNames"); }
+;
+
+alias_name:
+ /* empty */
+ {
+ $$ = NULL;
+ }
+ | ':' MCIDENT
+ {
+ $$ = $2;
+ }
+ | ':' error { mc_fatal ("illegal token in identifier"); $$ = NULL; }
+;
+
+message:
+ id sefasy_def
+ {
+ cur_node = mc_add_node ();
+ cur_node->symbol = mc_last_symbol;
+ cur_node->facility = mc_cur_facility;
+ cur_node->severity = mc_cur_severity;
+ cur_node->id = ($1 & 0xffffUL);
+ cur_node->vid = ($1 & 0xffffUL) | mc_sefa_val;
+ mc_last_id = $1;
+ }
+ lang_entities
+;
+
+id: MCMESSAGEID '=' vid { $$ = $3; }
+ | MCMESSAGEID '=' error { mc_fatal ("missing number in MessageId"); $$ = 0; }
+ | MCMESSAGEID error { mc_fatal ("missing '=' for MessageId"); $$ = 0; }
+;
+
+vid: /* empty */
+ {
+ $$ = ++mc_last_id;
+ }
+ | MCNUMBER
+ {
+ $$ = $1;
+ }
+ | '+' MCNUMBER
+ {
+ $$ = mc_last_id + $2;
+ }
+ | '+' error { mc_fatal ("missing number after MessageId '+'"); }
+;
+
+sefasy_def:
+ /* empty */
+ {
+ $$ = 0;
+ mc_sefa_val = (mcset_custom_bit ? 1 : 0) << 29;
+ mc_last_symbol = NULL;
+ mc_cur_severity = NULL;
+ mc_cur_facility = NULL;
+ }
+ | sefasy_def severity
+ {
+ if ($1 & 1)
+ mc_warn (_("duplicate definition of Severity"));
+ $$ = $1 | 1;
+ }
+ | sefasy_def facility
+ {
+ if ($1 & 2)
+ mc_warn (_("duplicate definition of Facility"));
+ $$ = $1 | 2;
+ }
+ | sefasy_def symbol
+ {
+ if ($1 & 4)
+ mc_warn (_("duplicate definition of SymbolicName"));
+ $$ = $1 | 4;
+ }
+;
+
+severity: MCSEVERITY '=' MCTOKEN
+ {
+ mc_sefa_val &= ~ (0x3UL << 30);
+ mc_sefa_val |= (($3->nval & 0x3UL) << 30);
+ mc_cur_severity = $3;
+ }
+;
+
+facility: MCFACILITY '=' MCTOKEN
+ {
+ mc_sefa_val &= ~ (0xfffUL << 16);
+ mc_sefa_val |= (($3->nval & 0xfffUL) << 16);
+ mc_cur_facility = $3;
+ }
+;
+
+symbol: MCSYMBOLICNAME '=' MCIDENT
+ {
+ mc_last_symbol = $3;
+ }
+;
+
+lang_entities:
+ lang_entity
+ | lang_entities lang_entity
+;
+
+lang_entity:
+ lang lex_want_line lines MCENDLINE
+ {
+ mc_node_lang *h;
+ h = mc_add_node_lang (cur_node, $1, cur_node->vid);
+ h->message = $3;
+ if (mcset_max_message_length != 0 && unichar_len (h->message) > mcset_max_message_length)
+ mc_warn ("message length to long");
+ }
+;
+
+lines: MCLINE
+ {
+ $$ = $1;
+ }
+ | lines MCLINE
+ {
+ unichar *h;
+ rc_uint_type l1,l2;
+ l1 = unichar_len ($1);
+ l2 = unichar_len ($2);
+ h = (unichar *) res_alloc ((l1 + l2 + 1) * sizeof (unichar));
+ if (l1) memcpy (h, $1, l1 * sizeof (unichar));
+ if (l2) memcpy (&h[l1], $2, l2 * sizeof (unichar));
+ h[l1 + l2] = 0;
+ $$ = h;
+ }
+ | error { mc_fatal ("missing end of message text"); $$ = NULL; }
+ | lines error { mc_fatal ("missing end of message text"); $$ = $1; }
+;
+
+comments: MCCOMMENT { $$ = $1; }
+ | comments MCCOMMENT
+ {
+ unichar *h;
+ rc_uint_type l1,l2;
+ l1 = unichar_len ($1);
+ l2 = unichar_len ($2);
+ h = (unichar *) res_alloc ((l1 + l2 + 1) * sizeof (unichar));
+ if (l1) memcpy (h, $1, l1 * sizeof (unichar));
+ if (l2) memcpy (&h[l1], $2, l2 * sizeof (unichar));
+ h[l1 + l2] = 0;
+ $$ = h;
+ }
+;
+
+lang: MCLANGUAGE lex_want_nl '=' MCTOKEN NL
+ {
+ $$ = $4;
+ }
+ | MCLANGUAGE lex_want_nl '=' MCIDENT NL
+ {
+ $$ = NULL;
+ mc_fatal (_("undeclared language identifier"));
+ }
+ | MCLANGUAGE lex_want_nl '=' token error
+ {
+ $$ = NULL;
+ mc_fatal ("missing newline after Language");
+ }
+ | MCLANGUAGE lex_want_nl '=' error
+ {
+ $$ = NULL;
+ mc_fatal ("missing ident for Language");
+ }
+ | MCLANGUAGE error
+ {
+ $$ = NULL;
+ mc_fatal ("missing '=' for Language");
+ }
+;
+
+token: MCIDENT { $$ = $1; }
+ | MCTOKEN { $$ = $1->usz; }
+;
+
+lex_want_nl:
+ /* Empty */ { mclex_want_nl = 1; }
+;
+
+lex_want_line:
+ /* Empty */ { mclex_want_line = 1; }
+;
+
+lex_want_filename:
+ /* Empty */ { mclex_want_filename = 1; }
+;
+
+%%
+
+/* Something else. */
diff --git a/contrib/binutils/binutils/nm.c b/contrib/binutils/binutils/nm.c
index c1fb4d8..62328a4 100644
--- a/contrib/binutils/binutils/nm.c
+++ b/contrib/binutils/binutils/nm.c
@@ -1,6 +1,6 @@
/* nm.c -- Describe symbol table of a rel file.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005
+ 2001, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -20,10 +20,9 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
#include "progress.h"
-#include "bucomm.h"
-#include "budemang.h"
#include "getopt.h"
#include "aout/stab_gnu.h"
#include "aout/ranlib.h"
@@ -31,6 +30,7 @@
#include "libiberty.h"
#include "elf-bfd.h"
#include "elf/common.h"
+#include "bucomm.h"
/* When sorting by size, we use this structure to hold the size and a
pointer to the minisymbol. */
@@ -159,20 +159,9 @@ static int filename_per_file = 0; /* Once per file, on its own line. */
static int filename_per_symbol = 0; /* Once per symbol, at start of line. */
/* Print formats for printing a symbol value. */
-#ifndef BFD64
-static char value_format[] = "%08lx";
-#else
-#if BFD_HOST_64BIT_LONG
-static char value_format[] = "%016lx";
-#else
-/* We don't use value_format for this case. */
-#endif
-#endif
-#ifdef BFD64
-static int print_width = 16;
-#else
-static int print_width = 8;
-#endif
+static char value_format_32bit[] = "%08lx";
+static char value_format_64bit[] = "%016lx";
+static int print_width = 0;
static int print_radix = 16;
/* Print formats for printing stab info. */
static char other_format[] = "%02x";
@@ -259,7 +248,7 @@ usage (FILE *stream, int status)
-V, --version Display this program's version number\n\
\n"));
list_supported_targets (program_name, stream);
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -279,16 +268,8 @@ set_print_radix (char *radix)
print_radix = 10;
else
print_radix = 8;
-#ifndef BFD64
- value_format[4] = *radix;
-#else
-#if BFD_HOST_64BIT_LONG
- value_format[5] = *radix;
-#else
- /* This case requires special handling for octal and decimal
- printing. */
-#endif
-#endif
+ value_format_32bit[4] = *radix;
+ value_format_64bit[5] = *radix;
other_format[3] = desc_format[3] = *radix;
break;
default:
@@ -354,11 +335,14 @@ print_symname (const char *format, const char *name, bfd *abfd)
{
if (do_demangle && *name)
{
- char *res = demangle (abfd, name);
+ char *res = bfd_demangle (abfd, name, DMGL_ANSI | DMGL_PARAMS);
- printf (format, res);
- free (res);
- return;
+ if (res != NULL)
+ {
+ printf (format, res);
+ free (res);
+ return;
+ }
}
printf (format, name);
@@ -1094,6 +1078,26 @@ display_rel_file (bfd *abfd, bfd *archive_bfd)
}
static void
+set_print_width (bfd *file)
+{
+ print_width = bfd_get_arch_size (file);
+
+ if (print_width == -1)
+ {
+ /* PR binutils/4292
+ Guess the target's bitsize based on its name.
+ We assume here than any 64-bit format will include
+ "64" somewhere in its name. The only known exception
+ is the MMO object file format. */
+ if (strstr (bfd_get_target (file), "64") != NULL
+ || strcmp (bfd_get_target (file), "mmo") == 0)
+ print_width = 64;
+ else
+ print_width = 32;
+ }
+}
+
+static void
display_archive (bfd *file)
{
bfd *arfile = NULL;
@@ -1120,10 +1124,7 @@ display_archive (bfd *file)
if (bfd_check_format_matches (arfile, bfd_object, &matching))
{
- char buf[30];
-
- bfd_sprintf_vma (arfile, buf, (bfd_vma) -1);
- print_width = strlen (buf);
+ set_print_width (arfile);
format->print_archive_member (bfd_get_filename (file),
bfd_get_filename (arfile));
display_rel_file (arfile, file);
@@ -1178,10 +1179,7 @@ display_file (char *filename)
}
else if (bfd_check_format_matches (file, bfd_object, &matching))
{
- char buf[30];
-
- bfd_sprintf_vma (file, buf, (bfd_vma) -1);
- print_width = strlen (buf);
+ set_print_width (file);
format->print_object_filename (filename);
display_rel_file (file, NULL);
}
@@ -1227,7 +1225,7 @@ print_object_filename_sysv (char *filename)
printf (_("\n\nUndefined symbols from %s:\n\n"), filename);
else
printf (_("\n\nSymbols from %s:\n\n"), filename);
- if (print_width == 8)
+ if (print_width == 32)
printf (_("\
Name Value Class Type Size Line Section\n\n"));
else
@@ -1278,7 +1276,7 @@ print_archive_member_sysv (char *archive, const char *filename)
printf (_("\n\nUndefined symbols from %s[%s]:\n\n"), archive, filename);
else
printf (_("\n\nSymbols from %s[%s]:\n\n"), archive, filename);
- if (print_width == 8)
+ if (print_width == 32)
printf (_("\
Name Value Class Type Size Line Section\n\n"));
else
@@ -1336,29 +1334,42 @@ print_symbol_filename_posix (bfd *archive_bfd, bfd *abfd)
static void
print_value (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma val)
{
-#if ! defined (BFD64) || BFD_HOST_64BIT_LONG
- printf (value_format, val);
-#else
- /* We have a 64 bit value to print, but the host is only 32 bit. */
- if (print_radix == 16)
- bfd_fprintf_vma (abfd, stdout, val);
- else
+ switch (print_width)
{
- char buf[30];
- char *s;
+ case 32:
+ printf (value_format_32bit, (unsigned long) val);
+ break;
- s = buf + sizeof buf;
- *--s = '\0';
- while (val > 0)
+ case 64:
+#if BFD_HOST_64BIT_LONG
+ printf (value_format_64bit, val);
+#else
+ /* We have a 64 bit value to print, but the host is only 32 bit. */
+ if (print_radix == 16)
+ bfd_fprintf_vma (abfd, stdout, val);
+ else
{
- *--s = (val % print_radix) + '0';
- val /= print_radix;
+ char buf[30];
+ char *s;
+
+ s = buf + sizeof buf;
+ *--s = '\0';
+ while (val > 0)
+ {
+ *--s = (val % print_radix) + '0';
+ val /= print_radix;
+ }
+ while ((buf + sizeof buf - 1) - s < 16)
+ *--s = '0';
+ printf ("%s", s);
}
- while ((buf + sizeof buf - 1) - s < 16)
- *--s = '0';
- printf ("%s", s);
- }
#endif
+ break;
+
+ default:
+ fatal (_("Print width has not been initialized (%d)"), print_width);
+ break;
+ }
}
/* Print a line of information about a symbol. */
@@ -1368,7 +1379,7 @@ print_symbol_info_bsd (struct extended_symbol_info *info, bfd *abfd)
{
if (bfd_is_undefined_symclass (SYM_TYPE (info)))
{
- if (print_width == 16)
+ if (print_width == 64)
printf (" ");
printf (" ");
}
@@ -1411,7 +1422,7 @@ print_symbol_info_sysv (struct extended_symbol_info *info, bfd *abfd)
if (bfd_is_undefined_symclass (SYM_TYPE (info)))
{
- if (print_width == 8)
+ if (print_width == 32)
printf (" ");
else
printf (" ");
@@ -1441,7 +1452,7 @@ print_symbol_info_sysv (struct extended_symbol_info *info, bfd *abfd)
print_value (abfd, SYM_SIZE (info));
else
{
- if (print_width == 8)
+ if (print_width == 32)
printf (" ");
else
printf (" ");
diff --git a/contrib/binutils/binutils/objcopy.c b/contrib/binutils/binutils/objcopy.c
index 0e0cfaa..06e2946 100644
--- a/contrib/binutils/binutils/objcopy.c
+++ b/contrib/binutils/binutils/objcopy.c
@@ -1,6 +1,6 @@
/* objcopy.c -- copy object file from input to output, optionally massaging it.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -20,11 +20,12 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
#include "progress.h"
-#include "bucomm.h"
#include "getopt.h"
#include "libiberty.h"
+#include "bucomm.h"
#include "budbg.h"
#include "filenames.h"
#include "fnmatch.h"
@@ -190,6 +191,9 @@ static bfd_boolean remove_leading_char = FALSE;
/* Whether to permit wildcard in symbol comparison. */
static bfd_boolean wildcard = FALSE;
+/* True if --localize-hidden is in effect. */
+static bfd_boolean localize_hidden = FALSE;
+
/* List of symbols to strip, keep, localize, keep-global, weaken,
or redefine. */
static struct symlist *strip_specific_list = NULL;
@@ -212,6 +216,14 @@ static char *prefix_symbols_string = 0;
static char *prefix_sections_string = 0;
static char *prefix_alloc_sections_string = 0;
+/* True if --extract-symbol was passed on the command line. */
+static bfd_boolean extract_symbol = FALSE;
+
+/* If `reverse_bytes' is nonzero, then reverse the order of every chunk
+ of <reverse_bytes> bytes within each output section. */
+static int reverse_bytes = 0;
+
+
/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
enum command_line_switch
{
@@ -240,6 +252,7 @@ enum command_line_switch
OPTION_STRIP_UNNEEDED_SYMBOL,
OPTION_STRIP_UNNEEDED_SYMBOLS,
OPTION_KEEP_SYMBOLS,
+ OPTION_LOCALIZE_HIDDEN,
OPTION_LOCALIZE_SYMBOLS,
OPTION_GLOBALIZE_SYMBOL,
OPTION_GLOBALIZE_SYMBOLS,
@@ -257,7 +270,9 @@ enum command_line_switch
OPTION_READONLY_TEXT,
OPTION_WRITABLE_TEXT,
OPTION_PURE,
- OPTION_IMPURE
+ OPTION_IMPURE,
+ OPTION_EXTRACT_SYMBOL,
+ OPTION_REVERSE_BYTES
};
/* Options to handle if running as "strip". */
@@ -313,6 +328,7 @@ static struct option copy_options[] =
{"debugging", no_argument, 0, OPTION_DEBUGGING},
{"discard-all", no_argument, 0, 'x'},
{"discard-locals", no_argument, 0, 'X'},
+ {"extract-symbol", no_argument, 0, OPTION_EXTRACT_SYMBOL},
{"format", required_argument, 0, 'F'}, /* Obsolete */
{"gap-fill", required_argument, 0, OPTION_GAP_FILL},
{"globalize-symbol", required_argument, 0, OPTION_GLOBALIZE_SYMBOL},
@@ -328,6 +344,7 @@ static struct option copy_options[] =
{"keep-global-symbols", required_argument, 0, OPTION_KEEPGLOBAL_SYMBOLS},
{"keep-symbol", required_argument, 0, 'K'},
{"keep-symbols", required_argument, 0, OPTION_KEEP_SYMBOLS},
+ {"localize-hidden", no_argument, 0, OPTION_LOCALIZE_HIDDEN},
{"localize-symbol", required_argument, 0, 'L'},
{"localize-symbols", required_argument, 0, OPTION_LOCALIZE_SYMBOLS},
{"no-adjust-warnings", no_argument, 0, OPTION_NO_CHANGE_WARNINGS},
@@ -348,6 +365,7 @@ static struct option copy_options[] =
{"remove-leading-char", no_argument, 0, OPTION_REMOVE_LEADING_CHAR},
{"remove-section", required_argument, 0, 'R'},
{"rename-section", required_argument, 0, OPTION_RENAME_SECTION},
+ {"reverse-bytes", required_argument, 0, OPTION_REVERSE_BYTES},
{"set-section-flags", required_argument, 0, OPTION_SET_SECTION_FLAGS},
{"set-start", required_argument, 0, OPTION_SET_START},
{"srec-len", required_argument, 0, OPTION_SREC_LEN},
@@ -426,8 +444,10 @@ copy_usage (FILE *stream, int exit_status)
Do not copy symbol <name> unless needed by\n\
relocations\n\
--only-keep-debug Strip everything but the debug information\n\
+ --extract-symbol Remove section contents but keep symbols\n\
-K --keep-symbol <name> Do not strip symbol <name>\n\
--keep-file-symbols Do not strip file symbol(s)\n\
+ --localize-hidden Turn all ELF hidden symbols into locals\n\
-L --localize-symbol <name> Force symbol <name> to be marked as a local\n\
--globalize-symbol <name> Force symbol <name> to be marked as a global\n\
-G --keep-global-symbol <name> Localize all symbols except <name>\n\
@@ -459,6 +479,7 @@ copy_usage (FILE *stream, int exit_status)
--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\
+ --reverse-bytes=<num> Reverse <num> bytes at a time, in output sections with content\n\
--redefine-sym <old>=<new> Redefine symbol name <old> to <new>\n\
--redefine-syms <file> --redefine-sym for all symbol pairs \n\
listed in <file>\n\
@@ -490,7 +511,7 @@ copy_usage (FILE *stream, int exit_status)
--info List object formats & architectures supported\n\
"));
list_supported_targets (program_name, stream);
- if (exit_status == 0)
+ if (REPORT_BUGS_TO[0] && exit_status == 0)
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (exit_status);
}
@@ -525,7 +546,7 @@ strip_usage (FILE *stream, int exit_status)
"));
list_supported_targets (program_name, stream);
- if (exit_status == 0)
+ if (REPORT_BUGS_TO[0] && exit_status == 0)
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (exit_status);
}
@@ -647,7 +668,10 @@ add_specific_symbols (const char *filename, struct symlist **list)
size = get_file_size (filename);
if (size == 0)
- return;
+ {
+ status = 1;
+ return;
+ }
buffer = xmalloc (size + 2);
f = fopen (filename, FOPEN_RT);
@@ -776,6 +800,30 @@ is_specified_symbol (const char *name, struct symlist *list)
return FALSE;
}
+/* Return a pointer to the symbol used as a signature for GROUP. */
+
+static asymbol *
+group_signature (asection *group)
+{
+ bfd *abfd = group->owner;
+ Elf_Internal_Shdr *ghdr;
+
+ if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
+ return NULL;
+
+ ghdr = &elf_section_data (group)->this_hdr;
+ if (ghdr->sh_link < elf_numsections (abfd))
+ {
+ const struct elf_backend_data *bed = get_elf_backend_data (abfd);
+ Elf_Internal_Shdr *symhdr = elf_elfsections (abfd) [ghdr->sh_link];
+
+ if (symhdr->sh_type == SHT_SYMTAB
+ && ghdr->sh_info < symhdr->sh_size / bed->s->sizeof_sym)
+ return isympp[ghdr->sh_info - 1];
+ }
+ return NULL;
+}
+
/* See if a section is being removed. */
static bfd_boolean
@@ -806,6 +854,49 @@ is_strip_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec)
return FALSE;
}
+ if ((bfd_get_section_flags (abfd, sec) & SEC_GROUP) != 0)
+ {
+ asymbol *gsym;
+ const char *gname;
+
+ /* PR binutils/3166
+ Group sections look like debugging sections but they are not.
+ (They have a non-zero size but they are not ALLOCated). */
+ if (strip_symbols == STRIP_NONDEBUG)
+ return TRUE;
+
+ /* PR binutils/3181
+ If we are going to strip the group signature symbol, then
+ strip the group section too. */
+ gsym = group_signature (sec);
+ if (gsym != NULL)
+ gname = gsym->name;
+ else
+ gname = sec->name;
+ if ((strip_symbols == STRIP_ALL
+ && !is_specified_symbol (gname, keep_specific_list))
+ || is_specified_symbol (gname, strip_specific_list))
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+/* Return true if SYM is a hidden symbol. */
+
+static bfd_boolean
+is_hidden_symbol (asymbol *sym)
+{
+ elf_symbol_type *elf_sym;
+
+ elf_sym = elf_symbol_from (sym->the_bfd, sym);
+ if (elf_sym != NULL)
+ switch (ELF_ST_VISIBILITY (elf_sym->internal_elf_sym.st_other))
+ {
+ case STV_HIDDEN:
+ case STV_INTERNAL:
+ return TRUE;
+ }
return FALSE;
}
@@ -819,15 +910,15 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
{
asymbol **from = isyms, **to = osyms;
long src_count = 0, dst_count = 0;
- int relocatable = (abfd->flags & (HAS_RELOC | EXEC_P | DYNAMIC))
- == HAS_RELOC;
+ int relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0;
for (; src_count < symcount; src_count++)
{
asymbol *sym = from[src_count];
flagword flags = sym->flags;
char *name = (char *) bfd_asymbol_name (sym);
- int keep;
+ bfd_boolean keep;
+ bfd_boolean used_in_reloc = FALSE;
bfd_boolean undefined;
bfd_boolean rem_leading_char;
bfd_boolean add_leading_char;
@@ -895,21 +986,24 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
}
if (strip_symbols == STRIP_ALL)
- keep = 0;
+ keep = FALSE;
else if ((flags & BSF_KEEP) != 0 /* Used in relocation. */
|| ((flags & BSF_SECTION_SYM) != 0
&& ((*bfd_get_section (sym)->symbol_ptr_ptr)->flags
& BSF_KEEP) != 0))
- keep = 1;
+ {
+ keep = TRUE;
+ used_in_reloc = TRUE;
+ }
else if (relocatable /* Relocatable file. */
&& (flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
- keep = 1;
+ keep = TRUE;
else if (bfd_decode_symclass (sym) == 'I')
/* Global symbols in $idata sections need to be retained
even if relocatable is FALSE. External users of the
library containing the $idata section may reference these
symbols. */
- keep = 1;
+ keep = TRUE;
else if ((flags & BSF_GLOBAL) != 0 /* Global symbol. */
|| (flags & BSF_WEAK) != 0
|| undefined
@@ -922,7 +1016,7 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
else if (bfd_coff_get_comdat_section (abfd, bfd_get_section (sym)))
/* COMDAT sections store special information in local
symbols, so we cannot risk stripping any of them. */
- keep = 1;
+ keep = TRUE;
else /* Local symbol. */
keep = (strip_symbols != STRIP_UNNEEDED
&& (discard_locals != LOCALS_ALL
@@ -930,17 +1024,30 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
|| ! bfd_is_local_label (abfd, sym))));
if (keep && is_specified_symbol (name, strip_specific_list))
- keep = 0;
+ {
+ /* There are multiple ways to set 'keep' above, but if it
+ was the relocatable symbol case, then that's an error. */
+ if (used_in_reloc)
+ {
+ non_fatal (_("not stripping symbol `%s' because it is named in a relocation"), name);
+ status = 1;
+ }
+ else
+ keep = FALSE;
+ }
+
if (keep
&& !(flags & BSF_KEEP)
&& is_specified_symbol (name, strip_unneeded_list))
- keep = 0;
+ keep = FALSE;
+
if (!keep
&& ((keep_file_symbols && (flags & BSF_FILE))
|| is_specified_symbol (name, keep_specific_list)))
- keep = 1;
+ keep = TRUE;
+
if (keep && is_strip_section (abfd, bfd_get_section (sym)))
- keep = 0;
+ keep = FALSE;
if (keep)
{
@@ -955,14 +1062,15 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
&& (flags & (BSF_GLOBAL | BSF_WEAK))
&& (is_specified_symbol (name, localize_specific_list)
|| (keepglobal_specific_list != NULL
- && ! is_specified_symbol (name, keepglobal_specific_list))))
+ && ! is_specified_symbol (name, keepglobal_specific_list))
+ || (localize_hidden && is_hidden_symbol (sym))))
{
sym->flags &= ~ (BSF_GLOBAL | BSF_WEAK);
sym->flags |= BSF_LOCAL;
}
if (!undefined
- && (flags & BSF_LOCAL)
+ && (flags & BSF_LOCAL)
&& is_specified_symbol (name, globalize_specific_list))
{
sym->flags &= ~ BSF_LOCAL;
@@ -1105,7 +1213,7 @@ add_redefine_syms_file (const char *filename)
if (buf[0] != '\0')
redefine_list_append (filename, &buf[0], &buf[outsym_off]);
- lineno++;
+ lineno++;
len = 0;
outsym_off = 0;
if (c == EOF)
@@ -1233,11 +1341,16 @@ copy_object (bfd *ibfd, bfd *obfd)
bfd_get_archive_filename (ibfd), bfd_get_target (ibfd),
bfd_get_filename (obfd), bfd_get_target (obfd));
- if (set_start_set)
- start = set_start;
+ if (extract_symbol)
+ start = 0;
else
- start = bfd_get_start_address (ibfd);
- start += change_start;
+ {
+ if (set_start_set)
+ start = set_start;
+ else
+ start = bfd_get_start_address (ibfd);
+ start += change_start;
+ }
/* Neither the start address nor the flags
need to be set for a core file. */
@@ -1290,6 +1403,21 @@ copy_object (bfd *ibfd, bfd *obfd)
isympp = NULL;
osympp = NULL;
+ symsize = bfd_get_symtab_upper_bound (ibfd);
+ if (symsize < 0)
+ {
+ bfd_nonfatal (bfd_get_archive_filename (ibfd));
+ return FALSE;
+ }
+
+ osympp = isympp = xmalloc (symsize);
+ symcount = bfd_canonicalize_symtab (ibfd, isympp);
+ if (symcount < 0)
+ {
+ bfd_nonfatal (bfd_get_filename (ibfd));
+ return FALSE;
+ }
+
/* BFD mandates that all output sections be created and sizes set before
any output is done. Thus, we traverse all sections multiple times. */
bfd_map_over_sections (ibfd, setup_section, obfd);
@@ -1418,13 +1546,8 @@ copy_object (bfd *ibfd, bfd *obfd)
}
}
- if (bfd_count_sections (obfd) == 0)
- {
- non_fatal (_("there are no sections to be copied!"));
- return FALSE;
- }
-
- if (gap_fill_set || pad_to_set)
+ if (bfd_count_sections (obfd) != 0
+ && (gap_fill_set || pad_to_set))
{
asection **set;
unsigned int c, i;
@@ -1509,21 +1632,6 @@ copy_object (bfd *ibfd, bfd *obfd)
/* 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)
- {
- bfd_nonfatal (bfd_get_archive_filename (ibfd));
- return FALSE;
- }
-
- osympp = isympp = xmalloc (symsize);
- symcount = bfd_canonicalize_symtab (ibfd, isympp);
- if (symcount < 0)
- {
- bfd_nonfatal (bfd_get_filename (ibfd));
- return FALSE;
- }
-
if (convert_debugging)
dhandle = read_debugging_info (ibfd, isympp, symcount);
@@ -1532,6 +1640,7 @@ copy_object (bfd *ibfd, bfd *obfd)
|| strip_symbols == STRIP_UNNEEDED
|| strip_symbols == STRIP_NONDEBUG
|| discard_locals != LOCALS_UNDEF
+ || localize_hidden
|| strip_specific_list != NULL
|| keep_specific_list != NULL
|| localize_specific_list != NULL
@@ -1647,16 +1756,16 @@ copy_object (bfd *ibfd, bfd *obfd)
}
}
+ /* Do not copy backend data if --extract-symbol is passed; anything
+ that needs to look at the section contents will fail. */
+ if (extract_symbol)
+ return TRUE;
+
/* Allow the BFD backend to copy any private data it understands
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_get_flavour (ibfd) == bfd_target_elf_flavour
- && strip_symbols == STRIP_NONDEBUG)
- /* Do not copy the private data when creating an ELF format
- debug info file. We do not want the program headers. */
- ;
- else 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),
@@ -1686,18 +1795,15 @@ copy_object (bfd *ibfd, bfd *obfd)
return TRUE;
}
-#undef MKDIR
-#if defined (_WIN32) && !defined (__CYGWIN32__)
-#define MKDIR(DIR, MODE) mkdir (DIR)
-#else
-#define MKDIR(DIR, MODE) mkdir (DIR, MODE)
-#endif
-
/* Read each archive element in turn from IBFD, copy the
- contents to temp file, and keep the temp file handle. */
+ contents to temp file, and keep the temp file handle.
+ If 'force_output_target' is TRUE then make sure that
+ all elements in the new archive are of the type
+ 'output_target'. */
static void
-copy_archive (bfd *ibfd, bfd *obfd, const char *output_target)
+copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
+ bfd_boolean force_output_target)
{
struct name_list
{
@@ -1707,12 +1813,13 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target)
} *list, *l;
bfd **ptr = &obfd->archive_head;
bfd *this_element;
- char *dir = make_tempname (bfd_get_filename (obfd));
+ char * dir;
/* Make a temp directory to hold the contents. */
- if (MKDIR (dir, 0700) != 0)
- fatal (_("cannot mkdir %s for archive copying (error: %s)"),
- dir, strerror (errno));
+ dir = make_tempdir (bfd_get_filename (obfd));
+ if (dir == NULL)
+ fatal (_("cannot create tempdir for archive copying (error: %s)"),
+ strerror (errno));
obfd->has_armap = ibfd->has_armap;
@@ -1739,10 +1846,10 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target)
/* If the file already exists, make another temp dir. */
if (stat (output_name, &buf) >= 0)
{
- output_name = make_tempname (output_name);
- if (MKDIR (output_name, 0700) != 0)
- fatal (_("cannot mkdir %s for archive copying (error: %s)"),
- output_name, strerror (errno));
+ output_name = make_tempdir (output_name);
+ if (output_name == NULL)
+ fatal (_("cannot create tempdir for archive copying (error: %s)"),
+ strerror (errno));
l = xmalloc (sizeof (struct name_list));
l->name = output_name;
@@ -1753,7 +1860,6 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target)
bfd_get_filename (this_element), (char *) 0);
}
- output_bfd = bfd_openw (output_name, output_target);
if (preserve_dates)
{
stat_status = bfd_stat_arch_elt (this_element, &buf);
@@ -1769,11 +1875,18 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target)
l->obfd = NULL;
list = l;
- if (output_bfd == NULL)
- RETURN_NONFATAL (output_name);
-
if (bfd_check_format (this_element, bfd_object))
{
+ /* PR binutils/3110: Cope with archives
+ containing multiple target types. */
+ if (force_output_target)
+ output_bfd = bfd_openw (output_name, output_target);
+ else
+ output_bfd = bfd_openw (output_name, bfd_get_target (this_element));
+
+ if (output_bfd == NULL)
+ RETURN_NONFATAL (output_name);
+
delete = ! copy_object (this_element, output_bfd);
if (! delete
@@ -1794,6 +1907,7 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target)
non_fatal (_("Unable to recognise the format of the input file `%s'"),
bfd_get_archive_filename (this_element));
+ output_bfd = bfd_openw (output_name, output_target);
copy_unknown_element:
delete = !copy_unknown_object (this_element, output_bfd);
if (!bfd_close_all_done (output_bfd))
@@ -1820,7 +1934,7 @@ copy_unknown_element:
l->obfd = output_bfd;
*ptr = output_bfd;
- ptr = &output_bfd->next;
+ ptr = &output_bfd->archive_next;
last_element = this_element;
@@ -1863,7 +1977,6 @@ copy_file (const char *input_filename, const char *output_filename,
if (get_file_size (input_filename) < 1)
{
- non_fatal (_("error: the input file '%s' is empty"), input_filename);
status = 1;
return;
}
@@ -1876,18 +1989,24 @@ copy_file (const char *input_filename, const char *output_filename,
if (bfd_check_format (ibfd, bfd_archive))
{
+ bfd_boolean force_output_target;
bfd *obfd;
/* bfd_get_target does not return the correct value until
bfd_check_format succeeds. */
if (output_target == NULL)
- output_target = bfd_get_target (ibfd);
+ {
+ output_target = bfd_get_target (ibfd);
+ force_output_target = FALSE;
+ }
+ else
+ force_output_target = TRUE;
obfd = bfd_openw (output_filename, output_target);
if (obfd == NULL)
RETURN_NONFATAL (output_filename);
- copy_archive (ibfd, obfd, output_target);
+ copy_archive (ibfd, obfd, output_target, force_output_target);
}
else if (bfd_check_format_matches (ibfd, bfd_object, &obj_matching))
{
@@ -2076,7 +2195,9 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
if (p != NULL && p->set_flags)
flags = p->flags | (flags & (SEC_HAS_CONTENTS | SEC_RELOC));
- else if (strip_symbols == STRIP_NONDEBUG && (flags & SEC_ALLOC) != 0)
+ else if (strip_symbols == STRIP_NONDEBUG
+ && obfd->xvec->flavour != bfd_target_elf_flavour
+ && (flags & SEC_ALLOC) != 0)
flags &= ~(SEC_HAS_CONTENTS | SEC_LOAD);
osection = bfd_make_section_anyway_with_flags (obfd, name, flags);
@@ -2090,12 +2211,17 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
if (strip_symbols == STRIP_NONDEBUG
&& obfd->xvec->flavour == bfd_target_elf_flavour
&& (flags & SEC_ALLOC) != 0
+ && elf_section_type (osection) != SHT_NOTE
+ && (ibfd->xvec->flavour != bfd_target_elf_flavour
+ || elf_section_type (isection) != SHT_NOTE)
&& (p == NULL || !p->set_flags))
elf_section_type (osection) = SHT_NOBITS;
size = bfd_section_size (ibfd, isection);
if (copy_byte >= 0)
size = (size + interleave - 1) / interleave;
+ else if (extract_symbol)
+ size = 0;
if (! bfd_set_section_size (obfd, osection, size))
{
err = _("size");
@@ -2110,7 +2236,7 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
else
vma += change_section_address;
- if (! bfd_set_section_vma (obfd, osection, vma))
+ if (! bfd_set_section_vma (obfd, osection, extract_symbol ? 0 : vma))
{
err = _("vma");
goto loser;
@@ -2129,7 +2255,7 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
else
lma += change_section_address;
- osection->lma = lma;
+ osection->lma = extract_symbol ? 0 : lma;
/* FIXME: This is probably not enough. If we change the LMA we
may have to recompute the header for the file as well. */
@@ -2148,20 +2274,27 @@ setup_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
bfd_get_section_by_name since some formats allow multiple
sections with the same name. */
isection->output_section = osection;
- isection->output_offset = 0;
+ isection->output_offset = extract_symbol ? vma : 0;
+
+ /* Do not copy backend data if --extract-symbol is passed; anything
+ that needs to look at the section contents will fail. */
+ if (extract_symbol)
+ return;
/* Allow the BFD backend to copy any private data it understands
from the input section to the output section. */
- if (bfd_get_flavour (ibfd) == bfd_target_elf_flavour
- && strip_symbols == STRIP_NONDEBUG)
- /* Do not copy the private data when creating an ELF format
- debug info file. We do not want the program headers. */
- ;
- else if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection))
+ if (!bfd_copy_private_section_data (ibfd, isection, obfd, osection))
{
err = _("private data");
goto loser;
}
+ else if ((isection->flags & SEC_GROUP) != 0)
+ {
+ asymbol *gsym = group_signature (isection);
+
+ if (gsym != NULL)
+ gsym->flags |= BSF_KEEP;
+ }
/* All went well. */
return;
@@ -2259,6 +2392,9 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
free (relpp);
}
+ if (extract_symbol)
+ return;
+
if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS
&& bfd_get_section_flags (obfd, osection) & SEC_HAS_CONTENTS)
{
@@ -2267,6 +2403,32 @@ copy_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
if (!bfd_get_section_contents (ibfd, isection, memhunk, 0, size))
RETURN_NONFATAL (bfd_get_filename (ibfd));
+ if (reverse_bytes)
+ {
+ /* We don't handle leftover bytes (too many possible behaviors,
+ and we don't know what the user wants). The section length
+ must be a multiple of the number of bytes to swap. */
+ if ((size % reverse_bytes) == 0)
+ {
+ unsigned long i, j;
+ bfd_byte b;
+
+ for (i = 0; i < size; i += reverse_bytes)
+ for (j = 0; j < (unsigned long)(reverse_bytes / 2); j++)
+ {
+ bfd_byte *m = (bfd_byte *) memhunk;
+
+ b = m[i + j];
+ m[i + j] = m[(i + reverse_bytes) - (j + 1)];
+ m[(i + reverse_bytes) - (j + 1)] = b;
+ }
+ }
+ else
+ /* User must pad the section up in order to do this. */
+ fatal (_("cannot reverse bytes: length of section %s must be evenly divisible by %d"),
+ bfd_section_name (ibfd, isection), reverse_bytes);
+ }
+
if (copy_byte >= 0)
{
/* Keep only every `copy_byte'th byte in MEMHUNK. */
@@ -2561,7 +2723,7 @@ strip_main (int argc, char *argv[])
display_info ();
return 0;
}
-
+
if (show_version)
print_version ("strip");
@@ -2586,35 +2748,47 @@ strip_main (int argc, char *argv[])
char *tmpname;
if (get_file_size (argv[i]) < 1)
- continue;
+ {
+ status = 1;
+ continue;
+ }
if (preserve_dates)
/* No need to check the return value of stat().
It has already been checked in get_file_size(). */
stat (argv[i], &statbuf);
- if (output_file != NULL)
- tmpname = output_file;
- else
+ if (output_file == NULL || strcmp (argv[i], output_file) == 0)
tmpname = make_tempname (argv[i]);
- status = 0;
+ else
+ tmpname = output_file;
+
+ if (tmpname == NULL)
+ {
+ non_fatal (_("could not create temporary file to hold stripped copy of '%s'"),
+ argv[i]);
+ status = 1;
+ continue;
+ }
+ status = 0;
copy_file (argv[i], tmpname, input_target, output_target);
if (status == 0)
{
if (preserve_dates)
set_times (tmpname, &statbuf);
- if (output_file == NULL)
- smart_rename (tmpname, argv[i], preserve_dates);
+ if (output_file != tmpname)
+ smart_rename (tmpname, output_file ? output_file : argv[i],
+ preserve_dates);
status = hold_status;
}
else
unlink_if_ordinary (tmpname);
- if (output_file == NULL)
+ if (output_file != tmpname)
free (tmpname);
}
- return 0;
+ return status;
}
static int
@@ -2623,6 +2797,7 @@ copy_main (int argc, char *argv[])
char * binary_architecture = NULL;
char *input_filename = NULL;
char *output_filename = NULL;
+ char *tmpname;
char *input_target = NULL;
char *output_target = NULL;
bfd_boolean show_version = FALSE;
@@ -2783,7 +2958,10 @@ copy_main (int argc, char *argv[])
size = get_file_size (s + 1);
if (size < 1)
- break;
+ {
+ status = 1;
+ break;
+ }
pa = xmalloc (sizeof (struct section_add));
@@ -3064,6 +3242,10 @@ copy_main (int argc, char *argv[])
add_specific_symbols (optarg, &keep_specific_list);
break;
+ case OPTION_LOCALIZE_HIDDEN:
+ localize_hidden = TRUE;
+ break;
+
case OPTION_LOCALIZE_SYMBOLS:
add_specific_symbols (optarg, &localize_specific_list);
break;
@@ -3118,6 +3300,24 @@ copy_main (int argc, char *argv[])
bfd_flags_to_set &= ~D_PAGED;
break;
+ case OPTION_EXTRACT_SYMBOL:
+ extract_symbol = TRUE;
+ break;
+
+ case OPTION_REVERSE_BYTES:
+ {
+ int prev = reverse_bytes;
+
+ reverse_bytes = atoi (optarg);
+ if ((reverse_bytes <= 0) || ((reverse_bytes % 2) != 0))
+ fatal (_("number of bytes to reverse must be positive and even"));
+
+ if (prev && prev != reverse_bytes)
+ non_fatal (_("Warning: ignoring previous --reverse-bytes value of %d"),
+ prev);
+ break;
+ }
+
case 0:
/* We've been given a long option. */
break;
@@ -3136,7 +3336,7 @@ copy_main (int argc, char *argv[])
display_info ();
return 0;
}
-
+
if (show_version)
print_version ("objcopy");
@@ -3188,28 +3388,24 @@ copy_main (int argc, char *argv[])
/* If there is no destination file, or the source and destination files
are the same, then create a temp and rename the result into the input. */
if (output_filename == NULL || strcmp (input_filename, output_filename) == 0)
- {
- char *tmpname = make_tempname (input_filename);
-
- copy_file (input_filename, tmpname, input_target, output_target);
- if (status == 0)
- {
- if (preserve_dates)
- set_times (tmpname, &statbuf);
- smart_rename (tmpname, input_filename, preserve_dates);
- }
- else
- unlink (tmpname);
- }
+ tmpname = make_tempname (input_filename);
else
- {
- copy_file (input_filename, output_filename, input_target, output_target);
+ tmpname = output_filename;
+
+ if (tmpname == NULL)
+ fatal (_("warning: could not create temporary file whilst copying '%s', (error: %s)"),
+ input_filename, strerror (errno));
- if (status == 0 && preserve_dates)
- set_times (output_filename, &statbuf);
- else if (status != 0)
- unlink_if_ordinary (output_filename);
+ copy_file (input_filename, tmpname, input_target, output_target);
+ if (status == 0)
+ {
+ if (preserve_dates)
+ set_times (tmpname, &statbuf);
+ if (tmpname != output_filename)
+ smart_rename (tmpname, input_filename, preserve_dates);
}
+ else
+ unlink_if_ordinary (tmpname);
if (change_warn)
{
diff --git a/contrib/binutils/binutils/objdump.c b/contrib/binutils/binutils/objdump.c
index 6e5eab5..38e7c02 100644
--- a/contrib/binutils/binutils/objdump.c
+++ b/contrib/binutils/binutils/objdump.c
@@ -1,6 +1,6 @@
/* objdump.c -- dump information about an object file.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -48,12 +48,11 @@
disassembling is done by the libopcodes library, via a function pointer
supplied by the disassembler() function. */
+#include "sysdep.h"
#include "bfd.h"
-#include "bfdver.h"
#include "progress.h"
#include "bucomm.h"
#include "dwarf.h"
-#include "budemang.h"
#include "getopt.h"
#include "safe-ctype.h"
#include "dis-asm.h"
@@ -62,6 +61,12 @@
#include "debug.h"
#include "budbg.h"
+#ifdef HAVE_MMAP
+#include <sys/mman.h>
+#endif
+
+#include <sys/stat.h>
+
/* Internal headers for the ELF .stab-dump code - sorry. */
#define BYTES_IN_WORD 32
#include "aout/aout64.h"
@@ -225,7 +230,7 @@ usage (FILE *stream, int status)
disassembler_usage (stream);
}
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (stream, _("Report bugs to %s.\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -650,8 +655,9 @@ objdump_print_symname (bfd *abfd, struct disassemble_info *info,
if (do_demangle && name[0] != '\0')
{
/* Demangle the name. */
- alloc = demangle (abfd, name);
- name = alloc;
+ alloc = bfd_demangle (abfd, name, DMGL_ANSI | DMGL_PARAMS);
+ if (alloc != NULL)
+ name = alloc;
}
if (info != NULL)
@@ -687,6 +693,7 @@ find_symbol_for_address (bfd_vma vma,
bfd *abfd;
asection *sec;
unsigned int opb;
+ bfd_boolean want_section;
if (sorted_symcount < 1)
return NULL;
@@ -732,15 +739,19 @@ find_symbol_for_address (bfd_vma vma,
Note that this may be wrong for some symbol references if the
sections have overlapping memory ranges, but in that case there's
no way to tell what's desired without looking at the relocation
- table. */
- if (sorted_syms[thisplace]->section != sec
- && (aux->require_sec
- || ((abfd->flags & HAS_RELOC) != 0
- && vma >= bfd_get_section_vma (abfd, sec)
- && vma < (bfd_get_section_vma (abfd, sec)
- + bfd_section_size (abfd, sec) / opb))))
+ table.
+
+ Also give the target a chance to reject symbols. */
+ want_section = (aux->require_sec
+ || ((abfd->flags & HAS_RELOC) != 0
+ && vma >= bfd_get_section_vma (abfd, sec)
+ && vma < (bfd_get_section_vma (abfd, sec)
+ + bfd_section_size (abfd, sec) / opb)));
+ if ((sorted_syms[thisplace]->section != sec && want_section)
+ || !info->symbol_is_valid (sorted_syms[thisplace], info))
{
long i;
+ long newplace;
for (i = thisplace + 1; i < sorted_symcount; i++)
{
@@ -750,27 +761,36 @@ find_symbol_for_address (bfd_vma vma,
}
--i;
+ newplace = sorted_symcount;
for (; i >= 0; i--)
{
- if (sorted_syms[i]->section == sec
- && (i == 0
- || sorted_syms[i - 1]->section != sec
- || (bfd_asymbol_value (sorted_syms[i])
- != bfd_asymbol_value (sorted_syms[i - 1]))))
+ if ((sorted_syms[i]->section == sec || !want_section)
+ && info->symbol_is_valid (sorted_syms[i], info))
{
- thisplace = i;
- break;
+ if (newplace == sorted_symcount)
+ newplace = i;
+
+ if (bfd_asymbol_value (sorted_syms[i])
+ != bfd_asymbol_value (sorted_syms[newplace]))
+ break;
+
+ /* Remember this symbol and keep searching until we reach
+ an earlier address. */
+ newplace = i;
}
}
- if (sorted_syms[thisplace]->section != sec)
+ if (newplace != sorted_symcount)
+ thisplace = newplace;
+ else
{
/* We didn't find a good symbol with a smaller value.
Look for one with a larger value. */
for (i = thisplace + 1; i < sorted_symcount; i++)
{
- if (sorted_syms[i]->section == sec)
+ if ((sorted_syms[i]->section == sec || !want_section)
+ && info->symbol_is_valid (sorted_syms[i], info))
{
thisplace = i;
break;
@@ -778,25 +798,12 @@ find_symbol_for_address (bfd_vma vma,
}
}
- if (sorted_syms[thisplace]->section != sec
- && (aux->require_sec
- || ((abfd->flags & HAS_RELOC) != 0
- && vma >= bfd_get_section_vma (abfd, sec)
- && vma < (bfd_get_section_vma (abfd, sec)
- + bfd_section_size (abfd, sec)))))
+ if ((sorted_syms[thisplace]->section != sec && want_section)
+ || !info->symbol_is_valid (sorted_syms[thisplace], info))
/* There is no suitable symbol. */
return NULL;
}
- /* Give the target a chance to reject the symbol. */
- while (! info->symbol_is_valid (sorted_syms [thisplace], info))
- {
- ++ thisplace;
- if (thisplace >= sorted_symcount
- || bfd_asymbol_value (sorted_syms [thisplace]) > vma)
- return NULL;
- }
-
if (place != NULL)
*place = thisplace;
@@ -926,8 +933,12 @@ struct print_file_list
struct print_file_list *next;
const char *filename;
const char *modname;
- unsigned int line;
- FILE *f;
+ const char *map;
+ size_t mapsize;
+ const char **linemap;
+ unsigned maxline;
+ unsigned last_line;
+ int first;
};
static struct print_file_list *print_files;
@@ -937,6 +948,99 @@ static struct print_file_list *print_files;
#define SHOW_PRECEDING_CONTEXT_LINES (5)
+/* Read a complete file into memory. */
+
+static const char *
+slurp_file (const char *fn, size_t *size)
+{
+#ifdef HAVE_MMAP
+ int ps = getpagesize ();
+ size_t msize;
+#endif
+ const char *map;
+ struct stat st;
+ int fd = open (fn, O_RDONLY);
+
+ if (fd < 0)
+ return NULL;
+ if (fstat (fd, &st) < 0)
+ return NULL;
+ *size = st.st_size;
+#ifdef HAVE_MMAP
+ msize = (*size + ps - 1) & ~(ps - 1);
+ map = mmap (NULL, msize, PROT_READ, MAP_SHARED, fd, 0);
+ if (map != (char *)-1L)
+ {
+ close(fd);
+ return map;
+ }
+#endif
+ map = malloc (*size);
+ if (!map || (size_t) read (fd, (char *)map, *size) != *size)
+ {
+ free ((void *)map);
+ map = NULL;
+ }
+ close (fd);
+ return map;
+}
+
+#define line_map_decrease 5
+
+/* Precompute array of lines for a mapped file. */
+
+static const char **
+index_file (const char *map, size_t size, unsigned int *maxline)
+{
+ const char *p, *lstart, *end;
+ int chars_per_line = 45; /* First iteration will use 40. */
+ unsigned int lineno;
+ const char **linemap = NULL;
+ unsigned long line_map_size = 0;
+
+ lineno = 0;
+ lstart = map;
+ end = map + size;
+
+ for (p = map; p < end; p++)
+ {
+ if (*p == '\n')
+ {
+ if (p + 1 < end && p[1] == '\r')
+ p++;
+ }
+ else if (*p == '\r')
+ {
+ if (p + 1 < end && p[1] == '\n')
+ p++;
+ }
+ else
+ continue;
+
+ /* End of line found. */
+
+ if (linemap == NULL || line_map_size < lineno + 1)
+ {
+ unsigned long newsize;
+
+ chars_per_line -= line_map_decrease;
+ if (chars_per_line <= 1)
+ chars_per_line = 1;
+ line_map_size = size / chars_per_line + 1;
+ if (line_map_size < lineno + 1)
+ line_map_size = lineno + 1;
+ newsize = line_map_size * sizeof (char *);
+ linemap = xrealloc (linemap, newsize);
+ }
+
+ linemap[lineno++] = lstart;
+ lstart = p + 1;
+ }
+
+ *maxline = lineno;
+ return linemap;
+}
+
/* Tries to open MODNAME, and if successful adds a node to print_files
linked list and returns that node. Returns NULL on failure. */
@@ -944,24 +1048,22 @@ static struct print_file_list *
try_print_file_open (const char *origname, const char *modname)
{
struct print_file_list *p;
- FILE *f;
- f = fopen (modname, "r");
- if (f == NULL)
- return NULL;
+ p = xmalloc (sizeof (struct print_file_list));
- if (print_files != NULL && print_files->f != NULL)
+ p->map = slurp_file (modname, &p->mapsize);
+ if (p->map == NULL)
{
- fclose (print_files->f);
- print_files->f = NULL;
+ free (p);
+ return NULL;
}
-
- p = xmalloc (sizeof (struct print_file_list));
+
+ p->linemap = index_file (p->map, p->mapsize, &p->maxline);
+ p->last_line = 0;
p->filename = origname;
p->modname = modname;
- p->line = 0;
- p->f = f;
p->next = print_files;
+ p->first = 1;
print_files = p;
return p;
}
@@ -1020,29 +1122,32 @@ update_source_path (const char *filename)
return NULL;
}
-/* Skip ahead to a given line in a file, optionally printing each
- line. */
+/* Print a source file line. */
-static void
-skip_to_line (struct print_file_list *p, unsigned int line,
- bfd_boolean show)
+static void
+print_line (struct print_file_list *p, unsigned int line)
{
- while (p->line < line)
- {
- char buf[100];
-
- if (fgets (buf, sizeof buf, p->f) == NULL)
- {
- fclose (p->f);
- p->f = NULL;
- break;
- }
+ const char *l;
+
+ --line;
+ if (line >= p->maxline)
+ return;
+ l = p->linemap [line];
+ fwrite (l, 1, strcspn (l, "\n\r"), stdout);
+ putchar ('\n');
+}
- if (show)
- printf ("%s", buf);
+/* Print a range of source code lines. */
- if (strchr (buf, '\n') != NULL)
- ++p->line;
+static void
+dump_lines (struct print_file_list *p, unsigned int start, unsigned int end)
+{
+ if (p->map == NULL)
+ return;
+ while (start <= end)
+ {
+ print_line (p, start);
+ start++;
}
}
@@ -1083,79 +1188,31 @@ show_line (bfd *abfd, asection *section, bfd_vma addr_offset)
&& line > 0)
{
struct print_file_list **pp, *p;
+ unsigned l;
for (pp = &print_files; *pp != NULL; pp = &(*pp)->next)
if (strcmp ((*pp)->filename, filename) == 0)
break;
p = *pp;
- if (p != NULL)
- {
- if (p != print_files)
- {
- int l;
-
- /* We have reencountered a file name which we saw
- earlier. This implies that either we are dumping out
- code from an included file, or the same file was
- linked in more than once. There are two common cases
- of an included file: inline functions in a header
- file, and a bison or flex skeleton file. In the
- former case we want to just start printing (but we
- back up a few lines to give context); in the latter
- case we want to continue from where we left off. I
- can't think of a good way to distinguish the cases,
- so I used a heuristic based on the file name. */
- if (strcmp (p->filename + strlen (p->filename) - 2, ".h") != 0)
- l = p->line;
- else
- {
- l = line - SHOW_PRECEDING_CONTEXT_LINES;
- if (l < 0)
- l = 0;
- }
-
- if (p->f == NULL)
- {
- p->f = fopen (p->modname, "r");
- p->line = 0;
- }
- if (p->f != NULL)
- skip_to_line (p, l, FALSE);
-
- if (print_files->f != NULL)
- {
- fclose (print_files->f);
- print_files->f = NULL;
- }
- }
-
- if (p->f != NULL)
- {
- skip_to_line (p, line, TRUE);
- *pp = p->next;
- p->next = print_files;
- print_files = p;
- }
- }
- else
- {
+ if (p == NULL)
p = update_source_path (filename);
- if (p != NULL)
+ if (p != NULL && line != p->last_line)
+ {
+ if (file_start_context && p->first)
+ l = 1;
+ else
{
- int l;
-
- if (file_start_context)
- l = 0;
- else
- l = line - SHOW_PRECEDING_CONTEXT_LINES;
- if (l < 0)
- l = 0;
- skip_to_line (p, l, FALSE);
- if (p->f != NULL)
- skip_to_line (p, line, TRUE);
+ l = line - SHOW_PRECEDING_CONTEXT_LINES;
+ if (l >= line)
+ l = 1;
+ if (p->last_line >= l && p->last_line <= line)
+ l = p->last_line + 1;
}
+ dump_lines (p, l, line);
+ p->last_line = line;
+ p->first = 0;
}
}
@@ -1377,6 +1434,8 @@ disassemble_bytes (struct disassemble_info * info,
info->flags = 0;
if (info->disassembler_needs_relocs
+ && (bfd_get_file_flags (aux->abfd) & EXEC_P) == 0
+ && (bfd_get_file_flags (aux->abfd) & DYNAMIC) == 0
&& *relppp < relppend)
{
bfd_signed_vma distance_to_rel;
@@ -1748,11 +1807,13 @@ disassemble_section (bfd *abfd, asection *section, void *info)
pinfo->symbols = sorted_syms + place;
pinfo->num_symbols = x - place;
+ pinfo->symtab_pos = place;
}
else
{
pinfo->symbols = NULL;
pinfo->num_symbols = 0;
+ pinfo->symtab_pos = -1;
}
if (! prefix_addresses)
@@ -1945,6 +2006,8 @@ disassemble_data (bfd *abfd)
compare_relocs);
}
}
+ disasm_info.symtab = sorted_syms;
+ disasm_info.symtab_size = sorted_symcount;
bfd_map_over_sections (abfd, disassemble_section, & disasm_info);
@@ -1970,7 +2033,19 @@ load_debug_section (enum dwarf_section_display_enum debug, void *file)
if (sec == NULL)
return 0;
- section->address = bfd_get_section_vma (abfd, sec);
+ /* Compute a bias to be added to offsets found within the DWARF debug
+ information. These offsets are meant to be relative to the start of
+ the dwarf section, and hence the bias should be 0. For MACH-O however
+ a dwarf section is really just a region of a much larger section and so
+ the bias is the address of the start of that area within the larger
+ section. This test is important for PE and COFF based targets which
+ use DWARF debug information, since unlike ELF, they do not allow the
+ dwarf sections to be placed at address 0. */
+ if (bfd_get_flavour (abfd) == bfd_target_mach_o_flavour)
+ section->address = bfd_get_section_vma (abfd, sec);
+ else
+ section->address = 0;
+
section->size = bfd_get_section_size (sec);
section->start = xmalloc (section->size);
@@ -2015,7 +2090,7 @@ dump_dwarf_section (bfd *abfd, asection *section,
const char *match;
enum dwarf_section_display_enum i;
- if (strncmp (name, ".gnu.linkonce.wi.", 17) == 0)
+ if (CONST_STRNEQ (name, ".gnu.linkonce.wi."))
match = ".debug_info";
else
match = name;
@@ -2511,12 +2586,16 @@ dump_symbols (bfd *abfd ATTRIBUTE_UNUSED, bfd_boolean dynamic)
/* If we want to demangle the name, we demangle it
here, and temporarily clobber it while calling
bfd_print_symbol. FIXME: This is a gross hack. */
- alloc = demangle (cur_bfd, name);
- (*current)->name = alloc;
+ alloc = bfd_demangle (cur_bfd, name, DMGL_ANSI | DMGL_PARAMS);
+ if (alloc != NULL)
+ (*current)->name = alloc;
bfd_print_symbol (cur_bfd, stdout, *current,
bfd_print_symbol_all);
- (*current)->name = name;
- free (alloc);
+ if (alloc != NULL)
+ {
+ (*current)->name = name;
+ free (alloc);
+ }
}
else
bfd_print_symbol (cur_bfd, stdout, *current,
@@ -2822,8 +2901,9 @@ dump_bfd (bfd *abfd)
dhandle = read_debugging_info (abfd, syms, symcount);
if (dhandle != NULL)
{
- if (! print_debugging_info (stdout, dhandle, abfd, syms, demangle,
- dump_debugging_tags ? TRUE : FALSE))
+ if (!print_debugging_info (stdout, dhandle, abfd, syms,
+ bfd_demangle,
+ dump_debugging_tags ? TRUE : FALSE))
{
non_fatal (_("%s: printing debugging information failed"),
bfd_get_filename (abfd));
@@ -2902,7 +2982,10 @@ display_file (char *filename, char *target)
bfd *arfile = NULL;
if (get_file_size (filename) < 1)
- return;
+ {
+ exit_status = 1;
+ return;
+ }
file = bfd_openr (filename, target);
if (file == NULL)
diff --git a/contrib/binutils/binutils/po/Make-in b/contrib/binutils/binutils/po/Make-in
index be09b4c..86ff314 100644
--- a/contrib/binutils/binutils/po/Make-in
+++ b/contrib/binutils/binutils/po/Make-in
@@ -16,6 +16,7 @@ SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
+top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -72,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
$(MSGFMT) -o $@ $<
.po.gmo:
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
diff --git a/contrib/binutils/binutils/po/POTFILES.in b/contrib/binutils/binutils/po/POTFILES.in
index d3f6cb3..e96d8bf 100644
--- a/contrib/binutils/binutils/po/POTFILES.in
+++ b/contrib/binutils/binutils/po/POTFILES.in
@@ -2,13 +2,12 @@ addr2line.c
ar.c
arsup.c
arsup.h
+bin2c.c
binemul.c
binemul.h
bucomm.c
bucomm.h
budbg.h
-budemang.c
-budemang.h
coffdump.c
coffgrok.c
coffgrok.h
@@ -29,6 +28,7 @@ is-ranlib.c
is-strip.c
maybe-ranlib.c
maybe-strip.c
+mclex.c
nlmconv.c
nlmconv.h
nm.c
@@ -37,6 +37,7 @@ not-strip.c
objcopy.c
objdump.c
prdbg.c
+rclex.c
rdcoff.c
rdcoff.c
rddbg.c
@@ -54,6 +55,9 @@ stabs.c
strings.c
sysdump.c
version.c
+windint.h
+windmc.c
+windmc.h
windres.c
windres.h
winduni.c
diff --git a/contrib/binutils/binutils/po/binutils.pot b/contrib/binutils/binutils/po/binutils.pot
index 5e5a4dc..f080168 100644
--- a/contrib/binutils/binutils/po/binutils.pot
+++ b/contrib/binutils/binutils/po/binutils.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-10-25 09:14+0930\n"
+"POT-Creation-Date: 2007-07-02 15:55+0930\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,31 +16,32 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: addr2line.c:76
+#: addr2line.c:74
#, c-format
msgid "Usage: %s [option(s)] [addr(s)]\n"
msgstr ""
-#: addr2line.c:77
+#: addr2line.c:75
#, c-format
msgid " Convert addresses into line number/file name pairs.\n"
msgstr ""
-#: addr2line.c:78
+#: addr2line.c:76
#, c-format
msgid ""
" If no addresses are specified on the command line, they will be read from "
"stdin\n"
msgstr ""
-#: addr2line.c:79
+#: addr2line.c:77
#, c-format
msgid ""
" The options are:\n"
" @<file> Read options from <file>\n"
" -b --target=<bfdname> Set the binary file format\n"
" -e --exe=<executable> Set the input file name (default is a.out)\n"
-" -i --inlines\t\t Unwind inlined functions\n"
+" -i --inlines Unwind inlined functions\n"
+" -j --section=<name> Read section-relative offsets instead of addresses\n"
" -s --basenames Strip directory names\n"
" -f --functions Show function names\n"
" -C --demangle[=style] Demangle function names\n"
@@ -49,169 +50,174 @@ msgid ""
"\n"
msgstr ""
-#: addr2line.c:93 ar.c:263 coffdump.c:466 nlmconv.c:1113 objcopy.c:486
-#: objcopy.c:520 readelf.c:2622 size.c:102 srconv.c:1732 strings.c:725
-#: sysdump.c:648 windres.c:673
+#: addr2line.c:92 ar.c:264 coffdump.c:467 dlltool.c:3172 dllwrap.c:510
+#: nlmconv.c:1115 objcopy.c:515 objcopy.c:550 readelf.c:2797 size.c:103
+#: srconv.c:1734 strings.c:722 sysdump.c:647 windmc.c:232 windres.c:698
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: addr2line.c:253
+#: addr2line.c:279
#, c-format
-msgid "%s: can not get addresses from archive"
+msgid "%s: cannot get addresses from archive"
msgstr ""
-#: addr2line.c:325 nm.c:1523 objdump.c:3033
+#: addr2line.c:296
+#, c-format
+msgid "%s: cannot find section %s"
+msgstr ""
+
+#: addr2line.c:362 nm.c:1534 objdump.c:3099
#, c-format
msgid "unknown demangling style `%s'"
msgstr ""
-#: ar.c:203
+#: ar.c:204
#, c-format
msgid "no entry %s in archive\n"
msgstr ""
-#: ar.c:219
+#: ar.c:220
#, c-format
msgid ""
"Usage: %s [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] "
"[count] archive-file file...\n"
msgstr ""
-#: ar.c:222
+#: ar.c:223
#, c-format
msgid " %s -M [<mri-script]\n"
msgstr ""
-#: ar.c:223
+#: ar.c:224
#, c-format
msgid " commands:\n"
msgstr ""
-#: ar.c:224
+#: ar.c:225
#, c-format
msgid " d - delete file(s) from the archive\n"
msgstr ""
-#: ar.c:225
+#: ar.c:226
#, c-format
msgid " m[ab] - move file(s) in the archive\n"
msgstr ""
-#: ar.c:226
+#: ar.c:227
#, c-format
msgid " p - print file(s) found in the archive\n"
msgstr ""
-#: ar.c:227
+#: ar.c:228
#, c-format
msgid " q[f] - quick append file(s) to the archive\n"
msgstr ""
-#: ar.c:228
+#: ar.c:229
#, c-format
msgid ""
" r[ab][f][u] - replace existing or insert new file(s) into the archive\n"
msgstr ""
-#: ar.c:229
+#: ar.c:230
#, c-format
msgid " t - display contents of archive\n"
msgstr ""
-#: ar.c:230
+#: ar.c:231
#, c-format
msgid " x[o] - extract file(s) from the archive\n"
msgstr ""
-#: ar.c:231
+#: ar.c:232
#, c-format
msgid " command specific modifiers:\n"
msgstr ""
-#: ar.c:232
+#: ar.c:233
#, c-format
msgid " [a] - put file(s) after [member-name]\n"
msgstr ""
-#: ar.c:233
+#: ar.c:234
#, c-format
msgid " [b] - put file(s) before [member-name] (same as [i])\n"
msgstr ""
-#: ar.c:234
+#: ar.c:235
#, c-format
msgid " [N] - use instance [count] of name\n"
msgstr ""
-#: ar.c:235
+#: ar.c:236
#, c-format
msgid " [f] - truncate inserted file names\n"
msgstr ""
-#: ar.c:236
+#: ar.c:237
#, c-format
msgid " [P] - use full path names when matching\n"
msgstr ""
-#: ar.c:237
+#: ar.c:238
#, c-format
msgid " [o] - preserve original dates\n"
msgstr ""
-#: ar.c:238
+#: ar.c:239
#, c-format
msgid ""
" [u] - only replace files that are newer than current archive "
"contents\n"
msgstr ""
-#: ar.c:239
+#: ar.c:240
#, c-format
msgid " generic modifiers:\n"
msgstr ""
-#: ar.c:240
+#: ar.c:241
#, c-format
msgid " [c] - do not warn if the library had to be created\n"
msgstr ""
-#: ar.c:241
+#: ar.c:242
#, c-format
msgid " [s] - create an archive index (cf. ranlib)\n"
msgstr ""
-#: ar.c:242
+#: ar.c:243
#, c-format
msgid " [S] - do not build a symbol table\n"
msgstr ""
-#: ar.c:243
+#: ar.c:244
#, c-format
msgid " [v] - be verbose\n"
msgstr ""
-#: ar.c:244
+#: ar.c:245
#, c-format
msgid " [V] - display the version number\n"
msgstr ""
-#: ar.c:245
+#: ar.c:246
#, c-format
msgid " @<file> - read options from <file>\n"
msgstr ""
-#: ar.c:252
+#: ar.c:253
#, c-format
msgid "Usage: %s [options] archive\n"
msgstr ""
-#: ar.c:253
+#: ar.c:254
#, c-format
msgid " Generate an index to speed access to archives\n"
msgstr ""
-#: ar.c:254
+#: ar.c:255
#, c-format
msgid ""
" The options are:\n"
@@ -220,47 +226,47 @@ msgid ""
" -V --version Print version information\n"
msgstr ""
-#: ar.c:485
+#: ar.c:487
msgid "two different operation options specified"
msgstr ""
-#: ar.c:560
+#: ar.c:562
#, c-format
msgid "illegal option -- %c"
msgstr ""
-#: ar.c:606
+#: ar.c:605
msgid "no operation specified"
msgstr ""
-#: ar.c:609
+#: ar.c:608
msgid "`u' is only meaningful with the `r' option."
msgstr ""
-#: ar.c:617
+#: ar.c:616
msgid "`N' is only meaningful with the `x' and `d' options."
msgstr ""
-#: ar.c:620
+#: ar.c:619
msgid "Value for `N' must be positive."
msgstr ""
-#: ar.c:670
+#: ar.c:669
#, c-format
msgid "internal error -- this option not implemented"
msgstr ""
-#: ar.c:739
+#: ar.c:738
#, c-format
msgid "creating %s"
msgstr ""
-#: ar.c:788 ar.c:838 ar.c:1156 objcopy.c:1683
+#: ar.c:787 ar.c:842 ar.c:1164 objcopy.c:1869
#, c-format
msgid "internal stat error on %s"
msgstr ""
-#: ar.c:792
+#: ar.c:791
#, c-format
msgid ""
"\n"
@@ -268,168 +274,173 @@ msgid ""
"\n"
msgstr ""
-#: ar.c:808 ar.c:875
+#: ar.c:807 ar.c:875
#, c-format
msgid "%s is not a valid archive"
msgstr ""
-#: ar.c:843
-#, c-format
-msgid "stat returns negative size for %s"
-msgstr ""
-
-#: ar.c:1061
+#: ar.c:1069
#, c-format
msgid "No member named `%s'\n"
msgstr ""
-#: ar.c:1111
+#: ar.c:1119
#, c-format
msgid "no entry %s in archive %s!"
msgstr ""
-#: ar.c:1248
+#: ar.c:1257
#, c-format
msgid "%s: no archive map to update"
msgstr ""
-#: arsup.c:87
+#: arsup.c:88
#, c-format
msgid "No entry %s in archive.\n"
msgstr ""
-#: arsup.c:112
+#: arsup.c:113
#, c-format
msgid "Can't open file %s\n"
msgstr ""
-#: arsup.c:162
+#: arsup.c:163
#, c-format
msgid "%s: Can't open output archive %s\n"
msgstr ""
-#: arsup.c:179
+#: arsup.c:180
#, 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:227
+#: arsup.c:228
#, c-format
msgid "%s: no output archive specified yet\n"
msgstr ""
-#: arsup.c:247 arsup.c:285 arsup.c:327 arsup.c:347 arsup.c:413
+#: arsup.c:248 arsup.c:286 arsup.c:328 arsup.c:348 arsup.c:414
#, c-format
msgid "%s: no open output archive\n"
msgstr ""
-#: arsup.c:258 arsup.c:368 arsup.c:394
+#: arsup.c:259 arsup.c:369 arsup.c:395
#, c-format
msgid "%s: can't open file %s\n"
msgstr ""
-#: arsup.c:312 arsup.c:390 arsup.c:471
+#: arsup.c:313 arsup.c:391 arsup.c:472
#, c-format
msgid "%s: can't find module file %s\n"
msgstr ""
-#: arsup.c:422
+#: arsup.c:423
#, c-format
msgid "Current open archive is %s\n"
msgstr ""
-#: arsup.c:446
+#: arsup.c:447
#, c-format
msgid "%s: no open archive\n"
msgstr ""
+#: bin2c.c:84
+#, c-format
+msgid "Usage: %s < input_file > output_file\n"
+msgstr ""
+
+#: bin2c.c:85
+#, c-format
+msgid "Prints bytes from stdin in hex format.\n"
+msgstr ""
+
#: binemul.c:37
#, c-format
msgid " No emulation specific options\n"
msgstr ""
#. Macros for common output.
-#: binemul.h:40
+#: binemul.h:41
#, c-format
msgid " emulation options: \n"
msgstr ""
-#: bucomm.c:110
+#: bucomm.c:111
#, c-format
msgid "can't set BFD default target to `%s': %s"
msgstr ""
-#: bucomm.c:121
+#: bucomm.c:122
#, c-format
msgid "%s: Matching formats:"
msgstr ""
-#: bucomm.c:136
+#: bucomm.c:137
#, c-format
msgid "Supported targets:"
msgstr ""
-#: bucomm.c:138
+#: bucomm.c:139
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: bucomm.c:154
+#: bucomm.c:155
#, c-format
msgid "Supported architectures:"
msgstr ""
-#: bucomm.c:156
+#: bucomm.c:157
#, c-format
msgid "%s: supported architectures:"
msgstr ""
-#: bucomm.c:349
+#: bucomm.c:350
#, c-format
msgid "BFD header file version %s\n"
msgstr ""
-#: bucomm.c:450
+#: bucomm.c:499
#, c-format
msgid "%s: bad number: %s"
msgstr ""
-#: bucomm.c:467 strings.c:438
+#: bucomm.c:516 strings.c:435
#, c-format
msgid "'%s': No such file"
msgstr ""
-#: bucomm.c:469 strings.c:440
+#: bucomm.c:518 strings.c:437
#, c-format
msgid "Warning: could not locate '%s'. reason: %s"
msgstr ""
-#: bucomm.c:473
+#: bucomm.c:522
#, c-format
msgid "Warning: '%s' is not an ordinary file"
msgstr ""
-#: coffdump.c:103
+#: coffdump.c:104
#, c-format
msgid "#lines %d "
msgstr ""
-#: coffdump.c:457 sysdump.c:641
+#: coffdump.c:458 sysdump.c:640
#, c-format
msgid "Usage: %s [option(s)] in-file\n"
msgstr ""
-#: coffdump.c:458
+#: coffdump.c:459
#, c-format
msgid " Print a human readable interpretation of a SYSROFF object file\n"
msgstr ""
-#: coffdump.c:459
+#: coffdump.c:460
#, c-format
msgid ""
" The options are:\n"
@@ -439,720 +450,732 @@ msgid ""
"\n"
msgstr ""
-#: coffdump.c:528 srconv.c:1822 sysdump.c:705
+#: coffdump.c:529 srconv.c:1824 sysdump.c:704
msgid "no input file specified"
msgstr ""
-#: debug.c:648
+#: cxxfilt.c:119 nm.c:252 objdump.c:234
+#, c-format
+msgid "Report bugs to %s.\n"
+msgstr ""
+
+#: debug.c:646
msgid "debug_add_to_current_namespace: no current file"
msgstr ""
-#: debug.c:727
+#: debug.c:725
msgid "debug_start_source: no debug_set_filename call"
msgstr ""
-#: debug.c:783
+#: debug.c:781
msgid "debug_record_function: no debug_set_filename call"
msgstr ""
-#: debug.c:835
+#: debug.c:833
msgid "debug_record_parameter: no current function"
msgstr ""
-#: debug.c:867
+#: debug.c:865
msgid "debug_end_function: no current function"
msgstr ""
-#: debug.c:873
+#: debug.c:871
msgid "debug_end_function: some blocks were not closed"
msgstr ""
-#: debug.c:901
+#: debug.c:899
msgid "debug_start_block: no current block"
msgstr ""
-#: debug.c:937
+#: debug.c:935
msgid "debug_end_block: no current block"
msgstr ""
-#: debug.c:944
+#: debug.c:942
msgid "debug_end_block: attempt to close top level block"
msgstr ""
-#: debug.c:967
+#: debug.c:965
msgid "debug_record_line: no current unit"
msgstr ""
#. FIXME
-#: debug.c:1020
+#: debug.c:1018
msgid "debug_start_common_block: not implemented"
msgstr ""
#. FIXME
-#: debug.c:1031
+#: debug.c:1029
msgid "debug_end_common_block: not implemented"
msgstr ""
#. FIXME.
-#: debug.c:1115
+#: debug.c:1113
msgid "debug_record_label: not implemented"
msgstr ""
-#: debug.c:1137
+#: debug.c:1135
msgid "debug_record_variable: no current file"
msgstr ""
-#: debug.c:1665
+#: debug.c:1663
msgid "debug_make_undefined_type: unsupported kind"
msgstr ""
-#: debug.c:1842
+#: debug.c:1840
msgid "debug_name_type: no current file"
msgstr ""
-#: debug.c:1887
+#: debug.c:1885
msgid "debug_tag_type: no current file"
msgstr ""
-#: debug.c:1895
+#: debug.c:1893
msgid "debug_tag_type: extra tag attempted"
msgstr ""
-#: debug.c:1932
+#: debug.c:1930
#, c-format
msgid "Warning: changing type size from %d to %d\n"
msgstr ""
-#: debug.c:1954
+#: debug.c:1952
msgid "debug_find_named_type: no current compilation unit"
msgstr ""
-#: debug.c:2057
+#: debug.c:2055
#, c-format
msgid "debug_get_real_type: circular debug information for %s\n"
msgstr ""
-#: debug.c:2484
+#: debug.c:2482
msgid "debug_write_type: illegal type encountered"
msgstr ""
-#: dlltool.c:765 dlltool.c:789 dlltool.c:818
+#: dlltool.c:797 dlltool.c:823 dlltool.c:854
#, c-format
msgid "Internal error: Unknown machine type: %d"
msgstr ""
-#: dlltool.c:854
+#: dlltool.c:890
#, c-format
msgid "Can't open def file: %s"
msgstr ""
-#: dlltool.c:859
+#: dlltool.c:895
#, c-format
msgid "Processing def file: %s"
msgstr ""
-#: dlltool.c:863
+#: dlltool.c:899
msgid "Processed def file"
msgstr ""
-#: dlltool.c:887
+#: dlltool.c:923
#, c-format
msgid "Syntax error in def file %s:%d"
msgstr ""
-#: dlltool.c:922
+#: dlltool.c:958
#, c-format
msgid "%s: Path components stripped from image name, '%s'."
msgstr ""
-#: dlltool.c:931
+#: dlltool.c:967
#, c-format
msgid "NAME: %s base: %x"
msgstr ""
-#: dlltool.c:934 dlltool.c:950
+#: dlltool.c:970 dlltool.c:986
msgid "Can't have LIBRARY and NAME"
msgstr ""
-#: dlltool.c:947
+#: dlltool.c:983
#, c-format
msgid "LIBRARY: %s base: %x"
msgstr ""
-#: dlltool.c:1183 resrc.c:269
+#: dlltool.c:1219 resrc.c:293
#, c-format
msgid "wait: %s"
msgstr ""
-#: dlltool.c:1188 dllwrap.c:413 resrc.c:274
+#: dlltool.c:1224 dllwrap.c:410 resrc.c:298
#, c-format
msgid "subprocess got fatal signal %d"
msgstr ""
-#: dlltool.c:1194 dllwrap.c:420 resrc.c:281
+#: dlltool.c:1230 dllwrap.c:417 resrc.c:305
#, c-format
msgid "%s exited with status %d"
msgstr ""
-#: dlltool.c:1225
+#: dlltool.c:1261
#, c-format
msgid "Sucking in info from %s section in %s"
msgstr ""
-#: dlltool.c:1350
+#: dlltool.c:1386
#, c-format
msgid "Excluding symbol: %s"
msgstr ""
-#: dlltool.c:1439 dlltool.c:1450 nm.c:1000 nm.c:1011
+#: dlltool.c:1475 dlltool.c:1486 nm.c:984 nm.c:995
#, c-format
msgid "%s: no symbols"
msgstr ""
#. FIXME: we ought to read in and block out the base relocations.
-#: dlltool.c:1476
+#: dlltool.c:1512
#, c-format
msgid "Done reading %s"
msgstr ""
-#: dlltool.c:1486
+#: dlltool.c:1522
#, c-format
msgid "Unable to open object file: %s"
msgstr ""
-#: dlltool.c:1489
+#: dlltool.c:1525
#, c-format
msgid "Scanning object file %s"
msgstr ""
-#: dlltool.c:1504
+#: dlltool.c:1540
#, c-format
msgid "Cannot produce mcore-elf dll from archive file: %s"
msgstr ""
-#: dlltool.c:1590
+#: dlltool.c:1626
msgid "Adding exports to output file"
msgstr ""
-#: dlltool.c:1638
+#: dlltool.c:1674
msgid "Added exports to output file"
msgstr ""
-#: dlltool.c:1759
+#: dlltool.c:1813
#, c-format
msgid "Generating export file: %s"
msgstr ""
-#: dlltool.c:1764
+#: dlltool.c:1818
#, c-format
msgid "Unable to open temporary assembler file: %s"
msgstr ""
-#: dlltool.c:1767
+#: dlltool.c:1821
#, c-format
msgid "Opened temporary file: %s"
msgstr ""
-#: dlltool.c:1989
+#: dlltool.c:2043
msgid "Generated exports file"
msgstr ""
-#: dlltool.c:2195
+#: dlltool.c:2251
#, c-format
msgid "bfd_open failed open stub file: %s"
msgstr ""
-#: dlltool.c:2198
+#: dlltool.c:2254
#, c-format
msgid "Creating stub file: %s"
msgstr ""
-#: dlltool.c:2580
+#: dlltool.c:2672
#, c-format
msgid "failed to open temporary head file: %s"
msgstr ""
-#: dlltool.c:2639
+#: dlltool.c:2734
#, c-format
msgid "failed to open temporary tail file: %s"
msgstr ""
-#: dlltool.c:2706
+#: dlltool.c:2809
#, c-format
msgid "Can't open .lib file: %s"
msgstr ""
-#: dlltool.c:2709
+#: dlltool.c:2812
#, c-format
msgid "Creating library file: %s"
msgstr ""
-#: dlltool.c:2792 dlltool.c:2798
+#: dlltool.c:2895 dlltool.c:2901
#, c-format
msgid "cannot delete %s: %s"
msgstr ""
-#: dlltool.c:2803
+#: dlltool.c:2906
msgid "Created lib file"
msgstr ""
-#: dlltool.c:2882
+#: dlltool.c:2985
#, c-format
msgid "Warning, ignoring duplicate EXPORT %s %d,%d"
msgstr ""
-#: dlltool.c:2888
+#: dlltool.c:2991
#, c-format
msgid "Error, duplicate EXPORT with oridinals: %s"
msgstr ""
-#: dlltool.c:2993
+#: dlltool.c:3096
msgid "Processing definitions"
msgstr ""
-#: dlltool.c:3025
+#: dlltool.c:3128
msgid "Processed definitions"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:3032 dllwrap.c:474
+#: dlltool.c:3135 dllwrap.c:471
#, c-format
msgid "Usage %s <option(s)> <object-file(s)>\n"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:3034
+#: dlltool.c:3137
#, c-format
msgid ""
" -m --machine <machine> Create as DLL for <machine>. [default: %s]\n"
msgstr ""
-#: dlltool.c:3035
+#: dlltool.c:3138
#, c-format
msgid ""
" possible <machine>: arm[_interwork], i386, mcore[-elf]{-le|-be}, "
"ppc, thumb\n"
msgstr ""
-#: dlltool.c:3036
+#: dlltool.c:3139
#, c-format
msgid " -e --output-exp <outname> Generate an export file.\n"
msgstr ""
-#: dlltool.c:3037
+#: dlltool.c:3140
#, c-format
msgid " -l --output-lib <outname> Generate an interface library.\n"
msgstr ""
-#: dlltool.c:3038
+#: dlltool.c:3141
#, c-format
msgid " -a --add-indirect Add dll indirects to export file.\n"
msgstr ""
-#: dlltool.c:3039
+#: dlltool.c:3142
#, c-format
msgid ""
" -D --dllname <name> Name of input dll to put into interface lib.\n"
msgstr ""
-#: dlltool.c:3040
+#: dlltool.c:3143
#, c-format
msgid " -d --input-def <deffile> Name of .def file to be read in.\n"
msgstr ""
-#: dlltool.c:3041
+#: dlltool.c:3144
#, c-format
msgid " -z --output-def <deffile> Name of .def file to be created.\n"
msgstr ""
-#: dlltool.c:3042
+#: dlltool.c:3145
#, c-format
msgid " --export-all-symbols Export all symbols to .def\n"
msgstr ""
-#: dlltool.c:3043
+#: dlltool.c:3146
#, c-format
msgid " --no-export-all-symbols Only export listed symbols\n"
msgstr ""
-#: dlltool.c:3044
+#: dlltool.c:3147
#, c-format
msgid " --exclude-symbols <list> Don't export <list>\n"
msgstr ""
-#: dlltool.c:3045
+#: dlltool.c:3148
#, c-format
msgid " --no-default-excludes Clear default exclude symbols\n"
msgstr ""
-#: dlltool.c:3046
+#: dlltool.c:3149
#, c-format
msgid " -b --base-file <basefile> Read linker generated base file.\n"
msgstr ""
-#: dlltool.c:3047
+#: dlltool.c:3150
#, c-format
msgid " -x --no-idata4 Don't generate idata$4 section.\n"
msgstr ""
-#: dlltool.c:3048
+#: dlltool.c:3151
#, c-format
msgid " -c --no-idata5 Don't generate idata$5 section.\n"
msgstr ""
-#: dlltool.c:3049
+#: dlltool.c:3152
#, c-format
msgid ""
-" -U --add-underscore Add underscores to symbols in interface "
+" -U --add-underscore Add underscores to all symbols in interface "
"library.\n"
msgstr ""
-#: dlltool.c:3050
+#: dlltool.c:3153
+#, c-format
+msgid ""
+" --add-stdcall-underscore Add underscores to stdcall symbols in "
+"interface library.\n"
+msgstr ""
+
+#: dlltool.c:3154
#, c-format
msgid " -k --kill-at Kill @<n> from exported names.\n"
msgstr ""
-#: dlltool.c:3051
+#: dlltool.c:3155
#, c-format
msgid " -A --add-stdcall-alias Add aliases without @<n>.\n"
msgstr ""
-#: dlltool.c:3052
+#: dlltool.c:3156
#, c-format
msgid " -p --ext-prefix-alias <prefix> Add aliases with <prefix>.\n"
msgstr ""
-#: dlltool.c:3053
+#: dlltool.c:3157
#, c-format
msgid " -S --as <name> Use <name> for assembler.\n"
msgstr ""
-#: dlltool.c:3054
+#: dlltool.c:3158
#, c-format
msgid " -f --as-flags <flags> Pass <flags> to the assembler.\n"
msgstr ""
-#: dlltool.c:3055
+#: dlltool.c:3159
#, c-format
msgid ""
" -C --compat-implib Create backward compatible import library.\n"
msgstr ""
-#: dlltool.c:3056
+#: dlltool.c:3160
#, c-format
msgid ""
" -n --no-delete Keep temp files (repeat for extra "
"preservation).\n"
msgstr ""
-#: dlltool.c:3057
+#: dlltool.c:3161
#, c-format
msgid ""
" -t --temp-prefix <prefix> Use <prefix> to construct temp file names.\n"
msgstr ""
-#: dlltool.c:3058
+#: dlltool.c:3162
#, c-format
msgid " -v --verbose Be verbose.\n"
msgstr ""
-#: dlltool.c:3059
+#: dlltool.c:3163
#, c-format
msgid " -V --version Display the program version.\n"
msgstr ""
-#: dlltool.c:3060
+#: dlltool.c:3164
#, c-format
msgid " -h --help Display this information.\n"
msgstr ""
-#: dlltool.c:3061
+#: dlltool.c:3165
#, c-format
msgid " @<file> Read options from <file>.\n"
msgstr ""
-#: dlltool.c:3063
+#: dlltool.c:3167
#, c-format
msgid ""
" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"
msgstr ""
-#: dlltool.c:3064
+#: dlltool.c:3168
#, c-format
msgid " -L --linker <name> Use <name> as the linker.\n"
msgstr ""
-#: dlltool.c:3065
+#: dlltool.c:3169
#, c-format
msgid " -F --linker-flags <flags> Pass <flags> to the linker.\n"
msgstr ""
-#: dlltool.c:3181
+#: dlltool.c:3292
#, c-format
msgid "Path components stripped from dllname, '%s'."
msgstr ""
-#: dlltool.c:3226
+#: dlltool.c:3337
#, c-format
msgid "Unable to open base-file: %s"
msgstr ""
-#: dlltool.c:3258
+#: dlltool.c:3369
#, c-format
msgid "Machine '%s' not supported"
msgstr ""
-#: dlltool.c:3362 dllwrap.c:204
+#: dlltool.c:3473 dllwrap.c:201
#, c-format
msgid "Tried file: %s"
msgstr ""
-#: dlltool.c:3369 dllwrap.c:211
+#: dlltool.c:3480 dllwrap.c:208
#, c-format
msgid "Using file: %s"
msgstr ""
-#: dllwrap.c:294
+#: dllwrap.c:291
#, c-format
msgid "Keeping temporary base file %s"
msgstr ""
-#: dllwrap.c:296
+#: dllwrap.c:293
#, c-format
msgid "Deleting temporary base file %s"
msgstr ""
-#: dllwrap.c:310
+#: dllwrap.c:307
#, c-format
msgid "Keeping temporary exp file %s"
msgstr ""
-#: dllwrap.c:312
+#: dllwrap.c:309
#, c-format
msgid "Deleting temporary exp file %s"
msgstr ""
-#: dllwrap.c:325
+#: dllwrap.c:322
#, c-format
msgid "Keeping temporary def file %s"
msgstr ""
-#: dllwrap.c:327
+#: dllwrap.c:324
#, c-format
msgid "Deleting temporary def file %s"
msgstr ""
-#: dllwrap.c:475
+#: dllwrap.c:472
#, c-format
msgid " Generic options:\n"
msgstr ""
-#: dllwrap.c:476
+#: dllwrap.c:473
#, c-format
msgid " @<file> Read options from <file>\n"
msgstr ""
-#: dllwrap.c:477
+#: dllwrap.c:474
#, c-format
msgid " --quiet, -q Work quietly\n"
msgstr ""
-#: dllwrap.c:478
+#: dllwrap.c:475
#, c-format
msgid " --verbose, -v Verbose\n"
msgstr ""
-#: dllwrap.c:479
+#: dllwrap.c:476
#, c-format
msgid " --version Print dllwrap version\n"
msgstr ""
-#: dllwrap.c:480
+#: dllwrap.c:477
#, c-format
msgid " --implib <outname> Synonym for --output-lib\n"
msgstr ""
-#: dllwrap.c:481
+#: dllwrap.c:478
#, c-format
msgid " Options for %s:\n"
msgstr ""
-#: dllwrap.c:482
+#: dllwrap.c:479
#, c-format
msgid " --driver-name <driver> Defaults to \"gcc\"\n"
msgstr ""
-#: dllwrap.c:483
+#: dllwrap.c:480
#, c-format
msgid " --driver-flags <flags> Override default ld flags\n"
msgstr ""
-#: dllwrap.c:484
+#: dllwrap.c:481
#, c-format
msgid " --dlltool-name <dlltool> Defaults to \"dlltool\"\n"
msgstr ""
-#: dllwrap.c:485
+#: dllwrap.c:482
#, c-format
msgid " --entry <entry> Specify alternate DLL entry point\n"
msgstr ""
-#: dllwrap.c:486
+#: dllwrap.c:483
#, c-format
msgid " --image-base <base> Specify image base address\n"
msgstr ""
-#: dllwrap.c:487
+#: dllwrap.c:484
#, c-format
msgid " --target <machine> i386-cygwin32 or i386-mingw32\n"
msgstr ""
-#: dllwrap.c:488
+#: dllwrap.c:485
#, c-format
msgid " --dry-run Show what needs to be run\n"
msgstr ""
-#: dllwrap.c:489
+#: dllwrap.c:486
#, c-format
msgid " --mno-cygwin Create Mingw DLL\n"
msgstr ""
-#: dllwrap.c:490
+#: dllwrap.c:487
#, c-format
msgid " Options passed to DLLTOOL:\n"
msgstr ""
-#: dllwrap.c:491
+#: dllwrap.c:488
#, c-format
msgid " --machine <machine>\n"
msgstr ""
-#: dllwrap.c:492
+#: dllwrap.c:489
#, c-format
msgid " --output-exp <outname> Generate export file.\n"
msgstr ""
-#: dllwrap.c:493
+#: dllwrap.c:490
#, c-format
msgid " --output-lib <outname> Generate input library.\n"
msgstr ""
-#: dllwrap.c:494
+#: dllwrap.c:491
#, c-format
msgid " --add-indirect Add dll indirects to export file.\n"
msgstr ""
-#: dllwrap.c:495
+#: dllwrap.c:492
#, c-format
msgid " --dllname <name> Name of input dll to put into output lib.\n"
msgstr ""
-#: dllwrap.c:496
+#: dllwrap.c:493
#, c-format
msgid " --def <deffile> Name input .def file\n"
msgstr ""
-#: dllwrap.c:497
+#: dllwrap.c:494
#, c-format
msgid " --output-def <deffile> Name output .def file\n"
msgstr ""
-#: dllwrap.c:498
+#: dllwrap.c:495
#, c-format
msgid " --export-all-symbols Export all symbols to .def\n"
msgstr ""
-#: dllwrap.c:499
+#: dllwrap.c:496
#, c-format
msgid " --no-export-all-symbols Only export .drectve symbols\n"
msgstr ""
-#: dllwrap.c:500
+#: dllwrap.c:497
#, c-format
msgid " --exclude-symbols <list> Exclude <list> from .def\n"
msgstr ""
-#: dllwrap.c:501
+#: dllwrap.c:498
#, c-format
msgid " --no-default-excludes Zap default exclude symbols\n"
msgstr ""
-#: dllwrap.c:502
+#: dllwrap.c:499
#, c-format
msgid " --base-file <basefile> Read linker generated base file\n"
msgstr ""
-#: dllwrap.c:503
+#: dllwrap.c:500
#, c-format
msgid " --no-idata4 Don't generate idata$4 section\n"
msgstr ""
-#: dllwrap.c:504
+#: dllwrap.c:501
#, c-format
msgid " --no-idata5 Don't generate idata$5 section\n"
msgstr ""
-#: dllwrap.c:505
+#: dllwrap.c:502
#, c-format
msgid " -U Add underscores to .lib\n"
msgstr ""
-#: dllwrap.c:506
+#: dllwrap.c:503
#, c-format
msgid " -k Kill @<n> from exported names\n"
msgstr ""
-#: dllwrap.c:507
+#: dllwrap.c:504
#, c-format
msgid " --add-stdcall-alias Add aliases without @<n>\n"
msgstr ""
-#: dllwrap.c:508
+#: dllwrap.c:505
#, c-format
msgid " --as <name> Use <name> for assembler\n"
msgstr ""
-#: dllwrap.c:509
+#: dllwrap.c:506
#, c-format
msgid " --nodelete Keep temp files.\n"
msgstr ""
-#: dllwrap.c:510
+#: dllwrap.c:507
#, c-format
msgid " Rest are passed unmodified to the language driver\n"
msgstr ""
-#: dllwrap.c:782
+#: dllwrap.c:781
msgid "Must provide at least one of -o or --dllname options"
msgstr ""
-#: dllwrap.c:811
+#: dllwrap.c:810
msgid ""
"no export definition file provided.\n"
"Creating one, but that may not be what you want"
msgstr ""
-#: dllwrap.c:970
+#: dllwrap.c:969
#, c-format
msgid "DLLTOOL name : %s\n"
msgstr ""
-#: dllwrap.c:971
+#: dllwrap.c:970
#, c-format
msgid "DLLTOOL options : %s\n"
msgstr ""
-#: dllwrap.c:972
+#: dllwrap.c:971
#, c-format
msgid "DRIVER name : %s\n"
msgstr ""
-#: dllwrap.c:973
+#: dllwrap.c:972
#, c-format
msgid "DRIVER options : %s\n"
msgstr ""
-#: dwarf.c:93 dwarf.c:137 readelf.c:322 readelf.c:515
+#: dwarf.c:93 dwarf.c:137 readelf.c:377 readelf.c:570
#, c-format
msgid "Unhandled data length: %d\n"
msgstr ""
@@ -1183,7 +1206,7 @@ msgstr ""
msgid " define new File Table entry\n"
msgstr ""
-#: dwarf.c:261 dwarf.c:1944
+#: dwarf.c:261 dwarf.c:1928
#, c-format
msgid " Entry\tDir\tTime\tSize\tName\n"
msgstr ""
@@ -1193,7 +1216,7 @@ msgstr ""
msgid " %d\t"
msgstr ""
-#: dwarf.c:266 dwarf.c:268 dwarf.c:270 dwarf.c:1956 dwarf.c:1958 dwarf.c:1960
+#: dwarf.c:266 dwarf.c:268 dwarf.c:270 dwarf.c:1940 dwarf.c:1942 dwarf.c:1944
#, c-format
msgid "%lu\t"
msgstr ""
@@ -1238,154 +1261,152 @@ msgstr ""
msgid " %lu byte block: "
msgstr ""
-#: dwarf.c:907
+#: dwarf.c:910
#, c-format
msgid "(User defined location op)"
msgstr ""
-#: dwarf.c:909
+#: dwarf.c:912
#, c-format
msgid "(Unknown location op)"
msgstr ""
-#: dwarf.c:955
+#: dwarf.c:958
msgid "Internal error: DWARF version is not 2 or 3.\n"
msgstr ""
-#: dwarf.c:1053
+#: dwarf.c:1056
msgid "DW_FORM_data8 is unsupported when sizeof (unsigned long) != 8\n"
msgstr ""
-#: dwarf.c:1102
+#: dwarf.c:1105
#, c-format
msgid " (indirect string, offset: 0x%lx): %s"
msgstr ""
-#: dwarf.c:1111
+#: dwarf.c:1114
#, c-format
msgid "Unrecognized form: %lu\n"
msgstr ""
-#: dwarf.c:1196
+#: dwarf.c:1199
#, c-format
msgid "(not inlined)"
msgstr ""
-#: dwarf.c:1199
+#: dwarf.c:1202
#, c-format
msgid "(inlined)"
msgstr ""
-#: dwarf.c:1202
+#: dwarf.c:1205
#, c-format
msgid "(declared as inline but ignored)"
msgstr ""
-#: dwarf.c:1205
+#: dwarf.c:1208
#, c-format
msgid "(declared as inline and inlined)"
msgstr ""
-#: dwarf.c:1208
+#: dwarf.c:1211
#, c-format
msgid " (Unknown inline attribute value: %lx)"
msgstr ""
-#: dwarf.c:1354 dwarf.c:2484
+#: dwarf.c:1368 dwarf.c:2462
#, c-format
msgid " [without DW_AT_frame_base]"
msgstr ""
-#: dwarf.c:1357
+#: dwarf.c:1371
#, c-format
msgid "(location list)"
msgstr ""
-#: dwarf.c:1475
+#: dwarf.c:1489
#, c-format
msgid "Unknown AT value: %lx"
msgstr ""
-#: dwarf.c:1544
+#: dwarf.c:1558
#, c-format
msgid "No comp units in %s section ?"
msgstr ""
-#: dwarf.c:1553
+#: dwarf.c:1567
#, c-format
msgid "Not enough memory for a debug info array of %u entries"
msgstr ""
-#: dwarf.c:1561 dwarf.c:2573
+#: dwarf.c:1575 dwarf.c:2550
#, c-format
msgid ""
"The section %s contains:\n"
"\n"
msgstr ""
-#: dwarf.c:1569
+#: dwarf.c:1583
#, c-format
msgid "Unable to locate %s section!\n"
msgstr ""
-#: dwarf.c:1635
+#: dwarf.c:1646
#, c-format
msgid " Compilation Unit @ offset 0x%lx:\n"
msgstr ""
-#: dwarf.c:1636
+#: dwarf.c:1647
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: dwarf.c:1637
+#: dwarf.c:1648
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: dwarf.c:1638
+#: dwarf.c:1649
#, c-format
msgid " Abbrev Offset: %ld\n"
msgstr ""
-#: dwarf.c:1639
+#: dwarf.c:1650
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: dwarf.c:1644
-msgid "Only version 2 and 3 DWARF debug information is currently supported.\n"
+#: dwarf.c:1656
+#, c-format
+msgid "Debug info is corrupted, length is invalid (section is %lu bytes)\n"
msgstr ""
-#: dwarf.c:1685
-#, c-format
-msgid "Unable to locate entry %lu in the abbreviation table\n"
+#: dwarf.c:1665
+msgid "Only version 2 and 3 DWARF debug information is currently supported.\n"
msgstr ""
-#: dwarf.c:1691
+#: dwarf.c:1674
#, c-format
-msgid " <%d><%lx>: Abbrev Number: %lu (%s)\n"
+msgid ""
+"Debug info is corrupted, abbrev offset is invalid (section is %lu bytes)\n"
msgstr ""
-#: dwarf.c:1785
+#: dwarf.c:1702
#, c-format
-msgid "%s section needs a populated .debug_info section\n"
+msgid " <%d><%lx>: Abbrev Number: %lu"
msgstr ""
-#: dwarf.c:1792
+#: dwarf.c:1722
#, c-format
-msgid "%s section has more comp units than .debug_info section\n"
+msgid "Unable to locate entry %lu in the abbreviation table\n"
msgstr ""
-#: dwarf.c:1794
+#: dwarf.c:1728
#, c-format
-msgid ""
-"assuming that the pointer size is %d, from the last comp unit in ."
-"debug_info\n"
-"\n"
+msgid " (%s)\n"
msgstr ""
-#: dwarf.c:1819
+#: dwarf.c:1813
#, c-format
msgid ""
"\n"
@@ -1393,289 +1414,280 @@ msgid ""
"\n"
msgstr ""
-#: dwarf.c:1858
+#: dwarf.c:1851
msgid "The line info appears to be corrupt - the section is too small\n"
msgstr ""
-#: dwarf.c:1867
+#: dwarf.c:1860
msgid "Only DWARF version 2 and 3 line info is currently supported.\n"
msgstr ""
-#: dwarf.c:1894
+#: dwarf.c:1881
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: dwarf.c:1895
+#: dwarf.c:1882
#, c-format
msgid " DWARF Version: %d\n"
msgstr ""
-#: dwarf.c:1896
+#: dwarf.c:1883
#, c-format
msgid " Prologue Length: %d\n"
msgstr ""
-#: dwarf.c:1897
+#: dwarf.c:1884
#, c-format
msgid " Minimum Instruction Length: %d\n"
msgstr ""
-#: dwarf.c:1898
+#: dwarf.c:1885
#, c-format
msgid " Initial value of 'is_stmt': %d\n"
msgstr ""
-#: dwarf.c:1899
+#: dwarf.c:1886
#, c-format
msgid " Line Base: %d\n"
msgstr ""
-#: dwarf.c:1900
+#: dwarf.c:1887
#, c-format
msgid " Line Range: %d\n"
msgstr ""
-#: dwarf.c:1901
+#: dwarf.c:1888
#, c-format
msgid " Opcode Base: %d\n"
msgstr ""
-#: dwarf.c:1902
-#, c-format
-msgid " (Pointer size: %u)%s\n"
-msgstr ""
-
-#: dwarf.c:1913
+#: dwarf.c:1897
#, c-format
msgid ""
"\n"
" Opcodes:\n"
msgstr ""
-#: dwarf.c:1916
+#: dwarf.c:1900
#, c-format
msgid " Opcode %d has %d args\n"
msgstr ""
-#: dwarf.c:1922
+#: dwarf.c:1906
#, c-format
msgid ""
"\n"
" The Directory Table is empty.\n"
msgstr ""
-#: dwarf.c:1925
+#: dwarf.c:1909
#, c-format
msgid ""
"\n"
" The Directory Table:\n"
msgstr ""
-#: dwarf.c:1929
+#: dwarf.c:1913
#, c-format
msgid " %s\n"
msgstr ""
-#: dwarf.c:1940
+#: dwarf.c:1924
#, c-format
msgid ""
"\n"
" The File Name Table is empty.\n"
msgstr ""
-#: dwarf.c:1943
+#: dwarf.c:1927
#, c-format
msgid ""
"\n"
" The File Name Table:\n"
msgstr ""
-#: dwarf.c:1951
+#: dwarf.c:1935
#, c-format
msgid " %d\t"
msgstr ""
-#: dwarf.c:1962
+#: dwarf.c:1946
#, c-format
msgid "%s\n"
msgstr ""
#. Now display the statements.
-#: dwarf.c:1970
+#: dwarf.c:1954
#, c-format
msgid ""
"\n"
" Line Number Statements:\n"
msgstr ""
-#: dwarf.c:1986
+#: dwarf.c:1970
#, c-format
msgid " Special opcode %d: advance Address by %lu to 0x%lx"
msgstr ""
-#: dwarf.c:1990
+#: dwarf.c:1974
#, c-format
msgid " and Line by %d to %d\n"
msgstr ""
-#: dwarf.c:1998
-msgid "Extend line ops need a valid pointer size, guessing at 4\n"
-msgstr ""
-
-#: dwarf.c:2007
+#: dwarf.c:1984
#, c-format
msgid " Copy\n"
msgstr ""
-#: dwarf.c:2015
+#: dwarf.c:1992
#, c-format
msgid " Advance PC by %lu to 0x%lx\n"
msgstr ""
-#: dwarf.c:2023
+#: dwarf.c:2000
#, c-format
msgid " Advance Line by %d to %d\n"
msgstr ""
-#: dwarf.c:2030
+#: dwarf.c:2007
#, c-format
msgid " Set File Name to entry %d in the File Name Table\n"
msgstr ""
-#: dwarf.c:2038
+#: dwarf.c:2015
#, c-format
msgid " Set column to %lu\n"
msgstr ""
-#: dwarf.c:2045
+#: dwarf.c:2022
#, c-format
msgid " Set is_stmt to %d\n"
msgstr ""
-#: dwarf.c:2050
+#: dwarf.c:2027
#, c-format
msgid " Set basic block\n"
msgstr ""
-#: dwarf.c:2058
+#: dwarf.c:2035
#, c-format
msgid " Advance PC by constant %lu to 0x%lx\n"
msgstr ""
-#: dwarf.c:2066
+#: dwarf.c:2043
#, c-format
msgid " Advance PC by fixed size amount %lu to 0x%lx\n"
msgstr ""
-#: dwarf.c:2071
+#: dwarf.c:2048
#, c-format
msgid " Set prologue_end to true\n"
msgstr ""
-#: dwarf.c:2075
+#: dwarf.c:2052
#, c-format
msgid " Set epilogue_begin to true\n"
msgstr ""
-#: dwarf.c:2081
+#: dwarf.c:2058
#, c-format
msgid " Set ISA to %lu\n"
msgstr ""
-#: dwarf.c:2085
+#: dwarf.c:2062
#, c-format
msgid " Unknown opcode %d with operands: "
msgstr ""
-#: dwarf.c:2111 dwarf.c:2197 dwarf.c:2271 dwarf.c:2382 dwarf.c:2514
-#: dwarf.c:2739
+#: dwarf.c:2088 dwarf.c:2174 dwarf.c:2248 dwarf.c:2360 dwarf.c:2492
+#: dwarf.c:2731
#, c-format
msgid ""
"Contents of the %s section:\n"
"\n"
msgstr ""
-#: dwarf.c:2151
+#: dwarf.c:2128
msgid "Only DWARF 2 and 3 pubnames are currently supported\n"
msgstr ""
-#: dwarf.c:2158
+#: dwarf.c:2135
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: dwarf.c:2160
+#: dwarf.c:2137
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: dwarf.c:2162
+#: dwarf.c:2139
#, c-format
msgid " Offset into .debug_info section: %ld\n"
msgstr ""
-#: dwarf.c:2164
+#: dwarf.c:2141
#, c-format
msgid " Size of area in .debug_info section: %ld\n"
msgstr ""
-#: dwarf.c:2167
+#: dwarf.c:2144
#, c-format
msgid ""
"\n"
" Offset\tName\n"
msgstr ""
-#: dwarf.c:2218
+#: dwarf.c:2195
#, c-format
msgid " DW_MACINFO_start_file - lineno: %d filenum: %d\n"
msgstr ""
-#: dwarf.c:2224
+#: dwarf.c:2201
#, c-format
msgid " DW_MACINFO_end_file\n"
msgstr ""
-#: dwarf.c:2232
+#: dwarf.c:2209
#, c-format
msgid " DW_MACINFO_define - lineno : %d macro : %s\n"
msgstr ""
-#: dwarf.c:2241
+#: dwarf.c:2218
#, c-format
msgid " DW_MACINFO_undef - lineno : %d macro : %s\n"
msgstr ""
-#: dwarf.c:2253
+#: dwarf.c:2230
#, c-format
msgid " DW_MACINFO_vendor_ext - constant : %d string : %s\n"
msgstr ""
-#: dwarf.c:2282
+#: dwarf.c:2259
#, c-format
msgid " Number TAG\n"
msgstr ""
-#: dwarf.c:2288
+#: dwarf.c:2265
#, c-format
msgid " %ld %s [%s]\n"
msgstr ""
-#: dwarf.c:2291
+#: dwarf.c:2268
msgid "has children"
msgstr ""
-#: dwarf.c:2291
+#: dwarf.c:2268
msgid "no children"
msgstr ""
-#: dwarf.c:2294
+#: dwarf.c:2271
#, c-format
msgid " %-18s %s\n"
msgstr ""
-#: dwarf.c:2327 dwarf.c:2510 dwarf.c:2684
+#: dwarf.c:2304 dwarf.c:2488 dwarf.c:2675
#, c-format
msgid ""
"\n"
@@ -1683,148 +1695,164 @@ msgid ""
msgstr ""
#. FIXME: Should we handle this case?
-#: dwarf.c:2372
+#: dwarf.c:2349
msgid "Location lists in .debug_info section aren't in ascending order!\n"
msgstr ""
-#: dwarf.c:2375
+#: dwarf.c:2352
msgid "No location lists in .debug_info section!\n"
msgstr ""
-#: dwarf.c:2379
+#: dwarf.c:2357
#, c-format
msgid "Location lists in %s section start at 0x%lx\n"
msgstr ""
-#: dwarf.c:2383
+#: dwarf.c:2361
#, c-format
msgid " Offset Begin End Expression\n"
msgstr ""
-#: dwarf.c:2414
+#: dwarf.c:2392
#, c-format
msgid "There is a hole [0x%lx - 0x%lx] in .debug_loc section.\n"
msgstr ""
-#: dwarf.c:2417
+#: dwarf.c:2395
#, c-format
msgid "There is an overlap [0x%lx - 0x%lx] in .debug_loc section.\n"
msgstr ""
-#: dwarf.c:2424
+#: dwarf.c:2402
#, c-format
msgid "Offset 0x%lx is bigger than .debug_loc section size.\n"
msgstr ""
-#: dwarf.c:2433 dwarf.c:2460 dwarf.c:2470
+#: dwarf.c:2411 dwarf.c:2438 dwarf.c:2448
#, c-format
msgid "Location list starting at offset 0x%lx is not terminated.\n"
msgstr ""
-#: dwarf.c:2445 dwarf.c:2784
+#: dwarf.c:2423 dwarf.c:2776
#, c-format
msgid " %8.8lx <End of list>\n"
msgstr ""
-#: dwarf.c:2453
+#: dwarf.c:2431
#, c-format
msgid " %8.8lx %8.8lx %8.8lx (base address)\n"
msgstr ""
-#: dwarf.c:2487 dwarf.c:2801
+#: dwarf.c:2465 dwarf.c:2793
msgid " (start == end)"
msgstr ""
-#: dwarf.c:2489 dwarf.c:2803
+#: dwarf.c:2467 dwarf.c:2795
msgid " (start > end)"
msgstr ""
-#: dwarf.c:2618
+#: dwarf.c:2596
msgid "Only DWARF 2 and 3 aranges are currently supported.\n"
msgstr ""
-#: dwarf.c:2622
+#: dwarf.c:2600
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: dwarf.c:2623
+#: dwarf.c:2601
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: dwarf.c:2624
+#: dwarf.c:2602
#, c-format
msgid " Offset into .debug_info: %lx\n"
msgstr ""
-#: dwarf.c:2625
+#: dwarf.c:2603
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: dwarf.c:2626
+#: dwarf.c:2604
#, c-format
msgid " Segment Size: %d\n"
msgstr ""
-#: dwarf.c:2628
+#: dwarf.c:2613
+msgid "Pointer size + Segment size is not a power of two.\n"
+msgstr ""
+
+#: dwarf.c:2618
#, c-format
msgid ""
"\n"
-" Address Length\n"
+" Address Length\n"
+msgstr ""
+
+#: dwarf.c:2620
+#, c-format
+msgid ""
+"\n"
+" Address Length\n"
msgstr ""
#. FIXME: Should we handle this case?
-#: dwarf.c:2729
+#: dwarf.c:2720
msgid "Range lists in .debug_info section aren't in ascending order!\n"
msgstr ""
-#: dwarf.c:2732
+#: dwarf.c:2723
msgid "No range lists in .debug_info section!\n"
msgstr ""
-#: dwarf.c:2736
+#: dwarf.c:2728
#, c-format
msgid "Range lists in %s section start at 0x%lx\n"
msgstr ""
-#: dwarf.c:2740
+#: dwarf.c:2732
#, c-format
msgid " Offset Begin End\n"
msgstr ""
-#: dwarf.c:2765
+#: dwarf.c:2757
#, c-format
msgid "There is a hole [0x%lx - 0x%lx] in %s section.\n"
msgstr ""
-#: dwarf.c:2769
+#: dwarf.c:2761
#, c-format
msgid "There is an overlap [0x%lx - 0x%lx] in %s section.\n"
msgstr ""
-#: dwarf.c:2964
+#: dwarf.c:2963
#, c-format
msgid "The section %s contains:\n"
msgstr ""
-#: dwarf.c:3608
+#: dwarf.c:3650
+#, c-format
+msgid " DW_CFA_??? (User defined call frame op: %#x)\n"
+msgstr ""
+
+#: dwarf.c:3652
#, c-format
-msgid "unsupported or unknown DW_CFA_%d\n"
+msgid "unsupported or unknown Dwarf Call Frame Instruction number: %#x\n"
msgstr ""
-#: dwarf.c:3632
+#: dwarf.c:3676
#, c-format
msgid "Displaying the debug contents of section %s is not yet supported.\n"
msgstr ""
-#: dwarf.c:3674
+#: dwarf.c:3718
#, c-format
msgid "%s: Error: "
msgstr ""
-#: dwarf.c:3685
+#: dwarf.c:3729
#, c-format
msgid "%s: Warning: "
msgstr ""
@@ -1849,223 +1877,223 @@ msgstr ""
msgid " [-X32_64] - accepts 32 and 64 bit objects\n"
msgstr ""
-#: ieee.c:311
+#: ieee.c:309
msgid "unexpected end of debugging information"
msgstr ""
-#: ieee.c:398
+#: ieee.c:396
msgid "invalid number"
msgstr ""
-#: ieee.c:451
+#: ieee.c:449
msgid "invalid string length"
msgstr ""
-#: ieee.c:506 ieee.c:547
+#: ieee.c:504 ieee.c:545
msgid "expression stack overflow"
msgstr ""
-#: ieee.c:526
+#: ieee.c:524
msgid "unsupported IEEE expression operator"
msgstr ""
-#: ieee.c:541
+#: ieee.c:539
msgid "unknown section"
msgstr ""
-#: ieee.c:562
+#: ieee.c:560
msgid "expression stack underflow"
msgstr ""
-#: ieee.c:576
+#: ieee.c:574
msgid "expression stack mismatch"
msgstr ""
-#: ieee.c:613
+#: ieee.c:611
msgid "unknown builtin type"
msgstr ""
-#: ieee.c:758
+#: ieee.c:756
msgid "BCD float type not supported"
msgstr ""
-#: ieee.c:895
+#: ieee.c:893
msgid "unexpected number"
msgstr ""
-#: ieee.c:902
+#: ieee.c:900
msgid "unexpected record type"
msgstr ""
-#: ieee.c:935
+#: ieee.c:933
msgid "blocks left on stack at end"
msgstr ""
-#: ieee.c:1198
+#: ieee.c:1196
msgid "unknown BB type"
msgstr ""
-#: ieee.c:1207
+#: ieee.c:1205
msgid "stack overflow"
msgstr ""
-#: ieee.c:1230
+#: ieee.c:1228
msgid "stack underflow"
msgstr ""
-#: ieee.c:1342 ieee.c:1412 ieee.c:2109
+#: ieee.c:1340 ieee.c:1410 ieee.c:2107
msgid "illegal variable index"
msgstr ""
-#: ieee.c:1390
+#: ieee.c:1388
msgid "illegal type index"
msgstr ""
-#: ieee.c:1400 ieee.c:1437
+#: ieee.c:1398 ieee.c:1435
msgid "unknown TY code"
msgstr ""
-#: ieee.c:1419
+#: ieee.c:1417
msgid "undefined variable in TY"
msgstr ""
#. Pascal file name. FIXME.
-#: ieee.c:1830
+#: ieee.c:1828
msgid "Pascal file name not supported"
msgstr ""
-#: ieee.c:1878
+#: ieee.c:1876
msgid "unsupported qualifier"
msgstr ""
-#: ieee.c:2147
+#: ieee.c:2145
msgid "undefined variable in ATN"
msgstr ""
-#: ieee.c:2190
+#: ieee.c:2188
msgid "unknown ATN type"
msgstr ""
#. Reserved for FORTRAN common.
-#: ieee.c:2312
+#: ieee.c:2310
msgid "unsupported ATN11"
msgstr ""
#. We have no way to record this information. FIXME.
-#: ieee.c:2339
+#: ieee.c:2337
msgid "unsupported ATN12"
msgstr ""
-#: ieee.c:2399
+#: ieee.c:2397
msgid "unexpected string in C++ misc"
msgstr ""
-#: ieee.c:2412
+#: ieee.c:2410
msgid "bad misc record"
msgstr ""
-#: ieee.c:2453
+#: ieee.c:2451
msgid "unrecognized C++ misc record"
msgstr ""
-#: ieee.c:2568
+#: ieee.c:2566
msgid "undefined C++ object"
msgstr ""
-#: ieee.c:2602
+#: ieee.c:2600
msgid "unrecognized C++ object spec"
msgstr ""
-#: ieee.c:2638
+#: ieee.c:2636
msgid "unsupported C++ object type"
msgstr ""
-#: ieee.c:2648
+#: ieee.c:2646
msgid "C++ base class not defined"
msgstr ""
-#: ieee.c:2660 ieee.c:2765
+#: ieee.c:2658 ieee.c:2763
msgid "C++ object has no fields"
msgstr ""
-#: ieee.c:2679
+#: ieee.c:2677
msgid "C++ base class not found in container"
msgstr ""
-#: ieee.c:2786
+#: ieee.c:2784
msgid "C++ data member not found in container"
msgstr ""
-#: ieee.c:2827 ieee.c:2977
+#: ieee.c:2825 ieee.c:2975
msgid "unknown C++ visibility"
msgstr ""
-#: ieee.c:2861
+#: ieee.c:2859
msgid "bad C++ field bit pos or size"
msgstr ""
-#: ieee.c:2953
+#: ieee.c:2951
msgid "bad type for C++ method function"
msgstr ""
-#: ieee.c:2963
+#: ieee.c:2961
msgid "no type information for C++ method function"
msgstr ""
-#: ieee.c:3002
+#: ieee.c:3000
msgid "C++ static virtual method"
msgstr ""
-#: ieee.c:3097
+#: ieee.c:3095
msgid "unrecognized C++ object overhead spec"
msgstr ""
-#: ieee.c:3136
+#: ieee.c:3134
msgid "undefined C++ vtable"
msgstr ""
-#: ieee.c:3205
+#: ieee.c:3203
msgid "C++ default values not in a function"
msgstr ""
-#: ieee.c:3245
+#: ieee.c:3243
msgid "unrecognized C++ default type"
msgstr ""
-#: ieee.c:3276
+#: ieee.c:3274
msgid "reference parameter is not a pointer"
msgstr ""
-#: ieee.c:3359
+#: ieee.c:3357
msgid "unrecognized C++ reference type"
msgstr ""
-#: ieee.c:3441
+#: ieee.c:3439
msgid "C++ reference not found"
msgstr ""
-#: ieee.c:3449
+#: ieee.c:3447
msgid "C++ reference is not pointer"
msgstr ""
-#: ieee.c:3475 ieee.c:3483
+#: ieee.c:3473 ieee.c:3481
msgid "missing required ASN"
msgstr ""
-#: ieee.c:3510 ieee.c:3518
+#: ieee.c:3508 ieee.c:3516
msgid "missing required ATN65"
msgstr ""
-#: ieee.c:3532
+#: ieee.c:3530
msgid "bad ATN65 record"
msgstr ""
-#: ieee.c:4160
+#: ieee.c:4158
#, c-format
msgid "IEEE numeric overflow: 0x"
msgstr ""
-#: ieee.c:4204
+#: ieee.c:4202
#, c-format
msgid "IEEE string length overflow: %u\n"
msgstr ""
@@ -2085,124 +2113,128 @@ msgstr ""
msgid "IEEE unsupported complex type size %u\n"
msgstr ""
-#: nlmconv.c:269 srconv.c:1813
+#: mclex.c:241
+msgid "Duplicate symbol entered into keyword list."
+msgstr ""
+
+#: nlmconv.c:271 srconv.c:1815
msgid "input and output files must be different"
msgstr ""
-#: nlmconv.c:316
+#: nlmconv.c:318
msgid "input file named both on command line and with INPUT"
msgstr ""
-#: nlmconv.c:325
+#: nlmconv.c:327
msgid "no input file"
msgstr ""
-#: nlmconv.c:355
+#: nlmconv.c:357
msgid "no name for output file"
msgstr ""
-#: nlmconv.c:369
+#: nlmconv.c:371
msgid "warning: input and output formats are not compatible"
msgstr ""
-#: nlmconv.c:398
+#: nlmconv.c:400
msgid "make .bss section"
msgstr ""
-#: nlmconv.c:407
+#: nlmconv.c:409
msgid "make .nlmsections section"
msgstr ""
-#: nlmconv.c:409
+#: nlmconv.c:411
msgid "set .nlmsections flags"
msgstr ""
-#: nlmconv.c:437
+#: nlmconv.c:439
msgid "set .bss vma"
msgstr ""
-#: nlmconv.c:444
+#: nlmconv.c:446
msgid "set .data size"
msgstr ""
-#: nlmconv.c:624
+#: nlmconv.c:626
#, c-format
msgid "warning: symbol %s imported but not in import list"
msgstr ""
-#: nlmconv.c:644
+#: nlmconv.c:646
msgid "set start address"
msgstr ""
-#: nlmconv.c:693
+#: nlmconv.c:695
#, c-format
msgid "warning: START procedure %s not defined"
msgstr ""
-#: nlmconv.c:695
+#: nlmconv.c:697
#, c-format
msgid "warning: EXIT procedure %s not defined"
msgstr ""
-#: nlmconv.c:697
+#: nlmconv.c:699
#, c-format
msgid "warning: CHECK procedure %s not defined"
msgstr ""
-#: nlmconv.c:718 nlmconv.c:907
+#: nlmconv.c:720 nlmconv.c:909
msgid "custom section"
msgstr ""
-#: nlmconv.c:739 nlmconv.c:936
+#: nlmconv.c:741 nlmconv.c:938
msgid "help section"
msgstr ""
-#: nlmconv.c:761 nlmconv.c:954
+#: nlmconv.c:763 nlmconv.c:956
msgid "message section"
msgstr ""
-#: nlmconv.c:777 nlmconv.c:987
+#: nlmconv.c:779 nlmconv.c:989
msgid "module section"
msgstr ""
-#: nlmconv.c:797 nlmconv.c:1003
+#: nlmconv.c:799 nlmconv.c:1005
msgid "rpc section"
msgstr ""
#. There is no place to record this information.
-#: nlmconv.c:833
+#: nlmconv.c:835
#, c-format
msgid "%s: warning: shared libraries can not have uninitialized data"
msgstr ""
-#: nlmconv.c:854 nlmconv.c:1022
+#: nlmconv.c:856 nlmconv.c:1024
msgid "shared section"
msgstr ""
-#: nlmconv.c:862
+#: nlmconv.c:864
msgid "warning: No version number given"
msgstr ""
-#: nlmconv.c:902 nlmconv.c:931 nlmconv.c:949 nlmconv.c:998 nlmconv.c:1017
+#: nlmconv.c:904 nlmconv.c:933 nlmconv.c:951 nlmconv.c:1000 nlmconv.c:1019
#, c-format
msgid "%s: read: %s"
msgstr ""
-#: nlmconv.c:924
+#: nlmconv.c:926
msgid "warning: FULLMAP is not supported; try ld -M"
msgstr ""
-#: nlmconv.c:1100
+#: nlmconv.c:1102
#, c-format
msgid "Usage: %s [option(s)] [in-file [out-file]]\n"
msgstr ""
-#: nlmconv.c:1101
+#: nlmconv.c:1103
#, c-format
msgid " Convert an object file into a NetWare Loadable Module\n"
msgstr ""
-#: nlmconv.c:1102
+#: nlmconv.c:1104
#, c-format
msgid ""
" The options are:\n"
@@ -2216,74 +2248,74 @@ msgid ""
" -v --version Display the program's version\n"
msgstr ""
-#: nlmconv.c:1143
+#: nlmconv.c:1145
#, c-format
msgid "support not compiled in for %s"
msgstr ""
-#: nlmconv.c:1180
+#: nlmconv.c:1182
msgid "make section"
msgstr ""
-#: nlmconv.c:1194
+#: nlmconv.c:1196
msgid "set section size"
msgstr ""
-#: nlmconv.c:1200
+#: nlmconv.c:1202
msgid "set section alignment"
msgstr ""
-#: nlmconv.c:1204
+#: nlmconv.c:1206
msgid "set section flags"
msgstr ""
-#: nlmconv.c:1215
+#: nlmconv.c:1217
msgid "set .nlmsections size"
msgstr ""
-#: nlmconv.c:1296 nlmconv.c:1304 nlmconv.c:1313 nlmconv.c:1318
+#: nlmconv.c:1298 nlmconv.c:1306 nlmconv.c:1315 nlmconv.c:1320
msgid "set .nlmsection contents"
msgstr ""
-#: nlmconv.c:1797
+#: nlmconv.c:1799
msgid "stub section sizes"
msgstr ""
-#: nlmconv.c:1844
+#: nlmconv.c:1846
msgid "writing stub"
msgstr ""
-#: nlmconv.c:1928
+#: nlmconv.c:1930
#, c-format
msgid "unresolved PC relative reloc against %s"
msgstr ""
-#: nlmconv.c:1992
+#: nlmconv.c:1994
#, c-format
msgid "overflow when adjusting relocation against %s"
msgstr ""
-#: nlmconv.c:2119
+#: nlmconv.c:2121
#, c-format
msgid "%s: execution of %s failed: "
msgstr ""
-#: nlmconv.c:2134
+#: nlmconv.c:2136
#, c-format
msgid "Execution of %s failed"
msgstr ""
-#: nm.c:224 size.c:82 strings.c:708
+#: nm.c:213 size.c:83 strings.c:705
#, c-format
msgid "Usage: %s [option(s)] [file(s)]\n"
msgstr ""
-#: nm.c:225
+#: nm.c:214
#, c-format
msgid " List symbols in [file(s)] (a.out by default).\n"
msgstr ""
-#: nm.c:226
+#: nm.c:215
#, c-format
msgid ""
" The options are:\n"
@@ -2327,44 +2359,39 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:263 objdump.c:236
-#, c-format
-msgid "Report bugs to %s.\n"
-msgstr ""
-
-#: nm.c:295
+#: nm.c:276
#, c-format
msgid "%s: invalid radix"
msgstr ""
-#: nm.c:319
+#: nm.c:300
#, c-format
msgid "%s: invalid output format"
msgstr ""
-#: nm.c:340 readelf.c:6623 readelf.c:6659
+#: nm.c:321 readelf.c:6853 readelf.c:6891
#, c-format
msgid "<processor specific>: %d"
msgstr ""
-#: nm.c:342 readelf.c:6626 readelf.c:6671
+#: nm.c:323 readelf.c:6856 readelf.c:6903
#, c-format
msgid "<OS specific>: %d"
msgstr ""
-#: nm.c:344 readelf.c:6628 readelf.c:6674
+#: nm.c:325 readelf.c:6858 readelf.c:6906
#, c-format
msgid "<unknown>: %d"
msgstr ""
-#: nm.c:381
+#: nm.c:365
#, c-format
msgid ""
"\n"
"Archive index:\n"
msgstr ""
-#: nm.c:1227
+#: nm.c:1225
#, c-format
msgid ""
"\n"
@@ -2373,7 +2400,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1229
+#: nm.c:1227
#, c-format
msgid ""
"\n"
@@ -2382,7 +2409,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1231 nm.c:1282
+#: nm.c:1229 nm.c:1280
#, c-format
msgid ""
"Name Value Class Type Size Line "
@@ -2390,7 +2417,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1234 nm.c:1285
+#: nm.c:1232 nm.c:1283
#, c-format
msgid ""
"Name Value Class Type "
@@ -2398,7 +2425,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1278
+#: nm.c:1276
#, c-format
msgid ""
"\n"
@@ -2407,7 +2434,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1280
+#: nm.c:1278
#, c-format
msgid ""
"\n"
@@ -2416,39 +2443,44 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1584
+#: nm.c:1370
+#, c-format
+msgid "Print width has not been initialized (%d)"
+msgstr ""
+
+#: nm.c:1595
msgid "Only -X 32_64 is supported"
msgstr ""
-#: nm.c:1604
+#: nm.c:1615
msgid "Using the --size-sort and --undefined-only options together"
msgstr ""
-#: nm.c:1605
+#: nm.c:1616
msgid "will produce no output, since undefined symbols have no size."
msgstr ""
-#: nm.c:1633
+#: nm.c:1644
#, c-format
msgid "data size %ld"
msgstr ""
-#: objcopy.c:401 srconv.c:1721
+#: objcopy.c:426 srconv.c:1723
#, c-format
msgid "Usage: %s [option(s)] in-file [out-file]\n"
msgstr ""
-#: objcopy.c:402
+#: objcopy.c:427
#, c-format
msgid " Copies a binary file, possibly transforming it in the process\n"
msgstr ""
-#: objcopy.c:403 objcopy.c:495
+#: objcopy.c:428 objcopy.c:524
#, c-format
msgid " The options are:\n"
msgstr ""
-#: objcopy.c:404
+#: objcopy.c:429
#, c-format
msgid ""
" -I --input-target <bfdname> Assume input file is in format <bfdname>\n"
@@ -2478,7 +2510,10 @@ msgid ""
" relocations\n"
" --only-keep-debug Strip everything but the debug "
"information\n"
+" --extract-symbol Remove section contents but keep symbols\n"
" -K --keep-symbol <name> Do not strip symbol <name>\n"
+" --keep-file-symbols Do not strip file symbol(s)\n"
+" --localize-hidden Turn all ELF hidden symbols into locals\n"
" -L --localize-symbol <name> Force symbol <name> to be marked as a "
"local\n"
" --globalize-symbol <name> Force symbol <name> to be marked as a "
@@ -2525,6 +2560,8 @@ msgid ""
"style\n"
" --remove-leading-char Remove leading character from global "
"symbols\n"
+" --reverse-bytes=<num> Reverse <num> bytes at a time, in output "
+"sections with content\n"
" --redefine-sym <old>=<new> Redefine symbol name <old> to <new>\n"
" --redefine-syms <file> --redefine-sym for all symbol pairs \n"
" listed in <file>\n"
@@ -2542,7 +2579,8 @@ msgid ""
" --globalize-symbols <file> --globalize-symbol for all 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"
+" --alt-machine-code <index> Use the target's <index>'th alternative "
+"machine\n"
" --writable-text Mark the output text as writable\n"
" --readonly-text Make the output text write protected\n"
" --pure Mark the output file as demand paged\n"
@@ -2563,17 +2601,17 @@ msgid ""
"supported\n"
msgstr ""
-#: objcopy.c:493
+#: objcopy.c:522
#, c-format
msgid "Usage: %s <option(s)> in-file(s)\n"
msgstr ""
-#: objcopy.c:494
+#: objcopy.c:523
#, c-format
msgid " Removes symbols and sections from files\n"
msgstr ""
-#: objcopy.c:496
+#: objcopy.c:525
#, c-format
msgid ""
" -I --input-target=<bfdname> Assume input file is in format <bfdname>\n"
@@ -2593,6 +2631,7 @@ msgid ""
"information\n"
" -N --strip-symbol=<name> Do not copy symbol <name>\n"
" -K --keep-symbol=<name> Do not strip symbol <name>\n"
+" --keep-file-symbols Do not strip file symbol(s)\n"
" -w --wildcard Permit wildcard in symbol comparison\n"
" -x --discard-all Remove all non-global symbols\n"
" -X --discard-locals Remove any compiler-generated symbols\n"
@@ -2604,260 +2643,297 @@ msgid ""
" -o <file> Place stripped output into <file>\n"
msgstr ""
-#: objcopy.c:568
+#: objcopy.c:598
#, c-format
msgid "unrecognized section flag `%s'"
msgstr ""
-#: objcopy.c:569
+#: objcopy.c:599
#, c-format
msgid "supported flags: %s"
msgstr ""
-#: objcopy.c:646
+#: objcopy.c:679
#, c-format
msgid "cannot open '%s': %s"
msgstr ""
-#: objcopy.c:649 objcopy.c:2722
+#: objcopy.c:682 objcopy.c:2987
#, c-format
msgid "%s: fread failed"
msgstr ""
-#: objcopy.c:722
+#: objcopy.c:755
#, c-format
msgid "%s:%d: Ignoring rubbish found on this line"
msgstr ""
-#: objcopy.c:996
+#: objcopy.c:1033
+#, c-format
+msgid "not stripping symbol `%s' because it is named in a relocation"
+msgstr ""
+
+#: objcopy.c:1116
#, c-format
msgid "%s: Multiple redefinition of symbol \"%s\""
msgstr ""
-#: objcopy.c:1000
+#: objcopy.c:1120
#, c-format
msgid "%s: Symbol \"%s\" is target of more than one redefinition"
msgstr ""
-#: objcopy.c:1028
+#: objcopy.c:1148
#, c-format
msgid "couldn't open symbol redefinition file %s (error: %s)"
msgstr ""
-#: objcopy.c:1106
+#: objcopy.c:1226
#, c-format
msgid "%s:%d: garbage found at end of line"
msgstr ""
-#: objcopy.c:1109
+#: objcopy.c:1229
#, c-format
msgid "%s:%d: missing new symbol name"
msgstr ""
-#: objcopy.c:1119
+#: objcopy.c:1239
#, c-format
msgid "%s:%d: premature end of file"
msgstr ""
-#: objcopy.c:1145
+#: objcopy.c:1265
#, c-format
msgid "stat returns negative size for `%s'"
msgstr ""
-#: objcopy.c:1157
+#: objcopy.c:1277
#, c-format
msgid "copy from `%s' [unknown] to `%s' [unknown]\n"
msgstr ""
-#: objcopy.c:1212
+#: objcopy.c:1332
msgid "Unable to change endianness of input file(s)"
msgstr ""
-#: objcopy.c:1221
+#: objcopy.c:1341
#, c-format
msgid "copy from `%s' [%s] to `%s' [%s]\n"
msgstr ""
-#: objcopy.c:1258 objcopy.c:1715
+#: objcopy.c:1383 objcopy.c:1908
#, c-format
msgid "Unable to recognise the format of the input file `%s'"
msgstr ""
-#: objcopy.c:1261
+#: objcopy.c:1386
#, c-format
msgid "Warning: Output file cannot represent architecture `%s'"
msgstr ""
-#: objcopy.c:1305
+#: objcopy.c:1449
#, c-format
-msgid "can't create section `%s': %s"
+msgid "can't add section '%s' - it already exists!"
msgstr ""
-#: objcopy.c:1356
-msgid "there are no sections to be copied!"
+#: objcopy.c:1457
+#, c-format
+msgid "can't create section `%s': %s"
msgstr ""
-#: objcopy.c:1402
+#: objcopy.c:1593
#, c-format
msgid "Can't fill gap after %s: %s"
msgstr ""
-#: objcopy.c:1427
+#: objcopy.c:1618
#, c-format
msgid "Can't add padding to %s: %s"
msgstr ""
-#: objcopy.c:1594
+#: objcopy.c:1771
#, c-format
msgid "%s: error copying private BFD data: %s"
msgstr ""
-#: objcopy.c:1605
-msgid "unknown alternate machine code, ignored"
+#: objcopy.c:1784
+#, c-format
+msgid "this target does not support %lu alternative machine codes"
msgstr ""
-#: objcopy.c:1635 objcopy.c:1665
-#, c-format
-msgid "cannot mkdir %s for archive copying (error: %s)"
+#: objcopy.c:1788
+msgid "treating that number as an absolute e_machine value instead"
+msgstr ""
+
+#: objcopy.c:1792
+msgid "ignoring the alternative value"
msgstr ""
-#: objcopy.c:1787
+#: objcopy.c:1822 objcopy.c:1852
#, c-format
-msgid "error: the input file '%s' is empty"
+msgid "cannot create tempdir for archive copying (error: %s)"
msgstr ""
-#: objcopy.c:1889
+#: objcopy.c:2088
#, c-format
msgid "Multiple renames of section %s"
msgstr ""
-#: objcopy.c:1940
+#: objcopy.c:2139
msgid "private header data"
msgstr ""
-#: objcopy.c:1948
+#: objcopy.c:2147
#, c-format
msgid "%s: error in %s: %s"
msgstr ""
-#: objcopy.c:2007
+#: objcopy.c:2208
msgid "making"
msgstr ""
-#: objcopy.c:2022
+#: objcopy.c:2228
msgid "size"
msgstr ""
-#: objcopy.c:2036
+#: objcopy.c:2242
msgid "vma"
msgstr ""
-#: objcopy.c:2061
+#: objcopy.c:2267
msgid "alignment"
msgstr ""
-#: objcopy.c:2083
+#: objcopy.c:2289
msgid "private data"
msgstr ""
-#: objcopy.c:2091
+#: objcopy.c:2304
#, c-format
msgid "%s: section `%s': error in %s: %s"
msgstr ""
-#: objcopy.c:2363
+#. User must pad the section up in order to do this.
+#: objcopy.c:2429
+#, c-format
+msgid ""
+"cannot reverse bytes: length of section %s must be evenly divisible by %d"
+msgstr ""
+
+#: objcopy.c:2605
#, c-format
msgid "%s: can't create debugging section: %s"
msgstr ""
-#: objcopy.c:2377
+#: objcopy.c:2619
#, c-format
msgid "%s: can't set debugging section contents: %s"
msgstr ""
-#: objcopy.c:2386
+#: objcopy.c:2628
#, c-format
msgid "%s: don't know how to write debugging information for %s"
msgstr ""
-#: objcopy.c:2561
+#: objcopy.c:2769
+#, c-format
+msgid "could not create temporary file to hold stripped copy of '%s'"
+msgstr ""
+
+#: objcopy.c:2819
msgid "byte number must be non-negative"
msgstr ""
-#: objcopy.c:2571
+#: objcopy.c:2829
msgid "interleave must be positive"
msgstr ""
-#: objcopy.c:2591 objcopy.c:2599
+#: objcopy.c:2849 objcopy.c:2857
#, c-format
msgid "%s both copied and removed"
msgstr ""
-#: objcopy.c:2696 objcopy.c:2767 objcopy.c:2867 objcopy.c:2898 objcopy.c:2922
-#: objcopy.c:2926 objcopy.c:2946
+#: objcopy.c:2958 objcopy.c:3032 objcopy.c:3132 objcopy.c:3163 objcopy.c:3187
+#: objcopy.c:3191 objcopy.c:3211
#, c-format
msgid "bad format for %s"
msgstr ""
-#: objcopy.c:2717
+#: objcopy.c:2982
#, c-format
msgid "cannot open: %s: %s"
msgstr ""
-#: objcopy.c:2836
+#: objcopy.c:3101
#, c-format
msgid "Warning: truncating gap-fill from 0x%s to 0x%x"
msgstr ""
-#: objcopy.c:3000
-msgid "alternate machine code index must be positive"
+#: objcopy.c:3269
+msgid "unable to parse alternative machine code"
+msgstr ""
+
+#: objcopy.c:3314
+msgid "number of bytes to reverse must be positive and even"
+msgstr ""
+
+#: objcopy.c:3317
+#, c-format
+msgid "Warning: ignoring previous --reverse-bytes value of %d"
msgstr ""
-#: objcopy.c:3058
+#: objcopy.c:3345
msgid "byte number must be less than interleave"
msgstr ""
-#: objcopy.c:3088
+#: objcopy.c:3375
#, c-format
msgid "architecture %s unknown"
msgstr ""
-#: objcopy.c:3092
+#: objcopy.c:3379
msgid ""
"Warning: input target 'binary' required for binary architecture parameter."
msgstr ""
-#: objcopy.c:3093
+#: objcopy.c:3380
#, c-format
msgid " Argument %s ignored"
msgstr ""
-#: objcopy.c:3099
+#: objcopy.c:3386
#, c-format
msgid "warning: could not locate '%s'. System error message: %s"
msgstr ""
-#: objcopy.c:3141 objcopy.c:3155
+#: objcopy.c:3397
+#, c-format
+msgid ""
+"warning: could not create temporary file whilst copying '%s', (error: %s)"
+msgstr ""
+
+#: objcopy.c:3424 objcopy.c:3438
#, c-format
msgid "%s %s%c0x%s never used"
msgstr ""
-#: objdump.c:178
+#: objdump.c:176
#, c-format
msgid "Usage: %s <option(s)> <file(s)>\n"
msgstr ""
-#: objdump.c:179
+#: objdump.c:177
#, c-format
msgid " Display information from object <file(s)>.\n"
msgstr ""
-#: objdump.c:180
+#: objdump.c:178
#, c-format
msgid " At least one of the following switches must be given:\n"
msgstr ""
-#: objdump.c:181
+#: objdump.c:179
#, c-format
msgid ""
" -a, --archive-headers Display archive header information\n"
@@ -2887,14 +2963,14 @@ msgid ""
" -H, --help Display this information\n"
msgstr ""
-#: objdump.c:206
+#: objdump.c:204
#, c-format
msgid ""
"\n"
" The following switches are optional:\n"
msgstr ""
-#: objdump.c:207
+#: objdump.c:205
#, c-format
msgid ""
" -b, --target=BFDNAME Specify the target object format as "
@@ -2931,347 +3007,364 @@ msgid ""
"\n"
msgstr ""
-#: objdump.c:389
+#: objdump.c:387
#, c-format
msgid "Sections:\n"
msgstr ""
-#: objdump.c:392 objdump.c:396
+#: objdump.c:390 objdump.c:394
#, c-format
msgid "Idx Name Size VMA LMA File off Algn"
msgstr ""
-#: objdump.c:398
+#: objdump.c:396
#, c-format
msgid ""
"Idx Name Size VMA LMA File off "
"Algn"
msgstr ""
-#: objdump.c:402
+#: objdump.c:400
#, c-format
msgid " Flags"
msgstr ""
-#: objdump.c:404
+#: objdump.c:402
#, c-format
msgid " Pg"
msgstr ""
-#: objdump.c:447
+#: objdump.c:445
#, c-format
msgid "%s: not a dynamic object"
msgstr ""
-#: objdump.c:1735
+#: objdump.c:1778
#, c-format
msgid "Disassembly of section %s:\n"
msgstr ""
-#: objdump.c:1897
+#: objdump.c:1940
#, c-format
msgid "Can't use supplied machine %s"
msgstr ""
-#: objdump.c:1916
+#: objdump.c:1959
#, c-format
msgid "Can't disassemble for architecture %s\n"
msgstr ""
-#: objdump.c:2006
+#: objdump.c:2064
#, c-format
msgid ""
"\n"
"Can't get contents for section '%s'.\n"
msgstr ""
-#: objdump.c:2143
+#: objdump.c:2201
#, c-format
msgid ""
"No %s section present\n"
"\n"
msgstr ""
-#: objdump.c:2152
+#: objdump.c:2210
#, c-format
msgid "Reading %s section of %s failed: %s"
msgstr ""
-#: objdump.c:2196
+#: objdump.c:2254
#, c-format
msgid ""
"Contents of %s section:\n"
"\n"
msgstr ""
-#: objdump.c:2323
+#: objdump.c:2381
#, c-format
msgid "architecture: %s, "
msgstr ""
-#: objdump.c:2326
+#: objdump.c:2384
#, c-format
msgid "flags 0x%08x:\n"
msgstr ""
-#: objdump.c:2340
+#: objdump.c:2398
#, c-format
msgid ""
"\n"
"start address 0x"
msgstr ""
-#: objdump.c:2380
+#: objdump.c:2438
#, c-format
msgid "Contents of section %s:\n"
msgstr ""
-#: objdump.c:2505
+#: objdump.c:2563
#, c-format
msgid "no symbols\n"
msgstr ""
-#: objdump.c:2512
+#: objdump.c:2570
#, c-format
msgid "no information for symbol number %ld\n"
msgstr ""
-#: objdump.c:2515
+#: objdump.c:2573
#, c-format
msgid "could not determine the type of symbol number %ld\n"
msgstr ""
-#: objdump.c:2788
+#: objdump.c:2850
#, c-format
msgid ""
"\n"
"%s: file format %s\n"
msgstr ""
-#: objdump.c:2845
+#: objdump.c:2908
#, c-format
msgid "%s: printing debugging information failed"
msgstr ""
-#: objdump.c:2936
+#: objdump.c:3002
#, c-format
msgid "In archive %s:\n"
msgstr ""
-#: objdump.c:3058
+#: objdump.c:3124
msgid "unrecognized -E option"
msgstr ""
-#: objdump.c:3069
+#: objdump.c:3135
#, c-format
msgid "unrecognized --endian type `%s'"
msgstr ""
-#: rdcoff.c:196
+#: rclex.c:196
+msgid "invalid value specified for pragma code_page.\n"
+msgstr ""
+
+#: rdcoff.c:198
#, c-format
msgid "parse_coff_type: Bad type code 0x%x"
msgstr ""
-#: rdcoff.c:404 rdcoff.c:509 rdcoff.c:697
+#: rdcoff.c:406 rdcoff.c:511 rdcoff.c:699
#, c-format
msgid "bfd_coff_get_syment failed: %s"
msgstr ""
-#: rdcoff.c:420 rdcoff.c:717
+#: rdcoff.c:422 rdcoff.c:719
#, c-format
msgid "bfd_coff_get_auxent failed: %s"
msgstr ""
-#: rdcoff.c:784
+#: rdcoff.c:786
#, c-format
msgid "%ld: .bf without preceding function"
msgstr ""
-#: rdcoff.c:834
+#: rdcoff.c:836
#, c-format
msgid "%ld: unexpected .ef\n"
msgstr ""
-#: rddbg.c:85
+#: rddbg.c:86
#, c-format
msgid "%s: no recognized debugging information"
msgstr ""
-#: rddbg.c:394
+#: rddbg.c:400
#, c-format
msgid "Last stabs entries before error:\n"
msgstr ""
-#: readelf.c:264
+#: readelf.c:319
#, c-format
msgid "Unable to seek to 0x%lx for %s\n"
msgstr ""
-#: readelf.c:279
+#: readelf.c:334
#, c-format
msgid "Out of memory allocating 0x%lx bytes for %s\n"
msgstr ""
-#: readelf.c:289
+#: readelf.c:344
#, c-format
msgid "Unable to read in 0x%lx bytes of %s\n"
msgstr ""
-#: readelf.c:623
+#: readelf.c:683
msgid "Don't know about relocations on this machine architecture\n"
msgstr ""
-#: readelf.c:643 readelf.c:671 readelf.c:715 readelf.c:743
+#: readelf.c:703 readelf.c:731 readelf.c:775 readelf.c:803
msgid "relocs"
msgstr ""
-#: readelf.c:654 readelf.c:682 readelf.c:726 readelf.c:754
-msgid "out of memory parsing relocs"
+#: readelf.c:714 readelf.c:742 readelf.c:786 readelf.c:814
+msgid "out of memory parsing relocs\n"
msgstr ""
-#: readelf.c:808
+#: readelf.c:868
#, c-format
msgid ""
" Offset Info Type Sym. Value Symbol's Name + Addend\n"
msgstr ""
-#: readelf.c:810
+#: readelf.c:870
#, c-format
msgid " Offset Info Type Sym.Value Sym. Name + Addend\n"
msgstr ""
-#: readelf.c:815
+#: readelf.c:875
#, c-format
msgid " Offset Info Type Sym. Value Symbol's Name\n"
msgstr ""
-#: readelf.c:817
+#: readelf.c:877
#, c-format
msgid " Offset Info Type Sym.Value Sym. Name\n"
msgstr ""
-#: readelf.c:825
+#: readelf.c:885
#, c-format
msgid ""
" Offset Info Type Symbol's Value "
"Symbol's Name + Addend\n"
msgstr ""
-#: readelf.c:827
+#: readelf.c:887
#, c-format
msgid ""
" Offset Info Type Sym. Value Sym. Name + "
"Addend\n"
msgstr ""
-#: readelf.c:832
+#: readelf.c:892
#, c-format
msgid ""
" Offset Info Type Symbol's Value "
"Symbol's Name\n"
msgstr ""
-#: readelf.c:834
+#: readelf.c:894
#, c-format
msgid ""
" Offset Info Type Sym. Value Sym. Name\n"
msgstr ""
-#: readelf.c:1127 readelf.c:1129 readelf.c:1238 readelf.c:1240 readelf.c:1249
-#: readelf.c:1251
+#: readelf.c:1198 readelf.c:1200 readelf.c:1318 readelf.c:1320 readelf.c:1329
+#: readelf.c:1331
#, c-format
msgid "unrecognized: %-7lx"
msgstr ""
-#: readelf.c:1154
+#: readelf.c:1226
#, c-format
msgid "<unknown addend: %lx>"
msgstr ""
-#: readelf.c:1210
+#: readelf.c:1288
#, c-format
msgid "<string table index: %3ld>"
msgstr ""
-#: readelf.c:1212
+#: readelf.c:1290
#, c-format
msgid "<corrupt string table index: %3ld>"
msgstr ""
-#: readelf.c:1522
+#: readelf.c:1625
#, c-format
msgid "Processor Specific: %lx"
msgstr ""
-#: readelf.c:1543
+#: readelf.c:1646
#, c-format
msgid "Operating System specific: %lx"
msgstr ""
-#: readelf.c:1547 readelf.c:2349
+#: readelf.c:1650 readelf.c:2521
#, c-format
msgid "<unknown>: %lx"
msgstr ""
-#: readelf.c:1560
+#: readelf.c:1663
msgid "NONE (None)"
msgstr ""
-#: readelf.c:1561
+#: readelf.c:1664
msgid "REL (Relocatable file)"
msgstr ""
-#: readelf.c:1562
+#: readelf.c:1665
msgid "EXEC (Executable file)"
msgstr ""
-#: readelf.c:1563
+#: readelf.c:1666
msgid "DYN (Shared object file)"
msgstr ""
-#: readelf.c:1564
+#: readelf.c:1667
msgid "CORE (Core file)"
msgstr ""
-#: readelf.c:1568
+#: readelf.c:1671
#, c-format
msgid "Processor Specific: (%x)"
msgstr ""
-#: readelf.c:1570
+#: readelf.c:1673
#, c-format
msgid "OS Specific: (%x)"
msgstr ""
-#: readelf.c:1572 readelf.c:1681 readelf.c:2541
+#: readelf.c:1675 readelf.c:2714
#, c-format
msgid "<unknown>: %x"
msgstr ""
-#: readelf.c:1584
+#: readelf.c:1687
msgid "None"
msgstr ""
-#: readelf.c:2186
+#: readelf.c:1791
+#, c-format
+msgid "<unknown>: 0x%x"
+msgstr ""
+
+#: readelf.c:2048
+msgid "unknown"
+msgstr ""
+
+#: readelf.c:2049
+msgid "unknown mac"
+msgstr ""
+
+#: readelf.c:2358
msgid "Standalone App"
msgstr ""
-#: readelf.c:2189 readelf.c:2948 readelf.c:2964
+#: readelf.c:2361 readelf.c:3145 readelf.c:3161
#, c-format
msgid "<unknown: %x>"
msgstr ""
-#: readelf.c:2586
+#: readelf.c:2759
#, c-format
msgid "Usage: readelf <option(s)> elf-file(s)\n"
msgstr ""
-#: readelf.c:2587
+#: readelf.c:2760
#, c-format
msgid " Display information about the contents of ELF format files\n"
msgstr ""
-#: readelf.c:2588
+#: readelf.c:2761
#, c-format
msgid ""
" Options are:\n"
@@ -3302,14 +3395,14 @@ msgid ""
" Display the contents of DWARF2 debug sections\n"
msgstr ""
-#: readelf.c:2612
+#: readelf.c:2785
#, c-format
msgid ""
" -i --instruction-dump=<number>\n"
" Disassemble the contents of section <number>\n"
msgstr ""
-#: readelf.c:2616
+#: readelf.c:2789
#, c-format
msgid ""
" -I --histogram Display histogram of bucket list lengths\n"
@@ -3319,382 +3412,394 @@ msgid ""
" -v --version Display the version number of readelf\n"
msgstr ""
-#: readelf.c:2642 readelf.c:9180
-msgid "Out of memory allocating dump request table."
+#: readelf.c:2817 readelf.c:2845 readelf.c:2849 readelf.c:9898
+msgid "Out of memory allocating dump request table.\n"
msgstr ""
-#: readelf.c:2816 readelf.c:2884
+#: readelf.c:3011 readelf.c:3079
#, c-format
msgid "Unrecognized debug option '%s'\n"
msgstr ""
-#: readelf.c:2918
+#: readelf.c:3115
#, c-format
msgid "Invalid option '-%c'\n"
msgstr ""
-#: readelf.c:2932
+#: readelf.c:3129
msgid "Nothing to do.\n"
msgstr ""
-#: readelf.c:2944 readelf.c:2960 readelf.c:6169
+#: readelf.c:3141 readelf.c:3157 readelf.c:6399
msgid "none"
msgstr ""
-#: readelf.c:2961
+#: readelf.c:3158
msgid "2's complement, little endian"
msgstr ""
-#: readelf.c:2962
+#: readelf.c:3159
msgid "2's complement, big endian"
msgstr ""
-#: readelf.c:2980
+#: readelf.c:3177
msgid "Not an ELF file - it has the wrong magic bytes at the start\n"
msgstr ""
-#: readelf.c:2988
+#: readelf.c:3185
#, c-format
msgid "ELF Header:\n"
msgstr ""
-#: readelf.c:2989
+#: readelf.c:3186
#, c-format
msgid " Magic: "
msgstr ""
-#: readelf.c:2993
+#: readelf.c:3190
#, c-format
msgid " Class: %s\n"
msgstr ""
-#: readelf.c:2995
+#: readelf.c:3192
#, c-format
msgid " Data: %s\n"
msgstr ""
-#: readelf.c:2997
+#: readelf.c:3194
#, c-format
msgid " Version: %d %s\n"
msgstr ""
-#: readelf.c:3004
+#: readelf.c:3201
#, c-format
msgid " OS/ABI: %s\n"
msgstr ""
-#: readelf.c:3006
+#: readelf.c:3203
#, c-format
msgid " ABI Version: %d\n"
msgstr ""
-#: readelf.c:3008
+#: readelf.c:3205
#, c-format
msgid " Type: %s\n"
msgstr ""
-#: readelf.c:3010
+#: readelf.c:3207
#, c-format
msgid " Machine: %s\n"
msgstr ""
-#: readelf.c:3012
+#: readelf.c:3209
#, c-format
msgid " Version: 0x%lx\n"
msgstr ""
-#: readelf.c:3015
+#: readelf.c:3212
#, c-format
msgid " Entry point address: "
msgstr ""
-#: readelf.c:3017
+#: readelf.c:3214
#, c-format
msgid ""
"\n"
" Start of program headers: "
msgstr ""
-#: readelf.c:3019
+#: readelf.c:3216
#, c-format
msgid ""
" (bytes into file)\n"
" Start of section headers: "
msgstr ""
-#: readelf.c:3021
+#: readelf.c:3218
#, c-format
msgid " (bytes into file)\n"
msgstr ""
-#: readelf.c:3023
+#: readelf.c:3220
#, c-format
msgid " Flags: 0x%lx%s\n"
msgstr ""
-#: readelf.c:3026
+#: readelf.c:3223
#, c-format
msgid " Size of this header: %ld (bytes)\n"
msgstr ""
-#: readelf.c:3028
+#: readelf.c:3225
#, c-format
msgid " Size of program headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:3030
+#: readelf.c:3227
#, c-format
msgid " Number of program headers: %ld\n"
msgstr ""
-#: readelf.c:3032
+#: readelf.c:3229
#, c-format
msgid " Size of section headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:3034
+#: readelf.c:3231
#, c-format
msgid " Number of section headers: %ld"
msgstr ""
-#: readelf.c:3039
+#: readelf.c:3236
#, c-format
msgid " Section header string table index: %ld"
msgstr ""
-#: readelf.c:3070 readelf.c:3103
+#: readelf.c:3277 readelf.c:3310
msgid "program headers"
msgstr ""
-#: readelf.c:3141 readelf.c:3440 readelf.c:3481 readelf.c:3540 readelf.c:3603
-#: readelf.c:4208 readelf.c:4232 readelf.c:5510 readelf.c:5554 readelf.c:5752
-#: readelf.c:6734 readelf.c:6748 readelf.c:8564 readelf.c:8972 readelf.c:9039
+#: readelf.c:3348 readelf.c:3643 readelf.c:3684 readelf.c:3743 readelf.c:3806
+#: readelf.c:4429 readelf.c:4453 readelf.c:5731 readelf.c:5775 readelf.c:5973
+#: readelf.c:7007 readelf.c:7021 readelf.c:7378 readelf.c:7394 readelf.c:7533
+#: readelf.c:7558 readelf.c:8746 readelf.c:8938 readelf.c:9279 readelf.c:9690
+#: readelf.c:9757
msgid "Out of memory\n"
msgstr ""
-#: readelf.c:3168
+#: readelf.c:3375
#, c-format
msgid ""
"\n"
"There are no program headers in this file.\n"
msgstr ""
-#: readelf.c:3174
+#: readelf.c:3381
#, c-format
msgid ""
"\n"
"Elf file type is %s\n"
msgstr ""
-#: readelf.c:3175
+#: readelf.c:3382
#, c-format
msgid "Entry point "
msgstr ""
-#: readelf.c:3177
+#: readelf.c:3384
#, c-format
msgid ""
"\n"
"There are %d program headers, starting at offset "
msgstr ""
-#: readelf.c:3189 readelf.c:3191
+#: readelf.c:3396 readelf.c:3398
#, c-format
msgid ""
"\n"
"Program Headers:\n"
msgstr ""
-#: readelf.c:3195
+#: readelf.c:3402
#, c-format
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:3198
+#: readelf.c:3405
#, c-format
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz "
"MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:3202
+#: readelf.c:3409
#, c-format
msgid " Type Offset VirtAddr PhysAddr\n"
msgstr ""
-#: readelf.c:3204
+#: readelf.c:3411
#, c-format
msgid " FileSiz MemSiz Flags Align\n"
msgstr ""
-#: readelf.c:3297
+#: readelf.c:3504
msgid "more than one dynamic segment\n"
msgstr ""
-#: readelf.c:3308
-msgid "no .dynamic section in the dynamic segment"
+#: readelf.c:3515
+msgid "no .dynamic section in the dynamic segment\n"
msgstr ""
-#: readelf.c:3317
-msgid "the .dynamic section is not contained within the dynamic segment"
+#: readelf.c:3527
+msgid "the .dynamic section is not contained within the dynamic segment\n"
msgstr ""
-#: readelf.c:3319
-msgid "the .dynamic section is not the first section in the dynamic segment."
+#: readelf.c:3529
+msgid "the .dynamic section is not the first section in the dynamic segment.\n"
msgstr ""
-#: readelf.c:3333
+#: readelf.c:3543
msgid "Unable to find program interpreter name\n"
msgstr ""
-#: readelf.c:3340
+#: readelf.c:3550
+msgid ""
+"Internal error: failed to create format string to display program "
+"interpreter\n"
+msgstr ""
+
+#: readelf.c:3554
+msgid "Unable to read program interpreter name\n"
+msgstr ""
+
+#: readelf.c:3557
#, c-format
msgid ""
"\n"
" [Requesting program interpreter: %s]"
msgstr ""
-#: readelf.c:3352
+#: readelf.c:3569
#, c-format
msgid ""
"\n"
" Section to Segment mapping:\n"
msgstr ""
-#: readelf.c:3353
+#: readelf.c:3570
#, c-format
msgid " Segment Sections...\n"
msgstr ""
-#: readelf.c:3402
+#: readelf.c:3605
msgid "Cannot interpret virtual addresses without program headers.\n"
msgstr ""
-#: readelf.c:3418
+#: readelf.c:3621
#, c-format
msgid "Virtual address 0x%lx not located in any PT_LOAD segment.\n"
msgstr ""
-#: readelf.c:3432 readelf.c:3473
+#: readelf.c:3635 readelf.c:3676
msgid "section headers"
msgstr ""
-#: readelf.c:3517 readelf.c:3580
+#: readelf.c:3720 readelf.c:3783
msgid "symbols"
msgstr ""
-#: readelf.c:3527 readelf.c:3590
+#: readelf.c:3730 readelf.c:3793
msgid "symtab shndx"
msgstr ""
-#: readelf.c:3817 readelf.c:4192
+#: readelf.c:4020 readelf.c:4413
#, c-format
msgid ""
"\n"
"There are no sections in this file.\n"
msgstr ""
-#: readelf.c:3823
+#: readelf.c:4026
#, c-format
msgid "There are %d section headers, starting at offset 0x%lx:\n"
msgstr ""
-#: readelf.c:3842 readelf.c:4309 readelf.c:4544 readelf.c:4852 readelf.c:5267
-#: readelf.c:6906
+#: readelf.c:4046 readelf.c:4530 readelf.c:4765 readelf.c:5073 readelf.c:5488
+#: readelf.c:7187
msgid "string table"
msgstr ""
-#: readelf.c:3881
+#: readelf.c:4102
#, c-format
msgid "Section %d has invalid sh_entsize %lx (expected %lx)\n"
msgstr ""
-#: readelf.c:3901
+#: readelf.c:4122
msgid "File contains multiple dynamic symbol tables\n"
msgstr ""
-#: readelf.c:3914
+#: readelf.c:4135
msgid "File contains multiple dynamic string tables\n"
msgstr ""
-#: readelf.c:3919
+#: readelf.c:4140
msgid "dynamic strings"
msgstr ""
-#: readelf.c:3926
+#: readelf.c:4147
msgid "File contains multiple symtab shndx tables\n"
msgstr ""
-#: readelf.c:3973
+#: readelf.c:4194
#, c-format
msgid ""
"\n"
"Section Headers:\n"
msgstr ""
-#: readelf.c:3975
+#: readelf.c:4196
#, c-format
msgid ""
"\n"
"Section Header:\n"
msgstr ""
-#: readelf.c:3981 readelf.c:3992 readelf.c:4003
+#: readelf.c:4202 readelf.c:4213 readelf.c:4224
#, c-format
msgid " [Nr] Name\n"
msgstr ""
-#: readelf.c:3982
+#: readelf.c:4203
#, c-format
msgid " Type Addr Off Size ES Lk Inf Al\n"
msgstr ""
-#: readelf.c:3986
+#: readelf.c:4207
#, c-format
msgid ""
" [Nr] Name Type Addr Off Size ES Flg Lk "
"Inf Al\n"
msgstr ""
-#: readelf.c:3993
+#: readelf.c:4214
#, c-format
msgid " Type Address Off Size ES Lk Inf Al\n"
msgstr ""
-#: readelf.c:3997
+#: readelf.c:4218
#, c-format
msgid ""
" [Nr] Name Type Address Off Size ES "
"Flg Lk Inf Al\n"
msgstr ""
-#: readelf.c:4004
+#: readelf.c:4225
#, c-format
msgid " Type Address Offset Link\n"
msgstr ""
-#: readelf.c:4005
+#: readelf.c:4226
#, c-format
msgid " Size EntSize Info Align\n"
msgstr ""
-#: readelf.c:4009
+#: readelf.c:4230
#, c-format
msgid " [Nr] Name Type Address Offset\n"
msgstr ""
-#: readelf.c:4010
+#: readelf.c:4231
#, c-format
msgid " Size EntSize Flags Link Info Align\n"
msgstr ""
-#: readelf.c:4015
+#: readelf.c:4236
#, c-format
msgid " Flags\n"
msgstr ""
-#: readelf.c:4150
+#: readelf.c:4371
#, c-format
msgid ""
"Key to Flags:\n"
@@ -3703,1030 +3808,1056 @@ msgid ""
" O (extra OS processing required) o (OS specific), p (processor specific)\n"
msgstr ""
-#: readelf.c:4168
+#: readelf.c:4389
#, c-format
msgid "[<unknown>: 0x%x]"
msgstr ""
-#: readelf.c:4199
+#: readelf.c:4420
msgid "Section headers are not available!\n"
msgstr ""
-#: readelf.c:4223
+#: readelf.c:4444
#, c-format
msgid ""
"\n"
"There are no section groups in this file.\n"
msgstr ""
-#: readelf.c:4259
+#: readelf.c:4480
#, c-format
msgid "Bad sh_link in group section `%s'\n"
msgstr ""
-#: readelf.c:4278
+#: readelf.c:4499
#, c-format
msgid "Bad sh_info in group section `%s'\n"
msgstr ""
-#: readelf.c:4317 readelf.c:7243
+#: readelf.c:4538 readelf.c:7690
msgid "section data"
msgstr ""
-#: readelf.c:4329
+#: readelf.c:4550
#, c-format
msgid " [Index] Name\n"
msgstr ""
-#: readelf.c:4343
+#: readelf.c:4564
#, c-format
msgid "section [%5u] in group section [%5u] > maximum section [%5u]\n"
msgstr ""
-#: readelf.c:4349
+#: readelf.c:4570
#, c-format
msgid "invalid section [%5u] in group section [%5u]\n"
msgstr ""
-#: readelf.c:4359
+#: readelf.c:4580
#, c-format
msgid "section [%5u] in group section [%5u] already in group section [%5u]\n"
msgstr ""
-#: readelf.c:4372
+#: readelf.c:4593
#, c-format
msgid "section 0 in group section [%5u]\n"
msgstr ""
-#: readelf.c:4468
+#: readelf.c:4689
#, c-format
msgid ""
"\n"
"'%s' relocation section at offset 0x%lx contains %ld bytes:\n"
msgstr ""
-#: readelf.c:4480
+#: readelf.c:4701
#, c-format
msgid ""
"\n"
"There are no dynamic relocations in this file.\n"
msgstr ""
-#: readelf.c:4504
+#: readelf.c:4725
#, c-format
msgid ""
"\n"
"Relocation section "
msgstr ""
-#: readelf.c:4509 readelf.c:4928 readelf.c:4942 readelf.c:5282
+#: readelf.c:4730 readelf.c:5149 readelf.c:5163 readelf.c:5503
#, c-format
msgid "'%s'"
msgstr ""
-#: readelf.c:4511 readelf.c:4944 readelf.c:5284
+#: readelf.c:4732 readelf.c:5165 readelf.c:5505
#, c-format
msgid " at offset 0x%lx contains %lu entries:\n"
msgstr ""
-#: readelf.c:4563
+#: readelf.c:4784
#, c-format
msgid ""
"\n"
"There are no relocations in this file.\n"
msgstr ""
-#: readelf.c:4742 readelf.c:5124
+#: readelf.c:4963 readelf.c:5345
msgid "unwind table"
msgstr ""
-#: readelf.c:4801 readelf.c:5214
+#: readelf.c:5022 readelf.c:5435
#, c-format
msgid "Skipping unexpected relocation type %s\n"
msgstr ""
-#: readelf.c:4860 readelf.c:5275 readelf.c:5326
+#: readelf.c:5081 readelf.c:5496 readelf.c:5547
#, c-format
msgid ""
"\n"
"There are no unwind sections in this file.\n"
msgstr ""
-#: readelf.c:4923
+#: readelf.c:5144
#, c-format
msgid ""
"\n"
"Could not find unwind info section for "
msgstr ""
-#: readelf.c:4935
+#: readelf.c:5156
msgid "unwind info"
msgstr ""
-#: readelf.c:4937 readelf.c:5281
+#: readelf.c:5158 readelf.c:5502
#, c-format
msgid ""
"\n"
"Unwind section "
msgstr ""
-#: readelf.c:5491 readelf.c:5535
+#: readelf.c:5712 readelf.c:5756
msgid "dynamic section"
msgstr ""
-#: readelf.c:5612
+#: readelf.c:5833
#, c-format
msgid ""
"\n"
"There is no dynamic section in this file.\n"
msgstr ""
-#: readelf.c:5650
-msgid "Unable to seek to end of file!"
+#: readelf.c:5871
+msgid "Unable to seek to end of file!\n"
msgstr ""
-#: readelf.c:5663
+#: readelf.c:5884
msgid "Unable to determine the number of symbols to load\n"
msgstr ""
-#: readelf.c:5698
+#: readelf.c:5919
msgid "Unable to seek to end of file\n"
msgstr ""
-#: readelf.c:5705
+#: readelf.c:5926
msgid "Unable to determine the length of the dynamic string table\n"
msgstr ""
-#: readelf.c:5710
+#: readelf.c:5931
msgid "dynamic string table"
msgstr ""
-#: readelf.c:5745
+#: readelf.c:5966
msgid "symbol information"
msgstr ""
-#: readelf.c:5770
+#: readelf.c:5991
#, c-format
msgid ""
"\n"
"Dynamic section at offset 0x%lx contains %u entries:\n"
msgstr ""
-#: readelf.c:5773
+#: readelf.c:5994
#, c-format
msgid " Tag Type Name/Value\n"
msgstr ""
-#: readelf.c:5809
+#: readelf.c:6030
#, c-format
msgid "Auxiliary library"
msgstr ""
-#: readelf.c:5813
+#: readelf.c:6034
#, c-format
msgid "Filter library"
msgstr ""
-#: readelf.c:5817
+#: readelf.c:6038
#, c-format
msgid "Configuration file"
msgstr ""
-#: readelf.c:5821
+#: readelf.c:6042
#, c-format
msgid "Dependency audit library"
msgstr ""
-#: readelf.c:5825
+#: readelf.c:6046
#, c-format
msgid "Audit library"
msgstr ""
-#: readelf.c:5843 readelf.c:5871 readelf.c:5899
+#: readelf.c:6064 readelf.c:6092 readelf.c:6120
#, c-format
msgid "Flags:"
msgstr ""
-#: readelf.c:5846 readelf.c:5874 readelf.c:5901
+#: readelf.c:6067 readelf.c:6095 readelf.c:6122
#, c-format
msgid " None\n"
msgstr ""
-#: readelf.c:6022
+#: readelf.c:6243
#, c-format
msgid "Shared library: [%s]"
msgstr ""
-#: readelf.c:6025
+#: readelf.c:6246
#, c-format
msgid " program interpreter"
msgstr ""
-#: readelf.c:6029
+#: readelf.c:6250
#, c-format
msgid "Library soname: [%s]"
msgstr ""
-#: readelf.c:6033
+#: readelf.c:6254
#, c-format
msgid "Library rpath: [%s]"
msgstr ""
-#: readelf.c:6037
+#: readelf.c:6258
#, c-format
msgid "Library runpath: [%s]"
msgstr ""
-#: readelf.c:6100
+#: readelf.c:6321
#, c-format
msgid "Not needed object: [%s]\n"
msgstr ""
-#: readelf.c:6214
+#: readelf.c:6444
#, c-format
msgid ""
"\n"
"Version definition section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:6217
+#: readelf.c:6447
#, c-format
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:6219 readelf.c:6426
+#: readelf.c:6449 readelf.c:6656
#, c-format
msgid " Offset: %#08lx Link: %lx (%s)\n"
msgstr ""
-#: readelf.c:6228
+#: readelf.c:6458
msgid "version definition section"
msgstr ""
-#: readelf.c:6254
+#: readelf.c:6484
#, c-format
msgid " %#06x: Rev: %d Flags: %s"
msgstr ""
-#: readelf.c:6257
+#: readelf.c:6487
#, c-format
msgid " Index: %d Cnt: %d "
msgstr ""
-#: readelf.c:6268
+#: readelf.c:6498
#, c-format
msgid "Name: %s\n"
msgstr ""
-#: readelf.c:6270
+#: readelf.c:6500
#, c-format
msgid "Name index: %ld\n"
msgstr ""
-#: readelf.c:6285
+#: readelf.c:6515
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr ""
-#: readelf.c:6288
+#: readelf.c:6518
#, c-format
msgid " %#06x: Parent %d, name index: %ld\n"
msgstr ""
-#: readelf.c:6307
+#: readelf.c:6537
#, c-format
msgid ""
"\n"
"Version needs section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:6310
+#: readelf.c:6540
#, c-format
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:6312
+#: readelf.c:6542
#, c-format
msgid " Offset: %#08lx Link to section: %ld (%s)\n"
msgstr ""
-#: readelf.c:6321
+#: readelf.c:6551
msgid "version need section"
msgstr ""
-#: readelf.c:6343
+#: readelf.c:6573
#, c-format
msgid " %#06x: Version: %d"
msgstr ""
-#: readelf.c:6346
+#: readelf.c:6576
#, c-format
msgid " File: %s"
msgstr ""
-#: readelf.c:6348
+#: readelf.c:6578
#, c-format
msgid " File: %lx"
msgstr ""
-#: readelf.c:6350
+#: readelf.c:6580
#, c-format
msgid " Cnt: %d\n"
msgstr ""
-#: readelf.c:6368
+#: readelf.c:6598
#, c-format
msgid " %#06x: Name: %s"
msgstr ""
-#: readelf.c:6371
+#: readelf.c:6601
#, c-format
msgid " %#06x: Name index: %lx"
msgstr ""
-#: readelf.c:6374
+#: readelf.c:6604
#, c-format
msgid " Flags: %s Version: %d\n"
msgstr ""
-#: readelf.c:6417
+#: readelf.c:6647
msgid "version string table"
msgstr ""
-#: readelf.c:6421
+#: readelf.c:6651
#, c-format
msgid ""
"\n"
"Version symbols section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:6424
+#: readelf.c:6654
#, c-format
msgid " Addr: "
msgstr ""
-#: readelf.c:6434
+#: readelf.c:6664
msgid "version symbol data"
msgstr ""
-#: readelf.c:6461
+#: readelf.c:6691
msgid " 0 (*local*) "
msgstr ""
-#: readelf.c:6465
+#: readelf.c:6695
msgid " 1 (*global*) "
msgstr ""
-#: readelf.c:6503 readelf.c:6969
+#: readelf.c:6733 readelf.c:7255
msgid "version need"
msgstr ""
-#: readelf.c:6513
+#: readelf.c:6743
msgid "version need aux (2)"
msgstr ""
-#: readelf.c:6555 readelf.c:7034
+#: readelf.c:6785 readelf.c:7320
msgid "version def"
msgstr ""
-#: readelf.c:6575 readelf.c:7049
+#: readelf.c:6805 readelf.c:7335
msgid "version def aux"
msgstr ""
-#: readelf.c:6606
+#: readelf.c:6836
#, c-format
msgid ""
"\n"
"No version information found in this file.\n"
msgstr ""
-#: readelf.c:6740
+#: readelf.c:6955
+#, c-format
+msgid "<other>: %x"
+msgstr ""
+
+#: readelf.c:7013
msgid "Unable to read in dynamic data\n"
msgstr ""
-#: readelf.c:6793
-msgid "Unable to seek to start of dynamic information"
+#: readelf.c:7069 readelf.c:7443 readelf.c:7467 readelf.c:7497 readelf.c:7521
+msgid "Unable to seek to start of dynamic information\n"
msgstr ""
-#: readelf.c:6799
+#: readelf.c:7075 readelf.c:7449
msgid "Failed to read in number of buckets\n"
msgstr ""
-#: readelf.c:6805
+#: readelf.c:7081
msgid "Failed to read in number of chains\n"
msgstr ""
-#: readelf.c:6825
+#: readelf.c:7101
#, c-format
msgid ""
"\n"
"Symbol table for image:\n"
msgstr ""
-#: readelf.c:6827
+#: readelf.c:7103
#, c-format
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:6829
+#: readelf.c:7105
#, c-format
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:6882
+#: readelf.c:7163
#, c-format
msgid ""
"\n"
"Symbol table '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:6886
+#: readelf.c:7167
#, c-format
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:6888
+#: readelf.c:7169
#, c-format
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:6939
+#: readelf.c:7225
msgid "version data"
msgstr ""
-#: readelf.c:6982
+#: readelf.c:7268
msgid "version need aux (3)"
msgstr ""
-#: readelf.c:7009
-msgid "bad dynamic symbol"
+#: readelf.c:7295
+msgid "bad dynamic symbol\n"
msgstr ""
-#: readelf.c:7073
+#: readelf.c:7359
#, c-format
msgid ""
"\n"
"Dynamic symbol information is not available for displaying symbols.\n"
msgstr ""
-#: readelf.c:7085
+#: readelf.c:7371
#, c-format
msgid ""
"\n"
"Histogram for bucket list length (total of %lu buckets):\n"
msgstr ""
-#: readelf.c:7087
+#: readelf.c:7373 readelf.c:7539
#, c-format
msgid " Length Number %% of total Coverage\n"
msgstr ""
-#: readelf.c:7092 readelf.c:7108 readelf.c:8031 readelf.c:8223
-msgid "Out of memory"
+#: readelf.c:7505
+msgid "Failed to determine last chain length\n"
+msgstr ""
+
+#: readelf.c:7537
+#, c-format
+msgid ""
+"\n"
+"Histogram for `.gnu.hash' bucket list length (total of %lu buckets):\n"
msgstr ""
-#: readelf.c:7157
+#: readelf.c:7603
#, c-format
msgid ""
"\n"
"Dynamic info segment at offset 0x%lx contains %d entries:\n"
msgstr ""
-#: readelf.c:7160
+#: readelf.c:7606
#, c-format
msgid " Num: Name BoundTo Flags\n"
msgstr ""
-#: readelf.c:7212
+#: readelf.c:7658
#, c-format
msgid ""
"\n"
"Assembly dump of section %s\n"
msgstr ""
-#: readelf.c:7233
+#: readelf.c:7680
#, c-format
msgid ""
"\n"
"Section '%s' has no data to dump.\n"
msgstr ""
-#: readelf.c:7238
+#: readelf.c:7685
#, c-format
msgid ""
"\n"
"Hex dump of section '%s':\n"
msgstr ""
-#: readelf.c:7359
+#: readelf.c:7710
+#, c-format
+msgid ""
+" NOTE: This section has relocations against it, but these have NOT been "
+"applied to this dump.\n"
+msgstr ""
+
+#: readelf.c:7845
+#, c-format
+msgid ""
+"skipping relocation of unknown size against offset 0x%lx in section %s\n"
+msgstr ""
+
+#: readelf.c:7854
#, c-format
msgid "skipping invalid relocation offset 0x%lx in section %s\n"
msgstr ""
-#: readelf.c:7376
+#: readelf.c:7875
#, c-format
msgid "skipping unexpected symbol type %s in relocation in section .rela%s\n"
msgstr ""
-#: readelf.c:7402
+#: readelf.c:7902
#, c-format
msgid "skipping unexpected symbol type %s in relocation in section .rela.%s\n"
msgstr ""
-#: readelf.c:7435
+#: readelf.c:7935
#, c-format
msgid "%s section data"
msgstr ""
-#: readelf.c:7472
+#: readelf.c:7972
#, c-format
msgid ""
"\n"
"Section '%s' has no debugging data.\n"
msgstr ""
-#: readelf.c:7498
+#: readelf.c:7998
#, c-format
msgid "Unrecognized debug section: %s\n"
msgstr ""
-#: readelf.c:7533
+#: readelf.c:8026
+#, c-format
+msgid "Section '%s' was not dumped because it does not exist!\n"
+msgstr ""
+
+#: readelf.c:8061
#, c-format
msgid "Section %d was not dumped because it does not exist!\n"
msgstr ""
-#: readelf.c:7791
+#: readelf.c:8478
msgid "attributes"
msgstr ""
-#: readelf.c:7809
+#: readelf.c:8497
#, c-format
msgid "ERROR: Bad section length (%d > %d)\n"
msgstr ""
-#: readelf.c:7830
+#: readelf.c:8522
#, c-format
msgid "ERROR: Bad subsection length (%d > %d)\n"
msgstr ""
-#: readelf.c:7880
+#: readelf.c:8578
#, c-format
msgid "Unknown format '%c'\n"
msgstr ""
-#: readelf.c:7936 readelf.c:8304
+#: readelf.c:8651 readelf.c:9019
msgid "liblist"
msgstr ""
-#: readelf.c:8025
+#: readelf.c:8740
msgid "options"
msgstr ""
-#: readelf.c:8055
+#: readelf.c:8770
#, c-format
msgid ""
"\n"
"Section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:8216
-msgid "conflict list found without a dynamic symbol table"
+#: readelf.c:8931
+msgid "conflict list found without a dynamic symbol table\n"
msgstr ""
-#: readelf.c:8232 readelf.c:8246
+#: readelf.c:8947 readelf.c:8961
msgid "conflict"
msgstr ""
-#: readelf.c:8256
+#: readelf.c:8971
#, c-format
msgid ""
"\n"
"Section '.conflict' contains %lu entries:\n"
msgstr ""
-#: readelf.c:8258
+#: readelf.c:8973
msgid " Num: Index Value Name"
msgstr ""
-#: readelf.c:8311
+#: readelf.c:9026
msgid "liblist string table"
msgstr ""
-#: readelf.c:8321
+#: readelf.c:9036
#, c-format
msgid ""
"\n"
"Library list section '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:8374
+#: readelf.c:9089
msgid "NT_AUXV (auxiliary vector)"
msgstr ""
-#: readelf.c:8376
+#: readelf.c:9091
msgid "NT_PRSTATUS (prstatus structure)"
msgstr ""
-#: readelf.c:8378
+#: readelf.c:9093
msgid "NT_FPREGSET (floating point registers)"
msgstr ""
-#: readelf.c:8380
+#: readelf.c:9095
msgid "NT_PRPSINFO (prpsinfo structure)"
msgstr ""
-#: readelf.c:8382
+#: readelf.c:9097
msgid "NT_TASKSTRUCT (task structure)"
msgstr ""
-#: readelf.c:8384
+#: readelf.c:9099
msgid "NT_PRXFPREG (user_xfpregs structure)"
msgstr ""
-#: readelf.c:8386
+#: readelf.c:9101
msgid "NT_PSTATUS (pstatus structure)"
msgstr ""
-#: readelf.c:8388
+#: readelf.c:9103
msgid "NT_FPREGS (floating point registers)"
msgstr ""
-#: readelf.c:8390
+#: readelf.c:9105
msgid "NT_PSINFO (psinfo structure)"
msgstr ""
-#: readelf.c:8392
+#: readelf.c:9107
msgid "NT_LWPSTATUS (lwpstatus_t structure)"
msgstr ""
-#: readelf.c:8394
+#: readelf.c:9109
msgid "NT_LWPSINFO (lwpsinfo_t structure)"
msgstr ""
-#: readelf.c:8396
+#: readelf.c:9111
msgid "NT_WIN32PSTATUS (win32_pstatus structure)"
msgstr ""
-#: readelf.c:8404
+#: readelf.c:9119
msgid "NT_VERSION (version)"
msgstr ""
-#: readelf.c:8406
+#: readelf.c:9121
msgid "NT_ARCH (architecture)"
msgstr ""
-#: readelf.c:8411 readelf.c:8433
+#: readelf.c:9126 readelf.c:9148
#, c-format
msgid "Unknown note type: (0x%08x)"
msgstr ""
#. NetBSD core "procinfo" structure.
-#: readelf.c:8423
+#: readelf.c:9138
msgid "NetBSD procinfo structure"
msgstr ""
-#: readelf.c:8450 readelf.c:8464
+#: readelf.c:9165 readelf.c:9179
msgid "PT_GETREGS (reg structure)"
msgstr ""
-#: readelf.c:8452 readelf.c:8466
+#: readelf.c:9167 readelf.c:9181
msgid "PT_GETFPREGS (fpreg structure)"
msgstr ""
-#: readelf.c:8472
+#: readelf.c:9187
#, c-format
msgid "PT_FIRSTMACH+%d"
msgstr ""
-#: readelf.c:8518
+#: readelf.c:9233
msgid "notes"
msgstr ""
-#: readelf.c:8524
+#: readelf.c:9239
#, c-format
msgid ""
"\n"
"Notes at offset 0x%08lx with length 0x%08lx:\n"
msgstr ""
-#: readelf.c:8526
+#: readelf.c:9241
#, c-format
msgid " Owner\t\tData size\tDescription\n"
msgstr ""
-#: readelf.c:8545
+#: readelf.c:9260
#, c-format
msgid "corrupt note found at offset %lx into core notes\n"
msgstr ""
-#: readelf.c:8547
+#: readelf.c:9262
#, c-format
msgid " type: %lx, namesize: %08lx, descsize: %08lx\n"
msgstr ""
-#: readelf.c:8645
+#: readelf.c:9360
#, c-format
msgid "No note segments present in the core file.\n"
msgstr ""
-#: readelf.c:8726
+#: readelf.c:9444
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:8775 readelf.c:9119
+#: readelf.c:9493 readelf.c:9837
#, c-format
msgid "%s: Failed to read file header\n"
msgstr ""
-#: readelf.c:8788
+#: readelf.c:9506
#, c-format
msgid ""
"\n"
"File: %s\n"
msgstr ""
-#: readelf.c:8936 readelf.c:8957 readelf.c:8994 readelf.c:9074
+#: readelf.c:9654 readelf.c:9675 readelf.c:9712 readelf.c:9792
#, c-format
msgid "%s: failed to read archive header\n"
msgstr ""
-#: readelf.c:8947
+#: readelf.c:9665
#, c-format
msgid "%s: failed to skip archive symbol table\n"
msgstr ""
-#: readelf.c:8979
+#: readelf.c:9697
#, c-format
msgid "%s: failed to read string table\n"
msgstr ""
-#: readelf.c:9015
+#: readelf.c:9733
#, c-format
msgid "%s: invalid archive string table offset %lu\n"
msgstr ""
-#: readelf.c:9031
+#: readelf.c:9749
#, c-format
msgid "%s: bad archive file name\n"
msgstr ""
-#: readelf.c:9063
+#: readelf.c:9781
#, c-format
msgid "%s: failed to seek to next archive header\n"
msgstr ""
-#: readelf.c:9097
+#: readelf.c:9815
#, c-format
msgid "'%s': No such file\n"
msgstr ""
-#: readelf.c:9099
+#: readelf.c:9817
#, c-format
msgid "Could not locate '%s'. System error message: %s\n"
msgstr ""
-#: readelf.c:9106
+#: readelf.c:9824
#, c-format
msgid "'%s' is not an ordinary file\n"
msgstr ""
-#: readelf.c:9113
+#: readelf.c:9831
#, c-format
msgid "Input file '%s' is not readable.\n"
msgstr ""
-#: rename.c:129
+#: rename.c:130
#, c-format
msgid "%s: cannot set time: %s"
msgstr ""
#. We have to clean up here.
-#: rename.c:164 rename.c:202
+#: rename.c:165 rename.c:203
#, c-format
msgid "unable to rename '%s' reason: %s"
msgstr ""
-#: rename.c:210
+#: rename.c:211
#, c-format
msgid "unable to copy file '%s' reason: %s"
msgstr ""
-#: resbin.c:132
+#: resbin.c:119
#, c-format
msgid "%s: not enough binary data"
msgstr ""
-#: resbin.c:148
+#: resbin.c:135
msgid "null terminated unicode string"
msgstr ""
-#: resbin.c:175 resbin.c:181
+#: resbin.c:162 resbin.c:168
msgid "resource ID"
msgstr ""
-#: resbin.c:221
+#: resbin.c:207
msgid "cursor"
msgstr ""
-#: resbin.c:253 resbin.c:260
+#: resbin.c:238 resbin.c:245
msgid "menu header"
msgstr ""
-#: resbin.c:270
+#: resbin.c:254
msgid "menuex header"
msgstr ""
-#: resbin.c:274
+#: resbin.c:258
msgid "menuex offset"
msgstr ""
-#: resbin.c:281
+#: resbin.c:263
#, c-format
msgid "unsupported menu version %d"
msgstr ""
-#: resbin.c:306 resbin.c:321 resbin.c:384
+#: resbin.c:288 resbin.c:303 resbin.c:365
msgid "menuitem header"
msgstr ""
-#: resbin.c:414
+#: resbin.c:395
msgid "menuitem"
msgstr ""
-#: resbin.c:453 resbin.c:481
+#: resbin.c:432 resbin.c:460
msgid "dialog header"
msgstr ""
-#: resbin.c:471
+#: resbin.c:450
#, c-format
msgid "unexpected DIALOGEX version %d"
msgstr ""
-#: resbin.c:516
+#: resbin.c:495
msgid "dialog font point size"
msgstr ""
-#: resbin.c:524
+#: resbin.c:503
msgid "dialogex font information"
msgstr ""
-#: resbin.c:550 resbin.c:568
+#: resbin.c:529 resbin.c:547
msgid "dialog control"
msgstr ""
-#: resbin.c:560
+#: resbin.c:539
msgid "dialogex control"
msgstr ""
-#: resbin.c:589
+#: resbin.c:568
msgid "dialog control end"
msgstr ""
-#: resbin.c:601
+#: resbin.c:580
msgid "dialog control data"
msgstr ""
-#: resbin.c:642
+#: resbin.c:620
msgid "stringtable string length"
msgstr ""
-#: resbin.c:652
+#: resbin.c:630
msgid "stringtable string"
msgstr ""
-#: resbin.c:683
+#: resbin.c:660
msgid "fontdir header"
msgstr ""
-#: resbin.c:696
+#: resbin.c:674
msgid "fontdir"
msgstr ""
-#: resbin.c:712
+#: resbin.c:691
msgid "fontdir device name"
msgstr ""
-#: resbin.c:718
+#: resbin.c:697
msgid "fontdir face name"
msgstr ""
-#: resbin.c:759
+#: resbin.c:737
msgid "accelerator"
msgstr ""
-#: resbin.c:819
+#: resbin.c:796
msgid "group cursor header"
msgstr ""
-#: resbin.c:823
+#: resbin.c:800 resrc.c:1306
#, c-format
msgid "unexpected group cursor type %d"
msgstr ""
-#: resbin.c:838
+#: resbin.c:815
msgid "group cursor"
msgstr ""
-#: resbin.c:875
+#: resbin.c:851
msgid "group icon header"
msgstr ""
-#: resbin.c:879
+#: resbin.c:855 resrc.c:1253
#, c-format
msgid "unexpected group icon type %d"
msgstr ""
-#: resbin.c:894
+#: resbin.c:870
msgid "group icon"
msgstr ""
-#: resbin.c:957 resbin.c:1174
+#: resbin.c:934 resbin.c:1150
msgid "unexpected version string"
msgstr ""
-#: resbin.c:989
+#: resbin.c:965
#, c-format
msgid "version length %d does not match resource length %lu"
msgstr ""
-#: resbin.c:993
+#: resbin.c:969
#, c-format
msgid "unexpected version type %d"
msgstr ""
-#: resbin.c:1005
+#: resbin.c:981
#, c-format
-msgid "unexpected fixed version information length %d"
+msgid "unexpected fixed version information length %ld"
msgstr ""
-#: resbin.c:1008
+#: resbin.c:984
msgid "fixed version info"
msgstr ""
-#: resbin.c:1012
+#: resbin.c:988
#, c-format
msgid "unexpected fixed version signature %lu"
msgstr ""
-#: resbin.c:1016
+#: resbin.c:992
#, c-format
msgid "unexpected fixed version info version %lu"
msgstr ""
-#: resbin.c:1045
+#: resbin.c:1021
msgid "version var info"
msgstr ""
-#: resbin.c:1062
+#: resbin.c:1038
#, c-format
-msgid "unexpected stringfileinfo value length %d"
+msgid "unexpected stringfileinfo value length %ld"
msgstr ""
-#: resbin.c:1072
+#: resbin.c:1048
#, c-format
-msgid "unexpected version stringtable value length %d"
+msgid "unexpected version stringtable value length %ld"
msgstr ""
-#: resbin.c:1106
+#: resbin.c:1082
#, c-format
-msgid "unexpected version string length %d != %d + %d"
+msgid "unexpected version string length %ld != %ld + %ld"
msgstr ""
-#: resbin.c:1117
+#: resbin.c:1093
#, c-format
-msgid "unexpected version string length %d < %d"
+msgid "unexpected version string length %ld < %ld"
msgstr ""
-#: resbin.c:1134
+#: resbin.c:1110
#, c-format
-msgid "unexpected varfileinfo value length %d"
+msgid "unexpected varfileinfo value length %ld"
msgstr ""
-#: resbin.c:1153
+#: resbin.c:1129
msgid "version varfileinfo"
msgstr ""
-#: resbin.c:1168
+#: resbin.c:1144
#, c-format
-msgid "unexpected version value length %d"
+msgid "unexpected version value length %ld"
msgstr ""
-#: rescoff.c:126
+#: rescoff.c:124
msgid "filename required for COFF input"
msgstr ""
-#: rescoff.c:143
+#: rescoff.c:141
#, c-format
msgid "%s: no resource section"
msgstr ""
-#: rescoff.c:150
-msgid "can't read resource section"
-msgstr ""
-
-#: rescoff.c:174
+#: rescoff.c:173
#, c-format
msgid "%s: %s: address out of bounds"
msgstr ""
@@ -4763,144 +4894,144 @@ msgstr ""
msgid "ID resource"
msgstr ""
-#: rescoff.c:318
+#: rescoff.c:320
msgid "resource type unknown"
msgstr ""
-#: rescoff.c:321
+#: rescoff.c:323
msgid "data entry"
msgstr ""
-#: rescoff.c:329
+#: rescoff.c:331
msgid "resource data"
msgstr ""
-#: rescoff.c:334
+#: rescoff.c:336
msgid "resource data size"
msgstr ""
-#: rescoff.c:427
+#: rescoff.c:431
msgid "filename required for COFF output"
msgstr ""
-#: rescoff.c:719
+#: rescoff.c:718
msgid "can't get BFD_RELOC_RVA relocation type"
msgstr ""
-#: resrc.c:238 resrc.c:309
+#: resrc.c:262 resrc.c:333
#, c-format
msgid "can't open temporary file `%s': %s"
msgstr ""
-#: resrc.c:244
+#: resrc.c:268
#, c-format
msgid "can't redirect stdout: `%s': %s"
msgstr ""
-#: resrc.c:260
+#: resrc.c:284
#, c-format
msgid "%s %s: %s"
msgstr ""
-#: resrc.c:305
+#: resrc.c:329
#, c-format
msgid "can't execute `%s': %s"
msgstr ""
-#: resrc.c:314
+#: resrc.c:338
#, c-format
msgid "Using temporary file `%s' to read preprocessor output\n"
msgstr ""
-#: resrc.c:321
+#: resrc.c:345
#, c-format
msgid "can't popen `%s': %s"
msgstr ""
-#: resrc.c:323
+#: resrc.c:347
#, c-format
msgid "Using popen to read preprocessor output\n"
msgstr ""
-#: resrc.c:362
+#: resrc.c:413
#, c-format
msgid "Tried `%s'\n"
msgstr ""
-#: resrc.c:373
+#: resrc.c:424
#, c-format
msgid "Using `%s'\n"
msgstr ""
-#: resrc.c:529
+#: resrc.c:583
#, c-format
msgid "%s:%d: %s\n"
msgstr ""
-#: resrc.c:537
+#: resrc.c:591
#, c-format
msgid "%s: unexpected EOF"
msgstr ""
-#: resrc.c:586
+#: resrc.c:640
#, c-format
msgid "%s: read of %lu returned %lu"
msgstr ""
-#: resrc.c:624 resrc.c:1134
+#: resrc.c:678 resrc.c:1453
#, c-format
msgid "stat failed on bitmap file `%s': %s"
msgstr ""
-#: resrc.c:675
+#: resrc.c:729
#, c-format
msgid "cursor file `%s' does not contain cursor data"
msgstr ""
-#: resrc.c:707 resrc.c:1003
+#: resrc.c:761 resrc.c:1161
#, c-format
msgid "%s: fseek to %lu failed: %s"
msgstr ""
-#: resrc.c:831
+#: resrc.c:887
msgid "help ID requires DIALOGEX"
msgstr ""
-#: resrc.c:833
+#: resrc.c:889
msgid "control data requires DIALOGEX"
msgstr ""
-#: resrc.c:861
+#: resrc.c:917
#, c-format
msgid "stat failed on font file `%s': %s"
msgstr ""
-#: resrc.c:972
+#: resrc.c:1130
#, c-format
msgid "icon file `%s' does not contain icon data"
msgstr ""
-#: resrc.c:1273 resrc.c:1308
+#: resrc.c:1675 resrc.c:1710
#, c-format
msgid "stat failed on file `%s': %s"
msgstr ""
-#: resrc.c:1494
+#: resrc.c:1891
#, c-format
msgid "can't open `%s' for output: %s"
msgstr ""
-#: size.c:83
+#: size.c:84
#, c-format
msgid " Displays the sizes of sections inside binary files\n"
msgstr ""
-#: size.c:84
+#: size.c:85
#, c-format
msgid " If no input file(s) are specified, a.out is assumed\n"
msgstr ""
-#: size.c:85
+#: size.c:86
#, c-format
msgid ""
" The options are:\n"
@@ -4916,22 +5047,22 @@ msgid ""
"\n"
msgstr ""
-#: size.c:158
+#: size.c:159
#, c-format
msgid "invalid argument to --format: %s"
msgstr ""
-#: size.c:185
+#: size.c:186
#, c-format
msgid "Invalid radix: %s\n"
msgstr ""
-#: srconv.c:1722
+#: srconv.c:1724
#, c-format
msgid "Convert a COFF object file into a SYSROFF object file\n"
msgstr ""
-#: srconv.c:1723
+#: srconv.c:1725
#, c-format
msgid ""
" The options are:\n"
@@ -4943,160 +5074,160 @@ msgid ""
" -v --version Print the program's version number\n"
msgstr ""
-#: srconv.c:1869
+#: srconv.c:1871
#, c-format
msgid "unable to open output file %s"
msgstr ""
-#: stabs.c:330 stabs.c:1708
+#: stabs.c:328 stabs.c:1706
msgid "numeric overflow"
msgstr ""
-#: stabs.c:340
+#: stabs.c:338
#, c-format
msgid "Bad stab: %s\n"
msgstr ""
-#: stabs.c:348
+#: stabs.c:346
#, c-format
msgid "Warning: %s: %s\n"
msgstr ""
-#: stabs.c:458
+#: stabs.c:456
#, c-format
msgid "N_LBRAC not within function\n"
msgstr ""
-#: stabs.c:497
+#: stabs.c:495
#, c-format
msgid "Too many N_RBRACs\n"
msgstr ""
-#: stabs.c:738
+#: stabs.c:736
msgid "unknown C++ encoded name"
msgstr ""
#. Complain and keep going, so compilers can invent new
#. cross-reference types.
-#: stabs.c:1253
+#: stabs.c:1251
msgid "unrecognized cross reference type"
msgstr ""
#. Does this actually ever happen? Is that why we are worrying
#. about dealing with it rather than just calling error_type?
-#: stabs.c:1800
+#: stabs.c:1798
msgid "missing index type"
msgstr ""
-#: stabs.c:2114
+#: stabs.c:2112
msgid "unknown virtual character for baseclass"
msgstr ""
-#: stabs.c:2132
+#: stabs.c:2130
msgid "unknown visibility character for baseclass"
msgstr ""
-#: stabs.c:2318
+#: stabs.c:2316
msgid "unnamed $vb type"
msgstr ""
-#: stabs.c:2324
+#: stabs.c:2322
msgid "unrecognized C++ abbreviation"
msgstr ""
-#: stabs.c:2400
+#: stabs.c:2398
msgid "unknown visibility character for field"
msgstr ""
-#: stabs.c:2652
+#: stabs.c:2650
msgid "const/volatile indicator missing"
msgstr ""
-#: stabs.c:2888
+#: stabs.c:2886
#, c-format
msgid "No mangling for \"%s\"\n"
msgstr ""
-#: stabs.c:3188
+#: stabs.c:3186
msgid "Undefined N_EXCL"
msgstr ""
-#: stabs.c:3268
+#: stabs.c:3266
#, c-format
msgid "Type file number %d out of range\n"
msgstr ""
-#: stabs.c:3273
+#: stabs.c:3271
#, c-format
msgid "Type index number %d out of range\n"
msgstr ""
-#: stabs.c:3352
+#: stabs.c:3350
#, c-format
msgid "Unrecognized XCOFF type %d\n"
msgstr ""
-#: stabs.c:3644
+#: stabs.c:3642
#, c-format
msgid "bad mangled name `%s'\n"
msgstr ""
-#: stabs.c:3739
+#: stabs.c:3737
#, c-format
msgid "no argument types in mangled string\n"
msgstr ""
-#: stabs.c:5093
+#: stabs.c:5091
#, c-format
msgid "Demangled name is not a function\n"
msgstr ""
-#: stabs.c:5135
+#: stabs.c:5133
#, c-format
msgid "Unexpected type in v3 arglist demangling\n"
msgstr ""
-#: stabs.c:5202
+#: stabs.c:5200
#, c-format
msgid "Unrecognized demangle component %d\n"
msgstr ""
-#: stabs.c:5254
+#: stabs.c:5252
#, c-format
msgid "Failed to print demangled template\n"
msgstr ""
-#: stabs.c:5334
+#: stabs.c:5332
#, c-format
msgid "Couldn't get demangled builtin type\n"
msgstr ""
-#: stabs.c:5383
+#: stabs.c:5381
#, c-format
msgid "Unexpected demangled varargs\n"
msgstr ""
-#: stabs.c:5390
+#: stabs.c:5388
#, c-format
msgid "Unrecognized demangled builtin type\n"
msgstr ""
-#: strings.c:218
+#: strings.c:215
#, c-format
msgid "invalid number %s"
msgstr ""
-#: strings.c:700
+#: strings.c:697
#, c-format
msgid "invalid integer argument %s"
msgstr ""
-#: strings.c:709
+#: strings.c:706
#, c-format
msgid " Display printable strings in [file(s)] (stdin by default)\n"
msgstr ""
-#: strings.c:710
+#: strings.c:707
#, c-format
msgid ""
" The options are:\n"
@@ -5117,12 +5248,12 @@ msgid ""
" -v --version Print the program's version number\n"
msgstr ""
-#: sysdump.c:642
+#: sysdump.c:641
#, c-format
msgid "Print a human readable interpretation of a SYSROFF object file\n"
msgstr ""
-#: sysdump.c:643
+#: sysdump.c:642
#, c-format
msgid ""
" The options are:\n"
@@ -5130,70 +5261,139 @@ msgid ""
" -v --version Print the program's version number\n"
msgstr ""
-#: sysdump.c:710
+#: sysdump.c:709
#, c-format
msgid "cannot open input file %s"
msgstr ""
-#: version.c:35
+#: version.c:34
#, c-format
-msgid "Copyright 2005 Free Software Foundation, Inc.\n"
+msgid "Copyright 2007 Free Software Foundation, Inc.\n"
msgstr ""
-#: version.c:36
+#: version.c:35
#, c-format
msgid ""
"This program is free software; you may redistribute it under the terms of\n"
"the GNU General Public License. This program has absolutely no warranty.\n"
msgstr ""
-#: windres.c:204
+#: windmc.c:194
#, c-format
-msgid "can't open %s `%s': %s"
+msgid "can't create %s file ,%s' for output.\n"
msgstr ""
-#: windres.c:370
+#: windmc.c:202
#, c-format
-msgid ": expected to be a directory\n"
+msgid "Usage: %s [option(s)] [input-file]\n"
msgstr ""
-#: windres.c:382
+#: windmc.c:204
#, c-format
-msgid ": expected to be a leaf\n"
+msgid ""
+" The options are:\n"
+" -a --ascii_in Read input file as ASCII file\n"
+" -A --ascii_out Write binary messages as ASCII\n"
+" -b --binprefix .bin filename is prefixed by .mc filename_ "
+"for uniqueness.\n"
+" -c --customflag Set custom flags for messages\n"
+" -C --codepage_in=<val> Set codepage when reading mc text file\n"
+" -d --decimal_values Print values to text files decimal\n"
+" -e --extension=<extension> Set header extension used on export header "
+"file\n"
+" -F --target <target> Specify output target for endianess.\n"
+" -h --headerdir=<directory> Set the export directory for headers\n"
+" -u --unicode_in Read input file as UTF16 file\n"
+" -U --unicode_out Write binary messages as UFT16\n"
+" -m --maxlength=<val> Set the maximal allowed message length\n"
+" -n --nullterminate Automatic add a zero termination to strings\n"
+" -o --hresult_use Use HRESULT definition instead of status code "
+"definition\n"
+" -O --codepage_out=<val> Set codepage used for writing text file\n"
+" -r --rcdir=<directory> Set the export directory for rc files\n"
+" -x --xdbg=<directory> Where to create the .dbg C include file\n"
+" that maps message ID's to their symbolic "
+"name.\n"
+msgstr ""
+
+#: windmc.c:224
+#, c-format
+msgid ""
+" -H --help Print this help message\n"
+" -v --verbose Verbose - tells you what it's doing\n"
+" -V --version Print version information\n"
msgstr ""
-#: windres.c:391
+#: windmc.c:287 windres.c:415
#, c-format
msgid "%s: warning: "
msgstr ""
-#: windres.c:393
+#: windmc.c:288
+#, c-format
+msgid "A codepage was specified switch ,%s' and UTF16.\n"
+msgstr ""
+
+#: windmc.c:289
+#, c-format
+msgid "\tcodepage settings are ignored.\n"
+msgstr ""
+
+#: windmc.c:333
+msgid "try to add a ill language."
+msgstr ""
+
+#: windmc.c:1142
+#, c-format
+msgid "unable to open file ,%s' for input.\n"
+msgstr ""
+
+#: windmc.c:1161
+msgid "input file does not seems to be UFT16.\n"
+msgstr ""
+
+#: windres.c:220
+#, c-format
+msgid "can't open %s `%s': %s"
+msgstr ""
+
+#: windres.c:394
+#, c-format
+msgid ": expected to be a directory\n"
+msgstr ""
+
+#: windres.c:406
+#, c-format
+msgid ": expected to be a leaf\n"
+msgstr ""
+
+#: windres.c:417
#, c-format
msgid ": duplicate value\n"
msgstr ""
-#: windres.c:543
+#: windres.c:567
#, c-format
msgid "unknown format type `%s'"
msgstr ""
-#: windres.c:544
+#: windres.c:568
#, c-format
msgid "%s: supported formats:"
msgstr ""
#. Otherwise, we give up.
-#: windres.c:627
+#: windres.c:651
#, c-format
msgid "can not determine type of file `%s'; use the -J option"
msgstr ""
-#: windres.c:639
+#: windres.c:663
#, c-format
msgid "Usage: %s [option(s)] [input-file] [output-file]\n"
msgstr ""
-#: windres.c:641
+#: windres.c:665
#, c-format
msgid ""
" The options are:\n"
@@ -5207,6 +5407,7 @@ msgid ""
" -D --define <sym>[=<val>] Define SYM when preprocessing rc file\n"
" -U --undefine <sym> Undefine SYM when preprocessing rc file\n"
" -v --verbose Verbose - tells you what it's doing\n"
+" -c --codepage=<codepage> Specify default codepage\n"
" -l --language=<val> Set language when reading rc file\n"
" --use-temp-file Use a temporary file instead of popen to "
"read\n"
@@ -5214,12 +5415,12 @@ msgid ""
" --no-use-temp-file Use popen (default)\n"
msgstr ""
-#: windres.c:657
+#: windres.c:682
#, c-format
msgid " --yydebug Turn on parser debugging\n"
msgstr ""
-#: windres.c:660
+#: windres.c:685
#, c-format
msgid ""
" -r Ignored for compatibility with rc\n"
@@ -5228,7 +5429,7 @@ msgid ""
" -V --version Print version information\n"
msgstr ""
-#: windres.c:665
+#: windres.c:690
#, c-format
msgid ""
"FORMAT is one of rc, res, or coff, and is deduced from the file name\n"
@@ -5236,36 +5437,40 @@ msgid ""
"No input-file is stdin, default rc. No output-file is stdout, default rc.\n"
msgstr ""
-#: windres.c:803
+#: windres.c:828
+msgid "invalid codepage specified.\n"
+msgstr ""
+
+#: windres.c:843
msgid "invalid option -f\n"
msgstr ""
-#: windres.c:808
+#: windres.c:848
msgid "No filename following the -fo option.\n"
msgstr ""
-#: windres.c:866
+#: windres.c:907
#, c-format
msgid ""
"Option -I is deprecated for setting the input format, please use -J "
"instead.\n"
msgstr ""
-#: windres.c:984
+#: windres.c:1027
msgid "no resources"
msgstr ""
-#: wrstabs.c:354 wrstabs.c:1915
+#: wrstabs.c:353 wrstabs.c:1916
#, c-format
msgid "string_hash_lookup failed: %s"
msgstr ""
-#: wrstabs.c:635
+#: wrstabs.c:636
#, c-format
msgid "stab_int_type: bad size %u"
msgstr ""
-#: wrstabs.c:1393
+#: wrstabs.c:1394
#, c-format
msgid "%s: warning: unknown size for field `%s' in struct"
msgstr ""
diff --git a/contrib/binutils/binutils/prdbg.c b/contrib/binutils/binutils/prdbg.c
index 87a4934..529903d 100644
--- a/contrib/binutils/binutils/prdbg.c
+++ b/contrib/binutils/binutils/prdbg.c
@@ -1,5 +1,5 @@
/* prdbg.c -- Print out generic debugging information.
- Copyright 1995, 1996, 1999, 2002, 2003, 2004
+ Copyright 1995, 1996, 1999, 2002, 2003, 2004, 2006, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
Tags style generation written by Salvador E. Tropea <set@computer.org>.
@@ -24,12 +24,11 @@
/* This file prints out the generic debugging information, by
supplying a set of routines to debug_write. */
-#include <stdio.h>
+#include "sysdep.h"
#include <assert.h>
-
#include "bfd.h"
-#include "bucomm.h"
#include "libiberty.h"
+#include "demangle.h"
#include "debug.h"
#include "budbg.h"
@@ -53,7 +52,7 @@ struct pr_handle
/* The symbols table for this BFD. */
asymbol **syms;
/* Pointer to a function to demangle symbols. */
- char *(*demangler) (bfd *, const char *);
+ char *(*demangler) (bfd *, const char *, int);
};
/* The type stack. */
@@ -724,8 +723,8 @@ pr_function_type (void *p, int argcount, bfd_boolean varargs)
/* Now the return type is on the top of the stack. */
- s = (char *) xmalloc (len);
- strcpy (s, "(|) (");
+ s = xmalloc (len);
+ LITSTRCPY (s, "(|) (");
if (argcount < 0)
strcat (s, "/* unknown */");
@@ -910,11 +909,10 @@ pr_method_type (void *p, bfd_boolean domain, int argcount, bfd_boolean varargs)
domain_type = pop_type (info);
if (domain_type == NULL)
return FALSE;
- if (strncmp (domain_type, "class ", sizeof "class " - 1) == 0
+ if (CONST_STRNEQ (domain_type, "class ")
&& strchr (domain_type + sizeof "class " - 1, ' ') == NULL)
domain_type += sizeof "class " - 1;
- else if (strncmp (domain_type, "union class ",
- sizeof "union class ") == 0
+ else if (CONST_STRNEQ (domain_type, "union class ")
&& (strchr (domain_type + sizeof "union class " - 1, ' ')
== NULL))
domain_type += sizeof "union class " - 1;
@@ -1317,7 +1315,7 @@ pr_class_baseclass (void *p, bfd_vma bitpos, bfd_boolean virtual,
if (t == NULL)
return FALSE;
- if (strncmp (t, "class ", sizeof "class " - 1) == 0)
+ if (CONST_STRNEQ (t, "class "))
t += sizeof "class " - 1;
/* Push it back on to take advantage of the prepend_type and
@@ -2154,12 +2152,10 @@ tg_class_static_member (void *p, const char *name,
len_var = strlen (name);
len_class = strlen (info->stack->next->type);
- full_name = (char *) xmalloc (len_var + len_class + 3);
+ full_name = xmalloc (len_var + len_class + 3);
if (! full_name)
return FALSE;
- memcpy (full_name, info->stack->next->type, len_class);
- memcpy (full_name + len_class, "::", 2);
- memcpy (full_name + len_class + 2, name, len_var + 1);
+ sprintf (full_name, "%s::%s", info->stack->next->type, name);
if (! substitute_type (info, full_name))
return FALSE;
@@ -2199,7 +2195,7 @@ tg_class_baseclass (void *p, bfd_vma bitpos ATTRIBUTE_UNUSED,
if (t == NULL)
return FALSE;
- if (strncmp (t, "class ", sizeof "class " - 1) == 0)
+ if (CONST_STRNEQ (t, "class "))
t += sizeof "class " - 1;
/* Push it back on to take advantage of the prepend_type and
@@ -2529,25 +2525,18 @@ tg_variable (void *p, const char *name, enum debug_var_kind kind,
bfd_vma val ATTRIBUTE_UNUSED)
{
struct pr_handle *info = (struct pr_handle *) p;
- char *t;
- const char *dname, *from_class;
+ char *t, *dname, *from_class;
t = pop_type (info);
if (t == NULL)
return FALSE;
- dname = name;
+ dname = NULL;
if (info->demangler)
- {
- dname = info->demangler (info->abfd, name);
- if (strcmp (name, dname) == 0)
- {
- free ((char *) dname);
- dname = name;
- }
- }
+ dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS);
- if (dname != name)
+ from_class = NULL;
+ if (dname != NULL)
{
char *sep;
sep = strstr (dname, "::");
@@ -2558,14 +2547,9 @@ tg_variable (void *p, const char *name, enum debug_var_kind kind,
from_class = dname;
}
else
- {
- /* Obscure types as vts and type_info nodes. */
- name = dname;
- from_class = NULL;
- }
+ /* Obscure types as vts and type_info nodes. */
+ name = dname;
}
- else
- from_class = NULL;
fprintf (info->f, "%s\t%s\t0;\"\tkind:v\ttype:%s", name, info->filename, t);
@@ -2583,10 +2567,10 @@ tg_variable (void *p, const char *name, enum debug_var_kind kind,
}
if (from_class)
- {
- fprintf (info->f, "\tclass:%s",from_class);
- free ((char *) dname);
- }
+ fprintf (info->f, "\tclass:%s", from_class);
+
+ if (dname)
+ free (dname);
fprintf (info->f, "\n");
@@ -2601,28 +2585,22 @@ static bfd_boolean
tg_start_function (void *p, const char *name, bfd_boolean global)
{
struct pr_handle *info = (struct pr_handle *) p;
- const char *dname;
+ char *dname;
if (! global)
info->stack->flavor = "static";
else
info->stack->flavor = NULL;
- dname = name;
+ dname = NULL;
if (info->demangler)
- {
- dname = info->demangler (info->abfd, name);
- if (strcmp (name, dname) == 0)
- {
- free ((char *) dname);
- dname = name;
- }
- }
+ dname = info->demangler (info->abfd, name, DMGL_ANSI | DMGL_PARAMS);
- if (! substitute_type (info, dname))
+ if (! substitute_type (info, dname ? dname : name))
return FALSE;
- if (dname != name)
+ info->stack->method = NULL;
+ if (dname != NULL)
{
char *sep;
sep = strstr (dname, "::");
@@ -2642,8 +2620,6 @@ tg_start_function (void *p, const char *name, bfd_boolean global)
*sep = 0;
/* Obscure functions as type_info function. */
}
- else
- info->stack->method = NULL;
info->stack->parents = strdup (name);
diff --git a/contrib/binutils/binutils/rclex.c b/contrib/binutils/binutils/rclex.c
index b546335..ef0961b 100644
--- a/contrib/binutils/binutils/rclex.c
+++ b/contrib/binutils/binutils/rclex.c
@@ -1,646 +1,9 @@
-/* A lexical scanner generated by flex */
+/* rclex.c -- lexer for Windows rc files parser */
-/* Scanner skeleton version:
- * $Header: /cvs/src/src/binutils/rclex.c,v 1.1.16.1 2006/04/16 18:36:40 drow Exp $
- */
-
-#define FLEX_SCANNER
-#define YY_FLEX_MAJOR_VERSION 2
-#define YY_FLEX_MINOR_VERSION 5
-
-#include <stdio.h>
-#include <errno.h>
-
-/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
-#ifdef c_plusplus
-#ifndef __cplusplus
-#define __cplusplus
-#endif
-#endif
-
-
-#ifdef __cplusplus
-
-#include <stdlib.h>
-#ifndef _WIN32
-#include <unistd.h>
-#endif
-
-/* Use prototypes in function declarations. */
-#define YY_USE_PROTOS
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-#if __STDC__
-
-#define YY_USE_PROTOS
-#define YY_USE_CONST
-
-#endif /* __STDC__ */
-#endif /* ! __cplusplus */
-
-#ifdef __TURBOC__
- #pragma warn -rch
- #pragma warn -use
-#include <io.h>
-#include <stdlib.h>
-#define YY_USE_CONST
-#define YY_USE_PROTOS
-#endif
-
-#ifdef YY_USE_CONST
-#define yyconst const
-#else
-#define yyconst
-#endif
-
-
-#ifdef YY_USE_PROTOS
-#define YY_PROTO(proto) proto
-#else
-#define YY_PROTO(proto) ()
-#endif
-
-
-/* Returned upon end-of-file. */
-#define YY_NULL 0
-
-/* Promotes a possibly negative, possibly signed char to an unsigned
- * integer for use as an array index. If the signed char is negative,
- * we want to instead treat it as an 8-bit unsigned char, hence the
- * double cast.
- */
-#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
-
-/* Enter a start condition. This macro really ought to take a parameter,
- * but we do it the disgusting crufty way forced on us by the ()-less
- * definition of BEGIN.
- */
-#define BEGIN yy_start = 1 + 2 *
-
-/* Translate the current start state into a value that can be later handed
- * to BEGIN to return to the state. The YYSTATE alias is for lex
- * compatibility.
- */
-#define YY_START ((yy_start - 1) / 2)
-#define YYSTATE YY_START
-
-/* Action number for EOF rule of a given start state. */
-#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
-
-/* Special action meaning "start processing a new file". */
-#define YY_NEW_FILE yyrestart( yyin )
-
-#define YY_END_OF_BUFFER_CHAR 0
-
-/* Size of default input buffer. */
-#define YY_BUF_SIZE 16384
-
-typedef struct yy_buffer_state *YY_BUFFER_STATE;
-
-extern int yyleng;
-extern FILE *yyin, *yyout;
-
-#define EOB_ACT_CONTINUE_SCAN 0
-#define EOB_ACT_END_OF_FILE 1
-#define EOB_ACT_LAST_MATCH 2
-
-/* The funky do-while in the following #define is used to turn the definition
- * int a single C statement (which needs a semi-colon terminator). This
- * avoids problems with code like:
- *
- * if ( condition_holds )
- * yyless( 5 );
- * else
- * do_something_else();
- *
- * Prior to using the do-while the compiler would get upset at the
- * "else" because it interpreted the "if" statement as being all
- * done when it reached the ';' after the yyless() call.
- */
-
-/* Return all but the first 'n' matched characters back to the input stream. */
-
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- *yy_cp = yy_hold_char; \
- YY_RESTORE_YY_MORE_OFFSET \
- yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
- YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- } \
- while ( 0 )
-
-#define unput(c) yyunput( c, yytext_ptr )
-
-/* The following is because we cannot portably get our hands on size_t
- * (without autoconf's help, which isn't available because we want
- * flex-generated scanners to compile on their own).
- */
-typedef unsigned int yy_size_t;
-
-
-struct yy_buffer_state
- {
- FILE *yy_input_file;
-
- char *yy_ch_buf; /* input buffer */
- char *yy_buf_pos; /* current position in input buffer */
-
- /* Size of input buffer in bytes, not including room for EOB
- * characters.
- */
- yy_size_t yy_buf_size;
-
- /* Number of characters read into yy_ch_buf, not including EOB
- * characters.
- */
- int yy_n_chars;
-
- /* Whether we "own" the buffer - i.e., we know we created it,
- * and can realloc() it to grow it, and should free() it to
- * delete it.
- */
- int yy_is_our_buffer;
-
- /* Whether this is an "interactive" input source; if so, and
- * if we're using stdio for input, then we want to use getc()
- * instead of fread(), to make sure we stop fetching input after
- * each newline.
- */
- int yy_is_interactive;
-
- /* Whether we're considered to be at the beginning of a line.
- * If so, '^' rules will be active on the next match, otherwise
- * not.
- */
- int yy_at_bol;
-
- /* Whether to try to fill the input buffer when we reach the
- * end of it.
- */
- int yy_fill_buffer;
-
- int yy_buffer_status;
-#define YY_BUFFER_NEW 0
-#define YY_BUFFER_NORMAL 1
- /* When an EOF's been seen but there's still some text to process
- * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- * shouldn't try reading from the input source any more. We might
- * still have a bunch of tokens to match, though, because of
- * possible backing-up.
- *
- * When we actually see the EOF, we change the status to "new"
- * (via yyrestart()), so that the user can continue scanning by
- * just pointing yyin at a new input file.
- */
-#define YY_BUFFER_EOF_PENDING 2
- };
-
-static YY_BUFFER_STATE yy_current_buffer = 0;
-
-/* We provide macros for accessing buffer states in case in the
- * future we want to put the buffer states in a more general
- * "scanner state".
- */
-#define YY_CURRENT_BUFFER yy_current_buffer
-
-
-/* yy_hold_char holds the character lost when yytext is formed. */
-static char yy_hold_char;
-
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
-
-
-int yyleng;
-
-/* Points to current character in buffer. */
-static char *yy_c_buf_p = (char *) 0;
-static int yy_init = 1; /* whether we need to initialize */
-static int yy_start = 0; /* start state number */
-
-/* Flag which is used to allow yywrap()'s to do buffer switches
- * instead of setting up a fresh yyin. A bit of a hack ...
- */
-static int yy_did_buffer_switch_on_eof;
-
-void yyrestart YY_PROTO(( FILE *input_file ));
-
-void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
-void yy_load_buffer_state YY_PROTO(( void ));
-YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
-void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
-void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
-#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
-
-YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
-YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
-YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
-
-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
-static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
-static void yy_flex_free YY_PROTO(( void * ));
-
-#define yy_new_buffer yy_create_buffer
-
-#define yy_set_interactive(is_interactive) \
- { \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_is_interactive = is_interactive; \
- }
-
-#define yy_set_bol(at_bol) \
- { \
- if ( ! yy_current_buffer ) \
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
- yy_current_buffer->yy_at_bol = at_bol; \
- }
-
-#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
-
-typedef unsigned char YY_CHAR;
-FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
-typedef int yy_state_type;
-extern char *yytext;
-#define yytext_ptr yytext
-
-static yy_state_type yy_get_previous_state YY_PROTO(( void ));
-static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
-static int yy_get_next_buffer YY_PROTO(( void ));
-static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
-
-/* Done after the current pattern has been matched and before the
- * corresponding action - sets up yytext.
- */
-#define YY_DO_BEFORE_ACTION \
- yytext_ptr = yy_bp; \
- yyleng = (int) (yy_cp - yy_bp); \
- yy_hold_char = *yy_cp; \
- *yy_cp = '\0'; \
- yy_c_buf_p = yy_cp;
-
-#define YY_NUM_RULES 86
-#define YY_END_OF_BUFFER 87
-static yyconst short int yy_accept[470] =
- { 0,
- 0, 0, 87, 85, 84, 83, 85, 78, 80, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 2, 4, 84,
- 0, 81, 78, 80, 79, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 81, 0, 82, 11, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
-
- 82, 82, 82, 82, 82, 3, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 76, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 41, 82, 82,
- 82, 53, 42, 82, 82, 82, 82, 82, 82, 82,
- 46, 82, 82, 82, 82, 82, 82, 71, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
-
- 82, 82, 82, 7, 82, 82, 82, 38, 1, 82,
- 82, 82, 82, 82, 18, 82, 82, 25, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 70,
- 82, 82, 39, 40, 82, 82, 82, 82, 82, 30,
- 82, 82, 82, 82, 82, 82, 50, 82, 82, 82,
- 82, 82, 34, 82, 82, 9, 82, 82, 19, 82,
- 68, 82, 82, 82, 82, 82, 82, 12, 0, 82,
- 82, 82, 82, 82, 82, 82, 13, 82, 14, 82,
- 82, 82, 82, 65, 82, 82, 82, 52, 82, 72,
- 82, 82, 82, 82, 82, 82, 47, 82, 82, 82,
-
- 82, 82, 82, 82, 82, 82, 58, 82, 82, 36,
- 82, 82, 82, 82, 82, 82, 82, 82, 0, 82,
- 0, 77, 17, 82, 82, 51, 82, 10, 82, 82,
- 82, 82, 16, 82, 82, 82, 82, 82, 82, 82,
- 29, 82, 82, 82, 82, 82, 82, 82, 73, 82,
- 31, 82, 82, 82, 82, 82, 82, 45, 6, 82,
- 82, 82, 82, 77, 82, 23, 24, 82, 15, 82,
- 27, 82, 82, 66, 82, 28, 54, 43, 82, 82,
- 82, 48, 82, 69, 8, 82, 82, 82, 82, 82,
- 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,
-
- 64, 82, 82, 82, 82, 56, 82, 82, 82, 82,
- 35, 49, 82, 82, 82, 82, 20, 82, 82, 82,
- 82, 82, 82, 82, 82, 74, 82, 82, 82, 32,
- 82, 82, 37, 82, 82, 82, 82, 82, 82, 75,
- 82, 67, 61, 82, 82, 82, 33, 59, 60, 5,
- 21, 82, 82, 82, 82, 55, 57, 82, 82, 82,
- 26, 63, 82, 82, 82, 62, 22, 44, 0
- } ;
-
-static yyconst int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 5, 6, 1, 1, 1, 1, 1,
- 1, 1, 1, 7, 1, 1, 1, 8, 8, 8,
- 9, 8, 8, 8, 8, 8, 8, 1, 1, 1,
- 1, 1, 1, 1, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 19, 26, 27, 28, 29, 30, 19, 31, 32, 19,
- 1, 1, 1, 1, 1, 1, 33, 33, 33, 33,
-
- 33, 33, 19, 19, 19, 19, 19, 19, 19, 19,
- 19, 19, 19, 19, 19, 19, 19, 19, 19, 33,
- 19, 19, 34, 1, 35, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1
- } ;
-
-static yyconst int yy_meta[36] =
- { 0,
- 1, 2, 3, 2, 1, 4, 2, 5, 5, 5,
- 5, 5, 5, 5, 5, 1, 1, 1, 1, 1,
- 5, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 5, 1, 1
- } ;
-
-static yyconst short int yy_base[476] =
- { 0,
- 0, 0, 517, 518, 34, 518, 511, 0, 494, 25,
- 26, 45, 25, 28, 24, 488, 499, 49, 0, 40,
- 43, 488, 51, 66, 67, 484, 35, 518, 518, 81,
- 505, 84, 0, 488, 518, 0, 496, 479, 494, 477,
- 75, 476, 479, 477, 46, 491, 70, 486, 473, 483,
- 55, 479, 483, 468, 69, 471, 86, 84, 469, 479,
- 466, 480, 466, 461, 477, 472, 75, 455, 81, 459,
- 87, 77, 470, 469, 467, 454, 454, 460, 96, 463,
- 455, 449, 448, 110, 468, 458, 0, 453, 446, 451,
- 450, 445, 454, 437, 438, 451, 435, 450, 432, 428,
-
- 431, 432, 435, 443, 426, 0, 425, 438, 437, 422,
- 417, 419, 429, 421, 422, 426, 414, 430, 425, 412,
- 426, 407, 408, 409, 421, 411, 0, 404, 411, 418,
- 416, 412, 410, 417, 395, 401, 414, 408, 394, 403,
- 399, 393, 389, 390, 388, 394, 396, 105, 385, 389,
- 401, 390, 391, 398, 387, 379, 381, 378, 375, 378,
- 372, 376, 389, 370, 365, 105, 383, 0, 381, 369,
- 365, 0, 0, 364, 365, 362, 360, 377, 363, 358,
- 105, 375, 374, 353, 357, 357, 351, 0, 368, 354,
- 349, 348, 354, 348, 345, 358, 348, 356, 358, 354,
-
- 349, 346, 351, 0, 337, 346, 352, 0, 0, 336,
- 122, 336, 347, 107, 0, 347, 333, 0, 330, 328,
- 338, 327, 338, 330, 329, 322, 319, 315, 332, 0,
- 332, 333, 0, 0, 329, 324, 331, 316, 316, 0,
- 116, 307, 309, 320, 324, 320, 0, 323, 320, 110,
- 320, 320, 0, 308, 318, 0, 318, 310, 0, 296,
- 0, 300, 309, 296, 293, 306, 306, 0, 135, 139,
- 295, 289, 292, 302, 290, 292, 0, 295, 297, 297,
- 278, 294, 297, 0, 295, 280, 278, 0, 279, 0,
- 272, 285, 269, 287, 272, 283, 0, 282, 281, 273,
-
- 267, 279, 263, 259, 261, 259, 0, 276, 258, 0,
- 257, 256, 260, 250, 271, 270, 267, 260, 272, 145,
- 271, 151, 0, 261, 243, 0, 242, 0, 261, 240,
- 260, 241, 0, 252, 239, 252, 238, 233, 249, 248,
- 0, 251, 249, 249, 236, 229, 242, 227, 0, 224,
- 0, 225, 224, 241, 226, 239, 220, 229, 0, 218,
- 217, 224, 219, 237, 215, 0, 0, 211, 0, 228,
- 0, 211, 205, 0, 218, 0, 0, 0, 214, 208,
- 213, 0, 222, 0, 0, 217, 206, 201, 202, 201,
- 215, 201, 201, 199, 208, 210, 209, 201, 190, 196,
-
- 194, 190, 190, 192, 198, 0, 200, 184, 186, 184,
- 0, 0, 186, 183, 190, 178, 0, 179, 173, 174,
- 172, 185, 188, 183, 173, 0, 185, 173, 166, 0,
- 169, 177, 0, 166, 162, 157, 159, 158, 161, 0,
- 157, 0, 0, 162, 167, 158, 0, 0, 0, 0,
- 0, 143, 152, 143, 141, 0, 0, 130, 124, 124,
- 0, 0, 107, 85, 80, 0, 0, 0, 518, 158,
- 163, 65, 168, 173, 178
- } ;
-
-static yyconst short int yy_def[476] =
- { 0,
- 469, 1, 469, 469, 469, 469, 470, 471, 472, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 469, 469, 469,
- 470, 469, 471, 472, 469, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 469, 470, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
-
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
-
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 469, 474,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
-
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 475, 474,
- 475, 474, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 475, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
-
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 473, 473,
- 473, 473, 473, 473, 473, 473, 473, 473, 0, 469,
- 469, 469, 469, 469, 469
- } ;
-
-static yyconst short int yy_nxt[554] =
- { 0,
- 4, 5, 6, 5, 7, 8, 4, 9, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 19,
- 20, 21, 22, 19, 23, 24, 25, 19, 26, 27,
- 19, 19, 19, 28, 29, 30, 37, 30, 50, 41,
- 52, 55, 51, 42, 81, 38, 43, 56, 82, 63,
- 53, 39, 83, 40, 44, 95, 67, 64, 54, 96,
- 59, 45, 60, 65, 103, 46, 68, 66, 47, 34,
- 61, 62, 48, 49, 70, 73, 71, 74, 76, 72,
- 77, 104, 30, 78, 30, 84, 84, 90, 85, 108,
- 91, 98, 99, 75, 79, 111, 113, 123, 126, 109,
-
- 129, 124, 131, 132, 114, 139, 468, 467, 127, 112,
- 130, 84, 84, 205, 85, 241, 206, 273, 242, 225,
- 274, 140, 243, 269, 269, 295, 270, 141, 226, 466,
- 207, 227, 228, 304, 229, 465, 269, 269, 305, 319,
- 321, 296, 321, 322, 36, 321, 321, 464, 321, 322,
- 36, 321, 321, 463, 321, 322, 36, 321, 31, 31,
- 462, 31, 31, 33, 33, 461, 33, 33, 36, 460,
- 459, 36, 36, 320, 320, 458, 320, 320, 321, 321,
- 457, 456, 321, 455, 454, 453, 452, 451, 450, 449,
- 448, 447, 446, 445, 444, 443, 442, 441, 440, 439,
-
- 438, 437, 436, 435, 434, 433, 432, 431, 430, 429,
- 428, 427, 426, 425, 424, 423, 422, 421, 420, 419,
- 418, 417, 416, 415, 414, 413, 412, 411, 410, 409,
- 408, 407, 406, 405, 404, 403, 402, 401, 400, 399,
- 398, 364, 397, 396, 395, 394, 393, 392, 391, 390,
- 389, 388, 387, 386, 385, 384, 383, 382, 381, 380,
- 379, 378, 377, 376, 375, 374, 373, 372, 371, 370,
- 369, 368, 367, 366, 365, 364, 364, 363, 362, 361,
- 360, 359, 358, 357, 356, 355, 354, 353, 352, 351,
- 350, 349, 348, 347, 346, 345, 344, 343, 342, 341,
-
- 340, 339, 338, 337, 336, 335, 334, 333, 332, 331,
- 330, 329, 328, 327, 326, 325, 324, 323, 318, 317,
- 316, 315, 314, 313, 312, 311, 310, 309, 308, 307,
- 306, 303, 302, 301, 300, 299, 298, 297, 294, 293,
- 292, 291, 290, 289, 288, 287, 286, 285, 284, 283,
- 282, 281, 280, 279, 278, 277, 276, 275, 272, 271,
- 268, 267, 266, 265, 264, 263, 262, 261, 260, 259,
- 258, 257, 256, 255, 254, 253, 252, 251, 250, 249,
- 248, 247, 246, 245, 244, 240, 239, 238, 237, 236,
- 235, 234, 233, 232, 231, 230, 224, 223, 222, 221,
-
- 220, 219, 218, 217, 216, 215, 214, 213, 212, 211,
- 210, 209, 208, 204, 203, 202, 201, 200, 199, 198,
- 197, 196, 195, 194, 193, 192, 191, 190, 189, 188,
- 187, 186, 185, 184, 183, 182, 181, 180, 179, 178,
- 177, 176, 175, 174, 173, 172, 171, 170, 169, 168,
- 167, 166, 165, 164, 163, 162, 161, 160, 159, 158,
- 157, 156, 155, 154, 153, 152, 151, 150, 149, 148,
- 147, 146, 32, 145, 144, 143, 142, 138, 137, 136,
- 135, 134, 133, 128, 125, 122, 121, 120, 119, 118,
- 117, 116, 115, 110, 107, 106, 105, 102, 101, 100,
-
- 97, 94, 93, 92, 89, 88, 87, 86, 35, 32,
- 80, 69, 58, 57, 35, 32, 469, 3, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469
- } ;
-
-static yyconst short int yy_chk[554] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 5, 10, 5, 13, 11,
- 14, 15, 13, 11, 27, 10, 11, 15, 27, 20,
- 14, 10, 27, 10, 12, 45, 21, 20, 14, 45,
- 18, 12, 18, 20, 51, 12, 21, 20, 12, 472,
- 18, 18, 12, 12, 23, 24, 23, 24, 25, 23,
- 25, 51, 30, 25, 30, 32, 32, 41, 32, 55,
- 41, 47, 47, 24, 25, 57, 58, 67, 69, 55,
-
- 71, 67, 72, 72, 58, 79, 465, 464, 69, 57,
- 71, 84, 84, 148, 84, 181, 148, 214, 181, 166,
- 214, 79, 181, 211, 211, 241, 211, 79, 166, 463,
- 148, 166, 166, 250, 166, 460, 269, 269, 250, 269,
- 270, 241, 270, 270, 270, 270, 320, 459, 320, 320,
- 320, 320, 322, 458, 322, 322, 322, 322, 470, 470,
- 455, 470, 470, 471, 471, 454, 471, 471, 473, 453,
- 452, 473, 473, 474, 474, 446, 474, 474, 475, 475,
- 445, 444, 475, 441, 439, 438, 437, 436, 435, 434,
- 432, 431, 429, 428, 427, 425, 424, 423, 422, 421,
-
- 420, 419, 418, 416, 415, 414, 413, 410, 409, 408,
- 407, 405, 404, 403, 402, 401, 400, 399, 398, 397,
- 396, 395, 394, 393, 392, 391, 390, 389, 388, 387,
- 386, 383, 381, 380, 379, 375, 373, 372, 370, 368,
- 365, 364, 363, 362, 361, 360, 358, 357, 356, 355,
- 354, 353, 352, 350, 348, 347, 346, 345, 344, 343,
- 342, 340, 339, 338, 337, 336, 335, 334, 332, 331,
- 330, 329, 327, 325, 324, 321, 319, 318, 317, 316,
- 315, 314, 313, 312, 311, 309, 308, 306, 305, 304,
- 303, 302, 301, 300, 299, 298, 296, 295, 294, 293,
-
- 292, 291, 289, 287, 286, 285, 283, 282, 281, 280,
- 279, 278, 276, 275, 274, 273, 272, 271, 267, 266,
- 265, 264, 263, 262, 260, 258, 257, 255, 254, 252,
- 251, 249, 248, 246, 245, 244, 243, 242, 239, 238,
- 237, 236, 235, 232, 231, 229, 228, 227, 226, 225,
- 224, 223, 222, 221, 220, 219, 217, 216, 213, 212,
- 210, 207, 206, 205, 203, 202, 201, 200, 199, 198,
- 197, 196, 195, 194, 193, 192, 191, 190, 189, 187,
- 186, 185, 184, 183, 182, 180, 179, 178, 177, 176,
- 175, 174, 171, 170, 169, 167, 165, 164, 163, 162,
-
- 161, 160, 159, 158, 157, 156, 155, 154, 153, 152,
- 151, 150, 149, 147, 146, 145, 144, 143, 142, 141,
- 140, 139, 138, 137, 136, 135, 134, 133, 132, 131,
- 130, 129, 128, 126, 125, 124, 123, 122, 121, 120,
- 119, 118, 117, 116, 115, 114, 113, 112, 111, 110,
- 109, 108, 107, 105, 104, 103, 102, 101, 100, 99,
- 98, 97, 96, 95, 94, 93, 92, 91, 90, 89,
- 88, 86, 85, 83, 82, 81, 80, 78, 77, 76,
- 75, 74, 73, 70, 68, 66, 65, 64, 63, 62,
- 61, 60, 59, 56, 54, 53, 52, 50, 49, 48,
-
- 46, 44, 43, 42, 40, 39, 38, 37, 34, 31,
- 26, 22, 17, 16, 9, 7, 3, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469, 469, 469, 469, 469, 469, 469, 469,
- 469, 469, 469
- } ;
-
-static yy_state_type yy_last_accepting_state;
-static char *yy_last_accepting_cpos;
-
-/* The intent behind this definition is that it'll catch
- * any uses of REJECT which flex missed.
- */
-#define REJECT reject_used_but_not_detected
-#define yymore() yymore_used_but_not_detected
-#define YY_MORE_ADJ 0
-#define YY_RESTORE_YY_MORE_OFFSET
-char *yytext;
-#line 1 "rclex.l"
-#define INITIAL 0
-#line 2 "rclex.l"
-/* Copyright 1997, 1998, 1999, 2001, 2002, 2003, 2005
+/* Copyright 1997, 1998, 1999, 2001, 2002, 2003, 2005, 2006, 2007
Free Software Foundation, Inc.
- Written by Ian Lance Taylor, Cygnus Support.
+
+ Written by Kai Tietz, Onevision.
This file is part of GNU Binutils.
@@ -659,10 +22,10 @@ char *yytext;
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-/* This is a lex input file which generates a lexer used by the
- Windows rc file parser. It basically just recognized a bunch of
- keywords. */
+/* This is a lexer used by the Windows rc file parser. It basically
+ just recognized a bunch of keywords. */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
@@ -672,8 +35,6 @@ char *yytext;
#include <assert.h>
-#define YY_NO_UNPUT
-
/* Whether we are in rcdata mode, in which we returns the lengths of
strings. */
@@ -689,7 +50,7 @@ static int rcdata_mode;
static int suppress_cpp_data;
-#define MAYBE_RETURN(x) return suppress_cpp_data ? IGNORED_TOKEN : (x)
+#define IGNORE_CPP(x) (suppress_cpp_data ? IGNORED_TOKEN : (x))
/* The first filename we detect in the cpp output. We use this to
tell included files from the original file. */
@@ -706,1668 +67,139 @@ struct alloc_string
static struct alloc_string *strings;
-/* Local functions. */
-
-static void cpp_line (const char *);
-static char *handle_quotes (const char *, unsigned long *);
-static char *get_string (int);
-
-#line 716 "rclex.c"
-
-/* Macros after this point can all be overridden by user definitions in
- * section 1.
- */
-
-#ifndef YY_SKIP_YYWRAP
-#ifdef __cplusplus
-extern "C" int yywrap YY_PROTO(( void ));
-#else
-extern int yywrap YY_PROTO(( void ));
-#endif
-#endif
-
-#ifndef YY_NO_UNPUT
-static void yyunput YY_PROTO(( int c, char *buf_ptr ));
-#endif
-
-#ifndef yytext_ptr
-static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
-#endif
-
-#ifdef YY_NEED_STRLEN
-static int yy_flex_strlen YY_PROTO(( yyconst char * ));
-#endif
-
-#ifndef YY_NO_INPUT
-#ifdef __cplusplus
-static int yyinput YY_PROTO(( void ));
-#else
-static int input YY_PROTO(( void ));
-#endif
-#endif
-
-#if YY_STACK_USED
-static int yy_start_stack_ptr = 0;
-static int yy_start_stack_depth = 0;
-static int *yy_start_stack = 0;
-#ifndef YY_NO_PUSH_STATE
-static void yy_push_state YY_PROTO(( int new_state ));
-#endif
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state YY_PROTO(( void ));
-#endif
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state YY_PROTO(( void ));
-#endif
-
-#else
-#define YY_NO_PUSH_STATE 1
-#define YY_NO_POP_STATE 1
-#define YY_NO_TOP_STATE 1
-#endif
-
-#ifdef YY_MALLOC_DECL
-YY_MALLOC_DECL
-#else
-#if __STDC__
-#ifndef __cplusplus
-#include <stdlib.h>
-#endif
-#else
-/* Just try to get by without declaring the routines. This will fail
- * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- * or sizeof(void*) != sizeof(int).
- */
-#endif
-#endif
-
-/* Amount of stuff to slurp up with each read. */
-#ifndef YY_READ_BUF_SIZE
-#define YY_READ_BUF_SIZE 8192
-#endif
-
-/* Copy whatever the last rule matched to the standard output. */
-
-#ifndef ECHO
-/* This used to be an fputs(), but since the string might contain NUL's,
- * we now use fwrite().
- */
-#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
-#endif
-
-/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- * is returned in "result".
- */
-#ifndef YY_INPUT
-#define YY_INPUT(buf,result,max_size) \
- if ( yy_current_buffer->yy_is_interactive ) \
- { \
- int c = '*', n; \
- for ( n = 0; n < max_size && \
- (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
- buf[n] = (char) c; \
- if ( c == '\n' ) \
- buf[n++] = (char) c; \
- if ( c == EOF && ferror( yyin ) ) \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- result = n; \
- } \
- else \
- { \
- errno=0; \
- while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \
- { \
- if( errno != EINTR) \
- { \
- YY_FATAL_ERROR( "input in flex scanner failed" ); \
- break; \
- } \
- errno=0; \
- clearerr(yyin); \
- } \
- }
-#endif
-
-/* No semi-colon after return; correct usage is to write "yyterminate();" -
- * we don't want an extra ';' after the "return" because that will cause
- * some compilers to complain about unreachable statements.
- */
-#ifndef yyterminate
-#define yyterminate() return YY_NULL
-#endif
-
-/* Number of entries by which start-condition stack grows. */
-#ifndef YY_START_STACK_INCR
-#define YY_START_STACK_INCR 25
-#endif
-
-/* Report a fatal error. */
-#ifndef YY_FATAL_ERROR
-#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
-#endif
-
-/* Default declaration of generated scanner - a define so the user can
- * easily add parameters.
- */
-#ifndef YY_DECL
-#define YY_DECL int yylex YY_PROTO(( void ))
-#endif
-
-/* Code executed at the beginning of each rule, after yytext and yyleng
- * have been set up.
- */
-#ifndef YY_USER_ACTION
-#define YY_USER_ACTION
-#endif
-
-/* Code executed at the end of each rule. */
-#ifndef YY_BREAK
-#define YY_BREAK break;
-#endif
-
-#define YY_RULE_SETUP \
- YY_USER_ACTION
-
-YY_DECL
- {
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
-
-#line 78 "rclex.l"
-
-
-#line 881 "rclex.c"
-
- if ( yy_init )
- {
- yy_init = 0;
-
-#ifdef YY_USER_INIT
- YY_USER_INIT;
-#endif
-
- if ( ! yy_start )
- yy_start = 1; /* first start state */
-
- if ( ! yyin )
- yyin = stdin;
-
- if ( ! yyout )
- yyout = stdout;
-
- if ( ! yy_current_buffer )
- yy_current_buffer =
- yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_load_buffer_state();
- }
-
- while ( 1 ) /* loops until end-of-file is reached */
- {
- yy_cp = yy_c_buf_p;
-
- /* Support of yytext. */
- *yy_cp = yy_hold_char;
-
- /* yy_bp points to the position in yy_ch_buf of the start of
- * the current run.
- */
- yy_bp = yy_cp;
-
- yy_current_state = yy_start;
-yy_match:
- do
- {
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 470 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- ++yy_cp;
- }
- while ( yy_base[yy_current_state] != 518 );
-
-yy_find_action:
- yy_act = yy_accept[yy_current_state];
- if ( yy_act == 0 )
- { /* have to back up */
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- yy_act = yy_accept[yy_current_state];
- }
-
- YY_DO_BEFORE_ACTION;
-
-
-do_action: /* This label is used only to access EOF actions. */
-
-
- switch ( yy_act )
- { /* beginning of action switch */
- case 0: /* must back up */
- /* undo the effects of YY_DO_BEFORE_ACTION */
- *yy_cp = yy_hold_char;
- yy_cp = yy_last_accepting_cpos;
- yy_current_state = yy_last_accepting_state;
- goto yy_find_action;
-
-case 1:
-YY_RULE_SETUP
-#line 80 "rclex.l"
-{ MAYBE_RETURN (BEG); }
- YY_BREAK
-case 2:
-YY_RULE_SETUP
-#line 81 "rclex.l"
-{ MAYBE_RETURN (BEG); }
- YY_BREAK
-case 3:
-YY_RULE_SETUP
-#line 82 "rclex.l"
-{ MAYBE_RETURN (END); }
- YY_BREAK
-case 4:
-YY_RULE_SETUP
-#line 83 "rclex.l"
-{ MAYBE_RETURN (END); }
- YY_BREAK
-case 5:
-YY_RULE_SETUP
-#line 84 "rclex.l"
-{ MAYBE_RETURN (ACCELERATORS); }
- YY_BREAK
-case 6:
-YY_RULE_SETUP
-#line 85 "rclex.l"
-{ MAYBE_RETURN (VIRTKEY); }
- YY_BREAK
-case 7:
-YY_RULE_SETUP
-#line 86 "rclex.l"
-{ MAYBE_RETURN (ASCII); }
- YY_BREAK
-case 8:
-YY_RULE_SETUP
-#line 87 "rclex.l"
-{ MAYBE_RETURN (NOINVERT); }
- YY_BREAK
-case 9:
-YY_RULE_SETUP
-#line 88 "rclex.l"
-{ MAYBE_RETURN (SHIFT); }
- YY_BREAK
-case 10:
-YY_RULE_SETUP
-#line 89 "rclex.l"
-{ MAYBE_RETURN (CONTROL); }
- YY_BREAK
-case 11:
-YY_RULE_SETUP
-#line 90 "rclex.l"
-{ MAYBE_RETURN (ALT); }
- YY_BREAK
-case 12:
-YY_RULE_SETUP
-#line 91 "rclex.l"
-{ MAYBE_RETURN (BITMAP); }
- YY_BREAK
-case 13:
-YY_RULE_SETUP
-#line 92 "rclex.l"
-{ MAYBE_RETURN (CURSOR); }
- YY_BREAK
-case 14:
-YY_RULE_SETUP
-#line 93 "rclex.l"
-{ MAYBE_RETURN (DIALOG); }
- YY_BREAK
-case 15:
-YY_RULE_SETUP
-#line 94 "rclex.l"
-{ MAYBE_RETURN (DIALOGEX); }
- YY_BREAK
-case 16:
-YY_RULE_SETUP
-#line 95 "rclex.l"
-{ MAYBE_RETURN (EXSTYLE); }
- YY_BREAK
-case 17:
-YY_RULE_SETUP
-#line 96 "rclex.l"
-{ MAYBE_RETURN (CAPTION); }
- YY_BREAK
-case 18:
-YY_RULE_SETUP
-#line 97 "rclex.l"
-{ MAYBE_RETURN (CLASS); }
- YY_BREAK
-case 19:
-YY_RULE_SETUP
-#line 98 "rclex.l"
-{ MAYBE_RETURN (STYLE); }
- YY_BREAK
-case 20:
-YY_RULE_SETUP
-#line 99 "rclex.l"
-{ MAYBE_RETURN (AUTO3STATE); }
- YY_BREAK
-case 21:
-YY_RULE_SETUP
-#line 100 "rclex.l"
-{ MAYBE_RETURN (AUTOCHECKBOX); }
- YY_BREAK
-case 22:
-YY_RULE_SETUP
-#line 101 "rclex.l"
-{ MAYBE_RETURN (AUTORADIOBUTTON); }
- YY_BREAK
-case 23:
-YY_RULE_SETUP
-#line 102 "rclex.l"
-{ MAYBE_RETURN (CHECKBOX); }
- YY_BREAK
-case 24:
-YY_RULE_SETUP
-#line 103 "rclex.l"
-{ MAYBE_RETURN (COMBOBOX); }
- YY_BREAK
-case 25:
-YY_RULE_SETUP
-#line 104 "rclex.l"
-{ MAYBE_RETURN (CTEXT); }
- YY_BREAK
-case 26:
-YY_RULE_SETUP
-#line 105 "rclex.l"
-{ MAYBE_RETURN (DEFPUSHBUTTON); }
- YY_BREAK
-case 27:
-YY_RULE_SETUP
-#line 106 "rclex.l"
-{ MAYBE_RETURN (EDITTEXT); }
- YY_BREAK
-case 28:
-YY_RULE_SETUP
-#line 107 "rclex.l"
-{ MAYBE_RETURN (GROUPBOX); }
- YY_BREAK
-case 29:
-YY_RULE_SETUP
-#line 108 "rclex.l"
-{ MAYBE_RETURN (LISTBOX); }
- YY_BREAK
-case 30:
-YY_RULE_SETUP
-#line 109 "rclex.l"
-{ MAYBE_RETURN (LTEXT); }
- YY_BREAK
-case 31:
-YY_RULE_SETUP
-#line 110 "rclex.l"
-{ MAYBE_RETURN (PUSHBOX); }
- YY_BREAK
-case 32:
-YY_RULE_SETUP
-#line 111 "rclex.l"
-{ MAYBE_RETURN (PUSHBUTTON); }
- YY_BREAK
-case 33:
-YY_RULE_SETUP
-#line 112 "rclex.l"
-{ MAYBE_RETURN (RADIOBUTTON); }
- YY_BREAK
-case 34:
-YY_RULE_SETUP
-#line 113 "rclex.l"
-{ MAYBE_RETURN (RTEXT); }
- YY_BREAK
-case 35:
-YY_RULE_SETUP
-#line 114 "rclex.l"
-{ MAYBE_RETURN (SCROLLBAR); }
- YY_BREAK
-case 36:
-YY_RULE_SETUP
-#line 115 "rclex.l"
-{ MAYBE_RETURN (STATE3); }
- YY_BREAK
-case 37:
-YY_RULE_SETUP
-#line 116 "rclex.l"
-{ MAYBE_RETURN (USERBUTTON); }
- YY_BREAK
-case 38:
-YY_RULE_SETUP
-#line 117 "rclex.l"
-{ MAYBE_RETURN (BEDIT); }
- YY_BREAK
-case 39:
-YY_RULE_SETUP
-#line 118 "rclex.l"
-{ MAYBE_RETURN (HEDIT); }
- YY_BREAK
-case 40:
-YY_RULE_SETUP
-#line 119 "rclex.l"
-{ MAYBE_RETURN (IEDIT); }
- YY_BREAK
-case 41:
-YY_RULE_SETUP
-#line 120 "rclex.l"
-{ MAYBE_RETURN (FONT); }
- YY_BREAK
-case 42:
-YY_RULE_SETUP
-#line 121 "rclex.l"
-{ MAYBE_RETURN (ICON); }
- YY_BREAK
-case 43:
-YY_RULE_SETUP
-#line 122 "rclex.l"
-{ MAYBE_RETURN (LANGUAGE); }
- YY_BREAK
-case 44:
-YY_RULE_SETUP
-#line 123 "rclex.l"
-{ MAYBE_RETURN (CHARACTERISTICS); }
- YY_BREAK
-case 45:
-YY_RULE_SETUP
-#line 124 "rclex.l"
-{ MAYBE_RETURN (VERSIONK); }
- YY_BREAK
-case 46:
-YY_RULE_SETUP
-#line 125 "rclex.l"
-{ MAYBE_RETURN (MENU); }
- YY_BREAK
-case 47:
-YY_RULE_SETUP
-#line 126 "rclex.l"
-{ MAYBE_RETURN (MENUEX); }
- YY_BREAK
-case 48:
-YY_RULE_SETUP
-#line 127 "rclex.l"
-{ MAYBE_RETURN (MENUITEM); }
- YY_BREAK
-case 49:
-YY_RULE_SETUP
-#line 128 "rclex.l"
-{ MAYBE_RETURN (SEPARATOR); }
- YY_BREAK
-case 50:
-YY_RULE_SETUP
-#line 129 "rclex.l"
-{ MAYBE_RETURN (POPUP); }
- YY_BREAK
-case 51:
-YY_RULE_SETUP
-#line 130 "rclex.l"
-{ MAYBE_RETURN (CHECKED); }
- YY_BREAK
-case 52:
-YY_RULE_SETUP
-#line 131 "rclex.l"
-{ MAYBE_RETURN (GRAYED); }
- YY_BREAK
-case 53:
-YY_RULE_SETUP
-#line 132 "rclex.l"
-{ MAYBE_RETURN (HELP); }
- YY_BREAK
-case 54:
-YY_RULE_SETUP
-#line 133 "rclex.l"
-{ MAYBE_RETURN (INACTIVE); }
- YY_BREAK
-case 55:
-YY_RULE_SETUP
-#line 134 "rclex.l"
-{ MAYBE_RETURN (MENUBARBREAK); }
- YY_BREAK
-case 56:
-YY_RULE_SETUP
-#line 135 "rclex.l"
-{ MAYBE_RETURN (MENUBREAK); }
- YY_BREAK
-case 57:
-YY_RULE_SETUP
-#line 136 "rclex.l"
-{ MAYBE_RETURN (MESSAGETABLE); }
- YY_BREAK
-case 58:
-YY_RULE_SETUP
-#line 137 "rclex.l"
-{ MAYBE_RETURN (RCDATA); }
- YY_BREAK
-case 59:
-YY_RULE_SETUP
-#line 138 "rclex.l"
-{ MAYBE_RETURN (STRINGTABLE); }
- YY_BREAK
-case 60:
-YY_RULE_SETUP
-#line 139 "rclex.l"
-{ MAYBE_RETURN (VERSIONINFO); }
- YY_BREAK
-case 61:
-YY_RULE_SETUP
-#line 140 "rclex.l"
-{ MAYBE_RETURN (FILEVERSION); }
- YY_BREAK
-case 62:
-YY_RULE_SETUP
-#line 141 "rclex.l"
-{ MAYBE_RETURN (PRODUCTVERSION); }
- YY_BREAK
-case 63:
-YY_RULE_SETUP
-#line 142 "rclex.l"
-{ MAYBE_RETURN (FILEFLAGSMASK); }
- YY_BREAK
-case 64:
-YY_RULE_SETUP
-#line 143 "rclex.l"
-{ MAYBE_RETURN (FILEFLAGS); }
- YY_BREAK
-case 65:
-YY_RULE_SETUP
-#line 144 "rclex.l"
-{ MAYBE_RETURN (FILEOS); }
- YY_BREAK
-case 66:
-YY_RULE_SETUP
-#line 145 "rclex.l"
-{ MAYBE_RETURN (FILETYPE); }
- YY_BREAK
-case 67:
-YY_RULE_SETUP
-#line 146 "rclex.l"
-{ MAYBE_RETURN (FILESUBTYPE); }
- YY_BREAK
-case 68:
-YY_RULE_SETUP
-#line 147 "rclex.l"
-{ MAYBE_RETURN (VALUE); }
- YY_BREAK
-case 69:
-YY_RULE_SETUP
-#line 148 "rclex.l"
-{ MAYBE_RETURN (MOVEABLE); }
- YY_BREAK
-case 70:
-YY_RULE_SETUP
-#line 149 "rclex.l"
-{ MAYBE_RETURN (FIXED); }
- YY_BREAK
-case 71:
-YY_RULE_SETUP
-#line 150 "rclex.l"
-{ MAYBE_RETURN (PURE); }
- YY_BREAK
-case 72:
-YY_RULE_SETUP
-#line 151 "rclex.l"
-{ MAYBE_RETURN (IMPURE); }
- YY_BREAK
-case 73:
-YY_RULE_SETUP
-#line 152 "rclex.l"
-{ MAYBE_RETURN (PRELOAD); }
- YY_BREAK
-case 74:
-YY_RULE_SETUP
-#line 153 "rclex.l"
-{ MAYBE_RETURN (LOADONCALL); }
- YY_BREAK
-case 75:
-YY_RULE_SETUP
-#line 154 "rclex.l"
-{ MAYBE_RETURN (DISCARDABLE); }
- YY_BREAK
-case 76:
-YY_RULE_SETUP
-#line 155 "rclex.l"
-{ MAYBE_RETURN (NOT); }
- YY_BREAK
-case 77:
-YY_RULE_SETUP
-#line 157 "rclex.l"
-{
- char *s, *send;
-
- /* This is a hack to let us parse version
- information easily. */
-
- s = strchr (yytext, '"');
- ++s;
- send = strchr (s, '"');
- if (strncmp (s, "StringFileInfo",
- sizeof "StringFileInfo" - 1) == 0
- && s + sizeof "StringFileInfo" - 1 == send)
- MAYBE_RETURN (BLOCKSTRINGFILEINFO);
- else if (strncmp (s, "VarFileInfo",
- sizeof "VarFileInfo" - 1) == 0
- && s + sizeof "VarFileInfo" - 1 == send)
- MAYBE_RETURN (BLOCKVARFILEINFO);
- else
- {
- char *r;
-
- r = get_string (send - s + 1);
- strncpy (r, s, send - s);
- r[send - s] = '\0';
- yylval.s = r;
- MAYBE_RETURN (BLOCK);
- }
- }
- YY_BREAK
-case 78:
-YY_RULE_SETUP
-#line 186 "rclex.l"
+struct rclex_keywords
{
- cpp_line (yytext);
- }
- YY_BREAK
-case 79:
-YY_RULE_SETUP
-#line 190 "rclex.l"
-{
- yylval.i.val = strtoul (yytext, 0, 0);
- yylval.i.dword = 1;
- MAYBE_RETURN (NUMBER);
- }
- YY_BREAK
-case 80:
-YY_RULE_SETUP
-#line 196 "rclex.l"
-{
- yylval.i.val = strtoul (yytext, 0, 0);
- yylval.i.dword = 0;
- MAYBE_RETURN (NUMBER);
- }
- YY_BREAK
-case 81:
-YY_RULE_SETUP
-#line 202 "rclex.l"
-{
- char *s;
- unsigned long length;
-
- s = handle_quotes (yytext, &length);
- if (! rcdata_mode)
- {
- yylval.s = s;
- MAYBE_RETURN (QUOTEDSTRING);
- }
- else
- {
- yylval.ss.length = length;
- yylval.ss.s = s;
- MAYBE_RETURN (SIZEDSTRING);
- }
- }
- YY_BREAK
-case 82:
-YY_RULE_SETUP
-#line 220 "rclex.l"
-{
- char *s;
-
- /* I rejected comma in a string in order to
- handle VIRTKEY, CONTROL in an accelerator
- resource. This means that an unquoted
- file name can not contain a comma. I
- don't know what rc permits. */
-
- s = get_string (strlen (yytext) + 1);
- strcpy (s, yytext);
- yylval.s = s;
- MAYBE_RETURN (STRING);
- }
- YY_BREAK
-case 83:
-YY_RULE_SETUP
-#line 235 "rclex.l"
-{ ++rc_lineno; }
- YY_BREAK
-case 84:
-YY_RULE_SETUP
-#line 236 "rclex.l"
-{ /* ignore whitespace */ }
- YY_BREAK
-case 85:
-YY_RULE_SETUP
-#line 237 "rclex.l"
-{ MAYBE_RETURN (*yytext); }
- YY_BREAK
-case 86:
-YY_RULE_SETUP
-#line 239 "rclex.l"
-ECHO;
- YY_BREAK
-#line 1460 "rclex.c"
-case YY_STATE_EOF(INITIAL):
- yyterminate();
-
- case YY_END_OF_BUFFER:
- {
- /* Amount of text matched not including the EOB char. */
- int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
-
- /* Undo the effects of YY_DO_BEFORE_ACTION. */
- *yy_cp = yy_hold_char;
- YY_RESTORE_YY_MORE_OFFSET
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
- {
- /* We're scanning a new file or input source. It's
- * possible that this happened because the user
- * just pointed yyin at a new source and called
- * yylex(). If so, then we have to assure
- * consistency between yy_current_buffer and our
- * globals. Here is the right place to do so, because
- * this is the first action (other than possibly a
- * back-up) that will match for the new input source.
- */
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yy_current_buffer->yy_input_file = yyin;
- yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
- }
-
- /* Note that here we test for yy_c_buf_p "<=" to the position
- * of the first EOB in the buffer, since yy_c_buf_p will
- * already have been incremented past the NUL character
- * (since all states make transitions on EOB to the
- * end-of-buffer state). Contrast this with the test
- * in input().
- */
- if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- { /* This was really a NUL. */
- yy_state_type yy_next_state;
-
- yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- /* Okay, we're now positioned to make the NUL
- * transition. We couldn't have
- * yy_get_previous_state() go ahead and do it
- * for us because it doesn't know how to deal
- * with the possibility of jamming (and we don't
- * want to build jamming into it because then it
- * will run more slowly).
- */
-
- yy_next_state = yy_try_NUL_trans( yy_current_state );
-
- yy_bp = yytext_ptr + YY_MORE_ADJ;
-
- if ( yy_next_state )
- {
- /* Consume the NUL. */
- yy_cp = ++yy_c_buf_p;
- yy_current_state = yy_next_state;
- goto yy_match;
- }
-
- else
- {
- yy_cp = yy_c_buf_p;
- goto yy_find_action;
- }
- }
-
- else switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_END_OF_FILE:
- {
- yy_did_buffer_switch_on_eof = 0;
-
- if ( yywrap() )
- {
- /* Note: because we've taken care in
- * yy_get_next_buffer() to have set up
- * yytext, we can now set up
- * yy_c_buf_p so that if some total
- * hoser (like flex itself) wants to
- * call the scanner after we return the
- * YY_NULL, it'll still work - another
- * YY_NULL will get returned.
- */
- yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
-
- yy_act = YY_STATE_EOF(YY_START);
- goto do_action;
- }
-
- else
- {
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
- }
- break;
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p =
- yytext_ptr + yy_amount_of_matched_text;
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_match;
-
- case EOB_ACT_LAST_MATCH:
- yy_c_buf_p =
- &yy_current_buffer->yy_ch_buf[yy_n_chars];
-
- yy_current_state = yy_get_previous_state();
-
- yy_cp = yy_c_buf_p;
- yy_bp = yytext_ptr + YY_MORE_ADJ;
- goto yy_find_action;
- }
- break;
- }
-
- default:
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--no action found" );
- } /* end of action switch */
- } /* end of scanning one token */
- } /* end of yylex */
-
-
-/* yy_get_next_buffer - try to read in a new buffer
- *
- * Returns a code representing an action:
- * EOB_ACT_LAST_MATCH -
- * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
- * EOB_ACT_END_OF_FILE - end of file
- */
-
-static int yy_get_next_buffer()
- {
- register char *dest = yy_current_buffer->yy_ch_buf;
- register char *source = yytext_ptr;
- register int number_to_move, i;
- int ret_val;
-
- if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
- YY_FATAL_ERROR(
- "fatal flex scanner internal error--end of buffer missed" );
-
- if ( yy_current_buffer->yy_fill_buffer == 0 )
- { /* Don't try to fill the buffer, so this is an EOF. */
- if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
- {
- /* We matched a single character, the EOB, so
- * treat this as a final EOF.
- */
- return EOB_ACT_END_OF_FILE;
- }
-
- else
- {
- /* We matched some text prior to the EOB, first
- * process it.
- */
- return EOB_ACT_LAST_MATCH;
- }
- }
-
- /* Try to read more data. */
-
- /* First move last chars to start of buffer. */
- number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
-
- for ( i = 0; i < number_to_move; ++i )
- *(dest++) = *(source++);
-
- if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
- /* don't do the read, it's not guaranteed to return an EOF,
- * just force an EOF
- */
- yy_current_buffer->yy_n_chars = yy_n_chars = 0;
-
- else
- {
- int num_to_read =
- yy_current_buffer->yy_buf_size - number_to_move - 1;
-
- while ( num_to_read <= 0 )
- { /* Not enough room in the buffer - grow it. */
-#ifdef YY_USES_REJECT
- YY_FATAL_ERROR(
-"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
-#else
-
- /* just a shorter name for the current buffer */
- YY_BUFFER_STATE b = yy_current_buffer;
-
- int yy_c_buf_p_offset =
- (int) (yy_c_buf_p - b->yy_ch_buf);
-
- if ( b->yy_is_our_buffer )
- {
- int new_size = b->yy_buf_size * 2;
-
- if ( new_size <= 0 )
- b->yy_buf_size += b->yy_buf_size / 8;
- else
- b->yy_buf_size *= 2;
-
- b->yy_ch_buf = (char *)
- /* Include room in for 2 EOB chars. */
- yy_flex_realloc( (void *) b->yy_ch_buf,
- b->yy_buf_size + 2 );
- }
- else
- /* Can't grow it, we don't own it. */
- b->yy_ch_buf = 0;
-
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR(
- "fatal error - scanner input buffer overflow" );
-
- yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
-
- num_to_read = yy_current_buffer->yy_buf_size -
- number_to_move - 1;
-#endif
- }
-
- if ( num_to_read > YY_READ_BUF_SIZE )
- num_to_read = YY_READ_BUF_SIZE;
-
- /* Read in more data. */
- YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
- yy_n_chars, num_to_read );
-
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- if ( yy_n_chars == 0 )
- {
- if ( number_to_move == YY_MORE_ADJ )
- {
- ret_val = EOB_ACT_END_OF_FILE;
- yyrestart( yyin );
- }
-
- else
- {
- ret_val = EOB_ACT_LAST_MATCH;
- yy_current_buffer->yy_buffer_status =
- YY_BUFFER_EOF_PENDING;
- }
- }
-
- else
- ret_val = EOB_ACT_CONTINUE_SCAN;
-
- yy_n_chars += number_to_move;
- yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
- yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
-
- yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
-
- return ret_val;
- }
-
-
-/* yy_get_previous_state - get the state just before the EOB char was reached */
-
-static yy_state_type yy_get_previous_state()
- {
- register yy_state_type yy_current_state;
- register char *yy_cp;
-
- yy_current_state = yy_start;
-
- for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
- {
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 470 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- }
-
- return yy_current_state;
- }
-
-
-/* yy_try_NUL_trans - try to make a transition on the NUL character
- *
- * synopsis
- * next_state = yy_try_NUL_trans( current_state );
- */
-
-#ifdef YY_USE_PROTOS
-static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
-#else
-static yy_state_type yy_try_NUL_trans( yy_current_state )
-yy_state_type yy_current_state;
-#endif
- {
- register int yy_is_jam;
- register char *yy_cp = yy_c_buf_p;
-
- register YY_CHAR yy_c = 1;
- if ( yy_accept[yy_current_state] )
- {
- yy_last_accepting_state = yy_current_state;
- yy_last_accepting_cpos = yy_cp;
- }
- while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
- {
- yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 470 )
- yy_c = yy_meta[(unsigned int) yy_c];
- }
- yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 469);
-
- return yy_is_jam ? 0 : yy_current_state;
- }
-
-
-#ifndef YY_NO_UNPUT
-#ifdef YY_USE_PROTOS
-static void yyunput( int c, register char *yy_bp )
-#else
-static void yyunput( c, yy_bp )
-int c;
-register char *yy_bp;
-#endif
- {
- register char *yy_cp = yy_c_buf_p;
-
- /* undo effects of setting up yytext */
- *yy_cp = yy_hold_char;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- { /* need to shift things up to make room */
- /* +2 for EOB chars. */
- register int number_to_move = yy_n_chars + 2;
- register char *dest = &yy_current_buffer->yy_ch_buf[
- yy_current_buffer->yy_buf_size + 2];
- register char *source =
- &yy_current_buffer->yy_ch_buf[number_to_move];
-
- while ( source > yy_current_buffer->yy_ch_buf )
- *--dest = *--source;
-
- yy_cp += (int) (dest - source);
- yy_bp += (int) (dest - source);
- yy_current_buffer->yy_n_chars =
- yy_n_chars = yy_current_buffer->yy_buf_size;
-
- if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
- YY_FATAL_ERROR( "flex scanner push-back overflow" );
- }
-
- *--yy_cp = (char) c;
-
-
- yytext_ptr = yy_bp;
- yy_hold_char = *yy_cp;
- yy_c_buf_p = yy_cp;
- }
-#endif /* ifndef YY_NO_UNPUT */
-
-
-#ifdef __cplusplus
-static int yyinput()
-#else
-static int input()
-#endif
- {
- int c;
-
- *yy_c_buf_p = yy_hold_char;
-
- if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
- {
- /* yy_c_buf_p now points to the character we want to return.
- * If this occurs *before* the EOB characters, then it's a
- * valid NUL; if not, then we've hit the end of the buffer.
- */
- if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
- /* This was really a NUL. */
- *yy_c_buf_p = '\0';
-
- else
- { /* need more input */
- int offset = yy_c_buf_p - yytext_ptr;
- ++yy_c_buf_p;
-
- switch ( yy_get_next_buffer() )
- {
- case EOB_ACT_LAST_MATCH:
- /* This happens because yy_g_n_b()
- * sees that we've accumulated a
- * token and flags that we need to
- * try matching the token before
- * proceeding. But for input(),
- * there's no matching to consider.
- * So convert the EOB_ACT_LAST_MATCH
- * to EOB_ACT_END_OF_FILE.
- */
-
- /* Reset buffer status. */
- yyrestart( yyin );
-
- /* fall through */
-
- case EOB_ACT_END_OF_FILE:
- {
- if ( yywrap() )
- return EOF;
-
- if ( ! yy_did_buffer_switch_on_eof )
- YY_NEW_FILE;
-#ifdef __cplusplus
- return yyinput();
-#else
- return input();
-#endif
- }
-
- case EOB_ACT_CONTINUE_SCAN:
- yy_c_buf_p = yytext_ptr + offset;
- break;
- }
- }
- }
-
- c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
- *yy_c_buf_p = '\0'; /* preserve yytext */
- yy_hold_char = *++yy_c_buf_p;
-
-
- return c;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yyrestart( FILE *input_file )
-#else
-void yyrestart( input_file )
-FILE *input_file;
-#endif
- {
- if ( ! yy_current_buffer )
- yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
-
- yy_init_buffer( yy_current_buffer, input_file );
- yy_load_buffer_state();
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
-#else
-void yy_switch_to_buffer( new_buffer )
-YY_BUFFER_STATE new_buffer;
-#endif
- {
- if ( yy_current_buffer == new_buffer )
- return;
-
- if ( yy_current_buffer )
- {
- /* Flush out information for old buffer. */
- *yy_c_buf_p = yy_hold_char;
- yy_current_buffer->yy_buf_pos = yy_c_buf_p;
- yy_current_buffer->yy_n_chars = yy_n_chars;
- }
-
- yy_current_buffer = new_buffer;
- yy_load_buffer_state();
-
- /* We don't actually know whether we did this switch during
- * EOF (yywrap()) processing, but the only time this flag
- * is looked at is after yywrap() is called, so it's safe
- * to go ahead and always set it.
- */
- yy_did_buffer_switch_on_eof = 1;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_load_buffer_state( void )
-#else
-void yy_load_buffer_state()
-#endif
- {
- yy_n_chars = yy_current_buffer->yy_n_chars;
- yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
- yyin = yy_current_buffer->yy_input_file;
- yy_hold_char = *yy_c_buf_p;
- }
-
-
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
-#else
-YY_BUFFER_STATE yy_create_buffer( file, size )
-FILE *file;
-int size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_buf_size = size;
-
- /* yy_ch_buf has to be 2 characters longer than the size given because
- * we need to put in 2 end-of-buffer characters.
- */
- b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
- if ( ! b->yy_ch_buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
-
- b->yy_is_our_buffer = 1;
-
- yy_init_buffer( b, file );
-
- return b;
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_delete_buffer( YY_BUFFER_STATE b )
-#else
-void yy_delete_buffer( b )
-YY_BUFFER_STATE b;
-#endif
- {
- if ( ! b )
- return;
-
- if ( b == yy_current_buffer )
- yy_current_buffer = (YY_BUFFER_STATE) 0;
-
- if ( b->yy_is_our_buffer )
- yy_flex_free( (void *) b->yy_ch_buf );
-
- yy_flex_free( (void *) b );
- }
-
-
-#ifndef _WIN32
-#include <unistd.h>
-#else
-#ifndef YY_ALWAYS_INTERACTIVE
-#ifndef YY_NEVER_INTERACTIVE
-extern int isatty YY_PROTO(( int ));
-#endif
-#endif
-#endif
-
-#ifdef YY_USE_PROTOS
-void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
-#else
-void yy_init_buffer( b, file )
-YY_BUFFER_STATE b;
-FILE *file;
-#endif
-
-
- {
- yy_flush_buffer( b );
-
- b->yy_input_file = file;
- b->yy_fill_buffer = 1;
-
-#if YY_ALWAYS_INTERACTIVE
- b->yy_is_interactive = 1;
-#else
-#if YY_NEVER_INTERACTIVE
- b->yy_is_interactive = 0;
-#else
- b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
-#endif
-#endif
- }
-
-
-#ifdef YY_USE_PROTOS
-void yy_flush_buffer( YY_BUFFER_STATE b )
-#else
-void yy_flush_buffer( b )
-YY_BUFFER_STATE b;
-#endif
-
- {
- if ( ! b )
- return;
-
- b->yy_n_chars = 0;
-
- /* We always need two end-of-buffer characters. The first causes
- * a transition to the end-of-buffer state. The second causes
- * a jam in that state.
- */
- b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
- b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
-
- b->yy_buf_pos = &b->yy_ch_buf[0];
-
- b->yy_at_bol = 1;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- if ( b == yy_current_buffer )
- yy_load_buffer_state();
- }
-
-
-#ifndef YY_NO_SCAN_BUFFER
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
-#else
-YY_BUFFER_STATE yy_scan_buffer( base, size )
-char *base;
-yy_size_t size;
-#endif
- {
- YY_BUFFER_STATE b;
-
- if ( size < 2 ||
- base[size-2] != YY_END_OF_BUFFER_CHAR ||
- base[size-1] != YY_END_OF_BUFFER_CHAR )
- /* They forgot to leave room for the EOB's. */
- return 0;
-
- b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
- if ( ! b )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
-
- b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
- b->yy_buf_pos = b->yy_ch_buf = base;
- b->yy_is_our_buffer = 0;
- b->yy_input_file = 0;
- b->yy_n_chars = b->yy_buf_size;
- b->yy_is_interactive = 0;
- b->yy_at_bol = 1;
- b->yy_fill_buffer = 0;
- b->yy_buffer_status = YY_BUFFER_NEW;
-
- yy_switch_to_buffer( b );
-
- return b;
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_STRING
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
-#else
-YY_BUFFER_STATE yy_scan_string( yy_str )
-yyconst char *yy_str;
-#endif
- {
- int len;
- for ( len = 0; yy_str[len]; ++len )
- ;
-
- return yy_scan_bytes( yy_str, len );
- }
-#endif
-
-
-#ifndef YY_NO_SCAN_BYTES
-#ifdef YY_USE_PROTOS
-YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
-#else
-YY_BUFFER_STATE yy_scan_bytes( bytes, len )
-yyconst char *bytes;
-int len;
-#endif
- {
- YY_BUFFER_STATE b;
- char *buf;
- yy_size_t n;
- int i;
-
- /* Get memory for full buffer, including space for trailing EOB's. */
- n = len + 2;
- buf = (char *) yy_flex_alloc( n );
- if ( ! buf )
- YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
-
- for ( i = 0; i < len; ++i )
- buf[i] = bytes[i];
-
- buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
-
- b = yy_scan_buffer( buf, n );
- if ( ! b )
- YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
-
- /* It's okay to grow etc. this buffer, and we should throw it
- * away when we're done.
- */
- b->yy_is_our_buffer = 1;
-
- return b;
- }
-#endif
-
-
-#ifndef YY_NO_PUSH_STATE
-#ifdef YY_USE_PROTOS
-static void yy_push_state( int new_state )
-#else
-static void yy_push_state( new_state )
-int new_state;
-#endif
- {
- if ( yy_start_stack_ptr >= yy_start_stack_depth )
- {
- yy_size_t new_size;
-
- yy_start_stack_depth += YY_START_STACK_INCR;
- new_size = yy_start_stack_depth * sizeof( int );
-
- if ( ! yy_start_stack )
- yy_start_stack = (int *) yy_flex_alloc( new_size );
-
- else
- yy_start_stack = (int *) yy_flex_realloc(
- (void *) yy_start_stack, new_size );
-
- if ( ! yy_start_stack )
- YY_FATAL_ERROR(
- "out of memory expanding start-condition stack" );
- }
-
- yy_start_stack[yy_start_stack_ptr++] = YY_START;
-
- BEGIN(new_state);
- }
-#endif
-
-
-#ifndef YY_NO_POP_STATE
-static void yy_pop_state()
- {
- if ( --yy_start_stack_ptr < 0 )
- YY_FATAL_ERROR( "start-condition stack underflow" );
-
- BEGIN(yy_start_stack[yy_start_stack_ptr]);
- }
-#endif
-
-
-#ifndef YY_NO_TOP_STATE
-static int yy_top_state()
- {
- return yy_start_stack[yy_start_stack_ptr - 1];
- }
-#endif
-
-#ifndef YY_EXIT_FAILURE
-#define YY_EXIT_FAILURE 2
-#endif
-
-#ifdef YY_USE_PROTOS
-static void yy_fatal_error( yyconst char msg[] )
-#else
-static void yy_fatal_error( msg )
-char msg[];
-#endif
- {
- (void) fprintf( stderr, "%s\n", msg );
- exit( YY_EXIT_FAILURE );
- }
-
-
-
-/* Redefine yyless() so it works in section 3 code. */
-
-#undef yyless
-#define yyless(n) \
- do \
- { \
- /* Undo effects of setting up yytext. */ \
- yytext[yyleng] = yy_hold_char; \
- yy_c_buf_p = yytext + n; \
- yy_hold_char = *yy_c_buf_p; \
- *yy_c_buf_p = '\0'; \
- yyleng = n; \
- } \
- while ( 0 )
-
-
-/* Internal utility routines. */
-
-#ifndef yytext_ptr
-#ifdef YY_USE_PROTOS
-static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
-#else
-static void yy_flex_strncpy( s1, s2, n )
-char *s1;
-yyconst char *s2;
-int n;
-#endif
- {
- register int i;
- for ( i = 0; i < n; ++i )
- s1[i] = s2[i];
- }
-#endif
-
-#ifdef YY_NEED_STRLEN
-#ifdef YY_USE_PROTOS
-static int yy_flex_strlen( yyconst char *s )
-#else
-static int yy_flex_strlen( s )
-yyconst char *s;
-#endif
- {
- register int n;
- for ( n = 0; s[n]; ++n )
- ;
-
- return n;
- }
-#endif
-
+ const char *name;
+ int tok;
+};
-#ifdef YY_USE_PROTOS
-static void *yy_flex_alloc( yy_size_t size )
-#else
-static void *yy_flex_alloc( size )
-yy_size_t size;
-#endif
- {
- return (void *) malloc( size );
- }
+#define K(KEY) { #KEY, KEY }
+#define KRT(KEY) { #KEY, RT_##KEY }
-#ifdef YY_USE_PROTOS
-static void *yy_flex_realloc( void *ptr, yy_size_t size )
-#else
-static void *yy_flex_realloc( ptr, size )
-void *ptr;
-yy_size_t size;
-#endif
- {
- /* The cast to (char *) in the following accommodates both
- * implementations that use char* generic pointers, and those
- * that use void* generic pointers. It works with the latter
- * because both ANSI C and C++ allow castless assignment from
- * any pointer type to void*, and deal with argument conversions
- * as though doing an assignment.
- */
- return (void *) realloc( (char *) ptr, size );
- }
+static const struct rclex_keywords keywds[] =
+{
+ K(ACCELERATORS), K(ALT), K(ANICURSOR), K(ANIICON), K(ASCII),
+ K(AUTO3STATE), K(AUTOCHECKBOX), K(AUTORADIOBUTTON),
+ K(BEDIT), { "BEGIN", BEG }, K(BITMAP), K(BLOCK), K(BUTTON),
+ K(CAPTION), K(CHARACTERISTICS), K(CHECKBOX), K(CHECKED),
+ K(CLASS), K(COMBOBOX), K(CONTROL), K(CTEXT), K(CURSOR),
+ K(DEFPUSHBUTTON), K(DIALOG), K(DIALOGEX), K(DISCARDABLE),
+ K(DLGINCLUDE), K(DLGINIT),
+ K(EDITTEXT), K(END), K(EXSTYLE),
+ K(FILEFLAGS), K(FILEFLAGSMASK), K(FILEOS), K(FILESUBTYPE),
+ K(FILETYPE), K(FILEVERSION), K(FIXED), K(FONT), K(FONTDIR),
+ K(GRAYED), KRT(GROUP_CURSOR), KRT(GROUP_ICON), K(GROUPBOX),
+ K(HEDIT), K(HELP), K(HTML),
+ K(ICON), K(IEDIT), K(IMPURE), K(INACTIVE),
+ K(LANGUAGE), K(LISTBOX), K(LOADONCALL), K(LTEXT),
+ K(MANIFEST), K(MENU), K(MENUBARBREAK), K(MENUBREAK),
+ K(MENUEX), K(MENUITEM), K(MESSAGETABLE), K(MOVEABLE),
+ K(NOINVERT), K(NOT),
+ K(PLUGPLAY), K(POPUP), K(PRELOAD), K(PRODUCTVERSION),
+ K(PURE), K(PUSHBOX), K(PUSHBUTTON),
+ K(RADIOBUTTON), K(RCDATA), K(RTEXT),
+ K(SCROLLBAR), K(SEPARATOR), K(SHIFT), K(STATE3),
+ K(STRINGTABLE), K(STYLE),
+ K(TOOLBAR),
+ K(USERBUTTON),
+ K(VALUE), { "VERSION", VERSIONK }, K(VERSIONINFO),
+ K(VIRTKEY), K(VXD),
+ { NULL, 0 },
+};
-#ifdef YY_USE_PROTOS
-static void yy_flex_free( void *ptr )
-#else
-static void yy_flex_free( ptr )
-void *ptr;
-#endif
- {
- free( ptr );
- }
+/* External input stream from resrc */
+extern FILE *cpp_pipe;
-#if YY_MAIN
-int main()
- {
- yylex();
- return 0;
- }
-#endif
-#line 239 "rclex.l"
+/* Lexical scanner helpers. */
+static int rclex_lastch = -1;
+static size_t rclex_tok_max = 0;
+static size_t rclex_tok_pos = 0;
+static char *rclex_tok = NULL;
-#ifndef yywrap
-/* This is needed for some versions of lex. */
-int yywrap (void)
+static int
+rclex_translatekeyword (const char *key)
{
- return 1;
+ if (key && ISUPPER (key[0]))
+ {
+ const struct rclex_keywords *kw = &keywds[0];
+
+ do
+ {
+ if (! strcmp (kw->name, key))
+ return kw->tok;
+ ++kw;
+ }
+ while (kw->name != NULL);
+ }
+ return STRING;
}
-#endif
/* Handle a C preprocessor line. */
static void
-cpp_line (const char *s)
+cpp_line (void)
{
+ const char *s = rclex_tok;
int line;
char *send, *fn;
+ size_t len, mlen;
++s;
while (ISSPACE (*s))
++s;
+ /* Check for #pragma code_page ( DEFAULT | <nr>). */
+ len = strlen (s);
+ mlen = strlen ("pragma");
+ if (len > mlen && memcmp (s, "pragma", mlen) == 0 && ISSPACE (s[mlen]))
+ {
+ const char *end;
+
+ s += mlen + 1;
+ while (ISSPACE (*s))
+ ++s;
+ len = strlen (s);
+ mlen = strlen ("code_page");
+ if (len <= mlen || memcmp (s, "code_page", mlen) != 0)
+ /* FIXME: We ought to issue a warning message about an unrecognised pragma. */
+ return;
+ s += mlen;
+ while (ISSPACE (*s))
+ ++s;
+ if (*s != '(')
+ /* FIXME: We ought to issue an error message about a malformed pragma. */
+ return;
+ ++s;
+ while (ISSPACE (*s))
+ ++s;
+ if (*s == 0 || (end = strchr (s, ')')) == NULL)
+ /* FIXME: We ought to issue an error message about a malformed pragma. */
+ return;
+ len = (size_t) (end - s);
+ fn = xmalloc (len + 1);
+ if (len)
+ memcpy (fn, s, len);
+ fn[len] = 0;
+ while (len > 0 && (fn[len - 1] > 0 && fn[len - 1] <= 0x20))
+ fn[--len] = 0;
+ if (! len || (len == strlen ("DEFAULT") && strcasecmp (fn, "DEFAULT") == 0))
+ wind_current_codepage = wind_default_codepage;
+ else if (len > 0)
+ {
+ rc_uint_type ncp;
+
+ if (fn[0] == '0' && (fn[1] == 'x' || fn[1] == 'X'))
+ ncp = (rc_uint_type) strtol (fn + 2, NULL, 16);
+ else
+ ncp = (rc_uint_type) strtol (fn, NULL, 10);
+ if (ncp == CP_UTF16 || ! unicode_is_valid_codepage (ncp))
+ fatal (_("invalid value specified for pragma code_page.\n"));
+ wind_current_codepage = ncp;
+ }
+ free (fn);
+ return;
+ }
+
line = strtol (s, &send, 0);
if (*send != '\0' && ! ISSPACE (*send))
return;
@@ -2387,14 +219,14 @@ cpp_line (const char *s)
if (send == NULL)
return;
- fn = (char *) xmalloc (send - s + 1);
+ fn = xmalloc (send - s + 1);
strncpy (fn, s, send - s);
fn[send - s] = '\0';
free (rc_filename);
rc_filename = fn;
- if (!initial_fn)
+ if (! initial_fn)
{
initial_fn = xmalloc (strlen (fn) + 1);
strcpy (initial_fn, fn);
@@ -2409,13 +241,30 @@ cpp_line (const char *s)
suppress_cpp_data = 1;
}
+/* Allocate a string of a given length. */
+
+static char *
+get_string (int len)
+{
+ struct alloc_string *as;
+
+ as = xmalloc (sizeof *as);
+ as->s = xmalloc (len);
+
+ as->next = strings;
+ strings = as;
+
+ return as->s;
+}
+
/* Handle a quoted string. The quotes are stripped. A pair of quotes
in a string are turned into a single quote. Adjacent strings are
merged separated by whitespace are merged, as in C. */
static char *
-handle_quotes (const char *input, unsigned long *len)
+handle_quotes (rc_uint_type *len)
{
+ const char *input = rclex_tok;
char *ret, *s;
const char *t;
int ch;
@@ -2440,6 +289,8 @@ handle_quotes (const char *input, unsigned long *len)
case '\"':
rcparse_warning ("use \"\" to put \" in a string");
+ *s++ = '"';
+ ++t;
break;
case 'a':
@@ -2498,7 +349,7 @@ handle_quotes (const char *input, unsigned long *len)
*s++ = ch;
break;
- case 'x':
+ case 'x': case 'X':
++t;
ch = 0;
/* We only handle single byte chars here. Make sure
@@ -2538,6 +389,7 @@ handle_quotes (const char *input, unsigned long *len)
}
else
{
+ rcparse_warning ("unexpected character after '\"'");
++t;
assert (ISSPACE (*t));
while (ISSPACE (*t))
@@ -2560,20 +412,166 @@ handle_quotes (const char *input, unsigned long *len)
return ret;
}
-/* Allocate a string of a given length. */
+/* Allocate a unicode string of a given length. */
-static char *
-get_string (int len)
+static unichar *
+get_unistring (int len)
{
- struct alloc_string *as;
+ return (unichar *) get_string (len * sizeof (unichar));
+}
- as = (struct alloc_string *) xmalloc (sizeof *as);
- as->s = xmalloc (len);
+/* Handle a quoted unicode string. The quotes are stripped. A pair of quotes
+ in a string are turned into a single quote. Adjacent strings are
+ merged separated by whitespace are merged, as in C. */
- as->next = strings;
- strings = as;
+static unichar *
+handle_uniquotes (rc_uint_type *len)
+{
+ const char *input = rclex_tok;
+ unichar *ret, *s;
+ const char *t;
+ int ch;
+ int num_xdigits;
- return as->s;
+ ret = get_unistring (strlen (input) + 1);
+
+ s = ret;
+ t = input;
+ if ((*t == 'L' || *t == 'l') && t[1] == '"')
+ t += 2;
+ else if (*t == '"')
+ ++t;
+ while (*t != '\0')
+ {
+ if (*t == '\\')
+ {
+ ++t;
+ switch (*t)
+ {
+ case '\0':
+ rcparse_warning ("backslash at end of string");
+ break;
+
+ case '\"':
+ rcparse_warning ("use \"\" to put \" in a string");
+ break;
+
+ case 'a':
+ *s++ = ESCAPE_B; /* Strange, but true... */
+ ++t;
+ break;
+
+ case 'b':
+ *s++ = ESCAPE_B;
+ ++t;
+ break;
+
+ case 'f':
+ *s++ = ESCAPE_F;
+ ++t;
+ break;
+
+ case 'n':
+ *s++ = ESCAPE_N;
+ ++t;
+ break;
+
+ case 'r':
+ *s++ = ESCAPE_R;
+ ++t;
+ break;
+
+ case 't':
+ *s++ = ESCAPE_T;
+ ++t;
+ break;
+
+ case 'v':
+ *s++ = ESCAPE_V;
+ ++t;
+ break;
+
+ case '\\':
+ *s++ = (unichar) *t++;
+ break;
+
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ ch = *t - '0';
+ ++t;
+ if (*t >= '0' && *t <= '7')
+ {
+ ch = (ch << 3) | (*t - '0');
+ ++t;
+ if (*t >= '0' && *t <= '7')
+ {
+ ch = (ch << 3) | (*t - '0');
+ ++t;
+ }
+ }
+ *s++ = (unichar) ch;
+ break;
+
+ case 'x': case 'X':
+ ++t;
+ ch = 0;
+ /* We only handle two byte chars here. Make sure
+ we finish an escape sequence like "/xB0ABC" after
+ the first two digits. */
+ num_xdigits = 4;
+ while (num_xdigits--)
+ {
+ if (*t >= '0' && *t <= '9')
+ ch = (ch << 4) | (*t - '0');
+ else if (*t >= 'a' && *t <= 'f')
+ ch = (ch << 4) | (*t - 'a' + 10);
+ else if (*t >= 'A' && *t <= 'F')
+ ch = (ch << 4) | (*t - 'A' + 10);
+ else
+ break;
+ ++t;
+ }
+ *s++ = (unichar) ch;
+ break;
+
+ default:
+ rcparse_warning ("unrecognized escape sequence");
+ *s++ = '\\';
+ *s++ = (unichar) *t++;
+ break;
+ }
+ }
+ else if (*t != '"')
+ *s++ = (unichar) *t++;
+ else if (t[1] == '\0')
+ break;
+ else if (t[1] == '"')
+ {
+ *s++ = '"';
+ t += 2;
+ }
+ else
+ {
+ ++t;
+ assert (ISSPACE (*t));
+ while (ISSPACE (*t))
+ {
+ if ((*t) == '\n')
+ ++rc_lineno;
+ ++t;
+ }
+ if (*t == '\0')
+ break;
+ assert (*t == '"');
+ ++t;
+ }
+ }
+
+ *s = '\0';
+
+ *len = s - ret;
+
+ return ret;
}
/* Discard all the strings we have allocated. The parser calls this
@@ -2599,7 +597,6 @@ rcparse_discard_strings (void)
}
/* Enter rcdata mode. */
-
void
rcparse_rcdata (void)
{
@@ -2607,9 +604,285 @@ rcparse_rcdata (void)
}
/* Go back to normal mode from rcdata mode. */
-
void
rcparse_normal (void)
{
rcdata_mode = 0;
}
+
+static void
+rclex_tok_add_char (int ch)
+{
+ if (! rclex_tok || rclex_tok_max <= rclex_tok_pos)
+ {
+ char *h = xmalloc (rclex_tok_max + 9);
+
+ if (! h)
+ abort ();
+ if (rclex_tok)
+ {
+ memcpy (h, rclex_tok, rclex_tok_pos + 1);
+ free (rclex_tok);
+ }
+ else
+ rclex_tok_pos = 0;
+ rclex_tok_max += 8;
+ rclex_tok = h;
+ }
+ if (ch != -1)
+ rclex_tok[rclex_tok_pos++] = (char) ch;
+ rclex_tok[rclex_tok_pos] = 0;
+}
+
+static int
+rclex_readch (void)
+{
+ int r = -1;
+
+ if ((r = rclex_lastch) != -1)
+ rclex_lastch = -1;
+ else
+ {
+ char ch;
+ do
+ {
+ if (! cpp_pipe || feof (cpp_pipe)
+ || fread (&ch, 1, 1,cpp_pipe) != 1)
+ break;
+ r = ((int) ch) & 0xff;
+ }
+ while (r == 0 || r == '\r');
+ }
+ rclex_tok_add_char (r);
+ return r;
+}
+
+static int
+rclex_peekch (void)
+{
+ int r;
+
+ if ((r = rclex_lastch) == -1)
+ {
+ if ((r = rclex_readch ()) != -1)
+ {
+ rclex_lastch = r;
+ if (rclex_tok_pos > 0)
+ rclex_tok[--rclex_tok_pos] = 0;
+ }
+ }
+ return r;
+}
+
+static void
+rclex_string (void)
+{
+ int c;
+
+ while ((c = rclex_peekch ()) != -1)
+ {
+ if (c == '\n')
+ break;
+ if (c == '\\')
+ {
+ rclex_readch ();
+ if ((c = rclex_peekch ()) == -1 || c == '\n')
+ break;
+ rclex_readch ();
+ }
+ else if (rclex_readch () == '"')
+ {
+ if (rclex_peekch () == '"')
+ rclex_readch ();
+ else
+ break;
+ }
+ }
+}
+
+static rc_uint_type
+read_digit (int ch)
+{
+ rc_uint_type base = 10;
+ rc_uint_type ret, val;
+ int warned = 0;
+
+ ret = 0;
+ if (ch == '0')
+ {
+ base = 8;
+ switch (rclex_peekch ())
+ {
+ case 'o': case 'O':
+ rclex_readch ();
+ base = 8;
+ break;
+
+ case 'x': case 'X':
+ rclex_readch ();
+ base = 16;
+ break;
+ }
+ }
+ else
+ ret = (rc_uint_type) (ch - '0');
+ while ((ch = rclex_peekch ()) != -1)
+ {
+ if (ISDIGIT (ch))
+ val = (rc_uint_type) (ch - '0');
+ else if (ch >= 'a' && ch <= 'f')
+ val = (rc_uint_type) ((ch - 'a') + 10);
+ else if (ch >= 'A' && ch <= 'F')
+ val = (rc_uint_type) ((ch - 'A') + 10);
+ else
+ break;
+ rclex_readch ();
+ if (! warned && val >= base)
+ {
+ warned = 1;
+ rcparse_warning ("digit exceeds base");
+ }
+ ret *= base;
+ ret += val;
+ }
+ return ret;
+}
+
+/* yyparser entry method. */
+
+int
+yylex (void)
+{
+ char *s;
+ unichar *us;
+ rc_uint_type length;
+ int ch;
+
+ /* Make sure that rclex_tok is initialized. */
+ if (! rclex_tok)
+ rclex_tok_add_char (-1);
+
+ do
+ {
+ do
+ {
+ /* Clear token. */
+ rclex_tok_pos = 0;
+ rclex_tok[0] = 0;
+
+ if ((ch = rclex_readch ()) == -1)
+ return -1;
+ if (ch == '\n')
+ ++rc_lineno;
+ }
+ while (ch <= 0x20);
+
+ switch (ch)
+ {
+ case '#':
+ while ((ch = rclex_peekch ()) != -1 && ch != '\n')
+ rclex_readch ();
+ cpp_line ();
+ ch = IGNORED_TOKEN;
+ break;
+
+ case '{':
+ ch = IGNORE_CPP (BEG);
+ break;
+
+ case '}':
+ ch = IGNORE_CPP (END);
+ break;
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ yylval.i.val = read_digit (ch);
+ yylval.i.dword = 0;
+ switch (rclex_peekch ())
+ {
+ case 'l': case 'L':
+ rclex_readch ();
+ yylval.i.dword = 1;
+ break;
+ }
+ ch = IGNORE_CPP (NUMBER);
+ break;
+ case '"':
+ rclex_string ();
+ ch = IGNORE_CPP ((! rcdata_mode ? QUOTEDSTRING : SIZEDSTRING));
+ if (ch == IGNORED_TOKEN)
+ break;
+ s = handle_quotes (&length);
+ if (! rcdata_mode)
+ yylval.s = s;
+ else
+ {
+ yylval.ss.length = length;
+ yylval.ss.s = s;
+ }
+ break;
+ case 'L': case 'l':
+ if (rclex_peekch () == '"')
+ {
+ rclex_readch ();
+ rclex_string ();
+ ch = IGNORE_CPP ((! rcdata_mode ? QUOTEDUNISTRING : SIZEDUNISTRING));
+ if (ch == IGNORED_TOKEN)
+ break;
+ us = handle_uniquotes (&length);
+ if (! rcdata_mode)
+ yylval.uni = us;
+ else
+ {
+ yylval.suni.length = length;
+ yylval.suni.s = us;
+ }
+ break;
+ }
+ /* Fall through. */
+ default:
+ if (ISIDST (ch) || ch=='$')
+ {
+ while ((ch = rclex_peekch ()) != -1 && (ISIDNUM (ch) || ch == '$' || ch == '.'))
+ rclex_readch ();
+ ch = IGNORE_CPP (rclex_translatekeyword (rclex_tok));
+ if (ch == STRING)
+ {
+ s = get_string (strlen (rclex_tok) + 1);
+ strcpy (s, rclex_tok);
+ yylval.s = s;
+ }
+ else if (ch == BLOCK)
+ {
+ const char *hs = NULL;
+
+ switch (yylex ())
+ {
+ case STRING:
+ case QUOTEDSTRING:
+ hs = yylval.s;
+ break;
+ case SIZEDSTRING:
+ hs = yylval.s = yylval.ss.s;
+ break;
+ }
+ if (! hs)
+ {
+ rcparse_warning ("BLOCK expects a string as argument.");
+ ch = IGNORED_TOKEN;
+ }
+ else if (! strcmp (hs, "StringFileInfo"))
+ ch = BLOCKSTRINGFILEINFO;
+ else if (! strcmp (hs, "VarFileInfo"))
+ ch = BLOCKVARFILEINFO;
+ }
+ break;
+ }
+ ch = IGNORE_CPP (ch);
+ break;
+ }
+ }
+ while (ch == IGNORED_TOKEN);
+
+ return ch;
+}
diff --git a/contrib/binutils/binutils/rclex.l b/contrib/binutils/binutils/rclex.l
deleted file mode 100644
index 92b1ec7..0000000
--- a/contrib/binutils/binutils/rclex.l
+++ /dev/null
@@ -1,504 +0,0 @@
-%{ /* rclex.l -- lexer for Windows rc files parser */
-/* Copyright 1997, 1998, 1999, 2001, 2002, 2003, 2005
- Free Software Foundation, Inc.
- Written by Ian Lance Taylor, Cygnus Support.
-
- This file is part of GNU Binutils.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* This is a lex input file which generates a lexer used by the
- Windows rc file parser. It basically just recognized a bunch of
- keywords. */
-
-#include "bfd.h"
-#include "bucomm.h"
-#include "libiberty.h"
-#include "safe-ctype.h"
-#include "windres.h"
-#include "rcparse.h"
-
-#include <assert.h>
-
-#define YY_NO_UNPUT
-
-/* Whether we are in rcdata mode, in which we returns the lengths of
- strings. */
-
-static int rcdata_mode;
-
-/* Whether we are supressing lines from cpp (including windows.h or
- headers from your C sources may bring in externs and typedefs).
- When active, we return IGNORED_TOKEN, which lets us ignore these
- outside of resource constructs. Thus, it isn't required to protect
- all the non-preprocessor lines in your header files with #ifdef
- RC_INVOKED. It also means your RC file can't include other RC
- files if they're named "*.h". Sorry. Name them *.rch or whatever. */
-
-static int suppress_cpp_data;
-
-#define MAYBE_RETURN(x) return suppress_cpp_data ? IGNORED_TOKEN : (x)
-
-/* The first filename we detect in the cpp output. We use this to
- tell included files from the original file. */
-
-static char *initial_fn;
-
-/* List of allocated strings. */
-
-struct alloc_string
-{
- struct alloc_string *next;
- char *s;
-};
-
-static struct alloc_string *strings;
-
-/* Local functions. */
-
-static void cpp_line (const char *);
-static char *handle_quotes (const char *, unsigned long *);
-static char *get_string (int);
-
-%}
-
-%%
-
-"BEGIN" { MAYBE_RETURN (BEG); }
-"{" { MAYBE_RETURN (BEG); }
-"END" { MAYBE_RETURN (END); }
-"}" { MAYBE_RETURN (END); }
-"ACCELERATORS" { MAYBE_RETURN (ACCELERATORS); }
-"VIRTKEY" { MAYBE_RETURN (VIRTKEY); }
-"ASCII" { MAYBE_RETURN (ASCII); }
-"NOINVERT" { MAYBE_RETURN (NOINVERT); }
-"SHIFT" { MAYBE_RETURN (SHIFT); }
-"CONTROL" { MAYBE_RETURN (CONTROL); }
-"ALT" { MAYBE_RETURN (ALT); }
-"BITMAP" { MAYBE_RETURN (BITMAP); }
-"CURSOR" { MAYBE_RETURN (CURSOR); }
-"DIALOG" { MAYBE_RETURN (DIALOG); }
-"DIALOGEX" { MAYBE_RETURN (DIALOGEX); }
-"EXSTYLE" { MAYBE_RETURN (EXSTYLE); }
-"CAPTION" { MAYBE_RETURN (CAPTION); }
-"CLASS" { MAYBE_RETURN (CLASS); }
-"STYLE" { MAYBE_RETURN (STYLE); }
-"AUTO3STATE" { MAYBE_RETURN (AUTO3STATE); }
-"AUTOCHECKBOX" { MAYBE_RETURN (AUTOCHECKBOX); }
-"AUTORADIOBUTTON" { MAYBE_RETURN (AUTORADIOBUTTON); }
-"CHECKBOX" { MAYBE_RETURN (CHECKBOX); }
-"COMBOBOX" { MAYBE_RETURN (COMBOBOX); }
-"CTEXT" { MAYBE_RETURN (CTEXT); }
-"DEFPUSHBUTTON" { MAYBE_RETURN (DEFPUSHBUTTON); }
-"EDITTEXT" { MAYBE_RETURN (EDITTEXT); }
-"GROUPBOX" { MAYBE_RETURN (GROUPBOX); }
-"LISTBOX" { MAYBE_RETURN (LISTBOX); }
-"LTEXT" { MAYBE_RETURN (LTEXT); }
-"PUSHBOX" { MAYBE_RETURN (PUSHBOX); }
-"PUSHBUTTON" { MAYBE_RETURN (PUSHBUTTON); }
-"RADIOBUTTON" { MAYBE_RETURN (RADIOBUTTON); }
-"RTEXT" { MAYBE_RETURN (RTEXT); }
-"SCROLLBAR" { MAYBE_RETURN (SCROLLBAR); }
-"STATE3" { MAYBE_RETURN (STATE3); }
-"USERBUTTON" { MAYBE_RETURN (USERBUTTON); }
-"BEDIT" { MAYBE_RETURN (BEDIT); }
-"HEDIT" { MAYBE_RETURN (HEDIT); }
-"IEDIT" { MAYBE_RETURN (IEDIT); }
-"FONT" { MAYBE_RETURN (FONT); }
-"ICON" { MAYBE_RETURN (ICON); }
-"LANGUAGE" { MAYBE_RETURN (LANGUAGE); }
-"CHARACTERISTICS" { MAYBE_RETURN (CHARACTERISTICS); }
-"VERSION" { MAYBE_RETURN (VERSIONK); }
-"MENU" { MAYBE_RETURN (MENU); }
-"MENUEX" { MAYBE_RETURN (MENUEX); }
-"MENUITEM" { MAYBE_RETURN (MENUITEM); }
-"SEPARATOR" { MAYBE_RETURN (SEPARATOR); }
-"POPUP" { MAYBE_RETURN (POPUP); }
-"CHECKED" { MAYBE_RETURN (CHECKED); }
-"GRAYED" { MAYBE_RETURN (GRAYED); }
-"HELP" { MAYBE_RETURN (HELP); }
-"INACTIVE" { MAYBE_RETURN (INACTIVE); }
-"MENUBARBREAK" { MAYBE_RETURN (MENUBARBREAK); }
-"MENUBREAK" { MAYBE_RETURN (MENUBREAK); }
-"MESSAGETABLE" { MAYBE_RETURN (MESSAGETABLE); }
-"RCDATA" { MAYBE_RETURN (RCDATA); }
-"STRINGTABLE" { MAYBE_RETURN (STRINGTABLE); }
-"VERSIONINFO" { MAYBE_RETURN (VERSIONINFO); }
-"FILEVERSION" { MAYBE_RETURN (FILEVERSION); }
-"PRODUCTVERSION" { MAYBE_RETURN (PRODUCTVERSION); }
-"FILEFLAGSMASK" { MAYBE_RETURN (FILEFLAGSMASK); }
-"FILEFLAGS" { MAYBE_RETURN (FILEFLAGS); }
-"FILEOS" { MAYBE_RETURN (FILEOS); }
-"FILETYPE" { MAYBE_RETURN (FILETYPE); }
-"FILESUBTYPE" { MAYBE_RETURN (FILESUBTYPE); }
-"VALUE" { MAYBE_RETURN (VALUE); }
-"MOVEABLE" { MAYBE_RETURN (MOVEABLE); }
-"FIXED" { MAYBE_RETURN (FIXED); }
-"PURE" { MAYBE_RETURN (PURE); }
-"IMPURE" { MAYBE_RETURN (IMPURE); }
-"PRELOAD" { MAYBE_RETURN (PRELOAD); }
-"LOADONCALL" { MAYBE_RETURN (LOADONCALL); }
-"DISCARDABLE" { MAYBE_RETURN (DISCARDABLE); }
-"NOT" { MAYBE_RETURN (NOT); }
-
-"BLOCK"[ \t\n]*"\""[^\#\n]*"\"" {
- char *s, *send;
-
- /* This is a hack to let us parse version
- information easily. */
-
- s = strchr (yytext, '"');
- ++s;
- send = strchr (s, '"');
- if (strncmp (s, "StringFileInfo",
- sizeof "StringFileInfo" - 1) == 0
- && s + sizeof "StringFileInfo" - 1 == send)
- MAYBE_RETURN (BLOCKSTRINGFILEINFO);
- else if (strncmp (s, "VarFileInfo",
- sizeof "VarFileInfo" - 1) == 0
- && s + sizeof "VarFileInfo" - 1 == send)
- MAYBE_RETURN (BLOCKVARFILEINFO);
- else
- {
- char *r;
-
- r = get_string (send - s + 1);
- strncpy (r, s, send - s);
- r[send - s] = '\0';
- yylval.s = r;
- MAYBE_RETURN (BLOCK);
- }
- }
-
-"#"[^\n]* {
- cpp_line (yytext);
- }
-
-[0-9][x0-9A-Fa-f]*L {
- yylval.i.val = strtoul (yytext, 0, 0);
- yylval.i.dword = 1;
- MAYBE_RETURN (NUMBER);
- }
-
-[0-9][x0-9A-Fa-f]* {
- yylval.i.val = strtoul (yytext, 0, 0);
- yylval.i.dword = 0;
- MAYBE_RETURN (NUMBER);
- }
-
-("\""[^\"\n]*"\""[ \t\n]*)+ {
- char *s;
- unsigned long length;
-
- s = handle_quotes (yytext, &length);
- if (! rcdata_mode)
- {
- yylval.s = s;
- MAYBE_RETURN (QUOTEDSTRING);
- }
- else
- {
- yylval.ss.length = length;
- yylval.ss.s = s;
- MAYBE_RETURN (SIZEDSTRING);
- }
- }
-
-[A-Za-z][^ ,\t\r\n]* {
- char *s;
-
- /* I rejected comma in a string in order to
- handle VIRTKEY, CONTROL in an accelerator
- resource. This means that an unquoted
- file name can not contain a comma. I
- don't know what rc permits. */
-
- s = get_string (strlen (yytext) + 1);
- strcpy (s, yytext);
- yylval.s = s;
- MAYBE_RETURN (STRING);
- }
-
-[\n] { ++rc_lineno; }
-[ \t\r]+ { /* ignore whitespace */ }
-. { MAYBE_RETURN (*yytext); }
-
-%%
-#ifndef yywrap
-/* This is needed for some versions of lex. */
-int yywrap (void)
-{
- return 1;
-}
-#endif
-
-/* Handle a C preprocessor line. */
-
-static void
-cpp_line (const char *s)
-{
- int line;
- char *send, *fn;
-
- ++s;
- while (ISSPACE (*s))
- ++s;
-
- line = strtol (s, &send, 0);
- if (*send != '\0' && ! ISSPACE (*send))
- return;
-
- /* Subtract 1 because we are about to count the newline. */
- rc_lineno = line - 1;
-
- s = send;
- while (ISSPACE (*s))
- ++s;
-
- if (*s != '"')
- return;
-
- ++s;
- send = strchr (s, '"');
- if (send == NULL)
- return;
-
- fn = (char *) xmalloc (send - s + 1);
- strncpy (fn, s, send - s);
- fn[send - s] = '\0';
-
- free (rc_filename);
- rc_filename = fn;
-
- if (!initial_fn)
- {
- initial_fn = xmalloc (strlen (fn) + 1);
- strcpy (initial_fn, fn);
- }
-
- /* Allow the initial file, regardless of name. Suppress all other
- files if they end in ".h" (this allows included "*.rc"). */
- if (strcmp (initial_fn, fn) == 0
- || strcmp (fn + strlen (fn) - 2, ".h") != 0)
- suppress_cpp_data = 0;
- else
- suppress_cpp_data = 1;
-}
-
-/* Handle a quoted string. The quotes are stripped. A pair of quotes
- in a string are turned into a single quote. Adjacent strings are
- merged separated by whitespace are merged, as in C. */
-
-static char *
-handle_quotes (const char *input, unsigned long *len)
-{
- char *ret, *s;
- const char *t;
- int ch;
- int num_xdigits;
-
- ret = get_string (strlen (input) + 1);
-
- s = ret;
- t = input;
- if (*t == '"')
- ++t;
- while (*t != '\0')
- {
- if (*t == '\\')
- {
- ++t;
- switch (*t)
- {
- case '\0':
- rcparse_warning ("backslash at end of string");
- break;
-
- case '\"':
- rcparse_warning ("use \"\" to put \" in a string");
- break;
-
- case 'a':
- *s++ = ESCAPE_B; /* Strange, but true... */
- ++t;
- break;
-
- case 'b':
- *s++ = ESCAPE_B;
- ++t;
- break;
-
- case 'f':
- *s++ = ESCAPE_F;
- ++t;
- break;
-
- case 'n':
- *s++ = ESCAPE_N;
- ++t;
- break;
-
- case 'r':
- *s++ = ESCAPE_R;
- ++t;
- break;
-
- case 't':
- *s++ = ESCAPE_T;
- ++t;
- break;
-
- case 'v':
- *s++ = ESCAPE_V;
- ++t;
- break;
-
- case '\\':
- *s++ = *t++;
- break;
-
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- ch = *t - '0';
- ++t;
- if (*t >= '0' && *t <= '7')
- {
- ch = (ch << 3) | (*t - '0');
- ++t;
- if (*t >= '0' && *t <= '7')
- {
- ch = (ch << 3) | (*t - '0');
- ++t;
- }
- }
- *s++ = ch;
- break;
-
- case 'x':
- ++t;
- ch = 0;
- /* We only handle single byte chars here. Make sure
- we finish an escape sequence like "/xB0ABC" after
- the first two digits. */
- num_xdigits = 2;
- while (num_xdigits--)
- {
- if (*t >= '0' && *t <= '9')
- ch = (ch << 4) | (*t - '0');
- else if (*t >= 'a' && *t <= 'f')
- ch = (ch << 4) | (*t - 'a' + 10);
- else if (*t >= 'A' && *t <= 'F')
- ch = (ch << 4) | (*t - 'A' + 10);
- else
- break;
- ++t;
- }
- *s++ = ch;
- break;
-
- default:
- rcparse_warning ("unrecognized escape sequence");
- *s++ = '\\';
- *s++ = *t++;
- break;
- }
- }
- else if (*t != '"')
- *s++ = *t++;
- else if (t[1] == '\0')
- break;
- else if (t[1] == '"')
- {
- *s++ = '"';
- t += 2;
- }
- else
- {
- ++t;
- assert (ISSPACE (*t));
- while (ISSPACE (*t))
- {
- if ((*t) == '\n')
- ++rc_lineno;
- ++t;
- }
- if (*t == '\0')
- break;
- assert (*t == '"');
- ++t;
- }
- }
-
- *s = '\0';
-
- *len = s - ret;
-
- return ret;
-}
-
-/* Allocate a string of a given length. */
-
-static char *
-get_string (int len)
-{
- struct alloc_string *as;
-
- as = (struct alloc_string *) xmalloc (sizeof *as);
- as->s = xmalloc (len);
-
- as->next = strings;
- strings = as;
-
- return as->s;
-}
-
-/* Discard all the strings we have allocated. The parser calls this
- when it no longer needs them. */
-
-void
-rcparse_discard_strings (void)
-{
- struct alloc_string *as;
-
- as = strings;
- while (as != NULL)
- {
- struct alloc_string *n;
-
- free (as->s);
- n = as->next;
- free (as);
- as = n;
- }
-
- strings = NULL;
-}
-
-/* Enter rcdata mode. */
-
-void
-rcparse_rcdata (void)
-{
- rcdata_mode = 1;
-}
-
-/* Go back to normal mode from rcdata mode. */
-
-void
-rcparse_normal (void)
-{
- rcdata_mode = 0;
-}
diff --git a/contrib/binutils/binutils/rcparse.y b/contrib/binutils/binutils/rcparse.y
index fbc5bef..ac72ee7 100644
--- a/contrib/binutils/binutils/rcparse.y
+++ b/contrib/binutils/binutils/rcparse.y
@@ -1,7 +1,8 @@
%{ /* rcparse.y -- parser for Windows rc files
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
+ Extended by Kai Tietz, Onevision.
This file is part of GNU Binutils.
@@ -23,6 +24,7 @@
/* This is a parser for Windows rc files. It is based on the parser
by Gunther Ebert <gunther.ebert@ixos-leipzig.de>. */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
@@ -35,12 +37,12 @@ static unsigned short language;
/* The resource information during a sub statement. */
-static struct res_res_info sub_res_info;
+static rc_res_res_info sub_res_info;
/* Dialog information. This is built by the nonterminals styles and
controls. */
-static struct dialog dialog;
+static rc_dialog dialog;
/* This is used when building a style. It is modified by the
nonterminal styleexpr. */
@@ -50,56 +52,62 @@ static unsigned long style;
/* These are used when building a control. They are set before using
control_params. */
-static unsigned long base_style;
-static unsigned long default_style;
-static unsigned long class;
-static struct res_id res_text_field;
+static rc_uint_type base_style;
+static rc_uint_type default_style;
+static rc_res_id class;
+static rc_res_id res_text_field;
static unichar null_unichar;
/* This is used for COMBOBOX, LISTBOX and EDITTEXT which
do not allow resource 'text' field in control definition. */
-static const struct res_id res_null_text = { 1, {{0, &null_unichar}}};
+static const rc_res_id res_null_text = { 1, {{0, &null_unichar}}};
%}
%union
{
- struct accelerator acc;
- struct accelerator *pacc;
- struct dialog_control *dialog_control;
- struct menuitem *menuitem;
+ rc_accelerator acc;
+ rc_accelerator *pacc;
+ rc_dialog_control *dialog_control;
+ rc_menuitem *menuitem;
struct
{
- struct rcdata_item *first;
- struct rcdata_item *last;
+ rc_rcdata_item *first;
+ rc_rcdata_item *last;
} rcdata;
- struct rcdata_item *rcdata_item;
- struct stringtable_data *stringtable;
- struct fixed_versioninfo *fixver;
- struct ver_info *verinfo;
- struct ver_stringinfo *verstring;
- struct ver_varinfo *vervar;
- struct res_id id;
- struct res_res_info res_info;
+ rc_rcdata_item *rcdata_item;
+ rc_fixed_versioninfo *fixver;
+ rc_ver_info *verinfo;
+ rc_ver_stringinfo *verstring;
+ rc_ver_varinfo *vervar;
+ rc_toolbar_item *toobar_item;
+ rc_res_id id;
+ rc_res_res_info res_info;
struct
{
- unsigned short on;
- unsigned short off;
+ rc_uint_type on;
+ rc_uint_type off;
} memflags;
struct
{
- unsigned long val;
+ rc_uint_type val;
/* Nonzero if this number was explicitly specified as long. */
int dword;
} i;
- unsigned long il;
- unsigned short is;
+ rc_uint_type il;
+ rc_uint_type is;
const char *s;
struct
{
- unsigned long length;
+ rc_uint_type length;
const char *s;
} ss;
+ unichar *uni;
+ struct
+ {
+ rc_uint_type length;
+ const unichar *s;
+ } suni;
};
%token BEG END
@@ -113,6 +121,7 @@ static const struct res_id res_null_text = { 1, {{0, &null_unichar}}};
%token BEDIT HEDIT IEDIT
%token FONT
%token ICON
+%token ANICURSOR ANIICON DLGINCLUDE DLGINIT FONTDIR HTML MANIFEST PLUGPLAY VXD TOOLBAR BUTTON
%token LANGUAGE CHARACTERISTICS VERSIONK
%token MENU MENUEX MENUITEM SEPARATOR POPUP CHECKED GRAYED HELP INACTIVE
%token MENUBARBREAK MENUBREAK
@@ -125,8 +134,10 @@ static const struct res_id res_null_text = { 1, {{0, &null_unichar}}};
%token <s> BLOCK
%token MOVEABLE FIXED PURE IMPURE PRELOAD LOADONCALL DISCARDABLE
%token NOT
+%token <uni> QUOTEDUNISTRING
%token <s> QUOTEDSTRING STRING
%token <i> NUMBER
+%token <suni> SIZEDUNISTRING
%token <ss> SIZEDSTRING
%token IGNORED_TOKEN
@@ -140,13 +151,17 @@ static const struct res_id res_null_text = { 1, {{0, &null_unichar}}};
%type <verinfo> verblocks
%type <verstring> vervals
%type <vervar> vertrans
+%type <toobar_item> toolbar_data
%type <res_info> suboptions memflags_move_discard memflags_move
%type <memflags> memflag
-%type <id> id optresidc resref
+%type <id> id rcdata_id optresidc resref resid cresid
%type <il> exstyle parennumber
%type <il> numexpr posnumexpr cnumexpr optcnumexpr cposnumexpr
%type <is> acc_options acc_option menuitem_flags menuitem_flag
-%type <s> file_name resname
+%type <s> file_name
+%type <uni> res_unicode_string resname res_unicode_string_concat
+%type <ss> sizedstring
+%type <suni> sizedunistring
%type <i> sizednumexpr sizedposnumexpr
%left '|'
@@ -170,8 +185,8 @@ input:
| input menu
| input menuex
| input messagetable
- | input rcdata
| input stringtable
+ | input toolbar
| input user
| input versioninfo
| input IGNORED_TOKEN
@@ -196,15 +211,15 @@ acc_entries:
}
| acc_entries acc_entry
{
- struct accelerator *a;
+ rc_accelerator *a;
- a = (struct accelerator *) res_alloc (sizeof *a);
+ a = (rc_accelerator *) res_alloc (sizeof *a);
*a = $2;
if ($1 == NULL)
$$ = a;
else
{
- struct accelerator **pp;
+ rc_accelerator **pp;
for (pp = &$1->next; *pp != NULL; pp = &(*pp)->next)
;
@@ -246,8 +261,7 @@ acc_event:
{
$$.flags = ACC_CONTROL | ACC_VIRTKEY;
++s;
- ch = *s;
- ch = TOUPPER (ch);
+ ch = TOUPPER (s[0]);
}
$$.key = ch;
if (s[1] != '\0')
@@ -371,9 +385,9 @@ dialog:
dialog.menu.named = 1;
dialog.class.named = 1;
dialog.font = NULL;
- dialog.ex = ((struct dialog_ex *)
- res_alloc (sizeof (struct dialog_ex)));
- memset (dialog.ex, 0, sizeof (struct dialog_ex));
+ dialog.ex = ((rc_dialog_ex *)
+ res_alloc (sizeof (rc_dialog_ex)));
+ memset (dialog.ex, 0, sizeof (rc_dialog_ex));
dialog.controls = NULL;
sub_res_info = $3;
style = 0;
@@ -398,9 +412,9 @@ dialog:
dialog.menu.named = 1;
dialog.class.named = 1;
dialog.font = NULL;
- dialog.ex = ((struct dialog_ex *)
- res_alloc (sizeof (struct dialog_ex)));
- memset (dialog.ex, 0, sizeof (struct dialog_ex));
+ dialog.ex = ((rc_dialog_ex *)
+ res_alloc (sizeof (rc_dialog_ex)));
+ memset (dialog.ex, 0, sizeof (rc_dialog_ex));
dialog.ex->help = $9;
dialog.controls = NULL;
sub_res_info = $3;
@@ -428,11 +442,11 @@ exstyle:
styles:
/* empty */
- | styles CAPTION QUOTEDSTRING
+ | styles CAPTION res_unicode_string_concat
{
dialog.style |= WS_CAPTION;
style |= WS_CAPTION;
- unicode_from_ascii ((int *) NULL, &dialog.caption, $3);
+ dialog.caption = $3;
}
| styles CLASS id
{
@@ -447,16 +461,16 @@ styles:
{
dialog.exstyle = $3;
}
- | styles CLASS QUOTEDSTRING
+ | styles CLASS res_unicode_string_concat
{
- res_string_to_id (& dialog.class, $3);
+ res_unistring_to_id (& dialog.class, $3);
}
- | styles FONT numexpr ',' QUOTEDSTRING
+ | styles FONT numexpr ',' res_unicode_string_concat
{
dialog.style |= DS_SETFONT;
style |= DS_SETFONT;
dialog.pointsize = $3;
- unicode_from_ascii ((int *) NULL, &dialog.font, $5);
+ dialog.font = $5;
if (dialog.ex != NULL)
{
dialog.ex->weight = 0;
@@ -464,12 +478,12 @@ styles:
dialog.ex->charset = 1;
}
}
- | styles FONT numexpr ',' QUOTEDSTRING cnumexpr
+ | styles FONT numexpr ',' res_unicode_string_concat cnumexpr
{
dialog.style |= DS_SETFONT;
style |= DS_SETFONT;
dialog.pointsize = $3;
- unicode_from_ascii ((int *) NULL, &dialog.font, $5);
+ dialog.font = $5;
if (dialog.ex == NULL)
rcparse_warning (_("extended FONT requires DIALOGEX"));
else
@@ -479,12 +493,12 @@ styles:
dialog.ex->charset = 1;
}
}
- | styles FONT numexpr ',' QUOTEDSTRING cnumexpr cnumexpr
+ | styles FONT numexpr ',' res_unicode_string_concat cnumexpr cnumexpr
{
dialog.style |= DS_SETFONT;
style |= DS_SETFONT;
dialog.pointsize = $3;
- unicode_from_ascii ((int *) NULL, &dialog.font, $5);
+ dialog.font = $5;
if (dialog.ex == NULL)
rcparse_warning (_("extended FONT requires DIALOGEX"));
else
@@ -494,12 +508,12 @@ styles:
dialog.ex->charset = 1;
}
}
- | styles FONT numexpr ',' QUOTEDSTRING cnumexpr cnumexpr cnumexpr
+ | styles FONT numexpr ',' res_unicode_string_concat cnumexpr cnumexpr cnumexpr
{
dialog.style |= DS_SETFONT;
style |= DS_SETFONT;
dialog.pointsize = $3;
- unicode_from_ascii ((int *) NULL, &dialog.font, $5);
+ dialog.font = $5;
if (dialog.ex == NULL)
rcparse_warning (_("extended FONT requires DIALOGEX"));
else
@@ -531,7 +545,7 @@ controls:
/* empty */
| controls control
{
- struct dialog_control **pp;
+ rc_dialog_control **pp;
for (pp = &dialog.controls; *pp != NULL; pp = &(*pp)->next)
;
@@ -544,7 +558,8 @@ control:
{
default_style = BS_AUTO3STATE | WS_TABSTOP;
base_style = BS_AUTO3STATE;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -555,7 +570,8 @@ control:
{
default_style = BS_AUTOCHECKBOX | WS_TABSTOP;
base_style = BS_AUTOCHECKBOX;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -566,7 +582,8 @@ control:
{
default_style = BS_AUTORADIOBUTTON | WS_TABSTOP;
base_style = BS_AUTORADIOBUTTON;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -577,7 +594,8 @@ control:
{
default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
- class = CTL_EDIT;
+ class.named = 0;
+ class.u.id = CTL_EDIT;
res_text_field = $2;
}
control_params
@@ -591,7 +609,8 @@ control:
{
default_style = BS_CHECKBOX | WS_TABSTOP;
base_style = BS_CHECKBOX | WS_TABSTOP;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -604,14 +623,15 @@ control:
versions of MS rc.exe their is no default style. */
default_style = CBS_SIMPLE | WS_TABSTOP;
base_style = 0;
- class = CTL_COMBOBOX;
+ class.named = 0;
+ class.u.id = CTL_COMBOBOX;
res_text_field = res_null_text;
}
control_params
{
$$ = $3;
}
- | CONTROL optresidc numexpr cnumexpr control_styleexpr cnumexpr
+ | CONTROL optresidc numexpr cresid control_styleexpr cnumexpr
cnumexpr cnumexpr cnumexpr optcnumexpr opt_control_data
{
$$ = define_control ($2, $3, $6, $7, $8, $9, $4, style, $10);
@@ -622,7 +642,7 @@ control:
$$->data = $11;
}
}
- | CONTROL optresidc numexpr cnumexpr control_styleexpr cnumexpr
+ | CONTROL optresidc numexpr cresid control_styleexpr cnumexpr
cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr opt_control_data
{
$$ = define_control ($2, $3, $6, $7, $8, $9, $4, style, $10);
@@ -631,35 +651,12 @@ control:
$$->help = $11;
$$->data = $12;
}
- | CONTROL optresidc numexpr ',' QUOTEDSTRING control_styleexpr
- cnumexpr cnumexpr cnumexpr cnumexpr optcnumexpr opt_control_data
- {
- $$ = define_control ($2, $3, $7, $8, $9, $10, 0, style, $11);
- if ($12 != NULL)
- {
- if (dialog.ex == NULL)
- rcparse_warning ("control data requires DIALOGEX");
- $$->data = $12;
- }
- $$->class.named = 1;
- unicode_from_ascii (&$$->class.u.n.length, &$$->class.u.n.name, $5);
- }
- | CONTROL optresidc numexpr ',' QUOTEDSTRING control_styleexpr
- cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr cnumexpr opt_control_data
- {
- $$ = define_control ($2, $3, $7, $8, $9, $10, 0, style, $11);
- if (dialog.ex == NULL)
- rcparse_warning ("help ID requires DIALOGEX");
- $$->help = $12;
- $$->data = $13;
- $$->class.named = 1;
- unicode_from_ascii (&$$->class.u.n.length, &$$->class.u.n.name, $5);
- }
| CTEXT optresidc
{
default_style = SS_CENTER | WS_GROUP;
base_style = SS_CENTER;
- class = CTL_STATIC;
+ class.named = 0;
+ class.u.id = CTL_STATIC;
res_text_field = $2;
}
control_params
@@ -670,7 +667,8 @@ control:
{
default_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
base_style = BS_DEFPUSHBUTTON | WS_TABSTOP;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -681,7 +679,8 @@ control:
{
default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
- class = CTL_EDIT;
+ class.named = 0;
+ class.u.id = CTL_EDIT;
res_text_field = res_null_text;
}
control_params
@@ -692,7 +691,8 @@ control:
{
default_style = BS_GROUPBOX;
base_style = BS_GROUPBOX;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -703,7 +703,8 @@ control:
{
default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
- class = CTL_EDIT;
+ class.named = 0;
+ class.u.id = CTL_EDIT;
res_text_field = $2;
}
control_params
@@ -740,7 +741,8 @@ control:
{
default_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
base_style = ES_LEFT | WS_BORDER | WS_TABSTOP;
- class = CTL_EDIT;
+ class.named = 0;
+ class.u.id = CTL_EDIT;
res_text_field = $2;
}
control_params
@@ -754,7 +756,8 @@ control:
{
default_style = LBS_NOTIFY | WS_BORDER;
base_style = LBS_NOTIFY | WS_BORDER;
- class = CTL_LISTBOX;
+ class.named = 0;
+ class.u.id = CTL_LISTBOX;
res_text_field = res_null_text;
}
control_params
@@ -765,7 +768,8 @@ control:
{
default_style = SS_LEFT | WS_GROUP;
base_style = SS_LEFT;
- class = CTL_STATIC;
+ class.named = 0;
+ class.u.id = CTL_STATIC;
res_text_field = $2;
}
control_params
@@ -776,7 +780,8 @@ control:
{
default_style = BS_PUSHBOX | WS_TABSTOP;
base_style = BS_PUSHBOX;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
}
control_params
{
@@ -786,7 +791,8 @@ control:
{
default_style = BS_PUSHBUTTON | WS_TABSTOP;
base_style = BS_PUSHBUTTON | WS_TABSTOP;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -797,7 +803,8 @@ control:
{
default_style = BS_RADIOBUTTON | WS_TABSTOP;
base_style = BS_RADIOBUTTON;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -808,7 +815,8 @@ control:
{
default_style = SS_RIGHT | WS_GROUP;
base_style = SS_RIGHT;
- class = CTL_STATIC;
+ class.named = 0;
+ class.u.id = CTL_STATIC;
res_text_field = $2;
}
control_params
@@ -819,7 +827,8 @@ control:
{
default_style = SBS_HORZ;
base_style = 0;
- class = CTL_SCROLLBAR;
+ class.named = 0;
+ class.u.id = CTL_SCROLLBAR;
res_text_field = res_null_text;
}
control_params
@@ -830,7 +839,8 @@ control:
{
default_style = BS_3STATE | WS_TABSTOP;
base_style = BS_3STATE;
- class = CTL_BUTTON;
+ class.named = 0;
+ class.u.id = CTL_BUTTON;
res_text_field = $2;
}
control_params
@@ -842,7 +852,10 @@ control:
{ style = WS_CHILD | WS_VISIBLE; }
styleexpr optcnumexpr
{
- $$ = define_control ($2, $3, $5, $7, $9, $11, CTL_BUTTON,
+ rc_res_id cid;
+ cid.named = 0;
+ cid.u.id = CTL_BUTTON;
+ $$ = define_control ($2, $3, $5, $7, $9, $11, cid,
style, $15);
}
;
@@ -888,23 +901,35 @@ control_params:
}
;
+cresid:
+ ',' resid
+ {
+ if ($2.named)
+ res_unistring_to_id (&$$, $2.u.n.name);
+ else
+ $$=$2;
+ }
+ ;
+
optresidc:
/* empty */
{
res_string_to_id (&$$, "");
}
- | posnumexpr ','
+ | resid ',' { $$=$1; }
+ ;
+
+resid:
+ posnumexpr
{
$$.named = 0;
$$.u.id = $1;
}
- | QUOTEDSTRING
- {
- res_string_to_id (&$$, $1);
- }
- | QUOTEDSTRING ','
+ | res_unicode_string
{
- res_string_to_id (&$$, $1);
+ $$.named = 1;
+ $$.u.n.name = $1;
+ $$.u.n.length = unichar_len ($1);
}
;
@@ -996,7 +1021,7 @@ menuitems:
$$ = $2;
else
{
- struct menuitem **pp;
+ rc_menuitem **pp;
for (pp = &$1->next; *pp != NULL; pp = &(*pp)->next)
;
@@ -1007,7 +1032,7 @@ menuitems:
;
menuitem:
- MENUITEM QUOTEDSTRING cnumexpr menuitem_flags
+ MENUITEM res_unicode_string_concat cnumexpr menuitem_flags
{
$$ = define_menuitem ($2, $3, $4, 0, 0, NULL);
}
@@ -1015,7 +1040,7 @@ menuitem:
{
$$ = define_menuitem (NULL, 0, 0, 0, 0, NULL);
}
- | POPUP QUOTEDSTRING menuitem_flags BEG menuitems END
+ | POPUP res_unicode_string_concat menuitem_flags BEG menuitems END
{
$$ = define_menuitem ($2, 0, $3, 0, 0, $5);
}
@@ -1086,7 +1111,7 @@ menuexitems:
$$ = $2;
else
{
- struct menuitem **pp;
+ rc_menuitem **pp;
for (pp = &$1->next; *pp != NULL; pp = &(*pp)->next)
;
@@ -1097,15 +1122,15 @@ menuexitems:
;
menuexitem:
- MENUITEM QUOTEDSTRING
+ MENUITEM res_unicode_string_concat
{
$$ = define_menuitem ($2, 0, 0, 0, 0, NULL);
}
- | MENUITEM QUOTEDSTRING cnumexpr
+ | MENUITEM res_unicode_string_concat cnumexpr
{
$$ = define_menuitem ($2, $3, 0, 0, 0, NULL);
}
- | MENUITEM QUOTEDSTRING cnumexpr cnumexpr optcnumexpr
+ | MENUITEM res_unicode_string_concat cnumexpr cnumexpr optcnumexpr
{
$$ = define_menuitem ($2, $3, $4, $5, 0, NULL);
}
@@ -1113,19 +1138,19 @@ menuexitem:
{
$$ = define_menuitem (NULL, 0, 0, 0, 0, NULL);
}
- | POPUP QUOTEDSTRING BEG menuexitems END
+ | POPUP res_unicode_string_concat BEG menuexitems END
{
$$ = define_menuitem ($2, 0, 0, 0, 0, $4);
}
- | POPUP QUOTEDSTRING cnumexpr BEG menuexitems END
+ | POPUP res_unicode_string_concat cnumexpr BEG menuexitems END
{
$$ = define_menuitem ($2, $3, 0, 0, 0, $5);
}
- | POPUP QUOTEDSTRING cnumexpr cnumexpr BEG menuexitems END
+ | POPUP res_unicode_string_concat cnumexpr cnumexpr BEG menuexitems END
{
$$ = define_menuitem ($2, $3, $4, 0, 0, $6);
}
- | POPUP QUOTEDSTRING cnumexpr cnumexpr cnumexpr optcnumexpr
+ | POPUP res_unicode_string_concat cnumexpr cnumexpr cnumexpr optcnumexpr
BEG menuexitems END
{
$$ = define_menuitem ($2, $3, $4, $5, $6, $8);
@@ -1144,25 +1169,6 @@ messagetable:
}
;
-/* Rcdata resources. */
-
-rcdata:
- id RCDATA suboptions BEG optrcdata_data END
- {
- define_rcdata ($1, &$3, $5.first);
- if (yychar != YYEMPTY)
- YYERROR;
- rcparse_discard_strings ();
- }
- | id RCDATA suboptions file_name
- {
- define_rcdata_file ($1, &$3, $4);
- if (yychar != YYEMPTY)
- YYERROR;
- rcparse_discard_strings ();
- }
- ;
-
/* We use a different lexing algorithm, because rcdata strings may
contain embedded null bytes, and we need to know the length to use. */
@@ -1190,34 +1196,51 @@ optrcdata_data_int:
;
rcdata_data:
- SIZEDSTRING
+ sizedstring
{
- struct rcdata_item *ri;
+ rc_rcdata_item *ri;
ri = define_rcdata_string ($1.s, $1.length);
$$.first = ri;
$$.last = ri;
}
+ | sizedunistring
+ {
+ rc_rcdata_item *ri;
+
+ ri = define_rcdata_unistring ($1.s, $1.length);
+ $$.first = ri;
+ $$.last = ri;
+ }
| sizednumexpr
{
- struct rcdata_item *ri;
+ rc_rcdata_item *ri;
ri = define_rcdata_number ($1.val, $1.dword);
$$.first = ri;
$$.last = ri;
}
- | rcdata_data ',' SIZEDSTRING
+ | rcdata_data ',' sizedstring
{
- struct rcdata_item *ri;
+ rc_rcdata_item *ri;
ri = define_rcdata_string ($3.s, $3.length);
$$.first = $1.first;
$1.last->next = ri;
$$.last = ri;
}
+ | rcdata_data ',' sizedunistring
+ {
+ rc_rcdata_item *ri;
+
+ ri = define_rcdata_unistring ($3.s, $3.length);
+ $$.first = $1.first;
+ $1.last->next = ri;
+ $$.last = ri;
+ }
| rcdata_data ',' sizednumexpr
{
- struct rcdata_item *ri;
+ rc_rcdata_item *ri;
ri = define_rcdata_number ($3.val, $3.dword);
$$.first = $1.first;
@@ -1236,14 +1259,14 @@ stringtable:
string_data:
/* empty */
- | string_data numexpr QUOTEDSTRING
+ | string_data numexpr res_unicode_string_concat
{
define_stringtable (&sub_res_info, $2, $3);
if (yychar != YYEMPTY)
YYERROR;
rcparse_discard_strings ();
}
- | string_data numexpr ',' QUOTEDSTRING
+ | string_data numexpr ',' res_unicode_string_concat
{
define_stringtable (&sub_res_info, $2, $4);
if (yychar != YYEMPTY)
@@ -1252,18 +1275,70 @@ string_data:
}
;
+rcdata_id:
+ id
+ {
+ $$=$1;
+ }
+ | HTML
+ {
+ $$.named = 0;
+ $$.u.id = 23;
+ }
+ | RCDATA
+ {
+ $$.named = 0;
+ $$.u.id = RT_RCDATA;
+ }
+ | MANIFEST
+ {
+ $$.named = 0;
+ $$.u.id = RT_MANIFEST;
+ }
+ | PLUGPLAY
+ {
+ $$.named = 0;
+ $$.u.id = RT_PLUGPLAY;
+ }
+ | VXD
+ {
+ $$.named = 0;
+ $$.u.id = RT_VXD;
+ }
+ | DLGINCLUDE
+ {
+ $$.named = 0;
+ $$.u.id = RT_DLGINCLUDE;
+ }
+ | DLGINIT
+ {
+ $$.named = 0;
+ $$.u.id = RT_DLGINIT;
+ }
+ | ANICURSOR
+ {
+ $$.named = 0;
+ $$.u.id = RT_ANICURSOR;
+ }
+ | ANIICON
+ {
+ $$.named = 0;
+ $$.u.id = RT_ANIICON;
+ }
+ ;
+
/* User defined resources. We accept general suboptions in the
file_name case to keep the parser happy. */
user:
- id id suboptions BEG optrcdata_data END
+ id rcdata_id suboptions BEG optrcdata_data END
{
define_user_data ($1, $2, &$3, $5.first);
if (yychar != YYEMPTY)
YYERROR;
rcparse_discard_strings ();
}
- | id id suboptions file_name
+ | id rcdata_id suboptions file_name
{
define_user_file ($1, $2, &$3, $4);
if (yychar != YYEMPTY)
@@ -1272,6 +1347,55 @@ user:
}
;
+toolbar:
+ id TOOLBAR suboptions numexpr cnumexpr BEG toolbar_data END
+ {
+ define_toolbar ($1, &$3, $4, $5, $7);
+ }
+ ;
+
+toolbar_data: /* empty */ { $$= NULL; }
+ | toolbar_data BUTTON id
+ {
+ rc_toolbar_item *c,*n;
+ c = $1;
+ n= (rc_toolbar_item *)
+ res_alloc (sizeof (rc_toolbar_item));
+ if (c != NULL)
+ while (c->next != NULL)
+ c = c->next;
+ n->prev = c;
+ n->next = NULL;
+ if (c != NULL)
+ c->next = n;
+ n->id = $3;
+ if ($1 == NULL)
+ $$ = n;
+ else
+ $$ = $1;
+ }
+ | toolbar_data SEPARATOR
+ {
+ rc_toolbar_item *c,*n;
+ c = $1;
+ n= (rc_toolbar_item *)
+ res_alloc (sizeof (rc_toolbar_item));
+ if (c != NULL)
+ while (c->next != NULL)
+ c = c->next;
+ n->prev = c;
+ n->next = NULL;
+ if (c != NULL)
+ c->next = n;
+ n->id.named = 0;
+ n->id.u.id = 0;
+ if ($1 == NULL)
+ $$ = n;
+ else
+ $$ = $1;
+ }
+ ;
+
/* Versioninfo resources. */
versioninfo:
@@ -1287,9 +1411,9 @@ versioninfo:
fixedverinfo:
/* empty */
{
- $$ = ((struct fixed_versioninfo *)
- res_alloc (sizeof (struct fixed_versioninfo)));
- memset ($$, 0, sizeof (struct fixed_versioninfo));
+ $$ = ((rc_fixed_versioninfo *)
+ res_alloc (sizeof (rc_fixed_versioninfo)));
+ memset ($$, 0, sizeof (rc_fixed_versioninfo));
}
| fixedverinfo FILEVERSION numexpr cnumexpr cnumexpr cnumexpr
{
@@ -1345,7 +1469,7 @@ verblocks:
{
$$ = append_ver_stringfileinfo ($1, $4, $6);
}
- | verblocks BLOCKVARFILEINFO BEG VALUE QUOTEDSTRING vertrans END
+ | verblocks BLOCKVARFILEINFO BEG VALUE res_unicode_string_concat vertrans END
{
$$ = append_ver_varfileinfo ($1, $5, $6);
}
@@ -1356,7 +1480,7 @@ vervals:
{
$$ = NULL;
}
- | vervals VALUE QUOTEDSTRING ',' QUOTEDSTRING
+ | vervals VALUE res_unicode_string_concat ',' res_unicode_string_concat
{
$$ = append_verval ($1, $3, $5);
}
@@ -1381,33 +1505,24 @@ id:
$$.named = 0;
$$.u.id = $1;
}
- | STRING
+ | resname
{
- char *copy, *s;
-
- /* It seems that resource ID's are forced to upper case. */
- copy = xstrdup ($1);
- for (s = copy; *s != '\0'; s++)
- *s = TOUPPER (*s);
- res_string_to_id (&$$, copy);
- free (copy);
+ res_unistring_to_id (&$$, $1);
}
;
/* A resource reference. */
resname:
- QUOTEDSTRING
- {
- $$ = $1;
- }
- | QUOTEDSTRING ','
+ res_unicode_string
{
$$ = $1;
}
- | STRING ','
+ | STRING
{
- $$ = $1;
+ unichar *h = NULL;
+ unicode_from_ascii ((rc_uint_type *) NULL, &h, $1);
+ $$ = h;
}
;
@@ -1420,14 +1535,11 @@ resref:
}
| resname
{
- char *copy, *s;
-
- /* It seems that resource ID's are forced to upper case. */
- copy = xstrdup ($1);
- for (s = copy; *s != '\0'; s++)
- *s = TOUPPER (*s);
- res_string_to_id (&$$, copy);
- free (copy);
+ res_unistring_to_id (&$$, $1);
+ }
+ | resname ','
+ {
+ res_unistring_to_id (&$$, $1);
}
;
@@ -1437,7 +1549,7 @@ resref:
suboptions:
/* empty */
{
- memset (&$$, 0, sizeof (struct res_res_info));
+ memset (&$$, 0, sizeof (rc_res_res_info));
$$.language = language;
/* FIXME: Is this the right default? */
$$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
@@ -1470,7 +1582,7 @@ suboptions:
memflags_move_discard:
/* empty */
{
- memset (&$$, 0, sizeof (struct res_res_info));
+ memset (&$$, 0, sizeof (rc_res_res_info));
$$.language = language;
$$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_DISCARDABLE;
}
@@ -1487,7 +1599,7 @@ memflags_move_discard:
memflags_move:
/* empty */
{
- memset (&$$, 0, sizeof (struct res_res_info));
+ memset (&$$, 0, sizeof (rc_res_res_info));
$$.language = language;
$$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
}
@@ -1553,6 +1665,72 @@ file_name:
}
;
+/* Concat string */
+res_unicode_string_concat:
+ res_unicode_string
+ {
+ $$ = $1;
+ }
+ |
+ res_unicode_string_concat res_unicode_string
+ {
+ rc_uint_type l1 = unichar_len ($1);
+ rc_uint_type l2 = unichar_len ($2);
+ unichar *h = (unichar *) res_alloc ((l1 + l2 + 1) * sizeof (unichar));
+ if (l1 != 0)
+ memcpy (h, $1, l1 * sizeof (unichar));
+ if (l2 != 0)
+ memcpy (h + l1, $2, l2 * sizeof (unichar));
+ h[l1 + l2] = 0;
+ $$ = h;
+ }
+ ;
+
+res_unicode_string:
+ QUOTEDUNISTRING
+ {
+ $$ = unichar_dup ($1);
+ }
+ | QUOTEDSTRING
+ {
+ unichar *h = NULL;
+ unicode_from_ascii ((rc_uint_type *) NULL, &h, $1);
+ $$ = h;
+ }
+ ;
+
+sizedstring:
+ SIZEDSTRING
+ {
+ $$ = $1;
+ }
+ | sizedstring SIZEDSTRING
+ {
+ rc_uint_type l = $1.length + $2.length;
+ char *h = (char *) res_alloc (l);
+ memcpy (h, $1.s, $1.length);
+ memcpy (h + $1.length, $2.s, $2.length);
+ $$.s = h;
+ $$.length = l;
+ }
+ ;
+
+sizedunistring:
+ SIZEDUNISTRING
+ {
+ $$ = $1;
+ }
+ | sizedunistring SIZEDUNISTRING
+ {
+ rc_uint_type l = $1.length + $2.length;
+ unichar *h = (unichar *) res_alloc (l * sizeof (unichar));
+ memcpy (h, $1.s, $1.length * sizeof (unichar));
+ memcpy (h + $1.length, $2.s, $2.length * sizeof (unichar));
+ $$.s = h;
+ $$.length = l;
+ }
+ ;
+
/* A style expression. This changes the static variable STYLE. We do
it this way because rc appears to permit a style to be set to
something like
diff --git a/contrib/binutils/binutils/rdcoff.c b/contrib/binutils/binutils/rdcoff.c
index 1eda3af..70bf842 100644
--- a/contrib/binutils/binutils/rdcoff.c
+++ b/contrib/binutils/binutils/rdcoff.c
@@ -1,5 +1,6 @@
/* stabs.c -- Parse COFF debugging information
- Copyright 1996, 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1996, 1999, 2000, 2002, 2003, 2007
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -21,10 +22,11 @@
/* This file contains code which parses COFF debugging information. */
+#include "sysdep.h"
#include "bfd.h"
#include "coff/internal.h"
-#include "bucomm.h"
#include "libiberty.h"
+#include "bucomm.h"
#include "debug.h"
#include "budbg.h"
diff --git a/contrib/binutils/binutils/rddbg.c b/contrib/binutils/binutils/rddbg.c
index e977d8b..b9953d4 100644
--- a/contrib/binutils/binutils/rddbg.c
+++ b/contrib/binutils/binutils/rddbg.c
@@ -1,5 +1,5 @@
/* rddbg.c -- Read debugging information into a generic form.
- Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005
+ Copyright 1995, 1996, 1997, 2000, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -24,9 +24,10 @@
file knows how to dig the debugging information out of an object
file. */
+#include "sysdep.h"
#include "bfd.h"
-#include "bucomm.h"
#include "libiberty.h"
+#include "bucomm.h"
#include "debug.h"
#include "budbg.h"
diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c
index d8bd54f..ab41e28 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, 2002, 2003, 2004, 2005, 2006
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Originally developed by Eric Youngdale <eric@andante.jic.com>
@@ -41,12 +41,30 @@
ELF file than is provided by objdump. In particular it can display DWARF
debugging information which (at the moment) objdump cannot. */
+#include "sysdep.h"
#include <assert.h>
-#include <sys/types.h>
#include <sys/stat.h>
-#include <stdio.h>
#include <time.h>
+/* for PATH_MAX */
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#ifndef PATH_MAX
+/* for MAXPATHLEN */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# endif
+# ifndef PATH_MAX
+# ifdef MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+# else
+# define PATH_MAX 1024
+# endif
+# endif
+#endif
+
#if __GNUC__ >= 2
/* Define BFD64 here, even if our default architecture is 32 bit ELF
as this will allow us to read in and parse 64bit and 32bit ELF files.
@@ -55,12 +73,32 @@
#define BFD64
#endif
+#include "bfd.h"
+#include "bucomm.h"
#include "dwarf.h"
#include "elf/common.h"
#include "elf/external.h"
#include "elf/internal.h"
+
+/* Included here, before RELOC_MACROS_GEN_FUNC is defined, so that
+ we can obtain the H8 reloc numbers. We need these for the
+ get_reloc_size() function. We include h8.h again after defining
+ RELOC_MACROS_GEN_FUNC so that we get the naming function as well. */
+
+#include "elf/h8.h"
+#undef _ELF_H8_H
+
+/* Undo the effects of #including reloc-macros.h. */
+
+#undef START_RELOC_NUMBERS
+#undef RELOC_NUMBER
+#undef FAKE_RELOC
+#undef EMPTY_RELOC
+#undef END_RELOC_NUMBERS
+#undef _RELOC_MACROS_H
+
/* The following headers use the elf/reloc-macros.h file to
automatically generate relocation recognition functions
such as elf_mips_reloc_type() */
@@ -73,6 +111,7 @@
#include "elf/avr.h"
#include "elf/bfin.h"
#include "elf/cris.h"
+#include "elf/crx.h"
#include "elf/d10v.h"
#include "elf/d30v.h"
#include "elf/dlx.h"
@@ -86,11 +125,13 @@
#include "elf/i960.h"
#include "elf/ia64.h"
#include "elf/ip2k.h"
+#include "elf/iq2000.h"
#include "elf/m32c.h"
#include "elf/m32r.h"
#include "elf/m68k.h"
#include "elf/m68hc11.h"
#include "elf/mcore.h"
+#include "elf/mep.h"
#include "elf/mips.h"
#include "elf/mmix.h"
#include "elf/mn10200.h"
@@ -102,19 +143,18 @@
#include "elf/ppc.h"
#include "elf/ppc64.h"
#include "elf/s390.h"
+#include "elf/score.h"
#include "elf/sh.h"
#include "elf/sparc.h"
+#include "elf/spu.h"
#include "elf/v850.h"
#include "elf/vax.h"
#include "elf/x86-64.h"
#include "elf/xstormy16.h"
-#include "elf/crx.h"
-#include "elf/iq2000.h"
#include "elf/xtensa.h"
#include "aout/ar.h"
-#include "bucomm.h"
#include "getopt.h"
#include "libiberty.h"
@@ -133,8 +173,9 @@ static Elf_Internal_Sym *dynamic_symbols;
static Elf_Internal_Syminfo *dynamic_syminfo;
static unsigned long dynamic_syminfo_offset;
static unsigned int dynamic_syminfo_nent;
-static char program_interpreter[64];
+static char program_interpreter[PATH_MAX];
static bfd_vma dynamic_info[DT_JMPREL + 1];
+static bfd_vma dynamic_info_DT_GNU_HASH;
static bfd_vma version_info[16];
static Elf_Internal_Ehdr elf_header;
static Elf_Internal_Shdr *section_headers;
@@ -222,9 +263,11 @@ static void (*byte_put) (unsigned char *, bfd_vma, int);
#define UNKNOWN -1
-#define SECTION_NAME(X) ((X) == NULL ? "<none>" : \
- ((X)->sh_name >= string_table_length \
- ? "<corrupt>" : string_table + (X)->sh_name))
+#define SECTION_NAME(X) \
+ ((X) == NULL ? "<none>" \
+ : string_table == NULL ? "<no-name>" \
+ : ((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) \
@@ -260,6 +303,7 @@ static void (*byte_put) (unsigned char *, bfd_vma, int);
/* This is just a bit of syntatic sugar. */
#define streq(a,b) (strcmp ((a), (b)) == 0)
#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
+#define const_strneq(a,b) (strncmp ((a), (b), sizeof (b) - 1) == 0)
static void *
get_data (void *var, FILE *file, long offset, size_t size, size_t nmemb,
@@ -550,88 +594,91 @@ guess_is_rela (unsigned long e_machine)
switch (e_machine)
{
/* Targets that use REL relocations. */
- case EM_ARM:
case EM_386:
case EM_486:
case EM_960:
- case EM_DLX:
- case EM_OPENRISC:
- case EM_OR32:
- case EM_CYGNUS_M32R:
+ case EM_ARM:
case EM_D10V:
case EM_CYGNUS_D10V:
+ case EM_DLX:
case EM_MIPS:
case EM_MIPS_RS3_LE:
+ case EM_CYGNUS_M32R:
+ case EM_OPENRISC:
+ case EM_OR32:
+ case EM_SCORE:
return FALSE;
/* 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_860:
+ case EM_ALPHA:
+ case EM_ALTERA_NIOS2:
+ case EM_AVR:
+ case EM_AVR_OLD:
+ case EM_BLACKFIN:
+ case EM_CRIS:
+ case EM_CRX:
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_CYGNUS_FRV:
- case EM_SH:
- case EM_ALPHA:
- case EM_MCORE:
+ case EM_H8S:
+ case EM_H8_300:
+ case EM_H8_300H:
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_MSP430:
- case EM_MSP430_OLD:
- case EM_XSTORMY16:
- case EM_CRX:
- case EM_VAX:
case EM_IP2K:
case EM_IP2K_OLD:
case EM_IQ2000:
- case EM_XTENSA:
- case EM_XTENSA_OLD:
- case EM_M32R:
case EM_M32C:
+ case EM_M32R:
+ case EM_MCORE:
+ case EM_CYGNUS_MEP:
+ case EM_MMIX:
+ case EM_MN10200:
+ case EM_CYGNUS_MN10200:
+ case EM_MN10300:
+ case EM_CYGNUS_MN10300:
+ case EM_MSP430:
+ case EM_MSP430_OLD:
case EM_MT:
- case EM_BLACKFIN:
case EM_NIOS32:
- case EM_ALTERA_NIOS2:
+ case EM_PPC64:
+ case EM_PPC:
+ case EM_S390:
+ case EM_S390_OLD:
+ case EM_SH:
+ case EM_SPARC:
+ case EM_SPARC32PLUS:
+ case EM_SPARCV9:
+ case EM_SPU:
+ case EM_V850:
+ case EM_CYGNUS_V850:
+ case EM_VAX:
+ case EM_X86_64:
+ case EM_XSTORMY16:
+ case EM_XTENSA:
+ case EM_XTENSA_OLD:
return TRUE;
+ case EM_68HC05:
+ case EM_68HC08:
+ case EM_68HC11:
+ case EM_68HC16:
+ case EM_FX66:
+ case EM_ME16:
case EM_MMA:
- case EM_PCP:
case EM_NCPU:
case EM_NDR1:
- case EM_STARCORE:
- case EM_ME16:
+ case EM_PCP:
case EM_ST100:
- case EM_TINYJ:
- case EM_FX66:
- case EM_ST9PLUS:
+ case EM_ST19:
case EM_ST7:
- case EM_68HC16:
- case EM_68HC11:
- case EM_68HC08:
- case EM_68HC05:
+ case EM_ST9PLUS:
+ case EM_STARCORE:
case EM_SVX:
- case EM_ST19:
+ case EM_TINYJ:
default:
warn (_("Don't know about relocations on this machine architecture\n"));
return FALSE;
@@ -664,7 +711,7 @@ slurp_rela_relocs (FILE *file,
if (relas == NULL)
{
free (erelas);
- error (_("out of memory parsing relocs"));
+ error (_("out of memory parsing relocs\n"));
return 0;
}
@@ -692,7 +739,7 @@ slurp_rela_relocs (FILE *file,
if (relas == NULL)
{
free (erelas);
- error (_("out of memory parsing relocs"));
+ error (_("out of memory parsing relocs\n"));
return 0;
}
@@ -736,7 +783,7 @@ slurp_rel_relocs (FILE *file,
if (rels == NULL)
{
free (erels);
- error (_("out of memory parsing relocs"));
+ error (_("out of memory parsing relocs\n"));
return 0;
}
@@ -764,7 +811,7 @@ slurp_rel_relocs (FILE *file,
if (rels == NULL)
{
free (erels);
- error (_("out of memory parsing relocs"));
+ error (_("out of memory parsing relocs\n"));
return 0;
}
@@ -966,6 +1013,10 @@ dump_relocations (FILE *file,
rtype = elf_sparc_reloc_type (type);
break;
+ case EM_SPU:
+ rtype = elf_spu_reloc_type (type);
+ break;
+
case EM_V850:
case EM_CYGNUS_V850:
rtype = v850_reloc_type (type);
@@ -1095,6 +1146,10 @@ dump_relocations (FILE *file,
rtype = elf_s390_reloc_type (type);
break;
+ case EM_SCORE:
+ rtype = elf_score_reloc_type (type);
+ break;
+
case EM_XSTORMY16:
rtype = elf_xstormy16_reloc_type (type);
break;
@@ -1133,6 +1188,9 @@ dump_relocations (FILE *file,
rtype = elf_bfin_reloc_type (type);
break;
+ case EM_CYGNUS_MEP:
+ rtype = elf_mep_reloc_type (type);
+ break;
}
if (rtype == NULL)
@@ -1145,6 +1203,7 @@ dump_relocations (FILE *file,
printf (do_wide ? "%-22.22s" : "%-17.17s", rtype);
if (elf_header.e_machine == EM_ALPHA
+ && rtype != NULL
&& streq (rtype, "R_ALPHA_LITUSE")
&& is_rela)
{
@@ -1203,6 +1262,12 @@ dump_relocations (FILE *file,
sec_name = "ABS";
else if (psym->st_shndx == SHN_COMMON)
sec_name = "COMMON";
+ else if (elf_header.e_machine == EM_MIPS
+ && psym->st_shndx == SHN_MIPS_SCOMMON)
+ sec_name = "SCOMMON";
+ else if (elf_header.e_machine == EM_MIPS
+ && psym->st_shndx == SHN_MIPS_SUNDEFINED)
+ sec_name = "SUNDEF";
else if (elf_header.e_machine == EM_X86_64
&& psym->st_shndx == SHN_X86_64_LCOMMON)
sec_name = "LARGE_COMMON";
@@ -1237,7 +1302,9 @@ dump_relocations (FILE *file,
print_vma (rels[i].r_addend, LONG_HEX);
}
- if (elf_header.e_machine == EM_SPARCV9 && streq (rtype, "R_SPARC_OLO10"))
+ if (elf_header.e_machine == EM_SPARCV9
+ && rtype != NULL
+ && streq (rtype, "R_SPARC_OLO10"))
printf (" + %lx", (unsigned long) ELF64_R_TYPE_DATA (info));
putchar ('\n');
@@ -1420,6 +1487,23 @@ get_alpha_dynamic_type (unsigned long type)
}
static const char *
+get_score_dynamic_type (unsigned long type)
+{
+ switch (type)
+ {
+ case DT_SCORE_BASE_ADDRESS: return "SCORE_BASE_ADDRESS";
+ case DT_SCORE_LOCAL_GOTNO: return "SCORE_LOCAL_GOTNO";
+ case DT_SCORE_SYMTABNO: return "SCORE_SYMTABNO";
+ case DT_SCORE_GOTSYM: return "SCORE_GOTSYM";
+ case DT_SCORE_UNREFEXTNO: return "SCORE_UNREFEXTNO";
+ case DT_SCORE_HIPAGENO: return "SCORE_HIPAGENO";
+ default:
+ return NULL;
+ }
+}
+
+
+static const char *
get_dynamic_type (unsigned long type)
{
static char buff[64];
@@ -1499,6 +1583,7 @@ get_dynamic_type (unsigned long type)
case DT_GNU_CONFLICTSZ: return "GNU_CONFLICTSZ";
case DT_GNU_LIBLIST: return "GNU_LIBLIST";
case DT_GNU_LIBLISTSZ: return "GNU_LIBLISTSZ";
+ case DT_GNU_HASH: return "GNU_HASH";
default:
if ((type >= DT_LOPROC) && (type <= DT_HIPROC))
@@ -1526,6 +1611,9 @@ get_dynamic_type (unsigned long type)
case EM_ALPHA:
result = get_alpha_dynamic_type (type);
break;
+ case EM_SCORE:
+ result = get_score_dynamic_type (type);
+ break;
default:
result = NULL;
break;
@@ -1599,6 +1687,7 @@ get_machine_name (unsigned e_machine)
case EM_NONE: return _("None");
case EM_M32: return "WE32100";
case EM_SPARC: return "Sparc";
+ case EM_SPU: return "SPU";
case EM_386: return "Intel 80386";
case EM_68K: return "MC68000";
case EM_88K: return "MC88000";
@@ -1680,6 +1769,7 @@ get_machine_name (unsigned e_machine)
case EM_X86_64: return "Advanced Micro Devices X86-64";
case EM_S390_OLD:
case EM_S390: return "IBM S/390";
+ case EM_SCORE: return "SUNPLUS S+Core";
case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core";
case EM_OPENRISC:
case EM_OR32: return "OpenRISC";
@@ -1696,8 +1786,9 @@ get_machine_name (unsigned e_machine)
case EM_NIOS32: return "Altera Nios";
case EM_ALTERA_NIOS2: return "Altera Nios II";
case EM_XC16X: return "Infineon Technologies xc16x";
+ case EM_CYGNUS_MEP: return "Toshiba MeP Media Engine";
default:
- snprintf (buff, sizeof (buff), _("<unknown>: %x"), e_machine);
+ snprintf (buff, sizeof (buff), _("<unknown>: 0x%x"), e_machine);
return buff;
}
}
@@ -1946,33 +2037,35 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
break;
case EM_68K:
- if (e_flags & EF_M68K_CPU32)
- strcat (buf, ", cpu32");
- if (e_flags & EF_M68K_M68000)
+ if ((e_flags & EF_M68K_ARCH_MASK) == EF_M68K_M68000)
strcat (buf, ", m68000");
- if (e_flags & EF_M68K_ISA_MASK)
+ else if ((e_flags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32)
+ strcat (buf, ", cpu32");
+ else if ((e_flags & EF_M68K_ARCH_MASK) == EF_M68K_FIDO)
+ strcat (buf, ", fido_a");
+ else
{
char const *isa = _("unknown");
char const *mac = _("unknown mac");
char const *additional = NULL;
-
- switch (e_flags & EF_M68K_ISA_MASK)
+
+ switch (e_flags & EF_M68K_CF_ISA_MASK)
{
- case EF_M68K_ISA_A_NODIV:
+ case EF_M68K_CF_ISA_A_NODIV:
isa = "A";
additional = ", nodiv";
break;
- case EF_M68K_ISA_A:
+ case EF_M68K_CF_ISA_A:
isa = "A";
break;
- case EF_M68K_ISA_A_PLUS:
+ case EF_M68K_CF_ISA_A_PLUS:
isa = "A+";
break;
- case EF_M68K_ISA_B_NOUSP:
+ case EF_M68K_CF_ISA_B_NOUSP:
isa = "B";
additional = ", nousp";
break;
- case EF_M68K_ISA_B:
+ case EF_M68K_CF_ISA_B:
isa = "B";
break;
}
@@ -1980,17 +2073,17 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
strcat (buf, isa);
if (additional)
strcat (buf, additional);
- if (e_flags & EF_M68K_FLOAT)
+ if (e_flags & EF_M68K_CF_FLOAT)
strcat (buf, ", float");
- switch (e_flags & EF_M68K_MAC_MASK)
+ switch (e_flags & EF_M68K_CF_MAC_MASK)
{
case 0:
mac = NULL;
break;
- case EF_M68K_MAC:
+ case EF_M68K_CF_MAC:
mac = "mac";
break;
- case EF_M68K_EMAC:
+ case EF_M68K_CF_EMAC:
mac = "emac";
break;
}
@@ -2036,7 +2129,6 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
case EM_CYGNUS_M32R:
if ((e_flags & EF_M32R_ARCH) == E_M32R_ARCH)
strcat (buf, ", m32r");
-
break;
case EM_MIPS:
@@ -2569,6 +2661,7 @@ get_section_type_name (unsigned int sh_type)
case SHT_INIT_ARRAY: return "INIT_ARRAY";
case SHT_FINI_ARRAY: return "FINI_ARRAY";
case SHT_PREINIT_ARRAY: return "PREINIT_ARRAY";
+ case SHT_GNU_HASH: return "GNU_HASH";
case SHT_GROUP: return "GROUP";
case SHT_SYMTAB_SHNDX: return "SYMTAB SECTION INDICIES";
case SHT_GNU_verdef: return "VERDEF";
@@ -2661,11 +2754,11 @@ static struct option options[] =
};
static void
-usage (void)
+usage (FILE *stream)
{
- 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\
+ fprintf (stream, _("Usage: readelf <option(s)> elf-file(s)\n"));
+ fprintf (stream, _(" Display information about the contents of ELF format files\n"));
+ fprintf (stream, _(" 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\
@@ -2689,19 +2782,21 @@ usage (void)
--debug-dump[=line,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=str,=loc,=Ranges]\n\
Display the contents of DWARF2 debug sections\n"));
#ifdef SUPPORT_DISASSEMBLY
- fprintf (stdout, _("\
+ fprintf (stream, _("\
-i --instruction-dump=<number>\n\
Disassemble the contents of section <number>\n"));
#endif
- fprintf (stdout, _("\
+ fprintf (stream, _("\
-I --histogram Display histogram of bucket list lengths\n\
-W --wide Allow output width to exceed 80 characters\n\
@<file> Read options from <file>\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);
+
+ if (REPORT_BUGS_TO[0] && stream == stdout)
+ fprintf (stdout, _("Report bugs to %s\n"), REPORT_BUGS_TO);
- exit (0);
+ exit (stream == stdout ? 0 : 1);
}
/* Record the fact that the user wants the contents of section number
@@ -2719,7 +2814,7 @@ request_dump (unsigned int section, int type)
new_dump_sects = calloc (section + 1, 1);
if (new_dump_sects == NULL)
- error (_("Out of memory allocating dump request table."));
+ error (_("Out of memory allocating dump request table.\n"));
else
{
/* Copy current flag settings. */
@@ -2747,11 +2842,11 @@ request_dump_byname (const char *section, int type)
new_request = malloc (sizeof (struct dump_list_entry));
if (!new_request)
- error (_("Out of memory allocating dump request table."));
+ error (_("Out of memory allocating dump request table.\n"));
new_request->name = strdup (section);
if (!new_request->name)
- error (_("Out of memory allocating dump request table."));
+ error (_("Out of memory allocating dump request table.\n"));
new_request->type = type;
@@ -2765,7 +2860,7 @@ parse_args (int argc, char **argv)
int c;
if (argc < 2)
- usage ();
+ usage (stderr);
while ((c = getopt_long
(argc, argv, "ersuahnldSDAINtgw::x:i:vVWH", options, NULL)) != EOF)
@@ -2779,7 +2874,7 @@ parse_args (int argc, char **argv)
/* Long options. */
break;
case 'H':
- usage ();
+ usage (stdout);
break;
case 'a':
@@ -3020,7 +3115,7 @@ parse_args (int argc, char **argv)
error (_("Invalid option '-%c'\n"), c);
/* Drop through. */
case '?':
- usage ();
+ usage (stderr);
}
}
@@ -3028,11 +3123,11 @@ parse_args (int argc, char **argv)
&& !do_segments && !do_header && !do_dump && !do_version
&& !do_histogram && !do_debugging && !do_arch && !do_notes
&& !do_section_groups)
- usage ();
+ usage (stderr);
else if (argc < 3)
{
warn (_("Nothing to do.\n"));
- usage ();
+ usage (stderr);
}
}
@@ -3142,6 +3237,11 @@ process_file_header (void)
(long) elf_header.e_shstrndx);
if (section_headers != NULL && elf_header.e_shstrndx == SHN_XINDEX)
printf (" (%ld)", (long) section_headers[0].sh_link);
+ else if (elf_header.e_shstrndx != SHN_UNDEF
+ && (elf_header.e_shstrndx >= elf_header.e_shnum
+ || (elf_header.e_shstrndx >= SHN_LORESERVE
+ && elf_header.e_shstrndx <= SHN_HIRESERVE)))
+ printf (" <corrupt: out of range>");
putc ('\n', stdout);
}
@@ -3151,6 +3251,11 @@ process_file_header (void)
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;
+ else if (elf_header.e_shstrndx != SHN_UNDEF
+ && (elf_header.e_shstrndx >= elf_header.e_shnum
+ || (elf_header.e_shstrndx >= SHN_LORESERVE
+ && elf_header.e_shstrndx <= SHN_HIRESERVE)))
+ elf_header.e_shstrndx = SHN_UNDEF;
free (section_headers);
section_headers = NULL;
}
@@ -3407,18 +3512,21 @@ process_program_headers (FILE *file)
sec = find_section (".dynamic");
if (sec == NULL || sec->sh_size == 0)
{
- error (_("no .dynamic section in the dynamic segment"));
+ error (_("no .dynamic section in the dynamic segment\n"));
break;
}
+ if (sec->sh_type == SHT_NOBITS)
+ break;
+
dynamic_addr = sec->sh_offset;
dynamic_size = sec->sh_size;
if (dynamic_addr < segment->p_offset
|| dynamic_addr > segment->p_offset + segment->p_filesz)
- warn (_("the .dynamic section is not contained within the dynamic segment"));
+ warn (_("the .dynamic section is not contained within the dynamic segment\n"));
else if (dynamic_addr > segment->p_offset)
- warn (_("the .dynamic section is not the first section in the dynamic segment."));
+ warn (_("the .dynamic section is not the first section in the dynamic segment.\n"));
}
else
{
@@ -3435,8 +3543,15 @@ process_program_headers (FILE *file)
error (_("Unable to find program interpreter name\n"));
else
{
+ char fmt [32];
+ int ret = snprintf (fmt, sizeof (fmt), "%%%ds", PATH_MAX);
+
+ if (ret >= (int) sizeof (fmt) || ret < 0)
+ error (_("Internal error: failed to create format string to display program interpreter\n"));
+
program_interpreter[0] = 0;
- fscanf (file, "%63s", program_interpreter);
+ if (fscanf (file, fmt, program_interpreter) <= 0)
+ error (_("Unable to read program interpreter name\n"));
if (do_segments)
printf (_("\n [Requesting program interpreter: %s]"),
@@ -3920,7 +4035,8 @@ process_section_headers (FILE *file)
return 0;
/* Read in the string table, so that we have names to display. */
- if (SECTION_HEADER_INDEX (elf_header.e_shstrndx) < elf_header.e_shnum)
+ if (elf_header.e_shstrndx != SHN_UNDEF
+ && SECTION_HEADER_INDEX (elf_header.e_shstrndx) < elf_header.e_shnum)
{
section = SECTION_HEADER (elf_header.e_shstrndx);
@@ -3958,6 +4074,23 @@ process_section_headers (FILE *file)
&& find_section (".gcc_compiled_long32") == NULL)
eh_addr_size = 8;
break;
+
+ case EM_H8_300:
+ case EM_H8_300H:
+ switch (elf_header.e_flags & EF_H8_MACH)
+ {
+ case E_H8_MACH_H8300:
+ case E_H8_MACH_H8300HN:
+ case E_H8_MACH_H8300SN:
+ case E_H8_MACH_H8300SXN:
+ eh_addr_size = 2;
+ break;
+ case E_H8_MACH_H8300H:
+ case E_H8_MACH_H8300S:
+ case E_H8_MACH_H8300SX:
+ eh_addr_size = 4;
+ break;
+ }
}
#define CHECK_ENTSIZE_VALUES(section, i, size32, size64) \
@@ -4028,7 +4161,7 @@ process_section_headers (FILE *file)
|| do_debug_lines || do_debug_pubnames || do_debug_aranges
|| do_debug_frames || do_debug_macinfo || do_debug_str
|| do_debug_loc || do_debug_ranges)
- && strneq (name, ".debug_", 7))
+ && const_strneq (name, ".debug_"))
{
name += 7;
@@ -4048,7 +4181,7 @@ process_section_headers (FILE *file)
}
/* linkonce section to be combined with .debug_info at link time. */
else if ((do_debugging || do_debug_info)
- && strneq (name, ".gnu.linkonce.wi.", 17))
+ && const_strneq (name, ".gnu.linkonce.wi."))
request_dump (i, DEBUG_DUMP);
else if (do_debug_frames && streq (name, ".eh_frame"))
request_dump (i, DEBUG_DUMP);
@@ -4884,7 +5017,7 @@ slurp_ia64_unwind_table (FILE *file,
sym = aux->symtab + ELF64_R_SYM (rp->r_info);
}
- if (! strneq (relname, "R_IA64_SEGREL", 13))
+ if (! const_strneq (relname, "R_IA64_SEGREL"))
{
warn (_("Skipping unexpected relocation type %s\n"), relname);
continue;
@@ -5297,7 +5430,7 @@ slurp_hppa_unwind_table (FILE *file,
}
/* R_PARISC_SEGREL32 or R_PARISC_SEGREL64. */
- if (strncmp (relname, "R_PARISC_SEGREL", 15) != 0)
+ if (! const_strneq (relname, "R_PARISC_SEGREL"))
{
warn (_("Skipping unexpected relocation type %s\n"), relname);
continue;
@@ -5735,7 +5868,7 @@ process_dynamic_section (FILE *file)
else
{
if (fseek (file, 0, SEEK_END))
- error (_("Unable to seek to end of file!"));
+ error (_("Unable to seek to end of file!\n"));
section.sh_size = ftell (file) - section.sh_offset;
}
@@ -6215,6 +6348,15 @@ process_dynamic_section (FILE *file)
}
break;
+ case DT_GNU_HASH:
+ dynamic_info_DT_GNU_HASH = entry->d_un.d_val;
+ if (do_dynamic)
+ {
+ print_vma (entry->d_un.d_val, PREFIX_HEX);
+ putchar ('\n');
+ }
+ break;
+
default:
if ((entry->d_tag >= DT_VERSYM) && (entry->d_tag <= DT_VERNEEDNUM))
version_info[DT_VERSIONTAGIDX (entry->d_tag)] =
@@ -6732,6 +6874,8 @@ get_symbol_type (unsigned int type)
case STT_FILE: return "FILE";
case STT_COMMON: return "COMMON";
case STT_TLS: return "TLS";
+ case STT_RELC: return "RELC";
+ case STT_SRELC: return "SRELC";
default:
if (type >= STT_LOPROC && type <= STT_HIPROC)
{
@@ -6830,6 +6974,12 @@ get_symbol_index_type (unsigned int type)
else if (elf_header.e_machine == EM_X86_64
&& type == SHN_X86_64_LCOMMON)
return "LARGE_COM";
+ else if (type == SHN_MIPS_SCOMMON
+ && elf_header.e_machine == EM_MIPS)
+ return "SCOM";
+ else if (type == SHN_MIPS_SUNDEFINED
+ && elf_header.e_machine == EM_MIPS)
+ return "SUND";
else if (type >= SHN_LOPROC && type <= SHN_HIPROC)
sprintf (buff, "PRC[0x%04x]", type);
else if (type >= SHN_LOOS && type <= SHN_HIOS)
@@ -6890,6 +7040,9 @@ process_symbol_table (FILE *file)
bfd_vma nchains = 0;
bfd_vma *buckets = NULL;
bfd_vma *chains = NULL;
+ bfd_vma ngnubuckets = 0;
+ bfd_vma *gnubuckets = NULL;
+ bfd_vma *gnuchains = NULL;
if (! do_syms && !do_histogram)
return 1;
@@ -6913,7 +7066,7 @@ process_symbol_table (FILE *file)
sizeof nb + sizeof nc)),
SEEK_SET))
{
- error (_("Unable to seek to start of dynamic information"));
+ error (_("Unable to seek to start of dynamic information\n"));
return 0;
}
@@ -7139,7 +7292,7 @@ process_symbol_table (FILE *file)
check_def = 0;
}
else if (! is_nobits)
- error (_("bad dynamic symbol"));
+ error (_("bad dynamic symbol\n"));
else
check_def = 1;
}
@@ -7222,7 +7375,7 @@ process_symbol_table (FILE *file)
lengths = calloc (nbuckets, sizeof (*lengths));
if (lengths == NULL)
{
- error (_("Out of memory"));
+ error (_("Out of memory\n"));
return 0;
}
for (hn = 0; hn < nbuckets; ++hn)
@@ -7238,7 +7391,7 @@ process_symbol_table (FILE *file)
counts = calloc (maxlength + 1, sizeof (*counts));
if (counts == NULL)
{
- error (_("Out of memory"));
+ error (_("Out of memory\n"));
return 0;
}
@@ -7269,6 +7422,166 @@ process_symbol_table (FILE *file)
free (chains);
}
+ if (do_histogram && dynamic_info_DT_GNU_HASH)
+ {
+ unsigned char nb[16];
+ bfd_vma i, maxchain = 0xffffffff, symidx, bitmaskwords;
+ unsigned long *lengths;
+ unsigned long *counts;
+ unsigned long hn;
+ unsigned long maxlength = 0;
+ unsigned long nzero_counts = 0;
+ unsigned long nsyms = 0;
+ bfd_vma buckets_vma;
+
+ if (fseek (file,
+ (archive_file_offset
+ + offset_from_vma (file, dynamic_info_DT_GNU_HASH,
+ sizeof nb)),
+ SEEK_SET))
+ {
+ error (_("Unable to seek to start of dynamic information\n"));
+ return 0;
+ }
+
+ if (fread (nb, 16, 1, file) != 1)
+ {
+ error (_("Failed to read in number of buckets\n"));
+ return 0;
+ }
+
+ ngnubuckets = byte_get (nb, 4);
+ symidx = byte_get (nb + 4, 4);
+ bitmaskwords = byte_get (nb + 8, 4);
+ buckets_vma = dynamic_info_DT_GNU_HASH + 16;
+ if (is_32bit_elf)
+ buckets_vma += bitmaskwords * 4;
+ else
+ buckets_vma += bitmaskwords * 8;
+
+ if (fseek (file,
+ (archive_file_offset
+ + offset_from_vma (file, buckets_vma, 4)),
+ SEEK_SET))
+ {
+ error (_("Unable to seek to start of dynamic information\n"));
+ return 0;
+ }
+
+ gnubuckets = get_dynamic_data (file, ngnubuckets, 4);
+
+ if (gnubuckets == NULL)
+ return 0;
+
+ for (i = 0; i < ngnubuckets; i++)
+ if (gnubuckets[i] != 0)
+ {
+ if (gnubuckets[i] < symidx)
+ return 0;
+
+ if (maxchain == 0xffffffff || gnubuckets[i] > maxchain)
+ maxchain = gnubuckets[i];
+ }
+
+ if (maxchain == 0xffffffff)
+ return 0;
+
+ maxchain -= symidx;
+
+ if (fseek (file,
+ (archive_file_offset
+ + offset_from_vma (file, buckets_vma
+ + 4 * (ngnubuckets + maxchain), 4)),
+ SEEK_SET))
+ {
+ error (_("Unable to seek to start of dynamic information\n"));
+ return 0;
+ }
+
+ do
+ {
+ if (fread (nb, 4, 1, file) != 1)
+ {
+ error (_("Failed to determine last chain length\n"));
+ return 0;
+ }
+
+ if (maxchain + 1 == 0)
+ return 0;
+
+ ++maxchain;
+ }
+ while ((byte_get (nb, 4) & 1) == 0);
+
+ if (fseek (file,
+ (archive_file_offset
+ + offset_from_vma (file, buckets_vma + 4 * ngnubuckets, 4)),
+ SEEK_SET))
+ {
+ error (_("Unable to seek to start of dynamic information\n"));
+ return 0;
+ }
+
+ gnuchains = get_dynamic_data (file, maxchain, 4);
+
+ if (gnuchains == NULL)
+ return 0;
+
+ lengths = calloc (ngnubuckets, sizeof (*lengths));
+ if (lengths == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ printf (_("\nHistogram for `.gnu.hash' bucket list length (total of %lu buckets):\n"),
+ (unsigned long) ngnubuckets);
+ printf (_(" Length Number %% of total Coverage\n"));
+
+ for (hn = 0; hn < ngnubuckets; ++hn)
+ if (gnubuckets[hn] != 0)
+ {
+ bfd_vma off, length = 1;
+
+ for (off = gnubuckets[hn] - symidx;
+ (gnuchains[off] & 1) == 0; ++off)
+ ++length;
+ lengths[hn] = length;
+ if (length > maxlength)
+ maxlength = length;
+ nsyms += length;
+ }
+
+ counts = calloc (maxlength + 1, sizeof (*counts));
+ if (counts == NULL)
+ {
+ error (_("Out of memory\n"));
+ return 0;
+ }
+
+ for (hn = 0; hn < ngnubuckets; ++hn)
+ ++counts[lengths[hn]];
+
+ if (ngnubuckets > 0)
+ {
+ unsigned long j;
+ printf (" 0 %-10lu (%5.1f%%)\n",
+ counts[0], (counts[0] * 100.0) / ngnubuckets);
+ for (j = 1; j <= maxlength; ++j)
+ {
+ nzero_counts += counts[j] * j;
+ printf ("%7lu %-10lu (%5.1f%%) %5.1f%%\n",
+ j, counts[j], (counts[j] * 100.0) / ngnubuckets,
+ (nzero_counts * 100.0) / nsyms);
+ }
+ }
+
+ free (counts);
+ free (lengths);
+ free (gnubuckets);
+ free (gnuchains);
+ }
+
return 1;
}
@@ -7354,6 +7667,7 @@ disassemble_section (Elf_Internal_Shdr *section, FILE *file)
static int
dump_section (Elf_Internal_Shdr *section, FILE *file)
{
+ Elf_Internal_Shdr *relsec;
bfd_size_type bytes;
bfd_vma addr;
unsigned char *data;
@@ -7377,6 +7691,26 @@ dump_section (Elf_Internal_Shdr *section, FILE *file)
if (!start)
return 0;
+ /* If the section being dumped has relocations against it the user might
+ be expecting these relocations to have been applied. Check for this
+ case and issue a warning message in order to avoid confusion.
+ FIXME: Maybe we ought to have an option that dumps a section with
+ relocs applied ? */
+ for (relsec = section_headers;
+ relsec < section_headers + elf_header.e_shnum;
+ ++relsec)
+ {
+ if ((relsec->sh_type != SHT_RELA && relsec->sh_type != SHT_REL)
+ || SECTION_HEADER_INDEX (relsec->sh_info) >= elf_header.e_shnum
+ || SECTION_HEADER (relsec->sh_info) != section
+ || relsec->sh_size == 0
+ || SECTION_HEADER_INDEX (relsec->sh_link) >= elf_header.e_shnum)
+ continue;
+
+ printf (_(" NOTE: This section has relocations against it, but these have NOT been applied to this dump.\n"));
+ break;
+ }
+
data = start;
while (bytes)
@@ -7389,34 +7723,15 @@ dump_section (Elf_Internal_Shdr *section, FILE *file)
printf (" 0x%8.8lx ", (unsigned long) addr);
- switch (elf_header.e_ident[EI_DATA])
+ for (j = 0; j < 16; j++)
{
- default:
- case ELFDATA2LSB:
- for (j = 15; j >= 0; j --)
- {
- if (j < lbytes)
- printf ("%2.2x", data[j]);
- else
- printf (" ");
-
- if (!(j & 0x3))
- printf (" ");
- }
- break;
-
- case ELFDATA2MSB:
- for (j = 0; j < 16; j++)
- {
- if (j < lbytes)
- printf ("%2.2x", data[j]);
- else
- printf (" ");
+ if (j < lbytes)
+ printf ("%2.2x", data[j]);
+ else
+ printf (" ");
- if ((j & 3) == 3)
- printf (" ");
- }
- break;
+ if ((j & 3) == 3)
+ printf (" ");
}
for (j = 0; j < lbytes; j++)
@@ -7437,9 +7752,47 @@ dump_section (Elf_Internal_Shdr *section, FILE *file)
free (start);
+ putchar ('\n');
return 1;
}
+/* Return the number of bytes affected by a given reloc.
+ This information is architecture and reloc dependent.
+ Returns 4 by default, although this is not always correct.
+ It should return 0 if a decision cannot be made.
+ FIXME: This is not the correct way to solve this problem.
+ The proper way is to have target specific reloc sizing functions
+ created by the reloc-macros.h header, in the same way that it
+ already creates the reloc naming functions. */
+
+static unsigned int
+get_reloc_size (Elf_Internal_Rela * reloc)
+{
+ switch (elf_header.e_machine)
+ {
+ case EM_H8S:
+ case EM_H8_300:
+ case EM_H8_300H:
+ case EM_H8_500:
+ switch (ELF32_R_TYPE (reloc->r_info))
+ {
+ /* PR gas/3800 - without this information we do not correctly
+ decode the debug information generated by the h8300 assembler. */
+ case R_H8_DIR16:
+ return 2;
+ default:
+ return 4;
+ }
+ default:
+ /* FIXME: We need to extend this switch statement to cope with other
+ architecture's relocs. (When those relocs are used against debug
+ sections, and when their size is not 4). But see the multiple
+ inclusions of <elf/h8.h> for an example of the hoops that we need
+ to jump through in order to obtain the reloc numbers. */
+ return 4;
+ }
+}
+
/* Apply addends of RELA relocations. */
static int
@@ -7449,14 +7802,13 @@ debug_apply_rela_addends (void *file,
{
Elf_Internal_Shdr *relsec;
unsigned char *end = start + section->sh_size;
- /* FIXME: The relocation field size is relocation type dependent. */
- unsigned int reloc_size = 4;
if (!is_relocatable)
return 1;
- if (section->sh_size < reloc_size)
- return 1;
+ /* SH uses RELA but uses in place value instead of the addend field. */
+ if (elf_header.e_machine == EM_SH)
+ return 0;
for (relsec = section_headers;
relsec < section_headers + elf_header.e_shnum;
@@ -7485,6 +7837,16 @@ debug_apply_rela_addends (void *file,
for (rp = rela; rp < rela + nrelas; ++rp)
{
unsigned char *loc;
+ unsigned int reloc_size;
+
+ reloc_size = get_reloc_size (rp);
+ if (reloc_size == 0)
+ {
+ warn (_("skipping relocation of unknown size against offset 0x%lx in section %s\n"),
+ (unsigned long) rp->r_offset,
+ SECTION_NAME (section));
+ continue;
+ }
loc = start + rp->r_offset;
if ((loc + reloc_size) > end)
@@ -7501,6 +7863,10 @@ debug_apply_rela_addends (void *file,
if (ELF32_R_SYM (rp->r_info) != 0
&& ELF32_ST_TYPE (sym->st_info) != STT_SECTION
+ /* Relocations against symbols without type can happen.
+ Gcc -feliminate-dwarf2-dups may generate symbols
+ without type for debug info. */
+ && ELF32_ST_TYPE (sym->st_info) != STT_NOTYPE
/* Relocations against object symbols can happen,
eg when referencing a global array. For an
example of this see the _clz.o binary in libgcc.a. */
@@ -7530,6 +7896,7 @@ debug_apply_rela_addends (void *file,
if (ELF64_R_SYM (rp->r_info) != 0
&& ELF64_ST_TYPE (sym->st_info) != STT_SECTION
+ && ELF64_ST_TYPE (sym->st_info) != STT_NOTYPE
&& ELF64_ST_TYPE (sym->st_info) != STT_OBJECT)
{
warn (_("skipping unexpected symbol type %s in relocation in section .rela.%s\n"),
@@ -7606,7 +7973,7 @@ display_debug_section (Elf_Internal_Shdr *section, FILE *file)
return 0;
}
- if (strneq (name, ".gnu.linkonce.wi.", 17))
+ if (const_strneq (name, ".gnu.linkonce.wi."))
name = ".debug_info";
/* See if we know how to display the contents of this section. */
@@ -7731,7 +8098,8 @@ static const char *arm_attr_tag_CPU_arch[] =
static const char *arm_attr_tag_ARM_ISA_use[] = {"No", "Yes"};
static const char *arm_attr_tag_THUMB_ISA_use[] =
{"No", "Thumb-1", "Thumb-2"};
-static const char *arm_attr_tag_VFP_arch[] = {"No", "VFPv1", "VFPv2"};
+/* FIXME: VFPv3 encoding was extrapolated! */
+static const char *arm_attr_tag_VFP_arch[] = {"No", "VFPv1", "VFPv2", "VFPv3"};
static const char *arm_attr_tag_WMMX_arch[] = {"No", "WMMXv1"};
static const char *arm_attr_tag_NEON_arch[] = {"No", "NEONv1"};
static const char *arm_attr_tag_ABI_PCS_config[] =
@@ -7929,8 +8297,166 @@ display_arm_attribute (unsigned char *p)
return p;
}
+
+static unsigned char *
+display_gnu_attribute (unsigned char *p,
+ unsigned char *(*display_proc_gnu_attribute)
+ (unsigned char *, int))
+{
+ int tag;
+ unsigned int len;
+ int val;
+ int type;
+
+ tag = read_uleb128 (p, &len);
+ p += len;
+
+ /* Tag_compatibility is the only generic GNU attribute defined at
+ present. */
+ if (tag == 32)
+ {
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf ("flag = %d, vendor = %s\n", val, p);
+ p += strlen((char *)p) + 1;
+ return p;
+ }
+
+ if ((tag & 2) == 0 && display_proc_gnu_attribute)
+ return display_proc_gnu_attribute (p, tag);
+
+ if (tag & 1)
+ type = 1; /* String. */
+ else
+ type = 2; /* uleb128. */
+ printf (" Tag_unknown_%d: ", tag);
+
+ if (type == 1)
+ {
+ printf ("\"%s\"\n", p);
+ p += strlen ((char *)p) + 1;
+ }
+ else
+ {
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf ("%d (0x%x)\n", val, val);
+ }
+
+ return p;
+}
+
+static unsigned char *
+display_power_gnu_attribute (unsigned char *p, int tag)
+{
+ int type;
+ unsigned int len;
+ int val;
+
+ if (tag == Tag_GNU_Power_ABI_FP)
+ {
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf (" Tag_GNU_Power_ABI_FP: ");
+ switch (val)
+ {
+ case 0:
+ printf ("Hard or soft float\n");
+ break;
+ case 1:
+ printf ("Hard float\n");
+ break;
+ case 2:
+ printf ("Soft float\n");
+ break;
+ default:
+ printf ("??? (%d)\n", val);
+ break;
+ }
+ return p;
+ }
+
+ if (tag & 1)
+ type = 1; /* String. */
+ else
+ type = 2; /* uleb128. */
+ printf (" Tag_unknown_%d: ", tag);
+
+ if (type == 1)
+ {
+ printf ("\"%s\"\n", p);
+ p += strlen ((char *)p) + 1;
+ }
+ else
+ {
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf ("%d (0x%x)\n", val, val);
+ }
+
+ return p;
+}
+
+static unsigned char *
+display_mips_gnu_attribute (unsigned char *p, int tag)
+{
+ int type;
+ unsigned int len;
+ int val;
+
+ if (tag == Tag_GNU_MIPS_ABI_FP)
+ {
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf (" Tag_GNU_MIPS_ABI_FP: ");
+ switch (val)
+ {
+ case 0:
+ printf ("Hard or soft float\n");
+ break;
+ case 1:
+ printf ("Hard float (-mdouble-float)\n");
+ break;
+ case 2:
+ printf ("Hard float (-msingle-float)\n");
+ break;
+ case 3:
+ printf ("Soft float\n");
+ break;
+ default:
+ printf ("??? (%d)\n", val);
+ break;
+ }
+ return p;
+ }
+
+ if (tag & 1)
+ type = 1; /* String. */
+ else
+ type = 2; /* uleb128. */
+ printf (" Tag_unknown_%d: ", tag);
+
+ if (type == 1)
+ {
+ printf ("\"%s\"\n", p);
+ p += strlen ((char *)p) + 1;
+ }
+ else
+ {
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf ("%d (0x%x)\n", val, val);
+ }
+
+ return p;
+}
+
static int
-process_arm_specific (FILE *file)
+process_attributes (FILE *file, const char *public_name,
+ unsigned int proc_type,
+ unsigned char *(*display_pub_attribute) (unsigned char *),
+ unsigned char *(*display_proc_gnu_attribute)
+ (unsigned char *, int))
{
Elf_Internal_Shdr *sect;
unsigned char *contents;
@@ -7945,7 +8471,7 @@ process_arm_specific (FILE *file)
i < elf_header.e_shnum;
i++, sect++)
{
- if (sect->sh_type != SHT_ARM_ATTRIBUTES)
+ if (sect->sh_type != proc_type && sect->sh_type != SHT_GNU_ATTRIBUTES)
continue;
contents = get_data (NULL, file, sect->sh_offset, 1, sect->sh_size,
@@ -7962,6 +8488,7 @@ process_arm_specific (FILE *file)
{
int namelen;
bfd_boolean public_section;
+ bfd_boolean gnu_section;
section_len = byte_get (p, 4);
p += 4;
@@ -7973,10 +8500,14 @@ process_arm_specific (FILE *file)
}
len -= section_len;
printf ("Attribute Section: %s\n", p);
- if (strcmp ((char *)p, "aeabi") == 0)
+ if (public_name && strcmp ((char *)p, public_name) == 0)
public_section = TRUE;
else
public_section = FALSE;
+ if (strcmp ((char *)p, "gnu") == 0)
+ gnu_section = TRUE;
+ else
+ gnu_section = FALSE;
namelen = strlen ((char *)p) + 1;
p += namelen;
section_len -= namelen + 4;
@@ -8025,7 +8556,13 @@ process_arm_specific (FILE *file)
if (public_section)
{
while (p < end)
- p = display_arm_attribute(p);
+ p = display_pub_attribute (p);
+ }
+ else if (gnu_section)
+ {
+ while (p < end)
+ p = display_gnu_attribute (p,
+ display_proc_gnu_attribute);
}
else
{
@@ -8047,6 +8584,20 @@ process_arm_specific (FILE *file)
}
static int
+process_arm_specific (FILE *file)
+{
+ return process_attributes (file, "aeabi", SHT_ARM_ATTRIBUTES,
+ display_arm_attribute, NULL);
+}
+
+static int
+process_power_specific (FILE *file)
+{
+ return process_attributes (file, NULL, SHT_GNU_ATTRIBUTES, NULL,
+ display_power_gnu_attribute);
+}
+
+static int
process_mips_specific (FILE *file)
{
Elf_Internal_Dyn *entry;
@@ -8056,6 +8607,9 @@ process_mips_specific (FILE *file)
size_t options_offset = 0;
size_t conflicts_offset = 0;
+ process_attributes (file, NULL, SHT_GNU_ATTRIBUTES, NULL,
+ display_mips_gnu_attribute);
+
/* We have a lot of special sections. Thanks SGI! */
if (dynamic_section == NULL)
/* No information available. */
@@ -8189,7 +8743,7 @@ process_mips_specific (FILE *file)
iopt = cmalloc ((sect->sh_size / sizeof (eopt)), sizeof (*iopt));
if (iopt == NULL)
{
- error (_("Out of memory"));
+ error (_("Out of memory\n"));
return 0;
}
@@ -8374,14 +8928,14 @@ process_mips_specific (FILE *file)
if (dynamic_symbols == NULL)
{
- error (_("conflict list found without a dynamic symbol table"));
+ error (_("conflict list found without a dynamic symbol table\n"));
return 0;
}
iconf = cmalloc (conflictsno, sizeof (*iconf));
if (iconf == NULL)
{
- error (_("Out of memory"));
+ error (_("Out of memory\n"));
return 0;
}
@@ -8650,7 +9204,7 @@ process_note (Elf_Internal_Note *pnote)
note type strings. */
nt = get_note_type (pnote->type);
- else if (strneq (pnote->namedata, "NetBSD-CORE", 11))
+ else if (const_strneq (pnote->namedata, "NetBSD-CORE"))
/* NetBSD-specific core file notes. */
nt = get_netbsd_elfcore_note_type (pnote->type);
@@ -8821,6 +9375,9 @@ process_arch_specific (FILE *file)
case EM_MIPS_RS3_LE:
return process_mips_specific (file);
break;
+ case EM_PPC:
+ return process_power_specific (file);
+ break;
default:
break;
}
@@ -9098,7 +9655,7 @@ process_archive (char *file_name, FILE *file)
return 1;
}
- if (memcmp (arhdr.ar_name, "/ ", 16) == 0)
+ if (const_strneq (arhdr.ar_name, "/ "))
{
/* This is the archive symbol table. Skip it.
FIXME: We should have an option to dump it. */
@@ -9120,7 +9677,7 @@ process_archive (char *file_name, FILE *file)
}
}
- if (memcmp (arhdr.ar_name, "// ", 16) == 0)
+ if (const_strneq (arhdr.ar_name, "// "))
{
/* This is the archive string table holding long member
names. */
@@ -9338,7 +9895,7 @@ main (int argc, char **argv)
/* Make a copy of the dump_sects array. */
cmdline_dump_sects = malloc (num_dump_sects);
if (cmdline_dump_sects == NULL)
- error (_("Out of memory allocating dump request table."));
+ error (_("Out of memory allocating dump request table.\n"));
else
{
memcpy (cmdline_dump_sects, dump_sects, num_dump_sects);
diff --git a/contrib/binutils/binutils/rename.c b/contrib/binutils/binutils/rename.c
index 7d21cb3..25329d1 100644
--- a/contrib/binutils/binutils/rename.c
+++ b/contrib/binutils/binutils/rename.c
@@ -1,5 +1,5 @@
/* rename.c -- rename a file, preserving symlinks.
- Copyright 1999, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2002, 2003, 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -18,6 +18,7 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
diff --git a/contrib/binutils/binutils/resbin.c b/contrib/binutils/binutils/resbin.c
index 80c2596..7c8f501 100644
--- a/contrib/binutils/binutils/resbin.c
+++ b/contrib/binutils/binutils/resbin.c
@@ -1,7 +1,8 @@
/* resbin.c -- manipulate the Windows binary resource format.
- Copyright 1997, 1998, 1999, 2002, 2003
+ Copyright 1997, 1998, 1999, 2002, 2003, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
+ Rewritten by Kai Tietz, Onevision.
This file is part of GNU Binutils.
@@ -24,102 +25,88 @@
format and the internal structures that we want to use. The same
binary resource format is used in both res and COFF files. */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
#include "windres.h"
-/* Macros to swap in values. */
-
-#define get_8(s) (*((unsigned char *)(s)))
-#define get_16(be, s) ((be) ? bfd_getb16 (s) : bfd_getl16 (s))
-#define get_32(be, s) ((be) ? bfd_getb32 (s) : bfd_getl32 (s))
-
/* Local functions. */
static void toosmall (const char *);
-static unichar *get_unicode
- (const unsigned char *, unsigned long, int, int *);
-static int get_resid
- (struct res_id *, const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_generic
- (enum res_type, const unsigned char *, unsigned long);
-static struct res_resource *bin_to_res_cursor
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_menu
- (const unsigned char *, unsigned long, int);
-static struct menuitem *bin_to_res_menuitems
- (const unsigned char *, unsigned long, int, int *);
-static struct menuitem *bin_to_res_menuexitems
- (const unsigned char *, unsigned long, int, int *);
-static struct res_resource *bin_to_res_dialog
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_string
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_fontdir
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_accelerators
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_rcdata
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_group_cursor
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_group_icon
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_version
- (const unsigned char *, unsigned long, int);
-static struct res_resource *bin_to_res_userdata
- (const unsigned char *, unsigned long, int);
-static void get_version_header
- (const unsigned char *, unsigned long, int, const char *,
- unichar **, int *, int *, int *, int *);
+static unichar *get_unicode (windres_bfd *, const bfd_byte *, rc_uint_type, rc_uint_type *);
+static int get_resid (windres_bfd *, rc_res_id *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_generic (windres_bfd *, enum rc_res_type,
+ const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_cursor (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_menu (windres_bfd *,const bfd_byte *, rc_uint_type);
+static rc_menuitem *bin_to_res_menuitems (windres_bfd *, const bfd_byte *, rc_uint_type,
+ rc_uint_type *);
+static rc_menuitem *bin_to_res_menuexitems (windres_bfd *, const bfd_byte *, rc_uint_type,
+ rc_uint_type *);
+static rc_res_resource *bin_to_res_dialog (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_string (windres_bfd *,const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_fontdir (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_accelerators (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_rcdata (windres_bfd *, const bfd_byte *, rc_uint_type, int);
+static rc_res_resource *bin_to_res_group_cursor (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_group_icon (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_version (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_userdata (windres_bfd *, const bfd_byte *, rc_uint_type);
+static rc_res_resource *bin_to_res_toolbar (windres_bfd *, const bfd_byte *, rc_uint_type);
+static void get_version_header (windres_bfd *, const bfd_byte *, rc_uint_type, const char *,
+ unichar **, rc_uint_type *, rc_uint_type *, rc_uint_type *,
+ rc_uint_type *);
/* Given a resource type ID, a pointer to data, a length, return a
- res_resource structure which represents that resource. The caller
+ rc_res_resource structure which represents that resource. The caller
is responsible for initializing the res_info and coff_info fields
of the returned structure. */
-struct res_resource *
-bin_to_res (struct res_id type, const unsigned char *data,
- unsigned long length, int big_endian)
+rc_res_resource *
+bin_to_res (windres_bfd *wrbfd, rc_res_id type, const bfd_byte *data,
+ rc_uint_type length)
{
if (type.named)
- return bin_to_res_userdata (data, length, big_endian);
+ return bin_to_res_userdata (wrbfd, data, length);
else
{
switch (type.u.id)
{
default:
- return bin_to_res_userdata (data, length, big_endian);
+ return bin_to_res_userdata (wrbfd, data, length);
case RT_CURSOR:
- return bin_to_res_cursor (data, length, big_endian);
+ return bin_to_res_cursor (wrbfd, data, length);
case RT_BITMAP:
- return bin_to_res_generic (RES_TYPE_BITMAP, data, length);
+ return bin_to_res_generic (wrbfd, RES_TYPE_BITMAP, data, length);
case RT_ICON:
- return bin_to_res_generic (RES_TYPE_ICON, data, length);
+ return bin_to_res_generic (wrbfd, RES_TYPE_ICON, data, length);
case RT_MENU:
- return bin_to_res_menu (data, length, big_endian);
+ return bin_to_res_menu (wrbfd, data, length);
case RT_DIALOG:
- return bin_to_res_dialog (data, length, big_endian);
+ return bin_to_res_dialog (wrbfd, data, length);
case RT_STRING:
- return bin_to_res_string (data, length, big_endian);
+ return bin_to_res_string (wrbfd, data, length);
case RT_FONTDIR:
- return bin_to_res_fontdir (data, length, big_endian);
+ return bin_to_res_fontdir (wrbfd, data, length);
case RT_FONT:
- return bin_to_res_generic (RES_TYPE_FONT, data, length);
+ return bin_to_res_generic (wrbfd, RES_TYPE_FONT, data, length);
case RT_ACCELERATOR:
- return bin_to_res_accelerators (data, length, big_endian);
+ return bin_to_res_accelerators (wrbfd, data, length);
case RT_RCDATA:
- return bin_to_res_rcdata (data, length, big_endian);
+ return bin_to_res_rcdata (wrbfd, data, length, RES_TYPE_RCDATA);
case RT_MESSAGETABLE:
- return bin_to_res_generic (RES_TYPE_MESSAGETABLE, data, length);
+ return bin_to_res_generic (wrbfd, RES_TYPE_MESSAGETABLE, data, length);
case RT_GROUP_CURSOR:
- return bin_to_res_group_cursor (data, length, big_endian);
+ return bin_to_res_group_cursor (wrbfd, data, length);
case RT_GROUP_ICON:
- return bin_to_res_group_icon (data, length, big_endian);
+ return bin_to_res_group_icon (wrbfd, data, length);
case RT_VERSION:
- return bin_to_res_version (data, length, big_endian);
+ return bin_to_res_version (wrbfd, data, length);
+ case RT_TOOLBAR:
+ return bin_to_res_toolbar (wrbfd, data, length);
+
}
}
}
@@ -135,18 +122,18 @@ toosmall (const char *msg)
/* Swap in a NULL terminated unicode string. */
static unichar *
-get_unicode (const unsigned char *data, unsigned long length,
- int big_endian, int *retlen)
+get_unicode (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length,
+ rc_uint_type *retlen)
{
- int c, i;
+ rc_uint_type c, i;
unichar *ret;
c = 0;
while (1)
{
- if (length < (unsigned long) c * 2 + 2)
+ if (length < c * 2 + 2)
toosmall (_("null terminated unicode string"));
- if (get_16 (big_endian, data + c * 2) == 0)
+ if (windres_get_16 (wrbfd, data + c * 2, 2) == 0)
break;
++c;
}
@@ -154,7 +141,7 @@ get_unicode (const unsigned char *data, unsigned long length,
ret = (unichar *) res_alloc ((c + 1) * sizeof (unichar));
for (i = 0; i < c; i++)
- ret[i] = get_16 (big_endian, data + i * 2);
+ ret[i] = windres_get_16 (wrbfd, data + i * 2, 2);
ret[i] = 0;
if (retlen != NULL)
@@ -166,27 +153,27 @@ get_unicode (const unsigned char *data, unsigned long length,
/* Get a resource identifier. This returns the number of bytes used. */
static int
-get_resid (struct res_id *id, const unsigned char *data,
- unsigned long length, int big_endian)
+get_resid (windres_bfd *wrbfd, rc_res_id *id, const bfd_byte *data,
+ rc_uint_type length)
{
- int first;
+ rc_uint_type first;
if (length < 2)
toosmall (_("resource ID"));
- first = get_16 (big_endian, data);
+ first = windres_get_16 (wrbfd, data, 2);
if (first == 0xffff)
{
if (length < 4)
toosmall (_("resource ID"));
id->named = 0;
- id->u.id = get_16 (big_endian, data + 2);
+ id->u.id = windres_get_16 (wrbfd, data + 2, 2);
return 4;
}
else
{
id->named = 1;
- id->u.n.name = get_unicode (data, length, big_endian, &id->u.n.length);
+ id->u.n.name = get_unicode (wrbfd, data, length, &id->u.n.length);
return id->u.n.length * 2 + 2;
}
}
@@ -194,13 +181,13 @@ get_resid (struct res_id *id, const unsigned char *data,
/* Convert a resource which just stores uninterpreted data from
binary. */
-struct res_resource *
-bin_to_res_generic (enum res_type type, const unsigned char *data,
- unsigned long length)
+rc_res_resource *
+bin_to_res_generic (windres_bfd *wrbfd ATTRIBUTE_UNUSED, enum rc_res_type type,
+ const bfd_byte *data, rc_uint_type length)
{
- struct res_resource *r;
+ rc_res_resource *r;
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof (rc_res_resource));
r->type = type;
r->u.data.data = data;
r->u.data.length = length;
@@ -210,23 +197,22 @@ bin_to_res_generic (enum res_type type, const unsigned char *data,
/* Convert a cursor resource from binary. */
-struct res_resource *
-bin_to_res_cursor (const unsigned char *data, unsigned long length,
- int big_endian)
+rc_res_resource *
+bin_to_res_cursor (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
- struct cursor *c;
- struct res_resource *r;
+ rc_cursor *c;
+ rc_res_resource *r;
if (length < 4)
toosmall (_("cursor"));
- c = (struct cursor *) res_alloc (sizeof *c);
- c->xhotspot = get_16 (big_endian, data);
- c->yhotspot = get_16 (big_endian, data + 2);
+ c = (rc_cursor *) res_alloc (sizeof (rc_cursor));
+ c->xhotspot = windres_get_16 (wrbfd, data, 2);
+ c->yhotspot = windres_get_16 (wrbfd, data + 2, 2);
c->length = length - 4;
c->data = data + 4;
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof *r);
r->type = RES_TYPE_CURSOR;
r->u.cursor = c;
@@ -235,61 +221,57 @@ bin_to_res_cursor (const unsigned char *data, unsigned long length,
/* Convert a menu resource from binary. */
-struct res_resource *
-bin_to_res_menu (const unsigned char *data, unsigned long length,
- int big_endian)
+rc_res_resource *
+bin_to_res_menu (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
- struct res_resource *r;
- struct menu *m;
- int version, read;
+ rc_res_resource *r;
+ rc_menu *m;
+ rc_uint_type version, read;
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof *r);
r->type = RES_TYPE_MENU;
- m = (struct menu *) res_alloc (sizeof *m);
+ m = (rc_menu *) res_alloc (sizeof (rc_menu));
r->u.menu = m;
if (length < 2)
toosmall (_("menu header"));
- version = get_16 (big_endian, data);
+ version = windres_get_16 (wrbfd, data, 2);
if (version == 0)
{
if (length < 4)
toosmall (_("menu header"));
m->help = 0;
- m->items = bin_to_res_menuitems (data + 4, length - 4, big_endian,
- &read);
+ m->items = bin_to_res_menuitems (wrbfd, data + 4, length - 4, &read);
}
else if (version == 1)
{
- unsigned int offset;
+ rc_uint_type offset;
if (length < 8)
toosmall (_("menuex header"));
- m->help = get_32 (big_endian, data + 4);
- offset = get_16 (big_endian, data + 2);
+ m->help = windres_get_32 (wrbfd, data + 4, 4);
+ offset = windres_get_16 (wrbfd, data + 2, 2);
if (offset + 4 >= length)
toosmall (_("menuex offset"));
- m->items = bin_to_res_menuexitems (data + 4 + offset,
- length - (4 + offset),
- big_endian,
- &read);
+ m->items = bin_to_res_menuexitems (wrbfd, data + 4 + offset,
+ length - (4 + offset), &read);
}
else
- fatal (_("unsupported menu version %d"), version);
+ fatal (_("unsupported menu version %d"), (int) version);
return r;
}
/* Convert menu items from binary. */
-static struct menuitem *
-bin_to_res_menuitems (const unsigned char *data, unsigned long length,
- int big_endian, int *read)
+static rc_menuitem *
+bin_to_res_menuitems (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length,
+ rc_uint_type *read)
{
- struct menuitem *first, **pp;
+ rc_menuitem *first, **pp;
first = NULL;
pp = &first;
@@ -298,18 +280,18 @@ bin_to_res_menuitems (const unsigned char *data, unsigned long length,
while (length > 0)
{
- int flags, slen, itemlen;
- unsigned int stroff;
- struct menuitem *mi;
+ rc_uint_type flags, slen, itemlen;
+ rc_uint_type stroff;
+ rc_menuitem *mi;
if (length < 4)
toosmall (_("menuitem header"));
- mi = (struct menuitem *) res_alloc (sizeof *mi);
+ mi = (rc_menuitem *) res_alloc (sizeof *mi);
mi->state = 0;
mi->help = 0;
- flags = get_16 (big_endian, data);
+ flags = windres_get_16 (wrbfd, data, 2);
mi->type = flags &~ (MENUITEM_POPUP | MENUITEM_ENDMENU);
if ((flags & MENUITEM_POPUP) == 0)
@@ -320,29 +302,28 @@ bin_to_res_menuitems (const unsigned char *data, unsigned long length,
if (length < stroff + 2)
toosmall (_("menuitem header"));
- if (get_16 (big_endian, data + stroff) == 0)
+ if (windres_get_16 (wrbfd, data + stroff, 2) == 0)
{
slen = 0;
mi->text = NULL;
}
else
- mi->text = get_unicode (data + stroff, length - stroff, big_endian,
- &slen);
+ mi->text = get_unicode (wrbfd, data + stroff, length - stroff, &slen);
itemlen = stroff + slen * 2 + 2;
if ((flags & MENUITEM_POPUP) == 0)
{
mi->popup = NULL;
- mi->id = get_16 (big_endian, data + 2);
+ mi->id = windres_get_16 (wrbfd, data + 2, 2);
}
else
{
- int subread;
+ rc_uint_type subread;
mi->id = 0;
- mi->popup = bin_to_res_menuitems (data + itemlen, length - itemlen,
- big_endian, &subread);
+ mi->popup = bin_to_res_menuitems (wrbfd, data + itemlen, length - itemlen,
+ &subread);
itemlen += subread;
}
@@ -363,11 +344,11 @@ bin_to_res_menuitems (const unsigned char *data, unsigned long length,
/* Convert menuex items from binary. */
-static struct menuitem *
-bin_to_res_menuexitems (const unsigned char *data, unsigned long length,
- int big_endian, int *read)
+static rc_menuitem *
+bin_to_res_menuexitems (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length,
+ rc_uint_type *read)
{
- struct menuitem *first, **pp;
+ rc_menuitem *first, **pp;
first = NULL;
pp = &first;
@@ -376,29 +357,29 @@ bin_to_res_menuexitems (const unsigned char *data, unsigned long length,
while (length > 0)
{
- int flags, slen;
- unsigned int itemlen;
- struct menuitem *mi;
+ rc_uint_type flags, slen;
+ rc_uint_type itemlen;
+ rc_menuitem *mi;
- if (length < 14)
+ if (length < 16)
toosmall (_("menuitem header"));
- mi = (struct menuitem *) res_alloc (sizeof *mi);
- mi->type = get_32 (big_endian, data);
- mi->state = get_32 (big_endian, data + 4);
- mi->id = get_16 (big_endian, data + 8);
+ mi = (rc_menuitem *) res_alloc (sizeof (rc_menuitem));
+ mi->type = windres_get_32 (wrbfd, data, 4);
+ mi->state = windres_get_32 (wrbfd, data + 4, 4);
+ mi->id = windres_get_32 (wrbfd, data + 8, 4);
- flags = get_16 (big_endian, data + 10);
+ flags = windres_get_16 (wrbfd, data + 12, 2);
- if (get_16 (big_endian, data + 12) == 0)
+ if (windres_get_16 (wrbfd, data + 14, 2) == 0)
{
slen = 0;
mi->text = NULL;
}
else
- mi->text = get_unicode (data + 12, length - 12, big_endian, &slen);
+ mi->text = get_unicode (wrbfd, data + 14, length - 14, &slen);
- itemlen = 12 + slen * 2 + 2;
+ itemlen = 14 + slen * 2 + 2;
itemlen = (itemlen + 3) &~ 3;
if ((flags & 1) == 0)
@@ -408,16 +389,15 @@ bin_to_res_menuexitems (const unsigned char *data, unsigned long length,
}
else
{
- int subread;
+ rc_uint_type subread;
if (length < itemlen + 4)
toosmall (_("menuitem"));
- mi->help = get_32 (big_endian, data + itemlen);
+ mi->help = windres_get_32 (wrbfd, data + itemlen, 4);
itemlen += 4;
- mi->popup = bin_to_res_menuexitems (data + itemlen,
- length - itemlen,
- big_endian, &subread);
+ mi->popup = bin_to_res_menuexitems (wrbfd, data + itemlen,
+ length - itemlen, &subread);
itemlen += subread;
}
@@ -438,63 +418,62 @@ bin_to_res_menuexitems (const unsigned char *data, unsigned long length,
/* Convert a dialog resource from binary. */
-static struct res_resource *
-bin_to_res_dialog (const unsigned char *data, unsigned long length,
- int big_endian)
+static rc_res_resource *
+bin_to_res_dialog (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
- int signature;
- struct dialog *d;
- int c, sublen, i;
- unsigned int off;
- struct dialog_control **pp;
- struct res_resource *r;
+ rc_uint_type signature;
+ rc_dialog *d;
+ rc_uint_type c, sublen, i;
+ rc_uint_type off;
+ rc_dialog_control **pp;
+ rc_res_resource *r;
if (length < 18)
toosmall (_("dialog header"));
- d = (struct dialog *) res_alloc (sizeof *d);
+ d = (rc_dialog *) res_alloc (sizeof (rc_dialog));
- signature = get_16 (big_endian, data + 2);
+ signature = windres_get_16 (wrbfd, data + 2, 2);
if (signature != 0xffff)
{
d->ex = NULL;
- d->style = get_32 (big_endian, data);
- d->exstyle = get_32 (big_endian, data + 4);
+ d->style = windres_get_32 (wrbfd, data, 4);
+ d->exstyle = windres_get_32 (wrbfd, data + 4, 4);
off = 8;
}
else
{
int version;
- version = get_16 (big_endian, data);
+ version = windres_get_16 (wrbfd, data, 2);
if (version != 1)
fatal (_("unexpected DIALOGEX version %d"), version);
- d->ex = (struct dialog_ex *) res_alloc (sizeof (struct dialog_ex));
- d->ex->help = get_32 (big_endian, data + 4);
- d->exstyle = get_32 (big_endian, data + 8);
- d->style = get_32 (big_endian, data + 12);
+ d->ex = (rc_dialog_ex *) res_alloc (sizeof (rc_dialog_ex));
+ d->ex->help = windres_get_32 (wrbfd, data + 4, 4);
+ d->exstyle = windres_get_32 (wrbfd, data + 8, 4);
+ d->style = windres_get_32 (wrbfd, data + 12, 4);
off = 16;
}
if (length < off + 10)
toosmall (_("dialog header"));
- c = get_16 (big_endian, data + off);
- d->x = get_16 (big_endian, data + off + 2);
- d->y = get_16 (big_endian, data + off + 4);
- d->width = get_16 (big_endian, data + off + 6);
- d->height = get_16 (big_endian, data + off + 8);
+ c = windres_get_16 (wrbfd, data + off, 2);
+ d->x = windres_get_16 (wrbfd, data + off + 2, 2);
+ d->y = windres_get_16 (wrbfd, data + off + 4, 2);
+ d->width = windres_get_16 (wrbfd, data + off + 6, 2);
+ d->height = windres_get_16 (wrbfd, data + off + 8, 2);
off += 10;
- sublen = get_resid (&d->menu, data + off, length - off, big_endian);
+ sublen = get_resid (wrbfd, &d->menu, data + off, length - off);
off += sublen;
- sublen = get_resid (&d->class, data + off, length - off, big_endian);
+ sublen = get_resid (wrbfd, &d->class, data + off, length - off);
off += sublen;
- d->caption = get_unicode (data + off, length - off, big_endian, &sublen);
+ d->caption = get_unicode (wrbfd, data + off, length - off, &sublen);
off += sublen * 2 + 2;
if (sublen == 0)
d->caption = NULL;
@@ -515,20 +494,20 @@ bin_to_res_dialog (const unsigned char *data, unsigned long length,
if (length < off + 2)
toosmall (_("dialog font point size"));
- d->pointsize = get_16 (big_endian, data + off);
+ d->pointsize = windres_get_16 (wrbfd, data + off, 2);
off += 2;
if (d->ex != NULL)
{
if (length < off + 4)
toosmall (_("dialogex font information"));
- d->ex->weight = get_16 (big_endian, data + off);
- d->ex->italic = get_8 (data + off + 2);
- d->ex->charset = get_8 (data + off + 3);
+ d->ex->weight = windres_get_16 (wrbfd, data + off, 2);
+ d->ex->italic = windres_get_8 (wrbfd, data + off + 2, 1);
+ d->ex->charset = windres_get_8 (wrbfd, data + off + 3, 1);
off += 4;
}
- d->font = get_unicode (data + off, length - off, big_endian, &sublen);
+ d->font = get_unicode (wrbfd, data + off, length - off, &sublen);
off += sublen * 2 + 2;
}
@@ -537,20 +516,20 @@ bin_to_res_dialog (const unsigned char *data, unsigned long length,
for (i = 0; i < c; i++)
{
- struct dialog_control *dc;
+ rc_dialog_control *dc;
int datalen;
off = (off + 3) &~ 3;
- dc = (struct dialog_control *) res_alloc (sizeof *dc);
+ dc = (rc_dialog_control *) res_alloc (sizeof (rc_dialog_control));
if (d->ex == NULL)
{
if (length < off + 8)
toosmall (_("dialog control"));
- dc->style = get_32 (big_endian, data + off);
- dc->exstyle = get_32 (big_endian, data + off + 4);
+ dc->style = windres_get_32 (wrbfd, data + off, 4);
+ dc->exstyle = windres_get_32 (wrbfd, data + off + 4, 4);
dc->help = 0;
off += 8;
}
@@ -558,37 +537,37 @@ bin_to_res_dialog (const unsigned char *data, unsigned long length,
{
if (length < off + 12)
toosmall (_("dialogex control"));
- dc->help = get_32 (big_endian, data + off);
- dc->exstyle = get_32 (big_endian, data + off + 4);
- dc->style = get_32 (big_endian, data + off + 8);
+ dc->help = windres_get_32 (wrbfd, data + off, 4);
+ dc->exstyle = windres_get_32 (wrbfd, data + off + 4, 4);
+ dc->style = windres_get_32 (wrbfd, data + off + 8, 4);
off += 12;
}
- if (length < off + 10)
+ if (length < off + (d->ex != NULL ? 2 : 0) + 10)
toosmall (_("dialog control"));
- dc->x = get_16 (big_endian, data + off);
- dc->y = get_16 (big_endian, data + off + 2);
- dc->width = get_16 (big_endian, data + off + 4);
- dc->height = get_16 (big_endian, data + off + 6);
+ dc->x = windres_get_16 (wrbfd, data + off, 2);
+ dc->y = windres_get_16 (wrbfd, data + off + 2, 2);
+ dc->width = windres_get_16 (wrbfd, data + off + 4, 2);
+ dc->height = windres_get_16 (wrbfd, data + off + 6, 2);
if (d->ex != NULL)
- dc->id = get_32 (big_endian, data + off + 8);
+ dc->id = windres_get_32 (wrbfd, data + off + 8, 4);
else
- dc->id = get_16 (big_endian, data + off + 8);
+ dc->id = windres_get_16 (wrbfd, data + off + 8, 2);
off += 10 + (d->ex != NULL ? 2 : 0);
- sublen = get_resid (&dc->class, data + off, length - off, big_endian);
+ sublen = get_resid (wrbfd, &dc->class, data + off, length - off);
off += sublen;
- sublen = get_resid (&dc->text, data + off, length - off, big_endian);
+ sublen = get_resid (wrbfd, &dc->text, data + off, length - off);
off += sublen;
if (length < off + 2)
toosmall (_("dialog control end"));
- datalen = get_16 (big_endian, data + off);
+ datalen = windres_get_16 (wrbfd, data + off, 2);
off += 2;
if (datalen == 0)
@@ -600,8 +579,8 @@ bin_to_res_dialog (const unsigned char *data, unsigned long length,
if (length < off + datalen)
toosmall (_("dialog control data"));
- dc->data = ((struct rcdata_item *)
- res_alloc (sizeof (struct rcdata_item)));
+ dc->data = ((rc_rcdata_item *)
+ res_alloc (sizeof (rc_rcdata_item)));
dc->data->next = NULL;
dc->data->type = RCDATA_BUFFER;
dc->data->u.buffer.length = datalen;
@@ -615,7 +594,7 @@ bin_to_res_dialog (const unsigned char *data, unsigned long length,
pp = &dc->next;
}
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof *r);
r->type = RES_TYPE_DIALOG;
r->u.dialog = d;
@@ -624,15 +603,14 @@ bin_to_res_dialog (const unsigned char *data, unsigned long length,
/* Convert a stringtable resource from binary. */
-static struct res_resource *
-bin_to_res_string (const unsigned char *data, unsigned long length,
- int big_endian)
+static rc_res_resource *
+bin_to_res_string (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
- struct stringtable *st;
+ rc_stringtable *st;
int i;
- struct res_resource *r;
+ rc_res_resource *r;
- st = (struct stringtable *) res_alloc (sizeof *st);
+ st = (rc_stringtable *) res_alloc (sizeof (rc_stringtable));
for (i = 0; i < 16; i++)
{
@@ -640,7 +618,7 @@ bin_to_res_string (const unsigned char *data, unsigned long length,
if (length < 2)
toosmall (_("stringtable string length"));
- slen = get_16 (big_endian, data);
+ slen = windres_get_16 (wrbfd, data, 2);
st->strings[i].length = slen;
if (slen > 0)
@@ -655,14 +633,14 @@ bin_to_res_string (const unsigned char *data, unsigned long length,
st->strings[i].string = s;
for (j = 0; j < slen; j++)
- s[j] = get_16 (big_endian, data + 2 + j * 2);
+ s[j] = windres_get_16 (wrbfd, data + 2 + j * 2, 2);
}
data += 2 + 2 * slen;
length -= 2 + 2 * slen;
}
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof *r);
r->type = RES_TYPE_STRINGTABLE;
r->u.stringtable = st;
@@ -671,36 +649,37 @@ bin_to_res_string (const unsigned char *data, unsigned long length,
/* Convert a fontdir resource from binary. */
-static struct res_resource *
-bin_to_res_fontdir (const unsigned char *data, unsigned long length,
- int big_endian)
+static rc_res_resource *
+bin_to_res_fontdir (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
- int c, i;
- struct fontdir *first, **pp;
- struct res_resource *r;
+ rc_uint_type c, i;
+ rc_fontdir *first, **pp;
+ rc_res_resource *r;
if (length < 2)
toosmall (_("fontdir header"));
- c = get_16 (big_endian, data);
+ c = windres_get_16 (wrbfd, data, 2);
first = NULL;
pp = &first;
for (i = 0; i < c; i++)
{
- struct fontdir *fd;
+ const struct bin_fontdir_item *bfi;
+ rc_fontdir *fd;
unsigned int off;
if (length < 56)
toosmall (_("fontdir"));
- fd = (struct fontdir *) res_alloc (sizeof *fd);
- fd->index = get_16 (big_endian, data);
+ bfi = (const struct bin_fontdir_item *) data;
+ fd = (rc_fontdir *) res_alloc (sizeof *fd);
+ fd->index = windres_get_16 (wrbfd, bfi->index, 2);
/* To work out the length of the fontdir data, we must get the
length of the device name and face name strings, even though
- we don't store them in the fontdir structure. The
+ we don't store them in the rc_fontdir. The
documentation says that these are NULL terminated char
strings, not Unicode strings. */
@@ -732,7 +711,7 @@ bin_to_res_fontdir (const unsigned char *data, unsigned long length,
length -= off;
}
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof *r);
r->type = RES_TYPE_FONTDIR;
r->u.fontdir = first;
@@ -741,28 +720,27 @@ bin_to_res_fontdir (const unsigned char *data, unsigned long length,
/* Convert an accelerators resource from binary. */
-static struct res_resource *
-bin_to_res_accelerators (const unsigned char *data, unsigned long length,
- int big_endian)
+static rc_res_resource *
+bin_to_res_accelerators (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
- struct accelerator *first, **pp;
- struct res_resource *r;
+ rc_accelerator *first, **pp;
+ rc_res_resource *r;
first = NULL;
pp = &first;
while (1)
{
- struct accelerator *a;
+ rc_accelerator *a;
if (length < 8)
toosmall (_("accelerator"));
- a = (struct accelerator *) res_alloc (sizeof *a);
+ a = (rc_accelerator *) res_alloc (sizeof (rc_accelerator));
- a->flags = get_16 (big_endian, data);
- a->key = get_16 (big_endian, data + 2);
- a->id = get_16 (big_endian, data + 4);
+ a->flags = windres_get_16 (wrbfd, data, 2);
+ a->key = windres_get_16 (wrbfd, data + 2, 2);
+ a->id = windres_get_16 (wrbfd, data + 4, 2);
a->next = NULL;
*pp = a;
@@ -775,7 +753,7 @@ bin_to_res_accelerators (const unsigned char *data, unsigned long length,
length -= 8;
}
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof (rc_res_resource));
r->type = RES_TYPE_ACCELERATOR;
r->u.acc = first;
@@ -784,22 +762,22 @@ bin_to_res_accelerators (const unsigned char *data, unsigned long length,
/* Convert an rcdata resource from binary. */
-static struct res_resource *
-bin_to_res_rcdata (const unsigned char *data, unsigned long length,
- int big_endian ATTRIBUTE_UNUSED)
+static rc_res_resource *
+bin_to_res_rcdata (windres_bfd *wrbfd ATTRIBUTE_UNUSED, const bfd_byte *data,
+ rc_uint_type length, int rctyp)
{
- struct rcdata_item *ri;
- struct res_resource *r;
+ rc_rcdata_item *ri;
+ rc_res_resource *r;
- ri = (struct rcdata_item *) res_alloc (sizeof *ri);
+ ri = (rc_rcdata_item *) res_alloc (sizeof (rc_rcdata_item));
ri->next = NULL;
ri->type = RCDATA_BUFFER;
ri->u.buffer.length = length;
ri->u.buffer.data = data;
- r = (struct res_resource *) res_alloc (sizeof *r);
- r->type = RES_TYPE_RCDATA;
+ r = (rc_res_resource *) res_alloc (sizeof *r);
+ r->type = rctyp;
r->u.rcdata = ri;
return r;
@@ -807,22 +785,21 @@ bin_to_res_rcdata (const unsigned char *data, unsigned long length,
/* Convert a group cursor resource from binary. */
-static struct res_resource *
-bin_to_res_group_cursor (const unsigned char *data, unsigned long length,
- int big_endian)
+static rc_res_resource *
+bin_to_res_group_cursor (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
int type, c, i;
- struct group_cursor *first, **pp;
- struct res_resource *r;
+ rc_group_cursor *first, **pp;
+ rc_res_resource *r;
if (length < 6)
toosmall (_("group cursor header"));
- type = get_16 (big_endian, data + 2);
+ type = windres_get_16 (wrbfd, data + 2, 2);
if (type != 2)
fatal (_("unexpected group cursor type %d"), type);
- c = get_16 (big_endian, data + 4);
+ c = windres_get_16 (wrbfd, data + 4, 2);
data += 6;
length -= 6;
@@ -832,19 +809,19 @@ bin_to_res_group_cursor (const unsigned char *data, unsigned long length,
for (i = 0; i < c; i++)
{
- struct group_cursor *gc;
+ rc_group_cursor *gc;
if (length < 14)
toosmall (_("group cursor"));
- gc = (struct group_cursor *) res_alloc (sizeof *gc);
+ gc = (rc_group_cursor *) res_alloc (sizeof *gc);
- gc->width = get_16 (big_endian, data);
- gc->height = get_16 (big_endian, data + 2);
- gc->planes = get_16 (big_endian, data + 4);
- gc->bits = get_16 (big_endian, data + 6);
- gc->bytes = get_32 (big_endian, data + 8);
- gc->index = get_16 (big_endian, data + 12);
+ gc->width = windres_get_16 (wrbfd, data, 2);
+ gc->height = windres_get_16 (wrbfd, data + 2, 2);
+ gc->planes = windres_get_16 (wrbfd, data + 4, 2);
+ gc->bits = windres_get_16 (wrbfd, data + 6, 2);
+ gc->bytes = windres_get_32 (wrbfd, data + 8, 4);
+ gc->index = windres_get_16 (wrbfd, data + 12, 2);
gc->next = NULL;
*pp = gc;
@@ -854,7 +831,7 @@ bin_to_res_group_cursor (const unsigned char *data, unsigned long length,
length -= 14;
}
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof (rc_res_resource));
r->type = RES_TYPE_GROUP_CURSOR;
r->u.group_cursor = first;
@@ -863,22 +840,21 @@ bin_to_res_group_cursor (const unsigned char *data, unsigned long length,
/* Convert a group icon resource from binary. */
-static struct res_resource *
-bin_to_res_group_icon (const unsigned char *data, unsigned long length,
- int big_endian)
+static rc_res_resource *
+bin_to_res_group_icon (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
int type, c, i;
- struct group_icon *first, **pp;
- struct res_resource *r;
+ rc_group_icon *first, **pp;
+ rc_res_resource *r;
if (length < 6)
toosmall (_("group icon header"));
- type = get_16 (big_endian, data + 2);
+ type = windres_get_16 (wrbfd, data + 2, 2);
if (type != 1)
fatal (_("unexpected group icon type %d"), type);
- c = get_16 (big_endian, data + 4);
+ c = windres_get_16 (wrbfd, data + 4, 2);
data += 6;
length -= 6;
@@ -888,20 +864,20 @@ bin_to_res_group_icon (const unsigned char *data, unsigned long length,
for (i = 0; i < c; i++)
{
- struct group_icon *gi;
+ rc_group_icon *gi;
if (length < 14)
toosmall (_("group icon"));
- gi = (struct group_icon *) res_alloc (sizeof *gi);
+ gi = (rc_group_icon *) res_alloc (sizeof (rc_group_icon));
- gi->width = data[0];
- gi->height = data[1];
- gi->colors = data[2];
- gi->planes = get_16 (big_endian, data + 4);
- gi->bits = get_16 (big_endian, data + 6);
- gi->bytes = get_32 (big_endian, data + 8);
- gi->index = get_16 (big_endian, data + 12);
+ gi->width = windres_get_8 (wrbfd, data, 1);
+ gi->height = windres_get_8 (wrbfd, data + 1, 1);
+ gi->colors = windres_get_8 (wrbfd, data + 2, 1);
+ gi->planes = windres_get_16 (wrbfd, data + 4, 2);
+ gi->bits = windres_get_16 (wrbfd, data + 6, 2);
+ gi->bytes = windres_get_32 (wrbfd, data + 8, 4);
+ gi->index = windres_get_16 (wrbfd, data + 12, 2);
gi->next = NULL;
*pp = gi;
@@ -911,7 +887,7 @@ bin_to_res_group_icon (const unsigned char *data, unsigned long length,
length -= 14;
}
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof *r);
r->type = RES_TYPE_GROUP_ICON;
r->u.group_icon = first;
@@ -924,16 +900,17 @@ bin_to_res_group_icon (const unsigned char *data, unsigned long length,
to the type, and *OFF to the offset to the children. */
static void
-get_version_header (const unsigned char *data, unsigned long length,
- int big_endian, const char *key, unichar **pkey,
- int *len, int *vallen, int *type, int *off)
+get_version_header (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length,
+ const char *key, unichar **pkey,
+ rc_uint_type *len, rc_uint_type *vallen, rc_uint_type *type,
+ rc_uint_type *off)
{
if (length < 8)
toosmall (key);
- *len = get_16 (big_endian, data);
- *vallen = get_16 (big_endian, data + 2);
- *type = get_16 (big_endian, data + 4);
+ *len = windres_get_16 (wrbfd, data, 2);
+ *vallen = windres_get_16 (wrbfd, data + 2, 2);
+ *type = windres_get_16 (wrbfd, data + 4, 2);
*off = 6;
@@ -942,10 +919,10 @@ get_version_header (const unsigned char *data, unsigned long length,
if (key == NULL)
{
- int sublen;
+ rc_uint_type sublen;
- *pkey = get_unicode (data, length, big_endian, &sublen);
- *off += sublen * 2 + 2;
+ *pkey = get_unicode (wrbfd, data, length, &sublen);
+ *off += (sublen + 1) * sizeof (unichar);
}
else
{
@@ -953,7 +930,7 @@ get_version_header (const unsigned char *data, unsigned long length,
{
if (length < 2)
toosmall (key);
- if (get_16 (big_endian, data) != (unsigned char) *key)
+ if (windres_get_16 (wrbfd, data, 2) != (bfd_byte) *key)
fatal (_("unexpected version string"));
*off += 2;
@@ -972,25 +949,24 @@ get_version_header (const unsigned char *data, unsigned long length,
/* Convert a version resource from binary. */
-static struct res_resource *
-bin_to_res_version (const unsigned char *data, unsigned long length,
- int big_endian)
+static rc_res_resource *
+bin_to_res_version (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
{
- int verlen, vallen, type, off;
- struct fixed_versioninfo *fi;
- struct ver_info *first, **pp;
- struct versioninfo *v;
- struct res_resource *r;
+ rc_uint_type verlen, vallen, type, off;
+ rc_fixed_versioninfo *fi;
+ rc_ver_info *first, **pp;
+ rc_versioninfo *v;
+ rc_res_resource *r;
- get_version_header (data, length, big_endian, "VS_VERSION_INFO",
+ get_version_header (wrbfd, data, length, "VS_VERSION_INFO",
(unichar **) NULL, &verlen, &vallen, &type, &off);
if ((unsigned int) verlen != length)
fatal (_("version length %d does not match resource length %lu"),
- verlen, length);
+ (int) verlen, (unsigned long) length);
if (type != 0)
- fatal (_("unexpected version type %d"), type);
+ fatal (_("unexpected version type %d"), (int) type);
data += off;
length -= off;
@@ -1002,32 +978,32 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
unsigned long signature, fiv;
if (vallen != 52)
- fatal (_("unexpected fixed version information length %d"), vallen);
+ fatal (_("unexpected fixed version information length %ld"), (long) vallen);
if (length < 52)
toosmall (_("fixed version info"));
- signature = get_32 (big_endian, data);
+ signature = windres_get_32 (wrbfd, data, 4);
if (signature != 0xfeef04bd)
fatal (_("unexpected fixed version signature %lu"), signature);
- fiv = get_32 (big_endian, data + 4);
+ fiv = windres_get_32 (wrbfd, data + 4, 4);
if (fiv != 0 && fiv != 0x10000)
fatal (_("unexpected fixed version info version %lu"), fiv);
- fi = (struct fixed_versioninfo *) res_alloc (sizeof *fi);
+ fi = (rc_fixed_versioninfo *) res_alloc (sizeof (rc_fixed_versioninfo));
- fi->file_version_ms = get_32 (big_endian, data + 8);
- fi->file_version_ls = get_32 (big_endian, data + 12);
- fi->product_version_ms = get_32 (big_endian, data + 16);
- fi->product_version_ls = get_32 (big_endian, data + 20);
- fi->file_flags_mask = get_32 (big_endian, data + 24);
- fi->file_flags = get_32 (big_endian, data + 28);
- fi->file_os = get_32 (big_endian, data + 32);
- fi->file_type = get_32 (big_endian, data + 36);
- fi->file_subtype = get_32 (big_endian, data + 40);
- fi->file_date_ms = get_32 (big_endian, data + 44);
- fi->file_date_ls = get_32 (big_endian, data + 48);
+ fi->file_version_ms = windres_get_32 (wrbfd, data + 8, 4);
+ fi->file_version_ls = windres_get_32 (wrbfd, data + 12, 4);
+ fi->product_version_ms = windres_get_32 (wrbfd, data + 16, 4);
+ fi->product_version_ls = windres_get_32 (wrbfd, data + 20, 4);
+ fi->file_flags_mask = windres_get_32 (wrbfd, data + 24, 4);
+ fi->file_flags = windres_get_32 (wrbfd, data + 28, 4);
+ fi->file_os = windres_get_32 (wrbfd, data + 32, 4);
+ fi->file_type = windres_get_32 (wrbfd, data + 36, 4);
+ fi->file_subtype = windres_get_32 (wrbfd, data + 40, 4);
+ fi->file_date_ms = windres_get_32 (wrbfd, data + 44, 4);
+ fi->file_date_ls = windres_get_32 (wrbfd, data + 48, 4);
data += 52;
length -= 52;
@@ -1038,38 +1014,38 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
while (length > 0)
{
- struct ver_info *vi;
+ rc_ver_info *vi;
int ch;
if (length < 8)
toosmall (_("version var info"));
- vi = (struct ver_info *) res_alloc (sizeof *vi);
+ vi = (rc_ver_info *) res_alloc (sizeof (rc_ver_info));
- ch = get_16 (big_endian, data + 6);
+ ch = windres_get_16 (wrbfd, data + 6, 2);
if (ch == 'S')
{
- struct ver_stringinfo **ppvs;
+ rc_ver_stringinfo **ppvs;
vi->type = VERINFO_STRING;
- get_version_header (data, length, big_endian, "StringFileInfo",
+ get_version_header (wrbfd, data, length, "StringFileInfo",
(unichar **) NULL, &verlen, &vallen, &type,
&off);
if (vallen != 0)
- fatal (_("unexpected stringfileinfo value length %d"), vallen);
+ fatal (_("unexpected stringfileinfo value length %ld"), (long) vallen);
data += off;
length -= off;
- get_version_header (data, length, big_endian, (const char *) NULL,
+ get_version_header (wrbfd, data, length, (const char *) NULL,
&vi->u.string.language, &verlen, &vallen,
&type, &off);
if (vallen != 0)
- fatal (_("unexpected version stringtable value length %d"), vallen);
+ fatal (_("unexpected version stringtable value length %ld"), (long) vallen);
data += off;
length -= off;
@@ -1084,12 +1060,12 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
while (verlen > 0)
{
- struct ver_stringinfo *vs;
- int subverlen, vslen, valoff;
+ rc_ver_stringinfo *vs;
+ rc_uint_type subverlen, vslen, valoff;
- vs = (struct ver_stringinfo *) res_alloc (sizeof *vs);
+ vs = (rc_ver_stringinfo *) res_alloc (sizeof *vs);
- get_version_header (data, length, big_endian,
+ get_version_header (wrbfd, data, length,
(const char *) NULL, &vs->key, &subverlen,
&vallen, &type, &off);
@@ -1098,13 +1074,13 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
data += off;
length -= off;
- vs->value = get_unicode (data, length, big_endian, &vslen);
+ vs->value = get_unicode (wrbfd, data, length, &vslen);
valoff = vslen * 2 + 2;
valoff = (valoff + 3) &~ 3;
if (off + valoff != subverlen)
- fatal (_("unexpected version string length %d != %d + %d"),
- subverlen, off, valoff);
+ fatal (_("unexpected version string length %ld != %ld + %ld"),
+ (long) subverlen, (long) off, (long) valoff);
vs->next = NULL;
*ppvs = vs;
@@ -1114,29 +1090,29 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
length -= valoff;
if (verlen < subverlen)
- fatal (_("unexpected version string length %d < %d"),
- verlen, subverlen);
+ fatal (_("unexpected version string length %ld < %ld"),
+ (long) verlen, (long) subverlen);
verlen -= subverlen;
}
}
else if (ch == 'V')
{
- struct ver_varinfo **ppvv;
+ rc_ver_varinfo **ppvv;
vi->type = VERINFO_VAR;
- get_version_header (data, length, big_endian, "VarFileInfo",
+ get_version_header (wrbfd, data, length, "VarFileInfo",
(unichar **) NULL, &verlen, &vallen, &type,
&off);
if (vallen != 0)
- fatal (_("unexpected varfileinfo value length %d"), vallen);
+ fatal (_("unexpected varfileinfo value length %ld"), (long) vallen);
data += off;
length -= off;
- get_version_header (data, length, big_endian, (const char *) NULL,
+ get_version_header (wrbfd, data, length, (const char *) NULL,
&vi->u.var.key, &verlen, &vallen, &type, &off);
data += off;
@@ -1147,15 +1123,15 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
while (vallen > 0)
{
- struct ver_varinfo *vv;
+ rc_ver_varinfo *vv;
if (length < 4)
toosmall (_("version varfileinfo"));
- vv = (struct ver_varinfo *) res_alloc (sizeof *vv);
+ vv = (rc_ver_varinfo *) res_alloc (sizeof (rc_ver_varinfo));
- vv->language = get_16 (big_endian, data);
- vv->charset = get_16 (big_endian, data + 2);
+ vv->language = windres_get_16 (wrbfd, data, 2);
+ vv->charset = windres_get_16 (wrbfd, data + 2, 2);
vv->next = NULL;
*ppvv = vv;
@@ -1165,7 +1141,7 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
length -= 4;
if (vallen < 4)
- fatal (_("unexpected version value length %d"), vallen);
+ fatal (_("unexpected version value length %ld"), (long) vallen);
vallen -= 4;
}
@@ -1178,11 +1154,11 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
pp = &vi->next;
}
- v = (struct versioninfo *) res_alloc (sizeof *v);
+ v = (rc_versioninfo *) res_alloc (sizeof (rc_versioninfo));
v->fixed = fi;
v->var = first;
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof *r);
r->type = RES_TYPE_VERSIONINFO;
r->u.versioninfo = v;
@@ -1191,1128 +1167,968 @@ bin_to_res_version (const unsigned char *data, unsigned long length,
/* Convert an arbitrary user defined resource from binary. */
-static struct res_resource *
-bin_to_res_userdata (const unsigned char *data, unsigned long length,
- int big_endian ATTRIBUTE_UNUSED)
+static rc_res_resource *
+bin_to_res_userdata (windres_bfd *wrbfd ATTRIBUTE_UNUSED, const bfd_byte *data,
+ rc_uint_type length)
{
- struct rcdata_item *ri;
- struct res_resource *r;
+ rc_rcdata_item *ri;
+ rc_res_resource *r;
- ri = (struct rcdata_item *) res_alloc (sizeof *ri);
+ ri = (rc_rcdata_item *) res_alloc (sizeof (rc_rcdata_item));
ri->next = NULL;
ri->type = RCDATA_BUFFER;
ri->u.buffer.length = length;
ri->u.buffer.data = data;
- r = (struct res_resource *) res_alloc (sizeof *r);
+ r = (rc_res_resource *) res_alloc (sizeof *r);
r->type = RES_TYPE_USERDATA;
r->u.rcdata = ri;
return r;
}
-/* Macros to swap out values. */
+static rc_res_resource *
+bin_to_res_toolbar (windres_bfd *wrbfd, const bfd_byte *data, rc_uint_type length)
+{
+ rc_toolbar *ri;
+ rc_res_resource *r;
+ rc_uint_type i;
+
+ ri = (rc_toolbar *) res_alloc (sizeof (rc_toolbar));
+ ri->button_width = windres_get_32 (wrbfd, data, 4);
+ ri->button_height = windres_get_32 (wrbfd, data + 4, 4);
+ ri->nitems = windres_get_32 (wrbfd, data + 8, 4);
+ ri->items = NULL;
+
+ data += 12;
+ length -= 12;
+ for (i=0 ; i < ri->nitems; i++)
+ {
+ rc_toolbar_item *it;
+ it = (rc_toolbar_item *) res_alloc (sizeof (rc_toolbar_item));
+ it->id.named = 0;
+ it->id.u.id = (int) windres_get_32 (wrbfd, data, 4);
+ it->prev = it->next = NULL;
+ data += 4;
+ length -= 4;
+ if(ri->items) {
+ rc_toolbar_item *ii = ri->items;
+ while (ii->next != NULL)
+ ii = ii->next;
+ it->prev = ii;
+ ii->next = it;
+ }
+ else
+ ri->items = it;
+ }
+ r = (rc_res_resource *) res_alloc (sizeof *r);
+ r->type = RES_TYPE_TOOLBAR;
+ r->u.toolbar = ri;
+ return r;
+}
-#define put_8(v, s) (*((unsigned char *) (s)) = (unsigned char) (v))
-#define put_16(be, v, s) ((be) ? bfd_putb16 ((v), (s)) : bfd_putl16 ((v), (s)))
-#define put_32(be, v, s) ((be) ? bfd_putb32 ((v), (s)) : bfd_putl32 ((v), (s)))
/* Local functions used to convert resources to binary format. */
-static void dword_align_bin (struct bindata ***, unsigned long *);
-static struct bindata *resid_to_bin (struct res_id, int);
-static struct bindata *unicode_to_bin (const unichar *, int);
-static struct bindata *res_to_bin_accelerator
- (const struct accelerator *, int);
-static struct bindata *res_to_bin_cursor
- (const struct cursor *, int);
-static struct bindata *res_to_bin_group_cursor
- (const struct group_cursor *, int);
-static struct bindata *res_to_bin_dialog
- (const struct dialog *, int);
-static struct bindata *res_to_bin_fontdir
- (const struct fontdir *, int);
-static struct bindata *res_to_bin_group_icon
- (const struct group_icon *, int);
-static struct bindata *res_to_bin_menu
- (const struct menu *, int);
-static struct bindata *res_to_bin_menuitems
- (const struct menuitem *, int);
-static struct bindata *res_to_bin_menuexitems
- (const struct menuitem *, int);
-static struct bindata *res_to_bin_rcdata
- (const struct rcdata_item *, int);
-static struct bindata *res_to_bin_stringtable
- (const struct stringtable *, int);
-static struct bindata *string_to_unicode_bin (const char *, int);
-static struct bindata *res_to_bin_versioninfo
- (const struct versioninfo *, int);
-static struct bindata *res_to_bin_generic
- (unsigned long, const unsigned char *);
+static rc_uint_type resid_to_bin (windres_bfd *, rc_uint_type, rc_res_id);
+static rc_uint_type unicode_to_bin (windres_bfd *, rc_uint_type, const unichar *);
+static rc_uint_type res_to_bin_accelerator (windres_bfd *, rc_uint_type, const rc_accelerator *);
+static rc_uint_type res_to_bin_cursor (windres_bfd *, rc_uint_type, const rc_cursor *);
+static rc_uint_type res_to_bin_group_cursor (windres_bfd *, rc_uint_type, const rc_group_cursor *);
+static rc_uint_type res_to_bin_dialog (windres_bfd *, rc_uint_type, const rc_dialog *);
+static rc_uint_type res_to_bin_fontdir (windres_bfd *, rc_uint_type, const rc_fontdir *);
+static rc_uint_type res_to_bin_group_icon (windres_bfd *, rc_uint_type, const rc_group_icon *);
+static rc_uint_type res_to_bin_menu (windres_bfd *, rc_uint_type, const rc_menu *);
+static rc_uint_type res_to_bin_menuitems (windres_bfd *, rc_uint_type, const rc_menuitem *);
+static rc_uint_type res_to_bin_menuexitems (windres_bfd *, rc_uint_type, const rc_menuitem *);
+static rc_uint_type res_to_bin_rcdata (windres_bfd *, rc_uint_type, const rc_rcdata_item *);
+static rc_uint_type res_to_bin_stringtable (windres_bfd *, rc_uint_type, const rc_stringtable *);
+static rc_uint_type string_to_unicode_bin (windres_bfd *, rc_uint_type, const char *);
+static rc_uint_type res_to_bin_toolbar (windres_bfd *, rc_uint_type, rc_toolbar *tb);
+static rc_uint_type res_to_bin_versioninfo (windres_bfd *, rc_uint_type, const rc_versioninfo *);
+static rc_uint_type res_to_bin_generic (windres_bfd *, rc_uint_type, rc_uint_type,
+ const bfd_byte *);
/* Convert a resource to binary. */
-struct bindata *
-res_to_bin (const struct res_resource *res, int big_endian)
+rc_uint_type
+res_to_bin (windres_bfd *wrbfd, rc_uint_type off, const rc_res_resource *res)
{
switch (res->type)
{
- default:
- abort ();
case RES_TYPE_BITMAP:
case RES_TYPE_FONT:
case RES_TYPE_ICON:
case RES_TYPE_MESSAGETABLE:
- return res_to_bin_generic (res->u.data.length, res->u.data.data);
+ return res_to_bin_generic (wrbfd, off, res->u.data.length, res->u.data.data);
case RES_TYPE_ACCELERATOR:
- return res_to_bin_accelerator (res->u.acc, big_endian);
+ return res_to_bin_accelerator (wrbfd, off, res->u.acc);
case RES_TYPE_CURSOR:
- return res_to_bin_cursor (res->u.cursor, big_endian);
+ return res_to_bin_cursor (wrbfd, off, res->u.cursor);
case RES_TYPE_GROUP_CURSOR:
- return res_to_bin_group_cursor (res->u.group_cursor, big_endian);
+ return res_to_bin_group_cursor (wrbfd, off, res->u.group_cursor);
case RES_TYPE_DIALOG:
- return res_to_bin_dialog (res->u.dialog, big_endian);
+ return res_to_bin_dialog (wrbfd, off, res->u.dialog);
case RES_TYPE_FONTDIR:
- return res_to_bin_fontdir (res->u.fontdir, big_endian);
+ return res_to_bin_fontdir (wrbfd, off, res->u.fontdir);
case RES_TYPE_GROUP_ICON:
- return res_to_bin_group_icon (res->u.group_icon, big_endian);
+ return res_to_bin_group_icon (wrbfd, off, res->u.group_icon);
case RES_TYPE_MENU:
- return res_to_bin_menu (res->u.menu, big_endian);
- case RES_TYPE_RCDATA:
- return res_to_bin_rcdata (res->u.rcdata, big_endian);
+ return res_to_bin_menu (wrbfd, off, res->u.menu);
case RES_TYPE_STRINGTABLE:
- return res_to_bin_stringtable (res->u.stringtable, big_endian);
- case RES_TYPE_USERDATA:
- return res_to_bin_rcdata (res->u.rcdata, big_endian);
+ return res_to_bin_stringtable (wrbfd, off, res->u.stringtable);
case RES_TYPE_VERSIONINFO:
- return res_to_bin_versioninfo (res->u.versioninfo, big_endian);
+ return res_to_bin_versioninfo (wrbfd, off, res->u.versioninfo);
+ case RES_TYPE_TOOLBAR:
+ return res_to_bin_toolbar (wrbfd, off, res->u.toolbar);
+ case RES_TYPE_USERDATA:
+ case RES_TYPE_RCDATA:
+ default:
+ return res_to_bin_rcdata (wrbfd, off, res->u.rcdata);
}
}
-/* Align to a 32 bit boundary. PPP points to the of a list of bindata
- structures. LENGTH points to the length of the structures. If
- necessary, this adds a new bindata to bring length up to a 32 bit
- boundary. It updates *PPP and *LENGTH. */
-
-static void
-dword_align_bin (struct bindata ***ppp, unsigned long *length)
-{
- int add;
- struct bindata *d;
-
- if ((*length & 3) == 0)
- return;
-
- add = 4 - (*length & 3);
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = add;
- d->data = (unsigned char *) reswr_alloc (add);
- memset (d->data, 0, add);
-
- d->next = NULL;
- **ppp = d;
- *ppp = &(**ppp)->next;
-
- *length += add;
-}
-
/* Convert a resource ID to binary. This always returns exactly one
bindata structure. */
-static struct bindata *
-resid_to_bin (struct res_id id, int big_endian)
+static rc_uint_type
+resid_to_bin (windres_bfd *wrbfd, rc_uint_type off, rc_res_id id)
{
- struct bindata *d;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
-
if (! id.named)
{
- d->length = 4;
- d->data = (unsigned char *) reswr_alloc (d->length);
- put_16 (big_endian, 0xffff, d->data);
- put_16 (big_endian, id.u.id, d->data + 2);
+ if (wrbfd)
+ {
+ struct bin_res_id bri;
+
+ windres_put_16 (wrbfd, bri.sig, 0xffff);
+ windres_put_16 (wrbfd, bri.id, id.u.id);
+ set_windres_bfd_content (wrbfd, &bri, off, BIN_RES_ID);
+ }
+ off += BIN_RES_ID;
}
else
{
- int i;
-
- d->length = id.u.n.length * 2 + 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
- for (i = 0; i < id.u.n.length; i++)
- put_16 (big_endian, id.u.n.name[i], d->data + i * 2);
- put_16 (big_endian, 0, d->data + i * 2);
+ rc_uint_type len = (id.u.n.name ? unichar_len (id.u.n.name) : 0);
+ if (wrbfd)
+ {
+ bfd_byte *d = (bfd_byte *) reswr_alloc ((len + 1) * sizeof (unichar));
+ rc_uint_type i;
+ for (i = 0; i < len; i++)
+ windres_put_16 (wrbfd, d + (i * sizeof (unichar)), id.u.n.name[i]);
+ windres_put_16 (wrbfd, d + (len * sizeof (unichar)), 0);
+ set_windres_bfd_content (wrbfd, d, off, (len + 1) * sizeof (unichar));
}
-
- d->next = NULL;
-
- return d;
+ off += (rc_uint_type) ((len + 1) * sizeof (unichar));
+ }
+ return off;
}
/* Convert a null terminated unicode string to binary. This always
returns exactly one bindata structure. */
-static struct bindata *
-unicode_to_bin (const unichar *str, int big_endian)
+static rc_uint_type
+unicode_to_bin (windres_bfd *wrbfd, rc_uint_type off, const unichar *str)
{
- int len;
- struct bindata *d;
+ rc_uint_type len = 0;
- len = 0;
if (str != NULL)
- {
- const unichar *s;
-
- for (s = str; *s != 0; s++)
- ++len;
- }
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = len * 2 + 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
+ len = unichar_len (str);
- if (str == NULL)
- put_16 (big_endian, 0, d->data);
- else
+ if (wrbfd)
{
- const unichar *s;
- int i;
-
- for (s = str, i = 0; *s != 0; s++, i++)
- put_16 (big_endian, *s, d->data + i * 2);
- put_16 (big_endian, 0, d->data + i * 2);
+ bfd_byte *d;
+ rc_uint_type i;
+ d = (bfd_byte *) reswr_alloc ( (len + 1) * sizeof (unichar));
+ for (i = 0; i < len; i++)
+ windres_put_16 (wrbfd, d + (i * sizeof (unichar)), str[i]);
+ windres_put_16 (wrbfd, d + (len * sizeof (unichar)), 0);
+ set_windres_bfd_content (wrbfd, d, off, (len + 1) * sizeof (unichar));
}
+ off += (rc_uint_type) ((len + 1) * sizeof (unichar));
- d->next = NULL;
-
- return d;
+ return off;
}
/* Convert an accelerator resource to binary. */
-static struct bindata *
-res_to_bin_accelerator (const struct accelerator *accelerators,
- int big_endian)
+static rc_uint_type
+res_to_bin_accelerator (windres_bfd *wrbfd, rc_uint_type off,
+ const rc_accelerator *accelerators)
{
- struct bindata *first, **pp;
- const struct accelerator *a;
+ bindata *first, **pp;
+ const rc_accelerator *a;
first = NULL;
pp = &first;
for (a = accelerators; a != NULL; a = a->next)
{
- struct bindata *d;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 8;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- put_16 (big_endian,
- a->flags | (a->next != NULL ? 0 : ACC_LAST),
- d->data);
- put_16 (big_endian, a->key, d->data + 2);
- put_16 (big_endian, a->id, d->data + 4);
- put_16 (big_endian, 0, d->data + 6);
-
- d->next = NULL;
- *pp = d;
- pp = &d->next;
- }
+ if (wrbfd)
+ {
+ struct bin_accelerator ba;
- return first;
+ windres_put_16 (wrbfd, ba.flags, a->flags | (a->next != NULL ? 0 : ACC_LAST));
+ windres_put_16 (wrbfd, ba.key, a->key);
+ windres_put_16 (wrbfd, ba.id, a->id);
+ windres_put_16 (wrbfd, ba.pad, 0);
+ set_windres_bfd_content (wrbfd, &ba, off, BIN_ACCELERATOR_SIZE);
+ }
+ off += BIN_ACCELERATOR_SIZE;
+ }
+ return off;
}
/* Convert a cursor resource to binary. */
-static struct bindata *
-res_to_bin_cursor (const struct cursor *c, int big_endian)
+static rc_uint_type
+res_to_bin_cursor (windres_bfd *wrbfd, rc_uint_type off, const rc_cursor *c)
{
- struct bindata *d;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 4;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- put_16 (big_endian, c->xhotspot, d->data);
- put_16 (big_endian, c->yhotspot, d->data + 2);
-
- d->next = (struct bindata *) reswr_alloc (sizeof *d);
- d->next->length = c->length;
- d->next->data = (unsigned char *) c->data;
- d->next->next = NULL;
+ if (wrbfd)
+ {
+ struct bin_cursor bc;
- return d;
+ windres_put_16 (wrbfd, bc.xhotspot, c->xhotspot);
+ windres_put_16 (wrbfd, bc.yhotspot, c->yhotspot);
+ set_windres_bfd_content (wrbfd, &bc, off, BIN_CURSOR_SIZE);
+ if (c->length)
+ set_windres_bfd_content (wrbfd, c->data, off + BIN_CURSOR_SIZE, c->length);
+ }
+ off = (off + BIN_CURSOR_SIZE + (rc_uint_type) c->length);
+ return off;
}
/* Convert a group cursor resource to binary. */
-static struct bindata *
-res_to_bin_group_cursor (const struct group_cursor *group_cursors,
- int big_endian)
+static rc_uint_type
+res_to_bin_group_cursor (windres_bfd *wrbfd, rc_uint_type off,
+ const rc_group_cursor *group_cursors)
{
- struct bindata *first, **pp;
- int c;
- const struct group_cursor *gc;
-
- first = (struct bindata *) reswr_alloc (sizeof *first);
- first->length = 6;
- first->data = (unsigned char *) reswr_alloc (first->length);
-
- put_16 (big_endian, 0, first->data);
- put_16 (big_endian, 2, first->data + 2);
+ int c = 0;
+ const rc_group_cursor *gc;
+ struct bin_group_cursor bgc;
+ struct bin_group_cursor_item bgci;
+ rc_uint_type start = off;
- first->next = NULL;
- pp = &first->next;
+ off += BIN_GROUP_CURSOR_SIZE;
- c = 0;
- for (gc = group_cursors; gc != NULL; gc = gc->next)
+ for (c = 0, gc = group_cursors; gc != NULL; gc = gc->next, c++)
{
- struct bindata *d;
-
- ++c;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 14;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- put_16 (big_endian, gc->width, d->data);
- put_16 (big_endian, gc->height, d->data + 2);
- put_16 (big_endian, gc->planes, d->data + 4);
- put_16 (big_endian, gc->bits, d->data + 6);
- put_32 (big_endian, gc->bytes, d->data + 8);
- put_16 (big_endian, gc->index, d->data + 12);
-
- d->next = NULL;
- *pp = d;
- pp = &d->next;
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bgci.width, gc->width);
+ windres_put_16 (wrbfd, bgci.height, gc->height);
+ windres_put_16 (wrbfd, bgci.planes, gc->planes);
+ windres_put_16 (wrbfd, bgci.bits, gc->bits);
+ windres_put_32 (wrbfd, bgci.bytes, gc->bytes);
+ windres_put_16 (wrbfd, bgci.index, gc->index);
+ set_windres_bfd_content (wrbfd, &bgci, off, BIN_GROUP_CURSOR_ITEM_SIZE);
}
- put_16 (big_endian, c, first->data + 4);
-
- return first;
+ off += BIN_GROUP_CURSOR_ITEM_SIZE;
+ }
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bgc.sig1, 0);
+ windres_put_16 (wrbfd, bgc.sig2, 2);
+ windres_put_16 (wrbfd, bgc.nitems, c);
+ set_windres_bfd_content (wrbfd, &bgc, start, BIN_GROUP_CURSOR_SIZE);
+ }
+ return off;
}
/* Convert a dialog resource to binary. */
-static struct bindata *
-res_to_bin_dialog (const struct dialog *dialog, int big_endian)
+static rc_uint_type
+res_to_bin_dialog (windres_bfd *wrbfd, rc_uint_type off, const rc_dialog *dialog)
{
+ rc_uint_type off_delta;
+ rc_uint_type start, marker;
int dialogex;
- struct bindata *first, **pp;
- unsigned long length;
- int off, c;
- struct dialog_control *dc;
+ int c;
+ rc_dialog_control *dc;
+ struct bin_dialogex bdx;
+ struct bin_dialog bd;
+ off_delta = off;
+ start = off;
dialogex = extended_dialog (dialog);
- first = (struct bindata *) reswr_alloc (sizeof *first);
- first->length = dialogex ? 26 : 18;
- first->data = (unsigned char *) reswr_alloc (first->length);
-
- length = first->length;
-
+ if (wrbfd)
+ {
if (! dialogex)
{
- put_32 (big_endian, dialog->style, first->data);
- put_32 (big_endian, dialog->exstyle, first->data + 4);
- off = 8;
+ windres_put_32 (wrbfd, bd.style, dialog->style);
+ windres_put_32 (wrbfd, bd.exstyle, dialog->exstyle);
+ windres_put_16 (wrbfd, bd.x, dialog->x);
+ windres_put_16 (wrbfd, bd.y, dialog->y);
+ windres_put_16 (wrbfd, bd.width, dialog->width);
+ windres_put_16 (wrbfd, bd.height, dialog->height);
}
else
{
- put_16 (big_endian, 1, first->data);
- put_16 (big_endian, 0xffff, first->data + 2);
-
- if (dialog->ex == NULL)
- put_32 (big_endian, 0, first->data + 4);
- else
- put_32 (big_endian, dialog->ex->help, first->data + 4);
- put_32 (big_endian, dialog->exstyle, first->data + 8);
- put_32 (big_endian, dialog->style, first->data + 12);
- off = 16;
+ windres_put_16 (wrbfd, bdx.sig1, 1);
+ windres_put_16 (wrbfd, bdx.sig2, 0xffff);
+ windres_put_32 (wrbfd, bdx.help, (dialog->ex ? dialog->ex->help : 0));
+ windres_put_32 (wrbfd, bdx.exstyle, dialog->exstyle);
+ windres_put_32 (wrbfd, bdx.style, dialog->style);
+ windres_put_16 (wrbfd, bdx.x, dialog->x);
+ windres_put_16 (wrbfd, bdx.y, dialog->y);
+ windres_put_16 (wrbfd, bdx.width, dialog->width);
+ windres_put_16 (wrbfd, bdx.height, dialog->height);
+ }
}
- put_16 (big_endian, dialog->x, first->data + off + 2);
- put_16 (big_endian, dialog->y, first->data + off + 4);
- put_16 (big_endian, dialog->width, first->data + off + 6);
- put_16 (big_endian, dialog->height, first->data + off + 8);
-
- pp = &first->next;
-
- *pp = resid_to_bin (dialog->menu, big_endian);
- length += (*pp)->length;
- pp = &(*pp)->next;
-
- *pp = resid_to_bin (dialog->class, big_endian);
- length += (*pp)->length;
- pp = &(*pp)->next;
+ off += (dialogex != 0 ? BIN_DIALOGEX_SIZE : BIN_DIALOG_SIZE);
- *pp = unicode_to_bin (dialog->caption, big_endian);
- length += (*pp)->length;
- pp = &(*pp)->next;
+ off = resid_to_bin (wrbfd, off, dialog->menu);
+ off = resid_to_bin (wrbfd, off, dialog->class);
+ off = unicode_to_bin (wrbfd, off, dialog->caption);
if ((dialog->style & DS_SETFONT) != 0)
{
- struct bindata *d;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = dialogex ? 6 : 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- length += d->length;
-
- put_16 (big_endian, dialog->pointsize, d->data);
-
- if (dialogex)
+ if (wrbfd)
{
- if (dialog->ex == NULL)
+ if (! dialogex)
{
- put_16 (big_endian, 0, d->data + 2);
- put_8 (0, d->data + 4);
- put_8 (1, d->data + 5);
+ struct bin_dialogfont bdf;
+ windres_put_16 (wrbfd, bdf.pointsize, dialog->pointsize);
+ set_windres_bfd_content (wrbfd, &bdf, off, BIN_DIALOGFONT_SIZE);
}
else
{
- put_16 (big_endian, dialog->ex->weight, d->data + 2);
- put_8 (dialog->ex->italic, d->data + 4);
- put_8 (dialog->ex->charset, d->data + 5);
+ struct bin_dialogexfont bdxf;
+ windres_put_16 (wrbfd, bdxf.pointsize, dialog->pointsize);
+ windres_put_16 (wrbfd, bdxf.weight, (dialog->ex == NULL ? 0 : dialog->ex->weight));
+ windres_put_8 (wrbfd, bdxf.italic, (dialog->ex == NULL ? 0 : dialog->ex->italic));
+ windres_put_8 (wrbfd, bdxf.charset, (dialog->ex == NULL ? 1 : dialog->ex->charset));
+ set_windres_bfd_content (wrbfd, &bdxf, off, BIN_DIALOGEXFONT_SIZE);
}
}
-
- *pp = d;
- pp = &d->next;
-
- *pp = unicode_to_bin (dialog->font, big_endian);
- length += (*pp)->length;
- pp = &(*pp)->next;
+ off += (dialogex ? BIN_DIALOGEXFONT_SIZE : BIN_DIALOGFONT_SIZE);
+ off = unicode_to_bin (wrbfd, off, dialog->font);
}
-
- c = 0;
- for (dc = dialog->controls; dc != NULL; dc = dc->next)
+ for (c = 0, dc = dialog->controls; dc != NULL; dc = dc->next, c++)
{
- struct bindata *d;
- int dcoff;
-
- ++c;
-
- dword_align_bin (&pp, &length);
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = dialogex ? 24 : 18;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- length += d->length;
+ bfd_byte dc_rclen[2];
+ off += (4 - ((off - off_delta) & 3)) & 3;
+ if (wrbfd)
+ {
if (! dialogex)
{
- put_32 (big_endian, dc->style, d->data);
- put_32 (big_endian, dc->exstyle, d->data + 4);
- dcoff = 8;
+ struct bin_dialog_control bdc;
+
+ windres_put_32 (wrbfd, bdc.style, dc->style);
+ windres_put_32 (wrbfd, bdc.exstyle, dc->exstyle);
+ windres_put_16 (wrbfd, bdc.x, dc->x);
+ windres_put_16 (wrbfd, bdc.y, dc->y);
+ windres_put_16 (wrbfd, bdc.width, dc->width);
+ windres_put_16 (wrbfd, bdc.height, dc->height);
+ windres_put_16 (wrbfd, bdc.id, dc->id);
+ set_windres_bfd_content (wrbfd, &bdc, off, BIN_DIALOG_CONTROL_SIZE);
}
else
{
- put_32 (big_endian, dc->help, d->data);
- put_32 (big_endian, dc->exstyle, d->data + 4);
- put_32 (big_endian, dc->style, d->data + 8);
- dcoff = 12;
- }
-
- put_16 (big_endian, dc->x, d->data + dcoff);
- put_16 (big_endian, dc->y, d->data + dcoff + 2);
- put_16 (big_endian, dc->width, d->data + dcoff + 4);
- put_16 (big_endian, dc->height, d->data + dcoff + 6);
-
- if (dialogex)
- put_32 (big_endian, dc->id, d->data + dcoff + 8);
- else
- put_16 (big_endian, dc->id, d->data + dcoff + 8);
-
- *pp = d;
- pp = &d->next;
-
- *pp = resid_to_bin (dc->class, big_endian);
- length += (*pp)->length;
- pp = &(*pp)->next;
-
- *pp = resid_to_bin (dc->text, big_endian);
- length += (*pp)->length;
- pp = &(*pp)->next;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
+ struct bin_dialogex_control bdc;
+
+ windres_put_32 (wrbfd, bdc.help, dc->help);
+ windres_put_32 (wrbfd, bdc.exstyle, dc->exstyle);
+ windres_put_32 (wrbfd, bdc.style, dc->style);
+ windres_put_16 (wrbfd, bdc.x, dc->x);
+ windres_put_16 (wrbfd, bdc.y, dc->y);
+ windres_put_16 (wrbfd, bdc.width, dc->width);
+ windres_put_16 (wrbfd, bdc.height, dc->height);
+ windres_put_32 (wrbfd, bdc.id, dc->id);
+ set_windres_bfd_content (wrbfd, &bdc, off, BIN_DIALOGEX_CONTROL_SIZE);
+ }
+ }
+ off += (dialogex != 0 ? BIN_DIALOGEX_CONTROL_SIZE : BIN_DIALOG_CONTROL_SIZE);
- length += 2;
+ off = resid_to_bin (wrbfd, off, dc->class);
+ off = resid_to_bin (wrbfd, off, dc->text);
- d->next = NULL;
- *pp = d;
- pp = &d->next;
+ marker = off; /* Save two bytes for size of optional data. */
+ off += 2;
if (dc->data == NULL)
- put_16 (big_endian, 0, d->data);
+ {
+ if (wrbfd)
+ windres_put_16 (wrbfd, dc_rclen, 0);
+ }
else
{
- unsigned long sublen;
-
- dword_align_bin (&pp, &length);
-
- *pp = res_to_bin_rcdata (dc->data, big_endian);
- sublen = 0;
- while (*pp != NULL)
- {
- sublen += (*pp)->length;
- pp = &(*pp)->next;
+ rc_uint_type saved_off = off;
+ rc_uint_type old_off;
+ off += (4 - ((off - off_delta) & 3)) & 3;
+
+ old_off = off;
+ off = res_to_bin_rcdata (wrbfd, off, dc->data);
+ if ((off - old_off) == 0)
+ old_off = off = saved_off;
+ if (wrbfd)
+ windres_put_16 (wrbfd, dc_rclen, off - old_off);
}
-
- put_16 (big_endian, sublen, d->data);
-
- length += sublen;
+ if (wrbfd)
+ set_windres_bfd_content (wrbfd, dc_rclen, marker, 2);
}
+
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, (dialogex != 0 ? bdx.off : bd.off), c);
+ if (! dialogex)
+ set_windres_bfd_content (wrbfd, &bd, start, BIN_DIALOG_SIZE);
+ else
+ set_windres_bfd_content (wrbfd, &bdx, start, BIN_DIALOGEX_SIZE);
}
- put_16 (big_endian, c, first->data + off);
- return first;
+ return off;
}
/* Convert a fontdir resource to binary. */
-
-static struct bindata *
-res_to_bin_fontdir (const struct fontdir *fontdirs, int big_endian)
+static rc_uint_type
+res_to_bin_fontdir (windres_bfd *wrbfd, rc_uint_type off, const rc_fontdir *fontdirs)
{
- struct bindata *first, **pp;
+ rc_uint_type start;
int c;
- const struct fontdir *fd;
+ const rc_fontdir *fd;
- first = (struct bindata *) reswr_alloc (sizeof *first);
- first->length = 2;
- first->data = (unsigned char *) reswr_alloc (first->length);
+ start = off;
+ off += 2;
- first->next = NULL;
- pp = &first->next;
-
- c = 0;
- for (fd = fontdirs; fd != NULL; fd = fd->next)
+ for (c = 0, fd = fontdirs; fd != NULL; fd = fd->next, c++)
{
- struct bindata *d;
-
- ++c;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- put_16 (big_endian, fd->index, d->data);
-
- *pp = d;
- pp = &d->next;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = fd->length;
- d->data = (unsigned char *) fd->data;
-
- d->next = NULL;
- *pp = d;
- pp = &d->next;
+ if (wrbfd)
+ {
+ bfd_byte d[2];
+ windres_put_16 (wrbfd, d, fd->index);
+ set_windres_bfd_content (wrbfd, d, off, 2);
+ if (fd->length)
+ set_windres_bfd_content (wrbfd, fd->data, off + 2, fd->length);
+ }
+ off += (rc_uint_type) fd->length + 2;
}
- put_16 (big_endian, c, first->data);
-
- return first;
+ if (wrbfd)
+ {
+ bfd_byte d[2];
+ windres_put_16 (wrbfd, d, c);
+ set_windres_bfd_content (wrbfd, d, start, 2);
+ }
+ return off;
}
/* Convert a group icon resource to binary. */
-static struct bindata *
-res_to_bin_group_icon (const struct group_icon *group_icons, int big_endian)
+static rc_uint_type
+res_to_bin_group_icon (windres_bfd *wrbfd, rc_uint_type off, const rc_group_icon *group_icons)
{
- struct bindata *first, **pp;
+ rc_uint_type start;
+ struct bin_group_icon bgi;
int c;
- const struct group_icon *gi;
-
- first = (struct bindata *) reswr_alloc (sizeof *first);
- first->length = 6;
- first->data = (unsigned char *) reswr_alloc (first->length);
+ const rc_group_icon *gi;
- put_16 (big_endian, 0, first->data);
- put_16 (big_endian, 1, first->data + 2);
+ start = off;
+ off += BIN_GROUP_ICON_SIZE;
- first->next = NULL;
- pp = &first->next;
-
- c = 0;
- for (gi = group_icons; gi != NULL; gi = gi->next)
+ for (c = 0, gi = group_icons; gi != NULL; gi = gi->next, c++)
{
- struct bindata *d;
-
- ++c;
+ struct bin_group_icon_item bgii;
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 14;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- d->data[0] = gi->width;
- d->data[1] = gi->height;
- d->data[2] = gi->colors;
- d->data[3] = 0;
- put_16 (big_endian, gi->planes, d->data + 4);
- put_16 (big_endian, gi->bits, d->data + 6);
- put_32 (big_endian, gi->bytes, d->data + 8);
- put_16 (big_endian, gi->index, d->data + 12);
-
- d->next = NULL;
- *pp = d;
- pp = &d->next;
+ if (wrbfd)
+ {
+ windres_put_8 (wrbfd, bgii.width, gi->width);
+ windres_put_8 (wrbfd, bgii.height, gi->height);
+ windres_put_8 (wrbfd, bgii.colors, gi->colors);
+ windres_put_8 (wrbfd, bgii.pad, 0);
+ windres_put_16 (wrbfd, bgii.planes, gi->planes);
+ windres_put_16 (wrbfd, bgii.bits, gi->bits);
+ windres_put_32 (wrbfd, bgii.bytes, gi->bytes);
+ windres_put_16 (wrbfd, bgii.index, gi->index);
+ set_windres_bfd_content (wrbfd, &bgii, off, BIN_GROUP_ICON_ITEM_SIZE);
+ }
+ off += BIN_GROUP_ICON_ITEM_SIZE;
}
- put_16 (big_endian, c, first->data + 4);
-
- return first;
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bgi.sig1, 0);
+ windres_put_16 (wrbfd, bgi.sig2, 1);
+ windres_put_16 (wrbfd, bgi.count, c);
+ set_windres_bfd_content (wrbfd, &bgi, start, BIN_GROUP_ICON_SIZE);
+ }
+ return off;
}
/* Convert a menu resource to binary. */
-static struct bindata *
-res_to_bin_menu (const struct menu *menu, int big_endian)
+static rc_uint_type
+res_to_bin_menu (windres_bfd *wrbfd, rc_uint_type off, const rc_menu *menu)
{
int menuex;
- struct bindata *d;
menuex = extended_menu (menu);
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = menuex ? 8 : 4;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
+ if (wrbfd)
+ {
if (! menuex)
{
- put_16 (big_endian, 0, d->data);
- put_16 (big_endian, 0, d->data + 2);
-
- d->next = res_to_bin_menuitems (menu->items, big_endian);
+ struct bin_menu bm;
+ windres_put_16 (wrbfd, bm.sig1, 0);
+ windres_put_16 (wrbfd, bm.sig2, 0);
+ set_windres_bfd_content (wrbfd, &bm, off, BIN_MENU_SIZE);
}
else
{
- put_16 (big_endian, 1, d->data);
- put_16 (big_endian, 4, d->data + 2);
- put_32 (big_endian, menu->help, d->data + 4);
-
- d->next = res_to_bin_menuexitems (menu->items, big_endian);
+ struct bin_menuex bm;
+ windres_put_16 (wrbfd, bm.sig1, 1);
+ windres_put_16 (wrbfd, bm.sig2, 4);
+ windres_put_32 (wrbfd, bm.help, menu->help);
+ set_windres_bfd_content (wrbfd, &bm, off, BIN_MENUEX_SIZE);
}
-
- return d;
+ }
+ off += (menuex != 0 ? BIN_MENUEX_SIZE : BIN_MENU_SIZE);
+ if (! menuex)
+ {
+ off = res_to_bin_menuitems (wrbfd, off, menu->items);
+ }
+ else
+ {
+ off = res_to_bin_menuexitems (wrbfd, off, menu->items);
+ }
+ return off;
}
/* Convert menu items to binary. */
-static struct bindata *
-res_to_bin_menuitems (const struct menuitem *items, int big_endian)
+static rc_uint_type
+res_to_bin_menuitems (windres_bfd *wrbfd, rc_uint_type off, const rc_menuitem *items)
{
- struct bindata *first, **pp;
- const struct menuitem *mi;
-
- first = NULL;
- pp = &first;
+ const rc_menuitem *mi;
for (mi = items; mi != NULL; mi = mi->next)
{
- struct bindata *d;
+ struct bin_menuitem bmi;
int flags;
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = mi->popup == NULL ? 4 : 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
flags = mi->type;
if (mi->next == NULL)
flags |= MENUITEM_ENDMENU;
if (mi->popup != NULL)
flags |= MENUITEM_POPUP;
- put_16 (big_endian, flags, d->data);
-
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bmi.flags, flags);
if (mi->popup == NULL)
- put_16 (big_endian, mi->id, d->data + 2);
-
- *pp = d;
- pp = &d->next;
+ windres_put_16 (wrbfd, bmi.id, mi->id);
+ set_windres_bfd_content (wrbfd, &bmi, off,
+ mi->popup == NULL ? BIN_MENUITEM_SIZE
+ : BIN_MENUITEM_POPUP_SIZE);
+ }
+ off += (mi->popup == NULL ? BIN_MENUITEM_SIZE : BIN_MENUITEM_POPUP_SIZE);
- *pp = unicode_to_bin (mi->text, big_endian);
- pp = &(*pp)->next;
+ off = unicode_to_bin (wrbfd, off, mi->text);
if (mi->popup != NULL)
{
- *pp = res_to_bin_menuitems (mi->popup, big_endian);
- while (*pp != NULL)
- pp = &(*pp)->next;
+ off = res_to_bin_menuitems (wrbfd, off, mi->popup);
}
}
-
- return first;
+ return off;
}
/* Convert menuex items to binary. */
-static struct bindata *
-res_to_bin_menuexitems (const struct menuitem *items, int big_endian)
+static rc_uint_type
+res_to_bin_menuexitems (windres_bfd *wrbfd, rc_uint_type off, const rc_menuitem *items)
{
- struct bindata *first, **pp;
- unsigned long length;
- const struct menuitem *mi;
-
- first = NULL;
- pp = &first;
-
- length = 0;
+ rc_uint_type off_delta = off;
+ const rc_menuitem *mi;
for (mi = items; mi != NULL; mi = mi->next)
{
- struct bindata *d;
+ struct bin_menuitemex bmi;
int flags;
- dword_align_bin (&pp, &length);
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 12;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- length += 12;
-
- put_32 (big_endian, mi->type, d->data);
- put_32 (big_endian, mi->state, d->data + 4);
- put_16 (big_endian, mi->id, d->data + 8);
+ off += (4 - ((off - off_delta) & 3)) & 3;
flags = 0;
if (mi->next == NULL)
flags |= 0x80;
if (mi->popup != NULL)
flags |= 1;
- put_16 (big_endian, flags, d->data + 10);
- *pp = d;
- pp = &d->next;
+ if (wrbfd)
+ {
+ windres_put_32 (wrbfd, bmi.type, mi->type);
+ windres_put_32 (wrbfd, bmi.state, mi->state);
+ windres_put_32 (wrbfd, bmi.id, mi->id);
+ windres_put_16 (wrbfd, bmi.flags, flags);
+ set_windres_bfd_content (wrbfd, &bmi, off, BIN_MENUITEMEX_SIZE);
+ }
+ off += BIN_MENUITEMEX_SIZE;
- *pp = unicode_to_bin (mi->text, big_endian);
- length += (*pp)->length;
- pp = &(*pp)->next;
+ off = unicode_to_bin (wrbfd, off, mi->text);
if (mi->popup != NULL)
{
- dword_align_bin (&pp, &length);
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 4;
- d->data = (unsigned char *) reswr_alloc (d->length);
+ bfd_byte help[4];
- put_32 (big_endian, mi->help, d->data);
+ off += (4 - ((off - off_delta) & 3)) & 3;
- *pp = d;
- pp = &d->next;
-
- *pp = res_to_bin_menuexitems (mi->popup, big_endian);
- while (*pp != NULL)
+ if (wrbfd)
{
- length += (*pp)->length;
- pp = &(*pp)->next;
+ windres_put_32 (wrbfd, help, mi->help);
+ set_windres_bfd_content (wrbfd, help, off, 4);
}
+ off += 4;
+ off = res_to_bin_menuexitems (wrbfd, off, mi->popup);
}
}
-
- return first;
+ return off;
}
/* Convert an rcdata resource to binary. This is also used to convert
- other information which happens to be stored in rcdata_item lists
+ other information which happens to be stored in rc_rcdata_item lists
to binary. */
-static struct bindata *
-res_to_bin_rcdata (const struct rcdata_item *items, int big_endian)
+static rc_uint_type
+res_to_bin_rcdata (windres_bfd *wrbfd, rc_uint_type off, const rc_rcdata_item *items)
{
- struct bindata *first, **pp;
- const struct rcdata_item *ri;
-
- first = NULL;
- pp = &first;
+ const rc_rcdata_item *ri;
for (ri = items; ri != NULL; ri = ri->next)
{
- struct bindata *d;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
-
+ rc_uint_type len;
switch (ri->type)
{
default:
abort ();
-
case RCDATA_WORD:
- d->length = 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
- put_16 (big_endian, ri->u.word, d->data);
+ len = 2;
break;
-
case RCDATA_DWORD:
- d->length = 4;
- d->data = (unsigned char *) reswr_alloc (d->length);
- put_32 (big_endian, ri->u.dword, d->data);
+ len = 4;
break;
-
case RCDATA_STRING:
- d->length = ri->u.string.length;
- d->data = (unsigned char *) ri->u.string.s;
+ len = ri->u.string.length;
+ break;
+ case RCDATA_WSTRING:
+ len = ri->u.wstring.length * sizeof (unichar);
+ break;
+ case RCDATA_BUFFER:
+ len = ri->u.buffer.length;
+ break;
+ }
+ if (wrbfd)
+ {
+ bfd_byte h[4];
+ bfd_byte *hp = &h[0];
+ switch (ri->type)
+ {
+ case RCDATA_WORD:
+ windres_put_16 (wrbfd, hp, ri->u.word);
+ break;
+ case RCDATA_DWORD:
+ windres_put_32 (wrbfd, hp, ri->u.dword);
+ break;
+ case RCDATA_STRING:
+ hp = (bfd_byte *) ri->u.string.s;
break;
-
case RCDATA_WSTRING:
{
- unsigned long i;
+ rc_uint_type i;
- d->length = ri->u.wstring.length * 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
+ hp = (bfd_byte *) reswr_alloc (len);
for (i = 0; i < ri->u.wstring.length; i++)
- put_16 (big_endian, ri->u.wstring.w[i], d->data + i * 2);
- break;
+ windres_put_16 (wrbfd, hp + i * sizeof (unichar), ri->u.wstring.w[i]);
}
-
+ break;
case RCDATA_BUFFER:
- d->length = ri->u.buffer.length;
- d->data = (unsigned char *) ri->u.buffer.data;
+ hp = (bfd_byte *) ri->u.buffer.data;
break;
}
-
- d->next = NULL;
- *pp = d;
- pp = &d->next;
+ set_windres_bfd_content (wrbfd, hp, off, len);
}
-
- return first;
+ off += len;
+ }
+ return off;
}
/* Convert a stringtable resource to binary. */
-static struct bindata *
-res_to_bin_stringtable (const struct stringtable *st, int big_endian)
+static rc_uint_type
+res_to_bin_stringtable (windres_bfd *wrbfd, rc_uint_type off,
+ const rc_stringtable *st)
{
- struct bindata *first, **pp;
int i;
- first = NULL;
- pp = &first;
-
for (i = 0; i < 16; i++)
{
- int slen, j;
- struct bindata *d;
+ rc_uint_type slen, length;
unichar *s;
- slen = st->strings[i].length;
+ slen = (rc_uint_type) st->strings[i].length;
s = st->strings[i].string;
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 2 + slen * 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
+ length = 2 + slen * 2;
+ if (wrbfd)
+ {
+ bfd_byte *hp;
+ rc_uint_type j;
- put_16 (big_endian, slen, d->data);
+ hp = (bfd_byte *) reswr_alloc (length);
+ windres_put_16 (wrbfd, hp, slen);
for (j = 0; j < slen; j++)
- put_16 (big_endian, s[j], d->data + 2 + j * 2);
-
- d->next = NULL;
- *pp = d;
- pp = &d->next;
+ windres_put_16 (wrbfd, hp + 2 + j * 2, s[j]);
+ set_windres_bfd_content (wrbfd, hp, off, length);
}
-
- return first;
+ off += length;
+ }
+ return off;
}
/* Convert an ASCII string to a unicode binary string. This always
returns exactly one bindata structure. */
-static struct bindata *
-string_to_unicode_bin (const char *s, int big_endian)
+static rc_uint_type
+string_to_unicode_bin (windres_bfd *wrbfd, rc_uint_type off, const char *s)
{
- size_t len, i;
- struct bindata *d;
-
- len = strlen (s);
+ rc_uint_type len;
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = len * 2 + 2;
- d->data = (unsigned char *) reswr_alloc (d->length);
+ len = (rc_uint_type) strlen (s);
- for (i = 0; i < len; i++)
- put_16 (big_endian, s[i], d->data + i * 2);
- put_16 (big_endian, 0, d->data + i * 2);
+ if (wrbfd)
+ {
+ rc_uint_type i;
+ bfd_byte *hp;
- d->next = NULL;
+ hp = (bfd_byte *) reswr_alloc ((len + 1) * sizeof (unichar));
- return d;
+ for (i = 0; i < len; i++)
+ windres_put_16 (wrbfd, hp + i * 2, s[i]);
+ windres_put_16 (wrbfd, hp + i * 2, 0);
+ set_windres_bfd_content (wrbfd, hp, off, (len + 1) * sizeof (unichar));
+ }
+ off += (rc_uint_type) ((len + 1) * sizeof (unichar));
+ return off;
}
-/* Convert a versioninfo resource to binary. */
-
-static struct bindata *
-res_to_bin_versioninfo (const struct versioninfo *versioninfo, int big_endian)
+static rc_uint_type
+res_to_bin_toolbar (windres_bfd *wrbfd, rc_uint_type off, rc_toolbar *tb)
{
- struct bindata *first, **pp;
- unsigned long length;
- struct ver_info *vi;
-
- first = (struct bindata *) reswr_alloc (sizeof *first);
- first->length = 6;
- first->data = (unsigned char *) reswr_alloc (first->length);
-
- length = 6;
+ if (wrbfd)
+ {
+ struct bin_toolbar bt;
+ windres_put_32 (wrbfd, bt.button_width, tb->button_width);
+ windres_put_32 (wrbfd, bt.button_height, tb->button_height);
+ windres_put_32 (wrbfd, bt.nitems, tb->nitems);
+ set_windres_bfd_content (wrbfd, &bt, off, BIN_TOOLBAR_SIZE);
+ if (tb->nitems > 0)
+ {
+ rc_toolbar_item *it;
+ bfd_byte *ids;
+ rc_uint_type i = 0;
- if (versioninfo->fixed == NULL)
- put_16 (big_endian, 0, first->data + 2);
- else
- put_16 (big_endian, 52, first->data + 2);
+ ids = (bfd_byte *) reswr_alloc (tb->nitems * 4);
+ it=tb->items;
+ while(it != NULL)
+ {
+ windres_put_32 (wrbfd, ids + i, it->id.u.id);
+ i += 4;
+ it = it->next;
+ }
+ set_windres_bfd_content (wrbfd, ids, off + BIN_TOOLBAR_SIZE, i);
+ }
+ }
+ off += BIN_TOOLBAR_SIZE + tb->nitems * 4;
- put_16 (big_endian, 0, first->data + 4);
+ return off;
+}
- pp = &first->next;
+/* Convert a versioninfo resource to binary. */
- *pp = string_to_unicode_bin ("VS_VERSION_INFO", big_endian);
- length += (*pp)->length;
- pp = &(*pp)->next;
+static rc_uint_type
+res_to_bin_versioninfo (windres_bfd *wrbfd, rc_uint_type off,
+ const rc_versioninfo *versioninfo)
+{
+ rc_uint_type off_delta = off;
+ rc_uint_type start;
+ struct bin_versioninfo bvi;
+ rc_ver_info *vi;
- dword_align_bin (&pp, &length);
+ start = off;
+ off += BIN_VERSIONINFO_SIZE;
+ off = string_to_unicode_bin (wrbfd, off, "VS_VERSION_INFO");
+ off += (4 - ((off - off_delta) & 3)) & 3;
if (versioninfo->fixed != NULL)
{
- const struct fixed_versioninfo *fi;
- struct bindata *d;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = 52;
- d->data = (unsigned char *) reswr_alloc (d->length);
-
- length += 52;
+ if (wrbfd)
+ {
+ struct bin_fixed_versioninfo bfv;
+ const rc_fixed_versioninfo *fi;
fi = versioninfo->fixed;
-
- put_32 (big_endian, 0xfeef04bd, d->data);
- put_32 (big_endian, 0x10000, d->data + 4);
- put_32 (big_endian, fi->file_version_ms, d->data + 8);
- put_32 (big_endian, fi->file_version_ls, d->data + 12);
- put_32 (big_endian, fi->product_version_ms, d->data + 16);
- put_32 (big_endian, fi->product_version_ls, d->data + 20);
- put_32 (big_endian, fi->file_flags_mask, d->data + 24);
- put_32 (big_endian, fi->file_flags, d->data + 28);
- put_32 (big_endian, fi->file_os, d->data + 32);
- put_32 (big_endian, fi->file_type, d->data + 36);
- put_32 (big_endian, fi->file_subtype, d->data + 40);
- put_32 (big_endian, fi->file_date_ms, d->data + 44);
- put_32 (big_endian, fi->file_date_ls, d->data + 48);
-
- d->next = NULL;
- *pp = d;
- pp = &d->next;
+ windres_put_32 (wrbfd, bfv.sig1, 0xfeef04bd);
+ windres_put_32 (wrbfd, bfv.sig2, 0x10000);
+ windres_put_32 (wrbfd, bfv.file_version, fi->file_version_ms);
+ windres_put_32 (wrbfd, bfv.file_version_ls, fi->file_version_ls);
+ windres_put_32 (wrbfd, bfv.product_version_ms, fi->product_version_ms);
+ windres_put_32 (wrbfd, bfv.product_version_ls, fi->product_version_ls);
+ windres_put_32 (wrbfd, bfv.file_flags_mask, fi->file_flags_mask);
+ windres_put_32 (wrbfd, bfv.file_flags, fi->file_flags);
+ windres_put_32 (wrbfd, bfv.file_os, fi->file_os);
+ windres_put_32 (wrbfd, bfv.file_type, fi->file_type);
+ windres_put_32 (wrbfd, bfv.file_subtype, fi->file_subtype);
+ windres_put_32 (wrbfd, bfv.file_date_ms, fi->file_date_ms);
+ windres_put_32 (wrbfd, bfv.file_date_ls, fi->file_date_ls);
+ set_windres_bfd_content (wrbfd, &bfv, off, BIN_FIXED_VERSIONINFO_SIZE);
+ }
+ off += BIN_FIXED_VERSIONINFO_SIZE;
}
for (vi = versioninfo->var; vi != NULL; vi = vi->next)
{
- struct bindata *vid;
- unsigned long vilen;
-
- dword_align_bin (&pp, &length);
-
- vid = (struct bindata *) reswr_alloc (sizeof *vid);
- vid->length = 6;
- vid->data = (unsigned char *) reswr_alloc (vid->length);
+ struct bin_ver_info bv;
+ rc_uint_type bv_off;
- length += 6;
- vilen = 6;
+ off += (4 - ((off - off_delta) & 3)) & 3;
- put_16 (big_endian, 0, vid->data + 2);
- put_16 (big_endian, 0, vid->data + 4);
+ bv_off = off;
- *pp = vid;
- pp = &vid->next;
+ off += BIN_VER_INFO_SIZE;
switch (vi->type)
{
default:
abort ();
-
case VERINFO_STRING:
{
- unsigned long hold, vslen;
- struct bindata *vsd;
- const struct ver_stringinfo *vs;
+ struct bin_ver_info bvsd;
+ rc_uint_type vs_off;
+ const rc_ver_stringinfo *vs;
- *pp = string_to_unicode_bin ("StringFileInfo", big_endian);
- length += (*pp)->length;
- vilen += (*pp)->length;
- pp = &(*pp)->next;
+ off = string_to_unicode_bin (wrbfd, off, "StringFileInfo");
+ off += (4 - ((off - off_delta) & 3)) & 3;
- hold = length;
- dword_align_bin (&pp, &length);
- vilen += length - hold;
+ vs_off = off;
- vsd = (struct bindata *) reswr_alloc (sizeof *vsd);
- vsd->length = 6;
- vsd->data = (unsigned char *) reswr_alloc (vsd->length);
+ off += BIN_VER_INFO_SIZE;
- length += 6;
- vilen += 6;
- vslen = 6;
+ off = unicode_to_bin (wrbfd, off, vi->u.string.language);
- put_16 (big_endian, 0, vsd->data + 2);
- put_16 (big_endian, 0, vsd->data + 4);
+ for (vs = vi->u.string.strings; vs != NULL; vs = vs->next)
+ {
+ struct bin_ver_info bvss;
+ rc_uint_type vss_off,str_off;
- *pp = vsd;
- pp = &vsd->next;
+ off += (4 - ((off - off_delta) & 3)) & 3;
- *pp = unicode_to_bin (vi->u.string.language, big_endian);
- length += (*pp)->length;
- vilen += (*pp)->length;
- vslen += (*pp)->length;
- pp = &(*pp)->next;
+ vss_off = off;
+ off += BIN_VER_INFO_SIZE;
- for (vs = vi->u.string.strings; vs != NULL; vs = vs->next)
- {
- struct bindata *vssd;
- unsigned long vsslen;
-
- hold = length;
- dword_align_bin (&pp, &length);
- vilen += length - hold;
- vslen += length - hold;
-
- vssd = (struct bindata *) reswr_alloc (sizeof *vssd);
- vssd->length = 6;
- vssd->data = (unsigned char *) reswr_alloc (vssd->length);
-
- length += 6;
- vilen += 6;
- vslen += 6;
- vsslen = 6;
-
- put_16 (big_endian, 1, vssd->data + 4);
-
- *pp = vssd;
- pp = &vssd->next;
-
- *pp = unicode_to_bin (vs->key, big_endian);
- length += (*pp)->length;
- vilen += (*pp)->length;
- vslen += (*pp)->length;
- vsslen += (*pp)->length;
- pp = &(*pp)->next;
-
- hold = length;
- dword_align_bin (&pp, &length);
- vilen += length - hold;
- vslen += length - hold;
- vsslen += length - hold;
-
- *pp = unicode_to_bin (vs->value, big_endian);
- put_16 (big_endian, (*pp)->length / 2, vssd->data + 2);
- length += (*pp)->length;
- vilen += (*pp)->length;
- vslen += (*pp)->length;
- vsslen += (*pp)->length;
- pp = &(*pp)->next;
-
- put_16 (big_endian, vsslen, vssd->data);
- }
+ off = unicode_to_bin (wrbfd, off, vs->key);
- put_16 (big_endian, vslen, vsd->data);
+ off += (4 - ((off - off_delta) & 3)) & 3;
+ str_off = off;
+ off = unicode_to_bin (wrbfd, off, vs->value);
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bvss.size, off - vss_off);
+ windres_put_16 (wrbfd, bvss.sig1, (off - str_off) / 2);
+ windres_put_16 (wrbfd, bvss.sig2, 1);
+ set_windres_bfd_content (wrbfd, &bvss, vss_off,
+ BIN_VER_INFO_SIZE);
+ }
+ }
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bvsd.size, off - vs_off);
+ windres_put_16 (wrbfd, bvsd.sig1, 0);
+ windres_put_16 (wrbfd, bvsd.sig2, 0);
+ set_windres_bfd_content (wrbfd, &bvsd, vs_off,
+ BIN_VER_INFO_SIZE);
+ }
break;
}
case VERINFO_VAR:
{
- unsigned long hold, vvlen, vvvlen;
- struct bindata *vvd;
- const struct ver_varinfo *vv;
-
- *pp = string_to_unicode_bin ("VarFileInfo", big_endian);
- length += (*pp)->length;
- vilen += (*pp)->length;
- pp = &(*pp)->next;
-
- hold = length;
- dword_align_bin (&pp, &length);
- vilen += length - hold;
-
- vvd = (struct bindata *) reswr_alloc (sizeof *vvd);
- vvd->length = 6;
- vvd->data = (unsigned char *) reswr_alloc (vvd->length);
+ rc_uint_type vvd_off, vvvd_off;
+ struct bin_ver_info bvvd;
+ const rc_ver_varinfo *vv;
- length += 6;
- vilen += 6;
- vvlen = 6;
+ off = string_to_unicode_bin (wrbfd, off, "VarFileInfo");
- put_16 (big_endian, 0, vvd->data + 4);
+ off += (4 - ((off - off_delta) & 3)) & 3;
- *pp = vvd;
- pp = &vvd->next;
+ vvd_off = off;
+ off += BIN_VER_INFO_SIZE;
- *pp = unicode_to_bin (vi->u.var.key, big_endian);
- length += (*pp)->length;
- vilen += (*pp)->length;
- vvlen += (*pp)->length;
- pp = &(*pp)->next;
+ off = unicode_to_bin (wrbfd, off, vi->u.var.key);
- hold = length;
- dword_align_bin (&pp, &length);
- vilen += length - hold;
- vvlen += length - hold;
+ off += (4 - ((off - off_delta) & 3)) & 3;
- vvvlen = 0;
+ vvvd_off = off;
for (vv = vi->u.var.var; vv != NULL; vv = vv->next)
{
- struct bindata *vvsd;
-
- vvsd = (struct bindata *) reswr_alloc (sizeof *vvsd);
- vvsd->length = 4;
- vvsd->data = (unsigned char *) reswr_alloc (vvsd->length);
-
- length += 4;
- vilen += 4;
- vvlen += 4;
- vvvlen += 4;
-
- put_16 (big_endian, vv->language, vvsd->data);
- put_16 (big_endian, vv->charset, vvsd->data + 2);
-
- vvsd->next = NULL;
- *pp = vvsd;
- pp = &vvsd->next;
+ if (wrbfd)
+ {
+ bfd_byte vvsd[4];
+
+ windres_put_16 (wrbfd, &vvsd[0], vv->language);
+ windres_put_16 (wrbfd, &vvsd[2], vv->charset);
+ set_windres_bfd_content (wrbfd, vvsd, off, 4);
+ }
+ off += 4;
}
-
- put_16 (big_endian, vvlen, vvd->data);
- put_16 (big_endian, vvvlen, vvd->data + 2);
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bvvd.size, off - vvd_off);
+ windres_put_16 (wrbfd, bvvd.sig1, off - vvvd_off);
+ windres_put_16 (wrbfd, bvvd.sig2, 0);
+ set_windres_bfd_content (wrbfd, &bvvd, vvd_off,
+ BIN_VER_INFO_SIZE);
+ }
break;
}
}
- put_16 (big_endian, vilen, vid->data);
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bv.size, off-bv_off);
+ windres_put_16 (wrbfd, bv.sig1, 0);
+ windres_put_16 (wrbfd, bv.sig2, 0);
+ set_windres_bfd_content (wrbfd, &bv, bv_off,
+ BIN_VER_INFO_SIZE);
+ }
}
- put_16 (big_endian, length, first->data);
-
- return first;
+ if (wrbfd)
+ {
+ windres_put_16 (wrbfd, bvi.size, off - start);
+ windres_put_16 (wrbfd, bvi.fixed_size,
+ versioninfo->fixed == NULL ? 0
+ : BIN_FIXED_VERSIONINFO_SIZE);
+ windres_put_16 (wrbfd, bvi.sig2, 0);
+ set_windres_bfd_content (wrbfd, &bvi, start, BIN_VER_INFO_SIZE);
+ }
+ return off;
}
/* Convert a generic resource to binary. */
-static struct bindata *
-res_to_bin_generic (unsigned long length, const unsigned char *data)
+static rc_uint_type
+res_to_bin_generic (windres_bfd *wrbfd, rc_uint_type off, rc_uint_type length,
+ const bfd_byte *data)
{
- struct bindata *d;
-
- d = (struct bindata *) reswr_alloc (sizeof *d);
- d->length = length;
- d->data = (unsigned char *) data;
-
- d->next = NULL;
-
- return d;
+ if (wrbfd && length != 0)
+ set_windres_bfd_content (wrbfd, data, off, length);
+ return off + (rc_uint_type) length;
}
diff --git a/contrib/binutils/binutils/rescoff.c b/contrib/binutils/binutils/rescoff.c
index fdd9aad..737eb4f 100644
--- a/contrib/binutils/binutils/rescoff.c
+++ b/contrib/binutils/binutils/rescoff.c
@@ -1,7 +1,8 @@
/* rescoff.c -- read and write resources in Windows COFF files.
- Copyright 1997, 1998, 1999, 2000, 2003
+ Copyright 1997, 1998, 1999, 2000, 2003, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
+ Rewritten by Kai Tietz, Onevision.
This file is part of GNU Binutils.
@@ -23,6 +24,7 @@
/* This file contains function that read and write Windows resources
in COFF files. */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
@@ -48,14 +50,12 @@ struct coff_file_info
/* End of data read from file. */
const bfd_byte *data_end;
/* Address of the resource section minus the image base of the file. */
- bfd_vma secaddr;
- /* Non-zero if the file is big endian. */
- int big_endian;
+ rc_uint_type secaddr;
};
/* A resource directory table in a COFF file. */
-struct extern_res_directory
+struct __attribute__ ((__packed__)) extern_res_directory
{
/* Characteristics. */
bfd_byte characteristics[4];
@@ -96,26 +96,24 @@ struct extern_res_data
bfd_byte reserved[4];
};
-/* Macros to swap in values. */
-
-#define getfi_16(fi, s) ((fi)->big_endian ? bfd_getb16 (s) : bfd_getl16 (s))
-#define getfi_32(fi, s) ((fi)->big_endian ? bfd_getb32 (s) : bfd_getl32 (s))
-
/* Local functions. */
static void overrun (const struct coff_file_info *, const char *);
-static struct res_directory *read_coff_res_dir
- (const bfd_byte *, const struct coff_file_info *,
- const struct res_id *, int);
-static struct res_resource *read_coff_data_entry
- (const bfd_byte *, const struct coff_file_info *, const struct res_id *);
+static rc_res_directory *read_coff_res_dir (windres_bfd *, const bfd_byte *,
+ const struct coff_file_info *,
+ const rc_res_id *, int);
+static rc_res_resource *read_coff_data_entry (windres_bfd *, const bfd_byte *,
+ const struct coff_file_info *,
+ const rc_res_id *);
/* Read the resources in a COFF file. */
-struct res_directory *
+rc_res_directory *
read_coff_rsrc (const char *filename, const char *target)
{
+ rc_res_directory *ret;
bfd *abfd;
+ windres_bfd wrbfd;
char **matching;
asection *sec;
bfd_size_type size;
@@ -143,27 +141,28 @@ read_coff_rsrc (const char *filename, const char *target)
fatal (_("%s: no resource section"), filename);
}
+ set_windres_bfd (&wrbfd, abfd, sec, WR_KIND_BFD);
size = bfd_section_size (abfd, sec);
data = (bfd_byte *) res_alloc (size);
- if (! bfd_get_section_contents (abfd, sec, data, 0, size))
- bfd_fatal (_("can't read resource section"));
+ get_windres_bfd_content (&wrbfd, data, 0, size);
finfo.filename = filename;
finfo.data = data;
finfo.data_end = data + size;
finfo.secaddr = (bfd_get_section_vma (abfd, sec)
- pe_data (abfd)->pe_opthdr.ImageBase);
- finfo.big_endian = bfd_big_endian (abfd);
-
- bfd_close (abfd);
/* Now just read in the top level resource directory. Note that we
don't free data, since we create resource entries that point into
it. If we ever want to free up the resource information we read,
this will have to be cleaned up. */
- return read_coff_res_dir (data, &finfo, (const struct res_id *) NULL, 0);
+ ret = read_coff_res_dir (&wrbfd, data, &finfo, (const rc_res_id *) NULL, 0);
+
+ bfd_close (abfd);
+
+ return ret;
}
/* Give an error if we are out of bounds. */
@@ -176,14 +175,15 @@ overrun (const struct coff_file_info *finfo, const char *msg)
/* Read a resource directory. */
-static struct res_directory *
-read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
- const struct res_id *type, int level)
+static rc_res_directory *
+read_coff_res_dir (windres_bfd *wrbfd, const bfd_byte *data,
+ const struct coff_file_info *finfo,
+ const rc_res_id *type, int level)
{
const struct extern_res_directory *erd;
- struct res_directory *rd;
+ rc_res_directory *rd;
int name_count, id_count, i;
- struct res_entry **pp;
+ rc_res_entry **pp;
const struct extern_res_entry *ere;
if ((size_t) (finfo->data_end - data) < sizeof (struct extern_res_directory))
@@ -191,15 +191,15 @@ read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
erd = (const struct extern_res_directory *) data;
- rd = (struct res_directory *) res_alloc (sizeof *rd);
- rd->characteristics = getfi_32 (finfo, erd->characteristics);
- rd->time = getfi_32 (finfo, erd->time);
- rd->major = getfi_16 (finfo, erd->major);
- rd->minor = getfi_16 (finfo, erd->minor);
+ rd = (rc_res_directory *) res_alloc (sizeof (rc_res_directory));
+ rd->characteristics = windres_get_32 (wrbfd, erd->characteristics, 4);
+ rd->time = windres_get_32 (wrbfd, erd->time, 4);
+ rd->major = windres_get_16 (wrbfd, erd->major, 2);
+ rd->minor = windres_get_16 (wrbfd, erd->minor, 2);
rd->entries = NULL;
- name_count = getfi_16 (finfo, erd->name_count);
- id_count = getfi_16 (finfo, erd->id_count);
+ name_count = windres_get_16 (wrbfd, erd->name_count, 2);
+ id_count = windres_get_16 (wrbfd, erd->id_count, 2);
pp = &rd->entries;
@@ -209,33 +209,33 @@ read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
for (i = 0; i < name_count; i++, ere++)
{
- unsigned long name, rva;
- struct res_entry *re;
+ rc_uint_type name, rva;
+ rc_res_entry *re;
const bfd_byte *ers;
int length, j;
if ((const bfd_byte *) ere >= finfo->data_end)
overrun (finfo, _("named directory entry"));
- name = getfi_32 (finfo, ere->name);
- rva = getfi_32 (finfo, ere->rva);
+ name = windres_get_32 (wrbfd, ere->name, 4);
+ rva = windres_get_32 (wrbfd, ere->rva, 4);
/* For some reason the high bit in NAME is set. */
name &=~ 0x80000000;
- if (name > (size_t) (finfo->data_end - finfo->data))
+ if (name > (rc_uint_type) (finfo->data_end - finfo->data))
overrun (finfo, _("directory entry name"));
ers = finfo->data + name;
- re = (struct res_entry *) res_alloc (sizeof *re);
+ re = (rc_res_entry *) res_alloc (sizeof *re);
re->next = NULL;
re->id.named = 1;
- length = getfi_16 (finfo, ers);
+ length = windres_get_16 (wrbfd, ers, 2);
re->id.u.n.length = length;
re->id.u.n.name = (unichar *) res_alloc (length * sizeof (unichar));
for (j = 0; j < length; j++)
- re->id.u.n.name[j] = getfi_16 (finfo, ers + j * 2 + 2);
+ re->id.u.n.name[j] = windres_get_16 (wrbfd, ers + j * 2 + 2, 2);
if (level == 0)
type = &re->id;
@@ -243,18 +243,18 @@ read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
if ((rva & 0x80000000) != 0)
{
rva &=~ 0x80000000;
- if (rva >= (size_t) (finfo->data_end - finfo->data))
+ if (rva >= (rc_uint_type) (finfo->data_end - finfo->data))
overrun (finfo, _("named subdirectory"));
re->subdir = 1;
- re->u.dir = read_coff_res_dir (finfo->data + rva, finfo, type,
+ re->u.dir = read_coff_res_dir (wrbfd, finfo->data + rva, finfo, type,
level + 1);
}
else
{
- if (rva >= (size_t) (finfo->data_end - finfo->data))
+ if (rva >= (rc_uint_type) (finfo->data_end - finfo->data))
overrun (finfo, _("named resource"));
re->subdir = 0;
- re->u.res = read_coff_data_entry (finfo->data + rva, finfo, type);
+ re->u.res = read_coff_data_entry (wrbfd, finfo->data + rva, finfo, type);
}
*pp = re;
@@ -264,15 +264,15 @@ read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
for (i = 0; i < id_count; i++, ere++)
{
unsigned long name, rva;
- struct res_entry *re;
+ rc_res_entry *re;
if ((const bfd_byte *) ere >= finfo->data_end)
overrun (finfo, _("ID directory entry"));
- name = getfi_32 (finfo, ere->name);
- rva = getfi_32 (finfo, ere->rva);
+ name = windres_get_32 (wrbfd, ere->name, 4);
+ rva = windres_get_32 (wrbfd, ere->rva, 4);
- re = (struct res_entry *) res_alloc (sizeof *re);
+ re = (rc_res_entry *) res_alloc (sizeof *re);
re->next = NULL;
re->id.named = 0;
re->id.u.id = name;
@@ -283,18 +283,18 @@ read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
if ((rva & 0x80000000) != 0)
{
rva &=~ 0x80000000;
- if (rva >= (size_t) (finfo->data_end - finfo->data))
+ if (rva >= (rc_uint_type) (finfo->data_end - finfo->data))
overrun (finfo, _("ID subdirectory"));
re->subdir = 1;
- re->u.dir = read_coff_res_dir (finfo->data + rva, finfo, type,
+ re->u.dir = read_coff_res_dir (wrbfd, finfo->data + rva, finfo, type,
level + 1);
}
else
{
- if (rva >= (size_t) (finfo->data_end - finfo->data))
+ if (rva >= (rc_uint_type) (finfo->data_end - finfo->data))
overrun (finfo, _("ID resource"));
re->subdir = 0;
- re->u.res = read_coff_data_entry (finfo->data + rva, finfo, type);
+ re->u.res = read_coff_data_entry (wrbfd, finfo->data + rva, finfo, type);
}
*pp = re;
@@ -306,12 +306,14 @@ read_coff_res_dir (const bfd_byte *data, const struct coff_file_info *finfo,
/* Read a resource data entry. */
-static struct res_resource *
-read_coff_data_entry (const bfd_byte *data, const struct coff_file_info *finfo, const struct res_id *type)
+static rc_res_resource *
+read_coff_data_entry (windres_bfd *wrbfd, const bfd_byte *data,
+ const struct coff_file_info *finfo,
+ const rc_res_id *type)
{
const struct extern_res_data *erd;
- struct res_resource *r;
- unsigned long size, rva;
+ rc_res_resource *r;
+ rc_uint_type size, rva;
const bfd_byte *resdata;
if (type == NULL)
@@ -322,22 +324,22 @@ read_coff_data_entry (const bfd_byte *data, const struct coff_file_info *finfo,
erd = (const struct extern_res_data *) data;
- size = getfi_32 (finfo, erd->size);
- rva = getfi_32 (finfo, erd->rva);
+ size = windres_get_32 (wrbfd, erd->size, 4);
+ rva = windres_get_32 (wrbfd, erd->rva, 4);
if (rva < finfo->secaddr
- || rva - finfo->secaddr >= (size_t) (finfo->data_end - finfo->data))
+ || rva - finfo->secaddr >= (rc_uint_type) (finfo->data_end - finfo->data))
overrun (finfo, _("resource data"));
resdata = finfo->data + (rva - finfo->secaddr);
- if (size > (size_t) (finfo->data_end - resdata))
+ if (size > (rc_uint_type) (finfo->data_end - resdata))
overrun (finfo, _("resource data size"));
- r = bin_to_res (*type, resdata, size, finfo->big_endian);
+ r = bin_to_res (wrbfd, *type, resdata, size);
- memset (&r->res_info, 0, sizeof (struct res_res_info));
- r->coff_info.codepage = getfi_32 (finfo, erd->codepage);
- r->coff_info.reserved = getfi_32 (finfo, erd->reserved);
+ memset (&r->res_info, 0, sizeof (rc_res_res_info));
+ r->coff_info.codepage = windres_get_32 (wrbfd, erd->codepage, 4);
+ r->coff_info.reserved = windres_get_32 (wrbfd, erd->reserved, 4);
return r;
}
@@ -347,9 +349,19 @@ read_coff_data_entry (const bfd_byte *data, const struct coff_file_info *finfo,
struct bindata_build
{
/* The data. */
- struct bindata *d;
+ bindata *d;
+ /* The last structure we have added to the list. */
+ bindata *last;
+ /* The size of the list as a whole. */
+ unsigned long length;
+};
+
+struct coff_res_data_build
+{
+ /* The data. */
+ coff_res_data *d;
/* The last structure we have added to the list. */
- struct bindata *last;
+ coff_res_data *last;
/* The size of the list as a whole. */
unsigned long length;
};
@@ -361,9 +373,7 @@ struct coff_write_info
{
/* These fields are based on the BFD. */
/* The BFD itself. */
- bfd *abfd;
- /* Non-zero if the file is big endian. */
- int big_endian;
+ windres_bfd *wrbfd;
/* Pointer to section symbol used to build RVA relocs. */
asymbol **sympp;
@@ -383,27 +393,19 @@ struct coff_write_info
/* Resource data entries. */
struct bindata_build dataents;
/* Actual resource data. */
- struct bindata_build resources;
+ struct coff_res_data_build resources;
/* Relocations. */
arelent **relocs;
/* Number of relocations. */
unsigned int reloc_count;
};
-/* Macros to swap out values. */
-
-#define putcwi_16(cwi, v, s) \
- ((cwi->big_endian) ? bfd_putb16 ((v), (s)) : bfd_putl16 ((v), (s)))
-#define putcwi_32(cwi, v, s) \
- ((cwi->big_endian) ? bfd_putb32 ((v), (s)) : bfd_putl32 ((v), (s)))
-
-static void coff_bin_sizes
- (const struct res_directory *, struct coff_write_info *);
-static unsigned char *coff_alloc (struct bindata_build *, size_t);
+static void coff_bin_sizes (const rc_res_directory *, struct coff_write_info *);
+static bfd_byte *coff_alloc (struct bindata_build *, rc_uint_type);
static void coff_to_bin
- (const struct res_directory *, struct coff_write_info *);
+ (const rc_res_directory *, struct coff_write_info *);
static void coff_res_to_bin
- (const struct res_resource *, struct coff_write_info *);
+ (const rc_res_resource *, struct coff_write_info *);
/* Write resources to a COFF file. RESOURCES should already be
sorted.
@@ -415,12 +417,14 @@ static void coff_res_to_bin
void
write_coff_file (const char *filename, const char *target,
- const struct res_directory *resources)
+ const rc_res_directory *resources)
{
bfd *abfd;
asection *sec;
struct coff_write_info cwi;
- struct bindata *d;
+ windres_bfd wrbfd;
+ bindata *d;
+ coff_res_data *rd;
unsigned long length, offset;
if (filename == NULL)
@@ -474,8 +478,9 @@ write_coff_file (const char *filename, const char *target,
We build these different types of data in different lists. */
- cwi.abfd = abfd;
- cwi.big_endian = bfd_big_endian (abfd);
+ set_windres_bfd (&wrbfd, abfd, sec, WR_KIND_BFD);
+
+ cwi.wrbfd = &wrbfd;
cwi.sympp = sec->symbol_ptr_ptr;
cwi.dirsize = 0;
cwi.dirstrsize = 0;
@@ -510,7 +515,7 @@ write_coff_file (const char *filename, const char *target,
alignment. */
if ((cwi.dirstrs.length & 3) != 0)
{
- unsigned char *ex;
+ bfd_byte *ex;
ex = coff_alloc (&cwi.dirstrs, 2);
ex[0] = 0;
@@ -542,21 +547,18 @@ write_coff_file (const char *filename, const char *target,
}
for (d = cwi.dirstrs.d; d != NULL; d = d->next)
{
- if (! bfd_set_section_contents (abfd, sec, d->data, offset, d->length))
- bfd_fatal ("bfd_set_section_contents");
+ set_windres_bfd_content (&wrbfd, d->data, offset, d->length);
offset += d->length;
}
for (d = cwi.dataents.d; d != NULL; d = d->next)
{
- if (! bfd_set_section_contents (abfd, sec, d->data, offset, d->length))
- bfd_fatal ("bfd_set_section_contents");
+ set_windres_bfd_content (&wrbfd, d->data, offset, d->length);
offset += d->length;
}
- for (d = cwi.resources.d; d != NULL; d = d->next)
+ for (rd = cwi.resources.d; rd != NULL; rd = rd->next)
{
- if (! bfd_set_section_contents (abfd, sec, d->data, offset, d->length))
- bfd_fatal ("bfd_set_section_contents");
- offset += d->length;
+ res_to_bin (cwi.wrbfd, (rc_uint_type) offset, rd->res);
+ offset += rd->length;
}
assert (offset == length);
@@ -572,10 +574,10 @@ write_coff_file (const char *filename, const char *target,
entries. This updates fields in CWI. */
static void
-coff_bin_sizes (const struct res_directory *resdir,
+coff_bin_sizes (const rc_res_directory *resdir,
struct coff_write_info *cwi)
{
- const struct res_entry *re;
+ const rc_res_entry *re;
cwi->dirsize += sizeof (struct extern_res_directory);
@@ -595,15 +597,15 @@ coff_bin_sizes (const struct res_directory *resdir,
/* Allocate data for a particular list. */
-static unsigned char *
-coff_alloc (struct bindata_build *bb, size_t size)
+static bfd_byte *
+coff_alloc (struct bindata_build *bb, rc_uint_type size)
{
- struct bindata *d;
+ bindata *d;
- d = (struct bindata *) reswr_alloc (sizeof *d);
+ d = (bindata *) reswr_alloc (sizeof (bindata));
d->next = NULL;
- d->data = (unsigned char *) reswr_alloc (size);
+ d->data = (bfd_byte *) reswr_alloc (size);
d->length = size;
if (bb->d == NULL)
@@ -619,11 +621,11 @@ coff_alloc (struct bindata_build *bb, size_t size)
/* Convert the resource directory RESDIR to binary. */
static void
-coff_to_bin (const struct res_directory *resdir, struct coff_write_info *cwi)
+coff_to_bin (const rc_res_directory *resdir, struct coff_write_info *cwi)
{
struct extern_res_directory *erd;
int ci, cn;
- const struct res_entry *e;
+ const rc_res_entry *e;
struct extern_res_entry *ere;
/* Write out the directory table. */
@@ -631,10 +633,10 @@ coff_to_bin (const struct res_directory *resdir, struct coff_write_info *cwi)
erd = ((struct extern_res_directory *)
coff_alloc (&cwi->dirs, sizeof (*erd)));
- putcwi_32 (cwi, resdir->characteristics, erd->characteristics);
- putcwi_32 (cwi, resdir->time, erd->time);
- putcwi_16 (cwi, resdir->major, erd->major);
- putcwi_16 (cwi, resdir->minor, erd->minor);
+ windres_put_32 (cwi->wrbfd, erd->characteristics, resdir->characteristics);
+ windres_put_32 (cwi->wrbfd, erd->time, resdir->time);
+ windres_put_16 (cwi->wrbfd, erd->major, resdir->major);
+ windres_put_16 (cwi->wrbfd, erd->minor, resdir->minor);
ci = 0;
cn = 0;
@@ -646,8 +648,8 @@ coff_to_bin (const struct res_directory *resdir, struct coff_write_info *cwi)
++ci;
}
- putcwi_16 (cwi, cn, erd->name_count);
- putcwi_16 (cwi, ci, erd->id_count);
+ windres_put_16 (cwi->wrbfd, erd->name_count, cn);
+ windres_put_16 (cwi->wrbfd, erd->id_count, ci);
/* Write out the data entries. Note that we allocate space for all
the entries before writing them out. That permits a recursive
@@ -658,35 +660,33 @@ coff_to_bin (const struct res_directory *resdir, struct coff_write_info *cwi)
for (e = resdir->entries; e != NULL; e = e->next, ere++)
{
if (! e->id.named)
- putcwi_32 (cwi, e->id.u.id, ere->name);
+ windres_put_32 (cwi->wrbfd, ere->name, e->id.u.id);
else
{
- unsigned char *str;
- int i;
+ bfd_byte *str;
+ rc_uint_type i;
/* For some reason existing files seem to have the high bit
set on the address of the name, although that is not
documented. */
- putcwi_32 (cwi,
- 0x80000000 | (cwi->dirsize + cwi->dirstrs.length),
- ere->name);
+ windres_put_32 (cwi->wrbfd, ere->name,
+ 0x80000000 | (cwi->dirsize + cwi->dirstrs.length));
str = coff_alloc (&cwi->dirstrs, e->id.u.n.length * 2 + 2);
- putcwi_16 (cwi, e->id.u.n.length, str);
+ windres_put_16 (cwi->wrbfd, str, e->id.u.n.length);
for (i = 0; i < e->id.u.n.length; i++)
- putcwi_16 (cwi, e->id.u.n.name[i], str + i * 2 + 2);
+ windres_put_16 (cwi->wrbfd, str + (i + 1) * sizeof (unichar), e->id.u.n.name[i]);
}
if (e->subdir)
{
- putcwi_32 (cwi, 0x80000000 | cwi->dirs.length, ere->rva);
+ windres_put_32 (cwi->wrbfd, ere->rva, 0x80000000 | cwi->dirs.length);
coff_to_bin (e->u.dir, cwi);
}
else
{
- putcwi_32 (cwi,
- cwi->dirsize + cwi->dirstrsize + cwi->dataents.length,
- ere->rva);
+ windres_put_32 (cwi->wrbfd, ere->rva,
+ cwi->dirsize + cwi->dirstrsize + cwi->dataents.length);
coff_res_to_bin (e->u.res, cwi);
}
@@ -696,12 +696,11 @@ coff_to_bin (const struct res_directory *resdir, struct coff_write_info *cwi)
/* Convert the resource RES to binary. */
static void
-coff_res_to_bin (const struct res_resource *res, struct coff_write_info *cwi)
+coff_res_to_bin (const rc_res_resource *res, struct coff_write_info *cwi)
{
arelent *r;
struct extern_res_data *erd;
- struct bindata *d;
- unsigned long length;
+ coff_res_data *d;
/* For some reason, although every other address is a section
offset, the address of the resource data itself is an RVA. That
@@ -714,7 +713,7 @@ coff_res_to_bin (const struct res_resource *res, struct coff_write_info *cwi)
r->sym_ptr_ptr = cwi->sympp;
r->address = cwi->dirsize + cwi->dirstrsize + cwi->dataents.length;
r->addend = 0;
- r->howto = bfd_reloc_type_lookup (cwi->abfd, BFD_RELOC_RVA);
+ r->howto = bfd_reloc_type_lookup (WR_BFD (cwi->wrbfd), BFD_RELOC_RVA);
if (r->howto == NULL)
bfd_fatal (_("can't get BFD_RELOC_RVA relocation type"));
@@ -726,41 +725,29 @@ coff_res_to_bin (const struct res_resource *res, struct coff_write_info *cwi)
erd = (struct extern_res_data *) coff_alloc (&cwi->dataents, sizeof (*erd));
- putcwi_32 (cwi,
+ windres_put_32 (cwi->wrbfd, erd->rva,
(cwi->dirsize
+ cwi->dirstrsize
+ cwi->dataentsize
- + cwi->resources.length),
- erd->rva);
- putcwi_32 (cwi, res->coff_info.codepage, erd->codepage);
- putcwi_32 (cwi, res->coff_info.reserved, erd->reserved);
+ + cwi->resources.length));
+ windres_put_32 (cwi->wrbfd, erd->codepage, res->coff_info.codepage);
+ windres_put_32 (cwi->wrbfd, erd->reserved, res->coff_info.reserved);
- d = res_to_bin (res, cwi->big_endian);
+ d = (coff_res_data *) reswr_alloc (sizeof (coff_res_data));
+ d->length = res_to_bin (NULL, (rc_uint_type) 0, res);
+ d->res = res;
+ d->next = NULL;
if (cwi->resources.d == NULL)
cwi->resources.d = d;
else
cwi->resources.last->next = d;
- length = 0;
- for (; d->next != NULL; d = d->next)
- length += d->length;
- length += d->length;
cwi->resources.last = d;
- cwi->resources.length += length;
+ cwi->resources.length += (d->length + 3) & ~3;
- putcwi_32 (cwi, length, erd->size);
+ windres_put_32 (cwi->wrbfd, erd->size, d->length);
/* Force the next resource to have 32 bit alignment. */
-
- if ((length & 3) != 0)
- {
- int add;
- unsigned char *ex;
-
- add = 4 - (length & 3);
-
- ex = coff_alloc (&cwi->resources, add);
- memset (ex, 0, add);
- }
+ d->length = (d->length + 3) & ~3;
}
diff --git a/contrib/binutils/binutils/resrc.c b/contrib/binutils/binutils/resrc.c
index 73b482c..ebed255 100644
--- a/contrib/binutils/binutils/resrc.c
+++ b/contrib/binutils/binutils/resrc.c
@@ -1,7 +1,8 @@
/* resrc.c -- read and write Windows rc files.
- Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
+ Rewritten by Kai Tietz, Onevision.
This file is part of GNU Binutils.
@@ -23,6 +24,7 @@
/* This file contains functions that read and write Windows rc files.
These are text files that represent resources. */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
@@ -87,11 +89,11 @@
struct icondir
{
/* Width of image. */
- unsigned char width;
+ bfd_byte width;
/* Height of image. */
- unsigned char height;
+ bfd_byte height;
/* Number of colors in image. */
- unsigned char colorcount;
+ bfd_byte colorcount;
union
{
struct
@@ -125,7 +127,7 @@ int rc_lineno;
/* The pipe we are reading from, so that we can close it if we exit. */
-static FILE *cpp_pipe;
+FILE *cpp_pipe;
/* The temporary file used if we're not using popen, so we can delete it
if we exit. */
@@ -138,7 +140,7 @@ static enum {ISTREAM_PIPE, ISTREAM_FILE} istream_type;
/* As we read the rc file, we attach information to this structure. */
-static struct res_directory *resources;
+static rc_res_directory *resources;
/* The number of cursor resources we have written out. */
@@ -150,17 +152,39 @@ static int fonts;
/* Font directory information. */
-struct fontdir *fontdirs;
+rc_fontdir *fontdirs;
/* Resource info to use for fontdirs. */
-struct res_res_info fontdirs_resinfo;
+rc_res_res_info fontdirs_resinfo;
/* The number of icon resources we have written out. */
static int icons;
-/* Local functions. */
+/* The windres target bfd . */
+
+static windres_bfd wrtarget =
+{
+ (bfd *) NULL, (asection *) NULL, WR_KIND_TARGET
+};
+
+/* Local functions for rcdata based resource definitions. */
+
+static void define_font_rcdata (rc_res_id, const rc_res_res_info *,
+ rc_rcdata_item *);
+static void define_icon_rcdata (rc_res_id, const rc_res_res_info *,
+ rc_rcdata_item *);
+static void define_bitmap_rcdata (rc_res_id, const rc_res_res_info *,
+ rc_rcdata_item *);
+static void define_cursor_rcdata (rc_res_id, const rc_res_res_info *,
+ rc_rcdata_item *);
+static void define_fontdir_rcdata (rc_res_id, const rc_res_res_info *,
+ rc_rcdata_item *);
+static void define_messagetable_rcdata (rc_res_id, const rc_res_res_info *,
+ rc_rcdata_item *);
+static rc_uint_type rcdata_copy (const rc_rcdata_item *, bfd_byte *);
+static bfd_byte *rcdata_render_as_buffer (const rc_rcdata_item *, rc_uint_type *);
static int run_cmd (char *, const char *);
static FILE *open_input_stream (char *);
@@ -170,7 +194,7 @@ static void close_input_stream (void);
static void unexpected_eof (const char *);
static int get_word (FILE *, const char *);
static unsigned long get_long (FILE *, const char *);
-static void get_data (FILE *, unsigned char *, unsigned long, const char *);
+static void get_data (FILE *, bfd_byte *, rc_uint_type, const char *);
static void define_fontdirs (void);
/* Run `cmd' and redirect the output to `redir'. */
@@ -327,7 +351,33 @@ open_input_stream (char *cmd)
return cpp_pipe;
}
-/* look for the preprocessor program */
+/* Determine if FILENAME contains special characters that
+ can cause problems unless the entire filename is quoted. */
+
+static int
+filename_need_quotes (const char *filename)
+{
+ if (filename == NULL || (filename[0] == '-' && filename[1] == 0))
+ return 0;
+
+ while (*filename != 0)
+ {
+ switch (*filename)
+ {
+ case '&':
+ case ' ':
+ case '<':
+ case '>':
+ case '|':
+ case '%':
+ return 1;
+ }
+ ++filename;
+ }
+ return 0;
+}
+
+/* Look for the preprocessor program. */
static FILE *
look_for_default (char *cmd, const char *prefix, int end_prefix,
@@ -336,6 +386,7 @@ look_for_default (char *cmd, const char *prefix, int end_prefix,
char *space;
int found;
struct stat s;
+ const char *fnquotes = (filename_need_quotes (filename) ? "\"" : "");
strcpy (cmd, prefix);
@@ -366,8 +417,8 @@ look_for_default (char *cmd, const char *prefix, int end_prefix,
strcpy (cmd, prefix);
- sprintf (cmd + end_prefix, "%s %s %s",
- DEFAULT_PREPROCESSOR, preprocargs, filename);
+ sprintf (cmd + end_prefix, "%s %s %s%s%s",
+ DEFAULT_PREPROCESSOR, preprocargs, fnquotes, filename, fnquotes);
if (verbose)
fprintf (stderr, _("Using `%s'\n"), cmd);
@@ -378,11 +429,12 @@ look_for_default (char *cmd, const char *prefix, int end_prefix,
/* Read an rc file. */
-struct res_directory *
+rc_res_directory *
read_rc_file (const char *filename, const char *preprocessor,
const char *preprocargs, int language, int use_temp_file)
{
char *cmd;
+ const char *fnquotes = (filename_need_quotes (filename) ? "\"" : "");
istream_type = (use_temp_file) ? ISTREAM_FILE : ISTREAM_PIPE;
@@ -396,8 +448,10 @@ read_rc_file (const char *filename, const char *preprocessor,
cmd = xmalloc (strlen (preprocessor)
+ strlen (preprocargs)
+ strlen (filename)
+ + strlen (fnquotes) * 2
+ 10);
- sprintf (cmd, "%s %s %s", preprocessor, preprocargs, filename);
+ sprintf (cmd, "%s %s %s%s%s", preprocessor, preprocargs,
+ fnquotes, filename, fnquotes);
cpp_pipe = open_input_stream (cmd);
}
@@ -411,6 +465,7 @@ read_rc_file (const char *filename, const char *preprocessor,
+ strlen (preprocessor)
+ strlen (preprocargs)
+ strlen (filename)
+ + strlen (fnquotes) * 2
#ifdef HAVE_EXECUTABLE_SUFFIX
+ strlen (EXECUTABLE_SUFFIX)
#endif
@@ -440,20 +495,20 @@ read_rc_file (const char *filename, const char *preprocessor,
/* First, try looking for a prefixed gcc in the windres
directory, with the same prefix as windres */
- cpp_pipe = look_for_default (cmd, program_name, dash-program_name+1,
+ cpp_pipe = look_for_default (cmd, program_name, dash - program_name + 1,
preprocargs, filename);
}
- if (slash && !cpp_pipe)
+ if (slash && ! cpp_pipe)
{
/* Next, try looking for a gcc in the same directory as
that windres */
- cpp_pipe = look_for_default (cmd, program_name, slash-program_name+1,
+ cpp_pipe = look_for_default (cmd, program_name, slash - program_name + 1,
preprocargs, filename);
}
- if (!cpp_pipe)
+ if (! cpp_pipe)
{
/* Sigh, try the default */
@@ -468,7 +523,6 @@ read_rc_file (const char *filename, const char *preprocessor,
rc_lineno = 1;
if (language != -1)
rcparse_set_language (language);
- yyin = cpp_pipe;
yyparse ();
rcparse_discard_strings ();
@@ -575,24 +629,24 @@ get_long (FILE *e, const char *msg)
/* Read data from a file. This is a wrapper to do error checking. */
static void
-get_data (FILE *e, unsigned char *p, unsigned long c, const char *msg)
+get_data (FILE *e, bfd_byte *p, rc_uint_type c, const char *msg)
{
- unsigned long got;
+ rc_uint_type got; // $$$d
- got = fread (p, 1, c, e);
+ got = (rc_uint_type) fread (p, 1, c, e);
if (got == c)
return;
- fatal (_("%s: read of %lu returned %lu"), msg, c, got);
+ fatal (_("%s: read of %lu returned %lu"), msg, (long) c, (long) got);
}
/* Define an accelerator resource. */
void
-define_accelerator (struct res_id id, const struct res_res_info *resinfo,
- struct accelerator *data)
+define_accelerator (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_accelerator *data)
{
- struct res_resource *r;
+ rc_res_resource *r;
r = define_standard_resource (&resources, RT_ACCELERATOR, id,
resinfo->language, 0);
@@ -608,15 +662,15 @@ define_accelerator (struct res_id id, const struct res_res_info *resinfo,
#define BITMAP_SKIP (14)
void
-define_bitmap (struct res_id id, const struct res_res_info *resinfo,
+define_bitmap (rc_res_id id, const rc_res_res_info *resinfo,
const char *filename)
{
FILE *e;
char *real_filename;
struct stat s;
- unsigned char *data;
- int i;
- struct res_resource *r;
+ bfd_byte *data;
+ rc_uint_type i;
+ rc_res_resource *r;
e = open_file_search (filename, FOPEN_RB, "bitmap file", &real_filename);
@@ -624,7 +678,7 @@ define_bitmap (struct res_id id, const struct res_res_info *resinfo,
fatal (_("stat failed on bitmap file `%s': %s"), real_filename,
strerror (errno));
- data = (unsigned char *) res_alloc (s.st_size - BITMAP_SKIP);
+ data = (bfd_byte *) res_alloc (s.st_size - BITMAP_SKIP);
for (i = 0; i < BITMAP_SKIP; i++)
getc (e);
@@ -650,7 +704,7 @@ define_bitmap (struct res_id id, const struct res_res_info *resinfo,
select one of the actual cursors. */
void
-define_cursor (struct res_id id, const struct res_res_info *resinfo,
+define_cursor (rc_res_id id, const rc_res_res_info *resinfo,
const char *filename)
{
FILE *e;
@@ -658,8 +712,8 @@ define_cursor (struct res_id id, const struct res_res_info *resinfo,
int type, count, i;
struct icondir *icondirs;
int first_cursor;
- struct res_resource *r;
- struct group_cursor *first, **pp;
+ rc_res_resource *r;
+ rc_group_cursor *first, **pp;
e = open_file_search (filename, FOPEN_RB, "cursor file", &real_filename);
@@ -699,19 +753,19 @@ define_cursor (struct res_id id, const struct res_res_info *resinfo,
for (i = 0; i < count; i++)
{
- unsigned char *data;
- struct res_id name;
- struct cursor *c;
+ bfd_byte *data;
+ rc_res_id name;
+ rc_cursor *c;
if (fseek (e, icondirs[i].offset, SEEK_SET) != 0)
fatal (_("%s: fseek to %lu failed: %s"), real_filename,
icondirs[i].offset, strerror (errno));
- data = (unsigned char *) res_alloc (icondirs[i].bytes);
+ data = (bfd_byte *) res_alloc (icondirs[i].bytes);
get_data (e, data, icondirs[i].bytes, real_filename);
- c = (struct cursor *) res_alloc (sizeof *c);
+ c = (rc_cursor *) res_alloc (sizeof (rc_cursor));
c->xhotspot = icondirs[i].u.cursor.xhotspot;
c->yhotspot = icondirs[i].u.cursor.yhotspot;
c->length = icondirs[i].bytes;
@@ -738,9 +792,9 @@ define_cursor (struct res_id id, const struct res_res_info *resinfo,
pp = &first;
for (i = 0; i < count; i++)
{
- struct group_cursor *cg;
+ rc_group_cursor *cg;
- cg = (struct group_cursor *) res_alloc (sizeof *cg);
+ cg = (rc_group_cursor *) res_alloc (sizeof (rc_group_cursor));
cg->next = NULL;
cg->width = icondirs[i].width;
cg->height = 2 * icondirs[i].height;
@@ -768,13 +822,13 @@ define_cursor (struct res_id id, const struct res_res_info *resinfo,
/* Define a dialog resource. */
void
-define_dialog (struct res_id id, const struct res_res_info *resinfo,
- const struct dialog *dialog)
+define_dialog (rc_res_id id, const rc_res_res_info *resinfo,
+ const rc_dialog *dialog)
{
- struct dialog *copy;
- struct res_resource *r;
+ rc_dialog *copy;
+ rc_res_resource *r;
- copy = (struct dialog *) res_alloc (sizeof *copy);
+ copy = (rc_dialog *) res_alloc (sizeof *copy);
*copy = *dialog;
r = define_standard_resource (&resources, RT_DIALOG, id,
@@ -787,15 +841,15 @@ define_dialog (struct res_id id, const struct res_res_info *resinfo,
/* Define a dialog control. This does not define a resource, but
merely allocates and fills in a structure. */
-struct dialog_control *
-define_control (const struct res_id iid, unsigned long id, unsigned long x,
- unsigned long y, unsigned long width, unsigned long height,
- unsigned long class, unsigned long style,
- unsigned long exstyle)
+rc_dialog_control *
+define_control (const rc_res_id iid, rc_uint_type id, rc_uint_type x,
+ rc_uint_type y, rc_uint_type width, rc_uint_type height,
+ const rc_res_id class, rc_uint_type style,
+ rc_uint_type exstyle)
{
- struct dialog_control *n;
+ rc_dialog_control *n;
- n = (struct dialog_control *) res_alloc (sizeof *n);
+ n = (rc_dialog_control *) res_alloc (sizeof (rc_dialog_control));
n->next = NULL;
n->id = id;
n->style = style;
@@ -804,8 +858,7 @@ define_control (const struct res_id iid, unsigned long id, unsigned long x,
n->y = y;
n->width = width;
n->height = height;
- n->class.named = 0;
- n->class.u.id = class;
+ n->class = class;
n->text = iid;
n->data = NULL;
n->help = 0;
@@ -813,23 +866,26 @@ define_control (const struct res_id iid, unsigned long id, unsigned long x,
return n;
}
-struct dialog_control *
-define_icon_control (struct res_id iid, unsigned long id, unsigned long x,
- unsigned long y, unsigned long style,
- unsigned long exstyle, unsigned long help,
- struct rcdata_item *data, struct dialog_ex *ex)
+rc_dialog_control *
+define_icon_control (rc_res_id iid, rc_uint_type id, rc_uint_type x,
+ rc_uint_type y, rc_uint_type style,
+ rc_uint_type exstyle, rc_uint_type help,
+ rc_rcdata_item *data, rc_dialog_ex *ex)
{
- struct dialog_control *n;
- struct res_id tid;
+ rc_dialog_control *n;
+ rc_res_id tid;
+ rc_res_id cid;
if (style == 0)
style = SS_ICON | WS_CHILD | WS_VISIBLE;
res_string_to_id (&tid, "");
- n = define_control (tid, id, x, y, 0, 0, CTL_STATIC, style, exstyle);
+ cid.named = 0;
+ cid.u.id = CTL_STATIC;
+ n = define_control (tid, id, x, y, 0, 0, cid, style, exstyle);
n->text = iid;
- if (help && !ex)
+ if (help && ! ex)
rcparse_warning (_("help ID requires DIALOGEX"));
- if (data && !ex)
+ if (data && ! ex)
rcparse_warning (_("control data requires DIALOGEX"));
n->help = help;
n->data = data;
@@ -840,20 +896,20 @@ define_icon_control (struct res_id iid, unsigned long id, unsigned long x,
/* Define a font resource. */
void
-define_font (struct res_id id, const struct res_res_info *resinfo,
+define_font (rc_res_id id, const rc_res_res_info *resinfo,
const char *filename)
{
FILE *e;
char *real_filename;
struct stat s;
- unsigned char *data;
- struct res_resource *r;
+ bfd_byte *data;
+ rc_res_resource *r;
long offset;
long fontdatalength;
- unsigned char *fontdata;
- struct fontdir *fd;
+ bfd_byte *fontdata;
+ rc_fontdir *fd;
const char *device, *face;
- struct fontdir **pp;
+ rc_fontdir **pp;
e = open_file_search (filename, FOPEN_RB, "font file", &real_filename);
@@ -861,7 +917,7 @@ define_font (struct res_id id, const struct res_res_info *resinfo,
fatal (_("stat failed on font file `%s': %s"), real_filename,
strerror (errno));
- data = (unsigned char *) res_alloc (s.st_size);
+ data = (bfd_byte *) res_alloc (s.st_size);
get_data (e, data, s.st_size, real_filename);
@@ -902,12 +958,12 @@ define_font (struct res_id id, const struct res_res_info *resinfo,
++fonts;
fontdatalength = 58 + strlen (device) + strlen (face);
- fontdata = (unsigned char *) res_alloc (fontdatalength);
+ fontdata = (bfd_byte *) res_alloc (fontdatalength);
memcpy (fontdata, data, 56);
strcpy ((char *) fontdata + 56, device);
strcpy ((char *) fontdata + 57 + strlen (device), face);
- fd = (struct fontdir *) res_alloc (sizeof *fd);
+ fd = (rc_fontdir *) res_alloc (sizeof (rc_fontdir));
fd->next = NULL;
fd->index = fonts;
fd->length = fontdatalength;
@@ -922,14 +978,33 @@ define_font (struct res_id id, const struct res_res_info *resinfo,
fontdirs_resinfo = *resinfo;
}
+static void
+define_font_rcdata (rc_res_id id,const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
+{
+ rc_res_resource *r;
+ rc_uint_type len_data;
+ bfd_byte *pb_data;
+
+ r = define_standard_resource (&resources, RT_FONT, id,
+ resinfo->language, 0);
+
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+
+ r->type = RES_TYPE_FONT;
+ r->u.data.length = len_data;
+ r->u.data.data = pb_data;
+ r->res_info = *resinfo;
+}
+
/* Define the fontdirs resource. This is called after the entire rc
file has been parsed, if any font resources were seen. */
static void
define_fontdirs (void)
{
- struct res_resource *r;
- struct res_id id;
+ rc_res_resource *r;
+ rc_res_id id;
id.named = 0;
id.u.id = 1;
@@ -941,6 +1016,89 @@ define_fontdirs (void)
r->res_info = fontdirs_resinfo;
}
+static bfd_byte *
+rcdata_render_as_buffer (const rc_rcdata_item *data, rc_uint_type *plen)
+{
+ const rc_rcdata_item *d;
+ bfd_byte *ret = NULL, *pret;
+ rc_uint_type len = 0;
+
+ for (d = data; d != NULL; d = d->next)
+ len += rcdata_copy (d, NULL);
+ if (len != 0)
+ {
+ ret = pret = (bfd_byte *) res_alloc (len);
+ for (d = data; d != NULL; d = d->next)
+ pret += rcdata_copy (d, pret);
+ }
+ if (plen)
+ *plen = len;
+ return ret;
+}
+
+static void
+define_fontdir_rcdata (rc_res_id id,const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
+{
+ rc_res_resource *r;
+ rc_fontdir *fd, *fd_first, *fd_cur;
+ rc_uint_type len_data;
+ bfd_byte *pb_data;
+ rc_uint_type c;
+
+ fd_cur = fd_first = NULL;
+ r = define_standard_resource (&resources, RT_FONTDIR, id, 0x409, 0);
+
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+
+ if (pb_data)
+ {
+ rc_uint_type off = 2;
+ c = windres_get_16 (&wrtarget, pb_data, len_data);
+ for (; c > 0; c--)
+ {
+ size_t len;
+ rc_uint_type safe_pos = off;
+ const struct bin_fontdir_item *bfi;
+
+ bfi = (const struct bin_fontdir_item *) pb_data + off;
+ fd = (rc_fontdir *) res_alloc (sizeof (rc_fontdir));
+ fd->index = windres_get_16 (&wrtarget, bfi->index, len_data - off);
+ fd->data = pb_data + off;
+ off += 56;
+ len = strlen ((char *) bfi->device_name) + 1;
+ off += (rc_uint_type) len;
+ off += (rc_uint_type) strlen ((char *) bfi->device_name + len) + 1;
+ fd->length = (off - safe_pos);
+ fd->next = NULL;
+ if (fd_first == NULL)
+ fd_first = fd;
+ else
+ fd_cur->next = fd;
+ fd_cur = fd;
+ }
+ }
+ r->type = RES_TYPE_FONTDIR;
+ r->u.fontdir = fd_first;
+ r->res_info = *resinfo;
+}
+
+static void define_messagetable_rcdata (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
+{
+ rc_res_resource *r;
+ rc_uint_type len_data;
+ bfd_byte *pb_data;
+
+ r = define_standard_resource (&resources, RT_MESSAGETABLE, id, resinfo->language, 0);
+
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+ r->type = RES_TYPE_MESSAGETABLE;
+ r->u.data.length = len_data;
+ r->u.data.data = pb_data;
+ r->res_info = *resinfo;
+}
+
/* Define an icon resource. An icon file may contain a set of
bitmaps, each representing the same icon at various different
resolutions. They each get written out with a different ID. The
@@ -948,7 +1106,7 @@ define_fontdirs (void)
select one of the actual icon bitmaps. */
void
-define_icon (struct res_id id, const struct res_res_info *resinfo,
+define_icon (rc_res_id id, const rc_res_res_info *resinfo,
const char *filename)
{
FILE *e;
@@ -956,8 +1114,8 @@ define_icon (struct res_id id, const struct res_res_info *resinfo,
int type, count, i;
struct icondir *icondirs;
int first_icon;
- struct res_resource *r;
- struct group_icon *first, **pp;
+ rc_res_resource *r;
+ rc_group_icon *first, **pp;
e = open_file_search (filename, FOPEN_RB, "icon file", &real_filename);
@@ -996,14 +1154,14 @@ define_icon (struct res_id id, const struct res_res_info *resinfo,
for (i = 0; i < count; i++)
{
- unsigned char *data;
- struct res_id name;
+ bfd_byte *data;
+ rc_res_id name;
if (fseek (e, icondirs[i].offset, SEEK_SET) != 0)
fatal (_("%s: fseek to %lu failed: %s"), real_filename,
icondirs[i].offset, strerror (errno));
- data = (unsigned char *) res_alloc (icondirs[i].bytes);
+ data = (bfd_byte *) res_alloc (icondirs[i].bytes);
get_data (e, data, icondirs[i].bytes, real_filename);
@@ -1029,13 +1187,13 @@ define_icon (struct res_id id, const struct res_res_info *resinfo,
pp = &first;
for (i = 0; i < count; i++)
{
- struct group_icon *cg;
+ rc_group_icon *cg;
/* For some reason, at least in some files the planes and bits
are zero. We instead set them from the color. This is
copied from rcl. */
- cg = (struct group_icon *) res_alloc (sizeof *cg);
+ cg = (rc_group_icon *) res_alloc (sizeof (rc_group_icon));
cg->next = NULL;
cg->width = icondirs[i].width;
cg->height = icondirs[i].height;
@@ -1072,16 +1230,180 @@ define_icon (struct res_id id, const struct res_res_info *resinfo,
r->res_info = *resinfo;
}
+static void
+define_group_icon_rcdata (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
+{
+ rc_res_resource *r;
+ rc_group_icon *cg, *first, *cur;
+ rc_uint_type len_data;
+ bfd_byte *pb_data;
+
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+
+ cur = NULL;
+ first = NULL;
+
+ while (len_data >= 6)
+ {
+ int c, i;
+ unsigned short type;
+ type = windres_get_16 (&wrtarget, pb_data + 2, len_data - 2);
+ if (type != 1)
+ fatal (_("unexpected group icon type %d"), type);
+ c = windres_get_16 (&wrtarget, pb_data + 4, len_data - 4);
+ len_data -= 6;
+ pb_data += 6;
+
+ for (i = 0; i < c; i++)
+ {
+ if (len_data < 14)
+ fatal ("too small group icon rcdata");
+ cg = (rc_group_icon *) res_alloc (sizeof (rc_group_icon));
+ cg->next = NULL;
+ cg->width = pb_data[0];
+ cg->height = pb_data[1];
+ cg->colors = pb_data[2];
+ cg->planes = windres_get_16 (&wrtarget, pb_data + 4, len_data - 4);
+ cg->bits = windres_get_16 (&wrtarget, pb_data + 6, len_data - 6);
+ cg->bytes = windres_get_32 (&wrtarget, pb_data + 8, len_data - 8);
+ cg->index = windres_get_16 (&wrtarget, pb_data + 12, len_data - 12);
+ if (! first)
+ first = cg;
+ else
+ cur->next = cg;
+ cur = cg;
+ pb_data += 14;
+ len_data -= 14;
+ }
+ }
+ r = define_standard_resource (&resources, RT_GROUP_ICON, id,
+ resinfo->language, 0);
+ r->type = RES_TYPE_GROUP_ICON;
+ r->u.group_icon = first;
+ r->res_info = *resinfo;
+}
+
+static void
+define_group_cursor_rcdata (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
+{
+ rc_res_resource *r;
+ rc_group_cursor *cg, *first, *cur;
+ rc_uint_type len_data;
+ bfd_byte *pb_data;
+
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+
+ first = cur = NULL;
+
+ while (len_data >= 6)
+ {
+ int c, i;
+ unsigned short type;
+ type = windres_get_16 (&wrtarget, pb_data + 2, len_data - 2);
+ if (type != 2)
+ fatal (_("unexpected group cursor type %d"), type);
+ c = windres_get_16 (&wrtarget, pb_data + 4, len_data - 4);
+ len_data -= 6;
+ pb_data += 6;
+
+ for (i = 0; i < c; i++)
+ {
+ if (len_data < 14)
+ fatal ("too small group icon rcdata");
+ cg = (rc_group_cursor *) res_alloc (sizeof (rc_group_cursor));
+ cg->next = NULL;
+ cg->width = windres_get_16 (&wrtarget, pb_data, len_data);
+ cg->height = windres_get_16 (&wrtarget, pb_data + 2, len_data - 2);
+ cg->planes = windres_get_16 (&wrtarget, pb_data + 4, len_data - 4);
+ cg->bits = windres_get_16 (&wrtarget, pb_data + 6, len_data - 6);
+ cg->bytes = windres_get_32 (&wrtarget, pb_data + 8, len_data - 8);
+ cg->index = windres_get_16 (&wrtarget, pb_data + 12, len_data - 12);
+ if (! first)
+ first = cg;
+ else
+ cur->next = cg;
+ cur = cg;
+ pb_data += 14;
+ len_data -= 14;
+ }
+ }
+
+ r = define_standard_resource (&resources, RT_GROUP_ICON, id,
+ resinfo->language, 0);
+ r->type = RES_TYPE_GROUP_CURSOR;
+ r->u.group_cursor = first;
+ r->res_info = *resinfo;
+}
+
+static void
+define_cursor_rcdata (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
+{
+ rc_cursor *c;
+ rc_res_resource *r;
+ rc_uint_type len_data;
+ bfd_byte *pb_data;
+
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+
+ c = (rc_cursor *) res_alloc (sizeof (rc_cursor));
+ c->xhotspot = windres_get_16 (&wrtarget, pb_data, len_data);
+ c->yhotspot = windres_get_16 (&wrtarget, pb_data + 2, len_data - 2);
+ c->length = len_data - BIN_CURSOR_SIZE;
+ c->data = (const bfd_byte *) (data + BIN_CURSOR_SIZE);
+
+ r = define_standard_resource (&resources, RT_CURSOR, id, resinfo->language, 0);
+ r->type = RES_TYPE_CURSOR;
+ r->u.cursor = c;
+ r->res_info = *resinfo;
+}
+
+static void
+define_bitmap_rcdata (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
+{
+ rc_res_resource *r;
+ rc_uint_type len_data;
+ bfd_byte *pb_data;
+
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+
+ r = define_standard_resource (&resources, RT_BITMAP, id, resinfo->language, 0);
+ r->type = RES_TYPE_BITMAP;
+ r->u.data.length = len_data;
+ r->u.data.data = pb_data;
+ r->res_info = *resinfo;
+}
+
+static void
+define_icon_rcdata (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
+{
+ rc_res_resource *r;
+ rc_uint_type len_data;
+ bfd_byte *pb_data;
+
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+
+ r = define_standard_resource (&resources, RT_ICON, id, resinfo->language, 0);
+ r->type = RES_TYPE_ICON;
+ r->u.data.length = len_data;
+ r->u.data.data = pb_data;
+ r->res_info = *resinfo;
+}
+
/* Define a menu resource. */
void
-define_menu (struct res_id id, const struct res_res_info *resinfo,
- struct menuitem *menuitems)
+define_menu (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_menuitem *menuitems)
{
- struct menu *m;
- struct res_resource *r;
+ rc_menu *m;
+ rc_res_resource *r;
- m = (struct menu *) res_alloc (sizeof *m);
+ m = (rc_menu *) res_alloc (sizeof (rc_menu));
m->items = menuitems;
m->help = 0;
@@ -1094,22 +1416,19 @@ define_menu (struct res_id id, const struct res_res_info *resinfo,
/* Define a menu item. This does not define a resource, but merely
allocates and fills in a structure. */
-struct menuitem *
-define_menuitem (const char *text, int menuid, unsigned long type,
- unsigned long state, unsigned long help,
- struct menuitem *menuitems)
+rc_menuitem *
+define_menuitem (const unichar *text, rc_uint_type menuid, rc_uint_type type,
+ rc_uint_type state, rc_uint_type help,
+ rc_menuitem *menuitems)
{
- struct menuitem *mi;
+ rc_menuitem *mi;
- mi = (struct menuitem *) res_alloc (sizeof *mi);
+ mi = (rc_menuitem *) res_alloc (sizeof (rc_menuitem));
mi->next = NULL;
mi->type = type;
mi->state = state;
mi->id = menuid;
- if (text == NULL)
- mi->text = NULL;
- else
- unicode_from_ascii ((int *) NULL, &mi->text, text);
+ mi->text = unichar_dup (text);
mi->help = help;
mi->popup = menuitems;
return mi;
@@ -1118,14 +1437,14 @@ define_menuitem (const char *text, int menuid, unsigned long type,
/* Define a messagetable resource. */
void
-define_messagetable (struct res_id id, const struct res_res_info *resinfo,
+define_messagetable (rc_res_id id, const rc_res_res_info *resinfo,
const char *filename)
{
FILE *e;
char *real_filename;
struct stat s;
- unsigned char *data;
- struct res_resource *r;
+ bfd_byte *data;
+ rc_res_resource *r;
e = open_file_search (filename, FOPEN_RB, "messagetable file",
&real_filename);
@@ -1134,7 +1453,7 @@ define_messagetable (struct res_id id, const struct res_res_info *resinfo,
fatal (_("stat failed on bitmap file `%s': %s"), real_filename,
strerror (errno));
- data = (unsigned char *) res_alloc (s.st_size);
+ data = (bfd_byte *) res_alloc (s.st_size);
get_data (e, data, s.st_size, real_filename);
@@ -1153,10 +1472,10 @@ define_messagetable (struct res_id id, const struct res_res_info *resinfo,
/* Define an rcdata resource. */
void
-define_rcdata (struct res_id id, const struct res_res_info *resinfo,
- struct rcdata_item *data)
+define_rcdata (rc_res_id id, const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
{
- struct res_resource *r;
+ rc_res_resource *r;
r = define_standard_resource (&resources, RT_RCDATA, id,
resinfo->language, 0);
@@ -1167,13 +1486,13 @@ define_rcdata (struct res_id id, const struct res_res_info *resinfo,
/* Create an rcdata item holding a string. */
-struct rcdata_item *
-define_rcdata_string (const char *string, unsigned long len)
+rc_rcdata_item *
+define_rcdata_string (const char *string, rc_uint_type len)
{
- struct rcdata_item *ri;
+ rc_rcdata_item *ri;
char *s;
- ri = (struct rcdata_item *) res_alloc (sizeof *ri);
+ ri = (rc_rcdata_item *) res_alloc (sizeof (rc_rcdata_item));
ri->next = NULL;
ri->type = RCDATA_STRING;
ri->u.string.length = len;
@@ -1184,14 +1503,33 @@ define_rcdata_string (const char *string, unsigned long len)
return ri;
}
+/* Create an rcdata item holding a unicode string. */
+
+rc_rcdata_item *
+define_rcdata_unistring (const unichar *string, rc_uint_type len)
+{
+ rc_rcdata_item *ri;
+ unichar *s;
+
+ ri = (rc_rcdata_item *) res_alloc (sizeof (rc_rcdata_item));
+ ri->next = NULL;
+ ri->type = RCDATA_WSTRING;
+ ri->u.wstring.length = len;
+ s = (unichar *) res_alloc (len * sizeof (unichar));
+ memcpy (s, string, len * sizeof (unichar));
+ ri->u.wstring.w = s;
+
+ return ri;
+}
+
/* Create an rcdata item holding a number. */
-struct rcdata_item *
-define_rcdata_number (unsigned long val, int dword)
+rc_rcdata_item *
+define_rcdata_number (rc_uint_type val, int dword)
{
- struct rcdata_item *ri;
+ rc_rcdata_item *ri;
- ri = (struct rcdata_item *) res_alloc (sizeof *ri);
+ ri = (rc_rcdata_item *) res_alloc (sizeof (rc_rcdata_item));
ri->next = NULL;
ri->type = dword ? RCDATA_DWORD : RCDATA_WORD;
ri->u.word = val;
@@ -1203,11 +1541,11 @@ define_rcdata_number (unsigned long val, int dword)
which appears in a STRINGTABLE statement. */
void
-define_stringtable (const struct res_res_info *resinfo,
- unsigned long stringid, const char *string)
+define_stringtable (const rc_res_res_info *resinfo,
+ rc_uint_type stringid, const unichar *string)
{
- struct res_id id;
- struct res_resource *r;
+ rc_res_id id;
+ rc_res_resource *r;
id.named = 0;
id.u.id = (stringid >> 4) + 1;
@@ -1219,8 +1557,8 @@ define_stringtable (const struct res_res_info *resinfo,
int i;
r->type = RES_TYPE_STRINGTABLE;
- r->u.stringtable = ((struct stringtable *)
- res_alloc (sizeof (struct stringtable)));
+ r->u.stringtable = ((rc_stringtable *)
+ res_alloc (sizeof (rc_stringtable)));
for (i = 0; i < 16; i++)
{
r->u.stringtable->strings[i].length = 0;
@@ -1230,21 +1568,79 @@ define_stringtable (const struct res_res_info *resinfo,
r->res_info = *resinfo;
}
- unicode_from_ascii (&r->u.stringtable->strings[stringid & 0xf].length,
- &r->u.stringtable->strings[stringid & 0xf].string,
- string);
+ r->u.stringtable->strings[stringid & 0xf].length = unichar_len (string);
+ r->u.stringtable->strings[stringid & 0xf].string = unichar_dup (string);
+}
+
+void
+define_toolbar (rc_res_id id, rc_res_res_info *resinfo, rc_uint_type width, rc_uint_type height,
+ rc_toolbar_item *items)
+{
+ rc_toolbar *t;
+ rc_res_resource *r;
+
+ t = (rc_toolbar *) res_alloc (sizeof (rc_toolbar));
+ t->button_width = width;
+ t->button_height = height;
+ t->nitems = 0;
+ t->items = items;
+ while (items != NULL)
+ {
+ t->nitems+=1;
+ items = items->next;
+ }
+ r = define_standard_resource (&resources, RT_TOOLBAR, id, resinfo->language, 0);
+ r->type = RES_TYPE_TOOLBAR;
+ r->u.toolbar = t;
+ r->res_info = *resinfo;
}
/* Define a user data resource where the data is in the rc file. */
void
-define_user_data (struct res_id id, struct res_id type,
- const struct res_res_info *resinfo,
- struct rcdata_item *data)
+define_user_data (rc_res_id id, rc_res_id type,
+ const rc_res_res_info *resinfo,
+ rc_rcdata_item *data)
{
- struct res_id ids[3];
- struct res_resource *r;
+ rc_res_id ids[3];
+ rc_res_resource *r;
+ bfd_byte *pb_data;
+ rc_uint_type len_data;
+ /* We have to check if the binary data is parsed specially. */
+ if (type.named == 0)
+ {
+ switch (type.u.id)
+ {
+ case RT_FONTDIR:
+ define_fontdir_rcdata (id, resinfo, data);
+ return;
+ case RT_FONT:
+ define_font_rcdata (id, resinfo, data);
+ return;
+ case RT_ICON:
+ define_icon_rcdata (id, resinfo, data);
+ return;
+ case RT_BITMAP:
+ define_bitmap_rcdata (id, resinfo, data);
+ return;
+ case RT_CURSOR:
+ define_cursor_rcdata (id, resinfo, data);
+ return;
+ case RT_GROUP_ICON:
+ define_group_icon_rcdata (id, resinfo, data);
+ return;
+ case RT_GROUP_CURSOR:
+ define_group_cursor_rcdata (id, resinfo, data);
+ return;
+ case RT_MESSAGETABLE:
+ define_messagetable_rcdata (id, resinfo, data);
+ return;
+ default:
+ /* Treat as normal user-data. */
+ break;
+ }
+ }
ids[0] = type;
ids[1] = id;
ids[2].named = 0;
@@ -1252,19 +1648,25 @@ define_user_data (struct res_id id, struct res_id type,
r = define_resource (& resources, 3, ids, 0);
r->type = RES_TYPE_USERDATA;
- r->u.userdata = data;
+ r->u.userdata = ((rc_rcdata_item *)
+ res_alloc (sizeof (rc_rcdata_item)));
+ r->u.userdata->next = NULL;
+ r->u.userdata->type = RCDATA_BUFFER;
+ pb_data = rcdata_render_as_buffer (data, &len_data);
+ r->u.userdata->u.buffer.length = len_data;
+ r->u.userdata->u.buffer.data = pb_data;
r->res_info = *resinfo;
}
void
-define_rcdata_file (struct res_id id, const struct res_res_info *resinfo,
+define_rcdata_file (rc_res_id id, const rc_res_res_info *resinfo,
const char *filename)
{
- struct rcdata_item *ri;
+ rc_rcdata_item *ri;
FILE *e;
char *real_filename;
struct stat s;
- unsigned char *data;
+ bfd_byte *data;
e = open_file_search (filename, FOPEN_RB, "file", &real_filename);
@@ -1273,14 +1675,14 @@ define_rcdata_file (struct res_id id, const struct res_res_info *resinfo,
fatal (_("stat failed on file `%s': %s"), real_filename,
strerror (errno));
- data = (unsigned char *) res_alloc (s.st_size);
+ data = (bfd_byte *) res_alloc (s.st_size);
get_data (e, data, s.st_size, real_filename);
fclose (e);
free (real_filename);
- ri = (struct rcdata_item *) res_alloc (sizeof *ri);
+ ri = (rc_rcdata_item *) res_alloc (sizeof (rc_rcdata_item));
ri->next = NULL;
ri->type = RCDATA_BUFFER;
ri->u.buffer.length = s.st_size;
@@ -1292,15 +1694,15 @@ define_rcdata_file (struct res_id id, const struct res_res_info *resinfo,
/* Define a user data resource where the data is in a file. */
void
-define_user_file (struct res_id id, struct res_id type,
- const struct res_res_info *resinfo, const char *filename)
+define_user_file (rc_res_id id, rc_res_id type,
+ const rc_res_res_info *resinfo, const char *filename)
{
FILE *e;
char *real_filename;
struct stat s;
- unsigned char *data;
- struct res_id ids[3];
- struct res_resource *r;
+ bfd_byte *data;
+ rc_res_id ids[3];
+ rc_res_resource *r;
e = open_file_search (filename, FOPEN_RB, "file", &real_filename);
@@ -1308,7 +1710,7 @@ define_user_file (struct res_id id, struct res_id type,
fatal (_("stat failed on file `%s': %s"), real_filename,
strerror (errno));
- data = (unsigned char *) res_alloc (s.st_size);
+ data = (bfd_byte *) res_alloc (s.st_size);
get_data (e, data, s.st_size, real_filename);
@@ -1322,8 +1724,8 @@ define_user_file (struct res_id id, struct res_id type,
r = define_resource (&resources, 3, ids, 0);
r->type = RES_TYPE_USERDATA;
- r->u.userdata = ((struct rcdata_item *)
- res_alloc (sizeof (struct rcdata_item)));
+ r->u.userdata = ((rc_rcdata_item *)
+ res_alloc (sizeof (rc_rcdata_item)));
r->u.userdata->next = NULL;
r->u.userdata->type = RCDATA_BUFFER;
r->u.userdata->u.buffer.length = s.st_size;
@@ -1334,16 +1736,16 @@ define_user_file (struct res_id id, struct res_id type,
/* Define a versioninfo resource. */
void
-define_versioninfo (struct res_id id, int language,
- struct fixed_versioninfo *fixedverinfo,
- struct ver_info *verinfo)
+define_versioninfo (rc_res_id id, rc_uint_type language,
+ rc_fixed_versioninfo *fixedverinfo,
+ rc_ver_info *verinfo)
{
- struct res_resource *r;
+ rc_res_resource *r;
r = define_standard_resource (&resources, RT_VERSION, id, language, 0);
r->type = RES_TYPE_VERSIONINFO;
- r->u.versioninfo = ((struct versioninfo *)
- res_alloc (sizeof (struct versioninfo)));
+ r->u.versioninfo = ((rc_versioninfo *)
+ res_alloc (sizeof (rc_versioninfo)));
r->u.versioninfo->fixed = fixedverinfo;
r->u.versioninfo->var = verinfo;
r->res_info.language = language;
@@ -1351,16 +1753,16 @@ define_versioninfo (struct res_id id, int language,
/* Add string version info to a list of version information. */
-struct ver_info *
-append_ver_stringfileinfo (struct ver_info *verinfo, const char *language,
- struct ver_stringinfo *strings)
+rc_ver_info *
+append_ver_stringfileinfo (rc_ver_info *verinfo, const char *language,
+ rc_ver_stringinfo *strings)
{
- struct ver_info *vi, **pp;
+ rc_ver_info *vi, **pp;
- vi = (struct ver_info *) res_alloc (sizeof *vi);
+ vi = (rc_ver_info *) res_alloc (sizeof (rc_ver_info));
vi->next = NULL;
vi->type = VERINFO_STRING;
- unicode_from_ascii ((int *) NULL, &vi->u.string.language, language);
+ unicode_from_ascii ((rc_uint_type *) NULL, &vi->u.string.language, language);
vi->u.string.strings = strings;
for (pp = &verinfo; *pp != NULL; pp = &(*pp)->next)
@@ -1372,16 +1774,16 @@ append_ver_stringfileinfo (struct ver_info *verinfo, const char *language,
/* Add variable version info to a list of version information. */
-struct ver_info *
-append_ver_varfileinfo (struct ver_info *verinfo, const char *key,
- struct ver_varinfo *var)
+rc_ver_info *
+append_ver_varfileinfo (rc_ver_info *verinfo, const unichar *key,
+ rc_ver_varinfo *var)
{
- struct ver_info *vi, **pp;
+ rc_ver_info *vi, **pp;
- vi = (struct ver_info *) res_alloc (sizeof *vi);
+ vi = (rc_ver_info *) res_alloc (sizeof *vi);
vi->next = NULL;
vi->type = VERINFO_VAR;
- unicode_from_ascii ((int *) NULL, &vi->u.var.key, key);
+ vi->u.var.key = unichar_dup (key);
vi->u.var.var = var;
for (pp = &verinfo; *pp != NULL; pp = &(*pp)->next)
@@ -1393,16 +1795,16 @@ append_ver_varfileinfo (struct ver_info *verinfo, const char *key,
/* Append version string information to a list. */
-struct ver_stringinfo *
-append_verval (struct ver_stringinfo *strings, const char *key,
- const char *value)
+rc_ver_stringinfo *
+append_verval (rc_ver_stringinfo *strings, const unichar *key,
+ const unichar *value)
{
- struct ver_stringinfo *vs, **pp;
+ rc_ver_stringinfo *vs, **pp;
- vs = (struct ver_stringinfo *) res_alloc (sizeof *vs);
+ vs = (rc_ver_stringinfo *) res_alloc (sizeof (rc_ver_stringinfo));
vs->next = NULL;
- unicode_from_ascii ((int *) NULL, &vs->key, key);
- unicode_from_ascii ((int *) NULL, &vs->value, value);
+ vs->key = unichar_dup (key);
+ vs->value = unichar_dup (value);
for (pp = &strings; *pp != NULL; pp = &(*pp)->next)
;
@@ -1413,13 +1815,13 @@ append_verval (struct ver_stringinfo *strings, const char *key,
/* Append version variable information to a list. */
-struct ver_varinfo *
-append_vertrans (struct ver_varinfo *var, unsigned long language,
- unsigned long charset)
+rc_ver_varinfo *
+append_vertrans (rc_ver_varinfo *var, rc_uint_type language,
+ rc_uint_type charset)
{
- struct ver_varinfo *vv, **pp;
+ rc_ver_varinfo *vv, **pp;
- vv = (struct ver_varinfo *) res_alloc (sizeof *vv);
+ vv = (rc_ver_varinfo *) res_alloc (sizeof (rc_ver_varinfo));
vv->next = NULL;
vv->language = language;
vv->charset = charset;
@@ -1434,29 +1836,28 @@ append_vertrans (struct ver_varinfo *var, unsigned long language,
/* Local functions used to write out an rc file. */
static void indent (FILE *, int);
-static void write_rc_directory
- (FILE *, const struct res_directory *, const struct res_id *,
- const struct res_id *, int *, int);
-static void write_rc_subdir
- (FILE *, const struct res_entry *, const struct res_id *,
- const struct res_id *, int *, int);
-static void write_rc_resource
- (FILE *, const struct res_id *, const struct res_id *,
- const struct res_resource *, int *);
-static void write_rc_accelerators (FILE *, const struct accelerator *);
-static void write_rc_cursor (FILE *, const struct cursor *);
-static void write_rc_group_cursor (FILE *, const struct group_cursor *);
-static void write_rc_dialog (FILE *, const struct dialog *);
-static void write_rc_dialog_control (FILE *, const struct dialog_control *);
-static void write_rc_fontdir (FILE *, const struct fontdir *);
-static void write_rc_group_icon (FILE *, const struct group_icon *);
-static void write_rc_menu (FILE *, const struct menu *, int);
-static void write_rc_menuitems (FILE *, const struct menuitem *, int, int);
-static void write_rc_rcdata (FILE *, const struct rcdata_item *, int);
-static void write_rc_stringtable
- (FILE *, const struct res_id *, const struct stringtable *);
-static void write_rc_versioninfo (FILE *, const struct versioninfo *);
-static void write_rc_filedata (FILE *, unsigned long, const unsigned char *);
+static void write_rc_directory (FILE *, const rc_res_directory *, const rc_res_id *,
+ const rc_res_id *, rc_uint_type *, int);
+static void write_rc_subdir (FILE *, const rc_res_entry *, const rc_res_id *,
+ const rc_res_id *, rc_uint_type *, int);
+static void write_rc_resource (FILE *, const rc_res_id *, const rc_res_id *,
+ const rc_res_resource *, rc_uint_type *);
+static void write_rc_accelerators (FILE *, const rc_accelerator *);
+static void write_rc_cursor (FILE *, const rc_cursor *);
+static void write_rc_group_cursor (FILE *, const rc_group_cursor *);
+static void write_rc_dialog (FILE *, const rc_dialog *);
+static void write_rc_dialog_control (FILE *, const rc_dialog_control *);
+static void write_rc_fontdir (FILE *, const rc_fontdir *);
+static void write_rc_group_icon (FILE *, const rc_group_icon *);
+static void write_rc_menu (FILE *, const rc_menu *, int);
+static void write_rc_toolbar (FILE *, const rc_toolbar *);
+static void write_rc_menuitems (FILE *, const rc_menuitem *, int, int);
+static void write_rc_messagetable (FILE *, rc_uint_type , const bfd_byte *);
+
+static void write_rc_datablock (FILE *, rc_uint_type , const bfd_byte *, int, int, int);
+static void write_rc_rcdata (FILE *, const rc_rcdata_item *, int);
+static void write_rc_stringtable (FILE *, const rc_res_id *, const rc_stringtable *);
+static void write_rc_versioninfo (FILE *, const rc_versioninfo *);
/* Indent a given number of spaces. */
@@ -1471,19 +1872,15 @@ indent (FILE *e, int c)
/* Dump the resources we have read in the format of an rc file.
- Actually, we don't use the format of an rc file, because it's way
- too much of a pain--for example, we'd have to write icon resources
- into a file and refer to that file. We just generate a readable
- format that kind of looks like an rc file, and is useful for
- understanding the contents of a resource file. Someday we may want
- to generate an rc file which the rc compiler can read; if that day
- comes, this code will have to be fixed up. */
+ Reasoned by the fact, that some resources need to be stored into file and
+ refer to that file, we use the user-data model for that to express it binary
+ without the need to store it somewhere externally. */
void
-write_rc_file (const char *filename, const struct res_directory *resources)
+write_rc_file (const char *filename, const rc_res_directory *resources)
{
FILE *e;
- int language;
+ rc_uint_type language;
if (filename == NULL)
e = stdout;
@@ -1494,9 +1891,9 @@ write_rc_file (const char *filename, const struct res_directory *resources)
fatal (_("can't open `%s' for output: %s"), filename, strerror (errno));
}
- language = -1;
- write_rc_directory (e, resources, (const struct res_id *) NULL,
- (const struct res_id *) NULL, &language, 1);
+ language = (rc_uint_type) ((bfd_signed_vma) -1);
+ write_rc_directory (e, resources, (const rc_res_id *) NULL,
+ (const rc_res_id *) NULL, &language, 1);
}
/* Write out a directory. E is the file to write to. RD is the
@@ -1506,20 +1903,23 @@ write_rc_file (const char *filename, const struct res_directory *resources)
language. LEVEL is the level in the tree. */
static void
-write_rc_directory (FILE *e, const struct res_directory *rd,
- const struct res_id *type, const struct res_id *name,
- int *language, int level)
+write_rc_directory (FILE *e, const rc_res_directory *rd,
+ const rc_res_id *type, const rc_res_id *name,
+ rc_uint_type *language, int level)
{
- const struct res_entry *re;
+ const rc_res_entry *re;
/* Print out some COFF information that rc files can't represent. */
-
+ if (rd->time != 0 || rd->characteristics != 0 || rd->major != 0 || rd->minor != 0)
+ {
+ wr_printcomment (e, "COFF information not part of RC");
if (rd->time != 0)
- fprintf (e, "// Time stamp: %lu\n", rd->time);
+ wr_printcomment (e, "Time stamp: %u", rd->time);
if (rd->characteristics != 0)
- fprintf (e, "// Characteristics: %lu\n", rd->characteristics);
+ wr_printcomment (e, "Characteristics: %u", rd->characteristics);
if (rd->major != 0 || rd->minor != 0)
- fprintf (e, "// Version: %d %d\n", rd->major, rd->minor);
+ wr_printcomment (e, "Version major:%d minor:%d", rd->major, rd->minor);
+ }
for (re = rd->entries; re != NULL; re = re->next)
{
@@ -1546,7 +1946,7 @@ write_rc_directory (FILE *e, const struct res_directory *rd,
&& re->id.u.id != (unsigned long) (unsigned int) *language
&& (re->id.u.id & 0xffff) == re->id.u.id)
{
- fprintf (e, "LANGUAGE %lu, %lu\n",
+ wr_print (e, "LANGUAGE %u, %u\n",
re->id.u.id & ((1 << SUBLANG_SHIFT) - 1),
(re->id.u.id >> SUBLANG_SHIFT) & 0xff);
*language = re->id.u.id;
@@ -1572,12 +1972,16 @@ write_rc_directory (FILE *e, const struct res_directory *rd,
}
else
{
- fprintf (e, "// Resource at unexpected level %d\n", level);
- write_rc_resource (e, type, (struct res_id *) NULL, re->u.res,
+ wr_printcomment (e, "Resource at unexpected level %d", level);
+ write_rc_resource (e, type, (rc_res_id *) NULL, re->u.res,
language);
}
}
}
+ if (rd->entries == NULL)
+ {
+ wr_print_flush (e);
+ }
}
/* Write out a subdirectory entry. E is the file to write to. RE is
@@ -1586,15 +1990,15 @@ write_rc_directory (FILE *e, const struct res_directory *rd,
LEVEL is the level in the tree. */
static void
-write_rc_subdir (FILE *e, const struct res_entry *re,
- const struct res_id *type, const struct res_id *name,
- int *language, int level)
+write_rc_subdir (FILE *e, const rc_res_entry *re,
+ const rc_res_id *type, const rc_res_id *name,
+ rc_uint_type *language, int level)
{
fprintf (e, "\n");
switch (level)
{
case 1:
- fprintf (e, "// Type: ");
+ wr_printcomment (e, "Type: ");
if (re->id.named)
res_id_print (e, re->id, 1);
else
@@ -1622,6 +2026,8 @@ write_rc_subdir (FILE *e, const struct res_entry *re,
case RT_VXD: s = "vxd"; break;
case RT_ANICURSOR: s = "anicursor"; break;
case RT_ANIICON: s = "aniicon"; break;
+ case RT_TOOLBAR: s = "toolbar"; break;
+ case RT_HTML: s = "html"; break;
default: s = NULL; break;
}
@@ -1630,25 +2036,21 @@ write_rc_subdir (FILE *e, const struct res_entry *re,
else
res_id_print (e, re->id, 1);
}
- fprintf (e, "\n");
break;
case 2:
- fprintf (e, "// Name: ");
+ wr_printcomment (e, "Name: ");
res_id_print (e, re->id, 1);
- fprintf (e, "\n");
break;
case 3:
- fprintf (e, "// Language: ");
+ wr_printcomment (e, "Language: ");
res_id_print (e, re->id, 1);
- fprintf (e, "\n");
break;
default:
- fprintf (e, "// Level %d: ", level);
+ wr_printcomment (e, "Level %d: ", level);
res_id_print (e, re->id, 1);
- fprintf (e, "\n");
}
write_rc_directory (e, re->u.dir, type, name, language, level + 1);
@@ -1661,38 +2063,36 @@ write_rc_subdir (FILE *e, const struct res_entry *re,
language. */
static void
-write_rc_resource (FILE *e, const struct res_id *type,
- const struct res_id *name, const struct res_resource *res,
- int *language)
+write_rc_resource (FILE *e, const rc_res_id *type,
+ const rc_res_id *name, const rc_res_resource *res,
+ rc_uint_type *language)
{
const char *s;
int rt;
int menuex = 0;
- fprintf (e, "\n");
-
switch (res->type)
{
default:
abort ();
case RES_TYPE_ACCELERATOR:
- s = "ACCELERATOR";
+ s = "ACCELERATORS";
rt = RT_ACCELERATOR;
break;
case RES_TYPE_BITMAP:
- s = "BITMAP";
+ s = "2 /* RT_BITMAP */";
rt = RT_BITMAP;
break;
case RES_TYPE_CURSOR:
- s = "CURSOR";
+ s = "1 /* RT_CURSOR */";
rt = RT_CURSOR;
break;
case RES_TYPE_GROUP_CURSOR:
- s = "GROUP_CURSOR";
+ s = "12 /* RT_GROUP_CURSOR */";
rt = RT_GROUP_CURSOR;
break;
@@ -1705,22 +2105,22 @@ write_rc_resource (FILE *e, const struct res_id *type,
break;
case RES_TYPE_FONT:
- s = "FONT";
+ s = "8 /* RT_FONT */";
rt = RT_FONT;
break;
case RES_TYPE_FONTDIR:
- s = "FONTDIR";
+ s = "7 /* RT_FONTDIR */";
rt = RT_FONTDIR;
break;
case RES_TYPE_ICON:
- s = "ICON";
+ s = "3 /* RT_ICON */";
rt = RT_ICON;
break;
case RES_TYPE_GROUP_ICON:
- s = "GROUP_ICON";
+ s = "14 /* RT_GROUP_ICON */";
rt = RT_GROUP_ICON;
break;
@@ -1739,7 +2139,7 @@ write_rc_resource (FILE *e, const struct res_id *type,
break;
case RES_TYPE_MESSAGETABLE:
- s = "MESSAGETABLE";
+ s = "11 /* RT_MESSAGETABLE */";
rt = RT_MESSAGETABLE;
break;
@@ -1762,32 +2162,76 @@ write_rc_resource (FILE *e, const struct res_id *type,
s = "VERSIONINFO";
rt = RT_VERSION;
break;
+
+ case RES_TYPE_TOOLBAR:
+ s = "TOOLBAR";
+ rt = RT_TOOLBAR;
+ break;
}
if (rt != 0
&& type != NULL
&& (type->named || type->u.id != (unsigned long) rt))
{
- fprintf (e, "// Unexpected resource type mismatch: ");
+ wr_printcomment (e, "Unexpected resource type mismatch: ");
res_id_print (e, *type, 1);
fprintf (e, " != %d", rt);
}
if (res->coff_info.codepage != 0)
- fprintf (e, "// Code page: %lu\n", res->coff_info.codepage);
+ wr_printcomment (e, "Code page: %u", res->coff_info.codepage);
if (res->coff_info.reserved != 0)
- fprintf (e, "// COFF reserved value: %lu\n", res->coff_info.reserved);
+ wr_printcomment (e, "COFF reserved value: %u", res->coff_info.reserved);
+ wr_print (e, "\n");
+ if (rt == RT_STRING)
+ ;
+ else
+ {
if (name != NULL)
- res_id_print (e, *name, 0);
+ res_id_print (e, *name, 1);
else
fprintf (e, "??Unknown-Name??");
-
fprintf (e, " ");
+ }
+
if (s != NULL)
fprintf (e, "%s", s);
else if (type != NULL)
+ {
+ if (type->named == 0)
+ {
+#define PRINT_RT_NAME(NAME) case NAME: \
+ fprintf (e, "%u /* %s */", (unsigned int) NAME, #NAME); \
+ break
+
+ switch (type->u.id)
+ {
+ default:
res_id_print (e, *type, 0);
+ break;
+
+ PRINT_RT_NAME(RT_MANIFEST);
+ PRINT_RT_NAME(RT_ANICURSOR);
+ PRINT_RT_NAME(RT_ANIICON);
+ PRINT_RT_NAME(RT_RCDATA);
+ PRINT_RT_NAME(RT_ICON);
+ PRINT_RT_NAME(RT_CURSOR);
+ PRINT_RT_NAME(RT_BITMAP);
+ PRINT_RT_NAME(RT_PLUGPLAY);
+ PRINT_RT_NAME(RT_VXD);
+ PRINT_RT_NAME(RT_FONT);
+ PRINT_RT_NAME(RT_FONTDIR);
+ PRINT_RT_NAME(RT_HTML);
+ PRINT_RT_NAME(RT_MESSAGETABLE);
+ PRINT_RT_NAME(RT_DLGINCLUDE);
+ PRINT_RT_NAME(RT_DLGINIT);
+ }
+#undef PRINT_RT_NAME
+ }
+ else
+ res_id_print (e, *type, 1);
+ }
else
fprintf (e, "??Unknown-Type??");
@@ -1805,11 +2249,17 @@ write_rc_resource (FILE *e, const struct res_id *type,
if (res->type == RES_TYPE_DIALOG)
{
- fprintf (e, " %d, %d, %d, %d", res->u.dialog->x, res->u.dialog->y,
- res->u.dialog->width, res->u.dialog->height);
+ fprintf (e, " %d, %d, %d, %d",
+ (int) res->u.dialog->x, (int) res->u.dialog->y,
+ (int) res->u.dialog->width, (int) res->u.dialog->height);
if (res->u.dialog->ex != NULL
&& res->u.dialog->ex->help != 0)
- fprintf (e, ", %lu", res->u.dialog->ex->help);
+ fprintf (e, ", %u", (unsigned int) res->u.dialog->ex->help);
+ }
+ else if (res->type == RES_TYPE_TOOLBAR)
+ {
+ fprintf (e, " %d, %d", (int) res->u.toolbar->button_width,
+ (int) res->u.toolbar->button_height);
}
fprintf (e, "\n");
@@ -1838,16 +2288,16 @@ write_rc_resource (FILE *e, const struct res_id *type,
if (res->res_info.language != 0 && res->res_info.language != *language)
fprintf (e, "%sLANGUAGE %d, %d\n",
modifiers ? "// " : "",
- res->res_info.language & ((1<<SUBLANG_SHIFT)-1),
- (res->res_info.language >> SUBLANG_SHIFT) & 0xff);
+ (int) res->res_info.language & ((1<<SUBLANG_SHIFT)-1),
+ (int) (res->res_info.language >> SUBLANG_SHIFT) & 0xff);
if (res->res_info.characteristics != 0)
- fprintf (e, "%sCHARACTERISTICS %lu\n",
+ fprintf (e, "%sCHARACTERISTICS %u\n",
modifiers ? "// " : "",
- res->res_info.characteristics);
+ (unsigned int) res->res_info.characteristics);
if (res->res_info.version != 0)
- fprintf (e, "%sVERSION %lu\n",
+ fprintf (e, "%sVERSION %u\n",
modifiers ? "// " : "",
- res->res_info.version);
+ (unsigned int) res->res_info.version);
}
switch (res->type)
@@ -1895,6 +2345,10 @@ write_rc_resource (FILE *e, const struct res_id *type,
write_rc_rcdata (e, res->u.userdata, 0);
break;
+ case RES_TYPE_TOOLBAR:
+ write_rc_toolbar (e, res->u.toolbar);
+ break;
+
case RES_TYPE_VERSIONINFO:
write_rc_versioninfo (e, res->u.versioninfo);
break;
@@ -1902,8 +2356,10 @@ write_rc_resource (FILE *e, const struct res_id *type,
case RES_TYPE_BITMAP:
case RES_TYPE_FONT:
case RES_TYPE_ICON:
+ write_rc_datablock (e, res->u.data.length, res->u.data.data, 0, 1, 0);
+ break;
case RES_TYPE_MESSAGETABLE:
- write_rc_filedata (e, res->u.data.length, res->u.data.data);
+ write_rc_messagetable (e, res->u.data.length, res->u.data.data);
break;
}
}
@@ -1911,9 +2367,9 @@ write_rc_resource (FILE *e, const struct res_id *type,
/* Write out accelerator information. */
static void
-write_rc_accelerators (FILE *e, const struct accelerator *accelerators)
+write_rc_accelerators (FILE *e, const rc_accelerator *accelerators)
{
- const struct accelerator *acc;
+ const rc_accelerator *acc;
fprintf (e, "BEGIN\n");
for (acc = accelerators; acc != NULL; acc = acc->next)
@@ -1926,16 +2382,16 @@ write_rc_accelerators (FILE *e, const struct accelerator *accelerators)
&& ISPRINT (acc->key)
&& (acc->flags & ACC_VIRTKEY) == 0)
{
- fprintf (e, "\"%c\"", acc->key);
+ fprintf (e, "\"%c\"", (char) acc->key);
printable = 1;
}
else
{
- fprintf (e, "%d", acc->key);
+ fprintf (e, "%d", (int) acc->key);
printable = 0;
}
- fprintf (e, ", %d", acc->id);
+ fprintf (e, ", %d", (int) acc->id);
if (! printable)
{
@@ -1962,41 +2418,60 @@ write_rc_accelerators (FILE *e, const struct accelerator *accelerators)
file, which the rc file would include. */
static void
-write_rc_cursor (FILE *e, const struct cursor *cursor)
+write_rc_cursor (FILE *e, const rc_cursor *cursor)
{
- fprintf (e, "// Hotspot: x: %d; y: %d\n", cursor->xhotspot,
- cursor->yhotspot);
- write_rc_filedata (e, cursor->length, cursor->data);
+ fprintf (e, "BEGIN\n");
+ indent (e, 2);
+ fprintf (e, " 0x%x, 0x%x,\t/* Hotspot x: %d, y: %d. */\n",
+ (unsigned int) cursor->xhotspot, (unsigned int) cursor->yhotspot,
+ (int) cursor->xhotspot, (int) cursor->yhotspot);
+ write_rc_datablock (e, (rc_uint_type) cursor->length, (const bfd_byte *) cursor->data,
+ 0, 0, 0);
+ fprintf (e, "END\n");
}
/* Write out group cursor data. This would normally be built from the
cursor data. */
static void
-write_rc_group_cursor (FILE *e, const struct group_cursor *group_cursor)
+write_rc_group_cursor (FILE *e, const rc_group_cursor *group_cursor)
{
- const struct group_cursor *gc;
+ const rc_group_cursor *gc;
+ int c;
- for (gc = group_cursor; gc != NULL; gc = gc->next)
+ for (c = 0, gc = group_cursor; gc != NULL; gc = gc->next, c++)
+ ;
+ fprintf (e, "BEGIN\n");
+
+ indent (e, 2);
+ fprintf (e, "0, 2, %d%s\t /* Having %d items. */\n", c, (c != 0 ? "," : ""), c);
+ indent (e, 4);
+ fprintf (e, "/* width, height, planes, bits, bytes, index. */\n");
+
+ for (c = 1, gc = group_cursor; gc != NULL; gc = gc->next, c++)
{
- fprintf (e, "// width: %d; height %d; planes %d; bits %d\n",
- gc->width, gc->height, gc->planes, gc->bits);
- fprintf (e, "// data bytes: %lu; index: %d\n",
- gc->bytes, gc->index);
+ indent (e, 4);
+ fprintf (e, "%d, %d, %d, %d, 0x%xL, %d%s /* Element %d. */\n",
+ (int) gc->width, (int) gc->height, (int) gc->planes, (int) gc->bits,
+ (unsigned int) gc->bytes, (int) gc->index, (gc->next != NULL ? "," : ""), c);
+ fprintf (e, "/* width: %d; height %d; planes %d; bits %d. */\n",
+ (int) gc->width, (int) gc->height, (int) gc->planes,
+ (int) gc->bits);
}
+ fprintf (e, "END\n");
}
/* Write dialog data. */
static void
-write_rc_dialog (FILE *e, const struct dialog *dialog)
+write_rc_dialog (FILE *e, const rc_dialog *dialog)
{
- const struct dialog_control *control;
+ const rc_dialog_control *control;
- fprintf (e, "STYLE 0x%lx\n", dialog->style);
+ fprintf (e, "STYLE 0x%x\n", dialog->style);
if (dialog->exstyle != 0)
- fprintf (e, "EXSTYLE 0x%lx\n", dialog->exstyle);
+ fprintf (e, "EXSTYLE 0x%x\n", (unsigned int) dialog->exstyle);
if ((dialog->class.named && dialog->class.u.n.length > 0)
|| dialog->class.u.id != 0)
@@ -2008,9 +2483,9 @@ write_rc_dialog (FILE *e, const struct dialog *dialog)
if (dialog->caption != NULL)
{
- fprintf (e, "CAPTION \"");
- unicode_print (e, dialog->caption, -1);
- fprintf (e, "\"\n");
+ fprintf (e, "CAPTION ");
+ unicode_print_quoted (e, dialog->caption, -1);
+ fprintf (e, "\n");
}
if ((dialog->menu.named && dialog->menu.u.n.length > 0)
@@ -2023,15 +2498,16 @@ write_rc_dialog (FILE *e, const struct dialog *dialog)
if (dialog->font != NULL)
{
- fprintf (e, "FONT %d, \"", dialog->pointsize);
- unicode_print (e, dialog->font, -1);
- fprintf (e, "\"");
+ fprintf (e, "FONT %d, ", (int) dialog->pointsize);
+ unicode_print_quoted (e, dialog->font, -1);
if (dialog->ex != NULL
&& (dialog->ex->weight != 0
|| dialog->ex->italic != 0
|| dialog->ex->charset != 1))
fprintf (e, ", %d, %d, %d",
- dialog->ex->weight, dialog->ex->italic, dialog->ex->charset);
+ (int) dialog->ex->weight,
+ (int) dialog->ex->italic,
+ (int) dialog->ex->charset);
fprintf (e, "\n");
}
@@ -2082,7 +2558,7 @@ static const struct control_info control_info[] =
/* Write a dialog control. */
static void
-write_rc_dialog_control (FILE *e, const struct dialog_control *control)
+write_rc_dialog_control (FILE *e, const rc_dialog_control *control)
{
const struct control_info *ci;
@@ -2103,7 +2579,10 @@ write_rc_dialog_control (FILE *e, const struct dialog_control *control)
else if (ci->name != NULL)
fprintf (e, "%s", ci->name);
else
+ {
fprintf (e, "CONTROL");
+ ci = NULL;
+ }
if (control->text.named || control->text.u.id != 0)
{
@@ -2112,7 +2591,7 @@ write_rc_dialog_control (FILE *e, const struct dialog_control *control)
fprintf (e, ",");
}
- fprintf (e, " %d, ", control->id);
+ fprintf (e, " %d, ", (int) control->id);
if (ci == NULL)
{
@@ -2121,10 +2600,10 @@ write_rc_dialog_control (FILE *e, const struct dialog_control *control)
res_id_print (e, control->class, 0);
if (control->class.named)
fprintf (e, "\"");
- fprintf (e, ", 0x%lx, ", control->style);
+ fprintf (e, ", 0x%x, ", (unsigned int) control->style);
}
- fprintf (e, "%d, %d", control->x, control->y);
+ fprintf (e, "%d, %d", (int) control->x, (int) control->y);
if (control->style != SS_ICON
|| control->exstyle != 0
@@ -2132,15 +2611,17 @@ write_rc_dialog_control (FILE *e, const struct dialog_control *control)
|| control->height != 0
|| control->help != 0)
{
- fprintf (e, ", %d, %d", control->width, control->height);
+ fprintf (e, ", %d, %d", (int) control->width, (int) control->height);
/* FIXME: We don't need to print the style if it is the default.
More importantly, in certain cases we actually need to turn
off parts of the forced style, by using NOT. */
- fprintf (e, ", 0x%lx", control->style);
+ if (ci != NULL)
+ fprintf (e, ", 0x%x", (unsigned int) control->style);
if (control->exstyle != 0 || control->help != 0)
- fprintf (e, ", 0x%lx, %lu", control->exstyle, control->help);
+ fprintf (e, ", 0x%x, %u", (unsigned int) control->exstyle,
+ (unsigned int) control->help);
}
fprintf (e, "\n");
@@ -2153,51 +2634,93 @@ write_rc_dialog_control (FILE *e, const struct dialog_control *control)
the font data. */
static void
-write_rc_fontdir (FILE *e, const struct fontdir *fontdir)
+write_rc_fontdir (FILE *e, const rc_fontdir *fontdir)
{
- const struct fontdir *fc;
+ const rc_fontdir *fc;
+ int c;
- for (fc = fontdir; fc != NULL; fc = fc->next)
+ for (c = 0, fc = fontdir; fc != NULL; fc = fc->next, c++)
+ ;
+ fprintf (e, "BEGIN\n");
+ indent (e, 2);
+ fprintf (e, "%d%s\t /* Has %d elements. */\n", c, (c != 0 ? "," : ""), c);
+ for (c = 1, fc = fontdir; fc != NULL; fc = fc->next, c++)
{
- fprintf (e, "// Font index: %d\n", fc->index);
- write_rc_filedata (e, fc->length, fc->data);
+ indent (e, 4);
+ fprintf (e, "%d,\t/* Font no %d with index %d. */\n",
+ (int) fc->index, c, (int) fc->index);
+ write_rc_datablock (e, (rc_uint_type) fc->length - 2,
+ (const bfd_byte *) fc->data + 4,fc->next != NULL,
+ 0, 0);
}
+ fprintf (e, "END\n");
}
/* Write out group icon data. This would normally be built from the
icon data. */
static void
-write_rc_group_icon (FILE *e, const struct group_icon *group_icon)
+write_rc_group_icon (FILE *e, const rc_group_icon *group_icon)
{
- const struct group_icon *gi;
+ const rc_group_icon *gi;
+ int c;
- for (gi = group_icon; gi != NULL; gi = gi->next)
+ for (c = 0, gi = group_icon; gi != NULL; gi = gi->next, c++)
+ ;
+
+ fprintf (e, "BEGIN\n");
+ indent (e, 2);
+ fprintf (e, " 0, 1, %d%s\t /* Has %d elements. */\n", c, (c != 0 ? "," : ""), c);
+
+ indent (e, 4);
+ fprintf (e, "/* \"width height colors pad\", planes, bits, bytes, index. */\n");
+ for (c = 1, gi = group_icon; gi != NULL; gi = gi->next, c++)
{
- fprintf (e, "// width: %d; height %d; colors: %d; planes %d; bits %d\n",
- gi->width, gi->height, gi->colors, gi->planes, gi->bits);
- fprintf (e, "// data bytes: %lu; index: %d\n",
- gi->bytes, gi->index);
+ indent (e, 4);
+ fprintf (e, "\"\\%03o\\%03o\\%03o\\%03o\", %d, %d, 0x%xL, %d%s\t/* Element no %d. */\n",
+ gi->width, gi->height, gi->colors, 0, (int) gi->planes, (int) gi->bits,
+ (unsigned int) gi->bytes, (int) gi->index, (gi->next != NULL ? "," : ""), c);
}
+ fprintf (e, "END\n");
}
/* Write out a menu resource. */
static void
-write_rc_menu (FILE *e, const struct menu *menu, int menuex)
+write_rc_menu (FILE *e, const rc_menu *menu, int menuex)
{
if (menu->help != 0)
- fprintf (e, "// Help ID: %lu\n", menu->help);
+ fprintf (e, "// Help ID: %u\n", (unsigned int) menu->help);
write_rc_menuitems (e, menu->items, menuex, 0);
}
+static void
+write_rc_toolbar (FILE *e, const rc_toolbar *tb)
+{
+ rc_toolbar_item *it;
+ indent (e, 0);
+ fprintf (e, "BEGIN\n");
+ it = tb->items;
+ while(it != NULL)
+ {
+ indent (e, 2);
+ if (it->id.u.id == 0)
+ fprintf (e, "SEPARATOR\n");
+ else
+ fprintf (e, "BUTTON %d\n", (int) it->id.u.id);
+ it = it->next;
+ }
+ indent (e, 0);
+ fprintf (e, "END\n");
+}
+
/* Write out menuitems. */
static void
-write_rc_menuitems (FILE *e, const struct menuitem *menuitems, int menuex,
+write_rc_menuitems (FILE *e, const rc_menuitem *menuitems, int menuex,
int ind)
{
- const struct menuitem *mi;
+ const rc_menuitem *mi;
indent (e, ind);
fprintf (e, "BEGIN\n");
@@ -2225,15 +2748,14 @@ write_rc_menuitems (FILE *e, const struct menuitem *menuitems, int menuex,
fprintf (e, " \"\"");
else
{
- fprintf (e, " \"");
- unicode_print (e, mi->text, -1);
- fprintf (e, "\"");
+ fprintf (e, " ");
+ unicode_print_quoted (e, mi->text, -1);
}
if (! menuex)
{
if (mi->popup == NULL)
- fprintf (e, ", %d", mi->id);
+ fprintf (e, ", %d", (int) mi->id);
if ((mi->type & MENUITEM_CHECKED) != 0)
fprintf (e, ", CHECKED");
@@ -2252,15 +2774,15 @@ write_rc_menuitems (FILE *e, const struct menuitem *menuitems, int menuex,
{
if (mi->id != 0 || mi->type != 0 || mi->state != 0 || mi->help != 0)
{
- fprintf (e, ", %d", mi->id);
+ fprintf (e, ", %d", (int) mi->id);
if (mi->type != 0 || mi->state != 0 || mi->help != 0)
{
- fprintf (e, ", %lu", mi->type);
+ fprintf (e, ", %u", (unsigned int) mi->type);
if (mi->state != 0 || mi->help != 0)
{
- fprintf (e, ", %lu", mi->state);
+ fprintf (e, ", %u", (unsigned int) mi->state);
if (mi->help != 0)
- fprintf (e, ", %lu", mi->help);
+ fprintf (e, ", %u", (unsigned int) mi->help);
}
}
}
@@ -2276,158 +2798,332 @@ write_rc_menuitems (FILE *e, const struct menuitem *menuitems, int menuex,
fprintf (e, "END\n");
}
-/* Write out an rcdata resource. This is also used for other types of
- resources that need to print arbitrary data. */
-
-static void
-write_rc_rcdata (FILE *e, const struct rcdata_item *rcdata, int ind)
+static int
+test_rc_datablock_unicode (rc_uint_type length, const bfd_byte *data)
{
- const struct rcdata_item *ri;
+ rc_uint_type i;
+ if ((length & 1) != 0)
+ return 0;
- indent (e, ind);
- fprintf (e, "BEGIN\n");
+ for (i = 0; i < length; i += 2)
+ {
+ if (data[i] == 0 && data[i + 1] == 0 && (i + 2) < length)
+ return 0;
+ if (data[i] == 0xff && data[i + 1] == 0xff)
+ return 0;
+ }
+ return 1;
+}
- for (ri = rcdata; ri != NULL; ri = ri->next)
+static int
+test_rc_datablock_text (rc_uint_type length, const bfd_byte *data)
+{
+ int has_nl;
+ rc_uint_type c;
+ rc_uint_type i;
+
+ if (length <= 1)
+ return 0;
+
+ has_nl = 0;
+ for (i = 0, c = 0; i < length; i++)
{
- if (ri->type == RCDATA_BUFFER && ri->u.buffer.length == 0)
- continue;
+ if (! ISPRINT (data[i]) && data[i] != '\n'
+ && ! (data[i] == '\r' && (i + 1) < length && data[i + 1] == '\n')
+ && data[i] != '\t'
+ && ! (data[i] == 0 && (i + 1) != length))
+ {
+ if (data[i] <= 7)
+ return 0;
+ c++;
+ }
+ else if (data[i] == '\n') has_nl++;
+ }
+ if (length > 80 && ! has_nl)
+ return 0;
+ c = (((c * 10000) + (i / 100) - 1)) / i;
+ if (c >= 150)
+ return 0;
+ return 1;
+}
- indent (e, ind + 2);
+static void
+write_rc_messagetable (FILE *e, rc_uint_type length, const bfd_byte *data)
+{
+ int has_error = 0;
+ const struct bin_messagetable *mt;
+ fprintf (e, "BEGIN\n");
- switch (ri->type)
- {
- default:
- abort ();
+ write_rc_datablock (e, length, data, 0, 0, 0);
- case RCDATA_WORD:
- fprintf (e, "%d", ri->u.word);
+ fprintf (e, "\n");
+ wr_printcomment (e, "MC syntax dump");
+ if (length < BIN_MESSAGETABLE_SIZE)
+ has_error = 1;
+ else
+ do {
+ rc_uint_type m, i;
+ mt = (const struct bin_messagetable *) data;
+ m = windres_get_32 (&wrtarget, mt->cblocks, length);
+ if (length < (BIN_MESSAGETABLE_SIZE + m * BIN_MESSAGETABLE_BLOCK_SIZE))
+ {
+ has_error = 1;
break;
+ }
+ for (i = 0; i < m; i++)
+ {
+ rc_uint_type low, high, offset;
+ const struct bin_messagetable_item *mti;
- case RCDATA_DWORD:
- fprintf (e, "%luL", ri->u.dword);
+ low = windres_get_32 (&wrtarget, mt->items[i].lowid, 4);
+ high = windres_get_32 (&wrtarget, mt->items[i].highid, 4);
+ offset = windres_get_32 (&wrtarget, mt->items[i].offset, 4);
+ while (low <= high)
+ {
+ rc_uint_type elen, flags;
+ if ((offset + BIN_MESSAGETABLE_ITEM_SIZE) > length)
+ {
+ has_error = 1;
break;
+ }
+ mti = (const struct bin_messagetable_item *) &data[offset];
+ elen = windres_get_16 (&wrtarget, mti->length, 2);
+ flags = windres_get_16 (&wrtarget, mti->flags, 2);
+ if ((offset + elen) > length)
+ {
+ has_error = 1;
+ break;
+ }
+ wr_printcomment (e, "MessageId = 0x%x", low);
+ wr_printcomment (e, "");
+ if ((flags & MESSAGE_RESOURCE_UNICODE) == MESSAGE_RESOURCE_UNICODE)
+ unicode_print (e, (const unichar *) mti->data,
+ (elen - BIN_MESSAGETABLE_ITEM_SIZE) / 2);
+ else
+ ascii_print (e, (const char *) mti->data,
+ (elen - BIN_MESSAGETABLE_ITEM_SIZE));
+ wr_printcomment (e,"");
+ ++low;
+ offset += elen;
+ }
+ }
+ } while (0);
+ if (has_error)
+ wr_printcomment (e, "Illegal data");
+ wr_print_flush (e);
+ fprintf (e, "END\n");
+}
- case RCDATA_STRING:
- {
- const char *s;
- unsigned long i;
+static void
+write_rc_datablock (FILE *e, rc_uint_type length, const bfd_byte *data, int has_next,
+ int hasblock, int show_comment)
+{
+ int plen;
+ if (hasblock)
+ fprintf (e, "BEGIN\n");
+
+ if (show_comment == -1)
+ {
+ if (test_rc_datablock_text(length, data))
+ {
+ rc_uint_type i, c;
+ for (i = 0; i < length;)
+ {
+ indent (e, 2);
+ fprintf (e, "\"");
+
+ for (c = 0; i < length && c < 160 && data[i] != '\n'; c++, i++)
+ ;
+ if (i < length && data[i] == '\n')
+ ++i, ++c;
+ ascii_print (e, (const char *) &data[i - c], c);
fprintf (e, "\"");
- s = ri->u.string.s;
- for (i = 0; i < ri->u.string.length; i++)
+ if (i < length)
+ fprintf (e, "\n");
+ }
+
+ if (i == 0)
{
- if (ISPRINT (*s))
- putc (*s, e);
- else
- fprintf (e, "\\%03o", *s);
+ indent (e, 2);
+ fprintf (e, "\"\"");
}
- fprintf (e, "\"");
- break;
+ if (has_next)
+ fprintf (e, ",");
+ fprintf (e, "\n");
+ if (hasblock)
+ fprintf (e, "END\n");
+ return;
}
+ if (test_rc_datablock_unicode (length, data))
+ {
+ rc_uint_type i, c;
+ for (i = 0; i < length;)
+ {
+ const unichar *u;
- case RCDATA_WSTRING:
+ u = (const unichar *) &data[i];
+ indent (e, 2);
fprintf (e, "L\"");
- unicode_print (e, ri->u.wstring.w, ri->u.wstring.length);
+
+ for (c = 0; i < length && c < 160 && u[c] != '\n'; c++, i += 2)
+ ;
+ if (i < length && u[c] == '\n')
+ i += 2, ++c;
+ unicode_print (e, u, c);
fprintf (e, "\"");
- break;
+ if (i < length)
+ fprintf (e, "\n");
+ }
- case RCDATA_BUFFER:
+ if (i == 0)
{
- unsigned long i;
- int first;
+ indent (e, 2);
+ fprintf (e, "L\"\"");
+ }
+ if (has_next)
+ fprintf (e, ",");
+ fprintf (e, "\n");
+ if (hasblock)
+ fprintf (e, "END\n");
+ return;
+ }
- /* Assume little endian data. */
+ show_comment = 0;
+ }
- first = 1;
- for (i = 0; i + 3 < ri->u.buffer.length; i += 4)
+ if (length != 0)
{
- unsigned long l;
- int j;
+ rc_uint_type i, max_row;
+ int first = 1;
- if (! first)
- indent (e, ind + 2);
- l = ((((((ri->u.buffer.data[i + 3] << 8)
- | ri->u.buffer.data[i + 2]) << 8)
- | ri->u.buffer.data[i + 1]) << 8)
- | ri->u.buffer.data[i]);
- fprintf (e, "%luL", l);
- if (i + 4 < ri->u.buffer.length || ri->next != NULL)
- fprintf (e, ",");
- for (j = 0; j < 4; ++j)
- if (! ISPRINT (ri->u.buffer.data[i + j])
- && ri->u.buffer.data[i + j] != 0)
- break;
- if (j >= 4)
+ max_row = (show_comment ? 4 : 8);
+ indent (e, 2);
+ for (i = 0; i + 3 < length;)
{
- fprintf (e, "\t// ");
- for (j = 0; j < 4; ++j)
+ rc_uint_type k;
+ rc_uint_type comment_start;
+
+ comment_start = i;
+
+ if (! first)
+ indent (e, 2);
+
+ for (k = 0; k < max_row && i + 3 < length; k++, i += 4)
{
- if (! ISPRINT (ri->u.buffer.data[i + j]))
- fprintf (e, "\\%03o", ri->u.buffer.data[i + j]);
+ if (k == 0)
+ plen = fprintf (e, "0x%lxL",
+ (long) windres_get_32 (&wrtarget, data + i, length - i));
else
+ plen = fprintf (e, " 0x%lxL",
+ (long) windres_get_32 (&wrtarget, data + i, length - i)) - 1;
+ if (has_next || (i + 4) < length)
{
- if (ri->u.buffer.data[i + j] == '\\')
- fprintf (e, "\\");
- fprintf (e, "%c", ri->u.buffer.data[i + j]);
+ if (plen>0 && plen < 11)
+ indent (e, 11 - plen);
+ fprintf (e, ",");
}
}
+ if (show_comment)
+ {
+ fprintf (e, "\t/* ");
+ ascii_print (e, (const char *) &data[comment_start], i - comment_start);
+ fprintf (e, ". */");
}
fprintf (e, "\n");
first = 0;
}
- if (i + 1 < ri->u.buffer.length)
+ if (i + 1 < length)
{
- int s;
- int j;
-
if (! first)
- indent (e, ind + 2);
- s = (ri->u.buffer.data[i + 1] << 8) | ri->u.buffer.data[i];
- fprintf (e, "%d", s);
- if (i + 2 < ri->u.buffer.length || ri->next != NULL)
- fprintf (e, ",");
- for (j = 0; j < 2; ++j)
- if (! ISPRINT (ri->u.buffer.data[i + j])
- && ri->u.buffer.data[i + j] != 0)
- break;
- if (j >= 2)
+ indent (e, 2);
+ plen = fprintf (e, "0x%x",
+ (int) windres_get_16 (&wrtarget, data + i, length - i));
+ if (has_next || i + 2 < length)
{
- fprintf (e, "\t// ");
- for (j = 0; j < 2; ++j)
- {
- if (! ISPRINT (ri->u.buffer.data[i + j]))
- fprintf (e, "\\%03o", ri->u.buffer.data[i + j]);
- else
- {
- if (ri->u.buffer.data[i + j] == '\\')
- fprintf (e, "\\");
- fprintf (e, "%c", ri->u.buffer.data[i + j]);
- }
+ if (plen > 0 && plen < 11)
+ indent (e, 11 - plen);
+ fprintf (e, ",");
}
+ if (show_comment)
+ {
+ fprintf (e, "\t/* ");
+ ascii_print (e, (const char *) &data[i], 2);
+ fprintf (e, ". */");
}
fprintf (e, "\n");
i += 2;
first = 0;
}
- if (i < ri->u.buffer.length)
+ if (i < length)
{
if (! first)
- indent (e, ind + 2);
- if ((ri->u.buffer.data[i] & 0x7f) == ri->u.buffer.data[i]
- && ISPRINT (ri->u.buffer.data[i]))
- fprintf (e, "\"%c\"", ri->u.buffer.data[i]);
- else
- fprintf (e, "\"\\%03o\"", ri->u.buffer.data[i]);
- if (ri->next != NULL)
+ indent (e, 2);
+ fprintf (e, "\"");
+ ascii_print (e, (const char *) &data[i], 1);
+ fprintf (e, "\"");
+ if (has_next)
fprintf (e, ",");
fprintf (e, "\n");
first = 0;
}
+ }
+ if (hasblock)
+ fprintf (e, "END\n");
+}
+
+/* Write out an rcdata resource. This is also used for other types of
+ resources that need to print arbitrary data. */
+static void
+write_rc_rcdata (FILE *e, const rc_rcdata_item *rcdata, int ind)
+{
+ const rc_rcdata_item *ri;
+
+ indent (e, ind);
+ fprintf (e, "BEGIN\n");
+
+ for (ri = rcdata; ri != NULL; ri = ri->next)
+ {
+ if (ri->type == RCDATA_BUFFER && ri->u.buffer.length == 0)
+ continue;
+
+ switch (ri->type)
+ {
+ default:
+ abort ();
+
+ case RCDATA_WORD:
+ indent (e, ind + 2);
+ fprintf (e, "%ld", (long) (ri->u.word & 0xffff));
+ break;
+
+ case RCDATA_DWORD:
+ indent (e, ind + 2);
+ fprintf (e, "%luL", (unsigned long) ri->u.dword);
+ break;
+
+ case RCDATA_STRING:
+ indent (e, ind + 2);
+ fprintf (e, "\"");
+ ascii_print (e, ri->u.string.s, ri->u.string.length);
+ fprintf (e, "\"");
+ break;
+
+ case RCDATA_WSTRING:
+ indent (e, ind + 2);
+ fprintf (e, "L\"");
+ unicode_print (e, ri->u.wstring.w, ri->u.wstring.length);
+ fprintf (e, "\"");
+ break;
+
+ case RCDATA_BUFFER:
+ write_rc_datablock (e, (rc_uint_type) ri->u.buffer.length,
+ (const bfd_byte *) ri->u.buffer.data,
+ ri->next != NULL, 0, -1);
break;
- }
}
if (ri->type != RCDATA_BUFFER)
@@ -2445,17 +3141,17 @@ write_rc_rcdata (FILE *e, const struct rcdata_item *rcdata, int ind)
/* Write out a stringtable resource. */
static void
-write_rc_stringtable (FILE *e, const struct res_id *name,
- const struct stringtable *stringtable)
+write_rc_stringtable (FILE *e, const rc_res_id *name,
+ const rc_stringtable *stringtable)
{
- unsigned long offset;
+ rc_uint_type offset;
int i;
if (name != NULL && ! name->named)
offset = (name->u.id - 1) << 4;
else
{
- fprintf (e, "// %s string table name\n",
+ fprintf (e, "/* %s string table name. */\n",
name == NULL ? "Missing" : "Invalid");
offset = 0;
}
@@ -2466,10 +3162,10 @@ write_rc_stringtable (FILE *e, const struct res_id *name,
{
if (stringtable->strings[i].length != 0)
{
- fprintf (e, " %lu, \"", offset + i);
- unicode_print (e, stringtable->strings[i].string,
+ fprintf (e, " %lu, ", (long) offset + i);
+ unicode_print_quoted (e, stringtable->strings[i].string,
stringtable->strings[i].length);
- fprintf (e, "\"\n");
+ fprintf (e, "\n");
}
}
@@ -2479,36 +3175,37 @@ write_rc_stringtable (FILE *e, const struct res_id *name,
/* Write out a versioninfo resource. */
static void
-write_rc_versioninfo (FILE *e, const struct versioninfo *versioninfo)
+write_rc_versioninfo (FILE *e, const rc_versioninfo *versioninfo)
{
- const struct fixed_versioninfo *f;
- const struct ver_info *vi;
+ const rc_fixed_versioninfo *f;
+ const rc_ver_info *vi;
f = versioninfo->fixed;
if (f->file_version_ms != 0 || f->file_version_ls != 0)
- fprintf (e, " FILEVERSION %lu, %lu, %lu, %lu\n",
- (f->file_version_ms >> 16) & 0xffff,
- f->file_version_ms & 0xffff,
- (f->file_version_ls >> 16) & 0xffff,
- f->file_version_ls & 0xffff);
+ fprintf (e, " FILEVERSION %u, %u, %u, %u\n",
+ (unsigned int) ((f->file_version_ms >> 16) & 0xffff),
+ (unsigned int) (f->file_version_ms & 0xffff),
+ (unsigned int) ((f->file_version_ls >> 16) & 0xffff),
+ (unsigned int) (f->file_version_ls & 0xffff));
if (f->product_version_ms != 0 || f->product_version_ls != 0)
- fprintf (e, " PRODUCTVERSION %lu, %lu, %lu, %lu\n",
- (f->product_version_ms >> 16) & 0xffff,
- f->product_version_ms & 0xffff,
- (f->product_version_ls >> 16) & 0xffff,
- f->product_version_ls & 0xffff);
+ fprintf (e, " PRODUCTVERSION %u, %u, %u, %u\n",
+ (unsigned int) ((f->product_version_ms >> 16) & 0xffff),
+ (unsigned int) (f->product_version_ms & 0xffff),
+ (unsigned int) ((f->product_version_ls >> 16) & 0xffff),
+ (unsigned int) (f->product_version_ls & 0xffff));
if (f->file_flags_mask != 0)
- fprintf (e, " FILEFLAGSMASK 0x%lx\n", f->file_flags_mask);
+ fprintf (e, " FILEFLAGSMASK 0x%x\n", (unsigned int) f->file_flags_mask);
if (f->file_flags != 0)
- fprintf (e, " FILEFLAGS 0x%lx\n", f->file_flags);
+ fprintf (e, " FILEFLAGS 0x%x\n", (unsigned int) f->file_flags);
if (f->file_os != 0)
- fprintf (e, " FILEOS 0x%lx\n", f->file_os);
+ fprintf (e, " FILEOS 0x%x\n", (unsigned int) f->file_os);
if (f->file_type != 0)
- fprintf (e, " FILETYPE 0x%lx\n", f->file_type);
+ fprintf (e, " FILETYPE 0x%x\n", (unsigned int) f->file_type);
if (f->file_subtype != 0)
- fprintf (e, " FILESUBTYPE 0x%lx\n", f->file_subtype);
+ fprintf (e, " FILESUBTYPE 0x%x\n", (unsigned int) f->file_subtype);
if (f->file_date_ms != 0 || f->file_date_ls != 0)
- fprintf (e, "// Date: %lu, %lu\n", f->file_date_ms, f->file_date_ls);
+ fprintf (e, "/* Date: %u, %u. */\n",
+ (unsigned int) f->file_date_ms, (unsigned int) f->file_date_ls);
fprintf (e, "BEGIN\n");
@@ -2518,22 +3215,22 @@ write_rc_versioninfo (FILE *e, const struct versioninfo *versioninfo)
{
case VERINFO_STRING:
{
- const struct ver_stringinfo *vs;
+ const rc_ver_stringinfo *vs;
fprintf (e, " BLOCK \"StringFileInfo\"\n");
fprintf (e, " BEGIN\n");
- fprintf (e, " BLOCK \"");
- unicode_print (e, vi->u.string.language, -1);
- fprintf (e, "\"\n");
+ fprintf (e, " BLOCK ");
+ unicode_print_quoted (e, vi->u.string.language, -1);
+ fprintf (e, "\n");
fprintf (e, " BEGIN\n");
for (vs = vi->u.string.strings; vs != NULL; vs = vs->next)
{
- fprintf (e, " VALUE \"");
- unicode_print (e, vs->key, -1);
- fprintf (e, "\", \"");
- unicode_print (e, vs->value, -1);
- fprintf (e, "\"\n");
+ fprintf (e, " VALUE ");
+ unicode_print_quoted (e, vs->key, -1);
+ fprintf (e, ", ");
+ unicode_print_quoted (e, vs->value, -1);
+ fprintf (e, "\n");
}
fprintf (e, " END\n");
@@ -2543,17 +3240,16 @@ write_rc_versioninfo (FILE *e, const struct versioninfo *versioninfo)
case VERINFO_VAR:
{
- const struct ver_varinfo *vv;
+ const rc_ver_varinfo *vv;
fprintf (e, " BLOCK \"VarFileInfo\"\n");
fprintf (e, " BEGIN\n");
- fprintf (e, " VALUE \"");
- unicode_print (e, vi->u.var.key, -1);
- fprintf (e, "\"");
+ fprintf (e, " VALUE ");
+ unicode_print_quoted (e, vi->u.var.key, -1);
for (vv = vi->u.var.var; vv != NULL; vv = vv->next)
fprintf (e, ", 0x%x, %d", (unsigned int) vv->language,
- vv->charset);
+ (int) vv->charset);
fprintf (e, "\n END\n");
@@ -2565,32 +3261,36 @@ write_rc_versioninfo (FILE *e, const struct versioninfo *versioninfo)
fprintf (e, "END\n");
}
-/* Write out data which would normally be read from a file. */
-
-static void
-write_rc_filedata (FILE *e, unsigned long length, const unsigned char *data)
+static rc_uint_type
+rcdata_copy (const rc_rcdata_item *src, bfd_byte *dst)
{
- unsigned long i;
-
- for (i = 0; i + 15 < length; i += 16)
- {
- fprintf (e, "// %4lx: ", i);
- fprintf (e, "%02x %02x %02x %02x %02x %02x %02x %02x ",
- data[i + 0], data[i + 1], data[i + 2], data[i + 3],
- data[i + 4], data[i + 5], data[i + 6], data[i + 7]);
- fprintf (e, "%02x %02x %02x %02x %02x %02x %02x %02x\n",
- data[i + 8], data[i + 9], data[i + 10], data[i + 11],
- data[i + 12], data[i + 13], data[i + 14], data[i + 15]);
- }
-
- if (i < length)
- {
- fprintf (e, "// %4lx:", i);
- while (i < length)
+ if (! src)
+ return 0;
+ switch (src->type)
{
- fprintf (e, " %02x", data[i]);
- ++i;
- }
- fprintf (e, "\n");
+ case RCDATA_WORD:
+ if (dst)
+ windres_put_16 (&wrtarget, dst, (rc_uint_type) src->u.word);
+ return 2;
+ case RCDATA_DWORD:
+ if (dst)
+ windres_put_32 (&wrtarget, dst, (rc_uint_type) src->u.dword);
+ return 4;
+ case RCDATA_STRING:
+ if (dst && src->u.string.length)
+ memcpy (dst, src->u.string.s, src->u.string.length);
+ return (rc_uint_type) src->u.string.length;
+ case RCDATA_WSTRING:
+ if (dst && src->u.wstring.length)
+ memcpy (dst, src->u.wstring.w, src->u.wstring.length * sizeof (unichar));
+ return (rc_uint_type) (src->u.wstring.length * sizeof (unichar));
+ case RCDATA_BUFFER:
+ if (dst && src->u.buffer.length)
+ memcpy (dst, src->u.buffer.data, src->u.buffer.length);
+ return (rc_uint_type) src->u.buffer.length;
+ default:
+ abort ();
}
+ /* Never reached. */
+ return 0;
}
diff --git a/contrib/binutils/binutils/resres.c b/contrib/binutils/binutils/resres.c
index 1489d5e..f345da3 100644
--- a/contrib/binutils/binutils/resres.c
+++ b/contrib/binutils/binutils/resres.c
@@ -1,6 +1,8 @@
/* resres.c: read_res_file and write_res_file implementation for windres.
- Copyright 1998, 1999, 2001, 2002 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2001, 2002, 2007
+ Free Software Foundation, Inc.
Written by Anders Norlander <anorland@hem2.passagen.se>.
+ Rewritten by Kai Tietz, Onevision.
This file is part of GNU Binutils.
@@ -23,6 +25,7 @@
It assumes that it can use fread and fwrite to read and write
integers. It does no swapping. */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
@@ -31,154 +34,179 @@
#include <assert.h>
#include <time.h>
-struct res_hdr
- {
- unsigned long data_size;
- unsigned long header_size;
- };
-
-static void write_res_directory
- PARAMS ((const struct res_directory *,
- const struct res_id *, const struct res_id *,
- int *, int));
-static void write_res_resource
- PARAMS ((const struct res_id *, const struct res_id *,
- const struct res_resource *, int *));
-static void write_res_bin
- PARAMS ((const struct res_resource *, const struct res_id *,
- const struct res_id *, const struct res_res_info *));
-
-static void write_res_id PARAMS ((const struct res_id *));
-static void write_res_info PARAMS ((const struct res_res_info *));
-static void write_res_data PARAMS ((const void *, size_t, int));
-static void write_res_header
- PARAMS ((unsigned long, const struct res_id *, const struct res_id *,
- const struct res_res_info *));
-
-static int read_resource_entry PARAMS ((void));
-static void read_res_data PARAMS ((void *, size_t, int));
-static void read_res_id PARAMS ((struct res_id *));
-static unichar *read_unistring PARAMS ((int *));
-static void skip_null_resource PARAMS ((void));
-
-static unsigned long get_id_size PARAMS ((const struct res_id *));
-static void res_align_file PARAMS ((void));
+static rc_uint_type write_res_directory (windres_bfd *, rc_uint_type,
+ const rc_res_directory *, const rc_res_id *,
+ const rc_res_id *, rc_uint_type *, int);
+static rc_uint_type write_res_resource (windres_bfd *, rc_uint_type,const rc_res_id *,
+ const rc_res_id *, const rc_res_resource *,
+ rc_uint_type *);
+static rc_uint_type write_res_bin (windres_bfd *, rc_uint_type, const rc_res_resource *,
+ const rc_res_id *, const rc_res_id *,
+ const rc_res_res_info *);
-static void
- res_add_resource
- PARAMS ((struct res_resource *, const struct res_id *,
- const struct res_id *, int, int));
+static rc_uint_type write_res_id (windres_bfd *, rc_uint_type, const rc_res_id *);
+static rc_uint_type write_res_info (windres_bfd *, rc_uint_type, const rc_res_res_info *);
+static rc_uint_type write_res_data_hdr (windres_bfd *, rc_uint_type, res_hdr *);
-void
- res_append_resource
- PARAMS ((struct res_directory **, struct res_resource *,
- int, const struct res_id *, int));
+static rc_uint_type write_res_header (windres_bfd *, rc_uint_type, rc_uint_type,
+ const rc_res_id *, const rc_res_id *,
+ const rc_res_res_info *);
+
+static int read_resource_entry (windres_bfd *, rc_uint_type *, rc_uint_type);
+static void read_res_data (windres_bfd *, rc_uint_type *, rc_uint_type, void *,
+ rc_uint_type);
+static void read_res_data_hdr (windres_bfd *, rc_uint_type *, rc_uint_type, res_hdr *);
+static void read_res_id (windres_bfd *, rc_uint_type *, rc_uint_type, rc_res_id *);
+static unichar *read_unistring (windres_bfd *, rc_uint_type *, rc_uint_type, rc_uint_type *);
+static void skip_null_resource (windres_bfd *, rc_uint_type *, rc_uint_type);
+static int probe_binary (windres_bfd *wrbfd, rc_uint_type);
+
+static unsigned long get_id_size (const rc_res_id *);
-static struct res_directory *resources = NULL;
+static void res_add_resource (rc_res_resource *, const rc_res_id *,
+ const rc_res_id *, rc_uint_type, int);
+
+static void res_append_resource (rc_res_directory **, rc_res_resource *,
+ int, const rc_res_id *, int);
+
+static rc_res_directory *resources = NULL;
-static FILE *fres;
static const char *filename;
extern char *program_name;
/* Read resource file */
-struct res_directory *
-read_res_file (fn)
- const char *fn;
+rc_res_directory *
+read_res_file (const char *fn)
{
+ rc_uint_type off, flen;
+ windres_bfd wrbfd;
+ bfd *abfd;
+ asection *sec;
filename = fn;
- fres = fopen (filename, "rb");
- if (fres == NULL)
- fatal ("can't open `%s' for output: %s", filename, strerror (errno));
- skip_null_resource ();
+ flen = (rc_uint_type) get_file_size (filename);
+ if (! flen)
+ fatal ("can't open '%s' for input.", filename);
+ abfd = windres_open_as_binary (filename, 1);
+ sec = bfd_get_section_by_name (abfd, ".data");
+ if (sec == NULL)
+ bfd_fatal ("bfd_get_section_by_name");
+ set_windres_bfd (&wrbfd, abfd, sec,
+ (target_is_bigendian ? WR_KIND_BFD_BIN_B
+ : WR_KIND_BFD_BIN_L));
+ off = 0;
+
+ if (! probe_binary (&wrbfd, flen))
+ set_windres_bfd_endianess (&wrbfd, ! target_is_bigendian);
- while (read_resource_entry ())
+ skip_null_resource (&wrbfd, &off, flen);
+
+ while (read_resource_entry (&wrbfd, &off, flen))
;
- fclose (fres);
+ bfd_close (abfd);
return resources;
}
/* Write resource file */
void
-write_res_file (fn, resdir)
- const char *fn;
- const struct res_directory *resdir;
+write_res_file (const char *fn,const rc_res_directory *resdir)
{
- int language;
- static const unsigned char sign[] =
+ asection *sec;
+ rc_uint_type language;
+ bfd *abfd;
+ windres_bfd wrbfd;
+ unsigned long sec_length = 0,sec_length_wrote;
+ static const bfd_byte sign[] =
{0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- long fpos;
filename = fn;
- fres = fopen (filename, "wb");
- if (fres == NULL)
- fatal ("can't open `%s' for output: %s", filename, strerror (errno));
-
- /* Write 32 bit resource signature */
- write_res_data (sign, sizeof (sign), 1);
-
- /* write resources */
+ abfd = windres_open_as_binary (filename, 0);
+ sec = bfd_make_section (abfd, ".data");
+ if (sec == NULL)
+ bfd_fatal ("bfd_make_section");
+ if (! bfd_set_section_flags (abfd, sec,
+ (SEC_HAS_CONTENTS | SEC_ALLOC
+ | SEC_LOAD | SEC_DATA)))
+ bfd_fatal ("bfd_set_section_flags");
+ /* Requiring this is probably a bug in BFD. */
+ sec->output_section = sec;
+
+ set_windres_bfd (&wrbfd, abfd, sec,
+ (target_is_bigendian ? WR_KIND_BFD_BIN_B
+ : WR_KIND_BFD_BIN_L));
language = -1;
- write_res_directory (resdir, (const struct res_id *) NULL,
- (const struct res_id *) NULL, &language, 1);
-
- /* end file on DWORD boundary */
- fpos = ftell (fres);
- if (fpos % 4)
- write_res_data (sign, fpos % 4, 1);
-
- fclose (fres);
+ sec_length = write_res_directory ((windres_bfd *) NULL, 0x20UL, resdir,
+ (const rc_res_id *) NULL,
+ (const rc_res_id *) NULL, &language, 1);
+ if (! bfd_set_section_size (abfd, sec, (sec_length + 3) & ~3))
+ bfd_fatal ("bfd_set_section_size");
+ if ((sec_length & 3) != 0)
+ set_windres_bfd_content (&wrbfd, sign, sec_length, 4-(sec_length & 3));
+ set_windres_bfd_content (&wrbfd, sign, 0, sizeof (sign));
+ language = -1;
+ sec_length_wrote = write_res_directory (&wrbfd, 0x20UL, resdir,
+ (const rc_res_id *) NULL,
+ (const rc_res_id *) NULL,
+ &language, 1);
+ if (sec_length != sec_length_wrote)
+ fatal ("res write failed with different sizes (%lu/%lu).", (long) sec_length,
+ (long) sec_length_wrote);
+
+ bfd_close (abfd);
+ return;
}
/* Read a resource entry, returns 0 when all resources are read */
static int
-read_resource_entry (void)
+read_resource_entry (windres_bfd *wrbfd, rc_uint_type *off, rc_uint_type omax)
{
- struct res_id type;
- struct res_id name;
- struct res_res_info resinfo;
- struct res_hdr reshdr;
- long version;
+ rc_res_id type;
+ rc_res_id name;
+ rc_res_res_info resinfo;
+ res_hdr reshdr;
void *buff;
- struct res_resource *r;
+ rc_res_resource *r;
+ struct bin_res_info l;
- res_align_file ();
+ off[0] = (off[0] + 3) & ~3;
/* Read header */
- if (fread (&reshdr, sizeof (reshdr), 1, fres) != 1)
+ if ((off[0] + 8) > omax)
return 0;
+ read_res_data_hdr (wrbfd, off, omax, &reshdr);
/* read resource type */
- read_res_id (&type);
+ read_res_id (wrbfd, off, omax, &type);
/* read resource id */
- read_res_id (&name);
+ read_res_id (wrbfd, off, omax, &name);
- res_align_file ();
+ off[0] = (off[0] + 3) & ~3;
/* Read additional resource header */
- read_res_data (&resinfo.version, sizeof (resinfo.version), 1);
- read_res_data (&resinfo.memflags, sizeof (resinfo.memflags), 1);
- read_res_data (&resinfo.language, sizeof (resinfo.language), 1);
- read_res_data (&version, sizeof (version), 1);
- read_res_data (&resinfo.characteristics, sizeof (resinfo.characteristics), 1);
+ read_res_data (wrbfd, off, omax, &l, BIN_RES_INFO_SIZE);
+ resinfo.version = windres_get_32 (wrbfd, l.version, 4);
+ resinfo.memflags = windres_get_16 (wrbfd, l.memflags, 2);
+ resinfo.language = windres_get_16 (wrbfd, l.language, 2);
+ /* resinfo.version2 = windres_get_32 (wrbfd, l.version2, 4); */
+ resinfo.characteristics = windres_get_32 (wrbfd, l.characteristics, 4);
- res_align_file ();
+ off[0] = (off[0] + 3) & ~3;
/* Allocate buffer for data */
buff = res_alloc (reshdr.data_size);
/* Read data */
- read_res_data (buff, reshdr.data_size, 1);
+ read_res_data (wrbfd, off, omax, buff, reshdr.data_size);
/* Convert binary data to resource */
- r = bin_to_res (type, buff, reshdr.data_size, 0);
+ r = bin_to_res (wrbfd, type, buff, reshdr.data_size);
r->res_info = resinfo;
/* Add resource to resource directory */
res_add_resource (r, &type, &name, resinfo.language, 0);
@@ -187,15 +215,12 @@ read_resource_entry (void)
}
/* write resource directory to binary resource file */
-static void
-write_res_directory (rd, type, name, language, level)
- const struct res_directory *rd;
- const struct res_id *type;
- const struct res_id *name;
- int *language;
- int level;
+static rc_uint_type
+write_res_directory (windres_bfd *wrbfd, rc_uint_type off, const rc_res_directory *rd,
+ const rc_res_id *type, const rc_res_id *name, rc_uint_type *language,
+ int level)
{
- const struct res_entry *re;
+ const rc_res_entry *re;
for (re = rd->entries; re != NULL; re = re->next)
{
@@ -218,7 +243,7 @@ write_res_directory (rd, type, name, language, level)
case 3:
/* If we're at level 3, then this key represents a language.
Use it to update the current language. */
- if (!re->id.named
+ if (! re->id.named
&& re->id.u.id != (unsigned long) *language
&& (re->id.u.id & 0xffff) == re->id.u.id)
{
@@ -231,7 +256,8 @@ write_res_directory (rd, type, name, language, level)
}
if (re->subdir)
- write_res_directory (re->u.dir, type, name, language, level + 1);
+ off = write_res_directory (wrbfd, off, re->u.dir, type, name, language,
+ level + 1);
else
{
if (level == 3)
@@ -241,25 +267,25 @@ write_res_directory (rd, type, name, language, level)
2, and represents the name to use. We probably just
set LANGUAGE, and it will probably match what the
resource itself records if anything. */
- write_res_resource (type, name, re->u.res, language);
+ off = write_res_resource (wrbfd, off, type, name, re->u.res,
+ language);
}
else
{
fprintf (stderr, "// Resource at unexpected level %d\n", level);
- write_res_resource (type, (struct res_id *) NULL, re->u.res,
- language);
+ off = write_res_resource (wrbfd, off, type, (rc_res_id *) NULL,
+ re->u.res, language);
}
}
}
+ return off;
}
-static void
-write_res_resource (type, name, res, language)
- const struct res_id *type;
- const struct res_id *name;
- const struct res_resource *res;
- int *language ATTRIBUTE_UNUSED;
+static rc_uint_type
+write_res_resource (windres_bfd *wrbfd, rc_uint_type off, const rc_res_id *type,
+ const rc_res_id *name, const rc_res_resource *res,
+ rc_uint_type *language ATTRIBUTE_UNUSED)
{
int rt;
@@ -327,6 +353,10 @@ write_res_resource (type, name, res, language)
case RES_TYPE_VERSIONINFO:
rt = RT_VERSION;
break;
+
+ case RES_TYPE_TOOLBAR:
+ rt = RT_TOOLBAR;
+ break;
}
if (rt != 0
@@ -339,35 +369,29 @@ write_res_resource (type, name, res, language)
abort ();
}
- write_res_bin (res, type, name, &res->res_info);
- return;
+ return write_res_bin (wrbfd, off, res, type, name, &res->res_info);
}
/* Write a resource in binary resource format */
-static void
-write_res_bin (res, type, name, resinfo)
- const struct res_resource *res;
- const struct res_id *type;
- const struct res_id *name;
- const struct res_res_info *resinfo;
+static rc_uint_type
+write_res_bin (windres_bfd *wrbfd, rc_uint_type off, const rc_res_resource *res,
+ const rc_res_id *type, const rc_res_id *name,
+ const rc_res_res_info *resinfo)
{
- unsigned long datasize = 0;
- const struct bindata *bin_rep, *data;
+ rc_uint_type noff;
+ rc_uint_type datasize = 0;
- bin_rep = res_to_bin (res, 0);
- for (data = bin_rep; data != NULL; data = data->next)
- datasize += data->length;
+ noff = res_to_bin ((windres_bfd *) NULL, off, res);
+ datasize = noff - off;
- write_res_header (datasize, type, name, resinfo);
-
- for (data = bin_rep; data != NULL; data = data->next)
- write_res_data (data->data, data->length, 1);
+ off = write_res_header (wrbfd, off, datasize, type, name, resinfo);
+ return res_to_bin (wrbfd, off, res);
}
/* Get number of bytes needed to store an id in binary format */
static unsigned long
get_id_size (id)
- const struct res_id *id;
+ const rc_res_id *id;
{
if (id->named)
return sizeof (unichar) * (id->u.n.length + 1);
@@ -376,108 +400,142 @@ get_id_size (id)
}
/* Write a resource header */
-static void
-write_res_header (datasize, type, name, resinfo)
- unsigned long datasize;
- const struct res_id *type;
- const struct res_id *name;
- const struct res_res_info *resinfo;
+static rc_uint_type
+write_res_header (windres_bfd *wrbfd, rc_uint_type off, rc_uint_type datasize,
+ const rc_res_id *type, const rc_res_id *name,
+ const rc_res_res_info *resinfo)
{
- struct res_hdr reshdr;
+ res_hdr reshdr;
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);
- write_res_id (name);
+ off = (off + 3) & ~3;
+
+ off = write_res_data_hdr (wrbfd, off, &reshdr);
+ off = write_res_id (wrbfd, off, type);
+ off = write_res_id (wrbfd, off, name);
- res_align_file ();
+ off = (off + 3) & ~3;
- write_res_info (resinfo);
- res_align_file ();
+ off = write_res_info (wrbfd, off, resinfo);
+ off = (off + 3) & ~3;
+ return off;
}
+static rc_uint_type
+write_res_data_hdr (windres_bfd *wrbfd, rc_uint_type off, res_hdr *hdr)
+{
+ if (wrbfd)
+ {
+ struct bin_res_hdr brh;
+ windres_put_32 (wrbfd, brh.data_size, hdr->data_size);
+ windres_put_32 (wrbfd, brh.header_size, hdr->header_size);
+ set_windres_bfd_content (wrbfd, &brh, off, BIN_RES_HDR_SIZE);
+ }
+ return off + BIN_RES_HDR_SIZE;
+}
-/* Write data to file, abort on failure */
static void
-write_res_data (data, size, count)
- const void *data;
- size_t size;
- int count;
+read_res_data_hdr (windres_bfd *wrbfd, rc_uint_type *off, rc_uint_type omax,
+ res_hdr *reshdr)
{
- if ((size_t) fwrite (data, size, count, fres) != (size_t) count)
- fatal ("%s: could not write to file", filename);
+ struct bin_res_hdr brh;
+
+ if ((off[0] + BIN_RES_HDR_SIZE) > omax)
+ fatal ("%s: unexpected end of file %ld/%ld", filename,(long) off[0], (long) omax);
+
+ get_windres_bfd_content (wrbfd, &brh, off[0], BIN_RES_HDR_SIZE);
+ reshdr->data_size = windres_get_32 (wrbfd, brh.data_size, 4);
+ reshdr->header_size = windres_get_32 (wrbfd, brh.header_size, 4);
+ off[0] += BIN_RES_HDR_SIZE;
}
/* Read data from file, abort on failure */
static void
-read_res_data (data, size, count)
- void *data;
- size_t size;
- int count;
+read_res_data (windres_bfd *wrbfd, rc_uint_type *off, rc_uint_type omax, void *data,
+ rc_uint_type size)
{
- if (fread (data, size, count, fres) != (size_t) count)
- fatal ("%s: unexpected end of file", filename);
+ if ((off[0] + size) > omax)
+ fatal ("%s: unexpected end of file %ld/%ld %ld", filename,(long) off[0],
+ (long) omax, (long) size);
+ get_windres_bfd_content (wrbfd, data, off[0], size);
+ off[0] += size;
}
/* Write a resource id */
-static void
-write_res_id (id)
- const struct res_id *id;
+static rc_uint_type
+write_res_id (windres_bfd *wrbfd, rc_uint_type off, const rc_res_id *id)
{
if (id->named)
{
- unsigned long len = id->u.n.length;
- unichar null_term = 0;
- write_res_data (id->u.n.name, len * sizeof (unichar), 1);
- write_res_data (&null_term, sizeof (null_term), 1);
+ rc_uint_type len = (((bfd_signed_vma) id->u.n.length < 0 ? 0 : id->u.n.length) + 1);
+ if (wrbfd)
+ {
+ rc_uint_type i;
+ bfd_byte *d = (bfd_byte *) xmalloc (len * sizeof (unichar));
+ for (i = 0; i < (len - 1); i++)
+ windres_put_16 (wrbfd, d + (i * sizeof (unichar)), id->u.n.name[i]);
+ windres_put_16 (wrbfd, d + (i * sizeof (unichar)), 0);
+ set_windres_bfd_content (wrbfd, d, off, (len * sizeof (unichar)));
+ }
+ off += (len * sizeof (unichar));
}
else
{
- unsigned short i = 0xFFFF;
- write_res_data (&i, sizeof (i), 1);
- i = id->u.id;
- write_res_data (&i, sizeof (i), 1);
+ if (wrbfd)
+ {
+ struct bin_res_id bid;
+ windres_put_16 (wrbfd, bid.sig, 0xffff);
+ windres_put_16 (wrbfd, bid.id, id->u.id);
+ set_windres_bfd_content (wrbfd, &bid, off, BIN_RES_ID);
+ }
+ off += BIN_RES_ID;
}
+ return off;
}
/* Write resource info */
-static void
-write_res_info (info)
- const struct res_res_info *info;
+static rc_uint_type
+write_res_info (windres_bfd *wrbfd, rc_uint_type off, const rc_res_res_info *info)
{
- write_res_data (&info->version, sizeof (info->version), 1);
- write_res_data (&info->memflags, sizeof (info->memflags), 1);
- write_res_data (&info->language, sizeof (info->language), 1);
- write_res_data (&info->version, sizeof (info->version), 1);
- write_res_data (&info->characteristics, sizeof (info->characteristics), 1);
+ if (wrbfd)
+ {
+ struct bin_res_info l;
+
+ windres_put_32 (wrbfd, l.version, info->version);
+ windres_put_16 (wrbfd, l.memflags, info->memflags);
+ windres_put_16 (wrbfd, l.language, info->language);
+ windres_put_32 (wrbfd, l.version2, info->version);
+ windres_put_32 (wrbfd, l.characteristics, info->characteristics);
+ set_windres_bfd_content (wrbfd, &l, off, BIN_RES_INFO_SIZE);
+ }
+ return off + BIN_RES_INFO_SIZE;
}
/* read a resource identifier */
-void
-read_res_id (id)
- struct res_id *id;
+static void
+read_res_id (windres_bfd *wrbfd, rc_uint_type *off, rc_uint_type omax, rc_res_id *id)
{
+ struct bin_res_id bid;
unsigned short ord;
unichar *id_s = NULL;
- int len;
+ rc_uint_type len;
- read_res_data (&ord, sizeof (ord), 1);
+ read_res_data (wrbfd, off, omax, &bid, BIN_RES_ID - 2);
+ ord = (unsigned short) windres_get_16 (wrbfd, bid.sig, 2);
if (ord == 0xFFFF) /* an ordinal id */
{
- read_res_data (&ord, sizeof (ord), 1);
+ read_res_data (wrbfd, off, omax, bid.id, BIN_RES_ID - 2);
id->named = 0;
- id->u.id = ord;
+ id->u.id = windres_get_16 (wrbfd, bid.id, 2);
}
else
/* named id */
{
- if (fseek (fres, -sizeof (ord), SEEK_CUR) != 0)
- fatal ("%s: %s: could not seek in file", program_name, filename);
- id_s = read_unistring (&len);
+ off[0] -= 2;
+ id_s = read_unistring (wrbfd, off, omax, &len);
id->named = 1;
id->u.n.length = len;
id->u.n.name = id_s;
@@ -486,39 +544,62 @@ read_res_id (id)
/* Read a null terminated UNICODE string */
static unichar *
-read_unistring (len)
- int *len;
+read_unistring (windres_bfd *wrbfd, rc_uint_type *off, rc_uint_type omax,
+ rc_uint_type *len)
{
unichar *s;
+ bfd_byte d[2];
unichar c;
unichar *p;
- int l;
+ rc_uint_type l;
+ rc_uint_type soff = off[0];
- *len = 0;
- l = 0;
+ do
+ {
+ read_res_data (wrbfd, &soff, omax, d, sizeof (unichar));
+ c = windres_get_16 (wrbfd, d, 2);
+ }
+ while (c != 0);
+ l = ((soff - off[0]) / sizeof (unichar));
- /* there are hardly any names longer than 256 characters */
- p = s = (unichar *) xmalloc (sizeof (unichar) * 256);
+ /* there are hardly any names longer than 256 characters, but anyway. */
+ p = s = (unichar *) xmalloc (sizeof (unichar) * l);
do
{
- read_res_data (&c, sizeof (c), 1);
+ read_res_data (wrbfd, off, omax, d, sizeof (unichar));
+ c = windres_get_16 (wrbfd, d, 2);
*p++ = c;
- if (c != 0)
- l++;
}
while (c != 0);
- *len = l;
+ *len = l - 1;
return s;
}
-/* align file on DWORD boundary */
-static void
-res_align_file (void)
+static int
+probe_binary (windres_bfd *wrbfd, rc_uint_type omax)
{
- 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);
+ rc_uint_type off;
+ res_hdr reshdr;
+
+ off = 0;
+ read_res_data_hdr (wrbfd, &off, omax, &reshdr);
+ if (reshdr.data_size != 0)
+ return 1;
+ if ((reshdr.header_size != 0x20 && ! target_is_bigendian)
+ || (reshdr.header_size != 0x20000000 && target_is_bigendian))
+ return 1;
+
+ /* Subtract size of HeaderSize. DataSize has to be zero. */
+ off += 0x20 - BIN_RES_HDR_SIZE;
+ if ((off + BIN_RES_HDR_SIZE) >= omax)
+ return 1;
+ read_res_data_hdr (wrbfd, &off, omax, &reshdr);
+ /* off is advanced by BIN_RES_HDR_SIZE in read_res_data_hdr()
+ which is part of reshdr.header_size. We shouldn't take it
+ into account twice. */
+ if ((off - BIN_RES_HDR_SIZE + reshdr.data_size + reshdr.header_size) > omax)
+ return 0;
+ return 1;
}
/* Check if file is a win32 binary resource file, if so
@@ -526,16 +607,19 @@ res_align_file (void)
error.
*/
static void
-skip_null_resource (void)
+skip_null_resource (windres_bfd *wrbfd, rc_uint_type *off, rc_uint_type omax)
{
- struct res_hdr reshdr =
- {0, 0};
- read_res_data (&reshdr, sizeof (reshdr), 1);
- if ((reshdr.data_size != 0) || (reshdr.header_size != 0x20))
+ res_hdr reshdr;
+ read_res_data_hdr (wrbfd, off, omax, &reshdr);
+ if (reshdr.data_size != 0)
+ goto skip_err;
+ if ((reshdr.header_size != 0x20 && ! target_is_bigendian)
+ || (reshdr.header_size != 0x20000000 && target_is_bigendian))
goto skip_err;
- /* Subtract size of HeaderSize and DataSize */
- if (fseek (fres, reshdr.header_size - 8, SEEK_CUR) != 0)
+ /* Subtract size of HeaderSize. DataSize has to be zero. */
+ off[0] += 0x20 - BIN_RES_HDR_SIZE;
+ if (off[0] >= omax)
goto skip_err;
return;
@@ -547,15 +631,11 @@ skip_err:
}
/* Add a resource to resource directory */
-void
-res_add_resource (r, type, id, language, dupok)
- struct res_resource *r;
- const struct res_id *type;
- const struct res_id *id;
- int language;
- int dupok;
+static void
+res_add_resource (rc_res_resource *r, const rc_res_id *type, const rc_res_id *id,
+ rc_uint_type language, int dupok)
{
- struct res_id a[3];
+ rc_res_id a[3];
a[0] = *type;
a[1] = *id;
@@ -568,21 +648,17 @@ res_add_resource (r, type, id, language, dupok)
This is just copied from define_resource
and modified to add an existing resource.
*/
-void
-res_append_resource (resources, resource, cids, ids, dupok)
- struct res_directory **resources;
- struct res_resource *resource;
- int cids;
- const struct res_id *ids;
- int dupok;
+static void
+res_append_resource (rc_res_directory **resources, rc_res_resource *resource,
+ int cids, const rc_res_id *ids, int dupok)
{
- struct res_entry *re = NULL;
+ rc_res_entry *re = NULL;
int i;
assert (cids > 0);
for (i = 0; i < cids; i++)
{
- struct res_entry **pp;
+ rc_res_entry **pp;
if (*resources == NULL)
{
@@ -593,8 +669,8 @@ res_append_resource (resources, resource, cids, ids, dupok)
if (timeval == 0)
timeval = time (NULL);
- *resources = ((struct res_directory *)
- res_alloc (sizeof **resources));
+ *resources = ((rc_res_directory *)
+ res_alloc (sizeof (rc_res_directory)));
(*resources)->characteristics = 0;
(*resources)->time = timeval;
(*resources)->major = 0;
@@ -610,7 +686,7 @@ res_append_resource (resources, resource, cids, ids, dupok)
re = *pp;
else
{
- re = (struct res_entry *) res_alloc (sizeof *re);
+ re = (rc_res_entry *) res_alloc (sizeof (rc_res_entry));
re->next = NULL;
re->id = ids[i];
if ((i + 1) < cids)
@@ -629,7 +705,7 @@ res_append_resource (resources, resource, cids, ids, dupok)
if ((i + 1) < cids)
{
- if (!re->subdir)
+ if (! re->subdir)
{
fprintf (stderr, "%s: ", program_name);
res_ids_print (stderr, i, ids);
diff --git a/contrib/binutils/binutils/size.c b/contrib/binutils/binutils/size.c
index b78cba0..f83b050 100644
--- a/contrib/binutils/binutils/size.c
+++ b/contrib/binutils/binutils/size.c
@@ -1,6 +1,6 @@
/* size.c -- report size of various sections of an executable file.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -28,10 +28,11 @@
If you write shell scripts which manipulate this info then you may be
out of luck; there's no --compatibility or --pedantic option. */
+#include "sysdep.h"
#include "bfd.h"
-#include "bucomm.h"
#include "libiberty.h"
#include "getopt.h"
+#include "bucomm.h"
#ifndef BSD_DEFAULT
#define BSD_DEFAULT 1
@@ -98,7 +99,7 @@ usage (FILE *stream, int status)
#endif
);
list_supported_targets (program_name, stream);
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
@@ -346,7 +347,10 @@ display_file (char *filename)
bfd *file;
if (get_file_size (filename) < 1)
- return;
+ {
+ return_code = 1;
+ return;
+ }
file = bfd_openr (filename, target);
if (file == NULL)
diff --git a/contrib/binutils/binutils/srconv.c b/contrib/binutils/binutils/srconv.c
index d1f3efd..906432f 100644
--- a/contrib/binutils/binutils/srconv.c
+++ b/contrib/binutils/binutils/srconv.c
@@ -1,6 +1,6 @@
/* srconv.c -- Sysroff conversion program
Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005 Free Software Foundation, Inc.
+ 2005, 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -26,6 +26,7 @@
All debugging information is preserved */
+#include "sysdep.h"
#include "bfd.h"
#include "bucomm.h"
#include "sysroff.h"
@@ -704,6 +705,7 @@ walk_tree_type_1 (struct coff_sfile *sfile, struct coff_symbol *symbol,
{
struct IT_dpt dpt;
+ dpt.dunno = 0;
walk_tree_type_1 (sfile, symbol, type->u.pointer.points_to, nest + 1);
dpt.neg = 0x1001;
sysroff_swap_dpt_out (file, &dpt);
@@ -1728,7 +1730,7 @@ show_usage (FILE *file, int status)
-h --help Display this information\n\
-v --version Print the program's version number\n"));
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
diff --git a/contrib/binutils/binutils/stabs.c b/contrib/binutils/binutils/stabs.c
index 879a3e2..c8fc77d 100644
--- a/contrib/binutils/binutils/stabs.c
+++ b/contrib/binutils/binutils/stabs.c
@@ -1,6 +1,6 @@
/* stabs.c -- Parse stabs debugging information
- Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -25,10 +25,8 @@
code. The job it does is somewhat different, because it is not
trying to identify the correct address for anything. */
-#include <stdio.h>
-
+#include "sysdep.h"
#include "bfd.h"
-#include "bucomm.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "demangle.h"
@@ -1696,12 +1694,12 @@ parse_stab_range_type (void *dhandle, struct stab_handle *info, const char *type
#define ULLHIGH "01777777777777777777777;"
if (index_type == DEBUG_TYPE_NULL)
{
- if (strncmp (s2, LLLOW, sizeof LLLOW - 1) == 0
- && strncmp (s3, LLHIGH, sizeof LLHIGH - 1) == 0)
+ if (CONST_STRNEQ (s2, LLLOW)
+ && CONST_STRNEQ (s3, LLHIGH))
return debug_make_int_type (dhandle, 8, FALSE);
if (! ov2
&& n2 == 0
- && strncmp (s3, ULLHIGH, sizeof ULLHIGH - 1) == 0)
+ && CONST_STRNEQ (s3, ULLHIGH))
return debug_make_int_type (dhandle, 8, TRUE);
}
@@ -2832,7 +2830,7 @@ parse_stab_argtypes (void *dhandle, struct stab_handle *info,
&& (ISDIGIT (argtypes[2])
|| argtypes[2] == 'Q'
|| argtypes[2] == 't'))
- || strncmp (argtypes, "__ct", 4) == 0);
+ || CONST_STRNEQ (argtypes, "__ct"));
is_constructor = (is_full_physname_constructor
|| (tagname != NULL
@@ -2840,7 +2838,7 @@ parse_stab_argtypes (void *dhandle, struct stab_handle *info,
is_destructor = ((argtypes[0] == '_'
&& (argtypes[1] == '$' || argtypes[1] == '.')
&& argtypes[2] == '_')
- || strncmp (argtypes, "__dt", 4) == 0);
+ || CONST_STRNEQ (argtypes, "__dt"));
is_v3 = argtypes[0] == '_' && argtypes[1] == 'Z';
if (is_destructor || is_full_physname_constructor || is_v3)
@@ -3841,7 +3839,7 @@ stab_demangle_function_name (struct stab_demangle_info *minfo,
*pp = scan + 2;
if (*pp - name >= 5
- && strncmp (name, "type", 4) == 0
+ && CONST_STRNEQ (name, "type")
&& (name[4] == '$' || name[4] == '.'))
{
const char *tem;
diff --git a/contrib/binutils/binutils/strings.c b/contrib/binutils/binutils/strings.c
index a04cb58..2238574 100644
--- a/contrib/binutils/binutils/strings.c
+++ b/contrib/binutils/binutils/strings.c
@@ -1,6 +1,6 @@
/* strings -- print the strings of printable characters in files
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007 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
@@ -46,6 +46,7 @@
littleendian 32-bit.
--target=BFDNAME
+ -T {bfdname}
Specify a non-default object file format.
--help
@@ -57,17 +58,13 @@
Written by Richard Stallman <rms@gnu.ai.mit.edu>
and David MacKenzie <djm@gnu.ai.mit.edu>. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "sysdep.h"
#include "bfd.h"
-#include <stdio.h>
#include "getopt.h"
-#include <errno.h>
-#include "bucomm.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include <sys/stat.h>
+#include "bucomm.h"
/* Some platforms need to put stdin into binary mode, to read
binary files. */
@@ -195,7 +192,7 @@ main (int argc, char **argv)
target = NULL;
encoding = 's';
- while ((optc = getopt_long (argc, argv, "afhHn:ot:e:Vv0123456789",
+ while ((optc = getopt_long (argc, argv, "afhHn:ot:e:T:Vv0123456789",
long_options, (int *) 0)) != EOF)
{
switch (optc)
@@ -721,7 +718,7 @@ usage (FILE *stream, int status)
-h --help Display this information\n\
-v --version Print the program's version number\n"));
list_supported_targets (program_name, stream);
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
diff --git a/contrib/binutils/binutils/sysdep.h b/contrib/binutils/binutils/sysdep.h
new file mode 100644
index 0000000..9627b46
--- /dev/null
+++ b/contrib/binutils/binutils/sysdep.h
@@ -0,0 +1,174 @@
+/* sysdep.h -- handle host dependencies for binutils
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _BIN_SYSDEP_H
+#define _BIN_SYSDEP_H
+
+#include "ansidecl.h"
+#include <stdio.h>
+#include <sys/types.h>
+
+#include "bfdver.h"
+#include "config.h"
+
+#include <stdarg.h>
+
+#ifdef USE_BINARY_FOPEN
+#include "fopen-bin.h"
+#else
+#include "fopen-same.h"
+#endif
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#else
+extern char *strchr ();
+extern char *strrchr ();
+#endif
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#else
+#ifdef HAVE_SYS_FILE_H
+#include <sys/file.h>
+#endif
+#endif
+
+#if !HAVE_DECL_STPCPY
+extern char *stpcpy (char *, const char *);
+#endif
+
+#if !HAVE_DECL_STRSTR
+extern char *strstr ();
+#endif
+
+#ifdef HAVE_SBRK
+#if !HAVE_DECL_SBRK
+extern char *sbrk ();
+#endif
+#endif
+
+#if !HAVE_DECL_GETENV
+extern char *getenv ();
+#endif
+
+#if !HAVE_DECL_ENVIRON
+extern char **environ;
+#endif
+
+#if !HAVE_DECL_FPRINTF
+extern int fprintf (FILE *, const char *, ...);
+#endif
+
+#if !HAVE_DECL_SNPRINTF
+extern int snprintf(char *, size_t, const char *, ...);
+#endif
+
+#if !HAVE_DECL_VSNPRINTF
+extern int vsnprintf(char *, size_t, const char *, va_list);
+#endif
+
+#ifndef O_RDONLY
+#define O_RDONLY 0
+#endif
+
+#ifndef O_RDWR
+#define O_RDWR 2
+#endif
+
+#ifndef SEEK_SET
+#define SEEK_SET 0
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
+#if defined(__GNUC__) && !defined(C_ALLOCA)
+# undef alloca
+# define alloca __builtin_alloca
+#else
+# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
+# include <alloca.h>
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+# if !defined (__STDC__) && !defined (__hpux)
+char *alloca ();
+# else
+void *alloca ();
+# endif /* __STDC__, __hpux */
+# endif /* alloca */
+# endif /* HAVE_ALLOCA_H */
+#endif
+
+#ifdef HAVE_LOCALE_H
+# ifndef ENABLE_NLS
+ /* The Solaris version of locale.h always includes libintl.h. If we have
+ been configured with --disable-nls then ENABLE_NLS will not be defined
+ and the dummy definitions of bindtextdomain (et al) below will conflict
+ with the defintions in libintl.h. So we define these values to prevent
+ the bogus inclusion of libintl.h. */
+# define _LIBINTL_H
+# define _LIBGETTEXT_H
+# endif
+# include <locale.h>
+#endif
+
+#ifdef ENABLE_NLS
+# include <libintl.h>
+# define _(String) gettext (String)
+# ifdef gettext_noop
+# define N_(String) gettext_noop (String)
+# else
+# define N_(String) (String)
+# endif
+#else
+# define gettext(Msgid) (Msgid)
+# define dgettext(Domainname, Msgid) (Msgid)
+# define dcgettext(Domainname, Msgid, Category) (Msgid)
+# define textdomain(Domainname) while (0) /* nothing */
+# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
+# define _(String) (String)
+# define N_(String) (String)
+#endif
+
+/* Used by ar.c and objcopy.c. */
+#define BUFSIZE 8192
+
+#endif /* _BIN_SYSDEP_H */
diff --git a/contrib/binutils/binutils/sysdump.c b/contrib/binutils/binutils/sysdump.c
index ec19472..2f92469 100644
--- a/contrib/binutils/binutils/sysdump.c
+++ b/contrib/binutils/binutils/sysdump.c
@@ -1,5 +1,5 @@
/* Sysroff object format dumper.
- Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -25,13 +25,12 @@
This program reads a SYSROFF object file and prints it in an
almost human readable form to stdout. */
+#include "sysdep.h"
#include "bfd.h"
-#include "bucomm.h"
#include "safe-ctype.h"
-
-#include <stdio.h>
#include "libiberty.h"
#include "getopt.h"
+#include "bucomm.h"
#include "sysroff.h"
static int dump = 1;
@@ -644,7 +643,7 @@ show_usage (FILE *file, int status)
-h --help Display this information\n\
-v --version Print the program's version number\n"));
- if (status == 0)
+ if (REPORT_BUGS_TO[0] && status == 0)
fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
diff --git a/contrib/binutils/binutils/version.c b/contrib/binutils/binutils/version.c
index 2843e69..b4a4c3d 100644
--- a/contrib/binutils/binutils/version.c
+++ b/contrib/binutils/binutils/version.c
@@ -1,6 +1,6 @@
/* version.c -- binutils version information
- Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2007 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -18,9 +18,8 @@
along with this program; if not, write to the Free Software
Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <stdio.h>
+#include "sysdep.h"
#include "bfd.h"
-#include "bfdver.h"
#include "bucomm.h"
/* Print the version number and copyright information, and exit. This
@@ -32,7 +31,7 @@ print_version (const char *name)
/* This output is intended to follow the GNU standards document. */
/* xgettext:c-format */
printf ("GNU %s %s\n", name, BFD_VERSION_STRING);
- printf (_("Copyright 2005 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2007 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/windint.h b/contrib/binutils/binutils/windint.h
new file mode 100644
index 0000000..b46f857
--- /dev/null
+++ b/contrib/binutils/binutils/windint.h
@@ -0,0 +1,1088 @@
+/* windint.h -- internal header file for windres program.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007
+ Free Software Foundation, Inc.
+ Written by Kai Tietz, Onevision.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include "winduni.h"
+
+#ifndef WINDINT_H
+#define WINDINT_H
+
+/* Use bfd_size_type to ensure a sufficient number of bits. */
+#ifndef DEFINED_RC_UINT_TYPE
+#define DEFINED_RC_UINT_TYPE
+typedef bfd_size_type rc_uint_type;
+#endif
+
+/* Resource directory structure. */
+
+typedef struct res_hdr
+{
+ rc_uint_type data_size;
+ rc_uint_type header_size;
+} res_hdr;
+
+struct __attribute__ ((__packed__)) bin_res_hdr
+{
+ bfd_byte data_size[4];
+ bfd_byte header_size[4];
+};
+#define BIN_RES_HDR_SIZE 8
+
+struct __attribute__ ((__packed__)) bin_res_id
+{
+ bfd_byte sig[2]; /* Has to be 0xffff for unnamed ids. */
+ bfd_byte id[2];
+};
+#define BIN_RES_ID 4
+
+/* This structure is used when converting resource information to
+ binary. */
+
+typedef struct bindata
+{
+ /* Next data. */
+ struct bindata *next;
+ /* Length of data. */
+ rc_uint_type length;
+ /* Data. */
+ bfd_byte *data;
+} bindata;
+
+/* This structure is used when converting resource information to
+ coff. */
+typedef struct coff_res_data
+{
+ /* Next data. */
+ struct coff_res_data *next;
+ /* Length of data. */
+ rc_uint_type length;
+ /* Data. */
+ const struct rc_res_resource *res;
+} coff_res_data;
+
+/* We represent resources internally as a tree, similar to the tree
+ used in the .rsrc section of a COFF file. The root is a
+ rc_res_directory structure. */
+
+typedef struct rc_res_directory
+{
+ /* Resource flags. According to the MS docs, this is currently
+ always zero. */
+ rc_uint_type characteristics;
+ /* Time/date stamp. */
+ rc_uint_type time;
+ /* Major version number. */
+ rc_uint_type major;
+ /* Minor version number. */
+ rc_uint_type minor;
+ /* Directory entries. */
+ struct rc_res_entry *entries;
+} rc_res_directory;
+
+/* A resource ID is stored in a rc_res_id structure. */
+
+typedef struct rc_res_id
+{
+ /* Non-zero if this entry has a name rather than an ID. */
+ rc_uint_type named : 1;
+ union
+ {
+ /* If the named field is non-zero, this is the name. */
+ struct
+ {
+ /* Length of the name. */
+ rc_uint_type length;
+ /* Pointer to the name, which is a Unicode string. */
+ unichar *name;
+ } n;
+ /* If the named field is zero, this is the ID. */
+ rc_uint_type id;
+ } u;
+} rc_res_id;
+
+/* Each entry in the tree is a rc_res_entry structure. We mix
+ directories and resources because in a COFF file all entries in a
+ directory are sorted together, whether the entries are
+ subdirectories or resources. */
+
+typedef struct rc_res_entry
+{
+ /* Next entry. */
+ struct rc_res_entry *next;
+ /* Resource ID. */
+ rc_res_id id;
+ /* Non-zero if this entry is a subdirectory rather than a leaf. */
+ rc_uint_type subdir : 1;
+ union
+ {
+ /* If the subdir field is non-zero, this is a pointer to the
+ subdirectory. */
+ rc_res_directory *dir;
+ /* If the subdir field is zero, this is a pointer to the resource
+ data. */
+ struct rc_res_resource *res;
+ } u;
+} rc_res_entry;
+
+/* Types of resources. */
+
+enum rc_res_type
+{
+ RES_TYPE_UNINITIALIZED,
+ RES_TYPE_ACCELERATOR,
+ RES_TYPE_BITMAP,
+ RES_TYPE_CURSOR,
+ RES_TYPE_GROUP_CURSOR,
+ RES_TYPE_DIALOG,
+ RES_TYPE_FONT,
+ RES_TYPE_FONTDIR,
+ RES_TYPE_ICON,
+ RES_TYPE_GROUP_ICON,
+ RES_TYPE_MENU,
+ RES_TYPE_MESSAGETABLE,
+ RES_TYPE_RCDATA,
+ RES_TYPE_STRINGTABLE,
+ RES_TYPE_USERDATA,
+ RES_TYPE_VERSIONINFO,
+ RES_TYPE_DLGINCLUDE,
+ RES_TYPE_PLUGPLAY,
+ RES_TYPE_VXD,
+ RES_TYPE_ANICURSOR,
+ RES_TYPE_ANIICON,
+ RES_TYPE_DLGINIT,
+ RES_TYPE_TOOLBAR
+};
+
+/* A res file and a COFF file store information differently. The
+ res_info structures holds data which in a res file is stored with
+ each resource, but in a COFF file is stored elsewhere. */
+
+typedef struct rc_res_res_info
+{
+ /* Language. In a COFF file, the third level of the directory is
+ keyed by the language, so the language of a resource is defined
+ by its location in the resource tree. */
+ rc_uint_type language;
+ /* Characteristics of the resource. Entirely user defined. In a
+ COFF file, the rc_res_directory structure has a characteristics
+ field, but I don't know if it's related to the one in the res
+ file. */
+ rc_uint_type characteristics;
+ /* Version of the resource. Entirely user defined. In a COFF file,
+ the rc_res_directory structure has a characteristics field, but I
+ don't know if it's related to the one in the res file. */
+ rc_uint_type version;
+ /* Memory flags. This is a combination of the MEMFLAG values
+ defined below. Most of these values are historical, and are not
+ meaningful for win32. I don't think there is any way to store
+ this information in a COFF file. */
+ rc_uint_type memflags;
+} rc_res_res_info;
+
+/* Binary layout of rc_res_info. */
+
+struct __attribute__ ((__packed__)) bin_res_info
+{
+ bfd_byte version[4];
+ bfd_byte memflags[2];
+ bfd_byte language[2];
+ bfd_byte version2[4];
+ bfd_byte characteristics[4];
+};
+#define BIN_RES_INFO_SIZE 16
+
+/* Each resource in a COFF file has some information which can does
+ not appear in a res file. */
+
+typedef struct rc_res_coff_info
+{
+ /* The code page used for the data. I don't really know what this
+ should be. It has something todo with ASCII to Unicode encoding. */
+ rc_uint_type codepage;
+ /* A resource entry in a COFF file has a reserved field, which we
+ record here when reading a COFF file. When writing a COFF file,
+ we set this field to zero. */
+ rc_uint_type reserved;
+} rc_res_coff_info;
+
+/* Resource data is stored in a rc_res_resource structure. */
+
+typedef struct rc_res_resource
+{
+ /* The type of resource. */
+ enum rc_res_type type;
+ /* The data for the resource. */
+ union
+ {
+ struct
+ {
+ rc_uint_type length;
+ const bfd_byte *data;
+ } data;
+ struct rc_accelerator *acc;
+ struct rc_cursor *cursor;
+ struct rc_group_cursor *group_cursor;
+ struct rc_dialog *dialog;
+ struct rc_fontdir *fontdir;
+ struct rc_group_icon *group_icon;
+ struct rc_menu *menu;
+ struct rc_rcdata_item *rcdata;
+ struct rc_stringtable *stringtable;
+ struct rc_rcdata_item *userdata;
+ struct rc_versioninfo *versioninfo;
+ struct rc_toolbar *toolbar;
+ } u;
+ /* Information from a res file. */
+ struct rc_res_res_info res_info;
+ /* Information from a COFF file. */
+ rc_res_coff_info coff_info;
+} rc_res_resource;
+
+#define SUBLANG_SHIFT 10
+
+/* Memory flags in the memflags field of a rc_res_resource. */
+
+#define MEMFLAG_MOVEABLE 0x10
+#define MEMFLAG_PURE 0x20
+#define MEMFLAG_PRELOAD 0x40
+#define MEMFLAG_DISCARDABLE 0x1000
+
+/* Standard resource type codes. These are used in the ID field of a
+ rc_res_entry structure. */
+
+#define RT_CURSOR 1
+#define RT_BITMAP 2
+#define RT_ICON 3
+#define RT_MENU 4
+#define RT_DIALOG 5
+#define RT_STRING 6
+#define RT_FONTDIR 7
+#define RT_FONT 8
+#define RT_ACCELERATOR 9
+#define RT_RCDATA 10
+#define RT_MESSAGETABLE 11
+#define RT_GROUP_CURSOR 12
+#define RT_GROUP_ICON 14
+#define RT_VERSION 16
+#define RT_DLGINCLUDE 17
+#define RT_PLUGPLAY 19
+#define RT_VXD 20
+#define RT_ANICURSOR 21
+#define RT_ANIICON 22
+#define RT_HTML 23
+#define RT_MANIFEST 24
+#define RT_DLGINIT 240
+#define RT_TOOLBAR 241
+
+/* An accelerator resource is a linked list of these structures. */
+
+typedef struct rc_accelerator
+{
+ /* Next accelerator. */
+ struct rc_accelerator *next;
+ /* Flags. A combination of the ACC values defined below. */
+ rc_uint_type flags;
+ /* Key value. */
+ rc_uint_type key;
+ /* Resource ID. */
+ rc_uint_type id;
+} rc_accelerator;
+
+struct __attribute__ ((__packed__)) bin_accelerator
+{
+ bfd_byte flags[2];
+ bfd_byte key[2];
+ bfd_byte id[2];
+ bfd_byte pad[2];
+};
+#define BIN_ACCELERATOR_SIZE 8
+
+/* Accelerator flags in the flags field of a rc_accelerator.
+ These are the same values that appear in a res file. I hope. */
+
+#define ACC_VIRTKEY 0x01
+#define ACC_NOINVERT 0x02
+#define ACC_SHIFT 0x04
+#define ACC_CONTROL 0x08
+#define ACC_ALT 0x10
+#define ACC_LAST 0x80
+
+/* A cursor resource. */
+
+typedef struct rc_cursor
+{
+ /* X coordinate of hotspot. */
+ bfd_signed_vma xhotspot;
+ /* Y coordinate of hotspot. */
+ bfd_signed_vma yhotspot;
+ /* Length of bitmap data. */
+ rc_uint_type length;
+ /* Data. */
+ const bfd_byte *data;
+} rc_cursor;
+
+struct __attribute__ ((__packed__)) bin_cursor
+{
+ bfd_byte xhotspot[2];
+ bfd_byte yhotspot[2];
+};
+#define BIN_CURSOR_SIZE 4
+
+/* A group_cursor resource is a list of rc_i_group_cursor structures. */
+
+typedef struct rc_group_cursor
+{
+ /* Next cursor in group. */
+ struct rc_group_cursor *next;
+ /* Width. */
+ rc_uint_type width;
+ /* Height. */
+ rc_uint_type height;
+ /* Planes. */
+ rc_uint_type planes;
+ /* Bits per pixel. */
+ rc_uint_type bits;
+ /* Number of bytes in cursor resource. */
+ rc_uint_type bytes;
+ /* Index of cursor resource. */
+ rc_uint_type index;
+} rc_group_cursor;
+
+struct __attribute__ ((__packed__)) bin_group_cursor_item
+{
+ bfd_byte width[2];
+ bfd_byte height[2];
+ bfd_byte planes[2];
+ bfd_byte bits[2];
+ bfd_byte bytes[4];
+ bfd_byte index[2];
+};
+#define BIN_GROUP_CURSOR_ITEM_SIZE 14
+
+struct __attribute__ ((__packed__)) bin_group_cursor
+{
+ bfd_byte sig1[2];
+ bfd_byte sig2[2];
+ bfd_byte nitems[2];
+ /* struct bin_group_cursor_item item[nitems]; */
+};
+#define BIN_GROUP_CURSOR_SIZE 6
+
+/* A dialog resource. */
+
+typedef struct rc_dialog
+{
+ /* Basic window style. */
+ unsigned int style;
+ /* Extended window style. */
+ rc_uint_type exstyle;
+ /* X coordinate. */
+ rc_uint_type x;
+ /* Y coordinate. */
+ rc_uint_type y;
+ /* Width. */
+ rc_uint_type width;
+ /* Height. */
+ rc_uint_type height;
+ /* Menu name. */
+ rc_res_id menu;
+ /* Class name. */
+ rc_res_id class;
+ /* Caption. */
+ unichar *caption;
+ /* Font point size. */
+ rc_uint_type pointsize;
+ /* Font name. */
+ unichar *font;
+ /* Extended information for a dialogex. */
+ struct rc_dialog_ex *ex;
+ /* Controls. */
+ struct rc_dialog_control *controls;
+} rc_dialog;
+
+struct __attribute__ ((__packed__)) bin_dialog
+{
+ bfd_byte style[4];
+ bfd_byte exstyle[4];
+ bfd_byte off[2];
+ bfd_byte x[2];
+ bfd_byte y[2];
+ bfd_byte width[2];
+ bfd_byte height[2];
+};
+#define BIN_DIALOG_SIZE 18
+
+/* An extended dialog has additional information. */
+
+typedef struct rc_dialog_ex
+{
+ /* Help ID. */
+ rc_uint_type help;
+ /* Font weight. */
+ rc_uint_type weight;
+ /* Whether the font is italic. */
+ bfd_byte italic;
+ /* Character set. */
+ bfd_byte charset;
+} rc_dialog_ex;
+
+struct __attribute__ ((__packed__)) bin_dialogex
+{
+ bfd_byte sig1[2];
+ bfd_byte sig2[2];
+ bfd_byte help[4];
+ bfd_byte exstyle[4];
+ bfd_byte style[4];
+ bfd_byte off[2];
+ bfd_byte x[2];
+ bfd_byte y[2];
+ bfd_byte width[2];
+ bfd_byte height[2];
+};
+#define BIN_DIALOGEX_SIZE 26
+
+struct __attribute__ ((__packed__)) bin_dialogfont
+{
+ bfd_byte pointsize[2];
+};
+#define BIN_DIALOGFONT_SIZE 2
+
+struct __attribute__ ((__packed__)) bin_dialogexfont
+{
+ bfd_byte pointsize[2];
+ bfd_byte weight[2];
+ bfd_byte italic[1];
+ bfd_byte charset[1];
+};
+#define BIN_DIALOGEXFONT_SIZE 6
+
+/* Window style flags, from the winsup Defines.h header file. These
+ can appear in the style field of a rc_dialog or a rc_dialog_control. */
+
+#define CW_USEDEFAULT 0x80000000
+#define WS_BORDER 0x800000L
+#define WS_CAPTION 0xc00000L
+#define WS_CHILD 0x40000000L
+#define WS_CHILDWINDOW 0x40000000L
+#define WS_CLIPCHILDREN 0x2000000L
+#define WS_CLIPSIBLINGS 0x4000000L
+#define WS_DISABLED 0x8000000L
+#define WS_DLGFRAME 0x400000L
+#define WS_GROUP 0x20000L
+#define WS_HSCROLL 0x100000L
+#define WS_ICONIC 0x20000000L
+#define WS_MAXIMIZE 0x1000000L
+#define WS_MAXIMIZEBOX 0x10000L
+#define WS_MINIMIZE 0x20000000L
+#define WS_MINIMIZEBOX 0x20000L
+#define WS_OVERLAPPED 0L
+#define WS_OVERLAPPEDWINDOW 0xcf0000L
+#define WS_POPUP 0x80000000L
+#define WS_POPUPWINDOW 0x80880000L
+#define WS_SIZEBOX 0x40000L
+#define WS_SYSMENU 0x80000L
+#define WS_TABSTOP 0x10000L
+#define WS_THICKFRAME 0x40000L
+#define WS_TILED 0L
+#define WS_TILEDWINDOW 0xcf0000L
+#define WS_VISIBLE 0x10000000L
+#define WS_VSCROLL 0x200000L
+#define MDIS_ALLCHILDSTYLES 0x1
+#define BS_3STATE 0x5L
+#define BS_AUTO3STATE 0x6L
+#define BS_AUTOCHECKBOX 0x3L
+#define BS_AUTORADIOBUTTON 0x9L
+#define BS_BITMAP 0x80L
+#define BS_BOTTOM 0x800L
+#define BS_CENTER 0x300L
+#define BS_CHECKBOX 0x2L
+#define BS_DEFPUSHBUTTON 0x1L
+#define BS_GROUPBOX 0x7L
+#define BS_ICON 0x40L
+#define BS_LEFT 0x100L
+#define BS_LEFTTEXT 0x20L
+#define BS_MULTILINE 0x2000L
+#define BS_NOTIFY 0x4000L
+#define BS_OWNERDRAW 0xbL
+#define BS_PUSHBOX 0xcL /* FIXME! What should this be? */
+#define BS_PUSHBUTTON 0L
+#define BS_PUSHLIKE 0x1000L
+#define BS_RADIOBUTTON 0x4L
+#define BS_RIGHT 0x200L
+#define BS_RIGHTBUTTON 0x20L
+#define BS_TEXT 0L
+#define BS_TOP 0x400L
+#define BS_USERBUTTON 0x8L
+#define BS_VCENTER 0xc00L
+#define CBS_AUTOHSCROLL 0x40L
+#define CBS_DISABLENOSCROLL 0x800L
+#define CBS_DROPDOWN 0x2L
+#define CBS_DROPDOWNLIST 0x3L
+#define CBS_HASSTRINGS 0x200L
+#define CBS_LOWERCASE 0x4000L
+#define CBS_NOINTEGRALHEIGHT 0x400L
+#define CBS_OEMCONVERT 0x80L
+#define CBS_OWNERDRAWFIXED 0x10L
+#define CBS_OWNERDRAWVARIABLE 0x20L
+#define CBS_SIMPLE 0x1L
+#define CBS_SORT 0x100L
+#define CBS_UPPERCASE 0x2000L
+#define ES_AUTOHSCROLL 0x80L
+#define ES_AUTOVSCROLL 0x40L
+#define ES_CENTER 0x1L
+#define ES_LEFT 0L
+#define ES_LOWERCASE 0x10L
+#define ES_MULTILINE 0x4L
+#define ES_NOHIDESEL 0x100L
+#define ES_NUMBER 0x2000L
+#define ES_OEMCONVERT 0x400L
+#define ES_PASSWORD 0x20L
+#define ES_READONLY 0x800L
+#define ES_RIGHT 0x2L
+#define ES_UPPERCASE 0x8L
+#define ES_WANTRETURN 0x1000L
+#define LBS_DISABLENOSCROLL 0x1000L
+#define LBS_EXTENDEDSEL 0x800L
+#define LBS_HASSTRINGS 0x40L
+#define LBS_MULTICOLUMN 0x200L
+#define LBS_MULTIPLESEL 0x8L
+#define LBS_NODATA 0x2000L
+#define LBS_NOINTEGRALHEIGHT 0x100L
+#define LBS_NOREDRAW 0x4L
+#define LBS_NOSEL 0x4000L
+#define LBS_NOTIFY 0x1L
+#define LBS_OWNERDRAWFIXED 0x10L
+#define LBS_OWNERDRAWVARIABLE 0x20L
+#define LBS_SORT 0x2L
+#define LBS_STANDARD 0xa00003L
+#define LBS_USETABSTOPS 0x80L
+#define LBS_WANTKEYBOARDINPUT 0x400L
+#define SBS_BOTTOMALIGN 0x4L
+#define SBS_HORZ 0L
+#define SBS_LEFTALIGN 0x2L
+#define SBS_RIGHTALIGN 0x4L
+#define SBS_SIZEBOX 0x8L
+#define SBS_SIZEBOXBOTTOMRIGHTALIGN 0x4L
+#define SBS_SIZEBOXTOPLEFTALIGN 0x2L
+#define SBS_SIZEGRIP 0x10L
+#define SBS_TOPALIGN 0x2L
+#define SBS_VERT 0x1L
+#define SS_BITMAP 0xeL
+#define SS_BLACKFRAME 0x7L
+#define SS_BLACKRECT 0x4L
+#define SS_CENTER 0x1L
+#define SS_CENTERIMAGE 0x200L
+#define SS_ENHMETAFILE 0xfL
+#define SS_ETCHEDFRAME 0x12L
+#define SS_ETCHEDHORZ 0x10L
+#define SS_ETCHEDVERT 0x11L
+#define SS_GRAYFRAME 0x8L
+#define SS_GRAYRECT 0x5L
+#define SS_ICON 0x3L
+#define SS_LEFT 0L
+#define SS_LEFTNOWORDWRAP 0xcL
+#define SS_NOPREFIX 0x80L
+#define SS_NOTIFY 0x100L
+#define SS_OWNERDRAW 0xdL
+#define SS_REALSIZEIMAGE 0x800L
+#define SS_RIGHT 0x2L
+#define SS_RIGHTJUST 0x400L
+#define SS_SIMPLE 0xbL
+#define SS_SUNKEN 0x1000L
+#define SS_USERITEM 0xaL
+#define SS_WHITEFRAME 0x9L
+#define SS_WHITERECT 0x6L
+#define DS_3DLOOK 0x4L
+#define DS_ABSALIGN 0x1L
+#define DS_CENTER 0x800L
+#define DS_CENTERMOUSE 0x1000L
+#define DS_CONTEXTHELP 0x2000L
+#define DS_CONTROL 0x400L
+#define DS_FIXEDSYS 0x8L
+#define DS_LOCALEDIT 0x20L
+#define DS_MODALFRAME 0x80L
+#define DS_NOFAILCREATE 0x10L
+#define DS_NOIDLEMSG 0x100L
+#define DS_SETFONT 0x40L
+#define DS_SETFOREGROUND 0x200L
+#define DS_SYSMODAL 0x2L
+
+/* A dialog control. */
+
+typedef struct rc_dialog_control
+{
+ /* Next control. */
+ struct rc_dialog_control *next;
+ /* ID. */
+ rc_uint_type id;
+ /* Style. */
+ rc_uint_type style;
+ /* Extended style. */
+ rc_uint_type exstyle;
+ /* X coordinate. */
+ rc_uint_type x;
+ /* Y coordinate. */
+ rc_uint_type y;
+ /* Width. */
+ rc_uint_type width;
+ /* Height. */
+ rc_uint_type height;
+ /* Class name. */
+ rc_res_id class;
+ /* Associated text. */
+ rc_res_id text;
+ /* Extra data for the window procedure. */
+ struct rc_rcdata_item *data;
+ /* Help ID. Only used in an extended dialog. */
+ rc_uint_type help;
+} rc_dialog_control;
+
+struct __attribute__ ((__packed__)) bin_dialog_control
+{
+ bfd_byte style[4];
+ bfd_byte exstyle[4];
+ bfd_byte x[2];
+ bfd_byte y[2];
+ bfd_byte width[2];
+ bfd_byte height[2];
+ bfd_byte id[2];
+};
+#define BIN_DIALOG_CONTROL_SIZE 18
+
+struct __attribute__ ((__packed__)) bin_dialogex_control
+{
+ bfd_byte help[4];
+ bfd_byte exstyle[4];
+ bfd_byte style[4];
+ bfd_byte x[2];
+ bfd_byte y[2];
+ bfd_byte width[2];
+ bfd_byte height[2];
+ bfd_byte id[4];
+};
+#define BIN_DIALOGEX_CONTROL_SIZE 24
+
+/* Control classes. These can be used as the ID field in a rc_dialog_control. */
+
+#define CTL_BUTTON 0x80
+#define CTL_EDIT 0x81
+#define CTL_STATIC 0x82
+#define CTL_LISTBOX 0x83
+#define CTL_SCROLLBAR 0x84
+#define CTL_COMBOBOX 0x85
+
+/* A fontdir resource is a list of rc_fontdir. */
+
+typedef struct rc_fontdir
+{
+ struct rc_fontdir *next;
+ /* Index of font entry. */
+ rc_uint_type index;
+ /* Length of font information. */
+ rc_uint_type length;
+ /* Font information. */
+ const bfd_byte *data;
+} rc_fontdir;
+
+struct __attribute__ ((__packed__)) bin_fontdir_item
+{
+ bfd_byte index[2];
+ bfd_byte header[54];
+ bfd_byte device_name[1];
+ /* bfd_byte face_name[]; */
+};
+
+/* A group_icon resource is a list of rc_group_icon. */
+
+typedef struct rc_group_icon
+{
+ /* Next icon in group. */
+ struct rc_group_icon *next;
+ /* Width. */
+ bfd_byte width;
+ /* Height. */
+ bfd_byte height;
+ /* Color count. */
+ bfd_byte colors;
+ /* Planes. */
+ rc_uint_type planes;
+ /* Bits per pixel. */
+ rc_uint_type bits;
+ /* Number of bytes in cursor resource. */
+ rc_uint_type bytes;
+ /* Index of cursor resource. */
+ rc_uint_type index;
+} rc_group_icon;
+
+struct __attribute__ ((__packed__)) bin_group_icon
+{
+ bfd_byte sig1[2];
+ bfd_byte sig2[2];
+ bfd_byte count[2];
+};
+#define BIN_GROUP_ICON_SIZE 6
+
+struct __attribute__ ((__packed__)) bin_group_icon_item
+{
+ bfd_byte width[1];
+ bfd_byte height[1];
+ bfd_byte colors[1];
+ bfd_byte pad[1];
+ bfd_byte planes[2];
+ bfd_byte bits[2];
+ bfd_byte bytes[4];
+ bfd_byte index[2];
+};
+#define BIN_GROUP_ICON_ITEM_SIZE 14
+
+/* A menu resource. */
+
+typedef struct rc_menu
+{
+ /* List of menuitems. */
+ struct rc_menuitem *items;
+ /* Help ID. I don't think there is any way to set this in an rc
+ file, but it can appear in the binary format. */
+ rc_uint_type help;
+} rc_menu;
+
+struct __attribute__ ((__packed__)) bin_menu
+{
+ bfd_byte sig1[2];
+ bfd_byte sig2[2];
+};
+#define BIN_MENU_SIZE 4
+
+struct __attribute__ ((__packed__)) bin_menuex
+{
+ bfd_byte sig1[2];
+ bfd_byte sig2[2];
+ bfd_byte help[4];
+};
+#define BIN_MENUEX_SIZE 8
+
+/* A menu resource is a list of rc_menuitem. */
+
+typedef struct rc_menuitem
+{
+ /* Next menu item. */
+ struct rc_menuitem *next;
+ /* Type. In a normal menu, rather than a menuex, this is the flags
+ field. */
+ rc_uint_type type;
+ /* State. This is only used in a menuex. */
+ rc_uint_type state;
+ /* Id. */
+ rc_uint_type id;
+ /* Unicode text. */
+ unichar *text;
+ /* Popup menu items for a popup. */
+ struct rc_menuitem *popup;
+ /* Help ID. This is only used in a menuex. */
+ rc_uint_type help;
+} rc_menuitem;
+
+struct __attribute__ ((__packed__)) bin_menuitem
+{
+ bfd_byte flags[2];
+ bfd_byte id[2];
+};
+#define BIN_MENUITEM_SIZE 4
+#define BIN_MENUITEM_POPUP_SIZE 2
+
+struct __attribute__ ((__packed__)) bin_menuitemex
+{
+ bfd_byte type[4];
+ bfd_byte state[4];
+ bfd_byte id[4];
+ bfd_byte flags[2];
+ /* unicode text */
+ /* if popup: align, bfd_byte help[4], align, bin_menuitemex[]; */
+};
+#define BIN_MENUITEMEX_SIZE 14
+
+/* Menu item flags. These can appear in the flags field of a rc_menuitem. */
+
+#define MENUITEM_GRAYED 0x001
+#define MENUITEM_INACTIVE 0x002
+#define MENUITEM_BITMAP 0x004
+#define MENUITEM_OWNERDRAW 0x100
+#define MENUITEM_CHECKED 0x008
+#define MENUITEM_POPUP 0x010
+#define MENUITEM_MENUBARBREAK 0x020
+#define MENUITEM_MENUBREAK 0x040
+#define MENUITEM_ENDMENU 0x080
+#define MENUITEM_HELP 0x4000
+
+/* An rcdata resource is a pointer to a list of rc_rcdata_item. */
+
+typedef struct rc_rcdata_item
+{
+ /* Next data item. */
+ struct rc_rcdata_item *next;
+ /* Type of data. */
+ enum
+ {
+ RCDATA_WORD,
+ RCDATA_DWORD,
+ RCDATA_STRING,
+ RCDATA_WSTRING,
+ RCDATA_BUFFER
+ } type;
+ union
+ {
+ rc_uint_type word;
+ rc_uint_type dword;
+ struct
+ {
+ rc_uint_type length;
+ const char *s;
+ } string;
+ struct
+ {
+ rc_uint_type length;
+ const unichar *w;
+ } wstring;
+ struct
+ {
+ rc_uint_type length;
+ const bfd_byte *data;
+ } buffer;
+ } u;
+} rc_rcdata_item;
+
+/* A stringtable resource is a pointer to a rc_stringtable. */
+
+typedef struct rc_stringtable
+{
+ /* Each stringtable resource is a list of 16 unicode strings. */
+ struct
+ {
+ /* Length of string. */
+ rc_uint_type length;
+ /* String data if length > 0. */
+ unichar *string;
+ } strings[16];
+} rc_stringtable;
+
+/* A versioninfo resource points to a rc_versioninfo. */
+
+typedef struct rc_versioninfo
+{
+ /* Fixed version information. */
+ struct rc_fixed_versioninfo *fixed;
+ /* Variable version information. */
+ struct rc_ver_info *var;
+} rc_versioninfo;
+
+struct __attribute__ ((__packed__)) bin_versioninfo
+{
+ bfd_byte size[2];
+ bfd_byte fixed_size[2];
+ bfd_byte sig2[2];
+};
+#define BIN_VERSIONINFO_SIZE 6
+
+/* The fixed portion of a versioninfo resource. */
+
+typedef struct rc_fixed_versioninfo
+{
+ /* The file version, which is two 32 bit integers. */
+ rc_uint_type file_version_ms;
+ rc_uint_type file_version_ls;
+ /* The product version, which is two 32 bit integers. */
+ rc_uint_type product_version_ms;
+ rc_uint_type product_version_ls;
+ /* The file flags mask. */
+ rc_uint_type file_flags_mask;
+ /* The file flags. */
+ rc_uint_type file_flags;
+ /* The OS type. */
+ rc_uint_type file_os;
+ /* The file type. */
+ rc_uint_type file_type;
+ /* The file subtype. */
+ rc_uint_type file_subtype;
+ /* The date, which in Windows is two 32 bit integers. */
+ rc_uint_type file_date_ms;
+ rc_uint_type file_date_ls;
+} rc_fixed_versioninfo;
+
+struct __attribute__ ((__packed__)) bin_fixed_versioninfo
+{
+ bfd_byte sig1[4];
+ bfd_byte sig2[4];
+ bfd_byte file_version[4];
+ bfd_byte file_version_ls[4];
+ bfd_byte product_version_ms[4];
+ bfd_byte product_version_ls[4];
+ bfd_byte file_flags_mask[4];
+ bfd_byte file_flags[4];
+ bfd_byte file_os[4];
+ bfd_byte file_type[4];
+ bfd_byte file_subtype[4];
+ bfd_byte file_date_ms[4];
+ bfd_byte file_date_ls[4];
+};
+#define BIN_FIXED_VERSIONINFO_SIZE 52
+
+/* A list of variable version information. */
+
+typedef struct rc_ver_info
+{
+ /* Next item. */
+ struct rc_ver_info *next;
+ /* Type of data. */
+ enum { VERINFO_STRING, VERINFO_VAR } type;
+ union
+ {
+ /* StringFileInfo data. */
+ struct
+ {
+ /* Language. */
+ unichar *language;
+ /* Strings. */
+ struct rc_ver_stringinfo *strings;
+ } string;
+ /* VarFileInfo data. */
+ struct
+ {
+ /* Key. */
+ unichar *key;
+ /* Values. */
+ struct rc_ver_varinfo *var;
+ } var;
+ } u;
+} rc_ver_info;
+
+struct __attribute__ ((__packed__)) bin_ver_info
+{
+ bfd_byte size[2];
+ bfd_byte sig1[2];
+ bfd_byte sig2[2];
+};
+#define BIN_VER_INFO_SIZE 6
+
+/* A list of string version information. */
+
+typedef struct rc_ver_stringinfo
+{
+ /* Next string. */
+ struct rc_ver_stringinfo *next;
+ /* Key. */
+ unichar *key;
+ /* Value. */
+ unichar *value;
+} rc_ver_stringinfo;
+
+/* A list of variable version information. */
+
+typedef struct rc_ver_varinfo
+{
+ /* Next item. */
+ struct rc_ver_varinfo *next;
+ /* Language ID. */
+ rc_uint_type language;
+ /* Character set ID. */
+ rc_uint_type charset;
+} rc_ver_varinfo;
+
+typedef struct rc_toolbar_item
+{
+ struct rc_toolbar_item *next;
+ struct rc_toolbar_item *prev;
+ rc_res_id id;
+} rc_toolbar_item;
+
+struct __attribute__ ((__packed__)) bin_messagetable_item
+{
+ bfd_byte length[2];
+ bfd_byte flags[2];
+ bfd_byte data[1];
+};
+#define BIN_MESSAGETABLE_ITEM_SIZE 4
+
+#define MESSAGE_RESOURCE_UNICODE 0x0001
+
+struct __attribute__ ((__packed__)) bin_messagetable_block
+{
+ bfd_byte lowid[4];
+ bfd_byte highid[4];
+ bfd_byte offset[4];
+};
+#define BIN_MESSAGETABLE_BLOCK_SIZE 12
+
+struct __attribute__ ((__packed__)) bin_messagetable
+{
+ bfd_byte cblocks[4];
+ struct bin_messagetable_block items[1];
+};
+#define BIN_MESSAGETABLE_SIZE 8
+
+typedef struct rc_toolbar
+{
+ rc_uint_type button_width;
+ rc_uint_type button_height;
+ rc_uint_type nitems;
+ rc_toolbar_item *items;
+} rc_toolbar;
+
+struct __attribute__ ((__packed__)) bin_toolbar
+{
+ bfd_byte button_width[4];
+ bfd_byte button_height[4];
+ bfd_byte nitems[4];
+ /* { bfd_byte id[4]; } * nitems; */
+};
+#define BIN_TOOLBAR_SIZE 12
+
+extern int target_is_bigendian;
+
+typedef struct windres_bfd
+{
+ bfd *abfd;
+ asection *sec;
+ rc_uint_type kind : 4;
+} windres_bfd;
+
+#define WR_KIND_TARGET 0
+#define WR_KIND_BFD 1
+#define WR_KIND_BFD_BIN_L 2
+#define WR_KIND_BFD_BIN_B 3
+
+#define WR_KIND(PTR) (PTR)->kind
+#define WR_SECTION(PTR) (PTR)->sec
+#define WR_BFD(PTR) (PTR)->abfd
+
+extern void set_windres_bfd_content (windres_bfd *, const void *, rc_uint_type, rc_uint_type);
+extern void get_windres_bfd_content (windres_bfd *, void *, rc_uint_type, rc_uint_type);
+
+extern void windres_put_8 (windres_bfd *, void *, rc_uint_type);
+extern void windres_put_16 (windres_bfd *, void *, rc_uint_type);
+extern void windres_put_32 (windres_bfd *, void *, rc_uint_type);
+extern rc_uint_type windres_get_8 (windres_bfd *, const void *, rc_uint_type);
+extern rc_uint_type windres_get_16 (windres_bfd *, const void *, rc_uint_type);
+extern rc_uint_type windres_get_32 (windres_bfd *, const void *, rc_uint_type);
+
+extern void set_windres_bfd (windres_bfd *, bfd *, asection *, rc_uint_type);
+extern void set_windres_bfd_endianess (windres_bfd *, int);
+
+#endif
diff --git a/contrib/binutils/binutils/windmc.c b/contrib/binutils/binutils/windmc.c
new file mode 100644
index 0000000..5465b35
--- /dev/null
+++ b/contrib/binutils/binutils/windmc.c
@@ -0,0 +1,1197 @@
+/* windmc.c -- a program to compile Windows message files.
+ Copyright 2007
+ Free Software Foundation, Inc.
+ Written by Kai Tietz, Onevision.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* This program can read and comile Windows message format.
+
+ It is based on information taken from the following sources:
+
+ * Microsoft documentation.
+
+ * The wmc program, written by Bertho A. Stultiens (BS). */
+
+#include "sysdep.h"
+#include <assert.h>
+#include <time.h>
+#include "bfd.h"
+#include "getopt.h"
+#include "bucomm.h"
+#include "libiberty.h"
+#include "safe-ctype.h"
+#include "obstack.h"
+
+#include "windmc.h"
+#include "windint.h"
+
+/* Defines a message compiler element item with length and offset
+ information. */
+typedef struct mc_msg_item
+{
+ rc_uint_type res_len;
+ rc_uint_type res_off;
+ struct bin_messagetable_item *res;
+} mc_msg_item;
+
+/* Defined in bfd/binary.c. Used to set architecture and machine of input
+ binary files. */
+extern enum bfd_architecture bfd_external_binary_architecture;
+extern unsigned long bfd_external_machine;
+
+int target_is_bigendian = 0;
+const char *def_target_arch;
+
+/* Globals and static variable definitions. */
+
+/* bfd global helper struct variable. */
+static struct
+{
+ bfd *abfd;
+ asection *sec;
+} mc_bfd;
+
+/* Memory list. */
+mc_node *mc_nodes = NULL;
+static mc_node_lang **mc_nodes_lang = NULL;
+static int mc_nodes_lang_count = 0;
+static mc_keyword **mc_severity_codes = NULL;
+static int mc_severity_codes_count = 0;
+static mc_keyword **mc_facility_codes = NULL;
+static int mc_facility_codes_count = 0;
+
+/* When we are building a resource tree, we allocate everything onto
+ an obstack, so that we can free it all at once if we want. */
+#define obstack_chunk_alloc xmalloc
+#define obstack_chunk_free free
+
+/* The resource building obstack. */
+static struct obstack res_obstack;
+
+/* Flag variables. */
+/* Set by -C. Set the default code page to be used for input text file. */
+static rc_uint_type mcset_codepage_in = 0;
+
+/* Set by -O. Set the default code page to be used for output text files. */
+static rc_uint_type mcset_codepage_out = 0;
+
+/* Set by -b. .BIN filename should have .mc filename_ included for uniqueness. */
+static int mcset_prefix_bin = 0;
+
+/* The base name of the .mc file. */
+static const char *mcset_mc_basename = "unknown";
+
+/* Set by -e <ext>. Specify the extension for the header file. */
+static const char *mcset_header_ext = ".h";
+
+/* Set by -h <path>. Gives the path of where to create the C include file. */
+static const char *mcset_header_dir = "./";
+
+/* Set by -r <path>. Gives the path of where to create the RC include file
+ and the binary message resource files it includes. */
+static const char *mcset_rc_dir = "./";
+
+/* Modified by -a & -u. By -u input file is unicode, by -a is ASCII (default). */
+static int mcset_text_in_is_unicode = 0;
+
+/* Modified by -A & -U. By -U bin file is unicode (default), by -A is ASCII. */
+static int mcset_bin_out_is_unicode = 1;
+
+/* Set by -c. Sets the Customer bit in all the message ID's. */
+int mcset_custom_bit = 0;
+
+/* Set by -o. Generate OLE2 header file. Use HRESULT definition instead of
+ status code definition. */
+static int mcset_use_hresult = 0;
+
+/* Set by -m <msglen>. Generate a warning if the size of any message exceeds
+ maxmsglen characters. */
+rc_uint_type mcset_max_message_length = 0;
+
+/* Set by -d. Sets message values in header to decimal initially. */
+int mcset_out_values_are_decimal = 0;
+
+/* Set by -n. terminates all strings with null's in the message tables. */
+static int mcset_automatic_null_termination = 0;
+
+/* The type used for message id output in header. */
+unichar *mcset_msg_id_typedef = NULL;
+
+/* Set by -x path. Geberated debug C file for mapping ID's to text. */
+static const char *mcset_dbg_dir = NULL;
+
+/* getopt long name definitions. */
+static const struct option long_options[] =
+{
+ {"binprefix", no_argument, 0, 'b'},
+ {"target", required_argument, 0, 'F'},
+ {"extension", required_argument, 0, 'e'},
+ {"headerdir", required_argument, 0, 'h'},
+ {"rcdir", required_argument, 0, 'r'},
+ {"verbose", no_argument, 0, 'v'},
+ {"codepage_in", required_argument, 0, 'C'},
+ {"codepage_out", required_argument, 0, 'O'},
+ {"maxlength", required_argument, 0, 'm'},
+ {"ascii_in", no_argument, 0, 'a'},
+ {"ascii_out", no_argument, 0, 'A'},
+ {"unicode_in", no_argument, 0, 'u'},
+ {"unicode_out", no_argument, 0, 'U'},
+ {"customflag", no_argument, 0, 'c'},
+ {"decimal_values", no_argument, 0, 'd'},
+ {"hresult_use", no_argument, 0, 'o'},
+ {"nullterminate", no_argument, 0, 'n'},
+ {"xdbg", required_argument, 0, 'x'},
+ {"version", no_argument, 0, 'V'},
+ {"help", no_argument, 0, 'H'},
+ {0, no_argument, 0, 0}
+};
+
+
+/* Initialize the resource building obstack. */
+static void
+res_init (void)
+{
+ obstack_init (&res_obstack);
+}
+
+/* Allocate space on the resource building obstack. */
+void *
+res_alloc (rc_uint_type bytes)
+{
+ return (void *) obstack_alloc (&res_obstack, (size_t) bytes);
+}
+
+static FILE *
+mc_create_path_text_file (const char *path, const char *ext)
+{
+ FILE *ret;
+ size_t len = 1;
+ char *hsz;
+
+ len += (path != NULL ? strlen (path) : 0);
+ len += strlen (mcset_mc_basename);
+ len += (ext != NULL ? strlen (ext) : 0);
+ hsz = xmalloc (len);
+ sprintf (hsz, "%s%s%s", (path != NULL ? path : ""), mcset_mc_basename,
+ (ext != NULL ? ext : ""));
+ if ((ret = fopen (hsz, "wb")) == NULL)
+ fatal (_("can't create %s file ,%s' for output.\n"), (ext ? ext : "text"), hsz);
+ free (hsz);
+ return ret;
+}
+
+static void
+usage (FILE *stream, int status)
+{
+ fprintf (stream, _("Usage: %s [option(s)] [input-file]\n"),
+ program_name);
+ fprintf (stream, _(" The options are:\n\
+ -a --ascii_in Read input file as ASCII file\n\
+ -A --ascii_out Write binary messages as ASCII\n\
+ -b --binprefix .bin filename is prefixed by .mc filename_ for uniqueness.\n\
+ -c --customflag Set custom flags for messages\n\
+ -C --codepage_in=<val> Set codepage when reading mc text file\n\
+ -d --decimal_values Print values to text files decimal\n\
+ -e --extension=<extension> Set header extension used on export header file\n\
+ -F --target <target> Specify output target for endianess.\n\
+ -h --headerdir=<directory> Set the export directory for headers\n\
+ -u --unicode_in Read input file as UTF16 file\n\
+ -U --unicode_out Write binary messages as UFT16\n\
+ -m --maxlength=<val> Set the maximal allowed message length\n\
+ -n --nullterminate Automatic add a zero termination to strings\n\
+ -o --hresult_use Use HRESULT definition instead of status code definition\n\
+ -O --codepage_out=<val> Set codepage used for writing text file\n\
+ -r --rcdir=<directory> Set the export directory for rc files\n\
+ -x --xdbg=<directory> Where to create the .dbg C include file\n\
+ that maps message ID's to their symbolic name.\n\
+"));
+ fprintf (stream, _("\
+ -H --help Print this help message\n\
+ -v --verbose Verbose - tells you what it's doing\n\
+ -V --version Print version information\n"));
+
+ list_supported_targets (program_name, stream);
+
+ if (REPORT_BUGS_TO[0] && status == 0)
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
+
+ exit (status);
+}
+
+static void
+set_endianess (bfd *abfd, const char *target)
+{
+ const bfd_target *target_vec;
+
+ def_target_arch = NULL;
+ target_vec = bfd_find_target (target, abfd);
+ if (! target_vec)
+ fatal ("Can't detect target endianess and architecture.");
+ target_is_bigendian = ((target_vec->byteorder == BFD_ENDIAN_BIG) ? 1 : 0);
+ {
+ const char *tname = target_vec->name;
+ const char **arch = bfd_arch_list ();
+
+ if (arch && tname)
+ {
+ if (strchr (tname, '-') != NULL)
+ tname = strchr (tname, '-') + 1;
+ while (*arch != NULL)
+ {
+ const char *in_a = strstr (*arch, tname);
+ char end_ch = (in_a ? in_a[strlen (tname)] : 0);
+ if (in_a && (in_a == *arch || in_a[-1] == ':')
+ && end_ch == 0)
+ {
+ def_target_arch = *arch;
+ break;
+ }
+ arch++;
+ }
+ }
+ if (! def_target_arch)
+ fatal ("Can't detect architecture.");
+ }
+}
+
+static int
+probe_codepage (rc_uint_type *cp, int *is_uni, const char *pswitch, int defmode)
+{
+ if (*is_uni == -1)
+ {
+ if (*cp != CP_UTF16)
+ *is_uni = defmode;
+ else
+ *is_uni = 1;
+ }
+ if (*is_uni)
+ {
+ if (*cp != 0 && *cp != CP_UTF16)
+ {
+ fprintf (stderr, _("%s: warning: "), program_name);
+ fprintf (stderr, _("A codepage was specified switch ,%s' and UTF16.\n"), pswitch);
+ fprintf (stderr, _("\tcodepage settings are ignored.\n"));
+ }
+ *cp = CP_UTF16;
+ return 1;
+ }
+ if (*cp == CP_UTF16)
+ {
+ *is_uni = 1;
+ return 1;
+ }
+ if (*cp == 0)
+ *cp = 1252;
+ if (! unicode_is_valid_codepage (*cp))
+ fatal ("Code page 0x%x is unknown.", (unsigned int) *cp);
+ *is_uni = 0;
+ return 1;
+}
+
+mc_node *
+mc_add_node (void)
+{
+ mc_node *ret;
+
+ ret = res_alloc (sizeof (mc_node));
+ memset (ret, 0, sizeof (mc_node));
+ if (! mc_nodes)
+ mc_nodes = ret;
+ else
+ {
+ mc_node *h = mc_nodes;
+
+ while (h->next != NULL)
+ h = h->next;
+ h->next = ret;
+ }
+ return ret;
+}
+
+mc_node_lang *
+mc_add_node_lang (mc_node *root, const mc_keyword *lang, rc_uint_type vid)
+{
+ mc_node_lang *ret, *h, *p;
+
+ if (! lang || ! root)
+ fatal (_("try to add a ill language."));
+ ret = res_alloc (sizeof (mc_node_lang));
+ memset (ret, 0, sizeof (mc_node_lang));
+ ret->lang = lang;
+ ret->vid = vid;
+ if ((h = root->sub) == NULL)
+ root->sub = ret;
+ else
+ {
+ p = NULL;
+ while (h != NULL)
+ {
+ if (h->lang->nval > lang->nval)
+ break;
+ if (h->lang->nval == lang->nval)
+ {
+ if (h->vid > vid)
+ break;
+ if (h->vid == vid)
+ fatal ("double defined message id %ld.\n", (long) vid);
+ }
+ h = (p = h)->next;
+ }
+ ret->next = h;
+ if (! p)
+ root->sub = ret;
+ else
+ p->next = ret;
+ }
+ return ret;
+}
+
+static char *
+convert_unicode_to_ACP (const unichar *usz)
+{
+ char *s;
+ rc_uint_type l;
+
+ if (! usz)
+ return NULL;
+ codepage_from_unicode (&l, usz, &s, mcset_codepage_out);
+ if (! s)
+ fatal ("unicode string not mappable to ASCII codepage 0x%lx.\n", (long) mcset_codepage_out);
+ return s;
+}
+
+static void
+write_dbg_define (FILE *fp, const unichar *sym_name, const unichar *typecast)
+{
+ char *sym;
+
+ if (!sym_name || sym_name[0] == 0)
+ return;
+ sym = convert_unicode_to_ACP (sym_name);
+ fprintf (fp, " {(");
+ if (typecast)
+ unicode_print (fp, typecast, unichar_len (typecast));
+ else
+ fprintf (fp, "DWORD");
+ fprintf (fp, ") %s, \"%s\" },\n", sym, sym);
+}
+
+static void
+write_header_define (FILE *fp, const unichar *sym_name, rc_uint_type vid, const unichar *typecast, mc_node_lang *nl)
+{
+ char *sym;
+ char *tdef = NULL;
+
+ if (!sym_name || sym_name[0] == 0)
+ {
+ if (nl != NULL)
+ {
+ if (mcset_out_values_are_decimal)
+ fprintf (fp, "//\n// MessageId: 0x%lu\n//\n", (unsigned long) vid);
+ else
+ fprintf (fp, "//\n// MessageId: 0x%lx\n//\n", (unsigned long) vid);
+ }
+ return;
+ }
+ sym = convert_unicode_to_ACP (sym_name);
+ if (typecast && typecast[0] != 0)
+ tdef = convert_unicode_to_ACP (typecast);
+ fprintf (fp, "//\n// MessageId: %s\n//\n", sym);
+ if (! mcset_out_values_are_decimal)
+ fprintf (fp, "#define %s %s%s%s 0x%lx\n\n", sym,
+ (tdef ? "(" : ""), (tdef ? tdef : ""), (tdef ? ")" : ""),
+ (unsigned long) vid);
+ else
+ fprintf (fp, "#define %s %s%s%s 0x%lu\n\n", sym,
+ (tdef ? "(" : ""), (tdef ? tdef : ""), (tdef ? ")" : ""),
+ (unsigned long) vid);
+}
+
+static int
+sort_mc_node_lang (const void *l, const void *r)
+{
+ const mc_node_lang *l1 = *((const mc_node_lang **)l);
+ const mc_node_lang *r1 = *((const mc_node_lang **)r);
+
+ if (l == r)
+ return 0;
+ if (l1->lang != r1->lang)
+ {
+ if (l1->lang->nval < r1->lang->nval)
+ return -1;
+ return 1;
+ }
+ if (l1->vid == r1->vid)
+ return 0;
+ if (l1->vid < r1->vid)
+ return -1;
+ return 1;
+}
+
+static int
+sort_keyword_by_nval (const void *l, const void *r)
+{
+ const mc_keyword *l1 = *((const mc_keyword **)l);
+ const mc_keyword *r1 = *((const mc_keyword **)r);
+ rc_uint_type len1, len2;
+ int e;
+
+ if (l == r)
+ return 0;
+ if (l1->nval != r1->nval)
+ {
+ if (l1->nval < r1->nval)
+ return -1;
+ return 1;
+ }
+ len1 = unichar_len (l1->usz);
+ len2 = unichar_len (r1->usz);
+ if (len1 <= len2)
+ e = memcmp (l1->usz, r1->usz, sizeof (unichar) * len1);
+ else
+ e = memcmp (l1->usz, r1->usz, sizeof (unichar) * len2);
+ if (e)
+ return e;
+ if (len1 < len2)
+ return -1;
+ else if (len1 > len2)
+ return 1;
+ return 0;
+}
+
+static void
+do_sorts (void)
+{
+ mc_node *h;
+ mc_node_lang *n;
+ const mc_keyword *k;
+ int i;
+
+ /* Sort message by their language and id ascending. */
+ mc_nodes_lang_count = 0;
+
+ h = mc_nodes;
+ while (h != NULL)
+ {
+ n = h->sub;
+ while (n != NULL)
+ {
+ mc_nodes_lang_count +=1;
+ n = n->next;
+ }
+ h = h->next;
+ }
+
+ if (mc_nodes_lang_count != 0)
+ {
+ h = mc_nodes;
+ i = 0;
+ mc_nodes_lang = xmalloc (sizeof (mc_node_lang *) * mc_nodes_lang_count);
+
+ while (h != NULL)
+ {
+ n = h->sub;
+ while (n != NULL)
+ {
+ mc_nodes_lang[i++] = n;
+ n = n->next;
+ }
+ h = h->next;
+ }
+ qsort (mc_nodes_lang, (size_t) mc_nodes_lang_count, sizeof (mc_node_lang *), sort_mc_node_lang);
+ }
+ /* Sort facility code definitions by there id ascending. */
+ i = 0;
+ while ((k = enum_facility (i)) != NULL)
+ ++i;
+ mc_facility_codes_count = i;
+ if (i != 0)
+ {
+ mc_facility_codes = xmalloc (sizeof (mc_keyword *) * i);
+ i = 0;
+ while ((k = enum_facility (i)) != NULL)
+ mc_facility_codes[i++] = (mc_keyword *) k;
+ qsort (mc_facility_codes, (size_t) mc_facility_codes_count, sizeof (mc_keyword *), sort_keyword_by_nval);
+ }
+
+ /* Sort severity code definitions by there id ascending. */
+ i = 0;
+ while ((k = enum_severity (i)) != NULL)
+ ++i;
+ mc_severity_codes_count = i;
+ if (i != 0)
+ {
+ mc_severity_codes = xmalloc (sizeof (mc_keyword *) * i);
+ i = 0;
+ while ((k = enum_severity (i)) != NULL)
+ mc_severity_codes[i++] = (mc_keyword *) k;
+ qsort (mc_severity_codes, (size_t) mc_severity_codes_count, sizeof (mc_keyword *), sort_keyword_by_nval);
+ }
+}
+
+static int
+mc_get_block_count (mc_node_lang **nl, int elems)
+{
+ rc_uint_type exid;
+ int i, ret;
+
+ if (! nl)
+ return 0;
+ i = 0;
+ ret = 0;
+ while (i < elems)
+ {
+ ret++;
+ exid = nl[i++]->vid;
+ while (i < elems && nl[i]->vid == exid + 1)
+ exid = nl[i++]->vid;
+ }
+ return ret;
+}
+
+static bfd *
+windmc_open_as_binary (const char *filename)
+{
+ bfd *abfd;
+
+ abfd = bfd_openw (filename, "binary");
+ if (! abfd)
+ fatal ("can't open `%s' for output", filename);
+
+ return abfd;
+}
+
+static void
+target_put_16 (void *p, rc_uint_type value)
+{
+ assert (!! p);
+
+ if (target_is_bigendian)
+ bfd_putb16 (value, p);
+ else
+ bfd_putl16 (value, p);
+}
+
+static void
+target_put_32 (void *p, rc_uint_type value)
+{
+ assert (!! p);
+
+ if (target_is_bigendian)
+ bfd_putb32 (value, p);
+ else
+ bfd_putl32 (value, p);
+}
+
+static struct bin_messagetable_item *
+mc_generate_bin_item (mc_node_lang *n, rc_uint_type *res_len)
+{
+ struct bin_messagetable_item *ret = NULL;
+ rc_uint_type len;
+
+ *res_len = 0;
+ if (mcset_bin_out_is_unicode == 1)
+ {
+ unichar *ht = n->message;
+ rc_uint_type txt_len;
+
+ txt_len = unichar_len (n->message);
+ if (mcset_automatic_null_termination && txt_len != 0)
+ {
+ while (txt_len > 0 && ht[txt_len - 1] > 0 && ht[txt_len - 1] < 0x20)
+ ht[--txt_len] = 0;
+ }
+ txt_len *= sizeof (unichar);
+ len = BIN_MESSAGETABLE_ITEM_SIZE + txt_len + sizeof (unichar);
+ ret = res_alloc ((len + 3) & ~3);
+ memset (ret, 0, (len + 3) & ~3);
+ target_put_16 (ret->length, (len + 3) & ~3);
+ target_put_16 (ret->flags, MESSAGE_RESOURCE_UNICODE);
+ txt_len = 0;
+ while (*ht != 0)
+ {
+ target_put_16 (ret->data + txt_len, *ht++);
+ txt_len += 2;
+ }
+ }
+ else
+ {
+ rc_uint_type txt_len, l;
+ char *cvt_txt;
+
+ codepage_from_unicode( &l, n->message, &cvt_txt, n->lang->lang_info.wincp);
+ if (! cvt_txt)
+ fatal ("Failed to convert message to language codepage.\n");
+ txt_len = strlen (cvt_txt);
+ if (mcset_automatic_null_termination && txt_len > 0)
+ {
+ while (txt_len > 0 && cvt_txt[txt_len - 1] > 0 && cvt_txt[txt_len - 1] < 0x20)
+ cvt_txt[--txt_len] = 0;
+ }
+ len = BIN_MESSAGETABLE_ITEM_SIZE + txt_len + 1;
+ ret = res_alloc ((len + 3) & ~3);
+ memset (ret, 0, (len + 3) & ~3);
+ target_put_16 (ret->length, (len + 3) & ~3);
+ target_put_16 (ret->flags, 0);
+ strcpy ((char *) ret->data, cvt_txt);
+ }
+ *res_len = (len + 3) & ~3;
+ return ret;
+}
+
+static void
+mc_write_blocks (struct bin_messagetable *mtbl, mc_node_lang **nl, mc_msg_item *ml, int elems)
+{
+ int i, idx = 0;
+ rc_uint_type exid;
+
+ if (! nl)
+ return;
+ i = 0;
+ while (i < elems)
+ {
+ target_put_32 (mtbl->items[idx].lowid, nl[i]->vid);
+ target_put_32 (mtbl->items[idx].highid, nl[i]->vid);
+ target_put_32 (mtbl->items[idx].offset, ml[i].res_off);
+ exid = nl[i++]->vid;
+ while (i < elems && nl[i]->vid == exid + 1)
+ {
+ target_put_32 (mtbl->items[idx].highid, nl[i]->vid);
+ exid = nl[i++]->vid;
+ }
+ ++idx;
+ }
+}
+
+static void
+set_windmc_bfd_content (const void *data, rc_uint_type off, rc_uint_type length)
+{
+ if (! bfd_set_section_contents (mc_bfd.abfd, mc_bfd.sec, data, off, length))
+ bfd_fatal ("bfd_set_section_contents");
+}
+
+static void
+windmc_write_bin (const char *filename, mc_node_lang **nl, int elems)
+{
+ unsigned long sec_length = 1;
+ int block_count, i;
+ mc_msg_item *mi;
+ struct bin_messagetable *mtbl;
+ rc_uint_type dta_off, dta_start;
+
+ if (elems <= 0)
+ return;
+ mc_bfd.abfd = windmc_open_as_binary (filename);
+ mc_bfd.sec = bfd_make_section (mc_bfd.abfd, ".data");
+ if (mc_bfd.sec == NULL)
+ bfd_fatal ("bfd_make_section");
+ if (! bfd_set_section_flags (mc_bfd.abfd, mc_bfd.sec,
+ (SEC_HAS_CONTENTS | SEC_ALLOC
+ | SEC_LOAD | SEC_DATA)))
+ bfd_fatal ("bfd_set_section_flags");
+ /* Requiring this is probably a bug in BFD. */
+ mc_bfd.sec->output_section = mc_bfd.sec;
+
+ block_count = mc_get_block_count (nl, elems);
+
+ dta_off = (rc_uint_type) ((BIN_MESSAGETABLE_BLOCK_SIZE * block_count) + BIN_MESSAGETABLE_SIZE - 4);
+ dta_start = dta_off = (dta_off + 3) & ~3;
+ mi = xmalloc (sizeof (mc_msg_item) * elems);
+ mtbl = xmalloc (dta_start);
+
+ /* Clear header region. */
+ memset (mtbl, 0, dta_start);
+ target_put_32 (mtbl->cblocks, block_count);
+ /* Prepare items section for output. */
+ for (i = 0; i < elems; i++)
+ {
+ mi[i].res_off = dta_off;
+ mi[i].res = mc_generate_bin_item (nl[i], &mi[i].res_len);
+ dta_off += mi[i].res_len;
+ }
+ sec_length = (dta_off + 3) & ~3;
+ if (! bfd_set_section_size (mc_bfd.abfd, mc_bfd.sec, sec_length))
+ bfd_fatal ("bfd_set_section_size");
+ /* Make sure we write the complete block. */
+ set_windmc_bfd_content ("\0", sec_length - 1, 1);
+
+ /* Write block information. */
+ mc_write_blocks (mtbl, nl, mi, elems);
+
+ set_windmc_bfd_content (mtbl, 0, dta_start);
+
+ /* Write items. */
+ for (i = 0; i < elems; i++)
+ set_windmc_bfd_content (mi[i].res, mi[i].res_off, mi[i].res_len);
+
+ free (mtbl);
+ free (mi);
+ bfd_close (mc_bfd.abfd);
+ mc_bfd.abfd = NULL;
+ mc_bfd.sec = NULL;
+}
+
+static void
+write_bin (void)
+{
+ mc_node_lang *n = NULL;
+ int i, c;
+
+ if (! mc_nodes_lang_count)
+ return;
+
+ i = 0;
+ while (i < mc_nodes_lang_count)
+ {
+ char *nd;
+ char *filename;
+
+ if (n && n->lang == mc_nodes_lang[i]->lang)
+ {
+ i++;
+ continue;
+ }
+ n = mc_nodes_lang[i];
+ c = i + 1;
+ while (c < mc_nodes_lang_count && n->lang == mc_nodes_lang[c]->lang)
+ c++;
+ nd = convert_unicode_to_ACP (n->lang->sval);
+
+ /* Prepare filename for binary output. */
+ filename = xmalloc (strlen (nd) + 4 + 1 + strlen (mcset_mc_basename) + 1 + strlen (mcset_rc_dir));
+ strcpy (filename, mcset_rc_dir);
+ if (mcset_prefix_bin)
+ sprintf (filename + strlen (filename), "%s_", mcset_mc_basename);
+ strcat (filename, nd);
+ strcat (filename, ".bin");
+
+ /* Write message file. */
+ windmc_write_bin (filename, &mc_nodes_lang[i], (c - i));
+
+ free (filename);
+ i = c;
+ }
+}
+
+static void
+write_rc (FILE *fp)
+{
+ mc_node_lang *n;
+ int i, l;
+
+ fprintf (fp,
+ "/* Do not edit this file manually.\n"
+ " This file is autogenerated by windmc. */\n\n");
+ if (! mc_nodes_lang_count)
+ return;
+ n = NULL;
+ i = 0;
+ for (l = 0; l < mc_nodes_lang_count; l++)
+ {
+ if (n && n->lang == mc_nodes_lang[l]->lang)
+ continue;
+ ++i;
+ n = mc_nodes_lang[l];
+ fprintf (fp, "\n// Country: %s\n// Language: %s\n#pragma code_page(%u)\n",
+ n->lang->lang_info.country, n->lang->lang_info.name,
+ (unsigned) n->lang->lang_info.wincp);
+ fprintf (fp, "LANGUAGE 0x%lx, 0x%lx\n", (long) (n->lang->nval & 0x3ff),
+ (long) ((n->lang->nval & 0xffff) >> 10));
+ fprintf (fp, "1 MESSAGETABLE \"");
+ if (mcset_prefix_bin)
+ fprintf (fp, "%s_", mcset_mc_basename);
+ unicode_print (fp, n->lang->sval, unichar_len (n->lang->sval));
+ fprintf (fp, ".bin\"\n");
+ }
+}
+
+static void
+write_dbg (FILE *fp)
+{
+ mc_node *h;
+
+ fprintf (fp,
+ "/* Do not edit this file manually.\n"
+ " This file is autogenerated by windmc.\n\n"
+ " This file maps each message ID value in to a text string that contains\n"
+ " the symbolic name used for it. */\n\n");
+
+ fprintf (fp,
+ "struct %sSymbolicName\n"
+ "{\n ", mcset_mc_basename);
+ if (mcset_msg_id_typedef)
+ unicode_print (fp, mcset_msg_id_typedef, unichar_len (mcset_msg_id_typedef));
+ else
+ fprintf (fp, "DWORD");
+ fprintf (fp,
+ " MessageId;\n"
+ " char *SymbolicName;\n"
+ "} %sSymbolicNames[] =\n"
+ "{\n", mcset_mc_basename);
+ h = mc_nodes;
+ while (h != NULL)
+ {
+ if (h->symbol)
+ write_dbg_define (fp, h->symbol, mcset_msg_id_typedef);
+ h = h->next;
+ }
+ fprintf (fp, " { (");
+ if (mcset_msg_id_typedef)
+ unicode_print (fp, mcset_msg_id_typedef, unichar_len (mcset_msg_id_typedef));
+ else
+ fprintf (fp, "DWORD");
+ fprintf (fp,
+ ") 0xffffffff, NULL }\n"
+ "};\n");
+}
+
+static void
+write_header (FILE *fp)
+{
+ char *s;
+ int i;
+ const mc_keyword *key;
+ mc_node *h;
+
+ fprintf (fp,
+ "/* Do not edit this file manually.\n"
+ " This file is autogenerated by windmc. */\n\n"
+ "//\n// The values are 32 bit layed out as follows:\n//\n"
+ "// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1\n"
+ "// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0\n"
+ "// +---+-+-+-----------------------+-------------------------------+\n"
+ "// |Sev|C|R| Facility | Code |\n"
+ "// +---+-+-+-----------------------+-------------------------------+\n//\n"
+ "// where\n//\n"
+ "// C - is the Customer code flag\n//\n"
+ "// R - is a reserved bit\n//\n"
+ "// Code - is the facility's status code\n//\n");
+
+ h = mc_nodes;
+
+ fprintf (fp, "// Sev - is the severity code\n//\n");
+ if (mc_severity_codes_count != 0)
+ {
+ for (i = 0; i < mc_severity_codes_count; i++)
+ {
+ key = mc_severity_codes[i];
+ fprintf (fp, "// %s - %02lx\n", convert_unicode_to_ACP (key->usz),
+ (unsigned long) key->nval);
+ if (key->sval && key->sval[0] != 0)
+ {
+ if (! mcset_out_values_are_decimal)
+ fprintf (fp, "#define %s 0x%lx\n", convert_unicode_to_ACP (key->sval),
+ (unsigned long) key->nval);
+ else
+ fprintf (fp, "#define %s 0x%lu\n", convert_unicode_to_ACP (key->sval),
+ (unsigned long) key->nval);
+ }
+ }
+ fprintf (fp, "//\n");
+ }
+ fprintf (fp, "// Facility - is the facility code\n//\n");
+ if (mc_facility_codes_count != 0)
+ {
+ for (i = 0; i < mc_facility_codes_count; i++)
+ {
+ key = mc_facility_codes[i];
+ fprintf (fp, "// %s - %04lx\n", convert_unicode_to_ACP (key->usz),
+ (unsigned long) key->nval);
+ if (key->sval && key->sval[0] != 0)
+ {
+ if (! mcset_out_values_are_decimal)
+ fprintf (fp, "#define %s 0x%lx\n", convert_unicode_to_ACP (key->sval),
+ (unsigned long) key->nval);
+ else
+ fprintf (fp, "#define %s 0x%lu\n", convert_unicode_to_ACP (key->sval),
+ (unsigned long) key->nval);
+ }
+ }
+ fprintf (fp, "//\n");
+ }
+ fprintf (fp, "\n");
+ while (h != NULL)
+ {
+ if (h->user_text)
+ {
+ s = convert_unicode_to_ACP (h->user_text);
+ if (s)
+ fprintf (fp, "%s", s);
+ }
+ if (h->symbol)
+ write_header_define (fp, h->symbol, h->vid, mcset_msg_id_typedef, h->sub);
+ h = h->next;
+ }
+}
+
+static const char *
+mc_unify_path (const char *path)
+{
+ char *end;
+ char *hsz;
+
+ if (! path || *path == 0)
+ return "./";
+ hsz = xmalloc (strlen (path) + 2);
+ strcpy (hsz, path);
+ end = hsz + strlen (hsz);
+ if (hsz[-1] != '/' && hsz[-1] != '\\')
+ strcpy (end, "/");
+ while ((end = strchr (hsz, '\\')) != NULL)
+ *end = '/';
+ return hsz;
+}
+
+int main (int, char **);
+
+int
+main (int argc, char **argv)
+{
+ FILE *h_fp;
+ int c;
+ char *target, *input_filename;
+ int verbose;
+
+#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 = argv[0];
+ xmalloc_set_program_name (program_name);
+
+ expandargv (&argc, &argv);
+
+ bfd_init ();
+ set_default_bfd_target ();
+
+ target = NULL;
+ verbose = 0;
+ input_filename = NULL;
+
+ res_init ();
+
+ while ((c = getopt_long (argc, argv, "C:F:O:h:e:m:r:x:aAbcdHunoUvV", long_options,
+ (int *) 0)) != EOF)
+ {
+ switch (c)
+ {
+ case 'b':
+ mcset_prefix_bin = 1;
+ break;
+ case 'e':
+ {
+ mcset_header_ext = optarg;
+ if (mcset_header_ext[0] != '.' && mcset_header_ext[0] != 0)
+ {
+ char *hsz = xmalloc (strlen (mcset_header_ext) + 2);
+
+ sprintf (hsz, ".%s", mcset_header_ext);
+ mcset_header_ext = hsz;
+ }
+ }
+ break;
+ case 'h':
+ mcset_header_dir = mc_unify_path (optarg);
+ break;
+ case 'r':
+ mcset_rc_dir = mc_unify_path (optarg);
+ break;
+ case 'a':
+ mcset_text_in_is_unicode = 0;
+ break;
+ case 'x':
+ if (*optarg != 0)
+ mcset_dbg_dir = mc_unify_path (optarg);
+ break;
+ case 'A':
+ mcset_bin_out_is_unicode = 0;
+ break;
+ case 'd':
+ mcset_out_values_are_decimal = 1;
+ break;
+ case 'u':
+ mcset_text_in_is_unicode = 1;
+ break;
+ case 'U':
+ mcset_bin_out_is_unicode = 1;
+ break;
+ case 'c':
+ mcset_custom_bit = 1;
+ break;
+ case 'n':
+ mcset_automatic_null_termination = 1;
+ break;
+ case 'o':
+ mcset_use_hresult = 1;
+ fatal ("option -o is not implemented until yet.\n");
+ break;
+ case 'F':
+ target = optarg;
+ break;
+ case 'v':
+ verbose ++;
+ break;
+ case 'm':
+ mcset_max_message_length = strtol (optarg, (char **) NULL, 10);
+ break;
+ case 'C':
+ mcset_codepage_in = strtol (optarg, (char **) NULL, 10);
+ break;
+ case 'O':
+ mcset_codepage_out = strtol (optarg, (char **) NULL, 10);
+ break;
+ case '?':
+ case 'H':
+ usage (stdout, 0);
+ break;
+ case 'V':
+ print_version ("windmc");
+ break;
+
+ default:
+ usage (stderr, 1);
+ break;
+ }
+ }
+ if (input_filename == NULL && optind < argc)
+ {
+ input_filename = argv[optind];
+ ++optind;
+ }
+
+ set_endianess (NULL, target);
+
+ if (input_filename == NULL)
+ {
+ fprintf (stderr, "Error: No input file was specified.\n");
+ usage (stderr, 1);
+ }
+ mc_set_inputfile (input_filename);
+
+ if (!probe_codepage (&mcset_codepage_in, &mcset_text_in_is_unicode, "codepage_in", 0))
+ usage (stderr, 1);
+ if (mcset_codepage_out == 0)
+ mcset_codepage_out = 1252;
+ if (! unicode_is_valid_codepage (mcset_codepage_out))
+ fatal ("Code page 0x%x is unknown.", (unsigned int) mcset_codepage_out);
+ if (mcset_codepage_out == CP_UTF16)
+ fatal ("UTF16 is no valid text output code page.");
+ if (verbose)
+ {
+ fprintf (stderr, "// Default target is %s and it is %s endian.\n",
+ def_target_arch, (target_is_bigendian ? "big" : "little"));
+ fprintf (stderr, "// Input codepage: 0x%x\n", (unsigned int) mcset_codepage_in);
+ fprintf (stderr, "// Output codepage: 0x%x\n", (unsigned int) mcset_codepage_out);
+ }
+
+ if (argc != optind)
+ usage (stderr, 1);
+
+ /* Initialize mcset_mc_basename. */
+ {
+ const char *bn, *bn2;
+ char *hsz;
+
+ bn = strrchr (input_filename, '/');
+ bn2 = strrchr (input_filename, '\\');
+ if (! bn)
+ bn = bn2;
+ if (bn && bn2 && bn < bn2)
+ bn = bn2;
+ if (! bn)
+ bn = input_filename;
+ else
+ bn++;
+ mcset_mc_basename = hsz = xstrdup (bn);
+
+ /* Cut of right-hand extension. */
+ if ((hsz = strrchr (hsz, '.')) != NULL)
+ *hsz = 0;
+ }
+
+ /* Load the input file and do code page transformations to UTF16. */
+ {
+ unichar *u;
+ rc_uint_type ul;
+ char *buff;
+ long flen;
+ FILE *fp = fopen (input_filename, "rb");
+
+ if (!fp)
+ fatal (_("unable to open file ,%s' for input.\n"), input_filename);
+
+ fseek (fp, 0, SEEK_END);
+ flen = ftell (fp);
+ fseek (fp, 0, SEEK_SET);
+ buff = malloc (flen + 3);
+ memset (buff, 0, flen + 3);
+ fread (buff, 1, flen, fp);
+ fclose (fp);
+ if (mcset_text_in_is_unicode != 1)
+ {
+ unicode_from_codepage (&ul, &u, buff, mcset_codepage_in);
+ if (! u)
+ fatal ("Failed to convert input to UFT16\n");
+ mc_set_content (u);
+ }
+ else
+ {
+ if ((flen & 1) != 0)
+ fatal (_("input file does not seems to be UFT16.\n"));
+ mc_set_content ((unichar *) buff);
+ }
+ free (buff);
+ }
+
+ while (yyparse ())
+ ;
+
+ do_sorts ();
+
+ h_fp = mc_create_path_text_file (mcset_header_dir, mcset_header_ext);
+ write_header (h_fp);
+ fclose (h_fp);
+
+ h_fp = mc_create_path_text_file (mcset_rc_dir, ".rc");
+ write_rc (h_fp);
+ fclose (h_fp);
+
+ if (mcset_dbg_dir != NULL)
+ {
+ h_fp = mc_create_path_text_file (mcset_dbg_dir, ".dbg");
+ write_dbg (h_fp);
+ fclose (h_fp);
+ }
+ write_bin ();
+
+ if (mc_nodes_lang)
+ free (mc_nodes_lang);
+ if (mc_severity_codes)
+ free (mc_severity_codes);
+ if (mc_facility_codes)
+ free (mc_facility_codes);
+
+ xexit (0);
+ return 0;
+}
diff --git a/contrib/binutils/binutils/windmc.h b/contrib/binutils/binutils/windmc.h
new file mode 100644
index 0000000..08a7706
--- /dev/null
+++ b/contrib/binutils/binutils/windmc.h
@@ -0,0 +1,99 @@
+/* windmc.h -- header file for windmc program.
+ Copyright 2007
+ Free Software Foundation, Inc.
+ Written by Kai Tietz, Onevision.
+
+ This file is part of GNU Binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include "ansidecl.h"
+
+/* This is the header file for the windmc program. It defines
+ structures and declares functions used within the program. */
+
+#include "winduni.h"
+
+#ifndef WINDMC_HXX
+#define WINDMC_HXX
+
+/* Global flag variables (set by windmc.c file. */
+extern int mcset_custom_bit;
+extern int mcset_out_values_are_decimal;
+extern rc_uint_type mcset_max_message_length;
+extern unichar *mcset_msg_id_typedef;
+
+/* Lexer keyword definition and internal memory structures. */
+
+typedef struct mc_keyword
+{
+ struct mc_keyword *next;
+ const char *group_name;
+ size_t len;
+ unichar *usz;
+ int rid;
+ rc_uint_type nval;
+ unichar *sval;
+ wind_language_t lang_info;
+} mc_keyword;
+
+typedef struct mc_node_lang
+{
+ struct mc_node_lang *next;
+ rc_uint_type vid;
+ const mc_keyword *lang;
+ unichar *message;
+} mc_node_lang;
+
+typedef struct mc_node
+{
+ struct mc_node *next;
+ unichar *user_text;
+ const mc_keyword *facility;
+ const mc_keyword *severity;
+ unichar *symbol;
+ rc_uint_type id;
+ rc_uint_type vid;
+ mc_node_lang *sub;
+} mc_node;
+
+extern mc_node *mc_nodes;
+
+void mc_add_keyword (unichar *, int, const char *, rc_uint_type, unichar *);
+const mc_keyword *enum_facility (int);
+const mc_keyword *enum_severity (int);
+
+mc_node_lang *mc_add_node_lang (mc_node *, const mc_keyword *, rc_uint_type);
+mc_node *mc_add_node (void);
+
+/* Standard yacc/flex stuff. */
+int yyerror (const char *, ...);
+int yylex (void);
+int yyparse (void);
+
+/* mclex.c */
+void mc_set_inputfile (const char *);
+void mc_set_content (const unichar *);
+
+/* Lexer control variables. Used by mcparser.y file. */
+extern bfd_boolean mclex_want_nl;
+extern bfd_boolean mclex_want_line;
+extern bfd_boolean mclex_want_filename;
+
+void mc_fatal (const char *, ...);
+void mc_warn (const char *, ...);
+
+#endif
diff --git a/contrib/binutils/binutils/wrstabs.c b/contrib/binutils/binutils/wrstabs.c
index 13f01da..325047e 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, 1999, 2000, 2001, 2002, 2003, 2006
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
@@ -23,13 +23,12 @@
/* This file contains code which writes out stabs debugging
information. */
-#include <stdio.h>
+#include "sysdep.h"
#include <assert.h>
-
#include "bfd.h"
-#include "bucomm.h"
#include "libiberty.h"
#include "safe-ctype.h"
+#include "bucomm.h"
#include "debug.h"
#include "budbg.h"
#include "aout/aout64.h"
diff --git a/contrib/binutils/config-ml.in b/contrib/binutils/config-ml.in
index 9372731..cc9cf66 100644
--- a/contrib/binutils/config-ml.in
+++ b/contrib/binutils/config-ml.in
@@ -108,6 +108,11 @@ ml_realsrcdir=${srcdir}
ml_verbose=--verbose
for option in ${ac_configure_args}
do
+ # strip single quotes surrounding individual options
+ case $option in
+ \'*\') eval option=$option ;;
+ esac
+
case $option in
--*) ;;
-*) option=-$option ;;
@@ -546,6 +551,7 @@ multi-do:
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(CFLAGS) $${flags}" \
+ CCASFLAGS="$(CCASFLAGS) $${flags}" \
FCFLAGS="$(FCFLAGS) $${flags}" \
FFLAGS="$(FFLAGS) $${flags}" \
ADAFLAGS="$(ADAFLAGS) $${flags}" \
@@ -889,7 +895,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \
--with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \
- ${ac_configure_args} ${ml_srcdiroption} ; then
+ ${ac_configure_args} ${ml_config_env} ${ml_srcdiroption} ; then
true
else
exit 1
diff --git a/contrib/binutils/config.guess b/contrib/binutils/config.guess
index 17690ae..951383e 100755
--- a/contrib/binutils/config.guess
+++ b/contrib/binutils/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2006-01-02'
+timestamp='2007-05-17'
# 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
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -210,7 +212,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -328,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
- i86pc:SunOS:5.*:*)
+ i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
@@ -770,6 +772,8 @@ EOF
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
@@ -777,7 +781,7 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
- i*:MINGW*:*)
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -787,9 +791,15 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- x86:Interix*:[345]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@@ -825,6 +835,9 @@ EOF
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
exit ;;
@@ -859,7 +872,11 @@ EOF
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
@@ -878,7 +895,11 @@ EOF
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
@@ -933,6 +954,9 @@ EOF
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
+ xtensa:Linux:*:*)
+ echo xtensa-unknown-linux-gnu
+ exit ;;
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
@@ -975,7 +999,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #if defined(__INTEL_COMPILER) || defined(__PGI)
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -985,7 +1009,11 @@ EOF
LIBC=dietlibc
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1187,6 +1215,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
diff --git a/contrib/binutils/config.rpath b/contrib/binutils/config.rpath
new file mode 100755
index 0000000..937edf5
--- /dev/null
+++ b/contrib/binutils/config.rpath
@@ -0,0 +1,548 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2003 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ mingw* | pw32* | os2*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux*)
+ case $CC in
+ icc|ecc)
+ wl='-Wl,'
+ ;;
+ ccc)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ 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
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = yes; then
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix4* | aix5*)
+ 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
+ else
+ aix_use_runtimelinking=no
+ # 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 runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ 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
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi4*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
+ hardcode_direct=no
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10* | hpux11*)
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4.2uw2*)
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ ;;
+ sysv5*)
+ hardcode_libdir_flag_spec=
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ ;;
+ aix4* | aix5*)
+ ;;
+ amigaos*)
+ ;;
+ beos*)
+ ;;
+ bsdi4*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ shrext=.dll
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ ;;
+ dgux*)
+ ;;
+ freebsd1*)
+ ;;
+ freebsd*)
+ ;;
+ gnu*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case "$host_cpu" in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux*)
+ ;;
+ netbsd*)
+ ;;
+ newsos6)
+ ;;
+ nto-qnx)
+ ;;
+ openbsd*)
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ ;;
+ osf3* | osf4* | osf5*)
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ ;;
+ sunos4*)
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ ;;
+ sysv4*MP*)
+ ;;
+ uts4*)
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/contrib/binutils/config.sub b/contrib/binutils/config.sub
index a4e8a94..c060f44 100755
--- a/contrib/binutils/config.sub
+++ b/contrib/binutils/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
-timestamp='2006-01-02'
+timestamp='2007-04-29'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -240,15 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | maxq | mb | microblaze | mcore \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -268,26 +270,25 @@ case $basic_machine in
| mn10200 | mn10300 \
| mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
- m32c)
- basic_machine=$basic_machine-unknown
- ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -317,18 +318,18 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
+ | avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -350,29 +351,28 @@ case $basic_machine in
| mmix-* \
| mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
- m32c-*)
- ;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
@@ -683,6 +683,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -910,6 +914,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -921,6 +929,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
sh64)
basic_machine=sh64-unknown
;;
@@ -1126,7 +1137,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1215,7 +1226,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1367,6 +1378,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1376,9 +1393,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1404,6 +1421,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
diff --git a/contrib/binutils/config/ChangeLog b/contrib/binutils/config/ChangeLog
index 1ddcfd4..3c43dcd 100644
--- a/contrib/binutils/config/ChangeLog
+++ b/contrib/binutils/config/ChangeLog
@@ -1,7 +1,169 @@
+2007-06-27 Mike Stump <mrs@apple.com>
+
+ * acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Fixup logic for cross
+ builds.
+
+2007-06-20 Mike Stump <mrs@apple.com>
+
+ * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Fix incremental builds.
+ (ACX_HAVE_GCC_FOR_TARGET): Likewise.
+
+2007-06-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4 (ACX_CHECK_PROG_VER): Remove duplicate lines.
+
+2007-06-04 Olivier Hainque <hainque@adacore.com>
+
+ * mh-ppc-aix: Add default ADAFLAGS to BOOT_ADAFLAGS.
+
+2007-05-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * confsubdir.m4: Move here from newlib.
+
+2007-05-23 Paolo Bonzini <bonzini@gnu.org>
+
+ PR bootstrap/32009
+ * mh-ppc-darwin: Temporarily disable.
+
+2007-04-11 Kai Tietz <kai.tietz@onevision.com>
+
+ * stdint.m4: Make template compatible with older cygwin
+ types.h, wrapping each type in a __XXX_t_defined #ifdef.
+
+2007-03-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * acx.m4 (ACX_BUGURL): Set BUGURL first. Quote $BUGURL first
+ when setting REPORT_BUGS_TEXI.
+
+2007-03-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * acx.m4 (ACX_BUGURL): Replace "@" with "@@" for
+ REPORT_BUGS_TEXI.
+
+2007-03-23 Joseph Myers <joseph@codesourcery.com>
+
+ * acx.m4 (ACX_PKGVERSION, ACX_BUGURL): Define.
+
+2007-03-07 Andreas Schwab <schwab@suse.de>
+
+ * acx.m4 (GCC_TARGET_TOOL): Expand backquotes outside
+ AC_MSG_RESULT.
+
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
+
+ * mt-spu (all-ld): Depend on all-binutils.
+
+2007-02-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * acx.m4 (NCN_STRICT_CHECK_TOOLS): Mark environment variable as
+ precious. Prefer it over a cached value. Use cached value
+ verbosely.
+ (NCN_STRICT_CHECK_TARGET_TOOLS): Likewise. Don't override
+ environment variable with build-time tools.
+
+2006-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ * mt-spu: New file.
+
+2007-02-09 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * acx.m4 (ACX_CHECK_INSTALLED_TARGET_TOOL): Avoid AC_PATH_PROG
+ with an empty path.
+
+2007-02-07 Bruno Haible <bruno@clisp.org>
+
+ PR libgomp/28468
+ * config/tls.m4 (GCC_CHECK_TLS): Also check whether the libc supports
+ TLS via __thread.
+
+2007-01-31 Daniel Franke <franke.daniel@gmail.com>
+
+ PR libgomp/30546
+ * acx.m4 (ACX_PROG_CHECK_VER): Locate a program and check that its
+ version is acceptable.
+
+2007-01-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make
+ directory.
+
+2007-01-23 Richard Guenther <rguenther@suse.de>
+
+ PR bootstrap/30541
+ * config/acx.m4 (ACX_PROG_GNAT): Check for gnatmake.
+
+2007-01-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-symbolic.m4: New.
+
+2007-01-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * warnings.m4: Use m4_expand_once to clear the AC_SUBST'ed variable.
+ (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Fix typo. Add optional 2nd argument.
+
+2007-01-11 Paolo Bonzini <bonzini@gnu.org>
+
+ * warnings.m4: Add second parameter with name of variable.
+ Always append to the variable if it exists.
+
+2007-01-01 Mike Stump <mrs@apple.com>
+
+ * mh-ppc-darwin: Remove support for building with Apple's gcc-3.1.
+
+2006-12-04 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * tls.m4 (GCC_CHECK_TLS): Do not test TLS with static linking
+ if static linking doesn't even work.
+
+2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * tls.m4 (GCC_CHECK_TLS): Fall back to a link test.
+
+2006-10-14 Geoffrey Keating <geoffk@apple.com>
+
+ * multi.m4: New file, from automake version 2 branch.
+
+2006-09-18 Tom Tromey <tromey@redhat.com>
+
+ * tls.m4 (GCC_CHECK_TLS): Pass empty argument as "help arg" to
+ GCC_ENABLE.
+
+2006-07-25 Paolo Bonzini <bonzini@gnu.org>
+
+ PR build/26188
+ * stdint.m4: Test for uintptr_t even on systems with uint64_t or uint32_t.
+
+2006-07-21 Steve Ellcey <sje@cup.hp.com>
+
+ PR target/26792
+ * unwind_ipinfo.m4: New.
+
+2006-07-21 David Daney <ddaney@avtrex.com>
+
+ PR libgcj/28426
+ * gxx-include-dir.m4: Use target_alias in path for cross build.
+
+2006-07-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * acx.m4: Support --with-build-libsubdir and AC_SUBST
+ build_libsubdir.
+
+2006-06-13 Richard Earnshaw <rearnsha@arm.com>
+ Alexandre Oliva <aoliva@redhat.com>
+
+ * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Add optional
+ argument for where to search for NLS config file.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Provide some
+ defines otherwise gotten from AM_GNU_GETTEXT. Remove the
+ po/ prefix from CATALOGS.
+
2006-02-14 Paolo Bonzini <bonzini@gnu.org>
- Andreas Schwab <schwab@suse.de>
+ Andreas Schwab <schwab@suse.de>
- * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Use correct program name.
+ * acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Use correct program name.
(ACX_CHECK_INSTALLED_TARGET_TOOL): Likewise, and always set $1.
2006-01-26 Paolo Bonzini <bonzini@gnu.org>
@@ -15,19 +177,19 @@
2006-01-02 Paolo Bonzini <bonzini@gnu.org>
- PR target/25259
- * stdint.m4: New.
+ PR target/25259
+ * stdint.m4: New.
2005-12-20 Paolo Bonzini <bonzini@gnu.org>
- Revert Ada-related part of the previous change.
+ Revert Ada-related part of the previous change.
- * mt-ppc-aix: Delete.
+ * mt-ppc-aix: Delete.
2005-12-19 Paolo Bonzini <bonzini@gnu.org>
-
- * mt-ppc-aix, mh-ppc-aix: New.
-
+
+ * mt-ppc-aix, mh-ppc-aix: New.
+
2005-12-05 Paolo Bonzini <bonzini@gnu.org>
* acx.m4 (GCC_TARGET_TOOL): New.
diff --git a/contrib/binutils/config/confsubdir.m4 b/contrib/binutils/config/confsubdir.m4
new file mode 100644
index 0000000..4e1e8c4
--- /dev/null
+++ b/contrib/binutils/config/confsubdir.m4
@@ -0,0 +1,127 @@
+dnl Fix Autoconf-2.59 AC_CONFIG_SUBDIRS whitespace mangling,
+dnl by overriding the broken internal Autoconf macro with a
+dnl backport of the 2.60 fix.
+dnl
+dnl This file should be a no-op for Autoconf versions != 2.59.
+dnl It can be removed once the complete tree has moved to a
+dnl newer Autoconf version.
+
+dnl m4_PACKAGE_VERSION is an undocumented Autoconf macro.
+dnl We use it because this fix is intended for 2.59 only.
+dnl A feature test for the broken AC_CONFIG_SUBDIRS instead
+dnl would be better but is tricky.
+dnl
+dnl Use ifdef/ifelse over m4_ifdef/m4_ifelse to be clean for 2.13.
+dnl Redefine AC_CONFIG_SUBDIRS so aclocal pulls in this file
+dnl when needed.
+
+ifdef([m4_PACKAGE_VERSION],
+[ifelse(m4_PACKAGE_VERSION, [2.59], [
+
+dnl Redefine AC_CONFIG_SUBDIRS so this file is picked up if needed.
+AC_DEFUN([AC_CONFIG_SUBDIRS], defn([AC_CONFIG_SUBDIRS]))
+
+dnl Override the broken macro.
+# _AC_OUTPUT_SUBDIRS
+# ------------------
+# This is a subroutine of AC_OUTPUT, but it does not go into
+# config.status, rather, it is called after running config.status.
+m4_define([_AC_OUTPUT_SUBDIRS],
+[
+#
+# CONFIG_SUBDIRS section, as fixed in confsubdir.m4.
+#
+if test "$no_recursion" != yes; then
+
+ # Remove --cache-file and --srcdir arguments so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ eval "set x $ac_configure_args"
+ shift
+ for ac_arg
+ do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case $ac_arg in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+ | --c=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ *)
+ case $ac_arg in
+ *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_arg="--prefix=$prefix"
+ case $ac_arg in
+ *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="$ac_arg $ac_sub_configure_args"
+
+ ac_popdir=`pwd`
+ for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
+
+ # Do not complain, so a configure script can configure whichever
+ # parts of a large source tree are present.
+ test -d "$srcdir/$ac_dir" || continue
+
+ AC_MSG_NOTICE([configuring in $ac_dir])
+ AS_MKDIR_P(["$ac_dir"])
+ _AC_SRCPATHS(["$ac_dir"])
+
+ cd "$ac_dir"
+
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ ac_sub_configure=$ac_srcdir/configure.gnu
+ elif test -f "$ac_srcdir/configure"; then
+ ac_sub_configure=$ac_srcdir/configure
+ elif test -f "$ac_srcdir/configure.in"; then
+ # This should be Cygnus configure.
+ ac_sub_configure=$ac_aux_dir/configure
+ else
+ AC_MSG_WARN([no configuration information is in $ac_dir])
+ ac_sub_configure=
+ fi
+
+ # The recursion is here.
+ if test -n "$ac_sub_configure"; then
+ # Make the cache file name correct relative to the subdirectory.
+ case $cache_file in
+ [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
+ *) # Relative path.
+ ac_sub_cache_file=$ac_top_builddir$cache_file ;;
+ esac
+
+ AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir])
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir])
+ fi
+
+ cd "$ac_popdir"
+ done
+fi
+])# _AC_OUTPUT_SUBDIRS
+])])
diff --git a/contrib/binutils/config/ld-symbolic.m4 b/contrib/binutils/config/ld-symbolic.m4
new file mode 100644
index 0000000..16d64f9
--- /dev/null
+++ b/contrib/binutils/config/ld-symbolic.m4
@@ -0,0 +1,45 @@
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Set SYMBOLIC_LDFLAGS to -Bsymbolic-functions for GNU linker if it
+dnl is supported.
+AC_DEFUN([ACX_PROG_LD_GNU_SYMBOLIC],
+[AC_CACHE_CHECK([if the GNU linker ($LD) supports -Bsymbolic-functions],
+acl_cv_prog_gnu_ld_symbolic, [
+acl_cv_prog_gnu_ld_symbolic=no
+AC_REQUIRE([AC_LIB_PROG_LD_GNU])
+if test x"$with_gnu_ld" = x"yes"; then
+ if $LD --help 2>&1 </dev/null | grep Bsymbolic-functions 1>&5; then
+ acl_cv_prog_gnu_ld_symbolic=yes
+ fi
+fi])
+if test x"$acl_cv_prog_gnu_ld_symbolic" = x"yes"; then
+ SYMBOLIC_LDFLAGS="-Wl,-Bsymbolic-functions"
+else
+ SYMBOLIC_LDFLAGS=''
+fi
+])
+
+dnl Set DYNAMIC_LIST_CPP_NEW_LDFLAGS to --dynamic-list-cpp-new for GNU
+dnl linker if it is supported.
+AC_DEFUN([ACX_PROG_LD_GNU_DYNAMIC_LIST_CPP_NEW],
+[AC_CACHE_CHECK([if the GNU linker ($LD) supports --dynamic-list-cpp-new],
+acl_cv_prog_gnu_ld_dynamic_list_cpp_new, [
+acl_cv_prog_gnu_ld_dynamic_list_cpp_new=no
+AC_REQUIRE([ACX_PROG_LD_GNU_SYMBOLIC])
+if test x"$with_gnu_ld" = x"yes" -a \
+ x"$acl_cv_prog_gnu_ld_symbolic" = x"yes"; then
+ if $LD --help 2>&1 </dev/null | grep dynamic-list-cpp-new 1>&5; then
+ acl_cv_prog_gnu_ld_dynamic_list_cpp_new=yes
+ fi
+fi])
+if test x"$acl_cv_prog_gnu_ld_dynamic_list_cpp_new" = x"yes"; then
+ DYNAMIC_LIST_CPP_NEW_LDFLAGS="$SYMBOLIC_LDFLAGS -Wl,--dynamic-list-cpp-new"
+else
+ DYNAMIC_LIST_CPP_NEW_LDFLAGS=''
+fi
+])
diff --git a/contrib/binutils/config/mt-mep b/contrib/binutils/config/mt-mep
new file mode 100644
index 0000000..849d128
--- /dev/null
+++ b/contrib/binutils/config/mt-mep
@@ -0,0 +1,8 @@
+
+EXTRA_TARGET_HOST_ALL_MODULES:=$(EXTRA_TARGET_HOST_ALL_MODULES) all-utils
+EXTRA_TARGET_HOST_INSTALL_MODULES:=$(EXTRA_TARGET_HOST_INSTALL_MODULES) install-utils
+
+all-utils : all-libiberty
+
+install-utils : all-libiberty
+
diff --git a/contrib/binutils/config/mt-spu b/contrib/binutils/config/mt-spu
new file mode 100644
index 0000000..c2dbc66
--- /dev/null
+++ b/contrib/binutils/config/mt-spu
@@ -0,0 +1,4 @@
+# spu ld makefile invokes as-new in maintainer mode.
+all-ld: $(MAINT) all-gas
+# spu ld makefile invokes bin2c
+all-ld: all-binutils
diff --git a/contrib/binutils/config/multi.m4 b/contrib/binutils/config/multi.m4
new file mode 100644
index 0000000..9841767
--- /dev/null
+++ b/contrib/binutils/config/multi.m4
@@ -0,0 +1,65 @@
+## -*- Autoconf -*-
+# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
+# ---------------------------------------------------
+# Add --enable-multilib to configure.
+AC_DEFUN([AM_ENABLE_MULTILIB],
+[# Default to --enable-multilib
+AC_ARG_ENABLE(multilib,
+[ --enable-multilib build many library versions (default)],
+[case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) AC_MSG_ERROR([bad value $enableval for multilib option]) ;;
+ esac],
+ [multilib=yes])
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+ if test "$with_target_subdir" != "."; then
+ multi_basedir="$srcdir/$with_multisrctop../$2"
+ else
+ multi_basedir="$srcdir/$with_multisrctop$2"
+ fi
+else
+ multi_basedir="$srcdir/$2"
+fi
+AC_SUBST(multi_basedir)
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
+AC_OUTPUT_COMMANDS([
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" ]m4_default([$1],Makefile)[ "*)
+ ac_file=]m4_default([$1],Makefile)[ . ${multi_basedir}/config-ml.in
+ ;;
+esac],
+ [
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"])])dnl
diff --git a/contrib/binutils/config/unwind_ipinfo.m4 b/contrib/binutils/config/unwind_ipinfo.m4
new file mode 100644
index 0000000..5587d9c
--- /dev/null
+++ b/contrib/binutils/config/unwind_ipinfo.m4
@@ -0,0 +1,22 @@
+dnl
+dnl Check whether _Unwind_GetIPInfo is available.
+dnl
+AC_DEFUN([GCC_CHECK_UNWIND_GETIPINFO], [
+ AC_LANG_SAVE
+ AC_LANG_CPLUSPLUS
+ ac_save_CXXFLAGS="$CXXFLAGS"
+ CXXFLAGS="$CXXFLAGS -fno-exceptions"
+ AC_MSG_CHECKING([for _Unwind_GetIPInfo])
+ AC_CACHE_VAL(gcc_cv_getipinfo, [
+ AC_TRY_LINK([extern "C" { extern void _Unwind_GetIPInfo(); }],
+ [_Unwind_GetIPInfo();],
+ [gcc_cv_getipinfo=yes],
+ [gcc_cv_getipinfo=no])
+ ])
+ if test $gcc_cv_getipinfo = yes; then
+ AC_DEFINE(HAVE_GETIPINFO, 1, [Define if _Unwind_GetIPInfo is available.])
+ fi
+ AC_MSG_RESULT($gcc_cv_getipinfo)
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ AC_LANG_RESTORE
+])
diff --git a/contrib/binutils/configure b/contrib/binutils/configure
index dbcbdfe..13f1960 100755
--- a/contrib/binutils/configure
+++ b/contrib/binutils/configure
@@ -1,64 +1,288 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.59.
#
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
-# Defaults:
-ac_help=
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
- --enable-libada Builds libada directory"
-ac_help="$ac_help
- --enable-libssp Builds libssp directory"
-ac_help="$ac_help
- --enable-libgcc-math Builds libgcc-math directory"
-ac_help="$ac_help
- --with-mpfr-dir=PATH Specify source directory for MPFR library"
-ac_help="$ac_help
- --with-mpfr=PATH Specify directory for installed MPFR library"
-ac_help="$ac_help
- --with-gmp-dir=PATH Specify source directory for GMP library"
-ac_help="$ac_help
- --with-gmp=PATH Specify directory for installed GMP library"
-ac_help="$ac_help
- --with-build-sysroot=sysroot
- use sysroot as the system root during the build"
-ac_help="$ac_help
- --enable-bootstrap Enable bootstrapping [yes if native build]"
-ac_help="$ac_help
- --enable-serial-[{host,target,build}-]configure
- Force sequential configuration of
- sub-packages for the host, target or build
- machine, or all sub-packages"
-ac_help="$ac_help
- --with-build-time-tools=path
- use given path to find target tools during the build"
-ac_help="$ac_help
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer"
-ac_help="$ac_help
- --enable-werror enable -Werror in bootstrap stage2 and later"
-ac_help="$ac_help
- --with-datarootdir Use datarootdir as the data root directory."
-ac_help="$ac_help
- --with-docdir Install documentation in this directory."
-ac_help="$ac_help
- --with-htmldir Install html in this directory."
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="move-if-change"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_noncanonical host_noncanonical target_noncanonical host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN LN_S TOPLEVEL_CONFIGURE_ARGUMENTS build_libsubdir build_subdir host_subdir target_subdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX GNATBIND ac_ct_GNATBIND GNATMAKE ac_ct_GNATMAKE do_compare gmplibs gmpinc stage1_languages SYSROOT_CFLAGS_FOR_TARGET RPATH_ENVVAR tooldir build_tooldir CONFIGURE_GDB_TK GDB_TK INSTALL_GDB_TK build_configargs build_configdirs host_configargs configdirs target_configargs CC_FOR_BUILD config_shell YACC BISON M4 LEX FLEX MAKEINFO EXPECT RUNTEST AR AS DLLTOOL LD LIPO NM RANLIB STRIP WINDRES OBJCOPY OBJDUMP CFLAGS_FOR_BUILD CC_FOR_TARGET CXX_FOR_TARGET GCC_FOR_TARGET GCJ_FOR_TARGET GFORTRAN_FOR_TARGET AR_FOR_TARGET AS_FOR_TARGET DLLTOOL_FOR_TARGET LD_FOR_TARGET LIPO_FOR_TARGET NM_FOR_TARGET OBJDUMP_FOR_TARGET RANLIB_FOR_TARGET STRIP_FOR_TARGET WINDRES_FOR_TARGET RAW_CXX_FOR_TARGET FLAGS_FOR_TARGET COMPILER_AS_FOR_TARGET COMPILER_LD_FOR_TARGET COMPILER_NM_FOR_TARGET MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT stage1_cflags stage1_checking stage2_werror_flag datarootdir docdir pdfdir htmldir LIBOBJS LTLIBOBJS'
+ac_subst_files='serialization_dependencies host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag'
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -67,10 +291,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -84,17 +313,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -102,59 +323,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -163,95 +384,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -260,19 +433,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -286,26 +459,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -322,7 +495,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -332,7 +505,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -343,58 +516,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -405,99 +577,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=move-if-change
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -507,13 +690,660 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
- fi
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_AR_set=${AR+set}
+ac_env_AR_value=$AR
+ac_cv_env_AR_set=${AR+set}
+ac_cv_env_AR_value=$AR
+ac_env_AS_set=${AS+set}
+ac_env_AS_value=$AS
+ac_cv_env_AS_set=${AS+set}
+ac_cv_env_AS_value=$AS
+ac_env_DLLTOOL_set=${DLLTOOL+set}
+ac_env_DLLTOOL_value=$DLLTOOL
+ac_cv_env_DLLTOOL_set=${DLLTOOL+set}
+ac_cv_env_DLLTOOL_value=$DLLTOOL
+ac_env_LD_set=${LD+set}
+ac_env_LD_value=$LD
+ac_cv_env_LD_set=${LD+set}
+ac_cv_env_LD_value=$LD
+ac_env_LIPO_set=${LIPO+set}
+ac_env_LIPO_value=$LIPO
+ac_cv_env_LIPO_set=${LIPO+set}
+ac_cv_env_LIPO_value=$LIPO
+ac_env_NM_set=${NM+set}
+ac_env_NM_value=$NM
+ac_cv_env_NM_set=${NM+set}
+ac_cv_env_NM_value=$NM
+ac_env_RANLIB_set=${RANLIB+set}
+ac_env_RANLIB_value=$RANLIB
+ac_cv_env_RANLIB_set=${RANLIB+set}
+ac_cv_env_RANLIB_value=$RANLIB
+ac_env_STRIP_set=${STRIP+set}
+ac_env_STRIP_value=$STRIP
+ac_cv_env_STRIP_set=${STRIP+set}
+ac_cv_env_STRIP_value=$STRIP
+ac_env_WINDRES_set=${WINDRES+set}
+ac_env_WINDRES_value=$WINDRES
+ac_cv_env_WINDRES_set=${WINDRES+set}
+ac_cv_env_WINDRES_value=$WINDRES
+ac_env_OBJCOPY_set=${OBJCOPY+set}
+ac_env_OBJCOPY_value=$OBJCOPY
+ac_cv_env_OBJCOPY_set=${OBJCOPY+set}
+ac_cv_env_OBJCOPY_value=$OBJCOPY
+ac_env_OBJDUMP_set=${OBJDUMP+set}
+ac_env_OBJDUMP_value=$OBJDUMP
+ac_cv_env_OBJDUMP_set=${OBJDUMP+set}
+ac_cv_env_OBJDUMP_value=$OBJDUMP
+ac_env_CC_FOR_TARGET_set=${CC_FOR_TARGET+set}
+ac_env_CC_FOR_TARGET_value=$CC_FOR_TARGET
+ac_cv_env_CC_FOR_TARGET_set=${CC_FOR_TARGET+set}
+ac_cv_env_CC_FOR_TARGET_value=$CC_FOR_TARGET
+ac_env_CXX_FOR_TARGET_set=${CXX_FOR_TARGET+set}
+ac_env_CXX_FOR_TARGET_value=$CXX_FOR_TARGET
+ac_cv_env_CXX_FOR_TARGET_set=${CXX_FOR_TARGET+set}
+ac_cv_env_CXX_FOR_TARGET_value=$CXX_FOR_TARGET
+ac_env_GCC_FOR_TARGET_set=${GCC_FOR_TARGET+set}
+ac_env_GCC_FOR_TARGET_value=$GCC_FOR_TARGET
+ac_cv_env_GCC_FOR_TARGET_set=${GCC_FOR_TARGET+set}
+ac_cv_env_GCC_FOR_TARGET_value=$GCC_FOR_TARGET
+ac_env_GCJ_FOR_TARGET_set=${GCJ_FOR_TARGET+set}
+ac_env_GCJ_FOR_TARGET_value=$GCJ_FOR_TARGET
+ac_cv_env_GCJ_FOR_TARGET_set=${GCJ_FOR_TARGET+set}
+ac_cv_env_GCJ_FOR_TARGET_value=$GCJ_FOR_TARGET
+ac_env_GFORTRAN_FOR_TARGET_set=${GFORTRAN_FOR_TARGET+set}
+ac_env_GFORTRAN_FOR_TARGET_value=$GFORTRAN_FOR_TARGET
+ac_cv_env_GFORTRAN_FOR_TARGET_set=${GFORTRAN_FOR_TARGET+set}
+ac_cv_env_GFORTRAN_FOR_TARGET_value=$GFORTRAN_FOR_TARGET
+ac_env_AR_FOR_TARGET_set=${AR_FOR_TARGET+set}
+ac_env_AR_FOR_TARGET_value=$AR_FOR_TARGET
+ac_cv_env_AR_FOR_TARGET_set=${AR_FOR_TARGET+set}
+ac_cv_env_AR_FOR_TARGET_value=$AR_FOR_TARGET
+ac_env_AS_FOR_TARGET_set=${AS_FOR_TARGET+set}
+ac_env_AS_FOR_TARGET_value=$AS_FOR_TARGET
+ac_cv_env_AS_FOR_TARGET_set=${AS_FOR_TARGET+set}
+ac_cv_env_AS_FOR_TARGET_value=$AS_FOR_TARGET
+ac_env_DLLTOOL_FOR_TARGET_set=${DLLTOOL_FOR_TARGET+set}
+ac_env_DLLTOOL_FOR_TARGET_value=$DLLTOOL_FOR_TARGET
+ac_cv_env_DLLTOOL_FOR_TARGET_set=${DLLTOOL_FOR_TARGET+set}
+ac_cv_env_DLLTOOL_FOR_TARGET_value=$DLLTOOL_FOR_TARGET
+ac_env_LD_FOR_TARGET_set=${LD_FOR_TARGET+set}
+ac_env_LD_FOR_TARGET_value=$LD_FOR_TARGET
+ac_cv_env_LD_FOR_TARGET_set=${LD_FOR_TARGET+set}
+ac_cv_env_LD_FOR_TARGET_value=$LD_FOR_TARGET
+ac_env_LIPO_FOR_TARGET_set=${LIPO_FOR_TARGET+set}
+ac_env_LIPO_FOR_TARGET_value=$LIPO_FOR_TARGET
+ac_cv_env_LIPO_FOR_TARGET_set=${LIPO_FOR_TARGET+set}
+ac_cv_env_LIPO_FOR_TARGET_value=$LIPO_FOR_TARGET
+ac_env_NM_FOR_TARGET_set=${NM_FOR_TARGET+set}
+ac_env_NM_FOR_TARGET_value=$NM_FOR_TARGET
+ac_cv_env_NM_FOR_TARGET_set=${NM_FOR_TARGET+set}
+ac_cv_env_NM_FOR_TARGET_value=$NM_FOR_TARGET
+ac_env_OBJDUMP_FOR_TARGET_set=${OBJDUMP_FOR_TARGET+set}
+ac_env_OBJDUMP_FOR_TARGET_value=$OBJDUMP_FOR_TARGET
+ac_cv_env_OBJDUMP_FOR_TARGET_set=${OBJDUMP_FOR_TARGET+set}
+ac_cv_env_OBJDUMP_FOR_TARGET_value=$OBJDUMP_FOR_TARGET
+ac_env_RANLIB_FOR_TARGET_set=${RANLIB_FOR_TARGET+set}
+ac_env_RANLIB_FOR_TARGET_value=$RANLIB_FOR_TARGET
+ac_cv_env_RANLIB_FOR_TARGET_set=${RANLIB_FOR_TARGET+set}
+ac_cv_env_RANLIB_FOR_TARGET_value=$RANLIB_FOR_TARGET
+ac_env_STRIP_FOR_TARGET_set=${STRIP_FOR_TARGET+set}
+ac_env_STRIP_FOR_TARGET_value=$STRIP_FOR_TARGET
+ac_cv_env_STRIP_FOR_TARGET_set=${STRIP_FOR_TARGET+set}
+ac_cv_env_STRIP_FOR_TARGET_value=$STRIP_FOR_TARGET
+ac_env_WINDRES_FOR_TARGET_set=${WINDRES_FOR_TARGET+set}
+ac_env_WINDRES_FOR_TARGET_value=$WINDRES_FOR_TARGET
+ac_cv_env_WINDRES_FOR_TARGET_set=${WINDRES_FOR_TARGET+set}
+ac_cv_env_WINDRES_FOR_TARGET_value=$WINDRES_FOR_TARGET
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+ --target=TARGET configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-libada Builds libada directory
+ --enable-libssp Builds libssp directory
+ --enable-stage1-languages=all choose additional languages to build during
+ stage1. Mostly useful for compiler development.
+ --enable-objc-gc enable the use of Boehm's garbage collector with
+ the GNU Objective-C runtime.
+ --enable-bootstrap Enable bootstrapping yes if native build
+ --enable-serial-{host,target,build}-configure
+ Force sequential configuration of
+ sub-packages for the host, target or build
+ machine, or all sub-packages
+ --enable-maintainer-mode enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer
+ --enable-stage1-checking=all choose additional checking for stage1
+ of the compiler.
+ --enable-werror enable -Werror in bootstrap stage2 and later
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-build-libsubdir=DIR Directory where to find libraries for build system
+ --with-mpfr-dir=PATH This option has been REMOVED
+ --with-mpfr=PATH Specify prefix directory for installed MPFR package
+ Equivalent to --with-mpfr-include=PATH/include
+ plus --with-mpfr-lib=PATH/lib
+ --with-mpfr-include=PATH
+ Specify directory for installed MPFR include files
+ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library
+ --with-gmp-dir=PATH This option has been REMOVED
+ --with-gmp=PATH Specify prefix directory for the installed GMP package
+ Equivalent to --with-gmp-include=PATH/include
+ plus --with-gmp-lib=PATH/lib
+ --with-gmp-include=PATH Specify directory for installed GMP include files
+ --with-gmp-lib=PATH Specify the directory for the installed GMP library
+ --with-build-sysroot=sysroot
+ use sysroot as the system root during the build
+ --with-build-time-tools=path
+ use given path to find target tools during the build
+ --with-datarootdir Use datarootdir as the data root directory.
+ --with-docdir Install documentation in this directory.
+ --with-pdfdir Install pdf in this directory.
+ --with-htmldir Install html in this directory.
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ AR AR for the host
+ AS AS for the host
+ DLLTOOL DLLTOOL for the host
+ LD LD for the host
+ LIPO LIPO for the host
+ NM NM for the host
+ RANLIB RANLIB for the host
+ STRIP STRIP for the host
+ WINDRES WINDRES for the host
+ OBJCOPY OBJCOPY for the host
+ OBJDUMP OBJDUMP for the host
+ CC_FOR_TARGET
+ CC for the target
+ CXX_FOR_TARGET
+ CXX for the target
+ GCC_FOR_TARGET
+ GCC for the target
+ GCJ_FOR_TARGET
+ GCJ for the target
+ GFORTRAN_FOR_TARGET
+ GFORTRAN for the target
+ AR_FOR_TARGET
+ AR for the target
+ AS_FOR_TARGET
+ AS for the target
+ DLLTOOL_FOR_TARGET
+ DLLTOOL for the target
+ LD_FOR_TARGET
+ LD for the target
+ LIPO_FOR_TARGET
+ LIPO for the target
+ NM_FOR_TARGET
+ NM for the target
+ OBJDUMP_FOR_TARGET
+ OBJDUMP for the target
+ RANLIB_FOR_TARGET
+ RANLIB for the target
+ STRIP_FOR_TARGET
+ STRIP for the target
+ WINDRES_FOR_TARGET
+ WINDRES for the target
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -524,42 +1354,108 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Find the build, host, and target systems.
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -570,122 +1466,143 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
+ elif test -f $ac_dir/shtool; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
+ { (exit 1); exit 1; }; }
fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+ ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-# configure --host=HOST --target=TARGET --build=BUILD NONOPT
-#
-# The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-# same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-# as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+ case ${build_alias} in
+ "") build_noncanonical=${build} ;;
+ *) build_noncanonical=${build_alias} ;;
esac
-# Make sure we can run config.sub.
-if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:611: checking host system type" >&5
-host_alias=$host
-case "$host_alias" in
-NONE)
- case $nonopt in
- NONE)
- if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
- else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
- fi ;;
- *) host_alias=$nonopt ;;
- esac ;;
+ case ${host_alias} in
+ "") host_noncanonical=${build_noncanonical} ;;
+ *) host_noncanonical=${host_alias} ;;
esac
-host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:632: checking target system type" >&5
-
-target_alias=$target
-case "$target_alias" in
-NONE)
- case $nonopt in
- NONE) target_alias=$host_alias ;;
- *) target_alias=$nonopt ;;
- esac ;;
-esac
-target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
-target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$target" 1>&6
-
-echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:650: checking build system type" >&5
-
-build_alias=$build
-case "$build_alias" in
-NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
+
+ case ${target_alias} in
+ "") target_noncanonical=${host_noncanonical} ;;
+ *) target_noncanonical=${target_alias} ;;
esac
-build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
-build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$build" 1>&6
-test "$host_alias" != "$target_alias" &&
+
+
+test "$host_noncanonical" = "$target_noncanonical" &&
test "$program_prefix$program_suffix$program_transform_name" = \
NONENONEs,x,x, &&
- program_prefix=${target_alias}-
+ program_transform_name=s,y,y,
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # 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
+ ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+ ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking target system type" >&5
+echo $ECHO_N "checking target system type... $ECHO_C" >&6
+if test "${ac_cv_target+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_target_alias=$target_alias
+test "x$ac_cv_target_alias" = "x" &&
+ ac_cv_target_alias=$ac_cv_host_alias
+ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
+ { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_target" >&5
+echo "${ECHO_T}$ac_cv_target" >&6
+target=$ac_cv_target
+target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_prefix=${target_alias}-
test "$program_prefix" != NONE &&
- program_transform_name="s,^,${program_prefix},; $program_transform_name"
+ program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+ program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# Get 'install' or 'install-sh' and its variants.
@@ -696,67 +1613,82 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x,"
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:705: checking for a BSD compatible install" >&5
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
- for ac_dir in $PATH; do
- # Account for people who put trailing slashes in PATH elements.
- case "$ac_dir/" in
- /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- if test -f $ac_dir/$ac_prog; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
- grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
else
- ac_cv_path_install="$ac_dir/$ac_prog -c"
- break 2
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
fi
fi
done
- ;;
- esac
- done
- IFS="$ac_save_IFS"
+ done
+ ;;
+esac
+done
+
fi
if test "${ac_cv_path_install+set}" = set; then
- INSTALL="$ac_cv_path_install"
+ INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
- INSTALL="$ac_install_sh"
+ INSTALL=$ac_install_sh
fi
fi
-echo "$ac_t""$INSTALL" 1>&6
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo $ac_n "checking whether ln works""... $ac_c" 1>&6
-echo "configure:758: checking whether ln works" >&5
-if eval "test \"`echo '$''{'acx_cv_prog_LN'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking whether ln works" >&5
+echo $ECHO_N "checking whether ln works... $ECHO_C" >&6
+if test "${acx_cv_prog_LN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f conftestdata_t
echo >conftestdata_f
@@ -771,31 +1703,23 @@ rm -f conftestdata_f conftestdata_t
fi
if test $acx_cv_prog_LN = no; then
LN="cp"
- echo "$ac_t""no, using $LN" 1>&6
+ echo "$as_me:$LINENO: result: no, using $LN" >&5
+echo "${ECHO_T}no, using $LN" >&6
else
LN="$acx_cv_prog_LN"
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
fi
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:782: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
- rm -f conftestdata
- ac_cv_prog_LN_S="ln -s"
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
else
- ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
fi
@@ -837,14 +1761,25 @@ progname=$0
# if PWD already has a value, it is probably wrong.
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
-# Export original configure arguments for use by sub-configures. These
-# will be expanded by make, so quote '$'.
-tmp="$progname $@"
-sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
-$tmp
-EOF_SED
-TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
-rm -f conftestsed.out
+# Export original configure arguments for use by sub-configures.
+# Quote arguments with shell meta charatcers.
+TOPLEVEL_CONFIGURE_ARGUMENTS=
+set -- "$progname" "$@"
+for ac_arg
+do
+ case "$ac_arg" in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+ # if the argument is of the form -foo=baz, quote the baz part only
+ ac_arg=`echo "'$ac_arg'" | sed "s/^'\([-a-zA-Z0-9]*=\)/\\1'/"` ;;
+ *) ;;
+ esac
+ # Add the quoted argument to the list.
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
+done
+# Remove the initial space we just introduced and, as these will be
+# expanded by make, quote '$'.
+TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
moveifchange=${srcdir}/move-if-change
@@ -872,11 +1807,11 @@ extra_host_args=
### or a host dependent tool. Then put it into the appropriate list
### (library or tools, host or target), doing a dependency sort.
-# Subdirs will be configured in the order listed in build_configdirs,
+# Subdirs will be configured in the order listed in build_configdirs,
# configdirs, or target_configdirs; see the serialization section below.
-# Dependency sorting is only needed when *configuration* must be done in
-# a particular order. In all cases a dependency should be specified in
+# Dependency sorting is only needed when *configuration* must be done in
+# a particular order. In all cases a dependency should be specified in
# the Makefile, whether or not it's implicitly specified here.
# Double entries in build_configdirs, configdirs, or target_configdirs may
@@ -892,7 +1827,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -903,7 +1838,6 @@ host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
- target-boehm-gc \
target-zlib \
target-qthreads \
target-libjava"
@@ -911,14 +1845,15 @@ libgcj="target-libffi \
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
#
-target_libraries="target-libiberty \
+target_libraries="target-libgcc \
+ target-libiberty \
target-libgloss \
target-newlib \
target-libstdc++-v3 \
target-libmudflap \
target-libssp \
- target-libgcc-math \
target-libgfortran \
+ target-boehm-gc \
${libgcj} \
target-libobjc \
target-libada \
@@ -957,26 +1892,29 @@ if test x"${host}" = x"${target}" ; then
is_cross_compiler=no
else
is_cross_compiler=yes
-fi
+fi
# Find the build and target subdir names.
- case ${build_alias} in
- "") build_noncanonical=${build} ;;
- *) build_noncanonical=${build_alias} ;;
-esac
- case ${host_alias} in
- "") host_noncanonical=${build_noncanonical} ;;
- *) host_noncanonical=${host_alias} ;;
-esac
-
- case ${target_alias} in
- "") target_noncanonical=${host_noncanonical} ;;
- *) target_noncanonical=${target_alias} ;;
-esac
+# post-stage1 host modules use a different CC_FOR_BUILD so, in order to
+# have matching libraries, they should use host libraries: Makefile.tpl
+# arranges to pass --with-build-libsubdir=$(HOST_SUBDIR).
+# However, they still use the build modules, because the corresponding
+# host modules (e.g. bison) are only built for the host when bootstrap
+# finishes. So:
+# - build_subdir is where we find build modules, and never changes.
+# - build_libsubdir is where we find build libraries, and can be overridden.
- # Prefix 'build-' so this never conflicts with target_subdir.
+# Prefix 'build-' so this never conflicts with target_subdir.
build_subdir="build-${build_noncanonical}"
+
+# Check whether --with-build-libsubdir or --without-build-libsubdir was given.
+if test "${with_build_libsubdir+set}" = set; then
+ withval="$with_build_libsubdir"
+ build_libsubdir="$withval"
+else
+ build_libsubdir="$build_subdir"
+fi;
# --srcdir=. covers the toplevel, while "test -d" covers the subdirectories
if ( test $srcdir = . && test -d gcc ) \
|| test -d $srcdir/../host-${host_noncanonical}; then
@@ -986,7 +1924,7 @@ else
fi
# No prefix.
target_subdir=${target_noncanonical}
-
+
# Skipdirs are removed silently.
skipdirs=
@@ -1007,7 +1945,7 @@ if test x$with_gnu_as = xno ; then
noconfigdirs="$noconfigdirs gas"
fi
-# some tools are so dependent upon X11 that if we're not building with X,
+# some tools are so dependent upon X11 that if we're not building with X,
# it's not even worth trying to configure, much less build, that tool.
case ${with_x} in
@@ -1015,14 +1953,14 @@ case ${with_x} in
no)
skipdirs="${skipdirs} tk itcl libgui"
# We won't be able to build gdbtk without X.
- enable_gdbtk=no
+ enable_gdbtk=no
;;
*) echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2 ;;
esac
# Some tools are only suitable for building in a "native" situation.
-# Remove these if host!=target.
-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
+# Remove these if host!=target.
+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
# Similarly, some are only suitable for cross toolchains.
# Remove these if host=target.
@@ -1059,7 +1997,7 @@ esac
# Only spaces may be used in this macro; not newlines or tabs.
unsupported_languages=
-# Remove more programs from consideration, based on the host or
+# Remove more programs from consideration, based on the host or
# target this usually means that a port of the program doesn't
# exist yet.
@@ -1073,9 +2011,12 @@ case "${host}" in
i[3456789]86-*-go32* | i[3456789]86-*-msdosdjgpp*)
noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
;;
+ x86_64-*-mingw*)
+ noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
+ ;;
i[3456789]86-*-mingw32*)
# noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
- noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
+ noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
;;
i[3456789]86-*-beos*)
noconfigdirs="$noconfigdirs tk itcl libgui gdb"
@@ -1101,8 +2042,7 @@ if test "${enable_libada+set}" = set; then
ENABLE_LIBADA=$enableval
else
ENABLE_LIBADA=yes
-fi
-
+fi;
if test "${ENABLE_LIBADA}" != "yes" ; then
noconfigdirs="$noconfigdirs gnattools"
fi
@@ -1113,25 +2053,7 @@ if test "${enable_libssp+set}" = set; then
ENABLE_LIBSSP=$enableval
else
ENABLE_LIBSSP=yes
-fi
-
-
-# Set the default so we build libgcc-math for ix86 and x86_64
-# Check whether --enable-libgcc-math or --disable-libgcc-math was given.
-if test "${enable_libgcc_math+set}" = set; then
- enableval="$enable_libgcc_math"
- :
-else
-
-case "${target}" in
- i?86-* | x86_64-* )
- enable_libgcc_math=yes ;;
- *)
- enable_libgcc_math=no ;;
-esac
-
-fi
-
+fi;
# Save it here so that, even in case of --enable-libgcj, if the Java
# front-end isn't enabled, we still get libgcj disabled.
@@ -1153,7 +2075,7 @@ esac
# Disable libmudflap on some systems.
if test x$enable_libmudflap = x ; then
case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc* | *-*-uclinux*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
@@ -1174,7 +2096,7 @@ if test x$enable_libgomp = x ; then
;;
*-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
;;
- *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
+ *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
;;
*-*-darwin* | *-*-aix*)
;;
@@ -1189,7 +2111,7 @@ case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- powerpc-*-darwin*)
+ powerpc-*-darwin* | i[3456789]86-*-darwin*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
noconfigdirs="$noconfigdirs sim target-rda"
;;
@@ -1253,9 +2175,6 @@ case "${target}" in
*-*-vxworks*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
;;
- m32c-*-*)
- noconfigdirs="$noconfigdirs target-libstdc++-v3"
- ;;
alpha*-dec-osf*)
# ld works, but does not support shared libraries.
# newlib is not 64 bit ready. I'm not sure about fileutils.
@@ -1278,7 +2197,7 @@ case "${target}" in
;;
sh-*-linux*)
noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
- ;;
+ ;;
sh*-*-pe|mips*-*-pe|*arm-wince-pe)
noconfigdirs="$noconfigdirs ${libgcj}"
noconfigdirs="$noconfigdirs target-examples"
@@ -1308,6 +2227,9 @@ case "${target}" in
arm*-*-linux-gnueabi)
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ case ${with_newlib} in
+ no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ esac
;;
arm*-*-symbianelf*)
noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
@@ -1331,7 +2253,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
bfin-*-*)
- noconfigdirs="$noconfigdirs target-libgloss gdb"
+ noconfigdirs="$noconfigdirs gdb"
if test x${is_cross_compiler} != xno ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
@@ -1395,6 +2317,9 @@ case "${target}" in
hppa*64*-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ hppa*-hp-hpux11*)
+ noconfigdirs="$noconfigdirs ld shellutils"
+ ;;
hppa*-*-*)
# According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
# build on HP-UX 10.20.
@@ -1436,33 +2361,23 @@ case "${target}" in
# 'target-newlib' will appear in skipdirs.
;;
i[3456789]86-*-mingw32*)
- target_configdirs="$target_configdirs target-mingw"
- noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
-
- # Can't build gdb for mingw32 if not native.
- case "${host}" in
- i[3456789]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
- ;;
- esac
- ;;
+ target_configdirs="$target_configdirs target-winsup"
+ noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
+ ;;
+ x86_64-*-mingw*)
+ target_configdirs="$target_configdirs target-winsup"
+ noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
+ ;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
# always build newlib if winsup directory is present.
- if test -d "$srcdir/winsup"; then
+ if test -d "$srcdir/winsup/cygwin"; then
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
elif test -d "$srcdir/newlib"; then
- echo "Warning: winsup is missing so newlib can't be built."
+ echo "Warning: winsup/cygwin is missing so newlib can't be built."
fi
-
- # Can't build gdb for Cygwin if not native.
- case "${host}" in
- *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
- ;;
- esac
- ;;
+ ;;
i[3456789]86-moss-msdos | i[3456789]86-*-moss* | \
i[3456789]86-*-uwin* | i[3456789]86-*-interix* )
;;
@@ -1563,17 +2478,11 @@ case "${target}" in
# <oldham@codesourcery.com>
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
- mips*-dec-bsd*)
- noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
- ;;
mips*-*-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
- mipstx39-*-*)
- noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
- ;;
mips64*-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -1615,6 +2524,9 @@ case "${target}" in
;;
sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
;;
+ spu-*-*)
+ skipdirs="target-libssp"
+ ;;
v810-*-*)
noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
;;
@@ -1644,7 +2556,7 @@ case "${target}" in
;;
*-*-lynxos*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
- ;;
+ ;;
*-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
@@ -1771,6 +2683,8 @@ case "${host}" in
;;
*-mingw32*)
;;
+ *-mingw64*)
+ ;;
*-interix*)
host_makefile_frag="config/mh-interix"
;;
@@ -1841,233 +2755,664 @@ if test -z "${CC}" && test "${build}" = "${host}" ; then
fi
if test "${build}" != "${host}" ; then
- # If we are doing a Canadian Cross, in which the host and build systems
- # are not the same, we set reasonable default values for the tools.
-
- CC=${CC-${host_alias}-gcc}
- CFLAGS=${CFLAGS-"-g -O2"}
- CXX=${CXX-${host_alias}-c++}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
+else
+ CC_FOR_BUILD="\$(CC)"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- # Set reasonable default values for some tools even if not Canadian.
- # Of course, these are different reasonable default values, originally
- # specified directly in the Makefile.
- # We don't export, so that autoconf can do its job.
- # Note that all these settings are above the fragment inclusion point
- # in Makefile.in, so can still be overridden by fragments.
- # This is all going to change when we autoconfiscate...
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
- CC_FOR_BUILD="\$(CC)"
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1867: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- 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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1897: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- 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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
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
+ if test $# != 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="$@"
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&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:1948: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
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"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- ;;
- esac
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1980: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ test -n "$ac_ct_CC" && break
+done
-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
+ CC=$ac_ct_CC
+fi
-cat > conftest.$ac_ext << EOF
+fi
-#line 1991 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:1996: \"$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
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
else
- ac_cv_prog_cc_cross=yes
- fi
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
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:2022: 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
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2027: 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:2036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_prog_gcc=no
-fi
-fi
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+int
+main ()
+{
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
else
- GCC=
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
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:2055: 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
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
- ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
+ CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
@@ -2081,111 +3426,812 @@ else
CFLAGS=
fi
fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+fi
- # We must set the default linker to the linker used by gcc for the correct
- # operation of libtool. If LD is not defined and we are using gcc, try to
- # set the LD default to the ld used by gcc.
- if test -z "$LD"; then
- if test "$GCC" = yes; then
- case $build in
- *-*-mingw*)
- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
- *)
- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
- esac
- case $gcc_prog_ld in
- # Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
- LD="$gcc_prog_ld" ;;
- esac
- fi
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
- CXX=${CXX-"c++"}
- CFLAGS=${CFLAGS-"-g"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-if test $host != $build; then
- ac_tool_prefix=${host_alias}-
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+ CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
else
- ac_tool_prefix=
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# We must set the default linker to the linker used by gcc for the correct
+# operation of libtool. If LD is not defined and we are using gcc, try to
+# set the LD default to the ld used by gcc.
+if test -z "$LD"; then
+ if test "$GCC" = yes; then
+ case $build in
+ *-*-mingw*)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
+ *)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
+ esac
+ case $gcc_prog_ld in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ LD="$gcc_prog_ld" ;;
+ esac
+ fi
fi
-# Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gnatbind", so it can be a program name with args.
set dummy ${ac_tool_prefix}gnatbind; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2122: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GNATBIND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$GNATBIND"; then
ac_cv_prog_GNATBIND="$GNATBIND" # 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_GNATBIND="${ac_tool_prefix}gnatbind"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GNATBIND="${ac_tool_prefix}gnatbind"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-GNATBIND="$ac_cv_prog_GNATBIND"
+GNATBIND=$ac_cv_prog_GNATBIND
if test -n "$GNATBIND"; then
- echo "$ac_t""$GNATBIND" 1>&6
+ echo "$as_me:$LINENO: result: $GNATBIND" >&5
+echo "${ECHO_T}$GNATBIND" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+fi
if test -z "$ac_cv_prog_GNATBIND"; then
-if test -n "$ac_tool_prefix"; then
+ ac_ct_GNATBIND=$GNATBIND
# Extract the first word of "gnatbind", so it can be a program name with args.
set dummy gnatbind; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2154: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GNATBIND'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_GNATBIND+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$GNATBIND"; then
- ac_cv_prog_GNATBIND="$GNATBIND" # Let the user override the test.
+ if test -n "$ac_ct_GNATBIND"; then
+ ac_cv_prog_ac_ct_GNATBIND="$ac_ct_GNATBIND" # 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_GNATBIND="gnatbind"
- break
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_GNATBIND" && ac_cv_prog_GNATBIND="no"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_GNATBIND="gnatbind"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_GNATBIND" && ac_cv_prog_ac_ct_GNATBIND="no"
fi
fi
-GNATBIND="$ac_cv_prog_GNATBIND"
-if test -n "$GNATBIND"; then
- echo "$ac_t""$GNATBIND" 1>&6
+ac_ct_GNATBIND=$ac_cv_prog_ac_ct_GNATBIND
+if test -n "$ac_ct_GNATBIND"; then
+ echo "$as_me:$LINENO: result: $ac_ct_GNATBIND" >&5
+echo "${ECHO_T}$ac_ct_GNATBIND" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ GNATBIND=$ac_ct_GNATBIND
else
- echo "$ac_t""no" 1>&6
+ GNATBIND="$ac_cv_prog_GNATBIND"
fi
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gnatmake", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gnatmake; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GNATMAKE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$GNATMAKE"; then
+ ac_cv_prog_GNATMAKE="$GNATMAKE" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GNATMAKE="${ac_tool_prefix}gnatmake"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+GNATMAKE=$ac_cv_prog_GNATMAKE
+if test -n "$GNATMAKE"; then
+ echo "$as_me:$LINENO: result: $GNATMAKE" >&5
+echo "${ECHO_T}$GNATMAKE" >&6
else
- GNATBIND="no"
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+
fi
+if test -z "$ac_cv_prog_GNATMAKE"; then
+ ac_ct_GNATMAKE=$GNATMAKE
+ # Extract the first word of "gnatmake", so it can be a program name with args.
+set dummy gnatmake; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_GNATMAKE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_GNATMAKE"; then
+ ac_cv_prog_ac_ct_GNATMAKE="$ac_ct_GNATMAKE" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_GNATMAKE="gnatmake"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-echo $ac_n "checking whether compiler driver understands Ada""... $ac_c" 1>&6
-echo "configure:2187: checking whether compiler driver understands Ada" >&5
-if eval "test \"`echo '$''{'acx_cv_cc_gcc_supports_ada'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+ test -z "$ac_cv_prog_ac_ct_GNATMAKE" && ac_cv_prog_ac_ct_GNATMAKE="no"
+fi
+fi
+ac_ct_GNATMAKE=$ac_cv_prog_ac_ct_GNATMAKE
+if test -n "$ac_ct_GNATMAKE"; then
+ echo "$as_me:$LINENO: result: $ac_ct_GNATMAKE" >&5
+echo "${ECHO_T}$ac_ct_GNATMAKE" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ GNATMAKE=$ac_ct_GNATMAKE
+else
+ GNATMAKE="$ac_cv_prog_GNATMAKE"
+fi
+
+echo "$as_me:$LINENO: checking whether compiler driver understands Ada" >&5
+echo $ECHO_N "checking whether compiler driver understands Ada... $ECHO_C" >&6
+if test "${acx_cv_cc_gcc_supports_ada+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest;
@@ -2205,19 +4251,19 @@ if test x"$errors" = x && test -f conftest.$ac_objext; then
fi
rm -f conftest.*
fi
+echo "$as_me:$LINENO: result: $acx_cv_cc_gcc_supports_ada" >&5
+echo "${ECHO_T}$acx_cv_cc_gcc_supports_ada" >&6
-echo "$ac_t""$acx_cv_cc_gcc_supports_ada" 1>&6
-
-if test x$GNATBIND != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
+if test x$GNATBIND != xno && test x$GNATMAKE != xno && test x$acx_cv_cc_gcc_supports_ada != xno; then
have_gnat=yes
else
have_gnat=no
fi
-echo $ac_n "checking how to compare bootstrapped objects""... $ac_c" 1>&6
-echo "configure:2219: checking how to compare bootstrapped objects" >&5
-if eval "test \"`echo '$''{'gcc_cv_prog_cmp_skip'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking how to compare bootstrapped objects" >&5
+echo $ECHO_N "checking how to compare bootstrapped objects... $ECHO_C" >&6
+if test "${gcc_cv_prog_cmp_skip+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
echo abfoo >t1
echo cdfoo >t2
@@ -2239,131 +4285,322 @@ else
rm t1 t2
fi
-
-echo "$ac_t""$gcc_cv_prog_cmp_skip" 1>&6
+echo "$as_me:$LINENO: result: $gcc_cv_prog_cmp_skip" >&5
+echo "${ECHO_T}$gcc_cv_prog_cmp_skip" >&6
do_compare="$gcc_cv_prog_cmp_skip"
# Check for GMP and MPFR
-gmplibs=
+gmplibs="-lmpfr -lgmp"
gmpinc=
-have_gmp=yes
+have_gmp=no
+
# Specify a location for mpfr
# check for this first so it ends up on the link line before gmp.
+
# Check whether --with-mpfr-dir or --without-mpfr-dir was given.
if test "${with_mpfr_dir+set}" = set; then
withval="$with_mpfr_dir"
- :
-fi
+ { { echo "$as_me:$LINENO: error: The --with-mpfr-dir=PATH option has been removed.
+Use --with-mpfr=PATH or --with-mpfr-include=PATH plus --with-mpfr-lib=PATH" >&5
+echo "$as_me: error: The --with-mpfr-dir=PATH option has been removed.
+Use --with-mpfr=PATH or --with-mpfr-include=PATH plus --with-mpfr-lib=PATH" >&2;}
+ { (exit 1); exit 1; }; }
+fi;
-if test "x$with_mpfr_dir" != x; then
- gmpinc="-I$with_mpfr_dir"
- gmplibs="$with_mpfr_dir/libmpfr.a"
-else
- gmplibs="-lmpfr"
-fi
-
# Check whether --with-mpfr or --without-mpfr was given.
if test "${with_mpfr+set}" = set; then
withval="$with_mpfr"
- :
-fi
+fi;
+
+# Check whether --with-mpfr_include or --without-mpfr_include was given.
+if test "${with_mpfr_include+set}" = set; then
+ withval="$with_mpfr_include"
+
+fi;
+
+# Check whether --with-mpfr_lib or --without-mpfr_lib was given.
+if test "${with_mpfr_lib+set}" = set; then
+ withval="$with_mpfr_lib"
+
+fi;
if test "x$with_mpfr" != x; then
gmplibs="-L$with_mpfr/lib $gmplibs"
gmpinc="-I$with_mpfr/include"
fi
+if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+fi
+if test "x$with_mpfr_lib" != x; then
+ gmplibs="-L$with_mpfr_lib $gmplibs"
+fi
+if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
+ gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/.libs -L$$r/$(HOST_SUBDIR)/mpfr/_libs '"$gmplibs"
+ gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
+ # Do not test the mpfr version. Assume that it is sufficient, since
+ # it is in the source tree, and the library has not been built yet
+ # but it would be included on the link line in the version check below
+ # hence making the test fail.
+ have_gmp=yes
+fi
# Specify a location for gmp
+
# Check whether --with-gmp-dir or --without-gmp-dir was given.
if test "${with_gmp_dir+set}" = set; then
withval="$with_gmp_dir"
- :
-fi
-
+ { { echo "$as_me:$LINENO: error: The --with-gmp-dir=PATH option has been removed.
+Use --with-gmp=PATH or --with-gmp-include=PATH plus --with-gmp-lib=PATH" >&5
+echo "$as_me: error: The --with-gmp-dir=PATH option has been removed.
+Use --with-gmp=PATH or --with-gmp-include=PATH plus --with-gmp-lib=PATH" >&2;}
+ { (exit 1); exit 1; }; }
+fi;
-if test "x$with_gmp_dir" != x; then
- gmpinc="$gmpinc -I$with_gmp_dir"
- if test -f "$with_gmp_dir/.libs/libgmp.a"; then
- gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
- elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
- gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
- fi
- # One of the later tests will catch the error if neither library is present.
-else
- gmplibs="$gmplibs -lgmp"
-fi
# Check whether --with-gmp or --without-gmp was given.
if test "${with_gmp+set}" = set; then
withval="$with_gmp"
- :
-fi
+
+fi;
+
+# Check whether --with-gmp_include or --without-gmp_include was given.
+if test "${with_gmp_include+set}" = set; then
+ withval="$with_gmp_include"
+
+fi;
+
+# Check whether --with-gmp_lib or --without-gmp_lib was given.
+if test "${with_gmp_lib+set}" = set; then
+ withval="$with_gmp_lib"
+
+fi;
if test "x$with_gmp" != x; then
gmplibs="-L$with_gmp/lib $gmplibs"
gmpinc="-I$with_gmp/include $gmpinc"
fi
+if test "x$with_gmp_include" != x; then
+ gmpinc="-I$with_gmp_include $gmpinc"
+fi
+if test "x$with_gmp_lib" != x; then
+ gmplibs="-L$with_gmp_lib $gmplibs"
+fi
+if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
+ gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs"
+ gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
+ # Do not test the gmp version. Assume that it is sufficient, since
+ # it is in the source tree, and the library has not been built yet
+ # but it would be included on the link line in the version check below
+ # hence making the test fail.
+ have_gmp=yes
+fi
-saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $gmpinc"
-# Check GMP actually works
-echo $ac_n "checking for correct version of gmp.h""... $ac_c" 1>&6
-echo "configure:2317: checking for correct version of gmp.h" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2319 "configure"
-#include "confdefs.h"
-#include "gmp.h"
-int main() {
-
-#if __GNU_MP_VERSION < 3
-choke me
-#endif
+if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
+ have_gmp=yes
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $gmpinc"
+ # Check GMP actually works
+ echo "$as_me:$LINENO: checking for correct version of gmp.h" >&5
+echo $ECHO_N "checking for correct version of gmp.h... $ECHO_C" >&6
-; return 0; }
-EOF
-if { (eval echo configure:2330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6; have_gmp=no
-fi
-rm -f conftest*
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include "gmp.h"
+int
+main ()
+{
-if test x"$have_gmp" = xyes; then
- echo $ac_n "checking for MPFR""... $ac_c" 1>&6
-echo "configure:2343: checking for MPFR" >&5
+ #if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
+ choke me
+ #endif
- saved_LIBS="$LIBS"
- LIBS="$LIBS $gmplibs"
- cat > conftest.$ac_ext <<EOF
-#line 2348 "configure"
-#include "confdefs.h"
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; have_gmp=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ if test x"$have_gmp" = xyes; then
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $gmplibs"
+ echo "$as_me:$LINENO: checking for correct version of mpfr.h" >&5
+echo $ECHO_N "checking for correct version of mpfr.h... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <gmp.h>
-#include <mpfr.h>
-int main() {
-mpfr_t n; mpfr_init(n);
-; return 0; }
-EOF
-if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6; have_gmp=no
-fi
-rm -f conftest*
- LIBS="$saved_LIBS"
+ #include <mpfr.h>
+int
+main ()
+{
+
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0)
+ choke me
+ #endif
+ mpfr_t n;
+ mpfr_t x;
+ int t;
+ mpfr_init (n);
+ mpfr_init (x);
+ mpfr_atan2 (n, n, x, GMP_RNDN);
+ mpfr_erfc (n, x, GMP_RNDN);
+ mpfr_subnormalize (x, t, GMP_RNDN);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <gmp.h>
+ #include <mpfr.h>
+int
+main ()
+{
+
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
+ choke me
+ #endif
+ mpfr_t n; mpfr_init(n);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: buggy but acceptable" >&5
+echo "${ECHO_T}buggy but acceptable" >&6
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; have_gmp=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$saved_LIBS"
+ fi
CFLAGS="$saved_CFLAGS"
+
+ if test x$have_gmp != xyes; then
+ { { echo "$as_me:$LINENO: error: Building GCC requires GMP 4.1+ and MPFR 2.2.1+.
+Try the --with-gmp and/or --with-mpfr options to specify their locations.
+Copies of these libraries' source code can be found at their respective
+hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
+See also http://gcc.gnu.org/install/prerequisites.html for additional info.
+If you obtained GMP and/or MPFR from a vendor distribution package, make
+sure that you have installed both the libraries and the header files.
+They may be located in separate packages." >&5
+echo "$as_me: error: Building GCC requires GMP 4.1+ and MPFR 2.2.1+.
+Try the --with-gmp and/or --with-mpfr options to specify their locations.
+Copies of these libraries' source code can be found at their respective
+hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
+See also http://gcc.gnu.org/install/prerequisites.html for additional info.
+If you obtained GMP and/or MPFR from a vendor distribution package, make
+sure that you have installed both the libraries and the header files.
+They may be located in separate packages." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
# Flags needed for both GMP and/or MPFR
@@ -2371,8 +4608,7 @@ fi
# By default, C is the only stage 1 language.
-stage1_languages=c
-
+stage1_languages=,c,
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
@@ -2434,9 +4670,9 @@ if test -d ${srcdir}/gcc; then
esac
done
- new_enable_languages=c
+ new_enable_languages=,c,
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
- potential_languages=c
+ potential_languages=,c,
for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
case ${lang_frag} in
@@ -2445,75 +4681,90 @@ if test -d ${srcdir}/gcc; then
# an apparent bug in bash 1.12 on linux.
${srcdir}/gcc/[*]/config-lang.in) ;;
*)
- # From the config-lang.in, get $language, $target_libs,
+ # From the config-lang.in, get $language, $target_libs,
# $lang_dirs, $boot_language, and $build_by_default
language=
target_libs=
lang_dirs=
- boot_language=
- build_by_default=
- need_gmp=
+ subdir_requires=
+ boot_language=no
+ build_by_default=yes
. ${lang_frag}
- potential_languages="${potential_languages},${language}"
- # This is quite sensitive to the ordering of the case statement arms.
- case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
- *::*:*)
- echo "${lang_frag} doesn't set \$language." 1>&2
- exit 1
- ;;
- *:ada:no:*)
- # Ada was requested with no preexisting GNAT. Disable unconditionally.
- add_this_lang=no
- ;;
- *,${language},*:*:*:*)
+ if test x${language} = x; then
+ echo "${lang_frag} doesn't set \$language." 1>&2
+ exit 1
+ fi
+
+ case ,${enable_languages}, in
+ *,${language},*)
# Language was explicitly selected; include it.
add_this_lang=yes
;;
- *,all,*:*:*:no)
- # 'all' was selected, but this is not a default language
- # so do not include it.
- add_this_lang=no
- ;;
- *,all,*:*:*:*)
- # 'all' was selected and this is a default language; include it.
- add_this_lang=yes
+ *,all,*)
+ # 'all' was selected, select it if it is a default language
+ add_this_lang=${build_by_default}
;;
*)
add_this_lang=no
;;
esac
- # Disable languages that need GMP if it isn't available.
- case ,${enable_languages},:${have_gmp}:${need_gmp} in
- *,${language},*:no:yes)
+ # Disable languages that need other directories if these aren't available.
+ for i in $subdir_requires; do
+ test -f "$srcdir/gcc/$i/config-lang.in" && continue
+ case ,${enable_languages}, in
+ *,${language},*)
+ # Specifically requested language; tell them.
+ { { echo "$as_me:$LINENO: error: The gcc/$i directory contains parts of $language but is missing" >&5
+echo "$as_me: error: The gcc/$i directory contains parts of $language but is missing" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ *)
+ # Silently disable.
+ add_this_lang=unsupported
+ ;;
+ esac
+ done
+
+ # Disable Ada if no preexisting GNAT is available.
+ case ,${enable_languages},:${language}:${have_gnat} in
+ *,${language},*:ada:no)
# Specifically requested language; tell them.
- { echo "configure: error: GMP with MPFR support is required to build $language" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: GNAT is required to build $language" >&5
+echo "$as_me: error: GNAT is required to build $language" >&2;}
+ { (exit 1); exit 1; }; }
;;
- *:no:yes)
+ *:ada:no)
# Silently disable.
- add_this_lang=no
+ add_this_lang=unsupported
;;
esac
# Disable a language that is unsupported by the target.
case " $unsupported_languages " in
*" $language "*)
- add_this_lang=no
+ add_this_lang=unsupported
;;
esac
case $add_this_lang in
- no)
+ unsupported)
# Remove language-dependent dirs.
eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
;;
- *)
- new_enable_languages="$new_enable_languages,$language"
+ no)
+ # Remove language-dependent dirs; still show language as supported.
+ eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
+ potential_languages="${potential_languages}${language},"
+ ;;
+ yes)
+ new_enable_languages="${new_enable_languages}${language},"
+ potential_languages="${potential_languages}${language},"
missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
case ${boot_language} in
yes)
# Add to (comma-separated) list of stage 1 languages.
- stage1_languages="${stage1_languages},${language}"
+ stage1_languages="${stage1_languages}${language},"
;;
esac
;;
@@ -2522,18 +4773,61 @@ if test -d ${srcdir}/gcc; then
esac
done
+ # Check whether --enable-stage1-languages or --disable-stage1-languages was given.
+if test "${enable_stage1_languages+set}" = set; then
+ enableval="$enable_stage1_languages"
+ case ,${enable_stage1_languages}, in
+ ,no,|,,)
+ # Set it to something that will have no effect in the loop below
+ enable_stage1_languages=c ;;
+ ,yes,)
+ enable_stage1_languages=`echo $new_enable_languages | \
+ sed -e "s/^,//" -e "s/,$//" ` ;;
+ *,all,*)
+ enable_stage1_languages=`echo ,$enable_stage1_languages, | \
+ sed -e "s/,all,/$new_enable_languages/" -e "s/^,//" -e "s/,$//" ` ;;
+ esac
+
+ # Add "good" languages from enable_stage1_languages to stage1_languages,
+ # while "bad" languages go in missing_languages. Leave no duplicates.
+ for i in `echo $enable_stage1_languages | sed 's/,/ /g' `; do
+ case $potential_languages in
+ *,$i,*)
+ case $stage1_languages in
+ *,$i,*) ;;
+ *) stage1_languages="$stage1_languages$i," ;;
+ esac ;;
+ *)
+ case $missing_languages in
+ *,$i,*) ;;
+ *) missing_languages="$missing_languages$i," ;;
+ esac ;;
+ esac
+ done
+fi;
+
+ # Remove leading/trailing commas that were added for simplicity
+ potential_languages=`echo "$potential_languages" | sed -e "s/^,//" -e "s/,$//"`
missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
+ stage1_languages=`echo "$stage1_languages" | sed -e "s/^,//" -e "s/,$//"`
+ new_enable_languages=`echo "$new_enable_languages" | sed -e "s/^,//" -e "s/,$//"`
+
if test "x$missing_languages" != x; then
- { echo "configure: error:
+ { { echo "$as_me:$LINENO: error:
+The following requested languages could not be built: ${missing_languages}
+Supported languages are: ${potential_languages}" >&5
+echo "$as_me: error:
The following requested languages could not be built: ${missing_languages}
-Recognised languages are: ${potential_languages}" 1>&2; exit 1; }
+Supported languages are: ${potential_languages}" >&2;}
+ { (exit 1); exit 1; }; }
fi
-
if test "x$new_enable_languages" != "x$enable_languages"; then
echo The following languages will be built: ${new_enable_languages}
+ enable_languages="$new_enable_languages"
fi
- enable_languages="$new_enable_languages"
- ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[^ ]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
+
+
+ ac_configure_args=`echo " $ac_configure_args" | sed -e "s/ '--enable-languages=[^ ]*'//g" -e "s/$/ '--enable-languages="$enable_languages"'/" `
fi
# Handle --disable-<component> generically.
@@ -2544,6 +4838,32 @@ for dir in $configdirs $build_configdirs $target_configdirs ; do
fi
done
+# Check for Boehm's garbage collector
+# Check whether --enable-objc-gc or --disable-objc-gc was given.
+if test "${enable_objc_gc+set}" = set; then
+ enableval="$enable_objc_gc"
+ case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
+ *,objc,*:*:yes:*target-boehm-gc*)
+ { { echo "$as_me:$LINENO: error: Boehm's garbage collector was requested yet not supported in this configuration" >&5
+echo "$as_me: error: Boehm's garbage collector was requested yet not supported in this configuration" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+fi;
+
+# Make sure we only build Boehm's garbage collector if required.
+case ,${enable_languages},:${enable_objc_gc} in
+ *,objc,*:yes)
+ # Keep target-boehm-gc if requested for Objective-C.
+ ;;
+ *)
+ # Otherwise remove target-boehm-gc depending on target-libjava.
+ if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
+ noconfigdirs="$noconfigdirs target-boehm-gc"
+ fi
+ ;;
+esac
+
# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
# $build_configdirs and $target_configdirs.
# If we have the source for $noconfigdirs entries, add them to $notsupp.
@@ -2585,10 +4905,14 @@ done
# Sometimes the tools are distributed with libiberty but with no other
# libraries. In that case, we don't want to build target-libiberty.
+# Don't let libgcc imply libiberty either.
if test -n "${target_configdirs}" ; then
+ libgcc=
others=
for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
- if test "$i" != "libiberty" ; then
+ if test "$i" = "libgcc"; then
+ libgcc=target-libgcc
+ elif test "$i" != "libiberty" ; then
if test -r $srcdir/$i/configure ; then
others=yes;
break;
@@ -2596,7 +4920,7 @@ if test -n "${target_configdirs}" ; then
fi
done
if test -z "${others}" ; then
- target_configdirs=
+ target_configdirs=$libgcc
fi
fi
@@ -2606,7 +4930,7 @@ fi
build_configdirs_all="$build_configdirs"
build_configdirs=
for i in ${build_configdirs_all} ; do
- j=`echo $i | sed -e s/build-//g`
+ j=`echo $i | sed -e s/build-//g`
if test -f ${srcdir}/$j/configure ; then
build_configdirs="${build_configdirs} $i"
fi
@@ -2623,7 +4947,7 @@ done
target_configdirs_all="$target_configdirs"
target_configdirs=
for i in ${target_configdirs_all} ; do
- j=`echo $i | sed -e s/target-//g`
+ j=`echo $i | sed -e s/target-//g`
if test -f ${srcdir}/$j/configure ; then
target_configdirs="${target_configdirs} $i"
fi
@@ -2669,8 +4993,57 @@ case "$host" in
enable_gdbtk=no ;;
esac
+# To find our prefix, in gcc_cv_tool_prefix.
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+
+if test "x$exec_prefix" = xNONE; then
+ if test "x$prefix" = xNONE; then
+ gcc_cv_tool_prefix=$ac_default_prefix
+ else
+ gcc_cv_tool_prefix=$prefix
+ fi
+else
+ gcc_cv_tool_prefix=$exec_prefix
+fi
+
+# If there is no compiler in the tree, use the PATH only. In any
+# case, if there is no compiler in the tree nobody should use
+# AS_FOR_TARGET and LD_FOR_TARGET.
+if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
+ gcc_version=`cat $srcdir/gcc/BASE-VER`
+ gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
+ gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
+ gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
+ gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR"
+ gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
+ gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR"
+else
+ gcc_cv_tool_dirs=
+fi
+
+if test x$build = x$target && test -n "$md_exec_prefix"; then
+ gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR"
+fi
+
+
+
copy_dirs=
+
# Check whether --with-build-sysroot or --without-build-sysroot was given.
if test "${with_build_sysroot+set}" = set; then
withval="$with_build_sysroot"
@@ -2679,8 +5052,7 @@ if test "${with_build_sysroot+set}" = set; then
fi
else
SYSROOT_CFLAGS_FOR_TARGET=
-fi
-
+fi;
# Handle --with-headers=XXX. If the value is not "yes", the contents of
@@ -2691,11 +5063,8 @@ if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
exit 1
fi
if test x"${with_headers}" != xyes ; then
- case "${exec_prefixoption}" in
- "") x=${prefix} ;;
- *) x=${exec_prefix} ;;
- esac
- copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
+ x=${gcc_cv_tool_prefix}
+ copy_dirs="${copy_dirs} ${with_headers} $x/${target_noncanonical}/sys-include"
fi
fi
@@ -2710,12 +5079,9 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
if test x"${with_libs}" != xyes ; then
# Copy the libraries in reverse order, so that files in the first named
# library override files in subsequent libraries.
- case "${exec_prefixoption}" in
- "") x=${prefix} ;;
- *) x=${exec_prefix} ;;
- esac
+ x=${gcc_cv_tool_prefix}
for l in ${with_libs}; do
- copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
+ copy_dirs="$l $x/${target_noncanonical}/lib ${copy_dirs}"
done
fi
fi
@@ -2725,11 +5091,11 @@ fi
# This is done by determining whether or not the appropriate directory
# is available, and by checking whether or not specific configurations
# have requested that this magic not happen.
-#
-# The command line options always override the explicit settings in
+#
+# The command line options always override the explicit settings in
# configure.in, and the settings in configure.in override this magic.
#
-# If the default for a toolchain is to use GNU as and ld, and you don't
+# If the default for a toolchain is to use GNU as and ld, and you don't
# want to do that, then you should use the --without-gnu-as and
# --without-gnu-ld options for the configure script.
@@ -2838,6 +5204,12 @@ extra_nmflags_for_target=
extra_ranlibflags_for_target=
target_makefile_frag=/dev/null
case "${target}" in
+ mep*-*-*)
+ target_makefile_frag="config/mt-mep"
+ ;;
+ spu-*-*)
+ target_makefile_frag="config/mt-spu"
+ ;;
*-*-netware*)
target_makefile_frag="config/mt-netware"
;;
@@ -2845,7 +5217,7 @@ case "${target}" in
target_makefile_frag="config/mt-gnu"
;;
*-*-aix4.[3456789]* | *-*-aix[56789].*)
- # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
+ # nm and ar from AIX 4.3 and above require -X32_64 flag to all ar and nm
# commands to handle both 32-bit and 64-bit objects. These flags are
# harmless if we're using GNU nm or ar.
extra_arflags_for_target=" -X32_64"
@@ -2905,14 +5277,14 @@ fi
# hpux11 in 64bit mode has libraries in a weird place. Arrange to find
# them automatically.
case "${host}" in
- hppa*64*-*-hpux11*)
+ hppa*64*-*-hpux11*)
extra_host_args="$extra_host_args -x-libraries=/usr/lib/pa20_64 -x-includes=/usr/X11R6/include"
;;
esac
# Some systems (e.g., one of the i386-aix systems the gas testers are
# using) don't handle "\$" correctly, so don't use it here.
-tooldir='${exec_prefix}'/${target_alias}
+tooldir='${exec_prefix}'/${target_noncanonical}
build_tooldir=${tooldir}
# Create a .gdbinit file which runs the one in srcdir
@@ -2942,7 +5314,7 @@ if test $? = 0 ; then
if test -s conftest || test -s conftest.exe ; then
we_are_ok=yes
fi
-fi
+fi
case $we_are_ok in
no)
echo 1>&2 "*** The command '${CC} -o conftest ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} conftest.c' failed."
@@ -3036,11 +5408,10 @@ INSTALL_GDB_TK=`echo ${GDB_TK} | sed s/-all-/-install-/g`
# Check whether --enable-bootstrap or --disable-bootstrap was given.
if test "${enable_bootstrap+set}" = set; then
enableval="$enable_bootstrap"
- :
+
else
enable_bootstrap=default
-fi
-
+fi;
# Issue errors and warnings for invalid/strange bootstrap combinations.
case "$configdirs" in
@@ -3066,16 +5437,21 @@ case "$have_compiler:$host:$target:$enable_bootstrap" in
# Other configurations, but we have a compiler. Assume the user knows
# what he's doing.
yes:*:*:yes)
- echo "configure: warning: trying to bootstrap a cross compiler" 1>&2
+ { echo "$as_me:$LINENO: WARNING: trying to bootstrap a cross compiler" >&5
+echo "$as_me: WARNING: trying to bootstrap a cross compiler" >&2;}
;;
# No compiler: if they passed --enable-bootstrap explicitly, fail
no:*:*:yes)
- { echo "configure: error: cannot bootstrap without a compiler" 1>&2; exit 1; } ;;
+ { { echo "$as_me:$LINENO: error: cannot bootstrap without a compiler" >&5
+echo "$as_me: error: cannot bootstrap without a compiler" >&2;}
+ { (exit 1); exit 1; }; } ;;
# Fail if wrong command line
*)
- { echo "configure: error: invalid option for --enable-bootstrap" 1>&2; exit 1; }
+ { { echo "$as_me:$LINENO: error: invalid option for --enable-bootstrap" >&5
+echo "$as_me: error: invalid option for --enable-bootstrap" >&2;}
+ { (exit 1); exit 1; }; }
;;
esac
@@ -3101,7 +5477,7 @@ for module in ${build_configdirs} ; do
done
for module in ${configdirs} ; do
if test -z "${no_recursion}"; then
- for file in stage*-${module}/Makefile ${module}/Makefile; do
+ for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
if test -f ${file}; then
echo 1>&2 "*** removing ${file} to force reconfigure"
rm -f ${file}
@@ -3135,9 +5511,8 @@ extrasub="$extrasub
# Check whether --enable-serial-configure or --disable-serial-configure was given.
if test "${enable_serial_configure+set}" = set; then
enableval="$enable_serial_configure"
- :
-fi
+fi;
case ${enable_serial_configure} in
yes)
@@ -3182,46 +5557,93 @@ serialization_dependencies=serdep.tmp
# Base args. Strip norecursion, cache-file, srcdir, host, build,
-# target and nonopt. These are the ones we might not want to pass
-# down to subconfigures. Also strip program-prefix, program-suffix,
-# and program-transform-name, so that we can pass down a consistent
-# program-transform-name. If autoconf has put single quotes around
-# any of these arguments (because they contain shell metacharacters)
-# then this will fail; in practice this only happens for
-# --program-transform-name, so be sure to override --program-transform-name
-# at the end of the argument list.
-# These will be expanded by make, so quote '$'.
-cat <<\EOF_SED > conftestsed
-s/ --no[^ ]*/ /g
-s/ --c[a-z-]*[= ][^ ]*//g
-s/ --sr[a-z-]*[= ][^ ]*//g
-s/ --ho[a-z-]*[= ][^ ]*//g
-s/ --bu[a-z-]*[= ][^ ]*//g
-s/ --t[a-z-]*[= ][^ ]*//g
-s/ --program-[pst][a-z-]*[= ][^ ]*//g
-s/ -cache-file[= ][^ ]*//g
-s/ -srcdir[= ][^ ]*//g
-s/ -host[= ][^ ]*//g
-s/ -build[= ][^ ]*//g
-s/ -target[= ][^ ]*//g
-s/ -program-prefix[= ][^ ]*//g
-s/ -program-suffix[= ][^ ]*//g
-s/ -program-transform-name[= ][^ ]*//g
-s/ [^' -][^ ]* / /
-s/^ *//;s/ *$//
-s,\$,$$,g
-EOF_SED
-sed -f conftestsed <<EOF_SED > conftestsed.out
- ${ac_configure_args}
-EOF_SED
-baseargs=`cat conftestsed.out`
-rm -f conftestsed conftestsed.out
+# target, nonopt, and variable assignments. These are the ones we
+# might not want to pass down to subconfigures. Also strip
+# program-prefix, program-suffix, and program-transform-name, so that
+# we can pass down a consistent program-transform-name.
+baseargs=
+keep_next=no
+skip_next=no
+eval "set -- $ac_configure_args"
+for ac_arg
+do
+ if test X"$skip_next" = X"yes"; then
+ skip_next=no
+ continue
+ fi
+ if test X"$keep_next" = X"yes"; then
+ case $ac_arg in
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ baseargs="$baseargs '$ac_arg'"
+ keep_next=no
+ continue
+ fi
+
+ # Handle separated arguments. Based on the logic generated by
+ # autoconf 2.59.
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ separate_arg=no
+ ;;
+ -*)
+ separate_arg=yes
+ ;;
+ *)
+ separate_arg=no
+ ;;
+ esac
+
+ case "$ac_arg" in
+ --no*)
+ continue
+ ;;
+ --c* | \
+ --sr* | \
+ --ho* | \
+ --bu* | \
+ --t* | \
+ --program-* | \
+ -cache_file* | \
+ -srcdir* | \
+ -host* | \
+ -build* | \
+ -target* | \
+ -program-prefix* | \
+ -program-suffix* | \
+ -program-transform-name* )
+ skip_next=$separate_arg
+ continue
+ ;;
+ -*)
+ # An option. Add it.
+ case $ac_arg in
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ baseargs="$baseargs '$ac_arg'"
+ keep_next=$separate_arg
+ ;;
+ *)
+ # Either a variable assignment, or a nonopt (triplet). Don't
+ # pass it down; let the Makefile handle this.
+ continue
+ ;;
+ esac
+done
+# Remove the initial space we just introduced and, as these will be
+# expanded by make, quote '$'.
+baseargs=`echo "x$baseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
# Add in --program-transform-name, after --program-prefix and
# --program-suffix have been applied to it. Autoconf has already
# doubled dollar signs and backslashes in program_transform_name; we want
# the backslashes un-doubled, and then the entire thing wrapped in single
-# quotes, because this will be expanded first by make and then by the shell.
+# quotes, because this will be expanded first by make and then by the shell.
# Also, because we want to override the logic in subdir configure scripts to
# choose program_transform_name, replace any s,x,x, with s,y,y,.
sed -e "s,\\\\\\\\,\\\\,g; s,','\\\\'',g; s/s,x,x,/s,y,y,/" <<EOF_SED > conftestsed.out
@@ -3234,7 +5656,7 @@ baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
# 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.
-build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
+build_configargs="--cache-file=../config.cache ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@@ -3248,7 +5670,7 @@ esac
# Host dirs don't like to share a cache file either, horribly enough.
# This seems to be due to autoconf 2.5x stupidity.
-host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
+host_configargs="--cache-file=./config.cache ${extra_host_args} ${baseargs}"
target_configargs=${baseargs}
@@ -3258,7 +5680,7 @@ target_configargs=${baseargs}
# sorts of decisions they want to make on this basis. Please consider
# this option to be deprecated. FIXME.
if test x${is_cross_compiler} = xyes ; then
- target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
+ target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
fi
# Default to --enable-multilib.
@@ -3284,7 +5706,7 @@ fi
# Pass the appropriate --build, --host, --target and --cache-file arguments.
# We need to pass --target, as newer autoconf's requires consistency
# for target_alias and gcc doesn't manage it consistently.
-target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
+target_configargs="--cache-file=./config.cache ${target_configargs}"
FLAGS_FOR_TARGET=
case " $target_configdirs " in
@@ -3336,6 +5758,11 @@ case " $target_configdirs " in
esac
;;
esac
+case "$target" in
+*-mingw*)
+ # Can't be handled as Cygwin above since Mingw does not use newlib.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include' ;;
+esac
# Allow the user to override the flags for
# our build compiler if desired.
@@ -3356,6 +5783,23 @@ if test "x${use_gnu_ld}" = x &&
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
fi
+# Search for other target-specific linker scripts and such.
+case "${target}" in
+ m32c-*-* )
+ if test -d ${srcdir}/libgloss/m32c; then
+ # This is for crt0.o
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c'
+ # This is for r8c.ld
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c'
+ # This is for libnosys.a
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
+ fi
+ ;;
+ mep*)
+ FLAGS_FOR_TARGET="$FLAGS_FOR_TARGET -mlibrary"
+ ;;
+esac
+
# Makefile fragments.
for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
do
@@ -3400,36 +5844,42 @@ MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing
for ac_prog in 'bison -y' byacc yacc
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:3407: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_YACC="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_YACC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-YACC="$ac_cv_prog_YACC"
+YACC=$ac_cv_prog_YACC
if test -n "$YACC"; then
- echo "$ac_t""$YACC" 1>&6
+ echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$YACC" && break
+ test -n "$YACC" && break
done
test -n "$YACC" || YACC="$MISSING bison -y"
@@ -3440,36 +5890,42 @@ esac
for ac_prog in bison
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:3447: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_BISON+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$BISON"; then
ac_cv_prog_BISON="$BISON" # 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_BISON="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_BISON="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-BISON="$ac_cv_prog_BISON"
+BISON=$ac_cv_prog_BISON
if test -n "$BISON"; then
- echo "$ac_t""$BISON" 1>&6
+ echo "$as_me:$LINENO: result: $BISON" >&5
+echo "${ECHO_T}$BISON" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$BISON" && break
+ test -n "$BISON" && break
done
test -n "$BISON" || BISON="$MISSING bison"
@@ -3479,36 +5935,42 @@ esac
for ac_prog in gm4 gnum4 m4
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:3486: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_M4'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_M4+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$M4"; then
ac_cv_prog_M4="$M4" # 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_M4="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_M4="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-M4="$ac_cv_prog_M4"
+M4=$ac_cv_prog_M4
if test -n "$M4"; then
- echo "$ac_t""$M4" 1>&6
+ echo "$as_me:$LINENO: result: $M4" >&5
+echo "${ECHO_T}$M4" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$M4" && break
+ test -n "$M4" && break
done
test -n "$M4" || M4="$MISSING m4"
@@ -3518,36 +5980,42 @@ esac
for ac_prog in flex lex
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:3525: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LEX"; then
ac_cv_prog_LEX="$LEX" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_LEX="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LEX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LEX="$ac_cv_prog_LEX"
+LEX=$ac_cv_prog_LEX
if test -n "$LEX"; then
- echo "$ac_t""$LEX" 1>&6
+ echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$LEX" && break
+ test -n "$LEX" && break
done
test -n "$LEX" || LEX="$MISSING flex"
@@ -3558,36 +6026,42 @@ esac
for ac_prog in flex
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:3565: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_FLEX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$FLEX"; then
ac_cv_prog_FLEX="$FLEX" # 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_FLEX="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_FLEX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-FLEX="$ac_cv_prog_FLEX"
+FLEX=$ac_cv_prog_FLEX
if test -n "$FLEX"; then
- echo "$ac_t""$FLEX" 1>&6
+ echo "$as_me:$LINENO: result: $FLEX" >&5
+echo "${ECHO_T}$FLEX" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$FLEX" && break
+ test -n "$FLEX" && break
done
test -n "$FLEX" || FLEX="$MISSING flex"
@@ -3597,36 +6071,42 @@ esac
for ac_prog in makeinfo
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:3604: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEINFO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_MAKEINFO="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-MAKEINFO="$ac_cv_prog_MAKEINFO"
+MAKEINFO=$ac_cv_prog_MAKEINFO
if test -n "$MAKEINFO"; then
- echo "$ac_t""$MAKEINFO" 1>&6
+ echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+echo "${ECHO_T}$MAKEINFO" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$MAKEINFO" && break
+ test -n "$MAKEINFO" && break
done
test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
@@ -3650,36 +6130,42 @@ esac
for ac_prog in expect
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:3657: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_EXPECT'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_EXPECT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$EXPECT"; then
ac_cv_prog_EXPECT="$EXPECT" # 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_EXPECT="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_EXPECT="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-EXPECT="$ac_cv_prog_EXPECT"
+EXPECT=$ac_cv_prog_EXPECT
if test -n "$EXPECT"; then
- echo "$ac_t""$EXPECT" 1>&6
+ echo "$as_me:$LINENO: result: $EXPECT" >&5
+echo "${ECHO_T}$EXPECT" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$EXPECT" && break
+ test -n "$EXPECT" && break
done
test -n "$EXPECT" || EXPECT="expect"
@@ -3691,42 +6177,48 @@ esac
for ac_prog in runtest
do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
+ # 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:3698: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RUNTEST'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RUNTEST+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RUNTEST"; then
ac_cv_prog_RUNTEST="$RUNTEST" # 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_RUNTEST="$ac_prog"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RUNTEST="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RUNTEST="$ac_cv_prog_RUNTEST"
+RUNTEST=$ac_cv_prog_RUNTEST
if test -n "$RUNTEST"; then
- echo "$ac_t""$RUNTEST" 1>&6
+ echo "$as_me:$LINENO: result: $RUNTEST" >&5
+echo "${ECHO_T}$RUNTEST" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-test -n "$RUNTEST" && break
+ test -n "$RUNTEST" && break
done
test -n "$RUNTEST" || RUNTEST="runtest"
case " $configdirs " in
*" dejagnu "*)
- test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
+ test $host = $build && RUNTEST='$$s/$(HOST_SUBDIR)/dejagnu/runtest'
;;
esac
@@ -3737,68 +6229,128 @@ test -n "$host_alias" && ncn_tool_prefix=$host_alias-
ncn_target_tool_prefix=
test -n "$target_alias" && ncn_target_tool_prefix=$target_alias-
- for ncn_progname in ar; do
+
+
+if test -n "$AR"; then
+ ac_cv_prog_AR=$AR
+elif test -n "$ac_cv_prog_AR"; then
+ AR=$ac_cv_prog_AR
+fi
+
+if test -n "$ac_cv_prog_AR"; then
+ for ncn_progname in ar; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in ar; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3746: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AR="$ac_cv_prog_AR"
+AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_AR" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3777: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AR="$ac_cv_prog_AR"
+AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$ac_t""$AR" 1>&6
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_AR" && break
done
@@ -3812,68 +6364,128 @@ if test -z "$ac_cv_prog_AR" ; then
fi
fi
- for ncn_progname in as; do
+
+
+if test -n "$AS"; then
+ ac_cv_prog_AS=$AS
+elif test -n "$ac_cv_prog_AS"; then
+ AS=$ac_cv_prog_AS
+fi
+
+if test -n "$ac_cv_prog_AS"; then
+ for ncn_progname in as; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in as; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3821: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AS"; then
ac_cv_prog_AS="$AS" # 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_AS="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AS="$ac_cv_prog_AS"
+AS=$ac_cv_prog_AS
if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
+ echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_AS" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3852: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AS"; then
ac_cv_prog_AS="$AS" # 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_AS="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AS="$ac_cv_prog_AS"
+AS=$ac_cv_prog_AS
if test -n "$AS"; then
- echo "$ac_t""$AS" 1>&6
+ echo "$as_me:$LINENO: result: $AS" >&5
+echo "${ECHO_T}$AS" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_AS" && break
done
@@ -3887,68 +6499,128 @@ if test -z "$ac_cv_prog_AS" ; then
fi
fi
- for ncn_progname in dlltool; do
+
+
+if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL=$DLLTOOL
+elif test -n "$ac_cv_prog_DLLTOOL"; then
+ DLLTOOL=$ac_cv_prog_DLLTOOL
+fi
+
+if test -n "$ac_cv_prog_DLLTOOL"; then
+ for ncn_progname in dlltool; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ echo "$as_me:$LINENO: result: $DLLTOOL" >&5
+echo "${ECHO_T}$DLLTOOL" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in dlltool; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3896: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
+DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
+ echo "$as_me:$LINENO: result: $DLLTOOL" >&5
+echo "${ECHO_T}$DLLTOOL" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_DLLTOOL" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3927: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$DLLTOOL"; then
ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-DLLTOOL="$ac_cv_prog_DLLTOOL"
+DLLTOOL=$ac_cv_prog_DLLTOOL
if test -n "$DLLTOOL"; then
- echo "$ac_t""$DLLTOOL" 1>&6
+ echo "$as_me:$LINENO: result: $DLLTOOL" >&5
+echo "${ECHO_T}$DLLTOOL" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_DLLTOOL" && break
done
@@ -3962,68 +6634,128 @@ if test -z "$ac_cv_prog_DLLTOOL" ; then
fi
fi
- for ncn_progname in ld; do
+
+
+if test -n "$LD"; then
+ ac_cv_prog_LD=$LD
+elif test -n "$ac_cv_prog_LD"; then
+ LD=$ac_cv_prog_LD
+fi
+
+if test -n "$ac_cv_prog_LD"; then
+ for ncn_progname in ld; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LD"; then
+ ac_cv_prog_LD="$LD" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LD="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+LD=$ac_cv_prog_LD
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in ld; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3971: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LD"; then
ac_cv_prog_LD="$LD" # 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_LD="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LD="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LD="$ac_cv_prog_LD"
+LD=$ac_cv_prog_LD
if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_LD" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4002: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LD"; then
ac_cv_prog_LD="$LD" # 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_LD="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LD="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LD="$ac_cv_prog_LD"
+LD=$ac_cv_prog_LD
if test -n "$LD"; then
- echo "$ac_t""$LD" 1>&6
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_LD" && break
done
@@ -4037,68 +6769,128 @@ if test -z "$ac_cv_prog_LD" ; then
fi
fi
- for ncn_progname in lipo; do
+
+
+if test -n "$LIPO"; then
+ ac_cv_prog_LIPO=$LIPO
+elif test -n "$ac_cv_prog_LIPO"; then
+ LIPO=$ac_cv_prog_LIPO
+fi
+
+if test -n "$ac_cv_prog_LIPO"; then
+ for ncn_progname in lipo; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LIPO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ echo "$as_me:$LINENO: result: $LIPO" >&5
+echo "${ECHO_T}$LIPO" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in lipo; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4046: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LIPO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LIPO"; then
ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LIPO="$ac_cv_prog_LIPO"
+LIPO=$ac_cv_prog_LIPO
if test -n "$LIPO"; then
- echo "$ac_t""$LIPO" 1>&6
+ echo "$as_me:$LINENO: result: $LIPO" >&5
+echo "${ECHO_T}$LIPO" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_LIPO" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4077: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LIPO'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LIPO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LIPO"; then
ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LIPO="$ac_cv_prog_LIPO"
+LIPO=$ac_cv_prog_LIPO
if test -n "$LIPO"; then
- echo "$ac_t""$LIPO" 1>&6
+ echo "$as_me:$LINENO: result: $LIPO" >&5
+echo "${ECHO_T}$LIPO" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_LIPO" && break
done
@@ -4112,68 +6904,128 @@ if test -z "$ac_cv_prog_LIPO" ; then
fi
fi
- for ncn_progname in nm; do
+
+
+if test -n "$NM"; then
+ ac_cv_prog_NM=$NM
+elif test -n "$ac_cv_prog_NM"; then
+ NM=$ac_cv_prog_NM
+fi
+
+if test -n "$ac_cv_prog_NM"; then
+ for ncn_progname in nm; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NM"; then
+ ac_cv_prog_NM="$NM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NM="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+NM=$ac_cv_prog_NM
+if test -n "$NM"; then
+ echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in nm; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4121: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM"; then
ac_cv_prog_NM="$NM" # 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_NM="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NM="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-NM="$ac_cv_prog_NM"
+NM=$ac_cv_prog_NM
if test -n "$NM"; then
- echo "$ac_t""$NM" 1>&6
+ echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_NM" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4152: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM"; then
ac_cv_prog_NM="$NM" # 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_NM="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NM="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-NM="$ac_cv_prog_NM"
+NM=$ac_cv_prog_NM
if test -n "$NM"; then
- echo "$ac_t""$NM" 1>&6
+ echo "$as_me:$LINENO: result: $NM" >&5
+echo "${ECHO_T}$NM" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_NM" && break
done
@@ -4187,68 +7039,128 @@ if test -z "$ac_cv_prog_NM" ; then
fi
fi
- for ncn_progname in ranlib; do
+
+
+if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB=$RANLIB
+elif test -n "$ac_cv_prog_RANLIB"; then
+ RANLIB=$ac_cv_prog_RANLIB
+fi
+
+if test -n "$ac_cv_prog_RANLIB"; then
+ for ncn_progname in ranlib; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in ranlib; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4196: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_RANLIB" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4227: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB="$ac_cv_prog_RANLIB"
+RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$ac_t""$RANLIB" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_RANLIB" && break
done
@@ -4257,68 +7169,128 @@ if test -z "$ac_cv_prog_RANLIB" ; then
RANLIB=":"
fi
- for ncn_progname in strip; do
+
+
+if test -n "$STRIP"; then
+ ac_cv_prog_STRIP=$STRIP
+elif test -n "$ac_cv_prog_STRIP"; then
+ STRIP=$ac_cv_prog_STRIP
+fi
+
+if test -n "$ac_cv_prog_STRIP"; then
+ for ncn_progname in strip; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in strip; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4266: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-STRIP="$ac_cv_prog_STRIP"
+STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_STRIP" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4297: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-STRIP="$ac_cv_prog_STRIP"
+STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- echo "$ac_t""$STRIP" 1>&6
+ echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_STRIP" && break
done
@@ -4327,68 +7299,128 @@ if test -z "$ac_cv_prog_STRIP" ; then
STRIP=":"
fi
- for ncn_progname in windres; do
+
+
+if test -n "$WINDRES"; then
+ ac_cv_prog_WINDRES=$WINDRES
+elif test -n "$ac_cv_prog_WINDRES"; then
+ WINDRES=$ac_cv_prog_WINDRES
+fi
+
+if test -n "$ac_cv_prog_WINDRES"; then
+ for ncn_progname in windres; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_WINDRES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$WINDRES"; then
+ ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_WINDRES="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+WINDRES=$ac_cv_prog_WINDRES
+if test -n "$WINDRES"; then
+ echo "$as_me:$LINENO: result: $WINDRES" >&5
+echo "${ECHO_T}$WINDRES" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in windres; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4336: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_WINDRES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$WINDRES"; then
ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_WINDRES="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-WINDRES="$ac_cv_prog_WINDRES"
+WINDRES=$ac_cv_prog_WINDRES
if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
+ echo "$as_me:$LINENO: result: $WINDRES" >&5
+echo "${ECHO_T}$WINDRES" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_WINDRES" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4367: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_WINDRES+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$WINDRES"; then
ac_cv_prog_WINDRES="$WINDRES" # 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_WINDRES="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_WINDRES="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-WINDRES="$ac_cv_prog_WINDRES"
+WINDRES=$ac_cv_prog_WINDRES
if test -n "$WINDRES"; then
- echo "$ac_t""$WINDRES" 1>&6
+ echo "$as_me:$LINENO: result: $WINDRES" >&5
+echo "${ECHO_T}$WINDRES" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_WINDRES" && break
done
@@ -4402,68 +7434,128 @@ if test -z "$ac_cv_prog_WINDRES" ; then
fi
fi
- for ncn_progname in objcopy; do
+
+
+if test -n "$OBJCOPY"; then
+ ac_cv_prog_OBJCOPY=$OBJCOPY
+elif test -n "$ac_cv_prog_OBJCOPY"; then
+ OBJCOPY=$ac_cv_prog_OBJCOPY
+fi
+
+if test -n "$ac_cv_prog_OBJCOPY"; then
+ for ncn_progname in objcopy; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJCOPY+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$OBJCOPY"; then
+ ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJCOPY="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+OBJCOPY=$ac_cv_prog_OBJCOPY
+if test -n "$OBJCOPY"; then
+ echo "$as_me:$LINENO: result: $OBJCOPY" >&5
+echo "${ECHO_T}$OBJCOPY" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in objcopy; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4411: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJCOPY+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$OBJCOPY"; then
ac_cv_prog_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJCOPY="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-OBJCOPY="$ac_cv_prog_OBJCOPY"
+OBJCOPY=$ac_cv_prog_OBJCOPY
if test -n "$OBJCOPY"; then
- echo "$ac_t""$OBJCOPY" 1>&6
+ echo "$as_me:$LINENO: result: $OBJCOPY" >&5
+echo "${ECHO_T}$OBJCOPY" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_OBJCOPY" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4442: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJCOPY+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$OBJCOPY"; then
ac_cv_prog_OBJCOPY="$OBJCOPY" # 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_OBJCOPY="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJCOPY="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-OBJCOPY="$ac_cv_prog_OBJCOPY"
+OBJCOPY=$ac_cv_prog_OBJCOPY
if test -n "$OBJCOPY"; then
- echo "$ac_t""$OBJCOPY" 1>&6
+ echo "$as_me:$LINENO: result: $OBJCOPY" >&5
+echo "${ECHO_T}$OBJCOPY" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_OBJCOPY" && break
done
@@ -4477,68 +7569,128 @@ if test -z "$ac_cv_prog_OBJCOPY" ; then
fi
fi
- for ncn_progname in objdump; do
+
+
+if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP=$OBJDUMP
+elif test -n "$ac_cv_prog_OBJDUMP"; then
+ OBJDUMP=$ac_cv_prog_OBJDUMP
+fi
+
+if test -n "$ac_cv_prog_OBJDUMP"; then
+ for ncn_progname in objdump; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+echo "${ECHO_T}$OBJDUMP" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+for ncn_progname in objdump; do
if test -n "$ncn_tool_prefix"; then
# Extract the first word of "${ncn_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4486: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ncn_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
+OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
+ echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+echo "${ECHO_T}$OBJDUMP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_OBJDUMP" && test $build = $host ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4517: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$OBJDUMP"; then
ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-OBJDUMP="$ac_cv_prog_OBJDUMP"
+OBJDUMP=$ac_cv_prog_OBJDUMP
if test -n "$OBJDUMP"; then
- echo "$ac_t""$OBJDUMP" 1>&6
+ echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+echo "${ECHO_T}$OBJDUMP" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_OBJDUMP" && break
done
@@ -4559,6 +7711,7 @@ fi
# Target tools.
+
# Check whether --with-build-time-tools or --without-build-time-tools was given.
if test "${with_build_time_tools+set}" = set; then
withval="$with_build_time_tools"
@@ -4566,24 +7719,74 @@ if test "${with_build_time_tools+set}" = set; then
x/*) ;;
*)
with_build_time_tools=
- echo "configure: warning: argument to --with-build-time-tools must be an absolute path" 1>&2
+ { echo "$as_me:$LINENO: WARNING: argument to --with-build-time-tools must be an absolute path" >&5
+echo "$as_me: WARNING: argument to --with-build-time-tools must be an absolute path" >&2;}
;;
esac
else
with_build_time_tools=
+fi;
+
+
+
+if test -n "$CC_FOR_TARGET"; then
+ ac_cv_prog_CC_FOR_TARGET=$CC_FOR_TARGET
+elif test -n "$ac_cv_prog_CC_FOR_TARGET"; then
+ CC_FOR_TARGET=$ac_cv_prog_CC_FOR_TARGET
fi
+if test -n "$ac_cv_prog_CC_FOR_TARGET"; then
+ for ncn_progname in cc gcc; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC_FOR_TARGET"; then
+ ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC_FOR_TARGET=$ac_cv_prog_CC_FOR_TARGET
+if test -n "$CC_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $CC_FOR_TARGET" >&5
+echo "${ECHO_T}$CC_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
- if test -n "$with_build_time_tools"; then
+ done
+fi
+
+if test -z "$ac_cv_prog_CC_FOR_TARGET" && test -n "$with_build_time_tools"; then
for ncn_progname in cc gcc; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4581: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_CC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -4593,69 +7796,81 @@ if test -z "$ac_cv_prog_CC_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4598: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC_FOR_TARGET"; then
ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # 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_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
+CC_FOR_TARGET=$ac_cv_prog_CC_FOR_TARGET
if test -n "$CC_FOR_TARGET"; then
- echo "$ac_t""$CC_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $CC_FOR_TARGET" >&5
+echo "${ECHO_T}$CC_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CC_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4629: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC_FOR_TARGET"; then
ac_cv_prog_CC_FOR_TARGET="$CC_FOR_TARGET" # 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_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
+CC_FOR_TARGET=$ac_cv_prog_CC_FOR_TARGET
if test -n "$CC_FOR_TARGET"; then
- echo "$ac_t""$CC_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $CC_FOR_TARGET" >&5
+echo "${ECHO_T}$CC_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_CC_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
set dummy cc gcc
if test $build = $target ; then
@@ -4663,18 +7878,70 @@ if test -z "$ac_cv_prog_CC_FOR_TARGET" ; then
else
CC_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ CC_FOR_TARGET="$ac_cv_prog_CC_FOR_TARGET"
+fi
+
+
+
+if test -n "$CXX_FOR_TARGET"; then
+ ac_cv_prog_CXX_FOR_TARGET=$CXX_FOR_TARGET
+elif test -n "$ac_cv_prog_CXX_FOR_TARGET"; then
+ CXX_FOR_TARGET=$ac_cv_prog_CXX_FOR_TARGET
fi
- if test -n "$with_build_time_tools"; then
+if test -n "$ac_cv_prog_CXX_FOR_TARGET"; then
for ncn_progname in c++ g++ cxx gxx; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4672: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX_FOR_TARGET"; then
+ ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CXX_FOR_TARGET=$ac_cv_prog_CXX_FOR_TARGET
+if test -n "$CXX_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $CXX_FOR_TARGET" >&5
+echo "${ECHO_T}$CXX_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in c++ g++ cxx gxx; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_CXX_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -4684,69 +7951,81 @@ if test -z "$ac_cv_prog_CXX_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4689: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CXX_FOR_TARGET"; then
ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # 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_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
+CXX_FOR_TARGET=$ac_cv_prog_CXX_FOR_TARGET
if test -n "$CXX_FOR_TARGET"; then
- echo "$ac_t""$CXX_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $CXX_FOR_TARGET" >&5
+echo "${ECHO_T}$CXX_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CXX_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4720: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CXX_FOR_TARGET"; then
ac_cv_prog_CXX_FOR_TARGET="$CXX_FOR_TARGET" # 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_CXX_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
+CXX_FOR_TARGET=$ac_cv_prog_CXX_FOR_TARGET
if test -n "$CXX_FOR_TARGET"; then
- echo "$ac_t""$CXX_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $CXX_FOR_TARGET" >&5
+echo "${ECHO_T}$CXX_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_CXX_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
set dummy c++ g++ cxx gxx
if test $build = $target ; then
@@ -4754,18 +8033,70 @@ if test -z "$ac_cv_prog_CXX_FOR_TARGET" ; then
else
CXX_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ CXX_FOR_TARGET="$ac_cv_prog_CXX_FOR_TARGET"
+fi
+
+
+
+if test -n "$GCC_FOR_TARGET"; then
+ ac_cv_prog_GCC_FOR_TARGET=$GCC_FOR_TARGET
+elif test -n "$ac_cv_prog_GCC_FOR_TARGET"; then
+ GCC_FOR_TARGET=$ac_cv_prog_GCC_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_GCC_FOR_TARGET"; then
+ for ncn_progname in gcc; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GCC_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$GCC_FOR_TARGET"; then
+ ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+GCC_FOR_TARGET=$ac_cv_prog_GCC_FOR_TARGET
+if test -n "$GCC_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $GCC_FOR_TARGET" >&5
+echo "${ECHO_T}$GCC_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
fi
- if test -n "$with_build_time_tools"; then
+if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test -n "$with_build_time_tools"; then
for ncn_progname in gcc; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4763: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_GCC_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -4775,83 +8106,147 @@ if test -z "$ac_cv_prog_GCC_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4780: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GCC_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$GCC_FOR_TARGET"; then
ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # 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_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GCC_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
+GCC_FOR_TARGET=$ac_cv_prog_GCC_FOR_TARGET
if test -n "$GCC_FOR_TARGET"; then
- echo "$ac_t""$GCC_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $GCC_FOR_TARGET" >&5
+echo "${ECHO_T}$GCC_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_GCC_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4811: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GCC_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GCC_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$GCC_FOR_TARGET"; then
ac_cv_prog_GCC_FOR_TARGET="$GCC_FOR_TARGET" # 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_GCC_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GCC_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
+GCC_FOR_TARGET=$ac_cv_prog_GCC_FOR_TARGET
if test -n "$GCC_FOR_TARGET"; then
- echo "$ac_t""$GCC_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $GCC_FOR_TARGET" >&5
+echo "${ECHO_T}$GCC_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_GCC_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_GCC_FOR_TARGET" ; then
GCC_FOR_TARGET="${CC_FOR_TARGET}"
+else
+ GCC_FOR_TARGET="$ac_cv_prog_GCC_FOR_TARGET"
+fi
+
+
+
+if test -n "$GCJ_FOR_TARGET"; then
+ ac_cv_prog_GCJ_FOR_TARGET=$GCJ_FOR_TARGET
+elif test -n "$ac_cv_prog_GCJ_FOR_TARGET"; then
+ GCJ_FOR_TARGET=$ac_cv_prog_GCJ_FOR_TARGET
fi
- if test -n "$with_build_time_tools"; then
+if test -n "$ac_cv_prog_GCJ_FOR_TARGET"; then
for ncn_progname in gcj; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4849: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GCJ_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$GCJ_FOR_TARGET"; then
+ ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+GCJ_FOR_TARGET=$ac_cv_prog_GCJ_FOR_TARGET
+if test -n "$GCJ_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $GCJ_FOR_TARGET" >&5
+echo "${ECHO_T}$GCJ_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in gcj; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_GCJ_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -4861,69 +8256,81 @@ if test -z "$ac_cv_prog_GCJ_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4866: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GCJ_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$GCJ_FOR_TARGET"; then
ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # 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_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GCJ_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
+GCJ_FOR_TARGET=$ac_cv_prog_GCJ_FOR_TARGET
if test -n "$GCJ_FOR_TARGET"; then
- echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $GCJ_FOR_TARGET" >&5
+echo "${ECHO_T}$GCJ_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_GCJ_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4897: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GCJ_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GCJ_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$GCJ_FOR_TARGET"; then
ac_cv_prog_GCJ_FOR_TARGET="$GCJ_FOR_TARGET" # 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_GCJ_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GCJ_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
+GCJ_FOR_TARGET=$ac_cv_prog_GCJ_FOR_TARGET
if test -n "$GCJ_FOR_TARGET"; then
- echo "$ac_t""$GCJ_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $GCJ_FOR_TARGET" >&5
+echo "${ECHO_T}$GCJ_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_GCJ_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
set dummy gcj
if test $build = $target ; then
@@ -4931,18 +8338,70 @@ if test -z "$ac_cv_prog_GCJ_FOR_TARGET" ; then
else
GCJ_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ GCJ_FOR_TARGET="$ac_cv_prog_GCJ_FOR_TARGET"
+fi
+
+
+
+if test -n "$GFORTRAN_FOR_TARGET"; then
+ ac_cv_prog_GFORTRAN_FOR_TARGET=$GFORTRAN_FOR_TARGET
+elif test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
+ GFORTRAN_FOR_TARGET=$ac_cv_prog_GFORTRAN_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
+ for ncn_progname in gfortran; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GFORTRAN_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$GFORTRAN_FOR_TARGET"; then
+ ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+GFORTRAN_FOR_TARGET=$ac_cv_prog_GFORTRAN_FOR_TARGET
+if test -n "$GFORTRAN_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $GFORTRAN_FOR_TARGET" >&5
+echo "${ECHO_T}$GFORTRAN_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
fi
- if test -n "$with_build_time_tools"; then
+if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test -n "$with_build_time_tools"; then
for ncn_progname in gfortran; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:4940: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_GFORTRAN_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -4952,69 +8411,81 @@ if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4957: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GFORTRAN_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$GFORTRAN_FOR_TARGET"; then
ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # 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_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
+GFORTRAN_FOR_TARGET=$ac_cv_prog_GFORTRAN_FOR_TARGET
if test -n "$GFORTRAN_FOR_TARGET"; then
- echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $GFORTRAN_FOR_TARGET" >&5
+echo "${ECHO_T}$GFORTRAN_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4988: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_GFORTRAN_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_GFORTRAN_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$GFORTRAN_FOR_TARGET"; then
ac_cv_prog_GFORTRAN_FOR_TARGET="$GFORTRAN_FOR_TARGET" # 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_GFORTRAN_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_GFORTRAN_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
+GFORTRAN_FOR_TARGET=$ac_cv_prog_GFORTRAN_FOR_TARGET
if test -n "$GFORTRAN_FOR_TARGET"; then
- echo "$ac_t""$GFORTRAN_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $GFORTRAN_FOR_TARGET" >&5
+echo "${ECHO_T}$GFORTRAN_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_GFORTRAN_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
set dummy gfortran
if test $build = $target ; then
@@ -5022,52 +8493,8 @@ if test -z "$ac_cv_prog_GFORTRAN_FOR_TARGET" ; then
else
GFORTRAN_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
-fi
-
-
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
-
-if test "x$exec_prefix" = xNONE; then
- if test "x$prefix" = xNONE; then
- gcc_cv_tool_prefix=$ac_default_prefix
- else
- gcc_cv_tool_prefix=$prefix
- fi
else
- gcc_cv_tool_prefix=$exec_prefix
-fi
-
-# If there is no compiler in the tree, use the PATH only. In any
-# case, if there is no compiler in the tree nobody should use
-# AS_FOR_TARGET and LD_FOR_TARGET.
-if test x$host = x$build && test -f $srcdir/gcc/BASE-VER; then
- gcc_version=`cat $srcdir/gcc/BASE-VER`
- gcc_cv_tool_dirs="$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/libexec/gcc/$target_noncanonical$PATH_SEPARATOR"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs/usr/lib/gcc/$target_noncanonical$PATH_SEPARATOR"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version$PATH_SEPARATOR"
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$gcc_cv_tool_prefix/$target_noncanonical/bin$PATH_SEPARATOR"
-else
- gcc_cv_tool_dirs=
-fi
-
-if test x$build = x$target && test -n "$md_exec_prefix"; then
- gcc_cv_tool_dirs="$gcc_cv_tool_dirs$md_exec_prefix$PATH_SEPARATOR"
+ GFORTRAN_FOR_TARGET="$ac_cv_prog_GFORTRAN_FOR_TARGET"
fi
@@ -5090,69 +8517,125 @@ rm conftest.c
if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for ar in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5095: checking for ar in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for ar in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ar in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/ar; then
AR_FOR_TARGET=`cd $with_build_time_tools && pwd`/ar
ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
- echo "$ac_t""$ac_cv_path_AR_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_AR_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_AR_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
AR_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ar`
- test $AR_FOR_TARGET=ar && AR_FOR_TARGET=
- ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
+ test $AR_FOR_TARGET = ar && AR_FOR_TARGET=
+ test -n "$AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET=$AR_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
+if test -z "$ac_cv_path_AR_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5113: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_AR_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$AR_FOR_TARGET" in
- /*)
+ case $AR_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_AR_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
+AR_FOR_TARGET=$ac_cv_path_AR_FOR_TARGET
+
if test -n "$AR_FOR_TARGET"; then
- echo "$ac_t""$AR_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $AR_FOR_TARGET" >&5
+echo "${ECHO_T}$AR_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_AR_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$AR_FOR_TARGET"; then
+ ac_cv_prog_AR_FOR_TARGET=$AR_FOR_TARGET
+elif test -n "$ac_cv_prog_AR_FOR_TARGET"; then
+ AR_FOR_TARGET=$ac_cv_prog_AR_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_AR_FOR_TARGET"; then
for ncn_progname in ar; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5150: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR_FOR_TARGET"; then
+ ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AR_FOR_TARGET=$ac_cv_prog_AR_FOR_TARGET
+if test -n "$AR_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $AR_FOR_TARGET" >&5
+echo "${ECHO_T}$AR_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_AR_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in ar; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_AR_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -5162,69 +8645,81 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5167: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR_FOR_TARGET"; then
ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
+AR_FOR_TARGET=$ac_cv_prog_AR_FOR_TARGET
if test -n "$AR_FOR_TARGET"; then
- echo "$ac_t""$AR_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $AR_FOR_TARGET" >&5
+echo "${ECHO_T}$AR_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_AR_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5198: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AR_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR_FOR_TARGET"; then
ac_cv_prog_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
+AR_FOR_TARGET=$ac_cv_prog_AR_FOR_TARGET
if test -n "$AR_FOR_TARGET"; then
- echo "$ac_t""$AR_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $AR_FOR_TARGET" >&5
+echo "${ECHO_T}$AR_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_AR_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
set dummy ar
if test $build = $target ; then
@@ -5232,6 +8727,8 @@ if test -z "$ac_cv_prog_AR_FOR_TARGET" ; then
else
AR_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ AR_FOR_TARGET="$ac_cv_prog_AR_FOR_TARGET"
fi
else
@@ -5243,69 +8740,125 @@ fi
if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for as in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5248: checking for as in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for as in $with_build_time_tools" >&5
+echo $ECHO_N "checking for as in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/as; then
AS_FOR_TARGET=`cd $with_build_time_tools && pwd`/as
ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
- echo "$ac_t""$ac_cv_path_AS_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_AS_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_AS_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
AS_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=as`
- test $AS_FOR_TARGET=as && AS_FOR_TARGET=
- ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
+ test $AS_FOR_TARGET = as && AS_FOR_TARGET=
+ test -n "$AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET=$AS_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
+if test -z "$ac_cv_path_AS_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "as", so it can be a program name with args.
set dummy as; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5266: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_AS_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$AS_FOR_TARGET" in
- /*)
+ case $AS_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_AS_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
+AS_FOR_TARGET=$ac_cv_path_AS_FOR_TARGET
+
if test -n "$AS_FOR_TARGET"; then
- echo "$ac_t""$AS_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $AS_FOR_TARGET" >&5
+echo "${ECHO_T}$AS_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_AS_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$AS_FOR_TARGET"; then
+ ac_cv_prog_AS_FOR_TARGET=$AS_FOR_TARGET
+elif test -n "$ac_cv_prog_AS_FOR_TARGET"; then
+ AS_FOR_TARGET=$ac_cv_prog_AS_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_AS_FOR_TARGET"; then
+ for ncn_progname in as; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AS_FOR_TARGET"; then
+ ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AS_FOR_TARGET=$ac_cv_prog_AS_FOR_TARGET
+if test -n "$AS_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $AS_FOR_TARGET" >&5
+echo "${ECHO_T}$AS_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_AS_FOR_TARGET" && test -n "$with_build_time_tools"; then
for ncn_progname in as; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5303: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_AS_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -5315,69 +8868,81 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5320: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AS_FOR_TARGET"; then
ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # 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_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
+AS_FOR_TARGET=$ac_cv_prog_AS_FOR_TARGET
if test -n "$AS_FOR_TARGET"; then
- echo "$ac_t""$AS_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $AS_FOR_TARGET" >&5
+echo "${ECHO_T}$AS_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_AS_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5351: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_AS_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AS_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AS_FOR_TARGET"; then
ac_cv_prog_AS_FOR_TARGET="$AS_FOR_TARGET" # 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_AS_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AS_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
+AS_FOR_TARGET=$ac_cv_prog_AS_FOR_TARGET
if test -n "$AS_FOR_TARGET"; then
- echo "$ac_t""$AS_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $AS_FOR_TARGET" >&5
+echo "${ECHO_T}$AS_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_AS_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
set dummy as
if test $build = $target ; then
@@ -5385,6 +8950,8 @@ if test -z "$ac_cv_prog_AS_FOR_TARGET" ; then
else
AS_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ AS_FOR_TARGET="$ac_cv_prog_AS_FOR_TARGET"
fi
else
@@ -5396,69 +8963,125 @@ fi
if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for dlltool in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5401: checking for dlltool in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for dlltool in $with_build_time_tools" >&5
+echo $ECHO_N "checking for dlltool in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/dlltool; then
DLLTOOL_FOR_TARGET=`cd $with_build_time_tools && pwd`/dlltool
ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
- echo "$ac_t""$ac_cv_path_DLLTOOL_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_DLLTOOL_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_DLLTOOL_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
DLLTOOL_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=dlltool`
- test $DLLTOOL_FOR_TARGET=dlltool && DLLTOOL_FOR_TARGET=
- ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
+ test $DLLTOOL_FOR_TARGET = dlltool && DLLTOOL_FOR_TARGET=
+ test -n "$DLLTOOL_FOR_TARGET" && ac_cv_path_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
+if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5419: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_DLLTOOL_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$DLLTOOL_FOR_TARGET" in
- /*)
+ case $DLLTOOL_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_DLLTOOL_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_DLLTOOL_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-DLLTOOL_FOR_TARGET="$ac_cv_path_DLLTOOL_FOR_TARGET"
+DLLTOOL_FOR_TARGET=$ac_cv_path_DLLTOOL_FOR_TARGET
+
if test -n "$DLLTOOL_FOR_TARGET"; then
- echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $DLLTOOL_FOR_TARGET" >&5
+echo "${ECHO_T}$DLLTOOL_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_DLLTOOL_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$DLLTOOL_FOR_TARGET"; then
+ ac_cv_prog_DLLTOOL_FOR_TARGET=$DLLTOOL_FOR_TARGET
+elif test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
+ DLLTOOL_FOR_TARGET=$ac_cv_prog_DLLTOOL_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
for ncn_progname in dlltool; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5456: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DLLTOOL_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DLLTOOL_FOR_TARGET"; then
+ ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+DLLTOOL_FOR_TARGET=$ac_cv_prog_DLLTOOL_FOR_TARGET
+if test -n "$DLLTOOL_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $DLLTOOL_FOR_TARGET" >&5
+echo "${ECHO_T}$DLLTOOL_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in dlltool; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_DLLTOOL_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -5468,69 +9091,81 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5473: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DLLTOOL_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$DLLTOOL_FOR_TARGET"; then
ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # 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_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
+DLLTOOL_FOR_TARGET=$ac_cv_prog_DLLTOOL_FOR_TARGET
if test -n "$DLLTOOL_FOR_TARGET"; then
- echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $DLLTOOL_FOR_TARGET" >&5
+echo "${ECHO_T}$DLLTOOL_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5504: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DLLTOOL_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$DLLTOOL_FOR_TARGET"; then
ac_cv_prog_DLLTOOL_FOR_TARGET="$DLLTOOL_FOR_TARGET" # 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_DLLTOOL_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DLLTOOL_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
+DLLTOOL_FOR_TARGET=$ac_cv_prog_DLLTOOL_FOR_TARGET
if test -n "$DLLTOOL_FOR_TARGET"; then
- echo "$ac_t""$DLLTOOL_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $DLLTOOL_FOR_TARGET" >&5
+echo "${ECHO_T}$DLLTOOL_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_DLLTOOL_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
set dummy dlltool
if test $build = $target ; then
@@ -5538,6 +9173,8 @@ if test -z "$ac_cv_prog_DLLTOOL_FOR_TARGET" ; then
else
DLLTOOL_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ DLLTOOL_FOR_TARGET="$ac_cv_prog_DLLTOOL_FOR_TARGET"
fi
else
@@ -5549,69 +9186,125 @@ fi
if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for ld in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5554: checking for ld in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for ld in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ld in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/ld; then
LD_FOR_TARGET=`cd $with_build_time_tools && pwd`/ld
ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
- echo "$ac_t""$ac_cv_path_LD_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_LD_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_LD_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
LD_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ld`
- test $LD_FOR_TARGET=ld && LD_FOR_TARGET=
- ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
+ test $LD_FOR_TARGET = ld && LD_FOR_TARGET=
+ test -n "$LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET=$LD_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
+if test -z "$ac_cv_path_LD_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5572: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_LD_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$LD_FOR_TARGET" in
- /*)
+ case $LD_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_LD_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
+LD_FOR_TARGET=$ac_cv_path_LD_FOR_TARGET
+
if test -n "$LD_FOR_TARGET"; then
- echo "$ac_t""$LD_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $LD_FOR_TARGET" >&5
+echo "${ECHO_T}$LD_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_LD_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$LD_FOR_TARGET"; then
+ ac_cv_prog_LD_FOR_TARGET=$LD_FOR_TARGET
+elif test -n "$ac_cv_prog_LD_FOR_TARGET"; then
+ LD_FOR_TARGET=$ac_cv_prog_LD_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_LD_FOR_TARGET"; then
for ncn_progname in ld; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5609: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LD_FOR_TARGET"; then
+ ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+LD_FOR_TARGET=$ac_cv_prog_LD_FOR_TARGET
+if test -n "$LD_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $LD_FOR_TARGET" >&5
+echo "${ECHO_T}$LD_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_LD_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in ld; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_LD_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -5621,69 +9314,81 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5626: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LD_FOR_TARGET"; then
ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # 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_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LD_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
+LD_FOR_TARGET=$ac_cv_prog_LD_FOR_TARGET
if test -n "$LD_FOR_TARGET"; then
- echo "$ac_t""$LD_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $LD_FOR_TARGET" >&5
+echo "${ECHO_T}$LD_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_LD_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5657: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LD_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LD_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LD_FOR_TARGET"; then
ac_cv_prog_LD_FOR_TARGET="$LD_FOR_TARGET" # 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_LD_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LD_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
+LD_FOR_TARGET=$ac_cv_prog_LD_FOR_TARGET
if test -n "$LD_FOR_TARGET"; then
- echo "$ac_t""$LD_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $LD_FOR_TARGET" >&5
+echo "${ECHO_T}$LD_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_LD_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
set dummy ld
if test $build = $target ; then
@@ -5691,6 +9396,8 @@ if test -z "$ac_cv_prog_LD_FOR_TARGET" ; then
else
LD_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ LD_FOR_TARGET="$ac_cv_prog_LD_FOR_TARGET"
fi
else
@@ -5702,69 +9409,125 @@ fi
if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for lipo in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5707: checking for lipo in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for lipo in $with_build_time_tools" >&5
+echo $ECHO_N "checking for lipo in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/lipo; then
LIPO_FOR_TARGET=`cd $with_build_time_tools && pwd`/lipo
ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
- echo "$ac_t""$ac_cv_path_LIPO_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_LIPO_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_LIPO_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
LIPO_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=lipo`
- test $LIPO_FOR_TARGET=lipo && LIPO_FOR_TARGET=
- ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
+ test $LIPO_FOR_TARGET = lipo && LIPO_FOR_TARGET=
+ test -n "$LIPO_FOR_TARGET" && ac_cv_path_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
+if test -z "$ac_cv_path_LIPO_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "lipo", so it can be a program name with args.
set dummy lipo; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5725: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_LIPO_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_LIPO_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$LIPO_FOR_TARGET" in
- /*)
+ case $LIPO_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_LIPO_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_LIPO_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-LIPO_FOR_TARGET="$ac_cv_path_LIPO_FOR_TARGET"
+LIPO_FOR_TARGET=$ac_cv_path_LIPO_FOR_TARGET
+
if test -n "$LIPO_FOR_TARGET"; then
- echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $LIPO_FOR_TARGET" >&5
+echo "${ECHO_T}$LIPO_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_LIPO_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$LIPO_FOR_TARGET"; then
+ ac_cv_prog_LIPO_FOR_TARGET=$LIPO_FOR_TARGET
+elif test -n "$ac_cv_prog_LIPO_FOR_TARGET"; then
+ LIPO_FOR_TARGET=$ac_cv_prog_LIPO_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_LIPO_FOR_TARGET"; then
for ncn_progname in lipo; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5762: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LIPO_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LIPO_FOR_TARGET"; then
+ ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+LIPO_FOR_TARGET=$ac_cv_prog_LIPO_FOR_TARGET
+if test -n "$LIPO_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $LIPO_FOR_TARGET" >&5
+echo "${ECHO_T}$LIPO_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in lipo; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_LIPO_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -5774,69 +9537,81 @@ if test -z "$ac_cv_prog_LIPO_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5779: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LIPO_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LIPO_FOR_TARGET"; then
ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # 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_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
+LIPO_FOR_TARGET=$ac_cv_prog_LIPO_FOR_TARGET
if test -n "$LIPO_FOR_TARGET"; then
- echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $LIPO_FOR_TARGET" >&5
+echo "${ECHO_T}$LIPO_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_LIPO_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5810: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LIPO_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LIPO_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$LIPO_FOR_TARGET"; then
ac_cv_prog_LIPO_FOR_TARGET="$LIPO_FOR_TARGET" # 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_LIPO_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_LIPO_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
+LIPO_FOR_TARGET=$ac_cv_prog_LIPO_FOR_TARGET
if test -n "$LIPO_FOR_TARGET"; then
- echo "$ac_t""$LIPO_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $LIPO_FOR_TARGET" >&5
+echo "${ECHO_T}$LIPO_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_LIPO_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
set dummy lipo
if test $build = $target ; then
@@ -5844,6 +9619,8 @@ if test -z "$ac_cv_prog_LIPO_FOR_TARGET" ; then
else
LIPO_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ LIPO_FOR_TARGET="$ac_cv_prog_LIPO_FOR_TARGET"
fi
else
@@ -5855,69 +9632,125 @@ fi
if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for nm in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5860: checking for nm in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for nm in $with_build_time_tools" >&5
+echo $ECHO_N "checking for nm in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/nm; then
NM_FOR_TARGET=`cd $with_build_time_tools && pwd`/nm
ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
- echo "$ac_t""$ac_cv_path_NM_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_NM_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_NM_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
NM_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=nm`
- test $NM_FOR_TARGET=nm && NM_FOR_TARGET=
- ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
+ test $NM_FOR_TARGET = nm && NM_FOR_TARGET=
+ test -n "$NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET=$NM_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
+if test -z "$ac_cv_path_NM_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "nm", so it can be a program name with args.
set dummy nm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5878: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_NM_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$NM_FOR_TARGET" in
- /*)
+ case $NM_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_NM_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
+NM_FOR_TARGET=$ac_cv_path_NM_FOR_TARGET
+
if test -n "$NM_FOR_TARGET"; then
- echo "$ac_t""$NM_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $NM_FOR_TARGET" >&5
+echo "${ECHO_T}$NM_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_NM_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$NM_FOR_TARGET"; then
+ ac_cv_prog_NM_FOR_TARGET=$NM_FOR_TARGET
+elif test -n "$ac_cv_prog_NM_FOR_TARGET"; then
+ NM_FOR_TARGET=$ac_cv_prog_NM_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_NM_FOR_TARGET"; then
+ for ncn_progname in nm; do
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NM_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NM_FOR_TARGET"; then
+ ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+NM_FOR_TARGET=$ac_cv_prog_NM_FOR_TARGET
+if test -n "$NM_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $NM_FOR_TARGET" >&5
+echo "${ECHO_T}$NM_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_NM_FOR_TARGET" && test -n "$with_build_time_tools"; then
for ncn_progname in nm; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:5915: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_NM_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -5927,69 +9760,81 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5932: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NM_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM_FOR_TARGET"; then
ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # 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_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NM_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
+NM_FOR_TARGET=$ac_cv_prog_NM_FOR_TARGET
if test -n "$NM_FOR_TARGET"; then
- echo "$ac_t""$NM_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $NM_FOR_TARGET" >&5
+echo "${ECHO_T}$NM_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_NM_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5963: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_NM_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NM_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM_FOR_TARGET"; then
ac_cv_prog_NM_FOR_TARGET="$NM_FOR_TARGET" # 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_NM_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_NM_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
+NM_FOR_TARGET=$ac_cv_prog_NM_FOR_TARGET
if test -n "$NM_FOR_TARGET"; then
- echo "$ac_t""$NM_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $NM_FOR_TARGET" >&5
+echo "${ECHO_T}$NM_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_NM_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
set dummy nm
if test $build = $target ; then
@@ -5997,6 +9842,8 @@ if test -z "$ac_cv_prog_NM_FOR_TARGET" ; then
else
NM_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ NM_FOR_TARGET="$ac_cv_prog_NM_FOR_TARGET"
fi
else
@@ -6008,69 +9855,125 @@ fi
if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for objdump in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6013: checking for objdump in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for objdump in $with_build_time_tools" >&5
+echo $ECHO_N "checking for objdump in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/objdump; then
OBJDUMP_FOR_TARGET=`cd $with_build_time_tools && pwd`/objdump
ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
- echo "$ac_t""$ac_cv_path_OBJDUMP_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_OBJDUMP_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_OBJDUMP_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
OBJDUMP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=objdump`
- test $OBJDUMP_FOR_TARGET=objdump && OBJDUMP_FOR_TARGET=
- ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
+ test $OBJDUMP_FOR_TARGET = objdump && OBJDUMP_FOR_TARGET=
+ test -n "$OBJDUMP_FOR_TARGET" && ac_cv_path_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
+if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "objdump", so it can be a program name with args.
set dummy objdump; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6031: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_OBJDUMP_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$OBJDUMP_FOR_TARGET" in
- /*)
+ case $OBJDUMP_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_OBJDUMP_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_OBJDUMP_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-OBJDUMP_FOR_TARGET="$ac_cv_path_OBJDUMP_FOR_TARGET"
+OBJDUMP_FOR_TARGET=$ac_cv_path_OBJDUMP_FOR_TARGET
+
if test -n "$OBJDUMP_FOR_TARGET"; then
- echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $OBJDUMP_FOR_TARGET" >&5
+echo "${ECHO_T}$OBJDUMP_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_OBJDUMP_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$OBJDUMP_FOR_TARGET"; then
+ ac_cv_prog_OBJDUMP_FOR_TARGET=$OBJDUMP_FOR_TARGET
+elif test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
+ OBJDUMP_FOR_TARGET=$ac_cv_prog_OBJDUMP_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
for ncn_progname in objdump; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6068: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJDUMP_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$OBJDUMP_FOR_TARGET"; then
+ ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+OBJDUMP_FOR_TARGET=$ac_cv_prog_OBJDUMP_FOR_TARGET
+if test -n "$OBJDUMP_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $OBJDUMP_FOR_TARGET" >&5
+echo "${ECHO_T}$OBJDUMP_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in objdump; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_OBJDUMP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -6080,69 +9983,81 @@ if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6085: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJDUMP_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$OBJDUMP_FOR_TARGET"; then
ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # 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_OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
+OBJDUMP_FOR_TARGET=$ac_cv_prog_OBJDUMP_FOR_TARGET
if test -n "$OBJDUMP_FOR_TARGET"; then
- echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $OBJDUMP_FOR_TARGET" >&5
+echo "${ECHO_T}$OBJDUMP_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6116: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_OBJDUMP_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$OBJDUMP_FOR_TARGET"; then
ac_cv_prog_OBJDUMP_FOR_TARGET="$OBJDUMP_FOR_TARGET" # 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_OBJDUMP_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_OBJDUMP_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
+OBJDUMP_FOR_TARGET=$ac_cv_prog_OBJDUMP_FOR_TARGET
if test -n "$OBJDUMP_FOR_TARGET"; then
- echo "$ac_t""$OBJDUMP_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $OBJDUMP_FOR_TARGET" >&5
+echo "${ECHO_T}$OBJDUMP_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_OBJDUMP_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then
set dummy objdump
if test $build = $target ; then
@@ -6150,6 +10065,8 @@ if test -z "$ac_cv_prog_OBJDUMP_FOR_TARGET" ; then
else
OBJDUMP_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ OBJDUMP_FOR_TARGET="$ac_cv_prog_OBJDUMP_FOR_TARGET"
fi
else
@@ -6161,69 +10078,125 @@ fi
if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for ranlib in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6166: checking for ranlib in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for ranlib in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ranlib in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/ranlib; then
RANLIB_FOR_TARGET=`cd $with_build_time_tools && pwd`/ranlib
ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
- echo "$ac_t""$ac_cv_path_RANLIB_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_RANLIB_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_RANLIB_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
RANLIB_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=ranlib`
- test $RANLIB_FOR_TARGET=ranlib && RANLIB_FOR_TARGET=
- ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
+ test $RANLIB_FOR_TARGET = ranlib && RANLIB_FOR_TARGET=
+ test -n "$RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
+if test -z "$ac_cv_path_RANLIB_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; 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:6184: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_RANLIB_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$RANLIB_FOR_TARGET" in
- /*)
+ case $RANLIB_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_RANLIB_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
+RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
+
if test -n "$RANLIB_FOR_TARGET"; then
- echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB_FOR_TARGET" >&5
+echo "${ECHO_T}$RANLIB_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_RANLIB_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$RANLIB_FOR_TARGET"; then
+ ac_cv_prog_RANLIB_FOR_TARGET=$RANLIB_FOR_TARGET
+elif test -n "$ac_cv_prog_RANLIB_FOR_TARGET"; then
+ RANLIB_FOR_TARGET=$ac_cv_prog_RANLIB_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_RANLIB_FOR_TARGET"; then
for ncn_progname in ranlib; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6221: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB_FOR_TARGET"; then
+ ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB_FOR_TARGET=$ac_cv_prog_RANLIB_FOR_TARGET
+if test -n "$RANLIB_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $RANLIB_FOR_TARGET" >&5
+echo "${ECHO_T}$RANLIB_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in ranlib; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_RANLIB_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -6233,69 +10206,81 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6238: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB_FOR_TARGET"; then
ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
+RANLIB_FOR_TARGET=$ac_cv_prog_RANLIB_FOR_TARGET
if test -n "$RANLIB_FOR_TARGET"; then
- echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB_FOR_TARGET" >&5
+echo "${ECHO_T}$RANLIB_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6269: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB_FOR_TARGET"; then
ac_cv_prog_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
+RANLIB_FOR_TARGET=$ac_cv_prog_RANLIB_FOR_TARGET
if test -n "$RANLIB_FOR_TARGET"; then
- echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $RANLIB_FOR_TARGET" >&5
+echo "${ECHO_T}$RANLIB_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_RANLIB_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
set dummy ranlib
if test $build = $target ; then
@@ -6303,6 +10288,8 @@ if test -z "$ac_cv_prog_RANLIB_FOR_TARGET" ; then
else
RANLIB_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ RANLIB_FOR_TARGET="$ac_cv_prog_RANLIB_FOR_TARGET"
fi
else
@@ -6314,69 +10301,125 @@ fi
if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for strip in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6319: checking for strip in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for strip in $with_build_time_tools" >&5
+echo $ECHO_N "checking for strip in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/strip; then
STRIP_FOR_TARGET=`cd $with_build_time_tools && pwd`/strip
ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
- echo "$ac_t""$ac_cv_path_STRIP_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_STRIP_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_STRIP_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
STRIP_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=strip`
- test $STRIP_FOR_TARGET=strip && STRIP_FOR_TARGET=
- ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
+ test $STRIP_FOR_TARGET = strip && STRIP_FOR_TARGET=
+ test -n "$STRIP_FOR_TARGET" && ac_cv_path_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
+if test -z "$ac_cv_path_STRIP_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; 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:6337: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_STRIP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_STRIP_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$STRIP_FOR_TARGET" in
- /*)
+ case $STRIP_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_STRIP_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_STRIP_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-STRIP_FOR_TARGET="$ac_cv_path_STRIP_FOR_TARGET"
+STRIP_FOR_TARGET=$ac_cv_path_STRIP_FOR_TARGET
+
if test -n "$STRIP_FOR_TARGET"; then
- echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $STRIP_FOR_TARGET" >&5
+echo "${ECHO_T}$STRIP_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_STRIP_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$STRIP_FOR_TARGET"; then
+ ac_cv_prog_STRIP_FOR_TARGET=$STRIP_FOR_TARGET
+elif test -n "$ac_cv_prog_STRIP_FOR_TARGET"; then
+ STRIP_FOR_TARGET=$ac_cv_prog_STRIP_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_STRIP_FOR_TARGET"; then
for ncn_progname in strip; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6374: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP_FOR_TARGET"; then
+ ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+STRIP_FOR_TARGET=$ac_cv_prog_STRIP_FOR_TARGET
+if test -n "$STRIP_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $STRIP_FOR_TARGET" >&5
+echo "${ECHO_T}$STRIP_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in strip; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_STRIP_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -6386,69 +10429,81 @@ if test -z "$ac_cv_prog_STRIP_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6391: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP_FOR_TARGET"; then
ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
+STRIP_FOR_TARGET=$ac_cv_prog_STRIP_FOR_TARGET
if test -n "$STRIP_FOR_TARGET"; then
- echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $STRIP_FOR_TARGET" >&5
+echo "${ECHO_T}$STRIP_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_STRIP_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6422: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_STRIP_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP_FOR_TARGET"; then
ac_cv_prog_STRIP_FOR_TARGET="$STRIP_FOR_TARGET" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_STRIP_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
+STRIP_FOR_TARGET=$ac_cv_prog_STRIP_FOR_TARGET
if test -n "$STRIP_FOR_TARGET"; then
- echo "$ac_t""$STRIP_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $STRIP_FOR_TARGET" >&5
+echo "${ECHO_T}$STRIP_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_STRIP_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
set dummy strip
if test $build = $target ; then
@@ -6456,6 +10511,8 @@ if test -z "$ac_cv_prog_STRIP_FOR_TARGET" ; then
else
STRIP_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ STRIP_FOR_TARGET="$ac_cv_prog_STRIP_FOR_TARGET"
fi
else
@@ -6467,69 +10524,125 @@ fi
if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
if test -n "$with_build_time_tools"; then
- echo $ac_n "checking for windres in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6472: checking for windres in $with_build_time_tools" >&5
+ echo "$as_me:$LINENO: checking for windres in $with_build_time_tools" >&5
+echo $ECHO_N "checking for windres in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/windres; then
WINDRES_FOR_TARGET=`cd $with_build_time_tools && pwd`/windres
ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
- echo "$ac_t""$ac_cv_path_WINDRES_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $ac_cv_path_WINDRES_FOR_TARGET" >&5
+echo "${ECHO_T}$ac_cv_path_WINDRES_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
elif test $build != $host && test $have_gcc_for_target = yes; then
WINDRES_FOR_TARGET=`$GCC_FOR_TARGET --print-prog-name=windres`
- test $WINDRES_FOR_TARGET=windres && WINDRES_FOR_TARGET=
- ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
+ test $WINDRES_FOR_TARGET = windres && WINDRES_FOR_TARGET=
+ test -n "$WINDRES_FOR_TARGET" && ac_cv_path_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
fi
fi
-if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
+if test -z "$ac_cv_path_WINDRES_FOR_TARGET" && test -n "$gcc_cv_tool_dirs"; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6490: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_WINDRES_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_WINDRES_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$WINDRES_FOR_TARGET" in
- /*)
+ case $WINDRES_FOR_TARGET in
+ [\\/]* | ?:[\\/]*)
ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a path.
;;
- ?:/*)
- ac_cv_path_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test with a dos path.
- ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$gcc_cv_tool_dirs"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_path_WINDRES_FOR_TARGET="$ac_dir/$ac_word"
- break
- fi
- done
- IFS="$ac_save_ifs"
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $gcc_cv_tool_dirs
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_WINDRES_FOR_TARGET="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
;;
esac
fi
-WINDRES_FOR_TARGET="$ac_cv_path_WINDRES_FOR_TARGET"
+WINDRES_FOR_TARGET=$ac_cv_path_WINDRES_FOR_TARGET
+
if test -n "$WINDRES_FOR_TARGET"; then
- echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $WINDRES_FOR_TARGET" >&5
+echo "${ECHO_T}$WINDRES_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_path_WINDRES_FOR_TARGET" ; then
- if test -n "$with_build_time_tools"; then
+
+
+if test -n "$WINDRES_FOR_TARGET"; then
+ ac_cv_prog_WINDRES_FOR_TARGET=$WINDRES_FOR_TARGET
+elif test -n "$ac_cv_prog_WINDRES_FOR_TARGET"; then
+ WINDRES_FOR_TARGET=$ac_cv_prog_WINDRES_FOR_TARGET
+fi
+
+if test -n "$ac_cv_prog_WINDRES_FOR_TARGET"; then
for ncn_progname in windres; do
- echo $ac_n "checking for ${ncn_progname} in $with_build_time_tools""... $ac_c" 1>&6
-echo "configure:6527: checking for ${ncn_progname} in $with_build_time_tools" >&5
+ # Extract the first word of "${ncn_progname}", so it can be a program name with args.
+set dummy ${ncn_progname}; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_WINDRES_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$WINDRES_FOR_TARGET"; then
+ ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+WINDRES_FOR_TARGET=$ac_cv_prog_WINDRES_FOR_TARGET
+if test -n "$WINDRES_FOR_TARGET"; then
+ echo "$as_me:$LINENO: result: $WINDRES_FOR_TARGET" >&5
+echo "${ECHO_T}$WINDRES_FOR_TARGET" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ done
+fi
+
+if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test -n "$with_build_time_tools"; then
+ for ncn_progname in windres; do
+ echo "$as_me:$LINENO: checking for ${ncn_progname} in $with_build_time_tools" >&5
+echo $ECHO_N "checking for ${ncn_progname} in $with_build_time_tools... $ECHO_C" >&6
if test -x $with_build_time_tools/${ncn_progname}; then
ac_cv_prog_WINDRES_FOR_TARGET=$with_build_time_tools/${ncn_progname}
- echo "$ac_t""yes" 1>&6
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
break
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
done
fi
@@ -6539,69 +10652,81 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET"; then
if test -n "$ncn_target_tool_prefix"; then
# Extract the first word of "${ncn_target_tool_prefix}${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_target_tool_prefix}${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6544: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_WINDRES_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$WINDRES_FOR_TARGET"; then
ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # 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_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_WINDRES_FOR_TARGET="${ncn_target_tool_prefix}${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
+WINDRES_FOR_TARGET=$ac_cv_prog_WINDRES_FOR_TARGET
if test -n "$WINDRES_FOR_TARGET"; then
- echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $WINDRES_FOR_TARGET" >&5
+echo "${ECHO_T}$WINDRES_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" && test $build = $target ; then
# Extract the first word of "${ncn_progname}", so it can be a program name with args.
set dummy ${ncn_progname}; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:6575: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_WINDRES_FOR_TARGET'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_WINDRES_FOR_TARGET+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$WINDRES_FOR_TARGET"; then
ac_cv_prog_WINDRES_FOR_TARGET="$WINDRES_FOR_TARGET" # 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_WINDRES_FOR_TARGET="${ncn_progname}"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_WINDRES_FOR_TARGET="${ncn_progname}"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
+WINDRES_FOR_TARGET=$ac_cv_prog_WINDRES_FOR_TARGET
if test -n "$WINDRES_FOR_TARGET"; then
- echo "$ac_t""$WINDRES_FOR_TARGET" 1>&6
+ echo "$as_me:$LINENO: result: $WINDRES_FOR_TARGET" >&5
+echo "${ECHO_T}$WINDRES_FOR_TARGET" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-
+
fi
test -n "$ac_cv_prog_WINDRES_FOR_TARGET" && break
done
fi
-
+
if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
set dummy windres
if test $build = $target ; then
@@ -6609,6 +10734,8 @@ if test -z "$ac_cv_prog_WINDRES_FOR_TARGET" ; then
else
WINDRES_FOR_TARGET="${ncn_target_tool_prefix}$2"
fi
+else
+ WINDRES_FOR_TARGET="$ac_cv_prog_WINDRES_FOR_TARGET"
fi
else
@@ -6618,15 +10745,18 @@ fi
RAW_CXX_FOR_TARGET="$CXX_FOR_TARGET"
-echo $ac_n "checking where to find the target ar""... $ac_c" 1>&6
-echo "configure:6623: checking where to find the target ar" >&5
+echo "$as_me:$LINENO: checking where to find the target ar" >&5
+echo $ECHO_N "checking where to find the target ar... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $AR_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6634,32 +10764,41 @@ else
*" binutils "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
AR_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ar'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$AR_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $AR_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $AR_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
AR_FOR_TARGET='$(AR)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target as""... $ac_c" 1>&6
-echo "configure:6656: checking where to find the target as" >&5
+
+echo "$as_me:$LINENO: checking where to find the target as" >&5
+echo $ECHO_N "checking where to find the target as... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $AS_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6667,32 +10806,41 @@ else
*" gas "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
AS_FOR_TARGET='$$r/$(HOST_SUBDIR)/gas/as-new'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$AS_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $AS_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $AS_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
AS_FOR_TARGET='$(AS)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target cc""... $ac_c" 1>&6
-echo "configure:6689: checking where to find the target cc" >&5
+
+echo "$as_me:$LINENO: checking where to find the target cc" >&5
+echo $ECHO_N "checking where to find the target cc... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $CC_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6700,32 +10848,41 @@ else
*" gcc "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
CC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$CC_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $CC_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $CC_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
CC_FOR_TARGET='$(CC)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target c++""... $ac_c" 1>&6
-echo "configure:6722: checking where to find the target c++" >&5
+
+echo "$as_me:$LINENO: checking where to find the target c++" >&5
+echo $ECHO_N "checking where to find the target c++... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $CXX_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6740,28 +10897,37 @@ else
if test $ok = yes; then
# An in-tree tool is available and we can use it
CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/g++ -B$$r/$(HOST_SUBDIR)/gcc/ -nostdinc++ `test ! -f $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags || $(SHELL) $$r/$(TARGET_SUBDIR)/libstdc++-v3/scripts/testsuite_flags --build-includes` -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$CXX_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $CXX_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $CXX_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
CXX_FOR_TARGET='$(CXX)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target c++ for libstdc++""... $ac_c" 1>&6
-echo "configure:6758: checking where to find the target c++ for libstdc++" >&5
+
+echo "$as_me:$LINENO: checking where to find the target c++ for libstdc++" >&5
+echo $ECHO_N "checking where to find the target c++ for libstdc++... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $RAW_CXX_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6776,28 +10942,37 @@ else
if test $ok = yes; then
# An in-tree tool is available and we can use it
RAW_CXX_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -shared-libgcc -B$$r/$(HOST_SUBDIR)/gcc -nostdinc++ -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src -L$$r/$(TARGET_SUBDIR)/libstdc++-v3/src/.libs'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$RAW_CXX_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $RAW_CXX_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $RAW_CXX_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
RAW_CXX_FOR_TARGET='$(CXX)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target dlltool""... $ac_c" 1>&6
-echo "configure:6794: checking where to find the target dlltool" >&5
+
+echo "$as_me:$LINENO: checking where to find the target dlltool" >&5
+echo $ECHO_N "checking where to find the target dlltool... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $DLLTOOL_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6805,32 +10980,41 @@ else
*" binutils "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
DLLTOOL_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/dlltool'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$DLLTOOL_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $DLLTOOL_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $DLLTOOL_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
DLLTOOL_FOR_TARGET='$(DLLTOOL)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target gcc""... $ac_c" 1>&6
-echo "configure:6827: checking where to find the target gcc" >&5
+
+echo "$as_me:$LINENO: checking where to find the target gcc" >&5
+echo $ECHO_N "checking where to find the target gcc... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $GCC_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6838,32 +11022,41 @@ else
*" gcc "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
GCC_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/xgcc -B$$r/$(HOST_SUBDIR)/gcc/'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$GCC_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $GCC_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $GCC_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
GCC_FOR_TARGET='$()'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target gcj""... $ac_c" 1>&6
-echo "configure:6860: checking where to find the target gcj" >&5
+
+echo "$as_me:$LINENO: checking where to find the target gcj" >&5
+echo $ECHO_N "checking where to find the target gcj... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $GCJ_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6878,28 +11071,37 @@ else
if test $ok = yes; then
# An in-tree tool is available and we can use it
GCJ_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gcj -B$$r/$(HOST_SUBDIR)/gcc/'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$GCJ_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $GCJ_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $GCJ_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
GCJ_FOR_TARGET='$(GCJ)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target gfortran""... $ac_c" 1>&6
-echo "configure:6896: checking where to find the target gfortran" >&5
+
+echo "$as_me:$LINENO: checking where to find the target gfortran" >&5
+echo $ECHO_N "checking where to find the target gfortran... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $GFORTRAN_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6914,28 +11116,37 @@ else
if test $ok = yes; then
# An in-tree tool is available and we can use it
GFORTRAN_FOR_TARGET='$$r/$(HOST_SUBDIR)/gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$GFORTRAN_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $GFORTRAN_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $GFORTRAN_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
GFORTRAN_FOR_TARGET='$(GFORTRAN)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target ld""... $ac_c" 1>&6
-echo "configure:6932: checking where to find the target ld" >&5
+
+echo "$as_me:$LINENO: checking where to find the target ld" >&5
+echo $ECHO_N "checking where to find the target ld... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $LD_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6943,55 +11154,72 @@ else
*" ld "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
LD_FOR_TARGET='$$r/$(HOST_SUBDIR)/ld/ld-new'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$LD_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $LD_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $LD_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
LD_FOR_TARGET='$(LD)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target lipo""... $ac_c" 1>&6
-echo "configure:6965: checking where to find the target lipo" >&5
+
+echo "$as_me:$LINENO: checking where to find the target lipo" >&5
+echo $ECHO_N "checking where to find the target lipo... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $LIPO_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
if expr "x$LIPO_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $LIPO_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $LIPO_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
LIPO_FOR_TARGET='$(LIPO)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target nm""... $ac_c" 1>&6
-echo "configure:6988: checking where to find the target nm" >&5
+
+echo "$as_me:$LINENO: checking where to find the target nm" >&5
+echo $ECHO_N "checking where to find the target nm... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $NM_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -6999,32 +11227,41 @@ else
*" binutils "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
NM_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/nm-new'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$NM_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $NM_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $NM_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
NM_FOR_TARGET='$(NM)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target objdump""... $ac_c" 1>&6
-echo "configure:7021: checking where to find the target objdump" >&5
+
+echo "$as_me:$LINENO: checking where to find the target objdump" >&5
+echo $ECHO_N "checking where to find the target objdump... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $OBJDUMP_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -7032,32 +11269,41 @@ else
*" binutils "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
OBJDUMP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/objdump'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$OBJDUMP_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $OBJDUMP_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $OBJDUMP_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
OBJDUMP_FOR_TARGET='$(OBJDUMP)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target ranlib""... $ac_c" 1>&6
-echo "configure:7054: checking where to find the target ranlib" >&5
+
+echo "$as_me:$LINENO: checking where to find the target ranlib" >&5
+echo $ECHO_N "checking where to find the target ranlib... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $RANLIB_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -7065,32 +11311,41 @@ else
*" binutils "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
RANLIB_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/ranlib'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$RANLIB_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $RANLIB_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $RANLIB_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
RANLIB_FOR_TARGET='$(RANLIB)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target strip""... $ac_c" 1>&6
-echo "configure:7087: checking where to find the target strip" >&5
+
+echo "$as_me:$LINENO: checking where to find the target strip" >&5
+echo $ECHO_N "checking where to find the target strip... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $STRIP_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -7098,32 +11353,41 @@ else
*" binutils "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
STRIP_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/strip'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$STRIP_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $STRIP_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $STRIP_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
STRIP_FOR_TARGET='$(STRIP)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
-echo $ac_n "checking where to find the target windres""... $ac_c" 1>&6
-echo "configure:7120: checking where to find the target windres" >&5
+
+echo "$as_me:$LINENO: checking where to find the target windres" >&5
+echo $ECHO_N "checking where to find the target windres... $ECHO_C" >&6
if test "x${build}" != "x${host}" ; then
if expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $WINDRES_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
else
# Canadian cross, just use what we found
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
else
ok=yes
@@ -7131,27 +11395,33 @@ else
*" binutils "*) ;;
*) ok=no ;;
esac
-
+
if test $ok = yes; then
# An in-tree tool is available and we can use it
WINDRES_FOR_TARGET='$$r/$(HOST_SUBDIR)/binutils/windres'
- echo "$ac_t""just compiled" 1>&6
+ echo "$as_me:$LINENO: result: just compiled" >&5
+echo "${ECHO_T}just compiled" >&6
elif expr "x$WINDRES_FOR_TARGET" : "x/" > /dev/null; then
# We already found the complete path
- echo "$ac_t""pre-installed in `dirname $WINDRES_FOR_TARGET`" 1>&6
+ ac_dir=`dirname $WINDRES_FOR_TARGET`
+ echo "$as_me:$LINENO: result: pre-installed in $ac_dir" >&5
+echo "${ECHO_T}pre-installed in $ac_dir" >&6
elif test "x$target" = "x$host"; then
# We can use an host tool
WINDRES_FOR_TARGET='$(WINDRES)'
- echo "$ac_t""host tool" 1>&6
+ echo "$as_me:$LINENO: result: host tool" >&5
+echo "${ECHO_T}host tool" >&6
else
# We need a cross tool
- echo "$ac_t""pre-installed" 1>&6
+ echo "$as_me:$LINENO: result: pre-installed" >&5
+echo "${ECHO_T}pre-installed" >&6
fi
fi
+
# Certain tools may need extra flags.
AR_FOR_TARGET=${AR_FOR_TARGET}${extra_arflags_for_target}
RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET}${extra_ranlibflags_for_target}
@@ -7176,17 +11446,17 @@ fi
-echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:7181: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
-fi
-
-echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+fi;
+echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
if test "$USE_MAINTAINER_MODE" = yes; then
@@ -7195,7 +11465,7 @@ if test "$USE_MAINTAINER_MODE" = yes; then
else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
-fi
+fi
MAINT=$MAINTAINER_MODE_TRUE
# ---------------------
@@ -7210,26 +11480,101 @@ case $build in
yes) stage1_cflags="-g -Wa,-J" ;;
*) stage1_cflags="-g -J" ;;
esac ;;
- powerpc-*-darwin*)
- # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
- # sources; use -no-cpp-precomp to get to GNU cpp.
- # Apple's GCC has bugs in designated initializer handling, so disable
- # that too.
- stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
- ;;
esac
+# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
+if test "$GCC" = yes; then
+ saved_CFLAGS="$CFLAGS"
+
+ # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
+ CFLAGS="$CFLAGS -fkeep-inline-functions"
+ echo "$as_me:$LINENO: checking whether -fkeep-inline-functions is supported" >&5
+echo $ECHO_N "checking whether -fkeep-inline-functions is supported... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if (__GNUC__ < 3) \
+ || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
+ || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
+#error http://gcc.gnu.org/PR29382
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; stage1_cflags="$stage1_cflags -fkeep-inline-functions"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+ CFLAGS="$saved_CFLAGS"
+fi
+
+
+
+# Enable --enable-checking in stage1 of the compiler.
+# Check whether --enable-stage1-checking or --disable-stage1-checking was given.
+if test "${enable_stage1_checking+set}" = set; then
+ enableval="$enable_stage1_checking"
+ stage1_checking=--enable-checking=${enable_stage1_checking}
+else
+ if test "x$enable_checking" = xno; then
+ stage1_checking=--enable-checking
+else
+ stage1_checking=--enable-checking${enable_checking+=}$enable_checking
+fi
+fi;
+
# Enable -Werror in bootstrap stage2 and later.
-# Change the default to "no" on release branches.
# Check whether --enable-werror or --disable-werror was given.
if test "${enable_werror+set}" = set; then
enableval="$enable_werror"
- :
+
else
+ if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
enable_werror=yes
+else
+ enable_werror=no
fi
-
+fi;
case ${enable_werror} in
yes) stage2_werror_flag="--enable-werror-always" ;;
*) stage2_werror_flag="" ;;
@@ -7237,13 +11582,14 @@ esac
# Flags needed to enable html installing and building
+
# Check whether --with-datarootdir or --without-datarootdir was given.
if test "${with_datarootdir+set}" = set; then
withval="$with_datarootdir"
datarootdir="\${prefix}/${withval}"
else
datarootdir="\${prefix}/share"
-fi
+fi;
# Check whether --with-docdir or --without-docdir was given.
@@ -7252,7 +11598,16 @@ if test "${with_docdir+set}" = set; then
docdir="\${prefix}/${withval}"
else
docdir="\${datarootdir}/doc"
-fi
+fi;
+
+
+# Check whether --with-pdfdir or --without-pdfdir was given.
+if test "${with_pdfdir+set}" = set; then
+ withval="$with_pdfdir"
+ pdfdir="\${prefix}/${withval}"
+else
+ pdfdir="\${docdir}"
+fi;
# Check whether --with-htmldir or --without-htmldir was given.
@@ -7261,76 +11616,88 @@ if test "${with_htmldir+set}" = set; then
htmldir="\${prefix}/${withval}"
else
htmldir="\${docdir}"
-fi
+fi;
-trap '' 1 2 15
-cat > confcache <<\EOF
+ ac_config_files="$ac_config_files Makefile"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
@@ -7341,13 +11708,13 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
cat >confdef2opt.sed <<\_ACEOF
t clear
: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
t quote
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
t quote
d
: quote
-s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
s,\[,\\&,g
s,\],\\&,g
s,\$,$$,g
@@ -7364,286 +11731,918 @@ DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
rm -f confdef2opt.sed
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- case "\$ac_option" in
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
esac
+ shift
done
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
+ac_configure_extra_args=
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@target@%$target%g
-s%@target_alias@%$target_alias%g
-s%@target_cpu@%$target_cpu%g
-s%@target_vendor@%$target_vendor%g
-s%@target_os@%$target_os%g
-s%@build@%$build%g
-s%@build_alias@%$build_alias%g
-s%@build_cpu@%$build_cpu%g
-s%@build_vendor@%$build_vendor%g
-s%@build_os@%$build_os%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@LN@%$LN%g
-s%@LN_S@%$LN_S%g
-s%@TOPLEVEL_CONFIGURE_ARGUMENTS@%$TOPLEVEL_CONFIGURE_ARGUMENTS%g
-s%@build_subdir@%$build_subdir%g
-s%@host_subdir@%$host_subdir%g
-s%@target_subdir@%$target_subdir%g
-s%@CC@%$CC%g
-s%@GNATBIND@%$GNATBIND%g
-s%@do_compare@%$do_compare%g
-s%@gmplibs@%$gmplibs%g
-s%@gmpinc@%$gmpinc%g
-s%@stage1_languages@%$stage1_languages%g
-s%@SYSROOT_CFLAGS_FOR_TARGET@%$SYSROOT_CFLAGS_FOR_TARGET%g
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@build@,$build,;t t
+s,@build_cpu@,$build_cpu,;t t
+s,@build_vendor@,$build_vendor,;t t
+s,@build_os@,$build_os,;t t
+s,@build_noncanonical@,$build_noncanonical,;t t
+s,@host_noncanonical@,$host_noncanonical,;t t
+s,@target_noncanonical@,$target_noncanonical,;t t
+s,@host@,$host,;t t
+s,@host_cpu@,$host_cpu,;t t
+s,@host_vendor@,$host_vendor,;t t
+s,@host_os@,$host_os,;t t
+s,@target@,$target,;t t
+s,@target_cpu@,$target_cpu,;t t
+s,@target_vendor@,$target_vendor,;t t
+s,@target_os@,$target_os,;t t
+s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@LN@,$LN,;t t
+s,@LN_S@,$LN_S,;t t
+s,@TOPLEVEL_CONFIGURE_ARGUMENTS@,$TOPLEVEL_CONFIGURE_ARGUMENTS,;t t
+s,@build_libsubdir@,$build_libsubdir,;t t
+s,@build_subdir@,$build_subdir,;t t
+s,@host_subdir@,$host_subdir,;t t
+s,@target_subdir@,$target_subdir,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@GNATBIND@,$GNATBIND,;t t
+s,@ac_ct_GNATBIND@,$ac_ct_GNATBIND,;t t
+s,@GNATMAKE@,$GNATMAKE,;t t
+s,@ac_ct_GNATMAKE@,$ac_ct_GNATMAKE,;t t
+s,@do_compare@,$do_compare,;t t
+s,@gmplibs@,$gmplibs,;t t
+s,@gmpinc@,$gmpinc,;t t
+s,@stage1_languages@,$stage1_languages,;t t
+s,@SYSROOT_CFLAGS_FOR_TARGET@,$SYSROOT_CFLAGS_FOR_TARGET,;t t
+s,@RPATH_ENVVAR@,$RPATH_ENVVAR,;t t
+s,@tooldir@,$tooldir,;t t
+s,@build_tooldir@,$build_tooldir,;t t
+s,@CONFIGURE_GDB_TK@,$CONFIGURE_GDB_TK,;t t
+s,@GDB_TK@,$GDB_TK,;t t
+s,@INSTALL_GDB_TK@,$INSTALL_GDB_TK,;t t
+s,@build_configargs@,$build_configargs,;t t
+s,@build_configdirs@,$build_configdirs,;t t
+s,@host_configargs@,$host_configargs,;t t
+s,@configdirs@,$configdirs,;t t
+s,@target_configargs@,$target_configargs,;t t
+s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
+s,@config_shell@,$config_shell,;t t
+s,@YACC@,$YACC,;t t
+s,@BISON@,$BISON,;t t
+s,@M4@,$M4,;t t
+s,@LEX@,$LEX,;t t
+s,@FLEX@,$FLEX,;t t
+s,@MAKEINFO@,$MAKEINFO,;t t
+s,@EXPECT@,$EXPECT,;t t
+s,@RUNTEST@,$RUNTEST,;t t
+s,@AR@,$AR,;t t
+s,@AS@,$AS,;t t
+s,@DLLTOOL@,$DLLTOOL,;t t
+s,@LD@,$LD,;t t
+s,@LIPO@,$LIPO,;t t
+s,@NM@,$NM,;t t
+s,@RANLIB@,$RANLIB,;t t
+s,@STRIP@,$STRIP,;t t
+s,@WINDRES@,$WINDRES,;t t
+s,@OBJCOPY@,$OBJCOPY,;t t
+s,@OBJDUMP@,$OBJDUMP,;t t
+s,@CFLAGS_FOR_BUILD@,$CFLAGS_FOR_BUILD,;t t
+s,@CC_FOR_TARGET@,$CC_FOR_TARGET,;t t
+s,@CXX_FOR_TARGET@,$CXX_FOR_TARGET,;t t
+s,@GCC_FOR_TARGET@,$GCC_FOR_TARGET,;t t
+s,@GCJ_FOR_TARGET@,$GCJ_FOR_TARGET,;t t
+s,@GFORTRAN_FOR_TARGET@,$GFORTRAN_FOR_TARGET,;t t
+s,@AR_FOR_TARGET@,$AR_FOR_TARGET,;t t
+s,@AS_FOR_TARGET@,$AS_FOR_TARGET,;t t
+s,@DLLTOOL_FOR_TARGET@,$DLLTOOL_FOR_TARGET,;t t
+s,@LD_FOR_TARGET@,$LD_FOR_TARGET,;t t
+s,@LIPO_FOR_TARGET@,$LIPO_FOR_TARGET,;t t
+s,@NM_FOR_TARGET@,$NM_FOR_TARGET,;t t
+s,@OBJDUMP_FOR_TARGET@,$OBJDUMP_FOR_TARGET,;t t
+s,@RANLIB_FOR_TARGET@,$RANLIB_FOR_TARGET,;t t
+s,@STRIP_FOR_TARGET@,$STRIP_FOR_TARGET,;t t
+s,@WINDRES_FOR_TARGET@,$WINDRES_FOR_TARGET,;t t
+s,@RAW_CXX_FOR_TARGET@,$RAW_CXX_FOR_TARGET,;t t
+s,@FLAGS_FOR_TARGET@,$FLAGS_FOR_TARGET,;t t
+s,@COMPILER_AS_FOR_TARGET@,$COMPILER_AS_FOR_TARGET,;t t
+s,@COMPILER_LD_FOR_TARGET@,$COMPILER_LD_FOR_TARGET,;t t
+s,@COMPILER_NM_FOR_TARGET@,$COMPILER_NM_FOR_TARGET,;t t
+s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s,@MAINT@,$MAINT,;t t
+s,@stage1_cflags@,$stage1_cflags,;t t
+s,@stage1_checking@,$stage1_checking,;t t
+s,@stage2_werror_flag@,$stage2_werror_flag,;t t
+s,@datarootdir@,$datarootdir,;t t
+s,@docdir@,$docdir,;t t
+s,@pdfdir@,$pdfdir,;t t
+s,@htmldir@,$htmldir,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
/@serialization_dependencies@/r $serialization_dependencies
-s%@serialization_dependencies@%%g
+s,@serialization_dependencies@,,;t t
/@host_makefile_frag@/r $host_makefile_frag
-s%@host_makefile_frag@%%g
+s,@host_makefile_frag@,,;t t
/@target_makefile_frag@/r $target_makefile_frag
-s%@target_makefile_frag@%%g
+s,@target_makefile_frag@,,;t t
/@alphaieee_frag@/r $alphaieee_frag
-s%@alphaieee_frag@%%g
+s,@alphaieee_frag@,,;t t
/@ospace_frag@/r $ospace_frag
-s%@ospace_frag@%%g
-s%@RPATH_ENVVAR@%$RPATH_ENVVAR%g
-s%@tooldir@%$tooldir%g
-s%@build_tooldir@%$build_tooldir%g
-s%@CONFIGURE_GDB_TK@%$CONFIGURE_GDB_TK%g
-s%@GDB_TK@%$GDB_TK%g
-s%@INSTALL_GDB_TK@%$INSTALL_GDB_TK%g
-s%@build_configargs@%$build_configargs%g
-s%@build_configdirs@%$build_configdirs%g
-s%@host_configargs@%$host_configargs%g
-s%@configdirs@%$configdirs%g
-s%@target_configargs@%$target_configargs%g
-s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
-s%@config_shell@%$config_shell%g
-s%@YACC@%$YACC%g
-s%@BISON@%$BISON%g
-s%@M4@%$M4%g
-s%@LEX@%$LEX%g
-s%@FLEX@%$FLEX%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@EXPECT@%$EXPECT%g
-s%@RUNTEST@%$RUNTEST%g
-s%@AR@%$AR%g
-s%@AS@%$AS%g
-s%@DLLTOOL@%$DLLTOOL%g
-s%@LD@%$LD%g
-s%@LIPO@%$LIPO%g
-s%@NM@%$NM%g
-s%@RANLIB@%$RANLIB%g
-s%@STRIP@%$STRIP%g
-s%@WINDRES@%$WINDRES%g
-s%@OBJCOPY@%$OBJCOPY%g
-s%@OBJDUMP@%$OBJDUMP%g
-s%@CXX@%$CXX%g
-s%@CFLAGS_FOR_BUILD@%$CFLAGS_FOR_BUILD%g
-s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
-s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
-s%@GCC_FOR_TARGET@%$GCC_FOR_TARGET%g
-s%@GCJ_FOR_TARGET@%$GCJ_FOR_TARGET%g
-s%@GFORTRAN_FOR_TARGET@%$GFORTRAN_FOR_TARGET%g
-s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
-s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
-s%@DLLTOOL_FOR_TARGET@%$DLLTOOL_FOR_TARGET%g
-s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
-s%@LIPO_FOR_TARGET@%$LIPO_FOR_TARGET%g
-s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
-s%@OBJDUMP_FOR_TARGET@%$OBJDUMP_FOR_TARGET%g
-s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
-s%@STRIP_FOR_TARGET@%$STRIP_FOR_TARGET%g
-s%@WINDRES_FOR_TARGET@%$WINDRES_FOR_TARGET%g
-s%@FLAGS_FOR_TARGET@%$FLAGS_FOR_TARGET%g
-s%@RAW_CXX_FOR_TARGET@%$RAW_CXX_FOR_TARGET%g
-s%@COMPILER_AS_FOR_TARGET@%$COMPILER_AS_FOR_TARGET%g
-s%@COMPILER_LD_FOR_TARGET@%$COMPILER_LD_FOR_TARGET%g
-s%@COMPILER_NM_FOR_TARGET@%$COMPILER_NM_FOR_TARGET%g
-s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
-s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
-s%@MAINT@%$MAINT%g
-s%@stage1_cflags@%$stage1_cflags%g
-s%@stage2_werror_flag@%$stage2_werror_flag%g
-s%@datarootdir@%$datarootdir%g
-s%@docdir@%$docdir%g
-s%@htmldir@%$htmldir%g
-
+s,@ospace_frag@,,;t t
CEOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
-fi
-EOF
+fi # test -n "$CONFIG_FILES"
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
else
- ac_dir_suffix= ac_dots=
- fi
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
*) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+s,@INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
+done
+_ACEOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\_ACEOF
-exit 0
-EOF
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/contrib/binutils/configure.in b/contrib/binutils/configure.ac
index b6ef515..0b4fc33 100644
--- a/contrib/binutils/configure.in
+++ b/contrib/binutils/configure.ac
@@ -1,5 +1,5 @@
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+# 2001, 2002, 2003, 2004, 2005, 2006, 2007 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
@@ -21,10 +21,27 @@
sinclude(config/acx.m4)
AC_INIT(move-if-change)
-AC_PREREQ(2.13)
+AC_PREREQ(2.59)
+
+# Find the build, host, and target systems.
+ACX_NONCANONICAL_BUILD
+ACX_NONCANONICAL_HOST
+ACX_NONCANONICAL_TARGET
+
+dnl Autoconf 2.5x and later will set a default program prefix if
+dnl --target was used, even if it was the same as --host. Disable
+dnl that behavior. This must be done before AC_CANONICAL_SYSTEM
+dnl to take effect.
+test "$host_noncanonical" = "$target_noncanonical" &&
+ test "$program_prefix$program_suffix$program_transform_name" = \
+ NONENONEs,x,x, &&
+ program_transform_name=s,y,y,
+
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
+m4_pattern_allow([^AS_FOR_TARGET$])dnl
+
# Get 'install' or 'install-sh' and its variants.
AC_PROG_INSTALL
ACX_PROG_LN
@@ -68,14 +85,25 @@ progname=$0
# if PWD already has a value, it is probably wrong.
if test -n "$PWD" ; then PWD=`${PWDCMD-pwd}`; fi
-# Export original configure arguments for use by sub-configures. These
-# will be expanded by make, so quote '$'.
-tmp="$progname $@"
-sed -e 's,\$,$$,g' <<EOF_SED > conftestsed.out
-$tmp
-EOF_SED
-TOPLEVEL_CONFIGURE_ARGUMENTS=`cat conftestsed.out`
-rm -f conftestsed.out
+# Export original configure arguments for use by sub-configures.
+# Quote arguments with shell meta charatcers.
+TOPLEVEL_CONFIGURE_ARGUMENTS=
+set -- "$progname" "$@"
+for ac_arg
+do
+ case "$ac_arg" in
+ *" "*|*" "*|*[[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\']]*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
+ # if the argument is of the form -foo=baz, quote the baz part only
+ ac_arg=`echo "'$ac_arg'" | sed "s/^'\([[-a-zA-Z0-9]]*=\)/\\1'/"` ;;
+ *) ;;
+ esac
+ # Add the quoted argument to the list.
+ TOPLEVEL_CONFIGURE_ARGUMENTS="$TOPLEVEL_CONFIGURE_ARGUMENTS $ac_arg"
+done
+# Remove the initial space we just introduced and, as these will be
+# expanded by make, quote '$'.
+TOPLEVEL_CONFIGURE_ARGUMENTS=`echo "x$TOPLEVEL_CONFIGURE_ARGUMENTS" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
AC_SUBST(TOPLEVEL_CONFIGURE_ARGUMENTS)
moveifchange=${srcdir}/move-if-change
@@ -123,7 +151,7 @@ build_tools="build-texinfo build-byacc build-flex build-bison build-m4 build-fix
# these libraries are used by various programs built for the host environment
#
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
+host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber gmp mpfr"
# these tools are built for the host environment
# Note, the powerpc-eabi build depends on sim occurring before gdb in order to
@@ -134,7 +162,6 @@ host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb
# libgcj represents the runtime libraries only used by gcj.
libgcj="target-libffi \
- target-boehm-gc \
target-zlib \
target-qthreads \
target-libjava"
@@ -142,14 +169,15 @@ libgcj="target-libffi \
# these libraries are built for the target environment, and are built after
# the host libraries and the host tools (which may be a cross compiler)
#
-target_libraries="target-libiberty \
+target_libraries="target-libgcc \
+ target-libiberty \
target-libgloss \
target-newlib \
target-libstdc++-v3 \
target-libmudflap \
target-libssp \
- target-libgcc-math \
target-libgfortran \
+ target-boehm-gc \
${libgcj} \
target-libobjc \
target-libada \
@@ -227,7 +255,7 @@ esac
# Some tools are only suitable for building in a "native" situation.
# Remove these if host!=target.
-native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
+native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf"
# Similarly, some are only suitable for cross toolchains.
# Remove these if host=target.
@@ -278,9 +306,12 @@ case "${host}" in
i[[3456789]]86-*-go32* | i[[3456789]]86-*-msdosdjgpp*)
noconfigdirs="$noconfigdirs tcl tk expect dejagnu send-pr uudecode guile itcl gnuserv libffi"
;;
+ x86_64-*-mingw*)
+ noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
+ ;;
i[[3456789]]86-*-mingw32*)
# noconfigdirs="tcl tk expect dejagnu make texinfo bison patch flex byacc send-pr uudecode dejagnu diff guile perl itcl gnuserv"
- noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool"
+ noconfigdirs="$noconfigdirs expect dejagnu autoconf automake send-pr rcs guile perl texinfo libtool newlib"
;;
i[[3456789]]86-*-beos*)
noconfigdirs="$noconfigdirs tk itcl libgui gdb"
@@ -313,18 +344,6 @@ AC_ARG_ENABLE(libssp,
ENABLE_LIBSSP=$enableval,
ENABLE_LIBSSP=yes)
-# Set the default so we build libgcc-math for ix86 and x86_64
-AC_ARG_ENABLE(libgcc-math,
-[ --enable-libgcc-math Builds libgcc-math directory],,
-[
-case "${target}" in
- i?86-* | x86_64-* )
- enable_libgcc_math=yes ;;
- *)
- enable_libgcc_math=no ;;
-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
@@ -345,7 +364,7 @@ esac
# Disable libmudflap on some systems.
if test x$enable_libmudflap = x ; then
case "${target}" in
- *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu)
+ *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-linux-uclibc* | *-*-uclinux*)
# Enable libmudflap by default in GNU and friends.
;;
*-*-freebsd*)
@@ -366,7 +385,7 @@ if test x$enable_libgomp = x ; then
;;
*-*-netbsd* | *-*-freebsd* | *-*-openbsd*)
;;
- *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*)
+ *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*)
;;
*-*-darwin* | *-*-aix*)
;;
@@ -381,7 +400,7 @@ case "${target}" in
*-*-chorusos)
noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
- powerpc-*-darwin*)
+ powerpc-*-darwin* | i[[3456789]]86-*-darwin*)
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes gdb gprof"
noconfigdirs="$noconfigdirs sim target-rda"
;;
@@ -445,9 +464,6 @@ case "${target}" in
*-*-vxworks*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss target-libiberty target-libstdc++-v3 ${libgcj}"
;;
- m32c-*-*)
- noconfigdirs="$noconfigdirs target-libstdc++-v3"
- ;;
alpha*-dec-osf*)
# ld works, but does not support shared libraries.
# newlib is not 64 bit ready. I'm not sure about fileutils.
@@ -500,6 +516,9 @@ case "${target}" in
arm*-*-linux-gnueabi)
noconfigdirs="$noconfigdirs target-libffi target-qthreads"
noconfigdirs="$noconfigdirs target-libjava target-libobjc"
+ case ${with_newlib} in
+ no) noconfigdirs="$noconfigdirs target-newlib target-libgloss"
+ esac
;;
arm*-*-symbianelf*)
noconfigdirs="$noconfigdirs ${libgcj} target-libiberty"
@@ -523,7 +542,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libiberty target-libstdc++-v3 ${libgcj}"
;;
bfin-*-*)
- noconfigdirs="$noconfigdirs target-libgloss gdb"
+ noconfigdirs="$noconfigdirs gdb"
if test x${is_cross_compiler} != xno ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
@@ -587,6 +606,9 @@ case "${target}" in
hppa*64*-*-*)
noconfigdirs="$noconfigdirs ${libgcj}"
;;
+ hppa*-hp-hpux11*)
+ noconfigdirs="$noconfigdirs ld shellutils"
+ ;;
hppa*-*-*)
# According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
# build on HP-UX 10.20.
@@ -628,32 +650,22 @@ case "${target}" in
# 'target-newlib' will appear in skipdirs.
;;
i[[3456789]]86-*-mingw32*)
- target_configdirs="$target_configdirs target-mingw"
- noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
-
- # Can't build gdb for mingw32 if not native.
- case "${host}" in
- i[[3456789]]86-*-mingw32) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl gnuserv"
- ;;
- esac
+ target_configdirs="$target_configdirs target-winsup"
+ noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
+ ;;
+ x86_64-*-mingw*)
+ target_configdirs="$target_configdirs target-winsup"
+ noconfigdirs="$noconfigdirs expect target-libgloss target-newlib ${libgcj}"
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
# always build newlib if winsup directory is present.
- if test -d "$srcdir/winsup"; then
+ if test -d "$srcdir/winsup/cygwin"; then
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
elif test -d "$srcdir/newlib"; then
- echo "Warning: winsup is missing so newlib can't be built."
+ echo "Warning: winsup/cygwin is missing so newlib can't be built."
fi
-
- # Can't build gdb for Cygwin if not native.
- case "${host}" in
- *-*-cygwin*) ;; # keep gdb tcl tk expect etc.
- *) noconfigdirs="$noconfigdirs gdb tcl tk expect itcl libgui gnuserv"
- ;;
- esac
;;
i[[3456789]]86-moss-msdos | i[[3456789]]86-*-moss* | \
i[[3456789]]86-*-uwin* | i[[3456789]]86-*-interix* )
@@ -755,17 +767,11 @@ case "${target}" in
# <oldham@codesourcery.com>
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
- mips*-dec-bsd*)
- noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
- ;;
mips*-*-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
;;
- mipstx39-*-*)
- noconfigdirs="$noconfigdirs gprof ${libgcj}" # same as generic mips
- ;;
mips64*-*-linux*)
- noconfigdirs="$noconfigdirs target-newlib ${libgcj}"
+ noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
;;
mips*-*-linux*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -807,6 +813,9 @@ case "${target}" in
;;
sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
;;
+ spu-*-*)
+ skipdirs="target-libssp"
+ ;;
v810-*-*)
noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libstdc++-v3 opcodes target-libgloss ${libgcj}"
;;
@@ -963,6 +972,8 @@ case "${host}" in
;;
*-mingw32*)
;;
+ *-mingw64*)
+ ;;
*-interix*)
host_makefile_frag="config/mh-interix"
;;
@@ -1033,119 +1044,158 @@ if test -z "${CC}" && test "${build}" = "${host}" ; then
fi
if test "${build}" != "${host}" ; then
- # If we are doing a Canadian Cross, in which the host and build systems
- # are not the same, we set reasonable default values for the tools.
-
- CC=${CC-${host_alias}-gcc}
- CFLAGS=${CFLAGS-"-g -O2"}
- CXX=${CXX-${host_alias}-c++}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
-
else
- # Set reasonable default values for some tools even if not Canadian.
- # Of course, these are different reasonable default values, originally
- # specified directly in the Makefile.
- # We don't export, so that autoconf can do its job.
- # Note that all these settings are above the fragment inclusion point
- # in Makefile.in, so can still be overridden by fragments.
- # This is all going to change when we autoconfiscate...
-
CC_FOR_BUILD="\$(CC)"
- AC_PROG_CC
-
- # We must set the default linker to the linker used by gcc for the correct
- # operation of libtool. If LD is not defined and we are using gcc, try to
- # set the LD default to the ld used by gcc.
- if test -z "$LD"; then
- if test "$GCC" = yes; then
- case $build in
- *-*-mingw*)
- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
- *)
- gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
- esac
- case $gcc_prog_ld in
- # Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- LD="$gcc_prog_ld" ;;
- esac
- fi
- fi
+fi
- CXX=${CXX-"c++"}
- CFLAGS=${CFLAGS-"-g"}
- CXXFLAGS=${CXXFLAGS-"-g -O2"}
+AC_PROG_CC
+AC_PROG_CXX
+
+# We must set the default linker to the linker used by gcc for the correct
+# operation of libtool. If LD is not defined and we are using gcc, try to
+# set the LD default to the ld used by gcc.
+if test -z "$LD"; then
+ if test "$GCC" = yes; then
+ case $build in
+ *-*-mingw*)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1 | tr -d '\015'` ;;
+ *)
+ gcc_prog_ld=`$CC -print-prog-name=ld 2>&1` ;;
+ esac
+ case $gcc_prog_ld in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ LD="$gcc_prog_ld" ;;
+ esac
+ fi
fi
ACX_PROG_GNAT
ACX_PROG_CMP_IGNORE_INITIAL
# Check for GMP and MPFR
-gmplibs=
+gmplibs="-lmpfr -lgmp"
gmpinc=
-have_gmp=yes
+have_gmp=no
+
# Specify a location for mpfr
# check for this first so it ends up on the link line before gmp.
-AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH Specify source directory for MPFR library])
+AC_ARG_WITH(mpfr-dir, [ --with-mpfr-dir=PATH This option has been REMOVED],
+ AC_MSG_ERROR([The --with-mpfr-dir=PATH option has been removed.
+Use --with-mpfr=PATH or --with-mpfr-include=PATH plus --with-mpfr-lib=PATH]))
-if test "x$with_mpfr_dir" != x; then
- gmpinc="-I$with_mpfr_dir"
- gmplibs="$with_mpfr_dir/libmpfr.a"
-else
- gmplibs="-lmpfr"
-fi
-
-AC_ARG_WITH(mpfr, [ --with-mpfr=PATH Specify directory for installed MPFR library])
+AC_ARG_WITH(mpfr, [ --with-mpfr=PATH Specify prefix directory for installed MPFR package
+ Equivalent to --with-mpfr-include=PATH/include
+ plus --with-mpfr-lib=PATH/lib])
+AC_ARG_WITH(mpfr_include, [ --with-mpfr-include=PATH
+ Specify directory for installed MPFR include files])
+AC_ARG_WITH(mpfr_lib, [ --with-mpfr-lib=PATH Specify the directory for the installed MPFR library])
if test "x$with_mpfr" != x; then
gmplibs="-L$with_mpfr/lib $gmplibs"
gmpinc="-I$with_mpfr/include"
fi
+if test "x$with_mpfr_include" != x; then
+ gmpinc="-I$with_mpfr_include"
+fi
+if test "x$with_mpfr_lib" != x; then
+ gmplibs="-L$with_mpfr_lib $gmplibs"
+fi
+if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then
+ gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/.libs -L$$r/$(HOST_SUBDIR)/mpfr/_libs '"$gmplibs"
+ gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr -I$$s/mpfr '"$gmpinc"
+ # Do not test the mpfr version. Assume that it is sufficient, since
+ # it is in the source tree, and the library has not been built yet
+ # but it would be included on the link line in the version check below
+ # hence making the test fail.
+ have_gmp=yes
+fi
# Specify a location for gmp
-AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH Specify source directory for GMP library])
-
-if test "x$with_gmp_dir" != x; then
- gmpinc="$gmpinc -I$with_gmp_dir"
- if test -f "$with_gmp_dir/.libs/libgmp.a"; then
- gmplibs="$gmplibs $with_gmp_dir/.libs/libgmp.a"
- elif test -f "$with_gmp_dir/_libs/libgmp.a"; then
- gmplibs="$gmplibs $with_gmp_dir/_libs/libgmp.a"
- fi
- # One of the later tests will catch the error if neither library is present.
-else
- gmplibs="$gmplibs -lgmp"
-fi
+AC_ARG_WITH(gmp-dir, [ --with-gmp-dir=PATH This option has been REMOVED],
+ AC_MSG_ERROR([The --with-gmp-dir=PATH option has been removed.
+Use --with-gmp=PATH or --with-gmp-include=PATH plus --with-gmp-lib=PATH]))
+
+AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify prefix directory for the installed GMP package
+ Equivalent to --with-gmp-include=PATH/include
+ plus --with-gmp-lib=PATH/lib])
+AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH Specify directory for installed GMP include files])
+AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH Specify the directory for the installed GMP library])
-AC_ARG_WITH(gmp, [ --with-gmp=PATH Specify directory for installed GMP library])
if test "x$with_gmp" != x; then
gmplibs="-L$with_gmp/lib $gmplibs"
gmpinc="-I$with_gmp/include $gmpinc"
fi
+if test "x$with_gmp_include" != x; then
+ gmpinc="-I$with_gmp_include $gmpinc"
+fi
+if test "x$with_gmp_lib" != x; then
+ gmplibs="-L$with_gmp_lib $gmplibs"
+fi
+if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp; then
+ gmplibs='-L$$r/$(HOST_SUBDIR)/gmp/.libs -L$$r/$(HOST_SUBDIR)/gmp/_libs '"$gmplibs"
+ gmpinc='-I$$r/$(HOST_SUBDIR)/gmp -I$$s/gmp '"$gmpinc"
+ # Do not test the gmp version. Assume that it is sufficient, since
+ # it is in the source tree, and the library has not been built yet
+ # but it would be included on the link line in the version check below
+ # hence making the test fail.
+ have_gmp=yes
+fi
-saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $gmpinc"
-# Check GMP actually works
-AC_MSG_CHECKING([for correct version of gmp.h])
-AC_TRY_COMPILE([#include "gmp.h"],[
-#if __GNU_MP_VERSION < 3
-choke me
-#endif
-], [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no]); have_gmp=no])
-
-if test x"$have_gmp" = xyes; then
- AC_MSG_CHECKING([for MPFR])
-
- saved_LIBS="$LIBS"
- LIBS="$LIBS $gmplibs"
- AC_TRY_LINK([#include <gmp.h>
-#include <mpfr.h>], [mpfr_t n; mpfr_init(n);],
- [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
- LIBS="$saved_LIBS"
+if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
+ have_gmp=yes
+ saved_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $gmpinc"
+ # Check GMP actually works
+ AC_MSG_CHECKING([for correct version of gmp.h])
+ AC_TRY_COMPILE([#include "gmp.h"],[
+ #if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 1)
+ choke me
+ #endif
+ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
+
+ if test x"$have_gmp" = xyes; then
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $gmplibs"
+ dnl MPFR 2.2.0 is acceptable but buggy, MPFR 2.2.1 is better.
+ AC_MSG_CHECKING([for correct version of mpfr.h])
+ AC_TRY_LINK([#include <gmp.h>
+ #include <mpfr.h>],[
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,0)
+ choke me
+ #endif
+ mpfr_t n;
+ mpfr_t x;
+ int t;
+ mpfr_init (n);
+ mpfr_init (x);
+ mpfr_atan2 (n, n, x, GMP_RNDN);
+ mpfr_erfc (n, x, GMP_RNDN);
+ mpfr_subnormalize (x, t, GMP_RNDN);
+ ], [AC_TRY_LINK([#include <gmp.h>
+ #include <mpfr.h>],[
+ #if MPFR_VERSION < MPFR_VERSION_NUM(2,2,1)
+ choke me
+ #endif
+ mpfr_t n; mpfr_init(n);
+ ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])])],
+ [AC_MSG_RESULT([no]); have_gmp=no])
+ LIBS="$saved_LIBS"
+ fi
CFLAGS="$saved_CFLAGS"
+
+ if test x$have_gmp != xyes; then
+ AC_MSG_ERROR([Building GCC requires GMP 4.1+ and MPFR 2.2.1+.
+Try the --with-gmp and/or --with-mpfr options to specify their locations.
+Copies of these libraries' source code can be found at their respective
+hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
+See also http://gcc.gnu.org/install/prerequisites.html for additional info.
+If you obtained GMP and/or MPFR from a vendor distribution package, make
+sure that you have installed both the libraries and the header files.
+They may be located in separate packages.])
+ fi
fi
# Flags needed for both GMP and/or MPFR
@@ -1153,8 +1203,7 @@ AC_SUBST(gmplibs)
AC_SUBST(gmpinc)
# By default, C is the only stage 1 language.
-stage1_languages=c
-AC_SUBST(stage1_languages)
+stage1_languages=,c,
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
@@ -1216,9 +1265,9 @@ if test -d ${srcdir}/gcc; then
esac
done
- new_enable_languages=c
+ new_enable_languages=,c,
missing_languages=`echo ",$enable_languages," | sed -e s/,all,/,/ -e s/,c,/,/ `
- potential_languages=c
+ potential_languages=,c,
for lang_frag in ${srcdir}/gcc/*/config-lang.in .. ; do
case ${lang_frag} in
@@ -1232,70 +1281,81 @@ if test -d ${srcdir}/gcc; then
language=
target_libs=
lang_dirs=
- boot_language=
- build_by_default=
- need_gmp=
+ subdir_requires=
+ boot_language=no
+ build_by_default=yes
. ${lang_frag}
- potential_languages="${potential_languages},${language}"
- # This is quite sensitive to the ordering of the case statement arms.
- case ,${enable_languages},:${language}:${have_gnat}:${build_by_default} in
- *::*:*)
- echo "${lang_frag} doesn't set \$language." 1>&2
- exit 1
- ;;
- *:ada:no:*)
- # Ada was requested with no preexisting GNAT. Disable unconditionally.
- add_this_lang=no
- ;;
- *,${language},*:*:*:*)
+ if test x${language} = x; then
+ echo "${lang_frag} doesn't set \$language." 1>&2
+ exit 1
+ fi
+
+ case ,${enable_languages}, in
+ *,${language},*)
# Language was explicitly selected; include it.
add_this_lang=yes
;;
- *,all,*:*:*:no)
- # 'all' was selected, but this is not a default language
- # so do not include it.
- add_this_lang=no
- ;;
- *,all,*:*:*:*)
- # 'all' was selected and this is a default language; include it.
- add_this_lang=yes
+ *,all,*)
+ # 'all' was selected, select it if it is a default language
+ add_this_lang=${build_by_default}
;;
*)
add_this_lang=no
;;
esac
- # Disable languages that need GMP if it isn't available.
- case ,${enable_languages},:${have_gmp}:${need_gmp} in
- *,${language},*:no:yes)
+ # Disable languages that need other directories if these aren't available.
+ for i in $subdir_requires; do
+ test -f "$srcdir/gcc/$i/config-lang.in" && continue
+ case ,${enable_languages}, in
+ *,${language},*)
+ # Specifically requested language; tell them.
+ AC_MSG_ERROR([The gcc/$i directory contains parts of $language but is missing])
+ ;;
+ *)
+ # Silently disable.
+ add_this_lang=unsupported
+ ;;
+ esac
+ done
+
+ # Disable Ada if no preexisting GNAT is available.
+ case ,${enable_languages},:${language}:${have_gnat} in
+ *,${language},*:ada:no)
# Specifically requested language; tell them.
- AC_MSG_ERROR([GMP with MPFR support is required to build $language])
+ AC_MSG_ERROR([GNAT is required to build $language])
;;
- *:no:yes)
+ *:ada:no)
# Silently disable.
- add_this_lang=no
+ add_this_lang=unsupported
;;
esac
# Disable a language that is unsupported by the target.
case " $unsupported_languages " in
*" $language "*)
- add_this_lang=no
+ add_this_lang=unsupported
;;
esac
case $add_this_lang in
- no)
+ unsupported)
# Remove language-dependent dirs.
eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
;;
- *)
- new_enable_languages="$new_enable_languages,$language"
+ no)
+ # Remove language-dependent dirs; still show language as supported.
+ eval noconfigdirs='"$noconfigdirs "'\"$target_libs $lang_dirs\"
+ potential_languages="${potential_languages}${language},"
+ ;;
+ yes)
+ new_enable_languages="${new_enable_languages}${language},"
+ potential_languages="${potential_languages}${language},"
missing_languages=`echo "$missing_languages" | sed "s/,$language,/,/"`
case ${boot_language} in
yes)
# Add to (comma-separated) list of stage 1 languages.
- stage1_languages="${stage1_languages},${language}"
+ stage1_languages="${stage1_languages}${language},"
;;
esac
;;
@@ -1304,18 +1364,56 @@ if test -d ${srcdir}/gcc; then
esac
done
+ AC_ARG_ENABLE(stage1-languages,
+[ --enable-stage1-languages[=all] choose additional languages to build during
+ stage1. Mostly useful for compiler development.],
+ [case ,${enable_stage1_languages}, in
+ ,no,|,,)
+ # Set it to something that will have no effect in the loop below
+ enable_stage1_languages=c ;;
+ ,yes,)
+ enable_stage1_languages=`echo $new_enable_languages | \
+ sed -e "s/^,//" -e "s/,$//" ` ;;
+ *,all,*)
+ enable_stage1_languages=`echo ,$enable_stage1_languages, | \
+ sed -e "s/,all,/$new_enable_languages/" -e "s/^,//" -e "s/,$//" ` ;;
+ esac
+
+ # Add "good" languages from enable_stage1_languages to stage1_languages,
+ # while "bad" languages go in missing_languages. Leave no duplicates.
+ for i in `echo $enable_stage1_languages | sed 's/,/ /g' `; do
+ case $potential_languages in
+ *,$i,*)
+ case $stage1_languages in
+ *,$i,*) ;;
+ *) stage1_languages="$stage1_languages$i," ;;
+ esac ;;
+ *)
+ case $missing_languages in
+ *,$i,*) ;;
+ *) missing_languages="$missing_languages$i," ;;
+ esac ;;
+ esac
+ done])
+
+ # Remove leading/trailing commas that were added for simplicity
+ potential_languages=`echo "$potential_languages" | sed -e "s/^,//" -e "s/,$//"`
missing_languages=`echo "$missing_languages" | sed -e "s/^,//" -e "s/,$//"`
+ stage1_languages=`echo "$stage1_languages" | sed -e "s/^,//" -e "s/,$//"`
+ new_enable_languages=`echo "$new_enable_languages" | sed -e "s/^,//" -e "s/,$//"`
+
if test "x$missing_languages" != x; then
AC_MSG_ERROR([
The following requested languages could not be built: ${missing_languages}
-Recognised languages are: ${potential_languages}])
+Supported languages are: ${potential_languages}])
fi
-
if test "x$new_enable_languages" != "x$enable_languages"; then
echo The following languages will be built: ${new_enable_languages}
+ enable_languages="$new_enable_languages"
fi
- enable_languages="$new_enable_languages"
- ac_configure_args=`echo " $ac_configure_args" | sed -e 's/ --enable-languages=[[^ ]]*//' -e 's/$/ --enable-languages='"$enable_languages"/ `
+
+ AC_SUBST(stage1_languages)
+ ac_configure_args=`echo " $ac_configure_args" | sed -e "s/ '--enable-languages=[[^ ]]*'//g" -e "s/$/ '--enable-languages="$enable_languages"'/" `
fi
# Handle --disable-<component> generically.
@@ -1326,6 +1424,29 @@ for dir in $configdirs $build_configdirs $target_configdirs ; do
fi
done
+# Check for Boehm's garbage collector
+AC_ARG_ENABLE(objc-gc,
+[ --enable-objc-gc enable the use of Boehm's garbage collector with
+ the GNU Objective-C runtime.],
+[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in
+ *,objc,*:*:yes:*target-boehm-gc*)
+ AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration])
+ ;;
+esac])
+
+# Make sure we only build Boehm's garbage collector if required.
+case ,${enable_languages},:${enable_objc_gc} in
+ *,objc,*:yes)
+ # Keep target-boehm-gc if requested for Objective-C.
+ ;;
+ *)
+ # Otherwise remove target-boehm-gc depending on target-libjava.
+ if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then
+ noconfigdirs="$noconfigdirs target-boehm-gc"
+ fi
+ ;;
+esac
+
# Remove the entries in $skipdirs and $noconfigdirs from $configdirs,
# $build_configdirs and $target_configdirs.
# If we have the source for $noconfigdirs entries, add them to $notsupp.
@@ -1367,10 +1488,14 @@ done
# Sometimes the tools are distributed with libiberty but with no other
# libraries. In that case, we don't want to build target-libiberty.
+# Don't let libgcc imply libiberty either.
if test -n "${target_configdirs}" ; then
+ libgcc=
others=
for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
- if test "$i" != "libiberty" ; then
+ if test "$i" = "libgcc"; then
+ libgcc=target-libgcc
+ elif test "$i" != "libiberty" ; then
if test -r $srcdir/$i/configure ; then
others=yes;
break;
@@ -1378,7 +1503,7 @@ if test -n "${target_configdirs}" ; then
fi
done
if test -z "${others}" ; then
- target_configdirs=
+ target_configdirs=$libgcc
fi
fi
@@ -1451,6 +1576,9 @@ case "$host" in
enable_gdbtk=no ;;
esac
+# To find our prefix, in gcc_cv_tool_prefix.
+ACX_TOOL_DIRS
+
copy_dirs=
AC_ARG_WITH([build-sysroot],
@@ -1470,11 +1598,8 @@ if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
exit 1
fi
if test x"${with_headers}" != xyes ; then
- case "${exec_prefixoption}" in
- "") x=${prefix} ;;
- *) x=${exec_prefix} ;;
- esac
- copy_dirs="${copy_dirs} ${with_headers} $x/${target_alias}/sys-include"
+ x=${gcc_cv_tool_prefix}
+ copy_dirs="${copy_dirs} ${with_headers} $x/${target_noncanonical}/sys-include"
fi
fi
@@ -1489,12 +1614,9 @@ if test x"${with_libs}" != x && test x"${with_libs}" != xno ; then
if test x"${with_libs}" != xyes ; then
# Copy the libraries in reverse order, so that files in the first named
# library override files in subsequent libraries.
- case "${exec_prefixoption}" in
- "") x=${prefix} ;;
- *) x=${exec_prefix} ;;
- esac
+ x=${gcc_cv_tool_prefix}
for l in ${with_libs}; do
- copy_dirs="$l $x/${target_alias}/lib ${copy_dirs}"
+ copy_dirs="$l $x/${target_noncanonical}/lib ${copy_dirs}"
done
fi
fi
@@ -1617,6 +1739,12 @@ extra_nmflags_for_target=
extra_ranlibflags_for_target=
target_makefile_frag=/dev/null
case "${target}" in
+ mep*-*-*)
+ target_makefile_frag="config/mt-mep"
+ ;;
+ spu-*-*)
+ target_makefile_frag="config/mt-spu"
+ ;;
*-*-netware*)
target_makefile_frag="config/mt-netware"
;;
@@ -1691,7 +1819,7 @@ esac
# Some systems (e.g., one of the i386-aix systems the gas testers are
# using) don't handle "\$" correctly, so don't use it here.
-tooldir='${exec_prefix}'/${target_alias}
+tooldir='${exec_prefix}'/${target_noncanonical}
build_tooldir=${tooldir}
# Create a .gdbinit file which runs the one in srcdir
@@ -1875,7 +2003,7 @@ for module in ${build_configdirs} ; do
done
for module in ${configdirs} ; do
if test -z "${no_recursion}"; then
- for file in stage*-${module}/Makefile ${module}/Makefile; do
+ for file in stage*-${module}/Makefile prev-${module}/Makefile ${module}/Makefile; do
if test -f ${file}; then
echo 1>&2 "*** removing ${file} to force reconfigure"
rm -f ${file}
@@ -1955,40 +2083,87 @@ serialization_dependencies=serdep.tmp
AC_SUBST_FILE(serialization_dependencies)
# Base args. Strip norecursion, cache-file, srcdir, host, build,
-# target and nonopt. These are the ones we might not want to pass
-# down to subconfigures. Also strip program-prefix, program-suffix,
-# and program-transform-name, so that we can pass down a consistent
-# program-transform-name. If autoconf has put single quotes around
-# any of these arguments (because they contain shell metacharacters)
-# then this will fail; in practice this only happens for
-# --program-transform-name, so be sure to override --program-transform-name
-# at the end of the argument list.
-# These will be expanded by make, so quote '$'.
-cat <<\EOF_SED > conftestsed
-s/ --no[[^ ]]*/ /g
-s/ --c[[a-z-]]*[[= ]][[^ ]]*//g
-s/ --sr[[a-z-]]*[[= ]][[^ ]]*//g
-s/ --ho[[a-z-]]*[[= ]][[^ ]]*//g
-s/ --bu[[a-z-]]*[[= ]][[^ ]]*//g
-s/ --t[[a-z-]]*[[= ]][[^ ]]*//g
-s/ --program-[[pst]][[a-z-]]*[[= ]][[^ ]]*//g
-s/ -cache-file[[= ]][[^ ]]*//g
-s/ -srcdir[[= ]][[^ ]]*//g
-s/ -host[[= ]][[^ ]]*//g
-s/ -build[[= ]][[^ ]]*//g
-s/ -target[[= ]][[^ ]]*//g
-s/ -program-prefix[[= ]][[^ ]]*//g
-s/ -program-suffix[[= ]][[^ ]]*//g
-s/ -program-transform-name[[= ]][[^ ]]*//g
-s/ [[^' -][^ ]*] / /
-s/^ *//;s/ *$//
-s,\$,$$,g
-EOF_SED
-sed -f conftestsed <<EOF_SED > conftestsed.out
- ${ac_configure_args}
-EOF_SED
-baseargs=`cat conftestsed.out`
-rm -f conftestsed conftestsed.out
+# target, nonopt, and variable assignments. These are the ones we
+# might not want to pass down to subconfigures. Also strip
+# program-prefix, program-suffix, and program-transform-name, so that
+# we can pass down a consistent program-transform-name.
+baseargs=
+keep_next=no
+skip_next=no
+eval "set -- $ac_configure_args"
+for ac_arg
+do
+ if test X"$skip_next" = X"yes"; then
+ skip_next=no
+ continue
+ fi
+ if test X"$keep_next" = X"yes"; then
+ case $ac_arg in
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ baseargs="$baseargs '$ac_arg'"
+ keep_next=no
+ continue
+ fi
+
+ # Handle separated arguments. Based on the logic generated by
+ # autoconf 2.59.
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ separate_arg=no
+ ;;
+ -*)
+ separate_arg=yes
+ ;;
+ *)
+ separate_arg=no
+ ;;
+ esac
+
+ case "$ac_arg" in
+ --no*)
+ continue
+ ;;
+ --c* | \
+ --sr* | \
+ --ho* | \
+ --bu* | \
+ --t* | \
+ --program-* | \
+ -cache_file* | \
+ -srcdir* | \
+ -host* | \
+ -build* | \
+ -target* | \
+ -program-prefix* | \
+ -program-suffix* | \
+ -program-transform-name* )
+ skip_next=$separate_arg
+ continue
+ ;;
+ -*)
+ # An option. Add it.
+ case $ac_arg in
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ baseargs="$baseargs '$ac_arg'"
+ keep_next=$separate_arg
+ ;;
+ *)
+ # Either a variable assignment, or a nonopt (triplet). Don't
+ # pass it down; let the Makefile handle this.
+ continue
+ ;;
+ esac
+done
+# Remove the initial space we just introduced and, as these will be
+# expanded by make, quote '$'.
+baseargs=`echo "x$baseargs" | sed -e 's/^x *//' -e 's,\\$,$$,g'`
# Add in --program-transform-name, after --program-prefix and
# --program-suffix have been applied to it. Autoconf has already
@@ -2007,7 +2182,7 @@ baseargs="$baseargs --program-transform-name='${gcc_transform_name}'"
# 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.
-build_configargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} --target=${target_alias} ${baseargs}"
+build_configargs="--cache-file=../config.cache ${baseargs}"
# For host modules, accept cache file option, or specification as blank.
case "${cache_file}" in
@@ -2021,7 +2196,7 @@ esac
# Host dirs don't like to share a cache file either, horribly enough.
# This seems to be due to autoconf 2.5x stupidity.
-host_configargs="--cache-file=./config.cache --build=${build_alias} --host=${host_alias} --target=${target_alias} ${extra_host_args} ${baseargs}"
+host_configargs="--cache-file=./config.cache ${extra_host_args} ${baseargs}"
target_configargs=${baseargs}
@@ -2031,7 +2206,7 @@ target_configargs=${baseargs}
# sorts of decisions they want to make on this basis. Please consider
# this option to be deprecated. FIXME.
if test x${is_cross_compiler} = xyes ; then
- target_configargs="--with-cross-host=${host_alias} ${target_configargs}"
+ target_configargs="--with-cross-host=${host_noncanonical} ${target_configargs}"
fi
# Default to --enable-multilib.
@@ -2057,7 +2232,7 @@ fi
# Pass the appropriate --build, --host, --target and --cache-file arguments.
# We need to pass --target, as newer autoconf's requires consistency
# for target_alias and gcc doesn't manage it consistently.
-target_configargs="--cache-file=./config.cache --build=${build_alias} --host=${target_alias} --target=${target_alias} ${target_configargs}"
+target_configargs="--cache-file=./config.cache ${target_configargs}"
FLAGS_FOR_TARGET=
case " $target_configdirs " in
@@ -2109,6 +2284,11 @@ case " $target_configdirs " in
esac
;;
esac
+case "$target" in
+*-mingw*)
+ # Can't be handled as Cygwin above since Mingw does not use newlib.
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/mingw -L$$r/$(TARGET_SUBDIR)/winsup/w32api/lib -isystem $$s/winsup/mingw/include -isystem $$s/winsup/w32api/include' ;;
+esac
# Allow the user to override the flags for
# our build compiler if desired.
@@ -2129,6 +2309,23 @@ if test "x${use_gnu_ld}" = x &&
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(HOST_SUBDIR)/ld'
fi
+# Search for other target-specific linker scripts and such.
+case "${target}" in
+ m32c-*-* )
+ if test -d ${srcdir}/libgloss/m32c; then
+ # This is for crt0.o
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/libgloss/m32c'
+ # This is for r8c.ld
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/m32c'
+ # This is for libnosys.a
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/libgloss/libnosys'
+ fi
+ ;;
+ mep*)
+ FLAGS_FOR_TARGET="$FLAGS_FOR_TARGET -mlibrary"
+ ;;
+esac
+
# Makefile fragments.
for frag in host_makefile_frag target_makefile_frag alphaieee_frag ospace_frag;
do
@@ -2227,7 +2424,7 @@ esac
AC_CHECK_PROGS(RUNTEST, runtest, runtest)
case " $configdirs " in
*" dejagnu "*)
- test $host = $build && RUNTEST='$$r/$(HOST_SUBDIR)/dejagnu/runtest'
+ test $host = $build && RUNTEST='$$s/$(HOST_SUBDIR)/dejagnu/runtest'
;;
esac
@@ -2363,21 +2560,50 @@ case $build in
yes) stage1_cflags="-g -Wa,-J" ;;
*) stage1_cflags="-g -J" ;;
esac ;;
- powerpc-*-darwin*)
- # The spiffy cpp-precomp chokes on some legitimate constructs in GCC
- # sources; use -no-cpp-precomp to get to GNU cpp.
- # Apple's GCC has bugs in designated initializer handling, so disable
- # that too.
- stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0"
- ;;
esac
+
+# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems.
+if test "$GCC" = yes; then
+ saved_CFLAGS="$CFLAGS"
+
+ # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it.
+ CFLAGS="$CFLAGS -fkeep-inline-functions"
+ AC_MSG_CHECKING([whether -fkeep-inline-functions is supported])
+ AC_TRY_COMPILE([
+#if (__GNUC__ < 3) \
+ || (__GNUC__ == 3 && (__GNUC_MINOR__ < 3 \
+ || (__GNUC_MINOR__ == 3 && __GNUC_PATCHLEVEL__ < 1)))
+#error http://gcc.gnu.org/PR29382
+#endif
+ ],,
+ [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"],
+ [AC_MSG_RESULT([no])])
+
+ CFLAGS="$saved_CFLAGS"
+fi
+
AC_SUBST(stage1_cflags)
+# Enable --enable-checking in stage1 of the compiler.
+AC_ARG_ENABLE(stage1-checking,
+[ --enable-stage1-checking[=all] choose additional checking for stage1
+ of the compiler.],
+[stage1_checking=--enable-checking=${enable_stage1_checking}],
+[if test "x$enable_checking" = xno; then
+ stage1_checking=--enable-checking
+else
+ stage1_checking=--enable-checking${enable_checking+=}$enable_checking
+fi])
+AC_SUBST(stage1_checking)
+
# Enable -Werror in bootstrap stage2 and later.
-# Change the default to "no" on release branches.
AC_ARG_ENABLE(werror,
[ --enable-werror enable -Werror in bootstrap stage2 and later], [],
-[enable_werror=yes])
+[if test -d ${srcdir}/gcc && test x"`cat $srcdir/gcc/DEV-PHASE`" = xexperimental; then
+ enable_werror=yes
+else
+ enable_werror=no
+fi])
case ${enable_werror} in
yes) stage2_werror_flag="--enable-werror-always" ;;
*) stage2_werror_flag="" ;;
@@ -2395,6 +2621,11 @@ AC_ARG_WITH(docdir,
[docdir="\${prefix}/${withval}"],
[docdir="\${datarootdir}/doc"])
+AC_ARG_WITH(pdfdir,
+[ --with-pdfdir Install pdf in this directory.],
+[pdfdir="\${prefix}/${withval}"],
+[pdfdir="\${docdir}"])
+
AC_ARG_WITH(htmldir,
[ --with-htmldir Install html in this directory.],
[htmldir="\${prefix}/${withval}"],
@@ -2402,6 +2633,7 @@ AC_ARG_WITH(htmldir,
AC_SUBST(datarootdir)
AC_SUBST(docdir)
+AC_SUBST(pdfdir)
AC_SUBST(htmldir)
AC_OUTPUT(Makefile)
diff --git a/contrib/binutils/etc/ChangeLog b/contrib/binutils/etc/ChangeLog
index a5959c7..42e16c1 100644
--- a/contrib/binutils/etc/ChangeLog
+++ b/contrib/binutils/etc/ChangeLog
@@ -1,3 +1,26 @@
+2007-04-04 Eric Christopher <echristo@apple.com>
+
+ Move from gcc:
+ 2007-04-04 Zack Weinberg <zack@mrtock.ucsd.edu>
+
+ * texi2pod.pl: Correct handling of @itemize with no argument.
+
+ 2007-02-16 Matthias Klose <doko@debian.org>
+
+ * texi2pod.pl: Handle @subsubsection, ignore @anchor.
+
+ 2007-02-06 Richard Sandiford <richard@codesourcery.com>
+
+ * texi2pod.pl: Handle @multitable.
+
+2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * Makefile.in: Add support for "pdf" and "install-pdf" targets.
+
+2006-12-19 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.texi: Fix botched commit.
+
2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
* texi2pod.pl: Correct handling of absolute @include.
@@ -16,15 +39,15 @@
2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
- * Makefile.in: TEXI2HTML uses makeinfo. Define
+ * Makefile.in: TEXI2HTML uses makeinfo. Define
HTMLFILES. Add html targets.
- * configure.texi: Use ifnottex. Add alternative
+ * configure.texi: Use ifnottex. Add alternative
image format specifier as jpg.
* standards.texi: Use ifnottex.
2005-10-21 Mark Mitchell <mark@codesourcery.com>
- * texi2pod.pl: Substitue for @value even when part of @include.
+ * texi2pod.pl: Substitue for @value even when part of @include.
2005-10-21 Bob Wilson <bob.wilson@acm.org>
@@ -594,4 +617,3 @@ Mon Nov 16 16:50:43 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
Sun Oct 11 16:05:48 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
* intro.texi: added INFO-DIR-ENTRY
-
diff --git a/contrib/binutils/etc/Makefile.in b/contrib/binutils/etc/Makefile.in
index 7d0607d..9642e07 100644
--- a/contrib/binutils/etc/Makefile.in
+++ b/contrib/binutils/etc/Makefile.in
@@ -28,6 +28,7 @@ man9dir = $(mandir)/man9
datarootdir = @datarootdir@
docdir = @docdir@
infodir = @infodir@
+pdfdir = @docdir@
htmldir = @htmldir@
SHELL = /bin/sh
@@ -42,6 +43,9 @@ MAKEINFO = `if [ -f ../texinfo/makeinfo/makeinfo ]; \
TEXI2DVI = `if [ -f ../texinfo/util/texi2dvi ]; \
then echo ../texinfo/util/texi2dvi; \
else echo texi2dvi; fi`
+TEXI2PDF = `if [ -f ../texinfo/util/texi2dvi ]; \
+ then echo "../texinfo/util/texi2dvi --pdf"; \
+ else echo "texi2dvi --pdf"; fi`
TEXI2HTML = `if [ -f ../texinfo/makeinfo/makeinfo ]; \
then echo "../texinfo/makeinfo/makeinfo --html"; \
else echo "makeinfo --html"; fi`
@@ -56,6 +60,7 @@ TEXIDIR = $(srcdir)/../texinfo
INFOFILES = standards.info configure.info
DVIFILES = standards.dvi configure.dvi
+PDFFILES = standards.pdf configure.pdf
HTMLFILES = standards.html configure.html
all: info
@@ -126,6 +131,32 @@ dvi:
fi; \
done
+pdf:
+ for f in $(PDFFILES); do \
+ if test -f $(srcdir)/`echo $$f | sed -e 's/.pdf$$/.texi/'`; then \
+ if $(MAKE) "TEXI2PDF=$(TEXI2PDF)" $$f; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ done
+
+install-pdf: pdf
+ $(SHELL) $(srcdir)/../mkinstalldirs $(DESTDIR)$(pdfdir)/etc
+ if test ! -f standards.pdf; then cd $(srcdir); fi; \
+ if test -f standards.pdf; then \
+ for i in standards.pdf*; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(pdfdir)/etc/$$i; \
+ done; \
+ fi
+ if test ! -f configure.pdf; then cd $(srcdir); fi; \
+ if test -f configure.pdf; then \
+ for i in configure.pdf*; do \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(pdfdir)/etc/$$i; \
+ done; \
+ fi
+
standards.info: $(srcdir)/standards.texi $(srcdir)/make-stds.texi
$(MAKEINFO) --no-split -I$(srcdir) -o standards.info $(srcdir)/standards.texi
@@ -138,6 +169,9 @@ standards.dvi: $(srcdir)/standards.texi
standards.ps: standards.dvi
$(DVIPS) standards.dvi -o standards.ps
+standards.pdf: $(srcdir)/standards.texi
+ TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/standards.texi
+
# makeinfo requires images to be in the current directory.
configure.info: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin
rm -f configdev.txt configbuild.txt
@@ -166,6 +200,13 @@ configure.ps: configure.dvi $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
$(DVIPS) configure.dvi -o configure.ps
rm -f configdev.eps configbuild.eps
+configure.pdf: $(srcdir)/configure.texi $(srcdir)/configdev.tin $(srcdir)/configbuild.tin $(srcdir)/configdev.ein $(srcdir)/configbuild.ein
+ rm -f configdev.pdf configbuild.pdf
+ epstopdf $(srcdir)/configdev.ein -outfile=configdev.pdf
+ epstopdf $(srcdir)/configbuild.ein -outfile=configbuild.pdf
+ TEXINPUTS=$(TEXIDIR):$$TEXINPUTS $(TEXI2PDF) $(srcdir)/configure.texi
+ rm -f configdev.pdf configbuild.pdf
+
configure.html: $(srcdir)/configure.texi
cp $(srcdir)/configdev.jin configdev.jpg
cp $(srcdir)/configbuild.jin configbuild.jpg
diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog
index 1723944..704e6f9 100644
--- a/contrib/binutils/gas/ChangeLog
+++ b/contrib/binutils/gas/ChangeLog
@@ -1,758 +1,1294 @@
-2006-07-19 Mat Hostetter <mat@lcs.mit.edu>
+2007-07-03 Nathan Sidwell <nathan@codesourcery.com>
- * symbols.c (report_op_error): Fix pasto. Don't use as_bad_where
- when file and line unknown.
+ * config/tc-m68k.c (m68k_ip): Add j & K operand types.
+ (install_operand): Add E encoding.
+ (md_begin): Check and skip initial '.' arg character.
+ (get_num): Add 0..511 case.
-2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+2007-07-03 Alan Modra <amodra@bigpond.net.au>
- * po/Make-in (pdf, ps): New dummy targets.
+ PR 4713
+ * config/obj-elf.c (elf_ecoff_set_ext): Make static when OBJ_MAYBE_ELF.
+ * config/obj-elf.h (obj_ecoff_set_ext): Comment.
-2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
+2007-07-03 Mikkel Lauritsen <renard@nospam.dk>
- * doc/Makefile.am (TEXI2DVI): Define.
+ PR 4722
+ * app.c (do_scrub_chars <state 5>): Check for output buffer full
+ after memcpy.
+
+2007-07-02 Joseph Myers <joseph@codesourcery.com>
+
+ * config/tc-mips.c (s_dtprelword, s_dtpreldword,
+ s_dtprel_internal): New.
+ (mips_pseudo_table): Add .dtprelword and .dtpreldword.
+ (md_apply_fix): Handle BFD_RELOC_MIPS_TLS_DTPREL32 and
+ BFD_RELOC_MIPS_TLS_DTPREL64.
+
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
* doc/Makefile.in: Regenerate.
- * doc/c-arc.texi: Fix typo.
+ * po/POTFILES.in: Regenerate.
+ * po/gas.pot: Regenerate.
-2006-05-30 Nick Clifton <nickc@redhat.com>
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
- * po/es.po: Updated Spanish translation.
+ * config/tc-ppc.c (ppc_pe_section): Comment out code assigning
+ coff section flag values to bfd section flag.
-2006-05-25 Nathan Sidwell <nathan@codesourcery.com>
+2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
- * gas/config/tc-m68k.c (m68k_init_arch): Move checking of
- cfloat/m68881 to correct architecture before using it.
+ * aclocal.m4: Regenerated.
+ * doc/Makefile.in: Likewise.
+ * Makefile.in: Likewise.
-2006-05-16 Nick Clifton <nickc@redhat.com>
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
- * Import these patches from the mainline:
+ * as.c (main): Only call create_obj_attrs_section if IS_ELF.
- 2006-05-16 Bjoern Haase <bjoern.m.haase@web.de>
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
- * config/tc-avr.h (TC_VALIDATE_FIX): Allow fixups for immediate
- constant values.
+ * as.c (create_obj_attrs_section): New.
+ (main): Call create_obj_attrs_section for ELF.
+ * read.c (s_gnu_attribute, skip_whitespace, skip_past_char,
+ skip_past_comma, s_vendor_attribute): New.
+ (potable): Add gnu_attribute for ELF.
+ * read.h (s_vendor_attribute): Declare.
+ * config/tc-arm.c (s_arm_eabi_attribute): Replace by wrapper
+ round s_vendor_attribute.
+ (aeabi_set_public_attributes): Update for new attributes
+ interfaces.
+ (arm_md_end): Remove attributes contents setting now done
+ generically.
- 2006-05-05 Bjoern Haase <bjoern.m.haase@web.de>
+2007-06-29 M R Swami Reddy <MR.Swami.Redd@nsc.com>
- * gas/config/tc-avr.h (TC_VALIDATE_FIX): Define. Disable fixups
- for PMEM related expressions.
+ * Makefile.am: Add CR16 related entry.
+ * Makefile.in: Regenerate.
+ * config/tc-cr16.h: New file
+ * config/tc-cr16.c: New file
+ * doc/c-cr16.texi: New file for cr16
+ * doc/all.texi: Entry for cr16
+ * doc/Makefile.am: Added c-cr16.texi
+ * doc/Makefile.in: Regenerate
+ * doc/as.texinfo: Entry for CR16 target
+ * NEWS: Announce the support for the new target.
-2006-05-11 Thiemo Seufer <ths@mips.com>
+2007-06-26 Paul Brook <paul@codesourcery.com>
- * config/tc-mips.c (append_insn): Don't check the range of j or
- jal addresses.
+ * config/tc-arm.c (parse_operands): Accept generic coprocessor regs
+ for OP_RVC.
+ (reg_names): Add fpinst, pfinst2, mvfr0 and mvfr1.
-2006-05-10 Alan Modra <amodra@bigpond.net.au>
+2007-06-25 H.J. Lu <hongjiu.lu@intel.com>
- * dwarf2dbg.c (get_line_subseg): Attach new struct line_seg to end
- of list rather than beginning.
+ * config/tc-i386.c (process_operands): Replace regKludge
+ with RegKludge.
-2006-05-10 Alan Modra <amodra@bigpond.net.au>
+2007-06-25 Richard Sandiford <richard@codesourcery.com>
- * write.c (relax_segment): Add pass count arg. Don't error on
- negative org/space on first two passes.
- (relax_seg_info): New struct.
- (relax_seg, write_object_file): Adjust.
- * write.h (relax_segment): Update prototype.
+ * config/tc-mips.h (TC_SYMFIELD_TYPE): New.
+ * config/tc-mips.c (append_insn): Record which symbols have
+ R_MIPS16_26 relocations against them.
+ (mips_fix_adjustable): Don't reduce relocations against such symbols.
-2006-05-02 Joseph Myers <joseph@codesourcery.com>
+2007-06-22 Sterling Augustine <sterling@tensilica.com>
- * config/tc-arm.c (do_iwmmxt_wldstbh): Don't multiply offset by 4
- here.
- (md_apply_fix3): Multiply offset by 4 here for
- BFD_RELOC_ARM_CP_OFF_IMM_S2 and BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
+ * config/tc-xtensa.c (xg_assembly_relax): Comment termination rules.
+ (frag_format_size): Handle RELAX_IMMED_STEP3.
+ (xtensa_relax_frag, md_convert_frag): Likewise.
+ * config/tc-xtensa.h (xtensa_relax_statesE): Add RELAX_IMMED_STEP3.
+ (RELAX_IMMED_MAXSTEPS): Adjust.
+ * config/xtensa-relax.c (widen_spec_list): Add transitions from
+ wide branches to branch-over-jumps.
+ (build_transition): Handle wide branches in transition patterns.
+
+2007-06-22 H.J. Lu <hongjiu.lu@intel.com>
-2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+ * config/tc-i386.c (disp_size): New.
+ (imm_size): Likewise.
+ (output_disp): Use disp_size and imm_size.
+ (output_imm): Use imm_size.
- * doc/Makefile.am (AM_MAKEINFOFLAGS): New.
- (TEXI2POD): Use AM_MAKEINFOFLAGS.
- (asconfig.texi): Don't set top_srcdir.
- * doc/as.texinfo: Don't use top_srcdir.
- * aclocal.m4, Makefile.in, doc/Makefile.in: Regenerated.
+2007-06-19 Sterling Augustine <sterling@tensilica.com>
-2006-05-02 Paul Brook <paul@codesourcery.com>
+ * config/tc-xtensa.h (struct xtensa_frag_type): Update comment about
+ use of literal_frag field.
+ * config/tc-xtensa.c (xtensa_mark_literal_pool_location): Record frag
+ in the literal_frag field.
+ (xtensa_move_literals): Use it here instead of searching. Update
+ literal_frag field with new value.
- * config/tc-arm.c (arm_optimize_expr): New function.
- * config/tc-arm.h (md_optimize_expr): Define
- (arm_optimize_expr): Add prototype.
- (TC_FORCE_RELOCATION_SUB_SAME): Define.
+2007-06-14 Paul Brook <paul@codesourcery.com>
-2006-05-01 James Lemke <jwlemke@wasabisystems.com>
+ * config/tc-arm.c (do_t_mov_cmp): Handle shift by register and
+ narrow shift by immediate.
- * subsegs.c (subseg_set_rest): Always set seginfp->frchainP if NULL.
+2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
-2006-04-25 Bob Wilson <bob.wilson@acm.org>
+ * Makefile.am (ACLOCAL_AMFLAGS): Add -I ../config -I ../bfd.
- * config/xtensa-relax.c (widen_spec_list): Use new "WIDE.<opcode>"
- syntax instead of hardcoded opcodes with ".w18" suffixes.
- (wide_branch_opcode): New.
- (build_transition): Use it to check for wide branch opcodes with
- either ".w18" or ".w15" suffixes.
+ * acinclude.m4: Don't include m4 files.
+ (BFD_BINARY_FOPEN): Removed.
+ Remove libtool kludge.
-2006-04-25 Bob Wilson <bob.wilson@acm.org>
+ * Makefile.in: Regenerated.
+ * doc/Makefile.in: Likewise.
+ * aclocal.m4: Likewise.
+ * configure: Likewise.
- * config/tc-xtensa.c (xtensa_create_literal_symbol,
- xg_assemble_literal, xg_assemble_literal_space): Do not set the
- frag's is_literal flag.
+2007-06-11 Sterling Augustine <sterling@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to...
+ (XTENSA_PROP_NO_TRANSFORM): ...this.
+ (frag_flags_struct): Move is_no_transform out of the insn sub-struct.
+ (xtensa_mark_frags_for_org): New.
+ (xtensa_handle_align): Set RELAX_ORG frag subtype for rs_org.
+ (xtensa_post_relax_hook): Call xtensa_mark_frags_for_org.
+ (get_frag_property_flags): Adjust reference to is_no_transform flag.
+ (xtensa_frag_flags_combinable): Likewise.
+ (frag_flags_to_number): Likewise. Use XTENSA_PROP_NO_TRANSFORM.
+ * config/tc-xtensa.h (xtensa_relax_statesE): Add RELAX_ORG.
+
+2007-06-06 Paul Brook <paul@codesourcery.com>
-2006-04-25 Bob Wilson <bob.wilson@acm.org>
+ * config/tc-arm.c (s_align): Pad code sections appropriately.
- * config/xtensa-relax.c (XCHAL_HAVE_WIDE_BRANCHES): Provide default.
+2007-06-05 Paul Brook <paul@codesourcery.com>
-2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+ * config/tc-arm.c (insns): Correct Thumb-2 ldrd/strd opcodes.
- * po/POTFILES.in: Regenerated.
+2007-06-05 Nick Clifton <nickc@redhat.com>
-2006-04-14 Sterling Augustine <sterling@tensilica.com>
+ PR gas/4587
+ * config/tc-sparc.c (sparc_ip): Terminate tls_ops array.
- * config/tc-xtensa.c (emit_single_op): Do not relax MOVI
- instructions when such transformations have been disabled.
+2007-06-05 Alan Modra <amodra@bigpond.net.au>
-2006-04-10 Sterling Augustine <sterling@tensilica.com>
+ * config/tc-spu.c (spu_cons): Use deferred_expression. Handle
+ number@ppu.
+ (tc_gen_reloc): Abort if neither addsy or subsy is set.
+ (md_apply_fix): Don't attempt to resolve SPU_PPU relocs.
+ * config/tc-spu.h (md_operand): Handle @ppu without sym.
- * config/tc-xtensa.c (xg_assemble_vliw_tokens): Record loop target
- symbols in RELAX[_CHECK]_ALIGN_NEXT_OPCODE frags.
- (xtensa_fix_close_loop_end_frags): Use the recorded values instead of
- decoding the loop instructions. Remove current_offset variable.
- (xtensa_fix_short_loop_frags): Likewise.
- (min_bytes_to_other_loop_end): Remove current_offset argument.
+2007-05-31 Paul Brook <paul@codesourcery.com>
-2006-04-09 Arnold Metselaar <arnold.metselaar@planet.nl>
+ * config/tc-arm.c (insns): Allow strex on M profile cores.
- * config/tc-z80.c (z80_optimize_expr): Removed; redundant since 2006-04-04.
- * config/tc-z80.h (z80_optimize_expr, md_optimize_expr): Removed.
+2007-05-29 David S. Miller <davem@davemloft.net>
+ Jakub Jelinek <jakub@redhat.com>
-2006-04-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
+ PR gas/4558
+ * config/tc-sparc.c (md_apply_fix): Fix relocation overflow checks
+ for BFD_RELOC_SPARC_WDISP16 and BFD_RELOC_SPARC_WDISP19.
- * gas/config/tc-avr.c (mcu_types): Add support for attiny261,
- attiny461, attiny861, attiny25, attiny45, attiny85,attiny24,
- attiny44, attiny84, at90pwm2, at90pwm3, atmega164, atmega324,
- atmega644, atmega329, atmega3290, atmega649, atmega6490,
- atmega406, atmega640, atmega1280, atmega1281, at90can32,
- at90can64, at90usb646, at90usb647, at90usb1286 and
- at90usb1287.
- Move atmega48 and atmega88 from AVR_ISA_M8 to AVR_ISA_PWMx.
+2007-05-29 Alan Modra <amodra@bigpond.net.au>
-2006-04-07 Paul Brook <paul@codesourcery.com>
+ * config/tc-spu.h: Wrap in #ifndef/#endif. Delete coff macros.
- * config/tc-arm.c (parse_operands): Set default error message.
+2007-05-29 Alan Modra <amodra@bigpond.net.au>
-2006-04-07 Paul Brook <paul@codesourcery.com>
+ * config/tc-ppc.c: Convert to ISO C.
+ * config/tc-ppc.c: Likewise.
- * config/tc-arm.c (parse_tb): Set inst.error before returning FAIL.
+2007-05-29 Alan Modra <amodra@bigpond.net.au>
-2006-04-07 Paul Brook <paul@codesourcery.com>
+ * write.h (EXEC_MACHINE_TYPE): Delete.
+ (string_byte_count, section_alignment): Delete.
- * config/tc-arm.c (md_apply_fix): Set H bit on blx instruction.
+2007-05-28 Nathan Sidwell <nathan@codesourcery.com>
-2006-04-07 Paul Brook <paul@codesourcery.com>
+ * app.c (do_scrub_chars): Cope with \ at end of buffer.
- * config/tc-arm.c (THUMB2_LOAD_BIT): Define.
- (move_or_literal_pool): Handle Thumb-2 instructions.
- (do_t_ldst): Call move_or_literal_pool for =N addressing modes.
+2007-05-26 Alan Modra <amodra@bigpond.net.au>
-2006-04-07 Alan Modra <amodra@bigpond.net.au>
+ * config/tc-ppc.c (ppc_insert_operand): Truncate sign bits in
+ top 32 bits of 64 bit value if so doing results in passing
+ range check. Rewrite sign extension fudges similarly. Enable
+ fudges for powerpc64 too. Report user value if range check
+ fails rather than fudged value. Negate PPC_OPERAND_NEGATIVE
+ range rather than value, also to report user value on failure.
- PR 2512.
- * config/tc-i386.c (match_template): Move 64-bit operand tests
- inside loop.
+2007-03-25 Paul Brook <paul@codesourcery.com>
-2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+ * config/tc-arm.c (T2_SUBS_PC_LR): Define.
+ (do_t_add_sub): Correctly encode subs pc, lr, #const.
+ (do_t_mov_cmp): Correctly encode movs pc, lr.
- * po/Make-in: Add install-html target.
- * Makefile.am: Add install-html and install-html-recursive targets.
- * Makefile.in: Regenerate.
- * configure.in: AC_SUBST datarootdir, docdir, htmldir.
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
+
+ * Makefile.in: Regnerate.
* configure: Regenerate.
- * doc/Makefile.am: Add install-html and install-html-am targets.
+ * aclocal.m4: Regenerate.
* doc/Makefile.in: Regenerate.
-2006-04-06 Alan Modra <amodra@bigpond.net.au>
+2007-05-22 Bob Wilson <bob.wilson@acm.org>
+
+ * doc/c-xtensa.texi (Xtensa Automatic Alignment): Remove statements
+ and index entries about automatic alignment of ENTRY instructions.
+
+2007-05-22 Nick Clifton <nickc@redhat.com>
+
+ * doc/as.texinfo: Use @copying around the copyright notice.
+
+2007-05-18 Joseph Myers <joseph@codesourcery.com>
+
+ * config/tc-mips.c (s_mipsset): Use generic s_set for directives
+ containing a comma.
+
+2007-05-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/4517
+ 2003-06-05 Michal Ludvig <mludvig@suse.cz>
+ * doc/as.texinfo: Document new directives: .cfi_restore,
+ .cfi_undefined, .cfi_same_value, .cfi_return_column,
+ .cfi_remember_state and .cfi_restore_state.
+
+2007-05-17 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-m68k.c (md_apply_fix): Show value of out of range
+ fixups in error message.
+ (md_conver_frag_1): Propagate the fix source location and use
+ as_bad_where rather than fatal, for better error messages.
+
+2007-05-16 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (v7m_psrs): Add uppercase PSR names and xpsr.
+
+2007-05-15 Mark Shinwell <shinwell@codesourcery.com>
+
+ * app.c (do_scrub_chars): Don't damage \@ pseudo-variables.
+
+2007-05-15 Vincent Riviere <vincent.riviere@freesbee.fr>
+
+ PR gas/3041
+ * config/tc-m68k.c (relaxable_symbol): Make sure that the correct
+ addend is stored for relocs against weak symbols.
+ (md_apply_fix): So not loose track of addend for relocs against
+ weak symbols.
+
+2007-05-14 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (md_parse_option): Fix parsing of -O option.
+
+2007-05-14 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * config/tc-score.c (data_op2, validate_immediate): Fix bug for
+ addri, addri.c, subi, and subi.c when immediate number is hex.
+ (score_insns): Remove subis and subis.c.
+ (do_sub_rdi16): Delete.
+
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-spu.c (md_pseudo_table): Add int, long, quad. Call
+ spu_cons for word.
+ (md_assemble): Tidy use of insn.flag.
+ (get_imm): Likewise. Handle uppercase input too.
+ (spu_cons): New function.
+ * config/tc-spu.h (tc_fix_adjustable): Don't adjust SPU_PPU relocs.
+ (TC_FORCE_RELOCATION): Don't resolve them either.
+
+2007-05-05 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-arm.c (md_apply_fix): Generate more accurate
+ diagnostic when 8-bit immediate range is exceeded for
+ BFD_RELOC_ARM_OFFSET_IMM8.
+
+2007-05-04 Alan Modra <amodra@bigpond.net.au>
+
+ PR gas/4460
+ * config/tc-i386.c (lex_got): Don't replace the reloc token with
+ a space if we already have a space.
+
+2007-05-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (match_template): Don't explicitly check
+ suffix for crc32 in Intel mode.
+ (process_suffix): Issue an error for crc32 if the operand size
+ is ambiguous.
+
+2007-05-03 Vincent Riviere <vincent.riviere@freesbee.fr>
+ Nick Clifton <nickc@redhat.com>
+
+ PR gas/3041
+ * config/tc-m68k.c (relaxable_symbol): Do not relax weak symbols.
+ (tc_gen_reloc): Adjust the addend of relocs against weak symbols.
+ (md_apply_fix): Put zero values into the frags referencing weak
+ symbols.
+
+2007-05-02 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4448
+ * config/tc-ppc.c (ppc_insert_operand): Don't increase min for
+ PPC_OPERAND_PLUS1.
+
+2007-05-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (match_template): Check suffix for crc32 in
+ Intel mdoe.
+ (process_suffix): Default the suffix of 8bit crc32 to
+ BYTE_MNEM_SUFFIX.
+ (check_byte_reg): Skip check for 8bit crc32.
+
+2007-04-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (md_assemble): Use register_prefix in
+ error/warning message.
+ (check_byte_reg): Likewise.
+ (check_long_reg): Likewise.
+ (check_qword_reg): Likewise.
+ (check_word_reg): Likewise.
+ (process_operands): Likewise.
+
+2007-04-30 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4436
+ * config/tc-ppc.c (ppc_insert_operand): Disable range check if
+ min > max.
+
+2007-04-28 Thiemo Seufer <ths@networkno.de>
+
+ * config/tc-mips.c: Fix comment.
+
+2007-04-26 Anatoly Sokolov <aesok@post.ru>
+
+ * config/tc-avr.c (mcu_types): Add support for atmega8hva and
+ atmega16hva devices. Move at90usb82 device to 'avr5' architecture.
+ * doc/c-avr.texi: Document new devices.
+
+2007-04-24 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2007-04-23 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-m68k.c (mcf54455_ctrl): New.
+ (HAVE_LONG_DISP, HAVE_LONG_CALL, HAVE_LONG_COND): New.
+ (m68k_archs): Add isac.
+ (m68k_cpus): Add 54455 family.
+ (m68k_ip): Split Bg into Bb, Bs, Bg.
+ (m68k_elf_final_processing): Add ISA_C.
+ * doc/c-m68k.texi (M680x0 Options): Add isac.
- * frags.c (frag_offset_fixed_p): Reinitialise offset before
- second scan.
+2007-04-22 Alan Modra <amodra@bigpond.net.au>
-2006-04-05 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
+ * read.c (read_a_source_file): Skip multiple spaces to
+ cover hack in mmix md_start_line_hook which overwrites a
+ colon with a space. Delete sermon and needless assertion.
- * config/tc-sparc.c (sparc_target_format): Handle TE_VXWORKS.
- (GOTT_BASE, GOTT_INDEX): New.
- (tc_gen_reloc): Don't alter relocations against GOTT_BASE and
- GOTT_INDEX when generating VxWorks PIC.
- * configure.tgt (sparc*-*-vxworks*): Remove this special case;
- use the generic *-*-vxworks* stanza instead.
+2007-04-21 Alan Modra <amodra@bigpond.net.au>
-2006-04-04 Alan Modra <amodra@bigpond.net.au>
+ * config/atof-vax.c (atof_vax_sizeof): Change return type to unsigned.
+ (md_atof): Make number_of_chars unsigned. Revert last change.
+ * config/tc-or32.c (md_apply_fix): Delete bogus assertions.
+ * config/tc-sh.c (sh_optimize_expr): Only define for OBJ_ELF.
+ * config/tc-sh.h (md_optimize_expr): Likewise.
+ * config/tc-sh64.c (shmedia_md_pcrel_from_section): Delete bogus
+ assertion.
+ * config/tc-xtensa.c (convert_frag_immed_finish_loop): Likewise.
- PR 997
- * frags.c (frag_offset_fixed_p): New function.
- * frags.h (frag_offset_fixed_p): Declare.
- * expr.c (expr): Use frag_offset_fixed_p when simplifying subtraction.
- (resolve_expression): Likewise.
+2007-04-21 Nick Clifton <nickc@redhat.com>
-2006-04-03 Sterling Augustine <sterling@tensilica.com>
+ * config/atof-vax.c (md_atof): Fix comparison inside know().
- * config/tc-xtensa.c (init_op_placement_info_table): Check for formats
- of the same length but different numbers of slots.
+ * config/tc-ia64.c (emit_one_bundle): Fix typo.
-2006-03-30 Andreas Schwab <schwab@suse.de>
+2007-04-21 Alan Modra <amodra@bigpond.net.au>
- * configure.in: Fix help string for --enable-targets option.
+ * expr.c (expr): Assert on rankarg, not rank which can be unsigned.
+ * read.c (read_a_source_file): Remove buffer_limit[-1] assertion.
+ Don't skip over NUL char.
+ (pseudo_set): Set X_op for registers to O_register.
+ * symbols.c (symbol_clone): Remove assertion that sym is defined.
+ (resolve_symbol_value): Resolve O_register symbols.
+ * config/tc-i386.c (parse_real_register): Don't use i386_float_regtab.
+ Instead find st(0) by hash lookup.
+ * config/tc-ppc.c (ppc_macro): Warning fix.
+
+ * as.h (ENABLE_CHECKING): Default define to 0.
+ (know): Assert if ENABLE_CHECKING.
+ (struct relax_type): Remove superfluous declaration.
+ * configure.in (--enable-checking): New.
* configure: Regenerate.
+ * config.in: Regenerate.
+ * config/tc-ppc.c (ppc_setup_opcodes): Do checks when ENABLE_CHECKING.
+ Check for duplicate powerpc_operands entries.
+
+2007-04-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-m68k.c (mcf5253_ctrl): New.
+ (mcf52223_ctrl): New.
+ (m68k_cpus): Add 5253, 52221, 52223.
+
+ * config/m68k-parse.h (RAMBAR_ALT): New.
+ * config/tc-m68k.c (mcf5206_ctrl, mcf5307_ctrl): New.
+ (mcf_ctrl, mcf5208_ctrl, mcf5210a_ctrl, mcf5213_ctrl, mcf52235_ctrl,
+ mcf5225_ctrl, mcf5235_ctrl, mcf5271_ctrl, mcf5275_ctrl,
+ mcf5282_ctrl, mcf5329_ctrl, mcf5373_ctrl, mcfv4e_ctrl,
+ mcf5475_ctrl, mcf5485_ctrl): Add RAMBAR synonym for
+ RAMBAR1.
+ (mcf5272_ctrl): Add RAMBAR0, replace add RAMBAR with RAMBAR_ALT.
+ (m68k_cpus): Adjust 5206, 5206e & 5307 entries.
+ (m68k_ip) <Case J>: Detect when RAMBAR_ALT should be used. Add it
+ to control register mapping.
+
+2007-04-20 Alan Modra <amodra@bigpond.net.au>
+
+ * messages.c (as_internal_value_out_of_range): Fix typo in
+ error message. Return after printing domain error.
+ * config/tc-ppc.c (ppc_insert_operand): Preserve low zero bits
+ in max when shifting right.
+
+2007-04-20 Alan Modra <amodra@bigpond.net.au>
-2006-03-28 Nathan Sidwell <nathan@codesourcery.com>
-
- * gas/config/tc-m68k.c (find_cf_chip): Merge into ...
- (m68k_ip): ... here. Use for all chips. Protect against buffer
- overrun and avoid excessive copying.
-
- * config/tc-m68k.c (m68000_control_regs, m68010_control_regs,
- m68020_control_regs, m68040_control_regs, m68060_control_regs,
- mcf_control_regs, mcf5208_control_regs, mcf5213_control_regs,
- mcf5329_control_regs, mcf5249_control_regs, mcf528x_control_regs,
- mcfv4e_control_regs, m68010_control_regs): Rename and reorder to ...
- (m68000_ctrl, m68010_ctrl, m68020_ctrl, m68040_ctrl, m68060_ctrl,
- mcf_ctrl, mcf5208_ctrl, mcf5213_ctrl, mcf5235_ctrl, mcf5249_ctrl,
- mcf5216_ctrl, mcf5250_ctrl, mcf5271_ctrl, mcf5272_ctrl,
- mcf5282_ctrl, mcfv4e_ctrl): ... these.
- (mcf5275_ctrl, mcf5329_ctrl, mcf5373_ctrl): New.
- (struct m68k_cpu): Change chip field to control_regs.
- (current_chip): Remove.
- (control_regs): New.
- (m68k_archs, m68k_extensions): Adjust.
- (m68k_cpus): Reorder to be in cpu number order. Adjust.
- (CPU_ALLOW_MC, CPU_ALLOW_NEGATION): Remove.
- (find_cf_chip): Reimplement for new organization of cpu table.
- (select_control_regs): Remove.
- (mri_chip): Adjust.
- (struct save_opts): Save control regs, not chip.
- (s_save, s_restore): Adjust.
- (m68k_lookup_cpu): Give deprecated warning when necessary.
- (m68k_init_arch): Adjust.
- (md_show_usage): Adjust for new cpu table organization.
-
-2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
-
- * config/bfin-defs.h (Expr_Node_Type enum): Add Expr_Node_GOT_Reloc.
- * config/bfin-lex.l: Recognize GOT17M4 and FUNCDESC_GOT17M4.
- * config/bfin-parse.y: Include "libbfd.h", "elf/common.h" and
- "elf/bfin.h".
- (GOT17M4, FUNCDESC_GOT17M4): New tokens of type <value>.
- (any_gotrel): New rule.
- (got): Use it, and create Expr_Node_GOT_Reloc nodes.
- * config/tc-bfin.c: Include "libbfd.h", "elf/common.h" and
- "elf/bfin.h".
- (DEFAULT_FLAGS, bfin_flags, bfin_pic_flag): New.
- (bfin_pic_ptr): New function.
- (md_pseudo_table): Add it for ".picptr".
- (OPTION_FDPIC): New macro.
- (md_longopts): Add -mfdpic.
- (md_parse_option): Handle it.
- (md_begin): Set BFD flags.
- (md_apply_fix3, bfin_fix_adjustable): Handle new relocs.
- (bfin_gen_ldstidxi): Adjust to match the trees that the parser gives
- us for GOT relocs.
- * Makefile.am (bfin-parse.o): Update dependencies.
- (DEPTC_bfin_elf): Likewise.
+ * messages.c (as_internal_value_out_of_range): Extend to report
+ errors for values with invalid low bits set.
+ * config/tc-ppc.c (ppc_setup_opcodes): Check powerpc_operands bitm
+ fields. Check that operands and opcode fields are disjoint.
+ (ppc_insert_operand): Check operands using mask rather than bit
+ count. Check low bits too. Handle PPC_OPERAND_PLUS1. Adjust
+ insertion code.
+ (md_apply_fix): Adjust for struct powerpc_operand change.
+
+2007-04-19 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (md_assemble): Only allow 16-bit instructions on
+ Thumb-1. Add sanity check for bogus relaxations.
+
+2007-04-19 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (insns): Allow rsb and rsbs on Thumb-1.
+
+2007-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
-2006-03-25 Richard Sandiford <richard@codesourcery.com>
+2007-04-19 Nathan Froyd <froydnj@codesourcery.com>
- * config/tc-m68k.c (m68k_cpus): Change cpu_cf5208 entries to use
- mcfemac instead of mcfmac.
+ * doc/c-ppc.texi (PowerPC-Opts): Document -me500, -me500x2, -mspe.
-2006-03-22 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Phil Edwards <phil@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Mark Mitchell <mark@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
+2007-04-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * doc/c-i386.texi; Document .ssse3, .sse4.1, .sse4.2 and .sse4.
+
+2007-04-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (cpu_arch): Add .sse4.2 and .sse4.
+ (match_template): Handle operand size for crc32 in SSE4.2.
+ (process_suffix): Handle operand type for crc32 in SSE4.2.
+ (output_insn): Support SSE4.2.
+
+2007-04-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (cpu_arch): Add .sse4.1.
+ (process_operands): Adjust implicit operand for blendvpd,
+ blendvps and pblendvb in SSE4.1.
+ (output_insn): Support SSE4.1.
+
+2007-04-18 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (do_t_rsb): Use 16-bit encoding when possible.
+
+2007-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * config/tc-sh.c (sh_handle_align): Call as_bad_where instead
+ of as_warn_where for misaligned data.
+
+2007-04-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * config/tc-sh.c (align_test_frag_offset_fixed_p): Handle
+ rs_fill frags.
+
+2007-04-14 Steve Ellcey <sje@cup.hp.com>
+
+ * Makefile.am: Add ACLOCAL_AMFLAGS.
+ * Makefile.in: Regenerate.
- * config/tc-mips.c (mips_target_format): Handle vxworks targets.
- (md_begin): Complain about -G being used for PIC. Don't change
- the text, data and bss alignments on VxWorks.
- (reloc_needs_lo_p): Don't return true for R_MIPS_GOT16 when
- generating VxWorks PIC.
- (load_address): Extend SVR4_PIC handling to VXWORKS_PIC.
- (macro): Likewise, but do not treat la $25 specially for
- VxWorks PIC, and do not handle jal.
- (OPTION_MVXWORKS_PIC): New macro.
- (md_longopts): Add -mvxworks-pic.
- (md_parse_option): Don't complain about using PIC and -G together here.
- Handle OPTION_MVXWORKS_PIC.
- (md_estimate_size_before_relax): Always use the first relaxation
- sequence on VxWorks.
- * config/tc-mips.h (VXWORKS_PIC): New.
+2007-04-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-2006-03-21 Paul Brook <paul@codesourcery.com>
+ * config/tc-sh.c (align_test_frag_offset_fixed_p): New.
+ (sh_optimize_expr): Likewise.
+ * config/tc-sh.h (md_optimize_expr): Define.
+ (sh_optimize_expr): Prototype.
- * config/tc-arm.c (md_apply_fix): Fix typo in offset mask.
+2007-04-06 Matt Thomas <matt@netbsd.org>
-2006-03-21 Sterling Augustine <sterling@tensilica.com>
+ * config/tc-vax.c (vax_cons): Added to support %pcrel{8,16,32}(exp)
+ to emit pcrel relocations by DWARF2 in non-code sections. Borrowed
+ heavily from tc-sparc.c. (vax_cons_fix_new): Likewise.
- * config/tc-xtensa.c (enforce_three_byte_loop_align): New flag.
- (xtensa_setup_hw_workarounds): Set this new flag for older hardware.
- (get_loop_align_size): New.
- (xtensa_end): Skip xtensa_mark_narrow_branches when not aligning.
- (xtensa_mark_zcl_first_insns): Prevent widening of first loop frag.
- (get_text_align_power): Rewrite to handle inputs in the range 2-8.
- (get_noop_aligned_address): Use get_loop_align_size.
- (get_aligned_diff): Likewise.
+2007-04-04 Kazu Hirata <kazu@codesourcery.com>
-2006-03-21 Paul Brook <paul@codesourcery.com>
+ * config/tc-m68k.c (HAVE_LONG_BRANCH): Add fido_a.
- * config/tc-arm.c (insns): Correct opcodes for ldrbt and strbt.
+2007-04-04 Paul Brook <paul@codesourcery.com>
-2006-03-20 Paul Brook <paul@codesourcery.com>
+ * config/tc-arm.c (do_neon_ext): Enforce immediate range.
+ (insns): Use I15 for vext.
- * config/tc-arm.c (BAD_BRANCH, BAD_NOT_IT): Define.
- (do_t_branch): Encode branches inside IT blocks as unconditional.
- (do_t_cps): New function.
- (do_t_blx, do_t_bkpt, do_t_branch23, do_t_bx, do_t_bxj, do_t_cpsi,
- do_t_czb, do_t_it, do_t_setend, do_t_tb): Add IT constaints.
- (opcode_lookup): Allow conditional suffixes on all instructions in
- Thumb mode.
- (md_assemble): Advance condexec state before checking for errors.
- (insns): Use do_t_cps.
+2007-04-04 Paul Brook <paul@codesourcery.com>
-2006-03-20 Paul Brook <paul@codesourcery.com>
+ * configure.tgt: Loosen checks for arm uclinux eabi targets.
- * config/tc-arm.c (output_relax_insn): Call dwarf2_emit_insn before
- outputting the insn.
+2007-04-02 Sterling Augustine <sterling@tensilica.com>
-2006-03-18 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+ * config/tc-xtensa.c (xtensa_flush_pending_output): Check
+ outputting_stabs_line_debug.
- * config/tc-vax.c: Update copyright year.
- * config/tc-vax.h: Likewise.
+2007-03-26 Anatoly Sokolov <aesok@post.ru>
-2006-03-18 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+ * config/tc-avr.c (mcu_types): Add support for at90pwm1, at90usb82,
+ at90usb162, atmega325p, atmega329p, atmega3250p and atmega3290p
+ devices.
+ * doc/c-avr.texi: Document new devices.
- * config/tc-vax.c (md_chars_to_number): Used only locally, so
- make it static.
- * config/tc-vax.h (md_chars_to_number): Remove obsolete declaration.
+2007-04-02 Richard Sandiford <richard@codesourcery.com>
-2006-03-17 Paul Brook <paul@codesourcery.com>
+ * doc/as.texinfo: Add -mvxworks-pic to the list of MIPS options.
+ * doc/c-mips.texi (-KPIC, -mvxworks-pic): Document.
+ * config/tc-mips.c (md_show_usage): Mention -mvxworks-pic.
- * config/tc-arm.c (insns): Add ldm and stm.
+2007-03-30 Sterling Augustine <sterling@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
-2006-03-17 Ben Elliston <bje@au.ibm.com>
+ * config/tc-xtensa.c (xtensa_move_labels): Remove loops_ok argument.
+ Do not check is_loop_target flag.
+ (xtensa_frob_label): Adjust calls to xtensa_move_labels.
+ (xg_assemble_vliw_tokens): Likewise. Also avoid calling
+ xtensa_move_labels for alignment of loop opcodes.
+
+2007-03-30 H.J. Lu <hongjiu.lu@intel.com>
- PR gas/2446
- * doc/as.texinfo (Ident): Document this directive more thoroughly.
+ * config/tc-i386.c (process_suffix): Reindent a bit.
-2006-03-16 Paul Brook <paul@codesourcery.com>
+2007-03-30 Paul Brook <paul@codesourcery.com>
- * config/tc-arm.c (insns): Add "svc".
+ * config/tc-arm.c (encode_thumb2_ldmstm): New function.
+ (do_t_ldmstm): Generate 16-bit push/pop. Use encode_thumb2_ldmstm.
+ (do_t_push_pop): Use encode_thumb2_ldmstm.
-2006-03-13 Bob Wilson <bob.wilson@acm.org>
+2007-03-29 DJ Delorie <dj@redhat.com>
- * config/tc-xtensa.c (xg_translate_sysreg_op): Remove has_underbar
- flag and avoid double underscore prefixes.
+ * config/tc-m32c.c (rl_for, relaxable): Protect argument.
+ (md_relax_table): Add entries for ADJNZ macros.
+ (M32C_Macros): Add ADJNZ macros.
+ (subtype_mappings): Add entries for ADJNZ macros.
+ (insn_to_subtype): Check for adjnz and sbjnz insns.
+ (md_estimate_size_before_relax): Pass insn to insn_to_subtype.
+ (md_convert_frag): Convert adjnz and sbjnz.
-2006-03-10 Paul Brook <paul@codesourcery.com>
+2007-03-29 Nick Clifton <nickc@redhat.com>
- * config/tc-arm.c (md_begin): Handle EABIv5.
- (arm_eabis): Add EF_ARM_EABI_VER5.
- * doc/c-arm.texi: Document -meabi=5.
+ * itbl-ops.c (itbl_entry): Remove unnecessary and excessively long
+ initialization.
+ * itbl-ops.h (enum e_processor): Initialise the e_nprocs field
+ using ITBL_NUMBER_OF_PROCESSORS.
+ * itbl-parse.y (yyerror): Remove use of redundant macro PARAMS.
-2006-03-10 Ben Elliston <bje@au.ibm.com>
+2007-03-28 H.J. Lu <hongjiu.lu@intel.com>
- * app.c (do_scrub_chars): Simplify string handling.
+ * config/tc-i386.c (build_modrm_byte): For instructions with 2
+ register operands, encode destination in i.rm.regmem if its
+ RegMem bit is set.
-2006-03-07 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
- Paul Brook <paul@codesourcery.com>
- Ricardo Anguiano <anguiano@codesourcery.com>
+2007-03-28 Richard Sandiford <richard@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
- * config/tc-arm.c (md_apply_fix): Install a value of zero into a
- BFD_RELOC_ARM_OFFSET_IMM field if we're going to generate a RELA
- R_ARM_ABS12 reloc.
- (tc_gen_reloc): Keep the original fx_offset for RELA pc-relative
- relocs, but adjust by md_pcrel_from_section. Create R_ARM_ABS12
- relocations for BFD_RELOC_ARM_OFFSET_IMM on RELA targets.
-
-2006-03-06 Bob Wilson <bob.wilson@acm.org>
-
- * config/tc-xtensa.c (xtensa_post_relax_hook): Generate literal tables
- even when using the text-section-literals option.
-
-2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
-
- * config/tc-m68k.c (m68k_extensions): Allow 'float' on both m68k
- and cf.
- (m68k_ip): <case 'J'> Check we have some control regs.
- (md_parse_option): Allow raw arch switch.
- (m68k_init_arch): Better detection of arch/cpu mismatch. Detect
- whether 68881 or cfloat was meant by -mfloat.
- (md_show_usage): Adjust extension display.
- (m68k_elf_final_processing): Adjust.
-
-2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
-
- * config/tc-avr.c (avr_mod_hash_value): New function.
- (md_apply_fix, exp_mod): Use BFD_RELOC_HH8_LDI and
- BFD_RELOC_MS8_LDI for hlo8() and hhi8()
- (md_begin): Set linkrelax variable to 1, use avr_mod_hash_value
- instead of int avr_ldi_expression: use avr_mod_hash_value instead
- of (int).
- (tc_gen_reloc): Handle substractions of symbols, if possible do
- fixups, abort otherwise.
- * config/tc-avr.h (TC_LINKRELAX_FIXUP, TC_VALIDATE_FIX,
- tc_fix_adjustable): Define.
+ * doc/as.texinfo: Put the contents after the title page rather
+ than at the end of the document.
+
+2007-03-27 Alan Modra <amodra@bigpond.net.au>
+
+ * NEWS: Mention ".reloc".
+
+2007-03-26 Sterling Augustine <sterling@tensilica.com>
-2006-03-02 James E Wilson <wilson@specifix.com>
+ * config/tc-xtensa.c (xg_translate_idioms): Allow assembly idioms
+ in FLIX instructions.
+
+2007-03-26 Julian Brown <julian@codesourcery.com>
- * config/tc-ia64.c (emit_one_bundle): For IA64_OPCODE_LAST, if we
- change the template, then clear md.slot[curr].end_of_insn_group.
+ * config/tc-arm.c (arm_it): Add immisfloat field.
+ (parse_qfloat_immediate): Disallow integer syntax for floating-point
+ immediates. Fix hex immediates, handle 0.0 and -0.0 specially.
+ (parse_neon_mov): Set immisfloat bit for operand if it parsed as a
+ float.
+ (neon_cmode_for_move_imm): Reject non-float immediates for float
+ operands.
+ (neon_move_immediate): Pass immisfloat bit to neon_cmode_for_move_imm.
-2006-02-28 Jan Beulich <jbeulich@novell.com>
+2007-03-26 Julian Brown <julian@codesourcery.com>
- * macro.c (get_any_string): Don't insert quotes for <>-quoted input.
+ * doc/c-arm.texi: Add documentation for .dn/.qn directives.
-2006-02-28 Jan Beulich <jbeulich@novell.com>
+2007-03-26 Alan Modra <amodra@bigpond.net.au>
- PR/1070
- * macro.c (getstring): Don't treat parentheses special anymore.
- (get_any_string): Don't consider '(' and ')' as quoting anymore.
- Special-case '(', ')', '[', and ']' when dealing with non-quoting
- characters.
+ * doc/as.texinfo (Reloc): Document.
+ * read.c (potable): Add "reloc".
+ (s_reloc): New function.
+ * write.c (reloc_list): New global var.
+ (resolve_reloc_expr_symbols): New function.
+ (write_object_file): Call it.
+ (write_relocs): Process reloc_list.
+ * write.h (struct reloc_list): New.
+ (reloc_list): Declare.
-2006-02-28 Mat <mat@csail.mit.edu>
+2007-03-24 Paul Brook <paul@codesourcery.com>
- * dwarf2dbg.c (get_filenum): Don't inadvertently decrease files_in_use.
+ * config/tc-arm.c (do_t_ldmstm): Error on Thumb-2 addressing modes.
-2006-02-27 Jakub Jelinek <jakub@redhat.com>
+2007-03-24 Paul Brook <paul@codesourcery.com>
+ Mark Shinwell <shinwell@codesourcery.com>
- * dw2gencfi.c (struct fde_entry, struct cie_entry): Add signal_frame
- field.
- (CFI_signal_frame): Define.
- (cfi_pseudo_table): Add .cfi_signal_frame.
- (dot_cfi): Handle CFI_signal_frame.
- (output_cie): Handle cie->signal_frame.
- (select_cie_for_fde): Don't share CIE if signal_frame flag is
- different. Copy signal_frame from FDE to newly created CIE.
- * doc/as.texinfo: Document .cfi_signal_frame.
+ * config/tc-arm.c (operand_parse_code): Add OP_oRRw.
+ (parse_operands): Don't expect comma if first operand missing.
+ Handle OP_oRRw.
+ (do_srs): Encode register number, checking it is r13. Update comment.
+ (insns): Update SRS entries to take a register.
-2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+2007-03-23 H.J. Lu <hongjiu.lu@intel.com>
- * doc/Makefile.am: Add html target.
- * doc/Makefile.in: Regenerate.
- * po/Make-in: Add html target.
-
-2006-02-27 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/tc-i386.c (output_insn): Support Intel Merom New
- Instructions.
-
- * config/tc-i386.h (CpuMNI): New.
- (CpuUnknownFlags): Add CpuMNI.
-
-2006-02-24 David S. Miller <davem@sunset.davemloft.net>
-
- * config/tc-sparc.c (priv_reg_table): Add entry for "gl".
- (hpriv_reg_table): New table for hyperprivileged registers.
- (sparc_ip): New cases '$' and '%' for wrhpr/rdhpr hyperprivileged
- register encoding.
-
-2006-02-24 DJ Delorie <dj@redhat.com>
-
- * config/tc-m32c.h (md_apply_fix): Define to m32c_apply_fix.
- (tc_gen_reloc): Don't define.
- * config/tc-m32c.c (rl_for, relaxable): New convenience macros.
- (OPTION_LINKRELAX): New.
- (md_longopts): Add it.
- (m32c_relax): New.
- (md_parse_options): Set it.
- (md_assemble): Emit relaxation relocs as needed.
- (md_convert_frag): Emit relaxation relocs as needed.
- (md_cgen_lookup_reloc): Add LAB_8_8 and LAB_8_16.
- (m32c_apply_fix): New.
- (tc_gen_reloc): New.
- (m32c_force_relocation): Force out jump relocs when relaxing.
- (m32c_fix_adjustable): Return false if relaxing.
-
-2006-02-24 Paul Brook <paul@codesourcery.com>
-
- * config/arm/tc-arm.c (arm_ext_v6_notm, arm_ext_div, arm_ext_v7,
- arm_ext_v7a, arm_ext_v7r, arm_ext_v7m): New variables.
- (struct asm_barrier_opt): Define.
- (arm_v7m_psr_hsh, arm_barrier_opt_hsh): New variables.
- (parse_psr): Accept V7M psr names.
- (parse_barrier): New function.
- (enum operand_parse_code): Add OP_oBARRIER.
- (parse_operands): Implement OP_oBARRIER.
- (do_barrier): New function.
- (do_dbg, do_pli, do_t_barrier, do_t_dbg, do_t_div): New functions.
- (do_t_cpsi): Add V7M restrictions.
- (do_t_mrs, do_t_msr): Validate V7M variants.
- (md_assemble): Check for NULL variants.
- (v7m_psrs, barrier_opt_names): New tables.
- (insns): Add V7 instructions. Mark V6 instructions absent from V7M.
- (md_begin): Initialize arm_v7m_psr_hsh and arm_barrier_opt_hsh.
- (arm_cpu_option_table): Add Cortex-M3, R4 and A8.
- (arm_arch_option_table): Add armv7, armv7a, armv7r and armv7m.
- (struct cpu_arch_ver_table): Define.
- (cpu_arch_ver): New.
- (aeabi_set_public_attributes): Use cpu_arch_ver. Set
- Tag_CPU_arch_profile.
- * doc/c-arm.texi: Document new cpu and arch options.
-
-2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/tc-ia64.c (operand_match): Handle IA64_OPND_IMMU5b.
-
-2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/tc-ia64.c: Update copyright years.
-
-2006-02-22 H.J. Lu <hongjiu.lu@intel.com>
-
- * config/tc-ia64.c (specify_resource): Add the rule 17 from
- SDM 2.2.
-
-2005-02-22 Paul Brook <paul@codesourcery.com>
-
- * config/tc-arm.c (do_pld): Remove incorrect write to
- inst.instruction.
- (encode_thumb32_addr_mode): Use correct operand.
-
-2006-02-21 Paul Brook <paul@codesourcery.com>
-
- * config/tc-arm.c (md_apply_fix): Fix off-by-one errors.
-
-2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
- Anil Paranjape <anilp1@kpitcummins.com>
- Shilin Shakti <shilins@kpitcummins.com>
-
- * Makefile.am: Add xc16x related entry.
+ * config/tc-i386.c (md_begin): Allow '.' in mnemonic.
+
+2007-03-23 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-arm.c (md_apply_fix): Turn CBZ instructions that
+ attempt to jump to the next instruction into NOPs.
+
+2007-03-23 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-spu.c: Don't include opcode/spu.h.
+ (md_assemble): Set tc_fix_data.insn_tag and arg_format.
+ (md_apply_fix): Adjust.
+ * config/tc-spu.h: Include opcode/spu.h.
+ (struct tc_fix_info): New.
+ (TC_FIX_TYPE, TC_INIT_FIX_DATA): Adjust.
+ (TC_FORCE_RELOCATION): Define.
+
+2007-03-22 Joseph Myers <joseph@codesourcery.com>
+
+ * doc/as.texinfo: Include VERSION_PACKAGE when reporting version.
+
+2007-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (process_suffix): Check 0x90 instead of
+ xchg for xchg %rax,%rax.
+
+2007-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c: Replace REX_MODE64, REX_EXTX, REX_EXTY
+ and REX_EXTZ with REX_W, REX_R, REX_X and REX_B respectively.
+
+2007-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/4218
+ * config/tc-i386.c (match_template): Properly handle 64bit mode
+ "xchg %eax, %eax".
+
+2007-03-21 Anton Ertl <anton@mips.complang.tuw>
+
+ PR gas/4124
+ * config/tc-alpha.c (emit_ustX): Fix ustq code generation.
+
+2007-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am: Run dep-am.
+ * Makefile.in: Regenerated.
+
+ * config/tc-i386.c: Don't include "opcodes/i386-opc.h".
+
+ * config/tc-i386.h: Include "opcodes/i386-opc.h".
+ (NOP_OPCODE): Removed.
+ (template): Likewise.
+
+2007-03-21 Andreas Schwab <schwab@suse.de>
+
+ * config/tc-i386.h (NOP_OPCODE): Restore.
+
+2007-03-18 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-arm.c (do_mul): Don't warn about overlapping
+ Rd and Rm operands when assembling for v6 or above.
+ Correctly capitalize register names in the messages.
+ (do_mlas): Likewise. Delete spurious blank line.
+
+2007-03-16 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/tc-m68k.c (m68k_cpus): Add an entry for fidoa.
+
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (md_begin): Use i386_regtab_size to scan
+ i386_regtab.
+ (parse_register): Use i386_regtab_size instead of ARRAY_SIZE
+ on i386_regtab.
+
+2007-03-15 Alexandre Oliva <aoliva@redhat.com>
+
+ PR gas/4184
+ * app.c (do_scrub_chars): PUT after setting states.
+
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerated.
+
+ * config/tc-i386.c: Include "opcodes/i386-opc.h" instead of
+ "opcode/i386.h".
+ (md_begin): Check reg_name != NULL for the last entry in
+ i386_regtab.
+
+ * config/tc-i386.h: Move many entries to opcode/i386.h and
+ opcodes/i386-opc.h.
+
+ * configure.in (need_opcodes): Set true for i386.
+ * configure: Regenerated.
+
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (REPORT_BUGS_TO): Removed.
+ (INCLUDES): Remove -DREPORT_BUGS_TO.
+ * Makefile.in: Regenerated.
+
+ * configure.in (--with-bugurl): Removed.
+ * configure: Regenerated.
+
+ * doc/Makefile.am (as_TEXINFOS): Remove gasver.texi.
+ (AM_MAKEINFOFLAGS): Add -I ../../bfd/doc.
+ (TEXI2DVI): Likewise.
+ (gasver.texi): Removed.
+ (MOSTLYCLEANFILES): Remove gasver.texi.
+ (as.1): Don't depend on gasver.texi.
+ * doc/Makefile.in: Regenerated.
+
+ * doc/as.texi: Include bfdver.texi instead of gasver.texi.
+
+2007-03-14 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config/tc-arm.c (arm_copy_symbol_attributes): New.
+ * config/tc-arm.h (arm_copy_symbol_attributes): Declare.
+ (TC_COPY_SYMBOL_ATTRIBUTES): Define.
+ * gas/symbols.c (copy_symbol_attributes): Use
+ TC_COPY_SYMBOL_ATTRIBUTES.
+
+2007-03-14 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (T16_32_TAB): Fix dec_sp encoding.
+
+2007-03-14 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4029
+ * write.c (relax_segment): Insert extra alignment padding
+ to break infinite relax loop when given impossible
+ gcc_except_table assembly.
+
+2007-03-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (md_assemble): Use Opcode_XXX instead of XXX
+ on i.tm.base_opcode.
+ (match_template): Likewise.
+ (process_operands): Use ~0x3 mask to match MOV_AX_DISP32.
+
+ * config/tc-i386.h (Opcode_D): New.
+ (Opcode_FloatR): Likewise.
+ (Opcode_FloatD): Likewise.
+ (D): Redefined.
+ (W): Likewise.
+ (FloatMF): Likewise.
+ (FloatR): Likewise.
+ (FloatD): Likewise.
+
+2007-03-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * app.c (do_scrub_chars): Recognize comments after # line "file".
+ * read.c (get_linefile_number): New.
+ (s_app_line): Accept ill-formed .linefile lines as comments.
+
+2007-03-09 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-i386.h (WORKING_DOT_WORD): Define.
+
+2007-03-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * app.c (do_scrub_chars): Turn #<line>"file"flags into .linefile.
+ * as.h (new_logical_line_flags): New.
+ * input-scrub.c (new_logical_line): Turned into wrapper for...
+ (new_logical_line_flags): this. Handle flags.
+ * read.c (potable): Add linefile. Adjust appline argument.
+ (s_app_file): Fake .appfiles no more.
+ (s_app_line): For .linefile, accept file name and flags.
+
+2007-03-08 Alan Modra <amodra@bigpond.net.au>
+
+ * symbols.c (symbol_relc_make_sym): Comment typo fixes.
+
+2007-03-08 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
- * configure.in: Added xc16x related entry.
- * configure: Regenerate.
- * config/tc-xc16x.h: New file
- * config/tc-xc16x.c: New file
- * doc/c-xc16x.texi: New file for xc16x
- * doc/all.texi: Entry for xc16x
- * doc/Makefile.texi: Added c-xc16x.texi
- * NEWS: Announce the support for the new target.
+ * po/POTFILES.in: Regenerate.
-2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
+2007-03-07 Joseph Myers <joseph@codesourcery.com>
- * configure.tgt: set emulation for mips-*-netbsd*
+ * configure.in (REPORT_BUGS_TEXI): Define to Texinfo version of
+ bug-reporting URL.
+ * doc/Makefile.am (gasver.texi): Define BUGURL.
+ * doc/as.texinfo: Use BUGURL.
+ * Makefile.in, configure, doc/Makefile.in: Regenerate.
-2006-02-14 Jakub Jelinek <jakub@redhat.com>
+2007-03-06 Andreas Krebbel <krebbel1@de.ibm.com>
- * config.in: Rebuilt.
+ * config/tc-s390.c (md_parse_option): z9-ec option added.
-2006-02-13 Bob Wilson <bob.wilson@acm.org>
+2007-03-02 Paul Brook <paul@codesourcery.com>
- * config/tc-xtensa.c (xg_add_opcode_fix): Number operands starting
- from 1, not 0, in error messages.
- (md_assemble): Simplify special-case check for ENTRY instructions.
- (tinsn_has_invalid_symbolic_operands): Do not include opcode and
- operand in error message.
+ * config/tc-arm.c (relax_immediate): Always return positive values.
+ (relaxed_symbol_addr): New function.
+ (relax_adr, relax_branch): Use it.
+ (arm_relax_frag): Pass strect argument. Adjust infinite loop check.
-2006-02-13 Joseph S. Myers <joseph@codesourcery.com>
+2007-03-01 Joseph Myers <joseph@codesourcery.com>
- * configure.tgt (arm-*-linux-gnueabi*): Change to
- arm-*-linux-*eabi*.
+ * as.c (parse_args): Update copyright date.
-2006-02-10 Nick Clifton <nickc@redhat.com>
+2007-02-28 Nathan Sidwell <nathan@codesourcery.com>
- * config/tc-crx.c (check_range): Ensure that the sign bit of a
- 32-bit value is propagated into the upper bits of a 64-bit long.
+ * configure.tgt (sh-*-uclinux, sh[12]-*-uclinux): Specify as elf.
- * config/tc-arc.c (init_opcode_tables): Fix cast.
- (arc_extoper, md_operand): Likewise.
+2007-02-28 Nick Clifton <nickc@redhat.com>
-2006-02-09 David Heine <dlheine@tensilica.com>
+ PR gas/3797
+ * config/tc-d10v.c (do_assemble): Do not generate error messages,
+ just return -1 whenever a problem is encountered.
+ (md_assemble): If do_assemble returns -1 generate a non-fatal
+ error message and return.
- * config/tc-xtensa.c (xg_assembly_relax): Increment steps_taken for
- each relaxation step.
+ PR gas/2623
+ * config/tc-msp430.c (line_separator_char): Change to '{'.
-2006-02-09 Eric Botcazou <ebotcazou@libertysurf.fr>
-
- * configure.in (CHECK_DECLS): Add vsnprintf.
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-m68hc11.c (fixup24): Correct fixup size.
+ (build_jump_insn): Likewise.
+ (build_insn): Likewise.
+ (s_m68hc11_relax): Likewise.
+
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c (elf_frob_file): frag_wane any new frags.
+
+2007-02-25 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-arm.c (do_vfp_nsyn_pop): Use fldmias/fldmiad.
+
+2007-02-23 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-mn10300.c (md_convert_frag): Correct fixup size.
+ (md_assemble): Likewise.
+
+2007-02-22 Alan Modra <amodra@bigpond.net.au>
+
+ * write.c (size_seg): Always clear SEC_RELOC here.
+ (install_reloc): New function, extracted from..
+ (write_relocs): ..here. Combine RELOC_EXPANSION_POSSIBLE code
+ with !RELOC_EXPANSION_POSSIBLE code. Don't add fr_offset when
+ testing frag size. Set SEC_RELOC here.
+
+2007-02-21 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4082
+ * config/tc-avr.h (TC_FX_SIZE_SLACK): Define.
+
+2007-02-20 Thiemo Seufer <ths@mips.com>
+
+ * doc/c-mips.texi: Document 74kc, 74kf, 74kx.
+
+2007-02-20 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (mips_cpu_info_table): Add 74K configurations.
+
+2007-02-20 Thiemo Seufer <ths@mips.com>
+ Chao-Ying Fu <fu@mips.com>
+
+ * config/tc-mips.c (mips_set_options, mips_opts, file_ase_dspr2,
+ ISA_SUPPORTS_DSPR2_ASE, MIPS_CPU_ASE_DSPR2): Add DSP R2 ASE support.
+ (macro_build): Add case '2'.
+ (macro): Expand M_BALIGN to nop, packrl.ph or balign.
+ (validate_mips_insn): Add support for balign instruction.
+ (mips_ip): Handle DSP R2 instructions. Support balign instruction.
+ (OPTION_DSPR2, OPTION_NO_DSPR2, OPTION_COMPAT_ARCH_BASE,
+ md_parse_option, mips_after_parse_args): Add -mdspr2 and -mno-dspr2
+ command line options.
+ (s_mipsset): Add support for .set dspr2 and .set nodspr2 directives.
+ (md_show_usage): Add -mdspr2 and -mno-dspr2 help output.
+ * doc/c-mips.texi, doc/as.texinfo: Document -mdspr2, -mno-dspr2,
+ .set dspr2, .set nodspr2.
+
+2007-02-20 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-m68k.c (mcf5210a_ctrl, mcf52235_ctrl, mcf5225_ctrl): New.
+ (m68k_cpus): Add 5210a..5211a, 52230..52235 5224..5225.
+
+2007-02-18 Alan Modra <amodra@bigpond.net.au>
+
+ * write.c (TC_FX_SIZE_SLACK): Define.
+ (write_relocs): Reinstate check for fixup within frag.
+ * config/tc-bfin.h (TC_FX_SIZE_SLACK): Define.
+ * config/tc-h8300.h (TC_FX_SIZE_SLACK): Define.
+ * config/tc-mmix.h (TC_FX_SIZE_SLACK): Define.
+ * config/tc-sh.h (TC_FX_SIZE_SLACK): Define.
+ * config/tc-xstormy16.h (TC_FX_SIZE_SLACK): Define.
+
+2007-02-17 Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in (--with-bugurl): New option.
+ * configure: Regenerate.
+ * dep-in.sed: Remove bin-bugs.h.
+ * Makefile.am (REPORT_BUGS_TO): Define.
+ (INCLUDES): Define REPORT_BUGS_TO.
+ (DEP_INCLUDES): Likewise.
+ ($(OBJS)): No longer depend on bin-bugs.h.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * as.c (show_usage): Don't print empty REPORT_BUGS_TO.
+ * as.h: Remove include of bin-bugs.h.
+
+2007-02-17 Alan Modra <amodra@bigpond.net.au>
+
+ * write.c: White space fixes.
+ (fixup_segment): Move symbol_mri_common_p adjustments..
+ (write_relocs): ..and symbol_equated_reloc_p adjustments..
+ (adjust_reloc_syms): ..to here.
+
+2007-02-16 Alan Modra <amodra@bigpond.net.au>
+
+ * subsegs.c (subseg_change, subseg_get): Use xcalloc rather than
+ xmalloc, memset. Don't bother assigning NULL to known zero mem.
+ (subseg_set_rest): Remove unnecessary cast.
+ * write.c: Include libbfd.h. Replace PTR with void * throughout.
+ Remove unnecessary forward declarations and casts.
+ (set_symtab): Delete extern bfd_alloc.
+ (fixup_segment): Move.
+
+2007-02-15 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/m68k-parse.h (m68k_register): Add ROMBAR0, ASID.
+ * config/tc-m68k.c (mcfv4e_ctrl): Add ColdFire specific names.
+ (mcf5475_ctrl, mcf5485_ctrl): New.
+ (m68k_cpus): Use mcf5485_ctrl and mcf5485_ctrl for those families.
+ (m68k_ip): Add ASID, MMUBAR, ROMBAR0 handling.
+ (init_table): Add asid, mmubar, adjust rombar0.
+
+2007-02-14 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-i386.h (Seg2ShortForm, Seg3ShortForm): Delete.
+ * config/tc-i386.c: Wrap overly long lines, whitespace fixes.
+ (process_operands): Move old Seg2ShortForm and Seg3ShortForm
+ code, and test for these insns using a combination of
+ opcode_modifier and operand_types.
+
+2007-02-07 Paul Brook <paul@codesourcery.com>
+
+ * configure.tgt: Add arm*-*-uclinux-*eabi.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
+ DJ Delorie <dj@redhat.com>
+ Stan Cox <scox@redhat.com>
+ Jim Blandy <jimb@redhat.com>
+ Nick Clifton <nickc@redhat.com>
+ Jim Wilson <wilson@redhat.com>
+ Frank Ch. Eigler <fche@redhat.com>
+ Graydon Hoare <graydon@redhat.com>
+ Ben Elliston <bje@redhat.com>
+ John Healy <jhealy@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * Makefile.am (CPU_TYPES): Add mep.
+ (TARGET_CPU_CFILES): Add tc-mep.c.
+ (TARGET_CPU_HFILES): Add tc-mep.h.
+ (DEPTC_mep_elf): New variable.
+ (DEPTC_mep_coff): Likewise.
+ (DEPOBJ_mep_coff, DEPOBJ_mep_elf, DEP_mep_coff, DEP_mep_elf): Likewise.
+ * configure.in: Support mep.
+ * configure.tgt: Likewise.
+ * config/tc-mep.c: New file.
+ * config/obj-elf.c: New file.
+ * config/tc-mep.c: New file.
+ * config/tc-mep.h: New file.
+ * testsuite/gas/mep: New testsuite with content.
+ * Makefile.in: Regenerate.
* configure: Regenerate.
- * messages.c (errno.h, stdarg.h, varargs.h, va_list): Do not
- include/declare here, but...
- * as.h: Move code detecting VARARGS idiom to the top.
- (errno.h, stdarg.h, varargs.h, va_list): ...here.
- (vsnprintf): Declare if not already declared.
-
-2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
-
- * as.c (close_output_file): New.
- (main): Register close_output_file with xatexit before
- dump_statistics. Don't call output_file_close.
-
-2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
-
- * config/tc-m68k.c (mcf5208_control_regs, mcf5213_control_regs,
- mcf5329_control_regs): New.
- (not_current_architecture, selected_arch, selected_cpu): New.
- (m68k_archs, m68k_extensions): New.
- (archs): Renamed to ...
- (m68k_cpus): ... here. Adjust.
- (n_arches): Remove.
- (md_pseudo_table): Add arch and cpu directives.
- (find_cf_chip, m68k_ip): Adjust table scanning.
- (no_68851, no_68881): Remove.
- (md_assemble): Lazily initialize.
- (select_control_regs): Adjust cpu names. Add 5208, 5213, 5329.
- (md_init_after_args): Move functionality to m68k_init_arch.
- (mri_chip): Adjust table scanning.
- (md_parse_option): Reimplement 'm' processing to add -march & -mcpu
- options with saner parsing.
- (m68k_lookup_cpu, m68k_set_arch, m68k_set_cpu, m68k_set_extension,
- m68k_init_arch): New.
- (s_m68k_cpu, s_m68k_arch): New.
- (md_show_usage): Adjust.
- (m68k_elf_final_processing): Set CF EF flags.
- * config/tc-m68k.h (m68k_init_after_args): Remove.
- (tc_init_after_args): Remove.
- * doc/c-m68k.texi (M68K-Opts): Document -march, -mcpu options.
- (M68k-Directives): Document .arch and .cpu directives.
-
-2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
-
- * config/tc-z80.c (z80_start_line_hook): allow .equ and .defl as
- synonyms for equ and defl.
- (z80_cons_fix_new): New function.
- (emit_byte): Disallow relative jumps to absolute locations.
- (emit_data): Only handle defb, prototype changed, because defb is
- now handled as pseudo-op rather than an instruction.
- (instab): Entries for defb,defw,db,dw moved from here...
- (md_pseudo_table): ... to here, use generic cons() for defw,dw.
- Add entries for def24,def32,d24,d32.
- (md_assemble): Improved error handling.
- (md_apply_fix): New case BFD_RELOC_24, set fixP->fx_no_overflow to one.
- * config/tc-z80.h (TC_CONS_FIX_NEW): Define.
- (z80_cons_fix_new): Declare.
- * doc/c-z80.texi (defb, db): Mention warning on overflow.
- (def24,d24,def32,d32): New pseudo-ops.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+
+ * cgen.c (gas_cgen_install_complex_reloc): Removed.
+ (complex_reloc_installation_howto): Removed.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+ Graydon Hoare <graydon@redhat.com>
+ DJ Delorie <dj@redhat.com>
+ Catherine Moore <clm@redhat.com>
+ Michael Chastain <chastain@redhat.com>
+ Frank Ch. Eigler <fche@redhat.com>
+
+ * symbols.c (use_complex_relocs_for): New, to decide
+ when to use complex relocs. Add signed RELC support.
+ (resolve_symbol_value): Call use_complex_relocs_for. Unconditionally
+ encode expression symbols as mangled complex relocation symbols (when
+ compiled with -DOBJ_COMPLEX_RELOC).
+ (symbol_relc_make_sym,value,expr): New traversal/conversion routines.
+ * cgen.c (gas_cgen_md_apply_fix3): Only set signed_p if RELC. Call
+ encode_addend with new args. Modify to get start, length from
+ ifield whenever it is set. Also change condition on which
+ self-describing relocs are encoded. Add hook into
+ gas_cgen_encode_addend.
+ (queue_fixup_recursively): Add signed RELC support. Change from masked
+ expr to trunc flag. Restore assignment of sub-field value to
+ temporary in fixups array. Reflect changed meaning of last arg to
+ queue_fixup_recursively.
+ (fixup): Add cgen_maybe_multi_ifield member.
+ (make_right_shifted_expr): New function.
+ (queue_fixup): Change to recursive function that fragments
+ fixups if operand has a multi-ifield.
+ (gas_cgen_parse_operand): Add RELC code to wrap expressions in
+ symbols, call weak_operand_overflow_check, and fragment call
+ queue_fixup with operand fields.
+ (gas_cgen_finish_insn) Modify to manage ifield pointer.
+ (weak_operand_overflow_check): New function to try to select
+ insns correctly.
+ (gas_cgen_encode_addend): New function for relc.
+ (gas_cgen_install_complex_reloc): Likewise.
+ (gas_cgen_tc_gen_reloc): Add hook into gas_cgen_install_complex_reloc.
+ * write.h (struct fix): Add msb_field_p to fx_cgen sub-struct. Add
+ cgen_maybe_multi_ifield field to fx_cgen substructure.
+ * cgen.h (GAS_CGEN_MAX_FIXUPS): Bump from 3 up to 32.
+ * symbols.h (symbol_relc_make_sym,value,expr): New prototypes.
+
+2007-02-03 DJ Delorie <dj@delorie.com>
+
+ * config/tc-m32c.c (m32c_cons_fix_new): New. Added to support 3
+ byte relocs.
+ * config/tc-m32c.h (TC_CONS_FIX_NEW): Define.
+ (m32c_cons_fix_new): Prototype.
+
+2007-02-02 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (xg_build_to_insn): Use tinsn_init.
+ (xg_expand_assembly_insn, istack_push_space, istack_pop): Likewise.
-2006-02-02 Paul Brook <paul@codesourcery.com>
-
- * config/tc-arm.c (do_shift): Remove Thumb-1 constraint.
-
-2005-02-02 Paul Brook <paul@codesourcery.com>
-
- * config/tc-arm.c (T2_OPCODE_MASK, T2_DATA_OP_SHIFT, T2_OPCODE_AND,
- T2_OPCODE_BIC, T2_OPCODE_ORR, T2_OPCODE_ORN, T2_OPCODE_EOR,
- T2_OPCODE_ADD, T2_OPCODE_ADC, T2_OPCODE_SBC, T2_OPCODE_SUB,
- T2_OPCODE_RSB): Define.
- (thumb32_negate_data_op): New function.
- (md_apply_fix): Use it.
-
-2006-01-31 Bob Wilson <bob.wilson@acm.org>
-
- * config/xtensa-istack.h (TInsn): Remove record_fix and sub_symbol
- fields.
- * config/tc-xtensa.h (xtensa_frag_type): Remove slot_sub_symbols field.
- * config/tc-xtensa.c (md_apply_fix): Check for unexpected uses of
- subtracted symbols.
- (relaxation_requirements): Add pfinish_frag argument and use it to
- replace setting tinsn->record_fix fields.
- (xg_assemble_vliw_tokens): Adjust calls to relaxation_requirements
- and vinsn_to_insnbuf. Remove references to record_fix and
- slot_sub_symbols fields.
- (xtensa_mark_narrow_branches): Delete unused code.
- (is_narrow_branch_guaranteed_in_range): Handle expr that is not just
- a symbol.
- (convert_frag_immed): Adjust vinsn_to_insnbuf call and do not set
- record_fix fields.
- (tinsn_immed_from_frag): Remove code for handling slot_sub_symbols.
- (vinsn_to_insnbuf): Change use of record_fixup argument, replacing use
- of the record_fix field. Simplify error messages for unexpected
- symbolic operands.
- (set_expr_symbol_offset_diff): Delete.
-
-2006-01-31 Paul Brook <paul@codesourcery.com>
-
- * config/tc-arm.c (arm_reg_parse): Check if reg is non-NULL.
-
-2006-01-31 Paul Brook <paul@codesourcery.com>
- Richard Earnshaw <rearnsha@arm.com>
-
- * config/tc-arm.c: Use arm_feature_set.
- (arm_ext_*, arm_arch_full, arm_arch_t2, arm_arch_none,
- arm_cext_iwmmxt, arm_cext_xscale, arm_cext_maverick, fpu_fpa_ext_v1,
- fpu_fpa_ext_v2, fpu_vfp_ext_v1xd, fpu_vfp_ext_v1, fpu_vfp_ext_v2):
- New variables.
- (insns): Use them.
- (md_atof, opcode_select, opcode_select, md_assemble, md_assemble,
- md_begin, arm_parse_extension, arm_parse_cpu, arm_parse_arch,
- arm_parse_fpu, arm_parse_float_abi, aeabi_set_public_attributes,
- s_arm_cpu, s_arm_arch, s_arm_fpu): Use macros for accessing CPU
- feature flags.
- (arm_legacy_option_table, arm_option_cpu_value_table): New types.
- (arm_opts): Move old cpu/arch options from here...
- (arm_legacy_opts): ... to here.
- (md_parse_option): Search arm_legacy_opts.
- (arm_cpus, arm_archs, arm_extensions, arm_fpus)
- (arm_float_abis, arm_eabis): Make const.
-
-2006-01-25 Bob Wilson <bob.wilson@acm.org>
-
- * config/tc-xtensa.c (md_apply_fix): Set value to zero for PLT relocs.
-
-2006-01-21 Jie Zhang <jie.zhang@analog.com>
-
- * config/bfin-parse.y (asm_1): Check value range for 16 bit immediate
- in load immediate intruction.
-
-2006-01-21 Jie Zhang <jie.zhang@analog.com>
-
- * config/bfin-parse.y (value_match): Use correct conversion
- specifications in template string for __FILE__ and __LINE__.
- (binary): Ditto.
- (unary): Ditto.
-
-2006-01-18 Alexandre Oliva <aoliva@redhat.com>
-
- Introduce TLS descriptors for i386 and x86_64.
- * config/tc-i386.c (tc_i386_fix_adjustable): Handle
- BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC_CALL,
- BFD_RELOC_X86_64_GOTPC32_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL.
- (optimize_disp): Emit fix up for BFD_RELOC_386_TLS_DESC_CALL and
- BFD_RELOC_X86_64_TLSDESC_CALL immediately, and clear the
- displacement bits.
- (build_modrm_byte): Set up zero modrm for TLS desc calls.
- (lex_got): Handle @tlsdesc and @tlscall.
- (md_apply_fix, tc_gen_reloc): Handle the new relocations.
-
-2006-01-11 Nick Clifton <nickc@redhat.com>
-
- Fixes for building on 64-bit hosts:
- * config/tc-avr.c (mod_index): New union to allow conversion
- between pointers and integers.
- (md_begin, avr_ldi_expression): Use it.
- * config/tc-i370.c (md_assemble): Add cast for argument to print
- statement.
- * config/tc-tic54x.c (subsym_substitute): Likewise.
- * config/tc-mn10200.c (md_assemble): Use a union to convert the
- opindex field of fr_cgen structure into a pointer so that it can
- be stored in a frag.
- * config/tc-mn10300.c (md_assemble): Likewise.
- * config/tc-frv.c (frv_debug_tomcat): Use %p to print pointer
- types.
- * config/tc-v850.c: Replace uses of (int) casts with correct
- types.
-
-2006-01-09 H.J. Lu <hongjiu.lu@intel.com>
-
- PR gas/2117
- * symbols.c (snapshot_symbol): Don't change a defined symbol.
-
-2006-01-03 Hans-Peter Nilsson <hp@bitrange.com>
-
- PR gas/2101
- * config/tc-mmix.c (mmix_handle_mmixal): Don't treat #[0-9][FB] as
- a local-label reference.
-
-For older changes see ChangeLog-2005
+2007-02-02 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (SUFFIX_MAP, suffix_relocs): New.
+ (xtensa_elf_suffix): Use suffix_relocs instead of local mapping table.
+ (map_suffix_reloc_to_operator): New.
+ (map_operator_to_reloc): New.
+ (expression_maybe_register): Fix incorrect test of return value from
+ xtensa_elf_suffix. Rearrange to use map_suffix_reloc_to_operator.
+ (xg_assemble_literal, convert_frag_immed): Use map_operator_to_reloc.
+
+2007-02-02 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa-istack.h (struct tinsn_struct): Delete fixup field.
+ (tinsn_get_tok): Delete prototype.
+ * config/tc-xtensa.c (tinsn_get_tok): Delete.
+
+2007-02-02 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa-relax.h (struct build_instr): Delete id field.
+ * config/xtensa-relax.c (widen_spec_list): Remove zeros from LITERAL
+ and LABEL tokens.
+ (append_literal_op, append_label_op): Remove litnum/labnum arguments;
+ set op_data fields to zero.
+ (parse_id_constant): Delete.
+ (build_transition): Remove code to handle numbered literals and labels.
+
+2007-02-02 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa-relax.c (build_transition): Remove code after as_fatal.
+ (build_transition_table): Likewise.
+
+2007-02-01 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (xg_add_opcode_fix, md_apply_fix): Delete use of
+ fx_tcbit.
+ * config/tc-xtensa.h (TC_FORCE_RELOCATION_LOCAL): Remove.
+
+2007-02-02 Alan Modra <amodra@bigpond.net.au>
+
+ * write.h (struct fix <fx_pcrel_adjust, fx_size>): Move.
+ (struct fix <fx_plt>): Rename to tcbit2.
+ * write.c (fix_new_internal): Adjust.
+ (TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt.
+ * config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
+ * config/tc-cris.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
+ * config/tc-i386.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
+ * config/tc-i960.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
+ * config/tc-sh.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
+ * config/tc-sh64.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
+ * config/tc-sparc.h (TC_FORCE_RELOCATION_LOCAL): Likewise.
+ * config/tc-msp430.c (msp430_force_relocation_local): Likewise.
+ * config/tc-ia64.c (emit_one_bundle): Don't set fx_plt.
+ * config/tc-ia64.h (TC_FORCE_RELOCATION_LOCAL): Don't test fx_plt.
+ Instead, compare fx_r_type.
+ * config/tc-xtensa.c (xg_add_opcode_fix, md_apply_fix): Use
+ fx_tcbit in place of fx_plt.
+ * config/tc-xtensa.h (TC_FORCE_RELOCATION_LOCAL): Define.
+ * doc/internals.texi (TC_FORCE_RELOCATION_LOCAL): Remove reference
+ to fx_plt.
+
+2007-01-30 Nick Clifton <nickc@redhat.com>
+
+ * as.c (main): Mark symbols created via the --defsym command line
+ option as volatile so that they can be overridden later on by a
+ .set directive. This maintains compatibility with the behaviour
+ of earlier versions of the assembler.
+ * doc/as.texinfo (--defsym): Document that the defined symbol's
+ value can be overridden via a .set directive.
+
+2007-01-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (swap_imm_operands): Renamed to ...
+ (swap_2_operands): This. Take 2 ints.
+ (md_assemble): Updated.
+ (swap_operands): Call swap_2_operands to swap 2 operands.
+
+2007-01-24 DJ Delorie <dj@redhat.com>
+
+ * config/tc-m32c.c (md_pseudo_table): Add .3byte.
+
+2007-01-22 Nick Clifton <nickc@redhat.com>
+
+ PR gas/3871
+ * tc-score.c: Remove unnecessary uses of _().
+ Make the err_msg[] a file level local array in order to save
+ storage space.
+ Remove unnecessary sprintf()s.
+
+2007-01-18 Mei Ligang <ligang@sunnorth.com.cn>
+
+ PR gas/3871
+ * config/tc-score.c : Using _() for const string.
+ Do not assign inst.error with a local string pointer.
+ (md_section_align): Pad section.
+
+2007-01-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (build_modrm_byte): Check number of operands
+ when procssing memory/register operand.
+
+2007-01-12 Nick Clifton <nickc@redhat.com>
+
+ PR gas/3856
+ * macro.c (expand_irp): Do not ignore spaces inside quoted
+ strings.
+
+2007-01-12 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-spu.h (TC_RELOC_RTSYM_LOC_FIXUP): Delete.
+ * config/tc-m32r.h (TC_RELOC_RTSYM_LOC_FIXUP): Delete.
+ * config/tc-mn10300.h (TC_RELOC_RTSYM_LOC_FIXUP): Delete.
+ (TC_FORCE_RELOCATION): Define.
+ (TC_FORCE_RELOCATION_LOCAL): Define.
+ * config/tc-mn10300.c (mn10300_fix_adjustable): Adjust.
+
+2007-01-12 Alan Modra <amodra@bigpond.net.au>
+
+ * input-file.c (input_file_open): Check fgets return.
+
+2007-01-11 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (do_t_add_sub): Use Rd and Rs.
+
+2007-01-11 Nick Clifton <nickc@redhat.com>
+
+ PR gas/3707
+ * config/tc-arm.c (md_begin): Cope with an NULL mcpu_fpu_opt
+ variable.
+
+ * config/tc-mcore.c (md_number_to_chars): Use
+ number_to_chars_{big|little}endian.
+
+2007-01-08 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/tc-m68k.c (m68k_archs, m68k_cpus): Treat Fido as an
+ architecture by itself.
+ (m68k_ip): Don't issue a warning for tbl instructions on fido.
+ (m68k_elf_final_processing): Treat Fido as an architecture by
+ itself.
+
+2007-01-08 Kai Tietz <kai.tietz@onevision.com>
+
+ * configure.tgt: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*
+
+2007-01-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (set_intel_syntax): Update set_intel_syntax
+ depending on allow_naked_reg.
+
+2007-01-04 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (do_cpsi): Set mmod bit for 2 argument form.
+
+2007-01-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/3830
+ * config/tc-i386.c (register_prefix): New.
+ (set_intel_syntax): Set set_intel_syntax to "" if register
+ prefix isn't needed.
+ (check_byte_reg): Use register_prefix for error message.
+ (check_long_reg): Likewise.
+ (check_qword_reg): Likewise.
+ (check_word_reg): Likewise.
+
+2006-01-04 Julian Brown <julian@codesourcery.com>
+
+ * config/tc-arm.c (do_neon_shl_imm): Swap rN, rM.
+ (do_neon_qshl_imm): Likewise.
+ (do_neon_rshl): New function. Handle rounding variants of
+ v{q}shl-by-register.
+ (insns): Use do_neon_rshl for vrshl, vqrshl.
+
+2007-01-04 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (NEON_ENC_TAB): Fix encoding of vclt, vcle, vaclt
+ and vacle.
+
+2007-01-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (swap_operands): Remove branches.
+
+2007-01-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c: Update copyright year.
+ * config/tc-i386.h: Likewise.
+
+2007-01-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (smallest_imm_type): Return unsigned int
+ instead of int.
+
+2007-01-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c: Convert to ISO C90 formatting
+ * config/tc-i386.h: Likewise.
+
+2007-01-03 David Daney <ddaney@avtrex.com>
+
+ * config/tc-mips.c (md_show_usage): Clean up -mno-shared
+ documentation.
+
+For older changes see ChangeLog-2006
Local Variables:
mode: change-log
diff --git a/contrib/binutils/gas/ChangeLog-2006 b/contrib/binutils/gas/ChangeLog-2006
new file mode 100644
index 0000000..dc933e5
--- /dev/null
+++ b/contrib/binutils/gas/ChangeLog-2006
@@ -0,0 +1,2756 @@
+2006-12-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.h (ShiftCount): Fix a comment typo.
+
+2006-12-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (md_show_usage): Mention --32/--64.
+
+2006-12-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (build_modrm_byte): Handle shift count
+ register with 3 operands.
+
+2006-12-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (process_operands): Check i.reg_operands
+ and increment i.operands when adding a register operand.
+ (build_modrm_byte): Fix 4 operand instruction handling.
+
+2006-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (disp_expressions): Use MAX_MEMORY_OPERANDS
+ for array size instead of 2.
+ (im_expressions): Use MAX_IMMEDIATE_OPERANDS for for array size
+ instead of 2.
+ (i386_immediate): Update immediate operand overflow error
+ message.
+ (i386_displacement): Check displacement operand overflow.
+
+2006-12-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c: Document tc-i386.c, not i386.c.
+
+2006-12-27 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/m68k-parse.h (m68k_register): Add CAC and MBB.
+ * config/tc-m68k.c (fido_ctrl): New.
+ (m68k_archs): Use fido_ctrl for -mfidoa.
+ (m68k_cpus): Use fido_ctrl on fido-*-*.
+ (m68k_ip): Add support for CAC and MBB.
+ (init_table): Add CAC and MBB.
+
+2006-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (i386_immediate): Remove prototype.
+
+2006-12-25 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/tc-m68k.c (cpu_of_arch): Add fido.
+ (m68k_archs, m68k_cpu): Add entries for fido.
+ (m68k_elf_final_processing): Handle EF_M68K_CPU32_FIDO_A.
+
+2006-12-25 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * config/tc-score.c (build_lw_pic): Rename as build_lwst_pic.
+ Delete the code handling large constant for PIC.
+ Modify some comments.
+ (score_relax_frag): Decrease insn_addr in certain situation.
+ (s_score_cprestore): Change .cprestore syntax from ".cprestore offset"
+ to ".cprestore reg, offset".
+
+2006-12-23 Kazu Hirata <kazu@codesourcery.com>
+
+ * configure.tgt: Recognize fido.
+
+2006-12-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c: Add a blank line bewteen function bodies.
+
+2006-12-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (build_modrm_byte): Reformat to 72 columns.
+
+2006-12-14 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (YFLAGS): Define.
+ * Makefile.in: Regenerated.
+
+2006-12-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (match_template): Simplify 3 and 4 operand
+ match.
+
+2006-12-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (build_modrm_byte): Set the Operand_PCrel
+ bit only.
+
+2006-12-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (match_template): Use a for loop to set
+ operand_types array.
+
+2006-12-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/3712
+ * config/tc-i386.c (match_template): Use MAX_OPERANDS for the
+ number of operands. Issue an error if MAX_OPERANDS != 4. Add
+ the 4th operand check.
+
+2006-12-13 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_arch_option_table): Add v7-{a,r,m}.
+ * doc/c-arm.texi: Fix spelling of ARMv7 profile variants.
+
+2006-12-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.h (WordMem): Document it for 64 bit memory
+ reference.
+
+2006-12-12 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * doc/Makefile.am (as_TEXINFOS): Set.
+ (as.info as.dvi as.html): Delete rule.
+ * doc/Makefile.in: Regenerated.
+
+2006-12-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Define GENINSRC_NEVER.
+ * doc/Makefile.am (as.info): Remove srcdir prefix.
+ (MAINTAINERCLEANFILES): Add info file.
+ (DISTCLEANFILES): Pretend to add info file.
+ * po/Make-in (.po.gmo): Put gmo files in objdir.
+ * configure, Makefile.in, doc/Makefile.in: Regenerated.
+
+2006-12-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.h (template): Use MAX_OPERANDS instead of 4
+ for operand_types array.
+
+2006-12-08 Christian Groessler <chris@groessler.org>
+
+ * config/tc-z8k.c (whatreg): Add comment describing function.
+ Return NULL if symbol name characters follow the register number.
+ (parse_reg): Use NULL instead of 0 for pointer values. Stop
+ processing if whatreg returned NULL.
+
+2006-12-07 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/tc-m68k.c: Update uses of EF_M68K_*.
+
+2006-12-06 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-i386.h: Change the prefix order to SEG_PREFIX,
+ ADDR_PREFIX, DATA_PREFIX, LOCKREP_PREFIX.
+
+2006-12-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR gas/3607
+ * subsegs.c (subseg_set_rest): Clear frch_cfi_data field.
+
+2006-12-01 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_force_relocation): Return 1 for relocs against
+ function symbols.
+
+2006-11-29 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_is_eabi): New function.
+ * config/tc-arm.h (arm_is_eabi): New prototype.
+ (THUMB_IS_FUNC): Use ELF function type for EABI objects.
+ * doc/c-arm.texi (.thumb_func): Update documentation.
+
+2006-11-29 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (do_vfp_sp_const, do_vfp_dp_const): Fix operans
+ encoding.
+
+2006-11-27 Sterling Augustine <sterling@tensilica.com>
+
+ * config/tc-xtensa.c (xtensa_sanity_check): Check for RELAX_IMMED
+ as the first slot_subtype, not the frag subtype.
+
+2006-11-27 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (XSHAL_ABI): Add default definition.
+ (directive_state): Disable scheduling by default.
+ (xtensa_add_config_info): New.
+ (xtensa_end): Call xtensa_add_config_info.
+
+2006-11-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/tc-sparc.c (tc_gen_reloc): Turn aligned relocs into
+ their unaligned counterparts in debugging sections.
+
+2006-11-24 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-spu.c (md_pseudo_table): Add eqv and .eqv.
+
+2006-11-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config/tc-arm.h (md_cons_align): Define.
+ (mapping_state): New prototype.
+ * config/tc-arm.c (mapping_state): Make global.
+
+2006-11-22 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c (obj_elf_version): Use memcpy rather than strcpy.
+
+2006-11-16 Mei ligang <ligang@sunnorth.com.cn>
+
+ * config/tc-score.c (score_relax_frag): If next frag contains 32 bit
+ branch instruction, handle it specially.
+ (score_insns): Modify 32 bit branch instruction.
+
+2006-11-16 Alan Modra <amodra@bigpond.net.au>
+
+ * symbols.c (resolve_symbol_value): Formatting.
+
+2006-11-15 Jan Beulich <jbeulich@novell.com>
+
+ PR/3469
+ * symbols.c (symbol_clone): Mark symbol ending up not on symbol
+ chain by linking it to itself.
+ (resolve_symbol_value): Also check symbol_shadow_p().
+ (symbol_shadow_p): New.
+ * symbols.h (symbol_shadow_p): Declare.
+
+2006-11-12 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-arm.c (do_t_czb): Rename to do_t_cbz.
+ (insns): Adjust accordingly.
+ (md_apply_fix): Alter comments to use CBZ instead of CZB.
+
+2006-11-10 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * config/tc-arm.c (arm_fix_adjustable) [OBJ_COFF]: Delete.
+ (arm_fix_adjustable) [OBJ_ELF]: Use it on coff targets too.
+
+2006-11-10 Nick Clifton <nickc@redhat.com>
+
+ PR gas/3456:
+ * config/obj-elf.c (obj_elf_version): Do not include the name
+ field's padding in the namesz value.
+
+2006-11-09 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c: Fix outdated comment.
+
+2006-11-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.h (CpuPNI): Removed.
+ (CpuUnknownFlags): Replace CpuPNI with CpuSSE3.
+ * config/tc-i386.c (md_assemble): Likewise.
+
+2006-11-08 Alan Modra <amodra@bigpond.net.au>
+
+ * symbols.c (symbol_create, symbol_clone): Don't set udata.p.
+
+2006-11-06 David Daney <ddaney@avtrex.com>
+
+ * config/tc-mips.c (pic_need_relax): Return true for section symbols.
+
+2006-11-06 Thiemo Seufer <ths@mips.com>
+
+ * doc/c-mips.texi (-march): Document sb1a.
+
+2006-11-06 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (mips_cpu_info_table): Remove 24k/24ke aliases.
+ 34k always has DSP ASE.
+
+2006-11-03 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (md_pcrel_from_section): Disallow PC relative
+ MIPS16 instructions referencing other sections, unless they are
+ external branches.
+
+2006-11-03 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (mips_cpu_info_table): The 25Kf is a MIPS64
+ release 1 CPU.
+
+2006-11-03 Jakub Jelinek <jakub@redhat.com>
+
+ * dw2gencfi.c (struct fde_entry): Add per_encoding, lsda_encoding,
+ personality and lsda.
+ (struct cie_entry): Add per_encoding, lsda_encoding and personality.
+ (alloc_fde_entry): Initialize per_encoding and lsda_encoding.
+ (cfi_pseudo_table): Handle .cfi_personality and .cfi_lsda.
+ (dot_cfi_personality, dot_cfi_lsda, encoding_size): New functions.
+ (output_cie): Output personality including its encoding and LSDA encoding.
+ (output_fde): Output LSDA.
+ (select_cie_for_fde): Don't share CIE if personality, its encoding or
+ LSDA encoding are different. Copy the 3 fields from fde_entry to
+ cie_entry.
+ * doc/as.texinfo (.cfi_personality, .cfi_lsda): Document.
+
+ * subsegs.h (struct frchain): Add frch_cfi_data field.
+ * dw2gencfi.c: Include subsegs.h.
+ (cur_fde_data, last_address, cur_cfa_offset, cfa_save_stack): Removed.
+ (struct frch_cfi_data): New type.
+ (unused_cfi_data): New variable.
+ (alloc_fde_entry): Move cur_fde_data, last_address, cur_cfa_offset
+ and cfa_save_stack static vars into a structure pointed from
+ each frchain.
+ (alloc_cfi_insn_data, cfi_new_fde, cfi_end_fde, cfi_set_return_column,
+ cfi_add_advance_loc, cfi_add_CFA_def_cfa, cfi_add_CFA_def_cfa_offset,
+ cfi_add_CFA_remember_state, cfi_add_CFA_restore_state, dot_cfi,
+ dot_cfi_escape, dot_cfi_startproc, dot_cfi_endproc, cfi_finish):
+ Likewise.
+
+2006-11-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config/tc-h8300.c (build_bytes): Fix const warning.
+
+2006-11-01 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * tc-score.c (do16_rdrs): Handle not! instruction especially.
+
+2006-10-31 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_adjust_symtab): Don't use STT_ARM_16BIT
+ for EABIv4.
+
+2006-10-31 Paul Brook <paul@codesourcery.com>
+
+ gas/
+ * config/tc-arm.c (object_arch): New variable.
+ (s_arm_object_arch): New function.
+ (md_pseudo_table): Add object_arch.
+ (aeabi_set_public_attributes): Obey object_arch.
+ * doc/c-arm.texi: Document .object_arch.
+
+2006-10-31 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * tc-score.c (data_op2): Check invalid operands.
+ (my_get_expression): Const operand of some instructions can not be
+ symbol in assembly.
+ (get_insn_class_from_type): Handle instruction type Insn_internal.
+ (do_macro_ldst_label): Modify inst.type.
+ (Insn_PIC): Delete.
+ (data_op2): The immediate value in lw is 15 bit signed.
+
+2006-10-29 Randolph Chung <tausq@debian.org>
+
+ * config/tc-hppa.c (hppa_cfi_frame_initial_instructions)
+ (hppa_regname_to_dw2regnum): New funcions.
+ * config/tc-hppa.h [OBJ_ELF] (TARGET_USE_CFIPOP): Define.
+ (tc_cfi_frame_initial_instructions)
+ (tc_regname_to_dw2regnum): Define.
+ (hppa_cfi_frame_initial_instructions)
+ (hppa_regname_to_dw2regnum): Declare.
+ (DWARF2_LINE_MIN_INSN_LENGTH, DWARF2_DEFAULT_RETURN_COLUMN)
+ (DWARF2_CIE_DATA_ALIGNMENT): Define.
+
+2006-10-29 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-spu.c (md_assemble): Cast printf string size parameter
+ to int in order to avoid a compiler warning.
+
+2006-10-27 Andrew Stubbs <andrew.stubbs@st.com>
+
+ * config/tc-sh.c (md_assemble): Define size of branches.
+
+2006-10-26 Ben Elliston <bje@au.ibm.com>
+
+ * dw2gencfi.c (cfi_add_CFA_offset):
+ Assert DWARF2_CIE_DATA_ALIGNMENT is non-zero.
+
+ * write.c (chain_frchains_together_1): Assert that this function
+ never returns a pointer to the auto variable `dummy'.
+
+2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-spu.c: New file.
+ * config/tc-spu.h: New file.
+ * configure.tgt: Add SPU support.
+ * Makefile.am: Likewise. Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2006-10-25 Ben Elliston <bje@au.ibm.com>
+
+ * expr.c (expr): Replace O_add case in switch (op_left) explaining
+ why it can never occur.
+
+2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ * doc/c-ppc.texi (-mcell): Document.
+ * config/tc-ppc.c (parse_cpu): Parse -mcell.
+ (md_show_usage): Document -mcell.
+
+2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+
+ * doc/c-i386.texi : Document amdfam10,.sse4a and .abm in cpu_type.
+
+2006-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-m68hc11.c (md_assemble): Quiet warning.
+
+2006-10-19 Mike Frysinger <vapier@gentoo.org>
+
+ * config/tc-i386.c (md_parse_option): Use CONST_STRNEQ.
+ (x86_64_section_letter): Likewise.
+
+2006-10-19 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * config/tc-score.c (build_relax_frag): Compute correct
+ tc_frag_data.fixp.
+
+2006-10-18 Roy Marples <uberlord@gentoo.org>
+
+ * config/tc-sparc.c (md_parse_option): Treat any target starting with
+ elf32-sparc as a viable target for the -32 switch and any target
+ starting with elf64-sparc as a viable target for the -64 switch.
+ (sparc_target_format): For 64-bit ELF flavoured output use
+ ELF_TARGET_FORMAT64 while for 32-bit ELF flavoured output use
+ ELF_TARGET_FORMAT.
+ * config/tc-sparc.h (ELF_TARGET_FORMAT, ELF_TARGET_FORMAT64): Define.
+
+2006-10-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure: Regenerated.
+
+2006-10-16 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * input-scrub.c (input_scrub_next_buffer): Use TC_EOL_IN_INSN
+ in addition to testing for '\n'.
+ (TC_EOL_IN_INSN): Provide a default definition if necessary.
+
+2006-10-13 Sterling Augstine <sterling@tensilica.com>
+
+ * dwarf2dbg.c (out_debug_info): Use TC_DWARF2_EMIT_OFFSET to emit
+ a disjoint DW_AT range.
+
+2006-10-13 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * config/tc-score.c (md_show_usage): Print -KPIC option usage.
+
+2006-10-08 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (parse_big_immediate): 64-bit host fix.
+ (parse_operands): Use parse_big_immediate for OP_NILO.
+ (neon_cmode_for_logic_imm): Try smaller element sizes.
+ (neon_cmode_for_move_imm): Ditto.
+ (do_neon_logic): Handle .i64 pseudo-op.
+
+2006-09-29 Alan Modra <amodra@bigpond.net.au>
+
+ * po/POTFILES.in: Regenerate.
+
+2006-09-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.h (CpuMNI): Renamed to ...
+ (CpuSSSE3): This.
+ (CpuUnknownFlags): Updated.
+ (processor_type): Replace PROCESSOR_YONAH with PROCESSOR_CORE
+ and PROCESSOR_MEROM with PROCESSOR_CORE2.
+ * config/tc-i386.c: Updated.
+ * doc/c-i386.texi: Likewise.
+
+ * config/tc-i386.c (cpu_arch): Add ".ssse3", "core" and "core2".
+
+2006-09-28 Bridge Wu <mingqiao.wu@gmail.com>
+
+ * config/tc-arm.c (md_apply_fix): Do not clear write_back bit.
+
+2006-09-27 Nick Clifton <nickc@redhat.com>
+
+ * output-file.c (output_file_close): Prevent an infinite loop
+ reporting that stdoutput could not be closed.
+
+2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Ian Lance Taylor <ian@wasabisystems.com>
+ Ben Elliston <bje@wasabisystems.com>
+
+ * config/tc-arm.c (arm_cext_iwmmxt2): New.
+ (enum operand_parse_code): New code OP_RIWR_I32z.
+ (parse_operands): Handle OP_RIWR_I32z.
+ (do_iwmmxt_wmerge): New function.
+ (do_iwmmxt_wldstd): Handle iwmmxt2 case where second operand is
+ a register.
+ (do_iwmmxt_wrwrwr_or_imm5): New function.
+ (insns): Mark instructions as RIWR_I32z as appropriate.
+ Also add torvsc<b,h,w>, wabs<b,h,w>, wabsdiff<b,h,w>,
+ waddbhus<l,m>, waddhc, waddwc, waddsubhx, wavg4{r}, wmaddu{x,n},
+ wmadds{x,n}, wmerge, wmiaxy{n}, wmiawxy{n}, wmul<sm,um>{r},
+ wmulw<um,sm,l>{r}, wqmiaxy{n}, wqmulm{r}, wqmulwm{r}, wsubaddhx.
+ (md_begin): Handle IWMMXT2.
+ (arm_cpus): Add iwmmxt2.
+ (arm_extensions): Likewise.
+ (arm_archs): Likewise.
+
+2006-09-25 Bob Wilson <bob.wilson@acm.org>
+
+ * doc/as.texinfo (Overview): Revise description of --keep-locals.
+ Add xref to "Symbol Names".
+ (L): Refer to "local symbols" instead of "local labels". Move
+ definition to "Symbol Names" section; add xref to that section.
+ (Symbol Names): Use "Local Symbol Names" section to define local
+ symbols. Add "Local Labels" heading for description of temporary
+ forward/backward labels, and refer to those as "local labels".
+
+2006-09-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3235
+ * config/tc-i386.c (match_template): Check address size prefix
+ to turn Disp64/Disp32/Disp16 operand into Disp32/Disp16/Disp32
+ operand.
+
+2006-09-22 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-ppc.c (ppc_symbol_chars): Remove '+' and '-'.
+
+2006-09-22 Alan Modra <amodra@bigpond.net.au>
+
+ * as.h (as_perror): Delete declaration.
+ * gdbinit.in (as_perror): Delete breakpoint.
+ * messages.c (as_perror): Delete function.
+ * doc/internals.texi: Remove as_perror description.
+ * listing.c (listing_print: Don't use as_perror.
+ * output-file.c (output_file_create, output_file_close): Likewise.
+ * symbols.c (symbol_create, symbol_clone): Likewise.
+ * write.c (write_contents): Likewise.
+ * config/obj-som.c (obj_som_version, obj_som_copyright): Likewise.
+ * config/tc-tic54x.c (tic54x_mlib): Likewise.
+
+2006-09-22 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-ppc.c (md_section_align): Don't round up address for ELF.
+ (ppc_handle_align): New function.
+ * config/tc-ppc.h (HANDLE_ALIGN): Use ppc_handle_align.
+ (SUB_SEGMENT_ALIGN): Define as zero.
+
+2006-09-20 Bob Wilson <bob.wilson@acm.org>
+
+ * doc/as.texinfo: Fix cross reference usage, typos and grammar.
+ (Overview): Skip cross reference in man page.
+
+2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
+
+ * configure.in: Add new target x86_64-pc-mingw64.
+ * configure: Regenerate.
+ * configure.tgt: Add new target x86_64-pc-mingw64.
+ * config/obj-coff.h: Add handling for TE_PEP target specific code
+ and definitions.
+ * config/tc-i386.c: Add new targets.
+ (md_parse_option): Add targets to OPTION_64.
+ (x86_64_target_format): Add new method for setup proper default
+ target cpu mode.
+ * config/te-pep.h: Add new target definition header.
+ (TE_PEP): New macro: Identifies new target architecture.
+ (COFF_WITH_pex64): Set proper includes in bfd.
+ * NEWS: Mention new target.
+
+2006-09-18 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin-parse.y (binary): Change sub of const to add of negated
+ const.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * config/tc-score.c: New file.
+ * config/tc-score.h: Newf file.
+ * configure.tgt: Add Score target.
+ * Makefile.am: Add Score files.
+ * Makefile.in: Regenerate.
+ * NEWS: Mention new target support.
+
+2006-09-16 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (s_arm_unwind_movsp): Add offset argument.
+ * doc/c-arm.texi (movsp): Document offset argument.
+
+2006-09-16 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (thumb32_negate_data_op): Consistently use
+ unsigned int to avoid 64-bit host problems.
+
+2006-09-15 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin-parse.y (binary): Do some more constant folding for
+ additions.
+
+2006-09-13 Jan Beulich <jbeulich@novell.com>
+
+ * input-file.c (input_file_give_next_buffer): Demote as_bad to
+ as_warn.
+
+2006-09-13 Alan Modra <amodra@bigpond.net.au>
+
+ PR gas/3165
+ * config/tc-sh (DWARF2_CIE_DATA_ALIGNMENT): Wrap negative number
+ in parens.
+
+2006-09-13 Alan Modra <amodra@bigpond.net.au>
+
+ * input-file.c (input_file_open): Replace as_perror with as_bad
+ so that gas exits with error on file errors. Correct error
+ message.
+ (input_file_get, input_file_give_next_buffer): Likewise.
+ * input-file.h: Update comment.
+
+2006-09-11 Tomas Frydrych <dr.tomas@yahoo.co.uk>
+
+ PR gas/3172
+ * config/tc-arm.c (parse_typed_reg_or_scalar): Accept wCg class
+ registers as a sub-class of wC registers.
+
+2006-09-11 Alan Modra <amodra@bigpond.net.au>
+
+ PR gas/3165
+ * config/tc-mips.h (enum dwarf2_format): Forward declare.
+ (DWARF2_CIE_DATA_ALIGNMENT): Wrap negative number in parens.
+ * config/tc-alpha.h (DWARF2_CIE_DATA_ALIGNMENT): Likewise.
+ * config/tc-arm.h (DWARF2_CIE_DATA_ALIGNMENT): Likewise.
+
+2006-09-08 Nick Clifton <nickc@redhat.com>
+
+ PR gas/3129
+ * doc/as.texinfo (Macro): Improve documentation about separating
+ macro arguments from following text.
+
+2006-09-08 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (insns): Allow ARM IT pseudo-insn on all cores.
+
+2006-09-07 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (parse_operands): Mark operand as present.
+
+2006-09-04 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (do_neon_dyadic_if_i): Remove.
+ (do_neon_dyadic_if_i_d): Avoid setting U bit.
+ (do_neon_mac_maybe_scalar): Ditto.
+ (do_neon_dyadic_narrow): Force operand type to NT_integer.
+ (insns): Remove out of date comments.
+
+2006-08-29 Nick Clifton <nickc@redhat.com>
+
+ * read.c (s_align): Initialize the 'stopc' variable to prevent
+ compiler complaints about it being used without being
+ initialized.
+ (s_comm_internal, s_mri_common, s_fail, s_globl, s_space,
+ s_float_space, s_struct, cons_worker, equals): Likewise.
+
+2006-08-29 Malcolm Parsons <malcolm.parsons@gmail.com>
+
+ * ecoff.c (ecoff_directive_val): Fix message typo.
+ * config/tc-ns32k.c (convert_iif): Likewise.
+ * config/tc-sh64.c (shmedia_check_limits): Likewise.
+
+2006-08-25 Sterling Augustine <sterling@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (xtensa_mark_literal_pool_location): Do not check
+ the state of the absolute_literals directive. Remove align frag at
+ the start of the literal pool position.
+
+2006-08-25 Bob Wilson <bob.wilson@acm.org>
+
+ * doc/c-xtensa.texi: Add @group commands in examples.
+
+2006-08-24 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (FINI_LITERAL_SECTION_NAME): Delete.
+ (INIT_LITERAL_SECTION_NAME): Delete.
+ (lit_state struct): Remove segment names, init_lit_seg, and
+ fini_lit_seg. Add lit_prefix and current_text_seg.
+ (init_literal_head_h, init_literal_head): Delete.
+ (fini_literal_head_h, fini_literal_head): Delete.
+ (xtensa_begin_directive): Move argument parsing to
+ xtensa_literal_prefix function.
+ (xtensa_end_directive): Deallocate lit_prefix field of lit_state.
+ (xtensa_literal_prefix): Parse the directive argument here and
+ record it in the lit_prefix field. Remove code to derive literal
+ section names.
+ (linkonce_len): New.
+ (get_is_linkonce_section): Use linkonce_len. Check for any
+ ".gnu.linkonce.*" section, not just text sections.
+ (md_begin): Remove initialization of deleted lit_state fields.
+ (xtensa_reorder_segments, xtensa_post_relax_hook): Remove references
+ to init_literal_head and fini_literal_head.
+ (xtensa_move_literals): Likewise. Skip literals for .init and .fini
+ when traversing literal_head list.
+ (match_section_group): New.
+ (cache_literal_section): Rewrite to determine the literal section
+ name on the fly, create the section and return it.
+ (xtensa_switch_to_literal_fragment): Adjust for cache_literal_section.
+ (xtensa_switch_to_non_abs_literal_fragment): Likewise.
+ (xtensa_create_property_segments, xtensa_create_xproperty_segments):
+ Use xtensa_get_property_section from bfd.
+ (retrieve_xtensa_section): Delete.
+ * doc/c-xtensa.texi (Xtensa Options): Fix --text-section-literals
+ description to refer to plural literal sections and add xref to
+ the Literal Directive section.
+ (Literal Directive): Describe new rules for deriving literal section
+ names. Add footnote for special case of .init/.fini with
+ --text-section-literals.
+ (Literal Prefix Directive): Replace old naming rules with xref to the
+ Literal Directive section.
+
+2006-08-21 Joseph Myers <joseph@codesourcery.com>
+
+ * config/tc-arm.c (s_arm_unwind_save_mmxwr): Correct condition for
+ merging with previous long opcode.
+
+2006-08-22 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * Makefile.am (TARG_ENV_HFILES): Add te-wince-pe.h.
+ * Makefile.in: Regenerate.
+ * config/tc-arm.h [TARGET_FORMAT]: ARM wince bfd names were
+ renamed. Adjust.
+
+2006-08-16 Julian Brown <julian@codesourcery.com>
+
+ * config/tc-arm.c (md_assemble): Improve diagnostic when attempting
+ to use ARM instructions on non-ARM-supporting cores.
+ (autoselect_thumb_from_cpu_variant): New function. Switch on Thumb
+ mode automatically based on cpu variant.
+ (md_begin): Call above function.
+
+2006-08-16 Julian Brown <julian@codesourcery.com>
+
+ * config/tc-arm.c (opcode_lookup): Allow Neon type suffixes to be
+ recognized in non-unified syntax mode.
+
+2006-08-15 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * configure.tgt: Handle mips*-sde-elf*.
+
+2006-08-12 Thiemo Seufer <ths@networkno.de>
+
+ * config/tc-mips.c (mips16_ip): Fix argument register handling
+ for restore instruction.
+
+2006-08-08 Bob Wilson <bob.wilson@acm.org>
+
+ * dwarf2dbg.c (DWARF2_USE_FIXED_ADVANCE_PC): New.
+ (out_sleb128): New.
+ (out_fixed_inc_line_addr): New.
+ (process_entries): Use out_fixed_inc_line_addr when
+ DWARF2_USE_FIXED_ADVANCE_PC is set.
+ * config/tc-xtensa.h (DWARF2_USE_FIXED_ADVANCE_PC): Define.
+
+2006-08-08 DJ Delorie <dj@redhat.com>
+
+ * config/tc-sh.c (sh_frob_section): Canonicalize pointers to local
+ vs full symbols so that we never have more than one pointer value
+ for any given symbol in our symbol table.
+
+2006-08-08 Sterling Augustine <sterling@tensilica.com>
+
+ * dwarf2dbg.c (out_debug_info): Add new parameter ranges_seg
+ and emit DW_AT_ranges when code in compilation unit is not
+ contiguous.
+ (out_debug_abbrev): Emit DW_AT_ranges abbreviation if code in
+ is not contiguous.
+ (dwarf2_finish): Create and pass ranges_seg to out_debug_info.
+ (out_debug_ranges): New function to emit .debug_ranges section
+ when code is not contiguous.
+
+2006-08-08 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (WARN_DEPRECATED): Enable.
+
+2006-08-05 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * config/tc-arm.c: Move "dwarf2dbg.h" inclusion out of OBJ_ELF
+ only block.
+ (pe_directive_secrel) [TE_PE]: New function.
+ (md_pseudo_table) [!OBJ_ELF]: Handle 2byte, 4byte, 8byte, file,
+ loc, loc_mark_labels.
+ [TE_PE]: Handle secrel32.
+ (output_relax_insn): Remove OBJ_ELF around dwarf2_emit_insn
+ call.
+ (output_inst): Remove OBJ_ELF around dwarf2_emit_insn call.
+ (arm_frob_label): Remove OBJ_ELF around dwarf2_emit_label call.
+ (md_section_align): Only round section sizes here for AOUT
+ targets.
+ (tc_arm_regname_to_dw2regnum): Move out for OBJ_ELF only block.
+ (tc_pe_dwarf2_emit_offset): New function.
+ (md_apply_fix) [TE_PE]: Handle BFD_RELOC_32_SECREL.
+ (cons_fix_new_arm): Handle O_secrel.
+ * config/tc-arm.h : Move DWARF2_LINE_MIN_INSN_LENGTH,
+ DWARF2_DEFAULT_RETURN_COLUMN and DWARF2_CIE_DATA_ALIGNMENT out
+ of OBJ_ELF only block.
+ [TE_PE]: Define O_secrel, TC_DWARF2_EMIT_OFFSET, and declare
+ tc_pe_dwarf2_emit_offset.
+
+2006-08-04 Richard Sandiford <richard@codesourcery.com>
+
+ * config/tc-sh.c (apply_full_field_fix): New function.
+ (md_apply_fix): Use it instead of md_number_to_chars. Do not fill
+ in fx_addnumber for BFD_RELOC_32_PLT_PCREL.
+ (tc_gen_reloc): Use fx_addnumber rather than 0 as the default case.
+ * config/tc-sh.h (TARGET_FORMAT): Override for TE_VXWORKS.
+
+2006-08-03 Nick Clifton <nickc@redhat.com>
+
+ PR gas/2991
+ * config.in: Regenerate.
+
+2006-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ * config/tc-arm.c (parse_operands): Handle invalid register name
+ for OP_RIWR_RIWC.
+
+2006-08-03 Joseph Myers <joseph@codesourcery.com>
+
+ * config/tc-arm.c (enum operand_parse_code): Add OP_RIWC_RIWG.
+ (parse_operands): Handle it.
+ (insns): Use it for tmcr and tmrc.
+
+2006-08-02 Petr Salinger <Petr.Salinger@seznam.cz>
+
+ PR binutils/2983
+ * config/tc-i386.c (md_parse_option): Treat any target starting
+ with elf64_x86_64 as a viable target for the -64 switch.
+ (i386_target_format): For 64-bit ELF flavoured output use
+ ELF_TARGET_FORMAT64.
+ * config/tc-i386.h (ELF_TARGET_FORMAT64): Define.
+
+2006-08-02 Nick Clifton <nickc@redhat.com>
+
+ PR gas/2991
+ * acinclude.m4 (BFD_BINARY_FOPEN): Import this function from
+ bfd/aclocal.m4.
+ * configure.in: Run BFD_BINARY_FOPEN.
+ * configure: Regenerate.
+ * as.h: Look at USE_BINARY_FOPEN to decide which fopen-*.h header
+ file to include.
+
+2006-08-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (md_assemble): Don't update
+ cpu_arch_isa_flags.
+
+2006-08-01 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (md_section_align): Check ELF-ness at runtime.
+
+2006-08-01 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (macro_build_lui): Fix comment formatting.
+ (md_apply_fix): Likewise. Unify handling of BFD_RELOC_RVA,
+ BFD_RELOC_32 and BFD_RELOC_16.
+ (s_align, s_cpload, s_cplocal, s_cprestore, s_mips_stab,
+ md_convert_frag, md_obj_end): Fix comment formatting.
+
+2006-07-31 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (md_apply_fix, tc_gen_reloc): Remove special
+ handling for BFD_RELOC_MIPS16_JMP.
+
+2006-07-24 Andreas Schwab <schwab@suse.de>
+
+ PR/2756
+ * read.c (read_a_source_file): Ignore unknown text after line
+ comment character. Fix misleading comment.
+
+2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * doc/all.texi, doc/as.texinfo, doc/c-arc.texi, doc/c-arm.texi,
+ doc/c-avr.texi, doc/c-bfin.texi, doc/c-i386.texi,
+ doc/c-i960.texi, doc/c-m32r.texi, doc/c-m68k.texi,
+ doc/c-mmix.texi, doc/c-pdp11.texi, doc/c-ppc.texi,
+ doc/c-tic54x.texi, doc/c-v850.texi, doc/c-xtensa.texi,
+ doc/c-z80.texi, doc/internals.texi: Fix some typos.
+
+2006-07-21 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-sh.c (md_longopts): Add -EL and -EB for use by the
+ linker testsuite.
+
+2006-07-20 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * config/tc-mips.c (md_parse_option): Don't infer optimisation
+ options from debug options.
+
+2006-07-20 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (mips_fix_adjustable): Handle BFD_RELOC_MIPS16_JMP.
+ (tc_gen_reloc): Handle mips16 jumps to section symbol offsets.
+
+2006-07-19 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (insns): Fix rbit Arm opcode.
+
+2006-07-18 Paul Brook <paul@codesourcery.com>
+
+ * tc-arm.c (do_t_add_sub): Use addw/subw when source is PC.
+ (md_convert_frag): Use correct reloc for add_pc. Use
+ BFD_RELOC_ARM_T32_ADD_IMM for normal add/sum.
+ (md_apply_fix): Handle BFD_RELOC_ARM_T32_ADD_IMM.
+ (arm_force_relocation): Handle BFD_RELOC_ARM_T32_ADD_IMM.
+
+2006-07-17 Mat Hostetter <mat@lcs.mit.edu>
+
+ * symbols.c (report_op_error): Fix pasto. Don't use as_bad_where
+ when file and line unknown.
+
+2006-07-17 Thiemo Seufer <ths@mips.com>
+
+ * read.c (s_struct): Use IS_ELF.
+ * config/tc-mips.c (md_begin, mips16_mark_labels, mips_ip,
+ md_parse_option, s_change_sec, pic_need_relax, mips_fix_adjustable,
+ tc_gen_reloc, mips_frob_file_after_relocs, s_mips_end, s_mips_frame,
+ s_mips_mask): Likewise.
+
+2006-07-16 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * read.c (s_struct): Handle ELF section changing.
+ * config/tc-mips.c (s_align): Leave enabling auto-align to the
+ generic code.
+ (s_change_sec): Try section changing only if we output ELF.
+
+2006-07-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (cpu_arch): Remove Cpu086, CpuAthlon and
+ CpuAmdFam10.
+ (smallest_imm_type): Remove Cpu086.
+ (i386_target_format): Likewise.
+
+ * config/tc-i386.h: Remove Cpu086, CpuAthlon and CpuAmdFam10.
+ Update CpuXXX.
+
+2006-07-13 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+ Michael Meissner <michael.meissner@amd.com>
+
+ * config/tc-i386.h (PROCESSOR_AMDFAM10): New processor_type.
+ (CpuSSE4a, CpuABM, CpuAmdFam10): New Cpu directives.
+ * config/tc-i386.c (cpu_arch): Add support for AmdFam10
+ architecture.
+ (i386_align_code): Ditto.
+ (md_assemble_code): Add support for insertq/extrq instructions,
+ swapping as needed for intel syntax.
+ (swap_imm_operands): New function to swap immediate operands.
+ (swap_operands): Deal with 4 operand instructions.
+ (build_modrm_byte): Add support for insertq instruction.
+
+2006-07-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.h (Size64): Fix a typo in comment.
+
+2006-07-12 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-sh.c (md_apply_fix): Do not allow the generic code in
+ fixup_segment() to repeat a range check on a value that has
+ already been checked here.
+
+2006-07-07 James E Wilson <wilson@specifix.com>
+
+ * config/tc-mips.c (mips_cpu_info_table): Add sb1a.
+
+2006-07-06 Mohammed Adnène Trojette <adn@diwi.org>
+ Nick Clifton <nickc@redhat.com>
+
+ PR binutils/2877
+ * doc/as.texi: Fix spelling typo: branchs => branches.
+ * doc/c-m68hc11.texi: Likewise.
+ * config/tc-m68hc11.c: Likewise.
+ Support old spelling of command line switch for backwards
+ compatibility.
+
+2006-07-04 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * config/tc-mips.c (s_is_linkonce): New function.
+ (mips16_mark_labels): Don't adjust mips16 symbol addresses for
+ weak, external, and linkonce symbols.
+ (pic_need_relax): Use s_is_linkonce.
+
+2006-06-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * doc/as.texinfo (Org): Remove space.
+ (P2align): Add "@var{abs-expr},".
+
+2006-06-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (cpu_arch_tune_set): New.
+ (cpu_arch_isa): Likewise.
+ (i386_align_code): Use xchg %ax,%ax for 2 byte nop. Optimize
+ nops with short or long nop sequences based on -march=/.arch
+ and -mtune=.
+ (set_cpu_arch): Set cpu_arch_isa. If cpu_arch_tune_set is 0,
+ set cpu_arch_tune and cpu_arch_tune_flags.
+ (md_parse_option): For -march=, set cpu_arch_isa and set
+ cpu_arch_tune and cpu_arch_tune_flags if cpu_arch_tune_set is
+ 0. Set cpu_arch_tune_set to 1 for -mtune=.
+ (i386_target_format): Don't set cpu_arch_tune.
+
+2006-06-23 Nigel Stephens <nigel@mips.com>
+
+ * config/tc-mips.c (nopic_need_relax): Handle -fdata-sections
+ generated .sbss.* and .gnu.linkonce.sb.*.
+
+2006-06-23 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * config/tc-mips.h (TC_SEGMENT_INFO_TYPE): Declare per-segment
+ label_list.
+ * config/tc-mips.c (label_list): Define per-segment label_list.
+ (mips_clear_insn_labels, mips_move_labels, mips16_mark_labels,
+ append_insn, s_align, s_cons, s_float_cons, s_gpword, s_gpdword,
+ mips_from_file_after_relocs, mips_define_label): Use per-segment
+ label_list.
+
+2006-06-22 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (ISA_SUPPORTS_MIPS16E): New macro.
+ (append_insn): Use it.
+ (md_apply_fix): Whitespace formatting.
+ (md_begin, append_insn, macro, macro2, mips16_immed, mips_align,
+ mips16_extended_frag): Remove register specifier.
+ (md_convert_frag): Likewise. Use TRUE ans FALSE instead of numeric
+ constants.
+
+2006-06-21 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-arm.c (s_arm_unwind_save_vfp_armv6): New. Parse
+ a directive saving VFP registers for ARMv6 or later.
+ (s_arm_unwind_save): Add parameter arch_v6 and call
+ s_arm_unwind_save_vfp or s_arm_unwind_save_vfp_armv6 as
+ appropriate.
+ (md_pseudo_table): Add entry for new "vsave" directive.
+ * doc/c-arm.texi: Correct error in example for "save"
+ directive (fstmdf -> fstmdx). Also document "vsave" directive.
+
+2006-06-18 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
+ Anatoly Sokolov <aesok@post.ru>
+
+ * config/tc-avr.c (mcu_types): Add support for atmega165p, atmega169p
+ and atmega644p devices. Rename atmega164/atmega324 devices to
+ atmega164p/atmega324p.
+ * doc/c-avr.texi: Document new mcu and arch options.
+
+2006-06-17 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (enum parse_operand_result): Move outside of
+ #ifdef OBJ_ELF so that non-ELF targeted ARM ports can build.
+
+2006-06-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.h (processor_type): New.
+ (arch_entry): Add type.
+
+ * config/tc-i386.c (cpu_arch_tune): New.
+ (cpu_arch_tune_flags): Likewise.
+ (cpu_arch_isa_flags): Likewise.
+ (cpu_arch): Updated.
+ (set_cpu_arch): Also update cpu_arch_isa_flags.
+ (md_assemble): Update cpu_arch_isa_flags.
+ (OPTION_MARCH): New.
+ (OPTION_MTUNE): Likewise.
+ (md_longopts): Add -march= and -mtune=.
+ (md_parse_option): Support -march= and -mtune=.
+ (md_show_usage): Add -march=CPU/-mtune=CPU.
+ (i386_target_format): Also update cpu_arch_isa_flags,
+ cpu_arch_tune and cpu_arch_tune_flags.
+
+ * doc/as.texinfo: Add -march=CPU/-mtune=CPU.
+
+ * doc/c-i386.texi: Document -march=CPU/-mtune=CPU.
+
+2006-06-15 Mark Shinwell <shinwell@codesourcery.com>
+
+ * config/tc-arm.c (enum parse_operand_result): New.
+ (struct group_reloc_table_entry): New.
+ (enum group_reloc_type): New.
+ (group_reloc_table): New array.
+ (find_group_reloc_table_entry): New function.
+ (parse_shifter_operand_group_reloc): New function.
+ (parse_address_main): New function, incorporating code
+ from the old parse_address function. To be used via...
+ (parse_address): wrapper for parse_address_main; and
+ (parse_address_group_reloc): new function, likewise.
+ (enum operand_parse_code): New codes OP_SHG, OP_ADDRGLDR,
+ OP_ADDRGLDRS, OP_ADDRGLDC.
+ (parse_operands): Support for these new operand codes.
+ New macro po_misc_or_fail_no_backtrack.
+ (encode_arm_cp_address): Preserve group relocations.
+ (insns): Modify to use the above operand codes where group
+ relocations are permitted.
+ (md_apply_fix): Handle the group relocations
+ ALU_PC_G0_NC through LDC_SB_G2.
+ (tc_gen_reloc): Likewise.
+ (arm_force_relocation): Leave group relocations for the linker.
+ (arm_fix_adjustable): Likewise.
+
+2006-06-15 Julian Brown <julian@codesourcery.com>
+
+ * config/tc-arm.c (do_vfp_nsyn_ldr_str): Remove, fold into...
+ (do_neon_ldr_str): Always defer to VFP encoding routines, which handle
+ relocs properly.
+
+2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (process_suffix): Don't add rex64 for
+ "xchg %rax,%rax".
+
+2006-06-09 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (mips_ip): Maintain argument count.
+
+2006-06-09 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-iq2000.c: Include sb.h.
+
+2006-06-08 Nigel Stephens <nigel@mips.com>
+
+ * config/tc-mips.c (mips_pseudo_table): Add "origin" and "repeat"
+ aliases for better compatibility with SGI tools.
+
+2006-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in (BFDLIB, BFDVER_H, ALL_OBJ_DEPS): Delete.
+ * Makefile.am (GASLIBS): Expand @BFDLIB@.
+ (BFDVER_H): Delete.
+ (OBJS): Expand @ALL_OBJ_DEPS@. Depend on all fopen-*.h variants.
+ (obj-aout.o): Depend on $(DEP_@target_get_type@_aout)
+ (obj-coff.o, obj-ecoff.o, obj-elf.o): Similarly.
+ Run "make dep-am".
+ * dep-in.sed: Don't substitute bfdver.h. Do remove symcat.h.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+
+ * po/Make-in (pdf, ps): New dummy targets.
+
+2006-06-07 Julian Brown <julian@codesourcery.com>
+
+ * config/tc-arm.c (stdarg.h): include.
+ (arm_it): Add uncond_value field. Add isvec and issingle to operand
+ array.
+ (arm_reg_type): Add REG_TYPE_VFSD (single or double VFP reg) and
+ REG_TYPE_NSDQ (single, double or quad vector reg).
+ (reg_expected_msgs): Update.
+ (BAD_FPU): Add macro for unsupported FPU instruction error.
+ (parse_neon_type): Support 'd' as an alias for .f64.
+ (parse_typed_reg_or_scalar): Support REG_TYPE_VFSD, REG_TYPE_NSDQ
+ sets of registers.
+ (parse_vfp_reg_list): Don't update first arg on error.
+ (parse_neon_mov): Support extra syntax for VFP moves.
+ (operand_parse_code): Add OP_RVSD, OP_RNSDQ, OP_VRSDLST, OP_RVSD_IO,
+ OP_RNSDQ_RNSC, OP_RVC_PSR, OP_APSR_RR, OP_oRNSDQ.
+ (parse_operands): Support isvec, issingle operands fields, new parse
+ codes above.
+ (do_vfp_nsyn_mrs, do_vfp_nsyn_msr): New functions. Support VFP mrs,
+ msr variants.
+ (do_mrs, do_msr, do_t_mrs, do_t_msr): Add support for above.
+ (NEON_ENC_TAB): Add vnmul, vnmla, vnmls, vcmp, vcmpz, vcmpe, vcmpez.
+ (NEON_ENC_SINGLE, NEON_ENC_DOUBLE): Define macros.
+ (NEON_SHAPE_DEF): New macro. Define table of possible instruction
+ shapes.
+ (neon_shape): Redefine in terms of above.
+ (neon_shape_class): New enumeration, table of shape classes.
+ (neon_shape_el): New enumeration. One element of a shape.
+ (neon_shape_el_size): Register widths of above, where appropriate.
+ (neon_shape_info): New struct. Info for shape table.
+ (neon_shape_tab): New array.
+ (neon_type_mask): Add N_F64, N_VFP. Update N_MAX_NONSPECIAL.
+ (neon_check_shape): Rewrite as...
+ (neon_select_shape): New function to classify instruction shapes,
+ driven by new table neon_shape_tab array.
+ (neon_quad): New function. Return 1 if shape should set Q flag in
+ instructions (or equivalent), 0 otherwise.
+ (type_chk_of_el_type): Support F64.
+ (el_type_of_type_chk): Likewise.
+ (neon_check_type): Add support for VFP type checking (VFP data
+ elements fill their containing registers).
+ (do_vfp_cond_or_thumb): Fill in condition field in ARM mode, or 0xE
+ in thumb mode for VFP instructions.
+ (do_vfp_nsyn_opcode): New function. Look up the opcode in argument,
+ and encode the current instruction as if it were that opcode.
+ (try_vfp_nsyn): New. If this looks like a VFP instruction with ARGS
+ arguments, call function in PFN.
+ (do_vfp_nsyn_add_sub, do_vfp_nsyn_mla_mls, do_vfp_nsyn_mul)
+ (do_vfp_nsyn_abs_neg, do_vfp_nsyn_ldm_stm, do_vfp_nsyn_ldr_str)
+ (do_vfp_nsyn_sqrt, do_vfp_nsyn_div, do_vfp_nsyn_nmul)
+ (do_vfp_nsyn_cmp, nsyn_insert_sp, do_vfp_nsyn_push)
+ (do_vfp_nsyn_pop, do_vfp_nsyn_cvt, do_vfp_nsyn_cvtz): New functions.
+ Redirect Neon-syntax VFP instructions to VFP instruction handlers.
+ (do_neon_dyadic_i_su, do_neon_dyadic_i64_su, do_neon_shl_imm)
+ (do_neon_qshl_imm, do_neon_logic, do_neon_bitfield)
+ (neon_dyadic_misc, neon_compare, do_neon_tst, do_neon_qdmulh)
+ (do_neon_fcmp_absolute, do_neon_step, do_neon_sli, do_neon_sri)
+ (do_neon_qshlu_imm, neon_move_immediate, do_neon_mvn, do_neon_ext)
+ (do_neon_rev, do_neon_dup, do_neon_rshift_round_imm, do_neon_trn)
+ (do_neon_zip_uzp, do_neon_sat_abs_neg, do_neon_pair_long)
+ (do_neon_recip_est, do_neon_cls, do_neon_clz, do_neon_cnt)
+ (do_neon_swp): Use neon_select_shape not neon_check_shape. Use
+ neon_quad.
+ (vfp_or_neon_is_neon): New function. Call if a mnemonic shared
+ between VFP and Neon turns out to belong to Neon. Perform
+ architecture check and fill in condition field if appropriate.
+ (do_neon_addsub_if_i, do_neon_mac_maybe_scalar, do_neon_abs_neg)
+ (do_neon_cvt): Add support for VFP variants of instructions.
+ (neon_cvt_flavour): Extend to cover VFP conversions.
+ (do_neon_mov): Rewrite to use neon_select_shape. Add support for VFP
+ vmov variants.
+ (do_neon_ldr_str): Handle single-precision VFP load/store.
+ (do_neon_ld_st_interleave, do_neon_ld_st_lane, do_neon_ld_dup): Use
+ NS_NULL not NS_IGNORE.
+ (opcode_tag): Add OT_csuffixF for operands which either take a
+ conditional suffix, or have 0xF in the condition field.
+ (md_assemble): Add support for OT_csuffixF.
+ (NCE): Replace macro with...
+ (NCE_tag, NCE, NCEF): New macros.
+ (nCE): Replace macro with...
+ (nCE_tag, nCE, nCEF): New macros.
+ (insns): Add support for VFP insns or VFP versions of insns msr,
+ mrs, vsqrt, vdiv, vnmul, vnmla, vnmls, vcmp, vcmpe, vpush, vpop,
+ vcvtz, vmul, vmla, vmls, vadd, vsub, vabs, vneg, vldm, vldmia,
+ vldbdb, vstm, vstmia, vstmdb, vldr, vstr, vcvt, vmov. Group shared
+ VFP/Neon insns together.
+
+2006-06-07 Alan Modra <amodra@bigpond.net.au>
+ Ladislav Michl <ladis@linux-mips.org>
+
+ * app.c: Don't include headers already included by as.h.
+ * as.c: Likewise.
+ * atof-generic.c: Likewise.
+ * cgen.c: Likewise.
+ * dwarf2dbg.c: Likewise.
+ * expr.c: Likewise.
+ * input-file.c: Likewise.
+ * input-scrub.c: Likewise.
+ * macro.c: Likewise.
+ * output-file.c: Likewise.
+ * read.c: Likewise.
+ * sb.c: Likewise.
+ * config/bfin-lex.l: Likewise.
+ * config/obj-coff.h: Likewise.
+ * config/obj-elf.h: Likewise.
+ * config/obj-som.h: Likewise.
+ * config/tc-arc.c: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-avr.c: Likewise.
+ * config/tc-bfin.c: Likewise.
+ * config/tc-cris.c: Likewise.
+ * config/tc-d10v.c: Likewise.
+ * config/tc-d30v.c: Likewise.
+ * config/tc-dlx.h: Likewise.
+ * config/tc-fr30.c: Likewise.
+ * config/tc-frv.c: Likewise.
+ * config/tc-h8300.c: Likewise.
+ * config/tc-hppa.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i860.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-ip2k.c: Likewise.
+ * config/tc-iq2000.c: Likewise.
+ * config/tc-m32c.c: Likewise.
+ * config/tc-m32r.c: Likewise.
+ * config/tc-maxq.c: Likewise.
+ * config/tc-mcore.c: Likewise.
+ * config/tc-mips.c: Likewise.
+ * config/tc-mmix.c: Likewise.
+ * config/tc-mn10200.c: Likewise.
+ * config/tc-mn10300.c: Likewise.
+ * config/tc-msp430.c: Likewise.
+ * config/tc-mt.c: Likewise.
+ * config/tc-ns32k.c: Likewise.
+ * config/tc-openrisc.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-s390.c: Likewise.
+ * config/tc-sh.c: Likewise.
+ * config/tc-sh64.c: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-tic30.c: Likewise.
+ * config/tc-tic4x.c: Likewise.
+ * config/tc-tic54x.c: Likewise.
+ * config/tc-v850.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * config/tc-xc16x.c: Likewise.
+ * config/tc-xstormy16.c: Likewise.
+ * config/tc-xtensa.c: Likewise.
+ * config/tc-z80.c: Likewise.
+ * config/tc-z8k.c: Likewise.
+ * macro.h: Don't include sb.h or ansidecl.h.
+ * sb.h: Don't include stdio.h or ansidecl.h.
+ * cond.c: Include sb.h.
+ * itbl-lex.l: Include as.h instead of other system headers.
+ * itbl-parse.y: Likewise.
+ * itbl-ops.c: Similarly.
+ * itbl-ops.h: Don't include as.h or ansidecl.h.
+ * config/bfin-defs.h: Don't include bfd.h or as.h.
+ * config/bfin-parse.y: Include as.h instead of other system headers.
+
+2006-06-06 Ben Elliston <bje@au.ibm.com>
+ Anton Blanchard <anton@samba.org>
+
+ * config/tc-ppc.c (parse_cpu): Handle "-mpower6".
+ (md_show_usage): Document it.
+ (ppc_setup_opcodes): Test power6 opcode flag bits.
+ * doc/c-ppc.texi (PowerPC-Opts): Document "-mpower6".
+
+2006-06-06 Thiemo Seufer <ths@mips.com>
+ Chao-ying Fu <fu@mips.com>
+
+ * config/tc-mips.c (ISA_SUPPORTS_DSP64): New macro.
+ (CPU_HAS_MIPS3D, CPU_HAS_MDMX, CPU_HAS_DSP, CPU_HAS_MT): Delete.
+ (macro_build): Update comment.
+ (mips_ip): Allow DSP64 instructions for MIPS64R2.
+ (mips_after_parse_args): Remove uses of CPU_HAS_MIPS3D and
+ CPU_HAS_MDMX.
+ (mips_cpu_info): Fix formatting. Add MIPS_CPU_ASE_MIPS3D and
+ MIPS_CPU_ASE_MDMX flags for sb1.
+
+2006-06-05 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (macro_build): Use INSERT_OPERAND wherew
+ appropriate.
+ (mips16_macro_build): Use MIPS16_INSERT_OPERAND where appropriate.
+ (mips_ip): Make overflowed/underflowed constant arguments in DSP
+ and MT instructions a fatal error. Use INSERT_OPERAND where
+ appropriate. Improve warnings for break and wait code overflows.
+ Use symbolic constant of OP_MASK_COPZ.
+ (mips16_ip): Use MIPS16_INSERT_OPERAND where appropriate.
+
+2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/Make-in (top_builddir): Define.
+
+2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
+
+ * doc/Makefile.am (TEXI2DVI): Define.
+ * doc/Makefile.in: Regenerate.
+ * doc/c-arc.texi: Fix typo.
+
+2006-06-01 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-ieee.c: Delete.
+ * config/obj-ieee.h: Delete.
+ * Makefile.am (OBJ_FORMATS): Remove ieee.
+ (OBJ_FORMAT_CFILES, OBJ_FORMAT_HFILES): Similarly.
+ (obj-ieee.o): Remove rule.
+ * Makefile.in: Regenerate.
+ * configure.in (atof): Remove tahoe.
+ (OBJ_MAYBE_IEEE): Don't define.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am: Replace INTLLIBS and INTLDEPS with LIBINTL
+ and LIBINTL_DEP everywhere.
+ (INTLLIBS): Remove.
+ (INCLUDES, DEP_INCLUDES): Use @INCINTL@.
+ * acinclude.m4: Include new gettext macros.
+ * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
+ Remove local code for po/Makefile.
+ * Makefile.in, configure, doc/Makefile.in: Regenerated.
+
+2006-05-30 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2006-05-06 Denis Chertykov <denisc@overta.ru>
+
+ * doc/c-avr.texi: New file.
+ * doc/Makefile.am (CPU_DOCS): Add c-avr.texi
+ * doc/all.texi: Set AVR
+ * doc/as.texinfo: Include c-avr.texi
+
+2006-05-28 Jie Zhang <jie.zhang@analog.com>
+
+ * config/bfin-parse.y (check_macfunc): Loose the condition of
+ calling check_multiply_halfregs ().
+
+2006-05-25 Jie Zhang <jie.zhang@analog.com>
+
+ * config/bfin-parse.y (asm_1): Better check and deal with
+ vector and scalar Multiply 16-Bit Operands instructions.
+
+2006-05-24 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-hppa.c: Convert to ISO C90 format.
+ * config/tc-hppa.h: Likewise.
+
+2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
+ Randolph Chung <randolph@tausq.org>
+
+ * config/tc-hppa.c (is_tls_gdidx, is_tls_ldidx, is_tls_dtpoff,
+ is_tls_ieoff, is_tls_leoff): Define.
+ (fix_new_hppa): Handle TLS.
+ (cons_fix_new_hppa): Likewise.
+ (pa_ip): Likewise.
+ (md_apply_fix): Handle TLS relocs.
+ * config/tc-hppa.h (hppa_fix_adjustable): Handle TLS.
+
+2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * config/tc-avr.c: Add new cpu targets avr6, avr2560 and avr2561.
+
+2006-05-23 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ [ gas/ChangeLog ]
+ * config/tc-mips.c (ISA_SUPPORTS_SMARTMIPS): Rename.
+ (ISA_SUPPORTS_DSP_ASE, ISA_SUPPORTS_MT_ASE, ISA_HAS_64BIT_FPRS,
+ ISA_HAS_MXHC1): New macros.
+ (HAVE_32BIT_FPRS): Use ISA_HAS_64BIT_FPRS instead of
+ ISA_HAS_64BIT_REGS. Formatting fixes. Improved comments.
+ (mips_cpu_info): Change to use combined ASE/IS_ISA flag.
+ (MIPS_CPU_IS_ISA, MIPS_CPU_ASE_SMARTMIPS, MIPS_CPU_ASE_DSP,
+ MIPS_CPU_ASE_MT, MIPS_CPU_ASE_MIPS3D, MIPS_CPU_ASE_MDMX): New defines.
+ (mips_after_parse_args): Change default handling of float register
+ size to account for 32bit code with 64bit FP. Better sanity checking
+ of ISA/ASE/ABI option combinations.
+ (s_mipsset): Support switching of GPR and FPR sizes via
+ .set {g,f}p={32,64,default}. Better sanity checking for .set ASE
+ options.
+ (mips_elf_final_processing): We should record the use of 64bit FP
+ registers in 32bit code but we don't, because ELF header flags are
+ a scarce ressource.
+ (mips_cpu_info_table): Add ASE flags for CPUs with mandatory ASE
+ extensions. Add 4ksc, 4kec, 4kem, 4kep, 4ksd, m4kp, 24kec, 24kef,
+ 24kex, 34kc, 34kf, 34kx, 25kf CPU definitions.
+ (mips_cpu_info_from_isa): Use MIPS_CPU_IS_ISA.
+ * doc/c-mips.texi: Document .set {g,f}p={32,64,default}. Document
+ missing -march options. Document .set arch=CPU. Move .set smartmips
+ to ASE page. Use @code for .set FOO examples.
+
+2006-05-23 Jie Zhang <jie.zhang@analog.com>
+
+ * config/tc-bfin.c (bfin_start_line_hook): Bump line counters
+ if needed.
+
+2006-05-23 Jie Zhang <jie.zhang@analog.com>
+
+ * config/bfin-defs.h (bfin_equals): Remove declaration.
+ * config/bfin-parse.y (asm_1): Remove "expr ASSIGN expr".
+ * config/tc-bfin.c (bfin_name_is_register): Remove.
+ (bfin_equals): Remove.
+ * config/tc-bfin.h (TC_EQUAL_IN_INSN): Redefine as 1.
+ (bfin_name_is_register): Remove declaration.
+
+2006-05-19 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * config/tc-mipc.c (ISA_HAS_ODD_SINGLE_FPR): New define.
+ (mips_oddfpreg_ok): New function.
+ (mips_ip): Use it.
+
+2006-05-19 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * config/tc-mips.h (tc_mips_regname_to_dw2regnum): Declare.
+ * config/tc-mipc.c (ABI_NEEDS_64BIT_REGS, ISA_HAS_64BIT_REGS,
+ ISA_HAS_DROR, ISA_HAS_ROR): Reformat.
+ (regname, RTYPE_MASK, RTYPE_NUM, RTYPE_FPU, RTYPE_FCC, RTYPE_VEC,
+ RTYPE_GP, RTYPE_CP0, RTYPE_PC, RTYPE_ACC, RTYPE_CCC, RNUM_MASK,
+ RWARN, GENERIC_REGISTER_NUMBERS, FPU_REGISTER_NAMES,
+ FPU_CONDITION_CODE_NAMES, COPROC_CONDITION_CODE_NAMES,
+ N32N64_SYMBOLIC_REGISTER_NAMES, O32_SYMBOLIC_REGISTER_NAMES,
+ SYMBOLIC_REGISTER_NAMES, MIPS16_SPECIAL_REGISTER_NAMES,
+ MDMX_VECTOR_REGISTER_NAMES, MIPS_DSP_ACCUMULATOR_NAMES, reg_names,
+ reg_names_o32, reg_names_n32n64): Define register classes.
+ (reg_lookup): New function, use register classes.
+ (md_begin): Reserve register names in the symbol table. Simplify
+ OBJ_ELF defines.
+ (mips_ip): Fix comment formatting. Handle symbolic COP0 registers.
+ Use reg_lookup.
+ (mips16_ip): Use reg_lookup.
+ (tc_get_register): Likewise.
+ (tc_mips_regname_to_dw2regnum): New function.
+
+2006-05-19 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-arm.c, config/tc-arm.h (tc_arm_regname_to_dw2regnum):
+ Un-constify string argument.
+ * config/tc-i386.c, config/tc-i386.h (tc_x86_regname_to_dw2regnum):
+ Likewise.
+ * config/tc-m68k.c, config/tc-m68k.h (tc_m68k_regname_to_dw2regnum):
+ Likewise.
+ * config/tc-ppc.c, config/tc-ppc.h (tc_ppc_regname_to_dw2regnum):
+ Likewise.
+ * config/tc-s390.c, config/tc-s390.h (tc_s390_regname_to_dw2regnum):
+ Likewise.
+ * config/tc-sh.c, config/tc-sh.h (sh_regname_to_dw2regnum):
+ Likewise.
+ * config/tc-sparc.c, config/tc-sparc.h (sparc_regname_to_dw2regnum):
+ Likewise.
+
+2006-05-19 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gas/config/tc-m68k.c (m68k_init_arch): Move checking of
+ cfloat/m68881 to correct architecture before using it.
+
+2006-05-16 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * config/tc-avr.h (TC_VALIDATE_FIX): Allow fixups for immediate
+ constant values.
+
+2006-05-15 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_adjust_symtab): Use
+ bfd_is_arm_special_symbol_name.
+
+2006-05-15 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (is_direct_call_opcode, is_branch_jmp_to_next,
+ xg_assemble_vliw_tokens, xtensa_mark_narrow_branches,
+ xtensa_fix_short_loop_frags, is_local_forward_loop, relax_frag_immed):
+ Handle errors from calls to xtensa_opcode_is_* functions.
+
+2006-05-14 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (macro_build): Test for currently active
+ mips16 option.
+ (mips16_ip): Reject invalid opcodes.
+
+2006-05-11 Carlos O'Donell <carlos@codesourcery.com>
+
+ * doc/as.texinfo: Rename "Index" to "AS Index",
+ and "ABORT" to "ABORT (COFF)".
+
+2006-05-11 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (parse_half): New function.
+ (operand_parse_code): Remove OP_Iffff. Add OP_HALF.
+ (parse_operands): Ditto.
+ (do_mov16): Reject invalid relocations.
+ (do_t_mov16): Ditto. Use Thumb reloc numbers.
+ (insns): Replace Iffff with HALF.
+ (md_apply_fix): Add MOVW and MOVT relocs.
+ (tc_gen_reloc): Ditto.
+ * doc/c-arm.texi: Document relocation operators
+
+2006-05-11 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_fix_adjustable): Return 0 for function symbols.
+
+2006-05-11 Thiemo Seufer <ths@mips.com>
+
+ * config/tc-mips.c (append_insn): Don't check the range of j or
+ jal addresses.
+
+2006-05-11 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * config/tc-arm.c (md_pcrel_from_section): Force a bias for
+ relocs against external symbols for WinCE targets.
+ (md_apply_fix): Likewise.
+
+2006-05-09 David Ung <davidu@mips.com>
+
+ * config/tc-mips.c (append_insn): Only warn about an out-of-range
+ j or jal address.
+
+2006-05-09 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (arm_fix_adjustable): For COFF, convert fixups
+ against symbols which are not going to be placed into the symbol
+ table.
+
+2006-05-09 Ben Elliston <bje@au.ibm.com>
+
+ * expr.c (operand): Remove `if (0 && ..)' statement and
+ subsequently unused target_op label. Collapse `if (1 || ..)'
+ statement.
+ * app.c (do_scrub_chars): Remove unused case 0, as it is handled
+ separately above the switch.
+
+2006-05-08 Nick Clifton <nickc@redhat.com>
+
+ PR gas/2623
+ * config/tc-msp430.c (line_separator_character): Define as |.
+
+2006-05-08 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * config/tc-mips.c (mips_set_options): Add ase_smartmips flag.
+ (mips_opts): Likewise.
+ (file_ase_smartmips): New variable.
+ (ISA_HAS_ROR): SmartMIPS implements rotate instructions.
+ (macro_build): Handle SmartMIPS instructions.
+ (mips_ip): Likewise.
+ (md_longopts): Add argument handling for smartmips.
+ (md_parse_options, mips_after_parse_args): Likewise.
+ (s_mipsset): Add .set smartmips support.
+ (md_show_usage): Document -msmartmips/-mno-smartmips.
+ * doc/as.texinfo: Document -msmartmips/-mno-smartmips and
+ .set smartmips.
+ * doc/c-mips.texi: Likewise.
+
+2006-05-08 Alan Modra <amodra@bigpond.net.au>
+
+ * write.c (relax_segment): Add pass count arg. Don't error on
+ negative org/space on first two passes.
+ (relax_seg_info): New struct.
+ (relax_seg, write_object_file): Adjust.
+ * write.h (relax_segment): Update prototype.
+
+2006-05-05 Julian Brown <julian@codesourcery.com>
+
+ * config/tc-arm.c (parse_vfp_reg_list): Improve register bounds
+ checking.
+ (do_neon_mov): Enable several VMOV variants for VFP. Add suitable
+ architecture version checks.
+ (insns): Allow overlapping instructions to be used in VFP mode.
+
+2006-05-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/2598
+ * config/obj-elf.c (obj_elf_change_section): Allow user
+ specified SHF_ALPHA_GPREL.
+
+2006-05-05 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * gas/config/tc-avr.h (TC_VALIDATE_FIX): Define. Disable fixups
+ for PMEM related expressions.
+
+2006-05-05 Nick Clifton <nickc@redhat.com>
+
+ PR gas/2582
+ * dwarf2dbg.c (INSERT_DIR_SEPARATOR): New macro. Handles the
+ insertion of a directory separator character into a string at a
+ given offset. Uses heuristics to decide when to use a backslash
+ character rather than a forward-slash character.
+ (dwarf2_directive_loc): Use the macro.
+ (out_debug_info): Likewise.
+
+2006-05-05 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * config/tc-mips.c (macro_build): Add case 'k' to handle cache
+ instruction.
+ (macro): Add new case M_CACHE_AB.
+
+2006-05-04 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/tc-arm.c (opcode_tag): Add OT_cinfix3_deprecated.
+ (opcode_lookup): Issue a warning for opcode with
+ OT_cinfix3_deprecated. Otherwise treat OT_cinfix3_deprecated
+ identical to OT_cinfix3.
+ (TxC3w, TC3w, tC3w): New.
+ (insns): Use tC3w and TC3w for comparison instructions with
+ 's' suffix.
+
+2006-05-04 Alan Modra <amodra@bigpond.net.au>
+
+ * subsegs.h (struct frchain): Delete frch_seg.
+ (frchain_root): Delete.
+ (seg_info): Define as macro.
+ * subsegs.c (frchain_root): Delete.
+ (abs_seg_info, und_seg_info, absolute_frchain): Delete.
+ (subsegs_begin, subseg_change): Adjust for above.
+ (subseg_set_rest): Likewise. Add new frchain structs to seginfo
+ rather than to one big list.
+ (subseg_get): Don't special case abs, und sections.
+ (subseg_new, subseg_force_new): Don't set frchainP here.
+ (seg_info): Delete.
+ (subsegs_print_statistics): Adjust frag chain control list traversal.
+ * debug.c (dmp_frags): Likewise.
+ * dwarf2dbg.c (first_frag_for_seg): Don't start looking for frag
+ at frchain_root. Make use of known frchain ordering.
+ (last_frag_for_seg): Likewise.
+ (get_frag_fix): Likewise. Add seg param.
+ (process_entries, out_debug_aranges): Adjust get_frag_fix calls.
+ * write.c (chain_frchains_together_1): Adjust for struct frchain.
+ (SUB_SEGMENT_ALIGN): Likewise.
+ (subsegs_finish): Adjust frchain list traversal.
+ * config/tc-xtensa.c (xtensa_cleanup_align_frags): Likewise.
+ (xtensa_fix_target_frags, xtensa_mark_narrow_branches): Likewise.
+ (xtensa_mark_zcl_first_insns, xtensa_fix_a0_b_retw_frags): Likewise.
+ (xtensa_fix_b_j_loop_end_frags): Likewise.
+ (xtensa_fix_close_loop_end_frags): Likewise.
+ (xtensa_fix_short_loop_frags, xtensa_sanity_check): Likewise.
+ (retrieve_segment_info): Delete frch_seg initialisation.
+
+2006-05-03 Alan Modra <amodra@bigpond.net.au>
+
+ * subsegs.c (subseg_get): Don't call obj_sec_set_private_data.
+ * config/obj-elf.h (obj_sec_set_private_data): Delete.
+ * config/tc-hppa.c (tc_gen_reloc): Don't use bfd_abs_symbol.
+ * config/tc-mn10300.c (tc_gen_reloc): Likewise.
+
+2006-05-02 Joseph Myers <joseph@codesourcery.com>
+
+ * config/tc-arm.c (do_iwmmxt_wldstbh): Don't multiply offset by 4
+ here.
+ (md_apply_fix3): Multiply offset by 4 here for
+ BFD_RELOC_ARM_CP_OFF_IMM_S2 and BFD_RELOC_ARM_T32_CP_OFF_IMM_S2.
+
+2006-05-02 H.J. Lu <hongjiu.lu@intel.com>
+ Jan Beulich <jbeulich@novell.com>
+
+ * config/tc-i386.c (output_invalid_buf): Change size for
+ unsigned char.
+ * config/tc-tic30.c (output_invalid_buf): Likewise.
+
+ * config/tc-i386.c (output_invalid): Cast none-ascii char to
+ unsigned char.
+ * config/tc-tic30.c (output_invalid): Likewise.
+
+2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * doc/Makefile.am (AM_MAKEINFOFLAGS): New.
+ (TEXI2POD): Use AM_MAKEINFOFLAGS.
+ (asconfig.texi): Don't set top_srcdir.
+ * doc/as.texinfo: Don't use top_srcdir.
+ * aclocal.m4, Makefile.in, doc/Makefile.in: Regenerated.
+
+2006-05-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (output_invalid_buf): Change size to 16.
+ * config/tc-tic30.c (output_invalid_buf): Likewise.
+
+ * config/tc-i386.c (output_invalid): Use snprintf instead of
+ sprintf.
+ * config/tc-ia64.c (declare_register_set): Likewise.
+ (emit_one_bundle): Likewise.
+ (check_dependencies): Likewise.
+ * config/tc-tic30.c (output_invalid): Likewise.
+
+2006-05-02 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_optimize_expr): New function.
+ * config/tc-arm.h (md_optimize_expr): Define
+ (arm_optimize_expr): Add prototype.
+ (TC_FORCE_RELOCATION_SUB_SAME): Define.
+
+2006-05-02 Ben Elliston <bje@au.ibm.com>
+
+ * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Make single bit
+ field unsigned.
+
+ * sb.h (sb_list_vector): Move to sb.c.
+ * sb.c (free_list): Use type of sb_list_vector directly.
+ (sb_build): Fix off-by-one error in assertion about `size'.
+
+2006-05-01 Ben Elliston <bje@au.ibm.com>
+
+ * listing.c (listing_listing): Remove useless loop.
+ * macro.c (macro_expand): Remove is_positional local variable.
+ * read.c (s_comm_internal): Simplify `if' condition 1 || x -> 1
+ and simplify surrounding expressions, where possible.
+ (assign_symbol): Likewise.
+ (s_weakref): Likewise.
+ * symbols.c (colon): Likewise.
+
+2006-05-01 James Lemke <jwlemke@wasabisystems.com>
+
+ * subsegs.c (subseg_set_rest): Always set seginfp->frchainP if NULL.
+
+2006-04-30 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * config/tc-mips.c (validate_mips_insn): Handling of udi cases.
+ (mips_immed): New table that records various handling of udi
+ instruction patterns.
+ (mips_ip): Adds udi handling.
+
+2006-04-28 Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf2dbg.c (get_line_subseg): Attach new struct line_seg to end
+ of list rather than beginning.
+
+2006-04-26 Julian Brown <julian@codesourcery.com>
+
+ * gas/config/tc-arm.c (neon_is_quarter_float): Move, and rename to...
+ (is_quarter_float): Rename from above. Simplify slightly.
+ (parse_qfloat_immediate): Parse a "quarter precision" floating-point
+ number.
+ (parse_neon_mov): Parse floating-point constants.
+ (neon_qfloat_bits): Fix encoding.
+ (neon_cmode_for_move_imm): Tweak to use floating-point encoding in
+ preference to integer encoding when using the F32 type.
+
+2006-04-26 Julian Brown <julian@codesourcery.com>
+
+ * config/tc-arm.c (neon_el_type): Make NT_invtype be the zero (so
+ zero-initialising structures containing it will lead to invalid types).
+ (arm_it): Add vectype to each operand.
+ (NTA_HASTYPE, NTA_HASINDEX): Constants used in neon_typed_alias
+ defined field.
+ (neon_typed_alias): New structure. Extra information for typed
+ register aliases.
+ (reg_entry): Add neon type info field.
+ (arm_reg_parse): Remove RTYPE argument (revert to previous arguments).
+ Break out alternative syntax for coprocessor registers, etc. into...
+ (arm_reg_alt_syntax): New function. Alternate syntax handling broken
+ out from arm_reg_parse.
+ (parse_neon_type): Move. Return SUCCESS/FAIL.
+ (first_error): New function. Call to ensure first error which occurs is
+ reported.
+ (parse_neon_operand_type): Parse exactly one type.
+ (NEON_ALL_LANES, NEON_INTERLEAVE_LANES): Move.
+ (parse_typed_reg_or_scalar): New function. Handle core of both
+ arm_typed_reg_parse and parse_scalar.
+ (arm_typed_reg_parse): Parse a register with an optional type.
+ (NEON_SCALAR_REG, NEON_SCALAR_INDEX): Extract parts of parse_scalar
+ result.
+ (parse_scalar): Parse a Neon scalar with optional type.
+ (parse_reg_list): Use first_error.
+ (parse_vfp_reg_list): Use arm_typed_reg_parse instead of arm_reg_parse.
+ (neon_alias_types_same): New function. Return true if two (alias) types
+ are the same.
+ (parse_neon_el_struct_list): Use parse_typed_reg_or_scalar. Return type
+ of elements.
+ (insert_reg_alias): Return new reg_entry not void.
+ (insert_neon_reg_alias): New function. Insert type/index information as
+ well as register for alias.
+ (create_neon_reg_alias): New function. Parse .dn/.qn directives and
+ make typed register aliases accordingly.
+ (s_dn, s_qn): New functions. Handle incorrectly used .dn/.qn at start
+ of line.
+ (s_unreq): Delete type information if present.
+ (s_arm_unwind_save_mmxwr): Remove arg 3 from arm_reg_parse calls.
+ (s_arm_unwind_save_mmxwcg): Likewise.
+ (s_arm_unwind_movsp): Likewise.
+ (s_arm_unwind_setfp): Likewise.
+ (parse_shift): Likewise.
+ (parse_shifter_operand): Likewise.
+ (parse_address): Likewise.
+ (parse_tb): Likewise.
+ (tc_arm_regname_to_dw2regnum): Likewise.
+ (md_pseudo_table): Add dn, qn.
+ (parse_neon_mov): Handle typed operands.
+ (parse_operands): Likewise.
+ (neon_type_mask): Add N_SIZ.
+ (N_ALLMODS): New macro.
+ (neon_check_shape): Fix typo in NS_DDD_QQQ case. Use first_error.
+ (el_type_of_type_chk): Add some safeguards.
+ (modify_types_allowed): Fix logic bug.
+ (neon_check_type): Handle operands with types.
+ (neon_three_same): Remove redundant optional arg handling.
+ (do_neon_dyadic_i64_su, do_neon_shl_imm, do_neon_qshl_imm)
+ (do_neon_logic, do_neon_qdmulh, do_neon_fcmp_absolute)
+ (do_neon_step): Adjust accordingly.
+ (neon_cmode_for_logic_imm): Use first_error.
+ (do_neon_bitfield): Call neon_check_type.
+ (neon_dyadic): Rename to...
+ (neon_dyadic_misc): ...this. New name for neon_dyadic. Add bitfield
+ to allow modification of type of the destination.
+ (do_neon_dyadic_if_su, do_neon_dyadic_if_i, do_neon_dyadic_if_i_d)
+ (do_neon_addsub_if_i, do_neon_mul): Adjust accordingly.
+ (do_neon_compare): Make destination be an untyped bitfield.
+ (neon_scalar_for_mul): Use NEON_SCALAR_REG, NEON_SCALAR_INDEX.
+ (neon_mul_mac): Return early in case of errors.
+ (neon_move_immediate): Use first_error.
+ (neon_mac_reg_scalar_long): Fix type to include scalar.
+ (do_neon_dup): Likewise.
+ (do_neon_mov): Likewise (in several places).
+ (do_neon_tbl_tbx): Fix type.
+ (do_neon_ld_st_interleave, neon_alignment_bit, do_neon_ld_st_lane)
+ (do_neon_ld_dup): Exit early in case of errors and/or use
+ first_error.
+ (opcode_lookup): Update for parse_neon_type returning SUCCESS/FAIL.
+ Handle .dn/.qn directives.
+ (REGDEF): Add zero for reg_entry neon field.
+
+2006-04-26 Julian Brown <julian@codesourcery.com>
+
+ * config/tc-arm.c (limits.h): Include.
+ (fpu_arch_vfp_v3, fpu_vfp_ext_v3, fpu_neon_ext_v1)
+ (fpu_vfp_v3_or_neon_ext): Declare constants.
+ (neon_el_type): New enumeration of types for Neon vector elements.
+ (neon_type_el): New struct. Define type and size of a vector element.
+ (NEON_MAX_TYPE_ELS): Define constant. The maximum number of types per
+ instruction.
+ (neon_type): Define struct. The type of an instruction.
+ (arm_it): Add 'vectype' for the current instruction.
+ (isscalar, immisalign, regisimm, isquad): New predicates for operands.
+ (vfp_sp_reg_pos): Rename to...
+ (vfp_reg_pos): ...this, and add VFP_REG_Dd, VFP_REG_Dm, VFP_REG_Dn
+ tags.
+ (arm_reg_type): Add REG_TYPE_NQ (Neon Q register) and REG_TYPE_NDQ
+ (Neon D or Q register).
+ (reg_expected_msgs): Sync with above. Allow VFD to mean VFP or Neon D
+ register.
+ (GE_OPT_PREFIX_BIG): Define constant, for use in...
+ (my_get_expression): Allow above constant as argument to accept
+ 64-bit constants with optional prefix.
+ (arm_reg_parse): Add extra argument to return the specific type of
+ register in when either a D or Q register (REG_TYPE_NDQ) is
+ requested. Can be NULL.
+ (parse_scalar): New function. Parse Neon scalar (vector reg and index).
+ (parse_reg_list): Update for new arm_reg_parse args.
+ (parse_vfp_reg_list): Allow parsing of Neon D/Q register lists.
+ (parse_neon_el_struct_list): New function. Parse element/structure
+ register lists for VLD<n>/VST<n> instructions.
+ (s_arm_unwind_save_vfp): Update for new parse_vfp_reg_list args.
+ (s_arm_unwind_save_mmxwr): Likewise.
+ (s_arm_unwind_save_mmxwcg): Likewise.
+ (s_arm_unwind_movsp): Likewise.
+ (s_arm_unwind_setfp): Likewise.
+ (parse_big_immediate): New function. Parse an immediate, which may be
+ 64 bits wide. Put results in inst.operands[i].
+ (parse_shift): Update for new arm_reg_parse args.
+ (parse_address): Likewise. Add parsing of alignment specifiers.
+ (parse_neon_mov): Parse the operands of a VMOV instruction.
+ (operand_parse_code): Add OP_RND, OP_RNQ, OP_RNDQ, OP_RNSC, OP_NRDLST,
+ OP_NSTRLST, OP_NILO, OP_RNDQ_I0, OP_RR_RNSC, OP_RNDQ_RNSC, OP_RND_RNSC,
+ OP_VMOV, OP_RNDQ_IMVNb, OP_RNDQ_I63b, OP_I0, OP_I16z, OP_I32z, OP_I64,
+ OP_I64z, OP_oI32b, OP_oRND, OP_oRNQ, OP_oRNDQ.
+ (parse_operands): Handle new codes above.
+ (encode_arm_vfp_sp_reg): Rename to...
+ (encode_arm_vfp_reg): ...this. Handle D regs (0-31) too. Complain if
+ selected VFP version only supports D0-D15.
+ (do_vfp_sp_monadic, do_vfp_sp_dyadic, do_vfp_sp_compare_z)
+ (do_vfp_dp_sp_cvt, do_vfp_reg_from_sp, do_vfp_reg2_from_sp2)
+ (do_vfp_sp_from_reg, do_vfp_sp2_from_reg2, do_vfp_sp_ldst)
+ (do_vfp_dp_ldst, vfp_sp_ldstm, vfp_dp_ldstm): Update for new
+ encode_arm_vfp_reg name, and allow 32 D regs.
+ (do_vfp_dp_rd_rm, do_vfp_dp_rn_rd, do_vfp_dp_rd_rn, do_vfp_dp_rd_rn_rm)
+ (do_vfp_rm_rd_rn): New functions to encode VFP insns allowing 32 D
+ regs.
+ (do_vfp_sp_const, do_vfp_dp_const, vfp_conv, do_vfp_sp_conv_16)
+ (do_vfp_dp_conv_16, do_vfp_sp_conv_32, do_vfp_dp_conv_32): Handle
+ constant-load and conversion insns introduced with VFPv3.
+ (neon_tab_entry): New struct.
+ (NEON_ENC_TAB): Bit patterns for overloaded Neon instructions, and
+ those which are the targets of pseudo-instructions.
+ (neon_opc): Enumerate opcodes, use as indices into...
+ (neon_enc_tab): ...this. Hold data from NEON_ENC_TAB.
+ (NEON_ENC_INTEGER, NEON_ENC_ARMREG, NEON_ENC_POLY, NEON_ENC_FLOAT)
+ (NEON_ENC_SCALAR, NEON_ENC_IMMED, NEON_ENC_INTERLV, NEON_ENC_LANE)
+ (NEON_ENC_DUP): Define meaningful helper macros to look up values in
+ neon_enc_tab.
+ (neon_shape): Enumerate shapes (permitted register widths, etc.) for
+ Neon instructions.
+ (neon_type_mask): New. Compact type representation for type checking.
+ (N_SU_ALL, N_SU_32, N_SU_16_64, N_SUF_32, N_I_ALL, N_IF_32): Common
+ permitted type combinations.
+ (N_IGNORE_TYPE): New macro.
+ (neon_check_shape): New function. Check an instruction shape for
+ multiple alternatives. Return the specific shape for the current
+ instruction.
+ (neon_modify_type_size): New function. Modify a vector type and size,
+ depending on the bit mask in argument 1.
+ (neon_type_promote): New function. Convert a given "key" type (of an
+ operand) into the correct type for a different operand, based on a bit
+ mask.
+ (type_chk_of_el_type): New function. Convert a type and size into the
+ compact representation used for type checking.
+ (el_type_of_type_ckh): New function. Reverse of above (only when a
+ single bit is set in the bit mask).
+ (modify_types_allowed): New function. Alter a mask of allowed types
+ based on a bit mask of modifications.
+ (neon_check_type): New function. Check the type of the current
+ instruction against the variable argument list. The "key" type of the
+ instruction is returned.
+ (neon_dp_fixup): New function. Fill in and modify instruction bits for
+ a Neon data-processing instruction depending on whether we're in ARM
+ mode or Thumb-2 mode.
+ (neon_logbits): New function.
+ (neon_three_same, neon_two_same, do_neon_dyadic_i_su)
+ (do_neon_dyadic_i64_su, neon_imm_shift, do_neon_shl_imm)
+ (do_neon_qshl_imm, neon_cmode_for_logic_imm, neon_bits_same_in_bytes)
+ (neon_squash_bits, neon_is_quarter_float, neon_qfloat_bits)
+ (neon_cmode_for_move_imm, neon_write_immbits, neon_invert_size)
+ (do_neon_logic, do_neon_bitfield, neon_dyadic, do_neon_dyadic_if_su)
+ (do_neon_dyadic_if_su_d, do_neon_dyadic_if_i, do_neon_dyadic_if_i_d)
+ (do_neon_addsub_if_i, neon_exchange_operands, neon_compare)
+ (do_neon_cmp, do_neon_cmp_inv, do_neon_ceq, neon_scalar_for_mul)
+ (neon_mul_mac, do_neon_mac_maybe_scalar, do_neon_tst, do_neon_mul)
+ (do_neon_qdmulh, do_neon_fcmp_absolute, do_neon_fcmp_absolute_inv)
+ (do_neon_step, do_neon_abs_neg, do_neon_sli, do_neon_sri)
+ (do_neon_qshlu_imm, do_neon_qmovn, do_neon_qmovun)
+ (do_neon_rshift_sat_narrow, do_neon_rshift_sat_narrow_u, do_neon_movn)
+ (do_neon_rshift_narrow, do_neon_shll, neon_cvt_flavour, do_neon_cvt)
+ (neon_move_immediate, do_neon_mvn, neon_mixed_length)
+ (do_neon_dyadic_long, do_neon_abal, neon_mac_reg_scalar_long)
+ (do_neon_mac_maybe_scalar_long, do_neon_dyadic_wide, do_neon_vmull)
+ (do_neon_ext, do_neon_rev, do_neon_dup, do_neon_mov)
+ (do_neon_rshift_round_imm, do_neon_movl, do_neon_trn, do_neon_zip_uzp)
+ (do_neon_sat_abs_neg, do_neon_pair_long, do_neon_recip_est)
+ (do_neon_cls, do_neon_clz, do_neon_cnt, do_neon_swp, do_neon_tbl_tbx)
+ (do_neon_ldm_stm, do_neon_ldr_str, do_neon_ld_st_interleave)
+ (neon_alignment_bit, do_neon_ld_st_lane, do_neon_ld_dup)
+ (do_neon_ldx_stx): New functions. Neon bit encoding and encoding
+ helpers.
+ (parse_neon_type): New function. Parse Neon type specifier.
+ (opcode_lookup): Allow parsing of Neon type specifiers.
+ (REGNUM2, REGSETH, REGSET2): New macros.
+ (reg_names): Add new VFPv3 and Neon registers.
+ (NUF, nUF, NCE, nCE): New macros for opcode table.
+ (insns): More VFP registers allowed in fcpyd, fmdhr, fmdlr, fmrdh,
+ fmrdl, fabsd, fnegd, fsqrtd, faddd, fsubd, fmuld, fdivd, fmacd, fmscd,
+ fnmuld, fnmacd, fnmscd, fcmpd, fcmpzd, fcmped, fcmpezd, fmdrr, fmrrd.
+ Add Neon instructions vaba, vhadd, vrhadd, vhsub, vqadd, vqsub, vrshl,
+ vqrshl, vshl, vqshl{u}, vand, vbic, vorr, vorn, veor, vbsl, vbit, vbif,
+ vabd, vmax, vmin, vcge, vcgt, vclt, vcle, vceq, vpmax, vpmin, vmla,
+ vmls, vpadd, vadd, vsub, vtst, vmul, vqdmulh, vqrdmulh, vacge, vacgt,
+ vaclt, vacle, vrecps, vrsqrts, vabs, vneg, v{r}shr, v{r}sra, vsli,
+ vsri, vqshrn, vq{r}shr{u}n, v{r}shrn, vshll, vcvt, vmov, vmvn, vabal,
+ vabdl, vaddl, vsubl, vmlal, vmlsl, vaddw, vsubw, v{r}addhn, v{r}subhn,
+ vqdmlal, vqdmlsl, vqdmull, vmull, vext, vrev64, vrev32, vrev16, vdup,
+ vmovl, v{q}movn, vzip, vuzp, vqabs, vqneg, vpadal, vpaddl, vrecpe,
+ vrsqrte, vcls, vclz, vcnt, vswp, vtrn, vtbl, vtbx, vldm, vstm, vldr,
+ vstr, vld[1234], vst[1234], fconst[sd], f[us][lh]to[sd],
+ fto[us][lh][sd].
+ (tc_arm_regname_to_dw2regnum): Update for arm_reg_parse args.
+ (arm_cpu_option_table): Add Neon and VFPv3 to Cortex-A8.
+ (arm_option_cpu_value): Add vfp3 and neon.
+ (aeabi_set_public_attributes): Support VFPv3 and NEON attributes. Fix
+ VFPv1 attribute.
+
+2006-04-25 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa-relax.c (widen_spec_list): Use new "WIDE.<opcode>"
+ syntax instead of hardcoded opcodes with ".w18" suffixes.
+ (wide_branch_opcode): New.
+ (build_transition): Use it to check for wide branch opcodes with
+ either ".w18" or ".w15" suffixes.
+
+2006-04-25 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (xtensa_create_literal_symbol,
+ xg_assemble_literal, xg_assemble_literal_space): Do not set the
+ frag's is_literal flag.
+
+2006-04-25 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa-relax.c (XCHAL_HAVE_WIDE_BRANCHES): Provide default.
+
+2006-04-23 Kazu Hirata <kazu@codesourcery.com>
+
+ * config/obj-coff.c, config/tc-arm.c, config/tc-bfin.c,
+ config/tc-cris.c, config/tc-crx.c, config/tc-i386.c,
+ config/tc-ia64.c, config/tc-maxq.c, config/tc-maxq.h,
+ config/tc-mips.c, config/tc-msp430.c, config/tc-sh.c,
+ config/tc-tic4x.c, config/tc-xtensa.c: Fix comment typos.
+
+2005-04-20 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (s_arm_arch, s_arm_cpu, s_arm_fpu): Enable for
+ all targets.
+ (md_pseudo_table): Enable .arch, .cpu and .fpu for all targets.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (CPU_TYPES): Add maxq and mt. Sort.
+ (CPU_OBJ_VALID): Change sense of COFF test to default to invalid.
+ Make some cpus unsupported on ELF. Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in (--enable-targets): Indent help message.
+ * configure: Regenerate.
+
+2006-04-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/2533
+ * config/tc-i386.c (i386_immediate): Check illegal immediate
+ register operand.
+
+2006-04-18 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-i386.c: Formatting.
+ (output_disp, output_imm): ISO C90 params.
+
+ * frags.c (frag_offset_fixed_p): Constify args.
+ * frags.h (frag_offset_fixed_p): Ditto.
+
+ * config/tc-dlx.h (tc_coff_symbol_emit_hook): Delete.
+ (COFF_MAGIC): Delete.
+
+ * config/tc-xc16x.h (TC_LINKRELAX_FIXUP): Delete.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/POTFILES.in: Regenerated.
+
+2006-04-16 Mark Mitchell <mark@codesourcery.com>
+
+ * doc/as.texinfo: Mention that some .type syntaxes are not
+ supported on all architectures.
+
+2006-04-14 Sterling Augustine <sterling@tensilica.com>
+
+ * config/tc-xtensa.c (emit_single_op): Do not relax MOVI
+ instructions when such transformations have been disabled.
+
+2006-04-10 Sterling Augustine <sterling@tensilica.com>
+
+ * config/tc-xtensa.c (xg_assemble_vliw_tokens): Record loop target
+ symbols in RELAX[_CHECK]_ALIGN_NEXT_OPCODE frags.
+ (xtensa_fix_close_loop_end_frags): Use the recorded values instead of
+ decoding the loop instructions. Remove current_offset variable.
+ (xtensa_fix_short_loop_frags): Likewise.
+ (min_bytes_to_other_loop_end): Remove current_offset argument.
+
+2006-04-09 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * config/tc-z80.c (z80_optimize_expr): Removed.
+ * config/tc-z80.h (z80_optimize_expr, md_optimize_expr): Removed.
+
+2006-04-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
+
+ * gas/config/tc-avr.c (mcu_types): Add support for attiny261,
+ attiny461, attiny861, attiny25, attiny45, attiny85,attiny24,
+ attiny44, attiny84, at90pwm2, at90pwm3, atmega164, atmega324,
+ atmega644, atmega329, atmega3290, atmega649, atmega6490,
+ atmega406, atmega640, atmega1280, atmega1281, at90can32,
+ at90can64, at90usb646, at90usb647, at90usb1286 and
+ at90usb1287.
+ Move atmega48 and atmega88 from AVR_ISA_M8 to AVR_ISA_PWMx.
+
+2006-04-07 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (parse_operands): Set default error message.
+
+2006-04-07 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (parse_tb): Set inst.error before returning FAIL.
+
+2006-04-07 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (md_apply_fix): Set H bit on blx instruction.
+
+2006-04-07 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (THUMB2_LOAD_BIT): Define.
+ (move_or_literal_pool): Handle Thumb-2 instructions.
+ (do_t_ldst): Call move_or_literal_pool for =N addressing modes.
+
+2006-04-07 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2512.
+ * config/tc-i386.c (match_template): Move 64-bit operand tests
+ inside loop.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * po/Make-in: Add install-html target.
+ * Makefile.am: Add install-html and install-html-recursive targets.
+ * Makefile.in: Regenerate.
+ * configure.in: AC_SUBST datarootdir, docdir, htmldir.
+ * configure: Regenerate.
+ * doc/Makefile.am: Add install-html and install-html-am targets.
+ * doc/Makefile.in: Regenerate.
+
+2006-04-06 Alan Modra <amodra@bigpond.net.au>
+
+ * frags.c (frag_offset_fixed_p): Reinitialise offset before
+ second scan.
+
+2006-04-05 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config/tc-sparc.c (sparc_target_format): Handle TE_VXWORKS.
+ (GOTT_BASE, GOTT_INDEX): New.
+ (tc_gen_reloc): Don't alter relocations against GOTT_BASE and
+ GOTT_INDEX when generating VxWorks PIC.
+ * configure.tgt (sparc*-*-vxworks*): Remove this special case;
+ use the generic *-*-vxworks* stanza instead.
+
+2006-04-04 Alan Modra <amodra@bigpond.net.au>
+
+ PR 997
+ * frags.c (frag_offset_fixed_p): New function.
+ * frags.h (frag_offset_fixed_p): Declare.
+ * expr.c (expr): Use frag_offset_fixed_p when simplifying subtraction.
+ (resolve_expression): Likewise.
+
+2006-04-03 Sterling Augustine <sterling@tensilica.com>
+
+ * config/tc-xtensa.c (init_op_placement_info_table): Check for formats
+ of the same length but different numbers of slots.
+
+2006-03-30 Andreas Schwab <schwab@suse.de>
+
+ * configure.in: Fix help string for --enable-targets option.
+ * configure: Regenerate.
+
+2006-03-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gas/config/tc-m68k.c (find_cf_chip): Merge into ...
+ (m68k_ip): ... here. Use for all chips. Protect against buffer
+ overrun and avoid excessive copying.
+
+ * config/tc-m68k.c (m68000_control_regs, m68010_control_regs,
+ m68020_control_regs, m68040_control_regs, m68060_control_regs,
+ mcf_control_regs, mcf5208_control_regs, mcf5213_control_regs,
+ mcf5329_control_regs, mcf5249_control_regs, mcf528x_control_regs,
+ mcfv4e_control_regs, m68010_control_regs): Rename and reorder to ...
+ (m68000_ctrl, m68010_ctrl, m68020_ctrl, m68040_ctrl, m68060_ctrl,
+ mcf_ctrl, mcf5208_ctrl, mcf5213_ctrl, mcf5235_ctrl, mcf5249_ctrl,
+ mcf5216_ctrl, mcf5250_ctrl, mcf5271_ctrl, mcf5272_ctrl,
+ mcf5282_ctrl, mcfv4e_ctrl): ... these.
+ (mcf5275_ctrl, mcf5329_ctrl, mcf5373_ctrl): New.
+ (struct m68k_cpu): Change chip field to control_regs.
+ (current_chip): Remove.
+ (control_regs): New.
+ (m68k_archs, m68k_extensions): Adjust.
+ (m68k_cpus): Reorder to be in cpu number order. Adjust.
+ (CPU_ALLOW_MC, CPU_ALLOW_NEGATION): Remove.
+ (find_cf_chip): Reimplement for new organization of cpu table.
+ (select_control_regs): Remove.
+ (mri_chip): Adjust.
+ (struct save_opts): Save control regs, not chip.
+ (s_save, s_restore): Adjust.
+ (m68k_lookup_cpu): Give deprecated warning when necessary.
+ (m68k_init_arch): Adjust.
+ (md_show_usage): Adjust for new cpu table organization.
+
+2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * config/bfin-defs.h (Expr_Node_Type enum): Add Expr_Node_GOT_Reloc.
+ * config/bfin-lex.l: Recognize GOT17M4 and FUNCDESC_GOT17M4.
+ * config/bfin-parse.y: Include "libbfd.h", "elf/common.h" and
+ "elf/bfin.h".
+ (GOT17M4, FUNCDESC_GOT17M4): New tokens of type <value>.
+ (any_gotrel): New rule.
+ (got): Use it, and create Expr_Node_GOT_Reloc nodes.
+ * config/tc-bfin.c: Include "libbfd.h", "elf/common.h" and
+ "elf/bfin.h".
+ (DEFAULT_FLAGS, bfin_flags, bfin_pic_flag): New.
+ (bfin_pic_ptr): New function.
+ (md_pseudo_table): Add it for ".picptr".
+ (OPTION_FDPIC): New macro.
+ (md_longopts): Add -mfdpic.
+ (md_parse_option): Handle it.
+ (md_begin): Set BFD flags.
+ (md_apply_fix3, bfin_fix_adjustable): Handle new relocs.
+ (bfin_gen_ldstidxi): Adjust to match the trees that the parser gives
+ us for GOT relocs.
+ * Makefile.am (bfin-parse.o): Update dependencies.
+ (DEPTC_bfin_elf): Likewise.
+ * Makefile.in: Regenerate.
+
+2006-03-25 Richard Sandiford <richard@codesourcery.com>
+
+ * config/tc-m68k.c (m68k_cpus): Change cpu_cf5208 entries to use
+ mcfemac instead of mcfmac.
+
+2006-03-23 Michael Matz <matz@suse.de>
+
+ * config/tc-i386.c (type_names): Correct placement of 'static'.
+ (reloc): Map some more relocs to their 64 bit counterpart when
+ size is 8.
+ (output_insn): Work around breakage if DEBUG386 is defined.
+ (output_disp): A BFD_RELOC_64 with GOT_symbol as operand also
+ needs to be mapped to BFD_RELOC_X86_64_GOTPC64 or
+ BFD_RELOC_X86_64_GOTPC32. Also x86-64 handles pcrel addressing
+ different from i386.
+ (output_imm): Ditto.
+ (lex_got): Recognize @PLTOFF and @GOTPLT. Make @GOT accept also
+ Imm64.
+ (md_convert_frag): Jumps can now be larger than 2GB away, error
+ out in that case.
+ (tc_gen_reloc): New relocs are passed through. BFD_RELOC_64
+ and BFD_RELOC_64_PCREL are mapped to BFD_RELOC_X86_64_GOTPC64.
+
+2006-03-22 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-mips.c (mips_target_format): Handle vxworks targets.
+ (md_begin): Complain about -G being used for PIC. Don't change
+ the text, data and bss alignments on VxWorks.
+ (reloc_needs_lo_p): Don't return true for R_MIPS_GOT16 when
+ generating VxWorks PIC.
+ (load_address): Extend SVR4_PIC handling to VXWORKS_PIC.
+ (macro): Likewise, but do not treat la $25 specially for
+ VxWorks PIC, and do not handle jal.
+ (OPTION_MVXWORKS_PIC): New macro.
+ (md_longopts): Add -mvxworks-pic.
+ (md_parse_option): Don't complain about using PIC and -G together here.
+ Handle OPTION_MVXWORKS_PIC.
+ (md_estimate_size_before_relax): Always use the first relaxation
+ sequence on VxWorks.
+ * config/tc-mips.h (VXWORKS_PIC): New.
+
+2006-03-21 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (md_apply_fix): Fix typo in offset mask.
+
+2006-03-21 Sterling Augustine <sterling@tensilica.com>
+
+ * config/tc-xtensa.c (enforce_three_byte_loop_align): New flag.
+ (xtensa_setup_hw_workarounds): Set this new flag for older hardware.
+ (get_loop_align_size): New.
+ (xtensa_end): Skip xtensa_mark_narrow_branches when not aligning.
+ (xtensa_mark_zcl_first_insns): Prevent widening of first loop frag.
+ (get_text_align_power): Rewrite to handle inputs in the range 2-8.
+ (get_noop_aligned_address): Use get_loop_align_size.
+ (get_aligned_diff): Likewise.
+
+2006-03-21 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (insns): Correct opcodes for ldrbt and strbt.
+
+2006-03-20 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (BAD_BRANCH, BAD_NOT_IT): Define.
+ (do_t_branch): Encode branches inside IT blocks as unconditional.
+ (do_t_cps): New function.
+ (do_t_blx, do_t_bkpt, do_t_branch23, do_t_bx, do_t_bxj, do_t_cpsi,
+ do_t_czb, do_t_it, do_t_setend, do_t_tb): Add IT constaints.
+ (opcode_lookup): Allow conditional suffixes on all instructions in
+ Thumb mode.
+ (md_assemble): Advance condexec state before checking for errors.
+ (insns): Use do_t_cps.
+
+2006-03-20 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (output_relax_insn): Call dwarf2_emit_insn before
+ outputting the insn.
+
+2006-03-18 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ * config/tc-vax.c: Update copyright year.
+ * config/tc-vax.h: Likewise.
+
+2006-03-18 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ * config/tc-vax.c (md_chars_to_number): Used only locally, so
+ make it static.
+ * config/tc-vax.h (md_chars_to_number): Remove obsolete declaration.
+
+2006-03-17 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (insns): Add ldm and stm.
+
+2006-03-17 Ben Elliston <bje@au.ibm.com>
+
+ PR gas/2446
+ * doc/as.texinfo (Ident): Document this directive more thoroughly.
+
+2006-03-16 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (insns): Add "svc".
+
+2006-03-13 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (xg_translate_sysreg_op): Remove has_underbar
+ flag and avoid double underscore prefixes.
+
+2006-03-10 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (md_begin): Handle EABIv5.
+ (arm_eabis): Add EF_ARM_EABI_VER5.
+ * doc/c-arm.texi: Document -meabi=5.
+
+2006-03-10 Ben Elliston <bje@au.ibm.com>
+
+ * app.c (do_scrub_chars): Simplify string handling.
+
+2006-03-07 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Paul Brook <paul@codesourcery.com>
+ Ricardo Anguiano <anguiano@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * config/tc-arm.c (md_apply_fix): Install a value of zero into a
+ BFD_RELOC_ARM_OFFSET_IMM field if we're going to generate a RELA
+ R_ARM_ABS12 reloc.
+ (tc_gen_reloc): Keep the original fx_offset for RELA pc-relative
+ relocs, but adjust by md_pcrel_from_section. Create R_ARM_ABS12
+ relocations for BFD_RELOC_ARM_OFFSET_IMM on RELA targets.
+
+2006-03-06 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (xtensa_post_relax_hook): Generate literal tables
+ even when using the text-section-literals option.
+
+2006-03-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-m68k.c (m68k_extensions): Allow 'float' on both m68k
+ and cf.
+ (m68k_ip): <case 'J'> Check we have some control regs.
+ (md_parse_option): Allow raw arch switch.
+ (m68k_init_arch): Better detection of arch/cpu mismatch. Detect
+ whether 68881 or cfloat was meant by -mfloat.
+ (md_show_usage): Adjust extension display.
+ (m68k_elf_final_processing): Adjust.
+
+2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * config/tc-avr.c (avr_mod_hash_value): New function.
+ (md_apply_fix, exp_mod): Use BFD_RELOC_HH8_LDI and
+ BFD_RELOC_MS8_LDI for hlo8() and hhi8()
+ (md_begin): Set linkrelax variable to 1, use avr_mod_hash_value
+ instead of int avr_ldi_expression: use avr_mod_hash_value instead
+ of (int).
+ (tc_gen_reloc): Handle substractions of symbols, if possible do
+ fixups, abort otherwise.
+ * config/tc-avr.h (TC_LINKRELAX_FIXUP, TC_VALIDATE_FIX,
+ tc_fix_adjustable): Define.
+
+2006-03-02 James E Wilson <wilson@specifix.com>
+
+ * config/tc-ia64.c (emit_one_bundle): For IA64_OPCODE_LAST, if we
+ change the template, then clear md.slot[curr].end_of_insn_group.
+
+2006-02-28 Jan Beulich <jbeulich@novell.com>
+
+ * macro.c (get_any_string): Don't insert quotes for <>-quoted input.
+
+2006-02-28 Jan Beulich <jbeulich@novell.com>
+
+ PR/1070
+ * macro.c (getstring): Don't treat parentheses special anymore.
+ (get_any_string): Don't consider '(' and ')' as quoting anymore.
+ Special-case '(', ')', '[', and ']' when dealing with non-quoting
+ characters.
+
+2006-02-28 Mat <mat@csail.mit.edu>
+
+ * dwarf2dbg.c (get_filenum): Don't inadvertently decrease files_in_use.
+
+2006-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ * dw2gencfi.c (struct fde_entry, struct cie_entry): Add signal_frame
+ field.
+ (CFI_signal_frame): Define.
+ (cfi_pseudo_table): Add .cfi_signal_frame.
+ (dot_cfi): Handle CFI_signal_frame.
+ (output_cie): Handle cie->signal_frame.
+ (select_cie_for_fde): Don't share CIE if signal_frame flag is
+ different. Copy signal_frame from FDE to newly created CIE.
+ * doc/as.texinfo: Document .cfi_signal_frame.
+
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * doc/Makefile.am: Add html target.
+ * doc/Makefile.in: Regenerate.
+ * po/Make-in: Add html target.
+
+2006-02-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-i386.c (output_insn): Support Intel Merom New
+ Instructions.
+
+ * config/tc-i386.h (CpuMNI): New.
+ (CpuUnknownFlags): Add CpuMNI.
+
+2006-02-24 David S. Miller <davem@sunset.davemloft.net>
+
+ * config/tc-sparc.c (priv_reg_table): Add entry for "gl".
+ (hpriv_reg_table): New table for hyperprivileged registers.
+ (sparc_ip): New cases '$' and '%' for wrhpr/rdhpr hyperprivileged
+ register encoding.
+
+2006-02-24 DJ Delorie <dj@redhat.com>
+
+ * config/tc-m32c.h (md_apply_fix): Define to m32c_apply_fix.
+ (tc_gen_reloc): Don't define.
+ * config/tc-m32c.c (rl_for, relaxable): New convenience macros.
+ (OPTION_LINKRELAX): New.
+ (md_longopts): Add it.
+ (m32c_relax): New.
+ (md_parse_options): Set it.
+ (md_assemble): Emit relaxation relocs as needed.
+ (md_convert_frag): Emit relaxation relocs as needed.
+ (md_cgen_lookup_reloc): Add LAB_8_8 and LAB_8_16.
+ (m32c_apply_fix): New.
+ (tc_gen_reloc): New.
+ (m32c_force_relocation): Force out jump relocs when relaxing.
+ (m32c_fix_adjustable): Return false if relaxing.
+
+2006-02-24 Paul Brook <paul@codesourcery.com>
+
+ * config/arm/tc-arm.c (arm_ext_v6_notm, arm_ext_div, arm_ext_v7,
+ arm_ext_v7a, arm_ext_v7r, arm_ext_v7m): New variables.
+ (struct asm_barrier_opt): Define.
+ (arm_v7m_psr_hsh, arm_barrier_opt_hsh): New variables.
+ (parse_psr): Accept V7M psr names.
+ (parse_barrier): New function.
+ (enum operand_parse_code): Add OP_oBARRIER.
+ (parse_operands): Implement OP_oBARRIER.
+ (do_barrier): New function.
+ (do_dbg, do_pli, do_t_barrier, do_t_dbg, do_t_div): New functions.
+ (do_t_cpsi): Add V7M restrictions.
+ (do_t_mrs, do_t_msr): Validate V7M variants.
+ (md_assemble): Check for NULL variants.
+ (v7m_psrs, barrier_opt_names): New tables.
+ (insns): Add V7 instructions. Mark V6 instructions absent from V7M.
+ (md_begin): Initialize arm_v7m_psr_hsh and arm_barrier_opt_hsh.
+ (arm_cpu_option_table): Add Cortex-M3, R4 and A8.
+ (arm_arch_option_table): Add armv7, armv7a, armv7r and armv7m.
+ (struct cpu_arch_ver_table): Define.
+ (cpu_arch_ver): New.
+ (aeabi_set_public_attributes): Use cpu_arch_ver. Set
+ Tag_CPU_arch_profile.
+ * doc/c-arm.texi: Document new cpu and arch options.
+
+2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-ia64.c (operand_match): Handle IA64_OPND_IMMU5b.
+
+2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-ia64.c: Update copyright years.
+
+2006-02-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config/tc-ia64.c (specify_resource): Add the rule 17 from
+ SDM 2.2.
+
+2005-02-22 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (do_pld): Remove incorrect write to
+ inst.instruction.
+ (encode_thumb32_addr_mode): Use correct operand.
+
+2006-02-21 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (md_apply_fix): Fix off-by-one errors.
+
+2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
+
+ * Makefile.am: Add xc16x related entry.
+ * Makefile.in: Regenerate.
+ * configure.in: Added xc16x related entry.
+ * configure: Regenerate.
+ * config/tc-xc16x.h: New file
+ * config/tc-xc16x.c: New file
+ * doc/c-xc16x.texi: New file for xc16x
+ * doc/all.texi: Entry for xc16x
+ * doc/Makefile.texi: Added c-xc16x.texi
+ * NEWS: Announce the support for the new target.
+
+2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
+
+ * configure.tgt: set emulation for mips-*-netbsd*
+
+2006-02-14 Jakub Jelinek <jakub@redhat.com>
+
+ * config.in: Rebuilt.
+
+2006-02-13 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (xg_add_opcode_fix): Number operands starting
+ from 1, not 0, in error messages.
+ (md_assemble): Simplify special-case check for ENTRY instructions.
+ (tinsn_has_invalid_symbolic_operands): Do not include opcode and
+ operand in error message.
+
+2006-02-13 Joseph S. Myers <joseph@codesourcery.com>
+
+ * configure.tgt (arm-*-linux-gnueabi*): Change to
+ arm-*-linux-*eabi*.
+
+2006-02-10 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-crx.c (check_range): Ensure that the sign bit of a
+ 32-bit value is propagated into the upper bits of a 64-bit long.
+
+ * config/tc-arc.c (init_opcode_tables): Fix cast.
+ (arc_extoper, md_operand): Likewise.
+
+2006-02-09 David Heine <dlheine@tensilica.com>
+
+ * config/tc-xtensa.c (xg_assembly_relax): Increment steps_taken for
+ each relaxation step.
+
+2006-02-09 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * configure.in (CHECK_DECLS): Add vsnprintf.
+ * configure: Regenerate.
+ * messages.c (errno.h, stdarg.h, varargs.h, va_list): Do not
+ include/declare here, but...
+ * as.h: Move code detecting VARARGS idiom to the top.
+ (errno.h, stdarg.h, varargs.h, va_list): ...here.
+ (vsnprintf): Declare if not already declared.
+
+2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * as.c (close_output_file): New.
+ (main): Register close_output_file with xatexit before
+ dump_statistics. Don't call output_file_close.
+
+2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * config/tc-m68k.c (mcf5208_control_regs, mcf5213_control_regs,
+ mcf5329_control_regs): New.
+ (not_current_architecture, selected_arch, selected_cpu): New.
+ (m68k_archs, m68k_extensions): New.
+ (archs): Renamed to ...
+ (m68k_cpus): ... here. Adjust.
+ (n_arches): Remove.
+ (md_pseudo_table): Add arch and cpu directives.
+ (find_cf_chip, m68k_ip): Adjust table scanning.
+ (no_68851, no_68881): Remove.
+ (md_assemble): Lazily initialize.
+ (select_control_regs): Adjust cpu names. Add 5208, 5213, 5329.
+ (md_init_after_args): Move functionality to m68k_init_arch.
+ (mri_chip): Adjust table scanning.
+ (md_parse_option): Reimplement 'm' processing to add -march & -mcpu
+ options with saner parsing.
+ (m68k_lookup_cpu, m68k_set_arch, m68k_set_cpu, m68k_set_extension,
+ m68k_init_arch): New.
+ (s_m68k_cpu, s_m68k_arch): New.
+ (md_show_usage): Adjust.
+ (m68k_elf_final_processing): Set CF EF flags.
+ * config/tc-m68k.h (m68k_init_after_args): Remove.
+ (tc_init_after_args): Remove.
+ * doc/c-m68k.texi (M68K-Opts): Document -march, -mcpu options.
+ (M68k-Directives): Document .arch and .cpu directives.
+
+2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
+
+ * config/tc-z80.c (z80_start_line_hook): allow .equ and .defl as
+ synonyms for equ and defl.
+ (z80_cons_fix_new): New function.
+ (emit_byte): Disallow relative jumps to absolute locations.
+ (emit_data): Only handle defb, prototype changed, because defb is
+ now handled as pseudo-op rather than an instruction.
+ (instab): Entries for defb,defw,db,dw moved from here...
+ (md_pseudo_table): ... to here, use generic cons() for defw,dw.
+ Add entries for def24,def32,d24,d32.
+ (md_assemble): Improved error handling.
+ (md_apply_fix): New case BFD_RELOC_24, set fixP->fx_no_overflow to one.
+ * config/tc-z80.h (TC_CONS_FIX_NEW): Define.
+ (z80_cons_fix_new): Declare.
+ * doc/c-z80.texi (defb, db): Mention warning on overflow.
+ (def24,d24,def32,d32): New pseudo-ops.
+
+2006-02-02 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (do_shift): Remove Thumb-1 constraint.
+
+2005-02-02 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (T2_OPCODE_MASK, T2_DATA_OP_SHIFT, T2_OPCODE_AND,
+ T2_OPCODE_BIC, T2_OPCODE_ORR, T2_OPCODE_ORN, T2_OPCODE_EOR,
+ T2_OPCODE_ADD, T2_OPCODE_ADC, T2_OPCODE_SBC, T2_OPCODE_SUB,
+ T2_OPCODE_RSB): Define.
+ (thumb32_negate_data_op): New function.
+ (md_apply_fix): Use it.
+
+2006-01-31 Bob Wilson <bob.wilson@acm.org>
+
+ * config/xtensa-istack.h (TInsn): Remove record_fix and sub_symbol
+ fields.
+ * config/tc-xtensa.h (xtensa_frag_type): Remove slot_sub_symbols field.
+ * config/tc-xtensa.c (md_apply_fix): Check for unexpected uses of
+ subtracted symbols.
+ (relaxation_requirements): Add pfinish_frag argument and use it to
+ replace setting tinsn->record_fix fields.
+ (xg_assemble_vliw_tokens): Adjust calls to relaxation_requirements
+ and vinsn_to_insnbuf. Remove references to record_fix and
+ slot_sub_symbols fields.
+ (xtensa_mark_narrow_branches): Delete unused code.
+ (is_narrow_branch_guaranteed_in_range): Handle expr that is not just
+ a symbol.
+ (convert_frag_immed): Adjust vinsn_to_insnbuf call and do not set
+ record_fix fields.
+ (tinsn_immed_from_frag): Remove code for handling slot_sub_symbols.
+ (vinsn_to_insnbuf): Change use of record_fixup argument, replacing use
+ of the record_fix field. Simplify error messages for unexpected
+ symbolic operands.
+ (set_expr_symbol_offset_diff): Delete.
+
+2006-01-31 Paul Brook <paul@codesourcery.com>
+
+ * config/tc-arm.c (arm_reg_parse): Check if reg is non-NULL.
+
+2006-01-31 Paul Brook <paul@codesourcery.com>
+ Richard Earnshaw <rearnsha@arm.com>
+
+ * config/tc-arm.c: Use arm_feature_set.
+ (arm_ext_*, arm_arch_full, arm_arch_t2, arm_arch_none,
+ arm_cext_iwmmxt, arm_cext_xscale, arm_cext_maverick, fpu_fpa_ext_v1,
+ fpu_fpa_ext_v2, fpu_vfp_ext_v1xd, fpu_vfp_ext_v1, fpu_vfp_ext_v2):
+ New variables.
+ (insns): Use them.
+ (md_atof, opcode_select, opcode_select, md_assemble, md_assemble,
+ md_begin, arm_parse_extension, arm_parse_cpu, arm_parse_arch,
+ arm_parse_fpu, arm_parse_float_abi, aeabi_set_public_attributes,
+ s_arm_cpu, s_arm_arch, s_arm_fpu): Use macros for accessing CPU
+ feature flags.
+ (arm_legacy_option_table, arm_option_cpu_value_table): New types.
+ (arm_opts): Move old cpu/arch options from here...
+ (arm_legacy_opts): ... to here.
+ (md_parse_option): Search arm_legacy_opts.
+ (arm_cpus, arm_archs, arm_extensions, arm_fpus)
+ (arm_float_abis, arm_eabis): Make const.
+
+2006-01-25 Bob Wilson <bob.wilson@acm.org>
+
+ * config/tc-xtensa.c (md_apply_fix): Set value to zero for PLT relocs.
+
+2006-01-21 Jie Zhang <jie.zhang@analog.com>
+
+ * config/bfin-parse.y (asm_1): Check value range for 16 bit immediate
+ in load immediate intruction.
+
+2006-01-21 Jie Zhang <jie.zhang@analog.com>
+
+ * config/bfin-parse.y (value_match): Use correct conversion
+ specifications in template string for __FILE__ and __LINE__.
+ (binary): Ditto.
+ (unary): Ditto.
+
+2006-01-18 Alexandre Oliva <aoliva@redhat.com>
+
+ Introduce TLS descriptors for i386 and x86_64.
+ * config/tc-i386.c (tc_i386_fix_adjustable): Handle
+ BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_386_TLS_DESC_CALL,
+ BFD_RELOC_X86_64_GOTPC32_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL.
+ (optimize_disp): Emit fix up for BFD_RELOC_386_TLS_DESC_CALL and
+ BFD_RELOC_X86_64_TLSDESC_CALL immediately, and clear the
+ displacement bits.
+ (build_modrm_byte): Set up zero modrm for TLS desc calls.
+ (lex_got): Handle @tlsdesc and @tlscall.
+ (md_apply_fix, tc_gen_reloc): Handle the new relocations.
+
+2006-01-11 Nick Clifton <nickc@redhat.com>
+
+ Fixes for building on 64-bit hosts:
+ * config/tc-avr.c (mod_index): New union to allow conversion
+ between pointers and integers.
+ (md_begin, avr_ldi_expression): Use it.
+ * config/tc-i370.c (md_assemble): Add cast for argument to print
+ statement.
+ * config/tc-tic54x.c (subsym_substitute): Likewise.
+ * config/tc-mn10200.c (md_assemble): Use a union to convert the
+ opindex field of fr_cgen structure into a pointer so that it can
+ be stored in a frag.
+ * config/tc-mn10300.c (md_assemble): Likewise.
+ * config/tc-frv.c (frv_debug_tomcat): Use %p to print pointer
+ types.
+ * config/tc-v850.c: Replace uses of (int) casts with correct
+ types.
+
+2006-01-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/2117
+ * symbols.c (snapshot_symbol): Don't change a defined symbol.
+
+2006-01-03 Hans-Peter Nilsson <hp@bitrange.com>
+
+ PR gas/2101
+ * config/tc-mmix.c (mmix_handle_mmixal): Don't treat #[0-9][FB] as
+ a local-label reference.
+
+For older changes see ChangeLog-2005
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am
index 08b9842..6704236 100644
--- a/contrib/binutils/gas/Makefile.am
+++ b/contrib/binutils/gas/Makefile.am
@@ -1,9 +1,7 @@
## Process this file with automake to generate Makefile.in
-## Work around apparent automake bug.
-INTLLIBS = @INTLLIBS@
-
AUTOMAKE_OPTIONS = 1.8 cygnus dejagnu
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = doc po
# Automake should figure this out on its own. It doesn't, because
@@ -15,6 +13,10 @@ tooldir = $(exec_prefix)/$(target_alias)
YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
+# We have to set this, because autoconf 2.59 does not substitute YFLAGS.
+# Autoconf 2.61 does, so this can be removed when we upgrade.
+YFLAGS =
+
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS)
@@ -33,7 +35,7 @@ ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
ATOF_TARG_O = atof-@atof@.o
# use @target_cpu_type@ for refering to configured target name
-IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
+IT_HDRS=itbl-parse.h $(srcdir)/itbl-ops.h
IT_SRCS=itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
IT_DEPS=$(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
IT_OBJS=itbl-parse.o itbl-lex.o itbl-ops.o
@@ -46,6 +48,7 @@ CPU_TYPES = \
arm \
avr \
bfin \
+ cr16 \
cris \
crx \
d10v \
@@ -55,22 +58,25 @@ CPU_TYPES = \
frv \
h8300 \
hppa \
- ia64 \
i370 \
i386 \
i860 \
i960 \
+ ia64 \
ip2k \
m32c \
m32r \
m68hc11 \
m68k \
+ maxq \
mcore \
+ mep \
mips \
mmix \
mn10200 \
mn10300 \
msp430 \
+ mt \
ns32k \
openrisc \
or32 \
@@ -78,16 +84,18 @@ CPU_TYPES = \
pj \
ppc \
s390 \
+ score \
sh \
sh64 \
sparc \
+ spu \
tic30 \
tic4x \
tic54x \
- vax \
v850 \
- xstormy16 \
+ vax \
xc16x \
+ xstormy16 \
xtensa \
z80 \
z8k
@@ -100,8 +108,7 @@ OBJ_FORMATS = \
coff \
ecoff \
elf \
- evax \
- ieee
+ evax
# This is an sh case which sets valid according to whether the CPU
# type in the shell variable c and the OS type in the shell variable o
@@ -116,16 +123,20 @@ CPU_OBJ_VALID = \
arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tic30 | vax) \
valid=yes ;; \
esac ;; \
- coff) valid=yes; \
+ coff) \
case $$c in \
- cris | i860 | mmix | sh64) \
- valid= ;; \
+ arm | h8300 | i386 | i960 | m68k | maxq | mcore | mips | or32 \
+ | ppc | sh | sparc | tic* | xscale | z80 | z8k) \
+ valid=yes ;; \
esac ;; \
ecoff) \
case $$c in \
mips | alpha) valid=yes ;; \
esac ;; \
- elf) valid=yes ;; \
+ elf) valid=yes ; \
+ case $$c in \
+ maxq | ns32k | tic* | z80 | z8k) valid= ;; \
+ esac ;; \
evax) \
case $$c in \
alpha) valid=yes ;; \
@@ -230,6 +241,7 @@ TARGET_CPU_CFILES = \
config/tc-arm.c \
config/tc-avr.c \
config/tc-bfin.c \
+ config/tc-cr16.c \
config/tc-cris.c \
config/tc-crx.c \
config/tc-d10v.c \
@@ -250,6 +262,7 @@ TARGET_CPU_CFILES = \
config/tc-m68hc11.c \
config/tc-m68k.c \
config/tc-mcore.c \
+ config/tc-mep.c \
config/tc-mips.c \
config/tc-mmix.c \
config/tc-mn10200.c \
@@ -262,9 +275,11 @@ TARGET_CPU_CFILES = \
config/tc-pj.c \
config/tc-ppc.c \
config/tc-s390.c \
+ config/tc-score.c \
config/tc-sh.c \
config/tc-sh64.c \
config/tc-sparc.c \
+ config/tc-spu.c \
config/tc-tic30.c \
config/tc-tic54x.c \
config/tc-vax.c \
@@ -281,6 +296,7 @@ TARGET_CPU_HFILES = \
config/tc-arm.h \
config/tc-avr.h \
config/tc-bfin.h \
+ config/tc-cr16.h \
config/tc-cris.h \
config/tc-crx.h \
config/tc-d10v.h \
@@ -301,6 +317,7 @@ TARGET_CPU_HFILES = \
config/tc-m68hc11.h \
config/tc-m68k.h \
config/tc-mcore.h \
+ config/tc-mep.h \
config/tc-mips.h \
config/tc-mmix.h \
config/tc-mn10200.h \
@@ -313,9 +330,11 @@ TARGET_CPU_HFILES = \
config/tc-pj.h \
config/tc-ppc.h \
config/tc-s390.h \
+ config/tc-score.h \
config/tc-sh.h \
config/tc-sh64.h \
config/tc-sparc.h \
+ config/tc-spu.h \
config/tc-tic30.h \
config/tc-tic54x.h \
config/tc-vax.h \
@@ -334,7 +353,6 @@ OBJ_FORMAT_CFILES = \
config/obj-ecoff.c \
config/obj-elf.c \
config/obj-evax.c \
- config/obj-ieee.c \
config/obj-som.c
OBJ_FORMAT_HFILES = \
@@ -343,7 +361,6 @@ OBJ_FORMAT_HFILES = \
config/obj-ecoff.h \
config/obj-elf.h \
config/obj-evax.h \
- config/obj-ieee.h \
config/obj-som.h
# Emulation header files in config
@@ -381,7 +398,8 @@ TARG_ENV_HFILES = \
config/te-sun3.h \
config/te-svr4.h \
config/te-symbian.h \
- config/te-tmips.h
+ config/te-tmips.h \
+ config/te-wince-pe.h
# Multi files in config
@@ -464,13 +482,18 @@ INCDIR = $(BASEDIR)/include
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(datadir)/locale\""
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
+ -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ \
+ -DLOCALEDIR="\"$(datadir)/locale\""
# This should be parallel to INCLUDES, but should replace $(srcdir)
# with $${srcdir}, and should work in a subdirectory. This is used
# when building dependencies, because the dependency building is done
# in a subdirectory.
-DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd -I$${srcdir}/../intl -I../../intl -DLOCALEDIR="\"$(datadir)/locale\""
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd \
+ -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. \
+ -I$${srcdir}/../bfd @INCINTL@ \
+ -DLOCALEDIR="\"$(datadir)/locale\""
DEP_FLAGS = -DOBJ_MAYBE_ELF \
-I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES)
@@ -478,25 +501,22 @@ DEP_FLAGS = -DOBJ_MAYBE_ELF \
# How to link with both our special library facilities
# and the system's installed libraries.
-GASLIBS = @OPCODES_LIB@ @BFDLIB@ ../libiberty/libiberty.a
+GASLIBS = @OPCODES_LIB@ ../bfd/libbfd.la ../libiberty/libiberty.a
# Files to be copied away after each stage in building.
STAGESTUFF = *.o $(noinst_PROGRAMS)
-BFDVER_H = @BFDVER_H@
-
-$(OBJS): @ALL_OBJ_DEPS@
-
as_new_SOURCES = $(GAS_CFILES)
as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS) $(INTLLIBS) $(LIBM)
+ $(extra_objects) $(GASLIBS) $(LIBINTL) $(LIBM)
as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS) $(INTLDEPS)
+ $(extra_objects) $(GASLIBS) $(LIBINTL_DEP)
# Stuff that every object file depends upon. If anything is removed
# from this list, remove it from dep-in.sed as well.
-$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/progress.h $(INCDIR)/fopen-same.h \
+$(OBJS): ../bfd/bfd.h $(INCDIR)/symcat.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/fopen-bin.h $(INCDIR)/fopen-vms.h \
$(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \
as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \
frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h
@@ -540,18 +560,16 @@ ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
# We need all these explicit rules for the multi stuff. Because of
# these rules, we don't need one for OBJ_FORMAT_O.
-obj-aout.o : $(srcdir)/config/obj-aout.c
+obj-aout.o : $(srcdir)/config/obj-aout.c $(DEP_@target_cpu_type@_aout)
$(COMPILE) -c $(srcdir)/config/obj-aout.c
-obj-coff.o: $(srcdir)/config/obj-coff.c
+obj-coff.o: $(srcdir)/config/obj-coff.c $(DEP_@target_cpu_type@_coff)
$(COMPILE) -c $(srcdir)/config/obj-coff.c
-obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
+obj-ecoff.o : $(srcdir)/config/obj-ecoff.c $(DEP_@target_cpu_type@_ecoff)
$(COMPILE) -c $(srcdir)/config/obj-ecoff.c
-obj-elf.o : $(srcdir)/config/obj-elf.c
+obj-elf.o : $(srcdir)/config/obj-elf.c $(DEP_@target_cpu_type@_elf)
$(COMPILE) -c $(srcdir)/config/obj-elf.c
obj-evax.o : $(srcdir)/config/obj-evax.c
$(COMPILE) -c $(srcdir)/config/obj-evax.c
-obj-ieee.o : $(srcdir)/config/obj-ieee.c
- $(COMPILE) -c $(srcdir)/config/obj-ieee.c
obj-multi.o : $(srcdir)/config/obj-multi.c
$(COMPILE) -c $(srcdir)/config/obj-multi.c
obj-som.o : $(srcdir)/config/obj-som.c
@@ -602,7 +620,7 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
rm -f m68k-parse.y; \
else true; fi
# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
+# yacc will produce working code which contain compile time warnings.
m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
$(COMPILE) -c $< $(NO_WERROR)
@@ -629,12 +647,12 @@ bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h
itbl-lex.c: $(srcdir)/itbl-lex.l
# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
+# yacc will produce working code which contain compile time warnings.
itbl-lex.o: itbl-lex.c itbl-parse.h $(srcdir)/itbl-lex.h
$(COMPILE) -c $< $(NO_WERROR)
# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
+# yacc will produce working code which contain compile time warnings.
itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h
$(COMPILE) -c $< $(NO_WERROR)
@@ -988,582 +1006,443 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
-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 dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(INCDIR)/safe-ctype.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 dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.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 \
+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 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 dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h \
+ $(INCDIR)/opcode/alpha.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h \
$(INCDIR)/elf/dwarf2.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 \
+DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
+ subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \
+ $(INCDIR)/opcode/alpha.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dwarf2dbg.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 \
- dwarf2dbg.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
-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 \
- $(INCDIR)/opcode/arm.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 $(INCDIR)/opcode/arm.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)/opcode/arm.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h
-DEPTC_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
+DEPTC_arm_aout = $(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 $(INCDIR)/obstack.h $(INCDIR)/opcode/arm.h \
+ dwarf2dbg.h
+DEPTC_arm_coff = $(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 $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arm.h \
+ dwarf2dbg.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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arm.h \
+ $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h dw2gencfi.h \
+ $(INCDIR)/elf/dwarf2.h dwarf2dbg.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/avr.h
-DEPTC_bfin_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-bfin.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h struc-symbol.h \
- $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h dwarf2dbg.h \
- $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
- $(srcdir)/config/bfin-aux.h $(INCDIR)/opcode/bfin.h \
- $(srcdir)/config/bfin-defs.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
-DEPTC_bfin_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-bfin.h \
- dwarf2dbg.h struc-symbol.h $(srcdir)/config/bfin-defs.h \
- $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h $(srcdir)/config/bfin-aux.h \
- $(INCDIR)/opcode/bfin.h $(srcdir)/config/bfin-defs.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
-DEPTC_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+DEPTC_bfin_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-bfin.h dwarf2dbg.h \
+ struc-symbol.h $(srcdir)/config/bfin-defs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h $(BFDDIR)/libbfd.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h \
+ $(INCDIR)/elf/reloc-macros.h $(srcdir)/config/bfin-aux.h \
+ $(srcdir)/config/bfin-defs.h $(INCDIR)/opcode/bfin.h
+DEPTC_cr16_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cr16.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h $(INCDIR)/opcode/cr16.h \
+ $(INCDIR)/elf/cr16.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_cris_aout = $(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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/cris.h
-DEPTC_crx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-crx.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
- dwarf2dbg.h $(INCDIR)/opcode/crx.h $(INCDIR)/elf/crx.h \
- $(INCDIR)/elf/reloc-macros.h
-DEPTC_crx_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-crx.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/crx.h \
+DEPTC_crx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-crx.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h $(INCDIR)/opcode/crx.h \
$(INCDIR)/elf/crx.h $(INCDIR)/elf/reloc-macros.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 \
+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 $(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 = $(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 \
+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 $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
-DEPTC_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+DEPTC_dlx_elf = $(INCDIR)/safe-ctype.h $(srcdir)/config/obj-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)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h \
+ dwarf2dbg.h $(srcdir)/config/tc-dlx.h $(INCDIR)/opcode/dlx.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/d30v.h
-DEPTC_dlx_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
- $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/opcode/dlx.h
-DEPTC_dlx_elf = $(INCDIR)/safe-ctype.h $(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-dlx.h dwarf2dbg.h $(INCDIR)/opcode/dlx.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-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/fr30-opc.h cgen.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \
- cgen.h
-DEPTC_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-frv.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(srcdir)/../opcodes/fr30-opc.h cgen.h
+DEPTC_frv_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h subsegs.h \
+ $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/frv-opc.h \
cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_frv_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-frv.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/frv-opc.h cgen.h $(BFDDIR)/libbfd.h \
- $(INCDIR)/hashtab.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.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 dwarf2dbg.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 \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h \
+DEPTC_h8300_coff = $(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 \
+ dwarf2dbg.h $(INCDIR)/opcode/h8300.h $(INCDIR)/safe-ctype.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 dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/h8300.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.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 = $(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 \
+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)/elf-bfd.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 = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ia64.h $(INCDIR)/opcode/ia64.h \
- $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.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 = $(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)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.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 = $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ subsegs.h $(INCDIR)/obstack.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h dwarf2dbg.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
struc-symbol.h $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h \
$(INCDIR)/elf/reloc-macros.h
-DEPTC_i386_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h dw2gencfi.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h dw2gencfi.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 $(srcdir)/../opcodes/i386-opc.h \
+ $(INCDIR)/opcode/i386.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h dw2gencfi.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/i386.h \
- $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
- $(INCDIR)/opcode/i386.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/i386.h \
- $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.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)/safe-ctype.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/i960.h
-DEPTC_ip2k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ip2k.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/ip2k-opc.h \
- cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/ip2k.h \
- $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
-DEPTC_ip2k_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-ip2k.h \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/ip2k-desc.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.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 $(INCDIR)/opcode/ia64.h \
+ $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ia64.h \
+ $(INCDIR)/elf/ia64.h
+DEPTC_ip2k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ip2k.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/ip2k-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/ip2k-opc.h cgen.h $(INCDIR)/elf/ip2k.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/ip2k-opc.h \
+ cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/ip2k.h \
$(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
-DEPTC_m32c_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m32c.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32c-opc.h \
- $(srcdir)/../opcodes/cgen-types.h $(srcdir)/../opcodes/cgen-ops.h \
- cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/m32c.h \
- $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h \
- $(INCDIR)/safe-ctype.h
-DEPTC_m32c_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-m32c.h \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/m32c-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/m32c-opc.h $(srcdir)/../opcodes/cgen-types.h \
- $(srcdir)/../opcodes/cgen-ops.h cgen.h $(INCDIR)/elf/m32c.h \
- $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h \
- $(INCDIR)/safe-ctype.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 \
+DEPTC_m32c_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32c.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/m32c-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/m32c-opc.h \
+ $(srcdir)/../opcodes/cgen-types.h ../bfd/bfd_stdint.h \
+ $(srcdir)/../opcodes/cgen-ops.h cgen.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/m32c.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/safe-ctype.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
$(srcdir)/../opcodes/m32r-opc.h cgen.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
- cgen.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.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 \
- $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/m68hc11.h $(INCDIR)/elf/m68hc11.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h $(INCDIR)/elf/m68hc11.h \
$(INCDIR)/elf/reloc-macros.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/m68k.h \
+DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/m68k.h \
+DEPTC_m68k_coff = $(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 $(INCDIR)/obstack.h dwarf2dbg.h \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.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)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/m68k.h \
$(srcdir)/config/m68k-parse.h $(INCDIR)/elf/m68k.h \
$(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+DEPTC_maxq_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-maxq.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h $(srcdir)/config/tc-maxq.h \
+ $(INCDIR)/opcode/maxq.h
+DEPTC_mcore_coff = $(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 dwarf2dbg.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_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 dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+DEPTC_mep_elf = $(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)/bfdlink.h $(srcdir)/config/tc-mep.h dwarf2dbg.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mep-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/mep-opc.h \
+ cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/mep.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
+DEPTC_mips_coff = $(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 \
dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(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 \
+ $(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)/safe-ctype.h \
$(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/dwarf2.h $(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 \
+ ecoff.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)/safe-ctype.h $(INCDIR)/opcode/mips.h \
+ itbl-ops.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ $(srcdir)/config/obj-elf.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 \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
+DEPTC_mmix_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \
- $(INCDIR)/safe-ctype.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 = $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h $(INCDIR)/obstack.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 dwarf2dbg.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 = $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/mn10300.h
-DEPTC_msp430_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-msp430.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/msp430.h $(INCDIR)/safe-ctype.h dwarf2dbg.h
-DEPTC_msp430_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-msp430.h \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/msp430.h \
- $(INCDIR)/safe-ctype.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_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 \
+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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
+DEPTC_msp430_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/msp430.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h
+DEPTC_mt_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mt.h dwarf2dbg.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mt-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/mt-opc.h \
+ cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/mt.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
+DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \
$(INCDIR)/obstack.h
-DEPTC_ns32k_elf = $(INCDIR)/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 \
- dwarf2dbg.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-bitset.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 \
+DEPTC_openrisc_elf = $(srcdir)/config/obj-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 \
dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/openrisc-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/openrisc-opc.h cgen.h
-DEPTC_or32_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
- $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/or32.h $(INCDIR)/elf/or32.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/openrisc-opc.h \
+ cgen.h
+DEPTC_or32_coff = $(INCDIR)/safe-ctype.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-or32.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/opcode/or32.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_or32_elf = $(INCDIR)/safe-ctype.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h \
+ dwarf2dbg.h $(INCDIR)/opcode/or32.h $(INCDIR)/elf/or32.h \
$(INCDIR)/elf/reloc-macros.h
-DEPTC_or32_elf = $(INCDIR)/safe-ctype.h $(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-or32.h dwarf2dbg.h $(INCDIR)/opcode/or32.h \
- $(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.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 \
+DEPTC_pdp11_aout = $(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_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 \
- dwarf2dbg.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 = $(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 \
- dwarf2dbg.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 \
+DEPTC_pdp11_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.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 dwarf2dbg.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 $(INCDIR)/safe-ctype.h subsegs.h \
+ $(INCDIR)/obstack.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/ppc.h \
- $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.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 dwarf2dbg.h \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
- $(INCDIR)/safe-ctype.h struc-symbol.h dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.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 dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h
-DEPTC_sh64_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-sh64.h \
- $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/elf32-sh64.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \
+ $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+DEPTC_s390_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ $(INCDIR)/opcode/s390.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_score_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-score.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/opcode/score-inst.h $(INCDIR)/opcode/score-datadep.h \
+ struc-symbol.h $(INCDIR)/elf/score.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 $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/sh-opc.h $(INCDIR)/safe-ctype.h \
+ struc-symbol.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 $(INCDIR)/safe-ctype.h \
+ struc-symbol.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h
+DEPTC_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.h \
+ $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \
$(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h \
+ $(srcdir)/../opcodes/sh-opc.h $(INCDIR)/safe-ctype.h \
+ struc-symbol.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h
+DEPTC_sparc_aout = $(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 \
dw2gencfi.h $(INCDIR)/elf/dwarf2.h
-DEPTC_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+DEPTC_sparc_coff = $(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 \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/sparc.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/sparc.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
- $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic4x_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
- $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic4x.h \
- subsegs.h $(INCDIR)/obstack.h
-DEPTC_tic4x_elf = $(INCDIR)/safe-ctype.h $(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-tic4x.h dwarf2dbg.h $(INCDIR)/opcode/tic4x.h \
- subsegs.h $(INCDIR)/obstack.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 = $(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)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h
+DEPTC_spu_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-spu.h $(INCDIR)/opcode/spu.h \
+ $(INCDIR)/opcode/spu-insns.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/spu-insns.h
+DEPTC_tic30_aout = $(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 $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/opcode/tic30.h
+DEPTC_tic4x_coff = $(INCDIR)/safe-ctype.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic4x.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/obstack.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
-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 subsegs.h \
- $(INCDIR)/safe-ctype.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 subsegs.h $(INCDIR)/safe-ctype.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 $(srcdir)/config/obj-coff.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 $(INCDIR)/elf/v850.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \
+ dwarf2dbg.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 subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/opcode/vax.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 \
- dwarf2dbg.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \
- subsegs.h $(INCDIR)/safe-ctype.h $(INCDIR)/elf/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 dwarf2dbg.h \
+ $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h $(INCDIR)/elf/vax.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/vax.h
-DEPTC_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-v850.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.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 = $(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)/elf/v850.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h \
+DEPTC_xc16x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xc16x.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/v850.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-bitset.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 \
+ $(srcdir)/../opcodes/xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(srcdir)/../opcodes/xc16x-opc.h cgen.h dwarf2dbg.h \
+ $(INCDIR)/elf/xc16x.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_xstormy16_elf = $(srcdir)/config/obj-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 \
dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/xstormy16-opc.h cgen.h
-DEPTC_xc16x_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-xc16x.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/xc16x-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/xc16x-opc.h cgen.h
-DEPTC_xtensa_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-xtensa.h \
- $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-config.h sb.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/xstormy16-opc.h \
+ cgen.h
+DEPTC_xtensa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xtensa.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h sb.h $(INCDIR)/safe-ctype.h \
+ $(srcdir)/config/tc-xtensa.h subsegs.h $(INCDIR)/obstack.h \
$(srcdir)/config/xtensa-relax.h $(srcdir)/config/xtensa-istack.h \
- dwarf2dbg.h struc-symbol.h
-DEPTC_z80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-z80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
- $(INCDIR)/obstack.h
-DEPTC_z80_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-z80.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.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 $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
+ dwarf2dbg.h struc-symbol.h $(INCDIR)/xtensa-config.h
+DEPTC_z80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z80.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h
+DEPTC_z8k_coff = $(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)/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
@@ -1572,483 +1451,364 @@ 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_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 \
- struc-symbol.h dwarf2dbg.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+DEPOBJ_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(BFDDIR)/libecoff.h
+DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/aout/aout64.h
-DEPOBJ_alpha_evax = $(INCDIR)/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 $(INCDIR)/obstack.h \
- subsegs.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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 \
+DEPOBJ_alpha_evax = $(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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_bfin_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-bfin.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-DEPOBJ_bfin_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-bfin.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_crx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-crx.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-DEPOBJ_crx_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-crx.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 $(INCDIR)/coff/external.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 \
+ subsegs.h $(INCDIR)/obstack.h
+DEPOBJ_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_bfin_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-bfin.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_dlx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-dlx.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-DEPOBJ_dlx_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-dlx.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-frv.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-DEPOBJ_frv_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-frv.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_crx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-crx.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_dlx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_frv_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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 $(INCDIR)/coff/external.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 \
+ subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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)/elf-bfd.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h \
- $(INCDIR)/aout/aout64.h
-DEPOBJ_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ia64.h $(INCDIR)/opcode/ia64.h \
- $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.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)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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 \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/i370.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/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 \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/reloc-macros.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.h \
+ subsegs.h $(INCDIR)/obstack.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 $(srcdir)/../opcodes/i386-opc.h \
+ $(INCDIR)/opcode/i386.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.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 = $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_ip2k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ip2k.h $(INCDIR)/coff/internal.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 $(INCDIR)/opcode/ia64.h \
+ $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_ip2k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ip2k.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m32c_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32c.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 $(INCDIR)/coff/external.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-DEPOBJ_ip2k_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-ip2k.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m32c_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m32c.h $(INCDIR)/coff/internal.h \
+ subsegs.h $(INCDIR)/obstack.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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_maxq_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-maxq.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-DEPOBJ_m32c_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-m32c.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ subsegs.h $(INCDIR)/obstack.h
+DEPOBJ_mcore_coff = $(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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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 = $(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 \
+ subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.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 = $(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)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mep_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mep.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_msp430_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-msp430.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/mep.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mips_coff = $(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_msp430_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-msp430.h \
+ subsegs.h $(INCDIR)/obstack.h
+DEPOBJ_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(BFDDIR)/libecoff.h
+DEPOBJ_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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_mmix_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_msp430_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mt_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mt.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_openrisc_elf = $(srcdir)/config/obj-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 \
dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_or32_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/obstack.h
+DEPOBJ_or32_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_pdp11_aout = $(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_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 $(INCDIR)/obstack.h
+DEPOBJ_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/ppc.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
+DEPOBJ_s390_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_score_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-score.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 $(INCDIR)/coff/external.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ subsegs.h $(INCDIR)/obstack.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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 $(INCDIR)/coff/external.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_or32_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-or32.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_or32_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-or32.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_spu_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-spu.h $(INCDIR)/opcode/spu.h \
+ $(INCDIR)/opcode/spu-insns.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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 $(INCDIR)/coff/external.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ subsegs.h $(INCDIR)/obstack.h
+DEPOBJ_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ subsegs.h $(INCDIR)/obstack.h
+DEPOBJ_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-DEPOBJ_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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
+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 $(INCDIR)/elf/v850.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_sh64_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-sh64.h \
- $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/elf32-sh64.h $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tic4x_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-tic4x.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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 \
+DEPOBJ_xc16x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xc16x.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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_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)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_xstormy16_elf = $(srcdir)/config/obj-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 \
dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-v850.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.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)/elf/v850.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_xtensa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xtensa.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h $(INCDIR)/safe-ctype.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_z80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z80.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-DEPOBJ_xc16x_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-xc16x.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_xtensa_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-xtensa.h \
- $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-config.h $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h \
- $(INCDIR)/aout/aout64.h
-DEPOBJ_z80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-z80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_z80_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-z80.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 = $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+ subsegs.h $(INCDIR)/obstack.h
+DEPOBJ_z8k_coff = $(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 $(INCDIR)/obstack.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
@@ -2057,354 +1817,309 @@ DEPOBJ_i386_multi = $(DEPOBJ_i386_aout) $(DEPOBJ_i386_coff) \
DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \
$(DEPOBJ_mips_elf)
DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf)
-DEP_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.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 $(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_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h
DEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
-DEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
- $(INCDIR)/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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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)/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)/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 \
- dwarf2dbg.h
-DEP_bfin_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-bfin.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-DEP_bfin_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-bfin.h \
- dwarf2dbg.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_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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_bfin_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-bfin.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_cr16_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cr16.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 $(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 \
- dwarf2dbg.h
-DEP_crx_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-crx.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-DEP_crx_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-crx.h \
- dwarf2dbg.h
-DEP_d10v_coff = $(srcdir)/config/obj-coff.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)/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_dlx_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-DEP_dlx_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-dlx.h \
- dwarf2dbg.h
-DEP_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.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 \
- dwarf2dbg.h
-DEP_frv_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-frv.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-DEP_frv_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-frv.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_crx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-crx.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h
+DEP_d30v_elf = $(srcdir)/config/obj-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_dlx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_frv_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.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 \
- dwarf2dbg.h
-DEP_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.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)/opcode/ia64.h $(INCDIR)/symcat.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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 \
- $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h
-DEP_i370_coff = $(srcdir)/config/obj-coff.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.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)/elf-bfd.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.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 \
- dwarf2dbg.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 \
- dwarf2dbg.h
-DEP_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.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 \
- dwarf2dbg.h
-DEP_ip2k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ip2k.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-DEP_ip2k_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-ip2k.h \
- dwarf2dbg.h
-DEP_m32c_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32c.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-DEP_m32c_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-m32c.h \
- dwarf2dbg.h
-DEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.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 $(srcdir)/../opcodes/i386-opc.h \
+ $(INCDIR)/opcode/i386.h dwarf2dbg.h $(srcdir)/config/obj-coff.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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_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 \
- dwarf2dbg.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.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 $(INCDIR)/opcode/ia64.h \
+ $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h
+DEP_ip2k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ip2k.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_m32c_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32c.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.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)/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
+ $(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_maxq_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-maxq.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_mcore_coff = $(srcdir)/config/obj-coff.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h
+DEP_mep_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mep.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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 $(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 \
- dwarf2dbg.h
-DEP_mn10200_coff = $(srcdir)/config/obj-coff.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 \
- dwarf2dbg.h
-DEP_mn10300_coff = $(srcdir)/config/obj-coff.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 \
- dwarf2dbg.h
-DEP_msp430_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-msp430.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-DEP_msp430_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-msp430.h \
- dwarf2dbg.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_mmix_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_msp430_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_mt_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mt.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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)/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 \
- dwarf2dbg.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 \
- dwarf2dbg.h
+DEP_openrisc_elf = $(srcdir)/config/obj-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 \
+ dwarf2dbg.h $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_or32_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_or32_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-or32.h \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_or32_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.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 \
- dwarf2dbg.h
-DEP_pj_coff = $(srcdir)/config/obj-coff.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 \
- dwarf2dbg.h
+DEP_pdp11_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.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 \
- dwarf2dbg.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)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h
+DEP_s390_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_score_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-score.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_sh_coff = $(srcdir)/config/obj-coff.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_sh64_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-sh64.h \
- $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/elf32-sh64.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_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.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)/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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h
+DEP_spu_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-spu.h $(INCDIR)/opcode/spu.h \
+ $(INCDIR)/opcode/spu-insns.h dwarf2dbg.h $(srcdir)/config/obj-coff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.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)/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 \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h \
- $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_tic4x_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-tic4x.h \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_tic54x_coff = $(srcdir)/config/obj-coff.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
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.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 $(INCDIR)/elf/v850.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/obj-coff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.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)/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 \
- dwarf2dbg.h
-DEP_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.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 \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.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_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 \
- dwarf2dbg.h
-DEP_xc16x_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-xc16x.h
-DEP_xtensa_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-xtensa.h \
- $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-config.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_xc16x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xc16x.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_xstormy16_elf = $(srcdir)/config/obj-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 \
+ dwarf2dbg.h $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
+DEP_xtensa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xtensa.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h
DEP_z80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z80.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/z80.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_z80_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-z80.h \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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 \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_hppa_som = $(BFDDIR)/som.h
DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \
$(DEP_i386_elf)
@@ -2413,66 +2128,52 @@ 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 $(INCDIR)/symcat.h
-as.o: as.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
- output-file.h sb.h macro.h dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(BFDVER_H)
-atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.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 $(INCDIR)/safe-ctype.h \
- dwarf2dbg.h $(INCDIR)/filenames.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/elf/dwarf2.h
-dw2gencfi.o: dw2gencfi.c $(INCDIR)/symcat.h dw2gencfi.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 \
+app.o: app.c
+as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \
+ sb.h macro.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ ../bfd/bfdver.h
+atof-generic.o: atof-generic.c $(INCDIR)/safe-ctype.h
+cond.o: cond.c sb.h macro.h $(INCDIR)/obstack.h
+depend.o: depend.c
+dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/safe-ctype.h dwarf2dbg.h \
+ $(INCDIR)/filenames.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/elf/dwarf2.h
-expr.o: expr.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/obstack.h
-flonum-copy.o: flonum-copy.c $(INCDIR)/symcat.h
+dw2gencfi.o: dw2gencfi.c dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ subsegs.h $(INCDIR)/obstack.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)/safe-ctype.h $(INCDIR)/obstack.h
+flonum-copy.o: flonum-copy.c
flonum-konst.o: flonum-konst.c
flonum-mult.o: flonum-mult.c
-frags.o: frags.c $(INCDIR)/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)/obstack.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)/symcat.h $(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 \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.h
-sb.o: sb.c sb.h $(INCDIR)/symcat.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
-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
+frags.o: frags.c subsegs.h $(INCDIR)/obstack.h
+hash.o: hash.c $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h
+input-file.o: input-file.c input-file.h $(INCDIR)/safe-ctype.h
+input-scrub.o: input-scrub.c input-file.h sb.h
+listing.o: listing.c $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
+ input-file.h subsegs.h
+literal.o: literal.c subsegs.h $(INCDIR)/obstack.h
+macro.o: macro.c $(INCDIR)/safe-ctype.h sb.h macro.h
+messages.o: messages.c
+output-file.o: output-file.c output-file.h
+read.o: read.c $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ sb.h macro.h ecoff.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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)/safe-ctype.h $(INCDIR)/obstack.h \
+ subsegs.h struc-symbol.h
+write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \
+ dwarf2dbg.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
+itbl-ops.o: itbl-ops.c itbl-ops.h
+e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h
+e-criself.o: $(srcdir)/config/e-criself.c emul-target.h
+e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h
+e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h
+e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h
+e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h
+e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h
$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
$(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@)
$(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@)
diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in
index 4cc485f..6a43cca 100644
--- a/contrib/binutils/gas/Makefile.in
+++ b/contrib/binutils/gas/Makefile.in
@@ -51,9 +51,16 @@ DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub NEWS \
$(srcdir)/../config.sub
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
+ $(top_srcdir)/../bfd/warning.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -78,7 +85,7 @@ am__DEPENDENCIES_1 = tc-@target_cpu_type@.o
am__DEPENDENCIES_2 = obj-@obj_format@.o
am__DEPENDENCIES_3 = atof-@atof@.o
am__DEPENDENCIES_4 =
-am__DEPENDENCIES_5 = ../libiberty/libiberty.a
+am__DEPENDENCIES_5 = ../bfd/libbfd.la ../libiberty/libiberty.a
am_itbl_test_OBJECTS = itbl-parse.$(OBJEXT) itbl-lex.$(OBJEXT)
itbl_test_OBJECTS = $(am_itbl_test_OBJECTS)
itbl_test_DEPENDENCIES = itbl-tops.o itbl-test.o $(am__DEPENDENCIES_5)
@@ -88,11 +95,11 @@ depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
@@ -114,16 +121,14 @@ DEJATOOL = $(PACKAGE)
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-ALL_OBJ_DEPS = @ALL_OBJ_DEPS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BFDLIB = @BFDLIB@
-BFDVER_H = @BFDVER_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
@@ -135,29 +140,32 @@ CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+FGREP = @FGREP@
GDBINIT = @GDBINIT@
-GMOFILES = @GMOFILES@
+GENCAT = @GENCAT@
+GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
+GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+GREP = @GREP@
+INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = `if [ -f ../flex/flex ] ; then echo ../flex/flex ; else echo @LEX@ ; fi`
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -170,6 +178,8 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
OPCODES_LIB = @OPCODES_LIB@
@@ -180,19 +190,20 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
YACC = `if [ -f ../bison/bison ] ; then echo ../bison/bison -y -L../bison/bison ; else echo @YACC@ ; fi`
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
@@ -225,10 +236,10 @@ includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
install_tooldir = @install_tooldir@
-l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
obj_format = @obj_format@
@@ -246,11 +257,16 @@ target_os = @target_os@
target_vendor = @target_vendor@
te_file = @te_file@
AUTOMAKE_OPTIONS = 1.8 cygnus dejagnu
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = doc po
# Automake should figure this out on its own. It doesn't, because
# of the "cygnus" option. But distclean still wants it.
DIST_SUBDIRS = $(SUBDIRS)
tooldir = $(exec_prefix)/$(target_alias)
+
+# We have to set this, because autoconf 2.59 does not substitute YFLAGS.
+# Autoconf 2.61 does, so this can be removed when we upgrade.
+YFLAGS =
AM_CFLAGS = $(WARN_CFLAGS)
MKDEP = gcc -MM
TARG_CPU = @target_cpu_type@
@@ -265,7 +281,7 @@ ATOF_TARG_C = $(srcdir)/config/atof-@atof@.c
ATOF_TARG_O = atof-@atof@.o
# use @target_cpu_type@ for refering to configured target name
-IT_HDRS = itbl-parse.h $(srcdir)/itbl-ops.h
+IT_HDRS = itbl-parse.h $(srcdir)/itbl-ops.h
IT_SRCS = itbl-parse.c itbl-lex.c $(srcdir)/itbl-ops.c
IT_DEPS = $(srcdir)/itbl-parse.y $(srcdir)/itbl-lex.l $(srcdir)/config/itbl-@target_cpu_type@.h
IT_OBJS = itbl-parse.o itbl-lex.o itbl-ops.o
@@ -277,6 +293,7 @@ CPU_TYPES = \
arm \
avr \
bfin \
+ cr16 \
cris \
crx \
d10v \
@@ -286,22 +303,25 @@ CPU_TYPES = \
frv \
h8300 \
hppa \
- ia64 \
i370 \
i386 \
i860 \
i960 \
+ ia64 \
ip2k \
m32c \
m32r \
m68hc11 \
m68k \
+ maxq \
mcore \
+ mep \
mips \
mmix \
mn10200 \
mn10300 \
msp430 \
+ mt \
ns32k \
openrisc \
or32 \
@@ -309,16 +329,18 @@ CPU_TYPES = \
pj \
ppc \
s390 \
+ score \
sh \
sh64 \
sparc \
+ spu \
tic30 \
tic4x \
tic54x \
- vax \
v850 \
- xstormy16 \
+ vax \
xc16x \
+ xstormy16 \
xtensa \
z80 \
z8k
@@ -331,8 +353,7 @@ OBJ_FORMATS = \
coff \
ecoff \
elf \
- evax \
- ieee
+ evax
# This is an sh case which sets valid according to whether the CPU
@@ -347,16 +368,20 @@ CPU_OBJ_VALID = \
arm | cris | i386 | m68k | ns32k | pdp11 | sparc | tic30 | vax) \
valid=yes ;; \
esac ;; \
- coff) valid=yes; \
+ coff) \
case $$c in \
- cris | i860 | mmix | sh64) \
- valid= ;; \
+ arm | h8300 | i386 | i960 | m68k | maxq | mcore | mips | or32 \
+ | ppc | sh | sparc | tic* | xscale | z80 | z8k) \
+ valid=yes ;; \
esac ;; \
ecoff) \
case $$c in \
mips | alpha) valid=yes ;; \
esac ;; \
- elf) valid=yes ;; \
+ elf) valid=yes ; \
+ case $$c in \
+ maxq | ns32k | tic* | z80 | z8k) valid= ;; \
+ esac ;; \
evax) \
case $$c in \
alpha) valid=yes ;; \
@@ -459,6 +484,7 @@ TARGET_CPU_CFILES = \
config/tc-arm.c \
config/tc-avr.c \
config/tc-bfin.c \
+ config/tc-cr16.c \
config/tc-cris.c \
config/tc-crx.c \
config/tc-d10v.c \
@@ -479,6 +505,7 @@ TARGET_CPU_CFILES = \
config/tc-m68hc11.c \
config/tc-m68k.c \
config/tc-mcore.c \
+ config/tc-mep.c \
config/tc-mips.c \
config/tc-mmix.c \
config/tc-mn10200.c \
@@ -491,9 +518,11 @@ TARGET_CPU_CFILES = \
config/tc-pj.c \
config/tc-ppc.c \
config/tc-s390.c \
+ config/tc-score.c \
config/tc-sh.c \
config/tc-sh64.c \
config/tc-sparc.c \
+ config/tc-spu.c \
config/tc-tic30.c \
config/tc-tic54x.c \
config/tc-vax.c \
@@ -510,6 +539,7 @@ TARGET_CPU_HFILES = \
config/tc-arm.h \
config/tc-avr.h \
config/tc-bfin.h \
+ config/tc-cr16.h \
config/tc-cris.h \
config/tc-crx.h \
config/tc-d10v.h \
@@ -530,6 +560,7 @@ TARGET_CPU_HFILES = \
config/tc-m68hc11.h \
config/tc-m68k.h \
config/tc-mcore.h \
+ config/tc-mep.h \
config/tc-mips.h \
config/tc-mmix.h \
config/tc-mn10200.h \
@@ -542,9 +573,11 @@ TARGET_CPU_HFILES = \
config/tc-pj.h \
config/tc-ppc.h \
config/tc-s390.h \
+ config/tc-score.h \
config/tc-sh.h \
config/tc-sh64.h \
config/tc-sparc.h \
+ config/tc-spu.h \
config/tc-tic30.h \
config/tc-tic54x.h \
config/tc-vax.h \
@@ -563,7 +596,6 @@ OBJ_FORMAT_CFILES = \
config/obj-ecoff.c \
config/obj-elf.c \
config/obj-evax.c \
- config/obj-ieee.c \
config/obj-som.c
OBJ_FORMAT_HFILES = \
@@ -572,7 +604,6 @@ OBJ_FORMAT_HFILES = \
config/obj-ecoff.h \
config/obj-elf.h \
config/obj-evax.h \
- config/obj-ieee.h \
config/obj-som.h
@@ -610,7 +641,8 @@ TARG_ENV_HFILES = \
config/te-sun3.h \
config/te-svr4.h \
config/te-symbian.h \
- config/te-tmips.h
+ config/te-tmips.h \
+ config/te-wince-pe.h
# Multi files in config
@@ -681,29 +713,36 @@ INCDIR = $(BASEDIR)/include
# Both . and srcdir are used, in that order,
# so that tm.h and config.h will be found in the compilation
# subdirectory rather than in the source directory.
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) -I$(srcdir)/../intl -I../intl -DLOCALEDIR="\"$(datadir)/locale\""
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config \
+ -I$(INCDIR) -I$(srcdir)/.. -I$(BFDDIR) @INCINTL@ \
+ -DLOCALEDIR="\"$(datadir)/locale\""
+
# This should be parallel to INCLUDES, but should replace $(srcdir)
# with $${srcdir}, and should work in a subdirectory. This is used
# when building dependencies, because the dependency building is done
# in a subdirectory.
-DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. -I$${srcdir}/../bfd -I$${srcdir}/../intl -I../../intl -DLOCALEDIR="\"$(datadir)/locale\""
+DEP_INCLUDES = -D_GNU_SOURCE -I.. -I$${srcdir} -I../../bfd \
+ -I$${srcdir}/config -I$${srcdir}/../include -I$${srcdir}/.. \
+ -I$${srcdir}/../bfd @INCINTL@ \
+ -DLOCALEDIR="\"$(datadir)/locale\""
+
DEP_FLAGS = -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.
-GASLIBS = @OPCODES_LIB@ @BFDLIB@ ../libiberty/libiberty.a
+GASLIBS = @OPCODES_LIB@ ../bfd/libbfd.la ../libiberty/libiberty.a
# Files to be copied away after each stage in building.
STAGESTUFF = *.o $(noinst_PROGRAMS)
as_new_SOURCES = $(GAS_CFILES)
as_new_LDADD = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS) $(INTLLIBS) $(LIBM)
+ $(extra_objects) $(GASLIBS) $(LIBINTL) $(LIBM)
as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
- $(extra_objects) $(GASLIBS) $(INTLDEPS)
+ $(extra_objects) $(GASLIBS) $(LIBINTL_DEP)
EXPECT = expect
RUNTEST = runtest
@@ -729,687 +768,520 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in $(srcdir)/configure.tgt
AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
-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 dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(INCDIR)/safe-ctype.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 ecoff.h \
+ $(INCDIR)/opcode/alpha.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ $(INCDIR)/safe-ctype.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 dw2gencfi.h \
+DEPTC_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
+ $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h dw2gencfi.h \
$(INCDIR)/elf/dwarf2.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 \
+DEPTC_alpha_evax = $(srcdir)/config/obj-evax.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(INCDIR)/safe-ctype.h $(srcdir)/config/atof-vax.c
+ $(INCDIR)/opcode/alpha.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
+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 dwarf2dbg.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 \
- dwarf2dbg.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
+DEPTC_arm_aout = $(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 $(INCDIR)/obstack.h $(INCDIR)/opcode/arm.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 \
- $(INCDIR)/opcode/arm.h
+DEPTC_arm_coff = $(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 $(INCDIR)/obstack.h $(INCDIR)/opcode/arm.h \
+ dwarf2dbg.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 $(INCDIR)/opcode/arm.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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arm.h \
+ $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h dw2gencfi.h \
+ $(INCDIR)/elf/dwarf2.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 \
+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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/arm.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h
+ $(INCDIR)/opcode/avr.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_bfin_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-bfin.h dwarf2dbg.h \
+ struc-symbol.h $(srcdir)/config/bfin-defs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h $(BFDDIR)/libbfd.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/elf/common.h $(INCDIR)/elf/bfin.h \
+ $(INCDIR)/elf/reloc-macros.h $(srcdir)/config/bfin-aux.h \
+ $(srcdir)/config/bfin-defs.h $(INCDIR)/opcode/bfin.h
+
+DEPTC_cr16_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cr16.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h $(INCDIR)/opcode/cr16.h \
+ $(INCDIR)/elf/cr16.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h \
+ dwarf2dbg.h
-DEPTC_bfin_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-bfin.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h struc-symbol.h \
- $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h dwarf2dbg.h \
- $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
- $(srcdir)/config/bfin-aux.h $(INCDIR)/opcode/bfin.h \
- $(srcdir)/config/bfin-defs.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
-
-DEPTC_bfin_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-bfin.h \
- dwarf2dbg.h struc-symbol.h $(srcdir)/config/bfin-defs.h \
- $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h $(srcdir)/config/bfin-aux.h \
- $(INCDIR)/opcode/bfin.h $(srcdir)/config/bfin-defs.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/bfin.h $(BFDDIR)/libbfd.h
-
-DEPTC_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/cris.h
-
-DEPTC_crx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-crx.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
- dwarf2dbg.h $(INCDIR)/opcode/crx.h $(INCDIR)/elf/crx.h \
- $(INCDIR)/elf/reloc-macros.h
-
-DEPTC_crx_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-crx.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/crx.h \
+DEPTC_crx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-crx.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h $(INCDIR)/opcode/crx.h \
$(INCDIR)/elf/crx.h $(INCDIR)/elf/reloc-macros.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 \
+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 $(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 = $(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 \
+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 $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
-DEPTC_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+DEPTC_dlx_elf = $(INCDIR)/safe-ctype.h $(srcdir)/config/obj-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_dlx_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
- $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/opcode/dlx.h
-
-DEPTC_dlx_elf = $(INCDIR)/safe-ctype.h $(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-dlx.h dwarf2dbg.h $(INCDIR)/opcode/dlx.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-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/fr30-opc.h cgen.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h \
+ dwarf2dbg.h $(srcdir)/config/tc-dlx.h $(INCDIR)/opcode/dlx.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \
- cgen.h
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(srcdir)/../opcodes/fr30-opc.h cgen.h
-DEPTC_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-frv.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/frv-opc.h \
+DEPTC_frv_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h subsegs.h \
+ $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/frv-opc.h \
cgen.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_frv_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-frv.h \
- subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/frv-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/frv-opc.h cgen.h $(BFDDIR)/libbfd.h \
- $(INCDIR)/hashtab.h $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.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 dwarf2dbg.h \
- $(INCDIR)/opcode/h8300.h $(INCDIR)/safe-ctype.h
+DEPTC_h8300_coff = $(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 \
+ dwarf2dbg.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/h8300.h \
$(INCDIR)/safe-ctype.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.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 = $(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 \
+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)/elf-bfd.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 = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ia64.h $(INCDIR)/opcode/ia64.h \
- $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h
+ subsegs.h $(INCDIR)/obstack.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h dwarf2dbg.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)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.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 = $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
struc-symbol.h $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h \
$(INCDIR)/elf/reloc-macros.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/i386.h \
- $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h dw2gencfi.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
- $(INCDIR)/opcode/i386.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h dw2gencfi.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/i386.h \
- $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 $(srcdir)/../opcodes/i386-opc.h \
+ $(INCDIR)/opcode/i386.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h dw2gencfi.h \
+ $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.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)/safe-ctype.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/i960.h
-DEPTC_ip2k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ip2k.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/ip2k-opc.h \
- cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/ip2k.h \
- $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
-DEPTC_ip2k_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-ip2k.h \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/ip2k-desc.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 $(INCDIR)/opcode/ia64.h \
+ $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ia64.h \
+ $(INCDIR)/elf/ia64.h
+
+DEPTC_ip2k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ip2k.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/ip2k-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/ip2k-opc.h cgen.h $(INCDIR)/elf/ip2k.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/ip2k-opc.h \
+ cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/ip2k.h \
$(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
-DEPTC_m32c_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m32c.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32c-opc.h \
- $(srcdir)/../opcodes/cgen-types.h $(srcdir)/../opcodes/cgen-ops.h \
- cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/m32c.h \
- $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h \
- $(INCDIR)/safe-ctype.h
-
-DEPTC_m32c_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-m32c.h \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/m32c-desc.h \
+DEPTC_m32c_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32c.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/m32c-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/m32c-opc.h $(srcdir)/../opcodes/cgen-types.h \
- $(srcdir)/../opcodes/cgen-ops.h cgen.h $(INCDIR)/elf/m32c.h \
- $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h \
- $(INCDIR)/safe-ctype.h
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/m32c-opc.h \
+ $(srcdir)/../opcodes/cgen-types.h ../bfd/bfd_stdint.h \
+ $(srcdir)/../opcodes/cgen-ops.h cgen.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/m32c.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/libbfd.h \
+ $(INCDIR)/hashtab.h $(INCDIR)/safe-ctype.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-bitset.h $(INCDIR)/opcode/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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
$(srcdir)/../opcodes/m32r-opc.h cgen.h $(INCDIR)/elf/m32r.h \
$(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
- cgen.h $(INCDIR)/elf/m32r.h $(INCDIR)/elf/reloc-macros.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 \
- $(INCDIR)/elf/m68hc11.h $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/m68hc11.h $(INCDIR)/elf/m68hc11.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h $(INCDIR)/elf/m68hc11.h \
$(INCDIR)/elf/reloc-macros.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/m68k.h \
+DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.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 $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/m68k.h \
+DEPTC_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/m68k.h \
$(srcdir)/config/m68k-parse.h $(INCDIR)/elf/m68k.h \
$(INCDIR)/elf/reloc-macros.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_maxq_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-maxq.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h $(srcdir)/config/tc-maxq.h \
+ $(INCDIR)/opcode/maxq.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 \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+DEPTC_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(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 dwarf2dbg.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_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 dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+DEPTC_mep_elf = $(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
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mep.h dwarf2dbg.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mep-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/mep-opc.h \
+ cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/mep.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.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 \
+DEPTC_mips_coff = $(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 \
dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(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
+ $(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_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 \
+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)/safe-ctype.h \
$(INCDIR)/opcode/mips.h itbl-ops.h dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/elf/dwarf2.h $(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 \
+ ecoff.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)/safe-ctype.h $(INCDIR)/opcode/mips.h \
+ itbl-ops.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ $(srcdir)/config/obj-elf.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 \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
+DEPTC_mmix_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \
- $(INCDIR)/safe-ctype.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
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h $(INCDIR)/obstack.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.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 = $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/mn10300.h
-
-DEPTC_msp430_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-msp430.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/msp430.h $(INCDIR)/safe-ctype.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
-DEPTC_msp430_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-msp430.h \
- dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/msp430.h \
- $(INCDIR)/safe-ctype.h
+DEPTC_msp430_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/msp430.h \
+ $(INCDIR)/safe-ctype.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_mt_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mt.h dwarf2dbg.h \
+ dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mt-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/mt-opc.h \
+ cgen.h $(INCDIR)/elf/common.h $(INCDIR)/elf/mt.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.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 \
+DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \
$(INCDIR)/obstack.h
-DEPTC_ns32k_elf = $(INCDIR)/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 \
- dwarf2dbg.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-bitset.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 \
+DEPTC_openrisc_elf = $(srcdir)/config/obj-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 \
dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/openrisc-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/openrisc-opc.h cgen.h
-
-DEPTC_or32_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
- $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/or32.h $(INCDIR)/elf/or32.h \
- $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/openrisc-opc.h \
+ cgen.h
-DEPTC_or32_elf = $(INCDIR)/safe-ctype.h $(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-or32.h dwarf2dbg.h $(INCDIR)/opcode/or32.h \
- $(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_or32_coff = $(INCDIR)/safe-ctype.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-or32.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/opcode/or32.h $(INCDIR)/elf/or32.h $(INCDIR)/elf/reloc-macros.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_or32_elf = $(INCDIR)/safe-ctype.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h \
+ dwarf2dbg.h $(INCDIR)/opcode/or32.h $(INCDIR)/elf/or32.h \
+ $(INCDIR)/elf/reloc-macros.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 \
+DEPTC_pdp11_aout = $(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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
+DEPTC_pdp11_elf = $(srcdir)/config/obj-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 dwarf2dbg.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.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 \
- dwarf2dbg.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 $(INCDIR)/safe-ctype.h subsegs.h \
+ $(INCDIR)/obstack.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
+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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/ppc.h \
- $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.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 dwarf2dbg.h \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.h $(INCDIR)/opcode/s390.h \
- $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_s390_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
- $(INCDIR)/safe-ctype.h struc-symbol.h dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h
+DEPTC_score_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-score.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/opcode/score-inst.h $(INCDIR)/opcode/score-datadep.h \
+ struc-symbol.h $(INCDIR)/elf/score.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 dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h
+DEPTC_sh_coff = $(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 $(INCDIR)/safe-ctype.h \
+ struc-symbol.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h
-DEPTC_sh64_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-sh64.h \
- $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/elf32-sh64.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \
+DEPTC_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \
+ $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h $(INCDIR)/safe-ctype.h \
+ struc-symbol.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h
+
+DEPTC_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.h \
+ $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/sh64-opc.h \
$(srcdir)/config/tc-sh.c subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/sh-opc.h struc-symbol.h dwarf2dbg.h \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.h
+ $(srcdir)/../opcodes/sh-opc.h $(INCDIR)/safe-ctype.h \
+ struc-symbol.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h $(INCDIR)/elf/dwarf2.h
+DEPTC_sparc_aout = $(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 \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.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 dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h
+DEPTC_sparc_coff = $(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 \
+ dw2gencfi.h $(INCDIR)/elf/dwarf2.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/sparc.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
- $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.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
+ $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic30.h
+DEPTC_spu_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-spu.h $(INCDIR)/opcode/spu.h \
+ $(INCDIR)/opcode/spu-insns.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/spu-insns.h
-DEPTC_tic4x_coff = $(INCDIR)/safe-ctype.h $(INCDIR)/symcat.h \
- $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic4x.h \
- subsegs.h $(INCDIR)/obstack.h
+DEPTC_tic30_aout = $(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_tic4x_elf = $(INCDIR)/safe-ctype.h $(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-tic4x.h dwarf2dbg.h $(INCDIR)/opcode/tic4x.h \
- subsegs.h $(INCDIR)/obstack.h
+DEPTC_tic30_coff = $(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_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_tic4x_coff = $(INCDIR)/safe-ctype.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic4x.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/obstack.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 \
+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
+ $(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 $(srcdir)/config/obj-coff.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 subsegs.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/vax.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 $(INCDIR)/elf/v850.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \
+ dwarf2dbg.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 subsegs.h $(INCDIR)/safe-ctype.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 subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/opcode/vax.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 \
- dwarf2dbg.h $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h \
- subsegs.h $(INCDIR)/safe-ctype.h $(INCDIR)/elf/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 dwarf2dbg.h \
+ $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h $(INCDIR)/elf/vax.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/vax.h
-DEPTC_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-v850.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.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 = $(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)/elf/v850.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h \
+DEPTC_xc16x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xc16x.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/v850.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-bitset.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/xstormy16-opc.h \
- cgen.h
+ $(srcdir)/../opcodes/xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(srcdir)/../opcodes/xc16x-opc.h cgen.h dwarf2dbg.h \
+ $(INCDIR)/elf/xc16x.h $(INCDIR)/elf/reloc-macros.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 \
+DEPTC_xstormy16_elf = $(srcdir)/config/obj-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 \
dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/xstormy16-opc.h cgen.h
-
-DEPTC_xc16x_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-xc16x.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- $(srcdir)/../opcodes/xc16x-desc.h $(INCDIR)/opcode/cgen.h \
- $(srcdir)/../opcodes/xc16x-opc.h cgen.h
+ $(INCDIR)/opcode/cgen-bitset.h $(srcdir)/../opcodes/xstormy16-opc.h \
+ cgen.h
-DEPTC_xtensa_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-xtensa.h \
- $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-config.h sb.h \
- $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+DEPTC_xtensa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xtensa.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h sb.h $(INCDIR)/safe-ctype.h \
+ $(srcdir)/config/tc-xtensa.h subsegs.h $(INCDIR)/obstack.h \
$(srcdir)/config/xtensa-relax.h $(srcdir)/config/xtensa-istack.h \
- dwarf2dbg.h struc-symbol.h
-
-DEPTC_z80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-z80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
- $(INCDIR)/obstack.h
-
-DEPTC_z80_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-z80.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h
+ dwarf2dbg.h struc-symbol.h $(INCDIR)/xtensa-config.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 $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
+DEPTC_z80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z80.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
+DEPTC_z8k_coff = $(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)/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 \
@@ -1422,588 +1294,439 @@ DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \
$(DEPTC_mips_elf)
DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf)
-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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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_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 \
+DEPOBJ_alpha_evax = $(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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/aout/aout64.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_alpha_evax = $(INCDIR)/symcat.h $(srcdir)/config/obj-evax.h \
- $(srcdir)/config/tc-alpha.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_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \
+DEPOBJ_arm_coff = $(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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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
+ subsegs.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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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 \
+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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_bfin_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-bfin.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_bfin_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-bfin.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_bfin_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-bfin.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_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 = $(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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_crx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-crx.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_crx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-crx.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_crx_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-crx.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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_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)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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 \
+DEPOBJ_dlx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 \
+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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_dlx_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-dlx.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_dlx_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-dlx.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_frv_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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 \
+DEPOBJ_h8300_coff = $(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
+ subsegs.h $(INCDIR)/obstack.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_frv_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-frv.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)/elf-bfd.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_frv_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-frv.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/i370.h \
+ $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
+DEPOBJ_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
+ subsegs.h $(INCDIR)/obstack.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 struc-symbol.h dwarf2dbg.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 $(srcdir)/../opcodes/i386-opc.h \
+ $(INCDIR)/opcode/i386.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/aout/aout64.h
-DEPOBJ_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ia64.h $(INCDIR)/opcode/ia64.h \
- $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.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)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_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 $(INCDIR)/obstack.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/elf/i370.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/aout/aout64.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_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 $(INCDIR)/opcode/ia64.h \
+ $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.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_ip2k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ip2k.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/elf/x86-64.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/aout/aout64.h
+DEPOBJ_m32c_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32c.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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_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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_ip2k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-ip2k.h $(INCDIR)/coff/internal.h \
+DEPOBJ_m68k_coff = $(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
+ subsegs.h $(INCDIR)/obstack.h
-DEPOBJ_ip2k_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-ip2k.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m32c_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m32c.h $(INCDIR)/coff/internal.h \
+DEPOBJ_maxq_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-maxq.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
-
-DEPOBJ_m32c_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-m32c.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+ subsegs.h $(INCDIR)/obstack.h
-DEPOBJ_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \
+DEPOBJ_mcore_coff = $(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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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
+ subsegs.h $(INCDIR)/obstack.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 \
+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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.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 = $(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
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
+DEPOBJ_mep_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mep.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/aout/aout64.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/mep.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
+DEPOBJ_mips_coff = $(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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+ subsegs.h $(INCDIR)/obstack.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_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(BFDDIR)/libecoff.h
-DEPOBJ_mn10300_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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_msp430_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-msp430.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_mmix_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_msp430_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-msp430.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_msp430_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mt_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mt.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_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_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 \
+DEPOBJ_openrisc_elf = $(srcdir)/config/obj-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 \
dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_or32_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-or32.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_or32_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/obstack.h
-DEPOBJ_or32_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-or32.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_or32_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_aout = $(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 = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_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 $(INCDIR)/obstack.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/elf/ppc.h \
+ $(INCDIR)/elf/reloc-macros.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_s390_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/aout/aout64.h
+DEPOBJ_score_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-score.h dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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 \
+DEPOBJ_sh_coff = $(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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+ subsegs.h $(INCDIR)/obstack.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 $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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 \
+DEPOBJ_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_sh64_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-sh64.h \
- $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/elf32-sh64.h $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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_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_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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_sparc_coff = $(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 $(INCDIR)/obstack.h
-DEPOBJ_tic4x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-tic4x.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.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 dwarf2dbg.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tic4x_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-tic4x.h \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_spu_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-spu.h $(INCDIR)/opcode/spu.h \
+ $(INCDIR)/opcode/spu-insns.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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_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_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 \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
+DEPOBJ_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.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_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h $(INCDIR)/obstack.h
-DEPOBJ_vax_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.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
+ subsegs.h $(INCDIR)/obstack.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.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 $(INCDIR)/elf/v850.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-v850.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_v850_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)/elf/v850.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.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 dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_xc16x_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-xc16x.h \
+DEPOBJ_xc16x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xc16x.h dwarf2dbg.h \
$(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-
-DEPOBJ_xtensa_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-xtensa.h \
- $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-config.h $(INCDIR)/safe-ctype.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h \
- $(INCDIR)/aout/aout64.h
-
-DEPOBJ_z80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
- $(srcdir)/config/tc-z80.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.h $(INCDIR)/aout/aout64.h
-DEPOBJ_z80_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-z80.h \
+DEPOBJ_xstormy16_elf = $(srcdir)/config/obj-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 \
dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+ $(INCDIR)/obstack.h struc-symbol.h dwarf2dbg.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_xtensa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xtensa.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h $(INCDIR)/safe-ctype.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/obstack.h struc-symbol.h \
+ dwarf2dbg.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 \
- dwarf2dbg.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
- struc-symbol.h $(INCDIR)/aout/aout64.h
+DEPOBJ_z80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z80.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h $(INCDIR)/obstack.h
+
+DEPOBJ_z8k_coff = $(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 $(INCDIR)/obstack.h
DEPOBJ_hppa_som = $(srcdir)/config/obj-som.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(BFDDIR)/som.h \
@@ -2016,458 +1739,385 @@ DEPOBJ_mips_multi = $(DEPOBJ_mips_coff) $(DEPOBJ_mips_ecoff) \
$(DEPOBJ_mips_elf)
DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf)
-DEP_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.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 $(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_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h
DEP_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
-DEP_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
- $(INCDIR)/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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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)/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
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+DEP_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h
-DEP_avr_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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_bfin_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-bfin.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+DEP_bfin_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-bfin.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_bfin_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-bfin.h \
- dwarf2dbg.h
+DEP_cr16_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cr16.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 $(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 \
- dwarf2dbg.h
-
-DEP_crx_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-crx.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-
-DEP_crx_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-crx.h \
- dwarf2dbg.h
-
-DEP_d10v_coff = $(srcdir)/config/obj-coff.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)/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_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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_dlx_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-dlx.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+DEP_crx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-crx.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_dlx_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-dlx.h \
- dwarf2dbg.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_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.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_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 \
- dwarf2dbg.h
+DEP_dlx_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-dlx.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_frv_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-frv.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_frv_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-frv.h
+DEP_frv_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-frv.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 \
- dwarf2dbg.h
-
-DEP_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.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)/opcode/ia64.h $(INCDIR)/symcat.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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 \
- $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h
-DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.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)/elf-bfd.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(srcdir)/../opcodes/i386-opc.h $(INCDIR)/opcode/i386.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.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 \
- dwarf2dbg.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 $(srcdir)/../opcodes/i386-opc.h \
+ $(INCDIR)/opcode/i386.h dwarf2dbg.h $(srcdir)/config/obj-coff.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/x86_64.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_i960_coff = $(srcdir)/config/obj-coff.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 \
- dwarf2dbg.h
-
-DEP_ip2k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ip2k.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
-DEP_ip2k_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-ip2k.h \
- dwarf2dbg.h
-
-DEP_m32c_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32c.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h
-DEP_m32c_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-m32c.h \
- dwarf2dbg.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 $(INCDIR)/opcode/ia64.h \
+ $(INCDIR)/elf/ia64.h $(INCDIR)/elf/reloc-macros.h
-DEP_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+DEP_ip2k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ip2k.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 \
- dwarf2dbg.h
+DEP_m32c_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32c.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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_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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.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)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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_elf = $(srcdir)/config/obj-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_maxq_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-maxq.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/maxq.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_mcore_coff = $(srcdir)/config/obj-coff.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
+ $(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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h
+
+DEP_mep_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mep.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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 $(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 \
- dwarf2dbg.h
-
-DEP_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+DEP_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h
-DEP_mn10200_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 \
- dwarf2dbg.h
+DEP_mmix_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_msp430_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-msp430.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+DEP_msp430_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-msp430.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_msp430_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-msp430.h \
- dwarf2dbg.h
+DEP_mt_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mt.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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)/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 \
- dwarf2dbg.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 \
- dwarf2dbg.h
+DEP_openrisc_elf = $(srcdir)/config/obj-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 \
+ dwarf2dbg.h $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_or32_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-or32.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
-DEP_or32_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-or32.h \
- dwarf2dbg.h
+DEP_or32_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-or32.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/or32.h $(BFDDIR)/libcoff.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 \
- dwarf2dbg.h
-
-DEP_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+DEP_pdp11_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.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_s390_elf = $(srcdir)/config/obj-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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 \
- dwarf2dbg.h
+DEP_score_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-score.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
DEP_sh_coff = $(srcdir)/config/obj-coff.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
+ $(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_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_sh64_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-sh64.h \
- $(srcdir)/config/tc-sh.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/elf32-sh64.h
+DEP_sh64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh64.h $(srcdir)/config/tc-sh.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.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)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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 \
- dwarf2dbg.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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h
+
+DEP_spu_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-spu.h $(INCDIR)/opcode/spu.h \
+ $(INCDIR)/opcode/spu-insns.h dwarf2dbg.h $(srcdir)/config/obj-coff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.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)/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 \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_tic4x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic4x.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h \
- $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-
-DEP_tic4x_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-tic4x.h \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic4x.h $(INCDIR)/coff/ti.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_tic54x_coff = $(srcdir)/config/obj-coff.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
+ $(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_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 $(INCDIR)/elf/v850.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/obj-coff.h \
+ $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.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)/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 \
- dwarf2dbg.h
-
-DEP_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.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 \
- $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.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_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 dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.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 \
- dwarf2dbg.h
+DEP_xc16x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xc16x.h dwarf2dbg.h \
+ $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_xc16x_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-xc16x.h
+DEP_xstormy16_elf = $(srcdir)/config/obj-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 \
+ dwarf2dbg.h $(srcdir)/config/obj-coff.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h
-DEP_xtensa_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-xtensa.h \
- $(INCDIR)/xtensa-isa.h $(INCDIR)/xtensa-config.h
+DEP_xtensa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xtensa.h $(INCDIR)/xtensa-isa.h \
+ $(INCDIR)/xtensa-config.h
DEP_z80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z80.h \
- $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/z80.h \
- $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-
-DEP_z80_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-z80.h \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z80.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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 \
- dwarf2dbg.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
DEP_hppa_som = $(BFDDIR)/som.h
DEP_i386_multi = $(DEP_i386_aout) $(DEP_i386_coff) \
@@ -2489,15 +2139,15 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
+ cd $(srcdir) && $(AUTOMAKE) --cygnus \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
+ $(AUTOMAKE) --cygnus Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -2856,12 +2506,11 @@ po/POTFILES.in: @MAINT@ Makefile
diststuff: $(EXTRA_DIST) info
all: info
-$(OBJS): @ALL_OBJ_DEPS@
-
# Stuff that every object file depends upon. If anything is removed
# from this list, remove it from dep-in.sed as well.
-$(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/progress.h $(INCDIR)/fopen-same.h \
+$(OBJS): ../bfd/bfd.h $(INCDIR)/symcat.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/fopen-bin.h $(INCDIR)/fopen-vms.h \
$(OBJ_FORMAT_H) $(TARG_CPU_H) $(TARG_ENV_H) \
as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \
frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h
@@ -2901,18 +2550,16 @@ ecoff.o : ecoff.c ecoff.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
# We need all these explicit rules for the multi stuff. Because of
# these rules, we don't need one for OBJ_FORMAT_O.
-obj-aout.o : $(srcdir)/config/obj-aout.c
+obj-aout.o : $(srcdir)/config/obj-aout.c $(DEP_@target_cpu_type@_aout)
$(COMPILE) -c $(srcdir)/config/obj-aout.c
-obj-coff.o: $(srcdir)/config/obj-coff.c
+obj-coff.o: $(srcdir)/config/obj-coff.c $(DEP_@target_cpu_type@_coff)
$(COMPILE) -c $(srcdir)/config/obj-coff.c
-obj-ecoff.o : $(srcdir)/config/obj-ecoff.c
+obj-ecoff.o : $(srcdir)/config/obj-ecoff.c $(DEP_@target_cpu_type@_ecoff)
$(COMPILE) -c $(srcdir)/config/obj-ecoff.c
-obj-elf.o : $(srcdir)/config/obj-elf.c
+obj-elf.o : $(srcdir)/config/obj-elf.c $(DEP_@target_cpu_type@_elf)
$(COMPILE) -c $(srcdir)/config/obj-elf.c
obj-evax.o : $(srcdir)/config/obj-evax.c
$(COMPILE) -c $(srcdir)/config/obj-evax.c
-obj-ieee.o : $(srcdir)/config/obj-ieee.c
- $(COMPILE) -c $(srcdir)/config/obj-ieee.c
obj-multi.o : $(srcdir)/config/obj-multi.c
$(COMPILE) -c $(srcdir)/config/obj-multi.c
obj-som.o : $(srcdir)/config/obj-som.c
@@ -2959,7 +2606,7 @@ m68k-parse.c: $(srcdir)/config/m68k-parse.y
rm -f m68k-parse.y; \
else true; fi
# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
+# yacc will produce working code which contain compile time warnings.
m68k-parse.o: m68k-parse.c $(srcdir)/config/m68k-parse.h
$(COMPILE) -c $< $(NO_WERROR)
@@ -2986,12 +2633,12 @@ bfin-lex.o: bfin-lex.c bfin-parse.h $(srcdir)/config/bfin-defs.h
itbl-lex.c: $(srcdir)/itbl-lex.l
# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
+# yacc will produce working code which contain compile time warnings.
itbl-lex.o: itbl-lex.c itbl-parse.h $(srcdir)/itbl-lex.h
$(COMPILE) -c $< $(NO_WERROR)
# Disable -Werror, if it has been enabled, since old versions of bison/
-# yacc will produce working code which contain compile time warnings.
+# yacc will produce working code which contain compile time warnings.
itbl-parse.o: itbl-parse.c itbl-parse.h $(srcdir)/itbl-ops.h $(srcdir)/itbl-lex.h
$(COMPILE) -c $< $(NO_WERROR)
@@ -3319,66 +2966,52 @@ 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 $(INCDIR)/symcat.h
-as.o: as.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
- output-file.h sb.h macro.h dwarf2dbg.h dw2gencfi.h \
- $(INCDIR)/elf/dwarf2.h $(BFDVER_H)
-atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.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 $(INCDIR)/safe-ctype.h \
- dwarf2dbg.h $(INCDIR)/filenames.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/elf/dwarf2.h
-dw2gencfi.o: dw2gencfi.c $(INCDIR)/symcat.h dw2gencfi.h \
+app.o: app.c
+as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \
+ sb.h macro.h dwarf2dbg.h dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ ../bfd/bfdver.h
+atof-generic.o: atof-generic.c $(INCDIR)/safe-ctype.h
+cond.o: cond.c sb.h macro.h $(INCDIR)/obstack.h
+depend.o: depend.c
+dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/safe-ctype.h dwarf2dbg.h \
+ $(INCDIR)/filenames.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
-expr.o: expr.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
- $(INCDIR)/obstack.h
-flonum-copy.o: flonum-copy.c $(INCDIR)/symcat.h
+dw2gencfi.o: dw2gencfi.c dw2gencfi.h $(INCDIR)/elf/dwarf2.h \
+ subsegs.h $(INCDIR)/obstack.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)/safe-ctype.h $(INCDIR)/obstack.h
+flonum-copy.o: flonum-copy.c
flonum-konst.o: flonum-konst.c
flonum-mult.o: flonum-mult.c
-frags.o: frags.c $(INCDIR)/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)/obstack.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)/symcat.h $(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 \
- dw2gencfi.h $(INCDIR)/elf/dwarf2.h
-sb.o: sb.c sb.h $(INCDIR)/symcat.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
-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
+frags.o: frags.c subsegs.h $(INCDIR)/obstack.h
+hash.o: hash.c $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h
+input-file.o: input-file.c input-file.h $(INCDIR)/safe-ctype.h
+input-scrub.o: input-scrub.c input-file.h sb.h
+listing.o: listing.c $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
+ input-file.h subsegs.h
+literal.o: literal.c subsegs.h $(INCDIR)/obstack.h
+macro.o: macro.c $(INCDIR)/safe-ctype.h sb.h macro.h
+messages.o: messages.c
+output-file.o: output-file.c output-file.h
+read.o: read.c $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ sb.h macro.h ecoff.h dw2gencfi.h $(INCDIR)/elf/dwarf2.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)/safe-ctype.h $(INCDIR)/obstack.h \
+ subsegs.h struc-symbol.h
+write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \
+ dwarf2dbg.h $(BFDDIR)/libbfd.h $(INCDIR)/hashtab.h
+itbl-ops.o: itbl-ops.c itbl-ops.h
+e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h
+e-criself.o: $(srcdir)/config/e-criself.c emul-target.h
+e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h
+e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h
+e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h
+e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h
+e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h
$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
$(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@)
$(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@)
diff --git a/contrib/binutils/gas/NEWS b/contrib/binutils/gas/NEWS
index 4b4d029..bf278ef 100644
--- a/contrib/binutils/gas/NEWS
+++ b/contrib/binutils/gas/NEWS
@@ -1,4 +1,12 @@
-*- text -*-
+* Support for the National Semiconductor CR16 target has been added.
+
+* Added gas .reloc pseudo. This is a low-level interface for creating
+ relocations.
+
+* Add support for x86_64 PE+ target.
+
+* Add support for Score target.
* Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
diff --git a/contrib/binutils/gas/acinclude.m4 b/contrib/binutils/gas/acinclude.m4
index 0946e72..fa4c1bc 100644
--- a/contrib/binutils/gas/acinclude.m4
+++ b/contrib/binutils/gas/acinclude.m4
@@ -1,5 +1,3 @@
-sinclude(../bfd/warning.m4)
-
dnl GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
AC_DEFUN([GAS_CHECK_DECL_NEEDED],[
AC_MSG_CHECKING(whether declaration is required for $1)
@@ -56,19 +54,3 @@ for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
done
$1=[$]_gas_uniq_newlist
])dnl
-
-sinclude(../libtool.m4)
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_DEFUN([AC_CHECK_LIBM],)
-AC_SUBST(LIBTOOL)
-])
-
-sinclude(../gettext.m4)
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
-])
diff --git a/contrib/binutils/gas/aclocal.m4 b/contrib/binutils/gas/aclocal.m4
index cd42673..1182e36 100644
--- a/contrib/binutils/gas/aclocal.m4
+++ b/contrib/binutils/gas/aclocal.m4
@@ -480,27 +480,6 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
# Free Software Foundation, Inc.
#
@@ -910,4 +889,16 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
+m4_include([../bfd/acinclude.m4])
+m4_include([../bfd/warning.m4])
+m4_include([../config/depstand.m4])
+m4_include([../config/gettext-sister.m4])
+m4_include([../config/lead-dot.m4])
+m4_include([../config/nls.m4])
+m4_include([../config/po.m4])
+m4_include([../config/progtest.m4])
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
m4_include([acinclude.m4])
diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c
index 275ad68..e5f1778 100644
--- a/contrib/binutils/gas/app.c
+++ b/contrib/binutils/gas/app.c
@@ -1,6 +1,6 @@
/* This is the Assembler Pre-Processor
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003
+ 1999, 2000, 2001, 2002, 2003, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -21,13 +21,12 @@
02110-1301, USA. */
/* Modified by Allen Wirfs-Brock, Instantiations Inc 2/90. */
-/* App, the assembler pre-processor. This pre-processor strips out excess
- spaces, turns single-quoted characters into a decimal constant, and turns
- # <number> <filename> <garbage> into a .line <number>\n.file <filename>
- pair. This needs better error-handling. */
+/* App, the assembler pre-processor. This pre-processor strips out
+ excess spaces, turns single-quoted characters into a decimal
+ constant, and turns the # in # <number> <filename> <garbage> into a
+ .linefile. This needs better error-handling. */
-#include <stdio.h>
-#include "as.h" /* For BAD_CASE() only. */
+#include "as.h"
#if (__STDC__ != 1)
#ifndef const
@@ -352,11 +351,11 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
1: After first whitespace on line (flush more white)
2: After first non-white (opcode) on line (keep 1white)
3: after second white on line (into operands) (flush white)
- 4: after putting out a .line, put out digits
+ 4: after putting out a .linefile, put out digits
5: parsing a string, then go to old-state
6: putting out \ escape in a "d string.
- 7: After putting out a .appfile, put out string.
- 8: After putting out a .appfile string, flush until newline.
+ 7: no longer used
+ 8: no longer used
9: After seeing symbol char in state 3 (keep 1white after symchar)
10: After seeing whitespace in state 9 (keep white before symchar)
11: After seeing a symbol character in state 0 (eg a label definition)
@@ -511,14 +510,10 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
ch = GET ();
if (ch == '"')
{
- UNGET (ch);
- if (scrub_m68k_mri)
- out_string = "\n\tappfile ";
- else
- out_string = "\n\t.appfile ";
- old_state = 7;
- state = -1;
- PUT (*out_string++);
+ quotechar = ch;
+ state = 5;
+ old_state = 3;
+ PUT (ch);
}
else
{
@@ -555,6 +550,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
memcpy (to, from, len);
to += len;
from += len;
+ if (to >= toend)
+ goto tofull;
}
}
@@ -639,24 +636,6 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
PUT (ch);
continue;
- case 7:
- ch = GET ();
- quotechar = ch;
- state = 5;
- old_state = 8;
- PUT (ch);
- continue;
-
- case 8:
- do
- ch = GET ();
- while (ch != '\n' && ch != EOF);
- if (ch == EOF)
- goto fromeof;
- state = 0;
- PUT (ch);
- continue;
-
#ifdef DOUBLEBAR_PARALLEL
case 13:
ch = GET ();
@@ -888,9 +867,6 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
switch (state)
{
- case 0:
- state++;
- goto recycle; /* Punted leading sp */
case 1:
/* We can arrive here if we leave a leading whitespace
character at the beginning of a line. */
@@ -1200,9 +1176,9 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
old_state = 4;
state = -1;
if (scrub_m68k_mri)
- out_string = "\tappline ";
+ out_string = "\tlinefile ";
else
- out_string = "\t.appline ";
+ out_string = "\t.linefile ";
PUT (*out_string++);
break;
}
@@ -1245,6 +1221,15 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
if ((symver_state != NULL) && (*symver_state == 0))
goto de_fault;
#endif
+
+#ifdef TC_ARM
+ /* For the ARM, care is needed not to damage occurrences of \@
+ by stripping the @ onwards. Yuck. */
+ if (to > tostart && *(to - 1) == '\\')
+ /* Do not treat the @ as a start-of-comment. */
+ goto de_fault;
+#endif
+
#ifdef WARN_COMMENTS
if (!found_comment)
as_where (&found_comment_file, &found_comment);
@@ -1377,7 +1362,15 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
the space. We don't have enough information to
make the right choice, so here we are making the
choice which is more likely to be correct. */
- PUT (' ');
+ if (to + 1 >= toend)
+ {
+ /* If we're near the end of the buffer, save the
+ character for the next time round. Otherwise
+ we'll lose our state. */
+ UNGET (ch);
+ goto tofull;
+ }
+ *to++ = ' ';
}
state = 3;
diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c
index 727a1dd..b05f9d5 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, 2002, 2003, 2004, 2005
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -31,8 +31,6 @@
Since no-one else says they will support them in future: I
don't support them now. */
-#include "ansidecl.h"
-
#define COMMON
#include "as.h"
@@ -42,7 +40,6 @@
#include "macro.h"
#include "dwarf2dbg.h"
#include "dw2gencfi.h"
-#include "hash.h"
#include "bfdver.h"
#ifdef HAVE_ITBL_CPU
@@ -352,7 +349,9 @@ Options:\n\
md_show_usage (stream);
fputc ('\n', stream);
- fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
+
+ if (REPORT_BUGS_TO[0] && stream == stdout)
+ fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
}
/* Since it is easy to do here we interpret the special arg "-"
@@ -591,7 +590,7 @@ parse_args (int * pargc, char *** pargv)
case OPTION_VERSION:
/* This output is intended to follow the GNU standards document. */
printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
- printf (_("Copyright 2005 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2007 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"));
@@ -1032,6 +1031,33 @@ perform_an_assembly_pass (int argc, char ** argv)
read_a_source_file ("");
}
+#ifdef OBJ_ELF
+static void
+create_obj_attrs_section (void)
+{
+ segT s;
+ char *p;
+ addressT addr;
+ offsetT size;
+ const char *name;
+
+ size = bfd_elf_obj_attr_size (stdoutput);
+ if (size)
+ {
+ name = get_elf_backend_data (stdoutput)->obj_attrs_section;
+ if (!name)
+ name = ".gnu.attributes";
+ s = subseg_new (name, 0);
+ elf_section_type (s)
+ = get_elf_backend_data (stdoutput)->obj_attrs_section_type;
+ bfd_set_section_flags (stdoutput, s, SEC_READONLY | SEC_DATA);
+ addr = frag_now_fix ();
+ p = frag_more (size);
+ bfd_elf_set_obj_attr_contents (stdoutput, (bfd_byte *)p, size);
+ }
+}
+#endif
+
int
main (int argc, char ** argv)
@@ -1125,6 +1151,11 @@ main (int argc, char ** argv)
sym = symbol_new (defsyms->name, absolute_section, defsyms->value,
&zero_address_frag);
+ /* Make symbols defined on the command line volatile, so that they
+ can be redefined inside a source file. This makes this assembler's
+ behaviour compatible with earlier versions, but it may not be
+ completely intuitive. */
+ S_SET_VOLATILE (sym);
symbol_table_insert (sym);
next = defsyms->next;
free (defsyms);
@@ -1142,6 +1173,11 @@ main (int argc, char ** argv)
md_end ();
#endif
+#ifdef OBJ_ELF
+ if (IS_ELF)
+ create_obj_attrs_section ();
+#endif
+
#if defined OBJ_ELF || defined OBJ_MAYBE_ELF
if ((flag_execstack || flag_noexecstack)
&& OUTPUT_FLAVOR == bfd_target_elf_flavour)
diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h
index 2f92c2e..4ea63ab 100644
--- a/contrib/binutils/gas/as.h
+++ b/contrib/binutils/gas/as.h
@@ -1,6 +1,6 @@
/* as.h - global header file
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -37,7 +37,6 @@
If TEST is #defined, then we are testing a module: #define COMMON as "". */
#include "config.h"
-#include "bin-bugs.h"
/* This is the code recommended in the autoconf documentation, almost
verbatim. If it doesn't work for you, let me know, and notify
@@ -210,7 +209,7 @@ extern int vsnprintf(char *, size_t, const char *, va_list);
#endif /* __FILE__ */
#ifndef FOPEN_WB
-#if defined GO32 || defined __MINGW32__
+#ifdef USE_BINARY_FOPEN
#include "fopen-bin.h"
#else
#include "fopen-same.h"
@@ -259,7 +258,11 @@ typedef addressT valueT;
#endif
/* COMMON now defined */
-#ifdef DEBUG
+#ifndef ENABLE_CHECKING
+#define ENABLE_CHECKING 0
+#endif
+
+#if ENABLE_CHECKING || defined (DEBUG)
#ifndef know
#define know(p) assert(p) /* Verify our assumptions! */
#endif /* not yet defined */
@@ -544,7 +547,6 @@ void cond_finish_check (int);
void cond_exit_macro (int);
int seen_at_least_1_file (void);
void app_pop (char *);
-void as_perror (const char *, const char *);
void as_where (char **, unsigned int *);
void bump_line_counters (void);
void do_scrub_begin (int);
@@ -552,6 +554,7 @@ void input_scrub_begin (void);
void input_scrub_close (void);
void input_scrub_end (void);
int new_logical_line (char *, int);
+int new_logical_line_flags (char *, int, int);
void subsegs_begin (void);
void subseg_change (segT, int);
segT subseg_new (const char *, subsegT);
@@ -567,7 +570,6 @@ segT subseg_get (const char *, int);
struct expressionS;
struct fix;
typedef struct symbol symbolS;
-struct relax_type;
typedef struct frag fragS;
/* literal.c */
diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c
index 6a5c2f1..3021c4c 100644
--- a/contrib/binutils/gas/atof-generic.c
+++ b/contrib/binutils/gas/atof-generic.c
@@ -1,6 +1,6 @@
/* atof_generic.c - turn a string of digits into a Flonum
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000,
- 2001, 2003, 2005 Free Software Foundation, Inc.
+ 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,8 +19,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <string.h>
-
#include "as.h"
#include "safe-ctype.h"
diff --git a/contrib/binutils/gas/cgen.c b/contrib/binutils/gas/cgen.c
index 363c05e..5b0694b 100644
--- a/contrib/binutils/gas/cgen.c
+++ b/contrib/binutils/gas/cgen.c
@@ -1,6 +1,6 @@
/* GAS interface for targets using CGEN: Cpu tools GENerator.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+ 2006 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,16 +19,34 @@
Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
#include <setjmp.h>
-#include "ansidecl.h"
-#include "libiberty.h"
-#include "bfd.h"
+#include "as.h"
#include "symcat.h"
#include "cgen-desc.h"
-#include "as.h"
#include "subsegs.h"
#include "cgen.h"
#include "dwarf2dbg.h"
+#include "symbols.h"
+#include "struc-symbol.h"
+
+#ifdef OBJ_COMPLEX_RELC
+static expressionS * make_right_shifted_expr
+ (expressionS *, const int, const int);
+
+static unsigned long gas_cgen_encode_addend
+ (const unsigned long, const unsigned long, const unsigned long, \
+ const unsigned long, const unsigned long, const unsigned long, \
+ const unsigned long);
+
+static char * weak_operand_overflow_check
+ (const expressionS *, const CGEN_OPERAND *);
+
+static void queue_fixup_recursively
+ (const int, const int, expressionS *, \
+ const CGEN_MAYBE_MULTI_IFLD *, const int, const int);
+
+static int rightshift = 0;
+#endif
static void queue_fixup (int, int, expressionS *);
/* Opcode table descriptor, must be set by md_begin. */
@@ -66,6 +84,8 @@ struct fixup
int opindex;
int opinfo;
expressionS exp;
+ struct cgen_maybe_multi_ifield * field;
+ int msb_field_p;
};
static struct fixup fixups[GAS_CGEN_MAX_FIXUPS];
@@ -249,6 +269,8 @@ gas_cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offse
+ (int) operand->type));
fixP->fx_cgen.insn = insn;
fixP->fx_cgen.opinfo = opinfo;
+ fixP->fx_cgen.field = NULL;
+ fixP->fx_cgen.msb_field_p = 0;
return fixP;
}
@@ -287,10 +309,26 @@ gas_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
+ (int) operand->type));
fixP->fx_cgen.insn = insn;
fixP->fx_cgen.opinfo = opinfo;
+ fixP->fx_cgen.field = NULL;
+ fixP->fx_cgen.msb_field_p = 0;
return fixP;
}
+#ifdef OBJ_COMPLEX_RELC
+static symbolS *
+expr_build_binary (operatorT op, symbolS * s1, symbolS * s2)
+{
+ expressionS e;
+
+ e.X_op = op;
+ e.X_add_symbol = s1;
+ e.X_op_symbol = s2;
+ e.X_add_number = 0;
+ return make_expr_symbol (& e);
+}
+#endif
+
/* Used for communication between the next two procedures. */
static jmp_buf expr_jmp_buf;
static int expr_jmp_buf_p;
@@ -308,7 +346,12 @@ static int expr_jmp_buf_p;
const char *
gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
+
+#ifdef OBJ_COMPLEX_RELC
+ CGEN_CPU_DESC cd;
+#else
CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
+#endif
enum cgen_parse_operand_type want;
const char **strP;
int opindex;
@@ -329,6 +372,13 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
const char *errmsg;
expressionS exp;
+#ifdef OBJ_COMPLEX_RELC
+ volatile int signed_p = 0;
+ symbolS * stmp = NULL;
+ bfd_reloc_code_real_type reloc_type;
+ const CGEN_OPERAND * operand;
+ fixS dummy_fixup;
+#endif
if (want == CGEN_PARSE_OPERAND_INIT)
{
gas_cgen_init_parse ();
@@ -386,9 +436,82 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
break;
de_fault:
default:
+#ifdef OBJ_COMPLEX_RELC
+ /* Look up operand, check to see if there's an obvious
+ overflow (this helps disambiguate some insn parses). */
+ operand = cgen_operand_lookup_by_num (cd, opindex);
+ errmsg = weak_operand_overflow_check (& exp, operand);
+
+ if (! errmsg)
+ {
+ /* Fragment the expression as necessary, and queue a reloc. */
+ memset (& dummy_fixup, 0, sizeof (fixS));
+
+ reloc_type = md_cgen_lookup_reloc (0, operand, & dummy_fixup);
+
+ if (exp.X_op == O_symbol
+ && reloc_type == BFD_RELOC_RELC
+ && exp.X_add_symbol->sy_value.X_op == O_constant
+ && exp.X_add_symbol->bsym->section != expr_section
+ && exp.X_add_symbol->bsym->section != absolute_section
+ && exp.X_add_symbol->bsym->section != undefined_section)
+ {
+ /* Local labels will have been (eagerly) turned into constants
+ by now, due to the inappropriately deep insight of the
+ expression parser. Unfortunately make_expr_symbol
+ prematurely dives into the symbol evaluator, and in this
+ case it gets a bad answer, so we manually create the
+ expression symbol we want here. */
+ stmp = symbol_create (FAKE_LABEL_NAME, expr_section, 0,
+ & zero_address_frag);
+ symbol_set_value_expression (stmp, & exp);
+ }
+ else
+ stmp = make_expr_symbol (& exp);
+
+ /* If this is a pc-relative RELC operand, we
+ need to subtract "." from the expression. */
+ if (reloc_type == BFD_RELOC_RELC
+ && CGEN_OPERAND_ATTR_VALUE (operand, CGEN_OPERAND_PCREL_ADDR))
+ stmp = expr_build_binary (O_subtract, stmp, expr_build_dot ());
+
+ /* FIXME: this is not a perfect heuristic for figuring out
+ whether an operand is signed: it only works when the operand
+ is an immediate. it's not terribly likely that any other
+ values will be signed relocs, but it's possible. */
+ if (operand && (operand->hw_type == HW_H_SINT))
+ signed_p = 1;
+
+ if (stmp->bsym && (stmp->bsym->section == expr_section))
+ {
+ if (signed_p)
+ stmp->bsym->flags |= BSF_SRELC;
+ else
+ stmp->bsym->flags |= BSF_RELC;
+ }
+
+ /* Now package it all up for the fixup emitter. */
+ exp.X_op = O_symbol;
+ exp.X_op_symbol = 0;
+ exp.X_add_symbol = stmp;
+ exp.X_add_number = 0;
+
+ /* Re-init rightshift quantity, just in case. */
+ rightshift = operand->length;
+ queue_fixup_recursively (opindex, opinfo_1, & exp,
+ (reloc_type == BFD_RELOC_RELC) ?
+ & (operand->index_fields) : 0,
+ signed_p, -1);
+ }
+ * resultP = errmsg
+ ? CGEN_PARSE_OPERAND_RESULT_ERROR
+ : CGEN_PARSE_OPERAND_RESULT_QUEUED;
+ *valueP = 0;
+#else
queue_fixup (opindex, opinfo_1, &exp);
*valueP = 0;
*resultP = CGEN_PARSE_OPERAND_RESULT_QUEUED;
+#endif
break;
}
@@ -556,6 +679,8 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
insn, length, operand,
fixups[i].opinfo,
&fixups[i].exp);
+ fixP->fx_cgen.field = fixups[i].field;
+ fixP->fx_cgen.msb_field_p = fixups[i].msb_field_p;
if (result)
result->fixups[i] = fixP;
}
@@ -567,6 +692,167 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
}
}
+#ifdef OBJ_COMPLEX_RELC
+/* Queue many fixups, recursively. If the field is a multi-ifield,
+ repeatedly queue its sub-parts, right shifted to fit into the field (we
+ assume here multi-fields represent a left-to-right, MSB0-LSB0
+ reading). */
+
+static void
+queue_fixup_recursively (const int opindex,
+ const int opinfo,
+ expressionS * expP,
+ const CGEN_MAYBE_MULTI_IFLD * field,
+ const int signed_p,
+ const int part_of_multi)
+{
+ if (field && field->count)
+ {
+ int i;
+
+ for (i = 0; i < field->count; ++ i)
+ queue_fixup_recursively (opindex, opinfo, expP,
+ & (field->val.multi[i]), signed_p, i);
+ }
+ else
+ {
+ expressionS * new_exp = expP;
+
+#ifdef DEBUG
+ printf ("queueing fixup for field %s\n",
+ (field ? field->val.leaf->name : "??"));
+ print_symbol_value (expP->X_add_symbol);
+#endif
+ if (field && part_of_multi != -1)
+ {
+ rightshift -= field->val.leaf->length;
+
+ /* Shift reloc value by number of bits remaining after this
+ field. */
+ if (rightshift)
+ new_exp = make_right_shifted_expr (expP, rightshift, signed_p);
+ }
+
+ /* Truncate reloc values to length, *after* leftmost one. */
+ fixups[num_fixups].msb_field_p = (part_of_multi <= 0);
+ fixups[num_fixups].field = (CGEN_MAYBE_MULTI_IFLD *) field;
+
+ queue_fixup (opindex, opinfo, new_exp);
+ }
+}
+
+/* Encode the self-describing RELC reloc format's addend. */
+
+static unsigned long
+gas_cgen_encode_addend (const unsigned long start, /* in bits */
+ const unsigned long len, /* in bits */
+ const unsigned long oplen, /* in bits */
+ const unsigned long wordsz, /* in bytes */
+ const unsigned long chunksz, /* in bytes */
+ const unsigned long signed_p,
+ const unsigned long trunc_p)
+{
+ unsigned long res = 0L;
+
+ res |= start & 0x3F;
+ res |= (oplen & 0x3F) << 6;
+ res |= (len & 0x3F) << 12;
+ res |= (wordsz & 0xF) << 18;
+ res |= (chunksz & 0xF) << 22;
+ res |= (CGEN_INSN_LSB0_P ? 1 : 0) << 27;
+ res |= signed_p << 28;
+ res |= trunc_p << 29;
+
+ return res;
+}
+
+/* Purpose: make a weak check that the expression doesn't overflow the
+ operand it's to be inserted into.
+
+ Rationale: some insns used to use %operators to disambiguate during a
+ parse. when these %operators are translated to expressions by the macro
+ expander, the ambiguity returns. we attempt to disambiguate by field
+ size.
+
+ Method: check to see if the expression's top node is an O_and operator,
+ and the mask is larger than the operand length. This would be an
+ overflow, so signal it by returning an error string. Any other case is
+ ambiguous, so we assume it's OK and return NULL. */
+
+static char *
+weak_operand_overflow_check (const expressionS * exp,
+ const CGEN_OPERAND * operand)
+{
+ const unsigned long len = operand->length;
+ unsigned long mask;
+ unsigned long opmask = (((1L << (len - 1)) - 1) << 1) | 1;
+
+ if (!exp)
+ return NULL;
+
+ if (exp->X_op != O_bit_and)
+ {
+ /* Check for implicit overflow flag. */
+ if (CGEN_OPERAND_ATTR_VALUE
+ (operand, CGEN_OPERAND_RELOC_IMPLIES_OVERFLOW))
+ return _("a reloc on this operand implies an overflow");
+ return NULL;
+ }
+
+ mask = exp->X_add_number;
+
+ if (exp->X_add_symbol &&
+ exp->X_add_symbol->sy_value.X_op == O_constant)
+ mask |= exp->X_add_symbol->sy_value.X_add_number;
+
+ if (exp->X_op_symbol &&
+ exp->X_op_symbol->sy_value.X_op == O_constant)
+ mask |= exp->X_op_symbol->sy_value.X_add_number;
+
+ /* Want to know if mask covers more bits than opmask.
+ this is the same as asking if mask has any bits not in opmask,
+ or whether (mask & ~opmask) is nonzero. */
+ if (mask && (mask & ~opmask))
+ {
+#ifdef DEBUG
+ printf ("overflow: (mask = %8.8x, ~opmask = %8.8x, AND = %8.8x)\n",
+ mask, ~opmask, (mask & ~opmask));
+#endif
+ return _("operand mask overflow");
+ }
+
+ return NULL;
+}
+
+
+static expressionS *
+make_right_shifted_expr (expressionS * exp,
+ const int amount,
+ const int signed_p)
+{
+ symbolS * stmp = 0;
+ expressionS * new_exp;
+
+ stmp = expr_build_binary (O_right_shift,
+ make_expr_symbol (exp),
+ expr_build_uconstant (amount));
+
+ if (signed_p)
+ stmp->bsym->flags |= BSF_SRELC;
+ else
+ stmp->bsym->flags |= BSF_RELC;
+
+ /* Then wrap that in a "symbol expr" for good measure. */
+ new_exp = xmalloc (sizeof (expressionS));
+ memset (new_exp, 0, sizeof (expressionS));
+ new_exp->X_op = O_symbol;
+ new_exp->X_op_symbol = 0;
+ new_exp->X_add_symbol = stmp;
+ new_exp->X_add_number = 0;
+
+ return new_exp;
+}
+#endif
/* Apply a fixup to the object code. This is called for all the
fixups we generated by the call to fix_new_exp, above. In the call
above we used a reloc code which was the largest legal reloc code
@@ -605,6 +891,30 @@ gas_cgen_md_apply_fix (fixP, valP, seg)
bfd_reloc_code_real_type reloc_type;
CGEN_FIELDS *fields = alloca (CGEN_CPU_SIZEOF_FIELDS (cd));
const CGEN_INSN *insn = fixP->fx_cgen.insn;
+ int start;
+ int length;
+ int signed_p = 0;
+
+ if (fixP->fx_cgen.field)
+ {
+ /* Use the twisty little pointer path
+ back to the ifield if it exists. */
+ start = fixP->fx_cgen.field->val.leaf->start;
+ length = fixP->fx_cgen.field->val.leaf->length;
+ }
+ else
+ {
+ /* Or the far less useful operand-size guesstimate. */
+ start = operand->start;
+ length = operand->length;
+ }
+
+ /* FIXME: this is not a perfect heuristic for figuring out
+ whether an operand is signed: it only works when the operand
+ is an immediate. it's not terribly likely that any other
+ values will be signed relocs, but it's possible. */
+ if (operand && (operand->hw_type == HW_H_SINT))
+ signed_p = 1;
/* If the reloc has been fully resolved finish the operand here. */
/* FIXME: This duplicates the capabilities of code in BFD. */
@@ -647,6 +957,18 @@ gas_cgen_md_apply_fix (fixP, valP, seg)
partial_inplace == false. */
reloc_type = md_cgen_lookup_reloc (insn, operand, fixP);
+#ifdef OBJ_COMPLEX_RELC
+ if (reloc_type == BFD_RELOC_RELC)
+ {
+ /* Change addend to "self-describing" form,
+ for BFD to handle in the linker. */
+ value = gas_cgen_encode_addend (start, operand->length,
+ length, fixP->fx_size,
+ cd->insn_chunk_bitsize / 8,
+ signed_p,
+ ! (fixP->fx_cgen.msb_field_p));
+ }
+#endif
if (reloc_type != BFD_RELOC_NONE)
fixP->fx_r_type = reloc_type;
@@ -702,7 +1024,6 @@ gas_cgen_tc_gen_reloc (section, fixP)
fixS * fixP;
{
arelent *reloc;
-
reloc = (arelent *) xmalloc (sizeof (arelent));
reloc->howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
@@ -740,3 +1061,4 @@ gas_cgen_begin ()
else
cgen_clear_signed_overflow_ok (gas_cgen_cpu_desc);
}
+
diff --git a/contrib/binutils/gas/cond.c b/contrib/binutils/gas/cond.c
index d6c32ac..d76e4d9 100644
--- a/contrib/binutils/gas/cond.c
+++ b/contrib/binutils/gas/cond.c
@@ -1,6 +1,6 @@
/* cond.c - conditional assembly pseudo-ops, and .include
Copyright 1990, 1991, 1992, 1993, 1995, 1997, 1998, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2006 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -20,6 +20,7 @@
02110-1301, USA. */
#include "as.h"
+#include "sb.h"
#include "macro.h"
#include "obstack.h"
diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in
index b15d802..20d5df9 100644
--- a/contrib/binutils/gas/config.in
+++ b/contrib/binutils/gas/config.in
@@ -29,7 +29,11 @@
/* Supported emulations. */
#undef EMULATIONS
-/* Define to 1 if NLS is requested */
+/* Define if you want run-time sanity checks. */
+#undef ENABLE_CHECKING
+
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
#undef ENABLE_NLS
/* Define to 1 if you have `alloca', as a function or macro. */
@@ -39,12 +43,6 @@
*/
#undef HAVE_ALLOCA_H
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define to 1 if you have the `dcgettext' function. */
-#undef HAVE_DCGETTEXT
-
/* Is the prototype for getopt in <unistd.h> in the expected format? */
#undef HAVE_DECL_GETOPT
@@ -52,60 +50,24 @@
don't. */
#undef HAVE_DECL_VSNPRINTF
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
/* Define to 1 if you have the <errno.h> header file. */
#undef HAVE_ERRNO_H
-/* Define to 1 if you have the `getcwd' function. */
-#undef HAVE_GETCWD
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
-
-/* Define to 1 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
-
/* Define to 1 if you have the `remove' function. */
#undef HAVE_REMOVE
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
@@ -115,24 +77,12 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@@ -145,24 +95,16 @@
/* Define to 1 if you have the `unlink' function. */
#undef HAVE_UNLINK
-/* Define to 1 if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
-
/* Define to 1 if you have the <varargs.h> header file. */
#undef HAVE_VARARGS_H
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
-
/* Using i386 COFF? */
#undef I386COFF
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
/* Using m68k COFF? */
#undef M68KCOFF
@@ -217,9 +159,6 @@
/* generic support? */
#undef OBJ_MAYBE_GENERIC
-/* IEEE support? */
-#undef OBJ_MAYBE_IEEE
-
/* SOM support? */
#undef OBJ_MAYBE_SOM
@@ -282,6 +221,9 @@
/* Target vendor. */
#undef TARGET_VENDOR
+/* Use b modifier when opening binary files? */
+#undef USE_BINARY_FOPEN
+
/* Use emulation support? */
#undef USE_EMULATIONS
@@ -302,17 +244,8 @@
`char[]'. */
#undef YYTEXT_POINTER
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
-
-/* 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/gas/config/atof-vax.c b/contrib/binutils/gas/config/atof-vax.c
index 75756904..fe9f8b9 100644
--- a/contrib/binutils/gas/config/atof-vax.c
+++ b/contrib/binutils/gas/config/atof-vax.c
@@ -1,5 +1,5 @@
/* atof_vax.c - turn a Flonum into a VAX floating point number
- Copyright 1987, 1992, 1993, 1995, 1997, 1999, 2000, 2005
+ Copyright 1987, 1992, 1993, 1995, 1997, 1999, 2000, 2005, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -35,7 +35,7 @@ int flonum_gen2vax (int, FLONUM_TYPE *, LITTLENUM_TYPE *);
/* Number of chars in flonum type 'letter'. */
-static int
+static unsigned int
atof_vax_sizeof (int letter)
{
int return_value;
@@ -395,7 +395,7 @@ md_atof (int what_statement_type,
{
LITTLENUM_TYPE words[MAXIMUM_NUMBER_OF_LITTLENUMS];
char kind_of_float;
- int number_of_chars;
+ unsigned int number_of_chars;
LITTLENUM_TYPE *littlenumP;
switch (what_statement_type)
diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c
index a5a76ff..1ac8a13 100644
--- a/contrib/binutils/gas/config/obj-coff.c
+++ b/contrib/binutils/gas/config/obj-coff.c
@@ -1026,7 +1026,7 @@ weak_name2altname (const char * name)
}
/* Return the name of the weak symbol corresponding to an
- alterate symbol. */
+ alternate symbol. */
static const char *
weak_altname2name (const char * name)
@@ -1579,7 +1579,7 @@ obj_coff_section (int ignore ATTRIBUTE_UNUSED)
if (! load_removed)
flags |= SEC_LOAD;
/* Note - the READONLY flag is set here, even for the 'x'
- attrbiute in order to be compatible with the MSVC
+ attribute in order to be compatible with the MSVC
linker. */
if (! readonly_removed)
flags |= SEC_READONLY;
diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h
index 6fcbc9f..d2b2125 100644
--- a/contrib/binutils/gas/config/obj-coff.h
+++ b/contrib/binutils/gas/config/obj-coff.h
@@ -1,6 +1,6 @@
/* coff object file format
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GAS.
@@ -27,8 +27,6 @@
#include "targ-cpu.h"
-#include "bfd.h"
-
/* This internal_lineno crap is to stop namespace pollution from the
bfd internal coff headerfile. */
#define internal_lineno bfd_internal_lineno
@@ -57,16 +55,30 @@
#endif
#ifdef TC_I386
+#ifndef TE_PEP
+#include "coff/x86_64.h"
+#else
#include "coff/i386.h"
+#endif
#ifdef TE_PE
+#ifdef TE_PEP
+extern const char * x86_64_target_format (void);
+#define TARGET_FORMAT x86_64_target_format ()
+#define COFF_TARGET_FORMAT "pe-x86-64"
+#else
#define TARGET_FORMAT "pe-i386"
#endif
+#endif
#ifndef TARGET_FORMAT
+#ifdef TE_PEP
+#define TARGET_FORMAT "coff-x86-64"
+#else
#define TARGET_FORMAT "coff-i386"
#endif
#endif
+#endif
#ifdef TC_M68K
#include "coff/m68k.h"
diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c
index f922149..2f93990 100644
--- a/contrib/binutils/gas/config/obj-elf.c
+++ b/contrib/binutils/gas/config/obj-elf.c
@@ -1,6 +1,7 @@
/* ELF object file format
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -57,6 +58,10 @@
#include "elf/x86-64.h"
#endif
+#ifdef TC_MEP
+#include "elf/mep.h"
+#endif
+
static void obj_elf_line (int);
static void obj_elf_size (int);
static void obj_elf_type (int);
@@ -632,6 +637,11 @@ obj_elf_change_section (const char *name,
else if (attr == SHF_EXECINSTR
&& strcmp (name, ".note.GNU-stack") == 0)
override = TRUE;
+#ifdef TC_ALPHA
+ /* A section on Alpha may have SHF_ALPHA_GPREL. */
+ else if ((attr & ~ssect->attr) == SHF_ALPHA_GPREL)
+ override = TRUE;
+#endif
else
{
if (group_name == NULL)
@@ -1414,11 +1424,12 @@ obj_elf_version (int ignore ATTRIBUTE_UNUSED)
Elf_Internal_Note i_note;
Elf_External_Note e_note;
asection *note_secp = NULL;
- int len;
SKIP_WHITESPACE ();
if (*input_line_pointer == '\"')
{
+ unsigned int len;
+
++input_line_pointer; /* -> 1st char of string. */
name = input_line_pointer;
@@ -1429,19 +1440,19 @@ obj_elf_version (int ignore ATTRIBUTE_UNUSED)
*(input_line_pointer - 1) = '\0';
*input_line_pointer = c;
- /* create the .note section */
-
+ /* Create the .note section. */
note_secp = subseg_new (".note", 0);
bfd_set_section_flags (stdoutput,
note_secp,
SEC_HAS_CONTENTS | SEC_READONLY);
- /* process the version string */
-
- len = strlen (name);
+ /* Process the version string. */
+ len = strlen (name) + 1;
- i_note.namesz = ((len + 1) + 3) & ~3; /* round this to word boundary */
- i_note.descsz = 0; /* no description */
+ /* PR 3456: Although the name field is padded out to an 4-byte
+ boundary, the namesz field should not be adjusted. */
+ i_note.namesz = len;
+ i_note.descsz = 0; /* No description. */
i_note.type = NT_VERSION;
p = frag_more (sizeof (e_note.namesz));
md_number_to_chars (p, i_note.namesz, sizeof (e_note.namesz));
@@ -1449,17 +1460,16 @@ obj_elf_version (int ignore ATTRIBUTE_UNUSED)
md_number_to_chars (p, i_note.descsz, sizeof (e_note.descsz));
p = frag_more (sizeof (e_note.type));
md_number_to_chars (p, i_note.type, sizeof (e_note.type));
- p = frag_more (len + 1);
- strcpy (p, name);
+ p = frag_more (len);
+ memcpy (p, name, len);
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 ();
}
@@ -1684,6 +1694,9 @@ adjust_stab_sections (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
this at the moment, so we do it ourselves. We save the information
in the symbol. */
+#ifdef OBJ_MAYBE_ELF
+static
+#endif
void
elf_ecoff_set_ext (symbolS *sym, struct ecoff_extr *ext)
{
@@ -1978,6 +1991,7 @@ elf_frob_file (void)
bfd_set_section_size (stdoutput, s, size);
s->contents = (unsigned char *) frag_more (size);
frag_now->fr_fix = frag_now_fix_octets ();
+ frag_wane (frag_now);
}
#ifdef elf_tc_final_processing
diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h
index 7ff9ef0..29356ab 100644
--- a/contrib/binutils/gas/config/obj-elf.h
+++ b/contrib/binutils/gas/config/obj-elf.h
@@ -1,6 +1,6 @@
/* ELF object file format.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -34,8 +34,6 @@
#define OUTPUT_FLAVOR bfd_target_elf_flavour
#endif
-#include "bfd.h"
-
#define BYTES_IN_WORD 4 /* for now */
#include "bfd/elf-bfd.h"
@@ -83,15 +81,13 @@ struct elf_obj_sy
#define OBJ_SYMFIELD_TYPE struct elf_obj_sy
/* Symbol fields used by the ELF back end. */
-#define ELF_TARGET_SYMBOL_FIELDS int local:1;
+#define ELF_TARGET_SYMBOL_FIELDS unsigned int local:1;
/* Don't change this; change ELF_TARGET_SYMBOL_FIELDS instead. */
#ifndef TARGET_SYMBOL_FIELDS
#define TARGET_SYMBOL_FIELDS ELF_TARGET_SYMBOL_FIELDS
#endif
-/* #include "targ-cpu.h" */
-
#ifndef FALSE
#define FALSE 0
#define TRUE !FALSE
@@ -134,13 +130,6 @@ int elf_s_get_other (symbolS *);
extern asection *gdb_section;
-#ifndef obj_sec_set_private_data
-#define obj_sec_set_private_data(B, S) \
- if (! BFD_SEND ((B), _new_section_hook, ((B), (S)))) \
- as_fatal (_("can't allocate ELF private section data: %s"), \
- bfd_errmsg (bfd_get_error ()))
-#endif
-
#ifndef obj_frob_file
#define obj_frob_file elf_frob_file
#endif
@@ -247,6 +236,7 @@ extern void elf_pop_insert (void);
#endif
#ifndef OBJ_MAYBE_ELF
+/* If OBJ_MAYBE_ELF then obj-multi.h will define obj_ecoff_set_ext. */
#define obj_ecoff_set_ext elf_ecoff_set_ext
struct ecoff_extr;
extern void elf_ecoff_set_ext (symbolS *, struct ecoff_extr *);
diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c
deleted file mode 100644
index bac4675..0000000
--- a/contrib/binutils/gas/config/obj-ieee.c
+++ /dev/null
@@ -1,613 +0,0 @@
-/* obj-format for ieee-695 records.
- Copyright 1991, 1992, 1993, 1994, 1997, 2000, 2001, 2002, 2003, 2005
- Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-/* Created by Steve Chamberlain <steve@cygnus.com>. */
-
-/* This will hopefully become the port through which bfd and gas talk,
- for the moment, only ieee is known to work well. */
-
-#include "bfd.h"
-#include "as.h"
-#include "subsegs.h"
-#include "output-file.h"
-#include "frags.h"
-
-bfd *abfd;
-
-/* How many addresses does the .align take? */
-
-static relax_addressT
-relax_align (address, alignment)
- /* Address now. */
- register relax_addressT address;
-
- /* Alignment (binary). */
- register long alignment;
-{
- relax_addressT mask;
- relax_addressT new_address;
-
- mask = ~((~0) << alignment);
- new_address = (address + mask) & (~mask);
- return (new_address - address);
-}
-
-/* Calculate the size of the frag chain
- and create a bfd section to contain all of it. */
-
-static void
-size_section (abfd, idx)
- bfd *abfd;
- unsigned int idx;
-{
- asection *sec;
- unsigned int size = 0;
- fragS *frag = segment_info[idx].frag_root;
-
- while (frag)
- {
- if (frag->fr_address != size)
- {
- printf (_("Out of step\n"));
- size = frag->fr_address;
- }
- size += frag->fr_fix;
- switch (frag->fr_type)
- {
- case rs_fill:
- case rs_org:
- size += frag->fr_offset * frag->fr_var;
- break;
- case rs_align:
- case rs_align_code:
- {
- addressT off;
-
- off = relax_align (size, frag->fr_offset);
- if (frag->fr_subtype != 0 && off > frag->fr_subtype)
- off = 0;
- size += off;
- }
- }
- frag = frag->fr_next;
- }
- if (size)
- {
- char *name = segment_info[idx].name;
-
- if (name == (char *) NULL)
- name = ".data";
-
- segment_info[idx].user_stuff =
- (char *) (sec = bfd_make_section (abfd, name));
- /* Make it output through itself. */
- sec->output_section = sec;
- sec->flags |= SEC_HAS_CONTENTS;
- bfd_set_section_size (abfd, sec, size);
- }
-}
-
-/* Run through a frag chain and write out the data to go with it. */
-
-static void
-fill_section (abfd, idx)
- bfd *abfd;
- unsigned int idx;
-{
- asection *sec = segment_info[idx].user_stuff;
-
- if (sec)
- {
- fragS *frag = segment_info[idx].frag_root;
- unsigned int offset = 0;
- while (frag)
- {
- unsigned int fill_size;
- unsigned int count;
- switch (frag->fr_type)
- {
- case rs_fill:
- case rs_align:
- case rs_org:
- if (frag->fr_fix)
- {
- bfd_set_section_contents (abfd,
- sec,
- frag->fr_literal,
- frag->fr_address,
- frag->fr_fix);
- }
- offset += frag->fr_fix;
- fill_size = frag->fr_var;
- if (fill_size)
- {
- unsigned int off = frag->fr_fix;
- for (count = frag->fr_offset; count; count--)
- {
- bfd_set_section_contents (abfd, sec,
- frag->fr_literal +
- frag->fr_fix,
- frag->fr_address + off,
- fill_size);
- off += fill_size;
- }
- }
- break;
- default:
- abort ();
- }
- frag = frag->fr_next;
- }
- }
-}
-
-/* Count the relocations in a chain. */
-
-static unsigned int
-count_entries_in_chain (idx)
- unsigned int idx;
-{
- unsigned int nrelocs;
- fixS *fixup_ptr;
-
- /* Count the relocations. */
- fixup_ptr = segment_info[idx].fix_root;
- nrelocs = 0;
- while (fixup_ptr != (fixS *) NULL)
- {
- fixup_ptr = fixup_ptr->fx_next;
- nrelocs++;
- }
- return nrelocs;
-}
-
-/* Output all the relocations for a section. */
-
-void
-do_relocs_for (idx)
- unsigned int idx;
-{
- unsigned int nrelocs;
- arelent **reloc_ptr_vector;
- arelent *reloc_vector;
- asymbol **ptrs;
- asection *section = (asection *) (segment_info[idx].user_stuff);
- unsigned int i;
- fixS *from;
-
- if (section)
- {
- nrelocs = count_entries_in_chain (idx);
-
- reloc_ptr_vector =
- (arelent **) malloc ((nrelocs + 1) * sizeof (arelent *));
- reloc_vector = (arelent *) malloc (nrelocs * sizeof (arelent));
- ptrs = (asymbol **) malloc (nrelocs * sizeof (asymbol *));
- from = segment_info[idx].fix_root;
- for (i = 0; i < nrelocs; i++)
- {
- arelent *to = reloc_vector + i;
- asymbol *s;
- reloc_ptr_vector[i] = to;
- to->howto = (reloc_howto_type *) (from->fx_r_type);
-
- s = &(from->fx_addsy->sy_symbol.sy);
- to->address = ((char *) (from->fx_frag->fr_address +
- from->fx_where))
- - ((char *) (&(from->fx_frag->fr_literal)));
- to->addend = from->fx_offset;
- /* If we know the symbol which we want to relocate to, turn
- this reloaction into a section relative.
-
- If this relocation is pcrelative, and we know the
- destination, we still want to keep the relocation - since
- the linker might relax some of the bytes, but it stops
- being pc relative and turns into an absolute relocation. */
- if (s)
- {
- if ((s->flags & BSF_UNDEFINED) == 0)
- {
- to->section = s->section;
-
- /* We can refer directly to the value field here,
- rather than using S_GET_VALUE, because this is
- only called after do_symbols, which sets up the
- value field. */
- to->addend += s->value;
-
- to->sym_ptr_ptr = 0;
- if (to->howto->pcrel_offset)
- /* This is a pcrel relocation, the addend should
- be adjusted. */
- to->addend -= to->address + 1;
- }
- else
- {
- to->section = 0;
- *ptrs = &(from->fx_addsy->sy_symbol.sy);
- to->sym_ptr_ptr = ptrs;
-
- if (to->howto->pcrel_offset)
- /* This is a pcrel relocation, the addend should
- be adjusted. */
- to->addend -= to->address - 1;
- }
- }
- else
- to->section = 0;
-
- ptrs++;
- from = from->fx_next;
- }
-
- /* Attach to the section. */
- section->orelocation = reloc_ptr_vector;
- section->reloc_count = nrelocs;
- section->flags |= SEC_LOAD;
- }
-}
-
-/* Do the symbols. */
-
-static void
-do_symbols (abfd)
- bfd *abfd;
-{
- extern symbolS *symbol_rootP;
- symbolS *ptr;
- asymbol **symbol_ptr_vec;
- asymbol *symbol_vec;
- unsigned int count = 0;
- unsigned int index;
-
- for (ptr = symbol_rootP;
- ptr != (symbolS *) NULL;
- ptr = ptr->sy_next)
- {
- if (SEG_NORMAL (ptr->sy_symbol.seg))
- {
- ptr->sy_symbol.sy.section =
- (asection *) (segment_info[ptr->sy_symbol.seg].user_stuff);
- S_SET_VALUE (ptr, S_GET_VALUE (ptr));
- if (ptr->sy_symbol.sy.flags == 0)
- ptr->sy_symbol.sy.flags = BSF_LOCAL;
- }
- else
- {
- switch (ptr->sy_symbol.seg)
- {
- case SEG_ABSOLUTE:
- ptr->sy_symbol.sy.flags |= BSF_ABSOLUTE;
- ptr->sy_symbol.sy.section = 0;
- break;
- case SEG_UNKNOWN:
- ptr->sy_symbol.sy.flags = BSF_UNDEFINED;
- ptr->sy_symbol.sy.section = 0;
- break;
- default:
- abort ();
- }
- }
- ptr->sy_symbol.sy.value = S_GET_VALUE (ptr);
- count++;
- }
- symbol_ptr_vec = (asymbol **) malloc ((count + 1) * sizeof (asymbol *));
-
- index = 0;
- for (ptr = symbol_rootP;
- ptr != (symbolS *) NULL;
- ptr = ptr->sy_next)
- {
- symbol_ptr_vec[index] = &(ptr->sy_symbol.sy);
- index++;
- }
- symbol_ptr_vec[index] = 0;
- abfd->outsymbols = symbol_ptr_vec;
- abfd->symcount = count;
-}
-
-/* The generic as->bfd converter. Other backends may have special case
- code. */
-
-void
-bfd_as_write_hook ()
-{
- int i;
-
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- size_section (abfd, i);
-
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- fill_section (abfd, i);
-
- do_symbols (abfd);
-
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- do_relocs_for (i);
-}
-
-S_SET_SEGMENT (x, y)
- symbolS *x;
- int y;
-{
- x->sy_symbol.seg = y;
-}
-
-S_IS_DEFINED (x)
- symbolS *x;
-{
- if (SEG_NORMAL (x->sy_symbol.seg))
- {
- return 1;
- }
- switch (x->sy_symbol.seg)
- {
- case SEG_UNKNOWN:
- return 0;
- default:
- abort ();
- }
-}
-
-S_IS_EXTERNAL (x)
-{
- abort ();
-}
-
-S_GET_DESC (x)
-{
- abort ();
-}
-
-S_GET_SEGMENT (x)
- symbolS *x;
-{
- return x->sy_symbol.seg;
-}
-
-S_SET_EXTERNAL (x)
- symbolS *x;
-{
- x->sy_symbol.sy.flags |= BSF_GLOBAL | BSF_EXPORT;
-}
-
-S_SET_NAME (x, y)
- symbolS *x;
- char *y;
-{
- x->sy_symbol.sy.name = y;
-}
-
-S_GET_OTHER (x)
-{
- abort ();
-}
-
-S_IS_DEBUG (x)
-{
- abort ();
-}
-
-#ifndef segment_name
-char *
-segment_name ()
-{
- abort ();
-}
-#endif
-
-void
-obj_read_begin_hook ()
-{
-}
-
-static void
-obj_ieee_section (ignore)
- int ignore;
-{
- extern char *input_line_pointer;
- extern char is_end_of_line[];
- char *p = input_line_pointer;
- char *s = p;
- int i;
-
- /* Look up the name, if it doesn't exist, make it. */
- while (*p && *p != ' ' && *p != ',' && !is_end_of_line[*p])
- {
- p++;
- }
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- if (segment_info[i].hadone)
- {
- if (strncmp (segment_info[i].name, s, p - s) == 0)
- goto ok;
- }
- else
- break;
- }
- if (i == SEG_UNKNOWN)
- {
- as_bad (_("too many sections"));
- return;
- }
-
- segment_info[i].hadone = 1;
- segment_info[i].name = malloc (p - s + 1);
- memcpy (segment_info[i].name, s, p - s);
- segment_info[i].name[p - s] = 0;
-ok:
- subseg_set (i, 0);
- while (!is_end_of_line[*p])
- p++;
- input_line_pointer = p;
-}
-
-const pseudo_typeS obj_pseudo_table[] =
-{
- {"section", obj_ieee_section, 0},
- {"data.b" , cons , 1},
- {"data.w" , cons , 2},
- {"data.l" , cons , 4},
- {"export" , s_globl , 0},
- {"option" , s_ignore , 0},
- {"end" , s_ignore , 0},
- {"import" , s_ignore , 0},
- {"sdata" , stringer , 0},
- 0,
-};
-
-void
-obj_symbol_new_hook (symbolP)
- symbolS *symbolP;
-{
- symbolP->sy_symbol.sy.the_bfd = abfd;
-}
-
-#if 1
-
-#ifndef SUB_SEGMENT_ALIGN
-#ifdef HANDLE_ALIGN
-/* The last subsegment gets an alignment corresponding to the alignment
- of the section. This allows proper nop-filling at the end of
- code-bearing sections. */
-#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
- (!(FRCHAIN)->frch_next || (FRCHAIN)->frch_next->frch_seg != (SEG) \
- ? get_recorded_alignment (SEG) : 0)
-#else
-#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 2
-#endif
-#endif
-
-extern void
-write_object_file ()
-{
- int i;
- struct frchain *frchain_ptr;
- struct frag *frag_ptr;
-
- abfd = bfd_openw (out_file_name, "ieee");
-
- if (abfd == 0)
- {
- as_perror (_("FATAL: Can't create %s"), out_file_name);
- exit (EXIT_FAILURE);
- }
- bfd_set_format (abfd, bfd_object);
- bfd_set_arch_mach (abfd, bfd_arch_h8300, 0);
- subseg_set (1, 0);
- subseg_set (2, 0);
- subseg_set (3, 0);
-
- /* Run through all the sub-segments and align them up. Also
- close any open frags. We tack a .fill onto the end of the
- frag chain so that any .align's size can be worked by looking
- at the next frag. */
- for (frchain_ptr = frchain_root;
- frchain_ptr != (struct frchain *) NULL;
- frchain_ptr = frchain_ptr->frch_next)
- {
- int alignment;
-
- subseg_set (frchain_ptr->frch_seg, frchain_ptr->frch_subseg);
-
- alignment = SUB_SEGMENT_ALIGN (now_seg, frchain_ptr)
-
-#ifdef md_do_align
- md_do_align (alignment, (char *) NULL, 0, 0, alignment_done);
-#endif
- if (subseg_text_p (now_seg))
- frag_align_code (alignment, 0);
- else
- frag_align (alignment, 0, 0);
-
-#ifdef md_do_align
- alignment_done:
-#endif
-
- frag_wane (frag_now);
- frag_now->fr_fix = 0;
- know (frag_now->fr_next == NULL);
- }
-
- /* Now build one big frag chain for each segment, linked through
- fr_next. */
- for (i = SEG_E0; i < SEG_UNKNOWN; i++)
- {
- fragS **prev_frag_ptr_ptr;
- struct frchain *next_frchain_ptr;
-
- segment_info[i].frag_root = segment_info[i].frchainP->frch_root;
- }
-
- 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 ();
- bfd_close (abfd);
-}
-
-#endif
-
-H_SET_TEXT_SIZE (a, b)
-{
- abort ();
-}
-
-H_GET_TEXT_SIZE ()
-{
- abort ();
-}
-
-H_SET_BSS_SIZE ()
-{
- abort ();
-}
-
-H_SET_STRING_SIZE ()
-{
- abort ();
-}
-
-H_SET_RELOCATION_SIZE ()
-{
- abort ();
-}
-
-H_SET_MAGIC_NUMBER ()
-{
- abort ();
-}
-
-H_GET_FILE_SIZE ()
-{
- abort ();
-}
-
-H_GET_TEXT_RELOCATION_SIZE ()
-{
- abort ();
-}
diff --git a/contrib/binutils/gas/config/obj-ieee.h b/contrib/binutils/gas/config/obj-ieee.h
deleted file mode 100644
index 2965429..0000000
--- a/contrib/binutils/gas/config/obj-ieee.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* This file is obj-ieee.h
- Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000, 2002, 2003
- Free Software Foundation, Inc.
-
- This file is part of GAS, the GNU Assembler.
-
- GAS is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- GAS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with GAS; see the file COPYING. If not, write to the Free
- Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-
-#include "bfd.h"
-
-typedef struct
-{
- asymbol sy;
- int seg;
-}
-obj_symbol_type;
-
-#define S_GET_NAME(s) (((s)->sy_symbol.sy.name))
-
-/* Return true for symbols that should not be reduced to section
- symbols or eliminated from expressions, because they may be
- overridden by the linker. */
-#define S_FORCE_RELOC(s, strict) (!SEG_NORMAL (x->sy_symbol.seg))
-
-typedef struct
- {
- int x;
- }
-object_headers;
-
-int lineno_rootP;
-
-#define IEEE_STYLE
diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c
index 3765b08..e8f0bad 100644
--- a/contrib/binutils/gas/config/tc-alpha.c
+++ b/contrib/binutils/gas/config/tc-alpha.c
@@ -1,6 +1,6 @@
/* tc-alpha.c - Processor-specific code for the DEC Alpha AXP CPU.
Copyright 1989, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Contributed by Carnegie Mellon University, 1993.
Written by Alessandro Forin, based on earlier gas-1.38 target CPU files.
Modified by Ken Raeburn for gas-2.x and ECOFF support.
@@ -2383,15 +2383,15 @@ emit_ustX (const expressionS *tok,
newtok[2] = newtok[0];
assemble_tokens ("or", newtok, 3, 1);
- /* Emit "stq_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 ("stq_u", newtok, 3, 1);
-
/* Emit "stq_u $t10, size-1($at)". */
set_tok_reg (newtok[0], AXP_REG_T10);
set_tok_const (newtok[1], (1 << lgsize) - 1);
+ set_tok_preg (newtok[2], AXP_REG_AT);
+ assemble_tokens ("stq_u", newtok, 3, 1);
+
+ /* Emit "stq_u $t9, 0($at)". */
+ set_tok_reg (newtok[0], AXP_REG_T9);
+ set_tok_const (newtok[1], 0);
assemble_tokens ("stq_u", newtok, 3, 1);
}
diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h
index 42e004e..d28ab9f 100644
--- a/contrib/binutils/gas/config/tc-alpha.h
+++ b/contrib/binutils/gas/config/tc-alpha.h
@@ -1,6 +1,6 @@
/* This file is tc-alpha.h
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- 2005
+ 2005, 2006
Free Software Foundation, Inc.
Written by Ken Raeburn <raeburn@cygnus.com>.
@@ -180,4 +180,4 @@ extern void alpha_cfi_frame_initial_instructions (void);
#define DWARF2_LINE_MIN_INSN_LENGTH 4
#define DWARF2_DEFAULT_RETURN_COLUMN 26
-#define DWARF2_CIE_DATA_ALIGNMENT -8
+#define DWARF2_CIE_DATA_ALIGNMENT (-8)
diff --git a/contrib/binutils/gas/config/tc-arc.c b/contrib/binutils/gas/config/tc-arc.c
index 525b540..490f327 100644
--- a/contrib/binutils/gas/config/tc-arc.c
+++ b/contrib/binutils/gas/config/tc-arc.c
@@ -20,8 +20,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <stdio.h>
-#include "libiberty.h"
#include "as.h"
#include "struc-symbol.h"
#include "safe-ctype.h"
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c
index ae420b3..683e6ee 100644
--- a/contrib/binutils/gas/config/tc-arm.c
+++ b/contrib/binutils/gas/config/tc-arm.c
@@ -1,6 +1,6 @@
/* tc-arm.c -- Assemble for the ARM
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005
+ 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -25,28 +25,24 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <string.h>
+#include <limits.h>
+#include <stdarg.h>
#define NO_RELOC 0
#include "as.h"
#include "safe-ctype.h"
-
-/* Need TARGET_CPU. */
-#include "config.h"
#include "subsegs.h"
#include "obstack.h"
-#include "symbols.h"
-#include "listing.h"
#include "opcode/arm.h"
#ifdef OBJ_ELF
#include "elf/arm.h"
-#include "dwarf2dbg.h"
#include "dw2gencfi.h"
#endif
-/* XXX Set this to 1 after the next binutils release. */
-#define WARN_DEPRECATED 0
+#include "dwarf2dbg.h"
+
+#define WARN_DEPRECATED 1
#ifdef OBJ_ELF
/* Must be at least the size of the largest unwind opcode (currently two). */
@@ -90,6 +86,15 @@ static unsigned int marked_pr_dependency = 0;
#endif /* OBJ_ELF */
+/* Results from operand parsing worker functions. */
+
+typedef enum
+{
+ PARSE_OPERAND_SUCCESS,
+ PARSE_OPERAND_FAIL,
+ PARSE_OPERAND_FAIL_NO_BACKTRACK
+} parse_operand_result;
+
enum arm_float_abi
{
ARM_FLOAT_ABI_HARD,
@@ -150,11 +155,14 @@ static const arm_feature_set *mcpu_fpu_opt = NULL;
static const arm_feature_set *march_cpu_opt = NULL;
static const arm_feature_set *march_fpu_opt = NULL;
static const arm_feature_set *mfpu_opt = NULL;
+static const arm_feature_set *object_arch = NULL;
/* Constants for known architecture features. */
static const arm_feature_set fpu_default = FPU_DEFAULT;
static const arm_feature_set fpu_arch_vfp_v1 = FPU_ARCH_VFP_V1;
static const arm_feature_set fpu_arch_vfp_v2 = FPU_ARCH_VFP_V2;
+static const arm_feature_set fpu_arch_vfp_v3 = FPU_ARCH_VFP_V3;
+static const arm_feature_set fpu_arch_neon_v1 = FPU_ARCH_NEON_V1;
static const arm_feature_set fpu_arch_fpa = FPU_ARCH_FPA;
static const arm_feature_set fpu_any_hard = FPU_ANY_HARD;
static const arm_feature_set fpu_arch_maverick = FPU_ARCH_MAVERICK;
@@ -194,6 +202,8 @@ static const arm_feature_set arm_arch_full = ARM_FEATURE (-1, -1);
static const arm_feature_set arm_arch_t2 = ARM_ARCH_THUMB2;
static const arm_feature_set arm_arch_none = ARM_ARCH_NONE;
+static const arm_feature_set arm_cext_iwmmxt2 =
+ ARM_FEATURE (0, ARM_CEXT_IWMMXT2);
static const arm_feature_set arm_cext_iwmmxt =
ARM_FEATURE (0, ARM_CEXT_IWMMXT);
static const arm_feature_set arm_cext_xscale =
@@ -206,6 +216,10 @@ static const arm_feature_set fpu_vfp_ext_v1xd =
ARM_FEATURE (0, FPU_VFP_EXT_V1xD);
static const arm_feature_set fpu_vfp_ext_v1 = ARM_FEATURE (0, FPU_VFP_EXT_V1);
static const arm_feature_set fpu_vfp_ext_v2 = ARM_FEATURE (0, FPU_VFP_EXT_V2);
+static const arm_feature_set fpu_vfp_ext_v3 = ARM_FEATURE (0, FPU_VFP_EXT_V3);
+static const arm_feature_set fpu_neon_ext_v1 = ARM_FEATURE (0, FPU_NEON_EXT_V1);
+static const arm_feature_set fpu_vfp_v3_or_neon_ext =
+ ARM_FEATURE (0, FPU_NEON_EXT_V1 | FPU_VFP_EXT_V3);
static int mfloat_abi_opt = -1;
/* Record user cpu selection for object attributes. */
@@ -218,6 +232,12 @@ static int meabi_flags = EABI_DEFAULT;
# else
static int meabi_flags = EF_ARM_EABI_UNKNOWN;
# endif
+
+bfd_boolean
+arm_is_eabi(void)
+{
+ return (EF_ARM_EABI_VERSION (meabi_flags) >= EF_ARM_EABI_VER4);
+}
#endif
#ifdef OBJ_ELF
@@ -256,6 +276,31 @@ static int thumb_mode = 0;
static bfd_boolean unified_syntax = FALSE;
+enum neon_el_type
+{
+ NT_invtype,
+ NT_untyped,
+ NT_integer,
+ NT_float,
+ NT_poly,
+ NT_signed,
+ NT_unsigned
+};
+
+struct neon_type_el
+{
+ enum neon_el_type type;
+ unsigned size;
+};
+
+#define NEON_MAX_TYPE_ELS 4
+
+struct neon_type
+{
+ struct neon_type_el el[NEON_MAX_TYPE_ELS];
+ unsigned elems;
+};
+
struct arm_it
{
const char * error;
@@ -263,6 +308,11 @@ struct arm_it
int size;
int size_req;
int cond;
+ /* "uncond_value" is set to the value in place of the conditional field in
+ unconditional versions of the instruction, or -1 if nothing is
+ appropriate. */
+ int uncond_value;
+ struct neon_type vectype;
/* Set to the opcode if the instruction needs relaxation.
Zero if the instruction is not relaxed. */
unsigned long relax;
@@ -277,9 +327,19 @@ struct arm_it
{
unsigned reg;
signed int imm;
+ struct neon_type_el vectype;
unsigned present : 1; /* Operand present. */
unsigned isreg : 1; /* Operand was a register. */
unsigned immisreg : 1; /* .imm field is a second register. */
+ unsigned isscalar : 1; /* Operand is a (Neon) scalar. */
+ unsigned immisalign : 1; /* Immediate is an alignment specifier. */
+ unsigned immisfloat : 1; /* Immediate was parsed as a float. */
+ /* Note: we abuse "regisimm" to mean "is Neon register" in VMOV
+ instructions. This allows us to disambiguate ARM <-> vector insns. */
+ unsigned regisimm : 1; /* 64-bit immediate, reg forms high 32 bits. */
+ unsigned isvec : 1; /* Is a single, double or quad VFP/Neon reg. */
+ unsigned isquad : 1; /* Operand is Neon quad-precision register. */
+ unsigned issingle : 1; /* Operand is VFP single-precision register. */
unsigned hasreloc : 1; /* Operand has relocation suffix. */
unsigned writeback : 1; /* Operand has trailing ! */
unsigned preind : 1; /* Preindexed address. */
@@ -355,9 +415,10 @@ struct reloc_entry
bfd_reloc_code_real_type reloc;
};
-enum vfp_sp_reg_pos
+enum vfp_reg_pos
{
- VFP_REG_Sd, VFP_REG_Sm, VFP_REG_Sn
+ VFP_REG_Sd, VFP_REG_Sm, VFP_REG_Sn,
+ VFP_REG_Dd, VFP_REG_Dm, VFP_REG_Dn
};
enum vfp_ldstm_type
@@ -365,6 +426,17 @@ enum vfp_ldstm_type
VFP_LDSTMIA, VFP_LDSTMDB, VFP_LDSTMIAX, VFP_LDSTMDBX
};
+/* Bits for DEFINED field in neon_typed_alias. */
+#define NTA_HASTYPE 1
+#define NTA_HASINDEX 2
+
+struct neon_typed_alias
+{
+ unsigned char defined;
+ unsigned char index;
+ struct neon_type_el eltype;
+};
+
/* ARM register categories. This includes coprocessor numbers and various
architecture extensions' registers. */
enum arm_reg_type
@@ -375,6 +447,10 @@ enum arm_reg_type
REG_TYPE_FN,
REG_TYPE_VFS,
REG_TYPE_VFD,
+ REG_TYPE_NQ,
+ REG_TYPE_VFSD,
+ REG_TYPE_NDQ,
+ REG_TYPE_NSDQ,
REG_TYPE_VFC,
REG_TYPE_MVF,
REG_TYPE_MVD,
@@ -388,13 +464,17 @@ enum arm_reg_type
REG_TYPE_XSCALE,
};
-/* Structure for a hash table entry for a register. */
+/* Structure for a hash table entry for a register.
+ If TYPE is REG_TYPE_VFD or REG_TYPE_NQ, the NEON field can point to extra
+ information which states whether a vector type or index is specified (for a
+ register alias created with .dn or .qn). Otherwise NEON should be NULL. */
struct reg_entry
{
- const char *name;
- unsigned char number;
- unsigned char type;
- unsigned char builtin;
+ const char *name;
+ unsigned char number;
+ unsigned char type;
+ unsigned char builtin;
+ struct neon_typed_alias *neon;
};
/* Diagnostics used when we don't get a register of the expected type. */
@@ -405,7 +485,11 @@ const char *const reg_expected_msgs[] =
N_("co-processor register expected"),
N_("FPA register expected"),
N_("VFP single precision register expected"),
- N_("VFP double precision register expected"),
+ N_("VFP/Neon double precision register expected"),
+ N_("Neon quad precision register expected"),
+ N_("VFP single or double precision register expected"),
+ N_("Neon double or quad precision register expected"),
+ N_("VFP single, double or Neon quad precision register expected"),
N_("VFP system register expected"),
N_("Maverick MVF register expected"),
N_("Maverick MVD register expected"),
@@ -465,11 +549,14 @@ struct asm_opcode
#define INDEX_UP 0x00800000
#define WRITE_BACK 0x00200000
#define LDM_TYPE_2_OR_3 0x00400000
+#define CPSI_MMOD 0x00020000
#define LITERAL_MASK 0xf000f000
#define OPCODE_MASK 0xfe1fffff
#define V4_STR_BIT 0x00000020
+#define T2_SUBS_PC_LR 0xf3de8f00
+
#define DATA_OP_SHIFT 21
#define T2_OPCODE_MASK 0xfe1fffff
@@ -571,6 +658,7 @@ struct asm_opcode
#define BAD_ADDR_MODE _("instruction does not accept this addressing mode");
#define BAD_BRANCH _("branch must be last instruction in IT block")
#define BAD_NOT_IT _("instruction not allowed in IT block")
+#define BAD_FPU _("selected FPU does not support instruction")
static struct hash_control *arm_ops_hsh;
static struct hash_control *arm_cond_hsh;
@@ -691,6 +779,9 @@ static int in_my_get_expression = 0;
#define GE_NO_PREFIX 0
#define GE_IMM_PREFIX 1
#define GE_OPT_PREFIX 2
+/* This is a bit of a hack. Use an optional prefix, and also allow big (64-bit)
+ immediates, as can be used in Neon VMVN and VMOV immediate instructions. */
+#define GE_OPT_PREFIX_BIG 3
static int
my_get_expression (expressionS * ep, char ** str, int prefix_mode)
@@ -700,7 +791,8 @@ my_get_expression (expressionS * ep, char ** str, int prefix_mode)
/* In unified syntax, all prefixes are optional. */
if (unified_syntax)
- prefix_mode = GE_OPT_PREFIX;
+ prefix_mode = (prefix_mode == GE_OPT_PREFIX_BIG) ? prefix_mode
+ : GE_OPT_PREFIX;
switch (prefix_mode)
{
@@ -714,6 +806,7 @@ my_get_expression (expressionS * ep, char ** str, int prefix_mode)
(*str)++;
break;
case GE_OPT_PREFIX:
+ case GE_OPT_PREFIX_BIG:
if (is_immediate_prefix (**str))
(*str)++;
break;
@@ -755,11 +848,12 @@ my_get_expression (expressionS * ep, char ** str, int prefix_mode)
/* Get rid of any bignums now, so that we don't generate an error for which
we can't establish a line number later on. Big numbers are never valid
in instructions, which is where this routine is always called. */
- if (ep->X_op == O_big
- || (ep->X_add_symbol
- && (walk_no_bignums (ep->X_add_symbol)
- || (ep->X_op_symbol
- && walk_no_bignums (ep->X_op_symbol)))))
+ if (prefix_mode != GE_OPT_PREFIX_BIG
+ && (ep->X_op == O_big
+ || (ep->X_add_symbol
+ && (walk_no_bignums (ep->X_add_symbol)
+ || (ep->X_op_symbol
+ && walk_no_bignums (ep->X_op_symbol))))))
{
inst.error = _("invalid constant");
*str = input_line_pointer;
@@ -939,18 +1033,10 @@ arm_reg_parse_multi (char **ccp)
return reg;
}
-/* As above, but the register must be of type TYPE, and the return
- value is the register number or FAIL. */
-
static int
-arm_reg_parse (char **ccp, enum arm_reg_type type)
+arm_reg_alt_syntax (char **ccp, char *start, struct reg_entry *reg,
+ enum arm_reg_type type)
{
- char *start = *ccp;
- struct reg_entry *reg = arm_reg_parse_multi (ccp);
-
- if (reg && reg->type == type)
- return reg->number;
-
/* Alternative syntaxes are accepted for a few register classes. */
switch (type)
{
@@ -982,10 +1068,354 @@ arm_reg_parse (char **ccp, enum arm_reg_type type)
break;
}
+ return FAIL;
+}
+
+/* As arm_reg_parse_multi, but the register must be of type TYPE, and the
+ return value is the register number or FAIL. */
+
+static int
+arm_reg_parse (char **ccp, enum arm_reg_type type)
+{
+ char *start = *ccp;
+ struct reg_entry *reg = arm_reg_parse_multi (ccp);
+ int ret;
+
+ /* Do not allow a scalar (reg+index) to parse as a register. */
+ if (reg && reg->neon && (reg->neon->defined & NTA_HASINDEX))
+ return FAIL;
+
+ if (reg && reg->type == type)
+ return reg->number;
+
+ if ((ret = arm_reg_alt_syntax (ccp, start, reg, type)) != FAIL)
+ return ret;
+
*ccp = start;
return FAIL;
}
+/* Parse a Neon type specifier. *STR should point at the leading '.'
+ character. Does no verification at this stage that the type fits the opcode
+ properly. E.g.,
+
+ .i32.i32.s16
+ .s32.f32
+ .u16
+
+ Can all be legally parsed by this function.
+
+ Fills in neon_type struct pointer with parsed information, and updates STR
+ to point after the parsed type specifier. Returns SUCCESS if this was a legal
+ type, FAIL if not. */
+
+static int
+parse_neon_type (struct neon_type *type, char **str)
+{
+ char *ptr = *str;
+
+ if (type)
+ type->elems = 0;
+
+ while (type->elems < NEON_MAX_TYPE_ELS)
+ {
+ enum neon_el_type thistype = NT_untyped;
+ unsigned thissize = -1u;
+
+ if (*ptr != '.')
+ break;
+
+ ptr++;
+
+ /* Just a size without an explicit type. */
+ if (ISDIGIT (*ptr))
+ goto parsesize;
+
+ switch (TOLOWER (*ptr))
+ {
+ case 'i': thistype = NT_integer; break;
+ case 'f': thistype = NT_float; break;
+ case 'p': thistype = NT_poly; break;
+ case 's': thistype = NT_signed; break;
+ case 'u': thistype = NT_unsigned; break;
+ case 'd':
+ thistype = NT_float;
+ thissize = 64;
+ ptr++;
+ goto done;
+ default:
+ as_bad (_("unexpected character `%c' in type specifier"), *ptr);
+ return FAIL;
+ }
+
+ ptr++;
+
+ /* .f is an abbreviation for .f32. */
+ if (thistype == NT_float && !ISDIGIT (*ptr))
+ thissize = 32;
+ else
+ {
+ parsesize:
+ thissize = strtoul (ptr, &ptr, 10);
+
+ if (thissize != 8 && thissize != 16 && thissize != 32
+ && thissize != 64)
+ {
+ as_bad (_("bad size %d in type specifier"), thissize);
+ return FAIL;
+ }
+ }
+
+ done:
+ if (type)
+ {
+ type->el[type->elems].type = thistype;
+ type->el[type->elems].size = thissize;
+ type->elems++;
+ }
+ }
+
+ /* Empty/missing type is not a successful parse. */
+ if (type->elems == 0)
+ return FAIL;
+
+ *str = ptr;
+
+ return SUCCESS;
+}
+
+/* Errors may be set multiple times during parsing or bit encoding
+ (particularly in the Neon bits), but usually the earliest error which is set
+ will be the most meaningful. Avoid overwriting it with later (cascading)
+ errors by calling this function. */
+
+static void
+first_error (const char *err)
+{
+ if (!inst.error)
+ inst.error = err;
+}
+
+/* Parse a single type, e.g. ".s32", leading period included. */
+static int
+parse_neon_operand_type (struct neon_type_el *vectype, char **ccp)
+{
+ char *str = *ccp;
+ struct neon_type optype;
+
+ if (*str == '.')
+ {
+ if (parse_neon_type (&optype, &str) == SUCCESS)
+ {
+ if (optype.elems == 1)
+ *vectype = optype.el[0];
+ else
+ {
+ first_error (_("only one type should be specified for operand"));
+ return FAIL;
+ }
+ }
+ else
+ {
+ first_error (_("vector type expected"));
+ return FAIL;
+ }
+ }
+ else
+ return FAIL;
+
+ *ccp = str;
+
+ return SUCCESS;
+}
+
+/* Special meanings for indices (which have a range of 0-7), which will fit into
+ a 4-bit integer. */
+
+#define NEON_ALL_LANES 15
+#define NEON_INTERLEAVE_LANES 14
+
+/* Parse either a register or a scalar, with an optional type. Return the
+ register number, and optionally fill in the actual type of the register
+ when multiple alternatives were given (NEON_TYPE_NDQ) in *RTYPE, and
+ type/index information in *TYPEINFO. */
+
+static int
+parse_typed_reg_or_scalar (char **ccp, enum arm_reg_type type,
+ enum arm_reg_type *rtype,
+ struct neon_typed_alias *typeinfo)
+{
+ char *str = *ccp;
+ struct reg_entry *reg = arm_reg_parse_multi (&str);
+ struct neon_typed_alias atype;
+ struct neon_type_el parsetype;
+
+ atype.defined = 0;
+ atype.index = -1;
+ atype.eltype.type = NT_invtype;
+ atype.eltype.size = -1;
+
+ /* Try alternate syntax for some types of register. Note these are mutually
+ exclusive with the Neon syntax extensions. */
+ if (reg == NULL)
+ {
+ int altreg = arm_reg_alt_syntax (&str, *ccp, reg, type);
+ if (altreg != FAIL)
+ *ccp = str;
+ if (typeinfo)
+ *typeinfo = atype;
+ return altreg;
+ }
+
+ /* Undo polymorphism when a set of register types may be accepted. */
+ if ((type == REG_TYPE_NDQ
+ && (reg->type == REG_TYPE_NQ || reg->type == REG_TYPE_VFD))
+ || (type == REG_TYPE_VFSD
+ && (reg->type == REG_TYPE_VFS || reg->type == REG_TYPE_VFD))
+ || (type == REG_TYPE_NSDQ
+ && (reg->type == REG_TYPE_VFS || reg->type == REG_TYPE_VFD
+ || reg->type == REG_TYPE_NQ))
+ || (type == REG_TYPE_MMXWC
+ && (reg->type == REG_TYPE_MMXWCG)))
+ type = reg->type;
+
+ if (type != reg->type)
+ return FAIL;
+
+ if (reg->neon)
+ atype = *reg->neon;
+
+ if (parse_neon_operand_type (&parsetype, &str) == SUCCESS)
+ {
+ if ((atype.defined & NTA_HASTYPE) != 0)
+ {
+ first_error (_("can't redefine type for operand"));
+ return FAIL;
+ }
+ atype.defined |= NTA_HASTYPE;
+ atype.eltype = parsetype;
+ }
+
+ if (skip_past_char (&str, '[') == SUCCESS)
+ {
+ if (type != REG_TYPE_VFD)
+ {
+ first_error (_("only D registers may be indexed"));
+ return FAIL;
+ }
+
+ if ((atype.defined & NTA_HASINDEX) != 0)
+ {
+ first_error (_("can't change index for operand"));
+ return FAIL;
+ }
+
+ atype.defined |= NTA_HASINDEX;
+
+ if (skip_past_char (&str, ']') == SUCCESS)
+ atype.index = NEON_ALL_LANES;
+ else
+ {
+ expressionS exp;
+
+ my_get_expression (&exp, &str, GE_NO_PREFIX);
+
+ if (exp.X_op != O_constant)
+ {
+ first_error (_("constant expression required"));
+ return FAIL;
+ }
+
+ if (skip_past_char (&str, ']') == FAIL)
+ return FAIL;
+
+ atype.index = exp.X_add_number;
+ }
+ }
+
+ if (typeinfo)
+ *typeinfo = atype;
+
+ if (rtype)
+ *rtype = type;
+
+ *ccp = str;
+
+ return reg->number;
+}
+
+/* Like arm_reg_parse, but allow allow the following extra features:
+ - If RTYPE is non-zero, return the (possibly restricted) type of the
+ register (e.g. Neon double or quad reg when either has been requested).
+ - If this is a Neon vector type with additional type information, fill
+ in the struct pointed to by VECTYPE (if non-NULL).
+ This function will fault on encountering a scalar.
+*/
+
+static int
+arm_typed_reg_parse (char **ccp, enum arm_reg_type type,
+ enum arm_reg_type *rtype, struct neon_type_el *vectype)
+{
+ struct neon_typed_alias atype;
+ char *str = *ccp;
+ int reg = parse_typed_reg_or_scalar (&str, type, rtype, &atype);
+
+ if (reg == FAIL)
+ return FAIL;
+
+ /* Do not allow a scalar (reg+index) to parse as a register. */
+ if ((atype.defined & NTA_HASINDEX) != 0)
+ {
+ first_error (_("register operand expected, but got scalar"));
+ return FAIL;
+ }
+
+ if (vectype)
+ *vectype = atype.eltype;
+
+ *ccp = str;
+
+ return reg;
+}
+
+#define NEON_SCALAR_REG(X) ((X) >> 4)
+#define NEON_SCALAR_INDEX(X) ((X) & 15)
+
+/* Parse a Neon scalar. Most of the time when we're parsing a scalar, we don't
+ have enough information to be able to do a good job bounds-checking. So, we
+ just do easy checks here, and do further checks later. */
+
+static int
+parse_scalar (char **ccp, int elsize, struct neon_type_el *type)
+{
+ int reg;
+ char *str = *ccp;
+ struct neon_typed_alias atype;
+
+ reg = parse_typed_reg_or_scalar (&str, REG_TYPE_VFD, NULL, &atype);
+
+ if (reg == FAIL || (atype.defined & NTA_HASINDEX) == 0)
+ return FAIL;
+
+ if (atype.index == NEON_ALL_LANES)
+ {
+ first_error (_("scalar must have an index"));
+ return FAIL;
+ }
+ else if (atype.index >= 64 / elsize)
+ {
+ first_error (_("scalar index out of range"));
+ return FAIL;
+ }
+
+ if (type)
+ *type = atype.eltype;
+
+ *ccp = str;
+
+ return reg * 16 + atype.index;
+}
+
/* Parse an ARM register list. Returns the bitmask, or FAIL. */
static long
parse_reg_list (char ** strp)
@@ -1011,7 +1441,7 @@ parse_reg_list (char ** strp)
if ((reg = arm_reg_parse (&str, REG_TYPE_RN)) == FAIL)
{
- inst.error = _(reg_expected_msgs[REG_TYPE_RN]);
+ first_error (_(reg_expected_msgs[REG_TYPE_RN]));
return FAIL;
}
@@ -1021,7 +1451,7 @@ parse_reg_list (char ** strp)
if (reg <= cur_reg)
{
- inst.error = _("bad range in register list");
+ first_error (_("bad range in register list"));
return FAIL;
}
@@ -1052,7 +1482,7 @@ parse_reg_list (char ** strp)
if (*str++ != '}')
{
- inst.error = _("missing `}'");
+ first_error (_("missing `}'"));
return FAIL;
}
}
@@ -1111,55 +1541,117 @@ parse_reg_list (char ** strp)
return range;
}
+/* Types of registers in a list. */
+
+enum reg_list_els
+{
+ REGLIST_VFP_S,
+ REGLIST_VFP_D,
+ REGLIST_NEON_D
+};
+
/* Parse a VFP register list. If the string is invalid return FAIL.
Otherwise return the number of registers, and set PBASE to the first
- register. Double precision registers are matched if DP is nonzero. */
+ register. Parses registers of type ETYPE.
+ If REGLIST_NEON_D is used, several syntax enhancements are enabled:
+ - Q registers can be used to specify pairs of D registers
+ - { } can be omitted from around a singleton register list
+ FIXME: This is not implemented, as it would require backtracking in
+ some cases, e.g.:
+ vtbl.8 d3,d4,d5
+ This could be done (the meaning isn't really ambiguous), but doesn't
+ fit in well with the current parsing framework.
+ - 32 D registers may be used (also true for VFPv3).
+ FIXME: Types are ignored in these register lists, which is probably a
+ bug. */
static int
-parse_vfp_reg_list (char **str, unsigned int *pbase, int dp)
+parse_vfp_reg_list (char **ccp, unsigned int *pbase, enum reg_list_els etype)
{
+ char *str = *ccp;
int base_reg;
int new_base;
- int regtype;
- int max_regs;
+ enum arm_reg_type regtype = 0;
+ int max_regs = 0;
int count = 0;
int warned = 0;
unsigned long mask = 0;
int i;
- if (**str != '{')
- return FAIL;
+ if (*str != '{')
+ {
+ inst.error = _("expecting {");
+ return FAIL;
+ }
- (*str)++;
+ str++;
- if (dp)
+ switch (etype)
{
+ case REGLIST_VFP_S:
+ regtype = REG_TYPE_VFS;
+ max_regs = 32;
+ break;
+
+ case REGLIST_VFP_D:
regtype = REG_TYPE_VFD;
- max_regs = 16;
+ break;
+
+ case REGLIST_NEON_D:
+ regtype = REG_TYPE_NDQ;
+ break;
}
- else
+
+ if (etype != REGLIST_VFP_S)
{
- regtype = REG_TYPE_VFS;
- max_regs = 32;
+ /* VFPv3 allows 32 D registers. */
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, fpu_vfp_ext_v3))
+ {
+ max_regs = 32;
+ if (thumb_mode)
+ ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
+ fpu_vfp_ext_v3);
+ else
+ ARM_MERGE_FEATURE_SETS (arm_arch_used, arm_arch_used,
+ fpu_vfp_ext_v3);
+ }
+ else
+ max_regs = 16;
}
base_reg = max_regs;
do
{
- new_base = arm_reg_parse (str, regtype);
+ int setmask = 1, addregs = 1;
+
+ new_base = arm_typed_reg_parse (&str, regtype, &regtype, NULL);
+
if (new_base == FAIL)
{
- inst.error = gettext (reg_expected_msgs[regtype]);
+ first_error (_(reg_expected_msgs[regtype]));
return FAIL;
}
+
+ if (new_base >= max_regs)
+ {
+ first_error (_("register out of range in list"));
+ return FAIL;
+ }
+
+ /* Note: a value of 2 * n is returned for the register Q<n>. */
+ if (regtype == REG_TYPE_NQ)
+ {
+ setmask = 3;
+ addregs = 2;
+ }
if (new_base < base_reg)
base_reg = new_base;
- if (mask & (1 << new_base))
+ if (mask & (setmask << new_base))
{
- inst.error = _("invalid register list");
+ first_error (_("invalid register list"));
return FAIL;
}
@@ -1169,43 +1661,53 @@ parse_vfp_reg_list (char **str, unsigned int *pbase, int dp)
warned = 1;
}
- mask |= 1 << new_base;
- count++;
+ mask |= setmask << new_base;
+ count += addregs;
- if (**str == '-') /* We have the start of a range expression */
+ if (*str == '-') /* We have the start of a range expression */
{
int high_range;
- (*str)++;
+ str++;
- if ((high_range = arm_reg_parse (str, regtype)) == FAIL)
+ if ((high_range = arm_typed_reg_parse (&str, regtype, NULL, NULL))
+ == FAIL)
{
inst.error = gettext (reg_expected_msgs[regtype]);
return FAIL;
}
+ if (high_range >= max_regs)
+ {
+ first_error (_("register out of range in list"));
+ return FAIL;
+ }
+
+ if (regtype == REG_TYPE_NQ)
+ high_range = high_range + 1;
+
if (high_range <= new_base)
{
inst.error = _("register range not in ascending order");
return FAIL;
}
- for (new_base++; new_base <= high_range; new_base++)
+ for (new_base += addregs; new_base <= high_range; new_base += addregs)
{
- if (mask & (1 << new_base))
+ if (mask & (setmask << new_base))
{
inst.error = _("invalid register list");
return FAIL;
}
- mask |= 1 << new_base;
- count++;
+ mask |= setmask << new_base;
+ count += addregs;
}
}
}
- while (skip_past_comma (str) != FAIL);
+ while (skip_past_comma (&str) != FAIL);
- (*str)++;
+ str++;
/* Sanity check -- should have raised a parse error above. */
if (count == 0 || count > max_regs)
@@ -1224,9 +1726,204 @@ parse_vfp_reg_list (char **str, unsigned int *pbase, int dp)
}
}
+ *ccp = str;
+
return count;
}
+/* True if two alias types are the same. */
+
+static int
+neon_alias_types_same (struct neon_typed_alias *a, struct neon_typed_alias *b)
+{
+ if (!a && !b)
+ return 1;
+
+ if (!a || !b)
+ return 0;
+
+ if (a->defined != b->defined)
+ return 0;
+
+ if ((a->defined & NTA_HASTYPE) != 0
+ && (a->eltype.type != b->eltype.type
+ || a->eltype.size != b->eltype.size))
+ return 0;
+
+ if ((a->defined & NTA_HASINDEX) != 0
+ && (a->index != b->index))
+ return 0;
+
+ return 1;
+}
+
+/* Parse element/structure lists for Neon VLD<n> and VST<n> instructions.
+ The base register is put in *PBASE.
+ The lane (or one of the NEON_*_LANES constants) is placed in bits [3:0] of
+ the return value.
+ The register stride (minus one) is put in bit 4 of the return value.
+ Bits [6:5] encode the list length (minus one).
+ The type of the list elements is put in *ELTYPE, if non-NULL. */
+
+#define NEON_LANE(X) ((X) & 0xf)
+#define NEON_REG_STRIDE(X) ((((X) >> 4) & 1) + 1)
+#define NEON_REGLIST_LENGTH(X) ((((X) >> 5) & 3) + 1)
+
+static int
+parse_neon_el_struct_list (char **str, unsigned *pbase,
+ struct neon_type_el *eltype)
+{
+ char *ptr = *str;
+ int base_reg = -1;
+ int reg_incr = -1;
+ int count = 0;
+ int lane = -1;
+ int leading_brace = 0;
+ enum arm_reg_type rtype = REG_TYPE_NDQ;
+ int addregs = 1;
+ const char *const incr_error = "register stride must be 1 or 2";
+ const char *const type_error = "mismatched element/structure types in list";
+ struct neon_typed_alias firsttype;
+
+ if (skip_past_char (&ptr, '{') == SUCCESS)
+ leading_brace = 1;
+
+ do
+ {
+ struct neon_typed_alias atype;
+ int getreg = parse_typed_reg_or_scalar (&ptr, rtype, &rtype, &atype);
+
+ if (getreg == FAIL)
+ {
+ first_error (_(reg_expected_msgs[rtype]));
+ return FAIL;
+ }
+
+ if (base_reg == -1)
+ {
+ base_reg = getreg;
+ if (rtype == REG_TYPE_NQ)
+ {
+ reg_incr = 1;
+ addregs = 2;
+ }
+ firsttype = atype;
+ }
+ else if (reg_incr == -1)
+ {
+ reg_incr = getreg - base_reg;
+ if (reg_incr < 1 || reg_incr > 2)
+ {
+ first_error (_(incr_error));
+ return FAIL;
+ }
+ }
+ else if (getreg != base_reg + reg_incr * count)
+ {
+ first_error (_(incr_error));
+ return FAIL;
+ }
+
+ if (!neon_alias_types_same (&atype, &firsttype))
+ {
+ first_error (_(type_error));
+ return FAIL;
+ }
+
+ /* Handle Dn-Dm or Qn-Qm syntax. Can only be used with non-indexed list
+ modes. */
+ if (ptr[0] == '-')
+ {
+ struct neon_typed_alias htype;
+ int hireg, dregs = (rtype == REG_TYPE_NQ) ? 2 : 1;
+ if (lane == -1)
+ lane = NEON_INTERLEAVE_LANES;
+ else if (lane != NEON_INTERLEAVE_LANES)
+ {
+ first_error (_(type_error));
+ return FAIL;
+ }
+ if (reg_incr == -1)
+ reg_incr = 1;
+ else if (reg_incr != 1)
+ {
+ first_error (_("don't use Rn-Rm syntax with non-unit stride"));
+ return FAIL;
+ }
+ ptr++;
+ hireg = parse_typed_reg_or_scalar (&ptr, rtype, NULL, &htype);
+ if (hireg == FAIL)
+ {
+ first_error (_(reg_expected_msgs[rtype]));
+ return FAIL;
+ }
+ if (!neon_alias_types_same (&htype, &firsttype))
+ {
+ first_error (_(type_error));
+ return FAIL;
+ }
+ count += hireg + dregs - getreg;
+ continue;
+ }
+
+ /* If we're using Q registers, we can't use [] or [n] syntax. */
+ if (rtype == REG_TYPE_NQ)
+ {
+ count += 2;
+ continue;
+ }
+
+ if ((atype.defined & NTA_HASINDEX) != 0)
+ {
+ if (lane == -1)
+ lane = atype.index;
+ else if (lane != atype.index)
+ {
+ first_error (_(type_error));
+ return FAIL;
+ }
+ }
+ else if (lane == -1)
+ lane = NEON_INTERLEAVE_LANES;
+ else if (lane != NEON_INTERLEAVE_LANES)
+ {
+ first_error (_(type_error));
+ return FAIL;
+ }
+ count++;
+ }
+ while ((count != 1 || leading_brace) && skip_past_comma (&ptr) != FAIL);
+
+ /* No lane set by [x]. We must be interleaving structures. */
+ if (lane == -1)
+ lane = NEON_INTERLEAVE_LANES;
+
+ /* Sanity check. */
+ if (lane == -1 || base_reg == -1 || count < 1 || count > 4
+ || (count > 1 && reg_incr == -1))
+ {
+ first_error (_("error parsing element/structure list"));
+ return FAIL;
+ }
+
+ if ((count > 1 || leading_brace) && skip_past_char (&ptr, '}') == FAIL)
+ {
+ first_error (_("expected }"));
+ return FAIL;
+ }
+
+ if (reg_incr == -1)
+ reg_incr = 1;
+
+ if (eltype)
+ *eltype = firsttype.eltype;
+
+ *pbase = base_reg;
+ *str = ptr;
+
+ return lane | ((reg_incr - 1) << 4) | ((count - 1) << 5);
+}
+
/* Parse an explicit relocation suffix on an expression. This is
either nothing, or a word in parentheses. Note that if !OBJ_ELF,
arm_reloc_hsh contains no entries, so this function can only
@@ -1258,7 +1955,7 @@ parse_reloc (char **str)
/* Directives: register aliases. */
-static void
+static struct reg_entry *
insert_reg_alias (char *str, int number, int type)
{
struct reg_entry *new;
@@ -1274,7 +1971,7 @@ insert_reg_alias (char *str, int number, int type)
else if (new->number != number || new->type != type)
as_warn (_("ignoring redefinition of register alias '%s'"), str);
- return;
+ return 0;
}
name = xstrdup (str);
@@ -1284,9 +1981,31 @@ insert_reg_alias (char *str, int number, int type)
new->number = number;
new->type = type;
new->builtin = FALSE;
+ new->neon = NULL;
if (hash_insert (arm_reg_hsh, name, (PTR) new))
abort ();
+
+ return new;
+}
+
+static void
+insert_neon_reg_alias (char *str, int number, int type,
+ struct neon_typed_alias *atype)
+{
+ struct reg_entry *reg = insert_reg_alias (str, number, type);
+
+ if (!reg)
+ {
+ first_error (_("attempt to redefine typed alias"));
+ return;
+ }
+
+ if (atype)
+ {
+ reg->neon = xmalloc (sizeof (struct neon_typed_alias));
+ *reg->neon = *atype;
+ }
}
/* Look for the .req directive. This is of the form:
@@ -1354,6 +2073,148 @@ create_register_alias (char * newname, char *p)
return 1;
}
+/* Create a Neon typed/indexed register alias using directives, e.g.:
+ X .dn d5.s32[1]
+ Y .qn 6.s16
+ Z .dn d7
+ T .dn Z[0]
+ These typed registers can be used instead of the types specified after the
+ Neon mnemonic, so long as all operands given have types. Types can also be
+ specified directly, e.g.:
+ vadd d0.s32, d1.s32, d2.s32
+*/
+
+static int
+create_neon_reg_alias (char *newname, char *p)
+{
+ enum arm_reg_type basetype;
+ struct reg_entry *basereg;
+ struct reg_entry mybasereg;
+ struct neon_type ntype;
+ struct neon_typed_alias typeinfo;
+ char *namebuf, *nameend;
+ int namelen;
+
+ typeinfo.defined = 0;
+ typeinfo.eltype.type = NT_invtype;
+ typeinfo.eltype.size = -1;
+ typeinfo.index = -1;
+
+ nameend = p;
+
+ if (strncmp (p, " .dn ", 5) == 0)
+ basetype = REG_TYPE_VFD;
+ else if (strncmp (p, " .qn ", 5) == 0)
+ basetype = REG_TYPE_NQ;
+ else
+ return 0;
+
+ p += 5;
+
+ if (*p == '\0')
+ return 0;
+
+ basereg = arm_reg_parse_multi (&p);
+
+ if (basereg && basereg->type != basetype)
+ {
+ as_bad (_("bad type for register"));
+ return 0;
+ }
+
+ if (basereg == NULL)
+ {
+ expressionS exp;
+ /* Try parsing as an integer. */
+ my_get_expression (&exp, &p, GE_NO_PREFIX);
+ if (exp.X_op != O_constant)
+ {
+ as_bad (_("expression must be constant"));
+ return 0;
+ }
+ basereg = &mybasereg;
+ basereg->number = (basetype == REG_TYPE_NQ) ? exp.X_add_number * 2
+ : exp.X_add_number;
+ basereg->neon = 0;
+ }
+
+ if (basereg->neon)
+ typeinfo = *basereg->neon;
+
+ if (parse_neon_type (&ntype, &p) == SUCCESS)
+ {
+ /* We got a type. */
+ if (typeinfo.defined & NTA_HASTYPE)
+ {
+ as_bad (_("can't redefine the type of a register alias"));
+ return 0;
+ }
+
+ typeinfo.defined |= NTA_HASTYPE;
+ if (ntype.elems != 1)
+ {
+ as_bad (_("you must specify a single type only"));
+ return 0;
+ }
+ typeinfo.eltype = ntype.el[0];
+ }
+
+ if (skip_past_char (&p, '[') == SUCCESS)
+ {
+ expressionS exp;
+ /* We got a scalar index. */
+
+ if (typeinfo.defined & NTA_HASINDEX)
+ {
+ as_bad (_("can't redefine the index of a scalar alias"));
+ return 0;
+ }
+
+ my_get_expression (&exp, &p, GE_NO_PREFIX);
+
+ if (exp.X_op != O_constant)
+ {
+ as_bad (_("scalar index must be constant"));
+ return 0;
+ }
+
+ typeinfo.defined |= NTA_HASINDEX;
+ typeinfo.index = exp.X_add_number;
+
+ if (skip_past_char (&p, ']') == FAIL)
+ {
+ as_bad (_("expecting ]"));
+ return 0;
+ }
+ }
+
+ namelen = nameend - newname;
+ namebuf = alloca (namelen + 1);
+ strncpy (namebuf, newname, namelen);
+ namebuf[namelen] = '\0';
+
+ insert_neon_reg_alias (namebuf, basereg->number, basetype,
+ typeinfo.defined != 0 ? &typeinfo : NULL);
+
+ /* Insert name in all uppercase. */
+ for (p = namebuf; *p; p++)
+ *p = TOUPPER (*p);
+
+ if (strncmp (namebuf, newname, namelen))
+ insert_neon_reg_alias (namebuf, basereg->number, basetype,
+ typeinfo.defined != 0 ? &typeinfo : NULL);
+
+ /* Insert name in all lowercase. */
+ for (p = namebuf; *p; p++)
+ *p = TOLOWER (*p);
+
+ if (strncmp (namebuf, newname, namelen))
+ insert_neon_reg_alias (namebuf, basereg->number, basetype,
+ typeinfo.defined != 0 ? &typeinfo : NULL);
+
+ return 1;
+}
+
/* Should never be called, as .req goes between the alias and the
register name, not at the beginning of the line. */
static void
@@ -1362,6 +2223,18 @@ s_req (int a ATTRIBUTE_UNUSED)
as_bad (_("invalid syntax for .req directive"));
}
+static void
+s_dn (int a ATTRIBUTE_UNUSED)
+{
+ as_bad (_("invalid syntax for .dn directive"));
+}
+
+static void
+s_qn (int a ATTRIBUTE_UNUSED)
+{
+ as_bad (_("invalid syntax for .qn directive"));
+}
+
/* The .unreq directive deletes an alias which was previously defined
by .req. For example:
@@ -1399,6 +2272,8 @@ s_unreq (int a ATTRIBUTE_UNUSED)
{
hash_delete (arm_reg_hsh, name);
free ((char *) reg->name);
+ if (reg->neon)
+ free (reg->neon);
free (reg);
}
}
@@ -1417,7 +2292,7 @@ s_unreq (int a ATTRIBUTE_UNUSED)
static enum mstate mapstate = MAP_UNDEFINED;
-static void
+void
mapping_state (enum mstate state)
{
symbolS * symbolP;
@@ -1738,6 +2613,7 @@ static void
s_align (int unused ATTRIBUTE_UNUSED)
{
int temp;
+ bfd_boolean fill_p;
long temp_fill;
long max_alignment = 15;
@@ -1754,16 +2630,25 @@ s_align (int unused ATTRIBUTE_UNUSED)
{
input_line_pointer++;
temp_fill = get_absolute_expression ();
+ fill_p = TRUE;
}
else
- temp_fill = 0;
+ {
+ fill_p = FALSE;
+ temp_fill = 0;
+ }
if (!temp)
temp = 2;
/* Only make a frag if we HAVE to. */
if (temp && !need_pass_2)
- frag_align (temp, (int) temp_fill, 0);
+ {
+ if (!fill_p && subseg_text_p (now_seg))
+ frag_align_code (temp, 0);
+ else
+ frag_align (temp, (int) temp_fill, 0);
+ }
demand_empty_rest_of_line ();
record_alignment (now_seg, temp);
@@ -2414,7 +3299,57 @@ s_arm_unwind_save_fpa (int reg)
}
-/* Parse a directive saving VFP registers. */
+/* Parse a directive saving VFP registers for ARMv6 and above. */
+
+static void
+s_arm_unwind_save_vfp_armv6 (void)
+{
+ int count;
+ unsigned int start;
+ valueT op;
+ int num_vfpv3_regs = 0;
+ int num_regs_below_16;
+
+ count = parse_vfp_reg_list (&input_line_pointer, &start, REGLIST_VFP_D);
+ if (count == FAIL)
+ {
+ as_bad (_("expected register list"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ demand_empty_rest_of_line ();
+
+ /* We always generate FSTMD/FLDMD-style unwinding opcodes (rather
+ than FSTMX/FLDMX-style ones). */
+
+ /* Generate opcode for (VFPv3) registers numbered in the range 16 .. 31. */
+ if (start >= 16)
+ num_vfpv3_regs = count;
+ else if (start + count > 16)
+ num_vfpv3_regs = start + count - 16;
+
+ if (num_vfpv3_regs > 0)
+ {
+ int start_offset = start > 16 ? start - 16 : 0;
+ op = 0xc800 | (start_offset << 4) | (num_vfpv3_regs - 1);
+ add_unwind_opcode (op, 2);
+ }
+
+ /* Generate opcode for registers numbered in the range 0 .. 15. */
+ num_regs_below_16 = num_vfpv3_regs > 0 ? 16 - (int) start : count;
+ assert (num_regs_below_16 + num_vfpv3_regs == count);
+ if (num_regs_below_16 > 0)
+ {
+ op = 0xc900 | (start << 4) | (num_regs_below_16 - 1);
+ add_unwind_opcode (op, 2);
+ }
+
+ unwind.frame_size += count * 8;
+}
+
+
+/* Parse a directive saving VFP registers for pre-ARMv6. */
static void
s_arm_unwind_save_vfp (void)
@@ -2423,7 +3358,7 @@ s_arm_unwind_save_vfp (void)
unsigned int reg;
valueT op;
- count = parse_vfp_reg_list (&input_line_pointer, &reg, 1);
+ count = parse_vfp_reg_list (&input_line_pointer, &reg, REGLIST_VFP_D);
if (count == FAIL)
{
as_bad (_("expected register list"));
@@ -2502,7 +3437,7 @@ s_arm_unwind_save_mmxwr (void)
demand_empty_rest_of_line ();
- /* Generate any deferred opcodes becuuse we're going to be looking at
+ /* Generate any deferred opcodes because we're going to be looking at
the list. */
flush_pending_unwind ();
@@ -2538,7 +3473,7 @@ s_arm_unwind_save_mmxwr (void)
op = 0xffff << (reg - 1);
if (reg > 0
- || ((mask & op) == (1u << (reg - 1))))
+ && ((mask & op) == (1u << (reg - 1))))
{
op = (1 << (reg + i + 1)) - 1;
op &= ~((1 << reg) - 1);
@@ -2635,7 +3570,7 @@ s_arm_unwind_save_mmxwcg (void)
demand_empty_rest_of_line ();
- /* Generate any deferred opcodes becuuse we're going to be looking at
+ /* Generate any deferred opcodes because we're going to be looking at
the list. */
flush_pending_unwind ();
@@ -2652,10 +3587,11 @@ error:
}
-/* Parse an unwind_save directive. */
+/* Parse an unwind_save directive.
+ If the argument is non-zero, this is a .vsave directive. */
static void
-s_arm_unwind_save (int ignored ATTRIBUTE_UNUSED)
+s_arm_unwind_save (int arch_v6)
{
char *peek;
struct reg_entry *reg;
@@ -2692,7 +3628,12 @@ s_arm_unwind_save (int ignored ATTRIBUTE_UNUSED)
return;
case REG_TYPE_RN: s_arm_unwind_save_core (); return;
- case REG_TYPE_VFD: s_arm_unwind_save_vfp (); return;
+ case REG_TYPE_VFD:
+ if (arch_v6)
+ s_arm_unwind_save_vfp_armv6 ();
+ else
+ s_arm_unwind_save_vfp ();
+ return;
case REG_TYPE_MMXWR: s_arm_unwind_save_mmxwr (); return;
case REG_TYPE_MMXWCG: s_arm_unwind_save_mmxwcg (); return;
@@ -2710,6 +3651,7 @@ s_arm_unwind_movsp (int ignored ATTRIBUTE_UNUSED)
{
int reg;
valueT op;
+ int offset;
reg = arm_reg_parse (&input_line_pointer, REG_TYPE_RN);
if (reg == FAIL)
@@ -2718,6 +3660,16 @@ s_arm_unwind_movsp (int ignored ATTRIBUTE_UNUSED)
ignore_rest_of_line ();
return;
}
+
+ /* Optional constant. */
+ if (skip_past_comma (&input_line_pointer) != FAIL)
+ {
+ if (immediate_for_directive (&offset) == FAIL)
+ return;
+ }
+ else
+ offset = 0;
+
demand_empty_rest_of_line ();
if (reg == REG_SP || reg == REG_PC)
@@ -2735,7 +3687,7 @@ s_arm_unwind_movsp (int ignored ATTRIBUTE_UNUSED)
/* Record the information for later. */
unwind.fp_reg = reg;
- unwind.fp_offset = unwind.frame_size;
+ unwind.fp_offset = unwind.frame_size - offset;
unwind.sp_restored = 1;
}
@@ -2818,7 +3770,7 @@ static void
s_arm_unwind_raw (int ignored ATTRIBUTE_UNUSED)
{
expressionS exp;
- /* This is an arbitary limit. */
+ /* This is an arbitrary limit. */
unsigned char op[16];
int count;
@@ -2877,90 +3829,36 @@ s_arm_unwind_raw (int ignored ATTRIBUTE_UNUSED)
static void
s_arm_eabi_attribute (int ignored ATTRIBUTE_UNUSED)
{
- expressionS exp;
- bfd_boolean is_string;
- int tag;
- unsigned int i = 0;
- char *s = NULL;
- char saved_char;
+ s_vendor_attribute (OBJ_ATTR_PROC);
+}
+#endif /* OBJ_ELF */
- expression (& exp);
- if (exp.X_op != O_constant)
- goto bad;
+static void s_arm_arch (int);
+static void s_arm_object_arch (int);
+static void s_arm_cpu (int);
+static void s_arm_fpu (int);
- tag = exp.X_add_number;
- if (tag == 4 || tag == 5 || tag == 32 || (tag > 32 && (tag & 1) != 0))
- is_string = 1;
- else
- is_string = 0;
+#ifdef TE_PE
- if (skip_past_comma (&input_line_pointer) == FAIL)
- goto bad;
- if (tag == 32 || !is_string)
- {
- expression (& exp);
- if (exp.X_op != O_constant)
- {
- as_bad (_("expected numeric constant"));
- ignore_rest_of_line ();
- return;
- }
- i = exp.X_add_number;
- }
- if (tag == Tag_compatibility
- && skip_past_comma (&input_line_pointer) == FAIL)
- {
- as_bad (_("expected comma"));
- ignore_rest_of_line ();
- return;
- }
- if (is_string)
- {
- skip_whitespace(input_line_pointer);
- if (*input_line_pointer != '"')
- goto bad_string;
- input_line_pointer++;
- s = input_line_pointer;
- while (*input_line_pointer && *input_line_pointer != '"')
- input_line_pointer++;
- if (*input_line_pointer != '"')
- goto bad_string;
- saved_char = *input_line_pointer;
- *input_line_pointer = 0;
- }
- else
- {
- s = NULL;
- saved_char = 0;
- }
-
- if (tag == Tag_compatibility)
- elf32_arm_add_eabi_attr_compat (stdoutput, i, s);
- else if (is_string)
- elf32_arm_add_eabi_attr_string (stdoutput, tag, s);
- else
- elf32_arm_add_eabi_attr_int (stdoutput, tag, i);
+static void
+pe_directive_secrel (int dummy ATTRIBUTE_UNUSED)
+{
+ expressionS exp;
- if (s)
+ do
{
- *input_line_pointer = saved_char;
- input_line_pointer++;
+ expression (&exp);
+ if (exp.X_op == O_symbol)
+ exp.X_op = O_secrel;
+
+ emit_expr (&exp, 4);
}
+ while (*input_line_pointer++ == ',');
+
+ input_line_pointer--;
demand_empty_rest_of_line ();
- return;
-bad_string:
- as_bad (_("bad string constant"));
- ignore_rest_of_line ();
- return;
-bad:
- as_bad (_("expected <tag> , <value>"));
- ignore_rest_of_line ();
}
-
-static void s_arm_arch (int);
-static void s_arm_cpu (int);
-static void s_arm_fpu (int);
-#endif /* OBJ_ELF */
+#endif /* TE_PE */
/* This table describes all the machine specific pseudo-ops the assembler
has to support. The fields are:
@@ -2972,6 +3870,9 @@ const pseudo_typeS md_pseudo_table[] =
{
/* Never called because '.req' does not start a line. */
{ "req", s_req, 0 },
+ /* Following two are likewise never called. */
+ { "dn", s_dn, 0 },
+ { "qn", s_qn, 0 },
{ "unreq", s_unreq, 0 },
{ "bss", s_bss, 0 },
{ "align", s_align, 0 },
@@ -2985,6 +3886,10 @@ const pseudo_typeS md_pseudo_table[] =
{ "ltorg", s_ltorg, 0 },
{ "pool", s_ltorg, 0 },
{ "syntax", s_syntax, 0 },
+ { "cpu", s_arm_cpu, 0 },
+ { "arch", s_arm_arch, 0 },
+ { "object_arch", s_arm_object_arch, 0 },
+ { "fpu", s_arm_fpu, 0 },
#ifdef OBJ_ELF
{ "word", s_arm_elf_cons, 4 },
{ "long", s_arm_elf_cons, 4 },
@@ -2996,20 +3901,30 @@ const pseudo_typeS md_pseudo_table[] =
{ "personalityindex", s_arm_unwind_personalityindex, 0 },
{ "handlerdata", s_arm_unwind_handlerdata, 0 },
{ "save", s_arm_unwind_save, 0 },
+ { "vsave", s_arm_unwind_save, 1 },
{ "movsp", s_arm_unwind_movsp, 0 },
{ "pad", s_arm_unwind_pad, 0 },
{ "setfp", s_arm_unwind_setfp, 0 },
{ "unwind_raw", s_arm_unwind_raw, 0 },
- { "cpu", s_arm_cpu, 0 },
- { "arch", s_arm_arch, 0 },
- { "fpu", s_arm_fpu, 0 },
{ "eabi_attribute", s_arm_eabi_attribute, 0 },
#else
{ "word", cons, 4},
+
+ /* These are used for dwarf. */
+ {"2byte", cons, 2},
+ {"4byte", cons, 4},
+ {"8byte", cons, 8},
+ /* These are used for dwarf2. */
+ { "file", (void (*) (int)) dwarf2_directive_file, 0 },
+ { "loc", dwarf2_directive_loc, 0 },
+ { "loc_mark_labels", dwarf2_directive_loc_mark_labels, 0 },
#endif
{ "extend", float_cons, 'x' },
{ "ldouble", float_cons, 'x' },
{ "packed", float_cons, 'p' },
+#ifdef TE_PE
+ {"secrel32", pe_directive_secrel, 0},
+#endif
{ 0, 0, 0 }
};
@@ -3043,6 +3958,58 @@ parse_immediate (char **str, int *val, int min, int max,
return SUCCESS;
}
+/* Less-generic immediate-value read function with the possibility of loading a
+ big (64-bit) immediate, as required by Neon VMOV, VMVN and logic immediate
+ instructions. Puts the result directly in inst.operands[i]. */
+
+static int
+parse_big_immediate (char **str, int i)
+{
+ expressionS exp;
+ char *ptr = *str;
+
+ my_get_expression (&exp, &ptr, GE_OPT_PREFIX_BIG);
+
+ if (exp.X_op == O_constant)
+ {
+ inst.operands[i].imm = exp.X_add_number & 0xffffffff;
+ /* If we're on a 64-bit host, then a 64-bit number can be returned using
+ O_constant. We have to be careful not to break compilation for
+ 32-bit X_add_number, though. */
+ if ((exp.X_add_number & ~0xffffffffl) != 0)
+ {
+ /* X >> 32 is illegal if sizeof (exp.X_add_number) == 4. */
+ inst.operands[i].reg = ((exp.X_add_number >> 16) >> 16) & 0xffffffff;
+ inst.operands[i].regisimm = 1;
+ }
+ }
+ else if (exp.X_op == O_big
+ && LITTLENUM_NUMBER_OF_BITS * exp.X_add_number > 32
+ && LITTLENUM_NUMBER_OF_BITS * exp.X_add_number <= 64)
+ {
+ unsigned parts = 32 / LITTLENUM_NUMBER_OF_BITS, j, idx = 0;
+ /* Bignums have their least significant bits in
+ generic_bignum[0]. Make sure we put 32 bits in imm and
+ 32 bits in reg, in a (hopefully) portable way. */
+ assert (parts != 0);
+ inst.operands[i].imm = 0;
+ for (j = 0; j < parts; j++, idx++)
+ inst.operands[i].imm |= generic_bignum[idx]
+ << (LITTLENUM_NUMBER_OF_BITS * j);
+ inst.operands[i].reg = 0;
+ for (j = 0; j < parts; j++, idx++)
+ inst.operands[i].reg |= generic_bignum[idx]
+ << (LITTLENUM_NUMBER_OF_BITS * j);
+ inst.operands[i].regisimm = 1;
+ }
+ else
+ return FAIL;
+
+ *str = ptr;
+
+ return SUCCESS;
+}
+
/* Returns the pseudo-register number of an FPA immediate constant,
or FAIL if there isn't a valid constant here. */
@@ -3134,6 +4101,80 @@ parse_fpa_immediate (char ** str)
return FAIL;
}
+/* Returns 1 if a number has "quarter-precision" float format
+ 0baBbbbbbc defgh000 00000000 00000000. */
+
+static int
+is_quarter_float (unsigned imm)
+{
+ int bs = (imm & 0x20000000) ? 0x3e000000 : 0x40000000;
+ return (imm & 0x7ffff) == 0 && ((imm & 0x7e000000) ^ bs) == 0;
+}
+
+/* Parse an 8-bit "quarter-precision" floating point number of the form:
+ 0baBbbbbbc defgh000 00000000 00000000.
+ The zero and minus-zero cases need special handling, since they can't be
+ encoded in the "quarter-precision" float format, but can nonetheless be
+ loaded as integer constants. */
+
+static unsigned
+parse_qfloat_immediate (char **ccp, int *immed)
+{
+ char *str = *ccp;
+ char *fpnum;
+ LITTLENUM_TYPE words[MAX_LITTLENUMS];
+ int found_fpchar = 0;
+
+ skip_past_char (&str, '#');
+
+ /* We must not accidentally parse an integer as a floating-point number. Make
+ sure that the value we parse is not an integer by checking for special
+ characters '.' or 'e'.
+ FIXME: This is a horrible hack, but doing better is tricky because type
+ information isn't in a very usable state at parse time. */
+ fpnum = str;
+ skip_whitespace (fpnum);
+
+ if (strncmp (fpnum, "0x", 2) == 0)
+ return FAIL;
+ else
+ {
+ for (; *fpnum != '\0' && *fpnum != ' ' && *fpnum != '\n'; fpnum++)
+ if (*fpnum == '.' || *fpnum == 'e' || *fpnum == 'E')
+ {
+ found_fpchar = 1;
+ break;
+ }
+
+ if (!found_fpchar)
+ return FAIL;
+ }
+
+ if ((str = atof_ieee (str, 's', words)) != NULL)
+ {
+ unsigned fpword = 0;
+ int i;
+
+ /* Our FP word must be 32 bits (single-precision FP). */
+ for (i = 0; i < 32 / LITTLENUM_NUMBER_OF_BITS; i++)
+ {
+ fpword <<= LITTLENUM_NUMBER_OF_BITS;
+ fpword |= words[i];
+ }
+
+ if (is_quarter_float (fpword) || (fpword & 0x7fffffff) == 0)
+ *immed = fpword;
+ else
+ return FAIL;
+
+ *ccp = str;
+
+ return SUCCESS;
+ }
+
+ return FAIL;
+}
+
/* Shift operands. */
enum shift_kind
{
@@ -3317,6 +4358,168 @@ parse_shifter_operand (char **str, int i)
return SUCCESS;
}
+/* Group relocation information. Each entry in the table contains the
+ textual name of the relocation as may appear in assembler source
+ and must end with a colon.
+ Along with this textual name are the relocation codes to be used if
+ the corresponding instruction is an ALU instruction (ADD or SUB only),
+ an LDR, an LDRS, or an LDC. */
+
+struct group_reloc_table_entry
+{
+ const char *name;
+ int alu_code;
+ int ldr_code;
+ int ldrs_code;
+ int ldc_code;
+};
+
+typedef enum
+{
+ /* Varieties of non-ALU group relocation. */
+
+ GROUP_LDR,
+ GROUP_LDRS,
+ GROUP_LDC
+} group_reloc_type;
+
+static struct group_reloc_table_entry group_reloc_table[] =
+ { /* Program counter relative: */
+ { "pc_g0_nc",
+ BFD_RELOC_ARM_ALU_PC_G0_NC, /* ALU */
+ 0, /* LDR */
+ 0, /* LDRS */
+ 0 }, /* LDC */
+ { "pc_g0",
+ BFD_RELOC_ARM_ALU_PC_G0, /* ALU */
+ BFD_RELOC_ARM_LDR_PC_G0, /* LDR */
+ BFD_RELOC_ARM_LDRS_PC_G0, /* LDRS */
+ BFD_RELOC_ARM_LDC_PC_G0 }, /* LDC */
+ { "pc_g1_nc",
+ BFD_RELOC_ARM_ALU_PC_G1_NC, /* ALU */
+ 0, /* LDR */
+ 0, /* LDRS */
+ 0 }, /* LDC */
+ { "pc_g1",
+ BFD_RELOC_ARM_ALU_PC_G1, /* ALU */
+ BFD_RELOC_ARM_LDR_PC_G1, /* LDR */
+ BFD_RELOC_ARM_LDRS_PC_G1, /* LDRS */
+ BFD_RELOC_ARM_LDC_PC_G1 }, /* LDC */
+ { "pc_g2",
+ BFD_RELOC_ARM_ALU_PC_G2, /* ALU */
+ BFD_RELOC_ARM_LDR_PC_G2, /* LDR */
+ BFD_RELOC_ARM_LDRS_PC_G2, /* LDRS */
+ BFD_RELOC_ARM_LDC_PC_G2 }, /* LDC */
+ /* Section base relative */
+ { "sb_g0_nc",
+ BFD_RELOC_ARM_ALU_SB_G0_NC, /* ALU */
+ 0, /* LDR */
+ 0, /* LDRS */
+ 0 }, /* LDC */
+ { "sb_g0",
+ BFD_RELOC_ARM_ALU_SB_G0, /* ALU */
+ BFD_RELOC_ARM_LDR_SB_G0, /* LDR */
+ BFD_RELOC_ARM_LDRS_SB_G0, /* LDRS */
+ BFD_RELOC_ARM_LDC_SB_G0 }, /* LDC */
+ { "sb_g1_nc",
+ BFD_RELOC_ARM_ALU_SB_G1_NC, /* ALU */
+ 0, /* LDR */
+ 0, /* LDRS */
+ 0 }, /* LDC */
+ { "sb_g1",
+ BFD_RELOC_ARM_ALU_SB_G1, /* ALU */
+ BFD_RELOC_ARM_LDR_SB_G1, /* LDR */
+ BFD_RELOC_ARM_LDRS_SB_G1, /* LDRS */
+ BFD_RELOC_ARM_LDC_SB_G1 }, /* LDC */
+ { "sb_g2",
+ BFD_RELOC_ARM_ALU_SB_G2, /* ALU */
+ BFD_RELOC_ARM_LDR_SB_G2, /* LDR */
+ BFD_RELOC_ARM_LDRS_SB_G2, /* LDRS */
+ BFD_RELOC_ARM_LDC_SB_G2 } }; /* LDC */
+
+/* Given the address of a pointer pointing to the textual name of a group
+ relocation as may appear in assembler source, attempt to find its details
+ in group_reloc_table. The pointer will be updated to the character after
+ the trailing colon. On failure, FAIL will be returned; SUCCESS
+ otherwise. On success, *entry will be updated to point at the relevant
+ group_reloc_table entry. */
+
+static int
+find_group_reloc_table_entry (char **str, struct group_reloc_table_entry **out)
+{
+ unsigned int i;
+ for (i = 0; i < ARRAY_SIZE (group_reloc_table); i++)
+ {
+ int length = strlen (group_reloc_table[i].name);
+
+ if (strncasecmp (group_reloc_table[i].name, *str, length) == 0 &&
+ (*str)[length] == ':')
+ {
+ *out = &group_reloc_table[i];
+ *str += (length + 1);
+ return SUCCESS;
+ }
+ }
+
+ return FAIL;
+}
+
+/* Parse a <shifter_operand> for an ARM data processing instruction
+ (as for parse_shifter_operand) where group relocations are allowed:
+
+ #<immediate>
+ #<immediate>, <rotate>
+ #:<group_reloc>:<expression>
+ <Rm>
+ <Rm>, <shift>
+
+ where <group_reloc> is one of the strings defined in group_reloc_table.
+ The hashes are optional.
+
+ Everything else is as for parse_shifter_operand. */
+
+static parse_operand_result
+parse_shifter_operand_group_reloc (char **str, int i)
+{
+ /* Determine if we have the sequence of characters #: or just :
+ coming next. If we do, then we check for a group relocation.
+ If we don't, punt the whole lot to parse_shifter_operand. */
+
+ if (((*str)[0] == '#' && (*str)[1] == ':')
+ || (*str)[0] == ':')
+ {
+ struct group_reloc_table_entry *entry;
+
+ if ((*str)[0] == '#')
+ (*str) += 2;
+ else
+ (*str)++;
+
+ /* Try to parse a group relocation. Anything else is an error. */
+ if (find_group_reloc_table_entry (str, &entry) == FAIL)
+ {
+ inst.error = _("unknown group relocation");
+ return PARSE_OPERAND_FAIL_NO_BACKTRACK;
+ }
+
+ /* We now have the group relocation table entry corresponding to
+ the name in the assembler source. Next, we parse the expression. */
+ if (my_get_expression (&inst.reloc.exp, str, GE_NO_PREFIX))
+ return PARSE_OPERAND_FAIL_NO_BACKTRACK;
+
+ /* Record the relocation type (always the ALU variant here). */
+ inst.reloc.type = entry->alu_code;
+ assert (inst.reloc.type != 0);
+
+ return PARSE_OPERAND_SUCCESS;
+ }
+ else
+ return parse_shifter_operand (str, i) == SUCCESS
+ ? PARSE_OPERAND_SUCCESS : PARSE_OPERAND_FAIL;
+
+ /* Never reached. */
+}
+
/* Parse all forms of an ARM address expression. Information is written
to inst.operands[i] and/or inst.reloc.
@@ -3349,8 +4552,9 @@ parse_shifter_operand (char **str, int i)
It is the caller's responsibility to check for addressing modes not
supported by the instruction, and to set inst.reloc.type. */
-static int
-parse_address (char **str, int i)
+static parse_operand_result
+parse_address_main (char **str, int i, int group_relocations,
+ group_reloc_type group_type)
{
char *p = *str;
int reg;
@@ -3368,16 +4572,16 @@ parse_address (char **str, int i)
/* else a load-constant pseudo op, no special treatment needed here */
if (my_get_expression (&inst.reloc.exp, &p, GE_NO_PREFIX))
- return FAIL;
+ return PARSE_OPERAND_FAIL;
*str = p;
- return SUCCESS;
+ return PARSE_OPERAND_SUCCESS;
}
if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) == FAIL)
{
inst.error = _(reg_expected_msgs[REG_TYPE_RN]);
- return FAIL;
+ return PARSE_OPERAND_FAIL;
}
inst.operands[i].reg = reg;
inst.operands[i].isreg = 1;
@@ -3396,8 +4600,25 @@ parse_address (char **str, int i)
if (skip_past_comma (&p) == SUCCESS)
if (parse_shift (&p, i, SHIFT_IMMEDIATE) == FAIL)
- return FAIL;
+ return PARSE_OPERAND_FAIL;
}
+ else if (skip_past_char (&p, ':') == SUCCESS)
+ {
+ /* FIXME: '@' should be used here, but it's filtered out by generic
+ code before we get to see it here. This may be subject to
+ change. */
+ expressionS exp;
+ my_get_expression (&exp, &p, GE_NO_PREFIX);
+ if (exp.X_op != O_constant)
+ {
+ inst.error = _("alignment must be constant");
+ return PARSE_OPERAND_FAIL;
+ }
+ inst.operands[i].imm = exp.X_add_number << 8;
+ inst.operands[i].immisalign = 1;
+ /* Alignments are not pre-indexes. */
+ inst.operands[i].preind = 0;
+ }
else
{
if (inst.operands[i].negative)
@@ -3405,15 +4626,68 @@ parse_address (char **str, int i)
inst.operands[i].negative = 0;
p--;
}
- if (my_get_expression (&inst.reloc.exp, &p, GE_IMM_PREFIX))
- return FAIL;
+
+ if (group_relocations &&
+ ((*p == '#' && *(p + 1) == ':') || *p == ':'))
+
+ {
+ struct group_reloc_table_entry *entry;
+
+ /* Skip over the #: or : sequence. */
+ if (*p == '#')
+ p += 2;
+ else
+ p++;
+
+ /* Try to parse a group relocation. Anything else is an
+ error. */
+ if (find_group_reloc_table_entry (&p, &entry) == FAIL)
+ {
+ inst.error = _("unknown group relocation");
+ return PARSE_OPERAND_FAIL_NO_BACKTRACK;
+ }
+
+ /* We now have the group relocation table entry corresponding to
+ the name in the assembler source. Next, we parse the
+ expression. */
+ if (my_get_expression (&inst.reloc.exp, &p, GE_NO_PREFIX))
+ return PARSE_OPERAND_FAIL_NO_BACKTRACK;
+
+ /* Record the relocation type. */
+ switch (group_type)
+ {
+ case GROUP_LDR:
+ inst.reloc.type = entry->ldr_code;
+ break;
+
+ case GROUP_LDRS:
+ inst.reloc.type = entry->ldrs_code;
+ break;
+
+ case GROUP_LDC:
+ inst.reloc.type = entry->ldc_code;
+ break;
+
+ default:
+ assert (0);
+ }
+
+ if (inst.reloc.type == 0)
+ {
+ inst.error = _("this group relocation is not allowed on this instruction");
+ return PARSE_OPERAND_FAIL_NO_BACKTRACK;
+ }
+ }
+ else
+ if (my_get_expression (&inst.reloc.exp, &p, GE_IMM_PREFIX))
+ return PARSE_OPERAND_FAIL;
}
}
if (skip_past_char (&p, ']') == FAIL)
{
inst.error = _("']' expected");
- return FAIL;
+ return PARSE_OPERAND_FAIL;
}
if (skip_past_char (&p, '!') == SUCCESS)
@@ -3426,20 +4700,20 @@ parse_address (char **str, int i)
/* [Rn], {expr} - unindexed, with option */
if (parse_immediate (&p, &inst.operands[i].imm,
0, 255, TRUE) == FAIL)
- return FAIL;
+ return PARSE_OPERAND_FAIL;
if (skip_past_char (&p, '}') == FAIL)
{
inst.error = _("'}' expected at end of 'option' field");
- return FAIL;
+ return PARSE_OPERAND_FAIL;
}
if (inst.operands[i].preind)
{
inst.error = _("cannot combine index with option");
- return FAIL;
+ return PARSE_OPERAND_FAIL;
}
*str = p;
- return SUCCESS;
+ return PARSE_OPERAND_SUCCESS;
}
else
{
@@ -3449,7 +4723,7 @@ parse_address (char **str, int i)
if (inst.operands[i].preind)
{
inst.error = _("cannot combine pre- and post-indexing");
- return FAIL;
+ return PARSE_OPERAND_FAIL;
}
if (*p == '+') p++;
@@ -3457,12 +4731,17 @@ parse_address (char **str, int i)
if ((reg = arm_reg_parse (&p, REG_TYPE_RN)) != FAIL)
{
- inst.operands[i].imm = reg;
+ /* We might be using the immediate for alignment already. If we
+ are, OR the register number into the low-order bits. */
+ if (inst.operands[i].immisalign)
+ inst.operands[i].imm |= reg;
+ else
+ inst.operands[i].imm = reg;
inst.operands[i].immisreg = 1;
if (skip_past_comma (&p) == SUCCESS)
if (parse_shift (&p, i, SHIFT_IMMEDIATE) == FAIL)
- return FAIL;
+ return PARSE_OPERAND_FAIL;
}
else
{
@@ -3472,7 +4751,7 @@ parse_address (char **str, int i)
p--;
}
if (my_get_expression (&inst.reloc.exp, &p, GE_IMM_PREFIX))
- return FAIL;
+ return PARSE_OPERAND_FAIL;
}
}
}
@@ -3486,6 +4765,59 @@ parse_address (char **str, int i)
inst.reloc.exp.X_add_number = 0;
}
*str = p;
+ return PARSE_OPERAND_SUCCESS;
+}
+
+static int
+parse_address (char **str, int i)
+{
+ return parse_address_main (str, i, 0, 0) == PARSE_OPERAND_SUCCESS
+ ? SUCCESS : FAIL;
+}
+
+static parse_operand_result
+parse_address_group_reloc (char **str, int i, group_reloc_type type)
+{
+ return parse_address_main (str, i, 1, type);
+}
+
+/* Parse an operand for a MOVW or MOVT instruction. */
+static int
+parse_half (char **str)
+{
+ char * p;
+
+ p = *str;
+ skip_past_char (&p, '#');
+ if (strncasecmp (p, ":lower16:", 9) == 0)
+ inst.reloc.type = BFD_RELOC_ARM_MOVW;
+ else if (strncasecmp (p, ":upper16:", 9) == 0)
+ inst.reloc.type = BFD_RELOC_ARM_MOVT;
+
+ if (inst.reloc.type != BFD_RELOC_UNUSED)
+ {
+ p += 9;
+ skip_whitespace(p);
+ }
+
+ if (my_get_expression (&inst.reloc.exp, &p, GE_NO_PREFIX))
+ return FAIL;
+
+ if (inst.reloc.type == BFD_RELOC_UNUSED)
+ {
+ if (inst.reloc.exp.X_op != O_constant)
+ {
+ inst.error = _("constant expression expected");
+ return FAIL;
+ }
+ if (inst.reloc.exp.X_add_number < 0
+ || inst.reloc.exp.X_add_number > 0xffff)
+ {
+ inst.error = _("immediate value out of range");
+ return FAIL;
+ }
+ }
+ *str = p;
return SUCCESS;
}
@@ -3752,6 +5084,228 @@ parse_tb (char **str)
return SUCCESS;
}
+/* Parse the operands of a Neon VMOV instruction. See do_neon_mov for more
+ information on the types the operands can take and how they are encoded.
+ Up to four operands may be read; this function handles setting the
+ ".present" field for each read operand itself.
+ Updates STR and WHICH_OPERAND if parsing is successful and returns SUCCESS,
+ else returns FAIL. */
+
+static int
+parse_neon_mov (char **str, int *which_operand)
+{
+ int i = *which_operand, val;
+ enum arm_reg_type rtype;
+ char *ptr = *str;
+ struct neon_type_el optype;
+
+ if ((val = parse_scalar (&ptr, 8, &optype)) != FAIL)
+ {
+ /* Case 4: VMOV<c><q>.<size> <Dn[x]>, <Rd>. */
+ inst.operands[i].reg = val;
+ inst.operands[i].isscalar = 1;
+ inst.operands[i].vectype = optype;
+ inst.operands[i++].present = 1;
+
+ if (skip_past_comma (&ptr) == FAIL)
+ goto wanted_comma;
+
+ if ((val = arm_reg_parse (&ptr, REG_TYPE_RN)) == FAIL)
+ goto wanted_arm;
+
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].present = 1;
+ }
+ else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype, &optype))
+ != FAIL)
+ {
+ /* Cases 0, 1, 2, 3, 5 (D only). */
+ if (skip_past_comma (&ptr) == FAIL)
+ goto wanted_comma;
+
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].isquad = (rtype == REG_TYPE_NQ);
+ inst.operands[i].issingle = (rtype == REG_TYPE_VFS);
+ inst.operands[i].isvec = 1;
+ inst.operands[i].vectype = optype;
+ inst.operands[i++].present = 1;
+
+ if ((val = arm_reg_parse (&ptr, REG_TYPE_RN)) != FAIL)
+ {
+ /* Case 5: VMOV<c><q> <Dm>, <Rd>, <Rn>.
+ Case 13: VMOV <Sd>, <Rm> */
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].present = 1;
+
+ if (rtype == REG_TYPE_NQ)
+ {
+ first_error (_("can't use Neon quad register here"));
+ return FAIL;
+ }
+ else if (rtype != REG_TYPE_VFS)
+ {
+ i++;
+ if (skip_past_comma (&ptr) == FAIL)
+ goto wanted_comma;
+ if ((val = arm_reg_parse (&ptr, REG_TYPE_RN)) == FAIL)
+ goto wanted_arm;
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].present = 1;
+ }
+ }
+ else if (parse_qfloat_immediate (&ptr, &inst.operands[i].imm) == SUCCESS)
+ /* Case 2: VMOV<c><q>.<dt> <Qd>, #<float-imm>
+ Case 3: VMOV<c><q>.<dt> <Dd>, #<float-imm>
+ Case 10: VMOV.F32 <Sd>, #<imm>
+ Case 11: VMOV.F64 <Dd>, #<imm> */
+ inst.operands[i].immisfloat = 1;
+ else if (parse_big_immediate (&ptr, i) == SUCCESS)
+ /* Case 2: VMOV<c><q>.<dt> <Qd>, #<imm>
+ Case 3: VMOV<c><q>.<dt> <Dd>, #<imm> */
+ ;
+ else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype,
+ &optype)) != FAIL)
+ {
+ /* Case 0: VMOV<c><q> <Qd>, <Qm>
+ Case 1: VMOV<c><q> <Dd>, <Dm>
+ Case 8: VMOV.F32 <Sd>, <Sm>
+ Case 15: VMOV <Sd>, <Se>, <Rn>, <Rm> */
+
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].isquad = (rtype == REG_TYPE_NQ);
+ inst.operands[i].issingle = (rtype == REG_TYPE_VFS);
+ inst.operands[i].isvec = 1;
+ inst.operands[i].vectype = optype;
+ inst.operands[i].present = 1;
+
+ if (skip_past_comma (&ptr) == SUCCESS)
+ {
+ /* Case 15. */
+ i++;
+
+ if ((val = arm_reg_parse (&ptr, REG_TYPE_RN)) == FAIL)
+ goto wanted_arm;
+
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i++].present = 1;
+
+ if (skip_past_comma (&ptr) == FAIL)
+ goto wanted_comma;
+
+ if ((val = arm_reg_parse (&ptr, REG_TYPE_RN)) == FAIL)
+ goto wanted_arm;
+
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i++].present = 1;
+ }
+ }
+ else
+ {
+ first_error (_("expected <Rm> or <Dm> or <Qm> operand"));
+ return FAIL;
+ }
+ }
+ else if ((val = arm_reg_parse (&ptr, REG_TYPE_RN)) != FAIL)
+ {
+ /* Cases 6, 7. */
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i++].present = 1;
+
+ if (skip_past_comma (&ptr) == FAIL)
+ goto wanted_comma;
+
+ if ((val = parse_scalar (&ptr, 8, &optype)) != FAIL)
+ {
+ /* Case 6: VMOV<c><q>.<dt> <Rd>, <Dn[x]> */
+ inst.operands[i].reg = val;
+ inst.operands[i].isscalar = 1;
+ inst.operands[i].present = 1;
+ inst.operands[i].vectype = optype;
+ }
+ else if ((val = arm_reg_parse (&ptr, REG_TYPE_RN)) != FAIL)
+ {
+ /* Case 7: VMOV<c><q> <Rd>, <Rn>, <Dm> */
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i++].present = 1;
+
+ if (skip_past_comma (&ptr) == FAIL)
+ goto wanted_comma;
+
+ if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_VFSD, &rtype, &optype))
+ == FAIL)
+ {
+ first_error (_(reg_expected_msgs[REG_TYPE_VFSD]));
+ return FAIL;
+ }
+
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].isvec = 1;
+ inst.operands[i].issingle = (rtype == REG_TYPE_VFS);
+ inst.operands[i].vectype = optype;
+ inst.operands[i].present = 1;
+
+ if (rtype == REG_TYPE_VFS)
+ {
+ /* Case 14. */
+ i++;
+ if (skip_past_comma (&ptr) == FAIL)
+ goto wanted_comma;
+ if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_VFS, NULL,
+ &optype)) == FAIL)
+ {
+ first_error (_(reg_expected_msgs[REG_TYPE_VFS]));
+ return FAIL;
+ }
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].isvec = 1;
+ inst.operands[i].issingle = 1;
+ inst.operands[i].vectype = optype;
+ inst.operands[i].present = 1;
+ }
+ }
+ else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_VFS, NULL, &optype))
+ != FAIL)
+ {
+ /* Case 13. */
+ inst.operands[i].reg = val;
+ inst.operands[i].isreg = 1;
+ inst.operands[i].isvec = 1;
+ inst.operands[i].issingle = 1;
+ inst.operands[i].vectype = optype;
+ inst.operands[i++].present = 1;
+ }
+ }
+ else
+ {
+ first_error (_("parse error"));
+ return FAIL;
+ }
+
+ /* Successfully parsed the operands. Update args. */
+ *which_operand = i;
+ *str = ptr;
+ return SUCCESS;
+
+ wanted_comma:
+ first_error (_("expected comma"));
+ return FAIL;
+
+ wanted_arm:
+ first_error (_(reg_expected_msgs[REG_TYPE_RN]));
+ return FAIL;
+}
+
/* Matcher codes for parse_operands. */
enum operand_parse_code
{
@@ -3765,7 +5319,13 @@ enum operand_parse_code
OP_RCN, /* Coprocessor register */
OP_RF, /* FPA register */
OP_RVS, /* VFP single precision register */
- OP_RVD, /* VFP double precision register */
+ OP_RVD, /* VFP double precision register (0..15) */
+ OP_RND, /* Neon double precision register (0..31) */
+ OP_RNQ, /* Neon quad precision register */
+ OP_RVSD, /* VFP single or double precision register */
+ OP_RNDQ, /* Neon double or quad precision register */
+ OP_RNSDQ, /* Neon single, double or quad precision register */
+ OP_RNSC, /* Neon scalar D[X] */
OP_RVC, /* VFP control register */
OP_RMF, /* Maverick F register */
OP_RMD, /* Maverick D register */
@@ -3781,16 +5341,36 @@ enum operand_parse_code
OP_REGLST, /* ARM register list */
OP_VRSLST, /* VFP single-precision register list */
OP_VRDLST, /* VFP double-precision register list */
-
+ OP_VRSDLST, /* VFP single or double-precision register list (& quad) */
+ OP_NRDLST, /* Neon double-precision register list (d0-d31, qN aliases) */
+ OP_NSTRLST, /* Neon element/structure list */
+
+ OP_NILO, /* Neon immediate/logic operands 2 or 2+3. (VBIC, VORR...) */
+ OP_RNDQ_I0, /* Neon D or Q reg, or immediate zero. */
+ OP_RVSD_I0, /* VFP S or D reg, or immediate zero. */
+ OP_RR_RNSC, /* ARM reg or Neon scalar. */
+ OP_RNSDQ_RNSC, /* Vector S, D or Q reg, or Neon scalar. */
+ OP_RNDQ_RNSC, /* Neon D or Q reg, or Neon scalar. */
+ OP_RND_RNSC, /* Neon D reg, or Neon scalar. */
+ OP_VMOV, /* Neon VMOV operands. */
+ OP_RNDQ_IMVNb,/* Neon D or Q reg, or immediate good for VMVN. */
+ OP_RNDQ_I63b, /* Neon D or Q reg, or immediate for shift. */
+ OP_RIWR_I32z, /* iWMMXt wR register, or immediate 0 .. 32 for iWMMXt2. */
+
+ OP_I0, /* immediate zero */
OP_I7, /* immediate value 0 .. 7 */
OP_I15, /* 0 .. 15 */
OP_I16, /* 1 .. 16 */
+ OP_I16z, /* 0 .. 16 */
OP_I31, /* 0 .. 31 */
OP_I31w, /* 0 .. 31, optional trailing ! */
OP_I32, /* 1 .. 32 */
+ OP_I32z, /* 0 .. 32 */
+ OP_I63, /* 0 .. 63 */
OP_I63s, /* -64 .. 63 */
+ OP_I64, /* 1 .. 64 */
+ OP_I64z, /* 0 .. 64 */
OP_I255, /* 0 .. 255 */
- OP_Iffff, /* 0 .. 65535 */
OP_I4b, /* immediate, prefix optional, 1 .. 4 */
OP_I7b, /* 0 .. 7 */
@@ -3798,10 +5378,15 @@ enum operand_parse_code
OP_I31b, /* 0 .. 31 */
OP_SH, /* shifter operand */
+ OP_SHG, /* shifter operand with possible group relocation */
OP_ADDR, /* Memory address expression (any mode) */
+ OP_ADDRGLDR, /* Mem addr expr (any mode) with possible LDR group reloc */
+ OP_ADDRGLDRS, /* Mem addr expr (any mode) with possible LDRS group reloc */
+ OP_ADDRGLDC, /* Mem addr expr (any mode) with possible LDC group reloc */
OP_EXP, /* arbitrary expression */
OP_EXPi, /* same, with optional immediate prefix */
OP_EXPr, /* same, with optional relocation suffix */
+ OP_HALF, /* 0 .. 65535 or low/high reloc. */
OP_CPSF, /* CPS flags */
OP_ENDI, /* Endianness specifier */
@@ -3809,20 +5394,30 @@ enum operand_parse_code
OP_COND, /* conditional code */
OP_TB, /* Table branch. */
+ OP_RVC_PSR, /* CPSR/SPSR mask for msr, or VFP control register. */
+ OP_APSR_RR, /* ARM register or "APSR_nzcv". */
+
OP_RRnpc_I0, /* ARM register or literal 0 */
OP_RR_EXr, /* ARM register or expression with opt. reloc suff. */
OP_RR_EXi, /* ARM register or expression with imm prefix */
OP_RF_IF, /* FPA register or immediate */
OP_RIWR_RIWC, /* iWMMXt R or C reg */
+ OP_RIWC_RIWG, /* iWMMXt wC or wCG reg */
/* Optional operands. */
OP_oI7b, /* immediate, prefix optional, 0 .. 7 */
OP_oI31b, /* 0 .. 31 */
+ OP_oI32b, /* 1 .. 32 */
OP_oIffffb, /* 0 .. 65535 */
OP_oI255c, /* curly-brace enclosed, 0 .. 255 */
OP_oRR, /* ARM register */
OP_oRRnpc, /* ARM register, not the PC */
+ OP_oRRw, /* ARM register, not r15, optional trailing ! */
+ OP_oRND, /* Optional Neon double precision register */
+ OP_oRNQ, /* Optional Neon quad precision register */
+ OP_oRNDQ, /* Optional Neon double or quad precision register */
+ OP_oRNSDQ, /* Optional single, double or quad precision vector register */
OP_oSHll, /* LSL immediate */
OP_oSHar, /* ASR immediate */
OP_oSHllar, /* LSL or ASR immediate */
@@ -3843,30 +5438,44 @@ parse_operands (char *str, const unsigned char *pattern)
char *backtrack_pos = 0;
const char *backtrack_error = 0;
int i, val, backtrack_index = 0;
+ enum arm_reg_type rtype;
+ parse_operand_result result;
#define po_char_or_fail(chr) do { \
if (skip_past_char (&str, chr) == FAIL) \
goto bad_args; \
} while (0)
-#define po_reg_or_fail(regtype) do { \
- val = arm_reg_parse (&str, regtype); \
- if (val == FAIL) \
- { \
- inst.error = _(reg_expected_msgs[regtype]); \
- goto failure; \
- } \
- inst.operands[i].reg = val; \
- inst.operands[i].isreg = 1; \
+#define po_reg_or_fail(regtype) do { \
+ val = arm_typed_reg_parse (&str, regtype, &rtype, \
+ &inst.operands[i].vectype); \
+ if (val == FAIL) \
+ { \
+ first_error (_(reg_expected_msgs[regtype])); \
+ goto failure; \
+ } \
+ inst.operands[i].reg = val; \
+ inst.operands[i].isreg = 1; \
+ inst.operands[i].isquad = (rtype == REG_TYPE_NQ); \
+ inst.operands[i].issingle = (rtype == REG_TYPE_VFS); \
+ inst.operands[i].isvec = (rtype == REG_TYPE_VFS \
+ || rtype == REG_TYPE_VFD \
+ || rtype == REG_TYPE_NQ); \
} while (0)
-#define po_reg_or_goto(regtype, label) do { \
- val = arm_reg_parse (&str, regtype); \
- if (val == FAIL) \
- goto label; \
- \
- inst.operands[i].reg = val; \
- inst.operands[i].isreg = 1; \
+#define po_reg_or_goto(regtype, label) do { \
+ val = arm_typed_reg_parse (&str, regtype, &rtype, \
+ &inst.operands[i].vectype); \
+ if (val == FAIL) \
+ goto label; \
+ \
+ inst.operands[i].reg = val; \
+ inst.operands[i].isreg = 1; \
+ inst.operands[i].isquad = (rtype == REG_TYPE_NQ); \
+ inst.operands[i].issingle = (rtype == REG_TYPE_VFS); \
+ inst.operands[i].isvec = (rtype == REG_TYPE_VFS \
+ || rtype == REG_TYPE_VFD \
+ || rtype == REG_TYPE_NQ); \
} while (0)
#define po_imm_or_fail(min, max, popt) do { \
@@ -3875,11 +5484,27 @@ parse_operands (char *str, const unsigned char *pattern)
inst.operands[i].imm = val; \
} while (0)
+#define po_scalar_or_goto(elsz, label) do { \
+ val = parse_scalar (&str, elsz, &inst.operands[i].vectype); \
+ if (val == FAIL) \
+ goto label; \
+ inst.operands[i].reg = val; \
+ inst.operands[i].isscalar = 1; \
+} while (0)
+
#define po_misc_or_fail(expr) do { \
if (expr) \
goto failure; \
} while (0)
+#define po_misc_or_fail_no_backtrack(expr) do { \
+ result = expr; \
+ if (result == PARSE_OPERAND_FAIL_NO_BACKTRACK)\
+ backtrack_pos = 0; \
+ if (result != PARSE_OPERAND_SUCCESS) \
+ goto failure; \
+} while (0)
+
skip_whitespace (str);
for (i = 0; upat[i] != OP_stop; i++)
@@ -3893,7 +5518,7 @@ parse_operands (char *str, const unsigned char *pattern)
backtrack_index = i;
}
- if (i > 0)
+ if (i > 0 && (i > 1 || inst.operands[0].present))
po_char_or_fail (',');
switch (upat[i])
@@ -3908,7 +5533,15 @@ parse_operands (char *str, const unsigned char *pattern)
case OP_RF: po_reg_or_fail (REG_TYPE_FN); break;
case OP_RVS: po_reg_or_fail (REG_TYPE_VFS); break;
case OP_RVD: po_reg_or_fail (REG_TYPE_VFD); break;
- case OP_RVC: po_reg_or_fail (REG_TYPE_VFC); break;
+ case OP_oRND:
+ case OP_RND: po_reg_or_fail (REG_TYPE_VFD); break;
+ case OP_RVC:
+ po_reg_or_goto (REG_TYPE_VFC, coproc_reg);
+ break;
+ /* Also accept generic coprocessor regs for unknown registers. */
+ coproc_reg:
+ po_reg_or_fail (REG_TYPE_CN);
+ break;
case OP_RMF: po_reg_or_fail (REG_TYPE_MVF); break;
case OP_RMD: po_reg_or_fail (REG_TYPE_MVD); break;
case OP_RMFX: po_reg_or_fail (REG_TYPE_MVFX); break;
@@ -3919,6 +5552,126 @@ parse_operands (char *str, const unsigned char *pattern)
case OP_RIWC: po_reg_or_fail (REG_TYPE_MMXWC); break;
case OP_RIWG: po_reg_or_fail (REG_TYPE_MMXWCG); break;
case OP_RXA: po_reg_or_fail (REG_TYPE_XSCALE); break;
+ case OP_oRNQ:
+ case OP_RNQ: po_reg_or_fail (REG_TYPE_NQ); break;
+ case OP_oRNDQ:
+ case OP_RNDQ: po_reg_or_fail (REG_TYPE_NDQ); break;
+ case OP_RVSD: po_reg_or_fail (REG_TYPE_VFSD); break;
+ case OP_oRNSDQ:
+ case OP_RNSDQ: po_reg_or_fail (REG_TYPE_NSDQ); break;
+
+ /* Neon scalar. Using an element size of 8 means that some invalid
+ scalars are accepted here, so deal with those in later code. */
+ case OP_RNSC: po_scalar_or_goto (8, failure); break;
+
+ /* WARNING: We can expand to two operands here. This has the potential
+ to totally confuse the backtracking mechanism! It will be OK at
+ least as long as we don't try to use optional args as well,
+ though. */
+ case OP_NILO:
+ {
+ po_reg_or_goto (REG_TYPE_NDQ, try_imm);
+ inst.operands[i].present = 1;
+ i++;
+ skip_past_comma (&str);
+ po_reg_or_goto (REG_TYPE_NDQ, one_reg_only);
+ break;
+ one_reg_only:
+ /* Optional register operand was omitted. Unfortunately, it's in
+ operands[i-1] and we need it to be in inst.operands[i]. Fix that
+ here (this is a bit grotty). */
+ inst.operands[i] = inst.operands[i-1];
+ inst.operands[i-1].present = 0;
+ break;
+ try_imm:
+ /* There's a possibility of getting a 64-bit immediate here, so
+ we need special handling. */
+ if (parse_big_immediate (&str, i) == FAIL)
+ {
+ inst.error = _("immediate value is out of range");
+ goto failure;
+ }
+ }
+ break;
+
+ case OP_RNDQ_I0:
+ {
+ po_reg_or_goto (REG_TYPE_NDQ, try_imm0);
+ break;
+ try_imm0:
+ po_imm_or_fail (0, 0, TRUE);
+ }
+ break;
+
+ case OP_RVSD_I0:
+ po_reg_or_goto (REG_TYPE_VFSD, try_imm0);
+ break;
+
+ case OP_RR_RNSC:
+ {
+ po_scalar_or_goto (8, try_rr);
+ break;
+ try_rr:
+ po_reg_or_fail (REG_TYPE_RN);
+ }
+ break;
+
+ case OP_RNSDQ_RNSC:
+ {
+ po_scalar_or_goto (8, try_nsdq);
+ break;
+ try_nsdq:
+ po_reg_or_fail (REG_TYPE_NSDQ);
+ }
+ break;
+
+ case OP_RNDQ_RNSC:
+ {
+ po_scalar_or_goto (8, try_ndq);
+ break;
+ try_ndq:
+ po_reg_or_fail (REG_TYPE_NDQ);
+ }
+ break;
+
+ case OP_RND_RNSC:
+ {
+ po_scalar_or_goto (8, try_vfd);
+ break;
+ try_vfd:
+ po_reg_or_fail (REG_TYPE_VFD);
+ }
+ break;
+
+ case OP_VMOV:
+ /* WARNING: parse_neon_mov can move the operand counter, i. If we're
+ not careful then bad things might happen. */
+ po_misc_or_fail (parse_neon_mov (&str, &i) == FAIL);
+ break;
+
+ case OP_RNDQ_IMVNb:
+ {
+ po_reg_or_goto (REG_TYPE_NDQ, try_mvnimm);
+ break;
+ try_mvnimm:
+ /* There's a possibility of getting a 64-bit immediate here, so
+ we need special handling. */
+ if (parse_big_immediate (&str, i) == FAIL)
+ {
+ inst.error = _("immediate value is out of range");
+ goto failure;
+ }
+ }
+ break;
+
+ case OP_RNDQ_I63b:
+ {
+ po_reg_or_goto (REG_TYPE_NDQ, try_shimm);
+ break;
+ try_shimm:
+ po_imm_or_fail (0, 63, TRUE);
+ }
+ break;
case OP_RRnpcb:
po_char_or_fail ('[');
@@ -3927,6 +5680,7 @@ parse_operands (char *str, const unsigned char *pattern)
break;
case OP_RRw:
+ case OP_oRRw:
po_reg_or_fail (REG_TYPE_RN);
if (skip_past_char (&str, '!') == SUCCESS)
inst.operands[i].writeback = 1;
@@ -3936,11 +5690,15 @@ parse_operands (char *str, const unsigned char *pattern)
case OP_I7: po_imm_or_fail ( 0, 7, FALSE); break;
case OP_I15: po_imm_or_fail ( 0, 15, FALSE); break;
case OP_I16: po_imm_or_fail ( 1, 16, FALSE); break;
+ case OP_I16z: po_imm_or_fail ( 0, 16, FALSE); break;
case OP_I31: po_imm_or_fail ( 0, 31, FALSE); break;
case OP_I32: po_imm_or_fail ( 1, 32, FALSE); break;
+ case OP_I32z: po_imm_or_fail ( 0, 32, FALSE); break;
case OP_I63s: po_imm_or_fail (-64, 63, FALSE); break;
+ case OP_I63: po_imm_or_fail ( 0, 63, FALSE); break;
+ case OP_I64: po_imm_or_fail ( 1, 64, FALSE); break;
+ case OP_I64z: po_imm_or_fail ( 0, 64, FALSE); break;
case OP_I255: po_imm_or_fail ( 0, 255, FALSE); break;
- case OP_Iffff: po_imm_or_fail ( 0, 0xffff, FALSE); break;
case OP_I4b: po_imm_or_fail ( 1, 4, TRUE); break;
case OP_oI7b:
@@ -3948,6 +5706,7 @@ parse_operands (char *str, const unsigned char *pattern)
case OP_I15b: po_imm_or_fail ( 0, 15, TRUE); break;
case OP_oI31b:
case OP_I31b: po_imm_or_fail ( 0, 31, TRUE); break;
+ case OP_oI32b: po_imm_or_fail ( 1, 32, TRUE); break;
case OP_oIffffb: po_imm_or_fail ( 0, 0xffff, TRUE); break;
/* Immediate variants */
@@ -4005,6 +5764,11 @@ parse_operands (char *str, const unsigned char *pattern)
}
break;
+ /* Operand for MOVW or MOVT. */
+ case OP_HALF:
+ po_misc_or_fail (parse_half (&str));
+ break;
+
/* Register or expression */
case OP_RR_EXr: po_reg_or_goto (REG_TYPE_RN, EXPr); break;
case OP_RR_EXi: po_reg_or_goto (REG_TYPE_RN, EXPi); break;
@@ -4027,13 +5791,17 @@ parse_operands (char *str, const unsigned char *pattern)
inst.operands[i].isreg = 1;
break;
+ case OP_RIWR_I32z: po_reg_or_goto (REG_TYPE_MMXWR, I32z); break;
+ I32z: po_imm_or_fail (0, 32, FALSE); break;
+
/* Two kinds of register */
case OP_RIWR_RIWC:
{
struct reg_entry *rege = arm_reg_parse_multi (&str);
- if (rege->type != REG_TYPE_MMXWR
- && rege->type != REG_TYPE_MMXWC
- && rege->type != REG_TYPE_MMXWCG)
+ if (!rege
+ || (rege->type != REG_TYPE_MMXWR
+ && rege->type != REG_TYPE_MMXWC
+ && rege->type != REG_TYPE_MMXWCG))
{
inst.error = _("iWMMXt data or control register expected");
goto failure;
@@ -4043,6 +5811,21 @@ parse_operands (char *str, const unsigned char *pattern)
}
break;
+ case OP_RIWC_RIWG:
+ {
+ struct reg_entry *rege = arm_reg_parse_multi (&str);
+ if (!rege
+ || (rege->type != REG_TYPE_MMXWC
+ && rege->type != REG_TYPE_MMXWCG))
+ {
+ inst.error = _("iWMMXt control register expected");
+ goto failure;
+ }
+ inst.operands[i].reg = rege->number;
+ inst.operands[i].isreg = 1;
+ }
+ break;
+
/* Misc */
case OP_CPSF: val = parse_cps_flags (&str); break;
case OP_ENDI: val = parse_endian_specifier (&str); break;
@@ -4051,6 +5834,41 @@ parse_operands (char *str, const unsigned char *pattern)
case OP_COND: val = parse_cond (&str); break;
case OP_oBARRIER:val = parse_barrier (&str); break;
+ case OP_RVC_PSR:
+ po_reg_or_goto (REG_TYPE_VFC, try_psr);
+ inst.operands[i].isvec = 1; /* Mark VFP control reg as vector. */
+ break;
+ try_psr:
+ val = parse_psr (&str);
+ break;
+
+ case OP_APSR_RR:
+ po_reg_or_goto (REG_TYPE_RN, try_apsr);
+ break;
+ try_apsr:
+ /* Parse "APSR_nvzc" operand (for FMSTAT-equivalent MRS
+ instruction). */
+ if (strncasecmp (str, "APSR_", 5) == 0)
+ {
+ unsigned found = 0;
+ str += 5;
+ while (found < 15)
+ switch (*str++)
+ {
+ case 'c': found = (found & 1) ? 16 : found | 1; break;
+ case 'n': found = (found & 2) ? 16 : found | 2; break;
+ case 'z': found = (found & 4) ? 16 : found | 4; break;
+ case 'v': found = (found & 8) ? 16 : found | 8; break;
+ default: found = 16;
+ }
+ if (found != 15)
+ goto failure;
+ inst.operands[i].isvec = 1;
+ }
+ else
+ goto failure;
+ break;
+
case OP_TB:
po_misc_or_fail (parse_tb (&str));
break;
@@ -4066,22 +5884,65 @@ parse_operands (char *str, const unsigned char *pattern)
break;
case OP_VRSLST:
- val = parse_vfp_reg_list (&str, &inst.operands[i].reg, 0);
+ val = parse_vfp_reg_list (&str, &inst.operands[i].reg, REGLIST_VFP_S);
break;
case OP_VRDLST:
- val = parse_vfp_reg_list (&str, &inst.operands[i].reg, 1);
+ val = parse_vfp_reg_list (&str, &inst.operands[i].reg, REGLIST_VFP_D);
break;
+ case OP_VRSDLST:
+ /* Allow Q registers too. */
+ val = parse_vfp_reg_list (&str, &inst.operands[i].reg,
+ REGLIST_NEON_D);
+ if (val == FAIL)
+ {
+ inst.error = NULL;
+ val = parse_vfp_reg_list (&str, &inst.operands[i].reg,
+ REGLIST_VFP_S);
+ inst.operands[i].issingle = 1;
+ }
+ break;
+
+ case OP_NRDLST:
+ val = parse_vfp_reg_list (&str, &inst.operands[i].reg,
+ REGLIST_NEON_D);
+ break;
+
+ case OP_NSTRLST:
+ val = parse_neon_el_struct_list (&str, &inst.operands[i].reg,
+ &inst.operands[i].vectype);
+ break;
+
/* Addressing modes */
case OP_ADDR:
po_misc_or_fail (parse_address (&str, i));
break;
+ case OP_ADDRGLDR:
+ po_misc_or_fail_no_backtrack (
+ parse_address_group_reloc (&str, i, GROUP_LDR));
+ break;
+
+ case OP_ADDRGLDRS:
+ po_misc_or_fail_no_backtrack (
+ parse_address_group_reloc (&str, i, GROUP_LDRS));
+ break;
+
+ case OP_ADDRGLDC:
+ po_misc_or_fail_no_backtrack (
+ parse_address_group_reloc (&str, i, GROUP_LDC));
+ break;
+
case OP_SH:
po_misc_or_fail (parse_shifter_operand (&str, i));
break;
+ case OP_SHG:
+ po_misc_or_fail_no_backtrack (
+ parse_shifter_operand_group_reloc (&str, i));
+ break;
+
case OP_oSHll:
po_misc_or_fail (parse_shift (&str, i, SHIFT_LSL_IMMEDIATE));
break;
@@ -4107,6 +5968,7 @@ parse_operands (char *str, const unsigned char *pattern)
case OP_RRnpc:
case OP_RRnpcb:
case OP_RRw:
+ case OP_oRRw:
case OP_RRnpc_I0:
if (inst.operands[i].isreg && inst.operands[i].reg == REG_PC)
inst.error = BAD_PC;
@@ -4116,11 +5978,15 @@ parse_operands (char *str, const unsigned char *pattern)
case OP_ENDI:
case OP_oROR:
case OP_PSR:
+ case OP_RVC_PSR:
case OP_COND:
case OP_oBARRIER:
case OP_REGLST:
case OP_VRSLST:
case OP_VRDLST:
+ case OP_VRSDLST:
+ case OP_NRDLST:
+ case OP_NSTRLST:
if (val == FAIL)
goto failure;
inst.operands[i].imm = val;
@@ -4178,6 +6044,7 @@ parse_operands (char *str, const unsigned char *pattern)
#undef po_reg_or_fail
#undef po_reg_or_goto
#undef po_imm_or_fail
+#undef po_scalar_or_fail
/* Shorthand macro for instruction encoding functions issuing errors. */
#define constraint(expr, err) do { \
@@ -4236,11 +6103,30 @@ encode_thumb32_immediate (unsigned int val)
return FAIL;
}
-/* Encode a VFP SP register number into inst.instruction. */
+/* Encode a VFP SP or DP register number into inst.instruction. */
static void
-encode_arm_vfp_sp_reg (int reg, enum vfp_sp_reg_pos pos)
-{
+encode_arm_vfp_reg (int reg, enum vfp_reg_pos pos)
+{
+ if ((pos == VFP_REG_Dd || pos == VFP_REG_Dn || pos == VFP_REG_Dm)
+ && reg > 15)
+ {
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, fpu_vfp_ext_v3))
+ {
+ if (thumb_mode)
+ ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
+ fpu_vfp_ext_v3);
+ else
+ ARM_MERGE_FEATURE_SETS (arm_arch_used, arm_arch_used,
+ fpu_vfp_ext_v3);
+ }
+ else
+ {
+ first_error (_("D register out of range for selected VFP version"));
+ return;
+ }
+ }
+
switch (pos)
{
case VFP_REG_Sd:
@@ -4255,6 +6141,18 @@ encode_arm_vfp_sp_reg (int reg, enum vfp_sp_reg_pos pos)
inst.instruction |= ((reg >> 1) << 0) | ((reg & 1) << 5);
break;
+ case VFP_REG_Dd:
+ inst.instruction |= ((reg & 15) << 12) | ((reg >> 4) << 22);
+ break;
+
+ case VFP_REG_Dn:
+ inst.instruction |= ((reg & 15) << 16) | ((reg >> 4) << 7);
+ break;
+
+ case VFP_REG_Dm:
+ inst.instruction |= (reg & 15) | ((reg >> 4) << 5);
+ break;
+
default:
abort ();
}
@@ -4399,7 +6297,8 @@ encode_arm_addr_mode_3 (int i, bfd_boolean is_t)
into a coprocessor load/store instruction. If wb_ok is false,
reject use of writeback; if unind_ok is false, reject use of
unindexed addressing. If reloc_override is not 0, use it instead
- of BFD_ARM_CP_OFF_IMM. */
+ of BFD_ARM_CP_OFF_IMM, unless the initial relocation is a group one
+ (in which case it is preserved). */
static int
encode_arm_cp_address (int i, int wb_ok, int unind_ok, int reloc_override)
@@ -4441,10 +6340,16 @@ encode_arm_cp_address (int i, int wb_ok, int unind_ok, int reloc_override)
if (reloc_override)
inst.reloc.type = reloc_override;
- else if (thumb_mode)
- inst.reloc.type = BFD_RELOC_ARM_T32_CP_OFF_IMM;
- else
- inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM;
+ else if ((inst.reloc.type < BFD_RELOC_ARM_ALU_PC_G0_NC
+ || inst.reloc.type > BFD_RELOC_ARM_LDC_SB_G2)
+ && inst.reloc.type != BFD_RELOC_ARM_LDR_PC_G0)
+ {
+ if (thumb_mode)
+ inst.reloc.type = BFD_RELOC_ARM_T32_CP_OFF_IMM;
+ else
+ inst.reloc.type = BFD_RELOC_ARM_CP_OFF_IMM;
+ }
+
return SUCCESS;
}
@@ -4570,7 +6475,7 @@ static void
do_rd_rm_rn (void)
{
unsigned Rn = inst.operands[2].reg;
- /* Enforce resutrictions on SWP instruction. */
+ /* Enforce restrictions on SWP instruction. */
if ((inst.instruction & 0x0fbfffff) == 0x01000090)
constraint (Rn == inst.operands[0].reg || Rn == inst.operands[1].reg,
_("Rn must not overlap other operands"));
@@ -4894,7 +6799,11 @@ static void
do_cpsi (void)
{
inst.instruction |= inst.operands[0].imm << 6;
- inst.instruction |= inst.operands[1].imm;
+ if (inst.operands[1].present)
+ {
+ inst.instruction |= CPSI_MMOD;
+ inst.instruction |= inst.operands[1].imm;
+ }
}
static void
@@ -5112,17 +7021,16 @@ do_lstc (void)
static void
do_mlas (void)
{
- /* This restriction does not apply to mls (nor to mla in v6, but
- that's hard to detect at present). */
+ /* This restriction does not apply to mls (nor to mla in v6 or later). */
if (inst.operands[0].reg == inst.operands[1].reg
+ && !ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6)
&& !(inst.instruction & 0x00400000))
- as_tsktsk (_("rd and rm should be different in mla"));
+ as_tsktsk (_("Rd and Rm should be different in mla"));
inst.instruction |= inst.operands[0].reg << 16;
inst.instruction |= inst.operands[1].reg;
inst.instruction |= inst.operands[2].reg << 8;
inst.instruction |= inst.operands[3].reg << 12;
-
}
static void
@@ -5136,15 +7044,62 @@ do_mov (void)
static void
do_mov16 (void)
{
+ bfd_vma imm;
+ bfd_boolean top;
+
+ top = (inst.instruction & 0x00400000) != 0;
+ constraint (top && inst.reloc.type == BFD_RELOC_ARM_MOVW,
+ _(":lower16: not allowed this instruction"));
+ constraint (!top && inst.reloc.type == BFD_RELOC_ARM_MOVT,
+ _(":upper16: not allowed instruction"));
inst.instruction |= inst.operands[0].reg << 12;
- /* The value is in two pieces: 0:11, 16:19. */
- inst.instruction |= (inst.operands[1].imm & 0x00000fff);
- inst.instruction |= (inst.operands[1].imm & 0x0000f000) << 4;
+ if (inst.reloc.type == BFD_RELOC_UNUSED)
+ {
+ imm = inst.reloc.exp.X_add_number;
+ /* The value is in two pieces: 0:11, 16:19. */
+ inst.instruction |= (imm & 0x00000fff);
+ inst.instruction |= (imm & 0x0000f000) << 4;
+ }
+}
+
+static void do_vfp_nsyn_opcode (const char *);
+
+static int
+do_vfp_nsyn_mrs (void)
+{
+ if (inst.operands[0].isvec)
+ {
+ if (inst.operands[1].reg != 1)
+ first_error (_("operand 1 must be FPSCR"));
+ memset (&inst.operands[0], '\0', sizeof (inst.operands[0]));
+ memset (&inst.operands[1], '\0', sizeof (inst.operands[1]));
+ do_vfp_nsyn_opcode ("fmstat");
+ }
+ else if (inst.operands[1].isvec)
+ do_vfp_nsyn_opcode ("fmrx");
+ else
+ return FAIL;
+
+ return SUCCESS;
+}
+
+static int
+do_vfp_nsyn_msr (void)
+{
+ if (inst.operands[0].isvec)
+ do_vfp_nsyn_opcode ("fmxr");
+ else
+ return FAIL;
+
+ return SUCCESS;
}
static void
do_mrs (void)
{
+ if (do_vfp_nsyn_mrs () == SUCCESS)
+ return;
+
/* mrs only accepts CPSR/SPSR/CPSR_all/SPSR_all. */
constraint ((inst.operands[1].imm & (PSR_c|PSR_x|PSR_s|PSR_f))
!= (PSR_c|PSR_f),
@@ -5160,6 +7115,9 @@ do_mrs (void)
static void
do_msr (void)
{
+ if (do_vfp_nsyn_msr () == SUCCESS)
+ return;
+
inst.instruction |= inst.operands[0].imm;
if (inst.operands[1].isreg)
inst.instruction |= inst.operands[1].reg;
@@ -5180,8 +7138,9 @@ do_mul (void)
inst.instruction |= inst.operands[1].reg;
inst.instruction |= inst.operands[2].reg << 8;
- if (inst.operands[0].reg == inst.operands[1].reg)
- as_tsktsk (_("rd and rm should be different in mul"));
+ if (inst.operands[0].reg == inst.operands[1].reg
+ && !ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v6))
+ as_tsktsk (_("Rd and Rm should be different in mul"));
}
/* Long Multiply Parser
@@ -5447,13 +7406,25 @@ do_smul (void)
inst.instruction |= inst.operands[2].reg << 8;
}
-/* ARM V6 srs (argument parse). */
+/* ARM V6 srs (argument parse). The variable fields in the encoding are
+ the same for both ARM and Thumb-2. */
static void
do_srs (void)
{
- inst.instruction |= inst.operands[0].imm;
- if (inst.operands[0].writeback)
+ int reg;
+
+ if (inst.operands[0].present)
+ {
+ reg = inst.operands[0].reg;
+ constraint (reg != 13, _("SRS base register must be r13"));
+ }
+ else
+ reg = 13;
+
+ inst.instruction |= reg << 16;
+ inst.instruction |= inst.operands[1].imm;
+ if (inst.operands[0].writeback || inst.operands[1].writeback)
inst.instruction |= WRITE_BACK;
}
@@ -5542,43 +7513,43 @@ do_sxth (void)
static void
do_vfp_sp_monadic (void)
{
- encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sd);
- encode_arm_vfp_sp_reg (inst.operands[1].reg, VFP_REG_Sm);
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Sm);
}
static void
do_vfp_sp_dyadic (void)
{
- encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sd);
- encode_arm_vfp_sp_reg (inst.operands[1].reg, VFP_REG_Sn);
- encode_arm_vfp_sp_reg (inst.operands[2].reg, VFP_REG_Sm);
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Sn);
+ encode_arm_vfp_reg (inst.operands[2].reg, VFP_REG_Sm);
}
static void
do_vfp_sp_compare_z (void)
{
- encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd);
}
static void
do_vfp_dp_sp_cvt (void)
{
- inst.instruction |= inst.operands[0].reg << 12;
- encode_arm_vfp_sp_reg (inst.operands[1].reg, VFP_REG_Sm);
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Sm);
}
static void
do_vfp_sp_dp_cvt (void)
{
- encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sd);
- inst.instruction |= inst.operands[1].reg;
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Dm);
}
static void
do_vfp_reg_from_sp (void)
{
inst.instruction |= inst.operands[0].reg << 12;
- encode_arm_vfp_sp_reg (inst.operands[1].reg, VFP_REG_Sn);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Sn);
}
static void
@@ -5588,13 +7559,13 @@ do_vfp_reg2_from_sp2 (void)
_("only two consecutive VFP SP registers allowed here"));
inst.instruction |= inst.operands[0].reg << 12;
inst.instruction |= inst.operands[1].reg << 16;
- encode_arm_vfp_sp_reg (inst.operands[2].reg, VFP_REG_Sm);
+ encode_arm_vfp_reg (inst.operands[2].reg, VFP_REG_Sm);
}
static void
do_vfp_sp_from_reg (void)
{
- encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sn);
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sn);
inst.instruction |= inst.operands[1].reg << 12;
}
@@ -5603,7 +7574,7 @@ do_vfp_sp2_from_reg2 (void)
{
constraint (inst.operands[0].imm != 2,
_("only two consecutive VFP SP registers allowed here"));
- encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sm);
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sm);
inst.instruction |= inst.operands[1].reg << 12;
inst.instruction |= inst.operands[2].reg << 16;
}
@@ -5611,14 +7582,14 @@ do_vfp_sp2_from_reg2 (void)
static void
do_vfp_sp_ldst (void)
{
- encode_arm_vfp_sp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd);
encode_arm_cp_address (1, FALSE, TRUE, 0);
}
static void
do_vfp_dp_ldst (void)
{
- inst.instruction |= inst.operands[0].reg << 12;
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
encode_arm_cp_address (1, FALSE, TRUE, 0);
}
@@ -5632,7 +7603,7 @@ vfp_sp_ldstm (enum vfp_ldstm_type ldstm_type)
constraint (ldstm_type != VFP_LDSTMIA,
_("this addressing mode requires base-register writeback"));
inst.instruction |= inst.operands[0].reg << 16;
- encode_arm_vfp_sp_reg (inst.operands[1].reg, VFP_REG_Sd);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Sd);
inst.instruction |= inst.operands[1].imm;
}
@@ -5648,7 +7619,7 @@ vfp_dp_ldstm (enum vfp_ldstm_type ldstm_type)
_("this addressing mode requires base-register writeback"));
inst.instruction |= inst.operands[0].reg << 16;
- inst.instruction |= inst.operands[1].reg << 12;
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Dd);
count = inst.operands[1].imm << 1;
if (ldstm_type == VFP_LDSTMIAX || ldstm_type == VFP_LDSTMDBX)
@@ -5692,6 +7663,103 @@ do_vfp_xp_ldstmdb (void)
{
vfp_dp_ldstm (VFP_LDSTMDBX);
}
+
+static void
+do_vfp_dp_rd_rm (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Dm);
+}
+
+static void
+do_vfp_dp_rn_rd (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dn);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Dd);
+}
+
+static void
+do_vfp_dp_rd_rn (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Dn);
+}
+
+static void
+do_vfp_dp_rd_rn_rm (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Dn);
+ encode_arm_vfp_reg (inst.operands[2].reg, VFP_REG_Dm);
+}
+
+static void
+do_vfp_dp_rd (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
+}
+
+static void
+do_vfp_dp_rm_rd_rn (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dm);
+ encode_arm_vfp_reg (inst.operands[1].reg, VFP_REG_Dd);
+ encode_arm_vfp_reg (inst.operands[2].reg, VFP_REG_Dn);
+}
+
+/* VFPv3 instructions. */
+static void
+do_vfp_sp_const (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ inst.instruction |= (inst.operands[1].imm & 0xf0) << 12;
+ inst.instruction |= (inst.operands[1].imm & 0x0f);
+}
+
+static void
+do_vfp_dp_const (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
+ inst.instruction |= (inst.operands[1].imm & 0xf0) << 12;
+ inst.instruction |= (inst.operands[1].imm & 0x0f);
+}
+
+static void
+vfp_conv (int srcsize)
+{
+ unsigned immbits = srcsize - inst.operands[1].imm;
+ inst.instruction |= (immbits & 1) << 5;
+ inst.instruction |= (immbits >> 1);
+}
+
+static void
+do_vfp_sp_conv_16 (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ vfp_conv (16);
+}
+
+static void
+do_vfp_dp_conv_16 (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
+ vfp_conv (16);
+}
+
+static void
+do_vfp_sp_conv_32 (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Sd);
+ vfp_conv (32);
+}
+
+static void
+do_vfp_dp_conv_32 (void)
+{
+ encode_arm_vfp_reg (inst.operands[0].reg, VFP_REG_Dd);
+ vfp_conv (32);
+}
+
/* FPA instructions. Also in a logical order. */
@@ -5740,6 +7808,7 @@ do_fpa_ldmstm (void)
encode_arm_cp_address (2, TRUE, TRUE, 0);
}
+
/* iWMMXt instructions: strictly in alphabetical order. */
@@ -5790,6 +7859,15 @@ do_iwmmxt_waligni (void)
}
static void
+do_iwmmxt_wmerge (void)
+{
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[2].reg;
+ inst.instruction |= inst.operands[3].imm << 21;
+}
+
+static void
do_iwmmxt_wmov (void)
{
/* WMOV rD, rN is an alias for WOR rD, rN, rN. */
@@ -5828,7 +7906,23 @@ static void
do_iwmmxt_wldstd (void)
{
inst.instruction |= inst.operands[0].reg << 12;
- encode_arm_cp_address (1, TRUE, FALSE, 0);
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_cext_iwmmxt2)
+ && inst.operands[1].immisreg)
+ {
+ inst.instruction &= ~0x1a000ff;
+ inst.instruction |= (0xf << 28);
+ if (inst.operands[1].preind)
+ inst.instruction |= PRE_INDEX;
+ if (!inst.operands[1].negative)
+ inst.instruction |= INDEX_UP;
+ if (inst.operands[1].writeback)
+ inst.instruction |= WRITE_BACK;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.reloc.exp.X_add_number << 4;
+ inst.instruction |= inst.operands[1].imm;
+ }
+ else
+ encode_arm_cp_address (1, TRUE, FALSE, 0);
}
static void
@@ -5848,6 +7942,56 @@ do_iwmmxt_wzero (void)
inst.instruction |= inst.operands[0].reg << 12;
inst.instruction |= inst.operands[0].reg << 16;
}
+
+static void
+do_iwmmxt_wrwrwr_or_imm5 (void)
+{
+ if (inst.operands[2].isreg)
+ do_rd_rn_rm ();
+ else {
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_cext_iwmmxt2),
+ _("immediate operand requires iWMMXt2"));
+ do_rd_rn ();
+ if (inst.operands[2].imm == 0)
+ {
+ switch ((inst.instruction >> 20) & 0xf)
+ {
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ /* w...h wrd, wrn, #0 -> wrorh wrd, wrn, #16. */
+ inst.operands[2].imm = 16;
+ inst.instruction = (inst.instruction & 0xff0fffff) | (0x7 << 20);
+ break;
+ case 8:
+ case 9:
+ case 10:
+ case 11:
+ /* w...w wrd, wrn, #0 -> wrorw wrd, wrn, #32. */
+ inst.operands[2].imm = 32;
+ inst.instruction = (inst.instruction & 0xff0fffff) | (0xb << 20);
+ break;
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ {
+ /* w...d wrd, wrn, #0 -> wor wrd, wrn, wrn. */
+ unsigned long wrn;
+ wrn = (inst.instruction >> 16) & 0xf;
+ inst.instruction &= 0xff0fff0f;
+ inst.instruction |= wrn;
+ /* Bail out here; the instruction is now assembled. */
+ return;
+ }
+ }
+ }
+ /* Map 32 -> 0, etc. */
+ inst.operands[2].imm &= 0x1f;
+ inst.instruction |= (0xf << 28) | ((inst.operands[2].imm & 0x10) << 4) | (inst.operands[2].imm & 0xf);
+ }
+}
/* Cirrus Maverick instructions. Simple 2-, 3-, and 4-register
operations first, then control, shift, and load/store. */
@@ -6082,7 +8226,7 @@ encode_thumb32_addr_mode (int i, bfd_boolean is_t, bfd_boolean is_d)
X(cpsie, b660, f3af8400), \
X(cpsid, b670, f3af8600), \
X(cpy, 4600, ea4f0000), \
- X(dec_sp,80dd, f1bd0d00), \
+ X(dec_sp,80dd, f1ad0d00), \
X(eor, 4040, ea800000), \
X(eors, 4040, ea900000), \
X(inc_sp,00dd, f10d0d00), \
@@ -6200,13 +8344,13 @@ do_t_add_sub (void)
narrow = (current_it_mask != 0);
if (!inst.operands[2].isreg)
{
+ int add;
+
+ add = (inst.instruction == T_MNEM_add
+ || inst.instruction == T_MNEM_adds);
opcode = 0;
if (inst.size_req != 4)
{
- int add;
-
- add = (inst.instruction == T_MNEM_add
- || inst.instruction == T_MNEM_adds);
/* Attempt to use a narrow opcode, with relaxation if
appropriate. */
if (Rd == REG_SP && Rs == REG_SP && !flags)
@@ -6236,12 +8380,38 @@ do_t_add_sub (void)
if (inst.size_req == 4
|| (inst.size_req != 2 && !opcode))
{
- /* ??? Convert large immediates to addw/subw. */
- inst.instruction = THUMB_OP32 (inst.instruction);
- inst.instruction = (inst.instruction & 0xe1ffffff) | 0x10000000;
- inst.instruction |= inst.operands[0].reg << 8;
- inst.instruction |= inst.operands[1].reg << 16;
- inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ if (Rd == REG_PC)
+ {
+ constraint (Rs != REG_LR || inst.instruction != T_MNEM_subs,
+ _("only SUBS PC, LR, #const allowed"));
+ constraint (inst.reloc.exp.X_op != O_constant,
+ _("expression too complex"));
+ constraint (inst.reloc.exp.X_add_number < 0
+ || inst.reloc.exp.X_add_number > 0xff,
+ _("immediate value out of range"));
+ inst.instruction = T2_SUBS_PC_LR
+ | inst.reloc.exp.X_add_number;
+ inst.reloc.type = BFD_RELOC_UNUSED;
+ return;
+ }
+ else if (Rs == REG_PC)
+ {
+ /* Always use addw/subw. */
+ inst.instruction = add ? 0xf20f0000 : 0xf2af0000;
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMM12;
+ }
+ else
+ {
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction = (inst.instruction & 0xe1ffffff)
+ | 0x10000000;
+ if (flags)
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ else
+ inst.reloc.type = BFD_RELOC_ARM_T32_ADD_IMM;
+ }
+ inst.instruction |= Rd << 8;
+ inst.instruction |= Rs << 16;
}
}
else
@@ -6807,7 +8977,7 @@ do_t_cpy (void)
}
static void
-do_t_czb (void)
+do_t_cbz (void)
{
constraint (current_it_mask, BAD_NOT_IT);
constraint (inst.operands[0].reg > 7, BAD_HIREG);
@@ -6871,6 +9041,68 @@ do_t_it (void)
inst.instruction |= cond << 4;
}
+/* Helper function used for both push/pop and ldm/stm. */
+static void
+encode_thumb2_ldmstm (int base, unsigned mask, bfd_boolean writeback)
+{
+ bfd_boolean load;
+
+ load = (inst.instruction & (1 << 20)) != 0;
+
+ if (mask & (1 << 13))
+ inst.error = _("SP not allowed in register list");
+ if (load)
+ {
+ if (mask & (1 << 14)
+ && mask & (1 << 15))
+ inst.error = _("LR and PC should not both be in register list");
+
+ if ((mask & (1 << base)) != 0
+ && writeback)
+ as_warn (_("base register should not be in register list "
+ "when written back"));
+ }
+ else
+ {
+ if (mask & (1 << 15))
+ inst.error = _("PC not allowed in register list");
+
+ if (mask & (1 << base))
+ as_warn (_("value stored for r%d is UNPREDICTABLE"), base);
+ }
+
+ if ((mask & (mask - 1)) == 0)
+ {
+ /* Single register transfers implemented as str/ldr. */
+ if (writeback)
+ {
+ if (inst.instruction & (1 << 23))
+ inst.instruction = 0x00000b04; /* ia! -> [base], #4 */
+ else
+ inst.instruction = 0x00000d04; /* db! -> [base, #-4]! */
+ }
+ else
+ {
+ if (inst.instruction & (1 << 23))
+ inst.instruction = 0x00800000; /* ia -> [base] */
+ else
+ inst.instruction = 0x00000c04; /* db -> [base, #-4] */
+ }
+
+ inst.instruction |= 0xf8400000;
+ if (load)
+ inst.instruction |= 0x00100000;
+
+ mask = ffs(mask) - 1;
+ mask <<= 12;
+ }
+ else if (writeback)
+ inst.instruction |= WRITE_BACK;
+
+ inst.instruction |= mask;
+ inst.instruction |= base << 16;
+}
+
static void
do_t_ldmstm (void)
{
@@ -6882,60 +9114,60 @@ do_t_ldmstm (void)
if (unified_syntax)
{
+ bfd_boolean narrow;
+ unsigned mask;
+
+ narrow = FALSE;
/* See if we can use a 16-bit instruction. */
if (inst.instruction < 0xffff /* not ldmdb/stmdb */
&& inst.size_req != 4
- && inst.operands[0].reg <= 7
- && !(inst.operands[1].imm & ~0xff)
- && (inst.instruction == T_MNEM_stmia
- ? inst.operands[0].writeback
- : (inst.operands[0].writeback
- == !(inst.operands[1].imm & (1 << inst.operands[0].reg)))))
- {
- if (inst.instruction == T_MNEM_stmia
- && (inst.operands[1].imm & (1 << inst.operands[0].reg))
- && (inst.operands[1].imm & ((1 << inst.operands[0].reg) - 1)))
- as_warn (_("value stored for r%d is UNPREDICTABLE"),
- inst.operands[0].reg);
-
- inst.instruction = THUMB_OP16 (inst.instruction);
- inst.instruction |= inst.operands[0].reg << 8;
- inst.instruction |= inst.operands[1].imm;
- }
- else
+ && !(inst.operands[1].imm & ~0xff))
{
- if (inst.operands[1].imm & (1 << 13))
- as_warn (_("SP should not be in register list"));
- if (inst.instruction == T_MNEM_stmia)
+ mask = 1 << inst.operands[0].reg;
+
+ if (inst.operands[0].reg <= 7
+ && (inst.instruction == T_MNEM_stmia
+ ? inst.operands[0].writeback
+ : (inst.operands[0].writeback
+ == !(inst.operands[1].imm & mask))))
{
- if (inst.operands[1].imm & (1 << 15))
- as_warn (_("PC should not be in register list"));
- if (inst.operands[1].imm & (1 << inst.operands[0].reg))
+ if (inst.instruction == T_MNEM_stmia
+ && (inst.operands[1].imm & mask)
+ && (inst.operands[1].imm & (mask - 1)))
as_warn (_("value stored for r%d is UNPREDICTABLE"),
inst.operands[0].reg);
+
+ inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].imm;
+ narrow = TRUE;
}
- else
+ else if (inst.operands[0] .reg == REG_SP
+ && inst.operands[0].writeback)
{
- if (inst.operands[1].imm & (1 << 14)
- && inst.operands[1].imm & (1 << 15))
- as_warn (_("LR and PC should not both be in register list"));
- if ((inst.operands[1].imm & (1 << inst.operands[0].reg))
- && inst.operands[0].writeback)
- as_warn (_("base register should not be in register list "
- "when written back"));
+ inst.instruction = THUMB_OP16 (inst.instruction == T_MNEM_stmia
+ ? T_MNEM_push : T_MNEM_pop);
+ inst.instruction |= inst.operands[1].imm;
+ narrow = TRUE;
}
+ }
+
+ if (!narrow)
+ {
if (inst.instruction < 0xffff)
inst.instruction = THUMB_OP32 (inst.instruction);
- inst.instruction |= inst.operands[0].reg << 16;
- inst.instruction |= inst.operands[1].imm;
- if (inst.operands[0].writeback)
- inst.instruction |= WRITE_BACK;
+
+ encode_thumb2_ldmstm(inst.operands[0].reg, inst.operands[1].imm,
+ inst.operands[0].writeback);
}
}
else
{
constraint (inst.operands[0].reg > 7
|| (inst.operands[1].imm & ~0xff), BAD_HIREG);
+ constraint (inst.instruction != T_MNEM_ldmia
+ && inst.instruction != T_MNEM_stmia,
+ _("Thumb-2 instruction only valid in unified syntax"));
if (inst.instruction == T_MNEM_stmia)
{
if (!inst.operands[0].writeback)
@@ -7209,6 +9441,16 @@ do_t_mov_cmp (void)
|| inst.operands[1].shifted)
narrow = FALSE;
+ /* MOVS PC, LR is encoded as SUBS PC, LR, #0. */
+ if (opcode == T_MNEM_movs && inst.operands[1].isreg
+ && !inst.operands[1].shifted
+ && inst.operands[0].reg == REG_PC
+ && inst.operands[1].reg == REG_LR)
+ {
+ inst.instruction = T2_SUBS_PC_LR;
+ return;
+ }
+
if (!inst.operands[1].isreg)
{
/* Immediate operand. */
@@ -7231,11 +9473,98 @@ do_t_mov_cmp (void)
inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
}
}
+ else if (inst.operands[1].shifted && inst.operands[1].immisreg
+ && (inst.instruction == T_MNEM_mov
+ || inst.instruction == T_MNEM_movs))
+ {
+ /* Register shifts are encoded as separate shift instructions. */
+ bfd_boolean flags = (inst.instruction == T_MNEM_movs);
+
+ if (current_it_mask)
+ narrow = !flags;
+ else
+ narrow = flags;
+
+ if (inst.size_req == 4)
+ narrow = FALSE;
+
+ if (!low_regs || inst.operands[1].imm > 7)
+ narrow = FALSE;
+
+ if (inst.operands[0].reg != inst.operands[1].reg)
+ narrow = FALSE;
+
+ switch (inst.operands[1].shift_kind)
+ {
+ case SHIFT_LSL:
+ opcode = narrow ? T_OPCODE_LSL_R : THUMB_OP32 (T_MNEM_lsl);
+ break;
+ case SHIFT_ASR:
+ opcode = narrow ? T_OPCODE_ASR_R : THUMB_OP32 (T_MNEM_asr);
+ break;
+ case SHIFT_LSR:
+ opcode = narrow ? T_OPCODE_LSR_R : THUMB_OP32 (T_MNEM_lsr);
+ break;
+ case SHIFT_ROR:
+ opcode = narrow ? T_OPCODE_ROR_R : THUMB_OP32 (T_MNEM_ror);
+ break;
+ default:
+ abort();
+ }
+
+ inst.instruction = opcode;
+ if (narrow)
+ {
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].imm << 3;
+ }
+ else
+ {
+ if (flags)
+ inst.instruction |= CONDS_BIT;
+
+ inst.instruction |= inst.operands[0].reg << 8;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= inst.operands[1].imm;
+ }
+ }
else if (!narrow)
{
- inst.instruction = THUMB_OP32 (inst.instruction);
- inst.instruction |= inst.operands[0].reg << r0off;
- encode_thumb32_shifted_operand (1);
+ /* Some mov with immediate shift have narrow variants.
+ Register shifts are handled above. */
+ if (low_regs && inst.operands[1].shifted
+ && (inst.instruction == T_MNEM_mov
+ || inst.instruction == T_MNEM_movs))
+ {
+ if (current_it_mask)
+ narrow = (inst.instruction == T_MNEM_mov);
+ else
+ narrow = (inst.instruction == T_MNEM_movs);
+ }
+
+ if (narrow)
+ {
+ switch (inst.operands[1].shift_kind)
+ {
+ case SHIFT_LSL: inst.instruction = T_OPCODE_LSL_I; break;
+ case SHIFT_LSR: inst.instruction = T_OPCODE_LSR_I; break;
+ case SHIFT_ASR: inst.instruction = T_OPCODE_ASR_I; break;
+ default: narrow = FALSE; break;
+ }
+ }
+
+ if (narrow)
+ {
+ inst.instruction |= inst.operands[0].reg;
+ inst.instruction |= inst.operands[1].reg << 3;
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_SHIFT;
+ }
+ else
+ {
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction |= inst.operands[0].reg << r0off;
+ encode_thumb32_shifted_operand (1);
+ }
}
else
switch (inst.instruction)
@@ -7310,11 +9639,30 @@ do_t_mov_cmp (void)
static void
do_t_mov16 (void)
{
+ bfd_vma imm;
+ bfd_boolean top;
+
+ top = (inst.instruction & 0x00800000) != 0;
+ if (inst.reloc.type == BFD_RELOC_ARM_MOVW)
+ {
+ constraint (top, _(":lower16: not allowed this instruction"));
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_MOVW;
+ }
+ else if (inst.reloc.type == BFD_RELOC_ARM_MOVT)
+ {
+ constraint (!top, _(":upper16: not allowed this instruction"));
+ inst.reloc.type = BFD_RELOC_ARM_THUMB_MOVT;
+ }
+
inst.instruction |= inst.operands[0].reg << 8;
- inst.instruction |= (inst.operands[1].imm & 0xf000) << 4;
- inst.instruction |= (inst.operands[1].imm & 0x0800) << 15;
- inst.instruction |= (inst.operands[1].imm & 0x0700) << 4;
- inst.instruction |= (inst.operands[1].imm & 0x00ff);
+ if (inst.reloc.type == BFD_RELOC_UNUSED)
+ {
+ imm = inst.reloc.exp.X_add_number;
+ inst.instruction |= (imm & 0xf000) << 4;
+ inst.instruction |= (imm & 0x0800) << 15;
+ inst.instruction |= (imm & 0x0700) << 4;
+ inst.instruction |= (imm & 0x00ff);
+ }
}
static void
@@ -7388,6 +9736,10 @@ static void
do_t_mrs (void)
{
int flags;
+
+ if (do_vfp_nsyn_mrs () == SUCCESS)
+ return;
+
flags = inst.operands[1].imm & (PSR_c|PSR_x|PSR_s|PSR_f|SPSR_BIT);
if (flags == 0)
{
@@ -7415,6 +9767,9 @@ do_t_msr (void)
{
int flags;
+ if (do_vfp_nsyn_msr () == SUCCESS)
+ return;
+
constraint (!inst.operands[1].isreg,
_("Thumb encoding does not support an immediate here"));
flags = inst.operands[0].imm;
@@ -7589,7 +9944,7 @@ do_t_push_pop (void)
mask = inst.operands[0].imm;
if ((mask & ~0xff) == 0)
- inst.instruction = THUMB_OP16 (inst.instruction);
+ inst.instruction = THUMB_OP16 (inst.instruction) | mask;
else if ((inst.instruction == T_MNEM_push
&& (mask & ~0xff) == 1 << REG_LR)
|| (inst.instruction == T_MNEM_pop
@@ -7597,43 +9952,18 @@ do_t_push_pop (void)
{
inst.instruction = THUMB_OP16 (inst.instruction);
inst.instruction |= THUMB_PP_PC_LR;
- mask &= 0xff;
+ inst.instruction |= mask & 0xff;
}
else if (unified_syntax)
{
- if (mask & (1 << 13))
- inst.error = _("SP not allowed in register list");
- if (inst.instruction == T_MNEM_push)
- {
- if (mask & (1 << 15))
- inst.error = _("PC not allowed in register list");
- }
- else
- {
- if (mask & (1 << 14)
- && mask & (1 << 15))
- inst.error = _("LR and PC should not both be in register list");
- }
- if ((mask & (mask - 1)) == 0)
- {
- /* Single register push/pop implemented as str/ldr. */
- if (inst.instruction == T_MNEM_push)
- inst.instruction = 0xf84d0d04; /* str reg, [sp, #-4]! */
- else
- inst.instruction = 0xf85d0b04; /* ldr reg, [sp], #4 */
- mask = ffs(mask) - 1;
- mask <<= 12;
- }
- else
- inst.instruction = THUMB_OP32 (inst.instruction);
+ inst.instruction = THUMB_OP32 (inst.instruction);
+ encode_thumb2_ldmstm(13, mask, TRUE);
}
else
{
inst.error = _("invalid register list to push/pop instruction");
return;
}
-
- inst.instruction |= mask;
}
static void
@@ -7678,8 +10008,37 @@ do_t_rsb (void)
inst.instruction |= Rs << 16;
if (!inst.operands[2].isreg)
{
- inst.instruction = (inst.instruction & 0xe1ffffff) | 0x10000000;
- inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ bfd_boolean narrow;
+
+ if ((inst.instruction & 0x00100000) != 0)
+ narrow = (current_it_mask == 0);
+ else
+ narrow = (current_it_mask != 0);
+
+ if (Rd > 7 || Rs > 7)
+ narrow = FALSE;
+
+ if (inst.size_req == 4 || !unified_syntax)
+ narrow = FALSE;
+
+ if (inst.reloc.exp.X_op != O_constant
+ || inst.reloc.exp.X_add_number != 0)
+ narrow = FALSE;
+
+ /* Turn rsb #0 into 16-bit neg. We should probably do this via
+ relaxation, but it doesn't seem worth the hassle. */
+ if (narrow)
+ {
+ inst.reloc.type = BFD_RELOC_UNUSED;
+ inst.instruction = THUMB_OP16 (T_MNEM_negs);
+ inst.instruction |= Rs << 3;
+ inst.instruction |= Rd;
+ }
+ else
+ {
+ inst.instruction = (inst.instruction & 0xe1ffffff) | 0x10000000;
+ inst.reloc.type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ }
}
else
encode_thumb32_shifted_operand (2);
@@ -7997,6 +10356,3387 @@ do_t_usat16 (void)
inst.instruction |= inst.operands[1].imm;
inst.instruction |= inst.operands[2].reg << 16;
}
+
+/* Neon instruction encoder helpers. */
+
+/* Encodings for the different types for various Neon opcodes. */
+
+/* An "invalid" code for the following tables. */
+#define N_INV -1u
+
+struct neon_tab_entry
+{
+ unsigned integer;
+ unsigned float_or_poly;
+ unsigned scalar_or_imm;
+};
+
+/* Map overloaded Neon opcodes to their respective encodings. */
+#define NEON_ENC_TAB \
+ X(vabd, 0x0000700, 0x1200d00, N_INV), \
+ X(vmax, 0x0000600, 0x0000f00, N_INV), \
+ X(vmin, 0x0000610, 0x0200f00, N_INV), \
+ X(vpadd, 0x0000b10, 0x1000d00, N_INV), \
+ X(vpmax, 0x0000a00, 0x1000f00, N_INV), \
+ X(vpmin, 0x0000a10, 0x1200f00, N_INV), \
+ X(vadd, 0x0000800, 0x0000d00, N_INV), \
+ X(vsub, 0x1000800, 0x0200d00, N_INV), \
+ X(vceq, 0x1000810, 0x0000e00, 0x1b10100), \
+ X(vcge, 0x0000310, 0x1000e00, 0x1b10080), \
+ X(vcgt, 0x0000300, 0x1200e00, 0x1b10000), \
+ /* Register variants of the following two instructions are encoded as
+ vcge / vcgt with the operands reversed. */ \
+ X(vclt, 0x0000300, 0x1200e00, 0x1b10200), \
+ X(vcle, 0x0000310, 0x1000e00, 0x1b10180), \
+ X(vmla, 0x0000900, 0x0000d10, 0x0800040), \
+ X(vmls, 0x1000900, 0x0200d10, 0x0800440), \
+ X(vmul, 0x0000910, 0x1000d10, 0x0800840), \
+ X(vmull, 0x0800c00, 0x0800e00, 0x0800a40), /* polynomial not float. */ \
+ X(vmlal, 0x0800800, N_INV, 0x0800240), \
+ X(vmlsl, 0x0800a00, N_INV, 0x0800640), \
+ X(vqdmlal, 0x0800900, N_INV, 0x0800340), \
+ X(vqdmlsl, 0x0800b00, N_INV, 0x0800740), \
+ X(vqdmull, 0x0800d00, N_INV, 0x0800b40), \
+ X(vqdmulh, 0x0000b00, N_INV, 0x0800c40), \
+ X(vqrdmulh, 0x1000b00, N_INV, 0x0800d40), \
+ X(vshl, 0x0000400, N_INV, 0x0800510), \
+ X(vqshl, 0x0000410, N_INV, 0x0800710), \
+ X(vand, 0x0000110, N_INV, 0x0800030), \
+ X(vbic, 0x0100110, N_INV, 0x0800030), \
+ X(veor, 0x1000110, N_INV, N_INV), \
+ X(vorn, 0x0300110, N_INV, 0x0800010), \
+ X(vorr, 0x0200110, N_INV, 0x0800010), \
+ X(vmvn, 0x1b00580, N_INV, 0x0800030), \
+ X(vshll, 0x1b20300, N_INV, 0x0800a10), /* max shift, immediate. */ \
+ X(vcvt, 0x1b30600, N_INV, 0x0800e10), /* integer, fixed-point. */ \
+ X(vdup, 0xe800b10, N_INV, 0x1b00c00), /* arm, scalar. */ \
+ X(vld1, 0x0200000, 0x0a00000, 0x0a00c00), /* interlv, lane, dup. */ \
+ X(vst1, 0x0000000, 0x0800000, N_INV), \
+ X(vld2, 0x0200100, 0x0a00100, 0x0a00d00), \
+ X(vst2, 0x0000100, 0x0800100, N_INV), \
+ X(vld3, 0x0200200, 0x0a00200, 0x0a00e00), \
+ X(vst3, 0x0000200, 0x0800200, N_INV), \
+ X(vld4, 0x0200300, 0x0a00300, 0x0a00f00), \
+ X(vst4, 0x0000300, 0x0800300, N_INV), \
+ X(vmovn, 0x1b20200, N_INV, N_INV), \
+ X(vtrn, 0x1b20080, N_INV, N_INV), \
+ X(vqmovn, 0x1b20200, N_INV, N_INV), \
+ X(vqmovun, 0x1b20240, N_INV, N_INV), \
+ X(vnmul, 0xe200a40, 0xe200b40, N_INV), \
+ X(vnmla, 0xe000a40, 0xe000b40, N_INV), \
+ X(vnmls, 0xe100a40, 0xe100b40, N_INV), \
+ X(vcmp, 0xeb40a40, 0xeb40b40, N_INV), \
+ X(vcmpz, 0xeb50a40, 0xeb50b40, N_INV), \
+ X(vcmpe, 0xeb40ac0, 0xeb40bc0, N_INV), \
+ X(vcmpez, 0xeb50ac0, 0xeb50bc0, N_INV)
+
+enum neon_opc
+{
+#define X(OPC,I,F,S) N_MNEM_##OPC
+NEON_ENC_TAB
+#undef X
+};
+
+static const struct neon_tab_entry neon_enc_tab[] =
+{
+#define X(OPC,I,F,S) { (I), (F), (S) }
+NEON_ENC_TAB
+#undef X
+};
+
+#define NEON_ENC_INTEGER(X) (neon_enc_tab[(X) & 0x0fffffff].integer)
+#define NEON_ENC_ARMREG(X) (neon_enc_tab[(X) & 0x0fffffff].integer)
+#define NEON_ENC_POLY(X) (neon_enc_tab[(X) & 0x0fffffff].float_or_poly)
+#define NEON_ENC_FLOAT(X) (neon_enc_tab[(X) & 0x0fffffff].float_or_poly)
+#define NEON_ENC_SCALAR(X) (neon_enc_tab[(X) & 0x0fffffff].scalar_or_imm)
+#define NEON_ENC_IMMED(X) (neon_enc_tab[(X) & 0x0fffffff].scalar_or_imm)
+#define NEON_ENC_INTERLV(X) (neon_enc_tab[(X) & 0x0fffffff].integer)
+#define NEON_ENC_LANE(X) (neon_enc_tab[(X) & 0x0fffffff].float_or_poly)
+#define NEON_ENC_DUP(X) (neon_enc_tab[(X) & 0x0fffffff].scalar_or_imm)
+#define NEON_ENC_SINGLE(X) \
+ ((neon_enc_tab[(X) & 0x0fffffff].integer) | ((X) & 0xf0000000))
+#define NEON_ENC_DOUBLE(X) \
+ ((neon_enc_tab[(X) & 0x0fffffff].float_or_poly) | ((X) & 0xf0000000))
+
+/* Define shapes for instruction operands. The following mnemonic characters
+ are used in this table:
+
+ F - VFP S<n> register
+ D - Neon D<n> register
+ Q - Neon Q<n> register
+ I - Immediate
+ S - Scalar
+ R - ARM register
+ L - D<n> register list
+
+ This table is used to generate various data:
+ - enumerations of the form NS_DDR to be used as arguments to
+ neon_select_shape.
+ - a table classifying shapes into single, double, quad, mixed.
+ - a table used to drive neon_select_shape.
+*/
+
+#define NEON_SHAPE_DEF \
+ X(3, (D, D, D), DOUBLE), \
+ X(3, (Q, Q, Q), QUAD), \
+ X(3, (D, D, I), DOUBLE), \
+ X(3, (Q, Q, I), QUAD), \
+ X(3, (D, D, S), DOUBLE), \
+ X(3, (Q, Q, S), QUAD), \
+ X(2, (D, D), DOUBLE), \
+ X(2, (Q, Q), QUAD), \
+ X(2, (D, S), DOUBLE), \
+ X(2, (Q, S), QUAD), \
+ X(2, (D, R), DOUBLE), \
+ X(2, (Q, R), QUAD), \
+ X(2, (D, I), DOUBLE), \
+ X(2, (Q, I), QUAD), \
+ X(3, (D, L, D), DOUBLE), \
+ X(2, (D, Q), MIXED), \
+ X(2, (Q, D), MIXED), \
+ X(3, (D, Q, I), MIXED), \
+ X(3, (Q, D, I), MIXED), \
+ X(3, (Q, D, D), MIXED), \
+ X(3, (D, Q, Q), MIXED), \
+ X(3, (Q, Q, D), MIXED), \
+ X(3, (Q, D, S), MIXED), \
+ X(3, (D, Q, S), MIXED), \
+ X(4, (D, D, D, I), DOUBLE), \
+ X(4, (Q, Q, Q, I), QUAD), \
+ X(2, (F, F), SINGLE), \
+ X(3, (F, F, F), SINGLE), \
+ X(2, (F, I), SINGLE), \
+ X(2, (F, D), MIXED), \
+ X(2, (D, F), MIXED), \
+ X(3, (F, F, I), MIXED), \
+ X(4, (R, R, F, F), SINGLE), \
+ X(4, (F, F, R, R), SINGLE), \
+ X(3, (D, R, R), DOUBLE), \
+ X(3, (R, R, D), DOUBLE), \
+ X(2, (S, R), SINGLE), \
+ X(2, (R, S), SINGLE), \
+ X(2, (F, R), SINGLE), \
+ X(2, (R, F), SINGLE)
+
+#define S2(A,B) NS_##A##B
+#define S3(A,B,C) NS_##A##B##C
+#define S4(A,B,C,D) NS_##A##B##C##D
+
+#define X(N, L, C) S##N L
+
+enum neon_shape
+{
+ NEON_SHAPE_DEF,
+ NS_NULL
+};
+
+#undef X
+#undef S2
+#undef S3
+#undef S4
+
+enum neon_shape_class
+{
+ SC_SINGLE,
+ SC_DOUBLE,
+ SC_QUAD,
+ SC_MIXED
+};
+
+#define X(N, L, C) SC_##C
+
+static enum neon_shape_class neon_shape_class[] =
+{
+ NEON_SHAPE_DEF
+};
+
+#undef X
+
+enum neon_shape_el
+{
+ SE_F,
+ SE_D,
+ SE_Q,
+ SE_I,
+ SE_S,
+ SE_R,
+ SE_L
+};
+
+/* Register widths of above. */
+static unsigned neon_shape_el_size[] =
+{
+ 32,
+ 64,
+ 128,
+ 0,
+ 32,
+ 32,
+ 0
+};
+
+struct neon_shape_info
+{
+ unsigned els;
+ enum neon_shape_el el[NEON_MAX_TYPE_ELS];
+};
+
+#define S2(A,B) { SE_##A, SE_##B }
+#define S3(A,B,C) { SE_##A, SE_##B, SE_##C }
+#define S4(A,B,C,D) { SE_##A, SE_##B, SE_##C, SE_##D }
+
+#define X(N, L, C) { N, S##N L }
+
+static struct neon_shape_info neon_shape_tab[] =
+{
+ NEON_SHAPE_DEF
+};
+
+#undef X
+#undef S2
+#undef S3
+#undef S4
+
+/* Bit masks used in type checking given instructions.
+ 'N_EQK' means the type must be the same as (or based on in some way) the key
+ type, which itself is marked with the 'N_KEY' bit. If the 'N_EQK' bit is
+ set, various other bits can be set as well in order to modify the meaning of
+ the type constraint. */
+
+enum neon_type_mask
+{
+ N_S8 = 0x000001,
+ N_S16 = 0x000002,
+ N_S32 = 0x000004,
+ N_S64 = 0x000008,
+ N_U8 = 0x000010,
+ N_U16 = 0x000020,
+ N_U32 = 0x000040,
+ N_U64 = 0x000080,
+ N_I8 = 0x000100,
+ N_I16 = 0x000200,
+ N_I32 = 0x000400,
+ N_I64 = 0x000800,
+ N_8 = 0x001000,
+ N_16 = 0x002000,
+ N_32 = 0x004000,
+ N_64 = 0x008000,
+ N_P8 = 0x010000,
+ N_P16 = 0x020000,
+ N_F32 = 0x040000,
+ N_F64 = 0x080000,
+ N_KEY = 0x100000, /* key element (main type specifier). */
+ N_EQK = 0x200000, /* given operand has the same type & size as the key. */
+ N_VFP = 0x400000, /* VFP mode: operand size must match register width. */
+ N_DBL = 0x000001, /* if N_EQK, this operand is twice the size. */
+ N_HLF = 0x000002, /* if N_EQK, this operand is half the size. */
+ N_SGN = 0x000004, /* if N_EQK, this operand is forced to be signed. */
+ N_UNS = 0x000008, /* if N_EQK, this operand is forced to be unsigned. */
+ N_INT = 0x000010, /* if N_EQK, this operand is forced to be integer. */
+ N_FLT = 0x000020, /* if N_EQK, this operand is forced to be float. */
+ N_SIZ = 0x000040, /* if N_EQK, this operand is forced to be size-only. */
+ N_UTYP = 0,
+ N_MAX_NONSPECIAL = N_F64
+};
+
+#define N_ALLMODS (N_DBL | N_HLF | N_SGN | N_UNS | N_INT | N_FLT | N_SIZ)
+
+#define N_SU_ALL (N_S8 | N_S16 | N_S32 | N_S64 | N_U8 | N_U16 | N_U32 | N_U64)
+#define N_SU_32 (N_S8 | N_S16 | N_S32 | N_U8 | N_U16 | N_U32)
+#define N_SU_16_64 (N_S16 | N_S32 | N_S64 | N_U16 | N_U32 | N_U64)
+#define N_SUF_32 (N_SU_32 | N_F32)
+#define N_I_ALL (N_I8 | N_I16 | N_I32 | N_I64)
+#define N_IF_32 (N_I8 | N_I16 | N_I32 | N_F32)
+
+/* Pass this as the first type argument to neon_check_type to ignore types
+ altogether. */
+#define N_IGNORE_TYPE (N_KEY | N_EQK)
+
+/* Select a "shape" for the current instruction (describing register types or
+ sizes) from a list of alternatives. Return NS_NULL if the current instruction
+ doesn't fit. For non-polymorphic shapes, checking is usually done as a
+ function of operand parsing, so this function doesn't need to be called.
+ Shapes should be listed in order of decreasing length. */
+
+static enum neon_shape
+neon_select_shape (enum neon_shape shape, ...)
+{
+ va_list ap;
+ enum neon_shape first_shape = shape;
+
+ /* Fix missing optional operands. FIXME: we don't know at this point how
+ many arguments we should have, so this makes the assumption that we have
+ > 1. This is true of all current Neon opcodes, I think, but may not be
+ true in the future. */
+ if (!inst.operands[1].present)
+ inst.operands[1] = inst.operands[0];
+
+ va_start (ap, shape);
+
+ for (; shape != NS_NULL; shape = va_arg (ap, int))
+ {
+ unsigned j;
+ int matches = 1;
+
+ for (j = 0; j < neon_shape_tab[shape].els; j++)
+ {
+ if (!inst.operands[j].present)
+ {
+ matches = 0;
+ break;
+ }
+
+ switch (neon_shape_tab[shape].el[j])
+ {
+ case SE_F:
+ if (!(inst.operands[j].isreg
+ && inst.operands[j].isvec
+ && inst.operands[j].issingle
+ && !inst.operands[j].isquad))
+ matches = 0;
+ break;
+
+ case SE_D:
+ if (!(inst.operands[j].isreg
+ && inst.operands[j].isvec
+ && !inst.operands[j].isquad
+ && !inst.operands[j].issingle))
+ matches = 0;
+ break;
+
+ case SE_R:
+ if (!(inst.operands[j].isreg
+ && !inst.operands[j].isvec))
+ matches = 0;
+ break;
+
+ case SE_Q:
+ if (!(inst.operands[j].isreg
+ && inst.operands[j].isvec
+ && inst.operands[j].isquad
+ && !inst.operands[j].issingle))
+ matches = 0;
+ break;
+
+ case SE_I:
+ if (!(!inst.operands[j].isreg
+ && !inst.operands[j].isscalar))
+ matches = 0;
+ break;
+
+ case SE_S:
+ if (!(!inst.operands[j].isreg
+ && inst.operands[j].isscalar))
+ matches = 0;
+ break;
+
+ case SE_L:
+ break;
+ }
+ }
+ if (matches)
+ break;
+ }
+
+ va_end (ap);
+
+ if (shape == NS_NULL && first_shape != NS_NULL)
+ first_error (_("invalid instruction shape"));
+
+ return shape;
+}
+
+/* True if SHAPE is predominantly a quadword operation (most of the time, this
+ means the Q bit should be set). */
+
+static int
+neon_quad (enum neon_shape shape)
+{
+ return neon_shape_class[shape] == SC_QUAD;
+}
+
+static void
+neon_modify_type_size (unsigned typebits, enum neon_el_type *g_type,
+ unsigned *g_size)
+{
+ /* Allow modification to be made to types which are constrained to be
+ based on the key element, based on bits set alongside N_EQK. */
+ if ((typebits & N_EQK) != 0)
+ {
+ if ((typebits & N_HLF) != 0)
+ *g_size /= 2;
+ else if ((typebits & N_DBL) != 0)
+ *g_size *= 2;
+ if ((typebits & N_SGN) != 0)
+ *g_type = NT_signed;
+ else if ((typebits & N_UNS) != 0)
+ *g_type = NT_unsigned;
+ else if ((typebits & N_INT) != 0)
+ *g_type = NT_integer;
+ else if ((typebits & N_FLT) != 0)
+ *g_type = NT_float;
+ else if ((typebits & N_SIZ) != 0)
+ *g_type = NT_untyped;
+ }
+}
+
+/* Return operand OPNO promoted by bits set in THISARG. KEY should be the "key"
+ operand type, i.e. the single type specified in a Neon instruction when it
+ is the only one given. */
+
+static struct neon_type_el
+neon_type_promote (struct neon_type_el *key, unsigned thisarg)
+{
+ struct neon_type_el dest = *key;
+
+ assert ((thisarg & N_EQK) != 0);
+
+ neon_modify_type_size (thisarg, &dest.type, &dest.size);
+
+ return dest;
+}
+
+/* Convert Neon type and size into compact bitmask representation. */
+
+static enum neon_type_mask
+type_chk_of_el_type (enum neon_el_type type, unsigned size)
+{
+ switch (type)
+ {
+ case NT_untyped:
+ switch (size)
+ {
+ case 8: return N_8;
+ case 16: return N_16;
+ case 32: return N_32;
+ case 64: return N_64;
+ default: ;
+ }
+ break;
+
+ case NT_integer:
+ switch (size)
+ {
+ case 8: return N_I8;
+ case 16: return N_I16;
+ case 32: return N_I32;
+ case 64: return N_I64;
+ default: ;
+ }
+ break;
+
+ case NT_float:
+ switch (size)
+ {
+ case 32: return N_F32;
+ case 64: return N_F64;
+ default: ;
+ }
+ break;
+
+ case NT_poly:
+ switch (size)
+ {
+ case 8: return N_P8;
+ case 16: return N_P16;
+ default: ;
+ }
+ break;
+
+ case NT_signed:
+ switch (size)
+ {
+ case 8: return N_S8;
+ case 16: return N_S16;
+ case 32: return N_S32;
+ case 64: return N_S64;
+ default: ;
+ }
+ break;
+
+ case NT_unsigned:
+ switch (size)
+ {
+ case 8: return N_U8;
+ case 16: return N_U16;
+ case 32: return N_U32;
+ case 64: return N_U64;
+ default: ;
+ }
+ break;
+
+ default: ;
+ }
+
+ return N_UTYP;
+}
+
+/* Convert compact Neon bitmask type representation to a type and size. Only
+ handles the case where a single bit is set in the mask. */
+
+static int
+el_type_of_type_chk (enum neon_el_type *type, unsigned *size,
+ enum neon_type_mask mask)
+{
+ if ((mask & N_EQK) != 0)
+ return FAIL;
+
+ if ((mask & (N_S8 | N_U8 | N_I8 | N_8 | N_P8)) != 0)
+ *size = 8;
+ else if ((mask & (N_S16 | N_U16 | N_I16 | N_16 | N_P16)) != 0)
+ *size = 16;
+ else if ((mask & (N_S32 | N_U32 | N_I32 | N_32 | N_F32)) != 0)
+ *size = 32;
+ else if ((mask & (N_S64 | N_U64 | N_I64 | N_64 | N_F64)) != 0)
+ *size = 64;
+ else
+ return FAIL;
+
+ if ((mask & (N_S8 | N_S16 | N_S32 | N_S64)) != 0)
+ *type = NT_signed;
+ else if ((mask & (N_U8 | N_U16 | N_U32 | N_U64)) != 0)
+ *type = NT_unsigned;
+ else if ((mask & (N_I8 | N_I16 | N_I32 | N_I64)) != 0)
+ *type = NT_integer;
+ else if ((mask & (N_8 | N_16 | N_32 | N_64)) != 0)
+ *type = NT_untyped;
+ else if ((mask & (N_P8 | N_P16)) != 0)
+ *type = NT_poly;
+ else if ((mask & (N_F32 | N_F64)) != 0)
+ *type = NT_float;
+ else
+ return FAIL;
+
+ return SUCCESS;
+}
+
+/* Modify a bitmask of allowed types. This is only needed for type
+ relaxation. */
+
+static unsigned
+modify_types_allowed (unsigned allowed, unsigned mods)
+{
+ unsigned size;
+ enum neon_el_type type;
+ unsigned destmask;
+ int i;
+
+ destmask = 0;
+
+ for (i = 1; i <= N_MAX_NONSPECIAL; i <<= 1)
+ {
+ if (el_type_of_type_chk (&type, &size, allowed & i) == SUCCESS)
+ {
+ neon_modify_type_size (mods, &type, &size);
+ destmask |= type_chk_of_el_type (type, size);
+ }
+ }
+
+ return destmask;
+}
+
+/* Check type and return type classification.
+ The manual states (paraphrase): If one datatype is given, it indicates the
+ type given in:
+ - the second operand, if there is one
+ - the operand, if there is no second operand
+ - the result, if there are no operands.
+ This isn't quite good enough though, so we use a concept of a "key" datatype
+ which is set on a per-instruction basis, which is the one which matters when
+ only one data type is written.
+ Note: this function has side-effects (e.g. filling in missing operands). All
+ Neon instructions should call it before performing bit encoding. */
+
+static struct neon_type_el
+neon_check_type (unsigned els, enum neon_shape ns, ...)
+{
+ va_list ap;
+ unsigned i, pass, key_el = 0;
+ unsigned types[NEON_MAX_TYPE_ELS];
+ enum neon_el_type k_type = NT_invtype;
+ unsigned k_size = -1u;
+ struct neon_type_el badtype = {NT_invtype, -1};
+ unsigned key_allowed = 0;
+
+ /* Optional registers in Neon instructions are always (not) in operand 1.
+ Fill in the missing operand here, if it was omitted. */
+ if (els > 1 && !inst.operands[1].present)
+ inst.operands[1] = inst.operands[0];
+
+ /* Suck up all the varargs. */
+ va_start (ap, ns);
+ for (i = 0; i < els; i++)
+ {
+ unsigned thisarg = va_arg (ap, unsigned);
+ if (thisarg == N_IGNORE_TYPE)
+ {
+ va_end (ap);
+ return badtype;
+ }
+ types[i] = thisarg;
+ if ((thisarg & N_KEY) != 0)
+ key_el = i;
+ }
+ va_end (ap);
+
+ if (inst.vectype.elems > 0)
+ for (i = 0; i < els; i++)
+ if (inst.operands[i].vectype.type != NT_invtype)
+ {
+ first_error (_("types specified in both the mnemonic and operands"));
+ return badtype;
+ }
+
+ /* Duplicate inst.vectype elements here as necessary.
+ FIXME: No idea if this is exactly the same as the ARM assembler,
+ particularly when an insn takes one register and one non-register
+ operand. */
+ if (inst.vectype.elems == 1 && els > 1)
+ {
+ unsigned j;
+ inst.vectype.elems = els;
+ inst.vectype.el[key_el] = inst.vectype.el[0];
+ for (j = 0; j < els; j++)
+ if (j != key_el)
+ inst.vectype.el[j] = neon_type_promote (&inst.vectype.el[key_el],
+ types[j]);
+ }
+ else if (inst.vectype.elems == 0 && els > 0)
+ {
+ unsigned j;
+ /* No types were given after the mnemonic, so look for types specified
+ after each operand. We allow some flexibility here; as long as the
+ "key" operand has a type, we can infer the others. */
+ for (j = 0; j < els; j++)
+ if (inst.operands[j].vectype.type != NT_invtype)
+ inst.vectype.el[j] = inst.operands[j].vectype;
+
+ if (inst.operands[key_el].vectype.type != NT_invtype)
+ {
+ for (j = 0; j < els; j++)
+ if (inst.operands[j].vectype.type == NT_invtype)
+ inst.vectype.el[j] = neon_type_promote (&inst.vectype.el[key_el],
+ types[j]);
+ }
+ else
+ {
+ first_error (_("operand types can't be inferred"));
+ return badtype;
+ }
+ }
+ else if (inst.vectype.elems != els)
+ {
+ first_error (_("type specifier has the wrong number of parts"));
+ return badtype;
+ }
+
+ for (pass = 0; pass < 2; pass++)
+ {
+ for (i = 0; i < els; i++)
+ {
+ unsigned thisarg = types[i];
+ unsigned types_allowed = ((thisarg & N_EQK) != 0 && pass != 0)
+ ? modify_types_allowed (key_allowed, thisarg) : thisarg;
+ enum neon_el_type g_type = inst.vectype.el[i].type;
+ unsigned g_size = inst.vectype.el[i].size;
+
+ /* Decay more-specific signed & unsigned types to sign-insensitive
+ integer types if sign-specific variants are unavailable. */
+ if ((g_type == NT_signed || g_type == NT_unsigned)
+ && (types_allowed & N_SU_ALL) == 0)
+ g_type = NT_integer;
+
+ /* If only untyped args are allowed, decay any more specific types to
+ them. Some instructions only care about signs for some element
+ sizes, so handle that properly. */
+ if ((g_size == 8 && (types_allowed & N_8) != 0)
+ || (g_size == 16 && (types_allowed & N_16) != 0)
+ || (g_size == 32 && (types_allowed & N_32) != 0)
+ || (g_size == 64 && (types_allowed & N_64) != 0))
+ g_type = NT_untyped;
+
+ if (pass == 0)
+ {
+ if ((thisarg & N_KEY) != 0)
+ {
+ k_type = g_type;
+ k_size = g_size;
+ key_allowed = thisarg & ~N_KEY;
+ }
+ }
+ else
+ {
+ if ((thisarg & N_VFP) != 0)
+ {
+ enum neon_shape_el regshape = neon_shape_tab[ns].el[i];
+ unsigned regwidth = neon_shape_el_size[regshape], match;
+
+ /* In VFP mode, operands must match register widths. If we
+ have a key operand, use its width, else use the width of
+ the current operand. */
+ if (k_size != -1u)
+ match = k_size;
+ else
+ match = g_size;
+
+ if (regwidth != match)
+ {
+ first_error (_("operand size must match register width"));
+ return badtype;
+ }
+ }
+
+ if ((thisarg & N_EQK) == 0)
+ {
+ unsigned given_type = type_chk_of_el_type (g_type, g_size);
+
+ if ((given_type & types_allowed) == 0)
+ {
+ first_error (_("bad type in Neon instruction"));
+ return badtype;
+ }
+ }
+ else
+ {
+ enum neon_el_type mod_k_type = k_type;
+ unsigned mod_k_size = k_size;
+ neon_modify_type_size (thisarg, &mod_k_type, &mod_k_size);
+ if (g_type != mod_k_type || g_size != mod_k_size)
+ {
+ first_error (_("inconsistent types in Neon instruction"));
+ return badtype;
+ }
+ }
+ }
+ }
+ }
+
+ return inst.vectype.el[key_el];
+}
+
+/* Neon-style VFP instruction forwarding. */
+
+/* Thumb VFP instructions have 0xE in the condition field. */
+
+static void
+do_vfp_cond_or_thumb (void)
+{
+ if (thumb_mode)
+ inst.instruction |= 0xe0000000;
+ else
+ inst.instruction |= inst.cond << 28;
+}
+
+/* Look up and encode a simple mnemonic, for use as a helper function for the
+ Neon-style VFP syntax. This avoids duplication of bits of the insns table,
+ etc. It is assumed that operand parsing has already been done, and that the
+ operands are in the form expected by the given opcode (this isn't necessarily
+ the same as the form in which they were parsed, hence some massaging must
+ take place before this function is called).
+ Checks current arch version against that in the looked-up opcode. */
+
+static void
+do_vfp_nsyn_opcode (const char *opname)
+{
+ const struct asm_opcode *opcode;
+
+ opcode = hash_find (arm_ops_hsh, opname);
+
+ if (!opcode)
+ abort ();
+
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant,
+ thumb_mode ? *opcode->tvariant : *opcode->avariant),
+ _(BAD_FPU));
+
+ if (thumb_mode)
+ {
+ inst.instruction = opcode->tvalue;
+ opcode->tencode ();
+ }
+ else
+ {
+ inst.instruction = (inst.cond << 28) | opcode->avalue;
+ opcode->aencode ();
+ }
+}
+
+static void
+do_vfp_nsyn_add_sub (enum neon_shape rs)
+{
+ int is_add = (inst.instruction & 0x0fffffff) == N_MNEM_vadd;
+
+ if (rs == NS_FFF)
+ {
+ if (is_add)
+ do_vfp_nsyn_opcode ("fadds");
+ else
+ do_vfp_nsyn_opcode ("fsubs");
+ }
+ else
+ {
+ if (is_add)
+ do_vfp_nsyn_opcode ("faddd");
+ else
+ do_vfp_nsyn_opcode ("fsubd");
+ }
+}
+
+/* Check operand types to see if this is a VFP instruction, and if so call
+ PFN (). */
+
+static int
+try_vfp_nsyn (int args, void (*pfn) (enum neon_shape))
+{
+ enum neon_shape rs;
+ struct neon_type_el et;
+
+ switch (args)
+ {
+ case 2:
+ rs = neon_select_shape (NS_FF, NS_DD, NS_NULL);
+ et = neon_check_type (2, rs,
+ N_EQK | N_VFP, N_F32 | N_F64 | N_KEY | N_VFP);
+ break;
+
+ case 3:
+ rs = neon_select_shape (NS_FFF, NS_DDD, NS_NULL);
+ et = neon_check_type (3, rs,
+ N_EQK | N_VFP, N_EQK | N_VFP, N_F32 | N_F64 | N_KEY | N_VFP);
+ break;
+
+ default:
+ abort ();
+ }
+
+ if (et.type != NT_invtype)
+ {
+ pfn (rs);
+ return SUCCESS;
+ }
+ else
+ inst.error = NULL;
+
+ return FAIL;
+}
+
+static void
+do_vfp_nsyn_mla_mls (enum neon_shape rs)
+{
+ int is_mla = (inst.instruction & 0x0fffffff) == N_MNEM_vmla;
+
+ if (rs == NS_FFF)
+ {
+ if (is_mla)
+ do_vfp_nsyn_opcode ("fmacs");
+ else
+ do_vfp_nsyn_opcode ("fmscs");
+ }
+ else
+ {
+ if (is_mla)
+ do_vfp_nsyn_opcode ("fmacd");
+ else
+ do_vfp_nsyn_opcode ("fmscd");
+ }
+}
+
+static void
+do_vfp_nsyn_mul (enum neon_shape rs)
+{
+ if (rs == NS_FFF)
+ do_vfp_nsyn_opcode ("fmuls");
+ else
+ do_vfp_nsyn_opcode ("fmuld");
+}
+
+static void
+do_vfp_nsyn_abs_neg (enum neon_shape rs)
+{
+ int is_neg = (inst.instruction & 0x80) != 0;
+ neon_check_type (2, rs, N_EQK | N_VFP, N_F32 | N_F64 | N_VFP | N_KEY);
+
+ if (rs == NS_FF)
+ {
+ if (is_neg)
+ do_vfp_nsyn_opcode ("fnegs");
+ else
+ do_vfp_nsyn_opcode ("fabss");
+ }
+ else
+ {
+ if (is_neg)
+ do_vfp_nsyn_opcode ("fnegd");
+ else
+ do_vfp_nsyn_opcode ("fabsd");
+ }
+}
+
+/* Encode single-precision (only!) VFP fldm/fstm instructions. Double precision
+ insns belong to Neon, and are handled elsewhere. */
+
+static void
+do_vfp_nsyn_ldm_stm (int is_dbmode)
+{
+ int is_ldm = (inst.instruction & (1 << 20)) != 0;
+ if (is_ldm)
+ {
+ if (is_dbmode)
+ do_vfp_nsyn_opcode ("fldmdbs");
+ else
+ do_vfp_nsyn_opcode ("fldmias");
+ }
+ else
+ {
+ if (is_dbmode)
+ do_vfp_nsyn_opcode ("fstmdbs");
+ else
+ do_vfp_nsyn_opcode ("fstmias");
+ }
+}
+
+static void
+do_vfp_nsyn_sqrt (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_FF, NS_DD, NS_NULL);
+ neon_check_type (2, rs, N_EQK | N_VFP, N_F32 | N_F64 | N_KEY | N_VFP);
+
+ if (rs == NS_FF)
+ do_vfp_nsyn_opcode ("fsqrts");
+ else
+ do_vfp_nsyn_opcode ("fsqrtd");
+}
+
+static void
+do_vfp_nsyn_div (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_FFF, NS_DDD, NS_NULL);
+ neon_check_type (3, rs, N_EQK | N_VFP, N_EQK | N_VFP,
+ N_F32 | N_F64 | N_KEY | N_VFP);
+
+ if (rs == NS_FFF)
+ do_vfp_nsyn_opcode ("fdivs");
+ else
+ do_vfp_nsyn_opcode ("fdivd");
+}
+
+static void
+do_vfp_nsyn_nmul (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_FFF, NS_DDD, NS_NULL);
+ neon_check_type (3, rs, N_EQK | N_VFP, N_EQK | N_VFP,
+ N_F32 | N_F64 | N_KEY | N_VFP);
+
+ if (rs == NS_FFF)
+ {
+ inst.instruction = NEON_ENC_SINGLE (inst.instruction);
+ do_vfp_sp_dyadic ();
+ }
+ else
+ {
+ inst.instruction = NEON_ENC_DOUBLE (inst.instruction);
+ do_vfp_dp_rd_rn_rm ();
+ }
+ do_vfp_cond_or_thumb ();
+}
+
+static void
+do_vfp_nsyn_cmp (void)
+{
+ if (inst.operands[1].isreg)
+ {
+ enum neon_shape rs = neon_select_shape (NS_FF, NS_DD, NS_NULL);
+ neon_check_type (2, rs, N_EQK | N_VFP, N_F32 | N_F64 | N_KEY | N_VFP);
+
+ if (rs == NS_FF)
+ {
+ inst.instruction = NEON_ENC_SINGLE (inst.instruction);
+ do_vfp_sp_monadic ();
+ }
+ else
+ {
+ inst.instruction = NEON_ENC_DOUBLE (inst.instruction);
+ do_vfp_dp_rd_rm ();
+ }
+ }
+ else
+ {
+ enum neon_shape rs = neon_select_shape (NS_FI, NS_DI, NS_NULL);
+ neon_check_type (2, rs, N_F32 | N_F64 | N_KEY | N_VFP, N_EQK);
+
+ switch (inst.instruction & 0x0fffffff)
+ {
+ case N_MNEM_vcmp:
+ inst.instruction += N_MNEM_vcmpz - N_MNEM_vcmp;
+ break;
+ case N_MNEM_vcmpe:
+ inst.instruction += N_MNEM_vcmpez - N_MNEM_vcmpe;
+ break;
+ default:
+ abort ();
+ }
+
+ if (rs == NS_FI)
+ {
+ inst.instruction = NEON_ENC_SINGLE (inst.instruction);
+ do_vfp_sp_compare_z ();
+ }
+ else
+ {
+ inst.instruction = NEON_ENC_DOUBLE (inst.instruction);
+ do_vfp_dp_rd ();
+ }
+ }
+ do_vfp_cond_or_thumb ();
+}
+
+static void
+nsyn_insert_sp (void)
+{
+ inst.operands[1] = inst.operands[0];
+ memset (&inst.operands[0], '\0', sizeof (inst.operands[0]));
+ inst.operands[0].reg = 13;
+ inst.operands[0].isreg = 1;
+ inst.operands[0].writeback = 1;
+ inst.operands[0].present = 1;
+}
+
+static void
+do_vfp_nsyn_push (void)
+{
+ nsyn_insert_sp ();
+ if (inst.operands[1].issingle)
+ do_vfp_nsyn_opcode ("fstmdbs");
+ else
+ do_vfp_nsyn_opcode ("fstmdbd");
+}
+
+static void
+do_vfp_nsyn_pop (void)
+{
+ nsyn_insert_sp ();
+ if (inst.operands[1].issingle)
+ do_vfp_nsyn_opcode ("fldmias");
+ else
+ do_vfp_nsyn_opcode ("fldmiad");
+}
+
+/* Fix up Neon data-processing instructions, ORing in the correct bits for
+ ARM mode or Thumb mode and moving the encoded bit 24 to bit 28. */
+
+static unsigned
+neon_dp_fixup (unsigned i)
+{
+ if (thumb_mode)
+ {
+ /* The U bit is at bit 24 by default. Move to bit 28 in Thumb mode. */
+ if (i & (1 << 24))
+ i |= 1 << 28;
+
+ i &= ~(1 << 24);
+
+ i |= 0xef000000;
+ }
+ else
+ i |= 0xf2000000;
+
+ return i;
+}
+
+/* Turn a size (8, 16, 32, 64) into the respective bit number minus 3
+ (0, 1, 2, 3). */
+
+static unsigned
+neon_logbits (unsigned x)
+{
+ return ffs (x) - 4;
+}
+
+#define LOW4(R) ((R) & 0xf)
+#define HI1(R) (((R) >> 4) & 1)
+
+/* Encode insns with bit pattern:
+
+ |28/24|23|22 |21 20|19 16|15 12|11 8|7|6|5|4|3 0|
+ | U |x |D |size | Rn | Rd |x x x x|N|Q|M|x| Rm |
+
+ SIZE is passed in bits. -1 means size field isn't changed, in case it has a
+ different meaning for some instruction. */
+
+static void
+neon_three_same (int isquad, int ubit, int size)
+{
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg) << 16;
+ inst.instruction |= HI1 (inst.operands[1].reg) << 7;
+ inst.instruction |= LOW4 (inst.operands[2].reg);
+ inst.instruction |= HI1 (inst.operands[2].reg) << 5;
+ inst.instruction |= (isquad != 0) << 6;
+ inst.instruction |= (ubit != 0) << 24;
+ if (size != -1)
+ inst.instruction |= neon_logbits (size) << 20;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+/* Encode instructions of the form:
+
+ |28/24|23|22|21 20|19 18|17 16|15 12|11 7|6|5|4|3 0|
+ | U |x |D |x x |size |x x | Rd |x x x x x|Q|M|x| Rm |
+
+ Don't write size if SIZE == -1. */
+
+static void
+neon_two_same (int qbit, int ubit, int size)
+{
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= (qbit != 0) << 6;
+ inst.instruction |= (ubit != 0) << 24;
+
+ if (size != -1)
+ inst.instruction |= neon_logbits (size) << 18;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+/* Neon instruction encoders, in approximate order of appearance. */
+
+static void
+do_neon_dyadic_i_su (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_EQK, N_SU_32 | N_KEY);
+ neon_three_same (neon_quad (rs), et.type == NT_unsigned, et.size);
+}
+
+static void
+do_neon_dyadic_i64_su (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_EQK, N_SU_ALL | N_KEY);
+ neon_three_same (neon_quad (rs), et.type == NT_unsigned, et.size);
+}
+
+static void
+neon_imm_shift (int write_ubit, int uval, int isquad, struct neon_type_el et,
+ unsigned immbits)
+{
+ unsigned size = et.size >> 3;
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= (isquad != 0) << 6;
+ inst.instruction |= immbits << 16;
+ inst.instruction |= (size >> 3) << 7;
+ inst.instruction |= (size & 0x7) << 19;
+ if (write_ubit)
+ inst.instruction |= (uval != 0) << 24;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+static void
+do_neon_shl_imm (void)
+{
+ if (!inst.operands[2].isreg)
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDI, NS_QQI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs, N_EQK, N_KEY | N_I_ALL);
+ inst.instruction = NEON_ENC_IMMED (inst.instruction);
+ neon_imm_shift (FALSE, 0, neon_quad (rs), et, inst.operands[2].imm);
+ }
+ else
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_SU_ALL | N_KEY, N_EQK | N_SGN);
+ unsigned int tmp;
+
+ /* VSHL/VQSHL 3-register variants have syntax such as:
+ vshl.xx Dd, Dm, Dn
+ whereas other 3-register operations encoded by neon_three_same have
+ syntax like:
+ vadd.xx Dd, Dn, Dm
+ (i.e. with Dn & Dm reversed). Swap operands[1].reg and operands[2].reg
+ here. */
+ tmp = inst.operands[2].reg;
+ inst.operands[2].reg = inst.operands[1].reg;
+ inst.operands[1].reg = tmp;
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ neon_three_same (neon_quad (rs), et.type == NT_unsigned, et.size);
+ }
+}
+
+static void
+do_neon_qshl_imm (void)
+{
+ if (!inst.operands[2].isreg)
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDI, NS_QQI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs, N_EQK, N_SU_ALL | N_KEY);
+
+ inst.instruction = NEON_ENC_IMMED (inst.instruction);
+ neon_imm_shift (TRUE, et.type == NT_unsigned, neon_quad (rs), et,
+ inst.operands[2].imm);
+ }
+ else
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_SU_ALL | N_KEY, N_EQK | N_SGN);
+ unsigned int tmp;
+
+ /* See note in do_neon_shl_imm. */
+ tmp = inst.operands[2].reg;
+ inst.operands[2].reg = inst.operands[1].reg;
+ inst.operands[1].reg = tmp;
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ neon_three_same (neon_quad (rs), et.type == NT_unsigned, et.size);
+ }
+}
+
+static void
+do_neon_rshl (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_EQK, N_SU_ALL | N_KEY);
+ unsigned int tmp;
+
+ tmp = inst.operands[2].reg;
+ inst.operands[2].reg = inst.operands[1].reg;
+ inst.operands[1].reg = tmp;
+ neon_three_same (neon_quad (rs), et.type == NT_unsigned, et.size);
+}
+
+static int
+neon_cmode_for_logic_imm (unsigned immediate, unsigned *immbits, int size)
+{
+ /* Handle .I8 pseudo-instructions. */
+ if (size == 8)
+ {
+ /* Unfortunately, this will make everything apart from zero out-of-range.
+ FIXME is this the intended semantics? There doesn't seem much point in
+ accepting .I8 if so. */
+ immediate |= immediate << 8;
+ size = 16;
+ }
+
+ if (size >= 32)
+ {
+ if (immediate == (immediate & 0x000000ff))
+ {
+ *immbits = immediate;
+ return 0x1;
+ }
+ else if (immediate == (immediate & 0x0000ff00))
+ {
+ *immbits = immediate >> 8;
+ return 0x3;
+ }
+ else if (immediate == (immediate & 0x00ff0000))
+ {
+ *immbits = immediate >> 16;
+ return 0x5;
+ }
+ else if (immediate == (immediate & 0xff000000))
+ {
+ *immbits = immediate >> 24;
+ return 0x7;
+ }
+ if ((immediate & 0xffff) != (immediate >> 16))
+ goto bad_immediate;
+ immediate &= 0xffff;
+ }
+
+ if (immediate == (immediate & 0x000000ff))
+ {
+ *immbits = immediate;
+ return 0x9;
+ }
+ else if (immediate == (immediate & 0x0000ff00))
+ {
+ *immbits = immediate >> 8;
+ return 0xb;
+ }
+
+ bad_immediate:
+ first_error (_("immediate value out of range"));
+ return FAIL;
+}
+
+/* True if IMM has form 0bAAAAAAAABBBBBBBBCCCCCCCCDDDDDDDD for bits
+ A, B, C, D. */
+
+static int
+neon_bits_same_in_bytes (unsigned imm)
+{
+ return ((imm & 0x000000ff) == 0 || (imm & 0x000000ff) == 0x000000ff)
+ && ((imm & 0x0000ff00) == 0 || (imm & 0x0000ff00) == 0x0000ff00)
+ && ((imm & 0x00ff0000) == 0 || (imm & 0x00ff0000) == 0x00ff0000)
+ && ((imm & 0xff000000) == 0 || (imm & 0xff000000) == 0xff000000);
+}
+
+/* For immediate of above form, return 0bABCD. */
+
+static unsigned
+neon_squash_bits (unsigned imm)
+{
+ return (imm & 0x01) | ((imm & 0x0100) >> 7) | ((imm & 0x010000) >> 14)
+ | ((imm & 0x01000000) >> 21);
+}
+
+/* Compress quarter-float representation to 0b...000 abcdefgh. */
+
+static unsigned
+neon_qfloat_bits (unsigned imm)
+{
+ return ((imm >> 19) & 0x7f) | ((imm >> 24) & 0x80);
+}
+
+/* Returns CMODE. IMMBITS [7:0] is set to bits suitable for inserting into
+ the instruction. *OP is passed as the initial value of the op field, and
+ may be set to a different value depending on the constant (i.e.
+ "MOV I64, 0bAAAAAAAABBBB..." which uses OP = 1 despite being MOV not
+ MVN). If the immediate looks like a repeated parttern then also
+ try smaller element sizes. */
+
+static int
+neon_cmode_for_move_imm (unsigned immlo, unsigned immhi, int float_p,
+ unsigned *immbits, int *op, int size,
+ enum neon_el_type type)
+{
+ /* Only permit float immediates (including 0.0/-0.0) if the operand type is
+ float. */
+ if (type == NT_float && !float_p)
+ return FAIL;
+
+ if (type == NT_float && is_quarter_float (immlo) && immhi == 0)
+ {
+ if (size != 32 || *op == 1)
+ return FAIL;
+ *immbits = neon_qfloat_bits (immlo);
+ return 0xf;
+ }
+
+ if (size == 64)
+ {
+ if (neon_bits_same_in_bytes (immhi)
+ && neon_bits_same_in_bytes (immlo))
+ {
+ if (*op == 1)
+ return FAIL;
+ *immbits = (neon_squash_bits (immhi) << 4)
+ | neon_squash_bits (immlo);
+ *op = 1;
+ return 0xe;
+ }
+
+ if (immhi != immlo)
+ return FAIL;
+ }
+
+ if (size >= 32)
+ {
+ if (immlo == (immlo & 0x000000ff))
+ {
+ *immbits = immlo;
+ return 0x0;
+ }
+ else if (immlo == (immlo & 0x0000ff00))
+ {
+ *immbits = immlo >> 8;
+ return 0x2;
+ }
+ else if (immlo == (immlo & 0x00ff0000))
+ {
+ *immbits = immlo >> 16;
+ return 0x4;
+ }
+ else if (immlo == (immlo & 0xff000000))
+ {
+ *immbits = immlo >> 24;
+ return 0x6;
+ }
+ else if (immlo == ((immlo & 0x0000ff00) | 0x000000ff))
+ {
+ *immbits = (immlo >> 8) & 0xff;
+ return 0xc;
+ }
+ else if (immlo == ((immlo & 0x00ff0000) | 0x0000ffff))
+ {
+ *immbits = (immlo >> 16) & 0xff;
+ return 0xd;
+ }
+
+ if ((immlo & 0xffff) != (immlo >> 16))
+ return FAIL;
+ immlo &= 0xffff;
+ }
+
+ if (size >= 16)
+ {
+ if (immlo == (immlo & 0x000000ff))
+ {
+ *immbits = immlo;
+ return 0x8;
+ }
+ else if (immlo == (immlo & 0x0000ff00))
+ {
+ *immbits = immlo >> 8;
+ return 0xa;
+ }
+
+ if ((immlo & 0xff) != (immlo >> 8))
+ return FAIL;
+ immlo &= 0xff;
+ }
+
+ if (immlo == (immlo & 0x000000ff))
+ {
+ /* Don't allow MVN with 8-bit immediate. */
+ if (*op == 1)
+ return FAIL;
+ *immbits = immlo;
+ return 0xe;
+ }
+
+ return FAIL;
+}
+
+/* Write immediate bits [7:0] to the following locations:
+
+ |28/24|23 19|18 16|15 4|3 0|
+ | a |x x x x x|b c d|x x x x x x x x x x x x|e f g h|
+
+ This function is used by VMOV/VMVN/VORR/VBIC. */
+
+static void
+neon_write_immbits (unsigned immbits)
+{
+ inst.instruction |= immbits & 0xf;
+ inst.instruction |= ((immbits >> 4) & 0x7) << 16;
+ inst.instruction |= ((immbits >> 7) & 0x1) << 24;
+}
+
+/* Invert low-order SIZE bits of XHI:XLO. */
+
+static void
+neon_invert_size (unsigned *xlo, unsigned *xhi, int size)
+{
+ unsigned immlo = xlo ? *xlo : 0;
+ unsigned immhi = xhi ? *xhi : 0;
+
+ switch (size)
+ {
+ case 8:
+ immlo = (~immlo) & 0xff;
+ break;
+
+ case 16:
+ immlo = (~immlo) & 0xffff;
+ break;
+
+ case 64:
+ immhi = (~immhi) & 0xffffffff;
+ /* fall through. */
+
+ case 32:
+ immlo = (~immlo) & 0xffffffff;
+ break;
+
+ default:
+ abort ();
+ }
+
+ if (xlo)
+ *xlo = immlo;
+
+ if (xhi)
+ *xhi = immhi;
+}
+
+static void
+do_neon_logic (void)
+{
+ if (inst.operands[2].present && inst.operands[2].isreg)
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ neon_check_type (3, rs, N_IGNORE_TYPE);
+ /* U bit and size field were set as part of the bitmask. */
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ neon_three_same (neon_quad (rs), 0, -1);
+ }
+ else
+ {
+ enum neon_shape rs = neon_select_shape (NS_DI, NS_QI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_I8 | N_I16 | N_I32 | N_I64 | N_F32 | N_KEY, N_EQK);
+ enum neon_opc opcode = inst.instruction & 0x0fffffff;
+ unsigned immbits;
+ int cmode;
+
+ if (et.type == NT_invtype)
+ return;
+
+ inst.instruction = NEON_ENC_IMMED (inst.instruction);
+
+ immbits = inst.operands[1].imm;
+ if (et.size == 64)
+ {
+ /* .i64 is a pseudo-op, so the immediate must be a repeating
+ pattern. */
+ if (immbits != (inst.operands[1].regisimm ?
+ inst.operands[1].reg : 0))
+ {
+ /* Set immbits to an invalid constant. */
+ immbits = 0xdeadbeef;
+ }
+ }
+
+ switch (opcode)
+ {
+ case N_MNEM_vbic:
+ cmode = neon_cmode_for_logic_imm (immbits, &immbits, et.size);
+ break;
+
+ case N_MNEM_vorr:
+ cmode = neon_cmode_for_logic_imm (immbits, &immbits, et.size);
+ break;
+
+ case N_MNEM_vand:
+ /* Pseudo-instruction for VBIC. */
+ neon_invert_size (&immbits, 0, et.size);
+ cmode = neon_cmode_for_logic_imm (immbits, &immbits, et.size);
+ break;
+
+ case N_MNEM_vorn:
+ /* Pseudo-instruction for VORR. */
+ neon_invert_size (&immbits, 0, et.size);
+ cmode = neon_cmode_for_logic_imm (immbits, &immbits, et.size);
+ break;
+
+ default:
+ abort ();
+ }
+
+ if (cmode == FAIL)
+ return;
+
+ inst.instruction |= neon_quad (rs) << 6;
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= cmode << 8;
+ neon_write_immbits (immbits);
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+ }
+}
+
+static void
+do_neon_bitfield (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ neon_check_type (3, rs, N_IGNORE_TYPE);
+ neon_three_same (neon_quad (rs), 0, -1);
+}
+
+static void
+neon_dyadic_misc (enum neon_el_type ubit_meaning, unsigned types,
+ unsigned destbits)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs, N_EQK | destbits, N_EQK,
+ types | N_KEY);
+ if (et.type == NT_float)
+ {
+ inst.instruction = NEON_ENC_FLOAT (inst.instruction);
+ neon_three_same (neon_quad (rs), 0, -1);
+ }
+ else
+ {
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ neon_three_same (neon_quad (rs), et.type == ubit_meaning, et.size);
+ }
+}
+
+static void
+do_neon_dyadic_if_su (void)
+{
+ neon_dyadic_misc (NT_unsigned, N_SUF_32, 0);
+}
+
+static void
+do_neon_dyadic_if_su_d (void)
+{
+ /* This version only allow D registers, but that constraint is enforced during
+ operand parsing so we don't need to do anything extra here. */
+ neon_dyadic_misc (NT_unsigned, N_SUF_32, 0);
+}
+
+static void
+do_neon_dyadic_if_i_d (void)
+{
+ /* The "untyped" case can't happen. Do this to stop the "U" bit being
+ affected if we specify unsigned args. */
+ neon_dyadic_misc (NT_untyped, N_IF_32, 0);
+}
+
+enum vfp_or_neon_is_neon_bits
+{
+ NEON_CHECK_CC = 1,
+ NEON_CHECK_ARCH = 2
+};
+
+/* Call this function if an instruction which may have belonged to the VFP or
+ Neon instruction sets, but turned out to be a Neon instruction (due to the
+ operand types involved, etc.). We have to check and/or fix-up a couple of
+ things:
+
+ - Make sure the user hasn't attempted to make a Neon instruction
+ conditional.
+ - Alter the value in the condition code field if necessary.
+ - Make sure that the arch supports Neon instructions.
+
+ Which of these operations take place depends on bits from enum
+ vfp_or_neon_is_neon_bits.
+
+ WARNING: This function has side effects! If NEON_CHECK_CC is used and the
+ current instruction's condition is COND_ALWAYS, the condition field is
+ changed to inst.uncond_value. This is necessary because instructions shared
+ between VFP and Neon may be conditional for the VFP variants only, and the
+ unconditional Neon version must have, e.g., 0xF in the condition field. */
+
+static int
+vfp_or_neon_is_neon (unsigned check)
+{
+ /* Conditions are always legal in Thumb mode (IT blocks). */
+ if (!thumb_mode && (check & NEON_CHECK_CC))
+ {
+ if (inst.cond != COND_ALWAYS)
+ {
+ first_error (_(BAD_COND));
+ return FAIL;
+ }
+ if (inst.uncond_value != -1)
+ inst.instruction |= inst.uncond_value << 28;
+ }
+
+ if ((check & NEON_CHECK_ARCH)
+ && !ARM_CPU_HAS_FEATURE (cpu_variant, fpu_neon_ext_v1))
+ {
+ first_error (_(BAD_FPU));
+ return FAIL;
+ }
+
+ return SUCCESS;
+}
+
+static void
+do_neon_addsub_if_i (void)
+{
+ if (try_vfp_nsyn (3, do_vfp_nsyn_add_sub) == SUCCESS)
+ return;
+
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC | NEON_CHECK_ARCH) == FAIL)
+ return;
+
+ /* The "untyped" case can't happen. Do this to stop the "U" bit being
+ affected if we specify unsigned args. */
+ neon_dyadic_misc (NT_untyped, N_IF_32 | N_I64, 0);
+}
+
+/* Swaps operands 1 and 2. If operand 1 (optional arg) was omitted, we want the
+ result to be:
+ V<op> A,B (A is operand 0, B is operand 2)
+ to mean:
+ V<op> A,B,A
+ not:
+ V<op> A,B,B
+ so handle that case specially. */
+
+static void
+neon_exchange_operands (void)
+{
+ void *scratch = alloca (sizeof (inst.operands[0]));
+ if (inst.operands[1].present)
+ {
+ /* Swap operands[1] and operands[2]. */
+ memcpy (scratch, &inst.operands[1], sizeof (inst.operands[0]));
+ inst.operands[1] = inst.operands[2];
+ memcpy (&inst.operands[2], scratch, sizeof (inst.operands[0]));
+ }
+ else
+ {
+ inst.operands[1] = inst.operands[2];
+ inst.operands[2] = inst.operands[0];
+ }
+}
+
+static void
+neon_compare (unsigned regtypes, unsigned immtypes, int invert)
+{
+ if (inst.operands[2].isreg)
+ {
+ if (invert)
+ neon_exchange_operands ();
+ neon_dyadic_misc (NT_unsigned, regtypes, N_SIZ);
+ }
+ else
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDI, NS_QQI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK | N_SIZ, immtypes | N_KEY);
+
+ inst.instruction = NEON_ENC_IMMED (inst.instruction);
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= neon_quad (rs) << 6;
+ inst.instruction |= (et.type == NT_float) << 10;
+ inst.instruction |= neon_logbits (et.size) << 18;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+ }
+}
+
+static void
+do_neon_cmp (void)
+{
+ neon_compare (N_SUF_32, N_S8 | N_S16 | N_S32 | N_F32, FALSE);
+}
+
+static void
+do_neon_cmp_inv (void)
+{
+ neon_compare (N_SUF_32, N_S8 | N_S16 | N_S32 | N_F32, TRUE);
+}
+
+static void
+do_neon_ceq (void)
+{
+ neon_compare (N_IF_32, N_IF_32, FALSE);
+}
+
+/* For multiply instructions, we have the possibility of 16-bit or 32-bit
+ scalars, which are encoded in 5 bits, M : Rm.
+ For 16-bit scalars, the register is encoded in Rm[2:0] and the index in
+ M:Rm[3], and for 32-bit scalars, the register is encoded in Rm[3:0] and the
+ index in M. */
+
+static unsigned
+neon_scalar_for_mul (unsigned scalar, unsigned elsize)
+{
+ unsigned regno = NEON_SCALAR_REG (scalar);
+ unsigned elno = NEON_SCALAR_INDEX (scalar);
+
+ switch (elsize)
+ {
+ case 16:
+ if (regno > 7 || elno > 3)
+ goto bad_scalar;
+ return regno | (elno << 3);
+
+ case 32:
+ if (regno > 15 || elno > 1)
+ goto bad_scalar;
+ return regno | (elno << 4);
+
+ default:
+ bad_scalar:
+ first_error (_("scalar out of range for multiply instruction"));
+ }
+
+ return 0;
+}
+
+/* Encode multiply / multiply-accumulate scalar instructions. */
+
+static void
+neon_mul_mac (struct neon_type_el et, int ubit)
+{
+ unsigned scalar;
+
+ /* Give a more helpful error message if we have an invalid type. */
+ if (et.type == NT_invtype)
+ return;
+
+ scalar = neon_scalar_for_mul (inst.operands[2].reg, et.size);
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg) << 16;
+ inst.instruction |= HI1 (inst.operands[1].reg) << 7;
+ inst.instruction |= LOW4 (scalar);
+ inst.instruction |= HI1 (scalar) << 5;
+ inst.instruction |= (et.type == NT_float) << 8;
+ inst.instruction |= neon_logbits (et.size) << 20;
+ inst.instruction |= (ubit != 0) << 24;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+static void
+do_neon_mac_maybe_scalar (void)
+{
+ if (try_vfp_nsyn (3, do_vfp_nsyn_mla_mls) == SUCCESS)
+ return;
+
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC | NEON_CHECK_ARCH) == FAIL)
+ return;
+
+ if (inst.operands[2].isscalar)
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDS, NS_QQS, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_EQK, N_I16 | N_I32 | N_F32 | N_KEY);
+ inst.instruction = NEON_ENC_SCALAR (inst.instruction);
+ neon_mul_mac (et, neon_quad (rs));
+ }
+ else
+ {
+ /* The "untyped" case can't happen. Do this to stop the "U" bit being
+ affected if we specify unsigned args. */
+ neon_dyadic_misc (NT_untyped, N_IF_32, 0);
+ }
+}
+
+static void
+do_neon_tst (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_EQK, N_8 | N_16 | N_32 | N_KEY);
+ neon_three_same (neon_quad (rs), 0, et.size);
+}
+
+/* VMUL with 3 registers allows the P8 type. The scalar version supports the
+ same types as the MAC equivalents. The polynomial type for this instruction
+ is encoded the same as the integer type. */
+
+static void
+do_neon_mul (void)
+{
+ if (try_vfp_nsyn (3, do_vfp_nsyn_mul) == SUCCESS)
+ return;
+
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC | NEON_CHECK_ARCH) == FAIL)
+ return;
+
+ if (inst.operands[2].isscalar)
+ do_neon_mac_maybe_scalar ();
+ else
+ neon_dyadic_misc (NT_poly, N_I8 | N_I16 | N_I32 | N_F32 | N_P8, 0);
+}
+
+static void
+do_neon_qdmulh (void)
+{
+ if (inst.operands[2].isscalar)
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDS, NS_QQS, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_EQK, N_S16 | N_S32 | N_KEY);
+ inst.instruction = NEON_ENC_SCALAR (inst.instruction);
+ neon_mul_mac (et, neon_quad (rs));
+ }
+ else
+ {
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_EQK, N_S16 | N_S32 | N_KEY);
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ /* The U bit (rounding) comes from bit mask. */
+ neon_three_same (neon_quad (rs), 0, et.size);
+ }
+}
+
+static void
+do_neon_fcmp_absolute (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ neon_check_type (3, rs, N_EQK, N_EQK, N_F32 | N_KEY);
+ /* Size field comes from bit mask. */
+ neon_three_same (neon_quad (rs), 1, -1);
+}
+
+static void
+do_neon_fcmp_absolute_inv (void)
+{
+ neon_exchange_operands ();
+ do_neon_fcmp_absolute ();
+}
+
+static void
+do_neon_step (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDD, NS_QQQ, NS_NULL);
+ neon_check_type (3, rs, N_EQK, N_EQK, N_F32 | N_KEY);
+ neon_three_same (neon_quad (rs), 0, -1);
+}
+
+static void
+do_neon_abs_neg (void)
+{
+ enum neon_shape rs;
+ struct neon_type_el et;
+
+ if (try_vfp_nsyn (2, do_vfp_nsyn_abs_neg) == SUCCESS)
+ return;
+
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC | NEON_CHECK_ARCH) == FAIL)
+ return;
+
+ rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ et = neon_check_type (2, rs, N_EQK, N_S8 | N_S16 | N_S32 | N_F32 | N_KEY);
+
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= neon_quad (rs) << 6;
+ inst.instruction |= (et.type == NT_float) << 10;
+ inst.instruction |= neon_logbits (et.size) << 18;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+static void
+do_neon_sli (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDI, NS_QQI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_8 | N_16 | N_32 | N_64 | N_KEY);
+ int imm = inst.operands[2].imm;
+ constraint (imm < 0 || (unsigned)imm >= et.size,
+ _("immediate out of range for insert"));
+ neon_imm_shift (FALSE, 0, neon_quad (rs), et, imm);
+}
+
+static void
+do_neon_sri (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDI, NS_QQI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_8 | N_16 | N_32 | N_64 | N_KEY);
+ int imm = inst.operands[2].imm;
+ constraint (imm < 1 || (unsigned)imm > et.size,
+ _("immediate out of range for insert"));
+ neon_imm_shift (FALSE, 0, neon_quad (rs), et, et.size - imm);
+}
+
+static void
+do_neon_qshlu_imm (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDI, NS_QQI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK | N_UNS, N_S8 | N_S16 | N_S32 | N_S64 | N_KEY);
+ int imm = inst.operands[2].imm;
+ constraint (imm < 0 || (unsigned)imm >= et.size,
+ _("immediate out of range for shift"));
+ /* Only encodes the 'U present' variant of the instruction.
+ In this case, signed types have OP (bit 8) set to 0.
+ Unsigned types have OP set to 1. */
+ inst.instruction |= (et.type == NT_unsigned) << 8;
+ /* The rest of the bits are the same as other immediate shifts. */
+ neon_imm_shift (FALSE, 0, neon_quad (rs), et, imm);
+}
+
+static void
+do_neon_qmovn (void)
+{
+ struct neon_type_el et = neon_check_type (2, NS_DQ,
+ N_EQK | N_HLF, N_SU_16_64 | N_KEY);
+ /* Saturating move where operands can be signed or unsigned, and the
+ destination has the same signedness. */
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ if (et.type == NT_unsigned)
+ inst.instruction |= 0xc0;
+ else
+ inst.instruction |= 0x80;
+ neon_two_same (0, 1, et.size / 2);
+}
+
+static void
+do_neon_qmovun (void)
+{
+ struct neon_type_el et = neon_check_type (2, NS_DQ,
+ N_EQK | N_HLF | N_UNS, N_S16 | N_S32 | N_S64 | N_KEY);
+ /* Saturating move with unsigned results. Operands must be signed. */
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ neon_two_same (0, 1, et.size / 2);
+}
+
+static void
+do_neon_rshift_sat_narrow (void)
+{
+ /* FIXME: Types for narrowing. If operands are signed, results can be signed
+ or unsigned. If operands are unsigned, results must also be unsigned. */
+ struct neon_type_el et = neon_check_type (2, NS_DQI,
+ N_EQK | N_HLF, N_SU_16_64 | N_KEY);
+ int imm = inst.operands[2].imm;
+ /* This gets the bounds check, size encoding and immediate bits calculation
+ right. */
+ et.size /= 2;
+
+ /* VQ{R}SHRN.I<size> <Dd>, <Qm>, #0 is a synonym for
+ VQMOVN.I<size> <Dd>, <Qm>. */
+ if (imm == 0)
+ {
+ inst.operands[2].present = 0;
+ inst.instruction = N_MNEM_vqmovn;
+ do_neon_qmovn ();
+ return;
+ }
+
+ constraint (imm < 1 || (unsigned)imm > et.size,
+ _("immediate out of range"));
+ neon_imm_shift (TRUE, et.type == NT_unsigned, 0, et, et.size - imm);
+}
+
+static void
+do_neon_rshift_sat_narrow_u (void)
+{
+ /* FIXME: Types for narrowing. If operands are signed, results can be signed
+ or unsigned. If operands are unsigned, results must also be unsigned. */
+ struct neon_type_el et = neon_check_type (2, NS_DQI,
+ N_EQK | N_HLF | N_UNS, N_S16 | N_S32 | N_S64 | N_KEY);
+ int imm = inst.operands[2].imm;
+ /* This gets the bounds check, size encoding and immediate bits calculation
+ right. */
+ et.size /= 2;
+
+ /* VQSHRUN.I<size> <Dd>, <Qm>, #0 is a synonym for
+ VQMOVUN.I<size> <Dd>, <Qm>. */
+ if (imm == 0)
+ {
+ inst.operands[2].present = 0;
+ inst.instruction = N_MNEM_vqmovun;
+ do_neon_qmovun ();
+ return;
+ }
+
+ constraint (imm < 1 || (unsigned)imm > et.size,
+ _("immediate out of range"));
+ /* FIXME: The manual is kind of unclear about what value U should have in
+ VQ{R}SHRUN instructions, but U=0, op=0 definitely encodes VRSHR, so it
+ must be 1. */
+ neon_imm_shift (TRUE, 1, 0, et, et.size - imm);
+}
+
+static void
+do_neon_movn (void)
+{
+ struct neon_type_el et = neon_check_type (2, NS_DQ,
+ N_EQK | N_HLF, N_I16 | N_I32 | N_I64 | N_KEY);
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ neon_two_same (0, 1, et.size / 2);
+}
+
+static void
+do_neon_rshift_narrow (void)
+{
+ struct neon_type_el et = neon_check_type (2, NS_DQI,
+ N_EQK | N_HLF, N_I16 | N_I32 | N_I64 | N_KEY);
+ int imm = inst.operands[2].imm;
+ /* This gets the bounds check, size encoding and immediate bits calculation
+ right. */
+ et.size /= 2;
+
+ /* If immediate is zero then we are a pseudo-instruction for
+ VMOVN.I<size> <Dd>, <Qm> */
+ if (imm == 0)
+ {
+ inst.operands[2].present = 0;
+ inst.instruction = N_MNEM_vmovn;
+ do_neon_movn ();
+ return;
+ }
+
+ constraint (imm < 1 || (unsigned)imm > et.size,
+ _("immediate out of range for narrowing operation"));
+ neon_imm_shift (FALSE, 0, 0, et, et.size - imm);
+}
+
+static void
+do_neon_shll (void)
+{
+ /* FIXME: Type checking when lengthening. */
+ struct neon_type_el et = neon_check_type (2, NS_QDI,
+ N_EQK | N_DBL, N_I8 | N_I16 | N_I32 | N_KEY);
+ unsigned imm = inst.operands[2].imm;
+
+ if (imm == et.size)
+ {
+ /* Maximum shift variant. */
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= neon_logbits (et.size) << 18;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+ }
+ else
+ {
+ /* A more-specific type check for non-max versions. */
+ et = neon_check_type (2, NS_QDI,
+ N_EQK | N_DBL, N_SU_32 | N_KEY);
+ inst.instruction = NEON_ENC_IMMED (inst.instruction);
+ neon_imm_shift (TRUE, et.type == NT_unsigned, 0, et, imm);
+ }
+}
+
+/* Check the various types for the VCVT instruction, and return which version
+ the current instruction is. */
+
+static int
+neon_cvt_flavour (enum neon_shape rs)
+{
+#define CVT_VAR(C,X,Y) \
+ et = neon_check_type (2, rs, whole_reg | (X), whole_reg | (Y)); \
+ if (et.type != NT_invtype) \
+ { \
+ inst.error = NULL; \
+ return (C); \
+ }
+ struct neon_type_el et;
+ unsigned whole_reg = (rs == NS_FFI || rs == NS_FD || rs == NS_DF
+ || rs == NS_FF) ? N_VFP : 0;
+ /* The instruction versions which take an immediate take one register
+ argument, which is extended to the width of the full register. Thus the
+ "source" and "destination" registers must have the same width. Hack that
+ here by making the size equal to the key (wider, in this case) operand. */
+ unsigned key = (rs == NS_QQI || rs == NS_DDI || rs == NS_FFI) ? N_KEY : 0;
+
+ CVT_VAR (0, N_S32, N_F32);
+ CVT_VAR (1, N_U32, N_F32);
+ CVT_VAR (2, N_F32, N_S32);
+ CVT_VAR (3, N_F32, N_U32);
+
+ whole_reg = N_VFP;
+
+ /* VFP instructions. */
+ CVT_VAR (4, N_F32, N_F64);
+ CVT_VAR (5, N_F64, N_F32);
+ CVT_VAR (6, N_S32, N_F64 | key);
+ CVT_VAR (7, N_U32, N_F64 | key);
+ CVT_VAR (8, N_F64 | key, N_S32);
+ CVT_VAR (9, N_F64 | key, N_U32);
+ /* VFP instructions with bitshift. */
+ CVT_VAR (10, N_F32 | key, N_S16);
+ CVT_VAR (11, N_F32 | key, N_U16);
+ CVT_VAR (12, N_F64 | key, N_S16);
+ CVT_VAR (13, N_F64 | key, N_U16);
+ CVT_VAR (14, N_S16, N_F32 | key);
+ CVT_VAR (15, N_U16, N_F32 | key);
+ CVT_VAR (16, N_S16, N_F64 | key);
+ CVT_VAR (17, N_U16, N_F64 | key);
+
+ return -1;
+#undef CVT_VAR
+}
+
+/* Neon-syntax VFP conversions. */
+
+static void
+do_vfp_nsyn_cvt (enum neon_shape rs, int flavour)
+{
+ const char *opname = 0;
+
+ if (rs == NS_DDI || rs == NS_QQI || rs == NS_FFI)
+ {
+ /* Conversions with immediate bitshift. */
+ const char *enc[] =
+ {
+ "ftosls",
+ "ftouls",
+ "fsltos",
+ "fultos",
+ NULL,
+ NULL,
+ "ftosld",
+ "ftould",
+ "fsltod",
+ "fultod",
+ "fshtos",
+ "fuhtos",
+ "fshtod",
+ "fuhtod",
+ "ftoshs",
+ "ftouhs",
+ "ftoshd",
+ "ftouhd"
+ };
+
+ if (flavour >= 0 && flavour < (int) ARRAY_SIZE (enc))
+ {
+ opname = enc[flavour];
+ constraint (inst.operands[0].reg != inst.operands[1].reg,
+ _("operands 0 and 1 must be the same register"));
+ inst.operands[1] = inst.operands[2];
+ memset (&inst.operands[2], '\0', sizeof (inst.operands[2]));
+ }
+ }
+ else
+ {
+ /* Conversions without bitshift. */
+ const char *enc[] =
+ {
+ "ftosis",
+ "ftouis",
+ "fsitos",
+ "fuitos",
+ "fcvtsd",
+ "fcvtds",
+ "ftosid",
+ "ftouid",
+ "fsitod",
+ "fuitod"
+ };
+
+ if (flavour >= 0 && flavour < (int) ARRAY_SIZE (enc))
+ opname = enc[flavour];
+ }
+
+ if (opname)
+ do_vfp_nsyn_opcode (opname);
+}
+
+static void
+do_vfp_nsyn_cvtz (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_FF, NS_FD, NS_NULL);
+ int flavour = neon_cvt_flavour (rs);
+ const char *enc[] =
+ {
+ "ftosizs",
+ "ftouizs",
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ "ftosizd",
+ "ftouizd"
+ };
+
+ if (flavour >= 0 && flavour < (int) ARRAY_SIZE (enc) && enc[flavour])
+ do_vfp_nsyn_opcode (enc[flavour]);
+}
+
+static void
+do_neon_cvt (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDI, NS_QQI, NS_FFI, NS_DD, NS_QQ,
+ NS_FD, NS_DF, NS_FF, NS_NULL);
+ int flavour = neon_cvt_flavour (rs);
+
+ /* VFP rather than Neon conversions. */
+ if (flavour >= 4)
+ {
+ do_vfp_nsyn_cvt (rs, flavour);
+ return;
+ }
+
+ switch (rs)
+ {
+ case NS_DDI:
+ case NS_QQI:
+ {
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC | NEON_CHECK_ARCH) == FAIL)
+ return;
+
+ /* Fixed-point conversion with #0 immediate is encoded as an
+ integer conversion. */
+ if (inst.operands[2].present && inst.operands[2].imm == 0)
+ goto int_encode;
+ unsigned immbits = 32 - inst.operands[2].imm;
+ unsigned enctab[] = { 0x0000100, 0x1000100, 0x0, 0x1000000 };
+ inst.instruction = NEON_ENC_IMMED (inst.instruction);
+ if (flavour != -1)
+ inst.instruction |= enctab[flavour];
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= neon_quad (rs) << 6;
+ inst.instruction |= 1 << 21;
+ inst.instruction |= immbits << 16;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+ }
+ break;
+
+ case NS_DD:
+ case NS_QQ:
+ int_encode:
+ {
+ unsigned enctab[] = { 0x100, 0x180, 0x0, 0x080 };
+
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC | NEON_CHECK_ARCH) == FAIL)
+ return;
+
+ if (flavour != -1)
+ inst.instruction |= enctab[flavour];
+
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= neon_quad (rs) << 6;
+ inst.instruction |= 2 << 18;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+ }
+ break;
+
+ default:
+ /* Some VFP conversions go here (s32 <-> f32, u32 <-> f32). */
+ do_vfp_nsyn_cvt (rs, flavour);
+ }
+}
+
+static void
+neon_move_immediate (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DI, NS_QI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_I8 | N_I16 | N_I32 | N_I64 | N_F32 | N_KEY, N_EQK);
+ unsigned immlo, immhi = 0, immbits;
+ int op, cmode, float_p;
+
+ constraint (et.type == NT_invtype,
+ _("operand size must be specified for immediate VMOV"));
+
+ /* We start out as an MVN instruction if OP = 1, MOV otherwise. */
+ op = (inst.instruction & (1 << 5)) != 0;
+
+ immlo = inst.operands[1].imm;
+ if (inst.operands[1].regisimm)
+ immhi = inst.operands[1].reg;
+
+ constraint (et.size < 32 && (immlo & ~((1 << et.size) - 1)) != 0,
+ _("immediate has bits set outside the operand size"));
+
+ float_p = inst.operands[1].immisfloat;
+
+ if ((cmode = neon_cmode_for_move_imm (immlo, immhi, float_p, &immbits, &op,
+ et.size, et.type)) == FAIL)
+ {
+ /* Invert relevant bits only. */
+ neon_invert_size (&immlo, &immhi, et.size);
+ /* Flip from VMOV/VMVN to VMVN/VMOV. Some immediate types are unavailable
+ with one or the other; those cases are caught by
+ neon_cmode_for_move_imm. */
+ op = !op;
+ if ((cmode = neon_cmode_for_move_imm (immlo, immhi, float_p, &immbits,
+ &op, et.size, et.type)) == FAIL)
+ {
+ first_error (_("immediate out of range"));
+ return;
+ }
+ }
+
+ inst.instruction &= ~(1 << 5);
+ inst.instruction |= op << 5;
+
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= neon_quad (rs) << 6;
+ inst.instruction |= cmode << 8;
+
+ neon_write_immbits (immbits);
+}
+
+static void
+do_neon_mvn (void)
+{
+ if (inst.operands[1].isreg)
+ {
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= neon_quad (rs) << 6;
+ }
+ else
+ {
+ inst.instruction = NEON_ENC_IMMED (inst.instruction);
+ neon_move_immediate ();
+ }
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+/* Encode instructions of form:
+
+ |28/24|23|22|21 20|19 16|15 12|11 8|7|6|5|4|3 0|
+ | U |x |D |size | Rn | Rd |x x x x|N|x|M|x| Rm |
+
+*/
+
+static void
+neon_mixed_length (struct neon_type_el et, unsigned size)
+{
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg) << 16;
+ inst.instruction |= HI1 (inst.operands[1].reg) << 7;
+ inst.instruction |= LOW4 (inst.operands[2].reg);
+ inst.instruction |= HI1 (inst.operands[2].reg) << 5;
+ inst.instruction |= (et.type == NT_unsigned) << 24;
+ inst.instruction |= neon_logbits (size) << 20;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+static void
+do_neon_dyadic_long (void)
+{
+ /* FIXME: Type checking for lengthening op. */
+ struct neon_type_el et = neon_check_type (3, NS_QDD,
+ N_EQK | N_DBL, N_EQK, N_SU_32 | N_KEY);
+ neon_mixed_length (et, et.size);
+}
+
+static void
+do_neon_abal (void)
+{
+ struct neon_type_el et = neon_check_type (3, NS_QDD,
+ N_EQK | N_INT | N_DBL, N_EQK, N_SU_32 | N_KEY);
+ neon_mixed_length (et, et.size);
+}
+
+static void
+neon_mac_reg_scalar_long (unsigned regtypes, unsigned scalartypes)
+{
+ if (inst.operands[2].isscalar)
+ {
+ struct neon_type_el et = neon_check_type (3, NS_QDS,
+ N_EQK | N_DBL, N_EQK, regtypes | N_KEY);
+ inst.instruction = NEON_ENC_SCALAR (inst.instruction);
+ neon_mul_mac (et, et.type == NT_unsigned);
+ }
+ else
+ {
+ struct neon_type_el et = neon_check_type (3, NS_QDD,
+ N_EQK | N_DBL, N_EQK, scalartypes | N_KEY);
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ neon_mixed_length (et, et.size);
+ }
+}
+
+static void
+do_neon_mac_maybe_scalar_long (void)
+{
+ neon_mac_reg_scalar_long (N_S16 | N_S32 | N_U16 | N_U32, N_SU_32);
+}
+
+static void
+do_neon_dyadic_wide (void)
+{
+ struct neon_type_el et = neon_check_type (3, NS_QQD,
+ N_EQK | N_DBL, N_EQK | N_DBL, N_SU_32 | N_KEY);
+ neon_mixed_length (et, et.size);
+}
+
+static void
+do_neon_dyadic_narrow (void)
+{
+ struct neon_type_el et = neon_check_type (3, NS_QDD,
+ N_EQK | N_DBL, N_EQK, N_I16 | N_I32 | N_I64 | N_KEY);
+ /* Operand sign is unimportant, and the U bit is part of the opcode,
+ so force the operand type to integer. */
+ et.type = NT_integer;
+ neon_mixed_length (et, et.size / 2);
+}
+
+static void
+do_neon_mul_sat_scalar_long (void)
+{
+ neon_mac_reg_scalar_long (N_S16 | N_S32, N_S16 | N_S32);
+}
+
+static void
+do_neon_vmull (void)
+{
+ if (inst.operands[2].isscalar)
+ do_neon_mac_maybe_scalar_long ();
+ else
+ {
+ struct neon_type_el et = neon_check_type (3, NS_QDD,
+ N_EQK | N_DBL, N_EQK, N_SU_32 | N_P8 | N_KEY);
+ if (et.type == NT_poly)
+ inst.instruction = NEON_ENC_POLY (inst.instruction);
+ else
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ /* For polynomial encoding, size field must be 0b00 and the U bit must be
+ zero. Should be OK as-is. */
+ neon_mixed_length (et, et.size);
+ }
+}
+
+static void
+do_neon_ext (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDDI, NS_QQQI, NS_NULL);
+ struct neon_type_el et = neon_check_type (3, rs,
+ N_EQK, N_EQK, N_8 | N_16 | N_32 | N_64 | N_KEY);
+ unsigned imm = (inst.operands[3].imm * et.size) / 8;
+ constraint (imm >= (neon_quad (rs) ? 16 : 8), _("shift out of range"));
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg) << 16;
+ inst.instruction |= HI1 (inst.operands[1].reg) << 7;
+ inst.instruction |= LOW4 (inst.operands[2].reg);
+ inst.instruction |= HI1 (inst.operands[2].reg) << 5;
+ inst.instruction |= neon_quad (rs) << 6;
+ inst.instruction |= imm << 8;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+static void
+do_neon_rev (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_8 | N_16 | N_32 | N_KEY);
+ unsigned op = (inst.instruction >> 7) & 3;
+ /* N (width of reversed regions) is encoded as part of the bitmask. We
+ extract it here to check the elements to be reversed are smaller.
+ Otherwise we'd get a reserved instruction. */
+ unsigned elsize = (op == 2) ? 16 : (op == 1) ? 32 : (op == 0) ? 64 : 0;
+ assert (elsize != 0);
+ constraint (et.size >= elsize,
+ _("elements must be smaller than reversal region"));
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_dup (void)
+{
+ if (inst.operands[1].isscalar)
+ {
+ enum neon_shape rs = neon_select_shape (NS_DS, NS_QS, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_8 | N_16 | N_32 | N_KEY);
+ unsigned sizebits = et.size >> 3;
+ unsigned dm = NEON_SCALAR_REG (inst.operands[1].reg);
+ int logsize = neon_logbits (et.size);
+ unsigned x = NEON_SCALAR_INDEX (inst.operands[1].reg) << logsize;
+
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC) == FAIL)
+ return;
+
+ inst.instruction = NEON_ENC_SCALAR (inst.instruction);
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (dm);
+ inst.instruction |= HI1 (dm) << 5;
+ inst.instruction |= neon_quad (rs) << 6;
+ inst.instruction |= x << 17;
+ inst.instruction |= sizebits << 16;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+ }
+ else
+ {
+ enum neon_shape rs = neon_select_shape (NS_DR, NS_QR, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_8 | N_16 | N_32 | N_KEY, N_EQK);
+ /* Duplicate ARM register to lanes of vector. */
+ inst.instruction = NEON_ENC_ARMREG (inst.instruction);
+ switch (et.size)
+ {
+ case 8: inst.instruction |= 0x400000; break;
+ case 16: inst.instruction |= 0x000020; break;
+ case 32: inst.instruction |= 0x000000; break;
+ default: break;
+ }
+ inst.instruction |= LOW4 (inst.operands[1].reg) << 12;
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 16;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 7;
+ inst.instruction |= neon_quad (rs) << 21;
+ /* The encoding for this instruction is identical for the ARM and Thumb
+ variants, except for the condition field. */
+ do_vfp_cond_or_thumb ();
+ }
+}
+
+/* VMOV has particularly many variations. It can be one of:
+ 0. VMOV<c><q> <Qd>, <Qm>
+ 1. VMOV<c><q> <Dd>, <Dm>
+ (Register operations, which are VORR with Rm = Rn.)
+ 2. VMOV<c><q>.<dt> <Qd>, #<imm>
+ 3. VMOV<c><q>.<dt> <Dd>, #<imm>
+ (Immediate loads.)
+ 4. VMOV<c><q>.<size> <Dn[x]>, <Rd>
+ (ARM register to scalar.)
+ 5. VMOV<c><q> <Dm>, <Rd>, <Rn>
+ (Two ARM registers to vector.)
+ 6. VMOV<c><q>.<dt> <Rd>, <Dn[x]>
+ (Scalar to ARM register.)
+ 7. VMOV<c><q> <Rd>, <Rn>, <Dm>
+ (Vector to two ARM registers.)
+ 8. VMOV.F32 <Sd>, <Sm>
+ 9. VMOV.F64 <Dd>, <Dm>
+ (VFP register moves.)
+ 10. VMOV.F32 <Sd>, #imm
+ 11. VMOV.F64 <Dd>, #imm
+ (VFP float immediate load.)
+ 12. VMOV <Rd>, <Sm>
+ (VFP single to ARM reg.)
+ 13. VMOV <Sd>, <Rm>
+ (ARM reg to VFP single.)
+ 14. VMOV <Rd>, <Re>, <Sn>, <Sm>
+ (Two ARM regs to two VFP singles.)
+ 15. VMOV <Sd>, <Se>, <Rn>, <Rm>
+ (Two VFP singles to two ARM regs.)
+
+ These cases can be disambiguated using neon_select_shape, except cases 1/9
+ and 3/11 which depend on the operand type too.
+
+ All the encoded bits are hardcoded by this function.
+
+ Cases 4, 6 may be used with VFPv1 and above (only 32-bit transfers!).
+ Cases 5, 7 may be used with VFPv2 and above.
+
+ FIXME: Some of the checking may be a bit sloppy (in a couple of cases you
+ can specify a type where it doesn't make sense to, and is ignored).
+*/
+
+static void
+do_neon_mov (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_RRFF, NS_FFRR, NS_DRR, NS_RRD,
+ NS_QQ, NS_DD, NS_QI, NS_DI, NS_SR, NS_RS, NS_FF, NS_FI, NS_RF, NS_FR,
+ NS_NULL);
+ struct neon_type_el et;
+ const char *ldconst = 0;
+
+ switch (rs)
+ {
+ case NS_DD: /* case 1/9. */
+ et = neon_check_type (2, rs, N_EQK, N_F64 | N_KEY);
+ /* It is not an error here if no type is given. */
+ inst.error = NULL;
+ if (et.type == NT_float && et.size == 64)
+ {
+ do_vfp_nsyn_opcode ("fcpyd");
+ break;
+ }
+ /* fall through. */
+
+ case NS_QQ: /* case 0/1. */
+ {
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC | NEON_CHECK_ARCH) == FAIL)
+ return;
+ /* The architecture manual I have doesn't explicitly state which
+ value the U bit should have for register->register moves, but
+ the equivalent VORR instruction has U = 0, so do that. */
+ inst.instruction = 0x0200110;
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg);
+ inst.instruction |= HI1 (inst.operands[1].reg) << 5;
+ inst.instruction |= LOW4 (inst.operands[1].reg) << 16;
+ inst.instruction |= HI1 (inst.operands[1].reg) << 7;
+ inst.instruction |= neon_quad (rs) << 6;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+ }
+ break;
+
+ case NS_DI: /* case 3/11. */
+ et = neon_check_type (2, rs, N_EQK, N_F64 | N_KEY);
+ inst.error = NULL;
+ if (et.type == NT_float && et.size == 64)
+ {
+ /* case 11 (fconstd). */
+ ldconst = "fconstd";
+ goto encode_fconstd;
+ }
+ /* fall through. */
+
+ case NS_QI: /* case 2/3. */
+ if (vfp_or_neon_is_neon (NEON_CHECK_CC | NEON_CHECK_ARCH) == FAIL)
+ return;
+ inst.instruction = 0x0800010;
+ neon_move_immediate ();
+ inst.instruction = neon_dp_fixup (inst.instruction);
+ break;
+
+ case NS_SR: /* case 4. */
+ {
+ unsigned bcdebits = 0;
+ struct neon_type_el et = neon_check_type (2, NS_NULL,
+ N_8 | N_16 | N_32 | N_KEY, N_EQK);
+ int logsize = neon_logbits (et.size);
+ unsigned dn = NEON_SCALAR_REG (inst.operands[0].reg);
+ unsigned x = NEON_SCALAR_INDEX (inst.operands[0].reg);
+
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, fpu_vfp_ext_v1),
+ _(BAD_FPU));
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, fpu_neon_ext_v1)
+ && et.size != 32, _(BAD_FPU));
+ constraint (et.type == NT_invtype, _("bad type for scalar"));
+ constraint (x >= 64 / et.size, _("scalar index out of range"));
+
+ switch (et.size)
+ {
+ case 8: bcdebits = 0x8; break;
+ case 16: bcdebits = 0x1; break;
+ case 32: bcdebits = 0x0; break;
+ default: ;
+ }
+
+ bcdebits |= x << logsize;
+
+ inst.instruction = 0xe000b10;
+ do_vfp_cond_or_thumb ();
+ inst.instruction |= LOW4 (dn) << 16;
+ inst.instruction |= HI1 (dn) << 7;
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= (bcdebits & 3) << 5;
+ inst.instruction |= (bcdebits >> 2) << 21;
+ }
+ break;
+
+ case NS_DRR: /* case 5 (fmdrr). */
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, fpu_vfp_ext_v2),
+ _(BAD_FPU));
+
+ inst.instruction = 0xc400b10;
+ do_vfp_cond_or_thumb ();
+ inst.instruction |= LOW4 (inst.operands[0].reg);
+ inst.instruction |= HI1 (inst.operands[0].reg) << 5;
+ inst.instruction |= inst.operands[1].reg << 12;
+ inst.instruction |= inst.operands[2].reg << 16;
+ break;
+
+ case NS_RS: /* case 6. */
+ {
+ struct neon_type_el et = neon_check_type (2, NS_NULL,
+ N_EQK, N_S8 | N_S16 | N_U8 | N_U16 | N_32 | N_KEY);
+ unsigned logsize = neon_logbits (et.size);
+ unsigned dn = NEON_SCALAR_REG (inst.operands[1].reg);
+ unsigned x = NEON_SCALAR_INDEX (inst.operands[1].reg);
+ unsigned abcdebits = 0;
+
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, fpu_vfp_ext_v1),
+ _(BAD_FPU));
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, fpu_neon_ext_v1)
+ && et.size != 32, _(BAD_FPU));
+ constraint (et.type == NT_invtype, _("bad type for scalar"));
+ constraint (x >= 64 / et.size, _("scalar index out of range"));
+
+ switch (et.size)
+ {
+ case 8: abcdebits = (et.type == NT_signed) ? 0x08 : 0x18; break;
+ case 16: abcdebits = (et.type == NT_signed) ? 0x01 : 0x11; break;
+ case 32: abcdebits = 0x00; break;
+ default: ;
+ }
+
+ abcdebits |= x << logsize;
+ inst.instruction = 0xe100b10;
+ do_vfp_cond_or_thumb ();
+ inst.instruction |= LOW4 (dn) << 16;
+ inst.instruction |= HI1 (dn) << 7;
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= (abcdebits & 3) << 5;
+ inst.instruction |= (abcdebits >> 2) << 21;
+ }
+ break;
+
+ case NS_RRD: /* case 7 (fmrrd). */
+ constraint (!ARM_CPU_HAS_FEATURE (cpu_variant, fpu_vfp_ext_v2),
+ _(BAD_FPU));
+
+ inst.instruction = 0xc500b10;
+ do_vfp_cond_or_thumb ();
+ inst.instruction |= inst.operands[0].reg << 12;
+ inst.instruction |= inst.operands[1].reg << 16;
+ inst.instruction |= LOW4 (inst.operands[2].reg);
+ inst.instruction |= HI1 (inst.operands[2].reg) << 5;
+ break;
+
+ case NS_FF: /* case 8 (fcpys). */
+ do_vfp_nsyn_opcode ("fcpys");
+ break;
+
+ case NS_FI: /* case 10 (fconsts). */
+ ldconst = "fconsts";
+ encode_fconstd:
+ if (is_quarter_float (inst.operands[1].imm))
+ {
+ inst.operands[1].imm = neon_qfloat_bits (inst.operands[1].imm);
+ do_vfp_nsyn_opcode (ldconst);
+ }
+ else
+ first_error (_("immediate out of range"));
+ break;
+
+ case NS_RF: /* case 12 (fmrs). */
+ do_vfp_nsyn_opcode ("fmrs");
+ break;
+
+ case NS_FR: /* case 13 (fmsr). */
+ do_vfp_nsyn_opcode ("fmsr");
+ break;
+
+ /* The encoders for the fmrrs and fmsrr instructions expect three operands
+ (one of which is a list), but we have parsed four. Do some fiddling to
+ make the operands what do_vfp_reg2_from_sp2 and do_vfp_sp2_from_reg2
+ expect. */
+ case NS_RRFF: /* case 14 (fmrrs). */
+ constraint (inst.operands[3].reg != inst.operands[2].reg + 1,
+ _("VFP registers must be adjacent"));
+ inst.operands[2].imm = 2;
+ memset (&inst.operands[3], '\0', sizeof (inst.operands[3]));
+ do_vfp_nsyn_opcode ("fmrrs");
+ break;
+
+ case NS_FFRR: /* case 15 (fmsrr). */
+ constraint (inst.operands[1].reg != inst.operands[0].reg + 1,
+ _("VFP registers must be adjacent"));
+ inst.operands[1] = inst.operands[2];
+ inst.operands[2] = inst.operands[3];
+ inst.operands[0].imm = 2;
+ memset (&inst.operands[3], '\0', sizeof (inst.operands[3]));
+ do_vfp_nsyn_opcode ("fmsrr");
+ break;
+
+ default:
+ abort ();
+ }
+}
+
+static void
+do_neon_rshift_round_imm (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DDI, NS_QQI, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs, N_EQK, N_SU_ALL | N_KEY);
+ int imm = inst.operands[2].imm;
+
+ /* imm == 0 case is encoded as VMOV for V{R}SHR. */
+ if (imm == 0)
+ {
+ inst.operands[2].present = 0;
+ do_neon_mov ();
+ return;
+ }
+
+ constraint (imm < 1 || (unsigned)imm > et.size,
+ _("immediate out of range for shift"));
+ neon_imm_shift (TRUE, et.type == NT_unsigned, neon_quad (rs), et,
+ et.size - imm);
+}
+
+static void
+do_neon_movl (void)
+{
+ struct neon_type_el et = neon_check_type (2, NS_QD,
+ N_EQK | N_DBL, N_SU_32 | N_KEY);
+ unsigned sizebits = et.size >> 3;
+ inst.instruction |= sizebits << 19;
+ neon_two_same (0, et.type == NT_unsigned, -1);
+}
+
+static void
+do_neon_trn (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_8 | N_16 | N_32 | N_KEY);
+ inst.instruction = NEON_ENC_INTEGER (inst.instruction);
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_zip_uzp (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_8 | N_16 | N_32 | N_KEY);
+ if (rs == NS_DD && et.size == 32)
+ {
+ /* Special case: encode as VTRN.32 <Dd>, <Dm>. */
+ inst.instruction = N_MNEM_vtrn;
+ do_neon_trn ();
+ return;
+ }
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_sat_abs_neg (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_S8 | N_S16 | N_S32 | N_KEY);
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_pair_long (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs, N_EQK, N_SU_32 | N_KEY);
+ /* Unsigned is encoded in OP field (bit 7) for these instruction. */
+ inst.instruction |= (et.type == NT_unsigned) << 7;
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_recip_est (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK | N_FLT, N_F32 | N_U32 | N_KEY);
+ inst.instruction |= (et.type == NT_float) << 8;
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_cls (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_S8 | N_S16 | N_S32 | N_KEY);
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_clz (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK, N_I8 | N_I16 | N_I32 | N_KEY);
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_cnt (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ struct neon_type_el et = neon_check_type (2, rs,
+ N_EQK | N_INT, N_8 | N_KEY);
+ neon_two_same (neon_quad (rs), 1, et.size);
+}
+
+static void
+do_neon_swp (void)
+{
+ enum neon_shape rs = neon_select_shape (NS_DD, NS_QQ, NS_NULL);
+ neon_two_same (neon_quad (rs), 1, -1);
+}
+
+static void
+do_neon_tbl_tbx (void)
+{
+ unsigned listlenbits;
+ neon_check_type (3, NS_DLD, N_EQK, N_EQK, N_8 | N_KEY);
+
+ if (inst.operands[1].imm < 1 || inst.operands[1].imm > 4)
+ {
+ first_error (_("bad list length for table lookup"));
+ return;
+ }
+
+ listlenbits = inst.operands[1].imm - 1;
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= LOW4 (inst.operands[1].reg) << 16;
+ inst.instruction |= HI1 (inst.operands[1].reg) << 7;
+ inst.instruction |= LOW4 (inst.operands[2].reg);
+ inst.instruction |= HI1 (inst.operands[2].reg) << 5;
+ inst.instruction |= listlenbits << 8;
+
+ inst.instruction = neon_dp_fixup (inst.instruction);
+}
+
+static void
+do_neon_ldm_stm (void)
+{
+ /* P, U and L bits are part of bitmask. */
+ int is_dbmode = (inst.instruction & (1 << 24)) != 0;
+ unsigned offsetbits = inst.operands[1].imm * 2;
+
+ if (inst.operands[1].issingle)
+ {
+ do_vfp_nsyn_ldm_stm (is_dbmode);
+ return;
+ }
+
+ constraint (is_dbmode && !inst.operands[0].writeback,
+ _("writeback (!) must be used for VLDMDB and VSTMDB"));
+
+ constraint (inst.operands[1].imm < 1 || inst.operands[1].imm > 16,
+ _("register list must contain at least 1 and at most 16 "
+ "registers"));
+
+ inst.instruction |= inst.operands[0].reg << 16;
+ inst.instruction |= inst.operands[0].writeback << 21;
+ inst.instruction |= LOW4 (inst.operands[1].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[1].reg) << 22;
+
+ inst.instruction |= offsetbits;
+
+ do_vfp_cond_or_thumb ();
+}
+
+static void
+do_neon_ldr_str (void)
+{
+ int is_ldr = (inst.instruction & (1 << 20)) != 0;
+
+ if (inst.operands[0].issingle)
+ {
+ if (is_ldr)
+ do_vfp_nsyn_opcode ("flds");
+ else
+ do_vfp_nsyn_opcode ("fsts");
+ }
+ else
+ {
+ if (is_ldr)
+ do_vfp_nsyn_opcode ("fldd");
+ else
+ do_vfp_nsyn_opcode ("fstd");
+ }
+}
+
+/* "interleave" version also handles non-interleaving register VLD1/VST1
+ instructions. */
+
+static void
+do_neon_ld_st_interleave (void)
+{
+ struct neon_type_el et = neon_check_type (1, NS_NULL,
+ N_8 | N_16 | N_32 | N_64);
+ unsigned alignbits = 0;
+ unsigned idx;
+ /* The bits in this table go:
+ 0: register stride of one (0) or two (1)
+ 1,2: register list length, minus one (1, 2, 3, 4).
+ 3,4: <n> in instruction type, minus one (VLD<n> / VST<n>).
+ We use -1 for invalid entries. */
+ const int typetable[] =
+ {
+ 0x7, -1, 0xa, -1, 0x6, -1, 0x2, -1, /* VLD1 / VST1. */
+ -1, -1, 0x8, 0x9, -1, -1, 0x3, -1, /* VLD2 / VST2. */
+ -1, -1, -1, -1, 0x4, 0x5, -1, -1, /* VLD3 / VST3. */
+ -1, -1, -1, -1, -1, -1, 0x0, 0x1 /* VLD4 / VST4. */
+ };
+ int typebits;
+
+ if (et.type == NT_invtype)
+ return;
+
+ if (inst.operands[1].immisalign)
+ switch (inst.operands[1].imm >> 8)
+ {
+ case 64: alignbits = 1; break;
+ case 128:
+ if (NEON_REGLIST_LENGTH (inst.operands[0].imm) == 3)
+ goto bad_alignment;
+ alignbits = 2;
+ break;
+ case 256:
+ if (NEON_REGLIST_LENGTH (inst.operands[0].imm) == 3)
+ goto bad_alignment;
+ alignbits = 3;
+ break;
+ default:
+ bad_alignment:
+ first_error (_("bad alignment"));
+ return;
+ }
+
+ inst.instruction |= alignbits << 4;
+ inst.instruction |= neon_logbits (et.size) << 6;
+
+ /* Bits [4:6] of the immediate in a list specifier encode register stride
+ (minus 1) in bit 4, and list length in bits [5:6]. We put the <n> of
+ VLD<n>/VST<n> in bits [9:8] of the initial bitmask. Suck it out here, look
+ up the right value for "type" in a table based on this value and the given
+ list style, then stick it back. */
+ idx = ((inst.operands[0].imm >> 4) & 7)
+ | (((inst.instruction >> 8) & 3) << 3);
+
+ typebits = typetable[idx];
+
+ constraint (typebits == -1, _("bad list type for instruction"));
+
+ inst.instruction &= ~0xf00;
+ inst.instruction |= typebits << 8;
+}
+
+/* Check alignment is valid for do_neon_ld_st_lane and do_neon_ld_dup.
+ *DO_ALIGN is set to 1 if the relevant alignment bit should be set, 0
+ otherwise. The variable arguments are a list of pairs of legal (size, align)
+ values, terminated with -1. */
+
+static int
+neon_alignment_bit (int size, int align, int *do_align, ...)
+{
+ va_list ap;
+ int result = FAIL, thissize, thisalign;
+
+ if (!inst.operands[1].immisalign)
+ {
+ *do_align = 0;
+ return SUCCESS;
+ }
+
+ va_start (ap, do_align);
+
+ do
+ {
+ thissize = va_arg (ap, int);
+ if (thissize == -1)
+ break;
+ thisalign = va_arg (ap, int);
+
+ if (size == thissize && align == thisalign)
+ result = SUCCESS;
+ }
+ while (result != SUCCESS);
+
+ va_end (ap);
+
+ if (result == SUCCESS)
+ *do_align = 1;
+ else
+ first_error (_("unsupported alignment for instruction"));
+
+ return result;
+}
+
+static void
+do_neon_ld_st_lane (void)
+{
+ struct neon_type_el et = neon_check_type (1, NS_NULL, N_8 | N_16 | N_32);
+ int align_good, do_align = 0;
+ int logsize = neon_logbits (et.size);
+ int align = inst.operands[1].imm >> 8;
+ int n = (inst.instruction >> 8) & 3;
+ int max_el = 64 / et.size;
+
+ if (et.type == NT_invtype)
+ return;
+
+ constraint (NEON_REGLIST_LENGTH (inst.operands[0].imm) != n + 1,
+ _("bad list length"));
+ constraint (NEON_LANE (inst.operands[0].imm) >= max_el,
+ _("scalar index out of range"));
+ constraint (n != 0 && NEON_REG_STRIDE (inst.operands[0].imm) == 2
+ && et.size == 8,
+ _("stride of 2 unavailable when element size is 8"));
+
+ switch (n)
+ {
+ case 0: /* VLD1 / VST1. */
+ align_good = neon_alignment_bit (et.size, align, &do_align, 16, 16,
+ 32, 32, -1);
+ if (align_good == FAIL)
+ return;
+ if (do_align)
+ {
+ unsigned alignbits = 0;
+ switch (et.size)
+ {
+ case 16: alignbits = 0x1; break;
+ case 32: alignbits = 0x3; break;
+ default: ;
+ }
+ inst.instruction |= alignbits << 4;
+ }
+ break;
+
+ case 1: /* VLD2 / VST2. */
+ align_good = neon_alignment_bit (et.size, align, &do_align, 8, 16, 16, 32,
+ 32, 64, -1);
+ if (align_good == FAIL)
+ return;
+ if (do_align)
+ inst.instruction |= 1 << 4;
+ break;
+
+ case 2: /* VLD3 / VST3. */
+ constraint (inst.operands[1].immisalign,
+ _("can't use alignment with this instruction"));
+ break;
+
+ case 3: /* VLD4 / VST4. */
+ align_good = neon_alignment_bit (et.size, align, &do_align, 8, 32,
+ 16, 64, 32, 64, 32, 128, -1);
+ if (align_good == FAIL)
+ return;
+ if (do_align)
+ {
+ unsigned alignbits = 0;
+ switch (et.size)
+ {
+ case 8: alignbits = 0x1; break;
+ case 16: alignbits = 0x1; break;
+ case 32: alignbits = (align == 64) ? 0x1 : 0x2; break;
+ default: ;
+ }
+ inst.instruction |= alignbits << 4;
+ }
+ break;
+
+ default: ;
+ }
+
+ /* Reg stride of 2 is encoded in bit 5 when size==16, bit 6 when size==32. */
+ if (n != 0 && NEON_REG_STRIDE (inst.operands[0].imm) == 2)
+ inst.instruction |= 1 << (4 + logsize);
+
+ inst.instruction |= NEON_LANE (inst.operands[0].imm) << (logsize + 5);
+ inst.instruction |= logsize << 10;
+}
+
+/* Encode single n-element structure to all lanes VLD<n> instructions. */
+
+static void
+do_neon_ld_dup (void)
+{
+ struct neon_type_el et = neon_check_type (1, NS_NULL, N_8 | N_16 | N_32);
+ int align_good, do_align = 0;
+
+ if (et.type == NT_invtype)
+ return;
+
+ switch ((inst.instruction >> 8) & 3)
+ {
+ case 0: /* VLD1. */
+ assert (NEON_REG_STRIDE (inst.operands[0].imm) != 2);
+ align_good = neon_alignment_bit (et.size, inst.operands[1].imm >> 8,
+ &do_align, 16, 16, 32, 32, -1);
+ if (align_good == FAIL)
+ return;
+ switch (NEON_REGLIST_LENGTH (inst.operands[0].imm))
+ {
+ case 1: break;
+ case 2: inst.instruction |= 1 << 5; break;
+ default: first_error (_("bad list length")); return;
+ }
+ inst.instruction |= neon_logbits (et.size) << 6;
+ break;
+
+ case 1: /* VLD2. */
+ align_good = neon_alignment_bit (et.size, inst.operands[1].imm >> 8,
+ &do_align, 8, 16, 16, 32, 32, 64, -1);
+ if (align_good == FAIL)
+ return;
+ constraint (NEON_REGLIST_LENGTH (inst.operands[0].imm) != 2,
+ _("bad list length"));
+ if (NEON_REG_STRIDE (inst.operands[0].imm) == 2)
+ inst.instruction |= 1 << 5;
+ inst.instruction |= neon_logbits (et.size) << 6;
+ break;
+
+ case 2: /* VLD3. */
+ constraint (inst.operands[1].immisalign,
+ _("can't use alignment with this instruction"));
+ constraint (NEON_REGLIST_LENGTH (inst.operands[0].imm) != 3,
+ _("bad list length"));
+ if (NEON_REG_STRIDE (inst.operands[0].imm) == 2)
+ inst.instruction |= 1 << 5;
+ inst.instruction |= neon_logbits (et.size) << 6;
+ break;
+
+ case 3: /* VLD4. */
+ {
+ int align = inst.operands[1].imm >> 8;
+ align_good = neon_alignment_bit (et.size, align, &do_align, 8, 32,
+ 16, 64, 32, 64, 32, 128, -1);
+ if (align_good == FAIL)
+ return;
+ constraint (NEON_REGLIST_LENGTH (inst.operands[0].imm) != 4,
+ _("bad list length"));
+ if (NEON_REG_STRIDE (inst.operands[0].imm) == 2)
+ inst.instruction |= 1 << 5;
+ if (et.size == 32 && align == 128)
+ inst.instruction |= 0x3 << 6;
+ else
+ inst.instruction |= neon_logbits (et.size) << 6;
+ }
+ break;
+
+ default: ;
+ }
+
+ inst.instruction |= do_align << 4;
+}
+
+/* Disambiguate VLD<n> and VST<n> instructions, and fill in common bits (those
+ apart from bits [11:4]. */
+
+static void
+do_neon_ldx_stx (void)
+{
+ switch (NEON_LANE (inst.operands[0].imm))
+ {
+ case NEON_INTERLEAVE_LANES:
+ inst.instruction = NEON_ENC_INTERLV (inst.instruction);
+ do_neon_ld_st_interleave ();
+ break;
+
+ case NEON_ALL_LANES:
+ inst.instruction = NEON_ENC_DUP (inst.instruction);
+ do_neon_ld_dup ();
+ break;
+
+ default:
+ inst.instruction = NEON_ENC_LANE (inst.instruction);
+ do_neon_ld_st_lane ();
+ }
+
+ /* L bit comes from bit mask. */
+ inst.instruction |= LOW4 (inst.operands[0].reg) << 12;
+ inst.instruction |= HI1 (inst.operands[0].reg) << 22;
+ inst.instruction |= inst.operands[1].reg << 16;
+
+ if (inst.operands[1].postind)
+ {
+ int postreg = inst.operands[1].imm & 0xf;
+ constraint (!inst.operands[1].immisreg,
+ _("post-index must be a register"));
+ constraint (postreg == 0xd || postreg == 0xf,
+ _("bad register for post-index"));
+ inst.instruction |= postreg;
+ }
+ else if (inst.operands[1].writeback)
+ {
+ inst.instruction |= 0xd;
+ }
+ else
+ inst.instruction |= 0xf;
+
+ if (thumb_mode)
+ inst.instruction |= 0xf9000000;
+ else
+ inst.instruction |= 0xf4000000;
+}
+
/* Overall per-instruction processing. */
@@ -8045,11 +13785,9 @@ output_relax_insn (void)
symbolS *sym;
int offset;
-#ifdef OBJ_ELF
/* The size of the instruction is unknown, so tie the debug info to the
start of the instruction. */
dwarf2_emit_insn (0);
-#endif
switch (inst.reloc.exp.X_op)
{
@@ -8117,9 +13855,7 @@ output_inst (const char * str)
inst.size, & inst.reloc.exp, inst.reloc.pc_rel,
inst.reloc.type);
-#ifdef OBJ_ELF
dwarf2_emit_insn (inst.size);
-#endif
}
/* Tag values used in struct asm_opcode's tag field. */
@@ -8130,9 +13866,14 @@ enum opcode_tag
OT_unconditionalF, /* Instruction cannot be conditionalized
and carries 0xF in its ARM condition field. */
OT_csuffix, /* Instruction takes a conditional suffix. */
+ OT_csuffixF, /* Some forms of the instruction take a conditional
+ suffix, others place 0xF where the condition field
+ would be. */
OT_cinfix3, /* Instruction takes a conditional infix,
beginning at character index 3. (In
unified mode, it becomes a suffix.) */
+ OT_cinfix3_deprecated, /* The same as OT_cinfix3. This is used for
+ tsts, cmps, cmns, and teqs. */
OT_cinfix3_legacy, /* Legacy instruction takes a conditional infix at
character index 3, even in unified mode. Used for
legacy instructions where suffix and infix forms
@@ -8211,27 +13952,46 @@ opcode_lookup (char **str)
const struct asm_opcode *opcode;
const struct asm_cond *cond;
char save[2];
+ bfd_boolean neon_supported;
+
+ neon_supported = ARM_CPU_HAS_FEATURE (cpu_variant, fpu_neon_ext_v1);
/* Scan up to the end of the mnemonic, which must end in white space,
- '.' (in unified mode only), or end of string. */
+ '.' (in unified mode, or for Neon instructions), or end of string. */
for (base = end = *str; *end != '\0'; end++)
- if (*end == ' ' || (unified_syntax && *end == '.'))
+ if (*end == ' ' || ((unified_syntax || neon_supported) && *end == '.'))
break;
if (end == base)
return 0;
- /* Handle a possible width suffix. */
+ /* Handle a possible width suffix and/or Neon type suffix. */
if (end[0] == '.')
{
- if (end[1] == 'w' && (end[2] == ' ' || end[2] == '\0'))
+ int offset = 2;
+
+ /* The .w and .n suffixes are only valid if the unified syntax is in
+ use. */
+ if (unified_syntax && end[1] == 'w')
inst.size_req = 4;
- else if (end[1] == 'n' && (end[2] == ' ' || end[2] == '\0'))
+ else if (unified_syntax && end[1] == 'n')
inst.size_req = 2;
else
- return 0;
+ offset = 0;
+
+ inst.vectype.elems = 0;
- *str = end + 2;
+ *str = end + offset;
+
+ if (end[offset] == '.')
+ {
+ /* See if we have a Neon type suffix (possible in either unified or
+ non-unified ARM syntax mode). */
+ if (parse_neon_type (&inst.vectype, str) == FAIL)
+ return 0;
+ }
+ else if (end[offset] != '\0' && end[offset] != ' ')
+ return 0;
}
else
*str = end;
@@ -8276,12 +14036,14 @@ opcode_lookup (char **str)
break;
case OT_cinfix3:
+ case OT_cinfix3_deprecated:
case OT_odd_infix_unc:
if (!unified_syntax)
return 0;
/* else fall through */
case OT_csuffix:
+ case OT_csuffixF:
case OT_csuf_or_in3:
inst.cond = cond->value;
return opcode;
@@ -8322,11 +14084,16 @@ opcode_lookup (char **str)
memmove (affix + 2, affix, (end - affix) - 2);
memcpy (affix, save, 2);
- if (opcode && (opcode->tag == OT_cinfix3 || opcode->tag == OT_csuf_or_in3
- || opcode->tag == OT_cinfix3_legacy))
+ if (opcode
+ && (opcode->tag == OT_cinfix3
+ || opcode->tag == OT_cinfix3_deprecated
+ || opcode->tag == OT_csuf_or_in3
+ || opcode->tag == OT_cinfix3_legacy))
{
/* step CM */
- if (unified_syntax && opcode->tag == OT_cinfix3)
+ if (unified_syntax
+ && (opcode->tag == OT_cinfix3
+ || opcode->tag == OT_cinfix3_deprecated))
as_warn (_("conditional infixes are deprecated in unified syntax"));
inst.cond = cond->value;
@@ -8357,13 +14124,21 @@ md_assemble (char *str)
if (!opcode)
{
/* It wasn't an instruction, but it might be a register alias of
- the form alias .req reg. */
- if (!create_register_alias (str, p))
+ the form alias .req reg, or a Neon .dn/.qn directive. */
+ if (!create_register_alias (str, p)
+ && !create_neon_reg_alias (str, p))
as_bad (_("bad instruction `%s'"), str);
return;
}
+ if (opcode->tag == OT_cinfix3_deprecated)
+ as_warn (_("s suffix on comparison instruction is deprecated"));
+
+ /* The value which unconditional instructions should have in place of the
+ condition field. */
+ inst.uncond_value = (opcode->tag == OT_csuffixF) ? 0xf : -1;
+
if (thumb_mode)
{
arm_feature_set variant;
@@ -8387,6 +14162,14 @@ md_assemble (char *str)
return;
}
+ if (!ARM_CPU_HAS_FEATURE (variant, arm_ext_v6t2) && !inst.size_req)
+ {
+ /* Implicit require narrow instructions on Thumb-1. This avoids
+ relaxation accidentally introducing Thumb-2 instructions. */
+ if (opcode->tencode != do_t_blx && opcode->tencode != do_t_branch23)
+ inst.size_req = 2;
+ }
+
/* Check conditional suffixes. */
if (current_it_mask)
{
@@ -8428,10 +14211,15 @@ md_assemble (char *str)
return;
}
}
+
+ /* Something has gone badly wrong if we try to relax a fixed size
+ instruction. */
+ assert (inst.size_req == 0 || !inst.relax);
+
ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
*opcode->tvariant);
/* Many Thumb-2 instructions also have Thumb-1 variants, so explicitly
- set those bits when Thumb-2 32-bit instuctions are seen. ie.
+ set those bits when Thumb-2 32-bit instructions are seen. ie.
anything other than bl/blx.
This is overly pessimistic for relaxable instructions. */
if ((inst.size == 4 && (inst.instruction & 0xf800e800) != 0xf000e800)
@@ -8439,7 +14227,7 @@ md_assemble (char *str)
ARM_MERGE_FEATURE_SETS (thumb_arch_used, thumb_arch_used,
arm_ext_v6t2);
}
- else
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v1))
{
/* Check that this instruction is supported for this CPU. */
if (!opcode->avariant ||
@@ -8472,6 +14260,12 @@ md_assemble (char *str)
ARM_MERGE_FEATURE_SETS (arm_arch_used, arm_arch_used,
*opcode->avariant);
}
+ else
+ {
+ as_bad (_("attempt to use an ARM instruction on a Thumb-only processor "
+ "-- `%s'"), str);
+ return;
+ }
output_inst (str);
}
@@ -8537,9 +14331,7 @@ arm_frob_label (symbolS * sym)
label_is_thumb_function_name = FALSE;
}
-#ifdef OBJ_ELF
dwarf2_emit_label (sym);
-#endif
}
int
@@ -8573,13 +14365,24 @@ arm_canonicalize_symbol_name (char * name)
should appear in both upper and lowercase variants. Some registers
also have mixed-case names. */
-#define REGDEF(s,n,t) { #s, n, REG_TYPE_##t, TRUE }
+#define REGDEF(s,n,t) { #s, n, REG_TYPE_##t, TRUE, 0 }
#define REGNUM(p,n,t) REGDEF(p##n, n, t)
+#define REGNUM2(p,n,t) REGDEF(p##n, 2 * n, t)
#define REGSET(p,t) \
REGNUM(p, 0,t), REGNUM(p, 1,t), REGNUM(p, 2,t), REGNUM(p, 3,t), \
REGNUM(p, 4,t), REGNUM(p, 5,t), REGNUM(p, 6,t), REGNUM(p, 7,t), \
REGNUM(p, 8,t), REGNUM(p, 9,t), REGNUM(p,10,t), REGNUM(p,11,t), \
REGNUM(p,12,t), REGNUM(p,13,t), REGNUM(p,14,t), REGNUM(p,15,t)
+#define REGSETH(p,t) \
+ REGNUM(p,16,t), REGNUM(p,17,t), REGNUM(p,18,t), REGNUM(p,19,t), \
+ REGNUM(p,20,t), REGNUM(p,21,t), REGNUM(p,22,t), REGNUM(p,23,t), \
+ REGNUM(p,24,t), REGNUM(p,25,t), REGNUM(p,26,t), REGNUM(p,27,t), \
+ REGNUM(p,28,t), REGNUM(p,29,t), REGNUM(p,30,t), REGNUM(p,31,t)
+#define REGSET2(p,t) \
+ REGNUM2(p, 0,t), REGNUM2(p, 1,t), REGNUM2(p, 2,t), REGNUM2(p, 3,t), \
+ REGNUM2(p, 4,t), REGNUM2(p, 5,t), REGNUM2(p, 6,t), REGNUM2(p, 7,t), \
+ REGNUM2(p, 8,t), REGNUM2(p, 9,t), REGNUM2(p,10,t), REGNUM2(p,11,t), \
+ REGNUM2(p,12,t), REGNUM2(p,13,t), REGNUM2(p,14,t), REGNUM2(p,15,t)
static const struct reg_entry reg_names[] =
{
@@ -8618,24 +14421,24 @@ static const struct reg_entry reg_names[] =
REGNUM(F,4,FN), REGNUM(F,5,FN), REGNUM(F,6,FN), REGNUM(F,7, FN),
/* VFP SP registers. */
- REGSET(s,VFS),
- REGNUM(s,16,VFS), REGNUM(s,17,VFS), REGNUM(s,18,VFS), REGNUM(s,19,VFS),
- REGNUM(s,20,VFS), REGNUM(s,21,VFS), REGNUM(s,22,VFS), REGNUM(s,23,VFS),
- REGNUM(s,24,VFS), REGNUM(s,25,VFS), REGNUM(s,26,VFS), REGNUM(s,27,VFS),
- REGNUM(s,28,VFS), REGNUM(s,29,VFS), REGNUM(s,30,VFS), REGNUM(s,31,VFS),
-
- REGSET(S,VFS),
- REGNUM(S,16,VFS), REGNUM(S,17,VFS), REGNUM(S,18,VFS), REGNUM(S,19,VFS),
- REGNUM(S,20,VFS), REGNUM(S,21,VFS), REGNUM(S,22,VFS), REGNUM(S,23,VFS),
- REGNUM(S,24,VFS), REGNUM(S,25,VFS), REGNUM(S,26,VFS), REGNUM(S,27,VFS),
- REGNUM(S,28,VFS), REGNUM(S,29,VFS), REGNUM(S,30,VFS), REGNUM(S,31,VFS),
+ REGSET(s,VFS), REGSET(S,VFS),
+ REGSETH(s,VFS), REGSETH(S,VFS),
/* VFP DP Registers. */
- REGSET(d,VFD), REGSET(D,VFS),
+ REGSET(d,VFD), REGSET(D,VFD),
+ /* Extra Neon DP registers. */
+ REGSETH(d,VFD), REGSETH(D,VFD),
+
+ /* Neon QP registers. */
+ REGSET2(q,NQ), REGSET2(Q,NQ),
/* VFP control registers. */
REGDEF(fpsid,0,VFC), REGDEF(fpscr,1,VFC), REGDEF(fpexc,8,VFC),
REGDEF(FPSID,0,VFC), REGDEF(FPSCR,1,VFC), REGDEF(FPEXC,8,VFC),
+ REGDEF(fpinst,9,VFC), REGDEF(fpinst2,10,VFC),
+ REGDEF(FPINST,9,VFC), REGDEF(FPINST2,10,VFC),
+ REGDEF(mvfr0,7,VFC), REGDEF(mvfr1,6,VFC),
+ REGDEF(MVFR0,7,VFC), REGDEF(MVFR1,6,VFC),
/* Maverick DSP coprocessor registers. */
REGSET(mvf,MVF), REGSET(mvd,MVD), REGSET(mvfx,MVFX), REGSET(mvdx,MVDX),
@@ -8752,20 +14555,21 @@ static const struct asm_psr psrs[] =
/* Table of V7M psr names. */
static const struct asm_psr v7m_psrs[] =
{
- {"apsr", 0 },
- {"iapsr", 1 },
- {"eapsr", 2 },
- {"psr", 3 },
- {"ipsr", 5 },
- {"epsr", 6 },
- {"iepsr", 7 },
- {"msp", 8 },
- {"psp", 9 },
- {"primask", 16},
- {"basepri", 17},
- {"basepri_max", 18},
- {"faultmask", 19},
- {"control", 20}
+ {"apsr", 0 }, {"APSR", 0 },
+ {"iapsr", 1 }, {"IAPSR", 1 },
+ {"eapsr", 2 }, {"EAPSR", 2 },
+ {"psr", 3 }, {"PSR", 3 },
+ {"xpsr", 3 }, {"XPSR", 3 }, {"xPSR", 3 },
+ {"ipsr", 5 }, {"IPSR", 5 },
+ {"epsr", 6 }, {"EPSR", 6 },
+ {"iepsr", 7 }, {"IEPSR", 7 },
+ {"msp", 8 }, {"MSP", 8 },
+ {"psp", 9 }, {"PSP", 9 },
+ {"primask", 16}, {"PRIMASK", 16},
+ {"basepri", 17}, {"BASEPRI", 17},
+ {"basepri_max", 18}, {"BASEPRI_MAX", 18},
+ {"faultmask", 19}, {"FAULTMASK", 19},
+ {"control", 20}, {"CONTROL", 20}
};
/* Table of all shift-in-operand names. */
@@ -8858,10 +14662,17 @@ static struct asm_barrier_opt barrier_opt_names[] =
#define TxC3(mnem, op, top, nops, ops, ae, te) \
{ #mnem, OPS##nops ops, OT_cinfix3, 0x##op, top, ARM_VARIANT, \
THUMB_VARIANT, do_##ae, do_##te }
+#define TxC3w(mnem, op, top, nops, ops, ae, te) \
+ { #mnem, OPS##nops ops, OT_cinfix3_deprecated, 0x##op, top, ARM_VARIANT, \
+ THUMB_VARIANT, do_##ae, do_##te }
#define TC3(mnem, aop, top, nops, ops, ae, te) \
TxC3(mnem, aop, 0x##top, nops, ops, ae, te)
+#define TC3w(mnem, aop, top, nops, ops, ae, te) \
+ TxC3w(mnem, aop, 0x##top, nops, ops, ae, te)
#define tC3(mnem, aop, top, nops, ops, ae, te) \
TxC3(mnem, aop, T_MNEM_##top, nops, ops, ae, te)
+#define tC3w(mnem, aop, top, nops, ops, ae, te) \
+ TxC3w(mnem, aop, T_MNEM_##top, nops, ops, ae, te)
/* Mnemonic with a conditional infix in an unusual place. Each and every variant has to
appear in the condition table. */
@@ -8970,6 +14781,42 @@ static struct asm_barrier_opt barrier_opt_names[] =
#define UF(mnem, op, nops, ops, ae) \
{ #mnem, OPS##nops ops, OT_unconditionalF, 0x##op, 0, ARM_VARIANT, 0, do_##ae, NULL }
+/* Neon data-processing. ARM versions are unconditional with cond=0xf.
+ The Thumb and ARM variants are mostly the same (bits 0-23 and 24/28), so we
+ use the same encoding function for each. */
+#define NUF(mnem, op, nops, ops, enc) \
+ { #mnem, OPS##nops ops, OT_unconditionalF, 0x##op, 0x##op, \
+ ARM_VARIANT, THUMB_VARIANT, do_##enc, do_##enc }
+
+/* Neon data processing, version which indirects through neon_enc_tab for
+ the various overloaded versions of opcodes. */
+#define nUF(mnem, op, nops, ops, enc) \
+ { #mnem, OPS##nops ops, OT_unconditionalF, N_MNEM_##op, N_MNEM_##op, \
+ ARM_VARIANT, THUMB_VARIANT, do_##enc, do_##enc }
+
+/* Neon insn with conditional suffix for the ARM version, non-overloaded
+ version. */
+#define NCE_tag(mnem, op, nops, ops, enc, tag) \
+ { #mnem, OPS##nops ops, tag, 0x##op, 0x##op, ARM_VARIANT, \
+ THUMB_VARIANT, do_##enc, do_##enc }
+
+#define NCE(mnem, op, nops, ops, enc) \
+ NCE_tag(mnem, op, nops, ops, enc, OT_csuffix)
+
+#define NCEF(mnem, op, nops, ops, enc) \
+ NCE_tag(mnem, op, nops, ops, enc, OT_csuffixF)
+
+/* Neon insn with conditional suffix for the ARM version, overloaded types. */
+#define nCE_tag(mnem, op, nops, ops, enc, tag) \
+ { #mnem, OPS##nops ops, tag, N_MNEM_##op, N_MNEM_##op, \
+ ARM_VARIANT, THUMB_VARIANT, do_##enc, do_##enc }
+
+#define nCE(mnem, op, nops, ops, enc) \
+ nCE_tag(mnem, op, nops, ops, enc, OT_csuffix)
+
+#define nCEF(mnem, op, nops, ops, enc) \
+ nCE_tag(mnem, op, nops, ops, enc, OT_csuffixF)
+
#define do_0 0
/* Thumb-only, unconditional. */
@@ -8985,8 +14832,8 @@ static const struct asm_opcode insns[] =
tC3(eors, 0300000, eors, 3, (RR, oRR, SH), arit, t_arit3c),
tCE(sub, 0400000, sub, 3, (RR, oRR, SH), arit, t_add_sub),
tC3(subs, 0500000, subs, 3, (RR, oRR, SH), arit, t_add_sub),
- tCE(add, 0800000, add, 3, (RR, oRR, SH), arit, t_add_sub),
- tC3(adds, 0900000, adds, 3, (RR, oRR, SH), arit, t_add_sub),
+ tCE(add, 0800000, add, 3, (RR, oRR, SHG), arit, t_add_sub),
+ tC3(adds, 0900000, adds, 3, (RR, oRR, SHG), arit, t_add_sub),
tCE(adc, 0a00000, adc, 3, (RR, oRR, SH), arit, t_arit3c),
tC3(adcs, 0b00000, adcs, 3, (RR, oRR, SH), arit, t_arit3c),
tCE(sbc, 0c00000, sbc, 3, (RR, oRR, SH), arit, t_arit3),
@@ -9000,13 +14847,13 @@ static const struct asm_opcode insns[] =
for setting PSR flag bits. They are obsolete in V6 and do not
have Thumb equivalents. */
tCE(tst, 1100000, tst, 2, (RR, SH), cmp, t_mvn_tst),
- tC3(tsts, 1100000, tst, 2, (RR, SH), cmp, t_mvn_tst),
+ tC3w(tsts, 1100000, tst, 2, (RR, SH), cmp, t_mvn_tst),
CL(tstp, 110f000, 2, (RR, SH), cmp),
tCE(cmp, 1500000, cmp, 2, (RR, SH), cmp, t_mov_cmp),
- tC3(cmps, 1500000, cmp, 2, (RR, SH), cmp, t_mov_cmp),
+ tC3w(cmps, 1500000, cmp, 2, (RR, SH), cmp, t_mov_cmp),
CL(cmpp, 150f000, 2, (RR, SH), cmp),
tCE(cmn, 1700000, cmn, 2, (RR, SH), cmp, t_mvn_tst),
- tC3(cmns, 1700000, cmn, 2, (RR, SH), cmp, t_mvn_tst),
+ tC3w(cmns, 1700000, cmn, 2, (RR, SH), cmp, t_mvn_tst),
CL(cmnp, 170f000, 2, (RR, SH), cmp),
tCE(mov, 1a00000, mov, 2, (RR, SH), mov, t_mov_cmp),
@@ -9014,10 +14861,10 @@ static const struct asm_opcode insns[] =
tCE(mvn, 1e00000, mvn, 2, (RR, SH), mov, t_mvn_tst),
tC3(mvns, 1f00000, mvns, 2, (RR, SH), mov, t_mvn_tst),
- tCE(ldr, 4100000, ldr, 2, (RR, ADDR), ldst, t_ldst),
- tC3(ldrb, 4500000, ldrb, 2, (RR, ADDR), ldst, t_ldst),
- tCE(str, 4000000, str, 2, (RR, ADDR), ldst, t_ldst),
- tC3(strb, 4400000, strb, 2, (RR, ADDR), ldst, t_ldst),
+ tCE(ldr, 4100000, ldr, 2, (RR, ADDRGLDR),ldst, t_ldst),
+ tC3(ldrb, 4500000, ldrb, 2, (RR, ADDRGLDR),ldst, t_ldst),
+ tCE(str, 4000000, str, 2, (RR, ADDRGLDR),ldst, t_ldst),
+ tC3(strb, 4400000, strb, 2, (RR, ADDRGLDR),ldst, t_ldst),
tCE(stm, 8800000, stmia, 2, (RRw, REGLST), ldmstm, t_ldmstm),
tC3(stmia, 8800000, stmia, 2, (RRw, REGLST), ldmstm, t_ldmstm),
@@ -9050,6 +14897,10 @@ static const struct asm_opcode insns[] =
tCE(push, 92d0000, push, 1, (REGLST), push_pop, t_push_pop),
tCE(pop, 8bd0000, pop, 1, (REGLST), push_pop, t_push_pop),
+ /* These may simplify to neg. */
+ TCE(rsb, 0600000, ebc00000, 3, (RR, oRR, SH), arit, t_rsb),
+ TC3(rsbs, 0700000, ebd00000, 3, (RR, oRR, SH), arit, t_rsb),
+
#undef THUMB_VARIANT
#define THUMB_VARIANT &arm_ext_v6
TCE(cpy, 1a00000, 4600, 2, (RR, RR), rd_rm, t_cpy),
@@ -9057,10 +14908,8 @@ static const struct asm_opcode insns[] =
/* V1 instructions with no Thumb analogue prior to V6T2. */
#undef THUMB_VARIANT
#define THUMB_VARIANT &arm_ext_v6t2
- TCE(rsb, 0600000, ebc00000, 3, (RR, oRR, SH), arit, t_rsb),
- TC3(rsbs, 0700000, ebd00000, 3, (RR, oRR, SH), arit, t_rsb),
TCE(teq, 1300000, ea900f00, 2, (RR, SH), cmp, t_mvn_tst),
- TC3(teqs, 1300000, ea900f00, 2, (RR, SH), cmp, t_mvn_tst),
+ TC3w(teqs, 1300000, ea900f00, 2, (RR, SH), cmp, t_mvn_tst),
CL(teqp, 130f000, 2, (RR, SH), cmp),
TC3(ldrt, 4300000, f8500e00, 2, (RR, ADDR), ldstt, t_ldstt),
@@ -9101,10 +14950,10 @@ static const struct asm_opcode insns[] =
/* Generic coprocessor instructions. */
TCE(cdp, e000000, ee000000, 6, (RCP, I15b, RCN, RCN, RCN, oI7b), cdp, cdp),
- TCE(ldc, c100000, ec100000, 3, (RCP, RCN, ADDR), lstc, lstc),
- TC3(ldcl, c500000, ec500000, 3, (RCP, RCN, ADDR), lstc, lstc),
- TCE(stc, c000000, ec000000, 3, (RCP, RCN, ADDR), lstc, lstc),
- TC3(stcl, c400000, ec400000, 3, (RCP, RCN, ADDR), lstc, lstc),
+ TCE(ldc, c100000, ec100000, 3, (RCP, RCN, ADDRGLDC), lstc, lstc),
+ TC3(ldcl, c500000, ec500000, 3, (RCP, RCN, ADDRGLDC), lstc, lstc),
+ TCE(stc, c000000, ec000000, 3, (RCP, RCN, ADDRGLDC), lstc, lstc),
+ TC3(stcl, c400000, ec400000, 3, (RCP, RCN, ADDRGLDC), lstc, lstc),
TCE(mcr, e000010, ee000010, 6, (RCP, I7b, RR, RCN, RCN, oI7b), co_reg, co_reg),
TCE(mrc, e100010, ee100010, 6, (RCP, I7b, RR, RCN, RCN, oI7b), co_reg, co_reg),
@@ -9115,8 +14964,8 @@ static const struct asm_opcode insns[] =
#undef ARM_VARIANT
#define ARM_VARIANT &arm_ext_v3 /* ARM 6 Status register instructions. */
- TCE(mrs, 10f0000, f3ef8000, 2, (RR, PSR), mrs, t_mrs),
- TCE(msr, 120f000, f3808000, 2, (PSR, RR_EXi), msr, t_msr),
+ TCE(mrs, 10f0000, f3ef8000, 2, (APSR_RR, RVC_PSR), mrs, t_mrs),
+ TCE(msr, 120f000, f3808000, 2, (RVC_PSR, RR_EXi), msr, t_msr),
#undef ARM_VARIANT
#define ARM_VARIANT &arm_ext_v3m /* ARM 7M long multiplies. */
@@ -9133,12 +14982,12 @@ static const struct asm_opcode insns[] =
#define ARM_VARIANT &arm_ext_v4 /* ARM Architecture 4. */
#undef THUMB_VARIANT
#define THUMB_VARIANT &arm_ext_v4t
- tC3(ldrh, 01000b0, ldrh, 2, (RR, ADDR), ldstv4, t_ldst),
- tC3(strh, 00000b0, strh, 2, (RR, ADDR), ldstv4, t_ldst),
- tC3(ldrsh, 01000f0, ldrsh, 2, (RR, ADDR), ldstv4, t_ldst),
- tC3(ldrsb, 01000d0, ldrsb, 2, (RR, ADDR), ldstv4, t_ldst),
- tCM(ld,sh, 01000f0, ldrsh, 2, (RR, ADDR), ldstv4, t_ldst),
- tCM(ld,sb, 01000d0, ldrsb, 2, (RR, ADDR), ldstv4, t_ldst),
+ tC3(ldrh, 01000b0, ldrh, 2, (RR, ADDRGLDRS), ldstv4, t_ldst),
+ tC3(strh, 00000b0, strh, 2, (RR, ADDRGLDRS), ldstv4, t_ldst),
+ tC3(ldrsh, 01000f0, ldrsh, 2, (RR, ADDRGLDRS), ldstv4, t_ldst),
+ tC3(ldrsb, 01000d0, ldrsb, 2, (RR, ADDRGLDRS), ldstv4, t_ldst),
+ tCM(ld,sh, 01000f0, ldrsh, 2, (RR, ADDRGLDRS), ldstv4, t_ldst),
+ tCM(ld,sb, 01000d0, ldrsb, 2, (RR, ADDRGLDRS), ldstv4, t_ldst),
#undef ARM_VARIANT
#define ARM_VARIANT &arm_ext_v4t_5
@@ -9159,10 +15008,10 @@ static const struct asm_opcode insns[] =
#undef THUMB_VARIANT
#define THUMB_VARIANT &arm_ext_v6t2
TCE(clz, 16f0f10, fab0f080, 2, (RRnpc, RRnpc), rd_rm, t_clz),
- TUF(ldc2, c100000, fc100000, 3, (RCP, RCN, ADDR), lstc, lstc),
- TUF(ldc2l, c500000, fc500000, 3, (RCP, RCN, ADDR), lstc, lstc),
- TUF(stc2, c000000, fc000000, 3, (RCP, RCN, ADDR), lstc, lstc),
- TUF(stc2l, c400000, fc400000, 3, (RCP, RCN, ADDR), lstc, lstc),
+ TUF(ldc2, c100000, fc100000, 3, (RCP, RCN, ADDRGLDC), lstc, lstc),
+ TUF(ldc2l, c500000, fc500000, 3, (RCP, RCN, ADDRGLDC), lstc, lstc),
+ TUF(stc2, c000000, fc000000, 3, (RCP, RCN, ADDRGLDC), lstc, lstc),
+ TUF(stc2l, c400000, fc400000, 3, (RCP, RCN, ADDRGLDC), lstc, lstc),
TUF(cdp2, e000000, fe000000, 6, (RCP, I15b, RCN, RCN, RCN, oI7b), cdp, cdp),
TUF(mcr2, e000010, fe000010, 6, (RCP, I7b, RR, RCN, RCN, oI7b), co_reg, co_reg),
TUF(mrc2, e100010, fe100010, 6, (RCP, I7b, RR, RCN, RCN, oI7b), co_reg, co_reg),
@@ -9198,8 +15047,8 @@ static const struct asm_opcode insns[] =
#undef ARM_VARIANT
#define ARM_VARIANT &arm_ext_v5e /* ARM Architecture 5TE. */
TUF(pld, 450f000, f810f000, 1, (ADDR), pld, t_pld),
- TC3(ldrd, 00000d0, e9500000, 3, (RRnpc, oRRnpc, ADDR), ldrd, t_ldstd),
- TC3(strd, 00000f0, e9400000, 3, (RRnpc, oRRnpc, ADDR), ldrd, t_ldstd),
+ TC3(ldrd, 00000d0, e8500000, 3, (RRnpc, oRRnpc, ADDRGLDRS), ldrd, t_ldstd),
+ TC3(strd, 00000f0, e8400000, 3, (RRnpc, oRRnpc, ADDRGLDRS), ldrd, t_ldstd),
TCE(mcrr, c400000, ec400000, 5, (RCP, I15b, RRnpc, RRnpc, RCN), co_reg2c, co_reg2c),
TCE(mrrc, c500000, ec500000, 5, (RCP, I15b, RRnpc, RRnpc, RCN), co_reg2c, co_reg2c),
@@ -9226,6 +15075,7 @@ static const struct asm_opcode insns[] =
#undef THUMB_VARIANT
#define THUMB_VARIANT &arm_ext_v6t2
TCE(ldrex, 1900f9f, e8500f00, 2, (RRnpc, ADDR), ldrex, t_ldrex),
+ TCE(strex, 1800f90, e8400000, 3, (RRnpc, RRnpc, ADDR), strex, t_strex),
TUF(mcrr2, c400000, fc400000, 5, (RCP, I15b, RRnpc, RRnpc, RCN), co_reg2c, co_reg2c),
TUF(mrrc2, c500000, fc500000, 5, (RCP, I15b, RRnpc, RRnpc, RCN), co_reg2c, co_reg2c),
@@ -9309,12 +15159,11 @@ static const struct asm_opcode insns[] =
TCE(smuadx, 700f030, fb20f010, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
TCE(smusd, 700f050, fb40f000, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
TCE(smusdx, 700f070, fb40f010, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
- TUF(srsia, 8cd0500, e980c000, 1, (I31w), srs, srs),
- UF(srsib, 9cd0500, 1, (I31w), srs),
- UF(srsda, 84d0500, 1, (I31w), srs),
- TUF(srsdb, 94d0500, e800c000, 1, (I31w), srs, srs),
+ TUF(srsia, 8c00500, e980c000, 2, (oRRw, I31w), srs, srs),
+ UF(srsib, 9c00500, 2, (oRRw, I31w), srs),
+ UF(srsda, 8400500, 2, (oRRw, I31w), srs),
+ TUF(srsdb, 9400500, e800c000, 2, (oRRw, I31w), srs, srs),
TCE(ssat16, 6a00f30, f3200000, 3, (RRnpc, I16, RRnpc), ssat16, t_ssat16),
- TCE(strex, 1800f90, e8400000, 3, (RRnpc, RRnpc, ADDR), strex, t_strex),
TCE(umaal, 0400090, fbe00060, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smlal, t_mlal),
TCE(usad8, 780f010, fb70f000, 3, (RRnpc, RRnpc, RRnpc), smul, t_simd),
TCE(usada8, 7800010, fb700000, 4, (RRnpc, RRnpc, RRnpc, RRnpc),smla, t_mla),
@@ -9354,18 +15203,20 @@ static const struct asm_opcode insns[] =
TCE(ubfx, 7e00050, f3c00000, 4, (RR, RR, I31, I32), bfx, t_bfx),
TCE(mls, 0600090, fb000010, 4, (RRnpc, RRnpc, RRnpc, RRnpc), mlas, t_mla),
- TCE(movw, 3000000, f2400000, 2, (RRnpc, Iffff), mov16, t_mov16),
- TCE(movt, 3400000, f2c00000, 2, (RRnpc, Iffff), mov16, t_mov16),
- TCE(rbit, 3ff0f30, fa90f0a0, 2, (RR, RR), rd_rm, t_rbit),
+ TCE(movw, 3000000, f2400000, 2, (RRnpc, HALF), mov16, t_mov16),
+ TCE(movt, 3400000, f2c00000, 2, (RRnpc, HALF), mov16, t_mov16),
+ TCE(rbit, 6ff0f30, fa90f0a0, 2, (RR, RR), rd_rm, t_rbit),
TC3(ldrht, 03000b0, f8300e00, 2, (RR, ADDR), ldsttv4, t_ldstt),
TC3(ldrsht, 03000f0, f9300e00, 2, (RR, ADDR), ldsttv4, t_ldstt),
TC3(ldrsbt, 03000d0, f9100e00, 2, (RR, ADDR), ldsttv4, t_ldstt),
TC3(strht, 02000b0, f8200e00, 2, (RR, ADDR), ldsttv4, t_ldstt),
- UT(cbnz, b900, 2, (RR, EXP), t_czb),
- UT(cbz, b100, 2, (RR, EXP), t_czb),
- /* ARM does not really have an IT instruction. */
+ UT(cbnz, b900, 2, (RR, EXP), t_cbz),
+ UT(cbz, b100, 2, (RR, EXP), t_cbz),
+ /* ARM does not really have an IT instruction, so always allow it. */
+#undef ARM_VARIANT
+#define ARM_VARIANT &arm_ext_v1
TUE(it, 0, bf08, 1, (COND), it, t_it),
TUE(itt, 0, bf0c, 1, (COND), it, t_it),
TUE(ite, 0, bf04, 1, (COND), it, t_it),
@@ -9415,15 +15266,15 @@ static const struct asm_opcode insns[] =
cCE(wfc, e400110, 1, (RR), rd),
cCE(rfc, e500110, 1, (RR), rd),
- cCL(ldfs, c100100, 2, (RF, ADDR), rd_cpaddr),
- cCL(ldfd, c108100, 2, (RF, ADDR), rd_cpaddr),
- cCL(ldfe, c500100, 2, (RF, ADDR), rd_cpaddr),
- cCL(ldfp, c508100, 2, (RF, ADDR), rd_cpaddr),
+ cCL(ldfs, c100100, 2, (RF, ADDRGLDC), rd_cpaddr),
+ cCL(ldfd, c108100, 2, (RF, ADDRGLDC), rd_cpaddr),
+ cCL(ldfe, c500100, 2, (RF, ADDRGLDC), rd_cpaddr),
+ cCL(ldfp, c508100, 2, (RF, ADDRGLDC), rd_cpaddr),
- cCL(stfs, c000100, 2, (RF, ADDR), rd_cpaddr),
- cCL(stfd, c008100, 2, (RF, ADDR), rd_cpaddr),
- cCL(stfe, c400100, 2, (RF, ADDR), rd_cpaddr),
- cCL(stfp, c408100, 2, (RF, ADDR), rd_cpaddr),
+ cCL(stfs, c000100, 2, (RF, ADDRGLDC), rd_cpaddr),
+ cCL(stfd, c008100, 2, (RF, ADDRGLDC), rd_cpaddr),
+ cCL(stfe, c400100, 2, (RF, ADDRGLDC), rd_cpaddr),
+ cCL(stfp, c408100, 2, (RF, ADDRGLDC), rd_cpaddr),
cCL(mvfs, e008100, 2, (RF, RF_IF), rd_rm),
cCL(mvfsp, e008120, 2, (RF, RF_IF), rd_rm),
@@ -9866,8 +15717,8 @@ static const struct asm_opcode insns[] =
cCE(fmxr, ee00a10, 2, (RVC, RR), rn_rd),
/* Memory operations. */
- cCE(flds, d100a00, 2, (RVS, ADDR), vfp_sp_ldst),
- cCE(fsts, d000a00, 2, (RVS, ADDR), vfp_sp_ldst),
+ cCE(flds, d100a00, 2, (RVS, ADDRGLDC), vfp_sp_ldst),
+ cCE(fsts, d000a00, 2, (RVS, ADDRGLDC), vfp_sp_ldst),
cCE(fldmias, c900a00, 2, (RRw, VRSLST), vfp_sp_ldstmia),
cCE(fldmfds, c900a00, 2, (RRw, VRSLST), vfp_sp_ldstmia),
cCE(fldmdbs, d300a00, 2, (RRw, VRSLST), vfp_sp_ldstmdb),
@@ -9910,13 +15761,13 @@ static const struct asm_opcode insns[] =
#undef ARM_VARIANT
#define ARM_VARIANT &fpu_vfp_ext_v1 /* VFP V1 (Double precision). */
/* Moves and type conversions. */
- cCE(fcpyd, eb00b40, 2, (RVD, RVD), rd_rm),
+ cCE(fcpyd, eb00b40, 2, (RVD, RVD), vfp_dp_rd_rm),
cCE(fcvtds, eb70ac0, 2, (RVD, RVS), vfp_dp_sp_cvt),
cCE(fcvtsd, eb70bc0, 2, (RVS, RVD), vfp_sp_dp_cvt),
- cCE(fmdhr, e200b10, 2, (RVD, RR), rn_rd),
- cCE(fmdlr, e000b10, 2, (RVD, RR), rn_rd),
- cCE(fmrdh, e300b10, 2, (RR, RVD), rd_rn),
- cCE(fmrdl, e100b10, 2, (RR, RVD), rd_rn),
+ cCE(fmdhr, e200b10, 2, (RVD, RR), vfp_dp_rn_rd),
+ cCE(fmdlr, e000b10, 2, (RVD, RR), vfp_dp_rn_rd),
+ cCE(fmrdh, e300b10, 2, (RR, RVD), vfp_dp_rd_rn),
+ cCE(fmrdl, e100b10, 2, (RR, RVD), vfp_dp_rd_rn),
cCE(fsitod, eb80bc0, 2, (RVD, RVS), vfp_dp_sp_cvt),
cCE(fuitod, eb80b40, 2, (RVD, RVS), vfp_dp_sp_cvt),
cCE(ftosid, ebd0b40, 2, (RVS, RVD), vfp_sp_dp_cvt),
@@ -9925,8 +15776,8 @@ static const struct asm_opcode insns[] =
cCE(ftouizd, ebc0bc0, 2, (RVS, RVD), vfp_sp_dp_cvt),
/* Memory operations. */
- cCE(fldd, d100b00, 2, (RVD, ADDR), vfp_dp_ldst),
- cCE(fstd, d000b00, 2, (RVD, ADDR), vfp_dp_ldst),
+ cCE(fldd, d100b00, 2, (RVD, ADDRGLDC), vfp_dp_ldst),
+ cCE(fstd, d000b00, 2, (RVD, ADDRGLDC), vfp_dp_ldst),
cCE(fldmiad, c900b00, 2, (RRw, VRDLST), vfp_dp_ldstmia),
cCE(fldmfdd, c900b00, 2, (RRw, VRDLST), vfp_dp_ldstmia),
cCE(fldmdbd, d300b00, 2, (RRw, VRDLST), vfp_dp_ldstmdb),
@@ -9937,34 +15788,347 @@ static const struct asm_opcode insns[] =
cCE(fstmfdd, d200b00, 2, (RRw, VRDLST), vfp_dp_ldstmdb),
/* Monadic operations. */
- cCE(fabsd, eb00bc0, 2, (RVD, RVD), rd_rm),
- cCE(fnegd, eb10b40, 2, (RVD, RVD), rd_rm),
- cCE(fsqrtd, eb10bc0, 2, (RVD, RVD), rd_rm),
+ cCE(fabsd, eb00bc0, 2, (RVD, RVD), vfp_dp_rd_rm),
+ cCE(fnegd, eb10b40, 2, (RVD, RVD), vfp_dp_rd_rm),
+ cCE(fsqrtd, eb10bc0, 2, (RVD, RVD), vfp_dp_rd_rm),
/* Dyadic operations. */
- cCE(faddd, e300b00, 3, (RVD, RVD, RVD), rd_rn_rm),
- cCE(fsubd, e300b40, 3, (RVD, RVD, RVD), rd_rn_rm),
- cCE(fmuld, e200b00, 3, (RVD, RVD, RVD), rd_rn_rm),
- cCE(fdivd, e800b00, 3, (RVD, RVD, RVD), rd_rn_rm),
- cCE(fmacd, e000b00, 3, (RVD, RVD, RVD), rd_rn_rm),
- cCE(fmscd, e100b00, 3, (RVD, RVD, RVD), rd_rn_rm),
- cCE(fnmuld, e200b40, 3, (RVD, RVD, RVD), rd_rn_rm),
- cCE(fnmacd, e000b40, 3, (RVD, RVD, RVD), rd_rn_rm),
- cCE(fnmscd, e100b40, 3, (RVD, RVD, RVD), rd_rn_rm),
+ cCE(faddd, e300b00, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
+ cCE(fsubd, e300b40, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
+ cCE(fmuld, e200b00, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
+ cCE(fdivd, e800b00, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
+ cCE(fmacd, e000b00, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
+ cCE(fmscd, e100b00, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
+ cCE(fnmuld, e200b40, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
+ cCE(fnmacd, e000b40, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
+ cCE(fnmscd, e100b40, 3, (RVD, RVD, RVD), vfp_dp_rd_rn_rm),
/* Comparisons. */
- cCE(fcmpd, eb40b40, 2, (RVD, RVD), rd_rm),
- cCE(fcmpzd, eb50b40, 1, (RVD), rd),
- cCE(fcmped, eb40bc0, 2, (RVD, RVD), rd_rm),
- cCE(fcmpezd, eb50bc0, 1, (RVD), rd),
+ cCE(fcmpd, eb40b40, 2, (RVD, RVD), vfp_dp_rd_rm),
+ cCE(fcmpzd, eb50b40, 1, (RVD), vfp_dp_rd),
+ cCE(fcmped, eb40bc0, 2, (RVD, RVD), vfp_dp_rd_rm),
+ cCE(fcmpezd, eb50bc0, 1, (RVD), vfp_dp_rd),
#undef ARM_VARIANT
#define ARM_VARIANT &fpu_vfp_ext_v2
cCE(fmsrr, c400a10, 3, (VRSLST, RR, RR), vfp_sp2_from_reg2),
cCE(fmrrs, c500a10, 3, (RR, RR, VRSLST), vfp_reg2_from_sp2),
- cCE(fmdrr, c400b10, 3, (RVD, RR, RR), rm_rd_rn),
- cCE(fmrrd, c500b10, 3, (RR, RR, RVD), rd_rn_rm),
+ cCE(fmdrr, c400b10, 3, (RVD, RR, RR), vfp_dp_rm_rd_rn),
+ cCE(fmrrd, c500b10, 3, (RR, RR, RVD), vfp_dp_rd_rn_rm),
+
+/* Instructions which may belong to either the Neon or VFP instruction sets.
+ Individual encoder functions perform additional architecture checks. */
+#undef ARM_VARIANT
+#define ARM_VARIANT &fpu_vfp_ext_v1xd
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &fpu_vfp_ext_v1xd
+ /* These mnemonics are unique to VFP. */
+ NCE(vsqrt, 0, 2, (RVSD, RVSD), vfp_nsyn_sqrt),
+ NCE(vdiv, 0, 3, (RVSD, RVSD, RVSD), vfp_nsyn_div),
+ nCE(vnmul, vnmul, 3, (RVSD, RVSD, RVSD), vfp_nsyn_nmul),
+ nCE(vnmla, vnmla, 3, (RVSD, RVSD, RVSD), vfp_nsyn_nmul),
+ nCE(vnmls, vnmls, 3, (RVSD, RVSD, RVSD), vfp_nsyn_nmul),
+ nCE(vcmp, vcmp, 2, (RVSD, RVSD_I0), vfp_nsyn_cmp),
+ nCE(vcmpe, vcmpe, 2, (RVSD, RVSD_I0), vfp_nsyn_cmp),
+ NCE(vpush, 0, 1, (VRSDLST), vfp_nsyn_push),
+ NCE(vpop, 0, 1, (VRSDLST), vfp_nsyn_pop),
+ NCE(vcvtz, 0, 2, (RVSD, RVSD), vfp_nsyn_cvtz),
+
+ /* Mnemonics shared by Neon and VFP. */
+ nCEF(vmul, vmul, 3, (RNSDQ, oRNSDQ, RNSDQ_RNSC), neon_mul),
+ nCEF(vmla, vmla, 3, (RNSDQ, oRNSDQ, RNSDQ_RNSC), neon_mac_maybe_scalar),
+ nCEF(vmls, vmls, 3, (RNSDQ, oRNSDQ, RNSDQ_RNSC), neon_mac_maybe_scalar),
+
+ nCEF(vadd, vadd, 3, (RNSDQ, oRNSDQ, RNSDQ), neon_addsub_if_i),
+ nCEF(vsub, vsub, 3, (RNSDQ, oRNSDQ, RNSDQ), neon_addsub_if_i),
+
+ NCEF(vabs, 1b10300, 2, (RNSDQ, RNSDQ), neon_abs_neg),
+ NCEF(vneg, 1b10380, 2, (RNSDQ, RNSDQ), neon_abs_neg),
+
+ NCE(vldm, c900b00, 2, (RRw, VRSDLST), neon_ldm_stm),
+ NCE(vldmia, c900b00, 2, (RRw, VRSDLST), neon_ldm_stm),
+ NCE(vldmdb, d100b00, 2, (RRw, VRSDLST), neon_ldm_stm),
+ NCE(vstm, c800b00, 2, (RRw, VRSDLST), neon_ldm_stm),
+ NCE(vstmia, c800b00, 2, (RRw, VRSDLST), neon_ldm_stm),
+ NCE(vstmdb, d000b00, 2, (RRw, VRSDLST), neon_ldm_stm),
+ NCE(vldr, d100b00, 2, (RVSD, ADDRGLDC), neon_ldr_str),
+ NCE(vstr, d000b00, 2, (RVSD, ADDRGLDC), neon_ldr_str),
+
+ nCEF(vcvt, vcvt, 3, (RNSDQ, RNSDQ, oI32b), neon_cvt),
+
+ /* NOTE: All VMOV encoding is special-cased! */
+ NCE(vmov, 0, 1, (VMOV), neon_mov),
+ NCE(vmovq, 0, 1, (VMOV), neon_mov),
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &fpu_neon_ext_v1
+#undef ARM_VARIANT
+#define ARM_VARIANT &fpu_neon_ext_v1
+ /* Data processing with three registers of the same length. */
+ /* integer ops, valid types S8 S16 S32 U8 U16 U32. */
+ NUF(vaba, 0000710, 3, (RNDQ, RNDQ, RNDQ), neon_dyadic_i_su),
+ NUF(vabaq, 0000710, 3, (RNQ, RNQ, RNQ), neon_dyadic_i_su),
+ NUF(vhadd, 0000000, 3, (RNDQ, oRNDQ, RNDQ), neon_dyadic_i_su),
+ NUF(vhaddq, 0000000, 3, (RNQ, oRNQ, RNQ), neon_dyadic_i_su),
+ NUF(vrhadd, 0000100, 3, (RNDQ, oRNDQ, RNDQ), neon_dyadic_i_su),
+ NUF(vrhaddq, 0000100, 3, (RNQ, oRNQ, RNQ), neon_dyadic_i_su),
+ NUF(vhsub, 0000200, 3, (RNDQ, oRNDQ, RNDQ), neon_dyadic_i_su),
+ NUF(vhsubq, 0000200, 3, (RNQ, oRNQ, RNQ), neon_dyadic_i_su),
+ /* integer ops, valid types S8 S16 S32 S64 U8 U16 U32 U64. */
+ NUF(vqadd, 0000010, 3, (RNDQ, oRNDQ, RNDQ), neon_dyadic_i64_su),
+ NUF(vqaddq, 0000010, 3, (RNQ, oRNQ, RNQ), neon_dyadic_i64_su),
+ NUF(vqsub, 0000210, 3, (RNDQ, oRNDQ, RNDQ), neon_dyadic_i64_su),
+ NUF(vqsubq, 0000210, 3, (RNQ, oRNQ, RNQ), neon_dyadic_i64_su),
+ NUF(vrshl, 0000500, 3, (RNDQ, oRNDQ, RNDQ), neon_rshl),
+ NUF(vrshlq, 0000500, 3, (RNQ, oRNQ, RNQ), neon_rshl),
+ NUF(vqrshl, 0000510, 3, (RNDQ, oRNDQ, RNDQ), neon_rshl),
+ NUF(vqrshlq, 0000510, 3, (RNQ, oRNQ, RNQ), neon_rshl),
+ /* If not immediate, fall back to neon_dyadic_i64_su.
+ shl_imm should accept I8 I16 I32 I64,
+ qshl_imm should accept S8 S16 S32 S64 U8 U16 U32 U64. */
+ nUF(vshl, vshl, 3, (RNDQ, oRNDQ, RNDQ_I63b), neon_shl_imm),
+ nUF(vshlq, vshl, 3, (RNQ, oRNQ, RNDQ_I63b), neon_shl_imm),
+ nUF(vqshl, vqshl, 3, (RNDQ, oRNDQ, RNDQ_I63b), neon_qshl_imm),
+ nUF(vqshlq, vqshl, 3, (RNQ, oRNQ, RNDQ_I63b), neon_qshl_imm),
+ /* Logic ops, types optional & ignored. */
+ nUF(vand, vand, 2, (RNDQ, NILO), neon_logic),
+ nUF(vandq, vand, 2, (RNQ, NILO), neon_logic),
+ nUF(vbic, vbic, 2, (RNDQ, NILO), neon_logic),
+ nUF(vbicq, vbic, 2, (RNQ, NILO), neon_logic),
+ nUF(vorr, vorr, 2, (RNDQ, NILO), neon_logic),
+ nUF(vorrq, vorr, 2, (RNQ, NILO), neon_logic),
+ nUF(vorn, vorn, 2, (RNDQ, NILO), neon_logic),
+ nUF(vornq, vorn, 2, (RNQ, NILO), neon_logic),
+ nUF(veor, veor, 3, (RNDQ, oRNDQ, RNDQ), neon_logic),
+ nUF(veorq, veor, 3, (RNQ, oRNQ, RNQ), neon_logic),
+ /* Bitfield ops, untyped. */
+ NUF(vbsl, 1100110, 3, (RNDQ, RNDQ, RNDQ), neon_bitfield),
+ NUF(vbslq, 1100110, 3, (RNQ, RNQ, RNQ), neon_bitfield),
+ NUF(vbit, 1200110, 3, (RNDQ, RNDQ, RNDQ), neon_bitfield),
+ NUF(vbitq, 1200110, 3, (RNQ, RNQ, RNQ), neon_bitfield),
+ NUF(vbif, 1300110, 3, (RNDQ, RNDQ, RNDQ), neon_bitfield),
+ NUF(vbifq, 1300110, 3, (RNQ, RNQ, RNQ), neon_bitfield),
+ /* Int and float variants, types S8 S16 S32 U8 U16 U32 F32. */
+ nUF(vabd, vabd, 3, (RNDQ, oRNDQ, RNDQ), neon_dyadic_if_su),
+ nUF(vabdq, vabd, 3, (RNQ, oRNQ, RNQ), neon_dyadic_if_su),
+ nUF(vmax, vmax, 3, (RNDQ, oRNDQ, RNDQ), neon_dyadic_if_su),
+ nUF(vmaxq, vmax, 3, (RNQ, oRNQ, RNQ), neon_dyadic_if_su),
+ nUF(vmin, vmin, 3, (RNDQ, oRNDQ, RNDQ), neon_dyadic_if_su),
+ nUF(vminq, vmin, 3, (RNQ, oRNQ, RNQ), neon_dyadic_if_su),
+ /* Comparisons. Types S8 S16 S32 U8 U16 U32 F32. Non-immediate versions fall
+ back to neon_dyadic_if_su. */
+ nUF(vcge, vcge, 3, (RNDQ, oRNDQ, RNDQ_I0), neon_cmp),
+ nUF(vcgeq, vcge, 3, (RNQ, oRNQ, RNDQ_I0), neon_cmp),
+ nUF(vcgt, vcgt, 3, (RNDQ, oRNDQ, RNDQ_I0), neon_cmp),
+ nUF(vcgtq, vcgt, 3, (RNQ, oRNQ, RNDQ_I0), neon_cmp),
+ nUF(vclt, vclt, 3, (RNDQ, oRNDQ, RNDQ_I0), neon_cmp_inv),
+ nUF(vcltq, vclt, 3, (RNQ, oRNQ, RNDQ_I0), neon_cmp_inv),
+ nUF(vcle, vcle, 3, (RNDQ, oRNDQ, RNDQ_I0), neon_cmp_inv),
+ nUF(vcleq, vcle, 3, (RNQ, oRNQ, RNDQ_I0), neon_cmp_inv),
+ /* Comparison. Type I8 I16 I32 F32. */
+ nUF(vceq, vceq, 3, (RNDQ, oRNDQ, RNDQ_I0), neon_ceq),
+ nUF(vceqq, vceq, 3, (RNQ, oRNQ, RNDQ_I0), neon_ceq),
+ /* As above, D registers only. */
+ nUF(vpmax, vpmax, 3, (RND, oRND, RND), neon_dyadic_if_su_d),
+ nUF(vpmin, vpmin, 3, (RND, oRND, RND), neon_dyadic_if_su_d),
+ /* Int and float variants, signedness unimportant. */
+ nUF(vmlaq, vmla, 3, (RNQ, oRNQ, RNDQ_RNSC), neon_mac_maybe_scalar),
+ nUF(vmlsq, vmls, 3, (RNQ, oRNQ, RNDQ_RNSC), neon_mac_maybe_scalar),
+ nUF(vpadd, vpadd, 3, (RND, oRND, RND), neon_dyadic_if_i_d),
+ /* Add/sub take types I8 I16 I32 I64 F32. */
+ nUF(vaddq, vadd, 3, (RNQ, oRNQ, RNQ), neon_addsub_if_i),
+ nUF(vsubq, vsub, 3, (RNQ, oRNQ, RNQ), neon_addsub_if_i),
+ /* vtst takes sizes 8, 16, 32. */
+ NUF(vtst, 0000810, 3, (RNDQ, oRNDQ, RNDQ), neon_tst),
+ NUF(vtstq, 0000810, 3, (RNQ, oRNQ, RNQ), neon_tst),
+ /* VMUL takes I8 I16 I32 F32 P8. */
+ nUF(vmulq, vmul, 3, (RNQ, oRNQ, RNDQ_RNSC), neon_mul),
+ /* VQD{R}MULH takes S16 S32. */
+ nUF(vqdmulh, vqdmulh, 3, (RNDQ, oRNDQ, RNDQ_RNSC), neon_qdmulh),
+ nUF(vqdmulhq, vqdmulh, 3, (RNQ, oRNQ, RNDQ_RNSC), neon_qdmulh),
+ nUF(vqrdmulh, vqrdmulh, 3, (RNDQ, oRNDQ, RNDQ_RNSC), neon_qdmulh),
+ nUF(vqrdmulhq, vqrdmulh, 3, (RNQ, oRNQ, RNDQ_RNSC), neon_qdmulh),
+ NUF(vacge, 0000e10, 3, (RNDQ, oRNDQ, RNDQ), neon_fcmp_absolute),
+ NUF(vacgeq, 0000e10, 3, (RNQ, oRNQ, RNQ), neon_fcmp_absolute),
+ NUF(vacgt, 0200e10, 3, (RNDQ, oRNDQ, RNDQ), neon_fcmp_absolute),
+ NUF(vacgtq, 0200e10, 3, (RNQ, oRNQ, RNQ), neon_fcmp_absolute),
+ NUF(vaclt, 0200e10, 3, (RNDQ, oRNDQ, RNDQ), neon_fcmp_absolute_inv),
+ NUF(vacltq, 0200e10, 3, (RNQ, oRNQ, RNQ), neon_fcmp_absolute_inv),
+ NUF(vacle, 0000e10, 3, (RNDQ, oRNDQ, RNDQ), neon_fcmp_absolute_inv),
+ NUF(vacleq, 0000e10, 3, (RNQ, oRNQ, RNQ), neon_fcmp_absolute_inv),
+ NUF(vrecps, 0000f10, 3, (RNDQ, oRNDQ, RNDQ), neon_step),
+ NUF(vrecpsq, 0000f10, 3, (RNQ, oRNQ, RNQ), neon_step),
+ NUF(vrsqrts, 0200f10, 3, (RNDQ, oRNDQ, RNDQ), neon_step),
+ NUF(vrsqrtsq, 0200f10, 3, (RNQ, oRNQ, RNQ), neon_step),
+
+ /* Two address, int/float. Types S8 S16 S32 F32. */
+ NUF(vabsq, 1b10300, 2, (RNQ, RNQ), neon_abs_neg),
+ NUF(vnegq, 1b10380, 2, (RNQ, RNQ), neon_abs_neg),
+
+ /* Data processing with two registers and a shift amount. */
+ /* Right shifts, and variants with rounding.
+ Types accepted S8 S16 S32 S64 U8 U16 U32 U64. */
+ NUF(vshr, 0800010, 3, (RNDQ, oRNDQ, I64z), neon_rshift_round_imm),
+ NUF(vshrq, 0800010, 3, (RNQ, oRNQ, I64z), neon_rshift_round_imm),
+ NUF(vrshr, 0800210, 3, (RNDQ, oRNDQ, I64z), neon_rshift_round_imm),
+ NUF(vrshrq, 0800210, 3, (RNQ, oRNQ, I64z), neon_rshift_round_imm),
+ NUF(vsra, 0800110, 3, (RNDQ, oRNDQ, I64), neon_rshift_round_imm),
+ NUF(vsraq, 0800110, 3, (RNQ, oRNQ, I64), neon_rshift_round_imm),
+ NUF(vrsra, 0800310, 3, (RNDQ, oRNDQ, I64), neon_rshift_round_imm),
+ NUF(vrsraq, 0800310, 3, (RNQ, oRNQ, I64), neon_rshift_round_imm),
+ /* Shift and insert. Sizes accepted 8 16 32 64. */
+ NUF(vsli, 1800510, 3, (RNDQ, oRNDQ, I63), neon_sli),
+ NUF(vsliq, 1800510, 3, (RNQ, oRNQ, I63), neon_sli),
+ NUF(vsri, 1800410, 3, (RNDQ, oRNDQ, I64), neon_sri),
+ NUF(vsriq, 1800410, 3, (RNQ, oRNQ, I64), neon_sri),
+ /* QSHL{U} immediate accepts S8 S16 S32 S64 U8 U16 U32 U64. */
+ NUF(vqshlu, 1800610, 3, (RNDQ, oRNDQ, I63), neon_qshlu_imm),
+ NUF(vqshluq, 1800610, 3, (RNQ, oRNQ, I63), neon_qshlu_imm),
+ /* Right shift immediate, saturating & narrowing, with rounding variants.
+ Types accepted S16 S32 S64 U16 U32 U64. */
+ NUF(vqshrn, 0800910, 3, (RND, RNQ, I32z), neon_rshift_sat_narrow),
+ NUF(vqrshrn, 0800950, 3, (RND, RNQ, I32z), neon_rshift_sat_narrow),
+ /* As above, unsigned. Types accepted S16 S32 S64. */
+ NUF(vqshrun, 0800810, 3, (RND, RNQ, I32z), neon_rshift_sat_narrow_u),
+ NUF(vqrshrun, 0800850, 3, (RND, RNQ, I32z), neon_rshift_sat_narrow_u),
+ /* Right shift narrowing. Types accepted I16 I32 I64. */
+ NUF(vshrn, 0800810, 3, (RND, RNQ, I32z), neon_rshift_narrow),
+ NUF(vrshrn, 0800850, 3, (RND, RNQ, I32z), neon_rshift_narrow),
+ /* Special case. Types S8 S16 S32 U8 U16 U32. Handles max shift variant. */
+ nUF(vshll, vshll, 3, (RNQ, RND, I32), neon_shll),
+ /* CVT with optional immediate for fixed-point variant. */
+ nUF(vcvtq, vcvt, 3, (RNQ, RNQ, oI32b), neon_cvt),
+
+ nUF(vmvn, vmvn, 2, (RNDQ, RNDQ_IMVNb), neon_mvn),
+ nUF(vmvnq, vmvn, 2, (RNQ, RNDQ_IMVNb), neon_mvn),
+
+ /* Data processing, three registers of different lengths. */
+ /* Dyadic, long insns. Types S8 S16 S32 U8 U16 U32. */
+ NUF(vabal, 0800500, 3, (RNQ, RND, RND), neon_abal),
+ NUF(vabdl, 0800700, 3, (RNQ, RND, RND), neon_dyadic_long),
+ NUF(vaddl, 0800000, 3, (RNQ, RND, RND), neon_dyadic_long),
+ NUF(vsubl, 0800200, 3, (RNQ, RND, RND), neon_dyadic_long),
+ /* If not scalar, fall back to neon_dyadic_long.
+ Vector types as above, scalar types S16 S32 U16 U32. */
+ nUF(vmlal, vmlal, 3, (RNQ, RND, RND_RNSC), neon_mac_maybe_scalar_long),
+ nUF(vmlsl, vmlsl, 3, (RNQ, RND, RND_RNSC), neon_mac_maybe_scalar_long),
+ /* Dyadic, widening insns. Types S8 S16 S32 U8 U16 U32. */
+ NUF(vaddw, 0800100, 3, (RNQ, oRNQ, RND), neon_dyadic_wide),
+ NUF(vsubw, 0800300, 3, (RNQ, oRNQ, RND), neon_dyadic_wide),
+ /* Dyadic, narrowing insns. Types I16 I32 I64. */
+ NUF(vaddhn, 0800400, 3, (RND, RNQ, RNQ), neon_dyadic_narrow),
+ NUF(vraddhn, 1800400, 3, (RND, RNQ, RNQ), neon_dyadic_narrow),
+ NUF(vsubhn, 0800600, 3, (RND, RNQ, RNQ), neon_dyadic_narrow),
+ NUF(vrsubhn, 1800600, 3, (RND, RNQ, RNQ), neon_dyadic_narrow),
+ /* Saturating doubling multiplies. Types S16 S32. */
+ nUF(vqdmlal, vqdmlal, 3, (RNQ, RND, RND_RNSC), neon_mul_sat_scalar_long),
+ nUF(vqdmlsl, vqdmlsl, 3, (RNQ, RND, RND_RNSC), neon_mul_sat_scalar_long),
+ nUF(vqdmull, vqdmull, 3, (RNQ, RND, RND_RNSC), neon_mul_sat_scalar_long),
+ /* VMULL. Vector types S8 S16 S32 U8 U16 U32 P8, scalar types
+ S16 S32 U16 U32. */
+ nUF(vmull, vmull, 3, (RNQ, RND, RND_RNSC), neon_vmull),
+
+ /* Extract. Size 8. */
+ NUF(vext, 0b00000, 4, (RNDQ, oRNDQ, RNDQ, I15), neon_ext),
+ NUF(vextq, 0b00000, 4, (RNQ, oRNQ, RNQ, I15), neon_ext),
+
+ /* Two registers, miscellaneous. */
+ /* Reverse. Sizes 8 16 32 (must be < size in opcode). */
+ NUF(vrev64, 1b00000, 2, (RNDQ, RNDQ), neon_rev),
+ NUF(vrev64q, 1b00000, 2, (RNQ, RNQ), neon_rev),
+ NUF(vrev32, 1b00080, 2, (RNDQ, RNDQ), neon_rev),
+ NUF(vrev32q, 1b00080, 2, (RNQ, RNQ), neon_rev),
+ NUF(vrev16, 1b00100, 2, (RNDQ, RNDQ), neon_rev),
+ NUF(vrev16q, 1b00100, 2, (RNQ, RNQ), neon_rev),
+ /* Vector replicate. Sizes 8 16 32. */
+ nCE(vdup, vdup, 2, (RNDQ, RR_RNSC), neon_dup),
+ nCE(vdupq, vdup, 2, (RNQ, RR_RNSC), neon_dup),
+ /* VMOVL. Types S8 S16 S32 U8 U16 U32. */
+ NUF(vmovl, 0800a10, 2, (RNQ, RND), neon_movl),
+ /* VMOVN. Types I16 I32 I64. */
+ nUF(vmovn, vmovn, 2, (RND, RNQ), neon_movn),
+ /* VQMOVN. Types S16 S32 S64 U16 U32 U64. */
+ nUF(vqmovn, vqmovn, 2, (RND, RNQ), neon_qmovn),
+ /* VQMOVUN. Types S16 S32 S64. */
+ nUF(vqmovun, vqmovun, 2, (RND, RNQ), neon_qmovun),
+ /* VZIP / VUZP. Sizes 8 16 32. */
+ NUF(vzip, 1b20180, 2, (RNDQ, RNDQ), neon_zip_uzp),
+ NUF(vzipq, 1b20180, 2, (RNQ, RNQ), neon_zip_uzp),
+ NUF(vuzp, 1b20100, 2, (RNDQ, RNDQ), neon_zip_uzp),
+ NUF(vuzpq, 1b20100, 2, (RNQ, RNQ), neon_zip_uzp),
+ /* VQABS / VQNEG. Types S8 S16 S32. */
+ NUF(vqabs, 1b00700, 2, (RNDQ, RNDQ), neon_sat_abs_neg),
+ NUF(vqabsq, 1b00700, 2, (RNQ, RNQ), neon_sat_abs_neg),
+ NUF(vqneg, 1b00780, 2, (RNDQ, RNDQ), neon_sat_abs_neg),
+ NUF(vqnegq, 1b00780, 2, (RNQ, RNQ), neon_sat_abs_neg),
+ /* Pairwise, lengthening. Types S8 S16 S32 U8 U16 U32. */
+ NUF(vpadal, 1b00600, 2, (RNDQ, RNDQ), neon_pair_long),
+ NUF(vpadalq, 1b00600, 2, (RNQ, RNQ), neon_pair_long),
+ NUF(vpaddl, 1b00200, 2, (RNDQ, RNDQ), neon_pair_long),
+ NUF(vpaddlq, 1b00200, 2, (RNQ, RNQ), neon_pair_long),
+ /* Reciprocal estimates. Types U32 F32. */
+ NUF(vrecpe, 1b30400, 2, (RNDQ, RNDQ), neon_recip_est),
+ NUF(vrecpeq, 1b30400, 2, (RNQ, RNQ), neon_recip_est),
+ NUF(vrsqrte, 1b30480, 2, (RNDQ, RNDQ), neon_recip_est),
+ NUF(vrsqrteq, 1b30480, 2, (RNQ, RNQ), neon_recip_est),
+ /* VCLS. Types S8 S16 S32. */
+ NUF(vcls, 1b00400, 2, (RNDQ, RNDQ), neon_cls),
+ NUF(vclsq, 1b00400, 2, (RNQ, RNQ), neon_cls),
+ /* VCLZ. Types I8 I16 I32. */
+ NUF(vclz, 1b00480, 2, (RNDQ, RNDQ), neon_clz),
+ NUF(vclzq, 1b00480, 2, (RNQ, RNQ), neon_clz),
+ /* VCNT. Size 8. */
+ NUF(vcnt, 1b00500, 2, (RNDQ, RNDQ), neon_cnt),
+ NUF(vcntq, 1b00500, 2, (RNQ, RNQ), neon_cnt),
+ /* Two address, untyped. */
+ NUF(vswp, 1b20000, 2, (RNDQ, RNDQ), neon_swp),
+ NUF(vswpq, 1b20000, 2, (RNQ, RNQ), neon_swp),
+ /* VTRN. Sizes 8 16 32. */
+ nUF(vtrn, vtrn, 2, (RNDQ, RNDQ), neon_trn),
+ nUF(vtrnq, vtrn, 2, (RNQ, RNQ), neon_trn),
+
+ /* Table lookup. Size 8. */
+ NUF(vtbl, 1b00800, 3, (RND, NRDLST, RND), neon_tbl_tbx),
+ NUF(vtbx, 1b00840, 3, (RND, NRDLST, RND), neon_tbl_tbx),
+
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &fpu_vfp_v3_or_neon_ext
+#undef ARM_VARIANT
+#define ARM_VARIANT &fpu_vfp_v3_or_neon_ext
+ /* Neon element/structure load/store. */
+ nUF(vld1, vld1, 2, (NSTRLST, ADDR), neon_ldx_stx),
+ nUF(vst1, vst1, 2, (NSTRLST, ADDR), neon_ldx_stx),
+ nUF(vld2, vld2, 2, (NSTRLST, ADDR), neon_ldx_stx),
+ nUF(vst2, vst2, 2, (NSTRLST, ADDR), neon_ldx_stx),
+ nUF(vld3, vld3, 2, (NSTRLST, ADDR), neon_ldx_stx),
+ nUF(vst3, vst3, 2, (NSTRLST, ADDR), neon_ldx_stx),
+ nUF(vld4, vld4, 2, (NSTRLST, ADDR), neon_ldx_stx),
+ nUF(vst4, vst4, 2, (NSTRLST, ADDR), neon_ldx_stx),
+
+#undef THUMB_VARIANT
+#define THUMB_VARIANT &fpu_vfp_ext_v3
+#undef ARM_VARIANT
+#define ARM_VARIANT &fpu_vfp_ext_v3
+ cCE(fconsts, eb00a00, 2, (RVS, I255), vfp_sp_const),
+ cCE(fconstd, eb00b00, 2, (RVD, I255), vfp_dp_const),
+ cCE(fshtos, eba0a40, 2, (RVS, I16z), vfp_sp_conv_16),
+ cCE(fshtod, eba0b40, 2, (RVD, I16z), vfp_dp_conv_16),
+ cCE(fsltos, eba0ac0, 2, (RVS, I32), vfp_sp_conv_32),
+ cCE(fsltod, eba0bc0, 2, (RVD, I32), vfp_dp_conv_32),
+ cCE(fuhtos, ebb0a40, 2, (RVS, I16z), vfp_sp_conv_16),
+ cCE(fuhtod, ebb0b40, 2, (RVD, I16z), vfp_dp_conv_16),
+ cCE(fultos, ebb0ac0, 2, (RVS, I32), vfp_sp_conv_32),
+ cCE(fultod, ebb0bc0, 2, (RVD, I32), vfp_dp_conv_32),
+ cCE(ftoshs, ebe0a40, 2, (RVS, I16z), vfp_sp_conv_16),
+ cCE(ftoshd, ebe0b40, 2, (RVD, I16z), vfp_dp_conv_16),
+ cCE(ftosls, ebe0ac0, 2, (RVS, I32), vfp_sp_conv_32),
+ cCE(ftosld, ebe0bc0, 2, (RVD, I32), vfp_dp_conv_32),
+ cCE(ftouhs, ebf0a40, 2, (RVS, I16z), vfp_sp_conv_16),
+ cCE(ftouhd, ebf0b40, 2, (RVD, I16z), vfp_dp_conv_16),
+ cCE(ftouls, ebf0ac0, 2, (RVS, I32), vfp_sp_conv_32),
+ cCE(ftould, ebf0bc0, 2, (RVD, I32), vfp_dp_conv_32),
+
+#undef THUMB_VARIANT
#undef ARM_VARIANT
#define ARM_VARIANT &arm_cext_xscale /* Intel XScale extensions. */
cCE(mia, e200010, 3, (RXA, RRnpc, RRnpc), xsc_mia),
@@ -9996,7 +16160,7 @@ static const struct asm_opcode insns[] =
cCE(tinsrb, e600010, 3, (RIWR, RR, I7), iwmmxt_tinsr),
cCE(tinsrh, e600050, 3, (RIWR, RR, I7), iwmmxt_tinsr),
cCE(tinsrw, e600090, 3, (RIWR, RR, I7), iwmmxt_tinsr),
- cCE(tmcr, e000110, 2, (RIWC, RR), rn_rd),
+ cCE(tmcr, e000110, 2, (RIWC_RIWG, RR), rn_rd),
cCE(tmcrr, c400000, 3, (RIWR, RR, RR), rm_rd_rn),
cCE(tmia, e200010, 3, (RIWR, RR, RR), iwmmxt_tmia),
cCE(tmiaph, e280010, 3, (RIWR, RR, RR), iwmmxt_tmia),
@@ -10007,7 +16171,7 @@ static const struct asm_opcode insns[] =
cCE(tmovmskb, e100030, 2, (RR, RIWR), rd_rn),
cCE(tmovmskh, e500030, 2, (RR, RIWR), rd_rn),
cCE(tmovmskw, e900030, 2, (RR, RIWR), rd_rn),
- cCE(tmrc, e100110, 2, (RR, RIWC), rd_rn),
+ cCE(tmrc, e100110, 2, (RR, RIWC_RIWG), rd_rn),
cCE(tmrrc, c500000, 3, (RR, RR, RIWR), rd_rn_rm),
cCE(torcb, e13f150, 1, (RR), iwmmxt_tandorc),
cCE(torch, e53f150, 1, (RR), iwmmxt_tandorc),
@@ -10078,34 +16242,34 @@ static const struct asm_opcode insns[] =
cCE(wpackwus, e900080, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
cCE(wpackdss, ef00080, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
cCE(wpackdus, ed00080, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
- cCE(wrorh, e700040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wrorh, e700040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wrorhg, e700148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wrorw, eb00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wrorw, eb00040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wrorwg, eb00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wrord, ef00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wrord, ef00040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wrordg, ef00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
cCE(wsadb, e000120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
cCE(wsadbz, e100120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
cCE(wsadh, e400120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
cCE(wsadhz, e500120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
cCE(wshufh, e0001e0, 3, (RIWR, RIWR, I255), iwmmxt_wshufh),
- cCE(wsllh, e500040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsllh, e500040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wsllhg, e500148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wsllw, e900040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsllw, e900040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wsllwg, e900148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wslld, ed00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wslld, ed00040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wslldg, ed00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wsrah, e400040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrah, e400040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wsrahg, e400148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wsraw, e800040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsraw, e800040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wsrawg, e800148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wsrad, ec00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrad, ec00040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wsradg, ec00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wsrlh, e600040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrlh, e600040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wsrlhg, e600148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wsrlw, ea00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrlw, ea00040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wsrlwg, ea00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
- cCE(wsrld, ee00040, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsrld, ee00040, 3, (RIWR, RIWR, RIWR_I32z),iwmmxt_wrwrwr_or_imm5),
cCE(wsrldg, ee00148, 3, (RIWR, RIWR, RIWG), rd_rn_rm),
cCE(wstrb, c000000, 2, (RIWR, ADDR), iwmmxt_wldstbh),
cCE(wstrh, c400000, 2, (RIWR, ADDR), iwmmxt_wldstbh),
@@ -10142,15 +16306,75 @@ static const struct asm_opcode insns[] =
cCE(wzero, e300000, 1, (RIWR), iwmmxt_wzero),
#undef ARM_VARIANT
+#define ARM_VARIANT &arm_cext_iwmmxt2 /* Intel Wireless MMX technology, version 2. */
+ cCE(torvscb, e13f190, 1, (RR), iwmmxt_tandorc),
+ cCE(torvsch, e53f190, 1, (RR), iwmmxt_tandorc),
+ cCE(torvscw, e93f190, 1, (RR), iwmmxt_tandorc),
+ cCE(wabsb, e2001c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wabsh, e6001c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wabsw, ea001c0, 2, (RIWR, RIWR), rd_rn),
+ cCE(wabsdiffb, e1001c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wabsdiffh, e5001c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wabsdiffw, e9001c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddbhusl, e2001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddbhusm, e6001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddhc, e600180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddwc, ea00180, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(waddsubhx, ea001a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wavg4, e400000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wavg4r, e500000, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaddsn, ee00100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaddsx, eb00100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaddun, ec00100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmaddux, e900100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmerge, e000080, 4, (RIWR, RIWR, RIWR, I7), iwmmxt_wmerge),
+ cCE(wmiabb, e0000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiabt, e1000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiatb, e2000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiatt, e3000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiabbn, e4000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiabtn, e5000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiatbn, e6000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiattn, e7000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiawbb, e800120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiawbt, e900120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiawtb, ea00120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiawtt, eb00120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiawbbn, ec00120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiawbtn, ed00120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiawtbn, ee00120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmiawttn, ef00120, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulsmr, ef00100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulumr, ed00100, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulwumr, ec000c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulwsmr, ee000c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulwum, ed000c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulwsm, ef000c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wmulwl, eb000c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmiabb, e8000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmiabt, e9000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmiatb, ea000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmiatt, eb000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmiabbn, ec000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmiabtn, ed000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmiatbn, ee000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmiattn, ef000a0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmulm, e100080, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmulmr, e300080, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmulwm, ec000e0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wqmulwmr, ee000e0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+ cCE(wsubaddhx, ed001c0, 3, (RIWR, RIWR, RIWR), rd_rn_rm),
+
+#undef ARM_VARIANT
#define ARM_VARIANT &arm_cext_maverick /* Cirrus Maverick instructions. */
- cCE(cfldrs, c100400, 2, (RMF, ADDR), rd_cpaddr),
- cCE(cfldrd, c500400, 2, (RMD, ADDR), rd_cpaddr),
- cCE(cfldr32, c100500, 2, (RMFX, ADDR), rd_cpaddr),
- cCE(cfldr64, c500500, 2, (RMDX, ADDR), rd_cpaddr),
- cCE(cfstrs, c000400, 2, (RMF, ADDR), rd_cpaddr),
- cCE(cfstrd, c400400, 2, (RMD, ADDR), rd_cpaddr),
- cCE(cfstr32, c000500, 2, (RMFX, ADDR), rd_cpaddr),
- cCE(cfstr64, c400500, 2, (RMDX, ADDR), rd_cpaddr),
+ cCE(cfldrs, c100400, 2, (RMF, ADDRGLDC), rd_cpaddr),
+ cCE(cfldrd, c500400, 2, (RMD, ADDRGLDC), rd_cpaddr),
+ cCE(cfldr32, c100500, 2, (RMFX, ADDRGLDC), rd_cpaddr),
+ cCE(cfldr64, c500500, 2, (RMDX, ADDRGLDC), rd_cpaddr),
+ cCE(cfstrs, c000400, 2, (RMF, ADDRGLDC), rd_cpaddr),
+ cCE(cfstrd, c400400, 2, (RMD, ADDRGLDC), rd_cpaddr),
+ cCE(cfstr32, c000500, 2, (RMFX, ADDRGLDC), rd_cpaddr),
+ cCE(cfstr64, c400500, 2, (RMDX, ADDRGLDC), rd_cpaddr),
cCE(cfmvsr, e000450, 2, (RMF, RR), rn_rd),
cCE(cfmvrs, e100450, 2, (RR, RMF), rd_rn),
cCE(cfmvdlr, e000410, 2, (RMD, RR), rn_rd),
@@ -10235,6 +16459,10 @@ static const struct asm_opcode insns[] =
#undef UE
#undef UF
#undef UT
+#undef NUF
+#undef nUF
+#undef NCE
+#undef nCE
#undef OPS0
#undef OPS1
#undef OPS2
@@ -10428,7 +16656,10 @@ md_convert_frag (bfd *abfd, segT asec ATTRIBUTE_UNUSED, fragS *fragp)
insn = THUMB_OP32 (opcode);
insn |= (old_op & 0xf0) << 4;
put_thumb32_insn (buf, insn);
- reloc_type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ if (opcode == T_MNEM_add_pc)
+ reloc_type = BFD_RELOC_ARM_T32_IMM12;
+ else
+ reloc_type = BFD_RELOC_ARM_T32_ADD_IMM;
}
else
reloc_type = BFD_RELOC_ARM_THUMB_ADD;
@@ -10445,7 +16676,10 @@ md_convert_frag (bfd *abfd, segT asec ATTRIBUTE_UNUSED, fragS *fragp)
insn |= (old_op & 0xf0) << 4;
insn |= (old_op & 0xf) << 16;
put_thumb32_insn (buf, insn);
- reloc_type = BFD_RELOC_ARM_T32_IMMEDIATE;
+ if (insn & (1 << 20))
+ reloc_type = BFD_RELOC_ARM_T32_ADD_IMM;
+ else
+ reloc_type = BFD_RELOC_ARM_T32_IMMEDIATE;
}
else
reloc_type = BFD_RELOC_ARM_THUMB_ADD;
@@ -10479,16 +16713,42 @@ relax_immediate (fragS *fragp, int size, int shift)
offset = fragp->fr_offset;
/* Force misaligned offsets to 32-bit variant. */
if (offset & low)
- return -4;
+ return 4;
if (offset & ~mask)
return 4;
return 2;
}
+/* Get the address of a symbol during relaxation. */
+static addressT
+relaxed_symbol_addr(fragS *fragp, long stretch)
+{
+ fragS *sym_frag;
+ addressT addr;
+ symbolS *sym;
+
+ sym = fragp->fr_symbol;
+ sym_frag = symbol_get_frag (sym);
+ know (S_GET_SEGMENT (sym) != absolute_section
+ || sym_frag == &zero_address_frag);
+ addr = S_GET_VALUE (sym) + fragp->fr_offset;
+
+ /* If frag has yet to be reached on this pass, assume it will
+ move by STRETCH just as we did. If this is not so, it will
+ be because some frag between grows, and that will force
+ another pass. */
+
+ if (stretch != 0
+ && sym_frag->relax_marker != fragp->relax_marker)
+ addr += stretch;
+
+ return addr;
+}
+
/* Return the size of a relaxable adr pseudo-instruction or PC-relative
load. */
static int
-relax_adr (fragS *fragp, asection *sec)
+relax_adr (fragS *fragp, asection *sec, long stretch)
{
addressT addr;
offsetT val;
@@ -10498,14 +16758,12 @@ relax_adr (fragS *fragp, asection *sec)
|| sec != S_GET_SEGMENT (fragp->fr_symbol))
return 4;
- val = S_GET_VALUE(fragp->fr_symbol) + fragp->fr_offset;
+ val = relaxed_symbol_addr(fragp, stretch);
addr = fragp->fr_address + fragp->fr_fix;
addr = (addr + 4) & ~3;
- /* Fix the insn as the 4-byte version if the target address is not
- sufficiently aligned. This is prevents an infinite loop when two
- instructions have contradictory range/alignment requirements. */
+ /* Force misaligned targets to 32-bit variant. */
if (val & 3)
- return -4;
+ return 4;
val -= addr;
if (val < 0 || val > 1020)
return 4;
@@ -10532,7 +16790,7 @@ relax_addsub (fragS *fragp, asection *sec)
size of the offset field in the narrow instruction. */
static int
-relax_branch (fragS *fragp, asection *sec, int bits)
+relax_branch (fragS *fragp, asection *sec, int bits, long stretch)
{
addressT addr;
offsetT val;
@@ -10543,7 +16801,7 @@ relax_branch (fragS *fragp, asection *sec, int bits)
|| sec != S_GET_SEGMENT (fragp->fr_symbol))
return 4;
- val = S_GET_VALUE(fragp->fr_symbol) + fragp->fr_offset;
+ val = relaxed_symbol_addr(fragp, stretch);
addr = fragp->fr_address + fragp->fr_fix + 4;
val -= addr;
@@ -10559,7 +16817,7 @@ relax_branch (fragS *fragp, asection *sec, int bits)
the current size of the frag should change. */
int
-arm_relax_frag (asection *sec, fragS *fragp, long stretch ATTRIBUTE_UNUSED)
+arm_relax_frag (asection *sec, fragS *fragp, long stretch)
{
int oldsize;
int newsize;
@@ -10568,7 +16826,7 @@ arm_relax_frag (asection *sec, fragS *fragp, long stretch ATTRIBUTE_UNUSED)
switch (fragp->fr_subtype)
{
case T_MNEM_ldr_pc2:
- newsize = relax_adr(fragp, sec);
+ newsize = relax_adr(fragp, sec, stretch);
break;
case T_MNEM_ldr_pc:
case T_MNEM_ldr_sp:
@@ -10588,7 +16846,7 @@ arm_relax_frag (asection *sec, fragS *fragp, long stretch ATTRIBUTE_UNUSED)
newsize = relax_immediate(fragp, 5, 0);
break;
case T_MNEM_adr:
- newsize = relax_adr(fragp, sec);
+ newsize = relax_adr(fragp, sec, stretch);
break;
case T_MNEM_mov:
case T_MNEM_movs:
@@ -10597,10 +16855,10 @@ arm_relax_frag (asection *sec, fragS *fragp, long stretch ATTRIBUTE_UNUSED)
newsize = relax_immediate(fragp, 8, 0);
break;
case T_MNEM_b:
- newsize = relax_branch(fragp, sec, 11);
+ newsize = relax_branch(fragp, sec, 11, stretch);
break;
case T_MNEM_bcond:
- newsize = relax_branch(fragp, sec, 8);
+ newsize = relax_branch(fragp, sec, 8, stretch);
break;
case T_MNEM_add_sp:
case T_MNEM_add_pc:
@@ -10619,14 +16877,18 @@ arm_relax_frag (asection *sec, fragS *fragp, long stretch ATTRIBUTE_UNUSED)
default:
abort();
}
- if (newsize < 0)
+
+ fragp->fr_var = newsize;
+ /* Freeze wide instructions that are at or before the same location as
+ in the previous pass. This avoids infinite loops.
+ Don't freeze them unconditionally because targets may be artificialy
+ misaligned by the expansion of preceeding frags. */
+ if (stretch <= 0 && newsize > 2)
{
- fragp->fr_var = -newsize;
md_convert_frag (sec->owner, sec, fragp);
frag_wane(fragp);
- return -(newsize + oldsize);
}
- fragp->fr_var = newsize;
+
return newsize - oldsize;
}
@@ -10636,12 +16898,22 @@ valueT
md_section_align (segT segment ATTRIBUTE_UNUSED,
valueT size)
{
-#ifdef OBJ_ELF
- return size;
-#else
- /* Round all sects to multiple of 4. */
- return (size + 3) & ~3;
+#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
+ if (OUTPUT_FLAVOR == bfd_target_aout_flavour)
+ {
+ /* For a.out, force the section size to be aligned. If we don't do
+ this, BFD will align it for us, but it will not write out the
+ final bytes of the section. This may be a bug in BFD, but it is
+ easier to fix it here since that is how the other a.out targets
+ work. */
+ int align;
+
+ align = bfd_get_section_alignment (stdoutput, segment);
+ size = ((size + (1 << align) - 1) & ((valueT) -1 << align));
+ }
#endif
+
+ return size;
}
/* This is called from HANDLE_ALIGN in write.c. Fill in the contents
@@ -10893,7 +17165,7 @@ finish_unwind_opcodes (void)
if (unwind.fp_used)
{
- /* Adjust sp as neccessary. */
+ /* Adjust sp as necessary. */
unwind.pending_offset += unwind.fp_offset - unwind.frame_size;
flush_pending_unwind ();
@@ -11141,12 +17413,22 @@ create_unwind_entry (int have_data)
return 0;
}
+
+/* Initialize the DWARF-2 unwind information for this procedure. */
+
+void
+tc_arm_frame_initial_instructions (void)
+{
+ cfi_add_CFA_def_cfa (REG_SP, 0);
+}
+#endif /* OBJ_ELF */
+
/* Convert REGNAME to a DWARF-2 register number. */
int
-tc_arm_regname_to_dw2regnum (const char *regname)
+tc_arm_regname_to_dw2regnum (char *regname)
{
- int reg = arm_reg_parse ((char **) &regname, REG_TYPE_RN);
+ int reg = arm_reg_parse (&regname, REG_TYPE_RN);
if (reg == FAIL)
return -1;
@@ -11154,15 +17436,18 @@ tc_arm_regname_to_dw2regnum (const char *regname)
return reg;
}
-/* Initialize the DWARF-2 unwind information for this procedure. */
-
+#ifdef TE_PE
void
-tc_arm_frame_initial_instructions (void)
+tc_pe_dwarf2_emit_offset (symbolS *symbol, unsigned int size)
{
- cfi_add_CFA_def_cfa (REG_SP, 0);
-}
-#endif /* OBJ_ELF */
+ expressionS expr;
+ expr.X_op = O_secrel;
+ expr.X_add_symbol = symbol;
+ expr.X_add_number = 0;
+ emit_expr (&expr, size);
+}
+#endif
/* MD interface: Symbol and relocation handling. */
@@ -11179,10 +17464,16 @@ md_pcrel_from_section (fixS * fixP, segT seg)
/* If this is pc-relative and we are going to emit a relocation
then we just want to put out any pipeline compensation that the linker
- will need. Otherwise we want to use the calculated base. */
+ will need. Otherwise we want to use the calculated base.
+ For WinCE we skip the bias for externals as well, since this
+ is how the MS ARM-CE assembler behaves and we want to be compatible. */
if (fixP->fx_pcrel
&& ((fixP->fx_addsy && S_GET_SEGMENT (fixP->fx_addsy) != seg)
- || arm_force_relocation (fixP)))
+ || (arm_force_relocation (fixP)
+#ifdef TE_WINCE
+ && !S_IS_EXTERNAL (fixP->fx_addsy)
+#endif
+ )))
base = 0;
switch (fixP->fx_r_type)
@@ -11219,6 +17510,17 @@ md_pcrel_from_section (fixS * fixP, segT seg)
case BFD_RELOC_ARM_PCREL_BLX:
case BFD_RELOC_ARM_PLT32:
#ifdef TE_WINCE
+ /* When handling fixups immediately, because we have already
+ discovered the value of a symbol, or the address of the frag involved
+ we must account for the offset by +8, as the OS loader will never see the reloc.
+ see fixup_segment() in write.c
+ The S_IS_EXTERNAL test handles the case of global symbols.
+ Those need the calculated base, not just the pipe compensation the linker will need. */
+ if (fixP->fx_pcrel
+ && fixP->fx_addsy != NULL
+ && (S_GET_SEGMENT (fixP->fx_addsy) == seg)
+ && (S_IS_EXTERNAL (fixP->fx_addsy) || !arm_force_relocation (fixP)))
+ return base + 8;
return base;
#else
return base + 8;
@@ -11406,11 +17708,11 @@ negate_data_op (unsigned long * instruction,
/* Like negate_data_op, but for Thumb-2. */
static unsigned int
-thumb32_negate_data_op (offsetT *instruction, offsetT value)
+thumb32_negate_data_op (offsetT *instruction, unsigned int value)
{
int op, new_inst;
int rd;
- offsetT negated, inverted;
+ unsigned int negated, inverted;
negated = encode_thumb32_immediate (-value);
inverted = encode_thumb32_immediate (~value);
@@ -11471,7 +17773,7 @@ thumb32_negate_data_op (offsetT *instruction, offsetT value)
return FAIL;
}
- if (value == FAIL)
+ if (value == (unsigned int)FAIL)
return FAIL;
*instruction &= T2_OPCODE_MASK;
@@ -11528,6 +17830,7 @@ md_apply_fix (fixS * fixP,
assert (fixP->fx_r_type <= BFD_RELOC_UNUSED);
/* Note whether this will delete the relocation. */
+
if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
fixP->fx_done = 1;
@@ -11676,7 +17979,7 @@ md_apply_fix (fixS * fixP,
as_bad_where (fixP->fx_file, fixP->fx_line,
_("invalid literal constant: pool needs to be closer"));
else
- as_bad (_("bad immediate value for half-word offset (%ld)"),
+ as_bad (_("bad immediate value for 8-bit offset (%ld)"),
(long) value);
break;
}
@@ -11835,6 +18138,7 @@ md_apply_fix (fixS * fixP,
break;
case BFD_RELOC_ARM_T32_IMMEDIATE:
+ case BFD_RELOC_ARM_T32_ADD_IMM:
case BFD_RELOC_ARM_T32_IMM12:
case BFD_RELOC_ARM_T32_ADD_PC12:
/* We claim that this fixup has been processed here,
@@ -11855,15 +18159,21 @@ md_apply_fix (fixS * fixP,
newval <<= 16;
newval |= md_chars_to_number (buf+2, THUMB_SIZE);
- /* FUTURE: Implement analogue of negate_data_op for T32. */
- if (fixP->fx_r_type == BFD_RELOC_ARM_T32_IMMEDIATE)
+ newimm = FAIL;
+ if (fixP->fx_r_type == BFD_RELOC_ARM_T32_IMMEDIATE
+ || fixP->fx_r_type == BFD_RELOC_ARM_T32_ADD_IMM)
{
newimm = encode_thumb32_immediate (value);
if (newimm == (unsigned int) FAIL)
newimm = thumb32_negate_data_op (&newval, value);
}
- else
+ if (fixP->fx_r_type != BFD_RELOC_ARM_T32_IMMEDIATE
+ && newimm == (unsigned int) FAIL)
{
+ /* Turn add/sum into addw/subw. */
+ if (fixP->fx_r_type == BFD_RELOC_ARM_T32_ADD_IMM)
+ newval = (newval & 0xfeffffff) | 0x02000000;
+
/* 12 bit immediate for addw/subw. */
if (value < 0)
{
@@ -11977,18 +18287,34 @@ md_apply_fix (fixS * fixP,
}
break;
- case BFD_RELOC_THUMB_PCREL_BRANCH7: /* CZB */
- /* CZB can only branch forward. */
- if (value & ~0x7e)
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("branch out of range"));
+ case BFD_RELOC_THUMB_PCREL_BRANCH7: /* CBZ */
+ /* CBZ can only branch forward. */
- if (fixP->fx_done || !seg->use_rela_p)
+ /* Attempts to use CBZ to branch to the next instruction
+ (which, strictly speaking, are prohibited) will be turned into
+ no-ops.
+
+ FIXME: It may be better to remove the instruction completely and
+ perform relaxation. */
+ if (value == -2)
{
newval = md_chars_to_number (buf, THUMB_SIZE);
- newval |= ((value & 0x3e) << 2) | ((value & 0x40) << 3);
+ newval = 0xbf00; /* NOP encoding T1 */
md_number_to_chars (buf, newval, THUMB_SIZE);
}
+ else
+ {
+ if (value & ~0x7e)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("branch out of range"));
+
+ if (fixP->fx_done || !seg->use_rela_p)
+ {
+ newval = md_chars_to_number (buf, THUMB_SIZE);
+ newval |= ((value & 0x3e) << 2) | ((value & 0x40) << 3);
+ md_number_to_chars (buf, newval, THUMB_SIZE);
+ }
+ }
break;
case BFD_RELOC_THUMB_PCREL_BRANCH9: /* Conditional branch. */
@@ -12129,8 +18455,15 @@ md_apply_fix (fixS * fixP,
case BFD_RELOC_ARM_ROSEGREL32:
case BFD_RELOC_ARM_SBREL32:
case BFD_RELOC_32_PCREL:
+#ifdef TE_PE
+ case BFD_RELOC_32_SECREL:
+#endif
if (fixP->fx_done || !seg->use_rela_p)
- md_number_to_chars (buf, value, 4);
+#ifdef TE_WINCE
+ /* For WinCE we only do this for pcrel fixups. */
+ if (fixP->fx_done || fixP->fx_pcrel)
+#endif
+ md_number_to_chars (buf, value, 4);
break;
#ifdef OBJ_ELF
@@ -12165,8 +18498,6 @@ md_apply_fix (fixS * fixP,
newval = get_thumb32_insn (buf);
newval &= 0xff7fff00;
newval |= (value >> 2) | (sign ? INDEX_UP : 0);
- if (value == 0)
- newval &= ~WRITE_BACK;
if (fixP->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM
|| fixP->fx_r_type == BFD_RELOC_ARM_CP_OFF_IMM_S2)
md_number_to_chars (buf, newval, INSN_SIZE);
@@ -12358,6 +18689,216 @@ md_apply_fix (fixS * fixP,
fixP->fx_done = 0;
return;
+ case BFD_RELOC_ARM_MOVW:
+ case BFD_RELOC_ARM_MOVT:
+ case BFD_RELOC_ARM_THUMB_MOVW:
+ case BFD_RELOC_ARM_THUMB_MOVT:
+ if (fixP->fx_done || !seg->use_rela_p)
+ {
+ /* REL format relocations are limited to a 16-bit addend. */
+ if (!fixP->fx_done)
+ {
+ if (value < -0x1000 || value > 0xffff)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("offset too big"));
+ }
+ else if (fixP->fx_r_type == BFD_RELOC_ARM_MOVT
+ || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVT)
+ {
+ value >>= 16;
+ }
+
+ if (fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVW
+ || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVT)
+ {
+ newval = get_thumb32_insn (buf);
+ newval &= 0xfbf08f00;
+ newval |= (value & 0xf000) << 4;
+ newval |= (value & 0x0800) << 15;
+ newval |= (value & 0x0700) << 4;
+ newval |= (value & 0x00ff);
+ put_thumb32_insn (buf, newval);
+ }
+ else
+ {
+ newval = md_chars_to_number (buf, 4);
+ newval &= 0xfff0f000;
+ newval |= value & 0x0fff;
+ newval |= (value & 0xf000) << 4;
+ md_number_to_chars (buf, newval, 4);
+ }
+ }
+ return;
+
+ case BFD_RELOC_ARM_ALU_PC_G0_NC:
+ case BFD_RELOC_ARM_ALU_PC_G0:
+ case BFD_RELOC_ARM_ALU_PC_G1_NC:
+ case BFD_RELOC_ARM_ALU_PC_G1:
+ case BFD_RELOC_ARM_ALU_PC_G2:
+ case BFD_RELOC_ARM_ALU_SB_G0_NC:
+ case BFD_RELOC_ARM_ALU_SB_G0:
+ case BFD_RELOC_ARM_ALU_SB_G1_NC:
+ case BFD_RELOC_ARM_ALU_SB_G1:
+ case BFD_RELOC_ARM_ALU_SB_G2:
+ assert (!fixP->fx_done);
+ if (!seg->use_rela_p)
+ {
+ bfd_vma insn;
+ bfd_vma encoded_addend;
+ bfd_vma addend_abs = abs (value);
+
+ /* Check that the absolute value of the addend can be
+ expressed as an 8-bit constant plus a rotation. */
+ encoded_addend = encode_arm_immediate (addend_abs);
+ if (encoded_addend == (unsigned int) FAIL)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("the offset 0x%08lX is not representable"),
+ (unsigned long) addend_abs);
+
+ /* Extract the instruction. */
+ insn = md_chars_to_number (buf, INSN_SIZE);
+
+ /* If the addend is positive, use an ADD instruction.
+ Otherwise use a SUB. Take care not to destroy the S bit. */
+ insn &= 0xff1fffff;
+ if (value < 0)
+ insn |= 1 << 22;
+ else
+ insn |= 1 << 23;
+
+ /* Place the encoded addend into the first 12 bits of the
+ instruction. */
+ insn &= 0xfffff000;
+ insn |= encoded_addend;
+
+ /* Update the instruction. */
+ md_number_to_chars (buf, insn, INSN_SIZE);
+ }
+ break;
+
+ case BFD_RELOC_ARM_LDR_PC_G0:
+ case BFD_RELOC_ARM_LDR_PC_G1:
+ case BFD_RELOC_ARM_LDR_PC_G2:
+ case BFD_RELOC_ARM_LDR_SB_G0:
+ case BFD_RELOC_ARM_LDR_SB_G1:
+ case BFD_RELOC_ARM_LDR_SB_G2:
+ assert (!fixP->fx_done);
+ if (!seg->use_rela_p)
+ {
+ bfd_vma insn;
+ bfd_vma addend_abs = abs (value);
+
+ /* Check that the absolute value of the addend can be
+ encoded in 12 bits. */
+ if (addend_abs >= 0x1000)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("bad offset 0x%08lX (only 12 bits available for the magnitude)"),
+ (unsigned long) addend_abs);
+
+ /* Extract the instruction. */
+ insn = md_chars_to_number (buf, INSN_SIZE);
+
+ /* If the addend is negative, clear bit 23 of the instruction.
+ Otherwise set it. */
+ if (value < 0)
+ insn &= ~(1 << 23);
+ else
+ insn |= 1 << 23;
+
+ /* Place the absolute value of the addend into the first 12 bits
+ of the instruction. */
+ insn &= 0xfffff000;
+ insn |= addend_abs;
+
+ /* Update the instruction. */
+ md_number_to_chars (buf, insn, INSN_SIZE);
+ }
+ break;
+
+ case BFD_RELOC_ARM_LDRS_PC_G0:
+ case BFD_RELOC_ARM_LDRS_PC_G1:
+ case BFD_RELOC_ARM_LDRS_PC_G2:
+ case BFD_RELOC_ARM_LDRS_SB_G0:
+ case BFD_RELOC_ARM_LDRS_SB_G1:
+ case BFD_RELOC_ARM_LDRS_SB_G2:
+ assert (!fixP->fx_done);
+ if (!seg->use_rela_p)
+ {
+ bfd_vma insn;
+ bfd_vma addend_abs = abs (value);
+
+ /* Check that the absolute value of the addend can be
+ encoded in 8 bits. */
+ if (addend_abs >= 0x100)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("bad offset 0x%08lX (only 8 bits available for the magnitude)"),
+ (unsigned long) addend_abs);
+
+ /* Extract the instruction. */
+ insn = md_chars_to_number (buf, INSN_SIZE);
+
+ /* If the addend is negative, clear bit 23 of the instruction.
+ Otherwise set it. */
+ if (value < 0)
+ insn &= ~(1 << 23);
+ else
+ insn |= 1 << 23;
+
+ /* Place the first four bits of the absolute value of the addend
+ into the first 4 bits of the instruction, and the remaining
+ four into bits 8 .. 11. */
+ insn &= 0xfffff0f0;
+ insn |= (addend_abs & 0xf) | ((addend_abs & 0xf0) << 4);
+
+ /* Update the instruction. */
+ md_number_to_chars (buf, insn, INSN_SIZE);
+ }
+ break;
+
+ case BFD_RELOC_ARM_LDC_PC_G0:
+ case BFD_RELOC_ARM_LDC_PC_G1:
+ case BFD_RELOC_ARM_LDC_PC_G2:
+ case BFD_RELOC_ARM_LDC_SB_G0:
+ case BFD_RELOC_ARM_LDC_SB_G1:
+ case BFD_RELOC_ARM_LDC_SB_G2:
+ assert (!fixP->fx_done);
+ if (!seg->use_rela_p)
+ {
+ bfd_vma insn;
+ bfd_vma addend_abs = abs (value);
+
+ /* Check that the absolute value of the addend is a multiple of
+ four and, when divided by four, fits in 8 bits. */
+ if (addend_abs & 0x3)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("bad offset 0x%08lX (must be word-aligned)"),
+ (unsigned long) addend_abs);
+
+ if ((addend_abs >> 2) > 0xff)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("bad offset 0x%08lX (must be an 8-bit number of words)"),
+ (unsigned long) addend_abs);
+
+ /* Extract the instruction. */
+ insn = md_chars_to_number (buf, INSN_SIZE);
+
+ /* If the addend is negative, clear bit 23 of the instruction.
+ Otherwise set it. */
+ if (value < 0)
+ insn &= ~(1 << 23);
+ else
+ insn |= 1 << 23;
+
+ /* Place the addend (divided by four) into the first eight
+ bits of the instruction. */
+ insn &= 0xfffffff0;
+ insn |= addend_abs >> 2;
+
+ /* Update the instruction. */
+ md_number_to_chars (buf, insn, INSN_SIZE);
+ }
+ break;
+
case BFD_RELOC_UNUSED:
default:
as_bad_where (fixP->fx_file, fixP->fx_line,
@@ -12412,6 +18953,34 @@ tc_gen_reloc (asection *section, fixS *fixp)
break;
}
+ case BFD_RELOC_ARM_MOVW:
+ if (fixp->fx_pcrel)
+ {
+ code = BFD_RELOC_ARM_MOVW_PCREL;
+ break;
+ }
+
+ case BFD_RELOC_ARM_MOVT:
+ if (fixp->fx_pcrel)
+ {
+ code = BFD_RELOC_ARM_MOVT_PCREL;
+ break;
+ }
+
+ case BFD_RELOC_ARM_THUMB_MOVW:
+ if (fixp->fx_pcrel)
+ {
+ code = BFD_RELOC_ARM_THUMB_MOVW_PCREL;
+ break;
+ }
+
+ case BFD_RELOC_ARM_THUMB_MOVT:
+ if (fixp->fx_pcrel)
+ {
+ code = BFD_RELOC_ARM_THUMB_MOVT_PCREL;
+ break;
+ }
+
case BFD_RELOC_NONE:
case BFD_RELOC_ARM_PCREL_BRANCH:
case BFD_RELOC_ARM_PCREL_BLX:
@@ -12425,6 +18994,9 @@ tc_gen_reloc (asection *section, fixS *fixp)
case BFD_RELOC_THUMB_PCREL_BLX:
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
+#ifdef TE_PE
+ case BFD_RELOC_32_SECREL:
+#endif
code = fixp->fx_r_type;
break;
@@ -12449,6 +19021,34 @@ tc_gen_reloc (asection *section, fixS *fixp)
case BFD_RELOC_ARM_TLS_LDO32:
case BFD_RELOC_ARM_PCREL_CALL:
case BFD_RELOC_ARM_PCREL_JUMP:
+ case BFD_RELOC_ARM_ALU_PC_G0_NC:
+ case BFD_RELOC_ARM_ALU_PC_G0:
+ case BFD_RELOC_ARM_ALU_PC_G1_NC:
+ case BFD_RELOC_ARM_ALU_PC_G1:
+ case BFD_RELOC_ARM_ALU_PC_G2:
+ case BFD_RELOC_ARM_LDR_PC_G0:
+ case BFD_RELOC_ARM_LDR_PC_G1:
+ case BFD_RELOC_ARM_LDR_PC_G2:
+ case BFD_RELOC_ARM_LDRS_PC_G0:
+ case BFD_RELOC_ARM_LDRS_PC_G1:
+ case BFD_RELOC_ARM_LDRS_PC_G2:
+ case BFD_RELOC_ARM_LDC_PC_G0:
+ case BFD_RELOC_ARM_LDC_PC_G1:
+ case BFD_RELOC_ARM_LDC_PC_G2:
+ case BFD_RELOC_ARM_ALU_SB_G0_NC:
+ case BFD_RELOC_ARM_ALU_SB_G0:
+ case BFD_RELOC_ARM_ALU_SB_G1_NC:
+ case BFD_RELOC_ARM_ALU_SB_G1:
+ case BFD_RELOC_ARM_ALU_SB_G2:
+ case BFD_RELOC_ARM_LDR_SB_G0:
+ case BFD_RELOC_ARM_LDR_SB_G1:
+ case BFD_RELOC_ARM_LDR_SB_G2:
+ case BFD_RELOC_ARM_LDRS_SB_G0:
+ case BFD_RELOC_ARM_LDRS_SB_G1:
+ case BFD_RELOC_ARM_LDRS_SB_G2:
+ case BFD_RELOC_ARM_LDC_SB_G0:
+ case BFD_RELOC_ARM_LDC_SB_G1:
+ case BFD_RELOC_ARM_LDC_SB_G2:
code = fixp->fx_r_type;
break;
@@ -12579,6 +19179,14 @@ cons_fix_new_arm (fragS * frag,
break;
}
+#ifdef TE_PE
+ if (exp->X_op == O_secrel)
+ {
+ exp->X_op = O_symbol;
+ type = BFD_RELOC_32_SECREL;
+ }
+#endif
+
fix_new_exp (frag, where, (int) size, exp, pcrel, type);
}
@@ -12612,34 +19220,31 @@ arm_force_relocation (struct fix * fixp)
if (fixp->fx_r_type == BFD_RELOC_ARM_IMMEDIATE
|| fixp->fx_r_type == BFD_RELOC_ARM_OFFSET_IMM
|| fixp->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE
+ || fixp->fx_r_type == BFD_RELOC_ARM_T32_ADD_IMM
|| fixp->fx_r_type == BFD_RELOC_ARM_T32_IMMEDIATE
|| fixp->fx_r_type == BFD_RELOC_ARM_T32_IMM12
|| fixp->fx_r_type == BFD_RELOC_ARM_T32_ADD_PC12)
return 0;
- return generic_force_reloc (fixp);
-}
-
-#ifdef OBJ_COFF
-/* This is a little hack to help the gas/arm/adrl.s test. It prevents
- local labels from being added to the output symbol table when they
- are used with the ADRL pseudo op. The ADRL relocation should always
- be resolved before the binbary is emitted, so it is safe to say that
- it is adjustable. */
+ /* Always leave these relocations for the linker. */
+ if ((fixp->fx_r_type >= BFD_RELOC_ARM_ALU_PC_G0_NC
+ && fixp->fx_r_type <= BFD_RELOC_ARM_LDC_SB_G2)
+ || fixp->fx_r_type == BFD_RELOC_ARM_LDR_PC_G0)
+ return 1;
-bfd_boolean
-arm_fix_adjustable (fixS * fixP)
-{
- if (fixP->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE)
+ /* Always generate relocations against function symbols. */
+ if (fixp->fx_r_type == BFD_RELOC_32
+ && fixp->fx_addsy
+ && (symbol_get_bfdsym (fixp->fx_addsy)->flags & BSF_FUNCTION))
return 1;
- return 0;
+
+ return generic_force_reloc (fixp);
}
-#endif
-#ifdef OBJ_ELF
-/* Relocations against Thumb function names must be left unadjusted,
- so that the linker can use this information to correctly set the
- bottom bit of their addresses. The MIPS version of this function
+#if defined (OBJ_ELF) || defined (OBJ_COFF)
+/* Relocations against function names must be left unadjusted,
+ so that the linker can use this information to generate interworking
+ stubs. The MIPS version of this function
also prevents relocations that are mips-16 specific, but I do not
know why it does this.
@@ -12656,6 +19261,10 @@ arm_fix_adjustable (fixS * fixP)
if (fixP->fx_addsy == NULL)
return 1;
+ /* Preserve relocations against symbols with function type. */
+ if (symbol_get_bfdsym (fixP->fx_addsy)->flags & BSF_FUNCTION)
+ return 0;
+
if (THUMB_IS_FUNC (fixP->fx_addsy)
&& fixP->fx_subsy == NULL)
return 0;
@@ -12677,8 +19286,17 @@ arm_fix_adjustable (fixS * fixP)
|| fixP->fx_r_type == BFD_RELOC_ARM_TARGET2)
return 0;
+ /* Similarly for group relocations. */
+ if ((fixP->fx_r_type >= BFD_RELOC_ARM_ALU_PC_G0_NC
+ && fixP->fx_r_type <= BFD_RELOC_ARM_LDC_SB_G2)
+ || fixP->fx_r_type == BFD_RELOC_ARM_LDR_PC_G0)
+ return 0;
+
return 1;
}
+#endif /* defined (OBJ_ELF) || defined (OBJ_COFF) */
+
+#ifdef OBJ_ELF
const char *
elf32_arm_target_format (void)
@@ -12789,14 +19407,15 @@ arm_adjust_symtab (void)
elf_sym = elf_symbol (symbol_get_bfdsym (sym));
bind = ELF_ST_BIND (elf_sym->internal_elf_sym.st_info);
- if (! bfd_is_arm_mapping_symbol_name (elf_sym->symbol.name))
+ if (! bfd_is_arm_special_symbol_name (elf_sym->symbol.name,
+ BFD_ARM_SPECIAL_SYM_TYPE_ANY))
{
/* If it's a .thumb_func, declare it as so,
otherwise tag label as .code 16. */
if (THUMB_IS_FUNC (sym))
elf_sym->internal_elf_sym.st_info =
ELF_ST_INFO (bind, STT_ARM_TFUNC);
- else
+ else if (EF_ARM_EABI_VERSION (meabi_flags) < EF_ARM_EABI_VER4)
elf_sym->internal_elf_sym.st_info =
ELF_ST_INFO (bind, STT_ARM_16BIT);
}
@@ -12817,6 +19436,16 @@ set_constant_flonums (void)
abort ();
}
+/* Auto-select Thumb mode if it's the only available instruction set for the
+ given architecture. */
+
+static void
+autoselect_thumb_from_cpu_variant (void)
+{
+ if (!ARM_CPU_HAS_FEATURE (cpu_variant, arm_ext_v1))
+ opcode_select (16);
+}
+
void
md_begin (void)
{
@@ -12894,9 +19523,9 @@ md_begin (void)
if (!mfpu_opt)
{
- if (!mcpu_cpu_opt)
+ if (mcpu_cpu_opt != NULL)
mfpu_opt = &fpu_default;
- else if (ARM_CPU_HAS_FEATURE (*mcpu_fpu_opt, arm_ext_v5))
+ else if (mcpu_fpu_opt != NULL && ARM_CPU_HAS_FEATURE (*mcpu_fpu_opt, arm_ext_v5))
mfpu_opt = &fpu_arch_vfp_v2;
else
mfpu_opt = &fpu_arch_fpa;
@@ -12917,6 +19546,8 @@ md_begin (void)
ARM_MERGE_FEATURE_SETS (cpu_variant, *mcpu_cpu_opt, *mfpu_opt);
+ autoselect_thumb_from_cpu_variant ();
+
arm_arch_used = thumb_arch_used = arm_arch_none;
#if defined OBJ_COFF || defined OBJ_ELF
@@ -12992,7 +19623,9 @@ md_begin (void)
#endif
/* Record the CPU type as well. */
- if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_cext_iwmmxt))
+ if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_cext_iwmmxt2))
+ mach = bfd_mach_arm_iWMMXt2;
+ else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_cext_iwmmxt))
mach = bfd_mach_arm_iWMMXt;
else if (ARM_CPU_HAS_FEATURE (cpu_variant, arm_cext_xscale))
mach = bfd_mach_arm_XScale;
@@ -13362,13 +19995,16 @@ static const struct arm_cpu_option_table arm_cpus[] =
{"arm1156t2f-s", ARM_ARCH_V6T2, FPU_ARCH_VFP_V2, NULL},
{"arm1176jz-s", ARM_ARCH_V6ZK, FPU_NONE, NULL},
{"arm1176jzf-s", ARM_ARCH_V6ZK, FPU_ARCH_VFP_V2, NULL},
- {"cortex-a8", ARM_ARCH_V7A, FPU_ARCH_VFP_V2, NULL},
+ {"cortex-a8", ARM_ARCH_V7A, ARM_FEATURE(0, FPU_VFP_V3
+ | FPU_NEON_EXT_V1),
+ NULL},
{"cortex-r4", ARM_ARCH_V7R, FPU_NONE, NULL},
{"cortex-m3", ARM_ARCH_V7M, FPU_NONE, NULL},
/* ??? XSCALE is really an architecture. */
{"xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2, NULL},
/* ??? iwmmxt is not a processor. */
{"iwmmxt", ARM_ARCH_IWMMXT, FPU_ARCH_VFP_V2, NULL},
+ {"iwmmxt2", ARM_ARCH_IWMMXT2,FPU_ARCH_VFP_V2, NULL},
{"i80200", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2, NULL},
/* Maverick */
{"ep9312", ARM_FEATURE(ARM_AEXT_V4T, ARM_CEXT_MAVERICK), FPU_ARCH_MAVERICK, "ARM920T"},
@@ -13413,11 +20049,17 @@ static const struct arm_arch_option_table arm_archs[] =
{"armv6zt2", ARM_ARCH_V6ZT2, FPU_ARCH_VFP},
{"armv6zkt2", ARM_ARCH_V6ZKT2, FPU_ARCH_VFP},
{"armv7", ARM_ARCH_V7, FPU_ARCH_VFP},
+ /* The official spelling of the ARMv7 profile variants is the dashed form.
+ Accept the non-dashed form for compatibility with old toolchains. */
{"armv7a", ARM_ARCH_V7A, FPU_ARCH_VFP},
{"armv7r", ARM_ARCH_V7R, FPU_ARCH_VFP},
{"armv7m", ARM_ARCH_V7M, FPU_ARCH_VFP},
+ {"armv7-a", ARM_ARCH_V7A, FPU_ARCH_VFP},
+ {"armv7-r", ARM_ARCH_V7R, FPU_ARCH_VFP},
+ {"armv7-m", ARM_ARCH_V7M, FPU_ARCH_VFP},
{"xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP},
{"iwmmxt", ARM_ARCH_IWMMXT, FPU_ARCH_VFP},
+ {"iwmmxt2", ARM_ARCH_IWMMXT2,FPU_ARCH_VFP},
{NULL, ARM_ARCH_NONE, ARM_ARCH_NONE}
};
@@ -13433,6 +20075,7 @@ static const struct arm_option_cpu_value_table arm_extensions[] =
{"maverick", ARM_FEATURE (0, ARM_CEXT_MAVERICK)},
{"xscale", ARM_FEATURE (0, ARM_CEXT_XSCALE)},
{"iwmmxt", ARM_FEATURE (0, ARM_CEXT_IWMMXT)},
+ {"iwmmxt2", ARM_FEATURE (0, ARM_CEXT_IWMMXT2)},
{NULL, ARM_ARCH_NONE}
};
@@ -13452,6 +20095,7 @@ static const struct arm_option_cpu_value_table arm_fpus[] =
{"softvfp+vfp", FPU_ARCH_VFP_V2},
{"vfp", FPU_ARCH_VFP_V2},
{"vfp9", FPU_ARCH_VFP_V2},
+ {"vfp3", FPU_ARCH_VFP_V3},
{"vfp10", FPU_ARCH_VFP_V2},
{"vfp10-r0", FPU_ARCH_VFP_V1},
{"vfpxd", FPU_ARCH_VFP_V1xD},
@@ -13460,6 +20104,7 @@ static const struct arm_option_cpu_value_table arm_fpus[] =
{"arm1136jfs", FPU_ARCH_VFP_V2},
{"arm1136jf-s", FPU_ARCH_VFP_V2},
{"maverick", FPU_ARCH_MAVERICK},
+ {"neon", FPU_ARCH_VFP_V3_PLUS_NEON_V1},
{NULL, ARM_ARCH_NONE}
};
@@ -13855,7 +20500,13 @@ aeabi_set_public_attributes (void)
ARM_MERGE_FEATURE_SETS (flags, arm_arch_used, thumb_arch_used);
ARM_MERGE_FEATURE_SETS (flags, flags, *mfpu_opt);
ARM_MERGE_FEATURE_SETS (flags, flags, selected_cpu);
-
+ /*Allow the user to override the reported architecture. */
+ if (object_arch)
+ {
+ ARM_CLEAR_FEATURE (flags, flags, arm_arch_any);
+ ARM_MERGE_FEATURE_SETS (flags, flags, *object_arch);
+ }
+
tmp = flags;
arch = 0;
for (p = cpu_arch_ver; p->val; p++)
@@ -13881,57 +20532,56 @@ aeabi_set_public_attributes (void)
for (i = 0; p[i]; i++)
p[i] = TOUPPER (p[i]);
}
- elf32_arm_add_eabi_attr_string (stdoutput, 5, p);
+ bfd_elf_add_proc_attr_string (stdoutput, 5, p);
}
/* Tag_CPU_arch. */
- elf32_arm_add_eabi_attr_int (stdoutput, 6, arch);
+ bfd_elf_add_proc_attr_int (stdoutput, 6, arch);
/* Tag_CPU_arch_profile. */
if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7a))
- elf32_arm_add_eabi_attr_int (stdoutput, 7, 'A');
+ bfd_elf_add_proc_attr_int (stdoutput, 7, 'A');
else if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7r))
- elf32_arm_add_eabi_attr_int (stdoutput, 7, 'R');
+ bfd_elf_add_proc_attr_int (stdoutput, 7, 'R');
else if (ARM_CPU_HAS_FEATURE (flags, arm_ext_v7m))
- elf32_arm_add_eabi_attr_int (stdoutput, 7, 'M');
+ bfd_elf_add_proc_attr_int (stdoutput, 7, 'M');
/* Tag_ARM_ISA_use. */
if (ARM_CPU_HAS_FEATURE (arm_arch_used, arm_arch_full))
- elf32_arm_add_eabi_attr_int (stdoutput, 8, 1);
+ bfd_elf_add_proc_attr_int (stdoutput, 8, 1);
/* Tag_THUMB_ISA_use. */
if (ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_arch_full))
- elf32_arm_add_eabi_attr_int (stdoutput, 9,
+ bfd_elf_add_proc_attr_int (stdoutput, 9,
ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_arch_t2) ? 2 : 1);
/* Tag_VFP_arch. */
- if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_arch_vfp_v2)
- || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_arch_vfp_v2))
- elf32_arm_add_eabi_attr_int (stdoutput, 10, 2);
- else if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_arch_vfp_v1)
- || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_arch_vfp_v1))
- elf32_arm_add_eabi_attr_int (stdoutput, 10, 1);
+ if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_v3)
+ || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_v3))
+ bfd_elf_add_proc_attr_int (stdoutput, 10, 3);
+ else if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_v2)
+ || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_v2))
+ bfd_elf_add_proc_attr_int (stdoutput, 10, 2);
+ else if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_v1)
+ || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_v1)
+ || ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_vfp_ext_v1xd)
+ || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_vfp_ext_v1xd))
+ bfd_elf_add_proc_attr_int (stdoutput, 10, 1);
/* Tag_WMMX_arch. */
if (ARM_CPU_HAS_FEATURE (thumb_arch_used, arm_cext_iwmmxt)
|| ARM_CPU_HAS_FEATURE (arm_arch_used, arm_cext_iwmmxt))
- elf32_arm_add_eabi_attr_int (stdoutput, 11, 1);
+ bfd_elf_add_proc_attr_int (stdoutput, 11, 1);
+ /* Tag_NEON_arch. */
+ if (ARM_CPU_HAS_FEATURE (thumb_arch_used, fpu_neon_ext_v1)
+ || ARM_CPU_HAS_FEATURE (arm_arch_used, fpu_neon_ext_v1))
+ bfd_elf_add_proc_attr_int (stdoutput, 12, 1);
}
-/* Add the .ARM.attributes section. */
+/* Add the default contents for the .ARM.attributes section. */
void
arm_md_end (void)
{
- segT s;
- char *p;
- addressT addr;
- offsetT size;
-
if (EF_ARM_EABI_VERSION (meabi_flags) < EF_ARM_EABI_VER4)
return;
aeabi_set_public_attributes ();
- size = elf32_arm_eabi_attr_size (stdoutput);
- s = subseg_new (".ARM.attributes", 0);
- bfd_set_section_flags (stdoutput, s, SEC_READONLY | SEC_DATA);
- addr = frag_now_fix ();
- p = frag_more (size);
- elf32_arm_set_eabi_attr_contents (stdoutput, (bfd_byte *)p, size);
}
+#endif /* OBJ_ELF */
/* Parse a .cpu directive. */
@@ -14009,6 +20659,37 @@ s_arm_arch (int ignored ATTRIBUTE_UNUSED)
}
+/* Parse a .object_arch directive. */
+
+static void
+s_arm_object_arch (int ignored ATTRIBUTE_UNUSED)
+{
+ const struct arm_arch_option_table *opt;
+ char saved_char;
+ char *name;
+
+ name = input_line_pointer;
+ while (*input_line_pointer && !ISSPACE(*input_line_pointer))
+ input_line_pointer++;
+ saved_char = *input_line_pointer;
+ *input_line_pointer = 0;
+
+ /* Skip the first "all" entry. */
+ for (opt = arm_archs + 1; opt->name != NULL; opt++)
+ if (streq (opt->name, name))
+ {
+ object_arch = &opt->value;
+ *input_line_pointer = saved_char;
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ as_bad (_("unknown architecture `%s'\n"), name);
+ *input_line_pointer = saved_char;
+ ignore_rest_of_line ();
+}
+
+
/* Parse a .fpu directive. */
static void
@@ -14038,5 +20719,10 @@ s_arm_fpu (int ignored ATTRIBUTE_UNUSED)
*input_line_pointer = saved_char;
ignore_rest_of_line ();
}
-#endif /* OBJ_ELF */
+/* Copy symbol information. */
+void
+arm_copy_symbol_attributes (symbolS *dest, symbolS *src)
+{
+ ARM_GET_FLAG (dest) = ARM_GET_FLAG (src);
+}
diff --git a/contrib/binutils/gas/config/tc-arm.h b/contrib/binutils/gas/config/tc-arm.h
index f261577..d6dee9b 100644
--- a/contrib/binutils/gas/config/tc-arm.h
+++ b/contrib/binutils/gas/config/tc-arm.h
@@ -1,6 +1,6 @@
/* This file is tc-arm.h
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
@@ -66,6 +66,8 @@ struct fix;
# if defined TE_PE
# if defined TE_EPOC
# define TARGET_FORMAT (target_big_endian ? "epoc-pe-arm-big" : "epoc-pe-arm-little")
+# elif defined TE_WINCE
+# define TARGET_FORMAT (target_big_endian ? "pe-arm-wince-big" : "pe-arm-wince-little")
# else
# define TARGET_FORMAT (target_big_endian ? "pe-arm-big" : "pe-arm-little")
# endif
@@ -98,6 +100,7 @@ extern int arm_optimize_expr (expressionS *, operatorT, expressionS *);
#ifdef OBJ_ELF
#define md_end arm_md_end
extern void arm_md_end (void);
+bfd_boolean arm_is_eabi (void);
#endif
/* NOTE: The fake label creation in stabs.c:s_stab_generic() has
@@ -120,12 +123,30 @@ extern void arm_md_end (void);
#define ARM_IS_THUMB(s) (ARM_GET_FLAG (s) & ARM_FLAG_THUMB)
#define ARM_IS_INTERWORK(s) (ARM_GET_FLAG (s) & ARM_FLAG_INTERWORK)
+#ifdef OBJ_ELF
+
+/* For ELF objects THUMB_IS_FUNC is inferred from
+ ARM_IS_TUMB and the function type. */
+#define THUMB_IS_FUNC(s) \
+ ((arm_is_eabi () \
+ && (ARM_IS_THUMB (s)) \
+ && (symbol_get_bfdsym (s)->flags & BSF_FUNCTION)) \
+ || (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC))
+
+#else
#define THUMB_IS_FUNC(s) (ARM_GET_FLAG (s) & THUMB_FLAG_FUNC)
+#endif
#define ARM_SET_THUMB(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_THUMB) : ARM_RESET_FLAG (s, ARM_FLAG_THUMB))
#define ARM_SET_INTERWORK(s,t) ((t) ? ARM_SET_FLAG (s, ARM_FLAG_INTERWORK) : ARM_RESET_FLAG (s, ARM_FLAG_INTERWORK))
#define THUMB_SET_FUNC(s,t) ((t) ? ARM_SET_FLAG (s, THUMB_FLAG_FUNC) : ARM_RESET_FLAG (s, THUMB_FLAG_FUNC))
+void arm_copy_symbol_attributes (symbolS *, symbolS *);
+#ifndef TC_COPY_SYMBOL_ATTRIBUTES
+#define TC_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \
+ (arm_copy_symbol_attributes (DEST, SRC))
+#endif
+
#define TC_START_LABEL(C,STR) (c == ':' || (c == '/' && arm_data_in_code ()))
#define tc_canonicalize_symbol_name(str) arm_canonicalize_symbol_name (str);
#define obj_adjust_symtab() arm_adjust_symtab ()
@@ -146,7 +167,6 @@ extern void arm_md_end (void);
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
(!(FIX)->fx_pcrel \
- || (FIX)->fx_plt \
|| (FIX)->fx_r_type == BFD_RELOC_ARM_GOT32 \
|| (FIX)->fx_r_type == BFD_RELOC_32 \
|| TC_FORCE_RELOCATION (FIX))
@@ -175,14 +195,27 @@ extern void arm_md_end (void);
goto LABEL; \
}
+#define DWARF2_LINE_MIN_INSN_LENGTH 2
+
+/* The lr register is r14. */
+#define DWARF2_DEFAULT_RETURN_COLUMN 14
+
+/* Registers are generally saved at negative offsets to the CFA. */
+#define DWARF2_CIE_DATA_ALIGNMENT (-4)
+
#ifdef OBJ_ELF
-# define DWARF2_LINE_MIN_INSN_LENGTH 2
# define obj_frob_symbol(sym, punt) armelf_frob_symbol ((sym), & (punt))
# define md_elf_section_change_hook() arm_elf_change_section ()
# define md_elf_section_type(str, len) arm_elf_section_type (str, len)
# define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
# define TC_SEGMENT_INFO_TYPE struct arm_segment_info_type
+/* This is not really an alignment operation, but it's something we
+ need to do at the same time: whenever we are figuring out the
+ alignment for data, we should check whether a $d symbol is
+ necessary. */
+# define md_cons_align(nbytes) mapping_state (MAP_DATA)
+
enum mstate
{
MAP_UNDEFINED = 0, /* Must be zero, for seginfo in new sections. */
@@ -191,6 +224,8 @@ enum mstate
MAP_THUMB
};
+void mapping_state (enum mstate);
+
struct arm_segment_info_type
{
enum mstate mapstate;
@@ -200,12 +235,6 @@ struct arm_segment_info_type
/* We want .cfi_* pseudo-ops for generating unwind info. */
#define TARGET_USE_CFIPOP 1
-/* The lr register is r14. */
-#define DWARF2_DEFAULT_RETURN_COLUMN 14
-
-/* Registers are generally saved at negative offsets to the CFA. */
-#define DWARF2_CIE_DATA_ALIGNMENT -4
-
/* CFI hooks. */
#define tc_regname_to_dw2regnum tc_arm_regname_to_dw2regnum
#define tc_cfi_frame_initial_instructions tc_arm_frame_initial_instructions
@@ -244,5 +273,14 @@ extern void arm_init_frag (struct frag *);
extern void arm_handle_align (struct frag *);
extern bfd_boolean arm_fix_adjustable (struct fix *);
extern int arm_elf_section_type (const char *, size_t);
-extern int tc_arm_regname_to_dw2regnum (const char *regname);
+extern int tc_arm_regname_to_dw2regnum (char *regname);
extern void tc_arm_frame_initial_instructions (void);
+
+#ifdef TE_PE
+
+#define O_secrel O_md1
+
+#define TC_DWARF2_EMIT_OFFSET tc_pe_dwarf2_emit_offset
+void tc_pe_dwarf2_emit_offset (symbolS *, unsigned int);
+
+#endif /* TE_PE */
diff --git a/contrib/binutils/gas/config/tc-cr16.c b/contrib/binutils/gas/config/tc-cr16.c
new file mode 100644
index 0000000..2c4c6a4
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-cr16.c
@@ -0,0 +1,2444 @@
+/* tc-cr16.c -- Assembler code for the CR16 CPU core.
+ Copyright 2007 Free Software Foundation, Inc.
+
+ Contributed by M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#include "as.h"
+#include "safe-ctype.h"
+#include "dwarf2dbg.h"
+#include "opcode/cr16.h"
+#include "elf/cr16.h"
+
+
+/* Word is considered here as a 16-bit unsigned short int. */
+#define WORD_SHIFT 16
+
+/* Register is 2-byte size. */
+#define REG_SIZE 2
+
+/* Maximum size of a single instruction (in words). */
+#define INSN_MAX_SIZE 3
+
+/* Maximum bits which may be set in a `mask16' operand. */
+#define MAX_REGS_IN_MASK16 8
+
+/* Assign a number NUM, shifted by SHIFT bytes, into a location
+ pointed by index BYTE of array 'output_opcode'. */
+#define CR16_PRINT(BYTE, NUM, SHIFT) output_opcode[BYTE] |= (NUM << SHIFT)
+
+/* Operand errors. */
+typedef enum
+ {
+ OP_LEGAL = 0, /* Legal operand. */
+ OP_OUT_OF_RANGE, /* Operand not within permitted range. */
+ OP_NOT_EVEN /* Operand is Odd number, should be even. */
+ }
+op_err;
+
+/* Opcode mnemonics hash table. */
+static struct hash_control *cr16_inst_hash;
+/* CR16 registers hash table. */
+static struct hash_control *reg_hash;
+/* CR16 register pair hash table. */
+static struct hash_control *regp_hash;
+/* CR16 processor registers hash table. */
+static struct hash_control *preg_hash;
+/* CR16 processor registers 32 bit hash table. */
+static struct hash_control *pregp_hash;
+/* Current instruction we're assembling. */
+const inst *instruction;
+
+
+static int code_label = 0;
+
+/* Global variables. */
+
+/* Array to hold an instruction encoding. */
+long output_opcode[2];
+
+/* Nonzero means a relocatable symbol. */
+int relocatable;
+
+/* A copy of the original instruction (used in error messages). */
+char ins_parse[MAX_INST_LEN];
+
+/* The current processed argument number. */
+int cur_arg_num;
+
+/* Generic assembler global variables which must be defined by all targets. */
+
+/* Characters which always start a comment. */
+const char comment_chars[] = "#";
+
+/* Characters which start a comment at the beginning of a line. */
+const char line_comment_chars[] = "#";
+
+/* This array holds machine specific line separator characters. */
+const char line_separator_chars[] = ";";
+
+/* Chars that can be used to separate mant from exp in floating point nums. */
+const char EXP_CHARS[] = "eE";
+
+/* Chars that mean this number is a floating point constant as in 0f12.456 */
+const char FLT_CHARS[] = "f'";
+
+/* Target-specific multicharacter options, not const-declared at usage. */
+const char *md_shortopts = "";
+struct option md_longopts[] =
+{
+ {NULL, no_argument, NULL, 0}
+};
+size_t md_longopts_size = sizeof (md_longopts);
+
+static void
+l_cons (int nbytes)
+{
+ int c;
+ expressionS exp;
+
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
+ if (is_it_end_of_statement ())
+ {
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+#ifdef TC_ADDRESS_BYTES
+ if (nbytes == 0)
+ nbytes = TC_ADDRESS_BYTES ();
+#endif
+
+#ifdef md_cons_align
+ md_cons_align (nbytes);
+#endif
+
+ c = 0;
+ do
+ {
+ unsigned int bits_available = BITS_PER_CHAR * nbytes;
+ char *hold = input_line_pointer;
+
+ expression (&exp);
+
+ if (*input_line_pointer == ':')
+ {
+ /* Bitfields. */
+ long value = 0;
+
+ for (;;)
+ {
+ unsigned long width;
+
+ if (*input_line_pointer != ':')
+ {
+ input_line_pointer = hold;
+ break;
+ }
+ if (exp.X_op == O_absent)
+ {
+ as_warn (_("using a bit field width of zero"));
+ exp.X_add_number = 0;
+ exp.X_op = O_constant;
+ }
+
+ if (exp.X_op != O_constant)
+ {
+ *input_line_pointer = '\0';
+ as_bad (_("field width \"%s\" too complex for a bitfield"), hold);
+ *input_line_pointer = ':';
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ if ((width = exp.X_add_number) >
+ (unsigned int)(BITS_PER_CHAR * nbytes))
+ {
+ as_warn (_("field width %lu too big to fit in %d bytes: truncated to %d bits"), width, nbytes, (BITS_PER_CHAR * nbytes));
+ width = BITS_PER_CHAR * nbytes;
+ } /* Too big. */
+
+
+ if (width > bits_available)
+ {
+ /* FIXME-SOMEDAY: backing up and reparsing is wasteful. */
+ input_line_pointer = hold;
+ exp.X_add_number = value;
+ break;
+ }
+
+ /* Skip ':'. */
+ hold = ++input_line_pointer;
+
+ expression (&exp);
+ if (exp.X_op != O_constant)
+ {
+ char cache = *input_line_pointer;
+
+ *input_line_pointer = '\0';
+ as_bad (_("field value \"%s\" too complex for a bitfield"), hold);
+ *input_line_pointer = cache;
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ value |= ((~(-1 << width) & exp.X_add_number)
+ << ((BITS_PER_CHAR * nbytes) - bits_available));
+
+ if ((bits_available -= width) == 0
+ || is_it_end_of_statement ()
+ || *input_line_pointer != ',')
+ break;
+
+ hold = ++input_line_pointer;
+ expression (&exp);
+ }
+
+ exp.X_add_number = value;
+ exp.X_op = O_constant;
+ exp.X_unsigned = 1;
+ }
+
+ if ((*(input_line_pointer) == '@') && (*(input_line_pointer +1) == 'c'))
+ code_label = 1;
+ emit_expr (&exp, (unsigned int) nbytes);
+ ++c;
+ if ((*(input_line_pointer) == '@') && (*(input_line_pointer +1) == 'c'))
+ {
+ input_line_pointer +=3;
+ break;
+ }
+ }
+ while ((*input_line_pointer++ == ','));
+
+ /* Put terminator back into stream. */
+ input_line_pointer--;
+
+ demand_empty_rest_of_line ();
+}
+
+
+/* This table describes all the machine specific pseudo-ops
+ the assembler has to support. The fields are:
+ *** Pseudo-op name without dot.
+ *** Function to call to execute this pseudo-op.
+ *** Integer arg to pass to the function. */
+
+const pseudo_typeS md_pseudo_table[] =
+{
+ /* In CR16 machine, align is in bytes (not a ptwo boundary). */
+ {"align", s_align_bytes, 0},
+ {"long", l_cons, 4 },
+ {0, 0, 0}
+};
+
+/* CR16 relaxation table. */
+const relax_typeS md_relax_table[] =
+{
+ /* bCC */
+ {0xfa, -0x100, 2, 1}, /* 8 */
+ {0xfffe, -0x10000, 4, 2}, /* 16 */
+ {0xfffffe, -0x1000000, 6, 0}, /* 24 */
+};
+
+/* Return the bit size for a given operand. */
+
+static int
+get_opbits (operand_type op)
+{
+ if (op < MAX_OPRD)
+ return cr16_optab[op].bit_size;
+
+ return 0;
+}
+
+/* Return the argument type of a given operand. */
+
+static argtype
+get_optype (operand_type op)
+{
+ if (op < MAX_OPRD)
+ return cr16_optab[op].arg_type;
+ else
+ return nullargs;
+}
+
+/* Return the flags of a given operand. */
+
+static int
+get_opflags (operand_type op)
+{
+ if (op < MAX_OPRD)
+ return cr16_optab[op].flags;
+
+ return 0;
+}
+
+/* Get the cc code. */
+
+static int
+get_cc (char *cc_name)
+{
+ unsigned int i;
+
+ for (i = 0; i < cr16_num_cc; i++)
+ if (strcmp (cc_name, cr16_b_cond_tab[i]) == 0)
+ return i;
+
+ return -1;
+}
+
+/* Get the core processor register 'reg_name'. */
+
+static reg
+get_register (char *reg_name)
+{
+ const reg_entry *reg;
+
+ reg = (const reg_entry *) hash_find (reg_hash, reg_name);
+
+ if (reg != NULL)
+ return reg->value.reg_val;
+
+ return nullregister;
+}
+/* Get the core processor register-pair 'reg_name'. */
+
+static reg
+get_register_pair (char *reg_name)
+{
+ const reg_entry *reg;
+ char tmp_rp[16]="\0";
+
+ /* Add '(' and ')' to the reg pair, if its not present. */
+ if (reg_name[0] != '(')
+ {
+ tmp_rp[0] = '(';
+ strcat (tmp_rp, reg_name);
+ strcat (tmp_rp,")");
+ reg = (const reg_entry *) hash_find (regp_hash, tmp_rp);
+ }
+ else
+ reg = (const reg_entry *) hash_find (regp_hash, reg_name);
+
+ if (reg != NULL)
+ return reg->value.reg_val;
+
+ return nullregister;
+}
+
+/* Get the index register 'reg_name'. */
+
+static reg
+get_index_register (char *reg_name)
+{
+ const reg_entry *reg;
+
+ reg = (const reg_entry *) hash_find (reg_hash, reg_name);
+
+ if ((reg != NULL)
+ && ((reg->value.reg_val == 12) || (reg->value.reg_val == 13)))
+ return reg->value.reg_val;
+
+ return nullregister;
+}
+/* Get the core processor index register-pair 'reg_name'. */
+
+static reg
+get_index_register_pair (char *reg_name)
+{
+ const reg_entry *reg;
+
+ reg = (const reg_entry *) hash_find (regp_hash, reg_name);
+
+ if (reg != NULL)
+ {
+ if ((reg->value.reg_val != 1) || (reg->value.reg_val != 7)
+ || (reg->value.reg_val != 9) || (reg->value.reg_val > 10))
+ return reg->value.reg_val;
+
+ as_bad (_("Unknown register pair - index relative mode: `%d'"), reg->value.reg_val);
+ }
+
+ return nullregister;
+}
+
+/* Get the processor register 'preg_name'. */
+
+static preg
+get_pregister (char *preg_name)
+{
+ const reg_entry *preg;
+
+ preg = (const reg_entry *) hash_find (preg_hash, preg_name);
+
+ if (preg != NULL)
+ return preg->value.preg_val;
+
+ return nullpregister;
+}
+
+/* Get the processor register 'preg_name 32 bit'. */
+
+static preg
+get_pregisterp (char *preg_name)
+{
+ const reg_entry *preg;
+
+ preg = (const reg_entry *) hash_find (pregp_hash, preg_name);
+
+ if (preg != NULL)
+ return preg->value.preg_val;
+
+ return nullpregister;
+}
+
+
+/* Round up a section size to the appropriate boundary. */
+
+valueT
+md_section_align (segT seg, valueT val)
+{
+ /* Round .text section to a multiple of 2. */
+ if (seg == text_section)
+ return (val + 1) & ~1;
+ return val;
+}
+
+/* Parse an operand that is machine-specific (remove '*'). */
+
+void
+md_operand (expressionS * exp)
+{
+ char c = *input_line_pointer;
+
+ switch (c)
+ {
+ case '*':
+ input_line_pointer++;
+ expression (exp);
+ break;
+ default:
+ break;
+ }
+}
+
+/* Reset global variables before parsing a new instruction. */
+
+static void
+reset_vars (char *op)
+{
+ cur_arg_num = relocatable = 0;
+ memset (& output_opcode, '\0', sizeof (output_opcode));
+
+ /* Save a copy of the original OP (used in error messages). */
+ strncpy (ins_parse, op, sizeof ins_parse - 1);
+ ins_parse [sizeof ins_parse - 1] = 0;
+}
+
+/* This macro decides whether a particular reloc is an entry in a
+ switch table. It is used when relaxing, because the linker needs
+ to know about all such entries so that it can adjust them if
+ necessary. */
+
+#define SWITCH_TABLE(fix) \
+ ( (fix)->fx_addsy != NULL \
+ && (fix)->fx_subsy != NULL \
+ && S_GET_SEGMENT ((fix)->fx_addsy) == \
+ S_GET_SEGMENT ((fix)->fx_subsy) \
+ && S_GET_SEGMENT (fix->fx_addsy) != undefined_section \
+ && ( (fix)->fx_r_type == BFD_RELOC_CR16_NUM8 \
+ || (fix)->fx_r_type == BFD_RELOC_CR16_NUM16 \
+ || (fix)->fx_r_type == BFD_RELOC_CR16_NUM32 \
+ || (fix)->fx_r_type == BFD_RELOC_CR16_NUM32a))
+
+/* See whether we need to force a relocation into the output file.
+ This is used to force out switch and PC relative relocations when
+ relaxing. */
+
+int
+cr16_force_relocation (fixS *fix)
+{
+ /* REVISIT: Check if the "SWITCH_TABLE (fix)" should be added
+ if (generic_force_reloc (fix) || SWITCH_TABLE (fix)) */
+ if (generic_force_reloc (fix))
+ return 1;
+
+ return 0;
+}
+
+/* Record a fixup for a cons expression. */
+
+void
+cr16_cons_fix_new (fragS *frag, int offset, int len, expressionS *exp)
+{
+ int rtype;
+ switch (len)
+ {
+ default: rtype = BFD_RELOC_NONE; break;
+ case 1: rtype = BFD_RELOC_CR16_NUM8 ; break;
+ case 2: rtype = BFD_RELOC_CR16_NUM16; break;
+ case 4:
+ if (code_label)
+ {
+ rtype = BFD_RELOC_CR16_NUM32a;
+ code_label = 0;
+ }
+ else
+ rtype = BFD_RELOC_CR16_NUM32;
+ break;
+ }
+
+ fix_new_exp (frag, offset, len, exp, 0, rtype);
+}
+
+/* Generate a relocation entry for a fixup. */
+
+arelent *
+tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS * fixP)
+{
+ arelent * reloc;
+
+ reloc = xmalloc (sizeof (arelent));
+ reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixP->fx_addsy);
+ reloc->address = fixP->fx_frag->fr_address + fixP->fx_where;
+ reloc->addend = fixP->fx_offset;
+
+ if (fixP->fx_subsy != NULL)
+ {
+ if (SWITCH_TABLE (fixP))
+ {
+ /* Keep the current difference in the addend. */
+ reloc->addend = (S_GET_VALUE (fixP->fx_addsy)
+ - S_GET_VALUE (fixP->fx_subsy) + fixP->fx_offset);
+
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_CR16_NUM8:
+ fixP->fx_r_type = BFD_RELOC_CR16_NUM8;
+ break;
+ case BFD_RELOC_CR16_NUM16:
+ fixP->fx_r_type = BFD_RELOC_CR16_NUM16;
+ break;
+ case BFD_RELOC_CR16_NUM32:
+ fixP->fx_r_type = BFD_RELOC_CR16_NUM32;
+ break;
+ case BFD_RELOC_CR16_NUM32a:
+ fixP->fx_r_type = BFD_RELOC_CR16_NUM32a;
+ break;
+ default:
+ abort ();
+ break;
+ }
+ }
+ else
+ {
+ /* We only resolve difference expressions in the same section. */
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("can't resolve `%s' {%s section} - `%s' {%s section}"),
+ fixP->fx_addsy ? S_GET_NAME (fixP->fx_addsy) : "0",
+ segment_name (fixP->fx_addsy
+ ? S_GET_SEGMENT (fixP->fx_addsy)
+ : absolute_section),
+ S_GET_NAME (fixP->fx_subsy),
+ segment_name (S_GET_SEGMENT (fixP->fx_addsy)));
+ }
+ }
+
+ assert ((int) fixP->fx_r_type > 0);
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, fixP->fx_r_type);
+
+ if (reloc->howto == NULL)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("internal error: reloc %d (`%s') not supported by object file format"),
+ fixP->fx_r_type,
+ bfd_get_reloc_code_name (fixP->fx_r_type));
+ return NULL;
+ }
+ assert (!fixP->fx_pcrel == !reloc->howto->pc_relative);
+
+ return reloc;
+}
+
+/* Prepare machine-dependent frags for relaxation. */
+
+int
+md_estimate_size_before_relax (fragS *fragp, asection *seg)
+{
+ /* If symbol is undefined or located in a different section,
+ select the largest supported relocation. */
+ relax_substateT subtype;
+ relax_substateT rlx_state[] = {0, 2};
+
+ for (subtype = 0; subtype < ARRAY_SIZE (rlx_state); subtype += 2)
+ {
+ if (fragp->fr_subtype == rlx_state[subtype]
+ && (!S_IS_DEFINED (fragp->fr_symbol)
+ || seg != S_GET_SEGMENT (fragp->fr_symbol)))
+ {
+ fragp->fr_subtype = rlx_state[subtype + 1];
+ break;
+ }
+ }
+
+ if (fragp->fr_subtype >= ARRAY_SIZE (md_relax_table))
+ abort ();
+
+ return md_relax_table[fragp->fr_subtype].rlx_length;
+}
+
+void
+md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, fragS *fragP)
+{
+ /* 'opcode' points to the start of the instruction, whether
+ we need to change the instruction's fixed encoding. */
+ bfd_reloc_code_real_type reloc = BFD_RELOC_NONE;
+
+ subseg_change (sec, 0);
+
+ fix_new (fragP, fragP->fr_fix,
+ bfd_get_reloc_size (bfd_reloc_type_lookup (stdoutput, reloc)),
+ fragP->fr_symbol, fragP->fr_offset, 1, reloc);
+ fragP->fr_var = 0;
+ fragP->fr_fix += md_relax_table[fragP->fr_subtype].rlx_length;
+}
+
+/* Process machine-dependent command line options. Called once for
+ each option on the command line that the machine-independent part of
+ GAS does not understand. */
+
+int
+md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+/* Machine-dependent usage-output. */
+
+void
+md_show_usage (FILE *stream ATTRIBUTE_UNUSED)
+{
+ return;
+}
+
+/* Turn a string in input_line_pointer into a floating point constant
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
+ returned, or NULL on OK. */
+
+char *
+md_atof (int type, char *litP, int *sizeP)
+{
+ int prec;
+ int i;
+ LITTLENUM_TYPE words[4];
+ char *t;
+
+ switch (type)
+ {
+ case 'f':
+ prec = 2;
+ break;
+
+ case 'd':
+ prec = 4;
+ break;
+
+ default:
+ *sizeP = 0;
+ return _("bad call to md_atof");
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+
+ *sizeP = prec * 2;
+
+ if (! target_big_endian)
+ {
+ for (i = prec - 1; i >= 0; i--)
+ {
+ md_number_to_chars (litP, (valueT) words[i], 2);
+ litP += 2;
+ }
+ }
+ else
+ {
+ for (i = 0; i < prec; i++)
+ {
+ md_number_to_chars (litP, (valueT) words[i], 2);
+ litP += 2;
+ }
+ }
+
+ return NULL;
+}
+
+/* Apply a fixS (fixup of an instruction or data that we didn't have
+ enough info to complete immediately) to the data in a frag.
+ Since linkrelax is nonzero and TC_LINKRELAX_FIXUP is defined to disable
+ relaxation of debug sections, this function is called only when
+ fixuping relocations of debug sections. */
+
+void
+md_apply_fix (fixS *fixP, valueT *valP, segT seg)
+{
+ valueT val = * valP;
+ char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
+ fixP->fx_offset = 0;
+
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_CR16_NUM8:
+ bfd_put_8 (stdoutput, (unsigned char) val, buf);
+ break;
+ case BFD_RELOC_CR16_NUM16:
+ bfd_put_16 (stdoutput, val, buf);
+ break;
+ case BFD_RELOC_CR16_NUM32:
+ bfd_put_32 (stdoutput, val, buf);
+ break;
+ case BFD_RELOC_CR16_NUM32a:
+ bfd_put_32 (stdoutput, val, buf);
+ break;
+ default:
+ /* We shouldn't ever get here because linkrelax is nonzero. */
+ abort ();
+ break;
+ }
+
+ fixP->fx_done = 0;
+
+ if (fixP->fx_addsy == NULL
+ && fixP->fx_pcrel == 0)
+ fixP->fx_done = 1;
+
+ if (fixP->fx_pcrel == 1
+ && fixP->fx_addsy != NULL
+ && S_GET_SEGMENT (fixP->fx_addsy) == seg)
+ fixP->fx_done = 1;
+}
+
+/* The location from which a PC relative jump should be calculated,
+ given a PC relative reloc. */
+
+long
+md_pcrel_from (fixS *fixp)
+{
+ return fixp->fx_frag->fr_address + fixp->fx_where;
+}
+
+static void
+initialise_reg_hash_table (struct hash_control ** hash_table,
+ const reg_entry * register_table,
+ const unsigned int num_entries)
+{
+ const reg_entry * reg;
+ const char *hashret;
+
+ if ((* hash_table = hash_new ()) == NULL)
+ as_fatal (_("Virtual memory exhausted"));
+
+ for (reg = register_table;
+ reg < (register_table + num_entries);
+ reg++)
+ {
+ hashret = hash_insert (* hash_table, reg->name, (char *) reg);
+ if (hashret)
+ as_fatal (_("Internal Error: Can't hash %s: %s"),
+ reg->name, hashret);
+ }
+}
+
+/* This function is called once, at assembler startup time. This should
+ set up all the tables, etc that the MD part of the assembler needs. */
+
+void
+md_begin (void)
+{
+ int i = 0;
+
+ /* Set up a hash table for the instructions. */
+ if ((cr16_inst_hash = hash_new ()) == NULL)
+ as_fatal (_("Virtual memory exhausted"));
+
+ while (cr16_instruction[i].mnemonic != NULL)
+ {
+ const char *hashret;
+ const char *mnemonic = cr16_instruction[i].mnemonic;
+
+ hashret = hash_insert (cr16_inst_hash, mnemonic,
+ (char *)(cr16_instruction + i));
+
+ if (hashret != NULL && *hashret != '\0')
+ as_fatal (_("Can't hash `%s': %s\n"), cr16_instruction[i].mnemonic,
+ *hashret == 0 ? _("(unknown reason)") : hashret);
+
+ /* Insert unique names into hash table. The CR16 instruction set
+ has many identical opcode names that have different opcodes based
+ on the operands. This hash table then provides a quick index to
+ the first opcode with a particular name in the opcode table. */
+ do
+ {
+ ++i;
+ }
+ while (cr16_instruction[i].mnemonic != NULL
+ && streq (cr16_instruction[i].mnemonic, mnemonic));
+ }
+
+ /* Initialize reg_hash hash table. */
+ initialise_reg_hash_table (& reg_hash, cr16_regtab, NUMREGS);
+ /* Initialize regp_hash hash table. */
+ initialise_reg_hash_table (& regp_hash, cr16_regptab, NUMREGPS);
+ /* Initialize preg_hash hash table. */
+ initialise_reg_hash_table (& preg_hash, cr16_pregtab, NUMPREGS);
+ /* Initialize pregp_hash hash table. */
+ initialise_reg_hash_table (& pregp_hash, cr16_pregptab, NUMPREGPS);
+
+ /* Set linkrelax here to avoid fixups in most sections. */
+ linkrelax = 1;
+}
+
+/* Process constants (immediate/absolute)
+ and labels (jump targets/Memory locations). */
+
+static void
+process_label_constant (char *str, ins * cr16_ins)
+{
+ char *saved_input_line_pointer;
+ int symbol_with_at = 0;
+ int symbol_with_s = 0;
+ int symbol_with_m = 0;
+ int symbol_with_l = 0;
+ argument *cur_arg = cr16_ins->arg + cur_arg_num; /* Current argument. */
+
+ saved_input_line_pointer = input_line_pointer;
+ input_line_pointer = str;
+
+ expression (&cr16_ins->exp);
+
+ switch (cr16_ins->exp.X_op)
+ {
+ case O_big:
+ case O_absent:
+ /* Missing or bad expr becomes absolute 0. */
+ as_bad (_("missing or invalid displacement expression `%s' taken as 0"),
+ str);
+ cr16_ins->exp.X_op = O_constant;
+ cr16_ins->exp.X_add_number = 0;
+ cr16_ins->exp.X_add_symbol = NULL;
+ cr16_ins->exp.X_op_symbol = NULL;
+ /* Fall through. */
+
+ case O_constant:
+ cur_arg->X_op = O_constant;
+ cur_arg->constant = cr16_ins->exp.X_add_number;
+ break;
+
+ case O_symbol:
+ case O_subtract:
+ case O_add:
+ cur_arg->X_op = O_symbol;
+ cr16_ins->rtype = BFD_RELOC_NONE;
+ relocatable = 1;
+
+ if (strneq (input_line_pointer, "@c", 2))
+ symbol_with_at = 1;
+
+ if (strneq (input_line_pointer, "@l", 2)
+ || strneq (input_line_pointer, ":l", 2))
+ symbol_with_l = 1;
+
+ if (strneq (input_line_pointer, "@m", 2)
+ || strneq (input_line_pointer, ":m", 2))
+ symbol_with_m = 1;
+
+ if (strneq (input_line_pointer, "@s", 2)
+ || strneq (input_line_pointer, ":s", 2))
+ symbol_with_s = 1;
+
+ switch (cur_arg->type)
+ {
+ case arg_cr:
+ if (IS_INSN_TYPE (LD_STOR_INS) || IS_INSN_TYPE (CSTBIT_INS))
+ {
+ if (cur_arg->size == 20)
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL20;
+ else
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL20a;
+ }
+ break;
+
+ case arg_crp:
+ if (IS_INSN_TYPE (LD_STOR_INS) || IS_INSN_TYPE (CSTBIT_INS))
+ switch (instruction->size)
+ {
+ case 1:
+ switch (cur_arg->size)
+ {
+ case 0:
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL0;
+ break;
+ case 4:
+ if (IS_INSN_MNEMONIC ("loadb") || IS_INSN_MNEMONIC ("storb"))
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL4;
+ else
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL4a;
+ break;
+ default: break;
+ }
+ break;
+ case 2:
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL16;
+ break;
+ case 3:
+ if (cur_arg->size == 20)
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL20;
+ else
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL20a;
+ break;
+ default:
+ break;
+ }
+ break;
+
+ case arg_idxr:
+ if (IS_INSN_TYPE (LD_STOR_INS) || IS_INSN_TYPE (CSTBIT_INS))
+ cr16_ins->rtype = BFD_RELOC_CR16_REGREL20;
+ break;
+
+ case arg_idxrp:
+ if (IS_INSN_TYPE (LD_STOR_INS) || IS_INSN_TYPE (CSTBIT_INS))
+ switch (instruction->size)
+ {
+ case 1: cr16_ins->rtype = BFD_RELOC_CR16_REGREL0; break;
+ case 2: cr16_ins->rtype = BFD_RELOC_CR16_REGREL14; break;
+ case 3: cr16_ins->rtype = BFD_RELOC_CR16_REGREL20; break;
+ default: break;
+ }
+ break;
+
+ case arg_c:
+ if (IS_INSN_MNEMONIC ("bal"))
+ cr16_ins->rtype = BFD_RELOC_CR16_DISP24;
+ else if (IS_INSN_TYPE (BRANCH_INS))
+ {
+ if (symbol_with_s)
+ cr16_ins->rtype = BFD_RELOC_CR16_DISP8;
+ else if (symbol_with_m)
+ cr16_ins->rtype = BFD_RELOC_CR16_DISP16;
+ else
+ cr16_ins->rtype = BFD_RELOC_CR16_DISP24;
+ }
+ else if (IS_INSN_TYPE (STOR_IMM_INS) || IS_INSN_TYPE (LD_STOR_INS)
+ || IS_INSN_TYPE (CSTBIT_INS))
+ {
+ if (symbol_with_s)
+ as_bad (_("operand %d: illegal use expression: `%s`"), cur_arg_num + 1, str);
+ if (symbol_with_m)
+ cr16_ins->rtype = BFD_RELOC_CR16_ABS20;
+ else /* Default to (symbol_with_l) */
+ cr16_ins->rtype = BFD_RELOC_CR16_ABS24;
+ }
+ else if (IS_INSN_TYPE (BRANCH_NEQ_INS))
+ cr16_ins->rtype = BFD_RELOC_CR16_DISP4;
+ break;
+
+ case arg_ic:
+ if (IS_INSN_TYPE (ARITH_INS))
+ {
+ if (symbol_with_s)
+ cr16_ins->rtype = BFD_RELOC_CR16_IMM4;
+ else if (symbol_with_m)
+ cr16_ins->rtype = BFD_RELOC_CR16_IMM20;
+ else if (symbol_with_at)
+ cr16_ins->rtype = BFD_RELOC_CR16_IMM32a;
+ else /* Default to (symbol_with_l) */
+ cr16_ins->rtype = BFD_RELOC_CR16_IMM32;
+ }
+ else if (IS_INSN_TYPE (ARITH_BYTE_INS))
+ {
+ cr16_ins->rtype = BFD_RELOC_CR16_IMM16;
+ }
+ break;
+ default:
+ break;
+ }
+ break;
+
+ default:
+ cur_arg->X_op = cr16_ins->exp.X_op;
+ break;
+ }
+
+ input_line_pointer = saved_input_line_pointer;
+ return;
+}
+
+/* Retrieve the opcode image of a given register.
+ If the register is illegal for the current instruction,
+ issue an error. */
+
+static int
+getreg_image (reg r)
+{
+ const reg_entry *reg;
+ char *reg_name;
+ int is_procreg = 0; /* Nonzero means argument should be processor reg. */
+
+ /* Check whether the register is in registers table. */
+ if (r < MAX_REG)
+ reg = cr16_regtab + r;
+ else /* Register not found. */
+ {
+ as_bad (_("Unknown register: `%d'"), r);
+ return 0;
+ }
+
+ reg_name = reg->name;
+
+/* Issue a error message when register is illegal. */
+#define IMAGE_ERR \
+ as_bad (_("Illegal register (`%s') in Instruction: `%s'"), \
+ reg_name, ins_parse); \
+ break;
+
+ switch (reg->type)
+ {
+ case CR16_R_REGTYPE:
+ if (! is_procreg)
+ return reg->image;
+ else
+ IMAGE_ERR;
+
+ case CR16_P_REGTYPE:
+ return reg->image;
+ break;
+
+ default:
+ IMAGE_ERR;
+ }
+
+ return 0;
+}
+
+/* Parsing different types of operands
+ -> constants Immediate/Absolute/Relative numbers
+ -> Labels Relocatable symbols
+ -> (reg pair base) Register pair base
+ -> (rbase) Register base
+ -> disp(rbase) Register relative
+ -> [rinx]disp(reg pair) Register index with reg pair mode
+ -> disp(rbase,ridx,scl) Register index mode. */
+
+static void
+set_operand (char *operand, ins * cr16_ins)
+{
+ char *operandS; /* Pointer to start of sub-opearand. */
+ char *operandE; /* Pointer to end of sub-opearand. */
+
+ argument *cur_arg = &cr16_ins->arg[cur_arg_num]; /* Current argument. */
+
+ /* Initialize pointers. */
+ operandS = operandE = operand;
+
+ switch (cur_arg->type)
+ {
+ case arg_ic: /* Case $0x18. */
+ operandS++;
+ case arg_c: /* Case 0x18. */
+ /* Set constant. */
+ process_label_constant (operandS, cr16_ins);
+
+ if (cur_arg->type != arg_ic)
+ cur_arg->type = arg_c;
+ break;
+
+ case arg_icr: /* Case $0x18(r1). */
+ operandS++;
+ case arg_cr: /* Case 0x18(r1). */
+ /* Set displacement constant. */
+ while (*operandE != '(')
+ operandE++;
+ *operandE = '\0';
+ process_label_constant (operandS, cr16_ins);
+ operandS = operandE;
+ case arg_rbase: /* Case (r1) or (r1,r0). */
+ operandS++;
+ /* Set register base. */
+ while (*operandE != ')')
+ operandE++;
+ *operandE = '\0';
+ if ((cur_arg->r = get_register (operandS)) == nullregister)
+ as_bad (_("Illegal register `%s' in Instruction `%s'"),
+ operandS, ins_parse);
+
+ /* set the arg->rp, if reg is "r12" or "r13" or "14" or "15" */
+ if ((cur_arg->type != arg_rbase)
+ && ((getreg_image (cur_arg->r) == 12)
+ || (getreg_image (cur_arg->r) == 13)
+ || (getreg_image (cur_arg->r) == 14)
+ || (getreg_image (cur_arg->r) == 15)))
+ {
+ cur_arg->type = arg_crp;
+ cur_arg->rp = cur_arg->r;
+ }
+ break;
+
+ case arg_crp: /* Case 0x18(r1,r0). */
+ /* Set displacement constant. */
+ while (*operandE != '(')
+ operandE++;
+ *operandE = '\0';
+ process_label_constant (operandS, cr16_ins);
+ operandS = operandE;
+ operandS++;
+ /* Set register pair base. */
+ while (*operandE != ')')
+ operandE++;
+ *operandE = '\0';
+ if ((cur_arg->rp = get_register_pair (operandS)) == nullregister)
+ as_bad (_("Illegal register pair `%s' in Instruction `%s'"),
+ operandS, ins_parse);
+ break;
+
+ case arg_idxr:
+ /* Set register pair base. */
+ if ((strchr (operandS,'(') != NULL))
+ {
+ while ((*operandE != '(') && (! ISSPACE (*operandE)))
+ operandE++;
+ if ((cur_arg->rp = get_index_register_pair (operandE)) == nullregister)
+ as_bad (_("Illegal register pair `%s' in Instruction `%s'"),
+ operandS, ins_parse);
+ *operandE++ = '\0';
+ cur_arg->type = arg_idxrp;
+ }
+ else
+ cur_arg->rp = -1;
+
+ operandE = operandS;
+ /* Set displacement constant. */
+ while (*operandE != ']')
+ operandE++;
+ process_label_constant (++operandE, cr16_ins);
+ *operandE++ = '\0';
+ operandE = operandS;
+
+ /* Set index register . */
+ operandS = strchr (operandE,'[');
+ if (operandS != NULL)
+ { /* Eliminate '[', detach from rest of operand. */
+ *operandS++ = '\0';
+
+ operandE = strchr (operandS, ']');
+
+ if (operandE == NULL)
+ as_bad (_("unmatched '['"));
+ else
+ { /* Eliminate ']' and make sure it was the last thing
+ in the string. */
+ *operandE = '\0';
+ if (*(operandE + 1) != '\0')
+ as_bad (_("garbage after index spec ignored"));
+ }
+ }
+
+ if ((cur_arg->i_r = get_index_register (operandS)) == nullregister)
+ as_bad (_("Illegal register `%s' in Instruction `%s'"),
+ operandS, ins_parse);
+ *operandE = '\0';
+ *operandS = '\0';
+ break;
+
+ default:
+ break;
+ }
+}
+
+/* Parse a single operand.
+ operand - Current operand to parse.
+ cr16_ins - Current assembled instruction. */
+
+static void
+parse_operand (char *operand, ins * cr16_ins)
+{
+ int ret_val;
+ argument *cur_arg = cr16_ins->arg + cur_arg_num; /* Current argument. */
+
+ /* Initialize the type to NULL before parsing. */
+ cur_arg->type = nullargs;
+
+ /* Check whether this is a condition code . */
+ if ((IS_INSN_MNEMONIC ("b")) && ((ret_val = get_cc (operand)) != -1))
+ {
+ cur_arg->type = arg_cc;
+ cur_arg->cc = ret_val;
+ cur_arg->X_op = O_register;
+ return;
+ }
+
+ /* Check whether this is a general processor register. */
+ if ((ret_val = get_register (operand)) != nullregister)
+ {
+ cur_arg->type = arg_r;
+ cur_arg->r = ret_val;
+ cur_arg->X_op = 0;
+ return;
+ }
+
+ /* Check whether this is a general processor register pair. */
+ if ((operand[0] == '(')
+ && ((ret_val = get_register_pair (operand)) != nullregister))
+ {
+ cur_arg->type = arg_rp;
+ cur_arg->rp = ret_val;
+ cur_arg->X_op = O_register;
+ return;
+ }
+
+ /* Check whether the operand is a processor register.
+ For "lprd" and "sprd" instruction, only 32 bit
+ processor registers used. */
+ if (!(IS_INSN_MNEMONIC ("lprd") || (IS_INSN_MNEMONIC ("sprd")))
+ && ((ret_val = get_pregister (operand)) != nullpregister))
+ {
+ cur_arg->type = arg_pr;
+ cur_arg->pr = ret_val;
+ cur_arg->X_op = O_register;
+ return;
+ }
+
+ /* Check whether this is a processor register - 32 bit. */
+ if ((ret_val = get_pregisterp (operand)) != nullpregister)
+ {
+ cur_arg->type = arg_prp;
+ cur_arg->prp = ret_val;
+ cur_arg->X_op = O_register;
+ return;
+ }
+
+ /* Deal with special characters. */
+ switch (operand[0])
+ {
+ case '$':
+ if (strchr (operand, '(') != NULL)
+ cur_arg->type = arg_icr;
+ else
+ cur_arg->type = arg_ic;
+ goto set_params;
+ break;
+
+ case '(':
+ cur_arg->type = arg_rbase;
+ goto set_params;
+ break;
+
+ case '[':
+ cur_arg->type = arg_idxr;
+ goto set_params;
+ break;
+
+ default:
+ break;
+ }
+
+ if (strchr (operand, '(') != NULL)
+ {
+ if (strchr (operand, ',') != NULL
+ && (strchr (operand, ',') > strchr (operand, '(')))
+ cur_arg->type = arg_crp;
+ else
+ cur_arg->type = arg_cr;
+ }
+ else
+ cur_arg->type = arg_c;
+
+/* Parse an operand according to its type. */
+ set_params:
+ cur_arg->constant = 0;
+ set_operand (operand, cr16_ins);
+}
+
+/* Parse the various operands. Each operand is then analyzed to fillup
+ the fields in the cr16_ins data structure. */
+
+static void
+parse_operands (ins * cr16_ins, char *operands)
+{
+ char *operandS; /* Operands string. */
+ char *operandH, *operandT; /* Single operand head/tail pointers. */
+ int allocated = 0; /* Indicates a new operands string was allocated.*/
+ char *operand[MAX_OPERANDS];/* Separating the operands. */
+ int op_num = 0; /* Current operand number we are parsing. */
+ int bracket_flag = 0; /* Indicates a bracket '(' was found. */
+ int sq_bracket_flag = 0; /* Indicates a square bracket '[' was found. */
+
+ /* Preprocess the list of registers, if necessary. */
+ operandS = operandH = operandT = operands;
+
+ while (*operandT != '\0')
+ {
+ if (*operandT == ',' && bracket_flag != 1 && sq_bracket_flag != 1)
+ {
+ *operandT++ = '\0';
+ operand[op_num++] = strdup (operandH);
+ operandH = operandT;
+ continue;
+ }
+
+ if (*operandT == ' ')
+ as_bad (_("Illegal operands (whitespace): `%s'"), ins_parse);
+
+ if (*operandT == '(')
+ bracket_flag = 1;
+ else if (*operandT == '[')
+ sq_bracket_flag = 1;
+
+ if (*operandT == ')')
+ {
+ if (bracket_flag)
+ bracket_flag = 0;
+ else
+ as_fatal (_("Missing matching brackets : `%s'"), ins_parse);
+ }
+ else if (*operandT == ']')
+ {
+ if (sq_bracket_flag)
+ sq_bracket_flag = 0;
+ else
+ as_fatal (_("Missing matching brackets : `%s'"), ins_parse);
+ }
+
+ if (bracket_flag == 1 && *operandT == ')')
+ bracket_flag = 0;
+ else if (sq_bracket_flag == 1 && *operandT == ']')
+ sq_bracket_flag = 0;
+
+ operandT++;
+ }
+
+ /* Adding the last operand. */
+ operand[op_num++] = strdup (operandH);
+ cr16_ins->nargs = op_num;
+
+ /* Verifying correct syntax of operands (all brackets should be closed). */
+ if (bracket_flag || sq_bracket_flag)
+ as_fatal (_("Missing matching brackets : `%s'"), ins_parse);
+
+ /* Now we parse each operand separately. */
+ for (op_num = 0; op_num < cr16_ins->nargs; op_num++)
+ {
+ cur_arg_num = op_num;
+ parse_operand (operand[op_num], cr16_ins);
+ free (operand[op_num]);
+ }
+
+ if (allocated)
+ free (operandS);
+}
+
+/* Get the trap index in dispatch table, given its name.
+ This routine is used by assembling the 'excp' instruction. */
+
+static int
+gettrap (char *s)
+{
+ const trap_entry *trap;
+
+ for (trap = cr16_traps; trap < (cr16_traps + NUMTRAPS); trap++)
+ if (strcasecmp (trap->name, s) == 0)
+ return trap->entry;
+
+ /* To make compatable with CR16 4.1 tools, the below 3-lines of
+ * code added. Refer: Development Tracker item #123 */
+ for (trap = cr16_traps; trap < (cr16_traps + NUMTRAPS); trap++)
+ if (trap->entry == (unsigned int) atoi (s))
+ return trap->entry;
+
+ as_bad (_("Unknown exception: `%s'"), s);
+ return 0;
+}
+
+/* Top level module where instruction parsing starts.
+ cr16_ins - data structure holds some information.
+ operands - holds the operands part of the whole instruction. */
+
+static void
+parse_insn (ins *insn, char *operands)
+{
+ int i;
+
+ /* Handle instructions with no operands. */
+ for (i = 0; cr16_no_op_insn[i] != NULL; i++)
+ {
+ if (streq (cr16_no_op_insn[i], instruction->mnemonic))
+ {
+ insn->nargs = 0;
+ return;
+ }
+ }
+
+ /* Handle 'excp' instructions. */
+ if (IS_INSN_MNEMONIC ("excp"))
+ {
+ insn->nargs = 1;
+ insn->arg[0].type = arg_ic;
+ insn->arg[0].constant = gettrap (operands);
+ insn->arg[0].X_op = O_constant;
+ return;
+ }
+
+ if (operands != NULL)
+ parse_operands (insn, operands);
+}
+
+/* bCC instruction requires special handling. */
+static char *
+get_b_cc (char * op)
+{
+ unsigned int i;
+ char op1[5];
+
+ for (i = 1; i < strlen (op); i++)
+ op1[i-1] = op[i];
+
+ op1[i-1] = '\0';
+
+ for (i = 0; i < cr16_num_cc ; i++)
+ if (streq (op1, cr16_b_cond_tab[i]))
+ return (char *) cr16_b_cond_tab[i];
+
+ return NULL;
+}
+
+/* bCC instruction requires special handling. */
+static int
+is_bcc_insn (char * op)
+{
+ if (!(streq (op, "bal") || streq (op, "beq0b") || streq (op, "bnq0b")
+ || streq (op, "beq0w") || streq (op, "bnq0w")))
+ if ((op[0] == 'b') && (get_b_cc (op) != NULL))
+ return 1;
+ return 0;
+}
+
+/* Cinv instruction requires special handling. */
+
+static int
+check_cinv_options (char * operand)
+{
+ char *p = operand;
+ int i_used = 0, u_used = 0, d_used = 0;
+
+ while (*++p != ']')
+ {
+ if (*p == ',' || *p == ' ')
+ continue;
+
+ else if (*p == 'i')
+ i_used = 1;
+ else if (*p == 'u')
+ u_used = 1;
+ else if (*p == 'd')
+ d_used = 1;
+ else
+ as_bad (_("Illegal `cinv' parameter: `%c'"), *p);
+ }
+
+ return 0;
+}
+
+/* Retrieve the opcode image of a given register pair.
+ If the register is illegal for the current instruction,
+ issue an error. */
+
+static int
+getregp_image (reg r)
+{
+ const reg_entry *reg;
+ char *reg_name;
+
+ /* Check whether the register is in registers table. */
+ if (r < MAX_REG)
+ reg = cr16_regptab + r;
+ /* Register not found. */
+ else
+ {
+ as_bad (_("Unknown register pair: `%d'"), r);
+ return 0;
+ }
+
+ reg_name = reg->name;
+
+/* Issue a error message when register pair is illegal. */
+#define RPAIR_IMAGE_ERR \
+ as_bad (_("Illegal register pair (`%s') in Instruction: `%s'"), \
+ reg_name, ins_parse); \
+ break;
+
+ switch (reg->type)
+ {
+ case CR16_RP_REGTYPE:
+ return reg->image;
+ default:
+ RPAIR_IMAGE_ERR;
+ }
+
+ return 0;
+}
+
+/* Retrieve the opcode image of a given index register pair.
+ If the register is illegal for the current instruction,
+ issue an error. */
+
+static int
+getidxregp_image (reg r)
+{
+ const reg_entry *reg;
+ char *reg_name;
+
+ /* Check whether the register is in registers table. */
+ if (r < MAX_REG)
+ reg = cr16_regptab + r;
+ /* Register not found. */
+ else
+ {
+ as_bad (_("Unknown register pair: `%d'"), r);
+ return 0;
+ }
+
+ reg_name = reg->name;
+
+/* Issue a error message when register pair is illegal. */
+#define IDX_RPAIR_IMAGE_ERR \
+ as_bad (_("Illegal index register pair (`%s') in Instruction: `%s'"), \
+ reg_name, ins_parse); \
+
+ if (reg->type == CR16_RP_REGTYPE)
+ {
+ switch (reg->image)
+ {
+ case 0: return 0; break;
+ case 2: return 1; break;
+ case 4: return 2; break;
+ case 6: return 3; break;
+ case 8: return 4; break;
+ case 10: return 5; break;
+ case 3: return 6; break;
+ case 5: return 7; break;
+ default:
+ break;
+ }
+ }
+
+ IDX_RPAIR_IMAGE_ERR;
+ return 0;
+}
+
+/* Retrieve the opcode image of a given processort register.
+ If the register is illegal for the current instruction,
+ issue an error. */
+static int
+getprocreg_image (reg r)
+{
+ const reg_entry *reg;
+ char *reg_name;
+
+ /* Check whether the register is in registers table. */
+ if (r < MAX_PREG)
+ reg = &cr16_pregtab[r - MAX_REG];
+ /* Register not found. */
+ else
+ {
+ as_bad (_("Unknown processor register : `%d'"), r);
+ return 0;
+ }
+
+ reg_name = reg->name;
+
+/* Issue a error message when register pair is illegal. */
+#define PROCREG_IMAGE_ERR \
+ as_bad (_("Illegal processor register (`%s') in Instruction: `%s'"), \
+ reg_name, ins_parse); \
+ break;
+
+ switch (reg->type)
+ {
+ case CR16_P_REGTYPE:
+ return reg->image;
+ default:
+ PROCREG_IMAGE_ERR;
+ }
+
+ return 0;
+}
+
+/* Retrieve the opcode image of a given processort register.
+ If the register is illegal for the current instruction,
+ issue an error. */
+static int
+getprocregp_image (reg r)
+{
+ const reg_entry *reg;
+ char *reg_name;
+ int pregptab_disp = 0;
+
+ /* Check whether the register is in registers table. */
+ if (r < MAX_PREG)
+ {
+ r = r - MAX_REG;
+ switch (r)
+ {
+ case 4: pregptab_disp = 1; break;
+ case 6: pregptab_disp = 2; break;
+ case 8:
+ case 9:
+ case 10:
+ pregptab_disp = 3; break;
+ case 12:
+ pregptab_disp = 4; break;
+ case 14:
+ pregptab_disp = 5; break;
+ default: break;
+ }
+ reg = &cr16_pregptab[r - pregptab_disp];
+ }
+ /* Register not found. */
+ else
+ {
+ as_bad (_("Unknown processor register (32 bit) : `%d'"), r);
+ return 0;
+ }
+
+ reg_name = reg->name;
+
+/* Issue a error message when register pair is illegal. */
+#define PROCREGP_IMAGE_ERR \
+ as_bad (_("Illegal 32 bit - processor register (`%s') in Instruction: `%s'"),\
+ reg_name, ins_parse); \
+ break;
+
+ switch (reg->type)
+ {
+ case CR16_P_REGTYPE:
+ return reg->image;
+ default:
+ PROCREGP_IMAGE_ERR;
+ }
+
+ return 0;
+}
+
+/* Routine used to represent integer X using NBITS bits. */
+
+static long
+getconstant (long x, int nbits)
+{
+ /* The following expression avoids overflow if
+ 'nbits' is the number of bits in 'bfd_vma'. */
+ return (x & ((((1 << (nbits - 1)) - 1) << 1) | 1));
+}
+
+/* Print a constant value to 'output_opcode':
+ ARG holds the operand's type and value.
+ SHIFT represents the location of the operand to be print into.
+ NBITS determines the size (in bits) of the constant. */
+
+static void
+print_constant (int nbits, int shift, argument *arg)
+{
+ unsigned long mask = 0;
+
+ long constant = getconstant (arg->constant, nbits);
+
+ switch (nbits)
+ {
+ case 32:
+ case 28:
+ /* mask the upper part of the constant, that is, the bits
+ going to the lowest byte of output_opcode[0].
+ The upper part of output_opcode[1] is always filled,
+ therefore it is always masked with 0xFFFF. */
+ mask = (1 << (nbits - 16)) - 1;
+ /* Divide the constant between two consecutive words :
+ 0 1 2 3
+ +---------+---------+---------+---------+
+ | | X X X X | x X x X | |
+ +---------+---------+---------+---------+
+ output_opcode[0] output_opcode[1] */
+
+ CR16_PRINT (0, (constant >> WORD_SHIFT) & mask, 0);
+ CR16_PRINT (1, (constant & 0xFFFF), WORD_SHIFT);
+ break;
+
+ case 21:
+ if ((nbits == 21) && (IS_INSN_TYPE (LD_STOR_INS))) nbits = 20;
+ case 24:
+ case 22:
+ case 20:
+ /* mask the upper part of the constant, that is, the bits
+ going to the lowest byte of output_opcode[0].
+ The upper part of output_opcode[1] is always filled,
+ therefore it is always masked with 0xFFFF. */
+ mask = (1 << (nbits - 16)) - 1;
+ /* Divide the constant between two consecutive words :
+ 0 1 2 3
+ +---------+---------+---------+---------+
+ | | X X X X | - X - X | |
+ +---------+---------+---------+---------+
+ output_opcode[0] output_opcode[1] */
+
+ if ((instruction->size > 2) && (shift == WORD_SHIFT))
+ {
+ if (arg->type == arg_idxrp)
+ {
+ CR16_PRINT (0, ((constant >> WORD_SHIFT) & mask) << 8, 0);
+ CR16_PRINT (1, (constant & 0xFFFF), WORD_SHIFT);
+ }
+ else
+ {
+ CR16_PRINT (0, (((((constant >> WORD_SHIFT) & mask) << 8) & 0x0f00) | ((((constant >> WORD_SHIFT) & mask) >> 4) & 0xf)),0);
+ CR16_PRINT (1, (constant & 0xFFFF), WORD_SHIFT);
+ }
+ }
+ else
+ CR16_PRINT (0, constant, shift);
+ break;
+
+ case 14:
+ if (arg->type == arg_idxrp)
+ {
+ if (instruction->size == 2)
+ {
+ CR16_PRINT (0, ((constant)&0xf), shift); // 0-3 bits
+ CR16_PRINT (0, ((constant>>4)&0x3), (shift+20)); // 4-5 bits
+ CR16_PRINT (0, ((constant>>6)&0x3), (shift+14)); // 6-7 bits
+ CR16_PRINT (0, ((constant>>8)&0x3f), (shift+8)); // 8-13 bits
+ }
+ else
+ CR16_PRINT (0, constant, shift);
+ }
+ break;
+
+ case 16:
+ case 12:
+ /* When instruction size is 3 and 'shift' is 16, a 16-bit constant is
+ always filling the upper part of output_opcode[1]. If we mistakenly
+ write it to output_opcode[0], the constant prefix (that is, 'match')
+ will be overriden.
+ 0 1 2 3
+ +---------+---------+---------+---------+
+ | 'match' | | X X X X | |
+ +---------+---------+---------+---------+
+ output_opcode[0] output_opcode[1] */
+
+ if ((instruction->size > 2) && (shift == WORD_SHIFT))
+ CR16_PRINT (1, constant, WORD_SHIFT);
+ else
+ CR16_PRINT (0, constant, shift);
+ break;
+
+ case 8:
+ CR16_PRINT (0, ((constant/2)&0xf), shift);
+ CR16_PRINT (0, ((constant/2)>>4), (shift+8));
+ break;
+
+ default:
+ CR16_PRINT (0, constant, shift);
+ break;
+ }
+}
+
+/* Print an operand to 'output_opcode', which later on will be
+ printed to the object file:
+ ARG holds the operand's type, size and value.
+ SHIFT represents the printing location of operand.
+ NBITS determines the size (in bits) of a constant operand. */
+
+static void
+print_operand (int nbits, int shift, argument *arg)
+{
+ switch (arg->type)
+ {
+ case arg_cc:
+ CR16_PRINT (0, arg->cc, shift);
+ break;
+
+ case arg_r:
+ CR16_PRINT (0, getreg_image (arg->r), shift);
+ break;
+
+ case arg_rp:
+ CR16_PRINT (0, getregp_image (arg->rp), shift);
+ break;
+
+ case arg_pr:
+ CR16_PRINT (0, getprocreg_image (arg->pr), shift);
+ break;
+
+ case arg_prp:
+ CR16_PRINT (0, getprocregp_image (arg->prp), shift);
+ break;
+
+ case arg_idxrp:
+ /* 16 12 8 6 0
+ +-----------------------------+
+ | r_index | disp | rp_base |
+ +-----------------------------+ */
+
+ if (instruction->size == 3)
+ {
+ CR16_PRINT (0, getidxregp_image (arg->rp), 0);
+ if (getreg_image (arg->i_r) == 12)
+ CR16_PRINT (0, 0, 3);
+ else
+ CR16_PRINT (0, 1, 3);
+ }
+ else
+ {
+ CR16_PRINT (0, getidxregp_image (arg->rp), 16);
+ if (getreg_image (arg->i_r) == 12)
+ CR16_PRINT (0, 0, 19);
+ else
+ CR16_PRINT (0, 1, 19);
+ }
+ print_constant (nbits, shift, arg);
+ break;
+
+ case arg_idxr:
+ if (getreg_image (arg->i_r) == 12)
+ if (IS_INSN_MNEMONIC ("cbitb") || IS_INSN_MNEMONIC ("sbitb")
+ || IS_INSN_MNEMONIC ("tbitb"))
+ CR16_PRINT (0, 0, 23);
+ else CR16_PRINT (0, 0, 24);
+ else
+ if (IS_INSN_MNEMONIC ("cbitb") || IS_INSN_MNEMONIC ("sbitb")
+ || IS_INSN_MNEMONIC ("tbitb"))
+ CR16_PRINT (0, 1, 23);
+ else CR16_PRINT (0, 1, 24);
+
+ print_constant (nbits, shift, arg);
+ break;
+
+ case arg_ic:
+ case arg_c:
+ print_constant (nbits, shift, arg);
+ break;
+
+ case arg_rbase:
+ CR16_PRINT (0, getreg_image (arg->r), shift);
+ break;
+
+ case arg_cr:
+ print_constant (nbits, shift , arg);
+ /* Add the register argument to the output_opcode. */
+ CR16_PRINT (0, getreg_image (arg->r), (shift+16));
+ break;
+
+ case arg_crp:
+ print_constant (nbits, shift , arg);
+ if (instruction->size > 1)
+ CR16_PRINT (0, getregp_image (arg->rp), (shift + 16));
+ else if (IS_INSN_TYPE (LD_STOR_INS) || (IS_INSN_TYPE (CSTBIT_INS)))
+ {
+ if (instruction->size == 2)
+ CR16_PRINT (0, getregp_image (arg->rp), (shift - 8));
+ else if (instruction->size == 1)
+ CR16_PRINT (0, getregp_image (arg->rp), 16);
+ }
+ else
+ CR16_PRINT (0, getregp_image (arg->rp), shift);
+ break;
+
+ default:
+ break;
+ }
+}
+
+/* Retrieve the number of operands for the current assembled instruction. */
+
+static int
+get_number_of_operands (void)
+{
+ int i;
+
+ for (i = 0; instruction->operands[i].op_type && i < MAX_OPERANDS; i++)
+ ;
+ return i;
+}
+
+/* Verify that the number NUM can be represented in BITS bits (that is,
+ within its permitted range), based on the instruction's FLAGS.
+ If UPDATE is nonzero, update the value of NUM if necessary.
+ Return OP_LEGAL upon success, actual error type upon failure. */
+
+static op_err
+check_range (long *num, int bits, int unsigned flags, int update)
+{
+ long min, max;
+ int retval = OP_LEGAL;
+ long value = *num;
+
+ if (bits == 0 && value > 0) return OP_OUT_OF_RANGE;
+
+ /* For hosts witah longs bigger than 32-bits make sure that the top
+ bits of a 32-bit negative value read in by the parser are set,
+ so that the correct comparisons are made. */
+ if (value & 0x80000000)
+ value |= (-1L << 31);
+
+
+ /* Verify operand value is even. */
+ if (flags & OP_EVEN)
+ {
+ if (value % 2)
+ return OP_NOT_EVEN;
+ }
+
+ if (flags & OP_DEC)
+ {
+ value -= 1;
+ if (update)
+ *num = value;
+ }
+
+ if (flags & OP_SHIFT)
+ {
+ value >>= 1;
+ if (update)
+ *num = value;
+ }
+ else if (flags & OP_SHIFT_DEC)
+ {
+ value = (value >> 1) - 1;
+ if (update)
+ *num = value;
+ }
+
+ if (flags & OP_ABS20)
+ {
+ if (value > 0xEFFFF)
+ return OP_OUT_OF_RANGE;
+ }
+
+ if (flags & OP_ESC)
+ {
+ if (value == 0xB || value == 0x9)
+ return OP_OUT_OF_RANGE;
+ else if (value == -1)
+ {
+ if (update)
+ *num = 9;
+ return retval;
+ }
+ }
+
+ if (flags & OP_ESC1)
+ {
+ if (value > 13)
+ return OP_OUT_OF_RANGE;
+ }
+
+ if (flags & OP_SIGNED)
+ {
+ max = (1 << (bits - 1)) - 1;
+ min = - (1 << (bits - 1));
+ if ((value > max) || (value < min))
+ retval = OP_OUT_OF_RANGE;
+ }
+ else if (flags & OP_UNSIGNED)
+ {
+ max = ((((1 << (bits - 1)) - 1) << 1) | 1);
+ min = 0;
+ if (((unsigned long) value > (unsigned long) max)
+ || ((unsigned long) value < (unsigned long) min))
+ retval = OP_OUT_OF_RANGE;
+ }
+ else if (flags & OP_NEG)
+ {
+ max = - 1;
+ min = - ((1 << (bits - 1))-1);
+ if ((value > max) || (value < min))
+ retval = OP_OUT_OF_RANGE;
+ }
+ return retval;
+}
+
+/* Bunch of error checkings.
+ The checks are made after a matching instruction was found. */
+
+static void
+warn_if_needed (ins *insn)
+{
+ /* If the post-increment address mode is used and the load/store
+ source register is the same as rbase, the result of the
+ instruction is undefined. */
+ if (IS_INSN_TYPE (LD_STOR_INS_INC))
+ {
+ /* Enough to verify that one of the arguments is a simple reg. */
+ if ((insn->arg[0].type == arg_r) || (insn->arg[1].type == arg_r))
+ if (insn->arg[0].r == insn->arg[1].r)
+ as_bad (_("Same src/dest register is used (`r%d'), result is undefined"), insn->arg[0].r);
+ }
+
+ if (IS_INSN_MNEMONIC ("pop")
+ || IS_INSN_MNEMONIC ("push")
+ || IS_INSN_MNEMONIC ("popret"))
+ {
+ unsigned int count = insn->arg[0].constant, reg_val;
+
+ /* Check if count operand caused to save/retrive the RA twice
+ to generate warning message. */
+ if (insn->nargs > 2)
+ {
+ reg_val = getreg_image (insn->arg[1].r);
+
+ if ( ((reg_val == 9) && (count > 7))
+ || ((reg_val == 10) && (count > 6))
+ || ((reg_val == 11) && (count > 5))
+ || ((reg_val == 12) && (count > 4))
+ || ((reg_val == 13) && (count > 2))
+ || ((reg_val == 14) && (count > 0)))
+ as_warn (_("RA register is saved twice."));
+
+ /* Check if the third operand is "RA" or "ra" */
+ if (!(((insn->arg[2].r) == ra) || ((insn->arg[2].r) == RA)))
+ as_bad (_("`%s' Illegal use of registers."), ins_parse);
+ }
+
+ if (insn->nargs > 1)
+ {
+ reg_val = getreg_image (insn->arg[1].r);
+
+ /* If register is a register pair ie r12/r13/r14 in operand1, then
+ the count constant should be validated. */
+ if (((reg_val == 11) && (count > 7))
+ || ((reg_val == 12) && (count > 6))
+ || ((reg_val == 13) && (count > 4))
+ || ((reg_val == 14) && (count > 2))
+ || ((reg_val == 15) && (count > 0)))
+ as_bad (_("`%s' Illegal count-register combination."), ins_parse);
+ }
+ else
+ {
+ /* Check if the operand is "RA" or "ra" */
+ if (!(((insn->arg[0].r) == ra) || ((insn->arg[0].r) == RA)))
+ as_bad (_("`%s' Illegal use of register."), ins_parse);
+ }
+ }
+
+ /* Some instruction assume the stack pointer as rptr operand.
+ Issue an error when the register to be loaded is also SP. */
+ if (instruction->flags & NO_SP)
+ {
+ if (getreg_image (insn->arg[1].r) == getreg_image (sp))
+ as_bad (_("`%s' has undefined result"), ins_parse);
+ }
+
+ /* If the rptr register is specified as one of the registers to be loaded,
+ the final contents of rptr are undefined. Thus, we issue an error. */
+ if (instruction->flags & NO_RPTR)
+ {
+ if ((1 << getreg_image (insn->arg[0].r)) & insn->arg[1].constant)
+ as_bad (_("Same src/dest register is used (`r%d'),result is undefined"),
+ getreg_image (insn->arg[0].r));
+ }
+}
+
+/* In some cases, we need to adjust the instruction pointer although a
+ match was already found. Here, we gather all these cases.
+ Returns 1 if instruction pointer was adjusted, otherwise 0. */
+
+static int
+adjust_if_needed (ins *insn ATTRIBUTE_UNUSED)
+{
+ int ret_value = 0;
+
+ if ((IS_INSN_TYPE (CSTBIT_INS)) || (IS_INSN_TYPE (LD_STOR_INS)))
+ {
+ if ((instruction->operands[0].op_type == abs24)
+ && ((insn->arg[0].constant) > 0xF00000))
+ {
+ insn->arg[0].constant &= 0xFFFFF;
+ instruction--;
+ ret_value = 1;
+ }
+ }
+
+ return ret_value;
+}
+
+/* Assemble a single instruction:
+ INSN is already parsed (that is, all operand values and types are set).
+ For instruction to be assembled, we need to find an appropriate template in
+ the instruction table, meeting the following conditions:
+ 1: Has the same number of operands.
+ 2: Has the same operand types.
+ 3: Each operand size is sufficient to represent the instruction's values.
+ Returns 1 upon success, 0 upon failure. */
+
+static int
+assemble_insn (char *mnemonic, ins *insn)
+{
+ /* Type of each operand in the current template. */
+ argtype cur_type[MAX_OPERANDS];
+ /* Size (in bits) of each operand in the current template. */
+ unsigned int cur_size[MAX_OPERANDS];
+ /* Flags of each operand in the current template. */
+ unsigned int cur_flags[MAX_OPERANDS];
+ /* Instruction type to match. */
+ unsigned int ins_type;
+ /* Boolean flag to mark whether a match was found. */
+ int match = 0;
+ int i;
+ /* Nonzero if an instruction with same number of operands was found. */
+ int found_same_number_of_operands = 0;
+ /* Nonzero if an instruction with same argument types was found. */
+ int found_same_argument_types = 0;
+ /* Nonzero if a constant was found within the required range. */
+ int found_const_within_range = 0;
+ /* Argument number of an operand with invalid type. */
+ int invalid_optype = -1;
+ /* Argument number of an operand with invalid constant value. */
+ int invalid_const = -1;
+ /* Operand error (used for issuing various constant error messages). */
+ op_err op_error, const_err = OP_LEGAL;
+
+/* Retrieve data (based on FUNC) for each operand of a given instruction. */
+#define GET_CURRENT_DATA(FUNC, ARRAY) \
+ for (i = 0; i < insn->nargs; i++) \
+ ARRAY[i] = FUNC (instruction->operands[i].op_type)
+
+#define GET_CURRENT_TYPE GET_CURRENT_DATA (get_optype, cur_type)
+#define GET_CURRENT_SIZE GET_CURRENT_DATA (get_opbits, cur_size)
+#define GET_CURRENT_FLAGS GET_CURRENT_DATA (get_opflags, cur_flags)
+
+ /* Instruction has no operands -> only copy the constant opcode. */
+ if (insn->nargs == 0)
+ {
+ output_opcode[0] = BIN (instruction->match, instruction->match_bits);
+ return 1;
+ }
+
+ /* In some case, same mnemonic can appear with different instruction types.
+ For example, 'storb' is supported with 3 different types :
+ LD_STOR_INS, LD_STOR_INS_INC, STOR_IMM_INS.
+ We assume that when reaching this point, the instruction type was
+ pre-determined. We need to make sure that the type stays the same
+ during a search for matching instruction. */
+ ins_type = CR16_INS_TYPE (instruction->flags);
+
+ while (/* Check that match is still not found. */
+ match != 1
+ /* Check we didn't get to end of table. */
+ && instruction->mnemonic != NULL
+ /* Check that the actual mnemonic is still available. */
+ && IS_INSN_MNEMONIC (mnemonic)
+ /* Check that the instruction type wasn't changed. */
+ && IS_INSN_TYPE (ins_type))
+ {
+ /* Check whether number of arguments is legal. */
+ if (get_number_of_operands () != insn->nargs)
+ goto next_insn;
+ found_same_number_of_operands = 1;
+
+ /* Initialize arrays with data of each operand in current template. */
+ GET_CURRENT_TYPE;
+ GET_CURRENT_SIZE;
+ GET_CURRENT_FLAGS;
+
+ /* Check for type compatibility. */
+ for (i = 0; i < insn->nargs; i++)
+ {
+ if (cur_type[i] != insn->arg[i].type)
+ {
+ if (invalid_optype == -1)
+ invalid_optype = i + 1;
+ goto next_insn;
+ }
+ }
+ found_same_argument_types = 1;
+
+ for (i = 0; i < insn->nargs; i++)
+ {
+ /* If 'bal' instruction size is '2' and reg operand is not 'ra'
+ then goto next instruction. */
+ if (IS_INSN_MNEMONIC ("bal") && (i == 0)
+ && (instruction->size == 2) && (insn->arg[i].rp != 14))
+ goto next_insn;
+
+ /* If 'storb' instruction with 'sp' reg and 16-bit disp of
+ * reg-pair, leads to undifined trap, so this should use
+ * 20-bit disp of reg-pair. */
+ if (IS_INSN_MNEMONIC ("storb") && (instruction->size == 2)
+ && (insn->arg[i].r == 15) && (insn->arg[i + 1].type == arg_crp))
+ goto next_insn;
+
+ /* Only check range - don't update the constant's value, since the
+ current instruction may not be the last we try to match.
+ The constant's value will be updated later, right before printing
+ it to the object file. */
+ if ((insn->arg[i].X_op == O_constant)
+ && (op_error = check_range (&insn->arg[i].constant, cur_size[i],
+ cur_flags[i], 0)))
+ {
+ if (invalid_const == -1)
+ {
+ invalid_const = i + 1;
+ const_err = op_error;
+ }
+ goto next_insn;
+ }
+ /* For symbols, we make sure the relocation size (which was already
+ determined) is sufficient. */
+ else if ((insn->arg[i].X_op == O_symbol)
+ && ((bfd_reloc_type_lookup (stdoutput, insn->rtype))->bitsize
+ > cur_size[i]))
+ goto next_insn;
+ }
+ found_const_within_range = 1;
+
+ /* If we got till here -> Full match is found. */
+ match = 1;
+ break;
+
+/* Try again with next instruction. */
+next_insn:
+ instruction++;
+ }
+
+ if (!match)
+ {
+ /* We haven't found a match - instruction can't be assembled. */
+ if (!found_same_number_of_operands)
+ as_bad (_("Incorrect number of operands"));
+ else if (!found_same_argument_types)
+ as_bad (_("Illegal type of operand (arg %d)"), invalid_optype);
+ else if (!found_const_within_range)
+ {
+ switch (const_err)
+ {
+ case OP_OUT_OF_RANGE:
+ as_bad (_("Operand out of range (arg %d)"), invalid_const);
+ break;
+ case OP_NOT_EVEN:
+ as_bad (_("Operand has odd displacement (arg %d)"), invalid_const);
+ break;
+ default:
+ as_bad (_("Illegal operand (arg %d)"), invalid_const);
+ break;
+ }
+ }
+
+ return 0;
+ }
+ else
+ /* Full match - print the encoding to output file. */
+ {
+ /* Make further checkings (such that couldn't be made earlier).
+ Warn the user if necessary. */
+ warn_if_needed (insn);
+
+ /* Check whether we need to adjust the instruction pointer. */
+ if (adjust_if_needed (insn))
+ /* If instruction pointer was adjusted, we need to update
+ the size of the current template operands. */
+ GET_CURRENT_SIZE;
+
+ for (i = 0; i < insn->nargs; i++)
+ {
+ int j = instruction->flags & REVERSE_MATCH ?
+ i == 0 ? 1 :
+ i == 1 ? 0 : i :
+ i;
+
+ /* This time, update constant value before printing it. */
+ if ((insn->arg[j].X_op == O_constant)
+ && (check_range (&insn->arg[j].constant, cur_size[j],
+ cur_flags[j], 1) != OP_LEGAL))
+ as_fatal (_("Illegal operand (arg %d)"), j+1);
+ }
+
+ /* First, copy the instruction's opcode. */
+ output_opcode[0] = BIN (instruction->match, instruction->match_bits);
+
+ for (i = 0; i < insn->nargs; i++)
+ {
+ /* For BAL (ra),disp17 instuction only. And also set the
+ DISP24a relocation type. */
+ if (IS_INSN_MNEMONIC ("bal") && (instruction->size == 2) && i == 0)
+ {
+ insn->rtype = BFD_RELOC_CR16_DISP24a;
+ continue;
+ }
+ cur_arg_num = i;
+ print_operand (cur_size[i], instruction->operands[i].shift,
+ &insn->arg[i]);
+ }
+ }
+
+ return 1;
+}
+
+/* Print the instruction.
+ Handle also cases where the instruction is relaxable/relocatable. */
+
+static void
+print_insn (ins *insn)
+{
+ unsigned int i, j, insn_size;
+ char *this_frag;
+ unsigned short words[4];
+ int addr_mod;
+
+ /* Arrange the insn encodings in a WORD size array. */
+ for (i = 0, j = 0; i < 2; i++)
+ {
+ words[j++] = (output_opcode[i] >> 16) & 0xFFFF;
+ words[j++] = output_opcode[i] & 0xFFFF;
+ }
+
+ insn_size = instruction->size;
+ this_frag = frag_more (insn_size * 2);
+
+ /* Handle relocation. */
+ if ((relocatable) && (insn->rtype != BFD_RELOC_NONE))
+ {
+ reloc_howto_type *reloc_howto;
+ int size;
+
+ reloc_howto = bfd_reloc_type_lookup (stdoutput, insn->rtype);
+
+ if (!reloc_howto)
+ abort ();
+
+ size = bfd_get_reloc_size (reloc_howto);
+
+ if (size < 1 || size > 4)
+ abort ();
+
+ fix_new_exp (frag_now, this_frag - frag_now->fr_literal,
+ size, &insn->exp, reloc_howto->pc_relative,
+ insn->rtype);
+ }
+
+ /* Verify a 2-byte code alignment. */
+ addr_mod = frag_now_fix () & 1;
+ if (frag_now->has_code && frag_now->insn_addr != addr_mod)
+ as_bad (_("instruction address is not a multiple of 2"));
+ frag_now->insn_addr = addr_mod;
+ frag_now->has_code = 1;
+
+ /* Write the instruction encoding to frag. */
+ for (i = 0; i < insn_size; i++)
+ {
+ md_number_to_chars (this_frag, (valueT) words[i], 2);
+ this_frag += 2;
+ }
+}
+
+/* This is the guts of the machine-dependent assembler. OP points to a
+ machine dependent instruction. This function is supposed to emit
+ the frags/bytes it assembles to. */
+
+void
+md_assemble (char *op)
+{
+ ins cr16_ins;
+ char *param, param1[32];
+ char c;
+
+ /* Reset global variables for a new instruction. */
+ reset_vars (op);
+
+ /* Strip the mnemonic. */
+ for (param = op; *param != 0 && !ISSPACE (*param); param++)
+ ;
+ c = *param;
+ *param++ = '\0';
+
+ /* bCC instuctions and adjust the mnemonic by adding extra white spaces. */
+ if (is_bcc_insn (op))
+ {
+ strcpy (param1, get_b_cc (op));
+ op = "b";
+ strcat (param1,",");
+ strcat (param1, param);
+ param = (char *) &param1;
+ }
+
+ /* Checking the cinv options and adjust the mnemonic by removing the
+ extra white spaces. */
+ if (streq ("cinv", op))
+ {
+ /* Validate the cinv options. */
+ check_cinv_options (param);
+ strcat (op, param);
+ }
+
+ /* MAPPING - SHIFT INSN, if imm4/imm16 positive values
+ lsh[b/w] imm4/imm6, reg ==> ashu[b/w] imm4/imm16, reg
+ as CR16 core doesn't support lsh[b/w] right shift operaions. */
+ if ((streq ("lshb", op) || streq ("lshw", op) || streq ("lshd", op))
+ && (param [0] == '$'))
+ {
+ strcpy (param1, param);
+ /* Find the instruction. */
+ instruction = (const inst *) hash_find (cr16_inst_hash, op);
+ parse_operands (&cr16_ins, param1);
+ if (((&cr16_ins)->arg[0].type == arg_ic)
+ && ((&cr16_ins)->arg[0].constant >= 0))
+ {
+ if (streq ("lshb", op))
+ op = "ashub";
+ else if (streq ("lshd", op))
+ op = "ashud";
+ else
+ op = "ashuw";
+ }
+ }
+
+ /* Find the instruction. */
+ instruction = (const inst *) hash_find (cr16_inst_hash, op);
+ if (instruction == NULL)
+ {
+ as_bad (_("Unknown opcode: `%s'"), op);
+ return;
+ }
+
+ /* Tie dwarf2 debug info to the address at the start of the insn. */
+ dwarf2_emit_insn (0);
+
+ /* Parse the instruction's operands. */
+ parse_insn (&cr16_ins, param);
+
+ /* Assemble the instruction - return upon failure. */
+ if (assemble_insn (op, &cr16_ins) == 0)
+ return;
+
+ /* Print the instruction. */
+ print_insn (&cr16_ins);
+}
diff --git a/contrib/binutils/gas/config/tc-cr16.h b/contrib/binutils/gas/config/tc-cr16.h
new file mode 100644
index 0000000..6d06151
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-cr16.h
@@ -0,0 +1,73 @@
+/* tc-cr16.h -- Header file for tc-cr16.c, the CR16 GAS port.
+ Copyright 2007 Free Software Foundation, Inc.
+
+ Contributed by M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the
+ Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#ifndef TC_CR16_H
+#define TC_CR16_H
+
+#define TC_CR16 1
+
+#define TARGET_BYTES_BIG_ENDIAN 0
+
+#define TARGET_FORMAT "elf32-cr16"
+#define TARGET_ARCH bfd_arch_cr16
+
+#define WORKING_DOT_WORD
+#define LOCAL_LABEL_PREFIX '.'
+
+#define md_undefined_symbol(s) 0
+#define md_number_to_chars number_to_chars_littleendian
+
+/* We do relaxing in the assembler as well as the linker. */
+extern const struct relax_type md_relax_table[];
+#define TC_GENERIC_RELAX_TABLE md_relax_table
+
+/* We do not want to adjust any relocations to make implementation of
+ linker relaxations easier. */
+#define tc_fix_adjustable(fixP) 0
+
+/* We need to force out some relocations when relaxing. */
+#define TC_FORCE_RELOCATION(FIXP) cr16_force_relocation (FIXP)
+extern int cr16_force_relocation (struct fix *);
+
+/* Fixup debug sections since we will never relax them. */
+#define TC_LINKRELAX_FIXUP(seg) (seg->flags & SEC_ALLOC)
+
+/* CR16 instructions, with operands included, are a multiple
+ of two bytes long. */
+#define DWARF2_LINE_MIN_INSN_LENGTH 2
+
+extern void cr16_cons_fix_new (struct frag *, int, int, struct expressionS *);
+/* This is called by emit_expr when creating a reloc for a cons.
+ We could use the definition there, except that we want to handle
+ the CR16 reloc type specially, rather than the BFD_RELOC type. */
+#define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP) \
+ cr16_cons_fix_new (FRAG, OFF, LEN, EXP)
+
+/* Give an error if a frag containing code is not aligned to a 2-byte
+ boundary. */
+#define md_frag_check(FRAGP) \
+ if ((FRAGP)->has_code \
+ && (((FRAGP)->fr_address + (FRAGP)->insn_addr) & 1) != 0) \
+ as_bad_where ((FRAGP)->fr_file, (FRAGP)->fr_line, \
+ _("instruction address is not a multiple of 2"));
+
+#endif /* TC_CR16_H */
diff --git a/contrib/binutils/gas/config/tc-i386.c b/contrib/binutils/gas/config/tc-i386.c
index be384bc..296fdcd 100644
--- a/contrib/binutils/gas/config/tc-i386.c
+++ b/contrib/binutils/gas/config/tc-i386.c
@@ -1,6 +1,6 @@
-/* i386.c -- Assemble code for the Intel 80386
+/* tc-i386.c -- Assemble code for the Intel 80386
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -32,7 +32,6 @@
#include "subsegs.h"
#include "dwarf2dbg.h"
#include "dw2gencfi.h"
-#include "opcode/i386.h"
#include "elf/x86-64.h"
#ifndef REGISTER_WARNINGS
@@ -63,54 +62,39 @@
#endif
#endif
-static INLINE unsigned int mode_from_disp_size PARAMS ((unsigned int));
-static INLINE int fits_in_signed_byte PARAMS ((offsetT));
-static INLINE int fits_in_unsigned_byte PARAMS ((offsetT));
-static INLINE int fits_in_unsigned_word PARAMS ((offsetT));
-static INLINE int fits_in_signed_word PARAMS ((offsetT));
-static INLINE int fits_in_unsigned_long PARAMS ((offsetT));
-static INLINE int fits_in_signed_long PARAMS ((offsetT));
-static int smallest_imm_type PARAMS ((offsetT));
-static offsetT offset_in_range PARAMS ((offsetT, int));
-static int add_prefix PARAMS ((unsigned int));
-static void set_code_flag PARAMS ((int));
-static void set_16bit_gcc_code_flag PARAMS ((int));
-static void set_intel_syntax PARAMS ((int));
-static void set_cpu_arch PARAMS ((int));
+static void set_code_flag (int);
+static void set_16bit_gcc_code_flag (int);
+static void set_intel_syntax (int);
+static void set_cpu_arch (int);
#ifdef TE_PE
-static void pe_directive_secrel PARAMS ((int));
+static void pe_directive_secrel (int);
#endif
-static void signed_cons PARAMS ((int));
-static char *output_invalid PARAMS ((int c));
-static int i386_operand PARAMS ((char *operand_string));
-static int i386_intel_operand PARAMS ((char *operand_string, int got_a_float));
-static const reg_entry *parse_register PARAMS ((char *reg_string,
- char **end_op));
-static char *parse_insn PARAMS ((char *, char *));
-static char *parse_operands PARAMS ((char *, const char *));
-static void swap_operands PARAMS ((void));
-static void optimize_imm PARAMS ((void));
-static void optimize_disp PARAMS ((void));
-static int match_template PARAMS ((void));
-static int check_string PARAMS ((void));
-static int process_suffix PARAMS ((void));
-static int check_byte_reg PARAMS ((void));
-static int check_long_reg PARAMS ((void));
-static int check_qword_reg PARAMS ((void));
-static int check_word_reg PARAMS ((void));
-static int finalize_imm PARAMS ((void));
-static int process_operands PARAMS ((void));
-static const seg_entry *build_modrm_byte PARAMS ((void));
-static void output_insn PARAMS ((void));
-static void output_branch PARAMS ((void));
-static void output_jump PARAMS ((void));
-static void output_interseg_jump PARAMS ((void));
-static void output_imm PARAMS ((fragS *insn_start_frag,
- offsetT insn_start_off));
-static void output_disp PARAMS ((fragS *insn_start_frag,
- offsetT insn_start_off));
+static void signed_cons (int);
+static char *output_invalid (int c);
+static int i386_operand (char *);
+static int i386_intel_operand (char *, int);
+static const reg_entry *parse_register (char *, char **);
+static char *parse_insn (char *, char *);
+static char *parse_operands (char *, const char *);
+static void swap_operands (void);
+static void swap_2_operands (int, int);
+static void optimize_imm (void);
+static void optimize_disp (void);
+static int match_template (void);
+static int check_string (void);
+static int process_suffix (void);
+static int check_byte_reg (void);
+static int check_long_reg (void);
+static int check_qword_reg (void);
+static int check_word_reg (void);
+static int finalize_imm (void);
+static int process_operands (void);
+static const seg_entry *build_modrm_byte (void);
+static void output_insn (void);
+static void output_imm (fragS *, offsetT);
+static void output_disp (fragS *, offsetT);
#ifndef I386COFF
-static void s_bss PARAMS ((int));
+static void s_bss (int);
#endif
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
static void handle_large_common (int small ATTRIBUTE_UNUSED);
@@ -271,8 +255,9 @@ static i386_insn i;
/* Possible templates for current insn. */
static const templates *current_templates;
-/* Per instruction expressionS buffers: 2 displacements & 2 immediate max. */
-static expressionS disp_expressions[2], im_expressions[2];
+/* Per instruction expressionS buffers: max displacements & immediates. */
+static expressionS disp_expressions[MAX_MEMORY_OPERANDS];
+static expressionS im_expressions[MAX_IMMEDIATE_OPERANDS];
/* Current operand we are working on. */
static int this_operand;
@@ -305,6 +290,9 @@ static int intel_syntax = 0;
/* 1 if register prefix % not required. */
static int allow_naked_reg = 0;
+/* Register prefix used for error message. */
+static const char *register_prefix = "%";
+
/* Used in 16 bit gcc mode to add an l suffix to call, ret, enter,
leave, push, and pop instructions so that gcc has the same stack
frame as in 32 bit mode. */
@@ -323,6 +311,21 @@ static const char *cpu_sub_arch_name = NULL;
/* CPU feature flags. */
static unsigned int cpu_arch_flags = CpuUnknownFlags | CpuNo64;
+/* If we have selected a cpu we are generating instructions for. */
+static int cpu_arch_tune_set = 0;
+
+/* Cpu we are generating instructions for. */
+static enum processor_type cpu_arch_tune = PROCESSOR_UNKNOWN;
+
+/* CPU feature flags of cpu we are generating instructions for. */
+static unsigned int cpu_arch_tune_flags = 0;
+
+/* CPU instruction set architecture used. */
+static enum processor_type cpu_arch_isa = PROCESSOR_UNKNOWN;
+
+/* CPU feature flags of instruction set architecture used. */
+static unsigned int cpu_arch_isa_flags = 0;
+
/* If set, conditional jumps are not automatically promoted to handle
larger than a byte offset. */
static unsigned int no_cond_jump_promotion = 0;
@@ -415,35 +418,106 @@ const relax_typeS md_relax_table[] =
{0, 0, 4, 0}
};
-static const arch_entry cpu_arch[] = {
- {"i8086", Cpu086 },
- {"i186", Cpu086|Cpu186 },
- {"i286", Cpu086|Cpu186|Cpu286 },
- {"i386", Cpu086|Cpu186|Cpu286|Cpu386 },
- {"i486", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486 },
- {"i586", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586 },
- {"i686", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686 },
- {"pentium", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586 },
- {"pentiumpro",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686 },
- {"pentiumii", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX },
- {"pentiumiii",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuMMX2|CpuSSE },
- {"pentium4", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX|CpuMMX2|CpuSSE|CpuSSE2 },
- {"prescott", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuPNI },
- {"k6", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX },
- {"k6_2", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX|Cpu3dnow },
- {"athlon", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA },
- {"sledgehammer",Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuSledgehammer|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2 },
- {"opteron", Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuAthlon|CpuSledgehammer|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2 },
- {".mmx", CpuMMX },
- {".sse", CpuMMX|CpuMMX2|CpuSSE },
- {".sse2", CpuMMX|CpuMMX2|CpuSSE|CpuSSE2 },
- {".sse3", CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3 },
- {".3dnow", CpuMMX|Cpu3dnow },
- {".3dnowa", CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA },
- {".padlock", CpuPadLock },
- {".pacifica", CpuSVME },
- {".svme", CpuSVME },
- {NULL, 0 }
+static const arch_entry cpu_arch[] =
+{
+ {"generic32", PROCESSOR_GENERIC32,
+ Cpu186|Cpu286|Cpu386},
+ {"generic64", PROCESSOR_GENERIC64,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
+ |CpuMMX2|CpuSSE|CpuSSE2},
+ {"i8086", PROCESSOR_UNKNOWN,
+ 0},
+ {"i186", PROCESSOR_UNKNOWN,
+ Cpu186},
+ {"i286", PROCESSOR_UNKNOWN,
+ Cpu186|Cpu286},
+ {"i386", PROCESSOR_GENERIC32,
+ Cpu186|Cpu286|Cpu386},
+ {"i486", PROCESSOR_I486,
+ Cpu186|Cpu286|Cpu386|Cpu486},
+ {"i586", PROCESSOR_PENTIUM,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586},
+ {"i686", PROCESSOR_PENTIUMPRO,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686},
+ {"pentium", PROCESSOR_PENTIUM,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586},
+ {"pentiumpro",PROCESSOR_PENTIUMPRO,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686},
+ {"pentiumii", PROCESSOR_PENTIUMPRO,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX},
+ {"pentiumiii",PROCESSOR_PENTIUMPRO,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuMMX|CpuMMX2|CpuSSE},
+ {"pentium4", PROCESSOR_PENTIUM4,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
+ |CpuMMX2|CpuSSE|CpuSSE2},
+ {"prescott", PROCESSOR_NOCONA,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
+ |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
+ {"nocona", PROCESSOR_NOCONA,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
+ |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
+ {"yonah", PROCESSOR_CORE,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
+ |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
+ {"core", PROCESSOR_CORE,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
+ |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
+ {"merom", PROCESSOR_CORE2,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
+ |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3},
+ {"core2", PROCESSOR_CORE2,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuMMX
+ |CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3},
+ {"k6", PROCESSOR_K6,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX},
+ {"k6_2", PROCESSOR_K6,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|CpuK6|CpuMMX|Cpu3dnow},
+ {"athlon", PROCESSOR_ATHLON,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6
+ |CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA},
+ {"sledgehammer", PROCESSOR_K8,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6
+ |CpuSledgehammer|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2},
+ {"opteron", PROCESSOR_K8,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6
+ |CpuSledgehammer|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2},
+ {"k8", PROCESSOR_K8,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6
+ |CpuSledgehammer|CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2},
+ {"amdfam10", PROCESSOR_AMDFAM10,
+ Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuK6|CpuSledgehammer
+ |CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a
+ |CpuABM},
+ {".mmx", PROCESSOR_UNKNOWN,
+ CpuMMX},
+ {".sse", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|CpuSSE},
+ {".sse2", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|CpuSSE|CpuSSE2},
+ {".sse3", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3},
+ {".ssse3", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3},
+ {".sse4.1", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4_1},
+ {".sse4.2", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4},
+ {".sse4", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSSE3|CpuSSE4},
+ {".3dnow", PROCESSOR_UNKNOWN,
+ CpuMMX|Cpu3dnow},
+ {".3dnowa", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|Cpu3dnow|Cpu3dnowA},
+ {".padlock", PROCESSOR_UNKNOWN,
+ CpuPadLock},
+ {".pacifica", PROCESSOR_UNKNOWN,
+ CpuSVME},
+ {".svme", PROCESSOR_UNKNOWN,
+ CpuSVME},
+ {".sse4a", PROCESSOR_UNKNOWN,
+ CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuSSE4a},
+ {".abm", PROCESSOR_UNKNOWN,
+ CpuABM}
};
const pseudo_typeS md_pseudo_table[] =
@@ -473,7 +547,7 @@ const pseudo_typeS md_pseudo_table[] =
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
{"largecomm", handle_large_common, 0},
#else
- {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0},
+ {"file", (void (*) (int)) dwarf2_directive_file, 0},
{"loc", dwarf2_directive_loc, 0},
{"loc_mark_labels", dwarf2_directive_loc_mark_labels, 0},
#endif
@@ -493,9 +567,7 @@ static struct hash_control *op_hash;
static struct hash_control *reg_hash;
void
-i386_align_code (fragP, count)
- fragS *fragP;
- int count;
+i386_align_code (fragS *fragP, int count)
{
/* Various efficient no-op patterns for aligning code labels.
Note: Don't try to assemble the instructions in the comments.
@@ -503,7 +575,7 @@ i386_align_code (fragP, count)
static const char f32_1[] =
{0x90}; /* nop */
static const char f32_2[] =
- {0x89,0xf6}; /* movl %esi,%esi */
+ {0x66,0x90}; /* xchg %ax,%ax */
static const char f32_3[] =
{0x8d,0x76,0x00}; /* leal 0(%esi),%esi */
static const char f32_4[] =
@@ -563,13 +635,141 @@ i386_align_code (fragP, count)
f32_1, f32_2, f16_3, f16_4, f16_5, f16_6, f16_7, f16_8,
f32_15, f32_15, f32_15, f32_15, f32_15, f32_15, f32_15
};
+ /* nopl (%[re]ax) */
+ static const char alt_3[] =
+ {0x0f,0x1f,0x00};
+ /* nopl 0(%[re]ax) */
+ static const char alt_4[] =
+ {0x0f,0x1f,0x40,0x00};
+ /* nopl 0(%[re]ax,%[re]ax,1) */
+ static const char alt_5[] =
+ {0x0f,0x1f,0x44,0x00,0x00};
+ /* nopw 0(%[re]ax,%[re]ax,1) */
+ static const char alt_6[] =
+ {0x66,0x0f,0x1f,0x44,0x00,0x00};
+ /* nopl 0L(%[re]ax) */
+ static const char alt_7[] =
+ {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00};
+ /* nopl 0L(%[re]ax,%[re]ax,1) */
+ static const char alt_8[] =
+ {0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ /* nopw 0L(%[re]ax,%[re]ax,1) */
+ static const char alt_9[] =
+ {0x66,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ /* nopw %cs:0L(%[re]ax,%[re]ax,1) */
+ static const char alt_10[] =
+ {0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ /* data16
+ nopw %cs:0L(%[re]ax,%[re]ax,1) */
+ static const char alt_long_11[] =
+ {0x66,
+ 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ /* data16
+ data16
+ nopw %cs:0L(%[re]ax,%[re]ax,1) */
+ static const char alt_long_12[] =
+ {0x66,
+ 0x66,
+ 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ /* data16
+ data16
+ data16
+ nopw %cs:0L(%[re]ax,%[re]ax,1) */
+ static const char alt_long_13[] =
+ {0x66,
+ 0x66,
+ 0x66,
+ 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ /* data16
+ data16
+ data16
+ data16
+ nopw %cs:0L(%[re]ax,%[re]ax,1) */
+ static const char alt_long_14[] =
+ {0x66,
+ 0x66,
+ 0x66,
+ 0x66,
+ 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ /* data16
+ data16
+ data16
+ data16
+ data16
+ nopw %cs:0L(%[re]ax,%[re]ax,1) */
+ static const char alt_long_15[] =
+ {0x66,
+ 0x66,
+ 0x66,
+ 0x66,
+ 0x66,
+ 0x66,0x2e,0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ /* nopl 0(%[re]ax,%[re]ax,1)
+ nopw 0(%[re]ax,%[re]ax,1) */
+ static const char alt_short_11[] =
+ {0x0f,0x1f,0x44,0x00,0x00,
+ 0x66,0x0f,0x1f,0x44,0x00,0x00};
+ /* nopw 0(%[re]ax,%[re]ax,1)
+ nopw 0(%[re]ax,%[re]ax,1) */
+ static const char alt_short_12[] =
+ {0x66,0x0f,0x1f,0x44,0x00,0x00,
+ 0x66,0x0f,0x1f,0x44,0x00,0x00};
+ /* nopw 0(%[re]ax,%[re]ax,1)
+ nopl 0L(%[re]ax) */
+ static const char alt_short_13[] =
+ {0x66,0x0f,0x1f,0x44,0x00,0x00,
+ 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00};
+ /* nopl 0L(%[re]ax)
+ nopl 0L(%[re]ax) */
+ static const char alt_short_14[] =
+ {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00,
+ 0x0f,0x1f,0x80,0x00,0x00,0x00,0x00};
+ /* nopl 0L(%[re]ax)
+ nopl 0L(%[re]ax,%[re]ax,1) */
+ static const char alt_short_15[] =
+ {0x0f,0x1f,0x80,0x00,0x00,0x00,0x00,
+ 0x0f,0x1f,0x84,0x00,0x00,0x00,0x00,0x00};
+ static const char *const alt_short_patt[] = {
+ f32_1, f32_2, alt_3, alt_4, alt_5, alt_6, alt_7, alt_8,
+ alt_9, alt_10, alt_short_11, alt_short_12, alt_short_13,
+ alt_short_14, alt_short_15
+ };
+ static const char *const alt_long_patt[] = {
+ f32_1, f32_2, alt_3, alt_4, alt_5, alt_6, alt_7, alt_8,
+ alt_9, alt_10, alt_long_11, alt_long_12, alt_long_13,
+ alt_long_14, alt_long_15
+ };
if (count <= 0 || count > 15)
return;
- /* The recommended way to pad 64bit code is to use NOPs preceded by
- maximally four 0x66 prefixes. Balance the size of nops. */
- if (flag_code == CODE_64BIT)
+ /* We need to decide which NOP sequence to use for 32bit and
+ 64bit. When -mtune= is used:
+
+ 1. For PROCESSOR_I486, PROCESSOR_PENTIUM and PROCESSOR_GENERIC32,
+ f32_patt will be used.
+ 2. For PROCESSOR_K8 and PROCESSOR_AMDFAM10 in 64bit, NOPs with
+ 0x66 prefix will be used.
+ 3. For PROCESSOR_CORE2, alt_long_patt will be used.
+ 4. For PROCESSOR_PENTIUMPRO, PROCESSOR_PENTIUM4, PROCESSOR_NOCONA,
+ PROCESSOR_CORE, PROCESSOR_CORE2, PROCESSOR_K6, PROCESSOR_ATHLON
+ and PROCESSOR_GENERIC64, alt_short_patt will be used.
+
+ When -mtune= isn't used, alt_short_patt will be used if
+ cpu_arch_isa_flags has Cpu686. Otherwise, f32_patt will be used.
+
+ When -march= or .arch is used, we can't use anything beyond
+ cpu_arch_isa_flags. */
+
+ if (flag_code == CODE_16BIT)
+ {
+ memcpy (fragP->fr_literal + fragP->fr_fix,
+ f16_patt[count - 1], count);
+ if (count > 8)
+ /* Adjust jump offset. */
+ fragP->fr_literal[fragP->fr_fix + 1] = count - 2;
+ }
+ else if (flag_code == CODE_64BIT && cpu_arch_tune == PROCESSOR_K8)
{
int i;
int nnops = (count + 3) / 4;
@@ -577,6 +777,8 @@ i386_align_code (fragP, count)
int remains = count - nnops * len;
int pos = 0;
+ /* The recommended way to pad 64bit code is to use NOPs preceded
+ by maximally four 0x66 prefixes. Balance the size of nops. */
for (i = 0; i < remains; i++)
{
memset (fragP->fr_literal + fragP->fr_fix + pos, 0x66, len);
@@ -591,57 +793,121 @@ i386_align_code (fragP, count)
}
}
else
- if (flag_code == CODE_16BIT)
- {
- memcpy (fragP->fr_literal + fragP->fr_fix,
- f16_patt[count - 1], count);
- if (count > 8)
- /* Adjust jump offset. */
- fragP->fr_literal[fragP->fr_fix + 1] = count - 2;
- }
- else
+ {
+ const char *const *patt = NULL;
+
+ if (cpu_arch_isa == PROCESSOR_UNKNOWN)
+ {
+ /* PROCESSOR_UNKNOWN means that all ISAs may be used. */
+ switch (cpu_arch_tune)
+ {
+ case PROCESSOR_UNKNOWN:
+ /* We use cpu_arch_isa_flags to check if we SHOULD
+ optimize for Cpu686. */
+ if ((cpu_arch_isa_flags & Cpu686) != 0)
+ patt = alt_short_patt;
+ else
+ patt = f32_patt;
+ break;
+ case PROCESSOR_CORE2:
+ patt = alt_long_patt;
+ break;
+ case PROCESSOR_PENTIUMPRO:
+ case PROCESSOR_PENTIUM4:
+ case PROCESSOR_NOCONA:
+ case PROCESSOR_CORE:
+ case PROCESSOR_K6:
+ case PROCESSOR_ATHLON:
+ case PROCESSOR_K8:
+ case PROCESSOR_GENERIC64:
+ case PROCESSOR_AMDFAM10:
+ patt = alt_short_patt;
+ break;
+ case PROCESSOR_I486:
+ case PROCESSOR_PENTIUM:
+ case PROCESSOR_GENERIC32:
+ patt = f32_patt;
+ break;
+ }
+ }
+ else
+ {
+ switch (cpu_arch_tune)
+ {
+ case PROCESSOR_UNKNOWN:
+ /* When cpu_arch_isa is net, cpu_arch_tune shouldn't be
+ PROCESSOR_UNKNOWN. */
+ abort ();
+ break;
+
+ case PROCESSOR_I486:
+ case PROCESSOR_PENTIUM:
+ case PROCESSOR_PENTIUMPRO:
+ case PROCESSOR_PENTIUM4:
+ case PROCESSOR_NOCONA:
+ case PROCESSOR_CORE:
+ case PROCESSOR_K6:
+ case PROCESSOR_ATHLON:
+ case PROCESSOR_K8:
+ case PROCESSOR_AMDFAM10:
+ case PROCESSOR_GENERIC32:
+ /* We use cpu_arch_isa_flags to check if we CAN optimize
+ for Cpu686. */
+ if ((cpu_arch_isa_flags & Cpu686) != 0)
+ patt = alt_short_patt;
+ else
+ patt = f32_patt;
+ break;
+ case PROCESSOR_CORE2:
+ if ((cpu_arch_isa_flags & Cpu686) != 0)
+ patt = alt_long_patt;
+ else
+ patt = f32_patt;
+ break;
+ case PROCESSOR_GENERIC64:
+ patt = alt_short_patt;
+ break;
+ }
+ }
+
memcpy (fragP->fr_literal + fragP->fr_fix,
- f32_patt[count - 1], count);
+ patt[count - 1], count);
+ }
fragP->fr_var = count;
}
static INLINE unsigned int
-mode_from_disp_size (t)
- unsigned int t;
+mode_from_disp_size (unsigned int t)
{
return (t & Disp8) ? 1 : (t & (Disp16 | Disp32 | Disp32S)) ? 2 : 0;
}
static INLINE int
-fits_in_signed_byte (num)
- offsetT num;
+fits_in_signed_byte (offsetT num)
{
return (num >= -128) && (num <= 127);
}
static INLINE int
-fits_in_unsigned_byte (num)
- offsetT num;
+fits_in_unsigned_byte (offsetT num)
{
return (num & 0xff) == num;
}
static INLINE int
-fits_in_unsigned_word (num)
- offsetT num;
+fits_in_unsigned_word (offsetT num)
{
return (num & 0xffff) == num;
}
static INLINE int
-fits_in_signed_word (num)
- offsetT num;
+fits_in_signed_word (offsetT num)
{
return (-32768 <= num) && (num <= 32767);
}
+
static INLINE int
-fits_in_signed_long (num)
- offsetT num ATTRIBUTE_UNUSED;
+fits_in_signed_long (offsetT num ATTRIBUTE_UNUSED)
{
#ifndef BFD64
return 1;
@@ -650,9 +916,9 @@ fits_in_signed_long (num)
|| (((offsetT) -1 << 31) & num) == ((offsetT) -1 << 31));
#endif
} /* fits_in_signed_long() */
+
static INLINE int
-fits_in_unsigned_long (num)
- offsetT num ATTRIBUTE_UNUSED;
+fits_in_unsigned_long (offsetT num ATTRIBUTE_UNUSED)
{
#ifndef BFD64
return 1;
@@ -661,11 +927,10 @@ fits_in_unsigned_long (num)
#endif
} /* fits_in_unsigned_long() */
-static int
-smallest_imm_type (num)
- offsetT num;
+static unsigned int
+smallest_imm_type (offsetT num)
{
- if (cpu_arch_flags != (Cpu086 | Cpu186 | Cpu286 | Cpu386 | Cpu486 | CpuNo64))
+ if (cpu_arch_flags != (Cpu186 | Cpu286 | Cpu386 | Cpu486 | CpuNo64))
{
/* This code is disabled on the 486 because all the Imm1 forms
in the opcode table are slower on the i486. They're the
@@ -689,9 +954,7 @@ smallest_imm_type (num)
}
static offsetT
-offset_in_range (val, size)
- offsetT val;
- int size;
+offset_in_range (offsetT val, int size)
{
addressT mask;
@@ -726,8 +989,7 @@ offset_in_range (val, size)
class already exists, 1 if non rep/repne added, 2 if rep/repne
added. */
static int
-add_prefix (prefix)
- unsigned int prefix;
+add_prefix (unsigned int prefix)
{
int ret = 1;
unsigned int q;
@@ -735,9 +997,9 @@ add_prefix (prefix)
if (prefix >= REX_OPCODE && prefix < REX_OPCODE + 16
&& flag_code == CODE_64BIT)
{
- if ((i.prefix[REX_PREFIX] & prefix & REX_MODE64)
- || ((i.prefix[REX_PREFIX] & (REX_EXTX | REX_EXTY | REX_EXTZ))
- && (prefix & (REX_EXTX | REX_EXTY | REX_EXTZ))))
+ if ((i.prefix[REX_PREFIX] & prefix & REX_W)
+ || ((i.prefix[REX_PREFIX] & (REX_R | REX_X | REX_B))
+ && (prefix & (REX_R | REX_X | REX_B))))
ret = 0;
q = REX_PREFIX;
}
@@ -794,8 +1056,7 @@ add_prefix (prefix)
}
static void
-set_code_flag (value)
- int value;
+set_code_flag (int value)
{
flag_code = value;
cpu_arch_flags &= ~(Cpu64 | CpuNo64);
@@ -812,8 +1073,7 @@ set_code_flag (value)
}
static void
-set_16bit_gcc_code_flag (new_code_flag)
- int new_code_flag;
+set_16bit_gcc_code_flag (int new_code_flag)
{
flag_code = new_code_flag;
cpu_arch_flags &= ~(Cpu64 | CpuNo64);
@@ -822,8 +1082,7 @@ set_16bit_gcc_code_flag (new_code_flag)
}
static void
-set_intel_syntax (syntax_flag)
- int syntax_flag;
+set_intel_syntax (int syntax_flag)
{
/* Find out if register prefixing is specified. */
int ask_naked_reg = 0;
@@ -854,11 +1113,11 @@ set_intel_syntax (syntax_flag)
identifier_chars['%'] = intel_syntax && allow_naked_reg ? '%' : 0;
identifier_chars['$'] = intel_syntax ? '$' : 0;
+ register_prefix = allow_naked_reg ? "" : "%";
}
static void
-set_cpu_arch (dummy)
- int dummy ATTRIBUTE_UNUSED;
+set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
{
SKIP_WHITESPACE ();
@@ -866,9 +1125,9 @@ set_cpu_arch (dummy)
{
char *string = input_line_pointer;
int e = get_symbol_end ();
- int i;
+ unsigned int i;
- for (i = 0; cpu_arch[i].name; i++)
+ for (i = 0; i < ARRAY_SIZE (cpu_arch); i++)
{
if (strcmp (string, cpu_arch[i].name) == 0)
{
@@ -877,7 +1136,15 @@ set_cpu_arch (dummy)
cpu_arch_name = cpu_arch[i].name;
cpu_sub_arch_name = NULL;
cpu_arch_flags = (cpu_arch[i].flags
- | (flag_code == CODE_64BIT ? Cpu64 : CpuNo64));
+ | (flag_code == CODE_64BIT
+ ? Cpu64 : CpuNo64));
+ cpu_arch_isa = cpu_arch[i].type;
+ cpu_arch_isa_flags = cpu_arch[i].flags;
+ if (!cpu_arch_tune_set)
+ {
+ cpu_arch_tune = cpu_arch_isa;
+ cpu_arch_tune_flags = cpu_arch_isa_flags;
+ }
break;
}
if ((cpu_arch_flags | cpu_arch[i].flags) != cpu_arch_flags)
@@ -890,7 +1157,7 @@ set_cpu_arch (dummy)
return;
}
}
- if (!cpu_arch[i].name)
+ if (i >= ARRAY_SIZE (cpu_arch))
as_bad (_("no such architecture: `%s'"), string);
*input_line_pointer = e;
@@ -976,10 +1243,9 @@ md_begin ()
reg_hash = hash_new ();
{
const reg_entry *regtab;
+ unsigned int regtab_size = i386_regtab_size;
- for (regtab = i386_regtab;
- regtab < i386_regtab + sizeof (i386_regtab) / sizeof (i386_regtab[0]);
- regtab++)
+ for (regtab = i386_regtab; regtab_size--; regtab++)
{
hash_err = hash_insert (reg_hash, regtab->reg_name, (PTR) regtab);
if (hash_err)
@@ -1034,6 +1300,7 @@ md_begin ()
#endif
digit_chars['-'] = '-';
mnemonic_chars['-'] = '-';
+ mnemonic_chars['.'] = '.';
identifier_chars['_'] = '_';
identifier_chars['.'] = '.';
@@ -1063,8 +1330,7 @@ md_begin ()
}
void
-i386_print_statistics (file)
- FILE *file;
+i386_print_statistics (FILE *file)
{
hash_print_statistics (file, "i386 opcode", op_hash);
hash_print_statistics (file, "i386 register", reg_hash);
@@ -1073,16 +1339,13 @@ i386_print_statistics (file)
#ifdef DEBUG386
/* Debugging routines for md_assemble. */
-static void pi PARAMS ((char *, i386_insn *));
-static void pte PARAMS ((template *));
-static void pt PARAMS ((unsigned int));
-static void pe PARAMS ((expressionS *));
-static void ps PARAMS ((symbolS *));
+static void pte (template *);
+static void pt (unsigned int);
+static void pe (expressionS *);
+static void ps (symbolS *);
static void
-pi (line, x)
- char *line;
- i386_insn *x;
+pi (char *line, i386_insn *x)
{
unsigned int i;
@@ -1097,10 +1360,10 @@ pi (line, x)
fprintf (stdout, " sib: base %x index %x scale %x\n",
x->sib.base, x->sib.index, x->sib.scale);
fprintf (stdout, " rex: 64bit %x extX %x extY %x extZ %x\n",
- (x->rex & REX_MODE64) != 0,
- (x->rex & REX_EXTX) != 0,
- (x->rex & REX_EXTY) != 0,
- (x->rex & REX_EXTZ) != 0);
+ (x->rex & REX_W) != 0,
+ (x->rex & REX_R) != 0,
+ (x->rex & REX_X) != 0,
+ (x->rex & REX_B) != 0);
for (i = 0; i < x->operands; i++)
{
fprintf (stdout, " #%d: ", i + 1);
@@ -1117,8 +1380,7 @@ pi (line, x)
}
static void
-pte (t)
- template *t;
+pte (template *t)
{
unsigned int i;
fprintf (stdout, " %d operands ", t->operands);
@@ -1139,8 +1401,7 @@ pte (t)
}
static void
-pe (e)
- expressionS *e;
+pe (expressionS *e)
{
fprintf (stdout, " operation %d\n", e->X_op);
fprintf (stdout, " add_number %ld (%lx)\n",
@@ -1160,8 +1421,7 @@ pe (e)
}
static void
-ps (s)
- symbolS *s;
+ps (symbolS *s)
{
fprintf (stdout, "%s type %s%s",
S_GET_NAME (s),
@@ -1226,9 +1486,9 @@ pt (t)
static bfd_reloc_code_real_type
reloc (unsigned int size,
- int pcrel,
- int sign,
- bfd_reloc_code_real_type other)
+ int pcrel,
+ int sign,
+ bfd_reloc_code_real_type other)
{
if (other != NO_RELOC)
{
@@ -1237,26 +1497,26 @@ reloc (unsigned int size,
if (size == 8)
switch (other)
{
- case BFD_RELOC_X86_64_GOT32:
- return BFD_RELOC_X86_64_GOT64;
- break;
- case BFD_RELOC_X86_64_PLTOFF64:
- return BFD_RELOC_X86_64_PLTOFF64;
- break;
- case BFD_RELOC_X86_64_GOTPC32:
- other = BFD_RELOC_X86_64_GOTPC64;
- break;
- case BFD_RELOC_X86_64_GOTPCREL:
- other = BFD_RELOC_X86_64_GOTPCREL64;
- break;
- case BFD_RELOC_X86_64_TPOFF32:
- other = BFD_RELOC_X86_64_TPOFF64;
- break;
- case BFD_RELOC_X86_64_DTPOFF32:
- other = BFD_RELOC_X86_64_DTPOFF64;
- break;
- default:
- break;
+ case BFD_RELOC_X86_64_GOT32:
+ return BFD_RELOC_X86_64_GOT64;
+ break;
+ case BFD_RELOC_X86_64_PLTOFF64:
+ return BFD_RELOC_X86_64_PLTOFF64;
+ break;
+ case BFD_RELOC_X86_64_GOTPC32:
+ other = BFD_RELOC_X86_64_GOTPC64;
+ break;
+ case BFD_RELOC_X86_64_GOTPCREL:
+ other = BFD_RELOC_X86_64_GOTPCREL64;
+ break;
+ case BFD_RELOC_X86_64_TPOFF32:
+ other = BFD_RELOC_X86_64_TPOFF64;
+ break;
+ case BFD_RELOC_X86_64_DTPOFF32:
+ other = BFD_RELOC_X86_64_DTPOFF64;
+ break;
+ default:
+ break;
}
/* Sign-checking 4-byte relocations in 16-/32-bit code is pointless. */
@@ -1275,7 +1535,7 @@ reloc (unsigned int size,
else if ((reloc->complain_on_overflow == complain_overflow_signed
&& !sign)
|| (reloc->complain_on_overflow == complain_overflow_unsigned
- && sign > 0))
+ && sign > 0))
as_bad (_("relocated field and relocation type differ in signedness"));
else
return other;
@@ -1324,8 +1584,7 @@ reloc (unsigned int size,
some cases we force the original symbol to be used. */
int
-tc_i386_fix_adjustable (fixP)
- fixS *fixP ATTRIBUTE_UNUSED;
+tc_i386_fix_adjustable (fixS *fixP ATTRIBUTE_UNUSED)
{
#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
if (!IS_ELF)
@@ -1378,11 +1637,8 @@ tc_i386_fix_adjustable (fixP)
return 1;
}
-static int intel_float_operand PARAMS ((const char *mnemonic));
-
static int
-intel_float_operand (mnemonic)
- const char *mnemonic;
+intel_float_operand (const char *mnemonic)
{
/* Note that the value returned is meaningful only for opcodes with (memory)
operands, hence the code here is free to improperly handle opcodes that
@@ -1465,16 +1721,29 @@ md_assemble (line)
if (line == NULL)
return;
+ /* The order of the immediates should be reversed
+ for 2 immediates extrq and insertq instructions */
+ if ((i.imm_operands == 2)
+ && ((strcmp (mnemonic, "extrq") == 0)
+ || (strcmp (mnemonic, "insertq") == 0)))
+ {
+ swap_2_operands (0, 1);
+ /* "extrq" and insertq" are the only two instructions whose operands
+ have to be reversed even though they have two immediate operands.
+ */
+ if (intel_syntax)
+ swap_operands ();
+ }
+
/* Now we've parsed the mnemonic into a set of templates, and have the
operands at hand. */
/* All intel opcodes have reversed operands except for "bound" and
"enter". We also don't reverse intersegment "jmp" and "call"
instructions with 2 immediate operands so that the immediate segment
- precedes the offset, as it does when in AT&T mode. "enter" and the
- intersegment "jmp" and "call" instructions are the only ones that
- have two immediate operands. */
- if (intel_syntax && i.operands > 1
+ precedes the offset, as it does when in AT&T mode. */
+ if (intel_syntax
+ && i.operands > 1
&& (strcmp (mnemonic, "bound") != 0)
&& (strcmp (mnemonic, "invlpga") != 0)
&& !((i.types[0] & Imm) && (i.types[1] & Imm)))
@@ -1502,7 +1771,7 @@ md_assemble (line)
/* Undo SYSV386_COMPAT brokenness when in Intel mode. See i386.h */
if (SYSV386_COMPAT
&& (i.tm.base_opcode & 0xfffffde0) == 0xdce0)
- i.tm.base_opcode ^= FloatR;
+ i.tm.base_opcode ^= Opcode_FloatR;
/* Zap movzx and movsx suffix. The suffix may have been set from
"word ptr" or "byte ptr" on the source operand, but we'll use
@@ -1556,9 +1825,9 @@ md_assemble (line)
{
expressionS *exp;
- if ((i.tm.cpu_flags & CpuPNI) && i.operands > 0)
+ if ((i.tm.cpu_flags & CpuSSE3) && i.operands > 0)
{
- /* These Intel Prescott New Instructions have the fixed
+ /* Streaming SIMD extensions 3 Instructions have the fixed
operands with an opcode suffix which is coded in the same
place as an 8-bit immediate field would be. Here we check
those operands and remove them afterwards. */
@@ -1566,8 +1835,11 @@ md_assemble (line)
for (x = 0; x < i.operands; x++)
if (i.op[x].regs->reg_num != x)
- as_bad (_("can't use register '%%%s' as operand %d in '%s'."),
- i.op[x].regs->reg_name, x + 1, i.tm.name);
+ as_bad (_("can't use register '%s%s' as operand %d in '%s'."),
+ register_prefix,
+ i.op[x].regs->reg_name,
+ x + 1,
+ i.tm.name);
i.operands = 0;
}
@@ -1616,7 +1888,7 @@ md_assemble (line)
}
if ((i.tm.opcode_modifier & Rex64) != 0)
- i.rex |= REX_MODE64;
+ i.rex |= REX_W;
/* For 8 bit registers we need an empty rex prefix. Also if the
instruction already has a prefix, we need to convert old
@@ -1640,8 +1912,9 @@ md_assemble (line)
{
/* In case it is "hi" register, give up. */
if (i.op[x].regs->reg_num > 3)
- as_bad (_("can't encode register '%%%s' in an instruction requiring REX prefix."),
- i.op[x].regs->reg_name);
+ as_bad (_("can't encode register '%s%s' in an "
+ "instruction requiring REX prefix."),
+ register_prefix, i.op[x].regs->reg_name);
/* Otherwise it is equivalent to the extended register.
Since the encoding doesn't change this is merely
@@ -1660,9 +1933,7 @@ md_assemble (line)
}
static char *
-parse_insn (line, mnemonic)
- char *line;
- char *mnemonic;
+parse_insn (char *line, char *mnemonic)
{
char *l = line;
char *token_start = l;
@@ -1832,9 +2103,9 @@ parse_insn (line, mnemonic)
{
if (!((t->cpu_flags & ~(Cpu64 | CpuNo64))
& ~(cpu_arch_flags & ~(Cpu64 | CpuNo64))))
- supported |= 1;
+ supported |= 1;
if (!(t->cpu_flags & (flag_code == CODE_64BIT ? CpuNo64 : Cpu64)))
- supported |= 2;
+ supported |= 2;
}
if (!(supported & 2))
{
@@ -1867,7 +2138,7 @@ parse_insn (line, mnemonic)
if (t >= current_templates->end)
{
as_bad (_("expecting string instruction after `%s'"),
- expecting_string_instruction);
+ expecting_string_instruction);
return NULL;
}
for (override.start = t; t < current_templates->end; ++t)
@@ -1881,9 +2152,7 @@ parse_insn (line, mnemonic)
}
static char *
-parse_operands (l, mnemonic)
- char *l;
- const char *mnemonic;
+parse_operands (char *l, const char *mnemonic)
{
char *token_start;
@@ -2001,24 +2270,12 @@ parse_operands (l, mnemonic)
}
static void
-swap_operands ()
+swap_2_operands (int xchg1, int xchg2)
{
union i386_op temp_op;
unsigned int temp_type;
enum bfd_reloc_code_real temp_reloc;
- int xchg1 = 0;
- int xchg2 = 0;
- if (i.operands == 2)
- {
- xchg1 = 0;
- xchg2 = 1;
- }
- else if (i.operands == 3)
- {
- xchg1 = 0;
- xchg2 = 2;
- }
temp_type = i.types[xchg2];
i.types[xchg2] = i.types[xchg1];
i.types[xchg1] = temp_type;
@@ -2028,6 +2285,22 @@ swap_operands ()
temp_reloc = i.reloc[xchg2];
i.reloc[xchg2] = i.reloc[xchg1];
i.reloc[xchg1] = temp_reloc;
+}
+
+static void
+swap_operands (void)
+{
+ switch (i.operands)
+ {
+ case 4:
+ swap_2_operands (1, i.operands - 2);
+ case 3:
+ case 2:
+ swap_2_operands (0, i.operands - 1);
+ break;
+ default:
+ abort ();
+ }
if (i.mem_operands == 2)
{
@@ -2041,7 +2314,7 @@ swap_operands ()
/* Try to ensure constant immediates are represented in the smallest
opcode possible. */
static void
-optimize_imm ()
+optimize_imm (void)
{
char guess_suffix = 0;
int op;
@@ -2131,8 +2404,10 @@ optimize_imm ()
unsigned int mask, allowed = 0;
const template *t;
- for (t = current_templates->start; t < current_templates->end; ++t)
- allowed |= t->operand_types[op];
+ for (t = current_templates->start;
+ t < current_templates->end;
+ ++t)
+ allowed |= t->operand_types[op];
switch (guess_suffix)
{
case QWORD_MNEM_SUFFIX:
@@ -2151,8 +2426,8 @@ optimize_imm ()
mask = 0;
break;
}
- if (mask & allowed)
- i.types[op] &= mask;
+ if (mask & allowed)
+ i.types[op] &= mask;
}
break;
}
@@ -2161,7 +2436,7 @@ optimize_imm ()
/* Try to use the smallest displacement type too. */
static void
-optimize_disp ()
+optimize_disp (void)
{
int op;
@@ -2225,13 +2500,20 @@ optimize_disp ()
}
static int
-match_template ()
+match_template (void)
{
/* Points to template once we've found it. */
const template *t;
- unsigned int overlap0, overlap1, overlap2;
+ unsigned int overlap0, overlap1, overlap2, overlap3;
unsigned int found_reverse_match;
int suffix_check;
+ unsigned int operand_types [MAX_OPERANDS];
+ int addr_prefix_disp;
+ unsigned int j;
+
+#if MAX_OPERANDS != 4
+# error "MAX_OPERANDS must be 4."
+#endif
#define MATCH(overlap, given, template) \
((overlap & ~JumpAbsolute) \
@@ -2249,7 +2531,11 @@ match_template ()
overlap0 = 0;
overlap1 = 0;
overlap2 = 0;
+ overlap3 = 0;
found_reverse_match = 0;
+ for (j = 0; j < MAX_OPERANDS; j++)
+ operand_types [j] = 0;
+ addr_prefix_disp = -1;
suffix_check = (i.suffix == BYTE_MNEM_SUFFIX
? No_bSuf
: (i.suffix == WORD_MNEM_SUFFIX
@@ -2265,6 +2551,8 @@ match_template ()
for (t = current_templates->start; t < current_templates->end; t++)
{
+ addr_prefix_disp = -1;
+
/* Must have right number of operands. */
if (i.operands != t->operands)
continue;
@@ -2275,6 +2563,9 @@ match_template ()
&& (t->opcode_modifier & IgnoreSize)))
continue;
+ for (j = 0; j < MAX_OPERANDS; j++)
+ operand_types [j] = t->operand_types [j];
+
/* In general, don't allow 64-bit operands in 32-bit mode. */
if (i.suffix == QWORD_MNEM_SUFFIX
&& flag_code != CODE_64BIT
@@ -2282,8 +2573,8 @@ match_template ()
? (!(t->opcode_modifier & IgnoreSize)
&& !intel_float_operand (t->name))
: intel_float_operand (t->name) != 2)
- && (!(t->operand_types[0] & (RegMMX | RegXMM))
- || !(t->operand_types[t->operands > 1] & (RegMMX | RegXMM)))
+ && (!(operand_types[0] & (RegMMX | RegXMM))
+ || !(operand_types[t->operands > 1] & (RegMMX | RegXMM)))
&& (t->base_opcode != 0x0fc7
|| t->extension_opcode != 1 /* cmpxchg8b */))
continue;
@@ -2297,66 +2588,142 @@ match_template ()
break;
}
- overlap0 = i.types[0] & t->operand_types[0];
+ /* Address size prefix will turn Disp64/Disp32/Disp16 operand
+ into Disp32/Disp16/Disp32 operand. */
+ if (i.prefix[ADDR_PREFIX] != 0)
+ {
+ unsigned int DispOn = 0, DispOff = 0;
+
+ switch (flag_code)
+ {
+ case CODE_16BIT:
+ DispOn = Disp32;
+ DispOff = Disp16;
+ break;
+ case CODE_32BIT:
+ DispOn = Disp16;
+ DispOff = Disp32;
+ break;
+ case CODE_64BIT:
+ DispOn = Disp32;
+ DispOff = Disp64;
+ break;
+ }
+
+ for (j = 0; j < MAX_OPERANDS; j++)
+ {
+ /* There should be only one Disp operand. */
+ if ((operand_types[j] & DispOff))
+ {
+ addr_prefix_disp = j;
+ operand_types[j] |= DispOn;
+ operand_types[j] &= ~DispOff;
+ break;
+ }
+ }
+ }
+
+ overlap0 = i.types[0] & operand_types[0];
switch (t->operands)
{
case 1:
- if (!MATCH (overlap0, i.types[0], t->operand_types[0]))
+ if (!MATCH (overlap0, i.types[0], operand_types[0]))
continue;
break;
case 2:
+ /* xchg %eax, %eax is a special case. It is an aliase for nop
+ only in 32bit mode and we can use opcode 0x90. In 64bit
+ mode, we can't use 0x90 for xchg %eax, %eax since it should
+ zero-extend %eax to %rax. */
+ if (flag_code == CODE_64BIT
+ && t->base_opcode == 0x90
+ && i.types [0] == (Acc | Reg32)
+ && i.types [1] == (Acc | Reg32))
+ continue;
case 3:
- overlap1 = i.types[1] & t->operand_types[1];
- if (!MATCH (overlap0, i.types[0], t->operand_types[0])
- || !MATCH (overlap1, i.types[1], t->operand_types[1])
+ case 4:
+ overlap1 = i.types[1] & operand_types[1];
+ if (!MATCH (overlap0, i.types[0], operand_types[0])
+ || !MATCH (overlap1, i.types[1], operand_types[1])
/* monitor in SSE3 is a very special case. The first
- register and the second register may have differnet
- sizes. */
+ register and the second register may have different
+ sizes. The same applies to crc32 in SSE4.2. */
|| !((t->base_opcode == 0x0f01
&& t->extension_opcode == 0xc8)
+ || t->base_opcode == 0xf20f38f1
|| CONSISTENT_REGISTER_MATCH (overlap0, i.types[0],
- t->operand_types[0],
+ operand_types[0],
overlap1, i.types[1],
- t->operand_types[1])))
+ operand_types[1])))
{
/* Check if other direction is valid ... */
if ((t->opcode_modifier & (D | FloatD)) == 0)
continue;
/* Try reversing direction of operands. */
- overlap0 = i.types[0] & t->operand_types[1];
- overlap1 = i.types[1] & t->operand_types[0];
- if (!MATCH (overlap0, i.types[0], t->operand_types[1])
- || !MATCH (overlap1, i.types[1], t->operand_types[0])
+ overlap0 = i.types[0] & operand_types[1];
+ overlap1 = i.types[1] & operand_types[0];
+ if (!MATCH (overlap0, i.types[0], operand_types[1])
+ || !MATCH (overlap1, i.types[1], operand_types[0])
|| !CONSISTENT_REGISTER_MATCH (overlap0, i.types[0],
- t->operand_types[1],
+ operand_types[1],
overlap1, i.types[1],
- t->operand_types[0]))
+ operand_types[0]))
{
/* Does not match either direction. */
continue;
}
/* found_reverse_match holds which of D or FloatDR
we've found. */
- found_reverse_match = t->opcode_modifier & (D | FloatDR);
+ if ((t->opcode_modifier & D))
+ found_reverse_match = Opcode_D;
+ else if ((t->opcode_modifier & FloatD))
+ found_reverse_match = Opcode_FloatD;
+ else
+ found_reverse_match = 0;
+ if ((t->opcode_modifier & FloatR))
+ found_reverse_match |= Opcode_FloatR;
}
- /* Found a forward 2 operand match here. */
- else if (t->operands == 3)
+ else
{
- /* Here we make use of the fact that there are no
- reverse match 3 operand instructions, and all 3
- operand instructions only need to be checked for
- register consistency between operands 2 and 3. */
- overlap2 = i.types[2] & t->operand_types[2];
- if (!MATCH (overlap2, i.types[2], t->operand_types[2])
- || !CONSISTENT_REGISTER_MATCH (overlap1, i.types[1],
- t->operand_types[1],
- overlap2, i.types[2],
- t->operand_types[2]))
+ /* Found a forward 2 operand match here. */
+ switch (t->operands)
+ {
+ case 4:
+ overlap3 = i.types[3] & operand_types[3];
+ case 3:
+ overlap2 = i.types[2] & operand_types[2];
+ break;
+ }
- continue;
+ switch (t->operands)
+ {
+ case 4:
+ if (!MATCH (overlap3, i.types[3], operand_types[3])
+ || !CONSISTENT_REGISTER_MATCH (overlap2,
+ i.types[2],
+ operand_types[2],
+ overlap3,
+ i.types[3],
+ operand_types[3]))
+ continue;
+ case 3:
+ /* Here we make use of the fact that there are no
+ reverse match 3 operand instructions, and all 3
+ operand instructions only need to be checked for
+ register consistency between operands 2 and 3. */
+ if (!MATCH (overlap2, i.types[2], operand_types[2])
+ || !CONSISTENT_REGISTER_MATCH (overlap1,
+ i.types[1],
+ operand_types[1],
+ overlap2,
+ i.types[2],
+ operand_types[2]))
+ continue;
+ break;
+ }
}
- /* Found either forward/reverse 2 or 3 operand match here:
+ /* Found either forward/reverse 2, 3 or 4 operand match here:
slip through to break. */
}
if (t->cpu_flags & ~cpu_arch_flags)
@@ -2380,7 +2747,7 @@ match_template ()
{
if (!intel_syntax
&& ((i.types[0] & JumpAbsolute)
- != (t->operand_types[0] & JumpAbsolute)))
+ != (operand_types[0] & JumpAbsolute)))
{
as_warn (_("indirect %s without `*'"), t->name);
}
@@ -2396,6 +2763,11 @@ match_template ()
/* Copy the template we found. */
i.tm = *t;
+
+ if (addr_prefix_disp != -1)
+ i.tm.operand_types[addr_prefix_disp]
+ = operand_types[addr_prefix_disp];
+
if (found_reverse_match)
{
/* If we found a reverse match we must alter the opcode
@@ -2404,15 +2776,15 @@ match_template ()
i.tm.base_opcode ^= found_reverse_match;
- i.tm.operand_types[0] = t->operand_types[1];
- i.tm.operand_types[1] = t->operand_types[0];
+ i.tm.operand_types[0] = operand_types[1];
+ i.tm.operand_types[1] = operand_types[0];
}
return 1;
}
static int
-check_string ()
+check_string (void)
{
int mem_op = (i.types[0] & AnyMem) ? 0 : 1;
if ((i.tm.operand_types[mem_op] & EsSeg) != 0)
@@ -2465,19 +2837,44 @@ process_suffix (void)
{
/* We take i.suffix from the last register operand specified,
Destination register type is more significant than source
- register type. */
- int op;
-
- for (op = i.operands; --op >= 0;)
- if ((i.types[op] & Reg)
- && !(i.tm.operand_types[op] & InOutPortReg))
- {
- i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX :
- (i.types[op] & Reg16) ? WORD_MNEM_SUFFIX :
- (i.types[op] & Reg64) ? QWORD_MNEM_SUFFIX :
+ register type. crc32 in SSE4.2 prefers source register
+ type. */
+ if (i.tm.base_opcode == 0xf20f38f1)
+ {
+ if ((i.types[0] & Reg))
+ i.suffix = ((i.types[0] & Reg16) ? WORD_MNEM_SUFFIX :
LONG_MNEM_SUFFIX);
- break;
- }
+ }
+ else if (i.tm.base_opcode == 0xf20f38f0)
+ {
+ if ((i.types[0] & Reg8))
+ i.suffix = BYTE_MNEM_SUFFIX;
+ }
+
+ if (!i.suffix)
+ {
+ int op;
+
+ if (i.tm.base_opcode == 0xf20f38f1
+ || i.tm.base_opcode == 0xf20f38f0)
+ {
+ /* We have to know the operand size for crc32. */
+ as_bad (_("ambiguous memory operand size for `%s`"),
+ i.tm.name);
+ return 0;
+ }
+
+ for (op = i.operands; --op >= 0;)
+ if ((i.types[op] & Reg)
+ && !(i.tm.operand_types[op] & InOutPortReg))
+ {
+ i.suffix = ((i.types[op] & Reg8) ? BYTE_MNEM_SUFFIX :
+ (i.types[op] & Reg16) ? WORD_MNEM_SUFFIX :
+ (i.types[op] & Reg64) ? QWORD_MNEM_SUFFIX :
+ LONG_MNEM_SUFFIX);
+ break;
+ }
+ }
}
else if (i.suffix == BYTE_MNEM_SUFFIX)
{
@@ -2515,9 +2912,9 @@ process_suffix (void)
else if (intel_syntax
&& !i.suffix
&& ((i.tm.operand_types[0] & JumpAbsolute)
- || (i.tm.opcode_modifier & (JumpByte|JumpInterSegment))
- || (i.tm.base_opcode == 0x0f01 /* [ls][gi]dt */
- && i.tm.extension_opcode <= 3)))
+ || (i.tm.opcode_modifier & (JumpByte|JumpInterSegment))
+ || (i.tm.base_opcode == 0x0f01 /* [ls][gi]dt */
+ && i.tm.extension_opcode <= 3)))
{
switch (flag_code)
{
@@ -2544,19 +2941,20 @@ process_suffix (void)
{
if (i.tm.opcode_modifier & W)
{
- as_bad (_("no instruction mnemonic suffix given and no register operands; can't size instruction"));
+ as_bad (_("no instruction mnemonic suffix given and "
+ "no register operands; can't size instruction"));
return 0;
}
}
else
{
- unsigned int suffixes = ~i.tm.opcode_modifier
- & (No_bSuf
- | No_wSuf
- | No_lSuf
- | No_sSuf
- | No_xSuf
- | No_qSuf);
+ unsigned int suffixes = (~i.tm.opcode_modifier
+ & (No_bSuf
+ | No_wSuf
+ | No_lSuf
+ | No_sSuf
+ | No_xSuf
+ | No_qSuf));
if ((i.tm.opcode_modifier & W)
|| ((suffixes & (suffixes - 1))
@@ -2615,7 +3013,15 @@ process_suffix (void)
if (i.suffix == QWORD_MNEM_SUFFIX
&& flag_code == CODE_64BIT
&& (i.tm.opcode_modifier & NoRex64) == 0)
- i.rex |= REX_MODE64;
+ {
+ /* Special case for xchg %rax,%rax. It is NOP and doesn't
+ need rex64. */
+ if (i.operands != 2
+ || i.types [0] != (Acc | Reg64)
+ || i.types [1] != (Acc | Reg64)
+ || i.tm.base_opcode != 0x90)
+ i.rex |= REX_W;
+ }
/* Size floating point instruction. */
if (i.suffix == LONG_MNEM_SUFFIX)
@@ -2648,6 +3054,10 @@ check_byte_reg (void)
|| i.tm.base_opcode == 0xfbf))
continue;
+ /* crc32 doesn't generate this warning. */
+ if (i.tm.base_opcode == 0xf20f38f0)
+ continue;
+
if ((i.types[op] & WordReg) && i.op[op].regs->reg_num < 4)
{
/* Prohibit these changes in the 64bit mode, since the
@@ -2655,18 +3065,20 @@ check_byte_reg (void)
if (flag_code == CODE_64BIT
&& (i.tm.operand_types[op] & InOutPortReg) == 0)
{
- as_bad (_("Incorrect register `%%%s' used with `%c' suffix"),
- i.op[op].regs->reg_name,
+ as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
+ register_prefix, i.op[op].regs->reg_name,
i.suffix);
return 0;
}
#if REGISTER_WARNINGS
if (!quiet_warnings
&& (i.tm.operand_types[op] & InOutPortReg) == 0)
- as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
+ as_warn (_("using `%s%s' instead of `%s%s' due to `%c' suffix"),
+ register_prefix,
(i.op[op].regs + (i.types[op] & Reg16
? REGNAM_AL - REGNAM_AX
: REGNAM_AL - REGNAM_EAX))->reg_name,
+ register_prefix,
i.op[op].regs->reg_name,
i.suffix);
#endif
@@ -2678,7 +3090,8 @@ check_byte_reg (void)
| Control | Debug | Test
| FloatReg | FloatAcc))
{
- as_bad (_("`%%%s' not allowed with `%s%c'"),
+ as_bad (_("`%s%s' not allowed with `%s%c'"),
+ register_prefix,
i.op[op].regs->reg_name,
i.tm.name,
i.suffix);
@@ -2689,7 +3102,7 @@ check_byte_reg (void)
}
static int
-check_long_reg ()
+check_long_reg (void)
{
int op;
@@ -2699,7 +3112,8 @@ check_long_reg ()
if ((i.types[op] & Reg8) != 0
&& (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0)
{
- as_bad (_("`%%%s' not allowed with `%s%c'"),
+ as_bad (_("`%s%s' not allowed with `%s%c'"),
+ register_prefix,
i.op[op].regs->reg_name,
i.tm.name,
i.suffix);
@@ -2714,15 +3128,17 @@ check_long_reg ()
lowering is more complicated. */
if (flag_code == CODE_64BIT)
{
- as_bad (_("Incorrect register `%%%s' used with `%c' suffix"),
- i.op[op].regs->reg_name,
+ as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
+ register_prefix, i.op[op].regs->reg_name,
i.suffix);
return 0;
}
#if REGISTER_WARNINGS
else
- as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
+ as_warn (_("using `%s%s' instead of `%s%s' due to `%c' suffix"),
+ register_prefix,
(i.op[op].regs + REGNAM_EAX - REGNAM_AX)->reg_name,
+ register_prefix,
i.op[op].regs->reg_name,
i.suffix);
#endif
@@ -2731,8 +3147,8 @@ check_long_reg ()
else if ((i.types[op] & Reg64) != 0
&& (i.tm.operand_types[op] & (Reg32 | Acc)) != 0)
{
- as_bad (_("Incorrect register `%%%s' used with `%c' suffix"),
- i.op[op].regs->reg_name,
+ as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
+ register_prefix, i.op[op].regs->reg_name,
i.suffix);
return 0;
}
@@ -2740,7 +3156,7 @@ check_long_reg ()
}
static int
-check_qword_reg ()
+check_qword_reg (void)
{
int op;
@@ -2750,7 +3166,8 @@ check_qword_reg ()
if ((i.types[op] & Reg8) != 0
&& (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0)
{
- as_bad (_("`%%%s' not allowed with `%s%c'"),
+ as_bad (_("`%s%s' not allowed with `%s%c'"),
+ register_prefix,
i.op[op].regs->reg_name,
i.tm.name,
i.suffix);
@@ -2763,8 +3180,8 @@ check_qword_reg ()
{
/* Prohibit these changes in the 64bit mode, since the
lowering is more complicated. */
- as_bad (_("Incorrect register `%%%s' used with `%c' suffix"),
- i.op[op].regs->reg_name,
+ as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
+ register_prefix, i.op[op].regs->reg_name,
i.suffix);
return 0;
}
@@ -2772,7 +3189,7 @@ check_qword_reg ()
}
static int
-check_word_reg ()
+check_word_reg (void)
{
int op;
for (op = i.operands; --op >= 0;)
@@ -2781,7 +3198,8 @@ check_word_reg ()
if ((i.types[op] & Reg8) != 0
&& (i.tm.operand_types[op] & (Reg16 | Reg32 | Acc)) != 0)
{
- as_bad (_("`%%%s' not allowed with `%s%c'"),
+ as_bad (_("`%s%s' not allowed with `%s%c'"),
+ register_prefix,
i.op[op].regs->reg_name,
i.tm.name,
i.suffix);
@@ -2796,15 +3214,17 @@ check_word_reg ()
lowering is more complicated. */
if (flag_code == CODE_64BIT)
{
- as_bad (_("Incorrect register `%%%s' used with `%c' suffix"),
- i.op[op].regs->reg_name,
+ as_bad (_("Incorrect register `%s%s' used with `%c' suffix"),
+ register_prefix, i.op[op].regs->reg_name,
i.suffix);
return 0;
}
else
#if REGISTER_WARNINGS
- as_warn (_("using `%%%s' instead of `%%%s' due to `%c' suffix"),
+ as_warn (_("using `%s%s' instead of `%s%s' due to `%c' suffix"),
+ register_prefix,
(i.op[op].regs + REGNAM_AX - REGNAM_EAX)->reg_name,
+ register_prefix,
i.op[op].regs->reg_name,
i.suffix);
#endif
@@ -2813,7 +3233,7 @@ check_word_reg ()
}
static int
-finalize_imm ()
+finalize_imm (void)
{
unsigned int overlap0, overlap1, overlap2;
@@ -2844,7 +3264,8 @@ finalize_imm ()
&& overlap0 != Imm16 && overlap0 != Imm32S
&& overlap0 != Imm32 && overlap0 != Imm64)
{
- as_bad (_("no instruction mnemonic suffix given; can't determine immediate size"));
+ as_bad (_("no instruction mnemonic suffix given; "
+ "can't determine immediate size"));
return 0;
}
}
@@ -2877,7 +3298,9 @@ finalize_imm ()
&& overlap1 != Imm16 && overlap1 != Imm32S
&& overlap1 != Imm32 && overlap1 != Imm64)
{
- as_bad (_("no instruction mnemonic suffix given; can't determine immediate size %x %c"),overlap1, i.suffix);
+ as_bad (_("no instruction mnemonic suffix given; "
+ "can't determine immediate size %x %c"),
+ overlap1, i.suffix);
return 0;
}
}
@@ -2891,7 +3314,7 @@ finalize_imm ()
}
static int
-process_operands ()
+process_operands (void)
{
/* Default segment register this instruction will use for memory
accesses. 0 means unknown. This is only for optimizing out
@@ -2901,40 +3324,90 @@ process_operands ()
/* The imul $imm, %reg instruction is converted into
imul $imm, %reg, %reg, and the clr %reg instruction
is converted into xor %reg, %reg. */
- if (i.tm.opcode_modifier & regKludge)
- {
- unsigned int first_reg_op = (i.types[0] & Reg) ? 0 : 1;
- /* Pretend we saw the extra register operand. */
- assert (i.op[first_reg_op + 1].regs == 0);
- i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs;
- i.types[first_reg_op + 1] = i.types[first_reg_op];
- i.reg_operands = 2;
+ if (i.tm.opcode_modifier & RegKludge)
+ {
+ if ((i.tm.cpu_flags & CpuSSE4_1))
+ {
+ /* The first operand in instruction blendvpd, blendvps and
+ pblendvb in SSE4.1 is implicit and must be xmm0. */
+ assert (i.operands == 3
+ && i.reg_operands >= 2
+ && i.types[0] == RegXMM);
+ if (i.op[0].regs->reg_num != 0)
+ {
+ if (intel_syntax)
+ as_bad (_("the last operand of `%s' must be `%sxmm0'"),
+ i.tm.name, register_prefix);
+ else
+ as_bad (_("the first operand of `%s' must be `%sxmm0'"),
+ i.tm.name, register_prefix);
+ return 0;
+ }
+ i.op[0] = i.op[1];
+ i.op[1] = i.op[2];
+ i.types[0] = i.types[1];
+ i.types[1] = i.types[2];
+ i.operands--;
+ i.reg_operands--;
+
+ /* We need to adjust fields in i.tm since they are used by
+ build_modrm_byte. */
+ i.tm.operand_types [0] = i.tm.operand_types [1];
+ i.tm.operand_types [1] = i.tm.operand_types [2];
+ i.tm.operands--;
+ }
+ else
+ {
+ unsigned int first_reg_op = (i.types[0] & Reg) ? 0 : 1;
+ /* Pretend we saw the extra register operand. */
+ assert (i.reg_operands == 1
+ && i.op[first_reg_op + 1].regs == 0);
+ i.op[first_reg_op + 1].regs = i.op[first_reg_op].regs;
+ i.types[first_reg_op + 1] = i.types[first_reg_op];
+ i.operands++;
+ i.reg_operands++;
+ }
}
if (i.tm.opcode_modifier & ShortForm)
{
- /* The register or float register operand is in operand 0 or 1. */
- unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1;
- /* Register goes in low 3 bits of opcode. */
- i.tm.base_opcode |= i.op[op].regs->reg_num;
- if ((i.op[op].regs->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTZ;
- if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0)
+ if (i.types[0] & (SReg2 | SReg3))
{
- /* Warn about some common errors, but press on regardless.
- The first case can be generated by gcc (<= 2.8.1). */
- if (i.operands == 2)
+ if (i.tm.base_opcode == POP_SEG_SHORT
+ && i.op[0].regs->reg_num == 1)
{
- /* Reversed arguments on faddp, fsubp, etc. */
- as_warn (_("translating to `%s %%%s,%%%s'"), i.tm.name,
- i.op[1].regs->reg_name,
- i.op[0].regs->reg_name);
+ as_bad (_("you can't `pop %%cs'"));
+ return 0;
}
- else
+ i.tm.base_opcode |= (i.op[0].regs->reg_num << 3);
+ if ((i.op[0].regs->reg_flags & RegRex) != 0)
+ i.rex |= REX_B;
+ }
+ else
+ {
+ /* The register or float register operand is in operand 0 or 1. */
+ unsigned int op = (i.types[0] & (Reg | FloatReg)) ? 0 : 1;
+ /* Register goes in low 3 bits of opcode. */
+ i.tm.base_opcode |= i.op[op].regs->reg_num;
+ if ((i.op[op].regs->reg_flags & RegRex) != 0)
+ i.rex |= REX_B;
+ if (!quiet_warnings && (i.tm.opcode_modifier & Ugh) != 0)
{
- /* Extraneous `l' suffix on fp insn. */
- as_warn (_("translating to `%s %%%s'"), i.tm.name,
- i.op[0].regs->reg_name);
+ /* Warn about some common errors, but press on regardless.
+ The first case can be generated by gcc (<= 2.8.1). */
+ if (i.operands == 2)
+ {
+ /* Reversed arguments on faddp, fsubp, etc. */
+ as_warn (_("translating to `%s %s%s,%s%s'"), i.tm.name,
+ register_prefix, i.op[1].regs->reg_name,
+ register_prefix, i.op[0].regs->reg_name);
+ }
+ else
+ {
+ /* Extraneous `l' suffix on fp insn. */
+ as_warn (_("translating to `%s %s%s'"), i.tm.name,
+ register_prefix, i.op[0].regs->reg_name);
+ }
}
}
}
@@ -2946,19 +3419,7 @@ process_operands ()
default_seg = build_modrm_byte ();
}
- else if (i.tm.opcode_modifier & (Seg2ShortForm | Seg3ShortForm))
- {
- if (i.tm.base_opcode == POP_SEG_SHORT
- && i.op[0].regs->reg_num == 1)
- {
- as_bad (_("you can't `pop %%cs'"));
- return 0;
- }
- i.tm.base_opcode |= (i.op[0].regs->reg_num << 3);
- if ((i.op[0].regs->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTZ;
- }
- else if ((i.tm.base_opcode & ~(D | W)) == MOV_AX_DISP32)
+ else if ((i.tm.base_opcode & ~0x3) == MOV_AX_DISP32)
{
default_seg = &ds;
}
@@ -2988,7 +3449,7 @@ process_operands ()
}
static const seg_entry *
-build_modrm_byte ()
+build_modrm_byte (void)
{
const seg_entry *default_seg = 0;
@@ -2997,11 +3458,33 @@ build_modrm_byte ()
if (i.reg_operands == 2)
{
unsigned int source, dest;
- source = ((i.types[0]
- & (Reg | RegMMX | RegXMM
- | SReg2 | SReg3
- | Control | Debug | Test))
- ? 0 : 1);
+
+ switch (i.operands)
+ {
+ case 2:
+ source = 0;
+ break;
+ case 3:
+ /* When there are 3 operands, one of them may be immediate,
+ which may be the first or the last operand. Otherwise,
+ the first operand must be shift count register (cl). */
+ assert (i.imm_operands == 1
+ || (i.imm_operands == 0
+ && (i.types[0] & ShiftCount)));
+ source = (i.types[0] & (Imm | ShiftCount)) ? 1 : 0;
+ break;
+ case 4:
+ /* When there are 4 operands, the first two must be immediate
+ operands. The source operand will be the 3rd one. */
+ assert (i.imm_operands == 2
+ && (i.types[0] & Imm)
+ && (i.types[1] & Imm));
+ source = 2;
+ break;
+ default:
+ abort ();
+ }
+
dest = source + 1;
i.rm.mode = 3;
@@ -3011,29 +3494,29 @@ build_modrm_byte ()
destination operand, then we assume the source operand may
sometimes be a memory operand and so we need to store the
destination in the i.rm.reg field. */
- if ((i.tm.operand_types[dest] & AnyMem) == 0)
+ if ((i.tm.operand_types[dest] & (AnyMem | RegMem)) == 0)
{
i.rm.reg = i.op[dest].regs->reg_num;
i.rm.regmem = i.op[source].regs->reg_num;
if ((i.op[dest].regs->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTX;
+ i.rex |= REX_R;
if ((i.op[source].regs->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTZ;
+ i.rex |= REX_B;
}
else
{
i.rm.reg = i.op[source].regs->reg_num;
i.rm.regmem = i.op[dest].regs->reg_num;
if ((i.op[dest].regs->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTZ;
+ i.rex |= REX_B;
if ((i.op[source].regs->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTX;
+ i.rex |= REX_R;
}
- if (flag_code != CODE_64BIT && (i.rex & (REX_EXTX | REX_EXTZ)))
+ if (flag_code != CODE_64BIT && (i.rex & (REX_R | REX_B)))
{
if (!((i.types[0] | i.types[1]) & Control))
abort ();
- i.rex &= ~(REX_EXTX | REX_EXTZ);
+ i.rex &= ~(REX_R | REX_B);
add_prefix (LOCK_PREFIX_OPCODE);
}
}
@@ -3042,9 +3525,12 @@ build_modrm_byte ()
if (i.mem_operands)
{
unsigned int fake_zero_displacement = 0;
- unsigned int op = ((i.types[0] & AnyMem)
- ? 0
- : (i.types[1] & AnyMem) ? 1 : 2);
+ unsigned int op;
+
+ for (op = 0; op < i.operands; op++)
+ if ((i.types[op] & AnyMem))
+ break;
+ assert (op < i.operands);
default_seg = &ds;
@@ -3065,9 +3551,11 @@ build_modrm_byte ()
i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
i.sib.base = NO_BASE_REGISTER;
i.sib.index = NO_INDEX_REGISTER;
- i.types[op] = ((i.prefix[ADDR_PREFIX] == 0) ? Disp32S : Disp32);
+ i.types[op] = ((i.prefix[ADDR_PREFIX] == 0)
+ ? Disp32S : Disp32);
}
- else if ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0))
+ else if ((flag_code == CODE_16BIT)
+ ^ (i.prefix[ADDR_PREFIX] != 0))
{
i.rm.regmem = NO_BASE_REGISTER_16;
i.types[op] = Disp16;
@@ -3090,7 +3578,7 @@ build_modrm_byte ()
else
i.types[op] |= Disp32S;
if ((i.index_reg->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTY;
+ i.rex |= REX_X;
}
}
/* RIP addressing for 64bit mode. */
@@ -3099,7 +3587,7 @@ build_modrm_byte ()
i.rm.regmem = NO_BASE_REGISTER;
i.types[op] &= ~ Disp;
i.types[op] |= Disp32S;
- i.flags[op] = Operand_PCrel;
+ i.flags[op] |= Operand_PCrel;
if (! i.disp_operands)
fake_zero_displacement = 1;
}
@@ -3137,11 +3625,13 @@ build_modrm_byte ()
{
if (flag_code == CODE_64BIT
&& (i.types[op] & Disp))
- i.types[op] = (i.types[op] & Disp8) | (i.prefix[ADDR_PREFIX] == 0 ? Disp32S : Disp32);
+ i.types[op] = ((i.types[op] & Disp8)
+ | (i.prefix[ADDR_PREFIX] == 0
+ ? Disp32S : Disp32));
i.rm.regmem = i.base_reg->reg_num;
if ((i.base_reg->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTZ;
+ i.rex |= REX_B;
i.sib.base = i.base_reg->reg_num;
/* x86-64 ignores REX prefix bit here to avoid decoder
complications. */
@@ -3178,7 +3668,7 @@ build_modrm_byte ()
i.sib.index = i.index_reg->reg_num;
i.rm.regmem = ESCAPE_TO_TWO_BYTE_ADDRESSING;
if ((i.index_reg->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTY;
+ i.rex |= REX_X;
}
if (i.disp_operands
@@ -3211,31 +3701,28 @@ build_modrm_byte ()
registers are coded into the i.rm.reg field. */
if (i.reg_operands)
{
- unsigned int op =
- ((i.types[0]
- & (Reg | RegMMX | RegXMM
- | SReg2 | SReg3
- | Control | Debug | Test))
- ? 0
- : ((i.types[1]
- & (Reg | RegMMX | RegXMM
- | SReg2 | SReg3
- | Control | Debug | Test))
- ? 1
- : 2));
+ unsigned int op;
+
+ for (op = 0; op < i.operands; op++)
+ if ((i.types[op] & (Reg | RegMMX | RegXMM
+ | SReg2 | SReg3
+ | Control | Debug | Test)))
+ break;
+ assert (op < i.operands);
+
/* If there is an extension opcode to put here, the register
number must be put into the regmem field. */
if (i.tm.extension_opcode != None)
{
i.rm.regmem = i.op[op].regs->reg_num;
if ((i.op[op].regs->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTZ;
+ i.rex |= REX_B;
}
else
{
i.rm.reg = i.op[op].regs->reg_num;
if ((i.op[op].regs->reg_flags & RegRex) != 0)
- i.rex |= REX_EXTX;
+ i.rex |= REX_R;
}
/* Now, if no memory operand has set i.rm.mode = 0, 1, 2 we
@@ -3253,7 +3740,7 @@ build_modrm_byte ()
}
static void
-output_branch ()
+output_branch (void)
{
char *p;
int code16;
@@ -3331,7 +3818,7 @@ output_branch ()
}
static void
-output_jump ()
+output_jump (void)
{
char *p;
int size;
@@ -3397,7 +3884,7 @@ output_jump ()
}
static void
-output_interseg_jump ()
+output_interseg_jump (void)
{
char *p;
int size;
@@ -3461,7 +3948,7 @@ output_interseg_jump ()
}
static void
-output_insn ()
+output_insn (void)
{
fragS *insn_start_frag;
offsetT insn_start_off;
@@ -3488,10 +3975,12 @@ output_insn ()
unsigned char *q;
unsigned int prefix;
- /* All opcodes on i386 have either 1 or 2 bytes. Merom New
- Instructions have 3 bytes. We may use one more higher byte
- to specify a prefix the instruction requires. */
- if ((i.tm.cpu_flags & CpuMNI) != 0)
+ /* All opcodes on i386 have either 1 or 2 bytes. SSSE3 and
+ SSE4 instructions have 3 bytes. We may use one more higher
+ byte to specify a prefix the instruction requires. Exclude
+ instructions which are in both SSE4 and ABM. */
+ if ((i.tm.cpu_flags & (CpuSSSE3 | CpuSSE4)) != 0
+ && (i.tm.cpu_flags & CpuABM) == 0)
{
if (i.tm.base_opcode & 0xff000000)
{
@@ -3504,7 +3993,7 @@ output_insn ()
prefix = (i.tm.base_opcode >> 16) & 0xff;
if ((i.tm.cpu_flags & CpuPadLock) != 0)
{
-check_prefix:
+ check_prefix:
if (prefix != REPE_PREFIX_OPCODE
|| i.prefix[LOCKREP_PREFIX] != REPE_PREFIX_OPCODE)
add_prefix (prefix);
@@ -3532,7 +4021,8 @@ check_prefix:
}
else
{
- if ((i.tm.cpu_flags & CpuMNI) != 0)
+ if ((i.tm.cpu_flags & (CpuSSSE3 | CpuSSE4)) != 0
+ && (i.tm.cpu_flags & CpuABM) == 0)
{
p = frag_more (3);
*p++ = (i.tm.base_opcode >> 16) & 0xff;
@@ -3586,10 +4076,42 @@ check_prefix:
#endif /* DEBUG386 */
}
+/* Return the size of the displacement operand N. */
+
+static int
+disp_size (unsigned int n)
+{
+ int size = 4;
+ if (i.types[n] & (Disp8 | Disp16 | Disp64))
+ {
+ size = 2;
+ if (i.types[n] & Disp8)
+ size = 1;
+ if (i.types[n] & Disp64)
+ size = 8;
+ }
+ return size;
+}
+
+/* Return the size of the immediate operand N. */
+
+static int
+imm_size (unsigned int n)
+{
+ int size = 4;
+ if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64))
+ {
+ size = 2;
+ if (i.types[n] & (Imm8 | Imm8S))
+ size = 1;
+ if (i.types[n] & Imm64)
+ size = 8;
+ }
+ return size;
+}
+
static void
-output_disp (insn_start_frag, insn_start_off)
- fragS *insn_start_frag;
- offsetT insn_start_off;
+output_disp (fragS *insn_start_frag, offsetT insn_start_off)
{
char *p;
unsigned int n;
@@ -3600,18 +4122,9 @@ output_disp (insn_start_frag, insn_start_off)
{
if (i.op[n].disps->X_op == O_constant)
{
- int size;
+ int size = disp_size (n);
offsetT val;
- size = 4;
- if (i.types[n] & (Disp8 | Disp16 | Disp64))
- {
- size = 2;
- if (i.types[n] & Disp8)
- size = 1;
- if (i.types[n] & Disp64)
- size = 8;
- }
val = offset_in_range (i.op[n].disps->X_add_number,
size);
p = frag_more (size);
@@ -3620,45 +4133,32 @@ output_disp (insn_start_frag, insn_start_off)
else
{
enum bfd_reloc_code_real reloc_type;
- int size = 4;
- int sign = 0;
+ int size = disp_size (n);
+ int sign = (i.types[n] & Disp32S) != 0;
int pcrel = (i.flags[n] & Operand_PCrel) != 0;
+ /* We can't have 8 bit displacement here. */
+ assert ((i.types[n] & Disp8) == 0);
+
/* The PC relative address is computed relative
to the instruction boundary, so in case immediate
fields follows, we need to adjust the value. */
if (pcrel && i.imm_operands)
{
- int imm_size = 4;
unsigned int n1;
+ int sz = 0;
for (n1 = 0; n1 < i.operands; n1++)
if (i.types[n1] & Imm)
{
- if (i.types[n1] & (Imm8 | Imm8S | Imm16 | Imm64))
- {
- imm_size = 2;
- if (i.types[n1] & (Imm8 | Imm8S))
- imm_size = 1;
- if (i.types[n1] & Imm64)
- imm_size = 8;
- }
- break;
+ /* Only one immediate is allowed for PC
+ relative address. */
+ assert (sz == 0);
+ sz = imm_size (n1);
+ i.op[n].disps->X_add_number -= sz;
}
/* We should find the immediate. */
- if (n1 == i.operands)
- abort ();
- i.op[n].disps->X_add_number -= imm_size;
- }
-
- if (i.types[n] & Disp32S)
- sign = 1;
-
- if (i.types[n] & (Disp16 | Disp64))
- {
- size = 2;
- if (i.types[n] & Disp64)
- size = 8;
+ assert (sz != 0);
}
p = frag_more (size);
@@ -3712,9 +4212,7 @@ output_disp (insn_start_frag, insn_start_off)
}
static void
-output_imm (insn_start_frag, insn_start_off)
- fragS *insn_start_frag;
- offsetT insn_start_off;
+output_imm (fragS *insn_start_frag, offsetT insn_start_off)
{
char *p;
unsigned int n;
@@ -3725,18 +4223,9 @@ output_imm (insn_start_frag, insn_start_off)
{
if (i.op[n].imms->X_op == O_constant)
{
- int size;
+ int size = imm_size (n);
offsetT val;
- size = 4;
- if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64))
- {
- size = 2;
- if (i.types[n] & (Imm8 | Imm8S))
- size = 1;
- else if (i.types[n] & Imm64)
- size = 8;
- }
val = offset_in_range (i.op[n].imms->X_add_number,
size);
p = frag_more (size);
@@ -3749,21 +4238,15 @@ output_imm (insn_start_frag, insn_start_off)
non-absolute imms). Try to support other
sizes ... */
enum bfd_reloc_code_real reloc_type;
- int size = 4;
- int sign = 0;
+ int size = imm_size (n);
+ int sign;
if ((i.types[n] & (Imm32S))
&& (i.suffix == QWORD_MNEM_SUFFIX
|| (!i.suffix && (i.tm.opcode_modifier & No_lSuf))))
sign = 1;
- if (i.types[n] & (Imm8 | Imm8S | Imm16 | Imm64))
- {
- size = 2;
- if (i.types[n] & (Imm8 | Imm8S))
- size = 1;
- if (i.types[n] & Imm64)
- size = 8;
- }
+ else
+ sign = 0;
p = frag_more (size);
reloc_type = reloc (size, 0, sign, i.reloc[n]);
@@ -3857,10 +4340,8 @@ static enum bfd_reloc_code_real got_reloc = NO_RELOC;
static int cons_sign = -1;
void
-x86_cons_fix_new (fragS *frag,
- unsigned int off,
- unsigned int len,
- expressionS *exp)
+x86_cons_fix_new (fragS *frag, unsigned int off, unsigned int len,
+ expressionS *exp)
{
enum bfd_reloc_code_real r = reloc (len, 0, cons_sign, got_reloc);
@@ -3891,8 +4372,8 @@ x86_cons_fix_new (fragS *frag,
input line. Otherwise return NULL. */
static char *
lex_got (enum bfd_reloc_code_real *reloc,
- int *adjust,
- unsigned int *types)
+ int *adjust,
+ unsigned int *types)
{
/* Some of the relocations depend on the size of what field is to
be relocated. But in our callers i386_immediate and i386_displacement
@@ -3904,23 +4385,57 @@ lex_got (enum bfd_reloc_code_real *reloc,
const enum bfd_reloc_code_real rel[2];
const unsigned int types64;
} gotrel[] = {
- { "PLTOFF", { 0, BFD_RELOC_X86_64_PLTOFF64 }, Imm64 },
- { "PLT", { BFD_RELOC_386_PLT32, BFD_RELOC_X86_64_PLT32 }, Imm32|Imm32S|Disp32 },
- { "GOTPLT", { 0, BFD_RELOC_X86_64_GOTPLT64 }, Imm64|Disp64 },
- { "GOTOFF", { BFD_RELOC_386_GOTOFF, BFD_RELOC_X86_64_GOTOFF64 }, Imm64|Disp64 },
- { "GOTPCREL", { 0, BFD_RELOC_X86_64_GOTPCREL }, Imm32|Imm32S|Disp32 },
- { "TLSGD", { BFD_RELOC_386_TLS_GD, BFD_RELOC_X86_64_TLSGD }, Imm32|Imm32S|Disp32 },
- { "TLSLDM", { BFD_RELOC_386_TLS_LDM, 0 }, 0 },
- { "TLSLD", { 0, BFD_RELOC_X86_64_TLSLD }, Imm32|Imm32S|Disp32 },
- { "GOTTPOFF", { BFD_RELOC_386_TLS_IE_32, BFD_RELOC_X86_64_GOTTPOFF }, Imm32|Imm32S|Disp32 },
- { "TPOFF", { BFD_RELOC_386_TLS_LE_32, BFD_RELOC_X86_64_TPOFF32 }, Imm32|Imm32S|Imm64|Disp32|Disp64 },
- { "NTPOFF", { BFD_RELOC_386_TLS_LE, 0 }, 0 },
- { "DTPOFF", { BFD_RELOC_386_TLS_LDO_32, BFD_RELOC_X86_64_DTPOFF32 }, Imm32|Imm32S|Imm64|Disp32|Disp64 },
- { "GOTNTPOFF",{ BFD_RELOC_386_TLS_GOTIE, 0 }, 0 },
- { "INDNTPOFF",{ BFD_RELOC_386_TLS_IE, 0 }, 0 },
- { "GOT", { BFD_RELOC_386_GOT32, BFD_RELOC_X86_64_GOT32 }, Imm32|Imm32S|Disp32|Imm64 },
- { "TLSDESC", { BFD_RELOC_386_TLS_GOTDESC, BFD_RELOC_X86_64_GOTPC32_TLSDESC }, Imm32|Imm32S|Disp32 },
- { "TLSCALL", { BFD_RELOC_386_TLS_DESC_CALL, BFD_RELOC_X86_64_TLSDESC_CALL }, Imm32|Imm32S|Disp32 }
+ { "PLTOFF", { 0,
+ BFD_RELOC_X86_64_PLTOFF64 },
+ Imm64 },
+ { "PLT", { BFD_RELOC_386_PLT32,
+ BFD_RELOC_X86_64_PLT32 },
+ Imm32 | Imm32S | Disp32 },
+ { "GOTPLT", { 0,
+ BFD_RELOC_X86_64_GOTPLT64 },
+ Imm64 | Disp64 },
+ { "GOTOFF", { BFD_RELOC_386_GOTOFF,
+ BFD_RELOC_X86_64_GOTOFF64 },
+ Imm64 | Disp64 },
+ { "GOTPCREL", { 0,
+ BFD_RELOC_X86_64_GOTPCREL },
+ Imm32 | Imm32S | Disp32 },
+ { "TLSGD", { BFD_RELOC_386_TLS_GD,
+ BFD_RELOC_X86_64_TLSGD },
+ Imm32 | Imm32S | Disp32 },
+ { "TLSLDM", { BFD_RELOC_386_TLS_LDM,
+ 0 },
+ 0 },
+ { "TLSLD", { 0,
+ BFD_RELOC_X86_64_TLSLD },
+ Imm32 | Imm32S | Disp32 },
+ { "GOTTPOFF", { BFD_RELOC_386_TLS_IE_32,
+ BFD_RELOC_X86_64_GOTTPOFF },
+ Imm32 | Imm32S | Disp32 },
+ { "TPOFF", { BFD_RELOC_386_TLS_LE_32,
+ BFD_RELOC_X86_64_TPOFF32 },
+ Imm32 | Imm32S | Imm64 | Disp32 | Disp64 },
+ { "NTPOFF", { BFD_RELOC_386_TLS_LE,
+ 0 },
+ 0 },
+ { "DTPOFF", { BFD_RELOC_386_TLS_LDO_32,
+ BFD_RELOC_X86_64_DTPOFF32 },
+ Imm32 | Imm32S | Imm64 | Disp32 | Disp64 },
+ { "GOTNTPOFF",{ BFD_RELOC_386_TLS_GOTIE,
+ 0 },
+ 0 },
+ { "INDNTPOFF",{ BFD_RELOC_386_TLS_IE,
+ 0 },
+ 0 },
+ { "GOT", { BFD_RELOC_386_GOT32,
+ BFD_RELOC_X86_64_GOT32 },
+ Imm32 | Imm32S | Disp32 | Imm64 },
+ { "TLSDESC", { BFD_RELOC_386_TLS_GOTDESC,
+ BFD_RELOC_X86_64_GOTPC32_TLSDESC },
+ Imm32 | Imm32S | Disp32 },
+ { "TLSCALL", { BFD_RELOC_386_TLS_DESC_CALL,
+ BFD_RELOC_X86_64_TLSDESC_CALL },
+ Imm32 | Imm32S | Disp32 }
};
char *cp;
unsigned int j;
@@ -3951,7 +4466,7 @@ lex_got (enum bfd_reloc_code_real *reloc,
if (types)
{
if (flag_code != CODE_64BIT)
- *types = Imm32|Disp32;
+ *types = Imm32 | Disp32;
else
*types = gotrel[j].types64;
}
@@ -3959,9 +4474,6 @@ lex_got (enum bfd_reloc_code_real *reloc,
if (GOT_symbol == NULL)
GOT_symbol = symbol_find_or_make (GLOBAL_OFFSET_TABLE_NAME);
- /* Replace the relocation token with ' ', so that
- errors like foo@GOTOFF1 will be detected. */
-
/* The length of the first part of our input line. */
first = cp - input_line_pointer;
@@ -3977,9 +4489,12 @@ lex_got (enum bfd_reloc_code_real *reloc,
be necessary, but be safe. */
tmpbuf = xmalloc (first + second + 2);
memcpy (tmpbuf, input_line_pointer, first);
- tmpbuf[first] = ' ';
- memcpy (tmpbuf + first + 1, past_reloc, second);
- tmpbuf[first + second + 1] = '\0';
+ if (second != 0 && *past_reloc != ' ')
+ /* Replace the relocation token with ' ', so that
+ errors like foo@GOTOFF1 will be detected. */
+ tmpbuf[first++] = ' ';
+ memcpy (tmpbuf + first, past_reloc, second);
+ tmpbuf[first + second] = '\0';
return tmpbuf;
}
@@ -3994,9 +4509,7 @@ lex_got (enum bfd_reloc_code_real *reloc,
}
void
-x86_cons (exp, size)
- expressionS *exp;
- int size;
+x86_cons (expressionS *exp, int size)
{
if (size == 4 || (object_64bit && size == 8))
{
@@ -4058,11 +4571,8 @@ pe_directive_secrel (dummy)
}
#endif
-static int i386_immediate PARAMS ((char *));
-
static int
-i386_immediate (imm_start)
- char *imm_start;
+i386_immediate (char *imm_start)
{
char *save_input_line_pointer;
char *gotfree_input_line;
@@ -4072,7 +4582,8 @@ i386_immediate (imm_start)
if (i.imm_operands == MAX_IMMEDIATE_OPERANDS)
{
- as_bad (_("only 1 or 2 immediate operands are allowed"));
+ as_bad (_("at most %d immediate operands are allowed"),
+ MAX_IMMEDIATE_OPERANDS);
return 0;
}
@@ -4114,9 +4625,10 @@ i386_immediate (imm_start)
/* Size it properly later. */
i.types[this_operand] |= Imm64;
/* If BFD64, sign extend val. */
- if (!use_rela_relocations)
- if ((exp->X_add_number & ~(((addressT) 2 << 31) - 1)) == 0)
- exp->X_add_number = (exp->X_add_number ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31);
+ if (!use_rela_relocations
+ && (exp->X_add_number & ~(((addressT) 2 << 31) - 1)) == 0)
+ exp->X_add_number
+ = (exp->X_add_number ^ ((addressT) 1 << 31)) - ((addressT) 1 << 31);
}
#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT))
else if (OUTPUT_FLAVOR == bfd_target_aout_flavour
@@ -4131,6 +4643,11 @@ i386_immediate (imm_start)
return 0;
}
#endif
+ else if (!intel_syntax && exp->X_op == O_register)
+ {
+ as_bad (_("illegal immediate register operand %s"), imm_start);
+ return 0;
+ }
else
{
/* This is an address. The size of the address will be
@@ -4143,11 +4660,8 @@ i386_immediate (imm_start)
return 1;
}
-static char *i386_scale PARAMS ((char *));
-
static char *
-i386_scale (scale)
- char *scale;
+i386_scale (char *scale)
{
offsetT val;
char *save = input_line_pointer;
@@ -4194,12 +4708,8 @@ i386_scale (scale)
return scale;
}
-static int i386_displacement PARAMS ((char *, char *));
-
static int
-i386_displacement (disp_start, disp_end)
- char *disp_start;
- char *disp_end;
+i386_displacement (char *disp_start, char *disp_end)
{
expressionS *exp;
segT exp_seg = 0;
@@ -4208,6 +4718,13 @@ i386_displacement (disp_start, disp_end)
int bigdisp, override;
unsigned int types = Disp;
+ if (i.disp_operands == MAX_MEMORY_OPERANDS)
+ {
+ as_bad (_("at most %d displacement operands are allowed"),
+ MAX_MEMORY_OPERANDS);
+ return 0;
+ }
+
if ((i.types[this_operand] & JumpAbsolute)
|| !(current_templates->start->opcode_modifier & (Jump | JumpDword)))
{
@@ -4224,9 +4741,9 @@ i386_displacement (disp_start, disp_end)
if (flag_code == CODE_64BIT)
{
if (!bigdisp)
- bigdisp = (override || i.suffix == WORD_MNEM_SUFFIX)
- ? Disp16
- : Disp32S | Disp32;
+ bigdisp = ((override || i.suffix == WORD_MNEM_SUFFIX)
+ ? Disp16
+ : Disp32S | Disp32);
else if (!override)
bigdisp = Disp64 | Disp32S | Disp32;
}
@@ -4374,14 +4891,11 @@ i386_displacement (disp_start, disp_end)
return 1;
}
-static int i386_index_check PARAMS ((const char *));
-
/* Make sure the memory operand we've been dealt is valid.
Return 1 on success, 0 on a failure. */
static int
-i386_index_check (operand_string)
- const char *operand_string;
+i386_index_check (const char *operand_string)
{
int ok;
#if INFER_ADDR_PREFIX
@@ -4403,9 +4917,9 @@ i386_index_check (operand_string)
else if (flag_code == CODE_64BIT)
RegXX = i.prefix[ADDR_PREFIX] == 0 ? Reg64 : Reg32;
else
- RegXX = (flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)
- ? Reg16
- : Reg32;
+ RegXX = ((flag_code == CODE_16BIT) ^ (i.prefix[ADDR_PREFIX] != 0)
+ ? Reg16
+ : Reg32);
if (!i.base_reg
|| !(i.base_reg->reg_type & Acc)
|| !(i.base_reg->reg_type & RegXX)
@@ -4414,17 +4928,17 @@ i386_index_check (operand_string)
ok = 0;
}
else if (flag_code == CODE_64BIT)
- {
- unsigned RegXX = (i.prefix[ADDR_PREFIX] == 0 ? Reg64 : Reg32);
-
- if ((i.base_reg
- && ((i.base_reg->reg_type & RegXX) == 0)
- && (i.base_reg->reg_type != BaseIndex
- || i.index_reg))
- || (i.index_reg
- && ((i.index_reg->reg_type & (RegXX | BaseIndex))
- != (RegXX | BaseIndex))))
- ok = 0;
+ {
+ unsigned RegXX = (i.prefix[ADDR_PREFIX] == 0 ? Reg64 : Reg32);
+
+ if ((i.base_reg
+ && ((i.base_reg->reg_type & RegXX) == 0)
+ && (i.base_reg->reg_type != BaseIndex
+ || i.index_reg))
+ || (i.index_reg
+ && ((i.index_reg->reg_type & (RegXX | BaseIndex))
+ != (RegXX | BaseIndex))))
+ ok = 0;
}
else
{
@@ -4466,8 +4980,9 @@ i386_index_check (operand_string)
FIXME. There doesn't seem to be any real need for separate
Disp16 and Disp32 flags. The same goes for Imm16 and Imm32.
Removing them would probably clean up the code quite a lot. */
- if (flag_code != CODE_64BIT && (i.types[this_operand] & (Disp16 | Disp32)))
- i.types[this_operand] ^= (Disp16 | Disp32);
+ if (flag_code != CODE_64BIT
+ && (i.types[this_operand] & (Disp16 | Disp32)))
+ i.types[this_operand] ^= (Disp16 | Disp32);
fudged = 1;
goto tryprefix;
}
@@ -4487,8 +5002,7 @@ i386_index_check (operand_string)
on error. */
static int
-i386_operand (operand_string)
- char *operand_string;
+i386_operand (char *operand_string)
{
const reg_entry *r;
char *end_op;
@@ -4646,7 +5160,8 @@ i386_operand (operand_string)
++base_string;
if (*base_string == ','
- || ((i.base_reg = parse_register (base_string, &end_op)) != NULL))
+ || ((i.base_reg = parse_register (base_string, &end_op))
+ != NULL))
{
displacement_string_end = temp_string;
@@ -4666,7 +5181,8 @@ i386_operand (operand_string)
if (is_space_char (*base_string))
++base_string;
- if ((i.index_reg = parse_register (base_string, &end_op)) != NULL)
+ if ((i.index_reg = parse_register (base_string, &end_op))
+ != NULL)
{
base_string = end_op;
if (is_space_char (*base_string))
@@ -4679,7 +5195,8 @@ i386_operand (operand_string)
}
else if (*base_string != ')')
{
- as_bad (_("expecting `,' or `)' after index register in `%s'"),
+ as_bad (_("expecting `,' or `)' "
+ "after index register in `%s'"),
operand_string);
return 0;
}
@@ -4703,21 +5220,24 @@ i386_operand (operand_string)
++base_string;
if (*base_string != ')')
{
- as_bad (_("expecting `)' after scale factor in `%s'"),
+ as_bad (_("expecting `)' "
+ "after scale factor in `%s'"),
operand_string);
return 0;
}
}
else if (!i.index_reg)
{
- as_bad (_("expecting index register or scale factor after `,'; got '%c'"),
+ as_bad (_("expecting index register or scale factor "
+ "after `,'; got '%c'"),
*base_string);
return 0;
}
}
else if (*base_string != ')')
{
- as_bad (_("expecting `,' or `)' after base register in `%s'"),
+ as_bad (_("expecting `,' or `)' "
+ "after base register in `%s'"),
operand_string);
return 0;
}
@@ -4933,7 +5453,8 @@ md_convert_frag (abfd, sec, fragP)
{
if (no_cond_jump_promotion
&& TYPE_FROM_RELAX_STATE (fragP->fr_subtype) != UNCOND_JUMP)
- as_warn_where (fragP->fr_file, fragP->fr_line, _("long jump required"));
+ as_warn_where (fragP->fr_file, fragP->fr_line,
+ _("long jump required"));
switch (fragP->fr_subtype)
{
@@ -4984,8 +5505,8 @@ md_convert_frag (abfd, sec, fragP)
if (DISP_SIZE_FROM_RELAX_STATE (fragP->fr_subtype) == 4
&& object_64bit
&& ((addressT) (displacement_from_opcode_start - extension
- + ((addressT) 1 << 31))
- > (((addressT) 2 << 31) - 1)))
+ + ((addressT) 1 << 31))
+ > (((addressT) 2 << 31) - 1)))
{
as_bad_where (fragP->fr_file, fragP->fr_line,
_("jump target out of range"));
@@ -5250,16 +5771,17 @@ md_atof (type, litP, sizeP)
return 0;
}
-static char output_invalid_buf[8];
+static char output_invalid_buf[sizeof (unsigned char) * 2 + 6];
static char *
-output_invalid (c)
- int c;
+output_invalid (int c)
{
if (ISPRINT (c))
- sprintf (output_invalid_buf, "'%c'", c);
+ snprintf (output_invalid_buf, sizeof (output_invalid_buf),
+ "'%c'", c);
else
- sprintf (output_invalid_buf, "(0x%x)", (unsigned) c);
+ snprintf (output_invalid_buf, sizeof (output_invalid_buf),
+ "(0x%x)", (unsigned char) c);
return output_invalid_buf;
}
@@ -5310,14 +5832,16 @@ parse_real_register (char *reg_string, char **end_op)
++s;
if (*s >= '0' && *s <= '7')
{
- r = &i386_float_regtab[*s - '0'];
+ int fpr = *s - '0';
++s;
if (is_space_char (*s))
++s;
if (*s == ')')
{
*end_op = s + 1;
- return r;
+ r = hash_find (reg_hash, "st(0)");
+ know (r);
+ return r + fpr;
}
}
/* We have "%st(" then garbage. */
@@ -5359,7 +5883,8 @@ parse_register (char *reg_string, char **end_op)
const expressionS *e = symbol_get_value_expression (symbolP);
know (e->X_op == O_register);
- know (e->X_add_number >= 0 && (valueT) e->X_add_number < ARRAY_SIZE (i386_regtab));
+ know (e->X_add_number >= 0
+ && (valueT) e->X_add_number < i386_regtab_size);
r = i386_regtab + e->X_add_number;
*end_op = input_line_pointer;
}
@@ -5417,22 +5942,27 @@ const char *md_shortopts = "qn";
#define OPTION_32 (OPTION_MD_BASE + 0)
#define OPTION_64 (OPTION_MD_BASE + 1)
#define OPTION_DIVIDE (OPTION_MD_BASE + 2)
+#define OPTION_MARCH (OPTION_MD_BASE + 3)
+#define OPTION_MTUNE (OPTION_MD_BASE + 4)
-struct option md_longopts[] = {
+struct option md_longopts[] =
+{
{"32", no_argument, NULL, OPTION_32},
-#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined(TE_PEP)
{"64", no_argument, NULL, OPTION_64},
#endif
{"divide", no_argument, NULL, OPTION_DIVIDE},
+ {"march", required_argument, NULL, OPTION_MARCH},
+ {"mtune", required_argument, NULL, OPTION_MTUNE},
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
int
-md_parse_option (c, arg)
- int c;
- char *arg ATTRIBUTE_UNUSED;
+md_parse_option (int c, char *arg)
{
+ unsigned int i;
+
switch (c)
{
case 'n':
@@ -5462,14 +5992,18 @@ md_parse_option (c, arg)
/* -s: On i386 Solaris, this tells the native assembler to use
.stab instead of .stab.excl. We always use .stab anyhow. */
break;
-
+#endif
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined(TE_PEP)
case OPTION_64:
{
const char **list, **l;
list = bfd_target_list ();
for (l = list; *l != NULL; l++)
- if (strcmp (*l, "elf64-x86-64") == 0)
+ if (CONST_STRNEQ (*l, "elf64-x86-64")
+ || strcmp (*l, "coff-x86-64") == 0
+ || strcmp (*l, "pe-x86-64") == 0
+ || strcmp (*l, "pei-x86-64") == 0)
{
default_arch = "x86_64";
break;
@@ -5502,6 +6036,44 @@ md_parse_option (c, arg)
#endif
break;
+ case OPTION_MARCH:
+ if (*arg == '.')
+ as_fatal (_("Invalid -march= option: `%s'"), arg);
+ for (i = 0; i < ARRAY_SIZE (cpu_arch); i++)
+ {
+ if (strcmp (arg, cpu_arch [i].name) == 0)
+ {
+ cpu_arch_isa = cpu_arch[i].type;
+ cpu_arch_isa_flags = cpu_arch[i].flags;
+ if (!cpu_arch_tune_set)
+ {
+ cpu_arch_tune = cpu_arch_isa;
+ cpu_arch_tune_flags = cpu_arch_isa_flags;
+ }
+ break;
+ }
+ }
+ if (i >= ARRAY_SIZE (cpu_arch))
+ as_fatal (_("Invalid -march= option: `%s'"), arg);
+ break;
+
+ case OPTION_MTUNE:
+ if (*arg == '.')
+ as_fatal (_("Invalid -mtune= option: `%s'"), arg);
+ for (i = 0; i < ARRAY_SIZE (cpu_arch); i++)
+ {
+ if (strcmp (arg, cpu_arch [i].name) == 0)
+ {
+ cpu_arch_tune_set = 1;
+ cpu_arch_tune = cpu_arch [i].type;
+ cpu_arch_tune_flags = cpu_arch[i].flags;
+ break;
+ }
+ }
+ if (i >= ARRAY_SIZE (cpu_arch))
+ as_fatal (_("Invalid -mtune= option: `%s'"), arg);
+ break;
+
default:
return 0;
}
@@ -5525,6 +6097,10 @@ md_show_usage (stream)
fprintf (stream, _("\
-s ignored\n"));
#endif
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) || defined(TE_PEP)
+ fprintf (stream, _("\
+ --32/--64 generate 32bit/64bit code\n"));
+#endif
#ifdef SVR4_COMMENT_CHARS
fprintf (stream, _("\
--divide do not treat `/' as a comment character\n"));
@@ -5532,7 +6108,32 @@ md_show_usage (stream)
fprintf (stream, _("\
--divide ignored\n"));
#endif
+ fprintf (stream, _("\
+ -march=CPU/-mtune=CPU generate code/optimize for CPU, where CPU is one of:\n\
+ i386, i486, pentium, pentiumpro, pentium4, nocona,\n\
+ core, core2, k6, athlon, k8, generic32, generic64\n"));
+
+}
+
+#if defined(TE_PEP)
+const char *
+x86_64_target_format (void)
+{
+ if (strcmp (default_arch, "x86_64") == 0)
+ {
+ set_code_flag (CODE_64BIT);
+ return COFF_TARGET_FORMAT;
+ }
+ else if (strcmp (default_arch, "i386") == 0)
+ {
+ set_code_flag (CODE_32BIT);
+ return "coff-i386";
+ }
+
+ as_fatal (_("Unknown architecture"));
+ return NULL;
}
+#endif
#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
|| defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
@@ -5540,12 +6141,28 @@ md_show_usage (stream)
/* Pick the target format to use. */
const char *
-i386_target_format ()
+i386_target_format (void)
{
if (!strcmp (default_arch, "x86_64"))
- set_code_flag (CODE_64BIT);
+ {
+ set_code_flag (CODE_64BIT);
+ if (cpu_arch_isa_flags == 0)
+ cpu_arch_isa_flags = Cpu186|Cpu286|Cpu386|Cpu486
+ |Cpu586|Cpu686|CpuP4|CpuMMX|CpuMMX2
+ |CpuSSE|CpuSSE2;
+ if (cpu_arch_tune_flags == 0)
+ cpu_arch_tune_flags = Cpu186|Cpu286|Cpu386|Cpu486
+ |Cpu586|Cpu686|CpuP4|CpuMMX|CpuMMX2
+ |CpuSSE|CpuSSE2;
+ }
else if (!strcmp (default_arch, "i386"))
- set_code_flag (CODE_32BIT);
+ {
+ set_code_flag (CODE_32BIT);
+ if (cpu_arch_isa_flags == 0)
+ cpu_arch_isa_flags = Cpu186|Cpu286|Cpu386;
+ if (cpu_arch_tune_flags == 0)
+ cpu_arch_tune_flags = Cpu186|Cpu286|Cpu386;
+ }
else
as_fatal (_("Unknown architecture"));
switch (OUTPUT_FLAVOR)
@@ -5566,7 +6183,7 @@ i386_target_format ()
object_64bit = 1;
use_rela_relocations = 1;
}
- return flag_code == CODE_64BIT ? "elf64-x86-64" : ELF_TARGET_FORMAT;
+ return flag_code == CODE_64BIT ? ELF_TARGET_FORMAT64 : ELF_TARGET_FORMAT;
}
#endif
default:
@@ -5578,7 +6195,8 @@ i386_target_format ()
#endif /* OBJ_MAYBE_ more than one */
#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
-void i386_elf_emit_arch_note ()
+void
+i386_elf_emit_arch_note (void)
{
if (IS_ELF && cpu_arch_name != NULL)
{
@@ -5669,8 +6287,7 @@ md_section_align (segment, size)
size, since the offset is always the last part of the insn. */
long
-md_pcrel_from (fixP)
- fixS *fixP;
+md_pcrel_from (fixS *fixP)
{
return fixP->fx_size + fixP->fx_where + fixP->fx_frag->fr_address;
}
@@ -5678,8 +6295,7 @@ md_pcrel_from (fixP)
#ifndef I386COFF
static void
-s_bss (ignore)
- int ignore ATTRIBUTE_UNUSED;
+s_bss (int ignore ATTRIBUTE_UNUSED)
{
int temp;
@@ -5695,8 +6311,7 @@ s_bss (ignore)
#endif
void
-i386_validate_fix (fixp)
- fixS *fixp;
+i386_validate_fix (fixS *fixp)
{
if (fixp->fx_subsy && fixp->fx_subsy == GOT_symbol)
{
@@ -6045,8 +6660,8 @@ struct intel_parser_s
int got_a_float; /* Whether the operand is a float. */
int op_modifier; /* Operand modifier. */
int is_mem; /* 1 if operand is memory reference. */
- int in_offset; /* >=1 if parsing operand of offset. */
- int in_bracket; /* >=1 if parsing operand in brackets. */
+ int in_offset; /* >=1 if parsing operand of offset. */
+ int in_bracket; /* >=1 if parsing operand in brackets. */
const reg_entry *reg; /* Last register reference found. */
char *disp; /* Displacement string being built. */
char *next_operand; /* Resume point when splitting operands. */
@@ -6085,22 +6700,19 @@ static struct intel_token cur_token, prev_token;
#define T_SHR 15
/* Prototypes for intel parser functions. */
-static int intel_match_token PARAMS ((int code));
-static void intel_get_token PARAMS ((void));
-static void intel_putback_token PARAMS ((void));
-static int intel_expr PARAMS ((void));
-static int intel_e04 PARAMS ((void));
-static int intel_e05 PARAMS ((void));
-static int intel_e06 PARAMS ((void));
-static int intel_e09 PARAMS ((void));
-static int intel_bracket_expr PARAMS ((void));
-static int intel_e10 PARAMS ((void));
-static int intel_e11 PARAMS ((void));
+static int intel_match_token (int);
+static void intel_putback_token (void);
+static void intel_get_token (void);
+static int intel_expr (void);
+static int intel_e04 (void);
+static int intel_e05 (void);
+static int intel_e06 (void);
+static int intel_e09 (void);
+static int intel_e10 (void);
+static int intel_e11 (void);
static int
-i386_intel_operand (operand_string, got_a_float)
- char *operand_string;
- int got_a_float;
+i386_intel_operand (char *operand_string, int got_a_float)
{
int ret;
char *p;
@@ -6190,7 +6802,7 @@ i386_intel_operand (operand_string, got_a_float)
ret = i386_immediate (intel_parser.disp);
if (intel_parser.next_operand && this_operand >= MAX_OPERANDS - 1)
- ret = 0;
+ ret = 0;
if (!ret || !intel_parser.next_operand)
break;
intel_parser.op_string = intel_parser.next_operand;
@@ -6210,7 +6822,7 @@ i386_intel_operand (operand_string, got_a_float)
expr' cmpOp e04 expr'
| Empty */
static int
-intel_expr ()
+intel_expr (void)
{
/* XXX Implement the comparison operators. */
return intel_e04 ();
@@ -6221,7 +6833,7 @@ intel_expr ()
e04' addOp e05 e04'
| Empty */
static int
-intel_e04 ()
+intel_e04 (void)
{
int nregs = -1;
@@ -6250,7 +6862,7 @@ intel_e04 ()
e05' binOp e06 e05'
| Empty */
static int
-intel_e05 ()
+intel_e05 (void)
{
int nregs = ~NUM_ADDRESS_REGS;
@@ -6259,7 +6871,9 @@ intel_e05 ()
if (!intel_e06())
return 0;
- if (cur_token.code == '&' || cur_token.code == '|' || cur_token.code == '^')
+ if (cur_token.code == '&'
+ || cur_token.code == '|'
+ || cur_token.code == '^')
{
char str[2];
@@ -6285,7 +6899,7 @@ intel_e05 ()
e06' mulOp e09 e06'
| Empty */
static int
-intel_e06 ()
+intel_e06 (void)
{
int nregs = ~NUM_ADDRESS_REGS;
@@ -6294,7 +6908,9 @@ intel_e06 ()
if (!intel_e09())
return 0;
- if (cur_token.code == '*' || cur_token.code == '/' || cur_token.code == '%')
+ if (cur_token.code == '*'
+ || cur_token.code == '/'
+ || cur_token.code == '%')
{
char str[2];
@@ -6309,7 +6925,7 @@ intel_e06 ()
else
break;
- intel_match_token (cur_token.code);
+ intel_match_token (cur_token.code);
if (nregs < 0)
nregs = ~nregs;
@@ -6331,7 +6947,7 @@ intel_e06 ()
| : e10 e09'
| Empty */
static int
-intel_e09 ()
+intel_e09 (void)
{
int nregs = ~NUM_ADDRESS_REGS;
int in_offset = 0;
@@ -6545,7 +7161,7 @@ intel_e09 ()
}
static int
-intel_bracket_expr ()
+intel_bracket_expr (void)
{
int was_offset = intel_parser.op_modifier & (1 << T_OFFSET);
const char *start = intel_parser.op_string;
@@ -6581,7 +7197,7 @@ intel_bracket_expr ()
intel_parser.op_modifier &= ~was_offset;
}
else
- strcat (intel_parser.disp, "[");
+ strcat (intel_parser.disp, "[");
/* Add a '+' to the displacement string if necessary. */
if (*intel_parser.disp != '\0'
@@ -6606,7 +7222,8 @@ intel_bracket_expr ()
/* Defer the warning until all of the operand was parsed. */
intel_parser.is_mem = -1;
else if (!quiet_warnings)
- as_warn (_("`[%.*s]' taken to mean just `%.*s'"), len, start, len, start);
+ as_warn (_("`[%.*s]' taken to mean just `%.*s'"),
+ len, start, len, start);
}
}
intel_parser.op_modifier |= was_offset;
@@ -6621,7 +7238,7 @@ intel_bracket_expr ()
e10' [ expr ] e10'
| Empty */
static int
-intel_e10 ()
+intel_e10 (void)
{
if (!intel_e11 ())
return 0;
@@ -6651,7 +7268,7 @@ intel_e10 ()
| id
| constant */
static int
-intel_e11 ()
+intel_e11 (void)
{
switch (cur_token.code)
{
@@ -6696,7 +7313,8 @@ intel_e11 ()
{
if (!(reg->reg_type & (SReg2 | SReg3)))
{
- as_bad (_("`%s' is not a valid segment register"), reg->reg_name);
+ as_bad (_("`%s' is not a valid segment register"),
+ reg->reg_name);
return 0;
}
else if (i.seg[i.mem_operands])
@@ -6886,7 +7504,8 @@ intel_e11 ()
/* Get the next token to check for register scaling. */
intel_match_token (cur_token.code);
- /* Check if this constant is a scaling factor for an index register. */
+ /* Check if this constant is a scaling factor for an
+ index register. */
if (cur_token.code == '*')
{
if (intel_match_token ('*') && cur_token.code == T_REG)
@@ -6895,14 +7514,17 @@ intel_e11 ()
if (!intel_parser.in_bracket)
{
- as_bad (_("Register scaling only allowed in memory operands"));
+ as_bad (_("Register scaling only allowed "
+ "in memory operands"));
return 0;
}
- if (reg->reg_type & Reg16) /* Disallow things like [1*si]. */
- reg = i386_regtab + REGNAM_AX + 4; /* sp is invalid as index */
+ /* Disallow things like [1*si].
+ sp and esp are invalid as index. */
+ if (reg->reg_type & Reg16)
+ reg = i386_regtab + REGNAM_AX + 4;
else if (i.index_reg)
- reg = i386_regtab + REGNAM_EAX + 4; /* esp is invalid as index */
+ reg = i386_regtab + REGNAM_EAX + 4;
/* The constant is followed by `* reg', so it must be
a valid scale. */
@@ -6952,8 +7574,7 @@ intel_e11 ()
/* Match the given token against cur_token. If they match, read the next
token from the operand string. */
static int
-intel_match_token (code)
- int code;
+intel_match_token (int code)
{
if (cur_token.code == code)
{
@@ -6969,7 +7590,7 @@ intel_match_token (code)
/* Read a new token from intel_parser.op_string and store it in cur_token. */
static void
-intel_get_token ()
+intel_get_token (void)
{
char *end_op;
const reg_entry *reg;
@@ -7154,7 +7775,7 @@ intel_get_token ()
/* Put cur_token back into the token stream and make cur_token point to
prev_token. */
static void
-intel_putback_token ()
+intel_putback_token (void)
{
if (cur_token.code != T_NIL)
{
@@ -7170,7 +7791,7 @@ intel_putback_token ()
}
int
-tc_x86_regname_to_dw2regnum (const char *regname)
+tc_x86_regname_to_dw2regnum (char *regname)
{
unsigned int regnum;
unsigned int regnames_count;
@@ -7281,16 +7902,16 @@ x86_64_section_letter (int letter, char **ptr_msg)
return SHF_X86_64_LARGE;
*ptr_msg = _("Bad .section directive: want a,l,w,x,M,S,G,T in string");
- }
+ }
else
- *ptr_msg = _("Bad .section directive: want a,w,x,M,S,G,T in string");
+ *ptr_msg = _("Bad .section directive: want a,w,x,M,S,G,T in string");
return -1;
}
int
x86_64_section_word (char *str, size_t len)
{
- if (len == 5 && flag_code == CODE_64BIT && strncmp (str, "large", 5) == 0)
+ if (len == 5 && flag_code == CODE_64BIT && CONST_STRNEQ (str, "large"))
return SHF_X86_64_LARGE;
return -1;
diff --git a/contrib/binutils/gas/config/tc-i386.h b/contrib/binutils/gas/config/tc-i386.h
index 9851704..51638b0 100644
--- a/contrib/binutils/gas/config/tc-i386.h
+++ b/contrib/binutils/gas/config/tc-i386.h
@@ -1,6 +1,6 @@
/* tc-i386.h -- Header file for tc-i386.c
Copyright 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -23,6 +23,8 @@
#ifndef TC_I386
#define TC_I386 1
+#include "opcodes/i386-opc.h"
+
struct fix;
#define TARGET_BYTES_BIG_ENDIAN 0
@@ -55,6 +57,7 @@ extern unsigned long i386_mach (void);
#ifdef TE_FreeBSD
#define ELF_TARGET_FORMAT "elf32-i386-freebsd"
+#define ELF_TARGET_FORMAT64 "elf64-x86-64-freebsd"
#elif defined (TE_VXWORKS)
#define ELF_TARGET_FORMAT "elf32-i386-vxworks"
#endif
@@ -63,9 +66,13 @@ extern unsigned long i386_mach (void);
#define ELF_TARGET_FORMAT "elf32-i386"
#endif
+#ifndef ELF_TARGET_FORMAT64
+#define ELF_TARGET_FORMAT64 "elf64-x86-64"
+#endif
+
#if ((defined (OBJ_MAYBE_COFF) && defined (OBJ_MAYBE_AOUT)) \
|| defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF))
-extern const char *i386_target_format PARAMS ((void));
+extern const char *i386_target_format (void);
#define TARGET_FORMAT i386_target_format ()
#else
#ifdef OBJ_ELF
@@ -78,7 +85,7 @@ extern const char *i386_target_format PARAMS ((void));
#if (defined (OBJ_MAYBE_ELF) || defined (OBJ_ELF))
#define md_end i386_elf_emit_arch_note
-extern void i386_elf_emit_arch_note PARAMS ((void));
+extern void i386_elf_emit_arch_note (void);
#endif
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
@@ -91,18 +98,16 @@ extern const char extra_symbol_chars[];
extern const char *i386_comment_chars;
#define tc_comment_chars i386_comment_chars
-#define MAX_OPERANDS 3 /* max operands per insn */
-#define MAX_IMMEDIATE_OPERANDS 2/* max immediates per insn (lcall, ljmp) */
-#define MAX_MEMORY_OPERANDS 2 /* max memory refs per insn (string ops) */
-
/* Prefixes will be emitted in the order defined below.
WAIT_PREFIX must be the first prefix since FWAIT is really is an
- instruction, and so must come before any prefixes. */
+ instruction, and so must come before any prefixes.
+ The preferred prefix order is SEG_PREFIX, ADDR_PREFIX, DATA_PREFIX,
+ LOCKREP_PREFIX. */
#define WAIT_PREFIX 0
-#define LOCKREP_PREFIX 1
+#define SEG_PREFIX 1
#define ADDR_PREFIX 2
#define DATA_PREFIX 3
-#define SEG_PREFIX 4
+#define LOCKREP_PREFIX 4
#define REX_PREFIX 5 /* must come last. */
#define MAX_PREFIXES 6 /* max prefixes per opcode */
@@ -111,21 +116,6 @@ extern const char *i386_comment_chars;
#define IMMEDIATE_PREFIX '$'
#define ABSOLUTE_PREFIX '*'
-#define TWO_BYTE_OPCODE_ESCAPE 0x0f
-#define NOP_OPCODE (char) 0x90
-
-/* register numbers */
-#define EBP_REG_NUM 5
-#define ESP_REG_NUM 4
-
-/* modrm_byte.regmem for twobyte escape */
-#define ESCAPE_TO_TWO_BYTE_ADDRESSING ESP_REG_NUM
-/* index_base_byte.index for no index register addressing */
-#define NO_INDEX_REGISTER ESP_REG_NUM
-/* index_base_byte.base for no base register addressing */
-#define NO_BASE_REGISTER EBP_REG_NUM
-#define NO_BASE_REGISTER_16 6
-
/* these are the instruction mnemonic suffixes. */
#define WORD_MNEM_SUFFIX 'w'
#define BYTE_MNEM_SUFFIX 'b'
@@ -135,184 +125,8 @@ extern const char *i386_comment_chars;
/* Intel Syntax */
#define LONG_DOUBLE_MNEM_SUFFIX 'x'
-/* modrm.mode = REGMEM_FIELD_HAS_REG when a register is in there */
-#define REGMEM_FIELD_HAS_REG 0x3/* always = 0x3 */
-#define REGMEM_FIELD_HAS_MEM (~REGMEM_FIELD_HAS_REG)
-
#define END_OF_INSN '\0'
-typedef struct
-{
- /* instruction name sans width suffix ("mov" for movl insns) */
- char *name;
-
- /* how many operands */
- unsigned int operands;
-
- /* base_opcode is the fundamental opcode byte without optional
- prefix(es). */
- unsigned int base_opcode;
-
- /* extension_opcode is the 3 bit extension for group <n> insns.
- This field is also used to store the 8-bit opcode suffix for the
- AMD 3DNow! instructions.
- If this template has no extension opcode (the usual case) use None */
- unsigned int extension_opcode;
-#define None 0xffff /* If no extension_opcode is possible. */
-
- /* cpu feature flags */
- unsigned int cpu_flags;
-#define Cpu086 0x1 /* Any old cpu will do, 0 does the same */
-#define Cpu186 0x2 /* i186 or better required */
-#define Cpu286 0x4 /* i286 or better required */
-#define Cpu386 0x8 /* i386 or better required */
-#define Cpu486 0x10 /* i486 or better required */
-#define Cpu586 0x20 /* i585 or better required */
-#define Cpu686 0x40 /* i686 or better required */
-#define CpuP4 0x80 /* Pentium4 or better required */
-#define CpuK6 0x100 /* AMD K6 or better required*/
-#define CpuAthlon 0x200 /* AMD Athlon or better required*/
-#define CpuSledgehammer 0x400 /* Sledgehammer or better required */
-#define CpuMMX 0x800 /* MMX support required */
-#define CpuMMX2 0x1000 /* extended MMX support (with SSE or 3DNow!Ext) required */
-#define CpuSSE 0x2000 /* Streaming SIMD extensions required */
-#define CpuSSE2 0x4000 /* Streaming SIMD extensions 2 required */
-#define Cpu3dnow 0x8000 /* 3dnow! support required */
-#define Cpu3dnowA 0x10000 /* 3dnow!Extensions support required */
-#define CpuSSE3 0x20000 /* Streaming SIMD extensions 3 required */
-#define CpuPNI CpuSSE3 /* Prescott New Instructions required */
-#define CpuPadLock 0x40000 /* VIA PadLock required */
-#define CpuSVME 0x80000 /* AMD Secure Virtual Machine Ext-s required */
-#define CpuVMX 0x100000 /* VMX Instructions required */
-#define CpuMNI 0x200000 /* Merom New Instructions required */
-
- /* These flags are set by gas depending on the flag_code. */
-#define Cpu64 0x4000000 /* 64bit support required */
-#define CpuNo64 0x8000000 /* Not supported in the 64bit mode */
-
- /* The default value for unknown CPUs - enable all features to avoid problems. */
-#define CpuUnknownFlags (Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686 \
- |CpuP4|CpuSledgehammer|CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuPNI|CpuVMX \
- |Cpu3dnow|Cpu3dnowA|CpuK6|CpuAthlon|CpuPadLock|CpuSVME|CpuMNI)
-
- /* the bits in opcode_modifier are used to generate the final opcode from
- the base_opcode. These bits also are used to detect alternate forms of
- the same instruction */
- unsigned int opcode_modifier;
-
- /* opcode_modifier bits: */
-#define W 0x1 /* set if operands can be words or dwords
- encoded the canonical way */
-#define D 0x2 /* D = 0 if Reg --> Regmem;
- D = 1 if Regmem --> Reg: MUST BE 0x2 */
-#define Modrm 0x4
-#define FloatR 0x8 /* src/dest swap for floats: MUST BE 0x8 */
-#define ShortForm 0x10 /* register is in low 3 bits of opcode */
-#define FloatMF 0x20 /* FP insn memory format bit, sized by 0x4 */
-#define Jump 0x40 /* special case for jump insns. */
-#define JumpDword 0x80 /* call and jump */
-#define JumpByte 0x100 /* loop and jecxz */
-#define JumpInterSegment 0x200 /* special case for intersegment leaps/calls */
-#define FloatD 0x400 /* direction for float insns: MUST BE 0x400 */
-#define Seg2ShortForm 0x800 /* encoding of load segment reg insns */
-#define Seg3ShortForm 0x1000 /* fs/gs segment register insns. */
-#define Size16 0x2000 /* needs size prefix if in 32-bit mode */
-#define Size32 0x4000 /* needs size prefix if in 16-bit mode */
-#define Size64 0x8000 /* needs size prefix if in 16-bit mode */
-#define IgnoreSize 0x10000 /* instruction ignores operand size prefix */
-#define DefaultSize 0x20000 /* default insn size depends on mode */
-#define No_bSuf 0x40000 /* b suffix on instruction illegal */
-#define No_wSuf 0x80000 /* w suffix on instruction illegal */
-#define No_lSuf 0x100000 /* l suffix on instruction illegal */
-#define No_sSuf 0x200000 /* s suffix on instruction illegal */
-#define No_qSuf 0x400000 /* q suffix on instruction illegal */
-#define No_xSuf 0x800000 /* x suffix on instruction illegal */
-#define FWait 0x1000000 /* instruction needs FWAIT */
-#define IsString 0x2000000 /* quick test for string instructions */
-#define regKludge 0x4000000 /* fake an extra reg operand for clr, imul */
-#define IsPrefix 0x8000000 /* opcode is a prefix */
-#define ImmExt 0x10000000 /* instruction has extension in 8 bit imm */
-#define NoRex64 0x20000000 /* instruction don't need Rex64 prefix. */
-#define Rex64 0x40000000 /* instruction require Rex64 prefix. */
-#define Ugh 0x80000000 /* deprecated fp insn, gets a warning */
-
- /* operand_types[i] describes the type of operand i. This is made
- by OR'ing together all of the possible type masks. (e.g.
- 'operand_types[i] = Reg|Imm' specifies that operand i can be
- either a register or an immediate operand. */
- unsigned int operand_types[3];
-
- /* operand_types[i] bits */
- /* register */
-#define Reg8 0x1 /* 8 bit reg */
-#define Reg16 0x2 /* 16 bit reg */
-#define Reg32 0x4 /* 32 bit reg */
-#define Reg64 0x8 /* 64 bit reg */
- /* immediate */
-#define Imm8 0x10 /* 8 bit immediate */
-#define Imm8S 0x20 /* 8 bit immediate sign extended */
-#define Imm16 0x40 /* 16 bit immediate */
-#define Imm32 0x80 /* 32 bit immediate */
-#define Imm32S 0x100 /* 32 bit immediate sign extended */
-#define Imm64 0x200 /* 64 bit immediate */
-#define Imm1 0x400 /* 1 bit immediate */
- /* memory */
-#define BaseIndex 0x800
- /* Disp8,16,32 are used in different ways, depending on the
- instruction. For jumps, they specify the size of the PC relative
- displacement, for baseindex type instructions, they specify the
- size of the offset relative to the base register, and for memory
- offset instructions such as `mov 1234,%al' they specify the size of
- the offset relative to the segment base. */
-#define Disp8 0x1000 /* 8 bit displacement */
-#define Disp16 0x2000 /* 16 bit displacement */
-#define Disp32 0x4000 /* 32 bit displacement */
-#define Disp32S 0x8000 /* 32 bit signed displacement */
-#define Disp64 0x10000 /* 64 bit displacement */
- /* specials */
-#define InOutPortReg 0x20000 /* register to hold in/out port addr = dx */
-#define ShiftCount 0x40000 /* register to hold shift cound = cl */
-#define Control 0x80000 /* Control register */
-#define Debug 0x100000 /* Debug register */
-#define Test 0x200000 /* Test register */
-#define FloatReg 0x400000 /* Float register */
-#define FloatAcc 0x800000 /* Float stack top %st(0) */
-#define SReg2 0x1000000 /* 2 bit segment register */
-#define SReg3 0x2000000 /* 3 bit segment register */
-#define Acc 0x4000000 /* Accumulator %al or %ax or %eax */
-#define JumpAbsolute 0x8000000
-#define RegMMX 0x10000000 /* MMX register */
-#define RegXMM 0x20000000 /* XMM registers in PIII */
-#define EsSeg 0x40000000 /* String insn operand with fixed es segment */
-
- /* InvMem is for instructions with a modrm byte that only allow a
- general register encoding in the i.tm.mode and i.tm.regmem fields,
- eg. control reg moves. They really ought to support a memory form,
- but don't, so we add an InvMem flag to the register operand to
- indicate that it should be encoded in the i.tm.regmem field. */
-#define InvMem 0x80000000
-
-#define Reg (Reg8|Reg16|Reg32|Reg64) /* gen'l register */
-#define WordReg (Reg16|Reg32|Reg64)
-#define ImplicitRegister (InOutPortReg|ShiftCount|Acc|FloatAcc)
-#define Imm (Imm8|Imm8S|Imm16|Imm32S|Imm32|Imm64) /* gen'l immediate */
-#define EncImm (Imm8|Imm16|Imm32|Imm32S) /* Encodable gen'l immediate */
-#define Disp (Disp8|Disp16|Disp32|Disp32S|Disp64) /* General displacement */
-#define AnyMem (Disp8|Disp16|Disp32|Disp32S|BaseIndex|InvMem) /* General memory */
- /* The following aliases are defined because the opcode table
- carefully specifies the allowed memory types for each instruction.
- At the moment we can only tell a memory reference size by the
- instruction suffix, so there's not much point in defining Mem8,
- Mem16, Mem32 and Mem64 opcode modifiers - We might as well just use
- the suffix directly to check memory operands. */
-#define LLongMem AnyMem /* 64 bits (or more) */
-#define LongMem AnyMem /* 32 bit memory ref */
-#define ShortMem AnyMem /* 16 bit memory ref */
-#define WordMem AnyMem /* 16 or 32 bit memory ref */
-#define ByteMem AnyMem /* 8 bit memory ref */
-}
-template;
-
/*
'templates' is for grouping together 'template' structures for opcodes
of the same name. This is only used for storing the insns in the grand
@@ -327,25 +141,6 @@ typedef struct
}
templates;
-/* these are for register name --> number & type hash lookup */
-typedef struct
-{
- char *reg_name;
- unsigned int reg_type;
- unsigned int reg_flags;
-#define RegRex 0x1 /* Extended register. */
-#define RegRex64 0x2 /* Extended 8 bit register. */
- unsigned int reg_num;
-}
-reg_entry;
-
-typedef struct
-{
- char *seg_name;
- unsigned int seg_prefix;
-}
-seg_entry;
-
/* 386 operand encoding bytes: see 386 book for details of this. */
typedef struct
{
@@ -357,16 +152,6 @@ modrm_byte;
/* x86-64 extension prefix. */
typedef int rex_byte;
-#define REX_OPCODE 0x40
-
-/* Indicates 64 bit operand size. */
-#define REX_MODE64 8
-/* High extension to reg field of modrm byte. */
-#define REX_EXTX 4
-/* High extension to SIB index field. */
-#define REX_EXTY 2
-/* High extension to base field of modrm or SIB, or reg field of opcode. */
-#define REX_EXTZ 1
/* 386 opcode byte to code indirect addressing. */
typedef struct
@@ -377,11 +162,30 @@ typedef struct
}
sib_byte;
-/* x86 arch names and features */
+enum processor_type
+{
+ PROCESSOR_UNKNOWN,
+ PROCESSOR_I486,
+ PROCESSOR_PENTIUM,
+ PROCESSOR_PENTIUMPRO,
+ PROCESSOR_PENTIUM4,
+ PROCESSOR_NOCONA,
+ PROCESSOR_CORE,
+ PROCESSOR_CORE2,
+ PROCESSOR_K6,
+ PROCESSOR_ATHLON,
+ PROCESSOR_K8,
+ PROCESSOR_GENERIC32,
+ PROCESSOR_GENERIC64,
+ PROCESSOR_AMDFAM10
+};
+
+/* x86 arch names, types and features */
typedef struct
{
- const char *name; /* arch name */
- unsigned int flags; /* cpu feature flags */
+ const char *name; /* arch name */
+ enum processor_type type; /* arch type */
+ unsigned int flags; /* cpu feature flags */
}
arch_entry;
@@ -393,22 +197,22 @@ arch_entry;
#if (defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)) && !defined (LEX_AT)
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) x86_cons (EXP, NBYTES)
-extern void x86_cons PARAMS ((expressionS *, int));
+extern void x86_cons (expressionS *, int);
#endif
#define TC_CONS_FIX_NEW(FRAG,OFF,LEN,EXP) x86_cons_fix_new(FRAG, OFF, LEN, EXP)
extern void x86_cons_fix_new
- PARAMS ((fragS *, unsigned int, unsigned int, expressionS *));
+ (fragS *, unsigned int, unsigned int, expressionS *);
#define DIFF_EXPR_OK /* foo-. gets turned into PC relative relocs */
#define NO_RELOC BFD_RELOC_NONE
-void i386_validate_fix PARAMS ((struct fix *));
+void i386_validate_fix (struct fix *);
#define TC_VALIDATE_FIX(FIX,SEGTYPE,SKIP) i386_validate_fix(FIX)
#define tc_fix_adjustable(X) tc_i386_fix_adjustable(X)
-extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
+extern int tc_i386_fix_adjustable (struct fix *);
/* Values passed to md_apply_fix don't include the symbol value. */
#define MD_APPLY_SYM_VALUE(FIX) 0
@@ -432,7 +236,6 @@ extern int tc_i386_fix_adjustable PARAMS ((struct fix *));
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
(!(FIX)->fx_pcrel \
- || (FIX)->fx_plt \
|| (FIX)->fx_r_type == BFD_RELOC_386_PLT32 \
|| (FIX)->fx_r_type == BFD_RELOC_386_GOT32 \
|| (FIX)->fx_r_type == BFD_RELOC_386_GOTPC \
@@ -460,7 +263,7 @@ if ((n) \
#define MAX_MEM_FOR_RS_ALIGN_CODE 15
-extern void i386_align_code PARAMS ((fragS *, int));
+extern void i386_align_code (fragS *, int);
#define HANDLE_ALIGN(fragP) \
if (fragP->fr_type == rs_align_code) \
@@ -468,16 +271,18 @@ if (fragP->fr_type == rs_align_code) \
- fragP->fr_address \
- fragP->fr_fix));
-void i386_print_statistics PARAMS ((FILE *));
+void i386_print_statistics (FILE *);
#define tc_print_statistics i386_print_statistics
#define md_number_to_chars number_to_chars_littleendian
#ifdef SCO_ELF
#define tc_init_after_args() sco_id ()
-extern void sco_id PARAMS ((void));
+extern void sco_id (void);
#endif
+#define WORKING_DOT_WORD 1
+
/* We want .cfi_* pseudo-ops for generating unwind info. */
#define TARGET_USE_CFIPOP 1
@@ -488,17 +293,17 @@ extern int x86_cie_data_alignment;
#define DWARF2_CIE_DATA_ALIGNMENT x86_cie_data_alignment
#define tc_regname_to_dw2regnum tc_x86_regname_to_dw2regnum
-extern int tc_x86_regname_to_dw2regnum PARAMS ((const char *regname));
+extern int tc_x86_regname_to_dw2regnum (char *);
#define tc_cfi_frame_initial_instructions tc_x86_frame_initial_instructions
-extern void tc_x86_frame_initial_instructions PARAMS ((void));
+extern void tc_x86_frame_initial_instructions (void);
#define md_elf_section_type(str,len) i386_elf_section_type (str, len)
-extern int i386_elf_section_type PARAMS ((const char *, size_t len));
+extern int i386_elf_section_type (const char *, size_t);
/* Support for SHF_X86_64_LARGE */
-extern int x86_64_section_word PARAMS ((char *, size_t));
-extern int x86_64_section_letter PARAMS ((int letter, char **ptr_msg));
+extern int x86_64_section_word (char *, size_t);
+extern int x86_64_section_letter (int, char **);
#define md_elf_section_letter(LETTER, PTR_MSG) x86_64_section_letter (LETTER, PTR_MSG)
#define md_elf_section_word(STR, LEN) x86_64_section_word (STR, LEN)
diff --git a/contrib/binutils/gas/config/tc-ia64.c b/contrib/binutils/gas/config/tc-ia64.c
index 426b60f..5ed9ba8 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, 2002, 2003, 2004, 2005, 2006
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
@@ -5634,7 +5634,7 @@ declare_register_set (prefix, num_regs, base_regnum)
for (i = 0; i < num_regs; ++i)
{
- sprintf (name, "%s%u", prefix, i);
+ snprintf (name, sizeof (name), "%s%u", prefix, i);
declare_register (name, base_regnum + i);
}
}
@@ -6691,7 +6691,7 @@ emit_one_bundle ()
int addr_mod;
first = (md.curr_slot + NUM_SLOTS - md.num_slots_in_use) % NUM_SLOTS;
- know (first >= 0 & first < NUM_SLOTS);
+ know (first >= 0 && first < NUM_SLOTS);
n = MIN (3, md.num_slots_in_use);
/* Determine template: user user_template if specified, best match
@@ -6971,7 +6971,8 @@ emit_one_bundle ()
else
as_fatal ("emit_one_bundle: unexpected dynamic op");
- sprintf (mnemonic, "%s.%c", idesc->name, "?imbfxx"[insn_unit]);
+ snprintf (mnemonic, sizeof (mnemonic), "%s.%c",
+ idesc->name, "?imbfxx"[insn_unit]);
opnd1 = idesc->operands[0];
opnd2 = idesc->operands[1];
ia64_free_opcode (idesc);
@@ -7066,7 +7067,6 @@ emit_one_bundle ()
fix = fix_new_exp (frag_now, frag_now_fix () - 16 + i, 8,
&ifix->expr, ifix->is_pcrel, ifix->code);
fix->tc_fix_data.opnd = ifix->opnd;
- fix->fx_plt = (fix->fx_r_type == BFD_RELOC_IA64_PLTOFF22);
fix->fx_file = md.slot[curr].src_file;
fix->fx_line = md.slot[curr].src_line;
}
@@ -10544,12 +10544,15 @@ check_dependencies (idesc)
int certain = (matchtype == 1 && CURR_SLOT.qp_regno == 0);
if (path != 0)
- sprintf (pathmsg, " when entry is at label '%s'",
+ snprintf (pathmsg, sizeof (pathmsg),
+ " when entry is at label '%s'",
md.entry_labels[path - 1]);
if (matchtype == 1 && rs->index >= 0)
- sprintf (indexmsg, ", specific resource number is %d",
+ snprintf (indexmsg, sizeof (indexmsg),
+ ", specific resource number is %d",
rs->index);
- sprintf (msg, "Use of '%s' %s %s dependency '%s' (%s)%s%s",
+ snprintf (msg, sizeof (msg),
+ "Use of '%s' %s %s dependency '%s' (%s)%s%s",
idesc->name,
(certain ? "violates" : "may violate"),
dv_mode[dep->mode], dep->name,
@@ -11862,7 +11865,7 @@ struct alias
{
char *file; /* The file where the directive is seen. */
unsigned int line; /* The line number the directive is at. */
- const char *name; /* The orignale name of the symbol. */
+ const char *name; /* The original name of the symbol. */
};
/* Called for .alias and .secalias directives. If SECTION is 1, it is
diff --git a/contrib/binutils/gas/config/tc-ia64.h b/contrib/binutils/gas/config/tc-ia64.h
index c17494b..b851b9f 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, 2002, 2003, 2004, 2005
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
@@ -315,5 +315,5 @@ typedef struct unwind_record
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
((FIX)->fx_r_type != BFD_RELOC_UNUSED \
&& (!(FIX)->fx_pcrel \
- || (FIX)->fx_plt \
+ || (FIX)->fx_r_type == BFD_RELOC_IA64_PLTOFF22 \
|| TC_FORCE_RELOCATION (FIX)))
diff --git a/contrib/binutils/gas/config/tc-mep.c b/contrib/binutils/gas/config/tc-mep.c
new file mode 100644
index 0000000..b3b17d3
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-mep.c
@@ -0,0 +1,1886 @@
+/* tc-mep.c -- Assembler for the Toshiba Media Processor.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to
+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+#include <stdio.h>
+#include "as.h"
+#include "dwarf2dbg.h"
+#include "subsegs.h"
+#include "symcat.h"
+#include "opcodes/mep-desc.h"
+#include "opcodes/mep-opc.h"
+#include "cgen.h"
+#include "elf/common.h"
+#include "elf/mep.h"
+#include "libbfd.h"
+#include "xregex.h"
+
+/* Structure to hold all of the different components describing
+ an individual instruction. */
+typedef struct
+{
+ const CGEN_INSN * insn;
+ const CGEN_INSN * orig_insn;
+ CGEN_FIELDS fields;
+#if CGEN_INT_INSN_P
+ CGEN_INSN_INT buffer [1];
+#define INSN_VALUE(buf) (*(buf))
+#else
+ unsigned char buffer [CGEN_MAX_INSN_SIZE];
+#define INSN_VALUE(buf) (buf)
+#endif
+ char * addr;
+ fragS * frag;
+ int num_fixups;
+ fixS * fixups [GAS_CGEN_MAX_FIXUPS];
+ int indices [MAX_OPERAND_INSTANCES];
+} mep_insn;
+
+static int mode = CORE; /* Start in core mode. */
+static int pluspresent = 0;
+static int allow_disabled_registers = 0;
+static int library_flag = 0;
+
+/* We're going to need to store all of the instructions along with
+ their fixups so that we can parallelization grouping rules. */
+
+static mep_insn saved_insns[MAX_SAVED_FIXUP_CHAINS];
+static int num_insns_saved = 0;
+
+const char comment_chars[] = "#";
+const char line_comment_chars[] = ";#";
+const char line_separator_chars[] = ";";
+const char EXP_CHARS[] = "eE";
+const char FLT_CHARS[] = "dD";
+
+static void mep_switch_to_vliw_mode (int);
+static void mep_switch_to_core_mode (int);
+static void mep_s_vtext (int);
+static void mep_noregerr (int);
+
+/* The target specific pseudo-ops which we support. */
+const pseudo_typeS md_pseudo_table[] =
+{
+ { "word", cons, 4 },
+ { "file", (void (*) (int)) dwarf2_directive_file, 0 },
+ { "loc", dwarf2_directive_loc, 0 },
+ { "vliw", mep_switch_to_vliw_mode, 0 },
+ { "core", mep_switch_to_core_mode, 0 },
+ { "vtext", mep_s_vtext, 0 },
+ { "noregerr", mep_noregerr, 0 },
+ { NULL, NULL, 0 }
+};
+
+/* Relocations against symbols are done in two
+ parts, with a HI relocation and a LO relocation. Each relocation
+ has only 16 bits of space to store an addend. This means that in
+ order for the linker to handle carries correctly, it must be able
+ to locate both the HI and the LO relocation. This means that the
+ relocations must appear in order in the relocation table.
+
+ In order to implement this, we keep track of each unmatched HI
+ relocation. We then sort them so that they immediately precede the
+ corresponding LO relocation. */
+
+struct mep_hi_fixup
+{
+ struct mep_hi_fixup * next; /* Next HI fixup. */
+ fixS * fixp; /* This fixup. */
+ segT seg; /* The section this fixup is in. */
+};
+
+/* The list of unmatched HI relocs. */
+static struct mep_hi_fixup * mep_hi_fixup_list;
+
+
+#define OPTION_EB (OPTION_MD_BASE + 0)
+#define OPTION_EL (OPTION_MD_BASE + 1)
+#define OPTION_CONFIG (OPTION_MD_BASE + 2)
+#define OPTION_AVERAGE (OPTION_MD_BASE + 3)
+#define OPTION_NOAVERAGE (OPTION_MD_BASE + 4)
+#define OPTION_MULT (OPTION_MD_BASE + 5)
+#define OPTION_NOMULT (OPTION_MD_BASE + 6)
+#define OPTION_DIV (OPTION_MD_BASE + 7)
+#define OPTION_NODIV (OPTION_MD_BASE + 8)
+#define OPTION_BITOPS (OPTION_MD_BASE + 9)
+#define OPTION_NOBITOPS (OPTION_MD_BASE + 10)
+#define OPTION_LEADZ (OPTION_MD_BASE + 11)
+#define OPTION_NOLEADZ (OPTION_MD_BASE + 12)
+#define OPTION_ABSDIFF (OPTION_MD_BASE + 13)
+#define OPTION_NOABSDIFF (OPTION_MD_BASE + 14)
+#define OPTION_MINMAX (OPTION_MD_BASE + 15)
+#define OPTION_NOMINMAX (OPTION_MD_BASE + 16)
+#define OPTION_CLIP (OPTION_MD_BASE + 17)
+#define OPTION_NOCLIP (OPTION_MD_BASE + 18)
+#define OPTION_SATUR (OPTION_MD_BASE + 19)
+#define OPTION_NOSATUR (OPTION_MD_BASE + 20)
+#define OPTION_COP32 (OPTION_MD_BASE + 21)
+#define OPTION_REPEAT (OPTION_MD_BASE + 25)
+#define OPTION_NOREPEAT (OPTION_MD_BASE + 26)
+#define OPTION_DEBUG (OPTION_MD_BASE + 27)
+#define OPTION_NODEBUG (OPTION_MD_BASE + 28)
+#define OPTION_LIBRARY (OPTION_MD_BASE + 29)
+
+struct option md_longopts[] = {
+ { "EB", no_argument, NULL, OPTION_EB},
+ { "EL", no_argument, NULL, OPTION_EL},
+ { "mconfig", required_argument, NULL, OPTION_CONFIG},
+ { "maverage", no_argument, NULL, OPTION_AVERAGE},
+ { "mno-average", no_argument, NULL, OPTION_NOAVERAGE},
+ { "mmult", no_argument, NULL, OPTION_MULT},
+ { "mno-mult", no_argument, NULL, OPTION_NOMULT},
+ { "mdiv", no_argument, NULL, OPTION_DIV},
+ { "mno-div", no_argument, NULL, OPTION_NODIV},
+ { "mbitops", no_argument, NULL, OPTION_BITOPS},
+ { "mno-bitops", no_argument, NULL, OPTION_NOBITOPS},
+ { "mleadz", no_argument, NULL, OPTION_LEADZ},
+ { "mno-leadz", no_argument, NULL, OPTION_NOLEADZ},
+ { "mabsdiff", no_argument, NULL, OPTION_ABSDIFF},
+ { "mno-absdiff", no_argument, NULL, OPTION_NOABSDIFF},
+ { "mminmax", no_argument, NULL, OPTION_MINMAX},
+ { "mno-minmax", no_argument, NULL, OPTION_NOMINMAX},
+ { "mclip", no_argument, NULL, OPTION_CLIP},
+ { "mno-clip", no_argument, NULL, OPTION_NOCLIP},
+ { "msatur", no_argument, NULL, OPTION_SATUR},
+ { "mno-satur", no_argument, NULL, OPTION_NOSATUR},
+ { "mcop32", no_argument, NULL, OPTION_COP32},
+ { "mdebug", no_argument, NULL, OPTION_DEBUG},
+ { "mno-debug", no_argument, NULL, OPTION_NODEBUG},
+ { "mlibrary", no_argument, NULL, OPTION_LIBRARY},
+ { NULL, 0, NULL, 0 } };
+size_t md_longopts_size = sizeof (md_longopts);
+
+const char * md_shortopts = "";
+static int optbits = 0;
+static int optbitset = 0;
+
+int
+md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+{
+ int i, idx;
+ switch (c)
+ {
+ case OPTION_EB:
+ target_big_endian = 1;
+ break;
+ case OPTION_EL:
+ target_big_endian = 0;
+ break;
+ case OPTION_CONFIG:
+ idx = 0;
+ for (i=1; mep_config_map[i].name; i++)
+ if (strcmp (mep_config_map[i].name, arg) == 0)
+ {
+ idx = i;
+ break;
+ }
+ if (!idx)
+ {
+ fprintf (stderr, "Error: unknown configuration %s\n", arg);
+ return 0;
+ }
+ mep_config_index = idx;
+ target_big_endian = mep_config_map[idx].big_endian;
+ break;
+ case OPTION_AVERAGE:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_AVE_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_AVE_INSN;
+ break;
+ case OPTION_NOAVERAGE:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_AVE_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_AVE_INSN;
+ break;
+ case OPTION_MULT:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_MUL_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_MUL_INSN;
+ break;
+ case OPTION_NOMULT:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_MUL_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_MUL_INSN;
+ break;
+ case OPTION_DIV:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_DIV_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_DIV_INSN;
+ break;
+ case OPTION_NODIV:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_DIV_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_DIV_INSN;
+ break;
+ case OPTION_BITOPS:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_BIT_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_BIT_INSN;
+ break;
+ case OPTION_NOBITOPS:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_BIT_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_BIT_INSN;
+ break;
+ case OPTION_LEADZ:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_LDZ_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_LDZ_INSN;
+ break;
+ case OPTION_NOLEADZ:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_LDZ_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_LDZ_INSN;
+ break;
+ case OPTION_ABSDIFF:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_ABS_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_ABS_INSN;
+ break;
+ case OPTION_NOABSDIFF:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_ABS_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_ABS_INSN;
+ break;
+ case OPTION_MINMAX:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_MINMAX_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_MINMAX_INSN;
+ break;
+ case OPTION_NOMINMAX:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_MINMAX_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_MINMAX_INSN;
+ break;
+ case OPTION_CLIP:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_CLIP_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_CLIP_INSN;
+ break;
+ case OPTION_NOCLIP:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_CLIP_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_CLIP_INSN;
+ break;
+ case OPTION_SATUR:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_SAT_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_SAT_INSN;
+ break;
+ case OPTION_NOSATUR:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_SAT_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_SAT_INSN;
+ break;
+ case OPTION_COP32:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_CP_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_CP_INSN;
+ break;
+ case OPTION_DEBUG:
+ optbits |= 1 << CGEN_INSN_OPTIONAL_DEBUG_INSN;
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_DEBUG_INSN;
+ break;
+ case OPTION_NODEBUG:
+ optbits &= ~(1 << CGEN_INSN_OPTIONAL_DEBUG_INSN);
+ optbitset |= 1 << CGEN_INSN_OPTIONAL_DEBUG_INSN;
+ break;
+ case OPTION_LIBRARY:
+ library_flag = EF_MEP_LIBRARY;
+ break;
+ case OPTION_REPEAT:
+ case OPTION_NOREPEAT:
+ break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
+void
+md_show_usage (FILE *stream)
+{
+ fprintf (stream, _("MeP specific command line options:\n\
+ -EB assemble for a big endian system (default)\n\
+ -EL assemble for a little endian system\n\
+ -mconfig=<name> specify a chip configuration to use\n\
+ -maverage -mno-average -mmult -mno-mult -mdiv -mno-div\n\
+ -mbitops -mno-bitops -mleadz -mno-leadz -mabsdiff -mno-absdiff\n\
+ -mminmax -mno-minmax -mclip -mno-clip -msatur -mno-satur -mcop32\n\
+ enable/disable the given opcodes\n\
+\n\
+ If -mconfig is given, the other -m options modify it. Otherwise,\n\
+ if no -m options are given, all core opcodes are enabled;\n\
+ if any enabling -m options are given, only those are enabled;\n\
+ if only disabling -m options are given, only those are disabled.\n\
+"));
+ if (mep_config_map[1].name)
+ {
+ int i;
+ fprintf (stream, " -mconfig=STR specify the configuration to use\n");
+ fprintf (stream, " Configurations:");
+ for (i=0; mep_config_map[i].name; i++)
+ fprintf (stream, " %s", mep_config_map[i].name);
+ fprintf (stream, "\n");
+ }
+}
+
+
+
+static void
+mep_check_for_disabled_registers (mep_insn *insn)
+{
+ static int initted = 0;
+ static int has_mul_div = 0;
+ static int has_cop = 0;
+ static int has_debug = 0;
+ unsigned int b, r;
+
+ if (allow_disabled_registers)
+ return;
+
+#if !CGEN_INT_INSN_P
+ if (target_big_endian)
+ b = insn->buffer[0] * 256 + insn->buffer[1];
+ else
+ b = insn->buffer[1] * 256 + insn->buffer[0];
+#else
+ b = insn->buffer[0];
+#endif
+
+ if ((b & 0xfffff00e) == 0x7008 /* stc */
+ || (b & 0xfffff00e) == 0x700a /* ldc */)
+ {
+ if (!initted)
+ {
+ initted = 1;
+ if ((MEP_OMASK & (1 << CGEN_INSN_OPTIONAL_MUL_INSN))
+ || (MEP_OMASK & (1 << CGEN_INSN_OPTIONAL_DIV_INSN)))
+ has_mul_div = 1;
+ if (MEP_OMASK & (1 << CGEN_INSN_OPTIONAL_DEBUG_INSN))
+ has_debug = 1;
+ if (MEP_OMASK & (1 << CGEN_INSN_OPTIONAL_CP_INSN))
+ has_cop = 1;
+ }
+
+ r = ((b & 0x00f0) >> 4) | ((b & 0x0001) << 4);
+ switch (r)
+ {
+ case 7: /* $hi */
+ case 8: /* $lo */
+ if (!has_mul_div)
+ as_bad ("$hi and $lo are disabled when MUL and DIV are off");
+ break;
+ case 12: /* $mb0 */
+ case 13: /* $me0 */
+ case 14: /* $mb1 */
+ case 15: /* $me1 */
+ if (!has_cop)
+ as_bad ("$mb0, $me0, $mb1, and $me1 are disabled when COP is off");
+ break;
+ case 24: /* $dbg */
+ case 25: /* $depc */
+ if (!has_debug)
+ as_bad ("$dbg and $depc are disabled when DEBUG is off");
+ break;
+ }
+ }
+}
+
+static int
+mep_machine (void)
+{
+ switch (MEP_CPU)
+ {
+ default: break;
+ case EF_MEP_CPU_C2: return bfd_mach_mep;
+ case EF_MEP_CPU_C3: return bfd_mach_mep;
+ case EF_MEP_CPU_C4: return bfd_mach_mep;
+ case EF_MEP_CPU_H1: return bfd_mach_mep_h1;
+ }
+
+ return bfd_mach_mep;
+}
+
+/* The MeP version of the cgen parse_operand function. The only difference
+ from the standard version is that we want to avoid treating '$foo' and
+ '($foo...)' as references to a symbol called '$foo'. The chances are
+ that '$foo' is really a misspelt register. */
+
+static const char *
+mep_parse_operand (CGEN_CPU_DESC cd, enum cgen_parse_operand_type want,
+ const char **strP, int opindex, int opinfo,
+ enum cgen_parse_operand_result *resultP, bfd_vma *valueP)
+{
+ if (want == CGEN_PARSE_OPERAND_INTEGER || want == CGEN_PARSE_OPERAND_ADDRESS)
+ {
+ const char *next;
+
+ next = *strP;
+ while (*next == '(')
+ next++;
+ if (*next == '$')
+ return "Not a valid literal";
+ }
+ return gas_cgen_parse_operand (cd, want, strP, opindex, opinfo,
+ resultP, valueP);
+}
+
+void
+md_begin ()
+{
+ /* Initialize the `cgen' interface. */
+
+ /* If the user specifies no options, we default to allowing
+ everything. If the user specifies any enabling options, we
+ default to allowing only what is specified. If the user
+ specifies only disabling options, we only disable what is
+ specified. If the user specifies options and a config, the
+ options modify the config. */
+ if (optbits && mep_config_index == 0)
+ MEP_OMASK = optbits;
+ else
+ MEP_OMASK = (MEP_OMASK & ~optbitset) | optbits;
+
+ /* Set the machine number and endian. */
+ gas_cgen_cpu_desc = mep_cgen_cpu_open (CGEN_CPU_OPEN_MACHS, 0,
+ CGEN_CPU_OPEN_ENDIAN,
+ target_big_endian
+ ? CGEN_ENDIAN_BIG
+ : CGEN_ENDIAN_LITTLE,
+ CGEN_CPU_OPEN_ISAS, 0,
+ CGEN_CPU_OPEN_END);
+ mep_cgen_init_asm (gas_cgen_cpu_desc);
+
+ /* This is a callback from cgen to gas to parse operands. */
+ cgen_set_parse_operand_fn (gas_cgen_cpu_desc, mep_parse_operand);
+
+ /* Identify the architecture. */
+ bfd_default_set_arch_mach (stdoutput, bfd_arch_mep, mep_machine ());
+
+ /* Store the configuration number and core. */
+ bfd_set_private_flags (stdoutput, MEP_CPU | MEP_CONFIG | library_flag);
+
+ /* Initialize the array we'll be using to store fixups. */
+ gas_cgen_initialize_saved_fixups_array();
+}
+
+/* Variant of mep_cgen_assemble_insn. Assemble insn STR of cpu CD as a
+ coprocessor instruction, if possible, into FIELDS, BUF, and INSN. */
+
+static const CGEN_INSN *
+mep_cgen_assemble_cop_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ const struct cgen_insn *pinsn)
+{
+ const char *start;
+ CGEN_INSN_LIST *ilist;
+ const char *errmsg = NULL;
+
+ /* The instructions are stored in hashed lists. */
+ ilist = CGEN_ASM_LOOKUP_INSN (gas_cgen_cpu_desc,
+ CGEN_INSN_MNEMONIC (pinsn));
+
+ start = str;
+ for ( ; ilist != NULL ; ilist = CGEN_ASM_NEXT_INSN (ilist))
+ {
+ const CGEN_INSN *insn = ilist->insn;
+ if (strcmp (CGEN_INSN_MNEMONIC (ilist->insn),
+ CGEN_INSN_MNEMONIC (pinsn)) == 0
+ && MEP_INSN_COP_P (ilist->insn)
+ && mep_cgen_insn_supported (cd, 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);
+
+ errmsg = CGEN_PARSE_FN (cd, insn) (cd, insn, & str, fields);
+ if (errmsg != NULL)
+ continue;
+
+ errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf,
+ (bfd_vma) 0);
+ if (errmsg != NULL)
+ continue;
+
+ return insn;
+ }
+ }
+ return pinsn;
+}
+
+static void
+mep_save_insn (mep_insn insn)
+{
+ /* Consider change MAX_SAVED_FIXUP_CHAINS to MAX_PARALLEL_INSNS. */
+ if (num_insns_saved < 0 || num_insns_saved >= MAX_SAVED_FIXUP_CHAINS)
+ {
+ as_fatal("index into saved_insns[] out of bounds.");
+ return;
+ }
+ saved_insns[num_insns_saved] = insn;
+ gas_cgen_save_fixups(num_insns_saved);
+ num_insns_saved++;
+}
+
+static void
+mep_check_parallel32_scheduling (void)
+{
+ int insn0iscopro, insn1iscopro, insn0length, insn1length;
+
+ /* More than two instructions means that either someone is referring to
+ an internally parallel core or an internally parallel coprocessor,
+ neither of which are supported at this time. */
+ if ( num_insns_saved > 2 )
+ as_fatal("Internally paralled cores and coprocessors not supported.");
+
+ /* If there are no insns saved, that's ok. Just return. This will
+ happen when mep_process_saved_insns is called when the end of the
+ source file is reached and there are no insns left to be processed. */
+ if (num_insns_saved == 0)
+ return;
+
+ /* Check some of the attributes of the first insn. */
+ insn0iscopro = MEP_INSN_COP_P (saved_insns[0].insn);
+ insn0length = CGEN_FIELDS_BITSIZE (& saved_insns[0].fields);
+
+ if (num_insns_saved == 2)
+ {
+ /* Check some of the attributes of the first insn. */
+ insn1iscopro = MEP_INSN_COP_P (saved_insns[1].insn);
+ insn1length = CGEN_FIELDS_BITSIZE (& saved_insns[1].fields);
+
+ if ((insn0iscopro && !insn1iscopro)
+ || (insn1iscopro && !insn0iscopro))
+ {
+ /* We have one core and one copro insn. If their sizes
+ add up to 32, then the combination is valid. */
+ if (insn0length + insn1length == 32)
+ return;
+ else
+ as_bad ("core and copro insn lengths must total 32 bits.");
+ }
+ else
+ as_bad ("vliw group must consist of 1 core and 1 copro insn.");
+ }
+ else
+ {
+ /* If we arrive here, we have one saved instruction. There are a
+ number of possible cases:
+
+ 1. The instruction is a 32 bit core or coprocessor insn and
+ can be executed by itself. Valid.
+
+ 2. The instrucion is a core instruction for which a cop nop
+ exists. In this case, insert the cop nop into the saved
+ insn array after the core insn and return. Valid.
+
+ 3. The instruction is a coprocessor insn for which a core nop
+ exists. In this case, move the coprocessor insn to the
+ second element of the array and put the nop in the first
+ element then return. Valid.
+
+ 4. The instruction is a core or coprocessor instruction for
+ which there is no matching coprocessor or core nop to use
+ to form a valid vliw insn combination. In this case, we
+ we have to abort. */
+
+ if (insn0length > 32)
+ as_fatal ("Cannot use 48- or 64-bit insns with a 32 bit datapath.");
+
+ if (insn0length == 32)
+ return;
+
+ /* Insn is smaller than datapath. If there are no matching
+ nops for this insn, then terminate assembly. */
+ if (CGEN_INSN_ATTR_VALUE (saved_insns[0].insn,
+ CGEN_INSN_VLIW32_NO_MATCHING_NOP))
+ as_fatal ("No valid nop.");
+
+ /* At this point we know that we have a single 16-bit insn that has
+ a matching nop. We have to assemble it and put it into the saved
+ insn and fixup chain arrays. */
+
+ if (insn0iscopro)
+ {
+ char *errmsg;
+ mep_insn insn;
+
+ /* Move the insn and it's fixups to the second element of the
+ saved insns arrary and insert a 16 bit core nope into the
+ first element. */
+ insn.insn = mep_cgen_assemble_insn (gas_cgen_cpu_desc, "nop",
+ &insn.fields, insn.buffer,
+ &errmsg);
+ if (!insn.insn)
+ {
+ as_bad ("%s", errmsg);
+ return;
+ }
+
+ /* Move the insn in element 0 to element 1 and insert the
+ nop into element 0. Move the fixups in element 0 to
+ element 1 and save the current fixups to element 0.
+ Really there aren't any fixups at this point because we're
+ inserting a nop but we might as well be general so that
+ if there's ever a need to insert a general insn, we'll
+ have an example. */
+ saved_insns[1] = saved_insns[0];
+ saved_insns[0] = insn;
+ num_insns_saved++;
+ gas_cgen_swap_fixups (0);
+ gas_cgen_save_fixups (1);
+ }
+ else
+ {
+ char * errmsg;
+ mep_insn insn;
+ int insn_num = saved_insns[0].insn->base->num;
+
+ /* Use 32 bit branches and skip the nop. */
+ if (insn_num == MEP_INSN_BSR12
+ || insn_num == MEP_INSN_BEQZ
+ || insn_num == MEP_INSN_BNEZ)
+ return;
+
+ /* Insert a 16-bit coprocessor nop. Note that at the time */
+ /* this was done, no 16-bit coprocessor nop was defined. */
+ insn.insn = mep_cgen_assemble_insn (gas_cgen_cpu_desc, "cpnop16",
+ &insn.fields, insn.buffer,
+ &errmsg);
+ if (!insn.insn)
+ {
+ as_bad ("%s", errmsg);
+ return;
+ }
+
+ /* Now put the insn and fixups into the arrays. */
+ mep_save_insn (insn);
+ }
+ }
+}
+
+static void
+mep_check_parallel64_scheduling (void)
+{
+ int insn0iscopro, insn1iscopro, insn0length, insn1length;
+
+ /* More than two instructions means that someone is referring to an
+ internally parallel core or an internally parallel coprocessor. */
+ /* These are not currently supported. */
+ if (num_insns_saved > 2)
+ as_fatal ("Internally parallel cores of coprocessors not supported.");
+
+ /* If there are no insns saved, that's ok. Just return. This will
+ happen when mep_process_saved_insns is called when the end of the
+ source file is reached and there are no insns left to be processed. */
+ if (num_insns_saved == 0)
+ return;
+
+ /* Check some of the attributes of the first insn. */
+ insn0iscopro = MEP_INSN_COP_P (saved_insns[0].insn);
+ insn0length = CGEN_FIELDS_BITSIZE (& saved_insns[0].fields);
+
+ if (num_insns_saved == 2)
+ {
+ /* Check some of the attributes of the first insn. */
+ insn1iscopro = MEP_INSN_COP_P (saved_insns[1].insn);
+ insn1length = CGEN_FIELDS_BITSIZE (& saved_insns[1].fields);
+
+ if ((insn0iscopro && !insn1iscopro)
+ || (insn1iscopro && !insn0iscopro))
+ {
+ /* We have one core and one copro insn. If their sizes
+ add up to 64, then the combination is valid. */
+ if (insn0length + insn1length == 64)
+ return;
+ else
+ as_bad ("core and copro insn lengths must total 64 bits.");
+ }
+ else
+ as_bad ("vliw group must consist of 1 core and 1 copro insn.");
+ }
+ else
+ {
+ /* If we arrive here, we have one saved instruction. There are a
+ number of possible cases:
+
+ 1. The instruction is a 64 bit coprocessor insn and can be
+ executed by itself. Valid.
+
+ 2. The instrucion is a core instruction for which a cop nop
+ exists. In this case, insert the cop nop into the saved
+ insn array after the core insn and return. Valid.
+
+ 3. The instruction is a coprocessor insn for which a core nop
+ exists. In this case, move the coprocessor insn to the
+ second element of the array and put the nop in the first
+ element then return. Valid.
+
+ 4. The instruction is a core or coprocessor instruction for
+ which there is no matching coprocessor or core nop to use
+ to form a valid vliw insn combination. In this case, we
+ we have to abort. */
+
+ /* If the insn is 64 bits long, it can run alone. The size check
+ is done indepependantly of whether the insn is core or copro
+ in case 64 bit coprocessor insns are added later. */
+ if (insn0length == 64)
+ return;
+
+ /* Insn is smaller than datapath. If there are no matching
+ nops for this insn, then terminate assembly. */
+ if (CGEN_INSN_ATTR_VALUE (saved_insns[0].insn,
+ CGEN_INSN_VLIW64_NO_MATCHING_NOP))
+ as_fatal ("No valid nop.");
+
+ if (insn0iscopro)
+ {
+ char *errmsg;
+ mep_insn insn;
+ int i;
+
+ /* Initialize the insn buffer. */
+ for (i = 0; i < 64; i++)
+ insn.buffer[i] = '\0';
+
+ /* We have a coprocessor insn. At this point in time there
+ are is 32-bit core nop. There is only a 16-bit core
+ nop. The idea is to allow for a relatively arbitrary
+ coprocessor to be specified. We aren't looking at
+ trying to cover future changes in the core at this time
+ since it is assumed that the core will remain fairly
+ static. If there ever are 32 or 48 bit core nops added,
+ they will require entries below. */
+
+ if (insn0length == 48)
+ {
+ /* Move the insn and fixups to the second element of the
+ arrays then assemble and insert a 16 bit core nop. */
+ insn.insn = mep_cgen_assemble_insn (gas_cgen_cpu_desc, "nop",
+ & insn.fields, insn.buffer,
+ & errmsg);
+ }
+ else
+ {
+ /* If this is reached, then we have a single coprocessor
+ insn that is not 48 bits long, but for which the assembler
+ thinks there is a matching core nop. If a 32-bit core
+ nop has been added, then make the necessary changes and
+ handle its assembly and insertion here. Otherwise,
+ go figure out why either:
+
+ 1. The assembler thinks that there is a 32-bit core nop
+ to match a 32-bit coprocessor insn, or
+ 2. The assembler thinks that there is a 48-bit core nop
+ to match a 16-bit coprocessor insn. */
+
+ as_fatal ("Assembler expects a non-existent core nop.");
+ }
+
+ if (!insn.insn)
+ {
+ as_bad ("%s", errmsg);
+ return;
+ }
+
+ /* Move the insn in element 0 to element 1 and insert the
+ nop into element 0. Move the fixups in element 0 to
+ element 1 and save the current fixups to element 0.
+ Really there aren't any fixups at this point because we're
+ inserting a nop but we might as well be general so that
+ if there's ever a need to insert a general insn, we'll
+ have an example. */
+
+ saved_insns[1] = saved_insns[0];
+ saved_insns[0] = insn;
+ num_insns_saved++;
+ gas_cgen_swap_fixups(0);
+ gas_cgen_save_fixups(1);
+
+ }
+ else
+ {
+ char * errmsg;
+ mep_insn insn;
+ int i;
+
+ /* Initialize the insn buffer */
+ for (i = 0; i < 64; i++)
+ insn.buffer[i] = '\0';
+
+ /* We have a core insn. We have to handle all possible nop
+ lengths. If a coprocessor doesn't have a nop of a certain
+ length but there exists core insns that when combined with
+ a nop of that length would fill the datapath, those core
+ insns will be flagged with the VLIW_NO_CORRESPONDING_NOP
+ attribute. That will ensure that when used in a way that
+ requires a nop to be inserted, assembly will terminate
+ before reaching this section of code. This guarantees
+ that cases below which would result in the attempted
+ insertion of nop that doesn't exist will never be entered. */
+ if (insn0length == 16)
+ {
+ /* Insert 48 bit coprocessor nop. */
+ /* Assemble it and put it into the arrays. */
+ insn.insn = mep_cgen_assemble_insn (gas_cgen_cpu_desc, "cpnop48",
+ &insn.fields, insn.buffer,
+ &errmsg);
+ }
+ else if (insn0length == 32)
+ {
+ /* Insert 32 bit coprocessor nop. */
+ insn.insn = mep_cgen_assemble_insn (gas_cgen_cpu_desc, "cpnop32",
+ &insn.fields, insn.buffer,
+ &errmsg);
+ }
+ else if (insn0length == 48)
+ {
+ /* Insert 16 bit coprocessor nop. */
+ insn.insn = mep_cgen_assemble_insn (gas_cgen_cpu_desc, "cpnop16",
+ &insn.fields, insn.buffer,
+ &errmsg);
+ }
+ else
+ /* Core insn has an invalid length. Something has gone wrong. */
+ as_fatal ("Core insn has invalid length! Something is wrong!");
+
+ if (!insn.insn)
+ {
+ as_bad ("%s", errmsg);
+ return;
+ }
+
+ /* Now put the insn and fixups into the arrays. */
+ mep_save_insn (insn);
+ }
+ }
+}
+
+/* The scheduling functions are just filters for invalid combinations.
+ If there is a violation, they terminate assembly. Otherise they
+ just fall through. Succesful combinations cause no side effects
+ other than valid nop insertion. */
+
+static void
+mep_check_parallel_scheduling (void)
+{
+ /* This is where we will eventually read the config information
+ and choose which scheduling checking function to call. */
+ if (MEP_VLIW64)
+ mep_check_parallel64_scheduling ();
+ else
+ mep_check_parallel32_scheduling ();
+}
+
+static void
+mep_process_saved_insns (void)
+{
+ int i;
+
+ gas_cgen_save_fixups (MAX_SAVED_FIXUP_CHAINS - 1);
+
+ /* We have to check for valid scheduling here. */
+ mep_check_parallel_scheduling ();
+
+ /* If the last call didn't cause assembly to terminate, we have
+ a valid vliw insn/insn pair saved. Restore this instructions'
+ fixups and process the insns. */
+ for (i = 0;i<num_insns_saved;i++)
+ {
+ gas_cgen_restore_fixups (i);
+ gas_cgen_finish_insn (saved_insns[i].insn, saved_insns[i].buffer,
+ CGEN_FIELDS_BITSIZE (& saved_insns[i].fields),
+ 1, NULL);
+ }
+ gas_cgen_restore_fixups (MAX_SAVED_FIXUP_CHAINS - 1);
+
+ /* Clear the fixups and reset the number insn saved to 0. */
+ gas_cgen_initialize_saved_fixups_array ();
+ num_insns_saved = 0;
+ listing_prev_line ();
+}
+
+void
+md_assemble (char * str)
+{
+ static CGEN_BITSET* isas = NULL;
+ char * errmsg;
+
+ /* Initialize GAS's cgen interface for a new instruction. */
+ gas_cgen_init_parse ();
+
+ /* There are two possible modes: core and vliw. We have to assemble
+ differently for each.
+
+ Core Mode: We assemble normally. All instructions are on a
+ single line and are made up of one mnemonic and one
+ set of operands.
+ VLIW Mode: Vliw combinations are indicated as follows:
+
+ core insn
+ + copro insn
+
+ We want to handle the general case where more than
+ one instruction can be preceeded by a +. This will
+ happen later if we add support for internally parallel
+ coprocessors. We'll make the parsing nice and general
+ so that it can handle an arbitrary number of insns
+ with leading +'s. The actual checking for valid
+ combinations is done elsewhere. */
+
+ /* Initialize the isa to refer to the core. */
+ if (isas == NULL)
+ isas = cgen_bitset_copy (& MEP_CORE_ISA);
+ else
+ {
+ cgen_bitset_clear (isas);
+ cgen_bitset_union (isas, & MEP_CORE_ISA, isas);
+ }
+ gas_cgen_cpu_desc->isas = isas;
+
+ if (mode == VLIW)
+ {
+ /* VLIW mode. */
+
+ int thisInsnIsCopro = 0;
+ mep_insn insn;
+ int i;
+
+ /* Initialize the insn buffer */
+
+ if (! CGEN_INT_INSN_P)
+ for (i=0; i < CGEN_MAX_INSN_SIZE; i++)
+ insn.buffer[i]='\0';
+
+ /* Can't tell core / copro insns apart at parse time! */
+ cgen_bitset_union (isas, & MEP_COP_ISA, isas);
+
+ /* Assemble the insn so we can examine its attributes. */
+ insn.insn = mep_cgen_assemble_insn (gas_cgen_cpu_desc, str,
+ &insn.fields, insn.buffer,
+ &errmsg);
+ if (!insn.insn)
+ {
+ as_bad ("%s", errmsg);
+ return;
+ }
+ mep_check_for_disabled_registers (&insn);
+
+ /* Check to see if it's a coprocessor instruction. */
+ thisInsnIsCopro = MEP_INSN_COP_P (insn.insn);
+
+ if (!thisInsnIsCopro)
+ {
+ insn.insn = mep_cgen_assemble_cop_insn (gas_cgen_cpu_desc, str,
+ &insn.fields, insn.buffer,
+ insn.insn);
+ thisInsnIsCopro = MEP_INSN_COP_P (insn.insn);
+ mep_check_for_disabled_registers (&insn);
+ }
+
+ if (pluspresent)
+ {
+ /* A plus was present. */
+ /* Check for a + with a core insn and abort if found. */
+ if (!thisInsnIsCopro)
+ {
+ as_fatal("A core insn cannot be preceeded by a +.\n");
+ return;
+ }
+
+ if (num_insns_saved > 0)
+ {
+ /* There are insns in the queue. Add this one. */
+ mep_save_insn (insn);
+ }
+ else
+ {
+ /* There are no insns in the queue and a plus is present.
+ This is a syntax error. Let's not tolerate this.
+ We can relax this later if necessary. */
+ as_bad (_("Invalid use of parallelization operator."));
+ return;
+ }
+ }
+ else
+ {
+ /* No plus was present. */
+ if (num_insns_saved > 0)
+ {
+ /* There are insns saved and we came across an insn without a
+ leading +. That's the signal to process the saved insns
+ before proceeding then treat the current insn as the first
+ in a new vliw group. */
+ mep_process_saved_insns ();
+ num_insns_saved = 0;
+ /* mep_save_insn (insn); */
+ }
+ mep_save_insn (insn);
+#if 0
+ else
+ {
+
+ /* Core Insn. Add it to the beginning of the queue. */
+ mep_save_insn (insn);
+ /* gas_cgen_save_fixups(num_insns_saved); */
+ }
+#endif
+ }
+
+ pluspresent = 0;
+ }
+ else
+ {
+ /* Core mode. */
+
+ /* Only single instructions are assembled in core mode. */
+ mep_insn insn;
+
+ /* If a leading '+' was present, issue an error.
+ That's not allowed in core mode. */
+ if (pluspresent)
+ {
+ as_bad (_("Leading plus sign not allowed in core mode"));
+ return;
+ }
+
+ insn.insn = mep_cgen_assemble_insn
+ (gas_cgen_cpu_desc, str, & insn.fields, insn.buffer, & errmsg);
+
+ if (!insn.insn)
+ {
+ as_bad ("%s", errmsg);
+ return;
+ }
+ gas_cgen_finish_insn (insn.insn, insn.buffer,
+ CGEN_FIELDS_BITSIZE (& insn.fields), 1, NULL);
+ mep_check_for_disabled_registers (&insn);
+ }
+}
+
+valueT
+md_section_align (segT segment, valueT size)
+{
+ int align = bfd_get_section_alignment (stdoutput, segment);
+ return ((size + (1 << align) - 1) & (-1 << align));
+}
+
+
+symbolS *
+md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
+{
+ return 0;
+}
+
+/* Interface to relax_segment. */
+
+
+const relax_typeS md_relax_table[] =
+{
+ /* The fields are:
+ 1) most positive reach of this state,
+ 2) most negative reach of this state,
+ 3) how many bytes this mode will have in the variable part of the frag
+ 4) which index into the table to try if we can't fit into this one. */
+ /* Note that we use "beq" because "jmp" has a peculiarity - it cannot
+ jump to addresses with any bits 27..24 set. So, we use beq as a
+ 17-bit pc-relative branch to avoid using jmp, just in case. */
+
+ /* 0 */ { 0, 0, 0, 0 }, /* unused */
+ /* 1 */ { 0, 0, 0, 0 }, /* marker for "don't know yet" */
+
+ /* 2 */ { 2047, -2048, 0, 3 }, /* bsr12 */
+ /* 3 */ { 0, 0, 2, 0 }, /* bsr16 */
+
+ /* 4 */ { 2047, -2048, 0, 5 }, /* bra */
+ /* 5 */ { 65535, -65536, 2, 6 }, /* beq $0,$0 */
+ /* 6 */ { 0, 0, 2, 0 }, /* jmp24 */
+
+ /* 7 */ { 65535, -65536, 0, 8 }, /* beqi */
+ /* 8 */ { 0, 0, 4, 0 }, /* bnei/jmp */
+
+ /* 9 */ { 127, -128, 0, 10 }, /* beqz */
+ /* 10 */ { 65535, -65536, 2, 11 }, /* beqi */
+ /* 11 */ { 0, 0, 4, 0 }, /* bnei/jmp */
+
+ /* 12 */ { 65535, -65536, 0, 13 }, /* bnei */
+ /* 13 */ { 0, 0, 4, 0 }, /* beqi/jmp */
+
+ /* 14 */ { 127, -128, 0, 15 }, /* bnez */
+ /* 15 */ { 65535, -65536, 2, 16 }, /* bnei */
+ /* 16 */ { 0, 0, 4, 0 }, /* beqi/jmp */
+
+ /* 17 */ { 65535, -65536, 0, 13 }, /* bgei */
+ /* 18 */ { 0, 0, 4, 0 },
+ /* 19 */ { 65535, -65536, 0, 13 }, /* blti */
+ /* 20 */ { 0, 0, 4, 0 },
+ /* 19 */ { 65535, -65536, 0, 13 }, /* bcpeq */
+ /* 20 */ { 0, 0, 4, 0 },
+ /* 19 */ { 65535, -65536, 0, 13 }, /* bcpne */
+ /* 20 */ { 0, 0, 4, 0 },
+ /* 19 */ { 65535, -65536, 0, 13 }, /* bcpat */
+ /* 20 */ { 0, 0, 4, 0 },
+ /* 19 */ { 65535, -65536, 0, 13 }, /* bcpaf */
+ /* 20 */ { 0, 0, 4, 0 }
+};
+
+/* Pseudo-values for 64 bit "insns" which are combinations of two 32
+ bit insns. */
+typedef enum {
+ MEP_PSEUDO64_NONE,
+ MEP_PSEUDO64_16BITCC,
+ MEP_PSEUDO64_32BITCC,
+} MepPseudo64Values;
+
+static struct {
+ int insn;
+ int growth;
+ int insn_for_extern;
+} subtype_mappings[] = {
+ { 0, 0, 0 },
+ { 0, 0, 0 },
+ { MEP_INSN_BSR12, 0, MEP_INSN_BSR24 },
+ { MEP_INSN_BSR24, 2, MEP_INSN_BSR24 },
+ { MEP_INSN_BRA, 0, MEP_INSN_BRA },
+ { MEP_INSN_BEQ, 2, MEP_INSN_BEQ },
+ { MEP_INSN_JMP, 2, MEP_INSN_JMP },
+ { MEP_INSN_BEQI, 0, MEP_INSN_BEQI },
+ { -1, 4, MEP_PSEUDO64_32BITCC },
+ { MEP_INSN_BEQZ, 0, MEP_INSN_BEQZ },
+ { MEP_INSN_BEQI, 2, MEP_INSN_BEQI },
+ { -1, 4, MEP_PSEUDO64_16BITCC },
+ { MEP_INSN_BNEI, 0, MEP_INSN_BNEI },
+ { -1, 4, MEP_PSEUDO64_32BITCC },
+ { MEP_INSN_BNEZ, 0, MEP_INSN_BNEZ },
+ { MEP_INSN_BNEI, 2, MEP_INSN_BNEI },
+ { -1, 4, MEP_PSEUDO64_16BITCC },
+ { MEP_INSN_BGEI, 0, MEP_INSN_BGEI },
+ { -1, 4, MEP_PSEUDO64_32BITCC },
+ { MEP_INSN_BLTI, 0, MEP_INSN_BLTI },
+ { -1, 4, MEP_PSEUDO64_32BITCC },
+ { MEP_INSN_BCPEQ, 0, MEP_INSN_BCPEQ },
+ { -1, 4, MEP_PSEUDO64_32BITCC },
+ { MEP_INSN_BCPNE, 0, MEP_INSN_BCPNE },
+ { -1, 4, MEP_PSEUDO64_32BITCC },
+ { MEP_INSN_BCPAT, 0, MEP_INSN_BCPAT },
+ { -1, 4, MEP_PSEUDO64_32BITCC },
+ { MEP_INSN_BCPAF, 0, MEP_INSN_BCPAF },
+ { -1, 4, MEP_PSEUDO64_32BITCC }
+};
+#define NUM_MAPPINGS (sizeof (subtype_mappings) / sizeof (subtype_mappings[0]))
+
+void
+mep_prepare_relax_scan (fragS *fragP, offsetT *aim, relax_substateT this_state)
+{
+ symbolS *symbolP = fragP->fr_symbol;
+ if (symbolP && !S_IS_DEFINED (symbolP))
+ *aim = 0;
+ /* Adjust for MeP pcrel not being relative to the next opcode. */
+ *aim += 2 + md_relax_table[this_state].rlx_length;
+}
+
+static int
+insn_to_subtype (int insn)
+{
+ unsigned int i;
+ for (i=0; i<NUM_MAPPINGS; i++)
+ if (insn == subtype_mappings[i].insn)
+ return i;
+ abort ();
+}
+
+/* Return an initial guess of the length by which a fragment must grow
+ to hold a branch to reach its destination. Also updates fr_type
+ and fr_subtype as necessary.
+
+ Called just before doing relaxation. Any symbol that is now
+ undefined will not become defined. The guess for fr_var is
+ ACTUALLY the growth beyond fr_fix. Whatever we do to grow fr_fix
+ or fr_var contributes to our returned value. Although it may not
+ be explicit in the frag, pretend fr_var starts with a 0 value. */
+
+int
+md_estimate_size_before_relax (fragS * fragP, segT segment)
+{
+ if (fragP->fr_subtype == 1)
+ fragP->fr_subtype = insn_to_subtype (fragP->fr_cgen.insn->base->num);
+
+ if (S_GET_SEGMENT (fragP->fr_symbol) != segment)
+ {
+ int new_insn;
+
+ new_insn = subtype_mappings[fragP->fr_subtype].insn_for_extern;
+ fragP->fr_subtype = insn_to_subtype (new_insn);
+ }
+
+ if (MEP_VLIW && ! MEP_VLIW64
+ && (bfd_get_section_flags (stdoutput, segment) & SEC_MEP_VLIW))
+ {
+ /* Use 32 bit branches for vliw32 so the vliw word is not split. */
+ switch (fragP->fr_cgen.insn->base->num)
+ {
+ case MEP_INSN_BSR12:
+ fragP->fr_subtype = insn_to_subtype
+ (subtype_mappings[fragP->fr_subtype].insn_for_extern);
+ break;
+ case MEP_INSN_BEQZ:
+ fragP->fr_subtype ++;
+ break;
+ case MEP_INSN_BNEZ:
+ fragP->fr_subtype ++;
+ break;
+ }
+ }
+
+ if (fragP->fr_cgen.insn->base
+ && fragP->fr_cgen.insn->base->num
+ != subtype_mappings[fragP->fr_subtype].insn)
+ {
+ int new_insn= subtype_mappings[fragP->fr_subtype].insn;
+ if (new_insn != -1)
+ {
+ fragP->fr_cgen.insn = (fragP->fr_cgen.insn
+ - fragP->fr_cgen.insn->base->num
+ + new_insn);
+ }
+ }
+
+ return subtype_mappings[fragP->fr_subtype].growth;
+}
+
+/* *fragP has been relaxed to its final size, and now needs to have
+ the bytes inside it modified to conform to the new size.
+
+ Called after relaxation is finished.
+ fragP->fr_type == rs_machine_dependent.
+ fragP->fr_subtype is the subtype of what the address relaxed to. */
+
+static int
+target_address_for (fragS *frag)
+{
+ int rv = frag->fr_offset;
+ symbolS *sym = frag->fr_symbol;
+
+ if (sym)
+ rv += S_GET_VALUE (sym);
+
+ return rv;
+}
+
+void
+md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
+ segT sec ATTRIBUTE_UNUSED,
+ fragS *fragP)
+{
+ int addend, rn, bit = 0;
+ int operand;
+ int where = fragP->fr_opcode - fragP->fr_literal;
+ int e = target_big_endian ? 0 : 1;
+
+ addend = target_address_for (fragP) - (fragP->fr_address + where);
+
+ if (subtype_mappings[fragP->fr_subtype].insn == -1)
+ {
+ fragP->fr_fix += subtype_mappings[fragP->fr_subtype].growth;
+ switch (subtype_mappings[fragP->fr_subtype].insn_for_extern)
+ {
+ case MEP_PSEUDO64_16BITCC:
+ fragP->fr_opcode[1^e] = ((fragP->fr_opcode[1^e] & 1) ^ 1) | 0x06;
+ fragP->fr_opcode[2^e] = 0xd8;
+ fragP->fr_opcode[3^e] = 0x08;
+ fragP->fr_opcode[4^e] = 0;
+ fragP->fr_opcode[5^e] = 0;
+ where += 2;
+ break;
+ case MEP_PSEUDO64_32BITCC:
+ if (fragP->fr_opcode[0^e] & 0x10)
+ fragP->fr_opcode[1^e] ^= 0x01;
+ else
+ fragP->fr_opcode[1^e] ^= 0x04;
+ fragP->fr_opcode[2^e] = 0;
+ fragP->fr_opcode[3^e] = 4;
+ fragP->fr_opcode[4^e] = 0xd8;
+ fragP->fr_opcode[5^e] = 0x08;
+ fragP->fr_opcode[6^e] = 0;
+ fragP->fr_opcode[7^e] = 0;
+ where += 4;
+ break;
+ default:
+ abort ();
+ }
+ fragP->fr_cgen.insn = (fragP->fr_cgen.insn
+ - fragP->fr_cgen.insn->base->num
+ + MEP_INSN_JMP);
+ operand = MEP_OPERAND_PCABS24A2;
+ }
+ else
+ switch (fragP->fr_cgen.insn->base->num)
+ {
+ case MEP_INSN_BSR12:
+ fragP->fr_opcode[0^e] = 0xb0 | ((addend >> 8) & 0x0f);
+ fragP->fr_opcode[1^e] = 0x01 | (addend & 0xfe);
+ operand = MEP_OPERAND_PCREL12A2;
+ break;
+
+ case MEP_INSN_BSR24:
+ fragP->fr_fix += 2;
+ fragP->fr_opcode[0^e] = 0xd8 | ((addend >> 5) & 0x07);
+ fragP->fr_opcode[1^e] = 0x09 | ((addend << 3) & 0xf0);
+ fragP->fr_opcode[2^e] = 0x00 | ((addend >>16) & 0xff);
+ fragP->fr_opcode[3^e] = 0x00 | ((addend >> 8) & 0xff);
+ operand = MEP_OPERAND_PCREL24A2;
+ break;
+
+ case MEP_INSN_BRA:
+ fragP->fr_opcode[0^e] = 0xb0 | ((addend >> 8) & 0x0f);
+ fragP->fr_opcode[1^e] = 0x00 | (addend & 0xfe);
+ operand = MEP_OPERAND_PCREL12A2;
+ break;
+
+ case MEP_INSN_BEQ:
+ /* The default relax_frag doesn't change the state if there is no
+ growth, so we must manually handle converting out-of-range BEQ
+ instructions to JMP. */
+ if (addend <= 65535 && addend >= -65536)
+ {
+ fragP->fr_fix += 2;
+ fragP->fr_opcode[0^e] = 0xe0;
+ fragP->fr_opcode[1^e] = 0x01;
+ fragP->fr_opcode[2^e] = 0x00 | ((addend >> 9) & 0xff);
+ fragP->fr_opcode[3^e] = 0x00 | ((addend >> 1) & 0xff);
+ operand = MEP_OPERAND_PCREL17A2;
+ break;
+ }
+ /* ...FALLTHROUGH... */
+
+ case MEP_INSN_JMP:
+ addend = target_address_for (fragP);
+ fragP->fr_fix += 2;
+ fragP->fr_opcode[0^e] = 0xd8 | ((addend >> 5) & 0x07);
+ fragP->fr_opcode[1^e] = 0x08 | ((addend << 3) & 0xf0);
+ fragP->fr_opcode[2^e] = 0x00 | ((addend >>16) & 0xff);
+ fragP->fr_opcode[3^e] = 0x00 | ((addend >> 8) & 0xff);
+ operand = MEP_OPERAND_PCABS24A2;
+ break;
+
+ case MEP_INSN_BNEZ:
+ bit = 1;
+ case MEP_INSN_BEQZ:
+ fragP->fr_opcode[1^e] = bit | (addend & 0xfe);
+ operand = MEP_OPERAND_PCREL8A2;
+ break;
+
+ case MEP_INSN_BNEI:
+ bit = 4;
+ case MEP_INSN_BEQI:
+ if (subtype_mappings[fragP->fr_subtype].growth)
+ {
+ fragP->fr_fix += subtype_mappings[fragP->fr_subtype].growth;
+ rn = fragP->fr_opcode[0^e] & 0x0f;
+ fragP->fr_opcode[0^e] = 0xe0 | rn;
+ fragP->fr_opcode[1^e] = bit;
+ }
+ fragP->fr_opcode[2^e] = 0x00 | ((addend >> 9) & 0xff);
+ fragP->fr_opcode[3^e] = 0x00 | ((addend >> 1) & 0xff);
+ operand = MEP_OPERAND_PCREL17A2;
+ break;
+
+ case MEP_INSN_BLTI:
+ case MEP_INSN_BGEI:
+ case MEP_INSN_BCPEQ:
+ case MEP_INSN_BCPNE:
+ case MEP_INSN_BCPAT:
+ case MEP_INSN_BCPAF:
+ /* No opcode change needed, just operand. */
+ fragP->fr_opcode[2^e] = (addend >> 9) & 0xff;
+ fragP->fr_opcode[3^e] = (addend >> 1) & 0xff;
+ operand = MEP_OPERAND_PCREL17A2;
+ break;
+
+ default:
+ abort ();
+ }
+
+ if (S_GET_SEGMENT (fragP->fr_symbol) != sec
+ || operand == MEP_OPERAND_PCABS24A2)
+ {
+ assert (fragP->fr_cgen.insn != 0);
+ gas_cgen_record_fixup (fragP,
+ where,
+ fragP->fr_cgen.insn,
+ (fragP->fr_fix - where) * 8,
+ cgen_operand_lookup_by_num (gas_cgen_cpu_desc,
+ operand),
+ fragP->fr_cgen.opinfo,
+ fragP->fr_symbol, fragP->fr_offset);
+ }
+}
+
+
+/* Functions concerning relocs. */
+
+void
+mep_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
+{
+ /* If we already know the fixup value, adjust it in the same
+ way that the linker would have done. */
+ if (fixP->fx_addsy == 0)
+ switch (fixP->fx_cgen.opinfo)
+ {
+ case BFD_RELOC_MEP_LOW16:
+ *valP = ((long)(*valP & 0xffff)) << 16 >> 16;
+ break;
+ case BFD_RELOC_MEP_HI16U:
+ *valP >>= 16;
+ break;
+ case BFD_RELOC_MEP_HI16S:
+ *valP = (*valP + 0x8000) >> 16;
+ break;
+ }
+
+ /* Now call cgen's md_aply_fix. */
+ gas_cgen_md_apply_fix (fixP, valP, seg);
+}
+
+long
+md_pcrel_from_section (fixS *fixP, segT sec)
+{
+ if (fixP->fx_addsy != (symbolS *) NULL
+ && (! S_IS_DEFINED (fixP->fx_addsy)
+ || S_GET_SEGMENT (fixP->fx_addsy) != sec))
+ /* The symbol is undefined (or is defined but not in this section).
+ Let the linker figure it out. */
+ return 0;
+
+ /* Return the address of the opcode - cgen adjusts for opcode size
+ itself, to be consistent with the disassembler, which must do
+ so. */
+ return fixP->fx_where + fixP->fx_frag->fr_address;
+}
+
+/* Return the bfd reloc type for OPERAND of INSN at fixup FIXP.
+ Returns BFD_RELOC_NONE if no reloc type can be found.
+ *FIXP may be modified if desired. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define MAP(n) case MEP_OPERAND_##n: return BFD_RELOC_MEP_##n;
+#else
+#define MAP(n) case MEP_OPERAND_/**/n: return BFD_RELOC_MEP_/**/n;
+#endif
+
+bfd_reloc_code_real_type
+md_cgen_lookup_reloc (const CGEN_INSN *insn ATTRIBUTE_UNUSED,
+ const CGEN_OPERAND *operand,
+ fixS *fixP)
+{
+ enum bfd_reloc_code_real reloc = fixP->fx_cgen.opinfo;
+ static char printed[MEP_OPERAND_MAX] = { 0 };
+
+ /* If there's a reloc here, it's because the parser saw a %foo() and
+ is giving us the correct reloc to use, or because we converted to
+ a different size reloc below and want to avoid "converting" more
+ than once. */
+ if (reloc && reloc != BFD_RELOC_NONE)
+ return reloc;
+
+ switch (operand->type)
+ {
+ MAP (PCREL8A2); /* beqz */
+ MAP (PCREL12A2); /* bsr16 */
+ MAP (PCREL17A2); /* beqi */
+ MAP (PCREL24A2); /* bsr24 */
+ MAP (PCABS24A2); /* jmp */
+ MAP (UIMM24); /* mov */
+ MAP (ADDR24A4); /* sw/lw */
+
+ /* The rest of the relocs should be generated by the parser,
+ for things such as %tprel(), etc. */
+ case MEP_OPERAND_SIMM16:
+#ifdef OBJ_COMPLEX_RELC
+ /* coalescing this into RELOC_MEP_16 is actually a bug,
+ since it's a signed operand. let the relc code handle it. */
+ return BFD_RELOC_RELC;
+#endif
+
+ case MEP_OPERAND_UIMM16:
+ case MEP_OPERAND_SDISP16:
+ case MEP_OPERAND_CODE16:
+ fixP->fx_where += 2;
+ /* to avoid doing the above add twice */
+ fixP->fx_cgen.opinfo = BFD_RELOC_MEP_16;
+ return BFD_RELOC_MEP_16;
+
+ default:
+#ifdef OBJ_COMPLEX_RELC
+ /* this is not an error, yet.
+ pass it to the linker. */
+ return BFD_RELOC_RELC;
+#endif
+ if (printed[operand->type])
+ return BFD_RELOC_NONE;
+ printed[operand->type] = 1;
+
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Don't know how to relocate plain operands of type %s"),
+ operand->name);
+
+ /* Print some helpful hints for the user. */
+ switch (operand->type)
+ {
+ case MEP_OPERAND_UDISP7:
+ case MEP_OPERAND_UDISP7A2:
+ case MEP_OPERAND_UDISP7A4:
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("Perhaps you are missing %%tpoff()?"));
+ break;
+ default:
+ break;
+ }
+ return BFD_RELOC_NONE;
+ }
+}
+
+/* Called while parsing an instruction to create a fixup.
+ We need to check for HI16 relocs and queue them up for later sorting. */
+
+fixS *
+mep_cgen_record_fixup_exp (fragS *frag,
+ int where,
+ const CGEN_INSN *insn,
+ int length,
+ const CGEN_OPERAND *operand,
+ int opinfo,
+ expressionS *exp)
+{
+ fixS * fixP = gas_cgen_record_fixup_exp (frag, where, insn, length,
+ operand, opinfo, exp);
+ return fixP;
+}
+
+/* Return BFD reloc type from opinfo field in a fixS.
+ It's tricky using fx_r_type in mep_frob_file because the values
+ are BFD_RELOC_UNUSED + operand number. */
+#define FX_OPINFO_R_TYPE(f) ((f)->fx_cgen.opinfo)
+
+/* Sort any unmatched HI16 relocs so that they immediately precede
+ the corresponding LO16 reloc. This is called before md_apply_fix and
+ tc_gen_reloc. */
+
+void
+mep_frob_file ()
+{
+ struct mep_hi_fixup * l;
+
+ for (l = mep_hi_fixup_list; l != NULL; l = l->next)
+ {
+ segment_info_type * seginfo;
+ int pass;
+
+ assert (FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_HI16
+ || FX_OPINFO_R_TYPE (l->fixp) == BFD_RELOC_LO16);
+
+ /* Check quickly whether the next fixup happens to be a matching low. */
+ if (l->fixp->fx_next != NULL
+ && FX_OPINFO_R_TYPE (l->fixp->fx_next) == BFD_RELOC_LO16
+ && l->fixp->fx_addsy == l->fixp->fx_next->fx_addsy
+ && l->fixp->fx_offset == l->fixp->fx_next->fx_offset)
+ continue;
+
+ /* Look through the fixups for this segment for a matching
+ `low'. When we find one, move the high just in front of it.
+ We do this in two passes. In the first pass, we try to find
+ a unique `low'. In the second pass, we permit multiple
+ high's relocs for a single `low'. */
+ seginfo = seg_info (l->seg);
+ for (pass = 0; pass < 2; pass++)
+ {
+ fixS * f;
+ fixS * prev;
+
+ prev = NULL;
+ for (f = seginfo->fix_root; f != NULL; f = f->fx_next)
+ {
+ /* Check whether this is a `low' fixup which matches l->fixp. */
+ if (FX_OPINFO_R_TYPE (f) == BFD_RELOC_LO16
+ && f->fx_addsy == l->fixp->fx_addsy
+ && f->fx_offset == l->fixp->fx_offset
+ && (pass == 1
+ || prev == NULL
+ || (FX_OPINFO_R_TYPE (prev) != BFD_RELOC_HI16)
+ || prev->fx_addsy != f->fx_addsy
+ || prev->fx_offset != f->fx_offset))
+ {
+ fixS ** pf;
+
+ /* Move l->fixp before f. */
+ for (pf = &seginfo->fix_root;
+ * pf != l->fixp;
+ pf = & (* pf)->fx_next)
+ assert (* pf != NULL);
+
+ * pf = l->fixp->fx_next;
+
+ l->fixp->fx_next = f;
+ if (prev == NULL)
+ seginfo->fix_root = l->fixp;
+ else
+ prev->fx_next = l->fixp;
+
+ break;
+ }
+
+ prev = f;
+ }
+
+ if (f != NULL)
+ break;
+
+ if (pass == 1)
+ as_warn_where (l->fixp->fx_file, l->fixp->fx_line,
+ _("Unmatched high relocation"));
+ }
+ }
+}
+
+/* See whether we need to force a relocation into the output file. */
+
+int
+mep_force_relocation (fixS *fixp)
+{
+ if ( fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ return 1;
+
+ /* Allow branches to global symbols to be resolved at assembly time.
+ This is consistent with way relaxable branches are handled, since
+ branches to both global and local symbols are relaxed. It also
+ corresponds to the assumptions made in md_pcrel_from_section. */
+ return S_FORCE_RELOC (fixp->fx_addsy, !fixp->fx_pcrel);
+}
+
+/* Write a value out to the object file, using the appropriate endianness. */
+
+void
+md_number_to_chars (char *buf, valueT val, int n)
+{
+ if (target_big_endian)
+ number_to_chars_bigendian (buf, val, n);
+ else
+ number_to_chars_littleendian (buf, val, n);
+}
+
+/* Turn a string in input_line_pointer into a floating point constant
+ of type type, and store the appropriate bytes in *litP. The number
+ of LITTLENUMS emitted is stored in *sizeP . An error message is
+ returned, or NULL on OK. */
+
+/* Equal to MAX_PRECISION in atof-ieee.c */
+#define MAX_LITTLENUMS 6
+
+char *
+md_atof (int type, char *litP, int *sizeP)
+{
+ int i;
+ int prec;
+ LITTLENUM_TYPE words [MAX_LITTLENUMS];
+ char * t;
+
+ switch (type)
+ {
+ case 'f':
+ case 'F':
+ case 's':
+ case 'S':
+ prec = 2;
+ break;
+
+ case 'd':
+ case 'D':
+ case 'r':
+ case 'R':
+ prec = 4;
+ break;
+
+ /* FIXME: Some targets allow other format chars for bigger sizes here. */
+ default:
+ *sizeP = 0;
+ return _("Bad call to md_atof()");
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+ * sizeP = prec * sizeof (LITTLENUM_TYPE);
+
+ for (i = 0; i < prec; i++)
+ {
+ md_number_to_chars (litP, (valueT) words[i],
+ sizeof (LITTLENUM_TYPE));
+ litP += sizeof (LITTLENUM_TYPE);
+ }
+
+ return 0;
+}
+
+
+bfd_boolean
+mep_fix_adjustable (fixS *fixP)
+{
+ bfd_reloc_code_real_type reloc_type;
+
+ if ((int) fixP->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ {
+ const CGEN_INSN *insn = NULL;
+ int opindex = (int) fixP->fx_r_type - (int) BFD_RELOC_UNUSED;
+ const CGEN_OPERAND *operand
+ = cgen_operand_lookup_by_num(gas_cgen_cpu_desc, opindex);
+ reloc_type = md_cgen_lookup_reloc (insn, operand, fixP);
+ }
+ else
+ reloc_type = fixP->fx_r_type;
+
+ if (fixP->fx_addsy == NULL)
+ return 1;
+
+ /* Prevent all adjustments to global symbols. */
+ if (S_IS_EXTERNAL (fixP->fx_addsy))
+ return 0;
+
+ if (S_IS_WEAK (fixP->fx_addsy))
+ return 0;
+
+ /* We need the symbol name for the VTABLE entries */
+ if (reloc_type == BFD_RELOC_VTABLE_INHERIT
+ || reloc_type == BFD_RELOC_VTABLE_ENTRY)
+ return 0;
+
+ return 1;
+}
+
+int
+mep_elf_section_letter (int letter, char **ptrmsg)
+{
+ if (letter == 'v')
+ return SHF_MEP_VLIW;
+
+ *ptrmsg = _("Bad .section directive: want a,v,w,x,M,S in string");
+ return 0;
+}
+
+flagword
+mep_elf_section_flags (flagword flags, int attr, int type ATTRIBUTE_UNUSED)
+{
+ if (attr & SHF_MEP_VLIW)
+ flags |= SEC_MEP_VLIW;
+ return flags;
+}
+
+/* In vliw mode, the default section is .vtext. We have to be able
+ to switch into .vtext using only the .vtext directive. */
+
+static segT
+mep_vtext_section (void)
+{
+ static segT vtext_section;
+
+ if (! vtext_section)
+ {
+ flagword applicable = bfd_applicable_section_flags (stdoutput);
+ vtext_section = subseg_new (VTEXT_SECTION_NAME, 0);
+ bfd_set_section_flags (stdoutput, vtext_section,
+ applicable & (SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ | SEC_CODE | SEC_READONLY
+ | SEC_MEP_VLIW));
+ }
+
+ return vtext_section;
+}
+
+static void
+mep_s_vtext (int ignore ATTRIBUTE_UNUSED)
+{
+ int temp;
+
+ /* Record previous_section and previous_subsection. */
+ obj_elf_section_change_hook ();
+
+ temp = get_absolute_expression ();
+ subseg_set (mep_vtext_section (), (subsegT) temp);
+ demand_empty_rest_of_line ();
+}
+
+static void
+mep_switch_to_core_mode (int dummy ATTRIBUTE_UNUSED)
+{
+ mep_process_saved_insns ();
+ pluspresent = 0;
+ mode = CORE;
+}
+
+static void
+mep_switch_to_vliw_mode (int dummy ATTRIBUTE_UNUSED)
+{
+ if (! MEP_VLIW)
+ as_bad (_(".vliw unavailable when VLIW is disabled."));
+ mode = VLIW;
+ /* Switch into .vtext here too. */
+ /* mep_s_vtext(); */
+}
+
+/* This is an undocumented pseudo-op used to disable gas's
+ "disabled_registers" check. Used for code which checks for those
+ registers at runtime. */
+static void
+mep_noregerr (int i ATTRIBUTE_UNUSED)
+{
+ allow_disabled_registers = 1;
+}
+
+/* mep_unrecognized_line: This is called when a line that can't be parsed
+ is encountered. We use it to check for a leading '+' sign which indicates
+ that the current instruction is a coprocessor instruction that is to be
+ parallelized with a previous core insn. This function accepts the '+' and
+ rejects all other characters that might indicate garbage at the beginning
+ of the line. The '+' character gets lost as the calling loop continues,
+ so we need to indicate that we saw it. */
+
+int
+mep_unrecognized_line (int ch)
+{
+ switch (ch)
+ {
+ case '+':
+ pluspresent = 1;
+ return 1; /* '+' indicates an instruction to be parallelized. */
+ default:
+ return 0; /* If it's not a '+', the line can't be parsed. */
+ }
+}
+
+void
+mep_cleanup (void)
+{
+ /* Take care of any insns left to be parallelized when the file ends.
+ This is mainly here to handle the case where the file ends with an
+ insn preceeded by a + or the file ends unexpectedly. */
+ if (mode == VLIW)
+ mep_process_saved_insns ();
+}
+
+int
+mep_flush_pending_output (void)
+{
+ if (mode == VLIW)
+ {
+ mep_process_saved_insns ();
+ pluspresent = 0;
+ }
+
+ return 1;
+}
diff --git a/contrib/binutils/gas/config/tc-mep.h b/contrib/binutils/gas/config/tc-mep.h
new file mode 100644
index 0000000..1d48bd4
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-mep.h
@@ -0,0 +1,119 @@
+/* tc-mep.h -- Header file for tc-mep.c.
+ Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to
+ the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+#define TC_MEP
+
+/* Support computed relocations. */
+#define OBJ_COMPLEX_RELC
+
+/* Support many operands per instruction. */
+#define GAS_CGEN_MAX_FIXUPS 10
+
+#define LISTING_HEADER "MEP GAS "
+
+/* The target BFD architecture. */
+#define TARGET_ARCH bfd_arch_mep
+
+#define TARGET_FORMAT (target_big_endian ? "elf32-mep" : "elf32-mep-little")
+
+/* This is the default. */
+#define TARGET_BYTES_BIG_ENDIAN 1
+
+/* Permit temporary numeric labels. */
+#define LOCAL_LABELS_FB 1
+
+/* .-foo gets turned into PC relative relocs. */
+#define DIFF_EXPR_OK
+
+/* We don't need to handle .word strangely. */
+#define WORKING_DOT_WORD
+
+/* Values passed to md_apply_fix don't include the symbol value. */
+#define MD_APPLY_SYM_VALUE(FIX) 0
+
+#define MD_APPLY_FIX
+#define md_apply_fix mep_apply_fix
+extern void mep_apply_fix (struct fix *, valueT *, segT);
+
+/* 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 (struct fix *, segT);
+
+#define tc_frob_file() mep_frob_file ()
+extern void mep_frob_file (void);
+
+#define tc_fix_adjustable(fixP) mep_fix_adjustable (fixP)
+extern bfd_boolean mep_fix_adjustable (struct fix *);
+
+/* After creating a fixup for an instruction operand, we need
+ to check for HI16 relocs and queue them up for later sorting. */
+#define md_cgen_record_fixup_exp mep_cgen_record_fixup_exp
+
+/* When relaxing, we need to emit various relocs we otherwise wouldn't. */
+#define TC_FORCE_RELOCATION(fix) mep_force_relocation (fix)
+extern int mep_force_relocation (struct fix *);
+
+#define tc_gen_reloc gas_cgen_tc_gen_reloc
+
+extern void gas_cgen_md_operand (expressionS *);
+#define md_operand(x) gas_cgen_md_operand (x)
+
+#define md_flush_pending_output() mep_flush_pending_output()
+extern int mep_flush_pending_output(void);
+
+extern const struct relax_type md_relax_table[];
+#define TC_GENERIC_RELAX_TABLE md_relax_table
+
+/* Account for inserting a jmp after the insn. */
+#define TC_CGEN_MAX_RELAX(insn, len) ((len) + 4)
+
+extern void mep_prepare_relax_scan (fragS *, offsetT *, relax_substateT);
+#define md_prepare_relax_scan(FRAGP, ADDR, AIM, STATE, TYPE) \
+ mep_prepare_relax_scan (FRAGP, &AIM, STATE)
+
+#define skip_whitespace(str) while (*(str) == ' ') ++(str)
+
+/* Support for core/vliw mode switching. */
+#define CORE 0
+#define VLIW 1
+#define MAX_PARALLEL_INSNS 56 /* From email from Toshiba. */
+#define VTEXT_SECTION_NAME ".vtext"
+
+/* Needed to process pending instructions when a label is encountered. */
+#define TC_START_LABEL(ch, ptr) ((ch == ':') && mep_flush_pending_output ())
+
+#define tc_unrecognized_line(c) mep_unrecognized_line (c)
+extern int mep_unrecognized_line (int);
+#define md_cleanup mep_cleanup
+extern void mep_cleanup (void);
+
+#define md_elf_section_letter mep_elf_section_letter
+extern int mep_elf_section_letter (int, char **);
+#define md_elf_section_flags mep_elf_section_flags
+extern flagword mep_elf_section_flags (flagword, int, int);
+
+#define ELF_TC_SPECIAL_SECTIONS \
+ { VTEXT_SECTION_NAME, SHT_PROGBITS, SHF_ALLOC|SHF_EXECINSTR|SHF_MEP_VLIW },
+
+/* The values of the following enum are for use with parinsnum, which
+ is a variable in md_assemble that keeps track of whether or not the
+ next instruction is expected to be the first or second instrucion in
+ a parallelization group. */
+typedef enum exp_par_insn_{FIRST, SECOND} EXP_PAR_INSN;
diff --git a/contrib/binutils/gas/config/tc-mips.c b/contrib/binutils/gas/config/tc-mips.c
index dc5ff68..e97193f 100644
--- a/contrib/binutils/gas/config/tc-mips.c
+++ b/contrib/binutils/gas/config/tc-mips.c
@@ -1,6 +1,6 @@
/* tc-mips.c -- assemble code for a MIPS chip.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
Modified for ECOFF and R4000 support by Ian Lance Taylor of Cygnus
@@ -28,8 +28,6 @@
#include "subsegs.h"
#include "safe-ctype.h"
-#include <stdarg.h>
-
#include "opcode/mips.h"
#include "itbl-ops.h"
#include "dwarf2dbg.h"
@@ -169,7 +167,7 @@ struct mips_cl_insn
/* True if this entry cannot be moved from its current position. */
unsigned int fixed_p : 1;
- /* True if this instruction occured in a .set noreorder block. */
+ /* True if this instruction occurred in a .set noreorder block. */
unsigned int noreorder_p : 1;
/* True for mips16 instructions that jump to an absolute address. */
@@ -212,7 +210,9 @@ struct mips_set_options
command line options, and based on the default architecture. */
int ase_mips3d;
int ase_mdmx;
+ int ase_smartmips;
int ase_dsp;
+ int ase_dspr2;
int ase_mt;
/* Whether we are assembling for the mips16 processor. 0 if we are
not, 1 if we are, and -1 if the value has not been initialized.
@@ -264,7 +264,7 @@ static int file_mips_fp32 = -1;
static struct mips_set_options mips_opts =
{
- ISA_UNKNOWN, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, CPU_UNKNOWN, FALSE
+ ISA_UNKNOWN, -1, -1, 0, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, CPU_UNKNOWN, FALSE
};
/* These variables are filled in with the masks of registers used.
@@ -280,6 +280,11 @@ static int file_mips_isa = ISA_UNKNOWN;
command line (e.g., by -march). */
static int file_ase_mips16;
+#define ISA_SUPPORTS_MIPS16E (mips_opts.isa == ISA_MIPS32 \
+ || mips_opts.isa == ISA_MIPS32R2 \
+ || mips_opts.isa == ISA_MIPS64 \
+ || mips_opts.isa == ISA_MIPS64R2)
+
/* True if -mips3d was passed or implied by arguments passed on the
command line (e.g., by -march). */
static int file_ase_mips3d;
@@ -288,14 +293,36 @@ static int file_ase_mips3d;
command line (e.g., by -march). */
static int file_ase_mdmx;
+/* True if -msmartmips was passed or implied by arguments passed on the
+ command line (e.g., by -march). */
+static int file_ase_smartmips;
+
+#define ISA_SUPPORTS_SMARTMIPS (mips_opts.isa == ISA_MIPS32 \
+ || mips_opts.isa == ISA_MIPS32R2)
+
/* True if -mdsp was passed or implied by arguments passed on the
command line (e.g., by -march). */
static int file_ase_dsp;
+#define ISA_SUPPORTS_DSP_ASE (mips_opts.isa == ISA_MIPS32R2 \
+ || mips_opts.isa == ISA_MIPS64R2)
+
+#define ISA_SUPPORTS_DSP64_ASE (mips_opts.isa == ISA_MIPS64R2)
+
+/* True if -mdspr2 was passed or implied by arguments passed on the
+ command line (e.g., by -march). */
+static int file_ase_dspr2;
+
+#define ISA_SUPPORTS_DSPR2_ASE (mips_opts.isa == ISA_MIPS32R2 \
+ || mips_opts.isa == ISA_MIPS64R2)
+
/* True if -mmt was passed or implied by arguments passed on the
command line (e.g., by -march). */
static int file_ase_mt;
+#define ISA_SUPPORTS_MT_ASE (mips_opts.isa == ISA_MIPS32R2 \
+ || mips_opts.isa == ISA_MIPS64R2)
+
/* The argument of the -march= flag. The architecture we are assembling. */
static int file_mips_arch = CPU_UNKNOWN;
static const char *mips_arch_string;
@@ -312,47 +339,66 @@ static int mips_32bitmode = 0;
#define ABI_NEEDS_32BIT_REGS(ABI) ((ABI) == O32_ABI)
/* Likewise 64-bit registers. */
-#define ABI_NEEDS_64BIT_REGS(ABI) \
- ((ABI) == N32_ABI \
- || (ABI) == N64_ABI \
+#define ABI_NEEDS_64BIT_REGS(ABI) \
+ ((ABI) == N32_ABI \
+ || (ABI) == N64_ABI \
|| (ABI) == O64_ABI)
-/* Return true if ISA supports 64 bit gp register instructions. */
-#define ISA_HAS_64BIT_REGS(ISA) ( \
- (ISA) == ISA_MIPS3 \
- || (ISA) == ISA_MIPS4 \
- || (ISA) == ISA_MIPS5 \
- || (ISA) == ISA_MIPS64 \
- || (ISA) == ISA_MIPS64R2 \
- )
+/* Return true if ISA supports 64 bit wide gp registers. */
+#define ISA_HAS_64BIT_REGS(ISA) \
+ ((ISA) == ISA_MIPS3 \
+ || (ISA) == ISA_MIPS4 \
+ || (ISA) == ISA_MIPS5 \
+ || (ISA) == ISA_MIPS64 \
+ || (ISA) == ISA_MIPS64R2)
+
+/* Return true if ISA supports 64 bit wide float registers. */
+#define ISA_HAS_64BIT_FPRS(ISA) \
+ ((ISA) == ISA_MIPS3 \
+ || (ISA) == ISA_MIPS4 \
+ || (ISA) == ISA_MIPS5 \
+ || (ISA) == ISA_MIPS32R2 \
+ || (ISA) == ISA_MIPS64 \
+ || (ISA) == ISA_MIPS64R2)
/* Return true if ISA supports 64-bit right rotate (dror et al.)
instructions. */
-#define ISA_HAS_DROR(ISA) ( \
- (ISA) == ISA_MIPS64R2 \
- )
+#define ISA_HAS_DROR(ISA) \
+ ((ISA) == ISA_MIPS64R2)
/* Return true if ISA supports 32-bit right rotate (ror et al.)
instructions. */
-#define ISA_HAS_ROR(ISA) ( \
- (ISA) == ISA_MIPS32R2 \
- || (ISA) == ISA_MIPS64R2 \
- )
+#define ISA_HAS_ROR(ISA) \
+ ((ISA) == ISA_MIPS32R2 \
+ || (ISA) == ISA_MIPS64R2 \
+ || mips_opts.ase_smartmips)
/* Return true if ISA supports ins instructions. */
-#define ISA_HAS_INS(ISA) ( \
- (ISA) == ISA_MIPS32R2 \
- || (ISA) == ISA_MIPS64R2 \
- )
+#define ISA_HAS_INS(ISA) \
+ ((ISA) == ISA_MIPS32R2 \
+ || (ISA) == ISA_MIPS64R2)
+
+/* Return true if ISA supports single-precision floats in odd registers. */
+#define ISA_HAS_ODD_SINGLE_FPR(ISA) \
+ ((ISA) == ISA_MIPS32 \
+ || (ISA) == ISA_MIPS32R2 \
+ || (ISA) == ISA_MIPS64 \
+ || (ISA) == ISA_MIPS64R2)
+
+/* Return true if ISA supports move to/from high part of a 64-bit
+ floating-point register. */
+#define ISA_HAS_MXHC1(ISA) \
+ ((ISA) == ISA_MIPS32R2 \
+ || (ISA) == ISA_MIPS64R2)
#define HAVE_32BIT_GPRS \
- (mips_opts.gp32 || ! ISA_HAS_64BIT_REGS (mips_opts.isa))
+ (mips_opts.gp32 || !ISA_HAS_64BIT_REGS (mips_opts.isa))
#define HAVE_32BIT_FPRS \
- (mips_opts.fp32 || ! ISA_HAS_64BIT_REGS (mips_opts.isa))
+ (mips_opts.fp32 || !ISA_HAS_64BIT_FPRS (mips_opts.isa))
-#define HAVE_64BIT_GPRS (! HAVE_32BIT_GPRS)
-#define HAVE_64BIT_FPRS (! HAVE_32BIT_FPRS)
+#define HAVE_64BIT_GPRS (!HAVE_32BIT_GPRS)
+#define HAVE_64BIT_FPRS (!HAVE_32BIT_FPRS)
#define HAVE_NEWABI (mips_abi == N32_ABI || mips_abi == N64_ABI)
@@ -392,22 +438,6 @@ static int mips_32bitmode = 0;
(strncmp (TARGET_CPU, "mips16", sizeof ("mips16") - 1) == 0 \
|| strncmp (TARGET_CANONICAL, "mips-lsi-elf", sizeof ("mips-lsi-elf") - 1) == 0)
-/* Return true if the given CPU supports the MIPS3D ASE. */
-#define CPU_HAS_MIPS3D(cpu) ((cpu) == CPU_SB1 \
- )
-
-/* Return true if the given CPU supports the MDMX ASE. */
-#define CPU_HAS_MDMX(cpu) (FALSE \
- )
-
-/* Return true if the given CPU supports the DSP ASE. */
-#define CPU_HAS_DSP(cpu) (FALSE \
- )
-
-/* Return true if the given CPU supports the MT ASE. */
-#define CPU_HAS_MT(cpu) (FALSE \
- )
-
/* True if CPU has a dror instruction. */
#define CPU_HAS_DROR(CPU) ((CPU) == CPU_VR5400 || (CPU) == CPU_VR5500)
@@ -501,7 +531,7 @@ static int mips_any_noreorder;
an mfhi/mflo instruction is read in the next two instructions. */
static int mips_7000_hilo_fix;
-/* The size of the small data section. */
+/* The size of objects in the small data section. */
static unsigned int g_switch_value = 8;
/* Whether the -G option was used. */
static int g_switch_seen = 0;
@@ -1018,6 +1048,8 @@ static void s_cpsetup (int);
static void s_cplocal (int);
static void s_cprestore (int);
static void s_cpreturn (int);
+static void s_dtprelword (int);
+static void s_dtpreldword (int);
static void s_gpvalue (int);
static void s_gpword (int);
static void s_gpdword (int);
@@ -1043,11 +1075,19 @@ static int validate_mips_insn (const struct mips_opcode *);
struct mips_cpu_info
{
const char *name; /* CPU or ISA name. */
- int is_isa; /* Is this an ISA? (If 0, a CPU.) */
+ int flags; /* ASEs available, or ISA flag. */
int isa; /* ISA level. */
int cpu; /* CPU number (default CPU if ISA). */
};
+#define MIPS_CPU_IS_ISA 0x0001 /* Is this an ISA? (If 0, a CPU.) */
+#define MIPS_CPU_ASE_SMARTMIPS 0x0002 /* CPU implements SmartMIPS ASE */
+#define MIPS_CPU_ASE_DSP 0x0004 /* CPU implements DSP ASE */
+#define MIPS_CPU_ASE_MT 0x0008 /* CPU implements MT ASE */
+#define MIPS_CPU_ASE_MIPS3D 0x0010 /* CPU implements MIPS-3D ASE */
+#define MIPS_CPU_ASE_MDMX 0x0020 /* CPU implements MDMX ASE */
+#define MIPS_CPU_ASE_DSPR2 0x0040 /* CPU implements DSP R2 ASE */
+
static const struct mips_cpu_info *mips_parse_cpu (const char *, const char *);
static const struct mips_cpu_info *mips_cpu_info_from_isa (int);
static const struct mips_cpu_info *mips_cpu_info_from_arch (int);
@@ -1067,8 +1107,7 @@ static const struct mips_cpu_info *mips_cpu_info_from_arch (int);
The following pseudo-ops from the Kane and Heinrich MIPS book are
not MIPS CPU specific, but are also not specific to the object file
format. This file is probably the best place to define them, but
- they are not currently supported: .asm0, .endr, .lab, .repeat,
- .struct. */
+ they are not currently supported: .asm0, .endr, .lab, .struct. */
static const pseudo_typeS mips_pseudo_table[] =
{
@@ -1084,6 +1123,8 @@ static const pseudo_typeS mips_pseudo_table[] =
{"cplocal", s_cplocal, 0},
{"cprestore", s_cprestore, 0},
{"cpreturn", s_cpreturn, 0},
+ {"dtprelword", s_dtprelword, 0},
+ {"dtpreldword", s_dtpreldword, 0},
{"gpvalue", s_gpvalue, 0},
{"gpword", s_gpword, 0},
{"gpdword", s_gpdword, 0},
@@ -1098,6 +1139,8 @@ static const pseudo_typeS mips_pseudo_table[] =
{"half", s_cons, 1},
{"dword", s_cons, 3},
{"weakext", s_mips_weakext, 0},
+ {"origin", s_org, 0},
+ {"repeat", s_rept, 0},
/* These pseudo-ops are defined in read.c, but must be overridden
here for one reason or another. */
@@ -1161,8 +1204,8 @@ struct insn_label_list
symbolS *label;
};
-static struct insn_label_list *insn_labels;
static struct insn_label_list *free_insn_labels;
+#define label_list tc_segment_info_data
static void mips_clear_insn_labels (void);
@@ -1170,12 +1213,19 @@ static inline void
mips_clear_insn_labels (void)
{
register struct insn_label_list **pl;
+ segment_info_type *si;
- for (pl = &free_insn_labels; *pl != NULL; pl = &(*pl)->next)
- ;
- *pl = insn_labels;
- insn_labels = NULL;
+ if (now_seg)
+ {
+ for (pl = &free_insn_labels; *pl != NULL; pl = &(*pl)->next)
+ ;
+
+ si = seg_info (now_seg);
+ *pl = si->label_list;
+ si->label_list = NULL;
+ }
}
+
static char *expr_end;
@@ -1418,13 +1468,302 @@ init_vr4120_conflicts (void)
#undef CONFLICT
}
-/* This function is called once, at assembler startup time. It should
- set up all the tables, etc. that the MD part of the assembler will need. */
+struct regname {
+ const char *name;
+ unsigned int num;
+};
+
+#define RTYPE_MASK 0x1ff00
+#define RTYPE_NUM 0x00100
+#define RTYPE_FPU 0x00200
+#define RTYPE_FCC 0x00400
+#define RTYPE_VEC 0x00800
+#define RTYPE_GP 0x01000
+#define RTYPE_CP0 0x02000
+#define RTYPE_PC 0x04000
+#define RTYPE_ACC 0x08000
+#define RTYPE_CCC 0x10000
+#define RNUM_MASK 0x000ff
+#define RWARN 0x80000
+
+#define GENERIC_REGISTER_NUMBERS \
+ {"$0", RTYPE_NUM | 0}, \
+ {"$1", RTYPE_NUM | 1}, \
+ {"$2", RTYPE_NUM | 2}, \
+ {"$3", RTYPE_NUM | 3}, \
+ {"$4", RTYPE_NUM | 4}, \
+ {"$5", RTYPE_NUM | 5}, \
+ {"$6", RTYPE_NUM | 6}, \
+ {"$7", RTYPE_NUM | 7}, \
+ {"$8", RTYPE_NUM | 8}, \
+ {"$9", RTYPE_NUM | 9}, \
+ {"$10", RTYPE_NUM | 10}, \
+ {"$11", RTYPE_NUM | 11}, \
+ {"$12", RTYPE_NUM | 12}, \
+ {"$13", RTYPE_NUM | 13}, \
+ {"$14", RTYPE_NUM | 14}, \
+ {"$15", RTYPE_NUM | 15}, \
+ {"$16", RTYPE_NUM | 16}, \
+ {"$17", RTYPE_NUM | 17}, \
+ {"$18", RTYPE_NUM | 18}, \
+ {"$19", RTYPE_NUM | 19}, \
+ {"$20", RTYPE_NUM | 20}, \
+ {"$21", RTYPE_NUM | 21}, \
+ {"$22", RTYPE_NUM | 22}, \
+ {"$23", RTYPE_NUM | 23}, \
+ {"$24", RTYPE_NUM | 24}, \
+ {"$25", RTYPE_NUM | 25}, \
+ {"$26", RTYPE_NUM | 26}, \
+ {"$27", RTYPE_NUM | 27}, \
+ {"$28", RTYPE_NUM | 28}, \
+ {"$29", RTYPE_NUM | 29}, \
+ {"$30", RTYPE_NUM | 30}, \
+ {"$31", RTYPE_NUM | 31}
+
+#define FPU_REGISTER_NAMES \
+ {"$f0", RTYPE_FPU | 0}, \
+ {"$f1", RTYPE_FPU | 1}, \
+ {"$f2", RTYPE_FPU | 2}, \
+ {"$f3", RTYPE_FPU | 3}, \
+ {"$f4", RTYPE_FPU | 4}, \
+ {"$f5", RTYPE_FPU | 5}, \
+ {"$f6", RTYPE_FPU | 6}, \
+ {"$f7", RTYPE_FPU | 7}, \
+ {"$f8", RTYPE_FPU | 8}, \
+ {"$f9", RTYPE_FPU | 9}, \
+ {"$f10", RTYPE_FPU | 10}, \
+ {"$f11", RTYPE_FPU | 11}, \
+ {"$f12", RTYPE_FPU | 12}, \
+ {"$f13", RTYPE_FPU | 13}, \
+ {"$f14", RTYPE_FPU | 14}, \
+ {"$f15", RTYPE_FPU | 15}, \
+ {"$f16", RTYPE_FPU | 16}, \
+ {"$f17", RTYPE_FPU | 17}, \
+ {"$f18", RTYPE_FPU | 18}, \
+ {"$f19", RTYPE_FPU | 19}, \
+ {"$f20", RTYPE_FPU | 20}, \
+ {"$f21", RTYPE_FPU | 21}, \
+ {"$f22", RTYPE_FPU | 22}, \
+ {"$f23", RTYPE_FPU | 23}, \
+ {"$f24", RTYPE_FPU | 24}, \
+ {"$f25", RTYPE_FPU | 25}, \
+ {"$f26", RTYPE_FPU | 26}, \
+ {"$f27", RTYPE_FPU | 27}, \
+ {"$f28", RTYPE_FPU | 28}, \
+ {"$f29", RTYPE_FPU | 29}, \
+ {"$f30", RTYPE_FPU | 30}, \
+ {"$f31", RTYPE_FPU | 31}
+
+#define FPU_CONDITION_CODE_NAMES \
+ {"$fcc0", RTYPE_FCC | 0}, \
+ {"$fcc1", RTYPE_FCC | 1}, \
+ {"$fcc2", RTYPE_FCC | 2}, \
+ {"$fcc3", RTYPE_FCC | 3}, \
+ {"$fcc4", RTYPE_FCC | 4}, \
+ {"$fcc5", RTYPE_FCC | 5}, \
+ {"$fcc6", RTYPE_FCC | 6}, \
+ {"$fcc7", RTYPE_FCC | 7}
+
+#define COPROC_CONDITION_CODE_NAMES \
+ {"$cc0", RTYPE_FCC | RTYPE_CCC | 0}, \
+ {"$cc1", RTYPE_FCC | RTYPE_CCC | 1}, \
+ {"$cc2", RTYPE_FCC | RTYPE_CCC | 2}, \
+ {"$cc3", RTYPE_FCC | RTYPE_CCC | 3}, \
+ {"$cc4", RTYPE_FCC | RTYPE_CCC | 4}, \
+ {"$cc5", RTYPE_FCC | RTYPE_CCC | 5}, \
+ {"$cc6", RTYPE_FCC | RTYPE_CCC | 6}, \
+ {"$cc7", RTYPE_FCC | RTYPE_CCC | 7}
+
+#define N32N64_SYMBOLIC_REGISTER_NAMES \
+ {"$a4", RTYPE_GP | 8}, \
+ {"$a5", RTYPE_GP | 9}, \
+ {"$a6", RTYPE_GP | 10}, \
+ {"$a7", RTYPE_GP | 11}, \
+ {"$ta0", RTYPE_GP | 8}, /* alias for $a4 */ \
+ {"$ta1", RTYPE_GP | 9}, /* alias for $a5 */ \
+ {"$ta2", RTYPE_GP | 10}, /* alias for $a6 */ \
+ {"$ta3", RTYPE_GP | 11}, /* alias for $a7 */ \
+ {"$t0", RTYPE_GP | 12}, \
+ {"$t1", RTYPE_GP | 13}, \
+ {"$t2", RTYPE_GP | 14}, \
+ {"$t3", RTYPE_GP | 15}
+
+#define O32_SYMBOLIC_REGISTER_NAMES \
+ {"$t0", RTYPE_GP | 8}, \
+ {"$t1", RTYPE_GP | 9}, \
+ {"$t2", RTYPE_GP | 10}, \
+ {"$t3", RTYPE_GP | 11}, \
+ {"$t4", RTYPE_GP | 12}, \
+ {"$t5", RTYPE_GP | 13}, \
+ {"$t6", RTYPE_GP | 14}, \
+ {"$t7", RTYPE_GP | 15}, \
+ {"$ta0", RTYPE_GP | 12}, /* alias for $t4 */ \
+ {"$ta1", RTYPE_GP | 13}, /* alias for $t5 */ \
+ {"$ta2", RTYPE_GP | 14}, /* alias for $t6 */ \
+ {"$ta3", RTYPE_GP | 15} /* alias for $t7 */
+
+/* Remaining symbolic register names */
+#define SYMBOLIC_REGISTER_NAMES \
+ {"$zero", RTYPE_GP | 0}, \
+ {"$at", RTYPE_GP | 1}, \
+ {"$AT", RTYPE_GP | 1}, \
+ {"$v0", RTYPE_GP | 2}, \
+ {"$v1", RTYPE_GP | 3}, \
+ {"$a0", RTYPE_GP | 4}, \
+ {"$a1", RTYPE_GP | 5}, \
+ {"$a2", RTYPE_GP | 6}, \
+ {"$a3", RTYPE_GP | 7}, \
+ {"$s0", RTYPE_GP | 16}, \
+ {"$s1", RTYPE_GP | 17}, \
+ {"$s2", RTYPE_GP | 18}, \
+ {"$s3", RTYPE_GP | 19}, \
+ {"$s4", RTYPE_GP | 20}, \
+ {"$s5", RTYPE_GP | 21}, \
+ {"$s6", RTYPE_GP | 22}, \
+ {"$s7", RTYPE_GP | 23}, \
+ {"$t8", RTYPE_GP | 24}, \
+ {"$t9", RTYPE_GP | 25}, \
+ {"$k0", RTYPE_GP | 26}, \
+ {"$kt0", RTYPE_GP | 26}, \
+ {"$k1", RTYPE_GP | 27}, \
+ {"$kt1", RTYPE_GP | 27}, \
+ {"$gp", RTYPE_GP | 28}, \
+ {"$sp", RTYPE_GP | 29}, \
+ {"$s8", RTYPE_GP | 30}, \
+ {"$fp", RTYPE_GP | 30}, \
+ {"$ra", RTYPE_GP | 31}
+
+#define MIPS16_SPECIAL_REGISTER_NAMES \
+ {"$pc", RTYPE_PC | 0}
+
+#define MDMX_VECTOR_REGISTER_NAMES \
+ /* {"$v0", RTYPE_VEC | 0}, clash with REG 2 above */ \
+ /* {"$v1", RTYPE_VEC | 1}, clash with REG 3 above */ \
+ {"$v2", RTYPE_VEC | 2}, \
+ {"$v3", RTYPE_VEC | 3}, \
+ {"$v4", RTYPE_VEC | 4}, \
+ {"$v5", RTYPE_VEC | 5}, \
+ {"$v6", RTYPE_VEC | 6}, \
+ {"$v7", RTYPE_VEC | 7}, \
+ {"$v8", RTYPE_VEC | 8}, \
+ {"$v9", RTYPE_VEC | 9}, \
+ {"$v10", RTYPE_VEC | 10}, \
+ {"$v11", RTYPE_VEC | 11}, \
+ {"$v12", RTYPE_VEC | 12}, \
+ {"$v13", RTYPE_VEC | 13}, \
+ {"$v14", RTYPE_VEC | 14}, \
+ {"$v15", RTYPE_VEC | 15}, \
+ {"$v16", RTYPE_VEC | 16}, \
+ {"$v17", RTYPE_VEC | 17}, \
+ {"$v18", RTYPE_VEC | 18}, \
+ {"$v19", RTYPE_VEC | 19}, \
+ {"$v20", RTYPE_VEC | 20}, \
+ {"$v21", RTYPE_VEC | 21}, \
+ {"$v22", RTYPE_VEC | 22}, \
+ {"$v23", RTYPE_VEC | 23}, \
+ {"$v24", RTYPE_VEC | 24}, \
+ {"$v25", RTYPE_VEC | 25}, \
+ {"$v26", RTYPE_VEC | 26}, \
+ {"$v27", RTYPE_VEC | 27}, \
+ {"$v28", RTYPE_VEC | 28}, \
+ {"$v29", RTYPE_VEC | 29}, \
+ {"$v30", RTYPE_VEC | 30}, \
+ {"$v31", RTYPE_VEC | 31}
+
+#define MIPS_DSP_ACCUMULATOR_NAMES \
+ {"$ac0", RTYPE_ACC | 0}, \
+ {"$ac1", RTYPE_ACC | 1}, \
+ {"$ac2", RTYPE_ACC | 2}, \
+ {"$ac3", RTYPE_ACC | 3}
+
+static const struct regname reg_names[] = {
+ GENERIC_REGISTER_NUMBERS,
+ FPU_REGISTER_NAMES,
+ FPU_CONDITION_CODE_NAMES,
+ COPROC_CONDITION_CODE_NAMES,
+
+ /* The $txx registers depends on the abi,
+ these will be added later into the symbol table from
+ one of the tables below once mips_abi is set after
+ parsing of arguments from the command line. */
+ SYMBOLIC_REGISTER_NAMES,
+
+ MIPS16_SPECIAL_REGISTER_NAMES,
+ MDMX_VECTOR_REGISTER_NAMES,
+ MIPS_DSP_ACCUMULATOR_NAMES,
+ {0, 0}
+};
+
+static const struct regname reg_names_o32[] = {
+ O32_SYMBOLIC_REGISTER_NAMES,
+ {0, 0}
+};
+
+static const struct regname reg_names_n32n64[] = {
+ N32N64_SYMBOLIC_REGISTER_NAMES,
+ {0, 0}
+};
+
+static int
+reg_lookup (char **s, unsigned int types, unsigned int *regnop)
+{
+ symbolS *symbolP;
+ char *e;
+ char save_c;
+ int reg = -1;
+
+ /* Find end of name. */
+ e = *s;
+ if (is_name_beginner (*e))
+ ++e;
+ while (is_part_of_name (*e))
+ ++e;
+
+ /* Terminate name. */
+ save_c = *e;
+ *e = '\0';
+
+ /* Look for a register symbol. */
+ if ((symbolP = symbol_find (*s)) && S_GET_SEGMENT (symbolP) == reg_section)
+ {
+ int r = S_GET_VALUE (symbolP);
+ if (r & types)
+ reg = r & RNUM_MASK;
+ else if ((types & RTYPE_VEC) && (r & ~1) == (RTYPE_GP | 2))
+ /* Convert GP reg $v0/1 to MDMX reg $v0/1! */
+ reg = (r & RNUM_MASK) - 2;
+ }
+ /* Else see if this is a register defined in an itbl entry. */
+ else if ((types & RTYPE_GP) && itbl_have_entries)
+ {
+ char *n = *s;
+ unsigned long r;
+
+ if (*n == '$')
+ ++n;
+ if (itbl_get_reg_val (n, &r))
+ reg = r & RNUM_MASK;
+ }
+
+ /* Advance to next token if a register was recognised. */
+ if (reg >= 0)
+ *s = e;
+ else if (types & RWARN)
+ as_warn ("Unrecognized register name `%s'", *s);
+
+ *e = save_c;
+ if (regnop)
+ *regnop = reg;
+ return reg >= 0;
+}
+
+/* This function is called once, at assembler startup time. It should set up
+ all the tables, etc. that the MD part of the assembler will need. */
void
md_begin (void)
{
- register const char *retval = NULL;
+ const char *retval = NULL;
int i = 0;
int broken = 0;
@@ -1506,46 +1845,20 @@ md_begin (void)
/* We add all the general register names to the symbol table. This
helps us detect invalid uses of them. */
- for (i = 0; i < 32; i++)
- {
- char buf[5];
-
- sprintf (buf, "$%d", i);
- symbol_table_insert (symbol_new (buf, reg_section, i,
+ for (i = 0; reg_names[i].name; i++)
+ symbol_table_insert (symbol_new (reg_names[i].name, reg_section,
+ reg_names[i].num, // & RNUM_MASK,
+ &zero_address_frag));
+ if (HAVE_NEWABI)
+ for (i = 0; reg_names_n32n64[i].name; i++)
+ symbol_table_insert (symbol_new (reg_names_n32n64[i].name, reg_section,
+ reg_names_n32n64[i].num, // & RNUM_MASK,
&zero_address_frag));
- }
- symbol_table_insert (symbol_new ("$ra", reg_section, RA,
- &zero_address_frag));
- symbol_table_insert (symbol_new ("$fp", reg_section, FP,
- &zero_address_frag));
- symbol_table_insert (symbol_new ("$sp", reg_section, SP,
- &zero_address_frag));
- symbol_table_insert (symbol_new ("$gp", reg_section, GP,
- &zero_address_frag));
- symbol_table_insert (symbol_new ("$at", reg_section, AT,
- &zero_address_frag));
- symbol_table_insert (symbol_new ("$kt0", reg_section, KT0,
- &zero_address_frag));
- symbol_table_insert (symbol_new ("$kt1", reg_section, KT1,
- &zero_address_frag));
- symbol_table_insert (symbol_new ("$zero", reg_section, ZERO,
- &zero_address_frag));
- symbol_table_insert (symbol_new ("$pc", reg_section, -1,
- &zero_address_frag));
-
- /* If we don't add these register names to the symbol table, they
- may end up being added as regular symbols by operand(), and then
- make it to the object file as undefined in case they're not
- regarded as local symbols. They're local in o32, since `$' is a
- local symbol prefix, but not in n32 or n64. */
- for (i = 0; i < 8; i++)
- {
- char buf[6];
-
- sprintf (buf, "$fcc%i", i);
- symbol_table_insert (symbol_new (buf, reg_section, -1,
+ else
+ for (i = 0; reg_names_o32[i].name; i++)
+ symbol_table_insert (symbol_new (reg_names_o32[i].name, reg_section,
+ reg_names_o32[i].num, // & RNUM_MASK,
&zero_address_frag));
- }
mips_no_prev_insn ();
@@ -1560,7 +1873,8 @@ md_begin (void)
bfd_set_gp_size (stdoutput, g_switch_value);
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
+#ifdef OBJ_ELF
+ if (IS_ELF)
{
/* On a native system other than VxWorks, sections must be aligned
to 16 byte boundaries. When configured for an embedded ELF
@@ -1598,9 +1912,7 @@ md_begin (void)
bfd_set_section_flags (stdoutput, sec, flags);
bfd_set_section_alignment (stdoutput, sec, HAVE_NEWABI ? 3 : 2);
-#ifdef OBJ_ELF
mips_regmask_frag = frag_more (sizeof (Elf32_External_RegInfo));
-#endif
}
else
{
@@ -1610,7 +1922,6 @@ md_begin (void)
bfd_set_section_flags (stdoutput, sec, flags);
bfd_set_section_alignment (stdoutput, sec, 3);
-#ifdef OBJ_ELF
/* Set up the option header. */
{
Elf_Internal_Options opthdr;
@@ -1627,7 +1938,6 @@ md_begin (void)
mips_regmask_frag = frag_more (sizeof (Elf64_External_RegInfo));
}
-#endif
}
if (ECOFF_DEBUGGING)
@@ -1637,8 +1947,7 @@ md_begin (void)
SEC_HAS_CONTENTS | SEC_READONLY);
(void) bfd_set_section_alignment (stdoutput, sec, 2);
}
-#ifdef OBJ_ELF
- else if (OUTPUT_FLAVOR == bfd_target_elf_flavour && mips_flag_pdr)
+ else if (mips_flag_pdr)
{
pdr_seg = subseg_new (".pdr", (subsegT) 0);
(void) bfd_set_section_flags (stdoutput, pdr_seg,
@@ -1646,11 +1955,11 @@ md_begin (void)
| SEC_DEBUGGING);
(void) bfd_set_section_alignment (stdoutput, pdr_seg, 2);
}
-#endif
subseg_set (seg, subseg);
}
}
+#endif /* OBJ_ELF */
if (! ECOFF_DEBUGGING)
md_obj_begin ();
@@ -1849,10 +2158,11 @@ reg_needs_delay (unsigned int reg)
static void
mips_move_labels (void)
{
+ segment_info_type *si = seg_info (now_seg);
struct insn_label_list *l;
valueT val;
- for (l = insn_labels; l != NULL; l = l->next)
+ for (l = si->label_list; l != NULL; l = l->next)
{
assert (S_GET_SEGMENT (l->label) == now_seg);
symbol_set_frag (l->label, frag_now);
@@ -1864,6 +2174,28 @@ mips_move_labels (void)
}
}
+static bfd_boolean
+s_is_linkonce (symbolS *sym, segT from_seg)
+{
+ bfd_boolean linkonce = FALSE;
+ segT symseg = S_GET_SEGMENT (sym);
+
+ if (symseg != from_seg && !S_IS_LOCAL (sym))
+ {
+ if ((bfd_get_section_flags (stdoutput, symseg) & SEC_LINK_ONCE))
+ linkonce = TRUE;
+#ifdef OBJ_ELF
+ /* The GNU toolchain uses an extension for ELF: a section
+ beginning with the magic string .gnu.linkonce is a
+ linkonce section. */
+ if (strncmp (segment_name (symseg), ".gnu.linkonce",
+ sizeof ".gnu.linkonce" - 1) == 0)
+ linkonce = TRUE;
+#endif
+ }
+ return linkonce;
+}
+
/* Mark instruction labels in mips16 mode. This permits the linker to
handle them specially, such as generating jalx instructions when
needed. We also make them odd for the duration of the assembly, in
@@ -1875,21 +2207,29 @@ mips_move_labels (void)
static void
mips16_mark_labels (void)
{
- if (mips_opts.mips16)
- {
- struct insn_label_list *l;
- valueT val;
+ segment_info_type *si = seg_info (now_seg);
+ struct insn_label_list *l;
- for (l = insn_labels; l != NULL; l = l->next)
- {
-#ifdef OBJ_ELF
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
- S_SET_OTHER (l->label, STO_MIPS16);
+ if (!mips_opts.mips16)
+ return;
+
+ for (l = si->label_list; l != NULL; l = l->next)
+ {
+ symbolS *label = l->label;
+
+#if defined(OBJ_ELF) || defined(OBJ_MAYBE_ELF)
+ if (IS_ELF)
+ S_SET_OTHER (label, STO_MIPS16);
#endif
- val = S_GET_VALUE (l->label);
- if ((val & 1) == 0)
- S_SET_VALUE (l->label, val + 1);
- }
+ if ((S_GET_VALUE (label) & 1) == 0
+ /* Don't adjust the address if the label is global or weak, or
+ in a link-once section, since we'll be emitting symbol reloc
+ references to it which will be patched up by the linker, and
+ the final value of the symbol may or may not be MIPS16. */
+ && ! S_IS_WEAK (label)
+ && ! S_IS_EXTERNAL (label)
+ && ! s_is_linkonce (label, now_seg))
+ S_SET_VALUE (label, S_GET_VALUE (label) | 1);
}
}
@@ -2214,9 +2554,10 @@ static void
append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
bfd_reloc_code_real_type *reloc_type)
{
- register unsigned long prev_pinfo, pinfo;
+ unsigned long prev_pinfo, pinfo;
relax_stateT prev_insn_frag_type = 0;
bfd_boolean relaxed_branch = FALSE;
+ segment_info_type *si = seg_info (now_seg);
/* Mark instruction labels in mips16 mode. */
mips16_mark_labels ();
@@ -2479,6 +2820,11 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
reloc_type[0] == BFD_RELOC_16_PCREL_S2,
reloc_type[0]);
+ /* Tag symbols that have a R_MIPS16_26 relocation against them. */
+ if (reloc_type[0] == BFD_RELOC_MIPS16_JMP
+ && ip->fixp[0]->fx_addsy)
+ *symbol_get_tc (ip->fixp[0]->fx_addsy) = 1;
+
/* These relocations can have an addend that won't fit in
4 octets for 64bit assembly. */
if (HAVE_64BIT_GPRS
@@ -2633,7 +2979,7 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
whether there is a label on this instruction. If
there are any branches to anything other than a
label, users must use .set noreorder. */
- || insn_labels != NULL
+ || si->label_list != NULL
/* If the previous instruction is in a variant frag
other than this branch's one, we cannot do the swap.
This does not apply to the mips16, which uses variant
@@ -2740,10 +3086,7 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
if (mips_opts.mips16
&& (pinfo & INSN_UNCOND_BRANCH_DELAY)
&& (pinfo & (MIPS16_INSN_READ_X | MIPS16_INSN_READ_31))
- && (mips_opts.isa == ISA_MIPS32
- || mips_opts.isa == ISA_MIPS32R2
- || mips_opts.isa == ISA_MIPS64
- || mips_opts.isa == ISA_MIPS64R2))
+ && ISA_SUPPORTS_MIPS16E)
{
/* Convert MIPS16 jr/jalr into a "compact" jump. */
ip->insn_opcode |= 0x0080;
@@ -3025,16 +3368,24 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
assert (mo);
assert (strcmp (name, mo->name) == 0);
- /* Search until we get a match for NAME. It is assumed here that
- macros will never generate MDMX or MIPS-3D instructions. */
- while (strcmp (fmt, mo->args) != 0
- || mo->pinfo == INSN_MACRO
- || !OPCODE_IS_MEMBER (mo,
+ while (1)
+ {
+ /* Search until we get a match for NAME. It is assumed here that
+ macros will never generate MDMX, MIPS-3D, or MT instructions. */
+ if (strcmp (fmt, mo->args) == 0
+ && mo->pinfo != INSN_MACRO
+ && OPCODE_IS_MEMBER (mo,
(mips_opts.isa
- | (file_ase_mips16 ? INSN_MIPS16 : 0)),
+ | (mips_opts.mips16 ? INSN_MIPS16 : 0)
+ | (mips_opts.ase_dsp ? INSN_DSP : 0)
+ | ((mips_opts.ase_dsp && ISA_SUPPORTS_DSP64_ASE)
+ ? INSN_DSP64 : 0)
+ | (mips_opts.ase_dspr2 ? INSN_DSPR2 : 0)
+ | (mips_opts.ase_smartmips ? INSN_SMARTMIPS : 0)),
mips_opts.arch)
- || (mips_opts.arch == CPU_R4650 && (mo->pinfo & FP_D) != 0))
- {
+ && (mips_opts.arch != CPU_R4650 || (mo->pinfo & FP_D) == 0))
+ break;
+
++mo;
assert (mo->name);
assert (strcmp (name, mo->name) == 0);
@@ -3085,6 +3436,10 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
}
continue;
+ case '2':
+ INSERT_OPERAND (BP, insn, va_arg (args, int));
+ continue;
+
case 't':
case 'w':
case 'E':
@@ -3212,7 +3567,11 @@ macro_build (expressionS *ep, const char *name, const char *fmt, ...)
continue;
case 'C':
- insn.insn_opcode |= va_arg (args, unsigned long);
+ INSERT_OPERAND (COPZ, insn, va_arg (args, unsigned long));
+ continue;
+
+ case 'k':
+ INSERT_OPERAND (CACHE, insn, va_arg (args, unsigned long));
continue;
default:
@@ -3296,7 +3655,7 @@ mips16_macro_build (expressionS *ep, const char *name, const char *fmt,
regno = va_arg (args, int);
regno = ((regno & 7) << 2) | ((regno & 0x18) >> 3);
- insn.insn_opcode |= regno << MIPS16OP_SH_REG32R;
+ MIPS16_INSERT_OPERAND (REG32R, insn, regno);
}
continue;
@@ -3412,7 +3771,7 @@ macro_build_lui (expressionS *ep, int regnum)
if (high_expr.X_op == O_constant)
{
- /* we can compute the instruction now without a relocation entry */
+ /* We can compute the instruction now without a relocation entry. */
high_expr.X_add_number = ((high_expr.X_add_number + 0x8000)
>> 16) & 0xffff;
*r = BFD_RELOC_UNUSED;
@@ -4189,7 +4548,7 @@ add_got_offset_hilo (int dest, expressionS *local, int tmp)
static void
macro (struct mips_cl_insn *ip)
{
- register int treg, sreg, dreg, breg;
+ int treg, sreg, dreg, breg;
int tempreg;
int mask;
int used_at = 0;
@@ -4309,6 +4668,22 @@ macro (struct mips_cl_insn *ip)
macro_build (NULL, s2, "d,v,t", treg, sreg, AT);
break;
+ case M_BALIGN:
+ switch (imm_expr.X_add_number)
+ {
+ case 0:
+ macro_build (NULL, "nop", "");
+ break;
+ case 2:
+ macro_build (NULL, "packrl.ph", "d,s,t", treg, treg, sreg);
+ break;
+ default:
+ macro_build (NULL, "balign", "t,s,2", treg, sreg,
+ (int)imm_expr.X_add_number);
+ break;
+ }
+ break;
+
case M_BEQ_I:
s = "beq";
goto beq_i;
@@ -5849,6 +6224,9 @@ macro (struct mips_cl_insn *ip)
case M_SCD_AB:
s = "scd";
goto st;
+ case M_CACHE_AB:
+ s = "cache";
+ goto st;
case M_SDC1_AB:
if (mips_opts.arch == CPU_R4650)
{
@@ -5895,6 +6273,8 @@ macro (struct mips_cl_insn *ip)
|| mask == M_L_DAB
|| mask == M_S_DAB)
fmt = "T,o(b)";
+ else if (mask == M_CACHE_AB)
+ fmt = "k,o(b)";
else if (coproc)
fmt = "E,o(b)";
else
@@ -6854,7 +7234,7 @@ macro (struct mips_cl_insn *ip)
static void
macro2 (struct mips_cl_insn *ip)
{
- register int treg, sreg, dreg, breg;
+ int treg, sreg, dreg, breg;
int tempreg;
int mask;
int used_at;
@@ -7990,6 +8370,10 @@ validate_mips_insn (const struct mips_opcode *opc)
case '+':
switch (c = *p++)
{
+ case '1': USE_BITS (OP_MASK_UDI1, OP_SH_UDI1); break;
+ case '2': USE_BITS (OP_MASK_UDI2, OP_SH_UDI2); break;
+ case '3': USE_BITS (OP_MASK_UDI3, OP_SH_UDI3); break;
+ case '4': USE_BITS (OP_MASK_UDI4, OP_SH_UDI4); break;
case 'A': USE_BITS (OP_MASK_SHAMT, OP_SH_SHAMT); break;
case 'B': USE_BITS (OP_MASK_INSMSB, OP_SH_INSMSB); break;
case 'C': USE_BITS (OP_MASK_EXTMSBD, OP_SH_EXTMSBD); break;
@@ -8065,6 +8449,7 @@ validate_mips_insn (const struct mips_opcode *opc)
case '%': USE_BITS (OP_MASK_VECALIGN, OP_SH_VECALIGN); break;
case '[': break;
case ']': break;
+ case '2': USE_BITS (OP_MASK_BP, OP_SH_BP); break;
case '3': USE_BITS (OP_MASK_SA3, OP_SH_SA3); break;
case '4': USE_BITS (OP_MASK_SA4, OP_SH_SA4); break;
case '5': USE_BITS (OP_MASK_IMM8, OP_SH_IMM8); break;
@@ -8096,6 +8481,62 @@ validate_mips_insn (const struct mips_opcode *opc)
return 1;
}
+/* UDI immediates. */
+struct mips_immed {
+ char type;
+ unsigned int shift;
+ unsigned long mask;
+ const char * desc;
+};
+
+static const struct mips_immed mips_immed[] = {
+ { '1', OP_SH_UDI1, OP_MASK_UDI1, 0},
+ { '2', OP_SH_UDI2, OP_MASK_UDI2, 0},
+ { '3', OP_SH_UDI3, OP_MASK_UDI3, 0},
+ { '4', OP_SH_UDI4, OP_MASK_UDI4, 0},
+ { 0,0,0,0 }
+};
+
+/* Check whether an odd floating-point register is allowed. */
+static int
+mips_oddfpreg_ok (const struct mips_opcode *insn, int argnum)
+{
+ const char *s = insn->name;
+
+ if (insn->pinfo == INSN_MACRO)
+ /* Let a macro pass, we'll catch it later when it is expanded. */
+ return 1;
+
+ if (ISA_HAS_ODD_SINGLE_FPR (mips_opts.isa))
+ {
+ /* Allow odd registers for single-precision ops. */
+ switch (insn->pinfo & (FP_S | FP_D))
+ {
+ case FP_S:
+ case 0:
+ return 1; /* both single precision - ok */
+ case FP_D:
+ return 0; /* both double precision - fail */
+ default:
+ break;
+ }
+
+ /* Cvt.w.x and cvt.x.w allow an odd register for a 'w' or 's' operand. */
+ s = strchr (insn->name, '.');
+ if (argnum == 2)
+ s = s != NULL ? strchr (s + 1, '.') : NULL;
+ return (s != NULL && (s[1] == 'w' || s[1] == 's'));
+ }
+
+ /* Single-precision coprocessor loads and moves are OK too. */
+ if ((insn->pinfo & FP_S)
+ && (insn->pinfo & (INSN_COPROC_MEMORY_DELAY | INSN_STORE_MEMORY
+ | INSN_LOAD_COPROC_DELAY | INSN_COPROC_MOVE_DELAY)))
+ return 1;
+
+ return 0;
+}
+
/* This routine assembles an instruction into its binary format. As a
side effect, it sets one of the global variables imm_reloc or
offset_reloc to the type of relocation to do if one of the operands
@@ -8116,6 +8557,8 @@ mips_ip (char *str, struct mips_cl_insn *ip)
char *s_reset;
char save_c = 0;
offsetT min_range, max_range;
+ int argnum;
+ unsigned int rtype;
insn_error = NULL;
@@ -8176,11 +8619,18 @@ mips_ip (char *str, struct mips_cl_insn *ip)
if (OPCODE_IS_MEMBER (insn,
(mips_opts.isa
+ /* We don't check for mips_opts.mips16 here since
+ we want to allow jalx if -mips16 was specified
+ on the command line. */
| (file_ase_mips16 ? INSN_MIPS16 : 0)
| (mips_opts.ase_mdmx ? INSN_MDMX : 0)
| (mips_opts.ase_dsp ? INSN_DSP : 0)
+ | ((mips_opts.ase_dsp && ISA_SUPPORTS_DSP64_ASE)
+ ? INSN_DSP64 : 0)
+ | (mips_opts.ase_dspr2 ? INSN_DSPR2 : 0)
| (mips_opts.ase_mt ? INSN_MT : 0)
- | (mips_opts.ase_mips3d ? INSN_MIPS3D : 0)),
+ | (mips_opts.ase_mips3d ? INSN_MIPS3D : 0)
+ | (mips_opts.ase_smartmips ? INSN_SMARTMIPS : 0)),
mips_opts.arch))
ok = TRUE;
else
@@ -8295,6 +8745,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
create_insn (ip, insn);
insn_error = NULL;
+ argnum = 1;
for (args = insn->args;; ++args)
{
int is_mdmx;
@@ -8308,16 +8759,29 @@ mips_ip (char *str, struct mips_cl_insn *ip)
return;
break;
+ case '2': /* dsp 2-bit unsigned immediate in bit 11 */
+ my_getExpression (&imm_expr, s);
+ check_absolute_expr (ip, &imm_expr);
+ if ((unsigned long) imm_expr.X_add_number != 1
+ && (unsigned long) imm_expr.X_add_number != 3)
+ {
+ as_bad (_("BALIGN immediate not 1 or 3 (%lu)"),
+ (unsigned long) imm_expr.X_add_number);
+ }
+ INSERT_OPERAND (BP, *ip, imm_expr.X_add_number);
+ imm_expr.X_op = O_absent;
+ s = expr_end;
+ continue;
+
case '3': /* dsp 3-bit unsigned immediate in bit 21 */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number & ~OP_MASK_SA3)
{
- as_warn (_("DSP immediate not in range 0..%d (%lu)"),
- OP_MASK_SA3, (unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= OP_MASK_SA3;
+ as_bad (_("DSP immediate not in range 0..%d (%lu)"),
+ OP_MASK_SA3, (unsigned long) imm_expr.X_add_number);
}
- ip->insn_opcode |= imm_expr.X_add_number << OP_SH_SA3;
+ INSERT_OPERAND (SA3, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8327,11 +8791,10 @@ mips_ip (char *str, struct mips_cl_insn *ip)
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number & ~OP_MASK_SA4)
{
- as_warn (_("DSP immediate not in range 0..%d (%lu)"),
- OP_MASK_SA4, (unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= OP_MASK_SA4;
+ as_bad (_("DSP immediate not in range 0..%d (%lu)"),
+ OP_MASK_SA4, (unsigned long) imm_expr.X_add_number);
}
- ip->insn_opcode |= imm_expr.X_add_number << OP_SH_SA4;
+ INSERT_OPERAND (SA4, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8341,11 +8804,10 @@ mips_ip (char *str, struct mips_cl_insn *ip)
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number & ~OP_MASK_IMM8)
{
- as_warn (_("DSP immediate not in range 0..%d (%lu)"),
- OP_MASK_IMM8, (unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= OP_MASK_IMM8;
+ as_bad (_("DSP immediate not in range 0..%d (%lu)"),
+ OP_MASK_IMM8, (unsigned long) imm_expr.X_add_number);
}
- ip->insn_opcode |= imm_expr.X_add_number << OP_SH_IMM8;
+ INSERT_OPERAND (IMM8, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8355,11 +8817,10 @@ mips_ip (char *str, struct mips_cl_insn *ip)
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number & ~OP_MASK_RS)
{
- as_warn (_("DSP immediate not in range 0..%d (%lu)"),
- OP_MASK_RS, (unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= OP_MASK_RS;
+ as_bad (_("DSP immediate not in range 0..%d (%lu)"),
+ OP_MASK_RS, (unsigned long) imm_expr.X_add_number);
}
- ip->insn_opcode |= imm_expr.X_add_number << OP_SH_RS;
+ INSERT_OPERAND (RS, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8370,7 +8831,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
{
regno = s[3] - '0';
s += 4;
- ip->insn_opcode |= regno << OP_SH_DSPACC;
+ INSERT_OPERAND (DSPACC, *ip, regno);
continue;
}
else
@@ -8382,12 +8843,11 @@ mips_ip (char *str, struct mips_cl_insn *ip)
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number & ~OP_MASK_WRDSP)
{
- as_warn (_("DSP immediate not in range 0..%d (%lu)"),
- OP_MASK_WRDSP,
- (unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= OP_MASK_WRDSP;
+ as_bad (_("DSP immediate not in range 0..%d (%lu)"),
+ OP_MASK_WRDSP,
+ (unsigned long) imm_expr.X_add_number);
}
- ip->insn_opcode |= imm_expr.X_add_number << OP_SH_WRDSP;
+ INSERT_OPERAND (WRDSP, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8398,7 +8858,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
{
regno = s[3] - '0';
s += 4;
- ip->insn_opcode |= regno << OP_SH_DSPACC_S;
+ INSERT_OPERAND (DSPACC_S, *ip, regno);
continue;
}
else
@@ -8413,13 +8873,11 @@ mips_ip (char *str, struct mips_cl_insn *ip)
if (imm_expr.X_add_number < min_range ||
imm_expr.X_add_number > max_range)
{
- as_warn (_("DSP immediate not in range %ld..%ld (%ld)"),
- (long) min_range, (long) max_range,
- (long) imm_expr.X_add_number);
+ as_bad (_("DSP immediate not in range %ld..%ld (%ld)"),
+ (long) min_range, (long) max_range,
+ (long) imm_expr.X_add_number);
}
- imm_expr.X_add_number &= OP_MASK_DSPSFT;
- ip->insn_opcode |= ((unsigned long) imm_expr.X_add_number
- << OP_SH_DSPSFT);
+ INSERT_OPERAND (DSPSFT, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8429,12 +8887,11 @@ mips_ip (char *str, struct mips_cl_insn *ip)
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number & ~OP_MASK_RDDSP)
{
- as_warn (_("DSP immediate not in range 0..%d (%lu)"),
- OP_MASK_RDDSP,
- (unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= OP_MASK_RDDSP;
+ as_bad (_("DSP immediate not in range 0..%d (%lu)"),
+ OP_MASK_RDDSP,
+ (unsigned long) imm_expr.X_add_number);
}
- ip->insn_opcode |= imm_expr.X_add_number << OP_SH_RDDSP;
+ INSERT_OPERAND (RDDSP, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8447,13 +8904,11 @@ mips_ip (char *str, struct mips_cl_insn *ip)
if (imm_expr.X_add_number < min_range ||
imm_expr.X_add_number > max_range)
{
- as_warn (_("DSP immediate not in range %ld..%ld (%ld)"),
- (long) min_range, (long) max_range,
- (long) imm_expr.X_add_number);
+ as_bad (_("DSP immediate not in range %ld..%ld (%ld)"),
+ (long) min_range, (long) max_range,
+ (long) imm_expr.X_add_number);
}
- imm_expr.X_add_number &= OP_MASK_DSPSFT_7;
- ip->insn_opcode |= ((unsigned long) imm_expr.X_add_number
- << OP_SH_DSPSFT_7);
+ INSERT_OPERAND (DSPSFT_7, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8466,41 +8921,33 @@ mips_ip (char *str, struct mips_cl_insn *ip)
if (imm_expr.X_add_number < min_range ||
imm_expr.X_add_number > max_range)
{
- as_warn (_("DSP immediate not in range %ld..%ld (%ld)"),
- (long) min_range, (long) max_range,
- (long) imm_expr.X_add_number);
+ as_bad (_("DSP immediate not in range %ld..%ld (%ld)"),
+ (long) min_range, (long) max_range,
+ (long) imm_expr.X_add_number);
}
- imm_expr.X_add_number &= OP_MASK_IMM10;
- ip->insn_opcode |= ((unsigned long) imm_expr.X_add_number
- << OP_SH_IMM10);
+ INSERT_OPERAND (IMM10, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
- case '!': /* mt 1-bit unsigned immediate in bit 5 */
+ case '!': /* MT usermode flag bit. */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number & ~OP_MASK_MT_U)
- {
- as_warn (_("MT immediate not in range 0..%d (%lu)"),
- OP_MASK_MT_U, (unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= OP_MASK_MT_U;
- }
- ip->insn_opcode |= imm_expr.X_add_number << OP_SH_MT_U;
+ as_bad (_("MT usermode bit not 0 or 1 (%lu)"),
+ (unsigned long) imm_expr.X_add_number);
+ INSERT_OPERAND (MT_U, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
- case '$': /* mt 1-bit unsigned immediate in bit 4 */
+ case '$': /* MT load high flag bit. */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number & ~OP_MASK_MT_H)
- {
- as_warn (_("MT immediate not in range 0..%d (%lu)"),
- OP_MASK_MT_H, (unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= OP_MASK_MT_H;
- }
- ip->insn_opcode |= imm_expr.X_add_number << OP_SH_MT_H;
+ as_bad (_("MT load high bit not 0 or 1 (%lu)"),
+ (unsigned long) imm_expr.X_add_number);
+ INSERT_OPERAND (MT_H, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8511,7 +8958,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
{
regno = s[3] - '0';
s += 4;
- ip->insn_opcode |= regno << OP_SH_MTACC_T;
+ INSERT_OPERAND (MTACC_T, *ip, regno);
continue;
}
else
@@ -8524,7 +8971,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
{
regno = s[3] - '0';
s += 4;
- ip->insn_opcode |= regno << OP_SH_MTACC_D;
+ INSERT_OPERAND (MTACC_D, *ip, regno);
continue;
}
else
@@ -8532,6 +8979,7 @@ mips_ip (char *str, struct mips_cl_insn *ip)
break;
case ',':
+ ++argnum;
if (*s++ == *args)
continue;
s--;
@@ -8577,6 +9025,34 @@ mips_ip (char *str, struct mips_cl_insn *ip)
case '+': /* Opcode extension character. */
switch (*++args)
{
+ case '1': /* UDI immediates. */
+ case '2':
+ case '3':
+ case '4':
+ {
+ const struct mips_immed *imm = mips_immed;
+
+ while (imm->type && imm->type != *args)
+ ++imm;
+ if (! imm->type)
+ internalError ();
+ my_getExpression (&imm_expr, s);
+ check_absolute_expr (ip, &imm_expr);
+ if ((unsigned long) imm_expr.X_add_number & ~imm->mask)
+ {
+ as_warn (_("Illegal %s number (%lu, 0x%lx)"),
+ imm->desc ? imm->desc : ip->insn_mo->name,
+ (unsigned long) imm_expr.X_add_number,
+ (unsigned long) imm_expr.X_add_number);
+ imm_expr.X_add_number &= imm->mask;
+ }
+ ip->insn_opcode |= ((unsigned long) imm_expr.X_add_number
+ << imm->shift);
+ imm_expr.X_op = O_absent;
+ s = expr_end;
+ }
+ continue;
+
case 'A': /* ins/ext position, becomes LSB. */
limlo = 0;
limhi = 31;
@@ -8683,11 +9159,11 @@ do_msbd:
s = expr_end;
continue;
- case 'T': /* Coprocessor register */
+ case 'T': /* Coprocessor register. */
/* +T is for disassembly only; never match. */
break;
- case 't': /* Coprocessor register number */
+ case 't': /* Coprocessor register number. */
if (s[0] == '$' && ISDIGIT (s[1]))
{
++s;
@@ -8703,7 +9179,7 @@ do_msbd:
as_bad (_("Invalid register number (%d)"), regno);
else
{
- ip->insn_opcode |= regno << OP_SH_RT;
+ INSERT_OPERAND (RT, *ip, regno);
continue;
}
}
@@ -8794,8 +9270,9 @@ do_msbd:
case 'c': /* break code */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
- if ((unsigned long) imm_expr.X_add_number > 1023)
- as_warn (_("Illegal break code (%lu)"),
+ if ((unsigned long) imm_expr.X_add_number > OP_MASK_CODE)
+ as_warn (_("Code for %s not in range 0..1023 (%lu)"),
+ ip->insn_mo->name,
(unsigned long) imm_expr.X_add_number);
INSERT_OPERAND (CODE, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
@@ -8805,8 +9282,9 @@ do_msbd:
case 'q': /* lower break code */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
- if ((unsigned long) imm_expr.X_add_number > 1023)
- as_warn (_("Illegal lower break code (%lu)"),
+ if ((unsigned long) imm_expr.X_add_number > OP_MASK_CODE2)
+ as_warn (_("Lower code for %s not in range 0..1023 (%lu)"),
+ ip->insn_mo->name,
(unsigned long) imm_expr.X_add_number);
INSERT_OPERAND (CODE2, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
@@ -8834,7 +9312,8 @@ do_msbd:
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number > OP_MASK_CODE20)
- as_warn (_("Illegal 20-bit code (%lu)"),
+ as_warn (_("Code for %s not in range 0..1048575 (%lu)"),
+ ip->insn_mo->name,
(unsigned long) imm_expr.X_add_number);
INSERT_OPERAND (CODE20, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
@@ -8844,13 +9323,13 @@ do_msbd:
case 'C': /* Coprocessor code */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
- if ((unsigned long) imm_expr.X_add_number >= (1 << 25))
+ if ((unsigned long) imm_expr.X_add_number > OP_MASK_COPZ)
{
as_warn (_("Coproccesor code > 25 bits (%lu)"),
(unsigned long) imm_expr.X_add_number);
- imm_expr.X_add_number &= ((1 << 25) - 1);
+ imm_expr.X_add_number &= OP_MASK_COPZ;
}
- ip->insn_opcode |= imm_expr.X_add_number;
+ INSERT_OPERAND (COPZ, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
@@ -8859,14 +9338,17 @@ do_msbd:
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if ((unsigned long) imm_expr.X_add_number > OP_MASK_CODE19)
- as_warn (_("Illegal 19-bit code (%lu)"),
- (unsigned long) imm_expr.X_add_number);
+ {
+ as_warn (_("Illegal 19-bit code (%lu)"),
+ (unsigned long) imm_expr.X_add_number);
+ imm_expr.X_add_number &= OP_MASK_CODE19;
+ }
INSERT_OPERAND (CODE19, *ip, imm_expr.X_add_number);
imm_expr.X_op = O_absent;
s = expr_end;
continue;
- case 'P': /* Performance register */
+ case 'P': /* Performance register. */
my_getExpression (&imm_expr, s);
check_absolute_expr (ip, &imm_expr);
if (imm_expr.X_add_number != 0 && imm_expr.X_add_number != 1)
@@ -8877,6 +9359,20 @@ do_msbd:
s = expr_end;
continue;
+ case 'G': /* Coprocessor destination register. */
+ if (((ip->insn_opcode >> OP_SH_OP) & OP_MASK_OP) == OP_OP_COP0)
+ ok = reg_lookup (&s, RTYPE_NUM | RTYPE_CP0, &regno);
+ else
+ ok = reg_lookup (&s, RTYPE_NUM | RTYPE_GP, &regno);
+ INSERT_OPERAND (RD, *ip, regno);
+ if (ok)
+ {
+ lastregno = regno;
+ continue;
+ }
+ else
+ break;
+
case 'b': /* base register */
case 'd': /* destination register */
case 's': /* source register */
@@ -8885,106 +9381,22 @@ do_msbd:
case 'v': /* both dest and source */
case 'w': /* both dest and target */
case 'E': /* coprocessor target register */
- case 'G': /* coprocessor destination register */
case 'K': /* 'rdhwr' destination register */
case 'x': /* ignore register name */
case 'z': /* must be zero register */
case 'U': /* destination register (clo/clz). */
case 'g': /* coprocessor destination register */
- s_reset = s;
- if (s[0] == '$')
+ s_reset = s;
+ if (*args == 'E' || *args == 'K')
+ ok = reg_lookup (&s, RTYPE_NUM, &regno);
+ else
+ {
+ ok = reg_lookup (&s, RTYPE_NUM | RTYPE_GP, &regno);
+ if (regno == AT && ! mips_opts.noat)
+ as_warn ("Used $at without \".set noat\"");
+ }
+ if (ok)
{
- if (ISDIGIT (s[1]))
- {
- ++s;
- regno = 0;
- do
- {
- regno *= 10;
- regno += *s - '0';
- ++s;
- }
- while (ISDIGIT (*s));
- if (regno > 31)
- as_bad (_("Invalid register number (%d)"), regno);
- }
- else if (*args == 'E' || *args == 'G' || *args == 'K')
- goto notreg;
- else
- {
- if (s[1] == 'r' && s[2] == 'a')
- {
- s += 3;
- regno = RA;
- }
- else if (s[1] == 'f' && s[2] == 'p')
- {
- s += 3;
- regno = FP;
- }
- else if (s[1] == 's' && s[2] == 'p')
- {
- s += 3;
- regno = SP;
- }
- else if (s[1] == 'g' && s[2] == 'p')
- {
- s += 3;
- regno = GP;
- }
- else if (s[1] == 'a' && s[2] == 't')
- {
- s += 3;
- regno = AT;
- }
- else if (s[1] == 'k' && s[2] == 't' && s[3] == '0')
- {
- s += 4;
- regno = KT0;
- }
- else if (s[1] == 'k' && s[2] == 't' && s[3] == '1')
- {
- s += 4;
- regno = KT1;
- }
- else if (s[1] == 'z' && s[2] == 'e' && s[3] == 'r' && s[4] == 'o')
- {
- s += 5;
- regno = ZERO;
- }
- else if (itbl_have_entries)
- {
- char *p, *n;
- unsigned long r;
-
- p = s + 1; /* advance past '$' */
- n = itbl_get_field (&p); /* n is name */
-
- /* See if this is a register defined in an
- itbl entry. */
- if (itbl_get_reg_val (n, &r))
- {
- /* Get_field advances to the start of
- the next field, so we need to back
- rack to the end of the last field. */
- if (p)
- s = p - 1;
- else
- s = strchr (s, '\0');
- regno = r;
- }
- else
- goto notreg;
- }
- else
- goto notreg;
- }
- if (regno == AT
- && ! mips_opts.noat
- && *args != 'E'
- && *args != 'G'
- && *args != 'K')
- as_warn (_("Used $at without \".set noat\""));
c = *args;
if (*s == ' ')
++s;
@@ -9050,7 +9462,6 @@ do_msbd:
lastregno = regno;
continue;
}
- notreg:
switch (*args++)
{
case 'r':
@@ -9103,45 +9514,27 @@ do_msbd:
case 'R': /* floating point source register */
case 'V':
case 'W':
+ rtype = RTYPE_FPU;
+ if (is_mdmx
+ || (mips_opts.ase_mdmx
+ && (ip->insn_mo->pinfo & FP_D)
+ && (ip->insn_mo->pinfo & (INSN_COPROC_MOVE_DELAY
+ | INSN_COPROC_MEMORY_DELAY
+ | INSN_LOAD_COPROC_DELAY
+ | INSN_LOAD_MEMORY_DELAY
+ | INSN_STORE_MEMORY))))
+ rtype |= RTYPE_VEC;
s_reset = s;
- if (mips_opts.arch == CPU_OCTEON && octeon_error_on_unsupported)
- {
- insn_error = "opcode not implemented in Octeon";
- return;
- }
- /* Accept $fN for FP and MDMX register numbers, and in
- addition accept $vN for MDMX register numbers. */
- if ((s[0] == '$' && s[1] == 'f' && ISDIGIT (s[2]))
- || (is_mdmx != 0 && s[0] == '$' && s[1] == 'v'
- && ISDIGIT (s[2])))
+ if (mips_opts.arch == CPU_OCTEON && octeon_error_on_unsupported)
+ {
+ insn_error = "opcode not implemented in Octeon";
+ return;
+ }
+ if (reg_lookup (&s, rtype, &regno))
{
- s += 2;
- regno = 0;
- do
- {
- regno *= 10;
- regno += *s - '0';
- ++s;
- }
- while (ISDIGIT (*s));
-
- if (regno > 31)
- as_bad (_("Invalid float register number (%d)"), regno);
-
if ((regno & 1) != 0
&& HAVE_32BIT_FPRS
- && ! (strcmp (str, "mtc1") == 0
- || strcmp (str, "mfc1") == 0
- || strcmp (str, "lwc1") == 0
- || strcmp (str, "swc1") == 0
- || strcmp (str, "l.s") == 0
- || strcmp (str, "s.s") == 0
- || strcmp (str, "mftc1") == 0
- || strcmp (str, "mfthc1") == 0
- || strcmp (str, "cftc1") == 0
- || strcmp (str, "mttc1") == 0
- || strcmp (str, "mtthc1") == 0
- || strcmp (str, "cttc1") == 0))
+ && ! mips_oddfpreg_ok (ip->insn_mo, argnum))
as_warn (_("Float register should be even, was %d"),
regno);
@@ -9403,15 +9796,14 @@ do_msbd:
break;
}
new_seg = subseg_new (newname, (subsegT) 0);
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
+ if (IS_ELF)
bfd_set_section_flags (stdoutput, new_seg,
(SEC_ALLOC
| SEC_LOAD
| SEC_READONLY
| SEC_DATA));
frag_align (*args == 'l' ? 2 : 3, 0, 0);
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
- && strcmp (TARGET_OS, "elf") != 0)
+ if (IS_ELF && strcmp (TARGET_OS, "elf") != 0)
record_alignment (new_seg, 4);
else
record_alignment (new_seg, *args == 'l' ? 2 : 3);
@@ -9529,19 +9921,11 @@ do_msbd:
case 'N': /* 3 bit branch condition code */
case 'M': /* 3 bit compare condition code */
- if (strncmp (s, "$fcc", 4) != 0)
+ rtype = RTYPE_CCC;
+ if (ip->insn_mo->pinfo & (FP_D| FP_S))
+ rtype |= RTYPE_FCC;
+ if (!reg_lookup (&s, rtype, &regno))
break;
- s += 4;
- regno = 0;
- do
- {
- regno *= 10;
- regno += *s - '0';
- ++s;
- }
- while (ISDIGIT (*s));
- if (regno > 7)
- as_bad (_("Invalid condition code register $fcc%d"), regno);
if ((strcmp(str + strlen(str) - 3, ".ps") == 0
|| strcmp(str + strlen(str) - 5, "any2f") == 0
|| strcmp(str + strlen(str) - 5, "any2t") == 0)
@@ -9708,8 +10092,38 @@ mips16_ip (char *str, struct mips_cl_insn *ip)
argsstart = s;
for (;;)
{
+ bfd_boolean ok;
+
assert (strcmp (insn->name, str) == 0);
+ if (OPCODE_IS_MEMBER (insn, mips_opts.isa, mips_opts.arch))
+ ok = TRUE;
+ else
+ ok = FALSE;
+
+ if (! ok)
+ {
+ if (insn + 1 < &mips16_opcodes[bfd_mips16_num_opcodes]
+ && strcmp (insn->name, insn[1].name) == 0)
+ {
+ ++insn;
+ continue;
+ }
+ else
+ {
+ if (!insn_error)
+ {
+ static char buf[100];
+ sprintf (buf,
+ _("opcode not supported on this processor: %s (%s)"),
+ mips_cpu_info_from_arch (mips_opts.arch)->name,
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+ insn_error = buf;
+ }
+ return;
+ }
+ }
+
create_insn (ip, insn);
imm_expr.X_op = O_absent;
imm_reloc[0] = BFD_RELOC_UNUSED;
@@ -9822,70 +10236,19 @@ mips16_ip (char *str, struct mips_cl_insn *ip)
case 'R':
case 'X':
case 'Y':
- if (s[0] != '$')
- break;
- s_reset = s;
- if (ISDIGIT (s[1]))
- {
- ++s;
- regno = 0;
- do
- {
- regno *= 10;
- regno += *s - '0';
- ++s;
- }
- while (ISDIGIT (*s));
- if (regno > 31)
- {
- as_bad (_("invalid register number (%d)"), regno);
- regno = 2;
- }
- }
- else
+ s_reset = s;
+ if (!reg_lookup (&s, RTYPE_NUM | RTYPE_GP, &regno))
{
- if (s[1] == 'r' && s[2] == 'a')
- {
- s += 3;
- regno = RA;
- }
- else if (s[1] == 'f' && s[2] == 'p')
- {
- s += 3;
- regno = FP;
- }
- else if (s[1] == 's' && s[2] == 'p')
- {
- s += 3;
- regno = SP;
- }
- else if (s[1] == 'g' && s[2] == 'p')
- {
- s += 3;
- regno = GP;
- }
- else if (s[1] == 'a' && s[2] == 't')
- {
- s += 3;
- regno = AT;
- }
- else if (s[1] == 'k' && s[2] == 't' && s[3] == '0')
- {
- s += 4;
- regno = KT0;
- }
- else if (s[1] == 'k' && s[2] == 't' && s[3] == '1')
- {
- s += 4;
- regno = KT1;
- }
- else if (s[1] == 'z' && s[2] == 'e' && s[3] == 'r' && s[4] == 'o')
+ if (c == 'v' || c == 'w')
{
- s += 5;
- regno = ZERO;
+ if (c == 'v')
+ MIPS16_INSERT_OPERAND (RX, *ip, lastregno);
+ else
+ MIPS16_INSERT_OPERAND (RY, *ip, lastregno);
+ ++args;
+ continue;
}
- else
- break;
+ break;
}
if (*s == ' ')
@@ -10091,29 +10454,18 @@ mips16_ip (char *str, struct mips_cl_insn *ip)
mask = 7 << 3;
while (*s != '\0')
{
- int freg, reg1, reg2;
+ unsigned int freg, reg1, reg2;
while (*s == ' ' || *s == ',')
++s;
- if (*s != '$')
- {
- as_bad (_("can't parse register list"));
- break;
- }
- ++s;
- if (*s != 'f')
+ if (reg_lookup (&s, RTYPE_GP | RTYPE_NUM, &reg1))
freg = 0;
+ else if (reg_lookup (&s, RTYPE_FPU, &reg1))
+ freg = 1;
else
{
- freg = 1;
- ++s;
- }
- reg1 = 0;
- while (ISDIGIT (*s))
- {
- reg1 *= 10;
- reg1 += *s - '0';
- ++s;
+ as_bad (_("can't parse register list"));
+ break;
}
if (*s == ' ')
++s;
@@ -10122,25 +10474,11 @@ mips16_ip (char *str, struct mips_cl_insn *ip)
else
{
++s;
- if (*s != '$')
- break;
- ++s;
- if (freg)
- {
- if (*s == 'f')
- ++s;
- else
- {
- as_bad (_("invalid register list"));
- break;
- }
- }
- reg2 = 0;
- while (ISDIGIT (*s))
+ if (!reg_lookup (&s, freg ? RTYPE_FPU
+ : (RTYPE_GP | RTYPE_NUM), &reg2))
{
- reg2 *= 10;
- reg2 += *s - '0';
- ++s;
+ as_bad (_("invalid register list"));
+ break;
}
}
if (freg && reg1 == 0 && reg2 == 0 && c == 'L')
@@ -10205,46 +10543,33 @@ mips16_ip (char *str, struct mips_cl_insn *ip)
continue;
}
- if (*s != '$')
+ if (! reg_lookup (&s, RTYPE_GP | RTYPE_NUM, &reg1))
{
as_bad (_("can't parse register list"));
break;
}
- ++s;
- reg1 = 0;
- while (ISDIGIT (*s))
- {
- reg1 *= 10;
- reg1 += *s - '0';
- ++s;
- }
- SKIP_SPACE_TABS (s);
+ while (*s == ' ')
+ ++s;
+
if (*s != '-')
reg2 = reg1;
else
{
++s;
- if (*s != '$')
+ if (! reg_lookup (&s, RTYPE_GP | RTYPE_NUM, &reg2)
+ || reg2 < reg1)
{
as_bad (_("can't parse register list"));
break;
}
- ++s;
- reg2 = 0;
- while (ISDIGIT (*s))
- {
- reg2 *= 10;
- reg2 += *s - '0';
- ++s;
- }
}
while (reg1 <= reg2)
{
if (reg1 >= 4 && reg1 <= 7)
{
- if (c == 'm' && !seen_framesz)
+ if (!seen_framesz)
/* args $a0-$a3 */
args |= 1 << (reg1 - 4);
else
@@ -10456,7 +10781,7 @@ mips16_immed (char *file, unsigned int line, int type, offsetT val,
unsigned long *insn, bfd_boolean *use_extend,
unsigned short *extend)
{
- register const struct mips16_immed_operand *op;
+ const struct mips16_immed_operand *op;
int mintiny, maxtiny;
bfd_boolean needext;
@@ -10866,9 +11191,17 @@ struct option md_longopts[] =
{"mmt", no_argument, NULL, OPTION_MT},
#define OPTION_NO_MT (OPTION_ASE_BASE + 9)
{"mno-mt", no_argument, NULL, OPTION_NO_MT},
+#define OPTION_SMARTMIPS (OPTION_ASE_BASE + 10)
+ {"msmartmips", no_argument, NULL, OPTION_SMARTMIPS},
+#define OPTION_NO_SMARTMIPS (OPTION_ASE_BASE + 11)
+ {"mno-smartmips", no_argument, NULL, OPTION_NO_SMARTMIPS},
+#define OPTION_DSPR2 (OPTION_ASE_BASE + 12)
+ {"mdspr2", no_argument, NULL, OPTION_DSPR2},
+#define OPTION_NO_DSPR2 (OPTION_ASE_BASE + 13)
+ {"mno-dspr2", no_argument, NULL, OPTION_NO_DSPR2},
/* Old-style architecture options. Don't add more of these. */
-#define OPTION_COMPAT_ARCH_BASE (OPTION_ASE_BASE + 10)
+#define OPTION_COMPAT_ARCH_BASE (OPTION_ASE_BASE + 14)
#define OPTION_M4650 (OPTION_COMPAT_ARCH_BASE + 0)
{"m4650", no_argument, NULL, OPTION_M4650},
#define OPTION_NO_M4650 (OPTION_COMPAT_ARCH_BASE + 1)
@@ -11046,7 +11379,7 @@ md_parse_option (int c, char *arg)
break;
case 'O':
- if (arg && arg[1] == '0')
+ if (arg && arg[0] == '0')
mips_optimize = 1;
else
mips_optimize = 2;
@@ -11057,11 +11390,6 @@ md_parse_option (int c, char *arg)
mips_debug = 2;
else
mips_debug = atoi (arg);
- /* When the MIPS assembler sees -g or -g2, it does not do
- optimizations which limit full symbolic debugging. We take
- that to be equivalent to -O0. */
- if (mips_debug == 2)
- mips_optimize = 1;
break;
case OPTION_MIPS1:
@@ -11150,10 +11478,22 @@ md_parse_option (int c, char *arg)
case OPTION_DSP:
mips_opts.ase_dsp = 1;
+ mips_opts.ase_dspr2 = 0;
break;
case OPTION_NO_DSP:
mips_opts.ase_dsp = 0;
+ mips_opts.ase_dspr2 = 0;
+ break;
+
+ case OPTION_DSPR2:
+ mips_opts.ase_dspr2 = 1;
+ mips_opts.ase_dsp = 1;
+ break;
+
+ case OPTION_NO_DSPR2:
+ mips_opts.ase_dspr2 = 0;
+ mips_opts.ase_dsp = 0;
break;
case OPTION_MT:
@@ -11182,6 +11522,14 @@ md_parse_option (int c, char *arg)
mips_opts.ase_mips3d = 0;
break;
+ case OPTION_SMARTMIPS:
+ mips_opts.ase_smartmips = 1;
+ break;
+
+ case OPTION_NO_SMARTMIPS:
+ mips_opts.ase_smartmips = 0;
+ break;
+
case OPTION_FIX_VR4120:
mips_fix_vr4120 = 1;
break;
@@ -11227,7 +11575,7 @@ md_parse_option (int c, char *arg)
select SVR4_PIC, and -non_shared to select no PIC. This is
intended to be compatible with Irix 5. */
case OPTION_CALL_SHARED:
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
{
as_bad (_("-call_shared is supported only for ELF format"));
return 0;
@@ -11237,7 +11585,7 @@ md_parse_option (int c, char *arg)
break;
case OPTION_NON_SHARED:
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
{
as_bad (_("-non_shared is supported only for ELF format"));
return 0;
@@ -11263,7 +11611,7 @@ md_parse_option (int c, char *arg)
/* The -32, -n32 and -64 options are shortcuts for -mabi=32, -mabi=n32
and -mabi=64. */
case OPTION_32:
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
{
as_bad (_("-32 is supported for ELF format only"));
return 0;
@@ -11272,7 +11620,7 @@ md_parse_option (int c, char *arg)
break;
case OPTION_N32:
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
{
as_bad (_("-n32 is supported for ELF format only"));
return 0;
@@ -11281,13 +11629,13 @@ md_parse_option (int c, char *arg)
break;
case OPTION_64:
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
{
as_bad (_("-64 is supported for ELF format only"));
return 0;
}
mips_abi = N64_ABI;
- if (! support_64bit_objects())
+ if (!support_64bit_objects())
as_fatal (_("No compiled in support for 64 bit object file format"));
break;
#endif /* OBJ_ELF */
@@ -11310,7 +11658,7 @@ md_parse_option (int c, char *arg)
#ifdef OBJ_ELF
case OPTION_MABI:
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
{
as_bad (_("-mabi is supported for ELF format only"));
return 0;
@@ -11482,14 +11830,43 @@ mips_after_parse_args (void)
|| !ISA_HAS_64BIT_REGS (mips_opts.isa));
}
- /* ??? GAS treats single-float processors as though they had 64-bit
- float registers (although it complains when double-precision
- instructions are used). As things stand, saying they have 32-bit
- registers would lead to spurious "register must be even" messages.
- So here we assume float registers are always the same size as
- integer ones, unless the user says otherwise. */
- if (file_mips_fp32 < 0)
- file_mips_fp32 = file_mips_gp32;
+ switch (file_mips_fp32)
+ {
+ default:
+ case -1:
+ /* No user specified float register size.
+ ??? GAS treats single-float processors as though they had 64-bit
+ float registers (although it complains when double-precision
+ instructions are used). As things stand, saying they have 32-bit
+ registers would lead to spurious "register must be even" messages.
+ So here we assume float registers are never smaller than the
+ integer ones. */
+ if (file_mips_gp32 == 0)
+ /* 64-bit integer registers implies 64-bit float registers. */
+ file_mips_fp32 = 0;
+ else if ((mips_opts.ase_mips3d > 0 || mips_opts.ase_mdmx > 0)
+ && ISA_HAS_64BIT_FPRS (mips_opts.isa))
+ /* -mips3d and -mdmx imply 64-bit float registers, if possible. */
+ file_mips_fp32 = 0;
+ else
+ /* 32-bit float registers. */
+ file_mips_fp32 = 1;
+ break;
+
+ /* The user specified the size of the float registers. Check if it
+ agrees with the ABI and ISA. */
+ case 0:
+ if (!ISA_HAS_64BIT_FPRS (mips_opts.isa))
+ as_bad (_("-mfp64 used with a 32-bit fpu"));
+ else if (ABI_NEEDS_32BIT_REGS (mips_abi)
+ && !ISA_HAS_MXHC1 (mips_opts.isa))
+ as_warn (_("-mfp64 used with a 32-bit ABI"));
+ break;
+ case 1:
+ if (ABI_NEEDS_64BIT_REGS (mips_abi))
+ as_warn (_("-mfp32 used with a 64-bit ABI"));
+ break;
+ }
/* End of GCC-shared inference code. */
@@ -11508,19 +11885,51 @@ mips_after_parse_args (void)
if (mips_opts.mips16 == -1)
mips_opts.mips16 = (CPU_HAS_MIPS16 (file_mips_arch)) ? 1 : 0;
if (mips_opts.ase_mips3d == -1)
- mips_opts.ase_mips3d = (CPU_HAS_MIPS3D (file_mips_arch)) ? 1 : 0;
+ mips_opts.ase_mips3d = ((arch_info->flags & MIPS_CPU_ASE_MIPS3D)
+ && file_mips_fp32 == 0) ? 1 : 0;
+ if (mips_opts.ase_mips3d && file_mips_fp32 == 1)
+ as_bad (_("-mfp32 used with -mips3d"));
+
if (mips_opts.ase_mdmx == -1)
- mips_opts.ase_mdmx = (CPU_HAS_MDMX (file_mips_arch)) ? 1 : 0;
+ mips_opts.ase_mdmx = ((arch_info->flags & MIPS_CPU_ASE_MDMX)
+ && file_mips_fp32 == 0) ? 1 : 0;
+ if (mips_opts.ase_mdmx && file_mips_fp32 == 1)
+ as_bad (_("-mfp32 used with -mdmx"));
+
+ if (mips_opts.ase_smartmips == -1)
+ mips_opts.ase_smartmips = (arch_info->flags & MIPS_CPU_ASE_SMARTMIPS) ? 1 : 0;
+ if (mips_opts.ase_smartmips && !ISA_SUPPORTS_SMARTMIPS)
+ as_warn ("%s ISA does not support SmartMIPS",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+
if (mips_opts.ase_dsp == -1)
- mips_opts.ase_dsp = (CPU_HAS_DSP (file_mips_arch)) ? 1 : 0;
+ mips_opts.ase_dsp = (arch_info->flags & MIPS_CPU_ASE_DSP) ? 1 : 0;
+ if (mips_opts.ase_dsp && !ISA_SUPPORTS_DSP_ASE)
+ as_warn ("%s ISA does not support DSP ASE",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+
+ if (mips_opts.ase_dspr2 == -1)
+ {
+ mips_opts.ase_dspr2 = (arch_info->flags & MIPS_CPU_ASE_DSPR2) ? 1 : 0;
+ mips_opts.ase_dsp = (arch_info->flags & MIPS_CPU_ASE_DSP) ? 1 : 0;
+ }
+ if (mips_opts.ase_dspr2 && !ISA_SUPPORTS_DSPR2_ASE)
+ as_warn ("%s ISA does not support DSP R2 ASE",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+
if (mips_opts.ase_mt == -1)
- mips_opts.ase_mt = (CPU_HAS_MT (file_mips_arch)) ? 1 : 0;
+ mips_opts.ase_mt = (arch_info->flags & MIPS_CPU_ASE_MT) ? 1 : 0;
+ if (mips_opts.ase_mt && !ISA_SUPPORTS_MT_ASE)
+ as_warn ("%s ISA does not support MT ASE",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
file_mips_isa = mips_opts.isa;
file_ase_mips16 = mips_opts.mips16;
file_ase_mips3d = mips_opts.ase_mips3d;
file_ase_mdmx = mips_opts.ase_mdmx;
+ file_ase_smartmips = mips_opts.ase_smartmips;
file_ase_dsp = mips_opts.ase_dsp;
+ file_ase_dspr2 = mips_opts.ase_dspr2;
file_ase_mt = mips_opts.ase_mt;
mips_opts.gp32 = file_mips_gp32;
mips_opts.fp32 = file_mips_fp32;
@@ -11555,6 +11964,10 @@ md_pcrel_from (fixS *fixP)
/* Return the address of the delay slot. */
return addr + 4;
default:
+ /* We have no relocation type for PC relative MIPS16 instructions. */
+ if (fixP->fx_addsy && S_GET_SEGMENT (fixP->fx_addsy) != now_seg)
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("PC relative MIPS16 instruction references a different section"));
return addr;
}
}
@@ -11737,11 +12150,12 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
|| fixP->fx_r_type == BFD_RELOC_CTOR
|| fixP->fx_r_type == BFD_RELOC_MIPS_SUB
|| fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
- || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY);
+ || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY
+ || fixP->fx_r_type == BFD_RELOC_MIPS_TLS_DTPREL64);
buf = (bfd_byte *) (fixP->fx_frag->fr_literal + fixP->fx_where);
- assert (! fixP->fx_pcrel || fixP->fx_r_type == BFD_RELOC_16_PCREL_S2);
+ assert (!fixP->fx_pcrel || fixP->fx_r_type == BFD_RELOC_16_PCREL_S2);
/* Don't treat parts of a composite relocation as done. There are two
reasons for this:
@@ -11753,13 +12167,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
constants. The easiest way of dealing with the pathological
exceptions is to generate a relocation against STN_UNDEF and
leave everything up to the linker. */
- if (fixP->fx_addsy == NULL && ! fixP->fx_pcrel && fixP->fx_tcbit == 0)
+ if (fixP->fx_addsy == NULL && !fixP->fx_pcrel && fixP->fx_tcbit == 0)
fixP->fx_done = 1;
switch (fixP->fx_r_type)
{
case BFD_RELOC_MIPS_TLS_GD:
case BFD_RELOC_MIPS_TLS_LDM:
+ case BFD_RELOC_MIPS_TLS_DTPREL32:
+ case BFD_RELOC_MIPS_TLS_DTPREL64:
case BFD_RELOC_MIPS_TLS_DTPREL_HI16:
case BFD_RELOC_MIPS_TLS_DTPREL_LO16:
case BFD_RELOC_MIPS_TLS_GOTTPREL:
@@ -11798,14 +12214,8 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
case BFD_RELOC_MIPS16_GPREL:
case BFD_RELOC_MIPS16_HI16:
case BFD_RELOC_MIPS16_HI16_S:
- /* Nothing needed to do. The value comes from the reloc entry */
- break;
-
case BFD_RELOC_MIPS16_JMP:
- /* We currently always generate a reloc against a symbol, which
- means that we don't want an addend even if the symbol is
- defined. */
- *valP = 0;
+ /* Nothing needed to do. The value comes from the reloc entry. */
break;
case BFD_RELOC_64:
@@ -11833,18 +12243,12 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
case BFD_RELOC_RVA:
case BFD_RELOC_32:
- /* If we are deleting this reloc entry, we must fill in the
- value now. This can happen if we have a .word which is not
- resolved when it appears but is later defined. */
- if (fixP->fx_done)
- md_number_to_chars ((char *) buf, *valP, 4);
- break;
-
case BFD_RELOC_16:
/* If we are deleting this reloc entry, we must fill in the
- value now. */
+ value now. This can happen if we have a .word which is not
+ resolved when it appears but is later defined. */
if (fixP->fx_done)
- md_number_to_chars ((char *) buf, *valP, 2);
+ md_number_to_chars ((char *) buf, *valP, fixP->fx_size);
break;
case BFD_RELOC_LO16:
@@ -11869,15 +12273,13 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("Branch to misaligned address (%lx)"), (long) *valP);
- /*
- * We need to save the bits in the instruction since fixup_segment()
- * might be deleting the relocation entry (i.e., a branch within
- * the current segment).
- */
+ /* We need to save the bits in the instruction since fixup_segment()
+ might be deleting the relocation entry (i.e., a branch within
+ the current segment). */
if (! fixP->fx_done)
break;
- /* update old instruction data */
+ /* Update old instruction data. */
if (target_big_endian)
insn = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
else
@@ -11977,21 +12379,17 @@ mips_align (int to, int fill, symbolS *label)
static void
s_align (int x ATTRIBUTE_UNUSED)
{
- register int temp;
- register long temp_fill;
+ int temp;
+ long temp_fill;
long max_alignment = 15;
- /*
-
- o Note that the assembler pulls down any immediately preceding label
+ /* o Note that the assembler pulls down any immediately preceding label
to the aligned address.
- o It's not documented but auto alignment is reinstated by
+ o It's not documented but auto alignment is reinstated by
a .align pseudo instruction.
- o Note also that after auto alignment is turned off the mips assembler
+ o Note also that after auto alignment is turned off the mips assembler
issues an error on attempt to assemble an improperly aligned data item.
- We don't.
-
- */
+ We don't. */
temp = get_absolute_expression ();
if (temp > max_alignment)
@@ -12010,9 +12408,11 @@ s_align (int x ATTRIBUTE_UNUSED)
temp_fill = 0;
if (temp)
{
+ segment_info_type *si = seg_info (now_seg);
+ struct insn_label_list *l = si->label_list;
+ /* Auto alignment should be switched on by next section change. */
auto_align = 1;
- mips_align (temp, (int) temp_fill,
- insn_labels != NULL ? insn_labels->label : NULL);
+ mips_align (temp, (int) temp_fill, l != NULL ? l->label : NULL);
}
else
{
@@ -12034,7 +12434,8 @@ s_change_sec (int sec)
as it would not be appropriate to use it in the section changing
functions in read.c, since obj-elf.c intercepts those. FIXME:
This should be cleaner, somehow. */
- obj_elf_section_change_hook ();
+ if (IS_ELF)
+ obj_elf_section_change_hook ();
#endif
mips_emit_delays ();
@@ -12054,7 +12455,7 @@ s_change_sec (int sec)
case 'r':
seg = subseg_new (RDATA_SECTION_NAME,
(subsegT) get_absolute_expression ());
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
+ if (IS_ELF)
{
bfd_set_section_flags (stdoutput, seg, (SEC_ALLOC | SEC_LOAD
| SEC_READONLY | SEC_RELOC
@@ -12067,7 +12468,7 @@ s_change_sec (int sec)
case 's':
seg = subseg_new (".sdata", (subsegT) get_absolute_expression ());
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour)
+ if (IS_ELF)
{
bfd_set_section_flags (stdoutput, seg,
SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA);
@@ -12093,7 +12494,7 @@ s_change_section (int ignore ATTRIBUTE_UNUSED)
int section_entry_size;
int section_alignment;
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
return;
section_name = input_line_pointer;
@@ -12138,7 +12539,7 @@ s_change_section (int ignore ATTRIBUTE_UNUSED)
There's nothing really harmful in this, since bfd will correct
SHT_PROGBITS to SHT_MIPS_DWARF before writing out the file. But it
- means that, for backwards compatibiltiy, the special_section entries
+ means that, for backwards compatibility, the special_section entries
for dwarf sections must use SHT_PROGBITS rather than SHT_MIPS_DWARF.
Even so, we shouldn't force users of the MIPS .section syntax to
@@ -12165,9 +12566,11 @@ mips_enable_auto_align (void)
static void
s_cons (int log_size)
{
+ segment_info_type *si = seg_info (now_seg);
+ struct insn_label_list *l = si->label_list;
symbolS *label;
- label = insn_labels != NULL ? insn_labels->label : NULL;
+ label = l != NULL ? l->label : NULL;
mips_emit_delays ();
if (log_size > 0 && auto_align)
mips_align (log_size, 0, label);
@@ -12178,9 +12581,11 @@ s_cons (int log_size)
static void
s_float_cons (int type)
{
+ segment_info_type *si = seg_info (now_seg);
+ struct insn_label_list *l = si->label_list;
symbolS *label;
- label = insn_labels != NULL ? insn_labels->label : NULL;
+ label = l != NULL ? l->label : NULL;
mips_emit_delays ();
@@ -12367,12 +12772,43 @@ s_mipsset (int x ATTRIBUTE_UNUSED)
{
mips_opts.nobopt = 1;
}
+ else if (strcmp (name, "gp=default") == 0)
+ mips_opts.gp32 = file_mips_gp32;
+ else if (strcmp (name, "gp=32") == 0)
+ mips_opts.gp32 = 1;
+ else if (strcmp (name, "gp=64") == 0)
+ {
+ if (!ISA_HAS_64BIT_REGS (mips_opts.isa))
+ as_warn ("%s isa does not support 64-bit registers",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+ mips_opts.gp32 = 0;
+ }
+ else if (strcmp (name, "fp=default") == 0)
+ mips_opts.fp32 = file_mips_fp32;
+ else if (strcmp (name, "fp=32") == 0)
+ mips_opts.fp32 = 1;
+ else if (strcmp (name, "fp=64") == 0)
+ {
+ if (!ISA_HAS_64BIT_FPRS (mips_opts.isa))
+ as_warn ("%s isa does not support 64-bit floating point registers",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+ mips_opts.fp32 = 0;
+ }
else if (strcmp (name, "mips16") == 0
|| strcmp (name, "MIPS-16") == 0)
mips_opts.mips16 = 1;
else if (strcmp (name, "nomips16") == 0
|| strcmp (name, "noMIPS-16") == 0)
mips_opts.mips16 = 0;
+ else if (strcmp (name, "smartmips") == 0)
+ {
+ if (!ISA_SUPPORTS_SMARTMIPS)
+ as_warn ("%s ISA does not support SmartMIPS ASE",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+ mips_opts.ase_smartmips = 1;
+ }
+ else if (strcmp (name, "nosmartmips") == 0)
+ mips_opts.ase_smartmips = 0;
else if (strcmp (name, "mips3d") == 0)
mips_opts.ase_mips3d = 1;
else if (strcmp (name, "nomips3d") == 0)
@@ -12382,11 +12818,38 @@ s_mipsset (int x ATTRIBUTE_UNUSED)
else if (strcmp (name, "nomdmx") == 0)
mips_opts.ase_mdmx = 0;
else if (strcmp (name, "dsp") == 0)
- mips_opts.ase_dsp = 1;
+ {
+ if (!ISA_SUPPORTS_DSP_ASE)
+ as_warn ("%s ISA does not support DSP ASE",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+ mips_opts.ase_dsp = 1;
+ mips_opts.ase_dspr2 = 0;
+ }
else if (strcmp (name, "nodsp") == 0)
- mips_opts.ase_dsp = 0;
+ {
+ mips_opts.ase_dsp = 0;
+ mips_opts.ase_dspr2 = 0;
+ }
+ else if (strcmp (name, "dspr2") == 0)
+ {
+ if (!ISA_SUPPORTS_DSPR2_ASE)
+ as_warn ("%s ISA does not support DSP R2 ASE",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+ mips_opts.ase_dspr2 = 1;
+ mips_opts.ase_dsp = 1;
+ }
+ else if (strcmp (name, "nodspr2") == 0)
+ {
+ mips_opts.ase_dspr2 = 0;
+ mips_opts.ase_dsp = 0;
+ }
else if (strcmp (name, "mt") == 0)
- mips_opts.ase_mt = 1;
+ {
+ if (!ISA_SUPPORTS_MT_ASE)
+ as_warn ("%s ISA does not support MT ASE",
+ mips_cpu_info_from_isa (mips_opts.isa)->name);
+ mips_opts.ase_mt = 1;
+ }
else if (strcmp (name, "nomt") == 0)
mips_opts.ase_mt = 0;
else if (strncmp (name, "mips", 4) == 0 || strncmp (name, "arch=", 5) == 0)
@@ -12497,6 +12960,14 @@ s_mipsset (int x ATTRIBUTE_UNUSED)
mips_opts.sym32 = TRUE;
else if (strcmp (name, "nosym32") == 0)
mips_opts.sym32 = FALSE;
+ else if (strchr (name, ','))
+ {
+ /* Generic ".set" directive; use the generic handler. */
+ *input_line_pointer = ch;
+ input_line_pointer = name;
+ s_set (0);
+ return;
+ }
else
{
as_warn (_("Tried to set unrecognized symbol: %s\n"), name);
@@ -12604,8 +13075,7 @@ s_cpload (int ignore ATTRIBUTE_UNUSED)
The -mno-shared option replaces the last three instructions with
lui $gp,%hi(_gp)
- addiu $gp,$gp,%lo(_gp)
- */
+ addiu $gp,$gp,%lo(_gp) */
static void
s_cpsetup (int ignore ATTRIBUTE_UNUSED)
@@ -12707,7 +13177,7 @@ static void
s_cplocal (int ignore ATTRIBUTE_UNUSED)
{
/* If we are not generating SVR4 PIC code, or if this is not NewABI code,
- .cplocal is ignored. */
+ .cplocal is ignored. */
if (mips_pic != SVR4_PIC || ! HAVE_NEWABI)
{
s_ignore (0);
@@ -12756,8 +13226,8 @@ s_cprestore (int ignore ATTRIBUTE_UNUSED)
ld $gp, offset($sp)
If a register $reg2 was given there, it results in:
- daddu $gp, $reg2, $0
- */
+ daddu $gp, $reg2, $0 */
+
static void
s_cpreturn (int ignore ATTRIBUTE_UNUSED)
{
@@ -12789,6 +13259,52 @@ s_cpreturn (int ignore ATTRIBUTE_UNUSED)
demand_empty_rest_of_line ();
}
+/* Handle the .dtprelword and .dtpreldword pseudo-ops. They generate
+ a 32-bit or 64-bit DTP-relative relocation (BYTES says which) for
+ use in DWARF debug information. */
+
+static void
+s_dtprel_internal (size_t bytes)
+{
+ expressionS ex;
+ char *p;
+
+ expression (&ex);
+
+ if (ex.X_op != O_symbol)
+ {
+ as_bad (_("Unsupported use of %s"), (bytes == 8
+ ? ".dtpreldword"
+ : ".dtprelword"));
+ ignore_rest_of_line ();
+ }
+
+ p = frag_more (bytes);
+ md_number_to_chars (p, 0, bytes);
+ fix_new_exp (frag_now, p - frag_now->fr_literal, bytes, &ex, FALSE,
+ (bytes == 8
+ ? BFD_RELOC_MIPS_TLS_DTPREL64
+ : BFD_RELOC_MIPS_TLS_DTPREL32));
+
+ demand_empty_rest_of_line ();
+}
+
+/* Handle .dtprelword. */
+
+static void
+s_dtprelword (int ignore ATTRIBUTE_UNUSED)
+{
+ s_dtprel_internal (4);
+}
+
+/* Handle .dtpreldword. */
+
+static void
+s_dtpreldword (int ignore ATTRIBUTE_UNUSED)
+{
+ s_dtprel_internal (8);
+}
+
/* Handle the .gpvalue pseudo-op. This is used when generating NewABI PIC
code. It sets the offset to use in gp_rel relocations. */
@@ -12814,6 +13330,8 @@ s_gpvalue (int ignore ATTRIBUTE_UNUSED)
static void
s_gpword (int ignore ATTRIBUTE_UNUSED)
{
+ segment_info_type *si;
+ struct insn_label_list *l;
symbolS *label;
expressionS ex;
char *p;
@@ -12825,7 +13343,9 @@ s_gpword (int ignore ATTRIBUTE_UNUSED)
return;
}
- label = insn_labels != NULL ? insn_labels->label : NULL;
+ si = seg_info (now_seg);
+ l = si->label_list;
+ label = l != NULL ? l->label : NULL;
mips_emit_delays ();
if (auto_align)
mips_align (2, 0, label);
@@ -12850,6 +13370,8 @@ s_gpword (int ignore ATTRIBUTE_UNUSED)
static void
s_gpdword (int ignore ATTRIBUTE_UNUSED)
{
+ segment_info_type *si;
+ struct insn_label_list *l;
symbolS *label;
expressionS ex;
char *p;
@@ -12861,7 +13383,9 @@ s_gpdword (int ignore ATTRIBUTE_UNUSED)
return;
}
- label = insn_labels != NULL ? insn_labels->label : NULL;
+ si = seg_info (now_seg);
+ l = si->label_list;
+ label = l != NULL ? l->label : NULL;
mips_emit_delays ();
if (auto_align)
mips_align (3, 0, label);
@@ -12943,8 +13467,7 @@ s_mips_stab (int type)
s_stab (type);
}
-/* Handle the .weakext pseudo-op as defined in Kane and Heinrich.
- */
+/* Handle the .weakext pseudo-op as defined in Kane and Heinrich. */
static void
s_mips_weakext (int ignore ATTRIBUTE_UNUSED)
@@ -12998,73 +13521,11 @@ s_mips_weakext (int ignore ATTRIBUTE_UNUSED)
int
tc_get_register (int frame)
{
- int reg;
+ unsigned int reg;
SKIP_WHITESPACE ();
- if (*input_line_pointer++ != '$')
- {
- as_warn (_("expected `$'"));
- reg = ZERO;
- }
- else if (ISDIGIT (*input_line_pointer))
- {
- reg = get_absolute_expression ();
- if (reg < 0 || reg >= 32)
- {
- as_warn (_("Bad register number"));
- reg = ZERO;
- }
- }
- else
- {
- if (strncmp (input_line_pointer, "ra", 2) == 0)
- {
- reg = RA;
- input_line_pointer += 2;
- }
- else if (strncmp (input_line_pointer, "fp", 2) == 0)
- {
- reg = FP;
- input_line_pointer += 2;
- }
- else if (strncmp (input_line_pointer, "sp", 2) == 0)
- {
- reg = SP;
- input_line_pointer += 2;
- }
- else if (strncmp (input_line_pointer, "gp", 2) == 0)
- {
- reg = GP;
- input_line_pointer += 2;
- }
- else if (strncmp (input_line_pointer, "at", 2) == 0)
- {
- reg = AT;
- input_line_pointer += 2;
- }
- else if (strncmp (input_line_pointer, "kt0", 3) == 0)
- {
- reg = KT0;
- input_line_pointer += 3;
- }
- else if (strncmp (input_line_pointer, "kt1", 3) == 0)
- {
- reg = KT1;
- input_line_pointer += 3;
- }
- else if (strncmp (input_line_pointer, "zero", 4) == 0)
- {
- reg = ZERO;
- input_line_pointer += 4;
- }
- else
- {
- as_warn (_("Unrecognized register name"));
- reg = ZERO;
- while (ISALNUM(*input_line_pointer))
- input_line_pointer++;
- }
- }
+ if (! reg_lookup (&input_line_pointer, RWARN | RTYPE_NUM | RTYPE_GP, &reg))
+ reg = 0;
if (frame)
{
mips_frame_reg = reg != 0 ? reg : SP;
@@ -13079,16 +13540,17 @@ md_section_align (asection *seg, valueT addr)
{
int align = bfd_get_section_alignment (stdoutput, seg);
-#ifdef OBJ_ELF
- /* We don't need to align ELF sections to the full alignment.
- However, Irix 5 may prefer that we align them at least to a 16
- byte boundary. We don't bother to align the sections if we are
- targeted for an embedded system. */
- if (strcmp (TARGET_OS, "elf") == 0)
- return addr;
- if (align > 4)
- align = 4;
-#endif
+ if (IS_ELF)
+ {
+ /* We don't need to align ELF sections to the full alignment.
+ However, Irix 5 may prefer that we align them at least to a 16
+ byte boundary. We don't bother to align the sections if we
+ are targeted for an embedded system. */
+ if (strcmp (TARGET_OS, "elf") == 0)
+ return addr;
+ if (align > 4)
+ align = 4;
+ }
return ((addr + (1 << align) - 1) & (-1 << align));
}
@@ -13154,6 +13616,8 @@ nopic_need_relax (symbolS *sym, int before_relaxing)
change = (strcmp (segname, ".sdata") != 0
&& strcmp (segname, ".sbss") != 0
&& strncmp (segname, ".sdata.", 7) != 0
+ && strncmp (segname, ".sbss.", 6) != 0
+ && strncmp (segname, ".gnu.linkonce.sb.", 17) != 0
&& strncmp (segname, ".gnu.linkonce.s.", 16) != 0);
}
return change;
@@ -13170,48 +13634,32 @@ static bfd_boolean
pic_need_relax (symbolS *sym, asection *segtype)
{
asection *symsec;
- bfd_boolean linkonce;
/* Handle the case of a symbol equated to another symbol. */
while (symbol_equated_reloc_p (sym))
{
symbolS *n;
- /* It's possible to get a loop here in a badly written
- program. */
+ /* It's possible to get a loop here in a badly written program. */
n = symbol_get_value_expression (sym)->X_add_symbol;
if (n == sym)
break;
sym = n;
}
- symsec = S_GET_SEGMENT (sym);
-
- /* duplicate the test for LINK_ONCE sections as in adjust_reloc_syms */
- linkonce = FALSE;
- if (symsec != segtype && ! S_IS_LOCAL (sym))
- {
- if ((bfd_get_section_flags (stdoutput, symsec) & SEC_LINK_ONCE)
- != 0)
- linkonce = TRUE;
+ if (symbol_section_p (sym))
+ return TRUE;
- /* The GNU toolchain uses an extension for ELF: a section
- beginning with the magic string .gnu.linkonce is a linkonce
- section. */
- if (strncmp (segment_name (symsec), ".gnu.linkonce",
- sizeof ".gnu.linkonce" - 1) == 0)
- linkonce = TRUE;
- }
+ symsec = S_GET_SEGMENT (sym);
/* This must duplicate the test in adjust_reloc_syms. */
return (symsec != &bfd_und_section
&& symsec != &bfd_abs_section
- && ! bfd_is_com_section (symsec)
- && !linkonce
+ && !bfd_is_com_section (symsec)
+ && !s_is_linkonce (sym, segtype)
#ifdef OBJ_ELF
/* A global or weak symbol is treated as external. */
- && (OUTPUT_FLAVOR != bfd_target_elf_flavour
- || (! S_IS_WEAK (sym) && ! S_IS_EXTERNAL (sym)))
+ && (!IS_ELF || (! S_IS_WEAK (sym) && ! S_IS_EXTERNAL (sym)))
#endif
);
}
@@ -13224,7 +13672,7 @@ static int
mips16_extended_frag (fragS *fragp, asection *sec, long stretch)
{
int type;
- register const struct mips16_immed_operand *op;
+ const struct mips16_immed_operand *op;
offsetT val;
int mintiny, maxtiny;
segT symsec;
@@ -13527,11 +13975,6 @@ md_estimate_size_before_relax (fragS *fragp, asection *segtype)
int
mips_fix_adjustable (fixS *fixp)
{
- /* Don't adjust MIPS16 jump relocations, so we don't have to worry
- about the format of the offset in the .o file. */
- if (fixp->fx_r_type == BFD_RELOC_MIPS16_JMP)
- return 0;
-
if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
|| fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
return 0;
@@ -13561,11 +14004,50 @@ mips_fix_adjustable (fixS *fixp)
return 0;
#ifdef OBJ_ELF
- /* Don't adjust relocations against mips16 symbols, so that the linker
- can find them if it needs to set up a stub. */
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour
- && S_GET_OTHER (fixp->fx_addsy) == STO_MIPS16
- && fixp->fx_subsy == NULL)
+ /* R_MIPS16_26 relocations against non-MIPS16 functions might resolve
+ to a floating-point stub. The same is true for non-R_MIPS16_26
+ relocations against MIPS16 functions; in this case, the stub becomes
+ the function's canonical address.
+
+ Floating-point stubs are stored in unique .mips16.call.* or
+ .mips16.fn.* sections. If a stub T for function F is in section S,
+ the first relocation in section S must be against F; this is how the
+ linker determines the target function. All relocations that might
+ resolve to T must also be against F. We therefore have the following
+ restrictions, which are given in an intentionally-redundant way:
+
+ 1. We cannot reduce R_MIPS16_26 relocations against non-MIPS16
+ symbols.
+
+ 2. We cannot reduce a stub's relocations against non-MIPS16 symbols
+ if that stub might be used.
+
+ 3. We cannot reduce non-R_MIPS16_26 relocations against MIPS16
+ symbols.
+
+ 4. We cannot reduce a stub's relocations against MIPS16 symbols if
+ that stub might be used.
+
+ There is a further restriction:
+
+ 5. We cannot reduce R_MIPS16_26 relocations against MIPS16 symbols
+ on targets with in-place addends; the relocation field cannot
+ encode the low bit.
+
+ For simplicity, we deal with (3)-(5) by not reducing _any_ relocation
+ against a MIPS16 symbol.
+
+ We deal with (1)-(2) by saying that, if there's a R_MIPS16_26
+ relocation against some symbol R, no relocation against R may be
+ reduced. (Note that this deals with (2) as well as (1) because
+ relocations against global symbols will never be reduced on ELF
+ targets.) This approach is a little simpler than trying to detect
+ stub sections, and gives the "all or nothing" per-symbol consistency
+ that we have for MIPS16 symbols. */
+ if (IS_ELF
+ && fixp->fx_subsy == NULL
+ && (S_GET_OTHER (fixp->fx_addsy) == STO_MIPS16
+ || *symbol_get_tc (fixp->fx_addsy)))
return 0;
#endif
@@ -13595,7 +14077,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
/* At this point, fx_addnumber is "symbol offset - pcrel address".
Relocations want only the symbol offset. */
reloc->addend = fixp->fx_addnumber + reloc->address;
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
{
/* A gruesome hack which is a result of the gruesome gas
reloc handling. What's worse, for COFF (as opposed to
@@ -13694,7 +14176,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
exp.X_add_number = fragp->fr_offset;
fixp = fix_new_exp (fragp, buf - (bfd_byte *)fragp->fr_literal,
- 4, &exp, 1, BFD_RELOC_16_PCREL_S2);
+ 4, &exp, TRUE, BFD_RELOC_16_PCREL_S2);
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
@@ -13726,14 +14208,14 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
case 0:
/* bltz 0x04000000 bgez 0x04010000
- bltzal 0x04100000 bgezal 0x04110000 */
+ bltzal 0x04100000 bgezal 0x04110000 */
assert ((insn & 0xfc0e0000) == 0x04000000);
insn ^= 0x00010000;
break;
case 1:
/* beq 0x10000000 bne 0x14000000
- blez 0x18000000 bgtz 0x1c000000 */
+ blez 0x18000000 bgtz 0x1c000000 */
insn ^= 0x04000000;
break;
@@ -13747,8 +14229,8 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
/* Clear the and-link bit. */
assert ((insn & 0xfc1c0000) == 0x04100000);
- /* bltzal 0x04100000 bgezal 0x04110000
- bltzall 0x04120000 bgezall 0x04130000 */
+ /* bltzal 0x04100000 bgezal 0x04110000
+ bltzall 0x04120000 bgezall 0x04130000 */
insn &= ~0x00100000;
}
@@ -13773,7 +14255,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
md_number_to_chars ((char *) buf, insn, 4);
buf += 4;
- /* Nop */
+ /* nop */
md_number_to_chars ((char *) buf, 0, 4);
buf += 4;
@@ -13811,7 +14293,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
exp.X_add_number = fragp->fr_offset;
fixp = fix_new_exp (fragp, buf - (bfd_byte *)fragp->fr_literal,
- 4, &exp, 0, BFD_RELOC_MIPS_JMP);
+ 4, &exp, FALSE, BFD_RELOC_MIPS_JMP);
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
@@ -13833,7 +14315,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
}
fixp = fix_new_exp (fragp, buf - (bfd_byte *)fragp->fr_literal,
- 4, &exp, 0, BFD_RELOC_MIPS_GOT16);
+ 4, &exp, FALSE, BFD_RELOC_MIPS_GOT16);
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
@@ -13851,7 +14333,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
insn = HAVE_64BIT_ADDRESSES ? 0x64210000 : 0x24210000;
fixp = fix_new_exp (fragp, buf - (bfd_byte *)fragp->fr_literal,
- 4, &exp, 0, BFD_RELOC_LO16);
+ 4, &exp, FALSE, BFD_RELOC_LO16);
fixp->fx_file = fragp->fr_file;
fixp->fx_line = fragp->fr_line;
@@ -13880,7 +14362,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT asec, fragS *fragp)
if (RELAX_MIPS16_P (fragp->fr_subtype))
{
int type;
- register const struct mips16_immed_operand *op;
+ const struct mips16_immed_operand *op;
bfd_boolean small, ext;
offsetT val;
bfd_byte *buf;
@@ -14034,7 +14516,7 @@ mips_frob_file_after_relocs (void)
asymbol **syms;
unsigned int count, i;
- if (OUTPUT_FLAVOR != bfd_target_elf_flavour)
+ if (!IS_ELF)
return;
syms = bfd_get_outsymbols (stdoutput);
@@ -14062,6 +14544,7 @@ mips_frob_file_after_relocs (void)
void
mips_define_label (symbolS *sym)
{
+ segment_info_type *si = seg_info (now_seg);
struct insn_label_list *l;
if (free_insn_labels == NULL)
@@ -14073,8 +14556,8 @@ mips_define_label (symbolS *sym)
}
l->label = sym;
- l->next = insn_labels;
- insn_labels = l;
+ l->next = si->label_list;
+ si->label_list = l;
#ifdef OBJ_ELF
dwarf2_emit_label (sym);
@@ -14136,6 +14619,7 @@ mips_elf_final_processing (void)
/* Set MIPS ELF flags for ASEs. */
/* We may need to define a new flag for DSP ASE, and set this flag when
file_ase_dsp is true. */
+ /* Same for DSP R2. */
/* We may need to define a new flag for MT ASE, and set this flag when
file_ase_mt is true. */
if (file_ase_mips16)
@@ -14166,6 +14650,12 @@ mips_elf_final_processing (void)
if (mips_32bitmode)
elf_elfheader (stdoutput)->e_flags |= EF_MIPS_32BITMODE;
+
+#if 0 /* XXX FIXME */
+ /* 32 bit code with 64 bit FP registers. */
+ if (!file_mips_fp32 && ABI_NEEDS_32BIT_REGS (mips_abi))
+ elf_elfheader (stdoutput)->e_flags |= ???;
+#endif
}
#endif /* OBJ_ELF || OBJ_MAYBE_ELF */
@@ -14226,7 +14716,7 @@ md_obj_begin (void)
static void
md_obj_end (void)
{
- /* check for premature end, nesting errors, etc */
+ /* Check for premature end, nesting errors, etc. */
if (cur_proc_ptr)
as_warn (_("missing .end at end of assembly"));
}
@@ -14383,8 +14873,7 @@ s_mips_end (int x ATTRIBUTE_UNUSED)
}
/* Generate a .pdr section. */
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour && ! ECOFF_DEBUGGING
- && mips_flag_pdr)
+ if (IS_ELF && !ECOFF_DEBUGGING && mips_flag_pdr)
{
segT saved_seg = now_seg;
subsegT saved_subseg = now_subseg;
@@ -14478,7 +14967,7 @@ static void
s_mips_frame (int ignore ATTRIBUTE_UNUSED)
{
#ifdef OBJ_ELF
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour && ! ECOFF_DEBUGGING)
+ if (IS_ELF && !ECOFF_DEBUGGING)
{
long val;
@@ -14521,7 +15010,7 @@ static void
s_mips_mask (int reg_type)
{
#ifdef OBJ_ELF
- if (OUTPUT_FLAVOR == bfd_target_elf_flavour && ! ECOFF_DEBUGGING)
+ if (IS_ELF && !ECOFF_DEBUGGING)
{
long mask, off;
@@ -14568,72 +15057,102 @@ s_mips_mask (int reg_type)
static const struct mips_cpu_info mips_cpu_info_table[] =
{
/* Entries for generic ISAs */
- { "mips1", 1, ISA_MIPS1, CPU_R3000 },
- { "mips2", 1, ISA_MIPS2, CPU_R6000 },
- { "mips3", 1, ISA_MIPS3, CPU_R4000 },
- { "mips4", 1, ISA_MIPS4, CPU_R8000 },
- { "mips5", 1, ISA_MIPS5, CPU_MIPS5 },
- { "mips32", 1, ISA_MIPS32, CPU_MIPS32 },
- { "mips32r2", 1, ISA_MIPS32R2, CPU_MIPS32R2 },
- { "mips64", 1, ISA_MIPS64, CPU_MIPS64 },
- { "mips64r2", 1, ISA_MIPS64R2, CPU_MIPS64R2 },
+ { "mips1", MIPS_CPU_IS_ISA, ISA_MIPS1, CPU_R3000 },
+ { "mips2", MIPS_CPU_IS_ISA, ISA_MIPS2, CPU_R6000 },
+ { "mips3", MIPS_CPU_IS_ISA, ISA_MIPS3, CPU_R4000 },
+ { "mips4", MIPS_CPU_IS_ISA, ISA_MIPS4, CPU_R8000 },
+ { "mips5", MIPS_CPU_IS_ISA, ISA_MIPS5, CPU_MIPS5 },
+ { "mips32", MIPS_CPU_IS_ISA, ISA_MIPS32, CPU_MIPS32 },
+ { "mips32r2", MIPS_CPU_IS_ISA, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "mips64", MIPS_CPU_IS_ISA, ISA_MIPS64, CPU_MIPS64 },
+ { "mips64r2", MIPS_CPU_IS_ISA, ISA_MIPS64R2, CPU_MIPS64R2 },
/* MIPS I */
- { "r3000", 0, ISA_MIPS1, CPU_R3000 },
- { "r2000", 0, ISA_MIPS1, CPU_R3000 },
- { "r3900", 0, ISA_MIPS1, CPU_R3900 },
+ { "r3000", 0, ISA_MIPS1, CPU_R3000 },
+ { "r2000", 0, ISA_MIPS1, CPU_R3000 },
+ { "r3900", 0, ISA_MIPS1, CPU_R3900 },
/* MIPS II */
- { "r6000", 0, ISA_MIPS2, CPU_R6000 },
+ { "r6000", 0, ISA_MIPS2, CPU_R6000 },
/* MIPS III */
- { "r4000", 0, ISA_MIPS3, CPU_R4000 },
- { "r4010", 0, ISA_MIPS2, CPU_R4010 },
- { "vr4100", 0, ISA_MIPS3, CPU_VR4100 },
- { "vr4111", 0, ISA_MIPS3, CPU_R4111 },
- { "vr4120", 0, ISA_MIPS3, CPU_VR4120 },
- { "vr4130", 0, ISA_MIPS3, CPU_VR4120 },
- { "vr4181", 0, ISA_MIPS3, CPU_R4111 },
- { "vr4300", 0, ISA_MIPS3, CPU_R4300 },
- { "r4400", 0, ISA_MIPS3, CPU_R4400 },
- { "r4600", 0, ISA_MIPS3, CPU_R4600 },
- { "orion", 0, ISA_MIPS3, CPU_R4600 },
- { "r4650", 0, ISA_MIPS3, CPU_R4650 },
+ { "r4000", 0, ISA_MIPS3, CPU_R4000 },
+ { "r4010", 0, ISA_MIPS2, CPU_R4010 },
+ { "vr4100", 0, ISA_MIPS3, CPU_VR4100 },
+ { "vr4111", 0, ISA_MIPS3, CPU_R4111 },
+ { "vr4120", 0, ISA_MIPS3, CPU_VR4120 },
+ { "vr4130", 0, ISA_MIPS3, CPU_VR4120 },
+ { "vr4181", 0, ISA_MIPS3, CPU_R4111 },
+ { "vr4300", 0, ISA_MIPS3, CPU_R4300 },
+ { "r4400", 0, ISA_MIPS3, CPU_R4400 },
+ { "r4600", 0, ISA_MIPS3, CPU_R4600 },
+ { "orion", 0, ISA_MIPS3, CPU_R4600 },
+ { "r4650", 0, ISA_MIPS3, CPU_R4650 },
/* MIPS IV */
- { "r8000", 0, ISA_MIPS4, CPU_R8000 },
- { "r10000", 0, ISA_MIPS4, CPU_R10000 },
- { "r12000", 0, ISA_MIPS4, CPU_R12000 },
- { "vr5000", 0, ISA_MIPS4, CPU_R5000 },
- { "vr5400", 0, ISA_MIPS4, CPU_VR5400 },
- { "vr5500", 0, ISA_MIPS4, CPU_VR5500 },
- { "rm5200", 0, ISA_MIPS4, CPU_R5000 },
- { "rm5230", 0, ISA_MIPS4, CPU_R5000 },
- { "rm5231", 0, ISA_MIPS4, CPU_R5000 },
- { "rm5261", 0, ISA_MIPS4, CPU_R5000 },
- { "rm5721", 0, ISA_MIPS4, CPU_R5000 },
- { "rm7000", 0, ISA_MIPS4, CPU_RM7000 },
- { "rm9000", 0, ISA_MIPS4, CPU_RM9000 },
+ { "r8000", 0, ISA_MIPS4, CPU_R8000 },
+ { "r10000", 0, ISA_MIPS4, CPU_R10000 },
+ { "r12000", 0, ISA_MIPS4, CPU_R12000 },
+ { "vr5000", 0, ISA_MIPS4, CPU_R5000 },
+ { "vr5400", 0, ISA_MIPS4, CPU_VR5400 },
+ { "vr5500", 0, ISA_MIPS4, CPU_VR5500 },
+ { "rm5200", 0, ISA_MIPS4, CPU_R5000 },
+ { "rm5230", 0, ISA_MIPS4, CPU_R5000 },
+ { "rm5231", 0, ISA_MIPS4, CPU_R5000 },
+ { "rm5261", 0, ISA_MIPS4, CPU_R5000 },
+ { "rm5721", 0, ISA_MIPS4, CPU_R5000 },
+ { "rm7000", 0, ISA_MIPS4, CPU_RM7000 },
+ { "rm9000", 0, ISA_MIPS4, CPU_RM9000 },
/* MIPS 32 */
- { "4kc", 0, ISA_MIPS32, CPU_MIPS32 },
- { "4km", 0, ISA_MIPS32, CPU_MIPS32 },
- { "4kp", 0, ISA_MIPS32, CPU_MIPS32 },
-
- /* MIPS32 Release 2 */
- { "m4k", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
- { "24k", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
- { "24kc", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
- { "24kf", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
- { "24kx", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "4kc", 0, ISA_MIPS32, CPU_MIPS32 },
+ { "4km", 0, ISA_MIPS32, CPU_MIPS32 },
+ { "4kp", 0, ISA_MIPS32, CPU_MIPS32 },
+ { "4ksc", MIPS_CPU_ASE_SMARTMIPS, ISA_MIPS32, CPU_MIPS32 },
+
+ /* MIPS 32 Release 2 */
+ { "4kec", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "4kem", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "4kep", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "4ksd", MIPS_CPU_ASE_SMARTMIPS, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "m4k", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "m4kp", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "24kc", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "24kf", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "24kx", 0, ISA_MIPS32R2, CPU_MIPS32R2 },
+ /* 24KE is a 24K with DSP ASE, other ASEs are optional. */
+ { "24kec", MIPS_CPU_ASE_DSP, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "24kef", MIPS_CPU_ASE_DSP, ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "24kex", MIPS_CPU_ASE_DSP, ISA_MIPS32R2, CPU_MIPS32R2 },
+ /* 34K is a 24K with DSP and MT ASE, other ASEs are optional. */
+ { "34kc", MIPS_CPU_ASE_DSP | MIPS_CPU_ASE_MT,
+ ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "34kf", MIPS_CPU_ASE_DSP | MIPS_CPU_ASE_MT,
+ ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "34kx", MIPS_CPU_ASE_DSP | MIPS_CPU_ASE_MT,
+ ISA_MIPS32R2, CPU_MIPS32R2 },
+ /* 74K with DSP and DSPR2 ASE, other ASEs are optional. */
+ { "74kc", MIPS_CPU_ASE_DSP | MIPS_CPU_ASE_DSPR2,
+ ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "74kf", MIPS_CPU_ASE_DSP | MIPS_CPU_ASE_DSPR2,
+ ISA_MIPS32R2, CPU_MIPS32R2 },
+ { "74kx", MIPS_CPU_ASE_DSP | MIPS_CPU_ASE_DSPR2,
+ ISA_MIPS32R2, CPU_MIPS32R2 },
/* MIPS 64 */
- { "5kc", 0, ISA_MIPS64, CPU_MIPS64 },
- { "5kf", 0, ISA_MIPS64, CPU_MIPS64 },
- { "20kc", 0, ISA_MIPS64, CPU_MIPS64 },
+ { "5kc", 0, ISA_MIPS64, CPU_MIPS64 },
+ { "5kf", 0, ISA_MIPS64, CPU_MIPS64 },
+ { "20kc", MIPS_CPU_ASE_MIPS3D, ISA_MIPS64, CPU_MIPS64 },
+ { "25kf", MIPS_CPU_ASE_MIPS3D, ISA_MIPS64, CPU_MIPS64 },
+
+ /* MIPS 64 Release 2 */
/* Broadcom SB-1 CPU core */
- { "sb1", 0, ISA_MIPS64, CPU_SB1 },
+ { "sb1", MIPS_CPU_ASE_MIPS3D | MIPS_CPU_ASE_MDMX,
+ ISA_MIPS64, CPU_SB1 },
+ /* Broadcom SB-1A CPU core */
+ { "sb1a", MIPS_CPU_ASE_MIPS3D | MIPS_CPU_ASE_MDMX,
+ ISA_MIPS64, CPU_SB1 },
/* Cavium Networks Octeon CPU core */
{ "octeon", 0, ISA_MIPS64R2, CPU_OCTEON },
@@ -14751,7 +15270,7 @@ mips_cpu_info_from_isa (int isa)
int i;
for (i = 0; mips_cpu_info_table[i].name != NULL; i++)
- if (mips_cpu_info_table[i].is_isa
+ if ((mips_cpu_info_table[i].flags & MIPS_CPU_IS_ISA)
&& isa == mips_cpu_info_table[i].isa)
return (&mips_cpu_info_table[i]);
@@ -14845,9 +15364,15 @@ MIPS options:\n\
-mips16 generate mips16 instructions\n\
-no-mips16 do not generate mips16 instructions\n"));
fprintf (stream, _("\
+-msmartmips generate smartmips instructions\n\
+-mno-smartmips do not generate smartmips instructions\n"));
+ fprintf (stream, _("\
-mdsp generate DSP instructions\n\
-mno-dsp do not generate DSP instructions\n"));
fprintf (stream, _("\
+-mdspr2 generate DSP R2 instructions\n\
+-mno-dspr2 do not generate DSP R2 instructions\n"));
+ fprintf (stream, _("\
-mmt generate MT instructions\n\
-mno-mt do not generate MT instructions\n"));
fprintf (stream, _("\
@@ -14855,7 +15380,6 @@ MIPS options:\n\
-mfix-vr4130 work around VR4130 mflo/mfhi errata\n\
-mgp32 use 32-bit GPRs, regardless of the chosen ISA\n\
-mfp32 use 32-bit FPRs, regardless of the chosen ISA\n\
--mno-shared optimize output for executables\n\
-msym32 assume all symbols have 32-bit values\n\
-O0 remove unneeded NOPs, do not swap branches\n\
-O remove unneeded NOPs and swap branches\n\
@@ -14865,11 +15389,12 @@ MIPS options:\n\
#ifdef OBJ_ELF
fprintf (stream, _("\
-KPIC, -call_shared generate SVR4 position independent code\n\
+-mvxworks-pic generate VxWorks position independent code\n\
-non_shared do not generate position independent code\n\
-xgot assume a 32 bit GOT\n\
-mpdr, -mno-pdr enable/disable creation of .pdr sections\n\
-mshared, -mno-shared disable/enable .cpload optimization for\n\
- non-shared code\n\
+ position dependent (non shared) code\n\
-mabi=ABI create ABI conformant object file for:\n"));
first = 1;
@@ -14926,3 +15451,14 @@ mips_cfi_frame_initial_instructions (void)
cfi_add_CFA_def_cfa_register (SP);
}
+int
+tc_mips_regname_to_dw2regnum (char *regname)
+{
+ unsigned int regnum = -1;
+ unsigned int reg;
+
+ if (reg_lookup (&regname, RTYPE_GP | RTYPE_NUM, &reg))
+ regnum = reg;
+
+ return regnum;
+}
diff --git a/contrib/binutils/gas/config/tc-mips.h b/contrib/binutils/gas/config/tc-mips.h
index 5665d3d..117417c 100644
--- a/contrib/binutils/gas/config/tc-mips.h
+++ b/contrib/binutils/gas/config/tc-mips.h
@@ -1,6 +1,6 @@
/* tc-mips.h -- header file for tc-mips.c.
- Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
Contributed by the OSF and Ralph Campbell.
Written by Keith Knowles and Ralph Campbell, working independently.
Modified for ECOFF support by Ian Lance Taylor of Cygnus Support.
@@ -58,6 +58,12 @@ extern void mips_handle_align (struct frag *);
#define MAX_MEM_FOR_RS_ALIGN_CODE (1 + 2)
+struct insn_label_list;
+#define TC_SEGMENT_INFO_TYPE struct insn_label_list *
+
+/* This field is nonzero if the symbol is the target of a MIPS16 jump. */
+#define TC_SYMFIELD_TYPE int
+
/* Tell assembler that we have an itbl_mips.h header file to include. */
#define HAVE_ITBL_CPU
@@ -149,6 +155,7 @@ extern void mips_emit_delays (void);
extern void mips_enable_auto_align (void);
#define md_elf_section_change_hook() mips_enable_auto_align()
+enum dwarf2_format;
extern enum dwarf2_format mips_dwarf2_format (void);
#define DWARF2_FORMAT() mips_dwarf2_format ()
@@ -160,7 +167,10 @@ extern int mips_dwarf2_addr_size (void);
#define tc_cfi_frame_initial_instructions mips_cfi_frame_initial_instructions
extern void mips_cfi_frame_initial_instructions (void);
+#define tc_regname_to_dw2regnum tc_mips_regname_to_dw2regnum
+extern int tc_mips_regname_to_dw2regnum (char *regname);
+
#define DWARF2_DEFAULT_RETURN_COLUMN 31
-#define DWARF2_CIE_DATA_ALIGNMENT -4
+#define DWARF2_CIE_DATA_ALIGNMENT (-4)
#endif /* TC_MIPS */
diff --git a/contrib/binutils/gas/config/tc-ppc.c b/contrib/binutils/gas/config/tc-ppc.c
index d5bdb9e..a86a3be 100644
--- a/contrib/binutils/gas/config/tc-ppc.c
+++ b/contrib/binutils/gas/config/tc-ppc.c
@@ -1,6 +1,6 @@
/* tc-ppc.c -- Assemble for the PowerPC or POWER (RS/6000)
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
@@ -20,7 +20,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <stdio.h>
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
@@ -85,67 +84,57 @@ static int set_target_endian = 0;
static bfd_boolean reg_names_p = TARGET_REG_NAMES_P;
-static bfd_boolean register_name PARAMS ((expressionS *));
-static void ppc_set_cpu PARAMS ((void));
-static unsigned long ppc_insert_operand
- PARAMS ((unsigned long insn, const struct powerpc_operand *operand,
- offsetT val, char *file, unsigned int line));
-static void ppc_macro PARAMS ((char *str, const struct powerpc_macro *macro));
-static void ppc_byte PARAMS ((int));
+static void ppc_macro (char *, const struct powerpc_macro *);
+static void ppc_byte (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));
+static void ppc_tc (int);
+static void ppc_machine (int);
#endif
#ifdef OBJ_XCOFF
-static void ppc_comm PARAMS ((int));
-static void ppc_bb PARAMS ((int));
-static void ppc_bc PARAMS ((int));
-static void ppc_bf PARAMS ((int));
-static void ppc_biei PARAMS ((int));
-static void ppc_bs PARAMS ((int));
-static void ppc_eb PARAMS ((int));
-static void ppc_ec PARAMS ((int));
-static void ppc_ef PARAMS ((int));
-static void ppc_es PARAMS ((int));
-static void ppc_csect PARAMS ((int));
-static void ppc_change_csect PARAMS ((symbolS *, offsetT));
-static void ppc_function PARAMS ((int));
-static void ppc_extern PARAMS ((int));
-static void ppc_lglobl PARAMS ((int));
-static void ppc_section PARAMS ((int));
-static void ppc_named_section PARAMS ((int));
-static void ppc_stabx PARAMS ((int));
-static void ppc_rename PARAMS ((int));
-static void ppc_toc PARAMS ((int));
-static void ppc_xcoff_cons PARAMS ((int));
-static void ppc_vbyte PARAMS ((int));
+static void ppc_comm (int);
+static void ppc_bb (int);
+static void ppc_bc (int);
+static void ppc_bf (int);
+static void ppc_biei (int);
+static void ppc_bs (int);
+static void ppc_eb (int);
+static void ppc_ec (int);
+static void ppc_ef (int);
+static void ppc_es (int);
+static void ppc_csect (int);
+static void ppc_change_csect (symbolS *, offsetT);
+static void ppc_function (int);
+static void ppc_extern (int);
+static void ppc_lglobl (int);
+static void ppc_section (int);
+static void ppc_named_section (int);
+static void ppc_stabx (int);
+static void ppc_rename (int);
+static void ppc_toc (int);
+static void ppc_xcoff_cons (int);
+static void ppc_vbyte (int);
#endif
#ifdef OBJ_ELF
-static bfd_reloc_code_real_type ppc_elf_suffix PARAMS ((char **, expressionS *));
-static void ppc_elf_cons PARAMS ((int));
-static void ppc_elf_rdata PARAMS ((int));
-static void ppc_elf_lcomm PARAMS ((int));
-static void ppc_elf_validate_fix PARAMS ((fixS *, segT));
-static void ppc_apuinfo_section_add PARAMS ((unsigned int apu, unsigned int version));
+static void ppc_elf_cons (int);
+static void ppc_elf_rdata (int);
+static void ppc_elf_lcomm (int);
#endif
#ifdef TE_PE
-static void ppc_set_current_section PARAMS ((segT));
-static void ppc_previous PARAMS ((int));
-static void ppc_pdata PARAMS ((int));
-static void ppc_ydata PARAMS ((int));
-static void ppc_reldata PARAMS ((int));
-static void ppc_rdata PARAMS ((int));
-static void ppc_ualong PARAMS ((int));
-static void ppc_znop PARAMS ((int));
-static void ppc_pe_comm PARAMS ((int));
-static void ppc_pe_section PARAMS ((int));
-static void ppc_pe_function PARAMS ((int));
-static void ppc_pe_tocd PARAMS ((int));
+static void ppc_previous (int);
+static void ppc_pdata (int);
+static void ppc_ydata (int);
+static void ppc_reldata (int);
+static void ppc_rdata (int);
+static void ppc_ualong (int);
+static void ppc_znop (int);
+static void ppc_pe_comm (int);
+static void ppc_pe_section (int);
+static void ppc_pe_function (int);
+static void ppc_pe_tocd (int);
#endif
/* Generic assembler global variables which must be defined by all
@@ -183,11 +172,9 @@ const char EXP_CHARS[] = "eE";
as in 0d1.0. */
const char FLT_CHARS[] = "dD";
-/* '+' and '-' can be used as postfix predicate predictors for conditional
- branches. So they need to be accepted as symbol characters.
- Also, anything that can start an operand needs to be mentioned here,
+/* Anything that can start an operand needs to be mentioned here,
to stop the input scrubber eating whitespace. */
-const char ppc_symbol_chars[] = "+-%[";
+const char ppc_symbol_chars[] = "%[";
/* The dwarf2 data alignment, adjusted for 32 or 64 bit. */
int ppc_cie_data_alignment;
@@ -567,14 +554,8 @@ static const struct pd_reg pre_defined_registers[] =
/* Given NAME, find the register number associated with that name, return
the integer value associated with the given name or -1 on failure. */
-static int reg_name_search
- PARAMS ((const struct pd_reg *, int, const char * name));
-
static int
-reg_name_search (regs, regcount, name)
- const struct pd_reg *regs;
- int regcount;
- const char *name;
+reg_name_search (const struct pd_reg *regs, int regcount, const char *name)
{
int middle, low, high;
int cmp;
@@ -611,8 +592,7 @@ reg_name_search (regs, regcount, name)
*/
static bfd_boolean
-register_name (expressionP)
- expressionS *expressionP;
+register_name (expressionS *expressionP)
{
int reg_number;
char *name;
@@ -679,9 +659,7 @@ static const struct pd_reg cr_names[] =
expression. */
int
-ppc_parse_name (name, expr)
- const char *name;
- expressionS *expr;
+ppc_parse_name (const char *name, expressionS *expr)
{
int val;
@@ -917,6 +895,18 @@ parse_cpu (const char *arg)
| PPC_OPCODE_64 | PPC_OPCODE_POWER4
| PPC_OPCODE_POWER5);
}
+ else if (strcmp (arg, "power6") == 0)
+ {
+ ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
+ | PPC_OPCODE_64 | PPC_OPCODE_POWER4
+ | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6);
+ }
+ else if (strcmp (arg, "cell") == 0)
+ {
+ ppc_cpu = (PPC_OPCODE_PPC | PPC_OPCODE_CLASSIC
+ | PPC_OPCODE_64 | PPC_OPCODE_POWER4
+ | PPC_OPCODE_CELL);
+ }
/* -mcom means assemble for the common intersection between Power
and PowerPC. At present, we just allow the union, rather
than the intersection. */
@@ -932,9 +922,7 @@ parse_cpu (const char *arg)
}
int
-md_parse_option (c, arg)
- int c;
- char *arg;
+md_parse_option (int c, char *arg)
{
switch (c)
{
@@ -1088,8 +1076,7 @@ md_parse_option (c, arg)
}
void
-md_show_usage (stream)
- FILE *stream;
+md_show_usage (FILE *stream)
{
fprintf (stream, _("\
PowerPC options:\n\
@@ -1112,6 +1099,8 @@ PowerPC options:\n\
-mbooke, mbooke32 generate code for 32-bit PowerPC BookE\n\
-mpower4 generate code for Power4 architecture\n\
-mpower5 generate code for Power5 architecture\n\
+-mpower6 generate code for Power6 architecture\n\
+-mcell generate code for Cell Broadband Engine architecture\n\
-mcom generate code Power/PowerPC common instructions\n\
-many generate code for any architecture (PWR/PWRX/PPC)\n"));
fprintf (stream, _("\
@@ -1140,7 +1129,7 @@ PowerPC options:\n\
/* Set ppc_cpu if it is not already set. */
static void
-ppc_set_cpu ()
+ppc_set_cpu (void)
{
const char *default_os = TARGET_OS;
const char *default_cpu = TARGET_CPU;
@@ -1168,7 +1157,7 @@ ppc_set_cpu ()
are called well before md_begin, when the output file is opened. */
enum bfd_architecture
-ppc_arch ()
+ppc_arch (void)
{
const char *default_cpu = TARGET_CPU;
ppc_set_cpu ();
@@ -1190,7 +1179,7 @@ ppc_arch ()
}
unsigned long
-ppc_mach ()
+ppc_mach (void)
{
if (ppc_obj64)
return bfd_mach_ppc64;
@@ -1201,7 +1190,7 @@ ppc_mach ()
}
extern char*
-ppc_target_format ()
+ppc_target_format (void)
{
#ifdef OBJ_COFF
#ifdef TE_PE
@@ -1233,11 +1222,11 @@ ppc_target_format ()
static void
ppc_setup_opcodes (void)
{
- register const struct powerpc_opcode *op;
+ const struct powerpc_opcode *op;
const struct powerpc_opcode *op_end;
const struct powerpc_macro *macro;
const struct powerpc_macro *macro_end;
- bfd_boolean dup_insn = FALSE;
+ bfd_boolean bad_insn = FALSE;
if (ppc_hash != NULL)
hash_die (ppc_hash);
@@ -1247,10 +1236,77 @@ ppc_setup_opcodes (void)
/* Insert the opcodes into a hash table. */
ppc_hash = hash_new ();
+ if (ENABLE_CHECKING)
+ {
+ unsigned int i;
+
+ /* Check operand masks. Code here and in the disassembler assumes
+ all the 1's in the mask are contiguous. */
+ for (i = 0; i < num_powerpc_operands; ++i)
+ {
+ unsigned long mask = powerpc_operands[i].bitm;
+ unsigned long right_bit;
+ unsigned int j;
+
+ right_bit = mask & -mask;
+ mask += right_bit;
+ right_bit = mask & -mask;
+ if (mask != right_bit)
+ {
+ as_bad (_("powerpc_operands[%d].bitm invalid"), i);
+ bad_insn = TRUE;
+ }
+ for (j = i + 1; j < num_powerpc_operands; ++j)
+ if (memcmp (&powerpc_operands[i], &powerpc_operands[j],
+ sizeof (powerpc_operands[0])) == 0)
+ {
+ as_bad (_("powerpc_operands[%d] duplicates powerpc_operands[%d]"),
+ j, i);
+ bad_insn = TRUE;
+ }
+ }
+ }
+
op_end = powerpc_opcodes + powerpc_num_opcodes;
for (op = powerpc_opcodes; op < op_end; op++)
{
- know ((op->opcode & op->mask) == op->opcode);
+ if (ENABLE_CHECKING)
+ {
+ const unsigned char *o;
+ unsigned long omask = op->mask;
+
+ /* The mask had better not trim off opcode bits. */
+ if ((op->opcode & omask) != op->opcode)
+ {
+ as_bad (_("mask trims opcode bits for %s"),
+ op->name);
+ bad_insn = TRUE;
+ }
+
+ /* The operands must not overlap the opcode or each other. */
+ for (o = op->operands; *o; ++o)
+ if (*o >= num_powerpc_operands)
+ {
+ as_bad (_("operand index error for %s"),
+ op->name);
+ bad_insn = TRUE;
+ }
+ else
+ {
+ const struct powerpc_operand *operand = &powerpc_operands[*o];
+ if (operand->shift >= 0)
+ {
+ unsigned long mask = operand->bitm << operand->shift;
+ if (omask & mask)
+ {
+ as_bad (_("operand %d overlap in %s"),
+ (int) (o - op->operands), op->name);
+ bad_insn = TRUE;
+ }
+ omask |= mask;
+ }
+ }
+ }
if ((op->flags & ppc_cpu & ~(PPC_OPCODE_32 | PPC_OPCODE_64)) != 0
&& ((op->flags & (PPC_OPCODE_32 | PPC_OPCODE_64)) == 0
@@ -1270,11 +1326,14 @@ ppc_setup_opcodes (void)
== (ppc_cpu & PPC_OPCODE_POWER4)))
&& ((op->flags & PPC_OPCODE_POWER5) == 0
|| ((op->flags & PPC_OPCODE_POWER5)
- == (ppc_cpu & PPC_OPCODE_POWER5))))
+ == (ppc_cpu & PPC_OPCODE_POWER5)))
+ && ((op->flags & PPC_OPCODE_POWER6) == 0
+ || ((op->flags & PPC_OPCODE_POWER6)
+ == (ppc_cpu & PPC_OPCODE_POWER6))))
{
const char *retval;
- retval = hash_insert (ppc_hash, op->name, (PTR) op);
+ retval = hash_insert (ppc_hash, op->name, (void *) op);
if (retval != NULL)
{
/* Ignore Power duplicates for -m601. */
@@ -1282,16 +1341,16 @@ ppc_setup_opcodes (void)
&& (op->flags & PPC_OPCODE_POWER) != 0)
continue;
- as_bad (_("Internal assembler error for instruction %s"),
+ as_bad (_("duplicate instruction %s"),
op->name);
- dup_insn = TRUE;
+ bad_insn = TRUE;
}
}
}
if ((ppc_cpu & PPC_OPCODE_ANY) != 0)
for (op = powerpc_opcodes; op < op_end; op++)
- hash_insert (ppc_hash, op->name, (PTR) op);
+ hash_insert (ppc_hash, op->name, (void *) op);
/* Insert the macros into a hash table. */
ppc_macro_hash = hash_new ();
@@ -1303,16 +1362,16 @@ ppc_setup_opcodes (void)
{
const char *retval;
- retval = hash_insert (ppc_macro_hash, macro->name, (PTR) macro);
+ retval = hash_insert (ppc_macro_hash, macro->name, (void *) macro);
if (retval != (const char *) NULL)
{
- as_bad (_("Internal assembler error for macro %s"), macro->name);
- dup_insn = TRUE;
+ as_bad (_("duplicate macro %s"), macro->name);
+ bad_insn = TRUE;
}
}
}
- if (dup_insn)
+ if (bad_insn)
abort ();
}
@@ -1321,7 +1380,7 @@ ppc_setup_opcodes (void)
opened. */
void
-md_begin ()
+md_begin (void)
{
ppc_set_cpu ();
@@ -1364,7 +1423,7 @@ md_begin ()
}
void
-ppc_cleanup ()
+ppc_cleanup (void)
{
#ifdef OBJ_ELF
if (ppc_apuinfo_list == NULL)
@@ -1426,54 +1485,60 @@ ppc_cleanup ()
/* Insert an operand value into an instruction. */
static unsigned long
-ppc_insert_operand (insn, operand, val, file, line)
- unsigned long insn;
- const struct powerpc_operand *operand;
- offsetT val;
- char *file;
- unsigned int line;
+ppc_insert_operand (unsigned long insn,
+ const struct powerpc_operand *operand,
+ offsetT val,
+ char *file,
+ unsigned int line)
{
- if (operand->bits != 32)
+ long min, max, right;
+
+ max = operand->bitm;
+ right = max & -max;
+ min = 0;
+
+ if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
{
- long min, max;
- offsetT test;
+ if ((operand->flags & PPC_OPERAND_SIGNOPT) == 0)
+ max = (max >> 1) & -right;
+ min = ~max & -right;
+ }
- if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
- {
- if ((operand->flags & PPC_OPERAND_SIGNOPT) != 0)
- max = (1 << operand->bits) - 1;
- else
- max = (1 << (operand->bits - 1)) - 1;
- min = - (1 << (operand->bits - 1));
+ if ((operand->flags & PPC_OPERAND_PLUS1) != 0)
+ max++;
- if (!ppc_obj64)
- {
- /* Some people write 32 bit hex constants with the sign
- extension done by hand. This shouldn't really be
- valid, but, to permit this code to assemble on a 64
- bit host, we sign extend the 32 bit value. */
- if (val > 0
- && (val & (offsetT) 0x80000000) != 0
- && (val & (offsetT) 0xffffffff) == val)
- {
- val -= 0x80000000;
- val -= 0x80000000;
- }
- }
- }
- else
- {
- max = (1 << operand->bits) - 1;
- min = 0;
- }
+ if ((operand->flags & PPC_OPERAND_NEGATIVE) != 0)
+ {
+ long tmp = min;
+ min = -max;
+ max = -tmp;
+ }
- if ((operand->flags & PPC_OPERAND_NEGATIVE) != 0)
- test = - val;
- else
- test = val;
+ if (min <= max)
+ {
+ /* Some people write constants with the sign extension done by
+ hand but only up to 32 bits. This shouldn't really be valid,
+ but, to permit this code to assemble on a 64-bit host, we
+ sign extend the 32-bit value to 64 bits if so doing makes the
+ value valid. */
+ if (val > max
+ && (offsetT) (val - 0x80000000 - 0x80000000) >= min
+ && (offsetT) (val - 0x80000000 - 0x80000000) <= max
+ && ((val - 0x80000000 - 0x80000000) & (right - 1)) == 0)
+ val = val - 0x80000000 - 0x80000000;
- if (test < (offsetT) min || test > (offsetT) max)
- as_bad_value_out_of_range (_("operand"), test, (offsetT) min, (offsetT) max, file, line);
+ /* Similarly, people write expressions like ~(1<<15), and expect
+ this to be OK for a 32-bit unsigned value. */
+ else if (val < min
+ && (offsetT) (val + 0x80000000 + 0x80000000) >= min
+ && (offsetT) (val + 0x80000000 + 0x80000000) <= max
+ && ((val + 0x80000000 + 0x80000000) & (right - 1)) == 0)
+ val = val + 0x80000000 + 0x80000000;
+
+ else if (val < min
+ || val > max
+ || (val & (right - 1)) != 0)
+ as_bad_value_out_of_range (_("operand"), val, min, max, file, line);
}
if (operand->insert)
@@ -1486,8 +1551,7 @@ ppc_insert_operand (insn, operand, val, file, line)
as_bad_where (file, line, errmsg);
}
else
- insn |= (((long) val & ((1 << operand->bits) - 1))
- << operand->shift);
+ insn |= ((long) val & operand->bitm) << operand->shift;
return insn;
}
@@ -1496,9 +1560,7 @@ ppc_insert_operand (insn, operand, val, file, line)
#ifdef OBJ_ELF
/* Parse @got, etc. and return the desired relocation. */
static bfd_reloc_code_real_type
-ppc_elf_suffix (str_p, exp_p)
- char **str_p;
- expressionS *exp_p;
+ppc_elf_suffix (char **str_p, expressionS *exp_p)
{
struct map_bfd {
char *string;
@@ -1676,8 +1738,7 @@ ppc_elf_suffix (str_p, exp_p)
/* 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, 8=.llong. */
+ppc_elf_cons (int nbytes /* 1=.byte, 2=.word, 4=.long, 8=.llong */)
{
expressionS exp;
bfd_reloc_code_real_type reloc;
@@ -1732,8 +1793,7 @@ ppc_elf_cons (nbytes)
/* Solaris pseduo op to change to the .rodata section. */
static void
-ppc_elf_rdata (xxx)
- int xxx;
+ppc_elf_rdata (int xxx)
{
char *save_line = input_line_pointer;
static char section[] = ".rodata\n";
@@ -1747,14 +1807,13 @@ ppc_elf_rdata (xxx)
/* Pseudo op to make file scope bss items. */
static void
-ppc_elf_lcomm (xxx)
- int xxx ATTRIBUTE_UNUSED;
+ppc_elf_lcomm (int xxx ATTRIBUTE_UNUSED)
{
- register char *name;
- register char c;
- register char *p;
+ char *name;
+ char c;
+ char *p;
offsetT size;
- register symbolS *symbolP;
+ symbolS *symbolP;
offsetT align;
segT old_sec;
int old_subsec;
@@ -1857,9 +1916,7 @@ ppc_elf_lcomm (xxx)
fixups for word relocations in writable segments, so we can adjust
them at runtime. */
static void
-ppc_elf_validate_fix (fixp, seg)
- fixS *fixp;
- segT seg;
+ppc_elf_validate_fix (fixS *fixp, segT seg)
{
if (fixp->fx_done || fixp->fx_pcrel)
return;
@@ -1904,7 +1961,7 @@ ppc_elf_validate_fix (fixp, seg)
function descriptor sym if the corresponding code sym is used. */
void
-ppc_frob_file_before_adjust ()
+ppc_frob_file_before_adjust (void)
{
symbolS *symp;
asection *toc;
@@ -1987,8 +2044,7 @@ enum toc_size_qualifier
};
static int
-parse_toc_entry (toc_kind)
- enum toc_size_qualifier *toc_kind;
+parse_toc_entry (enum toc_size_qualifier *toc_kind)
{
char *start;
char *toc_spec;
@@ -2052,8 +2108,7 @@ parse_toc_entry (toc_kind)
#ifdef OBJ_ELF
#define APUID(a,v) ((((a) & 0xffff) << 16) | ((v) & 0xffff))
static void
-ppc_apuinfo_section_add (apu, version)
- unsigned int apu, version;
+ppc_apuinfo_section_add (unsigned int apu, unsigned int version)
{
unsigned int i;
@@ -2099,8 +2154,7 @@ struct ppc_fixup
/* This routine is called for each instruction to be assembled. */
void
-md_assemble (str)
- char *str;
+md_assemble (char *str)
{
char *s;
const struct powerpc_opcode *opcode;
@@ -2724,16 +2778,14 @@ md_assemble (str)
around operands here. */
static void
-ppc_macro (str, macro)
- char *str;
- const struct powerpc_macro *macro;
+ppc_macro (char *str, const struct powerpc_macro *macro)
{
char *operands[10];
unsigned int count;
char *s;
unsigned int len;
const char *format;
- int arg;
+ unsigned int arg;
char *send;
char *complete;
@@ -2771,7 +2823,7 @@ ppc_macro (str, macro)
else
{
arg = strtol (format + 1, &send, 10);
- know (send != format && arg >= 0 && arg < count);
+ know (send != format && arg < count);
len += strlen (operands[arg]);
format = send;
}
@@ -2802,9 +2854,7 @@ ppc_macro (str, macro)
/* For ELF, add support for SHF_EXCLUDE and SHT_ORDERED. */
int
-ppc_section_letter (letter, ptr_msg)
- int letter;
- char **ptr_msg;
+ppc_section_letter (int letter, char **ptr_msg)
{
if (letter == 'e')
return SHF_EXCLUDE;
@@ -2814,9 +2864,7 @@ ppc_section_letter (letter, ptr_msg)
}
int
-ppc_section_word (str, len)
- char *str;
- size_t len;
+ppc_section_word (char *str, size_t len)
{
if (len == 7 && strncmp (str, "exclude", 7) == 0)
return SHF_EXCLUDE;
@@ -2825,9 +2873,7 @@ ppc_section_word (str, len)
}
int
-ppc_section_type (str, len)
- char *str;
- size_t len;
+ppc_section_type (char *str, size_t len)
{
if (len == 7 && strncmp (str, "ordered", 7) == 0)
return SHT_ORDERED;
@@ -2836,10 +2882,7 @@ ppc_section_type (str, len)
}
int
-ppc_section_flags (flags, attr, type)
- int flags;
- int attr;
- int type;
+ppc_section_flags (int flags, int attr, int type)
{
if (type == SHT_ORDERED)
flags |= SEC_ALLOC | SEC_LOAD | SEC_SORT_ENTRIES;
@@ -2858,8 +2901,7 @@ ppc_section_flags (flags, attr, type)
pseudo-op, but it can also take a single ASCII string. */
static void
-ppc_byte (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_byte (int ignore ATTRIBUTE_UNUSED)
{
if (*input_line_pointer != '\"')
{
@@ -2903,8 +2945,7 @@ static bfd_boolean ppc_stab_symbol;
aligns .comm and .lcomm to 4 bytes. */
static void
-ppc_comm (lcomm)
- int lcomm;
+ppc_comm (int lcomm)
{
asection *current_seg = now_seg;
subsegT current_subseg = now_subseg;
@@ -3058,8 +3099,7 @@ ppc_comm (lcomm)
optional second argument is the alignment (the default is 2). */
static void
-ppc_csect (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_csect (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char endc;
@@ -3094,9 +3134,7 @@ ppc_csect (ignore)
/* Change to a different csect. */
static void
-ppc_change_csect (sym, align)
- symbolS *sym;
- offsetT align;
+ppc_change_csect (symbolS *sym, offsetT align)
{
if (S_IS_DEFINED (sym))
subseg_set (S_GET_SEGMENT (sym), symbol_get_tc (sym)->subseg);
@@ -3196,8 +3234,7 @@ ppc_change_csect (sym, align)
convenience of people who aren't used to XCOFF. */
static void
-ppc_section (type)
- int type;
+ppc_section (int type)
{
const char *name;
symbolS *sym;
@@ -3221,8 +3258,7 @@ ppc_section (type)
we do permit the user to name the text or data section. */
static void
-ppc_named_section (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_named_section (int ignore ATTRIBUTE_UNUSED)
{
char *user_name;
const char *real_name;
@@ -3256,8 +3292,7 @@ ppc_named_section (ignore)
/* The .extern pseudo-op. We create an undefined symbol. */
static void
-ppc_extern (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_extern (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char endc;
@@ -3275,8 +3310,7 @@ ppc_extern (ignore)
/* The .lglobl pseudo-op. Keep the symbol in the symbol table. */
static void
-ppc_lglobl (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_lglobl (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char endc;
@@ -3298,8 +3332,7 @@ ppc_lglobl (ignore)
although I don't know why it bothers. */
static void
-ppc_rename (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_rename (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char endc;
@@ -3334,8 +3367,7 @@ ppc_rename (ignore)
always zero, and I am assuming it is the type. */
static void
-ppc_stabx (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_stabx (int ignore ATTRIBUTE_UNUSED)
{
char *name;
int len;
@@ -3461,8 +3493,7 @@ ppc_stabx (ignore)
gets an aux entry like that used for a csect. */
static void
-ppc_function (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_function (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char endc;
@@ -3555,8 +3586,7 @@ ppc_function (ignore)
static symbolS *saved_bi_sym = 0;
static void
-ppc_bf (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_bf (int ignore ATTRIBUTE_UNUSED)
{
symbolS *sym;
@@ -3591,8 +3621,7 @@ ppc_bf (ignore)
most recent ".bf" symbol. */
static void
-ppc_ef (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_ef (int ignore ATTRIBUTE_UNUSED)
{
symbolS *sym;
@@ -3616,8 +3645,7 @@ ppc_ef (ignore)
is encountered. */
static void
-ppc_biei (ei)
- int ei;
+ppc_biei (int ei)
{
static symbolS *last_biei;
@@ -3671,8 +3699,7 @@ ppc_biei (ei)
.bs symbol is the index of this csect symbol. */
static void
-ppc_bs (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_bs (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char endc;
@@ -3707,8 +3734,7 @@ ppc_bs (ignore)
/* The .es pseudo-op. Generate a C_ESTART symbol named .es. */
static void
-ppc_es (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_es (int ignore ATTRIBUTE_UNUSED)
{
symbolS *sym;
@@ -3732,8 +3758,7 @@ ppc_es (ignore)
line number. */
static void
-ppc_bb (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_bb (int ignore ATTRIBUTE_UNUSED)
{
symbolS *sym;
@@ -3759,8 +3784,7 @@ ppc_bb (ignore)
line number. */
static void
-ppc_eb (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_eb (int ignore ATTRIBUTE_UNUSED)
{
symbolS *sym;
@@ -3784,8 +3808,7 @@ ppc_eb (ignore)
specified name. */
static void
-ppc_bc (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_bc (int ignore ATTRIBUTE_UNUSED)
{
char *name;
int len;
@@ -3807,8 +3830,7 @@ ppc_bc (ignore)
/* The .ec pseudo-op. This just creates a C_ECOMM symbol. */
static void
-ppc_ec (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_ec (int ignore ATTRIBUTE_UNUSED)
{
symbolS *sym;
@@ -3827,8 +3849,7 @@ ppc_ec (ignore)
/* The .toc pseudo-op. Switch to the .toc subsegment. */
static void
-ppc_toc (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_toc (int ignore ATTRIBUTE_UNUSED)
{
if (ppc_toc_csect != (symbolS *) NULL)
subseg_set (data_section, symbol_get_tc (ppc_toc_csect)->subseg);
@@ -3874,8 +3895,7 @@ ppc_toc (ignore)
.short pseudo-op, and we want to be compatible. */
static void
-ppc_xcoff_cons (log_size)
- int log_size;
+ppc_xcoff_cons (int log_size)
{
frag_align (log_size, 0, 0);
record_alignment (now_seg, log_size);
@@ -3883,8 +3903,7 @@ ppc_xcoff_cons (log_size)
}
static void
-ppc_vbyte (dummy)
- int dummy ATTRIBUTE_UNUSED;
+ppc_vbyte (int dummy ATTRIBUTE_UNUSED)
{
expressionS exp;
int byte_count;
@@ -3927,8 +3946,7 @@ ppc_vbyte (dummy)
the first argument is simply ignored. */
static void
-ppc_tc (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_tc (int ignore ATTRIBUTE_UNUSED)
{
#ifdef OBJ_XCOFF
@@ -4014,8 +4032,7 @@ ppc_tc (ignore)
/* Pseudo-op .machine. */
static void
-ppc_machine (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_machine (int ignore ATTRIBUTE_UNUSED)
{
char *cpu_string;
#define MAX_HISTORY 100
@@ -4078,8 +4095,7 @@ ppc_machine (ignore)
/* See whether a symbol is in the TOC section. */
static int
-ppc_is_toc_sym (sym)
- symbolS *sym;
+ppc_is_toc_sym (symbolS *sym)
{
#ifdef OBJ_XCOFF
return symbol_get_tc (sym)->class == XMC_TC;
@@ -4100,8 +4116,7 @@ ppc_is_toc_sym (sym)
/* Set the current section. */
static void
-ppc_set_current_section (new)
- segT new;
+ppc_set_current_section (segT new)
{
ppc_previous_section = ppc_current_section;
ppc_current_section = new;
@@ -4113,8 +4128,7 @@ ppc_set_current_section (new)
warnings: "No previous section" */
static void
-ppc_previous (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_previous (int ignore ATTRIBUTE_UNUSED)
{
symbolS *tmp;
@@ -4145,8 +4159,7 @@ ppc_previous (ignore)
handling, debugging, etc. */
static void
-ppc_pdata (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_pdata (int ignore ATTRIBUTE_UNUSED)
{
if (pdata_section == 0)
{
@@ -4180,8 +4193,7 @@ ppc_pdata (ignore)
debugging, etc. */
static void
-ppc_ydata (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_ydata (int ignore ATTRIBUTE_UNUSED)
{
if (ydata_section == 0)
{
@@ -4217,8 +4229,7 @@ ppc_ydata (ignore)
function descriptors, etc. */
static void
-ppc_reldata (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_reldata (int ignore ATTRIBUTE_UNUSED)
{
if (reldata_section == 0)
{
@@ -4248,8 +4259,7 @@ ppc_reldata (ignore)
3 - double word aligned (that would be 4 byte boundary) */
static void
-ppc_rdata (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_rdata (int ignore ATTRIBUTE_UNUSED)
{
if (rdata_section == 0)
{
@@ -4275,8 +4285,7 @@ ppc_rdata (ignore)
warnings: None */
static void
-ppc_ualong (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_ualong (int ignore ATTRIBUTE_UNUSED)
{
/* Try for long. */
cons (4);
@@ -4290,8 +4299,7 @@ ppc_ualong (ignore)
warnings: Missing symbol name */
static void
-ppc_znop (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_znop (int ignore ATTRIBUTE_UNUSED)
{
unsigned long insn;
const struct powerpc_opcode *opcode;
@@ -4343,14 +4351,13 @@ ppc_znop (ignore)
warnings: */
static void
-ppc_pe_comm (lcomm)
- int lcomm;
+ppc_pe_comm (int lcomm)
{
- register char *name;
- register char c;
- register char *p;
+ char *name;
+ char c;
+ char *p;
offsetT temp;
- register symbolS *symbolP;
+ symbolS *symbolP;
offsetT align;
name = input_line_pointer;
@@ -4473,8 +4480,7 @@ ppc_pe_comm (lcomm)
*/
void
-ppc_pe_section (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_pe_section (int ignore ATTRIBUTE_UNUSED)
{
/* Strip out the section name. */
char *section_name;
@@ -4562,7 +4568,7 @@ ppc_pe_section (ignore)
case 'R': /* Remove section at link time */
flags |= SEC_NEVER_LOAD;
break;
-
+#if IFLICT_BRAIN_DAMAGE
/* Section Protection */
case 'r': /* section is readable */
flags |= IMAGE_SCN_MEM_READ;
@@ -4606,7 +4612,7 @@ ppc_pe_section (ignore)
flags |= IMAGE_SCN_ALIGN_64BYTES;
align = 6;
break;
-
+#endif
default:
as_bad (_("unknown section attribute '%c'"),
*input_line_pointer);
@@ -4632,12 +4638,10 @@ ppc_pe_section (ignore)
}
bfd_set_section_alignment (stdoutput, sec, align);
-
}
static void
-ppc_pe_function (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_pe_function (int ignore ATTRIBUTE_UNUSED)
{
char *name;
char endc;
@@ -4659,8 +4663,7 @@ ppc_pe_function (ignore)
}
static void
-ppc_pe_tocd (ignore)
- int ignore ATTRIBUTE_UNUSED;
+ppc_pe_tocd (int ignore ATTRIBUTE_UNUSED)
{
if (tocdata_section == 0)
{
@@ -4685,8 +4688,7 @@ ppc_pe_tocd (ignore)
/* Don't adjust TOC relocs to use the section symbol. */
int
-ppc_pe_fix_adjustable (fix)
- fixS *fix;
+ppc_pe_fix_adjustable (fixS *fix)
{
return fix->fx_r_type != BFD_RELOC_PPC_TOC16;
}
@@ -4701,8 +4703,7 @@ ppc_pe_fix_adjustable (fix)
any, to use square brackets, and to be in upper case. */
char *
-ppc_canonicalize_symbol_name (name)
- char *name;
+ppc_canonicalize_symbol_name (char *name)
{
char *s;
@@ -4739,8 +4740,7 @@ ppc_canonicalize_symbol_name (name)
called whenever a new symbol is created. */
void
-ppc_symbol_new_hook (sym)
- symbolS *sym;
+ppc_symbol_new_hook (symbolS *sym)
{
struct ppc_tc_sy *tc;
const char *s;
@@ -4828,8 +4828,7 @@ ppc_symbol_new_hook (sym)
follows the csect symbol. */
void
-ppc_frob_label (sym)
- symbolS *sym;
+ppc_frob_label (symbolS *sym)
{
if (ppc_current_csect != (symbolS *) NULL)
{
@@ -4859,8 +4858,7 @@ static bfd_boolean ppc_saw_abs;
symbol table. */
int
-ppc_frob_symbol (sym)
- symbolS *sym;
+ppc_frob_symbol (symbolS *sym)
{
static symbolS *ppc_last_function;
static symbolS *set_end;
@@ -5123,7 +5121,7 @@ ppc_frob_symbol (sym)
absolute symbols. */
void
-ppc_adjust_symtab ()
+ppc_adjust_symtab (void)
{
symbolS *sym;
@@ -5169,8 +5167,7 @@ ppc_adjust_symtab ()
turn. */
void
-ppc_frob_section (sec)
- asection *sec;
+ppc_frob_section (asection *sec)
{
static bfd_vma vma = 0;
@@ -5187,10 +5184,7 @@ ppc_frob_section (sec)
returned, or NULL on OK. */
char *
-md_atof (type, litp, sizep)
- int type;
- char *litp;
- int *sizep;
+md_atof (int type, char *litp, int *sizep)
{
int prec;
LITTLENUM_TYPE words[4];
@@ -5242,10 +5236,7 @@ md_atof (type, litp, sizep)
endianness. */
void
-md_number_to_chars (buf, val, n)
- char *buf;
- valueT val;
- int n;
+md_number_to_chars (char *buf, valueT val, int n)
{
if (target_big_endian)
number_to_chars_bigendian (buf, val, n);
@@ -5256,21 +5247,22 @@ md_number_to_chars (buf, val, n)
/* Align a section (I don't know why this is machine dependent). */
valueT
-md_section_align (seg, addr)
- asection *seg;
- valueT addr;
+md_section_align (asection *seg ATTRIBUTE_UNUSED, valueT addr)
{
+#ifdef OBJ_ELF
+ return addr;
+#else
int align = bfd_get_section_alignment (stdoutput, seg);
return ((addr + (1 << align) - 1) & (-1 << align));
+#endif
}
/* We don't have any form of relaxing. */
int
-md_estimate_size_before_relax (fragp, seg)
- fragS *fragp ATTRIBUTE_UNUSED;
- asection *seg ATTRIBUTE_UNUSED;
+md_estimate_size_before_relax (fragS *fragp ATTRIBUTE_UNUSED,
+ asection *seg ATTRIBUTE_UNUSED)
{
abort ();
return 0;
@@ -5279,10 +5271,9 @@ md_estimate_size_before_relax (fragp, seg)
/* Convert a machine dependent frag. We never generate these. */
void
-md_convert_frag (abfd, sec, fragp)
- bfd *abfd ATTRIBUTE_UNUSED;
- asection *sec ATTRIBUTE_UNUSED;
- fragS *fragp ATTRIBUTE_UNUSED;
+md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED,
+ asection *sec ATTRIBUTE_UNUSED,
+ fragS *fragp ATTRIBUTE_UNUSED)
{
abort ();
}
@@ -5290,8 +5281,7 @@ md_convert_frag (abfd, sec, fragp)
/* We have no need to default values of symbols. */
symbolS *
-md_undefined_symbol (name)
- char *name ATTRIBUTE_UNUSED;
+md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
{
return 0;
}
@@ -5302,9 +5292,7 @@ md_undefined_symbol (name)
given a PC relative reloc. */
long
-md_pcrel_from_section (fixp, sec)
- fixS *fixp;
- segT sec ATTRIBUTE_UNUSED;
+md_pcrel_from_section (fixS *fixp, segT sec ATTRIBUTE_UNUSED)
{
return fixp->fx_frag->fr_address + fixp->fx_where;
}
@@ -5317,8 +5305,7 @@ md_pcrel_from_section (fixp, sec)
corresponding .tc symbol. */
int
-ppc_fix_adjustable (fix)
- fixS *fix;
+ppc_fix_adjustable (fixS *fix)
{
valueT val = resolve_symbol_value (fix->fx_addsy);
segT symseg = S_GET_SEGMENT (fix->fx_addsy);
@@ -5443,8 +5430,7 @@ ppc_fix_adjustable (fix)
between two csects in the same section. */
int
-ppc_force_relocation (fix)
- fixS *fix;
+ppc_force_relocation (fixS *fix)
{
/* At this point fix->fx_addsy should already have been converted to
a csect symbol. If the csect does not include the fragment, then
@@ -5469,8 +5455,7 @@ ppc_force_relocation (fix)
will be emitted for a fixup. */
int
-ppc_force_relocation (fix)
- fixS *fix;
+ppc_force_relocation (fixS *fix)
{
/* Branch prediction relocations must force a relocation, as must
the vtable description relocs. */
@@ -5495,8 +5480,7 @@ ppc_force_relocation (fix)
}
int
-ppc_fix_adjustable (fix)
- fixS *fix;
+ppc_fix_adjustable (fixS *fix)
{
return (fix->fx_r_type != BFD_RELOC_16_GOTOFF
&& fix->fx_r_type != BFD_RELOC_LO16_GOTOFF
@@ -5510,6 +5494,47 @@ ppc_fix_adjustable (fix)
}
#endif
+/* Implement HANDLE_ALIGN. This writes the NOP pattern into an
+ rs_align_code frag. */
+
+void
+ppc_handle_align (struct frag *fragP)
+{
+ valueT count = (fragP->fr_next->fr_address
+ - (fragP->fr_address + fragP->fr_fix));
+
+ if (count != 0 && (count & 3) == 0)
+ {
+ char *dest = fragP->fr_literal + fragP->fr_fix;
+
+ fragP->fr_var = 4;
+ md_number_to_chars (dest, 0x60000000, 4);
+
+ if ((ppc_cpu & PPC_OPCODE_POWER6) != 0)
+ {
+ /* For power6, we want the last nop to be a group terminating
+ one, "ori 1,1,0". Do this by inserting an rs_fill frag
+ immediately after this one, with its address set to the last
+ nop location. This will automatically reduce the number of
+ nops in the current frag by one. */
+ if (count > 4)
+ {
+ struct frag *group_nop = xmalloc (SIZEOF_STRUCT_FRAG + 4);
+
+ memcpy (group_nop, fragP, SIZEOF_STRUCT_FRAG);
+ group_nop->fr_address = group_nop->fr_next->fr_address - 4;
+ group_nop->fr_fix = 0;
+ group_nop->fr_offset = 1;
+ group_nop->fr_type = rs_fill;
+ fragP->fr_next = group_nop;
+ dest = group_nop->fr_literal;
+ }
+
+ md_number_to_chars (dest, 0x60210000, 4);
+ }
+ }
+}
+
/* Apply a fixup to the object code. This is called for all the
fixups we generated by the call to fix_new_exp, above. In the call
above we used a reloc code which was the largest legal reloc code
@@ -5520,10 +5545,7 @@ ppc_fix_adjustable (fix)
fixup. */
void
-md_apply_fix (fixP, valP, seg)
- fixS *fixP;
- valueT * valP;
- segT seg ATTRIBUTE_UNUSED;
+md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
{
valueT value = * valP;
@@ -5580,7 +5602,7 @@ md_apply_fix (fixP, valP, seg)
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->bitm & 0xfff0) == 0xfff0
&& operand->shift == 0
&& (operand->insert == NULL || ppc_obj64)
&& fixP->fx_addsy != NULL
@@ -5618,11 +5640,11 @@ md_apply_fix (fixP, valP, seg)
We are only prepared to turn a few of the operands into
relocs. */
if ((operand->flags & PPC_OPERAND_RELATIVE) != 0
- && operand->bits == 26
+ && operand->bitm == 0x3fffffc
&& operand->shift == 0)
fixP->fx_r_type = BFD_RELOC_PPC_B26;
else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0
- && operand->bits == 16
+ && operand->bitm == 0xfffc
&& operand->shift == 0)
{
fixP->fx_r_type = BFD_RELOC_PPC_B16;
@@ -5633,11 +5655,11 @@ md_apply_fix (fixP, valP, seg)
#endif
}
else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0
- && operand->bits == 26
+ && operand->bitm == 0x3fffffc
&& operand->shift == 0)
fixP->fx_r_type = BFD_RELOC_PPC_BA26;
else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0
- && operand->bits == 16
+ && operand->bitm == 0xfffc
&& operand->shift == 0)
{
fixP->fx_r_type = BFD_RELOC_PPC_BA16;
@@ -5649,7 +5671,7 @@ md_apply_fix (fixP, valP, seg)
}
#if defined (OBJ_XCOFF) || defined (OBJ_ELF)
else if ((operand->flags & PPC_OPERAND_PARENS) != 0
- && operand->bits == 16
+ && (operand->bitm & 0xfff0) == 0xfff0
&& operand->shift == 0)
{
if (ppc_is_toc_sym (fixP->fx_addsy))
@@ -6047,9 +6069,7 @@ md_apply_fix (fixP, valP, seg)
/* Generate a reloc for a fixup. */
arelent *
-tc_gen_reloc (seg, fixp)
- asection *seg ATTRIBUTE_UNUSED;
- fixS *fixp;
+tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp)
{
arelent *reloc;
@@ -6072,13 +6092,13 @@ tc_gen_reloc (seg, fixp)
}
void
-ppc_cfi_frame_initial_instructions ()
+ppc_cfi_frame_initial_instructions (void)
{
cfi_add_CFA_def_cfa (1, 0);
}
int
-tc_ppc_regname_to_dw2regnum (const char *regname)
+tc_ppc_regname_to_dw2regnum (char *regname)
{
unsigned int regnum = -1;
unsigned int i;
diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h
index f7c2da6..1e85649 100644
--- a/contrib/binutils/gas/config/tc-ppc.h
+++ b/contrib/binutils/gas/config/tc-ppc.h
@@ -1,6 +1,6 @@
/* tc-ppc.h -- Header file for tc-ppc.c.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GAS, the GNU Assembler.
@@ -42,15 +42,15 @@ struct fix;
/* The target BFD architecture. */
#define TARGET_ARCH (ppc_arch ())
#define TARGET_MACH (ppc_mach ())
-extern enum bfd_architecture ppc_arch PARAMS ((void));
-extern unsigned long ppc_mach PARAMS ((void));
+extern enum bfd_architecture ppc_arch (void);
+extern unsigned long ppc_mach (void);
/* Whether or not the target is big endian */
extern int target_big_endian;
/* The target BFD format. */
#define TARGET_FORMAT (ppc_target_format ())
-extern char *ppc_target_format PARAMS ((void));
+extern char *ppc_target_format (void);
/* Permit temporary numeric labels. */
#define LOCAL_LABELS_FB 1
@@ -78,31 +78,12 @@ extern char *ppc_target_format PARAMS ((void));
#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) \
- { \
- 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; \
- } \
- } \
- }
+ if ((FRAGP)->fr_type == rs_align_code) \
+ ppc_handle_align (FRAGP);
+
+extern void ppc_handle_align (struct frag *);
+
+#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
#define md_frag_check(FRAGP) \
if ((FRAGP)->has_code \
@@ -117,7 +98,7 @@ extern char *ppc_target_format PARAMS ((void));
/* Don't adjust TOC relocs. */
#define tc_fix_adjustable(FIX) ppc_pe_fix_adjustable (FIX)
-extern int ppc_pe_fix_adjustable PARAMS ((struct fix *));
+extern int ppc_pe_fix_adjustable (struct fix *);
#endif
@@ -165,31 +146,31 @@ struct ppc_tc_sy
/* Canonicalize the symbol name. */
#define tc_canonicalize_symbol_name(name) ppc_canonicalize_symbol_name (name)
-extern char *ppc_canonicalize_symbol_name PARAMS ((char *));
+extern char *ppc_canonicalize_symbol_name (char *);
/* Get the symbol class from the name. */
#define tc_symbol_new_hook(sym) ppc_symbol_new_hook (sym)
-extern void ppc_symbol_new_hook PARAMS ((symbolS *));
+extern void ppc_symbol_new_hook (symbolS *);
/* Set the symbol class of a label based on the csect. */
#define tc_frob_label(sym) ppc_frob_label (sym)
-extern void ppc_frob_label PARAMS ((symbolS *));
+extern void ppc_frob_label (symbolS *);
/* TOC relocs requires special handling. */
#define tc_fix_adjustable(FIX) ppc_fix_adjustable (FIX)
-extern int ppc_fix_adjustable PARAMS ((struct fix *));
+extern int ppc_fix_adjustable (struct fix *);
/* We need to set the section VMA. */
#define tc_frob_section(sec) ppc_frob_section (sec)
-extern void ppc_frob_section PARAMS ((asection *));
+extern void ppc_frob_section (asection *);
/* Finish up the symbol. */
#define tc_frob_symbol(sym, punt) punt = ppc_frob_symbol (sym)
-extern int ppc_frob_symbol PARAMS ((symbolS *));
+extern int ppc_frob_symbol (symbolS *);
/* Finish up the entire symtab. */
#define tc_adjust_symtab() ppc_adjust_symtab ()
-extern void ppc_adjust_symtab PARAMS ((void));
+extern void ppc_adjust_symtab (void);
/* We also need to copy, in particular, the class of the symbol,
over what obj-coff would otherwise have copied. */
@@ -211,10 +192,10 @@ extern const char ppc_symbol_chars[];
#ifdef OBJ_ELF
/* Support for SHF_EXCLUDE and SHT_ORDERED */
-extern int ppc_section_letter PARAMS ((int, char **));
-extern int ppc_section_type PARAMS ((char *, size_t));
-extern int ppc_section_word PARAMS ((char *, size_t));
-extern int ppc_section_flags PARAMS ((int, int, int));
+extern int ppc_section_letter (int, char **);
+extern int ppc_section_type (char *, size_t);
+extern int ppc_section_word (char *, size_t);
+extern int ppc_section_flags (int, int, int);
#define md_elf_section_letter(LETTER, PTR_MSG) ppc_section_letter (LETTER, PTR_MSG)
#define md_elf_section_type(STR, LEN) ppc_section_type (STR, LEN)
@@ -226,40 +207,40 @@ extern const char *ppc_comment_chars;
/* Keep relocations relative to the GOT, or non-PC relative. */
#define tc_fix_adjustable(FIX) ppc_fix_adjustable (FIX)
-extern int ppc_fix_adjustable PARAMS ((struct fix *));
+extern int ppc_fix_adjustable (struct fix *);
/* Values passed to md_apply_fix don't include symbol values. */
#define MD_APPLY_SYM_VALUE(FIX) 0
#define tc_frob_file_before_adjust ppc_frob_file_before_adjust
-extern void ppc_frob_file_before_adjust PARAMS ((void));
+extern void ppc_frob_file_before_adjust (void);
#endif /* OBJ_ELF */
#if defined (OBJ_ELF) || defined (OBJ_XCOFF)
#define TC_FORCE_RELOCATION(FIX) ppc_force_relocation (FIX)
-extern int ppc_force_relocation PARAMS ((struct fix *));
+extern int ppc_force_relocation (struct fix *);
#endif
/* call md_pcrel_from_section, not md_pcrel_from */
#define MD_PCREL_FROM_SECTION(FIX, SEC) md_pcrel_from_section(FIX, SEC)
-extern long md_pcrel_from_section PARAMS ((struct fix *, segT));
+extern long md_pcrel_from_section (struct fix *, segT);
#define md_parse_name(name, exp, mode, c) ppc_parse_name (name, exp)
-extern int ppc_parse_name PARAMS ((const char *, struct expressionS *));
+extern int ppc_parse_name (const char *, struct expressionS *);
#define md_operand(x)
#define md_cleanup() ppc_cleanup ()
- extern void ppc_cleanup PARAMS ((void));
+extern void ppc_cleanup (void);
#define TARGET_USE_CFIPOP 1
#define tc_cfi_frame_initial_instructions ppc_cfi_frame_initial_instructions
-extern void ppc_cfi_frame_initial_instructions PARAMS ((void));
+extern void ppc_cfi_frame_initial_instructions (void);
#define tc_regname_to_dw2regnum tc_ppc_regname_to_dw2regnum
-extern int tc_ppc_regname_to_dw2regnum PARAMS ((const char *regname));
+extern int tc_ppc_regname_to_dw2regnum (char *);
extern int ppc_cie_data_alignment;
diff --git a/contrib/binutils/gas/config/tc-s390.c b/contrib/binutils/gas/config/tc-s390.c
index 56b5b25..6ca31f7b 100644
--- a/contrib/binutils/gas/config/tc-s390.c
+++ b/contrib/binutils/gas/config/tc-s390.c
@@ -1,5 +1,5 @@
/* tc-s390.c -- Assemble for the S390
- Copyright 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
@@ -20,7 +20,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <stdio.h>
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
@@ -412,6 +411,8 @@ md_parse_option (c, arg)
current_cpu = S390_OPCODE_Z990;
else if (strcmp (arg + 5, "z9-109") == 0)
current_cpu = S390_OPCODE_Z9_109;
+ else if (strcmp (arg + 5, "z9-ec") == 0)
+ current_cpu = S390_OPCODE_Z9_EC;
else
{
as_bad (_("invalid switch -m%s"), arg);
@@ -2322,7 +2323,7 @@ s390_cfi_frame_initial_instructions ()
}
int
-tc_s390_regname_to_dw2regnum (const char *regname)
+tc_s390_regname_to_dw2regnum (char *regname)
{
int regnum = -1;
diff --git a/contrib/binutils/gas/config/tc-s390.h b/contrib/binutils/gas/config/tc-s390.h
index dbecfef..b387c3b 100644
--- a/contrib/binutils/gas/config/tc-s390.h
+++ b/contrib/binutils/gas/config/tc-s390.h
@@ -88,7 +88,7 @@ extern void s390_md_end PARAMS ((void));
extern void s390_cfi_frame_initial_instructions PARAMS ((void));
#define tc_regname_to_dw2regnum tc_s390_regname_to_dw2regnum
-extern int tc_s390_regname_to_dw2regnum PARAMS ((const char *regname));
+extern int tc_s390_regname_to_dw2regnum PARAMS ((char *regname));
extern int s390_cie_data_alignment;
diff --git a/contrib/binutils/gas/config/tc-score.c b/contrib/binutils/gas/config/tc-score.c
new file mode 100644
index 0000000..fe45b00
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-score.c
@@ -0,0 +1,6661 @@
+/* tc-score.c -- Assembler for Score
+ Copyright 2006 Free Software Foundation, Inc.
+ Contributed by:
+ Mei Ligang (ligang@sunnorth.com.cn)
+ Pei-Lin Tsai (pltsai@sunplus.com)
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include "as.h"
+#include "config.h"
+#include "subsegs.h"
+#include "safe-ctype.h"
+#include "opcode/score-inst.h"
+#include "opcode/score-datadep.h"
+#include "struc-symbol.h"
+
+#ifdef OBJ_ELF
+#include "elf/score.h"
+#include "dwarf2dbg.h"
+#endif
+
+#define GP 28
+#define PIC_CALL_REG 29
+#define MAX_LITERAL_POOL_SIZE 1024
+#define FAIL 0x80000000
+#define SUCCESS 0
+#define INSN_SIZE 4
+#define INSN16_SIZE 2
+#define RELAX_INST_NUM 3
+
+/* For score5u : div/mul will pop warning message, mmu/alw/asw will pop error message. */
+#define BAD_ARGS _("bad arguments to instruction")
+#define BAD_PC _("r15 not allowed here")
+#define BAD_COND _("instruction is not conditional")
+#define ERR_NO_ACCUM _("acc0 expected")
+#define ERR_FOR_SCORE5U_MUL_DIV _("div / mul are reserved instructions")
+#define ERR_FOR_SCORE5U_MMU _("This architecture doesn't support mmu")
+#define ERR_FOR_SCORE5U_ATOMIC _("This architecture doesn't support atomic instruction")
+#define LONG_LABEL_LEN _("the label length is longer than 1024");
+#define BAD_SKIP_COMMA BAD_ARGS
+#define BAD_GARBAGE _("garbage following instruction");
+
+#define skip_whitespace(str) while (*(str) == ' ') ++(str)
+
+/* The name of the readonly data section. */
+#define RDATA_SECTION_NAME (OUTPUT_FLAVOR == bfd_target_aout_flavour \
+ ? ".data" \
+ : OUTPUT_FLAVOR == bfd_target_ecoff_flavour \
+ ? ".rdata" \
+ : OUTPUT_FLAVOR == bfd_target_coff_flavour \
+ ? ".rdata" \
+ : OUTPUT_FLAVOR == bfd_target_elf_flavour \
+ ? ".rodata" \
+ : (abort (), ""))
+
+#define RELAX_ENCODE(old, new, type, reloc1, reloc2, opt) \
+ ((relax_substateT) \
+ (((old) << 23) \
+ | ((new) << 16) \
+ | ((type) << 9) \
+ | ((reloc1) << 5) \
+ | ((reloc2) << 1) \
+ | ((opt) ? 1 : 0)))
+
+#define RELAX_OLD(i) (((i) >> 23) & 0x7f)
+#define RELAX_NEW(i) (((i) >> 16) & 0x7f)
+#define RELAX_TYPE(i) (((i) >> 9) & 0x7f)
+#define RELAX_RELOC1(i) ((valueT) ((i) >> 5) & 0xf)
+#define RELAX_RELOC2(i) ((valueT) ((i) >> 1) & 0xf)
+#define RELAX_OPT(i) ((i) & 1)
+#define RELAX_OPT_CLEAR(i) ((i) & ~1)
+
+#define SET_INSN_ERROR(s) (inst.error = (s))
+#define INSN_IS_PCE_P(s) (strstr (str, "||") != NULL)
+
+#define GET_INSN_CLASS(type) (get_insn_class_from_type (type))
+
+#define GET_INSN_SIZE(type) ((GET_INSN_CLASS (type) == INSN_CLASS_16) \
+ ? INSN16_SIZE : INSN_SIZE)
+
+/* 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 line_comment_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 FLT_CHARS[] = "rRsSfFdDxXeEpP";
+
+/* Used to contain constructed error messages. */
+static char err_msg[255];
+
+fragS *score_fragp = 0;
+static int fix_data_dependency = 0;
+static int warn_fix_data_dependency = 1;
+static int score7 = 1;
+static int university_version = 0;
+
+static int in_my_get_expression = 0;
+
+#define USE_GLOBAL_POINTER_OPT 1
+#define SCORE_BI_ENDIAN
+
+/* Default, pop warning message when using r1. */
+static int nor1 = 1;
+
+/* Default will do instruction relax, -O0 will set g_opt = 0. */
+static unsigned int g_opt = 1;
+
+/* The size of the small data section. */
+static unsigned int g_switch_value = 8;
+
+#ifdef OBJ_ELF
+/* Pre-defined "_GLOBAL_OFFSET_TABLE_" */
+symbolS *GOT_symbol;
+#endif
+static segT pdr_seg;
+
+enum score_pic_level score_pic = NO_PIC;
+
+#define INSN_NAME_LEN 16
+struct score_it
+{
+ char name[INSN_NAME_LEN];
+ unsigned long instruction;
+ unsigned long relax_inst;
+ int size;
+ int relax_size;
+ enum score_insn_type type;
+ char str[MAX_LITERAL_POOL_SIZE];
+ const char *error;
+ int bwarn;
+ char reg[INSN_NAME_LEN];
+ struct
+ {
+ bfd_reloc_code_real_type type;
+ expressionS exp;
+ int pc_rel;
+ }reloc;
+};
+struct score_it inst;
+
+typedef struct proc
+{
+ symbolS *isym;
+ unsigned long reg_mask;
+ unsigned long reg_offset;
+ unsigned long fpreg_mask;
+ unsigned long leaf;
+ unsigned long frame_offset;
+ unsigned long frame_reg;
+ unsigned long pc_reg;
+}
+procS;
+
+static procS cur_proc;
+static procS *cur_proc_ptr;
+static int numprocs;
+
+#define SCORE7_PIPELINE 7
+#define SCORE5_PIPELINE 5
+static int vector_size = SCORE7_PIPELINE;
+struct score_it dependency_vector[SCORE7_PIPELINE];
+
+/* Relax will need some padding for alignment. */
+#define RELAX_PAD_BYTE 3
+
+/* Number of littlenums required to hold an extended precision number. For md_atof. */
+#define NUM_FLOAT_VALS 8
+#define MAX_LITTLENUMS 6
+LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS];
+
+/* Structure for a hash table entry for a register. */
+struct reg_entry
+{
+ const char *name;
+ int number;
+};
+
+static const struct reg_entry score_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", 13}, {"r14", 14}, {"r15", 15},
+ {"r16", 16}, {"r17", 17}, {"r18", 18}, {"r19", 19},
+ {"r20", 20}, {"r21", 21}, {"r22", 22}, {"r23", 23},
+ {"r24", 24}, {"r25", 25}, {"r26", 26}, {"r27", 27},
+ {"r28", 28}, {"r29", 29}, {"r30", 30}, {"r31", 31},
+ {NULL, 0}
+};
+
+static const struct reg_entry score_srn_table[] =
+{
+ {"sr0", 0}, {"sr1", 1}, {"sr2", 2},
+ {NULL, 0}
+};
+
+static const struct reg_entry score_crn_table[] =
+{
+ {"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},
+ {"cr16", 16}, {"cr17", 17}, {"cr18", 18}, {"cr19", 19},
+ {"cr20", 20}, {"cr21", 21}, {"cr22", 22}, {"cr23", 23},
+ {"cr24", 24}, {"cr25", 25}, {"cr26", 26}, {"cr27", 27},
+ {"cr28", 28}, {"cr29", 29}, {"cr30", 30}, {"cr31", 31},
+ {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[] =
+{
+ {score_rn_table, 31, NULL, N_("S+core register expected")},
+ {score_srn_table, 2, NULL, N_("S+core special-register expected")},
+ {score_crn_table, 31, NULL, N_("S+core co-processor register expected")},
+};
+
+static struct hash_control *score_ops_hsh = NULL;
+
+static struct hash_control *dependency_insn_hsh = NULL;
+
+/* Enumeration matching entries in table above. */
+enum score_reg_type
+{
+ REG_TYPE_SCORE = 0,
+#define REG_TYPE_FIRST REG_TYPE_SCORE
+ REG_TYPE_SCORE_SR = 1,
+ REG_TYPE_SCORE_CR = 2,
+ REG_TYPE_MAX = 3
+};
+
+typedef struct literalS
+{
+ struct expressionS exp;
+ struct score_it *inst;
+}
+literalT;
+
+literalT literals[MAX_LITERAL_POOL_SIZE];
+
+static void do_ldst_insn (char *);
+static void do_crdcrscrsimm5 (char *);
+static void do_ldst_unalign (char *);
+static void do_ldst_atomic (char *);
+static void do_ldst_cop (char *);
+static void do_macro_li_rdi32 (char *);
+static void do_macro_la_rdi32 (char *);
+static void do_macro_rdi32hi (char *);
+static void do_macro_rdi32lo (char *);
+static void do_macro_mul_rdrsrs (char *);
+static void do_macro_ldst_label (char *);
+static void do_branch (char *);
+static void do_jump (char *);
+static void do_empty (char *);
+static void do_rdrsrs (char *);
+static void do_rdsi16 (char *);
+static void do_rdrssi14 (char *);
+static void do_sub_rdsi16 (char *);
+static void do_sub_rdrssi14 (char *);
+static void do_rdrsi5 (char *);
+static void do_rdrsi14 (char *);
+static void do_rdi16 (char *);
+static void do_xrsi5 (char *);
+static void do_rdrs (char *);
+static void do_rdxrs (char *);
+static void do_rsrs (char *);
+static void do_rdcrs (char *);
+static void do_rdsrs (char *);
+static void do_rd (char *);
+static void do_rs (char *);
+static void do_i15 (char *);
+static void do_xi5x (char *);
+static void do_ceinst (char *);
+static void do_cache (char *);
+static void do16_rdrs (char *);
+static void do16_rs (char *);
+static void do16_xrs (char *);
+static void do16_mv_rdrs (char *);
+static void do16_hrdrs (char *);
+static void do16_rdhrs (char *);
+static void do16_rdi4 (char *);
+static void do16_rdi5 (char *);
+static void do16_xi5 (char *);
+static void do16_ldst_insn (char *);
+static void do16_ldst_imm_insn (char *);
+static void do16_push_pop (char *);
+static void do16_branch (char *);
+static void do16_jump (char *);
+static void do_rdi16_pic (char *);
+static void do_addi_s_pic (char *);
+static void do_addi_u_pic (char *);
+static void do_lw_pic (char *);
+
+static const struct asm_opcode score_ldst_insns[] =
+{
+ {"lw", 0x20000000, 0x3e000000, 0x2008, Rd_rvalueRs_SI15, do_ldst_insn},
+ {"lw", 0x06000000, 0x3e000007, 0x8000, Rd_rvalueRs_preSI12, do_ldst_insn},
+ {"lw", 0x0e000000, 0x3e000007, 0x200a, Rd_rvalueRs_postSI12, do_ldst_insn},
+ {"lh", 0x22000000, 0x3e000000, 0x2009, Rd_rvalueRs_SI15, do_ldst_insn},
+ {"lh", 0x06000001, 0x3e000007, 0x8000, Rd_rvalueRs_preSI12, do_ldst_insn},
+ {"lh", 0x0e000001, 0x3e000007, 0x8000, Rd_rvalueRs_postSI12, do_ldst_insn},
+ {"lhu", 0x24000000, 0x3e000000, 0x8000, Rd_rvalueRs_SI15, do_ldst_insn},
+ {"lhu", 0x06000002, 0x3e000007, 0x8000, Rd_rvalueRs_preSI12, do_ldst_insn},
+ {"lhu", 0x0e000002, 0x3e000007, 0x8000, Rd_rvalueRs_postSI12, do_ldst_insn},
+ {"lb", 0x26000000, 0x3e000000, 0x8000, Rd_rvalueRs_SI15, do_ldst_insn},
+ {"lb", 0x06000003, 0x3e000007, 0x8000, Rd_rvalueRs_preSI12, do_ldst_insn},
+ {"lb", 0x0e000003, 0x3e000007, 0x8000, Rd_rvalueRs_postSI12, do_ldst_insn},
+ {"sw", 0x28000000, 0x3e000000, 0x200c, Rd_lvalueRs_SI15, do_ldst_insn},
+ {"sw", 0x06000004, 0x3e000007, 0x200e, Rd_lvalueRs_preSI12, do_ldst_insn},
+ {"sw", 0x0e000004, 0x3e000007, 0x8000, Rd_lvalueRs_postSI12, do_ldst_insn},
+ {"sh", 0x2a000000, 0x3e000000, 0x200d, Rd_lvalueRs_SI15, do_ldst_insn},
+ {"sh", 0x06000005, 0x3e000007, 0x8000, Rd_lvalueRs_preSI12, do_ldst_insn},
+ {"sh", 0x0e000005, 0x3e000007, 0x8000, Rd_lvalueRs_postSI12, do_ldst_insn},
+ {"lbu", 0x2c000000, 0x3e000000, 0x200b, Rd_rvalueRs_SI15, do_ldst_insn},
+ {"lbu", 0x06000006, 0x3e000007, 0x8000, Rd_rvalueRs_preSI12, do_ldst_insn},
+ {"lbu", 0x0e000006, 0x3e000007, 0x8000, Rd_rvalueRs_postSI12, do_ldst_insn},
+ {"sb", 0x2e000000, 0x3e000000, 0x200f, Rd_lvalueRs_SI15, do_ldst_insn},
+ {"sb", 0x06000007, 0x3e000007, 0x8000, Rd_lvalueRs_preSI12, do_ldst_insn},
+ {"sb", 0x0e000007, 0x3e000007, 0x8000, Rd_lvalueRs_postSI12, do_ldst_insn},
+};
+
+static const struct asm_opcode score_insns[] =
+{
+ {"abs", 0x3800000a, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"abs.s", 0x3800004b, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"add", 0x00000010, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"add.c", 0x00000011, 0x3e0003ff, 0x2000, Rd_Rs_Rs, do_rdrsrs},
+ {"add.s", 0x38000048, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"addc", 0x00000012, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"addc.c", 0x00000013, 0x3e0003ff, 0x0009, Rd_Rs_Rs, do_rdrsrs},
+ {"addi", 0x02000000, 0x3e0e0001, 0x8000, Rd_SI16, do_rdsi16},
+ {"addi.c", 0x02000001, 0x3e0e0001, 0x8000, Rd_SI16, do_rdsi16},
+ {"addis", 0x0a000000, 0x3e0e0001, 0x8000, Rd_SI16, do_rdi16},
+ {"addis.c", 0x0a000001, 0x3e0e0001, 0x8000, Rd_SI16, do_rdi16},
+ {"addri", 0x10000000, 0x3e000001, 0x8000, Rd_Rs_SI14, do_rdrssi14},
+ {"addri.c", 0x10000001, 0x3e000001, 0x8000, Rd_Rs_SI14, do_rdrssi14},
+ {"addc!", 0x0009, 0x700f, 0x00000013, Rd_Rs, do16_rdrs},
+ {"add!", 0x2000, 0x700f, 0x00000011, Rd_Rs, do16_rdrs},
+ {"addei!", 0x6000 , 0x7087, 0x02000001, Rd_I4, do16_rdi4},
+ {"subi", 0x02000000, 0x3e0e0001, 0x8000, Rd_SI16, do_sub_rdsi16},
+ {"subi.c", 0x02000001, 0x3e0e0001, 0x8000, Rd_SI16, do_sub_rdsi16},
+ {"subri", 0x10000000, 0x3e000001, 0x8000, Rd_Rs_SI14, do_sub_rdrssi14},
+ {"subri.c", 0x10000001, 0x3e000001, 0x8000, Rd_Rs_SI14, do_sub_rdrssi14},
+ {"and", 0x00000020, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"and.c", 0x00000021, 0x3e0003ff, 0x2004, Rd_Rs_Rs, do_rdrsrs},
+ {"andi", 0x02080000, 0x3e0e0001, 0x8000, Rd_I16, do_rdi16},
+ {"andi.c", 0x02080001, 0x3e0e0001, 0x8000, Rd_I16, do_rdi16},
+ {"andis", 0x0a080000, 0x3e0e0001, 0x8000, Rd_I16, do_rdi16},
+ {"andis.c", 0x0a080001, 0x3e0e0001, 0x8000, Rd_I16, do_rdi16},
+ {"andri", 0x18000000, 0x3e000001, 0x8000, Rd_Rs_I14, do_rdrsi14},
+ {"andri.c", 0x18000001, 0x3e000001, 0x8000, Rd_Rs_I14, do_rdrsi14},
+ {"and!", 0x2004, 0x700f, 0x00000021, Rd_Rs, do16_rdrs},
+ {"bcs", 0x08000000, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bcc", 0x08000400, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bcnz", 0x08003800, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bcsl", 0x08000001, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bccl", 0x08000401, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bcnzl", 0x08003801, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bcs!", 0x4000, 0x7f00, 0x08000000, PC_DISP8div2, do16_branch},
+ {"bcc!", 0x4100, 0x7f00, 0x08000400, PC_DISP8div2, do16_branch},
+ {"bcnz!", 0x4e00, 0x7f00, 0x08003800, PC_DISP8div2, do16_branch},
+ {"beq", 0x08001000, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"beql", 0x08001001, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"beq!", 0x4400, 0x7f00, 0x08001000, PC_DISP8div2, do16_branch},
+ {"bgtu", 0x08000800, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bgt", 0x08001800, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bge", 0x08002000, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bgtul", 0x08000801, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bgtl", 0x08001801, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bgel", 0x08002001, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bgtu!", 0x4200, 0x7f00, 0x08000800, PC_DISP8div2, do16_branch},
+ {"bgt!", 0x4600, 0x7f00, 0x08001800, PC_DISP8div2, do16_branch},
+ {"bge!", 0x4800, 0x7f00, 0x08002000, PC_DISP8div2, do16_branch},
+ {"bitclr.c", 0x00000029, 0x3e0003ff, 0x6004, Rd_Rs_I5, do_rdrsi5},
+ {"bitrev", 0x3800000c, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"bitset.c", 0x0000002b, 0x3e0003ff, 0x6005, Rd_Rs_I5, do_rdrsi5},
+ {"bittst.c", 0x0000002d, 0x3e0003ff, 0x6006, x_Rs_I5, do_xrsi5},
+ {"bittgl.c", 0x0000002f, 0x3e0003ff, 0x6007, Rd_Rs_I5, do_rdrsi5},
+ {"bitclr!", 0x6004, 0x7007, 0x00000029, Rd_I5, do16_rdi5},
+ {"bitset!", 0x6005, 0x7007, 0x0000002b, Rd_I5, do16_rdi5},
+ {"bittst!", 0x6006, 0x7007, 0x0000002d, Rd_I5, do16_rdi5},
+ {"bittgl!", 0x6007, 0x7007, 0x0000002f, Rd_I5, do16_rdi5},
+ {"bleu", 0x08000c00, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"ble", 0x08001c00, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"blt", 0x08002400, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bleul", 0x08000c01, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"blel", 0x08001c01, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bltl", 0x08002401, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bl", 0x08003c01, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bleu!", 0x4300, 0x7f00, 0x08000c00, PC_DISP8div2, do16_branch},
+ {"ble!", 0x4700, 0x7f00, 0x08001c00, PC_DISP8div2, do16_branch},
+ {"blt!", 0x4900, 0x7f00, 0x08002400, PC_DISP8div2, do16_branch},
+ {"bmi", 0x08002800, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bmil", 0x08002801, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bmi!", 0x00004a00, 0x00007f00, 0x08002800, PC_DISP8div2, do16_branch},
+ {"bne", 0x08001400, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bnel", 0x08001401, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bne!", 0x4500, 0x7f00, 0x08001400, PC_DISP8div2, do16_branch},
+ {"bpl", 0x08002c00, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bpll", 0x08002c01, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bpl!", 0x4b00, 0x7f00, 0x08002c00, PC_DISP8div2, do16_branch},
+ {"brcs", 0x00000008, 0x3e007fff, 0x0004, x_Rs_x, do_rs},
+ {"brcc", 0x00000408, 0x3e007fff, 0x0104, x_Rs_x, do_rs},
+ {"brgtu", 0x00000808, 0x3e007fff, 0x0204, x_Rs_x, do_rs},
+ {"brleu", 0x00000c08, 0x3e007fff, 0x0304, x_Rs_x, do_rs},
+ {"breq", 0x00001008, 0x3e007fff, 0x0404, x_Rs_x, do_rs},
+ {"brne", 0x00001408, 0x3e007fff, 0x0504, x_Rs_x, do_rs},
+ {"brgt", 0x00001808, 0x3e007fff, 0x0604, x_Rs_x, do_rs},
+ {"brle", 0x00001c08, 0x3e007fff, 0x0704, x_Rs_x, do_rs},
+ {"brge", 0x00002008, 0x3e007fff, 0x0804, x_Rs_x, do_rs},
+ {"brlt", 0x00002408, 0x3e007fff, 0x0904, x_Rs_x, do_rs},
+ {"brmi", 0x00002808, 0x3e007fff, 0x0a04, x_Rs_x, do_rs},
+ {"brpl", 0x00002c08, 0x3e007fff, 0x0b04, x_Rs_x, do_rs},
+ {"brvs", 0x00003008, 0x3e007fff, 0x0c04, x_Rs_x, do_rs},
+ {"brvc", 0x00003408, 0x3e007fff, 0x0d04, x_Rs_x, do_rs},
+ {"brcnz", 0x00003808, 0x3e007fff, 0x0e04, x_Rs_x, do_rs},
+ {"br", 0x00003c08, 0x3e007fff, 0x0f04, x_Rs_x, do_rs},
+ {"brcsl", 0x00000009, 0x3e007fff, 0x000c, x_Rs_x, do_rs},
+ {"brccl", 0x00000409, 0x3e007fff, 0x010c, x_Rs_x, do_rs},
+ {"brgtul", 0x00000809, 0x3e007fff, 0x020c, x_Rs_x, do_rs},
+ {"brleul", 0x00000c09, 0x3e007fff, 0x030c, x_Rs_x, do_rs},
+ {"breql", 0x00001009, 0x3e007fff, 0x040c, x_Rs_x, do_rs},
+ {"brnel", 0x00001409, 0x3e007fff, 0x050c, x_Rs_x, do_rs},
+ {"brgtl", 0x00001809, 0x3e007fff, 0x060c, x_Rs_x, do_rs},
+ {"brlel", 0x00001c09, 0x3e007fff, 0x070c, x_Rs_x, do_rs},
+ {"brgel", 0x00002009, 0x3e007fff, 0x080c, x_Rs_x, do_rs},
+ {"brltl", 0x00002409, 0x3e007fff, 0x090c, x_Rs_x, do_rs},
+ {"brmil", 0x00002809, 0x3e007fff, 0x0a0c, x_Rs_x, do_rs},
+ {"brpll", 0x00002c09, 0x3e007fff, 0x0b0c, x_Rs_x, do_rs},
+ {"brvsl", 0x00003009, 0x3e007fff, 0x0c0c, x_Rs_x, do_rs},
+ {"brvcl", 0x00003409, 0x3e007fff, 0x0d0c, x_Rs_x, do_rs},
+ {"brcnzl", 0x00003809, 0x3e007fff, 0x0e0c, x_Rs_x, do_rs},
+ {"brl", 0x00003c09, 0x3e007fff, 0x0f0c, x_Rs_x, do_rs},
+ {"brcs!", 0x0004, 0x7f0f, 0x00000008, x_Rs, do16_xrs},
+ {"brcc!", 0x0104, 0x7f0f, 0x00000408, x_Rs, do16_xrs},
+ {"brgtu!", 0x0204, 0x7f0f, 0x00000808, x_Rs, do16_xrs},
+ {"brleu!", 0x0304, 0x7f0f, 0x00000c08, x_Rs, do16_xrs},
+ {"breq!", 0x0404, 0x7f0f, 0x00001008, x_Rs, do16_xrs},
+ {"brne!", 0x0504, 0x7f0f, 0x00001408, x_Rs, do16_xrs},
+ {"brgt!", 0x0604, 0x7f0f, 0x00001808, x_Rs, do16_xrs},
+ {"brle!", 0x0704, 0x7f0f, 0x00001c08, x_Rs, do16_xrs},
+ {"brge!", 0x0804, 0x7f0f, 0x00002008, x_Rs, do16_xrs},
+ {"brlt!", 0x0904, 0x7f0f, 0x00002408, x_Rs, do16_xrs},
+ {"brmi!", 0x0a04, 0x7f0f, 0x00002808, x_Rs, do16_xrs},
+ {"brpl!", 0x0b04, 0x7f0f, 0x00002c08, x_Rs, do16_xrs},
+ {"brvs!", 0x0c04, 0x7f0f, 0x00003008, x_Rs, do16_xrs},
+ {"brvc!", 0x0d04, 0x7f0f, 0x00003408, x_Rs, do16_xrs},
+ {"brcnz!", 0x0e04, 0x7f0f, 0x00003808, x_Rs, do16_xrs},
+ {"br!", 0x0f04, 0x7f0f, 0x00003c08, x_Rs, do16_xrs},
+ {"brcsl!", 0x000c, 0x7f0f, 0x00000009, x_Rs, do16_xrs},
+ {"brccl!", 0x010c, 0x7f0f, 0x00000409, x_Rs, do16_xrs},
+ {"brgtul!", 0x020c, 0x7f0f, 0x00000809, x_Rs, do16_xrs},
+ {"brleul!", 0x030c, 0x7f0f, 0x00000c09, x_Rs, do16_xrs},
+ {"breql!", 0x040c, 0x7f0f, 0x00001009, x_Rs, do16_xrs},
+ {"brnel!", 0x050c, 0x7f0f, 0x00001409, x_Rs, do16_xrs},
+ {"brgtl!", 0x060c, 0x7f0f, 0x00001809, x_Rs, do16_xrs},
+ {"brlel!", 0x070c, 0x7f0f, 0x00001c09, x_Rs, do16_xrs},
+ {"brgel!", 0x080c, 0x7f0f, 0x00002009, x_Rs, do16_xrs},
+ {"brltl!", 0x090c, 0x7f0f, 0x00002409, x_Rs, do16_xrs},
+ {"brmil!", 0x0a0c, 0x7f0f, 0x00002809, x_Rs, do16_xrs},
+ {"brpll!", 0x0b0c, 0x7f0f, 0x00002c09, x_Rs, do16_xrs},
+ {"brvsl!", 0x0c0c, 0x7f0f, 0x00003009, x_Rs, do16_xrs},
+ {"brvcl!", 0x0d0c, 0x7f0f, 0x00003409, x_Rs, do16_xrs},
+ {"brcnzl!", 0x0e0c, 0x7f0f, 0x00003809, x_Rs, do16_xrs},
+ {"brl!", 0x0f0c, 0x7f0f, 0x00003c09, x_Rs, do16_xrs},
+ {"bvs", 0x08003000, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bvc", 0x08003400, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"bvsl", 0x08003001, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bvcl", 0x08003401, 0x3e007c01, 0x8000, PC_DISP19div2, do_branch},
+ {"bvs!", 0x4c00, 0x7f00, 0x08003000, PC_DISP8div2, do16_branch},
+ {"bvc!", 0x4d00, 0x7f00, 0x08003400, PC_DISP8div2, do16_branch},
+ {"b!", 0x4f00, 0x7f00, 0x08003c00, PC_DISP8div2, do16_branch},
+ {"b", 0x08003c00, 0x3e007c01, 0x4000, PC_DISP19div2, do_branch},
+ {"cache", 0x30000000, 0x3ff00000, 0x8000, OP5_rvalueRs_SI15, do_cache},
+ {"ceinst", 0x38000000, 0x3e000000, 0x8000, I5_Rs_Rs_I5_OP5, do_ceinst},
+ {"clz", 0x3800000d, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"cmpteq.c", 0x00000019, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"cmptmi.c", 0x00100019, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"cmp.c", 0x00300019, 0x3ff003ff, 0x2003, x_Rs_Rs, do_rsrs},
+ {"cmpzteq.c", 0x0000001b, 0x3ff07fff, 0x8000, x_Rs_x, do_rs},
+ {"cmpztmi.c", 0x0010001b, 0x3ff07fff, 0x8000, x_Rs_x, do_rs},
+ {"cmpz.c", 0x0030001b, 0x3ff07fff, 0x8000, x_Rs_x, do_rs},
+ {"cmpi.c", 0x02040001, 0x3e0e0001, 0x8000, Rd_SI16, do_rdsi16},
+ {"cmp!", 0x2003, 0x700f, 0x00300019, Rd_Rs, do16_rdrs},
+ {"cop1", 0x0c00000c, 0x3e00001f, 0x8000, Rd_Rs_Rs_imm, do_crdcrscrsimm5},
+ {"cop2", 0x0c000014, 0x3e00001f, 0x8000, Rd_Rs_Rs_imm, do_crdcrscrsimm5},
+ {"cop3", 0x0c00001c, 0x3e00001f, 0x8000, Rd_Rs_Rs_imm, do_crdcrscrsimm5},
+ {"drte", 0x0c0000a4, 0x3e0003ff, 0x8000, NO_OPD, do_empty},
+ {"extsb", 0x00000058, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"extsb.c", 0x00000059, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"extsh", 0x0000005a, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"extsh.c", 0x0000005b, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"extzb", 0x0000005c, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"extzb.c", 0x0000005d, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"extzh", 0x0000005e, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"extzh.c", 0x0000005f, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"jl", 0x04000001, 0x3e000001, 0x8000, PC_DISP24div2, do_jump},
+ {"jl!", 0x3001, 0x7001, 0x04000001, PC_DISP11div2, do16_jump},
+ {"j!", 0x3000, 0x7001, 0x04000000, PC_DISP11div2, do16_jump},
+ {"j", 0x04000000, 0x3e000001, 0x8000, PC_DISP24div2, do_jump},
+ {"lbu!", 0x200b, 0x0000700f, 0x2c000000, Rd_rvalueRs, do16_ldst_insn},
+ {"lbup!", 0x7003, 0x7007, 0x2c000000, Rd_rvalueBP_I5, do16_ldst_imm_insn},
+ {"alw", 0x0000000c, 0x3e0003ff, 0x8000, Rd_rvalue32Rs, do_ldst_atomic},
+ {"lcb", 0x00000060, 0x3e0003ff, 0x8000, x_rvalueRs_post4, do_ldst_unalign},
+ {"lcw", 0x00000062, 0x3e0003ff, 0x8000, Rd_rvalueRs_post4, do_ldst_unalign},
+ {"lce", 0x00000066, 0x3e0003ff, 0x8000, Rd_rvalueRs_post4, do_ldst_unalign},
+ {"ldc1", 0x0c00000a, 0x3e00001f, 0x8000, Rd_rvalueRs_SI10, do_ldst_cop},
+ {"ldc2", 0x0c000012, 0x3e00001f, 0x8000, Rd_rvalueRs_SI10, do_ldst_cop},
+ {"ldc3", 0x0c00001a, 0x3e00001f, 0x8000, Rd_rvalueRs_SI10, do_ldst_cop},
+ {"lh!", 0x2009, 0x700f, 0x22000000, Rd_rvalueRs, do16_ldst_insn},
+ {"lhp!", 0x7001, 0x7007, 0x22000000, Rd_rvalueBP_I5, do16_ldst_imm_insn},
+ {"ldi", 0x020c0000, 0x3e0e0000, 0x5000, Rd_SI16, do_rdsi16},
+ {"ldis", 0x0a0c0000, 0x3e0e0000, 0x8000, Rd_I16, do_rdi16},
+ {"ldiu!", 0x5000, 0x7000, 0x020c0000, Rd_I8, do16_ldst_imm_insn},
+ {"lw!", 0x2008, 0x700f, 0x20000000, Rd_rvalueRs, do16_ldst_insn},
+ {"lwp!", 0x7000, 0x7007, 0x20000000, Rd_rvalueBP_I5, do16_ldst_imm_insn},
+ {"mfcel", 0x00000448, 0x3e007fff, 0x8000, Rd_x_x, do_rd},
+ {"mfcel!", 0x1001, 0x7f0f, 0x00000448, x_Rs, do16_rs},
+ {"mad", 0x38000000, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mad.f!", 0x1004, 0x700f, 0x38000080, Rd_Rs, do16_rdrs},
+ {"madh", 0x38000203, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"madh.fs", 0x380002c3, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"madh.fs!", 0x100b, 0x700f, 0x380002c3, Rd_Rs, do16_rdrs},
+ {"madl", 0x38000002, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"madl.fs", 0x380000c2, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"madl.fs!", 0x100a, 0x700f, 0x380000c2, Rd_Rs, do16_rdrs},
+ {"madu", 0x38000020, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"madu!", 0x1005, 0x700f, 0x38000020, Rd_Rs, do16_rdrs},
+ {"mad.f", 0x38000080, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"max", 0x38000007, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"mazh", 0x38000303, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mazh.f", 0x38000383, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mazh.f!", 0x1009, 0x700f, 0x3800038c, Rd_Rs, do16_rdrs},
+ {"mazl", 0x38000102, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mazl.f", 0x38000182, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mazl.f!", 0x1008, 0x700f, 0x38000182, Rd_Rs, do16_rdrs},
+ {"mfceh", 0x00000848, 0x3e007fff, 0x8000, Rd_x_x, do_rd},
+ {"mfceh!", 0x1101, 0x7f0f, 0x00000848, x_Rs, do16_rs},
+ {"mfcehl", 0x00000c48, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mfsr", 0x00000050, 0x3e0003ff, 0x8000, Rd_x_I5, do_rdsrs},
+ {"mfcr", 0x0c000001, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mfc1", 0x0c000009, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mfc2", 0x0c000011, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mfc3", 0x0c000019, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mfcc1", 0x0c00000f, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mfcc2", 0x0c000017, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mfcc3", 0x0c00001f, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mhfl!", 0x0002, 0x700f, 0x00003c56, Rd_LowRs, do16_hrdrs},
+ {"min", 0x38000006, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"mlfh!", 0x0001, 0x700f, 0x00003c56, Rd_HighRs, do16_rdhrs},
+ {"msb", 0x38000001, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"msb.f!", 0x1006, 0x700f, 0x38000081, Rd_Rs, do16_rdrs},
+ {"msbh", 0x38000205, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"msbh.fs", 0x380002c5, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"msbh.fs!", 0x100f, 0x700f, 0x380002c5, Rd_Rs, do16_rdrs},
+ {"msbl", 0x38000004, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"msbl.fs", 0x380000c4, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"msbl.fs!", 0x100e, 0x700f, 0x380000c4, Rd_Rs, do16_rdrs},
+ {"msbu", 0x38000021, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"msbu!", 0x1007, 0x700f, 0x38000021, Rd_Rs, do16_rdrs},
+ {"msb.f", 0x38000081, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mszh", 0x38000305, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mszh.f", 0x38000385, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mszh.f!", 0x100d, 0x700f, 0x38000385, Rd_Rs, do16_rdrs},
+ {"mszl", 0x38000104, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mszl.f", 0x38000184, 0x3ff003ff, 0x8000, x_Rs_Rs, do_rsrs},
+ {"mszl.f!", 0x100c, 0x700f, 0x38000184, Rd_Rs, do16_rdrs},
+ {"mtcel!", 0x1000, 0x7f0f, 0x0000044a, x_Rs, do16_rs},
+ {"mtcel", 0x0000044a, 0x3e007fff, 0x8000, Rd_x_x, do_rd},
+ {"mtceh", 0x0000084a, 0x3e007fff, 0x8000, Rd_x_x, do_rd},
+ {"mtceh!", 0x1100, 0x7f0f, 0x0000084a, x_Rs, do16_rs},
+ {"mtcehl", 0x00000c4a, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mtsr", 0x00000052, 0x3e0003ff, 0x8000, x_Rs_I5, do_rdsrs},
+ {"mtcr", 0x0c000000, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mtc1", 0x0c000008, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mtc2", 0x0c000010, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mtc3", 0x0c000018, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mtcc1", 0x0c00000e, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mtcc2", 0x0c000016, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mtcc3", 0x0c00001e, 0x3e00001f, 0x8000, Rd_Rs_x, do_rdcrs},
+ {"mul.f!", 0x1002, 0x700f, 0x00000041, Rd_Rs, do16_rdrs},
+ {"mulu!", 0x1003, 0x700f, 0x00000042, Rd_Rs, do16_rdrs},
+ {"mvcs", 0x00000056, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvcc", 0x00000456, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvgtu", 0x00000856, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvleu", 0x00000c56, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mveq", 0x00001056, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvne", 0x00001456, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvgt", 0x00001856, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvle", 0x00001c56, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvge", 0x00002056, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvlt", 0x00002456, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvmi", 0x00002856, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvpl", 0x00002c56, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvvs", 0x00003056, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mvvc", 0x00003456, 0x3e007fff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"mv", 0x00003c56, 0x3e007fff, 0x0003, Rd_Rs_x, do_rdrs},
+ {"mv!", 0x0003, 0x700f, 0x00003c56, Rd_Rs, do16_mv_rdrs},
+ {"neg", 0x0000001e, 0x3e0003ff, 0x8000, Rd_x_Rs, do_rdxrs},
+ {"neg.c", 0x0000001f, 0x3e0003ff, 0x2002, Rd_x_Rs, do_rdxrs},
+ {"neg!", 0x2002, 0x700f, 0x0000001f, Rd_Rs, do16_rdrs},
+ {"nop", 0x00000000, 0x3e0003ff, 0x0000, NO_OPD, do_empty},
+ {"not", 0x00000024, 0x3e0003ff, 0x8000, Rd_Rs_x, do_rdrs},
+ {"not.c", 0x00000025, 0x3e0003ff, 0x2006, Rd_Rs_x, do_rdrs},
+ {"nop!", 0x0000, 0x700f, 0x00000000, NO16_OPD, do_empty},
+ {"not!", 0x2006, 0x700f, 0x00000025, Rd_Rs, do16_rdrs},
+ {"or", 0x00000022, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"or.c", 0x00000023, 0x3e0003ff, 0x2005, Rd_Rs_Rs, do_rdrsrs},
+ {"ori", 0x020a0000, 0x3e0e0001, 0x8000, Rd_I16, do_rdi16},
+ {"ori.c", 0x020a0001, 0x3e0e0001, 0x8000, Rd_I16, do_rdi16},
+ {"oris", 0x0a0a0000, 0x3e0e0001, 0x8000, Rd_I16, do_rdi16},
+ {"oris.c", 0x0a0a0001, 0x3e0e0001, 0x8000, Rd_I16, do_rdi16},
+ {"orri", 0x1a000000, 0x3e000001, 0x8000, Rd_Rs_I14, do_rdrsi14},
+ {"orri.c", 0x1a000001, 0x3e000001, 0x8000, Rd_Rs_I14, do_rdrsi14},
+ {"or!", 0x2005, 0x700f, 0x00000023, Rd_Rs, do16_rdrs},
+ {"pflush", 0x0000000a, 0x3e0003ff, 0x8000, NO_OPD, do_empty},
+ {"pop!", 0x200a, 0x700f, 0x0e000000, Rd_rvalueRs, do16_push_pop},
+ {"push!", 0x200e, 0x700f, 0x06000004, Rd_lvalueRs, do16_push_pop},
+ {"ror", 0x00000038, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"ror.c", 0x00000039, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"rorc.c", 0x0000003b, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"rol", 0x0000003c, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"rol.c", 0x0000003d, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"rolc.c", 0x0000003f, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"rori", 0x00000078, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"rori.c", 0x00000079, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"roric.c", 0x0000007b, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"roli", 0x0000007c, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"roli.c", 0x0000007d, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"rolic.c", 0x0000007f, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"rte", 0x0c000084, 0x3e0003ff, 0x8000, NO_OPD, do_empty},
+ {"sb!", 0x200f, 0x700f, 0x2e000000, Rd_lvalueRs, do16_ldst_insn},
+ {"sbp!", 0x7007, 0x7007, 0x2e000000, Rd_lvalueBP_I5, do16_ldst_imm_insn},
+ {"asw", 0x0000000e, 0x3e0003ff, 0x8000, Rd_lvalue32Rs, do_ldst_atomic},
+ {"scb", 0x00000068, 0x3e0003ff, 0x8000, Rd_lvalueRs_post4, do_ldst_unalign},
+ {"scw", 0x0000006a, 0x3e0003ff, 0x8000, Rd_lvalueRs_post4, do_ldst_unalign},
+ {"sce", 0x0000006e, 0x3e0003ff, 0x8000, x_lvalueRs_post4, do_ldst_unalign},
+ {"sdbbp", 0x00000006, 0x3e0003ff, 0x6002, x_I5_x, do_xi5x},
+ {"sdbbp!", 0x6002, 0x7007, 0x00000006, Rd_I5, do16_xi5},
+ {"sh!", 0x200d, 0x700f, 0x2a000000, Rd_lvalueRs, do16_ldst_insn},
+ {"shp!", 0x7005, 0x7007, 0x2a000000, Rd_lvalueBP_I5, do16_ldst_imm_insn},
+ {"sleep", 0x0c0000c4, 0x3e0003ff, 0x8000, NO_OPD, do_empty},
+ {"sll", 0x00000030, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"sll.c", 0x00000031, 0x3e0003ff, 0x0008, Rd_Rs_Rs, do_rdrsrs},
+ {"sll.s", 0x3800004e, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"slli", 0x00000070, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"slli.c", 0x00000071, 0x3e0003ff, 0x6001, Rd_Rs_I5, do_rdrsi5},
+ {"sll!", 0x0008, 0x700f, 0x00000031, Rd_Rs, do16_rdrs},
+ {"slli!", 0x6001, 0x7007, 0x00000071, Rd_I5, do16_rdi5},
+ {"srl", 0x00000034, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"srl.c", 0x00000035, 0x3e0003ff, 0x000a, Rd_Rs_Rs, do_rdrsrs},
+ {"sra", 0x00000036, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"sra.c", 0x00000037, 0x3e0003ff, 0x000b, Rd_Rs_Rs, do_rdrsrs},
+ {"srli", 0x00000074, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"srli.c", 0x00000075, 0x3e0003ff, 0x6003, Rd_Rs_I5, do_rdrsi5},
+ {"srai", 0x00000076, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"srai.c", 0x00000077, 0x3e0003ff, 0x8000, Rd_Rs_I5, do_rdrsi5},
+ {"srl!", 0x000a, 0x700f, 0x00000035, Rd_Rs, do16_rdrs},
+ {"sra!", 0x000b, 0x700f, 0x00000037, Rd_Rs, do16_rdrs},
+ {"srli!", 0x6003, 0x7007, 0x00000075, Rd_Rs, do16_rdi5},
+ {"stc1", 0x0c00000b, 0x3e00001f, 0x8000, Rd_lvalueRs_SI10, do_ldst_cop},
+ {"stc2", 0x0c000013, 0x3e00001f, 0x8000, Rd_lvalueRs_SI10, do_ldst_cop},
+ {"stc3", 0x0c00001b, 0x3e00001f, 0x8000, Rd_lvalueRs_SI10, do_ldst_cop},
+ {"sub", 0x00000014, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"sub.c", 0x00000015, 0x3e0003ff, 0x2001, Rd_Rs_Rs, do_rdrsrs},
+ {"sub.s", 0x38000049, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"subc", 0x00000016, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"subc.c", 0x00000017, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"sub!", 0x2001, 0x700f, 0x00000015, Rd_Rs, do16_rdrs},
+ {"subei!", 0x6080, 0x7087, 0x02000001, Rd_I4, do16_rdi4},
+ {"sw!", 0x200c, 0x700f, 0x28000000, Rd_lvalueRs, do16_ldst_insn},
+ {"swp!", 0x7004, 0x7007, 0x28000000, Rd_lvalueBP_I5, do16_ldst_imm_insn},
+ {"syscall", 0x00000002, 0x3e0003ff, 0x8000, I15, do_i15},
+ {"tcs", 0x00000054, 0x3e007fff, 0x0005, NO_OPD, do_empty},
+ {"tcc", 0x00000454, 0x3e007fff, 0x0105, NO_OPD, do_empty},
+ {"tcnz", 0x00003854, 0x3e007fff, 0x0e05, NO_OPD, do_empty},
+ {"tcs!", 0x0005, 0x7f0f, 0x00000054, NO16_OPD, do_empty},
+ {"tcc!", 0x0105, 0x7f0f, 0x00000454, NO16_OPD, do_empty},
+ {"tcnz!", 0x0e05, 0x7f0f, 0x00003854, NO16_OPD, do_empty},
+ {"teq", 0x00001054, 0x3e007fff, 0x0405, NO_OPD, do_empty},
+ {"teq!", 0x0405, 0x7f0f, 0x00001054, NO16_OPD, do_empty},
+ {"tgtu", 0x00000854, 0x3e007fff, 0x0205, NO_OPD, do_empty},
+ {"tgt", 0x00001854, 0x3e007fff, 0x0605, NO_OPD, do_empty},
+ {"tge", 0x00002054, 0x3e007fff, 0x0805, NO_OPD, do_empty},
+ {"tgtu!", 0x0205, 0x7f0f, 0x00000854, NO16_OPD, do_empty},
+ {"tgt!", 0x0605, 0x7f0f, 0x00001854, NO16_OPD, do_empty},
+ {"tge!", 0x0805, 0x7f0f, 0x00002054, NO16_OPD, do_empty},
+ {"tleu", 0x00000c54, 0x3e007fff, 0x0305, NO_OPD, do_empty},
+ {"tle", 0x00001c54, 0x3e007fff, 0x0705, NO_OPD, do_empty},
+ {"tlt", 0x00002454, 0x3e007fff, 0x0905, NO_OPD, do_empty},
+ {"stlb", 0x0c000004, 0x3e0003ff, 0x8000, NO_OPD, do_empty},
+ {"mftlb", 0x0c000024, 0x3e0003ff, 0x8000, NO_OPD, do_empty},
+ {"mtptlb", 0x0c000044, 0x3e0003ff, 0x8000, NO_OPD, do_empty},
+ {"mtrtlb", 0x0c000064, 0x3e0003ff, 0x8000, NO_OPD, do_empty},
+ {"tleu!", 0x0305, 0x7f0f, 0x00000c54, NO16_OPD, do_empty},
+ {"tle!", 0x0705, 0x7f0f, 0x00001c54, NO16_OPD, do_empty},
+ {"tlt!", 0x0905, 0x7f0f, 0x00002454, NO16_OPD, do_empty},
+ {"tmi", 0x00002854, 0x3e007fff, 0x0a05, NO_OPD, do_empty},
+ {"tmi!", 0x0a05, 0x7f0f, 0x00002854, NO16_OPD, do_empty},
+ {"tne", 0x00001454, 0x3e007fff, 0x0505, NO_OPD, do_empty},
+ {"tne!", 0x0505, 0x7f0f, 0x00001454, NO16_OPD, do_empty},
+ {"tpl", 0x00002c54, 0x3e007fff, 0x0b05, NO_OPD, do_empty},
+ {"tpl!", 0x0b05, 0x7f0f, 0x00002c54, NO16_OPD, do_empty},
+ {"trapcs", 0x00000004, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapcc", 0x00000404, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapgtu", 0x00000804, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapleu", 0x00000c04, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapeq", 0x00001004, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapne", 0x00001404, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapgt", 0x00001804, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"traple", 0x00001c04, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapge", 0x00002004, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"traplt", 0x00002404, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapmi", 0x00002804, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trappl", 0x00002c04, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapvs", 0x00003004, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trapvc", 0x00003404, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"trap", 0x00003c04, 0x3e007fff, 0x8000, x_I5_x, do_xi5x},
+ {"tset", 0x00003c54, 0x3e007fff, 0x0f05, NO_OPD, do_empty},
+ {"tset!", 0x0f05, 0x00007f0f, 0x00003c54, NO16_OPD, do_empty},
+ {"tvs", 0x00003054, 0x3e007fff, 0x0c05, NO_OPD, do_empty},
+ {"tvc", 0x00003454, 0x3e007fff, 0x0d05, NO_OPD, do_empty},
+ {"tvs!", 0x0c05, 0x7f0f, 0x00003054, NO16_OPD, do_empty},
+ {"tvc!", 0x0d05, 0x7f0f, 0x00003454, NO16_OPD, do_empty},
+ {"xor", 0x00000026, 0x3e0003ff, 0x8000, Rd_Rs_Rs, do_rdrsrs},
+ {"xor.c", 0x00000027, 0x3e0003ff, 0x2007, Rd_Rs_Rs, do_rdrsrs},
+ {"xor!", 0x2007, 0x700f, 0x00000027, Rd_Rs, do16_rdrs},
+ /* Macro instruction. */
+ {"li", 0x020c0000, 0x3e0e0000, 0x8000, Insn_Type_SYN, do_macro_li_rdi32},
+ /* la reg, imm32 -->(1) ldi reg, simm16
+ (2) ldis reg, %HI(imm32)
+ ori reg, %LO(imm32)
+
+ la reg, symbol -->(1) lis reg, %HI(imm32)
+ ori reg, %LO(imm32) */
+ {"la", 0x020c0000, 0x3e0e0000, 0x8000, Insn_Type_SYN, do_macro_la_rdi32},
+ {"div", 0x00000044, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"divu", 0x00000046, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"rem", 0x00000044, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"remu", 0x00000046, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"mul", 0x00000040, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"mulu", 0x00000042, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"maz", 0x00000040, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"mazu", 0x00000042, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"mul.f", 0x00000041, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"maz.f", 0x00000041, 0x3e0003ff, 0x8000, Insn_Type_SYN, do_macro_mul_rdrsrs},
+ {"lb", INSN_LB, 0x00000000, 0x8000, Insn_Type_SYN, do_macro_ldst_label},
+ {"lbu", INSN_LBU, 0x00000000, 0x200b, Insn_Type_SYN, do_macro_ldst_label},
+ {"lh", INSN_LH, 0x00000000, 0x2009, Insn_Type_SYN, do_macro_ldst_label},
+ {"lhu", INSN_LHU, 0x00000000, 0x8000, Insn_Type_SYN, do_macro_ldst_label},
+ {"lw", INSN_LW, 0x00000000, 0x2008, Insn_Type_SYN, do_macro_ldst_label},
+ {"sb", INSN_SB, 0x00000000, 0x200f, Insn_Type_SYN, do_macro_ldst_label},
+ {"sh", INSN_SH, 0x00000000, 0x200d, Insn_Type_SYN, do_macro_ldst_label},
+ {"sw", INSN_SW, 0x00000000, 0x200c, Insn_Type_SYN, do_macro_ldst_label},
+ /* Assembler use internal. */
+ {"ld_i32hi", 0x0a0c0000, 0x3e0e0000, 0x8000, Insn_internal, do_macro_rdi32hi},
+ {"ld_i32lo", 0x020a0000, 0x3e0e0001, 0x8000, Insn_internal, do_macro_rdi32lo},
+ {"ldis_pic", 0x0a0c0000, 0x3e0e0000, 0x5000, Insn_internal, do_rdi16_pic},
+ {"addi_s_pic",0x02000000, 0x3e0e0001, 0x8000, Insn_internal, do_addi_s_pic},
+ {"addi_u_pic",0x02000000, 0x3e0e0001, 0x8000, Insn_internal, do_addi_u_pic},
+ {"lw_pic", 0x20000000, 0x3e000000, 0x8000, Insn_internal, do_lw_pic},
+};
+
+/* Next free entry in the pool. */
+int next_literal_pool_place = 0;
+
+/* Next literal pool number. */
+int lit_pool_num = 1;
+symbolS *current_poolP = NULL;
+
+
+static int
+end_of_line (char *str)
+{
+ int retval = SUCCESS;
+
+ skip_whitespace (str);
+ if (*str != '\0')
+ {
+ retval = (int) FAIL;
+
+ if (!inst.error)
+ inst.error = BAD_GARBAGE;
+ }
+
+ return retval;
+}
+
+static int
+score_reg_parse (char **ccp, struct hash_control *htab)
+{
+ char *start = *ccp;
+ char c;
+ char *p;
+ struct reg_entry *reg;
+
+ p = start;
+ if (!ISALPHA (*p) || !is_name_beginner (*p))
+ return (int) FAIL;
+
+ c = *p++;
+
+ while (ISALPHA (c) || ISDIGIT (c) || c == '_')
+ c = *p++;
+
+ *--p = 0;
+ reg = (struct reg_entry *) hash_find (htab, start);
+ *p = c;
+
+ if (reg)
+ {
+ *ccp = p;
+ return reg->number;
+ }
+ return (int) FAIL;
+}
+
+/* If shift <= 0, only return reg. */
+
+static int
+reg_required_here (char **str, int shift, enum score_reg_type reg_type)
+{
+ static char buff[MAX_LITERAL_POOL_SIZE];
+ int reg = (int) FAIL;
+ char *start = *str;
+
+ if ((reg = score_reg_parse (str, all_reg_maps[reg_type].htab)) != (int) FAIL)
+ {
+ if (reg_type == REG_TYPE_SCORE)
+ {
+ if ((reg == 1) && (nor1 == 1) && (inst.bwarn == 0))
+ {
+ as_warn (_("Using temp register(r1)"));
+ inst.bwarn = 1;
+ }
+ }
+ if (shift >= 0)
+ {
+ if (reg_type == REG_TYPE_SCORE_CR)
+ strcpy (inst.reg, score_crn_table[reg].name);
+ else if (reg_type == REG_TYPE_SCORE_SR)
+ strcpy (inst.reg, score_srn_table[reg].name);
+ else
+ strcpy (inst.reg, "");
+
+ inst.instruction |= reg << shift;
+ }
+ }
+ else
+ {
+ *str = start;
+ sprintf (buff, _("register expected, not '%.100s'"), start);
+ inst.error = buff;
+ }
+
+ return reg;
+}
+
+static int
+skip_past_comma (char **str)
+{
+ char *p = *str;
+ char c;
+ int comma = 0;
+
+ while ((c = *p) == ' ' || c == ',')
+ {
+ p++;
+ if (c == ',' && comma++)
+ {
+ inst.error = BAD_SKIP_COMMA;
+ return (int) FAIL;
+ }
+ }
+
+ if ((c == '\0') || (comma == 0))
+ {
+ inst.error = BAD_SKIP_COMMA;
+ return (int) FAIL;
+ }
+
+ *str = p;
+ return comma ? SUCCESS : (int) FAIL;
+}
+
+static void
+do_rdrsrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 10, REG_TYPE_SCORE) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ if ((((inst.instruction >> 15) & 0x10) == 0)
+ && (((inst.instruction >> 10) & 0x10) == 0)
+ && (((inst.instruction >> 20) & 0x10) == 0)
+ && (inst.relax_inst != 0x8000)
+ && (((inst.instruction >> 20) & 0xf) == ((inst.instruction >> 15) & 0xf)))
+ {
+ inst.relax_inst |= (((inst.instruction >> 10) & 0xf) << 4)
+ | (((inst.instruction >> 15) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+}
+
+static int
+walk_no_bignums (symbolS * sp)
+{
+ if (symbol_get_value_expression (sp)->X_op == O_big)
+ return 1;
+
+ if (symbol_get_value_expression (sp)->X_add_symbol)
+ return (walk_no_bignums (symbol_get_value_expression (sp)->X_add_symbol)
+ || (symbol_get_value_expression (sp)->X_op_symbol
+ && walk_no_bignums (symbol_get_value_expression (sp)->X_op_symbol)));
+
+ return 0;
+}
+
+static int
+my_get_expression (expressionS * ep, char **str)
+{
+ char *save_in;
+ segT seg;
+
+ 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)
+ {
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ inst.error = _("illegal expression");
+ return (int) FAIL;
+ }
+ /* Get rid of any bignums now, so that we don't generate an error for which
+ we can't establish a line number later on. Big numbers are never valid
+ in instructions, which is where this routine is always called. */
+ if (ep->X_op == O_big
+ || (ep->X_add_symbol
+ && (walk_no_bignums (ep->X_add_symbol)
+ || (ep->X_op_symbol && walk_no_bignums (ep->X_op_symbol)))))
+ {
+ inst.error = _("invalid constant");
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return (int) FAIL;
+ }
+
+ if ((ep->X_add_symbol != NULL)
+ && (inst.type != PC_DISP19div2)
+ && (inst.type != PC_DISP8div2)
+ && (inst.type != PC_DISP24div2)
+ && (inst.type != PC_DISP11div2)
+ && (inst.type != Insn_Type_SYN)
+ && (inst.type != Rd_rvalueRs_SI15)
+ && (inst.type != Rd_lvalueRs_SI15)
+ && (inst.type != Insn_internal))
+ {
+ inst.error = BAD_ARGS;
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return (int) FAIL;
+ }
+
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return SUCCESS;
+}
+
+/* Check if an immediate is valid. If so, convert it to the right format. */
+
+static int
+validate_immediate (int val, unsigned int data_type, int hex_p)
+{
+ switch (data_type)
+ {
+ case _VALUE_HI16:
+ {
+ int val_hi = ((val & 0xffff0000) >> 16);
+
+ if (score_df_range[data_type].range[0] <= val_hi
+ && val_hi <= score_df_range[data_type].range[1])
+ return val_hi;
+ }
+ break;
+
+ case _VALUE_LO16:
+ {
+ int val_lo = (val & 0xffff);
+
+ if (score_df_range[data_type].range[0] <= val_lo
+ && val_lo <= score_df_range[data_type].range[1])
+ return val_lo;
+ }
+ break;
+
+ case _VALUE:
+ return val;
+ break;
+
+ case _SIMM14:
+ if (hex_p == 1)
+ {
+ if (!(val >= -0x2000 && val <= 0x3fff))
+ {
+ return (int) FAIL;
+ }
+ }
+ else
+ {
+ if (!(val >= -8192 && val <= 8191))
+ {
+ return (int) FAIL;
+ }
+ }
+
+ return val;
+ break;
+
+ case _SIMM16_NEG:
+ if (hex_p == 1)
+ {
+ if (!(val >= -0x7fff && val <= 0xffff && val != 0x8000))
+ {
+ return (int) FAIL;
+ }
+ }
+ else
+ {
+ if (!(val >= -32767 && val <= 32768))
+ {
+ return (int) FAIL;
+ }
+ }
+
+ val = -val;
+ return val;
+ break;
+
+ default:
+ if (data_type == _SIMM14_NEG || data_type == _IMM16_NEG)
+ val = -val;
+
+ if (score_df_range[data_type].range[0] <= val
+ && val <= score_df_range[data_type].range[1])
+ return val;
+
+ break;
+ }
+
+ return (int) FAIL;
+}
+
+static int
+data_op2 (char **str, int shift, enum score_data_type data_type)
+{
+ int value;
+ char data_exp[MAX_LITERAL_POOL_SIZE];
+ char *dataptr;
+ int cnt = 0;
+ char *pp = NULL;
+
+ skip_whitespace (*str);
+ inst.error = NULL;
+ dataptr = * str;
+
+ /* Set hex_p to zero. */
+ int hex_p = 0;
+
+ while ((*dataptr != '\0') && (*dataptr != '|') && (cnt <= MAX_LITERAL_POOL_SIZE)) /* 0x7c = ='|' */
+ {
+ data_exp[cnt] = *dataptr;
+ dataptr++;
+ cnt++;
+ }
+
+ data_exp[cnt] = '\0';
+ pp = (char *)&data_exp;
+
+ if (*dataptr == '|') /* process PCE */
+ {
+ if (my_get_expression (&inst.reloc.exp, &pp) == (int) FAIL)
+ return (int) FAIL;
+ end_of_line (pp);
+ if (inst.error != 0)
+ return (int) FAIL; /* to ouptut_inst to printf out the error */
+ *str = dataptr;
+ }
+ else /* process 16 bit */
+ {
+ if (my_get_expression (&inst.reloc.exp, str) == (int) FAIL)
+ {
+ return (int) FAIL;
+ }
+
+ dataptr = (char *)data_exp;
+ for (; *dataptr != '\0'; dataptr++)
+ {
+ *dataptr = TOLOWER (*dataptr);
+ if (*dataptr == '!' || *dataptr == ' ')
+ break;
+ }
+ dataptr = (char *)data_exp;
+
+ if ((dataptr != NULL)
+ && (((strstr (dataptr, "0x")) != NULL)
+ || ((strstr (dataptr, "0X")) != NULL)))
+ {
+ hex_p = 1;
+ if ((data_type != _SIMM16_LA)
+ && (data_type != _VALUE_HI16)
+ && (data_type != _VALUE_LO16)
+ && (data_type != _IMM16)
+ && (data_type != _IMM15)
+ && (data_type != _IMM14)
+ && (data_type != _IMM4)
+ && (data_type != _IMM5)
+ && (data_type != _IMM8)
+ && (data_type != _IMM5_RSHIFT_1)
+ && (data_type != _IMM5_RSHIFT_2)
+ && (data_type != _SIMM14)
+ && (data_type != _SIMM14_NEG)
+ && (data_type != _SIMM16_NEG)
+ && (data_type != _IMM10_RSHIFT_2)
+ && (data_type != _GP_IMM15))
+ {
+ data_type += 24;
+ }
+ }
+
+ if ((inst.reloc.exp.X_add_number == 0)
+ && (inst.type != Insn_Type_SYN)
+ && (inst.type != Rd_rvalueRs_SI15)
+ && (inst.type != Rd_lvalueRs_SI15)
+ && (inst.type != Insn_internal)
+ && (((*dataptr >= 'a') && (*dataptr <= 'z'))
+ || ((*dataptr == '0') && (*(dataptr + 1) == 'x') && (*(dataptr + 2) != '0'))
+ || ((*dataptr == '+') && (*(dataptr + 1) != '0'))
+ || ((*dataptr == '-') && (*(dataptr + 1) != '0'))))
+ {
+ inst.error = BAD_ARGS;
+ return (int) FAIL;
+ }
+ }
+
+ if ((inst.reloc.exp.X_add_symbol)
+ && ((data_type == _SIMM16)
+ || (data_type == _SIMM16_NEG)
+ || (data_type == _IMM16_NEG)
+ || (data_type == _SIMM14)
+ || (data_type == _SIMM14_NEG)
+ || (data_type == _IMM5)
+ || (data_type == _IMM14)
+ || (data_type == _IMM20)
+ || (data_type == _IMM16)
+ || (data_type == _IMM15)
+ || (data_type == _IMM4)))
+ {
+ inst.error = BAD_ARGS;
+ return (int) FAIL;
+ }
+
+ if (inst.reloc.exp.X_add_symbol)
+ {
+ switch (data_type)
+ {
+ case _SIMM16_LA:
+ return (int) FAIL;
+ case _VALUE_HI16:
+ inst.reloc.type = BFD_RELOC_HI16_S;
+ inst.reloc.pc_rel = 0;
+ break;
+ case _VALUE_LO16:
+ inst.reloc.type = BFD_RELOC_LO16;
+ inst.reloc.pc_rel = 0;
+ break;
+ case _GP_IMM15:
+ inst.reloc.type = BFD_RELOC_SCORE_GPREL15;
+ inst.reloc.pc_rel = 0;
+ break;
+ case _SIMM16_pic:
+ case _IMM16_LO16_pic:
+ inst.reloc.type = BFD_RELOC_SCORE_GOT_LO16;
+ inst.reloc.pc_rel = 0;
+ break;
+ default:
+ inst.reloc.type = BFD_RELOC_32;
+ inst.reloc.pc_rel = 0;
+ break;
+ }
+ }
+ else
+ {
+ if (data_type == _IMM16_pic)
+ {
+ inst.reloc.type = BFD_RELOC_SCORE_DUMMY_HI16;
+ inst.reloc.pc_rel = 0;
+ }
+
+ if (data_type == _SIMM16_LA && inst.reloc.exp.X_unsigned == 1)
+ {
+ value = validate_immediate (inst.reloc.exp.X_add_number, _SIMM16_LA_POS, hex_p);
+ if (value == (int) FAIL) /* for advance to check if this is ldis */
+ if ((inst.reloc.exp.X_add_number & 0xffff) == 0)
+ {
+ inst.instruction |= 0x8000000;
+ inst.instruction |= ((inst.reloc.exp.X_add_number >> 16) << 1) & 0x1fffe;
+ return SUCCESS;
+ }
+ }
+ else
+ {
+ value = validate_immediate (inst.reloc.exp.X_add_number, data_type, hex_p);
+ }
+
+ if (value == (int) FAIL)
+ {
+ if ((data_type != _SIMM14_NEG) && (data_type != _SIMM16_NEG) && (data_type != _IMM16_NEG))
+ {
+ sprintf (err_msg,
+ _("invalid constant: %d bit expression not in range %d..%d"),
+ score_df_range[data_type].bits,
+ score_df_range[data_type].range[0], score_df_range[data_type].range[1]);
+ }
+ else
+ {
+ sprintf (err_msg,
+ _("invalid constant: %d bit expression not in range %d..%d"),
+ score_df_range[data_type].bits,
+ -score_df_range[data_type].range[1], -score_df_range[data_type].range[0]);
+ }
+
+ inst.error = err_msg;
+ return (int) FAIL;
+ }
+
+ if ((score_df_range[data_type].range[0] != 0) || (data_type == _IMM5_RANGE_8_31))
+ {
+ value &= (1 << score_df_range[data_type].bits) - 1;
+ }
+
+ inst.instruction |= value << shift;
+ }
+
+ if ((inst.instruction & 0xf0000000) == 0x30000000)
+ {
+ if ((((inst.instruction >> 20) & 0x1F) != 0)
+ && (((inst.instruction >> 20) & 0x1F) != 1)
+ && (((inst.instruction >> 20) & 0x1F) != 2)
+ && (((inst.instruction >> 20) & 0x1F) != 3)
+ && (((inst.instruction >> 20) & 0x1F) != 4)
+ && (((inst.instruction >> 20) & 0x1F) != 8)
+ && (((inst.instruction >> 20) & 0x1F) != 9)
+ && (((inst.instruction >> 20) & 0x1F) != 0xa)
+ && (((inst.instruction >> 20) & 0x1F) != 0xb)
+ && (((inst.instruction >> 20) & 0x1F) != 0xc)
+ && (((inst.instruction >> 20) & 0x1F) != 0xd)
+ && (((inst.instruction >> 20) & 0x1F) != 0xe)
+ && (((inst.instruction >> 20) & 0x1F) != 0x10)
+ && (((inst.instruction >> 20) & 0x1F) != 0x11)
+ && (((inst.instruction >> 20) & 0x1F) != 0x18)
+ && (((inst.instruction >> 20) & 0x1F) != 0x1A)
+ && (((inst.instruction >> 20) & 0x1F) != 0x1B)
+ && (((inst.instruction >> 20) & 0x1F) != 0x1d)
+ && (((inst.instruction >> 20) & 0x1F) != 0x1e)
+ && (((inst.instruction >> 20) & 0x1F) != 0x1f))
+ {
+ inst.error = _("invalid constant: bit expression not defined");
+ return (int) FAIL;
+ }
+ }
+
+ return SUCCESS;
+}
+
+/* Handle addi/addi.c/addis.c/cmpi.c/addis.c/ldi. */
+
+static void
+do_rdsi16 (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || data_op2 (&str, 1, _SIMM16) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+
+ /* ldi. */
+ if ((inst.instruction & 0x20c0000) == 0x20c0000)
+ {
+ if ((((inst.instruction >> 20) & 0x10) == 0x10) || ((inst.instruction & 0x1fe00) != 0))
+ {
+ inst.relax_inst = 0x8000;
+ }
+ else
+ {
+ inst.relax_inst |= (inst.instruction >> 1) & 0xff;
+ inst.relax_inst |= (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ }
+ else if (((inst.instruction >> 20) & 0x10) == 0x10)
+ {
+ inst.relax_inst = 0x8000;
+ }
+}
+
+/* Handle subi/subi.c. */
+
+static void
+do_sub_rdsi16 (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && data_op2 (&str, 1, _SIMM16_NEG) != (int) FAIL)
+ end_of_line (str);
+}
+
+/* Handle addri/addri.c. */
+
+static void
+do_rdrssi14 (char *str) /* -(2^13)~((2^13)-1) */
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && reg_required_here (&str, 15, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL)
+ data_op2 (&str, 1, _SIMM14);
+}
+
+/* Handle subri.c/subri. */
+static void
+do_sub_rdrssi14 (char *str) /* -(2^13)~((2^13)-1) */
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && reg_required_here (&str, 15, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && data_op2 (&str, 1, _SIMM14_NEG) != (int) FAIL)
+ end_of_line (str);
+}
+
+/* Handle bitclr.c/bitset.c/bittgl.c/slli.c/srai.c/srli.c/roli.c/rori.c/rolic.c. */
+static void
+do_rdrsi5 (char *str) /* 0~((2^14)-1) */
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || data_op2 (&str, 10, _IMM5) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+
+ if ((((inst.instruction >> 20) & 0x1f) == ((inst.instruction >> 15) & 0x1f))
+ && (inst.relax_inst != 0x8000) && (((inst.instruction >> 15) & 0x10) == 0))
+ {
+ inst.relax_inst |= (((inst.instruction >> 10) & 0x1f) << 3) | (((inst.instruction >> 15) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ else
+ inst.relax_inst = 0x8000;
+}
+
+/* Handle andri/orri/andri.c/orri.c. */
+
+static void
+do_rdrsi14 (char *str) /* 0 ~ ((2^14)-1) */
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && reg_required_here (&str, 15, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && data_op2 (&str, 1, _IMM14) != (int) FAIL)
+ end_of_line (str);
+}
+
+/* Handle bittst.c. */
+static void
+do_xrsi5 (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || data_op2 (&str, 10, _IMM5) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+
+ if ((inst.relax_inst != 0x8000) && (((inst.instruction >> 15) & 0x10) == 0))
+ {
+ inst.relax_inst |= (((inst.instruction >> 10) & 0x1f) << 3) | (((inst.instruction >> 15) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ else
+ inst.relax_inst = 0x8000;
+}
+
+/* Handle addis/andi/ori/andis/oris/ldis. */
+static void
+do_rdi16 (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || data_op2 (&str, 1, _IMM16) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+ /*
+ if (((inst.instruction & 0xa0dfffe) != 0xa0c0000) || ((((inst.instruction >> 20) & 0x1f) & 0x10) == 0x10))
+ inst.relax_inst = 0x8000;
+ else
+ inst.relax_size = 2;
+ */
+}
+
+static void
+do_macro_rdi32hi (char *str)
+{
+ skip_whitespace (str);
+
+ /* Do not handle end_of_line(). */
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL)
+ data_op2 (&str, 1, _VALUE_HI16);
+}
+
+static void
+do_macro_rdi32lo (char *str)
+{
+ skip_whitespace (str);
+
+ /* Do not handle end_of_line(). */
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL)
+ data_op2 (&str, 1, _VALUE_LO16);
+}
+
+/* Handle ldis_pic. */
+
+static void
+do_rdi16_pic (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && data_op2 (&str, 1, _IMM16_pic) != (int) FAIL)
+ end_of_line (str);
+}
+
+/* Handle addi_s_pic to generate R_SCORE_GOT_LO16 . */
+
+static void
+do_addi_s_pic (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && data_op2 (&str, 1, _SIMM16_pic) != (int) FAIL)
+ end_of_line (str);
+}
+
+/* Handle addi_u_pic to generate R_SCORE_GOT_LO16 . */
+
+static void
+do_addi_u_pic (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && data_op2 (&str, 1, _IMM16_LO16_pic) != (int) FAIL)
+ end_of_line (str);
+}
+
+/* Handle mfceh/mfcel/mtceh/mtchl. */
+
+static void
+do_rd (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL)
+ end_of_line (str);
+}
+
+static void
+do_rs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+
+ if ((inst.relax_inst != 0x8000) && (((inst.instruction >> 15) & 0x10) == 0))
+ {
+ inst.relax_inst |= (((inst.instruction >> 10) & 0xf) << 8) | (((inst.instruction >> 15) & 0xf) << 4);
+ inst.relax_size = 2;
+ }
+ else
+ inst.relax_inst = 0x8000;
+}
+
+static void
+do_i15 (char *str)
+{
+ skip_whitespace (str);
+
+ if (data_op2 (&str, 10, _IMM15) != (int) FAIL)
+ end_of_line (str);
+}
+
+static void
+do_xi5x (char *str)
+{
+ skip_whitespace (str);
+
+ if (data_op2 (&str, 15, _IMM5) == (int) FAIL || end_of_line (str) == (int) FAIL)
+ return;
+
+ if (inst.relax_inst != 0x8000)
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0x1f) << 3);
+ inst.relax_size = 2;
+ }
+}
+
+static void
+do_rdrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+
+ if (inst.relax_inst != 0x8000)
+ {
+ if (((inst.instruction & 0x7f) == 0x56)) /* adjust mv -> mv! / mlfh! / mhfl! */
+ {
+ /* mlfh */
+ if ((((inst.instruction >> 15) & 0x10) != 0x0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ inst.relax_inst = 0x00000001 | (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ /* mhfl */
+ else if ((((inst.instruction >> 15) & 0x10) == 0x0) && ((inst.instruction >> 20) & 0x10) != 0)
+ {
+ inst.relax_inst = 0x00000002 | (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ else if ((((inst.instruction >> 15) & 0x10) == 0x0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else if ((((inst.instruction >> 15) & 0x10) == 0x0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+}
+
+/* Handle mfcr/mtcr. */
+static void
+do_rdcrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && reg_required_here (&str, 15, REG_TYPE_SCORE_CR) != (int) FAIL)
+ end_of_line (str);
+}
+
+/* Handle mfsr/mtsr. */
+
+static void
+do_rdsrs (char *str)
+{
+ skip_whitespace (str);
+
+ /* mfsr */
+ if ((inst.instruction & 0xff) == 0x50)
+ {
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && reg_required_here (&str, 10, REG_TYPE_SCORE_SR) != (int) FAIL)
+ end_of_line (str);
+ }
+ else
+ {
+ if (reg_required_here (&str, 15, REG_TYPE_SCORE) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL)
+ reg_required_here (&str, 10, REG_TYPE_SCORE_SR);
+ }
+}
+
+/* Handle neg. */
+
+static void
+do_rdxrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 10, REG_TYPE_SCORE) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+
+ if ((inst.relax_inst != 0x8000) && (((inst.instruction >> 10) & 0x10) == 0)
+ && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ inst.relax_inst |= (((inst.instruction >> 10) & 0xf) << 4) | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ else
+ inst.relax_inst = 0x8000;
+}
+
+/* Handle cmp.c/cmp<cond>. */
+static void
+do_rsrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 10, REG_TYPE_SCORE) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+
+ if ((inst.relax_inst != 0x8000) && (((inst.instruction >> 20) & 0x1f) == 3)
+ && (((inst.instruction >> 10) & 0x10) == 0) && (((inst.instruction >> 15) & 0x10) == 0))
+ {
+ inst.relax_inst |= (((inst.instruction >> 10) & 0xf) << 4) | (((inst.instruction >> 15) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ else
+ inst.relax_inst = 0x8000;
+}
+
+static void
+do_ceinst (char *str)
+{
+ char *strbak;
+
+ strbak = str;
+ skip_whitespace (str);
+
+ if (data_op2 (&str, 20, _IMM5) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 10, REG_TYPE_SCORE) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || data_op2 (&str, 5, _IMM5) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || data_op2 (&str, 0, _IMM5) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ str = strbak;
+ if (data_op2 (&str, 0, _IMM25) == (int) FAIL)
+ return;
+ }
+}
+
+static int
+reglow_required_here (char **str, int shift)
+{
+ static char buff[MAX_LITERAL_POOL_SIZE];
+ int reg;
+ char *start = *str;
+
+ if ((reg = score_reg_parse (str, all_reg_maps[REG_TYPE_SCORE].htab)) != (int) FAIL)
+ {
+ if ((reg == 1) && (nor1 == 1) && (inst.bwarn == 0))
+ {
+ as_warn (_("Using temp register(r1)"));
+ inst.bwarn = 1;
+ }
+ if (reg < 16)
+ {
+ if (shift >= 0)
+ inst.instruction |= reg << shift;
+
+ return reg;
+ }
+ }
+
+ /* Restore the start point, we may have got a reg of the wrong class. */
+ *str = start;
+ sprintf (buff, _("low register(r0-r15)expected, not '%.100s'"), start);
+ inst.error = buff;
+ return (int) FAIL;
+}
+
+/* Handle addc!/add!/and!/cmp!/neg!/not!/or!/sll!/srl!/sra!/xor!/sub!. */
+static void
+do16_rdrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reglow_required_here (&str, 8) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reglow_required_here (&str, 4) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ if ((inst.instruction & 0x700f) == 0x2003) /* cmp! */
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 15)
+ | (((inst.instruction >> 4) & 0xf) << 10);
+ }
+ else if ((inst.instruction & 0x700f) == 0x2006) /* not! */
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | (((inst.instruction >> 4) & 0xf) << 15);
+ }
+ else
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | (((inst.instruction >> 8) & 0xf) << 15) | (((inst.instruction >> 4) & 0xf) << 10);
+ }
+ inst.relax_size = 4;
+ }
+}
+
+static void
+do16_rs (char *str)
+{
+ int rd = 0;
+
+ skip_whitespace (str);
+
+ if ((rd = reglow_required_here (&str, 4)) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ inst.relax_inst |= rd << 20;
+ inst.relax_size = 4;
+ }
+}
+
+/* Handle br!/brl!. */
+static void
+do16_xrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reglow_required_here (&str, 4) == (int) FAIL || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 10)
+ | (((inst.instruction >> 4) & 0xf) << 15);
+ inst.relax_size = 4;
+ }
+}
+
+static int
+reghigh_required_here (char **str, int shift)
+{
+ static char buff[MAX_LITERAL_POOL_SIZE];
+ int reg;
+ char *start = *str;
+
+ if ((reg = score_reg_parse (str, all_reg_maps[REG_TYPE_SCORE].htab)) != (int) FAIL)
+ {
+ if (15 < reg && reg < 32)
+ {
+ if (shift >= 0)
+ inst.instruction |= (reg & 0xf) << shift;
+
+ return reg;
+ }
+ }
+
+ *str = start;
+ sprintf (buff, _("high register(r16-r31)expected, not '%.100s'"), start);
+ inst.error = buff;
+ return (int) FAIL;
+}
+
+/* Handle mhfl!. */
+static void
+do16_hrdrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reghigh_required_here (&str, 8) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && reglow_required_here (&str, 4) != (int) FAIL
+ && end_of_line (str) != (int) FAIL)
+ {
+ inst.relax_inst |= ((((inst.instruction >> 8) & 0xf) | 0x10) << 20)
+ | (((inst.instruction >> 4) & 0xf) << 15) | (0xf << 10);
+ inst.relax_size = 4;
+ }
+}
+
+/* Handle mlfh!. */
+static void
+do16_rdhrs (char *str)
+{
+ skip_whitespace (str);
+
+ if (reglow_required_here (&str, 8) != (int) FAIL
+ && skip_past_comma (&str) != (int) FAIL
+ && reghigh_required_here (&str, 4) != (int) FAIL
+ && end_of_line (str) != (int) FAIL)
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | ((((inst.instruction >> 4) & 0xf) | 0x10) << 15) | (0xf << 10);
+ inst.relax_size = 4;
+ }
+}
+
+/* We need to be able to fix up arbitrary expressions in some statements.
+ This is so that we can handle symbols that are an arbitrary distance from
+ the pc. The most common cases are of the form ((+/-sym -/+ . - 8) & mask),
+ which returns part of an address in a form which will be valid for
+ a data instruction. We do this by pushing the expression into a symbol
+ in the expr_section, and creating a fix for that. */
+static fixS *
+fix_new_score (fragS * frag, int where, short int size, expressionS * exp, int pc_rel, int reloc)
+{
+ fixS *new_fix;
+
+ switch (exp->X_op)
+ {
+ case O_constant:
+ case O_symbol:
+ case O_add:
+ case O_subtract:
+ new_fix = fix_new_exp (frag, where, size, exp, pc_rel, reloc);
+ break;
+ default:
+ new_fix = fix_new (frag, where, size, make_expr_symbol (exp), 0, pc_rel, reloc);
+ break;
+ }
+ return new_fix;
+}
+
+static void
+init_dependency_vector (void)
+{
+ int i;
+
+ for (i = 0; i < vector_size; i++)
+ memset (&dependency_vector[i], '\0', sizeof (dependency_vector[i]));
+
+ return;
+}
+
+static enum insn_type_for_dependency
+dependency_type_from_insn (char *insn_name)
+{
+ char name[INSN_NAME_LEN];
+ const struct insn_to_dependency *tmp;
+
+ strcpy (name, insn_name);
+ tmp = (const struct insn_to_dependency *) hash_find (dependency_insn_hsh, name);
+
+ if (tmp)
+ return tmp->type;
+
+ return D_all_insn;
+}
+
+static int
+check_dependency (char *pre_insn, char *pre_reg,
+ char *cur_insn, char *cur_reg, int *warn_or_error)
+{
+ int bubbles = 0;
+ unsigned int i;
+ enum insn_type_for_dependency pre_insn_type;
+ enum insn_type_for_dependency cur_insn_type;
+
+ pre_insn_type = dependency_type_from_insn (pre_insn);
+ cur_insn_type = dependency_type_from_insn (cur_insn);
+
+ for (i = 0; i < sizeof (data_dependency_table) / sizeof (data_dependency_table[0]); i++)
+ {
+ if ((pre_insn_type == data_dependency_table[i].pre_insn_type)
+ && (D_all_insn == data_dependency_table[i].cur_insn_type
+ || cur_insn_type == data_dependency_table[i].cur_insn_type)
+ && (strcmp (data_dependency_table[i].pre_reg, "") == 0
+ || strcmp (data_dependency_table[i].pre_reg, pre_reg) == 0)
+ && (strcmp (data_dependency_table[i].cur_reg, "") == 0
+ || strcmp (data_dependency_table[i].cur_reg, cur_reg) == 0))
+ {
+ bubbles = (score7) ? data_dependency_table[i].bubblenum_7 : data_dependency_table[i].bubblenum_5;
+ *warn_or_error = data_dependency_table[i].warn_or_error;
+ break;
+ }
+ }
+
+ return bubbles;
+}
+
+static void
+build_one_frag (struct score_it one_inst)
+{
+ char *p;
+ int relaxable_p = g_opt;
+ int relax_size = 0;
+
+ /* Start a new frag if frag_now is not empty. */
+ if (frag_now_fix () != 0)
+ {
+ if (!frag_now->tc_frag_data.is_insn)
+ frag_wane (frag_now);
+
+ frag_new (0);
+ }
+ frag_grow (20);
+
+ p = frag_more (one_inst.size);
+ md_number_to_chars (p, one_inst.instruction, one_inst.size);
+
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (one_inst.size);
+#endif
+
+ relaxable_p &= (one_inst.relax_size != 0);
+ relax_size = relaxable_p ? one_inst.relax_size : 0;
+
+ p = frag_var (rs_machine_dependent, relax_size + RELAX_PAD_BYTE, 0,
+ RELAX_ENCODE (one_inst.size, one_inst.relax_size,
+ one_inst.type, 0, 0, relaxable_p),
+ NULL, 0, NULL);
+
+ if (relaxable_p)
+ md_number_to_chars (p, one_inst.relax_inst, relax_size);
+}
+
+static void
+handle_dependency (struct score_it *theinst)
+{
+ int i;
+ int warn_or_error = 0; /* warn - 0; error - 1 */
+ int bubbles = 0;
+ int remainder_bubbles = 0;
+ char cur_insn[INSN_NAME_LEN];
+ char pre_insn[INSN_NAME_LEN];
+ struct score_it nop_inst;
+ struct score_it pflush_inst;
+
+ nop_inst.instruction = 0x0000;
+ nop_inst.size = 2;
+ nop_inst.relax_inst = 0x80008000;
+ nop_inst.relax_size = 4;
+ nop_inst.type = NO16_OPD;
+
+ pflush_inst.instruction = 0x8000800a;
+ pflush_inst.size = 4;
+ pflush_inst.relax_inst = 0x8000;
+ pflush_inst.relax_size = 0;
+ pflush_inst.type = NO_OPD;
+
+ /* pflush will clear all data dependency. */
+ if (strcmp (theinst->name, "pflush") == 0)
+ {
+ init_dependency_vector ();
+ return;
+ }
+
+ /* Push current instruction to dependency_vector[0]. */
+ for (i = vector_size - 1; i > 0; i--)
+ memcpy (&dependency_vector[i], &dependency_vector[i - 1], sizeof (dependency_vector[i]));
+
+ memcpy (&dependency_vector[0], theinst, sizeof (dependency_vector[i]));
+
+ /* There is no dependency between nop and any instruction. */
+ if (strcmp (dependency_vector[0].name, "nop") == 0
+ || strcmp (dependency_vector[0].name, "nop!") == 0)
+ return;
+
+ /* "pce" is defined in insn_to_dependency_table. */
+#define PCE_NAME "pce"
+
+ if (dependency_vector[0].type == Insn_Type_PCE)
+ strcpy (cur_insn, PCE_NAME);
+ else
+ strcpy (cur_insn, dependency_vector[0].name);
+
+ for (i = 1; i < vector_size; i++)
+ {
+ /* The element of dependency_vector is NULL. */
+ if (dependency_vector[i].name[0] == '\0')
+ continue;
+
+ if (dependency_vector[i].type == Insn_Type_PCE)
+ strcpy (pre_insn, PCE_NAME);
+ else
+ strcpy (pre_insn, dependency_vector[i].name);
+
+ bubbles = check_dependency (pre_insn, dependency_vector[i].reg,
+ cur_insn, dependency_vector[0].reg, &warn_or_error);
+ remainder_bubbles = bubbles - i + 1;
+
+ if (remainder_bubbles > 0)
+ {
+ int j;
+
+ if (fix_data_dependency == 1)
+ {
+ if (remainder_bubbles <= 2)
+ {
+ if (warn_fix_data_dependency)
+ as_warn (_("Fix data dependency: %s %s -- %s %s (insert %d nop!/%d)"),
+ dependency_vector[i].name, dependency_vector[i].reg,
+ dependency_vector[0].name, dependency_vector[0].reg,
+ remainder_bubbles, bubbles);
+
+ for (j = (vector_size - 1); (j - remainder_bubbles) > 0; j--)
+ memcpy (&dependency_vector[j], &dependency_vector[j - remainder_bubbles],
+ sizeof (dependency_vector[j]));
+
+ for (j = 1; j <= remainder_bubbles; j++)
+ {
+ memset (&dependency_vector[j], '\0', sizeof (dependency_vector[j]));
+ /* Insert nop!. */
+ build_one_frag (nop_inst);
+ }
+ }
+ else
+ {
+ if (warn_fix_data_dependency)
+ as_warn (_("Fix data dependency: %s %s -- %s %s (insert 1 pflush/%d)"),
+ dependency_vector[i].name, dependency_vector[i].reg,
+ dependency_vector[0].name, dependency_vector[0].reg,
+ bubbles);
+
+ for (j = 1; j < vector_size; j++)
+ memset (&dependency_vector[j], '\0', sizeof (dependency_vector[j]));
+
+ /* Insert pflush. */
+ build_one_frag (pflush_inst);
+ }
+ }
+ else
+ {
+ if (warn_or_error)
+ {
+ as_bad (_("data dependency: %s %s -- %s %s (%d/%d bubble)"),
+ dependency_vector[i].name, dependency_vector[i].reg,
+ dependency_vector[0].name, dependency_vector[0].reg,
+ remainder_bubbles, bubbles);
+ }
+ else
+ {
+ as_warn (_("data dependency: %s %s -- %s %s (%d/%d bubble)"),
+ dependency_vector[i].name, dependency_vector[i].reg,
+ dependency_vector[0].name, dependency_vector[0].reg,
+ remainder_bubbles, bubbles);
+ }
+ }
+ }
+ }
+}
+
+static enum insn_class
+get_insn_class_from_type (enum score_insn_type type)
+{
+ enum insn_class retval = (int) FAIL;
+
+ switch (type)
+ {
+ case Rd_I4:
+ case Rd_I5:
+ case Rd_rvalueBP_I5:
+ case Rd_lvalueBP_I5:
+ case Rd_I8:
+ case PC_DISP8div2:
+ case PC_DISP11div2:
+ case Rd_Rs:
+ case Rd_HighRs:
+ case Rd_lvalueRs:
+ case Rd_rvalueRs:
+ case x_Rs:
+ case Rd_LowRs:
+ case NO16_OPD:
+ retval = INSN_CLASS_16;
+ break;
+ case Rd_Rs_I5:
+ case x_Rs_I5:
+ case x_I5_x:
+ case Rd_Rs_I14:
+ case I15:
+ case Rd_I16:
+ case Rd_SI16:
+ case Rd_rvalueRs_SI10:
+ case Rd_lvalueRs_SI10:
+ case Rd_rvalueRs_preSI12:
+ case Rd_rvalueRs_postSI12:
+ case Rd_lvalueRs_preSI12:
+ case Rd_lvalueRs_postSI12:
+ case Rd_Rs_SI14:
+ case Rd_rvalueRs_SI15:
+ case Rd_lvalueRs_SI15:
+ case PC_DISP19div2:
+ case PC_DISP24div2:
+ case Rd_Rs_Rs:
+ case x_Rs_x:
+ case x_Rs_Rs:
+ case Rd_Rs_x:
+ case Rd_x_Rs:
+ case Rd_x_x:
+ case OP5_rvalueRs_SI15:
+ case I5_Rs_Rs_I5_OP5:
+ case x_rvalueRs_post4:
+ case Rd_rvalueRs_post4:
+ case Rd_x_I5:
+ case Rd_lvalueRs_post4:
+ case x_lvalueRs_post4:
+ case Rd_Rs_Rs_imm:
+ case NO_OPD:
+ case Rd_lvalue32Rs:
+ case Rd_rvalue32Rs:
+ case Insn_GP:
+ case Insn_PIC:
+ case Insn_internal:
+ retval = INSN_CLASS_32;
+ break;
+ case Insn_Type_PCE:
+ retval = INSN_CLASS_PCE;
+ break;
+ case Insn_Type_SYN:
+ retval = INSN_CLASS_SYN;
+ break;
+ default:
+ abort ();
+ break;
+ }
+ return retval;
+}
+
+static unsigned long
+adjust_paritybit (unsigned long m_code, enum insn_class class)
+{
+ unsigned long result = 0;
+ unsigned long m_code_high = 0;
+ unsigned long m_code_low = 0;
+ unsigned long pb_high = 0;
+ unsigned long pb_low = 0;
+
+ if (class == INSN_CLASS_32)
+ {
+ pb_high = 0x80000000;
+ pb_low = 0x00008000;
+ }
+ else if (class == INSN_CLASS_16)
+ {
+ pb_high = 0;
+ pb_low = 0;
+ }
+ else if (class == INSN_CLASS_PCE)
+ {
+ pb_high = 0;
+ pb_low = 0x00008000;
+ }
+ else if (class == INSN_CLASS_SYN)
+ {
+ /* FIXME. at this time, INSN_CLASS_SYN must be 32 bit, but, instruction type should
+ be changed if macro instruction has been expanded. */
+ pb_high = 0x80000000;
+ pb_low = 0x00008000;
+ }
+ else
+ {
+ abort ();
+ }
+
+ m_code_high = m_code & 0x3fff8000;
+ m_code_low = m_code & 0x00007fff;
+ result = pb_high | (m_code_high << 1) | pb_low | m_code_low;
+ return result;
+
+}
+
+static void
+gen_insn_frag (struct score_it *part_1, struct score_it *part_2)
+{
+ char *p;
+ bfd_boolean pce_p = FALSE;
+ int relaxable_p = g_opt;
+ int relax_size = 0;
+ struct score_it *inst1 = part_1;
+ struct score_it *inst2 = part_2;
+ struct score_it backup_inst1;
+
+ pce_p = (inst2) ? TRUE : FALSE;
+ memcpy (&backup_inst1, inst1, sizeof (struct score_it));
+
+ /* Adjust instruction opcode and to be relaxed instruction opcode. */
+ if (pce_p)
+ {
+ backup_inst1.instruction = ((backup_inst1.instruction & 0x7FFF) << 15)
+ | (inst2->instruction & 0x7FFF);
+ backup_inst1.instruction = adjust_paritybit (backup_inst1.instruction, INSN_CLASS_PCE);
+ backup_inst1.relax_inst = 0x8000;
+ backup_inst1.size = INSN_SIZE;
+ backup_inst1.relax_size = 0;
+ backup_inst1.type = Insn_Type_PCE;
+ }
+ else
+ {
+ backup_inst1.instruction = adjust_paritybit (backup_inst1.instruction,
+ GET_INSN_CLASS (backup_inst1.type));
+ }
+
+ if (backup_inst1.relax_size != 0)
+ {
+ enum insn_class tmp;
+
+ tmp = (backup_inst1.size == INSN_SIZE) ? INSN_CLASS_16 : INSN_CLASS_32;
+ backup_inst1.relax_inst = adjust_paritybit (backup_inst1.relax_inst, tmp);
+ }
+
+ /* Check data dependency. */
+ handle_dependency (&backup_inst1);
+
+ /* Start a new frag if frag_now is not empty and is not instruction frag, maybe it contains
+ data produced by .ascii etc. Doing this is to make one instruction per frag. */
+ if (frag_now_fix () != 0)
+ {
+ if (!frag_now->tc_frag_data.is_insn)
+ frag_wane (frag_now);
+
+ frag_new (0);
+ }
+
+ /* Here, we must call frag_grow in order to keep the instruction frag type is
+ rs_machine_dependent.
+ For, frag_var may change frag_now->fr_type to rs_fill by calling frag_grow which
+ acturally will call frag_wane.
+ Calling frag_grow first will create a new frag_now which free size is 20 that is enough
+ for frag_var. */
+ frag_grow (20);
+
+ p = frag_more (backup_inst1.size);
+ md_number_to_chars (p, backup_inst1.instruction, backup_inst1.size);
+
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (backup_inst1.size);
+#endif
+
+ /* Generate fixup structure. */
+ if (pce_p)
+ {
+ if (inst1->reloc.type != BFD_RELOC_NONE)
+ fix_new_score (frag_now, p - frag_now->fr_literal,
+ inst1->size, &inst1->reloc.exp,
+ inst1->reloc.pc_rel, inst1->reloc.type);
+
+ if (inst2->reloc.type != BFD_RELOC_NONE)
+ fix_new_score (frag_now, p - frag_now->fr_literal + 2,
+ inst2->size, &inst2->reloc.exp, inst2->reloc.pc_rel, inst2->reloc.type);
+ }
+ else
+ {
+ if (backup_inst1.reloc.type != BFD_RELOC_NONE)
+ fix_new_score (frag_now, p - frag_now->fr_literal,
+ backup_inst1.size, &backup_inst1.reloc.exp,
+ backup_inst1.reloc.pc_rel, backup_inst1.reloc.type);
+ }
+
+ /* relax_size may be 2, 4, 12 or 0, 0 indicates no relaxation. */
+ relaxable_p &= (backup_inst1.relax_size != 0);
+ relax_size = relaxable_p ? backup_inst1.relax_size : 0;
+
+ p = frag_var (rs_machine_dependent, relax_size + RELAX_PAD_BYTE, 0,
+ RELAX_ENCODE (backup_inst1.size, backup_inst1.relax_size,
+ backup_inst1.type, 0, 0, relaxable_p),
+ backup_inst1.reloc.exp.X_add_symbol, 0, NULL);
+
+ if (relaxable_p)
+ md_number_to_chars (p, backup_inst1.relax_inst, relax_size);
+
+ memcpy (inst1, &backup_inst1, sizeof (struct score_it));
+}
+
+static void
+parse_16_32_inst (char *insnstr, bfd_boolean gen_frag_p)
+{
+ char c;
+ char *p;
+ char *operator = insnstr;
+ const struct asm_opcode *opcode;
+
+ /* Parse operator and operands. */
+ skip_whitespace (operator);
+
+ for (p = operator; *p != '\0'; p++)
+ if ((*p == ' ') || (*p == '!'))
+ break;
+
+ if (*p == '!')
+ p++;
+
+ c = *p;
+ *p = '\0';
+
+ opcode = (const struct asm_opcode *) hash_find (score_ops_hsh, operator);
+ *p = c;
+
+ memset (&inst, '\0', sizeof (inst));
+ sprintf (inst.str, "%s", insnstr);
+ if (opcode)
+ {
+ inst.instruction = opcode->value;
+ inst.relax_inst = opcode->relax_value;
+ inst.type = opcode->type;
+ inst.size = GET_INSN_SIZE (inst.type);
+ inst.relax_size = 0;
+ inst.bwarn = 0;
+ sprintf (inst.name, "%s", opcode->template);
+ strcpy (inst.reg, "");
+ inst.error = NULL;
+ inst.reloc.type = BFD_RELOC_NONE;
+
+ (*opcode->parms) (p);
+
+ /* It indicates current instruction is a macro instruction if inst.bwarn equals -1. */
+ if ((inst.bwarn != -1) && (!inst.error) && (gen_frag_p))
+ gen_insn_frag (&inst, NULL);
+ }
+ else
+ inst.error = _("unrecognized opcode");
+}
+
+static int
+append_insn (char *str, bfd_boolean gen_frag_p)
+{
+ int retval = SUCCESS;
+
+ parse_16_32_inst (str, gen_frag_p);
+
+ if (inst.error)
+ {
+ retval = (int) FAIL;
+ as_bad (_("%s -- `%s'"), inst.error, inst.str);
+ inst.error = NULL;
+ }
+
+ return retval;
+}
+
+/* Handle mv! reg_high, reg_low;
+ mv! reg_low, reg_high;
+ mv! reg_low, reg_low; */
+static void
+do16_mv_rdrs (char *str)
+{
+ int reg_rd;
+ int reg_rs;
+ char *backupstr = NULL;
+
+ backupstr = str;
+ skip_whitespace (str);
+
+ if ((reg_rd = reg_required_here (&str, 8, REG_TYPE_SCORE)) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || (reg_rs = reg_required_here (&str, 4, REG_TYPE_SCORE)) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ /* Case 1 : mv! or mlfh!. */
+ if (reg_rd < 16)
+ {
+ if (reg_rs < 16)
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | (((inst.instruction >> 4) & 0xf) << 15) | (0xf << 10);
+ inst.relax_size = 4;
+ }
+ else
+ {
+ char append_str[MAX_LITERAL_POOL_SIZE];
+
+ sprintf (append_str, "mlfh! %s", backupstr);
+ if (append_insn (append_str, TRUE) == (int) FAIL)
+ return;
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+ }
+ }
+ /* Case 2 : mhfl!. */
+ else
+ {
+ if (reg_rs > 16)
+ {
+ SET_INSN_ERROR (BAD_ARGS);
+ return;
+ }
+ else
+ {
+ char append_str[MAX_LITERAL_POOL_SIZE];
+
+ sprintf (append_str, "mhfl! %s", backupstr);
+ if (append_insn (append_str, TRUE) == (int) FAIL)
+ return;
+
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+ }
+ }
+ }
+}
+
+static void
+do16_rdi4 (char *str)
+{
+ skip_whitespace (str);
+
+ if (reglow_required_here (&str, 8) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || data_op2 (&str, 3, _IMM4) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ if (((inst.instruction >> 3) & 0x10) == 0) /* for judge is addei or subei : bit 5 =0 : addei */
+ {
+ if (((inst.instruction >> 3) & 0xf) != 0xf)
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | ((1 << ((inst.instruction >> 3) & 0xf)) << 1);
+ inst.relax_size = 4;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else
+ {
+ if (((inst.instruction >> 3) & 0xf) != 0xf)
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | (((-(1 << ((inst.instruction >> 3) & 0xf))) & 0xffff) << 1);
+ inst.relax_size = 4;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ }
+}
+
+static void
+do16_rdi5 (char *str)
+{
+ skip_whitespace (str);
+
+ if (reglow_required_here (&str, 8) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || data_op2 (&str, 3, _IMM5) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+ else
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | (((inst.instruction >> 8) & 0xf) << 15) | (((inst.instruction >> 3) & 0x1f) << 10);
+ inst.relax_size = 4;
+ }
+}
+
+/* Handle sdbbp. */
+static void
+do16_xi5 (char *str)
+{
+ skip_whitespace (str);
+
+ if (data_op2 (&str, 3, _IMM5) == (int) FAIL || end_of_line (str) == (int) FAIL)
+ return;
+ else
+ {
+ inst.relax_inst |= (((inst.instruction >> 3) & 0x1f) << 15);
+ inst.relax_size = 4;
+ }
+}
+
+/* Check that an immediate is word alignment or half word alignment.
+ If so, convert it to the right format. */
+static int
+validate_immediate_align (int val, unsigned int data_type)
+{
+ if (data_type == _IMM5_RSHIFT_1)
+ {
+ if (val % 2)
+ {
+ inst.error = _("address offset must be half word alignment");
+ return (int) FAIL;
+ }
+ }
+ else if ((data_type == _IMM5_RSHIFT_2) || (data_type == _IMM10_RSHIFT_2))
+ {
+ if (val % 4)
+ {
+ inst.error = _("address offset must be word alignment");
+ return (int) FAIL;
+ }
+ }
+
+ return SUCCESS;
+}
+
+static int
+exp_ldst_offset (char **str, int shift, unsigned int data_type)
+{
+ char *dataptr;
+
+ dataptr = * str;
+
+ if ((*dataptr == '0') && (*(dataptr + 1) == 'x')
+ && (data_type != _SIMM16_LA)
+ && (data_type != _VALUE_HI16)
+ && (data_type != _VALUE_LO16)
+ && (data_type != _IMM16)
+ && (data_type != _IMM15)
+ && (data_type != _IMM14)
+ && (data_type != _IMM4)
+ && (data_type != _IMM5)
+ && (data_type != _IMM8)
+ && (data_type != _IMM5_RSHIFT_1)
+ && (data_type != _IMM5_RSHIFT_2)
+ && (data_type != _SIMM14_NEG)
+ && (data_type != _IMM10_RSHIFT_2))
+ {
+ data_type += 24;
+ }
+
+ if (my_get_expression (&inst.reloc.exp, str) == (int) FAIL)
+ return (int) FAIL;
+
+ if (inst.reloc.exp.X_op == O_constant)
+ {
+ /* Need to check the immediate align. */
+ int value = validate_immediate_align (inst.reloc.exp.X_add_number, data_type);
+
+ if (value == (int) FAIL)
+ return (int) FAIL;
+
+ value = validate_immediate (inst.reloc.exp.X_add_number, data_type, 0);
+ if (value == (int) FAIL)
+ {
+ if (data_type < 30)
+ sprintf (err_msg,
+ _("invalid constant: %d bit expression not in range %d..%d"),
+ score_df_range[data_type].bits,
+ score_df_range[data_type].range[0], score_df_range[data_type].range[1]);
+ else
+ sprintf (err_msg,
+ _("invalid constant: %d bit expression not in range %d..%d"),
+ score_df_range[data_type - 24].bits,
+ score_df_range[data_type - 24].range[0], score_df_range[data_type - 24].range[1]);
+ inst.error = err_msg;
+ return (int) FAIL;
+ }
+
+ if (data_type == _IMM5_RSHIFT_1)
+ {
+ value >>= 1;
+ }
+ else if ((data_type == _IMM5_RSHIFT_2) || (data_type == _IMM10_RSHIFT_2))
+ {
+ value >>= 2;
+ }
+
+ if (score_df_range[data_type].range[0] != 0)
+ {
+ value &= (1 << score_df_range[data_type].bits) - 1;
+ }
+
+ inst.instruction |= value << shift;
+ }
+ else
+ {
+ inst.reloc.pc_rel = 0;
+ }
+
+ return SUCCESS;
+}
+
+static void
+do_ldst_insn (char *str)
+{
+ int pre_inc = 0;
+ int conflict_reg;
+ int value;
+ char * temp;
+ char *strbak;
+ char *dataptr;
+ int reg;
+ int ldst_idx = 0;
+
+ strbak = str;
+ skip_whitespace (str);
+
+ if (((conflict_reg = reg_required_here (&str, 20, REG_TYPE_SCORE)) == (int) FAIL)
+ || (skip_past_comma (&str) == (int) FAIL))
+ return;
+
+ /* ld/sw rD, [rA, simm15] ld/sw rD, [rA]+, simm12 ld/sw rD, [rA, simm12]+. */
+ if (*str == '[')
+ {
+ str++;
+ skip_whitespace (str);
+
+ if ((reg = reg_required_here (&str, 15, REG_TYPE_SCORE)) == (int) FAIL)
+ return;
+
+ /* Conflicts can occur on stores as well as loads. */
+ conflict_reg = (conflict_reg == reg);
+ skip_whitespace (str);
+ temp = str + 1; /* The latter will process decimal/hex expression. */
+
+ /* ld/sw rD, [rA]+, simm12 ld/sw rD, [rA]+. */
+ if (*str == ']')
+ {
+ str++;
+ if (*str == '+')
+ {
+ str++;
+ /* ld/sw rD, [rA]+, simm12. */
+ if (skip_past_comma (&str) == SUCCESS)
+ {
+ if ((exp_ldst_offset (&str, 3, _SIMM12) == (int) FAIL)
+ || (end_of_line (str) == (int) FAIL))
+ return;
+
+ if (conflict_reg)
+ {
+ unsigned int ldst_func = inst.instruction & OPC_PSEUDOLDST_MASK;
+
+ if ((ldst_func == INSN_LH)
+ || (ldst_func == INSN_LHU)
+ || (ldst_func == INSN_LW)
+ || (ldst_func == INSN_LB)
+ || (ldst_func == INSN_LBU))
+ {
+ inst.error = _("register same as write-back base");
+ return;
+ }
+ }
+
+ ldst_idx = inst.instruction & OPC_PSEUDOLDST_MASK;
+ inst.instruction &= ~OPC_PSEUDOLDST_MASK;
+ inst.instruction |= score_ldst_insns[ldst_idx * 3 + LDST_POST].value;
+
+ /* lw rD, [rA]+, 4 convert to pop rD, [rA]. */
+ if ((inst.instruction & 0x3e000007) == 0x0e000000)
+ {
+ /* rs = r0-r7, offset = 4 */
+ if ((((inst.instruction >> 15) & 0x18) == 0)
+ && (((inst.instruction >> 3) & 0xfff) == 4))
+ {
+ /* Relax to pophi. */
+ if ((((inst.instruction >> 20) & 0x10) == 0x10))
+ {
+ inst.relax_inst = 0x0000200a | (((inst.instruction >> 20) & 0xf)
+ << 8) | 1 << 7 |
+ (((inst.instruction >> 15) & 0x7) << 4);
+ }
+ /* Relax to pop. */
+ else
+ {
+ inst.relax_inst = 0x0000200a | (((inst.instruction >> 20) & 0xf)
+ << 8) | 0 << 7 |
+ (((inst.instruction >> 15) & 0x7) << 4);
+ }
+ inst.relax_size = 2;
+ }
+ }
+ return;
+ }
+ /* ld/sw rD, [rA]+ convert to ld/sw rD, [rA, 0]+. */
+ else
+ {
+ SET_INSN_ERROR (NULL);
+ if (end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+
+ pre_inc = 1;
+ value = validate_immediate (inst.reloc.exp.X_add_number, _SIMM12, 0);
+ value &= (1 << score_df_range[_SIMM12].bits) - 1;
+ ldst_idx = inst.instruction & OPC_PSEUDOLDST_MASK;
+ inst.instruction &= ~OPC_PSEUDOLDST_MASK;
+ inst.instruction |= score_ldst_insns[ldst_idx * 3 + pre_inc].value;
+ inst.instruction |= value << 3;
+ inst.relax_inst = 0x8000;
+ return;
+ }
+ }
+ /* ld/sw rD, [rA] convert to ld/sw rD, [rA, simm15]. */
+ else
+ {
+ if (end_of_line (str) == (int) FAIL)
+ return;
+
+ ldst_idx = inst.instruction & OPC_PSEUDOLDST_MASK;
+ inst.instruction &= ~OPC_PSEUDOLDST_MASK;
+ inst.instruction |= score_ldst_insns[ldst_idx * 3 + LDST_NOUPDATE].value;
+
+ /* lbu rd, [rs] -> lbu! rd, [rs] */
+ if (ldst_idx == INSN_LBU)
+ {
+ inst.relax_inst = INSN16_LBU;
+ }
+ else if (ldst_idx == INSN_LH)
+ {
+ inst.relax_inst = INSN16_LH;
+ }
+ else if (ldst_idx == INSN_LW)
+ {
+ inst.relax_inst = INSN16_LW;
+ }
+ else if (ldst_idx == INSN_SB)
+ {
+ inst.relax_inst = INSN16_SB;
+ }
+ else if (ldst_idx == INSN_SH)
+ {
+ inst.relax_inst = INSN16_SH;
+ }
+ else if (ldst_idx == INSN_SW)
+ {
+ inst.relax_inst = INSN16_SW;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+
+ /* lw/lh/lbu/sw/sh/sb, offset = 0, relax to 16 bit instruction. */
+ if ((ldst_idx == INSN_LBU)
+ || (ldst_idx == INSN_LH)
+ || (ldst_idx == INSN_LW)
+ || (ldst_idx == INSN_SB) || (ldst_idx == INSN_SH) || (ldst_idx == INSN_SW))
+ {
+ if ((((inst.instruction >> 15) & 0x10) == 0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ inst.relax_inst |= (2 << 12) | (((inst.instruction >> 20) & 0xf) << 8) |
+ (((inst.instruction >> 15) & 0xf) << 4);
+ inst.relax_size = 2;
+ }
+ }
+
+ return;
+ }
+ }
+ /* ld/sw rD, [rA, simm15] ld/sw rD, [rA, simm12]+. */
+ else
+ {
+ if (skip_past_comma (&str) == (int) FAIL)
+ {
+ inst.error = _("pre-indexed expression expected");
+ return;
+ }
+
+ if (my_get_expression (&inst.reloc.exp, &str) == (int) FAIL)
+ return;
+
+ skip_whitespace (str);
+ if (*str++ != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+
+ skip_whitespace (str);
+ /* ld/sw rD, [rA, simm12]+. */
+ if (*str == '+')
+ {
+ str++;
+ pre_inc = 1;
+ if (conflict_reg)
+ {
+ unsigned int ldst_func = inst.instruction & OPC_PSEUDOLDST_MASK;
+
+ if ((ldst_func == INSN_LH)
+ || (ldst_func == INSN_LHU)
+ || (ldst_func == INSN_LW)
+ || (ldst_func == INSN_LB)
+ || (ldst_func == INSN_LBU))
+ {
+ inst.error = _("register same as write-back base");
+ return;
+ }
+ }
+ }
+
+ if (end_of_line (str) == (int) FAIL)
+ return;
+
+ if (inst.reloc.exp.X_op == O_constant)
+ {
+ int value;
+ unsigned int data_type;
+
+ if (pre_inc == 1)
+ data_type = _SIMM12;
+ else
+ data_type = _SIMM15;
+ dataptr = temp;
+
+ if ((*dataptr == '0') && (*(dataptr + 1) == 'x')
+ && (data_type != _SIMM16_LA)
+ && (data_type != _VALUE_HI16)
+ && (data_type != _VALUE_LO16)
+ && (data_type != _IMM16)
+ && (data_type != _IMM15)
+ && (data_type != _IMM14)
+ && (data_type != _IMM4)
+ && (data_type != _IMM5)
+ && (data_type != _IMM8)
+ && (data_type != _IMM5_RSHIFT_1)
+ && (data_type != _IMM5_RSHIFT_2)
+ && (data_type != _SIMM14_NEG)
+ && (data_type != _IMM10_RSHIFT_2))
+ {
+ data_type += 24;
+ }
+
+ value = validate_immediate (inst.reloc.exp.X_add_number, data_type, 0);
+ if (value == (int) FAIL)
+ {
+ if (data_type < 30)
+ sprintf (err_msg,
+ _("invalid constant: %d bit expression not in range %d..%d"),
+ score_df_range[data_type].bits,
+ score_df_range[data_type].range[0], score_df_range[data_type].range[1]);
+ else
+ sprintf (err_msg,
+ _("invalid constant: %d bit expression not in range %d..%d"),
+ score_df_range[data_type - 24].bits,
+ score_df_range[data_type - 24].range[0],
+ score_df_range[data_type - 24].range[1]);
+ inst.error = err_msg;
+ return;
+ }
+
+ value &= (1 << score_df_range[data_type].bits) - 1;
+ ldst_idx = inst.instruction & OPC_PSEUDOLDST_MASK;
+ inst.instruction &= ~OPC_PSEUDOLDST_MASK;
+ inst.instruction |= score_ldst_insns[ldst_idx * 3 + pre_inc].value;
+ if (pre_inc == 1)
+ inst.instruction |= value << 3;
+ else
+ inst.instruction |= value;
+
+ /* lw rD, [rA, simm15] */
+ if ((inst.instruction & 0x3e000000) == 0x20000000)
+ {
+ /* Both rD and rA are in [r0 - r15]. */
+ if ((((inst.instruction >> 15) & 0x10) == 0)
+ && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ /* simm15 = 0, lw -> lw!. */
+ if ((inst.instruction & 0x7fff) == 0)
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ /* rA = r2, lw -> lwp!. */
+ else if ((((inst.instruction >> 15) & 0xf) == 2)
+ && ((inst.instruction & 0x3) == 0)
+ && ((inst.instruction & 0x7fff) < 128))
+ {
+ inst.relax_inst = 0x7000 | (((inst.instruction >> 20) & 0xf) << 8)
+ | (((inst.instruction & 0x7fff) >> 2) << 3);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ /* sw rD, [rA, simm15] */
+ else if ((inst.instruction & 0x3e000000) == 0x28000000)
+ {
+ /* Both rD and rA are in [r0 - r15]. */
+ if ((((inst.instruction >> 15) & 0x10) == 0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ /* simm15 = 0, sw -> sw!. */
+ if ((inst.instruction & 0x7fff) == 0)
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ /* rA = r2, sw -> swp!. */
+ else if ((((inst.instruction >> 15) & 0xf) == 2)
+ && ((inst.instruction & 0x3) == 0)
+ && ((inst.instruction & 0x7fff) < 128))
+ {
+ inst.relax_inst = 0x7004 | (((inst.instruction >> 20) & 0xf) << 8)
+ | (((inst.instruction & 0x7fff) >> 2) << 3);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ /* sw rD, [rA, simm15]+ sw pre. */
+ else if ((inst.instruction & 0x3e000007) == 0x06000004)
+ {
+ /* rA is in [r0 - r7], and simm15 = -4. */
+ if ((((inst.instruction >> 15) & 0x18) == 0)
+ && (((inst.instruction >> 3) & 0xfff) == 0xffc))
+ {
+ /* sw -> pushhi!. */
+ if ((((inst.instruction >> 20) & 0x10) == 0x10))
+ {
+ inst.relax_inst = 0x0000200e | (((inst.instruction >> 20) & 0xf) << 8)
+ | 1 << 7 | (((inst.instruction >> 15) & 0x7) << 4);
+ inst.relax_size = 2;
+ }
+ /* sw -> push!. */
+ else
+ {
+ inst.relax_inst = 0x0000200e | (((inst.instruction >> 20) & 0xf) << 8)
+ | 0 << 7 | (((inst.instruction >> 15) & 0x7) << 4);
+ inst.relax_size = 2;
+ }
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ /* lh rD, [rA, simm15] */
+ else if ((inst.instruction & 0x3e000000) == 0x22000000)
+ {
+ /* Both rD and rA are in [r0 - r15]. */
+ if ((((inst.instruction >> 15) & 0x10) == 0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ /* simm15 = 0, lh -> lh!. */
+ if ((inst.instruction & 0x7fff) == 0)
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ /* rA = r2, lh -> lhp!. */
+ else if ((((inst.instruction >> 15) & 0xf) == 2)
+ && ((inst.instruction & 0x1) == 0)
+ && ((inst.instruction & 0x7fff) < 64))
+ {
+ inst.relax_inst = 0x7001 | (((inst.instruction >> 20) & 0xf) << 8)
+ | (((inst.instruction & 0x7fff) >> 1) << 3);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ /* sh rD, [rA, simm15] */
+ else if ((inst.instruction & 0x3e000000) == 0x2a000000)
+ {
+ /* Both rD and rA are in [r0 - r15]. */
+ if ((((inst.instruction >> 15) & 0x10) == 0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ /* simm15 = 0, sh -> sh!. */
+ if ((inst.instruction & 0x7fff) == 0)
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ /* rA = r2, sh -> shp!. */
+ else if ((((inst.instruction >> 15) & 0xf) == 2)
+ && ((inst.instruction & 0x1) == 0)
+ && ((inst.instruction & 0x7fff) < 64))
+ {
+ inst.relax_inst = 0x7005 | (((inst.instruction >> 20) & 0xf) << 8)
+ | (((inst.instruction & 0x7fff) >> 1) << 3);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ /* lbu rD, [rA, simm15] */
+ else if ((inst.instruction & 0x3e000000) == 0x2c000000)
+ {
+ /* Both rD and rA are in [r0 - r15]. */
+ if ((((inst.instruction >> 15) & 0x10) == 0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ /* simm15 = 0, lbu -> lbu!. */
+ if ((inst.instruction & 0x7fff) == 0)
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ /* rA = r2, lbu -> lbup!. */
+ else if ((((inst.instruction >> 15) & 0xf) == 2)
+ && ((inst.instruction & 0x7fff) < 32))
+ {
+ inst.relax_inst = 0x7003 | (((inst.instruction >> 20) & 0xf) << 8)
+ | ((inst.instruction & 0x7fff) << 3);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ /* sb rD, [rA, simm15] */
+ else if ((inst.instruction & 0x3e000000) == 0x2e000000)
+ {
+ /* Both rD and rA are in [r0 - r15]. */
+ if ((((inst.instruction >> 15) & 0x10) == 0) && (((inst.instruction >> 20) & 0x10) == 0))
+ {
+ /* simm15 = 0, sb -> sb!. */
+ if ((inst.instruction & 0x7fff) == 0)
+ {
+ inst.relax_inst |= (((inst.instruction >> 15) & 0xf) << 4)
+ | (((inst.instruction >> 20) & 0xf) << 8);
+ inst.relax_size = 2;
+ }
+ /* rA = r2, sb -> sb!. */
+ else if ((((inst.instruction >> 15) & 0xf) == 2)
+ && ((inst.instruction & 0x7fff) < 32))
+ {
+ inst.relax_inst = 0x7007 | (((inst.instruction >> 20) & 0xf) << 8)
+ | ((inst.instruction & 0x7fff) << 3);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+
+ return;
+ }
+ else
+ {
+ /* FIXME: may set error, for there is no ld/sw rD, [rA, label] */
+ inst.reloc.pc_rel = 0;
+ }
+ }
+ }
+ else
+ {
+ inst.error = BAD_ARGS;
+ }
+}
+
+/* Handle cache. */
+
+static void
+do_cache (char *str)
+{
+ skip_whitespace (str);
+
+ if ((data_op2 (&str, 20, _IMM5) == (int) FAIL) || (skip_past_comma (&str) == (int) FAIL))
+ {
+ return;
+ }
+ else
+ {
+ int cache_op;
+
+ cache_op = (inst.instruction >> 20) & 0x1F;
+ sprintf (inst.name, "cache %d", cache_op);
+ }
+
+ if (*str == '[')
+ {
+ str++;
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL)
+ return;
+
+ skip_whitespace (str);
+
+ /* cache op, [rA] */
+ if (skip_past_comma (&str) == (int) FAIL)
+ {
+ SET_INSN_ERROR (NULL);
+ if (*str != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+ str++;
+ }
+ /* cache op, [rA, simm15] */
+ else
+ {
+ if (exp_ldst_offset (&str, 0, _SIMM15) == (int) FAIL)
+ {
+ return;
+ }
+
+ skip_whitespace (str);
+ if (*str++ != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+ }
+
+ if (end_of_line (str) == (int) FAIL)
+ return;
+ }
+ else
+ {
+ inst.error = BAD_ARGS;
+ }
+}
+
+static void
+do_crdcrscrsimm5 (char *str)
+{
+ char *strbak;
+
+ strbak = str;
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE_CR) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 15, REG_TYPE_SCORE_CR) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL
+ || reg_required_here (&str, 10, REG_TYPE_SCORE_CR) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL)
+ {
+ str = strbak;
+ /* cop1 cop_code20. */
+ if (data_op2 (&str, 5, _IMM20) == (int) FAIL)
+ return;
+ }
+ else
+ {
+ if (data_op2 (&str, 5, _IMM5) == (int) FAIL)
+ return;
+ }
+
+ end_of_line (str);
+}
+
+/* Handle ldc/stc. */
+static void
+do_ldst_cop (char *str)
+{
+ skip_whitespace (str);
+
+ if ((reg_required_here (&str, 15, REG_TYPE_SCORE_CR) == (int) FAIL)
+ || (skip_past_comma (&str) == (int) FAIL))
+ return;
+
+ if (*str == '[')
+ {
+ str++;
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 20, REG_TYPE_SCORE) == (int) FAIL)
+ return;
+
+ skip_whitespace (str);
+
+ if (*str++ != ']')
+ {
+ if (exp_ldst_offset (&str, 5, _IMM10_RSHIFT_2) == (int) FAIL)
+ return;
+
+ skip_whitespace (str);
+ if (*str++ != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+ }
+
+ end_of_line (str);
+ }
+ else
+ inst.error = BAD_ARGS;
+}
+
+static void
+do16_ldst_insn (char *str)
+{
+ skip_whitespace (str);
+
+ if ((reglow_required_here (&str, 8) == (int) FAIL) || (skip_past_comma (&str) == (int) FAIL))
+ return;
+
+ if (*str == '[')
+ {
+ int reg;
+
+ str++;
+ skip_whitespace (str);
+
+ if ((reg = reglow_required_here (&str, 4)) == (int) FAIL)
+ return;
+
+ skip_whitespace (str);
+ if (*str++ == ']')
+ {
+ if (end_of_line (str) == (int) FAIL)
+ return;
+ else
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | (((inst.instruction >> 4) & 0xf) << 15);
+ inst.relax_size = 4;
+ }
+ }
+ else
+ {
+ inst.error = _("missing ]");
+ }
+ }
+ else
+ {
+ inst.error = BAD_ARGS;
+ }
+}
+
+/* Handle lbup!/lhp!/ldiu!/lwp!/sbp!/shp!/swp!. */
+static void
+do16_ldst_imm_insn (char *str)
+{
+ char data_exp[MAX_LITERAL_POOL_SIZE];
+ int reg_rd;
+ char *dataptr = NULL, *pp = NULL;
+ int cnt = 0;
+ int assign_data = (int) FAIL;
+ unsigned int ldst_func;
+
+ skip_whitespace (str);
+
+ if (((reg_rd = reglow_required_here (&str, 8)) == (int) FAIL)
+ || (skip_past_comma (&str) == (int) FAIL))
+ return;
+
+ skip_whitespace (str);
+ dataptr = str;
+
+ while ((*dataptr != '\0') && (*dataptr != '|') && (cnt <= MAX_LITERAL_POOL_SIZE))
+ {
+ data_exp[cnt] = *dataptr;
+ dataptr++;
+ cnt++;
+ }
+
+ data_exp[cnt] = '\0';
+ pp = &data_exp[0];
+
+ str = dataptr;
+
+ ldst_func = inst.instruction & LDST16_RI_MASK;
+ if (ldst_func == N16_LIU)
+ assign_data = exp_ldst_offset (&pp, 0, _IMM8);
+ else if (ldst_func == N16_LHP || ldst_func == N16_SHP)
+ assign_data = exp_ldst_offset (&pp, 3, _IMM5_RSHIFT_1);
+ else if (ldst_func == N16_LWP || ldst_func == N16_SWP)
+ assign_data = exp_ldst_offset (&pp, 3, _IMM5_RSHIFT_2);
+ else
+ assign_data = exp_ldst_offset (&pp, 3, _IMM5);
+
+ if ((assign_data == (int) FAIL) || (end_of_line (pp) == (int) FAIL))
+ return;
+ else
+ {
+ if ((inst.instruction & 0x7000) == N16_LIU)
+ {
+ inst.relax_inst |= ((inst.instruction >> 8) & 0xf) << 20
+ | ((inst.instruction & 0xff) << 1);
+ }
+ else if (((inst.instruction & 0x7007) == N16_LHP)
+ || ((inst.instruction & 0x7007) == N16_SHP))
+ {
+ inst.relax_inst |= ((inst.instruction >> 8) & 0xf) << 20 | 2 << 15
+ | (((inst.instruction >> 3) & 0x1f) << 1);
+ }
+ else if (((inst.instruction & 0x7007) == N16_LWP)
+ || ((inst.instruction & 0x7007) == N16_SWP))
+ {
+ inst.relax_inst |= ((inst.instruction >> 8) & 0xf) << 20 | 2 << 15
+ | (((inst.instruction >> 3) & 0x1f) << 2);
+ }
+ else if (((inst.instruction & 0x7007) == N16_LBUP)
+ || ((inst.instruction & 0x7007) == N16_SBP))
+ {
+ inst.relax_inst |= ((inst.instruction >> 8) & 0xf) << 20 | 2 << 15
+ | (((inst.instruction >> 3) & 0x1f));
+ }
+
+ inst.relax_size = 4;
+ }
+}
+
+static void
+do16_push_pop (char *str)
+{
+ int reg_rd;
+ int H_bit_mask = 0;
+
+ skip_whitespace (str);
+ if (((reg_rd = reg_required_here (&str, 8, REG_TYPE_SCORE)) == (int) FAIL)
+ || (skip_past_comma (&str) == (int) FAIL))
+ return;
+
+ if (reg_rd >= 16)
+ H_bit_mask = 1;
+
+ /* reg_required_here will change bit 12 of opcode, so we must restore bit 12. */
+ inst.instruction &= ~(1 << 12);
+
+ inst.instruction |= H_bit_mask << 7;
+
+ if (*str == '[')
+ {
+ int reg;
+
+ str++;
+ skip_whitespace (str);
+ if ((reg = reg_required_here (&str, 4, REG_TYPE_SCORE)) == (int) FAIL)
+ return;
+ else if (reg > 7)
+ {
+ if (!inst.error)
+ inst.error = _("base register nums are over 3 bit");
+
+ return;
+ }
+
+ skip_whitespace (str);
+ if ((*str++ != ']') || (end_of_line (str) == (int) FAIL))
+ {
+ if (!inst.error)
+ inst.error = _("missing ]");
+
+ return;
+ }
+
+ /* pop! */
+ if ((inst.instruction & 0xf) == 0xa)
+ {
+ if (H_bit_mask)
+ {
+ inst.relax_inst |= ((((inst.instruction >> 8) & 0xf) | 0x10) << 20)
+ | (((inst.instruction >> 4) & 0x7) << 15) | (4 << 3);
+ }
+ else
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | (((inst.instruction >> 4) & 0x7) << 15) | (4 << 3);
+ }
+ }
+ /* push! */
+ else
+ {
+ if (H_bit_mask)
+ {
+ inst.relax_inst |= ((((inst.instruction >> 8) & 0xf) | 0x10) << 20)
+ | (((inst.instruction >> 4) & 0x7) << 15) | (((-4) & 0xfff) << 3);
+ }
+ else
+ {
+ inst.relax_inst |= (((inst.instruction >> 8) & 0xf) << 20)
+ | (((inst.instruction >> 4) & 0x7) << 15) | (((-4) & 0xfff) << 3);
+ }
+ }
+ inst.relax_size = 4;
+ }
+ else
+ {
+ inst.error = BAD_ARGS;
+ }
+}
+
+/* Handle lcb/lcw/lce/scb/scw/sce. */
+static void
+do_ldst_unalign (char *str)
+{
+ int conflict_reg;
+
+ if (university_version == 1)
+ {
+ inst.error = ERR_FOR_SCORE5U_ATOMIC;
+ return;
+ }
+
+ skip_whitespace (str);
+
+ /* lcb/scb [rA]+. */
+ if (*str == '[')
+ {
+ str++;
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 15, REG_TYPE_SCORE) == (int) FAIL)
+ return;
+
+ if (*str++ == ']')
+ {
+ if (*str++ != '+')
+ {
+ inst.error = _("missing +");
+ return;
+ }
+ }
+ else
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+
+ if (end_of_line (str) == (int) FAIL)
+ return;
+ }
+ /* lcw/lce/scb/sce rD, [rA]+. */
+ else
+ {
+ if (((conflict_reg = reg_required_here (&str, 20, REG_TYPE_SCORE)) == (int) FAIL)
+ || (skip_past_comma (&str) == (int) FAIL))
+ {
+ return;
+ }
+
+ skip_whitespace (str);
+ if (*str++ == '[')
+ {
+ int reg;
+
+ skip_whitespace (str);
+ if ((reg = reg_required_here (&str, 15, REG_TYPE_SCORE)) == (int) FAIL)
+ {
+ return;
+ }
+
+ /* Conflicts can occur on stores as well as loads. */
+ conflict_reg = (conflict_reg == reg);
+ skip_whitespace (str);
+ if (*str++ == ']')
+ {
+ unsigned int ldst_func = inst.instruction & LDST_UNALIGN_MASK;
+
+ if (*str++ == '+')
+ {
+ if (conflict_reg)
+ {
+ as_warn (_("%s register same as write-back base"),
+ ((ldst_func & UA_LCE) || (ldst_func & UA_LCW)
+ ? _("destination") : _("source")));
+ }
+ }
+ else
+ {
+ inst.error = _("missing +");
+ return;
+ }
+
+ if (end_of_line (str) == (int) FAIL)
+ return;
+ }
+ else
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+ }
+ else
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+ }
+}
+
+/* Handle alw/asw. */
+static void
+do_ldst_atomic (char *str)
+{
+ if (university_version == 1)
+ {
+ inst.error = ERR_FOR_SCORE5U_ATOMIC;
+ return;
+ }
+
+ skip_whitespace (str);
+
+ if ((reg_required_here (&str, 20, REG_TYPE_SCORE) == (int) FAIL)
+ || (skip_past_comma (&str) == (int) FAIL))
+ {
+ return;
+ }
+ else
+ {
+
+ skip_whitespace (str);
+ if (*str++ == '[')
+ {
+ int reg;
+
+ skip_whitespace (str);
+ if ((reg = reg_required_here (&str, 15, REG_TYPE_SCORE)) == (int) FAIL)
+ {
+ return;
+ }
+
+ skip_whitespace (str);
+ if (*str++ != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+
+ end_of_line (str);
+ }
+ else
+ inst.error = BAD_ARGS;
+ }
+}
+
+static void
+build_relax_frag (struct score_it fix_insts[RELAX_INST_NUM], int fix_num ATTRIBUTE_UNUSED,
+ struct score_it var_insts[RELAX_INST_NUM], int var_num,
+ symbolS *add_symbol)
+{
+ int i;
+ char *p;
+ fixS *fixp = NULL;
+ fixS *cur_fixp = NULL;
+ long where;
+ struct score_it inst_main;
+
+ memcpy (&inst_main, &fix_insts[0], sizeof (struct score_it));
+
+ /* Adjust instruction opcode and to be relaxed instruction opcode. */
+ inst_main.instruction = adjust_paritybit (inst_main.instruction, GET_INSN_CLASS (inst_main.type));
+ inst_main.type = Insn_PIC;
+
+ for (i = 0; i < var_num; i++)
+ {
+ inst_main.relax_size += var_insts[i].size;
+ var_insts[i].instruction = adjust_paritybit (var_insts[i].instruction,
+ GET_INSN_CLASS (var_insts[i].type));
+ }
+
+ /* Check data dependency. */
+ handle_dependency (&inst_main);
+
+ /* Start a new frag if frag_now is not empty. */
+ if (frag_now_fix () != 0)
+ {
+ if (!frag_now->tc_frag_data.is_insn)
+ {
+ frag_wane (frag_now);
+ }
+ frag_new (0);
+ }
+ frag_grow (20);
+
+ /* Write fr_fix part. */
+ p = frag_more (inst_main.size);
+ md_number_to_chars (p, inst_main.instruction, inst_main.size);
+
+ if (inst_main.reloc.type != BFD_RELOC_NONE)
+ fixp = fix_new_score (frag_now, p - frag_now->fr_literal, inst_main.size,
+ &inst_main.reloc.exp, inst_main.reloc.pc_rel, inst_main.reloc.type);
+
+ frag_now->tc_frag_data.fixp = fixp;
+ cur_fixp = frag_now->tc_frag_data.fixp;
+
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (inst_main.size);
+#endif
+
+ where = p - frag_now->fr_literal + inst_main.size;
+ for (i = 0; i < var_num; i++)
+ {
+ if (i > 0)
+ where += var_insts[i - 1].size;
+
+ if (var_insts[i].reloc.type != BFD_RELOC_NONE)
+ {
+ fixp = fix_new_score (frag_now, where, var_insts[i].size,
+ &var_insts[i].reloc.exp, var_insts[i].reloc.pc_rel,
+ var_insts[i].reloc.type);
+ if (fixp)
+ {
+ if (cur_fixp)
+ {
+ cur_fixp->fx_next = fixp;
+ cur_fixp = cur_fixp->fx_next;
+ }
+ else
+ {
+ frag_now->tc_frag_data.fixp = fixp;
+ cur_fixp = frag_now->tc_frag_data.fixp;
+ }
+ }
+ }
+ }
+
+ p = frag_var (rs_machine_dependent, inst_main.relax_size + RELAX_PAD_BYTE, 0,
+ RELAX_ENCODE (inst_main.size, inst_main.relax_size, inst_main.type,
+ 0, inst_main.size, 0), add_symbol, 0, NULL);
+
+ /* Write fr_var part.
+ no calling gen_insn_frag, no fixS will be generated. */
+ for (i = 0; i < var_num; i++)
+ {
+ md_number_to_chars (p, var_insts[i].instruction, var_insts[i].size);
+ p += var_insts[i].size;
+ }
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+}
+
+/* Build a relax frag for la instruction when generating PIC,
+ external symbol first and local symbol second. */
+
+static void
+build_la_pic (int reg_rd, expressionS exp)
+{
+ symbolS *add_symbol = exp.X_add_symbol;
+ offsetT add_number = exp.X_add_number;
+ struct score_it fix_insts[RELAX_INST_NUM];
+ struct score_it var_insts[RELAX_INST_NUM];
+ int fix_num = 0;
+ int var_num = 0;
+ char tmp[MAX_LITERAL_POOL_SIZE];
+ int r1_bak;
+
+ r1_bak = nor1;
+ nor1 = 0;
+
+ if (add_number == 0)
+ {
+ fix_num = 1;
+ var_num = 2;
+
+ /* For an external symbol, only one insn is generated;
+ For a local symbol, two insns are generated. */
+ /* Fix part
+ For an external symbol: lw rD, <sym>($gp)
+ (BFD_RELOC_SCORE_GOT15 or BFD_RELOC_SCORE_CALL15) */
+ sprintf (tmp, "lw_pic r%d, %s", reg_rd, add_symbol->bsym->name);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ if (reg_rd == PIC_CALL_REG)
+ inst.reloc.type = BFD_RELOC_SCORE_CALL15;
+ memcpy (&fix_insts[0], &inst, sizeof (struct score_it));
+
+ /* Var part
+ For a local symbol :
+ lw rD, <sym>($gp) (BFD_RELOC_SCORE_GOT15)
+ addi rD, <sym> (BFD_RELOC_GOT_LO16) */
+ inst.reloc.type = BFD_RELOC_SCORE_GOT15;
+ memcpy (&var_insts[0], &inst, sizeof (struct score_it));
+ sprintf (tmp, "addi_s_pic r%d, %s", reg_rd, add_symbol->bsym->name);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&var_insts[1], &inst, sizeof (struct score_it));
+ build_relax_frag (fix_insts, fix_num, var_insts, var_num, add_symbol);
+ }
+ else if (add_number >= -0x8000 && add_number <= 0x7fff)
+ {
+ /* Insn 1: lw rD, <sym>($gp) (BFD_RELOC_SCORE_GOT15) */
+ sprintf (tmp, "lw_pic r%d, %s", reg_rd, add_symbol->bsym->name);
+ if (append_insn (tmp, TRUE) == (int) FAIL)
+ return;
+
+ /* Insn 2 */
+ fix_num = 1;
+ var_num = 1;
+ /* Fix part
+ For an external symbol: addi rD, <constant> */
+ sprintf (tmp, "addi r%d, %d", reg_rd, (int)add_number);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&fix_insts[0], &inst, sizeof (struct score_it));
+
+ /* Var part
+ For a local symbol: addi rD, <sym>+<constant> (BFD_RELOC_GOT_LO16) */
+ sprintf (tmp, "addi_s_pic r%d, %s + %d", reg_rd, add_symbol->bsym->name, (int)add_number);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&var_insts[0], &inst, sizeof (struct score_it));
+ build_relax_frag (fix_insts, fix_num, var_insts, var_num, add_symbol);
+ }
+ else
+ {
+ int hi = (add_number >> 16) & 0x0000FFFF;
+ int lo = add_number & 0x0000FFFF;
+
+ /* Insn 1: lw rD, <sym>($gp) (BFD_RELOC_SCORE_GOT15) */
+ sprintf (tmp, "lw_pic r%d, %s", reg_rd, add_symbol->bsym->name);
+ if (append_insn (tmp, TRUE) == (int) FAIL)
+ return;
+
+ /* Insn 2 */
+ fix_num = 1;
+ var_num = 1;
+ /* Fix part
+ For an external symbol: ldis r1, HI%<constant> */
+ sprintf (tmp, "ldis r1, %d", hi);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&fix_insts[0], &inst, sizeof (struct score_it));
+
+ /* Var part
+ For a local symbol: ldis r1, HI%<constant>
+ but, if lo is outof 16 bit, make hi plus 1 */
+ if ((lo < -0x8000) || (lo > 0x7fff))
+ {
+ hi += 1;
+ }
+ sprintf (tmp, "ldis_pic r1, %d", hi);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&var_insts[0], &inst, sizeof (struct score_it));
+ build_relax_frag (fix_insts, fix_num, var_insts, var_num, add_symbol);
+
+ /* Insn 3 */
+ fix_num = 1;
+ var_num = 1;
+ /* Fix part
+ For an external symbol: ori r1, LO%<constant> */
+ sprintf (tmp, "ori r1, %d", lo);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&fix_insts[0], &inst, sizeof (struct score_it));
+
+ /* Var part
+ For a local symbol: addi r1, <sym>+LO%<constant> (BFD_RELOC_GOT_LO16) */
+ sprintf (tmp, "addi_u_pic r1, %s + %d", add_symbol->bsym->name, lo);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&var_insts[0], &inst, sizeof (struct score_it));
+ build_relax_frag (fix_insts, fix_num, var_insts, var_num, add_symbol);
+
+ /* Insn 4: add rD, rD, r1 */
+ sprintf (tmp, "add r%d, r%d, r1", reg_rd, reg_rd);
+ if (append_insn (tmp, TRUE) == (int) FAIL)
+ return;
+
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+ }
+
+ nor1 = r1_bak;
+}
+
+/* Handle la. */
+static void
+do_macro_la_rdi32 (char *str)
+{
+ int reg_rd;
+
+ skip_whitespace (str);
+ if ((reg_rd = reg_required_here (&str, 20, REG_TYPE_SCORE)) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ char append_str[MAX_LITERAL_POOL_SIZE];
+ char *keep_data = str;
+
+ /* la rd, simm16. */
+ if (data_op2 (&str, 1, _SIMM16_LA) != (int) FAIL)
+ {
+ end_of_line (str);
+ return;
+ }
+ /* la rd, imm32 or la rd, label. */
+ else
+ {
+ SET_INSN_ERROR (NULL);
+ str = keep_data;
+ if ((data_op2 (&str, 1, _VALUE_HI16) == (int) FAIL)
+ || (end_of_line (str) == (int) FAIL))
+ {
+ return;
+ }
+ else
+ {
+ if ((score_pic == NO_PIC) || (!inst.reloc.exp.X_add_symbol))
+ {
+ sprintf (append_str, "ld_i32hi r%d, %s", reg_rd, keep_data);
+ if (append_insn (append_str, TRUE) == (int) FAIL)
+ return;
+
+ sprintf (append_str, "ld_i32lo r%d, %s", reg_rd, keep_data);
+ if (append_insn (append_str, TRUE) == (int) FAIL)
+ return;
+ }
+ else
+ {
+ assert (inst.reloc.exp.X_add_symbol);
+ build_la_pic (reg_rd, inst.reloc.exp);
+ }
+
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+ }
+ }
+ }
+}
+
+/* Handle li. */
+static void
+do_macro_li_rdi32 (char *str){
+
+ int reg_rd;
+
+ skip_whitespace (str);
+ if ((reg_rd = reg_required_here (&str, 20, REG_TYPE_SCORE)) == (int) FAIL
+ || skip_past_comma (&str) == (int) FAIL)
+ {
+ return;
+ }
+ else
+ {
+ char *keep_data = str;
+
+ /* li rd, simm16. */
+ if (data_op2 (&str, 1, _SIMM16_LA) != (int) FAIL)
+ {
+ end_of_line (str);
+ return;
+ }
+ /* li rd, imm32. */
+ else
+ {
+ char append_str[MAX_LITERAL_POOL_SIZE];
+
+ str = keep_data;
+
+ if ((data_op2 (&str, 1, _VALUE_HI16) == (int) FAIL)
+ || (end_of_line (str) == (int) FAIL))
+ {
+ return;
+ }
+ else if (inst.reloc.exp.X_add_symbol)
+ {
+ inst.error = _("li rd label isn't correct instruction form");
+ return;
+ }
+ else
+ {
+ sprintf (append_str, "ld_i32hi r%d, %s", reg_rd, keep_data);
+
+ if (append_insn (append_str, TRUE) == (int) FAIL)
+ return;
+ else
+ {
+ sprintf (append_str, "ld_i32lo r%d, %s", reg_rd, keep_data);
+ if (append_insn (append_str, TRUE) == (int) FAIL)
+ return;
+
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+ }
+ }
+ }
+ }
+}
+
+/* Handle mul/mulu/div/divu/rem/remu. */
+static void
+do_macro_mul_rdrsrs (char *str)
+{
+ int reg_rd;
+ int reg_rs1;
+ int reg_rs2;
+ char *backupstr;
+ char append_str[MAX_LITERAL_POOL_SIZE];
+
+ if (university_version == 1)
+ as_warn ("%s", ERR_FOR_SCORE5U_MUL_DIV);
+
+ strcpy (append_str, str);
+ backupstr = append_str;
+ skip_whitespace (backupstr);
+ if (((reg_rd = reg_required_here (&backupstr, -1, REG_TYPE_SCORE)) == (int) FAIL)
+ || (skip_past_comma (&backupstr) == (int) FAIL)
+ || ((reg_rs1 = reg_required_here (&backupstr, -1, REG_TYPE_SCORE)) == (int) FAIL))
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&backupstr) == (int) FAIL)
+ {
+ /* rem/remu rA, rB is error format. */
+ if (strcmp (inst.name, "rem") == 0 || strcmp (inst.name, "remu") == 0)
+ {
+ SET_INSN_ERROR (BAD_ARGS);
+ }
+ else
+ {
+ SET_INSN_ERROR (NULL);
+ do_rsrs (str);
+ }
+ return;
+ }
+ else
+ {
+ SET_INSN_ERROR (NULL);
+ if (((reg_rs2 = reg_required_here (&backupstr, -1, REG_TYPE_SCORE)) == (int) FAIL)
+ || (end_of_line (backupstr) == (int) FAIL))
+ {
+ return;
+ }
+ else
+ {
+ char append_str1[MAX_LITERAL_POOL_SIZE];
+
+ if (strcmp (inst.name, "rem") == 0)
+ {
+ sprintf (append_str, "mul r%d, r%d", reg_rs1, reg_rs2);
+ sprintf (append_str1, "mfceh r%d", reg_rd);
+ }
+ else if (strcmp (inst.name, "remu") == 0)
+ {
+ sprintf (append_str, "mulu r%d, r%d", reg_rs1, reg_rs2);
+ sprintf (append_str1, "mfceh r%d", reg_rd);
+ }
+ else
+ {
+ sprintf (append_str, "%s r%d, r%d", inst.name, reg_rs1, reg_rs2);
+ sprintf (append_str1, "mfcel r%d", reg_rd);
+ }
+
+ /* Output mul/mulu or div/divu or rem/remu. */
+ if (append_insn (append_str, TRUE) == (int) FAIL)
+ return;
+
+ /* Output mfcel or mfceh. */
+ if (append_insn (append_str1, TRUE) == (int) FAIL)
+ return;
+
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+ }
+ }
+}
+
+static void
+exp_macro_ldst_abs (char *str)
+{
+ int reg_rd;
+ char *backupstr, *tmp;
+ char append_str[MAX_LITERAL_POOL_SIZE];
+ char verifystr[MAX_LITERAL_POOL_SIZE];
+ struct score_it inst_backup;
+ int r1_bak = 0;
+
+ r1_bak = nor1;
+ nor1 = 0;
+ memcpy (&inst_backup, &inst, sizeof (struct score_it));
+
+ strcpy (verifystr, str);
+ backupstr = verifystr;
+ skip_whitespace (backupstr);
+ if ((reg_rd = reg_required_here (&backupstr, -1, REG_TYPE_SCORE)) == (int) FAIL)
+ return;
+
+ tmp = backupstr;
+ if (skip_past_comma (&backupstr) == (int) FAIL)
+ return;
+
+ backupstr = tmp;
+ sprintf (append_str, "li r1 %s", backupstr);
+ append_insn (append_str, TRUE);
+
+ memcpy (&inst, &inst_backup, sizeof (struct score_it));
+ sprintf (append_str, " r%d, [r1,0]", reg_rd);
+ do_ldst_insn (append_str);
+
+ nor1 = r1_bak;
+}
+
+static int
+nopic_need_relax (symbolS * sym, int before_relaxing)
+{
+ if (sym == NULL)
+ return 0;
+ else if (USE_GLOBAL_POINTER_OPT && g_switch_value > 0)
+ {
+ const char *symname;
+ const char *segname;
+
+ /* Find out whether this symbol can be referenced off the $gp
+ register. It can be if it is smaller than the -G size or if
+ it is in the .sdata or .sbss section. Certain symbols can
+ not be referenced off the $gp, although it appears as though
+ they can. */
+ symname = S_GET_NAME (sym);
+ if (symname != (const char *)NULL
+ && (strcmp (symname, "eprol") == 0
+ || strcmp (symname, "etext") == 0
+ || strcmp (symname, "_gp") == 0
+ || strcmp (symname, "edata") == 0
+ || strcmp (symname, "_fbss") == 0
+ || strcmp (symname, "_fdata") == 0
+ || strcmp (symname, "_ftext") == 0
+ || strcmp (symname, "end") == 0
+ || strcmp (symname, GP_DISP_LABEL) == 0))
+ {
+ return 1;
+ }
+ else if ((!S_IS_DEFINED (sym) || S_IS_COMMON (sym)) && (0
+ /* We must defer this decision until after the whole file has been read,
+ since there might be a .extern after the first use of this symbol. */
+ || (before_relaxing
+ && S_GET_VALUE (sym) == 0)
+ || (S_GET_VALUE (sym) != 0
+ && S_GET_VALUE (sym) <= g_switch_value)))
+ {
+ return 0;
+ }
+
+ segname = segment_name (S_GET_SEGMENT (sym));
+ return (strcmp (segname, ".sdata") != 0
+ && strcmp (segname, ".sbss") != 0
+ && strncmp (segname, ".sdata.", 7) != 0
+ && strncmp (segname, ".gnu.linkonce.s.", 16) != 0);
+ }
+ /* We are not optimizing for the $gp register. */
+ else
+ return 1;
+}
+
+/* Build a relax frag for lw/st instruction when generating PIC,
+ external symbol first and local symbol second. */
+
+static void
+build_lwst_pic (int reg_rd, expressionS exp, const char *insn_name)
+{
+ symbolS *add_symbol = exp.X_add_symbol;
+ int add_number = exp.X_add_number;
+ struct score_it fix_insts[RELAX_INST_NUM];
+ struct score_it var_insts[RELAX_INST_NUM];
+ int fix_num = 0;
+ int var_num = 0;
+ char tmp[MAX_LITERAL_POOL_SIZE];
+ int r1_bak;
+
+ r1_bak = nor1;
+ nor1 = 0;
+
+ if ((add_number == 0) || (add_number >= -0x8000 && add_number <= 0x7fff))
+ {
+ fix_num = 1;
+ var_num = 2;
+
+ /* For an external symbol, two insns are generated;
+ For a local symbol, three insns are generated. */
+ /* Fix part
+ For an external symbol: lw rD, <sym>($gp)
+ (BFD_RELOC_SCORE_GOT15) */
+ sprintf (tmp, "lw_pic r1, %s", add_symbol->bsym->name);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&fix_insts[0], &inst, sizeof (struct score_it));
+
+ /* Var part
+ For a local symbol :
+ lw rD, <sym>($gp) (BFD_RELOC_SCORE_GOT15)
+ addi rD, <sym> (BFD_RELOC_GOT_LO16) */
+ inst.reloc.type = BFD_RELOC_SCORE_GOT15;
+ memcpy (&var_insts[0], &inst, sizeof (struct score_it));
+ sprintf (tmp, "addi_s_pic r1, %s", add_symbol->bsym->name);
+ if (append_insn (tmp, FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&var_insts[1], &inst, sizeof (struct score_it));
+ build_relax_frag (fix_insts, fix_num, var_insts, var_num, add_symbol);
+
+ /* Insn 2 or Insn 3: lw/st rD, [r1, constant] */
+ sprintf (tmp, "%s r%d, [r1, %d]", insn_name, reg_rd, add_number);
+ if (append_insn (tmp, TRUE) == (int) FAIL)
+ return;
+
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+ }
+ else
+ {
+ inst.error = _("PIC code offset overflow (max 16 signed bits)");
+ return;
+ }
+
+ nor1 = r1_bak;
+}
+
+static void
+do_macro_ldst_label (char *str)
+{
+ int i;
+ int ldst_gp_p = 0;
+ int reg_rd;
+ int r1_bak;
+ char *backup_str;
+ char *label_str;
+ char *absolute_value;
+ char append_str[3][MAX_LITERAL_POOL_SIZE];
+ char verifystr[MAX_LITERAL_POOL_SIZE];
+ struct score_it inst_backup;
+ struct score_it inst_expand[3];
+ struct score_it inst_main;
+
+ memcpy (&inst_backup, &inst, sizeof (struct score_it));
+ strcpy (verifystr, str);
+ backup_str = verifystr;
+
+ skip_whitespace (backup_str);
+ if ((reg_rd = reg_required_here (&backup_str, -1, REG_TYPE_SCORE)) == (int) FAIL)
+ return;
+
+ if (skip_past_comma (&backup_str) == (int) FAIL)
+ return;
+
+ label_str = backup_str;
+
+ /* Ld/st rD, [rA, imm] ld/st rD, [rA]+, imm ld/st rD, [rA, imm]+. */
+ if (*backup_str == '[')
+ {
+ inst.type = Rd_rvalueRs_preSI12;
+ do_ldst_insn (str);
+ return;
+ }
+
+ /* Ld/st rD, imm. */
+ absolute_value = backup_str;
+ inst.type = Rd_rvalueRs_SI15;
+ if ((my_get_expression (&inst.reloc.exp, &backup_str) == (int) FAIL)
+ || (validate_immediate (inst.reloc.exp.X_add_number, _VALUE, 0) == (int) FAIL)
+ || (end_of_line (backup_str) == (int) FAIL))
+ {
+ return;
+ }
+ else
+ {
+ if (inst.reloc.exp.X_add_symbol == 0)
+ {
+ memcpy (&inst, &inst_backup, sizeof (struct score_it));
+ exp_macro_ldst_abs (str);
+ return;
+ }
+ }
+
+ /* Ld/st rD, label. */
+ inst.type = Rd_rvalueRs_SI15;
+ backup_str = absolute_value;
+ if ((data_op2 (&backup_str, 1, _GP_IMM15) == (int) FAIL)
+ || (end_of_line (backup_str) == (int) FAIL))
+ {
+ return;
+ }
+ else
+ {
+ if (inst.reloc.exp.X_add_symbol == 0)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+
+ return;
+ }
+
+ if (score_pic == PIC)
+ {
+ int ldst_idx = 0;
+ ldst_idx = inst.instruction & OPC_PSEUDOLDST_MASK;
+ build_lwst_pic (reg_rd, inst.reloc.exp, score_ldst_insns[ldst_idx * 3 + 0].template);
+ return;
+ }
+ else
+ {
+ if ((inst.reloc.exp.X_add_number <= 0x3fff)
+ && (inst.reloc.exp.X_add_number >= -0x4000)
+ && (!nopic_need_relax (inst.reloc.exp.X_add_symbol, 1)))
+ {
+ int ldst_idx = 0;
+
+ /* Assign the real opcode. */
+ ldst_idx = inst.instruction & OPC_PSEUDOLDST_MASK;
+ inst.instruction &= ~OPC_PSEUDOLDST_MASK;
+ inst.instruction |= score_ldst_insns[ldst_idx * 3 + 0].value;
+ inst.instruction |= reg_rd << 20;
+ inst.instruction |= GP << 15;
+ inst.relax_inst = 0x8000;
+ inst.relax_size = 0;
+ ldst_gp_p = 1;
+ }
+ }
+ }
+
+ /* Backup inst. */
+ memcpy (&inst_main, &inst, sizeof (struct score_it));
+ r1_bak = nor1;
+ nor1 = 0;
+
+ /* Determine which instructions should be output. */
+ sprintf (append_str[0], "ld_i32hi r1, %s", label_str);
+ sprintf (append_str[1], "ld_i32lo r1, %s", label_str);
+ sprintf (append_str[2], "%s r%d, [r1, 0]", inst_backup.name, reg_rd);
+
+ /* Generate three instructions.
+ la r1, label
+ ld/st rd, [r1, 0] */
+ for (i = 0; i < 3; i++)
+ {
+ if (append_insn (append_str[i], FALSE) == (int) FAIL)
+ return;
+
+ memcpy (&inst_expand[i], &inst, sizeof (struct score_it));
+ }
+
+ if (ldst_gp_p)
+ {
+ char *p;
+
+ /* Adjust instruction opcode and to be relaxed instruction opcode. */
+ inst_main.instruction = adjust_paritybit (inst_main.instruction, GET_INSN_CLASS (inst_main.type));
+ inst_main.relax_size = inst_expand[0].size + inst_expand[1].size + inst_expand[2].size;
+ inst_main.type = Insn_GP;
+
+ for (i = 0; i < 3; i++)
+ inst_expand[i].instruction = adjust_paritybit (inst_expand[i].instruction
+ , GET_INSN_CLASS (inst_expand[i].type));
+
+ /* Check data dependency. */
+ handle_dependency (&inst_main);
+
+ /* Start a new frag if frag_now is not empty. */
+ if (frag_now_fix () != 0)
+ {
+ if (!frag_now->tc_frag_data.is_insn)
+ frag_wane (frag_now);
+
+ frag_new (0);
+ }
+ frag_grow (20);
+
+ /* Write fr_fix part. */
+ p = frag_more (inst_main.size);
+ md_number_to_chars (p, inst_main.instruction, inst_main.size);
+
+ if (inst_main.reloc.type != BFD_RELOC_NONE)
+ {
+ fix_new_score (frag_now, p - frag_now->fr_literal, inst_main.size,
+ &inst_main.reloc.exp, inst_main.reloc.pc_rel, inst_main.reloc.type);
+ }
+
+#ifdef OBJ_ELF
+ dwarf2_emit_insn (inst_main.size);
+#endif
+
+ /* GP instruction can not do optimization, only can do relax between
+ 1 instruction and 3 instructions. */
+ p = frag_var (rs_machine_dependent, inst_main.relax_size + RELAX_PAD_BYTE, 0,
+ RELAX_ENCODE (inst_main.size, inst_main.relax_size, inst_main.type, 0, 4, 0),
+ inst_main.reloc.exp.X_add_symbol, 0, NULL);
+
+ /* Write fr_var part.
+ no calling gen_insn_frag, no fixS will be generated. */
+ md_number_to_chars (p, inst_expand[0].instruction, inst_expand[0].size);
+ p += inst_expand[0].size;
+ md_number_to_chars (p, inst_expand[1].instruction, inst_expand[1].size);
+ p += inst_expand[1].size;
+ md_number_to_chars (p, inst_expand[2].instruction, inst_expand[2].size);
+ }
+ else
+ {
+ gen_insn_frag (&inst_expand[0], NULL);
+ gen_insn_frag (&inst_expand[1], NULL);
+ gen_insn_frag (&inst_expand[2], NULL);
+ }
+ nor1 = r1_bak;
+
+ /* Set bwarn as -1, so macro instruction itself will not be generated frag. */
+ inst.bwarn = -1;
+}
+
+static void
+do_lw_pic (char *str)
+{
+ int reg_rd;
+
+ skip_whitespace (str);
+ if (((reg_rd = reg_required_here (&str, 20, REG_TYPE_SCORE)) == (int) FAIL)
+ || (skip_past_comma (&str) == (int) FAIL)
+ || (my_get_expression (&inst.reloc.exp, &str) == (int) FAIL)
+ || (end_of_line (str) == (int) FAIL))
+ {
+ return;
+ }
+ else
+ {
+ if (inst.reloc.exp.X_add_symbol == 0)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+
+ return;
+ }
+
+ inst.instruction |= GP << 15;
+ inst.reloc.type = BFD_RELOC_SCORE_GOT15;
+ }
+}
+
+static void
+do_empty (char *str)
+{
+ str = str;
+ if (university_version == 1)
+ {
+ if (((inst.instruction & 0x3e0003ff) == 0x0c000004)
+ || ((inst.instruction & 0x3e0003ff) == 0x0c000024)
+ || ((inst.instruction & 0x3e0003ff) == 0x0c000044)
+ || ((inst.instruction & 0x3e0003ff) == 0x0c000064))
+ {
+ inst.error = ERR_FOR_SCORE5U_MMU;
+ return;
+ }
+ }
+ if (end_of_line (str) == (int) FAIL)
+ return;
+
+ if (inst.relax_inst != 0x8000)
+ {
+ if (inst.type == NO_OPD)
+ {
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_size = 4;
+ }
+ }
+}
+
+static void
+do_jump (char *str)
+{
+ char *save_in;
+
+ skip_whitespace (str);
+ if (my_get_expression (&inst.reloc.exp, &str) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ return;
+
+ if (inst.reloc.exp.X_add_symbol == 0)
+ {
+ inst.error = _("lacking label ");
+ return;
+ }
+
+ if (((inst.reloc.exp.X_add_number & 0xff000000) != 0)
+ && ((inst.reloc.exp.X_add_number & 0xff000000) != 0xff000000))
+ {
+ inst.error = _("invalid constant: 25 bit expression not in range -2^24..2^24");
+ return;
+ }
+
+ save_in = input_line_pointer;
+ input_line_pointer = str;
+ inst.reloc.type = BFD_RELOC_SCORE_JMP;
+ inst.reloc.pc_rel = 1;
+ input_line_pointer = save_in;
+}
+
+static void
+do16_jump (char *str)
+{
+ skip_whitespace (str);
+ if (my_get_expression (&inst.reloc.exp, &str) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else if (inst.reloc.exp.X_add_symbol == 0)
+ {
+ inst.error = _("lacking label ");
+ return;
+ }
+ else if (((inst.reloc.exp.X_add_number & 0xfffff800) != 0)
+ && ((inst.reloc.exp.X_add_number & 0xfffff800) != 0xfffff800))
+ {
+ inst.error = _("invalid constant: 12 bit expression not in range -2^11..2^11");
+ return;
+ }
+
+ inst.reloc.type = BFD_RELOC_SCORE16_JMP;
+ inst.reloc.pc_rel = 1;
+}
+
+static void
+do_branch (char *str)
+{
+ unsigned long abs_value = 0;
+
+ if (my_get_expression (&inst.reloc.exp, &str) == (int) FAIL
+ || end_of_line (str) == (int) FAIL)
+ {
+ return;
+ }
+ else if (inst.reloc.exp.X_add_symbol == 0)
+ {
+ inst.error = _("lacking label ");
+ return;
+ }
+ else if (((inst.reloc.exp.X_add_number & 0xff000000) != 0)
+ && ((inst.reloc.exp.X_add_number & 0xff000000) != 0xff000000))
+ {
+ inst.error = _("invalid constant: 20 bit expression not in range -2^19..2^19");
+ return;
+ }
+
+ inst.reloc.type = BFD_RELOC_SCORE_BRANCH;
+ inst.reloc.pc_rel = 1;
+
+ /* Branch 32 offset field : 20 bit, 16 bit branch offset field : 8 bit. */
+ inst.instruction |= (inst.reloc.exp.X_add_number & 0x3fe) | ((inst.reloc.exp.X_add_number & 0xffc00) << 5);
+
+ /* Compute 16 bit branch instruction. */
+ if ((inst.relax_inst != 0x8000) && (abs_value & 0xfffffe00) == 0)
+ {
+ inst.relax_inst |= (((inst.instruction >> 10) & 0xf) << 8);
+ inst.relax_inst |= ((inst.reloc.exp.X_add_number >> 1) & 0xff);
+ inst.relax_size = 2;
+ }
+ else
+ {
+ inst.relax_inst = 0x8000;
+ }
+}
+
+static void
+do16_branch (char *str)
+{
+ if ((my_get_expression (&inst.reloc.exp, &str) == (int) FAIL
+ || end_of_line (str) == (int) FAIL))
+ {
+ ;
+ }
+ else if (inst.reloc.exp.X_add_symbol == 0)
+ {
+ inst.error = _("lacking label");
+ }
+ else if (((inst.reloc.exp.X_add_number & 0xffffff00) != 0)
+ && ((inst.reloc.exp.X_add_number & 0xffffff00) != 0xffffff00))
+ {
+ inst.error = _("invalid constant: 9 bit expression not in range -2^8..2^8");
+ }
+ else
+ {
+ inst.reloc.type = BFD_RELOC_SCORE16_BRANCH;
+ inst.reloc.pc_rel = 1;
+ inst.instruction |= ((inst.reloc.exp.X_add_number >> 1) & 0xff);
+ }
+}
+
+/* Iterate over the base tables to create the instruction patterns. */
+static void
+build_score_ops_hsh (void)
+{
+ unsigned int i;
+ static struct obstack insn_obstack;
+
+ obstack_begin (&insn_obstack, 4000);
+ for (i = 0; i < sizeof (score_insns) / sizeof (struct asm_opcode); i++)
+ {
+ const struct asm_opcode *insn = score_insns + i;
+ unsigned len = strlen (insn->template);
+ struct asm_opcode *new;
+ char *template;
+ new = obstack_alloc (&insn_obstack, sizeof (struct asm_opcode));
+ template = obstack_alloc (&insn_obstack, len + 1);
+
+ strcpy (template, insn->template);
+ new->template = template;
+ new->parms = insn->parms;
+ new->value = insn->value;
+ new->relax_value = insn->relax_value;
+ new->type = insn->type;
+ new->bitmask = insn->bitmask;
+ hash_insert (score_ops_hsh, new->template, (void *) new);
+ }
+}
+
+static void
+build_dependency_insn_hsh (void)
+{
+ unsigned int i;
+ static struct obstack dependency_obstack;
+
+ obstack_begin (&dependency_obstack, 4000);
+ for (i = 0; i < sizeof (insn_to_dependency_table) / sizeof (insn_to_dependency_table[0]); i++)
+ {
+ const struct insn_to_dependency *tmp = insn_to_dependency_table + i;
+ unsigned len = strlen (tmp->insn_name);
+ struct insn_to_dependency *new;
+
+ new = obstack_alloc (&dependency_obstack, sizeof (struct insn_to_dependency));
+ new->insn_name = obstack_alloc (&dependency_obstack, len + 1);
+
+ strcpy (new->insn_name, tmp->insn_name);
+ new->type = tmp->type;
+ hash_insert (dependency_insn_hsh, new->insn_name, (void *) new);
+ }
+}
+
+/* Turn an integer of n bytes (in val) into a stream of bytes appropriate
+ for use in the a.out file, and stores them in the array pointed to by buf.
+ This knows about the endian-ness of the target machine and does
+ THE RIGHT THING, whatever it is. Possible values for n are 1 (byte)
+ 2 (short) and 4 (long) Floating numbers are put out as a series of
+ LITTLENUMS (shorts, here at least). */
+
+void
+md_number_to_chars (char *buf, valueT val, int n)
+{
+ if (target_big_endian)
+ number_to_chars_bigendian (buf, val, n);
+ else
+ number_to_chars_littleendian (buf, val, n);
+}
+
+static valueT
+md_chars_to_number (char *buf, int n)
+{
+ valueT result = 0;
+ unsigned char *where = (unsigned char *)buf;
+
+ if (target_big_endian)
+ {
+ while (n--)
+ {
+ result <<= 8;
+ result |= (*where++ & 255);
+ }
+ }
+ else
+ {
+ while (n--)
+ {
+ result <<= 8;
+ result |= (where[n] & 255);
+ }
+ }
+
+ return result;
+}
+
+/* Turn a string in input_line_pointer into a floating point constant
+ of type TYPE, and store the appropriate bytes in *LITP. The number
+ of LITTLENUMS emitted is stored in *SIZEP. An error message is
+ returned, or NULL on OK.
+
+ Note that fp constants aren't represent in the normal way on the ARM.
+ In big endian mode, things are as expected. However, in little endian
+ mode fp constants are big-endian word-wise, and little-endian byte-wise
+ within the words. For example, (double) 1.1 in big endian mode is
+ the byte sequence 3f f1 99 99 99 99 99 9a, and in little endian mode is
+ the byte sequence 99 99 f1 3f 9a 99 99 99. */
+
+char *
+md_atof (int type, char *litP, int *sizeP)
+{
+ int prec;
+ LITTLENUM_TYPE words[MAX_LITTLENUMS];
+ char *t;
+ int i;
+
+ switch (type)
+ {
+ case 'f':
+ case 'F':
+ case 's':
+ case 'S':
+ prec = 2;
+ break;
+ case 'd':
+ case 'D':
+ case 'r':
+ case 'R':
+ prec = 4;
+ break;
+ case 'x':
+ case 'X':
+ case 'p':
+ case 'P':
+ prec = 6;
+ break;
+ default:
+ *sizeP = 0;
+ return _("bad call to MD_ATOF()");
+ }
+
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+ *sizeP = prec * 2;
+
+ if (target_big_endian)
+ {
+ for (i = 0; i < prec; i++)
+ {
+ md_number_to_chars (litP, (valueT) words[i], 2);
+ litP += 2;
+ }
+ }
+ else
+ {
+ for (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;
+}
+
+/* Return true if the given symbol should be considered local for PIC. */
+
+static bfd_boolean
+pic_need_relax (symbolS *sym, asection *segtype)
+{
+ asection *symsec;
+ bfd_boolean linkonce;
+
+ /* Handle the case of a symbol equated to another symbol. */
+ while (symbol_equated_reloc_p (sym))
+ {
+ symbolS *n;
+
+ /* It's possible to get a loop here in a badly written
+ program. */
+ n = symbol_get_value_expression (sym)->X_add_symbol;
+ if (n == sym)
+ break;
+ sym = n;
+ }
+
+ symsec = S_GET_SEGMENT (sym);
+
+ /* duplicate the test for LINK_ONCE sections as in adjust_reloc_syms */
+ linkonce = FALSE;
+ if (symsec != segtype && ! S_IS_LOCAL (sym))
+ {
+ if ((bfd_get_section_flags (stdoutput, symsec) & SEC_LINK_ONCE) != 0)
+ linkonce = TRUE;
+
+ /* The GNU toolchain uses an extension for ELF: a section
+ beginning with the magic string .gnu.linkonce is a linkonce
+ section. */
+ if (strncmp (segment_name (symsec), ".gnu.linkonce",
+ sizeof ".gnu.linkonce" - 1) == 0)
+ linkonce = TRUE;
+ }
+
+ /* This must duplicate the test in adjust_reloc_syms. */
+ return (symsec != &bfd_und_section
+ && symsec != &bfd_abs_section
+ && ! bfd_is_com_section (symsec)
+ && !linkonce
+#ifdef OBJ_ELF
+ /* A global or weak symbol is treated as external. */
+ && (OUTPUT_FLAVOR != bfd_target_elf_flavour
+ || (! S_IS_WEAK (sym) && ! S_IS_EXTERNAL (sym)))
+#endif
+ );
+}
+
+static int
+judge_size_before_relax (fragS * fragp, asection *sec)
+{
+ int change = 0;
+
+ if (score_pic == NO_PIC)
+ change = nopic_need_relax (fragp->fr_symbol, 0);
+ else
+ change = pic_need_relax (fragp->fr_symbol, sec);
+
+ if (change == 1)
+ {
+ /* Only at the first time determining whether GP instruction relax should be done,
+ return the difference between insntruction size and instruction relax size. */
+ if (fragp->fr_opcode == NULL)
+ {
+ fragp->fr_fix = RELAX_NEW (fragp->fr_subtype);
+ fragp->fr_opcode = fragp->fr_literal + RELAX_RELOC1 (fragp->fr_subtype);
+ return RELAX_NEW (fragp->fr_subtype) - RELAX_OLD (fragp->fr_subtype);
+ }
+ }
+
+ return 0;
+}
+
+/* In this function, we determine whether GP instruction should do relaxation,
+ for the label being against was known now.
+ Doing this here but not in md_relax_frag() can induce iteration times
+ in stage of doing relax. */
+int
+md_estimate_size_before_relax (fragS * fragp, asection * sec ATTRIBUTE_UNUSED)
+{
+ if ((RELAX_TYPE (fragp->fr_subtype) == Insn_GP)
+ || (RELAX_TYPE (fragp->fr_subtype) == Insn_PIC))
+ return judge_size_before_relax (fragp, sec);
+
+ return 0;
+}
+
+static int
+b32_relax_to_b16 (fragS * fragp)
+{
+ int grows = 0;
+ int relaxable_p = 0;
+ int old;
+ int new;
+ int frag_addr = fragp->fr_address + fragp->insn_addr;
+
+ addressT symbol_address = 0;
+ symbolS *s;
+ offsetT offset;
+ unsigned long value;
+ unsigned long abs_value;
+
+ /* FIXME : here may be able to modify better .
+ I don't know how to get the fragp's section ,
+ so in relax stage , it may be wrong to calculate the symbol's offset when the frag's section
+ is different from the symbol's. */
+
+ old = RELAX_OLD (fragp->fr_subtype);
+ new = RELAX_NEW (fragp->fr_subtype);
+ relaxable_p = RELAX_OPT (fragp->fr_subtype);
+
+ s = fragp->fr_symbol;
+ /* b/bl immediate */
+ if (s == NULL)
+ frag_addr = 0;
+ else
+ {
+ if (s->bsym != 0)
+ symbol_address = (addressT) s->sy_frag->fr_address;
+ }
+
+ value = md_chars_to_number (fragp->fr_literal, INSN_SIZE);
+
+ /* b 32's offset : 20 bit, b 16's tolerate field : 0xff. */
+ offset = ((value & 0x3ff0000) >> 6) | (value & 0x3fe);
+ if ((offset & 0x80000) == 0x80000)
+ offset |= 0xfff00000;
+
+ abs_value = offset + symbol_address - frag_addr;
+ if ((abs_value & 0x80000000) == 0x80000000)
+ abs_value = 0xffffffff - abs_value + 1;
+
+ /* Relax branch 32 to branch 16. */
+ if (relaxable_p && (s->bsym != NULL) && ((abs_value & 0xffffff00) == 0)
+ && (S_IS_DEFINED (s) && !S_IS_COMMON (s) && !S_IS_EXTERNAL (s)))
+ {
+ /* do nothing. */
+ }
+ else
+ {
+ /* Branch 32 can not be relaxed to b 16, so clear OPT bit. */
+ fragp->fr_opcode = NULL;
+ fragp->fr_subtype = RELAX_OPT_CLEAR (fragp->fr_subtype);
+ }
+
+ return grows;
+}
+
+/* Main purpose is to determine whether one frag should do relax.
+ frag->fr_opcode indicates this point. */
+
+int
+score_relax_frag (asection * sec ATTRIBUTE_UNUSED, fragS * fragp, long stretch ATTRIBUTE_UNUSED)
+{
+ int grows = 0;
+ int insn_size;
+ int insn_relax_size;
+ int do_relax_p = 0; /* Indicate doing relaxation for this frag. */
+ int relaxable_p = 0;
+ bfd_boolean word_align_p = FALSE;
+ fragS *next_fragp;
+
+ /* If the instruction address is odd, make it half word align first. */
+ if ((fragp->fr_address) % 2 != 0)
+ {
+ if ((fragp->fr_address + fragp->insn_addr) % 2 != 0)
+ {
+ fragp->insn_addr = 1;
+ grows += 1;
+ }
+ }
+
+ word_align_p = ((fragp->fr_address + fragp->insn_addr) % 4 == 0) ? TRUE : FALSE;
+
+ /* Get instruction size and relax size after the last relaxation. */
+ if (fragp->fr_opcode)
+ {
+ insn_size = RELAX_NEW (fragp->fr_subtype);
+ insn_relax_size = RELAX_OLD (fragp->fr_subtype);
+ }
+ else
+ {
+ insn_size = RELAX_OLD (fragp->fr_subtype);
+ insn_relax_size = RELAX_NEW (fragp->fr_subtype);
+ }
+
+ /* Handle specially for GP instruction. for, judge_size_before_relax() has already determine
+ whether the GP instruction should do relax. */
+ if ((RELAX_TYPE (fragp->fr_subtype) == Insn_GP)
+ || (RELAX_TYPE (fragp->fr_subtype) == Insn_PIC))
+ {
+ if (!word_align_p)
+ {
+ if (fragp->insn_addr < 2)
+ {
+ fragp->insn_addr += 2;
+ grows += 2;
+ }
+ else
+ {
+ fragp->insn_addr -= 2;
+ grows -= 2;
+ }
+ }
+
+ if (fragp->fr_opcode)
+ fragp->fr_fix = RELAX_NEW (fragp->fr_subtype) + fragp->insn_addr;
+ else
+ fragp->fr_fix = RELAX_OLD (fragp->fr_subtype) + fragp->insn_addr;
+ }
+ else
+ {
+ if (RELAX_TYPE (fragp->fr_subtype) == PC_DISP19div2)
+ b32_relax_to_b16 (fragp);
+
+ relaxable_p = RELAX_OPT (fragp->fr_subtype);
+ next_fragp = fragp->fr_next;
+ while ((next_fragp) && (next_fragp->fr_type != rs_machine_dependent))
+ {
+ next_fragp = next_fragp->fr_next;
+ }
+
+ if (next_fragp)
+ {
+ int n_insn_size;
+ int n_relaxable_p = 0;
+
+ if (next_fragp->fr_opcode)
+ {
+ n_insn_size = RELAX_NEW (next_fragp->fr_subtype);
+ }
+ else
+ {
+ n_insn_size = RELAX_OLD (next_fragp->fr_subtype);
+ }
+
+ if (RELAX_TYPE (next_fragp->fr_subtype) == PC_DISP19div2)
+ b32_relax_to_b16 (next_fragp);
+ n_relaxable_p = RELAX_OPT (next_fragp->fr_subtype);
+
+ if (word_align_p)
+ {
+ if (insn_size == 4)
+ {
+ /* 32 -> 16. */
+ if (relaxable_p && ((n_insn_size == 2) || n_relaxable_p))
+ {
+ grows -= 2;
+ do_relax_p = 1;
+ }
+ }
+ else if (insn_size == 2)
+ {
+ /* 16 -> 32. */
+ if (relaxable_p && (((n_insn_size == 4) && !n_relaxable_p) || (n_insn_size > 4)))
+ {
+ grows += 2;
+ do_relax_p = 1;
+ }
+ }
+ else
+ {
+ abort ();
+ }
+ }
+ else
+ {
+ if (insn_size == 4)
+ {
+ /* 32 -> 16. */
+ if (relaxable_p)
+ {
+ grows -= 2;
+ do_relax_p = 1;
+ }
+ /* Make the 32 bit insturction word align. */
+ else
+ {
+ fragp->insn_addr += 2;
+ grows += 2;
+ }
+ }
+ else if (insn_size == 2)
+ {
+ /* Do nothing. */
+ }
+ else
+ {
+ abort ();
+ }
+ }
+ }
+ else
+ {
+ /* Here, try best to do relax regardless fragp->fr_next->fr_type. */
+ if (word_align_p == FALSE)
+ {
+ if (insn_size % 4 == 0)
+ {
+ /* 32 -> 16. */
+ if (relaxable_p)
+ {
+ grows -= 2;
+ do_relax_p = 1;
+ }
+ else
+ {
+ fragp->insn_addr += 2;
+ grows += 2;
+ }
+ }
+ }
+ else
+ {
+ /* Do nothing. */
+ }
+ }
+
+ /* fragp->fr_opcode indicates whether this frag should be relaxed. */
+ if (do_relax_p)
+ {
+ if (fragp->fr_opcode)
+ {
+ fragp->fr_opcode = NULL;
+ /* Guarantee estimate stage is correct. */
+ fragp->fr_fix = RELAX_OLD (fragp->fr_subtype);
+ fragp->fr_fix += fragp->insn_addr;
+ }
+ else
+ {
+ fragp->fr_opcode = fragp->fr_literal + RELAX_RELOC1 (fragp->fr_subtype);
+ /* Guarantee estimate stage is correct. */
+ fragp->fr_fix = RELAX_NEW (fragp->fr_subtype);
+ fragp->fr_fix += fragp->insn_addr;
+ }
+ }
+ else
+ {
+ if (fragp->fr_opcode)
+ {
+ /* Guarantee estimate stage is correct. */
+ fragp->fr_fix = RELAX_NEW (fragp->fr_subtype);
+ fragp->fr_fix += fragp->insn_addr;
+ }
+ else
+ {
+ /* Guarantee estimate stage is correct. */
+ fragp->fr_fix = RELAX_OLD (fragp->fr_subtype);
+ fragp->fr_fix += fragp->insn_addr;
+ }
+ }
+ }
+
+ return grows;
+}
+
+void
+md_convert_frag (bfd * abfd ATTRIBUTE_UNUSED, segT sec ATTRIBUTE_UNUSED, fragS * fragp)
+{
+ int old;
+ int new;
+ char backup[20];
+ fixS *fixp;
+
+ old = RELAX_OLD (fragp->fr_subtype);
+ new = RELAX_NEW (fragp->fr_subtype);
+
+ /* fragp->fr_opcode indicates whether this frag should be relaxed. */
+ if (fragp->fr_opcode == NULL)
+ {
+ memcpy (backup, fragp->fr_literal, old);
+ fragp->fr_fix = old;
+ }
+ else
+ {
+ memcpy (backup, fragp->fr_literal + old, new);
+ fragp->fr_fix = new;
+ }
+
+ fixp = fragp->tc_frag_data.fixp;
+ while (fixp && fixp->fx_frag == fragp && fixp->fx_where < old)
+ {
+ if (fragp->fr_opcode)
+ fixp->fx_done = 1;
+ fixp = fixp->fx_next;
+ }
+ while (fixp && fixp->fx_frag == fragp)
+ {
+ if (fragp->fr_opcode)
+ fixp->fx_where -= old + fragp->insn_addr;
+ else
+ fixp->fx_done = 1;
+ fixp = fixp->fx_next;
+ }
+
+ if (fragp->insn_addr)
+ {
+ md_number_to_chars (fragp->fr_literal, 0x0, fragp->insn_addr);
+ }
+ memcpy (fragp->fr_literal + fragp->insn_addr, backup, fragp->fr_fix);
+ fragp->fr_fix += fragp->insn_addr;
+}
+
+/* Implementation of md_frag_check.
+ Called after md_convert_frag(). */
+
+void
+score_frag_check (fragS * fragp ATTRIBUTE_UNUSED)
+{
+ know (fragp->insn_addr <= RELAX_PAD_BYTE);
+}
+
+bfd_boolean
+score_fix_adjustable (fixS * fixP)
+{
+ if (fixP->fx_addsy == NULL)
+ {
+ return 1;
+ }
+ else if (OUTPUT_FLAVOR == bfd_target_elf_flavour
+ && (S_IS_EXTERNAL (fixP->fx_addsy) || S_IS_WEAK (fixP->fx_addsy)))
+ {
+ return 0;
+ }
+ else if (fixP->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ {
+ return 0;
+ }
+
+ return 1;
+}
+
+/* Implementation of TC_VALIDATE_FIX.
+ Called before md_apply_fix() and after md_convert_frag(). */
+void
+score_validate_fix (fixS *fixP)
+{
+ fixP->fx_where += fixP->fx_frag->insn_addr;
+}
+
+long
+md_pcrel_from (fixS * fixP)
+{
+ long retval = 0;
+
+ if (fixP->fx_addsy
+ && (S_GET_SEGMENT (fixP->fx_addsy) == undefined_section)
+ && (fixP->fx_subsy == NULL))
+ {
+ retval = 0;
+ }
+ else
+ {
+ retval = fixP->fx_where + fixP->fx_frag->fr_address;
+ }
+
+ return retval;
+}
+
+int
+score_force_relocation (struct fix *fixp)
+{
+ int retval = 0;
+
+ if (fixp->fx_r_type == BFD_RELOC_VTABLE_INHERIT
+ || fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY
+ || fixp->fx_r_type == BFD_RELOC_SCORE_JMP
+ || fixp->fx_r_type == BFD_RELOC_SCORE_BRANCH
+ || fixp->fx_r_type == BFD_RELOC_SCORE16_JMP
+ || fixp->fx_r_type == BFD_RELOC_SCORE16_BRANCH)
+ {
+ retval = 1;
+ }
+
+ return retval;
+}
+
+/* Round up a section size to the appropriate boundary. */
+valueT
+md_section_align (segT segment ATTRIBUTE_UNUSED, valueT size)
+{
+ int align = bfd_get_section_alignment (stdoutput, segment);
+
+ return ((size + (1 << align) - 1) & (-1 << align));
+}
+
+void
+md_apply_fix (fixS *fixP, valueT *valP, segT seg)
+{
+ offsetT value = *valP;
+ offsetT abs_value = 0;
+ offsetT newval;
+ offsetT content;
+ unsigned short HI, LO;
+
+ char *buf = fixP->fx_frag->fr_literal + fixP->fx_where;
+
+ assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
+ if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
+ {
+ if (fixP->fx_r_type != BFD_RELOC_SCORE_DUMMY_HI16)
+ fixP->fx_done = 1;
+ }
+
+ /* If this symbol is in a different section then we need to leave it for
+ the linker to deal with. Unfortunately, md_pcrel_from can't tell,
+ so we have to undo it's effects here. */
+ if (fixP->fx_pcrel)
+ {
+ if (fixP->fx_addsy != NULL
+ && S_IS_DEFINED (fixP->fx_addsy)
+ && S_GET_SEGMENT (fixP->fx_addsy) != seg)
+ value += md_pcrel_from (fixP);
+ }
+
+ /* Remember value for emit_reloc. */
+ fixP->fx_addnumber = value;
+
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_HI16_S:
+ if (fixP->fx_done)
+ { /* For la rd, imm32. */
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ HI = (value) >> 16; /* mul to 2, then take the hi 16 bit. */
+ newval |= (HI & 0x3fff) << 1;
+ newval |= ((HI >> 14) & 0x3) << 16;
+ md_number_to_chars (buf, newval, INSN_SIZE);
+ }
+ break;
+ case BFD_RELOC_LO16:
+ if (fixP->fx_done) /* For la rd, imm32. */
+ {
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ LO = (value) & 0xffff;
+ newval |= (LO & 0x3fff) << 1; /* 16 bit: imm -> 14 bit in lo, 2 bit in hi. */
+ newval |= ((LO >> 14) & 0x3) << 16;
+ md_number_to_chars (buf, newval, INSN_SIZE);
+ }
+ break;
+ case BFD_RELOC_SCORE_JMP:
+ {
+ content = md_chars_to_number (buf, INSN_SIZE);
+ value = fixP->fx_offset;
+ content = (content & ~0x3ff7ffe) | ((value << 1) & 0x3ff0000) | (value & 0x7fff);
+ md_number_to_chars (buf, content, INSN_SIZE);
+ }
+ break;
+ case BFD_RELOC_SCORE_BRANCH:
+ if ((S_GET_SEGMENT (fixP->fx_addsy) != seg) || (fixP->fx_addsy != NULL && S_IS_EXTERNAL (fixP->fx_addsy)))
+ value = fixP->fx_offset;
+ else
+ fixP->fx_done = 1;
+
+ content = md_chars_to_number (buf, INSN_SIZE);
+ if ((fixP->fx_frag->fr_opcode != 0) && ((content & 0x80008000) != 0x80008000))
+ {
+ if ((value & 0x80000000) == 0x80000000)
+ abs_value = 0xffffffff - value + 1;
+ if ((abs_value & 0xffffff00) != 0)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _(" branch relocation truncate (0x%x) [-2^8 ~ 2^8]"), (unsigned int)value);
+ return;
+ }
+ content = md_chars_to_number (buf, INSN16_SIZE);
+ content &= 0xff00;
+ content = (content & 0xff00) | ((value >> 1) & 0xff);
+ md_number_to_chars (buf, content, INSN16_SIZE);
+ fixP->fx_r_type = BFD_RELOC_SCORE16_BRANCH;
+ fixP->fx_size = 2;
+ }
+ else
+ {
+ if ((value & 0x80000000) == 0x80000000)
+ abs_value = 0xffffffff - value + 1;
+ if ((abs_value & 0xfff80000) != 0)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _(" branch relocation truncate (0x%x) [-2^19 ~ 2^19]"), (unsigned int)value);
+ return;
+ }
+ content = md_chars_to_number (buf, INSN_SIZE);
+ content &= 0xfc00fc01;
+ content = (content & 0xfc00fc01) | (value & 0x3fe) | ((value << 6) & 0x3ff0000);
+ md_number_to_chars (buf, content, INSN_SIZE);
+ }
+ break;
+ case BFD_RELOC_SCORE16_JMP:
+ content = md_chars_to_number (buf, INSN16_SIZE);
+ content &= 0xf001;
+ value = fixP->fx_offset & 0xfff;
+ content = (content & 0xfc01) | (value & 0xffe);
+ md_number_to_chars (buf, content, INSN16_SIZE);
+ break;
+ case BFD_RELOC_SCORE16_BRANCH:
+ content = md_chars_to_number (buf, INSN_SIZE);
+ if ((fixP->fx_frag->fr_opcode != 0) && ((content & 0x80008000) == 0x80008000))
+ {
+ if ((S_GET_SEGMENT (fixP->fx_addsy) != seg) ||
+ (fixP->fx_addsy != NULL && S_IS_EXTERNAL (fixP->fx_addsy)))
+ value = fixP->fx_offset;
+ else
+ fixP->fx_done = 1;
+ if ((value & 0x80000000) == 0x80000000)
+ abs_value = 0xffffffff - value + 1;
+ if ((abs_value & 0xfff80000) != 0)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _(" branch relocation truncate (0x%x) [-2^19 ~ 2^19]"), (unsigned int)value);
+ return;
+ }
+ content = md_chars_to_number (buf, INSN_SIZE);
+ content = (content & 0xfc00fc01) | (value & 0x3fe) | ((value << 6) & 0x3ff0000);
+ md_number_to_chars (buf, content, INSN_SIZE);
+ fixP->fx_r_type = BFD_RELOC_SCORE_BRANCH;
+ fixP->fx_size = 4;
+ break;
+ }
+ else
+ {
+ /* In differnt section. */
+ if ((S_GET_SEGMENT (fixP->fx_addsy) != seg) ||
+ (fixP->fx_addsy != NULL && S_IS_EXTERNAL (fixP->fx_addsy)))
+ value = fixP->fx_offset;
+ else
+ fixP->fx_done = 1;
+
+ if ((value & 0x80000000) == 0x80000000)
+ abs_value = 0xffffffff - value + 1;
+ if ((abs_value & 0xffffff00) != 0)
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _(" branch relocation truncate (0x%x) [-2^8 ~ 2^8]"), (unsigned int)value);
+ return;
+ }
+ content = md_chars_to_number (buf, INSN16_SIZE);
+ content = (content & 0xff00) | ((value >> 1) & 0xff);
+ md_number_to_chars (buf, content, INSN16_SIZE);
+ break;
+ }
+ case BFD_RELOC_8:
+ if (fixP->fx_done || fixP->fx_pcrel)
+ md_number_to_chars (buf, value, 1);
+#ifdef OBJ_ELF
+ else
+ {
+ value = fixP->fx_offset;
+ md_number_to_chars (buf, value, 1);
+ }
+#endif
+ break;
+
+ case BFD_RELOC_16:
+ if (fixP->fx_done || fixP->fx_pcrel)
+ md_number_to_chars (buf, value, 2);
+#ifdef OBJ_ELF
+ else
+ {
+ value = fixP->fx_offset;
+ md_number_to_chars (buf, value, 2);
+ }
+#endif
+ break;
+ case BFD_RELOC_RVA:
+ case BFD_RELOC_32:
+ if (fixP->fx_done || fixP->fx_pcrel)
+ md_number_to_chars (buf, value, 4);
+#ifdef OBJ_ELF
+ else
+ {
+ value = fixP->fx_offset;
+ md_number_to_chars (buf, value, 4);
+ }
+#endif
+ break;
+ case BFD_RELOC_VTABLE_INHERIT:
+ fixP->fx_done = 0;
+ if (fixP->fx_addsy && !S_IS_DEFINED (fixP->fx_addsy) && !S_IS_WEAK (fixP->fx_addsy))
+ S_SET_WEAK (fixP->fx_addsy);
+ break;
+ case BFD_RELOC_VTABLE_ENTRY:
+ fixP->fx_done = 0;
+ break;
+ case BFD_RELOC_SCORE_GPREL15:
+ content = md_chars_to_number (buf, INSN_SIZE);
+ if ((fixP->fx_frag->fr_opcode != 0) && ((content & 0xfc1c8000) != 0x94188000))
+ fixP->fx_r_type = BFD_RELOC_NONE;
+ fixP->fx_done = 0;
+ break;
+ case BFD_RELOC_SCORE_GOT15:
+ case BFD_RELOC_SCORE_DUMMY_HI16:
+ case BFD_RELOC_SCORE_GOT_LO16:
+ case BFD_RELOC_SCORE_CALL15:
+ case BFD_RELOC_GPREL32:
+ break;
+ case BFD_RELOC_NONE:
+ default:
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("bad relocation fixup type (%d)"), fixP->fx_r_type);
+ }
+}
+
+/* Translate internal representation of relocation info to BFD target format. */
+arelent **
+tc_gen_reloc (asection * section ATTRIBUTE_UNUSED, fixS * fixp)
+{
+ static arelent *retval[MAX_RELOC_EXPANSION + 1]; /* MAX_RELOC_EXPANSION equals 2. */
+ arelent *reloc;
+ bfd_reloc_code_real_type code;
+ char *type;
+ fragS *f;
+ symbolS *s;
+ expressionS e;
+
+ reloc = retval[0] = xmalloc (sizeof (arelent));
+ retval[1] = NULL;
+
+ reloc->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+ reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
+ reloc->addend = fixp->fx_offset;
+
+ /* If this is a variant frag, we may need to adjust the existing
+ reloc and generate a new one. */
+ if (fixp->fx_frag->fr_opcode != NULL && (fixp->fx_r_type == BFD_RELOC_SCORE_GPREL15))
+ {
+ /* Update instruction imm bit. */
+ offsetT newval;
+ unsigned short off;
+ char *buf;
+
+ buf = fixp->fx_frag->fr_literal + fixp->fx_frag->insn_addr;
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ off = fixp->fx_offset >> 16;
+ newval |= (off & 0x3fff) << 1;
+ newval |= ((off >> 14) & 0x3) << 16;
+ md_number_to_chars (buf, newval, INSN_SIZE);
+
+ buf += INSN_SIZE;
+ newval = md_chars_to_number (buf, INSN_SIZE);
+ off = fixp->fx_offset & 0xffff;
+ newval |= ((off & 0x3fff) << 1);
+ newval |= (((off >> 14) & 0x3) << 16);
+ md_number_to_chars (buf, newval, INSN_SIZE);
+
+ retval[1] = xmalloc (sizeof (arelent));
+ retval[2] = NULL;
+ retval[1]->sym_ptr_ptr = xmalloc (sizeof (asymbol *));
+ *retval[1]->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+ retval[1]->address = (reloc->address + RELAX_RELOC2 (fixp->fx_frag->fr_subtype));
+
+ f = fixp->fx_frag;
+ s = f->fr_symbol;
+ e = s->sy_value;
+
+ retval[1]->addend = 0;
+ retval[1]->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO16);
+ assert (retval[1]->howto != NULL);
+
+ fixp->fx_r_type = BFD_RELOC_HI16_S;
+ }
+
+ code = fixp->fx_r_type;
+ switch (fixp->fx_r_type)
+ {
+ case BFD_RELOC_32:
+ if (fixp->fx_pcrel)
+ {
+ code = BFD_RELOC_32_PCREL;
+ break;
+ }
+ case BFD_RELOC_HI16_S:
+ case BFD_RELOC_LO16:
+ case BFD_RELOC_SCORE_JMP:
+ case BFD_RELOC_SCORE_BRANCH:
+ case BFD_RELOC_SCORE16_JMP:
+ case BFD_RELOC_SCORE16_BRANCH:
+ case BFD_RELOC_VTABLE_ENTRY:
+ case BFD_RELOC_VTABLE_INHERIT:
+ case BFD_RELOC_SCORE_GPREL15:
+ case BFD_RELOC_SCORE_GOT15:
+ case BFD_RELOC_SCORE_DUMMY_HI16:
+ case BFD_RELOC_SCORE_GOT_LO16:
+ case BFD_RELOC_SCORE_CALL15:
+ case BFD_RELOC_GPREL32:
+ case BFD_RELOC_NONE:
+ code = fixp->fx_r_type;
+ break;
+ default:
+ type = _("<unknown>");
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("cannot represent %s relocation in this object file format"), type);
+ return NULL;
+ }
+
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, code);
+ if (reloc->howto == NULL)
+ {
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("cannot represent %s relocation in this object file format1"),
+ bfd_get_reloc_code_name (code));
+ return NULL;
+ }
+ /* HACK: Since arm ELF uses Rel instead of Rela, encode the
+ vtable entry to be used in the relocation's section offset. */
+ if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
+ reloc->address = fixp->fx_offset;
+
+ return retval;
+}
+
+void
+score_elf_final_processing (void)
+{
+ if (fix_data_dependency == 1)
+ {
+ elf_elfheader (stdoutput)->e_flags |= EF_SCORE_FIXDEP;
+ }
+ if (score_pic == PIC)
+ {
+ elf_elfheader (stdoutput)->e_flags |= EF_SCORE_PIC;
+ }
+}
+
+static void
+parse_pce_inst (char *insnstr)
+{
+ char c;
+ char *p;
+ char first[MAX_LITERAL_POOL_SIZE];
+ char second[MAX_LITERAL_POOL_SIZE];
+ struct score_it pec_part_1;
+
+ /* Get first part string of PCE. */
+ p = strstr (insnstr, "||");
+ c = *p;
+ *p = '\0';
+ sprintf (first, "%s", insnstr);
+
+ /* Get second part string of PCE. */
+ *p = c;
+ p += 2;
+ sprintf (second, "%s", p);
+
+ parse_16_32_inst (first, FALSE);
+ if (inst.error)
+ return;
+
+ memcpy (&pec_part_1, &inst, sizeof (inst));
+
+ parse_16_32_inst (second, FALSE);
+ if (inst.error)
+ return;
+
+ if ( ((pec_part_1.size == INSN_SIZE) && (inst.size == INSN_SIZE))
+ || ((pec_part_1.size == INSN_SIZE) && (inst.size == INSN16_SIZE))
+ || ((pec_part_1.size == INSN16_SIZE) && (inst.size == INSN_SIZE)))
+ {
+ inst.error = _("pce instruction error (16 bit || 16 bit)'");
+ sprintf (inst.str, insnstr);
+ return;
+ }
+
+ if (!inst.error)
+ gen_insn_frag (&pec_part_1, &inst);
+}
+
+void
+md_assemble (char *str)
+{
+ know (str);
+ know (strlen (str) < MAX_LITERAL_POOL_SIZE);
+
+ memset (&inst, '\0', sizeof (inst));
+ if (INSN_IS_PCE_P (str))
+ parse_pce_inst (str);
+ else
+ parse_16_32_inst (str, TRUE);
+
+ if (inst.error)
+ as_bad (_("%s -- `%s'"), inst.error, inst.str);
+}
+
+/* We handle all bad expressions here, so that we can report the faulty
+ instruction in the error message. */
+void
+md_operand (expressionS * expr)
+{
+ if (in_my_get_expression)
+ {
+ expr->X_op = O_illegal;
+ if (inst.error == NULL)
+ {
+ inst.error = _("bad expression");
+ }
+ }
+}
+
+const char *md_shortopts = "nO::g::G:";
+
+#ifdef SCORE_BI_ENDIAN
+#define OPTION_EB (OPTION_MD_BASE + 0)
+#define OPTION_EL (OPTION_MD_BASE + 1)
+#else
+#if TARGET_BYTES_BIG_ENDIAN
+#define OPTION_EB (OPTION_MD_BASE + 0)
+#else
+#define OPTION_EL (OPTION_MD_BASE + 1)
+#endif
+#endif
+#define OPTION_FIXDD (OPTION_MD_BASE + 2)
+#define OPTION_NWARN (OPTION_MD_BASE + 3)
+#define OPTION_SCORE5 (OPTION_MD_BASE + 4)
+#define OPTION_SCORE5U (OPTION_MD_BASE + 5)
+#define OPTION_SCORE7 (OPTION_MD_BASE + 6)
+#define OPTION_R1 (OPTION_MD_BASE + 7)
+#define OPTION_O0 (OPTION_MD_BASE + 8)
+#define OPTION_SCORE_VERSION (OPTION_MD_BASE + 9)
+#define OPTION_PIC (OPTION_MD_BASE + 10)
+
+struct option md_longopts[] =
+{
+#ifdef OPTION_EB
+ {"EB" , no_argument, NULL, OPTION_EB},
+#endif
+#ifdef OPTION_EL
+ {"EL" , no_argument, NULL, OPTION_EL},
+#endif
+ {"FIXDD" , no_argument, NULL, OPTION_FIXDD},
+ {"NWARN" , no_argument, NULL, OPTION_NWARN},
+ {"SCORE5" , no_argument, NULL, OPTION_SCORE5},
+ {"SCORE5U", no_argument, NULL, OPTION_SCORE5U},
+ {"SCORE7" , no_argument, NULL, OPTION_SCORE7},
+ {"USE_R1" , no_argument, NULL, OPTION_R1},
+ {"O0" , no_argument, NULL, OPTION_O0},
+ {"V" , no_argument, NULL, OPTION_SCORE_VERSION},
+ {"KPIC" , no_argument, NULL, OPTION_PIC},
+ {NULL , no_argument, NULL, 0}
+};
+
+size_t md_longopts_size = sizeof (md_longopts);
+
+int
+md_parse_option (int c, char *arg)
+{
+ switch (c)
+ {
+#ifdef OPTION_EB
+ case OPTION_EB:
+ target_big_endian = 1;
+ break;
+#endif
+#ifdef OPTION_EL
+ case OPTION_EL:
+ target_big_endian = 0;
+ break;
+#endif
+ case OPTION_FIXDD:
+ fix_data_dependency = 1;
+ break;
+ case OPTION_NWARN:
+ warn_fix_data_dependency = 0;
+ break;
+ case OPTION_SCORE5:
+ score7 = 0;
+ university_version = 0;
+ vector_size = SCORE5_PIPELINE;
+ break;
+ case OPTION_SCORE5U:
+ score7 = 0;
+ university_version = 1;
+ vector_size = SCORE5_PIPELINE;
+ break;
+ case OPTION_SCORE7:
+ score7 = 1;
+ university_version = 0;
+ vector_size = SCORE7_PIPELINE;
+ break;
+ case OPTION_R1:
+ nor1 = 0;
+ break;
+ case 'G':
+ g_switch_value = atoi (arg);
+ break;
+ case OPTION_O0:
+ g_opt = 0;
+ break;
+ case OPTION_SCORE_VERSION:
+ printf (_("Sunplus-v2-0-0-20060510\n"));
+ break;
+ case OPTION_PIC:
+ score_pic = PIC;
+ g_switch_value = 0; /* Must set -G num as 0 to generate PIC code. */
+ break;
+ default:
+ /* as_bad (_("unrecognized option `-%c%s'"), c, arg ? arg : ""); */
+ return 0;
+ }
+ return 1;
+}
+
+void
+md_show_usage (FILE * fp)
+{
+ fprintf (fp, _(" Score-specific assembler options:\n"));
+#ifdef OPTION_EB
+ fprintf (fp, _("\
+ -EB\t\tassemble code for a big-endian cpu\n"));
+#endif
+
+#ifdef OPTION_EL
+ fprintf (fp, _("\
+ -EL\t\tassemble code for a little-endian cpu\n"));
+#endif
+
+ fprintf (fp, _("\
+ -FIXDD\t\tassemble code for fix data dependency\n"));
+ fprintf (fp, _("\
+ -NWARN\t\tassemble code for no warning message for fix data dependency\n"));
+ fprintf (fp, _("\
+ -SCORE5\t\tassemble code for target is SCORE5\n"));
+ fprintf (fp, _("\
+ -SCORE5U\tassemble code for target is SCORE5U\n"));
+ fprintf (fp, _("\
+ -SCORE7\t\tassemble code for target is SCORE7, this is default setting\n"));
+ fprintf (fp, _("\
+ -USE_R1\t\tassemble code for no warning message when using temp register r1\n"));
+ fprintf (fp, _("\
+ -KPIC\t\tassemble code for PIC\n"));
+ fprintf (fp, _("\
+ -O0\t\tassembler will not perform any optimizations\n"));
+ fprintf (fp, _("\
+ -G gpnum\tassemble code for setting gpsize and default is 8 byte\n"));
+ fprintf (fp, _("\
+ -V \t\tSunplus release version \n"));
+}
+
+
+/* Pesudo handling functions. */
+
+/* If we change section we must dump the literal pool first. */
+static void
+s_score_bss (int ignore ATTRIBUTE_UNUSED)
+{
+ subseg_set (bss_section, (subsegT) get_absolute_expression ());
+ demand_empty_rest_of_line ();
+}
+
+static void
+s_score_text (int ignore)
+{
+ obj_elf_text (ignore);
+ record_alignment (now_seg, 2);
+}
+
+static void
+score_s_section (int ignore)
+{
+ obj_elf_section (ignore);
+ if ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
+ record_alignment (now_seg, 2);
+
+}
+
+static void
+s_change_sec (int sec)
+{
+ segT seg;
+
+#ifdef OBJ_ELF
+ /* The ELF backend needs to know that we are changing sections, so
+ that .previous works correctly. We could do something like check
+ for an obj_section_change_hook macro, but that might be confusing
+ as it would not be appropriate to use it in the section changing
+ functions in read.c, since obj-elf.c intercepts those. FIXME:
+ This should be cleaner, somehow. */
+ obj_elf_section_change_hook ();
+#endif
+ switch (sec)
+ {
+ case 'r':
+ seg = subseg_new (RDATA_SECTION_NAME, (subsegT) get_absolute_expression ());
+ bfd_set_section_flags (stdoutput, seg, (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_RELOC | SEC_DATA));
+ if (strcmp (TARGET_OS, "elf") != 0)
+ record_alignment (seg, 4);
+ demand_empty_rest_of_line ();
+ break;
+ case 's':
+ seg = subseg_new (".sdata", (subsegT) get_absolute_expression ());
+ bfd_set_section_flags (stdoutput, seg, SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA);
+ if (strcmp (TARGET_OS, "elf") != 0)
+ record_alignment (seg, 4);
+ demand_empty_rest_of_line ();
+ break;
+ }
+}
+
+static void
+s_score_mask (int reg_type ATTRIBUTE_UNUSED)
+{
+ long mask, off;
+
+ if (cur_proc_ptr == (procS *) NULL)
+ {
+ as_warn (_(".mask outside of .ent"));
+ demand_empty_rest_of_line ();
+ return;
+ }
+ if (get_absolute_expression_and_terminator (&mask) != ',')
+ {
+ as_warn (_("Bad .mask directive"));
+ --input_line_pointer;
+ demand_empty_rest_of_line ();
+ return;
+ }
+ off = get_absolute_expression ();
+ cur_proc_ptr->reg_mask = mask;
+ cur_proc_ptr->reg_offset = off;
+ demand_empty_rest_of_line ();
+}
+
+static symbolS *
+get_symbol (void)
+{
+ int c;
+ char *name;
+ symbolS *p;
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ p = (symbolS *) symbol_find_or_make (name);
+ *input_line_pointer = c;
+ return p;
+}
+
+static long
+get_number (void)
+{
+ int negative = 0;
+ long val = 0;
+
+ if (*input_line_pointer == '-')
+ {
+ ++input_line_pointer;
+ negative = 1;
+ }
+ if (!ISDIGIT (*input_line_pointer))
+ as_bad (_("expected simple number"));
+ if (input_line_pointer[0] == '0')
+ {
+ if (input_line_pointer[1] == 'x')
+ {
+ input_line_pointer += 2;
+ while (ISXDIGIT (*input_line_pointer))
+ {
+ val <<= 4;
+ val |= hex_value (*input_line_pointer++);
+ }
+ return negative ? -val : val;
+ }
+ else
+ {
+ ++input_line_pointer;
+ while (ISDIGIT (*input_line_pointer))
+ {
+ val <<= 3;
+ val |= *input_line_pointer++ - '0';
+ }
+ return negative ? -val : val;
+ }
+ }
+ if (!ISDIGIT (*input_line_pointer))
+ {
+ printf (_(" *input_line_pointer == '%c' 0x%02x\n"), *input_line_pointer, *input_line_pointer);
+ as_warn (_("invalid number"));
+ return -1;
+ }
+ while (ISDIGIT (*input_line_pointer))
+ {
+ val *= 10;
+ val += *input_line_pointer++ - '0';
+ }
+ return negative ? -val : val;
+}
+
+/* The .aent and .ent directives. */
+
+static void
+s_score_ent (int aent)
+{
+ symbolS *symbolP;
+ int maybe_text;
+
+ symbolP = get_symbol ();
+ if (*input_line_pointer == ',')
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ if (ISDIGIT (*input_line_pointer) || *input_line_pointer == '-')
+ get_number ();
+
+#ifdef BFD_ASSEMBLER
+ if ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
+ maybe_text = 1;
+ else
+ maybe_text = 0;
+#else
+ if (now_seg != data_section && now_seg != bss_section)
+ maybe_text = 1;
+ else
+ maybe_text = 0;
+#endif
+ if (!maybe_text)
+ as_warn (_(".ent or .aent not in text section."));
+ if (!aent && cur_proc_ptr)
+ as_warn (_("missing .end"));
+ if (!aent)
+ {
+ cur_proc_ptr = &cur_proc;
+ cur_proc_ptr->reg_mask = 0xdeadbeaf;
+ cur_proc_ptr->reg_offset = 0xdeadbeaf;
+ cur_proc_ptr->fpreg_mask = 0xdeafbeaf;
+ cur_proc_ptr->leaf = 0xdeafbeaf;
+ cur_proc_ptr->frame_offset = 0xdeafbeaf;
+ cur_proc_ptr->frame_reg = 0xdeafbeaf;
+ cur_proc_ptr->pc_reg = 0xdeafbeaf;
+ cur_proc_ptr->isym = symbolP;
+ symbol_get_bfdsym (symbolP)->flags |= BSF_FUNCTION;
+ ++numprocs;
+ if (debug_type == DEBUG_STABS)
+ stabs_generate_asm_func (S_GET_NAME (symbolP), S_GET_NAME (symbolP));
+ }
+ demand_empty_rest_of_line ();
+}
+
+static void
+s_score_frame (int ignore ATTRIBUTE_UNUSED)
+{
+ char *backupstr;
+ char str[30];
+ long val;
+ int i = 0;
+
+ backupstr = input_line_pointer;
+
+#ifdef OBJ_ELF
+ if (cur_proc_ptr == (procS *) NULL)
+ {
+ as_warn (_(".frame outside of .ent"));
+ demand_empty_rest_of_line ();
+ return;
+ }
+ cur_proc_ptr->frame_reg = reg_required_here ((&backupstr), 0, REG_TYPE_SCORE);
+ SKIP_WHITESPACE ();
+ skip_past_comma (&backupstr);
+ while (*backupstr != ',')
+ {
+ str[i] = *backupstr;
+ i++;
+ backupstr++;
+ }
+ str[i] = '\0';
+ val = atoi (str);
+
+ SKIP_WHITESPACE ();
+ skip_past_comma (&backupstr);
+ cur_proc_ptr->frame_offset = val;
+ cur_proc_ptr->pc_reg = reg_required_here ((&backupstr), 0, REG_TYPE_SCORE);
+
+ SKIP_WHITESPACE ();
+ skip_past_comma (&backupstr);
+ i = 0;
+ while (*backupstr != '\n')
+ {
+ str[i] = *backupstr;
+ i++;
+ backupstr++;
+ }
+ str[i] = '\0';
+ val = atoi (str);
+ cur_proc_ptr->leaf = val;
+ SKIP_WHITESPACE ();
+ skip_past_comma (&backupstr);
+
+#endif /* OBJ_ELF */
+ while (input_line_pointer != backupstr)
+ input_line_pointer++;
+}
+
+/* The .end directive. */
+static void
+s_score_end (int x ATTRIBUTE_UNUSED)
+{
+ symbolS *p;
+ int maybe_text;
+
+ /* Generate a .pdr section. */
+ segT saved_seg = now_seg;
+ subsegT saved_subseg = now_subseg;
+ valueT dot;
+ expressionS exp;
+ char *fragp;
+
+ if (!is_end_of_line[(unsigned char)*input_line_pointer])
+ {
+ p = get_symbol ();
+ demand_empty_rest_of_line ();
+ }
+ else
+ p = NULL;
+
+#ifdef BFD_ASSEMBLER
+ if ((bfd_get_section_flags (stdoutput, now_seg) & SEC_CODE) != 0)
+ maybe_text = 1;
+ else
+ maybe_text = 0;
+#else
+ if (now_seg != data_section && now_seg != bss_section)
+ maybe_text = 1;
+ else
+ maybe_text = 0;
+#endif
+
+ if (!maybe_text)
+ as_warn (_(".end not in text section"));
+ if (!cur_proc_ptr)
+ {
+ as_warn (_(".end directive without a preceding .ent directive."));
+ demand_empty_rest_of_line ();
+ return;
+ }
+ if (p != NULL)
+ {
+ assert (S_GET_NAME (p));
+ if (strcmp (S_GET_NAME (p), S_GET_NAME (cur_proc_ptr->isym)))
+ as_warn (_(".end symbol does not match .ent symbol."));
+ if (debug_type == DEBUG_STABS)
+ stabs_generate_asm_endfunc (S_GET_NAME (p), S_GET_NAME (p));
+ }
+ else
+ as_warn (_(".end directive missing or unknown symbol"));
+
+ if ((cur_proc_ptr->reg_mask == 0xdeadbeaf) ||
+ (cur_proc_ptr->reg_offset == 0xdeadbeaf) ||
+ (cur_proc_ptr->leaf == 0xdeafbeaf) ||
+ (cur_proc_ptr->frame_offset == 0xdeafbeaf) ||
+ (cur_proc_ptr->frame_reg == 0xdeafbeaf) || (cur_proc_ptr->pc_reg == 0xdeafbeaf));
+
+ else
+ {
+ dot = frag_now_fix ();
+ assert (pdr_seg);
+ subseg_set (pdr_seg, 0);
+ /* Write the symbol. */
+ exp.X_op = O_symbol;
+ exp.X_add_symbol = p;
+ exp.X_add_number = 0;
+ emit_expr (&exp, 4);
+ fragp = frag_more (7 * 4);
+ md_number_to_chars (fragp, (valueT) cur_proc_ptr->reg_mask, 4);
+ md_number_to_chars (fragp + 4, (valueT) cur_proc_ptr->reg_offset, 4);
+ md_number_to_chars (fragp + 8, (valueT) cur_proc_ptr->fpreg_mask, 4);
+ md_number_to_chars (fragp + 12, (valueT) cur_proc_ptr->leaf, 4);
+ md_number_to_chars (fragp + 16, (valueT) cur_proc_ptr->frame_offset, 4);
+ md_number_to_chars (fragp + 20, (valueT) cur_proc_ptr->frame_reg, 4);
+ md_number_to_chars (fragp + 24, (valueT) cur_proc_ptr->pc_reg, 4);
+ subseg_set (saved_seg, saved_subseg);
+
+ }
+ cur_proc_ptr = NULL;
+}
+
+/* Handle the .set pseudo-op. */
+static void
+s_score_set (int x ATTRIBUTE_UNUSED)
+{
+ int i = 0;
+ char name[MAX_LITERAL_POOL_SIZE];
+ char * orig_ilp = input_line_pointer;
+
+ while (!is_end_of_line[(unsigned char)*input_line_pointer])
+ {
+ name[i] = (char) * input_line_pointer;
+ i++;
+ ++input_line_pointer;
+ }
+
+ name[i] = '\0';
+
+ if (strcmp (name, "nwarn") == 0)
+ {
+ warn_fix_data_dependency = 0;
+ }
+ else if (strcmp (name, "fixdd") == 0)
+ {
+ fix_data_dependency = 1;
+ }
+ else if (strcmp (name, "nofixdd") == 0)
+ {
+ fix_data_dependency = 0;
+ }
+ else if (strcmp (name, "r1") == 0)
+ {
+ nor1 = 0;
+ }
+ else if (strcmp (name, "nor1") == 0)
+ {
+ nor1 = 1;
+ }
+ else if (strcmp (name, "optimize") == 0)
+ {
+ g_opt = 1;
+ }
+ else if (strcmp (name, "volatile") == 0)
+ {
+ g_opt = 0;
+ }
+ else if (strcmp (name, "pic") == 0)
+ {
+ score_pic = PIC;
+ }
+ else
+ {
+ input_line_pointer = orig_ilp;
+ s_set (0);
+ }
+}
+
+/* Handle the .cpload pseudo-op. This is used when generating PIC code. It sets the
+ $gp register for the function based on the function address, which is in the register
+ named in the argument. This uses a relocation against GP_DISP_LABEL, which is handled
+ specially by the linker. The result is:
+ ldis gp, %hi(GP_DISP_LABEL)
+ ori gp, %low(GP_DISP_LABEL)
+ add gp, gp, .cpload argument
+ The .cpload argument is normally r29. */
+
+static void
+s_score_cpload (int ignore ATTRIBUTE_UNUSED)
+{
+ int reg;
+ char insn_str[MAX_LITERAL_POOL_SIZE];
+
+ /* If we are not generating PIC code, .cpload is ignored. */
+ if (score_pic == NO_PIC)
+ {
+ s_ignore (0);
+ return;
+ }
+
+ if ((reg = reg_required_here (&input_line_pointer, -1, REG_TYPE_SCORE)) == (int) FAIL)
+ return;
+
+ demand_empty_rest_of_line ();
+
+ sprintf (insn_str, "ld_i32hi r%d, %s", GP, GP_DISP_LABEL);
+ if (append_insn (insn_str, TRUE) == (int) FAIL)
+ return;
+
+ sprintf (insn_str, "ld_i32lo r%d, %s", GP, GP_DISP_LABEL);
+ if (append_insn (insn_str, TRUE) == (int) FAIL)
+ return;
+
+ sprintf (insn_str, "add r%d, r%d, r%d", GP, GP, reg);
+ if (append_insn (insn_str, TRUE) == (int) FAIL)
+ return;
+}
+
+/* Handle the .cprestore pseudo-op. This stores $gp into a given
+ offset from $sp. The offset is remembered, and after making a PIC
+ call $gp is restored from that location. */
+
+static void
+s_score_cprestore (int ignore ATTRIBUTE_UNUSED)
+{
+ int reg;
+ int cprestore_offset;
+ char insn_str[MAX_LITERAL_POOL_SIZE];
+
+ /* If we are not generating PIC code, .cprestore is ignored. */
+ if (score_pic == NO_PIC)
+ {
+ s_ignore (0);
+ return;
+ }
+
+ if ((reg = reg_required_here (&input_line_pointer, -1, REG_TYPE_SCORE)) == (int) FAIL
+ || skip_past_comma (&input_line_pointer) == (int) FAIL)
+ {
+ return;
+ }
+
+ cprestore_offset = get_absolute_expression ();
+
+ if (cprestore_offset <= 0x3fff)
+ {
+ sprintf (insn_str, "sw r%d, [r%d, %d]", GP, reg, cprestore_offset);
+ if (append_insn (insn_str, TRUE) == (int) FAIL)
+ return;
+ }
+ else
+ {
+ int r1_bak;
+
+ r1_bak = nor1;
+ nor1 = 0;
+
+ sprintf (insn_str, "li r1, %d", cprestore_offset);
+ if (append_insn (insn_str, TRUE) == (int) FAIL)
+ return;
+
+ sprintf (insn_str, "add r1, r1, r%d", reg);
+ if (append_insn (insn_str, TRUE) == (int) FAIL)
+ return;
+
+ sprintf (insn_str, "sw r%d, [r1]", GP);
+ if (append_insn (insn_str, TRUE) == (int) FAIL)
+ return;
+
+ nor1 = r1_bak;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+/* Handle the .gpword pseudo-op. This is used when generating PIC
+ code. It generates a 32 bit GP relative reloc. */
+static void
+s_score_gpword (int ignore ATTRIBUTE_UNUSED)
+{
+ expressionS ex;
+ char *p;
+
+ /* When not generating PIC code, this is treated as .word. */
+ if (score_pic == NO_PIC)
+ {
+ cons (4);
+ return;
+ }
+ expression (&ex);
+ if (ex.X_op != O_symbol || ex.X_add_number != 0)
+ {
+ as_bad (_("Unsupported use of .gpword"));
+ ignore_rest_of_line ();
+ }
+ p = frag_more (4);
+ md_number_to_chars (p, (valueT) 0, 4);
+ fix_new_exp (frag_now, p - frag_now->fr_literal, 4, &ex, FALSE, BFD_RELOC_GPREL32);
+ demand_empty_rest_of_line ();
+}
+
+/* Handle the .cpadd pseudo-op. This is used when dealing with switch
+ tables in PIC code. */
+
+static void
+s_score_cpadd (int ignore ATTRIBUTE_UNUSED)
+{
+ int reg;
+ char insn_str[MAX_LITERAL_POOL_SIZE];
+
+ /* If we are not generating PIC code, .cpload is ignored. */
+ if (score_pic == NO_PIC)
+ {
+ s_ignore (0);
+ return;
+ }
+
+ if ((reg = reg_required_here (&input_line_pointer, -1, REG_TYPE_SCORE)) == (int) FAIL)
+ {
+ return;
+ }
+ demand_empty_rest_of_line ();
+
+ /* Add $gp to the register named as an argument. */
+ sprintf (insn_str, "add r%d, r%d, r%d", reg, reg, GP);
+ if (append_insn (insn_str, TRUE) == (int) FAIL)
+ return;
+}
+
+#ifndef TC_IMPLICIT_LCOMM_ALIGNMENT
+#define TC_IMPLICIT_LCOMM_ALIGNMENT(SIZE, P2VAR) \
+ do \
+ { \
+ if ((SIZE) >= 8) \
+ (P2VAR) = 3; \
+ else if ((SIZE) >= 4) \
+ (P2VAR) = 2; \
+ else if ((SIZE) >= 2) \
+ (P2VAR) = 1; \
+ else \
+ (P2VAR) = 0; \
+ } \
+ while (0)
+#endif
+
+static void
+s_score_lcomm (int bytes_p)
+{
+ char *name;
+ char c;
+ char *p;
+ int temp;
+ symbolS *symbolP;
+ segT current_seg = now_seg;
+ subsegT current_subseg = now_subseg;
+ const int max_alignment = 15;
+ int align = 0;
+ segT bss_seg = bss_section;
+ int needs_align = 0;
+
+ name = input_line_pointer;
+ 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
+ required, but Irix 5 cc does not generate it. */
+ if (*input_line_pointer == ',')
+ {
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ }
+
+ if (is_end_of_line[(unsigned char)*input_line_pointer])
+ {
+ as_bad (_("missing size expression"));
+ return;
+ }
+
+ if ((temp = get_absolute_expression ()) < 0)
+ {
+ as_warn (_("BSS length (%d) < 0 ignored"), temp);
+ ignore_rest_of_line ();
+ return;
+ }
+
+#if defined (TC_SCORE)
+ if (OUTPUT_FLAVOR == bfd_target_ecoff_flavour || OUTPUT_FLAVOR == bfd_target_elf_flavour)
+ {
+ /* For Score and Alpha ECOFF or ELF, small objects are put in .sbss. */
+ if ((unsigned)temp <= bfd_get_gp_size (stdoutput))
+ {
+ bss_seg = subseg_new (".sbss", 1);
+ seg_info (bss_seg)->bss = 1;
+#ifdef BFD_ASSEMBLER
+ if (!bfd_set_section_flags (stdoutput, bss_seg, SEC_ALLOC))
+ as_warn (_("error setting flags for \".sbss\": %s"), bfd_errmsg (bfd_get_error ()));
+#endif
+ }
+ }
+#endif
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == ',')
+ {
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+
+ if (is_end_of_line[(unsigned char)*input_line_pointer])
+ {
+ as_bad (_("missing alignment"));
+ return;
+ }
+ else
+ {
+ align = get_absolute_expression ();
+ needs_align = 1;
+ }
+ }
+
+ if (!needs_align)
+ {
+ TC_IMPLICIT_LCOMM_ALIGNMENT (temp, align);
+
+ /* Still zero unless TC_IMPLICIT_LCOMM_ALIGNMENT set it. */
+ if (align)
+ record_alignment (bss_seg, align);
+ }
+
+ if (needs_align)
+ {
+ if (bytes_p)
+ {
+ /* Convert to a power of 2. */
+ if (align != 0)
+ {
+ unsigned int i;
+
+ for (i = 0; align != 0; align >>= 1, ++i)
+ ;
+ align = i - 1;
+ }
+ }
+
+ if (align > max_alignment)
+ {
+ align = max_alignment;
+ as_warn (_("alignment too large; %d assumed"), align);
+ }
+ else if (align < 0)
+ {
+ align = 0;
+ as_warn (_("alignment negative; 0 assumed"));
+ }
+
+ record_alignment (bss_seg, align);
+ }
+ else
+ {
+ /* Assume some objects may require alignment on some systems. */
+#if defined (TC_ALPHA) && ! defined (VMS)
+ if (temp > 1)
+ {
+ align = ffs (temp) - 1;
+ if (temp % (1 << align))
+ abort ();
+ }
+#endif
+ }
+
+ *p = 0;
+ symbolP = symbol_find_or_make (name);
+ *p = c;
+
+ if (
+#if (defined (OBJ_AOUT) || defined (OBJ_MAYBE_AOUT) \
+ || defined (OBJ_BOUT) || defined (OBJ_MAYBE_BOUT))
+#ifdef BFD_ASSEMBLER
+ (OUTPUT_FLAVOR != bfd_target_aout_flavour
+ || (S_GET_OTHER (symbolP) == 0 && S_GET_DESC (symbolP) == 0)) &&
+#else
+ (S_GET_OTHER (symbolP) == 0 && S_GET_DESC (symbolP) == 0) &&
+#endif
+#endif
+ (S_GET_SEGMENT (symbolP) == bss_seg || (!S_IS_DEFINED (symbolP) && S_GET_VALUE (symbolP) == 0)))
+ {
+ char *pfrag;
+
+ subseg_set (bss_seg, 1);
+
+ if (align)
+ frag_align (align, 0, 0);
+
+ /* Detach from old frag. */
+ if (S_GET_SEGMENT (symbolP) == bss_seg)
+ symbol_get_frag (symbolP)->fr_symbol = NULL;
+
+ symbol_set_frag (symbolP, frag_now);
+ pfrag = frag_var (rs_org, 1, 1, (relax_substateT) 0, symbolP, (offsetT) temp, NULL);
+ *pfrag = 0;
+
+
+ S_SET_SEGMENT (symbolP, bss_seg);
+
+#ifdef OBJ_COFF
+ /* The symbol may already have been created with a preceding
+ ".globl" directive -- be careful not to step on storage class
+ in that case. Otherwise, set it to static. */
+ if (S_GET_STORAGE_CLASS (symbolP) != C_EXT)
+ {
+ S_SET_STORAGE_CLASS (symbolP, C_STAT);
+ }
+#endif /* OBJ_COFF */
+
+#ifdef S_SET_SIZE
+ S_SET_SIZE (symbolP, temp);
+#endif
+ }
+ else
+ as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP));
+
+ subseg_set (current_seg, current_subseg);
+
+ demand_empty_rest_of_line ();
+}
+
+static void
+insert_reg (const struct reg_entry *r, struct hash_control *htab)
+{
+ int i = 0;
+ int len = strlen (r->name) + 2;
+ char *buf = xmalloc (len);
+ char *buf2 = xmalloc (len);
+
+ strcpy (buf + i, r->name);
+ for (i = 0; buf[i]; i++)
+ {
+ buf2[i] = TOUPPER (buf[i]);
+ }
+ buf2[i] = '\0';
+
+ hash_insert (htab, buf, (void *) r);
+ hash_insert (htab, buf2, (void *) r);
+}
+
+static void
+build_reg_hsh (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);
+ }
+}
+
+void
+md_begin (void)
+{
+ unsigned int i;
+ segT seg;
+ subsegT subseg;
+
+ if ((score_ops_hsh = hash_new ()) == NULL)
+ as_fatal (_("virtual memory exhausted"));
+
+ build_score_ops_hsh ();
+
+ if ((dependency_insn_hsh = hash_new ()) == NULL)
+ as_fatal (_("virtual memory exhausted"));
+
+ build_dependency_insn_hsh ();
+
+ for (i = (int)REG_TYPE_FIRST; i < (int)REG_TYPE_MAX; i++)
+ build_reg_hsh (all_reg_maps + i);
+
+ /* Initialize dependency vector. */
+ init_dependency_vector ();
+
+ bfd_set_arch_mach (stdoutput, TARGET_ARCH, 0);
+ seg = now_seg;
+ subseg = now_subseg;
+ pdr_seg = subseg_new (".pdr", (subsegT) 0);
+ (void)bfd_set_section_flags (stdoutput, pdr_seg, SEC_READONLY | SEC_RELOC | SEC_DEBUGGING);
+ (void)bfd_set_section_alignment (stdoutput, pdr_seg, 2);
+ subseg_set (seg, subseg);
+
+ if (USE_GLOBAL_POINTER_OPT)
+ bfd_set_gp_size (stdoutput, g_switch_value);
+}
+
+
+const pseudo_typeS md_pseudo_table[] =
+{
+ {"bss", s_score_bss, 0},
+ {"text", s_score_text, 0},
+ {"word", cons, 4},
+ {"long", cons, 4},
+ {"extend", float_cons, 'x'},
+ {"ldouble", float_cons, 'x'},
+ {"packed", float_cons, 'p'},
+ {"end", s_score_end, 0},
+ {"ent", s_score_ent, 0},
+ {"frame", s_score_frame, 0},
+ {"rdata", s_change_sec, 'r'},
+ {"sdata", s_change_sec, 's'},
+ {"set", s_score_set, 0},
+ {"mask", s_score_mask, 'R'},
+ {"dword", cons, 8},
+ {"lcomm", s_score_lcomm, 1},
+ {"section", score_s_section, 0},
+ {"cpload", s_score_cpload, 0},
+ {"cprestore", s_score_cprestore, 0},
+ {"gpword", s_score_gpword, 0},
+ {"cpadd", s_score_cpadd, 0},
+ {0, 0, 0}
+};
+
diff --git a/contrib/binutils/gas/config/tc-score.h b/contrib/binutils/gas/config/tc-score.h
new file mode 100644
index 0000000..2cd4039
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-score.h
@@ -0,0 +1,83 @@
+/* tc-score.h -- Score specific file for assembler
+ Copyright 2006 Free Software Foundation, Inc.
+ Contributed by:
+ Mei Ligang (ligang@sunnorth.com.cn)
+ Pei-Lin Tsai (pltsai@sunplus.com)
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+ MA 02110-1301, USA. */
+
+#ifndef TC_SCORE
+#define TC_SCORE
+
+#define TARGET_ARCH bfd_arch_score
+#define WORKING_DOT_WORD
+#define DIFF_EXPR_OK
+#define RELOC_EXPANSION_POSSIBLE
+#define MAX_RELOC_EXPANSION 2
+#define MAX_MEM_FOR_RS_ALIGN_CODE (3 + 4)
+
+#define md_undefined_symbol(name) NULL
+
+#define TARGET_FORMAT (target_big_endian ? "elf32-bigscore" : "elf32-littlescore")
+
+#define md_relax_frag(segment, fragp, stretch) score_relax_frag (segment, fragp, stretch)
+extern int score_relax_frag (asection *, struct frag *, long);
+
+#define md_frag_check(fragp) score_frag_check (fragp)
+extern void score_frag_check (fragS *);
+
+#define TC_VALIDATE_FIX(FIXP, SEGTYPE, SKIP) score_validate_fix (FIXP)
+extern void score_validate_fix (struct fix *);
+
+#define TC_FORCE_RELOCATION(FIXP) score_force_relocation (FIXP)
+extern int score_force_relocation (struct fix *);
+
+#define tc_fix_adjustable(fixp) score_fix_adjustable (fixp)
+extern bfd_boolean score_fix_adjustable (struct fix *);
+
+#define elf_tc_final_processing score_elf_final_processing
+extern void score_elf_final_processing (void);
+
+struct score_tc_frag_data
+{
+ unsigned int is_insn;
+ struct fix *fixp;
+};
+
+#define TC_FRAG_TYPE struct score_tc_frag_data
+
+#define TC_FRAG_INIT(FRAGP) \
+ do \
+ { \
+ (FRAGP)->tc_frag_data.is_insn = (((FRAGP)->fr_type == rs_machine_dependent) ? 1 : 0); \
+ } \
+ while (0)
+
+#ifdef OBJ_ELF
+#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_"
+#else
+#define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_"
+#endif
+
+enum score_pic_level
+{
+ NO_PIC,
+ PIC
+};
+
+#endif /*TC_SCORE */
diff --git a/contrib/binutils/gas/config/tc-sparc.c b/contrib/binutils/gas/config/tc-sparc.c
index 10a1411..d4a409f 100644
--- a/contrib/binutils/gas/config/tc-sparc.c
+++ b/contrib/binutils/gas/config/tc-sparc.c
@@ -1,6 +1,6 @@
/* tc-sparc.c -- Assemble for the SPARC
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,8 +19,6 @@
to the Free Software Foundation, 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */
-#include <stdio.h>
-
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
@@ -339,7 +337,7 @@ sparc_target_format ()
#endif
#ifdef OBJ_ELF
- return sparc_arch_size == 64 ? "elf64-sparc" : "elf32-sparc";
+ return sparc_arch_size == 64 ? ELF64_TARGET_FORMAT : ELF_TARGET_FORMAT;
#endif
abort ();
@@ -547,12 +545,12 @@ md_parse_option (c, arg)
{
if (sparc_arch_size == 32)
{
- if (strcmp (*l, "elf32-sparc") == 0)
+ if (CONST_STRNEQ (*l, "elf32-sparc"))
break;
}
else
{
- if (strcmp (*l, "elf64-sparc") == 0)
+ if (CONST_STRNEQ (*l, "elf64-sparc"))
break;
}
}
@@ -1862,7 +1860,8 @@ sparc_ip (str, pinsn)
case '\0': /* End of args. */
if (s[0] == ',' && s[1] == '%')
{
- static const struct tls_ops {
+ static const struct tls_ops
+ {
/* The name as it appears in assembler. */
char *name;
/* strlen (name), precomputed for speed */
@@ -1871,7 +1870,9 @@ sparc_ip (str, pinsn)
int reloc;
/* 1 if call. */
int call;
- } tls_ops[] = {
+ }
+ tls_ops[] =
+ {
{ "tgd_add", 7, BFD_RELOC_SPARC_TLS_GD_ADD, 0 },
{ "tgd_call", 8, BFD_RELOC_SPARC_TLS_GD_CALL, 1 },
{ "tldm_add", 8, BFD_RELOC_SPARC_TLS_LDM_ADD, 0 },
@@ -1879,7 +1880,8 @@ sparc_ip (str, pinsn)
{ "tldo_add", 8, BFD_RELOC_SPARC_TLS_LDO_ADD, 0 },
{ "tie_ldx", 7, BFD_RELOC_SPARC_TLS_IE_LDX, 0 },
{ "tie_ld", 6, BFD_RELOC_SPARC_TLS_IE_LD, 0 },
- { "tie_add", 7, BFD_RELOC_SPARC_TLS_IE_ADD, 0 }
+ { "tie_add", 7, BFD_RELOC_SPARC_TLS_IE_ADD, 0 },
+ { NULL, 0, 0, 0 }
};
const struct tls_ops *o;
char *s1;
@@ -3311,9 +3313,9 @@ md_apply_fix (fixP, valP, segment)
break;
case BFD_RELOC_SPARC_WDISP16:
- /* FIXME: simplify. */
- if (((val > 0) && (val & ~0x3fffc))
- || ((val < 0) && (~(val - 1) & ~0x3fffc)))
+ if ((val & 3)
+ || val >= 0x1fffc
+ || val <= -(offsetT) 0x20008)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("relocation overflow"));
/* FIXME: The +1 deserves a comment. */
@@ -3322,9 +3324,9 @@ md_apply_fix (fixP, valP, segment)
break;
case BFD_RELOC_SPARC_WDISP19:
- /* FIXME: simplify. */
- if (((val > 0) && (val & ~0x1ffffc))
- || ((val < 0) && (~(val - 1) & ~0x1ffffc)))
+ if ((val & 3)
+ || val >= 0xffffc
+ || val <= -(offsetT) 0x100008)
as_bad_where (fixP->fx_file, fixP->fx_line,
_("relocation overflow"));
/* FIXME: The +1 deserves a comment. */
@@ -3439,7 +3441,7 @@ md_apply_fix (fixP, valP, segment)
arelent **
tc_gen_reloc (section, fixp)
- asection *section ATTRIBUTE_UNUSED;
+ asection *section;
fixS *fixp;
{
static arelent *relocs[3];
@@ -3582,6 +3584,16 @@ tc_gen_reloc (section, fixp)
}
#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */
+ /* Nothing is aligned in DWARF debugging sections. */
+ if (bfd_get_section_flags (stdoutput, section) & SEC_DEBUGGING)
+ switch (code)
+ {
+ case BFD_RELOC_16: code = BFD_RELOC_SPARC_UA16; break;
+ case BFD_RELOC_32: code = BFD_RELOC_SPARC_UA32; break;
+ case BFD_RELOC_64: code = BFD_RELOC_SPARC_UA64; break;
+ default: break;
+ }
+
if (code == BFD_RELOC_SPARC_OLO10)
reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10);
else
@@ -4602,7 +4614,7 @@ sparc_cfi_frame_initial_instructions ()
}
int
-sparc_regname_to_dw2regnum (const char *regname)
+sparc_regname_to_dw2regnum (char *regname)
{
char *p, *q;
diff --git a/contrib/binutils/gas/config/tc-sparc.h b/contrib/binutils/gas/config/tc-sparc.h
index 14da16a..90c0e95 100644
--- a/contrib/binutils/gas/config/tc-sparc.h
+++ b/contrib/binutils/gas/config/tc-sparc.h
@@ -1,6 +1,7 @@
/* tc-sparc.h - Macros and type defines for the sparc.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2005, 2007
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -31,6 +32,19 @@ struct frag;
#define TARGET_ARCH bfd_arch_sparc
+#ifdef TE_FreeBSD
+#define ELF_TARGET_FORMAT "elf32-sparc-freebsd"
+#define ELF64_TARGET_FORMAT "elf64-sparc-freebsd"
+#endif
+
+#ifndef ELF_TARGET_FORMAT
+#define ELF_TARGET_FORMAT "elf32-sparc"
+#endif
+
+#ifndef ELF64_TARGET_FORMAT
+#define ELF64_TARGET_FORMAT "elf64-sparc"
+#endif
+
extern const char *sparc_target_format PARAMS ((void));
#define TARGET_FORMAT sparc_target_format ()
@@ -78,7 +92,6 @@ extern void sparc_handle_align PARAMS ((struct frag *));
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
(!(FIX)->fx_pcrel \
- || (FIX)->fx_plt \
|| (sparc_pic_code \
&& S_IS_EXTERNAL ((FIX)->fx_addsy)) \
|| TC_FORCE_RELOCATION (FIX))
@@ -171,7 +184,7 @@ extern void cons_fix_new_sparc
extern void sparc_cfi_frame_initial_instructions PARAMS ((void));
#define tc_regname_to_dw2regnum sparc_regname_to_dw2regnum
-extern int sparc_regname_to_dw2regnum PARAMS ((const char *regname));
+extern int sparc_regname_to_dw2regnum PARAMS ((char *regname));
#define tc_cfi_emit_pcrel_expr sparc_cfi_emit_pcrel_expr
extern void sparc_cfi_emit_pcrel_expr PARAMS ((expressionS *, unsigned int));
diff --git a/contrib/binutils/gas/config/tc-spu.c b/contrib/binutils/gas/config/tc-spu.c
new file mode 100644
index 0000000..ef801df
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-spu.c
@@ -0,0 +1,1083 @@
+/* spu.c -- Assembler for the IBM Synergistic Processing Unit (SPU)
+
+ Copyright 2006, 2007 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include "as.h"
+#include "safe-ctype.h"
+#include "subsegs.h"
+#include "dwarf2dbg.h"
+
+const struct spu_opcode spu_opcodes[] = {
+#define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \
+ { MACFORMAT, (OPCODE) << (32-11), MNEMONIC, ASMFORMAT },
+#define APUOPFB(TAG,MACFORMAT,OPCODE,FB,MNEMONIC,ASMFORMAT,DEP,PIPE) \
+ { MACFORMAT, ((OPCODE) << (32-11)) | ((FB) << (32-18)), MNEMONIC, ASMFORMAT },
+#include "opcode/spu-insns.h"
+#undef APUOP
+#undef APUOPFB
+};
+
+static const int spu_num_opcodes =
+ sizeof (spu_opcodes) / sizeof (spu_opcodes[0]);
+
+#define MAX_RELOCS 2
+
+struct spu_insn
+{
+ unsigned int opcode;
+ expressionS exp[MAX_RELOCS];
+ int reloc_arg[MAX_RELOCS];
+ int flag[MAX_RELOCS];
+ enum spu_insns tag;
+};
+
+static const char *get_imm (const char *param, struct spu_insn *insn, int arg);
+static const char *get_reg (const char *param, struct spu_insn *insn, int arg,
+ int accept_expr);
+static int calcop (struct spu_opcode *format, const char *param,
+ struct spu_insn *insn);
+static void spu_cons (int);
+
+extern char *myname;
+static struct hash_control *op_hash = NULL;
+
+/* These bits should be turned off in the first address of every segment */
+int md_seg_align = 7;
+
+/* These chars start a comment anywhere in a source file (except inside
+ another comment */
+const char comment_chars[] = "#";
+
+/* These chars only start a comment at the beginning of a line. */
+const char line_comment_chars[] = "#";
+
+/* gods own line continuation char */
+const char line_separator_chars[] = ";";
+
+/* Chars that can be used to separate mant from exp in floating point nums */
+const char EXP_CHARS[] = "eE";
+
+/* Chars that mean this number is a floating point constant */
+/* as in 0f123.456 */
+/* or 0H1.234E-12 (see exp chars above) */
+const char FLT_CHARS[] = "dDfF";
+
+const pseudo_typeS md_pseudo_table[] =
+{
+ {"align", s_align_ptwo, 4},
+ {"bss", s_lcomm_bytes, 1},
+ {"def", s_set, 0},
+ {"dfloat", float_cons, 'd'},
+ {"ffloat", float_cons, 'f'},
+ {"global", s_globl, 0},
+ {"half", cons, 2},
+ {"int", spu_cons, 4},
+ {"long", spu_cons, 4},
+ {"quad", spu_cons, 8},
+ {"string", stringer, 1},
+ {"word", spu_cons, 4},
+ /* Force set to be treated as an instruction. */
+ {"set", NULL, 0},
+ {".set", s_set, 0},
+ /* Likewise for eqv. */
+ {"eqv", NULL, 0},
+ {".eqv", s_set, -1},
+ {"file", (void (*) PARAMS ((int))) dwarf2_directive_file, 0 },
+ {"loc", dwarf2_directive_loc, 0},
+ {0,0,0}
+};
+
+void
+md_begin (void)
+{
+ const char *retval = NULL;
+ int i;
+
+ /* initialize hash table */
+
+ op_hash = hash_new ();
+
+ /* loop until you see the end of the list */
+
+ for (i = 0; i < spu_num_opcodes; i++)
+ {
+ /* hash each mnemonic and record its position */
+
+ retval = hash_insert (op_hash, spu_opcodes[i].mnemonic, (PTR)&spu_opcodes[i]);
+
+ if (retval != NULL && strcmp (retval, "exists") != 0)
+ as_fatal (_("Can't hash instruction '%s':%s"),
+ spu_opcodes[i].mnemonic, retval);
+ }
+}
+
+const char *md_shortopts = "";
+struct option md_longopts[] = {
+#define OPTION_APUASM (OPTION_MD_BASE)
+ {"apuasm", no_argument, NULL, OPTION_APUASM},
+#define OPTION_DD2 (OPTION_MD_BASE+1)
+ {"mdd2.0", no_argument, NULL, OPTION_DD2},
+#define OPTION_DD1 (OPTION_MD_BASE+2)
+ {"mdd1.0", no_argument, NULL, OPTION_DD1},
+#define OPTION_DD3 (OPTION_MD_BASE+3)
+ {"mdd3.0", no_argument, NULL, OPTION_DD3},
+ { NULL, no_argument, NULL, 0 }
+};
+size_t md_longopts_size = sizeof (md_longopts);
+
+/* When set (by -apuasm) our assembler emulates the behaviour of apuasm.
+ * e.g. don't add bias to float conversion and don't right shift
+ * immediate values. */
+static int emulate_apuasm;
+
+/* Use the dd2.0 instructions set. The only differences are some new
+ * register names and the orx insn */
+static int use_dd2 = 1;
+
+int
+md_parse_option (int c, char *arg ATTRIBUTE_UNUSED)
+{
+ switch (c)
+ {
+ case OPTION_APUASM:
+ emulate_apuasm = 1;
+ break;
+ case OPTION_DD3:
+ use_dd2 = 1;
+ break;
+ case OPTION_DD2:
+ use_dd2 = 1;
+ break;
+ case OPTION_DD1:
+ use_dd2 = 0;
+ break;
+ default:
+ return 0;
+ }
+ return 1;
+}
+
+void
+md_show_usage (FILE *stream)
+{
+ fputs (_("\
+SPU options:\n\
+ --apuasm emulate behaviour of apuasm\n"),
+ stream);
+}
+
+
+struct arg_encode {
+ int size;
+ int pos;
+ int rshift;
+ int lo, hi;
+ int wlo, whi;
+ bfd_reloc_code_real_type reloc;
+};
+
+static struct arg_encode arg_encode[A_MAX] = {
+ { 7, 0, 0, 0, 127, 0, -1, 0 }, /* A_T */
+ { 7, 7, 0, 0, 127, 0, -1, 0 }, /* A_A */
+ { 7, 14, 0, 0, 127, 0, -1, 0 }, /* A_B */
+ { 7, 21, 0, 0, 127, 0, -1, 0 }, /* A_C */
+ { 7, 7, 0, 0, 127, 0, -1, 0 }, /* A_S */
+ { 7, 7, 0, 0, 127, 0, -1, 0 }, /* A_H */
+ { 0, 0, 0, 0, -1, 0, -1, 0 }, /* A_P */
+ { 7, 14, 0, 0, -1, 0, -1, BFD_RELOC_SPU_IMM7 }, /* A_S3 */
+ { 7, 14, 0, -32, 31, -31, 0, BFD_RELOC_SPU_IMM7 }, /* A_S6 */
+ { 7, 14, 0, 0, -1, 0, -1, BFD_RELOC_SPU_IMM7 }, /* A_S7N */
+ { 7, 14, 0, -64, 63, -63, 0, BFD_RELOC_SPU_IMM7 }, /* A_S7 */
+ { 8, 14, 0, 0, 127, 0, -1, BFD_RELOC_SPU_IMM8 }, /* A_U7A */
+ { 8, 14, 0, 0, 127, 0, -1, BFD_RELOC_SPU_IMM8 }, /* A_U7B */
+ { 10, 14, 0, -512, 511, -128, 255, BFD_RELOC_SPU_IMM10 }, /* A_S10B */
+ { 10, 14, 0, -512, 511, 0, -1, BFD_RELOC_SPU_IMM10 }, /* A_S10 */
+ { 2, 23, 9, -1024, 1023, 0, -1, BFD_RELOC_SPU_PCREL9a }, /* A_S11 */
+ { 2, 14, 9, -1024, 1023, 0, -1, BFD_RELOC_SPU_PCREL9b }, /* A_S11I */
+ { 10, 14, 4, -8192, 8191, 0, -1, BFD_RELOC_SPU_IMM10W }, /* A_S14 */
+ { 16, 7, 0, -32768, 32767, 0, -1, BFD_RELOC_SPU_IMM16 }, /* A_S16 */
+ { 16, 7, 2, -131072, 262143, 0, -1, BFD_RELOC_SPU_IMM16W }, /* A_S18 */
+ { 16, 7, 2, -262144, 262143, 0, -1, BFD_RELOC_SPU_PCREL16 }, /* A_R18 */
+ { 7, 14, 0, 0, -1, 0, -1, BFD_RELOC_SPU_IMM7 }, /* A_U3 */
+ { 7, 14, 0, 0, 127, 0, 31, BFD_RELOC_SPU_IMM7 }, /* A_U5 */
+ { 7, 14, 0, 0, 127, 0, 63, BFD_RELOC_SPU_IMM7 }, /* A_U6 */
+ { 7, 14, 0, 0, -1, 0, -1, BFD_RELOC_SPU_IMM7 }, /* A_U7 */
+ { 14, 0, 0, 0, 16383, 0, -1, 0 }, /* A_U14 */
+ { 16, 7, 0, -32768, 65535, 0, -1, BFD_RELOC_SPU_IMM16 }, /* A_X16 */
+ { 18, 7, 0, 0, 262143, 0, -1, BFD_RELOC_SPU_IMM18 }, /* A_U18 */
+};
+
+/* Some flags for handling errors. This is very hackish and added after
+ * the fact. */
+static int syntax_error_arg;
+static const char *syntax_error_param;
+static int syntax_reg;
+
+static char *
+insn_fmt_string (struct spu_opcode *format)
+{
+ static char buf[64];
+ int len = 0;
+ int i;
+
+ len += sprintf (&buf[len], "%s\t", format->mnemonic);
+ for (i = 1; i <= format->arg[0]; i++)
+ {
+ int arg = format->arg[i];
+ char *exp;
+ if (i > 1 && arg != A_P && format->arg[i-1] != A_P)
+ buf[len++] = ',';
+ if (arg == A_P)
+ exp = "(";
+ else if (arg < A_P)
+ exp = i == syntax_error_arg ? "REG" : "reg";
+ else
+ exp = i == syntax_error_arg ? "IMM" : "imm";
+ len += sprintf (&buf[len], "%s", exp);
+ if (i > 1 && format->arg[i-1] == A_P)
+ buf[len++] = ')';
+ }
+ buf[len] = 0;
+ return buf;
+}
+
+void
+md_assemble (char *op)
+{
+ char *param, *thisfrag;
+ char c;
+ struct spu_opcode *format;
+ struct spu_insn insn;
+ int i;
+
+ assert (op);
+
+ /* skip over instruction to find parameters */
+
+ for (param = op; *param != 0 && !ISSPACE (*param); param++)
+ ;
+ c = *param;
+ *param = 0;
+
+ if (c != 0 && c != '\n')
+ param++;
+
+ /* try to find the instruction in the hash table */
+
+ if ((format = (struct spu_opcode *) hash_find (op_hash, op)) == NULL)
+ {
+ as_bad (_("Invalid mnemonic '%s'"), op);
+ return;
+ }
+
+ if (!use_dd2 && strcmp (format->mnemonic, "orx") == 0)
+ {
+ as_bad (_("'%s' is only available in DD2.0 or higher."), op);
+ return;
+ }
+
+ while (1)
+ {
+ /* try parsing this instruction into insn */
+ for (i = 0; i < MAX_RELOCS; i++)
+ {
+ insn.exp[i].X_add_symbol = 0;
+ insn.exp[i].X_op_symbol = 0;
+ insn.exp[i].X_add_number = 0;
+ insn.exp[i].X_op = O_illegal;
+ insn.reloc_arg[i] = -1;
+ insn.flag[i] = 0;
+ }
+ insn.opcode = format->opcode;
+ insn.tag = (enum spu_insns) (format - spu_opcodes);
+
+ syntax_error_arg = 0;
+ syntax_error_param = 0;
+ syntax_reg = 0;
+ if (calcop (format, param, &insn))
+ break;
+
+ /* if it doesn't parse try the next instruction */
+ if (!strcmp (format[0].mnemonic, format[1].mnemonic))
+ format++;
+ else
+ {
+ int parg = format[0].arg[syntax_error_arg-1];
+
+ as_fatal (_("Error in argument %d. Expecting: \"%s\""),
+ syntax_error_arg - (parg == A_P),
+ insn_fmt_string (format));
+ return;
+ }
+ }
+
+ if ((syntax_reg & 4)
+ && ! (insn.tag == M_RDCH
+ || insn.tag == M_RCHCNT
+ || insn.tag == M_WRCH))
+ as_warn (_("Mixing register syntax, with and without '$'."));
+ if (syntax_error_param)
+ {
+ const char *d = syntax_error_param;
+ while (*d != '$')
+ d--;
+ as_warn (_("Treating '%-*s' as a symbol."), (int)(syntax_error_param - d), d);
+ }
+
+ /* grow the current frag and plop in the opcode */
+
+ thisfrag = frag_more (4);
+ md_number_to_chars (thisfrag, insn.opcode, 4);
+
+ /* if this instruction requires labels mark it for later */
+
+ for (i = 0; i < MAX_RELOCS; i++)
+ if (insn.reloc_arg[i] >= 0)
+ {
+ fixS *fixP;
+ bfd_reloc_code_real_type reloc = arg_encode[insn.reloc_arg[i]].reloc;
+ int pcrel = 0;
+
+ if (reloc == BFD_RELOC_SPU_PCREL9a
+ || reloc == BFD_RELOC_SPU_PCREL9b
+ || reloc == BFD_RELOC_SPU_PCREL16)
+ pcrel = 1;
+ if (insn.flag[i] == 1)
+ reloc = BFD_RELOC_SPU_HI16;
+ else if (insn.flag[i] == 2)
+ reloc = BFD_RELOC_SPU_LO16;
+ fixP = fix_new_exp (frag_now,
+ thisfrag - frag_now->fr_literal,
+ 4,
+ &insn.exp[i],
+ pcrel,
+ reloc);
+ fixP->tc_fix_data.arg_format = insn.reloc_arg[i];
+ fixP->tc_fix_data.insn_tag = insn.tag;
+ }
+ dwarf2_emit_insn (4);
+}
+
+static int
+calcop (struct spu_opcode *format, const char *param, struct spu_insn *insn)
+{
+ int i;
+ int paren = 0;
+ int arg;
+
+ for (i = 1; i <= format->arg[0]; i++)
+ {
+ arg = format->arg[i];
+ syntax_error_arg = i;
+
+ while (ISSPACE (*param))
+ param++;
+ if (*param == 0 || *param == ',')
+ return 0;
+ if (arg < A_P)
+ param = get_reg (param, insn, arg, 1);
+ else if (arg > A_P)
+ param = get_imm (param, insn, arg);
+ else if (arg == A_P)
+ {
+ paren++;
+ if ('(' != *param++)
+ return 0;
+ }
+
+ if (!param)
+ return 0;
+
+ while (ISSPACE (*param))
+ param++;
+
+ if (arg != A_P && paren)
+ {
+ paren--;
+ if (')' != *param++)
+ return 0;
+ }
+ else if (i < format->arg[0]
+ && format->arg[i] != A_P
+ && format->arg[i+1] != A_P)
+ {
+ if (',' != *param++)
+ {
+ syntax_error_arg++;
+ return 0;
+ }
+ }
+ }
+ while (ISSPACE (*param))
+ param++;
+ return !paren && (*param == 0 || *param == '\n');
+}
+
+struct reg_name {
+ unsigned int regno;
+ unsigned int length;
+ char name[32];
+};
+
+#define REG_NAME(NO,NM) { NO, sizeof (NM) - 1, NM }
+
+static struct reg_name reg_name[] = {
+ REG_NAME (0, "lr"), /* link register */
+ REG_NAME (1, "sp"), /* stack pointer */
+ REG_NAME (0, "rp"), /* link register */
+ REG_NAME (127, "fp"), /* frame pointer */
+};
+
+static struct reg_name sp_reg_name[] = {
+};
+
+static struct reg_name ch_reg_name[] = {
+ REG_NAME ( 0, "SPU_RdEventStat"),
+ REG_NAME ( 1, "SPU_WrEventMask"),
+ REG_NAME ( 2, "SPU_WrEventAck"),
+ REG_NAME ( 3, "SPU_RdSigNotify1"),
+ REG_NAME ( 4, "SPU_RdSigNotify2"),
+ REG_NAME ( 7, "SPU_WrDec"),
+ REG_NAME ( 8, "SPU_RdDec"),
+ REG_NAME ( 11, "SPU_RdEventMask"), /* DD2.0 only */
+ REG_NAME ( 13, "SPU_RdMachStat"),
+ REG_NAME ( 14, "SPU_WrSRR0"),
+ REG_NAME ( 15, "SPU_RdSRR0"),
+ REG_NAME ( 28, "SPU_WrOutMbox"),
+ REG_NAME ( 29, "SPU_RdInMbox"),
+ REG_NAME ( 30, "SPU_WrOutIntrMbox"),
+ REG_NAME ( 9, "MFC_WrMSSyncReq"),
+ REG_NAME ( 12, "MFC_RdTagMask"), /* DD2.0 only */
+ REG_NAME ( 16, "MFC_LSA"),
+ REG_NAME ( 17, "MFC_EAH"),
+ REG_NAME ( 18, "MFC_EAL"),
+ REG_NAME ( 19, "MFC_Size"),
+ REG_NAME ( 20, "MFC_TagID"),
+ REG_NAME ( 21, "MFC_Cmd"),
+ REG_NAME ( 22, "MFC_WrTagMask"),
+ REG_NAME ( 23, "MFC_WrTagUpdate"),
+ REG_NAME ( 24, "MFC_RdTagStat"),
+ REG_NAME ( 25, "MFC_RdListStallStat"),
+ REG_NAME ( 26, "MFC_WrListStallAck"),
+ REG_NAME ( 27, "MFC_RdAtomicStat"),
+};
+#undef REG_NAME
+
+static const char *
+get_reg (const char *param, struct spu_insn *insn, int arg, int accept_expr)
+{
+ unsigned regno;
+ int saw_prefix = 0;
+
+ if (*param == '$')
+ {
+ saw_prefix = 1;
+ param++;
+ }
+
+ if (arg == A_H) /* Channel */
+ {
+ if ((param[0] == 'c' || param[0] == 'C')
+ && (param[1] == 'h' || param[1] == 'H')
+ && ISDIGIT (param[2]))
+ param += 2;
+ }
+ else if (arg == A_S) /* Special purpose register */
+ {
+ if ((param[0] == 's' || param[0] == 'S')
+ && (param[1] == 'p' || param[1] == 'P')
+ && ISDIGIT (param[2]))
+ param += 2;
+ }
+
+ if (ISDIGIT (*param))
+ {
+ regno = 0;
+ while (ISDIGIT (*param))
+ regno = regno * 10 + *param++ - '0';
+ }
+ else
+ {
+ struct reg_name *rn;
+ unsigned int i, n, l = 0;
+
+ if (arg == A_H) /* Channel */
+ {
+ rn = ch_reg_name;
+ n = sizeof (ch_reg_name) / sizeof (*ch_reg_name);
+ }
+ else if (arg == A_S) /* Special purpose register */
+ {
+ rn = sp_reg_name;
+ n = sizeof (sp_reg_name) / sizeof (*sp_reg_name);
+ }
+ else
+ {
+ rn = reg_name;
+ n = sizeof (reg_name) / sizeof (*reg_name);
+ }
+ regno = 128;
+ for (i = 0; i < n; i++)
+ if (rn[i].length > l
+ && 0 == strncasecmp (param, rn[i].name, rn[i].length))
+ {
+ l = rn[i].length;
+ regno = rn[i].regno;
+ }
+ param += l;
+ }
+
+ if (!use_dd2
+ && arg == A_H)
+ {
+ if (regno == 11)
+ as_bad (_("'SPU_RdEventMask' (channel 11) is only available in DD2.0 or higher."));
+ else if (regno == 12)
+ as_bad (_("'MFC_RdTagMask' (channel 12) is only available in DD2.0 or higher."));
+ }
+
+ if (regno < 128)
+ {
+ insn->opcode |= regno << arg_encode[arg].pos;
+ if ((!saw_prefix && syntax_reg == 1)
+ || (saw_prefix && syntax_reg == 2))
+ syntax_reg |= 4;
+ syntax_reg |= saw_prefix ? 1 : 2;
+ return param;
+ }
+
+ if (accept_expr)
+ {
+ char *save_ptr;
+ expressionS ex;
+ save_ptr = input_line_pointer;
+ input_line_pointer = (char *)param;
+ expression (&ex);
+ param = input_line_pointer;
+ input_line_pointer = save_ptr;
+ if (ex.X_op == O_register || ex.X_op == O_constant)
+ {
+ insn->opcode |= ex.X_add_number << arg_encode[arg].pos;
+ return param;
+ }
+ }
+ return 0;
+}
+
+static const char *
+get_imm (const char *param, struct spu_insn *insn, int arg)
+{
+ int val;
+ char *save_ptr;
+ int low = 0, high = 0;
+ int reloc_i = insn->reloc_arg[0] >= 0 ? 1 : 0;
+
+ if (strncasecmp (param, "%lo(", 4) == 0)
+ {
+ param += 3;
+ low = 1;
+ as_warn (_("Using old style, %%lo(expr), please change to PPC style, expr@l."));
+ }
+ else if (strncasecmp (param, "%hi(", 4) == 0)
+ {
+ param += 3;
+ high = 1;
+ as_warn (_("Using old style, %%hi(expr), please change to PPC style, expr@h."));
+ }
+ else if (strncasecmp (param, "%pic(", 5) == 0)
+ {
+ /* Currently we expect %pic(expr) == expr, so do nothing here.
+ i.e. for code loaded at address 0 $toc will be 0. */
+ param += 4;
+ }
+
+ if (*param == '$')
+ {
+ /* Symbols can start with $, but if this symbol matches a register
+ name, it's probably a mistake. The only way to avoid this
+ warning is to rename the symbol. */
+ struct spu_insn tmp_insn;
+ const char *np = get_reg (param, &tmp_insn, arg, 0);
+
+ if (np)
+ syntax_error_param = np;
+ }
+
+ save_ptr = input_line_pointer;
+ input_line_pointer = (char *) param;
+ expression (&insn->exp[reloc_i]);
+ param = input_line_pointer;
+ input_line_pointer = save_ptr;
+
+ /* Similar to ppc_elf_suffix in tc-ppc.c. We have so few cases to
+ handle we do it inlined here. */
+ if (param[0] == '@' && !ISALNUM (param[2]) && param[2] != '@')
+ {
+ if (param[1] == 'h' || param[1] == 'H')
+ {
+ high = 1;
+ param += 2;
+ }
+ else if (param[1] == 'l' || param[1] == 'L')
+ {
+ low = 1;
+ param += 2;
+ }
+ }
+
+ if (insn->exp[reloc_i].X_op == O_constant)
+ {
+ val = insn->exp[reloc_i].X_add_number;
+
+ if (emulate_apuasm)
+ {
+ /* Convert the value to a format we expect. */
+ val <<= arg_encode[arg].rshift;
+ if (arg == A_U7A)
+ val = 173 - val;
+ else if (arg == A_U7B)
+ val = 155 - val;
+ }
+
+ if (high)
+ val = val >> 16;
+ else if (low)
+ val = val & 0xffff;
+
+ /* Warn about out of range expressions. */
+ {
+ int hi = arg_encode[arg].hi;
+ int lo = arg_encode[arg].lo;
+ int whi = arg_encode[arg].whi;
+ int wlo = arg_encode[arg].wlo;
+
+ if (hi > lo && (val < lo || val > hi))
+ as_fatal (_("Constant expression %d out of range, [%d, %d]."),
+ val, lo, hi);
+ else if (whi > wlo && (val < wlo || val > whi))
+ as_warn (_("Constant expression %d out of range, [%d, %d]."),
+ val, wlo, whi);
+ }
+
+ if (arg == A_U7A)
+ val = 173 - val;
+ else if (arg == A_U7B)
+ val = 155 - val;
+
+ /* Branch hints have a split encoding. Do the bottom part. */
+ if (arg == A_S11 || arg == A_S11I)
+ insn->opcode |= ((val >> 2) & 0x7f);
+
+ insn->opcode |= (((val >> arg_encode[arg].rshift)
+ & ((1 << arg_encode[arg].size) - 1))
+ << arg_encode[arg].pos);
+ insn->reloc_arg[reloc_i] = -1;
+ insn->flag[reloc_i] = 0;
+ }
+ else
+ {
+ insn->reloc_arg[reloc_i] = arg;
+ if (high)
+ insn->flag[reloc_i] = 1;
+ else if (low)
+ insn->flag[reloc_i] = 2;
+ }
+
+ return param;
+}
+
+#define MAX_LITTLENUMS 6
+
+/* Turn a string in input_line_pointer into a floating point constant of type
+ type, and store the appropriate bytes in *litP. The number of LITTLENUMS
+ emitted is stored in *sizeP . An error message is returned, or NULL on OK.
+ */
+char *
+md_atof (int type, char *litP, int *sizeP)
+{
+ int prec;
+ LITTLENUM_TYPE words[MAX_LITTLENUMS];
+ LITTLENUM_TYPE *wordP;
+ char *t;
+
+ switch (type)
+ {
+ case 'f':
+ case 'F':
+ case 's':
+ case 'S':
+ prec = 2;
+ break;
+
+ case 'd':
+ case 'D':
+ case 'r':
+ case 'R':
+ prec = 4;
+ break;
+
+ case 'x':
+ case 'X':
+ prec = 6;
+ break;
+
+ case 'p':
+ case 'P':
+ prec = 6;
+ break;
+
+ default:
+ *sizeP = 0;
+ return _("Bad call to MD_ATOF()");
+ }
+ t = atof_ieee (input_line_pointer, type, words);
+ if (t)
+ input_line_pointer = t;
+
+ *sizeP = prec * sizeof (LITTLENUM_TYPE);
+ for (wordP = words; prec--;)
+ {
+ md_number_to_chars (litP, (long) (*wordP++), sizeof (LITTLENUM_TYPE));
+ litP += sizeof (LITTLENUM_TYPE);
+ }
+ return 0;
+}
+
+#ifndef WORKING_DOT_WORD
+int md_short_jump_size = 4;
+
+void
+md_create_short_jump (char *ptr,
+ addressT from_addr ATTRIBUTE_UNUSED,
+ addressT to_addr ATTRIBUTE_UNUSED,
+ fragS *frag,
+ symbolS *to_symbol)
+{
+ ptr[0] = (char) 0xc0;
+ ptr[1] = 0x00;
+ ptr[2] = 0x00;
+ ptr[3] = 0x00;
+ fix_new (frag,
+ ptr - frag->fr_literal,
+ 4,
+ to_symbol,
+ (offsetT) 0,
+ 0,
+ BFD_RELOC_SPU_PCREL16);
+}
+
+int md_long_jump_size = 4;
+
+void
+md_create_long_jump (char *ptr,
+ addressT from_addr ATTRIBUTE_UNUSED,
+ addressT to_addr ATTRIBUTE_UNUSED,
+ fragS *frag,
+ symbolS *to_symbol)
+{
+ ptr[0] = (char) 0xc0;
+ ptr[1] = 0x00;
+ ptr[2] = 0x00;
+ ptr[3] = 0x00;
+ fix_new (frag,
+ ptr - frag->fr_literal,
+ 4,
+ to_symbol,
+ (offsetT) 0,
+ 0,
+ BFD_RELOC_SPU_PCREL16);
+}
+#endif
+
+/* Support @ppu on symbols referenced in .int/.long/.word/.quad. */
+static void
+spu_cons (int nbytes)
+{
+ expressionS exp;
+
+ if (is_it_end_of_statement ())
+ {
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ do
+ {
+ deferred_expression (&exp);
+ if ((exp.X_op == O_symbol
+ || exp.X_op == O_constant)
+ && strncasecmp (input_line_pointer, "@ppu", 4) == 0)
+ {
+ char *p = frag_more (nbytes);
+ enum bfd_reloc_code_real reloc;
+
+ /* Check for identifier@suffix+constant. */
+ input_line_pointer += 4;
+ if (*input_line_pointer == '-' || *input_line_pointer == '+')
+ {
+ expressionS new_exp;
+
+ expression (&new_exp);
+ if (new_exp.X_op == O_constant)
+ exp.X_add_number += new_exp.X_add_number;
+ }
+
+ reloc = nbytes == 4 ? BFD_RELOC_SPU_PPU32 : BFD_RELOC_SPU_PPU64;
+ fix_new_exp (frag_now, p - frag_now->fr_literal, nbytes,
+ &exp, 0, reloc);
+ }
+ else
+ emit_expr (&exp, nbytes);
+ }
+ while (*input_line_pointer++ == ',');
+
+ /* Put terminator back into stream. */
+ input_line_pointer--;
+ demand_empty_rest_of_line ();
+}
+
+int
+md_estimate_size_before_relax (fragS *fragP ATTRIBUTE_UNUSED,
+ segT segment_type ATTRIBUTE_UNUSED)
+{
+ as_fatal (_("Relaxation should never occur"));
+ return -1;
+}
+
+/* If while processing a fixup, a reloc really needs to be created,
+ then it is done here. */
+
+arelent *
+tc_gen_reloc (asection *seg ATTRIBUTE_UNUSED, fixS *fixp)
+{
+ arelent *reloc;
+ reloc = (arelent *) xmalloc (sizeof (arelent));
+ reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
+ if (fixp->fx_addsy)
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_addsy);
+ else if (fixp->fx_subsy)
+ *reloc->sym_ptr_ptr = symbol_get_bfdsym (fixp->fx_subsy);
+ else
+ abort ();
+ reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
+ reloc->howto = bfd_reloc_type_lookup (stdoutput, fixp->fx_r_type);
+ if (reloc->howto == (reloc_howto_type *) NULL)
+ {
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("reloc %d not supported by object file format"),
+ (int) fixp->fx_r_type);
+ return NULL;
+ }
+ reloc->addend = fixp->fx_addnumber;
+ return reloc;
+}
+
+/* Round up a section's size to the appropriate boundary. */
+
+valueT
+md_section_align (segT seg, valueT size)
+{
+ int align = bfd_get_section_alignment (stdoutput, seg);
+ valueT mask = ((valueT) 1 << align) - 1;
+
+ return (size + mask) & ~mask;
+}
+
+/* Where a PC relative offset is calculated from. On the spu they
+ are calculated from the beginning of the branch instruction. */
+
+long
+md_pcrel_from (fixS *fixp)
+{
+ return fixp->fx_frag->fr_address + fixp->fx_where;
+}
+
+/* Fill in rs_align_code fragments. */
+
+void
+spu_handle_align (fragS *fragp)
+{
+ static const unsigned char nop_pattern[8] = {
+ 0x40, 0x20, 0x00, 0x00, /* even nop */
+ 0x00, 0x20, 0x00, 0x00, /* odd nop */
+ };
+
+ int bytes;
+ char *p;
+
+ if (fragp->fr_type != rs_align_code)
+ return;
+
+ bytes = fragp->fr_next->fr_address - fragp->fr_address - fragp->fr_fix;
+ p = fragp->fr_literal + fragp->fr_fix;
+
+ if (bytes & 3)
+ {
+ int fix = bytes & 3;
+ memset (p, 0, fix);
+ p += fix;
+ bytes -= fix;
+ fragp->fr_fix += fix;
+ }
+ if (bytes & 4)
+ {
+ memcpy (p, &nop_pattern[4], 4);
+ p += 4;
+ bytes -= 4;
+ fragp->fr_fix += 4;
+ }
+
+ memcpy (p, nop_pattern, 8);
+ fragp->fr_var = 8;
+}
+
+void
+md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
+{
+ unsigned int res;
+ valueT val = *valP;
+ char *place = fixP->fx_where + fixP->fx_frag->fr_literal;
+
+ if (fixP->fx_subsy != (symbolS *) NULL)
+ {
+ /* We can't actually support subtracting a symbol. */
+ as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex"));
+ }
+
+ if (fixP->fx_addsy != NULL)
+ {
+ if (fixP->fx_pcrel)
+ {
+ /* Hack around bfd_install_relocation brain damage. */
+ val += fixP->fx_frag->fr_address + fixP->fx_where;
+
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_32:
+ fixP->fx_r_type = BFD_RELOC_32_PCREL;
+ break;
+
+ case BFD_RELOC_SPU_PCREL16:
+ case BFD_RELOC_SPU_PCREL9a:
+ case BFD_RELOC_SPU_PCREL9b:
+ case BFD_RELOC_32_PCREL:
+ break;
+
+ default:
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("expression too complex"));
+ break;
+ }
+ }
+ }
+
+ fixP->fx_addnumber = val;
+
+ if (fixP->fx_r_type == BFD_RELOC_SPU_PPU32
+ || fixP->fx_r_type == BFD_RELOC_SPU_PPU64)
+ return;
+
+ if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
+ {
+ fixP->fx_done = 1;
+ res = 0;
+ if (fixP->tc_fix_data.arg_format > A_P)
+ {
+ int hi = arg_encode[fixP->tc_fix_data.arg_format].hi;
+ int lo = arg_encode[fixP->tc_fix_data.arg_format].lo;
+ if (hi > lo && ((offsetT) val < lo || (offsetT) val > hi))
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ "Relocation doesn't fit. (relocation value = 0x%lx)",
+ (long) val);
+ }
+
+ switch (fixP->fx_r_type)
+ {
+ case BFD_RELOC_8:
+ md_number_to_chars (place, val, 1);
+ return;
+
+ case BFD_RELOC_16:
+ md_number_to_chars (place, val, 2);
+ return;
+
+ case BFD_RELOC_32:
+ md_number_to_chars (place, val, 4);
+ return;
+
+ case BFD_RELOC_64:
+ md_number_to_chars (place, val, 8);
+ return;
+
+ case BFD_RELOC_SPU_IMM7:
+ res = (val & 0x7f) << 14;
+ break;
+
+ case BFD_RELOC_SPU_IMM8:
+ res = (val & 0xff) << 14;
+ break;
+
+ case BFD_RELOC_SPU_IMM10:
+ res = (val & 0x3ff) << 14;
+ break;
+
+ case BFD_RELOC_SPU_IMM10W:
+ res = (val & 0x3ff0) << 10;
+ break;
+
+ case BFD_RELOC_SPU_IMM16:
+ res = (val & 0xffff) << 7;
+ break;
+
+ case BFD_RELOC_SPU_IMM16W:
+ res = (val & 0x3fffc) << 5;
+ break;
+
+ case BFD_RELOC_SPU_IMM18:
+ res = (val & 0x3ffff) << 7;
+ break;
+
+ case BFD_RELOC_SPU_PCREL9a:
+ res = ((val & 0x1fc) >> 2) | ((val & 0x600) << 14);
+ break;
+
+ case BFD_RELOC_SPU_PCREL9b:
+ res = ((val & 0x1fc) >> 2) | ((val & 0x600) << 5);
+ break;
+
+ case BFD_RELOC_SPU_PCREL16:
+ res = (val & 0x3fffc) << 5;
+ break;
+
+ default:
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("reloc %d not supported by object file format"),
+ (int) fixP->fx_r_type);
+ }
+
+ if (res != 0)
+ {
+ place[0] |= (res >> 24) & 0xff;
+ place[1] |= (res >> 16) & 0xff;
+ place[2] |= (res >> 8) & 0xff;
+ place[3] |= (res) & 0xff;
+ }
+ }
+}
diff --git a/contrib/binutils/gas/config/tc-spu.h b/contrib/binutils/gas/config/tc-spu.h
new file mode 100644
index 0000000..4c6c2d4
--- /dev/null
+++ b/contrib/binutils/gas/config/tc-spu.h
@@ -0,0 +1,107 @@
+/* spu.h -- Assembler for spu
+
+ Copyright 2006, 2007 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#ifndef TC_SPU
+#define TC_SPU 1
+
+#include "opcode/spu.h"
+
+#define TARGET_FORMAT "elf32-spu"
+#define TARGET_ARCH bfd_arch_spu
+#define TARGET_NAME "elf32-spu"
+
+#define TARGET_BYTES_BIG_ENDIAN 1
+
+struct tc_fix_info {
+ unsigned short arg_format;
+ unsigned short insn_tag;
+};
+
+/* fixS will have a member named tc_fix_data of this type. */
+#define TC_FIX_TYPE struct tc_fix_info
+#define TC_INIT_FIX_DATA(FIXP) \
+ do \
+ { \
+ (FIXP)->tc_fix_data.arg_format = 0; \
+ (FIXP)->tc_fix_data.insn_tag = 0; \
+ } \
+ while (0)
+
+/* Don't reduce function symbols to section symbols, and don't adjust
+ references to PPU symbols. */
+#define tc_fix_adjustable(FIXP) \
+ (!(S_IS_FUNCTION ((FIXP)->fx_addsy) \
+ || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU32 \
+ || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU64))
+
+/* Keep relocs on calls. Branches to function symbols are tail or
+ sibling calls. */
+#define TC_FORCE_RELOCATION(FIXP) \
+ ((FIXP)->tc_fix_data.insn_tag == M_BRSL \
+ || (FIXP)->tc_fix_data.insn_tag == M_BRASL \
+ || (((FIXP)->tc_fix_data.insn_tag == M_BR \
+ || (FIXP)->tc_fix_data.insn_tag == M_BRA) \
+ && (FIXP)->fx_addsy != NULL \
+ && S_IS_FUNCTION ((FIXP)->fx_addsy)) \
+ || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU32 \
+ || (FIXP)->fx_r_type == BFD_RELOC_SPU_PPU64 \
+ || generic_force_reloc (FIXP))
+
+/* Values passed to md_apply_fix don't include symbol values. */
+#define MD_APPLY_SYM_VALUE(FIX) 0
+
+/* The spu uses pseudo-ops with no leading period. */
+#define NO_PSEUDO_DOT 1
+
+/* Don't warn on word overflow; it happens on %hi relocs. */
+#undef WARN_SIGNED_OVERFLOW_WORD
+
+#define DIFF_EXPR_OK
+
+#define WORKING_DOT_WORD
+
+#define md_number_to_chars number_to_chars_bigendian
+
+#define md_convert_frag(b,s,f) {as_fatal (_("spu convert_frag\n"));}
+
+/* We don't need to do anything special for undefined symbols. */
+#define md_undefined_symbol(s) 0
+
+extern symbolS *section_symbol (asection *);
+#define md_operand(e) \
+ do { \
+ if (strncasecmp (input_line_pointer, "@ppu", 4) == 0) \
+ { \
+ e->X_op = O_symbol; \
+ if (abs_section_sym == NULL) \
+ abs_section_sym = section_symbol (absolute_section); \
+ e->X_add_symbol = abs_section_sym; \
+ e->X_add_number = 0; \
+ } \
+ } while (0)
+
+/* Fill in rs_align_code fragments. */
+extern void spu_handle_align PARAMS ((fragS *));
+#define HANDLE_ALIGN(frag) spu_handle_align (frag)
+
+#define MAX_MEM_FOR_RS_ALIGN_CODE (7 + 8)
+
+#endif /* TC_SPU */
diff --git a/contrib/binutils/gas/config/te-pep.h b/contrib/binutils/gas/config/te-pep.h
new file mode 100644
index 0000000..164b22d
--- /dev/null
+++ b/contrib/binutils/gas/config/te-pep.h
@@ -0,0 +1,10 @@
+#define TE_PEP
+#define COFF_WITH_pex64
+
+#define TE_PE
+#define LEX_AT (LEX_BEGIN_NAME | LEX_NAME) /* Can have @'s inside labels. */
+
+/* The PE format supports long section names. */
+#define COFF_LONG_SECTION_NAMES
+
+#include "obj-format.h"
diff --git a/contrib/binutils/gas/configure b/contrib/binutils/gas/configure
index dca6497..d2cc2e7 100755
--- a/contrib/binutils/gas/configure
+++ b/contrib/binutils/gas/configure
@@ -241,6 +241,155 @@ IFS=" $as_nl"
$as_unset CDPATH
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
@@ -309,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL WARN_CFLAGS NO_WERROR GDBINIT cgen_cpu_prefix extra_objects target_cpu_type obj_format te_file install_tooldir atof BFDLIB OPCODES_LIB BFDVER_H ALL_OBJ_DEPS YACC LEX LEXLIB LEX_OUTPUT_ROOT CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBM datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO CPP WARN_CFLAGS NO_WERROR GDBINIT cgen_cpu_prefix extra_objects target_cpu_type obj_format te_file install_tooldir atof OPCODES_LIB YACC LEX LEXLIB LEX_OUTPUT_ROOT USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GENINSRC_NEVER_TRUE GENINSRC_NEVER_FALSE ALLOCA LIBM datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -852,14 +1001,18 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared=PKGS build shared libraries default=yes
- --enable-static=PKGS build static libraries default=yes
- --enable-fast-install=PKGS optimize for fast installation default=yes
+ --enable-shared[=PKGS]
+ build shared libraries [default=yes]
+ --enable-static[=PKGS]
+ build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-targets alternative target configurations besides the primary
+ --enable-targets alternative target configurations besides the primary
--enable-commonbfdlib build shared BFD/opcodes/libiberty library
- --enable-werror treat compile warnings as errors
- --enable-build-warnings Enable build-time compiler warnings
+ --enable-checking enable run-time checks
+ --enable-werror treat compile warnings as errors
+ --enable-build-warnings enable build-time compiler warnings
--disable-nls do not use Native Language Support
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
@@ -867,9 +1020,9 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-gnu-ld assume the C compiler uses GNU ld default=no
- --with-pic try to use only PIC/non-PIC objects default=use both
- --with-included-gettext use the GNU gettext library included here
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
Some influential environment variables:
CC C compiler command
@@ -3072,73 +3225,264 @@ fi
+
+
+macro_version='2.1a'
+macro_revision='1.2435'
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Set options
+
+enable_dlopen=no
+
+
+enable_win32_dll=no
+
+
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_shared=yes
fi;
+
+
+
+
+
+
+
+
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
enableval="$enable_static"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_static=yes
fi;
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi;
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_fast_install=yes
fi;
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for fgrep" >&5
+echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
+if test "${ac_cv_prog_fgrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
+ then ac_cv_prog_fgrep='grep -F'
+ else ac_cv_prog_fgrep='fgrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
+echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
+ FGREP=$ac_cv_prog_fgrep
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -3149,8 +3493,8 @@ fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -3160,12 +3504,12 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
esac
case $ac_prog in
# Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
+ [\\/]* | ?:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -3189,22 +3533,26 @@ if test "${lt_cv_path_LD+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
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.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
test "$with_gnu_ld" != no && break
- else
+ ;;
+ *)
test "$with_gnu_ld" != yes && break
- fi
+ ;;
+ esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$lt_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
@@ -3226,32 +3574,31 @@ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${lt_cv_prog_gnu_ld+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
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
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
-else
+ ;;
+*)
lt_cv_prog_gnu_ld=no
-fi
+ ;;
+esac
fi
echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
with_gnu_ld=$lt_cv_prog_gnu_ld
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
if test "${lt_cv_path_NM+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3259,35 +3606,173 @@ else
# Let the user override the test.
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
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- 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
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+ esac
fi
- fi
+ done
+ IFS="$lt_save_ifs"
done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+ : ${lt_cv_path_NM=no}
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+echo "${ECHO_T}$DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-NM="$lt_cv_path_NM"
-echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
+
+ DUMPBIN=$ac_ct_DUMPBIN
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
+if test "${lt_cv_nm_interface+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:3761: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:3764: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:3767: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+echo "${ECHO_T}$lt_cv_nm_interface" >&6
echo "$as_me:$LINENO: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
@@ -3300,8 +3785,234 @@ else
echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
+ if test -n $lt_cv_sys_max_cmd_len; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+echo "$as_me:$LINENO: result: $xsi_shell" >&5
+echo "${ECHO_T}$xsi_shell" >&6
+
+
+echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+echo "${ECHO_T}$lt_shell_append" >&6
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
if test "${lt_cv_deplibs_check_method+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3314,13 +4025,13 @@ lt_cv_deplibs_check_method='unknown'
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix*)
+aix4* | aix5*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3328,39 +4039,42 @@ beos*)
lt_cv_deplibs_check_method=pass_all
;;
-bsdi4*)
+bsdi[45]*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
- # this will be overwritten by pass_all, but leave it in just in case
- 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
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/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.*`
;;
@@ -3374,92 +4088,116 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*|hpux11*)
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
case $host_cpu in
- hppa*)
- 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
- ;;
ia64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
- 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 (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
-linux-gnu*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd* | knetbsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
fi
;;
-newsos6)
+newos6*)
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
;;
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
-sco3.2v5*)
+rdos*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
;;
-sysv5uw[78]* | sysv4*uw2*)
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
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*`
;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
@@ -3467,222 +4205,29 @@ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
- esac
-
-fi
-
-if test -n "$lt_cv_sys_max_cmd_len" ; then
- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
-
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- else
- MAGIC_CMD=:
- fi
-fi
- fi
- ;;
-esac
if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
+if test "${ac_cv_prog_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -3691,7 +4236,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -3700,27 +4245,27 @@ done
fi
fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -3729,30 +4274,43 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
+ ac_cv_prog_ac_ct_AR="ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
fi
fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- RANLIB=$ac_ct_RANLIB
+ AR=$ac_ct_AR
else
- RANLIB="$ac_cv_prog_RANLIB"
+ AR="$ac_cv_prog_AR"
fi
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
@@ -3833,96 +4391,471 @@ else
STRIP="$ac_cv_prog_STRIP"
fi
+test -z "$STRIP" && STRIP=:
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$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.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
-fi;
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- pic_mode=default
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
+else
+ echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+
fi;
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
-*-*-irix6*)
+ia64-*-hpux*)
# Find out which ABI we are using.
- echo '#line 3870 "configure"' > conftest.$ac_ext
+ echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
esac
- fi
fi
rm -rf conftest*
;;
-
-ia64-*-hpux*)
+*-*-irix6*)
# Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
+ echo '#line 4822 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
fi
rm -rf conftest*
;;
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -3930,39 +4863,45 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
esac
fi
rm -rf conftest*
@@ -3977,9 +4916,7 @@ echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
if test "${lt_cv_cc_needs_belf+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=c
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -4045,112 +4982,4551 @@ echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
CFLAGS="$SAVE_CFLAGS"
fi
;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ 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 <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ 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 <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#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);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
esac
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:5922: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:5926: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic='-qnocommon'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+
+
+
+
-# Save cache, so that ltconfig can load it
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
+# Check to make sure the PIC flag actually works.
#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
+if test -n "$lt_prog_compiler_pic"; then
+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6244: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6248: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works=yes
+ fi
+ else
+ lt_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6349: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:6353: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6404: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:6408: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ 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 <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 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'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # 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 | $GREP '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
+ aix_use_runtimelinking=no
+
+ # 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 runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # 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.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$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
+ :
+ 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'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ 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
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
+int
+main ()
{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; 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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[012])
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ ;;
+ esac
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ if test "$GCC" = yes ; then
+ if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi-module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm libconftest.dylib
+ fi
+ rm conftest.$ac_ext
+ fi
+fi
+
+ output_verbose_link_cmd=echo
+ if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
+ archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd=echo
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ 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'
+ else
+ 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'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd*)
+ 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
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ 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'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
*)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ld_shlibs=no
;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+withGCC=$GCC
+if test "$withGCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
else
- echo "not updating unwritable cache $cache_file"
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ 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.
+ 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
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # 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.
+ 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}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ if test "$host_cpu" = m68k; then
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ else
+ dynamic_linker=no
+ fi
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $withGCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
+ shlibpath_overrides_runpath=yes
fi
-rm -f confcache
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
-echo "$as_me: error: libtool configure failed" >&2;}
- { (exit 1); exit 1; }; }
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
esac
fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
+else
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_svld_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_dld_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9201 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9301 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
@@ -4165,7 +9541,8 @@ echo "$as_me: error: enable-targets option must specify target names or 'all'" >
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac
-fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+fi;
+# Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
if test "${enable_commonbfdlib+set}" = set; then
enableval="$enable_commonbfdlib"
case "${enableval}" in
@@ -4176,6 +9553,25 @@ echo "$as_me: error: bad value ${enableval} for BFD commonbfdlib option" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
fi;
+ac_checking=yes
+if grep '^RELEASE=y' ${srcdir}/../bfd/Makefile.am >/dev/null 2>/dev/null ; then
+ ac_checking=
+fi
+# Check whether --enable-checking or --disable-checking was given.
+if test "${enable_checking+set}" = set; then
+ enableval="$enable_checking"
+ case "${enableval}" in
+ no|none) ac_checking= ;;
+ *) ac_checking=yes ;;
+esac
+fi; if test x$ac_checking != x ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_CHECKING 1
+_ACEOF
+
+fi
+
using_cgen=no
@@ -4733,7 +10129,7 @@ _ACEOF
# Do we need the opcodes library?
case ${cpu_type} in
- vax | i386 | tic30)
+ vax | tic30)
;;
*)
@@ -4779,6 +10175,10 @@ _ACEOF
esac
;;
+ mep)
+ using_cgen=yes
+ ;;
+
mips)
echo ${extra_objects} | grep -s "itbl-parse.o"
if test $? -ne 0 ; then
@@ -4896,6 +10296,19 @@ if test ${all_targets} = "yes"; then
;;
esac
;;
+ x86_64)
+ case ${obj_format} in
+ aout)
+ emulations="$emulations i386coff i386elf"
+ ;;
+ coff)
+ emulations="$emulations i386aout i386elf"
+ ;;
+ elf)
+ emulations="$emulations i386aout i386coff"
+ ;;
+ esac
+ ;;
esac
fi
@@ -4903,8 +10316,7 @@ fi
# IEEE FP. On those that don't support FP at all, usually IEEE
# is emulated.
case ${target_cpu} in
- vax | tahoe ) atof=${target_cpu} ;;
- pdp11) atof=vax ;;
+ vax | pdp11 ) atof=vax ;;
*) atof=ieee ;;
esac
@@ -4960,6 +10372,11 @@ cat >>confdefs.h <<\_ACEOF
#define M88KCOFF 1
_ACEOF
;;
+ x86_64)
+cat >>confdefs.h <<\_ACEOF
+#define I386COFF 1
+_ACEOF
+ ;;
esac
;;
esac
@@ -5069,11 +10486,6 @@ cat >>confdefs.h <<\_ACEOF
#define OBJ_MAYBE_GENERIC 1
_ACEOF
;;
- ieee)
-cat >>confdefs.h <<\_ACEOF
-#define OBJ_MAYBE_IEEE 1
-_ACEOF
- ;;
som)
cat >>confdefs.h <<\_ACEOF
#define OBJ_MAYBE_SOM 1
@@ -5134,14 +10546,6 @@ yes)
;;
esac
-BFDLIB=../bfd/libbfd.la
-BFDVER_H=../bfd/bfdver.h
-ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
-
-
-
-
-
@@ -6220,2479 +11624,138 @@ if test "$LEX" = :; then
fi
ALL_LINGUAS="fr tr es rw"
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
+# If we haven't got the data from the intl directory,
+# assume NLS is disabled.
+USE_NLS=no
+LIBINTL=
+LIBINTL_DEP=
+INCINTL=
+XGETTEXT=
+GMSGFMT=
+POSUB=
+
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
+fi
+echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+if test x"$USE_NLS" != xyes; then
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
-fi
-
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- break
-fi
-
- done
- ac_cv_prog_CPP=$CPP
-
-fi
- CPP=$ac_cv_prog_CPP
-else
- ac_cv_prog_CPP=$CPP
-fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
-
- # OK, works on sane cases. Now check whether non-existent headers
- # can be detected and how.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- # Broken: success on invalid input.
-continue
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
- :
-else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_header_stdc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
-else
- 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 <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
-else
- 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 <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#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);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
-
+#define ENABLE_NLS 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS=
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
-_ACEOF
- ;;
-esac
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
-
-
-
-
-
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_off_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
-
-fi
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <alloca.h>
-int
-main ()
-{
-char *p = (char *) alloca (2 * sizeof (int));
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_working_alloca_h=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
-
-fi
-
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#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;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_alloca_works=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
-
-if test $ac_cv_func_alloca_works = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
-
-else
- # 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 <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
-
-
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
-
- break
-fi
-
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
+ fi
done
-fi
-
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-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;
-}
-
-int
-main ()
-{
- exit (find_stack_direction () < 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
+ LINGUAS="$XLINGUAS"
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
-fi
+ DATADIRNAME=share
+ INSTOBJEXT=.mo
+ GENCAT=gencat
-for ac_header in stdlib.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ CATOBJEXT=.gmo
-ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-for ac_func in getpagesize
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-echo "$as_me:$LINENO: checking for working mmap" >&5
-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !STDC_HEADERS && !HAVE_STDLIB_H
-char *malloc ();
-#endif
-
-/* This mess was copied from the GNU getpagesize.h. */
-#if !HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h. */
-# if !HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-int
-main ()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize ();
-
- /* First, make a file with some known garbage in it. */
- data = (char *) malloc (pagesize);
- if (!data)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- exit (1);
- if (write (fd, data, pagesize) != pagesize)
- exit (1);
- close (fd);
-
- /* Next, try to mmap the file at a fixed address which already has
- something else allocated at it. If we can, also make sure that
- we see the same garbage. */
- fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- exit (1);
- data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- exit (1);
- data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit (1);
-
- /* Finally, make sure that changes to the mapped area do not
- percolate back to the file as seen by read(). (This is a bug on
- some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- exit (1);
- if (read (fd, data3, pagesize) != pagesize)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit (1);
- close (fd);
- exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
-
-fi
-rm -f conftest.mmap
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
-
-for ac_func in stpcpy
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STPCPY 1
-_ACEOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <locale.h>
-int
-main ()
-{
-return LC_MESSAGES
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-am_cv_val_LC_MESSAGES=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
- fi
- fi
- echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
+ # Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
USE_NLS=$enableval
else
USE_NLS=yes
fi;
- echo "$as_me:$LINENO: result: $USE_NLS" >&5
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
echo "${ECHO_T}$USE_NLS" >&6
- USE_INCLUDED_LIBINTL=no
- if test "$USE_NLS" = "yes"; then
- echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
-echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-# Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
-else
- nls_cv_force_use_gnu_gettext=no
-fi;
- echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
-echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=
-
- if test "${ac_cv_header_libintl_h+set}" = set; then
- echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking libintl.h usability" >&5
-echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <libintl.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking libintl.h presence" >&5
-echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- ac_cpp_err=
+ PATH_SEPARATOR=:
fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_libintl_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
-
-fi
-if test $ac_cv_header_libintl_h = yes; then
- echo "$as_me:$LINENO: checking for gettext in libc" >&5
-echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-int
-main ()
-{
-return (int) gettext ("")
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- gt_cv_func_gettext_libc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-gt_cv_func_gettext_libc=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
-
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bindtextdomain ();
-int
-main ()
-{
-bindtextdomain ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_intl_bindtextdomain=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_intl_bindtextdomain=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ rm -f conf$$.sh
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
-if test $ac_cv_lib_intl_bindtextdomain = yes; then
- echo "$as_me:$LINENO: checking for gettext in libintl" >&5
-echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libintl+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
-return (int) gettext ("")
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- gt_cv_func_gettext_libintl=yes
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
+ ac_executable_p="test -f"
fi
+rm -f conf$$.file
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
-
- # Extract the first word of "msgfmt", so it can be a program name with args.
+# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8700,137 +11763,39 @@ if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
+if test "$MSGFMT" != ":"; then
echo "$as_me:$LINENO: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- if test "$MSGFMT" != "no"; then
-
-for ac_func in dcgettext
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != $ac_func;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8870,7 +11835,37 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "xgettext", so it can be a program name with args.
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8878,27 +11873,31 @@ if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
+ ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
+if test "$XGETTEXT" != ":"; then
echo "$as_me:$LINENO: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
@@ -8906,461 +11905,103 @@ else
echo "${ECHO_T}no" >&6
fi
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- CATOBJEXT=.gmo
- DATADIRNAME=share
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-CATOBJEXT=.mo
- DATADIRNAME=lib
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- INSTOBJEXT=.mo
- fi
- fi
-
-fi
-
-
+ rm -f messages.po
- if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
- # Neither gettext nor catgets in included in the C library.
- # Fall back on GNU gettext library (assuming it is present).
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
fi
-done
-done
-
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
+ rm -f conf$$.sh
fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ ac_executable_p="test -f"
fi
+rm -f conf$$.file
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
esac
fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
+ GMSGFMT=":"
fi
+ fi
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
-
-
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
+ XGETTEXT=":"
fi
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$as_me:$LINENO: result: $LINGUAS" >&5
-echo "${ECHO_T}$LINGUAS" >&6
- fi
-
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking linux/version.h usability" >&5
-echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <linux/version.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking linux/version.h presence" >&5
-echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <linux/version.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
+ rm -f messages.po
fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+ ac_config_commands="$ac_config_commands default-1"
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_linux_version_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-
-fi
-if test $ac_cv_header_linux_version_h = yes; then
- msgformat=linux
-else
- msgformat=xopen
-fi
-
-
-
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
-
- l=
-
-
- if test -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
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
@@ -9389,6 +12030,16 @@ fi
+if false; then
+ GENINSRC_NEVER_TRUE=
+ GENINSRC_NEVER_FALSE='#'
+else
+ GENINSRC_NEVER_TRUE='#'
+ GENINSRC_NEVER_FALSE=
+fi
+
+
+
@@ -10211,8 +12862,7 @@ yes)
LIBM=
case $host in
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm
- # on darwin the libm is a symbolic link to libSystem.dylib
+ # These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
echo "$as_me:$LINENO: checking for _mwvalidcheckl in -lmw" >&5
@@ -10283,9 +12933,9 @@ if test $ac_cv_lib_mw__mwvalidcheckl = yes; then
LIBM="-lmw"
fi
- echo "$as_me:$LINENO: checking for main in -lm" >&5
-echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
-if test "${ac_cv_lib_m_main+set}" = set; then
+ echo "$as_me:$LINENO: checking for cos in -lm" >&5
+echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_cos+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -10297,11 +12947,17 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char cos ();
int
main ()
{
-main ();
+cos ();
;
return 0;
}
@@ -10328,28 +12984,28 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_m_main=yes
+ ac_cv_lib_m_cos=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_m_main=no
+ac_cv_lib_m_cos=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
-echo "${ECHO_T}$ac_cv_lib_m_main" >&6
-if test $ac_cv_lib_m_main = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
+echo "${ECHO_T}$ac_cv_lib_m_cos" >&6
+if test $ac_cv_lib_m_cos = yes; then
LIBM="$LIBM -lm"
fi
;;
*)
- echo "$as_me:$LINENO: checking for main in -lm" >&5
-echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
-if test "${ac_cv_lib_m_main+set}" = set; then
+ echo "$as_me:$LINENO: checking for cos in -lm" >&5
+echo $ECHO_N "checking for cos in -lm... $ECHO_C" >&6
+if test "${ac_cv_lib_m_cos+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -10361,11 +13017,17 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char cos ();
int
main ()
{
-main ();
+cos ();
;
return 0;
}
@@ -10392,20 +13054,20 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_m_main=yes
+ ac_cv_lib_m_cos=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_m_main=no
+ac_cv_lib_m_cos=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
-echo "${ECHO_T}$ac_cv_lib_m_main" >&6
-if test $ac_cv_lib_m_main = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_m_cos" >&5
+echo "${ECHO_T}$ac_cv_lib_m_cos" >&6
+if test $ac_cv_lib_m_cos = yes; then
LIBM="-lm"
fi
@@ -10413,6 +13075,7 @@ fi
esac
+
;;
esac
@@ -11124,6 +13787,16 @@ fi
+case "${host}" in
+*-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_BINARY_FOPEN 1
+_ACEOF
+ ;;
+esac
+
+
@@ -11246,6 +13919,13 @@ echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -11680,6 +14360,254 @@ cat >>$CONFIG_STATUS <<_ACEOF
#
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
target_cpu_type=${target_cpu_type}
cgen_cpu_prefix=${cgen_cpu_prefix}
obj_format=${obj_format}
@@ -11700,6 +14628,8 @@ do
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
@@ -11837,10 +14767,22 @@ s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@SED@,$SED,;t t
+s,@EGREP@,$EGREP,;t t
+s,@FGREP@,$FGREP,;t t
+s,@GREP@,$GREP,;t t
+s,@LD@,$LD,;t t
+s,@DUMPBIN@,$DUMPBIN,;t t
+s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
+s,@NM@,$NM,;t t
s,@LN_S@,$LN_S,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LIBTOOL@,$LIBTOOL,;t t
+s,@lt_ECHO@,$lt_ECHO,;t t
+s,@CPP@,$CPP,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@GDBINIT@,$GDBINIT,;t t
@@ -11851,40 +14793,32 @@ s,@obj_format@,$obj_format,;t t
s,@te_file@,$te_file,;t t
s,@install_tooldir@,$install_tooldir,;t t
s,@atof@,$atof,;t t
-s,@BFDLIB@,$BFDLIB,;t t
s,@OPCODES_LIB@,$OPCODES_LIB,;t t
-s,@BFDVER_H@,$BFDVER_H,;t t
-s,@ALL_OBJ_DEPS@,$ALL_OBJ_DEPS,;t t
s,@YACC@,$YACC,;t t
s,@LEX@,$LEX,;t t
s,@LEXLIB@,$LEXLIB,;t t
s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@ALLOCA@,$ALLOCA,;t t
s,@USE_NLS@,$USE_NLS,;t t
-s,@MSGFMT@,$MSGFMT,;t t
-s,@GMSGFMT@,$GMSGFMT,;t t
+s,@LIBINTL@,$LIBINTL,;t t
+s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
+s,@INCINTL@,$INCINTL,;t t
s,@XGETTEXT@,$XGETTEXT,;t t
-s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@POSUB@,$POSUB,;t t
s,@CATALOGS@,$CATALOGS,;t t
-s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@DATADIRNAME@,$DATADIRNAME,;t t
-s,@GMOFILES@,$GMOFILES,;t t
s,@INSTOBJEXT@,$INSTOBJEXT,;t t
-s,@INTLDEPS@,$INTLDEPS,;t t
-s,@INTLLIBS@,$INTLLIBS,;t t
-s,@INTLOBJS@,$INTLOBJS,;t t
-s,@POFILES@,$POFILES,;t t
-s,@POSUB@,$POSUB,;t t
-s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
-s,@GT_NO@,$GT_NO,;t t
-s,@GT_YES@,$GT_YES,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-s,@l@,$l,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@MSGMERGE@,$MSGMERGE,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
+s,@GENINSRC_NEVER_TRUE@,$GENINSRC_NEVER_TRUE,;t t
+s,@GENINSRC_NEVER_FALSE@,$GENINSRC_NEVER_FALSE,;t t
+s,@ALLOCA@,$ALLOCA,;t t
s,@LIBM@,$LIBM,;t t
s,@datarootdir@,$datarootdir,;t t
s,@docdir@,$docdir,;t t
@@ -12573,6 +15507,656 @@ echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
done
done
;;
+ libtool )
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ default-1 )
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
default ) rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h
echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h
echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h
@@ -12580,9 +16164,7 @@ done
echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
if test "x$cgen_cpu_prefix" != x ; then
echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
- fi
-
- sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+ fi ;;
esac
done
_ACEOF
diff --git a/contrib/binutils/gas/configure.in b/contrib/binutils/gas/configure.in
index fe69a51..02e8e53 100644
--- a/contrib/binutils/gas/configure.in
+++ b/contrib/binutils/gas/configure.in
@@ -23,13 +23,14 @@ AM_INIT_AUTOMAKE(gas, ${BFD_VERSION})
AM_PROG_LIBTOOL
AC_ARG_ENABLE(targets,
-[ --enable-targets alternative target configurations besides the primary],
+[ --enable-targets alternative target configurations besides the primary],
[case "${enableval}" in
yes | "") AC_ERROR(enable-targets option must specify target names or 'all')
;;
no) enable_targets= ;;
*) enable_targets=$enableval ;;
esac])dnl
+
AC_ARG_ENABLE(commonbfdlib,
[ --enable-commonbfdlib build shared BFD/opcodes/libiberty library],
[case "${enableval}" in
@@ -38,6 +39,20 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
+ac_checking=yes
+if grep '^RELEASE=y' ${srcdir}/../bfd/Makefile.am >/dev/null 2>/dev/null ; then
+ ac_checking=
+fi
+AC_ARG_ENABLE(checking,
+[ --enable-checking enable run-time checks],
+[case "${enableval}" in
+ no|none) ac_checking= ;;
+ *) ac_checking=yes ;;
+esac])dnl
+if test x$ac_checking != x ; then
+ AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
+fi
+
using_cgen=no
AM_BINUTILS_WARNINGS
@@ -258,7 +273,7 @@ changequote([,])dnl
# Do we need the opcodes library?
case ${cpu_type} in
- vax | i386 | tic30)
+ vax | tic30)
;;
*)
@@ -304,18 +319,22 @@ changequote([,])dnl
esac
;;
+ mep)
+ using_cgen=yes
+ ;;
+
mips)
- echo ${extra_objects} | grep -s "itbl-parse.o"
+ echo ${extra_objects} | grep -s "itbl-parse.o"
if test $? -ne 0 ; then
extra_objects="$extra_objects itbl-parse.o"
fi
- echo ${extra_objects} | grep -s "itbl-lex.o"
+ echo ${extra_objects} | grep -s "itbl-lex.o"
if test $? -ne 0 ; then
extra_objects="$extra_objects itbl-lex.o"
fi
- echo ${extra_objects} | grep -s "itbl-ops.o"
+ echo ${extra_objects} | grep -s "itbl-ops.o"
if test $? -ne 0 ; then
extra_objects="$extra_objects itbl-ops.o"
fi
@@ -417,6 +436,19 @@ if test ${all_targets} = "yes"; then
;;
esac
;;
+ x86_64)
+ case ${obj_format} in
+ aout)
+ emulations="$emulations i386coff i386elf"
+ ;;
+ coff)
+ emulations="$emulations i386aout i386elf"
+ ;;
+ elf)
+ emulations="$emulations i386aout i386coff"
+ ;;
+ esac
+ ;;
esac
fi
@@ -424,8 +456,7 @@ fi
# IEEE FP. On those that don't support FP at all, usually IEEE
# is emulated.
case ${target_cpu} in
- vax | tahoe ) atof=${target_cpu} ;;
- pdp11) atof=vax ;;
+ vax | pdp11 ) atof=vax ;;
*) atof=ieee ;;
esac
@@ -462,6 +493,7 @@ case ${obj_format} in
i386) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
m68k) AC_DEFINE(M68KCOFF, 1, [Using m68k COFF?]) ;;
m88k) AC_DEFINE(M88KCOFF, 1, [Using m88k COFF?]) ;;
+ x86_64) AC_DEFINE(I386COFF, 1, [Using i386 COFF?]) ;;
esac
;;
esac
@@ -511,7 +543,6 @@ if test `set . $formats ; shift ; echo $#` -gt 1 ; then
ecoff) AC_DEFINE(OBJ_MAYBE_ECOFF, 1, [ECOFF support?]) ;;
elf) AC_DEFINE(OBJ_MAYBE_ELF, 1, [ELF support?]) ;;
generic) AC_DEFINE(OBJ_MAYBE_GENERIC, 1, [generic support?]) ;;
- ieee) AC_DEFINE(OBJ_MAYBE_IEEE, 1, [IEEE support?]) ;;
som) AC_DEFINE(OBJ_MAYBE_SOM, 1, [SOM support?]) ;;
esac
extra_objects="$extra_objects obj-$fmt.o"
@@ -556,16 +587,8 @@ yes)
;;
esac
-BFDLIB=../bfd/libbfd.la
-BFDVER_H=../bfd/bfdver.h
-ALL_OBJ_DEPS="$ALL_OBJ_DEPS"' ../bfd/bfd.h $(INCDIR)/symcat.h'
-
-AC_SUBST(BFDLIB)
AC_SUBST(OPCODES_LIB)
-AC_SUBST(BFDVER_H)
-AC_SUBST(ALL_OBJ_DEPS)
-
AC_DEFINE_UNQUOTED(TARGET_ALIAS, "${target_alias}", [Target alias.])
AC_DEFINE_UNQUOTED(TARGET_CANONICAL, "${target}", [Canonical target.])
AC_DEFINE_UNQUOTED(TARGET_CPU, "${target_cpu}", [Target CPU.])
@@ -578,9 +601,11 @@ AC_PROG_YACC
AM_PROG_LEX
ALL_LINGUAS="fr tr es rw"
-CY_GNU_GETTEXT
+ZW_GNU_GETTEXT_SISTER_DIR
+AM_PO_SUBDIRS
AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
AC_EXEEXT
AC_CHECK_HEADERS(string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h)
@@ -609,7 +634,7 @@ AC_CHECK_FUNCS(sbrk)
# do we need the math library?
case "${need_libm}" in
-yes)
+yes)
AC_CHECK_LIBM
AC_SUBST(LIBM)
;;
@@ -669,6 +694,8 @@ GAS_CHECK_DECL_NEEDED(strstr, f, char *(*f)(), $gas_test_headers)
AC_CHECK_DECLS([vsnprintf])
+BFD_BINARY_FOPEN
+
dnl Required for html and install-html targets.
AC_SUBST(datarootdir)
AC_SUBST(docdir)
@@ -691,9 +718,7 @@ AC_CONFIG_COMMANDS([default],
echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h
if test "x$cgen_cpu_prefix" != x ; then
echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h
- fi
-
- sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile],
+ fi],
[target_cpu_type=${target_cpu_type}
cgen_cpu_prefix=${cgen_cpu_prefix}
obj_format=${obj_format}
diff --git a/contrib/binutils/gas/debug.c b/contrib/binutils/gas/debug.c
index fe2ed8c..3218fff 100644
--- a/contrib/binutils/gas/debug.c
+++ b/contrib/binutils/gas/debug.c
@@ -1,5 +1,5 @@
/* This file is debug.c
- Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000
+ Copyright 1987, 1988, 1989, 1990, 1991, 1992, 2000, 2006
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -25,26 +25,28 @@
dmp_frags ()
{
+ asection *s;
frchainS *chp;
char *p;
- for (chp = frchain_root; chp; chp = chp->frch_next)
- {
- switch (chp->frch_seg)
- {
- case SEG_DATA:
- p = "Data";
- break;
- case SEG_TEXT:
- p = "Text";
- break;
- default:
- p = "???";
- break;
- }
- printf ("\nSEGMENT %s %d\n", p, chp->frch_subseg);
- dmp_frag (chp->frch_root, "\t");
- }
+ for (s = stdoutput->sections; s; s = s->next)
+ for (chp = seg_info (s)->frchainP; chp; chp = chp->frch_next)
+ {
+ switch (s)
+ {
+ case SEG_DATA:
+ p = "Data";
+ break;
+ case SEG_TEXT:
+ p = "Text";
+ break;
+ default:
+ p = "???";
+ break;
+ }
+ printf ("\nSEGMENT %s %d\n", p, chp->frch_subseg);
+ dmp_frag (chp->frch_root, "\t");
+ }
}
dmp_frag (fp, indent)
diff --git a/contrib/binutils/gas/dep-in.sed b/contrib/binutils/gas/dep-in.sed
index f23c201..d81c460 100644
--- a/contrib/binutils/gas/dep-in.sed
+++ b/contrib/binutils/gas/dep-in.sed
@@ -12,14 +12,13 @@ s!@SRCDIR@/config!$(srcdir)/config!g
s!@SRCDIR@/\.\./opcodes!$(srcdir)/../opcodes!g
s!@TOPDIR@/opcodes!$(srcdir)/../opcodes!g
s!@SRCDIR@/!!g
-s!\.\./bfd/bfdver\.h!$(BFDVER_H)!g
s! \$(srcdir)/config/te-generic\.h!!g
-s! \.\./bfd/bfd\.h!!g
s! itbl-cpu\.h!!g
s! itbl-parse\.h!!g
s! \.\./intl/libintl\.h!!g
-s! \$(INCDIR)/bin-bugs\.h!!g
+s! \.\./bfd/bfd\.h!!g
+s! \$(INCDIR)/symcat\.h!!g
s! \$(INCDIR)/ansidecl\.h!!g
s! \$(INCDIR)/libiberty\.h!!g
s! \$(INCDIR)/progress\.h!!g
diff --git a/contrib/binutils/gas/doc/Makefile.am b/contrib/binutils/gas/doc/Makefile.am
index d48a9cc..4f6ff92 100644
--- a/contrib/binutils/gas/doc/Makefile.am
+++ b/contrib/binutils/gas/doc/Makefile.am
@@ -16,9 +16,12 @@ POD2MAN = pod2man --center="GNU Development Tools" \
man_MANS = as.1
info_TEXINFOS = as.texinfo
+as_TEXINFOS = asconfig.texi $(CPU_DOCS)
-AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
-TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
+AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+ -I ../../bfd/doc
+TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+ -I ../../bfd/doc
asconfig.texi: $(CONFIG).texi
rm -f asconfig.texi
@@ -29,7 +32,9 @@ CPU_DOCS = \
c-alpha.texi \
c-arc.texi \
c-arm.texi \
+ c-avr.texi \
c-bfin.texi \
+ c-cr16.texi \
c-d10v.texi \
c-cris.texi \
c-h8300.texi \
@@ -61,13 +66,6 @@ CPU_DOCS = \
c-z80.texi \
c-z8k.texi
-gasver.texi: $(srcdir)/../../bfd/configure
- rm -f $@
- eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
- echo "@set VERSION $$VERSION" > $@
-
-$(srcdir)/as.info as.dvi as.html: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
-
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install-data-local: install-info
@@ -97,7 +95,7 @@ install-html-am: $(HTMLS)
noinst_TEXINFOS = internals.texi
-MAINTAINERCLEANFILES = asconfig.texi gasver.texi
+MAINTAINERCLEANFILES = asconfig.texi
BASEDIR = $(srcdir)/../..
BFDDIR = $(BASEDIR)/bfd
@@ -112,7 +110,7 @@ info-local: $(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 asconfig.texi gasver.texi $(CPU_DOCS)
+as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
-($(POD2MAN) as.pod | \
@@ -120,3 +118,12 @@ as.1: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
mv -f $@.T$$$$ $@) || \
(rm -f $@.T$$$$ && exit 1)
rm -f as.pod
+
+MAINTAINERCLEANFILES += as.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES = as.info
+endif
diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in
index cd9dad2..86f3d7a 100644
--- a/contrib/binutils/gas/doc/Makefile.in
+++ b/contrib/binutils/gas/doc/Makefile.in
@@ -37,11 +37,19 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
subdir = doc
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(as_TEXINFOS)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
+ $(top_srcdir)/../bfd/warning.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
@@ -50,7 +58,7 @@ CONFIG_CLEAN_FILES =
depcomp =
am__depfiles_maybe =
SOURCES =
-INFO_DEPS = $(srcdir)/as.info
+INFO_DEPS = as.info
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
DVIS = as.dvi
@@ -68,16 +76,14 @@ NROFF = nroff
MANS = $(man_MANS)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-ALL_OBJ_DEPS = @ALL_OBJ_DEPS@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BFDLIB = @BFDLIB@
-BFDVER_H = @BFDVER_H@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
@@ -89,29 +95,32 @@ CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
+FGREP = @FGREP@
GDBINIT = @GDBINIT@
-GMOFILES = @GMOFILES@
+GENCAT = @GENCAT@
+GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
+GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+GREP = @GREP@
+INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
LIBM = @LIBM@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
@@ -124,6 +133,8 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
OPCODES_LIB = @OPCODES_LIB@
@@ -134,19 +145,20 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
YACC = @YACC@
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
@@ -179,10 +191,10 @@ includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
install_tooldir = @install_tooldir@
-l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
obj_format = @obj_format@
@@ -212,13 +224,20 @@ POD2MAN = pod2man --center="GNU Development Tools" \
man_MANS = as.1
info_TEXINFOS = as.texinfo
-AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
-TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty"
+as_TEXINFOS = asconfig.texi $(CPU_DOCS)
+AM_MAKEINFOFLAGS = -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+ -I ../../bfd/doc
+
+TEXI2DVI = texi2dvi -I "$(srcdir)" -I "$(top_srcdir)/../libiberty" \
+ -I ../../bfd/doc
+
CPU_DOCS = \
c-alpha.texi \
c-arc.texi \
c-arm.texi \
+ c-avr.texi \
c-bfin.texi \
+ c-cr16.texi \
c-d10v.texi \
c-cris.texi \
c-h8300.texi \
@@ -254,14 +273,19 @@ html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
# This one isn't ready for prime time yet. Not even a little bit.
noinst_TEXINFOS = internals.texi
-MAINTAINERCLEANFILES = asconfig.texi gasver.texi
+MAINTAINERCLEANFILES = asconfig.texi as.info
BASEDIR = $(srcdir)/../..
BFDDIR = $(BASEDIR)/bfd
CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+@GENINSRC_NEVER_TRUE@DISTCLEANFILES = as.info
all: all-am
.SUFFIXES:
-.SUFFIXES: .dvi .html .info .pdf .ps .texinfo
+.SUFFIXES: .dvi .ps
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -271,9 +295,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus doc/Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign doc/Makefile
+ $(AUTOMAKE) --cygnus doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -301,42 +325,38 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
-.texinfo.info:
+as.info: as.texinfo $(as_TEXINFOS)
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
- am__cwd=`pwd` && cd $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
- cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $@ $<; \
+ -o $@ `test -f 'as.texinfo' || echo '$(srcdir)/'`as.texinfo; \
then \
rc=0; \
- cd $(srcdir); \
else \
rc=$$?; \
- cd $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
-.texinfo.dvi:
+as.dvi: as.texinfo $(as_TEXINFOS)
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $<
+ $(TEXI2DVI) -o $@ `test -f 'as.texinfo' || echo '$(srcdir)/'`as.texinfo
-.texinfo.pdf:
+as.pdf: as.texinfo $(as_TEXINFOS)
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $<
+ $(TEXI2PDF) -o $@ `test -f 'as.texinfo' || echo '$(srcdir)/'`as.texinfo
-.texinfo.html:
+as.html: as.texinfo $(as_TEXINFOS)
rm -rf $(@:.html=.htp)
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $(@:.html=.htp) $<; \
+ -o $(@:.html=.htp) `test -f 'as.texinfo' || echo '$(srcdir)/'`as.texinfo; \
then \
rm -rf $@; \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
@@ -346,10 +366,6 @@ distclean-libtool:
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
-$(srcdir)/as.info: as.texinfo
-as.dvi: as.texinfo
-as.pdf: as.texinfo
-as.html: as.texinfo
.dvi.ps:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $<
@@ -481,6 +497,7 @@ clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -586,13 +603,6 @@ asconfig.texi: $(CONFIG).texi
cp $(srcdir)/$(CONFIG).texi ./asconfig.texi
chmod u+w ./asconfig.texi
-gasver.texi: $(srcdir)/../../bfd/configure
- rm -f $@
- eval `grep '^ *VERSION=' $(srcdir)/../../bfd/configure`; \
- echo "@set VERSION $$VERSION" > $@
-
-$(srcdir)/as.info as.dvi as.html: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
-
# We want install to imply install-info as per GNU standards, despite the
# cygnus option.
install-data-local: install-info
@@ -624,7 +634,7 @@ info-local: $(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 asconfig.texi gasver.texi $(CPU_DOCS)
+as.1: $(srcdir)/as.texinfo asconfig.texi $(CPU_DOCS)
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
-($(POD2MAN) as.pod | \
diff --git a/contrib/binutils/gas/doc/all.texi b/contrib/binutils/gas/doc/all.texi
index 5192f54..b4778bf 100644
--- a/contrib/binutils/gas/doc/all.texi
+++ b/contrib/binutils/gas/doc/all.texi
@@ -29,7 +29,9 @@
@set ALPHA
@set ARC
@set ARM
+@set AVR
@set BFIN
+@set CR16
@set CRIS
@set D10V
@set D30V
@@ -63,7 +65,7 @@
@set Z80
@set Z8000
-@c Does this version of the assembler use the difference-table kluge?
+@c Does this version of the assembler use the difference-table kludge?
@set DIFF-TBL-KLUGE
@c Do all machines described use IEEE floating point?
diff --git a/contrib/binutils/gas/doc/as.1 b/contrib/binutils/gas/doc/as.1
deleted file mode 100644
index 89e3b4c..0000000
--- a/contrib/binutils/gas/doc/as.1
+++ /dev/null
@@ -1,1109 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "AS 1"
-.TH AS 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-AS \- the portable GNU assembler.
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-as [\fB\-a\fR[\fBcdhlns\fR][=\fIfile\fR]] [\fB\-\-alternate\fR] [\fB\-D\fR]
- [\fB\-\-defsym\fR \fIsym\fR=\fIval\fR] [\fB\-f\fR] [\fB\-g\fR] [\fB\-\-gstabs\fR]
- [\fB\-\-gstabs+\fR] [\fB\-\-gdwarf\-2\fR] [\fB\-\-help\fR] [\fB\-I\fR \fIdir\fR] [\fB\-J\fR]
- [\fB\-K\fR] [\fB\-L\fR] [\fB\-\-listing\-lhs\-width\fR=\fI\s-1NUM\s0\fR]
- [\fB\-\-listing\-lhs\-width2\fR=\fI\s-1NUM\s0\fR] [\fB\-\-listing\-rhs\-width\fR=\fI\s-1NUM\s0\fR]
- [\fB\-\-listing\-cont\-lines\fR=\fI\s-1NUM\s0\fR] [\fB\-\-keep\-locals\fR] [\fB\-o\fR
- \fIobjfile\fR] [\fB\-R\fR] [\fB\-\-reduce\-memory\-overheads\fR] [\fB\-\-statistics\fR]
- [\fB\-v\fR] [\fB\-version\fR] [\fB\-\-version\fR] [\fB\-W\fR] [\fB\-\-warn\fR]
- [\fB\-\-fatal\-warnings\fR] [\fB\-w\fR] [\fB\-x\fR] [\fB\-Z\fR] [\fB@\fR\fI\s-1FILE\s0\fR]
- [\fB\-\-target\-help\fR] [\fItarget-options\fR]
- [\fB\-\-\fR|\fIfiles\fR ...]
-.PP
-\&\fITarget Alpha options:\fR
- [\fB\-m\fR\fIcpu\fR]
- [\fB\-mdebug\fR | \fB\-no\-mdebug\fR]
- [\fB\-relax\fR] [\fB\-g\fR] [\fB\-G\fR\fIsize\fR]
- [\fB\-F\fR] [\fB\-32addr\fR]
-.PP
-\&\fITarget \s-1ARC\s0 options:\fR
- [\fB\-marc[5|6|7|8]\fR]
- [\fB\-EB\fR|\fB\-EL\fR]
-.PP
-\&\fITarget \s-1ARM\s0 options:\fR
- [\fB\-mcpu\fR=\fIprocessor\fR[+\fIextension\fR...]]
- [\fB\-march\fR=\fIarchitecture\fR[+\fIextension\fR...]]
- [\fB\-mfpu\fR=\fIfloating-point-format\fR]
- [\fB\-mfloat\-abi\fR=\fIabi\fR]
- [\fB\-meabi\fR=\fIver\fR]
- [\fB\-mthumb\fR]
- [\fB\-EB\fR|\fB\-EL\fR]
- [\fB\-mapcs\-32\fR|\fB\-mapcs\-26\fR|\fB\-mapcs\-float\fR|
- \fB\-mapcs\-reentrant\fR]
- [\fB\-mthumb\-interwork\fR] [\fB\-k\fR]
-.PP
-\&\fITarget \s-1CRIS\s0 options:\fR
- [\fB\-\-underscore\fR | \fB\-\-no\-underscore\fR]
- [\fB\-\-pic\fR] [\fB\-N\fR]
- [\fB\-\-emulation=criself\fR | \fB\-\-emulation=crisaout\fR]
- [\fB\-\-march=v0_v10\fR | \fB\-\-march=v10\fR | \fB\-\-march=v32\fR | \fB\-\-march=common_v10_v32\fR]
-.PP
-\&\fITarget D10V options:\fR
- [\fB\-O\fR]
-.PP
-\&\fITarget D30V options:\fR
- [\fB\-O\fR|\fB\-n\fR|\fB\-N\fR]
-.PP
-\&\fITarget i386 options:\fR
- [\fB\-\-32\fR|\fB\-\-64\fR] [\fB\-n\fR]
-.PP
-\&\fITarget i960 options:\fR
- [\fB\-ACA\fR|\fB\-ACA_A\fR|\fB\-ACB\fR|\fB\-ACC\fR|\fB\-AKA\fR|\fB\-AKB\fR|
- \fB\-AKC\fR|\fB\-AMC\fR]
- [\fB\-b\fR] [\fB\-no\-relax\fR]
-.PP
-\&\fITarget \s-1IA\-64\s0 options:\fR
- [\fB\-mconstant\-gp\fR|\fB\-mauto\-pic\fR]
- [\fB\-milp32\fR|\fB\-milp64\fR|\fB\-mlp64\fR|\fB\-mp64\fR]
- [\fB\-mle\fR|\fBmbe\fR]
- [\fB\-mtune=itanium1\fR|\fB\-mtune=itanium2\fR]
- [\fB\-munwind\-check=warning\fR|\fB\-munwind\-check=error\fR]
- [\fB\-mhint.b=ok\fR|\fB\-mhint.b=warning\fR|\fB\-mhint.b=error\fR]
- [\fB\-x\fR|\fB\-xexplicit\fR] [\fB\-xauto\fR] [\fB\-xdebug\fR]
-.PP
-\&\fITarget \s-1IP2K\s0 options:\fR
- [\fB\-mip2022\fR|\fB\-mip2022ext\fR]
-.PP
-\&\fITarget M32C options:\fR
- [\fB\-m32c\fR|\fB\-m16c\fR]
-.PP
-\&\fITarget M32R options:\fR
- [\fB\-\-m32rx\fR|\fB\-\-[no\-]warn\-explicit\-parallel\-conflicts\fR|
- \fB\-\-W[n]p\fR]
-.PP
-\&\fITarget M680X0 options:\fR
- [\fB\-l\fR] [\fB\-m68000\fR|\fB\-m68010\fR|\fB\-m68020\fR|...]
-.PP
-\&\fITarget M68HC11 options:\fR
- [\fB\-m68hc11\fR|\fB\-m68hc12\fR|\fB\-m68hcs12\fR]
- [\fB\-mshort\fR|\fB\-mlong\fR]
- [\fB\-mshort\-double\fR|\fB\-mlong\-double\fR]
- [\fB\-\-force\-long\-branchs\fR] [\fB\-\-short\-branchs\fR]
- [\fB\-\-strict\-direct\-mode\fR] [\fB\-\-print\-insn\-syntax\fR]
- [\fB\-\-print\-opcodes\fR] [\fB\-\-generate\-example\fR]
-.PP
-\&\fITarget \s-1MCORE\s0 options:\fR
- [\fB\-jsri2bsr\fR] [\fB\-sifilter\fR] [\fB\-relax\fR]
- [\fB\-mcpu=[210|340]\fR]
-.PP
-\&\fITarget \s-1MIPS\s0 options:\fR
- [\fB\-nocpp\fR] [\fB\-EL\fR] [\fB\-EB\fR] [\fB\-O\fR[\fIoptimization level\fR]]
- [\fB\-g\fR[\fIdebug level\fR]] [\fB\-G\fR \fInum\fR] [\fB\-KPIC\fR] [\fB\-call_shared\fR]
- [\fB\-non_shared\fR] [\fB\-xgot\fR]
- [\fB\-mabi\fR=\fI\s-1ABI\s0\fR] [\fB\-32\fR] [\fB\-n32\fR] [\fB\-64\fR] [\fB\-mfp32\fR] [\fB\-mgp32\fR]
- [\fB\-march\fR=\fI\s-1CPU\s0\fR] [\fB\-mtune\fR=\fI\s-1CPU\s0\fR] [\fB\-mips1\fR] [\fB\-mips2\fR]
- [\fB\-mips3\fR] [\fB\-mips4\fR] [\fB\-mips5\fR] [\fB\-mips32\fR] [\fB\-mips32r2\fR]
- [\fB\-mips64\fR] [\fB\-mips64r2\fR]
- [\fB\-construct\-floats\fR] [\fB\-no\-construct\-floats\fR]
- [\fB\-trap\fR] [\fB\-no\-break\fR] [\fB\-break\fR] [\fB\-no\-trap\fR]
- [\fB\-mfix7000\fR] [\fB\-mno\-fix7000\fR]
- [\fB\-mips16\fR] [\fB\-no\-mips16\fR]
- [\fB\-mips3d\fR] [\fB\-no\-mips3d\fR]
- [\fB\-mdmx\fR] [\fB\-no\-mdmx\fR]
- [\fB\-mdsp\fR] [\fB\-mno\-dsp\fR]
- [\fB\-mmt\fR] [\fB\-mno\-mt\fR]
- [\fB\-mdebug\fR] [\fB\-no\-mdebug\fR]
- [\fB\-mpdr\fR] [\fB\-mno\-pdr\fR]
-.PP
-\&\fITarget \s-1MMIX\s0 options:\fR
- [\fB\-\-fixed\-special\-register\-names\fR] [\fB\-\-globalize\-symbols\fR]
- [\fB\-\-gnu\-syntax\fR] [\fB\-\-relax\fR] [\fB\-\-no\-predefined\-symbols\fR]
- [\fB\-\-no\-expand\fR] [\fB\-\-no\-merge\-gregs\fR] [\fB\-x\fR]
- [\fB\-\-linker\-allocated\-gregs\fR]
-.PP
-\&\fITarget \s-1PDP11\s0 options:\fR
- [\fB\-mpic\fR|\fB\-mno\-pic\fR] [\fB\-mall\fR] [\fB\-mno\-extensions\fR]
- [\fB\-m\fR\fIextension\fR|\fB\-mno\-\fR\fIextension\fR]
- [\fB\-m\fR\fIcpu\fR] [\fB\-m\fR\fImachine\fR]
-.PP
-\&\fITarget picoJava options:\fR
- [\fB\-mb\fR|\fB\-me\fR]
-.PP
-\&\fITarget PowerPC options:\fR
- [\fB\-mpwrx\fR|\fB\-mpwr2\fR|\fB\-mpwr\fR|\fB\-m601\fR|\fB\-mppc\fR|\fB\-mppc32\fR|\fB\-m603\fR|\fB\-m604\fR|
- \fB\-m403\fR|\fB\-m405\fR|\fB\-mppc64\fR|\fB\-m620\fR|\fB\-mppc64bridge\fR|\fB\-mbooke\fR|
- \fB\-mbooke32\fR|\fB\-mbooke64\fR]
- [\fB\-mcom\fR|\fB\-many\fR|\fB\-maltivec\fR] [\fB\-memb\fR]
- [\fB\-mregnames\fR|\fB\-mno\-regnames\fR]
- [\fB\-mrelocatable\fR|\fB\-mrelocatable\-lib\fR]
- [\fB\-mlittle\fR|\fB\-mlittle\-endian\fR|\fB\-mbig\fR|\fB\-mbig\-endian\fR]
- [\fB\-msolaris\fR|\fB\-mno\-solaris\fR]
-.PP
-\&\fITarget \s-1SPARC\s0 options:\fR
- [\fB\-Av6\fR|\fB\-Av7\fR|\fB\-Av8\fR|\fB\-Asparclet\fR|\fB\-Asparclite\fR
- \fB\-Av8plus\fR|\fB\-Av8plusa\fR|\fB\-Av9\fR|\fB\-Av9a\fR]
- [\fB\-xarch=v8plus\fR|\fB\-xarch=v8plusa\fR] [\fB\-bump\fR]
- [\fB\-32\fR|\fB\-64\fR]
-.PP
-\&\fITarget \s-1TIC54X\s0 options:\fR
- [\fB\-mcpu=54[123589]\fR|\fB\-mcpu=54[56]lp\fR] [\fB\-mfar\-mode\fR|\fB\-mf\fR]
- [\fB\-merrors\-to\-file\fR \fI<filename>\fR|\fB\-me\fR \fI<filename>\fR]
-.PP
-\&\fITarget Z80 options:\fR
- [\fB\-z80\fR] [\fB\-r800\fR]
- [ \fB\-ignore\-undocumented\-instructions\fR] [\fB\-Wnud\fR]
- [ \fB\-ignore\-unportable\-instructions\fR] [\fB\-Wnup\fR]
- [ \fB\-warn\-undocumented\-instructions\fR] [\fB\-Wud\fR]
- [ \fB\-warn\-unportable\-instructions\fR] [\fB\-Wup\fR]
- [ \fB\-forbid\-undocumented\-instructions\fR] [\fB\-Fud\fR]
- [ \fB\-forbid\-unportable\-instructions\fR] [\fB\-Fup\fR]
-.PP
-\&\fITarget Xtensa options:\fR
- [\fB\-\-[no\-]text\-section\-literals\fR] [\fB\-\-[no\-]absolute\-literals\fR]
- [\fB\-\-[no\-]target\-align\fR] [\fB\-\-[no\-]longcalls\fR]
- [\fB\-\-[no\-]transform\fR]
- [\fB\-\-rename\-section\fR \fIoldname\fR=\fInewname\fR]
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\s-1GNU\s0 \fBas\fR is really a family of assemblers.
-If you use (or have used) the \s-1GNU\s0 assembler on one architecture, you
-should find a fairly similar environment when you use it on another
-architecture. Each version has much in common with the others,
-including object file formats, most assembler directives (often called
-\&\fIpseudo-ops\fR) and assembler syntax.
-.PP
-\&\fBas\fR is primarily intended to assemble the output of the
-\&\s-1GNU\s0 C compiler \f(CW\*(C`gcc\*(C'\fR for use by the linker
-\&\f(CW\*(C`ld\*(C'\fR. Nevertheless, we've tried to make \fBas\fR
-assemble correctly everything that other assemblers for the same
-machine would assemble.
-Any exceptions are documented explicitly.
-This doesn't mean \fBas\fR 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.
-.PP
-Each time you run \fBas\fR it assembles exactly one source
-program. The source program is made up of one or more files.
-(The standard input is also a file.)
-.PP
-You give \fBas\fR 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.
-.PP
-If you give \fBas\fR no file names it attempts to read one input file
-from the \fBas\fR standard input, which is normally your terminal. You
-may have to type \fBctl-D\fR to tell \fBas\fR there is no more program
-to assemble.
-.PP
-Use \fB\-\-\fR if you need to explicitly name the standard input file
-in your command line.
-.PP
-If the source is empty, \fBas\fR produces a small, empty object
-file.
-.PP
-\&\fBas\fR may write warnings and error messages to the standard error
-file (usually your terminal). This should not happen when a compiler
-runs \fBas\fR automatically. Warnings report an assumption made so
-that \fBas\fR could keep assembling a flawed program; errors report a
-grave problem that stops the assembly.
-.PP
-If you are invoking \fBas\fR via the \s-1GNU\s0 C compiler,
-you can use the \fB\-Wa\fR option to pass arguments through to the assembler.
-The assembler arguments must be separated from each other (and the \fB\-Wa\fR)
-by commas. For example:
-.PP
-.Vb 1
-\& gcc \-c \-g \-O \-Wa,\-alh,\-L file.c
-.Ve
-.PP
-This passes two options to the assembler: \fB\-alh\fR (emit a listing to
-standard output with high-level and assembly source) and \fB\-L\fR (retain
-local symbols in the symbol table).
-.PP
-Usually you do not need to use this \fB\-Wa\fR mechanism, since many compiler
-command-line options are automatically passed to the assembler by the compiler.
-(You can call the \s-1GNU\s0 compiler driver with the \fB\-v\fR option to see
-precisely what options it passes to each compilation pass, including the
-assembler.)
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.IP "\fB\-a[cdhlmns]\fR" 4
-.IX Item "-a[cdhlmns]"
-Turn on listings, in any of a variety of ways:
-.RS 4
-.IP "\fB\-ac\fR" 4
-.IX Item "-ac"
-omit false conditionals
-.IP "\fB\-ad\fR" 4
-.IX Item "-ad"
-omit debugging directives
-.IP "\fB\-ah\fR" 4
-.IX Item "-ah"
-include high-level source
-.IP "\fB\-al\fR" 4
-.IX Item "-al"
-include assembly
-.IP "\fB\-am\fR" 4
-.IX Item "-am"
-include macro expansions
-.IP "\fB\-an\fR" 4
-.IX Item "-an"
-omit forms processing
-.IP "\fB\-as\fR" 4
-.IX Item "-as"
-include symbols
-.IP "\fB=file\fR" 4
-.IX Item "=file"
-set the name of the listing file
-.RE
-.RS 4
-.Sp
-You may combine these options; for example, use \fB\-aln\fR for assembly
-listing without forms processing. The \fB=file\fR option, if used, must be
-the last one. By itself, \fB\-a\fR defaults to \fB\-ahls\fR.
-.RE
-.IP "\fB\-\-alternate\fR" 4
-.IX Item "--alternate"
-Begin in alternate macro mode, see \fBAltmacro,,\f(CB\*(C`.altmacro\*(C'\fB\fR.
-.IP "\fB\-D\fR" 4
-.IX Item "-D"
-Ignored. This option is accepted for script compatibility with calls to
-other assemblers.
-.IP "\fB\-\-defsym\fR \fIsym\fR\fB=\fR\fIvalue\fR" 4
-.IX Item "--defsym sym=value"
-Define the symbol \fIsym\fR to be \fIvalue\fR before assembling the input file.
-\&\fIvalue\fR must be an integer constant. As in C, a leading \fB0x\fR
-indicates a hexadecimal value, and a leading \fB0\fR indicates an octal value.
-.IP "\fB\-f\fR" 4
-.IX Item "-f"
-\&\*(L"fast\*(R"\-\-\-skip whitespace and comment preprocessing (assume source is
-compiler output).
-.IP "\fB\-g\fR" 4
-.IX Item "-g"
-.PD 0
-.IP "\fB\-\-gen\-debug\fR" 4
-.IX Item "--gen-debug"
-.PD
-Generate debugging information for each assembler source line using whichever
-debug format is preferred by the target. This currently means either \s-1STABS\s0,
-\&\s-1ECOFF\s0 or \s-1DWARF2\s0.
-.IP "\fB\-\-gstabs\fR" 4
-.IX Item "--gstabs"
-Generate stabs debugging information for each assembler line. This
-may help debugging assembler code, if the debugger can handle it.
-.IP "\fB\-\-gstabs+\fR" 4
-.IX Item "--gstabs+"
-Generate stabs debugging information for each assembler line, with \s-1GNU\s0
-extensions that probably only gdb can handle, and that could make other
-debuggers crash or refuse to read your program. This
-may help debugging assembler code. Currently the only \s-1GNU\s0 extension is
-the location of the current working directory at assembling time.
-.IP "\fB\-\-gdwarf\-2\fR" 4
-.IX Item "--gdwarf-2"
-Generate \s-1DWARF2\s0 debugging information for each assembler line. This
-may help debugging assembler code, if the debugger can handle it. Note\-\-\-this
-option is only supported by some targets, not all of them.
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Print a summary of the command line options and exit.
-.IP "\fB\-\-target\-help\fR" 4
-.IX Item "--target-help"
-Print a summary of all target specific options and exit.
-.IP "\fB\-I\fR \fIdir\fR" 4
-.IX Item "-I dir"
-Add directory \fIdir\fR to the search list for \f(CW\*(C`.include\*(C'\fR directives.
-.IP "\fB\-J\fR" 4
-.IX Item "-J"
-Don't warn about signed overflow.
-.IP "\fB\-K\fR" 4
-.IX Item "-K"
-Issue warnings when difference tables altered for long displacements.
-.IP "\fB\-L\fR" 4
-.IX Item "-L"
-.PD 0
-.IP "\fB\-\-keep\-locals\fR" 4
-.IX Item "--keep-locals"
-.PD
-Keep (in the symbol table) local symbols. On traditional a.out systems
-these start with \fBL\fR, but different systems have different local
-label prefixes.
-.IP "\fB\-\-listing\-lhs\-width=\fR\fInumber\fR" 4
-.IX Item "--listing-lhs-width=number"
-Set the maximum width, in words, of the output data column for an assembler
-listing to \fInumber\fR.
-.IP "\fB\-\-listing\-lhs\-width2=\fR\fInumber\fR" 4
-.IX Item "--listing-lhs-width2=number"
-Set the maximum width, in words, of the output data column for continuation
-lines in an assembler listing to \fInumber\fR.
-.IP "\fB\-\-listing\-rhs\-width=\fR\fInumber\fR" 4
-.IX Item "--listing-rhs-width=number"
-Set the maximum width of an input source line, as displayed in a listing, to
-\&\fInumber\fR bytes.
-.IP "\fB\-\-listing\-cont\-lines=\fR\fInumber\fR" 4
-.IX Item "--listing-cont-lines=number"
-Set the maximum number of lines printed in a listing for a single line of input
-to \fInumber\fR + 1.
-.IP "\fB\-o\fR \fIobjfile\fR" 4
-.IX Item "-o objfile"
-Name the object-file output from \fBas\fR \fIobjfile\fR.
-.IP "\fB\-R\fR" 4
-.IX Item "-R"
-Fold the data section into the text section.
-.Sp
-Set the default size of \s-1GAS\s0's hash tables to a prime number close to
-\&\fInumber\fR. Increasing this value can reduce the length of time it takes the
-assembler to perform its tasks, at the expense of increasing the assembler's
-memory requirements. Similarly reducing this value can reduce the memory
-requirements at the expense of speed.
-.IP "\fB\-\-reduce\-memory\-overheads\fR" 4
-.IX Item "--reduce-memory-overheads"
-This option reduces \s-1GAS\s0's memory requirements, at the expense of making the
-assembly processes slower. Currently this switch is a synonym for
-\&\fB\-\-hash\-size=4051\fR, but in the future it may have other effects as well.
-.IP "\fB\-\-statistics\fR" 4
-.IX Item "--statistics"
-Print the maximum space (in bytes) and total time (in seconds) used by
-assembly.
-.IP "\fB\-\-strip\-local\-absolute\fR" 4
-.IX Item "--strip-local-absolute"
-Remove local absolute symbols from the outgoing symbol table.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-version\fR" 4
-.IX Item "-version"
-.PD
-Print the \fBas\fR version.
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-Print the \fBas\fR version and exit.
-.IP "\fB\-W\fR" 4
-.IX Item "-W"
-.PD 0
-.IP "\fB\-\-no\-warn\fR" 4
-.IX Item "--no-warn"
-.PD
-Suppress warning messages.
-.IP "\fB\-\-fatal\-warnings\fR" 4
-.IX Item "--fatal-warnings"
-Treat warnings as errors.
-.IP "\fB\-\-warn\fR" 4
-.IX Item "--warn"
-Don't suppress warning messages or treat them as errors.
-.IP "\fB\-w\fR" 4
-.IX Item "-w"
-Ignored.
-.IP "\fB\-x\fR" 4
-.IX Item "-x"
-Ignored.
-.IP "\fB\-Z\fR" 4
-.IX Item "-Z"
-Generate an object file even after errors.
-.IP "\fB\-\- |\fR \fIfiles\fR \fB...\fR" 4
-.IX Item "-- | files ..."
-Standard input, or source files to assemble.
-.PP
-The following options are available when as is configured for
-an \s-1ARC\s0 processor.
-.IP "\fB\-marc[5|6|7|8]\fR" 4
-.IX Item "-marc[5|6|7|8]"
-This option selects the core processor variant.
-.IP "\fB\-EB | \-EL\fR" 4
-.IX Item "-EB | -EL"
-Select either big-endian (\-EB) or little-endian (\-EL) output.
-.PP
-The following options are available when as is configured for the \s-1ARM\s0
-processor family.
-.IP "\fB\-mcpu=\fR\fIprocessor\fR\fB[+\fR\fIextension\fR\fB...]\fR" 4
-.IX Item "-mcpu=processor[+extension...]"
-Specify which \s-1ARM\s0 processor variant is the target.
-.IP "\fB\-march=\fR\fIarchitecture\fR\fB[+\fR\fIextension\fR\fB...]\fR" 4
-.IX Item "-march=architecture[+extension...]"
-Specify which \s-1ARM\s0 architecture variant is used by the target.
-.IP "\fB\-mfpu=\fR\fIfloating-point-format\fR" 4
-.IX Item "-mfpu=floating-point-format"
-Select which Floating Point architecture is the target.
-.IP "\fB\-mfloat\-abi=\fR\fIabi\fR" 4
-.IX Item "-mfloat-abi=abi"
-Select which floating point \s-1ABI\s0 is in use.
-.IP "\fB\-mthumb\fR" 4
-.IX Item "-mthumb"
-Enable Thumb only instruction decoding.
-.IP "\fB\-mapcs\-32 | \-mapcs\-26 | \-mapcs\-float | \-mapcs\-reentrant\fR" 4
-.IX Item "-mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant"
-Select which procedure calling convention is in use.
-.IP "\fB\-EB | \-EL\fR" 4
-.IX Item "-EB | -EL"
-Select either big-endian (\-EB) or little-endian (\-EL) output.
-.IP "\fB\-mthumb\-interwork\fR" 4
-.IX Item "-mthumb-interwork"
-Specify that the code has been generated with interworking between Thumb and
-\&\s-1ARM\s0 code in mind.
-.IP "\fB\-k\fR" 4
-.IX Item "-k"
-Specify that \s-1PIC\s0 code has been generated.
-.PP
-See the info pages for documentation of the CRIS-specific options.
-.PP
-The following options are available when as is configured for
-a D10V processor.
-.IP "\fB\-O\fR" 4
-.IX Item "-O"
-Optimize output by parallelizing instructions.
-.PP
-The following options are available when as is configured for a D30V
-processor.
-.IP "\fB\-O\fR" 4
-.IX Item "-O"
-Optimize output by parallelizing instructions.
-.IP "\fB\-n\fR" 4
-.IX Item "-n"
-Warn when nops are generated.
-.IP "\fB\-N\fR" 4
-.IX Item "-N"
-Warn when a nop after a 32\-bit multiply instruction is generated.
-.PP
-The following options are available when as is configured for the
-Intel 80960 processor.
-.IP "\fB\-ACA | \-ACA_A | \-ACB | \-ACC | \-AKA | \-AKB | \-AKC | \-AMC\fR" 4
-.IX Item "-ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC"
-Specify which variant of the 960 architecture is the target.
-.IP "\fB\-b\fR" 4
-.IX Item "-b"
-Add code to collect statistics about branches taken.
-.IP "\fB\-no\-relax\fR" 4
-.IX Item "-no-relax"
-Do not alter compare-and-branch instructions for long displacements;
-error if necessary.
-.PP
-The following options are available when as is configured for the
-Ubicom \s-1IP2K\s0 series.
-.IP "\fB\-mip2022ext\fR" 4
-.IX Item "-mip2022ext"
-Specifies that the extended \s-1IP2022\s0 instructions are allowed.
-.IP "\fB\-mip2022\fR" 4
-.IX Item "-mip2022"
-Restores the default behaviour, which restricts the permitted instructions to
-just the basic \s-1IP2022\s0 ones.
-.PP
-The following options are available when as is configured for the
-Renesas M32C and M16C processors.
-.IP "\fB\-m32c\fR" 4
-.IX Item "-m32c"
-Assemble M32C instructions.
-.IP "\fB\-m16c\fR" 4
-.IX Item "-m16c"
-Assemble M16C instructions (the default).
-.PP
-The following options are available when as is configured for the
-Renesas M32R (formerly Mitsubishi M32R) series.
-.IP "\fB\-\-m32rx\fR" 4
-.IX Item "--m32rx"
-Specify which processor in the M32R family is the target. The default
-is normally the M32R, but this option changes it to the M32RX.
-.IP "\fB\-\-warn\-explicit\-parallel\-conflicts or \-\-Wp\fR" 4
-.IX Item "--warn-explicit-parallel-conflicts or --Wp"
-Produce warning messages when questionable parallel constructs are
-encountered.
-.IP "\fB\-\-no\-warn\-explicit\-parallel\-conflicts or \-\-Wnp\fR" 4
-.IX Item "--no-warn-explicit-parallel-conflicts or --Wnp"
-Do not produce warning messages when questionable parallel constructs are
-encountered.
-.PP
-The following options are available when as is configured for the
-Motorola 68000 series.
-.IP "\fB\-l\fR" 4
-.IX Item "-l"
-Shorten references to undefined symbols, to one word instead of two.
-.IP "\fB\-m68000 | \-m68008 | \-m68010 | \-m68020 | \-m68030\fR" 4
-.IX Item "-m68000 | -m68008 | -m68010 | -m68020 | -m68030"
-.PD 0
-.IP "\fB| \-m68040 | \-m68060 | \-m68302 | \-m68331 | \-m68332\fR" 4
-.IX Item "| -m68040 | -m68060 | -m68302 | -m68331 | -m68332"
-.IP "\fB| \-m68333 | \-m68340 | \-mcpu32 | \-m5200\fR" 4
-.IX Item "| -m68333 | -m68340 | -mcpu32 | -m5200"
-.PD
-Specify what processor in the 68000 family is the target. The default
-is normally the 68020, but this can be changed at configuration time.
-.IP "\fB\-m68881 | \-m68882 | \-mno\-68881 | \-mno\-68882\fR" 4
-.IX Item "-m68881 | -m68882 | -mno-68881 | -mno-68882"
-The target machine does (or does not) have a floating-point coprocessor.
-The default is to assume a coprocessor for 68020, 68030, and cpu32. Although
-the basic 68000 is not compatible with the 68881, a combination of the
-two can be specified, since it's possible to do emulation of the
-coprocessor instructions with the main processor.
-.IP "\fB\-m68851 | \-mno\-68851\fR" 4
-.IX Item "-m68851 | -mno-68851"
-The target machine does (or does not) have a memory-management
-unit coprocessor. The default is to assume an \s-1MMU\s0 for 68020 and up.
-.PP
-For details about the \s-1PDP\-11\s0 machine dependent features options,
-see \fBPDP\-11\-Options\fR.
-.IP "\fB\-mpic | \-mno\-pic\fR" 4
-.IX Item "-mpic | -mno-pic"
-Generate position-independent (or position\-dependent) code. The
-default is \fB\-mpic\fR.
-.IP "\fB\-mall\fR" 4
-.IX Item "-mall"
-.PD 0
-.IP "\fB\-mall\-extensions\fR" 4
-.IX Item "-mall-extensions"
-.PD
-Enable all instruction set extensions. This is the default.
-.IP "\fB\-mno\-extensions\fR" 4
-.IX Item "-mno-extensions"
-Disable all instruction set extensions.
-.IP "\fB\-m\fR\fIextension\fR \fB| \-mno\-\fR\fIextension\fR" 4
-.IX Item "-mextension | -mno-extension"
-Enable (or disable) a particular instruction set extension.
-.IP "\fB\-m\fR\fIcpu\fR" 4
-.IX Item "-mcpu"
-Enable the instruction set extensions supported by a particular \s-1CPU\s0, and
-disable all other extensions.
-.IP "\fB\-m\fR\fImachine\fR" 4
-.IX Item "-mmachine"
-Enable the instruction set extensions supported by a particular machine
-model, and disable all other extensions.
-.PP
-The following options are available when as is configured for
-a picoJava processor.
-.IP "\fB\-mb\fR" 4
-.IX Item "-mb"
-Generate \*(L"big endian\*(R" format output.
-.IP "\fB\-ml\fR" 4
-.IX Item "-ml"
-Generate \*(L"little endian\*(R" format output.
-.PP
-The following options are available when as is configured for the
-Motorola 68HC11 or 68HC12 series.
-.IP "\fB\-m68hc11 | \-m68hc12 | \-m68hcs12\fR" 4
-.IX Item "-m68hc11 | -m68hc12 | -m68hcs12"
-Specify what processor is the target. The default is
-defined by the configuration option when building the assembler.
-.IP "\fB\-mshort\fR" 4
-.IX Item "-mshort"
-Specify to use the 16\-bit integer \s-1ABI\s0.
-.IP "\fB\-mlong\fR" 4
-.IX Item "-mlong"
-Specify to use the 32\-bit integer \s-1ABI\s0.
-.IP "\fB\-mshort\-double\fR" 4
-.IX Item "-mshort-double"
-Specify to use the 32\-bit double \s-1ABI\s0.
-.IP "\fB\-mlong\-double\fR" 4
-.IX Item "-mlong-double"
-Specify to use the 64\-bit double \s-1ABI\s0.
-.IP "\fB\-\-force\-long\-branchs\fR" 4
-.IX Item "--force-long-branchs"
-Relative branches are turned into absolute ones. This concerns
-conditional branches, unconditional branches and branches to a
-sub routine.
-.IP "\fB\-S | \-\-short\-branchs\fR" 4
-.IX Item "-S | --short-branchs"
-Do not turn relative branchs into absolute ones
-when the offset is out of range.
-.IP "\fB\-\-strict\-direct\-mode\fR" 4
-.IX Item "--strict-direct-mode"
-Do not turn the direct addressing mode into extended addressing mode
-when the instruction does not support direct addressing mode.
-.IP "\fB\-\-print\-insn\-syntax\fR" 4
-.IX Item "--print-insn-syntax"
-Print the syntax of instruction in case of error.
-.IP "\fB\-\-print\-opcodes\fR" 4
-.IX Item "--print-opcodes"
-print the list of instructions with syntax and then exit.
-.IP "\fB\-\-generate\-example\fR" 4
-.IX Item "--generate-example"
-print an example of instruction for each possible instruction and then exit.
-This option is only useful for testing \fBas\fR.
-.PP
-The following options are available when \fBas\fR is configured
-for the \s-1SPARC\s0 architecture:
-.IP "\fB\-Av6 | \-Av7 | \-Av8 | \-Asparclet | \-Asparclite\fR" 4
-.IX Item "-Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite"
-.PD 0
-.IP "\fB\-Av8plus | \-Av8plusa | \-Av9 | \-Av9a\fR" 4
-.IX Item "-Av8plus | -Av8plusa | -Av9 | -Av9a"
-.PD
-Explicitly select a variant of the \s-1SPARC\s0 architecture.
-.Sp
-\&\fB\-Av8plus\fR and \fB\-Av8plusa\fR select a 32 bit environment.
-\&\fB\-Av9\fR and \fB\-Av9a\fR select a 64 bit environment.
-.Sp
-\&\fB\-Av8plusa\fR and \fB\-Av9a\fR enable the \s-1SPARC\s0 V9 instruction set with
-UltraSPARC extensions.
-.IP "\fB\-xarch=v8plus | \-xarch=v8plusa\fR" 4
-.IX Item "-xarch=v8plus | -xarch=v8plusa"
-For compatibility with the Solaris v9 assembler. These options are
-equivalent to \-Av8plus and \-Av8plusa, respectively.
-.IP "\fB\-bump\fR" 4
-.IX Item "-bump"
-Warn when the assembler switches to another architecture.
-.PP
-The following options are available when as is configured for the 'c54x
-architecture.
-.IP "\fB\-mfar\-mode\fR" 4
-.IX Item "-mfar-mode"
-Enable extended addressing mode. All addresses and relocations will assume
-extended addressing (usually 23 bits).
-.IP "\fB\-mcpu=\fR\fI\s-1CPU_VERSION\s0\fR" 4
-.IX Item "-mcpu=CPU_VERSION"
-Sets the \s-1CPU\s0 version being compiled for.
-.IP "\fB\-merrors\-to\-file\fR \fI\s-1FILENAME\s0\fR" 4
-.IX Item "-merrors-to-file FILENAME"
-Redirect error output to a file, for broken systems which don't support such
-behaviour in the shell.
-.PP
-The following options are available when as is configured for
-a \s-1MIPS\s0 processor.
-.IP "\fB\-G\fR \fInum\fR" 4
-.IX Item "-G num"
-This option sets the largest size of an object that can be referenced
-implicitly with the \f(CW\*(C`gp\*(C'\fR register. It is only accepted for targets that
-use \s-1ECOFF\s0 format, such as a DECstation running Ultrix. The default value is 8.
-.IP "\fB\-EB\fR" 4
-.IX Item "-EB"
-Generate \*(L"big endian\*(R" format output.
-.IP "\fB\-EL\fR" 4
-.IX Item "-EL"
-Generate \*(L"little endian\*(R" format output.
-.IP "\fB\-mips1\fR" 4
-.IX Item "-mips1"
-.PD 0
-.IP "\fB\-mips2\fR" 4
-.IX Item "-mips2"
-.IP "\fB\-mips3\fR" 4
-.IX Item "-mips3"
-.IP "\fB\-mips4\fR" 4
-.IX Item "-mips4"
-.IP "\fB\-mips5\fR" 4
-.IX Item "-mips5"
-.IP "\fB\-mips32\fR" 4
-.IX Item "-mips32"
-.IP "\fB\-mips32r2\fR" 4
-.IX Item "-mips32r2"
-.IP "\fB\-mips64\fR" 4
-.IX Item "-mips64"
-.IP "\fB\-mips64r2\fR" 4
-.IX Item "-mips64r2"
-.PD
-Generate code for a particular \s-1MIPS\s0 Instruction Set Architecture level.
-\&\fB\-mips1\fR is an alias for \fB\-march=r3000\fR, \fB\-mips2\fR is an
-alias for \fB\-march=r6000\fR, \fB\-mips3\fR is an alias for
-\&\fB\-march=r4000\fR and \fB\-mips4\fR is an alias for \fB\-march=r8000\fR.
-\&\fB\-mips5\fR, \fB\-mips32\fR, \fB\-mips32r2\fR, \fB\-mips64\fR, and
-\&\fB\-mips64r2\fR
-correspond to generic
-\&\fB\s-1MIPS\s0 V\fR, \fB\s-1MIPS32\s0\fR, \fB\s-1MIPS32\s0 Release 2\fR, \fB\s-1MIPS64\s0\fR,
-and \fB\s-1MIPS64\s0 Release 2\fR
-\&\s-1ISA\s0 processors, respectively.
-.IP "\fB\-march=\fR\fI\s-1CPU\s0\fR" 4
-.IX Item "-march=CPU"
-Generate code for a particular \s-1MIPS\s0 cpu.
-.IP "\fB\-mtune=\fR\fIcpu\fR" 4
-.IX Item "-mtune=cpu"
-Schedule and tune for a particular \s-1MIPS\s0 cpu.
-.IP "\fB\-mfix7000\fR" 4
-.IX Item "-mfix7000"
-.PD 0
-.IP "\fB\-mno\-fix7000\fR" 4
-.IX Item "-mno-fix7000"
-.PD
-Cause nops to be inserted if the read of the destination register
-of an mfhi or mflo instruction occurs in the following two instructions.
-.IP "\fB\-mdebug\fR" 4
-.IX Item "-mdebug"
-.PD 0
-.IP "\fB\-no\-mdebug\fR" 4
-.IX Item "-no-mdebug"
-.PD
-Cause stabs-style debugging output to go into an ECOFF-style .mdebug
-section instead of the standard \s-1ELF\s0 .stabs sections.
-.IP "\fB\-mpdr\fR" 4
-.IX Item "-mpdr"
-.PD 0
-.IP "\fB\-mno\-pdr\fR" 4
-.IX Item "-mno-pdr"
-.PD
-Control generation of \f(CW\*(C`.pdr\*(C'\fR sections.
-.IP "\fB\-mgp32\fR" 4
-.IX Item "-mgp32"
-.PD 0
-.IP "\fB\-mfp32\fR" 4
-.IX Item "-mfp32"
-.PD
-The register sizes are normally inferred from the \s-1ISA\s0 and \s-1ABI\s0, but these
-flags force a certain group of registers to be treated as 32 bits wide at
-all times. \fB\-mgp32\fR controls the size of general-purpose registers
-and \fB\-mfp32\fR controls the size of floating-point registers.
-.IP "\fB\-mips16\fR" 4
-.IX Item "-mips16"
-.PD 0
-.IP "\fB\-no\-mips16\fR" 4
-.IX Item "-no-mips16"
-.PD
-Generate code for the \s-1MIPS\s0 16 processor. This is equivalent to putting
-\&\f(CW\*(C`.set mips16\*(C'\fR at the start of the assembly file. \fB\-no\-mips16\fR
-turns off this option.
-.IP "\fB\-mips3d\fR" 4
-.IX Item "-mips3d"
-.PD 0
-.IP "\fB\-no\-mips3d\fR" 4
-.IX Item "-no-mips3d"
-.PD
-Generate code for the \s-1MIPS\-3D\s0 Application Specific Extension.
-This tells the assembler to accept \s-1MIPS\-3D\s0 instructions.
-\&\fB\-no\-mips3d\fR turns off this option.
-.IP "\fB\-mdmx\fR" 4
-.IX Item "-mdmx"
-.PD 0
-.IP "\fB\-no\-mdmx\fR" 4
-.IX Item "-no-mdmx"
-.PD
-Generate code for the \s-1MDMX\s0 Application Specific Extension.
-This tells the assembler to accept \s-1MDMX\s0 instructions.
-\&\fB\-no\-mdmx\fR turns off this option.
-.IP "\fB\-mdsp\fR" 4
-.IX Item "-mdsp"
-.PD 0
-.IP "\fB\-mno\-dsp\fR" 4
-.IX Item "-mno-dsp"
-.PD
-Generate code for the \s-1DSP\s0 Application Specific Extension.
-This tells the assembler to accept \s-1DSP\s0 instructions.
-\&\fB\-mno\-dsp\fR turns off this option.
-.IP "\fB\-mmt\fR" 4
-.IX Item "-mmt"
-.PD 0
-.IP "\fB\-mno\-mt\fR" 4
-.IX Item "-mno-mt"
-.PD
-Generate code for the \s-1MT\s0 Application Specific Extension.
-This tells the assembler to accept \s-1MT\s0 instructions.
-\&\fB\-mno\-mt\fR turns off this option.
-.IP "\fB\-\-construct\-floats\fR" 4
-.IX Item "--construct-floats"
-.PD 0
-.IP "\fB\-\-no\-construct\-floats\fR" 4
-.IX Item "--no-construct-floats"
-.PD
-The \fB\-\-no\-construct\-floats\fR option disables the construction of
-double width floating point constants by loading the two halves of the
-value into the two single width floating point registers that make up
-the double width register. By default \fB\-\-construct\-floats\fR is
-selected, allowing construction of these floating point constants.
-.IP "\fB\-\-emulation=\fR\fIname\fR" 4
-.IX Item "--emulation=name"
-This option causes \fBas\fR to emulate \fBas\fR configured
-for some other target, in all respects, including output format (choosing
-between \s-1ELF\s0 and \s-1ECOFF\s0 only), handling of pseudo-opcodes which may generate
-debugging information or store symbol table information, and default
-endianness. The available configuration names are: \fBmipsecoff\fR,
-\&\fBmipself\fR, \fBmipslecoff\fR, \fBmipsbecoff\fR, \fBmipslelf\fR,
-\&\fBmipsbelf\fR. The first two do not alter the default endianness from that
-of the primary target for which the assembler was configured; the others change
-the default to little\- or big-endian as indicated by the \fBb\fR or \fBl\fR
-in the name. Using \fB\-EB\fR or \fB\-EL\fR will override the endianness
-selection in any case.
-.Sp
-This option is currently supported only when the primary target
-\&\fBas\fR is configured for is a \s-1MIPS\s0 \s-1ELF\s0 or \s-1ECOFF\s0 target.
-Furthermore, the primary target or others specified with
-\&\fB\-\-enable\-targets=...\fR at configuration time must include support for
-the other format, if both are to be available. For example, the Irix 5
-configuration includes support for both.
-.Sp
-Eventually, this option will support more configurations, with more
-fine-grained control over the assembler's behavior, and will be supported for
-more processors.
-.IP "\fB\-nocpp\fR" 4
-.IX Item "-nocpp"
-\&\fBas\fR ignores this option. It is accepted for compatibility with
-the native tools.
-.IP "\fB\-\-trap\fR" 4
-.IX Item "--trap"
-.PD 0
-.IP "\fB\-\-no\-trap\fR" 4
-.IX Item "--no-trap"
-.IP "\fB\-\-break\fR" 4
-.IX Item "--break"
-.IP "\fB\-\-no\-break\fR" 4
-.IX Item "--no-break"
-.PD
-Control how to deal with multiplication overflow and division by zero.
-\&\fB\-\-trap\fR or \fB\-\-no\-break\fR (which are synonyms) take a trap exception
-(and only work for Instruction Set Architecture level 2 and higher);
-\&\fB\-\-break\fR or \fB\-\-no\-trap\fR (also synonyms, and the default) take a
-break exception.
-.IP "\fB\-n\fR" 4
-.IX Item "-n"
-When this option is used, \fBas\fR will issue a warning every
-time it generates a nop instruction from a macro.
-.PP
-The following options are available when as is configured for
-an MCore processor.
-.IP "\fB\-jsri2bsr\fR" 4
-.IX Item "-jsri2bsr"
-.PD 0
-.IP "\fB\-nojsri2bsr\fR" 4
-.IX Item "-nojsri2bsr"
-.PD
-Enable or disable the \s-1JSRI\s0 to \s-1BSR\s0 transformation. By default this is enabled.
-The command line option \fB\-nojsri2bsr\fR can be used to disable it.
-.IP "\fB\-sifilter\fR" 4
-.IX Item "-sifilter"
-.PD 0
-.IP "\fB\-nosifilter\fR" 4
-.IX Item "-nosifilter"
-.PD
-Enable or disable the silicon filter behaviour. By default this is disabled.
-The default can be overridden by the \fB\-sifilter\fR command line option.
-.IP "\fB\-relax\fR" 4
-.IX Item "-relax"
-Alter jump instructions for long displacements.
-.IP "\fB\-mcpu=[210|340]\fR" 4
-.IX Item "-mcpu=[210|340]"
-Select the cpu type on the target hardware. This controls which instructions
-can be assembled.
-.IP "\fB\-EB\fR" 4
-.IX Item "-EB"
-Assemble for a big endian target.
-.IP "\fB\-EL\fR" 4
-.IX Item "-EL"
-Assemble for a little endian target.
-.PP
-See the info pages for documentation of the MMIX-specific options.
-.PP
-The following options are available when as is configured for
-an Xtensa processor.
-.IP "\fB\-\-text\-section\-literals | \-\-no\-text\-section\-literals\fR" 4
-.IX Item "--text-section-literals | --no-text-section-literals"
-With \fB\-\-text\-section\-literals\fR, literal pools are interspersed
-in the text section. The default is
-\&\fB\-\-no\-text\-section\-literals\fR, which places literals in a
-separate section in the output file. These options only affect literals
-referenced via PC-relative \f(CW\*(C`L32R\*(C'\fR instructions; literals for
-absolute mode \f(CW\*(C`L32R\*(C'\fR instructions are handled separately.
-.IP "\fB\-\-absolute\-literals | \-\-no\-absolute\-literals\fR" 4
-.IX Item "--absolute-literals | --no-absolute-literals"
-Indicate to the assembler whether \f(CW\*(C`L32R\*(C'\fR instructions use absolute
-or PC-relative addressing. The default is to assume absolute addressing
-if the Xtensa processor includes the absolute \f(CW\*(C`L32R\*(C'\fR addressing
-option. Otherwise, only the PC-relative \f(CW\*(C`L32R\*(C'\fR mode can be used.
-.IP "\fB\-\-target\-align | \-\-no\-target\-align\fR" 4
-.IX Item "--target-align | --no-target-align"
-Enable or disable automatic alignment to reduce branch penalties at the
-expense of some code density. The default is \fB\-\-target\-align\fR.
-.IP "\fB\-\-longcalls | \-\-no\-longcalls\fR" 4
-.IX Item "--longcalls | --no-longcalls"
-Enable or disable transformation of call instructions to allow calls
-across a greater range of addresses. The default is
-\&\fB\-\-no\-longcalls\fR.
-.IP "\fB\-\-transform | \-\-no\-transform\fR" 4
-.IX Item "--transform | --no-transform"
-Enable or disable all assembler transformations of Xtensa instructions.
-The default is \fB\-\-transform\fR;
-\&\fB\-\-no\-transform\fR should be used only in the rare cases when the
-instructions must be exactly as specified in the assembly source.
-.PP
-The following options are available when as is configured for
-a Z80 family processor.
-.IP "\fB\-z80\fR" 4
-.IX Item "-z80"
-Assemble for Z80 processor.
-.IP "\fB\-r800\fR" 4
-.IX Item "-r800"
-Assemble for R800 processor.
-.IP "\fB\-ignore\-undocumented\-instructions\fR" 4
-.IX Item "-ignore-undocumented-instructions"
-.PD 0
-.IP "\fB\-Wnud\fR" 4
-.IX Item "-Wnud"
-.PD
-Assemble undocumented Z80 instructions that also work on R800 without warning.
-.IP "\fB\-ignore\-unportable\-instructions\fR" 4
-.IX Item "-ignore-unportable-instructions"
-.PD 0
-.IP "\fB\-Wnup\fR" 4
-.IX Item "-Wnup"
-.PD
-Assemble all undocumented Z80 instructions without warning.
-.IP "\fB\-warn\-undocumented\-instructions\fR" 4
-.IX Item "-warn-undocumented-instructions"
-.PD 0
-.IP "\fB\-Wud\fR" 4
-.IX Item "-Wud"
-.PD
-Issue a warning for undocumented Z80 instructions that also work on R800.
-.IP "\fB\-warn\-unportable\-instructions\fR" 4
-.IX Item "-warn-unportable-instructions"
-.PD 0
-.IP "\fB\-Wup\fR" 4
-.IX Item "-Wup"
-.PD
-Issue a warning for undocumented Z80 instructions that do notwork on R800.
-.IP "\fB\-forbid\-undocumented\-instructions\fR" 4
-.IX Item "-forbid-undocumented-instructions"
-.PD 0
-.IP "\fB\-Fud\fR" 4
-.IX Item "-Fud"
-.PD
-Treat all undocumented instructions as errors.
-.IP "\fB\-forbid\-unportable\-instructions\fR" 4
-.IX Item "-forbid-unportable-instructions"
-.PD 0
-.IP "\fB\-Fup\fR" 4
-.IX Item "-Fup"
-.PD
-Treat undocumented Z80 intructions that do notwork on R800 as errors.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIgcc\fR\|(1), \fIld\fR\|(1), and the Info entries for \fIbinutils\fR and \fIld\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo
index 6daaed0..b6f7f32 100644
--- a/contrib/binutils/gas/doc/as.texinfo
+++ b/contrib/binutils/gas/doc/as.texinfo
@@ -1,6 +1,6 @@
\input texinfo @c -*-Texinfo-*-
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001, 2002, 2003, 2004, 2005
+@c 2001, 2002, 2003, 2004, 2005, 2006, 2007
@c Free Software Foundation, Inc.
@c UPDATE!! On future updates--
@c (1) check for new machine-dep cmdline options in
@@ -22,7 +22,7 @@
@c man begin NAME
@c ---
@include asconfig.texi
-@include gasver.texi
+@include bfdver.texi
@c ---
@c man end
@c ---
@@ -96,11 +96,12 @@ END-INFO-DIR-ENTRY
@finalout
@syncodeindex ky cp
-@ifinfo
+@copying
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, 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
+2006, 2007 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
@@ -110,15 +111,7 @@ 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 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
+@end copying
@titlepage
@title Using @value{AS}
@@ -126,11 +119,15 @@ notice identical to this one except for the removal of this paragraph
@ifclear GENERIC
@subtitle for the @value{TARGET} family
@end ifclear
+@ifset VERSION_PACKAGE
+@sp 1
+@subtitle @value{VERSION_PACKAGE}
+@end ifset
@sp 1
@subtitle Version @value{VERSION}
@sp 1
@sp 13
-The Free Software Foundation Inc. thanks The Nice Computer
+The Free Software Foundation Inc.@: thanks The Nice Computer
Company of Australia for loaning Dean Elsner to write the
first (Vax) version of @command{as} for Project @sc{gnu}.
The proprietors, management and staff of TNCCA thank FSF for
@@ -153,7 +150,8 @@ done.
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002,
+2006, 2007 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
@@ -163,13 +161,17 @@ Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Fr
section entitled ``GNU Free Documentation License''.
@end titlepage
+@contents
@ifnottex
@node Top
@top Using @value{AS}
-This file is a user guide to the @sc{gnu} assembler @command{@value{AS}} version
-@value{VERSION}.
+This file is a user guide to the @sc{gnu} assembler @command{@value{AS}}
+@ifset VERSION_PACKAGE
+@value{VERSION_PACKAGE}
+@end ifset
+version @value{VERSION}.
@ifclear GENERIC
This version of the file describes @command{@value{AS}} configured to generate
code for @value{TARGET} architectures.
@@ -191,7 +193,7 @@ section entitled ``GNU Free Documentation License''.
* Reporting Bugs:: Reporting Bugs
* Acknowledgements:: Who Did What
* GNU Free Documentation License:: GNU Free Documentation License
-* Index:: Index
+* AS Index:: AS Index
@end menu
@end ifnottex
@@ -209,7 +211,7 @@ code for @value{TARGET} architectures.
@cindex option summary
@cindex summary of options
Here is a brief summary of how to invoke @command{@value{AS}}. For details,
-@pxref{Invoking,,Command-Line Options}.
+see @ref{Invoking,,Command-Line Options}.
@c man title AS the portable GNU assembler.
@@ -296,6 +298,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@emph{Target i386 options:}
[@b{--32}|@b{--64}] [@b{-n}]
+ [@b{-march}=@var{CPU}] [@b{-mtune}=@var{CPU}]
@end ifset
@ifset I960
@@ -343,7 +346,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{-m68hc11}|@b{-m68hc12}|@b{-m68hcs12}]
[@b{-mshort}|@b{-mlong}]
[@b{-mshort-double}|@b{-mlong-double}]
- [@b{--force-long-branchs}] [@b{--short-branchs}]
+ [@b{--force-long-branches}] [@b{--short-branches}]
[@b{--strict-direct-mode}] [@b{--print-insn-syntax}]
[@b{--print-opcodes}] [@b{--generate-example}]
@end ifset
@@ -358,7 +361,7 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
@emph{Target MIPS options:}
[@b{-nocpp}] [@b{-EL}] [@b{-EB}] [@b{-O}[@var{optimization level}]]
[@b{-g}[@var{debug level}]] [@b{-G} @var{num}] [@b{-KPIC}] [@b{-call_shared}]
- [@b{-non_shared}] [@b{-xgot}]
+ [@b{-non_shared}] [@b{-xgot} [@b{-mvxworks-pic}]
[@b{-mabi}=@var{ABI}] [@b{-32}] [@b{-n32}] [@b{-64}] [@b{-mfp32}] [@b{-mgp32}]
[@b{-march}=@var{CPU}] [@b{-mtune}=@var{CPU}] [@b{-mips1}] [@b{-mips2}]
[@b{-mips3}] [@b{-mips4}] [@b{-mips5}] [@b{-mips32}] [@b{-mips32r2}]
@@ -367,9 +370,11 @@ gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
[@b{-trap}] [@b{-no-break}] [@b{-break}] [@b{-no-trap}]
[@b{-mfix7000}] [@b{-mno-fix7000}]
[@b{-mips16}] [@b{-no-mips16}]
+ [@b{-msmartmips}] [@b{-mno-smartmips}]
[@b{-mips3d}] [@b{-no-mips3d}]
[@b{-mdmx}] [@b{-no-mdmx}]
[@b{-mdsp}] [@b{-mno-dsp}]
+ [@b{-mdspr2}] [@b{-mno-dspr2}]
[@b{-mmt}] [@b{-mno-mt}]
[@b{-mdebug}] [@b{-no-mdebug}]
[@b{-mpdr}] [@b{-mno-pdr}]
@@ -487,7 +492,10 @@ listing without forms processing. The @samp{=file} option, if used, must be
the last one. By itself, @samp{-a} defaults to @samp{-ahls}.
@item --alternate
-Begin in alternate macro mode, see @ref{Altmacro,,@code{.altmacro}}.
+Begin in alternate macro mode.
+@ifclear man
+@xref{Altmacro,,@code{.altmacro}}.
+@end ifclear
@item -D
Ignored. This option is accepted for script compatibility with calls to
@@ -496,7 +504,9 @@ other assemblers.
@item --defsym @var{sym}=@var{value}
Define the symbol @var{sym} to be @var{value} before assembling the input file.
@var{value} must be an integer constant. As in C, a leading @samp{0x}
-indicates a hexadecimal value, and a leading @samp{0} indicates an octal value.
+indicates a hexadecimal value, and a leading @samp{0} indicates an octal
+value. The value of the symbol can be overridden inside a source file via the
+use of a @code{.set} pseudo-op.
@item -f
``fast''---skip whitespace and comment preprocessing (assume source is
@@ -546,9 +556,12 @@ Issue warnings when difference tables altered for long displacements.
@item -L
@itemx --keep-locals
-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.
+Keep (in the symbol table) local symbols. These symbols start with
+system-specific local label prefixes, typically @samp{.L} for ELF systems
+or @samp{L} for traditional a.out systems.
+@ifclear man
+@xref{Symbol Names}.
+@end ifclear
@item --listing-lhs-width=@var{number}
Set the maximum width, in words, of the output data column for an assembler
@@ -866,13 +879,13 @@ Specify to use the 32-bit double ABI.
@item -mlong-double
Specify to use the 64-bit double ABI.
-@item --force-long-branchs
+@item --force-long-branches
Relative branches are turned into absolute ones. This concerns
conditional branches, unconditional branches and branches to a
sub routine.
-@item -S | --short-branchs
-Do not turn relative branchs into absolute ones
+@item -S | --short-branches
+Do not turn relative branches into absolute ones
when the offset is out of range.
@item --strict-direct-mode
@@ -1006,6 +1019,12 @@ Generate code for the MIPS 16 processor. This is equivalent to putting
@code{.set mips16} at the start of the assembly file. @samp{-no-mips16}
turns off this option.
+@item -msmartmips
+@itemx -mno-smartmips
+Enables the SmartMIPS extension to the MIPS32 instruction set. This is
+equivalent to putting @code{.set smartmips} at the start of the assembly file.
+@samp{-mno-smartmips} turns off this option.
+
@item -mips3d
@itemx -no-mips3d
Generate code for the MIPS-3D Application Specific Extension.
@@ -1020,10 +1039,17 @@ This tells the assembler to accept MDMX instructions.
@item -mdsp
@itemx -mno-dsp
-Generate code for the DSP Application Specific Extension.
-This tells the assembler to accept DSP instructions.
+Generate code for the DSP Release 1 Application Specific Extension.
+This tells the assembler to accept DSP Release 1 instructions.
@samp{-mno-dsp} turns off this option.
+@item -mdspr2
+@itemx -mno-dspr2
+Generate code for the DSP Release 2 Application Specific Extension.
+This option implies -mdsp.
+This tells the assembler to accept DSP Release 2 instructions.
+@samp{-mno-dspr2} turns off this option.
+
@item -mmt
@itemx -mno-mt
Generate code for the MT Application Specific Extension.
@@ -1173,13 +1199,13 @@ Assemble all undocumented Z80 instructions without warning.
Issue a warning for undocumented Z80 instructions that also work on R800.
@item -warn-unportable-instructions
@itemx -Wup
-Issue a warning for undocumented Z80 instructions that do notwork on R800.
+Issue a warning for undocumented Z80 instructions that do not work on R800.
@item -forbid-undocumented-instructions
@itemx -Fud
Treat all undocumented instructions as errors.
@item -forbid-unportable-instructions
@itemx -Fup
-Treat undocumented Z80 intructions that do notwork on R800 as errors.
+Treat undocumented Z80 instructions that do not work on R800 as errors.
@end table
@end ifset
@@ -1504,7 +1530,8 @@ because many of them aren't supposed to happen.
@cindex options, all versions of assembler
This chapter describes command-line options available in @emph{all}
-versions of the @sc{gnu} assembler; @pxref{Machine Dependencies}, for options specific
+versions of the @sc{gnu} assembler; see @ref{Machine Dependencies},
+for options specific
@ifclear GENERIC
to the @value{TARGET} target.
@end ifclear
@@ -1549,7 +1576,7 @@ assembler.)
* K:: -K for difference tables
@end ifset
-* L:: -L to retain local labels
+* L:: -L to retain local symbols
* listing:: --listing-XXX to configure listing output
* M:: -M or --mri to assemble in MRI compatibility mode
* MD:: --MD for dependency tracking
@@ -1604,7 +1631,8 @@ 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
+Note if the assembler source is coming from the standard input (e.g.,
+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
@@ -1674,33 +1702,28 @@ alteration on other platforms.
@ifset DIFF-TBL-KLUGE
@cindex difference tables, warning
@cindex warning for altered difference tables
-@command{@value{AS}} sometimes alters the code emitted for directives of the form
-@samp{.word @var{sym1}-@var{sym2}}; @pxref{Word,,@code{.word}}.
+@command{@value{AS}} sometimes alters the code emitted for directives of the
+form @samp{.word @var{sym1}-@var{sym2}}. @xref{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: @option{-L}
+@section Include Local Symbols: @option{-L}
@kindex -L
-@cindex local labels, retaining in output
-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 @command{@value{AS}} and @code{@value{LD}} discard such labels, so you do not
-normally debug with them.
-
-This option tells @command{@value{AS}} to retain those @samp{L@dots{}} symbols
+@cindex local symbols, retaining in output
+Symbols beginning with system-specific local label prefixes, typically
+@samp{.L} for ELF systems or @samp{L} for traditional a.out systems, are
+called @dfn{local symbols}. @xref{Symbol Names}. Normally you do not see
+such symbols when debugging, because they are intended for the use of
+programs (like compilers) that compose assembler programs, not for your
+notice. Normally both @command{@value{AS}} and @code{@value{LD}} discard
+such symbols, so you do not normally debug with them.
+
+This option tells @command{@value{AS}} to retain those local 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}.
-
-By default, a local label is any label beginning with @samp{L}, but each
-target is allowed to redefine the local label prefix.
-@ifset HPPA
-On the HPPA local labels begin with @samp{L$}.
-@end ifset
+@code{@value{LD}} to preserve those symbols.
@node listing
@section Configuring listing output: @option{--listing}
@@ -1708,9 +1731,11 @@ On the HPPA local labels begin with @samp{L$}.
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:
+them as a listing file. The format of this listing can be controlled by
+directives inside the assembler source (i.e., @code{.list} (@pxref{List}),
+@code{.title} (@pxref{Title}), @code{.sbttl} (@pxref{Sbttl}),
+@code{.psize} (@pxref{Psize}), and
+@code{.eject} (@pxref{Eject}) and also by the following switches:
@table @gcctabopt
@item --listing-lhs-width=@samp{number}
@@ -2072,7 +2097,7 @@ anything else you may get from your C compiler's preprocessor. You can
do include file processing with the @code{.include} directive
(@pxref{Include,,@code{.include}}). You can use the @sc{gnu} C compiler driver
to get other ``CPP'' style preprocessing by giving the input file a
-@samp{.S} suffix. @xref{Overall Options,, Options Controlling the Kind of
+@samp{.S} suffix. @xref{Overall Options, ,Options Controlling the Kind of
Output, gcc.info, Using GNU CC}.
Excess whitespace, comments, and character constants
@@ -2209,7 +2234,7 @@ extends to the end of the line.
To be compatible with past assemblers, lines that begin with @samp{#} have a
special interpretation. Following the @samp{#} should be an absolute
expression (@pxref{Expressions}): the logical line number of the @emph{next}
-line. Then a string (@pxref{Strings,, Strings}) is allowed: if present it is a
+line. Then a string (@pxref{Strings, ,Strings}) is allowed: if present it is a
new logical file name. The rest of the line, if any, should be whitespace.
If the first non-whitespace characters on the line are not numeric,
@@ -2284,8 +2309,8 @@ constants are an exception: they do not end statements.
@end ifclear
@ifset GENERIC
A @dfn{statement} ends at a newline character (@samp{\n}) or line
-separator character. (The line separator is usually @samp{;}, unless
-this conflicts with the comment character; @pxref{Machine Dependencies}.) The
+separator character. (The line separator is usually @samp{;}, unless this
+conflicts with the comment character; see @ref{Machine Dependencies}.) The
newline or separator character is considered part of the preceding
statement. Newlines and separators within character constants are an
exception: they do not end statements.
@@ -2670,7 +2695,7 @@ independently of any floating point hardware in the computer running
@cindex bit fields
@cindex constants, bit field
You can also define numeric constants as @dfn{bit fields}.
-specify two numbers separated by a colon---
+Specify two numbers separated by a colon---
@example
@var{mask}:@var{value}
@end example
@@ -3069,8 +3094,8 @@ You
can also use the @code{.subsection} directive (@pxref{SubSection})
to specify a subsection: @samp{.subsection @var{expression}}.
@end ifset
-@var{Expression} should be an absolute expression.
-(@xref{Expressions}.) If you just say @samp{.text} then @samp{.text 0}
+@var{Expression} should be an absolute expression
+(@pxref{Expressions}). If you just say @samp{.text} then @samp{.text 0}
is assumed. Likewise @samp{.data} means @samp{.data 0}. Assembly
begins in @code{text 0}. For instance:
@smallexample
@@ -3109,7 +3134,7 @@ The @code{.lcomm} pseudo-op defines a symbol in the bss section; see
@ref{Lcomm,,@code{.lcomm}}.
The @code{.comm} pseudo-op may be used to declare a common symbol, which is
-another form of uninitialized symbol; see @xref{Comm,,@code{.comm}}.
+another form of uninitialized symbol; see @ref{Comm,,@code{.comm}}.
@ifset GENERIC
When assembling for a target which supports multiple sections, such as ELF or
@@ -3180,8 +3205,8 @@ equals sign @samp{=}@samp{=} here represents an equivalent of the
Symbol names begin with a letter or with one of @samp{._}. On most
machines, you can also use @code{$} in symbol names; exceptions are
noted in @ref{Machine Dependencies}. That character may be followed by any
-string of digits, letters, dollar signs (unless otherwise noted in
-@ref{Machine Dependencies}), and underscores.
+string of digits, letters, dollar signs (unless otherwise noted for a
+particular target machine), and underscores.
@end ifclear
@ifset SPECIAL-SYMS
@ifset H8
@@ -3203,16 +3228,32 @@ in a program.
@cindex local symbol names
@cindex symbol names, local
+A local symbol is any symbol beginning with certain local label prefixes.
+By default, the local label prefix is @samp{.L} for ELF systems or
+@samp{L} for traditional a.out systems, but each target may have its own
+set of local label prefixes.
+@ifset HPPA
+On the HPPA local symbols begin with @samp{L$}.
+@end ifset
+
+Local symbols are defined and used within the assembler, but they are
+normally not saved in object files. Thus, they are not visible when debugging.
+You may use the @samp{-L} option (@pxref{L, ,Include Local Symbols:
+@option{-L}}) to retain the local symbols in the object files.
+
+@subheading Local Labels
+
+@cindex local labels
@cindex temporary symbol names
@cindex symbol names, temporary
-Local symbols help compilers and programmers use names temporarily.
+Local labels help compilers and programmers use names temporarily.
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}
+To define a local label, 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
+definition of that label 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
+@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
@@ -3241,16 +3282,17 @@ label_3: branch label_4
label_4: branch label_3
@end smallexample
-Local symbol names are only a notational device. They are immediately
+Local label 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:
+The symbol names are stored in the symbol table, appear in error messages, and
+are 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 @command{@value{AS}} and
-@code{@value{LD}} forget symbols that start with @samp{L}. These labels are
+@item @emph{local label prefix}
+All local symbols begin with the system-specific local label prefix.
+Normally both @command{@value{AS}} and @code{@value{LD}} forget symbols
+that start with the local label prefix. These labels are
used for symbols you are never intended to see. If you use 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,
@@ -3268,30 +3310,30 @@ of the same name. The character has ASCII value of @samp{\002} (control-B).
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.
+the number @samp{1} and its 15th definition gets @samp{15} as well.
@end table
-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}.
+So for example, the first @code{1:} may be named @code{.L1@kbd{C-B}1}, and
+the 44th @code{3:} may be 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
+dollar labels. These labels go out of scope (i.e., 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$}}.
+dollar sign, e.g., @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}.
+names which use ASCII character @samp{\001} (control-A) as the magic character
+to distinguish them from ordinary labels. For example, the fifth definition of
+@samp{6$} may be named @samp{.L6@kbd{C-A}5}.
@node Dot
@section The Special Dot Symbol
@@ -3722,14 +3764,14 @@ Some machine configurations provide additional directives.
@end ifset
@ifclear GENERIC
@ifset machine-directives
-@xref{Machine Dependencies} for additional directives.
+@xref{Machine Dependencies}, for additional directives.
@end ifset
@end ifclear
@menu
* Abort:: @code{.abort}
@ifset COFF
-* ABORT:: @code{.ABORT}
+* ABORT (COFF):: @code{.ABORT}
@end ifset
* Align:: @code{.align @var{abs-expr} , @var{abs-expr}}
@@ -3740,7 +3782,7 @@ Some machine configurations provide additional directives.
* Byte:: @code{.byte @var{expressions}}
* Comm:: @code{.comm @var{symbol} , @var{length} }
-* CFI directives:: @code{.cfi_startproc}, @code{.cfi_endproc}, etc.
+* CFI directives:: @code{.cfi_startproc [simple]}, @code{.cfi_endproc}, etc.
* Data:: @code{.data @var{subsection}}
@ifset COFF
@@ -3818,8 +3860,8 @@ Some machine configurations provide additional directives.
* Noaltmacro:: @code{.noaltmacro}
* Nolist:: @code{.nolist}
* Octa:: @code{.octa @var{bignums}}
-* Org:: @code{.org @var{new-lc} , @var{fill}}
-* P2align:: @code{.p2align @var{abs-expr} , @var{abs-expr}}
+* Org:: @code{.org @var{new-lc}, @var{fill}}
+* P2align:: @code{.p2align @var{abs-expr}, @var{abs-expr}, @var{abs-expr}}
@ifset ELF
* PopSection:: @code{.popsection}
* Previous:: @code{.previous}
@@ -3837,6 +3879,7 @@ Some machine configurations provide additional directives.
@end ifset
* Quad:: @code{.quad @var{bignums}}
+* Reloc:: @code{.reloc @var{offset}, @var{reloc_name}[, @var{expression}]}
* Rept:: @code{.rept @var{count}}
* Sbttl:: @code{.sbttl "@var{subheading}"}
@ifset COFF
@@ -3907,8 +3950,8 @@ 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
-@node ABORT
-@section @code{.ABORT}
+@node ABORT (COFF)
+@section @code{.ABORT} (COFF)
@cindex @code{ABORT} directive
When producing COFF output, @command{@value{AS}} accepts this directive as a
@@ -4058,19 +4101,40 @@ The syntax for @code{.comm} differs slightly on the HPPA. The syntax is
@end ifset
@node CFI directives
-@section @code{.cfi_startproc}
+@section @code{.cfi_startproc [simple]}
@cindex @code{cfi_startproc} directive
@code{.cfi_startproc} is used at the beginning of each function that
should have an entry in @code{.eh_frame}. It initializes some internal
-data structures and emits architecture dependent initial CFI instructions.
-Don't forget to close the function by
+data structures. Don't forget to close the function by
@code{.cfi_endproc}.
+Unless @code{.cfi_startproc} is used along with parameter @code{simple}
+it also emits some architecture dependent initial CFI instructions.
+
@section @code{.cfi_endproc}
@cindex @code{cfi_endproc} directive
@code{.cfi_endproc} is used at the end of a function where it closes its
unwind entry previously opened by
-@code{.cfi_startproc}. and emits it to @code{.eh_frame}.
+@code{.cfi_startproc}, and emits it to @code{.eh_frame}.
+
+@section @code{.cfi_personality @var{encoding} [, @var{exp}]}
+@code{.cfi_personality} defines personality routine and its encoding.
+@var{encoding} must be a constant determining how the personality
+should be encoded. If it is 255 (@code{DW_EH_PE_omit}), second
+argument is not present, otherwise second argument should be
+a constant or a symbol name. When using indirect encodings,
+the symbol provided should be the location where personality
+can be loaded from, not the personality routine itself.
+The default after @code{.cfi_startproc} is @code{.cfi_personality 0xff},
+no personality routine.
+
+@section @code{.cfi_lsda @var{encoding} [, @var{exp}]}
+@code{.cfi_lsda} defines LSDA and its encoding.
+@var{encoding} must be a constant determining how the LSDA
+should be encoded. If it is 255 (@code{DW_EH_PE_omit}), second
+argument is not present, otherwise second argument should be a constant
+or a symbol name. The default after @code{.cfi_startproc} is @code{.cfi_lsda 0xff},
+no LSDA.
@section @code{.cfi_def_cfa @var{register}, @var{offset}}
@code{.cfi_def_cfa} defines a rule for computing CFA as: @i{take
@@ -4102,6 +4166,31 @@ using the known displacement of the CFA register from the CFA.
This is often easier to use, because the number will match the
code it's annotating.
+@section @code{.cfi_register @var{register1}, @var{register2}}
+Previous value of @var{register1} is saved in register @var{register2}.
+
+@section @code{.cfi_restore @var{register}}
+@code{.cfi_restore} says that the rule for @var{register} is now the
+same as it was at the beginning of the function, after all initial
+instruction added by @code{.cfi_startproc} were executed.
+
+@section @code{.cfi_undefined @var{register}}
+From now on the previous value of @var{register} can't be restored anymore.
+
+@section @code{.cfi_same_value @var{register}}
+Current value of @var{register} is the same like in the previous frame,
+i.e. no restoration needed.
+
+@section @code{.cfi_remember_state},
+First save all current rules for all registers by @code{.cfi_remember_state},
+then totally screw them up by subsequent @code{.cfi_*} directives and when
+everything is hopelessly bad, use @code{.cfi_restore_state} to restore
+the previous saved state.
+
+@section @code{.cfi_return_column @var{register}}
+Change return column @var{register}, i.e. the return address is either
+directly in @var{register} or can be accessed by rules for @var{register}.
+
@section @code{.cfi_signal_frame}
Mark current function as signal trampoline.
@@ -4121,9 +4210,9 @@ to the @code{.debug_line} file name table. The @var{fileno} operand should
be a unique positive integer to use as the index of the entry in the table.
The @var{filename} operand is a C string literal.
-The detail of filename indicies is exposed to the user because the filename
+The detail of filename indices is exposed to the user because the filename
table is shared with the @code{.debug_info} section of the dwarf2 debugging
-information, and thus the user must know the exact indicies that table
+information, and thus the user must know the exact indices that table
entries will have.
@section @code{.loc @var{fileno} @var{lineno} [@var{column}] [@var{options}]}
@@ -4262,7 +4351,7 @@ Force a page break at this point, when generating assembly listings.
@cindex @code{else} directive
@code{.else} is part of the @command{@value{AS}} support for conditional
-assembly; @pxref{If,,@code{.if}}. It marks the beginning of a section
+assembly; see @ref{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.
@@ -4271,7 +4360,7 @@ was false.
@cindex @code{elseif} directive
@code{.elseif} is part of the @command{@value{AS}} support for conditional
-assembly; @pxref{If,,@code{.if}}. It is shorthand for beginning a new
+assembly; see @ref{If,,@code{.if}}. It is shorthand for beginning a new
@code{.if} block that would otherwise fill the entire @code{.else} section.
@node End
@@ -4316,7 +4405,7 @@ conditionally. @xref{If,,@code{.if}}.
@cindex assigning values to symbols
@cindex symbols, assigning values to
This directive sets the value of @var{symbol} to @var{expression}.
-It is synonymous with @samp{.set}; @pxref{Set,,@code{.set}}.
+It is synonymous with @samp{.set}; see @ref{Set,,@code{.set}}.
@ifset HPPA
The syntax for @code{equ} on the HPPA is
@@ -4327,8 +4416,8 @@ The syntax for @code{equ} on the HPPA is
The syntax for @code{equ} on the Z80 is
@samp{@var{symbol} equ @var{expression}}.
On the Z80 it is an eror if @var{symbol} is already defined,
-but the symbol is not protected from later redefinition,
-compare @xref{Equiv}.
+but the symbol is not protected from later redefinition.
+Compare @ref{Equiv}.
@end ifset
@node Equiv
@@ -4484,7 +4573,7 @@ compatibility with other assemblers.
@ifset HPPA
On the HPPA, @code{.global} is not always enough to make it accessible to other
partial programs. You may need the HPPA-only @code{.EXPORT} directive as well.
-@xref{HPPA Directives,, HPPA Assembler Directives}.
+@xref{HPPA Directives, ,HPPA Assembler Directives}.
@end ifset
@ifset ELF
@@ -4721,8 +4810,7 @@ is equivalent to assembling
move d3,sp@@-
@end example
-For some caveats with the spelling of @var{symbol}, see also the discussion
-at @xref{Macro}.
+For some caveats with the spelling of @var{symbol}, see also @ref{Macro}.
@node Irpc
@section @code{.irpc @var{symbol},@var{values}}@dots{}
@@ -4907,7 +4995,7 @@ the initial value of the listing counter is one.
@section @code{.long @var{expressions}}
@cindex @code{long} directive
-@code{.long} is the same as @samp{.int}, @pxref{Int,,@code{.int}}.
+@code{.long} is the same as @samp{.int}. @xref{Int,,@code{.int}}.
@ignore
@c no one seems to know what this is for or whether this description is
@@ -4971,7 +5059,7 @@ indicate whether all invocations must specify a non-blank value (through
(through @samp{:@code{vararg}}). You can supply a default value for any
macro argument by following the name with @samp{=@var{deflt}}. You
cannot define two macros with the same @var{macname} unless it has been
-subject to the @code{.purgem} directive (@xref{Purgem}.) between the two
+subject to the @code{.purgem} directive (@pxref{Purgem}) between the two
definitions. For example, these are all valid @code{.macro} statements:
@table @code
@@ -4979,7 +5067,7 @@ definitions. For example, these are all valid @code{.macro} statements:
Begin the definition of a macro called @code{comm}, which takes no
arguments.
-@item .macro plus1 p, p1
+@item .macro plus1 p, p1
@itemx .macro plus1 p p1
Either statement begins the definition of a macro called @code{plus1},
which takes two arguments; within the macro definition, write
@@ -4993,7 +5081,6 @@ After the definition is complete, you can call the macro either as
@var{a} and @samp{\p2} evaluating to @var{b}), or as @samp{reserve_str
,@var{b}} (with @samp{\p1} evaluating as the default, in this case
@samp{0}, and @samp{\p2} evaluating to @var{b}).
-@end table
@item .macro m p1:req, p2=0, p3:vararg
Begin the definition of a macro called @code{m}, with at least three
@@ -5005,21 +5092,72 @@ When you call a macro, you can specify the argument values either by
position, or by keyword. For example, @samp{sum 9,17} is equivalent to
@samp{sum to=17, from=9}.
+@end table
+
Note that since each of the @var{macargs} can be an identifier exactly
as any other one permitted by the target architecture, there may be
occasional problems if the target hand-crafts special meanings to certain
-characters when they occur in a special position. For example, if colon
+characters when they occur in a special position. For example, if the colon
(@code{:}) is generally permitted to be part of a symbol name, but the
-architecture specific code special-cases it when occuring as the final
+architecture specific code special-cases it when occurring as the final
character of a symbol (to denote a label), then the macro parameter
replacement code will have no way of knowing that and consider the whole
construct (including the colon) an identifier, and check only this
-identifier for being the subject to parameter substitution. In this
-example, besides the potential of just separating identifier and colon
-by white space, using alternate macro syntax (@xref{Altmacro}.) and
-ampersand (@code{&}) as the character to separate literal text from macro
-parameters (or macro parameters from one another) would provide a way to
-achieve the same effect:
+identifier for being the subject to parameter substitution. So for example
+this macro definition:
+
+@example
+ .macro label l
+\l:
+ .endm
+@end example
+
+might not work as expected. Invoking @samp{label foo} might not create a label
+called @samp{foo} but instead just insert the text @samp{\l:} into the
+assembler source, probably generating an error about an unrecognised
+identifier.
+
+Similarly problems might occur with the period character (@samp{.})
+which is often allowed inside opcode names (and hence identifier names). So
+for example constructing a macro to build an opcode from a base name and a
+length specifier like this:
+
+@example
+ .macro opcode base length
+ \base.\length
+ .endm
+@end example
+
+and invoking it as @samp{opcode store l} will not create a @samp{store.l}
+instruction but instead generate some kind of error as the assembler tries to
+interpret the text @samp{\base.\length}.
+
+There are several possible ways around this problem:
+
+@table @code
+@item Insert white space
+If it is possible to use white space characters then this is the simplest
+solution. eg:
+
+@example
+ .macro label l
+\l :
+ .endm
+@end example
+
+@item Use @samp{\()}
+The string @samp{\()} can be used to separate the end of a macro argument from
+the following text. eg:
+
+@example
+ .macro opcode base length
+ \base\().\length
+ .endm
+@end example
+
+@item Use the alternate macro syntax mode
+In the alternative macro syntax mode the ampersand character (@samp{&}) can be
+used as a separator. eg:
@example
.altmacro
@@ -5027,9 +5165,11 @@ achieve the same effect:
l&:
.endm
@end example
+@end table
-This applies identically to the identifiers used in @code{.irp} (@xref{Irp}.)
-and @code{.irpc} (@xref{Irpc}.).
+Note: this problem of correctly identifying string parameters to pseudo ops
+also applies to the identifiers used in @code{.irp} (@pxref{Irp})
+and @code{.irpc} (@pxref{Irpc}) as well.
@item .endm
@cindex @code{endm} directive
@@ -5071,7 +5211,7 @@ You can write strings delimited in these other ways besides
@table @code
@item '@var{string}'
-You can delimit strings with single-quote charaters.
+You can delimit strings with single-quote characters.
@item <@var{string}>
You can delimit strings with matching angle brackets.
@@ -5090,7 +5230,7 @@ and use the result as a string.
@node Noaltmacro
@section @code{.noaltmacro}
-Disable alternate macro mode. @ref{Altmacro}
+Disable alternate macro mode. @xref{Altmacro}.
@node Nolist
@section @code{.nolist}
@@ -5314,6 +5454,20 @@ warning message; and just takes the lowest order 16 bytes of the bignum.
@cindex integer, 16-byte
@end ifset
+@node Reloc
+@section @code{.reloc @var{offset}, @var{reloc_name}[, @var{expression}]}
+
+@cindex @code{reloc} directive
+Generate a relocation at @var{offset} of type @var{reloc_name} with value
+@var{expression}. If @var{offset} is a number, the relocation is generated in
+the current section. If @var{offset} is an expression that resolves to a
+symbol plus offset, the relocation is generated in the given symbol's section.
+@var{expression}, if present, must resolve to a symbol plus addend or to an
+absolute value, but note that not all targets support an addend. e.g. ELF REL
+targets such as i386 store an addend in the section contents rather than in the
+relocation. This low level interface does not support addends stored in the
+section.
+
@node Rept
@section @code{.rept @var{count}}
@@ -5487,7 +5641,7 @@ ARM) then another character is used instead. For example the ARM port uses the
@code{%} character.
If @var{flags} contains the @code{M} symbol then the @var{type} argument must
-be specified as well as an extra argument - @var{entsize} - like this:
+be specified as well as an extra argument---@var{entsize}---like this:
@smallexample
.section @var{name} , "@var{flags}"M, @@@var{type}, @var{entsize}
@@ -5516,7 +5670,7 @@ indicates that only one copy of this section should be retained
an alias for comdat
@end table
-Note - if both the @var{M} and @var{G} flags are present then the fields for
+Note: if both the @var{M} and @var{G} flags are present then the fields for
the Merge flag should come first, like this:
@smallexample
@@ -5589,7 +5743,7 @@ On Z80 @code{set} is a real instruction, use
@xref{Word,,@code{.word}}.
In some configurations, however, @code{.short} and @code{.word} generate
-numbers of different lengths; @pxref{Machine Dependencies}.
+numbers of different lengths. @xref{Machine Dependencies}.
@end ifset
@ifclear GENERIC
@ifset W16
@@ -5672,7 +5826,7 @@ symbols.
@cindex @code{sleb128} directive
@var{sleb128} stands for ``signed little endian base 128.'' This is a
compact, variable length representation of numbers used by the DWARF
-symbolic debugging format. @xref{Uleb128,@code{.uleb128}}.
+symbolic debugging format. @xref{Uleb128, ,@code{.uleb128}}.
@ifclear no-space-dir
@node Skip
@@ -5964,9 +6118,21 @@ For ELF targets, the @code{.type} directive is used like this:
This sets the type of symbol @var{name} to be either a
function symbol or an object symbol. There are five different syntaxes
supported for the @var{type description} field, in order to provide
-compatibility with various other assemblers. The syntaxes supported are:
+compatibility with various other assemblers.
+
+Because some of the characters used in these syntaxes (such as @samp{@@} and
+@samp{#}) are comment characters for some architectures, some of the syntaxes
+below do not work on all architectures. The first variant will be accepted by
+the GNU assembler on all architectures so that variant should be used for
+maximum portability, if you do not need to assemble your code with other
+assemblers.
+
+The syntaxes supported are:
@smallexample
+ .type <name> STT_FUNCTION
+ .type <name> STT_OBJECT
+
.type <name>,#function
.type <name>,#object
@@ -5978,9 +6144,6 @@ compatibility with various other assemblers. The syntaxes supported are:
.type <name>,"function"
.type <name>,"object"
-
- .type <name> STT_FUNCTION
- .type <name> STT_OBJECT
@end smallexample
@end ifset
@end ifset
@@ -5991,7 +6154,7 @@ compatibility with various other assemblers. The syntaxes supported are:
@cindex @code{uleb128} directive
@var{uleb128} stands for ``unsigned little endian base 128.'' This is a
compact, variable length representation of numbers used by the DWARF
-symbolic debugging format. @xref{Sleb128,@code{.sleb128}}.
+symbolic debugging format. @xref{Sleb128, ,@code{.sleb128}}.
@ifset COFF
@node Val
@@ -6034,7 +6197,7 @@ This directive finds or creates a symbol @code{table} and creates a
This directive finds the symbol @code{child} and finds or creates the symbol
@code{parent} and then creates a @code{VTABLE_INHERIT} relocation for the
parent whose addend is the value of the child symbol. As a special case the
-parent name of @code{0} is treated as refering the @code{*ABS*} section.
+parent name of @code{0} is treated as referring to the @code{*ABS*} section.
@end ifset
@node Warning
@@ -6182,9 +6345,15 @@ subject, see the hardware manufacturer's manual.
@ifset ARM
* ARM-Dependent:: ARM Dependent Features
@end ifset
+@ifset AVR
+* AVR-Dependent:: AVR Dependent Features
+@end ifset
@ifset BFIN
* BFIN-Dependent:: BFIN Dependent Features
@end ifset
+@ifset CR16
+* CR16-Dependent:: CR16 Dependent Features
+@end ifset
@ifset CRIS
* CRIS-Dependent:: CRIS Dependent Features
@end ifset
@@ -6298,10 +6467,18 @@ subject, see the hardware manufacturer's manual.
@include c-arm.texi
@end ifset
+@ifset AVR
+@include c-avr.texi
+@end ifset
+
@ifset BFIN
@include c-bfin.texi
@end ifset
+@ifset CR16
+@include c-cr16.texi
+@end ifset
+
@ifset CRIS
@include c-cris.texi
@end ifset
@@ -6508,8 +6685,10 @@ You can find contact information for many support companies and
individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
+@ifset BUGURL
In any event, we also recommend that you send bug reports for @command{@value{AS}}
-to @samp{bug-binutils@@gnu.org}.
+to @value{BUGURL}.
+@end ifset
The fundamental principle of reporting bugs usefully is this:
@strong{report all the facts}. If you are not sure whether to state a
@@ -6583,7 +6762,7 @@ 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
-@command{@value{AS}} is out of synch, or you have encountered a bug in the C
+@command{@value{AS}} is out of sync, 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
@@ -6736,7 +6915,7 @@ Timothy Wall, Michael Hayes, and Greg Smart contributed to the various tic*
flavors.
David Heine, Sterling Augustine, Bob Wilson and John Ruttenberg from Tensilica,
-Inc. added support for Xtensa processors.
+Inc.@: added support for Xtensa processors.
Several engineers at Cygnus Support have also provided many small bug fixes and
configuration enhancements.
@@ -6748,12 +6927,11 @@ intentionally leaving anyone out.
@include fdl.texi
-@node Index
-@unnumbered Index
+@node AS Index
+@unnumbered AS Index
@printindex cp
-@contents
@bye
@c Local Variables:
@c fill-column: 79
diff --git a/contrib/binutils/gas/doc/c-arc.texi b/contrib/binutils/gas/doc/c-arc.texi
index 04544d1..7f8ed6e 100644
--- a/contrib/binutils/gas/doc/c-arc.texi
+++ b/contrib/binutils/gas/doc/c-arc.texi
@@ -230,7 +230,7 @@ Determines the kinds of suffixes to be allowed. Valid values are
@code{SUFFIX_FLAG} which indicates the absence or presence of
conditional suffixes and flag setting by the extension instruction.
It is also possible to specify that an instruction sets the flags and
-is conditional by using @code{SUFFIX_CODE} | @code{SUFFIX_FLAG}.
+is condtional by using @code{SUFFIX_CODE} | @code{SUFFIX_FLAG}.
@item @var{syntaxclass}
Determines the syntax class for the instruction. It can have the
@@ -251,7 +251,7 @@ Syntax Class Modifiers are:
@item @code{OP1_MUST_BE_IMM}:
Modifies syntax class SYNTAX_3OP, specifying that the first operand
-of a three-operand instruction must be an immediate (i.e. the result
+of a three-operand instruction must be an immediate (i.e., the result
is discarded). OP1_MUST_BE_IMM is used by bitwise ORing it with
SYNTAX_3OP as given in the example below. This could usually be used
to set the flags using specific instructions and not retain results.
diff --git a/contrib/binutils/gas/doc/c-arm.texi b/contrib/binutils/gas/doc/c-arm.texi
index ca0998b..8fc2972 100644
--- a/contrib/binutils/gas/doc/c-arm.texi
+++ b/contrib/binutils/gas/doc/c-arm.texi
@@ -155,9 +155,9 @@ names are recognized:
@code{armv6z},
@code{armv6zk},
@code{armv7},
-@code{armv7a},
-@code{armv7r},
-@code{armv7m},
+@code{armv7-a},
+@code{armv7-r},
+@code{armv7-m},
@code{iwmmxt}
and
@code{xscale}.
@@ -254,7 +254,7 @@ and
@item -meabi=@var{ver}
This option specifies which EABI version the produced object files should
conform to.
-The following values are recognised:
+The following values are recognized:
@code{gnu},
@code{4}
and
@@ -284,6 +284,7 @@ as position-independent code (PIC).
@menu
* ARM-Chars:: Special Characters
* ARM-Regs:: Register Names
+* ARM-Relocations:: Relocations
@end menu
@node ARM-Chars
@@ -323,7 +324,46 @@ Either @samp{#} or @samp{$} can be used to indicate immediate operands.
@cindex ARM floating point (@sc{ieee})
The ARM family uses @sc{ieee} floating-point numbers.
+@node ARM-Relocations
+@subsection ARM relocation generation
+
+@cindex data relocations, ARM
+@cindex ARM data relocations
+Specific data relocations can be generated by putting the relocation name
+in parentheses after the symbol name. For example:
+
+@smallexample
+ .word foo(TARGET1)
+@end smallexample
+
+This will generate an @samp{R_ARM_TARGET1} relocation against the symbol
+@var{foo}.
+The following relocations are supported:
+@code{GOT},
+@code{GOTOFF},
+@code{TARGET1},
+@code{TARGET2},
+@code{SBREL},
+@code{TLSGD},
+@code{TLSLDM},
+@code{TLSLDO},
+@code{GOTTPOFF}
+and
+@code{TPOFF}.
+
+For compatibility with older toolchains the assembler also accepts
+@code{(PLT)} after branch targets. This will generate the deprecated
+@samp{R_ARM_PLT32} relocation.
+@cindex MOVW and MOVT relocations, ARM
+Relocations for @samp{MOVW} and @samp{MOVT} instructions can be generated
+by prefixing the value with @samp{#:lower16:} and @samp{#:upper16}
+respectively. For example to load the 32-bit address of foo into r0:
+
+@smallexample
+ MOVW r0, #:lower16:foo
+ MOVT r0, #:upper16:foo
+@end smallexample
@node ARM Directives
@section ARM Machine Directives
@@ -351,7 +391,7 @@ example:
@cindex @code{unreq} directive, ARM
@item .unreq @var{alias-name}
This undefines a register alias which was previously defined using the
-@code{req} directive. For example:
+@code{req}, @code{dn} or @code{qn} directives. For example:
@smallexample
foo .req r0
@@ -362,6 +402,36 @@ An error occurs if the name is undefined. Note - this pseudo op can
be used to delete builtin in register name aliases (eg 'r0'). This
should only be done if it is really necessary.
+@cindex @code{dn} and @code{qn} directives, ARM
+@item @var{name} .dn @var{register name} [@var{.type}] [@var{[index]}]
+@item @var{name} .qn @var{register name} [@var{.type}] [@var{[index]}]
+
+The @code{dn} and @code{qn} directives are used to create typed
+and/or indexed register aliases for use in Advanced SIMD Extension
+(Neon) instructions. The former should be used to create aliases
+of double-precision registers, and the latter to create aliases of
+quad-precision registers.
+
+If these directives are used to create typed aliases, those aliases can
+be used in Neon instructions instead of writing types after the mnemonic
+or after each operand. For example:
+
+@smallexample
+ x .dn d2.f32
+ y .dn d3.f32
+ z .dn d4.f32[1]
+ vmul x,y,z
+@end smallexample
+
+This is equivalent to writing the following:
+
+@smallexample
+ vmul.f32 d2,d3,d4[1]
+@end smallexample
+
+Aliases created using @code{dn} or @code{qn} can be destroyed using
+@code{unreq}.
+
@cindex @code{code} directive, ARM
@item .code @code{[16|32]}
This directive selects the instruction set being generated. The value 16
@@ -389,6 +459,9 @@ between Arm and Thumb instructions and should be used even if
interworking is not going to be performed. The presence of this
directive also implies @code{.thumb}
+This directive is not neccessary when generating EABI objects. On these
+targets the encoding is implicit when generating Thumb code.
+
@cindex @code{thumb_set} directive, ARM
@item .thumb_set
This performs the equivalent of a @code{.set} directive in that it
@@ -466,7 +539,7 @@ instruction.
sfmfd f4, 2, [sp]!
@exdent @emph{VFP registers}
.save @{d8, d9, d10@}
- fstmdf sp!, @{d8, d9, d10@}
+ fstmdx sp!, @{d8, d9, d10@}
@exdent @emph{iWMMXt registers}
.save @{wr10, wr11@}
wstrd wr11, [sp, #-8]!
@@ -478,6 +551,26 @@ or
wstrd wr10, [sp, #-8]!
@end smallexample
+@cindex @code{.vsave} directive, ARM
+@item .vsave @var{vfp-reglist}
+Generate unwinder annotations to restore the VFP registers in @var{vfp-reglist}
+using FLDMD. Also works for VFPv3 registers
+that are to be restored using VLDM.
+The format of @var{vfp-reglist} is the same as the corresponding store-multiple
+instruction.
+
+@smallexample
+@exdent @emph{VFP registers}
+ .vsave @{d8, d9, d10@}
+ fstmdd sp!, @{d8, d9, d10@}
+@exdent @emph{VFPv3 registers}
+ .vsave @{d15, d16, d17@}
+ vstm sp!, @{d15, d16, d17@}
+@end smallexample
+
+Since FLDMX and FSTMX are now deprecated, this directive should be
+used in favour of @code{.save} for saving VFP registers for ARMv6 and above.
+
@cindex @code{.pad} directive, ARM
@item .pad #@var{count}
Generate unwinder annotations for a stack adjustment of @var{count} bytes.
@@ -485,8 +578,10 @@ A positive value indicates the function prologue allocated stack space by
decrementing the stack pointer.
@cindex @code{.movsp} directive, ARM
-@item .movsp @var{reg}
-Tell the unwinder that @var{reg} contains the current stack pointer.
+@item .movsp @var{reg} [, #@var{offset}]
+Tell the unwinder that @var{reg} contains an offset from the current
+stack pointer. If @var{offset} is not specified then it is assumed to be
+zero.
@cindex @code{.setfp} directive, ARM
@item .setfp @var{fpreg}, @var{spreg} [, #@var{offset}]
@@ -523,6 +618,12 @@ for the @option{-mcpu} commandline option.
Select the target architecture. Valid values for @var{name} are the same as
for the @option{-march} commandline option.
+@cindex @code{.object_arch} directive, ARM
+@item .object_arch @var{name}
+Override the architecture recorded in the EABI object attribute section.
+Valid values for @var{name} are the same as for the @code{.arch} directive.
+Typically this is useful when code uses runtime detection of CPU features.
+
@cindex @code{.fpu} directive, ARM
@item .fpu @var{name}
Select the floating point unit to assemble for. Valid values for @var{name}
diff --git a/contrib/binutils/gas/doc/c-avr.texi b/contrib/binutils/gas/doc/c-avr.texi
new file mode 100644
index 0000000..9bf743d
--- /dev/null
+++ b/contrib/binutils/gas/doc/c-avr.texi
@@ -0,0 +1,364 @@
+@c Copyright 2006
+@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 AVR-Dependent
+@chapter AVR Dependent Features
+@end ifset
+
+@ifclear GENERIC
+@node Machine Dependencies
+@chapter AVR Dependent Features
+@end ifclear
+
+@cindex AVR support
+@menu
+* AVR Options:: Options
+* AVR Syntax:: Syntax
+* AVR Opcodes:: Opcodes
+@end menu
+
+@node AVR Options
+@section Options
+@cindex AVR options (none)
+@cindex options for AVR (none)
+
+@table @code
+
+@cindex @code{-mmcu=} command line option, AVR
+@item -mmcu=@var{mcu}
+Specify ATMEL AVR instruction set or MCU type.
+
+Instruction set avr1 is for the minimal AVR core, not supported by the C
+compiler, only for assembler programs (MCU types: at90s1200, attiny10,
+attiny11, attiny12, attiny15, attiny28).
+
+Instruction set avr2 (default) is for the classic AVR core with up to
+8K program memory space (MCU types: at90s2313, at90s2323, attiny22,
+attiny26, at90s2333, at90s2343, at90s4414, at90s4433, at90s4434,
+at90s8515, at90c8534, at90s8535, at86rf401, attiny13, attiny2313,
+attiny261, attiny461, attiny861, attiny24, attiny44, attiny84, attiny25,
+attiny45, attiny85).
+
+Instruction set avr3 is for the classic AVR core with up to 128K program
+memory space (MCU types: atmega103, atmega603, at43usb320, at43usb355,
+at76c711).
+
+Instruction set avr4 is for the enhanced AVR core with up to 8K program
+memory space (MCU types: atmega48, atmega8, atmega83, atmega85, atmega88,
+atmega8515, atmega8535, atmega8hva, at90pwm1, at90pwm2, at90pwm3).
+
+Instruction set avr5 is for the enhanced AVR core with up to 128K program
+memory space (MCU types: atmega16, atmega161, atmega162, atmega163,
+atmega164p, atmega165, atmega165p, atmega168, atmega169, atmega169p,
+atmega32, atmega323, atmega324p, atmega325, atmega325p, atmega329,
+atmega329p, atmega3250, atmega3250p, atmega3290, atmega3290p, atmega406,
+atmega64, atmega640, atmega644, atmega644p, atmega128, atmega1280,
+atmega1281, atmega645, atmega649, atmega6450, atmega6490, atmega16hva,
+at90can32, at90can64, at90can128, at90usb82, at90usb162, at90usb646,
+at90usb647, at90usb1286, at90usb1287, at94k).
+
+Instruction set avr6 is for the enhanced AVR core with 256K program
+memory space (MCU types: atmega2560, atmega2561).
+
+@cindex @code{-mall-opcodes} command line option, AVR
+@item -mall-opcodes
+Accept all AVR opcodes, even if not supported by @code{-mmcu}.
+
+@cindex @code{-mno-skip-bug} command line option, AVR
+@item -mno-skip-bug
+This option disable warnings for skipping two-word instructions.
+
+@cindex @code{-mno-wrap} command line option, AVR
+@item -mno-wrap
+This option reject @code{rjmp/rcall} instructions with 8K wrap-around.
+
+@end table
+
+
+@node AVR Syntax
+@section Syntax
+@menu
+* AVR-Chars:: Special Characters
+* AVR-Regs:: Register Names
+* AVR-Modifiers:: Relocatable Expression Modifiers
+@end menu
+
+@node AVR-Chars
+@subsection Special Characters
+
+@cindex line comment character, AVR
+@cindex AVR line comment character
+
+The presence of a @samp{;} on a line indicates the start of a comment
+that extends to the end of the current line. If a @samp{#} appears as
+the first character of a line, the whole line is treated as a comment.
+
+@cindex line separator, AVR
+@cindex statement separator, AVR
+@cindex AVR line separator
+
+The @samp{$} character can be used instead of a newline to separate
+statements.
+
+@node AVR-Regs
+@subsection Register Names
+
+@cindex AVR register names
+@cindex register names, AVR
+
+The AVR has 32 x 8-bit general purpose working registers @samp{r0},
+@samp{r1}, ... @samp{r31}.
+Six of the 32 registers can be used as three 16-bit indirect address
+register pointers for Data Space addressing. One of the these address
+pointers can also be used as an address pointer for look up tables in
+Flash program memory. These added function registers are the 16-bit
+@samp{X}, @samp{Y} and @samp{Z} - registers.
+
+@smallexample
+X = @r{r26:r27}
+Y = @r{r28:r29}
+Z = @r{r30:r31}
+@end smallexample
+
+@node AVR-Modifiers
+@subsection Relocatable Expression Modifiers
+
+@cindex AVR modifiers
+@cindex syntax, AVR
+
+The assembler supports several modifiers when using relocatable addresses
+in AVR instruction operands. The general syntax is the following:
+
+@smallexample
+modifier(relocatable-expression)
+@end smallexample
+
+@table @code
+@cindex symbol modifiers
+
+@item lo8
+
+This modifier allows you to use bits 0 through 7 of
+an address expression as 8 bit relocatable expression.
+
+@item hi8
+
+This modifier allows you to use bits 7 through 15 of an address expression
+as 8 bit relocatable expression. This is useful with, for example, the
+AVR @samp{ldi} instruction and @samp{lo8} modifier.
+
+For example
+
+@smallexample
+ldi r26, lo8(sym+10)
+ldi r27, hi8(sym+10)
+@end smallexample
+
+@item hh8
+
+This modifier allows you to use bits 16 through 23 of
+an address expression as 8 bit relocatable expression.
+Also, can be useful for loading 32 bit constants.
+
+@item hlo8
+
+Synonym of @samp{hh8}.
+
+@item hhi8
+
+This modifier allows you to use bits 24 through 31 of
+an expression as 8 bit expression. This is useful with, for example, the
+AVR @samp{ldi} instruction and @samp{lo8}, @samp{hi8}, @samp{hlo8},
+@samp{hhi8}, modifier.
+
+For example
+
+@smallexample
+ldi r26, lo8(285774925)
+ldi r27, hi8(285774925)
+ldi r28, hlo8(285774925)
+ldi r29, hhi8(285774925)
+; r29,r28,r27,r26 = 285774925
+@end smallexample
+
+@item pm_lo8
+
+This modifier allows you to use bits 0 through 7 of
+an address expression as 8 bit relocatable expression.
+This modifier useful for addressing data or code from
+Flash/Program memory. The using of @samp{pm_lo8} similar
+to @samp{lo8}.
+
+@item pm_hi8
+
+This modifier allows you to use bits 8 through 15 of
+an address expression as 8 bit relocatable expression.
+This modifier useful for addressing data or code from
+Flash/Program memory.
+
+@item pm_hh8
+
+This modifier allows you to use bits 15 through 23 of
+an address expression as 8 bit relocatable expression.
+This modifier useful for addressing data or code from
+Flash/Program memory.
+
+@end table
+
+@node AVR Opcodes
+@section Opcodes
+
+@cindex AVR opcode summary
+@cindex opcode summary, AVR
+@cindex mnemonics, AVR
+@cindex instruction summary, AVR
+For detailed information on the AVR machine instruction set, see
+@url{www.atmel.com/products/AVR}.
+
+@code{@value{AS}} implements all the standard AVR opcodes.
+The following table summarizes the AVR opcodes, and their arguments.
+
+@smallexample
+@i{Legend:}
+ r @r{any register}
+ d @r{`ldi' register (r16-r31)}
+ v @r{`movw' even register (r0, r2, ..., r28, r30)}
+ a @r{`fmul' register (r16-r23)}
+ w @r{`adiw' register (r24,r26,r28,r30)}
+ e @r{pointer registers (X,Y,Z)}
+ b @r{base pointer register and displacement ([YZ]+disp)}
+ z @r{Z pointer register (for [e]lpm Rd,Z[+])}
+ M @r{immediate value from 0 to 255}
+ n @r{immediate value from 0 to 255 ( n = ~M ). Relocation impossible}
+ s @r{immediate value from 0 to 7}
+ P @r{Port address value from 0 to 63. (in, out)}
+ p @r{Port address value from 0 to 31. (cbi, sbi, sbic, sbis)}
+ K @r{immediate value from 0 to 63 (used in `adiw', `sbiw')}
+ i @r{immediate value}
+ l @r{signed pc relative offset from -64 to 63}
+ L @r{signed pc relative offset from -2048 to 2047}
+ h @r{absolute code address (call, jmp)}
+ S @r{immediate value from 0 to 7 (S = s << 4)}
+ ? @r{use this opcode entry if no parameters, else use next opcode entry}
+
+1001010010001000 clc
+1001010011011000 clh
+1001010011111000 cli
+1001010010101000 cln
+1001010011001000 cls
+1001010011101000 clt
+1001010010111000 clv
+1001010010011000 clz
+1001010000001000 sec
+1001010001011000 seh
+1001010001111000 sei
+1001010000101000 sen
+1001010001001000 ses
+1001010001101000 set
+1001010000111000 sev
+1001010000011000 sez
+100101001SSS1000 bclr S
+100101000SSS1000 bset S
+1001010100001001 icall
+1001010000001001 ijmp
+1001010111001000 lpm ?
+1001000ddddd010+ lpm r,z
+1001010111011000 elpm ?
+1001000ddddd011+ elpm r,z
+0000000000000000 nop
+1001010100001000 ret
+1001010100011000 reti
+1001010110001000 sleep
+1001010110011000 break
+1001010110101000 wdr
+1001010111101000 spm
+000111rdddddrrrr adc r,r
+000011rdddddrrrr add r,r
+001000rdddddrrrr and r,r
+000101rdddddrrrr cp r,r
+000001rdddddrrrr cpc r,r
+000100rdddddrrrr cpse r,r
+001001rdddddrrrr eor r,r
+001011rdddddrrrr mov r,r
+100111rdddddrrrr mul r,r
+001010rdddddrrrr or r,r
+000010rdddddrrrr sbc r,r
+000110rdddddrrrr sub r,r
+001001rdddddrrrr clr r
+000011rdddddrrrr lsl r
+000111rdddddrrrr rol r
+001000rdddddrrrr tst r
+0111KKKKddddKKKK andi d,M
+0111KKKKddddKKKK cbr d,n
+1110KKKKddddKKKK ldi d,M
+11101111dddd1111 ser d
+0110KKKKddddKKKK ori d,M
+0110KKKKddddKKKK sbr d,M
+0011KKKKddddKKKK cpi d,M
+0100KKKKddddKKKK sbci d,M
+0101KKKKddddKKKK subi d,M
+1111110rrrrr0sss sbrc r,s
+1111111rrrrr0sss sbrs r,s
+1111100ddddd0sss bld r,s
+1111101ddddd0sss bst r,s
+10110PPdddddPPPP in r,P
+10111PPrrrrrPPPP out P,r
+10010110KKddKKKK adiw w,K
+10010111KKddKKKK sbiw w,K
+10011000pppppsss cbi p,s
+10011010pppppsss sbi p,s
+10011001pppppsss sbic p,s
+10011011pppppsss sbis p,s
+111101lllllll000 brcc l
+111100lllllll000 brcs l
+111100lllllll001 breq l
+111101lllllll100 brge l
+111101lllllll101 brhc l
+111100lllllll101 brhs l
+111101lllllll111 brid l
+111100lllllll111 brie l
+111100lllllll000 brlo l
+111100lllllll100 brlt l
+111100lllllll010 brmi l
+111101lllllll001 brne l
+111101lllllll010 brpl l
+111101lllllll000 brsh l
+111101lllllll110 brtc l
+111100lllllll110 brts l
+111101lllllll011 brvc l
+111100lllllll011 brvs l
+111101lllllllsss brbc s,l
+111100lllllllsss brbs s,l
+1101LLLLLLLLLLLL rcall L
+1100LLLLLLLLLLLL rjmp L
+1001010hhhhh111h call h
+1001010hhhhh110h jmp h
+1001010rrrrr0101 asr r
+1001010rrrrr0000 com r
+1001010rrrrr1010 dec r
+1001010rrrrr0011 inc r
+1001010rrrrr0110 lsr r
+1001010rrrrr0001 neg r
+1001000rrrrr1111 pop r
+1001001rrrrr1111 push r
+1001010rrrrr0111 ror r
+1001010rrrrr0010 swap r
+00000001ddddrrrr movw v,v
+00000010ddddrrrr muls d,d
+000000110ddd0rrr mulsu a,a
+000000110ddd1rrr fmul a,a
+000000111ddd0rrr fmuls a,a
+000000111ddd1rrr fmulsu a,a
+1001001ddddd0000 sts i,r
+1001000ddddd0000 lds r,i
+10o0oo0dddddbooo ldd r,b
+100!000dddddee-+ ld r,e
+10o0oo1rrrrrbooo std b,r
+100!001rrrrree-+ st e,r
+1001010100011001 eicall
+1001010000011001 eijmp
+@end smallexample
diff --git a/contrib/binutils/gas/doc/c-cr16.texi b/contrib/binutils/gas/doc/c-cr16.texi
new file mode 100644
index 0000000..4748d56
--- /dev/null
+++ b/contrib/binutils/gas/doc/c-cr16.texi
@@ -0,0 +1,80 @@
+@c Copyright 2007 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 CR16-Dependent
+@chapter CR16 Dependent Features
+@end ifset
+@ifclear GENERIC
+@node Machine Dependencies
+@chapter CR16 Dependent Features
+@end ifclear
+
+@cindex CR16 support
+@menu
+* CR16 Operand Qualifiers:: CR16 Machine Operand Qualifiers
+@end menu
+
+@node CR16 Operand Qualifiers
+@section CR16 Operand Qualifiers
+@cindex CR16 Operand Qualifiers
+
+The National Semiconductor CR16 target of @code{@value{AS}} has a few machine dependent operand qualifiers.
+
+Operand expression type qualifier is an optional field in the instruction operand, to determines the type of the expression field of an operand. The @code{@@} is required. CR16 architecture uses one of the following expression qualifiers:
+
+@table @code
+@item s
+- @code{Specifies expression operand type as small}
+@item m
+- @code{Specifies expression operand type as medium}
+@item l
+- @code{Specifies expression operand type as large}
+@item c
+- @code{Specifies the CR16 Assembler generates a relocation entry for the operand, where pc has implied bit, the expression is adjusted accordingly. The linker uses the relocation entry to update the operand address at link time.}
+@end table
+
+CR16 target operand qualifiers and its size (in bits):
+
+@table @samp
+@item Immediate Operand
+- s ---- 4 bits
+@item
+- m ---- 16 bits, for movb and movw instructions.
+@item
+- m ---- 20 bits, movd instructions.
+@item
+- l ---- 32 bits
+
+@item Absolute Operand
+- s ---- Illegal specifier for this operand.
+@item
+- m ---- 20 bits, movd instructions.
+
+@item Displacement Operand
+- s ---- 8 bits
+@item
+- m ---- 16 bits
+@item
+- l ---- 24 bits
+@end table
+
+For example:
+@example
+1 @code{movw $_myfun@@c,r1}
+
+ This loads the address of _myfun, shifted right by 1, into r1.
+
+2 @code{movd $_myfun@@c,(r2,r1)}
+
+ This loads the address of _myfun, shifted right by 1, into register-pair r2-r1.
+
+3 @code{_myfun_ptr:}
+ @code{.long _myfun@@c}
+ @code{loadd _myfun_ptr, (r1,r0)}
+ @code{jal (r1,r0)}
+
+ This .long directive, the address of _myfunc, shifted right by 1 at link time.
+@end example
diff --git a/contrib/binutils/gas/doc/c-i386.texi b/contrib/binutils/gas/doc/c-i386.texi
index 81039c4..48b251a 100644
--- a/contrib/binutils/gas/doc/c-i386.texi
+++ b/contrib/binutils/gas/doc/c-i386.texi
@@ -76,6 +76,49 @@ character, which means that it cannot be used in expressions. The
not disable @samp{/} at the beginning of a line starting a comment, or
affect using @samp{#} for starting a comment.
+@cindex @samp{-march=} option, i386
+@cindex @samp{-march=} option, x86-64
+@item -march=@var{CPU}
+This option specifies an instruction set architecture for generating
+instructions. The following architectures are recognized:
+@code{i8086},
+@code{i186},
+@code{i286},
+@code{i386},
+@code{i486},
+@code{i586},
+@code{i686},
+@code{pentium},
+@code{pentiumpro},
+@code{pentiumii},
+@code{pentiumiii},
+@code{pentium4},
+@code{prescott},
+@code{nocona},
+@code{core},
+@code{core2},
+@code{k6},
+@code{k6_2},
+@code{athlon},
+@code{sledgehammer},
+@code{opteron},
+@code{k8},
+@code{generic32} and
+@code{generic64}.
+
+This option only affects instructions generated by the assembler. The
+@code{.arch} directive will take precedent.
+
+@cindex @samp{-mtune=} option, i386
+@cindex @samp{-mtune=} option, x86-64
+@item -mtune=@var{CPU}
+This option specifies a processor to optimize for. When used in
+conjunction with the @option{-march} option, only instructions
+of the processor specified by the @option{-march} option will be
+generated.
+
+Valid @var{CPU} values are identical to @option{-march=@var{CPU}}.
+
@end table
@node i386-Syntax
@@ -604,7 +647,7 @@ then stores the result in the 4 byte location @samp{mem})
@code{@value{AS}} supports Intel's MMX instruction set (SIMD
instructions for integer data), available on Intel's Pentium MMX
processors and Pentium II processors, AMD's K6 and K6-2 processors,
-Cyrix' M2 processor, and probably others. It also supports AMD's 3DNow!
+Cyrix' M2 processor, and probably others. It also supports AMD's 3DNow!@:
instruction set (SIMD instructions for 32-bit floating point data)
available on AMD's K6-2 processor and possibly others in the future.
@@ -667,7 +710,7 @@ value @samp{4} onto the stack, decrementing @samp{%esp} by 2.
@end smallexample
The same code in a 16-bit code section would generate the machine
-opcode bytes @samp{6a 04} (ie. without the operand size prefix), which
+opcode bytes @samp{6a 04} (i.e., without the operand size prefix), which
is correct since the processor default operand size is assumed to be 16
bits in a 16-bit code section.
@@ -709,8 +752,13 @@ supported on the CPU specified. The choices for @var{cpu_type} are:
@item @samp{i8086} @tab @samp{i186} @tab @samp{i286} @tab @samp{i386}
@item @samp{i486} @tab @samp{i586} @tab @samp{i686} @tab @samp{pentium}
@item @samp{pentiumpro} @tab @samp{pentiumii} @tab @samp{pentiumiii} @tab @samp{pentium4}
-@item @samp{k6} @tab @samp{athlon} @samp{sledgehammer}
-@item @samp{.mmx} @samp{.sse} @samp{.sse2} @samp{.sse3} @samp{.3dnow}
+@item @samp{prescott} @tab @samp{nocona} @tab @samp{core} @tab @samp{core2}
+@item @samp{amdfam10}
+@item @samp{k6} @tab @samp{athlon} @tab @samp{sledgehammer} @tab @samp{k8}
+@item @samp{.mmx} @tab @samp{.sse} @tab @samp{.sse2} @tab @samp{.sse3}
+@item @samp{.ssse3} @tab @samp{.sse4.1} @tab @samp{.sse4.2} @tab @samp{.sse4}
+@item @samp{.sse4a} @tab @samp{.3dnow} @tab @samp{.3dnowa} @tab @samp{.padlock}
+@item @samp{.pacifica} @tab @samp{.svme} @tab @samp{.abm}
@end multitable
Apart from the warning, there are only two other effects on
diff --git a/contrib/binutils/gas/doc/c-mips.texi b/contrib/binutils/gas/doc/c-mips.texi
index 3c70ff2..f92cb00 100644
--- a/contrib/binutils/gas/doc/c-mips.texi
+++ b/contrib/binutils/gas/doc/c-mips.texi
@@ -60,6 +60,18 @@ little-endian output at run time (unlike the other @sc{gnu} development
tools, which must be configured for one or the other). Use @samp{-EB}
to select big-endian output, and @samp{-EL} for little-endian.
+@item -KPIC
+@cindex PIC selection, MIPS
+@cindex @option{-KPIC} option, MIPS
+Generate SVR4-style PIC. This option tells the assembler to generate
+SVR4-style position-independent macro expansions. It also tells the
+assembler to mark the output file as PIC.
+
+@item -mvxworks-pic
+@cindex @option{-mvxworks-pic} option, MIPS
+Generate VxWorks PIC. This option tells the assembler to generate
+VxWorks-style position-independent macro expansions.
+
@cindex MIPS architecture options
@item -mips1
@itemx -mips2
@@ -91,21 +103,38 @@ flags force a certain group of registers to be treated as 32 bits wide at
all times. @samp{-mgp32} controls the size of general-purpose registers
and @samp{-mfp32} controls the size of floating-point registers.
+The @code{.set gp=32} and @code{.set fp=32} directives allow the size
+of registers to be changed for parts of an object. The default value is
+restored by @code{.set gp=default} and @code{.set fp=default}.
+
On some MIPS variants there is a 32-bit mode flag; when this flag is
set, 64-bit instructions generate a trap. Also, some 32-bit OSes only
save the 32-bit registers on a context switch, so it is essential never
to use the 64-bit registers.
@item -mgp64
-Assume that 64-bit general purpose registers are available. This is
-provided in the interests of symmetry with -gp32.
+@itemx -mfp64
+Assume that 64-bit registers are available. This is provided in the
+interests of symmetry with @samp{-mgp32} and @samp{-mfp32}.
+
+The @code{.set gp=64} and @code{.set fp=64} directives allow the size
+of registers to be changed for parts of an object. The default value is
+restored by @code{.set gp=default} and @code{.set fp=default}.
@item -mips16
@itemx -no-mips16
Generate code for the MIPS 16 processor. This is equivalent to putting
-@samp{.set mips16} at the start of the assembly file. @samp{-no-mips16}
+@code{.set mips16} at the start of the assembly file. @samp{-no-mips16}
turns off this option.
+@item -msmartmips
+@itemx -mno-smartmips
+Enables the SmartMIPS extensions to the MIPS32 instruction set, which
+provides a number of new instructions which target smartcard and
+cryptographic applications. This is equivalent to putting
+@code{.set smartmips} at the start of the assembly file.
+@samp{-mno-smartmips} turns off this option.
+
@item -mips3d
@itemx -no-mips3d
Generate code for the MIPS-3D Application Specific Extension.
@@ -120,10 +149,17 @@ This tells the assembler to accept MDMX instructions.
@item -mdsp
@itemx -mno-dsp
-Generate code for the DSP Application Specific Extension.
-This tells the assembler to accept DSP instructions.
+Generate code for the DSP Release 1 Application Specific Extension.
+This tells the assembler to accept DSP Release 1 instructions.
@samp{-mno-dsp} turns off this option.
+@item -mdspr2
+@itemx -mno-dspr2
+Generate code for the DSP Release 2 Application Specific Extension.
+This option implies -mdsp.
+This tells the assembler to accept DSP Release 2 instructions.
+@samp{-mno-dspr2} turns off this option.
+
@item -mmt
@itemx -mno-mt
Generate code for the MT Application Specific Extension.
@@ -202,8 +238,34 @@ rm7000,
rm9000,
10000,
12000,
-mips32-4k,
-sb1
+4kc,
+4km,
+4kp,
+4ksc,
+4kec,
+4kem,
+4kep,
+4ksd,
+m4k,
+m4kp,
+24kc,
+24kf,
+24kx,
+24kec,
+24kef,
+24kex,
+34kc,
+34kf,
+34kx,
+74kc,
+74kf,
+74kx,
+5kc,
+5kf,
+20kc,
+25kf,
+sb1,
+sb1a
@end quotation
@item -mtune=@var{cpu}
@@ -391,13 +453,21 @@ assembly. @code{.set mips@var{n}} affects not only which instructions
are permitted, but also how certain macros are expanded. @code{.set
mips0} restores the @sc{isa} level to its original level: either the
level you selected with command line options, or the default for your
-configuration. You can use this feature to permit specific @sc{r4000}
+configuration. You can use this feature to permit specific @sc{mips3}
instructions while assembling in 32 bit mode. Use this directive with
care!
-The directive @samp{.set mips16} puts the assembler into MIPS 16 mode,
+@cindex MIPS CPU override
+@kindex @code{.set arch=@var{cpu}}
+The @code{.set arch=@var{cpu}} directive provides even finer control.
+It changes the effective CPU target and allows the assembler to use
+instructions specific to a particular CPU. All CPUs supported by the
+@samp{-march} command line option are also selectable by this directive.
+The original value is restored by @code{.set arch=default}.
+
+The directive @code{.set mips16} puts the assembler into MIPS 16 mode,
in which it will assemble instructions for the MIPS 16 processor. Use
-@samp{.set nomips16} to return to normal 32 bit mode.
+@code{.set nomips16} to return to normal 32 bit mode.
Traditional @sc{mips} assemblers do not support this directive.
@@ -407,10 +477,10 @@ Traditional @sc{mips} assemblers do not support this directive.
@kindex @code{.set autoextend}
@kindex @code{.set noautoextend}
By default, MIPS 16 instructions are automatically extended to 32 bits
-when necessary. The directive @samp{.set noautoextend} will turn this
-off. When @samp{.set noautoextend} is in effect, any 32 bit instruction
-must be explicitly extended with the @samp{.e} modifier (e.g.,
-@samp{li.e $4,1000}). The directive @samp{.set autoextend} may be used
+when necessary. The directive @code{.set noautoextend} will turn this
+off. When @code{.set noautoextend} is in effect, any 32 bit instruction
+must be explicitly extended with the @code{.e} modifier (e.g.,
+@code{li.e $4,1000}). The directive @code{.set autoextend} may be used
to once again automatically extend instructions when necessary.
This directive is only meaningful when in MIPS 16 mode. Traditional
@@ -455,6 +525,15 @@ from the MIPS-3D Application Specific Extension from that point on
in the assembly. The @code{.set nomips3d} directive prevents MIPS-3D
instructions from being accepted.
+@cindex SmartMIPS instruction generation override
+@kindex @code{.set smartmips}
+@kindex @code{.set nosmartmips}
+The directive @code{.set smartmips} makes the assembler accept
+instructions from the SmartMIPS Application Specific Extension to the
+MIPS32 @sc{isa} from that point on in the assembly. The
+@code{.set nosmartmips} directive prevents SmartMIPS instructions from
+being accepted.
+
@cindex MIPS MDMX instruction generation override
@kindex @code{.set mdmx}
@kindex @code{.set nomdmx}
@@ -463,13 +542,22 @@ from the MDMX Application Specific Extension from that point on
in the assembly. The @code{.set nomdmx} directive prevents MDMX
instructions from being accepted.
-@cindex MIPS DSP instruction generation override
+@cindex MIPS DSP Release 1 instruction generation override
@kindex @code{.set dsp}
@kindex @code{.set nodsp}
The directive @code{.set dsp} makes the assembler accept instructions
-from the DSP Application Specific Extension from that point on
-in the assembly. The @code{.set nodsp} directive prevents DSP
-instructions from being accepted.
+from the DSP Release 1 Application Specific Extension from that point
+on in the assembly. The @code{.set nodsp} directive prevents DSP
+Release 1 instructions from being accepted.
+
+@cindex MIPS DSP Release 2 instruction generation override
+@kindex @code{.set dspr2}
+@kindex @code{.set nodspr2}
+The directive @code{.set dspr2} makes the assembler accept instructions
+from the DSP Release 2 Application Specific Extension from that point
+on in the assembly. This dirctive implies @code{.set dsp}. The
+@code{.set nodspr2} directive prevents DSP Release 2 instructions from
+being accepted.
@cindex MIPS MT instruction generation override
@kindex @code{.set mt}
diff --git a/contrib/binutils/gas/doc/c-ppc.texi b/contrib/binutils/gas/doc/c-ppc.texi
index 4c9c096..a41e1dd 100644
--- a/contrib/binutils/gas/doc/c-ppc.texi
+++ b/contrib/binutils/gas/doc/c-ppc.texi
@@ -1,4 +1,4 @@
-@c Copyright 2001, 2002, 2003, 2005
+@c Copyright 2001, 2002, 2003, 2005, 2006
@c Free Software Foundation, Inc.
@c This is part of the GAS manual.
@c For copying conditions, see the file as.texinfo.
@@ -58,6 +58,12 @@ Generate code for PowerPC 7400/7410/7450/7455.
@item -mppc64, -m620
Generate code for PowerPC 620/625/630.
+@item -me500, -me500x2
+Generate code for Motorola e500 core complex.
+
+@item -mspe
+Generate code for Motorola SPE instructions.
+
@item -mppc64bridge
Generate code for PowerPC 64, including bridge insns.
@@ -79,6 +85,12 @@ Generate code for Power4 architecture.
@item -mpower5
Generate code for Power5 architecture.
+@item -mpower6
+Generate code for Power6 architecture.
+
+@item -mcell
+Generate code for Cell Broadband Engine architecture.
+
@item -mcom
Generate code Power/PowerPC common instructions.
@@ -92,10 +104,10 @@ Allow symbolic names for registers.
Do not allow symbolic names for registers.
@item -mrelocatable
-Support for GCC's -mrelocatble option.
+Support for GCC's -mrelocatable option.
@item -mrelocatable-lib
-Support for GCC's -mrelocatble-lib option.
+Support for GCC's -mrelocatable-lib option.
@item -memb
Set PPC_EMB bit in ELF flags.
diff --git a/contrib/binutils/gas/doc/gasver.texi b/contrib/binutils/gas/doc/gasver.texi
deleted file mode 100644
index 11d1801..0000000
--- a/contrib/binutils/gas/doc/gasver.texi
+++ /dev/null
@@ -1 +0,0 @@
-@set VERSION 2.17
diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi
index dffdb1e..c63a2db 100644
--- a/contrib/binutils/gas/doc/internals.texi
+++ b/contrib/binutils/gas/doc/internals.texi
@@ -1,6 +1,6 @@
\input texinfo
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001, 2002, 2003, 2004, 2005
+@c 2001, 2002, 2003, 2004, 2005, 2006
@c Free Software Foundation, Inc.
@setfilename internals.info
@node Top
@@ -838,7 +838,7 @@ 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}. This function should return non-zero if it handled the
option and zero otherwise. There is no need to print a message about an option
-not being recognised. This will be handled by the generic code.
+not being recognized. This will be handled by the generic code.
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},
@@ -891,7 +891,7 @@ If this macro is defined, GAS will use it instead of @code{comment_chars}.
@cindex tc_symbol_chars
If this macro is defined, it is a pointer to a null terminated list of
characters which may appear in an operand. GAS already assumes that all
-alphanumberic characters, and @samp{$}, @samp{.}, and @samp{_} may appear in an
+alphanumeric characters, and @samp{$}, @samp{.}, and @samp{_} may appear in an
operand (see @samp{symbol_chars} in @file{app.c}). This macro may be defined
to treat additional characters as appearing in an operand. This affects the
way in which GAS removes whitespace before passing the string to
@@ -1279,7 +1279,7 @@ absolute symbol. If undefined, @code{TC_FORCE_RELOCATION} will be used.
@cindex TC_FORCE_RELOCATION_LOCAL
Like @code{TC_FORCE_RELOCATION}, but used only for fixup expressions against a
symbol in the current section. If undefined, fixups that are not
-@code{fx_pcrel} or @code{fx_plt} or for which @code{TC_FORCE_RELOCATION}
+@code{fx_pcrel} or for which @code{TC_FORCE_RELOCATION}
returns non-zero, will emit relocs.
@item TC_FORCE_RELOCATION_SUB_SAME (@var{fix}, @var{seg})
@@ -1609,7 +1609,7 @@ symbol's flags.
@item obj_clear_weak_hook
@cindex obj_clear_weak_hook
-If you define this macro, @code{S_CLEAR_WEAKREFD} will call it after clearning
+If you define this macro, @code{S_CLEAR_WEAKREFD} will call it after cleaning
the @code{weakrefd} flag, but before modifying any other flags.
@item obj_frob_file
@@ -1844,10 +1844,6 @@ Returns non-zero if any warnings or errors, respectively, have been printed
during this invocation.
@end deftypefun
-@deftypefun @{@} void as_perror (const char *@var{gripe}, const char *@var{filename})
-Displays a BFD or system error, then clears the error status.
-@end deftypefun
-
@deftypefun @{@} void as_tsktsk (const char *@var{format}, ...)
@deftypefunx @{@} void as_warn (const char *@var{format}, ...)
@deftypefunx @{@} void as_bad (const char *@var{format}, ...)
diff --git a/contrib/binutils/gas/dw2gencfi.c b/contrib/binutils/gas/dw2gencfi.c
index bfa5d5c..97e1237 100644
--- a/contrib/binutils/gas/dw2gencfi.c
+++ b/contrib/binutils/gas/dw2gencfi.c
@@ -21,6 +21,7 @@
#include "as.h"
#include "dw2gencfi.h"
+#include "subsegs.h"
/* We re-use DWARF2_LINE_MIN_INSN_LENGTH for the code alignment field
@@ -87,6 +88,10 @@ struct fde_entry
symbolS *end_address;
struct cfi_insn_data *data;
struct cfi_insn_data **last;
+ unsigned char per_encoding;
+ unsigned char lsda_encoding;
+ expressionS personality;
+ expressionS lsda;
unsigned int return_column;
unsigned int signal_frame;
};
@@ -97,15 +102,13 @@ struct cie_entry
symbolS *start_address;
unsigned int return_column;
unsigned int signal_frame;
+ unsigned char per_encoding;
+ unsigned char lsda_encoding;
+ expressionS personality;
struct cfi_insn_data *first, *last;
};
-/* Current open FDE entry. */
-static struct fde_entry *cur_fde_data;
-static symbolS *last_address;
-static offsetT cur_cfa_offset;
-
/* List of FDE entries. */
static struct fde_entry *all_fde_data;
static struct fde_entry **last_fde_data = &all_fde_data;
@@ -120,7 +123,14 @@ struct cfa_save_data
offsetT cfa_offset;
};
-static struct cfa_save_data *cfa_save_stack;
+/* Current open FDE entry. */
+struct frch_cfi_data
+{
+ struct fde_entry *cur_fde_data;
+ symbolS *last_address;
+ offsetT cur_cfa_offset;
+ struct cfa_save_data *cfa_save_stack;
+};
/* Construct a new FDE structure and add it to the end of the fde list. */
@@ -129,12 +139,15 @@ alloc_fde_entry (void)
{
struct fde_entry *fde = xcalloc (1, sizeof (struct fde_entry));
- cur_fde_data = fde;
+ frchain_now->frch_cfi_data = xcalloc (1, sizeof (struct frch_cfi_data));
+ frchain_now->frch_cfi_data->cur_fde_data = fde;
*last_fde_data = fde;
last_fde_data = &fde->next;
fde->last = &fde->data;
fde->return_column = DWARF2_DEFAULT_RETURN_COLUMN;
+ fde->per_encoding = DW_EH_PE_omit;
+ fde->lsda_encoding = DW_EH_PE_omit;
return fde;
}
@@ -149,6 +162,7 @@ static struct cfi_insn_data *
alloc_cfi_insn_data (void)
{
struct cfi_insn_data *insn = xcalloc (1, sizeof (struct cfi_insn_data));
+ struct fde_entry *cur_fde_data = frchain_now->frch_cfi_data->cur_fde_data;
*cur_fde_data->last = insn;
cur_fde_data->last = &insn->next;
@@ -163,7 +177,7 @@ cfi_new_fde (symbolS *label)
{
struct fde_entry *fde = alloc_fde_entry ();
fde->start_address = label;
- last_address = label;
+ frchain_now->frch_cfi_data->last_address = label;
}
/* End the currently open FDE. */
@@ -171,8 +185,9 @@ cfi_new_fde (symbolS *label)
void
cfi_end_fde (symbolS *label)
{
- cur_fde_data->end_address = label;
- cur_fde_data = NULL;
+ frchain_now->frch_cfi_data->cur_fde_data->end_address = label;
+ free (frchain_now->frch_cfi_data);
+ frchain_now->frch_cfi_data = NULL;
}
/* Set the return column for the current FDE. */
@@ -180,7 +195,7 @@ cfi_end_fde (symbolS *label)
void
cfi_set_return_column (unsigned regno)
{
- cur_fde_data->return_column = regno;
+ frchain_now->frch_cfi_data->cur_fde_data->return_column = regno;
}
/* Universal functions to store new instructions. */
@@ -239,10 +254,10 @@ cfi_add_advance_loc (symbolS *label)
struct cfi_insn_data *insn = alloc_cfi_insn_data ();
insn->insn = DW_CFA_advance_loc;
- insn->u.ll.lab1 = last_address;
+ insn->u.ll.lab1 = frchain_now->frch_cfi_data->last_address;
insn->u.ll.lab2 = label;
- last_address = label;
+ frchain_now->frch_cfi_data->last_address = label;
}
/* Add a DW_CFA_offset record to the CFI data. */
@@ -252,6 +267,7 @@ cfi_add_CFA_offset (unsigned regno, offsetT offset)
{
unsigned int abs_data_align;
+ assert (DWARF2_CIE_DATA_ALIGNMENT != 0);
cfi_add_CFA_insn_reg_offset (DW_CFA_offset, regno, offset);
abs_data_align = (DWARF2_CIE_DATA_ALIGNMENT < 0
@@ -266,7 +282,7 @@ void
cfi_add_CFA_def_cfa (unsigned regno, offsetT offset)
{
cfi_add_CFA_insn_reg_offset (DW_CFA_def_cfa, regno, offset);
- cur_cfa_offset = offset;
+ frchain_now->frch_cfi_data->cur_cfa_offset = offset;
}
/* Add a DW_CFA_register record to the CFI data. */
@@ -291,7 +307,7 @@ void
cfi_add_CFA_def_cfa_offset (offsetT offset)
{
cfi_add_CFA_insn_offset (DW_CFA_def_cfa_offset, offset);
- cur_cfa_offset = offset;
+ frchain_now->frch_cfi_data->cur_cfa_offset = offset;
}
void
@@ -320,9 +336,9 @@ cfi_add_CFA_remember_state (void)
cfi_add_CFA_insn (DW_CFA_remember_state);
p = xmalloc (sizeof (*p));
- p->cfa_offset = cur_cfa_offset;
- p->next = cfa_save_stack;
- cfa_save_stack = p;
+ p->cfa_offset = frchain_now->frch_cfi_data->cur_cfa_offset;
+ p->next = frchain_now->frch_cfi_data->cfa_save_stack;
+ frchain_now->frch_cfi_data->cfa_save_stack = p;
}
void
@@ -332,11 +348,11 @@ cfi_add_CFA_restore_state (void)
cfi_add_CFA_insn (DW_CFA_restore_state);
- p = cfa_save_stack;
+ p = frchain_now->frch_cfi_data->cfa_save_stack;
if (p)
{
- cur_cfa_offset = p->cfa_offset;
- cfa_save_stack = p->next;
+ frchain_now->frch_cfi_data->cur_cfa_offset = p->cfa_offset;
+ frchain_now->frch_cfi_data->cfa_save_stack = p->next;
free (p);
}
else
@@ -350,6 +366,8 @@ static void dot_cfi (int);
static void dot_cfi_escape (int);
static void dot_cfi_startproc (int);
static void dot_cfi_endproc (int);
+static void dot_cfi_personality (int);
+static void dot_cfi_lsda (int);
/* Fake CFI type; outside the byte range of any real CFI insn. */
#define CFI_adjust_cfa_offset 0x100
@@ -378,6 +396,8 @@ const pseudo_typeS cfi_pseudo_table[] =
{ "cfi_window_save", dot_cfi, DW_CFA_GNU_window_save },
{ "cfi_escape", dot_cfi_escape, 0 },
{ "cfi_signal_frame", dot_cfi, CFI_signal_frame },
+ { "cfi_personality", dot_cfi_personality, 0 },
+ { "cfi_lsda", dot_cfi_lsda, 0 },
{ NULL, NULL, 0 }
};
@@ -448,7 +468,7 @@ dot_cfi (int arg)
offsetT offset;
unsigned reg1, reg2;
- if (!cur_fde_data)
+ if (frchain_now->frch_cfi_data == NULL)
{
as_bad (_("CFI instruction used without previous .cfi_startproc"));
ignore_rest_of_line ();
@@ -456,8 +476,9 @@ dot_cfi (int arg)
}
/* If the last address was not at the current PC, advance to current. */
- if (symbol_get_frag (last_address) != frag_now
- || S_GET_VALUE (last_address) != frag_now_fix ())
+ if (symbol_get_frag (frchain_now->frch_cfi_data->last_address) != frag_now
+ || S_GET_VALUE (frchain_now->frch_cfi_data->last_address)
+ != frag_now_fix ())
cfi_add_advance_loc (symbol_temp_new_now ());
switch (arg)
@@ -473,7 +494,8 @@ dot_cfi (int arg)
reg1 = cfi_parse_reg ();
cfi_parse_separator ();
offset = cfi_parse_const ();
- cfi_add_CFA_offset (reg1, offset - cur_cfa_offset);
+ cfi_add_CFA_offset (reg1,
+ offset - frchain_now->frch_cfi_data->cur_cfa_offset);
break;
case DW_CFA_def_cfa:
@@ -502,7 +524,8 @@ dot_cfi (int arg)
case CFI_adjust_cfa_offset:
offset = cfi_parse_const ();
- cfi_add_CFA_def_cfa_offset (cur_cfa_offset + offset);
+ cfi_add_CFA_def_cfa_offset (frchain_now->frch_cfi_data->cur_cfa_offset
+ + offset);
break;
case DW_CFA_restore:
@@ -552,7 +575,7 @@ dot_cfi (int arg)
break;
case CFI_signal_frame:
- cur_fde_data->signal_frame = 1;
+ frchain_now->frch_cfi_data->cur_fde_data->signal_frame = 1;
break;
default:
@@ -568,7 +591,7 @@ dot_cfi_escape (int ignored ATTRIBUTE_UNUSED)
struct cfi_escape_data *head, **tail, *e;
struct cfi_insn_data *insn;
- if (!cur_fde_data)
+ if (frchain_now->frch_cfi_data == NULL)
{
as_bad (_("CFI instruction used without previous .cfi_startproc"));
ignore_rest_of_line ();
@@ -576,8 +599,9 @@ dot_cfi_escape (int ignored ATTRIBUTE_UNUSED)
}
/* If the last address was not at the current PC, advance to current. */
- if (symbol_get_frag (last_address) != frag_now
- || S_GET_VALUE (last_address) != frag_now_fix ())
+ if (symbol_get_frag (frchain_now->frch_cfi_data->last_address) != frag_now
+ || S_GET_VALUE (frchain_now->frch_cfi_data->last_address)
+ != frag_now_fix ())
cfi_add_advance_loc (symbol_temp_new_now ());
tail = &head;
@@ -600,11 +624,153 @@ dot_cfi_escape (int ignored ATTRIBUTE_UNUSED)
}
static void
+dot_cfi_personality (int ignored ATTRIBUTE_UNUSED)
+{
+ struct fde_entry *fde;
+ offsetT encoding;
+
+ if (frchain_now->frch_cfi_data == NULL)
+ {
+ as_bad (_("CFI instruction used without previous .cfi_startproc"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ fde = frchain_now->frch_cfi_data->cur_fde_data;
+ encoding = get_absolute_expression ();
+ if (encoding == DW_EH_PE_omit)
+ {
+ demand_empty_rest_of_line ();
+ fde->per_encoding = encoding;
+ return;
+ }
+
+ if ((encoding & 0xff) != encoding
+ || ((encoding & 0x70) != 0
+#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
+ && (encoding & 0x70) != DW_EH_PE_pcrel
+#endif
+ )
+ /* leb128 can be handled, but does something actually need it? */
+ || (encoding & 7) == DW_EH_PE_uleb128
+ || (encoding & 7) > DW_EH_PE_udata8)
+ {
+ as_bad (_("invalid or unsupported encoding in .cfi_personality"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (*input_line_pointer++ != ',')
+ {
+ as_bad (_(".cfi_personality requires encoding and symbol arguments"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ expression_and_evaluate (&fde->personality);
+ switch (fde->personality.X_op)
+ {
+ case O_symbol:
+ break;
+ case O_constant:
+ if ((encoding & 0x70) == DW_EH_PE_pcrel)
+ encoding = DW_EH_PE_omit;
+ break;
+ default:
+ encoding = DW_EH_PE_omit;
+ break;
+ }
+
+ fde->per_encoding = encoding;
+
+ if (encoding == DW_EH_PE_omit)
+ {
+ as_bad (_("wrong second argument to .cfi_personality"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+static void
+dot_cfi_lsda (int ignored ATTRIBUTE_UNUSED)
+{
+ struct fde_entry *fde;
+ offsetT encoding;
+
+ if (frchain_now->frch_cfi_data == NULL)
+ {
+ as_bad (_("CFI instruction used without previous .cfi_startproc"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ fde = frchain_now->frch_cfi_data->cur_fde_data;
+ encoding = get_absolute_expression ();
+ if (encoding == DW_EH_PE_omit)
+ {
+ demand_empty_rest_of_line ();
+ fde->lsda_encoding = encoding;
+ return;
+ }
+
+ if ((encoding & 0xff) != encoding
+ || ((encoding & 0x70) != 0
+#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
+ && (encoding & 0x70) != DW_EH_PE_pcrel
+#endif
+ )
+ /* leb128 can be handled, but does something actually need it? */
+ || (encoding & 7) == DW_EH_PE_uleb128
+ || (encoding & 7) > DW_EH_PE_udata8)
+ {
+ as_bad (_("invalid or unsupported encoding in .cfi_lsda"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ if (*input_line_pointer++ != ',')
+ {
+ as_bad (_(".cfi_lsda requires encoding and symbol arguments"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ fde->lsda_encoding = encoding;
+
+ expression_and_evaluate (&fde->lsda);
+ switch (fde->lsda.X_op)
+ {
+ case O_symbol:
+ break;
+ case O_constant:
+ if ((encoding & 0x70) == DW_EH_PE_pcrel)
+ encoding = DW_EH_PE_omit;
+ break;
+ default:
+ encoding = DW_EH_PE_omit;
+ break;
+ }
+
+ fde->lsda_encoding = encoding;
+
+ if (encoding == DW_EH_PE_omit)
+ {
+ as_bad (_("wrong second argument to .cfi_lsda"));
+ ignore_rest_of_line ();
+ return;
+ }
+
+ demand_empty_rest_of_line ();
+}
+
+static void
dot_cfi_startproc (int ignored ATTRIBUTE_UNUSED)
{
int simple = 0;
- if (cur_fde_data)
+ if (frchain_now->frch_cfi_data != NULL)
{
as_bad (_("previous CFI entry not closed (missing .cfi_endproc)"));
ignore_rest_of_line ();
@@ -631,7 +797,7 @@ dot_cfi_startproc (int ignored ATTRIBUTE_UNUSED)
}
demand_empty_rest_of_line ();
- cur_cfa_offset = 0;
+ frchain_now->frch_cfi_data->cur_cfa_offset = 0;
if (!simple)
tc_cfi_frame_initial_instructions ();
}
@@ -639,7 +805,7 @@ dot_cfi_startproc (int ignored ATTRIBUTE_UNUSED)
static void
dot_cfi_endproc (int ignored ATTRIBUTE_UNUSED)
{
- if (! cur_fde_data)
+ if (frchain_now->frch_cfi_data == NULL)
{
as_bad (_(".cfi_endproc without corresponding .cfi_startproc"));
ignore_rest_of_line ();
@@ -714,18 +880,18 @@ output_cfi_insn (struct cfi_insn_data *insn)
out_one (DW_CFA_advance_loc + scaled);
else if (delta <= 0xFF)
{
- out_one (DW_CFA_advance_loc1);
- out_one (delta);
+ out_one (DW_CFA_advance_loc1);
+ out_one (delta);
}
else if (delta <= 0xFFFF)
{
- out_one (DW_CFA_advance_loc2);
- out_two (delta);
+ out_one (DW_CFA_advance_loc2);
+ out_two (delta);
}
else
{
- out_one (DW_CFA_advance_loc4);
- out_four (delta);
+ out_one (DW_CFA_advance_loc4);
+ out_four (delta);
}
}
else
@@ -850,12 +1016,33 @@ output_cfi_insn (struct cfi_insn_data *insn)
}
}
+static offsetT
+encoding_size (unsigned char encoding)
+{
+ if (encoding == DW_EH_PE_omit)
+ return 0;
+ switch (encoding & 0x7)
+ {
+ case 0:
+ return bfd_get_arch_size (stdoutput) == 64 ? 8 : 4;
+ case DW_EH_PE_udata2:
+ return 2;
+ case DW_EH_PE_udata4:
+ return 4;
+ case DW_EH_PE_udata8:
+ return 8;
+ default:
+ abort ();
+ }
+}
+
static void
output_cie (struct cie_entry *cie)
{
symbolS *after_size_address, *end_address;
expressionS exp;
struct cfi_insn_data *i;
+ offsetT augmentation_size;
cie->start_address = symbol_temp_new_now ();
after_size_address = symbol_temp_make ();
@@ -871,6 +1058,10 @@ output_cie (struct cie_entry *cie)
out_four (0); /* CIE id. */
out_one (DW_CIE_VERSION); /* Version. */
out_one ('z'); /* Augmentation. */
+ if (cie->per_encoding != DW_EH_PE_omit)
+ out_one ('P');
+ if (cie->lsda_encoding != DW_EH_PE_omit)
+ out_one ('L');
out_one ('R');
if (cie->signal_frame)
out_one ('S');
@@ -881,7 +1072,32 @@ output_cie (struct cie_entry *cie)
out_one (cie->return_column);
else
out_uleb128 (cie->return_column);
- out_uleb128 (1); /* Augmentation size. */
+ augmentation_size = 1 + (cie->lsda_encoding != DW_EH_PE_omit);
+ if (cie->per_encoding != DW_EH_PE_omit)
+ augmentation_size += 1 + encoding_size (cie->per_encoding);
+ out_uleb128 (augmentation_size); /* Augmentation size. */
+ if (cie->per_encoding != DW_EH_PE_omit)
+ {
+ offsetT size = encoding_size (cie->per_encoding);
+ out_one (cie->per_encoding);
+ exp = cie->personality;
+ if ((cie->per_encoding & 0x70) == DW_EH_PE_pcrel)
+ {
+#ifdef DIFF_EXPR_OK
+ exp.X_op = O_subtract;
+ exp.X_op_symbol = symbol_temp_new_now ();
+ emit_expr (&exp, size);
+#elif defined (tc_cfi_emit_pcrel_expr)
+ tc_cfi_emit_pcrel_expr (&exp, size);
+#else
+ abort ();
+#endif
+ }
+ else
+ emit_expr (&exp, size);
+ }
+ if (cie->lsda_encoding != DW_EH_PE_omit)
+ out_one (cie->lsda_encoding);
#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
out_one (DW_EH_PE_pcrel | DW_EH_PE_sdata4);
#else
@@ -902,6 +1118,7 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie,
{
symbolS *after_size_address, *end_address;
expressionS exp;
+ offsetT augmentation_size;
after_size_address = symbol_temp_make ();
end_address = symbol_temp_make ();
@@ -917,7 +1134,7 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie,
exp.X_op_symbol = cie->start_address;
emit_expr (&exp, 4); /* CIE offset. */
-#ifdef DIFF_EXPR_OK
+#ifdef DIFF_EXPR_OK
exp.X_add_symbol = fde->start_address;
exp.X_op_symbol = symbol_temp_new_now ();
emit_expr (&exp, 4); /* Code offset. */
@@ -937,7 +1154,27 @@ output_fde (struct fde_entry *fde, struct cie_entry *cie,
exp.X_op_symbol = fde->start_address; /* Code length. */
emit_expr (&exp, 4);
- out_uleb128 (0); /* Augmentation size. */
+ augmentation_size = encoding_size (fde->lsda_encoding);
+ out_uleb128 (augmentation_size); /* Augmentation size. */
+
+ if (fde->lsda_encoding != DW_EH_PE_omit)
+ {
+ exp = fde->lsda;
+ if ((fde->lsda_encoding & 0x70) == DW_EH_PE_pcrel)
+ {
+#ifdef DIFF_EXPR_OK
+ exp.X_op = O_subtract;
+ exp.X_op_symbol = symbol_temp_new_now ();
+ emit_expr (&exp, augmentation_size);
+#elif defined (tc_cfi_emit_pcrel_expr)
+ tc_cfi_emit_pcrel_expr (&exp, augmentation_size);
+#else
+ abort ();
+#endif
+ }
+ else
+ emit_expr (&exp, augmentation_size);
+ }
for (; first; first = first->next)
output_cfi_insn (first);
@@ -955,8 +1192,31 @@ select_cie_for_fde (struct fde_entry *fde, struct cfi_insn_data **pfirst)
for (cie = cie_root; cie; cie = cie->next)
{
if (cie->return_column != fde->return_column
- || cie->signal_frame != fde->signal_frame)
+ || cie->signal_frame != fde->signal_frame
+ || cie->per_encoding != fde->per_encoding
+ || cie->lsda_encoding != fde->lsda_encoding)
continue;
+ if (cie->per_encoding != DW_EH_PE_omit)
+ {
+ if (cie->personality.X_op != fde->personality.X_op
+ || cie->personality.X_add_number
+ != fde->personality.X_add_number)
+ continue;
+ switch (cie->personality.X_op)
+ {
+ case O_constant:
+ if (cie->personality.X_unsigned != fde->personality.X_unsigned)
+ continue;
+ break;
+ case O_symbol:
+ if (cie->personality.X_add_symbol
+ != fde->personality.X_add_symbol)
+ continue;
+ break;
+ default:
+ abort ();
+ }
+ }
for (i = cie->first, j = fde->data;
i != cie->last && j != NULL;
i = i->next, j = j->next)
@@ -1029,6 +1289,9 @@ select_cie_for_fde (struct fde_entry *fde, struct cfi_insn_data **pfirst)
cie_root = cie;
cie->return_column = fde->return_column;
cie->signal_frame = fde->signal_frame;
+ cie->per_encoding = fde->per_encoding;
+ cie->lsda_encoding = fde->lsda_encoding;
+ cie->personality = fde->personality;
cie->first = fde->data;
for (i = cie->first; i ; i = i->next)
@@ -1052,12 +1315,6 @@ cfi_finish (void)
struct fde_entry *fde;
int save_flag_traditional_format;
- if (cur_fde_data)
- {
- as_bad (_("open CFI at the end of file; missing .cfi_endproc directive"));
- cur_fde_data->end_address = cur_fde_data->start_address;
- }
-
if (all_fde_data == 0)
return;
@@ -1077,6 +1334,12 @@ cfi_finish (void)
struct cfi_insn_data *first;
struct cie_entry *cie;
+ if (fde->end_address == NULL)
+ {
+ as_bad (_("open CFI at the end of file; missing .cfi_endproc directive"));
+ fde->end_address = fde->start_address;
+ }
+
cie = select_cie_for_fde (fde, &first);
output_fde (fde, cie, first, fde->next == NULL ? EH_FRAME_ALIGNMENT : 2);
}
diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c
index 16666fa..671a9b0 100644
--- a/contrib/binutils/gas/dwarf2dbg.c
+++ b/contrib/binutils/gas/dwarf2dbg.c
@@ -28,7 +28,6 @@
[epilogue_begin] [is_stmt VALUE] [isa VALUE]
*/
-#include "ansidecl.h"
#include "as.h"
#include "safe-ctype.h"
@@ -46,6 +45,29 @@
#include "dwarf2dbg.h"
#include <filenames.h>
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+/* We need to decide which character to use as a directory separator.
+ Just because HAVE_DOS_BASED_FILE_SYSTEM is defined, it does not
+ necessarily mean that the backslash character is the one to use.
+ Some environments, eg Cygwin, can support both naming conventions.
+ So we use the heuristic that we only need to use the backslash if
+ the path is an absolute path starting with a DOS style drive
+ selector. eg C: or D: */
+# define INSERT_DIR_SEPARATOR(string, offset) \
+ do \
+ { \
+ if (offset > 1 \
+ && string[0] != 0 \
+ && string[1] == ':') \
+ string [offset] = '\\'; \
+ else \
+ string [offset] = '/'; \
+ } \
+ while (0)
+#else
+# define INSERT_DIR_SEPARATOR(string, offset) string[offset] = '/'
+#endif
+
#ifndef DWARF2_FORMAT
# define DWARF2_FORMAT() dwarf2_format_32bit
#endif
@@ -66,6 +88,13 @@
#define DL_FILES 1
#define DL_BODY 2
+/* If linker relaxation might change offsets in the code, the DWARF special
+ opcodes and variable-length operands cannot be used. If this macro is
+ nonzero, use the DW_LNS_fixed_advance_pc opcode instead. */
+#ifndef DWARF2_USE_FIXED_ADVANCE_PC
+# define DWARF2_USE_FIXED_ADVANCE_PC 0
+#endif
+
/* First special line opcde - leave room for the standard opcodes.
Note: If you want to change this, you'll have to update the
"standard_opcode_lengths" table that is emitted below in
@@ -169,22 +198,22 @@ static void out_two (int);
static void out_four (int);
static void out_abbrev (int, int);
static void out_uleb128 (addressT);
-static offsetT get_frag_fix (fragS *);
+static void out_sleb128 (addressT);
+static offsetT get_frag_fix (fragS *, segT);
static void out_set_addr (symbolS *);
static int size_inc_line_addr (int, addressT);
static void emit_inc_line_addr (int, addressT, char *, int);
static void out_inc_line_addr (int, addressT);
+static void out_fixed_inc_line_addr (int, symbolS *, symbolS *);
static void relax_inc_line_addr (int, symbolS *, symbolS *);
static void process_entries (segT, struct line_entry *);
static void out_file_list (void);
static void out_debug_line (segT);
static void out_debug_aranges (segT, segT);
static void out_debug_abbrev (segT);
-static void out_debug_info (segT, segT, segT);
#ifndef TC_DWARF2_EMIT_OFFSET
-# define TC_DWARF2_EMIT_OFFSET generic_dwarf2_emit_offset
-static void generic_dwarf2_emit_offset (symbolS *, unsigned int);
+#define TC_DWARF2_EMIT_OFFSET generic_dwarf2_emit_offset
/* Create an offset to .dwarf2_*. */
@@ -569,7 +598,7 @@ dwarf2_directive_loc (int dummy ATTRIBUTE_UNUSED)
char *cp = (char *) alloca (dir_len + 1 + file_len + 1);
memcpy (cp, dirs[files[filenum].dir], dir_len);
- cp[dir_len] = '/';
+ INSERT_DIR_SEPARATOR (cp, dir_len);
memcpy (cp + dir_len + 1, files[filenum].filename, file_len);
cp[dir_len + file_len + 1] = '\0';
listing_source_file (cp);
@@ -670,27 +699,18 @@ dwarf2_directive_loc_mark_labels (int dummy ATTRIBUTE_UNUSED)
static struct frag *
first_frag_for_seg (segT seg)
{
- frchainS *f, *first = NULL;
-
- for (f = frchain_root; f; f = f->frch_next)
- if (f->frch_seg == seg
- && (! first || first->frch_subseg > f->frch_subseg))
- first = f;
-
- return first ? first->frch_root : NULL;
+ return seg_info (seg)->frchainP->frch_root;
}
static struct frag *
last_frag_for_seg (segT seg)
{
- frchainS *f, *last = NULL;
+ frchainS *f = seg_info (seg)->frchainP;
- for (f = frchain_root; f; f = f->frch_next)
- if (f->frch_seg == seg
- && (! last || last->frch_subseg < f->frch_subseg))
- last= f;
+ while (f->frch_next != NULL)
+ f = f->frch_next;
- return last ? last->frch_last : NULL;
+ return f->frch_last;
}
/* Emit a single byte into the current segment. */
@@ -733,6 +753,14 @@ out_uleb128 (addressT value)
output_leb128 (frag_more (sizeof_leb128 (value, 0)), value, 0);
}
+/* Emit a signed "little-endian base 128" number. */
+
+static void
+out_sleb128 (addressT value)
+{
+ output_leb128 (frag_more (sizeof_leb128 (value, 1)), value, 1);
+}
+
/* Emit a tuple for .debug_abbrev. */
static inline void
@@ -745,7 +773,7 @@ out_abbrev (int name, int form)
/* Get the size of a fragment. */
static offsetT
-get_frag_fix (fragS *frag)
+get_frag_fix (fragS *frag, segT seg)
{
frchainS *fr;
@@ -755,7 +783,7 @@ get_frag_fix (fragS *frag)
/* If a fragment is the last in the chain, special measures must be
taken to find its size before relaxation, since it may be pending
on some subsegment chain. */
- for (fr = frchain_root; fr; fr = fr->frch_next)
+ for (fr = seg_info (seg)->frchainP; fr; fr = fr->frch_next)
if (fr->frch_last == frag)
return (char *) obstack_next_free (&fr->frch_obstack) - frag->fr_literal;
@@ -966,6 +994,45 @@ out_inc_line_addr (int line_delta, addressT addr_delta)
emit_inc_line_addr (line_delta, addr_delta, frag_more (len), len);
}
+/* Write out an alternative form of line and address skips using
+ DW_LNS_fixed_advance_pc opcodes. This uses more space than the default
+ line and address information, but it helps support linker relaxation that
+ changes the code offsets. */
+
+static void
+out_fixed_inc_line_addr (int line_delta, symbolS *to_sym, symbolS *from_sym)
+{
+ expressionS expr;
+
+ /* INT_MAX is a signal that this is actually a DW_LNE_end_sequence. */
+ if (line_delta == INT_MAX)
+ {
+ out_opcode (DW_LNS_fixed_advance_pc);
+ expr.X_op = O_subtract;
+ expr.X_add_symbol = to_sym;
+ expr.X_op_symbol = from_sym;
+ expr.X_add_number = 0;
+ emit_expr (&expr, 2);
+
+ out_opcode (DW_LNS_extended_op);
+ out_byte (1);
+ out_opcode (DW_LNE_end_sequence);
+ return;
+ }
+
+ out_opcode (DW_LNS_advance_line);
+ out_sleb128 (line_delta);
+
+ out_opcode (DW_LNS_fixed_advance_pc);
+ expr.X_op = O_subtract;
+ expr.X_add_symbol = to_sym;
+ expr.X_op_symbol = from_sym;
+ expr.X_add_number = 0;
+ emit_expr (&expr, 2);
+
+ out_opcode (DW_LNS_copy);
+}
+
/* Generate a variant frag that we can use to relax address/line
increments between fragments of the target segment. */
@@ -1116,6 +1183,8 @@ process_entries (segT seg, struct line_entry *e)
out_set_addr (lab);
out_inc_line_addr (line_delta, 0);
}
+ else if (DWARF2_USE_FIXED_ADVANCE_PC)
+ out_fixed_inc_line_addr (line_delta, lab, last_lab);
else if (frag == last_frag)
out_inc_line_addr (line_delta, frag_ofs - last_frag_ofs);
else
@@ -1134,8 +1203,13 @@ process_entries (segT seg, struct line_entry *e)
/* Emit a DW_LNE_end_sequence for the end of the section. */
frag = last_frag_for_seg (seg);
- frag_ofs = get_frag_fix (frag);
- if (frag == last_frag)
+ frag_ofs = get_frag_fix (frag, seg);
+ if (DWARF2_USE_FIXED_ADVANCE_PC)
+ {
+ lab = symbol_temp_new (seg, frag_ofs, frag);
+ out_fixed_inc_line_addr (INT_MAX, lab, last_lab);
+ }
+ else if (frag == last_frag)
out_inc_line_addr (INT_MAX, frag_ofs - last_frag_ofs);
else
{
@@ -1277,6 +1351,54 @@ out_debug_line (segT line_seg)
symbol_set_value_now (line_end);
}
+static void
+out_debug_ranges (segT ranges_seg)
+{
+ unsigned int addr_size = sizeof_address;
+ struct line_seg *s;
+ expressionS expr;
+ unsigned int i;
+
+ subseg_set (ranges_seg, 0);
+
+ /* Base Address Entry. */
+ for (i = 0; i < addr_size; i++)
+ out_byte (0xff);
+ for (i = 0; i < addr_size; i++)
+ out_byte (0);
+
+ /* Range List Entry. */
+ for (s = all_segs; s; s = s->next)
+ {
+ fragS *frag;
+ symbolS *beg, *end;
+
+ frag = first_frag_for_seg (s->seg);
+ beg = symbol_temp_new (s->seg, 0, frag);
+ s->text_start = beg;
+
+ frag = last_frag_for_seg (s->seg);
+ end = symbol_temp_new (s->seg, get_frag_fix (frag, s->seg), frag);
+ s->text_end = end;
+
+ expr.X_op = O_symbol;
+ expr.X_add_symbol = beg;
+ expr.X_add_number = 0;
+ emit_expr (&expr, addr_size);
+
+ expr.X_op = O_symbol;
+ expr.X_add_symbol = end;
+ expr.X_add_number = 0;
+ emit_expr (&expr, addr_size);
+ }
+
+ /* End of Range Entry. */
+ for (i = 0; i < addr_size; i++)
+ out_byte (0);
+ for (i = 0; i < addr_size; i++)
+ out_byte (0);
+}
+
/* Emit data for .debug_aranges. */
static void
@@ -1332,7 +1454,7 @@ out_debug_aranges (segT aranges_seg, segT info_seg)
s->text_start = beg;
frag = last_frag_for_seg (s->seg);
- end = symbol_temp_new (s->seg, get_frag_fix (frag), frag);
+ end = symbol_temp_new (s->seg, get_frag_fix (frag, s->seg), frag);
s->text_end = end;
expr.X_op = O_symbol;
@@ -1369,6 +1491,13 @@ out_debug_abbrev (segT abbrev_seg)
out_abbrev (DW_AT_low_pc, DW_FORM_addr);
out_abbrev (DW_AT_high_pc, DW_FORM_addr);
}
+ else
+ {
+ if (DWARF2_FORMAT () == dwarf2_format_32bit)
+ out_abbrev (DW_AT_ranges, DW_FORM_data4);
+ else
+ out_abbrev (DW_AT_ranges, DW_FORM_data8);
+ }
out_abbrev (DW_AT_name, DW_FORM_string);
out_abbrev (DW_AT_comp_dir, DW_FORM_string);
out_abbrev (DW_AT_producer, DW_FORM_string);
@@ -1382,7 +1511,7 @@ out_debug_abbrev (segT abbrev_seg)
/* Emit a description of this compilation unit for .debug_info. */
static void
-out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg)
+out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg, segT ranges_seg)
{
char producer[128];
char *comp_dir;
@@ -1445,8 +1574,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg)
/* ??? sizeof_offset */
TC_DWARF2_EMIT_OFFSET (section_symbol (line_seg), 4);
- /* These two attributes may only be emitted if all of the code is
- contiguous. Multiple sections are not that. */
+ /* These two attributes are emitted if all of the code is contiguous. */
if (all_segs->next == NULL)
{
/* DW_AT_low_pc */
@@ -1461,6 +1589,12 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg)
expr.X_add_number = 0;
emit_expr (&expr, sizeof_address);
}
+ else
+ {
+ /* This attribute is emitted if the code is disjoint. */
+ /* DW_AT_ranges. */
+ TC_DWARF2_EMIT_OFFSET (section_symbol (ranges_seg), sizeof_offset);
+ }
/* DW_AT_name. We don't have the actual file name that was present
on the command line, so assume files[1] is the main input file.
@@ -1473,7 +1607,7 @@ out_debug_info (segT info_seg, segT abbrev_seg, segT line_seg)
len = strlen (dirs[files[1].dir]);
p = frag_more (len + 1);
memcpy (p, dirs[files[1].dir], len);
- p[len] = '/';
+ INSERT_DIR_SEPARATOR (p, len);
}
len = strlen (files[1].filename) + 1;
p = frag_more (len);
@@ -1551,6 +1685,7 @@ dwarf2_finish (void)
{
segT abbrev_seg;
segT aranges_seg;
+ segT ranges_seg;
assert (all_segs);
@@ -1567,8 +1702,19 @@ dwarf2_finish (void)
record_alignment (aranges_seg, ffs (2 * sizeof_address) - 1);
+ if (all_segs->next == NULL)
+ ranges_seg = NULL;
+ else
+ {
+ ranges_seg = subseg_new (".debug_ranges", 0);
+ bfd_set_section_flags (stdoutput, ranges_seg,
+ SEC_READONLY | SEC_DEBUGGING);
+ record_alignment (ranges_seg, ffs (2 * sizeof_address) - 1);
+ out_debug_ranges (ranges_seg);
+ }
+
out_debug_aranges (aranges_seg, info_seg);
out_debug_abbrev (abbrev_seg);
- out_debug_info (info_seg, abbrev_seg, line_seg);
+ out_debug_info (info_seg, abbrev_seg, line_seg, ranges_seg);
}
}
diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c
index 45116e8..2f9f71f 100644
--- a/contrib/binutils/gas/ecoff.c
+++ b/contrib/binutils/gas/ecoff.c
@@ -1,6 +1,6 @@
/* ECOFF debugging support.
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005
+ 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by Cygnus Support.
This file was put together by Ian Lance Taylor <ian@cygnus.com>. A
@@ -2778,7 +2778,7 @@ ecoff_directive_val (int ignore ATTRIBUTE_UNUSED)
expression (&exp);
if (exp.X_op != O_constant && exp.X_op != O_symbol)
{
- as_bad (_(".val expression is too copmlex"));
+ as_bad (_(".val expression is too complex"));
demand_empty_rest_of_line ();
return;
}
diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c
index 69f0aac..11f2942 100644
--- a/contrib/binutils/gas/expr.c
+++ b/contrib/binutils/gas/expr.c
@@ -1,6 +1,6 @@
/* expr.c -operands, expressions-
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -25,7 +25,6 @@
(It also gives smaller files to re-compile.)
Here, "operand"s are of expressions, not instructions. */
-#include <string.h>
#define min(a, b) ((a) < (b) ? (a) : (b))
#include "as.h"
@@ -1003,11 +1002,6 @@ operand (expressionS *expressionP, enum expr_mode mode)
case '-':
case '+':
{
- /* Do not accept ++e or --e as +(+e) or -(-e)
- Disabled, since the preprocessor removes whitespace. */
- if (0 && (c == '-' || c == '+') && *input_line_pointer == c)
- goto target_op;
-
operand (expressionP, mode);
if (expressionP->X_op == O_constant)
{
@@ -1291,7 +1285,6 @@ operand (expressionS *expressionP, enum expr_mode mode)
}
else
{
- target_op:
/* Let the target try to parse it. Success is indicated by changing
the X_op field to something other than O_absent and pointing
input_line_pointer past the expression. If it can't parse the
@@ -1552,11 +1545,7 @@ operator (int *num_chars)
case '+':
case '-':
- /* Do not allow a++b and a--b to be a + (+b) and a - (-b)
- Disabled, since the preprocessor removes whitespace. */
- if (1 || input_line_pointer[1] != c)
- return op_encoding[c];
- return O_illegal;
+ return op_encoding[c];
case '<':
switch (input_line_pointer[1])
@@ -1647,7 +1636,7 @@ expr (int rankarg, /* Larger # is higher rank. */
operatorT op_right;
int op_chars;
- know (rank >= 0);
+ know (rankarg >= 0);
/* Save the value of dot for the fixup code. */
if (rank == 0)
@@ -1796,7 +1785,9 @@ expr (int rankarg, /* Larger # is higher rank. */
case O_bit_or_not: resultP->X_add_number |= ~v; break;
case O_bit_exclusive_or: resultP->X_add_number ^= v; break;
case O_bit_and: resultP->X_add_number &= v; break;
- case O_add: resultP->X_add_number += v; break;
+ /* Constant + constant (O_add) is handled by the
+ previous if statement for constant + X, so is omitted
+ here. */
case O_subtract: resultP->X_add_number -= v; break;
case O_eq:
resultP->X_add_number =
diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c
index b08ef50..adb9b19 100644
--- a/contrib/binutils/gas/frags.c
+++ b/contrib/binutils/gas/frags.c
@@ -389,9 +389,9 @@ frag_append_1_char (int datum)
not already accounted for in the frag FR_ADDRESS. */
bfd_boolean
-frag_offset_fixed_p (fragS *frag1, fragS *frag2, bfd_vma *offset)
+frag_offset_fixed_p (const fragS *frag1, const fragS *frag2, bfd_vma *offset)
{
- fragS *frag;
+ const fragS *frag;
bfd_vma off;
/* Start with offset initialised to difference between the two frags.
diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h
index 8804467..66630db 100644
--- a/contrib/binutils/gas/frags.h
+++ b/contrib/binutils/gas/frags.h
@@ -148,6 +148,6 @@ char *frag_var (relax_stateT type,
offsetT offset,
char *opcode);
-bfd_boolean frag_offset_fixed_p (fragS *, fragS *, bfd_vma *);
+bfd_boolean frag_offset_fixed_p (const fragS *, const fragS *, bfd_vma *);
#endif /* FRAGS_H */
diff --git a/contrib/binutils/gas/gdbinit.in b/contrib/binutils/gas/gdbinit.in
index e946726..fb1046d 100644
--- a/contrib/binutils/gas/gdbinit.in
+++ b/contrib/binutils/gas/gdbinit.in
@@ -6,7 +6,6 @@ break as_warn_where
break as_bad
break as_bad_where
break as_fatal
-break as_perror
break as_assert
break as_abort
diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c
index 343f049..0907bad 100644
--- a/contrib/binutils/gas/input-file.c
+++ b/contrib/binutils/gas/input-file.c
@@ -1,6 +1,6 @@
/* input_file.c - Deal with Input Files -
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001,
- 2002, 2003, 2005
+ 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -25,9 +25,6 @@
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 <errno.h>
#include "as.h"
#include "input-file.h"
#include "safe-ctype.h"
@@ -143,8 +140,8 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0. */
if (f_in == NULL)
{
- bfd_set_error (bfd_error_system_call);
- as_perror (_("Can't open %s for reading"), file_name);
+ as_bad (_("can't open %s for reading: %s"),
+ file_name, xstrerror (errno));
return;
}
@@ -152,8 +149,8 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0. */
if (ferror (f_in))
{
- bfd_set_error (bfd_error_system_call);
- as_perror (_("Can't open %s for reading"), file_name);
+ as_bad (_("can't read from %s: %s"),
+ file_name, xstrerror (errno));
fclose (f_in);
f_in = NULL;
@@ -166,8 +163,8 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0. */
c = getc (f_in);
if (c == 'N')
{
- fgets (buf, 80, f_in);
- if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
+ if (fgets (buf, sizeof (buf), f_in)
+ && !strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
preprocess = 0;
if (!strchr (buf, '\n'))
ungetc ('#', f_in); /* It was longer. */
@@ -176,8 +173,8 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0. */
}
else if (c == 'A')
{
- fgets (buf, 80, f_in);
- if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
+ if (fgets (buf, sizeof (buf), f_in)
+ && !strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
preprocess = 1;
if (!strchr (buf, '\n'))
ungetc ('#', f_in);
@@ -215,8 +212,7 @@ input_file_get (char *buf, int buflen)
size = fread (buf, sizeof (char), buflen, f_in);
if (size < 0)
{
- bfd_set_error (bfd_error_system_call);
- as_perror (_("Can't read from %s"), file_name);
+ as_bad (_("can't read from %s: %s"), file_name, xstrerror (errno));
size = 0;
}
return size;
@@ -242,8 +238,7 @@ input_file_give_next_buffer (char *where /* Where to place 1st character of new
size = fread (where, sizeof (char), BUFFER_SIZE, f_in);
if (size < 0)
{
- bfd_set_error (bfd_error_system_call);
- as_perror (_("Can't read from %s"), file_name);
+ as_bad (_("can't read from %s: %s"), file_name, xstrerror (errno));
size = 0;
}
if (size)
@@ -251,10 +246,8 @@ input_file_give_next_buffer (char *where /* Where to place 1st character of new
else
{
if (fclose (f_in))
- {
- bfd_set_error (bfd_error_system_call);
- as_perror (_("Can't close %s"), file_name);
- }
+ as_warn (_("can't close %s: %s"), file_name, xstrerror (errno));
+
f_in = (FILE *) 0;
return_value = 0;
}
diff --git a/contrib/binutils/gas/input-file.h b/contrib/binutils/gas/input-file.h
index bc8289e..0628716 100644
--- a/contrib/binutils/gas/input-file.h
+++ b/contrib/binutils/gas/input-file.h
@@ -1,5 +1,6 @@
/* input_file.h header for input-file.c
- Copyright 1987, 1992, 1993, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 2000, 2003, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -51,8 +52,8 @@
*
* input_file_close () Closes opened file.
*
- * All errors are reported (using as_perror) so caller doesn't have to think
- * about I/O errors. No I/O errors are fatal: an end-of-file may be faked.
+ * All errors are reported so caller doesn't have to think
+ * about I/O errors.
*/
char *input_file_give_next_buffer (char *where);
diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c
index 8562ee2..5698a6d 100644
--- a/contrib/binutils/gas/input-scrub.c
+++ b/contrib/binutils/gas/input-scrub.c
@@ -1,6 +1,6 @@
/* input_scrub.c - Break up input buffers into whole numbers of lines.
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 2000, 2001, 2003
+ 2000, 2001, 2003, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -20,7 +20,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <errno.h> /* Need this to make errno declaration right */
#include "as.h"
#include "input-file.h"
#include "sb.h"
@@ -57,6 +56,10 @@
#define BEFORE_SIZE (1)
#define AFTER_SIZE (1)
+#ifndef TC_EOL_IN_INSN
+#define TC_EOL_IN_INSN(P) 0
+#endif
+
static char *buffer_start; /*->1st char of full buffer area. */
static char *partial_where; /*->after last full line in buffer. */
static int partial_size; /* >=0. Number of chars in partial line in buffer. */
@@ -342,8 +345,9 @@ input_scrub_next_buffer (char **bufp)
if (limit)
{
register char *p; /* Find last newline. */
-
- for (p = limit - 1; *p != '\n'; --p)
+ /* Terminate the buffer to avoid confusing TC_EOL_IN_INSN. */
+ *limit = '\0';
+ for (p = limit - 1; *p != '\n' || TC_EOL_IN_INSN (p); --p)
;
++p;
@@ -369,7 +373,9 @@ input_scrub_next_buffer (char **bufp)
return NULL;
}
- for (p = limit - 1; *p != '\n'; --p)
+ /* Terminate the buffer to avoid confusing TC_EOL_IN_INSN. */
+ *limit = '\0';
+ for (p = limit - 1; *p != '\n' || TC_EOL_IN_INSN (p); --p)
;
++p;
}
@@ -429,13 +435,34 @@ bump_line_counters (void)
Returns nonzero if the filename actually changes. */
int
-new_logical_line (char *fname, /* DON'T destroy it! We point to it! */
- int line_number)
+new_logical_line_flags (char *fname, /* DON'T destroy it! We point to it! */
+ int line_number,
+ int flags)
{
+ switch (flags)
+ {
+ case 0:
+ break;
+ case 1:
+ if (line_number != -1)
+ abort ();
+ break;
+ case 1 << 1:
+ case 1 << 2:
+ /* FIXME: we could check that include nesting is correct. */
+ break;
+ default:
+ abort ();
+ }
+
if (line_number >= 0)
logical_input_line = line_number;
- else if (line_number == -2 && logical_input_line > 0)
- --logical_input_line;
+ else if (line_number == -1 && fname && !*fname && (flags & (1 << 2)))
+ {
+ logical_input_file = physical_input_file;
+ logical_input_line = physical_input_line;
+ fname = NULL;
+ }
if (fname
&& (logical_input_file == NULL
@@ -447,6 +474,13 @@ new_logical_line (char *fname, /* DON'T destroy it! We point to it! */
else
return 0;
}
+
+int
+new_logical_line (char *fname, int line_number)
+{
+ return new_logical_line_flags (fname, line_number, 0);
+}
+
/* Return the current file name and line number.
namep should be char * const *, but there are compilers which screw
diff --git a/contrib/binutils/gas/itbl-lex.l b/contrib/binutils/gas/itbl-lex.l
index aceeac4..185f956 100644
--- a/contrib/binutils/gas/itbl-lex.l
+++ b/contrib/binutils/gas/itbl-lex.l
@@ -1,5 +1,6 @@
/* itbl-lex.l
- Copyright 1997, 1998, 2001, 2002, 2005 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2001, 2002, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,10 +20,7 @@
02110-1301, USA. */
%{
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
+#include "as.h"
#include "itbl-lex.h"
#include <itbl-parse.h>
diff --git a/contrib/binutils/gas/itbl-ops.c b/contrib/binutils/gas/itbl-ops.c
index bd1f647..41fa033 100644
--- a/contrib/binutils/gas/itbl-ops.c
+++ b/contrib/binutils/gas/itbl-ops.c
@@ -1,5 +1,5 @@
/* itbl-ops.c
- Copyright 1997, 1999, 2000, 2001, 2002, 2003, 2005
+ Copyright 1997, 1999, 2000, 2001, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -89,9 +89,7 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "as.h"
#include "itbl-ops.h"
#include <itbl-parse.h>
@@ -147,12 +145,7 @@ struct itbl_entry {
static int itbl_num_opcodes = 0;
/* Array of entries for each processor and entry type */
-static struct itbl_entry *entries[e_nprocs][e_ntypes] = {
- {0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0},
- {0, 0, 0, 0, 0, 0}
-};
+static struct itbl_entry *entries[e_nprocs][e_ntypes];
/* local prototypes */
static unsigned long build_opcode (struct itbl_entry *e);
@@ -253,8 +246,6 @@ itbl_add_operand (struct itbl_entry *e, int yytype, int sbit,
/* Interfaces for assembler and disassembler */
#ifndef STAND_ALONE
-#include "as.h"
-#include "symbols.h"
static void append_insns_as_macros (void);
/* Initialize for gas. */
diff --git a/contrib/binutils/gas/itbl-ops.h b/contrib/binutils/gas/itbl-ops.h
index 47dc8b2..d9dbf7c 100644
--- a/contrib/binutils/gas/itbl-ops.h
+++ b/contrib/binutils/gas/itbl-ops.h
@@ -1,5 +1,5 @@
/* itbl-ops.h
- Copyright 1997, 1999, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1997, 1999, 2000, 2003, 2006, 2007 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -20,14 +20,6 @@
/* External functions, constants and defines for itbl support */
-#include "ansidecl.h"
-
-/* Include file notes: "expr.h" needed before targ-*.h,
- * "targ-env.h" includes the chain of target dependant headers,
- * "targ-cpu.h" has the HAVE_ITBL_CPU define, and
- * as.h includes them all */
-#include "as.h"
-
#ifdef HAVE_ITBL_CPU
#include "itbl-cpu.h"
#endif
@@ -77,7 +69,7 @@ typedef enum
typedef enum
{
e_p0,
- e_nprocs = NUMBER_OF_PROCESSORS,
+ e_nprocs = ITBL_NUMBER_OF_PROCESSORS,
e_invproc /* invalid processor */
} e_processor;
diff --git a/contrib/binutils/gas/itbl-parse.y b/contrib/binutils/gas/itbl-parse.y
index a7a52df..ff48657 100644
--- a/contrib/binutils/gas/itbl-parse.y
+++ b/contrib/binutils/gas/itbl-parse.y
@@ -1,5 +1,5 @@
/* itbl-parse.y
- Copyright 1997, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright 1997, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -246,7 +246,7 @@ FIXME! hex is ambiguous with any digit
*/
-#include <stdio.h>
+#include "as.h"
#include "itbl-lex.h"
#include "itbl-ops.h"
@@ -274,7 +274,7 @@ FIXME! hex is ambiguous with any digit
static int sbit, ebit;
static struct itbl_entry *insn=0;
-static int yyerror PARAMS ((const char *));
+static int yyerror (const char *);
%}
diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c
index 61ef6f5..1b55cbf 100644
--- a/contrib/binutils/gas/listing.c
+++ b/contrib/binutils/gas/listing.c
@@ -1,6 +1,6 @@
/* listing.c - maintain assembly listings
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2005
+ 2001, 2002, 2003, 2005, 2006
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -946,15 +946,6 @@ listing_listing (char *name ATTRIBUTE_UNUSED)
buffer = xmalloc (listing_rhs_width);
data_buffer = xmalloc (MAX_BYTES);
eject = 1;
- list = head;
-
- while (list != (list_info_type *) NULL && 0)
- {
- if (list->next)
- list->frag = list->next->frag;
- list = list->next;
- }
-
list = head->next;
while (list)
@@ -1085,8 +1076,7 @@ listing_print (char *name)
using_stdout = 0;
else
{
- bfd_set_error (bfd_error_system_call);
- as_perror (_("can't open list file: %s"), name);
+ as_warn (_("can't open %s: %s"), name, xstrerror (errno));
list_file = stdout;
using_stdout = 1;
}
@@ -1104,10 +1094,7 @@ listing_print (char *name)
if (! using_stdout)
{
if (fclose (list_file) == EOF)
- {
- bfd_set_error (bfd_error_system_call);
- as_perror (_("error closing list file: %s"), name);
- }
+ as_warn (_("can't close %s: %s"), name, xstrerror (errno));
}
if (last_open_file)
diff --git a/contrib/binutils/gas/macro.c b/contrib/binutils/gas/macro.c
index af98bad..d7d470b 100644
--- a/contrib/binutils/gas/macro.c
+++ b/contrib/binutils/gas/macro.c
@@ -1,6 +1,6 @@
/* macro.c - macro support for gas
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -22,47 +22,11 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "config.h"
-
-#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 */
-# if !defined (__STDC__) && !defined (__hpux)
-extern char *alloca ();
-# else
-extern void *alloca ();
-# endif /* __STDC__, __hpux */
-# endif /* alloca */
-# endif /* _AIX */
-# endif /* HAVE_ALLOCA_H */
-#endif /* __GNUC__ */
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
#include "as.h"
-#include "libiberty.h"
#include "safe-ctype.h"
#include "sb.h"
-#include "hash.h"
#include "macro.h"
-#include "asintl.h"
-
/* The routines in this file handle macro definition and expansion.
They are called by gas. */
@@ -1025,7 +989,6 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
sb t;
formal_entry *ptr;
formal_entry *f;
- int is_positional = 0;
int is_keyword = 0;
int narg = 0;
const char *err = NULL;
@@ -1116,8 +1079,6 @@ macro_expand (int idx, sb *in, macro_entry *m, sb *out)
}
else
{
- /* This is a positional arg. */
- is_positional = 1;
if (is_keyword)
{
err = _("can't mix positional and keyword arguments");
@@ -1364,8 +1325,14 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
}
else
{
+ bfd_boolean in_quotes = FALSE;
+
if (irpc && in->ptr[idx] == '"')
- ++idx;
+ {
+ in_quotes = TRUE;
+ ++idx;
+ }
+
while (idx < in->len)
{
if (!irpc)
@@ -1376,6 +1343,9 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
{
int nxt;
+ if (irpc)
+ in_quotes = ! in_quotes;
+
nxt = sb_skip_white (idx + 1, in);
if (nxt >= in->len)
{
@@ -1387,12 +1357,13 @@ expand_irp (int irpc, int idx, sb *in, sb *out, int (*get_line) (sb *))
sb_add_char (&f.actual, in->ptr[idx]);
++idx;
}
+
err = macro_expand_body (&sub, out, &f, h, 0);
if (err != NULL)
break;
if (!irpc)
idx = sb_skip_comma (idx, in);
- else
+ else if (! in_quotes)
idx = sb_skip_white (idx, in);
}
}
diff --git a/contrib/binutils/gas/macro.h b/contrib/binutils/gas/macro.h
index 4fdaa52..104aeae 100644
--- a/contrib/binutils/gas/macro.h
+++ b/contrib/binutils/gas/macro.h
@@ -1,5 +1,5 @@
/* macro.h - header file for macro support for gas
- Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2006
Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
@@ -26,9 +26,6 @@
#define MACRO_H
-#include "ansidecl.h"
-#include "sb.h"
-
/* Structures used to store macros.
Each macro knows its name and included text. It gets built with a
diff --git a/contrib/binutils/gas/messages.c b/contrib/binutils/gas/messages.c
index b1b94cd..c8788dc 100644
--- a/contrib/binutils/gas/messages.c
+++ b/contrib/binutils/gas/messages.c
@@ -1,6 +1,6 @@
/* messages.c - error reporter -
Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001,
- 2003, 2004, 2005
+ 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -116,24 +116,6 @@ as_show_where (void)
fprintf (stderr, "%s:%u: ", file, line);
}
-/* Like perror(3), but with more info. */
-
-void
-as_perror (const char *gripe, /* Unpunctuated error theme. */
- const char *filename)
-{
- const char *errtxt;
- int saved_errno = errno;
-
- as_show_where ();
- fprintf (stderr, gripe, filename);
- errno = saved_errno;
- errtxt = bfd_errmsg (bfd_get_error ());
- fprintf (stderr, ": %s\n", errtxt);
- errno = 0;
- bfd_set_error (bfd_error_no_error);
-}
-
/* Send to stderr a string as a warning, and locate warning
in input file(s).
Please only use this for when we have some recovery action.
@@ -474,6 +456,24 @@ as_internal_value_out_of_range (char * prefix,
if (prefix == NULL)
prefix = "";
+ if (val >= min && val <= max)
+ {
+ addressT right = max & -max;
+
+ if (max <= 1)
+ abort ();
+
+ /* xgettext:c-format */
+ err = _("%s out of domain (%d is not a multiple of %d)");
+ if (bad)
+ as_bad_where (file, line, err,
+ prefix, (int) val, (int) right);
+ else
+ as_warn_where (file, line, err,
+ prefix, (int) val, (int) right);
+ return;
+ }
+
if ( val < HEX_MAX_THRESHOLD
&& min < HEX_MAX_THRESHOLD
&& max < HEX_MAX_THRESHOLD
diff --git a/contrib/binutils/gas/output-file.c b/contrib/binutils/gas/output-file.c
index f94359a..9603dc4 100644
--- a/contrib/binutils/gas/output-file.c
+++ b/contrib/binutils/gas/output-file.c
@@ -1,6 +1,6 @@
/* output-file.c - Deal with the output file
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2001,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,17 +19,13 @@
the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <stdio.h>
-
#include "as.h"
-
#include "output-file.h"
#ifndef TARGET_MACH
#define TARGET_MACH 0
#endif
-#include "bfd.h"
bfd *stdoutput;
void
@@ -40,11 +36,12 @@ output_file_create (char *name)
else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT)))
{
- if (bfd_get_error () == bfd_error_invalid_target)
- as_perror (_("Selected target format '%s' unknown"), TARGET_FORMAT);
+ bfd_error_type err = bfd_get_error ();
+
+ if (err == bfd_error_invalid_target)
+ as_fatal (_("selected target format '%s' unknown"), TARGET_FORMAT);
else
- as_perror (_("FATAL: can't create %s"), name);
- exit (EXIT_FAILURE);
+ as_fatal (_("can't create %s: %s"), name, bfd_errmsg (err));
}
bfd_set_format (stdoutput, bfd_object);
@@ -56,12 +53,19 @@ output_file_create (char *name)
void
output_file_close (char *filename)
{
+ bfd_boolean res;
+
+ if (stdoutput == NULL)
+ return;
+
/* Close the bfd. */
- if (bfd_close (stdoutput) == 0)
- {
- bfd_perror (filename);
- as_perror (_("FATAL: can't close %s\n"), filename);
- exit (EXIT_FAILURE);
- }
- stdoutput = NULL; /* Trust nobody! */
+ res = bfd_close (stdoutput);
+
+ /* Prevent an infinite loop - if the close failed we will call as_fatal
+ which will call xexit() which may call this function again... */
+ stdoutput = NULL;
+
+ if (! res)
+ as_fatal (_("can't close %s: %s"), filename,
+ bfd_errmsg (bfd_get_error ()));
}
diff --git a/contrib/binutils/gas/po/Make-in b/contrib/binutils/gas/po/Make-in
index be09b4c..86ff314 100644
--- a/contrib/binutils/gas/po/Make-in
+++ b/contrib/binutils/gas/po/Make-in
@@ -16,6 +16,7 @@ SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
+top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -72,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
$(MSGFMT) -o $@ $<
.po.gmo:
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in
index 3a173a5..4215a09 100644
--- a/contrib/binutils/gas/po/POTFILES.in
+++ b/contrib/binutils/gas/po/POTFILES.in
@@ -24,8 +24,6 @@ config/obj-elf.c
config/obj-elf.h
config/obj-evax.c
config/obj-evax.h
-config/obj-ieee.c
-config/obj-ieee.h
config/obj-som.c
config/obj-som.h
config/tc-alpha.c
@@ -38,6 +36,8 @@ config/tc-avr.c
config/tc-avr.h
config/tc-bfin.c
config/tc-bfin.h
+config/tc-cr16.c
+config/tc-cr16.h
config/tc-cris.c
config/tc-cris.h
config/tc-crx.c
@@ -78,6 +78,8 @@ config/tc-m68k.c
config/tc-m68k.h
config/tc-mcore.c
config/tc-mcore.h
+config/tc-mep.c
+config/tc-mep.h
config/tc-mips.c
config/tc-mips.h
config/tc-mmix.c
@@ -102,12 +104,16 @@ config/tc-ppc.c
config/tc-ppc.h
config/tc-s390.c
config/tc-s390.h
+config/tc-score.c
+config/tc-score.h
config/tc-sh64.c
config/tc-sh64.h
config/tc-sh.c
config/tc-sh.h
config/tc-sparc.c
config/tc-sparc.h
+config/tc-spu.c
+config/tc-spu.h
config/tc-tic30.c
config/tc-tic30.h
config/tc-tic54x.c
diff --git a/contrib/binutils/gas/po/gas.pot b/contrib/binutils/gas/po/gas.pot
index 122a678..575f36e 100644
--- a/contrib/binutils/gas/po/gas.pot
+++ b/contrib/binutils/gas/po/gas.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-10-25 08:41+0930\n"
+"POT-Creation-Date: 2007-07-02 15:56+0930\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -16,64 +16,64 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: app.c:470 app.c:484
+#: app.c:473 app.c:487
msgid "end of file in comment"
msgstr ""
-#: app.c:560 app.c:605
+#: app.c:559 app.c:604
#, c-format
msgid "end of file in string; '%c' inserted"
msgstr ""
-#: app.c:631
+#: app.c:630
#, c-format
msgid "unknown escape '\\%c' in string; ignored"
msgstr ""
-#: app.c:786
+#: app.c:793
msgid "end of file not at end of a line; newline inserted"
msgstr ""
-#: app.c:945
+#: app.c:949
msgid "end of file in multiline comment"
msgstr ""
-#: app.c:1010
+#: app.c:1014
msgid "end of file after a one-character quote; \\0 inserted"
msgstr ""
-#: app.c:1018
+#: app.c:1022
msgid "end of file in escape character"
msgstr ""
-#: app.c:1030
+#: app.c:1034
msgid "missing close quote; (assumed)"
msgstr ""
-#: app.c:1098 app.c:1152 app.c:1163 app.c:1228
+#: app.c:1102 app.c:1156 app.c:1167 app.c:1241
msgid "end of file in comment; newline inserted"
msgstr ""
-#: as.c:161
+#: as.c:158
msgid "missing emulation mode name"
msgstr ""
-#: as.c:176
+#: as.c:173
#, c-format
msgid "unrecognized emulation name `%s'"
msgstr ""
-#: as.c:223
+#: as.c:220
#, c-format
msgid "GNU assembler version %s (%s) using BFD version %s\n"
msgstr ""
-#: as.c:230
+#: as.c:227
#, c-format
msgid "Usage: %s [option...] [asmfile...]\n"
msgstr ""
-#: as.c:232
+#: as.c:229
#, c-format
msgid ""
"Options:\n"
@@ -89,131 +89,131 @@ msgid ""
" \t =FILE list to FILE (must be last sub-option)\n"
msgstr ""
-#: as.c:245
+#: as.c:242
#, c-format
msgid " --alternate initially turn on alternate macro syntax\n"
msgstr ""
-#: as.c:247
+#: as.c:244
#, c-format
msgid " -D produce assembler debugging messages\n"
msgstr ""
-#: as.c:249
+#: as.c:246
#, c-format
msgid " --defsym SYM=VAL define symbol SYM to given value\n"
msgstr ""
-#: as.c:265
+#: as.c:262
#, c-format
msgid " emulate output (default %s)\n"
msgstr ""
-#: as.c:270
+#: as.c:267
#, c-format
msgid " --execstack require executable stack for this object\n"
msgstr ""
-#: as.c:272
+#: as.c:269
#, c-format
msgid ""
" --noexecstack don't require executable stack for this object\n"
msgstr ""
-#: as.c:275
+#: as.c:272
#, c-format
msgid " -f skip whitespace and comment preprocessing\n"
msgstr ""
-#: as.c:277
+#: as.c:274
#, c-format
msgid " -g --gen-debug generate debugging information\n"
msgstr ""
-#: as.c:279
+#: as.c:276
#, c-format
msgid " --gstabs generate STABS debugging information\n"
msgstr ""
-#: as.c:281
+#: as.c:278
#, c-format
msgid ""
" --gstabs+ generate STABS debug info with GNU extensions\n"
msgstr ""
-#: as.c:283
+#: as.c:280
#, c-format
msgid " --gdwarf-2 generate DWARF2 debugging information\n"
msgstr ""
-#: as.c:285
+#: as.c:282
#, c-format
msgid " --hash-size=<value> set the hash table size close to <value>\n"
msgstr ""
-#: as.c:287
+#: as.c:284
#, c-format
msgid " --help show this message and exit\n"
msgstr ""
-#: as.c:289
+#: as.c:286
#, c-format
msgid " --target-help show target specific options\n"
msgstr ""
-#: as.c:291
+#: as.c:288
#, c-format
msgid ""
" -I DIR add DIR to search list for .include directives\n"
msgstr ""
-#: as.c:293
+#: as.c:290
#, c-format
msgid " -J don't warn about signed overflow\n"
msgstr ""
-#: as.c:295
+#: as.c:292
#, c-format
msgid ""
" -K warn when differences altered for long "
"displacements\n"
msgstr ""
-#: as.c:297
+#: as.c:294
#, c-format
msgid " -L,--keep-locals keep local symbols (e.g. starting with `L')\n"
msgstr ""
-#: as.c:299
+#: as.c:296
#, c-format
msgid " -M,--mri assemble in MRI compatibility mode\n"
msgstr ""
-#: as.c:301
+#: as.c:298
#, c-format
msgid ""
" --MD FILE write dependency information in FILE (default "
"none)\n"
msgstr ""
-#: as.c:303
+#: as.c:300
#, c-format
msgid " -nocpp ignored\n"
msgstr ""
-#: as.c:305
+#: as.c:302
#, c-format
msgid ""
" -o OBJFILE name the object-file output OBJFILE (default a."
"out)\n"
msgstr ""
-#: as.c:307
+#: as.c:304
#, c-format
msgid " -R fold data section into text section\n"
msgstr ""
-#: as.c:309
+#: as.c:306
#, c-format
msgid ""
" --reduce-memory-overheads \n"
@@ -221,44 +221,44 @@ msgid ""
" assembly times\n"
msgstr ""
-#: as.c:313
+#: as.c:310
#, c-format
msgid ""
" --statistics print various measured statistics from execution\n"
msgstr ""
-#: as.c:315
+#: as.c:312
#, c-format
msgid " --strip-local-absolute strip local absolute symbols\n"
msgstr ""
-#: as.c:317
+#: as.c:314
#, c-format
msgid ""
" --traditional-format Use same format as native assembler when possible\n"
msgstr ""
-#: as.c:319
+#: as.c:316
#, c-format
msgid " --version print assembler version number and exit\n"
msgstr ""
-#: as.c:321
+#: as.c:318
#, c-format
msgid " -W --no-warn suppress warnings\n"
msgstr ""
-#: as.c:323
+#: as.c:320
#, c-format
msgid " --warn don't suppress warnings\n"
msgstr ""
-#: as.c:325
+#: as.c:322
#, c-format
msgid " --fatal-warnings treat warnings as errors\n"
msgstr ""
-#: as.c:327
+#: as.c:324
#, c-format
msgid ""
" --itbl INSTTBL extend instruction set to include instructions\n"
@@ -266,22 +266,22 @@ msgid ""
"INSTTBL\n"
msgstr ""
-#: as.c:330
+#: as.c:327
#, c-format
msgid " -w ignored\n"
msgstr ""
-#: as.c:332
+#: as.c:329
#, c-format
msgid " -X ignored\n"
msgstr ""
-#: as.c:334
+#: as.c:331
#, c-format
msgid " -Z generate object file even after errors\n"
msgstr ""
-#: as.c:336
+#: as.c:333
#, c-format
msgid ""
" --listing-lhs-width set the width in words of the output data column "
@@ -289,7 +289,7 @@ msgid ""
" the listing\n"
msgstr ""
-#: as.c:339
+#: as.c:336
#, c-format
msgid ""
" --listing-lhs-width2 set the width in words of the continuation lines\n"
@@ -298,124 +298,129 @@ msgid ""
" the width of the first line\n"
msgstr ""
-#: as.c:343
+#: as.c:340
#, c-format
msgid ""
" --listing-rhs-width set the max width in characters of the lines from\n"
" the source file\n"
msgstr ""
-#: as.c:346
+#: as.c:343
#, c-format
msgid ""
" --listing-cont-lines set the maximum number of continuation lines used\n"
" for the output data column of the listing\n"
msgstr ""
-#: as.c:353
+#: as.c:346
+#, c-format
+msgid " @FILE read options from FILE\n"
+msgstr ""
+
+#: as.c:354
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: as.c:553
+#: as.c:554
#, c-format
msgid "unrecognized option -%c%s"
msgstr ""
#. This output is intended to follow the GNU standards document.
-#: as.c:591
+#: as.c:592
#, c-format
msgid "GNU assembler %s\n"
msgstr ""
-#: as.c:592
+#: as.c:593
#, c-format
-msgid "Copyright 2005 Free Software Foundation, Inc.\n"
+msgid "Copyright 2007 Free Software Foundation, Inc.\n"
msgstr ""
-#: as.c:593
+#: as.c:594
#, c-format
msgid ""
"This program is free software; you may redistribute it under the terms of\n"
"the GNU General Public License. This program has absolutely no warranty.\n"
msgstr ""
-#: as.c:596
+#: as.c:597
#, c-format
msgid "This assembler was configured for a target of `%s'.\n"
msgstr ""
-#: as.c:603
+#: as.c:604
msgid "multiple emulation names specified"
msgstr ""
-#: as.c:605
+#: as.c:606
msgid "emulations not handled in this configuration"
msgstr ""
-#: as.c:610
+#: as.c:611
#, c-format
msgid "alias = %s\n"
msgstr ""
-#: as.c:611
+#: as.c:612
#, c-format
msgid "canonical = %s\n"
msgstr ""
-#: as.c:612
+#: as.c:613
#, c-format
msgid "cpu-type = %s\n"
msgstr ""
-#: as.c:614
+#: as.c:615
#, c-format
msgid "format = %s\n"
msgstr ""
-#: as.c:617
+#: as.c:618
#, c-format
msgid "bfd-target = %s\n"
msgstr ""
-#: as.c:630
+#: as.c:631
msgid "bad defsym; format is --defsym name=value"
msgstr ""
-#: as.c:650
+#: as.c:651
msgid "no file name following -t option"
msgstr ""
-#: as.c:665
+#: as.c:666
#, c-format
msgid "failed to read instruction table %s\n"
msgstr ""
-#: as.c:832
+#: as.c:833
#, c-format
msgid "invalid listing option `%c'"
msgstr ""
-#: as.c:885
+#: as.c:886
msgid "--hash-size needs a numeric argument"
msgstr ""
-#: as.c:910
+#: as.c:911
#, c-format
msgid "%s: total time in assembly: %ld.%06ld\n"
msgstr ""
-#: as.c:913
+#: as.c:914
#, c-format
msgid "%s: data size %ld\n"
msgstr ""
-#: as.c:1175
+#: as.c:1222
#, c-format
msgid "%d warnings, treating warnings as errors"
msgstr ""
-#: as.h:200
+#: as.h:237
#, c-format
msgid "Case value %ld unexpected at line %d of file \"%s\"\n"
msgstr ""
@@ -424,71 +429,71 @@ msgstr ""
#. * We have a GROSS internal error.
#. * This should never happen.
#.
-#: atof-generic.c:419 config/tc-m68k.c:3118
+#: atof-generic.c:417 config/tc-m68k.c:3342
msgid "failed sanity check"
msgstr ""
-#: cond.c:82
+#: cond.c:83
msgid "invalid identifier for \".ifdef\""
msgstr ""
-#: cond.c:149
+#: cond.c:150
msgid "non-constant expression in \".if\" statement"
msgstr ""
-#: cond.c:276
+#: cond.c:277
msgid "bad format for ifc or ifnc"
msgstr ""
-#: cond.c:306
+#: cond.c:307
msgid "\".elseif\" without matching \".if\""
msgstr ""
-#: cond.c:310
+#: cond.c:311
msgid "\".elseif\" after \".else\""
msgstr ""
-#: cond.c:313 cond.c:419
+#: cond.c:314 cond.c:420
msgid "here is the previous \"else\""
msgstr ""
-#: cond.c:316 cond.c:422
+#: cond.c:317 cond.c:423
msgid "here is the previous \"if\""
msgstr ""
-#: cond.c:345
+#: cond.c:346
msgid "non-constant expression in \".elseif\" statement"
msgstr ""
-#: cond.c:383
+#: cond.c:384
msgid "\".endif\" without \".if\""
msgstr ""
-#: cond.c:412
+#: cond.c:413
msgid "\".else\" without matching \".if\""
msgstr ""
-#: cond.c:416
+#: cond.c:417
msgid "duplicate \"else\""
msgstr ""
-#: cond.c:467
+#: cond.c:468
msgid ".ifeqs syntax error"
msgstr ""
-#: cond.c:548
+#: cond.c:549
msgid "end of macro inside conditional"
msgstr ""
-#: cond.c:550
+#: cond.c:551
msgid "end of file inside conditional"
msgstr ""
-#: cond.c:553
+#: cond.c:554
msgid "here is the start of the unterminated conditional"
msgstr ""
-#: cond.c:557
+#: cond.c:558
msgid "here is the \"else\" of the unterminated conditional"
msgstr ""
@@ -502,7 +507,7 @@ msgstr ""
msgid "Attempt to put an undefined symbol into set %s"
msgstr ""
-#: config/obj-aout.c:116 config/obj-coff.c:1328
+#: config/obj-aout.c:116 config/obj-coff.c:1340
#, c-format
msgid "Symbol `%s' can not be both weak and common"
msgstr ""
@@ -513,82 +518,82 @@ msgid "Inserting \"%s\" into structure table failed: %s"
msgstr ""
#. Zero is used as an end marker in the file.
-#: config/obj-coff.c:354
+#: config/obj-coff.c:366
msgid "Line numbers must be positive integers\n"
msgstr ""
-#: config/obj-coff.c:386
+#: config/obj-coff.c:398
msgid ".ln pseudo-op inside .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:428 ecoff.c:3240
+#: config/obj-coff.c:440 ecoff.c:3240
msgid ".loc outside of .text"
msgstr ""
-#: config/obj-coff.c:435
+#: config/obj-coff.c:447
msgid ".loc pseudo-op inside .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:516
+#: config/obj-coff.c:528
msgid ".def pseudo-op used inside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:555
+#: config/obj-coff.c:567
msgid ".endef pseudo-op used outside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:594
+#: config/obj-coff.c:606
#, c-format
msgid "`%s' symbol without preceding function"
msgstr ""
-#: config/obj-coff.c:681
+#: config/obj-coff.c:693
#, c-format
msgid "unexpected storage class %d"
msgstr ""
-#: config/obj-coff.c:790
+#: config/obj-coff.c:802
msgid ".dim pseudo-op used outside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:810
+#: config/obj-coff.c:822
msgid "badly formed .dim directive ignored"
msgstr ""
-#: config/obj-coff.c:859
+#: config/obj-coff.c:871
msgid ".size pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:874
+#: config/obj-coff.c:886
msgid ".scl pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:891
+#: config/obj-coff.c:903
msgid ".tag pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:909
+#: config/obj-coff.c:921
#, c-format
msgid "tag not found for .tag %s"
msgstr ""
-#: config/obj-coff.c:922
+#: config/obj-coff.c:934
msgid ".type pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:941
+#: config/obj-coff.c:953
msgid ".val pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1108
+#: config/obj-coff.c:1120
msgid "badly formed .weak directive ignored"
msgstr ""
-#: config/obj-coff.c:1286
+#: config/obj-coff.c:1298
msgid "mismatched .eb"
msgstr ""
-#: config/obj-coff.c:1307
+#: config/obj-coff.c:1319
#, c-format
msgid "C_EFCN symbol for %s out of scope"
msgstr ""
@@ -596,28 +601,28 @@ msgstr ""
#. STYP_INFO
#. STYP_LIB
#. STYP_OVER
-#: config/obj-coff.c:1533
+#: config/obj-coff.c:1591
#, c-format
msgid "unsupported section attribute '%c'"
msgstr ""
-#: config/obj-coff.c:1538 config/tc-ppc.c:4610
+#: config/obj-coff.c:1595 config/tc-ppc.c:4617
#, c-format
msgid "unknown section attribute '%c'"
msgstr ""
-#: config/obj-coff.c:1568 config/tc-ppc.c:4628 config/tc-tic54x.c:4287
-#: read.c:2551
+#: config/obj-coff.c:1623 config/tc-ppc.c:4635 config/tc-tic54x.c:4285
+#: read.c:2750
#, c-format
msgid "error setting flags for \"%s\": %s"
msgstr ""
-#: config/obj-coff.c:1579
+#: config/obj-coff.c:1634
#, c-format
msgid "Ignoring changed section attributes for %s"
msgstr ""
-#: config/obj-coff.c:1710
+#: config/obj-coff.c:1765
#, c-format
msgid "0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"
msgstr ""
@@ -630,192 +635,173 @@ msgstr ""
msgid "Can't set register masks"
msgstr ""
-#: config/obj-elf.c:318 config/tc-sparc.c:3973 config/tc-v850.c:451
+#: config/obj-elf.c:322 config/tc-sparc.c:4053 config/tc-v850.c:450
#, c-format
msgid "bad .common segment %s"
msgstr ""
-#: config/obj-elf.c:596
+#: config/obj-elf.c:600
#, c-format
msgid "setting incorrect section type for %s"
msgstr ""
-#: config/obj-elf.c:601
+#: config/obj-elf.c:605
#, c-format
msgid "ignoring incorrect section type for %s"
msgstr ""
-#: config/obj-elf.c:638
+#: config/obj-elf.c:647
#, c-format
msgid "setting incorrect section attributes for %s"
msgstr ""
-#: config/obj-elf.c:690
+#: config/obj-elf.c:699
#, c-format
msgid "ignoring changed section type for %s"
msgstr ""
-#: config/obj-elf.c:702
+#: config/obj-elf.c:711
#, c-format
msgid "ignoring changed section attributes for %s"
msgstr ""
-#: config/obj-elf.c:704
+#: config/obj-elf.c:713
#, c-format
msgid "ignoring changed section entity size for %s"
msgstr ""
-#: config/obj-elf.c:757
+#: config/obj-elf.c:766
msgid "unrecognized .section attribute: want a,w,x,M,S,G,T"
msgstr ""
-#: config/obj-elf.c:794
+#: config/obj-elf.c:803
msgid "unrecognized section attribute"
msgstr ""
-#: config/obj-elf.c:822 read.c:2535
+#: config/obj-elf.c:831 read.c:2734
msgid "unrecognized section type"
msgstr ""
-#: config/obj-elf.c:852
+#: config/obj-elf.c:861
msgid "missing name"
msgstr ""
-#: config/obj-elf.c:963
+#: config/obj-elf.c:972
msgid "invalid merge entity size"
msgstr ""
-#: config/obj-elf.c:970
+#: config/obj-elf.c:979
msgid "entity size for SHF_MERGE not specified"
msgstr ""
-#: config/obj-elf.c:990
+#: config/obj-elf.c:999
msgid "group name for SHF_GROUP not specified"
msgstr ""
-#: config/obj-elf.c:1003
+#: config/obj-elf.c:1012
msgid "character following name is not '#'"
msgstr ""
-#: config/obj-elf.c:1118
+#: config/obj-elf.c:1127
msgid ".previous without corresponding .section; ignored"
msgstr ""
-#: config/obj-elf.c:1144
+#: config/obj-elf.c:1153
msgid ".popsection without corresponding .pushsection; ignored"
msgstr ""
-#: config/obj-elf.c:1196
+#: config/obj-elf.c:1205
msgid "expected comma after name in .symver"
msgstr ""
-#: config/obj-elf.c:1220
+#: config/obj-elf.c:1229
#, c-format
msgid "missing version name in `%s' for symbol `%s'"
msgstr ""
-#: config/obj-elf.c:1231
+#: config/obj-elf.c:1240
#, c-format
msgid "multiple versions [`%s'|`%s'] for symbol `%s'"
msgstr ""
-#: config/obj-elf.c:1461
+#: config/obj-elf.c:1470
msgid "expected quoted string"
msgstr ""
-#: config/obj-elf.c:1481
+#: config/obj-elf.c:1490
#, c-format
msgid "expected comma after name `%s' in .size directive"
msgstr ""
-#: config/obj-elf.c:1490
+#: config/obj-elf.c:1499
msgid "missing expression in .size directive"
msgstr ""
-#: config/obj-elf.c:1577
+#: config/obj-elf.c:1586
#, c-format
msgid "unrecognized symbol type \"%s\""
msgstr ""
-#: config/obj-elf.c:1745
+#: config/obj-elf.c:1754
msgid ".size expression too complicated to fix up"
msgstr ""
-#: config/obj-elf.c:1777
+#: config/obj-elf.c:1786
#, c-format
msgid ""
"invalid attempt to declare external version name as default in symbol `%s'"
msgstr ""
-#: config/obj-elf.c:1838 ecoff.c:3598
+#: config/obj-elf.c:1847 ecoff.c:3598
#, c-format
msgid "symbol `%s' can not be both weak and common"
msgstr ""
-#: config/obj-elf.c:1945
+#: config/obj-elf.c:1954
#, c-format
msgid "assuming all members of group `%s' are COMDAT"
msgstr ""
-#: config/obj-elf.c:1967
+#: config/obj-elf.c:1976
#, c-format
msgid "can't create group: %s"
msgstr ""
-#: config/obj-elf.c:2076
+#: config/obj-elf.c:2086
#, c-format
msgid "failed to set up debugging information: %s"
msgstr ""
-#: config/obj-elf.c:2096
+#: config/obj-elf.c:2106
#, c-format
msgid "can't start writing .mdebug section: %s"
msgstr ""
-#: config/obj-elf.c:2104
+#: config/obj-elf.c:2114
#, c-format
msgid "could not write .mdebug section: %s"
msgstr ""
-#: config/obj-elf.h:140
-#, c-format
-msgid "can't allocate ELF private section data: %s"
-msgstr ""
-
-#: config/obj-ieee.c:69
-#, c-format
-msgid "Out of step\n"
-msgstr ""
-
-#: config/obj-ieee.c:449
-msgid "too many sections"
-msgstr ""
-
-#: config/obj-ieee.c:511
-#, c-format
-msgid "FATAL: Can't create %s"
-msgstr ""
-
#: config/obj-som.c:129
msgid "Only one .version pseudo-op per file!"
msgstr ""
-#: config/obj-som.c:146 config/obj-som.c:191
+#: config/obj-som.c:146 config/obj-som.c:188
msgid "Expected quoted string"
msgstr ""
-#: config/obj-som.c:155
+#: config/obj-som.c:153
#, c-format
-msgid "FATAL: Attaching version header %s"
+msgid "attaching version header %s: %s"
msgstr ""
-#: config/obj-som.c:174
+#: config/obj-som.c:171
msgid "Only one .copyright pseudo-op per file!"
msgstr ""
-#: config/obj-som.c:200
+#: config/obj-som.c:195
#, c-format
-msgid "FATAL: Attaching copyright header %s"
+msgid "attaching copyright header %s: %s"
msgstr ""
#: config/tc-alpha.c:592
@@ -887,8 +873,8 @@ msgstr ""
msgid "opcode `%s' not supported for target %s"
msgstr ""
-#: config/tc-alpha.c:1129 config/tc-alpha.c:3145 config/tc-avr.c:1221
-#: config/tc-msp430.c:1870
+#: config/tc-alpha.c:1129 config/tc-alpha.c:3145 config/tc-avr.c:1321
+#: config/tc-msp430.c:1868
#, c-format
msgid "unknown opcode `%s'"
msgstr ""
@@ -968,17 +954,17 @@ msgstr ""
msgid "sequence number in use for !tlsgd!%ld"
msgstr ""
-#: config/tc-alpha.c:1823 config/tc-arc.c:294 config/tc-mn10200.c:889
-#: config/tc-mn10300.c:2600 config/tc-ppc.c:1476 config/tc-s390.c:614
-#: config/tc-v850.c:1573
+#: config/tc-alpha.c:1823 config/tc-arc.c:292 config/tc-mn10200.c:888
+#: config/tc-mn10300.c:2604 config/tc-ppc.c:1541 config/tc-s390.c:615
+#: config/tc-v850.c:1588
msgid "operand"
msgstr ""
-#: config/tc-alpha.c:1926 config/tc-alpha.c:1950 config/tc-d10v.c:585
-#: config/tc-d30v.c:573 config/tc-mn10200.c:1133 config/tc-mn10300.c:1893
-#: config/tc-ppc.c:2348 config/tc-ppc.c:2565 config/tc-ppc.c:2577
-#: config/tc-s390.c:1230 config/tc-s390.c:1330 config/tc-s390.c:1459
-#: config/tc-v850.c:1747 config/tc-v850.c:1770 config/tc-v850.c:1973
+#: config/tc-alpha.c:1926 config/tc-alpha.c:1950 config/tc-d10v.c:584
+#: config/tc-d30v.c:572 config/tc-mn10200.c:1132 config/tc-mn10300.c:1892
+#: config/tc-ppc.c:2402 config/tc-ppc.c:2619 config/tc-ppc.c:2631
+#: config/tc-s390.c:1231 config/tc-s390.c:1331 config/tc-s390.c:1460
+#: config/tc-v850.c:1762 config/tc-v850.c:1785 config/tc-v850.c:1988
msgid "too many fixups"
msgstr ""
@@ -994,17 +980,17 @@ msgstr ""
msgid "can not resolve expression"
msgstr ""
-#: config/tc-alpha.c:3275 config/tc-ppc.c:1781 config/tc-ppc.c:4373
+#: config/tc-alpha.c:3275 config/tc-ppc.c:1840 config/tc-ppc.c:4380
#, c-format
msgid ".COMMon length (%ld.) <0! Ignored."
msgstr ""
-#: config/tc-alpha.c:3304 config/tc-sparc.c:3843 config/tc-v850.c:246
+#: config/tc-alpha.c:3304 config/tc-sparc.c:3923 config/tc-v850.c:245
msgid "Ignoring attempt to re-define symbol"
msgstr ""
-#: config/tc-alpha.c:3313 config/tc-alpha.c:3322 config/tc-ppc.c:4410
-#: config/tc-sparc.c:3851
+#: config/tc-alpha.c:3313 config/tc-alpha.c:3322 config/tc-ppc.c:4417
+#: config/tc-sparc.c:3931
#, c-format
msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
@@ -1033,7 +1019,7 @@ msgstr ""
msgid ".fmask outside of .ent"
msgstr ""
-#: config/tc-alpha.c:3547 ecoff.c:3204
+#: config/tc-alpha.c:3547 config/tc-score.c:5886 ecoff.c:3204
msgid ".mask outside of .ent"
msgstr ""
@@ -1045,7 +1031,8 @@ msgstr ""
msgid "bad .mask directive"
msgstr ""
-#: config/tc-alpha.c:3590 config/tc-mips.c:14022 ecoff.c:3168
+#: config/tc-alpha.c:3590 config/tc-mips.c:14589 config/tc-score.c:6029
+#: ecoff.c:3168
msgid ".frame outside of .ent"
msgstr ""
@@ -1134,7 +1121,7 @@ msgstr ""
msgid "No symbol after .code_address"
msgstr ""
-#: config/tc-alpha.c:4226
+#: config/tc-alpha.c:4226 config/tc-score.c:5892
msgid "Bad .mask directive"
msgstr ""
@@ -1168,7 +1155,7 @@ msgstr ""
msgid "Alignment too large: %d. assumed"
msgstr ""
-#: config/tc-alpha.c:4497 config/tc-d30v.c:2083
+#: config/tc-alpha.c:4497 config/tc-d30v.c:2082
msgid "Alignment negative: 0 assumed"
msgstr ""
@@ -1191,15 +1178,16 @@ msgstr ""
msgid "internal error: can't hash macro `%s': %s"
msgstr ""
-#: config/tc-alpha.c:4998 config/tc-i960.c:710 config/tc-xtensa.c:5112
-#: config/tc-xtensa.c:5181 config/tc-xtensa.c:5227
+#: config/tc-alpha.c:4998 config/tc-arm.c:6012 config/tc-arm.c:6024
+#: config/tc-i960.c:708 config/tc-xtensa.c:5161 config/tc-xtensa.c:5239
+#: config/tc-xtensa.c:5285 config/tc-z80.c:1893
msgid "syntax error"
msgstr ""
-#: config/tc-alpha.c:5067 config/tc-h8300.c:2055 config/tc-hppa.c:4041
-#: config/tc-i860.c:1059 config/tc-m68hc11.c:558 config/tc-m68k.c:4524
-#: config/tc-ns32k.c:1945 config/tc-or32.c:579 config/tc-sparc.c:2944
-#: config/tc-z8k.c:1310
+#: config/tc-alpha.c:5067 config/tc-h8300.c:2053 config/tc-hppa.c:1381
+#: config/tc-i860.c:1057 config/tc-m68hc11.c:560 config/tc-m68k.c:4654
+#: config/tc-ns32k.c:1943 config/tc-or32.c:580 config/tc-sparc.c:2998
+#: config/tc-spu.c:748 config/tc-z8k.c:1332
msgid "Bad call to MD_ATOF()"
msgstr ""
@@ -1241,7 +1229,7 @@ msgstr ""
msgid "type %d reloc done?\n"
msgstr ""
-#: config/tc-alpha.c:5420 config/tc-alpha.c:5427 config/tc-mips.c:8657
+#: config/tc-alpha.c:5420 config/tc-alpha.c:5427
msgid "Used $at without \".set noat\""
msgstr ""
@@ -1250,12 +1238,12 @@ msgstr ""
msgid "!samegp reloc against symbol without .prologue: %s"
msgstr ""
-#: config/tc-alpha.c:5626 config/tc-xtensa.c:5739
+#: config/tc-alpha.c:5626 config/tc-xtensa.c:5795
#, c-format
msgid "cannot represent `%s' relocation in object file"
msgstr ""
-#: config/tc-alpha.c:5632 config/tc-xtensa.c:5747
+#: config/tc-alpha.c:5632 config/tc-xtensa.c:5803
#, c-format
msgid "internal error? cannot generate `%s' relocation"
msgstr ""
@@ -1265,555 +1253,722 @@ msgstr ""
msgid "frame reg expected, using $%d."
msgstr ""
-#: config/tc-arc.c:1077 config/tc-ip2k.c:249
+#: config/tc-arc.c:1076 config/tc-ip2k.c:248
msgid "md_estimate_size_before_relax\n"
msgstr ""
-#: config/tc-arc.c:1088
+#: config/tc-arc.c:1087
msgid "md_convert_frag\n"
msgstr ""
#. We can't actually support subtracting a symbol.
-#: config/tc-arc.c:1288 config/tc-arm.c:1021 config/tc-arm.c:5764
-#: config/tc-arm.c:5815 config/tc-arm.c:6614 config/tc-arm.c:7256
-#: config/tc-arm.c:7284 config/tc-arm.c:7536 config/tc-arm.c:7553
-#: config/tc-arm.c:7674 config/tc-avr.c:970 config/tc-cris.c:3928
-#: config/tc-d10v.c:1539 config/tc-d30v.c:1938 config/tc-mips.c:3794
-#: config/tc-mips.c:4902 config/tc-mips.c:5834 config/tc-mips.c:6428
-#: config/tc-msp430.c:1979 config/tc-ppc.c:5562 config/tc-v850.c:2274
-#: config/tc-xstormy16.c:484
+#: config/tc-arc.c:1287 config/tc-arm.c:1522 config/tc-arm.c:8104
+#: config/tc-arm.c:8155 config/tc-arm.c:8388 config/tc-arm.c:9111
+#: config/tc-arm.c:9915 config/tc-arm.c:9943 config/tc-arm.c:10200
+#: config/tc-arm.c:10217 config/tc-arm.c:10339 config/tc-avr.c:1052
+#: config/tc-cris.c:3984 config/tc-d10v.c:1536 config/tc-d30v.c:1937
+#: config/tc-mips.c:4176 config/tc-mips.c:5300 config/tc-mips.c:6239
+#: config/tc-mips.c:6831 config/tc-msp430.c:1976 config/tc-ppc.c:5585
+#: config/tc-spu.c:961 config/tc-spu.c:985 config/tc-v850.c:2303
+#: config/tc-xstormy16.c:484 config/tc-xtensa.c:5597 config/tc-xtensa.c:11559
msgid "expression too complex"
msgstr ""
-#: config/tc-arm.c:352
+#: config/tc-arm.c:483
msgid "ARM register expected"
msgstr ""
-#: config/tc-arm.c:353
+#: config/tc-arm.c:484
msgid "bad or missing co-processor number"
msgstr ""
-#: config/tc-arm.c:354
+#: config/tc-arm.c:485
msgid "co-processor register expected"
msgstr ""
-#: config/tc-arm.c:355
+#: config/tc-arm.c:486
msgid "FPA register expected"
msgstr ""
-#: config/tc-arm.c:356
+#: config/tc-arm.c:487
msgid "VFP single precision register expected"
msgstr ""
-#: config/tc-arm.c:357
-msgid "VFP double precision register expected"
+#: config/tc-arm.c:488
+msgid "VFP/Neon double precision register expected"
+msgstr ""
+
+#: config/tc-arm.c:489
+msgid "Neon quad precision register expected"
+msgstr ""
+
+#: config/tc-arm.c:490
+msgid "VFP single or double precision register expected"
+msgstr ""
+
+#: config/tc-arm.c:491
+msgid "Neon double or quad precision register expected"
msgstr ""
-#: config/tc-arm.c:358
+#: config/tc-arm.c:492
+msgid "VFP single, double or Neon quad precision register expected"
+msgstr ""
+
+#: config/tc-arm.c:493
msgid "VFP system register expected"
msgstr ""
-#: config/tc-arm.c:359
+#: config/tc-arm.c:494
msgid "Maverick MVF register expected"
msgstr ""
-#: config/tc-arm.c:360
+#: config/tc-arm.c:495
msgid "Maverick MVD register expected"
msgstr ""
-#: config/tc-arm.c:361
+#: config/tc-arm.c:496
msgid "Maverick MVFX register expected"
msgstr ""
-#: config/tc-arm.c:362
+#: config/tc-arm.c:497
msgid "Maverick MVDX register expected"
msgstr ""
-#: config/tc-arm.c:363
+#: config/tc-arm.c:498
msgid "Maverick MVAX register expected"
msgstr ""
-#: config/tc-arm.c:364
+#: config/tc-arm.c:499
msgid "Maverick DSPSC register expected"
msgstr ""
-#: config/tc-arm.c:365
+#: config/tc-arm.c:500
msgid "iWMMXt data register expected"
msgstr ""
-#: config/tc-arm.c:366
+#: config/tc-arm.c:501 config/tc-arm.c:5821
msgid "iWMMXt control register expected"
msgstr ""
-#: config/tc-arm.c:367
+#: config/tc-arm.c:502
msgid "iWMMXt scalar register expected"
msgstr ""
-#: config/tc-arm.c:368
+#: config/tc-arm.c:503
msgid "XScale accumulator register expected"
msgstr ""
-#: config/tc-arm.c:499
+#. For score5u : div/mul will pop warning message, mmu/alw/asw will pop error message.
+#: config/tc-arm.c:652 config/tc-score.c:47
msgid "bad arguments to instruction"
msgstr ""
-#: config/tc-arm.c:500
+#: config/tc-arm.c:653 config/tc-score.c:48
msgid "r15 not allowed here"
msgstr ""
-#: config/tc-arm.c:501
+#: config/tc-arm.c:654
msgid "instruction cannot be conditional"
msgstr ""
-#: config/tc-arm.c:502
+#: config/tc-arm.c:655
msgid "registers may not be the same"
msgstr ""
-#: config/tc-arm.c:503
+#: config/tc-arm.c:656
msgid "lo register required"
msgstr ""
-#: config/tc-arm.c:504
+#: config/tc-arm.c:657
msgid "instruction not supported in Thumb16 mode"
msgstr ""
-#: config/tc-arm.c:640
+#: config/tc-arm.c:658
+msgid "instruction does not accept this addressing mode"
+msgstr ""
+
+#: config/tc-arm.c:659
+msgid "branch must be last instruction in IT block"
+msgstr ""
+
+#: config/tc-arm.c:660
+msgid "instruction not allowed in IT block"
+msgstr ""
+
+#: config/tc-arm.c:661
+msgid "selected FPU does not support instruction"
+msgstr ""
+
+#: config/tc-arm.c:803
msgid "immediate expression requires a # prefix"
msgstr ""
-#: config/tc-arm.c:666 expr.c:1302 read.c:2228
+#: config/tc-arm.c:830 config/tc-score.c:5675 expr.c:1298 read.c:2435
msgid "bad expression"
msgstr ""
-#: config/tc-arm.c:677 config/tc-i860.c:1005 config/tc-sparc.c:2844
+#: config/tc-arm.c:841 config/tc-i860.c:1003 config/tc-sparc.c:2898
msgid "bad segment"
msgstr ""
-#: config/tc-arm.c:693 config/tc-arm.c:3230 config/tc-i960.c:1302
+#: config/tc-arm.c:858 config/tc-arm.c:4346 config/tc-i960.c:1300
+#: config/tc-score.c:985
msgid "invalid constant"
msgstr ""
-#: config/tc-arm.c:754
+#: config/tc-arm.c:919 config/tc-score.c:4749
msgid "bad call to MD_ATOF()"
msgstr ""
-#: config/tc-arm.c:821
+#: config/tc-arm.c:986
msgid "expected #constant"
msgstr ""
-#: config/tc-arm.c:953
+#: config/tc-arm.c:1147
+#, c-format
+msgid "unexpected character `%c' in type specifier"
+msgstr ""
+
+#: config/tc-arm.c:1164
+#, c-format
+msgid "bad size %d in type specifier"
+msgstr ""
+
+#: config/tc-arm.c:1214
+msgid "only one type should be specified for operand"
+msgstr ""
+
+#: config/tc-arm.c:1220
+msgid "vector type expected"
+msgstr ""
+
+#: config/tc-arm.c:1292
+msgid "can't redefine type for operand"
+msgstr ""
+
+#: config/tc-arm.c:1303
+msgid "only D registers may be indexed"
+msgstr ""
+
+#: config/tc-arm.c:1309
+msgid "can't change index for operand"
+msgstr ""
+
+#: config/tc-arm.c:1325 config/tc-arm.c:3947
+msgid "constant expression required"
+msgstr ""
+
+#: config/tc-arm.c:1369
+msgid "register operand expected, but got scalar"
+msgstr ""
+
+#: config/tc-arm.c:1402
+msgid "scalar must have an index"
+msgstr ""
+
+#: config/tc-arm.c:1407 config/tc-arm.c:13097 config/tc-arm.c:13145
+#: config/tc-arm.c:13547
+msgid "scalar index out of range"
+msgstr ""
+
+#: config/tc-arm.c:1454
msgid "bad range in register list"
msgstr ""
-#: config/tc-arm.c:961 config/tc-arm.c:970 config/tc-arm.c:1011
+#: config/tc-arm.c:1462 config/tc-arm.c:1471 config/tc-arm.c:1512
#, c-format
msgid "Warning: duplicated register (r%d) in register list"
msgstr ""
-#: config/tc-arm.c:973
+#: config/tc-arm.c:1474
msgid "Warning: register range not in ascending order"
msgstr ""
-#: config/tc-arm.c:984
+#: config/tc-arm.c:1485
msgid "missing `}'"
msgstr ""
-#: config/tc-arm.c:1000
+#: config/tc-arm.c:1501
msgid "invalid register mask"
msgstr ""
-#: config/tc-arm.c:1091 config/tc-arm.c:1126 config/tc-h8300.c:991
-#: config/tc-mips.c:9797 config/tc-mips.c:9827
+#: config/tc-arm.c:1583
+msgid "expecting {"
+msgstr ""
+
+#: config/tc-arm.c:1638 config/tc-arm.c:1682
+msgid "register out of range in list"
+msgstr ""
+
+#: config/tc-arm.c:1654 config/tc-arm.c:1699 config/tc-h8300.c:989
+#: config/tc-mips.c:10168 config/tc-mips.c:10190
msgid "invalid register list"
msgstr ""
-#: config/tc-arm.c:1097 config/tc-arm.c:2402 config/tc-arm.c:2535
+#: config/tc-arm.c:1660 config/tc-arm.c:3412 config/tc-arm.c:3545
msgid "register list not in ascending order"
msgstr ""
-#: config/tc-arm.c:1118
+#: config/tc-arm.c:1691
msgid "register range not in ascending order"
msgstr ""
-#: config/tc-arm.c:1151
+#: config/tc-arm.c:1724
msgid "non-contiguous register range"
msgstr ""
-#: config/tc-arm.c:1199
+#: config/tc-arm.c:1850
+msgid "don't use Rn-Rm syntax with non-unit stride"
+msgstr ""
+
+#: config/tc-arm.c:1905
+msgid "error parsing element/structure list"
+msgstr ""
+
+#: config/tc-arm.c:1911
+msgid "expected }"
+msgstr ""
+
+#: config/tc-arm.c:1967
#, c-format
msgid "ignoring attempt to redefine built-in register '%s'"
msgstr ""
-#: config/tc-arm.c:1204
+#: config/tc-arm.c:1972
#, c-format
msgid "ignoring redefinition of register alias '%s'"
msgstr ""
-#: config/tc-arm.c:1248
+#: config/tc-arm.c:2000
+msgid "attempt to redefine typed alias"
+msgstr ""
+
+#: config/tc-arm.c:2038
#, c-format
msgid "unknown register '%s' -- .req ignored"
msgstr ""
-#: config/tc-arm.c:1291
+#: config/tc-arm.c:2121
+msgid "bad type for register"
+msgstr ""
+
+#: config/tc-arm.c:2132
+msgid "expression must be constant"
+msgstr ""
+
+#: config/tc-arm.c:2149
+msgid "can't redefine the type of a register alias"
+msgstr ""
+
+#: config/tc-arm.c:2156
+msgid "you must specify a single type only"
+msgstr ""
+
+#: config/tc-arm.c:2169
+msgid "can't redefine the index of a scalar alias"
+msgstr ""
+
+#: config/tc-arm.c:2177
+msgid "scalar index must be constant"
+msgstr ""
+
+#: config/tc-arm.c:2186
+msgid "expecting ]"
+msgstr ""
+
+#: config/tc-arm.c:2223
msgid "invalid syntax for .req directive"
msgstr ""
-#: config/tc-arm.c:1317
+#: config/tc-arm.c:2229
+msgid "invalid syntax for .dn directive"
+msgstr ""
+
+#: config/tc-arm.c:2235
+msgid "invalid syntax for .qn directive"
+msgstr ""
+
+#: config/tc-arm.c:2261
msgid "invalid syntax for .unreq directive"
msgstr ""
-#: config/tc-arm.c:1323
+#: config/tc-arm.c:2267
#, c-format
msgid "unknown register alias '%s'"
msgstr ""
-#: config/tc-arm.c:1325
+#: config/tc-arm.c:2269
#, c-format
msgid "ignoring attempt to undefine built-in register '%s'"
msgstr ""
-#: config/tc-arm.c:1456
+#: config/tc-arm.c:2402
msgid "selected processor does not support THUMB opcodes"
msgstr ""
-#: config/tc-arm.c:1470
+#: config/tc-arm.c:2416
msgid "selected processor does not support ARM opcodes"
msgstr ""
-#: config/tc-arm.c:1483
+#: config/tc-arm.c:2429
#, c-format
msgid "invalid instruction size selected (%d)"
msgstr ""
-#: config/tc-arm.c:1515
+#: config/tc-arm.c:2461
#, c-format
msgid "invalid operand to .code directive (%d) (expecting 16 or 32)"
msgstr ""
-#: config/tc-arm.c:1571
+#: config/tc-arm.c:2517
#, c-format
msgid "expected comma after name \"%s\""
msgstr ""
-#: config/tc-arm.c:1621 config/tc-m32r.c:589
+#: config/tc-arm.c:2567 config/tc-m32r.c:588
#, c-format
msgid "symbol `%s' already defined"
msgstr ""
-#: config/tc-arm.c:1655
+#: config/tc-arm.c:2601
#, c-format
msgid "unrecognized syntax mode \"%s\""
msgstr ""
-#: config/tc-arm.c:1675
+#: config/tc-arm.c:2622
#, c-format
msgid "alignment too large: %d assumed"
msgstr ""
-#: config/tc-arm.c:1678
+#: config/tc-arm.c:2625
msgid "alignment negative. 0 assumed."
msgstr ""
-#: config/tc-arm.c:1816
+#: config/tc-arm.c:2772
msgid "literal pool overflow"
msgstr ""
-#: config/tc-arm.c:1972 config/tc-arm.c:3888
+#: config/tc-arm.c:2928 config/tc-arm.c:5756
msgid "unrecognized relocation suffix"
msgstr ""
-#: config/tc-arm.c:1985
+#: config/tc-arm.c:2941
msgid "(plt) is only valid on branch targets"
msgstr ""
-#: config/tc-arm.c:1991 config/tc-s390.c:1128 config/tc-s390.c:1742
-#: config/tc-xtensa.c:1601
+#: config/tc-arm.c:2947 config/tc-s390.c:1129 config/tc-s390.c:1743
+#: config/tc-xtensa.c:1545
#, c-format
msgid "%s relocations do not fit in %d bytes"
msgstr ""
-#: config/tc-arm.c:2039 dwarf2dbg.c:659
+#: config/tc-arm.c:2995 dwarf2dbg.c:689
msgid "expected 0 or 1"
msgstr ""
-#: config/tc-arm.c:2043
+#: config/tc-arm.c:2999
msgid "missing comma"
msgstr ""
-#: config/tc-arm.c:2098
+#: config/tc-arm.c:3054
msgid "dupicate .handlerdata directive"
msgstr ""
-#: config/tc-arm.c:2169
+#: config/tc-arm.c:3125
msgid "personality routine specified for cantunwind frame"
msgstr ""
-#: config/tc-arm.c:2183
+#: config/tc-arm.c:3139
msgid "duplicate .personalityindex directive"
msgstr ""
-#: config/tc-arm.c:2190
+#: config/tc-arm.c:3146
msgid "bad personality routine number"
msgstr ""
-#: config/tc-arm.c:2209
+#: config/tc-arm.c:3165
msgid "duplicate .personality directive"
msgstr ""
-#: config/tc-arm.c:2232 config/tc-arm.c:2354
+#: config/tc-arm.c:3188 config/tc-arm.c:3316 config/tc-arm.c:3364
msgid "expected register list"
msgstr ""
-#: config/tc-arm.c:2310
+#: config/tc-arm.c:3270
msgid "expected , <constant>"
msgstr ""
-#: config/tc-arm.c:2319
+#: config/tc-arm.c:3279
msgid "number of registers must be in the range [1:4]"
msgstr ""
-#: config/tc-arm.c:2416 config/tc-arm.c:2549
+#: config/tc-arm.c:3426 config/tc-arm.c:3559
msgid "bad register range"
msgstr ""
-#: config/tc-arm.c:2602
+#: config/tc-arm.c:3613
msgid "register expected"
msgstr ""
-#: config/tc-arm.c:2612
+#: config/tc-arm.c:3623
msgid "FPA .unwind_save does not take a register list"
msgstr ""
-#: config/tc-arm.c:2625
+#: config/tc-arm.c:3641
msgid ".unwind_save does not support this kind of register"
msgstr ""
-#: config/tc-arm.c:2650
+#: config/tc-arm.c:3677
msgid "SP and PC not permitted in .unwind_movsp directive"
msgstr ""
-#: config/tc-arm.c:2655
+#: config/tc-arm.c:3682
msgid "unexpected .unwind_movsp directive"
msgstr ""
-#: config/tc-arm.c:2679
+#: config/tc-arm.c:3706
msgid "stack increment must be multiple of 4"
msgstr ""
-#: config/tc-arm.c:2708
+#: config/tc-arm.c:3735
msgid "expected <reg>, <reg>"
msgstr ""
-#: config/tc-arm.c:2726
+#: config/tc-arm.c:3753
msgid "register must be either sp or set by a previousunwind_movsp directive"
msgstr ""
-#: config/tc-arm.c:2762
+#: config/tc-arm.c:3789
msgid "expected <offset>, <opcode>"
msgstr ""
-#: config/tc-arm.c:2774
+#: config/tc-arm.c:3801
msgid "unwind opcode too long"
msgstr ""
-#: config/tc-arm.c:2779
+#: config/tc-arm.c:3806
msgid "invalid unwind opcode"
msgstr ""
-#: config/tc-arm.c:2829
-msgid "expected numeric constant"
-msgstr ""
-
-#: config/tc-arm.c:2838
-msgid "expected comma"
-msgstr ""
-
-#: config/tc-arm.c:2877
-msgid "bad string constant"
-msgstr ""
-
-#: config/tc-arm.c:2881
-msgid "expected <tag> , <value>"
-msgstr ""
-
-#: config/tc-arm.c:2957
-msgid "constant expression required"
-msgstr ""
-
-#: config/tc-arm.c:2963 config/tc-arm.c:6472 config/tc-arm.c:11799
-#: config/tc-arm.c:11824 config/tc-arm.c:11832 config/tc-z8k.c:1122
-#: config/tc-z8k.c:1132
+#: config/tc-arm.c:3953 config/tc-arm.c:4816 config/tc-arm.c:8391
+#: config/tc-arm.c:8873 config/tc-arm.c:11671 config/tc-arm.c:18619
+#: config/tc-arm.c:18644 config/tc-arm.c:18652 config/tc-z8k.c:1144
+#: config/tc-z8k.c:1154
msgid "immediate value out of range"
msgstr ""
-#: config/tc-arm.c:3058
+#: config/tc-arm.c:4100
msgid "invalid FPA immediate expression"
msgstr ""
-#: config/tc-arm.c:3108 config/tc-arm.c:3116
+#: config/tc-arm.c:4224 config/tc-arm.c:4232
msgid "shift expression expected"
msgstr ""
-#: config/tc-arm.c:3130
+#: config/tc-arm.c:4246
msgid "'LSL' or 'ASR' required"
msgstr ""
-#: config/tc-arm.c:3138
+#: config/tc-arm.c:4254
msgid "'LSL' required"
msgstr ""
-#: config/tc-arm.c:3146
+#: config/tc-arm.c:4262
msgid "'ASR' required"
msgstr ""
-#: config/tc-arm.c:3218 config/tc-arm.c:4349 config/tc-v850.c:1844
-#: config/tc-v850.c:1865
+#: config/tc-arm.c:4334 config/tc-arm.c:4810 config/tc-arm.c:6382
+#: config/tc-v850.c:1859 config/tc-v850.c:1880
msgid "constant expression expected"
msgstr ""
-#: config/tc-arm.c:3225
+#: config/tc-arm.c:4341
msgid "invalid rotation"
msgstr ""
-#: config/tc-arm.c:3340 config/tc-arm.c:3640
+#: config/tc-arm.c:4501 config/tc-arm.c:4646
+msgid "unknown group relocation"
+msgstr ""
+
+#: config/tc-arm.c:4614
+msgid "alignment must be constant"
+msgstr ""
+
+#: config/tc-arm.c:4677
+msgid "this group relocation is not allowed on this instruction"
+msgstr ""
+
+#: config/tc-arm.c:4689 config/tc-arm.c:5080
msgid "']' expected"
msgstr ""
-#: config/tc-arm.c:3358
+#: config/tc-arm.c:4707
msgid "'}' expected at end of 'option' field"
msgstr ""
-#: config/tc-arm.c:3363
+#: config/tc-arm.c:4712
msgid "cannot combine index with option"
msgstr ""
-#: config/tc-arm.c:3376
+#: config/tc-arm.c:4725
msgid "cannot combine pre- and post-indexing"
msgstr ""
-#: config/tc-arm.c:3472
+#: config/tc-arm.c:4886
msgid "flag for {c}psr instruction expected"
msgstr ""
-#: config/tc-arm.c:3497
+#: config/tc-arm.c:4911
msgid "unrecognized CPS flag"
msgstr ""
-#: config/tc-arm.c:3504
+#: config/tc-arm.c:4918
msgid "missing CPS flags"
msgstr ""
-#: config/tc-arm.c:3527 config/tc-arm.c:3533
+#: config/tc-arm.c:4941 config/tc-arm.c:4947
msgid "valid endian specifiers are be or le"
msgstr ""
-#: config/tc-arm.c:3555
+#: config/tc-arm.c:4969
msgid "missing rotation field after comma"
msgstr ""
-#: config/tc-arm.c:3570
+#: config/tc-arm.c:4984
msgid "rotation can only be 0, 8, 16, or 24"
msgstr ""
-#: config/tc-arm.c:3590
+#: config/tc-arm.c:5004
msgid "condition required"
msgstr ""
-#: config/tc-arm.c:3632
+#: config/tc-arm.c:5042 config/tc-arm.c:6877
+msgid "'[' expected"
+msgstr ""
+
+#: config/tc-arm.c:5055
+msgid "',' expected"
+msgstr ""
+
+#: config/tc-arm.c:5072
msgid "invalid shift"
msgstr ""
-#: config/tc-arm.c:3929
+#: config/tc-arm.c:5145
+msgid "can't use Neon quad register here"
+msgstr ""
+
+#: config/tc-arm.c:5211
+msgid "expected <Rm> or <Dm> or <Qm> operand"
+msgstr ""
+
+#: config/tc-arm.c:5291
+msgid "parse error"
+msgstr ""
+
+#: config/tc-arm.c:5301 read.c:2092
+msgid "expected comma"
+msgstr ""
+
+#: config/tc-arm.c:5591 config/tc-arm.c:5661
+msgid "immediate value is out of range"
+msgstr ""
+
+#: config/tc-arm.c:5806
msgid "iWMMXt data or control register expected"
msgstr ""
-#: config/tc-arm.c:4051
+#: config/tc-arm.c:6038 config/tc-score.c:56
msgid "garbage following instruction"
msgstr ""
-#: config/tc-arm.c:4185
+#: config/tc-arm.c:6125
+msgid "D register out of range for selected VFP version"
+msgstr ""
+
+#: config/tc-arm.c:6204
msgid "instruction does not accept preindexed addressing"
msgstr ""
#. unindexed - only for coprocessor
-#: config/tc-arm.c:4201 config/tc-arm.c:5857
+#: config/tc-arm.c:6220 config/tc-arm.c:8197
msgid "instruction does not accept unindexed addressing"
msgstr ""
-#: config/tc-arm.c:4209
+#: config/tc-arm.c:6228
msgid "destination register same as write-back base"
msgstr ""
-#: config/tc-arm.c:4210
+#: config/tc-arm.c:6229
msgid "source register same as write-back base"
msgstr ""
-#: config/tc-arm.c:4256
+#: config/tc-arm.c:6275
msgid "instruction does not accept scaled register index"
msgstr ""
-#: config/tc-arm.c:4295
+#: config/tc-arm.c:6315
msgid "instruction does not support unindexed addressing"
msgstr ""
-#: config/tc-arm.c:4310
+#: config/tc-arm.c:6330
msgid "pc may not be used with write-back"
msgstr ""
-#: config/tc-arm.c:4315
+#: config/tc-arm.c:6335
msgid "instruction does not support writeback"
msgstr ""
-#: config/tc-arm.c:4344
+#: config/tc-arm.c:6377
msgid "invalid pseudo operation"
msgstr ""
-#: config/tc-arm.c:4390
+#: config/tc-arm.c:6423
msgid "literal pool insertion failed"
msgstr ""
-#: config/tc-arm.c:4448
+#: config/tc-arm.c:6481
msgid "Rn must not overlap other operands"
msgstr ""
-#: config/tc-arm.c:4534 config/tc-arm.c:4553 config/tc-arm.c:4566
-#: config/tc-arm.c:6360 config/tc-arm.c:6380 config/tc-arm.c:6394
+#: config/tc-arm.c:6581 config/tc-arm.c:6600 config/tc-arm.c:6613
+#: config/tc-arm.c:8740 config/tc-arm.c:8760 config/tc-arm.c:8774
msgid "bit-field extends past end of register"
msgstr ""
-#: config/tc-arm.c:4595
+#: config/tc-arm.c:6642
msgid "the only suffix valid here is '(plt)'"
msgstr ""
-#: config/tc-arm.c:4627
+#: config/tc-arm.c:6695
msgid "use of r15 in blx in ARM mode is not really useful"
msgstr ""
-#: config/tc-arm.c:4645
+#: config/tc-arm.c:6718
msgid "use of r15 in bx in ARM mode is not really useful"
msgstr ""
-#: config/tc-arm.c:4657 config/tc-arm.c:6508
+#: config/tc-arm.c:6730 config/tc-arm.c:8912
msgid "use of r15 in bxj is not really useful"
msgstr ""
-#: config/tc-arm.c:4761 config/tc-arm.c:4770
+#: config/tc-arm.c:6844 config/tc-arm.c:6853
msgid "writeback of base register is UNPREDICTABLE"
msgstr ""
-#: config/tc-arm.c:4764
+#: config/tc-arm.c:6847
msgid "writeback of base register when in register list is UNPREDICTABLE"
msgstr ""
-#: config/tc-arm.c:4774
+#: config/tc-arm.c:6857
msgid "if writeback register is in list, it must be the lowest reg in the list"
msgstr ""
-#: config/tc-arm.c:4789
+#: config/tc-arm.c:6872
msgid "first destination register must be even"
msgstr ""
-#: config/tc-arm.c:4792 config/tc-arm.c:4849
+#: config/tc-arm.c:6875 config/tc-arm.c:6942
msgid "can only load two consecutive registers"
msgstr ""
@@ -1821,863 +1976,1052 @@ msgstr ""
#. have been called in the first place.
#. If op 2 were present and equal to PC, this function wouldn't
#. have been called in the first place.
-#: config/tc-arm.c:4793 config/tc-arm.c:4852 config/tc-arm.c:5299
-#: config/tc-arm.c:6886
+#: config/tc-arm.c:6876 config/tc-arm.c:6945 config/tc-arm.c:7467
+#: config/tc-arm.c:9390
msgid "r14 not allowed here"
msgstr ""
-#: config/tc-arm.c:4794
-msgid "'[' expected"
-msgstr ""
-
-#: config/tc-arm.c:4807
+#: config/tc-arm.c:6890
msgid "base register written back, and overlaps second destination register"
msgstr ""
-#: config/tc-arm.c:4815
+#: config/tc-arm.c:6898
msgid "index register overlaps destination register"
msgstr ""
-#: config/tc-arm.c:4829 config/tc-arm.c:5272 config/tc-arm.c:6706
-#: config/tc-arm.c:7581
-msgid "instruction does not accept this addressing mode"
-msgstr ""
-
-#: config/tc-arm.c:4835 config/tc-arm.c:5281
+#: config/tc-arm.c:6928 config/tc-arm.c:7449
msgid "offset must be zero in ARM encoding"
msgstr ""
-#: config/tc-arm.c:4846 config/tc-arm.c:5293
+#: config/tc-arm.c:6939 config/tc-arm.c:7461
msgid "even register required"
msgstr ""
-#: config/tc-arm.c:4877 config/tc-arm.c:4908
+#: config/tc-arm.c:6970 config/tc-arm.c:7001
msgid "this instruction requires a post-indexed address"
msgstr ""
-#: config/tc-arm.c:4935
-msgid "rd and rm should be different in mla"
+#: config/tc-arm.c:7028
+msgid "Rd and Rm should be different in mla"
+msgstr ""
+
+#: config/tc-arm.c:7052 config/tc-arm.c:9648
+msgid ":lower16: not allowed this instruction"
+msgstr ""
+
+#: config/tc-arm.c:7054
+msgid ":upper16: not allowed instruction"
+msgstr ""
+
+#: config/tc-arm.c:7073
+msgid "operand 1 must be FPSCR"
msgstr ""
-#: config/tc-arm.c:4967 config/tc-arm.c:7121
+#: config/tc-arm.c:7106 config/tc-arm.c:9757
msgid "'CPSR' or 'SPSR' expected"
msgstr ""
-#: config/tc-arm.c:5000
-msgid "rd and rm should be different in mul"
+#: config/tc-arm.c:7143
+msgid "Rd and Rm should be different in mul"
msgstr ""
-#: config/tc-arm.c:5021
+#: config/tc-arm.c:7164
msgid "rdhi, rdlo and rm must all be different"
msgstr ""
-#: config/tc-arm.c:5083
+#: config/tc-arm.c:7226
msgid "'[' expected after PLD mnemonic"
msgstr ""
-#: config/tc-arm.c:5085
+#: config/tc-arm.c:7228 config/tc-arm.c:7243
msgid "post-indexed expression used in preload instruction"
msgstr ""
-#: config/tc-arm.c:5087
+#: config/tc-arm.c:7230 config/tc-arm.c:7245
msgid "writeback used in preload instruction"
msgstr ""
-#: config/tc-arm.c:5089
+#: config/tc-arm.c:7232 config/tc-arm.c:7247
msgid "unindexed addressing used in preload instruction"
msgstr ""
-#: config/tc-arm.c:5188 config/tc-arm.c:7492
-msgid "source1 and dest must be same register"
+#: config/tc-arm.c:7241
+msgid "'[' expected after PLI mnemonic"
msgstr ""
-#: config/tc-arm.c:5238 config/tc-arm.c:7178
+#: config/tc-arm.c:7394 config/tc-arm.c:9837
msgid "rdhi and rdlo must be different"
msgstr ""
-#: config/tc-arm.c:5296
+#: config/tc-arm.c:7420
+msgid "SRS base register must be r13"
+msgstr ""
+
+#: config/tc-arm.c:7464
msgid "can only store two consecutive registers"
msgstr ""
-#: config/tc-arm.c:5391 config/tc-arm.c:5408
+#: config/tc-arm.c:7559 config/tc-arm.c:7576
msgid "only two consecutive VFP SP registers allowed here"
msgstr ""
-#: config/tc-arm.c:5436 config/tc-arm.c:5451
+#: config/tc-arm.c:7604 config/tc-arm.c:7619
msgid "this addressing mode requires base-register writeback"
msgstr ""
-#: config/tc-arm.c:5529
+#: config/tc-arm.c:7794
msgid "this instruction does not support indexing"
msgstr ""
-#: config/tc-arm.c:5552
+#: config/tc-arm.c:7818
msgid "only r15 allowed here"
msgstr ""
-#: config/tc-arm.c:5757
+#: config/tc-arm.c:7953
+msgid "immediate operand requires iWMMXt2"
+msgstr ""
+
+#: config/tc-arm.c:8097
msgid "shift by register not allowed in thumb mode"
msgstr ""
-#: config/tc-arm.c:5769 config/tc-arm.c:11339
+#: config/tc-arm.c:8109 config/tc-arm.c:18126
msgid "shift expression is too large"
msgstr ""
-#: config/tc-arm.c:5795
-msgid "Thumb does not support the ldr =N pseudo-operation"
+#: config/tc-arm.c:8135
+msgid "Instruction does not support =N addresses"
msgstr ""
-#: config/tc-arm.c:5800
+#: config/tc-arm.c:8140
msgid "cannot use register index with PC-relative addressing"
msgstr ""
-#: config/tc-arm.c:5801
+#: config/tc-arm.c:8141
msgid "cannot use register index with this instruction"
msgstr ""
-#: config/tc-arm.c:5803
+#: config/tc-arm.c:8143
msgid "Thumb does not support negative register indexing"
msgstr ""
-#: config/tc-arm.c:5805
+#: config/tc-arm.c:8145
msgid "Thumb does not support register post-indexing"
msgstr ""
-#: config/tc-arm.c:5807
+#: config/tc-arm.c:8147
msgid "Thumb does not support register indexing with writeback"
msgstr ""
-#: config/tc-arm.c:5809
+#: config/tc-arm.c:8149
msgid "Thumb supports only LSL in shifted register indexing"
msgstr ""
-#: config/tc-arm.c:5818
+#: config/tc-arm.c:8158 config/tc-arm.c:12899
msgid "shift out of range"
msgstr ""
-#: config/tc-arm.c:5826
+#: config/tc-arm.c:8166
msgid "cannot use writeback with PC-relative addressing"
msgstr ""
-#: config/tc-arm.c:5828
+#: config/tc-arm.c:8168
msgid "cannot use writeback with this instruction"
msgstr ""
-#: config/tc-arm.c:5847
+#: config/tc-arm.c:8187
msgid "cannot use post-indexing with PC-relative addressing"
msgstr ""
-#: config/tc-arm.c:5848
+#: config/tc-arm.c:8188
msgid "cannot use post-indexing with this instruction"
msgstr ""
-#: config/tc-arm.c:5975
+#: config/tc-arm.c:8315
msgid "PC not allowed as destination"
msgstr ""
-#: config/tc-arm.c:6093 config/tc-arm.c:6234 config/tc-arm.c:6326
-#: config/tc-arm.c:7092
+#: config/tc-arm.c:8386
+msgid "only SUBS PC, LR, #const allowed"
+msgstr ""
+
+#: config/tc-arm.c:8459 config/tc-arm.c:8600 config/tc-arm.c:8692
+#: config/tc-arm.c:9712
msgid "shift must be constant"
msgstr ""
-#: config/tc-arm.c:6120 config/tc-arm.c:6249 config/tc-arm.c:6341
-#: config/tc-arm.c:7105
+#: config/tc-arm.c:8486 config/tc-arm.c:8615 config/tc-arm.c:8707
+#: config/tc-arm.c:9725
msgid "unshifted register required"
msgstr ""
-#: config/tc-arm.c:6135 config/tc-arm.c:6352 config/tc-arm.c:7165
+#: config/tc-arm.c:8501 config/tc-arm.c:8718 config/tc-arm.c:9824
msgid "dest must overlap one source register"
msgstr ""
-#: config/tc-arm.c:6252
+#: config/tc-arm.c:8618
msgid "dest and source1 must be the same register"
msgstr ""
-#: config/tc-arm.c:6537
+#: config/tc-arm.c:8869
+msgid "instruction is always unconditional"
+msgstr ""
+
+#: config/tc-arm.c:8951
+msgid "selected processor does not support 'A' form of this instruction"
+msgstr ""
+
+#: config/tc-arm.c:8954
msgid "Thumb does not support the 2-argument form of this instruction"
msgstr ""
-#: config/tc-arm.c:6616
-msgid "Thumb load/store multiple does not support {reglist}^"
+#: config/tc-arm.c:9053
+msgid "SP not allowed in register list"
msgstr ""
-#: config/tc-arm.c:6633 config/tc-arm.c:6649 config/tc-arm.c:6680
-#, c-format
-msgid "value stored for r%d is UNPREDICTABLE"
+#: config/tc-arm.c:9058
+msgid "LR and PC should not both be in register list"
msgstr ""
-#: config/tc-arm.c:6643
-msgid "SP should not be in register list"
+#: config/tc-arm.c:9062
+msgid "base register should not be in register list when written back"
msgstr ""
-#: config/tc-arm.c:6647
-msgid "PC should not be in register list"
+#: config/tc-arm.c:9068
+msgid "PC not allowed in register list"
msgstr ""
-#: config/tc-arm.c:6656 config/tc-arm.c:7311
-msgid "LR and PC should not both be in register list"
+#: config/tc-arm.c:9071 config/tc-arm.c:9137 config/tc-arm.c:9177
+#, c-format
+msgid "value stored for r%d is UNPREDICTABLE"
msgstr ""
-#: config/tc-arm.c:6659
-msgid "base register should not be in register list when written back"
+#: config/tc-arm.c:9113
+msgid "Thumb load/store multiple does not support {reglist}^"
+msgstr ""
+
+#: config/tc-arm.c:9170
+msgid "Thumb-2 instruction only valid in unified syntax"
msgstr ""
-#: config/tc-arm.c:6677 config/tc-arm.c:6687
+#: config/tc-arm.c:9174 config/tc-arm.c:9184
msgid "this instruction will write back the base register"
msgstr ""
-#: config/tc-arm.c:6690
+#: config/tc-arm.c:9187
msgid "this instruction will not write back the base register"
msgstr ""
-#: config/tc-arm.c:6719
+#: config/tc-arm.c:9216
msgid "r14 not allowed as first register when second register is omitted"
msgstr ""
-#: config/tc-arm.c:6809 config/tc-arm.c:6822 config/tc-arm.c:6858
+#: config/tc-arm.c:9313 config/tc-arm.c:9326 config/tc-arm.c:9362
msgid "Thumb does not support this addressing mode"
msgstr ""
-#: config/tc-arm.c:6826
+#: config/tc-arm.c:9330
msgid "byte or halfword not valid for base register"
msgstr ""
-#: config/tc-arm.c:6829
+#: config/tc-arm.c:9333
msgid "r15 based store not allowed"
msgstr ""
-#: config/tc-arm.c:6831
+#: config/tc-arm.c:9335
msgid "invalid base register for register offset"
msgstr ""
-#: config/tc-arm.c:7032
+#: config/tc-arm.c:9633
msgid "only lo regs allowed with immediate"
msgstr ""
-#: config/tc-arm.c:7130
-msgid "Thumb encoding does not support an immediate here"
+#: config/tc-arm.c:9653
+msgid ":upper16: not allowed this instruction"
msgstr ""
-#: config/tc-arm.c:7200
-msgid "Thumb does not support NOP with hints"
+#: config/tc-arm.c:9747 config/tc-arm.c:9779 config/tc-arm.c:9785
+msgid "selected processor does not support requested special purpose register"
msgstr ""
-#: config/tc-arm.c:7282
-msgid "push/pop do not support {reglist}^"
+#: config/tc-arm.c:9753
+#, c-format
+msgid ""
+"selected processor does not support requested special purpose register %x"
msgstr ""
-#: config/tc-arm.c:7301
-msgid "SP not allowed in register list"
+#: config/tc-arm.c:9774
+msgid "Thumb encoding does not support an immediate here"
msgstr ""
-#: config/tc-arm.c:7305
-msgid "PC not allowed in register list"
+#: config/tc-arm.c:9859
+msgid "Thumb does not support NOP with hints"
+msgstr ""
+
+#: config/tc-arm.c:9941
+msgid "push/pop do not support {reglist}^"
msgstr ""
-#: config/tc-arm.c:7328
+#: config/tc-arm.c:9964
msgid "invalid register list to push/pop instruction"
msgstr ""
-#: config/tc-arm.c:7513
+#: config/tc-arm.c:10156
+msgid "source1 and dest must be same register"
+msgstr ""
+
+#: config/tc-arm.c:10177
msgid "ror #imm not supported"
msgstr ""
-#: config/tc-arm.c:7638
+#: config/tc-arm.c:10302
msgid "Thumb encoding does not support rotation"
msgstr ""
-#: config/tc-arm.c:7656
+#: config/tc-arm.c:10321
+msgid "instruction requires register index"
+msgstr ""
+
+#: config/tc-arm.c:10323
msgid "PC is not a valid index register"
msgstr ""
-#: config/tc-arm.c:7658
+#: config/tc-arm.c:10325
msgid "instruction does not allow shifted index"
msgstr ""
-#: config/tc-arm.c:7660
-msgid "instruction requires shifted index"
+#: config/tc-arm.c:10744
+msgid "invalid instruction shape"
+msgstr ""
+
+#: config/tc-arm.c:10986
+msgid "types specified in both the mnemonic and operands"
+msgstr ""
+
+#: config/tc-arm.c:11023
+msgid "operand types can't be inferred"
+msgstr ""
+
+#: config/tc-arm.c:11029
+msgid "type specifier has the wrong number of parts"
+msgstr ""
+
+#: config/tc-arm.c:11084
+msgid "operand size must match register width"
+msgstr ""
+
+#: config/tc-arm.c:11095
+msgid "bad type in Neon instruction"
+msgstr ""
+
+#: config/tc-arm.c:11106
+msgid "inconsistent types in Neon instruction"
+msgstr ""
+
+#: config/tc-arm.c:12155
+msgid "scalar out of range for multiply instruction"
+msgstr ""
+
+#: config/tc-arm.c:12319 config/tc-arm.c:12331
+msgid "immediate out of range for insert"
+msgstr ""
+
+#: config/tc-arm.c:12343 config/tc-arm.c:13245
+msgid "immediate out of range for shift"
+msgstr ""
+
+#: config/tc-arm.c:12400 config/tc-arm.c:12427 config/tc-arm.c:12745
+#: config/tc-arm.c:13191
+msgid "immediate out of range"
+msgstr ""
+
+#: config/tc-arm.c:12464
+msgid "immediate out of range for narrowing operation"
+msgstr ""
+
+#: config/tc-arm.c:12584
+msgid "operands 0 and 1 must be the same register"
+msgstr ""
+
+#: config/tc-arm.c:12719
+msgid "operand size must be specified for immediate VMOV"
+msgstr ""
+
+#: config/tc-arm.c:12729
+msgid "immediate has bits set outside the operand size"
+msgstr ""
+
+#: config/tc-arm.c:12925
+msgid "elements must be smaller than reversal region"
msgstr ""
-#: config/tc-arm.c:7943 config/tc-arm.c:8015
+#: config/tc-arm.c:13096 config/tc-arm.c:13144
+msgid "bad type for scalar"
+msgstr ""
+
+#: config/tc-arm.c:13208 config/tc-arm.c:13216
+msgid "VFP registers must be adjacent"
+msgstr ""
+
+#: config/tc-arm.c:13357
+msgid "bad list length for table lookup"
+msgstr ""
+
+#: config/tc-arm.c:13387
+msgid "writeback (!) must be used for VLDMDB and VSTMDB"
+msgstr ""
+
+#: config/tc-arm.c:13390
+msgid "register list must contain at least 1 and at most 16 registers"
+msgstr ""
+
+#: config/tc-arm.c:13467
+msgid "bad alignment"
+msgstr ""
+
+#: config/tc-arm.c:13484
+msgid "bad list type for instruction"
+msgstr ""
+
+#: config/tc-arm.c:13526
+msgid "unsupported alignment for instruction"
+msgstr ""
+
+#: config/tc-arm.c:13545 config/tc-arm.c:13639 config/tc-arm.c:13650
+#: config/tc-arm.c:13660 config/tc-arm.c:13674
+msgid "bad list length"
+msgstr ""
+
+#: config/tc-arm.c:13550
+msgid "stride of 2 unavailable when element size is 8"
+msgstr ""
+
+#: config/tc-arm.c:13583 config/tc-arm.c:13658
+msgid "can't use alignment with this instruction"
+msgstr ""
+
+#: config/tc-arm.c:13722
+msgid "post-index must be a register"
+msgstr ""
+
+#: config/tc-arm.c:13724
+msgid "bad register for post-index"
+msgstr ""
+
+#: config/tc-arm.c:14011 config/tc-arm.c:14097
msgid "conditional infixes are deprecated in unified syntax"
msgstr ""
-#: config/tc-arm.c:8047
+#: config/tc-arm.c:14130
#, c-format
msgid "bad instruction `%s'"
msgstr ""
-#: config/tc-arm.c:8063 config/tc-arm.c:8126
+#: config/tc-arm.c:14136
+msgid "s suffix on comparison instruction is deprecated"
+msgstr ""
+
+#: config/tc-arm.c:14155 config/tc-arm.c:14236
#, c-format
msgid "selected processor does not support `%s'"
msgstr ""
-#: config/tc-arm.c:8069
+#: config/tc-arm.c:14161
msgid "Thumb does not support conditional execution"
msgstr ""
-#: config/tc-arm.c:8080
+#: config/tc-arm.c:14184
msgid "incorrect condition in IT block"
msgstr ""
-#: config/tc-arm.c:8088
+#: config/tc-arm.c:14190
msgid "thumb conditional instrunction not in IT block"
msgstr ""
-#: config/tc-arm.c:8108
+#: config/tc-arm.c:14210
#, c-format
msgid "cannot honor width suffix -- `%s'"
msgstr ""
-#: config/tc-arm.c:8131
+#: config/tc-arm.c:14241
#, c-format
msgid "width suffixes are invalid in ARM mode -- `%s'"
msgstr ""
-#: config/tc-arm.c:10340
+#: config/tc-arm.c:14265
+#, c-format
+msgid "attempt to use an ARM instruction on a Thumb-only processor -- `%s'"
+msgstr ""
+
+#: config/tc-arm.c:16992
msgid "alignments greater than 32 bytes not supported in .text sections."
msgstr ""
-#: config/tc-arm.c:10634
+#: config/tc-arm.c:17286
msgid "handerdata in cantunwind frame"
msgstr ""
-#: config/tc-arm.c:10651
+#: config/tc-arm.c:17303
msgid "too many unwind opcodes for personality routine 0"
msgstr ""
-#: config/tc-arm.c:10683
+#: config/tc-arm.c:17335
msgid "too many unwind opcodes"
msgstr ""
-#: config/tc-arm.c:11085 config/tc-arm.c:11365
+#: config/tc-arm.c:17869 config/tc-arm.c:18153
#, c-format
msgid "undefined symbol %s used as an immediate value"
msgstr ""
-#: config/tc-arm.c:11099 config/tc-arm.c:11394
+#: config/tc-arm.c:17883 config/tc-arm.c:18192
#, c-format
msgid "invalid constant (%lx) after fixup"
msgstr ""
-#: config/tc-arm.c:11136
+#: config/tc-arm.c:17920
#, c-format
msgid "unable to compute ADRL instructions for PC offset of 0x%lx"
msgstr ""
-#: config/tc-arm.c:11168 config/tc-arm.c:11193
+#: config/tc-arm.c:17955 config/tc-arm.c:17980
msgid "invalid literal constant: pool needs to be closer"
msgstr ""
-#: config/tc-arm.c:11171 config/tc-arm.c:11209
+#: config/tc-arm.c:17958 config/tc-arm.c:17996
#, c-format
msgid "bad immediate value for offset (%ld)"
msgstr ""
-#: config/tc-arm.c:11195
+#: config/tc-arm.c:17982
#, c-format
-msgid "bad immediate value for half-word offset (%ld)"
+msgid "bad immediate value for 8-bit offset (%ld)"
msgstr ""
-#: config/tc-arm.c:11250
+#: config/tc-arm.c:18037
msgid "offset not a multiple of 4"
msgstr ""
-#: config/tc-arm.c:11257 config/tc-arm.c:11272 config/tc-arm.c:11287
-#: config/tc-arm.c:11298 config/tc-arm.c:11321 config/tc-pj.c:499
-#: config/tc-sh.c:4084
+#: config/tc-arm.c:18044 config/tc-arm.c:18059 config/tc-arm.c:18074
+#: config/tc-arm.c:18085 config/tc-arm.c:18108 config/tc-pj.c:499
+#: config/tc-sh.c:4214
msgid "offset out of range"
msgstr ""
-#: config/tc-arm.c:11410
+#: config/tc-arm.c:18208
msgid "invalid smc expression"
msgstr ""
-#: config/tc-arm.c:11421 config/tc-arm.c:11430
+#: config/tc-arm.c:18219 config/tc-arm.c:18228
msgid "invalid swi expression"
msgstr ""
-#: config/tc-arm.c:11440
+#: config/tc-arm.c:18238
msgid "invalid expression in load/store multiple"
msgstr ""
-#: config/tc-arm.c:11455
+#: config/tc-arm.c:18268
msgid "misaligned branch destination"
msgstr ""
-#: config/tc-arm.c:11459 config/tc-arm.c:11479 config/tc-arm.c:11497
-#: config/tc-arm.c:11510 config/tc-arm.c:11523 config/tc-arm.c:11562
-#: config/tc-arm.c:11587
+#: config/tc-arm.c:18272 config/tc-arm.c:18309 config/tc-arm.c:18323
+#: config/tc-arm.c:18336 config/tc-arm.c:18375 config/tc-arm.c:18400
msgid "branch out of range"
msgstr ""
-#: config/tc-arm.c:11475
-msgid "misaligned BLX destination"
-msgstr ""
-
-#: config/tc-arm.c:11536
+#: config/tc-arm.c:18349
msgid "conditional branch out of range"
msgstr ""
-#: config/tc-arm.c:11657
+#: config/tc-arm.c:18477
msgid "rel31 relocation overflow"
msgstr ""
-#: config/tc-arm.c:11669 config/tc-arm.c:11694
+#: config/tc-arm.c:18489 config/tc-arm.c:18512
msgid "co-processor offset out of range"
msgstr ""
-#: config/tc-arm.c:11710
+#: config/tc-arm.c:18529
#, c-format
msgid "invalid offset, target not word aligned (0x%08lX)"
msgstr ""
-#: config/tc-arm.c:11716 config/tc-arm.c:11725 config/tc-arm.c:11733
-#: config/tc-arm.c:11741 config/tc-arm.c:11749
+#: config/tc-arm.c:18536 config/tc-arm.c:18545 config/tc-arm.c:18553
+#: config/tc-arm.c:18561 config/tc-arm.c:18569
#, c-format
msgid "invalid offset, value too big (0x%08lX)"
msgstr ""
-#: config/tc-arm.c:11790
+#: config/tc-arm.c:18610
msgid "invalid Hi register with immediate"
msgstr ""
-#: config/tc-arm.c:11806
+#: config/tc-arm.c:18626
msgid "invalid immediate for stack address calculation"
msgstr ""
-#: config/tc-arm.c:11814
+#: config/tc-arm.c:18634
#, c-format
msgid "invalid immediate for address calculation (value = 0x%08lX)"
msgstr ""
-#: config/tc-arm.c:11844
+#: config/tc-arm.c:18664
#, c-format
msgid "invalid immediate: %ld is too large"
msgstr ""
-#: config/tc-arm.c:11856
+#: config/tc-arm.c:18676
#, c-format
msgid "invalid shift value: %ld"
msgstr ""
-#: config/tc-arm.c:11875
+#: config/tc-arm.c:18703
+msgid "offset too big"
+msgstr ""
+
+#: config/tc-arm.c:18755
+#, c-format
+msgid "the offset 0x%08lX is not representable"
+msgstr ""
+
+#: config/tc-arm.c:18795
+#, c-format
+msgid "bad offset 0x%08lX (only 12 bits available for the magnitude)"
+msgstr ""
+
+#: config/tc-arm.c:18834
+#, c-format
+msgid "bad offset 0x%08lX (only 8 bits available for the magnitude)"
+msgstr ""
+
+#: config/tc-arm.c:18874
+#, c-format
+msgid "bad offset 0x%08lX (must be word-aligned)"
+msgstr ""
+
+#: config/tc-arm.c:18879
+#, c-format
+msgid "bad offset 0x%08lX (must be an 8-bit number of words)"
+msgstr ""
+
+#: config/tc-arm.c:18905 config/tc-score.c:5480
#, c-format
msgid "bad relocation fixup type (%d)"
msgstr ""
-#: config/tc-arm.c:11943
+#: config/tc-arm.c:19008
msgid "literal referenced across section boundary"
msgstr ""
-#: config/tc-arm.c:11973
+#: config/tc-arm.c:19068
msgid "internal relocation (type: IMMEDIATE) not fixed up"
msgstr ""
-#: config/tc-arm.c:11978
+#: config/tc-arm.c:19073
msgid "ADRL used for a symbol not defined in the same file"
msgstr ""
-#: config/tc-arm.c:11987
+#: config/tc-arm.c:19088
#, c-format
msgid "undefined local label `%s'"
msgstr ""
-#: config/tc-arm.c:11993
+#: config/tc-arm.c:19094
msgid "internal_relocation (type: OFFSET_IMM) not fixed up"
msgstr ""
-#: config/tc-arm.c:12014 config/tc-cris.c:3869 config/tc-mcore.c:1995
-#: config/tc-mmix.c:2888 config/tc-ns32k.c:2284
+#: config/tc-arm.c:19115 config/tc-cris.c:3925 config/tc-mcore.c:1992
+#: config/tc-mmix.c:2887 config/tc-ns32k.c:2282 config/tc-score.c:5571
msgid "<unknown>"
msgstr ""
-#: config/tc-arm.c:12017 config/tc-arm.c:12038
+#: config/tc-arm.c:19118 config/tc-arm.c:19139 config/tc-score.c:5573
#, c-format
msgid "cannot represent %s relocation in this object file format"
msgstr ""
-#: config/tc-arm.c:12254
+#: config/tc-arm.c:19373
#, c-format
msgid "%s: unexpected function type: %d"
msgstr ""
-#: config/tc-arm.c:12331
+#: config/tc-arm.c:19463 config/tc-score.c:6592 config/tc-score.c:6608
+#: config/tc-score.c:6613
msgid "virtual memory exhausted"
msgstr ""
-#: config/tc-arm.c:12357
+#: config/tc-arm.c:19496
msgid "use of old and new-style options to set CPU type"
msgstr ""
-#: config/tc-arm.c:12367
+#: config/tc-arm.c:19506
msgid "use of old and new-style options to set FPU type"
msgstr ""
-#: config/tc-arm.c:12441
+#: config/tc-arm.c:19581
msgid "hard-float conflicts with specified fpu"
msgstr ""
-#: config/tc-arm.c:12633
+#: config/tc-arm.c:19764
msgid "generate PIC code"
msgstr ""
-#: config/tc-arm.c:12634
+#: config/tc-arm.c:19765
msgid "assemble Thumb code"
msgstr ""
-#: config/tc-arm.c:12635
+#: config/tc-arm.c:19766
msgid "support ARM/Thumb interworking"
msgstr ""
-#: config/tc-arm.c:12637
+#: config/tc-arm.c:19768
msgid "code uses 32-bit program counter"
msgstr ""
-#: config/tc-arm.c:12638
+#: config/tc-arm.c:19769
msgid "code uses 26-bit program counter"
msgstr ""
-#: config/tc-arm.c:12639
+#: config/tc-arm.c:19770
msgid "floating point args are in fp regs"
msgstr ""
-#: config/tc-arm.c:12641
+#: config/tc-arm.c:19772
msgid "re-entrant code"
msgstr ""
-#: config/tc-arm.c:12642
+#: config/tc-arm.c:19773
msgid "code is ATPCS conformant"
msgstr ""
-#: config/tc-arm.c:12643
+#: config/tc-arm.c:19774
msgid "assemble for big-endian"
msgstr ""
-#: config/tc-arm.c:12644
+#: config/tc-arm.c:19775
msgid "assemble for little-endian"
msgstr ""
#. These are recognized by the assembler, but have no affect on code.
-#: config/tc-arm.c:12648
+#: config/tc-arm.c:19779
msgid "use frame pointer"
msgstr ""
-#: config/tc-arm.c:12649
+#: config/tc-arm.c:19780
msgid "use stack size checking"
msgstr ""
#. DON'T add any new processors to this list -- we want the whole list
#. to go away... Add them to the processors table instead.
-#: config/tc-arm.c:12653 config/tc-arm.c:12654
+#: config/tc-arm.c:19796 config/tc-arm.c:19797
msgid "use -mcpu=arm1"
msgstr ""
-#: config/tc-arm.c:12655 config/tc-arm.c:12656
+#: config/tc-arm.c:19798 config/tc-arm.c:19799
msgid "use -mcpu=arm2"
msgstr ""
-#: config/tc-arm.c:12657 config/tc-arm.c:12658
+#: config/tc-arm.c:19800 config/tc-arm.c:19801
msgid "use -mcpu=arm250"
msgstr ""
-#: config/tc-arm.c:12659 config/tc-arm.c:12660
+#: config/tc-arm.c:19802 config/tc-arm.c:19803
msgid "use -mcpu=arm3"
msgstr ""
-#: config/tc-arm.c:12661 config/tc-arm.c:12662
+#: config/tc-arm.c:19804 config/tc-arm.c:19805
msgid "use -mcpu=arm6"
msgstr ""
-#: config/tc-arm.c:12663 config/tc-arm.c:12664
+#: config/tc-arm.c:19806 config/tc-arm.c:19807
msgid "use -mcpu=arm600"
msgstr ""
-#: config/tc-arm.c:12665 config/tc-arm.c:12666
+#: config/tc-arm.c:19808 config/tc-arm.c:19809
msgid "use -mcpu=arm610"
msgstr ""
-#: config/tc-arm.c:12667 config/tc-arm.c:12668
+#: config/tc-arm.c:19810 config/tc-arm.c:19811
msgid "use -mcpu=arm620"
msgstr ""
-#: config/tc-arm.c:12669 config/tc-arm.c:12670
+#: config/tc-arm.c:19812 config/tc-arm.c:19813
msgid "use -mcpu=arm7"
msgstr ""
-#: config/tc-arm.c:12671 config/tc-arm.c:12672
+#: config/tc-arm.c:19814 config/tc-arm.c:19815
msgid "use -mcpu=arm70"
msgstr ""
-#: config/tc-arm.c:12673 config/tc-arm.c:12674
+#: config/tc-arm.c:19816 config/tc-arm.c:19817
msgid "use -mcpu=arm700"
msgstr ""
-#: config/tc-arm.c:12675 config/tc-arm.c:12676
+#: config/tc-arm.c:19818 config/tc-arm.c:19819
msgid "use -mcpu=arm700i"
msgstr ""
-#: config/tc-arm.c:12677 config/tc-arm.c:12678
+#: config/tc-arm.c:19820 config/tc-arm.c:19821
msgid "use -mcpu=arm710"
msgstr ""
-#: config/tc-arm.c:12679 config/tc-arm.c:12680
+#: config/tc-arm.c:19822 config/tc-arm.c:19823
msgid "use -mcpu=arm710c"
msgstr ""
-#: config/tc-arm.c:12681 config/tc-arm.c:12682
+#: config/tc-arm.c:19824 config/tc-arm.c:19825
msgid "use -mcpu=arm720"
msgstr ""
-#: config/tc-arm.c:12683 config/tc-arm.c:12684
+#: config/tc-arm.c:19826 config/tc-arm.c:19827
msgid "use -mcpu=arm7d"
msgstr ""
-#: config/tc-arm.c:12685 config/tc-arm.c:12686
+#: config/tc-arm.c:19828 config/tc-arm.c:19829
msgid "use -mcpu=arm7di"
msgstr ""
-#: config/tc-arm.c:12687 config/tc-arm.c:12688
+#: config/tc-arm.c:19830 config/tc-arm.c:19831
msgid "use -mcpu=arm7m"
msgstr ""
-#: config/tc-arm.c:12689 config/tc-arm.c:12690
+#: config/tc-arm.c:19832 config/tc-arm.c:19833
msgid "use -mcpu=arm7dm"
msgstr ""
-#: config/tc-arm.c:12691 config/tc-arm.c:12692
+#: config/tc-arm.c:19834 config/tc-arm.c:19835
msgid "use -mcpu=arm7dmi"
msgstr ""
-#: config/tc-arm.c:12693 config/tc-arm.c:12694
+#: config/tc-arm.c:19836 config/tc-arm.c:19837
msgid "use -mcpu=arm7100"
msgstr ""
-#: config/tc-arm.c:12695 config/tc-arm.c:12696
+#: config/tc-arm.c:19838 config/tc-arm.c:19839
msgid "use -mcpu=arm7500"
msgstr ""
-#: config/tc-arm.c:12697 config/tc-arm.c:12698
+#: config/tc-arm.c:19840 config/tc-arm.c:19841
msgid "use -mcpu=arm7500fe"
msgstr ""
-#: config/tc-arm.c:12699 config/tc-arm.c:12700 config/tc-arm.c:12701
-#: config/tc-arm.c:12702
+#: config/tc-arm.c:19842 config/tc-arm.c:19843 config/tc-arm.c:19844
+#: config/tc-arm.c:19845
msgid "use -mcpu=arm7tdmi"
msgstr ""
-#: config/tc-arm.c:12703 config/tc-arm.c:12704
+#: config/tc-arm.c:19846 config/tc-arm.c:19847
msgid "use -mcpu=arm710t"
msgstr ""
-#: config/tc-arm.c:12705 config/tc-arm.c:12706
+#: config/tc-arm.c:19848 config/tc-arm.c:19849
msgid "use -mcpu=arm720t"
msgstr ""
-#: config/tc-arm.c:12707 config/tc-arm.c:12708
+#: config/tc-arm.c:19850 config/tc-arm.c:19851
msgid "use -mcpu=arm740t"
msgstr ""
-#: config/tc-arm.c:12709 config/tc-arm.c:12710
+#: config/tc-arm.c:19852 config/tc-arm.c:19853
msgid "use -mcpu=arm8"
msgstr ""
-#: config/tc-arm.c:12711 config/tc-arm.c:12712
+#: config/tc-arm.c:19854 config/tc-arm.c:19855
msgid "use -mcpu=arm810"
msgstr ""
-#: config/tc-arm.c:12713 config/tc-arm.c:12714
+#: config/tc-arm.c:19856 config/tc-arm.c:19857
msgid "use -mcpu=arm9"
msgstr ""
-#: config/tc-arm.c:12715 config/tc-arm.c:12716
+#: config/tc-arm.c:19858 config/tc-arm.c:19859
msgid "use -mcpu=arm9tdmi"
msgstr ""
-#: config/tc-arm.c:12717 config/tc-arm.c:12718
+#: config/tc-arm.c:19860 config/tc-arm.c:19861
msgid "use -mcpu=arm920"
msgstr ""
-#: config/tc-arm.c:12719 config/tc-arm.c:12720
+#: config/tc-arm.c:19862 config/tc-arm.c:19863
msgid "use -mcpu=arm940"
msgstr ""
-#: config/tc-arm.c:12721
+#: config/tc-arm.c:19864
msgid "use -mcpu=strongarm"
msgstr ""
-#: config/tc-arm.c:12723
+#: config/tc-arm.c:19866
msgid "use -mcpu=strongarm110"
msgstr ""
-#: config/tc-arm.c:12725
+#: config/tc-arm.c:19868
msgid "use -mcpu=strongarm1100"
msgstr ""
-#: config/tc-arm.c:12727
+#: config/tc-arm.c:19870
msgid "use -mcpu=strongarm1110"
msgstr ""
-#: config/tc-arm.c:12728
+#: config/tc-arm.c:19871
msgid "use -mcpu=xscale"
msgstr ""
-#: config/tc-arm.c:12729
+#: config/tc-arm.c:19872
msgid "use -mcpu=iwmmxt"
msgstr ""
-#: config/tc-arm.c:12730
+#: config/tc-arm.c:19873
msgid "use -mcpu=all"
msgstr ""
#. Architecture variants -- don't add any more to this list either.
-#: config/tc-arm.c:12733 config/tc-arm.c:12734
+#: config/tc-arm.c:19876 config/tc-arm.c:19877
msgid "use -march=armv2"
msgstr ""
-#: config/tc-arm.c:12735 config/tc-arm.c:12736
+#: config/tc-arm.c:19878 config/tc-arm.c:19879
msgid "use -march=armv2a"
msgstr ""
-#: config/tc-arm.c:12737 config/tc-arm.c:12738
+#: config/tc-arm.c:19880 config/tc-arm.c:19881
msgid "use -march=armv3"
msgstr ""
-#: config/tc-arm.c:12739 config/tc-arm.c:12740
+#: config/tc-arm.c:19882 config/tc-arm.c:19883
msgid "use -march=armv3m"
msgstr ""
-#: config/tc-arm.c:12741 config/tc-arm.c:12742
+#: config/tc-arm.c:19884 config/tc-arm.c:19885
msgid "use -march=armv4"
msgstr ""
-#: config/tc-arm.c:12743 config/tc-arm.c:12744
+#: config/tc-arm.c:19886 config/tc-arm.c:19887
msgid "use -march=armv4t"
msgstr ""
-#: config/tc-arm.c:12745 config/tc-arm.c:12746
+#: config/tc-arm.c:19888 config/tc-arm.c:19889
msgid "use -march=armv5"
msgstr ""
-#: config/tc-arm.c:12747 config/tc-arm.c:12748
+#: config/tc-arm.c:19890 config/tc-arm.c:19891
msgid "use -march=armv5t"
msgstr ""
-#: config/tc-arm.c:12749 config/tc-arm.c:12750
+#: config/tc-arm.c:19892 config/tc-arm.c:19893
msgid "use -march=armv5te"
msgstr ""
#. Floating point variants -- don't add any more to this list either.
-#: config/tc-arm.c:12753
+#: config/tc-arm.c:19896
msgid "use -mfpu=fpe"
msgstr ""
-#: config/tc-arm.c:12754
+#: config/tc-arm.c:19897
msgid "use -mfpu=fpa10"
msgstr ""
-#: config/tc-arm.c:12755
+#: config/tc-arm.c:19898
msgid "use -mfpu=fpa11"
msgstr ""
-#: config/tc-arm.c:12757
+#: config/tc-arm.c:19900
msgid "use either -mfpu=softfpa or -mfpu=softvfp"
msgstr ""
-#: config/tc-arm.c:12986
+#: config/tc-arm.c:20161
msgid "invalid architectural extension"
msgstr ""
-#: config/tc-arm.c:13000
+#: config/tc-arm.c:20175
msgid "missing architectural extension"
msgstr ""
-#: config/tc-arm.c:13013
+#: config/tc-arm.c:20188
#, c-format
msgid "unknown architectural extnsion `%s'"
msgstr ""
-#: config/tc-arm.c:13037
+#: config/tc-arm.c:20212
#, c-format
msgid "missing cpu name `%s'"
msgstr ""
-#: config/tc-arm.c:13062 config/tc-arm.c:13389
+#: config/tc-arm.c:20237 config/tc-arm.c:20622
#, c-format
msgid "unknown cpu `%s'"
msgstr ""
-#: config/tc-arm.c:13080
+#: config/tc-arm.c:20255
#, c-format
msgid "missing architecture name `%s'"
msgstr ""
-#: config/tc-arm.c:13097 config/tc-arm.c:13423
+#: config/tc-arm.c:20272 config/tc-arm.c:20656 config/tc-arm.c:20687
#, c-format
msgid "unknown architecture `%s'\n"
msgstr ""
-#: config/tc-arm.c:13113 config/tc-arm.c:13454
+#: config/tc-arm.c:20288 config/tc-arm.c:20718
#, c-format
msgid "unknown floating point format `%s'\n"
msgstr ""
-#: config/tc-arm.c:13129
+#: config/tc-arm.c:20304
#, c-format
msgid "unknown floating point abi `%s'\n"
msgstr ""
-#: config/tc-arm.c:13145
+#: config/tc-arm.c:20320
#, c-format
msgid "unknown EABI `%s'\n"
msgstr ""
-#: config/tc-arm.c:13152
+#: config/tc-arm.c:20327
msgid "<cpu name>\t assemble for CPU <cpu name>"
msgstr ""
-#: config/tc-arm.c:13154
+#: config/tc-arm.c:20329
msgid "<arch name>\t assemble for architecture <arch name>"
msgstr ""
-#: config/tc-arm.c:13156
+#: config/tc-arm.c:20331
msgid "<fpu name>\t assemble for FPU architecture <fpu name>"
msgstr ""
-#: config/tc-arm.c:13158
+#: config/tc-arm.c:20333
msgid "<abi>\t assemble for floating point ABI <abi>"
msgstr ""
-#: config/tc-arm.c:13161
+#: config/tc-arm.c:20336
msgid "<ver>\t assemble for eabi version <ver>"
msgstr ""
-#: config/tc-arm.c:13202 config/tc-arm.c:13224
+#: config/tc-arm.c:20378 config/tc-arm.c:20398 config/tc-arm.c:20420
#, c-format
msgid "option `-%c%s' is deprecated: %s"
msgstr ""
-#: config/tc-arm.c:13245
+#: config/tc-arm.c:20441
#, c-format
msgid " ARM-specific assembler options:\n"
msgstr ""
-#: config/tc-arm.c:13256
+#: config/tc-arm.c:20452
#, c-format
msgid " -EB assemble code for a big-endian cpu\n"
msgstr ""
-#: config/tc-arm.c:13261
+#: config/tc-arm.c:20457
#, c-format
msgid " -EL assemble code for a little-endian cpu\n"
msgstr ""
-#: config/tc-avr.c:209
+#: config/tc-avr.c:258
#, c-format
msgid "Known MCU names:"
msgstr ""
-#: config/tc-avr.c:275
+#: config/tc-avr.c:324
#, c-format
msgid ""
"AVR options:\n"
@@ -2691,7 +3035,7 @@ msgid ""
" or immediate microcontroller name.\n"
msgstr ""
-#: config/tc-avr.c:285
+#: config/tc-avr.c:334
#, c-format
msgid ""
" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
@@ -2701,562 +3045,719 @@ msgid ""
" (default for avr3, avr5)\n"
msgstr ""
-#: config/tc-avr.c:329 config/tc-msp430.c:749
+#: config/tc-avr.c:378 config/tc-msp430.c:747
#, c-format
msgid "unknown MCU: %s\n"
msgstr ""
-#: config/tc-avr.c:338
+#: config/tc-avr.c:387
#, c-format
msgid "redefinition of mcu type `%s' to `%s'"
msgstr ""
-#: config/tc-avr.c:385 config/tc-crx.c:491 config/tc-d10v.c:278
-#: config/tc-d30v.c:312 config/tc-mips.c:10241 config/tc-mmix.c:2264
-#: config/tc-mn10200.c:342 config/tc-msp430.c:873 config/tc-pj.c:342
-#: config/tc-ppc.c:5211 config/tc-sh.c:2986 config/tc-v850.c:1199
+#: config/tc-avr.c:434 config/tc-cr16.c:670 config/tc-crx.c:491
+#: config/tc-d10v.c:277 config/tc-d30v.c:311 config/tc-mips.c:10769
+#: config/tc-mmix.c:2263 config/tc-mn10200.c:341 config/tc-msp430.c:871
+#: config/tc-pj.c:342 config/tc-ppc.c:5206 config/tc-sh.c:3076
+#: config/tc-v850.c:1198
msgid "bad call to md_atof"
msgstr ""
-#: config/tc-avr.c:447
+#: config/tc-avr.c:501
msgid "constant value required"
msgstr ""
-#: config/tc-avr.c:450
+#: config/tc-avr.c:504
#, c-format
msgid "number must be less than %d"
msgstr ""
-#: config/tc-avr.c:476 config/tc-avr.c:583
+#: config/tc-avr.c:530 config/tc-avr.c:665
#, c-format
msgid "constant out of 8-bit range: %d"
msgstr ""
-#: config/tc-avr.c:488 config/tc-d10v.c:498 config/tc-d30v.c:490
-#: config/tc-h8300.c:451 config/tc-mcore.c:665 config/tc-mmix.c:489
-#: config/tc-mn10200.c:1078 config/tc-mn10300.c:1820 config/tc-msp430.c:457
-#: config/tc-or32.c:306 config/tc-ppc.c:2382 config/tc-s390.c:1220
-#: config/tc-sh64.c:2213 config/tc-sh.c:1272 config/tc-v850.c:1952
-#: config/tc-z8k.c:328
+#: config/tc-avr.c:542 config/tc-d10v.c:497 config/tc-d30v.c:489
+#: config/tc-h8300.c:449 config/tc-mcore.c:662 config/tc-mmix.c:488
+#: config/tc-mn10200.c:1077 config/tc-mn10300.c:1819 config/tc-msp430.c:455
+#: config/tc-or32.c:307 config/tc-ppc.c:2436 config/tc-s390.c:1221
+#: config/tc-sh64.c:2213 config/tc-sh.c:1359 config/tc-v850.c:1967
+#: config/tc-z80.c:575 config/tc-z8k.c:350
msgid "missing operand"
msgstr ""
-#: config/tc-avr.c:536 read.c:3345
+#: config/tc-avr.c:598 config/tc-score.c:974 read.c:3560
msgid "illegal expression"
msgstr ""
-#: config/tc-avr.c:562 config/tc-avr.c:1282
+#: config/tc-avr.c:627 config/tc-avr.c:1386
msgid "`)' required"
msgstr ""
-#: config/tc-avr.c:638
+#: config/tc-avr.c:648
+msgid "expression dangerous with linker stubs"
+msgstr ""
+
+#: config/tc-avr.c:720
msgid "register r16-r23 required"
msgstr ""
-#: config/tc-avr.c:644
+#: config/tc-avr.c:726
msgid "register number above 15 required"
msgstr ""
-#: config/tc-avr.c:650
+#: config/tc-avr.c:732
msgid "even register number required"
msgstr ""
-#: config/tc-avr.c:656
+#: config/tc-avr.c:738
msgid "register r24, r26, r28 or r30 required"
msgstr ""
-#: config/tc-avr.c:662
+#: config/tc-avr.c:744
msgid "register name or number from 0 to 31 required"
msgstr ""
-#: config/tc-avr.c:680
+#: config/tc-avr.c:762
msgid "pointer register (X, Y or Z) required"
msgstr ""
-#: config/tc-avr.c:687
+#: config/tc-avr.c:769
msgid "cannot both predecrement and postincrement"
msgstr ""
-#: config/tc-avr.c:695
+#: config/tc-avr.c:777
msgid "addressing mode not supported"
msgstr ""
-#: config/tc-avr.c:701
+#: config/tc-avr.c:783
msgid "can't predecrement"
msgstr ""
-#: config/tc-avr.c:704
+#: config/tc-avr.c:786
msgid "pointer register Z required"
msgstr ""
-#: config/tc-avr.c:722
+#: config/tc-avr.c:804
msgid "pointer register (Y or Z) required"
msgstr ""
-#: config/tc-avr.c:826
+#: config/tc-avr.c:908
#, c-format
msgid "unknown constraint `%c'"
msgstr ""
-#: config/tc-avr.c:878
+#: config/tc-avr.c:960
msgid "`,' required"
msgstr ""
-#: config/tc-avr.c:896
+#: config/tc-avr.c:978
msgid "undefined combination of operands"
msgstr ""
-#: config/tc-avr.c:905
+#: config/tc-avr.c:987
msgid "skipping two-word instruction"
msgstr ""
-#: config/tc-avr.c:997 config/tc-avr.c:1013 config/tc-avr.c:1135
-#: config/tc-msp430.c:2012 config/tc-msp430.c:2030
+#: config/tc-avr.c:1079 config/tc-avr.c:1095 config/tc-avr.c:1209
+#: config/tc-msp430.c:2009 config/tc-msp430.c:2027
#, c-format
msgid "odd address operand: %ld"
msgstr ""
-#: config/tc-avr.c:1005 config/tc-avr.c:1024 config/tc-avr.c:1046
-#: config/tc-avr.c:1053 config/tc-avr.c:1060 config/tc-d10v.c:538
-#: config/tc-d30v.c:589 config/tc-msp430.c:2020 config/tc-msp430.c:2035
-#: config/tc-msp430.c:2045
+#: config/tc-avr.c:1087 config/tc-avr.c:1106 config/tc-avr.c:1128
+#: config/tc-avr.c:1135 config/tc-avr.c:1142 config/tc-d10v.c:537
+#: config/tc-d30v.c:588 config/tc-msp430.c:2017 config/tc-msp430.c:2032
+#: config/tc-msp430.c:2042
#, c-format
msgid "operand out of range: %ld"
msgstr ""
-#: config/tc-avr.c:1144 config/tc-d10v.c:1622 config/tc-d30v.c:2060
-#: config/tc-msp430.c:2063
+#: config/tc-avr.c:1218 config/tc-d10v.c:1619 config/tc-d30v.c:2059
+#: config/tc-msp430.c:2060
#, c-format
msgid "line %d: unknown relocation type: 0x%x"
msgstr ""
-#: config/tc-avr.c:1158
+#: config/tc-avr.c:1232
msgid "only constant expression allowed"
msgstr ""
#. xgettext:c-format.
-#: config/tc-avr.c:1192 config/tc-bfin.c:689 config/tc-d10v.c:1494
-#: config/tc-d30v.c:1804 config/tc-mn10200.c:814 config/tc-mn10300.c:2308
-#: config/tc-msp430.c:2098 config/tc-or32.c:1019 config/tc-ppc.c:6064
-#: config/tc-v850.c:2190
+#: config/tc-avr.c:1292 config/tc-bfin.c:771 config/tc-d10v.c:1491
+#: config/tc-d30v.c:1803 config/tc-mn10200.c:813 config/tc-mn10300.c:2311
+#: config/tc-msp430.c:2095 config/tc-or32.c:1017 config/tc-ppc.c:6085
+#: config/tc-spu.c:884 config/tc-spu.c:1071 config/tc-v850.c:2219
+#: config/tc-z80.c:2017
#, c-format
msgid "reloc %d not supported by object file format"
msgstr ""
-#: config/tc-avr.c:1215 config/tc-d10v.c:1782 config/tc-d10v.c:1796
-#: config/tc-h8300.c:1868 config/tc-mcore.c:884 config/tc-msp430.c:1862
-#: config/tc-pj.c:254 config/tc-sh.c:2457 config/tc-z8k.c:1194
+#: config/tc-avr.c:1315 config/tc-h8300.c:1866 config/tc-mcore.c:881
+#: config/tc-msp430.c:1860 config/tc-pj.c:254 config/tc-sh.c:2544
+#: config/tc-z8k.c:1216
msgid "can't find opcode "
msgstr ""
-#: config/tc-avr.c:1232
+#: config/tc-avr.c:1332
#, c-format
msgid "illegal opcode %s for mcu %s"
msgstr ""
-#: config/tc-avr.c:1241
+#: config/tc-avr.c:1341
msgid "garbage at end of line"
msgstr ""
-#: config/tc-avr.c:1309 config/tc-avr.c:1316
+#: config/tc-avr.c:1413 config/tc-avr.c:1420
#, c-format
msgid "illegal %srelocation size: %d"
msgstr ""
-#: config/tc-bfin.c:263
+#: config/tc-bfin.c:338
#, c-format
msgid " BFIN specific command line options:\n"
msgstr ""
-#: config/tc-bfin.c:646 config/tc-fr30.c:358 config/tc-frv.c:1600
-#: config/tc-i960.c:1756 config/tc-ip2k.c:371 config/tc-m32c.c:912
-#: config/tc-m32r.c:2143 config/tc-openrisc.c:376 config/tc-xstormy16.c:631
+#: config/tc-bfin.c:728 config/tc-fr30.c:357 config/tc-frv.c:1599
+#: config/tc-i960.c:1754 config/tc-ip2k.c:370 config/tc-m32c.c:1236
+#: config/tc-m32r.c:2142 config/tc-mep.c:1713 config/tc-openrisc.c:375
+#: config/tc-xc16x.c:258 config/tc-xstormy16.c:631
msgid "Bad call to md_atof()"
msgstr ""
-#: config/tc-cris.c:532 config/tc-m68hc11.c:2794
+#: config/tc-cr16.c:159 read.c:4266
+msgid "using a bit field width of zero"
+msgstr ""
+
+#: config/tc-cr16.c:167 read.c:4274
+#, c-format
+msgid "field width \"%s\" too complex for a bitfield"
+msgstr ""
+
+#: config/tc-cr16.c:176 read.c:4282
+#, c-format
+msgid "field width %lu too big to fit in %d bytes: truncated to %d bits"
+msgstr ""
+
+#: config/tc-cr16.c:198 read.c:4304
+#, c-format
+msgid "field value \"%s\" too complex for a bitfield"
+msgstr ""
+
+#: config/tc-cr16.c:379
+#, c-format
+msgid "Unknown register pair - index relative mode: `%d'"
+msgstr ""
+
+#: config/tc-cr16.c:558 config/tc-crx.c:344 config/tc-mn10200.c:800
+#: write.c:959
+#, c-format
+msgid "can't resolve `%s' {%s section} - `%s' {%s section}"
+msgstr ""
+
+#: config/tc-cr16.c:574 config/tc-crx.c:360
+#, c-format
+msgid "internal error: reloc %d (`%s') not supported by object file format"
+msgstr ""
+
+#: config/tc-cr16.c:762 config/tc-cr16.c:785 config/tc-cris.c:1181
+#: config/tc-crx.c:582 config/tc-crx.c:609 config/tc-crx.c:627
+msgid "Virtual memory exhausted"
+msgstr ""
+
+#: config/tc-cr16.c:770 config/tc-crx.c:619 config/tc-crx.c:637
+#: config/tc-i386.c:1230 config/tc-i386.c:1252 config/tc-m68k.c:4387
+#, c-format
+msgid "Internal Error: Can't hash %s: %s"
+msgstr ""
+
+#: config/tc-cr16.c:796 config/tc-cris.c:1215 config/tc-crx.c:592
+#, c-format
+msgid "Can't hash `%s': %s\n"
+msgstr ""
+
+#: config/tc-cr16.c:797 config/tc-cris.c:1216 config/tc-crx.c:593
+msgid "(unknown reason)"
+msgstr ""
+
+#. Missing or bad expr becomes absolute 0.
+#: config/tc-cr16.c:847 config/tc-crx.c:665 config/tc-i386.c:4865
+#, c-format
+msgid "missing or invalid displacement expression `%s' taken as 0"
+msgstr ""
+
+#: config/tc-cr16.c:959
+#, c-format
+msgid "operand %d: illegal use expression: `%s`"
+msgstr ""
+
+#: config/tc-cr16.c:1016 config/tc-crx.c:1173
+#, c-format
+msgid "Unknown register: `%d'"
+msgstr ""
+
+#. Issue a error message when register is illegal.
+#: config/tc-cr16.c:1024 config/tc-crx.c:1181
+#, c-format
+msgid "Illegal register (`%s') in Instruction: `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:1095 config/tc-cr16.c:1170 config/tc-crx.c:803
+#: config/tc-crx.c:823 config/tc-crx.c:838
+#, c-format
+msgid "Illegal register `%s' in Instruction `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:1123 config/tc-cr16.c:1134
+#, c-format
+msgid "Illegal register pair `%s' in Instruction `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:1159 config/tc-i960.c:835
+msgid "unmatched '['"
+msgstr ""
+
+#: config/tc-cr16.c:1165 config/tc-i960.c:842
+msgid "garbage after index spec ignored"
+msgstr ""
+
+#: config/tc-cr16.c:1313 config/tc-crx.c:982
+#, c-format
+msgid "Illegal operands (whitespace): `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:1325 config/tc-cr16.c:1332 config/tc-cr16.c:1349
+#: config/tc-crx.c:994 config/tc-crx.c:1001 config/tc-crx.c:1018
+#: config/tc-crx.c:1810
+#, c-format
+msgid "Missing matching brackets : `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:1381 config/tc-crx.c:1044
+#, c-format
+msgid "Unknown exception: `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:1468 config/tc-crx.c:1140
+#, c-format
+msgid "Illegal `cinv' parameter: `%c'"
+msgstr ""
+
+#: config/tc-cr16.c:1490 config/tc-cr16.c:1529
+#, c-format
+msgid "Unknown register pair: `%d'"
+msgstr ""
+
+#. Issue a error message when register pair is illegal.
+#: config/tc-cr16.c:1498
+#, c-format
+msgid "Illegal register pair (`%s') in Instruction: `%s'"
+msgstr ""
+
+#. Issue a error message when register pair is illegal.
+#: config/tc-cr16.c:1537
+#, c-format
+msgid "Illegal index register pair (`%s') in Instruction: `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:1576
+#, c-format
+msgid "Unknown processor register : `%d'"
+msgstr ""
+
+#. Issue a error message when register pair is illegal.
+#: config/tc-cr16.c:1584
+#, c-format
+msgid "Illegal processor register (`%s') in Instruction: `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:1632
+#, c-format
+msgid "Unknown processor register (32 bit) : `%d'"
+msgstr ""
+
+#. Issue a error message when register pair is illegal.
+#: config/tc-cr16.c:1640
+#, c-format
+msgid "Illegal 32 bit - processor register (`%s') in Instruction: `%s'"
+msgstr ""
+
+#: config/tc-cr16.c:2004 config/tc-crx.c:1708 config/tc-crx.c:1725
+#, c-format
+msgid "Same src/dest register is used (`r%d'), result is undefined"
+msgstr ""
+
+#: config/tc-cr16.c:2025
+msgid "RA register is saved twice."
+msgstr ""
+
+#: config/tc-cr16.c:2029
+#, c-format
+msgid "`%s' Illegal use of registers."
+msgstr ""
+
+#: config/tc-cr16.c:2043
+#, c-format
+msgid "`%s' Illegal count-register combination."
+msgstr ""
+
+#: config/tc-cr16.c:2049
+#, c-format
+msgid "`%s' Illegal use of register."
+msgstr ""
+
+#: config/tc-cr16.c:2058 config/tc-crx.c:1717
+#, c-format
+msgid "`%s' has undefined result"
+msgstr ""
+
+#: config/tc-cr16.c:2066
+#, c-format
+msgid "Same src/dest register is used (`r%d'),result is undefined"
+msgstr ""
+
+#: config/tc-cr16.c:2237 config/tc-crx.c:1622
+msgid "Incorrect number of operands"
+msgstr ""
+
+#: config/tc-cr16.c:2239 config/tc-crx.c:1624
+#, c-format
+msgid "Illegal type of operand (arg %d)"
+msgstr ""
+
+#: config/tc-cr16.c:2245 config/tc-crx.c:1630
+#, c-format
+msgid "Operand out of range (arg %d)"
+msgstr ""
+
+#: config/tc-cr16.c:2248 config/tc-crx.c:1633
+#, c-format
+msgid "Operand has odd displacement (arg %d)"
+msgstr ""
+
+#: config/tc-cr16.c:2251 config/tc-cr16.c:2282 config/tc-crx.c:1646
+#: config/tc-crx.c:1677
+#, c-format
+msgid "Illegal operand (arg %d)"
+msgstr ""
+
+#. Give an error if a frag containing code is not aligned to a 2-byte
+#. boundary.
+#: config/tc-cr16.c:2351 config/tc-cr16.h:71 config/tc-crx.c:1999
+#: config/tc-crx.h:76
+msgid "instruction address is not a multiple of 2"
+msgstr ""
+
+#: config/tc-cr16.c:2428 config/tc-cris.c:1529 config/tc-cris.c:1537
+#: config/tc-crx.c:2035 config/tc-dlx.c:685 config/tc-hppa.c:3261
+#: config/tc-i860.c:490 config/tc-i860.c:507 config/tc-i860.c:987
+#: config/tc-sparc.c:1431 config/tc-sparc.c:1439
+#, c-format
+msgid "Unknown opcode: `%s'"
+msgstr ""
+
+#: config/tc-cris.c:547 config/tc-m68hc11.c:2796
#, c-format
msgid "internal inconsistency problem in %s: fr_symbol %lx"
msgstr ""
-#: config/tc-cris.c:536 config/tc-m68hc11.c:2798 config/tc-msp430.c:2289
+#: config/tc-cris.c:551 config/tc-m68hc11.c:2800 config/tc-msp430.c:2286
#, c-format
msgid "internal inconsistency problem in %s: resolved symbol"
msgstr ""
-#: config/tc-cris.c:546 config/tc-m68hc11.c:2804
+#: config/tc-cris.c:561 config/tc-m68hc11.c:2806
#, c-format
msgid "internal inconsistency problem in %s: fr_subtype %d"
msgstr ""
-#: config/tc-cris.c:872
+#: config/tc-cris.c:901
msgid "Relaxation to long branches for .arch common_v10_v32 not implemented"
msgstr ""
-#: config/tc-cris.c:902
+#: config/tc-cris.c:931
msgid "Complicated LAPC target operand is not a multiple of two. Use LAPC.D"
msgstr ""
-#: config/tc-cris.c:907
+#: config/tc-cris.c:936
#, c-format
msgid ""
"Internal error found in md_convert_frag: offset %ld. Please report this."
msgstr ""
-#: config/tc-cris.c:932
+#: config/tc-cris.c:961
#, c-format
msgid "internal inconsistency in %s: bdapq no symbol"
msgstr ""
-#: config/tc-cris.c:945
+#: config/tc-cris.c:974
#, c-format
msgid "internal inconsistency in %s: bdap.w with no symbol"
msgstr ""
-#: config/tc-cris.c:969
+#: config/tc-cris.c:998
msgid "section alignment must be >= 4 bytes to check MULS/MULU safeness"
msgstr ""
-#: config/tc-cris.c:978
+#: config/tc-cris.c:1007
msgid "dangerous MULS/MULU location; give it higher alignment"
msgstr ""
-#: config/tc-cris.c:1083
+#: config/tc-cris.c:1112
msgid ""
"Out-of-range .word offset handling is not implemented for .arch "
"common_v10_v32"
msgstr ""
-#: config/tc-cris.c:1148 config/tc-crx.c:582 config/tc-crx.c:609
-#: config/tc-crx.c:627
-msgid "Virtual memory exhausted"
-msgstr ""
-
-#: config/tc-cris.c:1182 config/tc-crx.c:592
-#, c-format
-msgid "Can't hash `%s': %s\n"
-msgstr ""
-
-#: config/tc-cris.c:1183 config/tc-crx.c:593
-msgid "(unknown reason)"
-msgstr ""
-
-#: config/tc-cris.c:1187
+#: config/tc-cris.c:1220
#, c-format
msgid "Buggy opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-cris.c:1493 config/tc-cris.c:1501 config/tc-crx.c:2029
-#: config/tc-dlx.c:685 config/tc-hppa.c:1625 config/tc-i860.c:492
-#: config/tc-i860.c:509 config/tc-i860.c:989 config/tc-sparc.c:1417
-#: config/tc-sparc.c:1425
-#, c-format
-msgid "Unknown opcode: `%s'"
-msgstr ""
-
-#: config/tc-cris.c:1599
+#: config/tc-cris.c:1635
#, c-format
msgid "Immediate value not in 5 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:1615
+#: config/tc-cris.c:1651
#, c-format
msgid "Immediate value not in 4 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:1667
+#: config/tc-cris.c:1703
#, c-format
msgid "Immediate value not in 6 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:1682
+#: config/tc-cris.c:1718
#, c-format
msgid "Immediate value not in 6 bit unsigned range: %ld"
msgstr ""
#. Others have a generic warning.
-#: config/tc-cris.c:1790
+#: config/tc-cris.c:1826
#, 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:2033
+#: config/tc-cris.c:2069
msgid "Illegal operands"
msgstr ""
-#: config/tc-cris.c:2074 config/tc-cris.c:2114
+#: config/tc-cris.c:2110 config/tc-cris.c:2150
#, c-format
msgid "Immediate value not in 8 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:2084 config/tc-cris.c:2135
+#: config/tc-cris.c:2120 config/tc-cris.c:2171
#, c-format
msgid "Immediate value not in 16 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:2119
+#: config/tc-cris.c:2155
#, c-format
msgid "Immediate value not in 8 bit signed range: %ld"
msgstr ""
-#: config/tc-cris.c:2124
+#: config/tc-cris.c:2160
#, c-format
msgid "Immediate value not in 8 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:2140
+#: config/tc-cris.c:2176
#, c-format
msgid "Immediate value not in 16 bit signed range: %ld"
msgstr ""
-#: config/tc-cris.c:2145
+#: config/tc-cris.c:2181
#, c-format
msgid "Immediate value not in 16 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:2167
+#: config/tc-cris.c:2203
msgid "PIC relocation size does not match operand size"
msgstr ""
-#: config/tc-cris.c:3304
+#: config/tc-cris.c:3346
msgid "Calling gen_cond_branch_32 for .arch common_v10_v32\n"
msgstr ""
-#: config/tc-cris.c:3308
+#: config/tc-cris.c:3350
msgid "32-bit conditional branch generated"
msgstr ""
-#: config/tc-cris.c:3367
+#: config/tc-cris.c:3411
msgid "Complex expression not supported"
msgstr ""
#. FIXME: Is this function mentioned in the internals.texi manual? If
#. not, add it.
-#: config/tc-cris.c:3490
+#: config/tc-cris.c:3537
msgid "Bad call to md_atof () - floating point formats are not supported"
msgstr ""
-#: config/tc-cris.c:3531
+#: config/tc-cris.c:3578
msgid "PC-relative relocation must be trivially resolved"
msgstr ""
-#: config/tc-cris.c:3584
+#: config/tc-cris.c:3631
#, c-format
msgid "Value not in 16 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:3595
+#: config/tc-cris.c:3642
#, c-format
msgid "Value not in 16 bit signed range: %ld"
msgstr ""
-#: config/tc-cris.c:3606
+#: config/tc-cris.c:3653
#, c-format
msgid "Value not in 8 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:3614
+#: config/tc-cris.c:3661
#, c-format
msgid "Value not in 8 bit signed range: %ld"
msgstr ""
-#: config/tc-cris.c:3625
+#: config/tc-cris.c:3672
#, c-format
msgid "Value not in 4 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:3633
+#: config/tc-cris.c:3680
#, c-format
msgid "Value not in 5 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:3641
+#: config/tc-cris.c:3688
#, c-format
msgid "Value not in 6 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:3649
+#: config/tc-cris.c:3696
#, c-format
msgid "Value not in 6 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:3695
+#: config/tc-cris.c:3742
#, c-format
msgid "Please use --help to see usage and options for this assembler.\n"
msgstr ""
-#: config/tc-cris.c:3707
+#: config/tc-cris.c:3754
msgid "--no-underscore is invalid with a.out format"
msgstr ""
-#: config/tc-cris.c:3727
+#: config/tc-cris.c:3778
#, c-format
msgid "invalid <arch> in --march=<arch>: %s"
msgstr ""
-#: config/tc-cris.c:3821
+#: config/tc-cris.c:3877
msgid ""
"Semantics error. This type of operand can not be relocated, it must be an "
"assembly-time constant"
msgstr ""
-#: config/tc-cris.c:3870
+#: config/tc-cris.c:3926
#, c-format
msgid "Cannot generate relocation type for symbol %s, code %s"
msgstr ""
#. The messages are formatted to line up with the generic options.
-#: config/tc-cris.c:3883
+#: config/tc-cris.c:3939
#, c-format
msgid "CRIS-specific options:\n"
msgstr ""
-#: config/tc-cris.c:3885
+#: config/tc-cris.c:3941
msgid ""
" -h, -H Don't execute, print this help text. Deprecated.\n"
msgstr ""
-#: config/tc-cris.c:3887
+#: config/tc-cris.c:3943
msgid " -N Warn when branches are expanded to jumps.\n"
msgstr ""
-#: config/tc-cris.c:3889
+#: config/tc-cris.c:3945
msgid ""
" --underscore User symbols are normally prepended with "
"underscore.\n"
msgstr ""
-#: config/tc-cris.c:3891
+#: config/tc-cris.c:3947
msgid " Registers will not need any prefix.\n"
msgstr ""
-#: config/tc-cris.c:3893
+#: config/tc-cris.c:3949
msgid " --no-underscore User symbols do not have any prefix.\n"
msgstr ""
-#: config/tc-cris.c:3895
+#: config/tc-cris.c:3951
msgid " Registers will require a `$'-prefix.\n"
msgstr ""
-#: config/tc-cris.c:3897
+#: config/tc-cris.c:3953
msgid " --pic\t\t\tEnable generation of position-independent code.\n"
msgstr ""
-#: config/tc-cris.c:3899
+#: config/tc-cris.c:3955
msgid ""
" --march=<arch>\t\tGenerate code for <arch>. Valid choices for <arch>\n"
"\t\t\t\tare v0_v10, v10, v32 and common_v10_v32.\n"
msgstr ""
-#: config/tc-cris.c:3920
+#: config/tc-cris.c:3976
msgid "Invalid relocation"
msgstr ""
-#: config/tc-cris.c:3957
+#: config/tc-cris.c:4013
msgid "Invalid pc-relative relocation"
msgstr ""
-#: config/tc-cris.c:4002
+#: config/tc-cris.c:4058
#, c-format
msgid "Adjusted signed .word (%ld) overflows: `switch'-statement too large."
msgstr ""
-#: config/tc-cris.c:4032
+#: config/tc-cris.c:4088
#, c-format
msgid ".syntax %s requires command-line option `--underscore'"
msgstr ""
-#: config/tc-cris.c:4041
+#: config/tc-cris.c:4097
#, c-format
msgid ".syntax %s requires command-line option `--no-underscore'"
msgstr ""
-#: config/tc-cris.c:4078
+#: config/tc-cris.c:4134
msgid "Unknown .syntax operand"
msgstr ""
-#: config/tc-cris.c:4088
+#: config/tc-cris.c:4144
msgid "Pseudodirective .file is only valid when generating ELF"
msgstr ""
-#: config/tc-cris.c:4100
+#: config/tc-cris.c:4156
msgid "Pseudodirective .loc is only valid when generating ELF"
msgstr ""
-#: config/tc-cris.c:4243
+#: config/tc-cris.c:4299
msgid "unknown operand to .arch"
msgstr ""
-#: config/tc-cris.c:4252
+#: config/tc-cris.c:4308
msgid ".arch <arch> requires a matching --march=... option"
msgstr ""
-#: config/tc-crx.c:344 config/tc-mn10200.c:801 write.c:2209
-#, c-format
-msgid "can't resolve `%s' {%s section} - `%s' {%s section}"
-msgstr ""
-
-#: config/tc-crx.c:360
-#, c-format
-msgid "internal error: reloc %d (`%s') not supported by object file format"
-msgstr ""
-
-#: config/tc-crx.c:619 config/tc-crx.c:637 config/tc-i386.c:953
-#: config/tc-i386.c:976 config/tc-m68k.c:4149
-#, c-format
-msgid "Internal Error: Can't hash %s: %s"
-msgstr ""
-
-#. Missing or bad expr becomes absolute 0.
-#: config/tc-crx.c:665 config/tc-i386.c:4259
-#, c-format
-msgid "missing or invalid displacement expression `%s' taken as 0"
-msgstr ""
-
-#: config/tc-crx.c:803 config/tc-crx.c:823 config/tc-crx.c:838
-#, c-format
-msgid "Illegal register `%s' in Instruction `%s'"
-msgstr ""
-
#: config/tc-crx.c:866
#, c-format
msgid "Illegal Scale - `%d'"
msgstr ""
-#: config/tc-crx.c:982
-#, c-format
-msgid "Illegal operands (whitespace): `%s'"
-msgstr ""
-
-#: config/tc-crx.c:994 config/tc-crx.c:1001 config/tc-crx.c:1018
-#: config/tc-crx.c:1804
-#, c-format
-msgid "Missing matching brackets : `%s'"
-msgstr ""
-
-#: config/tc-crx.c:1044
-#, c-format
-msgid "Unknown exception: `%s'"
-msgstr ""
-
-#: config/tc-crx.c:1140
-#, c-format
-msgid "Illegal `cinv' parameter: `%c'"
-msgstr ""
-
-#: config/tc-crx.c:1173
-#, c-format
-msgid "Unknown register: `%d'"
-msgstr ""
-
-#. Issue a error message when register is illegal.
-#: config/tc-crx.c:1181
-#, c-format
-msgid "Illegal register (`%s') in Instruction: `%s'"
-msgstr ""
-
#: config/tc-crx.c:1310
#, c-format
msgid "Illegal Co-processor register in Instruction `%s' "
@@ -3267,110 +3768,70 @@ msgstr ""
msgid "Illegal Co-processor special register in Instruction `%s' "
msgstr ""
-#: config/tc-crx.c:1616
-msgid "Incorrect number of operands"
-msgstr ""
-
-#: config/tc-crx.c:1618
-#, c-format
-msgid "Illegal type of operand (arg %d)"
-msgstr ""
-
-#: config/tc-crx.c:1624
-#, c-format
-msgid "Operand out of range (arg %d)"
-msgstr ""
-
-#: config/tc-crx.c:1627
-#, c-format
-msgid "Operand has odd displacement (arg %d)"
-msgstr ""
-
-#: config/tc-crx.c:1630
+#: config/tc-crx.c:1636
#, c-format
msgid "Invalid DISPU4 operand value (arg %d)"
msgstr ""
-#: config/tc-crx.c:1633
+#: config/tc-crx.c:1639
#, c-format
msgid "Invalid CST4 operand value (arg %d)"
msgstr ""
-#: config/tc-crx.c:1636
+#: config/tc-crx.c:1642
#, c-format
msgid "Operand value is not within upper 64 KB (arg %d)"
msgstr ""
-#: config/tc-crx.c:1640 config/tc-crx.c:1671
-#, c-format
-msgid "Illegal operand (arg %d)"
-msgstr ""
-
-#: config/tc-crx.c:1702 config/tc-crx.c:1719
-#, c-format
-msgid "Same src/dest register is used (`r%d'), result is undefined"
-msgstr ""
-
-#: config/tc-crx.c:1711
-#, c-format
-msgid "`%s' has undefined result"
-msgstr ""
-
-#: config/tc-crx.c:1773
+#: config/tc-crx.c:1779
msgid "Invalid Register in Register List"
msgstr ""
-#: config/tc-crx.c:1827
+#: config/tc-crx.c:1833
#, c-format
msgid "Illegal register `%s' in cop-register list"
msgstr ""
-#: config/tc-crx.c:1835
+#: config/tc-crx.c:1841
#, c-format
msgid "Illegal register `%s' in cop-special-register list"
msgstr ""
-#: config/tc-crx.c:1854
+#: config/tc-crx.c:1860
#, c-format
msgid "Illegal register `%s' in user register list"
msgstr ""
-#: config/tc-crx.c:1873
+#: config/tc-crx.c:1879
#, c-format
msgid "Illegal register `%s' in register list"
msgstr ""
-#: config/tc-crx.c:1879
+#: config/tc-crx.c:1885
#, c-format
msgid "Maximum %d bits may be set in `mask16' operand"
msgstr ""
-#: config/tc-crx.c:1888
+#: config/tc-crx.c:1894
#, c-format
msgid "rest of line ignored; first ignored character is `%c'"
msgstr ""
-#: config/tc-crx.c:1896
+#: config/tc-crx.c:1902
#, c-format
msgid "Illegal `mask16' operand, operation is undefined - `%s'"
msgstr ""
#. HI can't be specified without LO (and vise-versa).
-#: config/tc-crx.c:1902
+#: config/tc-crx.c:1908
msgid "HI/LO registers should be specified together"
msgstr ""
-#: config/tc-crx.c:1908
+#: config/tc-crx.c:1914
msgid "HI/LO registers should be specified without additional registers"
msgstr ""
-#. Give an error if a frag containing code is not aligned to a 2-byte
-#. boundary.
-#: config/tc-crx.c:1993 config/tc-crx.h:76
-msgid "instruction address is not a multiple of 2"
-msgstr ""
-
-#: config/tc-d10v.c:217
+#: config/tc-d10v.c:216
#, c-format
msgid ""
"D10V options:\n"
@@ -3381,140 +3842,144 @@ msgid ""
" instructions together.\n"
msgstr ""
-#: config/tc-d10v.c:496 config/tc-d30v.c:488 config/tc-mn10200.c:1075
-#: config/tc-mn10300.c:1817 config/tc-ppc.c:2380 config/tc-s390.c:1218
-#: config/tc-v850.c:1949
+#: config/tc-d10v.c:495 config/tc-d30v.c:487 config/tc-mn10200.c:1074
+#: config/tc-mn10300.c:1816 config/tc-ppc.c:2434 config/tc-s390.c:1219
+#: config/tc-v850.c:1964 config/tc-z80.c:422
msgid "illegal operand"
msgstr ""
-#: config/tc-d10v.c:608
+#: config/tc-d10v.c:607
msgid "operand is not an immediate"
msgstr ""
-#: config/tc-d10v.c:626
+#: config/tc-d10v.c:625
#, c-format
msgid "operand out of range: %lu"
msgstr ""
-#: config/tc-d10v.c:684
+#: config/tc-d10v.c:683
msgid "Instruction must be executed in parallel with another instruction."
msgstr ""
-#: config/tc-d10v.c:738 config/tc-d10v.c:746
+#: config/tc-d10v.c:737 config/tc-d10v.c:745
#, c-format
msgid "packing conflict: %s must dispatch sequentially"
msgstr ""
-#: config/tc-d10v.c:845
+#: config/tc-d10v.c:844
#, c-format
msgid "resource conflict (R%d)"
msgstr ""
-#: config/tc-d10v.c:848
+#: config/tc-d10v.c:847
#, c-format
msgid "resource conflict (A%d)"
msgstr ""
-#: config/tc-d10v.c:850
+#: config/tc-d10v.c:849
msgid "resource conflict (PSW)"
msgstr ""
-#: config/tc-d10v.c:852
+#: config/tc-d10v.c:851
msgid "resource conflict (C flag)"
msgstr ""
-#: config/tc-d10v.c:854
+#: config/tc-d10v.c:853
msgid "resource conflict (F flag)"
msgstr ""
-#: config/tc-d10v.c:1004
+#: config/tc-d10v.c:1003
msgid "Instruction must be executed in parallel"
msgstr ""
-#: config/tc-d10v.c:1007
+#: config/tc-d10v.c:1006
msgid "Long instructions may not be combined."
msgstr ""
-#: config/tc-d10v.c:1040
+#: config/tc-d10v.c:1039
msgid "One of these instructions may not be executed in parallel."
msgstr ""
-#: config/tc-d10v.c:1044 config/tc-d30v.c:1071
+#: config/tc-d10v.c:1043 config/tc-d30v.c:1070
msgid "Two IU instructions may not be executed in parallel"
msgstr ""
-#: config/tc-d10v.c:1046 config/tc-d10v.c:1054 config/tc-d10v.c:1068
-#: config/tc-d10v.c:1083 config/tc-d30v.c:1072 config/tc-d30v.c:1081
+#: config/tc-d10v.c:1045 config/tc-d10v.c:1053 config/tc-d10v.c:1067
+#: config/tc-d10v.c:1082 config/tc-d30v.c:1071 config/tc-d30v.c:1080
msgid "Swapping instruction order"
msgstr ""
-#: config/tc-d10v.c:1052 config/tc-d30v.c:1078
+#: config/tc-d10v.c:1051 config/tc-d30v.c:1077
msgid "Two MU instructions may not be executed in parallel"
msgstr ""
-#: config/tc-d10v.c:1072 config/tc-d30v.c:1098
+#: config/tc-d10v.c:1071 config/tc-d30v.c:1097
msgid "IU instruction may not be in the left container"
msgstr ""
-#: config/tc-d10v.c:1074 config/tc-d10v.c:1089
+#: config/tc-d10v.c:1073 config/tc-d10v.c:1088
msgid ""
"Instruction in R container is squashed by flow control instruction in L "
"container."
msgstr ""
-#: config/tc-d10v.c:1087 config/tc-d30v.c:1109
+#: config/tc-d10v.c:1086 config/tc-d30v.c:1108
msgid "MU instruction may not be in the right container"
msgstr ""
-#: config/tc-d10v.c:1093 config/tc-d30v.c:1121
+#: config/tc-d10v.c:1092 config/tc-d30v.c:1120
msgid "unknown execution type passed to write_2_short()"
msgstr ""
-#: config/tc-d10v.c:1221 config/tc-d10v.c:1394
+#: config/tc-d10v.c:1220 config/tc-d10v.c:1393
msgid "bad opcode or operands"
msgstr ""
-#: config/tc-d10v.c:1296 config/tc-m68k.c:4625
+#: config/tc-d10v.c:1295
msgid "value out of range"
msgstr ""
-#: config/tc-d10v.c:1370
+#: config/tc-d10v.c:1369
msgid "illegal operand - register name found where none expected"
msgstr ""
-#: config/tc-d10v.c:1405
+#: config/tc-d10v.c:1404
msgid "Register number must be EVEN"
msgstr ""
-#: config/tc-d10v.c:1408
+#: config/tc-d10v.c:1407
msgid "Unsupported use of sp"
msgstr ""
-#: config/tc-d10v.c:1427
+#: config/tc-d10v.c:1426
#, c-format
msgid "cr%ld is a reserved control register"
msgstr ""
-#: config/tc-d10v.c:1466 config/tc-d30v.c:1430
+#: config/tc-d10v.c:1599
#, c-format
-msgid "unknown opcode: %s"
+msgid "line %d: rep or repi must include at least 4 instructions"
+msgstr ""
+
+#: config/tc-d10v.c:1779
+msgid "can't find previous opcode "
msgstr ""
-#: config/tc-d10v.c:1602
+#: config/tc-d10v.c:1791
#, c-format
-msgid "line %d: rep or repi must include at least 4 instructions"
+msgid "could not assemble: %s"
msgstr ""
-#: config/tc-d10v.c:1810 config/tc-d10v.c:1832 config/tc-d30v.c:1777
+#: config/tc-d10v.c:1806 config/tc-d10v.c:1828 config/tc-d30v.c:1776
msgid "Unable to mix instructions as specified"
msgstr ""
-#: config/tc-d30v.c:150
+#: config/tc-d30v.c:149
#, c-format
msgid "Register name %s conflicts with symbol of the same name"
msgstr ""
-#: config/tc-d30v.c:240
+#: config/tc-d30v.c:239
#, c-format
msgid ""
"\n"
@@ -3528,126 +3993,131 @@ msgid ""
"-C Opposite of -C. -c is the default.\n"
msgstr ""
-#: config/tc-d30v.c:402
+#: config/tc-d30v.c:401
msgid "unexpected 12-bit reloc type"
msgstr ""
-#: config/tc-d30v.c:409
+#: config/tc-d30v.c:408
msgid "unexpected 18-bit reloc type"
msgstr ""
-#: config/tc-d30v.c:659
+#: config/tc-d30v.c:658
#, c-format
msgid "%s NOP inserted"
msgstr ""
-#: config/tc-d30v.c:660
+#: config/tc-d30v.c:659
msgid "sequential"
msgstr ""
-#: config/tc-d30v.c:660
+#: config/tc-d30v.c:659
msgid "parallel"
msgstr ""
-#: config/tc-d30v.c:1067
+#: config/tc-d30v.c:1066
msgid "Instructions may not be executed in parallel"
msgstr ""
-#: config/tc-d30v.c:1080
+#: config/tc-d30v.c:1079
#, c-format
msgid "Executing %s in IU may not work"
msgstr ""
-#: config/tc-d30v.c:1087
+#: config/tc-d30v.c:1086
#, c-format
msgid "Executing %s in IU may not work in parallel execution"
msgstr ""
-#: config/tc-d30v.c:1100
+#: config/tc-d30v.c:1099
#, c-format
msgid "special left instruction `%s' kills instruction `%s' in right container"
msgstr ""
-#: config/tc-d30v.c:1111
+#: config/tc-d30v.c:1110
#, c-format
msgid "Executing %s in reverse serial with %s may not work"
msgstr ""
-#: config/tc-d30v.c:1114
+#: config/tc-d30v.c:1113
#, c-format
msgid "Executing %s in IU in reverse serial may not work"
msgstr ""
-#: config/tc-d30v.c:1303
+#: config/tc-d30v.c:1302
msgid "Odd numbered register used as target of multi-register instruction"
msgstr ""
-#: config/tc-d30v.c:1367 config/tc-d30v.c:1402
+#: config/tc-d30v.c:1366 config/tc-d30v.c:1401
#, c-format
msgid "unknown condition code: %s"
msgstr ""
-#: config/tc-d30v.c:1395
+#: config/tc-d30v.c:1394
#, c-format
msgid "cmpu doesn't support condition code %s"
msgstr ""
-#: config/tc-d30v.c:1441
+#: config/tc-d30v.c:1429
+#, c-format
+msgid "unknown opcode: %s"
+msgstr ""
+
+#: config/tc-d30v.c:1440
#, c-format
msgid "operands for opcode `%s' do not match any valid format"
msgstr ""
-#: config/tc-d30v.c:1656 config/tc-d30v.c:1673
+#: config/tc-d30v.c:1655 config/tc-d30v.c:1672
msgid "Cannot assemble instruction"
msgstr ""
-#: config/tc-d30v.c:1658
+#: config/tc-d30v.c:1657
msgid "First opcode is long. Unable to mix instructions as specified."
msgstr ""
-#: config/tc-d30v.c:1727
+#: config/tc-d30v.c:1726
msgid "word of NOPs added between word multiply and load"
msgstr ""
-#: config/tc-d30v.c:1729
+#: config/tc-d30v.c:1728
msgid "word of NOPs added between word multiply and 16-bit multiply"
msgstr ""
-#: config/tc-d30v.c:1761
+#: config/tc-d30v.c:1760
msgid "Instruction uses long version, so it cannot be mixed as specified"
msgstr ""
-#: config/tc-d30v.c:1888
+#: config/tc-d30v.c:1887
#, c-format
msgid "value too large to fit in %d bits"
msgstr ""
-#: config/tc-d30v.c:1949
+#: config/tc-d30v.c:1948
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a byte"
msgstr ""
-#: config/tc-d30v.c:1952
+#: config/tc-d30v.c:1951
#, c-format
msgid "line %d: unable to place value %lx into a byte"
msgstr ""
-#: config/tc-d30v.c:1960
+#: config/tc-d30v.c:1959
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a short"
msgstr ""
-#: config/tc-d30v.c:1963
+#: config/tc-d30v.c:1962
#, c-format
msgid "line %d: unable to place value %lx into a short"
msgstr ""
-#: config/tc-d30v.c:1971
+#: config/tc-d30v.c:1970
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a quad"
msgstr ""
-#: config/tc-d30v.c:2079
+#: config/tc-d30v.c:2078
#, c-format
msgid "Alignment too large: %d assumed"
msgstr ""
@@ -3661,8 +4131,8 @@ msgid ".endfunc missing for previous .proc"
msgstr ""
#. Probably a memory allocation problem? Give up now.
-#: config/tc-dlx.c:297 config/tc-hppa.c:1489 config/tc-mips.c:1415
-#: config/tc-mips.c:1467 config/tc-or32.c:210 config/tc-sparc.c:855
+#: config/tc-dlx.c:297 config/tc-hppa.c:8306 config/tc-mips.c:1764
+#: config/tc-mips.c:1816 config/tc-or32.c:211 config/tc-sparc.c:869
msgid "Broken assembler. No assembly attempted."
msgstr ""
@@ -3681,7 +4151,7 @@ msgstr ""
msgid "Expression Error for operand modifier %%hi/%%lo\n"
msgstr ""
-#: config/tc-dlx.c:634 config/tc-or32.c:873
+#: config/tc-dlx.c:634 config/tc-or32.c:871
#, c-format
msgid "Invalid expression after %%%%\n"
msgstr ""
@@ -3718,7 +4188,7 @@ msgstr ""
msgid "failed general register sanity check."
msgstr ""
-#: config/tc-dlx.c:1175 config/tc-or32.c:835
+#: config/tc-dlx.c:1175 config/tc-or32.c:833
#, c-format
msgid "label \"$%d\" redefined"
msgstr ""
@@ -3727,314 +4197,315 @@ msgstr ""
msgid "Invalid expression after # number\n"
msgstr ""
-#: config/tc-fr30.c:83
+#: config/tc-fr30.c:82
#, c-format
msgid " FR30 specific command line options:\n"
msgstr ""
-#: config/tc-fr30.c:136
+#: config/tc-fr30.c:135
#, c-format
msgid "Instruction %s not allowed in a delay slot."
msgstr ""
-#: config/tc-frv.c:461
+#: config/tc-frv.c:460
#, c-format
msgid "FRV specific command line options:\n"
msgstr ""
-#: config/tc-frv.c:462
+#: config/tc-frv.c:461
#, c-format
msgid "-G n Data >= n bytes is in small data area\n"
msgstr ""
-#: config/tc-frv.c:463
+#: config/tc-frv.c:462
#, c-format
msgid "-mgpr-32 Note 32 gprs are used\n"
msgstr ""
-#: config/tc-frv.c:464
+#: config/tc-frv.c:463
#, c-format
msgid "-mgpr-64 Note 64 gprs are used\n"
msgstr ""
-#: config/tc-frv.c:465
+#: config/tc-frv.c:464
#, c-format
msgid "-mfpr-32 Note 32 fprs are used\n"
msgstr ""
-#: config/tc-frv.c:466
+#: config/tc-frv.c:465
#, c-format
msgid "-mfpr-64 Note 64 fprs are used\n"
msgstr ""
-#: config/tc-frv.c:467
+#: config/tc-frv.c:466
#, c-format
msgid "-msoft-float Note software fp is used\n"
msgstr ""
-#: config/tc-frv.c:468
+#: config/tc-frv.c:467
#, c-format
msgid "-mdword Note stack is aligned to a 8 byte boundary\n"
msgstr ""
-#: config/tc-frv.c:469
+#: config/tc-frv.c:468
#, c-format
msgid "-mno-dword Note stack is aligned to a 4 byte boundary\n"
msgstr ""
-#: config/tc-frv.c:470
+#: config/tc-frv.c:469
#, c-format
msgid "-mdouble Note fp double insns are used\n"
msgstr ""
-#: config/tc-frv.c:471
+#: config/tc-frv.c:470
#, c-format
msgid "-mmedia Note media insns are used\n"
msgstr ""
-#: config/tc-frv.c:472
+#: config/tc-frv.c:471
#, c-format
msgid "-mmuladd Note multiply add/subtract insns are used\n"
msgstr ""
-#: config/tc-frv.c:473
+#: config/tc-frv.c:472
#, c-format
msgid "-mpack Note instructions are packed\n"
msgstr ""
-#: config/tc-frv.c:474
+#: config/tc-frv.c:473
#, c-format
msgid "-mno-pack Do not allow instructions to be packed\n"
msgstr ""
-#: config/tc-frv.c:475
+#: config/tc-frv.c:474
#, c-format
msgid "-mpic Note small position independent code\n"
msgstr ""
-#: config/tc-frv.c:476
+#: config/tc-frv.c:475
#, c-format
msgid "-mPIC Note large position independent code\n"
msgstr ""
-#: config/tc-frv.c:477
+#: config/tc-frv.c:476
#, c-format
msgid "-mlibrary-pic Compile library for large position indepedent code\n"
msgstr ""
-#: config/tc-frv.c:478
+#: config/tc-frv.c:477
#, c-format
msgid "-mfdpic Assemble for the FDPIC ABI\n"
msgstr ""
-#: config/tc-frv.c:479
+#: config/tc-frv.c:478
#, c-format
msgid "-mnopic Disable -mpic, -mPIC, -mlibrary-pic and -mfdpic\n"
msgstr ""
-#: config/tc-frv.c:480
+#: config/tc-frv.c:479
#, c-format
msgid "-mcpu={fr500|fr550|fr400|fr405|fr450|fr300|frv|simple|tomcat}\n"
msgstr ""
-#: config/tc-frv.c:481
+#: config/tc-frv.c:480
#, c-format
msgid " Record the cpu type\n"
msgstr ""
-#: config/tc-frv.c:482
+#: config/tc-frv.c:481
#, c-format
msgid "-mtomcat-stats Print out stats for tomcat workarounds\n"
msgstr ""
-#: config/tc-frv.c:483
+#: config/tc-frv.c:482
#, c-format
msgid "-mtomcat-debug Debug tomcat workarounds\n"
msgstr ""
-#: config/tc-frv.c:1187
+#: config/tc-frv.c:1186
msgid "VLIW packing used for -mno-pack"
msgstr ""
-#: config/tc-frv.c:1197
+#: config/tc-frv.c:1196
msgid "Instruction not supported by this architecture"
msgstr ""
-#: config/tc-frv.c:1207
+#: config/tc-frv.c:1206
msgid "VLIW packing constraint violation"
msgstr ""
-#: config/tc-frv.c:1874
+#: config/tc-frv.c:1873
#, c-format
msgid "Relocation %s is not safe for %s"
msgstr ""
-#: config/tc-h8300.c:78 config/tc-h8300.c:87 config/tc-h8300.c:97
-#: config/tc-h8300.c:107 config/tc-h8300.c:117 config/tc-h8300.c:128
-#: config/tc-h8300.c:195 config/tc-hppa.c:1449 config/tc-hppa.c:6926
-#: config/tc-hppa.c:6932 config/tc-hppa.c:6938 config/tc-hppa.c:6944
-#: config/tc-mn10300.c:1223 config/tc-mn10300.c:1228 config/tc-mn10300.c:2725
+#: config/tc-h8300.c:76 config/tc-h8300.c:85 config/tc-h8300.c:95
+#: config/tc-h8300.c:105 config/tc-h8300.c:115 config/tc-h8300.c:126
+#: config/tc-h8300.c:193 config/tc-hppa.c:6839 config/tc-hppa.c:6845
+#: config/tc-hppa.c:6851 config/tc-hppa.c:6857 config/tc-hppa.c:8264
+#: config/tc-mn10300.c:1222 config/tc-mn10300.c:1227 config/tc-mn10300.c:2729
+#: config/tc-xc16x.c:79 config/tc-xc16x.c:86 config/tc-xc16x.c:93
msgid "could not set architecture and machine"
msgstr ""
-#: config/tc-h8300.c:397 config/tc-h8300.c:405
+#: config/tc-h8300.c:395 config/tc-h8300.c:403
msgid "Reg not valid for H8/300"
msgstr ""
-#: config/tc-h8300.c:486
+#: config/tc-h8300.c:484
msgid "invalid operand size requested"
msgstr ""
-#: config/tc-h8300.c:585
+#: config/tc-h8300.c:583
msgid "Invalid register list for ldm/stm\n"
msgstr ""
-#: config/tc-h8300.c:611 config/tc-h8300.c:616 config/tc-h8300.c:623
+#: config/tc-h8300.c:609 config/tc-h8300.c:614 config/tc-h8300.c:621
msgid "mismatch between register and suffix"
msgstr ""
-#: config/tc-h8300.c:650
+#: config/tc-h8300.c:648
msgid "address too high for vector table jmp/jsr"
msgstr ""
-#: config/tc-h8300.c:677 config/tc-h8300.c:789 config/tc-h8300.c:799
+#: config/tc-h8300.c:675 config/tc-h8300.c:787 config/tc-h8300.c:797
msgid "Wrong size pointer register for architecture."
msgstr ""
-#: config/tc-h8300.c:736 config/tc-h8300.c:744 config/tc-h8300.c:773
+#: config/tc-h8300.c:734 config/tc-h8300.c:742 config/tc-h8300.c:771
msgid "expected @(exp, reg16)"
msgstr ""
-#: config/tc-h8300.c:762
+#: config/tc-h8300.c:760
msgid "expected .L, .W or .B for register in indexed addressing mode"
msgstr ""
-#: config/tc-h8300.c:956
+#: config/tc-h8300.c:954
msgid "expected valid addressing mode for mova: \"@(disp, ea.sz),ERn\""
msgstr ""
-#: config/tc-h8300.c:974 config/tc-h8300.c:983
+#: config/tc-h8300.c:972 config/tc-h8300.c:981
msgid "expected register"
msgstr ""
-#: config/tc-h8300.c:999
+#: config/tc-h8300.c:997
msgid "expected closing paren"
msgstr ""
-#: config/tc-h8300.c:1058
+#: config/tc-h8300.c:1056
#, c-format
msgid "can't use high part of register in operand %d"
msgstr ""
-#: config/tc-h8300.c:1215
+#: config/tc-h8300.c:1213
#, c-format
msgid "Opcode `%s' with these operand types not available in %s mode"
msgstr ""
-#: config/tc-h8300.c:1224
+#: config/tc-h8300.c:1222
msgid "mismatch between opcode size and operand size"
msgstr ""
-#: config/tc-h8300.c:1260
+#: config/tc-h8300.c:1258
#, c-format
msgid "operand %s0x%lx out of range."
msgstr ""
-#: config/tc-h8300.c:1356
+#: config/tc-h8300.c:1354
msgid "Can't work out size of operand.\n"
msgstr ""
-#: config/tc-h8300.c:1405
+#: config/tc-h8300.c:1403
#, c-format
msgid "Opcode `%s' with these operand types not available in H8/300 mode"
msgstr ""
-#: config/tc-h8300.c:1410
+#: config/tc-h8300.c:1408
#, c-format
msgid "Opcode `%s' with these operand types not available in H8/300H mode"
msgstr ""
-#: config/tc-h8300.c:1416
+#: config/tc-h8300.c:1414
#, c-format
msgid "Opcode `%s' with these operand types not available in H8/300S mode"
msgstr ""
-#: config/tc-h8300.c:1477 config/tc-h8300.c:1497
+#: config/tc-h8300.c:1475 config/tc-h8300.c:1495
msgid "Need #1 or #2 here"
msgstr ""
-#: config/tc-h8300.c:1492
+#: config/tc-h8300.c:1490
msgid "#4 not valid on H8/300."
msgstr ""
-#: config/tc-h8300.c:1598 config/tc-h8300.c:1680
+#: config/tc-h8300.c:1596 config/tc-h8300.c:1678
#, c-format
msgid "branch operand has odd offset (%lx)\n"
msgstr ""
-#: config/tc-h8300.c:1718
+#: config/tc-h8300.c:1716
msgid "destination operand must be 16 bit register"
msgstr ""
-#: config/tc-h8300.c:1727
+#: config/tc-h8300.c:1725
msgid "source operand must be 8 bit register"
msgstr ""
-#: config/tc-h8300.c:1735
+#: config/tc-h8300.c:1733
msgid "destination operand must be 16bit absolute address"
msgstr ""
-#: config/tc-h8300.c:1742
+#: config/tc-h8300.c:1740
msgid "destination operand must be 8 bit register"
msgstr ""
-#: config/tc-h8300.c:1750
+#: config/tc-h8300.c:1748
msgid "source operand must be 16bit absolute address"
msgstr ""
#. This seems more sane than saying "too many operands". We'll
#. get here only if the trailing trash starts with a comma.
#. Types or values of args don't match.
-#: config/tc-h8300.c:1758 config/tc-mmix.c:473 config/tc-mmix.c:485
-#: config/tc-mmix.c:2526 config/tc-mmix.c:2550 config/tc-mmix.c:2823
-#: config/tc-or32.c:527
+#: config/tc-h8300.c:1756 config/tc-mmix.c:472 config/tc-mmix.c:484
+#: config/tc-mmix.c:2525 config/tc-mmix.c:2549 config/tc-mmix.c:2822
+#: config/tc-or32.c:528
msgid "invalid operands"
msgstr ""
-#: config/tc-h8300.c:1789
+#: config/tc-h8300.c:1787
msgid "operand/size mis-match"
msgstr ""
-#: config/tc-h8300.c:1885 config/tc-mips.c:9358 config/tc-sh64.c:2795
-#: config/tc-sh.c:2838 config/tc-z8k.c:1204
+#: config/tc-h8300.c:1883 config/tc-mips.c:9767 config/tc-sh64.c:2795
+#: config/tc-sh.c:2925 config/tc-z8k.c:1226
msgid "unknown opcode"
msgstr ""
-#: config/tc-h8300.c:1918
+#: config/tc-h8300.c:1916
msgid "invalid operand in ldm"
msgstr ""
-#: config/tc-h8300.c:1927
+#: config/tc-h8300.c:1925
msgid "invalid operand in stm"
msgstr ""
-#: config/tc-h8300.c:2093
+#: config/tc-h8300.c:2091
#, c-format
msgid "call to tc_aout_fix_to_chars \n"
msgstr ""
-#: config/tc-h8300.c:2102
+#: config/tc-h8300.c:2100 config/tc-xc16x.c:389
#, c-format
msgid "call to md_convert_frag \n"
msgstr ""
-#: config/tc-h8300.c:2146
+#: config/tc-h8300.c:2144 config/tc-xc16x.c:293
#, c-format
msgid "call tomd_estimate_size_before_relax \n"
msgstr ""
-#: config/tc-h8300.c:2197 config/tc-mcore.c:2282 config/tc-pj.c:538
-#: config/tc-sh.c:4270
+#: config/tc-h8300.c:2195 config/tc-mcore.c:2265 config/tc-pj.c:538
+#: config/tc-sh.c:4401 config/tc-xc16x.c:357
#, c-format
msgid "Cannot represent relocation type %s"
msgstr ""
@@ -4043,619 +4514,625 @@ msgstr ""
#. IGNORE is used to suppress the error message.
#. Variant of CHECK_FIELD for use in md_apply_fix and other places where
#. the current file and line number are not valid.
-#: config/tc-hppa.c:1176 config/tc-hppa.c:1190
+#: config/tc-hppa.c:1015 config/tc-hppa.c:1029
#, c-format
msgid "Field out of range [%d..%d] (%d)."
msgstr ""
#. Simple alignment checking for FIELD against ALIGN (a power of two).
#. IGNORE is used to suppress the error message.
-#: config/tc-hppa.c:1204
+#: config/tc-hppa.c:1043
#, c-format
msgid "Field not properly aligned [%d] (%d)."
msgstr ""
-#: config/tc-hppa.c:1233
+#: config/tc-hppa.c:1092
msgid "Missing .exit\n"
msgstr ""
-#: config/tc-hppa.c:1236
+#: config/tc-hppa.c:1095
msgid "Missing .procend\n"
msgstr ""
-#: config/tc-hppa.c:1422
+#: config/tc-hppa.c:1277
#, c-format
msgid "Invalid field selector. Assuming F%%."
msgstr ""
-#: config/tc-hppa.c:1455
-msgid "-R option not supported on this target."
-msgstr ""
-
-#: config/tc-hppa.c:1471 config/tc-sparc.c:811 config/tc-sparc.c:847
-#, c-format
-msgid "Internal error: can't hash `%s': %s\n"
+#: config/tc-hppa.c:1304
+msgid "Bad segment in expression."
msgstr ""
-#: config/tc-hppa.c:1479 config/tc-i860.c:238
+#: config/tc-hppa.c:1329
#, c-format
-msgid "internal error: losing opcode: `%s' \"%s\"\n"
-msgstr ""
-
-#: config/tc-hppa.c:1550 config/tc-hppa.c:7065 config/tc-hppa.c:7122
-msgid "Missing function name for .PROC (corrupted label chain)"
-msgstr ""
-
-#: config/tc-hppa.c:1553 config/tc-hppa.c:7125
-msgid "Missing function name for .PROC"
+msgid "Invalid Nullification: (%c)"
msgstr ""
-#: config/tc-hppa.c:1857
-msgid "Invalid Indexed Load Completer."
+#: config/tc-hppa.c:1438
+msgid "Cannot handle fixup"
msgstr ""
-#: config/tc-hppa.c:1862
-msgid "Invalid Indexed Load Completer Syntax."
+#: config/tc-hppa.c:1736
+#, c-format
+msgid " -Q ignored\n"
msgstr ""
-#: config/tc-hppa.c:1896
-msgid "Invalid Short Load/Store Completer."
+#: config/tc-hppa.c:1740
+#, c-format
+msgid " -c print a warning if a comment is found\n"
msgstr ""
-#: config/tc-hppa.c:1956 config/tc-hppa.c:1961
-msgid "Invalid Store Bytes Short Completer"
+#: config/tc-hppa.c:1806
+#, c-format
+msgid "no hppa_fixup entry for fixup type 0x%x"
msgstr ""
-#: config/tc-hppa.c:2272 config/tc-hppa.c:2278
-msgid "Invalid left/right combination completer"
+#: config/tc-hppa.c:1985
+msgid "Unknown relocation encountered in md_apply_fix."
msgstr ""
-#: config/tc-hppa.c:2327 config/tc-hppa.c:2334
-msgid "Invalid permutation completer"
+#: config/tc-hppa.c:2173 config/tc-hppa.c:2198
+#, c-format
+msgid "Undefined register: '%s'."
msgstr ""
-#: config/tc-hppa.c:2434
+#: config/tc-hppa.c:2232
#, c-format
-msgid "Invalid Add Condition: %s"
+msgid "Non-absolute symbol: '%s'."
msgstr ""
-#: config/tc-hppa.c:2445 config/tc-hppa.c:2455
-msgid "Invalid Add and Branch Condition"
+#: config/tc-hppa.c:2247
+#, c-format
+msgid "Undefined absolute constant: '%s'."
msgstr ""
-#: config/tc-hppa.c:2476 config/tc-hppa.c:2613
-msgid "Invalid Compare/Subtract Condition"
+#: config/tc-hppa.c:2278 config/tc-hppa.c:5697
+msgid "could not update architecture and machine"
msgstr ""
-#: config/tc-hppa.c:2516
+#: config/tc-hppa.c:2316
#, c-format
-msgid "Invalid Bit Branch Condition: %c"
+msgid "Invalid FP Compare Condition: %s"
msgstr ""
-#: config/tc-hppa.c:2601
+#: config/tc-hppa.c:2371
#, c-format
-msgid "Invalid Compare/Subtract Condition: %s"
+msgid "Invalid FTEST completer: %s"
msgstr ""
-#: config/tc-hppa.c:2628
-msgid "Invalid Compare and Branch Condition"
+#: config/tc-hppa.c:2437 config/tc-hppa.c:2474
+#, c-format
+msgid "Invalid FP Operand Format: %3s"
msgstr ""
-#: config/tc-hppa.c:2724
-msgid "Invalid Logical Instruction Condition."
+#: config/tc-hppa.c:2609
+msgid "Bad segment (should be absolute)."
msgstr ""
-#: config/tc-hppa.c:2779
-msgid "Invalid Shift/Extract/Deposit Condition."
+#: config/tc-hppa.c:2635
+#, c-format
+msgid "Invalid argument location: %s\n"
msgstr ""
-#: config/tc-hppa.c:2891
-msgid "Invalid Unit Instruction Condition."
+#: config/tc-hppa.c:2664
+#, c-format
+msgid "Invalid argument description: %d"
msgstr ""
-#: config/tc-hppa.c:3270 config/tc-hppa.c:3302 config/tc-hppa.c:3333
-#: config/tc-hppa.c:3363
-msgid "Branch to unaligned address"
+#: config/tc-hppa.c:3490
+msgid "Invalid Indexed Load Completer."
msgstr ""
-#: config/tc-hppa.c:3541
-msgid "Invalid SFU identifier"
+#: config/tc-hppa.c:3495
+msgid "Invalid Indexed Load Completer Syntax."
msgstr ""
-#: config/tc-hppa.c:3591
-msgid "Invalid COPR identifier"
+#: config/tc-hppa.c:3529
+msgid "Invalid Short Load/Store Completer."
msgstr ""
-#: config/tc-hppa.c:3720
-msgid "Invalid Floating Point Operand Format."
+#: config/tc-hppa.c:3589 config/tc-hppa.c:3594
+msgid "Invalid Store Bytes Short Completer"
msgstr ""
-#: config/tc-hppa.c:3837 config/tc-hppa.c:3857 config/tc-hppa.c:3877
-#: config/tc-hppa.c:3897 config/tc-hppa.c:3917
-msgid "Invalid register for single precision fmpyadd or fmpysub"
+#: config/tc-hppa.c:3905 config/tc-hppa.c:3911
+msgid "Invalid left/right combination completer"
msgstr ""
-#: config/tc-hppa.c:3968 config/tc-hppa.c:4928
-msgid "could not update architecture and machine"
+#: config/tc-hppa.c:3960 config/tc-hppa.c:3967
+msgid "Invalid permutation completer"
msgstr ""
-#: config/tc-hppa.c:3985
+#: config/tc-hppa.c:4067
#, c-format
-msgid "Invalid operands %s"
+msgid "Invalid Add Condition: %s"
msgstr ""
-#: config/tc-hppa.c:4103
-msgid "Cannot handle fixup"
+#: config/tc-hppa.c:4078 config/tc-hppa.c:4088
+msgid "Invalid Add and Branch Condition"
msgstr ""
-#: config/tc-hppa.c:4404
-#, c-format
-msgid " -Q ignored\n"
+#: config/tc-hppa.c:4109 config/tc-hppa.c:4246
+msgid "Invalid Compare/Subtract Condition"
msgstr ""
-#: config/tc-hppa.c:4408
+#: config/tc-hppa.c:4149
#, c-format
-msgid " -c print a warning if a comment is found\n"
+msgid "Invalid Bit Branch Condition: %c"
msgstr ""
-#: config/tc-hppa.c:4479
+#: config/tc-hppa.c:4234
#, c-format
-msgid "no hppa_fixup entry for fixup type 0x%x"
+msgid "Invalid Compare/Subtract Condition: %s"
msgstr ""
-#: config/tc-hppa.c:4650
-msgid "Unknown relocation encountered in md_apply_fix."
+#: config/tc-hppa.c:4261
+msgid "Invalid Compare and Branch Condition"
msgstr ""
-#: config/tc-hppa.c:4792 config/tc-hppa.c:4817
-#, c-format
-msgid "Undefined register: '%s'."
+#: config/tc-hppa.c:4357
+msgid "Invalid Logical Instruction Condition."
msgstr ""
-#: config/tc-hppa.c:4851
-#, c-format
-msgid "Non-absolute symbol: '%s'."
+#: config/tc-hppa.c:4412
+msgid "Invalid Shift/Extract/Deposit Condition."
msgstr ""
-#: config/tc-hppa.c:4866
-#, c-format
-msgid "Undefined absolute constant: '%s'."
+#: config/tc-hppa.c:4524
+msgid "Invalid Unit Instruction Condition."
msgstr ""
-#: config/tc-hppa.c:4967
-#, c-format
-msgid "Invalid FP Compare Condition: %s"
+#: config/tc-hppa.c:4999 config/tc-hppa.c:5031 config/tc-hppa.c:5062
+#: config/tc-hppa.c:5092
+msgid "Branch to unaligned address"
msgstr ""
-#: config/tc-hppa.c:5023
-#, c-format
-msgid "Invalid FTEST completer: %s"
+#: config/tc-hppa.c:5270
+msgid "Invalid SFU identifier"
msgstr ""
-#: config/tc-hppa.c:5090 config/tc-hppa.c:5128
-#, c-format
-msgid "Invalid FP Operand Format: %3s"
+#: config/tc-hppa.c:5320
+msgid "Invalid COPR identifier"
msgstr ""
-#: config/tc-hppa.c:5207
-msgid "Bad segment in expression."
+#: config/tc-hppa.c:5449
+msgid "Invalid Floating Point Operand Format."
msgstr ""
-#: config/tc-hppa.c:5266
-msgid "Bad segment (should be absolute)."
+#: config/tc-hppa.c:5566 config/tc-hppa.c:5586 config/tc-hppa.c:5606
+#: config/tc-hppa.c:5626 config/tc-hppa.c:5646
+msgid "Invalid register for single precision fmpyadd or fmpysub"
msgstr ""
-#: config/tc-hppa.c:5309
+#: config/tc-hppa.c:5714
#, c-format
-msgid "Invalid argument location: %s\n"
+msgid "Invalid operands %s"
msgstr ""
-#: config/tc-hppa.c:5340
-#, c-format
-msgid "Invalid argument description: %d"
+#: config/tc-hppa.c:5769 config/tc-hppa.c:6975 config/tc-hppa.c:7030
+msgid "Missing function name for .PROC (corrupted label chain)"
msgstr ""
-#: config/tc-hppa.c:5363
-#, c-format
-msgid "Invalid Nullification: (%c)"
+#: config/tc-hppa.c:5772 config/tc-hppa.c:7033
+msgid "Missing function name for .PROC"
msgstr ""
-#: config/tc-hppa.c:5960
+#: config/tc-hppa.c:5831
msgid "Argument to .BLOCK/.BLOCKZ must be between 0 and 0x3fffffff"
msgstr ""
-#: config/tc-hppa.c:6076
+#: config/tc-hppa.c:5927
#, c-format
msgid "Invalid .CALL argument: %s"
msgstr ""
-#: config/tc-hppa.c:6198
+#: config/tc-hppa.c:6061
msgid ".callinfo is not within a procedure definition"
msgstr ""
-#: config/tc-hppa.c:6218
+#: config/tc-hppa.c:6081
#, c-format
msgid "FRAME parameter must be a multiple of 8: %d\n"
msgstr ""
-#: config/tc-hppa.c:6237
+#: config/tc-hppa.c:6100
msgid "Value for ENTRY_GR must be in the range 3..18\n"
msgstr ""
-#: config/tc-hppa.c:6249
+#: config/tc-hppa.c:6112
msgid "Value for ENTRY_FR must be in the range 12..21\n"
msgstr ""
-#: config/tc-hppa.c:6259
+#: config/tc-hppa.c:6122
msgid "Value for ENTRY_SR must be 3\n"
msgstr ""
-#: config/tc-hppa.c:6315
+#: config/tc-hppa.c:6178
#, c-format
msgid "Invalid .CALLINFO argument: %s"
msgstr ""
-#: config/tc-hppa.c:6427
+#: config/tc-hppa.c:6288
msgid "The .ENTER pseudo-op is not supported"
msgstr ""
-#: config/tc-hppa.c:6443
+#: config/tc-hppa.c:6304
msgid "Misplaced .entry. Ignored."
msgstr ""
-#: config/tc-hppa.c:6447
+#: config/tc-hppa.c:6308
msgid "Missing .callinfo."
msgstr ""
-#: config/tc-hppa.c:6513
+#: config/tc-hppa.c:6372
msgid ".REG expression must be a register"
msgstr ""
-#: config/tc-hppa.c:6529
+#: config/tc-hppa.c:6388
msgid "bad or irreducible absolute expression; zero assumed"
msgstr ""
-#: config/tc-hppa.c:6540
+#: config/tc-hppa.c:6399
msgid ".REG must use a label"
msgstr ""
-#: config/tc-hppa.c:6542
+#: config/tc-hppa.c:6401
msgid ".EQU must use a label"
msgstr ""
-#: config/tc-hppa.c:6595
+#: config/tc-hppa.c:6463
+#, c-format
+msgid "Symbol '%s' could not be created."
+msgstr ""
+
+#: config/tc-hppa.c:6467
+msgid "No memory for symbol name."
+msgstr ""
+
+#: config/tc-hppa.c:6516
msgid ".EXIT must appear within a procedure"
msgstr ""
-#: config/tc-hppa.c:6599
+#: config/tc-hppa.c:6520
msgid "Missing .callinfo"
msgstr ""
-#: config/tc-hppa.c:6603
+#: config/tc-hppa.c:6524
msgid "No .ENTRY for this .EXIT"
msgstr ""
-#: config/tc-hppa.c:6630
+#: config/tc-hppa.c:6564
#, c-format
-msgid "Cannot define export symbol: %s\n"
+msgid "Using ENTRY rather than CODE in export directive for %s"
msgstr ""
-#: config/tc-hppa.c:6688
+#: config/tc-hppa.c:6681
#, c-format
-msgid "Using ENTRY rather than CODE in export directive for %s"
+msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s"
msgstr ""
-#: config/tc-hppa.c:6805
+#: config/tc-hppa.c:6705
#, c-format
-msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s"
+msgid "Cannot define export symbol: %s\n"
msgstr ""
-#: config/tc-hppa.c:6887
+#: config/tc-hppa.c:6802
msgid "Missing label name on .LABEL"
msgstr ""
-#: config/tc-hppa.c:6892
+#: config/tc-hppa.c:6807
msgid "extra .LABEL arguments ignored."
msgstr ""
-#: config/tc-hppa.c:6909
+#: config/tc-hppa.c:6823
msgid "The .LEAVE pseudo-op is not supported"
msgstr ""
-#: config/tc-hppa.c:6948
+#: config/tc-hppa.c:6861
msgid "Unrecognized .LEVEL argument\n"
msgstr ""
-#: config/tc-hppa.c:6984
+#: config/tc-hppa.c:6895
#, c-format
msgid "Cannot define static symbol: %s\n"
msgstr ""
-#: config/tc-hppa.c:7019
+#: config/tc-hppa.c:6929
msgid "Nested procedures"
msgstr ""
-#: config/tc-hppa.c:7029
+#: config/tc-hppa.c:6939
msgid "Cannot allocate unwind descriptor\n"
msgstr ""
-#: config/tc-hppa.c:7129
+#: config/tc-hppa.c:7037
msgid "misplaced .procend"
msgstr ""
-#: config/tc-hppa.c:7132
+#: config/tc-hppa.c:7040
msgid "Missing .callinfo for this procedure"
msgstr ""
-#: config/tc-hppa.c:7135
+#: config/tc-hppa.c:7043
msgid "Missing .EXIT for a .ENTRY"
msgstr ""
-#: config/tc-hppa.c:7173
+#: config/tc-hppa.c:7080
msgid "Not in a space.\n"
msgstr ""
-#: config/tc-hppa.c:7176
+#: config/tc-hppa.c:7083
msgid "Not in a subspace.\n"
msgstr ""
-#: config/tc-hppa.c:7267
+#: config/tc-hppa.c:7172
msgid "Invalid .SPACE argument"
msgstr ""
-#: config/tc-hppa.c:7314
+#: config/tc-hppa.c:7218
msgid "Can't change spaces within a procedure definition. Ignored"
msgstr ""
-#: config/tc-hppa.c:7443
+#: config/tc-hppa.c:7346
#, c-format
msgid "Undefined space: '%s' Assuming space number = 0."
msgstr ""
-#: config/tc-hppa.c:7467
+#: config/tc-hppa.c:7369
msgid "Must be in a space before changing or declaring subspaces.\n"
msgstr ""
-#: config/tc-hppa.c:7471
+#: config/tc-hppa.c:7373
msgid "Can't change subspaces within a procedure definition. Ignored"
msgstr ""
-#: config/tc-hppa.c:7507
+#: config/tc-hppa.c:7409
msgid "Parameters of an existing subspace can't be modified"
msgstr ""
-#: config/tc-hppa.c:7559
+#: config/tc-hppa.c:7461
msgid "Alignment must be a power of 2"
msgstr ""
-#: config/tc-hppa.c:7606
+#: config/tc-hppa.c:7508
msgid "FIRST not supported as a .SUBSPACE argument"
msgstr ""
-#: config/tc-hppa.c:7608
+#: config/tc-hppa.c:7510
msgid "Invalid .SUBSPACE argument"
msgstr ""
-#: config/tc-hppa.c:7797
+#: config/tc-hppa.c:7699
#, c-format
msgid "Internal error: Unable to find containing space for %s."
msgstr ""
-#: config/tc-hppa.c:7837
+#: config/tc-hppa.c:7737
#, c-format
msgid "Out of memory: could not allocate new space chain entry: %s\n"
msgstr ""
-#: config/tc-hppa.c:7926
+#: config/tc-hppa.c:7825
#, c-format
msgid "Out of memory: could not allocate new subspace chain entry: %s\n"
msgstr ""
-#: config/tc-hppa.c:8662
+#: config/tc-hppa.c:8270
+msgid "-R option not supported on this target."
+msgstr ""
+
+#: config/tc-hppa.c:8287 config/tc-sparc.c:825 config/tc-sparc.c:861
#, c-format
-msgid "Symbol '%s' could not be created."
+msgid "Internal error: can't hash `%s': %s\n"
msgstr ""
-#: config/tc-hppa.c:8666
-msgid "No memory for symbol name."
+#: config/tc-hppa.c:8296 config/tc-i860.c:236
+#, c-format
+msgid "internal error: losing opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-i386.c:721
+#: config/tc-i386.c:983
#, c-format
msgid "%s shortened to %s"
msgstr ""
-#: config/tc-i386.c:777
+#: config/tc-i386.c:1053
msgid "same type of prefix used twice"
msgstr ""
-#: config/tc-i386.c:795
+#: config/tc-i386.c:1066
msgid "64bit mode not supported on this CPU."
msgstr ""
-#: config/tc-i386.c:799
+#: config/tc-i386.c:1070
msgid "32bit mode not supported on this CPU."
msgstr ""
-#: config/tc-i386.c:832
+#: config/tc-i386.c:1101
msgid "bad argument to syntax directive."
msgstr ""
-#: config/tc-i386.c:884
+#: config/tc-i386.c:1161
#, c-format
msgid "no such architecture: `%s'"
msgstr ""
-#: config/tc-i386.c:889
+#: config/tc-i386.c:1166
msgid "missing cpu architecture"
msgstr ""
-#: config/tc-i386.c:903
+#: config/tc-i386.c:1180
#, c-format
msgid "no such architecture modifier: `%s'"
msgstr ""
-#: config/tc-i386.c:919 config/tc-i386.c:5342
+#: config/tc-i386.c:1196 config/tc-i386.c:6133 config/tc-i386.c:6167
msgid "Unknown architecture"
msgstr ""
-#: config/tc-i386.c:1247
+#: config/tc-i386.c:1528
#, c-format
msgid "unknown relocation (%u)"
msgstr ""
-#: config/tc-i386.c:1249
+#: config/tc-i386.c:1530
#, c-format
msgid "%u-byte relocation cannot be applied to %u-byte field"
msgstr ""
-#: config/tc-i386.c:1253
+#: config/tc-i386.c:1534
msgid "non-pc-relative relocation for pc-relative field"
msgstr ""
-#: config/tc-i386.c:1258
+#: config/tc-i386.c:1539
msgid "relocated field and relocation type differ in signedness"
msgstr ""
-#: config/tc-i386.c:1267
+#: config/tc-i386.c:1548
msgid "there are no unsigned pc-relative relocations"
msgstr ""
-#: config/tc-i386.c:1275
+#: config/tc-i386.c:1556
#, c-format
msgid "cannot do %u byte pc-relative relocation"
msgstr ""
-#: config/tc-i386.c:1292
+#: config/tc-i386.c:1573
#, c-format
msgid "cannot do %s %u byte relocation"
msgstr ""
-#: config/tc-i386.c:1496 config/tc-i386.c:2527
+#: config/tc-i386.c:1790 config/tc-i386.c:2963
#, c-format
msgid "ambiguous operand size for `%s'"
msgstr ""
-#: config/tc-i386.c:1544
+#: config/tc-i386.c:1838
#, c-format
-msgid "can't use register '%%%s' as operand %d in '%s'."
+msgid "can't use register '%s%s' as operand %d in '%s'."
msgstr ""
#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc.
-#: config/tc-i386.c:1573
+#: config/tc-i386.c:1870
#, c-format
msgid "translating to `%sp'"
msgstr ""
-#: config/tc-i386.c:1618
+#: config/tc-i386.c:1915
#, c-format
-msgid "can't encode register '%%%s' in an instruction requiring REX prefix."
+msgid "can't encode register '%s%s' in an instruction requiring REX prefix."
msgstr ""
-#: config/tc-i386.c:1659 config/tc-i386.c:1767
+#: config/tc-i386.c:1955 config/tc-i386.c:2063
#, c-format
msgid "no such instruction: `%s'"
msgstr ""
-#: config/tc-i386.c:1670 config/tc-i386.c:1799
+#: config/tc-i386.c:1966 config/tc-i386.c:2095
#, c-format
msgid "invalid character %s in mnemonic"
msgstr ""
-#: config/tc-i386.c:1677
+#: config/tc-i386.c:1973
msgid "expecting prefix; got nothing"
msgstr ""
-#: config/tc-i386.c:1679
+#: config/tc-i386.c:1975
msgid "expecting mnemonic; got nothing"
msgstr ""
-#: config/tc-i386.c:1695 config/tc-i386.c:1818
+#: config/tc-i386.c:1991 config/tc-i386.c:2114
#, c-format
msgid "`%s' is only supported in 64-bit mode"
msgstr ""
-#: config/tc-i386.c:1696 config/tc-i386.c:1817
+#: config/tc-i386.c:1992 config/tc-i386.c:2113
#, c-format
msgid "`%s' is not supported in 64-bit mode"
msgstr ""
-#: config/tc-i386.c:1707
+#: config/tc-i386.c:2003
#, c-format
msgid "redundant %s prefix"
msgstr ""
-#: config/tc-i386.c:1824
+#: config/tc-i386.c:2120
#, c-format
msgid "`%s' is not supported on `%s%s'"
msgstr ""
-#: config/tc-i386.c:1831
+#: config/tc-i386.c:2127
msgid "use .code16 to ensure correct addressing mode"
msgstr ""
-#: config/tc-i386.c:1844
+#: config/tc-i386.c:2140
#, c-format
msgid "expecting string instruction after `%s'"
msgstr ""
-#: config/tc-i386.c:1878
+#: config/tc-i386.c:2172
#, c-format
msgid "invalid character %s before operand %d"
msgstr ""
-#: config/tc-i386.c:1892
+#: config/tc-i386.c:2186
#, c-format
msgid "unbalanced parenthesis in operand %d."
msgstr ""
-#: config/tc-i386.c:1895
+#: config/tc-i386.c:2189
#, c-format
msgid "unbalanced brackets in operand %d."
msgstr ""
-#: config/tc-i386.c:1904
+#: config/tc-i386.c:2198
#, c-format
msgid "invalid character %s in operand %d"
msgstr ""
-#: config/tc-i386.c:1931
+#: config/tc-i386.c:2225
#, c-format
msgid "spurious operands; (%d operands/instruction max)"
msgstr ""
-#: config/tc-i386.c:1954
+#: config/tc-i386.c:2248
msgid "expecting operand after ','; got nothing"
msgstr ""
-#: config/tc-i386.c:1959
+#: config/tc-i386.c:2253
msgid "expecting operand before ','; got nothing"
msgstr ""
#. We found no match.
-#: config/tc-i386.c:2336
+#: config/tc-i386.c:2741
#, c-format
msgid "suffix or operands invalid for `%s'"
msgstr ""
-#: config/tc-i386.c:2347
+#: config/tc-i386.c:2752
#, 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:2355
+#: config/tc-i386.c:2760
#, c-format
msgid "stand-alone `%s' prefix"
msgstr ""
-#: config/tc-i386.c:2384 config/tc-i386.c:2399
+#: config/tc-i386.c:2794 config/tc-i386.c:2809
#, c-format
msgid "`%s' operand %d must use `%%es' segment"
msgstr ""
-#: config/tc-i386.c:2509
+#. We have to know the operand size for crc32.
+#: config/tc-i386.c:2862
+#, c-format
+msgid "ambiguous memory operand size for `%s`"
+msgstr ""
+
+#: config/tc-i386.c:2944
msgid ""
"no instruction mnemonic suffix given and no register operands; can't size "
"instruction"
@@ -4663,385 +5140,444 @@ msgstr ""
#. Prohibit these changes in the 64bit mode, since the
#. lowering is more complicated.
-#: config/tc-i386.c:2610 config/tc-i386.c:2669 config/tc-i386.c:2686
-#: config/tc-i386.c:2718 config/tc-i386.c:2751
+#: config/tc-i386.c:3068 config/tc-i386.c:3131 config/tc-i386.c:3150
+#: config/tc-i386.c:3183 config/tc-i386.c:3217
#, c-format
-msgid "Incorrect register `%%%s' used with `%c' suffix"
+msgid "Incorrect register `%s%s' used with `%c' suffix"
msgstr ""
-#: config/tc-i386.c:2618 config/tc-i386.c:2676 config/tc-i386.c:2758
+#: config/tc-i386.c:3076 config/tc-i386.c:3138 config/tc-i386.c:3224
#, c-format
-msgid "using `%%%s' instead of `%%%s' due to `%c' suffix"
+msgid "using `%s%s' instead of `%s%s' due to `%c' suffix"
msgstr ""
-#: config/tc-i386.c:2633 config/tc-i386.c:2654 config/tc-i386.c:2705
-#: config/tc-i386.c:2736
+#: config/tc-i386.c:3093 config/tc-i386.c:3115 config/tc-i386.c:3169
+#: config/tc-i386.c:3201
#, c-format
-msgid "`%%%s' not allowed with `%s%c'"
+msgid "`%s%s' not allowed with `%s%c'"
msgstr ""
-#: config/tc-i386.c:2799
+#: config/tc-i386.c:3267
msgid "no instruction mnemonic suffix given; can't determine immediate size"
msgstr ""
-#: config/tc-i386.c:2832
+#: config/tc-i386.c:3301
#, c-format
msgid ""
"no instruction mnemonic suffix given; can't determine immediate size %x %c"
msgstr ""
-#. Reversed arguments on faddp, fsubp, etc.
-#: config/tc-i386.c:2881
+#: config/tc-i386.c:3339
#, c-format
-msgid "translating to `%s %%%s,%%%s'"
+msgid "the last operand of `%s' must be `%sxmm0'"
msgstr ""
-#. Extraneous `l' suffix on fp insn.
-#: config/tc-i386.c:2888
+#: config/tc-i386.c:3342
#, c-format
-msgid "translating to `%s %%%s'"
+msgid "the first operand of `%s' must be `%sxmm0'"
msgstr ""
-#: config/tc-i386.c:2906
+#: config/tc-i386.c:3379
#, c-format
msgid "you can't `pop %%cs'"
msgstr ""
-#: config/tc-i386.c:2927
+#. Reversed arguments on faddp, fsubp, etc.
+#: config/tc-i386.c:3401
+#, c-format
+msgid "translating to `%s %s%s,%s%s'"
+msgstr ""
+
+#. Extraneous `l' suffix on fp insn.
+#: config/tc-i386.c:3408
+#, c-format
+msgid "translating to `%s %s%s'"
+msgstr ""
+
+#: config/tc-i386.c:3436
#, c-format
msgid "segment override on `%s' is ineffectual"
msgstr ""
-#: config/tc-i386.c:3236 config/tc-i386.c:3330 config/tc-i386.c:3375
+#: config/tc-i386.c:3777 config/tc-i386.c:3871 config/tc-i386.c:3916
msgid "skipping prefixes on this instruction"
msgstr ""
-#: config/tc-i386.c:3395
+#: config/tc-i386.c:3936
msgid "16-bit jump out of range"
msgstr ""
-#: config/tc-i386.c:3404
+#: config/tc-i386.c:3945
#, c-format
msgid "can't handle non absolute segment in `%s'"
msgstr ""
-#: config/tc-i386.c:3897
+#: config/tc-i386.c:4501
#, c-format
msgid "@%s reloc is not supported with %d-bit output format"
msgstr ""
-#: config/tc-i386.c:3986
-msgid "only 1 or 2 immediate operands are allowed"
+#: config/tc-i386.c:4585
+#, c-format
+msgid "at most %d immediate operands are allowed"
msgstr ""
-#: config/tc-i386.c:4007 config/tc-i386.c:4218
+#: config/tc-i386.c:4607 config/tc-i386.c:4824
#, c-format
msgid "junk `%s' after expression"
msgstr ""
#. Missing or bad expr becomes absolute 0.
-#: config/tc-i386.c:4016
+#: config/tc-i386.c:4616
#, c-format
msgid "missing or invalid immediate expression `%s' taken as 0"
msgstr ""
-#: config/tc-i386.c:4041 config/tc-i386.c:4277
+#: config/tc-i386.c:4642 config/tc-i386.c:4883
#, c-format
msgid "unimplemented segment %s in operand"
msgstr ""
-#: config/tc-i386.c:4088
+#: config/tc-i386.c:4648
+#, c-format
+msgid "illegal immediate register operand %s"
+msgstr ""
+
+#: config/tc-i386.c:4691
#, c-format
msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'"
msgstr ""
-#: config/tc-i386.c:4097
+#: config/tc-i386.c:4700
#, c-format
msgid "scale factor of %d without an index register"
msgstr ""
-#: config/tc-i386.c:4236
+#: config/tc-i386.c:4723
+#, c-format
+msgid "at most %d displacement operands are allowed"
+msgstr ""
+
+#: config/tc-i386.c:4842
#, c-format
msgid "bad expression used with @%s"
msgstr ""
-#: config/tc-i386.c:4386
+#: config/tc-i386.c:4990
#, c-format
msgid "`%s' is not a valid base/index expression"
msgstr ""
-#: config/tc-i386.c:4390
+#: config/tc-i386.c:4994
#, c-format
msgid "`%s' is not a valid %s bit base/index expression"
msgstr ""
-#: config/tc-i386.c:4464
+#: config/tc-i386.c:5066
#, c-format
msgid "bad memory operand `%s'"
msgstr ""
-#: config/tc-i386.c:4479
+#: config/tc-i386.c:5081
#, c-format
msgid "junk `%s' after register"
msgstr ""
-#: config/tc-i386.c:4488 config/tc-i386.c:4603 config/tc-i386.c:4641
+#: config/tc-i386.c:5090 config/tc-i386.c:5206 config/tc-i386.c:5247
#, c-format
msgid "bad register name `%s'"
msgstr ""
-#: config/tc-i386.c:4496
+#: config/tc-i386.c:5098
msgid "immediate operand illegal with absolute jump"
msgstr ""
-#: config/tc-i386.c:4518
+#: config/tc-i386.c:5120
#, c-format
msgid "too many memory references for `%s'"
msgstr ""
-#: config/tc-i386.c:4596
+#: config/tc-i386.c:5198
#, c-format
msgid "expecting `,' or `)' after index register in `%s'"
msgstr ""
-#: config/tc-i386.c:4620
+#: config/tc-i386.c:5223
#, c-format
msgid "expecting `)' after scale factor in `%s'"
msgstr ""
-#: config/tc-i386.c:4627
+#: config/tc-i386.c:5231
#, c-format
msgid "expecting index register or scale factor after `,'; got '%c'"
msgstr ""
-#: config/tc-i386.c:4634
+#: config/tc-i386.c:5239
#, c-format
msgid "expecting `,' or `)' after base register in `%s'"
msgstr ""
#. It's not a memory operand; argh!
-#: config/tc-i386.c:4675
+#: config/tc-i386.c:5281
#, c-format
msgid "invalid char %s beginning operand %d `%s'"
msgstr ""
-#: config/tc-i386.c:4850
+#: config/tc-i386.c:5457
msgid "long jump required"
msgstr ""
-#: config/tc-i386.c:5127
+#: config/tc-i386.c:5512
+msgid "jump target out of range"
+msgstr ""
+
+#: config/tc-i386.c:5757
msgid "Bad call to md_atof ()"
msgstr ""
-#: config/tc-i386.c:5294
+#: config/tc-i386.c:6012
msgid "No compiled in support for x86_64"
msgstr ""
-#: config/tc-i386.c:5315
+#: config/tc-i386.c:6041 config/tc-i386.c:6057
+#, c-format
+msgid "Invalid -march= option: `%s'"
+msgstr ""
+
+#: config/tc-i386.c:6062 config/tc-i386.c:6074
+#, c-format
+msgid "Invalid -mtune= option: `%s'"
+msgstr ""
+
+#: config/tc-i386.c:6088
#, c-format
msgid ""
" -Q ignored\n"
" -V print assembler version number\n"
" -k ignored\n"
-" -n Do not optimize code alignment\n"
-" -q quieten some warnings\n"
-" -s ignored\n"
msgstr ""
-#: config/tc-i386.c:5323
+#: config/tc-i386.c:6093
#, c-format
msgid ""
" -n Do not optimize code alignment\n"
" -q quieten some warnings\n"
msgstr ""
-#: config/tc-i386.c:5425 config/tc-s390.c:1861
+#: config/tc-i386.c:6097
+#, c-format
+msgid " -s ignored\n"
+msgstr ""
+
+#: config/tc-i386.c:6101
+#, c-format
+msgid " --32/--64 generate 32bit/64bit code\n"
+msgstr ""
+
+#: config/tc-i386.c:6105
+#, c-format
+msgid " --divide do not treat `/' as a comment character\n"
+msgstr ""
+
+#: config/tc-i386.c:6108
+#, c-format
+msgid " --divide ignored\n"
+msgstr ""
+
+#: config/tc-i386.c:6111
+#, c-format
+msgid ""
+" -march=CPU/-mtune=CPU generate code/optimize for CPU, where CPU is one "
+"of:\n"
+" i386, i486, pentium, pentiumpro, pentium4, "
+"nocona,\n"
+" core, core2, k6, athlon, k8, generic32, "
+"generic64\n"
+msgstr ""
+
+#: config/tc-i386.c:6251 config/tc-s390.c:1862
msgid "GOT already in symbol table"
msgstr ""
-#: config/tc-i386.c:5568
+#: config/tc-i386.c:6400
#, c-format
msgid "can not do %d byte pc-relative relocation"
msgstr ""
-#: config/tc-i386.c:5586
+#: config/tc-i386.c:6418
#, c-format
msgid "can not do %d byte relocation"
msgstr ""
-#: config/tc-i386.c:5657 config/tc-s390.c:2307
+#: config/tc-i386.c:6497 config/tc-s390.c:2308
#, c-format
msgid "cannot represent relocation type %s"
msgstr ""
-#: config/tc-i386.c:5912
+#: config/tc-i386.c:6749
#, c-format
msgid "invalid operand for '%s' ('%s' unexpected)"
msgstr ""
-#: config/tc-i386.c:5924
+#: config/tc-i386.c:6761
#, c-format
msgid "too many memory references for '%s'"
msgstr ""
#. See the comments in intel_bracket_expr.
-#: config/tc-i386.c:5935
+#: config/tc-i386.c:6772
#, c-format
msgid "Treating `%s' as memory reference"
msgstr ""
-#: config/tc-i386.c:6247
+#: config/tc-i386.c:7088
#, c-format
msgid "Unknown operand modifier `%s'"
msgstr ""
-#: config/tc-i386.c:6262
+#: config/tc-i386.c:7103
msgid "Conflicting operand modifiers"
msgstr ""
-#: config/tc-i386.c:6311
+#: config/tc-i386.c:7152
msgid "Invalid operand to `OFFSET'"
msgstr ""
-#: config/tc-i386.c:6384
+#: config/tc-i386.c:7225
#, c-format
msgid "`[%.*s]' taken to mean just `%.*s'"
msgstr ""
-#: config/tc-i386.c:6474
+#: config/tc-i386.c:7316
#, c-format
msgid "`%s' is not a valid segment register"
msgstr ""
-#: config/tc-i386.c:6478
+#: config/tc-i386.c:7321
msgid "Extra segment override ignored"
msgstr ""
-#: config/tc-i386.c:6512 config/tc-i386.c:6681
+#: config/tc-i386.c:7355 config/tc-i386.c:7517
msgid "Register scaling only allowed in memory operands"
msgstr ""
-#: config/tc-i386.c:6534 config/tc-i386.c:6658
+#: config/tc-i386.c:7377 config/tc-i386.c:7493
#, c-format
msgid "Syntax error: Expecting a constant, got `%s'"
msgstr ""
-#: config/tc-i386.c:6562
+#: config/tc-i386.c:7405
msgid "Too many register references in memory operand"
msgstr ""
-#: config/tc-i386.c:6573
-msgid "Using register names in OFFSET expressions is deprecated"
-msgstr ""
-
-#: config/tc-i386.c:6586
+#: config/tc-i386.c:7421
msgid "Invalid use of register"
msgstr ""
-#: config/tc-i386.c:6731
+#: config/tc-i386.c:7570
#, c-format
msgid "Unrecognized token '%s'"
msgstr ""
-#: config/tc-i386.c:6748
+#: config/tc-i386.c:7586
#, c-format
msgid "Unexpected token `%s'"
msgstr ""
-#: config/tc-i386.c:6910
+#: config/tc-i386.c:7744
msgid "`:' expected"
msgstr ""
-#: config/tc-i386.c:6935
+#: config/tc-i386.c:7769
#, c-format
msgid "Unrecognized token `%s'"
msgstr ""
-#: config/tc-i386.c:7070
+#: config/tc-i386.c:7904
msgid "Bad .section directive: want a,l,w,x,M,S,G,T in string"
msgstr ""
-#: config/tc-i386.c:7073
+#: config/tc-i386.c:7907
msgid "Bad .section directive: want a,w,x,M,S,G,T in string"
msgstr ""
-#: config/tc-i386.c:7092
+#: config/tc-i386.c:7926
msgid ".largecomm supported only in 64bit mode, producing .comm"
msgstr ""
-#: config/tc-i860.c:124
+#: config/tc-i860.c:122
msgid "Directive .dual available only with -mintel-syntax option"
msgstr ""
-#: config/tc-i860.c:134
+#: config/tc-i860.c:132
msgid "Directive .enddual available only with -mintel-syntax option"
msgstr ""
-#: config/tc-i860.c:147
+#: config/tc-i860.c:145
msgid "Directive .atmp available only with -mintel-syntax option"
msgstr ""
-#: config/tc-i860.c:169 config/tc-i860.c:173
+#: config/tc-i860.c:167 config/tc-i860.c:171
msgid "Unknown temporary pseudo register"
msgstr ""
-#: config/tc-i860.c:229 config/tc-mips.c:1412
+#: config/tc-i860.c:227 config/tc-mips.c:1761
#, c-format
msgid "internal error: can't hash `%s': %s\n"
msgstr ""
-#: config/tc-i860.c:249
+#: config/tc-i860.c:247
msgid "Defective assembler. No assembly attempted."
msgstr ""
-#: config/tc-i860.c:395 config/tc-i860.c:940 config/tc-m68k.c:3443
-#: config/tc-m68k.c:3475 config/tc-sparc.c:2657
+#: config/tc-i860.c:393 config/tc-i860.c:938 config/tc-m68k.c:3667
+#: config/tc-m68k.c:3699 config/tc-sparc.c:2711
msgid "failed sanity check."
msgstr ""
-#: config/tc-i860.c:402
+#: config/tc-i860.c:400
#, c-format
msgid "Expanded opcode after delayed branch: `%s'"
msgstr ""
-#: config/tc-i860.c:406
+#: config/tc-i860.c:404
#, c-format
msgid "Expanded opcode in dual mode: `%s'"
msgstr ""
-#: config/tc-i860.c:410
+#: config/tc-i860.c:408
#, c-format
msgid "An instruction was expanded (%s)"
msgstr ""
-#: config/tc-i860.c:676
+#: config/tc-i860.c:674
msgid "Pipelined instruction: fsrc1 = fdest"
msgstr ""
-#: config/tc-i860.c:879 config/tc-i860.c:886 config/tc-i860.c:893
+#: config/tc-i860.c:877 config/tc-i860.c:884 config/tc-i860.c:891
msgid "Assembler does not yet support PIC"
msgstr ""
-#: config/tc-i860.c:957
+#: config/tc-i860.c:955
#, c-format
msgid "Illegal operands for %s"
msgstr ""
-#: config/tc-i860.c:974
+#: config/tc-i860.c:972
#, c-format
msgid "'d.%s' must be 8-byte aligned"
msgstr ""
-#: config/tc-i860.c:982
+#: config/tc-i860.c:980
#, c-format
msgid "Prefix 'd.' invalid for instruction `%s'"
msgstr ""
-#: config/tc-i860.c:1088
+#: config/tc-i860.c:1086
msgid "i860_estimate_size_before_relax\n"
msgstr ""
-#: config/tc-i860.c:1187
+#: config/tc-i860.c:1185
#, c-format
msgid ""
" -EL\t\t\t generate code for little endian mode (default)\n"
@@ -5052,42 +5588,42 @@ msgid ""
msgstr ""
#. SVR4 compatibility flags.
-#: config/tc-i860.c:1195
+#: config/tc-i860.c:1193
#, c-format
msgid ""
" -V\t\t\t print assembler version number\n"
" -Qy, -Qn\t\t ignored\n"
msgstr ""
-#: config/tc-i860.c:1258
+#: config/tc-i860.c:1256
msgid "This immediate requires 0 MOD 2 alignment"
msgstr ""
-#: config/tc-i860.c:1261
+#: config/tc-i860.c:1259
msgid "This immediate requires 0 MOD 4 alignment"
msgstr ""
-#: config/tc-i860.c:1264
+#: config/tc-i860.c:1262
msgid "This immediate requires 0 MOD 8 alignment"
msgstr ""
-#: config/tc-i860.c:1267
+#: config/tc-i860.c:1265
msgid "This immediate requires 0 MOD 16 alignment"
msgstr ""
-#: config/tc-i860.c:1362
+#: config/tc-i860.c:1360
msgid "5-bit immediate too large"
msgstr ""
-#: config/tc-i860.c:1365
+#: config/tc-i860.c:1363
msgid "5-bit field must be absolute"
msgstr ""
-#: config/tc-i860.c:1410 config/tc-i860.c:1433
+#: config/tc-i860.c:1408 config/tc-i860.c:1431
msgid "A branch offset requires 0 MOD 4 alignment"
msgstr ""
-#: config/tc-i860.c:1454
+#: config/tc-i860.c:1452
#, c-format
msgid "Unrecognized fix-up (0x%08lx)"
msgstr ""
@@ -5096,95 +5632,87 @@ msgstr ""
msgid "i860_convert_frag\n"
msgstr ""
-#: config/tc-i960.c:488
+#: config/tc-i960.c:486
#, c-format
msgid "Hashing returned \"%s\"."
msgstr ""
-#: config/tc-i960.c:584 config/tc-i960.c:1114
+#: config/tc-i960.c:582 config/tc-i960.c:1112
msgid "expression syntax error"
msgstr ""
-#: config/tc-i960.c:620
+#: config/tc-i960.c:618
msgid "attempt to branch into different segment"
msgstr ""
-#: config/tc-i960.c:624
+#: config/tc-i960.c:622
#, c-format
msgid "target of %s instruction must be a label"
msgstr ""
-#: config/tc-i960.c:734
+#: config/tc-i960.c:732
msgid "unaligned register"
msgstr ""
-#: config/tc-i960.c:756
+#: config/tc-i960.c:754
msgid "no such sfr in this architecture"
msgstr ""
-#: config/tc-i960.c:794
+#: config/tc-i960.c:792
msgid "illegal literal"
msgstr ""
-#: config/tc-i960.c:837
-msgid "unmatched '['"
-msgstr ""
-
-#: config/tc-i960.c:844
-msgid "garbage after index spec ignored"
-msgstr ""
-
-#: config/tc-i960.c:944
+#: config/tc-i960.c:942
msgid "invalid index register"
msgstr ""
-#: config/tc-i960.c:967
+#: config/tc-i960.c:965
msgid "invalid scale factor"
msgstr ""
-#: config/tc-i960.c:1191
+#: config/tc-i960.c:1189
msgid "architecture of opcode conflicts with that of earlier instruction(s)"
msgstr ""
-#: config/tc-i960.c:1425 config/tc-xtensa.c:11295
+#: config/tc-i960.c:1423 config/tc-xtensa.c:11325
msgid "too many operands"
msgstr ""
#. We never moved: there was no opcode either!
-#: config/tc-i960.c:1473
+#: config/tc-i960.c:1471
msgid "missing opcode"
msgstr ""
-#: config/tc-i960.c:1613
+#: config/tc-i960.c:1611
msgid "branch prediction invalid on this opcode"
msgstr ""
-#: config/tc-i960.c:1651
+#: config/tc-i960.c:1649
#, c-format
msgid "invalid opcode, \"%s\"."
msgstr ""
-#: config/tc-i960.c:1653
+#: config/tc-i960.c:1651
#, c-format
msgid "improper number of operands. expecting %d, got %d"
msgstr ""
-#: config/tc-i960.c:1810
+#: config/tc-i960.c:1808
#, c-format
msgid "Fixup of %ld too large for field width of %d"
msgstr ""
-#: config/tc-i960.c:1920
+#: config/tc-i960.c:1918
#, c-format
msgid "invalid architecture %s"
msgstr ""
-#: config/tc-i960.c:1940
+#: config/tc-i960.c:1938
#, c-format
msgid "I960 options:\n"
msgstr ""
-#: config/tc-i960.c:1943
+#: config/tc-i960.c:1941
#, c-format
msgid ""
"\n"
@@ -5196,153 +5724,153 @@ msgid ""
"\t\t\tlong displacements\n"
msgstr ""
-#: config/tc-i960.c:2207
+#: config/tc-i960.c:2205
msgid "should have 1 or 2 operands"
msgstr ""
-#: config/tc-i960.c:2215 config/tc-i960.c:2230
+#: config/tc-i960.c:2213 config/tc-i960.c:2228
#, c-format
msgid "Redefining leafproc %s"
msgstr ""
-#: config/tc-i960.c:2260
+#: config/tc-i960.c:2258
msgid "should have two operands"
msgstr ""
-#: config/tc-i960.c:2270
+#: config/tc-i960.c:2268
msgid "'entry_num' must be absolute number in [0,31]"
msgstr ""
-#: config/tc-i960.c:2278
+#: config/tc-i960.c:2276
#, c-format
msgid "Redefining entrynum for sysproc %s"
msgstr ""
#. Should not happen: see block comment above.
-#: config/tc-i960.c:2378
+#: config/tc-i960.c:2376
#, c-format
msgid "Trying to 'bal' to %s"
msgstr ""
-#: config/tc-i960.c:2388
+#: config/tc-i960.c:2386
msgid "Looks like a proc, but can't tell what kind.\n"
msgstr ""
-#: config/tc-i960.c:2407
+#: config/tc-i960.c:2405
msgid "big endian mode is not supported"
msgstr ""
-#: config/tc-i960.c:2409
+#: config/tc-i960.c:2407
#, c-format
msgid "ignoring unrecognized .endian type `%s'"
msgstr ""
-#: config/tc-i960.c:2454
+#: config/tc-i960.c:2452
msgid "can't use COBR format with external label"
msgstr ""
-#: config/tc-i960.c:2629
+#: config/tc-i960.c:2627
msgid "option --link-relax is only supported in b.out format"
msgstr ""
-#: config/tc-i960.c:2656
+#: config/tc-i960.c:2654
#, c-format
msgid "No 'bal' entry point for leafproc %s"
msgstr ""
-#: config/tc-ia64.c:1008
+#: config/tc-ia64.c:1030
msgid "Bad .section directive: want a,o,s,w,x,M,S,G,T in string"
msgstr ""
-#: config/tc-ia64.c:1151
+#: config/tc-ia64.c:1173
msgid "Unwind directive not followed by an instruction."
msgstr ""
-#: config/tc-ia64.c:5114
+#: config/tc-ia64.c:5123
msgid "Register name expected"
msgstr ""
-#: config/tc-ia64.c:5119 config/tc-ia64.c:5435
+#: config/tc-ia64.c:5128 config/tc-ia64.c:5444
msgid "Comma expected"
msgstr ""
-#: config/tc-ia64.c:5127
+#: config/tc-ia64.c:5136
msgid "Register value annotation ignored"
msgstr ""
-#: config/tc-ia64.c:5168
+#: config/tc-ia64.c:5177
msgid "Directive invalid within a bundle"
msgstr ""
-#: config/tc-ia64.c:5261
+#: config/tc-ia64.c:5270
msgid "Missing predicate relation type"
msgstr ""
-#: config/tc-ia64.c:5267
+#: config/tc-ia64.c:5276
msgid "Unrecognized predicate relation type"
msgstr ""
-#: config/tc-ia64.c:5314
+#: config/tc-ia64.c:5323
msgid "Bad register range"
msgstr ""
-#: config/tc-ia64.c:5323
+#: config/tc-ia64.c:5332
msgid "Predicate register expected"
msgstr ""
-#: config/tc-ia64.c:5328
+#: config/tc-ia64.c:5337
msgid "Duplicate predicate register ignored"
msgstr ""
-#: config/tc-ia64.c:5346
+#: config/tc-ia64.c:5355
msgid "Predicate source and target required"
msgstr ""
-#: config/tc-ia64.c:5348 config/tc-ia64.c:5360
+#: config/tc-ia64.c:5357 config/tc-ia64.c:5369
msgid "Use of p0 is not valid in this context"
msgstr ""
-#: config/tc-ia64.c:5355
+#: config/tc-ia64.c:5364
msgid "At least two PR arguments expected"
msgstr ""
-#: config/tc-ia64.c:5369
+#: config/tc-ia64.c:5378
msgid "At least one PR argument expected"
msgstr ""
-#: config/tc-ia64.c:5405
+#: config/tc-ia64.c:5414
#, c-format
msgid "Inserting \"%s\" into entry hint table failed: %s"
msgstr ""
#. FIXME -- need 62-bit relocation type
-#: config/tc-ia64.c:5881
+#: config/tc-ia64.c:5890
msgid "62-bit relocation not yet implemented"
msgstr ""
#. 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:5954
+#: config/tc-ia64.c:5974
msgid "lower 16 bits of mask ignored"
msgstr ""
-#: config/tc-ia64.c:6569
+#: config/tc-ia64.c:6589
msgid "Value truncated to 62 bits"
msgstr ""
#. Give an error if a frag containing code is not aligned to a 16 byte
#. boundary.
-#: config/tc-ia64.c:6707 config/tc-ia64.h:171
+#: config/tc-ia64.c:6727 config/tc-ia64.h:171
msgid "instruction address is not a multiple of 16"
msgstr ""
-#: config/tc-ia64.c:7249
+#: config/tc-ia64.c:7277
#, c-format
msgid "Unrecognized option '-x%s'"
msgstr ""
-#: config/tc-ia64.c:7277
+#: config/tc-ia64.c:7305
msgid ""
"IA-64 options:\n"
" --mconstant-gp\t mark output file as using the constant-GP model\n"
@@ -5368,370 +5896,370 @@ msgid ""
"\t\t\t dependency violation checking\n"
msgstr ""
-#: config/tc-ia64.c:7307
+#: config/tc-ia64.c:7335
msgid "--gstabs is not supported for ia64"
msgstr ""
-#: config/tc-ia64.c:7641 config/tc-mips.c:1401
+#: config/tc-ia64.c:7640 config/tc-mips.c:1750
msgid "Could not set architecture and machine"
msgstr ""
-#: config/tc-ia64.c:7767
+#: config/tc-ia64.c:7766
msgid "Explicit stops are ignored in auto mode"
msgstr ""
-#: config/tc-ia64.c:7789
+#: config/tc-ia64.c:7788
msgid "Found '{' after explicit switch to automatic mode"
msgstr ""
-#: config/tc-ia64.c:8392
+#: config/tc-ia64.c:8393
#, c-format
msgid "Unhandled dependency %s for %s (%s), note %d"
msgstr ""
-#: config/tc-ia64.c:9667
+#: config/tc-ia64.c:9669
#, c-format
msgid "Unrecognized dependency specifier %d\n"
msgstr ""
-#: config/tc-ia64.c:10561
+#: config/tc-ia64.c:10566
msgid "Only the first path encountering the conflict is reported"
msgstr ""
-#: config/tc-ia64.c:10564
+#: config/tc-ia64.c:10569
msgid "This is the location of the conflicting usage"
msgstr ""
-#: config/tc-ia64.c:11788
+#: config/tc-ia64.c:11793
msgid "Can't add stop bit to mark end of instruction group"
msgstr ""
-#: config/tc-ia64.c:11888 read.c:1440 read.c:2206 read.c:2846 read.c:3173
-#: read.c:3204
+#: config/tc-ia64.c:11893 config/tc-score.c:6398 read.c:1442 read.c:2413
+#: read.c:3042 read.c:3375 read.c:3419
msgid "expected symbol name"
msgstr ""
-#: config/tc-ia64.c:11898 read.c:2216 read.c:2856 read.c:3188 stabs.c:466
+#: config/tc-ia64.c:11903 read.c:2423 read.c:3052 read.c:3403 stabs.c:466
#, c-format
msgid "expected comma after \"%s\""
msgstr ""
-#: config/tc-ia64.c:11940
+#: config/tc-ia64.c:11945
#, c-format
msgid "`%s' is already the alias of %s `%s'"
msgstr ""
-#: config/tc-ia64.c:11950
+#: config/tc-ia64.c:11955
#, c-format
msgid "%s `%s' already has an alias `%s'"
msgstr ""
-#: config/tc-ia64.c:11961
+#: config/tc-ia64.c:11966
#, c-format
msgid "inserting \"%s\" into %s alias hash table failed: %s"
msgstr ""
-#: config/tc-ia64.c:11969
+#: config/tc-ia64.c:11974
#, c-format
msgid "inserting \"%s\" into %s name hash table failed: %s"
msgstr ""
-#: config/tc-ia64.c:11988
+#: config/tc-ia64.c:11993
#, c-format
msgid "symbol `%s' aliased to `%s' is not used"
msgstr ""
-#: config/tc-ia64.c:12010
+#: config/tc-ia64.c:12015
#, c-format
msgid "section `%s' aliased to `%s' is not used"
msgstr ""
-#: config/tc-ip2k.c:158
+#: config/tc-ip2k.c:157
#, c-format
msgid "IP2K specific command line options:\n"
msgstr ""
-#: config/tc-ip2k.c:159
+#: config/tc-ip2k.c:158
#, c-format
msgid " -mip2022 restrict to IP2022 insns \n"
msgstr ""
-#: config/tc-ip2k.c:160
+#: config/tc-ip2k.c:159
#, c-format
msgid " -mip2022ext permit extended IP2022 insn\n"
msgstr ""
-#: config/tc-ip2k.c:274
+#: config/tc-ip2k.c:273
msgid "md_pcrel_from\n"
msgstr ""
-#: config/tc-m32c.c:128
+#: config/tc-m32c.c:137
#, c-format
msgid " M32C specific command line options:\n"
msgstr ""
#. Pretend that we do not recognise this option.
-#: config/tc-m32r.c:332
+#: config/tc-m32r.c:331
msgid "Unrecognised option: -hidden"
msgstr ""
-#: config/tc-m32r.c:359 config/tc-sparc.c:593
+#: config/tc-m32r.c:358 config/tc-sparc.c:595
msgid "Unrecognized option following -K"
msgstr ""
-#: config/tc-m32r.c:374
+#: config/tc-m32r.c:373
#, c-format
msgid " M32R specific command line options:\n"
msgstr ""
-#: config/tc-m32r.c:376
+#: config/tc-m32r.c:375
#, c-format
msgid ""
" -m32r disable support for the m32rx instruction set\n"
msgstr ""
-#: config/tc-m32r.c:378
+#: config/tc-m32r.c:377
#, c-format
msgid " -m32rx support the extended m32rx instruction set\n"
msgstr ""
-#: config/tc-m32r.c:380
+#: config/tc-m32r.c:379
#, c-format
msgid " -m32r2 support the extended m32r2 instruction set\n"
msgstr ""
-#: config/tc-m32r.c:382
+#: config/tc-m32r.c:381
#, c-format
msgid " -EL,-little produce little endian code and data\n"
msgstr ""
-#: config/tc-m32r.c:384
+#: config/tc-m32r.c:383
#, c-format
msgid " -EB,-big produce big endian code and data\n"
msgstr ""
-#: config/tc-m32r.c:386
+#: config/tc-m32r.c:385
#, c-format
msgid " -parallel try to combine instructions in parallel\n"
msgstr ""
-#: config/tc-m32r.c:388
+#: config/tc-m32r.c:387
#, c-format
msgid " -no-parallel disable -parallel\n"
msgstr ""
-#: config/tc-m32r.c:390
+#: config/tc-m32r.c:389
#, c-format
msgid ""
" -no-bitinst disallow the M32R2's extended bit-field "
"instructions\n"
msgstr ""
-#: config/tc-m32r.c:392
+#: config/tc-m32r.c:391
#, c-format
msgid " -O try to optimize code. Implies -parallel\n"
msgstr ""
-#: config/tc-m32r.c:395
+#: config/tc-m32r.c:394
#, c-format
msgid ""
" -warn-explicit-parallel-conflicts warn when parallel instructions\n"
msgstr ""
-#: config/tc-m32r.c:397
+#: config/tc-m32r.c:396
#, c-format
msgid " might violate contraints\n"
msgstr ""
-#: config/tc-m32r.c:399
+#: config/tc-m32r.c:398
#, c-format
msgid " -no-warn-explicit-parallel-conflicts do not warn when parallel\n"
msgstr ""
-#: config/tc-m32r.c:401
+#: config/tc-m32r.c:400
#, c-format
msgid ""
" instructions might violate "
"contraints\n"
msgstr ""
-#: config/tc-m32r.c:403
+#: config/tc-m32r.c:402
#, c-format
msgid ""
" -Wp synonym for -warn-explicit-parallel-conflicts\n"
msgstr ""
-#: config/tc-m32r.c:405
+#: config/tc-m32r.c:404
#, c-format
msgid ""
" -Wnp synonym for -no-warn-explicit-parallel-conflicts\n"
msgstr ""
-#: config/tc-m32r.c:407
+#: config/tc-m32r.c:406
#, c-format
msgid ""
" -ignore-parallel-conflicts do not check parallel instructions\n"
msgstr ""
-#: config/tc-m32r.c:409
+#: config/tc-m32r.c:408
#, c-format
msgid " fo contraint violations\n"
msgstr ""
-#: config/tc-m32r.c:411
+#: config/tc-m32r.c:410
#, c-format
msgid ""
" -no-ignore-parallel-conflicts check parallel instructions for\n"
msgstr ""
-#: config/tc-m32r.c:413
+#: config/tc-m32r.c:412
#, c-format
msgid " contraint violations\n"
msgstr ""
-#: config/tc-m32r.c:415
+#: config/tc-m32r.c:414
#, c-format
msgid " -Ip synonym for -ignore-parallel-conflicts\n"
msgstr ""
-#: config/tc-m32r.c:417
+#: config/tc-m32r.c:416
#, c-format
msgid " -nIp synonym for -no-ignore-parallel-conflicts\n"
msgstr ""
-#: config/tc-m32r.c:420
+#: config/tc-m32r.c:419
#, c-format
msgid ""
" -warn-unmatched-high warn when an (s)high reloc has no matching low "
"reloc\n"
msgstr ""
-#: config/tc-m32r.c:422
+#: config/tc-m32r.c:421
#, c-format
msgid " -no-warn-unmatched-high do not warn about missing low relocs\n"
msgstr ""
-#: config/tc-m32r.c:424
+#: config/tc-m32r.c:423
#, c-format
msgid " -Wuh synonym for -warn-unmatched-high\n"
msgstr ""
-#: config/tc-m32r.c:426
+#: config/tc-m32r.c:425
#, c-format
msgid " -Wnuh synonym for -no-warn-unmatched-high\n"
msgstr ""
-#: config/tc-m32r.c:429
+#: config/tc-m32r.c:428
#, c-format
msgid " -KPIC generate PIC\n"
msgstr ""
-#: config/tc-m32r.c:850
+#: config/tc-m32r.c:849
msgid "instructions write to the same destination register."
msgstr ""
-#: config/tc-m32r.c:858
+#: config/tc-m32r.c:857
msgid "Instructions do not use parallel execution pipelines."
msgstr ""
-#: config/tc-m32r.c:866
+#: config/tc-m32r.c:865
msgid "Instructions share the same execution pipeline"
msgstr ""
-#: config/tc-m32r.c:931 config/tc-m32r.c:1045
+#: config/tc-m32r.c:930 config/tc-m32r.c:1044
#, c-format
msgid "not a 16 bit instruction '%s'"
msgstr ""
-#: config/tc-m32r.c:943 config/tc-m32r.c:1057 config/tc-m32r.c:1241
+#: config/tc-m32r.c:942 config/tc-m32r.c:1056 config/tc-m32r.c:1240
#, c-format
msgid "instruction '%s' is for the M32R2 only"
msgstr ""
-#: config/tc-m32r.c:956 config/tc-m32r.c:1070 config/tc-m32r.c:1254
+#: config/tc-m32r.c:955 config/tc-m32r.c:1069 config/tc-m32r.c:1253
#, c-format
msgid "unknown instruction '%s'"
msgstr ""
-#: config/tc-m32r.c:965 config/tc-m32r.c:1077 config/tc-m32r.c:1261
+#: config/tc-m32r.c:964 config/tc-m32r.c:1076 config/tc-m32r.c:1260
#, c-format
msgid "instruction '%s' is for the M32RX only"
msgstr ""
-#: config/tc-m32r.c:974 config/tc-m32r.c:1086
+#: config/tc-m32r.c:973 config/tc-m32r.c:1085
#, c-format
msgid "instruction '%s' cannot be executed in parallel."
msgstr ""
-#: config/tc-m32r.c:1029 config/tc-m32r.c:1111 config/tc-m32r.c:1318
+#: config/tc-m32r.c:1028 config/tc-m32r.c:1110 config/tc-m32r.c:1317
msgid "internal error: lookup/get operands failed"
msgstr ""
-#: config/tc-m32r.c:1096
+#: config/tc-m32r.c:1095
#, c-format
msgid "'%s': only the NOP instruction can be issued in parallel on the m32r"
msgstr ""
-#: config/tc-m32r.c:1125
+#: config/tc-m32r.c:1124
#, 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:1129
+#: config/tc-m32r.c:1128
#, 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:1493 config/tc-ppc.c:1773 config/tc-ppc.c:4365
+#: config/tc-m32r.c:1492 config/tc-ppc.c:1832 config/tc-ppc.c:4372
msgid "Expected comma after symbol-name: rest of line ignored."
msgstr ""
-#: config/tc-m32r.c:1503
+#: config/tc-m32r.c:1502
#, c-format
msgid ".SCOMMon length (%ld.) <0! Ignored."
msgstr ""
-#: config/tc-m32r.c:1517 config/tc-ppc.c:1795 config/tc-ppc.c:2952
-#: config/tc-ppc.c:4389
+#: config/tc-m32r.c:1516 config/tc-ppc.c:1854 config/tc-ppc.c:2993
+#: config/tc-ppc.c:4396
msgid "ignoring bad alignment"
msgstr ""
-#: config/tc-m32r.c:1529 config/tc-ppc.c:1832 config/tc-v850.c:323
+#: config/tc-m32r.c:1528 config/tc-ppc.c:1891 config/tc-v850.c:322
msgid "Common alignment not a power of 2"
msgstr ""
-#: config/tc-m32r.c:1544 config/tc-ppc.c:1806 config/tc-ppc.c:4401
+#: config/tc-m32r.c:1543 config/tc-ppc.c:1865 config/tc-ppc.c:4408
#, c-format
msgid "Ignoring attempt to re-define symbol `%s'."
msgstr ""
-#: config/tc-m32r.c:1553
+#: config/tc-m32r.c:1552
#, c-format
msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/tc-m32r.c:1789
+#: config/tc-m32r.c:1788
msgid "Addend to unresolved symbol not on word boundary."
msgstr ""
-#: config/tc-m32r.c:1930 config/tc-m32r.c:1983 config/tc-sh.c:749
+#: config/tc-m32r.c:1929 config/tc-m32r.c:1982 config/tc-sh.c:747
msgid "Invalid PIC expression."
msgstr ""
-#: config/tc-m32r.c:2074
+#: config/tc-m32r.c:2073
msgid "Unmatched high/shigh reloc"
msgstr ""
-#: config/tc-m32r.c:2334 config/tc-sparc.c:3524
+#: config/tc-m32r.c:2333 config/tc-sparc.c:3604
#, c-format
msgid "internal error: can't export reloc type %d (`%s')"
msgstr ""
-#: config/tc-m68hc11.c:369
+#: config/tc-m68hc11.c:371
#, c-format
msgid ""
"Motorola 68HC11/68HC12/68HCS12 options:\n"
@@ -5741,8 +6269,8 @@ msgid ""
" -mlong use 32-bit int ABI\n"
" -mshort-double use 32-bit double ABI\n"
" -mlong-double use 64-bit double ABI (default)\n"
-" --force-long-branchs always turn relative branchs into absolute ones\n"
-" -S,--short-branchs do not turn relative branchs into absolute ones\n"
+" --force-long-branches always turn relative branches into absolute ones\n"
+" -S,--short-branches do not turn relative branches into absolute ones\n"
" when the offset is out of range\n"
" --strict-direct-mode do not turn the direct mode into extended mode\n"
" when the instruction does not support direct mode\n"
@@ -5752,56 +6280,56 @@ msgid ""
" (used for testing)\n"
msgstr ""
-#: config/tc-m68hc11.c:415
+#: config/tc-m68hc11.c:417
#, c-format
msgid "Default target `%s' is not supported."
msgstr ""
#. Dump the opcode statistics table.
-#: config/tc-m68hc11.c:433
+#: config/tc-m68hc11.c:435
#, c-format
msgid "Name # Modes Min ops Max ops Modes mask # Used\n"
msgstr ""
-#: config/tc-m68hc11.c:499
+#: config/tc-m68hc11.c:501
#, c-format
msgid "Option `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:721
+#: config/tc-m68hc11.c:723
msgid "#<imm8>"
msgstr ""
-#: config/tc-m68hc11.c:730
+#: config/tc-m68hc11.c:732
msgid "#<imm16>"
msgstr ""
-#: config/tc-m68hc11.c:739 config/tc-m68hc11.c:748
+#: config/tc-m68hc11.c:741 config/tc-m68hc11.c:750
msgid "<imm8>,X"
msgstr ""
-#: config/tc-m68hc11.c:775
+#: config/tc-m68hc11.c:777
msgid "*<abs8>"
msgstr ""
-#: config/tc-m68hc11.c:787
+#: config/tc-m68hc11.c:789
msgid "#<mask>"
msgstr ""
-#: config/tc-m68hc11.c:797
+#: config/tc-m68hc11.c:799
#, c-format
msgid "symbol%d"
msgstr ""
-#: config/tc-m68hc11.c:799
+#: config/tc-m68hc11.c:801
msgid "<abs>"
msgstr ""
-#: config/tc-m68hc11.c:818
+#: config/tc-m68hc11.c:820
msgid "<label>"
msgstr ""
-#: config/tc-m68hc11.c:834
+#: config/tc-m68hc11.c:836
#, c-format
msgid ""
"# Example of `%s' instructions\n"
@@ -5809,862 +6337,902 @@ msgid ""
"_start:\n"
msgstr ""
-#: config/tc-m68hc11.c:881
+#: config/tc-m68hc11.c:883
#, c-format
msgid "Instruction `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:886
+#: config/tc-m68hc11.c:888
#, c-format
msgid "Instruction formats for `%s':"
msgstr ""
-#: config/tc-m68hc11.c:1016
+#: config/tc-m68hc11.c:1018
#, c-format
msgid "Immediate operand is not allowed for operand %d."
msgstr ""
-#: config/tc-m68hc11.c:1060
+#: config/tc-m68hc11.c:1062
msgid "Indirect indexed addressing is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1080
+#: config/tc-m68hc11.c:1082
msgid "Spurious `,' or bad indirect register addressing mode."
msgstr ""
-#: config/tc-m68hc11.c:1102
+#: config/tc-m68hc11.c:1104
msgid "Missing second register or offset for indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1112
+#: config/tc-m68hc11.c:1114
msgid "Missing second register for indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1128
+#: config/tc-m68hc11.c:1130
msgid "Missing `]' to close indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1173
+#: config/tc-m68hc11.c:1175
msgid "Illegal operand."
msgstr ""
-#: config/tc-m68hc11.c:1178
+#: config/tc-m68hc11.c:1180
msgid "Missing operand."
msgstr ""
-#: config/tc-m68hc11.c:1231
+#: config/tc-m68hc11.c:1233
msgid "Pre-increment mode is not valid for 68HC11"
msgstr ""
-#: config/tc-m68hc11.c:1244
+#: config/tc-m68hc11.c:1246
msgid "Wrong register in register indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1252
+#: config/tc-m68hc11.c:1254
msgid "Missing `]' to close register indirect operand."
msgstr ""
-#: config/tc-m68hc11.c:1272
+#: config/tc-m68hc11.c:1274
msgid "Post-decrement mode is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1280
+#: config/tc-m68hc11.c:1282
msgid "Post-increment mode is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1298
+#: config/tc-m68hc11.c:1300
msgid "Invalid indexed indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1390
+#: config/tc-m68hc11.c:1392
#, c-format
msgid "Trap id `%ld' is out of range."
msgstr ""
-#: config/tc-m68hc11.c:1394
+#: config/tc-m68hc11.c:1396
msgid "Trap id must be within [0x30..0x39] or [0x40..0xff]."
msgstr ""
-#: config/tc-m68hc11.c:1401
+#: config/tc-m68hc11.c:1403
#, c-format
msgid "Operand out of 8-bit range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1408
+#: config/tc-m68hc11.c:1410
msgid "The trap id must be a constant."
msgstr ""
-#: config/tc-m68hc11.c:1443
+#: config/tc-m68hc11.c:1445
#, c-format
msgid "Operand `%x' not recognized in fixup8."
msgstr ""
-#: config/tc-m68hc11.c:1460 config/tc-m68hc11.c:1509
+#: config/tc-m68hc11.c:1462 config/tc-m68hc11.c:1511
#, c-format
msgid "Operand out of 16-bit range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1492 config/tc-m68hc11.c:1525
+#: config/tc-m68hc11.c:1494 config/tc-m68hc11.c:1527
#, c-format
msgid "Operand `%x' not recognized in fixup16."
msgstr ""
-#: config/tc-m68hc11.c:1542
+#: config/tc-m68hc11.c:1544
#, c-format
msgid "Unexpected branch conversion with `%x'"
msgstr ""
-#: config/tc-m68hc11.c:1633 config/tc-m68hc11.c:1771
+#: config/tc-m68hc11.c:1635 config/tc-m68hc11.c:1773
#, c-format
msgid "Operand out of range for a relative branch: `%ld'"
msgstr ""
-#: config/tc-m68hc11.c:1739
+#: config/tc-m68hc11.c:1741
msgid "Invalid register for dbcc/tbcc instruction."
msgstr ""
-#: config/tc-m68hc11.c:1827
+#: config/tc-m68hc11.c:1829
#, c-format
msgid "Increment/decrement value is out of range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1838
+#: config/tc-m68hc11.c:1840
msgid "Expecting a register."
msgstr ""
-#: config/tc-m68hc11.c:1853
+#: config/tc-m68hc11.c:1855
msgid "Invalid register for post/pre increment."
msgstr ""
-#: config/tc-m68hc11.c:1883
+#: config/tc-m68hc11.c:1885
msgid "Invalid register."
msgstr ""
-#: config/tc-m68hc11.c:1890
+#: config/tc-m68hc11.c:1892
#, c-format
msgid "Offset out of 16-bit range: %ld."
msgstr ""
-#: config/tc-m68hc11.c:1895
+#: config/tc-m68hc11.c:1897
#, c-format
msgid "Offset out of 5-bit range for movw/movb insn: %ld."
msgstr ""
-#: config/tc-m68hc11.c:2001
+#: config/tc-m68hc11.c:2003
msgid "Expecting register D for indexed indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:2003
+#: config/tc-m68hc11.c:2005
msgid "Indexed indirect mode is not allowed for movb/movw."
msgstr ""
-#: config/tc-m68hc11.c:2020
+#: config/tc-m68hc11.c:2022
msgid "Invalid accumulator register."
msgstr ""
-#: config/tc-m68hc11.c:2045
+#: config/tc-m68hc11.c:2047
msgid "Invalid indexed register."
msgstr ""
-#: config/tc-m68hc11.c:2053
+#: config/tc-m68hc11.c:2055
msgid "Addressing mode not implemented yet."
msgstr ""
-#: config/tc-m68hc11.c:2066
+#: config/tc-m68hc11.c:2068
msgid "Invalid source register for this instruction, use 'tfr'."
msgstr ""
-#: config/tc-m68hc11.c:2068
+#: config/tc-m68hc11.c:2070
msgid "Invalid source register."
msgstr ""
-#: config/tc-m68hc11.c:2073
+#: config/tc-m68hc11.c:2075
msgid "Invalid destination register for this instruction, use 'tfr'."
msgstr ""
-#: config/tc-m68hc11.c:2075
+#: config/tc-m68hc11.c:2077
msgid "Invalid destination register."
msgstr ""
-#: config/tc-m68hc11.c:2171
+#: config/tc-m68hc11.c:2173
msgid "Invalid indexed register, expecting register X."
msgstr ""
-#: config/tc-m68hc11.c:2173
+#: config/tc-m68hc11.c:2175
msgid "Invalid indexed register, expecting register Y."
msgstr ""
-#: config/tc-m68hc11.c:2479
+#: config/tc-m68hc11.c:2481
msgid "No instruction or missing opcode."
msgstr ""
-#: config/tc-m68hc11.c:2544
+#: config/tc-m68hc11.c:2546
#, c-format
msgid "Opcode `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:2566
+#: config/tc-m68hc11.c:2568
#, c-format
msgid "Garbage at end of instruction: `%s'."
msgstr ""
-#: config/tc-m68hc11.c:2589
+#: config/tc-m68hc11.c:2591
#, c-format
msgid "Invalid operand for `%s'"
msgstr ""
-#: config/tc-m68hc11.c:2640
+#: config/tc-m68hc11.c:2642
#, c-format
msgid "Invalid mode: %s\n"
msgstr ""
-#: config/tc-m68hc11.c:2700
+#: config/tc-m68hc11.c:2702
msgid "bad .relax format"
msgstr ""
-#: config/tc-m68hc11.c:2744
+#: config/tc-m68hc11.c:2746
#, c-format
msgid "Relocation %d is not supported by object file format."
msgstr ""
-#: config/tc-m68hc11.c:3023
+#: config/tc-m68hc11.c:3025
msgid "bra or bsr with undefined symbol."
msgstr ""
-#: config/tc-m68hc11.c:3126 config/tc-m68hc11.c:3183
+#: config/tc-m68hc11.c:3128 config/tc-m68hc11.c:3185
#, c-format
msgid "Subtype %d is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:3242
+#: config/tc-m68hc11.c:3244
msgid "Expression too complex."
msgstr ""
-#: config/tc-m68hc11.c:3275
+#: config/tc-m68hc11.c:3277
msgid "Value out of 16-bit range."
msgstr ""
-#: config/tc-m68hc11.c:3293
+#: config/tc-m68hc11.c:3295
#, c-format
msgid "Value %ld too large for 8-bit PC-relative branch."
msgstr ""
-#: config/tc-m68hc11.c:3300
+#: config/tc-m68hc11.c:3302
#, c-format
msgid "Auto increment/decrement offset '%ld' is out of range."
msgstr ""
-#: config/tc-m68hc11.c:3313
+#: config/tc-m68hc11.c:3315
#, c-format
msgid "Offset out of 5-bit range for movw/movb insn: %ld"
msgstr ""
-#: config/tc-m68hc11.c:3329
+#: config/tc-m68hc11.c:3331
#, c-format
msgid "Line %d: unknown relocation type: 0x%x."
msgstr ""
-#: config/tc-m68k.c:696
-msgid "no matching ColdFire architectures found"
-msgstr ""
-
-#: config/tc-m68k.c:710
-msgid " or "
-msgstr ""
-
-#: config/tc-m68k.c:715
-msgid ", or "
-msgstr ""
-
-#: config/tc-m68k.c:732
-msgid ", or aliases"
-msgstr ""
-
-#: config/tc-m68k.c:843
+#: config/tc-m68k.c:1009
#, c-format
msgid "Can not do %d byte pc-relative relocation"
msgstr ""
-#: config/tc-m68k.c:845
+#: config/tc-m68k.c:1011
#, c-format
msgid "Can not do %d byte pc-relative pic relocation"
msgstr ""
-#: config/tc-m68k.c:850
+#: config/tc-m68k.c:1016
#, c-format
msgid "Can not do %d byte relocation"
msgstr ""
-#: config/tc-m68k.c:852
+#: config/tc-m68k.c:1018
#, c-format
msgid "Can not do %d byte pic relocation"
msgstr ""
-#: config/tc-m68k.c:915
+#: config/tc-m68k.c:1083
#, c-format
msgid "Unable to produce reloc against symbol '%s'"
msgstr ""
-#: config/tc-m68k.c:959 config/tc-vax.c:3435
+#: config/tc-m68k.c:1127 config/tc-vax.c:2366
#, c-format
msgid "Cannot make %s relocation PC relative"
msgstr ""
-#: config/tc-m68k.c:1050 config/tc-vax.c:1890
+#: config/tc-m68k.c:1226 config/tc-vax.c:1876
msgid "No operator"
msgstr ""
-#: config/tc-m68k.c:1080 config/tc-vax.c:1907
+#: config/tc-m68k.c:1256 config/tc-vax.c:1892
msgid "Unknown operator"
msgstr ""
-#: config/tc-m68k.c:1944
+#: config/tc-m68k.c:2143
msgid "invalid instruction for this architecture; needs "
msgstr ""
-#: config/tc-m68k.c:1950
+#: config/tc-m68k.c:2147
msgid "ColdFire ISA_A"
msgstr ""
-#: config/tc-m68k.c:1958
+#: config/tc-m68k.c:2150
msgid "ColdFire hardware divide"
msgstr ""
-#: config/tc-m68k.c:1966
+#: config/tc-m68k.c:2153
msgid "ColdFire ISA_A+"
msgstr ""
-#: config/tc-m68k.c:1974
+#: config/tc-m68k.c:2156
msgid "ColdFire ISA_B"
msgstr ""
-#: config/tc-m68k.c:1982
+#: config/tc-m68k.c:2159
msgid "ColdFire fpu"
msgstr ""
-#: config/tc-m68k.c:1989
-msgid "fpu (68040, 68060 or 68881/68882)"
+#: config/tc-m68k.c:2162
+msgid "M68K fpu"
msgstr ""
-#: config/tc-m68k.c:1992
-msgid "mmu (68030 or 68851)"
+#: config/tc-m68k.c:2165
+msgid "M68K mmu"
msgstr ""
-#: config/tc-m68k.c:1995
+#: config/tc-m68k.c:2168
msgid "68020 or higher"
msgstr ""
-#: config/tc-m68k.c:1998
+#: config/tc-m68k.c:2171
msgid "68000 or higher"
msgstr ""
-#: config/tc-m68k.c:2001
+#: config/tc-m68k.c:2174
msgid "68010 or higher"
msgstr ""
-#: config/tc-m68k.c:2029
+#: config/tc-m68k.c:2227
msgid "operands mismatch"
msgstr ""
-#: config/tc-m68k.c:2090 config/tc-m68k.c:2096 config/tc-m68k.c:2102
-#: config/tc-mmix.c:2488 config/tc-mmix.c:2512
+#: config/tc-m68k.c:2290 config/tc-m68k.c:2296 config/tc-m68k.c:2302
+#: config/tc-mmix.c:2487 config/tc-mmix.c:2511
msgid "operand out of range"
msgstr ""
-#: config/tc-m68k.c:2159
+#: config/tc-m68k.c:2359
#, c-format
msgid "Bignum too big for %c format; truncated"
msgstr ""
-#: config/tc-m68k.c:2236
+#: config/tc-m68k.c:2436
msgid "displacement too large for this architecture; needs 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2347
+#: config/tc-m68k.c:2547
msgid ""
"scale factor invalid on this architecture; needs cpu32 or 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2352
+#: config/tc-m68k.c:2552
msgid "invalid index size for coldfire"
msgstr ""
-#: config/tc-m68k.c:2405
+#: config/tc-m68k.c:2605
msgid "Forcing byte displacement"
msgstr ""
-#: config/tc-m68k.c:2407
+#: config/tc-m68k.c:2607
msgid "byte displacement out of range"
msgstr ""
-#: config/tc-m68k.c:2455 config/tc-m68k.c:2493
+#: config/tc-m68k.c:2655 config/tc-m68k.c:2693
msgid "invalid operand mode for this architecture; needs 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2479 config/tc-m68k.c:2513
+#: config/tc-m68k.c:2679 config/tc-m68k.c:2713
msgid ":b not permitted; defaulting to :w"
msgstr ""
-#: config/tc-m68k.c:2590
+#: config/tc-m68k.c:2790
msgid "unsupported byte value; use a different suffix"
msgstr ""
-#: config/tc-m68k.c:2605
+#: config/tc-m68k.c:2805
msgid "unknown/incorrect operand"
msgstr ""
-#: config/tc-m68k.c:2648 config/tc-m68k.c:2656 config/tc-m68k.c:2663
-#: config/tc-m68k.c:2670
+#: config/tc-m68k.c:2848 config/tc-m68k.c:2856 config/tc-m68k.c:2863
+#: config/tc-m68k.c:2870
msgid "out of range"
msgstr ""
-#: config/tc-m68k.c:2716
-msgid "Can't use long branches on 68000/68010/5200"
+#: config/tc-m68k.c:2942
+msgid "Can't use long branches on this architecture"
msgstr ""
-#: config/tc-m68k.c:2833
+#: config/tc-m68k.c:3047
msgid "Expression out of range, using 0"
msgstr ""
-#: config/tc-m68k.c:3014 config/tc-m68k.c:3030
+#: config/tc-m68k.c:3238 config/tc-m68k.c:3254
msgid "Floating point register in register list"
msgstr ""
-#: config/tc-m68k.c:3020
+#: config/tc-m68k.c:3244
msgid "Wrong register in floating-point reglist"
msgstr ""
-#: config/tc-m68k.c:3036
+#: config/tc-m68k.c:3260
msgid "incorrect register in reglist"
msgstr ""
-#: config/tc-m68k.c:3042
+#: config/tc-m68k.c:3266
msgid "wrong register in floating-point reglist"
msgstr ""
#. ERROR.
-#: config/tc-m68k.c:3505
+#: config/tc-m68k.c:3729
msgid "Extra )"
msgstr ""
#. ERROR.
-#: config/tc-m68k.c:3516
+#: config/tc-m68k.c:3740
msgid "Missing )"
msgstr ""
-#: config/tc-m68k.c:3533
+#: config/tc-m68k.c:3757
msgid "Missing operand"
msgstr ""
-#: config/tc-m68k.c:3890
+#: config/tc-m68k.c:4074
+#, c-format
+msgid "unrecognized default cpu `%s'"
+msgstr ""
+
+#: config/tc-m68k.c:4128
#, c-format
msgid "%s -- statement `%s' ignored"
msgstr ""
-#: config/tc-m68k.c:3939
+#: config/tc-m68k.c:4177
#, c-format
msgid "Don't know how to figure width of %c in md_assemble()"
msgstr ""
-#: config/tc-m68k.c:4108
+#: config/tc-m68k.c:4346
#, c-format
msgid "Internal Error: Can't allocate m68k_sorted_opcodes of size %d"
msgstr ""
-#: config/tc-m68k.c:4159 config/tc-m68k.c:4198
+#: config/tc-m68k.c:4397 config/tc-m68k.c:4436
#, c-format
msgid "Internal Error: Can't find %s in hash table"
msgstr ""
-#: config/tc-m68k.c:4162 config/tc-m68k.c:4201
+#: config/tc-m68k.c:4400 config/tc-m68k.c:4439
#, c-format
msgid "Internal Error: Can't hash %s: %s"
msgstr ""
-#: config/tc-m68k.c:4282
-msgid "architecture not yet selected: defaulting to 68020"
+#: config/tc-m68k.c:4564
+#, c-format
+msgid "text label `%s' aligned to odd boundary"
msgstr ""
-#: config/tc-m68k.c:4342
+#: config/tc-m68k.c:4764
#, c-format
-msgid "unrecognized default cpu `%s' ???"
+msgid "value %ld out of range"
msgstr ""
-#: config/tc-m68k.c:4353
-msgid "68040 and 68851 specified; mmu instructions may assemble incorrectly"
+#: config/tc-m68k.c:4778
+msgid "invalid byte branch offset"
msgstr ""
-#: config/tc-m68k.c:4370
-msgid "options for 68881 and no-68881 both given"
+#: config/tc-m68k.c:4814
+msgid "short branch with zero offset: use :w"
msgstr ""
-#: config/tc-m68k.c:4373
-msgid "options for 68851 and no-68851 both given"
+#: config/tc-m68k.c:4839
+msgid "Conversion of PC relative BSR to absolute JSR"
msgstr ""
-#: config/tc-m68k.c:4434
-#, c-format
-msgid "text label `%s' aligned to odd boundary"
+#: config/tc-m68k.c:4850
+msgid "Conversion of PC relative branch to absolute jump"
msgstr ""
-#: config/tc-m68k.c:4638
-msgid "invalid byte branch offset"
+#: config/tc-m68k.c:4867 config/tc-m68k.c:4928
+msgid "Conversion of PC relative conditional branch to absolute jump"
msgstr ""
-#: config/tc-m68k.c:4674
-msgid "short branch with zero offset: use :w"
+#: config/tc-m68k.c:4908
+msgid "Conversion of DBcc to absolute jump"
msgstr ""
-#: config/tc-m68k.c:4698
-msgid "Tried to convert PC relative BSR to absolute JSR"
+#: config/tc-m68k.c:4992
+msgid "Conversion of PC relative displacement to absolute"
msgstr ""
-#: config/tc-m68k.c:4708 config/tc-m68k.c:5054
+#: config/tc-m68k.c:5204
msgid "Tried to convert PC relative branch to absolute jump"
msgstr ""
-#: config/tc-m68k.c:4724 config/tc-m68k.c:4783 config/tc-m68k.c:4847
-msgid "Tried to convert PC relative conditional branch to absolute jump"
-msgstr ""
-
-#: config/tc-m68k.c:4764
-msgid "Tried to convert DBcc to absolute jump"
-msgstr ""
-
-#: config/tc-m68k.c:5098 config/tc-m68k.c:5109 config/tc-m68k.c:5149
+#: config/tc-m68k.c:5248 config/tc-m68k.c:5259 config/tc-m68k.c:5299
msgid "expression out of range: defaulting to 1"
msgstr ""
-#: config/tc-m68k.c:5141
+#: config/tc-m68k.c:5291
msgid "expression out of range: defaulting to 0"
msgstr ""
-#: config/tc-m68k.c:5182 config/tc-m68k.c:5194
+#: config/tc-m68k.c:5332 config/tc-m68k.c:5344
#, c-format
msgid "Can't deal with expression; defaulting to %ld"
msgstr ""
-#: config/tc-m68k.c:5208
+#: config/tc-m68k.c:5358
msgid "expression doesn't fit in BYTE"
msgstr ""
-#: config/tc-m68k.c:5212
+#: config/tc-m68k.c:5362
msgid "expression doesn't fit in WORD"
msgstr ""
-#: config/tc-m68k.c:5299
+#: config/tc-m68k.c:5449
#, c-format
msgid "%s: unrecognized processor name"
msgstr ""
-#: config/tc-m68k.c:5363
+#: config/tc-m68k.c:5510
msgid "bad coprocessor id"
msgstr ""
-#: config/tc-m68k.c:5369
+#: config/tc-m68k.c:5516
msgid "unrecognized fopt option"
msgstr ""
-#: config/tc-m68k.c:5502
+#: config/tc-m68k.c:5649
#, c-format
msgid "option `%s' may not be negated"
msgstr ""
-#: config/tc-m68k.c:5513
+#: config/tc-m68k.c:5660
#, c-format
msgid "option `%s' not recognized"
msgstr ""
-#: config/tc-m68k.c:5542
+#: config/tc-m68k.c:5689
msgid "bad format of OPT NEST=depth"
msgstr ""
-#: config/tc-m68k.c:5598
+#: config/tc-m68k.c:5745
msgid "missing label"
msgstr ""
-#: config/tc-m68k.c:5622 config/tc-m68k.c:5651
+#: config/tc-m68k.c:5769 config/tc-m68k.c:5798
msgid "bad register list"
msgstr ""
-#: config/tc-m68k.c:5624
+#: config/tc-m68k.c:5771
#, c-format
msgid "bad register list: %s"
msgstr ""
-#: config/tc-m68k.c:5722
+#: config/tc-m68k.c:5869
msgid "restore without save"
msgstr ""
-#: config/tc-m68k.c:5876 config/tc-m68k.c:6246
+#: config/tc-m68k.c:6023 config/tc-m68k.c:6393
msgid "syntax error in structured control directive"
msgstr ""
-#: config/tc-m68k.c:5921
+#: config/tc-m68k.c:6068
msgid "missing condition code in structured control directive"
msgstr ""
-#: config/tc-m68k.c:5992
+#: config/tc-m68k.c:6139
#, c-format
msgid ""
"Condition <%c%c> in structured control directive can not be encoded correctly"
msgstr ""
-#: config/tc-m68k.c:6288
+#: config/tc-m68k.c:6435
msgid "missing then"
msgstr ""
-#: config/tc-m68k.c:6369
+#: config/tc-m68k.c:6516
msgid "else without matching if"
msgstr ""
-#: config/tc-m68k.c:6402
+#: config/tc-m68k.c:6549
msgid "endi without matching if"
msgstr ""
-#: config/tc-m68k.c:6442
+#: config/tc-m68k.c:6589
msgid "break outside of structured loop"
msgstr ""
-#: config/tc-m68k.c:6480
+#: config/tc-m68k.c:6627
msgid "next outside of structured loop"
msgstr ""
-#: config/tc-m68k.c:6531
+#: config/tc-m68k.c:6678
msgid "missing ="
msgstr ""
-#: config/tc-m68k.c:6569
+#: config/tc-m68k.c:6716
msgid "missing to or downto"
msgstr ""
-#: config/tc-m68k.c:6605 config/tc-m68k.c:6639 config/tc-m68k.c:6853
+#: config/tc-m68k.c:6752 config/tc-m68k.c:6786 config/tc-m68k.c:7000
msgid "missing do"
msgstr ""
-#: config/tc-m68k.c:6740
+#: config/tc-m68k.c:6887
msgid "endf without for"
msgstr ""
-#: config/tc-m68k.c:6794
+#: config/tc-m68k.c:6941
msgid "until without repeat"
msgstr ""
-#: config/tc-m68k.c:6888
+#: config/tc-m68k.c:7035
msgid "endw without while"
msgstr ""
-#: config/tc-m68k.c:7050
+#: config/tc-m68k.c:7068 config/tc-m68k.c:7096
+msgid "already assembled instructions"
+msgstr ""
+
+#: config/tc-m68k.c:7173
+#, c-format
+msgid "`%s' is deprecated, use `%s'"
+msgstr ""
+
+#: config/tc-m68k.c:7192
+#, c-format
+msgid "cpu `%s' unrecognized"
+msgstr ""
+
+#: config/tc-m68k.c:7198
+#, c-format
+msgid "already selected `%s' processor"
+msgstr ""
+
+#: config/tc-m68k.c:7218
+#, c-format
+msgid "architecture `%s' unrecognized"
+msgstr ""
+
+#: config/tc-m68k.c:7224
+#, c-format
+msgid "already selected `%s' architecture"
+msgstr ""
+
+#: config/tc-m68k.c:7247
#, c-format
-msgid "unrecognized architecture specification `%s'"
+msgid "extension `%s' unrecognized"
msgstr ""
-#: config/tc-m68k.c:7143
+#: config/tc-m68k.c:7365
+#, c-format
+msgid "option `-A%s' is deprecated: use `-%s'"
+msgstr ""
+
+#: config/tc-m68k.c:7398
+msgid "architecture features both enabled and disabled"
+msgstr ""
+
+#: config/tc-m68k.c:7425
+msgid "selected processor does not have all features of selected architecture"
+msgstr ""
+
+#: config/tc-m68k.c:7434
+msgid "m68k and cf features both selected"
+msgstr ""
+
+#: config/tc-m68k.c:7446
+msgid "68040 and 68851 specified; mmu instructions may assemble incorrectly"
+msgstr ""
+
+#: config/tc-m68k.c:7480
#, c-format
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 | -mcpu32 |\n"
-"-m5200 | -m5202 | -m5204 | -m5206 | -m5206e | -m521x | -m5249 |\n"
-"-m528x | -m5307 | -m5407 | -m547x | -m548x | -mcfv4 | -mcfv4e\n"
-"\t\t\tspecify variant of 680X0 architecture [default %s]\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"
+"-march=<arch>\t\tset architecture\n"
+"-mcpu=<cpu>\t\tset cpu [default %s]\n"
msgstr ""
-#: config/tc-m68k.c:7155
+#: config/tc-m68k.c:7485
+#, c-format
+msgid "-m[no-]%-16s enable/disable%s architecture extension\n"
+msgstr ""
+
+#: config/tc-m68k.c:7491
#, c-format
msgid ""
-"-m68851 | -mno-68851\n"
-"\t\t\ttarget has/lacks memory-management unit coprocessor\n"
-"\t\t\t[default yes for 68020 and up]\n"
+"-l\t\t\tuse 1 word for refs to undefined symbols [default 2]\n"
"-pic, -k\t\tgenerate position independent code\n"
"-S\t\t\tturn jbsr into jsr\n"
"--pcrel never turn PC-relative branches into absolute jumps\n"
"--register-prefix-optional\n"
"\t\t\trecognize register names without prefix character\n"
"--bitwise-or\t\tdo not treat `|' as a comment character\n"
-msgstr ""
-
-#: config/tc-m68k.c:7165
-#, c-format
-msgid ""
"--base-size-default-16\tbase reg without size is 16 bits\n"
"--base-size-default-32\tbase reg without size is 32 bits (default)\n"
"--disp-size-default-16\tdisplacement with unknown size is 16 bits\n"
"--disp-size-default-32\tdisplacement with unknown size is 32 bits (default)\n"
msgstr ""
-#: config/tc-m68k.c:7200
+#: config/tc-m68k.c:7505
+#, c-format
+msgid "Architecture variants are: "
+msgstr ""
+
+#: config/tc-m68k.c:7514
+#, c-format
+msgid "Processor variants are: "
+msgstr ""
+
+#: config/tc-m68k.c:7521 config/tc-xtensa.c:6029
+#, c-format
+msgid "\n"
+msgstr ""
+
+#: config/tc-m68k.c:7552
#, c-format
msgid "Error %s in %s\n"
msgstr ""
-#: config/tc-m68k.c:7204
+#: config/tc-m68k.c:7556
#, c-format
msgid "Opcode(%d.%s): "
msgstr ""
-#: config/tc-mcore.c:524
+#: config/tc-m68k.c:7715
+msgid "Not a defined coldfire architecture"
+msgstr ""
+
+#: config/tc-mcore.c:521
#, c-format
msgid "register expected, but saw '%.6s'"
msgstr ""
-#: config/tc-mcore.c:606
+#: config/tc-mcore.c:603
#, c-format
msgid "control register expected, but saw '%.6s'"
msgstr ""
-#: config/tc-mcore.c:642
+#: config/tc-mcore.c:639
msgid "bad/missing psr specifier"
msgstr ""
-#: config/tc-mcore.c:692
+#: config/tc-mcore.c:689
msgid "more than 65K literal pools"
msgstr ""
-#: config/tc-mcore.c:746
+#: config/tc-mcore.c:743
msgid "missing ']'"
msgstr ""
-#: config/tc-mcore.c:785
+#: config/tc-mcore.c:782
msgid "operand must be a constant"
msgstr ""
-#: config/tc-mcore.c:787
+#: config/tc-mcore.c:784
#, c-format
msgid "operand must be absolute in range %u..%u, not %ld"
msgstr ""
-#: config/tc-mcore.c:822
+#: config/tc-mcore.c:819
msgid "operand must be a multiple of 4"
msgstr ""
-#: config/tc-mcore.c:829
+#: config/tc-mcore.c:826
msgid "operand must be a multiple of 2"
msgstr ""
-#: config/tc-mcore.c:843 config/tc-mcore.c:1359 config/tc-mcore.c:1413
+#: config/tc-mcore.c:840 config/tc-mcore.c:1356 config/tc-mcore.c:1410
msgid "base register expected"
msgstr ""
-#: config/tc-mcore.c:891
+#: config/tc-mcore.c:888
#, c-format
msgid "unknown opcode \"%s\""
msgstr ""
-#: config/tc-mcore.c:934
+#: config/tc-mcore.c:931
msgid "invalid register: r15 illegal"
msgstr ""
-#: config/tc-mcore.c:983 config/tc-mcore.c:1564
+#: config/tc-mcore.c:980 config/tc-mcore.c:1561
msgid "M340 specific opcode used when assembling for M210"
msgstr ""
-#: config/tc-mcore.c:1001 config/tc-mcore.c:1041 config/tc-mcore.c:1060
-#: config/tc-mcore.c:1079 config/tc-mcore.c:1107 config/tc-mcore.c:1136
-#: config/tc-mcore.c:1173 config/tc-mcore.c:1208 config/tc-mcore.c:1227
-#: config/tc-mcore.c:1246 config/tc-mcore.c:1280 config/tc-mcore.c:1305
-#: config/tc-mcore.c:1362 config/tc-mcore.c:1416 config/tc-mcore.c:1452
-#: config/tc-mcore.c:1511 config/tc-mcore.c:1533 config/tc-mcore.c:1556
+#: config/tc-mcore.c:998 config/tc-mcore.c:1038 config/tc-mcore.c:1057
+#: config/tc-mcore.c:1076 config/tc-mcore.c:1104 config/tc-mcore.c:1133
+#: config/tc-mcore.c:1170 config/tc-mcore.c:1205 config/tc-mcore.c:1224
+#: config/tc-mcore.c:1243 config/tc-mcore.c:1277 config/tc-mcore.c:1302
+#: config/tc-mcore.c:1359 config/tc-mcore.c:1413 config/tc-mcore.c:1449
+#: config/tc-mcore.c:1508 config/tc-mcore.c:1530 config/tc-mcore.c:1553
msgid "second operand missing"
msgstr ""
-#: config/tc-mcore.c:1017
+#: config/tc-mcore.c:1014
msgid "destination register must be r1"
msgstr ""
-#: config/tc-mcore.c:1038
+#: config/tc-mcore.c:1035
msgid "source register must be r1"
msgstr ""
-#: config/tc-mcore.c:1102 config/tc-mcore.c:1159
+#: config/tc-mcore.c:1099 config/tc-mcore.c:1156
msgid "immediate is not a power of two"
msgstr ""
-#: config/tc-mcore.c:1130
+#: config/tc-mcore.c:1127
msgid "translating bgeni to movi"
msgstr ""
-#: config/tc-mcore.c:1167
+#: config/tc-mcore.c:1164
msgid "translating mgeni to movi"
msgstr ""
-#: config/tc-mcore.c:1199
+#: config/tc-mcore.c:1196
msgid "translating bmaski to movi"
msgstr ""
-#: config/tc-mcore.c:1275
+#: config/tc-mcore.c:1272
#, c-format
msgid "displacement too large (%d)"
msgstr ""
-#: config/tc-mcore.c:1289
+#: config/tc-mcore.c:1286
msgid "Invalid register: r0 and r15 illegal"
msgstr ""
-#: config/tc-mcore.c:1320
+#: config/tc-mcore.c:1317
msgid "bad starting register: r0 and r15 invalid"
msgstr ""
-#: config/tc-mcore.c:1333
+#: config/tc-mcore.c:1330
msgid "ending register must be r15"
msgstr ""
-#: config/tc-mcore.c:1353
+#: config/tc-mcore.c:1350
msgid "bad base register: must be r0"
msgstr ""
-#: config/tc-mcore.c:1371
+#: config/tc-mcore.c:1368
msgid "first register must be r4"
msgstr ""
-#: config/tc-mcore.c:1382
+#: config/tc-mcore.c:1379
msgid "last register must be r7"
msgstr ""
-#: config/tc-mcore.c:1419
+#: config/tc-mcore.c:1416
msgid "reg-reg expected"
msgstr ""
-#: config/tc-mcore.c:1530
+#: config/tc-mcore.c:1527
msgid "second operand must be 1"
msgstr ""
-#: config/tc-mcore.c:1551
+#: config/tc-mcore.c:1548
msgid "zero used as immediate value"
msgstr ""
-#: config/tc-mcore.c:1578
+#: config/tc-mcore.c:1575
msgid "duplicated psr bit specifier"
msgstr ""
-#: config/tc-mcore.c:1584
+#: config/tc-mcore.c:1581
msgid "`af' must appear alone"
msgstr ""
-#: config/tc-mcore.c:1591
+#: config/tc-mcore.c:1588
#, c-format
msgid "unimplemented opcode \"%s\""
msgstr ""
-#: config/tc-mcore.c:1600
+#: config/tc-mcore.c:1597
#, c-format
msgid "ignoring operands: %s "
msgstr ""
-#: config/tc-mcore.c:1665
+#: config/tc-mcore.c:1662
msgid "Bad call to MD_NTOF()"
msgstr ""
-#: config/tc-mcore.c:1736
+#: config/tc-mcore.c:1733
#, c-format
msgid "unrecognised cpu type '%s'"
msgstr ""
-#: config/tc-mcore.c:1754
+#: config/tc-mcore.c:1751
#, c-format
msgid ""
"MCORE specific options:\n"
@@ -6675,671 +7243,763 @@ msgid ""
" -EL assemble for a little endian system\n"
msgstr ""
-#: config/tc-mcore.c:1772
+#: config/tc-mcore.c:1769
msgid "failed sanity check: short_jump"
msgstr ""
-#: config/tc-mcore.c:1782
+#: config/tc-mcore.c:1779
msgid "failed sanity check: long_jump"
msgstr ""
-#: config/tc-mcore.c:1808
+#: config/tc-mcore.c:1805
#, c-format
msgid "odd displacement at %x"
msgstr ""
-#: config/tc-mcore.c:1990
+#: config/tc-mcore.c:1987
msgid "unknown"
msgstr ""
-#: config/tc-mcore.c:2017
+#: config/tc-mcore.c:2014
#, c-format
msgid "odd distance branch (0x%lx bytes)"
msgstr ""
-#: config/tc-mcore.c:2021
+#: config/tc-mcore.c:2018
#, c-format
msgid "pcrel for branch to %s too far (0x%lx)"
msgstr ""
-#: config/tc-mcore.c:2041
+#: config/tc-mcore.c:2038
#, c-format
msgid "pcrel for lrw/jmpi/jsri to %s too far (0x%lx)"
msgstr ""
-#: config/tc-mcore.c:2053
+#: config/tc-mcore.c:2050
#, c-format
msgid "pcrel for loopt too far (0x%lx)"
msgstr ""
-#: config/tc-mcore.c:2263
+#: config/tc-mcore.c:2246
#, c-format
msgid "Can not do %d byte %srelocation"
msgstr ""
-#: config/tc-mcore.c:2265
+#: config/tc-mcore.c:2248
msgid "pc-relative"
msgstr ""
+#: config/tc-mep.c:300
+#, c-format
+msgid ""
+"MeP specific command line options:\n"
+" -EB assemble for a big endian system (default)\n"
+" -EL assemble for a little endian system\n"
+" -mconfig=<name> specify a chip configuration to use\n"
+" -maverage -mno-average -mmult -mno-mult -mdiv -mno-div\n"
+" -mbitops -mno-bitops -mleadz -mno-leadz -mabsdiff -mno-absdiff\n"
+" -mminmax -mno-minmax -mclip -mno-clip -msatur -mno-satur -mcop32\n"
+" enable/disable the given opcodes\n"
+"\n"
+" If -mconfig is given, the other -m options modify it. Otherwise,\n"
+" if no -m options are given, all core opcodes are enabled;\n"
+" if any enabling -m options are given, only those are enabled;\n"
+" if only disabling -m options are given, only those are disabled.\n"
+msgstr ""
+
+#. There are no insns in the queue and a plus is present.
+#. This is a syntax error. Let's not tolerate this.
+#. We can relax this later if necessary.
+#: config/tc-mep.c:1007
+msgid "Invalid use of parallelization operator."
+msgstr ""
+
+#: config/tc-mep.c:1049
+msgid "Leading plus sign not allowed in core mode"
+msgstr ""
+
+#: config/tc-mep.c:1530
+#, c-format
+msgid "Don't know how to relocate plain operands of type %s"
+msgstr ""
+
+#: config/tc-mep.c:1540
+#, c-format
+msgid "Perhaps you are missing %%tpoff()?"
+msgstr ""
+
+#: config/tc-mep.c:1646
+msgid "Unmatched high relocation"
+msgstr ""
+
+#: config/tc-mep.c:1772
+msgid "Bad .section directive: want a,v,w,x,M,S in string"
+msgstr ""
+
+#: config/tc-mep.c:1830
+msgid ".vliw unavailable when VLIW is disabled."
+msgstr ""
+
#. Prototypes for static functions.
-#: config/tc-mips.c:957
+#: config/tc-mips.c:988
#, c-format
msgid "internal Error, line %d, %s"
msgstr ""
-#: config/tc-mips.c:1443
+#: config/tc-mips.c:1745
+msgid "-G may not be used in position-independent code"
+msgstr ""
+
+#: config/tc-mips.c:1792
#, c-format
msgid "internal: can't hash `%s': %s"
msgstr ""
-#: config/tc-mips.c:1451
+#: config/tc-mips.c:1800
#, c-format
msgid "internal error: bad mips16 opcode: %s %s\n"
msgstr ""
-#: config/tc-mips.c:1652
+#: config/tc-mips.c:1972
#, c-format
msgid "returned from mips_ip(%s) insn_opcode = 0x%x\n"
msgstr ""
-#: config/tc-mips.c:2327 config/tc-mips.c:13480
+#: config/tc-mips.c:2681 config/tc-mips.c:14040
msgid "extended instruction in delay slot"
msgstr ""
-#: config/tc-mips.c:2391 config/tc-mips.c:2401
+#: config/tc-mips.c:2745 config/tc-mips.c:2752
#, c-format
msgid "jump to misaligned address (0x%lx)"
msgstr ""
-#: config/tc-mips.c:2394 config/tc-mips.c:2404
+#: config/tc-mips.c:2762 config/tc-mips.c:3524
+#, c-format
+msgid "branch to misaligned address (0x%lx)"
+msgstr ""
+
+#: config/tc-mips.c:2767 config/tc-mips.c:3527
#, c-format
-msgid "jump address range overflow (0x%lx)"
+msgid "branch address range overflow (0x%lx)"
msgstr ""
-#: config/tc-mips.c:2893
+#: config/tc-mips.c:3252
msgid ""
"Macro instruction expanded into multiple instructions in a branch delay slot"
msgstr ""
-#: config/tc-mips.c:2896
+#: config/tc-mips.c:3255
msgid "Macro instruction expanded into multiple instructions"
msgstr ""
-#: config/tc-mips.c:3414 config/tc-mips.c:7338 config/tc-mips.c:7362
-#: config/tc-mips.c:7435 config/tc-mips.c:7458
+#: config/tc-mips.c:3796 config/tc-mips.c:7741 config/tc-mips.c:7765
+#: config/tc-mips.c:7838 config/tc-mips.c:7861
msgid "operand overflow"
msgstr ""
-#: config/tc-mips.c:3433 config/tc-mips.c:4033 config/tc-mips.c:6734
-#: config/tc-mips.c:7525
+#: config/tc-mips.c:3815 config/tc-mips.c:4415 config/tc-mips.c:7137
+#: config/tc-mips.c:7928
msgid "Macro used $at after \".set noat\""
msgstr ""
-#: config/tc-mips.c:3462
+#: config/tc-mips.c:3844
msgid "unsupported large constant"
msgstr ""
-#: config/tc-mips.c:3464
+#: config/tc-mips.c:3846
#, c-format
msgid "Instruction %s requires absolute expression"
msgstr ""
-#: config/tc-mips.c:3597 config/tc-mips.c:5844 config/tc-mips.c:6438
+#: config/tc-mips.c:3979 config/tc-mips.c:6249 config/tc-mips.c:6841
#, c-format
msgid "Number (0x%s) larger than 32 bits"
msgstr ""
-#: config/tc-mips.c:3617
+#: config/tc-mips.c:3999
msgid "Number larger than 64 bits"
msgstr ""
-#: config/tc-mips.c:3911 config/tc-mips.c:3939 config/tc-mips.c:3977
-#: config/tc-mips.c:4022 config/tc-mips.c:6053 config/tc-mips.c:6092
-#: config/tc-mips.c:6131 config/tc-mips.c:6553 config/tc-mips.c:6605
+#: config/tc-mips.c:4293 config/tc-mips.c:4321 config/tc-mips.c:4359
+#: config/tc-mips.c:4404 config/tc-mips.c:6458 config/tc-mips.c:6497
+#: config/tc-mips.c:6536 config/tc-mips.c:6956 config/tc-mips.c:7008
+#: config/tc-score.c:4239
msgid "PIC code offset overflow (max 16 signed bits)"
msgstr ""
-#: config/tc-mips.c:4328 config/tc-mips.c:4394 config/tc-mips.c:4482
-#: config/tc-mips.c:4529 config/tc-mips.c:4590 config/tc-mips.c:4638
-#: config/tc-mips.c:7619 config/tc-mips.c:7626 config/tc-mips.c:7633
-#: config/tc-mips.c:7740
+#: config/tc-mips.c:4726 config/tc-mips.c:4792 config/tc-mips.c:4880
+#: config/tc-mips.c:4927 config/tc-mips.c:4988 config/tc-mips.c:5036
+#: config/tc-mips.c:8022 config/tc-mips.c:8029 config/tc-mips.c:8036
+#: config/tc-mips.c:8143
msgid "Unsupported large constant"
msgstr ""
#. result is always true
-#: config/tc-mips.c:4360
+#: config/tc-mips.c:4758
#, c-format
msgid "Branch %s is always true"
msgstr ""
-#: config/tc-mips.c:4601 config/tc-mips.c:4649 config/tc-mips.c:8309
+#: config/tc-mips.c:4999 config/tc-mips.c:5047 config/tc-mips.c:8808
#, c-format
msgid "Improper position (%lu)"
msgstr ""
-#: config/tc-mips.c:4607 config/tc-mips.c:8376
+#: config/tc-mips.c:5005 config/tc-mips.c:8875
#, c-format
msgid "Improper extract size (%lu, position %lu)"
msgstr ""
-#: config/tc-mips.c:4655 config/tc-mips.c:8340
+#: config/tc-mips.c:5053 config/tc-mips.c:8839
#, c-format
msgid "Improper insert size (%lu, position %lu)"
msgstr ""
-#: config/tc-mips.c:4692 config/tc-mips.c:4789
+#: config/tc-mips.c:5090 config/tc-mips.c:5187
msgid "Divide by zero."
msgstr ""
-#: config/tc-mips.c:4875
+#: config/tc-mips.c:5273
msgid "dla used to load 32-bit register"
msgstr ""
-#: config/tc-mips.c:4878
+#: config/tc-mips.c:5276
msgid "la used to load 64-bit address"
msgstr ""
-#: config/tc-mips.c:4990
+#: config/tc-mips.c:5388 config/tc-z80.c:700
msgid "offset too large"
msgstr ""
-#: config/tc-mips.c:5162 config/tc-mips.c:5441
+#: config/tc-mips.c:5562 config/tc-mips.c:5841
msgid "PIC code offset overflow (max 32 signed bits)"
msgstr ""
-#: config/tc-mips.c:5487
+#: config/tc-mips.c:5887
msgid "MIPS PIC call to register other than $25"
msgstr ""
-#: config/tc-mips.c:5493 config/tc-mips.c:5504 config/tc-mips.c:5628
-#: config/tc-mips.c:5639
+#: config/tc-mips.c:5893 config/tc-mips.c:5904 config/tc-mips.c:6026
+#: config/tc-mips.c:6037
msgid "No .cprestore pseudo-op used in PIC code"
msgstr ""
-#: config/tc-mips.c:5498 config/tc-mips.c:5633
+#: config/tc-mips.c:5898 config/tc-mips.c:6031
msgid "No .frame pseudo-op used in PIC code"
msgstr ""
-#: config/tc-mips.c:5704 config/tc-mips.c:5792 config/tc-mips.c:6338
-#: config/tc-mips.c:6369 config/tc-mips.c:6387 config/tc-mips.c:7037
+#: config/tc-mips.c:6052
+msgid "Non-PIC jump used in PIC library"
+msgstr ""
+
+#: config/tc-mips.c:6104 config/tc-mips.c:6195 config/tc-mips.c:6741
+#: config/tc-mips.c:6772 config/tc-mips.c:6790 config/tc-mips.c:7440
msgid "opcode not supported on this processor"
msgstr ""
-#: config/tc-mips.c:6903 config/tc-mips.c:6934 config/tc-mips.c:6985
-#: config/tc-mips.c:7015
+#: config/tc-mips.c:7306 config/tc-mips.c:7337 config/tc-mips.c:7388
+#: config/tc-mips.c:7418
msgid "Improper rotate count"
msgstr ""
-#: config/tc-mips.c:7070
+#: config/tc-mips.c:7473
#, c-format
msgid "Instruction %s: result is always false"
msgstr ""
-#: config/tc-mips.c:7216
+#: config/tc-mips.c:7619
#, c-format
msgid "Instruction %s: result is always true"
msgstr ""
#. FIXME: Check if this is one of the itbl macros, since they
#. are added dynamically.
-#: config/tc-mips.c:7521
+#: config/tc-mips.c:7924
#, c-format
msgid "Macro %s not implemented yet"
msgstr ""
-#: config/tc-mips.c:7771
+#: config/tc-mips.c:8174
#, c-format
msgid "internal: bad mips opcode (mask error): %s %s"
msgstr ""
-#: config/tc-mips.c:7799 config/tc-mips.c:8430
+#: config/tc-mips.c:8206 config/tc-mips.c:8929
#, c-format
msgid "internal: bad mips opcode (unknown extension operand type `+%c'): %s %s"
msgstr ""
-#: config/tc-mips.c:7876
+#: config/tc-mips.c:8284
#, c-format
msgid "internal: bad mips opcode (unknown operand type `%c'): %s %s"
msgstr ""
-#: config/tc-mips.c:7883
+#: config/tc-mips.c:8291
#, c-format
msgid "internal: bad mips opcode (bits 0x%lx undefined): %s %s"
msgstr ""
-#: config/tc-mips.c:8000
+#: config/tc-mips.c:8473 config/tc-mips.c:9806
#, c-format
msgid "opcode not supported on this processor: %s (%s)"
msgstr ""
-#: config/tc-mips.c:8031 config/tc-mips.c:8045 config/tc-mips.c:8059
-#: config/tc-mips.c:8073 config/tc-mips.c:8100 config/tc-mips.c:8147
+#: config/tc-mips.c:8506
+#, c-format
+msgid "BALIGN immediate not 1 or 3 (%lu)"
+msgstr ""
+
+#: config/tc-mips.c:8519 config/tc-mips.c:8532 config/tc-mips.c:8545
+#: config/tc-mips.c:8558 config/tc-mips.c:8584 config/tc-mips.c:8628
#, c-format
msgid "DSP immediate not in range 0..%d (%lu)"
msgstr ""
-#: config/tc-mips.c:8092 config/tc-mips.c:8120
+#: config/tc-mips.c:8576 config/tc-mips.c:8603
msgid "Invalid dsp acc register"
msgstr ""
-#: config/tc-mips.c:8131 config/tc-mips.c:8165 config/tc-mips.c:8184
+#: config/tc-mips.c:8614 config/tc-mips.c:8645 config/tc-mips.c:8662
#, c-format
msgid "DSP immediate not in range %ld..%ld (%ld)"
msgstr ""
-#: config/tc-mips.c:8200 config/tc-mips.c:8214
+#: config/tc-mips.c:8675
+#, c-format
+msgid "MT usermode bit not 0 or 1 (%lu)"
+msgstr ""
+
+#: config/tc-mips.c:8686
#, c-format
-msgid "MT immediate not in range 0..%d (%lu)"
+msgid "MT load high bit not 0 or 1 (%lu)"
msgstr ""
-#: config/tc-mips.c:8233 config/tc-mips.c:8246
+#: config/tc-mips.c:8703 config/tc-mips.c:8716
msgid "Invalid dsp/smartmips acc register"
msgstr ""
-#: config/tc-mips.c:8395 config/tc-mips.c:8899
+#: config/tc-mips.c:8781
+#, c-format
+msgid "Illegal %s number (%lu, 0x%lx)"
+msgstr ""
+
+#: config/tc-mips.c:8894 config/tc-mips.c:9315
msgid "absolute expression required"
msgstr ""
-#: config/tc-mips.c:8418 config/tc-mips.c:8579
+#: config/tc-mips.c:8917
#, c-format
msgid "Invalid register number (%d)"
msgstr ""
-#: config/tc-mips.c:8426
+#: config/tc-mips.c:8925
msgid "Invalid coprocessor 0 register number"
msgstr ""
-#: config/tc-mips.c:8447
+#: config/tc-mips.c:8946
#, c-format
msgid "Improper shift amount (%lu)"
msgstr ""
-#: config/tc-mips.c:8470 config/tc-mips.c:9731 config/tc-mips.c:9844
+#: config/tc-mips.c:8969 config/tc-mips.c:10119 config/tc-mips.c:10372
#, c-format
msgid "Invalid value for `%s' (%lu)"
msgstr ""
-#: config/tc-mips.c:8485
+#: config/tc-mips.c:8984
#, c-format
-msgid "Illegal break code (%lu)"
+msgid "Code for %s not in range 0..1023 (%lu)"
msgstr ""
-#: config/tc-mips.c:8496
+#: config/tc-mips.c:8996
#, c-format
-msgid "Illegal lower break code (%lu)"
+msgid "Lower code for %s not in range 0..1023 (%lu)"
msgstr ""
-#: config/tc-mips.c:8507
+#: config/tc-mips.c:9008
#, c-format
-msgid "Illegal 20-bit code (%lu)"
+msgid "Code for %s not in range 0..1048575 (%lu)"
msgstr ""
-#: config/tc-mips.c:8519
+#: config/tc-mips.c:9021
#, c-format
msgid "Coproccesor code > 25 bits (%lu)"
msgstr ""
-#: config/tc-mips.c:8532
+#: config/tc-mips.c:9035
#, c-format
msgid "Illegal 19-bit code (%lu)"
msgstr ""
-#: config/tc-mips.c:8543
+#: config/tc-mips.c:9048
#, c-format
msgid "Invalid performance register (%lu)"
msgstr ""
-#: config/tc-mips.c:8754
+#: config/tc-mips.c:9188
#, c-format
msgid "Invalid MDMX Immediate (%ld)"
msgstr ""
-#: config/tc-mips.c:8794
-#, c-format
-msgid "Invalid float register number (%d)"
-msgstr ""
-
-#: config/tc-mips.c:8810
+#: config/tc-mips.c:9226
#, c-format
msgid "Float register should be even, was %d"
msgstr ""
-#: config/tc-mips.c:8849
+#: config/tc-mips.c:9265
#, c-format
msgid "Bad element selector %ld"
msgstr ""
-#: config/tc-mips.c:8857
+#: config/tc-mips.c:9273
#, c-format
msgid "Expecting ']' found '%s'"
msgstr ""
-#: config/tc-mips.c:8963
+#: config/tc-mips.c:9379
#, c-format
msgid "Bad floating point constant: %s"
msgstr ""
-#: config/tc-mips.c:9084
+#: config/tc-mips.c:9499
msgid "Can't use floating point insn in this section"
msgstr ""
-#: config/tc-mips.c:9145
+#: config/tc-mips.c:9560
msgid "expression out of range"
msgstr ""
-#: config/tc-mips.c:9185
+#: config/tc-mips.c:9600
msgid "lui expression not in range 0..65535"
msgstr ""
-#: config/tc-mips.c:9209
-#, c-format
-msgid "Invalid condition code register $fcc%d"
-msgstr ""
-
-#: config/tc-mips.c:9214
+#: config/tc-mips.c:9621
#, c-format
msgid "Condition code register should be even for %s, was %d"
msgstr ""
-#: config/tc-mips.c:9219
+#: config/tc-mips.c:9626
#, c-format
msgid "Condition code register should be 0 or 4 for %s, was %d"
msgstr ""
-#: config/tc-mips.c:9245
+#: config/tc-mips.c:9652
msgid "invalid coprocessor sub-selection value (0-7)"
msgstr ""
-#: config/tc-mips.c:9257 config/tc-mips.c:9274
+#: config/tc-mips.c:9664 config/tc-mips.c:9681
#, c-format
msgid "bad byte vector index (%ld)"
msgstr ""
-#: config/tc-mips.c:9285
+#: config/tc-mips.c:9692
#, c-format
msgid "bad char = '%c'\n"
msgstr ""
-#: config/tc-mips.c:9296 config/tc-mips.c:9301 config/tc-mips.c:9869
+#: config/tc-mips.c:9703 config/tc-mips.c:9708 config/tc-mips.c:10397
msgid "illegal operands"
msgstr ""
-#: config/tc-mips.c:9367
+#: config/tc-mips.c:9776 config/tc-score.c:2418
msgid "unrecognized opcode"
msgstr ""
-#: config/tc-mips.c:9504
-#, c-format
-msgid "invalid register number (%d)"
-msgstr ""
-
-#: config/tc-mips.c:9595
+#: config/tc-mips.c:9983
msgid "used $at without \".set noat\""
msgstr ""
-#: config/tc-mips.c:9763
+#: config/tc-mips.c:10155 config/tc-mips.c:10236 config/tc-mips.c:10251
msgid "can't parse register list"
msgstr ""
-#: config/tc-mips.c:9987
+#: config/tc-mips.c:10224
+msgid "more than one frame size in list"
+msgstr ""
+
+#: config/tc-mips.c:10279
+msgid "unexpected register in list"
+msgstr ""
+
+#: config/tc-mips.c:10289
+msgid "arg/static registers overlap"
+msgstr ""
+
+#: config/tc-mips.c:10307
+msgid "invalid arg register list"
+msgstr ""
+
+#: config/tc-mips.c:10316 config/tc-mips.c:10339
+msgid "invalid static register list"
+msgstr ""
+
+#: config/tc-mips.c:10346
+msgid "missing frame size"
+msgstr ""
+
+#: config/tc-mips.c:10349
+msgid "invalid frame size"
+msgstr ""
+
+#: config/tc-mips.c:10515
msgid "extended operand requested but not required"
msgstr ""
-#: config/tc-mips.c:9989
+#: config/tc-mips.c:10517
msgid "invalid unextended operand value"
msgstr ""
-#: config/tc-mips.c:10017
+#: config/tc-mips.c:10545
msgid "operand value out of range for instruction"
msgstr ""
-#: config/tc-mips.c:10469
+#: config/tc-mips.c:11007
#, c-format
msgid "A different %s was already specified, is now %s"
msgstr ""
-#: config/tc-mips.c:10689
+#: config/tc-mips.c:11242
msgid "-call_shared is supported only for ELF format"
msgstr ""
-#: config/tc-mips.c:10696 config/tc-mips.c:10725 config/tc-mips.c:11834
-#: config/tc-mips.c:12060
-msgid "-G may not be used with SVR4 PIC code"
-msgstr ""
-
-#: config/tc-mips.c:10705
+#: config/tc-mips.c:11252
msgid "-non_shared is supported only for ELF format"
msgstr ""
-#: config/tc-mips.c:10736
+#: config/tc-mips.c:11278
msgid "-32 is supported for ELF format only"
msgstr ""
-#: config/tc-mips.c:10745
+#: config/tc-mips.c:11287
msgid "-n32 is supported for ELF format only"
msgstr ""
-#: config/tc-mips.c:10754
+#: config/tc-mips.c:11296
msgid "-64 is supported for ELF format only"
msgstr ""
-#: config/tc-mips.c:10759 config/tc-mips.c:10796
+#: config/tc-mips.c:11301 config/tc-mips.c:11338
msgid "No compiled in support for 64 bit object file format"
msgstr ""
-#: config/tc-mips.c:10783
+#: config/tc-mips.c:11325
msgid "-mabi is supported for ELF format only"
msgstr ""
-#: config/tc-mips.c:10803
+#: config/tc-mips.c:11345
#, c-format
msgid "invalid abi -mabi=%s"
msgstr ""
-#: config/tc-mips.c:10877
+#: config/tc-mips.c:11423
msgid "-G not supported in this configuration."
msgstr ""
-#: config/tc-mips.c:10903
+#: config/tc-mips.c:11449
#, c-format
msgid "-%s conflicts with the other architecture options, which imply -%s"
msgstr ""
-#: config/tc-mips.c:10934
+#: config/tc-mips.c:11480
msgid "-mgp64 used with a 32-bit processor"
msgstr ""
-#: config/tc-mips.c:10936
+#: config/tc-mips.c:11482
msgid "-mgp32 used with a 64-bit ABI"
msgstr ""
-#: config/tc-mips.c:10938
+#: config/tc-mips.c:11484
msgid "-mgp64 used with a 32-bit ABI"
msgstr ""
-#: config/tc-mips.c:10968
+#: config/tc-mips.c:11522
+msgid "-mfp64 used with a 32-bit fpu"
+msgstr ""
+
+#: config/tc-mips.c:11525
+msgid "-mfp64 used with a 32-bit ABI"
+msgstr ""
+
+#: config/tc-mips.c:11529
+msgid "-mfp32 used with a 64-bit ABI"
+msgstr ""
+
+#: config/tc-mips.c:11543
msgid "trap exception not supported at ISA 1"
msgstr ""
-#: config/tc-mips.c:11229
-msgid "Cannot branch to undefined symbol."
+#: config/tc-mips.c:11553
+msgid "-mfp32 used with -mips3d"
msgstr ""
-#: config/tc-mips.c:11236
-msgid "Cannot branch to symbol in another section."
+#: config/tc-mips.c:11559
+msgid "-mfp32 used with -mdmx"
msgstr ""
-#: config/tc-mips.c:11245
-msgid "Pretending global symbol used as branch target is local."
+#: config/tc-mips.c:11632
+msgid "PC relative MIPS16 instruction references a different section"
msgstr ""
-#: config/tc-mips.c:11402 config/tc-sparc.c:3229 config/tc-sparc.c:3236
-#: config/tc-sparc.c:3243 config/tc-sparc.c:3250 config/tc-sparc.c:3257
-#: config/tc-sparc.c:3266 config/tc-sparc.c:3277 config/tc-sparc.c:3299
-#: config/tc-sparc.c:3323 write.c:861 write.c:933
+#: config/tc-mips.c:11923 config/tc-sparc.c:3283 config/tc-sparc.c:3290
+#: config/tc-sparc.c:3297 config/tc-sparc.c:3304 config/tc-sparc.c:3311
+#: config/tc-sparc.c:3320 config/tc-sparc.c:3331 config/tc-sparc.c:3353
+#: config/tc-sparc.c:3377 write.c:1096
msgid "relocation overflow"
msgstr ""
-#: config/tc-mips.c:11412
+#: config/tc-mips.c:11933
#, c-format
-msgid "Branch to odd address (%lx)"
+msgid "Branch to misaligned address (%lx)"
msgstr ""
-#: config/tc-mips.c:11461
+#: config/tc-mips.c:11980
msgid "Branch out of range"
msgstr ""
-#: config/tc-mips.c:11540
+#: config/tc-mips.c:12055
#, c-format
msgid "Alignment too large: %d. assumed."
msgstr ""
-#: config/tc-mips.c:11543
+#: config/tc-mips.c:12058
msgid "Alignment negative: 0 assumed."
msgstr ""
-#: config/tc-mips.c:11780
+#: config/tc-mips.c:12302
#, c-format
msgid "%s: no such section"
msgstr ""
-#: config/tc-mips.c:11829
+#: config/tc-mips.c:12351
#, c-format
msgid ".option pic%d not supported"
msgstr ""
-#: config/tc-mips.c:11840
+#: config/tc-mips.c:12356 config/tc-mips.c:12648
+msgid "-G may not be used with SVR4 PIC code"
+msgstr ""
+
+#: config/tc-mips.c:12362
#, c-format
msgid "Unrecognized option \"%s\""
msgstr ""
-#: config/tc-mips.c:11893
+#: config/tc-mips.c:12415
msgid "`noreorder' must be set before `nomacro'"
msgstr ""
-#: config/tc-mips.c:11952
+#: config/tc-mips.c:12532
#, c-format
msgid "unknown architecture %s"
msgstr ""
-#: config/tc-mips.c:11965 config/tc-mips.c:11995
+#: config/tc-mips.c:12545 config/tc-mips.c:12575
#, c-format
msgid "unknown ISA level %s"
msgstr ""
-#: config/tc-mips.c:11973
+#: config/tc-mips.c:12553
#, c-format
msgid "unknown ISA or architecture %s"
msgstr ""
-#: config/tc-mips.c:12023
+#: config/tc-mips.c:12603
msgid ".set pop with no .set push"
msgstr ""
-#: config/tc-mips.c:12044
+#: config/tc-mips.c:12632
#, c-format
msgid "Tried to set unrecognized symbol: %s\n"
msgstr ""
-#: config/tc-mips.c:12102
+#: config/tc-mips.c:12690
msgid ".cpload not in noreorder section"
msgstr ""
-#: config/tc-mips.c:12171 config/tc-mips.c:12190
+#: config/tc-mips.c:12758 config/tc-mips.c:12777
msgid "missing argument separator ',' for .cpsetup"
msgstr ""
-#: config/tc-mips.c:12380
+#: config/tc-mips.c:12971 config/tc-score.c:6323
msgid "Unsupported use of .gpword"
msgstr ""
-#: config/tc-mips.c:12416
+#: config/tc-mips.c:13011
msgid "Unsupported use of .gpdword"
msgstr ""
-#: config/tc-mips.c:12548
-msgid "expected `$'"
-msgstr ""
-
-#: config/tc-mips.c:12556
-msgid "Bad register number"
-msgstr ""
-
-#: config/tc-mips.c:12604
-msgid "Unrecognized register name"
-msgstr ""
-
-#: config/tc-mips.c:12837
+#: config/tc-mips.c:13356
msgid "unsupported PC relative reference to different section"
msgstr ""
-#: config/tc-mips.c:12950 config/tc-xtensa.c:1593 config/tc-xtensa.c:1804
+#: config/tc-mips.c:13469 config/tc-xtensa.c:1537 config/tc-xtensa.c:1772
msgid "unsupported relocation"
msgstr ""
-#: config/tc-mips.c:13158
+#: config/tc-mips.c:13719
#, c-format
msgid "Can not represent %s relocation in this object file format"
msgstr ""
-#: config/tc-mips.c:13244
+#: config/tc-mips.c:13804
msgid "relaxed out-of-range branch into a jump"
msgstr ""
-#: config/tc-mips.c:13766
+#: config/tc-mips.c:14334
msgid "missing .end at end of assembly"
msgstr ""
-#: config/tc-mips.c:13781
+#: config/tc-mips.c:14349 config/tc-score.c:5929
msgid "expected simple number"
msgstr ""
-#: config/tc-mips.c:13807
+#: config/tc-mips.c:14375 config/tc-score.c:5955
#, c-format
msgid " *input_line_pointer == '%c' 0x%02x\n"
msgstr ""
-#: config/tc-mips.c:13809
+#: config/tc-mips.c:14377 config/tc-score.c:5956
msgid "invalid number"
msgstr ""
-#: config/tc-mips.c:13882
+#: config/tc-mips.c:14450 config/tc-score.c:6105
msgid ".end not in text section"
msgstr ""
-#: config/tc-mips.c:13886
+#: config/tc-mips.c:14454 config/tc-score.c:6108
msgid ".end directive without a preceding .ent directive."
msgstr ""
-#: config/tc-mips.c:13895
+#: config/tc-mips.c:14463 config/tc-score.c:6116
msgid ".end symbol does not match .ent symbol."
msgstr ""
-#: config/tc-mips.c:13902
+#: config/tc-mips.c:14470 config/tc-score.c:6121
msgid ".end directive missing or unknown symbol"
msgstr ""
-#: config/tc-mips.c:13978
+#: config/tc-mips.c:14545 config/tc-score.c:5994
msgid ".ent or .aent not in text section."
msgstr ""
-#: config/tc-mips.c:13981
+#: config/tc-mips.c:14548 config/tc-score.c:5996
msgid "missing .end"
msgstr ""
-#: config/tc-mips.c:14033
+#: config/tc-mips.c:14600
msgid "Bad .frame directive"
msgstr ""
-#: config/tc-mips.c:14065
+#: config/tc-mips.c:14632
msgid ".mask/.fmask outside of .ent"
msgstr ""
-#: config/tc-mips.c:14072
+#: config/tc-mips.c:14639
msgid "Bad .mask/.fmask directive"
msgstr ""
-#: config/tc-mips.c:14337
+#: config/tc-mips.c:14934
#, c-format
msgid ""
"MIPS options:\n"
@@ -7350,7 +8010,7 @@ msgid ""
"\t\t\timplicitly with the gp register [default 8]\n"
msgstr ""
-#: config/tc-mips.c:14344
+#: config/tc-mips.c:14941
#, c-format
msgid ""
"-mips1\t\t\tgenerate MIPS ISA I instructions\n"
@@ -7365,7 +8025,7 @@ msgid ""
"-march=CPU/-mtune=CPU\tgenerate code/schedule for CPU, where CPU is one of:\n"
msgstr ""
-#: config/tc-mips.c:14363
+#: config/tc-mips.c:14960
#, c-format
msgid ""
"-mCPU\t\t\tequivalent to -march=CPU -mtune=CPU. Deprecated.\n"
@@ -7373,35 +8033,48 @@ msgid ""
"\t\t\tFor -mCPU and -no-mCPU, CPU must be one of:\n"
msgstr ""
-#: config/tc-mips.c:14376
+#: config/tc-mips.c:14973
#, c-format
msgid ""
"-mips16\t\t\tgenerate mips16 instructions\n"
"-no-mips16\t\tdo not generate mips16 instructions\n"
msgstr ""
-#: config/tc-mips.c:14379
+#: config/tc-mips.c:14976
+#, c-format
+msgid ""
+"-msmartmips\t\tgenerate smartmips instructions\n"
+"-mno-smartmips\t\tdo not generate smartmips instructions\n"
+msgstr ""
+
+#: config/tc-mips.c:14979
#, c-format
msgid ""
"-mdsp\t\t\tgenerate DSP instructions\n"
"-mno-dsp\t\tdo not generate DSP instructions\n"
msgstr ""
-#: config/tc-mips.c:14382
+#: config/tc-mips.c:14982
+#, c-format
+msgid ""
+"-mdspr2\t\t\tgenerate DSP R2 instructions\n"
+"-mno-dspr2\t\tdo not generate DSP R2 instructions\n"
+msgstr ""
+
+#: config/tc-mips.c:14985
#, c-format
msgid ""
"-mmt\t\t\tgenerate MT instructions\n"
"-mno-mt\t\t\tdo not generate MT instructions\n"
msgstr ""
-#: config/tc-mips.c:14385
+#: config/tc-mips.c:14988
#, c-format
msgid ""
"-mfix-vr4120\t\twork around certain VR4120 errata\n"
"-mfix-vr4130\t\twork around VR4130 mflo/mfhi errata\n"
"-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"
-"-mno-shared\t\toptimize output for executables\n"
"-msym32\t\t\tassume all symbols have 32-bit values\n"
"-O0\t\t\tremove unneeded NOPs, do not swap branches\n"
"-O\t\t\tremove unneeded NOPs and swap branches\n"
@@ -7410,19 +8083,20 @@ msgid ""
"--break, --no-trap\tbreak exception on div by 0 and mult overflow\n"
msgstr ""
-#: config/tc-mips.c:14398
+#: config/tc-mips.c:15000
#, c-format
msgid ""
"-KPIC, -call_shared\tgenerate SVR4 position independent code\n"
+"-mvxworks-pic\t\tgenerate VxWorks position independent code\n"
"-non_shared\t\tdo not generate position independent code\n"
"-xgot\t\t\tassume a 32 bit GOT\n"
"-mpdr, -mno-pdr\t\tenable/disable creation of .pdr sections\n"
"-mshared, -mno-shared disable/enable .cpload optimization for\n"
-" non-shared code\n"
+" position dependent (non shared) code\n"
"-mabi=ABI\t\tcreate ABI conformant object file for:\n"
msgstr ""
-#: config/tc-mips.c:14417
+#: config/tc-mips.c:15020
#, c-format
msgid ""
"-32\t\t\tcreate o32 ABI object file (default)\n"
@@ -7430,54 +8104,54 @@ msgid ""
"-64\t\t\tcreate 64 ABI object file\n"
msgstr ""
-#: config/tc-mmix.c:694
+#: config/tc-mmix.c:693
#, c-format
msgid " MMIX-specific command line options:\n"
msgstr ""
-#: config/tc-mmix.c:695
+#: config/tc-mmix.c:694
#, c-format
msgid ""
" -fixed-special-register-names\n"
" Allow only the original special register names.\n"
msgstr ""
-#: config/tc-mmix.c:698
+#: config/tc-mmix.c:697
#, c-format
msgid " -globalize-symbols Make all symbols global.\n"
msgstr ""
-#: config/tc-mmix.c:700
+#: config/tc-mmix.c:699
#, c-format
msgid " -gnu-syntax Turn off mmixal syntax compatibility.\n"
msgstr ""
-#: config/tc-mmix.c:702
+#: config/tc-mmix.c:701
#, c-format
msgid " -relax Create linker relaxable code.\n"
msgstr ""
-#: config/tc-mmix.c:704
+#: config/tc-mmix.c:703
#, c-format
msgid ""
" -no-predefined-syms Do not provide mmixal built-in constants.\n"
" Implies -fixed-special-register-names.\n"
msgstr ""
-#: config/tc-mmix.c:707
+#: config/tc-mmix.c:706
#, c-format
msgid ""
" -no-expand Do not expand GETA, branches, PUSHJ or JUMP\n"
" into multiple instructions.\n"
msgstr ""
-#: config/tc-mmix.c:710
+#: config/tc-mmix.c:709
#, c-format
msgid ""
" -no-merge-gregs Do not merge GREG definitions with nearby values.\n"
msgstr ""
-#: config/tc-mmix.c:712
+#: config/tc-mmix.c:711
#, c-format
msgid ""
" -linker-allocated-gregs If there's no suitable GREG definition for "
@@ -7485,7 +8159,7 @@ msgid ""
"resolve.\n"
msgstr ""
-#: config/tc-mmix.c:715
+#: config/tc-mmix.c:714
#, c-format
msgid ""
" -x Do not warn when an operand to GETA, a branch,\n"
@@ -7494,185 +8168,185 @@ msgid ""
" -linker-allocated-gregs."
msgstr ""
-#: config/tc-mmix.c:841
+#: config/tc-mmix.c:840
#, c-format
msgid "unknown opcode: `%s'"
msgstr ""
-#: config/tc-mmix.c:963 config/tc-mmix.c:978
+#: config/tc-mmix.c:962 config/tc-mmix.c:977
msgid "specified location wasn't TETRA-aligned"
msgstr ""
-#: config/tc-mmix.c:965 config/tc-mmix.c:980 config/tc-mmix.c:4124
-#: config/tc-mmix.c:4140
+#: config/tc-mmix.c:964 config/tc-mmix.c:979 config/tc-mmix.c:4125
+#: config/tc-mmix.c:4141
msgid "unaligned data at an absolute location is not supported"
msgstr ""
-#: config/tc-mmix.c:1090
+#: config/tc-mmix.c:1089
#, c-format
msgid "invalid operand to opcode %s: `%s'"
msgstr ""
-#: config/tc-mmix.c:1112 config/tc-mmix.c:1139 config/tc-mmix.c:1172
-#: config/tc-mmix.c:1180 config/tc-mmix.c:1197 config/tc-mmix.c:1225
-#: config/tc-mmix.c:1246 config/tc-mmix.c:1271 config/tc-mmix.c:1319
-#: config/tc-mmix.c:1417 config/tc-mmix.c:1442 config/tc-mmix.c:1474
-#: config/tc-mmix.c:1506 config/tc-mmix.c:1536 config/tc-mmix.c:1589
-#: config/tc-mmix.c:1606 config/tc-mmix.c:1633 config/tc-mmix.c:1661
-#: config/tc-mmix.c:1688 config/tc-mmix.c:1714 config/tc-mmix.c:1730
-#: config/tc-mmix.c:1756 config/tc-mmix.c:1772 config/tc-mmix.c:1788
-#: config/tc-mmix.c:1851 config/tc-mmix.c:1867
+#: config/tc-mmix.c:1111 config/tc-mmix.c:1138 config/tc-mmix.c:1171
+#: config/tc-mmix.c:1179 config/tc-mmix.c:1196 config/tc-mmix.c:1224
+#: config/tc-mmix.c:1245 config/tc-mmix.c:1270 config/tc-mmix.c:1318
+#: config/tc-mmix.c:1416 config/tc-mmix.c:1441 config/tc-mmix.c:1473
+#: config/tc-mmix.c:1505 config/tc-mmix.c:1535 config/tc-mmix.c:1588
+#: config/tc-mmix.c:1605 config/tc-mmix.c:1632 config/tc-mmix.c:1660
+#: config/tc-mmix.c:1687 config/tc-mmix.c:1713 config/tc-mmix.c:1729
+#: config/tc-mmix.c:1755 config/tc-mmix.c:1771 config/tc-mmix.c:1787
+#: config/tc-mmix.c:1850 config/tc-mmix.c:1866
#, c-format
msgid "invalid operands to opcode %s: `%s'"
msgstr ""
-#: config/tc-mmix.c:1844
+#: config/tc-mmix.c:1843
#, c-format
msgid "unsupported operands to %s: `%s'"
msgstr ""
-#: config/tc-mmix.c:1969
+#: config/tc-mmix.c:1968
msgid "internal: mmix_prefix_name but empty prefix"
msgstr ""
-#: config/tc-mmix.c:2013
+#: config/tc-mmix.c:2012
#, c-format
msgid "too many GREG registers allocated (max %d)"
msgstr ""
-#: config/tc-mmix.c:2071
+#: config/tc-mmix.c:2070
msgid "BSPEC already active. Nesting is not supported."
msgstr ""
-#: config/tc-mmix.c:2080
+#: config/tc-mmix.c:2079
msgid "invalid BSPEC expression"
msgstr ""
-#: config/tc-mmix.c:2096
+#: config/tc-mmix.c:2095
#, c-format
msgid "can't create section %s"
msgstr ""
-#: config/tc-mmix.c:2101
+#: config/tc-mmix.c:2100
#, c-format
msgid "can't set section flags for section %s"
msgstr ""
-#: config/tc-mmix.c:2122
+#: config/tc-mmix.c:2121
msgid "ESPEC without preceding BSPEC"
msgstr ""
-#: config/tc-mmix.c:2151
+#: config/tc-mmix.c:2150
msgid "missing local expression"
msgstr ""
-#: config/tc-mmix.c:2389
+#: config/tc-mmix.c:2388
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:2640
+#: config/tc-mmix.c:2639
msgid "directive LOCAL must be placed in code or data"
msgstr ""
-#: config/tc-mmix.c:2641
+#: config/tc-mmix.c:2640
msgid "internal confusion: relocation in a section without contents"
msgstr ""
-#: config/tc-mmix.c:2755
+#: config/tc-mmix.c:2754
msgid "internal: BFD_RELOC_MMIX_BASE_PLUS_OFFSET not resolved to section"
msgstr ""
-#: config/tc-mmix.c:2803
+#: config/tc-mmix.c:2802
msgid "no suitable GREG definition for operands"
msgstr ""
-#: config/tc-mmix.c:2862
+#: config/tc-mmix.c:2861
msgid "operands were not reducible at assembly-time"
msgstr ""
-#: config/tc-mmix.c:2889
+#: config/tc-mmix.c:2888
#, c-format
msgid "cannot generate relocation type for symbol %s, code %s"
msgstr ""
-#: config/tc-mmix.c:2909
+#: config/tc-mmix.c:2908
#, c-format
msgid "internal: unhandled label %s"
msgstr ""
-#: config/tc-mmix.c:2939
+#: config/tc-mmix.c:2938
msgid "[0-9]H labels may not appear alone on a line"
msgstr ""
-#: config/tc-mmix.c:2948
+#: config/tc-mmix.c:2947
msgid "[0-9]H labels do not mix with dot-pseudos"
msgstr ""
-#: config/tc-mmix.c:3036
+#: config/tc-mmix.c:3035
msgid "invalid characters in input"
msgstr ""
-#: config/tc-mmix.c:3140
+#: config/tc-mmix.c:3141
msgid "empty label field for IS"
msgstr ""
-#: config/tc-mmix.c:3466
+#: config/tc-mmix.c:3467
#, c-format
msgid "internal: unexpected relax type %d:%d"
msgstr ""
-#: config/tc-mmix.c:3488
+#: config/tc-mmix.c:3489
msgid "BSPEC without ESPEC."
msgstr ""
-#: config/tc-mmix.c:3688
+#: config/tc-mmix.c:3689
msgid "GREG expression too complicated"
msgstr ""
-#: config/tc-mmix.c:3703
+#: config/tc-mmix.c:3704
msgid "internal: GREG expression not resolved to section"
msgstr ""
-#: config/tc-mmix.c:3752
+#: config/tc-mmix.c:3753
msgid "register section has contents\n"
msgstr ""
-#: config/tc-mmix.c:3879
+#: config/tc-mmix.c:3880
msgid "section change from within a BSPEC/ESPEC pair is not supported"
msgstr ""
-#: config/tc-mmix.c:3900
+#: config/tc-mmix.c:3901
msgid "directive LOC from within a BSPEC/ESPEC pair is not supported"
msgstr ""
-#: config/tc-mmix.c:3911
+#: config/tc-mmix.c:3912
msgid "invalid LOC expression"
msgstr ""
-#: config/tc-mmix.c:3936 config/tc-mmix.c:3962
+#: config/tc-mmix.c:3937 config/tc-mmix.c:3963
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:4046 config/tc-mmix.c:4206
+#: config/tc-mmix.c:4047 config/tc-mmix.c:4207 config/tc-z80.c:1691
msgid "unterminated string"
msgstr ""
-#: config/tc-mmix.c:4063
+#: config/tc-mmix.c:4064
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:4072
+#: config/tc-mmix.c:4073
msgid "BYTE expression not in the range 0..255"
msgstr ""
-#: config/tc-mmix.c:4122 config/tc-mmix.c:4138
+#: config/tc-mmix.c:4123 config/tc-mmix.c:4139
msgid "data item with alignment larger than location"
msgstr ""
@@ -7682,82 +8356,82 @@ msgstr ""
msgid "`&' serial number operator is not supported"
msgstr ""
-#: config/tc-mn10200.c:305
+#: config/tc-mn10200.c:304
#, c-format
msgid ""
"MN10200 options:\n"
"none yet\n"
msgstr ""
-#: config/tc-mn10200.c:931 config/tc-mn10300.c:1392 config/tc-ppc.c:2135
-#: config/tc-s390.c:1557 config/tc-v850.c:1621
+#: config/tc-mn10200.c:930 config/tc-mn10300.c:1391 config/tc-ppc.c:2189
+#: config/tc-s390.c:1558 config/tc-v850.c:1636
#, c-format
msgid "Unrecognized opcode: `%s'"
msgstr ""
-#: config/tc-mn10200.c:1174 config/tc-mn10300.c:1965 config/tc-ppc.c:2614
-#: config/tc-s390.c:1472 config/tc-v850.c:2026
+#: config/tc-mn10200.c:1173 config/tc-mn10300.c:1964 config/tc-ppc.c:2668
+#: config/tc-s390.c:1473 config/tc-v850.c:2041
#, c-format
msgid "junk at end of line: `%s'"
msgstr ""
-#: config/tc-mn10300.c:695
+#: config/tc-mn10300.c:694
#, c-format
msgid ""
-"MN10300 options:\n"
+"MN10300 assembler options:\n"
"none yet\n"
msgstr ""
-#: config/tc-mn10300.c:1361 config/tc-sh.c:778 read.c:3871
+#: config/tc-mn10300.c:1360 config/tc-sh.c:776 config/tc-z80.c:671 read.c:4194
#, c-format
msgid "unsupported BFD relocation size %u"
msgstr ""
-#: config/tc-mn10300.c:1409
+#: config/tc-mn10300.c:1408
msgid "Invalid opcode/operands"
msgstr ""
-#: config/tc-mn10300.c:1936
+#: config/tc-mn10300.c:1935
msgid "Invalid register specification."
msgstr ""
-#: config/tc-mn10300.c:2518
+#: config/tc-mn10300.c:2522
#, c-format
msgid "Bad relocation fixup type (%d)"
msgstr ""
-#: config/tc-msp430.c:552
+#: config/tc-msp430.c:550
msgid ".profiler pseudo requires at least two operands."
msgstr ""
-#: config/tc-msp430.c:611
+#: config/tc-msp430.c:609
msgid "unknown profiling flag - ignored."
msgstr ""
-#: config/tc-msp430.c:627
+#: config/tc-msp430.c:625
msgid "ambigious flags combination - '.profiler' directive ignored."
msgstr ""
-#: config/tc-msp430.c:637
+#: config/tc-msp430.c:635
msgid "profiling in absolute section? Hm..."
msgstr ""
-#: config/tc-msp430.c:726
+#: config/tc-msp430.c:724
#, c-format
msgid "Known MCU names:\n"
msgstr ""
-#: config/tc-msp430.c:729
+#: config/tc-msp430.c:727
#, c-format
msgid "\t %s\n"
msgstr ""
-#: config/tc-msp430.c:755
+#: config/tc-msp430.c:753
#, c-format
msgid "redefinition of mcu type %s' to %s'"
msgstr ""
-#: config/tc-msp430.c:798
+#: config/tc-msp430.c:796
#, c-format
msgid ""
"MSP430 options:\n"
@@ -7785,322 +8459,322 @@ msgid ""
" msp430x447 msp430x448 msp430x449\n"
msgstr ""
-#: config/tc-msp430.c:821
+#: config/tc-msp430.c:819
#, c-format
msgid ""
" -mQ - enable relaxation at assembly time. DANGEROUS!\n"
" -mP - enable polymorph instructions\n"
msgstr ""
-#: config/tc-msp430.c:1011
+#: config/tc-msp430.c:1009
#, c-format
msgid "value %d out of range. Use #lo() or #hi()"
msgstr ""
-#: config/tc-msp430.c:1099
+#: config/tc-msp430.c:1097
#, c-format
msgid "unknown expression in operand %s. use #llo() #lhi() #hlo() #hhi() "
msgstr ""
-#: config/tc-msp430.c:1150
+#: config/tc-msp430.c:1148
#, c-format
msgid "Registers cannot be used within immediate expression [%s]"
msgstr ""
-#: config/tc-msp430.c:1152
+#: config/tc-msp430.c:1150
#, c-format
msgid "unknown operand %s"
msgstr ""
-#: config/tc-msp430.c:1174 config/tc-msp430.c:1309
+#: config/tc-msp430.c:1172 config/tc-msp430.c:1307
#, c-format
msgid "value out of range: %d"
msgstr ""
-#: config/tc-msp430.c:1185
+#: config/tc-msp430.c:1183
#, c-format
msgid "Registers cannot be used within absolute expression [%s]"
msgstr ""
-#: config/tc-msp430.c:1187 config/tc-msp430.c:1330
+#: config/tc-msp430.c:1185 config/tc-msp430.c:1328
#, c-format
msgid "unknown expression in operand %s"
msgstr ""
-#: config/tc-msp430.c:1201 config/tc-msp430.c:1208
+#: config/tc-msp430.c:1199 config/tc-msp430.c:1206
#, c-format
msgid "unknown addressing mode %s"
msgstr ""
-#: config/tc-msp430.c:1216
+#: config/tc-msp430.c:1214
#, c-format
msgid "Bad register name r%s"
msgstr ""
-#: config/tc-msp430.c:1228
+#: config/tc-msp430.c:1226
#, c-format
msgid "MSP430 does not have %d registers"
msgstr ""
-#: config/tc-msp430.c:1248
+#: config/tc-msp430.c:1246
msgid "')' required"
msgstr ""
-#: config/tc-msp430.c:1261
+#: config/tc-msp430.c:1259
#, c-format
msgid "unknown operator %s. Did you mean X(Rn) or #[hl][hl][oi](CONST) ?"
msgstr ""
-#: config/tc-msp430.c:1270
+#: config/tc-msp430.c:1268
#, c-format
msgid "unknown operator (r%s substituded as a register name"
msgstr ""
-#: config/tc-msp430.c:1282 config/tc-msp430.c:1293
+#: config/tc-msp430.c:1280 config/tc-msp430.c:1291
#, c-format
msgid "unknown operator %s"
msgstr ""
-#: config/tc-msp430.c:1287
+#: config/tc-msp430.c:1285
msgid "r2 should not be used in indexed addressing mode"
msgstr ""
-#: config/tc-msp430.c:1328
+#: config/tc-msp430.c:1326
#, c-format
msgid "Registers cannot be used as a prefix of indexed expression [%s]"
msgstr ""
#. Unreachable.
-#: config/tc-msp430.c:1377
+#: config/tc-msp430.c:1375
#, c-format
msgid "unknown addressing mode for operand %s"
msgstr ""
-#: config/tc-msp430.c:1402
+#: config/tc-msp430.c:1400
#, c-format
msgid "Internal bug. Try to use 0(r%d) instead of @r%d"
msgstr ""
-#: config/tc-msp430.c:1412
+#: config/tc-msp430.c:1410
msgid "this addressing mode is not applicable for destination operand"
msgstr ""
-#: config/tc-msp430.c:1456
+#: config/tc-msp430.c:1454
#, c-format
msgid "instruction %s requires %d operand(s)"
msgstr ""
-#: config/tc-msp430.c:1709
+#: config/tc-msp430.c:1707
#, c-format
msgid "Even number required. Rounded to %d"
msgstr ""
-#: config/tc-msp430.c:1720
+#: config/tc-msp430.c:1718
#, c-format
msgid "Wrong displacement %d"
msgstr ""
-#: config/tc-msp430.c:1737
+#: config/tc-msp430.c:1735
msgid "instruction requires label sans '$'"
msgstr ""
-#: config/tc-msp430.c:1742
+#: config/tc-msp430.c:1740
msgid "instruction requires label or value in range -511:512"
msgstr ""
-#: config/tc-msp430.c:1749 config/tc-msp430.c:1793 config/tc-msp430.c:1832
+#: config/tc-msp430.c:1747 config/tc-msp430.c:1791 config/tc-msp430.c:1830
msgid "instruction requires label"
msgstr ""
-#: config/tc-msp430.c:1757 config/tc-msp430.c:1799
+#: config/tc-msp430.c:1755 config/tc-msp430.c:1797
msgid "polymorphs are not enabled. Use -mP option to enable."
msgstr ""
-#: config/tc-msp430.c:1836
+#: config/tc-msp430.c:1834
msgid "Ilegal instruction or not implmented opcode."
msgstr ""
-#: config/tc-msp430.c:2187
+#: config/tc-msp430.c:2184
#, c-format
msgid "internal inconsistency problem in %s: insn %04lx"
msgstr ""
-#: config/tc-msp430.c:2217 config/tc-msp430.c:2240
+#: config/tc-msp430.c:2214 config/tc-msp430.c:2237
#, c-format
msgid "internal inconsistency problem in %s: ext. insn %04lx"
msgstr ""
-#: config/tc-msp430.c:2252
+#: config/tc-msp430.c:2249
#, c-format
msgid "internal inconsistency problem in %s: %lx"
msgstr ""
-#: config/tc-ns32k.c:441
+#: config/tc-ns32k.c:439
msgid "Invalid syntax in PC-relative addressing mode"
msgstr ""
-#: config/tc-ns32k.c:465
+#: config/tc-ns32k.c:463
msgid "Invalid syntax in External addressing mode"
msgstr ""
-#: config/tc-ns32k.c:546
+#: config/tc-ns32k.c:544
msgid "Invalid syntax in Memory Relative addressing mode"
msgstr ""
-#: config/tc-ns32k.c:613
+#: config/tc-ns32k.c:611
msgid "Invalid scaled-indexed mode, use (b,w,d,q)"
msgstr ""
-#: config/tc-ns32k.c:618
+#: config/tc-ns32k.c:616
msgid "Syntax in scaled-indexed mode, use [Rn:m] where n=[0..7] m={b,w,d,q}"
msgstr ""
-#: config/tc-ns32k.c:623
+#: config/tc-ns32k.c:621
msgid "Scaled-indexed addressing mode combined with scaled-index"
msgstr ""
-#: config/tc-ns32k.c:634
+#: config/tc-ns32k.c:632
msgid "Invalid or illegal addressing mode combined with scaled-index"
msgstr ""
-#: config/tc-ns32k.c:757
+#: config/tc-ns32k.c:755
msgid "Premature end of suffix -- Defaulting to d"
msgstr ""
-#: config/tc-ns32k.c:770
+#: config/tc-ns32k.c:768
msgid "Bad suffix after ':' use {b|w|d} Defaulting to d"
msgstr ""
-#: config/tc-ns32k.c:815
+#: config/tc-ns32k.c:813
msgid "Very short instr to option, ie you can't do it on a NULLstr"
msgstr ""
-#: config/tc-ns32k.c:865
+#: config/tc-ns32k.c:863
msgid "No such entry in list. (cpu/mmu register)"
msgstr ""
-#: config/tc-ns32k.c:922
+#: config/tc-ns32k.c:920
msgid "Internal consistency error. check ns32k-opcode.h"
msgstr ""
-#: config/tc-ns32k.c:946
+#: config/tc-ns32k.c:944
msgid "Address of immediate operand"
msgstr ""
-#: config/tc-ns32k.c:947
+#: config/tc-ns32k.c:945
msgid "Invalid immediate write operand."
msgstr ""
-#: config/tc-ns32k.c:1077
+#: config/tc-ns32k.c:1075
msgid "Bad opcode-table-option, check in file ns32k-opcode.h"
msgstr ""
-#: config/tc-ns32k.c:1110
+#: config/tc-ns32k.c:1108
msgid "No such opcode"
msgstr ""
-#: config/tc-ns32k.c:1185
+#: config/tc-ns32k.c:1183
msgid "Bad suffix, defaulting to d"
msgstr ""
-#: config/tc-ns32k.c:1212
+#: config/tc-ns32k.c:1210
msgid "Too many operands passed to instruction"
msgstr ""
#. Check error in default.
-#: config/tc-ns32k.c:1224
+#: config/tc-ns32k.c:1222
msgid "Wrong numbers of operands in default, check ns32k-opcodes.h"
msgstr ""
-#: config/tc-ns32k.c:1227
+#: config/tc-ns32k.c:1225
msgid "Wrong number of operands"
msgstr ""
-#: config/tc-ns32k.c:1300
+#: config/tc-ns32k.c:1298
#, c-format
msgid "Can not do %d byte pc-relative relocation for storage type %d"
msgstr ""
-#: config/tc-ns32k.c:1303
+#: config/tc-ns32k.c:1301
#, c-format
msgid "Can not do %d byte relocation for storage type %d"
msgstr ""
-#: config/tc-ns32k.c:1395
+#: config/tc-ns32k.c:1393
#, c-format
msgid "value of %ld out of byte displacement range."
msgstr ""
-#: config/tc-ns32k.c:1405
+#: config/tc-ns32k.c:1403
#, c-format
msgid "value of %ld out of word displacement range."
msgstr ""
-#: config/tc-ns32k.c:1420
+#: config/tc-ns32k.c:1418
#, c-format
msgid "value of %ld out of double word displacement range."
msgstr ""
-#: config/tc-ns32k.c:1441
+#: config/tc-ns32k.c:1439
#, c-format
msgid "Internal logic error. line %d, file \"%s\""
msgstr ""
-#: config/tc-ns32k.c:1489
+#: config/tc-ns32k.c:1487
#, c-format
msgid "Internal logic error. line %d, file \"%s\""
msgstr ""
-#: config/tc-ns32k.c:1590
+#: config/tc-ns32k.c:1588
msgid "Bit field out of range"
msgstr ""
-#: config/tc-ns32k.c:1690
+#: config/tc-ns32k.c:1688
msgid "iif convert internal pcrel/binary"
msgstr ""
-#: config/tc-ns32k.c:1707
+#: config/tc-ns32k.c:1705
msgid "Bignum too big for long"
msgstr ""
-#: config/tc-ns32k.c:1784
+#: config/tc-ns32k.c:1782
msgid "iif convert internal pcrel/pointer"
msgstr ""
-#: config/tc-ns32k.c:1789
+#: config/tc-ns32k.c:1787
msgid "Internal logic error in iif.iifP[n].type"
msgstr ""
#. We cant relax this case.
-#: config/tc-ns32k.c:1825
+#: config/tc-ns32k.c:1823
msgid "Can't relax difference"
msgstr ""
-#: config/tc-ns32k.c:1866
-msgid "Displacement to large for :d"
+#: config/tc-ns32k.c:1864
+msgid "Displacement too large for :d"
msgstr ""
-#: config/tc-ns32k.c:1879
+#: config/tc-ns32k.c:1877
msgid "Internal logic error in iif.iifP[].type"
msgstr ""
#. Fatal.
-#: config/tc-ns32k.c:1911
+#: config/tc-ns32k.c:1909
#, c-format
msgid "Can't hash %s: %s"
msgstr ""
-#: config/tc-ns32k.c:2181
+#: config/tc-ns32k.c:2179
#, c-format
msgid "invalid architecture option -m%s, ignored"
msgstr ""
-#: config/tc-ns32k.c:2194
+#: config/tc-ns32k.c:2192
#, c-format
msgid "invalid default displacement size \"%s\". Defaulting to %d."
msgstr ""
-#: config/tc-ns32k.c:2210
+#: config/tc-ns32k.c:2208
#, c-format
msgid ""
"NS32K options:\n"
@@ -8108,45 +8782,45 @@ msgid ""
"--disp-size-default=<1|2|4>\n"
msgstr ""
-#: config/tc-ns32k.c:2285
+#: config/tc-ns32k.c:2283
#, c-format
msgid "Cannot find relocation type for symbol %s, code %d"
msgstr ""
-#: config/tc-or32.c:360
+#: config/tc-or32.c:361
#, c-format
msgid "unknown opcode1: `%s'"
msgstr ""
-#: config/tc-or32.c:366
+#: config/tc-or32.c:367
#, c-format
msgid "unknown opcode2 `%s'."
msgstr ""
-#: config/tc-or32.c:403
+#: config/tc-or32.c:404
#, c-format
msgid "instruction not allowed: %s"
msgstr ""
-#: config/tc-or32.c:406
+#: config/tc-or32.c:407
#, c-format
msgid "too many operands: %s"
msgstr ""
-#: config/tc-or32.c:490
+#: config/tc-or32.c:491
msgid "call/jmp target out of range (1)"
msgstr ""
-#: config/tc-or32.c:674
+#: config/tc-or32.c:672
msgid "call/jmp target out of range (2)"
msgstr ""
-#: config/tc-or32.c:693
+#: config/tc-or32.c:691
#, c-format
msgid "bad relocation type: 0x%02x"
msgstr ""
-#: config/tc-or32.c:885
+#: config/tc-or32.c:883
msgid "invalid register in & expression"
msgstr ""
@@ -8154,7 +8828,7 @@ msgstr ""
msgid "Low order bits truncated in immediate float operand"
msgstr ""
-#: config/tc-pdp11.c:679
+#: config/tc-pdp11.c:679 config/tc-z80.c:1890 config/tc-z80.c:1903
#, c-format
msgid "Unknown instruction '%s'"
msgstr ""
@@ -8180,8 +8854,8 @@ msgid ""
"-big\t\t\tgenerate big endian code\n"
msgstr ""
-#: config/tc-pj.c:431 config/tc-sh.c:3955 config/tc-sh.c:3962
-#: config/tc-sh.c:3969 config/tc-sh.c:3976
+#: config/tc-pj.c:431 config/tc-sh.c:4086 config/tc-sh.c:4093
+#: config/tc-sh.c:4100 config/tc-sh.c:4107
msgid "pcrel too far"
msgstr ""
@@ -8193,17 +8867,17 @@ msgstr ""
msgid "estimate size\n"
msgstr ""
-#: config/tc-ppc.c:991
+#: config/tc-ppc.c:979
#, c-format
msgid "%s unsupported"
msgstr ""
-#: config/tc-ppc.c:1057 config/tc-s390.c:417 config/tc-s390.c:424
+#: config/tc-ppc.c:1045 config/tc-s390.c:418 config/tc-s390.c:425
#, c-format
msgid "invalid switch -m%s"
msgstr ""
-#: config/tc-ppc.c:1094
+#: config/tc-ppc.c:1081
#, c-format
msgid ""
"PowerPC options:\n"
@@ -8221,7 +8895,7 @@ msgid ""
"\t\t\tgenerate code For PowerPC 7400/7410/7450/7455\n"
msgstr ""
-#: config/tc-ppc.c:1108
+#: config/tc-ppc.c:1095
#, c-format
msgid ""
"-mppc64, -m620\t\tgenerate code for PowerPC 620/625/630\n"
@@ -8230,11 +8904,13 @@ msgid ""
"-mbooke, mbooke32\tgenerate code for 32-bit PowerPC BookE\n"
"-mpower4\t\tgenerate code for Power4 architecture\n"
"-mpower5\t\tgenerate code for Power5 architecture\n"
+"-mpower6\t\tgenerate code for Power6 architecture\n"
+"-mcell\t\t\tgenerate code for Cell Broadband Engine architecture\n"
"-mcom\t\t\tgenerate code Power/PowerPC common instructions\n"
"-many\t\t\tgenerate code for any architecture (PWR/PWRX/PPC)\n"
msgstr ""
-#: config/tc-ppc.c:1117
+#: config/tc-ppc.c:1106
#, c-format
msgid ""
"-maltivec\t\tgenerate code for AltiVec\n"
@@ -8245,7 +8921,7 @@ msgid ""
"-mno-regnames\t\tDo not allow symbolic names for registers\n"
msgstr ""
-#: config/tc-ppc.c:1125
+#: config/tc-ppc.c:1114
#, c-format
msgid ""
"-mrelocatable\t\tsupport for GCC's -mrelocatble option\n"
@@ -8261,251 +8937,276 @@ msgid ""
"-Qy, -Qn\t\tignored\n"
msgstr ""
-#: config/tc-ppc.c:1162
+#: config/tc-ppc.c:1151
#, c-format
msgid "Unknown default cpu = %s, os = %s"
msgstr ""
-#: config/tc-ppc.c:1188
+#: config/tc-ppc.c:1177
msgid "Neither Power nor PowerPC opcodes were selected."
msgstr ""
-#: config/tc-ppc.c:1285 config/tc-s390.c:519
+#: config/tc-ppc.c:1256
#, c-format
-msgid "Internal assembler error for instruction %s"
+msgid "powerpc_operands[%d].bitm invalid"
+msgstr ""
+
+#: config/tc-ppc.c:1263
+#, c-format
+msgid "powerpc_operands[%d] duplicates powerpc_operands[%d]"
+msgstr ""
+
+#: config/tc-ppc.c:1281
+#, c-format
+msgid "mask trims opcode bits for %s"
+msgstr ""
+
+#: config/tc-ppc.c:1290
+#, c-format
+msgid "operand index error for %s"
+msgstr ""
+
+#: config/tc-ppc.c:1302
+#, c-format
+msgid "operand %d overlap in %s"
+msgstr ""
+
+#: config/tc-ppc.c:1344
+#, c-format
+msgid "duplicate instruction %s"
msgstr ""
-#: config/tc-ppc.c:1309
+#: config/tc-ppc.c:1368
#, c-format
-msgid "Internal assembler error for macro %s"
+msgid "duplicate macro %s"
msgstr ""
-#: config/tc-ppc.c:1640
+#: config/tc-ppc.c:1702
msgid "identifier+constant@got means identifier@got+constant"
msgstr ""
-#: config/tc-ppc.c:1707
+#: config/tc-ppc.c:1768
#, c-format
msgid "%s relocations do not fit in %d bytes\n"
msgstr ""
-#: config/tc-ppc.c:1814
+#: config/tc-ppc.c:1873
#, c-format
msgid "Length of .lcomm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/tc-ppc.c:1896
+#: config/tc-ppc.c:1953
msgid "Relocation cannot be done when using -mrelocatable"
msgstr ""
-#: config/tc-ppc.c:1945
+#: config/tc-ppc.c:2002
msgid "TOC section size exceeds 64k"
msgstr ""
-#: config/tc-ppc.c:2027
+#: config/tc-ppc.c:2083
#, c-format
msgid "syntax error: invalid toc specifier `%s'"
msgstr ""
-#: config/tc-ppc.c:2041
+#: config/tc-ppc.c:2097
#, c-format
msgid "syntax error: expected `]', found `%c'"
msgstr ""
-#: config/tc-ppc.c:2320
+#: config/tc-ppc.c:2374
msgid "[tocv] symbol is not a toc symbol"
msgstr ""
-#: config/tc-ppc.c:2331
+#: config/tc-ppc.c:2385
msgid "Unimplemented toc32 expression modifier"
msgstr ""
-#: config/tc-ppc.c:2336
+#: config/tc-ppc.c:2390
msgid "Unimplemented toc64 expression modifier"
msgstr ""
-#: config/tc-ppc.c:2340
+#: config/tc-ppc.c:2394
#, c-format
msgid "Unexpected return value [%d] from parse_toc_entry!\n"
msgstr ""
-#: config/tc-ppc.c:2558
+#: config/tc-ppc.c:2612
msgid "unsupported relocation for DS offset field"
msgstr ""
-#: config/tc-ppc.c:2602
+#: config/tc-ppc.c:2656
#, c-format
msgid "syntax error; found `%c' but expected `%c'"
msgstr ""
-#: config/tc-ppc.c:2645 config/tc-ppc.h:111
+#: config/tc-ppc.c:2699 config/tc-ppc.h:92
msgid "instruction address is not a multiple of 4"
msgstr ""
-#: config/tc-ppc.c:2756
+#: config/tc-ppc.c:2808
msgid "wrong number of operands"
msgstr ""
-#: config/tc-ppc.c:2812
+#: config/tc-ppc.c:2862
msgid "Bad .section directive: want a,e,w,x,M,S,G,T in string"
msgstr ""
-#: config/tc-ppc.c:2927
+#: config/tc-ppc.c:2968
msgid "missing size"
msgstr ""
-#: config/tc-ppc.c:2936
+#: config/tc-ppc.c:2977
msgid "negative size"
msgstr ""
-#: config/tc-ppc.c:2973
+#: config/tc-ppc.c:3014
msgid "missing real symbol name"
msgstr ""
-#: config/tc-ppc.c:2994
+#: config/tc-ppc.c:3035
msgid "attempt to redefine symbol"
msgstr ""
-#: config/tc-ppc.c:3241
+#: config/tc-ppc.c:3277
msgid "The XCOFF file format does not support arbitrary sections"
msgstr ""
-#: config/tc-ppc.c:3318
+#: config/tc-ppc.c:3351
msgid "missing rename string"
msgstr ""
-#: config/tc-ppc.c:3349 config/tc-ppc.c:3904 read.c:3064
+#: config/tc-ppc.c:3381 config/tc-ppc.c:3923 read.c:3260
msgid "missing value"
msgstr ""
-#: config/tc-ppc.c:3367
+#: config/tc-ppc.c:3399
msgid "illegal .stabx expression; zero assumed"
msgstr ""
-#: config/tc-ppc.c:3399
+#: config/tc-ppc.c:3431
msgid "missing class"
msgstr ""
-#: config/tc-ppc.c:3408
+#: config/tc-ppc.c:3440
msgid "missing type"
msgstr ""
-#: config/tc-ppc.c:3489
+#: config/tc-ppc.c:3520
msgid "missing symbol name"
msgstr ""
-#: config/tc-ppc.c:3683
+#: config/tc-ppc.c:3710
msgid "nested .bs blocks"
msgstr ""
-#: config/tc-ppc.c:3716
+#: config/tc-ppc.c:3742
msgid ".es without preceding .bs"
msgstr ""
-#: config/tc-ppc.c:3896
+#: config/tc-ppc.c:3915
msgid "non-constant byte count"
msgstr ""
-#: config/tc-ppc.c:3944
+#: config/tc-ppc.c:3962
msgid ".tc not in .toc section"
msgstr ""
-#: config/tc-ppc.c:3963
+#: config/tc-ppc.c:3981
msgid ".tc with no label"
msgstr ""
-#: config/tc-ppc.c:4055
+#: config/tc-ppc.c:4072
msgid ".machine stack overflow"
msgstr ""
-#: config/tc-ppc.c:4062
+#: config/tc-ppc.c:4079
msgid ".machine stack underflow"
msgstr ""
-#: config/tc-ppc.c:4069
+#: config/tc-ppc.c:4086
#, c-format
msgid "invalid machine `%s'"
msgstr ""
-#: config/tc-ppc.c:4123
+#: config/tc-ppc.c:4137
msgid "No previous section to return to. Directive ignored."
msgstr ""
#. Section Contents
#. unknown
-#: config/tc-ppc.c:4540
+#: config/tc-ppc.c:4547
msgid "Unsupported section attribute -- 'a'"
msgstr ""
-#: config/tc-ppc.c:4729
+#: config/tc-ppc.c:4731
msgid "bad symbol suffix"
msgstr ""
-#: config/tc-ppc.c:4822
+#: config/tc-ppc.c:4823
msgid "Unrecognized symbol suffix"
msgstr ""
-#: config/tc-ppc.c:4912
+#: config/tc-ppc.c:4911
msgid "two .function pseudo-ops with no intervening .ef"
msgstr ""
-#: config/tc-ppc.c:4925
+#: config/tc-ppc.c:4924
msgid ".ef with no preceding .function"
msgstr ""
-#: config/tc-ppc.c:5053
+#: config/tc-ppc.c:5052
#, c-format
msgid "warning: symbol %s has no csect"
msgstr ""
-#: config/tc-ppc.c:5357
+#: config/tc-ppc.c:5345
msgid "symbol in .toc does not match any .tc"
msgstr ""
-#: config/tc-ppc.c:5686 config/tc-s390.c:2092 config/tc-v850.c:2314
+#: config/tc-ppc.c:5709 config/tc-s390.c:2093 config/tc-v850.c:2343
#: config/tc-xstormy16.c:538
msgid "unresolved expression that must be resolved"
msgstr ""
-#: config/tc-ppc.c:5689
+#: config/tc-ppc.c:5712
#, c-format
msgid "unsupported relocation against %s"
msgstr ""
-#: config/tc-ppc.c:5762
+#: config/tc-ppc.c:5785
#, c-format
msgid "cannot emit PC relative %s relocation against %s"
msgstr ""
-#: config/tc-ppc.c:5767
+#: config/tc-ppc.c:5790
#, c-format
msgid "cannot emit PC relative %s relocation"
msgstr ""
-#: config/tc-ppc.c:5949
+#: config/tc-ppc.c:5972
#, c-format
msgid "Unable to handle reference to symbol %s"
msgstr ""
-#: config/tc-ppc.c:5952
+#: config/tc-ppc.c:5975
msgid "Unable to resolve expression"
msgstr ""
-#: config/tc-ppc.c:5979
+#: config/tc-ppc.c:6002
msgid "must branch to an address a multiple of 4"
msgstr ""
-#: config/tc-ppc.c:5983
+#: config/tc-ppc.c:6006
#, c-format
msgid "@local or @plt branch destination is too far away, %ld bytes"
msgstr ""
-#: config/tc-ppc.c:6014
+#: config/tc-ppc.c:6037
#, c-format
msgid "Gas failure, reloc value %d\n"
msgstr ""
-#: config/tc-s390.c:460
+#: config/tc-s390.c:461
#, c-format
msgid ""
" S390 options:\n"
@@ -8516,80 +9217,375 @@ msgid ""
" -m64 Set file format to 64 bit format\n"
msgstr ""
-#: config/tc-s390.c:467
+#: config/tc-s390.c:468
#, c-format
msgid ""
" -V print assembler version number\n"
" -Qy, -Qn ignored\n"
msgstr ""
-#: config/tc-s390.c:503
+#: config/tc-s390.c:504
#, c-format
msgid "Internal assembler error for instruction format %s"
msgstr ""
-#: config/tc-s390.c:766
+#: config/tc-s390.c:520
+#, c-format
+msgid "Internal assembler error for instruction %s"
+msgstr ""
+
+#: config/tc-s390.c:767
#, c-format
msgid "identifier+constant@%s means identifier@%s+constant"
msgstr ""
-#: config/tc-s390.c:849
+#: config/tc-s390.c:850
msgid "Can't handle O_big in s390_exp_compare"
msgstr ""
-#: config/tc-s390.c:933
+#: config/tc-s390.c:934
msgid "Invalid suffix for literal pool entry"
msgstr ""
-#: config/tc-s390.c:990
+#: config/tc-s390.c:991
msgid "Big number is too big"
msgstr ""
-#: config/tc-s390.c:1138
+#: config/tc-s390.c:1139
msgid "relocation not applicable"
msgstr ""
-#: config/tc-s390.c:1326
+#: config/tc-s390.c:1327
msgid "invalid operand suffix"
msgstr ""
-#: config/tc-s390.c:1349
+#: config/tc-s390.c:1350
msgid "syntax error; missing '(' after displacement"
msgstr ""
-#: config/tc-s390.c:1365 config/tc-s390.c:1409 config/tc-s390.c:1439
+#: config/tc-s390.c:1366 config/tc-s390.c:1410 config/tc-s390.c:1440
msgid "syntax error; expected ,"
msgstr ""
-#: config/tc-s390.c:1397
+#: config/tc-s390.c:1398
msgid "syntax error; missing ')' after base register"
msgstr ""
-#: config/tc-s390.c:1426
+#: config/tc-s390.c:1427
msgid "syntax error; ')' not allowed here"
msgstr ""
-#: config/tc-s390.c:1619 config/tc-s390.c:1642 config/tc-s390.c:1655
+#: config/tc-s390.c:1620 config/tc-s390.c:1643 config/tc-s390.c:1656
msgid "Invalid .insn format\n"
msgstr ""
-#: config/tc-s390.c:1627
+#: config/tc-s390.c:1628
#, c-format
msgid "Unrecognized opcode format: `%s'"
msgstr ""
-#: config/tc-s390.c:1658
+#: config/tc-s390.c:1659
msgid "second operand of .insn not a constant\n"
msgstr ""
-#: config/tc-s390.c:1661
+#: config/tc-s390.c:1662
msgid "missing comma after insn constant\n"
msgstr ""
-#: config/tc-s390.c:2095
+#: config/tc-s390.c:2096
msgid "unsupported relocation type"
msgstr ""
+#: config/tc-score.c:49
+msgid "instruction is not conditional"
+msgstr ""
+
+#: config/tc-score.c:50
+msgid "acc0 expected"
+msgstr ""
+
+#: config/tc-score.c:51
+msgid "div / mul are reserved instructions"
+msgstr ""
+
+#: config/tc-score.c:52
+msgid "This architecture doesn't support mmu"
+msgstr ""
+
+#: config/tc-score.c:53
+msgid "This architecture doesn't support atomic instruction"
+msgstr ""
+
+#: config/tc-score.c:54
+msgid "the label length is longer than 1024"
+msgstr ""
+
+#: config/tc-score.c:238
+msgid "S+core register expected"
+msgstr ""
+
+#: config/tc-score.c:239
+msgid "S+core special-register expected"
+msgstr ""
+
+#: config/tc-score.c:240
+msgid "S+core co-processor register expected"
+msgstr ""
+
+#: config/tc-score.c:858 config/tc-score.c:1758
+msgid "Using temp register(r1)"
+msgstr ""
+
+#: config/tc-score.c:877
+#, c-format
+msgid "register expected, not '%.100s'"
+msgstr ""
+
+#: config/tc-score.c:1263 config/tc-score.c:1270 config/tc-score.c:2645
+#: config/tc-score.c:2650 config/tc-score.c:2928 config/tc-score.c:2933
+#, c-format
+msgid "invalid constant: %d bit expression not in range %d..%d"
+msgstr ""
+
+#: config/tc-score.c:1310
+msgid "invalid constant: bit expression not defined"
+msgstr ""
+
+#: config/tc-score.c:1772
+#, c-format
+msgid "low register(r0-r15)expected, not '%.100s'"
+msgstr ""
+
+#: config/tc-score.c:1867
+#, c-format
+msgid "high register(r16-r31)expected, not '%.100s'"
+msgstr ""
+
+#: config/tc-score.c:2099
+#, c-format
+msgid "Fix data dependency: %s %s -- %s %s (insert %d nop!/%d)"
+msgstr ""
+
+#: config/tc-score.c:2118
+#, c-format
+msgid "Fix data dependency: %s %s -- %s %s (insert 1 pflush/%d)"
+msgstr ""
+
+#: config/tc-score.c:2134 config/tc-score.c:2141
+#, c-format
+msgid "data dependency: %s %s -- %s %s (%d/%d bubble)"
+msgstr ""
+
+#: config/tc-score.c:2431 config/tc-score.c:5662
+#, c-format
+msgid "%s -- `%s'"
+msgstr ""
+
+#: config/tc-score.c:2588
+msgid "address offset must be half word alignment"
+msgstr ""
+
+#: config/tc-score.c:2596
+msgid "address offset must be word alignment"
+msgstr ""
+
+#: config/tc-score.c:2738 config/tc-score.c:2885
+msgid "register same as write-back base"
+msgstr ""
+
+#: config/tc-score.c:2855
+msgid "pre-indexed expression expected"
+msgstr ""
+
+#: config/tc-score.c:2865 config/tc-score.c:3223 config/tc-score.c:3239
+#: config/tc-score.c:3310 config/tc-score.c:3353 config/tc-score.c:3475
+#: config/tc-score.c:3549 config/tc-score.c:3603 config/tc-score.c:3649
+msgid "missing ]"
+msgstr ""
+
+#: config/tc-score.c:3466
+msgid "base register nums are over 3 bit"
+msgstr ""
+
+#: config/tc-score.c:3543 config/tc-score.c:3594
+msgid "missing +"
+msgstr ""
+
+#: config/tc-score.c:3587
+#, c-format
+msgid "%s register same as write-back base"
+msgstr ""
+
+#: config/tc-score.c:3589
+msgid "destination"
+msgstr ""
+
+#: config/tc-score.c:3589
+msgid "source"
+msgstr ""
+
+#: config/tc-score.c:3993
+msgid "li rd label isn't correct instruction form"
+msgstr ""
+
+#: config/tc-score.c:4506 config/tc-score.c:4535 config/tc-score.c:4561
+msgid "lacking label "
+msgstr ""
+
+#: config/tc-score.c:4513
+msgid "invalid constant: 25 bit expression not in range -2^24..2^24"
+msgstr ""
+
+#: config/tc-score.c:4541
+msgid "invalid constant: 12 bit expression not in range -2^11..2^11"
+msgstr ""
+
+#: config/tc-score.c:4567
+msgid "invalid constant: 20 bit expression not in range -2^19..2^19"
+msgstr ""
+
+#: config/tc-score.c:4600
+msgid "lacking label"
+msgstr ""
+
+#: config/tc-score.c:4605
+msgid "invalid constant: 9 bit expression not in range -2^8..2^8"
+msgstr ""
+
+#: config/tc-score.c:5344
+#, c-format
+msgid " branch relocation truncate (0x%x) [-2^8 ~ 2^8]"
+msgstr ""
+
+#: config/tc-score.c:5361 config/tc-score.c:5391
+#, c-format
+msgid " branch relocation truncate (0x%x) [-2^19 ~ 2^19]"
+msgstr ""
+
+#: config/tc-score.c:5415
+#, c-format
+msgid " branch relocation truncate (0x%x) [-2^8 ~ 2^8]"
+msgstr ""
+
+#: config/tc-score.c:5581
+#, c-format
+msgid "cannot represent %s relocation in this object file format1"
+msgstr ""
+
+#: config/tc-score.c:5640
+msgid "pce instruction error (16 bit || 16 bit)'"
+msgstr ""
+
+#: config/tc-score.c:5770
+#, c-format
+msgid "Sunplus-v2-0-0-20060510\n"
+msgstr ""
+
+#: config/tc-score.c:5786
+#, c-format
+msgid " Score-specific assembler options:\n"
+msgstr ""
+
+#: config/tc-score.c:5788
+#, c-format
+msgid " -EB\t\tassemble code for a big-endian cpu\n"
+msgstr ""
+
+#: config/tc-score.c:5793
+#, c-format
+msgid " -EL\t\tassemble code for a little-endian cpu\n"
+msgstr ""
+
+#: config/tc-score.c:5797
+#, c-format
+msgid " -FIXDD\t\tassemble code for fix data dependency\n"
+msgstr ""
+
+#: config/tc-score.c:5799
+#, c-format
+msgid ""
+" -NWARN\t\tassemble code for no warning message for fix data "
+"dependency\n"
+msgstr ""
+
+#: config/tc-score.c:5801
+#, c-format
+msgid " -SCORE5\t\tassemble code for target is SCORE5\n"
+msgstr ""
+
+#: config/tc-score.c:5803
+#, c-format
+msgid " -SCORE5U\tassemble code for target is SCORE5U\n"
+msgstr ""
+
+#: config/tc-score.c:5805
+#, c-format
+msgid ""
+" -SCORE7\t\tassemble code for target is SCORE7, this is default "
+"setting\n"
+msgstr ""
+
+#: config/tc-score.c:5807
+#, c-format
+msgid ""
+" -USE_R1\t\tassemble code for no warning message when using temp "
+"register r1\n"
+msgstr ""
+
+#: config/tc-score.c:5809
+#, c-format
+msgid " -KPIC\t\tassemble code for PIC\n"
+msgstr ""
+
+#: config/tc-score.c:5811
+#, c-format
+msgid " -O0\t\tassembler will not perform any optimizations\n"
+msgstr ""
+
+#: config/tc-score.c:5813
+#, c-format
+msgid ""
+" -G gpnum\tassemble code for setting gpsize and default is 8 byte\n"
+msgstr ""
+
+#: config/tc-score.c:5815
+#, c-format
+msgid " -V \t\tSunplus release version \n"
+msgstr ""
+
+#: config/tc-score.c:6415 read.c:1459
+msgid "missing size expression"
+msgstr ""
+
+#: config/tc-score.c:6421
+#, c-format
+msgid "BSS length (%d) < 0 ignored"
+msgstr ""
+
+#: config/tc-score.c:6436 read.c:2277
+#, c-format
+msgid "error setting flags for \".sbss\": %s"
+msgstr ""
+
+#: config/tc-score.c:6450 config/tc-sparc.c:3797
+msgid "missing alignment"
+msgstr ""
+
+#: config/tc-score.c:6487
+#, c-format
+msgid "alignment too large; %d assumed"
+msgstr ""
+
+#: config/tc-score.c:6492 read.c:2338
+msgid "alignment negative; 0 assumed"
+msgstr ""
+
+#: config/tc-score.c:6559 config/tc-z80.c:289 ecoff.c:3355 read.c:1478
+#: read.c:1591 read.c:2455 read.c:3002 read.c:3387 symbols.c:326 symbols.c:432
+#, c-format
+msgid "symbol `%s' is already defined"
+msgstr ""
+
#: config/tc-sh64.c:568
msgid "This operand must be constant at assembly time"
msgstr ""
@@ -8672,7 +9668,7 @@ msgstr ""
#: config/tc-sh64.c:1536
#, c-format
-msgid "invalid operand, not an 16-bit unsigned value: %d"
+msgid "invalid operand, not a 16-bit unsigned value: %d"
msgstr ""
#: config/tc-sh64.c:1542
@@ -8759,212 +9755,212 @@ msgstr ""
msgid "-expand-pt32 invalid together with -no-expand"
msgstr ""
-#: config/tc-sh64.c:3201
+#: config/tc-sh64.c:3199
msgid ""
"SHmedia code not allowed in same section as constants and SHcompact code"
msgstr ""
-#: config/tc-sh64.c:3219
+#: config/tc-sh64.c:3217
msgid "No segment info for current section"
msgstr ""
-#: config/tc-sh64.c:3258
+#: config/tc-sh64.c:3256
msgid "duplicate datalabel operator ignored"
msgstr ""
-#: config/tc-sh64.c:3328
+#: config/tc-sh64.c:3326
msgid "Invalid DataLabel expression"
msgstr ""
-#: config/tc-sh.c:65
+#: config/tc-sh.c:63
msgid "directive .big encountered when option -big required"
msgstr ""
-#: config/tc-sh.c:75
+#: config/tc-sh.c:73
msgid "directive .little encountered when option -little required"
msgstr ""
-#: config/tc-sh.c:1277
+#: config/tc-sh.c:1364
msgid "misplaced PIC operand"
msgstr ""
-#: config/tc-sh.c:1315
+#: config/tc-sh.c:1402
msgid "illegal double indirection"
msgstr ""
-#: config/tc-sh.c:1324
+#: config/tc-sh.c:1411
msgid "illegal register after @-"
msgstr ""
-#: config/tc-sh.c:1340
+#: config/tc-sh.c:1427
msgid "must be @(r0,...)"
msgstr ""
-#: config/tc-sh.c:1364
+#: config/tc-sh.c:1451
msgid "syntax error in @(r0,...)"
msgstr ""
-#: config/tc-sh.c:1369
+#: config/tc-sh.c:1456
msgid "syntax error in @(r0...)"
msgstr ""
-#: config/tc-sh.c:1414
+#: config/tc-sh.c:1501
msgid "Deprecated syntax."
msgstr ""
-#: config/tc-sh.c:1426 config/tc-sh.c:1431
+#: config/tc-sh.c:1513 config/tc-sh.c:1518
msgid "syntax error in @(disp,[Rn, gbr, pc])"
msgstr ""
-#: config/tc-sh.c:1436
+#: config/tc-sh.c:1523
msgid "expecting )"
msgstr ""
-#: config/tc-sh.c:1444
+#: config/tc-sh.c:1531
msgid "illegal register after @"
msgstr ""
-#: config/tc-sh.c:2115
+#: config/tc-sh.c:2202
#, c-format
msgid "unhandled %d\n"
msgstr ""
-#: config/tc-sh.c:2281
+#: config/tc-sh.c:2368
#, c-format
msgid "Invalid register: 'r%d'"
msgstr ""
-#: config/tc-sh.c:2385
+#: config/tc-sh.c:2472
#, c-format
msgid "failed for %d\n"
msgstr ""
-#: config/tc-sh.c:2498 config/tc-sh.c:2894
+#: config/tc-sh.c:2585 config/tc-sh.c:2984
msgid "invalid operands for opcode"
msgstr ""
-#: config/tc-sh.c:2503
+#: config/tc-sh.c:2590
msgid "insn can't be combined with parallel processing insn"
msgstr ""
-#: config/tc-sh.c:2510 config/tc-sh.c:2521 config/tc-sh.c:2553
+#: config/tc-sh.c:2597 config/tc-sh.c:2608 config/tc-sh.c:2640
msgid "multiple movx specifications"
msgstr ""
-#: config/tc-sh.c:2515 config/tc-sh.c:2537 config/tc-sh.c:2576
+#: config/tc-sh.c:2602 config/tc-sh.c:2624 config/tc-sh.c:2663
msgid "multiple movy specifications"
msgstr ""
-#: config/tc-sh.c:2524 config/tc-sh.c:2557
+#: config/tc-sh.c:2611 config/tc-sh.c:2644
msgid "invalid movx address register"
msgstr ""
-#: config/tc-sh.c:2526
+#: config/tc-sh.c:2613
msgid "insn cannot be combined with non-nopy"
msgstr ""
-#: config/tc-sh.c:2540 config/tc-sh.c:2596
+#: config/tc-sh.c:2627 config/tc-sh.c:2683
msgid "invalid movy address register"
msgstr ""
-#: config/tc-sh.c:2542
+#: config/tc-sh.c:2629
msgid "insn cannot be combined with non-nopx"
msgstr ""
-#: config/tc-sh.c:2555
+#: config/tc-sh.c:2642
msgid "previous movy requires nopx"
msgstr ""
-#: config/tc-sh.c:2563 config/tc-sh.c:2568
+#: config/tc-sh.c:2650 config/tc-sh.c:2655
msgid "invalid movx dsp register"
msgstr ""
-#: config/tc-sh.c:2578
+#: config/tc-sh.c:2665
msgid "previous movx requires nopy"
msgstr ""
-#: config/tc-sh.c:2587 config/tc-sh.c:2592
+#: config/tc-sh.c:2674 config/tc-sh.c:2679
msgid "invalid movy dsp register"
msgstr ""
-#: config/tc-sh.c:2602
+#: config/tc-sh.c:2689
msgid "dsp immediate shift value not constant"
msgstr ""
-#: config/tc-sh.c:2616 config/tc-sh.c:2642
+#: config/tc-sh.c:2703 config/tc-sh.c:2729
msgid "multiple parallel processing specifications"
msgstr ""
-#: config/tc-sh.c:2635
+#: config/tc-sh.c:2722
msgid "multiple condition specifications"
msgstr ""
-#: config/tc-sh.c:2673
+#: config/tc-sh.c:2760
msgid "insn cannot be combined with pmuls"
msgstr ""
-#: config/tc-sh.c:2689
+#: config/tc-sh.c:2776
msgid "bad combined pmuls output operand"
msgstr ""
-#: config/tc-sh.c:2699
+#: config/tc-sh.c:2786
msgid "destination register is same for parallel insns"
msgstr ""
-#: config/tc-sh.c:2708
+#: config/tc-sh.c:2795
msgid "condition not followed by conditionalizable insn"
msgstr ""
-#: config/tc-sh.c:2718
+#: config/tc-sh.c:2805
msgid "unrecognized characters at end of parallel processing insn"
msgstr ""
-#: config/tc-sh.c:2834
+#: config/tc-sh.c:2921
msgid "opcode not valid for this cpu variant"
msgstr ""
-#: config/tc-sh.c:2867
+#: config/tc-sh.c:2954
msgid "Delayed branches not available on SH1"
msgstr ""
-#: config/tc-sh.c:2899
+#: config/tc-sh.c:2989
#, c-format
msgid "excess operands: '%s'"
msgstr ""
-#: config/tc-sh.c:3026
+#: config/tc-sh.c:3116
msgid ".uses pseudo-op seen when not relaxing"
msgstr ""
-#: config/tc-sh.c:3032
+#: config/tc-sh.c:3122
msgid "bad .uses format"
msgstr ""
-#: config/tc-sh.c:3130
+#: config/tc-sh.c:3224
msgid "Invalid combination: --isa=SHcompact with --isa=SHmedia"
msgstr ""
-#: config/tc-sh.c:3136
+#: config/tc-sh.c:3230
msgid "Invalid combination: --isa=SHmedia with --isa=SHcompact"
msgstr ""
-#: config/tc-sh.c:3138
+#: config/tc-sh.c:3232
msgid "Invalid combination: --abi=64 with --isa=SHcompact"
msgstr ""
-#: config/tc-sh.c:3179
+#: config/tc-sh.c:3273
msgid "Invalid combination: --abi=32 with --abi=64"
msgstr ""
-#: config/tc-sh.c:3185
+#: config/tc-sh.c:3279
msgid "Invalid combination: --abi=64 with --abi=32"
msgstr ""
-#: config/tc-sh.c:3187
+#: config/tc-sh.c:3281
msgid "Invalid combination: --isa=SHcompact with --abi=64"
msgstr ""
-#: config/tc-sh.c:3221
+#: config/tc-sh.c:3315
#, c-format
msgid ""
"SH options:\n"
@@ -8981,7 +9977,7 @@ msgid ""
" | fp"
msgstr ""
-#: config/tc-sh.c:3247
+#: config/tc-sh.c:3341
#, c-format
msgid ""
"--isa=[shmedia\t\tset as the default instruction set for SH64\n"
@@ -8990,7 +9986,7 @@ msgid ""
" | SHcompact]\n"
msgstr ""
-#: config/tc-sh.c:3252
+#: config/tc-sh.c:3346
#, c-format
msgid ""
"--abi=[32|64]\t\tset size of expanded SHmedia operands and object\n"
@@ -9004,89 +10000,89 @@ msgid ""
"\t\t\tto 32 bits only\n"
msgstr ""
-#: config/tc-sh.c:3336
+#: config/tc-sh.c:3445
msgid ".uses does not refer to a local symbol in the same section"
msgstr ""
-#: config/tc-sh.c:3355
+#: config/tc-sh.c:3464
msgid "can't find fixup pointed to by .uses"
msgstr ""
-#: config/tc-sh.c:3375
+#: config/tc-sh.c:3484
msgid ".uses target does not refer to a local symbol in the same section"
msgstr ""
-#: config/tc-sh.c:3452
+#: config/tc-sh.c:3561
msgid "displacement overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:3455
+#: config/tc-sh.c:3564
#, c-format
msgid "displacement to defined symbol %s overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:3459
+#: config/tc-sh.c:3568
#, c-format
msgid "displacement to undefined symbol %s overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:3532
+#: config/tc-sh.c:3641
msgid "displacement overflows 8-bit field"
msgstr ""
-#: config/tc-sh.c:3535
+#: config/tc-sh.c:3644
#, c-format
msgid "displacement to defined symbol %s overflows 8-bit field"
msgstr ""
-#: config/tc-sh.c:3539
+#: config/tc-sh.c:3648
#, c-format
msgid "displacement to undefined symbol %s overflows 8-bit field "
msgstr ""
-#: config/tc-sh.c:3556
+#: config/tc-sh.c:3665
#, c-format
msgid "overflow in branch to %s; converted into longer instruction sequence"
msgstr ""
-#: config/tc-sh.c:3622 config/tc-sh.c:3669 config/tc-sparc.c:4234
-#: config/tc-sparc.c:4259
+#: config/tc-sh.c:3731 config/tc-sh.c:3778 config/tc-sparc.c:4314
+#: config/tc-sparc.c:4339
msgid "misaligned data"
msgstr ""
-#: config/tc-sh.c:4076
+#: config/tc-sh.c:4206
msgid "misaligned offset"
msgstr ""
-#: config/tc-sparc.c:288
+#: config/tc-sparc.c:286
msgid "Invalid default architecture, broken assembler."
msgstr ""
-#: config/tc-sparc.c:292 config/tc-sparc.c:495
+#: config/tc-sparc.c:290 config/tc-sparc.c:497
msgid "Bad opcode table, broken assembler."
msgstr ""
-#: config/tc-sparc.c:487
+#: config/tc-sparc.c:489
#, c-format
msgid "invalid architecture -xarch=%s"
msgstr ""
-#: config/tc-sparc.c:489
+#: config/tc-sparc.c:491
#, c-format
msgid "invalid architecture -A%s"
msgstr ""
-#: config/tc-sparc.c:556
+#: config/tc-sparc.c:558
#, c-format
msgid "No compiled in support for %d bit object file format"
msgstr ""
-#: config/tc-sparc.c:634
+#: config/tc-sparc.c:636
#, c-format
msgid "SPARC options:\n"
msgstr ""
-#: config/tc-sparc.c:663
+#: config/tc-sparc.c:665
#, c-format
msgid ""
"\n"
@@ -9098,24 +10094,24 @@ msgid ""
"-no-relax\t\tavoid changing any jumps and branches\n"
msgstr ""
-#: config/tc-sparc.c:671
+#: config/tc-sparc.c:673
#, c-format
msgid "-k\t\t\tgenerate PIC\n"
msgstr ""
-#: config/tc-sparc.c:675
+#: config/tc-sparc.c:677
#, c-format
msgid ""
"-32\t\t\tcreate 32 bit object file\n"
"-64\t\t\tcreate 64 bit object file\n"
msgstr ""
-#: config/tc-sparc.c:678
+#: config/tc-sparc.c:680
#, c-format
msgid "\t\t\t[default is %d]\n"
msgstr ""
-#: config/tc-sparc.c:680
+#: config/tc-sparc.c:682
#, c-format
msgid ""
"-TSO\t\t\tuse Total Store Ordering\n"
@@ -9123,12 +10119,12 @@ msgid ""
"-RMO\t\t\tuse Relaxed Memory Ordering\n"
msgstr ""
-#: config/tc-sparc.c:684
+#: config/tc-sparc.c:686
#, c-format
msgid "\t\t\t[default is %s]\n"
msgstr ""
-#: config/tc-sparc.c:686
+#: config/tc-sparc.c:688
#, c-format
msgid ""
"-KPIC\t\t\tgenerate PIC\n"
@@ -9142,7 +10138,7 @@ msgid ""
"-s\t\t\tignored\n"
msgstr ""
-#: config/tc-sparc.c:698
+#: config/tc-sparc.c:700
#, c-format
msgid ""
"-EL\t\t\tgenerate code for a little endian machine\n"
@@ -9151,1172 +10147,1181 @@ msgid ""
" instructions and little endian data.\n"
msgstr ""
-#: config/tc-sparc.c:819
+#: config/tc-sparc.c:833
#, c-format
msgid "Internal error: losing opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-sparc.c:838
+#: config/tc-sparc.c:852
#, c-format
msgid "Internal error: can't find opcode `%s' for `%s'\n"
msgstr ""
-#: config/tc-sparc.c:984
+#: config/tc-sparc.c:998
msgid "Support for 64-bit arithmetic not compiled in."
msgstr ""
-#: config/tc-sparc.c:1031
+#: config/tc-sparc.c:1045
msgid "set: number not in 0..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1038
+#: config/tc-sparc.c:1052
msgid "set: number not in -2147483648..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1098
+#: config/tc-sparc.c:1112
msgid "setsw: number not in -2147483648..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1147
+#: config/tc-sparc.c:1161
msgid "setx: temporary register same as destination register"
msgstr ""
-#: config/tc-sparc.c:1218
+#: config/tc-sparc.c:1232
msgid "setx: illegal temporary register g0"
msgstr ""
-#: config/tc-sparc.c:1316
+#: config/tc-sparc.c:1330
msgid "FP branch in delay slot"
msgstr ""
-#: config/tc-sparc.c:1331
+#: config/tc-sparc.c:1345
msgid "FP branch preceded by FP instruction; NOP inserted"
msgstr ""
-#: config/tc-sparc.c:1371
+#: config/tc-sparc.c:1385
msgid "failed special case insn sanity check"
msgstr ""
-#: config/tc-sparc.c:1461
+#: config/tc-sparc.c:1475
msgid ": invalid membar mask name"
msgstr ""
-#: config/tc-sparc.c:1477
+#: config/tc-sparc.c:1491
msgid ": invalid membar mask expression"
msgstr ""
-#: config/tc-sparc.c:1482
+#: config/tc-sparc.c:1496
msgid ": invalid membar mask number"
msgstr ""
-#: config/tc-sparc.c:1497
+#: config/tc-sparc.c:1511
msgid ": invalid siam mode expression"
msgstr ""
-#: config/tc-sparc.c:1502
+#: config/tc-sparc.c:1516
msgid ": invalid siam mode number"
msgstr ""
-#: config/tc-sparc.c:1518
+#: config/tc-sparc.c:1532
msgid ": invalid prefetch function name"
msgstr ""
-#: config/tc-sparc.c:1526
+#: config/tc-sparc.c:1540
msgid ": invalid prefetch function expression"
msgstr ""
-#: config/tc-sparc.c:1531
+#: config/tc-sparc.c:1545
msgid ": invalid prefetch function number"
msgstr ""
-#: config/tc-sparc.c:1559 config/tc-sparc.c:1571
+#: config/tc-sparc.c:1573 config/tc-sparc.c:1585
msgid ": unrecognizable privileged register"
msgstr ""
-#: config/tc-sparc.c:1595 config/tc-sparc.c:1620
+#: config/tc-sparc.c:1609 config/tc-sparc.c:1621
+msgid ": unrecognizable hyperprivileged register"
+msgstr ""
+
+#: config/tc-sparc.c:1645 config/tc-sparc.c:1670
msgid ": unrecognizable v9a or v9b ancillary state register"
msgstr ""
-#: config/tc-sparc.c:1600
+#: config/tc-sparc.c:1650
msgid ": rd on write only ancillary state register"
msgstr ""
#. %sys_tick and %sys_tick_cmpr are v9bnotv9a
-#: config/tc-sparc.c:1608
+#: config/tc-sparc.c:1658
msgid ": unrecognizable v9a ancillary state register"
msgstr ""
-#: config/tc-sparc.c:1644
+#: config/tc-sparc.c:1694
msgid ": asr number must be between 16 and 31"
msgstr ""
-#: config/tc-sparc.c:1652
+#: config/tc-sparc.c:1702
msgid ": asr number must be between 0 and 31"
msgstr ""
-#: config/tc-sparc.c:1662
+#: config/tc-sparc.c:1712
#, c-format
msgid ": expecting %asrN"
msgstr ""
-#: config/tc-sparc.c:1844 config/tc-sparc.c:1882 config/tc-sparc.c:2289
-#: config/tc-sparc.c:2325
+#: config/tc-sparc.c:1898 config/tc-sparc.c:1936 config/tc-sparc.c:2343
+#: config/tc-sparc.c:2379
#, c-format
msgid "Illegal operands: %%%s requires arguments in ()"
msgstr ""
-#: config/tc-sparc.c:1850
+#: config/tc-sparc.c:1904
#, c-format
msgid ""
"Illegal operands: %%%s cannot be used together with other relocs in the insn "
"()"
msgstr ""
-#: config/tc-sparc.c:1861
+#: config/tc-sparc.c:1915
#, c-format
msgid "Illegal operands: %%%s can be only used with call __tls_get_addr"
msgstr ""
-#: config/tc-sparc.c:2068
+#: config/tc-sparc.c:2122
msgid "detected global register use not covered by .register pseudo-op"
msgstr ""
-#: config/tc-sparc.c:2139
+#: config/tc-sparc.c:2193
msgid ": There are only 64 f registers; [0-63]"
msgstr ""
-#: config/tc-sparc.c:2141 config/tc-sparc.c:2159
+#: config/tc-sparc.c:2195 config/tc-sparc.c:2213
msgid ": There are only 32 f registers; [0-31]"
msgstr ""
-#: config/tc-sparc.c:2151
+#: config/tc-sparc.c:2205
msgid ": There are only 32 single precision f registers; [0-31]"
msgstr ""
-#: config/tc-sparc.c:2337
+#: config/tc-sparc.c:2391
#, c-format
msgid ""
"Illegal operands: Can't do arithmetics other than + and - involving %%%s()"
msgstr ""
-#: config/tc-sparc.c:2447
+#: config/tc-sparc.c:2501
#, c-format
msgid "Illegal operands: Can't add non-constant expression to %%%s()"
msgstr ""
-#: config/tc-sparc.c:2457
+#: config/tc-sparc.c:2511
#, c-format
msgid ""
"Illegal operands: Can't do arithmetics involving %%%s() of a relocatable "
"symbol"
msgstr ""
-#: config/tc-sparc.c:2475
+#: config/tc-sparc.c:2529
msgid ": PC-relative operand can't be a constant"
msgstr ""
-#: config/tc-sparc.c:2482
+#: config/tc-sparc.c:2536
msgid ": TLS operand can't be a constant"
msgstr ""
-#: config/tc-sparc.c:2515
+#: config/tc-sparc.c:2569
msgid ": invalid ASI name"
msgstr ""
-#: config/tc-sparc.c:2523
+#: config/tc-sparc.c:2577
msgid ": invalid ASI expression"
msgstr ""
-#: config/tc-sparc.c:2528
+#: config/tc-sparc.c:2582
msgid ": invalid ASI number"
msgstr ""
-#: config/tc-sparc.c:2625
+#: config/tc-sparc.c:2679
msgid "OPF immediate operand out of range (0-0x1ff)"
msgstr ""
-#: config/tc-sparc.c:2630
+#: config/tc-sparc.c:2684
msgid "non-immediate OPF operand, ignored"
msgstr ""
-#: config/tc-sparc.c:2649
+#: config/tc-sparc.c:2703
msgid ": invalid cpreg name"
msgstr ""
-#: config/tc-sparc.c:2678
+#: config/tc-sparc.c:2732
#, c-format
msgid "Illegal operands%s"
msgstr ""
-#: config/tc-sparc.c:2712
+#: config/tc-sparc.c:2766
#, c-format
msgid "architecture bumped from \"%s\" to \"%s\" on \"%s\""
msgstr ""
-#: config/tc-sparc.c:2748
+#: config/tc-sparc.c:2802
#, c-format
msgid "Architecture mismatch on \"%s\"."
msgstr ""
-#: config/tc-sparc.c:2749
+#: config/tc-sparc.c:2803
#, c-format
msgid " (Requires %s; requested architecture is %s.)"
msgstr ""
-#: config/tc-sparc.c:3369
+#: config/tc-sparc.c:3423
#, c-format
msgid "bad or unhandled relocation type: 0x%02x"
msgstr ""
-#: config/tc-sparc.c:3679
+#: config/tc-sparc.c:3759
msgid "Expected comma after name"
msgstr ""
-#: config/tc-sparc.c:3688
+#: config/tc-sparc.c:3768
#, c-format
msgid "BSS length (%d.) <0! Ignored."
msgstr ""
-#: config/tc-sparc.c:3700
+#: config/tc-sparc.c:3780
msgid "bad .reserve segment -- expected BSS segment"
msgstr ""
-#: config/tc-sparc.c:3717
-msgid "missing alignment"
-msgstr ""
-
-#: config/tc-sparc.c:3728
+#: config/tc-sparc.c:3808
#, c-format
msgid "alignment too large; assuming %d"
msgstr ""
-#: config/tc-sparc.c:3734 config/tc-sparc.c:3885
+#: config/tc-sparc.c:3814 config/tc-sparc.c:3965
msgid "negative alignment"
msgstr ""
-#: config/tc-sparc.c:3744 config/tc-sparc.c:3908 read.c:1313 read.c:2143
+#: config/tc-sparc.c:3824 config/tc-sparc.c:3988 read.c:1315 read.c:2350
msgid "alignment not a power of 2"
msgstr ""
-#: config/tc-sparc.c:3822 config/tc-v850.c:223
+#: config/tc-sparc.c:3902 config/tc-v850.c:222
msgid "Expected comma after symbol-name"
msgstr ""
-#: config/tc-sparc.c:3832
+#: config/tc-sparc.c:3912
#, c-format
msgid ".COMMon length (%lu) out of range ignored"
msgstr ""
-#: config/tc-sparc.c:3865
+#: config/tc-sparc.c:3945
msgid "Expected comma after common length"
msgstr ""
-#: config/tc-sparc.c:3879
+#: config/tc-sparc.c:3959
#, c-format
msgid "alignment too large; assuming %ld"
msgstr ""
-#: config/tc-sparc.c:4025
+#: config/tc-sparc.c:4105
msgid "Unknown segment type"
msgstr ""
-#: config/tc-sparc.c:4104 config/tc-sparc.c:4114
+#: config/tc-sparc.c:4184 config/tc-sparc.c:4194
#, c-format
msgid "register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}"
msgstr ""
-#: config/tc-sparc.c:4132
+#: config/tc-sparc.c:4212
msgid "redefinition of global register"
msgstr ""
-#: config/tc-sparc.c:4143
+#: config/tc-sparc.c:4223
#, c-format
msgid "Register symbol %s already defined."
msgstr ""
-#: config/tc-sparc.c:4352
+#: config/tc-sparc.c:4432
#, c-format
msgid "Illegal operands: %%r_plt in %d-byte data field"
msgstr ""
-#: config/tc-sparc.c:4362
+#: config/tc-sparc.c:4442
#, c-format
msgid "Illegal operands: %%r_tls_dtpoff in %d-byte data field"
msgstr ""
-#: config/tc-sparc.c:4399
+#: config/tc-sparc.c:4479 config/tc-vax.c:3312
#, c-format
msgid "Illegal operands: Only %%r_%s%d allowed in %d-byte data fields"
msgstr ""
-#: config/tc-sparc.c:4407 config/tc-sparc.c:4438 config/tc-sparc.c:4447
+#: config/tc-sparc.c:4487 config/tc-sparc.c:4518 config/tc-sparc.c:4527
+#: config/tc-vax.c:3320 config/tc-vax.c:3351 config/tc-vax.c:3360
#, c-format
msgid "Illegal operands: %%r_%s%d requires arguments in ()"
msgstr ""
-#: config/tc-sparc.c:4456
+#: config/tc-sparc.c:4536 config/tc-vax.c:3369
#, c-format
msgid "Illegal operands: garbage after %%r_%s%d()"
msgstr ""
-#: config/tc-sparc.h:46
+#: config/tc-sparc.h:60
msgid "sparc convert_frag\n"
msgstr ""
-#: config/tc-sparc.h:48
+#: config/tc-sparc.h:62 config/tc-z80.h:53
msgid "estimate_size_before_relax called"
msgstr ""
+#: config/tc-spu.c:126
+#, c-format
+msgid "Can't hash instruction '%s':%s"
+msgstr ""
+
+#: config/tc-spu.c:180
+msgid ""
+"SPU options:\n"
+" --apuasm\t\t emulate behaviour of apuasm\n"
+msgstr ""
+
+#: config/tc-spu.c:286
+#, c-format
+msgid "Invalid mnemonic '%s'"
+msgstr ""
+
+#: config/tc-spu.c:292
+#, c-format
+msgid "'%s' is only available in DD2.0 or higher."
+msgstr ""
+
+#: config/tc-spu.c:324
+#, c-format
+msgid "Error in argument %d. Expecting: \"%s\""
+msgstr ""
+
+#: config/tc-spu.c:335
+msgid "Mixing register syntax, with and without '$'."
+msgstr ""
+
+#: config/tc-spu.c:341
+#, c-format
+msgid "Treating '%-*s' as a symbol."
+msgstr ""
+
+#: config/tc-spu.c:551
+msgid "'SPU_RdEventMask' (channel 11) is only available in DD2.0 or higher."
+msgstr ""
+
+#: config/tc-spu.c:553
+msgid "'MFC_RdTagMask' (channel 12) is only available in DD2.0 or higher."
+msgstr ""
+
+#: config/tc-spu.c:596
+#, c-format
+msgid "Using old style, %%lo(expr), please change to PPC style, expr@l."
+msgstr ""
+
+#: config/tc-spu.c:602
+#, c-format
+msgid "Using old style, %%hi(expr), please change to PPC style, expr@h."
+msgstr ""
+
+#: config/tc-spu.c:672 config/tc-spu.c:675
+#, c-format
+msgid "Constant expression %d out of range, [%d, %d]."
+msgstr ""
+
+#: config/tc-spu.c:860
+msgid "Relaxation should never occur"
+msgstr ""
+
+#: config/tc-spu.h:83
+msgid "spu convert_frag\n"
+msgstr ""
+
#. Only word (et al.), align, or conditionals are allowed within
#. .struct/.union.
-#: config/tc-tic54x.c:222
+#: config/tc-tic54x.c:220
msgid "pseudo-op illegal within .struct/.union"
msgstr ""
-#: config/tc-tic54x.c:347
+#: config/tc-tic54x.c:345
#, c-format
msgid "C54x-specific command line options:\n"
msgstr ""
-#: config/tc-tic54x.c:348
+#: config/tc-tic54x.c:346
#, c-format
msgid "-mfar-mode | -mf Use extended addressing\n"
msgstr ""
-#: config/tc-tic54x.c:349
+#: config/tc-tic54x.c:347
#, c-format
msgid "-mcpu=<CPU version> Specify the CPU version\n"
msgstr ""
-#: config/tc-tic54x.c:350
+#: config/tc-tic54x.c:348
#, c-format
msgid "-merrors-to-file <filename>\n"
msgstr ""
-#: config/tc-tic54x.c:351
+#: config/tc-tic54x.c:349
#, c-format
msgid "-me <filename> Redirect errors to a file\n"
msgstr ""
-#: config/tc-tic54x.c:473
+#: config/tc-tic54x.c:471
msgid "Comma and symbol expected for '.asg STRING, SYMBOL'"
msgstr ""
-#: config/tc-tic54x.c:527
+#: config/tc-tic54x.c:525
msgid "Unterminated string after absolute expression"
msgstr ""
-#: config/tc-tic54x.c:535
+#: config/tc-tic54x.c:533
msgid "Comma and symbol expected for '.eval EXPR, SYMBOL'"
msgstr ""
-#: config/tc-tic54x.c:547
+#: config/tc-tic54x.c:545
msgid "symbols assigned with .eval must begin with a letter"
msgstr ""
-#: config/tc-tic54x.c:805
+#: config/tc-tic54x.c:803
msgid "Offset on nested structures is ignored"
msgstr ""
-#: config/tc-tic54x.c:856
+#: config/tc-tic54x.c:854
#, c-format
msgid ".end%s without preceding .%s"
msgstr ""
-#: config/tc-tic54x.c:923
+#: config/tc-tic54x.c:921
#, c-format
msgid "Unrecognized struct/union tag '%s'"
msgstr ""
-#: config/tc-tic54x.c:925
+#: config/tc-tic54x.c:923
msgid ".tag requires a structure tag"
msgstr ""
-#: config/tc-tic54x.c:931
+#: config/tc-tic54x.c:929
msgid "Label required for .tag"
msgstr ""
-#: config/tc-tic54x.c:950
+#: config/tc-tic54x.c:948
#, c-format
msgid ".tag target '%s' undefined"
msgstr ""
-#: config/tc-tic54x.c:1013
+#: config/tc-tic54x.c:1011
#, c-format
msgid ".field count '%d' out of range (1 <= X <= 32)"
msgstr ""
-#: config/tc-tic54x.c:1041
+#: config/tc-tic54x.c:1039
#, c-format
msgid "Unrecognized field type '%c'"
msgstr ""
#. Disallow .byte with a non constant expression that will
#. require relocation.
-#: config/tc-tic54x.c:1178
+#: config/tc-tic54x.c:1176
msgid "Relocatable values require at least WORD storage"
msgstr ""
-#: config/tc-tic54x.c:1240
+#: config/tc-tic54x.c:1238
msgid "Use of .def/.ref is deprecated. Use .global instead"
msgstr ""
-#: config/tc-tic54x.c:1439
+#: config/tc-tic54x.c:1437
msgid ".space/.bes repeat count is negative, ignored"
msgstr ""
-#: config/tc-tic54x.c:1444
+#: config/tc-tic54x.c:1442
msgid ".space/.bes repeat count is zero, ignored"
msgstr ""
-#: config/tc-tic54x.c:1522
+#: config/tc-tic54x.c:1520
msgid "Missing size argument"
msgstr ""
-#: config/tc-tic54x.c:1659
+#: config/tc-tic54x.c:1657
msgid "CPU version has already been set"
msgstr ""
-#: config/tc-tic54x.c:1663
+#: config/tc-tic54x.c:1661
#, c-format
msgid "Unrecognized version '%s'"
msgstr ""
-#: config/tc-tic54x.c:1669
+#: config/tc-tic54x.c:1667
msgid "Changing of CPU version on the fly not supported"
msgstr ""
-#: config/tc-tic54x.c:1805
+#: config/tc-tic54x.c:1803
msgid "p2align not supported on this target"
msgstr ""
-#: config/tc-tic54x.c:1818
+#: config/tc-tic54x.c:1816
msgid "Argument to .even ignored"
msgstr ""
-#: config/tc-tic54x.c:1865
+#: config/tc-tic54x.c:1863
msgid "Invalid field size, must be from 1 to 32"
msgstr ""
-#: config/tc-tic54x.c:1878
+#: config/tc-tic54x.c:1876
msgid "field size must be 16 when value is relocatable"
msgstr ""
-#: config/tc-tic54x.c:1893
+#: config/tc-tic54x.c:1891
msgid "field value truncated"
msgstr ""
-#: config/tc-tic54x.c:2002 config/tc-tic54x.c:2319
+#: config/tc-tic54x.c:2000 config/tc-tic54x.c:2317
#, c-format
msgid "Unrecognized section '%s'"
msgstr ""
-#: config/tc-tic54x.c:2011
+#: config/tc-tic54x.c:2009
msgid "Current section is unitialized, section name required for .clink"
msgstr ""
-#: config/tc-tic54x.c:2225
+#: config/tc-tic54x.c:2223
msgid "ENDLOOP without corresponding LOOP"
msgstr ""
-#: config/tc-tic54x.c:2269
+#: config/tc-tic54x.c:2267
msgid "Mixing of normal and extended addressing not supported"
msgstr ""
-#: config/tc-tic54x.c:2275
+#: config/tc-tic54x.c:2273
msgid "Extended addressing not supported on the specified CPU"
msgstr ""
-#: config/tc-tic54x.c:2325
+#: config/tc-tic54x.c:2323
msgid ".sblock may be used for initialized sections only"
msgstr ""
-#: config/tc-tic54x.c:2356
+#: config/tc-tic54x.c:2354
msgid "Symbol missing for .set/.equ"
msgstr ""
-#: config/tc-tic54x.c:2415
+#: config/tc-tic54x.c:2413
msgid ".var may only be used within a macro definition"
msgstr ""
-#: config/tc-tic54x.c:2423
+#: config/tc-tic54x.c:2421
msgid "Substitution symbols must begin with a letter"
msgstr ""
-#: config/tc-tic54x.c:2517
+#: config/tc-tic54x.c:2515
#, c-format
-msgid "Can't open macro library file '%s' for reading."
+msgid "can't open macro library file '%s' for reading: %s"
msgstr ""
-#: config/tc-tic54x.c:2524
+#: config/tc-tic54x.c:2522
#, c-format
msgid "File '%s' not in macro archive format"
msgstr ""
-#: config/tc-tic54x.c:2656
+#: config/tc-tic54x.c:2654
#, c-format
msgid "Bad COFF version '%s'"
msgstr ""
-#: config/tc-tic54x.c:2665
+#: config/tc-tic54x.c:2663
#, c-format
msgid "Bad CPU version '%s'"
msgstr ""
-#: config/tc-tic54x.c:2678 config/tc-tic54x.c:2681
+#: config/tc-tic54x.c:2676 config/tc-tic54x.c:2679
#, c-format
msgid "Can't redirect stderr to the file '%s'"
msgstr ""
-#: config/tc-tic54x.c:2809
+#: config/tc-tic54x.c:2807
#, c-format
msgid "Undefined substitution symbol '%s'"
msgstr ""
-#: config/tc-tic54x.c:3466
+#: config/tc-tic54x.c:3464
msgid "Badly formed address expression"
msgstr ""
-#: config/tc-tic54x.c:3730
+#: config/tc-tic54x.c:3728
#, c-format
msgid "Invalid dmad syntax '%s'"
msgstr ""
-#: config/tc-tic54x.c:3796
+#: config/tc-tic54x.c:3794
#, c-format
msgid ""
"Use the .mmregs directive to use memory-mapped register names such as '%s'"
msgstr ""
-#: config/tc-tic54x.c:3849
+#: config/tc-tic54x.c:3847
msgid "Address mode *+ARx is write-only. Results of reading are undefined."
msgstr ""
-#: config/tc-tic54x.c:3869
+#: config/tc-tic54x.c:3867
#, c-format
msgid "Unrecognized indirect address format \"%s\""
msgstr ""
-#: config/tc-tic54x.c:3908
+#: config/tc-tic54x.c:3906
#, c-format
msgid "Operand '%s' out of range (%d <= x <= %d)"
msgstr ""
-#: config/tc-tic54x.c:3928
+#: config/tc-tic54x.c:3926
msgid "Error in relocation handling"
msgstr ""
-#: config/tc-tic54x.c:3949 config/tc-tic54x.c:4013 config/tc-tic54x.c:4045
+#: config/tc-tic54x.c:3947 config/tc-tic54x.c:4011 config/tc-tic54x.c:4043
#, c-format
msgid "Unrecognized condition code \"%s\""
msgstr ""
-#: config/tc-tic54x.c:3966
+#: config/tc-tic54x.c:3964
#, c-format
msgid "Condition \"%s\" does not match preceding group"
msgstr ""
-#: config/tc-tic54x.c:3974
+#: config/tc-tic54x.c:3972
#, c-format
msgid ""
"Condition \"%s\" uses a different accumulator from a preceding condition"
msgstr ""
-#: config/tc-tic54x.c:3981
+#: config/tc-tic54x.c:3979
msgid "Only one comparison conditional allowed"
msgstr ""
-#: config/tc-tic54x.c:3986
+#: config/tc-tic54x.c:3984
msgid "Only one overflow conditional allowed"
msgstr ""
-#: config/tc-tic54x.c:3994
+#: config/tc-tic54x.c:3992
#, c-format
msgid "Duplicate %s conditional"
msgstr ""
-#: config/tc-tic54x.c:4029
+#: config/tc-tic54x.c:4027
msgid "Invalid auxiliary register (use AR0-AR7)"
msgstr ""
-#: config/tc-tic54x.c:4065
+#: config/tc-tic54x.c:4063
msgid "lk addressing modes are invalid for memory-mapped register addressing"
msgstr ""
-#: config/tc-tic54x.c:4073
+#: config/tc-tic54x.c:4071
msgid ""
"Address mode *+ARx is not allowed in memory-mapped register addressing. "
"Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:4099
+#: config/tc-tic54x.c:4097
msgid ""
"Destination accumulator for each part of this parallel instruction must be "
"different"
msgstr ""
-#: config/tc-tic54x.c:4148
+#: config/tc-tic54x.c:4146
#, c-format
msgid "Memory mapped register \"%s\" out of range"
msgstr ""
-#: config/tc-tic54x.c:4187
+#: config/tc-tic54x.c:4185
msgid "Invalid operand (use 1, 2, or 3)"
msgstr ""
-#: config/tc-tic54x.c:4212
+#: config/tc-tic54x.c:4210
msgid "A status register or status bit name is required"
msgstr ""
-#: config/tc-tic54x.c:4222
+#: config/tc-tic54x.c:4220
#, c-format
msgid "Unrecognized status bit \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4245
+#: config/tc-tic54x.c:4243
#, c-format
msgid "Invalid status register \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4257
+#: config/tc-tic54x.c:4255
#, c-format
msgid "Operand \"%s\" out of range (use 1 or 2)"
msgstr ""
-#: config/tc-tic54x.c:4465
+#: config/tc-tic54x.c:4463
#, c-format
msgid "Unrecognized instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4494
+#: config/tc-tic54x.c:4492
#, c-format
msgid "Unrecognized operand list '%s' for instruction '%s'"
msgstr ""
-#: config/tc-tic54x.c:4526
+#: config/tc-tic54x.c:4524
#, c-format
msgid "Unrecognized parallel instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4577
+#: config/tc-tic54x.c:4575
#, c-format
msgid "Invalid operand (s) for parallel instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4580
+#: config/tc-tic54x.c:4578
#, c-format
msgid "Unrecognized parallel instruction combination \"%s || %s\""
msgstr ""
-#: config/tc-tic54x.c:4817
+#: config/tc-tic54x.c:4815
#, c-format
msgid "%s symbol recursion stopped at second appearance of '%s'"
msgstr ""
-#: config/tc-tic54x.c:4857
+#: config/tc-tic54x.c:4855
msgid "Unrecognized substitution symbol function"
msgstr ""
-#: config/tc-tic54x.c:4862
+#: config/tc-tic54x.c:4860
msgid "Missing '(' after substitution symbol function"
msgstr ""
-#: config/tc-tic54x.c:4876
+#: config/tc-tic54x.c:4874
msgid "Expecting second argument"
msgstr ""
-#: config/tc-tic54x.c:4889 config/tc-tic54x.c:4939
+#: config/tc-tic54x.c:4887 config/tc-tic54x.c:4937
msgid "Extra junk in function call, expecting ')'"
msgstr ""
-#: config/tc-tic54x.c:4915
+#: config/tc-tic54x.c:4913
msgid "Function expects two arguments"
msgstr ""
-#: config/tc-tic54x.c:4928
+#: config/tc-tic54x.c:4926
msgid "Expecting character constant argument"
msgstr ""
-#: config/tc-tic54x.c:4934
+#: config/tc-tic54x.c:4932
msgid "Both arguments must be substitution symbols"
msgstr ""
-#: config/tc-tic54x.c:4987
+#: config/tc-tic54x.c:4985
#, c-format
msgid "Invalid subscript (use 1 to %d)"
msgstr ""
-#: config/tc-tic54x.c:4997
+#: config/tc-tic54x.c:4995
#, c-format
msgid "Invalid length (use 0 to %d"
msgstr ""
-#: config/tc-tic54x.c:5007
+#: config/tc-tic54x.c:5005
msgid "Missing ')' in subscripted substitution symbol expression"
msgstr ""
-#: config/tc-tic54x.c:5027
+#: config/tc-tic54x.c:5025
msgid "Missing forced substitution terminator ':'"
msgstr ""
-#: config/tc-tic54x.c:5182
+#: config/tc-tic54x.c:5180
#, c-format
msgid ""
"Instruction does not fit in available delay slots (%d-word insn, %d slots "
"left)"
msgstr ""
-#: config/tc-tic54x.c:5223
+#: config/tc-tic54x.c:5221
#, c-format
msgid "Unrecognized parallel instruction '%s'"
msgstr ""
-#: config/tc-tic54x.c:5235
+#: config/tc-tic54x.c:5233
#, c-format
msgid "Instruction '%s' requires an LP cpu version"
msgstr ""
-#: config/tc-tic54x.c:5242
+#: config/tc-tic54x.c:5240
#, c-format
msgid "Instruction '%s' requires far mode addressing"
msgstr ""
-#: config/tc-tic54x.c:5254
+#: config/tc-tic54x.c:5252
#, 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:5264
+#: config/tc-tic54x.c:5262
msgid ""
"Instructions which cause PC discontinuity are not allowed in a delay slot. "
"Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5275
+#: config/tc-tic54x.c:5273
#, c-format
msgid "'%s' is not repeatable. Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5279
+#: config/tc-tic54x.c:5277
msgid ""
"Instructions using long offset modifiers or absolute addresses are not "
"repeatable. Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5459
+#: config/tc-tic54x.c:5457
#, c-format
msgid "Unsupported relocation size %d"
msgstr ""
-#: config/tc-tic54x.c:5602
+#: config/tc-tic54x.c:5600
msgid "non-absolute value used with .space/.bes"
msgstr ""
-#: config/tc-tic54x.c:5606
+#: config/tc-tic54x.c:5604
#, c-format
msgid "negative value ignored in %s"
msgstr ""
-#: config/tc-tic54x.c:5695
+#: config/tc-tic54x.c:5693
#, c-format
msgid "attempt to .space/.bes backwards? (%ld)"
msgstr ""
-#: config/tc-tic54x.c:5729
+#: config/tc-tic54x.c:5727
#, c-format
msgid "Invalid label '%s'"
msgstr ""
-#: config/tc-v850.c:234
+#: config/tc-v850.c:233
#, c-format
msgid ".COMMon length (%d.) < 0! Ignored."
msgstr ""
-#: config/tc-v850.c:255
+#: config/tc-v850.c:254
#, c-format
msgid "Length of .comm \"%s\" is already %ld. Not changed to %d."
msgstr ""
-#: config/tc-v850.c:281
+#: config/tc-v850.c:280
msgid "Common alignment negative; 0 assumed"
msgstr ""
-#: config/tc-v850.c:939
+#: config/tc-v850.c:938
#, c-format
msgid "unknown operand shift: %x\n"
msgstr ""
-#: config/tc-v850.c:940
+#: config/tc-v850.c:939
msgid "internal failure in parse_register_list"
msgstr ""
-#: config/tc-v850.c:956
+#: config/tc-v850.c:955
msgid "constant expression or register list expected"
msgstr ""
-#: config/tc-v850.c:961 config/tc-v850.c:974 config/tc-v850.c:993
+#: config/tc-v850.c:960 config/tc-v850.c:973 config/tc-v850.c:992
msgid "high bits set in register list expression"
msgstr ""
-#: config/tc-v850.c:1032 config/tc-v850.c:1095
+#: config/tc-v850.c:1031 config/tc-v850.c:1094
msgid "illegal register included in list"
msgstr ""
-#: config/tc-v850.c:1038
+#: config/tc-v850.c:1037
msgid "system registers cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1043
+#: config/tc-v850.c:1042
msgid "PSW cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1050
+#: config/tc-v850.c:1049
msgid "High value system registers cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1074
+#: config/tc-v850.c:1073
msgid "second register should follow dash in register list"
msgstr ""
-#: config/tc-v850.c:1119
+#: config/tc-v850.c:1118
#, c-format
msgid " V850 options:\n"
msgstr ""
-#: config/tc-v850.c:1120
+#: config/tc-v850.c:1119
#, c-format
msgid " -mwarn-signed-overflow Warn if signed immediate values overflow\n"
msgstr ""
-#: config/tc-v850.c:1121
+#: config/tc-v850.c:1120
#, c-format
msgid ""
" -mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n"
msgstr ""
-#: config/tc-v850.c:1122
+#: config/tc-v850.c:1121
#, c-format
msgid " -mv850 The code is targeted at the v850\n"
msgstr ""
-#: config/tc-v850.c:1123
+#: config/tc-v850.c:1122
#, c-format
msgid " -mv850e The code is targeted at the v850e\n"
msgstr ""
-#: config/tc-v850.c:1124
+#: config/tc-v850.c:1123
#, c-format
msgid " -mv850e1 The code is targeted at the v850e1\n"
msgstr ""
-#: config/tc-v850.c:1125
+#: config/tc-v850.c:1124
#, c-format
msgid ""
" -mv850any The code is generic, despite any processor "
"specific instructions\n"
msgstr ""
-#: config/tc-v850.c:1126
+#: config/tc-v850.c:1125
#, c-format
msgid " -mrelax Enable relaxation\n"
msgstr ""
-#: config/tc-v850.c:1308
+#: config/tc-v850.c:1323
#, c-format
msgid "Unable to determine default target processor from string: %s"
msgstr ""
-#: config/tc-v850.c:1343
+#: config/tc-v850.c:1358
msgid "lo() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1360
+#: config/tc-v850.c:1375
msgid "ctoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1382
+#: config/tc-v850.c:1397
msgid "sdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1404
+#: config/tc-v850.c:1419
msgid "zdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1437
+#: config/tc-v850.c:1452
msgid "tdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1642
+#: config/tc-v850.c:1657
msgid "Target processor does not support this instruction."
msgstr ""
-#: config/tc-v850.c:1731 config/tc-v850.c:1760 config/tc-v850.c:1940
+#: config/tc-v850.c:1746 config/tc-v850.c:1775 config/tc-v850.c:1955
msgid "immediate operand is too large"
msgstr ""
-#: config/tc-v850.c:1742
+#: config/tc-v850.c:1757
msgid "AAARG -> unhandled constant reloc"
msgstr ""
-#: config/tc-v850.c:1785
+#: config/tc-v850.c:1800
msgid "invalid register name"
msgstr ""
-#: config/tc-v850.c:1789
+#: config/tc-v850.c:1804
msgid "register r0 cannot be used here"
msgstr ""
-#: config/tc-v850.c:1800
+#: config/tc-v850.c:1815
msgid "invalid system register name"
msgstr ""
-#: config/tc-v850.c:1812
+#: config/tc-v850.c:1827
msgid "expected EP register"
msgstr ""
-#: config/tc-v850.c:1828
+#: config/tc-v850.c:1843
msgid "invalid condition code name"
msgstr ""
-#: config/tc-v850.c:1848 config/tc-v850.c:1852
+#: config/tc-v850.c:1863 config/tc-v850.c:1867
msgid "constant too big to fit into instruction"
msgstr ""
-#: config/tc-v850.c:1905
+#: config/tc-v850.c:1920
msgid "syntax error: value is missing before the register name"
msgstr ""
-#: config/tc-v850.c:1907
+#: config/tc-v850.c:1922
msgid "syntax error: register not expected"
msgstr ""
-#: config/tc-v850.c:1920
+#: config/tc-v850.c:1935
msgid "syntax error: system register not expected"
msgstr ""
-#: config/tc-v850.c:1924
+#: config/tc-v850.c:1939
msgid "syntax error: condition code not expected"
msgstr ""
-#: config/tc-v850.c:1958
+#: config/tc-v850.c:1973 config/tc-xtensa.c:11545
msgid "invalid operand"
msgstr ""
-#: config/tc-vax.c:290
-#, c-format
-msgid "VIP_BEGIN error:%s"
-msgstr ""
-
-#: config/tc-vax.c:461
-#, c-format
-msgid "Ignoring statement due to \"%s\""
-msgstr ""
-
-#: config/tc-vax.c:480
-#, c-format
-msgid "Aborting because statement has \"%s\""
-msgstr ""
-
-#: config/tc-vax.c:527
-msgid "Can't relocate expression"
-msgstr ""
-
-#: config/tc-vax.c:630
-msgid "Bignum not permitted in short literal. Immediate mode assumed."
-msgstr ""
-
-#: config/tc-vax.c:639
-msgid "Can't do flonum short literal: immediate mode used."
-msgstr ""
-
-#: config/tc-vax.c:684
-#, c-format
-msgid "A bignum/flonum may not be a displacement: 0x%lx used"
-msgstr ""
-
-#: config/tc-vax.c:1007
-#, c-format
-msgid "Short literal overflow(%ld.), immediate mode assumed."
-msgstr ""
-
-#: config/tc-vax.c:1016
-#, c-format
-msgid "Forced short literal to immediate mode. now_seg=%s to_seg=%s"
-msgstr ""
-
-#: config/tc-vax.c:1081
-msgid "Length specification ignored. Address mode 9F used"
-msgstr ""
-
-#: config/tc-vax.c:1142
-msgid "Invalid operand: immediate value used as base address."
-msgstr ""
-
-#: config/tc-vax.c:1144
-msgid "Invalid operand: immediate value used as address."
-msgstr ""
-
-#: config/tc-vax.c:1169
-msgid "Symbol used as immediate operand in PIC mode."
-msgstr ""
-
-#: config/tc-vax.c:1942
-msgid "odd number of bytes in operand description"
-msgstr ""
-
-#: config/tc-vax.c:1958
-msgid "Bad operand"
-msgstr ""
-
-#: config/tc-vax.c:1963
-msgid "Not enough operands"
-msgstr ""
-
-#: config/tc-vax.c:1970
-msgid "Too many operands"
-msgstr ""
-
-#: config/tc-vax.c:2533
+#: config/tc-vax.c:1343
msgid "no '[' to match ']'"
msgstr ""
-#: config/tc-vax.c:2553
+#: config/tc-vax.c:1359
msgid "bad register in []"
msgstr ""
-#: config/tc-vax.c:2555
+#: config/tc-vax.c:1361
msgid "[PC] index banned"
msgstr ""
-#: config/tc-vax.c:2590
+#: config/tc-vax.c:1397
msgid "no '(' to match ')'"
msgstr ""
-#: config/tc-vax.c:2730
+#: config/tc-vax.c:1513
msgid "invalid branch operand"
msgstr ""
-#: config/tc-vax.c:2759
+#: config/tc-vax.c:1540
msgid "address prohibits @"
msgstr ""
-#: config/tc-vax.c:2761
+#: config/tc-vax.c:1542
msgid "address prohibits #"
msgstr ""
-#: config/tc-vax.c:2765
+#: config/tc-vax.c:1546
msgid "address prohibits -()"
msgstr ""
-#: config/tc-vax.c:2767
+#: config/tc-vax.c:1548
msgid "address prohibits ()+"
msgstr ""
-#: config/tc-vax.c:2770
+#: config/tc-vax.c:1551
msgid "address prohibits ()"
msgstr ""
-#: config/tc-vax.c:2772
+#: config/tc-vax.c:1553
msgid "address prohibits []"
msgstr ""
-#: config/tc-vax.c:2774
+#: config/tc-vax.c:1555
msgid "address prohibits register"
msgstr ""
-#: config/tc-vax.c:2776
+#: config/tc-vax.c:1557
msgid "address prohibits displacement length specifier"
msgstr ""
-#: config/tc-vax.c:2806
+#: config/tc-vax.c:1585
msgid "invalid operand of S^#"
msgstr ""
-#: config/tc-vax.c:2823
+#: config/tc-vax.c:1598
msgid "S^# needs expression"
msgstr ""
-#: config/tc-vax.c:2830
+#: config/tc-vax.c:1605
msgid "S^# may only read-access"
msgstr ""
-#: config/tc-vax.c:2855
+#: config/tc-vax.c:1628
msgid "invalid operand of -()"
msgstr ""
-#: config/tc-vax.c:2861
+#: config/tc-vax.c:1634
msgid "-(PC) unpredictable"
msgstr ""
-#: config/tc-vax.c:2863
+#: config/tc-vax.c:1636
msgid "[]index same as -()register: unpredictable"
msgstr ""
-#: config/tc-vax.c:2899
+#: config/tc-vax.c:1668
msgid "invalid operand of ()+"
msgstr ""
-#: config/tc-vax.c:2905
+#: config/tc-vax.c:1674
msgid "(PC)+ unpredictable"
msgstr ""
-#: config/tc-vax.c:2907
+#: config/tc-vax.c:1676
msgid "[]index same as ()+register: unpredictable"
msgstr ""
-#: config/tc-vax.c:2932
+#: config/tc-vax.c:1699
msgid "# conflicts length"
msgstr ""
-#: config/tc-vax.c:2934
+#: config/tc-vax.c:1701
msgid "# bars register"
msgstr ""
-#: config/tc-vax.c:2956
+#: config/tc-vax.c:1721
msgid "writing or modifying # is unpredictable"
msgstr ""
-#: config/tc-vax.c:2986
+#: config/tc-vax.c:1747
msgid "length not needed"
msgstr ""
-#: config/tc-vax.c:2993
+#: config/tc-vax.c:1754
msgid "can't []index a register, because it has no address"
msgstr ""
-#: config/tc-vax.c:2995
+#: config/tc-vax.c:1756
msgid "a register has no address"
msgstr ""
-#: config/tc-vax.c:3006
+#: config/tc-vax.c:1765
msgid "PC part of operand unpredictable"
msgstr ""
-#: config/tc-vax.c:3281
+#: config/tc-vax.c:1921
+msgid "odd number of bytes in operand description"
+msgstr ""
+
+#: config/tc-vax.c:1935
+msgid "Bad operand"
+msgstr ""
+
+#: config/tc-vax.c:1940
+msgid "Not enough operands"
+msgstr ""
+
+#: config/tc-vax.c:1947
+msgid "Too many operands"
+msgstr ""
+
+#: config/tc-vax.c:2217
msgid "SYMBOL TABLE not implemented"
msgstr ""
-#: config/tc-vax.c:3285
+#: config/tc-vax.c:2221
msgid "TOKEN TRACE not implemented"
msgstr ""
-#: config/tc-vax.c:3289
+#: config/tc-vax.c:2225
#, c-format
msgid "Displacement length %s ignored!"
msgstr ""
-#: config/tc-vax.c:3293
+#: config/tc-vax.c:2229
#, c-format
msgid "I don't need or use temp. file \"%s\"."
msgstr ""
-#: config/tc-vax.c:3297
+#: config/tc-vax.c:2233
msgid "I don't use an interpass file! -V ignored"
msgstr ""
-#: config/tc-vax.c:3354
+#: config/tc-vax.c:2290
#, c-format
msgid ""
"VAX options:\n"
@@ -10328,7 +11333,7 @@ msgid ""
"-V\t\t\tignored\n"
msgstr ""
-#: config/tc-vax.c:3363
+#: config/tc-vax.c:2299
#, c-format
msgid ""
"VMS options:\n"
@@ -10340,6 +11345,69 @@ msgid ""
"-v\"VERSION\"\t\tcode being assembled was produced by compiler \"VERSION\"\n"
msgstr ""
+#: config/tc-vax.c:2464
+#, c-format
+msgid "Ignoring statement due to \"%s\""
+msgstr ""
+
+#: config/tc-vax.c:2481
+#, c-format
+msgid "Aborting because statement has \"%s\""
+msgstr ""
+
+#: config/tc-vax.c:2526
+msgid "Can't relocate expression"
+msgstr ""
+
+#: config/tc-vax.c:2629
+msgid "Bignum not permitted in short literal. Immediate mode assumed."
+msgstr ""
+
+#: config/tc-vax.c:2638
+msgid "Can't do flonum short literal: immediate mode used."
+msgstr ""
+
+#: config/tc-vax.c:2685
+#, c-format
+msgid "A bignum/flonum may not be a displacement: 0x%lx used"
+msgstr ""
+
+#: config/tc-vax.c:2996
+#, c-format
+msgid "Short literal overflow(%ld.), immediate mode assumed."
+msgstr ""
+
+#: config/tc-vax.c:3005
+#, c-format
+msgid "Forced short literal to immediate mode. now_seg=%s to_seg=%s"
+msgstr ""
+
+#: config/tc-vax.c:3070
+msgid "Length specification ignored. Address mode 9F used"
+msgstr ""
+
+#: config/tc-vax.c:3128
+msgid "Invalid operand: immediate value used as base address."
+msgstr ""
+
+#: config/tc-vax.c:3130
+msgid "Invalid operand: immediate value used as address."
+msgstr ""
+
+#: config/tc-vax.c:3155
+msgid "Symbol used as immediate operand in PIC mode."
+msgstr ""
+
+#: config/tc-vax.c:3258
+#, c-format
+msgid "VIP_BEGIN error:%s"
+msgstr ""
+
+#: config/tc-xc16x.c:211
+#, c-format
+msgid " XC16X specific command line options:\n"
+msgstr ""
+
#: config/tc-xstormy16.c:78
#, c-format
msgid " XSTORMY16 specific command line options:\n"
@@ -10350,715 +11418,740 @@ msgstr ""
msgid "internal error: can't install fix for reloc type %d (`%s')"
msgstr ""
-#: config/tc-xtensa.c:590
+#: config/tc-xtensa.c:602
msgid "illegal range of target hardware versions"
msgstr ""
-#: config/tc-xtensa.c:738
+#: config/tc-xtensa.c:751
msgid "--density option is ignored"
msgstr ""
-#: config/tc-xtensa.c:741
+#: config/tc-xtensa.c:754
msgid "--no-density option is ignored"
msgstr ""
-#: config/tc-xtensa.c:750
+#: config/tc-xtensa.c:763
msgid "--generics is deprecated; use --transform instead"
msgstr ""
-#: config/tc-xtensa.c:753
+#: config/tc-xtensa.c:766
msgid "--no-generics is deprecated; use --no-transform instead"
msgstr ""
-#: config/tc-xtensa.c:756
+#: config/tc-xtensa.c:769
msgid "--relax is deprecated; use --transform instead"
msgstr ""
-#: config/tc-xtensa.c:759
+#: config/tc-xtensa.c:772
msgid "--no-relax is deprecated; use --no-transform instead"
msgstr ""
-#: config/tc-xtensa.c:776
+#: config/tc-xtensa.c:789
msgid "--absolute-literals option not supported in this Xtensa configuration"
msgstr ""
-#: config/tc-xtensa.c:849
+#: config/tc-xtensa.c:862
msgid "prefer-l32r conflicts with prefer-const16"
msgstr ""
-#: config/tc-xtensa.c:855
+#: config/tc-xtensa.c:868
msgid "prefer-const16 conflicts with prefer-l32r"
msgstr ""
-#: config/tc-xtensa.c:863 config/tc-xtensa.c:872 config/tc-xtensa.c:876
+#: config/tc-xtensa.c:876 config/tc-xtensa.c:885 config/tc-xtensa.c:889
msgid "invalid target hardware version"
msgstr ""
-#: config/tc-xtensa.c:1078
+#: config/tc-xtensa.c:1064
msgid "unmatched end directive"
msgstr ""
-#: config/tc-xtensa.c:1107
+#: config/tc-xtensa.c:1093
msgid ".begin directive with no matching .end directive"
msgstr ""
-#: config/tc-xtensa.c:1148
+#: config/tc-xtensa.c:1134
msgid "[no-]generics is deprecated; use [no-]transform instead"
msgstr ""
-#: config/tc-xtensa.c:1153
+#: config/tc-xtensa.c:1139
msgid "[no-]relax is deprecated; use [no-]transform instead"
msgstr ""
-#: config/tc-xtensa.c:1166
+#: config/tc-xtensa.c:1152
#, c-format
msgid "directive %s cannot be negated"
msgstr ""
-#: config/tc-xtensa.c:1172
+#: config/tc-xtensa.c:1158
msgid "unknown directive"
msgstr ""
-#: config/tc-xtensa.c:1194 config/tc-xtensa.c:1300 config/tc-xtensa.c:1573
-#: config/tc-xtensa.c:5496
+#: config/tc-xtensa.c:1179 config/tc-xtensa.c:1275 config/tc-xtensa.c:1517
+#: config/tc-xtensa.c:5545
msgid "directives are not valid inside bundles"
msgstr ""
-#: config/tc-xtensa.c:1206
+#: config/tc-xtensa.c:1191
msgid ".begin literal is deprecated; use .literal instead"
msgstr ""
-#: config/tc-xtensa.c:1220
+#: config/tc-xtensa.c:1205
msgid "cannot set literal_prefix inside literal fragment"
msgstr ""
-#: config/tc-xtensa.c:1263
+#: config/tc-xtensa.c:1238
msgid ".begin [no-]density is ignored"
msgstr ""
-#: config/tc-xtensa.c:1270 config/tc-xtensa.c:1320
+#: config/tc-xtensa.c:1245 config/tc-xtensa.c:1295
msgid "Xtensa absolute literals option not supported; ignored"
msgstr ""
-#: config/tc-xtensa.c:1313
+#: config/tc-xtensa.c:1288
msgid ".end [no-]density is ignored"
msgstr ""
-#: config/tc-xtensa.c:1338
+#: config/tc-xtensa.c:1313
#, c-format
msgid "does not match begin %s%s at %s:%d"
msgstr ""
-#: config/tc-xtensa.c:1393
+#: config/tc-xtensa.c:1368
msgid ".literal_position inside literal directive; ignoring"
msgstr ""
-#: config/tc-xtensa.c:1413
+#: config/tc-xtensa.c:1388
msgid ".literal not allowed inside .begin literal region"
msgstr ""
-#: config/tc-xtensa.c:1449
+#: config/tc-xtensa.c:1424
msgid "expected comma or colon after symbol name; rest of line ignored"
msgstr ""
-#: config/tc-xtensa.c:1542
+#: config/tc-xtensa.c:1486
msgid "fall through frequency must be greater than 0"
msgstr ""
-#: config/tc-xtensa.c:1550
+#: config/tc-xtensa.c:1494
msgid "branch target frequency must be greater than 0"
msgstr ""
-#: config/tc-xtensa.c:1598
+#: config/tc-xtensa.c:1542
#, c-format
msgid "opcode-specific %s relocation used outside an instruction"
msgstr ""
-#: config/tc-xtensa.c:1751 config/tc-xtensa.c:1768
+#: config/tc-xtensa.c:1721 config/tc-xtensa.c:1738
#, c-format
msgid "bad register name: %s"
msgstr ""
-#: config/tc-xtensa.c:1757
+#: config/tc-xtensa.c:1727
#, c-format
msgid "bad register number: %s"
msgstr ""
-#: config/tc-xtensa.c:1836
+#: config/tc-xtensa.c:1804
msgid "register number out of range"
msgstr ""
-#: config/tc-xtensa.c:1920
+#: config/tc-xtensa.c:1888
msgid "extra comma"
msgstr ""
-#: config/tc-xtensa.c:1922
+#: config/tc-xtensa.c:1890
msgid "extra colon"
msgstr ""
-#: config/tc-xtensa.c:1924
+#: config/tc-xtensa.c:1892
msgid "missing argument"
msgstr ""
-#: config/tc-xtensa.c:1926
+#: config/tc-xtensa.c:1894
msgid "missing comma or colon"
msgstr ""
-#: config/tc-xtensa.c:1983
+#: config/tc-xtensa.c:1951
msgid "incorrect register number, ignoring"
msgstr ""
-#: config/tc-xtensa.c:1990
+#: config/tc-xtensa.c:1958
msgid "too many arguments"
msgstr ""
-#: config/tc-xtensa.c:2063
+#: config/tc-xtensa.c:2031
#, c-format
msgid "cannot encode opcode \"%s\""
msgstr ""
-#: config/tc-xtensa.c:2157
+#: config/tc-xtensa.c:2125
#, c-format
msgid "not enough operands (%d) for '%s'; expected %d"
msgstr ""
-#: config/tc-xtensa.c:2164
+#: config/tc-xtensa.c:2132
#, c-format
msgid "too many operands (%d) for '%s'; expected %d"
msgstr ""
-#: config/tc-xtensa.c:2219
+#: config/tc-xtensa.c:2183
#, c-format
msgid "invalid register '%s' for '%s' instruction"
msgstr ""
-#: config/tc-xtensa.c:2226
+#: config/tc-xtensa.c:2190
#, c-format
msgid "invalid register number (%ld) for '%s' instruction"
msgstr ""
-#: config/tc-xtensa.c:2295
+#: config/tc-xtensa.c:2258
#, c-format
msgid "invalid register number (%ld) for '%s'"
msgstr ""
-#: config/tc-xtensa.c:2685
+#: config/tc-xtensa.c:2649
#, c-format
msgid "operand %d of '%s' has out of range value '%u'"
msgstr ""
-#: config/tc-xtensa.c:2691
+#: config/tc-xtensa.c:2655
#, c-format
msgid "operand %d of '%s' has invalid value '%u'"
msgstr ""
-#: config/tc-xtensa.c:2739
+#: config/tc-xtensa.c:2703
#, c-format
msgid "internal error: unknown option name '%s'"
msgstr ""
-#: config/tc-xtensa.c:3791
+#: config/tc-xtensa.c:3778
msgid "INSTR_LABEL_DEF not supported yet"
msgstr ""
-#: config/tc-xtensa.c:3820
+#: config/tc-xtensa.c:3807
msgid "can't handle generation of literal/labels yet"
msgstr ""
-#: config/tc-xtensa.c:3824
+#: config/tc-xtensa.c:3811
msgid "can't handle undefined OP TYPE"
msgstr ""
-#: config/tc-xtensa.c:3885
+#: config/tc-xtensa.c:3872
#, c-format
msgid "found %d operands for '%s': Expected %d"
msgstr ""
-#: config/tc-xtensa.c:3892
+#: config/tc-xtensa.c:3879
#, c-format
msgid "found too many (%d) operands for '%s': Expected %d"
msgstr ""
-#: config/tc-xtensa.c:4029
+#: config/tc-xtensa.c:4016
msgid "invalid immediate"
msgstr ""
-#: config/tc-xtensa.c:4140
+#: config/tc-xtensa.c:4130
#, c-format
msgid "invalid relocation for operand %i of '%s'"
msgstr ""
-#: config/tc-xtensa.c:4150
+#: config/tc-xtensa.c:4140
#, c-format
msgid "invalid expression for operand %i of '%s'"
msgstr ""
-#: config/tc-xtensa.c:4160
+#: config/tc-xtensa.c:4150
#, c-format
msgid "invalid relocation in instruction slot %i"
msgstr ""
-#: config/tc-xtensa.c:4167
+#: config/tc-xtensa.c:4157
#, c-format
msgid "undefined symbol for opcode \"%s\""
msgstr ""
-#: config/tc-xtensa.c:4608
+#: config/tc-xtensa.c:4612
msgid "opcode 'NOP.N' unavailable in this configuration"
msgstr ""
-#: config/tc-xtensa.c:4668
+#: config/tc-xtensa.c:4672
msgid "get_expanded_loop_offset: invalid opcode"
msgstr ""
-#: config/tc-xtensa.c:4751
+#: config/tc-xtensa.c:4804
#, c-format
msgid "assembly state not set for first frag in section %s"
msgstr ""
-#: config/tc-xtensa.c:4804
+#: config/tc-xtensa.c:4857
#, c-format
msgid "unaligned branch target: %d bytes at 0x%lx"
msgstr ""
-#: config/tc-xtensa.c:4843
+#: config/tc-xtensa.c:4896
#, c-format
msgid "unaligned loop: %d bytes at 0x%lx"
msgstr ""
-#: config/tc-xtensa.c:4867
+#: config/tc-xtensa.c:4920
msgid "unexpected fix"
msgstr ""
-#: config/tc-xtensa.c:4878 config/tc-xtensa.c:4882
+#: config/tc-xtensa.c:4931 config/tc-xtensa.c:4935
msgid "undecodable fix"
msgstr ""
-#: config/tc-xtensa.c:5012
+#: config/tc-xtensa.c:5061
msgid "labels are not valid inside bundles"
msgstr ""
-#: config/tc-xtensa.c:5032
+#: config/tc-xtensa.c:5081
msgid "invalid last instruction for a zero-overhead loop"
msgstr ""
-#: config/tc-xtensa.c:5097
+#: config/tc-xtensa.c:5146
msgid "extra opening brace"
msgstr ""
-#: config/tc-xtensa.c:5107
+#: config/tc-xtensa.c:5156
msgid "extra closing brace"
msgstr ""
-#: config/tc-xtensa.c:5125
+#: config/tc-xtensa.c:5183
msgid "missing closing brace"
msgstr ""
-#: config/tc-xtensa.c:5205
+#: config/tc-xtensa.c:5263
#, c-format
msgid "unknown opcode or format name '%s'"
msgstr ""
-#: config/tc-xtensa.c:5211
+#: config/tc-xtensa.c:5269
msgid "format names only valid inside bundles"
msgstr ""
-#: config/tc-xtensa.c:5216
+#: config/tc-xtensa.c:5274
#, c-format
msgid "multiple formats specified for one bundle; using '%s'"
msgstr ""
-#: config/tc-xtensa.c:5271
+#: config/tc-xtensa.c:5323
msgid "entry instruction with stack decrement < 16"
msgstr ""
-#: config/tc-xtensa.c:5275
-msgid "entry instruction with non-constant decrement"
-msgstr ""
-
-#: config/tc-xtensa.c:5330
+#: config/tc-xtensa.c:5376
msgid "unaligned entry instruction"
msgstr ""
-#: config/tc-xtensa.c:5389
+#: config/tc-xtensa.c:5438
msgid "bad instruction format"
msgstr ""
-#: config/tc-xtensa.c:5392
+#: config/tc-xtensa.c:5441
msgid "invalid relocation"
msgstr ""
-#: config/tc-xtensa.c:5403
+#: config/tc-xtensa.c:5452
#, c-format
msgid "invalid relocation for '%s' instruction"
msgstr ""
-#: config/tc-xtensa.c:5415
+#: config/tc-xtensa.c:5464
#, c-format
msgid "invalid relocation for operand %d of '%s'"
msgstr ""
-#: config/tc-xtensa.c:5572
+#: config/tc-xtensa.c:5628
msgid "cannot represent subtraction with an offset"
msgstr ""
-#: config/tc-xtensa.c:5660
+#: config/tc-xtensa.c:5716
#, c-format
msgid "unhandled local relocation fix %s"
msgstr ""
-#: config/tc-xtensa.c:5968
+#: config/tc-xtensa.c:6023
msgid "couldn't find a valid instruction format"
msgstr ""
-#: config/tc-xtensa.c:5969
+#: config/tc-xtensa.c:6024
#, c-format
msgid " ops were: "
msgstr ""
-#: config/tc-xtensa.c:5971
+#: config/tc-xtensa.c:6026
#, c-format
msgid " %s;"
msgstr ""
-#: config/tc-xtensa.c:5974
-#, c-format
-msgid "\n"
-msgstr ""
-
-#: config/tc-xtensa.c:5982
+#: config/tc-xtensa.c:6037
#, c-format
msgid "format '%s' allows %d slots, but there are %d opcodes"
msgstr ""
-#: config/tc-xtensa.c:5993 config/tc-xtensa.c:6091
+#: config/tc-xtensa.c:6048 config/tc-xtensa.c:6146
msgid "illegal resource usage in bundle"
msgstr ""
-#: config/tc-xtensa.c:6178
+#: config/tc-xtensa.c:6233
#, c-format
msgid "opcodes '%s' (slot %d) and '%s' (slot %d) write the same register"
msgstr ""
-#: config/tc-xtensa.c:6183
+#: config/tc-xtensa.c:6238
#, c-format
msgid "opcodes '%s' (slot %d) and '%s' (slot %d) write the same state"
msgstr ""
-#: config/tc-xtensa.c:6188
+#: config/tc-xtensa.c:6243
#, c-format
-msgid "opcodes '%s' (slot %d) and '%s' (slot %d) write the same queue"
+msgid "opcodes '%s' (slot %d) and '%s' (slot %d) write the same port"
msgstr ""
-#: config/tc-xtensa.c:6193
+#: config/tc-xtensa.c:6248
#, c-format
msgid ""
-"opcodes '%s' (slot %d) and '%s' (slot %d) both have volatile queue accesses"
+"opcodes '%s' (slot %d) and '%s' (slot %d) both have volatile port accesses"
msgstr ""
-#: config/tc-xtensa.c:6209
+#: config/tc-xtensa.c:6264
msgid "multiple branches or jumps in the same bundle"
msgstr ""
-#: config/tc-xtensa.c:6664
+#: config/tc-xtensa.c:6712
msgid "cannot assemble into a literal fragment"
msgstr ""
-#: config/tc-xtensa.c:6666
+#: config/tc-xtensa.c:6714
msgid "..."
msgstr ""
-#: config/tc-xtensa.c:7175
+#: config/tc-xtensa.c:7258
msgid ""
"instruction sequence (write a0, branch, retw) may trigger hardware errata"
msgstr ""
-#: config/tc-xtensa.c:7285
+#: config/tc-xtensa.c:7370
msgid "branching or jumping to a loop end may trigger hardware errata"
msgstr ""
-#: config/tc-xtensa.c:7384
+#: config/tc-xtensa.c:7452
msgid "loop end too close to another loop end may trigger hardware errata"
msgstr ""
-#: config/tc-xtensa.c:7393
+#: config/tc-xtensa.c:7461
#, c-format
msgid "fr_var %lu < length %d"
msgstr ""
-#: config/tc-xtensa.c:7564
+#: config/tc-xtensa.c:7620
msgid ""
"loop containing less than three instructions may trigger hardware errata"
msgstr ""
-#: config/tc-xtensa.c:7636
+#: config/tc-xtensa.c:7692
msgid "undecodable instruction in instruction frag"
msgstr ""
-#: config/tc-xtensa.c:7745
+#: config/tc-xtensa.c:7802
msgid "invalid empty loop"
msgstr ""
-#: config/tc-xtensa.c:7750
+#: config/tc-xtensa.c:7807
msgid "loop target does not follow loop instruction in section"
msgstr ""
-#: config/tc-xtensa.c:8287
+#: config/tc-xtensa.c:8380
msgid "bad relaxation state"
msgstr ""
-#: config/tc-xtensa.c:8345
+#: config/tc-xtensa.c:8438
#, c-format
msgid "fr_var (%ld) < length (%d)"
msgstr ""
-#: config/tc-xtensa.c:8846
+#: config/tc-xtensa.c:8945
msgid "internal error: relaxation failed"
msgstr ""
-#: config/tc-xtensa.c:8852
+#: config/tc-xtensa.c:8951
msgid "internal error: relaxation requires too many steps"
msgstr ""
-#: config/tc-xtensa.c:9027
+#: config/tc-xtensa.c:9127
msgid "invalid relaxation fragment result"
msgstr ""
-#: config/tc-xtensa.c:9107
+#: config/tc-xtensa.c:9206
msgid "unable to widen instruction"
msgstr ""
-#: config/tc-xtensa.c:9250
+#: config/tc-xtensa.c:9346
msgid "multiple literals in expansion"
msgstr ""
-#: config/tc-xtensa.c:9254
+#: config/tc-xtensa.c:9350
msgid "no registered fragment for literal"
msgstr ""
-#: config/tc-xtensa.c:9256
+#: config/tc-xtensa.c:9352
msgid "number of literal tokens != 1"
msgstr ""
-#: config/tc-xtensa.c:9400 config/tc-xtensa.c:9406
+#: config/tc-xtensa.c:9482 config/tc-xtensa.c:9488
#, c-format
msgid "unresolved loop target symbol: %s"
msgstr ""
-#: config/tc-xtensa.c:9512
+#: config/tc-xtensa.c:9594
#, c-format
msgid "invalid expression evaluation type %d"
msgstr ""
-#: config/tc-xtensa.c:9534
+#: config/tc-xtensa.c:9611
msgid "loop too long for LOOP instruction"
msgstr ""
-#: config/tc-xtensa.c:9805
+#: config/tc-xtensa.c:9881
#, c-format
msgid "fixes not all moved from %s"
msgstr ""
-#: config/tc-xtensa.c:9947
+#: config/tc-xtensa.c:10012
msgid ""
"literal pool location required for text-section-literals; specify with ."
"literal_position"
msgstr ""
-#: config/tc-xtensa.c:10456
-#, c-format
-msgid "could not create section %s"
-msgstr ""
-
-#: config/tc-xtensa.c:10458
-#, c-format
-msgid "invalid flag combination on section %s"
-msgstr ""
-
-#: config/tc-xtensa.c:10844
+#: config/tc-xtensa.c:10941
msgid "too many operands in instruction"
msgstr ""
-#: config/tc-xtensa.c:11078
-#, c-format
-msgid "invalid symbolic operand %d on '%s'"
+#: config/tc-xtensa.c:11152
+msgid "invalid symbolic operand"
msgstr ""
-#: config/tc-xtensa.c:11147 config/tc-xtensa.c:11221
+#: config/tc-xtensa.c:11213
msgid "operand number mismatch"
msgstr ""
-#: config/tc-xtensa.c:11150
-msgid "cannot encode opcode"
-msgstr ""
-
-#: config/tc-xtensa.c:11225
+#: config/tc-xtensa.c:11217
#, c-format
msgid "cannot encode opcode \"%s\" in the given format \"%s\""
msgstr ""
-#: config/tc-xtensa.c:11250
+#: config/tc-xtensa.c:11242
#, c-format
msgid "xtensa-isa failure: %s"
msgstr ""
-#: config/tc-xtensa.c:11283
+#: config/tc-xtensa.c:11313
msgid "invalid opcode"
msgstr ""
-#: config/tc-xtensa.c:11289
+#: config/tc-xtensa.c:11319
msgid "too few operands"
msgstr ""
-#: config/tc-xtensa.c:11416 config/tc-xtensa.c:11424
+#: config/tc-xtensa.c:11434 config/tc-xtensa.c:11440
msgid "out of memory"
msgstr ""
-#: config/tc-xtensa.c:11536
-msgid "instruction with constant operands does not fit"
+#: config/tc-xtensa.c:11551
+msgid "symbolic operand not allowed"
+msgstr ""
+
+#: config/tc-xtensa.c:11588
+msgid "cannot decode instruction format"
+msgstr ""
+
+#: config/tc-xtensa.c:11732
+msgid "ignoring extra '-rename-section' delimiter ':'"
msgstr ""
-#: config/tc-xtensa.c:11545 config/tc-xtensa.c:11566
+#: config/tc-xtensa.c:11737
#, c-format
-msgid "invalid operand %d on '%s'"
+msgid "ignoring invalid '-rename-section' specification: '%s'"
msgstr ""
-#: config/tc-xtensa.c:11557
-msgid "invalid subtract operand"
+#: config/tc-xtensa.c:11748
+#, c-format
+msgid "section %s renamed multiple times"
msgstr ""
-#: config/tc-xtensa.c:11571
+#: config/tc-xtensa.c:11750
#, c-format
-msgid "invalid expression for operand %d on '%s'"
+msgid "multiple sections remapped to output section %s"
msgstr ""
-#: config/tc-xtensa.c:11601
-msgid "cannot decode instruction format"
+#: config/tc-z80.c:244
+msgid "-- unterminated string"
msgstr ""
-#: config/tc-xtensa.c:11760
-msgid "ignoring extra '-rename-section' delimiter ':'"
+#: config/tc-z80.c:314
+msgid "floating point numbers are not implemented"
msgstr ""
-#: config/tc-xtensa.c:11765
-#, c-format
-msgid "ignoring invalid '-rename-section' specification: '%s'"
+#: config/tc-z80.c:493 config/tc-z80.c:499
+msgid "mismatched parentheses"
+msgstr ""
+
+#: config/tc-z80.c:553
+msgid "bad offset expression syntax"
+msgstr ""
+
+#: config/tc-z80.c:577
+msgid "bad expression syntax"
+msgstr ""
+
+#: config/tc-z80.c:690
+msgid "cannot make a relative jump to an absolute location"
+msgstr ""
+
+#: config/tc-z80.c:702 config/tc-z80.c:1960
+msgid "overflow"
+msgstr ""
+
+#: config/tc-z80.c:1070 config/tc-z80.c:1113 config/tc-z80.c:1157
+#: config/tc-z80.c:1277 config/tc-z80.c:1331 config/tc-z80.c:1600
+msgid "bad intruction syntax"
+msgstr ""
+
+#: config/tc-z80.c:1203
+msgid "condition code invalid for jr"
+msgstr ""
+
+#: config/tc-z80.c:1225
+msgid "bad instruction syntax"
+msgstr ""
+
+#: config/tc-z80.c:1704
+msgid "parentheses ignored"
msgstr ""
-#: config/tc-xtensa.c:11776
+#: config/tc-z80.c:1909 read.c:3501
#, c-format
-msgid "section %s renamed multiple times"
+msgid "junk at end of line, first unrecognized character is `%c'"
+msgstr ""
+
+#: config/tc-z80.c:1935 config/tc-z8k.c:1513 config/tc-z8k.c:1576
+msgid "relative jump out of range"
+msgstr ""
+
+#: config/tc-z80.c:1952
+msgid "index offset out of range"
msgstr ""
-#: config/tc-xtensa.c:11778
+#: config/tc-z80.c:1994 config/tc-z8k.c:1584
#, c-format
-msgid "multiple sections remapped to output section %s"
+msgid "md_apply_fix: unknown r_type 0x%x\n"
msgstr ""
-#: config/tc-z8k.c:268
+#: config/tc-z8k.c:282
#, c-format
msgid "register rr%d out of range"
msgstr ""
-#: config/tc-z8k.c:270
+#: config/tc-z8k.c:284
#, c-format
msgid "register rr%d does not exist"
msgstr ""
-#: config/tc-z8k.c:280
+#: config/tc-z8k.c:296
#, c-format
msgid "register rh%d out of range"
msgstr ""
-#: config/tc-z8k.c:290
+#: config/tc-z8k.c:308
#, c-format
msgid "register rl%d out of range"
msgstr ""
-#: config/tc-z8k.c:301
+#: config/tc-z8k.c:321
#, c-format
msgid "register rq%d out of range"
msgstr ""
-#: config/tc-z8k.c:303
+#: config/tc-z8k.c:323
#, c-format
msgid "register rq%d does not exist"
msgstr ""
-#: config/tc-z8k.c:313
+#: config/tc-z8k.c:335
#, c-format
msgid "register r%d out of range"
msgstr ""
-#: config/tc-z8k.c:354
+#: config/tc-z8k.c:376
#, c-format
msgid "expected %c"
msgstr ""
-#: config/tc-z8k.c:369
+#: config/tc-z8k.c:391
#, c-format
msgid "register is wrong size for a word %s"
msgstr ""
-#: config/tc-z8k.c:383
+#: config/tc-z8k.c:405
#, c-format
msgid "register is wrong size for address %s"
msgstr ""
-#: config/tc-z8k.c:517
+#: config/tc-z8k.c:539
#, c-format
msgid "unknown interrupt %s"
msgstr ""
#. No interrupt type specified, opcode won't do anything.
-#: config/tc-z8k.c:540
+#: config/tc-z8k.c:562
msgid "opcode has no effect"
msgstr ""
-#: config/tc-z8k.c:651
+#: config/tc-z8k.c:673
msgid "Missing ) in ra(rb)"
msgstr ""
-#: config/tc-z8k.c:731 config/tc-z8k.c:770
+#: config/tc-z8k.c:753 config/tc-z8k.c:792
#, c-format
msgid "invalid condition code '%s'"
msgstr ""
-#: config/tc-z8k.c:743
+#: config/tc-z8k.c:765
#, c-format
msgid "invalid flag '%s'"
msgstr ""
-#: config/tc-z8k.c:897 config/tc-z8k.c:903
+#: config/tc-z8k.c:919 config/tc-z8k.c:925
msgid "invalid indirect register size"
msgstr ""
-#: config/tc-z8k.c:920 config/tc-z8k.c:1068 config/tc-z8k.c:1073
+#: config/tc-z8k.c:942 config/tc-z8k.c:1090 config/tc-z8k.c:1095
msgid "invalid control register name"
msgstr ""
-#: config/tc-z8k.c:1057
+#: config/tc-z8k.c:1079
msgid "immediate must be 1 or 2"
msgstr ""
-#: config/tc-z8k.c:1060
+#: config/tc-z8k.c:1082
msgid "immediate 1 or 2 expected"
msgstr ""
-#: config/tc-z8k.c:1091
+#: config/tc-z8k.c:1113
msgid "can't use R0 here"
msgstr ""
-#: config/tc-z8k.c:1249
+#: config/tc-z8k.c:1271
msgid "Can't find opcode to match operands"
msgstr ""
-#: config/tc-z8k.c:1348
+#: config/tc-z8k.c:1370
#, c-format
msgid "invalid architecture -z%s"
msgstr ""
-#: config/tc-z8k.c:1368
+#: config/tc-z8k.c:1390
#, c-format
msgid ""
" Z8K options:\n"
@@ -11067,33 +12160,24 @@ msgid ""
" -linkrelax create linker relaxable code\n"
msgstr ""
-#: config/tc-z8k.c:1380
+#: config/tc-z8k.c:1402
#, c-format
msgid "call to md_convert_frag\n"
msgstr ""
-#: config/tc-z8k.c:1487 config/tc-z8k.c:1527 config/tc-z8k.c:1550
+#: config/tc-z8k.c:1509 config/tc-z8k.c:1549 config/tc-z8k.c:1572
msgid "cannot branch to odd address"
msgstr ""
-#: config/tc-z8k.c:1491 config/tc-z8k.c:1554
-msgid "relative jump out of range"
-msgstr ""
-
-#: config/tc-z8k.c:1509
+#: config/tc-z8k.c:1531
msgid "relative address out of range"
msgstr ""
-#: config/tc-z8k.c:1530
+#: config/tc-z8k.c:1552
msgid "relative call out of range"
msgstr ""
-#: config/tc-z8k.c:1562
-#, c-format
-msgid "md_apply_fix: unknown r_type 0x%x\n"
-msgstr ""
-
-#: config/tc-z8k.c:1574
+#: config/tc-z8k.c:1596
#, c-format
msgid "call to md_estimate_size_before_relax\n"
msgstr ""
@@ -11108,67 +12192,91 @@ msgstr ""
msgid "can't close `%s'"
msgstr ""
-#: dw2gencfi.c:258
+#: dw2gencfi.c:276
#, c-format
msgid "register save offset not a multiple of %u"
msgstr ""
-#: dw2gencfi.c:341
+#: dw2gencfi.c:359
msgid "CFI state restore without previous remember"
msgstr ""
-#: dw2gencfi.c:387
+#: dw2gencfi.c:411
msgid "missing separator"
msgstr ""
-#: dw2gencfi.c:409 dw2gencfi.c:427
+#: dw2gencfi.c:433 dw2gencfi.c:451
msgid "bad register expression"
msgstr ""
-#: dw2gencfi.c:449 dw2gencfi.c:551
+#: dw2gencfi.c:473 dw2gencfi.c:596 dw2gencfi.c:634 dw2gencfi.c:704
msgid "CFI instruction used without previous .cfi_startproc"
msgstr ""
-#: dw2gencfi.c:587
+#: dw2gencfi.c:658
+msgid "invalid or unsupported encoding in .cfi_personality"
+msgstr ""
+
+#: dw2gencfi.c:665
+msgid ".cfi_personality requires encoding and symbol arguments"
+msgstr ""
+
+#: dw2gencfi.c:688
+msgid "wrong second argument to .cfi_personality"
+msgstr ""
+
+#: dw2gencfi.c:728
+msgid "invalid or unsupported encoding in .cfi_lsda"
+msgstr ""
+
+#: dw2gencfi.c:735
+msgid ".cfi_lsda requires encoding and symbol arguments"
+msgstr ""
+
+#: dw2gencfi.c:760
+msgid "wrong second argument to .cfi_lsda"
+msgstr ""
+
+#: dw2gencfi.c:775
msgid "previous CFI entry not closed (missing .cfi_endproc)"
msgstr ""
-#: dw2gencfi.c:622
+#: dw2gencfi.c:810
msgid ".cfi_endproc without corresponding .cfi_startproc"
msgstr ""
-#: dw2gencfi.c:1031
+#: dw2gencfi.c:1339
msgid "open CFI at the end of file; missing .cfi_endproc directive"
msgstr ""
-#: dwarf2dbg.c:523 dwarf2dbg.c:549
+#: dwarf2dbg.c:553 dwarf2dbg.c:579
msgid "file number less than one"
msgstr ""
-#: dwarf2dbg.c:529
+#: dwarf2dbg.c:559
#, c-format
msgid "file number %ld already allocated"
msgstr ""
-#: dwarf2dbg.c:554 dwarf2dbg.c:1169
+#: dwarf2dbg.c:584 dwarf2dbg.c:1244
#, c-format
msgid "unassigned file number %ld"
msgstr ""
-#: dwarf2dbg.c:622
+#: dwarf2dbg.c:652
msgid "is_stmt value not 0 or 1"
msgstr ""
-#: dwarf2dbg.c:634
+#: dwarf2dbg.c:664
msgid "isa number less than zero"
msgstr ""
-#: dwarf2dbg.c:640
+#: dwarf2dbg.c:670
#, c-format
msgid "unknown .loc sub-directive `%s'"
msgstr ""
-#: dwarf2dbg.c:1234 dwarf2dbg.c:1428
+#: dwarf2dbg.c:1309 dwarf2dbg.c:1558
msgid "internal error: unknown dwarf2 format"
msgstr ""
@@ -11285,7 +12393,7 @@ msgid ".val pseudo-op used outside of .def/.endef; ignored"
msgstr ""
#: ecoff.c:2781
-msgid ".val expression is too copmlex"
+msgid ".val expression is too complex"
msgstr ""
#: ecoff.c:2811
@@ -11325,12 +12433,6 @@ msgstr ""
msgid ".loc before .file"
msgstr ""
-#: ecoff.c:3355 read.c:1473 read.c:1579 read.c:2256 read.c:2803 symbols.c:327
-#: symbols.c:423
-#, c-format
-msgid "symbol `%s' is already defined"
-msgstr ""
-
#: ecoff.c:3368
msgid "bad .weakext directive"
msgstr ""
@@ -11368,92 +12470,92 @@ msgstr ""
msgid "GP prologue size exceeds field size, using 0 instead"
msgstr ""
-#: expr.c:82 read.c:3351
+#: expr.c:81 read.c:3566
msgid "bignum invalid"
msgstr ""
-#: expr.c:84 read.c:3353 read.c:3702 read.c:4550
+#: expr.c:83 read.c:3568 read.c:4025 read.c:4873
msgid "floating point number invalid"
msgstr ""
-#: expr.c:203
+#: expr.c:202
msgid "bad floating-point constant: exponent overflow"
msgstr ""
-#: expr.c:207
+#: expr.c:206
#, c-format
msgid "bad floating-point constant: unknown error code=%d"
msgstr ""
-#: expr.c:383
+#: expr.c:385
msgid ""
"a bignum with underscores may not have more than 8 hex digits in any word"
msgstr ""
-#: expr.c:406
+#: expr.c:408
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:529
+#: expr.c:531
#, c-format
msgid "backward ref to unknown label \"%d:\""
msgstr ""
-#: expr.c:647
+#: expr.c:649
msgid "character constant too large"
msgstr ""
-#: expr.c:893
+#: expr.c:895
#, c-format
msgid "expr.c(operand): bad atof_generic return val %d"
msgstr ""
-#: expr.c:954
+#: expr.c:956
#, c-format
msgid "missing '%c'"
msgstr ""
-#: expr.c:965 read.c:4034
+#: expr.c:967 read.c:4357
msgid "EBCDIC constants are not supported"
msgstr ""
-#: expr.c:1082
+#: expr.c:1079
#, c-format
msgid "Unary operator %c ignored because bad operand follows"
msgstr ""
-#: expr.c:1128 expr.c:1153
+#: expr.c:1125 expr.c:1150
msgid "syntax error in .startof. or .sizeof."
msgstr ""
-#: expr.c:1665
+#: expr.c:1661
msgid "missing operand; zero assumed"
msgstr ""
-#: expr.c:1700
+#: expr.c:1696
msgid "left operand is a bignum; integer 0 assumed"
msgstr ""
-#: expr.c:1702
+#: expr.c:1698
msgid "left operand is a float; integer 0 assumed"
msgstr ""
-#: expr.c:1711
+#: expr.c:1707
msgid "right operand is a bignum; integer 0 assumed"
msgstr ""
-#: expr.c:1713
+#: expr.c:1709
msgid "right operand is a float; integer 0 assumed"
msgstr ""
-#: expr.c:1769 symbols.c:1207
+#: expr.c:1768 symbols.c:1349
msgid "division by zero"
msgstr ""
-#: expr.c:1867
+#: expr.c:1868
msgid "operation combines symbols in different segments"
msgstr ""
@@ -11482,34 +12584,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:141 input-scrub.c:238 listing.c:332
+#: input-file.c:138 input-scrub.c:241 listing.c:332
msgid "{standard input}"
msgstr ""
-#: input-file.c:147 input-file.c:156
+#: input-file.c:143
#, c-format
-msgid "Can't open %s for reading"
+msgid "can't open %s for reading: %s"
msgstr ""
-#: input-file.c:219 input-file.c:246
+#: input-file.c:152 input-file.c:215 input-file.c:241
#, c-format
-msgid "Can't read from %s"
+msgid "can't read from %s: %s"
msgstr ""
-#: input-file.c:256
+#: input-file.c:249 listing.c:1097 output-file.c:69
#, c-format
-msgid "Can't close %s"
+msgid "can't close %s: %s"
msgstr ""
-#: input-scrub.c:263
+#: input-scrub.c:266
msgid "macros nested too deeply"
msgstr ""
-#: input-scrub.c:365 input-scrub.c:387
+#: input-scrub.c:369 input-scrub.c:393
msgid "partial line at end of file ignored"
msgstr ""
-#: itbl-ops.c:338
+#: itbl-ops.c:329
#, c-format
msgid "Unable to allocate memory for new instructions\n"
msgstr ""
@@ -11522,255 +12624,246 @@ msgstr ""
msgid "Error:"
msgstr ""
-#: listing.c:1089
-#, c-format
-msgid "can't open list file: %s"
-msgstr ""
-
-#: listing.c:1109
+#: listing.c:1079
#, c-format
-msgid "error closing list file: %s"
+msgid "can't open %s: %s"
msgstr ""
-#: listing.c:1182
+#: listing.c:1169
msgid "strange paper height, set to no form"
msgstr ""
-#: listing.c:1246
+#: listing.c:1233
msgid "new line in title"
msgstr ""
#. Turns the next expression into a string.
-#: macro.c:436
+#: macro.c:371
#, no-c-format
msgid "% operator needs absolute expression"
msgstr ""
-#: macro.c:558
+#: macro.c:521
#, c-format
msgid "Missing parameter qualifier for `%s' in macro `%s'"
msgstr ""
-#: macro.c:568
+#: macro.c:531
#, c-format
msgid "`%s' is not a valid parameter qualifier for `%s' in macro `%s'"
msgstr ""
-#: macro.c:585
+#: macro.c:548
#, c-format
msgid "Pointless default value for required parameter `%s' in macro `%s'"
msgstr ""
-#: macro.c:597
+#: macro.c:560
#, c-format
msgid "A parameter named `%s' already exists for macro `%s'"
msgstr ""
-#: macro.c:634
+#: macro.c:597
#, c-format
msgid "Reserved word `%s' used as parameter in macro `%s'"
msgstr ""
-#: macro.c:672
+#: macro.c:635
#, c-format
msgid "unexpected end of file in macro `%s' definition"
msgstr ""
-#: macro.c:684
+#: macro.c:647
#, c-format
msgid "missing `)' after formals in macro definition `%s'"
msgstr ""
-#: macro.c:699
+#: macro.c:662
msgid "Missing macro name"
msgstr ""
-#: macro.c:708
+#: macro.c:671
#, c-format
msgid "Bad parameter list for macro `%s'"
msgstr ""
-#: macro.c:714
+#: macro.c:677
#, c-format
msgid "Macro `%s' was already defined"
msgstr ""
-#: macro.c:837 macro.c:839
+#: macro.c:800 macro.c:802
msgid "missing `)'"
msgstr ""
-#: macro.c:934
+#: macro.c:897
#, c-format
msgid "`%s' was already used as parameter (or another local) name"
msgstr ""
-#: macro.c:1093
+#: macro.c:1055
msgid "confusion in formal parameters"
msgstr ""
-#: macro.c:1100
+#: macro.c:1062
#, c-format
msgid "Parameter named `%s' does not exist for macro `%s'"
msgstr ""
-#: macro.c:1108
+#: macro.c:1070
#, c-format
msgid "Value for parameter `%s' of macro `%s' was already specified"
msgstr ""
-#: macro.c:1124
+#: macro.c:1084
msgid "can't mix positional and keyword arguments"
msgstr ""
-#: macro.c:1135
+#: macro.c:1095
msgid "too many positional arguments"
msgstr ""
-#: macro.c:1183
+#: macro.c:1143
#, c-format
msgid "Missing value for required parameter `%s' of macro `%s'"
msgstr ""
-#: macro.c:1320
+#: macro.c:1280
#, c-format
msgid "Attempt to purge non-existant macro `%s'"
msgstr ""
-#: macro.c:1339
+#: macro.c:1299
msgid "unexpected end of file in irp or irpc"
msgstr ""
-#: macro.c:1347
+#: macro.c:1307
msgid "missing model parameter"
msgstr ""
-#: messages.c:104
+#: messages.c:82
#, c-format
msgid "Assembler messages:\n"
msgstr ""
-#: messages.c:206
+#: messages.c:166
#, c-format
msgid "Warning: "
msgstr ""
-#: messages.c:307
+#: messages.c:267
#, c-format
msgid "Error: "
msgstr ""
-#: messages.c:402 messages.c:422
+#: messages.c:362 messages.c:382
#, c-format
msgid "Fatal error: "
msgstr ""
-#: messages.c:437
+#: messages.c:397
#, c-format
msgid "Internal error!\n"
msgstr ""
-#: messages.c:439
+#: messages.c:399
#, c-format
msgid "Assertion failure in %s at %s line %d.\n"
msgstr ""
-#: messages.c:442
+#: messages.c:402
#, c-format
msgid "Assertion failure at %s line %d.\n"
msgstr ""
-#: messages.c:443 messages.c:460
+#: messages.c:403 messages.c:420
#, c-format
msgid "Please report this bug.\n"
msgstr ""
-#: messages.c:455
+#: messages.c:415
#, c-format
msgid "Internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: messages.c:458
+#: messages.c:418
#, c-format
msgid "Internal error, aborting at %s line %d\n"
msgstr ""
-#: messages.c:507
+#: messages.c:467
+#, c-format
+msgid "%s out of domain (%d is not a multiple of %d)"
+msgstr ""
+
+#: messages.c:485
#, c-format
msgid "%s out of range (%d is not between %d and %d)"
msgstr ""
#. xgettext:c-format.
-#: messages.c:530
+#: messages.c:508
#, c-format
msgid "%s out of range (0x%s is not between 0x%s and 0x%s)"
msgstr ""
-#: output-file.c:39
+#: output-file.c:35
#, c-format
msgid "can't open a bfd on stdout %s"
msgstr ""
-#: output-file.c:44
-#, c-format
-msgid "Selected target format '%s' unknown"
-msgstr ""
-
-#: output-file.c:46
+#: output-file.c:42
#, c-format
-msgid "FATAL: can't create %s"
+msgid "selected target format '%s' unknown"
msgstr ""
-#: output-file.c:63
+#: output-file.c:44
#, c-format
-msgid "FATAL: can't close %s\n"
+msgid "can't create %s: %s"
msgstr ""
-#: read.c:450
+#: read.c:458
msgid "bad or irreducible absolute expression"
msgstr ""
-#: read.c:476
+#: read.c:484
#, c-format
msgid "error constructing %s pseudo-op table: %s"
msgstr ""
-#: read.c:896
+#: read.c:894
#, c-format
msgid "unknown pseudo-op: `%s'"
msgstr ""
-#: read.c:983
+#: read.c:981
#, c-format
msgid "label \"%d$\" redefined"
msgstr ""
-#: read.c:1214
+#: read.c:1216
msgid ".abort detected. Abandoning ship."
msgstr ""
-#: read.c:1232 read.c:2406
+#: read.c:1234 read.c:2605
msgid "ignoring fill value in absolute section"
msgstr ""
-#: read.c:1322
+#: read.c:1324
#, c-format
msgid "alignment too large: %u assumed"
msgstr ""
-#: read.c:1354
+#: read.c:1356
msgid "expected fill pattern missing"
msgstr ""
-#: read.c:1457
-msgid "missing size expression"
-msgstr ""
-
-#: read.c:1463
+#: read.c:1465
#, c-format
msgid "size (%ld) out of range, ignored"
msgstr ""
-#: read.c:1483
+#: read.c:1494
#, c-format
msgid "size of \"%s\" is already %ld; not changing to %ld"
msgstr ""
@@ -11784,309 +12877,314 @@ msgstr ""
#. We do not want to barf on this, especially since such files are used
#. in the GCC and GDB testsuites. So we check for negative line numbers
#. rather than non-positive line numbers.
-#: read.c:1712
+#: read.c:1744
#, c-format
msgid "line numbers must be positive; line number %d rejected"
msgstr ""
-#: read.c:1739
+#: read.c:1781
+#, c-format
+msgid "incompatible flag %i in line directive"
+msgstr ""
+
+#: read.c:1793
+#, c-format
+msgid "unsupported flag %i in line directive"
+msgstr ""
+
+#: read.c:1832
msgid "start address not supported"
msgstr ""
-#: read.c:1748
+#: read.c:1841
msgid ".err encountered"
msgstr ""
-#: read.c:1764
+#: read.c:1857
msgid ".error directive invoked in source file"
msgstr ""
-#: read.c:1765
+#: read.c:1858
msgid ".warning directive invoked in source file"
msgstr ""
-#: read.c:1771
+#: read.c:1864
#, c-format
msgid "%s argument must be a string"
msgstr ""
-#: read.c:1803 read.c:1805
+#: read.c:1896 read.c:1898
#, c-format
msgid ".fail %ld encountered"
msgstr ""
-#: read.c:1841
+#: read.c:1934
#, c-format
msgid ".fill size clamped to %d"
msgstr ""
-#: read.c:1846
+#: read.c:1939
msgid "size negative; .fill ignored"
msgstr ""
-#: read.c:1852
+#: read.c:1945
msgid "repeat < 0; .fill ignored"
msgstr ""
-#: read.c:2010
+#: read.c:2083
+msgid "expected numeric constant"
+msgstr ""
+
+#: read.c:2139
+msgid "bad string constant"
+msgstr ""
+
+#: read.c:2143
+msgid "expected <tag> , <value>"
+msgstr ""
+
+#: read.c:2217
#, c-format
msgid "unrecognized .linkonce type `%s'"
msgstr ""
-#: read.c:2022
+#: read.c:2229
msgid ".linkonce is not supported for this object file format"
msgstr ""
-#: read.c:2044
+#: read.c:2251
#, c-format
msgid "bfd_set_section_flags: %s"
msgstr ""
-#: read.c:2070
-#, c-format
-msgid "error setting flags for \".sbss\": %s"
-msgstr ""
-
-#: read.c:2117
+#: read.c:2324
msgid "expected alignment after size"
msgstr ""
-#: read.c:2131
-msgid "alignment negative; 0 assumed"
-msgstr ""
-
-#: read.c:2340
+#: read.c:2539
#, c-format
msgid "attempt to redefine pseudo-op `%s' ignored"
msgstr ""
-#: read.c:2401
+#: read.c:2600
#, c-format
msgid "invalid segment \"%s\""
msgstr ""
-#: read.c:2409
+#: read.c:2608
msgid "only constant offsets supported in absolute section"
msgstr ""
-#: read.c:2448
+#: read.c:2647
msgid "MRI style ORG pseudo-op not supported"
msgstr ""
-#: read.c:2601
+#: read.c:2800
#, c-format
msgid "unrecognized section type `%s'"
msgstr ""
-#: read.c:2615
+#: read.c:2814
msgid "absolute sections are not supported"
msgstr ""
-#: read.c:2630
+#: read.c:2829
#, c-format
msgid "unrecognized section command `%s'"
msgstr ""
-#: read.c:2694
+#: read.c:2893
#, c-format
msgid ".end%c encountered without preceeding %s"
msgstr ""
-#: read.c:2724
+#: read.c:2923
#, c-format
msgid "%s without %s"
msgstr ""
-#: read.c:2951
+#: read.c:3147
msgid "unsupported variable size or fill value"
msgstr ""
-#: read.c:2979
+#: read.c:3175
msgid ".space repeat count is zero, ignored"
msgstr ""
-#: read.c:2981
+#: read.c:3177
msgid ".space repeat count is negative, ignored"
msgstr ""
-#: read.c:3010
+#: read.c:3206
msgid "space allocation too complex in absolute section"
msgstr ""
-#: read.c:3016
+#: read.c:3212
msgid "space allocation too complex in common section"
msgstr ""
-#: read.c:3103 read.c:4276
+#: read.c:3299 read.c:4599
#, c-format
msgid "bad floating literal: %s"
msgstr ""
-#: read.c:3243
+#: read.c:3458
#, c-format
msgid "%s: would close weakref loop: %s"
msgstr ""
-#: read.c:3286
-#, c-format
-msgid "junk at end of line, first unrecognized character is `%c'"
-msgstr ""
-
-#: read.c:3289
+#: read.c:3504
#, c-format
msgid "junk at end of line, first unrecognized character valued 0x%x"
msgstr ""
-#: read.c:3347
+#: read.c:3562
msgid "missing expression"
msgstr ""
-#: read.c:3408
+#: read.c:3624
#, c-format
msgid "`%s' can't be equated to common symbol '%s'"
msgstr ""
-#: read.c:3536
+#: read.c:3752
msgid "rva without symbol"
msgstr ""
-#: read.c:3658
-msgid "attempt to store value in absolute section"
+#: read.c:3809
+msgid "missing or bad offset expression"
msgstr ""
-#: read.c:3696 read.c:4544
-msgid "zero assumed for missing expression"
+#: read.c:3830
+msgid "missing reloc type"
msgstr ""
-#: read.c:3708 read.c:4556 write.c:265
-msgid "register value used as expression"
+#: read.c:3842
+msgid "unrecognized reloc type"
msgstr ""
-#. Leading bits contain both 0s & 1s.
-#: read.c:3786
-#, c-format
-msgid "value 0x%lx truncated to 0x%lx"
+#: read.c:3858
+msgid "bad reloc expression"
msgstr ""
-#: read.c:3802
-#, c-format
-msgid "bignum truncated to %d bytes"
+#: read.c:3981
+msgid "attempt to store value in absolute section"
msgstr ""
-#: read.c:3943
-msgid "using a bit field width of zero"
+#: read.c:4019 read.c:4867
+msgid "zero assumed for missing expression"
msgstr ""
-#: read.c:3951
-#, c-format
-msgid "field width \"%s\" too complex for a bitfield"
+#: read.c:4031 read.c:4879 write.c:260
+msgid "register value used as expression"
msgstr ""
-#: read.c:3959
+#. Leading bits contain both 0s & 1s.
+#: read.c:4109
#, c-format
-msgid "field width %lu too big to fit in %d bytes: truncated to %d bits"
+msgid "value 0x%lx truncated to 0x%lx"
msgstr ""
-#: read.c:3981
+#: read.c:4125
#, c-format
-msgid "field value \"%s\" too complex for a bitfield"
+msgid "bignum truncated to %d bytes"
msgstr ""
-#: read.c:4107 read.c:4298
+#: read.c:4430 read.c:4621
msgid "unresolvable or nonpositive repeat count; using 1"
msgstr ""
-#: read.c:4156
+#: read.c:4479
#, c-format
msgid "unknown floating type type '%c'"
msgstr ""
-#: read.c:4178
+#: read.c:4501
msgid "floating point constant too large"
msgstr ""
-#: read.c:4670
+#: read.c:4993
msgid "strings must be placed into a section"
msgstr ""
-#: read.c:4720
+#: read.c:5043
msgid "expected <nn>"
msgstr ""
#. To be compatible with BSD 4.2 as: give the luser a linefeed!!
-#: read.c:4753 read.c:4839
+#: read.c:5076 read.c:5162
msgid "unterminated string; newline inserted"
msgstr ""
-#: read.c:4847
+#: read.c:5170
msgid "bad escaped character in string"
msgstr ""
-#: read.c:4872
+#: read.c:5195
msgid "expected address expression"
msgstr ""
-#: read.c:4891
+#: read.c:5214
#, c-format
msgid "symbol \"%s\" undefined; zero assumed"
msgstr ""
-#: read.c:4894
+#: read.c:5217
msgid "some symbol undefined; zero assumed"
msgstr ""
-#: read.c:4930
+#: read.c:5253
msgid "this string may not contain '\\0'"
msgstr ""
-#: read.c:4966
+#: read.c:5289
msgid "missing string"
msgstr ""
-#: read.c:5053
+#: read.c:5376
#, c-format
msgid ".incbin count zero, ignoring `%s'"
msgstr ""
-#: read.c:5079
+#: read.c:5402
#, c-format
msgid "file not found: %s"
msgstr ""
-#: read.c:5093
+#: read.c:5416
#, c-format
msgid "seek to end of .incbin file failed `%s'"
msgstr ""
-#: read.c:5104
+#: read.c:5427
#, c-format
msgid "skip (%ld) or count (%ld) invalid for file size (%ld)"
msgstr ""
-#: read.c:5111
+#: read.c:5434
#, c-format
msgid "could not skip to %ld in file `%s'"
msgstr ""
-#: read.c:5120
+#: read.c:5443
#, c-format
msgid "truncated file `%s', %ld of %ld bytes read"
msgstr ""
-#: read.c:5278
+#: read.c:5601
msgid "missing .func"
msgstr ""
-#: read.c:5295
+#: read.c:5618
msgid ".endfunc missing for previous .func"
msgstr ""
-#: read.c:5418
+#: read.c:5741
#, c-format
msgid "missing closing `%c'"
msgstr ""
-#: read.c:5420
+#: read.c:5743
msgid "stray `\\'"
msgstr ""
@@ -12107,187 +13205,203 @@ msgstr ""
msgid "comma missing in .xstabs"
msgstr ""
-#: symbols.c:278
+#: symbols.c:277
#, c-format
msgid "cannot define symbol `%s' in absolute section"
msgstr ""
-#: symbols.c:409
+#: symbols.c:417
#, c-format
msgid "symbol `%s' is already defined as \"%s\"/%s%ld"
msgstr ""
-#: symbols.c:483 symbols.c:490
+#: symbols.c:494 symbols.c:501
#, c-format
msgid "inserting \"%s\" into symbol table failed: %s"
msgstr ""
-#: symbols.c:864 symbols.c:868
+#: symbols.c:957 symbols.c:961
#, c-format
msgid "undefined symbol `%s' in operation"
msgstr ""
-#: symbols.c:875
+#: symbols.c:968
#, c-format
msgid "invalid sections for operation on `%s' and `%s'"
msgstr ""
-#: symbols.c:879
+#: symbols.c:972
#, c-format
msgid "invalid section for operation on `%s'"
msgstr ""
-#: symbols.c:887 symbols.c:890
+#: symbols.c:980 symbols.c:983
#, c-format
msgid "undefined symbol `%s' in operation setting `%s'"
msgstr ""
-#: symbols.c:897
+#: symbols.c:989
#, c-format
msgid "invalid sections for operation on `%s' and `%s' setting `%s'"
msgstr ""
-#: symbols.c:901
+#: symbols.c:992
#, c-format
msgid "invalid section for operation on `%s' setting `%s'"
msgstr ""
-#: symbols.c:951
+#: symbols.c:1042
#, c-format
msgid "symbol definition loop encountered at `%s'"
msgstr ""
-#: symbols.c:1209
+#: symbols.c:1069
+#, c-format
+msgid "cannot convert expression symbol %s to complex relocation"
+msgstr ""
+
+#: symbols.c:1351
#, c-format
msgid "division by zero when setting `%s'"
msgstr ""
-#: symbols.c:1291 write.c:1545
+#: symbols.c:1432 write.c:1805
#, c-format
msgid "can't resolve value for symbol `%s'"
msgstr ""
-#: symbols.c:1738
+#: symbols.c:1882
#, c-format
msgid "\"%d\" (instance number %d of a %s label)"
msgstr ""
-#: symbols.c:1775
+#: symbols.c:1911
#, c-format
msgid "attempt to get value of unresolved symbol `%s'"
msgstr ""
-#: symbols.c:2045
+#: symbols.c:2184
msgid "section symbols are already global"
msgstr ""
-#: symbols.c:2150
+#: symbols.c:2289
#, c-format
msgid "Accessing function `%s' as thread-local object"
msgstr ""
-#: symbols.c:2154
+#: symbols.c:2293
#, c-format
msgid "Accessing `%s' as thread-local object"
msgstr ""
-#: write.c:164
+#: write.c:159
#, c-format
msgid "field fx_size too small to hold %d"
msgstr ""
-#: write.c:440
+#: write.c:436
#, c-format
msgid "attempt to .org/.space backwards? (%ld)"
msgstr ""
-#: write.c:691
+#: write.c:664
+msgid "invalid offset expression"
+msgstr ""
+
+#: write.c:686
+msgid "invalid reloc expression"
+msgstr ""
+
+#: write.c:1039
+#, c-format
+msgid "value of %s too large for field of %d bytes at %s"
+msgstr ""
+
+#: write.c:1051
#, c-format
-msgid "Local symbol `%s' can't be equated to undefined symbol `%s'"
+msgid "signed .word overflow; switch may be too large; %ld at 0x%lx"
msgstr ""
-#: write.c:865 write.c:937
+#: write.c:1099
msgid "relocation out of range"
msgstr ""
-#: write.c:868 write.c:940
+#: write.c:1102
#, c-format
msgid "%s:%u: bad return from bfd_install_relocation: %x"
msgstr ""
-#: write.c:920
+#: write.c:1166
msgid "internal error: fixup not contained within frag"
msgstr ""
-#: write.c:1026 write.c:1050
+#: write.c:1219
+msgid "reloc not within (fixed part of) section"
+msgstr ""
+
+#: write.c:1286 write.c:1307
#, c-format
-msgid "FATAL: Can't write %s"
+msgid "can't write %s: %s"
msgstr ""
-#: write.c:1082
+#: write.c:1337
msgid "cannot write to output file"
msgstr ""
-#: write.c:1223
+#: write.c:1487
#, c-format
msgid "%d error%s, %d warning%s, generating bad object file"
msgstr ""
-#: write.c:1230
+#: write.c:1494
#, c-format
msgid "%d error%s, %d warning%s, no object file generated"
msgstr ""
-#: write.c:1464
+#: write.c:1729
#, c-format
msgid "%s: global symbols not supported in common sections"
msgstr ""
-#: write.c:1478
+#: write.c:1743
#, c-format
msgid "local label `%s' is not defined"
msgstr ""
-#: write.c:1498
+#: write.c:1763
#, c-format
msgid "Local symbol `%s' can't be equated to common symbol `%s'"
msgstr ""
-#: write.c:1768
+#: write.c:2028
#, c-format
msgid "alignment padding (%lu bytes) not a multiple of %ld"
msgstr ""
-#: write.c:1900
+#: write.c:2186
#, c-format
msgid ".word %s-%s+%s didn't fit"
msgstr ""
-#: write.c:1976
+#: write.c:2275
+msgid "padding added"
+msgstr ""
+
+#: write.c:2325
msgid "attempt to move .org backwards"
msgstr ""
-#: write.c:2004
+#: write.c:2353
msgid ".space specifies non-absolute value"
msgstr ""
-#: write.c:2011
+#: write.c:2368
msgid ".space or .fill with negative value, ignored"
msgstr ""
-#: write.c:2067
+#: write.c:2439
#, c-format
msgid ""
"Infinite loop encountered whilst attempting to compute the addresses of "
"symbols in section %s"
msgstr ""
-
-#: write.c:2289
-#, c-format
-msgid "value of %s too large for field of %d bytes at %s"
-msgstr ""
-
-#: write.c:2301
-#, c-format
-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 0485d72..0098d76 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, 2001, 2002, 2003, 2004, 2005
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -38,7 +38,6 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
#include "sb.h"
#include "macro.h"
#include "obstack.h"
-#include "listing.h"
#include "ecoff.h"
#include "dw2gencfi.h"
@@ -214,6 +213,10 @@ static void do_align (int, char *, int, int);
static void s_align (int, int);
static void s_altmacro (int);
static void s_bad_end (int);
+#ifdef OBJ_ELF
+static void s_gnu_attribute (int);
+#endif
+static void s_reloc (int);
static int hex_float (int, char *);
static segT get_known_segmented_expression (expressionS * expP);
static void pobegin (void);
@@ -330,7 +333,7 @@ static const pseudo_typeS potable[] = {
/* extend */
{"extern", s_ignore, 0}, /* We treat all undef as ext. */
{"appfile", s_app_file, 1},
- {"appline", s_app_line, 0},
+ {"appline", s_app_line, 1},
{"fail", s_fail, 0},
{"file", s_app_file, 0},
{"fill", s_fill, 0},
@@ -339,6 +342,9 @@ static const pseudo_typeS potable[] = {
{"func", s_func, 0},
{"global", s_globl, 0},
{"globl", s_globl, 0},
+#ifdef OBJ_ELF
+ {"gnu_attribute", s_gnu_attribute, 0},
+#endif
{"hword", cons, 2},
{"if", s_if, (int) O_ne},
{"ifb", s_ifb, 1},
@@ -365,6 +371,7 @@ static const pseudo_typeS potable[] = {
{"irepc", s_irp, 1},
{"lcomm", s_lcomm, 0},
{"lflags", listing_flags, 0}, /* Listing flags. */
+ {"linefile", s_app_line, 0},
{"linkonce", s_linkonce, 0},
{"list", listing_list, 1}, /* Turn listing on. */
{"llen", listing_psize, 1},
@@ -391,6 +398,7 @@ static const pseudo_typeS potable[] = {
{"psize", listing_psize, 0}, /* Set paper size. */
{"purgem", s_purgem, 0},
{"quad", cons, 8},
+ {"reloc", s_reloc, 0},
{"rep", s_rept, 0},
{"rept", s_rept, 0},
{"rva", s_rva, 4},
@@ -605,8 +613,6 @@ read_a_source_file (char *name)
last_eol = NULL;
#endif
- know (buffer_limit[-1] == '\n'); /* Must have a sentinel. */
-
while (input_line_pointer < buffer_limit)
{
/* We have more of this buffer to parse. */
@@ -695,19 +701,11 @@ read_a_source_file (char *name)
Depending on what compiler is used, the order of these tests
may vary to catch most common case 1st.
- Each test is independent of all other tests at the (top) level.
- PLEASE make a compiler that doesn't use this assembler.
- It is crufty to waste a compiler's time encoding things for this
- assembler, which then wastes more time decoding it.
- (And communicating via (linear) files is silly!
- If you must pass stuff, please pass a tree!) */
- if ((c = *input_line_pointer++) == '\t'
- || c == ' '
- || c == '\f'
- || c == 0)
+ Each test is independent of all other tests at the (top)
+ level. */
+ do
c = *input_line_pointer++;
-
- know (c != ' '); /* No further leading whitespace. */
+ while (c == '\t' || c == ' ' || c == '\f');
#ifndef NO_LISTING
/* If listing is on, and we are expanding a macro, then give
@@ -1008,10 +1006,14 @@ read_a_source_file (char *name)
unsigned int new_length;
char *tmp_buf = 0;
- bump_line_counters ();
s = input_line_pointer;
if (strncmp (s, "APP\n", 4))
- continue; /* We ignore it */
+ {
+ /* We ignore it. */
+ ignore_rest_of_line ();
+ continue;
+ }
+ bump_line_counters ();
s += 4;
sb_new (&sbuf);
@@ -1110,7 +1112,7 @@ read_a_source_file (char *name)
continue;
#endif
input_line_pointer--;
- /* Report unknown char as ignored. */
+ /* Report unknown char as error. */
demand_empty_rest_of_line ();
}
@@ -1279,7 +1281,7 @@ s_align (int arg, int bytes_p)
unsigned int align_limit = ALIGN_LIMIT;
unsigned int align;
char *stop = NULL;
- char stopc;
+ char stopc = 0;
offsetT fill = 0;
int max;
int fill_p;
@@ -1423,7 +1425,7 @@ s_comm_internal (int param,
offsetT temp, size;
symbolS *symbolP = NULL;
char *stop = NULL;
- char stopc;
+ char stopc = 0;
expressionS exp;
if (flag_mri)
@@ -1478,10 +1480,7 @@ s_comm_internal (int param,
ignore_rest_of_line ();
goto out;
}
- /* This could be avoided when the symbol wasn't used so far, but
- the comment in struc-symbol.h says this flag isn't reliable. */
- if (1 || !symbol_used_p (symbolP))
- symbolP = symbol_clone (symbolP, 1);
+ symbolP = symbol_clone (symbolP, 1);
S_SET_SEGMENT (symbolP, undefined_section);
S_SET_VALUE (symbolP, 0);
symbol_set_frag (symbolP, &zero_address_frag);
@@ -1538,7 +1537,7 @@ s_mri_common (int small ATTRIBUTE_UNUSED)
symbolS *sym;
offsetT align;
char *stop = NULL;
- char stopc;
+ char stopc = 0;
if (!flag_mri)
{
@@ -1681,11 +1680,8 @@ s_app_file (int appfile)
/* Some assemblers tolerate immediately following '"'. */
if ((s = demand_copy_string (&length)) != 0)
{
- /* If this is a fake .appfile, a fake newline was inserted into
- the buffer. Passing -2 to new_logical_line tells it to
- account for it. */
int may_omit
- = (!new_logical_line (s, appfile ? -2 : -1) && appfile);
+ = (!new_logical_line_flags (s, -1, 1) && appfile);
/* In MRI mode, the preprocessor may have inserted an extraneous
backquote. */
@@ -1700,18 +1696,40 @@ s_app_file (int appfile)
}
}
+static int
+get_linefile_number (int *flag)
+{
+ SKIP_WHITESPACE ();
+
+ if (*input_line_pointer < '0' || *input_line_pointer > '9')
+ return 0;
+
+ *flag = get_absolute_expression ();
+
+ return 1;
+}
+
/* Handle the .appline pseudo-op. This is automatically generated by
do_scrub_chars when a preprocessor # line comment is seen. This
default definition may be overridden by the object or CPU specific
pseudo-ops. */
void
-s_app_line (int ignore ATTRIBUTE_UNUSED)
+s_app_line (int appline)
{
+ char *file = NULL;
int l;
/* The given number is that of the next line. */
- l = get_absolute_expression () - 1;
+ if (appline)
+ l = get_absolute_expression ();
+ else if (!get_linefile_number (&l))
+ {
+ ignore_rest_of_line ();
+ return;
+ }
+
+ l--;
if (l < -1)
/* Some of the back ends can't deal with non-positive line numbers.
@@ -1727,13 +1745,74 @@ s_app_line (int ignore ATTRIBUTE_UNUSED)
l + 1);
else
{
- new_logical_line ((char *) NULL, l);
+ int flags = 0;
+ int length = 0;
+
+ if (!appline)
+ {
+ SKIP_WHITESPACE ();
+
+ if (*input_line_pointer == '"')
+ file = demand_copy_string (&length);
+
+ if (file)
+ {
+ int this_flag;
+
+ while (get_linefile_number (&this_flag))
+ switch (this_flag)
+ {
+ /* From GCC's cpp documentation:
+ 1: start of a new file.
+ 2: returning to a file after having included
+ another file.
+ 3: following text comes from a system header file.
+ 4: following text should be treated as extern "C".
+
+ 4 is nonsensical for the assembler; 3, we don't
+ care about, so we ignore it just in case a
+ system header file is included while
+ preprocessing assembly. So 1 and 2 are all we
+ care about, and they are mutually incompatible.
+ new_logical_line_flags() demands this. */
+ case 1:
+ case 2:
+ if (flags && flags != (1 << this_flag))
+ as_warn (_("incompatible flag %i in line directive"),
+ this_flag);
+ else
+ flags |= 1 << this_flag;
+ break;
+
+ case 3:
+ case 4:
+ /* We ignore these. */
+ break;
+
+ default:
+ as_warn (_("unsupported flag %i in line directive"),
+ this_flag);
+ break;
+ }
+
+ if (!is_end_of_line[(unsigned char)*input_line_pointer])
+ file = 0;
+ }
+ }
+
+ if (appline || file)
+ {
+ new_logical_line_flags (file, l, flags);
#ifdef LISTING
- if (listing)
- listing_source_line (l);
+ if (listing)
+ listing_source_line (l);
#endif
+ }
}
- demand_empty_rest_of_line ();
+ if (appline || file)
+ demand_empty_rest_of_line ();
+ else
+ ignore_rest_of_line ();
}
/* Handle the .end pseudo-op. Actually, the real work is done in
@@ -1807,7 +1886,7 @@ s_fail (int ignore ATTRIBUTE_UNUSED)
{
offsetT temp;
char *stop = NULL;
- char stopc;
+ char stopc = 0;
if (flag_mri)
stop = mri_comment_field (&stopc);
@@ -1929,7 +2008,7 @@ s_globl (int ignore ATTRIBUTE_UNUSED)
int c;
symbolS *symbolP;
char *stop = NULL;
- char stopc;
+ char stopc = 0;
if (flag_mri)
stop = mri_comment_field (&stopc);
@@ -1960,6 +2039,120 @@ s_globl (int ignore ATTRIBUTE_UNUSED)
mri_comment_end (stop, stopc);
}
+#ifdef OBJ_ELF
+#define skip_whitespace(str) do { if (*(str) == ' ') ++(str); } while (0)
+
+static inline int
+skip_past_char (char ** str, char c)
+{
+ if (**str == c)
+ {
+ (*str)++;
+ return 0;
+ }
+ else
+ return -1;
+}
+#define skip_past_comma(str) skip_past_char (str, ',')
+
+/* Parse an attribute directive for VENDOR. */
+void
+s_vendor_attribute (int vendor)
+{
+ expressionS exp;
+ int type;
+ int tag;
+ unsigned int i = 0;
+ char *s = NULL;
+ char saved_char;
+
+ expression (& exp);
+ if (exp.X_op != O_constant)
+ goto bad;
+
+ tag = exp.X_add_number;
+ type = _bfd_elf_obj_attrs_arg_type (stdoutput, vendor, tag);
+
+ if (skip_past_comma (&input_line_pointer) == -1)
+ goto bad;
+ if (type & 1)
+ {
+ expression (& exp);
+ if (exp.X_op != O_constant)
+ {
+ as_bad (_("expected numeric constant"));
+ ignore_rest_of_line ();
+ return;
+ }
+ i = exp.X_add_number;
+ }
+ if (type == 3
+ && skip_past_comma (&input_line_pointer) == -1)
+ {
+ as_bad (_("expected comma"));
+ ignore_rest_of_line ();
+ return;
+ }
+ if (type & 2)
+ {
+ skip_whitespace(input_line_pointer);
+ if (*input_line_pointer != '"')
+ goto bad_string;
+ input_line_pointer++;
+ s = input_line_pointer;
+ while (*input_line_pointer && *input_line_pointer != '"')
+ input_line_pointer++;
+ if (*input_line_pointer != '"')
+ goto bad_string;
+ saved_char = *input_line_pointer;
+ *input_line_pointer = 0;
+ }
+ else
+ {
+ s = NULL;
+ saved_char = 0;
+ }
+
+ switch (type)
+ {
+ case 3:
+ bfd_elf_add_obj_attr_compat (stdoutput, vendor, i, s);
+ break;
+ case 2:
+ bfd_elf_add_obj_attr_string (stdoutput, vendor, tag, s);
+ break;
+ case 1:
+ bfd_elf_add_obj_attr_int (stdoutput, vendor, tag, i);
+ break;
+ default:
+ abort ();
+ }
+
+ if (s)
+ {
+ *input_line_pointer = saved_char;
+ input_line_pointer++;
+ }
+ demand_empty_rest_of_line ();
+ return;
+bad_string:
+ as_bad (_("bad string constant"));
+ ignore_rest_of_line ();
+ return;
+bad:
+ as_bad (_("expected <tag> , <value>"));
+ ignore_rest_of_line ();
+}
+
+/* Parse a .gnu_attribute directive. */
+
+static void
+s_gnu_attribute (int ignored ATTRIBUTE_UNUSED)
+{
+ s_vendor_attribute (OBJ_ATTR_GNU);
+}
+#endif /* OBJ_ELF */
+
/* Handle the MRI IRP and IRPC pseudo-ops. */
void
@@ -2812,10 +3005,7 @@ assign_symbol (char *name, int mode)
/* If the symbol is volatile, copy the symbol and replace the
original with the copy, so that previous uses of the symbol will
retain the value of the symbol at the point of use. */
- else if (S_IS_VOLATILE (symbolP)
- /* This could be avoided when the symbol wasn't used so far, but
- the comment in struc-symbol.h says this flag isn't reliable. */
- && (1 || symbol_used_p (symbolP)))
+ else if (S_IS_VOLATILE (symbolP))
symbolP = symbol_clone (symbolP, 1);
}
@@ -2881,7 +3071,7 @@ s_space (int mult)
expressionS val;
char *p = 0;
char *stop = NULL;
- char stopc;
+ char stopc = 0;
int bytes;
#ifdef md_flush_pending_output
@@ -3057,7 +3247,7 @@ s_float_space (int float_type)
int flen;
char temp[MAXIMUM_NUMBER_OF_CHARS_FOR_FLOAT];
char *stop = NULL;
- char stopc;
+ char stopc = 0;
if (flag_mri)
stop = mri_comment_field (&stopc);
@@ -3134,11 +3324,17 @@ void
s_struct (int ignore ATTRIBUTE_UNUSED)
{
char *stop = NULL;
- char stopc;
+ char stopc = 0;
if (flag_mri)
stop = mri_comment_field (&stopc);
abs_section_offset = get_absolute_expression ();
+#if defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF)
+ /* The ELF backend needs to know that we are changing sections, so
+ that .previous works correctly. */
+ if (IS_ELF)
+ obj_elf_section_change_hook ();
+#endif
subseg_set (absolute_section, 0);
demand_empty_rest_of_line ();
if (flag_mri)
@@ -3186,17 +3382,14 @@ s_weakref (int ignore ATTRIBUTE_UNUSED)
if (S_IS_DEFINED (symbolP) || symbol_equated_p (symbolP))
{
- if(!S_IS_VOLATILE (symbolP))
+ if (!S_IS_VOLATILE (symbolP))
{
as_bad (_("symbol `%s' is already defined"), name);
*end_name = delim;
ignore_rest_of_line ();
return;
}
- /* This could be avoided when the symbol wasn't used so far, but
- the comment in struc-symbol.h says this flag isn't reliable. */
- if (1 || !symbol_used_p (symbolP))
- symbolP = symbol_clone (symbolP, 1);
+ symbolP = symbol_clone (symbolP, 1);
S_CLEAR_VOLATILE (symbolP);
}
@@ -3408,6 +3601,7 @@ pseudo_set (symbolS *symbolP)
S_SET_SEGMENT (symbolP, reg_section);
S_SET_VALUE (symbolP, (valueT) exp.X_add_number);
set_zero_frag (symbolP);
+ symbol_get_value_expression (symbolP)->X_op = O_register;
break;
case O_symbol:
@@ -3514,7 +3708,7 @@ cons_worker (register int nbytes, /* 1=.byte, 2=.word, 4=.long. */
int c;
expressionS exp;
char *stop = NULL;
- char stopc;
+ char stopc = 0;
#ifdef md_flush_pending_output
md_flush_pending_output ();
@@ -3588,6 +3782,113 @@ s_rva (int size)
cons_worker (size, 1);
}
+/* .reloc offset, reloc_name, symbol+addend. */
+
+void
+s_reloc (int ignore ATTRIBUTE_UNUSED)
+{
+ char *stop = NULL;
+ char stopc = 0;
+ expressionS exp;
+ char *r_name;
+ int c;
+ struct reloc_list *reloc;
+
+ reloc = xmalloc (sizeof (*reloc));
+
+ if (flag_mri)
+ stop = mri_comment_field (&stopc);
+
+ expression (&exp);
+ switch (exp.X_op)
+ {
+ case O_illegal:
+ case O_absent:
+ case O_big:
+ case O_register:
+ as_bad (_("missing or bad offset expression"));
+ goto err_out;
+ case O_constant:
+ exp.X_add_symbol = section_symbol (now_seg);
+ exp.X_op = O_symbol;
+ /* Fall thru */
+ case O_symbol:
+ if (exp.X_add_number == 0)
+ {
+ reloc->u.a.offset_sym = exp.X_add_symbol;
+ break;
+ }
+ /* Fall thru */
+ default:
+ reloc->u.a.offset_sym = make_expr_symbol (&exp);
+ break;
+ }
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != ',')
+ {
+ as_bad (_("missing reloc type"));
+ goto err_out;
+ }
+
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ r_name = input_line_pointer;
+ c = get_symbol_end ();
+ reloc->u.a.howto = bfd_reloc_name_lookup (stdoutput, r_name);
+ *input_line_pointer = c;
+ if (reloc->u.a.howto == NULL)
+ {
+ as_bad (_("unrecognized reloc type"));
+ goto err_out;
+ }
+
+ exp.X_op = O_absent;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == ',')
+ {
+ ++input_line_pointer;
+ expression_and_evaluate (&exp);
+ }
+ switch (exp.X_op)
+ {
+ case O_illegal:
+ case O_big:
+ case O_register:
+ as_bad (_("bad reloc expression"));
+ err_out:
+ ignore_rest_of_line ();
+ free (reloc);
+ if (flag_mri)
+ mri_comment_end (stop, stopc);
+ return;
+ case O_absent:
+ reloc->u.a.sym = NULL;
+ reloc->u.a.addend = 0;
+ break;
+ case O_constant:
+ reloc->u.a.sym = NULL;
+ reloc->u.a.addend = exp.X_add_number;
+ break;
+ case O_symbol:
+ reloc->u.a.sym = exp.X_add_symbol;
+ reloc->u.a.addend = exp.X_add_number;
+ break;
+ default:
+ reloc->u.a.sym = make_expr_symbol (&exp);
+ reloc->u.a.addend = 0;
+ break;
+ }
+
+ as_where (&reloc->file, &reloc->line);
+ reloc->next = reloc_list;
+ reloc_list = reloc;
+
+ demand_empty_rest_of_line ();
+ if (flag_mri)
+ mri_comment_end (stop, stopc);
+}
+
/* Put the contents of expression EXP into the object file using
NBYTES bytes. If need_pass_2 is 1, this does nothing. */
@@ -5010,7 +5311,7 @@ void
equals (char *sym_name, int reassign)
{
char *stop = NULL;
- char stopc;
+ char stopc = 0;
input_line_pointer++;
if (*input_line_pointer == '=')
diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h
index a18272d..6ac153b 100644
--- a/contrib/binutils/gas/read.h
+++ b/contrib/binutils/gas/read.h
@@ -185,4 +185,5 @@ extern void stringer (int append_zero);
extern void s_xstab (int what);
extern void s_rva (int);
extern void s_incbin (int);
+extern void s_vendor_attribute (int);
extern void s_weakref (int);
diff --git a/contrib/binutils/gas/sb.c b/contrib/binutils/gas/sb.c
index ecd772c..5fa0bc6 100644
--- a/contrib/binutils/gas/sb.c
+++ b/contrib/binutils/gas/sb.c
@@ -1,5 +1,5 @@
/* sb.c - string buffer manipulation routines
- Copyright 1994, 1995, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000, 2003, 2006 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -21,19 +21,8 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "config.h"
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-#include "libiberty.h"
-#include "sb.h"
#include "as.h"
+#include "sb.h"
/* These routines are about manipulating strings.
@@ -56,7 +45,10 @@ static void sb_check (sb *, int);
static int string_count[sb_max_power_two];
/* Free list of sb structures. */
-static sb_list_vector free_list;
+static struct
+{
+ sb_element *size[sb_max_power_two];
+} free_list;
/* Initializes an sb. */
@@ -66,8 +58,7 @@ sb_build (sb *ptr, int size)
/* See if we can find one to allocate. */
sb_element *e;
- if (size > sb_max_power_two)
- abort ();
+ assert (size < sb_max_power_two);
e = free_list.size[size];
if (!e)
diff --git a/contrib/binutils/gas/sb.h b/contrib/binutils/gas/sb.h
index 5732688..5a886f9 100644
--- a/contrib/binutils/gas/sb.h
+++ b/contrib/binutils/gas/sb.h
@@ -1,5 +1,5 @@
/* sb.h - header file for string buffer manipulation routines
- Copyright 1994, 1995, 2000, 2003 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 2000, 2003, 2006 Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
sac@cygnus.com
@@ -25,9 +25,6 @@
#define SB_H
-#include <stdio.h>
-#include "ansidecl.h"
-
/* String blocks
I had a couple of choices when deciding upon this data structure.
@@ -70,14 +67,6 @@ typedef struct le
}
sb_element;
-/* The free list. */
-
-typedef struct
-{
- sb_element *size[sb_max_power_two];
-}
-sb_list_vector;
-
extern void sb_new (sb *);
extern void sb_kill (sb *);
extern void sb_add_sb (sb *, sb *);
diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c
index 9401d61..0094764 100644
--- a/contrib/binutils/gas/subsegs.c
+++ b/contrib/binutils/gas/subsegs.c
@@ -1,6 +1,6 @@
/* subsegs.c - subsegments -
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -27,20 +27,12 @@
#include "subsegs.h"
#include "obstack.h"
-frchainS *frchain_root, *frchain_now;
+frchainS *frchain_now;
static struct obstack frchains;
-/* Gas segment information for bfd_abs_section_ptr and
- bfd_und_section_ptr. */
-static segment_info_type *abs_seg_info;
-static segment_info_type *und_seg_info;
-
-static void subseg_set_rest (segT, subsegT);
-
static fragS dummy_frag;
-static frchainS absolute_frchain;
void
subsegs_begin (void)
@@ -50,16 +42,8 @@ subsegs_begin (void)
obstack_alignment_mask (&frchains) = __alignof__ (frchainS) - 1;
#endif
- frchain_root = NULL;
frchain_now = NULL; /* Warn new_subseg() that we are booting. */
-
frag_now = &dummy_frag;
-
- absolute_frchain.frch_seg = absolute_section;
- absolute_frchain.frch_subseg = 0;
- absolute_frchain.fix_root = absolute_frchain.fix_tail = 0;
- absolute_frchain.frch_frag_now = &zero_address_frag;
- absolute_frchain.frch_root = absolute_frchain.frch_last = &zero_address_frag;
}
/*
@@ -75,37 +59,25 @@ subsegs_begin (void)
void
subseg_change (register segT seg, register int subseg)
{
- segment_info_type *seginfo;
+ segment_info_type *seginfo = seg_info (seg);
now_seg = seg;
now_subseg = subseg;
- if (now_seg == absolute_section)
- return;
-
- seginfo = (segment_info_type *) bfd_get_section_userdata (stdoutput, seg);
if (! seginfo)
{
- seginfo = (segment_info_type *) xmalloc (sizeof (*seginfo));
- memset ((PTR) seginfo, 0, sizeof (*seginfo));
- seginfo->fix_root = NULL;
- seginfo->fix_tail = NULL;
+ seginfo = xcalloc (1, sizeof (*seginfo));
seginfo->bfd_section = seg;
- seginfo->sym = 0;
- if (seg == bfd_abs_section_ptr)
- abs_seg_info = seginfo;
- else if (seg == bfd_und_section_ptr)
- und_seg_info = seginfo;
- else
- bfd_set_section_userdata (stdoutput, seg, (PTR) seginfo);
+ bfd_set_section_userdata (stdoutput, seg, seginfo);
}
}
static void
subseg_set_rest (segT seg, subsegT subseg)
{
- register frchainS *frcP; /* crawl frchain chain */
- register frchainS **lastPP; /* address of last pointer */
+ frchainS *frcP; /* crawl frchain chain */
+ frchainS **lastPP; /* address of last pointer */
frchainS *newP; /* address of new frchain */
+ segment_info_type *seginfo;
mri_common_symbol = NULL;
@@ -113,72 +85,26 @@ subseg_set_rest (segT seg, subsegT subseg)
frchain_now->frch_frag_now = frag_now;
assert (frchain_now == 0
- || now_seg == undefined_section
- || now_seg == absolute_section
|| frchain_now->frch_last == frag_now);
subseg_change (seg, (int) subseg);
- if (seg == absolute_section)
- {
- frchain_now = &absolute_frchain;
- frag_now = &zero_address_frag;
- return;
- }
+ seginfo = seg_info (seg);
- assert (frchain_now == 0
- || now_seg == undefined_section
- || frchain_now->frch_last == frag_now);
-
- /*
- * Attempt to find or make a frchain for that sub seg.
- * Crawl along chain of frchainSs, begins @ frchain_root.
- * If we need to make a frchainS, link it into correct
- * position of chain rooted in frchain_root.
- */
- for (frcP = *(lastPP = &frchain_root);
- frcP && frcP->frch_seg <= seg;
+ /* Attempt to find or make a frchain for that subsection.
+ We keep the list sorted by subsection number. */
+ for (frcP = *(lastPP = &seginfo->frchainP);
+ frcP != NULL;
frcP = *(lastPP = &frcP->frch_next))
+ if (frcP->frch_subseg >= subseg)
+ break;
+
+ if (frcP == NULL || frcP->frch_subseg != subseg)
{
- if (frcP->frch_seg == seg
- && frcP->frch_subseg >= subseg)
- {
- break;
- }
- }
- /*
- * frcP: Address of the 1st frchainS in correct segment with
- * frch_subseg >= subseg.
- * We want to either use this frchainS, or we want
- * to insert a new frchainS just before it.
- *
- * If frcP==NULL, then we are at the end of the chain
- * of frchainS-s. A NULL frcP means we fell off the end
- * of the chain looking for a
- * frch_subseg >= subseg, so we
- * must make a new frchainS.
- *
- * If we ever maintain a pointer to
- * the last frchainS in the chain, we change that pointer
- * ONLY when frcP==NULL.
- *
- * lastPP: Address of the pointer with value frcP;
- * Never NULL.
- * May point to frchain_root.
- *
- */
- if (!frcP
- || (frcP->frch_seg > seg
- || frcP->frch_subseg > subseg)) /* Kinky logic only works with 2 segments. */
- {
- /*
- * This should be the only code that creates a frchainS.
- */
- segment_info_type *seginfo;
+ /* This should be the only code that creates a frchainS. */
- newP = (frchainS *) obstack_alloc (&frchains, sizeof (frchainS));
+ newP = obstack_alloc (&frchains, sizeof (frchainS));
newP->frch_subseg = subseg;
- newP->frch_seg = seg;
newP->fix_root = NULL;
newP->fix_tail = NULL;
obstack_begin (&newP->frch_obstack, chunksize);
@@ -187,21 +113,15 @@ subseg_set_rest (segT seg, subsegT subseg)
#endif
newP->frch_frag_now = frag_alloc (&newP->frch_obstack);
newP->frch_frag_now->fr_type = rs_fill;
+ newP->frch_cfi_data = NULL;
newP->frch_root = newP->frch_last = newP->frch_frag_now;
*lastPP = newP;
- newP->frch_next = frcP; /* perhaps NULL */
-
- seginfo = seg_info (seg);
- if (seginfo && (!seginfo->frchainP || seginfo->frchainP == frcP))
- seginfo->frchainP = newP;
-
+ newP->frch_next = frcP;
frcP = newP;
}
- /*
- * Here with frcP pointing to the frchainS for subseg.
- */
+
frchain_now = frcP;
frag_now = frcP->frch_frag_now;
@@ -221,7 +141,6 @@ subseg_set_rest (segT seg, subsegT subseg)
* Out: now_subseg, now_seg updated.
* Frchain_now points to the (possibly new) struct frchain for this
* sub-segment.
- * Frchain_root updated if needed.
*/
segT
@@ -244,32 +163,13 @@ subseg_get (const char *segname, int force_new)
else
secptr = bfd_make_section_anyway (stdoutput, segname);
-#ifdef obj_sec_set_private_data
- obj_sec_set_private_data (stdoutput, secptr);
-#endif
-
seginfo = seg_info (secptr);
if (! seginfo)
{
- /* Check whether output_section is set first because secptr may
- be bfd_abs_section_ptr. */
- if (secptr->output_section != secptr)
- secptr->output_section = secptr;
- seginfo = (segment_info_type *) xmalloc (sizeof (*seginfo));
- memset ((PTR) seginfo, 0, sizeof (*seginfo));
- seginfo->fix_root = NULL;
- seginfo->fix_tail = NULL;
+ secptr->output_section = secptr;
+ seginfo = xcalloc (1, sizeof (*seginfo));
seginfo->bfd_section = secptr;
- if (secptr == bfd_abs_section_ptr)
- abs_seg_info = seginfo;
- else if (secptr == bfd_und_section_ptr)
- und_seg_info = seginfo;
- else
- bfd_set_section_userdata (stdoutput, secptr, (PTR) seginfo);
- seginfo->frchainP = NULL;
- seginfo->lineno_list_head = seginfo->lineno_list_tail = NULL;
- seginfo->sym = NULL;
- seginfo->dot = NULL;
+ bfd_set_section_userdata (stdoutput, secptr, seginfo);
}
return secptr;
}
@@ -278,13 +178,9 @@ segT
subseg_new (const char *segname, subsegT subseg)
{
segT secptr;
- segment_info_type *seginfo;
secptr = subseg_get (segname, 0);
subseg_set_rest (secptr, subseg);
- seginfo = seg_info (secptr);
- if (! seginfo->frchainP)
- seginfo->frchainP = frchain_now;
return secptr;
}
@@ -294,13 +190,9 @@ segT
subseg_force_new (const char *segname, subsegT subseg)
{
segT secptr;
- segment_info_type *seginfo;
secptr = subseg_get (segname, 1);
subseg_set_rest (secptr, subseg);
- seginfo = seg_info (secptr);
- if (! seginfo->frchainP)
- seginfo->frchainP = frchain_now;
return secptr;
}
@@ -316,19 +208,6 @@ subseg_set (segT secptr, subsegT subseg)
#define obj_sec_sym_ok_for_reloc(SEC) 0
#endif
-/* Get the gas information we are storing for a section. */
-
-segment_info_type *
-seg_info (segT sec)
-{
- if (sec == bfd_abs_section_ptr)
- return abs_seg_info;
- else if (sec == bfd_und_section_ptr)
- return und_seg_info;
- else
- return (segment_info_type *) bfd_get_section_userdata (stdoutput, sec);
-}
-
symbolS *
section_symbol (segT sec)
{
@@ -418,28 +297,33 @@ void
subsegs_print_statistics (FILE *file)
{
frchainS *frchp;
+ asection *s;
+
fprintf (file, "frag chains:\n");
- for (frchp = frchain_root; frchp; frchp = frchp->frch_next)
+ for (s = stdoutput->sections; s; s = s->next)
{
- int count = 0;
- fragS *fragp;
+ segment_info_type *seginfo;
- /* If frch_subseg is non-zero, it's probably been chained onto
- the end of a previous subsection. Don't count it again. */
- if (frchp->frch_subseg != 0)
+ /* Skip gas-internal sections. */
+ if (segment_name (s)[0] == '*')
continue;
- /* Skip gas-internal sections. */
- if (segment_name (frchp->frch_seg)[0] == '*')
+ seginfo = seg_info (s);
+ if (!seginfo)
continue;
- for (fragp = frchp->frch_root; fragp; fragp = fragp->fr_next)
+ for (frchp = seginfo->frchainP; frchp; frchp = frchp->frch_next)
{
- count++;
+ int count = 0;
+ fragS *fragp;
+
+ for (fragp = frchp->frch_root; fragp; fragp = fragp->fr_next)
+ count++;
+
+ fprintf (file, "\n");
+ fprintf (file, "\t%p %-10s\t%10d frags\n", (void *) frchp,
+ segment_name (s), count);
}
- fprintf (file, "\n");
- fprintf (file, "\t%p %-10s\t%10d frags\n", (void *) frchp,
- segment_name (frchp->frch_seg), count);
}
}
diff --git a/contrib/binutils/gas/subsegs.h b/contrib/binutils/gas/subsegs.h
index 23ab4f9..54a5a6a 100644
--- a/contrib/binutils/gas/subsegs.h
+++ b/contrib/binutils/gas/subsegs.h
@@ -1,6 +1,6 @@
/* subsegs.h -> subsegs.c
- Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2003, 2005
- Free Software Foundation, Inc.
+ Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2003, 2005,
+ 2006 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -40,24 +40,23 @@
#include "obstack.h"
+struct frch_cfi_data;
+
struct frchain /* control building of a frag chain */
{ /* FRCH = FRagment CHain control */
struct frag *frch_root; /* 1st struct frag in chain, or NULL */
struct frag *frch_last; /* last struct frag in chain, or NULL */
struct frchain *frch_next; /* next in chain of struct frchain-s */
- segT frch_seg; /* SEG_TEXT or SEG_DATA. */
subsegT frch_subseg; /* subsegment number of this chain */
fixS *fix_root; /* Root of fixups for this subsegment. */
fixS *fix_tail; /* Last fixup for this subsegment. */
struct obstack frch_obstack; /* for objects in this frag chain */
fragS *frch_frag_now; /* frag_now for this subsegment */
+ struct frch_cfi_data *frch_cfi_data;
};
typedef struct frchain frchainS;
-/* All subsegments' chains hang off here. NULL means no frchains yet. */
-extern frchainS *frchain_root;
-
/* Frchain we are assembling into now. That is, the current segment's
frag chain, even if it contains no (complete) frags. */
extern frchainS *frchain_now;
@@ -109,7 +108,10 @@ typedef struct segment_info_struct {
#endif
} segment_info_type;
-extern segment_info_type *seg_info (segT);
+
+#define seg_info(sec) \
+ ((segment_info_type *) bfd_get_section_userdata (stdoutput, sec))
+
extern symbolS *section_symbol (segT);
extern void subsegs_print_statistics (FILE *);
diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c
index 5935a74..816395f 100644
--- a/contrib/binutils/gas/symbols.c
+++ b/contrib/binutils/gas/symbols.c
@@ -1,6 +1,6 @@
/* symbols.c -symbol table-
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -144,8 +144,7 @@ symbol_create (const char *name, /* It is copied, the caller can destroy/modify.
symbolP->bsym = bfd_make_empty_symbol (stdoutput);
if (symbolP->bsym == NULL)
- as_perror ("%s", "bfd_make_empty_symbol");
- symbolP->bsym->udata.p = (PTR) symbolP;
+ as_fatal ("bfd_make_empty_symbol: %s", bfd_errmsg (bfd_get_error ()));
S_SET_NAME (symbolP, preserved_copy_of_name);
S_SET_SEGMENT (symbolP, segment);
@@ -336,10 +335,7 @@ colon (/* Just seen "x:" - rattle symbols & frags. */
|| S_IS_COMMON (symbolP)
|| S_IS_VOLATILE (symbolP))
{
- if (S_IS_VOLATILE (symbolP)
- /* This could be avoided when the symbol wasn't used so far, but
- the comment in struc-symbol.h says this flag isn't reliable. */
- && (1 || !symbol_used_p (symbolP)))
+ if (S_IS_VOLATILE (symbolP))
{
symbolP = symbol_clone (symbolP, 1);
S_SET_VALUE (symbolP, 0);
@@ -567,18 +563,15 @@ symbol_clone (symbolS *orgsymP, int replace)
orgsymP = local_symbol_convert ((struct local_symbol *) orgsymP);
bsymorg = orgsymP->bsym;
- know (S_IS_DEFINED (orgsymP));
-
newsymP = obstack_alloc (&notes, sizeof (*newsymP));
*newsymP = *orgsymP;
bsymnew = bfd_make_empty_symbol (bfd_asymbol_bfd (bsymorg));
if (bsymnew == NULL)
- as_perror ("%s", "bfd_make_empty_symbol");
+ as_fatal ("bfd_make_empty_symbol: %s", bfd_errmsg (bfd_get_error ()));
newsymP->bsym = bsymnew;
bsymnew->name = bsymorg->name;
bsymnew->flags = bsymorg->flags;
bsymnew->section = bsymorg->section;
- bsymnew->udata.p = (PTR) newsymP;
bfd_copy_private_symbol_data (bfd_asymbol_bfd (bsymorg), bsymorg,
bfd_asymbol_bfd (bsymnew), bsymnew);
@@ -603,11 +596,13 @@ symbol_clone (symbolS *orgsymP, int replace)
symbol_lastP = newsymP;
else if (orgsymP->sy_next)
orgsymP->sy_next->sy_previous = newsymP;
- orgsymP->sy_next = NULL;
+ orgsymP->sy_previous = orgsymP->sy_next = orgsymP;
debug_verify_symchain (symbol_rootP, symbol_lastP);
symbol_table_insert (newsymP);
}
+ else
+ newsymP->sy_previous = newsymP->sy_next = newsymP;
return newsymP;
}
@@ -884,6 +879,69 @@ verify_symbol_chain (symbolS *rootP, symbolS *lastP)
assert (lastP == symbolP);
}
+#ifdef OBJ_COMPLEX_RELC
+
+static int
+use_complex_relocs_for (symbolS * symp)
+{
+ switch (symp->sy_value.X_op)
+ {
+ case O_constant:
+ return 0;
+
+ case O_symbol:
+ case O_symbol_rva:
+ case O_uminus:
+ case O_bit_not:
+ case O_logical_not:
+ if ( (S_IS_COMMON (symp->sy_value.X_add_symbol)
+ || S_IS_LOCAL (symp->sy_value.X_add_symbol))
+ &&
+ (S_IS_DEFINED (symp->sy_value.X_add_symbol)
+ && S_GET_SEGMENT (symp->sy_value.X_add_symbol) != expr_section))
+ return 0;
+ break;
+
+ case O_multiply:
+ case O_divide:
+ case O_modulus:
+ case O_left_shift:
+ case O_right_shift:
+ case O_bit_inclusive_or:
+ case O_bit_or_not:
+ case O_bit_exclusive_or:
+ case O_bit_and:
+ case O_add:
+ case O_subtract:
+ case O_eq:
+ case O_ne:
+ case O_lt:
+ case O_le:
+ case O_ge:
+ case O_gt:
+ case O_logical_and:
+ case O_logical_or:
+
+ if ( (S_IS_COMMON (symp->sy_value.X_add_symbol)
+ || S_IS_LOCAL (symp->sy_value.X_add_symbol))
+ &&
+ (S_IS_COMMON (symp->sy_value.X_op_symbol)
+ || S_IS_LOCAL (symp->sy_value.X_op_symbol))
+
+ && S_IS_DEFINED (symp->sy_value.X_add_symbol)
+ && S_IS_DEFINED (symp->sy_value.X_op_symbol)
+ && S_GET_SEGMENT (symp->sy_value.X_add_symbol) != expr_section
+ && S_GET_SEGMENT (symp->sy_value.X_op_symbol) != expr_section)
+ return 0;
+ break;
+
+ default:
+ break;
+ }
+ return 1;
+}
+#endif
+
static void
report_op_error (symbolS *symp, symbolS *left, symbolS *right)
{
@@ -986,6 +1044,53 @@ resolve_symbol_value (symbolS *symp)
final_val = 0;
resolved = 1;
}
+#ifdef OBJ_COMPLEX_RELC
+ else if (final_seg == expr_section
+ && use_complex_relocs_for (symp))
+ {
+ symbolS * relc_symbol = NULL;
+ char * relc_symbol_name = NULL;
+
+ relc_symbol_name = symbol_relc_make_expr (& symp->sy_value);
+
+ /* For debugging, print out conversion input & output. */
+#ifdef DEBUG_SYMS
+ print_expr (& symp->sy_value);
+ if (relc_symbol_name)
+ fprintf (stderr, "-> relc symbol: %s\n", relc_symbol_name);
+#endif
+
+ if (relc_symbol_name != NULL)
+ relc_symbol = symbol_new (relc_symbol_name, undefined_section,
+ 0, & zero_address_frag);
+
+ if (relc_symbol == NULL)
+ {
+ as_bad (_("cannot convert expression symbol %s to complex relocation"),
+ S_GET_NAME (symp));
+ resolved = 0;
+ }
+ else
+ {
+ symbol_table_insert (relc_symbol);
+
+ /* S_CLEAR_EXTERNAL (relc_symbol); */
+ if (symp->bsym->flags & BSF_SRELC)
+ relc_symbol->bsym->flags |= BSF_SRELC;
+ else
+ relc_symbol->bsym->flags |= BSF_RELC;
+ /* symp->bsym->flags |= BSF_RELC; */
+ copy_symbol_attributes (symp, relc_symbol);
+ symp->sy_value.X_op = O_symbol;
+ symp->sy_value.X_add_symbol = relc_symbol;
+ symp->sy_value.X_add_number = 0;
+ resolved = 1;
+ }
+
+ final_seg = undefined_section;
+ goto exit_dont_set_value;
+ }
+#endif
else
{
symbolS *add_symbol, *op_symbol;
@@ -1016,6 +1121,9 @@ resolve_symbol_value (symbolS *symp)
final_val += symp->sy_frag->fr_address / OCTETS_PER_BYTE;
if (final_seg == expr_section)
final_seg = absolute_section;
+ /* Fall through. */
+
+ case O_register:
resolved = 1;
break;
@@ -1083,8 +1191,9 @@ resolve_symbol_value (symbolS *symp)
symp->sy_resolving = 0;
goto exit_dont_set_value;
}
- else if (finalize_syms && final_seg == expr_section
- && seg_left != expr_section)
+ else if (finalize_syms
+ && ((final_seg == expr_section && seg_left != expr_section)
+ || symbol_shadow_p (symp)))
{
/* If the symbol is an expression symbol, do similarly
as for undefined and common syms above. Handles
@@ -1292,7 +1401,6 @@ resolve_symbol_value (symbolS *symp)
&& symbol_resolved_p (op_symbol));
break;
- case O_register:
case O_big:
case O_illegal:
/* Give an error (below) if not in expr_section. We don't
@@ -1839,6 +1947,10 @@ copy_symbol_attributes (symbolS *dest, symbolS *src)
#ifdef OBJ_COPY_SYMBOL_ATTRIBUTES
OBJ_COPY_SYMBOL_ATTRIBUTES (dest, src);
#endif
+
+#ifdef TC_COPY_SYMBOL_ATTRIBUTES
+ TC_COPY_SYMBOL_ATTRIBUTES (dest, src);
+#endif
}
int
@@ -2497,6 +2609,17 @@ symbol_constant_p (symbolS *s)
return s->sy_value.X_op == O_constant;
}
+/* Return whether a symbol was cloned and thus removed from the global
+ symbol list. */
+
+int
+symbol_shadow_p (symbolS *s)
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ return s->sy_next == s;
+}
+
/* Return the BFD symbol for a symbol. */
asymbol *
@@ -2818,3 +2941,219 @@ symbol_print_statistics (FILE *file)
fprintf (file, "%lu mini local symbols created, %lu converted\n",
local_symbol_count, local_symbol_conversion_count);
}
+
+#ifdef OBJ_COMPLEX_RELC
+
+/* Convert given symbol to a new complex-relocation symbol name. This
+ may be a recursive function, since it might be called for non-leaf
+ nodes (plain symbols) in the expression tree. The caller owns the
+ returning string, so should free it eventually. Errors are
+ indicated via as_bad and a NULL return value. The given symbol
+ is marked with sy_used_in_reloc. */
+
+char *
+symbol_relc_make_sym (symbolS * sym)
+{
+ char * terminal = NULL;
+ const char * sname;
+ char typetag;
+ int sname_len;
+
+ assert (sym != NULL);
+
+ /* Recurse to symbol_relc_make_expr if this symbol
+ is defined as an expression or a plain value. */
+ if ( S_GET_SEGMENT (sym) == expr_section
+ || S_GET_SEGMENT (sym) == absolute_section)
+ return symbol_relc_make_expr (& sym->sy_value);
+
+ /* This may be a "fake symbol" L0\001, referring to ".".
+ Write out a special null symbol to refer to this position. */
+ if (! strcmp (S_GET_NAME (sym), FAKE_LABEL_NAME))
+ return xstrdup (".");
+
+ /* We hope this is a plain leaf symbol. Construct the encoding
+ as {S,s}II...:CCCCCCC....
+ where 'S'/'s' means section symbol / plain symbol
+ III is decimal for the symbol name length
+ CCC is the symbol name itself. */
+ symbol_mark_used_in_reloc (sym);
+
+ sname = S_GET_NAME (sym);
+ sname_len = strlen (sname);
+ typetag = symbol_section_p (sym) ? 'S' : 's';
+
+ terminal = xmalloc (1 /* S or s */
+ + 8 /* sname_len in decimal */
+ + 1 /* _ spacer */
+ + sname_len /* name itself */
+ + 1 /* \0 */ );
+
+ sprintf (terminal, "%c%d:%s", typetag, sname_len, sname);
+ return terminal;
+}
+
+/* Convert given value to a new complex-relocation symbol name. This
+ is a non-recursive function, since it is be called for leaf nodes
+ (plain values) in the expression tree. The caller owns the
+ returning string, so should free() it eventually. No errors. */
+
+char *
+symbol_relc_make_value (offsetT val)
+{
+ char * terminal = xmalloc (28); /* Enough for long long. */
+
+ terminal[0] = '#';
+ sprintf_vma (& terminal[1], val);
+ return terminal;
+}
+
+/* Convert given expression to a new complex-relocation symbol name.
+ This is a recursive function, since it traverses the entire given
+ expression tree. The caller owns the returning string, so should
+ free() it eventually. Errors are indicated via as_bad() and a NULL
+ return value. */
+
+char *
+symbol_relc_make_expr (expressionS * exp)
+{
+ char * opstr = NULL; /* Operator prefix string. */
+ int arity = 0; /* Arity of this operator. */
+ char * operands[3]; /* Up to three operands. */
+ char * concat_string = NULL;
+
+ operands[0] = operands[1] = operands[2] = NULL;
+
+ assert (exp != NULL);
+
+ /* Match known operators -> fill in opstr, arity, operands[] and fall
+ through to construct subexpression fragments; may instead return
+ string directly for leaf nodes. */
+
+ /* See expr.h for the meaning of all these enums. Many operators
+ have an unnatural arity (X_add_number implicitly added). The
+ conversion logic expands them to explicit "+" subexpressions. */
+
+ switch (exp->X_op)
+ {
+ default:
+ as_bad ("Unknown expression operator (enum %d)", exp->X_op);
+ break;
+
+ /* Leaf nodes. */
+ case O_constant:
+ return symbol_relc_make_value (exp->X_add_number);
+
+ case O_symbol:
+ if (exp->X_add_number)
+ {
+ arity = 2;
+ opstr = "+";
+ operands[0] = symbol_relc_make_sym (exp->X_add_symbol);
+ operands[1] = symbol_relc_make_value (exp->X_add_number);
+ break;
+ }
+ else
+ return symbol_relc_make_sym (exp->X_add_symbol);
+
+ /* Helper macros for nesting nodes. */
+
+#define HANDLE_XADD_OPT1(str_) \
+ if (exp->X_add_number) \
+ { \
+ arity = 2; \
+ opstr = "+:" str_; \
+ operands[0] = symbol_relc_make_sym (exp->X_add_symbol); \
+ operands[1] = symbol_relc_make_value (exp->X_add_number); \
+ break; \
+ } \
+ else \
+ { \
+ arity = 1; \
+ opstr = str_; \
+ operands[0] = symbol_relc_make_sym (exp->X_add_symbol); \
+ } \
+ break
+
+#define HANDLE_XADD_OPT2(str_) \
+ if (exp->X_add_number) \
+ { \
+ arity = 3; \
+ opstr = "+:" str_; \
+ operands[0] = symbol_relc_make_sym (exp->X_add_symbol); \
+ operands[1] = symbol_relc_make_sym (exp->X_op_symbol); \
+ operands[2] = symbol_relc_make_value (exp->X_add_number); \
+ } \
+ else \
+ { \
+ arity = 2; \
+ opstr = str_; \
+ operands[0] = symbol_relc_make_sym (exp->X_add_symbol); \
+ operands[1] = symbol_relc_make_sym (exp->X_op_symbol); \
+ } \
+ break
+
+ /* Nesting nodes. */
+
+ case O_uminus: HANDLE_XADD_OPT1 ("0-");
+ case O_bit_not: HANDLE_XADD_OPT1 ("~");
+ case O_logical_not: HANDLE_XADD_OPT1 ("!");
+ case O_multiply: HANDLE_XADD_OPT2 ("*");
+ case O_divide: HANDLE_XADD_OPT2 ("/");
+ case O_modulus: HANDLE_XADD_OPT2 ("%");
+ case O_left_shift: HANDLE_XADD_OPT2 ("<<");
+ case O_right_shift: HANDLE_XADD_OPT2 (">>");
+ case O_bit_inclusive_or: HANDLE_XADD_OPT2 ("|");
+ case O_bit_exclusive_or: HANDLE_XADD_OPT2 ("^");
+ case O_bit_and: HANDLE_XADD_OPT2 ("&");
+ case O_add: HANDLE_XADD_OPT2 ("+");
+ case O_subtract: HANDLE_XADD_OPT2 ("-");
+ case O_eq: HANDLE_XADD_OPT2 ("==");
+ case O_ne: HANDLE_XADD_OPT2 ("!=");
+ case O_lt: HANDLE_XADD_OPT2 ("<");
+ case O_le: HANDLE_XADD_OPT2 ("<=");
+ case O_ge: HANDLE_XADD_OPT2 (">=");
+ case O_gt: HANDLE_XADD_OPT2 (">");
+ case O_logical_and: HANDLE_XADD_OPT2 ("&&");
+ case O_logical_or: HANDLE_XADD_OPT2 ("||");
+ }
+
+ /* Validate & reject early. */
+ if (arity >= 1 && ((operands[0] == NULL) || (strlen (operands[0]) == 0)))
+ opstr = NULL;
+ if (arity >= 2 && ((operands[1] == NULL) || (strlen (operands[1]) == 0)))
+ opstr = NULL;
+ if (arity >= 3 && ((operands[2] == NULL) || (strlen (operands[2]) == 0)))
+ opstr = NULL;
+
+ if (opstr == NULL)
+ concat_string = NULL;
+ else
+ {
+ /* Allocate new string; include inter-operand padding gaps etc. */
+ concat_string = xmalloc (strlen (opstr)
+ + 1
+ + (arity >= 1 ? (strlen (operands[0]) + 1 ) : 0)
+ + (arity >= 2 ? (strlen (operands[1]) + 1 ) : 0)
+ + (arity >= 3 ? (strlen (operands[2]) + 0 ) : 0)
+ + 1);
+ assert (concat_string != NULL);
+
+ /* Format the thing. */
+ sprintf (concat_string,
+ (arity == 0 ? "%s" :
+ arity == 1 ? "%s:%s" :
+ arity == 2 ? "%s:%s:%s" :
+ /* arity == 3 */ "%s:%s:%s:%s"),
+ opstr, operands[0], operands[1], operands[2]);
+ }
+
+ /* Free operand strings (not opstr). */
+ if (arity >= 1) xfree (operands[0]);
+ if (arity >= 2) xfree (operands[1]);
+ if (arity >= 3) xfree (operands[2]);
+
+ return concat_string;
+}
+
+#endif
diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h
index 7a4b8f7..483f8ee 100644
--- a/contrib/binutils/gas/symbols.h
+++ b/contrib/binutils/gas/symbols.h
@@ -35,6 +35,9 @@ extern int symbol_table_frozen;
default. */
extern int symbols_case_sensitive;
+char * symbol_relc_make_expr (expressionS *);
+char * symbol_relc_make_sym (symbolS *);
+char * symbol_relc_make_value (offsetT);
char *decode_local_label_name (char *s);
symbolS *symbol_find (const char *name);
symbolS *symbol_find_noref (const char *name, int noref);
@@ -192,6 +195,7 @@ extern int symbol_section_p (symbolS *);
extern int symbol_equated_p (symbolS *);
extern int symbol_equated_reloc_p (symbolS *);
extern int symbol_constant_p (symbolS *);
+extern int symbol_shadow_p (symbolS *);
extern asymbol *symbol_get_bfdsym (symbolS *);
extern void symbol_set_bfdsym (symbolS *, asymbol *);
diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c
index 9186717..29ea284 100644
--- a/contrib/binutils/gas/write.c
+++ b/contrib/binutils/gas/write.c
@@ -1,6 +1,6 @@
/* write.c - emit .o file
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -27,6 +27,7 @@
#include "obstack.h"
#include "output-file.h"
#include "dwarf2dbg.h"
+#include "libbfd.h"
#ifndef TC_ADJUST_RELOC_COUNT
#define TC_ADJUST_RELOC_COUNT(FIX, COUNT)
@@ -45,7 +46,6 @@
#ifndef TC_FORCE_RELOCATION_LOCAL
#define TC_FORCE_RELOCATION_LOCAL(FIX) \
(!(FIX)->fx_pcrel \
- || (FIX)->fx_plt \
|| TC_FORCE_RELOCATION (FIX))
#endif
@@ -97,6 +97,16 @@
#define TC_FAKE_LABEL(NAME) (strcmp ((NAME), FAKE_LABEL_NAME) == 0)
#endif
+/* Positive values of TC_FX_SIZE_SLACK allow a target to define
+ fixups that far past the end of a frag. Having such fixups
+ is of course most most likely a bug in setting fx_size correctly.
+ A negative value disables the fixup check entirely, which is
+ appropriate for something like the Renesas / SuperH SH_COUNT
+ reloc. */
+#ifndef TC_FX_SIZE_SLACK
+#define TC_FX_SIZE_SLACK(FIX) 0
+#endif
+
/* Used to control final evaluation of expressions. */
int finalize_syms = 0;
@@ -107,9 +117,10 @@ symbolS *abs_section_sym;
/* Remember the value of dot when parsing expressions. */
addressT dot_value;
-void print_fixup (fixS *);
+/* Relocs generated by ".reloc" pseudo. */
+struct reloc_list* reloc_list;
-static void renumber_sections (bfd *, asection *, PTR);
+void print_fixup (fixS *);
/* We generally attach relocs to frag chains. However, after we have
chained these all together into a segment, any relocs we add after
@@ -121,22 +132,6 @@ static int n_fixups;
#define RELOC_ENUM enum bfd_reloc_code_real
-static fixS *fix_new_internal (fragS *, int where, int size,
- symbolS *add, symbolS *sub,
- offsetT offset, int pcrel,
- RELOC_ENUM r_type);
-static long fixup_segment (fixS *, segT);
-static relax_addressT relax_align (relax_addressT addr, int align);
-static fragS *chain_frchains_together_1 (segT, struct frchain *);
-static void chain_frchains_together (bfd *, segT, PTR);
-static void cvt_frag_to_fill (segT, fragS *);
-static void adjust_reloc_syms (bfd *, asection *, PTR);
-static void fix_segment (bfd *, asection *, PTR);
-static void write_relocs (bfd *, asection *, PTR);
-static void write_contents (bfd *, asection *, PTR);
-static void set_symtab (void);
-static void merge_data_into_text (void);
-
/* Create a fixS in obstack 'notes'. */
static fixS *
@@ -153,7 +148,7 @@ fix_new_internal (fragS *frag, /* Which frag? */
n_fixups++;
- fixP = (fixS *) obstack_alloc (&notes, sizeof (fixS));
+ fixP = obstack_alloc (&notes, sizeof (fixS));
fixP->fx_frag = frag;
fixP->fx_where = where;
@@ -169,13 +164,13 @@ fix_new_internal (fragS *frag, /* Which frag? */
fixP->fx_offset = offset;
fixP->fx_dot_value = dot_value;
fixP->fx_pcrel = pcrel;
- fixP->fx_plt = 0;
fixP->fx_r_type = r_type;
fixP->fx_im_disp = 0;
fixP->fx_pcrel_adjust = 0;
fixP->fx_bit_fixP = 0;
fixP->fx_addnumber = 0;
fixP->fx_tcbit = 0;
+ fixP->fx_tcbit2 = 0;
fixP->fx_done = 0;
fixP->fx_no_overflow = 0;
fixP->fx_signed = 0;
@@ -365,7 +360,7 @@ get_recorded_alignment (segT seg)
/* Reset the section indices after removing the gas created sections. */
static void
-renumber_sections (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, PTR countparg)
+renumber_sections (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *countparg)
{
int *countp = (int *) countparg;
@@ -379,7 +374,7 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
fragS dummy, *prev_frag = &dummy;
fixS fix_dummy, *prev_fix = &fix_dummy;
- for (; frchp && frchp->frch_seg == section; frchp = frchp->frch_next)
+ for (; frchp; frchp = frchp->frch_next)
{
prev_frag->fr_next = frchp->frch_root;
prev_frag = frchp->frch_last;
@@ -394,6 +389,7 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
}
}
assert (prev_frag->fr_type != 0);
+ assert (prev_frag != &dummy);
prev_frag->fr_next = 0;
return prev_frag;
}
@@ -401,7 +397,7 @@ chain_frchains_together_1 (segT section, struct frchain *frchp)
static void
chain_frchains_together (bfd *abfd ATTRIBUTE_UNUSED,
segT section,
- PTR xxx ATTRIBUTE_UNUSED)
+ void *xxx ATTRIBUTE_UNUSED)
{
segment_info_type *info;
@@ -529,10 +525,8 @@ relax_seg (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *xxx)
info->changed = 1;
}
-static void size_seg (bfd *, asection *, PTR);
-
static void
-size_seg (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
+size_seg (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
{
flagword flags;
fragS *fragp;
@@ -562,11 +556,7 @@ size_seg (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
if (size > 0 && ! seginfo->bss)
flags |= SEC_HAS_CONTENTS;
- /* @@ This is just an approximation. */
- if (seginfo && seginfo->fix_root)
- flags |= SEC_RELOC;
- else
- flags &= ~SEC_RELOC;
+ flags &= ~SEC_RELOC;
x = bfd_set_section_flags (abfd, sec, flags);
assert (x);
@@ -637,13 +627,93 @@ dump_section_relocs (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, FILE *stream)
#define EMIT_SECTION_SYMBOLS 1
#endif
+/* Resolve U.A.OFFSET_SYM and U.A.SYM fields of RELOC_LIST entries,
+ and check for validity. Convert RELOC_LIST from using U.A fields
+ to U.B fields. */
+static void
+resolve_reloc_expr_symbols (void)
+{
+ struct reloc_list *r;
+
+ for (r = reloc_list; r; r = r->next)
+ {
+ expressionS *symval;
+ symbolS *sym;
+ bfd_vma offset, addend;
+ asection *sec;
+ reloc_howto_type *howto;
+
+ resolve_symbol_value (r->u.a.offset_sym);
+ symval = symbol_get_value_expression (r->u.a.offset_sym);
+
+ offset = 0;
+ sym = NULL;
+ if (symval->X_op == O_constant)
+ sym = r->u.a.offset_sym;
+ else if (symval->X_op == O_symbol)
+ {
+ sym = symval->X_add_symbol;
+ offset = symval->X_add_number;
+ symval = symbol_get_value_expression (symval->X_add_symbol);
+ }
+ if (sym == NULL
+ || symval->X_op != O_constant
+ || (sec = S_GET_SEGMENT (sym)) == NULL
+ || !SEG_NORMAL (sec))
+ {
+ as_bad_where (r->file, r->line, _("invalid offset expression"));
+ sec = NULL;
+ }
+ else
+ offset += S_GET_VALUE (sym);
+
+ sym = NULL;
+ addend = r->u.a.addend;
+ if (r->u.a.sym != NULL)
+ {
+ resolve_symbol_value (r->u.a.sym);
+ symval = symbol_get_value_expression (r->u.a.sym);
+ if (symval->X_op == O_constant)
+ sym = r->u.a.sym;
+ else if (symval->X_op == O_symbol)
+ {
+ sym = symval->X_add_symbol;
+ addend += symval->X_add_number;
+ symval = symbol_get_value_expression (symval->X_add_symbol);
+ }
+ if (symval->X_op != O_constant)
+ {
+ as_bad_where (r->file, r->line, _("invalid reloc expression"));
+ sec = NULL;
+ }
+ else if (sym != NULL)
+ symbol_mark_used_in_reloc (sym);
+ }
+ if (sym == NULL)
+ {
+ if (abs_section_sym == NULL)
+ abs_section_sym = section_symbol (absolute_section);
+ sym = abs_section_sym;
+ }
+
+ howto = r->u.a.howto;
+
+ r->u.b.sec = sec;
+ r->u.b.s = symbol_get_bfdsym (sym);
+ r->u.b.r.sym_ptr_ptr = &r->u.b.s;
+ r->u.b.r.address = offset;
+ r->u.b.r.addend = addend;
+ r->u.b.r.howto = howto;
+ }
+}
+
/* This pass over fixups decides whether symbols can be replaced with
section symbols. */
static void
adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED,
asection *sec,
- PTR xxx ATTRIBUTE_UNUSED)
+ void *xxx ATTRIBUTE_UNUSED)
{
segment_info_type *seginfo = seg_info (sec);
fixS *fixp;
@@ -680,17 +750,21 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED,
/* If this symbol is equated to an undefined or common symbol,
convert the fixup to being against that symbol. */
- if (symbol_equated_reloc_p (sym)
- || S_IS_WEAKREFR (sym))
+ while (symbol_equated_reloc_p (sym)
+ || S_IS_WEAKREFR (sym))
{
+ symbolS *newsym = symbol_get_value_expression (sym)->X_add_symbol;
+ if (sym == newsym)
+ break;
fixp->fx_offset += symbol_get_value_expression (sym)->X_add_number;
- sym = symbol_get_value_expression (sym)->X_add_symbol;
- fixp->fx_addsy = sym;
+ fixp->fx_addsy = newsym;
+ sym = newsym;
}
if (symbol_mri_common_p (sym))
{
- /* These symbols are handled specially in fixup_segment. */
+ fixp->fx_offset += S_GET_VALUE (sym);
+ fixp->fx_addsy = symbol_get_value_expression (sym)->X_add_symbol;
continue;
}
@@ -719,14 +793,14 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED,
if (bfd_is_abs_section (symsec))
{
/* The fixup_segment routine normally will not use this
- symbol in a relocation. */
+ symbol in a relocation. */
continue;
}
/* Don't try to reduce relocs which refer to non-local symbols
- in .linkonce sections. It can lead to confusion when a
- debugging section refers to a .linkonce section. I hope
- this will always be correct. */
+ in .linkonce sections. It can lead to confusion when a
+ debugging section refers to a .linkonce section. I hope
+ this will always be correct. */
if (symsec != sec && ! S_IS_LOCAL (sym))
{
if ((symsec->flags & SEC_LINK_ONCE) != 0
@@ -763,10 +837,241 @@ adjust_reloc_syms (bfd *abfd ATTRIBUTE_UNUSED,
dump_section_relocs (abfd, sec, stderr);
}
+/* fixup_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.
+
+ 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.
+ These will be output later by emit_relocations(). */
+
+static long
+fixup_segment (fixS *fixP, segT this_segment)
+{
+ long seg_reloc_count = 0;
+ valueT add_number;
+ fragS *fragP;
+ segT add_symbol_segment = absolute_section;
+
+ if (fixP != NULL && abs_section_sym == NULL)
+ abs_section_sym = section_symbol (absolute_section);
+
+ /* If the linker is doing the relaxing, we must not do any fixups.
+
+ Well, strictly speaking that's not true -- we could do any that
+ are PC-relative and don't cross regions that could change size.
+ And for the i960 we might be able to turn callx/callj into bal
+ anyways in cases where we know the maximum displacement. */
+ if (linkrelax && TC_LINKRELAX_FIXUP (this_segment))
+ {
+ for (; fixP; fixP = fixP->fx_next)
+ if (!fixP->fx_done)
+ {
+ if (fixP->fx_addsy == NULL)
+ {
+ /* There was no symbol required by this relocation.
+ However, BFD doesn't really handle relocations
+ without symbols well. So fake up a local symbol in
+ the absolute section. */
+ fixP->fx_addsy = abs_section_sym;
+ }
+ symbol_mark_used_in_reloc (fixP->fx_addsy);
+ if (fixP->fx_subsy != NULL)
+ symbol_mark_used_in_reloc (fixP->fx_subsy);
+ seg_reloc_count++;
+ }
+ TC_ADJUST_RELOC_COUNT (fixP, seg_reloc_count);
+ return seg_reloc_count;
+ }
+
+ for (; fixP; fixP = fixP->fx_next)
+ {
+#ifdef DEBUG5
+ fprintf (stderr, "\nprocessing fixup:\n");
+ print_fixup (fixP);
+#endif
+
+ fragP = fixP->fx_frag;
+ know (fragP);
+#ifdef TC_VALIDATE_FIX
+ TC_VALIDATE_FIX (fixP, this_segment, skip);
+#endif
+ add_number = fixP->fx_offset;
+
+ if (fixP->fx_addsy != NULL)
+ add_symbol_segment = S_GET_SEGMENT (fixP->fx_addsy);
+
+ if (fixP->fx_subsy != NULL)
+ {
+ segT sub_symbol_segment;
+ resolve_symbol_value (fixP->fx_subsy);
+ sub_symbol_segment = S_GET_SEGMENT (fixP->fx_subsy);
+ if (fixP->fx_addsy != NULL
+ && sub_symbol_segment == add_symbol_segment
+ && !TC_FORCE_RELOCATION_SUB_SAME (fixP, add_symbol_segment))
+ {
+ add_number += S_GET_VALUE (fixP->fx_addsy);
+ add_number -= S_GET_VALUE (fixP->fx_subsy);
+ fixP->fx_offset = add_number;
+ fixP->fx_addsy = NULL;
+ fixP->fx_subsy = NULL;
+#ifdef TC_M68K
+ /* See the comment below about 68k weirdness. */
+ fixP->fx_pcrel = 0;
+#endif
+ }
+ else if (sub_symbol_segment == absolute_section
+ && !TC_FORCE_RELOCATION_SUB_ABS (fixP))
+ {
+ add_number -= S_GET_VALUE (fixP->fx_subsy);
+ fixP->fx_offset = add_number;
+ fixP->fx_subsy = NULL;
+ }
+ else if (sub_symbol_segment == this_segment
+ && !TC_FORCE_RELOCATION_SUB_LOCAL (fixP))
+ {
+ add_number -= S_GET_VALUE (fixP->fx_subsy);
+ fixP->fx_offset = (add_number + fixP->fx_dot_value
+ + fixP->fx_frag->fr_address);
+
+ /* Make it pc-relative. If the back-end code has not
+ selected a pc-relative reloc, cancel the adjustment
+ we do later on all pc-relative relocs. */
+ 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
+ || !fixP->fx_pcrel)
+ add_number += MD_PCREL_FROM_SECTION (fixP, this_segment);
+ fixP->fx_subsy = NULL;
+ fixP->fx_pcrel = 1;
+ }
+ else if (!TC_VALIDATE_FIX_SUB (fixP))
+ {
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("can't resolve `%s' {%s section} - `%s' {%s section}"),
+ fixP->fx_addsy ? S_GET_NAME (fixP->fx_addsy) : "0",
+ segment_name (add_symbol_segment),
+ S_GET_NAME (fixP->fx_subsy),
+ segment_name (sub_symbol_segment));
+ }
+ }
+
+ if (fixP->fx_addsy)
+ {
+ if (add_symbol_segment == this_segment
+ && !TC_FORCE_RELOCATION_LOCAL (fixP))
+ {
+ /* This fixup was made when the symbol's segment was
+ SEG_UNKNOWN, but it is now in the local segment.
+ So we know how to do the address without relocation. */
+ add_number += S_GET_VALUE (fixP->fx_addsy);
+ fixP->fx_offset = add_number;
+ if (fixP->fx_pcrel)
+ add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment);
+ fixP->fx_addsy = NULL;
+ fixP->fx_pcrel = 0;
+ }
+ else if (add_symbol_segment == absolute_section
+ && !TC_FORCE_RELOCATION_ABS (fixP))
+ {
+ add_number += S_GET_VALUE (fixP->fx_addsy);
+ fixP->fx_offset = add_number;
+ fixP->fx_addsy = NULL;
+ }
+ else if (add_symbol_segment != undefined_section
+ && ! bfd_is_com_section (add_symbol_segment)
+ && MD_APPLY_SYM_VALUE (fixP))
+ add_number += S_GET_VALUE (fixP->fx_addsy);
+ }
+
+ if (fixP->fx_pcrel)
+ {
+ add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment);
+ if (!fixP->fx_done && fixP->fx_addsy == NULL)
+ {
+ /* There was no symbol required by this relocation.
+ However, BFD doesn't really handle relocations
+ without symbols well. So fake up a local symbol in
+ the absolute section. */
+ fixP->fx_addsy = abs_section_sym;
+ }
+ }
+
+ if (!fixP->fx_done)
+ md_apply_fix (fixP, &add_number, this_segment);
+
+ if (!fixP->fx_done)
+ {
+ ++seg_reloc_count;
+ if (fixP->fx_addsy == NULL)
+ fixP->fx_addsy = abs_section_sym;
+ symbol_mark_used_in_reloc (fixP->fx_addsy);
+ if (fixP->fx_subsy != NULL)
+ symbol_mark_used_in_reloc (fixP->fx_subsy);
+ }
+
+ if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && fixP->fx_size != 0)
+ {
+ if (fixP->fx_size < sizeof (valueT))
+ {
+ valueT mask;
+
+ mask = 0;
+ mask--; /* Set all bits to one. */
+ mask <<= fixP->fx_size * 8 - (fixP->fx_signed ? 1 : 0);
+ if ((add_number & mask) != 0 && (add_number & mask) != mask)
+ {
+ char buf[50], buf2[50];
+ sprint_value (buf, fragP->fr_address + fixP->fx_where);
+ if (add_number > 1000)
+ sprint_value (buf2, add_number);
+ 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"),
+ buf2, fixP->fx_size, buf);
+ } /* Generic error checking. */
+ }
+#ifdef WARN_SIGNED_OVERFLOW_WORD
+ /* Warn if a .word value is too large when treated as a signed
+ number. We already know it is not too negative. This is to
+ catch over-large switches generated by gcc on the 68k. */
+ if (!flag_signed_overflow_ok
+ && fixP->fx_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"),
+ (long) add_number,
+ (long) (fragP->fr_address + fixP->fx_where));
+#endif
+ } /* Not a bit fix. */
+
+#ifdef TC_VALIDATE_FIX
+ skip: ATTRIBUTE_UNUSED_LABEL
+ ;
+#endif
+#ifdef DEBUG5
+ fprintf (stderr, "result:\n");
+ print_fixup (fixP);
+#endif
+ } /* For each fixS in this segment. */
+
+ TC_ADJUST_RELOC_COUNT (fixP, seg_reloc_count);
+ return seg_reloc_count;
+}
+
static void
fix_segment (bfd *abfd ATTRIBUTE_UNUSED,
asection *sec,
- PTR xxx ATTRIBUTE_UNUSED)
+ void *xxx ATTRIBUTE_UNUSED)
{
segment_info_type *seginfo = seg_info (sec);
@@ -774,14 +1079,40 @@ fix_segment (bfd *abfd ATTRIBUTE_UNUSED,
}
static void
-write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
+install_reloc (asection *sec, arelent *reloc, fragS *fragp,
+ char *file, unsigned int line)
+{
+ char *err;
+ bfd_reloc_status_type s;
+
+ s = bfd_install_relocation (stdoutput, reloc,
+ fragp->fr_literal, fragp->fr_address,
+ sec, &err);
+ switch (s)
+ {
+ case bfd_reloc_ok:
+ break;
+ case bfd_reloc_overflow:
+ as_bad_where (file, line, _("relocation overflow"));
+ break;
+ case bfd_reloc_outofrange:
+ as_bad_where (file, line, _("relocation out of range"));
+ break;
+ default:
+ as_fatal (_("%s:%u: bad return from bfd_install_relocation: %x"),
+ file, line, s);
+ }
+}
+
+static void
+write_relocs (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED)
{
segment_info_type *seginfo = seg_info (sec);
unsigned int i;
unsigned int n;
+ struct reloc_list *my_reloc_list, **rp, *r;
arelent **relocs;
fixS *fixp;
- char *err;
/* If seginfo is NULL, we did not create this section; don't do
anything with it. */
@@ -790,153 +1121,73 @@ write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
n = 0;
for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next)
- n++;
+ if (!fixp->fx_done)
+ n++;
-#ifndef RELOC_EXPANSION_POSSIBLE
- /* Set up reloc information as well. */
- relocs = (arelent **) xcalloc (n, sizeof (arelent *));
+#ifdef RELOC_EXPANSION_POSSIBLE
+ n *= MAX_RELOC_EXPANSION;
+#endif
- i = 0;
- for (fixp = seginfo->fix_root; fixp != (fixS *) NULL; fixp = fixp->fx_next)
+ /* Extract relocs for this section from reloc_list. */
+ rp = &reloc_list;
+ my_reloc_list = NULL;
+ while ((r = *rp) != NULL)
{
- arelent *reloc;
- bfd_reloc_status_type s;
- symbolS *sym;
-
- if (fixp->fx_done)
- {
- n--;
- continue;
- }
-
- /* If this is an undefined symbol which was equated to another
- symbol, then generate the reloc against the latter symbol
- rather than the former. */
- sym = fixp->fx_addsy;
- while (symbol_equated_reloc_p (sym))
- {
- symbolS *n;
-
- /* We must avoid looping, as that can occur with a badly
- written program. */
- n = symbol_get_value_expression (sym)->X_add_symbol;
- if (n == sym)
- break;
- fixp->fx_offset += symbol_get_value_expression (sym)->X_add_number;
- sym = n;
- }
- fixp->fx_addsy = sym;
-
- reloc = tc_gen_reloc (sec, fixp);
- if (!reloc)
+ if (r->u.b.sec == sec)
{
- n--;
- continue;
+ *rp = r->next;
+ r->next = my_reloc_list;
+ my_reloc_list = r;
+ n++;
}
-
- /*
- This test is triggered inappropriately for the SH:
- if (fixp->fx_where + fixp->fx_size
- > fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
- abort ();
- */
-
- s = bfd_install_relocation (stdoutput, reloc,
- fixp->fx_frag->fr_literal,
- fixp->fx_frag->fr_address,
- sec, &err);
- switch (s)
- {
- case bfd_reloc_ok:
- break;
- case bfd_reloc_overflow:
- as_bad_where (fixp->fx_file, fixp->fx_line,
- _("relocation overflow"));
- break;
- case bfd_reloc_outofrange:
- as_bad_where (fixp->fx_file, fixp->fx_line,
- _("relocation out of range"));
- break;
- default:
- as_fatal (_("%s:%u: bad return from bfd_install_relocation: %x"),
- fixp->fx_file, fixp->fx_line, s);
- }
- relocs[i++] = reloc;
+ else
+ rp = &r->next;
}
-#else
- n = n * MAX_RELOC_EXPANSION;
- /* Set up reloc information as well. */
- relocs = (arelent **) xcalloc (n, sizeof (arelent *));
+
+ relocs = xcalloc (n, sizeof (arelent *));
i = 0;
for (fixp = seginfo->fix_root; fixp != (fixS *) NULL; fixp = fixp->fx_next)
{
- arelent **reloc;
- bfd_reloc_status_type s;
- symbolS *sym;
int j;
+ int fx_size, slack;
+ offsetT loc;
if (fixp->fx_done)
- {
- n--;
- continue;
- }
+ continue;
+
+ fx_size = fixp->fx_size;
+ slack = TC_FX_SIZE_SLACK (fixp);
+ if (slack > 0)
+ fx_size = fx_size > slack ? fx_size - slack : 0;
+ loc = fixp->fx_where + fx_size;
+ if (slack >= 0 && loc > fixp->fx_frag->fr_fix)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("internal error: fixup not contained within frag"));
- /* If this is an undefined symbol which was equated to another
- symbol, then generate the reloc against the latter symbol
- rather than the former. */
- sym = fixp->fx_addsy;
- while (symbol_equated_reloc_p (sym))
- {
- symbolS *n;
-
- /* We must avoid looping, as that can occur with a badly
- written program. */
- n = symbol_get_value_expression (sym)->X_add_symbol;
- if (n == sym)
- break;
- fixp->fx_offset += symbol_get_value_expression (sym)->X_add_number;
- sym = n;
- }
- fixp->fx_addsy = sym;
+#ifndef RELOC_EXPANSION_POSSIBLE
+ {
+ arelent *reloc = tc_gen_reloc (sec, fixp);
- reloc = tc_gen_reloc (sec, fixp);
+ if (!reloc)
+ continue;
+ relocs[i++] = reloc;
+ j = 1;
+ }
+#else
+ {
+ arelent **reloc = tc_gen_reloc (sec, fixp);
- for (j = 0; reloc[j]; j++)
- {
+ for (j = 0; reloc[j]; j++)
relocs[i++] = reloc[j];
- assert (i <= n);
- }
- if (fixp->fx_where + fixp->fx_size
- > fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
- as_bad_where (fixp->fx_file, fixp->fx_line,
- _("internal error: fixup not contained within frag"));
- for (j = 0; reloc[j]; j++)
- {
- s = bfd_install_relocation (stdoutput, reloc[j],
- fixp->fx_frag->fr_literal,
- fixp->fx_frag->fr_address,
- sec, &err);
- switch (s)
- {
- case bfd_reloc_ok:
- break;
- case bfd_reloc_overflow:
- as_bad_where (fixp->fx_file, fixp->fx_line,
- _("relocation overflow"));
- break;
- case bfd_reloc_outofrange:
- as_bad_where (fixp->fx_file, fixp->fx_line,
- _("relocation out of range"));
- break;
- default:
- as_fatal (_("%s:%u: bad return from bfd_install_relocation: %x"),
- fixp->fx_file, fixp->fx_line, s);
- }
- }
+ }
+#endif
+
+ for ( ; j != 0; --j)
+ install_reloc (sec, relocs[i - j], fixp->fx_frag,
+ fixp->fx_file, fixp->fx_line);
}
n = i;
-#endif
#ifdef DEBUG4
{
@@ -956,12 +1207,30 @@ write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
}
#endif
+ for (r = my_reloc_list; r != NULL; r = r->next)
+ {
+ fragS *f;
+ for (f = seginfo->frchainP->frch_root; f; f = f->fr_next)
+ if (f->fr_address <= r->u.b.r.address
+ && r->u.b.r.address < f->fr_address + f->fr_fix)
+ break;
+ if (f == NULL)
+ as_bad_where (r->file, r->line,
+ _("reloc not within (fixed part of) section"));
+ else
+ {
+ relocs[n++] = &r->u.b.r;
+ install_reloc (sec, &r->u.b.r, f, r->file, r->line);
+ }
+ }
+
if (n)
- bfd_set_reloc (stdoutput, sec, relocs, n);
- else
- bfd_set_section_flags (abfd, sec,
- (bfd_get_section_flags (abfd, sec)
- & (flagword) ~SEC_RELOC));
+ {
+ flagword flags = bfd_get_section_flags (abfd, sec);
+ flags |= SEC_RELOC;
+ bfd_set_section_flags (abfd, sec, flags);
+ bfd_set_reloc (stdoutput, sec, relocs, n);
+ }
#ifdef SET_SECTION_RELOCS
SET_SECTION_RELOCS (sec, relocs, n);
@@ -987,7 +1256,7 @@ write_relocs (bfd *abfd, asection *sec, PTR xxx ATTRIBUTE_UNUSED)
static void
write_contents (bfd *abfd ATTRIBUTE_UNUSED,
asection *sec,
- PTR xxx ATTRIBUTE_UNUSED)
+ void *xxx ATTRIBUTE_UNUSED)
{
segment_info_type *seginfo = seg_info (sec);
addressT offset = 0;
@@ -1014,11 +1283,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
f->fr_literal, (file_ptr) offset,
(bfd_size_type) f->fr_fix);
if (!x)
- {
- bfd_perror (stdoutput->filename);
- as_perror (_("FATAL: Can't write %s"), stdoutput->filename);
- exit (EXIT_FAILURE);
- }
+ as_fatal (_("can't write %s: %s"), stdoutput->filename,
+ bfd_errmsg (bfd_get_error ()));
offset += f->fr_fix;
}
fill_literal = f->fr_literal + f->fr_fix;
@@ -1038,12 +1304,8 @@ write_contents (bfd *abfd ATTRIBUTE_UNUSED,
(file_ptr) offset,
(bfd_size_type) fill_size);
if (!x)
- {
- bfd_perror (stdoutput->filename);
- as_perror (_("FATAL: Can't write %s"),
- stdoutput->filename);
- exit (EXIT_FAILURE);
- }
+ as_fatal (_("can't write %s: %s"), stdoutput->filename,
+ bfd_errmsg (bfd_get_error ()));
offset += fill_size;
}
}
@@ -1097,7 +1359,6 @@ set_symtab (void)
asymbol **asympp;
symbolS *symp;
bfd_boolean result;
- extern PTR bfd_alloc (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
@@ -1111,7 +1372,7 @@ set_symtab (void)
int i;
bfd_size_type amt = (bfd_size_type) nsyms * sizeof (asymbol *);
- asympp = (asymbol **) bfd_alloc (stdoutput, amt);
+ asympp = bfd_alloc (stdoutput, amt);
symp = symbol_rootP;
for (i = 0; i < nsyms; i++, symp = symbol_next (symp))
{
@@ -1138,8 +1399,7 @@ set_symtab (void)
of the section. This allows proper nop-filling at the end of
code-bearing sections. */
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) \
- (!(FRCHAIN)->frch_next || (FRCHAIN)->frch_next->frch_seg != (SEG) \
- ? get_recorded_alignment (SEG) : 0)
+ (!(FRCHAIN)->frch_next ? get_recorded_alignment (SEG) : 0)
#else
#define SUB_SEGMENT_ALIGN(SEG, FRCHAIN) 0
#endif
@@ -1149,48 +1409,58 @@ void
subsegs_finish (void)
{
struct frchain *frchainP;
+ asection *s;
- for (frchainP = frchain_root; frchainP; frchainP = frchainP->frch_next)
+ for (s = stdoutput->sections; s; s = s->next)
{
- int alignment = 0;
-
- subseg_set (frchainP->frch_seg, frchainP->frch_subseg);
+ segment_info_type *seginfo = seg_info (s);
+ if (!seginfo)
+ continue;
- /* This now gets called even if we had errors. In that case,
- any alignment is meaningless, and, moreover, will look weird
- if we are generating a listing. */
- if (!had_errors ())
+ for (frchainP = seginfo->frchainP;
+ frchainP != NULL;
+ frchainP = frchainP->frch_next)
{
- alignment = SUB_SEGMENT_ALIGN (now_seg, frchainP);
- if ((bfd_get_section_flags (now_seg->owner, now_seg) & SEC_MERGE)
- && now_seg->entsize)
- {
- unsigned int entsize = now_seg->entsize;
- int entalign = 0;
+ int alignment = 0;
+
+ subseg_set (s, frchainP->frch_subseg);
- while ((entsize & 1) == 0)
+ /* This now gets called even if we had errors. In that case,
+ any alignment is meaningless, and, moreover, will look weird
+ if we are generating a listing. */
+ if (!had_errors ())
+ {
+ alignment = SUB_SEGMENT_ALIGN (now_seg, frchainP);
+ if ((bfd_get_section_flags (now_seg->owner, now_seg) & SEC_MERGE)
+ && now_seg->entsize)
{
- ++entalign;
- entsize >>= 1;
+ unsigned int entsize = now_seg->entsize;
+ int entalign = 0;
+
+ while ((entsize & 1) == 0)
+ {
+ ++entalign;
+ entsize >>= 1;
+ }
+ if (entalign > alignment)
+ alignment = entalign;
}
- if (entalign > alignment)
- alignment = entalign;
}
- }
- if (subseg_text_p (now_seg))
- frag_align_code (alignment, 0);
- else
- frag_align (alignment, 0, 0);
+ if (subseg_text_p (now_seg))
+ frag_align_code (alignment, 0);
+ else
+ frag_align (alignment, 0, 0);
- /* frag_align will have left a new frag.
- Use this last frag for an empty ".fill".
+ /* frag_align will have left a new frag.
+ Use this last frag for an empty ".fill".
- For this segment ...
- Create a last frag. Do not leave a "being filled in frag". */
- frag_wane (frag_now);
- frag_now->fr_fix = 0;
- know (frag_now->fr_next == NULL);
+ For this segment ...
+ Create a last frag. Do not leave a "being filled in frag". */
+ frag_wane (frag_now);
+ frag_now->fr_fix = 0;
+ know (frag_now->fr_next == NULL);
+ }
}
}
@@ -1411,6 +1681,7 @@ write_object_file (void)
resolve_symbol_value (symp);
}
resolve_local_symbol_values ();
+ resolve_reloc_expr_symbols ();
PROGRESS (1);
@@ -1478,7 +1749,7 @@ write_object_file (void)
resolve_symbol_value (symp);
/* Skip symbols which were equated to undefined or common
- symbols. */
+ symbols. */
if (symbol_equated_reloc_p (symp)
|| S_IS_WEAKREFR (symp))
{
@@ -1807,23 +2078,48 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
/* Do relax(). */
{
unsigned long max_iterations;
- offsetT stretch; /* May be any size, 0 or negative. */
- /* Cumulative number of addresses we have relaxed this pass.
- We may have relaxed more than one address. */
- int stretched; /* Have we stretched on this pass? */
- /* This is 'cuz stretch may be zero, when, in fact some piece of code
- grew, and another shrank. If a branch instruction doesn't fit anymore,
- we could be scrod. */
+
+ /* Cumulative address adjustment. */
+ offsetT stretch;
+
+ /* Have we made any adjustment this pass? We can't just test
+ stretch because one piece of code may have grown and another
+ shrank. */
+ int stretched;
+
+ /* Most horrible, but gcc may give us some exception data that
+ is impossible to assemble, of the form
+
+ .align 4
+ .byte 0, 0
+ .uleb128 end - start
+ start:
+ .space 128*128 - 1
+ .align 4
+ end:
+
+ If the leb128 is two bytes in size, then end-start is 128*128,
+ which requires a three byte leb128. If the leb128 is three
+ bytes in size, then end-start is 128*128-1, which requires a
+ two byte leb128. We work around this dilemma by inserting
+ an extra 4 bytes of alignment just after the .align. This
+ works because the data after the align is accessed relative to
+ the end label.
+
+ This counter is used in a tiny state machine to detect
+ whether a leb128 followed by an align is impossible to
+ relax. */
+ int rs_leb128_fudge = 0;
/* We want to prevent going into an infinite loop where one frag grows
depending upon the location of a symbol which is in turn moved by
the growing frag. eg:
- foo = .
- .org foo+16
- foo = .
+ foo = .
+ .org foo+16
+ foo = .
- So we dictate that this algorithm can be at most O2. */
+ So we dictate that this algorithm can be at most O2. */
max_iterations = frag_count * frag_count;
/* Check for overflow. */
if (max_iterations < frag_count)
@@ -1936,6 +2232,49 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
}
growth = newoff - oldoff;
+
+ /* If this align happens to follow a leb128 and
+ we have determined that the leb128 is bouncing
+ in size, then break the cycle by inserting an
+ extra alignment. */
+ if (growth < 0
+ && (rs_leb128_fudge & 16) != 0
+ && (rs_leb128_fudge & 15) >= 2)
+ {
+ segment_info_type *seginfo = seg_info (segment);
+ struct obstack *ob = &seginfo->frchainP->frch_obstack;
+ struct frag *newf;
+
+ newf = frag_alloc (ob);
+ obstack_blank_fast (ob, fragP->fr_var);
+ obstack_finish (ob);
+ memcpy (newf, fragP, SIZEOF_STRUCT_FRAG);
+ memcpy (newf->fr_literal,
+ fragP->fr_literal + fragP->fr_fix,
+ fragP->fr_var);
+ newf->fr_type = rs_fill;
+ newf->fr_fix = 0;
+ newf->fr_offset = (((offsetT) 1 << fragP->fr_offset)
+ / fragP->fr_var);
+ if (newf->fr_offset * newf->fr_var
+ != (offsetT) 1 << fragP->fr_offset)
+ {
+ newf->fr_offset = (offsetT) 1 << fragP->fr_offset;
+ newf->fr_var = 1;
+ }
+ /* Include growth of new frag, because rs_fill
+ frags don't normally grow. */
+ growth += newf->fr_offset * newf->fr_var;
+ /* The new frag address is newoff. Adjust this
+ for the amount we'll add when we process the
+ new frag. */
+ newf->fr_address = newoff - stretch - growth;
+ newf->relax_marker ^= 1;
+ fragP->fr_next = newf;
+#ifdef DEBUG
+ as_warn (_("padding added"));
+#endif
+ }
}
break;
@@ -1946,11 +2285,11 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
if (symbolP)
{
- /* 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_SEGMENT (symbolP)->vma == 0);
+ /* 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_SEGMENT (symbolP)->vma == 0);
target += S_GET_VALUE (symbolP) * OCTETS_PER_BYTE;
}
@@ -1986,7 +2325,7 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
_("attempt to move .org backwards"));
/* We've issued an error message. Change the
- frag to avoid cascading errors. */
+ frag to avoid cascading errors. */
fragP->fr_type = rs_align;
fragP->fr_subtype = 0;
fragP->fr_offset = 0;
@@ -2075,8 +2414,23 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
{
stretch += growth;
stretched = 1;
+ if (fragP->fr_type == rs_leb128)
+ rs_leb128_fudge += 16;
+ else if (fragP->fr_type == rs_align
+ && (rs_leb128_fudge & 16) != 0
+ && stretch == 0)
+ rs_leb128_fudge += 16;
+ else
+ rs_leb128_fudge = 0;
}
}
+
+ if (stretch == 0
+ && (rs_leb128_fudge & 16) == 0
+ && (rs_leb128_fudge & -16) != 0)
+ rs_leb128_fudge += 1;
+ else
+ rs_leb128_fudge = 0;
}
/* Until nothing further to relax. */
while (stretched && -- max_iterations);
@@ -2095,246 +2449,6 @@ relax_segment (struct frag *segment_frag_root, segT segment, int pass)
return ret;
}
-/* fixup_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.
-
- 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.
- These will be output later by emit_relocations(). */
-
-static long
-fixup_segment (fixS *fixP, segT this_segment)
-{
- long seg_reloc_count = 0;
- valueT add_number;
- fragS *fragP;
- segT add_symbol_segment = absolute_section;
-
- if (fixP != NULL && abs_section_sym == NULL)
- abs_section_sym = section_symbol (absolute_section);
-
- /* If the linker is doing the relaxing, we must not do any fixups.
-
- Well, strictly speaking that's not true -- we could do any that
- are PC-relative and don't cross regions that could change size.
- And for the i960 we might be able to turn callx/callj into bal
- anyways in cases where we know the maximum displacement. */
- if (linkrelax && TC_LINKRELAX_FIXUP (this_segment))
- {
- for (; fixP; fixP = fixP->fx_next)
- if (!fixP->fx_done)
- {
- if (fixP->fx_addsy == NULL)
- {
- /* There was no symbol required by this relocation.
- However, BFD doesn't really handle relocations
- without symbols well. So fake up a local symbol in
- the absolute section. */
- fixP->fx_addsy = abs_section_sym;
- }
- symbol_mark_used_in_reloc (fixP->fx_addsy);
- if (fixP->fx_subsy != NULL)
- symbol_mark_used_in_reloc (fixP->fx_subsy);
- seg_reloc_count++;
- }
- TC_ADJUST_RELOC_COUNT (fixP, seg_reloc_count);
- return seg_reloc_count;
- }
-
- for (; fixP; fixP = fixP->fx_next)
- {
-#ifdef DEBUG5
- fprintf (stderr, "\nprocessing fixup:\n");
- print_fixup (fixP);
-#endif
-
- fragP = fixP->fx_frag;
- know (fragP);
-#ifdef TC_VALIDATE_FIX
- TC_VALIDATE_FIX (fixP, this_segment, skip);
-#endif
- add_number = fixP->fx_offset;
-
- if (fixP->fx_addsy != NULL
- && symbol_mri_common_p (fixP->fx_addsy))
- {
- add_number += S_GET_VALUE (fixP->fx_addsy);
- fixP->fx_offset = add_number;
- fixP->fx_addsy
- = symbol_get_value_expression (fixP->fx_addsy)->X_add_symbol;
- }
-
- if (fixP->fx_addsy != NULL)
- add_symbol_segment = S_GET_SEGMENT (fixP->fx_addsy);
-
- if (fixP->fx_subsy != NULL)
- {
- segT sub_symbol_segment;
- resolve_symbol_value (fixP->fx_subsy);
- sub_symbol_segment = S_GET_SEGMENT (fixP->fx_subsy);
- if (fixP->fx_addsy != NULL
- && sub_symbol_segment == add_symbol_segment
- && !TC_FORCE_RELOCATION_SUB_SAME (fixP, add_symbol_segment))
- {
- add_number += S_GET_VALUE (fixP->fx_addsy);
- add_number -= S_GET_VALUE (fixP->fx_subsy);
- fixP->fx_offset = add_number;
- fixP->fx_addsy = NULL;
- fixP->fx_subsy = NULL;
-#ifdef TC_M68K
- /* See the comment below about 68k weirdness. */
- fixP->fx_pcrel = 0;
-#endif
- }
- else if (sub_symbol_segment == absolute_section
- && !TC_FORCE_RELOCATION_SUB_ABS (fixP))
- {
- add_number -= S_GET_VALUE (fixP->fx_subsy);
- fixP->fx_offset = add_number;
- fixP->fx_subsy = NULL;
- }
- else if (sub_symbol_segment == this_segment
- && !TC_FORCE_RELOCATION_SUB_LOCAL (fixP))
- {
- add_number -= S_GET_VALUE (fixP->fx_subsy);
- fixP->fx_offset = (add_number + fixP->fx_dot_value
- + fixP->fx_frag->fr_address);
-
- /* Make it pc-relative. If the back-end code has not
- selected a pc-relative reloc, cancel the adjustment
- we do later on all pc-relative relocs. */
- 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
- || !fixP->fx_pcrel)
- add_number += MD_PCREL_FROM_SECTION (fixP, this_segment);
- fixP->fx_subsy = NULL;
- fixP->fx_pcrel = 1;
- }
- else if (!TC_VALIDATE_FIX_SUB (fixP))
- {
- as_bad_where (fixP->fx_file, fixP->fx_line,
- _("can't resolve `%s' {%s section} - `%s' {%s section}"),
- fixP->fx_addsy ? S_GET_NAME (fixP->fx_addsy) : "0",
- segment_name (add_symbol_segment),
- S_GET_NAME (fixP->fx_subsy),
- segment_name (sub_symbol_segment));
- }
- }
-
- if (fixP->fx_addsy)
- {
- if (add_symbol_segment == this_segment
- && !TC_FORCE_RELOCATION_LOCAL (fixP))
- {
- /* This fixup was made when the symbol's segment was
- SEG_UNKNOWN, but it is now in the local segment.
- So we know how to do the address without relocation. */
- add_number += S_GET_VALUE (fixP->fx_addsy);
- fixP->fx_offset = add_number;
- if (fixP->fx_pcrel)
- add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment);
- fixP->fx_addsy = NULL;
- fixP->fx_pcrel = 0;
- }
- else if (add_symbol_segment == absolute_section
- && !TC_FORCE_RELOCATION_ABS (fixP))
- {
- add_number += S_GET_VALUE (fixP->fx_addsy);
- fixP->fx_offset = add_number;
- fixP->fx_addsy = NULL;
- }
- else if (add_symbol_segment != undefined_section
- && ! bfd_is_com_section (add_symbol_segment)
- && MD_APPLY_SYM_VALUE (fixP))
- add_number += S_GET_VALUE (fixP->fx_addsy);
- }
-
- if (fixP->fx_pcrel)
- {
- add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment);
- if (!fixP->fx_done && fixP->fx_addsy == NULL)
- {
- /* There was no symbol required by this relocation.
- However, BFD doesn't really handle relocations
- without symbols well. So fake up a local symbol in
- the absolute section. */
- fixP->fx_addsy = abs_section_sym;
- }
- }
-
- if (!fixP->fx_done)
- md_apply_fix (fixP, &add_number, this_segment);
-
- if (!fixP->fx_done)
- {
- ++seg_reloc_count;
- if (fixP->fx_addsy == NULL)
- fixP->fx_addsy = abs_section_sym;
- symbol_mark_used_in_reloc (fixP->fx_addsy);
- if (fixP->fx_subsy != NULL)
- symbol_mark_used_in_reloc (fixP->fx_subsy);
- }
-
- if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && fixP->fx_size != 0)
- {
- if (fixP->fx_size < sizeof (valueT))
- {
- valueT mask;
-
- mask = 0;
- mask--; /* Set all bits to one. */
- mask <<= fixP->fx_size * 8 - (fixP->fx_signed ? 1 : 0);
- if ((add_number & mask) != 0 && (add_number & mask) != mask)
- {
- char buf[50], buf2[50];
- sprint_value (buf, fragP->fr_address + fixP->fx_where);
- if (add_number > 1000)
- sprint_value (buf2, add_number);
- 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"),
- buf2, fixP->fx_size, buf);
- } /* Generic error checking. */
- }
-#ifdef WARN_SIGNED_OVERFLOW_WORD
- /* Warn if a .word value is too large when treated as a signed
- number. We already know it is not too negative. This is to
- catch over-large switches generated by gcc on the 68k. */
- if (!flag_signed_overflow_ok
- && fixP->fx_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"),
- (long) add_number,
- (long) (fragP->fr_address + fixP->fx_where));
-#endif
- } /* Not a bit fix. */
-
-#ifdef TC_VALIDATE_FIX
- skip: ATTRIBUTE_UNUSED_LABEL
- ;
-#endif
-#ifdef DEBUG5
- fprintf (stderr, "result:\n");
- print_fixup (fixP);
-#endif
- } /* For each fixS in this segment. */
-
- TC_ADJUST_RELOC_COUNT (fixP, seg_reloc_count);
- return seg_reloc_count;
-}
-
void
number_to_chars_bigendian (char *buf, valueT val, int n)
{
diff --git a/contrib/binutils/gas/write.h b/contrib/binutils/gas/write.h
index 1f9b72d..4f75eb6 100644
--- a/contrib/binutils/gas/write.h
+++ b/contrib/binutils/gas/write.h
@@ -1,6 +1,7 @@
/* write.h
Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001,
- 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+ 2002, 2003, 2005, 2006, 2007
+ Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -22,12 +23,6 @@
#ifndef __write_h__
#define __write_h__
-#ifndef TC_I960
-#ifdef hpux
-#define EXEC_MACHINE_TYPE HP9000S200_ID
-#endif
-#endif /* TC_I960 */
-
/* This is the name of a fake symbol which will never appear in the
assembler output. S_IS_LOCAL detects it because of the \001. */
#ifndef FAKE_LABEL_NAME
@@ -45,29 +40,16 @@ struct fix
/* These small fields are grouped together for compactness of
this structure, and efficiency of access on some architectures. */
- /* pc-relative offset adjust (only used by m68k) */
- char fx_pcrel_adjust;
-
- /* How many bytes are involved? */
- unsigned char fx_size;
-
/* Is this a pc-relative relocation? */
unsigned fx_pcrel : 1;
- /* Is this a relocation to a procedure linkage table entry? If so,
- some of the reductions we try to apply are invalid. A better way
- might be to represent PLT entries with different kinds of
- symbols, and use normal relocations (with undefined symbols);
- look into it for version 2.6. */
- unsigned fx_plt : 1;
-
/* Is this value an immediate displacement? */
- /* Only used on i960 and ns32k; merge it into TC_FIX_TYPE sometime. */
+ /* Only used on ns32k; merge it into TC_FIX_TYPE sometime. */
unsigned fx_im_disp : 2;
- /* A bit for the CPU specific code.
- This probably can be folded into tc_fix_data, below. */
+ /* Some bits for the CPU specific code. */
unsigned fx_tcbit : 1;
+ unsigned fx_tcbit2 : 1;
/* Has this relocation already been applied? */
unsigned fx_done : 1;
@@ -82,6 +64,12 @@ struct fix
/* The value is signed when checking for overflow. */
unsigned fx_signed : 1;
+ /* pc-relative offset adjust (only used by m68k and m68hc11) */
+ char fx_pcrel_adjust;
+
+ /* How many bytes are involved? */
+ unsigned char fx_size;
+
/* Which frag does this fix apply to? */
fragS *fx_frag;
@@ -132,6 +120,10 @@ struct fix
const struct cgen_insn *insn;
/* Target specific data, usually reloc number. */
int opinfo;
+ /* Which ifield this fixup applies to. */
+ struct cgen_maybe_multi_ifield * field;
+ /* is this field is the MSB field in a set? */
+ int msb_field_p;
} fx_cgen;
#endif
@@ -144,11 +136,33 @@ struct fix
typedef struct fix fixS;
+struct reloc_list
+{
+ struct reloc_list *next;
+ union
+ {
+ struct
+ {
+ symbolS *offset_sym;
+ reloc_howto_type *howto;
+ symbolS *sym;
+ bfd_vma addend;
+ } a;
+ struct
+ {
+ asection *sec;
+ asymbol *s;
+ arelent r;
+ } b;
+ } u;
+ char *file;
+ unsigned int line;
+};
+
extern int finalize_syms;
extern symbolS *abs_section_sym;
extern addressT dot_value;
-extern long string_byte_count;
-extern int section_alignment[];
+extern struct reloc_list* reloc_list;
extern void append (char **charPP, char *fromP, unsigned long length);
extern void record_alignment (segT seg, int align);
diff --git a/contrib/binutils/gprof/mips.c b/contrib/binutils/gprof/mips.c
index 96d2707..7a7344d 100644
--- a/contrib/binutils/gprof/mips.c
+++ b/contrib/binutils/gprof/mips.c
@@ -56,24 +56,13 @@ mips_find_call (Sym *parent, bfd_vma p_lowpc, bfd_vma p_highpc)
indirect_child.cg.cyc.head = &indirect_child;
}
- if (!core_text_space)
- {
- return;
- }
- if (p_lowpc < s_lowpc)
- {
- p_lowpc = s_lowpc;
- }
- if (p_highpc > s_highpc)
- {
- p_highpc = s_highpc;
- }
DBG (CALLDEBUG, printf (_("[find_call] %s: 0x%lx to 0x%lx\n"),
parent->name, (unsigned long) p_lowpc,
(unsigned long) p_highpc));
for (pc = p_lowpc; pc < p_highpc; pc += 4)
{
- op = bfd_get_32 (core_bfd, &((char *)core_text_space)[pc - s_lowpc]);
+ op = bfd_get_32 (core_bfd, ((unsigned char *)core_text_space
+ + pc - core_text_sect->vma));
if ((op & 0xfc000000) == 0x0c000000)
{
/* This is a "jal" instruction. Check that the destination
@@ -82,7 +71,7 @@ mips_find_call (Sym *parent, bfd_vma p_lowpc, bfd_vma p_highpc)
printf (_("[find_call] 0x%lx: jal"), (unsigned long) pc));
offset = (op & 0x03ffffff) << 2;
dest_pc = (pc & ~(bfd_vma) 0xfffffff) | offset;
- if (dest_pc >= s_lowpc && dest_pc <= s_highpc)
+ if (hist_check_address (dest_pc))
{
child = sym_lookup (&symtab, dest_pc);
DBG (CALLDEBUG,
diff --git a/contrib/binutils/gprof/po/Make-in b/contrib/binutils/gprof/po/Make-in
index 42863f2..b2988cb 100644
--- a/contrib/binutils/gprof/po/Make-in
+++ b/contrib/binutils/gprof/po/Make-in
@@ -16,6 +16,7 @@ SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
+top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -72,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
$(MSGFMT) -o $@ $<
.po.gmo:
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
diff --git a/contrib/binutils/gprof/po/gprof.pot b/contrib/binutils/gprof/po/gprof.pot
index 295436b..ad8c41a 100644
--- a/contrib/binutils/gprof/po/gprof.pot
+++ b/contrib/binutils/gprof/po/gprof.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-10-01 07:23+0930\n"
+"POT-Creation-Date: 2007-05-15 16:49+0930\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,22 +20,22 @@ msgstr ""
msgid "<indirect child>"
msgstr ""
-#: alpha.c:119 mips.c:71
+#: alpha.c:107 mips.c:59
#, c-format
msgid "[find_call] %s: 0x%lx to 0x%lx\n"
msgstr ""
-#: alpha.c:141
+#: alpha.c:129
#, c-format
msgid "[find_call] 0x%lx: jsr%s <indirect_child>\n"
msgstr ""
-#: alpha.c:151
+#: alpha.c:139
#, c-format
msgid "[find_call] 0x%lx: bsr"
msgstr ""
-#: basic_blocks.c:128 call_graph.c:89 hist.c:97
+#: basic_blocks.c:128 call_graph.c:89 hist.c:105
#, c-format
msgid "%s: %s: unexpected end of file\n"
msgstr ""
@@ -120,7 +120,7 @@ msgid ""
"\n"
msgstr ""
-#: cg_print.c:78 hist.c:359
+#: cg_print.c:78 hist.c:466
#, c-format
msgid ""
"\n"
@@ -170,7 +170,7 @@ msgstr ""
msgid "descendants"
msgstr ""
-#: cg_print.c:98 hist.c:385
+#: cg_print.c:98 hist.c:492
msgid "name"
msgstr ""
@@ -210,47 +210,47 @@ msgstr ""
msgid "<cycle %d>"
msgstr ""
-#: corefile.c:64
+#: corefile.c:59
#, c-format
-msgid "%s: could not open %s.\n"
+msgid "%s: unable to parse mapping file %s.\n"
msgstr ""
-#: corefile.c:78 corefile.c:112
+#: corefile.c:72
#, c-format
-msgid "%s: unable to parse mapping file %s.\n"
+msgid "%s: could not open %s.\n"
msgstr ""
-#: corefile.c:158
+#: corefile.c:166
#, c-format
-msgid "%s: %s: not in a.out format\n"
+msgid "%s: %s: not in executable format\n"
msgstr ""
-#: corefile.c:169
+#: corefile.c:177
#, c-format
msgid "%s: can't find .text section in %s\n"
msgstr ""
-#: corefile.c:244
+#: corefile.c:252
#, c-format
msgid "%s: ran out room for %lu bytes of text space\n"
msgstr ""
-#: corefile.c:258
+#: corefile.c:266
#, c-format
msgid "%s: can't do -c\n"
msgstr ""
-#: corefile.c:292
+#: corefile.c:305
#, c-format
msgid "%s: -c not supported on architecture %s\n"
msgstr ""
-#: corefile.c:457
+#: corefile.c:470
#, c-format
msgid "%s: file `%s' has no symbols\n"
msgstr ""
-#: corefile.c:771
+#: corefile.c:772
#, c-format
msgid "%s: somebody miscounted: ltab.len=%d instead of %ld\n"
msgstr ""
@@ -285,62 +285,62 @@ msgstr ""
msgid "%s: profiling rate incompatible with first gmon file\n"
msgstr ""
-#: gmon_io.c:486
+#: gmon_io.c:489
#, c-format
msgid "%s: incompatible with first gmon file\n"
msgstr ""
-#: gmon_io.c:514
+#: gmon_io.c:516
#, c-format
msgid "%s: file '%s' does not appear to be in gmon.out format\n"
msgstr ""
-#: gmon_io.c:535
+#: gmon_io.c:529
#, c-format
msgid "%s: unexpected EOF after reading %d/%d bins\n"
msgstr ""
-#: gmon_io.c:568
+#: gmon_io.c:563
#, c-format
msgid "time is in ticks, not seconds\n"
msgstr ""
-#: gmon_io.c:574 gmon_io.c:750
+#: gmon_io.c:569 gmon_io.c:746
#, c-format
msgid "%s: don't know how to deal with file format %d\n"
msgstr ""
-#: gmon_io.c:581
+#: gmon_io.c:576
#, c-format
msgid "File `%s' (version %d) contains:\n"
msgstr ""
-#: gmon_io.c:584
+#: gmon_io.c:579
#, c-format
msgid "\t%d histogram record\n"
msgstr ""
-#: gmon_io.c:585
+#: gmon_io.c:580
#, c-format
msgid "\t%d histogram records\n"
msgstr ""
-#: gmon_io.c:587
+#: gmon_io.c:582
#, c-format
msgid "\t%d call-graph record\n"
msgstr ""
-#: gmon_io.c:588
+#: gmon_io.c:583
#, c-format
msgid "\t%d call-graph records\n"
msgstr ""
-#: gmon_io.c:590
+#: gmon_io.c:585
#, c-format
msgid "\t%d basic-block count record\n"
msgstr ""
-#: gmon_io.c:591
+#: gmon_io.c:586
#, c-format
msgid "\t%d basic-block count records\n"
msgstr ""
@@ -359,7 +359,7 @@ msgid ""
"\t[--no-static] [--print-path] [--separate-files]\n"
"\t[--static-call-graph] [--sum] [--table-length=len] [--traditional]\n"
"\t[--version] [--width=n] [--ignore-non-functions]\n"
-"\t[--demangle[=STYLE]] [--no-demangle]\n"
+"\t[--demangle[=STYLE]] [--no-demangle] [@FILE]\n"
"\t[image-file] [profile-file...]\n"
msgstr ""
@@ -412,73 +412,94 @@ msgstr ""
msgid "%s: sorry, file format `prof' is not yet supported\n"
msgstr ""
-#: gprof.c:576
+#: gprof.c:581
#, c-format
msgid "%s: gmon.out file is missing histogram\n"
msgstr ""
-#: gprof.c:583
+#: gprof.c:588
#, c-format
msgid "%s: gmon.out file is missing call-graph data\n"
msgstr ""
-#: hist.c:126
+#: hist.c:133
+#, c-format
+msgid ""
+"%s: dimension unit changed between histogram records\n"
+"%s: from '%s'\n"
+"%s: to '%s'\n"
+msgstr ""
+
+#: hist.c:143
#, c-format
-msgid "%s: `%s' is incompatible with first gmon file\n"
+msgid ""
+"%s: dimension abbreviation changed between histogram records\n"
+"%s: from '%c'\n"
+"%s: to '%c'\n"
+msgstr ""
+
+#: hist.c:157
+#, c-format
+msgid "%s: different scales in histogram records"
+msgstr ""
+
+#: hist.c:194
+#, c-format
+msgid "%s: overlapping histogram records\n"
msgstr ""
-#: hist.c:142
+#: hist.c:228
#, c-format
msgid "%s: %s: unexpected EOF after reading %u of %u samples\n"
msgstr ""
-#: hist.c:355
+#: hist.c:462
#, c-format
msgid "%c%c/call"
msgstr ""
-#: hist.c:363
+#: hist.c:470
#, c-format
msgid ""
" for %.2f%% of %.2f %s\n"
"\n"
msgstr ""
-#: hist.c:369
+#: hist.c:476
#, c-format
msgid ""
"\n"
"Each sample counts as %g %s.\n"
msgstr ""
-#: hist.c:374
+#: hist.c:481
#, c-format
msgid ""
" no time accumulated\n"
"\n"
msgstr ""
-#: hist.c:381
+#: hist.c:488
msgid "cumulative"
msgstr ""
-#: hist.c:381
+#: hist.c:488
msgid "self "
msgstr ""
-#: hist.c:381
+#: hist.c:488
msgid "total "
msgstr ""
-#: hist.c:384
+#: hist.c:491
msgid "time"
msgstr ""
-#: hist.c:384
+#: hist.c:491
msgid "calls"
msgstr ""
-#: hist.c:473
+#: hist.c:580
#, c-format
msgid ""
"\n"
@@ -487,17 +508,22 @@ msgid ""
"flat profile:\n"
msgstr ""
-#: hist.c:479
+#: hist.c:586
#, c-format
msgid "Flat profile:\n"
msgstr ""
-#: mips.c:82
+#: hist.c:705
+#, c-format
+msgid "%s: found a symbol that covers several histogram records"
+msgstr ""
+
+#: mips.c:71
#, c-format
msgid "[find_call] 0x%lx: jal"
msgstr ""
-#: mips.c:107
+#: mips.c:96
#, c-format
msgid "[find_call] 0x%lx: jalr\n"
msgstr ""
@@ -512,7 +538,7 @@ msgstr ""
msgid "*** File %s:\n"
msgstr ""
-#: utils.c:107
+#: utils.c:99
#, c-format
msgid " <cycle %d>"
msgstr ""
diff --git a/contrib/binutils/gprof/po/ms.po b/contrib/binutils/gprof/po/ms.po
new file mode 100644
index 0000000..ed481cd
--- /dev/null
+++ b/contrib/binutils/gprof/po/ms.po
@@ -0,0 +1,561 @@
+# gprof Bahasa Melayu (Malay) (ms).
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006 Sharuzzaman Ahmat Raslan
+# This file is distributed under the same license as the gprof package.
+# Sharuzzaman Ahmat Raslan <sharuzzaman@myrealbox.com>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gprof 2.16.93\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-10-01 07:23+0930\n"
+"PO-Revision-Date: 2006-11-25 22:35+0800\n"
+"Last-Translator: Sharuzzaman Ahmat Raslan <sharuzzaman@myrealbox.com>\n"
+"Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: alpha.c:102 mips.c:54
+msgid "<indirect child>"
+msgstr "<anak tidak terus>"
+
+#: alpha.c:119 mips.c:71
+#, c-format
+msgid "[find_call] %s: 0x%lx to 0x%lx\n"
+msgstr "[find_call] %s: 0x%lx ke 0x%lx\n"
+
+#: alpha.c:141
+#, c-format
+msgid "[find_call] 0x%lx: jsr%s <indirect_child>\n"
+msgstr "[find_call] 0x%lx: jsr%s <indirect_child>\n"
+
+#: alpha.c:151
+#, c-format
+msgid "[find_call] 0x%lx: bsr"
+msgstr "[find_call] 0x%lx: bsr"
+
+#: basic_blocks.c:128 call_graph.c:89 hist.c:97
+#, c-format
+msgid "%s: %s: unexpected end of file\n"
+msgstr "%s: %s: akhir fail tidak dijangka\n"
+
+#: basic_blocks.c:196
+#, c-format
+msgid "%s: warning: ignoring basic-block exec counts (use -l or --line)\n"
+msgstr "%s: amaran: mengabaikan kiraan pelaksanaan blok-asas (guna -l atau --line)\n"
+
+#. FIXME: This only works if bfd_vma is unsigned long.
+#: basic_blocks.c:289 basic_blocks.c:299
+#, c-format
+msgid "%s:%d: (%s:0x%lx) %lu executions\n"
+msgstr "%s:%d: (%s:0x%lx) %lu pelaksanaan\n"
+
+#: basic_blocks.c:290 basic_blocks.c:300
+msgid "<unknown>"
+msgstr "<tidak diketahui>"
+
+#: basic_blocks.c:543
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Top %d Lines:\n"
+"\n"
+" Line Count\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"%d Baris Tertinggi:\n"
+"\n"
+" Baris Kiraan\n"
+"\n"
+
+#: basic_blocks.c:567
+#, c-format
+msgid ""
+"\n"
+"Execution Summary:\n"
+"\n"
+msgstr ""
+"\n"
+"Ringkasan Pelaksanaan:\n"
+"\n"
+
+#: basic_blocks.c:568
+#, c-format
+msgid "%9ld Executable lines in this file\n"
+msgstr "%9ld Baris bolehlaksana dalam fail ini\n"
+
+#: basic_blocks.c:570
+#, c-format
+msgid "%9ld Lines executed\n"
+msgstr "%9ld Baris dilaksana\n"
+
+#: basic_blocks.c:571
+#, c-format
+msgid "%9.2f Percent of the file executed\n"
+msgstr "%9.2f Peratus fail dilaksana\n"
+
+#: basic_blocks.c:575
+#, c-format
+msgid ""
+"\n"
+"%9lu Total number of line executions\n"
+msgstr ""
+"\n"
+"%9lu Jumlah baris pelaksanaan\n"
+
+#: basic_blocks.c:577
+#, c-format
+msgid "%9.2f Average executions per line\n"
+msgstr "%9.2f Purata pelaksanaan per baris\n"
+
+#: call_graph.c:68
+#, c-format
+msgid "[cg_tally] arc from %s to %s traversed %lu times\n"
+msgstr "[cg_tally] arc dari %s ke %s berpindah %lu kali\n"
+
+#: cg_print.c:73
+#, c-format
+msgid ""
+"\t\t Call graph (explanation follows)\n"
+"\n"
+msgstr ""
+"\t\t Graf panggilan (di ikuti penerangan)\n"
+"\n"
+
+#: cg_print.c:75
+#, c-format
+msgid ""
+"\t\t\tCall graph\n"
+"\n"
+msgstr ""
+"\t\t\tGraf panggilan\n"
+"\n"
+
+#: cg_print.c:78 hist.c:359
+#, c-format
+msgid ""
+"\n"
+"granularity: each sample hit covers %ld byte(s)"
+msgstr ""
+"\n"
+"kebutiran: setiap kali sampel melitupi %ld byte"
+
+#: cg_print.c:82
+#, c-format
+msgid ""
+" for %.2f%% of %.2f seconds\n"
+"\n"
+msgstr ""
+" untuk %.2f%% dari %.2f saat\n"
+"\n"
+
+#: cg_print.c:86
+#, c-format
+msgid ""
+" no time propagated\n"
+"\n"
+msgstr ""
+" tiada masa terambat\n"
+"\n"
+
+#: cg_print.c:95 cg_print.c:98 cg_print.c:100
+msgid "called"
+msgstr "dipanggil"
+
+#: cg_print.c:95 cg_print.c:100
+msgid "total"
+msgstr "jumlah"
+
+#: cg_print.c:95
+msgid "parents"
+msgstr "induk"
+
+#: cg_print.c:97 cg_print.c:98
+msgid "index"
+msgstr "indeks"
+
+#: cg_print.c:97
+#, c-format
+msgid "%time"
+msgstr "%time"
+
+#: cg_print.c:97 cg_print.c:98
+msgid "self"
+msgstr "sendiri"
+
+#: cg_print.c:97
+msgid "descendants"
+msgstr "keturunan"
+
+#: cg_print.c:98 hist.c:385
+msgid "name"
+msgstr "nama"
+
+#: cg_print.c:100
+msgid "children"
+msgstr "anak"
+
+#: cg_print.c:105
+#, c-format
+msgid "index %% time self children called name\n"
+msgstr "indeks %% masa sendiri anak dipanggil nama\n"
+
+#: cg_print.c:128
+#, c-format
+msgid " <cycle %d as a whole> [%d]\n"
+msgstr " <pusingan %d sepenuhnya> [%d]\n"
+
+#: cg_print.c:354
+#, c-format
+msgid "%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s <spontaneous>\n"
+msgstr "%6.6s %5.5s %7.7s %11.11s %7.7s %7.7s <secara spontan>\n"
+
+#: cg_print.c:355
+#, c-format
+msgid "%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s <spontaneous>\n"
+msgstr "%6.6s %5.5s %7.7s %7.7s %7.7s %7.7s <spontan>\n"
+
+#: cg_print.c:589
+#, c-format
+msgid ""
+"Index by function name\n"
+"\n"
+msgstr ""
+"Indeks dengan nama fungsi\n"
+"\n"
+
+#: cg_print.c:646 cg_print.c:655
+#, c-format
+msgid "<cycle %d>"
+msgstr "<pusingan %d>"
+
+#: corefile.c:64
+#, c-format
+msgid "%s: could not open %s.\n"
+msgstr "%s: tidak dapat membuka %s.\n"
+
+#: corefile.c:78 corefile.c:112
+#, c-format
+msgid "%s: unable to parse mapping file %s.\n"
+msgstr "%s: tidak dapat menghurai fail pemetaan %s.\n"
+
+#: corefile.c:158
+#, c-format
+msgid "%s: %s: not in a.out format\n"
+msgstr "%s: %s: bukan dalam format a.out\n"
+
+#: corefile.c:169
+#, c-format
+msgid "%s: can't find .text section in %s\n"
+msgstr "%s: tidak dapat mencari seksyen .text dalam %s\n"
+
+#: corefile.c:244
+#, c-format
+msgid "%s: ran out room for %lu bytes of text space\n"
+msgstr "%s: tidak cukup ruang untuk %lu byte bagi ruang teks\n"
+
+#: corefile.c:258
+#, c-format
+msgid "%s: can't do -c\n"
+msgstr "%s: tidak dapat melakukan -c\n"
+
+#: corefile.c:292
+#, c-format
+msgid "%s: -c not supported on architecture %s\n"
+msgstr "%s: -c tidak disokong pada rekabentuk %s\n"
+
+#: corefile.c:457
+#, c-format
+msgid "%s: file `%s' has no symbols\n"
+msgstr "%s: fail `%s' tidak mempunyai simbol\n"
+
+#: corefile.c:771
+#, c-format
+msgid "%s: somebody miscounted: ltab.len=%d instead of %ld\n"
+msgstr "%s: seseorang salah mengira: ltab.len=%d berbanding %ld\n"
+
+#: gmon_io.c:83
+#, c-format
+msgid "%s: address size has unexpected value of %u\n"
+msgstr "%s: saiz alamat mempunyai nilai %u tidak dijangka\n"
+
+#: gmon_io.c:320 gmon_io.c:416
+#, c-format
+msgid "%s: file too short to be a gmon file\n"
+msgstr "%s: fail terlalu pendek untuk menjadi fail gmon\n"
+
+#: gmon_io.c:330 gmon_io.c:459
+#, c-format
+msgid "%s: file `%s' has bad magic cookie\n"
+msgstr "%s: fail `%s' mempunyai cecikut magik buruk\n"
+
+#: gmon_io.c:341
+#, c-format
+msgid "%s: file `%s' has unsupported version %d\n"
+msgstr "%s: fail `%s' tidak mempunyai versi disokong %d\n"
+
+#: gmon_io.c:371
+#, c-format
+msgid "%s: %s: found bad tag %d (file corrupted?)\n"
+msgstr "%s: %s: tag buruk %d dijumpai (fail rosak?)\n"
+
+#: gmon_io.c:438
+#, c-format
+msgid "%s: profiling rate incompatible with first gmon file\n"
+msgstr "%s: kadar pemprofilan tidak sepadan dengan fail gmon pertama\n"
+
+#: gmon_io.c:486
+#, c-format
+msgid "%s: incompatible with first gmon file\n"
+msgstr "%s: tidak sepadan dengan fail gmon pertama\n"
+
+#: gmon_io.c:514
+#, c-format
+msgid "%s: file '%s' does not appear to be in gmon.out format\n"
+msgstr "%s: fail '%s' tidak kelihatan seperti dialam format gmon.out\n"
+
+#: gmon_io.c:535
+#, c-format
+msgid "%s: unexpected EOF after reading %d/%d bins\n"
+msgstr "%s: EOF tidak dijangka selepas membaca %d/%d bins\n"
+
+#: gmon_io.c:568
+#, c-format
+msgid "time is in ticks, not seconds\n"
+msgstr "masa dalam tick, bukan saat\n"
+
+#: gmon_io.c:574 gmon_io.c:750
+#, c-format
+msgid "%s: don't know how to deal with file format %d\n"
+msgstr "%s: tidak tahu bagaimana untuk menguruskan format fail %d\n"
+
+#: gmon_io.c:581
+#, c-format
+msgid "File `%s' (version %d) contains:\n"
+msgstr "Fail `%s' (versi %d) mengandungi:\n"
+
+#: gmon_io.c:584
+#, c-format
+msgid "\t%d histogram record\n"
+msgstr "\t%d rekod histogram\n"
+
+#: gmon_io.c:585
+#, c-format
+msgid "\t%d histogram records\n"
+msgstr "\t%d rekod histogram\n"
+
+#: gmon_io.c:587
+#, c-format
+msgid "\t%d call-graph record\n"
+msgstr "\t%d rekod graf panggilan\n"
+
+#: gmon_io.c:588
+#, c-format
+msgid "\t%d call-graph records\n"
+msgstr "\t%d rekod graf panggilan\n"
+
+#: gmon_io.c:590
+#, c-format
+msgid "\t%d basic-block count record\n"
+msgstr "\t%d rekod kiraan blok-asas\n"
+
+#: gmon_io.c:591
+#, c-format
+msgid "\t%d basic-block count records\n"
+msgstr "\t%d rekod kiraan blok-asas\n"
+
+#: gprof.c:158
+#, c-format
+msgid ""
+"Usage: %s [-[abcDhilLsTvwxyz]] [-[ACeEfFJnNOpPqQZ][name]] [-I dirs]\n"
+"\t[-d[num]] [-k from/to] [-m min-count] [-t table-length]\n"
+"\t[--[no-]annotated-source[=name]] [--[no-]exec-counts[=name]]\n"
+"\t[--[no-]flat-profile[=name]] [--[no-]graph[=name]]\n"
+"\t[--[no-]time=name] [--all-lines] [--brief] [--debug[=level]]\n"
+"\t[--function-ordering] [--file-ordering]\n"
+"\t[--directory-path=dirs] [--display-unused-functions]\n"
+"\t[--file-format=name] [--file-info] [--help] [--line] [--min-count=n]\n"
+"\t[--no-static] [--print-path] [--separate-files]\n"
+"\t[--static-call-graph] [--sum] [--table-length=len] [--traditional]\n"
+"\t[--version] [--width=n] [--ignore-non-functions]\n"
+"\t[--demangle[=STYLE]] [--no-demangle]\n"
+"\t[image-file] [profile-file...]\n"
+msgstr ""
+"Penggunaan: %s [-[abcDhilLsTvwxyz]] [-[ACeEfFJnNOpPqQZ][name]] [-I dirs]\n"
+"\t[-d[num]] [-k from/to] [-m min-count] [-t table-length]\n"
+"\t[--[no-]annotated-source[=name]] [--[no-]exec-counts[=name]]\n"
+"\t[--[no-]flat-profile[=name]] [--[no-]graph[=name]]\n"
+"\t[--[no-]time=name] [--all-lines] [--brief] [--debug[=level]]\n"
+"\t[--function-ordering] [--file-ordering]\n"
+"\t[--directory-path=dirs] [--display-unused-functions]\n"
+"\t[--file-format=name] [--file-info] [--help] [--line] [--min-count=n]\n"
+"\t[--no-static] [--print-path] [--separate-files]\n"
+"\t[--static-call-graph] [--sum] [--table-length=len] [--traditional]\n"
+"\t[--version] [--width=n] [--ignore-non-functions]\n"
+"\t[--demangle[=STYLE]] [--no-demangle]\n"
+"\t[image-file] [profile-file...]\n"
+
+#: gprof.c:174
+#, c-format
+msgid "Report bugs to %s\n"
+msgstr "Lapor pepijat ke %s\n"
+
+#: gprof.c:250
+#, c-format
+msgid "%s: debugging not supported; -d ignored\n"
+msgstr "%s: nyahpepijat tidak disokong; -d diabaikan\n"
+
+#: gprof.c:330
+#, c-format
+msgid "%s: unknown file format %s\n"
+msgstr "%s: format fail %s tidak diketahui\n"
+
+#. This output is intended to follow the GNU standards document.
+#: gprof.c:414
+#, c-format
+msgid "GNU gprof %s\n"
+msgstr "GNU gprof %s\n"
+
+#: gprof.c:415
+#, c-format
+msgid "Based on BSD gprof, copyright 1983 Regents of the University of California.\n"
+msgstr "Diasaskan pada BSD gprof, hakcipta 1983 Regents of the University of California.\n"
+
+#: gprof.c:416
+#, c-format
+msgid "This program is free software. This program has absolutely no warranty.\n"
+msgstr "Program ini adalah perisian bebas. Program ini tidak mempunyai sebarang warranti.\n"
+
+#: gprof.c:457
+#, c-format
+msgid "%s: unknown demangling style `%s'\n"
+msgstr "%s: gaya nyahkusut `%s' tidak diketahui\n"
+
+#: gprof.c:477
+#, c-format
+msgid "%s: Only one of --function-ordering and --file-ordering may be specified.\n"
+msgstr "%s: Hanya satu dari --function-ordering dan --file-ordering boleh dinyatakan.\n"
+
+#: gprof.c:527
+#, c-format
+msgid "%s: sorry, file format `prof' is not yet supported\n"
+msgstr "%s: maaf, format format `prof' belum lagi disokong\n"
+
+#: gprof.c:576
+#, c-format
+msgid "%s: gmon.out file is missing histogram\n"
+msgstr "%s: fail gmon.out kehilangan histogram\n"
+
+#: gprof.c:583
+#, c-format
+msgid "%s: gmon.out file is missing call-graph data\n"
+msgstr "%s: fail gmon.out kehilangan data graf-panggilan\n"
+
+#: hist.c:126
+#, c-format
+msgid "%s: `%s' is incompatible with first gmon file\n"
+msgstr "%s: `%s' tidak sepadan dengan fail gmon pertama\n"
+
+#: hist.c:142
+#, c-format
+msgid "%s: %s: unexpected EOF after reading %u of %u samples\n"
+msgstr "%s: %s: EOF tidak dijangka selepas membaca %u dari %u sampel\n"
+
+#: hist.c:355
+#, c-format
+msgid "%c%c/call"
+msgstr "%c%c/panggilan"
+
+#: hist.c:363
+#, c-format
+msgid ""
+" for %.2f%% of %.2f %s\n"
+"\n"
+msgstr ""
+" untuk %.2f%% dari %.2f %s\n"
+"\n"
+
+#: hist.c:369
+#, c-format
+msgid ""
+"\n"
+"Each sample counts as %g %s.\n"
+msgstr ""
+"\n"
+"Setiap sampel kira sebagai %g %s.\n"
+
+#: hist.c:374
+#, c-format
+msgid ""
+" no time accumulated\n"
+"\n"
+msgstr ""
+" tiada masa dikumpulkan\n"
+"\n"
+
+#: hist.c:381
+msgid "cumulative"
+msgstr "kumulatif"
+
+#: hist.c:381
+msgid "self "
+msgstr "sendiri"
+
+#: hist.c:381
+msgid "total "
+msgstr "jumlah"
+
+#: hist.c:384
+msgid "time"
+msgstr "masa"
+
+#: hist.c:384
+msgid "calls"
+msgstr "panggilan"
+
+#: hist.c:473
+#, c-format
+msgid ""
+"\n"
+"\n"
+"\n"
+"flat profile:\n"
+msgstr ""
+"\n"
+"\n"
+"\n"
+"profil mendatar:\n"
+
+#: hist.c:479
+#, c-format
+msgid "Flat profile:\n"
+msgstr "Profil mendatar:\n"
+
+#: mips.c:82
+#, c-format
+msgid "[find_call] 0x%lx: jal"
+msgstr "[find_call] 0x%lx: jal"
+
+#: mips.c:107
+#, c-format
+msgid "[find_call] 0x%lx: jalr\n"
+msgstr "[find_call] 0x%lx: jalr\n"
+
+#: source.c:162
+#, c-format
+msgid "%s: could not locate `%s'\n"
+msgstr "%s: tidak dapat mengesan `%s'\n"
+
+#: source.c:237
+#, c-format
+msgid "*** File %s:\n"
+msgstr "*** Fail %s:\n"
+
+#: utils.c:107
+#, c-format
+msgid " <cycle %d>"
+msgstr " <pusingan %d>"
diff --git a/contrib/binutils/include/ChangeLog b/contrib/binutils/include/ChangeLog
index 0a3787a..275d729 100644
--- a/contrib/binutils/include/ChangeLog
+++ b/contrib/binutils/include/ChangeLog
@@ -1,3 +1,146 @@
+2007-07-03 Nathan Sidwell <nathan@codesourcery.com>
+
+ * opcode/m68k.h: Document j K & E.
+
+2007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+ * dis-asm.h (print_insn_cr16): New prototype.
+
+2007-06-01 Noah Misch <noah@cs.caltech.edu>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * bfdlink.h (struct bfd_link_info): Add input_bfds_tail.
+
+2007-05-07 Nathan Froyd <froydnj@codesourcery.com>
+
+ * libiberty.h (writeargv): Declare.
+
+2007-04-30 Alan Modra <amodra@bigpond.net.au>
+
+ * bfdlink.h (struct bfd_link_info): Add "info" and "minfo".
+
+2007-04-25 Mark Mitchell <mark@codesourcery.com>
+
+ * demangle.h: Change license to LGPL + exception.
+
+2007-04-10 Richard Henderson <rth@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add relax_trip.
+
+2007-03-29 Joel Brobecker <brobecker@adacore.com>
+
+ * filenames.h (FILENAME_CMP): Adjust define to call filename_cmp
+ regardless of the type of file system.
+
+2007-03-06 Jan Hubicka <jh@suse.cz>
+
+ * ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New.
+
+2007-02-21 Nick Clifton <nickc@redhat.com>
+
+ * bfdlink.h (struct bfd_link_callbacks): Add
+ override_segment_assignment field.
+
+2007-02-17 Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com
+ Joseph Myers <joseph@codesourcery.com>
+
+ * bin-bugs.h: Remove.
+
+2007-02-09 Joseph S. Myers <joseph@codesourcery.com>
+
+ * libiberty.h (pex_write_input): Remove prototype.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+
+ * Contribute the following changes:
+ 2001-03-26 Ben Elliston <bje@redhat.com>
+
+ * dis-asm.h (print_insn_mep): Declare.
+
+2007-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * dis-asm.h (print_i386_disassembler_options): New.
+
+2007-01-31 Vladimir Prus <vladimir@codesourcery.com>
+
+ * libiberty.h (PEX_STDERR_TO_PIPE): New define.
+ (PEX_BINARY_ERROR): New define.
+ (pex_read_err): New function.
+
+2007-01-29 Simon Baldwin <simonb@google.com>
+
+ * demangle.h: New cplus_demangle_print_callback,
+ cplus_demangle_v3_callback, and java_demangle_v3_callback function
+ prototypes, and demangle_callbackref type definition.
+
+2007-01-16 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3831
+ * bfdlink.h (bfd_link_info): Rename dynamic to dynamic_list.
+ Add dynamic and dynamic_data.
+
+2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
+ Nick Clifton <nickc@redhat.com>
+
+ * ansidecl.h (ATTRIBUTE_PACKED): Define.
+
+2006-11-30 Andrew Stubbs <andrew.stubbs@st.com>
+ J"orn Rennecke <joern.rennecke@st.com>
+
+ PR driver/29931
+ * libiberty.h (make_relative_prefix_ignore_links): Declare.
+
+2006-11-27 Bob Wilson <bob.wilson@acm.org>
+
+ * xtensa-config.h (XSHAL_ABI): New.
+ (XTHAL_ABI_WINDOWED, XTHAL_ABI_CALL0): New.
+
+2006-11-27 Bob Wilson <bob.wilson@acm.org>
+
+ * xtensa-isa.h (STATIC_LIBISA): Delete.
+
+2006-10-30 Paul Brook <paul@codesourcery.com>
+
+ * dis-asm.h (disassemble_info): Add symtab, symtab_pos and
+ symtab_size.
+
+2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3111
+ * bfdlink.h (bfd_link_info): Add reduce_memory_overheads.
+
+2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * dis-asm.h (print_insn_spu): Declare.
+
+2006-10-17 Mark Shinwell <shinwell@codesourcery.com>
+
+ * elf/arm.h: Define TAG_CPU_ARCH_* constants.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * dis-asm.h: Add prototypes for Score disassembler routines.
+
+2006-09-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * bfdlink.h (bfd_elf_dynamic_list): New.
+ (bfd_link_info): Add a dynamic field.
+
+2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
+
+ * bfdlink.h (struct bfd_link_info): New field: print_gc_sections.
+
+2006-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add emit_hash and
+ emit_gnu_hash bitfields.
+
2006-04-11 Jim Blandy <jimb@codesourcery.com>
* libiberty.h (pex_input_file, pex_input_pipe): New declarations.
@@ -17,6 +160,11 @@
R_BFIN_GOTOFFLO): New relocs.
(EF_BFIN_PIC, EF_BFIN_FDPIC, EF_BFIN_PIC_FLAGS): New macros.
+2006-03-23 Michael Matz <matz@suse.de>
+
+ * elf/x86-64.h: Add the new relocations with their official
+ numbers.
+
2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
Anil Paranjape <anilp1@kpitcummins.com>
Shilin Shakti <shilins@kpitcummins.com>
diff --git a/contrib/binutils/include/ansidecl.h b/contrib/binutils/include/ansidecl.h
index a1a765d..c19955a 100644
--- a/contrib/binutils/include/ansidecl.h
+++ b/contrib/binutils/include/ansidecl.h
@@ -361,6 +361,28 @@ So instead we use the macro below and test it against specific values. */
# endif /* GNUC >= 3.0 */
#endif /* ATTRIBUTE_ALIGNED_ALIGNOF */
+/* Useful for structures whose layout must much some binary specification
+ regardless of the alignment and padding qualities of the compiler. */
+#ifndef ATTRIBUTE_PACKED
+# define ATTRIBUTE_PACKED __attribute__ ((packed))
+#endif
+
+/* Attribute `hot' and `cold' was valid as of gcc 4.3. */
+#ifndef ATTRIBUTE_COLD
+# if (GCC_VERSION >= 4003)
+# define ATTRIBUTE_COLD __attribute__ ((__cold__))
+# else
+# define ATTRIBUTE_COLD
+# endif /* GNUC >= 4.3 */
+#endif /* ATTRIBUTE_COLD */
+#ifndef ATTRIBUTE_HOT
+# if (GCC_VERSION >= 4003)
+# define ATTRIBUTE_HOT __attribute__ ((__hot__))
+# else
+# define ATTRIBUTE_HOT
+# endif /* GNUC >= 4.3 */
+#endif /* ATTRIBUTE_HOT */
+
/* We use __extension__ in some places to suppress -pedantic warnings
about GCC extensions. This feature didn't work properly before
gcc 2.8. */
diff --git a/contrib/binutils/include/bfdlink.h b/contrib/binutils/include/bfdlink.h
index f4b7aa7..a373225 100644
--- a/contrib/binutils/include/bfdlink.h
+++ b/contrib/binutils/include/bfdlink.h
@@ -1,6 +1,6 @@
/* bfdlink.h -- header file for BFD link routines
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -221,6 +221,8 @@ enum report_method
RM_GENERATE_ERROR
};
+struct bfd_elf_dynamic_list;
+
/* This structure holds all the information needed to communicate
between BFD and the linker when doing a link. */
@@ -324,6 +326,27 @@ struct bfd_link_info
/* TRUE if unreferenced sections should be removed. */
unsigned int gc_sections: 1;
+ /* TRUE if user shoudl be informed of removed unreferenced sections. */
+ unsigned int print_gc_sections: 1;
+
+ /* TRUE if .hash section should be created. */
+ unsigned int emit_hash: 1;
+
+ /* TRUE if .gnu.hash section should be created. */
+ unsigned int emit_gnu_hash: 1;
+
+ /* If TRUE reduce memory overheads, at the expense of speed. This will
+ cause map file generation to use an O(N^2) algorithm and disable
+ caching ELF symbol buffer. */
+ unsigned int reduce_memory_overheads: 1;
+
+ /* TRUE if all data symbols should be dynamic. */
+ unsigned int dynamic_data: 1;
+
+ /* TRUE if some symbols have to be dynamic, controlled by
+ --dynamic-list command line options. */
+ unsigned int dynamic: 1;
+
/* What to do with unresolved symbols in an object file.
When producing executables the default is GENERATE_ERROR.
When producing shared libraries the default is IGNORE. The
@@ -372,6 +395,7 @@ struct bfd_link_info
/* The list of input BFD's involved in the link. These are chained
together via the link_next field. */
bfd *input_bfds;
+ bfd **input_bfds_tail;
/* If a symbol should be created for each input BFD, this is section
where those symbols should be placed. It must be a section in
@@ -401,6 +425,11 @@ struct bfd_link_info
current pass, starting from 0. */
int relax_pass;
+ /* Number of relaxation trips. This number is incremented every
+ time the relaxation pass is restarted due to a previous
+ relaxation returning true in *AGAIN. */
+ int relax_trip;
+
/* Non-zero if auto-import thunks for DATA items in pei386 DLLs
should be generated/linked against. Set to 1 if this feature
is explicitly requested by the user, -1 if enabled by default. */
@@ -422,10 +451,13 @@ struct bfd_link_info
/* Start and end of RELRO region. */
bfd_vma relro_start, relro_end;
+
+ /* List of symbols should be dynamic. */
+ struct bfd_elf_dynamic_list *dynamic_list;
};
-/* This structures holds a set of callback functions. These are
- called by the BFD linker routines. Except for einfo, the first
+/* This structures holds a set of callback functions. These are called
+ by the BFD linker routines. Except for the info functions, the first
argument to each callback function is the bfd_link_info structure
being used and each function returns a boolean value. If the
function returns FALSE, then the BFD function which called it should
@@ -537,9 +569,22 @@ struct bfd_link_callbacks
bfd_boolean (*notice)
(struct bfd_link_info *, const char *name,
bfd *abfd, asection *section, bfd_vma address);
- /* General link info message. */
+ /* Error or warning link info message. */
void (*einfo)
(const char *fmt, ...);
+ /* General link info message. */
+ void (*info)
+ (const char *fmt, ...);
+ /* Message to be printed in linker map file. */
+ void (*minfo)
+ (const char *fmt, ...);
+ /* This callback provides a chance for users of the BFD library to
+ override its decision about whether to place two adjacent sections
+ into the same segment. */
+ bfd_boolean (*override_segment_assignment)
+ (struct bfd_link_info *, bfd * abfd,
+ asection * current_section, asection * previous_section,
+ bfd_boolean new_segment);
};
/* The linker builds link_order structures which tell the code how to
@@ -715,4 +760,12 @@ struct bfd_elf_version_tree
struct bfd_elf_version_expr *prev, const char *sym);
};
+struct bfd_elf_dynamic_list
+{
+ struct bfd_elf_version_expr_head head;
+ struct bfd_elf_version_expr *(*match)
+ (struct bfd_elf_version_expr_head *head,
+ struct bfd_elf_version_expr *prev, const char *sym);
+};
+
#endif
diff --git a/contrib/binutils/include/bin-bugs.h b/contrib/binutils/include/bin-bugs.h
deleted file mode 100644
index 63901b0..0000000
--- a/contrib/binutils/include/bin-bugs.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#ifndef REPORT_BUGS_TO
-#define REPORT_BUGS_TO "<URL:http://www.sourceware.org/bugzilla/>"
-#endif
diff --git a/contrib/binutils/include/coff/ChangeLog b/contrib/binutils/include/coff/ChangeLog
index f41c115..3fa22bf 100644
--- a/contrib/binutils/include/coff/ChangeLog
+++ b/contrib/binutils/include/coff/ChangeLog
@@ -1,3 +1,41 @@
+2007-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ * rs6000.h: Write Mimi's name in ASCII.
+
+2007-03-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ * internal.h (internal_extra_pe_aouthdr): Add Magic,
+ MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
+ SizeOfInitializedData, SizeOfUninitializedData,
+ AddressOfEntryPoint, BaseOfCode and BaseOfData.
+
+2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
+ Nick Clifton <nickc@redhat.com>
+
+ * external.h (struct external_aouthdr): Add ATTRIBUTE_PACKED.
+ (struct external_syment): Likewise.
+ (union external_auxent): Likewise.
+
+2006-11-14 Phil Lello <phil.lello@homecall.co.uk>
+
+ * pe.h: Added defines for IMAGE_SUBSYSTEM_EFI_ROM and
+ IMAGE_SUBSYSTEM_XBOX.
+ * internal.h: Added defines for PE directory entry types.
+ NB: in internal.h because IMAGE_NUMBEROF_DIRECTORY_ENTRYIES is in
+ pe.h
+
+2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
+
+ * external.h: Add proper external_aouthdr64 structure (without
+ data_start member).
+ (AOUTHDRSZ64): Set according structure size.
+ (AOUTHDR64): As typedef of external_aouthdr64 structure.
+ * internal.h: Add relocation identifiers for coff.
+ * pe.h: Add define IMAGE_FILE_MACHINE_AMD64 the coff signature.
+ (PEPAOUTHDR): Adjust structure to have proper size (using AOUTHDR64).
+ (PEPAOUTSZ): Calculated size of 240.
+ * x86_64.h: Coff information for x86_64 (AMD64).
+
2006-02-05 Arnold Metselaar <arnold.metselaar@planet.nl>
* internal.h: Add relocation number R_IMM24 for Z80.
diff --git a/contrib/binutils/include/coff/external.h b/contrib/binutils/include/coff/external.h
index 9e760bd..8dabc8a 100644
--- a/contrib/binutils/include/coff/external.h
+++ b/contrib/binutils/include/coff/external.h
@@ -1,6 +1,6 @@
/* external.h -- External COFF structures
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2006 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
@@ -50,12 +50,26 @@ typedef struct external_aouthdr
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 */
- }
+ } ATTRIBUTE_PACKED
AOUTHDR;
#define AOUTHDRSZ 28
#define AOUTSZ 28
-#endif
+
+typedef struct external_aouthdr64
+{
+ 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. */
+}
+AOUTHDR64;
+#define AOUTHDRSZ64 24
+
+#endif /* not DO_NOT_DEFINE_AOUTHDR */
#ifndef DO_NOT_DEFINE_SCNHDR
/********************** SECTION HEADER **********************/
@@ -150,7 +164,7 @@ struct external_syment
char e_type[2];
char e_sclass[1];
char e_numaux[1];
-};
+} ATTRIBUTE_PACKED ;
#define SYMENT struct external_syment
#define SYMESZ 18
@@ -242,7 +256,7 @@ union external_auxent
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)) */
-};
+} ATTRIBUTE_PACKED ;
#define AUXENT union external_auxent
#define AUXESZ 18
diff --git a/contrib/binutils/include/coff/pe.h b/contrib/binutils/include/coff/pe.h
index 643cea4..277621c 100644
--- a/contrib/binutils/include/coff/pe.h
+++ b/contrib/binutils/include/coff/pe.h
@@ -1,6 +1,6 @@
/* pe.h - PE COFF header information
- Copyright 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -119,6 +119,7 @@
#define IMAGE_FILE_MACHINE_THUMB 0x01c2
#define IMAGE_FILE_MACHINE_TRICORE 0x0520
#define IMAGE_FILE_MACHINE_WCEMIPSV2 0x0169
+#define IMAGE_FILE_MACHINE_AMD64 0x8664
#define IMAGE_SUBSYSTEM_UNKNOWN 0
#define IMAGE_SUBSYSTEM_NATIVE 1
@@ -129,6 +130,8 @@
#define IMAGE_SUBSYSTEM_EFI_APPLICATION 10
#define IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
#define IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
+#define IMAGE_SUBSYSTEM_EFI_ROM 13
+#define IMAGE_SUBSYSTEM_XBOX 14
/* Magic values that are true for all dos/nt implementations. */
#define DOSMAGIC 0x5a4d
@@ -259,6 +262,7 @@ typedef struct
/* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */
} PEAOUTHDR;
+
#undef AOUTSZ
#define AOUTSZ (AOUTHDRSZ + 196)
@@ -267,8 +271,11 @@ typedef struct
of just 4 bytes long. */
typedef struct
{
+#ifdef AOUTHDRSZ64
+ AOUTHDR64 standard;
+#else
AOUTHDR standard;
-
+#endif
/* NT extra fields; see internal.h for descriptions. */
char ImageBase[8];
char SectionAlignment[4];
@@ -294,7 +301,12 @@ typedef struct
/* IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]; */
char DataDirectory[16][2][4]; /* 16 entries, 2 elements/entry, 4 chars. */
} PEPAOUTHDR;
+
+#ifdef AOUTHDRSZ64
+#define PEPAOUTSZ (AOUTHDRSZ64 + 196 + 5 * 4) /* = 240 */
+#else
#define PEPAOUTSZ 240
+#endif
#undef E_FILNMLEN
#define E_FILNMLEN 18 /* # characters in a file name. */
diff --git a/contrib/binutils/include/coff/rs6000.h b/contrib/binutils/include/coff/rs6000.h
index 5323662..a4e6eb5 100644
--- a/contrib/binutils/include/coff/rs6000.h
+++ b/contrib/binutils/include/coff/rs6000.h
@@ -1,10 +1,6 @@
/* IBM RS/6000 "XCOFF" file definitions for BFD.
Copyright (C) 1990, 1991, 2001 Free Software Foundation, Inc.
- FIXME: Can someone provide a transliteration of this name into ASCII?
- Using the following chars caused a compiler warning on HIUX (so I replaced
- them with octal escapes), and isn't useful without an understanding of what
- character set it is.
- Written by Mimi Ph\373\364ng-Th\345o V\365 of IBM
+ Written by Mimi Phuong-Thao Vo of IBM
and John Gilmore of Cygnus Support. */
/********************** FILE HEADER **********************/
diff --git a/contrib/binutils/include/demangle.h b/contrib/binutils/include/demangle.h
index af29467..49f23e5 100644
--- a/contrib/binutils/include/demangle.h
+++ b/contrib/binutils/include/demangle.h
@@ -1,21 +1,30 @@
/* Defs for interface to demanglers.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002,
- 2003, 2004 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street - Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ This program 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, or
+ (at your option) any later version.
+
+ In addition to the permissions in the GNU Library General Public
+ License, the Free Software Foundation gives you unlimited
+ permission to link the compiled version of this file into
+ combinations with other programs, and to distribute those
+ combinations without any restriction coming from the use of this
+ file. (The Library Public License restrictions do apply in other
+ respects; for example, they cover modification of the file, and
+ distribution when not linked into a combined executable.)
+
+ 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#if !defined (DEMANGLE_H)
@@ -131,13 +140,25 @@ cplus_demangle_set_style (enum demangling_styles style);
extern enum demangling_styles
cplus_demangle_name_to_style (const char *name);
-/* V3 ABI demangling entry points, defined in cp-demangle.c. */
-extern char*
-cplus_demangle_v3 (const char* mangled, int options);
+/* Callback typedef for allocation-less demangler interfaces. */
+typedef void (*demangle_callbackref) (const char *, size_t, void *);
+
+/* V3 ABI demangling entry points, defined in cp-demangle.c. Callback
+ variants return non-zero on success, zero on error. char* variants
+ return a string allocated by malloc on success, NULL on error. */
+extern int
+cplus_demangle_v3_callback (const char *mangled, int options,
+ demangle_callbackref callback, void *opaque);
extern char*
-java_demangle_v3 (const char* mangled);
+cplus_demangle_v3 (const char *mangled, int options);
+extern int
+java_demangle_v3_callback (const char *mangled,
+ demangle_callbackref callback, void *opaque);
+
+extern char*
+java_demangle_v3 (const char *mangled);
enum gnu_v3_ctor_kinds {
gnu_v3_complete_object_ctor = 1,
@@ -529,6 +550,25 @@ cplus_demangle_print (int options,
int estimated_length,
size_t *p_allocated_size);
+/* This function takes a struct demangle_component tree and passes back
+ a demangled string in one or more calls to a callback function.
+ The first argument is DMGL_* options. The second is the tree to
+ demangle. The third is a pointer to a callback function; on each call
+ this receives an element of the demangled string, its length, and an
+ opaque value. The fourth is the opaque value passed to the callback.
+ The callback is called once or more to return the full demangled
+ string. The demangled element string is always nul-terminated, though
+ its length is also provided for convenience. In contrast to
+ cplus_demangle_print(), this function does not allocate heap memory
+ to grow output strings (except perhaps where alloca() is implemented
+ by malloc()), and so is normally safe for use where the heap has been
+ corrupted. On success, this function returns 1; on failure, 0. */
+
+extern int
+cplus_demangle_print_callback (int options,
+ const struct demangle_component *tree,
+ demangle_callbackref callback, void *opaque);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/contrib/binutils/include/dis-asm.h b/contrib/binutils/include/dis-asm.h
index bdbf9f8..40afe17 100644
--- a/contrib/binutils/include/dis-asm.h
+++ b/contrib/binutils/include/dis-asm.h
@@ -1,6 +1,6 @@
/* Interface between the opcode library and its callers.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -35,9 +35,10 @@ extern "C" {
#include <stdio.h>
#include "bfd.h"
-typedef int (*fprintf_ftype) (void *, const char*, ...) ATTRIBUTE_FPTR_PRINTF_2;
+ typedef int (*fprintf_ftype) (void *, const char*, ...) /*ATTRIBUTE_FPTR_PRINTF_2*/;
-enum dis_insn_type {
+enum dis_insn_type
+{
dis_noninsn, /* Not a valid instruction */
dis_nonbranch, /* Not a branch instruction */
dis_branch, /* Unconditional branch */
@@ -58,7 +59,8 @@ enum dis_insn_type {
It must be initialized before it is first passed; this can be done
by hand, or using one of the initialization macros below. */
-typedef struct disassemble_info {
+typedef struct disassemble_info
+{
fprintf_ftype fprintf_func;
void *stream;
void *application_data;
@@ -94,6 +96,12 @@ typedef struct disassemble_info {
/* Number of symbols in array. */
int num_symbols;
+ /* Symbol table provided for targets that want to look at it. This is
+ used on Arm to find mapping symbols and determine Arm/Thumb code. */
+ asymbol **symtab;
+ int symtab_pos;
+ int symtab_size;
+
/* For use by the disassembler.
The top 16 bits are reserved for public use (and are documented here).
The bottom 16 bits are for the internal use of the disassembler. */
@@ -201,59 +209,66 @@ typedef struct disassemble_info {
target address. Return number of octets processed. */
typedef int (*disassembler_ftype) (bfd_vma, disassemble_info *);
-extern int print_insn_big_mips (bfd_vma, disassemble_info *);
-extern int print_insn_little_mips (bfd_vma, disassemble_info *);
-extern int print_insn_i386 (bfd_vma, disassemble_info *);
-extern int print_insn_i386_att (bfd_vma, disassemble_info *);
-extern int print_insn_i386_intel (bfd_vma, disassemble_info *);
-extern int print_insn_ia64 (bfd_vma, disassemble_info *);
-extern int print_insn_i370 (bfd_vma, disassemble_info *);
-extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
-extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
-extern int print_insn_m68k (bfd_vma, disassemble_info *);
-extern int print_insn_z80 (bfd_vma, disassemble_info *);
-extern int print_insn_z8001 (bfd_vma, disassemble_info *);
-extern int print_insn_z8002 (bfd_vma, disassemble_info *);
-extern int print_insn_h8300 (bfd_vma, disassemble_info *);
-extern int print_insn_h8300h (bfd_vma, disassemble_info *);
-extern int print_insn_h8300s (bfd_vma, disassemble_info *);
-extern int print_insn_h8500 (bfd_vma, disassemble_info *);
extern int print_insn_alpha (bfd_vma, disassemble_info *);
-extern int print_insn_big_arm (bfd_vma, disassemble_info *);
-extern int print_insn_little_arm (bfd_vma, disassemble_info *);
-extern int print_insn_sparc (bfd_vma, disassemble_info *);
extern int print_insn_avr (bfd_vma, disassemble_info *);
extern int print_insn_bfin (bfd_vma, disassemble_info *);
+extern int print_insn_big_arm (bfd_vma, disassemble_info *);
+extern int print_insn_big_mips (bfd_vma, disassemble_info *);
+extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
+extern int print_insn_big_powerpc (bfd_vma, disassemble_info *);
+extern int print_insn_big_score (bfd_vma, disassemble_info *);
+extern int print_insn_cr16 (bfd_vma, disassemble_info *);
+extern int print_insn_crx (bfd_vma, disassemble_info *);
extern int print_insn_d10v (bfd_vma, disassemble_info *);
extern int print_insn_d30v (bfd_vma, disassemble_info *);
extern int print_insn_dlx (bfd_vma, disassemble_info *);
extern int print_insn_fr30 (bfd_vma, disassemble_info *);
+extern int print_insn_frv (bfd_vma, disassemble_info *);
+extern int print_insn_h8300 (bfd_vma, disassemble_info *);
+extern int print_insn_h8300h (bfd_vma, disassemble_info *);
+extern int print_insn_h8300s (bfd_vma, disassemble_info *);
+extern int print_insn_h8500 (bfd_vma, disassemble_info *);
extern int print_insn_hppa (bfd_vma, disassemble_info *);
+extern int print_insn_i370 (bfd_vma, disassemble_info *);
+extern int print_insn_i386 (bfd_vma, disassemble_info *);
+extern int print_insn_i386_att (bfd_vma, disassemble_info *);
+extern int print_insn_i386_intel (bfd_vma, disassemble_info *);
extern int print_insn_i860 (bfd_vma, disassemble_info *);
extern int print_insn_i960 (bfd_vma, disassemble_info *);
+extern int print_insn_ia64 (bfd_vma, disassemble_info *);
extern int print_insn_ip2k (bfd_vma, disassemble_info *);
+extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
+extern int print_insn_little_arm (bfd_vma, disassemble_info *);
+extern int print_insn_little_mips (bfd_vma, disassemble_info *);
+extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
+extern int print_insn_little_powerpc (bfd_vma, disassemble_info *);
+extern int print_insn_little_score (bfd_vma, disassemble_info *);
+extern int print_insn_m32c (bfd_vma, disassemble_info *);
extern int print_insn_m32r (bfd_vma, disassemble_info *);
+extern int print_insn_m68hc11 (bfd_vma, disassemble_info *);
+extern int print_insn_m68hc12 (bfd_vma, disassemble_info *);
+extern int print_insn_m68k (bfd_vma, disassemble_info *);
extern int print_insn_m88k (bfd_vma, disassemble_info *);
-extern int print_insn_maxq_little (bfd_vma, disassemble_info *);
extern int print_insn_maxq_big (bfd_vma, disassemble_info *);
+extern int print_insn_maxq_little (bfd_vma, disassemble_info *);
extern int print_insn_mcore (bfd_vma, disassemble_info *);
+extern int print_insn_mep (bfd_vma, disassemble_info *);
extern int print_insn_mmix (bfd_vma, disassemble_info *);
extern int print_insn_mn10200 (bfd_vma, disassemble_info *);
extern int print_insn_mn10300 (bfd_vma, disassemble_info *);
-extern int print_insn_mt (bfd_vma, disassemble_info *);
extern int print_insn_msp430 (bfd_vma, disassemble_info *);
+extern int print_insn_mt (bfd_vma, disassemble_info *);
extern int print_insn_ns32k (bfd_vma, disassemble_info *);
-extern int print_insn_crx (bfd_vma, disassemble_info *);
extern int print_insn_openrisc (bfd_vma, disassemble_info *);
-extern int print_insn_big_or32 (bfd_vma, disassemble_info *);
-extern int print_insn_little_or32 (bfd_vma, disassemble_info *);
extern int print_insn_pdp11 (bfd_vma, disassemble_info *);
extern int print_insn_pj (bfd_vma, disassemble_info *);
-extern int print_insn_big_powerpc (bfd_vma, disassemble_info *);
-extern int print_insn_little_powerpc (bfd_vma, disassemble_info *);
extern int print_insn_rs6000 (bfd_vma, disassemble_info *);
extern int print_insn_s390 (bfd_vma, disassemble_info *);
extern int print_insn_sh (bfd_vma, disassemble_info *);
+extern int print_insn_sh64 (bfd_vma, disassemble_info *);
+extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
+extern int print_insn_sparc (bfd_vma, disassemble_info *);
+extern int print_insn_spu (bfd_vma, disassemble_info *);
extern int print_insn_tic30 (bfd_vma, disassemble_info *);
extern int print_insn_tic4x (bfd_vma, disassemble_info *);
extern int print_insn_tic54x (bfd_vma, disassemble_info *);
@@ -261,25 +276,24 @@ extern int print_insn_tic80 (bfd_vma, disassemble_info *);
extern int print_insn_v850 (bfd_vma, disassemble_info *);
extern int print_insn_vax (bfd_vma, disassemble_info *);
extern int print_insn_w65 (bfd_vma, disassemble_info *);
+extern int print_insn_xc16x (bfd_vma, disassemble_info *);
extern int print_insn_xstormy16 (bfd_vma, disassemble_info *);
extern int print_insn_xtensa (bfd_vma, disassemble_info *);
-extern int print_insn_sh64 (bfd_vma, disassemble_info *);
-extern int print_insn_sh64x_media (bfd_vma, disassemble_info *);
-extern int print_insn_frv (bfd_vma, disassemble_info *);
-extern int print_insn_iq2000 (bfd_vma, disassemble_info *);
-extern int print_insn_xc16x (bfd_vma, disassemble_info *);
-extern int print_insn_m32c (bfd_vma, disassemble_info *);
+extern int print_insn_z80 (bfd_vma, disassemble_info *);
+extern int print_insn_z8001 (bfd_vma, disassemble_info *);
+extern int print_insn_z8002 (bfd_vma, disassemble_info *);
extern disassembler_ftype arc_get_disassembler (void *);
extern disassembler_ftype cris_get_disassembler (bfd *);
+extern void print_i386_disassembler_options (FILE *);
extern void print_mips_disassembler_options (FILE *);
extern void print_ppc_disassembler_options (FILE *);
extern void print_arm_disassembler_options (FILE *);
extern void parse_arm_disassembler_option (char *);
-extern int get_arm_regname_num_options (void);
-extern int set_arm_regname_option (int);
-extern int get_arm_regnames (int, const char **, const char **, const char *const **);
+extern int get_arm_regname_num_options (void);
+extern int set_arm_regname_option (int);
+extern int get_arm_regnames (int, const char **, const char **, const char *const **);
extern bfd_boolean arm_symbol_is_valid (asymbol *, struct disassemble_info *);
/* Fetch the disassembler for a given BFD, if that support is available. */
diff --git a/contrib/binutils/include/elf/ChangeLog b/contrib/binutils/include/elf/ChangeLog
index 48ce81c..ba08331 100644
--- a/contrib/binutils/include/elf/ChangeLog
+++ b/contrib/binutils/include/elf/ChangeLog
@@ -1,3 +1,169 @@
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * ppc.h (Tag_GNU_Power_ABI_FP): Define.
+
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * mips.h (Tag_GNU_MIPS_ABI_FP): Define.
+
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
+
+ * arm.h (elf32_arm_add_eabi_attr_int,
+ elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
+ elf32_arm_get_eabi_attr_int, elf32_arm_set_eabi_attr_contents,
+ elf32_arm_eabi_attr_size, Tag_NULL, Tag_File, Tag_Section,
+ Tag_Symbol, Tag_compatibility): Remove.
+ * common.h (SHT_GNU_ATTRIBUTES): Define.
+
+2007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+ * common.h (EM_CR16): New entry for CR16 cpu.
+ * cr16.h: New file.
+
+2007-06-11 Sterling Augustine <sterling@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
+
+ * xtensa.h (XTENSA_PROP_INSN_NO_TRANSFORM): Renamed to...
+ (XTENSA_PROP_NO_TRANSFORM): ...this.
+
+2007-05-18 Caroline Tice <ctice@apple.com>
+
+ * dwarf2.h: (enum dwarf_location_atom): Add new DW_OP,
+ DW_OP_GNU_uninit.
+
+2007-05-12 Alan Modra <amodra@bigpond.net.au>
+
+ * spu.h (R_SPU_ADDR16X): Define.
+ (R_SPU_PPU32, R_SPU_PPU64): Renumber.
+
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
+
+ * spu.h (R_SPU_PPU32, R_SPU_PPU64): Define.
+
+2007-05-02 Alan Modra <amodra@bigpond.net.au>
+
+ * internal.h (ELF_IS_SECTION_IN_SEGMENT): Check both file offset
+ and vma for appropriate sections.
+
+2007-04-26 Jan Beulich <jbeulich@novell.com>
+
+ * common.h (DT_ENCODING): Correct value (back to spec mandated
+ value).
+
+2007-03-08 Alan Modra <amodra@bigpond.net.au>
+
+ * v850.h (V850_OTHER_TDA_BYTE): Delete.
+ (V850_OTHER_SDA, V850_OTHER_ZDA, V850_OTHER_TDA): Assign bits
+ that don't clash with visibility bits.
+
+2007-03-07 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (ELF_ST_VISIBILITY): Comment typo fix.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
+ Richard Henderson <rth@redhat.com>
+ DJ Delorie <dj@redhat.com>
+ Ben Elliston <bje@redhat.com>
+
+ * mep.h: New file.
+ * common.h (EM_CYGNUS_MEP): Define.
+
+2007-02-15 Dave Brolley <brolley@redhat.com>
+
+ From Graydon Hoare <graydon@redhat.com>:
+ * common.h (STT_RELC, STT_SRELC, R_RELC): New macros.
+
+2007-01-08 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k.h (EF_M68K_FIDO): New.
+ (EF_M68K_ARCH_MASK): OR EF_M68K_FIDO.
+ (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): Remove.
+
+2006-12-25 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k.h (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): New.
+
+2006-12-19 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k.h (EF_M68K_ARCH_MASK): New.
+
+2006-12-19 Nathan Sidwell <nathan@codesourcery.com>
+
+ * internal.h (struct elf_segment_map): Add p_vaddr_offset field.
+
+2006-12-07 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k.h (EF_M68K_ISA_MASK, EF_M68K_ISA_A_NODIV,
+ EF_M68K_ISA_A, EF_M68K_ISA_A_PLUS, EF_M68K_ISA_B_NOUSP,
+ EF_M68K_ISA_B, EF_M68K_ISA_C, EF_M68K_MAC_MASK, EF_M68K_MAC,
+ EF_M68K_EMAC, EF_M68K_EMAC_B, EF_M68K_FLOAT): Rename to
+ EF_M68K_CF_ISA_MASK, EF_M68K_CF_ISA_A_NODIV, EF_M68K_CF_ISA_A,
+ EF_M68K_CF_ISA_A_PLUS, EF_M68K_CF_ISA_B_NOUSP,
+ EF_M68K_CF_ISA_B, EF_M68K_CF_ISA_C, EF_M68K_CF_MAC_MASK,
+ EF_M68K_CF_MAC, EF_M68K_CF_EMAC, EF_M68K_CF_EMAC_B,
+ EF_M68K_CF_FLOAT, respectively.
+
+2006-12-05 Michael Tautschnig <tautschn@model.in.tum.de>
+ Nick Clifton <nickc@redhat.com>
+
+ * external.h (struct Elf_External_Versym): Use ATTRIBUTE_PACKED.
+
+2006-10-28 Richard Sandiford <richard@codesourcery.com>
+
+ * mips.h (R_MIPS_GLOB_DAT): Define
+ (R_MIPS_max): Bump by 1.
+
+2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (EM_SPU): Define.
+ * spu.h: New file.
+
+2006-10-19 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * score.h (EF_SCORE_PIC): Redefine EF_SCORE_PIC as 0x80000000.
+ (EF_SCORE_FIXDEP): Redefine EF_SCORE_FIXDEP as 0x40000000.
+ (EF_SCORE_HASENTRY): Delete.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * score.h: New file.
+ * common.h: Add Score machine number.
+
+2006-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ * common.h (SHT_GNU_HASH, DT_GNU_HASH): Define.
+
+2006-05-31 H.J. Lu <hongjiu.lu@intel.com>
+
+ * internal.h (ELF_SECTION_SIZE): New.
+ (ELF_IS_SECTION_IN_SEGMENT): Likewise.
+ (ELF_IS_SECTION_IN_SEGMENT_FILE): Updated.
+ (ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
+
+2006-05-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * internal.h (struct elf_segment_map): Add p_align and p_align_valid.
+
+2006-05-24 Carlos O'Donell <carlos@systemhalted.org>
+ Randolph Chung <randolph@tausq.org>
+ * hppa.h (R_PARISC_TLS_GD21L, R_PARISC_TLS_GD14R, R_PARISC_TLS_GDCALL,
+ R_PARISC_TLS_LDM21L, R_PARISC_TLS_LDM14R, R_PARISC_TLS_LDMCALL,
+ R_PARISC_TLS_LDO21L, R_PARISC_TLS_LDO14R, R_PARISC_TLS_DTPMOD32,
+ R_PARISC_TLS_DTPMOD64, R_PARISC_TLS_DTPOFF32, R_PARISC_TLS_DTPOFF64):
+ New TLS relocs.
+ (R_PARISC_TLS_LE21L, R_PARISC_TLS_LE14R, R_PARISC_TLS_IE21L,
+ R_PARISC_TLS_IE14R, R_PARISC_TLS_TPREL32, R_PARISC_TLS_TPREL64):
+ Define TLS relocs using existing equivalents.
+
+2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * avr.h: Add E_AVR_MACH_AVR6, R_AVR_LO8_LDI_GS and R_AVR_HI8_LDI_GS.
+
2006-03-22 Richard Sandiford <richard@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
diff --git a/contrib/binutils/include/elf/arm.h b/contrib/binutils/include/elf/arm.h
index 8311c13..e701883 100644
--- a/contrib/binutils/include/elf/arm.h
+++ b/contrib/binutils/include/elf/arm.h
@@ -84,6 +84,19 @@
#define PF_ARM_PI 0x20000000 /* Segment is position-independent. */
#define PF_ARM_ABS 0x40000000 /* Segment must be loaded at its base address. */
+/* Values for the Tag_CPU_arch EABI attribute. */
+#define TAG_CPU_ARCH_PRE_V4 0
+#define TAG_CPU_ARCH_V4 1
+#define TAG_CPU_ARCH_V4T 2
+#define TAG_CPU_ARCH_V5T 3
+#define TAG_CPU_ARCH_V5TE 4
+#define TAG_CPU_ARCH_V5TEJ 5
+#define TAG_CPU_ARCH_V6 6
+#define TAG_CPU_ARCH_V6KZ 7
+#define TAG_CPU_ARCH_V6T2 8
+#define TAG_CPU_ARCH_V6K 9
+#define TAG_CPU_ARCH_V7 10
+
/* Relocation types. */
START_RELOC_NUMBERS (elf_arm_reloc_type)
@@ -169,9 +182,9 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
RELOC_NUMBER (R_ARM_LDRS_SB_G0, 78)
RELOC_NUMBER (R_ARM_LDRS_SB_G1, 79)
RELOC_NUMBER (R_ARM_LDRS_SB_G2, 80)
- RELOC_NUMBER (R_ARM_LDC_G0, 81)
- RELOC_NUMBER (R_ARM_LDC_G1, 82)
- RELOC_NUMBER (R_ARM_LDC_G2, 83)
+ RELOC_NUMBER (R_ARM_LDC_SB_G0, 81)
+ RELOC_NUMBER (R_ARM_LDC_SB_G1, 82)
+ RELOC_NUMBER (R_ARM_LDC_SB_G2, 83)
RELOC_NUMBER (R_ARM_MOVW_BREL_NC, 84)
RELOC_NUMBER (R_ARM_MOVT_BREL, 85)
RELOC_NUMBER (R_ARM_MOVW_BREL, 86)
@@ -221,26 +234,15 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
FAKE_RELOC (R_ARM_GOT32, R_ARM_GOT_BREL) /* 32 bit GOT entry. */
FAKE_RELOC (R_ARM_ROSEGREL32, R_ARM_SBREL31) /* ??? */
FAKE_RELOC (R_ARM_AMP_VCALL9, R_ARM_BREL_ADJ) /* Thumb-something. Not used. */
- FAKE_RELOC (R_ARM_PC13, R_ARM_LDR_PC_G0) /* Unclear whether meaning is different. */
END_RELOC_NUMBERS (R_ARM_max)
#ifdef BFD_ARCH_SIZE
-/* Routines for manipulating EABI object attributes. */
-void elf32_arm_add_eabi_attr_int (bfd *, int, unsigned int);
-void elf32_arm_add_eabi_attr_string (bfd *, int, const char *);
-void elf32_arm_add_eabi_attr_compat (bfd *, unsigned int, const char *);
-int elf32_arm_get_eabi_attr_int (bfd *, int);
-
-void elf32_arm_set_eabi_attr_contents (bfd *, bfd_byte *, bfd_vma);
-bfd_vma elf32_arm_eabi_attr_size (bfd *);
+/* EABI object attributes. */
enum
{
- Tag_NULL,
- Tag_File,
- Tag_Section,
- Tag_Symbol,
- Tag_CPU_raw_name,
+ /* 0-3 are generic. */
+ Tag_CPU_raw_name = 4,
Tag_CPU_name,
Tag_CPU_arch,
Tag_CPU_arch_profile,
@@ -268,7 +270,7 @@ enum
Tag_ABI_WMMX_args,
Tag_ABI_optimization_goals,
Tag_ABI_FP_optimization_goals,
- Tag_compatibility,
+ /* 32 is generic. */
};
#endif
diff --git a/contrib/binutils/include/elf/avr.h b/contrib/binutils/include/elf/avr.h
index f160438..d2ffbe0 100644
--- a/contrib/binutils/include/elf/avr.h
+++ b/contrib/binutils/include/elf/avr.h
@@ -1,5 +1,5 @@
/* AVR ELF support for BFD.
- Copyright 1999, 2000, 2004 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2004, 2006 Free Software Foundation, Inc.
Contributed by Denis Chertykov <denisc@overta.ru>
This file is part of BFD, the Binary File Descriptor library.
@@ -35,6 +35,7 @@
#define E_AVR_MACH_AVR3 3
#define E_AVR_MACH_AVR4 4
#define E_AVR_MACH_AVR5 5
+#define E_AVR_MACH_AVR6 6
/* Relocations. */
START_RELOC_NUMBERS (elf_avr_reloc_type)
@@ -62,6 +63,8 @@ START_RELOC_NUMBERS (elf_avr_reloc_type)
RELOC_NUMBER (R_AVR_6_ADIW, 21)
RELOC_NUMBER (R_AVR_MS8_LDI, 22)
RELOC_NUMBER (R_AVR_MS8_LDI_NEG, 23)
+ RELOC_NUMBER (R_AVR_LO8_LDI_GS, 24)
+ RELOC_NUMBER (R_AVR_HI8_LDI_GS, 25)
END_RELOC_NUMBERS (R_AVR_max)
#endif /* _ELF_AVR_H */
diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h
index b11171b..2eb6853 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, 2002, 2003, 2004, 2005, 2006
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -118,6 +118,7 @@
#define EM_PPC 20 /* PowerPC */
#define EM_PPC64 21 /* 64-bit PowerPC */
#define EM_S390 22 /* IBM S/390 */
+#define EM_SPU 23 /* Sony/Toshiba/IBM SPU */
#define EM_V800 36 /* NEC V800 series */
#define EM_FR20 37 /* Fujitsu FR20 */
@@ -185,6 +186,8 @@
#define EM_BLACKFIN 106 /* ADI Blackfin */
#define EM_ALTERA_NIOS2 113 /* Altera Nios II soft-core processor */
#define EM_CRX 114 /* National Semiconductor CRX */
+#define EM_CR16 115 /* National Semiconductor CompactRISC - CR16 */
+#define EM_SCORE 135 /* Sunplus Score */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -278,6 +281,8 @@
/* NIOS magic number - no EABI available. */
#define EM_NIOS32 0xFEBB
+#define EM_CYGNUS_MEP 0xF00D /* Toshiba MeP */
+
/* See the above comment before you add a new EM_* value here. */
/* Values for e_version. */
@@ -338,6 +343,8 @@
#define SHT_LOOS 0x60000000 /* First of OS specific semantics */
#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */
+#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes */
+#define SHT_GNU_HASH 0x6ffffff6 /* GNU style symbol hash table */
#define SHT_GNU_LIBLIST 0x6ffffff7 /* List of prelink dependencies */
/* The next three section types are defined by Solaris, and are named
@@ -445,7 +452,7 @@
#define ELF64_ST_INFO ELF_ST_INFO
/* This macro disassembles and assembles a symbol's visibility into
- the st_other field. The STV_ defines specificy the actual visibility. */
+ the st_other field. The STV_ defines specify the actual visibility. */
#define ELF_ST_VISIBILITY(v) ((v) & 0x3)
/* The remaining bits in the st_other field are not currently used.
@@ -472,6 +479,8 @@
#define STT_FILE 4 /* Symbol gives a file name */
#define STT_COMMON 5 /* An uninitialised common block */
#define STT_TLS 6 /* Thread local data object */
+#define STT_RELC 8 /* Complex relocation expression */
+#define STT_SRELC 9 /* Signed Complex relocation expression */
#define STT_LOOS 10 /* OS-specific semantics */
#define STT_HIOS 12 /* OS-specific semantics */
#define STT_LOPROC 13 /* Application-specific semantics */
@@ -543,7 +552,7 @@
#define DT_FINI_ARRAYSZ 28
#define DT_RUNPATH 29
#define DT_FLAGS 30
-#define DT_ENCODING 31
+#define DT_ENCODING 32
#define DT_PREINIT_ARRAY 32
#define DT_PREINIT_ARRAYSZ 33
@@ -577,6 +586,7 @@
#define DT_VALRNGHI 0x6ffffdff
#define DT_ADDRRNGLO 0x6ffffe00
+#define DT_GNU_HASH 0x6ffffef5
#define DT_TLSDESC_PLT 0x6ffffef6
#define DT_TLSDESC_GOT 0x6ffffef7
#define DT_GNU_CONFLICT 0x6ffffef8
diff --git a/contrib/binutils/include/elf/cr16.h b/contrib/binutils/include/elf/cr16.h
new file mode 100644
index 0000000..e3f6c50
--- /dev/null
+++ b/contrib/binutils/include/elf/cr16.h
@@ -0,0 +1,56 @@
+/* CR16 ELF support for BFD.
+ Copyright 2007 Free Software Foundation, Inc.
+ Contributed by M R Swami Reddy.
+
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _ELF_CR16_H
+#define _ELF_CR16_H
+
+#include "elf/reloc-macros.h"
+
+/* Creating indices for reloc_map_index array. */
+START_RELOC_NUMBERS(elf_cr16_reloc_type)
+ RELOC_NUMBER (R_CR16_NONE, 0)
+ RELOC_NUMBER (R_CR16_NUM8, 1)
+ RELOC_NUMBER (R_CR16_NUM16, 2)
+ RELOC_NUMBER (R_CR16_NUM32, 3)
+ RELOC_NUMBER (R_CR16_NUM32a, 4)
+ RELOC_NUMBER (R_CR16_REGREL4, 5)
+ RELOC_NUMBER (R_CR16_REGREL4a, 6)
+ RELOC_NUMBER (R_CR16_REGREL14, 7)
+ RELOC_NUMBER (R_CR16_REGREL14a, 8)
+ RELOC_NUMBER (R_CR16_REGREL16, 9)
+ RELOC_NUMBER (R_CR16_REGREL20, 10)
+ RELOC_NUMBER (R_CR16_REGREL20a, 11)
+ RELOC_NUMBER (R_CR16_ABS20, 12)
+ RELOC_NUMBER (R_CR16_ABS24, 13)
+ RELOC_NUMBER (R_CR16_IMM4, 14)
+ RELOC_NUMBER (R_CR16_IMM8, 15)
+ RELOC_NUMBER (R_CR16_IMM16, 16)
+ RELOC_NUMBER (R_CR16_IMM20, 17)
+ RELOC_NUMBER (R_CR16_IMM24, 18)
+ RELOC_NUMBER (R_CR16_IMM32, 19)
+ RELOC_NUMBER (R_CR16_IMM32a, 20)
+ RELOC_NUMBER (R_CR16_DISP4, 21)
+ RELOC_NUMBER (R_CR16_DISP8, 22)
+ RELOC_NUMBER (R_CR16_DISP16, 23)
+ RELOC_NUMBER (R_CR16_DISP24, 24)
+ RELOC_NUMBER (R_CR16_DISP24a, 25)
+END_RELOC_NUMBERS(R_CR16_MAX)
+
+#endif /* _ELF_CR16_H */
diff --git a/contrib/binutils/include/elf/dwarf2.h b/contrib/binutils/include/elf/dwarf2.h
index 264952a..2683f51 100644
--- a/contrib/binutils/include/elf/dwarf2.h
+++ b/contrib/binutils/include/elf/dwarf2.h
@@ -540,6 +540,7 @@ enum dwarf_location_atom
DW_OP_bit_piece = 0x9d,
/* GNU extensions. */
DW_OP_GNU_push_tls_address = 0xe0,
+ DW_OP_GNU_uninit = 0xf0,
/* HP extensions. */
DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. */
DW_OP_HP_is_value = 0xe1,
diff --git a/contrib/binutils/include/elf/external.h b/contrib/binutils/include/elf/external.h
index 5985e94..21450f0 100644
--- a/contrib/binutils/include/elf/external.h
+++ b/contrib/binutils/include/elf/external.h
@@ -245,11 +245,7 @@ typedef struct {
typedef struct {
unsigned char vs_vers[2];
-}
-#ifdef __GNUC__
- __attribute__ ((packed))
-#endif
- Elf_External_Versym;
+} ATTRIBUTE_PACKED Elf_External_Versym;
/* Structure for syminfo section. */
typedef struct
diff --git a/contrib/binutils/include/elf/hppa.h b/contrib/binutils/include/elf/hppa.h
index 15be2d5..c9b3200 100644
--- a/contrib/binutils/include/elf/hppa.h
+++ b/contrib/binutils/include/elf/hppa.h
@@ -1,22 +1,22 @@
/* HPPA ELF support for BFD.
- Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2005
+ Copyright 1993, 1994, 1995, 1998, 1999, 2000, 2005, 2006
Free Software Foundation, Inc.
-This file is part of BFD, the Binary File Descriptor library.
+ 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 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
/* This file holds definitions specific to the HPPA ELF ABI. Note
that most of this is not actually implemented by BFD. */
@@ -80,10 +80,10 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
/* These are strictly for compatibility with the older elf32-hppa
implementation. Hopefully we can eliminate them in the future. */
/* Optional section holding argument location/relocation info. */
-#define SHT_PARISC_SYMEXTN SHT_LOPROC+8
+#define SHT_PARISC_SYMEXTN SHT_LOPROC + 8
/* Option section for linker stubs. */
-#define SHT_PARISC_STUBS SHT_LOPROC+9
+#define SHT_PARISC_STUBS SHT_LOPROC + 9
/* Processor specific section flags. */
@@ -480,8 +480,28 @@ RELOC_NUMBER (R_PARISC_LTOFF_TP16DF, 231)
RELOC_NUMBER (R_PARISC_GNU_VTENTRY, 232)
RELOC_NUMBER (R_PARISC_GNU_VTINHERIT, 233)
+RELOC_NUMBER (R_PARISC_TLS_GD21L, 234)
+RELOC_NUMBER (R_PARISC_TLS_GD14R, 235)
+RELOC_NUMBER (R_PARISC_TLS_GDCALL, 236)
+RELOC_NUMBER (R_PARISC_TLS_LDM21L, 237)
+RELOC_NUMBER (R_PARISC_TLS_LDM14R, 238)
+RELOC_NUMBER (R_PARISC_TLS_LDMCALL, 239)
+RELOC_NUMBER (R_PARISC_TLS_LDO21L, 240)
+RELOC_NUMBER (R_PARISC_TLS_LDO14R, 241)
+RELOC_NUMBER (R_PARISC_TLS_DTPMOD32, 242)
+RELOC_NUMBER (R_PARISC_TLS_DTPMOD64, 243)
+RELOC_NUMBER (R_PARISC_TLS_DTPOFF32, 244)
+RELOC_NUMBER (R_PARISC_TLS_DTPOFF64, 245)
+
END_RELOC_NUMBERS (R_PARISC_UNIMPLEMENTED)
+#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L
+#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R
+#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L
+#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R
+#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32
+#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64
+
#ifndef RELOC_MACROS_GEN_FUNC
typedef enum elf_hppa_reloc_type elf_hppa_reloc_type;
#endif
diff --git a/contrib/binutils/include/elf/internal.h b/contrib/binutils/include/elf/internal.h
index e4eba7d..1521711 100644
--- a/contrib/binutils/include/elf/internal.h
+++ b/contrib/binutils/include/elf/internal.h
@@ -1,6 +1,6 @@
/* ELF support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2006, 2007 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
in "UNIX System V Release 4, Programmers Guide: ANSI C and
@@ -235,12 +235,19 @@ struct elf_segment_map
unsigned long p_flags;
/* Program segment physical address. */
bfd_vma p_paddr;
+ /* Program segment virtual address offset from section vma. */
+ bfd_vma p_vaddr_offset;
+ /* Program segment alignment. */
+ bfd_vma p_align;
/* Whether the p_flags field is valid; if not, the flags are based
on the section flags. */
unsigned int p_flags_valid : 1;
/* Whether the p_paddr field is valid; if not, the physical address
is based on the section lma values. */
unsigned int p_paddr_valid : 1;
+ /* Whether the p_align field is valid; if not, PT_LOAD segment
+ alignment is based on the default maximum page size. */
+ unsigned int p_align_valid : 1;
/* Whether this segment includes the file header. */
unsigned int includes_filehdr : 1;
/* Whether this segment includes the program headers. */
@@ -251,29 +258,42 @@ struct elf_segment_map
asection *sections[1];
};
+/* .tbss is special. It doesn't contribute memory space to normal
+ segments and it doesn't take file space in normal segments. */
+#define ELF_SECTION_SIZE(sec_hdr, segment) \
+ (((sec_hdr->sh_flags & SHF_TLS) == 0 \
+ || sec_hdr->sh_type != SHT_NOBITS \
+ || segment->p_type == PT_TLS) ? sec_hdr->sh_size : 0)
+
+/* Decide if the given sec_hdr is in the given segment. PT_TLS segment
+ contains only SHF_TLS sections. Only PT_LOAD and PT_TLS segments
+ can contain SHF_TLS sections. */
+#define ELF_IS_SECTION_IN_SEGMENT(sec_hdr, segment) \
+ (((((sec_hdr->sh_flags & SHF_TLS) != 0) \
+ && (segment->p_type == PT_TLS \
+ || segment->p_type == PT_LOAD)) \
+ || ((sec_hdr->sh_flags & SHF_TLS) == 0 \
+ && segment->p_type != PT_TLS)) \
+ /* Any section besides one of type SHT_NOBITS must have a file \
+ offset within the segment. */ \
+ && (sec_hdr->sh_type == SHT_NOBITS \
+ || ((bfd_vma) sec_hdr->sh_offset >= segment->p_offset \
+ && (sec_hdr->sh_offset + ELF_SECTION_SIZE(sec_hdr, segment) \
+ <= segment->p_offset + segment->p_filesz))) \
+ /* SHF_ALLOC sections must have VMAs within the segment. */ \
+ && ((sec_hdr->sh_flags & SHF_ALLOC) == 0 \
+ || (sec_hdr->sh_addr >= segment->p_vaddr \
+ && (sec_hdr->sh_addr + ELF_SECTION_SIZE(sec_hdr, segment) \
+ <= segment->p_vaddr + segment->p_memsz))))
+
/* Decide if the given sec_hdr is in the given segment in file. */
#define ELF_IS_SECTION_IN_SEGMENT_FILE(sec_hdr, segment) \
(sec_hdr->sh_size > 0 \
- /* PT_TLS segment contains only SHF_TLS sections. */ \
- && (segment->p_type != PT_TLS \
- || (sec_hdr->sh_flags & SHF_TLS) != 0) \
- /* Compare allocated sec_hdrs by VMA, unallocated sec_hdrs \
- by file offset. */ \
- && (sec_hdr->sh_flags & SHF_ALLOC \
- ? (sec_hdr->sh_addr >= segment->p_vaddr \
- && sec_hdr->sh_addr + sec_hdr->sh_size \
- <= segment->p_vaddr + segment->p_memsz) \
- : ((bfd_vma) sec_hdr->sh_offset >= segment->p_offset \
- && (sec_hdr->sh_offset + sec_hdr->sh_size \
- <= segment->p_offset + segment->p_filesz))))
+ && ELF_IS_SECTION_IN_SEGMENT (sec_hdr, segment))
/* Decide if the given sec_hdr is in the given segment in memory. */
#define ELF_IS_SECTION_IN_SEGMENT_MEMORY(sec_hdr, segment) \
- (ELF_IS_SECTION_IN_SEGMENT_FILE (sec_hdr, segment) \
- /* .tbss is special. It doesn't contribute memory space to \
- normal segments. */ \
- && (!((sec_hdr->sh_flags & SHF_TLS) != 0 \
- && sec_hdr->sh_type == SHT_NOBITS) \
- || segment->p_type == PT_TLS))
+ (ELF_SECTION_SIZE(sec_hdr, segment) > 0 \
+ && ELF_IS_SECTION_IN_SEGMENT (sec_hdr, segment))
#endif /* _ELF_INTERNAL_H */
diff --git a/contrib/binutils/include/elf/m68k.h b/contrib/binutils/include/elf/m68k.h
index 08d0c44..a9f2203 100644
--- a/contrib/binutils/include/elf/m68k.h
+++ b/contrib/binutils/include/elf/m68k.h
@@ -52,24 +52,30 @@ START_RELOC_NUMBERS (elf_m68k_reloc_type)
RELOC_NUMBER (R_68K_GNU_VTENTRY, 24)
END_RELOC_NUMBERS (R_68K_max)
+/* We use the top 24 bits to encode information about the
+ architecture variant. */
#define EF_M68K_CPU32 0x00810000
#define EF_M68K_M68000 0x01000000
#define EF_M68K_CFV4E 0x00008000
+#define EF_M68K_FIDO 0x02000000
+#define EF_M68K_ARCH_MASK \
+ (EF_M68K_M68000 | EF_M68K_CPU32 | EF_M68K_CFV4E | EF_M68K_FIDO)
/* We use the bottom 8 bits to encode information about the
- coldfire variant. */
-#define EF_M68K_ISA_MASK 0x0F /* Which ISA */
-#define EF_M68K_ISA_A_NODIV 0x01 /* ISA A except for div */
-#define EF_M68K_ISA_A 0x02
-#define EF_M68K_ISA_A_PLUS 0x03
-#define EF_M68K_ISA_B_NOUSP 0x04 /* ISA_B except for USP */
-#define EF_M68K_ISA_B 0x05
-#define EF_M68K_ISA_C 0x06
-#define EF_M68K_MAC_MASK 0x30
-#define EF_M68K_MAC 0x10 /* MAC */
-#define EF_M68K_EMAC 0x20 /* EMAC */
-#define EF_M68K_EMAC_B 0x30 /* EMAC_B */
-#define EF_M68K_FLOAT 0x40 /* Has float insns */
+ coldfire variant. If we use any of these bits, the top 24 bits are
+ either 0 or EF_M68K_CFV4E. */
+#define EF_M68K_CF_ISA_MASK 0x0F /* Which ISA */
+#define EF_M68K_CF_ISA_A_NODIV 0x01 /* ISA A except for div */
+#define EF_M68K_CF_ISA_A 0x02
+#define EF_M68K_CF_ISA_A_PLUS 0x03
+#define EF_M68K_CF_ISA_B_NOUSP 0x04 /* ISA_B except for USP */
+#define EF_M68K_CF_ISA_B 0x05
+#define EF_M68K_CF_ISA_C 0x06
+#define EF_M68K_CF_MAC_MASK 0x30
+#define EF_M68K_CF_MAC 0x10 /* MAC */
+#define EF_M68K_CF_EMAC 0x20 /* EMAC */
+#define EF_M68K_CF_EMAC_B 0x30 /* EMAC_B */
+#define EF_M68K_CF_FLOAT 0x40 /* Has float insns */
#define EF_M68K_CF_MASK 0xFF
#endif
diff --git a/contrib/binutils/include/elf/mep.h b/contrib/binutils/include/elf/mep.h
new file mode 100644
index 0000000..51eb8d0
--- /dev/null
+++ b/contrib/binutils/include/elf/mep.h
@@ -0,0 +1,84 @@
+/* Toshiba MeP ELF support for BFD.
+ Copyright (C) 2001, 2004, 2005 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_MEP_H
+#define _ELF_MEP_H
+
+/* Bits in the sh_flags field of Elf32_Shdr: */
+
+#define SHF_MEP_VLIW 0x10000000 /* contains vliw code */
+
+/* This bit is reserved by BFD for processor specific stuff. Name
+ it properly so that we can easily stay consistent elsewhere. */
+#define SEC_MEP_VLIW SEC_TIC54X_BLOCK
+
+#include "elf/reloc-macros.h"
+
+/* Note: The comments in this file are used by bfd/mep-relocs.pl to
+ build parts of bfd/elf32-mep.c. */
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_mep_reloc_type)
+
+ /* These two must appear first so that they are not processed by bfd/mep-relocs.pl. */
+ RELOC_NUMBER (R_MEP_NONE, 0)
+ RELOC_NUMBER (R_RELC, 1)
+
+ RELOC_NUMBER (R_MEP_8, 2) /* 7654 3210 U */
+ RELOC_NUMBER (R_MEP_16, 3) /* fedc ba98 7654 3210 U */
+ RELOC_NUMBER (R_MEP_32, 4) /* vuts rqpo nmlk jihg fedc ba98 7654 3210 U */
+
+ RELOC_NUMBER (R_MEP_PCREL8A2, 5) /* ---- ---- 7654 321- S PC-REL */
+ RELOC_NUMBER (R_MEP_PCREL12A2, 6) /* ---- ba98 7654 321- S PC-REL */
+ RELOC_NUMBER (R_MEP_PCREL17A2, 7) /* ---- ---- ---- ---- gfed cba9 8765 4321 S PC-REL */
+ RELOC_NUMBER (R_MEP_PCREL24A2, 8) /* ---- -765 4321 ---- nmlk jihg fedc ba98 S PC-REL */
+ RELOC_NUMBER (R_MEP_PCABS24A2, 9) /* ---- -765 4321 ---- nmlk jihg fedc ba98 U */
+
+ RELOC_NUMBER (R_MEP_LOW16, 10) /* ---- ---- ---- ---- fedc ba98 7654 3210 U no-overflow */
+ RELOC_NUMBER (R_MEP_HI16U, 11) /* ---- ---- ---- ---- vuts rqpo nmlk jihg U no-overflow */
+ RELOC_NUMBER (R_MEP_HI16S, 12) /* ---- ---- ---- ---- vuts rqpo nmlk jihg S no-overflow */
+ RELOC_NUMBER (R_MEP_GPREL, 13) /* ---- ---- ---- ---- fedc ba98 7654 3210 S GP-REL*/
+ RELOC_NUMBER (R_MEP_TPREL, 14) /* ---- ---- ---- ---- fedc ba98 7654 3210 S TP-REL*/
+
+ RELOC_NUMBER (R_MEP_TPREL7, 15) /* ---- ---- -654 3210 U TP-REL */
+ RELOC_NUMBER (R_MEP_TPREL7A2, 16) /* ---- ---- -654 321- U TP-REL */
+ RELOC_NUMBER (R_MEP_TPREL7A4, 17) /* ---- ---- -654 32-- U TP-REL */
+
+ RELOC_NUMBER (R_MEP_UIMM24, 18) /* ---- ---- 7654 3210 nmlk jihg fedc ba98 U */
+ RELOC_NUMBER (R_MEP_ADDR24A4, 19) /* ---- ---- 7654 32-- nmlk jihg fedc ba98 U */
+
+ RELOC_NUMBER (R_MEP_GNU_VTINHERIT, 20) /* ---- ---- ---- ---- U no-overflow */
+ RELOC_NUMBER (R_MEP_GNU_VTENTRY, 21) /* ---- ---- ---- ---- U no-overflow */
+
+END_RELOC_NUMBERS(R_MEP_max)
+
+#define EF_MEP_CPU_MASK 0xff000000 /* specific cpu bits */
+#define EF_MEP_CPU_MEP 0x00000000 /* generic MEP */
+#define EF_MEP_CPU_C2 0x01000000 /* MEP c2 */
+#define EF_MEP_CPU_C3 0x02000000 /* MEP c3 */
+#define EF_MEP_CPU_C4 0x04000000 /* MEP c4 */
+#define EF_MEP_CPU_H1 0x10000000 /* MEP h1 */
+
+#define EF_MEP_LIBRARY 0x00000100 /* Built as a library */
+
+#define EF_MEP_INDEX_MASK 0x000000ff /* Configuration index */
+
+#define EF_MEP_ALL_FLAGS 0xff0001ff
+
+#endif /* _ELF_MEP_H */
diff --git a/contrib/binutils/include/elf/mips.h b/contrib/binutils/include/elf/mips.h
index d099bb8..ab1cfac 100644
--- a/contrib/binutils/include/elf/mips.h
+++ b/contrib/binutils/include/elf/mips.h
@@ -87,7 +87,8 @@ START_RELOC_NUMBERS (elf_mips_reloc_type)
RELOC_NUMBER (R_MIPS_TLS_TPREL64, 48)
RELOC_NUMBER (R_MIPS_TLS_TPREL_HI16, 49)
RELOC_NUMBER (R_MIPS_TLS_TPREL_LO16, 50)
- FAKE_RELOC (R_MIPS_max, 51)
+ RELOC_NUMBER (R_MIPS_GLOB_DAT, 51)
+ FAKE_RELOC (R_MIPS_max, 52)
/* These relocs are used for the mips16. */
FAKE_RELOC (R_MIPS16_min, 100)
RELOC_NUMBER (R_MIPS16_26, 100)
@@ -1006,4 +1007,15 @@ extern void bfd_mips_elf64_swap_reginfo_out
#define OHWA0_R4KEOP_CLEAN 0x00000002
+/* Object attribute tags. */
+enum
+{
+ /* 0-3 are generic. */
+ Tag_GNU_MIPS_ABI_FP = 4, /* Value 1 for hard-float -mdouble-float, 2
+ for hard-float -msingle-float, 3 for
+ soft-float; 0 for not tagged or not
+ using any ABIs affected by the
+ differences. */
+};
+
#endif /* _ELF_MIPS_H */
diff --git a/contrib/binutils/include/elf/ppc.h b/contrib/binutils/include/elf/ppc.h
index ca50352..fe48814 100644
--- a/contrib/binutils/include/elf/ppc.h
+++ b/contrib/binutils/include/elf/ppc.h
@@ -171,4 +171,15 @@ END_RELOC_NUMBERS (R_PPC_max)
builds when those objects \
are not to be furhter \
relocated. */
+
+/* Object attribute tags. */
+enum
+{
+ /* 0-3 are generic. */
+ Tag_GNU_Power_ABI_FP = 4, /* Value 1 for hard-float, 2 for
+ soft-float; 0 for not tagged or not
+ using any ABIs affected by the
+ differences. */
+};
+
#endif /* _ELF_PPC_H */
diff --git a/contrib/binutils/include/elf/reloc-macros.h b/contrib/binutils/include/elf/reloc-macros.h
index 51e86b5..a67419d 100644
--- a/contrib/binutils/include/elf/reloc-macros.h
+++ b/contrib/binutils/include/elf/reloc-macros.h
@@ -98,4 +98,4 @@ name (unsigned long rtype) \
#endif
-#endif /* RELOC_MACROS_H */
+#endif /* _RELOC_MACROS_H */
diff --git a/contrib/binutils/include/elf/score.h b/contrib/binutils/include/elf/score.h
new file mode 100644
index 0000000..ec3b32f
--- /dev/null
+++ b/contrib/binutils/include/elf/score.h
@@ -0,0 +1,123 @@
+/* Score ELF support for BFD.
+ Copyright 2006 Free Software Foundation, Inc.
+ Contributed by
+ Mei Ligang (ligang@sunnorth.com.cn)
+ Pei-Lin Tsai (pltsai@sunplus.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,
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _ELF_SCORE_H
+#define _ELF_SCORE_H
+
+#include "elf/reloc-macros.h"
+
+#define SCORE_SIMULATOR_ACTIVE 1
+#define OPC_PTMASK 0xc0000000 /* Parity-bit Mask. */
+#define OPC16_PTMASK 0x00008000
+/* The parity-bit denotes. */
+#define OPC_32 0xc0000000 /* Denotes 32b instruction, (default). */
+#define OPC_16 0x00000000 /* Denotes 16b instruction. */
+#define OPC_PE 0x8000 /* Denotes parallel-execution instructions. */
+#define GP_DISP_LABEL "_gp_disp"
+
+/* Processor specific flags for the ELF header e_flags field: */
+
+/* File contains position independent code. */
+#define EF_SCORE_PIC 0x80000000
+
+/* Fix data dependency. */
+#define EF_SCORE_FIXDEP 0x40000000
+
+/* Defined and allocated common symbol. Value is virtual address. If
+ relocated, alignment must be preserved. */
+#define SHN_SCORE_TEXT 0xff01
+#define SHN_SCORE_DATA 0xff02
+/* Small common symbol. */
+#define SHN_SCORE_SCOMMON 0xff03
+
+/* Processor specific section flags. */
+
+/* This section must be in the global data area. */
+#define SHF_SCORE_GPREL 0x10000000
+
+/* This section should be merged. */
+#define SHF_SCORE_MERGE 0x20000000
+
+/* This section contains address data of size implied by section
+ element size. */
+#define SHF_SCORE_ADDR 0x40000000
+
+/* This section contains string data. */
+#define SHF_SCORE_STRING 0x80000000
+
+/* This section may not be stripped. */
+#define SHF_SCORE_NOSTRIP 0x08000000
+
+/* This section is local to threads. */
+#define SHF_SCORE_LOCAL 0x04000000
+
+/* Linker should generate implicit weak names for this section. */
+#define SHF_SCORE_NAMES 0x02000000
+
+/* Section contais text/data which may be replicated in other sections.
+ Linker should retain only one copy. */
+#define SHF_SCORE_NODUPES 0x01000000
+
+/* Processor specific dynamic array tags. */
+
+/* Base address of the segment. */
+#define DT_SCORE_BASE_ADDRESS 0x70000001
+/* Number of local global offset table entries. */
+#define DT_SCORE_LOCAL_GOTNO 0x70000002
+/* Number of entries in the .dynsym section. */
+#define DT_SCORE_SYMTABNO 0x70000003
+/* Index of first dynamic symbol in global offset table. */
+#define DT_SCORE_GOTSYM 0x70000004
+/* Index of first external dynamic symbol not referenced locally. */
+#define DT_SCORE_UNREFEXTNO 0x70000005
+/* Number of page table entries in global offset table. */
+#define DT_SCORE_HIPAGENO 0x70000006
+
+
+/* Processor specific section types. */
+
+
+/* Relocation types. */
+START_RELOC_NUMBERS (elf_score_reloc_type)
+ RELOC_NUMBER (R_SCORE_NONE, 0)
+ RELOC_NUMBER (R_SCORE_HI16, 1)
+ RELOC_NUMBER (R_SCORE_LO16, 2)
+ RELOC_NUMBER (R_SCORE_DUMMY1, 3)
+ RELOC_NUMBER (R_SCORE_24, 4)
+ RELOC_NUMBER (R_SCORE_PC19, 5)
+ RELOC_NUMBER (R_SCORE16_11, 6)
+ RELOC_NUMBER (R_SCORE16_PC8, 7)
+ RELOC_NUMBER (R_SCORE_ABS32, 8)
+ RELOC_NUMBER (R_SCORE_ABS16, 9)
+ RELOC_NUMBER (R_SCORE_DUMMY2, 10)
+ RELOC_NUMBER (R_SCORE_GP15, 11)
+ RELOC_NUMBER (R_SCORE_GNU_VTINHERIT, 12)
+ RELOC_NUMBER (R_SCORE_GNU_VTENTRY, 13)
+ RELOC_NUMBER (R_SCORE_GOT15, 14)
+ RELOC_NUMBER (R_SCORE_GOT_LO16, 15)
+ RELOC_NUMBER (R_SCORE_CALL15, 16)
+ RELOC_NUMBER (R_SCORE_GPREL32, 17)
+ RELOC_NUMBER (R_SCORE_REL32, 18)
+ RELOC_NUMBER (R_SCORE_DUMMY_HI16, 19)
+END_RELOC_NUMBERS (R_SCORE_max)
+
+#endif /* _ELF_SCORE_H */
diff --git a/contrib/binutils/include/elf/spu.h b/contrib/binutils/include/elf/spu.h
new file mode 100644
index 0000000..ef94980
--- /dev/null
+++ b/contrib/binutils/include/elf/spu.h
@@ -0,0 +1,60 @@
+/* SPU ELF support for BFD.
+
+ Copyright 2006, 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _ELF_SPU_H
+#define _ELF_SPU_H
+
+#include "elf/reloc-macros.h"
+
+/* elf32-spu.c depends on these being consecutive. */
+START_RELOC_NUMBERS (elf_spu_reloc_type)
+ RELOC_NUMBER (R_SPU_NONE, 0)
+ RELOC_NUMBER (R_SPU_ADDR10, 1)
+ RELOC_NUMBER (R_SPU_ADDR16, 2)
+ RELOC_NUMBER (R_SPU_ADDR16_HI, 3)
+ RELOC_NUMBER (R_SPU_ADDR16_LO, 4)
+ RELOC_NUMBER (R_SPU_ADDR18, 5)
+ RELOC_NUMBER (R_SPU_ADDR32, 6)
+ RELOC_NUMBER (R_SPU_REL16, 7)
+ RELOC_NUMBER (R_SPU_ADDR7, 8)
+ RELOC_NUMBER (R_SPU_REL9, 9)
+ RELOC_NUMBER (R_SPU_REL9I, 10)
+ RELOC_NUMBER (R_SPU_ADDR10I, 11)
+ RELOC_NUMBER (R_SPU_ADDR16I, 12)
+ RELOC_NUMBER (R_SPU_REL32, 13)
+ RELOC_NUMBER (R_SPU_ADDR16X, 14)
+ RELOC_NUMBER (R_SPU_PPU32, 15)
+ RELOC_NUMBER (R_SPU_PPU64, 16)
+END_RELOC_NUMBERS (R_SPU_max)
+
+/* Program header extensions */
+
+/* Mark a PT_LOAD segment as containing an overlay which should not
+ initially be loaded. */
+#define PF_OVERLAY (1 << 27)
+
+/* SPU Dynamic Object Information. */
+#define PT_SPU_INFO 0x70000000
+
+/* SPU plugin information */
+#define SPU_PLUGIN_NAME "SPUNAME"
+#define SPU_PTNOTE_SPUNAME ".note.spu_name"
+
+#endif /* _ELF_SPU_H */
diff --git a/contrib/binutils/include/elf/v850.h b/contrib/binutils/include/elf/v850.h
index 95dab49..a88969d 100644
--- a/contrib/binutils/include/elf/v850.h
+++ b/contrib/binutils/include/elf/v850.h
@@ -1,5 +1,5 @@
/* V850 ELF support for BFD.
- Copyright 1997, 1998, 2000, 2002, 2003, 2004
+ Copyright 1997, 1998, 2000, 2002, 2003, 2004, 2007
Free Software Foundation, Inc.
Created by Michael Meissner, Cygnus Support <meissner@cygnus.com>
@@ -41,10 +41,9 @@
/* Flags for the st_other field. */
-#define V850_OTHER_SDA 0x01 /* Symbol had SDA relocations. */
-#define V850_OTHER_ZDA 0x02 /* Symbol had ZDA relocations. */
-#define V850_OTHER_TDA 0x04 /* Symbol had TDA relocations. */
-#define V850_OTHER_TDA_BYTE 0x08 /* Symbol had TDA byte relocations. */
+#define V850_OTHER_SDA 0x10 /* Symbol had SDA relocations. */
+#define V850_OTHER_ZDA 0x20 /* Symbol had ZDA relocations. */
+#define V850_OTHER_TDA 0x40 /* Symbol had TDA relocations. */
#define V850_OTHER_ERROR 0x80 /* Symbol had an error reported. */
/* V850 relocations. */
diff --git a/contrib/binutils/include/elf/xtensa.h b/contrib/binutils/include/elf/xtensa.h
index 0de9741..bd83a14 100644
--- a/contrib/binutils/include/elf/xtensa.h
+++ b/contrib/binutils/include/elf/xtensa.h
@@ -140,7 +140,9 @@ typedef struct property_table_entry_t
/* Instruction-only properties about code. */
#define XTENSA_PROP_INSN_NO_DENSITY 0x00000040
#define XTENSA_PROP_INSN_NO_REORDER 0x00000080
-#define XTENSA_PROP_INSN_NO_TRANSFORM 0x00000100
+/* Historically, NO_TRANSFORM was a property of instructions,
+ but it should apply to literals under certain circumstances. */
+#define XTENSA_PROP_NO_TRANSFORM 0x00000100
/* Branch target alignment information. This transmits information
to the linker optimization about the priority of aligning a
diff --git a/contrib/binutils/include/filenames.h b/contrib/binutils/include/filenames.h
index 6b72fd2..5338208 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, 2001 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2007 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -38,14 +38,15 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
want to know whether to prepend the current working directory to
a file name, which should not be done with a name like d:foo. */
#define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]) || (((f)[0]) && ((f)[1] == ':')))
-#define FILENAME_CMP(s1, s2) strcasecmp(s1, s2)
#else /* not DOSish */
#define IS_DIR_SEPARATOR(c) ((c) == '/')
#define IS_ABSOLUTE_PATH(f) (IS_DIR_SEPARATOR((f)[0]))
-#define FILENAME_CMP(s1, s2) strcmp(s1, s2)
#endif /* not DOSish */
+extern int filename_cmp (const char *s1, const char *s2);
+#define FILENAME_CMP(s1, s2) filename_cmp(s1, s2)
+
#endif /* FILENAMES_H */
diff --git a/contrib/binutils/include/libiberty.h b/contrib/binutils/include/libiberty.h
index 6bd318e..4e69734 100644
--- a/contrib/binutils/include/libiberty.h
+++ b/contrib/binutils/include/libiberty.h
@@ -86,6 +86,10 @@ extern char **dupargv (char **) ATTRIBUTE_MALLOC;
extern void expandargv PARAMS ((int *, char ***));
+/* Write argv to an @-file, inserting necessary quoting. */
+
+extern int writeargv PARAMS ((char **, FILE *));
+
/* Return the last component of a path name. Note that we can't use a
prototype here because the parameter is declared inconsistently
across different systems, sometimes as "char *" and sometimes as
@@ -197,6 +201,13 @@ extern long get_run_time (void);
extern char *make_relative_prefix (const char *, const char *,
const char *) ATTRIBUTE_MALLOC;
+/* Generate a relocated path to some installation directory without
+ attempting to follow any soft links. Allocates
+ return value using malloc. */
+
+extern char *make_relative_prefix_ignore_links (const char *, const char *,
+ const char *) ATTRIBUTE_MALLOC;
+
/* Choose a temporary directory to use for scratch files. */
extern char *choose_temp_base (void) ATTRIBUTE_MALLOC;
@@ -393,6 +404,19 @@ extern struct pex_obj *pex_init (int flags, const char *pname,
PEX_BINARY_INPUT. */
#define PEX_BINARY_OUTPUT 0x20
+/* Capture stderr to a pipe. The output can be read by
+ calling pex_read_err and reading from the returned
+ FILE object. This flag may be specified only for
+ the last program in a pipeline.
+
+ This flag is supported only on Unix and Windows. */
+#define PEX_STDERR_TO_PIPE 0x40
+
+/* Capture stderr in binary mode. This flag is ignored
+ on Unix. */
+#define PEX_BINARY_ERROR 0x80
+
+
/* Execute one program. Returns NULL on success. On error returns an
error string (typically just the name of a system call); the error
string is statically allocated.
@@ -448,32 +472,22 @@ extern const char *pex_run (struct pex_obj *obj, int flags,
const char *outname, const char *errname,
int *err);
-/* Return a `FILE' pointer FP for the standard input of the first
- program in the pipeline; FP is opened for writing. You must have
- passed `PEX_USE_PIPES' to the `pex_init' call that returned OBJ.
- You must close FP yourself with `fclose' to indicate that the
- pipeline's input is complete.
-
- The file descriptor underlying FP is marked not to be inherited by
- child processes.
-
- This call is not supported on systems which do not support pipes;
- it returns with an error. (We could implement it by writing a
- temporary file, but then you would need to write all your data and
- close FP before your first call to `pex_run' -- and that wouldn't
- work on systems that do support pipes: the pipe would fill up, and
- you would block. So there isn't any easy way to conceal the
- differences between the two types of systems.)
-
- If you call both `pex_write_input' and `pex_read_output', be
- careful to avoid deadlock. If the output pipe fills up, so that
- each program in the pipeline is waiting for the next to read more
- data, and you fill the input pipe by writing more data to FP, then
- there is no way to make progress: the only process that could read
- data from the output pipe is you, but you are blocked on the input
- pipe. */
-
-extern FILE *pex_write_input (struct pex_obj *obj, int binary);
+/* As for pex_run (), but takes an extra parameter to enable the
+ environment for the child process to be specified.
+
+ ENV The environment for the child process, specified as
+ an array of character pointers. Each element of the
+ array should point to a string of the form VAR=VALUE,
+ with the exception of the last element which must be
+ a null pointer.
+*/
+
+extern const char *pex_run_in_environment (struct pex_obj *obj, int flags,
+ const char *executable,
+ char * const *argv,
+ char * const *env,
+ const char *outname,
+ const char *errname, int *err);
/* Return a stream for a temporary file to pass to the first program
in the pipeline as input. The file name is chosen as for pex_run.
@@ -497,6 +511,14 @@ extern FILE *pex_input_pipe (struct pex_obj *obj, int binary);
extern FILE *pex_read_output (struct pex_obj *, int binary);
+/* Read the standard error of the last program to be executed.
+ pex_run can not be called after this. BINARY should be non-zero if
+ the file should be opened in binary mode; this is ignored on Unix.
+ Returns NULL on error. Don't call fclose on the returned FILE; it
+ will be closed by pex_free. */
+
+extern FILE *pex_read_err (struct pex_obj *, int binary);
+
/* Return exit status of all programs in VECTOR. COUNT indicates the
size of VECTOR. The status codes in the vector are in the order of
the calls to pex_run. Returns 0 on error, 1 on success. */
diff --git a/contrib/binutils/include/opcode/ChangeLog b/contrib/binutils/include/opcode/ChangeLog
index 0c67a5c..689e278 100644
--- a/contrib/binutils/include/opcode/ChangeLog
+++ b/contrib/binutils/include/opcode/ChangeLog
@@ -1,8 +1,187 @@
-2006-05-26 Richard Sandiford <richard@codesourcery.com>
+2006-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+ * cr16.h: New file for CR16 target.
+
+2007-05-02 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (PPC_OPERAND_PLUS1): Update comment.
+
+2007-04-23 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k.h (mcfisa_c): New.
+ (mcfusp, mcf_mask): Adjust.
+
+2007-04-20 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (struct powerpc_operand): Replace "bits" with "bitm".
+ (num_powerpc_operands): Declare.
+ (PPC_OPERAND_SIGNED et al): Redefine as hex.
+ (PPC_OPERAND_PLUS1): Define.
+
+2007-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (REX_MODE64): Renamed to ...
+ (REX_W): This.
+ (REX_EXTX): Renamed to ...
+ (REX_R): This.
+ (REX_EXTY): Renamed to ...
+ (REX_X): This.
+ (REX_EXTZ): Renamed to ...
+ (REX_B): This.
+
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h: Add entries from config/tc-i386.h and move tables
+ to opcodes/i386-opc.h.
+
+2007-03-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (FloatDR): Removed.
+ (i386_optab): Use FloatD and FloatD|FloatR instead of FloatDR.
+
+2007-03-01 Alan Modra <amodra@bigpond.net.au>
+
+ * spu-insns.h: Add soma double-float insns.
+
+2007-02-20 Thiemo Seufer <ths@mips.com>
+ Chao-Ying Fu <fu@mips.com>
+
+ * mips.h (OP_SH_BP, OP_MASK_BP): Add support for balign instruction.
+ (INSN_DSPR2): Add flag for DSP R2 instructions.
+ (M_BALIGN): New macro.
+
+2007-02-14 Alan Modra <amodra@bigpond.net.au>
+
+ * i386.h (i386_optab): Replace all occurrences of Seg2ShortForm
+ and Seg3ShortFrom with Shortform.
+
+2007-02-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR gas/4027
+ * i386.h (i386_optab): Put the real "test" before the pseudo
+ one.
+
+2007-01-08 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k.h (m68010up): OR fido_a.
+
+2006-12-25 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k.h (fido_a): New.
+
+2006-12-24 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k.h (mcfmac, mcfemac, cfloat, mcfhwdiv, mcfisa_a,
+ mcfisa_aa, mcfisa_b, mcfusp, mcf_mask): Double the defined
+ values.
+
+2006-11-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Replace CpuPNI with CpuSSE3.
+
+2006-10-31 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * score-inst.h (enum score_insn_type): Add Insn_internal.
+
+2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * spu-insns.h: New file.
+ * spu.h: New file.
+
+2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ * ppc.h (PPC_OPCODE_CELL): Define.
+
+2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+
+ * i386.h : Modify opcode to support for the change in POPCNT opcode
+ in amdfam10 architecture.
+
+2006-09-28 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h: Replace CpuMNI with CpuSSSE3.
+
+2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Ian Lance Taylor <ian@wasabisystems.com>
+ Ben Elliston <bje@wasabisystems.com>
+
+ * arm.h (ARM_CEXT_IWMMXT2, ARM_ARCH_IWMMXT2): Define.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * score-datadep.h: New file.
+ * score-inst.h: New file.
+
+2006-07-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Remove InvMem from maskmovq, movhlps,
+ movlhps, movmskps, pextrw, pmovmskb, movmskpd, maskmovdqu,
+ movdq2q and movq2dq.
+
+2006-07-10 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+ Michael Meissner <michael.meissner@amd.com>
+
+ * i386.h: Add amdfam10 new instructions (SSE4a and ABM instructions).
+
+2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Add "nop" with memory reference.
+
+2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.h (i386_optab): Update comment for 64bit NOP.
+
+2006-06-06 Ben Elliston <bje@au.ibm.com>
+ Anton Blanchard <anton@samba.org>
+
+ * ppc.h (PPC_OPCODE_POWER6): Define.
+ Adjust whitespace.
+
+2006-06-05 Thiemo Seufer <ths@mips.com>
+
+ * mips.h: Improve description of MT flags.
+
+2006-05-25 Richard Sandiford <richard@codesourcery.com>
* m68k.h (mcf_mask): Define.
-2006-04-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
+2006-05-05 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips.h (enum): Add macro M_CACHE_AB.
+
+2006-05-04 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips.h: Add INSN_SMARTMIPS define.
+
+2006-04-30 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips.h: Defines udi bits and masks. Add description of
+ characters which may appear in the args field of udi
+ instructions.
+
+2006-04-26 Thiemo Seufer <ths@networkno.de>
+
+ * mips.h: Improve comments describing the bitfield instruction
+ fields.
+
+2006-04-26 Julian Brown <julian@codesourcery.com>
+
+ * arm.h (FPU_VFP_EXT_V3): Define constant.
+ (FPU_NEON_EXT_V1): Likewise.
+ (FPU_VFP_HARD): Update.
+ (FPU_VFP_V3): Define macro.
+ (FPU_ARCH_VFP_V3, FPU_ARCH_VFP_V3_PLUS_NEON_V1): Define macros.
+
+2006-04-07 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* avr.h (AVR_ISA_PWMx): New.
diff --git a/contrib/binutils/include/opcode/arm.h b/contrib/binutils/include/opcode/arm.h
index 1d3aa5a..24a89cf 100644
--- a/contrib/binutils/include/opcode/arm.h
+++ b/contrib/binutils/include/opcode/arm.h
@@ -49,6 +49,7 @@
#define ARM_CEXT_XSCALE 0x00000001 /* Allow MIA etc. */
#define ARM_CEXT_MAVERICK 0x00000002 /* Use Cirrus/DSP coprocessor. */
#define ARM_CEXT_IWMMXT 0x00000004 /* Intel Wireless MMX technology coprocessor. */
+#define ARM_CEXT_IWMMXT2 0x00000008 /* Intel Wireless MMX technology coprocessor version 2. */
#define FPU_ENDIAN_PURE 0x80000000 /* Pure-endian doubles. */
#define FPU_ENDIAN_BIG 0 /* Double words-big-endian. */
@@ -58,6 +59,8 @@
#define FPU_VFP_EXT_V1xD 0x08000000 /* Base VFP instruction set. */
#define FPU_VFP_EXT_V1 0x04000000 /* Double-precision insns. */
#define FPU_VFP_EXT_V2 0x02000000 /* ARM10E VFPr1. */
+#define FPU_VFP_EXT_V3 0x01000000 /* VFPv3 insns. */
+#define FPU_NEON_EXT_V1 0x00800000 /* Neon (SIMD) insns. */
/* Architectures are the sum of the base and extensions. The ARM ARM (rev E)
defines the following: ARMv3, ARMv3M, ARMv4xM, ARMv4, ARMv4TxM, ARMv4T,
@@ -101,11 +104,15 @@
#define ARM_ARCH_XSCALE ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE)
#define ARM_ARCH_IWMMXT \
ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT)
+#define ARM_ARCH_IWMMXT2 \
+ ARM_FEATURE (ARM_AEXT_V5TE, ARM_CEXT_XSCALE | ARM_CEXT_IWMMXT | ARM_CEXT_IWMMXT2)
#define FPU_VFP_V1xD (FPU_VFP_EXT_V1xD | FPU_ENDIAN_PURE)
#define FPU_VFP_V1 (FPU_VFP_V1xD | FPU_VFP_EXT_V1)
#define FPU_VFP_V2 (FPU_VFP_V1 | FPU_VFP_EXT_V2)
-#define FPU_VFP_HARD (FPU_VFP_EXT_V1xD | FPU_VFP_EXT_V1 | FPU_VFP_EXT_V2)
+#define FPU_VFP_V3 (FPU_VFP_V2 | FPU_VFP_EXT_V3)
+#define FPU_VFP_HARD (FPU_VFP_EXT_V1xD | FPU_VFP_EXT_V1 | FPU_VFP_EXT_V2 \
+ | FPU_VFP_EXT_V3 | FPU_NEON_EXT_V1)
#define FPU_FPA (FPU_FPA_EXT_V1 | FPU_FPA_EXT_V2)
/* Deprecated */
@@ -117,6 +124,10 @@
#define FPU_ARCH_VFP_V1xD ARM_FEATURE (0, FPU_VFP_V1xD)
#define FPU_ARCH_VFP_V1 ARM_FEATURE (0, FPU_VFP_V1)
#define FPU_ARCH_VFP_V2 ARM_FEATURE (0, FPU_VFP_V2)
+#define FPU_ARCH_VFP_V3 ARM_FEATURE (0, FPU_VFP_V3)
+#define FPU_ARCH_NEON_V1 ARM_FEATURE (0, FPU_NEON_EXT_V1)
+#define FPU_ARCH_VFP_V3_PLUS_NEON_V1 \
+ ARM_FEATURE (0, FPU_VFP_V3 | FPU_NEON_EXT_V1)
#define FPU_ARCH_VFP_HARD ARM_FEATURE (0, FPU_VFP_HARD)
#define FPU_ARCH_ENDIAN_PURE ARM_FEATURE (0, FPU_ENDIAN_PURE)
diff --git a/contrib/binutils/include/opcode/cr16.h b/contrib/binutils/include/opcode/cr16.h
new file mode 100644
index 0000000..b7e3be5
--- /dev/null
+++ b/contrib/binutils/include/opcode/cr16.h
@@ -0,0 +1,437 @@
+/* cr16.h -- Header file for CR16 opcode and register tables.
+ Copyright 2007 Free Software Foundation, Inc.
+ Contributed by M R Swami Reddy
+
+ This file is part of GAS, GDB and the GNU binutils.
+
+ GAS, GDB, and GNU binutils is free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at your
+ option) any later version.
+
+ GAS, GDB, and GNU binutils are distributed in the hope that they will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _CR16_H_
+#define _CR16_H_
+
+/* CR16 core Registers :
+ The enums are used as indices to CR16 registers table (cr16_regtab).
+ Therefore, order MUST be preserved. */
+
+typedef enum
+ {
+ /* 16-bit general purpose registers. */
+ r0, r1, r2, r3,
+ r4, r5, r6, r7,
+ r8, r9, r10, r11,
+ r12_L = 12, r13_L = 13, ra = 14, sp_L = 15,
+
+ /* 32-bit general purpose registers. */
+ r12 = 12, r13 = 13, r14 = 14, r15 = 15,
+ era = 14, sp = 15, RA,
+
+ /* Not a register. */
+ nullregister,
+ MAX_REG
+ }
+reg;
+
+/* CR16 processor registers and special registers :
+ The enums are used as indices to CR16 processor registers table
+ (cr16_pregtab). Therefore, order MUST be preserved. */
+
+typedef enum
+ {
+ /* processor registers. */
+ dbs = MAX_REG,
+ dsr, dcrl, dcrh,
+ car0l, car0h, car1l, car1h,
+ cfg, psr, intbasel, intbaseh,
+ ispl, isph, uspl, usph,
+ dcr = dcrl,
+ car0 = car0l,
+ car1 = car1l,
+ intbase = intbasel,
+ isp = ispl,
+ usp = uspl,
+ /* Not a processor register. */
+ nullpregister = usph + 1,
+ MAX_PREG
+ }
+preg;
+
+/* CR16 Register types. */
+
+typedef enum
+ {
+ CR16_R_REGTYPE, /* r<N> */
+ CR16_RP_REGTYPE, /* reg pair */
+ CR16_P_REGTYPE /* Processor register */
+ }
+reg_type;
+
+/* CR16 argument types :
+ The argument types correspond to instructions operands
+
+ Argument types :
+ r - register
+ rp - register pair
+ c - constant
+ i - immediate
+ idxr - index with register
+ idxrp - index with register pair
+ rbase - register base
+ rpbase - register pair base
+ pr - processor register */
+
+typedef enum
+ {
+ arg_r,
+ arg_c,
+ arg_cr,
+ arg_crp,
+ arg_ic,
+ arg_icr,
+ arg_idxr,
+ arg_idxrp,
+ arg_rbase,
+ arg_rpbase,
+ arg_rp,
+ arg_pr,
+ arg_prp,
+ arg_cc,
+ arg_ra,
+ /* Not an argument. */
+ nullargs
+ }
+argtype;
+
+/* CR16 operand types:The operand types correspond to instructions operands.*/
+
+typedef enum
+ {
+ dummy,
+ /* N-bit signed immediate. */
+ imm3, imm4, imm5, imm6, imm16, imm20, imm32,
+ /* N-bit unsigned immediate. */
+ uimm3, uimm3_1, uimm4, uimm4_1, uimm5, uimm16, uimm20, uimm32,
+ /* N-bit signed displacement. */
+ disps5, disps17, disps25,
+ /* N-bit unsigned displacement. */
+ dispe9,
+ /* N-bit absolute address. */
+ abs20, abs24,
+ /* Register relative. */
+ rra, rbase, rbase_disps20, rbase_dispe20,
+ /* Register pair relative. */
+ rpbase_disps0, rpbase_dispe4, rpbase_disps4, rpbase_disps16,
+ rpbase_disps20, rpbase_dispe20,
+ /* Register index. */
+ rindex7_abs20, rindex8_abs20,
+ /* Register pair index. */
+ rpindex_disps0, rpindex_disps14, rpindex_disps20,
+ /* register. */
+ regr,
+ /* register pair. */
+ regp,
+ /* processor register. */
+ pregr,
+ /* processor register 32 bit. */
+ pregrp,
+ /* condition code - 4 bit. */
+ cc,
+ /* Not an operand. */
+ nulloperand,
+ /* Maximum supported operand. */
+ MAX_OPRD
+ }
+operand_type;
+
+/* CR16 instruction types. */
+
+#define NO_TYPE_INS 0
+#define ARITH_INS 1
+#define LD_STOR_INS 2
+#define BRANCH_INS 3
+#define ARITH_BYTE_INS 4
+#define SHIFT_INS 5
+#define BRANCH_NEQ_INS 6
+#define LD_STOR_INS_INC 7
+#define STOR_IMM_INS 8
+#define CSTBIT_INS 9
+
+/* Maximum value supported for instruction types. */
+#define CR16_INS_MAX (1 << 4)
+/* Mask to record an instruction type. */
+#define CR16_INS_MASK (CR16_INS_MAX - 1)
+/* Return instruction type, given instruction's attributes. */
+#define CR16_INS_TYPE(attr) ((attr) & CR16_INS_MASK)
+
+/* Indicates whether this instruction has a register list as parameter. */
+#define REG_LIST CR16_INS_MAX
+
+/* The operands in binary and assembly are placed in reverse order.
+ load - (REVERSE_MATCH)/store - (! REVERSE_MATCH). */
+#define REVERSE_MATCH (1 << 5)
+
+/* Printing formats, where the instruction prefix isn't consecutive. */
+#define FMT_1 (1 << 9) /* 0xF0F00000 */
+#define FMT_2 (1 << 10) /* 0xFFF0FF00 */
+#define FMT_3 (1 << 11) /* 0xFFF00F00 */
+#define FMT_4 (1 << 12) /* 0xFFF0F000 */
+#define FMT_5 (1 << 13) /* 0xFFF0FFF0 */
+#define FMT_CR16 (FMT_1 | FMT_2 | FMT_3 | FMT_4 | FMT_5)
+
+/* Indicates whether this instruction can be relaxed. */
+#define RELAXABLE (1 << 14)
+
+/* Indicates that instruction uses user registers (and not
+ general-purpose registers) as operands. */
+#define USER_REG (1 << 15)
+
+
+/* Instruction shouldn't allow 'sp' usage. */
+#define NO_SP (1 << 17)
+
+/* Instruction shouldn't allow to push a register which is used as a rptr. */
+#define NO_RPTR (1 << 18)
+
+/* Maximum operands per instruction. */
+#define MAX_OPERANDS 5
+/* Maximum register name length. */
+#define MAX_REGNAME_LEN 10
+/* Maximum instruction length. */
+#define MAX_INST_LEN 256
+
+
+/* Values defined for the flags field of a struct operand_entry. */
+
+/* Operand must be an unsigned number. */
+#define OP_UNSIGNED (1 << 0)
+/* Operand must be a signed number. */
+#define OP_SIGNED (1 << 1)
+/* Operand must be a negative number. */
+#define OP_NEG (1 << 2)
+/* A special load/stor 4-bit unsigned displacement operand. */
+#define OP_DEC (1 << 3)
+/* Operand must be an even number. */
+#define OP_EVEN (1 << 4)
+/* Operand is shifted right. */
+#define OP_SHIFT (1 << 5)
+/* Operand is shifted right and decremented. */
+#define OP_SHIFT_DEC (1 << 6)
+/* Operand has reserved escape sequences. */
+#define OP_ESC (1 << 7)
+/* Operand must be a ABS20 number. */
+#define OP_ABS20 (1 << 8)
+/* Operand must be a ABS24 number. */
+#define OP_ABS24 (1 << 9)
+/* Operand has reserved escape sequences type 1. */
+#define OP_ESC1 (1 << 10)
+
+/* Single operand description. */
+
+typedef struct
+ {
+ /* Operand type. */
+ operand_type op_type;
+ /* Operand location within the opcode. */
+ unsigned int shift;
+ }
+operand_desc;
+
+/* Instruction data structure used in instruction table. */
+
+typedef struct
+ {
+ /* Name. */
+ const char *mnemonic;
+ /* Size (in words). */
+ unsigned int size;
+ /* Constant prefix (matched by the disassembler). */
+ unsigned long match; /* ie opcode */
+ /* Match size (in bits). */
+ /* MASK: if( (i & match_bits) == match ) then match */
+ int match_bits;
+ /* Attributes. */
+ unsigned int flags;
+ /* Operands (always last, so unreferenced operands are initialized). */
+ operand_desc operands[MAX_OPERANDS];
+ }
+inst;
+
+/* Data structure for a single instruction's arguments (Operands). */
+
+typedef struct
+ {
+ /* Register or base register. */
+ reg r;
+ /* Register pair register. */
+ reg rp;
+ /* Index register. */
+ reg i_r;
+ /* Processor register. */
+ preg pr;
+ /* Processor register. 32 bit */
+ preg prp;
+ /* Constant/immediate/absolute value. */
+ long constant;
+ /* CC code. */
+ unsigned int cc;
+ /* Scaled index mode. */
+ unsigned int scale;
+ /* Argument type. */
+ argtype type;
+ /* Size of the argument (in bits) required to represent. */
+ int size;
+ /* The type of the expression. */
+ unsigned char X_op;
+ }
+argument;
+
+/* Internal structure to hold the various entities
+ corresponding to the current assembling instruction. */
+
+typedef struct
+ {
+ /* Number of arguments. */
+ int nargs;
+ /* The argument data structure for storing args (operands). */
+ argument arg[MAX_OPERANDS];
+/* The following fields are required only by CR16-assembler. */
+#ifdef TC_CR16
+ /* Expression used for setting the fixups (if any). */
+ expressionS exp;
+ bfd_reloc_code_real_type rtype;
+#endif /* TC_CR16 */
+ /* Instruction size (in bytes). */
+ int size;
+ }
+ins;
+
+/* Structure to hold information about predefined operands. */
+
+typedef struct
+ {
+ /* Size (in bits). */
+ unsigned int bit_size;
+ /* Argument type. */
+ argtype arg_type;
+ /* One bit syntax flags. */
+ int flags;
+ }
+operand_entry;
+
+/* Structure to hold trap handler information. */
+
+typedef struct
+ {
+ /* Trap name. */
+ char *name;
+ /* Index in dispatch table. */
+ unsigned int entry;
+ }
+trap_entry;
+
+/* Structure to hold information about predefined registers. */
+
+typedef struct
+ {
+ /* Name (string representation). */
+ char *name;
+ /* Value (enum representation). */
+ union
+ {
+ /* Register. */
+ reg reg_val;
+ /* processor register. */
+ preg preg_val;
+ } value;
+ /* Register image. */
+ int image;
+ /* Register type. */
+ reg_type type;
+ }
+reg_entry;
+
+/* CR16 opcode table. */
+extern const inst cr16_instruction[];
+extern const unsigned int cr16_num_opcodes;
+#define NUMOPCODES cr16_num_opcodes
+
+/* CR16 operands table. */
+extern const operand_entry cr16_optab[];
+
+/* CR16 registers table. */
+extern const reg_entry cr16_regtab[];
+extern const unsigned int cr16_num_regs;
+#define NUMREGS cr16_num_regs
+
+/* CR16 register pair table. */
+extern const reg_entry cr16_regptab[];
+extern const unsigned int cr16_num_regps;
+#define NUMREGPS cr16_num_regps
+
+/* CR16 processor registers table. */
+extern const reg_entry cr16_pregtab[];
+extern const unsigned int cr16_num_pregs;
+#define NUMPREGS cr16_num_pregs
+
+/* CR16 processor registers - 32 bit table. */
+extern const reg_entry cr16_pregptab[];
+extern const unsigned int cr16_num_pregps;
+#define NUMPREGPS cr16_num_pregps
+
+/* CR16 trap/interrupt table. */
+extern const trap_entry cr16_traps[];
+extern const unsigned int cr16_num_traps;
+#define NUMTRAPS cr16_num_traps
+
+/* CR16 CC - codes bit table. */
+extern const char * cr16_b_cond_tab[];
+extern const unsigned int cr16_num_cc;
+#define NUMCC cr16_num_cc;
+
+
+/* Table of instructions with no operands. */
+extern const char * cr16_no_op_insn[];
+
+/* Current instruction we're assembling. */
+extern const inst *instruction;
+
+/* A macro for representing the instruction "constant" opcode, that is,
+ the FIXED part of the instruction. The "constant" opcode is represented
+ as a 32-bit unsigned long, where OPC is expanded (by a left SHIFT)
+ over that range. */
+#define BIN(OPC,SHIFT) (OPC << SHIFT)
+
+/* Is the current instruction type is TYPE ? */
+#define IS_INSN_TYPE(TYPE) \
+ (CR16_INS_TYPE (instruction->flags) == TYPE)
+
+/* Is the current instruction mnemonic is MNEMONIC ? */
+#define IS_INSN_MNEMONIC(MNEMONIC) \
+ (strcmp (instruction->mnemonic, MNEMONIC) == 0)
+
+/* Does the current instruction has register list ? */
+#define INST_HAS_REG_LIST \
+ (instruction->flags & REG_LIST)
+
+
+/* Utility macros for string comparison. */
+#define streq(a, b) (strcmp (a, b) == 0)
+#define strneq(a, b, c) (strncmp (a, b, c) == 0)
+
+/* Long long type handling. */
+/* Replace all appearances of 'long long int' with LONGLONG. */
+typedef long long int LONGLONG;
+typedef unsigned long long ULONGLONG;
+
+#endif /* _CR16_H_ */
diff --git a/contrib/binutils/include/opcode/i386.h b/contrib/binutils/include/opcode/i386.h
index 2b2c1e0..4fe769a 100644
--- a/contrib/binutils/include/opcode/i386.h
+++ b/contrib/binutils/include/opcode/i386.h
@@ -1,6 +1,6 @@
-/* opcode/i386.h -- Intel 80386 opcode table
+/* opcode/i386.h -- Intel 80386 opcode macros
Copyright 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005
+ 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
@@ -31,7 +31,7 @@
This happens with all the non-commutative arithmetic floating point
operations with two register operands, where the source register is
- %st, and destination register is %st(i). See FloatDR below.
+ %st, and destination register is %st(i).
The affected opcode map is dceX, dcfX, deeX, defX. */
@@ -48,1668 +48,68 @@
#define OLDGCC_COMPAT SYSV386_COMPAT
#endif
-static const template i386_optab[] =
-{
-
-#define X None
-#define NoSuf (No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf)
-#define b_Suf (No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf)
-#define w_Suf (No_bSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf)
-#define l_Suf (No_bSuf|No_wSuf|No_sSuf|No_xSuf|No_qSuf)
-#define q_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf|No_xSuf)
-#define x_Suf (No_bSuf|No_wSuf|No_sSuf|No_lSuf|No_qSuf)
-#define bw_Suf (No_lSuf|No_sSuf|No_xSuf|No_qSuf)
-#define bl_Suf (No_wSuf|No_sSuf|No_xSuf|No_qSuf)
-#define wl_Suf (No_bSuf|No_sSuf|No_xSuf|No_qSuf)
-#define wlq_Suf (No_bSuf|No_sSuf|No_xSuf)
-#define lq_Suf (No_bSuf|No_wSuf|No_sSuf|No_xSuf)
-#define wq_Suf (No_bSuf|No_lSuf|No_sSuf|No_xSuf)
-#define sl_Suf (No_bSuf|No_wSuf|No_xSuf|No_qSuf)
-#define bwl_Suf (No_sSuf|No_xSuf|No_qSuf)
-#define bwlq_Suf (No_sSuf|No_xSuf)
-#define FP (NoSuf)
-#define l_FP (l_Suf)
-#define q_FP (q_Suf|NoRex64)
-#define x_FP (x_Suf|FloatMF)
-#define sl_FP (sl_Suf|FloatMF)
-#if SYSV386_COMPAT
-/* Someone forgot that the FloatR bit reverses the operation when not
- equal to the FloatD bit. ie. Changing only FloatD results in the
- destination being swapped *and* the direction being reversed. */
-#define FloatDR FloatD
-#else
-#define FloatDR (FloatD|FloatR)
-#endif
-
-/* Move instructions. */
#define MOV_AX_DISP32 0xa0
-/* We put the 64bit displacement first and we only mark constants
- larger than 32bit as Disp64. */
-{ "mov", 2, 0xa0, X, Cpu64, bwlq_Suf|D|W, { Disp64, Acc, 0 } },
-{ "mov", 2, 0xa0, X, CpuNo64,bwl_Suf|D|W, { Disp16|Disp32, Acc, 0 } },
-{ "mov", 2, 0x88, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-/* In the 64bit mode the short form mov immediate is redefined to have
- 64bit value. */
-{ "mov", 2, 0xb0, X, 0, bwl_Suf|W|ShortForm, { EncImm, Reg8|Reg16|Reg32, 0 } },
-{ "mov", 2, 0xc6, 0, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0 } },
-{ "mov", 2, 0xb0, X, Cpu64, q_Suf|W|ShortForm, { Imm64, Reg64, 0 } },
-/* The segment register moves accept WordReg so that a segment register
- can be copied to a 32 bit register, and vice versa, without using a
- size prefix. When moving to a 32 bit register, the upper 16 bits
- are set to an implementation defined value (on the Pentium Pro,
- the implementation defined value is zero). */
-{ "mov", 2, 0x8c, X, 0, wl_Suf|Modrm, { SReg2, WordReg|InvMem, 0 } },
-{ "mov", 2, 0x8c, X, 0, w_Suf|Modrm|IgnoreSize, { SReg2, WordMem, 0 } },
-{ "mov", 2, 0x8c, X, Cpu386, wl_Suf|Modrm, { SReg3, WordReg|InvMem, 0 } },
-{ "mov", 2, 0x8c, X, Cpu386, w_Suf|Modrm|IgnoreSize, { SReg3, WordMem, 0 } },
-{ "mov", 2, 0x8e, X, 0, wl_Suf|Modrm|IgnoreSize, { WordReg, SReg2, 0 } },
-{ "mov", 2, 0x8e, X, 0, w_Suf|Modrm|IgnoreSize, { WordMem, SReg2, 0 } },
-{ "mov", 2, 0x8e, X, Cpu386, wl_Suf|Modrm|IgnoreSize, { WordReg, SReg3, 0 } },
-{ "mov", 2, 0x8e, X, Cpu386, w_Suf|Modrm|IgnoreSize, { WordMem, SReg3, 0 } },
-/* Move to/from control debug registers. In the 16 or 32bit modes they are 32bit. In the 64bit
- mode they are 64bit.*/
-{ "mov", 2, 0x0f20, X, Cpu386|CpuNo64, l_Suf|D|Modrm|IgnoreSize,{ Control, Reg32|InvMem, 0} },
-{ "mov", 2, 0x0f20, X, Cpu64, q_Suf|D|Modrm|IgnoreSize|NoRex64,{ Control, Reg64|InvMem, 0} },
-{ "mov", 2, 0x0f21, X, Cpu386|CpuNo64, l_Suf|D|Modrm|IgnoreSize,{ Debug, Reg32|InvMem, 0} },
-{ "mov", 2, 0x0f21, X, Cpu64, q_Suf|D|Modrm|IgnoreSize|NoRex64,{ Debug, Reg64|InvMem, 0} },
-{ "mov", 2, 0x0f24, X, Cpu386|CpuNo64, l_Suf|D|Modrm|IgnoreSize, { Test, Reg32|InvMem, 0} },
-{ "movabs",2, 0xa0, X, Cpu64, bwlq_Suf|D|W, { Disp64, Acc, 0 } },
-{ "movabs",2, 0xb0, X, Cpu64, q_Suf|W|ShortForm, { Imm64, Reg64, 0 } },
-
-/* Move with sign extend. */
-/* "movsbl" & "movsbw" must not be unified into "movsb" to avoid
- conflict with the "movs" string move instruction. */
-{"movsbl", 2, 0x0fbe, X, Cpu386, NoSuf|Modrm, { Reg8|ByteMem, Reg32, 0} },
-{"movsbw", 2, 0x0fbe, X, Cpu386, NoSuf|Modrm, { Reg8|ByteMem, Reg16, 0} },
-{"movswl", 2, 0x0fbf, X, Cpu386, NoSuf|Modrm, { Reg16|ShortMem,Reg32, 0} },
-{"movsbq", 2, 0x0fbe, X, Cpu64, NoSuf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} },
-{"movswq", 2, 0x0fbf, X, Cpu64, NoSuf|Modrm|Rex64, { Reg16|ShortMem,Reg64, 0} },
-{"movslq", 2, 0x63, X, Cpu64, NoSuf|Modrm|Rex64, { Reg32|WordMem, Reg64, 0} },
-/* Intel Syntax next 3 insns */
-{"movsx", 2, 0x0fbe, X, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-{"movsx", 2, 0x0fbf, X, Cpu386, w_Suf|Modrm, { Reg16|ShortMem, Reg32|Reg64, 0} },
-{"movsx", 2, 0x63, X, Cpu64, l_Suf|Modrm|Rex64, { Reg32|WordMem, Reg64, 0} },
-
-/* Move with zero extend. We can't remove "movzb" since existing
- assembly codes may use it. */
-{"movzb", 2, 0x0fb6, X, Cpu386, wl_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-/* "movzbl" & "movzbw" should not be unified into "movzb" for
- consistency with the sign extending moves above. */
-{"movzbl", 2, 0x0fb6, X, Cpu386, NoSuf|Modrm, { Reg8|ByteMem, Reg32, 0} },
-{"movzbw", 2, 0x0fb6, X, Cpu386, NoSuf|Modrm, { Reg8|ByteMem, Reg16, 0} },
-{"movzwl", 2, 0x0fb7, X, Cpu386, NoSuf|Modrm, { Reg16|ShortMem, Reg32, 0} },
-/* These instructions are not particulary useful, since the zero extend
- 32->64 is implicit, but we can encode them. */
-{"movzbq", 2, 0x0fb6, X, Cpu64, NoSuf|Modrm|Rex64, { Reg8|ByteMem, Reg64, 0} },
-{"movzwq", 2, 0x0fb7, X, Cpu64, NoSuf|Modrm|Rex64, { Reg16|ShortMem, Reg64, 0} },
-/* Intel Syntax next 2 insns (the 64-bit variants are not particulary useful,
- since the zero extend 32->64 is implicit, but we can encode them). */
-{"movzx", 2, 0x0fb6, X, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, WordReg, 0} },
-{"movzx", 2, 0x0fb7, X, Cpu386, w_Suf|Modrm, { Reg16|ShortMem, Reg32|Reg64, 0} },
-
-/* Push instructions. */
-{"push", 1, 0x50, X, CpuNo64, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
-{"push", 1, 0xff, 6, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
-{"push", 1, 0x6a, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { Imm8S, 0, 0} },
-{"push", 1, 0x68, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { Imm16|Imm32, 0, 0} },
-{"push", 1, 0x06, X, CpuNo64, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
-{"push", 1, 0x0fa0, X, Cpu386|CpuNo64, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
-/* In 64bit mode, the operand size is implicitly 64bit. */
-{"push", 1, 0x50, X, Cpu64, wq_Suf|ShortForm|DefaultSize|NoRex64, { Reg16|Reg64, 0, 0 } },
-{"push", 1, 0xff, 6, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { Reg16|Reg64|WordMem, 0, 0 } },
-{"push", 1, 0x6a, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm8S, 0, 0} },
-{"push", 1, 0x68, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm32S|Imm16, 0, 0} },
-{"push", 1, 0x0fa0, X, Cpu64, wq_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
-
-{"pusha", 0, 0x60, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0 } },
-
-/* Pop instructions. */
-{"pop", 1, 0x58, X, CpuNo64, wl_Suf|ShortForm|DefaultSize, { WordReg, 0, 0 } },
-{"pop", 1, 0x8f, 0, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem, 0, 0 } },
#define POP_SEG_SHORT 0x07
-{"pop", 1, 0x07, X, CpuNo64, wl_Suf|Seg2ShortForm|DefaultSize, { SReg2, 0, 0 } },
-{"pop", 1, 0x0fa1, X, Cpu386|CpuNo64, wl_Suf|Seg3ShortForm|DefaultSize, { SReg3, 0, 0 } },
-/* In 64bit mode, the operand size is implicitly 64bit. */
-{"pop", 1, 0x58, X, Cpu64, wq_Suf|ShortForm|DefaultSize|NoRex64, { Reg16|Reg64, 0, 0 } },
-{"pop", 1, 0x8f, 0, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { Reg16|Reg64|WordMem, 0, 0 } },
-{"pop", 1, 0x0fa1, X, Cpu64, wq_Suf|Seg3ShortForm|DefaultSize|NoRex64, { SReg3, 0, 0 } },
-
-{"popa", 0, 0x61, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0 } },
-
-/* Exchange instructions.
- xchg commutes: we allow both operand orders.
-
- In the 64bit code, xchg eax, eax is reused for new nop instruction. */
-#if 0 /* While the two entries that are disabled generate shorter code
- for xchg eax, reg (on x86_64), the special case xchg eax, eax
- does not get handled correctly - it degenerates into nop, but
- that way the side effect of zero-extending eax to rax is lost. */
-{"xchg", 2, 0x90, X, 0, wlq_Suf|ShortForm, { WordReg, Acc, 0 } },
-{"xchg", 2, 0x90, X, 0, wlq_Suf|ShortForm, { Acc, WordReg, 0 } },
-#else
-{"xchg", 2, 0x90, X, CpuNo64, wl_Suf|ShortForm, { WordReg, Acc, 0 } },
-{"xchg", 2, 0x90, X, CpuNo64, wl_Suf|ShortForm, { Acc, WordReg, 0 } },
-{"xchg", 2, 0x90, X, Cpu64, wq_Suf|ShortForm, { Reg16|Reg64, Acc, 0 } },
-{"xchg", 2, 0x90, X, Cpu64, wq_Suf|ShortForm, { Acc, Reg16|Reg64, 0 } },
-#endif
-{"xchg", 2, 0x86, X, 0, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"xchg", 2, 0x86, X, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Reg, 0 } },
-
-/* In/out from ports. */
-/* XXX should reject %rax */
-{"in", 2, 0xe4, X, 0, bwl_Suf|W, { Imm8, Acc, 0 } },
-{"in", 2, 0xec, X, 0, bwl_Suf|W, { InOutPortReg, Acc, 0 } },
-{"in", 1, 0xe4, X, 0, bwl_Suf|W, { Imm8, 0, 0 } },
-{"in", 1, 0xec, X, 0, bwl_Suf|W, { InOutPortReg, 0, 0 } },
-{"out", 2, 0xe6, X, 0, bwl_Suf|W, { Acc, Imm8, 0 } },
-{"out", 2, 0xee, X, 0, bwl_Suf|W, { Acc, InOutPortReg, 0 } },
-{"out", 1, 0xe6, X, 0, bwl_Suf|W, { Imm8, 0, 0 } },
-{"out", 1, 0xee, X, 0, bwl_Suf|W, { InOutPortReg, 0, 0 } },
-
-/* Load effective address. */
-{"lea", 2, 0x8d, X, 0, wlq_Suf|Modrm, { WordMem, WordReg, 0 } },
-
-/* Load segment registers from memory. */
-{"lds", 2, 0xc5, X, CpuNo64, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"les", 2, 0xc4, X, CpuNo64, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lfs", 2, 0x0fb4, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lgs", 2, 0x0fb5, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-{"lss", 2, 0x0fb2, X, Cpu386, wl_Suf|Modrm, { WordMem, WordReg, 0} },
-
-/* Flags register instructions. */
-{"clc", 0, 0xf8, X, 0, NoSuf, { 0, 0, 0} },
-{"cld", 0, 0xfc, X, 0, NoSuf, { 0, 0, 0} },
-{"cli", 0, 0xfa, X, 0, NoSuf, { 0, 0, 0} },
-{"clts", 0, 0x0f06, X, Cpu286, NoSuf, { 0, 0, 0} },
-{"cmc", 0, 0xf5, X, 0, NoSuf, { 0, 0, 0} },
-{"lahf", 0, 0x9f, X, 0, NoSuf, { 0, 0, 0} },
-{"sahf", 0, 0x9e, X, 0, NoSuf, { 0, 0, 0} },
-{"pushf", 0, 0x9c, X, CpuNo64,wl_Suf|DefaultSize, { 0, 0, 0} },
-{"pushf", 0, 0x9c, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
-{"popf", 0, 0x9d, X, CpuNo64,wl_Suf|DefaultSize, { 0, 0, 0} },
-{"popf", 0, 0x9d, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
-{"stc", 0, 0xf9, X, 0, NoSuf, { 0, 0, 0} },
-{"std", 0, 0xfd, X, 0, NoSuf, { 0, 0, 0} },
-{"sti", 0, 0xfb, X, 0, NoSuf, { 0, 0, 0} },
-
-/* Arithmetic. */
-{"add", 2, 0x00, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"add", 2, 0x83, 0, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"add", 2, 0x04, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"add", 2, 0x80, 0, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-{"inc", 1, 0x40, X, CpuNo64,wl_Suf|ShortForm, { WordReg, 0, 0} },
-{"inc", 1, 0xfe, 0, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sub", 2, 0x28, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"sub", 2, 0x83, 5, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sub", 2, 0x2c, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"sub", 2, 0x80, 5, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-{"dec", 1, 0x48, X, CpuNo64, wl_Suf|ShortForm, { WordReg, 0, 0} },
-{"dec", 1, 0xfe, 1, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sbb", 2, 0x18, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"sbb", 2, 0x83, 3, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"sbb", 2, 0x1c, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"sbb", 2, 0x80, 3, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-{"cmp", 2, 0x38, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"cmp", 2, 0x83, 7, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"cmp", 2, 0x3c, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"cmp", 2, 0x80, 7, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-{"test", 2, 0x84, X, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Reg, 0} },
-{"test", 2, 0x84, X, 0, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"test", 2, 0xa8, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"test", 2, 0xf6, 0, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-{"and", 2, 0x20, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"and", 2, 0x83, 4, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"and", 2, 0x24, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"and", 2, 0x80, 4, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-{"or", 2, 0x08, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"or", 2, 0x83, 1, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"or", 2, 0x0c, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"or", 2, 0x80, 1, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-{"xor", 2, 0x30, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"xor", 2, 0x83, 6, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"xor", 2, 0x34, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"xor", 2, 0x80, 6, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-/* clr with 1 operand is really xor with 2 operands. */
-{"clr", 1, 0x30, X, 0, bwlq_Suf|W|Modrm|regKludge, { Reg, 0, 0 } },
-
-{"adc", 2, 0x10, X, 0, bwlq_Suf|D|W|Modrm, { Reg, Reg|AnyMem, 0} },
-{"adc", 2, 0x83, 2, 0, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, 0} },
-{"adc", 2, 0x14, X, 0, bwlq_Suf|W, { EncImm, Acc, 0} },
-{"adc", 2, 0x80, 2, 0, bwlq_Suf|W|Modrm, { EncImm, Reg|AnyMem, 0} },
-
-{"neg", 1, 0xf6, 3, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"not", 1, 0xf6, 2, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"aaa", 0, 0x37, X, CpuNo64, NoSuf, { 0, 0, 0} },
-{"aas", 0, 0x3f, X, CpuNo64, NoSuf, { 0, 0, 0} },
-{"daa", 0, 0x27, X, CpuNo64, NoSuf, { 0, 0, 0} },
-{"das", 0, 0x2f, X, CpuNo64, NoSuf, { 0, 0, 0} },
-{"aad", 0, 0xd50a, X, CpuNo64, NoSuf, { 0, 0, 0} },
-{"aad", 1, 0xd5, X, CpuNo64, NoSuf, { Imm8, 0, 0} },
-{"aam", 0, 0xd40a, X, CpuNo64, NoSuf, { 0, 0, 0} },
-{"aam", 1, 0xd4, X, CpuNo64, NoSuf, { Imm8, 0, 0} },
-
-/* Conversion insns. */
-/* Intel naming */
-{"cbw", 0, 0x98, X, 0, NoSuf|Size16, { 0, 0, 0} },
-{"cdqe", 0, 0x98, X, Cpu64, NoSuf|Size64, { 0, 0, 0} },
-{"cwde", 0, 0x98, X, 0, NoSuf|Size32, { 0, 0, 0} },
-{"cwd", 0, 0x99, X, 0, NoSuf|Size16, { 0, 0, 0} },
-{"cdq", 0, 0x99, X, 0, NoSuf|Size32, { 0, 0, 0} },
-{"cqo", 0, 0x99, X, Cpu64, NoSuf|Size64, { 0, 0, 0} },
-/* AT&T naming */
-{"cbtw", 0, 0x98, X, 0, NoSuf|Size16, { 0, 0, 0} },
-{"cltq", 0, 0x98, X, Cpu64, NoSuf|Size64, { 0, 0, 0} },
-{"cwtl", 0, 0x98, X, 0, NoSuf|Size32, { 0, 0, 0} },
-{"cwtd", 0, 0x99, X, 0, NoSuf|Size16, { 0, 0, 0} },
-{"cltd", 0, 0x99, X, 0, NoSuf|Size32, { 0, 0, 0} },
-{"cqto", 0, 0x99, X, Cpu64, NoSuf|Size64, { 0, 0, 0} },
-
-/* Warning! the mul/imul (opcode 0xf6) must only have 1 operand! They are
- expanding 64-bit multiplies, and *cannot* be selected to accomplish
- 'imul %ebx, %eax' (opcode 0x0faf must be used in this case)
- These multiplies can only be selected with single operand forms. */
-{"mul", 1, 0xf6, 4, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"imul", 1, 0xf6, 5, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"imul", 2, 0x0faf, X, Cpu386, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"imul", 3, 0x6b, X, Cpu186, wlq_Suf|Modrm, { Imm8S, WordReg|WordMem, WordReg} },
-{"imul", 3, 0x69, X, Cpu186, wlq_Suf|Modrm, { Imm16|Imm32S|Imm32, WordReg|WordMem, WordReg} },
-/* imul with 2 operands mimics imul with 3 by putting the register in
- both i.rm.reg & i.rm.regmem fields. regKludge enables this
- transformation. */
-{"imul", 2, 0x6b, X, Cpu186, wlq_Suf|Modrm|regKludge,{ Imm8S, WordReg, 0} },
-{"imul", 2, 0x69, X, Cpu186, wlq_Suf|Modrm|regKludge,{ Imm16|Imm32S|Imm32, WordReg, 0} },
-
-{"div", 1, 0xf6, 6, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"div", 2, 0xf6, 6, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
-{"idiv", 1, 0xf6, 7, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-{"idiv", 2, 0xf6, 7, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, Acc, 0} },
-
-{"rol", 2, 0xd0, 0, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rol", 2, 0xc0, 0, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rol", 2, 0xd2, 0, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rol", 1, 0xd0, 0, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"ror", 2, 0xd0, 1, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"ror", 2, 0xc0, 1, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"ror", 2, 0xd2, 1, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"ror", 1, 0xd0, 1, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"rcl", 2, 0xd0, 2, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rcl", 2, 0xc0, 2, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rcl", 2, 0xd2, 2, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rcl", 1, 0xd0, 2, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"rcr", 2, 0xd0, 3, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"rcr", 2, 0xc0, 3, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"rcr", 2, 0xd2, 3, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"rcr", 1, 0xd0, 3, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sal", 2, 0xd0, 4, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"sal", 2, 0xc0, 4, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"sal", 2, 0xd2, 4, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"sal", 1, 0xd0, 4, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"shl", 2, 0xd0, 4, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"shl", 2, 0xc0, 4, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"shl", 2, 0xd2, 4, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"shl", 1, 0xd0, 4, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"shr", 2, 0xd0, 5, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"shr", 2, 0xc0, 5, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"shr", 2, 0xd2, 5, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"shr", 1, 0xd0, 5, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"sar", 2, 0xd0, 7, 0, bwlq_Suf|W|Modrm, { Imm1, Reg|AnyMem, 0} },
-{"sar", 2, 0xc0, 7, Cpu186, bwlq_Suf|W|Modrm, { Imm8, Reg|AnyMem, 0} },
-{"sar", 2, 0xd2, 7, 0, bwlq_Suf|W|Modrm, { ShiftCount, Reg|AnyMem, 0} },
-{"sar", 1, 0xd0, 7, 0, bwlq_Suf|W|Modrm, { Reg|AnyMem, 0, 0} },
-
-{"shld", 3, 0x0fa4, X, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
-{"shld", 3, 0x0fa5, X, Cpu386, wlq_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
-{"shld", 2, 0x0fa5, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-
-{"shrd", 3, 0x0fac, X, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg, WordReg|WordMem} },
-{"shrd", 3, 0x0fad, X, Cpu386, wlq_Suf|Modrm, { ShiftCount, WordReg, WordReg|WordMem} },
-{"shrd", 2, 0x0fad, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-
-/* Control transfer instructions. */
-{"call", 1, 0xe8, X, CpuNo64, wl_Suf|JumpDword|DefaultSize, { Disp16|Disp32, 0, 0} },
-{"call", 1, 0xe8, X, Cpu64, wq_Suf|JumpDword|DefaultSize|NoRex64, { Disp16|Disp32, 0, 0} },
-{"call", 1, 0xff, 2, CpuNo64, wl_Suf|Modrm|DefaultSize, { WordReg|WordMem|JumpAbsolute, 0, 0} },
-{"call", 1, 0xff, 2, Cpu64, wq_Suf|Modrm|DefaultSize|NoRex64, { Reg16|Reg64|WordMem|LLongMem|JumpAbsolute, 0, 0} },
-/* Intel Syntax */
-{"call", 2, 0x9a, X, CpuNo64, wl_Suf|JumpInterSegment|DefaultSize, { Imm16, Imm16|Imm32, 0} },
-/* Intel Syntax */
-{"call", 1, 0xff, 3, 0, x_Suf|Modrm|DefaultSize, {WordMem|JumpAbsolute, 0, 0} },
-{"lcall", 2, 0x9a, X, CpuNo64, wl_Suf|JumpInterSegment|DefaultSize, {Imm16, Imm16|Imm32, 0} },
-{"lcall", 1, 0xff, 3, 0, wl_Suf|Modrm|DefaultSize, {WordMem|JumpAbsolute, 0, 0} },
-
#define JUMP_PC_RELATIVE 0xeb
-{"jmp", 1, 0xeb, X, 0, NoSuf|Jump, { Disp,0, 0} },
-{"jmp", 1, 0xff, 4, CpuNo64, wl_Suf|Modrm, { WordReg|WordMem|JumpAbsolute, 0, 0} },
-{"jmp", 1, 0xff, 4, Cpu64, wq_Suf|Modrm|NoRex64, { Reg16|Reg64|ShortMem|LLongMem|JumpAbsolute, 0, 0} },
-/* Intel Syntax. */
-{"jmp", 2, 0xea, X, CpuNo64,wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
-/* Intel Syntax. */
-{"jmp", 1, 0xff, 5, 0, x_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} },
-{"ljmp", 2, 0xea, X, CpuNo64, wl_Suf|JumpInterSegment, { Imm16, Imm16|Imm32, 0} },
-{"ljmp", 1, 0xff, 5, 0, wl_Suf|Modrm, { WordMem|JumpAbsolute, 0, 0} },
-
-{"ret", 0, 0xc3, X, CpuNo64,wl_Suf|DefaultSize, { 0, 0, 0} },
-{"ret", 1, 0xc2, X, CpuNo64,wl_Suf|DefaultSize, { Imm16, 0, 0} },
-{"ret", 0, 0xc3, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ 0, 0, 0} },
-{"ret", 1, 0xc2, X, Cpu64, wq_Suf|DefaultSize|NoRex64,{ Imm16, 0, 0} },
-{"lret", 0, 0xcb, X, 0, wlq_Suf|DefaultSize, { 0, 0, 0} },
-{"lret", 1, 0xca, X, 0, wlq_Suf|DefaultSize, { Imm16, 0, 0} },
-{"enter", 2, 0xc8, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { Imm16, Imm8, 0} },
-{"enter", 2, 0xc8, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { Imm16, Imm8, 0} },
-{"leave", 0, 0xc9, X, Cpu186|CpuNo64, wl_Suf|DefaultSize, { 0, 0, 0} },
-{"leave", 0, 0xc9, X, Cpu64, wq_Suf|DefaultSize|NoRex64, { 0, 0, 0} },
-
-/* Conditional jumps. */
-{"jo", 1, 0x70, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jno", 1, 0x71, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jb", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jc", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnae", 1, 0x72, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnb", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnc", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jae", 1, 0x73, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"je", 1, 0x74, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jz", 1, 0x74, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jne", 1, 0x75, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnz", 1, 0x75, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jbe", 1, 0x76, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jna", 1, 0x76, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnbe", 1, 0x77, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"ja", 1, 0x77, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"js", 1, 0x78, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jns", 1, 0x79, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jp", 1, 0x7a, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jpe", 1, 0x7a, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnp", 1, 0x7b, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jpo", 1, 0x7b, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jl", 1, 0x7c, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnge", 1, 0x7c, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnl", 1, 0x7d, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jge", 1, 0x7d, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jle", 1, 0x7e, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jng", 1, 0x7e, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jnle", 1, 0x7f, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-{"jg", 1, 0x7f, X, 0, NoSuf|Jump, { Disp, 0, 0} },
-
-/* jcxz vs. jecxz is chosen on the basis of the address size prefix. */
-{"jcxz", 1, 0xe3, X, CpuNo64,NoSuf|JumpByte|Size16, { Disp, 0, 0} },
-{"jecxz", 1, 0xe3, X, CpuNo64,NoSuf|JumpByte|Size32, { Disp, 0, 0} },
-{"jecxz", 1, 0x67e3, X, Cpu64,NoSuf|JumpByte|Size32, { Disp, 0, 0} },
-{"jrcxz", 1, 0xe3, X, Cpu64, NoSuf|JumpByte|Size64|NoRex64, { Disp, 0, 0} },
-
-/* The loop instructions also use the address size prefix to select
- %cx rather than %ecx for the loop count, so the `w' form of these
- instructions emit an address size prefix rather than a data size
- prefix. */
-{"loop", 1, 0xe2, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
-{"loop", 1, 0xe2, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
-{"loopz", 1, 0xe1, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
-{"loopz", 1, 0xe1, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
-{"loope", 1, 0xe1, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
-{"loope", 1, 0xe1, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
-{"loopnz", 1, 0xe0, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
-{"loopnz", 1, 0xe0, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
-{"loopne", 1, 0xe0, X, CpuNo64,wl_Suf|JumpByte,{ Disp, 0, 0} },
-{"loopne", 1, 0xe0, X, Cpu64, lq_Suf|JumpByte|NoRex64,{ Disp, 0, 0} },
-
-/* Set byte on flag instructions. */
-{"seto", 1, 0x0f90, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setno", 1, 0x0f91, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setb", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setc", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnae", 1, 0x0f92, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnb", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnc", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setae", 1, 0x0f93, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"sete", 1, 0x0f94, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setz", 1, 0x0f94, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setne", 1, 0x0f95, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnz", 1, 0x0f95, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setbe", 1, 0x0f96, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setna", 1, 0x0f96, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnbe", 1, 0x0f97, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"seta", 1, 0x0f97, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"sets", 1, 0x0f98, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setns", 1, 0x0f99, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setp", 1, 0x0f9a, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setpe", 1, 0x0f9a, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnp", 1, 0x0f9b, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setpo", 1, 0x0f9b, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setl", 1, 0x0f9c, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnge", 1, 0x0f9c, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnl", 1, 0x0f9d, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setge", 1, 0x0f9d, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setle", 1, 0x0f9e, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setng", 1, 0x0f9e, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setnle", 1, 0x0f9f, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-{"setg", 1, 0x0f9f, 0, Cpu386, b_Suf|Modrm, { Reg8|ByteMem, 0, 0} },
-
-/* String manipulation. */
-{"cmps", 0, 0xa6, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"cmps", 2, 0xa6, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
-{"scmp", 0, 0xa6, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"scmp", 2, 0xa6, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, AnyMem, 0} },
-{"ins", 0, 0x6c, X, Cpu186, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"ins", 2, 0x6c, X, Cpu186, bwl_Suf|W|IsString, { InOutPortReg, AnyMem|EsSeg, 0} },
-{"outs", 0, 0x6e, X, Cpu186, bwl_Suf|W|IsString, { 0, 0, 0} },
-{"outs", 2, 0x6e, X, Cpu186, bwl_Suf|W|IsString, { AnyMem, InOutPortReg, 0} },
-{"lods", 0, 0xac, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"lods", 1, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, 0, 0} },
-{"lods", 2, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, Acc, 0} },
-{"slod", 0, 0xac, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"slod", 1, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, 0, 0} },
-{"slod", 2, 0xac, X, 0, bwlq_Suf|W|IsString, { AnyMem, Acc, 0} },
-{"movs", 0, 0xa4, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"movs", 2, 0xa4, X, 0, bwlq_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
-{"smov", 0, 0xa4, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"smov", 2, 0xa4, X, 0, bwlq_Suf|W|IsString, { AnyMem, AnyMem|EsSeg, 0} },
-{"scas", 0, 0xae, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"scas", 1, 0xae, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"scas", 2, 0xae, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
-{"ssca", 0, 0xae, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"ssca", 1, 0xae, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"ssca", 2, 0xae, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, Acc, 0} },
-{"stos", 0, 0xaa, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"stos", 1, 0xaa, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"stos", 2, 0xaa, X, 0, bwlq_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
-{"ssto", 0, 0xaa, X, 0, bwlq_Suf|W|IsString, { 0, 0, 0} },
-{"ssto", 1, 0xaa, X, 0, bwlq_Suf|W|IsString, { AnyMem|EsSeg, 0, 0} },
-{"ssto", 2, 0xaa, X, 0, bwlq_Suf|W|IsString, { Acc, AnyMem|EsSeg, 0} },
-{"xlat", 0, 0xd7, X, 0, b_Suf|IsString, { 0, 0, 0} },
-{"xlat", 1, 0xd7, X, 0, b_Suf|IsString, { AnyMem, 0, 0} },
-
-/* Bit manipulation. */
-{"bsf", 2, 0x0fbc, X, Cpu386, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"bsr", 2, 0x0fbd, X, Cpu386, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"bt", 2, 0x0fa3, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"bt", 2, 0x0fba, 4, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"btc", 2, 0x0fbb, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"btc", 2, 0x0fba, 7, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"btr", 2, 0x0fb3, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"btr", 2, 0x0fba, 6, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-{"bts", 2, 0x0fab, X, Cpu386, wlq_Suf|Modrm, { WordReg, WordReg|WordMem, 0} },
-{"bts", 2, 0x0fba, 5, Cpu386, wlq_Suf|Modrm, { Imm8, WordReg|WordMem, 0} },
-
-/* Interrupts & op. sys insns. */
-/* See gas/config/tc-i386.c for conversion of 'int $3' into the special
- int 3 insn. */
#define INT_OPCODE 0xcd
#define INT3_OPCODE 0xcc
-{"int", 1, 0xcd, X, 0, NoSuf, { Imm8, 0, 0} },
-{"int3", 0, 0xcc, X, 0, NoSuf, { 0, 0, 0} },
-{"into", 0, 0xce, X, CpuNo64, NoSuf, { 0, 0, 0} },
-{"iret", 0, 0xcf, X, 0, wlq_Suf|DefaultSize, { 0, 0, 0} },
-/* i386sl, i486sl, later 486, and Pentium. */
-{"rsm", 0, 0x0faa, X, Cpu386, NoSuf, { 0, 0, 0} },
-
-{"bound", 2, 0x62, X, Cpu186|CpuNo64, wl_Suf|Modrm, { WordReg, WordMem, 0} },
-
-{"hlt", 0, 0xf4, X, 0, NoSuf, { 0, 0, 0} },
-/* nop is actually 'xchgl %eax, %eax'. */
-{"nop", 0, 0x90, X, 0, NoSuf, { 0, 0, 0} },
-
-/* Protection control. */
-{"arpl", 2, 0x63, X, Cpu286|CpuNo64, w_Suf|Modrm|IgnoreSize,{ Reg16, Reg16|ShortMem, 0} },
-{"lar", 2, 0x0f02, X, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"lgdt", 1, 0x0f01, 2, Cpu286|CpuNo64, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"lgdt", 1, 0x0f01, 2, Cpu64, q_Suf|Modrm|NoRex64, { LLongMem, 0, 0} },
-{"lidt", 1, 0x0f01, 3, Cpu286|CpuNo64, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"lidt", 1, 0x0f01, 3, Cpu64, q_Suf|Modrm|NoRex64, { LLongMem, 0, 0} },
-{"lldt", 1, 0x0f00, 2, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"lmsw", 1, 0x0f01, 6, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-{"lsl", 2, 0x0f03, X, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"ltr", 1, 0x0f00, 3, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
-
-{"sgdt", 1, 0x0f01, 0, Cpu286|CpuNo64, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"sgdt", 1, 0x0f01, 0, Cpu64, q_Suf|Modrm|NoRex64, { LLongMem, 0, 0} },
-{"sidt", 1, 0x0f01, 1, Cpu286|CpuNo64, wl_Suf|Modrm, { WordMem, 0, 0} },
-{"sidt", 1, 0x0f01, 1, Cpu64, q_Suf|Modrm|NoRex64, { LLongMem, 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} },
-
-/* Floating point instructions. */
-
-/* load */
-{"fld", 1, 0xd9c0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fld", 1, 0xd9, 0, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fld", 1, 0xd9c0, X, 0, l_FP|ShortForm|IgnoreSize|Ugh, { FloatReg, 0, 0} },
-/* Intel Syntax */
-{"fld", 1, 0xdb, 5, 0, x_FP|Modrm, { LLongMem, 0, 0} },
-{"fild", 1, 0xdf, 0, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-{"fild", 1, 0xdf, 5, 0, q_FP|Modrm, { LLongMem, 0, 0} },
-{"fildll", 1, 0xdf, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fldt", 1, 0xdb, 5, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fbld", 1, 0xdf, 4, 0, x_Suf|Modrm, { LLongMem, 0, 0} },
-
-/* store (no pop) */
-{"fst", 1, 0xddd0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fst", 1, 0xd9, 2, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fst", 1, 0xddd0, X, 0, l_FP|ShortForm|IgnoreSize|Ugh, { FloatReg, 0, 0} },
-{"fist", 1, 0xdf, 2, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-
-/* store (with pop) */
-{"fstp", 1, 0xddd8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fstp", 1, 0xd9, 3, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fstp", 1, 0xddd8, X, 0, l_FP|ShortForm|IgnoreSize|Ugh, { FloatReg, 0, 0} },
-/* Intel Syntax */
-{"fstp", 1, 0xdb, 7, 0, x_FP|Modrm, { LLongMem, 0, 0} },
-{"fistp", 1, 0xdf, 3, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-{"fistp", 1, 0xdf, 7, 0, q_FP|Modrm, { LLongMem, 0, 0} },
-{"fistpll",1, 0xdf, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fstpt", 1, 0xdb, 7, 0, FP|Modrm, { LLongMem, 0, 0} },
-{"fbstp", 1, 0xdf, 6, 0, x_Suf|Modrm, { LLongMem, 0, 0} },
-
-/* exchange %st<n> with %st0 */
-{"fxch", 1, 0xd9c8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fxch %st(1) */
-{"fxch", 0, 0xd9c9, X, 0, FP, { 0, 0, 0} },
-
-/* comparison (without pop) */
-{"fcom", 1, 0xd8d0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fcom %st(1) */
-{"fcom", 0, 0xd8d1, X, 0, FP, { 0, 0, 0} },
-{"fcom", 1, 0xd8, 2, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fcom", 1, 0xd8d0, X, 0, l_FP|ShortForm|IgnoreSize|Ugh, { FloatReg, 0, 0} },
-{"ficom", 1, 0xde, 2, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-
-/* comparison (with pop) */
-{"fcomp", 1, 0xd8d8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fcomp %st(1) */
-{"fcomp", 0, 0xd8d9, X, 0, FP, { 0, 0, 0} },
-{"fcomp", 1, 0xd8, 3, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fcomp", 1, 0xd8d8, X, 0, l_FP|ShortForm|IgnoreSize|Ugh, { FloatReg, 0, 0} },
-{"ficomp", 1, 0xde, 3, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-{"fcompp", 0, 0xded9, X, 0, FP, { 0, 0, 0} },
-
-/* unordered comparison (with pop) */
-{"fucom", 1, 0xdde0, X, Cpu286, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fucom %st(1) */
-{"fucom", 0, 0xdde1, X, Cpu286, FP, { 0, 0, 0} },
-{"fucomp", 1, 0xdde8, X, Cpu286, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for fucomp %st(1) */
-{"fucomp", 0, 0xdde9, X, Cpu286, FP, { 0, 0, 0} },
-{"fucompp",0, 0xdae9, X, Cpu286, FP, { 0, 0, 0} },
-
-{"ftst", 0, 0xd9e4, X, 0, FP, { 0, 0, 0} },
-{"fxam", 0, 0xd9e5, X, 0, FP, { 0, 0, 0} },
-
-/* load constants into %st0 */
-{"fld1", 0, 0xd9e8, X, 0, FP, { 0, 0, 0} },
-{"fldl2t", 0, 0xd9e9, X, 0, FP, { 0, 0, 0} },
-{"fldl2e", 0, 0xd9ea, X, 0, FP, { 0, 0, 0} },
-{"fldpi", 0, 0xd9eb, X, 0, FP, { 0, 0, 0} },
-{"fldlg2", 0, 0xd9ec, X, 0, FP, { 0, 0, 0} },
-{"fldln2", 0, 0xd9ed, X, 0, FP, { 0, 0, 0} },
-{"fldz", 0, 0xd9ee, X, 0, FP, { 0, 0, 0} },
-
-/* Arithmetic. */
-
-/* add */
-{"fadd", 2, 0xd8c0, X, 0, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-/* alias for fadd %st(i), %st */
-{"fadd", 1, 0xd8c0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for faddp */
-{"fadd", 0, 0xdec1, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fadd", 1, 0xd8, 0, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fiadd", 1, 0xde, 0, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-
-{"faddp", 2, 0xdec0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"faddp", 1, 0xdec0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* alias for faddp %st, %st(1) */
-{"faddp", 0, 0xdec1, X, 0, FP, { 0, 0, 0} },
-{"faddp", 2, 0xdec0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-
-/* subtract */
-{"fsub", 2, 0xd8e0, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fsub", 1, 0xd8e0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fsubp */
-{"fsub", 0, 0xdee1, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fsub", 1, 0xd8, 4, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fisub", 1, 0xde, 4, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-
-#if SYSV386_COMPAT
-{"fsubp", 2, 0xdee0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubp", 1, 0xdee0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubp", 0, 0xdee1, X, 0, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
-{"fsubp", 2, 0xdee0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
-#else
-{"fsubp", 2, 0xdee8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubp", 1, 0xdee8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubp", 0, 0xdee9, X, 0, FP, { 0, 0, 0} },
-#endif
-
-/* subtract reverse */
-{"fsubr", 2, 0xd8e8, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fsubr", 1, 0xd8e8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fsubrp */
-{"fsubr", 0, 0xdee9, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fsubr", 1, 0xd8, 5, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fisubr", 1, 0xde, 5, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-
-#if SYSV386_COMPAT
-{"fsubrp", 2, 0xdee8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubrp", 1, 0xdee8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubrp", 0, 0xdee9, X, 0, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
-{"fsubrp", 2, 0xdee8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
-#else
-{"fsubrp", 2, 0xdee0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fsubrp", 1, 0xdee0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fsubrp", 0, 0xdee1, X, 0, FP, { 0, 0, 0} },
-#endif
-
-/* multiply */
-{"fmul", 2, 0xd8c8, X, 0, FP|ShortForm|FloatD, { FloatReg, FloatAcc, 0} },
-{"fmul", 1, 0xd8c8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fmulp */
-{"fmul", 0, 0xdec9, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fmul", 1, 0xd8, 1, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fimul", 1, 0xde, 1, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-
-{"fmulp", 2, 0xdec8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fmulp", 1, 0xdec8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fmulp", 0, 0xdec9, X, 0, FP, { 0, 0, 0} },
-{"fmulp", 2, 0xdec8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-
-/* divide */
-{"fdiv", 2, 0xd8f0, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fdiv", 1, 0xd8f0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fdivp */
-{"fdiv", 0, 0xdef1, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fdiv", 1, 0xd8, 6, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fidiv", 1, 0xde, 6, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-
-#if SYSV386_COMPAT
-{"fdivp", 2, 0xdef0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivp", 1, 0xdef0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivp", 0, 0xdef1, X, 0, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
-{"fdivp", 2, 0xdef0, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
-#else
-{"fdivp", 2, 0xdef8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivp", 1, 0xdef8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivp", 0, 0xdef9, X, 0, FP, { 0, 0, 0} },
-#endif
-
-/* divide reverse */
-{"fdivr", 2, 0xd8f8, X, 0, FP|ShortForm|FloatDR, { FloatReg, FloatAcc, 0} },
-{"fdivr", 1, 0xd8f8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-#if SYSV386_COMPAT
-/* alias for fdivrp */
-{"fdivr", 0, 0xdef9, X, 0, FP|Ugh, { 0, 0, 0} },
-#endif
-{"fdivr", 1, 0xd8, 7, 0, sl_FP|Modrm, { LongMem|LLongMem, 0, 0} },
-{"fidivr", 1, 0xde, 7, 0, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-
-#if SYSV386_COMPAT
-{"fdivrp", 2, 0xdef8, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivrp", 1, 0xdef8, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivrp", 0, 0xdef9, X, 0, FP, { 0, 0, 0} },
-#if OLDGCC_COMPAT
-{"fdivrp", 2, 0xdef8, X, 0, FP|ShortForm|Ugh, { FloatReg, FloatAcc, 0} },
-#endif
-#else
-{"fdivrp", 2, 0xdef0, X, 0, FP|ShortForm, { FloatAcc, FloatReg, 0} },
-{"fdivrp", 1, 0xdef0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-{"fdivrp", 0, 0xdef1, X, 0, FP, { 0, 0, 0} },
-#endif
-
-{"f2xm1", 0, 0xd9f0, X, 0, FP, { 0, 0, 0} },
-{"fyl2x", 0, 0xd9f1, X, 0, FP, { 0, 0, 0} },
-{"fptan", 0, 0xd9f2, X, 0, FP, { 0, 0, 0} },
-{"fpatan", 0, 0xd9f3, X, 0, FP, { 0, 0, 0} },
-{"fxtract",0, 0xd9f4, X, 0, FP, { 0, 0, 0} },
-{"fprem1", 0, 0xd9f5, X, Cpu286, FP, { 0, 0, 0} },
-{"fdecstp",0, 0xd9f6, X, 0, FP, { 0, 0, 0} },
-{"fincstp",0, 0xd9f7, X, 0, FP, { 0, 0, 0} },
-{"fprem", 0, 0xd9f8, X, 0, FP, { 0, 0, 0} },
-{"fyl2xp1",0, 0xd9f9, X, 0, FP, { 0, 0, 0} },
-{"fsqrt", 0, 0xd9fa, X, 0, FP, { 0, 0, 0} },
-{"fsincos",0, 0xd9fb, X, Cpu286, FP, { 0, 0, 0} },
-{"frndint",0, 0xd9fc, X, 0, FP, { 0, 0, 0} },
-{"fscale", 0, 0xd9fd, X, 0, FP, { 0, 0, 0} },
-{"fsin", 0, 0xd9fe, X, Cpu286, FP, { 0, 0, 0} },
-{"fcos", 0, 0xd9ff, X, Cpu286, FP, { 0, 0, 0} },
-{"fchs", 0, 0xd9e0, X, 0, FP, { 0, 0, 0} },
-{"fabs", 0, 0xd9e1, X, 0, FP, { 0, 0, 0} },
-
-/* processor control */
-{"fninit", 0, 0xdbe3, X, 0, FP, { 0, 0, 0} },
-{"finit", 0, 0xdbe3, X, 0, FP|FWait, { 0, 0, 0} },
-{"fldcw", 1, 0xd9, 5, 0, w_Suf|FloatMF|Modrm, { ShortMem, 0, 0} },
-{"fnstcw", 1, 0xd9, 7, 0, w_Suf|FloatMF|Modrm, { ShortMem, 0, 0} },
-{"fstcw", 1, 0xd9, 7, 0, w_Suf|FloatMF|FWait|Modrm, { ShortMem, 0, 0} },
-/* XXX should reject %al, %eax, and %rax */
-{"fnstsw", 1, 0xdfe0, X, 0, FP|IgnoreSize, { Acc, 0, 0} },
-{"fnstsw", 1, 0xdd, 7, 0, w_Suf|FloatMF|Modrm, { ShortMem, 0, 0} },
-{"fnstsw", 0, 0xdfe0, X, 0, FP, { 0, 0, 0} },
-/* XXX should reject %al, %eax, and %rax */
-{"fstsw", 1, 0xdfe0, X, 0, FP|FWait|IgnoreSize, { Acc, 0, 0} },
-{"fstsw", 1, 0xdd, 7, 0, w_Suf|FloatMF|FWait|Modrm, { ShortMem, 0, 0} },
-{"fstsw", 0, 0xdfe0, X, 0, FP|FWait, { 0, 0, 0} },
-{"fnclex", 0, 0xdbe2, X, 0, FP, { 0, 0, 0} },
-{"fclex", 0, 0xdbe2, X, 0, FP|FWait, { 0, 0, 0} },
-/* Short forms of fldenv, fstenv use data size prefix. */
-{"fnstenv",1, 0xd9, 6, 0, sl_Suf|Modrm|DefaultSize, { LLongMem, 0, 0} },
-{"fstenv", 1, 0xd9, 6, 0, sl_Suf|FWait|Modrm|DefaultSize, { LLongMem, 0, 0} },
-{"fldenv", 1, 0xd9, 4, 0, sl_Suf|Modrm|DefaultSize, { LLongMem, 0, 0} },
-{"fnsave", 1, 0xdd, 6, 0, sl_Suf|Modrm|DefaultSize, { LLongMem, 0, 0} },
-{"fsave", 1, 0xdd, 6, 0, sl_Suf|FWait|Modrm|DefaultSize, { LLongMem, 0, 0} },
-{"frstor", 1, 0xdd, 4, 0, sl_Suf|Modrm|DefaultSize, { LLongMem, 0, 0} },
-
-{"ffree", 1, 0xddc0, X, 0, FP|ShortForm, { FloatReg, 0, 0} },
-/* P6:free st(i), pop st */
-{"ffreep", 1, 0xdfc0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-{"fnop", 0, 0xd9d0, X, 0, FP, { 0, 0, 0} },
+/* The opcode for the fwait instruction, which disassembler treats as a
+ prefix when it can. */
#define FWAIT_OPCODE 0x9b
-{"fwait", 0, 0x9b, X, 0, FP, { 0, 0, 0} },
-
-/* Opcode prefixes; we allow them as separate insns too. */
-
#define ADDR_PREFIX_OPCODE 0x67
-{"addr16", 0, 0x67, X, Cpu386|CpuNo64, NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"addr32", 0, 0x67, X, Cpu386,NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"aword", 0, 0x67, X, Cpu386|CpuNo64,NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"adword", 0, 0x67, X, Cpu386,NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
#define DATA_PREFIX_OPCODE 0x66
-{"data16", 0, 0x66, X, Cpu386,NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"data32", 0, 0x66, X, Cpu386|CpuNo64,NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
-{"word", 0, 0x66, X, Cpu386,NoSuf|IsPrefix|Size16|IgnoreSize, { 0, 0, 0} },
-{"dword", 0, 0x66, X, Cpu386|CpuNo64,NoSuf|IsPrefix|Size32|IgnoreSize, { 0, 0, 0} },
#define LOCK_PREFIX_OPCODE 0xf0
-{"lock", 0, 0xf0, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"wait", 0, 0x9b, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define CS_PREFIX_OPCODE 0x2e
-{"cs", 0, 0x2e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define DS_PREFIX_OPCODE 0x3e
-{"ds", 0, 0x3e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
#define ES_PREFIX_OPCODE 0x26
-{"es", 0, 0x26, X, CpuNo64, NoSuf|IsPrefix, { 0, 0, 0} },
#define FS_PREFIX_OPCODE 0x64
-{"fs", 0, 0x64, X, Cpu386, NoSuf|IsPrefix, { 0, 0, 0} },
#define GS_PREFIX_OPCODE 0x65
-{"gs", 0, 0x65, X, Cpu386, NoSuf|IsPrefix, { 0, 0, 0} },
#define SS_PREFIX_OPCODE 0x36
-{"ss", 0, 0x36, X, CpuNo64, NoSuf|IsPrefix, { 0, 0, 0} },
#define REPNE_PREFIX_OPCODE 0xf2
#define REPE_PREFIX_OPCODE 0xf3
-{"rep", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repe", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repz", 0, 0xf3, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repne", 0, 0xf2, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"repnz", 0, 0xf2, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"ht", 0, 0x3e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"hnt", 0, 0x2e, X, 0, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex", 0, 0x40, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rexz", 0, 0x41, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rexy", 0, 0x42, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rexyz", 0, 0x43, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rexx", 0, 0x44, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rexxz", 0, 0x45, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rexxy", 0, 0x46, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rexxyz", 0, 0x47, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex64", 0, 0x48, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex64z", 0, 0x49, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex64y", 0, 0x4a, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex64yz",0, 0x4b, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex64x", 0, 0x4c, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex64xz",0, 0x4d, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex64xy",0, 0x4e, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-{"rex64xyz",0, 0x4f, X, Cpu64, NoSuf|IsPrefix, { 0, 0, 0} },
-
-/* 486 extensions. */
-
-{"bswap", 1, 0x0fc8, X, Cpu486, lq_Suf|ShortForm, { Reg32|Reg64, 0, 0 } },
-{"xadd", 2, 0x0fc0, X, Cpu486, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"cmpxchg", 2, 0x0fb0, X, Cpu486, bwlq_Suf|W|Modrm, { Reg, Reg|AnyMem, 0 } },
-{"invd", 0, 0x0f08, X, Cpu486, NoSuf, { 0, 0, 0} },
-{"wbinvd", 0, 0x0f09, X, Cpu486, NoSuf, { 0, 0, 0} },
-{"invlpg", 1, 0x0f01, 7, Cpu486, NoSuf|Modrm|IgnoreSize, { AnyMem, 0, 0} },
-
-/* 586 and late 486 extensions. */
-{"cpuid", 0, 0x0fa2, X, Cpu486, NoSuf, { 0, 0, 0} },
-
-/* Pentium extensions. */
-{"wrmsr", 0, 0x0f30, X, Cpu586, NoSuf, { 0, 0, 0} },
-{"rdtsc", 0, 0x0f31, X, Cpu586, NoSuf, { 0, 0, 0} },
-{"rdmsr", 0, 0x0f32, X, Cpu586, NoSuf, { 0, 0, 0} },
-{"cmpxchg8b",1,0x0fc7, 1, Cpu586, q_Suf|Modrm, { LLongMem, 0, 0} },
-
-/* Pentium II/Pentium Pro extensions. */
-{"sysenter",0, 0x0f34, X, Cpu686, NoSuf, { 0, 0, 0} },
-{"sysexit", 0, 0x0f35, X, Cpu686, NoSuf, { 0, 0, 0} },
-{"fxsave", 1, 0x0fae, 0, Cpu686, q_Suf|Modrm, { LLongMem, 0, 0} },
-{"fxrstor", 1, 0x0fae, 1, Cpu686, q_Suf|Modrm, { LLongMem, 0, 0} },
-{"rdpmc", 0, 0x0f33, X, Cpu686, NoSuf, { 0, 0, 0} },
-/* official undefined instr. */
-{"ud2", 0, 0x0f0b, X, Cpu686, NoSuf, { 0, 0, 0} },
-/* alias for ud2 */
-{"ud2a", 0, 0x0f0b, X, Cpu686, NoSuf, { 0, 0, 0} },
-/* 2nd. official undefined instr. */
-{"ud2b", 0, 0x0fb9, X, Cpu686, NoSuf, { 0, 0, 0} },
-
-{"cmovo", 2, 0x0f40, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovno", 2, 0x0f41, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovb", 2, 0x0f42, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovc", 2, 0x0f42, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnae", 2, 0x0f42, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovae", 2, 0x0f43, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnc", 2, 0x0f43, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnb", 2, 0x0f43, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmove", 2, 0x0f44, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovz", 2, 0x0f44, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovne", 2, 0x0f45, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnz", 2, 0x0f45, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovbe", 2, 0x0f46, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovna", 2, 0x0f46, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmova", 2, 0x0f47, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnbe", 2, 0x0f47, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovs", 2, 0x0f48, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovns", 2, 0x0f49, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovp", 2, 0x0f4a, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnp", 2, 0x0f4b, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovl", 2, 0x0f4c, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnge", 2, 0x0f4c, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovge", 2, 0x0f4d, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnl", 2, 0x0f4d, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovle", 2, 0x0f4e, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovng", 2, 0x0f4e, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovg", 2, 0x0f4f, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-{"cmovnle", 2, 0x0f4f, X, Cpu686, wlq_Suf|Modrm, { WordReg|WordMem, WordReg, 0} },
-
-{"fcmovb", 2, 0xdac0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnae",2, 0xdac0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmove", 2, 0xdac8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovbe", 2, 0xdad0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovna", 2, 0xdad0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovu", 2, 0xdad8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovae", 2, 0xdbc0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnb", 2, 0xdbc0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovne", 2, 0xdbc8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmova", 2, 0xdbd0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnbe",2, 0xdbd0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcmovnu", 2, 0xdbd8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-
-{"fcomi", 2, 0xdbf0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcomi", 0, 0xdbf1, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
-{"fcomi", 1, 0xdbf0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-{"fucomi", 2, 0xdbe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucomi", 0, 0xdbe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
-{"fucomi", 1, 0xdbe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-{"fcomip", 2, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcompi", 2, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fcompi", 0, 0xdff1, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
-{"fcompi", 1, 0xdff0, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-{"fucomip", 2, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucompi", 2, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, FloatAcc, 0} },
-{"fucompi", 0, 0xdfe9, X, Cpu686, FP|ShortForm, { 0, 0, 0} },
-{"fucompi", 1, 0xdfe8, X, Cpu686, FP|ShortForm, { FloatReg, 0, 0} },
-
-/* Pentium4 extensions. */
-
-{"movnti", 2, 0x0fc3, X, CpuP4, wlq_Suf|Modrm, { WordReg, WordMem, 0 } },
-{"clflush", 1, 0x0fae, 7, CpuP4, NoSuf|Modrm|IgnoreSize, { ByteMem, 0, 0 } },
-{"lfence", 0, 0x0fae, 0xe8, CpuP4, NoSuf|ImmExt, { 0, 0, 0 } },
-{"mfence", 0, 0x0fae, 0xf0, CpuP4, NoSuf|ImmExt, { 0, 0, 0 } },
-{"pause", 0, 0xf390, X, CpuP4, NoSuf, { 0, 0, 0 } },
-
-/* MMX/SSE2 instructions. */
-
-{"emms", 0, 0x0f77, X, CpuMMX, NoSuf, { 0, 0, 0 } },
-/* These really shouldn't allow for Reg64 (movq is the right mnemonic for
- copying between Reg64/Mem64 and RegXMM/RegMMX, as is mandated by Intel's
- spec). AMD's spec, having been in existence for much longer, failed to
- recognize that and specified movd for 32- and 64-bit operations. */
-{"movd", 2, 0x0f6e, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { Reg32|Reg64|LongMem, RegMMX, 0 } },
-{"movd", 2, 0x0f7e, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX, Reg32|Reg64|LongMem, 0 } },
-{"movd", 2, 0x660f6e,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Reg32|Reg64|LongMem, RegXMM, 0 } },
-{"movd", 2, 0x660f7e,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM, Reg32|Reg64|LongMem, 0 } },
-/* In the 64bit mode the short form mov immediate is redefined to have
- 64bit displacement value. */
-{"movq", 2, 0x0f6f, X, CpuMMX, NoSuf|IgnoreSize|Modrm|NoRex64, { RegMMX|LLongMem, RegMMX, 0 } },
-{"movq", 2, 0x0f7f, X, CpuMMX, NoSuf|IgnoreSize|Modrm|NoRex64, { RegMMX, RegMMX|LLongMem, 0 } },
-{"movq", 2, 0xf30f7e,X,CpuSSE2,NoSuf|IgnoreSize|Modrm|NoRex64, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movq", 2, 0x660fd6,X,CpuSSE2,NoSuf|IgnoreSize|Modrm|NoRex64, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movq", 2, 0x0f6e, X, Cpu64, NoSuf|IgnoreSize|Modrm, { Reg64|LLongMem, RegMMX, 0 } },
-{"movq", 2, 0x0f7e, X, Cpu64, NoSuf|IgnoreSize|Modrm, { RegMMX, Reg64|LLongMem, 0 } },
-{"movq", 2, 0x660f6e,X,Cpu64, NoSuf|IgnoreSize|Modrm, { Reg64|LLongMem, RegXMM, 0 } },
-{"movq", 2, 0x660f7e,X,Cpu64, NoSuf|IgnoreSize|Modrm, { RegXMM, Reg64|LLongMem, 0 } },
-/* We put the 64bit displacement first and we only mark constants
- larger than 32bit as Disp64. */
-{"movq", 2, 0xa0, X, Cpu64, NoSuf|D|W|Size64, { Disp64, Acc, 0 } },
-{"movq", 2, 0x88, X, Cpu64, NoSuf|D|W|Modrm|Size64,{ Reg64, Reg64|AnyMem, 0 } },
-{"movq", 2, 0xc6, 0, Cpu64, NoSuf|W|Modrm|Size64, { Imm32S, Reg64|WordMem, 0 } },
-{"movq", 2, 0xb0, X, Cpu64, NoSuf|W|ShortForm|Size64,{ Imm64, Reg64, 0 } },
-/* The segment register moves accept Reg64 so that a segment register
- can be copied to a 64 bit register, and vice versa. */
-{"movq", 2, 0x8c, X, Cpu64, NoSuf|Modrm|Size64, { SReg2|SReg3, Reg64|InvMem, 0 } },
-{"movq", 2, 0x8e, X, Cpu64, NoSuf|Modrm|Size64, { Reg64, SReg2|SReg3, 0 } },
-/* Move to/from control debug registers. In the 16 or 32bit modes they are 32bit. In the 64bit
- mode they are 64bit.*/
-{"movq", 2, 0x0f20, X, Cpu64, NoSuf|D|Modrm|IgnoreSize|NoRex64|Size64,{ Control, Reg64|InvMem, 0} },
-{"movq", 2, 0x0f21, X, Cpu64, NoSuf|D|Modrm|IgnoreSize|NoRex64|Size64,{ Debug, Reg64|InvMem, 0} },
-/* Real MMX instructions. */
-{"packssdw", 2, 0x0f6b, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packssdw", 2, 0x660f6b,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"packsswb", 2, 0x0f63, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packsswb", 2, 0x660f63,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"packuswb", 2, 0x0f67, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"packuswb", 2, 0x660f67,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddb", 2, 0x0ffc, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddb", 2, 0x660ffc,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddw", 2, 0x0ffd, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddw", 2, 0x660ffd,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddd", 2, 0x0ffe, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddd", 2, 0x660ffe,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddq", 2, 0x0fd4, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"paddq", 2, 0x660fd4,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddsb", 2, 0x0fec, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddsb", 2, 0x660fec,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddsw", 2, 0x0fed, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddsw", 2, 0x660fed,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddusb", 2, 0x0fdc, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddusb", 2, 0x660fdc,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"paddusw", 2, 0x0fdd, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"paddusw", 2, 0x660fdd,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pand", 2, 0x0fdb, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pand", 2, 0x660fdb,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pandn", 2, 0x0fdf, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pandn", 2, 0x660fdf,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpeqb", 2, 0x0f74, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqb", 2, 0x660f74,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpeqw", 2, 0x0f75, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqw", 2, 0x660f75,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpeqd", 2, 0x0f76, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpeqd", 2, 0x660f76,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpgtb", 2, 0x0f64, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtb", 2, 0x660f64,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpgtw", 2, 0x0f65, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtw", 2, 0x660f65,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pcmpgtd", 2, 0x0f66, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pcmpgtd", 2, 0x660f66,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmaddwd", 2, 0x0ff5, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmaddwd", 2, 0x660ff5,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmulhw", 2, 0x0fe5, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhw", 2, 0x660fe5,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmullw", 2, 0x0fd5, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmullw", 2, 0x660fd5,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"por", 2, 0x0feb, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"por", 2, 0x660feb,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psllw", 2, 0x0ff1, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllw", 2, 0x660ff1,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psllw", 2, 0x0f71, 6, CpuMMX, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX, 0 } },
-{"psllw", 2, 0x660f71,6,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"pslld", 2, 0x0ff2, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pslld", 2, 0x660ff2,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pslld", 2, 0x0f72, 6, CpuMMX, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX, 0 } },
-{"pslld", 2, 0x660f72,6,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"psllq", 2, 0x0ff3, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psllq", 2, 0x660ff3,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psllq", 2, 0x0f73, 6, CpuMMX, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX, 0 } },
-{"psllq", 2, 0x660f73,6,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"psraw", 2, 0x0fe1, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psraw", 2, 0x660fe1,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psraw", 2, 0x0f71, 4, CpuMMX, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX, 0 } },
-{"psraw", 2, 0x660f71,4,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"psrad", 2, 0x0fe2, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrad", 2, 0x660fe2,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psrad", 2, 0x0f72, 4, CpuMMX, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX, 0 } },
-{"psrad", 2, 0x660f72,4,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"psrlw", 2, 0x0fd1, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrlw", 2, 0x660fd1,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psrlw", 2, 0x0f71, 2, CpuMMX, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX, 0 } },
-{"psrlw", 2, 0x660f71,2,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"psrld", 2, 0x0fd2, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrld", 2, 0x660fd2,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psrld", 2, 0x0f72, 2, CpuMMX, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX, 0 } },
-{"psrld", 2, 0x660f72,2,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"psrlq", 2, 0x0fd3, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psrlq", 2, 0x660fd3,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psrlq", 2, 0x0f73, 2, CpuMMX, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX, 0 } },
-{"psrlq", 2, 0x660f73,2,CpuSSE2,NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"psubb", 2, 0x0ff8, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubb", 2, 0x660ff8,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubw", 2, 0x0ff9, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubw", 2, 0x660ff9,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubd", 2, 0x0ffa, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubd", 2, 0x660ffa,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubq", 2, 0x0ffb, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"psubq", 2, 0x660ffb,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubsb", 2, 0x0fe8, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubsb", 2, 0x660fe8,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubsw", 2, 0x0fe9, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubsw", 2, 0x660fe9,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubusb", 2, 0x0fd8, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubusb", 2, 0x660fd8,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psubusw", 2, 0x0fd9, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psubusw", 2, 0x660fd9,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpckhbw",2, 0x0f68, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhbw",2, 0x660f68,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpckhwd",2, 0x0f69, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhwd",2, 0x660f69,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpckhdq",2, 0x0f6a, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckhdq",2, 0x660f6a,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpcklbw",2, 0x0f60, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpcklbw",2, 0x660f60,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpcklwd",2, 0x0f61, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpcklwd",2, 0x660f61,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpckldq",2, 0x0f62, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"punpckldq",2, 0x660f62,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pxor", 2, 0x0fef, X, CpuMMX, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pxor", 2, 0x660fef,X,CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-
-/* PIII Katmai New Instructions / SIMD instructions. */
-
-{"addps", 2, 0x0f58, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addss", 2, 0xf30f58, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"andnps", 2, 0x0f55, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"andps", 2, 0x0f54, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpeqps", 2, 0x0fc2, 0, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpeqss", 2, 0xf30fc2, 0, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpleps", 2, 0x0fc2, 2, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpless", 2, 0xf30fc2, 2, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpltps", 2, 0x0fc2, 1, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpltss", 2, 0xf30fc2, 1, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpneqps", 2, 0x0fc2, 4, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpneqss", 2, 0xf30fc2, 4, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpnleps", 2, 0x0fc2, 6, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnless", 2, 0xf30fc2, 6, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpnltps", 2, 0x0fc2, 5, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnltss", 2, 0xf30fc2, 5, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpordps", 2, 0x0fc2, 7, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpordss", 2, 0xf30fc2, 7, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpunordps",2, 0x0fc2, 3, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpunordss",2, 0xf30fc2, 3, CpuSSE, NoSuf|IgnoreSize|Modrm|ImmExt, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpps", 3, 0x0fc2, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"cmpss", 3, 0xf30fc2, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|WordMem, RegXMM } },
-{"comiss", 2, 0x0f2f, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cvtpi2ps", 2, 0x0f2a, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegXMM, 0 } },
-{"cvtps2pi", 2, 0x0f2d, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvtsi2ss", 2, 0xf30f2a, X, CpuSSE, lq_Suf|IgnoreSize|Modrm,{ Reg32|Reg64|WordMem|LLongMem, RegXMM, 0 } },
-{"cvtss2si", 2, 0xf30f2d, X, CpuSSE, lq_Suf|IgnoreSize|Modrm,{ RegXMM|WordMem, Reg32|Reg64, 0 } },
-{"cvttps2pi", 2, 0x0f2c, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvttss2si", 2, 0xf30f2c, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { RegXMM|WordMem, Reg32|Reg64, 0 } },
-{"divps", 2, 0x0f5e, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"divss", 2, 0xf30f5e, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"ldmxcsr", 1, 0x0fae, 2, CpuSSE, NoSuf|IgnoreSize|Modrm, { WordMem, 0, 0 } },
-{"maskmovq", 2, 0x0ff7, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|InvMem, RegMMX, 0 } },
-{"maxps", 2, 0x0f5f, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"maxss", 2, 0xf30f5f, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"minps", 2, 0x0f5d, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"minss", 2, 0xf30f5d, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"movaps", 2, 0x0f28, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movaps", 2, 0x0f29, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movhlps", 2, 0x0f12, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movhps", 2, 0x0f16, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { LLongMem, RegXMM, 0 } },
-{"movhps", 2, 0x0f17, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM, LLongMem, 0 } },
-{"movlhps", 2, 0x0f16, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movlps", 2, 0x0f12, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { LLongMem, RegXMM, 0 } },
-{"movlps", 2, 0x0f13, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM, LLongMem, 0 } },
-{"movmskps", 2, 0x0f50, X, CpuSSE, lq_Suf|IgnoreSize|Modrm, { RegXMM|InvMem, Reg32|Reg64, 0 } },
-{"movntps", 2, 0x0f2b, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM, LLongMem, 0 } },
-{"movntq", 2, 0x0fe7, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX, LLongMem, 0 } },
-{"movntdq", 2, 0x660fe7, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM, LLongMem, 0 } },
-{"movss", 2, 0xf30f10, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"movss", 2, 0xf30f11, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM, RegXMM|WordMem, 0 } },
-{"movups", 2, 0x0f10, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movups", 2, 0x0f11, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"mulps", 2, 0x0f59, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mulss", 2, 0xf30f59, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"orps", 2, 0x0f56, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pavgb", 2, 0x0fe0, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pavgb", 2, 0x660fe0, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pavgw", 2, 0x0fe3, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pavgw", 2, 0x660fe3, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pextrw", 3, 0x0fc5, X, CpuMMX2,lq_Suf|IgnoreSize|Modrm, { Imm8, RegMMX|InvMem, Reg32|Reg64 } },
-{"pextrw", 3, 0x660fc5, X, CpuSSE2,lq_Suf|IgnoreSize|Modrm, { Imm8, RegXMM|InvMem, Reg32|Reg64 } },
-{"pinsrw", 3, 0x0fc4, X, CpuMMX2,lq_Suf|IgnoreSize|Modrm, { Imm8, Reg32|Reg64|ShortMem, RegMMX } },
-{"pinsrw", 3, 0x660fc4, X, CpuSSE2,lq_Suf|IgnoreSize|Modrm, { Imm8, Reg32|Reg64|ShortMem, RegXMM } },
-{"pmaxsw", 2, 0x0fee, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmaxsw", 2, 0x660fee, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmaxub", 2, 0x0fde, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmaxub", 2, 0x660fde, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pminsw", 2, 0x0fea, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pminsw", 2, 0x660fea, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pminub", 2, 0x0fda, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pminub", 2, 0x660fda, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmovmskb", 2, 0x0fd7, X, CpuMMX2,lq_Suf|IgnoreSize|Modrm, { RegMMX|InvMem, Reg32|Reg64, 0 } },
-{"pmovmskb", 2, 0x660fd7, X, CpuSSE2,lq_Suf|IgnoreSize|Modrm, { RegXMM|InvMem, Reg32|Reg64, 0 } },
-{"pmulhuw", 2, 0x0fe4, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"pmulhuw", 2, 0x660fe4, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"prefetchnta", 1, 0x0f18, 0, CpuMMX2,NoSuf|IgnoreSize|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht0", 1, 0x0f18, 1, CpuMMX2,NoSuf|IgnoreSize|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht1", 1, 0x0f18, 2, CpuMMX2,NoSuf|IgnoreSize|Modrm, { LLongMem, 0, 0 } },
-{"prefetcht2", 1, 0x0f18, 3, CpuMMX2,NoSuf|IgnoreSize|Modrm, { LLongMem, 0, 0 } },
-{"psadbw", 2, 0x0ff6, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegMMX, 0 } },
-{"psadbw", 2, 0x660ff6, X, CpuSSE2,NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pshufw", 3, 0x0f70, X, CpuMMX2,NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX|LLongMem, RegMMX } },
-{"rcpps", 2, 0x0f53, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"rcpss", 2, 0xf30f53, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"rsqrtps", 2, 0x0f52, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"rsqrtss", 2, 0xf30f52, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"sfence", 0, 0x0fae, 0xf8, CpuMMX2,NoSuf|IgnoreSize|ImmExt, { 0, 0, 0 } },
-{"shufps", 3, 0x0fc6, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"sqrtps", 2, 0x0f51, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"sqrtss", 2, 0xf30f51, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"stmxcsr", 1, 0x0fae, 3, CpuSSE, NoSuf|IgnoreSize|Modrm, { WordMem, 0, 0 } },
-{"subps", 2, 0x0f5c, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"subss", 2, 0xf30f5c, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"ucomiss", 2, 0x0f2e, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"unpckhps", 2, 0x0f15, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"unpcklps", 2, 0x0f14, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"xorps", 2, 0x0f57, X, CpuSSE, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-
-/* SSE-2 instructions. */
-
-{"addpd", 2, 0x660f58, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addsd", 2, 0xf20f58, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"andnpd", 2, 0x660f55, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"andpd", 2, 0x660f54, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|WordMem, RegXMM, 0 } },
-{"cmpeqpd", 2, 0x660fc2, 0, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpeqsd", 2, 0xf20fc2, 0, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmplepd", 2, 0x660fc2, 2, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmplesd", 2, 0xf20fc2, 2, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpltpd", 2, 0x660fc2, 1, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpltsd", 2, 0xf20fc2, 1, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpneqpd", 2, 0x660fc2, 4, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpneqsd", 2, 0xf20fc2, 4, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpnlepd", 2, 0x660fc2, 6, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnlesd", 2, 0xf20fc2, 6, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpnltpd", 2, 0x660fc2, 5, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpnltsd", 2, 0xf20fc2, 5, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpordpd", 2, 0x660fc2, 7, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpordsd", 2, 0xf20fc2, 7, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmpunordpd",2, 0x660fc2, 3, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpunordsd",2, 0xf20fc2, 3, CpuSSE2, NoSuf|IgnoreSize|Modrm|ImmExt,{ RegXMM|LongMem, RegXMM, 0 } },
-{"cmppd", 3, 0x660fc2, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-/* Intel mode string compare. */
-{"cmpsd", 0, 0xa7, X, 0, NoSuf|Size32|IsString, { 0, 0, 0} },
-{"cmpsd", 2, 0xa7, X, 0, NoSuf|Size32|IsString, { AnyMem, AnyMem|EsSeg, 0} },
-{"cmpsd", 3, 0xf20fc2, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LongMem, RegXMM } },
-{"comisd", 2, 0x660f2f, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"cvtpi2pd", 2, 0x660f2a, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegMMX|LLongMem, RegXMM, 0 } },
-{"cvtsi2sd", 2, 0xf20f2a, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ Reg32|Reg64|WordMem|LLongMem, RegXMM, 0 } },
-{"divpd", 2, 0x660f5e, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"divsd", 2, 0xf20f5e, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"maxpd", 2, 0x660f5f, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"maxsd", 2, 0xf20f5f, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"minpd", 2, 0x660f5d, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"minsd", 2, 0xf20f5d, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"movapd", 2, 0x660f28, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movapd", 2, 0x660f29, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movhpd", 2, 0x660f16, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { LLongMem, RegXMM, 0 } },
-{"movhpd", 2, 0x660f17, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM, LLongMem, 0 } },
-{"movlpd", 2, 0x660f12, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { LLongMem, RegXMM, 0 } },
-{"movlpd", 2, 0x660f13, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM, LLongMem, 0 } },
-{"movmskpd", 2, 0x660f50, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm, { RegXMM|InvMem, Reg32|Reg64, 0 } },
-{"movntpd", 2, 0x660f2b, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM, LLongMem, 0 } },
-/* Intel mode string move. */
-{"movsd", 0, 0xa5, X, 0, NoSuf|Size32|IsString, { 0, 0, 0} },
-{"movsd", 2, 0xa5, X, 0, NoSuf|Size32|IsString, { AnyMem, AnyMem|EsSeg, 0} },
-{"movsd", 2, 0xf20f10, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"movsd", 2, 0xf20f11, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM, RegXMM|LongMem, 0 } },
-{"movupd", 2, 0x660f10, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movupd", 2, 0x660f11, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"mulpd", 2, 0x660f59, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mulsd", 2, 0xf20f59, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"orpd", 2, 0x660f56, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"shufpd", 3, 0x660fc6, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"sqrtpd", 2, 0x660f51, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"sqrtsd", 2, 0xf20f51, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"subpd", 2, 0x660f5c, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"subsd", 2, 0xf20f5c, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"ucomisd", 2, 0x660f2e, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"unpckhpd", 2, 0x660f15, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"unpcklpd", 2, 0x660f14, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"xorpd", 2, 0x660f57, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtdq2pd", 2, 0xf30fe6, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtpd2dq", 2, 0xf20fe6, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtdq2ps", 2, 0x0f5b, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtpd2pi", 2, 0x660f2d, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvtpd2ps", 2, 0x660f5a, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtps2pd", 2, 0x0f5a, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtps2dq", 2, 0x660f5b, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtsd2si", 2, 0xf20f2d, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ RegXMM|LLongMem, Reg32|Reg64, 0 } },
-{"cvtsd2ss", 2, 0xf20f5a, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvtss2sd", 2, 0xf30f5a, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvttpd2pi", 2, 0x660f2c, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegMMX, 0 } },
-{"cvttsd2si", 2, 0xf20f2c, X, CpuSSE2, lq_Suf|IgnoreSize|Modrm,{ RegXMM|WordMem, Reg32|Reg64, 0 } },
-{"cvttpd2dq", 2, 0x660fe6, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cvttps2dq", 2, 0xf30f5b, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"maskmovdqu",2, 0x660ff7, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|InvMem, RegXMM, 0 } },
-{"movdqa", 2, 0x660f6f, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movdqa", 2, 0x660f7f, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movdqu", 2, 0xf30f6f, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movdqu", 2, 0xf30f7f, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM, RegXMM|LLongMem, 0 } },
-{"movdq2q", 2, 0xf20fd6, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|InvMem, RegMMX, 0 } },
-{"movq2dq", 2, 0xf30fd6, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegMMX|InvMem, RegXMM, 0 } },
-{"pmuludq", 2, 0x0ff4, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmuludq", 2, 0x660ff4, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LongMem, RegXMM, 0 } },
-{"pshufd", 3, 0x660f70, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"pshufhw", 3, 0xf30f70, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"pshuflw", 3, 0xf20f70, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"pslldq", 2, 0x660f73, 7, CpuSSE2, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"psrldq", 2, 0x660f73, 3, CpuSSE2, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM, 0 } },
-{"punpckhqdq",2, 0x660f6d, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"punpcklqdq",2, 0x660f6c, X, CpuSSE2, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-
-/* Prescott New Instructions. */
-
-{"addsubpd", 2, 0x660fd0, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"addsubps", 2, 0xf20fd0, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"cmpxchg16b",1, 0x0fc7, 1, CpuPNI|Cpu64, NoSuf|Modrm|Rex64, { LLongMem, 0, 0} },
-{"fisttp", 1, 0xdf, 1, CpuPNI, sl_FP|Modrm, { ShortMem|LongMem, 0, 0} },
-{"fisttp", 1, 0xdd, 1, CpuPNI, q_FP|Modrm, { LLongMem, 0, 0} },
-{"fisttpll", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} },
-{"haddpd", 2, 0x660f7c, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"haddps", 2, 0xf20f7c, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"hsubpd", 2, 0x660f7d, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"hsubps", 2, 0xf20f7d, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"lddqu", 2, 0xf20ff0, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { LLongMem, RegXMM, 0 } },
-{"monitor", 0, 0x0f01, 0xc8, CpuPNI, NoSuf|ImmExt, { 0, 0, 0} },
-/* monitor is very special. CX and DX are always 64bits with zero upper
- 32bits in 64bit mode, and 32bits in 16bit and 32bit modes. The
- address size override prefix can be used to overrride the AX size in
- all modes. */
-/* Need to ensure only "monitor %eax/%ax,%ecx,%edx" is accepted. */
-{"monitor", 3, 0x0f01, 0xc8, CpuPNI|CpuNo64, NoSuf|ImmExt, { Reg16|Reg32, Reg32, Reg32 } },
-/* Need to ensure only "monitor %rax/%eax,%rcx,%rdx" is accepted. */
-{"monitor", 3, 0x0f01, 0xc8, CpuPNI|Cpu64, NoSuf|ImmExt|NoRex64, { Reg32|Reg64, Reg64, Reg64 } },
-{"movddup", 2, 0xf20f12, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movshdup", 2, 0xf30f16, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"movsldup", 2, 0xf30f12, X, CpuPNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"mwait", 0, 0x0f01, 0xc9, CpuPNI, NoSuf|ImmExt, { 0, 0, 0} },
-/* mwait is very special. AX and CX are always 64bits with zero upper
- 32bits in 64bit mode, and 32bits in 16bit and 32bit modes. */
-/* Need to ensure only "mwait %eax,%ecx" is accepted. */
-{"mwait", 2, 0x0f01, 0xc9, CpuPNI|CpuNo64, NoSuf|ImmExt, { Reg32, Reg32, 0} },
-/* Need to ensure only "mwait %rax,%rcx" is accepted. */
-{"mwait", 2, 0x0f01, 0xc9, CpuPNI|Cpu64, NoSuf|ImmExt|NoRex64, { Reg64, Reg64, 0} },
-
-/* VMX instructions. */
-{"vmcall", 0, 0x0f01, 0xc1, CpuVMX, NoSuf|ImmExt, { 0, 0, 0} },
-{"vmclear", 1, 0x660fc7, 6, CpuVMX, NoSuf|IgnoreSize|Modrm|NoRex64, { LLongMem, 0, 0} },
-{"vmlaunch", 0, 0x0f01, 0xc2, CpuVMX, NoSuf|ImmExt, { 0, 0, 0} },
-{"vmresume", 0, 0x0f01, 0xc3, CpuVMX, NoSuf|ImmExt, { 0, 0, 0} },
-{"vmptrld", 1, 0x0fc7, 6, CpuVMX, NoSuf|IgnoreSize|Modrm|NoRex64, { LLongMem, 0, 0} },
-{"vmptrst", 1, 0x0fc7, 7, CpuVMX, NoSuf|IgnoreSize|Modrm|NoRex64, { LLongMem, 0, 0} },
-{"vmread", 2, 0x0f78, X, CpuVMX|CpuNo64, l_Suf|Modrm,{ Reg32, Reg32|LongMem, 0} },
-{"vmread", 2, 0x0f78, X, CpuVMX|Cpu64, q_Suf|Modrm|NoRex64,{ Reg64, Reg64|LLongMem, 0} },
-{"vmwrite", 2, 0x0f79, X, CpuVMX|CpuNo64, l_Suf|Modrm,{ Reg32|LongMem, Reg32, 0} },
-{"vmwrite", 2, 0x0f79, X, CpuVMX|Cpu64, q_Suf|Modrm|NoRex64,{ Reg64|LLongMem, Reg64, 0} },
-{"vmxoff", 0, 0x0f01, 0xc4, CpuVMX, NoSuf|ImmExt, { 0, 0, 0} },
-{"vmxon", 1, 0xf30fc7, 6, CpuVMX, NoSuf|IgnoreSize|Modrm|NoRex64, { LLongMem, 0, 0} },
-
-/* Merom New Instructions. */
-
-{"phaddw", 2, 0x0f3801,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phaddw", 2, 0x660f3801,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phaddd", 2, 0x0f3802,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phaddd", 2, 0x660f3802,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phaddsw", 2, 0x0f3803,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phaddsw", 2, 0x660f3803,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phsubw", 2, 0x0f3805,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phsubw", 2, 0x660f3805,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phsubd", 2, 0x0f3806,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phsubd", 2, 0x660f3806,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"phsubsw", 2, 0x0f3807,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"phsubsw", 2, 0x660f3807,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmaddubsw", 2, 0x0f3804,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmaddubsw", 2, 0x660f3804,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pmulhrsw", 2, 0x0f380b,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhrsw", 2, 0x660f380b,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pshufb", 2, 0x0f3800,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pshufb", 2, 0x660f3800,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psignb", 2, 0x0f3808,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psignb", 2, 0x660f3808,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psignw", 2, 0x0f3809,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psignw", 2, 0x660f3809,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"psignd", 2, 0x0f380a,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"psignd", 2, 0x660f380a,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"palignr", 3, 0x0f3a0f,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { Imm8, RegMMX|LongMem, RegMMX } },
-{"palignr", 3, 0x660f3a0f,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { Imm8, RegXMM|LLongMem, RegXMM } },
-{"pabsb", 2, 0x0f381c,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pabsb", 2, 0x660f381c,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pabsw", 2, 0x0f381d,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pabsw", 2, 0x660f381d,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-{"pabsd", 2, 0x0f381e,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegMMX|LongMem, RegMMX, 0 } },
-{"pabsd", 2, 0x660f381e,X, CpuMNI, NoSuf|IgnoreSize|Modrm, { RegXMM|LLongMem, RegXMM, 0 } },
-
-/* AMD 3DNow! instructions. */
-
-{"prefetch", 1, 0x0f0d, 0, Cpu3dnow, NoSuf|IgnoreSize|Modrm, { ByteMem, 0, 0 } },
-{"prefetchw",1, 0x0f0d, 1, Cpu3dnow, NoSuf|IgnoreSize|Modrm, { ByteMem, 0, 0 } },
-{"femms", 0, 0x0f0e, X, Cpu3dnow, NoSuf, { 0, 0, 0 } },
-{"pavgusb", 2, 0x0f0f, 0xbf, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pf2id", 2, 0x0f0f, 0x1d, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pf2iw", 2, 0x0f0f, 0x1c, Cpu3dnowA,NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfacc", 2, 0x0f0f, 0xae, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfadd", 2, 0x0f0f, 0x9e, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpeq", 2, 0x0f0f, 0xb0, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpge", 2, 0x0f0f, 0x90, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfcmpgt", 2, 0x0f0f, 0xa0, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmax", 2, 0x0f0f, 0xa4, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmin", 2, 0x0f0f, 0x94, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfmul", 2, 0x0f0f, 0xb4, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfnacc", 2, 0x0f0f, 0x8a, Cpu3dnowA,NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfpnacc", 2, 0x0f0f, 0x8e, Cpu3dnowA,NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcp", 2, 0x0f0f, 0x96, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcpit1", 2, 0x0f0f, 0xa6, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrcpit2", 2, 0x0f0f, 0xb6, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrsqit1", 2, 0x0f0f, 0xa7, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfrsqrt", 2, 0x0f0f, 0x97, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfsub", 2, 0x0f0f, 0x9a, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pfsubr", 2, 0x0f0f, 0xaa, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pi2fd", 2, 0x0f0f, 0x0d, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pi2fw", 2, 0x0f0f, 0x0c, Cpu3dnowA,NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pmulhrw", 2, 0x0f0f, 0xb7, Cpu3dnow, NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-{"pswapd", 2, 0x0f0f, 0xbb, Cpu3dnowA,NoSuf|IgnoreSize|Modrm|ImmExt, { RegMMX|LongMem, RegMMX, 0 } },
-/* AMD extensions. */
-{"syscall", 0, 0x0f05, X, CpuK6, NoSuf, { 0, 0, 0} },
-{"sysret", 0, 0x0f07, X, CpuK6, lq_Suf|DefaultSize, { 0, 0, 0} },
-{"swapgs", 0, 0x0f01, 0xf8, Cpu64, NoSuf|ImmExt, { 0, 0, 0} },
-{"rdtscp", 0, 0x0f01, 0xf9, CpuSledgehammer,NoSuf|ImmExt, { 0, 0, 0} },
+#define TWO_BYTE_OPCODE_ESCAPE 0x0f
+#define NOP_OPCODE (char) 0x90
-/* AMD Pacifica additions. */
-{"clgi", 0, 0x0f01, 0xdd, CpuSVME, NoSuf|ImmExt, { 0, 0, 0 } },
-{"invlpga", 0, 0x0f01, 0xdf, CpuSVME, NoSuf|ImmExt, { 0, 0, 0 } },
-/* Need to ensure only "invlpga ...,%ecx" is accepted. */
-{"invlpga", 2, 0x0f01, 0xdf, CpuSVME, NoSuf|ImmExt, { AnyMem, Reg32, 0 } },
-{"skinit", 0, 0x0f01, 0xde, CpuSVME, NoSuf|ImmExt, { 0, 0, 0 } },
-{"skinit", 1, 0x0f01, 0xde, CpuSVME, NoSuf|ImmExt, { AnyMem, 0, 0 } },
-{"stgi", 0, 0x0f01, 0xdc, CpuSVME, NoSuf|ImmExt, { 0, 0, 0 } },
-{"vmload", 0, 0x0f01, 0xda, CpuSVME, NoSuf|ImmExt, { 0, 0, 0 } },
-{"vmload", 1, 0x0f01, 0xda, CpuSVME, NoSuf|ImmExt, { AnyMem, 0, 0 } },
-{"vmmcall", 0, 0x0f01, 0xd9, CpuSVME, NoSuf|ImmExt, { 0, 0, 0 } },
-{"vmrun", 0, 0x0f01, 0xd8, CpuSVME, NoSuf|ImmExt, { 0, 0, 0 } },
-{"vmrun", 1, 0x0f01, 0xd8, CpuSVME, NoSuf|ImmExt, { AnyMem, 0, 0 } },
-{"vmsave", 0, 0x0f01, 0xdb, CpuSVME, NoSuf|ImmExt, { 0, 0, 0 } },
-{"vmsave", 1, 0x0f01, 0xdb, CpuSVME, NoSuf|ImmExt, { AnyMem, 0, 0 } },
+/* register numbers */
+#define EBP_REG_NUM 5
+#define ESP_REG_NUM 4
-/* VIA PadLock extensions. */
-{"xstore-rng",0, 0x000fa7, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcrypt-ecb",0, 0xf30fa7, 0xc8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcrypt-cbc",0, 0xf30fa7, 0xd0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcrypt-ctr",0, 0xf30fa7, 0xd8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcrypt-cfb",0, 0xf30fa7, 0xe0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcrypt-ofb",0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"montmul", 0, 0xf30fa6, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xsha1", 0, 0xf30fa6, 0xc8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xsha256", 0, 0xf30fa6, 0xd0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-/* Aliases without hyphens. */
-{"xstorerng", 0, 0x000fa7, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcryptecb", 0, 0xf30fa7, 0xc8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcryptcbc", 0, 0xf30fa7, 0xd0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcryptctr", 0, 0xf30fa7, 0xd8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcryptcfb", 0, 0xf30fa7, 0xe0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-{"xcryptofb", 0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
-/* Alias for xstore-rng. */
-{"xstore", 0, 0x000fa7, 0xc0, Cpu686|CpuPadLock, NoSuf|IsString|ImmExt, { 0, 0, 0} },
+/* modrm_byte.regmem for twobyte escape */
+#define ESCAPE_TO_TWO_BYTE_ADDRESSING ESP_REG_NUM
+/* index_base_byte.index for no index register addressing */
+#define NO_INDEX_REGISTER ESP_REG_NUM
+/* index_base_byte.base for no base register addressing */
+#define NO_BASE_REGISTER EBP_REG_NUM
+#define NO_BASE_REGISTER_16 6
-/* sentinel */
-{NULL, 0, 0, 0, 0, 0, { 0, 0, 0} }
-};
-#undef X
-#undef NoSuf
-#undef b_Suf
-#undef w_Suf
-#undef l_Suf
-#undef q_Suf
-#undef x_Suf
-#undef bw_Suf
-#undef bl_Suf
-#undef wl_Suf
-#undef wlq_Suf
-#undef sl_Suf
-#undef bwl_Suf
-#undef bwlq_Suf
-#undef FP
-#undef l_FP
-#undef q_FP
-#undef x_FP
-#undef sl_FP
+/* modrm.mode = REGMEM_FIELD_HAS_REG when a register is in there */
+#define REGMEM_FIELD_HAS_REG 0x3/* always = 0x3 */
+#define REGMEM_FIELD_HAS_MEM (~REGMEM_FIELD_HAS_REG)
-#define MAX_MNEM_SIZE 16 /* For parsing insn mnemonics from input. */
+/* x86-64 extension prefix. */
+#define REX_OPCODE 0x40
-/* 386 register table. */
+/* Indicates 64 bit operand size. */
+#define REX_W 8
+/* High extension to reg field of modrm byte. */
+#define REX_R 4
+/* High extension to SIB index field. */
+#define REX_X 2
+/* High extension to base field of modrm or SIB, or reg field of opcode. */
+#define REX_B 1
-static const reg_entry i386_regtab[] =
-{
- /* Make %st first as we test for it. */
- {"st", FloatReg|FloatAcc, 0, 0},
- /* 8 bit regs */
-#define REGNAM_AL 1 /* Entry in i386_regtab. */
- {"al", Reg8|Acc, 0, 0},
- {"cl", Reg8|ShiftCount, 0, 1},
- {"dl", Reg8, 0, 2},
- {"bl", Reg8, 0, 3},
- {"ah", Reg8, 0, 4},
- {"ch", Reg8, 0, 5},
- {"dh", Reg8, 0, 6},
- {"bh", Reg8, 0, 7},
- {"axl", Reg8|Acc, RegRex64, 0}, /* Must be in the "al + 8" slot. */
- {"cxl", Reg8, RegRex64, 1},
- {"dxl", Reg8, RegRex64, 2},
- {"bxl", Reg8, RegRex64, 3},
- {"spl", Reg8, RegRex64, 4},
- {"bpl", Reg8, RegRex64, 5},
- {"sil", Reg8, RegRex64, 6},
- {"dil", Reg8, RegRex64, 7},
- {"r8b", Reg8, RegRex64|RegRex, 0},
- {"r9b", Reg8, RegRex64|RegRex, 1},
- {"r10b", Reg8, RegRex64|RegRex, 2},
- {"r11b", Reg8, RegRex64|RegRex, 3},
- {"r12b", Reg8, RegRex64|RegRex, 4},
- {"r13b", Reg8, RegRex64|RegRex, 5},
- {"r14b", Reg8, RegRex64|RegRex, 6},
- {"r15b", Reg8, RegRex64|RegRex, 7},
- /* 16 bit regs */
-#define REGNAM_AX 25
- {"ax", Reg16|Acc, 0, 0},
- {"cx", Reg16, 0, 1},
- {"dx", Reg16|InOutPortReg, 0, 2},
- {"bx", Reg16|BaseIndex, 0, 3},
- {"sp", Reg16, 0, 4},
- {"bp", Reg16|BaseIndex, 0, 5},
- {"si", Reg16|BaseIndex, 0, 6},
- {"di", Reg16|BaseIndex, 0, 7},
- {"r8w", Reg16, RegRex, 0},
- {"r9w", Reg16, RegRex, 1},
- {"r10w", Reg16, RegRex, 2},
- {"r11w", Reg16, RegRex, 3},
- {"r12w", Reg16, RegRex, 4},
- {"r13w", Reg16, RegRex, 5},
- {"r14w", Reg16, RegRex, 6},
- {"r15w", Reg16, RegRex, 7},
- /* 32 bit regs */
-#define REGNAM_EAX 41
- {"eax", Reg32|BaseIndex|Acc, 0, 0}, /* Must be in ax + 16 slot. */
- {"ecx", Reg32|BaseIndex, 0, 1},
- {"edx", Reg32|BaseIndex, 0, 2},
- {"ebx", Reg32|BaseIndex, 0, 3},
- {"esp", Reg32, 0, 4},
- {"ebp", Reg32|BaseIndex, 0, 5},
- {"esi", Reg32|BaseIndex, 0, 6},
- {"edi", Reg32|BaseIndex, 0, 7},
- {"r8d", Reg32|BaseIndex, RegRex, 0},
- {"r9d", Reg32|BaseIndex, RegRex, 1},
- {"r10d", Reg32|BaseIndex, RegRex, 2},
- {"r11d", Reg32|BaseIndex, RegRex, 3},
- {"r12d", Reg32|BaseIndex, RegRex, 4},
- {"r13d", Reg32|BaseIndex, RegRex, 5},
- {"r14d", Reg32|BaseIndex, RegRex, 6},
- {"r15d", Reg32|BaseIndex, RegRex, 7},
- {"rax", Reg64|BaseIndex|Acc, 0, 0},
- {"rcx", Reg64|BaseIndex, 0, 1},
- {"rdx", Reg64|BaseIndex, 0, 2},
- {"rbx", Reg64|BaseIndex, 0, 3},
- {"rsp", Reg64, 0, 4},
- {"rbp", Reg64|BaseIndex, 0, 5},
- {"rsi", Reg64|BaseIndex, 0, 6},
- {"rdi", Reg64|BaseIndex, 0, 7},
- {"r8", Reg64|BaseIndex, RegRex, 0},
- {"r9", Reg64|BaseIndex, RegRex, 1},
- {"r10", Reg64|BaseIndex, RegRex, 2},
- {"r11", Reg64|BaseIndex, RegRex, 3},
- {"r12", Reg64|BaseIndex, RegRex, 4},
- {"r13", Reg64|BaseIndex, RegRex, 5},
- {"r14", Reg64|BaseIndex, RegRex, 6},
- {"r15", Reg64|BaseIndex, RegRex, 7},
- /* Segment registers. */
- {"es", SReg2, 0, 0},
- {"cs", SReg2, 0, 1},
- {"ss", SReg2, 0, 2},
- {"ds", SReg2, 0, 3},
- {"fs", SReg3, 0, 4},
- {"gs", SReg3, 0, 5},
- /* Control registers. */
- {"cr0", Control, 0, 0},
- {"cr1", Control, 0, 1},
- {"cr2", Control, 0, 2},
- {"cr3", Control, 0, 3},
- {"cr4", Control, 0, 4},
- {"cr5", Control, 0, 5},
- {"cr6", Control, 0, 6},
- {"cr7", Control, 0, 7},
- {"cr8", Control, RegRex, 0},
- {"cr9", Control, RegRex, 1},
- {"cr10", Control, RegRex, 2},
- {"cr11", Control, RegRex, 3},
- {"cr12", Control, RegRex, 4},
- {"cr13", Control, RegRex, 5},
- {"cr14", Control, RegRex, 6},
- {"cr15", Control, RegRex, 7},
- /* Debug registers. */
- {"db0", Debug, 0, 0},
- {"db1", Debug, 0, 1},
- {"db2", Debug, 0, 2},
- {"db3", Debug, 0, 3},
- {"db4", Debug, 0, 4},
- {"db5", Debug, 0, 5},
- {"db6", Debug, 0, 6},
- {"db7", Debug, 0, 7},
- {"db8", Debug, RegRex, 0},
- {"db9", Debug, RegRex, 1},
- {"db10", Debug, RegRex, 2},
- {"db11", Debug, RegRex, 3},
- {"db12", Debug, RegRex, 4},
- {"db13", Debug, RegRex, 5},
- {"db14", Debug, RegRex, 6},
- {"db15", Debug, RegRex, 7},
- {"dr0", Debug, 0, 0},
- {"dr1", Debug, 0, 1},
- {"dr2", Debug, 0, 2},
- {"dr3", Debug, 0, 3},
- {"dr4", Debug, 0, 4},
- {"dr5", Debug, 0, 5},
- {"dr6", Debug, 0, 6},
- {"dr7", Debug, 0, 7},
- {"dr8", Debug, RegRex, 0},
- {"dr9", Debug, RegRex, 1},
- {"dr10", Debug, RegRex, 2},
- {"dr11", Debug, RegRex, 3},
- {"dr12", Debug, RegRex, 4},
- {"dr13", Debug, RegRex, 5},
- {"dr14", Debug, RegRex, 6},
- {"dr15", Debug, RegRex, 7},
- /* Test registers. */
- {"tr0", Test, 0, 0},
- {"tr1", Test, 0, 1},
- {"tr2", Test, 0, 2},
- {"tr3", Test, 0, 3},
- {"tr4", Test, 0, 4},
- {"tr5", Test, 0, 5},
- {"tr6", Test, 0, 6},
- {"tr7", Test, 0, 7},
- /* MMX and simd registers. */
- {"mm0", RegMMX, 0, 0},
- {"mm1", RegMMX, 0, 1},
- {"mm2", RegMMX, 0, 2},
- {"mm3", RegMMX, 0, 3},
- {"mm4", RegMMX, 0, 4},
- {"mm5", RegMMX, 0, 5},
- {"mm6", RegMMX, 0, 6},
- {"mm7", RegMMX, 0, 7},
- {"xmm0", RegXMM, 0, 0},
- {"xmm1", RegXMM, 0, 1},
- {"xmm2", RegXMM, 0, 2},
- {"xmm3", RegXMM, 0, 3},
- {"xmm4", RegXMM, 0, 4},
- {"xmm5", RegXMM, 0, 5},
- {"xmm6", RegXMM, 0, 6},
- {"xmm7", RegXMM, 0, 7},
- {"xmm8", RegXMM, RegRex, 0},
- {"xmm9", RegXMM, RegRex, 1},
- {"xmm10", RegXMM, RegRex, 2},
- {"xmm11", RegXMM, RegRex, 3},
- {"xmm12", RegXMM, RegRex, 4},
- {"xmm13", RegXMM, RegRex, 5},
- {"xmm14", RegXMM, RegRex, 6},
- {"xmm15", RegXMM, RegRex, 7},
- /* No type will make this register rejected for all purposes except
- for addressing. This saves creating one extra type for RIP. */
- {"rip", BaseIndex, 0, 0}
-};
+/* max operands per insn */
+#define MAX_OPERANDS 4
-static const reg_entry i386_float_regtab[] =
-{
- {"st(0)", FloatReg|FloatAcc, 0, 0},
- {"st(1)", FloatReg, 0, 1},
- {"st(2)", FloatReg, 0, 2},
- {"st(3)", FloatReg, 0, 3},
- {"st(4)", FloatReg, 0, 4},
- {"st(5)", FloatReg, 0, 5},
- {"st(6)", FloatReg, 0, 6},
- {"st(7)", FloatReg, 0, 7}
-};
+/* max immediates per insn (lcall, ljmp, insertq, extrq) */
+#define MAX_IMMEDIATE_OPERANDS 2
-#define MAX_REG_NAME_SIZE 8 /* For parsing register names from input. */
+/* max memory refs per insn (string ops) */
+#define MAX_MEMORY_OPERANDS 2
-/* Segment stuff. */
-static const seg_entry cs = { "cs", 0x2e };
-static const seg_entry ds = { "ds", 0x3e };
-static const seg_entry ss = { "ss", 0x36 };
-static const seg_entry es = { "es", 0x26 };
-static const seg_entry fs = { "fs", 0x64 };
-static const seg_entry gs = { "gs", 0x65 };
+/* max size of insn mnemonics. */
+#define MAX_MNEM_SIZE 16
+/* max size of register name in insn mnemonics. */
+#define MAX_REG_NAME_SIZE 8
diff --git a/contrib/binutils/include/opcode/mips.h b/contrib/binutils/include/opcode/mips.h
index 1544854..2d321c8 100644
--- a/contrib/binutils/include/opcode/mips.h
+++ b/contrib/binutils/include/opcode/mips.h
@@ -171,6 +171,8 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US
#define OP_MASK_WRDSP 0x3f
#define OP_SH_RDDSP 16
#define OP_MASK_RDDSP 0x3f
+#define OP_SH_BP 11
+#define OP_MASK_BP 0x3
/* MIPS MT ASE */
#define OP_SH_MT_U 5
@@ -205,6 +207,16 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US
#define MDMX_FMTSEL_VEC_QH 0x15
#define MDMX_FMTSEL_VEC_OB 0x16
+/* UDI */
+#define OP_SH_UDI1 6
+#define OP_MASK_UDI1 0x1f
+#define OP_SH_UDI2 6
+#define OP_MASK_UDI2 0x3ff
+#define OP_SH_UDI3 6
+#define OP_MASK_UDI3 0x7fff
+#define OP_SH_UDI4 6
+#define OP_MASK_UDI4 0xfffff
+
/* This structure holds information for a particular instruction. */
struct mips_opcode
@@ -273,19 +285,20 @@ struct mips_opcode
"y" 10 bit signed const (OP_*_CODE2)
"z" must be zero register
"K" 5 bit Hardware Register (rdhwr instruction) (OP_*_RD)
- "+A" 5 bit ins/ext position, which becomes LSB (OP_*_SHAMT).
+ "+A" 5 bit ins/ext/dins/dext/dinsm/dextm position, which becomes
+ LSB (OP_*_SHAMT).
Enforces: 0 <= pos < 32.
- "+B" 5 bit ins size, which becomes MSB (OP_*_INSMSB).
+ "+B" 5 bit ins/dins size, which becomes MSB (OP_*_INSMSB).
Requires that "+A" or "+E" occur first to set position.
Enforces: 0 < (pos+size) <= 32.
- "+C" 5 bit ext size, which becomes MSBD (OP_*_EXTMSBD).
+ "+C" 5 bit ext/dext size, which becomes MSBD (OP_*_EXTMSBD).
Requires that "+A" or "+E" occur first to set position.
Enforces: 0 < (pos+size) <= 32.
(Also used by "dext" w/ different limits, but limits for
that are checked by the M_DEXT macro.)
- "+E" 5 bit dins/dext position, which becomes LSB-32 (OP_*_SHAMT).
+ "+E" 5 bit dinsu/dextu position, which becomes LSB-32 (OP_*_SHAMT).
Enforces: 32 <= pos < 64.
- "+F" 5 bit "dinsm" size, which becomes MSB-32 (OP_*_INSMSB).
+ "+F" 5 bit "dinsm/dinsu" size, which becomes MSB-32 (OP_*_INSMSB).
Requires that "+A" or "+E" occur first to set position.
Enforces: 32 < (pos+size) <= 64.
"+G" 5 bit "dextm" size, which becomes MSBD-32 (OP_*_EXTMSBD).
@@ -334,6 +347,7 @@ struct mips_opcode
"Z" MDMX source register (OP_*_FT)
DSP ASE usage:
+ "2" 2 bit unsigned immediate for byte align (OP_*_BP)
"3" 3 bit unsigned immediate (OP_*_SA3)
"4" 4 bit unsigned immediate (OP_*_SA4)
"5" 8 bit unsigned immediate (OP_*_IMM8)
@@ -347,14 +361,20 @@ struct mips_opcode
"@" 10 bit signed immediate (OP_*_IMM10)
MT ASE usage:
- "!" 1 bit immediate at bit 5
- "$" 1 bit immediate at bit 4
+ "!" 1 bit usermode flag (OP_*_MT_U)
+ "$" 1 bit load high flag (OP_*_MT_H)
"*" 2 bit dsp/smartmips accumulator register (OP_*_MTACC_T)
"&" 2 bit dsp/smartmips accumulator register (OP_*_MTACC_D)
"g" 5 bit coprocessor 1 and 2 destination register (OP_*_RD)
"+t" 5 bit coprocessor 0 destination register (OP_*_RT)
"+T" 5 bit coprocessor 0 destination register (OP_*_RT) - disassembly only
+ UDI immediates:
+ "+1" UDI immediate bits 6-10
+ "+2" UDI immediate bits 6-15
+ "+3" UDI immediate bits 6-20
+ "+4" UDI immediate bits 6-25
+
Other:
"()" parens surrounding optional value
"," separates operands
@@ -362,13 +382,14 @@ struct mips_opcode
"+" Start of extension sequence.
Characters used so far, for quick reference when adding more:
- "34567890"
+ "234567890"
"%[]<>(),+:'@!$*&^~"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklopqrstuvwxyz"
Extension character sequences used so far ("+" followed by the
following), for quick reference when adding more:
+ "1234"
"ABCDEFGHIT"
"t"
*/
@@ -472,16 +493,15 @@ struct mips_opcode
#define INSN_ISA64R2 0x00000100
/* Masks used for MIPS-defined ASEs. */
-#define INSN_ASE_MASK 0x0400f000
+#define INSN_ASE_MASK 0x3c00f000
/* DSP ASE */
#define INSN_DSP 0x00001000
+#define INSN_DSP64 0x00002000
/* MIPS 16 ASE */
-#define INSN_MIPS16 0x00002000
+#define INSN_MIPS16 0x00004000
/* MIPS-3D ASE */
-#define INSN_MIPS3D 0x00004000
-/* MDMX ASE */
-#define INSN_MDMX 0x00008000
+#define INSN_MIPS3D 0x00008000
/* Chip specific instructions. These are bitmasks. */
@@ -505,8 +525,15 @@ struct mips_opcode
#define INSN_5400 0x01000000
/* NEC VR5500 instruction. */
#define INSN_5500 0x02000000
+
+/* MDMX ASE */
+#define INSN_MDMX 0x04000000
/* MT ASE */
-#define INSN_MT 0x04000000
+#define INSN_MT 0x08000000
+/* SmartMIPS ASE */
+#define INSN_SMARTMIPS 0x10000000
+/* DSP R2 ASE */
+#define INSN_DSPR2 0x20000000
/* Cavium Networks Octeon instruction. */
#define INSN_OCTEON 0x08000000
@@ -595,6 +622,7 @@ enum
M_ADD_I,
M_ADDU_I,
M_AND_I,
+ M_BALIGN,
M_BEQ,
M_BEQ_I,
M_BEQL_I,
@@ -633,6 +661,7 @@ enum
M_BNE,
M_BNE_I,
M_BNEL_I,
+ M_CACHE_AB,
M_DABS,
M_DADD_I,
M_DADDU_I,
diff --git a/contrib/binutils/include/opcode/ppc.h b/contrib/binutils/include/opcode/ppc.h
index f662630..6771856 100644
--- a/contrib/binutils/include/opcode/ppc.h
+++ b/contrib/binutils/include/opcode/ppc.h
@@ -1,6 +1,6 @@
/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005
- Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -135,10 +135,16 @@ extern const int powerpc_num_opcodes;
#define PPC_OPCODE_RFMCI 0x800000
/* Opcode is only supported by Power5 architecture. */
-#define PPC_OPCODE_POWER5 0x1000000
+#define PPC_OPCODE_POWER5 0x1000000
/* Opcode is supported by PowerPC e300 family. */
-#define PPC_OPCODE_E300 0x2000000
+#define PPC_OPCODE_E300 0x2000000
+
+/* Opcode is only supported by Power6 architecture. */
+#define PPC_OPCODE_POWER6 0x4000000
+
+/* Opcode is only supported by PowerPC Cell family. */
+#define PPC_OPCODE_CELL 0x8000000
/* A macro to extract the major opcode from an instruction. */
#define PPC_OP(i) (((i) >> 26) & 0x3f)
@@ -147,20 +153,21 @@ extern const int powerpc_num_opcodes;
struct powerpc_operand
{
- /* The number of bits in the operand. */
- int bits;
+ /* A bitmask of bits in the operand. */
+ unsigned int bitm;
- /* How far the operand is left shifted in the instruction. */
+ /* How far the operand is left shifted in the instruction.
+ -1 to indicate that BITM and SHIFT cannot be used to determine
+ where the operand goes in the insn. */
int shift;
/* Insertion function. This is used by the assembler. To insert an
operand value into an instruction, check this field.
If it is NULL, execute
- i |= (op & ((1 << o->bits) - 1)) << o->shift;
+ i |= (op & o->bitm) << o->shift;
(i is the instruction which we are filling in, o is a pointer to
- this structure, and op is the opcode value; this assumes twos
- complement arithmetic).
+ this structure, and op is the operand value).
If this field is not NULL, then simply call it with the
instruction and the operand value. It will return the new value
@@ -176,12 +183,11 @@ struct powerpc_operand
extract this operand type from an instruction, check this field.
If it is NULL, compute
- op = ((i) >> o->shift) & ((1 << o->bits) - 1);
- if ((o->flags & PPC_OPERAND_SIGNED) != 0
- && (op & (1 << (o->bits - 1))) != 0)
- op -= 1 << o->bits;
+ op = (i >> o->shift) & o->bitm;
+ if ((o->flags & PPC_OPERAND_SIGNED) != 0)
+ sign_extend (op);
(i is the instruction, o is a pointer to this structure, and op
- is the result; this assumes twos complement arithmetic).
+ is the result).
If this field is not NULL, then simply call it with the
instruction value. It will return the value of the operand. If
@@ -199,17 +205,18 @@ struct powerpc_operand
the operands field of the powerpc_opcodes table. */
extern const struct powerpc_operand powerpc_operands[];
+extern const unsigned int num_powerpc_operands;
/* Values defined for the flags field of a struct powerpc_operand. */
/* This operand takes signed values. */
-#define PPC_OPERAND_SIGNED (01)
+#define PPC_OPERAND_SIGNED (0x1)
/* This operand takes signed values, but also accepts a full positive
range of values when running in 32 bit mode. That is, if bits is
16, it takes any value from -0x8000 to 0xffff. In 64 bit mode,
this flag is ignored. */
-#define PPC_OPERAND_SIGNOPT (02)
+#define PPC_OPERAND_SIGNOPT (0x2)
/* This operand does not actually exist in the assembler input. This
is used to support extended mnemonics such as mr, for which two
@@ -217,14 +224,14 @@ extern const struct powerpc_operand powerpc_operands[];
insert function with any op value. The disassembler should call
the extract function, ignore the return value, and check the value
placed in the valid argument. */
-#define PPC_OPERAND_FAKE (04)
+#define PPC_OPERAND_FAKE (0x4)
/* The next operand should be wrapped in parentheses rather than
separated from this one by a comma. This is used for the load and
store instructions which want their operands to look like
reg,displacement(reg)
*/
-#define PPC_OPERAND_PARENS (010)
+#define PPC_OPERAND_PARENS (0x8)
/* This operand may use the symbolic names for the CR fields, which
are
@@ -233,26 +240,26 @@ extern const struct powerpc_operand powerpc_operands[];
cr4 4 cr5 5 cr6 6 cr7 7
These may be combined arithmetically, as in cr2*4+gt. These are
only supported on the PowerPC, not the POWER. */
-#define PPC_OPERAND_CR (020)
+#define PPC_OPERAND_CR (0x10)
/* This operand names a register. The disassembler uses this to print
register names with a leading 'r'. */
-#define PPC_OPERAND_GPR (040)
+#define PPC_OPERAND_GPR (0x20)
/* Like PPC_OPERAND_GPR, but don't print a leading 'r' for r0. */
-#define PPC_OPERAND_GPR_0 (0100)
+#define PPC_OPERAND_GPR_0 (0x40)
/* This operand names a floating point register. The disassembler
prints these with a leading 'f'. */
-#define PPC_OPERAND_FPR (0200)
+#define PPC_OPERAND_FPR (0x80)
/* This operand is a relative branch displacement. The disassembler
prints these symbolically if possible. */
-#define PPC_OPERAND_RELATIVE (0400)
+#define PPC_OPERAND_RELATIVE (0x100)
/* This operand is an absolute branch address. The disassembler
prints these symbolically if possible. */
-#define PPC_OPERAND_ABSOLUTE (01000)
+#define PPC_OPERAND_ABSOLUTE (0x200)
/* This operand is optional, and is zero if omitted. This is used for
example, in the optional BF field in the comparison instructions. The
@@ -260,7 +267,7 @@ extern const struct powerpc_operand powerpc_operands[];
and the number of operands remaining for the opcode, and decide
whether this operand is present or not. The disassembler should
print this operand out only if it is not zero. */
-#define PPC_OPERAND_OPTIONAL (02000)
+#define PPC_OPERAND_OPTIONAL (0x400)
/* This flag is only used with PPC_OPERAND_OPTIONAL. If this operand
is omitted, then for the next operand use this operand value plus
@@ -268,24 +275,27 @@ extern const struct powerpc_operand powerpc_operands[];
hack is needed because the Power rotate instructions can take
either 4 or 5 operands. The disassembler should print this operand
out regardless of the PPC_OPERAND_OPTIONAL field. */
-#define PPC_OPERAND_NEXT (04000)
+#define PPC_OPERAND_NEXT (0x800)
/* This operand should be regarded as a negative number for the
purposes of overflow checking (i.e., the normal most negative
number is disallowed and one more than the normal most positive
number is allowed). This flag will only be set for a signed
operand. */
-#define PPC_OPERAND_NEGATIVE (010000)
+#define PPC_OPERAND_NEGATIVE (0x1000)
/* This operand names a vector unit register. The disassembler
prints these with a leading 'v'. */
-#define PPC_OPERAND_VR (020000)
+#define PPC_OPERAND_VR (0x2000)
/* This operand is for the DS field in a DS form instruction. */
-#define PPC_OPERAND_DS (040000)
+#define PPC_OPERAND_DS (0x4000)
/* This operand is for the DQ field in a DQ form instruction. */
-#define PPC_OPERAND_DQ (0100000)
+#define PPC_OPERAND_DQ (0x8000)
+
+/* Valid range of operand is 0..n rather than 0..n-1. */
+#define PPC_OPERAND_PLUS1 (0x10000)
/* 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/opcode/s390.h b/contrib/binutils/include/opcode/s390.h
index 7bb30de..ae039ef 100644
--- a/contrib/binutils/include/opcode/s390.h
+++ b/contrib/binutils/include/opcode/s390.h
@@ -36,7 +36,8 @@ enum s390_opcode_cpu_val
S390_OPCODE_G6,
S390_OPCODE_Z900,
S390_OPCODE_Z990,
- S390_OPCODE_Z9_109
+ S390_OPCODE_Z9_109,
+ S390_OPCODE_Z9_EC
};
/* The opcode table is an array of struct s390_opcode. */
diff --git a/contrib/binutils/include/opcode/score-datadep.h b/contrib/binutils/include/opcode/score-datadep.h
new file mode 100644
index 0000000..8ef35ad
--- /dev/null
+++ b/contrib/binutils/include/opcode/score-datadep.h
@@ -0,0 +1,282 @@
+/* score-datadep.h -- Score Instructions data dependency table
+ Copyright 2006 Free Software Foundation, Inc.
+ Contributed by:
+ Mei Ligang (ligang@sunnorth.com.cn)
+ Pei-Lin Tsai (pltsai@sunplus.com)
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+#ifndef SCORE_DATA_DEPENDENCY_H
+#define SCORE_DATA_DEPENDENCY_H
+
+#define INSN_NAME_LEN 16
+
+enum insn_type_for_dependency
+{
+ D_pce,
+ D_cond_br,
+ D_cond_mv,
+ D_cached,
+ D_cachei,
+ D_ldst,
+ D_ldcombine,
+ D_mtcr,
+ D_mfcr,
+ D_mfsr,
+ D_mftlb,
+ D_mtptlb,
+ D_mtrtlb,
+ D_stlb,
+ D_all_insn
+};
+
+struct insn_to_dependency
+{
+ char *insn_name;
+ enum insn_type_for_dependency type;
+};
+
+struct data_dependency
+{
+ enum insn_type_for_dependency pre_insn_type;
+ char pre_reg[6];
+ enum insn_type_for_dependency cur_insn_type;
+ char cur_reg[6];
+ int bubblenum_7;
+ int bubblenum_5;
+ int warn_or_error; /* warning - 0; error - 1 */
+};
+
+static const struct insn_to_dependency insn_to_dependency_table[] =
+{
+ /* pce instruction. */
+ {"pce", D_pce},
+ /* conditional branch instruction. */
+ {"bcs", D_cond_br},
+ {"bcc", D_cond_br},
+ {"bgtu", D_cond_br},
+ {"bleu", D_cond_br},
+ {"beq", D_cond_br},
+ {"bne", D_cond_br},
+ {"bgt", D_cond_br},
+ {"ble", D_cond_br},
+ {"bge", D_cond_br},
+ {"blt", D_cond_br},
+ {"bmi", D_cond_br},
+ {"bpl", D_cond_br},
+ {"bvs", D_cond_br},
+ {"bvc", D_cond_br},
+ {"bcsl", D_cond_br},
+ {"bccl", D_cond_br},
+ {"bgtul", D_cond_br},
+ {"bleul", D_cond_br},
+ {"beql", D_cond_br},
+ {"bnel", D_cond_br},
+ {"bgtl", D_cond_br},
+ {"blel", D_cond_br},
+ {"bgel", D_cond_br},
+ {"bltl", D_cond_br},
+ {"bmil", D_cond_br},
+ {"bpll", D_cond_br},
+ {"bvsl", D_cond_br},
+ {"bvcl", D_cond_br},
+ {"bcs!", D_cond_br},
+ {"bcc!", D_cond_br},
+ {"bgtu!", D_cond_br},
+ {"bleu!", D_cond_br},
+ {"beq!", D_cond_br},
+ {"bne!", D_cond_br},
+ {"bgt!", D_cond_br},
+ {"ble!", D_cond_br},
+ {"bge!", D_cond_br},
+ {"blt!", D_cond_br},
+ {"bmi!", D_cond_br},
+ {"bpl!", D_cond_br},
+ {"bvs!", D_cond_br},
+ {"bvc!", D_cond_br},
+ {"brcs", D_cond_br},
+ {"brcc", D_cond_br},
+ {"brgtu", D_cond_br},
+ {"brleu", D_cond_br},
+ {"breq", D_cond_br},
+ {"brne", D_cond_br},
+ {"brgt", D_cond_br},
+ {"brle", D_cond_br},
+ {"brge", D_cond_br},
+ {"brlt", D_cond_br},
+ {"brmi", D_cond_br},
+ {"brpl", D_cond_br},
+ {"brvs", D_cond_br},
+ {"brvc", D_cond_br},
+ {"brcsl", D_cond_br},
+ {"brccl", D_cond_br},
+ {"brgtul", D_cond_br},
+ {"brleul", D_cond_br},
+ {"breql", D_cond_br},
+ {"brnel", D_cond_br},
+ {"brgtl", D_cond_br},
+ {"brlel", D_cond_br},
+ {"brgel", D_cond_br},
+ {"brltl", D_cond_br},
+ {"brmil", D_cond_br},
+ {"brpll", D_cond_br},
+ {"brvsl", D_cond_br},
+ {"brvcl", D_cond_br},
+ {"brcs!", D_cond_br},
+ {"brcc!", D_cond_br},
+ {"brgtu!", D_cond_br},
+ {"brleu!", D_cond_br},
+ {"breq!", D_cond_br},
+ {"brne!", D_cond_br},
+ {"brgt!", D_cond_br},
+ {"brle!", D_cond_br},
+ {"brge!", D_cond_br},
+ {"brlt!", D_cond_br},
+ {"brmi!", D_cond_br},
+ {"brpl!", D_cond_br},
+ {"brvs!", D_cond_br},
+ {"brvc!", D_cond_br},
+ {"brcsl!", D_cond_br},
+ {"brccl!", D_cond_br},
+ {"brgtul!", D_cond_br},
+ {"brleul!", D_cond_br},
+ {"breql!", D_cond_br},
+ {"brnel!", D_cond_br},
+ {"brgtl!", D_cond_br},
+ {"brlel!", D_cond_br},
+ {"brgel!", D_cond_br},
+ {"brltl!", D_cond_br},
+ {"brmil!", D_cond_br},
+ {"brpll!", D_cond_br},
+ {"brvsl!", D_cond_br},
+ {"brvcl!", D_cond_br},
+ /* conditional move instruction. */
+ {"mvcs", D_cond_mv},
+ {"mvcc", D_cond_mv},
+ {"mvgtu", D_cond_mv},
+ {"mvleu", D_cond_mv},
+ {"mveq", D_cond_mv},
+ {"mvne", D_cond_mv},
+ {"mvgt", D_cond_mv},
+ {"mvle", D_cond_mv},
+ {"mvge", D_cond_mv},
+ {"mvlt", D_cond_mv},
+ {"mvmi", D_cond_mv},
+ {"mvpl", D_cond_mv},
+ {"mvvs", D_cond_mv},
+ {"mvvc", D_cond_mv},
+ /* move spectial instruction. */
+ {"mtcr", D_mtcr},
+ {"mftlb", D_mftlb},
+ {"mtptlb", D_mtptlb},
+ {"mtrtlb", D_mtrtlb},
+ {"stlb", D_stlb},
+ {"mfcr", D_mfcr},
+ {"mfsr", D_mfsr},
+ /* cache instruction. */
+ {"cache 8", D_cached},
+ {"cache 9", D_cached},
+ {"cache 10", D_cached},
+ {"cache 11", D_cached},
+ {"cache 12", D_cached},
+ {"cache 13", D_cached},
+ {"cache 14", D_cached},
+ {"cache 24", D_cached},
+ {"cache 26", D_cached},
+ {"cache 27", D_cached},
+ {"cache 29", D_cached},
+ {"cache 30", D_cached},
+ {"cache 31", D_cached},
+ {"cache 0", D_cachei},
+ {"cache 1", D_cachei},
+ {"cache 2", D_cachei},
+ {"cache 3", D_cachei},
+ {"cache 4", D_cachei},
+ {"cache 16", D_cachei},
+ {"cache 17", D_cachei},
+ /* load/store instruction. */
+ {"lb", D_ldst},
+ {"lbu", D_ldst},
+ {"lbu!", D_ldst},
+ {"lbup!", D_ldst},
+ {"lh", D_ldst},
+ {"lhu", D_ldst},
+ {"lh!", D_ldst},
+ {"lhp!", D_ldst},
+ {"lw", D_ldst},
+ {"lw!", D_ldst},
+ {"lwp!", D_ldst},
+ {"sb", D_ldst},
+ {"sb!", D_ldst},
+ {"sbp!", D_ldst},
+ {"sh", D_ldst},
+ {"sh!", D_ldst},
+ {"shp!", D_ldst},
+ {"sw", D_ldst},
+ {"sw!", D_ldst},
+ {"swp!", D_ldst},
+ {"alw", D_ldst},
+ {"asw", D_ldst},
+ {"push!", D_ldst},
+ {"pushhi!", D_ldst},
+ {"pop!", D_ldst},
+ {"pophi!", D_ldst},
+ {"ldc1", D_ldst},
+ {"ldc2", D_ldst},
+ {"ldc3", D_ldst},
+ {"stc1", D_ldst},
+ {"stc2", D_ldst},
+ {"stc3", D_ldst},
+ {"scb", D_ldst},
+ {"scw", D_ldst},
+ {"sce", D_ldst},
+ /* load combine instruction. */
+ {"lcb", D_ldcombine},
+ {"lcw", D_ldcombine},
+ {"lce", D_ldcombine},
+};
+
+static const struct data_dependency data_dependency_table[] =
+{
+ /* Condition register. */
+ {D_mtcr, "cr1", D_pce, "", 2, 1, 1},
+ {D_mtcr, "cr1", D_cond_br, "", 1, 0, 1},
+ {D_mtcr, "cr1", D_cond_mv, "", 1, 0, 1},
+ /* Status regiser. */
+ {D_mtcr, "cr0", D_all_insn, "", 5, 4, 0},
+ /* CCR regiser. */
+ {D_mtcr, "cr4", D_all_insn, "", 6, 5, 0},
+ /* EntryHi/EntryLo register. */
+ {D_mftlb, "", D_mtptlb, "", 1, 1, 1},
+ {D_mftlb, "", D_mtrtlb, "", 1, 1, 1},
+ {D_mftlb, "", D_stlb, "", 1, 1,1},
+ {D_mftlb, "", D_mfcr, "cr11", 1, 1, 1},
+ {D_mftlb, "", D_mfcr, "cr12", 1, 1, 1},
+ /* Index register. */
+ {D_stlb, "", D_mtptlb, "", 1, 1, 1},
+ {D_stlb, "", D_mftlb, "", 1, 1, 1},
+ {D_stlb, "", D_mfcr, "cr8", 2, 2, 1},
+ /* Cache. */
+ {D_cached, "", D_ldst, "", 1, 1, 0},
+ {D_cached, "", D_ldcombine, "", 1, 1, 0},
+ {D_cachei, "", D_all_insn, "", 5, 4, 0},
+ /* Load combine. */
+ {D_ldcombine, "", D_mfsr, "sr1", 3, 3, 1},
+};
+
+#endif
diff --git a/contrib/binutils/include/opcode/score-inst.h b/contrib/binutils/include/opcode/score-inst.h
new file mode 100644
index 0000000..e87794f
--- /dev/null
+++ b/contrib/binutils/include/opcode/score-inst.h
@@ -0,0 +1,507 @@
+/* score-inst.h -- Score Instructions Table
+ Copyright 2006 Free Software Foundation, Inc.
+ Contributed by:
+ Mei Ligang (ligang@sunnorth.com.cn)
+ Pei-Lin Tsai (pltsai@sunplus.com)
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#ifndef SCORE_INST_H
+#define SCORE_INST_H
+
+#define LDST_UNALIGN_MASK 0x0000007f
+#define UA_LCB 0x00000060
+#define UA_LCW 0x00000062
+#define UA_LCE 0x00000066
+#define UA_SCB 0x00000068
+#define UA_SCW 0x0000006a
+#define UA_SCE 0x0000006e
+#define UA_LL 0x0000000c
+#define UA_SC 0x0000000e
+#define LDST16_RR_MASK 0x0000000f
+#define N16_LW 8
+#define N16_LH 9
+#define N16_POP 10
+#define N16_LBU 11
+#define N16_SW 12
+#define N16_SH 13
+#define N16_PUSH 14
+#define N16_SB 15
+#define LDST16_RI_MASK 0x7007
+#define N16_LWP 0x7000
+#define N16_LHP 0x7001
+#define N16_LBUP 0x7003
+#define N16_SWP 0x7004
+#define N16_SHP 0x7005
+#define N16_SBP 0x7007
+#define N16_LIU 0x5000
+
+#define OPC_PSEUDOLDST_MASK 0x00000007
+
+enum
+{
+ INSN_LW = 0,
+ INSN_LH = 1,
+ INSN_LHU = 2,
+ INSN_LB = 3,
+ INSN_SW = 4,
+ INSN_SH = 5,
+ INSN_LBU = 6,
+ INSN_SB = 7,
+};
+
+/* Sub opcdoe opcode. */
+enum
+{
+ INSN16_LBU = 11,
+ INSN16_LH = 9,
+ INSN16_LW = 8,
+ INSN16_SB = 15,
+ INSN16_SH = 13,
+ INSN16_SW = 12,
+};
+
+enum
+{
+ LDST_NOUPDATE = 0,
+ LDST_PRE = 1,
+ LDST_POST = 2,
+};
+
+enum score_insn_type
+{
+ Rd_I4,
+ Rd_I5,
+ Rd_rvalueBP_I5,
+ Rd_lvalueBP_I5,
+ Rd_Rs_I5,
+ x_Rs_I5,
+ x_I5_x,
+ Rd_I8,
+ Rd_Rs_I14,
+ I15,
+ Rd_I16,
+ Rd_rvalueRs_SI10,
+ Rd_lvalueRs_SI10,
+ Rd_rvalueRs_preSI12,
+ Rd_rvalueRs_postSI12,
+ Rd_lvalueRs_preSI12,
+ Rd_lvalueRs_postSI12,
+ Rd_Rs_SI14,
+ Rd_rvalueRs_SI15,
+ Rd_lvalueRs_SI15,
+ Rd_SI16,
+ PC_DISP8div2,
+ PC_DISP11div2,
+ PC_DISP19div2,
+ PC_DISP24div2,
+ Rd_Rs_Rs,
+ x_Rs_x,
+ x_Rs_Rs,
+ Rd_Rs_x,
+ Rd_x_Rs,
+ Rd_x_x,
+ Rd_Rs,
+ Rd_HighRs,
+ Rd_lvalueRs,
+ Rd_rvalueRs,
+ Rd_lvalue32Rs,
+ Rd_rvalue32Rs,
+ x_Rs,
+ NO_OPD,
+ NO16_OPD,
+ OP5_rvalueRs_SI15,
+ I5_Rs_Rs_I5_OP5,
+ x_rvalueRs_post4,
+ Rd_rvalueRs_post4,
+ Rd_x_I5,
+ Rd_lvalueRs_post4,
+ x_lvalueRs_post4,
+ Rd_LowRs,
+ Rd_Rs_Rs_imm,
+ Insn_Type_PCE,
+ Insn_Type_SYN,
+ Insn_GP,
+ Insn_PIC,
+ Insn_internal,
+};
+
+enum score_data_type
+{
+ _IMM4 = 0,
+ _IMM5,
+ _IMM8,
+ _IMM14,
+ _IMM15,
+ _IMM16,
+ _SIMM10 = 6,
+ _SIMM12,
+ _SIMM14,
+ _SIMM15,
+ _SIMM16,
+ _SIMM14_NEG = 11,
+ _IMM16_NEG,
+ _SIMM16_NEG,
+ _IMM20,
+ _IMM25,
+ _DISP8div2 = 16,
+ _DISP11div2,
+ _DISP19div2,
+ _DISP24div2,
+ _VALUE,
+ _VALUE_HI16,
+ _VALUE_LO16,
+ _VALUE_LDST_LO16 = 23,
+ _SIMM16_LA,
+ _IMM5_RSHIFT_1,
+ _IMM5_RSHIFT_2,
+ _SIMM16_LA_POS,
+ _IMM5_RANGE_8_31,
+ _IMM10_RSHIFT_2,
+ _GP_IMM15 = 30,
+ _GP_IMM14 = 31,
+ _SIMM16_pic = 42, /* Index in score_df_range. */
+ _IMM16_LO16_pic = 43,
+ _IMM16_pic = 44,
+};
+
+#define REG_TMP 1
+
+#define OP_REG_TYPE (1 << 6)
+#define OP_IMM_TYPE (1 << 7)
+#define OP_SH_REGD (OP_REG_TYPE |20)
+#define OP_SH_REGS1 (OP_REG_TYPE |15)
+#define OP_SH_REGS2 (OP_REG_TYPE |10)
+#define OP_SH_I (OP_IMM_TYPE | 1)
+#define OP_SH_RI15 (OP_IMM_TYPE | 0)
+#define OP_SH_I12 (OP_IMM_TYPE | 3)
+#define OP_SH_DISP24 (OP_IMM_TYPE | 1)
+#define OP_SH_DISP19_p1 (OP_IMM_TYPE |15)
+#define OP_SH_DISP19_p2 (OP_IMM_TYPE | 1)
+#define OP_SH_I5 (OP_IMM_TYPE |10)
+#define OP_SH_I10 (OP_IMM_TYPE | 5)
+#define OP_SH_COPID (OP_IMM_TYPE | 5)
+#define OP_SH_TRAPI5 (OP_IMM_TYPE |15)
+#define OP_SH_I15 (OP_IMM_TYPE |10)
+
+#define OP16_SH_REGD (OP_REG_TYPE | 8)
+#define OP16_SH_REGS1 (OP_REG_TYPE | 4)
+#define OP16_SH_I45 (OP_IMM_TYPE | 3)
+#define OP16_SH_I8 (OP_IMM_TYPE | 0)
+#define OP16_SH_DISP8 (OP_IMM_TYPE | 0)
+#define OP16_SH_DISP11 (OP_IMM_TYPE | 1)
+
+struct datafield_range
+{
+ int data_type;
+ int bits;
+ int range[2];
+};
+
+struct datafield_range score_df_range[] =
+{
+ {_IMM4, 4, {0, (1 << 4) - 1}}, /* ( 0 ~ 15 ) */
+ {_IMM5, 5, {0, (1 << 5) - 1}}, /* ( 0 ~ 31 ) */
+ {_IMM8, 8, {0, (1 << 8) - 1}}, /* ( 0 ~ 255 ) */
+ {_IMM14, 14, {0, (1 << 14) - 1}}, /* ( 0 ~ 16383) */
+ {_IMM15, 15, {0, (1 << 15) - 1}}, /* ( 0 ~ 32767) */
+ {_IMM16, 16, {0, (1 << 16) - 1}}, /* ( 0 ~ 65535) */
+ {_SIMM10, 10, {-(1 << 9), (1 << 9) - 1}}, /* ( -512 ~ 511 ) */
+ {_SIMM12, 12, {-(1 << 11), (1 << 11) - 1}}, /* ( -2048 ~ 2047 ) */
+ {_SIMM14, 14, {-(1 << 13), (1 << 13) - 1}}, /* ( -8192 ~ 8191 ) */
+ {_SIMM15, 15, {-(1 << 14), (1 << 14) - 1}}, /* (-16384 ~ 16383) */
+ {_SIMM16, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
+ {_SIMM14_NEG, 14, {-(1 << 13), (1 << 13) - 1}}, /* ( -8191 ~ 8192 ) */
+ {_IMM16_NEG, 16, {0, (1 << 16) - 1}}, /* (-65535 ~ 0 ) */
+ {_SIMM16_NEG, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
+ {_IMM20, 20, {0, (1 << 20) - 1}},
+ {_IMM25, 25, {0, (1 << 25) - 1}},
+ {_DISP8div2, 8, {-(1 << 8), (1 << 8) - 1}}, /* ( -256 ~ 255 ) */
+ {_DISP11div2, 11, {0, 0}},
+ {_DISP19div2, 19, {-(1 << 19), (1 << 19) - 1}}, /* (-524288 ~ 524287) */
+ {_DISP24div2, 24, {0, 0}},
+ {_VALUE, 32, {0, ((unsigned int)1 << 31) - 1}},
+ {_VALUE_HI16, 16, {0, (1 << 16) - 1}},
+ {_VALUE_LO16, 16, {0, (1 << 16) - 1}},
+ {_VALUE_LDST_LO16, 16, {0, (1 << 16) - 1}},
+ {_SIMM16_LA, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
+ {_IMM5_RSHIFT_1, 5, {0, (1 << 6) - 1}}, /* ( 0 ~ 63 ) */
+ {_IMM5_RSHIFT_2, 5, {0, (1 << 7) - 1}}, /* ( 0 ~ 127 ) */
+ {_SIMM16_LA_POS, 16, {0, (1 << 15) - 1}}, /* ( 0 ~ 32767) */
+ {_IMM5_RANGE_8_31, 5, {8, 31}}, /* But for cop0 the valid data : (8 ~ 31). */
+ {_IMM10_RSHIFT_2, 10, {-(1 << 11), (1 << 11) - 1}}, /* For ldc#, stc#. */
+ {_SIMM10, 10, {0, (1 << 10) - 1}}, /* ( -1024 ~ 1023 ) */
+ {_SIMM12, 12, {0, (1 << 12) - 1}}, /* ( -2048 ~ 2047 ) */
+ {_SIMM14, 14, {0, (1 << 14) - 1}}, /* ( -8192 ~ 8191 ) */
+ {_SIMM15, 15, {0, (1 << 15) - 1}}, /* (-16384 ~ 16383) */
+ {_SIMM16, 16, {0, (1 << 16) - 1}}, /* (-65536 ~ 65536) */
+ {_SIMM14_NEG, 14, {0, (1 << 16) - 1}}, /* ( -8191 ~ 8192 ) */
+ {_IMM16_NEG, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
+ {_SIMM16_NEG, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
+ {_IMM20, 20, {0, (1 << 20) - 1}}, /* (-32768 ~ 32767) */
+ {_IMM25, 25, {0, (1 << 25) - 1}}, /* (-32768 ~ 32767) */
+ {_GP_IMM15, 15, {0, (1 << 15) - 1}}, /* ( 0 ~ 65535) */
+ {_GP_IMM14, 14, {0, (1 << 14) - 1}}, /* ( 0 ~ 65535) */
+ {_SIMM16_pic, 16, {-(1 << 15), (1 << 15) - 1}}, /* (-32768 ~ 32767) */
+ {_IMM16_LO16_pic, 16, {0, (1 << 16) - 1}}, /* ( 65535 ~ 0 ) */
+ {_IMM16_pic, 16, {0, (1 << 16) - 1}}, /* ( 0 ~ 65535) */
+};
+
+struct shift_bitmask
+{
+ int opd_type;
+ int opd_num;
+ struct datafield_range *df_range;
+ int sh[4];
+ long fieldbits[4];
+};
+
+struct shift_bitmask score_sh_bits_map[] =
+{
+ {
+ Rd_I4, 2, &score_df_range[_IMM4],
+ {OP16_SH_REGD, OP16_SH_I45, 0, 0},
+ {0xf, 0xf, 0, 0},
+ },
+ {
+ Rd_I5, 2, &score_df_range[_IMM5],
+ {OP16_SH_REGD, OP16_SH_I45, 0, 0},
+ {0xf, 0x1f, 0, 0},
+ },
+ {
+ Rd_rvalueBP_I5, 2, &score_df_range[_IMM5],
+ {OP16_SH_REGD, OP16_SH_I45, 0, 0},
+ {0xf, 0x1f, 0, 0},
+ },
+ {
+ Rd_lvalueBP_I5, 2, &score_df_range[_IMM5],
+ {OP16_SH_REGD, OP16_SH_I45, 0, 0},
+ {0xf, 0x1f, 0, 0},
+ },
+ {
+ Rd_Rs_I5, 3, &score_df_range[_IMM5],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I5, 0},
+ {0x1f, 0x1f, 0x1f, 0},
+ },
+ {
+ x_Rs_I5, 2, &score_df_range[_IMM5],
+ {OP_SH_REGS1, OP_SH_I5, 0, 0},
+ {0x1f, 0x1f, 0, 0},
+ },
+ {
+ x_I5_x, 1, &score_df_range[_IMM5],
+ {OP_SH_TRAPI5, 0, 0, 0},
+ {0x1f, 0, 0, 0},
+ },
+ {
+ Rd_I8, 2, &score_df_range[_IMM8],
+ {OP16_SH_REGD, OP16_SH_I8, 0, 0},
+ {0xf, 0xff, 0, 0},
+ },
+ {
+ Rd_Rs_I14, 3, &score_df_range[_IMM14],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I, 0},
+ {0x1f, 0x1f, 0x3fff, 0},
+ },
+ {
+ I15, 1, &score_df_range[_IMM15],
+ {OP_SH_I15, 0, 0, 0},
+ {0x7fff, 0, 0, 0},
+ },
+ {
+ Rd_I16, 2, &score_df_range[_IMM16],
+ {OP_SH_REGD, OP_SH_I, 0, 0},
+ {0x1f, 0xffff, 0, 0},
+ },
+ {
+ Rd_rvalueRs_SI10, 3, &score_df_range[_SIMM10],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I10, 0},
+ {0x1f, 0x1f, 0x3ff, 0},
+ },
+ {
+ Rd_lvalueRs_SI10, 3, &score_df_range[_SIMM10],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I10, 0},
+ {0x1f, 0x1f, 0x3ff, 0},
+ },
+ {
+ Rd_rvalueRs_preSI12, 3, &score_df_range[_SIMM12],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
+ {0xf, 0xf, 0xfff, 0},
+ },
+ {
+ Rd_rvalueRs_postSI12, 3, &score_df_range[_SIMM12],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
+ {0xf, 0xf, 0xfff, 0},
+ },
+ {
+ Rd_lvalueRs_preSI12, 3, &score_df_range[_SIMM12],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
+ {0xf, 0xf, 0xfff, 0},
+ },
+ {
+ Rd_lvalueRs_postSI12, 3, &score_df_range[_SIMM12],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I12, 0},
+ {0xf, 0xf, 0xfff, 0},
+ },
+ {
+ Rd_Rs_SI14, 3, &score_df_range[_SIMM14],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_I, 0},
+ {0x1f, 0x1f, 0x3fff, 0},
+ },
+ {
+ Rd_rvalueRs_SI15, 3, &score_df_range[_SIMM15],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_RI15, 0},
+ {0x1f, 0x1f, 0x7fff, 0},
+ },
+ {
+ Rd_lvalueRs_SI15, 3, &score_df_range[_SIMM15],
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_RI15, 0},
+ {0x1f, 0x1f, 0x7fff, 0},
+ },
+ {
+ Rd_SI16, 2, &score_df_range[_SIMM16],
+ {OP_SH_REGD, OP_SH_I, 0, 0},
+ {0x1f, 0xffff, 0, 0},
+ },
+ {
+ PC_DISP8div2, 1, &score_df_range[_DISP8div2],
+ {OP16_SH_DISP8, 0, 0, 0},
+ {0xff, 0, 0, 0},
+ },
+ {
+ PC_DISP11div2, 1, &score_df_range[_DISP11div2],
+ {OP16_SH_DISP11, 0, 0, 0},
+ {0x7ff, 0, 0, 0},
+ },
+ {
+ PC_DISP19div2, 2, &score_df_range[_DISP19div2],
+ {OP_SH_DISP19_p1, OP_SH_DISP19_p2, 0, 0},
+ {0x3ff, 0x1ff, 0, 0},
+ },
+ {
+ PC_DISP24div2, 1, &score_df_range[_DISP24div2],
+ {OP_SH_DISP24, 0, 0, 0},
+ {0xffffff, 0, 0, 0},
+ },
+ {
+ Rd_Rs_Rs, 3, NULL,
+ {OP_SH_REGD, OP_SH_REGS1, OP_SH_REGS2, 0},
+ {0x1f, 0x1f, 0x1f, 0}
+ },
+ {
+ Rd_Rs_x, 2, NULL,
+ {OP_SH_REGD, OP_SH_REGS1, 0, 0},
+ {0x1f, 0x1f, 0, 0},
+ },
+ {
+ Rd_x_Rs, 2, NULL,
+ {OP_SH_REGD, OP_SH_REGS2, 0, 0},
+ {0x1f, 0x1f, 0, 0},
+ },
+ {
+ Rd_x_x, 1, NULL,
+ {OP_SH_REGD, 0, 0, 0},
+ {0x1f, 0, 0, 0},
+ },
+ {
+ x_Rs_Rs, 2, NULL,
+ {OP_SH_REGS1, OP_SH_REGS2, 0, 0},
+ {0x1f, 0x1f, 0, 0},
+ },
+ {
+ x_Rs_x, 1, NULL,
+ {OP_SH_REGS1, 0, 0, 0},
+ {0x1f, 0, 0, 0},
+ },
+ {
+ Rd_Rs, 2, NULL,
+ {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
+ {0xf, 0xf, 0, 0},
+ },
+ {
+ Rd_HighRs, 2, NULL,
+ {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
+ {0xf, 0xf, 0x1f, 0},
+ },
+ {
+ Rd_rvalueRs, 2, NULL,
+ {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
+ {0xf, 0xf, 0, 0},
+ },
+ {
+ Rd_lvalueRs, 2, NULL,
+ {OP16_SH_REGD, OP16_SH_REGS1, 0, 0},
+ {0xf, 0xf, 0, 0}
+ },
+ {
+ Rd_lvalue32Rs, 2, NULL,
+ {OP_SH_REGD, OP_SH_REGS1, 0, 0},
+ {0x1f, 0x1f, 0, 0},
+ },
+ {
+ Rd_rvalue32Rs, 2, NULL,
+ {OP_SH_REGD, OP_SH_REGS1, 0, 0},
+ {0x1f, 0x1f, 0, 0},
+ },
+ {
+ x_Rs, 1, NULL,
+ {OP16_SH_REGS1, 0, 0, 0},
+ {0xf, 0, 0, 0},
+ },
+ {
+ NO_OPD, 0, NULL,
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ },
+ {
+ NO16_OPD, 0, NULL,
+ {0, 0, 0, 0},
+ {0, 0, 0, 0},
+ },
+};
+
+struct asm_opcode
+{
+ /* Instruction name. */
+ const char *template;
+
+ /* Instruction Opcode. */
+ unsigned long value;
+
+ /* Instruction bit mask. */
+ unsigned long bitmask;
+
+ /* Relax instruction opcode. 0x8000 imply no relaxation. */
+ unsigned long relax_value;
+
+ /* Instruction type. */
+ enum score_insn_type type;
+
+ /* Function to call to parse args. */
+ void (*parms) (char *);
+};
+
+enum insn_class
+{
+ INSN_CLASS_16,
+ INSN_CLASS_32,
+ INSN_CLASS_PCE,
+ INSN_CLASS_SYN
+};
+
+#endif
diff --git a/contrib/binutils/include/opcode/spu-insns.h b/contrib/binutils/include/opcode/spu-insns.h
new file mode 100644
index 0000000..237d8ab
--- /dev/null
+++ b/contrib/binutils/include/opcode/spu-insns.h
@@ -0,0 +1,417 @@
+/* SPU ELF support for BFD.
+
+ Copyright 2006, 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* SPU Opcode Table
+
+-=-=-= FORMAT =-=-=-
+
+ +----+-------+-------+-------+-------+ +------------+-------+-------+-------+
+RRR | op | RC | RB | RA | RT | RI7 | op | I7 | RA | RT |
+ +----+-------+-------+-------+-------+ +------------+-------+-------+-------+
+ 0 3 1 1 2 3 0 1 1 2 3
+ 0 7 4 1 0 7 4 1
+
+ +-----------+--------+-------+-------+ +---------+----------+-------+-------+
+RI8 | op | I8 | RA | RT | RI10 | op | I10 | RA | RT |
+ +-----------+--------+-------+-------+ +---------+----------+-------+-------+
+ 0 9 1 2 3 0 7 1 2 3
+ 7 4 1 7 4 1
+
+ +----------+-----------------+-------+ +--------+-------------------+-------+
+RI16 | op | I16 | RT | RI18 | op | I18 | RT |
+ +----------+-----------------+-------+ +--------+-------------------+-------+
+ 0 8 2 3 0 6 2 3
+ 4 1 4 1
+
+ +------------+-------+-------+-------+ +-------+--+-----------------+-------+
+RR | op | RB | RA | RT | LBT | op |RO| I16 | RO |
+ +------------+-------+-------+-------+ +-------+--+-----------------+-------+
+ 0 1 1 2 3 0 6 8 2 3
+ 0 7 4 1 4 1
+
+ +------------+----+--+-------+-------+
+ LBTI | op | // |RO| RA | RO |
+ +------------+----+--+-------+-------+
+ 0 1 1 1 2 3
+ 0 5 7 4 1
+
+-=-=-= OPCODE =-=-=-
+
+OPCODE field specifies the most significant 11bit of the instruction. Some formats don't have 11bits for opcode field, and in this
+case, bit field other than op are defined as 0s. For example, opcode of fma instruction which is RRR format is defined as 0x700,
+since 0x700 -> 11'b11100000000, this means opcode is 4'b1110, and other 7bits are defined as 7'b0000000.
+
+-=-=-= ASM_FORMAT =-=-=-
+
+RRR category RI7 category
+ ASM_RRR mnemonic RC, RA, RB, RT ASM_RI4 mnemonic RT, RA, I4
+ ASM_RI7 mnemonic RT, RA, I7
+
+RI8 category RI10 category
+ ASM_RUI8 mnemonic RT, RA, UI8 ASM_AI10 mnemonic RA, I10
+ ASM_RI10 mnemonic RT, RA, R10
+ ASM_RI10IDX mnemonic RT, I10(RA)
+
+RI16 category RI18 category
+ ASM_I16W mnemonic I16W ASM_RI18 mnemonic RT, I18
+ ASM_RI16 mnemonic RT, I16
+ ASM_RI16W mnemonic RT, I16W
+
+RR category LBT category
+ ASM_MFSPR mnemonic RT, SA ASM_LBT mnemonic brinst, brtarg
+ ASM_MTSPR mnemonic SA, RT
+ ASM_NOOP mnemonic LBTI category
+ ASM_RA mnemonic RA ASM_LBTI mnemonic brinst, RA
+ ASM_RAB mnemonic RA, RB
+ ASM_RDCH mnemonic RT, CA
+ ASM_RR mnemonic RT, RA, RB
+ ASM_RT mnemonic RT
+ ASM_RTA mnemonic RT, RA
+ ASM_WRCH mnemonic CA, RT
+
+Note that RRR instructions have the names for RC and RT reversed from
+what's in the ISA, in order to put RT in the same position it appears
+for other formats.
+
+-=-=-= DEPENDENCY =-=-=-
+
+DEPENDENCY filed consists of 5 digits. This represents which register is used as source and which register is used as target.
+The first(most significant) digit is always 0. Then it is followd by RC, RB, RA and RT digits.
+If the digit is 0, this means the corresponding register is not used in the instruction.
+If the digit is 1, this means the corresponding register is used as a source in the instruction.
+If the digit is 2, this means the corresponding register is used as a target in the instruction.
+If the digit is 3, this means the corresponding register is used as both source and target in the instruction.
+For example, fms instruction has 00113 as the DEPENDENCY field. This means RC is not used in this operation, RB and RA are
+used as sources and RT is the target.
+
+-=-=-= PIPE =-=-=-
+
+This field shows which execution pipe is used for the instruction
+
+pipe0 execution pipelines:
+ FP6 SP floating pipeline
+ FP7 integer operations executed in SP floating pipeline
+ FPD DP floating pipeline
+ FX2 FXU pipeline
+ FX3 Rotate/Shift pipeline
+ FXB Byte pipeline
+ NOP No pipeline
+
+pipe1 execution pipelines:
+ BR Branch pipeline
+ LNOP No pipeline
+ LS Load/Store pipeline
+ SHUF Shuffle pipeline
+ SPR SPR/CH pipeline
+
+*/
+
+#define _A0() {0}
+#define _A1(a) {1,a}
+#define _A2(a,b) {2,a,b}
+#define _A3(a,b,c) {3,a,b,c}
+#define _A4(a,b,c,d) {4,a,b,c,d}
+
+/* TAG FORMAT OPCODE MNEMONIC ASM_FORMAT DEPENDENCY PIPE COMMENT */
+/* 0[RC][RB][RA][RT] */
+/* 1:src, 2:target */
+
+APUOP(M_BR, RI16, 0x190, "br", _A1(A_R18), 00000, BR) /* BRel IP<-IP+I16 */
+APUOP(M_BRSL, RI16, 0x198, "brsl", _A2(A_T,A_R18), 00002, BR) /* BRelSetLink RT,IP<-IP,IP+I16 */
+APUOP(M_BRA, RI16, 0x180, "bra", _A1(A_S18), 00000, BR) /* BRAbs IP<-I16 */
+APUOP(M_BRASL, RI16, 0x188, "brasl", _A2(A_T,A_S18), 00002, BR) /* BRAbsSetLink RT,IP<-IP,I16 */
+APUOP(M_FSMBI, RI16, 0x194, "fsmbi", _A2(A_T,A_X16), 00002, SHUF) /* FormSelMask%I RT<-fsm(I16) */
+APUOP(M_LQA, RI16, 0x184, "lqa", _A2(A_T,A_S18), 00002, LS) /* LoadQAbs RT<-M[I16] */
+APUOP(M_LQR, RI16, 0x19C, "lqr", _A2(A_T,A_R18), 00002, LS) /* LoadQRel RT<-M[IP+I16] */
+APUOP(M_STOP, RR, 0x000, "stop", _A0(), 00000, BR) /* STOP stop */
+APUOP(M_STOP2, RR, 0x000, "stop", _A1(A_U14), 00000, BR) /* STOP stop */
+APUOP(M_STOPD, RR, 0x140, "stopd", _A3(A_T,A_A,A_B), 00111, BR) /* STOPD stop (with register dependencies) */
+APUOP(M_LNOP, RR, 0x001, "lnop", _A0(), 00000, LNOP) /* LNOP no_operation */
+APUOP(M_SYNC, RR, 0x002, "sync", _A0(), 00000, BR) /* SYNC flush_pipe */
+APUOP(M_DSYNC, RR, 0x003, "dsync", _A0(), 00000, BR) /* DSYNC flush_store_queue */
+APUOP(M_MFSPR, RR, 0x00c, "mfspr", _A2(A_T,A_S), 00002, SPR) /* MFSPR RT<-SA */
+APUOP(M_RDCH, RR, 0x00d, "rdch", _A2(A_T,A_H), 00002, SPR) /* ReaDCHannel RT<-CA:data */
+APUOP(M_RCHCNT, RR, 0x00f, "rchcnt", _A2(A_T,A_H), 00002, SPR) /* ReaDCHanCouNT RT<-CA:count */
+APUOP(M_HBRA, LBT, 0x080, "hbra", _A2(A_S11,A_S18), 00000, LS) /* HBRA BTB[B9]<-M[I16] */
+APUOP(M_HBRR, LBT, 0x090, "hbrr", _A2(A_S11,A_R18), 00000, LS) /* HBRR BTB[B9]<-M[IP+I16] */
+APUOP(M_BRZ, RI16, 0x100, "brz", _A2(A_T,A_R18), 00001, BR) /* BRZ IP<-IP+I16_if(RT) */
+APUOP(M_BRNZ, RI16, 0x108, "brnz", _A2(A_T,A_R18), 00001, BR) /* BRNZ IP<-IP+I16_if(RT) */
+APUOP(M_BRHZ, RI16, 0x110, "brhz", _A2(A_T,A_R18), 00001, BR) /* BRHZ IP<-IP+I16_if(RT) */
+APUOP(M_BRHNZ, RI16, 0x118, "brhnz", _A2(A_T,A_R18), 00001, BR) /* BRHNZ IP<-IP+I16_if(RT) */
+APUOP(M_STQA, RI16, 0x104, "stqa", _A2(A_T,A_S18), 00001, LS) /* SToreQAbs M[I16]<-RT */
+APUOP(M_STQR, RI16, 0x11C, "stqr", _A2(A_T,A_R18), 00001, LS) /* SToreQRel M[IP+I16]<-RT */
+APUOP(M_MTSPR, RR, 0x10c, "mtspr", _A2(A_S,A_T), 00001, SPR) /* MTSPR SA<-RT */
+APUOP(M_WRCH, RR, 0x10d, "wrch", _A2(A_H,A_T), 00001, SPR) /* ChanWRite CA<-RT */
+APUOP(M_LQD, RI10, 0x1a0, "lqd", _A4(A_T,A_S14,A_P,A_A), 00012, LS) /* LoadQDisp RT<-M[Ra+I10] */
+APUOP(M_BI, RR, 0x1a8, "bi", _A1(A_A), 00010, BR) /* BI IP<-RA */
+APUOP(M_BISL, RR, 0x1a9, "bisl", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
+APUOP(M_IRET, RR, 0x1aa, "iret", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
+APUOP(M_IRET2, RR, 0x1aa, "iret", _A0(), 00010, BR) /* IRET IP<-SRR0 */
+APUOP(M_BISLED, RR, 0x1ab, "bisled", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
+APUOP(M_HBR, LBTI, 0x1ac, "hbr", _A2(A_S11I,A_A), 00010, LS) /* HBR BTB[B9]<-M[Ra] */
+APUOP(M_FREST, RR, 0x1b8, "frest", _A2(A_T,A_A), 00012, SHUF) /* FREST RT<-recip(RA) */
+APUOP(M_FRSQEST, RR, 0x1b9, "frsqest", _A2(A_T,A_A), 00012, SHUF) /* FRSQEST RT<-rsqrt(RA) */
+APUOP(M_FSM, RR, 0x1b4, "fsm", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
+APUOP(M_FSMH, RR, 0x1b5, "fsmh", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
+APUOP(M_FSMB, RR, 0x1b6, "fsmb", _A2(A_T,A_A), 00012, SHUF) /* FormSelMask% RT<-expand(Ra) */
+APUOP(M_GB, RR, 0x1b0, "gb", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
+APUOP(M_GBH, RR, 0x1b1, "gbh", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
+APUOP(M_GBB, RR, 0x1b2, "gbb", _A2(A_T,A_A), 00012, SHUF) /* GatherBits% RT<-gather(RA) */
+APUOP(M_CBD, RI7, 0x1f4, "cbd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
+APUOP(M_CHD, RI7, 0x1f5, "chd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
+APUOP(M_CWD, RI7, 0x1f6, "cwd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
+APUOP(M_CDD, RI7, 0x1f7, "cdd", _A4(A_T,A_U7,A_P,A_A), 00012, SHUF) /* genCtl%%insD RT<-sta(Ra+I4,siz) */
+APUOP(M_ROTQBII, RI7, 0x1f8, "rotqbii", _A3(A_T,A_A,A_U3), 00012, SHUF) /* ROTQBII RT<-RA<<<I7 */
+APUOP(M_ROTQBYI, RI7, 0x1fc, "rotqbyi", _A3(A_T,A_A,A_S7N), 00012, SHUF) /* ROTQBYI RT<-RA<<<(I7*8) */
+APUOP(M_ROTQMBII, RI7, 0x1f9, "rotqmbii", _A3(A_T,A_A,A_S3), 00012, SHUF) /* ROTQMBII RT<-RA<<I7 */
+APUOP(M_ROTQMBYI, RI7, 0x1fd, "rotqmbyi", _A3(A_T,A_A,A_S6), 00012, SHUF) /* ROTQMBYI RT<-RA<<I7 */
+APUOP(M_SHLQBII, RI7, 0x1fb, "shlqbii", _A3(A_T,A_A,A_U3), 00012, SHUF) /* SHLQBII RT<-RA<<I7 */
+APUOP(M_SHLQBYI, RI7, 0x1ff, "shlqbyi", _A3(A_T,A_A,A_U5), 00012, SHUF) /* SHLQBYI RT<-RA<<I7 */
+APUOP(M_STQD, RI10, 0x120, "stqd", _A4(A_T,A_S14,A_P,A_A), 00011, LS) /* SToreQDisp M[Ra+I10]<-RT */
+APUOP(M_BIHNZ, RR, 0x12b, "bihnz", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
+APUOP(M_BIHZ, RR, 0x12a, "bihz", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
+APUOP(M_BINZ, RR, 0x129, "binz", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
+APUOP(M_BIZ, RR, 0x128, "biz", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
+APUOP(M_CBX, RR, 0x1d4, "cbx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
+APUOP(M_CHX, RR, 0x1d5, "chx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
+APUOP(M_CWX, RR, 0x1d6, "cwx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
+APUOP(M_CDX, RR, 0x1d7, "cdx", _A3(A_T,A_A,A_B), 00112, SHUF) /* genCtl%%insX RT<-sta(Ra+Rb,siz) */
+APUOP(M_LQX, RR, 0x1c4, "lqx", _A3(A_T,A_A,A_B), 00112, LS) /* LoadQindeX RT<-M[Ra+Rb] */
+APUOP(M_ROTQBI, RR, 0x1d8, "rotqbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBI RT<-RA<<<Rb */
+APUOP(M_ROTQMBI, RR, 0x1d9, "rotqmbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBI RT<-RA<<Rb */
+APUOP(M_SHLQBI, RR, 0x1db, "shlqbi", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBI RT<-RA<<Rb */
+APUOP(M_ROTQBY, RR, 0x1dc, "rotqby", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBY RT<-RA<<<(Rb*8) */
+APUOP(M_ROTQMBY, RR, 0x1dd, "rotqmby", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBY RT<-RA<<Rb */
+APUOP(M_SHLQBY, RR, 0x1df, "shlqby", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBY RT<-RA<<Rb */
+APUOP(M_ROTQBYBI, RR, 0x1cc, "rotqbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQBYBI RT<-RA<<Rb */
+APUOP(M_ROTQMBYBI, RR, 0x1cd, "rotqmbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* ROTQMBYBI RT<-RA<<Rb */
+APUOP(M_SHLQBYBI, RR, 0x1cf, "shlqbybi", _A3(A_T,A_A,A_B), 00112, SHUF) /* SHLQBYBI RT<-RA<<Rb */
+APUOP(M_STQX, RR, 0x144, "stqx", _A3(A_T,A_A,A_B), 00111, LS) /* SToreQindeX M[Ra+Rb]<-RT */
+APUOP(M_SHUFB, RRR, 0x580, "shufb", _A4(A_C,A_A,A_B,A_T), 02111, SHUF) /* SHUFfleBytes RC<-f(RA,RB,RT) */
+APUOP(M_IL, RI16, 0x204, "il", _A2(A_T,A_S16), 00002, FX2) /* ImmLoad RT<-sxt(I16) */
+APUOP(M_ILH, RI16, 0x20c, "ilh", _A2(A_T,A_X16), 00002, FX2) /* ImmLoadH RT<-I16 */
+APUOP(M_ILHU, RI16, 0x208, "ilhu", _A2(A_T,A_X16), 00002, FX2) /* ImmLoadHUpper RT<-I16<<16 */
+APUOP(M_ILA, RI18, 0x210, "ila", _A2(A_T,A_U18), 00002, FX2) /* ImmLoadAddr RT<-zxt(I18) */
+APUOP(M_NOP, RR, 0x201, "nop", _A1(A_T), 00000, NOP) /* XNOP no_operation */
+APUOP(M_NOP2, RR, 0x201, "nop", _A0(), 00000, NOP) /* XNOP no_operation */
+APUOP(M_IOHL, RI16, 0x304, "iohl", _A2(A_T,A_X16), 00003, FX2) /* AddImmeXt RT<-RT+sxt(I16) */
+APUOP(M_ANDBI, RI10, 0x0b0, "andbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* AND%I RT<-RA&I10 */
+APUOP(M_ANDHI, RI10, 0x0a8, "andhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* AND%I RT<-RA&I10 */
+APUOP(M_ANDI, RI10, 0x0a0, "andi", _A3(A_T,A_A,A_S10), 00012, FX2) /* AND%I RT<-RA&I10 */
+APUOP(M_ORBI, RI10, 0x030, "orbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* OR%I RT<-RA|I10 */
+APUOP(M_ORHI, RI10, 0x028, "orhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* OR%I RT<-RA|I10 */
+APUOP(M_ORI, RI10, 0x020, "ori", _A3(A_T,A_A,A_S10), 00012, FX2) /* OR%I RT<-RA|I10 */
+APUOP(M_ORX, RR, 0x1f0, "orx", _A2(A_T,A_A), 00012, BR) /* ORX RT<-RA.w0|RA.w1|RA.w2|RA.w3 */
+APUOP(M_XORBI, RI10, 0x230, "xorbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* XOR%I RT<-RA^I10 */
+APUOP(M_XORHI, RI10, 0x228, "xorhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* XOR%I RT<-RA^I10 */
+APUOP(M_XORI, RI10, 0x220, "xori", _A3(A_T,A_A,A_S10), 00012, FX2) /* XOR%I RT<-RA^I10 */
+APUOP(M_AHI, RI10, 0x0e8, "ahi", _A3(A_T,A_A,A_S10), 00012, FX2) /* Add%Immed RT<-RA+I10 */
+APUOP(M_AI, RI10, 0x0e0, "ai", _A3(A_T,A_A,A_S10), 00012, FX2) /* Add%Immed RT<-RA+I10 */
+APUOP(M_SFHI, RI10, 0x068, "sfhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* SubFrom%Imm RT<-I10-RA */
+APUOP(M_SFI, RI10, 0x060, "sfi", _A3(A_T,A_A,A_S10), 00012, FX2) /* SubFrom%Imm RT<-I10-RA */
+APUOP(M_CGTBI, RI10, 0x270, "cgtbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CGT%I RT<-(RA>I10) */
+APUOP(M_CGTHI, RI10, 0x268, "cgthi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CGT%I RT<-(RA>I10) */
+APUOP(M_CGTI, RI10, 0x260, "cgti", _A3(A_T,A_A,A_S10), 00012, FX2) /* CGT%I RT<-(RA>I10) */
+APUOP(M_CLGTBI, RI10, 0x2f0, "clgtbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
+APUOP(M_CLGTHI, RI10, 0x2e8, "clgthi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
+APUOP(M_CLGTI, RI10, 0x2e0, "clgti", _A3(A_T,A_A,A_S10), 00012, FX2) /* CLGT%I RT<-(RA>I10) */
+APUOP(M_CEQBI, RI10, 0x3f0, "ceqbi", _A3(A_T,A_A,A_S10B), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
+APUOP(M_CEQHI, RI10, 0x3e8, "ceqhi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
+APUOP(M_CEQI, RI10, 0x3e0, "ceqi", _A3(A_T,A_A,A_S10), 00012, FX2) /* CEQ%I RT<-(RA=I10) */
+APUOP(M_HGTI, RI10, 0x278, "hgti", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltGTI halt_if(RA>I10) */
+APUOP(M_HGTI2, RI10, 0x278, "hgti", _A2(A_A,A_S10), 00010, FX2) /* HaltGTI halt_if(RA>I10) */
+APUOP(M_HLGTI, RI10, 0x2f8, "hlgti", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltLGTI halt_if(RA>I10) */
+APUOP(M_HLGTI2, RI10, 0x2f8, "hlgti", _A2(A_A,A_S10), 00010, FX2) /* HaltLGTI halt_if(RA>I10) */
+APUOP(M_HEQI, RI10, 0x3f8, "heqi", _A3(A_T,A_A,A_S10), 00010, FX2) /* HaltEQImm halt_if(RA=I10) */
+APUOP(M_HEQI2, RI10, 0x3f8, "heqi", _A2(A_A,A_S10), 00010, FX2) /* HaltEQImm halt_if(RA=I10) */
+APUOP(M_MPYI, RI10, 0x3a0, "mpyi", _A3(A_T,A_A,A_S10), 00012, FP7) /* MPYI RT<-RA*I10 */
+APUOP(M_MPYUI, RI10, 0x3a8, "mpyui", _A3(A_T,A_A,A_S10), 00012, FP7) /* MPYUI RT<-RA*I10 */
+APUOP(M_CFLTS, RI8, 0x3b0, "cflts", _A3(A_T,A_A,A_U7A), 00012, FP7) /* CFLTS RT<-int(RA,I8) */
+APUOP(M_CFLTU, RI8, 0x3b2, "cfltu", _A3(A_T,A_A,A_U7A), 00012, FP7) /* CFLTU RT<-int(RA,I8) */
+APUOP(M_CSFLT, RI8, 0x3b4, "csflt", _A3(A_T,A_A,A_U7B), 00012, FP7) /* CSFLT RT<-flt(RA,I8) */
+APUOP(M_CUFLT, RI8, 0x3b6, "cuflt", _A3(A_T,A_A,A_U7B), 00012, FP7) /* CUFLT RT<-flt(RA,I8) */
+APUOP(M_FESD, RR, 0x3b8, "fesd", _A2(A_T,A_A), 00012, FPD) /* FESD RT<-double(RA) */
+APUOP(M_FRDS, RR, 0x3b9, "frds", _A2(A_T,A_A), 00012, FPD) /* FRDS RT<-single(RA) */
+APUOP(M_FSCRRD, RR, 0x398, "fscrrd", _A1(A_T), 00002, FPD) /* FSCRRD RT<-FP_status */
+APUOP(M_FSCRWR, RR, 0x3ba, "fscrwr", _A2(A_T,A_A), 00010, FP7) /* FSCRWR FP_status<-RA */
+APUOP(M_FSCRWR2, RR, 0x3ba, "fscrwr", _A1(A_A), 00010, FP7) /* FSCRWR FP_status<-RA */
+APUOP(M_CLZ, RR, 0x2a5, "clz", _A2(A_T,A_A), 00012, FX2) /* CLZ RT<-clz(RA) */
+APUOP(M_CNTB, RR, 0x2b4, "cntb", _A2(A_T,A_A), 00012, FXB) /* CNT RT<-pop(RA) */
+APUOP(M_XSBH, RR, 0x2b6, "xsbh", _A2(A_T,A_A), 00012, FX2) /* eXtSignBtoH RT<-sign_ext(RA) */
+APUOP(M_XSHW, RR, 0x2ae, "xshw", _A2(A_T,A_A), 00012, FX2) /* eXtSignHtoW RT<-sign_ext(RA) */
+APUOP(M_XSWD, RR, 0x2a6, "xswd", _A2(A_T,A_A), 00012, FX2) /* eXtSignWtoD RT<-sign_ext(RA) */
+APUOP(M_ROTI, RI7, 0x078, "roti", _A3(A_T,A_A,A_S7N), 00012, FX3) /* ROT%I RT<-RA<<<I7 */
+APUOP(M_ROTMI, RI7, 0x079, "rotmi", _A3(A_T,A_A,A_S7), 00012, FX3) /* ROT%MI RT<-RA<<I7 */
+APUOP(M_ROTMAI, RI7, 0x07a, "rotmai", _A3(A_T,A_A,A_S7), 00012, FX3) /* ROTMA%I RT<-RA<<I7 */
+APUOP(M_SHLI, RI7, 0x07b, "shli", _A3(A_T,A_A,A_U6), 00012, FX3) /* SHL%I RT<-RA<<I7 */
+APUOP(M_ROTHI, RI7, 0x07c, "rothi", _A3(A_T,A_A,A_S7N), 00012, FX3) /* ROT%I RT<-RA<<<I7 */
+APUOP(M_ROTHMI, RI7, 0x07d, "rothmi", _A3(A_T,A_A,A_S6), 00012, FX3) /* ROT%MI RT<-RA<<I7 */
+APUOP(M_ROTMAHI, RI7, 0x07e, "rotmahi", _A3(A_T,A_A,A_S6), 00012, FX3) /* ROTMA%I RT<-RA<<I7 */
+APUOP(M_SHLHI, RI7, 0x07f, "shlhi", _A3(A_T,A_A,A_U5), 00012, FX3) /* SHL%I RT<-RA<<I7 */
+APUOP(M_A, RR, 0x0c0, "a", _A3(A_T,A_A,A_B), 00112, FX2) /* Add% RT<-RA+RB */
+APUOP(M_AH, RR, 0x0c8, "ah", _A3(A_T,A_A,A_B), 00112, FX2) /* Add% RT<-RA+RB */
+APUOP(M_SF, RR, 0x040, "sf", _A3(A_T,A_A,A_B), 00112, FX2) /* SubFrom% RT<-RB-RA */
+APUOP(M_SFH, RR, 0x048, "sfh", _A3(A_T,A_A,A_B), 00112, FX2) /* SubFrom% RT<-RB-RA */
+APUOP(M_CGT, RR, 0x240, "cgt", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
+APUOP(M_CGTB, RR, 0x250, "cgtb", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
+APUOP(M_CGTH, RR, 0x248, "cgth", _A3(A_T,A_A,A_B), 00112, FX2) /* CGT% RT<-(RA>RB) */
+APUOP(M_CLGT, RR, 0x2c0, "clgt", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
+APUOP(M_CLGTB, RR, 0x2d0, "clgtb", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
+APUOP(M_CLGTH, RR, 0x2c8, "clgth", _A3(A_T,A_A,A_B), 00112, FX2) /* CLGT% RT<-(RA>RB) */
+APUOP(M_CEQ, RR, 0x3c0, "ceq", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
+APUOP(M_CEQB, RR, 0x3d0, "ceqb", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
+APUOP(M_CEQH, RR, 0x3c8, "ceqh", _A3(A_T,A_A,A_B), 00112, FX2) /* CEQ% RT<-(RA=RB) */
+APUOP(M_HGT, RR, 0x258, "hgt", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltGT halt_if(RA>RB) */
+APUOP(M_HGT2, RR, 0x258, "hgt", _A2(A_A,A_B), 00110, FX2) /* HaltGT halt_if(RA>RB) */
+APUOP(M_HLGT, RR, 0x2d8, "hlgt", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltLGT halt_if(RA>RB) */
+APUOP(M_HLGT2, RR, 0x2d8, "hlgt", _A2(A_A,A_B), 00110, FX2) /* HaltLGT halt_if(RA>RB) */
+APUOP(M_HEQ, RR, 0x3d8, "heq", _A3(A_T,A_A,A_B), 00110, FX2) /* HaltEQ halt_if(RA=RB) */
+APUOP(M_HEQ2, RR, 0x3d8, "heq", _A2(A_A,A_B), 00110, FX2) /* HaltEQ halt_if(RA=RB) */
+APUOP(M_FCEQ, RR, 0x3c2, "fceq", _A3(A_T,A_A,A_B), 00112, FX2) /* FCEQ RT<-(RA=RB) */
+APUOP(M_FCMEQ, RR, 0x3ca, "fcmeq", _A3(A_T,A_A,A_B), 00112, FX2) /* FCMEQ RT<-(|RA|=|RB|) */
+APUOP(M_FCGT, RR, 0x2c2, "fcgt", _A3(A_T,A_A,A_B), 00112, FX2) /* FCGT RT<-(RA<RB) */
+APUOP(M_FCMGT, RR, 0x2ca, "fcmgt", _A3(A_T,A_A,A_B), 00112, FX2) /* FCMGT RT<-(|RA|<|RB|) */
+APUOP(M_AND, RR, 0x0c1, "and", _A3(A_T,A_A,A_B), 00112, FX2) /* AND RT<-RA&RB */
+APUOP(M_NAND, RR, 0x0c9, "nand", _A3(A_T,A_A,A_B), 00112, FX2) /* NAND RT<-!(RA&RB) */
+APUOP(M_OR, RR, 0x041, "or", _A3(A_T,A_A,A_B), 00112, FX2) /* OR RT<-RA|RB */
+APUOP(M_NOR, RR, 0x049, "nor", _A3(A_T,A_A,A_B), 00112, FX2) /* NOR RT<-!(RA&RB) */
+APUOP(M_XOR, RR, 0x241, "xor", _A3(A_T,A_A,A_B), 00112, FX2) /* XOR RT<-RA^RB */
+APUOP(M_EQV, RR, 0x249, "eqv", _A3(A_T,A_A,A_B), 00112, FX2) /* EQuiValent RT<-!(RA^RB) */
+APUOP(M_ANDC, RR, 0x2c1, "andc", _A3(A_T,A_A,A_B), 00112, FX2) /* ANDComplement RT<-RA&!RB */
+APUOP(M_ORC, RR, 0x2c9, "orc", _A3(A_T,A_A,A_B), 00112, FX2) /* ORComplement RT<-RA|!RB */
+APUOP(M_ABSDB, RR, 0x053, "absdb", _A3(A_T,A_A,A_B), 00112, FXB) /* ABSoluteDiff RT<-|RA-RB| */
+APUOP(M_AVGB, RR, 0x0d3, "avgb", _A3(A_T,A_A,A_B), 00112, FXB) /* AVG% RT<-(RA+RB+1)/2 */
+APUOP(M_SUMB, RR, 0x253, "sumb", _A3(A_T,A_A,A_B), 00112, FXB) /* SUM% RT<-f(RA,RB) */
+APUOP(M_DFA, RR, 0x2cc, "dfa", _A3(A_T,A_A,A_B), 00112, FPD) /* DFAdd RT<-RA+RB */
+APUOP(M_DFM, RR, 0x2ce, "dfm", _A3(A_T,A_A,A_B), 00112, FPD) /* DFMul RT<-RA*RB */
+APUOP(M_DFS, RR, 0x2cd, "dfs", _A3(A_T,A_A,A_B), 00112, FPD) /* DFSub RT<-RA-RB */
+APUOP(M_FA, RR, 0x2c4, "fa", _A3(A_T,A_A,A_B), 00112, FP6) /* FAdd RT<-RA+RB */
+APUOP(M_FM, RR, 0x2c6, "fm", _A3(A_T,A_A,A_B), 00112, FP6) /* FMul RT<-RA*RB */
+APUOP(M_FS, RR, 0x2c5, "fs", _A3(A_T,A_A,A_B), 00112, FP6) /* FSub RT<-RA-RB */
+APUOP(M_MPY, RR, 0x3c4, "mpy", _A3(A_T,A_A,A_B), 00112, FP7) /* MPY RT<-RA*RB */
+APUOP(M_MPYH, RR, 0x3c5, "mpyh", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYH RT<-(RAh*RB)<<16 */
+APUOP(M_MPYHH, RR, 0x3c6, "mpyhh", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYHH RT<-RAh*RBh */
+APUOP(M_MPYHHU, RR, 0x3ce, "mpyhhu", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYHHU RT<-RAh*RBh */
+APUOP(M_MPYS, RR, 0x3c7, "mpys", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYS RT<-(RA*RB)>>16 */
+APUOP(M_MPYU, RR, 0x3cc, "mpyu", _A3(A_T,A_A,A_B), 00112, FP7) /* MPYU RT<-RA*RB */
+APUOP(M_FI, RR, 0x3d4, "fi", _A3(A_T,A_A,A_B), 00112, FP7) /* FInterpolate RT<-f(RA,RB) */
+APUOP(M_ROT, RR, 0x058, "rot", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT% RT<-RA<<<RB */
+APUOP(M_ROTM, RR, 0x059, "rotm", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT%M RT<-RA<<Rb */
+APUOP(M_ROTMA, RR, 0x05a, "rotma", _A3(A_T,A_A,A_B), 00112, FX3) /* ROTMA% RT<-RA<<Rb */
+APUOP(M_SHL, RR, 0x05b, "shl", _A3(A_T,A_A,A_B), 00112, FX3) /* SHL% RT<-RA<<Rb */
+APUOP(M_ROTH, RR, 0x05c, "roth", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT% RT<-RA<<<RB */
+APUOP(M_ROTHM, RR, 0x05d, "rothm", _A3(A_T,A_A,A_B), 00112, FX3) /* ROT%M RT<-RA<<Rb */
+APUOP(M_ROTMAH, RR, 0x05e, "rotmah", _A3(A_T,A_A,A_B), 00112, FX3) /* ROTMA% RT<-RA<<Rb */
+APUOP(M_SHLH, RR, 0x05f, "shlh", _A3(A_T,A_A,A_B), 00112, FX3) /* SHL% RT<-RA<<Rb */
+APUOP(M_MPYHHA, RR, 0x346, "mpyhha", _A3(A_T,A_A,A_B), 00113, FP7) /* MPYHHA RT<-RAh*RBh+RT */
+APUOP(M_MPYHHAU, RR, 0x34e, "mpyhhau", _A3(A_T,A_A,A_B), 00113, FP7) /* MPYHHAU RT<-RAh*RBh+RT */
+APUOP(M_DFMA, RR, 0x35c, "dfma", _A3(A_T,A_A,A_B), 00113, FPD) /* DFMAdd RT<-RT+RA*RB */
+APUOP(M_DFMS, RR, 0x35d, "dfms", _A3(A_T,A_A,A_B), 00113, FPD) /* DFMSub RT<-RA*RB-RT */
+APUOP(M_DFNMS, RR, 0x35e, "dfnms", _A3(A_T,A_A,A_B), 00113, FPD) /* DFNMSub RT<-RT-RA*RB */
+APUOP(M_DFNMA, RR, 0x35f, "dfnma", _A3(A_T,A_A,A_B), 00113, FPD) /* DFNMAdd RT<-(-RT)-RA*RB */
+APUOP(M_FMA, RRR, 0x700, "fma", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FMAdd RC<-RT+RA*RB */
+APUOP(M_FMS, RRR, 0x780, "fms", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FMSub RC<-RA*RB-RT */
+APUOP(M_FNMS, RRR, 0x680, "fnms", _A4(A_C,A_A,A_B,A_T), 02111, FP6) /* FNMSub RC<-RT-RA*RB */
+APUOP(M_MPYA, RRR, 0x600, "mpya", _A4(A_C,A_A,A_B,A_T), 02111, FP7) /* MPYA RC<-RA*RB+RT */
+APUOP(M_SELB, RRR, 0x400, "selb", _A4(A_C,A_A,A_B,A_T), 02111, FX2) /* SELectBits RC<-RA&RT|RB&!RT */
+/* for system function call, this uses op-code of mtspr */
+APUOP(M_SYSCALL, RI7, 0x10c, "syscall", _A3(A_T,A_A,A_S7N), 00002, SPR) /* System Call */
+/*
+pseudo instruction:
+system call
+value of I9 operation
+0 halt
+1 rt[0] = open(MEM[ra[0]], ra[1])
+2 rt[0] = close(ra[0])
+3 rt[0] = read(ra[0], MEM[ra[1]], ra[2])
+4 rt[0] = write(ra[0], MEM[ra[1]], ra[2])
+5 printf(MEM[ra[0]], ra[1], ra[2], ra[3])
+42 rt[0] = clock()
+52 rt[0] = lseek(ra0, ra1, ra2)
+
+*/
+
+
+/* new multiprecision add/sub */
+APUOP(M_ADDX, RR, 0x340, "addx", _A3(A_T,A_A,A_B), 00113, FX2) /* Add_eXtended RT<-RA+RB+RT */
+APUOP(M_CG, RR, 0x0c2, "cg", _A3(A_T,A_A,A_B), 00112, FX2) /* CarryGenerate RT<-cout(RA+RB) */
+APUOP(M_CGX, RR, 0x342, "cgx", _A3(A_T,A_A,A_B), 00113, FX2) /* CarryGen_eXtd RT<-cout(RA+RB+RT) */
+APUOP(M_SFX, RR, 0x341, "sfx", _A3(A_T,A_A,A_B), 00113, FX2) /* Add_eXtended RT<-RA+RB+RT */
+APUOP(M_BG, RR, 0x042, "bg", _A3(A_T,A_A,A_B), 00112, FX2) /* CarryGenerate RT<-cout(RA+RB) */
+APUOP(M_BGX, RR, 0x343, "bgx", _A3(A_T,A_A,A_B), 00113, FX2) /* CarryGen_eXtd RT<-cout(RA+RB+RT) */
+
+/*
+
+The following ops are a subset of above except with feature bits set.
+Feature bits are bits 11-17 of the instruction:
+
+ 11 - C & P feature bit
+ 12 - disable interrupts
+ 13 - enable interrupts
+
+*/
+APUOPFB(M_BID, RR, 0x1a8, 0x20, "bid", _A1(A_A), 00010, BR) /* BI IP<-RA */
+APUOPFB(M_BIE, RR, 0x1a8, 0x10, "bie", _A1(A_A), 00010, BR) /* BI IP<-RA */
+APUOPFB(M_BISLD, RR, 0x1a9, 0x20, "bisld", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
+APUOPFB(M_BISLE, RR, 0x1a9, 0x10, "bisle", _A2(A_T,A_A), 00012, BR) /* BISL RT,IP<-IP,RA */
+APUOPFB(M_IRETD, RR, 0x1aa, 0x20, "iretd", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
+APUOPFB(M_IRETD2, RR, 0x1aa, 0x20, "iretd", _A0(), 00010, BR) /* IRET IP<-SRR0 */
+APUOPFB(M_IRETE, RR, 0x1aa, 0x10, "irete", _A1(A_A), 00010, BR) /* IRET IP<-SRR0 */
+APUOPFB(M_IRETE2, RR, 0x1aa, 0x10, "irete", _A0(), 00010, BR) /* IRET IP<-SRR0 */
+APUOPFB(M_BISLEDD, RR, 0x1ab, 0x20, "bisledd", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
+APUOPFB(M_BISLEDE, RR, 0x1ab, 0x10, "bislede", _A2(A_T,A_A), 00012, BR) /* BISLED RT,IP<-IP,RA_if(ext) */
+APUOPFB(M_BIHNZD, RR, 0x12b, 0x20, "bihnzd", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
+APUOPFB(M_BIHNZE, RR, 0x12b, 0x10, "bihnze", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
+APUOPFB(M_BIHZD, RR, 0x12a, 0x20, "bihzd", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
+APUOPFB(M_BIHZE, RR, 0x12a, 0x10, "bihze", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
+APUOPFB(M_BINZD, RR, 0x129, 0x20, "binzd", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
+APUOPFB(M_BINZE, RR, 0x129, 0x10, "binze", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
+APUOPFB(M_BIZD, RR, 0x128, 0x20, "bizd", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
+APUOPFB(M_BIZE, RR, 0x128, 0x10, "bize", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
+APUOPFB(M_SYNCC, RR, 0x002, 0x40, "syncc", _A0(), 00000, BR) /* SYNCC flush_pipe */
+APUOPFB(M_HBRP, LBTI, 0x1ac, 0x40, "hbrp", _A0(), 00010, LS) /* HBR BTB[B9]<-M[Ra] */
+
+/* Synonyms required by the AS manual. */
+APUOP(M_LR, RI10, 0x020, "lr", _A2(A_T,A_A), 00012, FX2) /* OR%I RT<-RA|I10 */
+APUOP(M_BIHT, RR, 0x12b, "biht", _A2(A_T,A_A), 00011, BR) /* BIHNZ IP<-RA_if(RT) */
+APUOP(M_BIHF, RR, 0x12a, "bihf", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
+APUOP(M_BIT, RR, 0x129, "bit", _A2(A_T,A_A), 00011, BR) /* BINZ IP<-RA_if(RT) */
+APUOP(M_BIF, RR, 0x128, "bif", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
+APUOPFB(M_BIHTD, RR, 0x12b, 0x20, "bihtd", _A2(A_T,A_A), 00011, BR) /* BIHNF IP<-RA_if(RT) */
+APUOPFB(M_BIHTE, RR, 0x12b, 0x10, "bihte", _A2(A_T,A_A), 00011, BR) /* BIHNF IP<-RA_if(RT) */
+APUOPFB(M_BIHFD, RR, 0x12a, 0x20, "bihfd", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
+APUOPFB(M_BIHFE, RR, 0x12a, 0x10, "bihfe", _A2(A_T,A_A), 00011, BR) /* BIHZ IP<-RA_if(RT) */
+APUOPFB(M_BITD, RR, 0x129, 0x20, "bitd", _A2(A_T,A_A), 00011, BR) /* BINF IP<-RA_if(RT) */
+APUOPFB(M_BITE, RR, 0x129, 0x10, "bite", _A2(A_T,A_A), 00011, BR) /* BINF IP<-RA_if(RT) */
+APUOPFB(M_BIFD, RR, 0x128, 0x20, "bifd", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
+APUOPFB(M_BIFE, RR, 0x128, 0x10, "bife", _A2(A_T,A_A), 00011, BR) /* BIZ IP<-RA_if(RT) */
+
+/* New soma double-float insns. */
+APUOP(M_DFCEQ, RR, 0x3c3, "dfceq", _A3(A_T,A_A,A_B), 00112, FX2) /* DFCEQ RT<-(RA=RB) */
+APUOP(M_DFCMEQ, RR, 0x3cb, "dfcmeq", _A3(A_T,A_A,A_B), 00112, FX2) /* DFCMEQ RT<-(|RA|=|RB|) */
+APUOP(M_DFCGT, RR, 0x2c3, "dfcgt", _A3(A_T,A_A,A_B), 00112, FX2) /* DFCGT RT<-(RA>RB) */
+APUOP(M_DFCMGT, RR, 0x2cb, "dfcmgt", _A3(A_T,A_A,A_B), 00112, FX2) /* DFCMGT RT<-(|RA|>|RB|) */
+APUOP(M_DFTSV, RI7, 0x3bf, "dftsv", _A3(A_T,A_A,A_U7), 00012, FX2) /* DFTSV RT<-testspecial(RA,I7) */
+
+#undef _A0
+#undef _A1
+#undef _A2
+#undef _A3
+#undef _A4
diff --git a/contrib/binutils/include/opcode/spu.h b/contrib/binutils/include/opcode/spu.h
new file mode 100644
index 0000000..975b1fd
--- /dev/null
+++ b/contrib/binutils/include/opcode/spu.h
@@ -0,0 +1,126 @@
+/* SPU ELF support for BFD.
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This file is part of GDB, GAS, and the GNU binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+
+/* These two enums are from rel_apu/common/spu_asm_format.h */
+/* definition of instruction format */
+typedef enum {
+ RRR,
+ RI18,
+ RI16,
+ RI10,
+ RI8,
+ RI7,
+ RR,
+ LBT,
+ LBTI,
+ IDATA,
+ UNKNOWN_IFORMAT
+} spu_iformat;
+
+/* These values describe assembly instruction arguments. They indicate
+ * how to encode, range checking and which relocation to use. */
+typedef enum {
+ A_T, /* register at pos 0 */
+ A_A, /* register at pos 7 */
+ A_B, /* register at pos 14 */
+ A_C, /* register at pos 21 */
+ A_S, /* special purpose register at pos 7 */
+ A_H, /* channel register at pos 7 */
+ A_P, /* parenthesis, this has to separate regs from immediates */
+ A_S3,
+ A_S6,
+ A_S7N,
+ A_S7,
+ A_U7A,
+ A_U7B,
+ A_S10B,
+ A_S10,
+ A_S11,
+ A_S11I,
+ A_S14,
+ A_S16,
+ A_S18,
+ A_R18,
+ A_U3,
+ A_U5,
+ A_U6,
+ A_U7,
+ A_U14,
+ A_X16,
+ A_U18,
+ A_MAX
+} spu_aformat;
+
+enum spu_insns {
+#define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \
+ TAG,
+#define APUOPFB(TAG,MACFORMAT,OPCODE,FB,MNEMONIC,ASMFORMAT,DEP,PIPE) \
+ TAG,
+#include "opcode/spu-insns.h"
+#undef APUOP
+#undef APUOPFB
+ M_SPU_MAX
+};
+
+struct spu_opcode
+{
+ spu_iformat insn_type;
+ unsigned int opcode;
+ char *mnemonic;
+ int arg[5];
+};
+
+#define SIGNED_EXTRACT(insn,size,pos) (((int)((insn) << (32-size-pos))) >> (32-size))
+#define UNSIGNED_EXTRACT(insn,size,pos) (((insn) >> pos) & ((1 << size)-1))
+
+#define DECODE_INSN_RT(insn) (insn & 0x7f)
+#define DECODE_INSN_RA(insn) ((insn >> 7) & 0x7f)
+#define DECODE_INSN_RB(insn) ((insn >> 14) & 0x7f)
+#define DECODE_INSN_RC(insn) ((insn >> 21) & 0x7f)
+
+#define DECODE_INSN_I10(insn) SIGNED_EXTRACT(insn,10,14)
+#define DECODE_INSN_U10(insn) UNSIGNED_EXTRACT(insn,10,14)
+
+/* For branching, immediate loads, hbr and lqa/stqa. */
+#define DECODE_INSN_I16(insn) SIGNED_EXTRACT(insn,16,7)
+#define DECODE_INSN_U16(insn) UNSIGNED_EXTRACT(insn,16,7)
+
+/* for stop */
+#define DECODE_INSN_U14(insn) UNSIGNED_EXTRACT(insn,14,0)
+
+/* For ila */
+#define DECODE_INSN_I18(insn) SIGNED_EXTRACT(insn,18,7)
+#define DECODE_INSN_U18(insn) UNSIGNED_EXTRACT(insn,18,7)
+
+/* For rotate and shift and generate control mask */
+#define DECODE_INSN_I7(insn) SIGNED_EXTRACT(insn,7,14)
+#define DECODE_INSN_U7(insn) UNSIGNED_EXTRACT(insn,7,14)
+
+/* For float <-> int conversion */
+#define DECODE_INSN_I8(insn) SIGNED_EXTRACT(insn,8,14)
+#define DECODE_INSN_U8(insn) UNSIGNED_EXTRACT(insn,8,14)
+
+/* For hbr */
+#define DECODE_INSN_I9a(insn) ((SIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))
+#define DECODE_INSN_I9b(insn) ((SIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))
+#define DECODE_INSN_U9a(insn) ((UNSIGNED_EXTRACT(insn,2,23) << 7) | UNSIGNED_EXTRACT(insn,7,0))
+#define DECODE_INSN_U9b(insn) ((UNSIGNED_EXTRACT(insn,2,14) << 7) | UNSIGNED_EXTRACT(insn,7,0))
+
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
index a912aea..25bfcd4 100644
--- a/contrib/binutils/ld/ChangeLog
+++ b/contrib/binutils/ld/ChangeLog
@@ -1,359 +1,705 @@
-2006-07-19 Alan Modra <amodra@bigpond.net.au>
+2007-07-03 Matthias Klose <doko@ubuntu.com>
- * ld.h (handle_asneeded_cref): Declare.
- * ldcref.c: Include objalloc.h.
- (old_table, old_tab, alloc_mark): New variables.
- (tabsize, entsize, refsize, old_symcount): Likewise.
- (add_cref): Use bfd_hash_allocate for refs.
- (handle_asneeded_cref): New function.
- * ldmain.c (notice): Call handle_asneeded_cref for NULL name.
+ * emultempl/spuelf.em (base_name): Correct backslash quoting.
-2006-07-04 Daniel Jacobowitz <dan@codesourcery.com>
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
- Backport:
- 2006-05-19 Alan Modra <amodra@bigpond.net.au>
- * ldlang.c (lang_size_sections_1): Don't check mem regions for
- os->ignored sections.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/ld.pot: Regenerate.
-2006-06-12 Fred Fish <fnf@specifix.com>
+2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
- * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the
- ".mdebug.<abi>" and ".gcc_compiled_long<size>" sections
- generated by mips gcc.
+ * aclocal.m4: Regenerated.
+ * Makefile.in: Likewise.
-2006-06-09 Alan Modra <amodra@bigpond.net.au>
+2007-06-29 H.J. Lu <hongjiu.lu@intel.com>
- * ldlang.h (lang_input_statement_type): Use bitfields for booleans.
- * ldlang.c (struct out_section_hash_entry): Rename from
- output_statement_hash_entry. Delete output_section_statement_type
- entry. Add statement_union_type entry. Adjust all users.
- (output_section_statement_table): Rename from output_statement_table.
- Adjust all users.
- (output_section_statement_newfunc): Rename from
- output_statement_newfunc. Adjust all users.
- (output_section_statement_table_init): Rename from
- output_statement_table_init. Adjust all users.
- (output_section_statement_table_free): Rename from
- output_statement_table_free. Adjust all users.
+ * NEWS: Remove a line with '*' only.
-2006-06-08 Alan Modra <amodra@bigpond.net.au>
+2007-06-29 Joseph Myers <joseph@codesourcery.com>
- * emultempl/elf32.em (global_found): Make it a pointer.
- (stat_needed, try_needed): Adjust.
- (check_needed): Don't skip non-loaded as-needed entries. Only
- consider entries with both filename and the_bfd non-null.
- (after_open): Try loading non-loaded as-needed libs to satisfy
- DT_NEEDED libs.
+ * emulparams/armelf.sh (OTHER_SECTIONS): Remove .ARM.attributes.
+ (ATTRS_SECTIONS): Define.
+ * scripttempl/elf.sc, scripttempl/elf32sh-symbian.sc,
+ scripttempl/elf_chaos.sc, scripttempl/elfi370.sc,
+ scripttempl/elfxtensa.sc: Handle ATTRS_SECTIONS.
-2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+2006-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
- * po/Make-in (pdf, ps): New dummy targets.
+ * scripttemp/elf32cr16.sc: Default linker script.
+ * emulparams/elf32cr16.sh: Emulation script.
+ * emultempl/cr16elf.em: Emulation script.
+ * Makefile.am: Add entry to make cr16 target.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Specify default and other emulation parameters
+ for cr16.
+ * ChangeLog: Added CR16 target entry.
+ * NEWS: Announce the support for the CR16 new target.
-2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
+2007-06-27 Alan Modra <amodra@bigpond.net.au>
- * Makefile.am (TEXI2DVI): Add -I $(top_srcdir)/../libiberty.
- * Makefile.in: Regenerate.
+ * pe-dll.c: Rename uses of bfd.next to bfd.archive_next throughout.
-2006-05-30 Nick Clifton <nickc@redhat.com>
+2007-06-20 Alan Modra <amodra@bigpond.net.au>
- * po/es.po: Updated Spanish translation.
+ * emulparams/elf32_spu.sh (OTHER_SECTIONS): KEEP .note.spu_name.
-2006-05-24 Nick Clifton <nickc@redhat.com>
+2007-06-18 Nathan Sidwell <nathan@codesourcery.com>
- * po/vi.po: Updated Vietnamese translation.
+ * ldlex.l, ldgram.y: Add ALIGNOF.
+ * ldexp.c (exp_print_token, foldname): Likewise.
+ * ld.texinfo: Likewise.
-2006-05-22 Daniel Jacobowitz <dan@codesourcery.com>
+2007-06-18 Alan Modra <amodra@bigpond.net.au>
- * ld-mips-elf/textrel-1.d: Relax some patterns.
+ * Makefile.am: Add eelf32_spu.o rule.
+ * Makefile.in: Regenerate.
+ * emultempl/spuelf.em: Revert last change. Instead use EMBEDSPU
+ defined in Makefile for embedspu name.
-2006-05-22 Nick Clifton <nickc@redhat.com>
+2007-06-18 Alan Modra <amodra@bigpond.net.au>
- * scripttempl/elf32crx.sc (.rdata): Add .rodata.*.
+ * emultempl/spuelf.em (embedded_spu_file): Deduce embedspu program
+ name prefix from that of ld.
-2006-05-05 Alan Modra <amodra@bigpond.net.au>
+2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
- * ld.texinfo: Document PowerPC and PowerPC64 options.
- * gen-doc.texi: Enable.
- * configdoc.texi: Regenerate.
- * ld.info: Regenerate.
+ * Makefile.am (ACLOCAL_AMFLAGS): Add -I ../config -I ../bfd.
-2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+ * acinclude.m4: Removed.
- * Makefile.am (AM_MAKEINFOFLAGS): Add libiberty.
- (TEXI2POD): Use AM_MAKEINFOFLAGS.
- (configdoc.texi): Don't set top_srcdir.
- * ld.texinfo: Don't use top_srcdir.
- * aclocal.m4, Makefile.in: Regenerated.
+ * Makefile.in: Regenerated.
+ * aclocal.m4: Likewise.
+ * configure: Likewise.
-2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+2007-06-14 Alan Modra <amodra@bigpond.net.au>
- * po/POTFILES.in: Regenerated.
+ * emultempl/spu_ovl.S: Don't trash lr on tail call from one
+ overlay to another.
+ * emultempl/spu_ovl.o: Regenerate.
-2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+2007-06-11 Bob Wilson <bob.wilson@acm.org>
- * config.in: Regenerated.
+ * emulparams/elf32xtensa.sh (OTHER_READONLY_SECTIONS): Add ONLY_IF_RO
+ for .xt_except_table.
+ (OTHER_RELRO_SECTIONS): New.
-2006-04-14 David Heine <dlheine@tensilica.com>
+2007-06-11 Sterling Augustine <sterling@tensilica.com>
Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (replace_insn_sec_with_prop_sec): Use renamed
+ XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
+
+2007-06-01 Noah Misch <noah@cs.caltech.edu>
+ Alan Modra <amodra@bigpond.net.au>
- * emultempl/xtensaelf.em (elf_xtensa_before_allocation): Call new
- function to strip inconsistent linkonce sections.
- (input_section_linked_worker, input_section_linked): New.
- (is_inconsistent_linkonce_section): New.
- (xtensa_strip_inconsistent_linkonce_sections): New.
+ * ldlang.c (ldlang_add_file): Use input_bfds_tail.
+ * ldmain.c (main): Init input_bfds_tail. Sort link_info
+ initialization.
-2006-04-11 Diego Pettenò <flameeyes@gentoo.org>
+2007-05-29 Alan Modra <amodra@bigpond.net.au>
- * emultempl/elf32.em: Add support for elf-hints.h on FreeBSD
- and Dragonfly targets.
- * configure.in (AC_CHECK_HEADERS): Add elf-hints.h.
- * Makefile.am (HFILES): Add elf-hints-local.h.
- * elf-hints-local.h: New file.
- * Makefile.in: Regenerate.
+ * emultempl/spuelf.em (base_name): New function, split out from..
+ (embedded_spu_file) ..here. Pass -fPIC or -fpie to embedspu
+ invocation if we deduce a shared lib or position independent
+ executable build by looking at ctrbegin* linker input files.
+
+2007-05-29 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/spu_ovl.S (__rv_pattern, __cg_pattern): Set symbol
+ types and sizes.
+ * emultempl/spu_ovl.o: Regenerate.
+
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
+
+ * Makefile.in: Regnerate.
* configure: Regenerate.
+ * aclocal.m4: Regenerate.
-2006-04-07 Bernhard Fischer <aldot@gcc.gnu.org>
+2007-05-24 Nathan Sidwell <nathan@codesourcery.com>
- * ld.texinfo: Fix typo in documentation of --check-sections.
+ * ldlex.l: ASSERT is recognized in SCRIPT env. NAMES cannot
+ contain commas in EXP env.
+ * ldgram.y (extern_name_list): Push to EXP env, move body to ...
+ (extern_name_list_body): ... here.
+ (script_file, ifile_list): Reformat.
+ (statement): Add ASSERT.
-2006-04-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+2007-05-22 Nick Clifton <nickc@redhat.com>
- * ldlang.c (load_symbols): Set as_needed and add_needed according
- to the corresponding script's fields while processing it.
+ * ld.texinfo: Use @copying around the copyright notice.
+ * ldint.texinfo: Likewise.
-2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+2007-05-18 Richard Sandiford <richard@codesourcery.com>
- * Makefile.am: Add install-html, install-html-am, and
- install-html-recursive targets.
- * Makefile.in: Regenerate.
- * configure.in: AC_SUBST datarootdir, docdir, htmldir.
+ * emulparams/elf32ebmipvxworks.sh (OTHER_READONLY_SECTIONS)
+ (OTHER_READWRITE_SECTIONS): Define. Add .rdata sections.
+
+2007-05-16 Richard Sandiford <richard@codesourcery.com>
+
+ * configure.in: Allow sysroots to be relocated under $prefix as
+ well as $exec_prefix.
* configure: Regenerate.
- * po/Make-in: Add install-html target.
-2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
+2007-05-14 Andreas Schwab <schwab@suse.de>
- * emultempl/ia64elf.em: Set link_info.relax_pass to 2. Remove
- link_info.need_relax_finalize.
+ * emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern):
+ Handle null pattern.
- * ldlang.c (relax_sections): New.
- (lang_process): Use. Call relax_sections link_info.relax_pass
- times.
+2007-05-11 Alan Modra <amodra@bigpond.net.au>
- * ldmain.c (main): Set link_info.relax_pass to 1. Remove
- link_info.need_relax_finalize.
+ * emultempl/ppc32elf.em (plt_style): New variable.
+ (old_plt): Delete.
+ (ppc_after_open): Adjust ppc_elf_select_plt_layout call.
+ (PARSE_AND_LIST_PROLOGUE): Define OPTION_NEW_PLT, renumber
+ OPTION_OLD_PLT, OPTION_OLD_GOT and OPTION_STUBSYMS.
+ (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add secure-plt.
+ (PARSE_AND_LIST_ARGS_CASES): Handle OPTION_NEW_PLT.
+ * ld.texinfo (--secure-plt): Document.
-2006-04-05 Alan Modra <amodra@bigpond.net.au>
+2007-05-08 Alan Modra <amodra@bigpond.net.au>
- * Makefile.am (GENSCRIPTS): Pass prefix.
- * Makefile.in: Regenerate.
- * genscripts.sh: Adjust for extra parameter.
- * emultempl/elf32.em (parse_ld_so_conf): Return true iff file
- exists.
- (check_ld_so_conf): Use ${prefix}/etc/ld.so.conf if it exists.
- * NEWS: Update.
+ * ld.h (args_type, ld_config_type): Reorder fields.
+ * ldmain.c (main): Don't initialise a bunch of vars we know are
+ zero already.
-2006-04-05 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
+2007-05-05 Anatoly Sokolov <aesok@post.ru>
- * configure.tgt (sparc*-*-vxworks*): New stanza.
- * emulparams/elf32_sparc_vxworks.sh: New file.
- * Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o.
- (eelf32_sparc_vxworks.c): New rule.
- * Makefile.in: Regenerate.
+ * multempl/avrelf.em (PARSE_AND_LIST_ARGS_CASES): Add new value for
+ "--pmem-wrap-around".
+ (PARSE_AND_LIST_OPTIONS): Describe new value for "--pmem-wrap-around".
-2006-04-04 Eric Botcazou <ebotcazou@adacore.com>
+2007-05-03 Bob Wilson <bob.wilson@acm.org>
- * ldlang.c (lang_map): Print the list of discarded input sections.
- (print_input_section): Change parameter and print zero-sized sections.
- (print_statement): Adjust call to print_input_section.
+ * scripttempl/elfxtensa.sc: Merge changes from elf.sc.
-2006-04-01 Danny Smith <dannysmith@users.sourceforge.net>
+2007-05-03 Alan Modra <amodra@bigpond.net.au>
- * deffilep.y (def_image_name): If LIBRARY or NAME statement
- specifies an empty string, retain the name specified on command
- line.
- * ld.texinfo: Document above.
+ * ld.texinfo (--no-warn-search-mismatch): Document.
+ * ldfile.c (ldfile_try_open_bfd): Don't warn about skipping
+ incompatible libraries if --no-warn-search-mismatch.
+ * ld.h (args_type): Add warn_search_mismatch.
+ * ldmain.c (main): Init it.
+ * lexsup.c (enum option_values): Add OPTION_NO_WARN_SEARCH_MISMATCH.
+ (ld_options): Add entry for --no-warn-search-mismatch.
+ (parse_args): Handle OPTION_NO_WARN_SEARCH_MISMATCH.
+
+2007-05-03 Alan Modra <amodra@bigpond.net.au>
+
+ * scripttempl/elf.sc: Add .debug_pubtypes and .debug_ranges.
+
+2007-05-01 Robert Millan <rmh@aybabtu.com>
+
+ * ldlang.c (lang_check): Error on architecture mismatch.
+
+2007-04-30 Alan Modra <amodra@bigpond.net.au>
+
+ * ldmain.c (link_callbacks): Init info and minfo fields.
+ * ldmisc.c (minfo): Do nothing if no map file.
+ * emultempl/spuelf.em (stack_analysis, emit_stack_syms): New vars.
+ (spu_after_open): Adjust spu_elf_create_sections call.
+ (spu_before_allocation): Likewise for spu_elf_size_stubs.
+ (OPTION_SPU_STACK_ANALYSIS, OPTION_SPU_STACK_SYMS): Define.
+ (PARSE_AND_LIST_LONGOPTS): Add new entries.
+ (PARSE_AND_LIST_OPTIONS, PARSE_AND_LIST_ARGS_CASES): Likewise.
+ * gen-doc.texi: Add @set for SPU and other missing targets.
+ * ld.texinfo: Update man page selection to match gen-doc.texi.
+ Document SPU features.
-2006-03-31 Jakub Jelinek <jakub@redhat.com>
+2007-04-28 Alan Modra <amodra@bigpond.net.au>
- * ldmisc.c (vfinfo): Revert 2005-10-05 changes. If
- bfd_find_nearest_line succeeded for %C or %D, but filename
- is NULL, print section+offset at the end.
+ * ldcref.c (struct cref_hash_entry): Make "demangled" const.
+ (cref_fill_array): Adjust for changed demangler.
+ * ldlang.c (lang_one_common): Likewise.
-2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
+2007-04-27 Nathan Froyd <froydnj@codesourcery.com>
- * emulparams/elf32bfinfd.sh: New file.
- * emultempl/bfin.em: Delete.
- * emulparams/bfin.sh: Lose reference to bfin.em.
- * Makefile.am (eelf32bfin.c): Likewise.
- (eelf32bfinfd.c): New.
+ * emulparams/elf32_sparc.sh: Update comments.
+ * emulparams/elf32bmip.sh: Likewise.
+ * emulparams/elf32ppc.sh: Likewise.
+ * emulparams/vxworks.sh: Likewise.
+
+2007-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ Many files: Include sysdep.h first. Remove duplicate headers.
+ * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
- * configure.tgt (bfin-*-elf, bfin-*-uclinux): Add elf32bfinfd to
- targ_extra_emuls.
-2006-03-22 Richard Sandiford <richard@codesourcery.com>
- Daniel Jacobowitz <dan@codesourcery.com>
- Phil Edwards <phil@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Mark Mitchell <mark@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
-
- * configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
- separate VxWorks emulations.
- * emulparams/elf32ebmipvxworks.sh: New file.
- * emulparams/elf32elmipvxworks.sh: New file.
- * Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
- eelf32elmipvxworks.o.
- (eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
+2007-04-24 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2007-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldcref.c (cref_fill_array): Call bfd_demangle rather than demangle.
+ * ldlang.c (lang_one_common): Likewise.
+ * ldmisc.c (vfinfo): Likewise.
+ (demangle): Delete.
+ * ldmisc.h (demangle): Delete.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2007-04-18 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.h (enum section_type): Add overlay_section.
+ * ldlang.c (lang_add_section): Handle flags for overlay_section
+ as per normal_section.
+ (lang_size_sections_1): When setting lma, detect overlays by
+ os->sectype rather than by looking for overlapping vmas.
+ (lang_enter_overlay_section): Use overlay_section type.
+ (lang_leave_overlay): Set first overlay section to normal.
+
+2007-04-14 Steve Ellcey <sje@cup.hp.com>
+
+ * Makefile.am: Add ACLOCAL_AMFLAGS.
* Makefile.in: Regenerate.
-2006-03-16 Alan Modra <amodra@bigpond.net.au>
+2007-04-12 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (OTHER_SECTIONS): KEEP property sections.
+
+2007-04-10 Richard Henderson <rth@redhat.com>
- PR 2434
- * ldcref.c (add_cref): Adjust bfd_hash_table_init calls.
- * ldlang.c (output_statement_table_init, lang_init): Likewise.
- * ldmain.c (add_ysym, add_wrap, add_keepsyms_file): Likewise.
- (undefined_symbol): Likewise.
+ * ldlang.c (relax_sections): Initialize and increment
+ link_info.relax_trip.
-2006-03-07 Richard Sandiford <richard@codesourcery.com>
+2007-04-04 Paul Brook <paul@codesourcery.com>
+
+ * configure.tgt: Loosen checks for arm uclinux eabi targets.
+
+2007-04-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/4090
+ * ldexp.h (node_type): Add lineno.
+ * ldexp.c: Include "ldlex.h".
+ (exp_intop): Set the lineno field from lineno.
+ (exp_bigintop): Likewise.
+ (exp_relop): Likewise.
+ (exp_nameop): Likewise.
+ (exp_binop): Set the lineno field from lineno of lhs.
+ (exp_trinop): Likewise.
+ (exp_unop): Set the lineno field from lineno of child.
+ (exp_assop): Set the lineno field from lineno of src.
+ (exp_provide): Likewise.
+ (exp_assert): Set the lineno field from lineno of exp.
+ (exp_get_abs_int): Set lineno from lineno of nonconstant
+ expression when report problem.
+
+2007-03-29 Richard Sandiford <richard@codesourcery.com>
Daniel Jacobowitz <dan@codesourcery.com>
- Zack Weinberg <zack@codesourcery.com>
- Nathan Sidwell <nathan@codesourcery.com>
- Paul Brook <paul@codesourcery.com>
- Ricardo Anguiano <anguiano@codesourcery.com>
+
+ * NEWS: Mention -l:foo.
+ * ld.texinfo: Document it.
+ * ldlang.c (new_afile): If a lang_input_file_is_l_enum
+ entry as a name beginning with a coloh, convert it to a
+ lang_input_file_is_search_file_enum entry without the colon.
+
+2007-03-28 Richard Sandiford <richard@codesourcery.com>
+
+ * ld.h (ld_config_type): Add rpath_separator.
+ * ldmain.c (main): Initialize it.
+ * lexsup.c (parse_args): Honor config.rpath_separator.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_search_needed): Likewise.
+ (gld${EMULATION_NAME}_add_sysroot): Likewise.
+ (gld${EMULATION_NAME}_parse_ld_so_conf): Use config.rpath_separator
+ rather than ':' when building the path.
+ * emultempl/vxworks.em (vxworks_before_parse): New function.
+ Override config.rpath_separator.
+ (LDEMUL_AFTER_OPEN): Do not change if EXTRA_EM_FILE has been
+ set to gld${EMULATION_NAME}_after_open; #define that identifier
+ to vxworks_foo instead.
+ (LDEMUL_BEFORE_PARSE): Override in the same way as LDEMUL_AFTER_OPEN.
+
+2007-03-28 Richard Sandiford <richard@codesourcery.com>
Phil Edwards <phil@codesourcery.com>
- * emulparams/armelf_vxworks.sh: Include vxworks.sh.
- (MAXPAGESIZE): Define.
- * emulparams/vxworks.sh: Undefine EMBEDDED.
- * Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
+ * ld.texinfo: Put the contents after the title page rather
+ than at the end of the document.
+
+2007-03-26 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Add dependency on ldemul-list.h for powerpc and
+ spu target emul files.
+ * configure.in: Check for mkstemp and waitpid.
* Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * ldlang.c (input_file_chain): Make global.
+ (lang_add_input_file): Don't set lang_has_input_file here.
+ * ldlang.h (input_file_chain): Declare.
+ * emultempl/ppc32elf.em (ppc_recognized_file): New function.
+ (LDEMUL_RECOGNIZED_FILE): Define.
+ * emultempl/ppc64elf.em (ppc64_recognized_file): New function.
+ (LDEMUL_RECOGNIZED_FILE): Define.
+ * emultempl/spuelf.em (struct tflist): New.
+ (tmp_file_list): New var.
+ (clean_tmp, embedded_spu_file): New functions.
-2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
+2007-03-24 Alan Modra <amodra@bigpond.net.au>
- * scripttempl/avr.sc: Add *(.jumptables) *(.lowtext) sections.
- Add KEEP() directives.
- Add *(.data*) *(.rodata) and *(.rodata*) and *(.bss*) to .data and
- .bss output sections.
+ * ldlang.c (lang_insert_orphan): Provide start/stop loadaddr syms
+ rather than defining unconditionally.
+ (lang_leave_overlay_section): Likewise.
+ * ld.texinfo (Overlay Description): Update description and examples
+ for start/stop syms.
-2006-03-03 Richard Sandiford <richard@codesourcery.com>
+2007-03-22 Joseph Myers <joseph@codesourcery.com>
- * emulparams/vxworks.sh (VXWORKS_BASE_EM_FILE): New variable.
- (EXTRA_EM_FILE): Define.
- * emultempl/vxworks.em: New file.
- * ld.texinfo (--force-dynamic): Document.
- * Makefile.am (eelf32ppcvxworks.cm, eelf_i386_vxworks.c): Depend
- on vxworks.em.
- * Makefile.in: Regenerate.
+ * ld.texinfo: Include VERSION_PACKAGE when reporting version.
+
+2007-03-20 Paul Brook <paul@codesourcery.com>
+
+ * emultempl/armelf.em (pic_veneer): New variable.
+ (PARSE_AND_LIST_PROLOGUE): Add OPTION_PIC_VENEER.
+ (PARSE_AND_LIST_ARGS_CASES): Ditto.
+ (PARSE_AND_LIST_LONGOPTS): Add "pic-veneer".
+ (PARSE_AND_LIST_OPTIONS): Ditto.
+ * ld.texinfo: Document --pic-veneer.
+
+2007-03-18 Mark Shinwell <shinwell@codesourcery.com>
+
+ * ld.texinfo: Document --no-enum-size-warning.
+ * emultempl/armelf.em (no_enum_size_warning): New.
+ (arm_elf_create_output_section_statements): Correct typo
+ in comment. Pass no_enum_size_warning to
+ bfd_elf32_arm_set_target_relocs.
+ (PARSE_AND_LIST_PROLOGUE): Define OPTION_NO_ENUM_SIZE_WARNING.
+ (PARSE_AND_LIST_OPTIONS): Document --no-enum-size-warning.
+ (PARSE_AND_LIST_ARGS_CASES): Add OPTION_NO_ENUM_SIZE_WARNING
+ case.
+
+2007-03-19 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * configure.tgt (bfin-*-elf, bfin-*-uclinux*): Add targ_extra_libpath.
+ (bfin-*-linux-uclibc*): New target.
+
+2007-03-16 Kai Tietz <Kai.Tietz@onevision.com>
+
+ * pe-dll.c (make_one): Use pc-relative relocation instead of an
+ absolute relocation for x86_64-pc-mingw32 target.
+
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (ld_TEXINFOS): Remove ldver.texi.
+ (AM_MAKEINFOFLAGS): Add -I ../../bfd/doc.
+ (TEXI2DVI): Likewise.
+ (REPORT_BUGS_TO): Removed.
+ (INCLUDES): Remove -DREPORT_BUGS_TO.
+ (ldver.texi): Likewise.
+ (ld.1): Don't depend on ldver.texi.
+ (MOSTLYCLEANFILES): Remove ldver.texi.
+ * Makefile.in: Regenerated.
+
+ * configure.in (--with-bugurl): Removed.
+ * configure: Regenerated.
+
+ * lexsup.c: Include bfdver.h.
+
+ * ld.texinfo: Include bfdver.texi instead of ldver.texi.
-2006-03-02 Richard Sandiford <richard@codesourcery.com>
-
- * emulparams/elf32ppccommon.sh: New file, extracted from...
- * emulparams/elf32ppc.sh: ...here.
- * emulparams/elf32ppcvxworks.sh: Include elf32ppccommon.sh
- instead of elf32ppc.sh.
- (BSS_PLT): Remove override.
- * Makefile.am (eelf32lppc.c): Depend on elf32ppccommons.h.
- (eelf32lppcnto.c, eelf32lppcsim.c, eelf32ppcnto.c): Likewise.
- (eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppcsimm): Likewise.
- (eelf32ppclinux.c): Likewise.
- (eelf32ppcvxworks.c): Likewise. Add missing vxworks.sh dependency.
+2007-03-11 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * emultempl/mmixelf.em: Remove incorrect '#line' directive.
+
+2007-03-08 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lang_size_sections_1): Correct backwards dot move
+ test to not trigger on overlays. Only warn on backwards move
+ if non-default lma.
+
+2007-03-07 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in (REPORT_BUGS_TEXI): Define to Texinfo version of
+ bug-reporting URL.
+ * Makefile.am (ldver.texi): Define BUGURL.
+ * ld.texinfo: Use BUGURL.
+ * Makefile.in, configure: Regenerate.
+
+2007-03-07 Nick Clifton <nickc@redhat.com>
+
+ PR ld/4023
+ * emultempl/aix.em (..._before_allocation): Strip sysroot prefix
+ from any paths being inserted into the output binary's DT_RPATH.
+
+2007-03-02 Nathan Sidwell <nathan@codesourcery.com>
+
+ * emulparams/shelf_uclinux.sh: New. Missed in 2007-02-28 commit.
+
+2007-03-01 Joseph Myers <joseph@codesourcery.com>
+
+ * ldver.c (ldversion): Remove word "version" from output. Update
+ copyright date.
+
+2007-02-28 Nathan Sidwell <nathan@codesourcery.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add eshelf_uclinux.o
+ (eshelf_uclinux.c): New target.
+ * Makefile.in: Rebuilt.
+ * configure.tgt (sh-*-uclinux* | sh[12]-*-uclinux*): New stanza.
+ * emulparams/shelf_uclinux.sh: New.
+
+2007-02-28 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.tgt: Fix type last change.
+ * configure.tgt (spu-*-elf*): Delete targ_extra_ofiles.
+
+2007-02-27 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (ALL_EMUL_EXTRA_OFILES): Remove spu_inc.o.
+ (eelf32_spu.c): Adjust dependencies.
* Makefile.in: Regenerate.
+ * emultempl/spuelf.em (ovl_mgr): New array. Insert spu_ovl.o
+ code using bin2c.
+ (_binary_spu_ovl_o_start, _binary_spu_ovl_o_end): Delete.
+ (ovl_mgr_stream): Update.
+ * emultempl/spu_inc.s: Delete.
+ * emultempl/spu_none.s: Delete.
+
+2007-02-26 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/spuelf.em (_binary_builtin_ovl_mgr_start): Rename
+ to _binary_spu_ovl_o_start.
+ (_binary_builtin_ovl_mgr_end): Rename to _binary_spu_ovl_o_end.
+ (spu_elf_load_ovl_mgr): Fatal error on missing overlay manager.
+ * emultempl/spu_inc.s: Rename symbols.
+ * emultempl/spu_none.s: New file.
+ * emultempl/spu_ovl.S: Update copyright.
+ * Makefile.am (spu_inc.o): Try building with ld -r first, then
+ gas incbin, then build without overlay manager.
+ * Makefile.in: Regenerate.
+
+2007-02-22 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.tgt (mips64*el-*-linux-*, mips64*-*-linux-*,
+ mips*el-*-linux-*, mips*-*-linux-*): Set
+ targ_extra_libpath=$targ_extra_emuls.
+
+2007-02-21 Nick Clifton <nickc@redhat.com>
+
+ * ldlang.c (ldlang_override_segment_assignment): New function.
+ * ldlang.h (ldlang_override_segment_assignment): Prototype.
+ * ldmain.c (link_callbacks): Add
+ ldlang_override_segment_assignment.
+
+2007-02-20 Alan Modra <amodra@bigpond.net.au>
-2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+ * ldexp.c (fold_name <LOADADDR>): Ensure result is always absolute.
- * Makefile.am: Add html target.
+2007-02-17 Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Vladimir Prus <vladimir@codesourcery.com
+ Joseph Myers <joseph@codesourcery.com>
+
+ * configure.in (--with-bugurl): New option.
+ * configure: Regenerate.
+ * Makefile.am (REPORT_BUGS_TO): Define.
+ (INCLUDES): Define REPORT_BUGS_TO.
+ Regenerate dependencies.
* Makefile.in: Regenerate.
- * po/Make-in: Add html target.
-
-2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
- Anil Paranjape <anilp1@kpitcummins.com>
- Shilin Shakti <shilins@kpitcummins.com>
-
- * scripttemp/elf32xc16x.sc: Default linker script for tiny model.
- * scripttemp/elf32xc16xl.sc: Default linker script for large model.
- * scripttemp/elf32xc16xs.sc: Default linker script for small model.
- * emulparams/elf32xc16x.sh: Emulation script for tiny model.
- * emulparams/elf32xc16xl.sh: Emulation script for large model.
- * emulparams/elf32xc16xs.sh: Emulation script for small model.
- * Makefile.am: Add entry to make xc16x target.
+ * ld.h: Remove include of bin-bugs.h.
+ * lexsup.c (help): Don't print empty REPORT_BUGS_TO.
+
+2007-02-17 Alan Modra <amodra@bigpond.net.au>
+
+ * ldcref.c (check_reloc_refs): Compare section for local syms.
+
+2007-02-13 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/spu_ovl.S (__ovly_return, __ovly_load): Set sym size.
+ (__ovly_load_event): Define.
+ (size): Rename to osize.
+ * emultempl/spu_ovl.o: Regenerate.
+
+2007-02-13 Alan Modra <amodra@bigpond.net.au>
+
+ * emulparams/elf64ppc.sh (OTHER_READWRITE_SECTIONS): Add ".branch_lt".
+ * emultempl/ppc64elf.em (ppc_add_stub_section): Create without
+ SEC_RELOC flag set.
+
+2007-02-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.in (targ_extra_emuls): Add $targ64_extra_emuls if
+ want64 is true.
+ (targ_extra_libpath): Add $targ64_extra_libpath if want64 is
+ true
+ * configure: Regenerated.
+
+ * configure.tgt (targ_extra_libpath): Initialize.
+ (targ64_extra_emuls): New. Document. Initialize.
+ (targ64_extra_libpath): Likewise.
+ (i[3-7]86-*-linux-*): Set targ64_extra_emuls and
+ targ64_extra_libpath.
+ (powerpc*-*-linux*): Likewise.
+ (s390-*-linux*): Likewise.
+
+2007-02-07 Paul Brook <paul@codesourcery.com>
+
+ * configure.tgt: Add arm*-*-uclinux-*eabi.
+
+2007-02-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ldlang.c (lang_size_sections_1): Add a missing `)'.
+
+2007-02-06 Alan Modra <amodra@bigpond.net.au>
+
+ PR ld/3966
+ * ldlang.c (lang_size_sections_1): Don't warn on backwards dot
+ move unless section size is non-zero.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add support for Toshiba MeP.
+ * configure.tgt: Likewise.
+ * scripttempl/mep.sc: New file.
+ * emulparams/elf32mep.sh: New file.
* Makefile.in: Regenerate.
- * configure.tgt: Specify default and other emulation parameters
- for xc16x.
- * NEWS: Announce the support for the new target.
-2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
+2006-01-29 Julian Brown <julian@codesourcery.com>
- * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
- Use the traditional target.
+ * NEWS: Mention --vfp11-denorm-fix option.
+ * ld.texinfo: Document above.
+ * emulparams/armelf_linux.sh (OTHER_TEXT_SECTIONS): Add
+ .vfp11_veneer section.
+ * emulparams/armelf.sh (OTHER_TEXT_SECTIONS): Likewise.
+ * emultempl/armelf.em (vfp11_denorm_fix): New static variable.
+ (arm_elf_before_allocation): Call bfd_elf32_arm_set_vfp11_fix,
+ bfd_elf32_arm_init_maps and bfd_elf32_arm_vfp11_erratum_scan.
+ (arm_elf_after_allocation): New function. Call
+ bfd_elf32_arm_vfp11_fix_veneer_locations for all input statements.
+ (arm_elf_create_output_section_statements): Pass vfp11 fix command
+ line option to BFD.
+ (OPTION_VFP11_DENORM_FIX): New option.
+ (PARSE_AND_LIST_LONGOPTS): Handle new option.
+ (PARSE_AND_LIST_OPTIONS): Likewise.
+ (PARSE_AND_LIST_ARGS_CASES): Likewise.
+ (LDEMUL_AFTER_ALLOCATION): Define.
-2006-02-13 Joseph S. Myers <joseph@codesourcery.com>
+2007-01-24 H.J. Lu <hongjiu.lu@intel.com>
- * configure.tgt (arm*b-*-linux-gnueabi): Change to
- arm*b-*-linux-*eabi.
- (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
+ * ldgram.y (SIZEOF_HEADERS): Remove duplicated one.
+ (DEFSYMEND): Likewise.
+ (NAME): Likewise.
+ (LNAME): Likewise.
-2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
+2007-01-19 Murali Vemulapati <murali.vemulapati@gmail.com>
- PR ld/2290
- * NEWS: Updated for the Linux linker search order change.
+ * pe-dll.c: (make_one) Conditionally include jump stubs.
+ * emultempl/pe.em (gld_${EMULATION_NAME}_after_open): Identify
+ redundant jump stubs from import libraries and exclude them from
+ link.
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Call
- gld${EMULATION_NAME}_check_ld_so_conf before checking default
- search directories for DT_NEEDED entries.
+2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
-2006-02-07 Paul Brook <paul@codesourcery.com>
+ * ld.h (args_type): Add new symbolic and dynamic_list fields.
- * emultempl/armelf.em: Include elf/arm.h.
- (arm_elf_finish): Set low address bit if enty point is a Thumb
- function.
+ * ld.texinfo: Update -Bsymbolic-functions.
-2006-02-01 Danny Smith <dannysmith@users.sourceforge.net>
+ * ldmain.c (main): Initialize command_line.symbolic to
+ symbolic_unset and command_line.dynamic_list to
+ dynamic_list_unset. Check -Bsymbolic, -Bsymbolic-functions and
+ --dynamic-list* before setting link_info.symbolic,
+ link_info.dynamic and link_info.dynamic_data.
- * deffilep.y (def_image_name): If the image name does not have
- a suffix, append the default.
- * ld.texinfo: Document NAME, LIBRARY usage in PE-COFF .def files.
+ * lexsup.c (option_values): Add OPTION_SYMBOLIC_FUNCTIONS.
+ (ld_options): Use OPTION_SYMBOLIC_FUNCTIONS with
+ -Bsymbolic-functions.
+ (parse_args): Handle -Bsymbolic-functions. Don't set
+ link_info.dynamic, link_info.dynamic_data and link_info.symbolic
+ here. Set command_line.symbolic for -Bsymbolic. Set
+ command_line.dynamic_list and command_line.symbolic for
+ --dynamic-list-data, --dynamic-list-cpp-new,
+ --dynamic-list-cpp-typeinfo and --dynamic-list.
-2006-01-31 Danny Smith dannysmith@users.sourceforge.net
+2007-01-19 Jakub Jelinek <jakub@redhat.com>
+ H.J. Lu <hongjiu.lu@intel.com>
- * NEWS: Mention support for forward exports in PE-COFF dll's.
- * ld.texinfo: Expand documentation of EXPORT statements in
- PE-COFF .def files.
+ * emultempl/elf32.em (handle_option): Make sure -z max-page-size
+ or -z common-page-size argument is a power of 2. Call
+ bfd_emul_set_maxpagesize and bfd_emul_set_commonpagesize.
-2006-01-31 Filip Navara <navaraf@reactos.com>
+2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
- * deffile.h (struct def_file_export): Add field flag_forward.
- * pe-dll.c (process_def_file): Check for forward exports.
- (generate_edata): Generate forward export symbols.
- (fill_edata): Emit them.
+ * ldmain.c (main): Don't call bfd_emul_set_maxpagesize nor
+ bfd_emul_set_commonpagesize.
- * pe-dll.c (process_def_file): Don't crash on malformed
- fastcall symbol names in .def file.
+2007-01-19 H.J. Lu <hongjiu.lu@intel.com>
-2006-01-30 Nick Clifton <nickc@redhat.com>
+ * NEWS: Mention --default-script/-dT.
- * po/vi.po: Updated Vietnamese translation.
+ * ld.h (args_type): Add a default_script field.
-2006-01-27 Yitzchak Scott-Thoennes <sthoenna@efn.org>
+ * ld.texinfo: Document --default-script/-dT.
- * pe-dll.c (pe_dll_generate_implib): Issue "Creating library
- file:" as informational message, not a warning.
+ * ldmain.c (main): Handle command_line.default_script.
-2006-01-18 Roger Sayle <roger@eyesopen.com>
+ * lexsup.c (option_values): Add OPTION_DEFAULT_SCRIPT.
+ (ld_options): Add entries for --default-script and -dT.
+ (parse_args): Handle --default-script/-dT.
- * emultempl/irix.em: Use lbasename instead of basename.
+2007-01-16 H.J. Lu <hongjiu.lu@intel.com>
-2006-01-16 Nick Clifton <nickc@redhat.com>
+ PR ld/3831
+ * NEWS: Mention -Bsymbolic-functions, --dynamic-list-data and
+ --dynamic-list-cpp-new.
- * po/zh_CN.po: New Chinese (simplified) translation.
- * configure.in (ALL_LINGUAS): Add "zh_CH".
- * configure: Regenerate.
+ * ld.texinfo: Document -Bsymbolic-functions, --dynamic-list-data
+ and --dynamic-list-cpp-new.
+
+ * ldlang.c (lang_append_dynamic_list_cpp_new): New.
+ (lang_process): Change link_info.dynamic to
+ link_info.dynamic_list.
+ (lang_append_dynamic_list): Likewise.
+ * ldmain.c (main): Likewise. Initialize link_info.dynamic and
+ link_info.dynamic_data to FALSE.
+
+ * ldlang.h (lang_append_dynamic_list_cpp_new): New.
+
+ * lexsup.c (option_values): Add OPTION_DYNAMIC_LIST_DATA and
+ OPTION_DYNAMIC_LIST_CPP_NEW.
+ (ld_options): Add entries for -Bsymbolic-functions,
+ --dynamic-list-data and --dynamic-list-cpp-new. Make
+ -Bsymbolic-functions an alias of --dynamic-list-data.
+ (parse_args): Change link_info.dynamic to link_info.dynamic_list.
+ Set link_info.dynamic to TRUE for --dynamic-list and
+ --dynamic-list-cpp-typeinfo. Handle --dynamic-list-data and
+ --dynamic-list-cpp-new.
+
+2007-01-11 Nathan Sidwell <nathan@codesourcery.com>
+
+ * emultempl/elf-generic.em (gdl_map_segments): Only allow header
+ shrinkage for the first few iterations.
+
+2007-01-08 Kai Tietz <kai.tietz@onevision.com>
+
+ * configure.tgt: Renamed target x86_64-*-mingw64 to
+ x86_64-*-mingw*.
+
+2007-01-08 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * configure.host: Add i[3-7]86-*-mingw* case.
+
+2007-01-08 Nick Clifton <nickc@redhat.com>
+
+ * pep-dll.h (pep_bfd_is_dll): Add prototype.
+
+2007-01-08 Aurelien Jarno <aurelien@aurel32.net>
+
+ PR ld/3843
+ * configure.tgt (x86_64_[k]freebsd*): Add targ_extra_libpath and
+ tdir_elf_i386_fbsd.
+
+2007-01-06 Nathan Sidwell <nathan@codesourcery.com>
+
+ * ldexp.c (fold_name): Issue error on undefined sections.
-2006-01-16 Bernhard Fischer <aldot@gcc.gnu.org>
+2007-01-02 Alan Modra <amodra@bigpond.net.au>
- * ld.texinfo (Options): Fix typo.
+ * pe-dll.c: Include pe-dll.h.
+ * pep-dll.c (pe_bfd_is_dll): Define.
-For older changes see ChangeLog-2005
+For older changes see ChangeLog-2006
Local Variables:
mode: change-log
diff --git a/contrib/binutils/ld/ChangeLog-2006 b/contrib/binutils/ld/ChangeLog-2006
new file mode 100644
index 0000000..c28addf
--- /dev/null
+++ b/contrib/binutils/ld/ChangeLog-2006
@@ -0,0 +1,1364 @@
+2006-12-23 Kazu Hirata <kazu@codesourcery.com>
+
+ * configure.tgt: Recognize fido.
+
+2006-12-18 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (pe_bfd_is_dll): New function.
+ * pe-dll.h (pe_bfd_is_dll): Declare.
+ * emultempl/pe.em (gld_${EMULATION_NAME}_recognized_file): Recognize
+ dlls using pe_bfd_is_dll instead of using the filename extension.
+
+2006-12-15 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * configure.tgt (NATIVE_LIB_DIRS): Specify for spu-*-elf*.
+
+2006-12-12 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (ld_TEXINFOS): Set.
+ (ld.info ld.dvi ld.html): Delete rule.
+ * Makefile.in: Regenerated.
+
+2006-12-12 Ina Pandit <inap@kpitcummins.com>
+
+ * ldlang.c (print_output_section_statement): Print load address
+ when lma differs from vma.
+
+2006-12-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.in: Define GENINSRC_NEVER.
+ * doc/Makefile.am (ld.info): Remove srcdir prefix.
+ (MAINTAINERCLEANFILES): Add info file.
+ (DISTCLEANFILES): Pretend to add info file.
+ * po/Make-in (.po.gmo): Put gmo files in objdir.
+ * configure, Makefile.in: Regenerated.
+
+2006-12-04 Jan Beulich <jbeulich@novell.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Create
+ .eh_frame_hdr section here.
+
+2006-11-27 Ian Lance Taylor <ian@airs.com>
+
+ * Makefile.am (EXTRA_DIST): Put spu_ovl.o in the emultempl
+ subdirectory.
+ * Makefile.in: Regenerate.
+
+2006-11-27 Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (XSHAL_ABI): Add default definition.
+ (replace_insn_sec_with_prop_sec): Use bfd_make_section_with_flags.
+ Delete redundant code to set sections flags and alignment.
+ (xt_config_info_unpack_and_check, check_xtensa_info): New.
+ (elf_xtensa_after_open): Iterate over input statements instead of
+ link_info.input_bfds.
+ (elf_xtensa_before_allocation): Likewise. Call check_xtensa_info for
+ each input, and write a new .xtensa.info section in the output.
+
+2006-11-22 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (LINGUAS): Add ga.
+ * po/ga.po: New Irish translation.
+
+2006-11-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld.texinfo: Fix a typo.
+
+2006-11-20 Alan Modra <amodra@bigpond.net.au>
+
+ * emulparams/elf32_spu.sh (OTHER_SECTIONS): Define.
+
+2006-11-13 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Only call
+ bfd_elf32_arm_process_before_allocation if no dynamic sections.
+
+2006-11-08 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (gld*_before_allocation): Adjust output section
+ size for warning sections.
+
+2006-11-06 Vladimir Prus <vladimir@codesourcery.com>
+
+ * emultempl/elf32.em (gld*_before_allocation): Don't prepend
+ "warning" to the message.
+
+2006-10-31 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (autofilter_entry_type): Change name to const.
+ (pe_details_type) : Change target_name, object_target and
+ autofilter_symbollist to const.
+ (autofilter_symbollist_generic): Change to const.
+ (autofilter_symbollist_i386, pe_detail_list, pe_details,
+ autofilter_liblist, autofilter_objlist autofilter_symbolprefixlist,
+ autofilter_symbolsuffixlist): Likewise.
+ (is_import): Fix indentation.
+ (auto_export): Change afptr to const. Move name declaration to
+ beginning of scope.
+ (make_tail): Clear undefined byte.
+ (jmp_ix86_bytes, jmp_sh_bytes, jmp_mips_bytes, jmp_arm_bytes): Change
+ to const.
+ (make_one): Change jmp_bytes to const. Make idata$6 member size
+ arithmetic explicit and add comment.
+
+2006-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3111
+ * ld.h (args_type): Remove reduce_memory_overheads.
+
+ * ldlang.c (lang_map): Updated.
+ (section_already_linked): Likewise.
+ (print_input_section): Likewise.
+ * ldmain.c (main): Likewise.
+ * lexsup.c (parse_args): Likewise.
+
+2006-10-29 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (make_singleton_name_thunk): Re-add the NULL terminator.
+
+2006-10-27 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lang_map): Don't say SEC_LINKER_CREATED and SEC_KEEP
+ sections have been discarded.
+ (lang_do_version_exports_section): Set SEC_KEEP on export section.
+ * emultempl/elf32.em (before_allocation): Set SEC_KEEP on warning
+ sections.
+
+2006-10-26 Joseph S. Myers <joseph@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ * configure.tgt (arm*linux*): Support both big- and little-endian.
+
+2006-10-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emulparams/hppa64linux.sh (LARGE_SECTIONS): Renamed to ...
+ (OTHER_BSS_SECTIONS): This.
+ * scripttempl/elf.sc (OTHER_BSS_SECTIONS): Support LARGE_SECTIONS.
+ (LARGE_SECTIONS): Move .lbss sections to OTHER_BSS_SECTIONS.
+
+2006-10-25 Alan Modra <amodra@bigpond.net.au>
+ Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+
+ * emulparams/elf32_spu.sh: New file.
+ * emultempl/spu_inc.s: New file.
+ * emultempl/spu_ovl.S: New file.
+ * emultempl/spu_ovl.o: New file.
+ * emultempl/spuelf.em: New file.
+ * Makefile.am: Add SPU support.
+ * configure.tgt: Likewise.
+ * ldlang.c (load_symbols): Make global.
+ * ldlang.h (load_symbols): Declare.
+ * scripttempl/elf.sc (OTHER_BSS_SECTIONS): Add.
+ * Makefile.in: Regenerate.
+
+2006-10-24 Ben Elliston <bje@au.ibm.com>
+
+ * lexsup.c (parse_args): Add a comment noting a fall-through.
+
+2006-10-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * configure.in (AC_CHECK_HEADERS): Add limits.h and sys/param.h.
+ * configure: Regenerated.
+ * config.in: Likewise.
+
+2006-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * emulparams/h8300elf.sh (TINY_DATA_SECTION, TINY_BSS_SECTION): Don't
+ set section address on a relocatable link.
+
+ * ld.texinfo (Output Section Discarding): Fix xref.
+
+2006-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * emulparams/shelf32.sh: Set default stack to 0x80000.
+ * emulparams/shelf64.sh: Likewise.
+
+2006-10-20 Richard Sandiford <richard@codesourcery.com>
+
+ * emulparams/elf32bmip.sh (OTHER_GOT_RELOC_SECTIONS): Define.
+ * emulparams/elf32bmipn32-defs.sh (OTHER_GOT_RELOC_SECTIONS): Likewise.
+
+2006-10-19 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Run
+ gld${EMULATION_NAME}_before_allocation later.
+ * ldlang.c (lang_size_sections_1): Revert 2006-09-15 change.
+
+2006-10-18 Roy Marples <uberlord@gentoo.org>
+
+ * emulparams/elf64_sparc_fbsd.sh (OUTPUT_FORMAT): Define as
+ elf64-sparc-freebsd.
+
+2006-10-18 Joseph Myers <joseph@codesourcery.com>
+
+ * configure.tgt (i[3-7]86-*-linux-*): Also define
+ targ_extra_libpath in want64 case.
+ * emulparams/elf_x86_64.sh: Handle i[3-7]86-*-linux-* the same as
+ x86_64*-linux*.
+
+2006-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * scripttempl/elf.sc (INTERP): Delete. Move definition to..
+ (INITIAL_READONLY_SECTIONS): ..here.
+ * emulparams/criself.sh (INITIAL_READONLY_SECTIONS): Include .interp.
+ * emulparams/elf32bmip.sh (INITIAL_READONLY_SECTIONS): Ditto.
+ * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Ditto.
+
+2006-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (strip_excluded_output_sections): Do strip sections
+ that define syms, but don't ignore them.
+ * ld.texinfo (Output Section Discarding): Revise.
+ * emultempl/armcoff.em (gld${EMULATION_NAME}_finish): Always call
+ finish_default.
+
+2006-10-16 Richard Sandiford <richard@codesourcery.com>
+
+ * Makefile.am (eelf64bmip.c): Depend on emulparams/elf64bmip-defs.sh.
+ (eelf64btsmip.c, eelf64ltsmip.c): Likewise.
+ * Makefile.in: Regenerate.
+ * emulparams/elf32bmipn32-defs.sh (INITIAL_READONLY_SECTIONS): Include
+ .reginfo rather than .MIPS.options.
+ * emulparams/elf64bmip-defs.sh: New file.
+ * emulparams/elf64bmip.sh: Include it.
+ (COMMONPAGESIZE): Delete.
+ * emulparams/elf64btsmip.sh: As for elf64bmip.sh.
+
+2006-10-12 Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Check
+ for linkonce XCC exception tables (".e" and ".h").
+
+2006-10-11 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (TEXT_PLT): Enable.
+ (OTHER_READONLY_SECTIONS): Add linkonce .xt_except_table sections.
+ (OTHER_READWRITE_SECTIONS): Add linkonce .xt_except_desc sections.
+ (OTHER_SDATA_SECTIONS): New.
+ * scripttempl/elfxtensa.sc: Import changes from elf.sc.
+
+2006-10-11 Jakub Jelinek <jakub@redhat.com>
+
+ * ldlang.c (lang_append_dynamic_list): When appending, add all elements
+ of the dynamic list rather than just the first entry.
+
+2006-10-10 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (GENERATE_PIE_SCRIPT): Enable.
+
+2006-10-06 Mike Frysinger <vapier@gentoo.org>
+
+ * genscripts.sh: Respect LIBPATH_SUFFIX when not using sysroot.
+
+2006-10-04 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/xtensa-config.sh: Delete file.
+ * emulparams/elf32xtensa.sh: Set MAXPAGESIZE here instead of including
+ xtensa-config.sh.
+ * Makefile.am (eelf32xtensa.c): Remove dependency on xtensa-config.sh.
+ * Makefile.in: Regenerate.
+
+2006-10-03 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c : Fix typo.
+ (autofilter_symbolprefixlist) : Remove __imp_.
+ (is_import) : New.
+ (auto-export) : Remove re-import check. Moved to callers.
+ (process_def_file) : Check is symbol is an import. Always
+ underscore __imp_.
+ Only skip underscore on underscored targets.
+ (make_one) : Always underscore __imp_.
+ (pe_create_runtime_relocator_reference) : Only underscore
+ _pei386_runtime_relocator on underscored targets.
+ (pe_process_import_defs) : Always underscore __imp_.
+ * pe.em (U) : New macro.
+ (set_pe_subsystem) : Remove underscore from _WinMainCRTStartup
+ on wince subsystem case.
+ (pe_find_data_imports) : Use U on "_head_".
+ (gld_${EMULATION_NAME}_unrecognized_file) : Use U.
+
+2006-09-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3223
+ PR ld/3267
+ * ld.texinfo: Updated Output Section Discarding.
+
+ * ldlang.h (lang_output_section_statement_type): Add
+ section_relative_symbol.
+ * ldlang.c (strip_excluded_output_sections): Don't strip a
+ section with a symbol relative to it.
+ (lang_size_sections_1): Mark if an output section has a symbol
+ symbol relative to it.
+
+2006-09-25 Bob Wilson <bob.wilson@acm.org>
+
+ * ld.texinfo (Options): Update description of local symbols for -X.
+
+2006-09-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3249
+ * scripttempl/elf.sc: Don't combine .gnu.linkonce.d.*personality*
+ and .gnu.linkonce.wi.* sections with .data and .debug_info for
+ relocatable link.
+
+2006-09-20 Kai Tietz <Kai.Tietz@onevision.com>
+
+ * configure.in: Add new target x86_64-pc-mingw64.
+ * configure: Regenerate.
+ * configure.tgt: Add definition of target emulation i386pep.
+ * Makefile.am: Add new target files for target-all.
+ * Makefile.in: Regenerate.
+ * pe-dll.c: Adjust to be inheritable by pep_dll.c as include.
+ Fix memory out of bounds excess for idata relocation section data.
+ * pep-dll.c: Add target specific shared object handling.
+ * pep-dll.h: Add target specific definitions for shared object handling.
+ * emulparams/i386pep.sh: Add new emulation params for target x86_64 coff.
+ * emultempl/pep.em: Add new emulation file for target x86_64 coff.
+ * po/POTFILES.in: Regenerate.
+ * scripttempl/pep.sc: Add linker script template for target x86_64 coff.
+ * NEWS: Mention new target.
+
+2006-09-18 Thiemo Seufer <ths@networkno.de>
+
+ * configure.tgt: Add mips*el-sde-elf* and mips*-sde-elf*
+ configurations.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * emulparams/scoreelf.sh: New file.
+ * emultempl/scoreelf.em: New file.
+ * Makefile.am: Add Score files.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add Score target.
+ * NEWS: Mention new target support.
+
+2006-09-16 Nick Clifton <nickc@redhat.com>
+ Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * ldctor.c: Make use of new STRING_COMMA_LEN and CONST_STRNEQ
+ macros defined in bfd.h.
+ * ldmain.c: Likewise.
+ * ldwrite.c: Likewise.
+ * lexsup.c: Likewise.
+ * pe-dll.c: Likewise.
+ * emultempl/aix.em: Likewise.
+ * emultempl/beos.em: Likewise.
+ * emultempl/elf32.em: Likewise.
+ * emultempl/pe.em: Likewise.
+ * emultempl/sunos.em: Likewise.
+ * emultempl/xtensaelf.em: Likewise.
+
+2006-09-15 Nick Clifton <nickc@redhat.com>
+
+ PR ld/3107
+ * ldlang.c (lang_size_sections_1): Do not abort when encountering
+ a non-empty section that is ignored. Instead produce a warning
+ message.
+
+2006-09-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld.texinfo: Document --dynamic-list-cpp-typeinfo.
+
+2006-09-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (CXX): Set to g++.
+ (CXX_FOR_TARGET): Likewise.
+ * Makefile.in: Regenerated.
+
+ * NEWS: Mention --dynamic-list.
+
+ * ld.texinfo: Document --dynamic-list.
+
+ * ldgram.y: Support dynamic list.
+
+ * ldlang.c (lang_process): Call lang_finalize_version_expr_head
+ on link_info.dynamic if needed.
+ (lang_append_dynamic_list): New.
+ (lang_append_dynamic_list_cpp_typeinfo): New.
+ * ldlang.h (lang_append_dynamic_list): Likewise.
+ * ldlang.h (lang_append_dynamic_list_cpp_typeinfo): Likewise.
+
+ * ldlex.h (input_enum): Add input_dynamic_list.
+ * ldlex.l: Handle it.
+
+ * ldmain.c (main): Initialize link_info.dynamic.
+
+ * lexsup.c (option_values): Add OPTION_DYNAMIC_LIST and
+ OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
+ (ld_options): Add entries for OPTION_DYNAMIC_LIST and
+ OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
+ (parse_args): Handle OPTION_DYNAMIC_LIST and
+ OPTION_DYNAMIC_LIST_CPP_TYPEINFO.
+
+2006-09-07 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * emulparams/h8300elf.sh: _tinydata should not be placed in
+ relocatables.
+ * emulparams/h8300.sh: Likewise.
+ * emulparams/h8300sxelf.sh: Likewise.
+
+2006-09-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3015
+ * emultempl/elf32.em: Enable "-z relro" only if $COMMONPAGESIZE
+ is defined.
+
+2006-08-29 Nathan Sidwell <nathan@codesourcery.com>
+
+ * ldlang.c (walk_wild): Allow * to glob '/' in wildcarded match.
+
+2006-08-28 Alan Modra <amodra@bigpond.net.au>
+
+ * scripttempl/elf.sc: Ensure that crtbegin and crtend entries will
+ not match random object files in a path containing "crtbegin" or
+ "crtend" as part of a directory name.
+ * scripttempl/armbpabi.sc: Likewise.
+ * scripttempl/crisaout.sc: Likewise.
+ * scripttempl/elf32crx.sc: Likewise.
+ * scripttempl/elf32sh-symbian.sc: Likewise.
+ * scripttempl/elf_chaos.sc: Likewise.
+ * scripttempl/elfd10v.sc: Likewise.
+ * scripttempl/elfd30v.sc: Likewise.
+ * scripttempl/elfxtensa.sc: Likewise.
+ * scripttempl/iq2000.sc: Likewise.
+ * scripttempl/mmo.sc: Likewise.
+ * scripttempl/xstormy16.sc: Likewise.
+
+2006-08-24 Bob Wilson <bob.wilson@acm.org>
+
+ * emulparams/elf32xtensa.sh (.xt.prop): Add .xt.prop.*.
+ * scripttempl/elfxtensa.sc (.text): Add .literal.*.
+
+2006-08-24 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * ldlang.c (lang_size_sections_1, lang_assignment_statement_enum):
+ Adjust the current address of DEFAULT_MEMORY_REGION even
+ when dot hasn't changed.
+
+2006-08-23 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (fold_name <LOADADDR>): Return an absolute value
+ rather than a section relative value.
+
+2006-08-22 Alan Modra <amodra@bigpond.net.au>
+
+ * NEWS: Mention LMA default change.
+ * ld.texinfo (Output Section LMA): Update default description.
+ (Location Counter): Clarify backward movement.
+ * ldlang.c (lang_size_sections_1): Leave non-alloc sections with
+ default lma equal to vma. Warn on backward movement of dot.
+
+2006-08-22 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * configure.tgt: Set targ_emul to arm_wince_pe for ARM
+ Windows CE targets.
+
+2006-08-22 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * Makefile.am: Split arm-wince into its own emulation.
+ * Makefile.in: Regenerate.
+ * pe-dll.c : Define PE_ARCH_arm_wince.
+ (pe_detail_list): Add PE_ARCH_arm_wince case.
+ (make_one): Handle PE_ARCH_arm_epoc and PE_ARCH_arm_wince cases.
+ * emulparams/arm_wince_pe.sh: New file.
+ * emultempl/pe.em: Handle new TARGET_IS_arm_wince_pe define.
+ Remap bfd_arm_allocate_interworking_sections,
+ bfd_arm_get_bfd_for_interworking and
+ bfd_arm_process_before_allocation for arm-pe and arm-wince-pe
+ targets too.
+ (gld_${EMULATION_NAME}_recognized_file): Handle arm-wince and
+ arm-epoc bfd format names.
+
+2006-08-18 Paul Brook <paul@codesourcery.com>
+
+ * emultempl/armelf.em (arm_elf_before_allocation): Call
+ gld${EMULATION_NAME}_before_allocation after setting interworking bfd.
+
+2006-08-17 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (autofilter_symbolprefixlist): Remove .idata$.
+ (generate_reloc): Revert to skipping sections without a SEC_LOAD flag,
+ and to not skipping .idata* sections.
+
+2006-08-16 Alan Modra <amodra@bigpond.net.au>
+
+ PR 3052
+ * ldlang.h (lang_output_section_statement_type): Replace
+ "processed" field with "processed_vma" and "processed_lma".
+ * ldlang.c (lang_do_assignments_1): Move lma setting code..
+ (lang_size_sections_1): ..to here.
+ (lang_reset_memory_regions): Adjust for
+ lang_output_section_statement_type change.
+ * ldexp.c (fold_name): Likewise.
+
+2006-08-08 Peter S. Mazinger <ps.m@gmx.net>
+
+ * emulparams/armelf.sh (MAXPAGESIZE): Changed to
+ "CONSTANT (MAXPAGESIZE)".
+
+2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3006
+ * ldlang.c (lang_section_bst_type): Moved to ...
+ * ldlang.h: Here.
+
+ * ldlang.h (lang_wild_statement_struct): Add a tree field.
+
+ * ldlang.c (wild_sort_fast): Use the tree field for BST.
+ (wild): Likeise.
+ (analyze_walk_wild_section_handler): Initialize the tree field.
+
+2006-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/3009
+ * ldlang.c (update_wild_statements): Update the whole wild
+ section list.
+
+2006-08-04 Nick Clifton <nickc@redhat.com>
+ Mike Frysinger <michael.frysinger@analog.com>
+
+ * scripttempl/elf.sc (USER_LABEL_PREFIX): Define.
+ (__preinit_array_start, __preinit_array_end, __init_array_start,
+ __init_array_end, __fini_array_start, __fini_array_end, edata, end):
+ Use ${USER_LABEL_PREFIX}.
+ * emulparams/bfin.sh (DATA_END_SYMBOLS,END_SYMBOLS): Unset.
+ (USER_LABEL_PREFIX): Set.
+
+2006-08-04 Marcelo Tosatti <marcelo@kvack.org>
+
+ * ldmain.c (main): Initialise print_gc_sections field of link_info
+ structure.
+ * lexsup.c: Add --print-gc-sections and --no-print-gc-sections
+ switches.
+ * ld.texinfo: Document new switches.
+ * NEWS: Mention new switches.
+
+2006-08-04 Richard Sandiford <richard@codesourcery.com>
+ Kazu Hirata <kazu@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add eshelf_vxworks.o and
+ eshlelf_vxworks.o.
+ (eshelf_vxworks.c, eshlelf_vxworks.c): New rules.
+ * Makefile.in: Regenerate.
+ * configure.tgt (sh-*-vxworks): Use shelf_vxworks and
+ shlelf_vxworks.
+ * emulparams/shelf_vxworks.sh: New file.
+ * emulparams/shlelf_vxworks.sh: Likewise.
+ * emulparams/vxworks.sh (FINI): Prefix _etext with ${SYMPREFIX}.
+ (OTHER_END_SYMBOLS): Likewise _ehdr.
+ (DATA_END_SYMBOLS): Likewise _edata.
+ * emultempl/vxworks.em (vxworks_after_open): Check whether output_bfd
+ is indeed an ELF file before dealing with --force-dynamic.
+
+2006-08-02 Petr Salinger <Petr.Salinger@seznam.cz>
+
+ PR binutils/2983
+ * emulparams/elf_x86_64_fbsd.sh (OUTPUT_FORMAT): Define as
+ elf64-x86-64-freebsd.
+
+2006-08-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ldlang.c (init_os): Add flags. Replace bfd_make_section with
+ bfd_make_section_with_flags.
+ (exp_init_os): Updated.
+ (lang_add_section): Call init_os with flags.
+ (map_input_to_output_sections): Likewise.
+
+2006-07-29 Richard Sandiford <richard@codesourcery.com>
+
+ * Makefile.am (eelf32b4300.c): Update dependencies.
+ (eelf32bmip.c): Likewise.
+ (eelf32bsmip.c): Likewise.
+ (eelf32btsmip.c): Likewise.
+ (eelf32btsmipn32.c): Likewise.
+ (eelf32ltsmip.c): Likewise.
+ (eelf32ltsmipn32.c): Likewise.
+ (eelf32ebmip.c): Likewise.
+ (eelf32ebmipvxworks.c): Likewise.
+ (eelf32elmip.c): Likewise.
+ (eelf32elmipvxworks.c): Likewise.
+ (eelf32bmipn32.c): Likewise.
+ (eelf32lmip.c): Likewise.
+ (eelf32mipswindiss.c): Likewise.
+ (eelf32lsmip.c): Likewise.
+ (eelf64bmip.c): Likewise.
+ (eelf64btsmip.c): Likewise.
+ (eelf64ltsmip.c): Likewise.
+ (emipsbig.c): Likewise. Canonicalize ${GENSCRIPTS} line.
+ (emipsbsd.c): Likewise.
+ (emipsidt.c): Update dependencies.
+ (emipsidtl.c): Likewise.
+ (emipslit.c): Likewise.
+ (emipslnews.c): Likewise.
+ (emipspe.c): Likewise. Fix ${GENSCRIPTS} invocation.
+ * Makefile.in: Regenerate.
+ * emulparams/elf32bmip.sh (EXTRA_EM_FILE): Define.
+ * emulparams/elf32bmipn32-defs.sh (EXTRA_EM_FILE): Likewise.
+ * emultempl/irix.em: Include emultempl/mipself.em.
+ * emultempl/mipself.em: New file.
+
+2006-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf-generic.em (map_segments): Reorganise loop so that
+ layout happens before segment map. Don't do segment map on
+ relocatable link.
+
+2006-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (fold_name <LOADADDR>): Use the lma.
+ * ldlang.h (lang_memory_region_type): Delete old_length. Add
+ last_os.
+ * ldlang.c (lang_memory_region_lookup): Init new field.
+ (lang_reset_memory_regions): Reset new field.
+ (lang_insert_orphan): Don't set load_base.
+ (lang_leave_overlay): Likewise.
+ (lang_size_sections_1): Delete unnecessary code setting lma_region
+ to region. Correct lma region check.
+ (lang_do_assignments_1): Rename output_section_statement parm
+ to current_os. Set lma from previous section in region.
+
+ * ldlang.c: Formatting.
+
+2006-07-25 Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (xtensa_strip_inconsistent_linkonce_sections):
+ Set discarded section's output_section to bfd_abs_section_ptr.
+
+2006-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (analyze_walk_wild_section_handler): Init handler_data
+ earlier.
+
+2006-07-24 Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): Add space
+ in dep_sec_name for null terminator. Make sure dep_sec_name has a
+ ".t" linkonce tag.
+
+2006-07-14 Michael Wetherell <mike.wetherell@ntlworld.com>
+
+ * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX, ELF_INTERPRETER_NAME):
+ Set for *-*-solaris2*.
+
+2006-07-24 Ralk Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * ld.texinfo: Fix spelling mistakes.
+ * ldint.texinfo: Likewise.
+
+2006-07-23 Sonal Santan <sonal.santan@xilinx.com>
+
+ * ldlang.c (lang_section_bst): New structure for sorting sections
+ by name.
+ (wild_sort_fast): New function: Insert a section into a binary
+ search tree.
+ (output_section_callback_fast): New function: Store a section in
+ BST.
+ (output_section_callback_tree_to_list): New function: Convert a
+ BST into a list.
+ (analyze_walk_wild_section_handler): Initialize handler_data
+ elements.
+ (wild): If the data is sorted by name use the BST method to sort
+ the names.
+
+2006-07-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ld.h (handle_asneeded_cref): Declare.
+ * ldcref.c: Include objalloc.h.
+ (old_table, old_count, old_tab, alloc_mark): New variables.
+ (tabsize, entsize, refsize, old_symcount): Likewise.
+ (add_cref): Use bfd_hash_allocate for refs.
+ (handle_asneeded_cref): New function.
+ * ldmain.c (notice): Call handle_asneeded_cref for NULL name.
+
+2006-07-14 Michael Wetherell <mike.wetherell@ntlworld.com>
+
+ * configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Correct
+ typo setting targ_extra_libpath.
+
+2006-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ * scripttempl/elf.sc: Add .gnu.hash section.
+ * emultempl/elf32.em (OPTION_HASH_STYLE): Define.
+ (gld${EMULATION_NAME}_add_options): Register --hash-style option.
+ (gld${EMULATION_NAME}_handle_option): Handle it.
+ (gld${EMULATION_NAME}_list_options): Document it.
+ * ldmain.c (main): Initialize emit_hash and emit_gnu_hash.
+ * ld.texinfo: Document --hash-style option.
+
+2006-07-10 Nick Clifton <nickc@redhat.com>
+
+ * po/zh_TW.po: New Chinese (traditional) translation.
+ * configure.in (ALL_LINGUAS): Add zh_TW.
+ * configure: Regenerate.
+
+2006-07-07 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2874
+ * ld.texinfo: Remove "Using LD" from the title since it is
+ redundant.
+
+2006-07-06 Mohammed Adnène Trojette <adn@diwi.org>
+
+ PR ld/2877
+ * ld.texinfo: Fix spelling mistakes.
+
+2006-06-27 Pedro Alves <pedro_alves@portugalmail.pt>
+ Nick Clifton <nickc@redhat.com>
+
+ * emultempl/pe.em (gld_$_open_dynamic_archive): Compute maximum
+ length of format strings in the libname_fmt[] array, rather than
+ relying upon a statically chosen value. Adjust xmalloc call to
+ use this longest length.
+
+2006-06-27 Nick Clifton <nickc@redhat.com>
+
+ * ld.texinfo (-rpath-link): Clarify distinction between -rpath and
+ -rpath-link.
+
+2006-06-23 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.tgt (i[3-7]86-*-solaris2*, i[3-7]86-*-solaris*): Set
+ targ_extra_libpath.
+
+2006-06-23 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (pe_details_type): Add new pointer for symbols list
+ autofilter.
+ (autofilter_symbollist): Split into autofilter_symbollist_generic
+ and autofilter_symbollist_i386.
+ (pe_detail_list): Add autofilter_symbollist_i386 to i386 case and
+ autofilter_symbollist_generic for all the others.
+ (autofilter_symbolprefixlist): Moved _fmode, _impure_ptr, cygwin_attach_dll,
+ cygwin_premain0, cygwin_premain1, cygwin_premain2, cygwin_premain3, environ,
+ into autofilter_symbollist_i386.
+ (auto_export): Get autofilter_symbollist from pe_details.
+
+2006-06-22 Nick Clifton <nickc@redhat.com>
+
+ PR ld/2757
+ * emultempl/pe.em (gld_$_after_open): When reporting non PE format
+ output files mention the file name and the fact that it is an
+ output file.
+
+2006-06-22 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_open_dynamic_archive):
+ Restructure. Add native "%s.lib" format to search list
+ * ld.texinfo (node WIN32): Update documentation on dynamic lib
+ search order. Add another reason for using import libs.
+
+2006-06-21 Mark Shinwell <shinwell@codesourcery.com>
+
+ * ldlang.c (lang_insert_orphan): Correctly handle the case where
+ the section is to end up after the section currently at the end
+ of the list in output_bfd.
+
+2006-06-21 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * emultempl/mmo.em: Improve comments. Explain why there's
+ ELF-stuff here.
+
+2006-06-21 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf-generic.em (gld${EMULATION_NAME}_map_segments): Limit
+ loop to ten iterations. Throw away any previous linker generated
+ segment map.
+ * ldlang.c (lang_phdr_list): Make global.
+ * ldlang.h (lang_phdr_list): Declare.
+ * Makefile.am (ELF_GEN_DEPS): Define. Use in emul deps.
+ * Makefile.in: Regenerate.
+
+2006-06-20 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (ELF_DEPS): Define. Use in emul file deps. Fix
+ many ELF emul file deps that incorrectly said they needed elf32.em
+ instead of generic.em. Add genelf.em as required.
+ * Makefile.in: Regenerate.
+ * ldlang.c (lang_process): Call ldemul_finish before
+ lang_check_section_addresses.
+ * emulparams/arcelf.sh: Generic elf target needs genelf.
+ * emulparams/d30v_e.sh: Likewise.
+ * emulparams/d30v_o.sh: Likewise.
+ * emulparams/d30velf.sh: Likewise.
+ * emulparams/elf32_dlx.sh: Likewise.
+ * emulparams/elf32_i860.sh: Likewise.
+ * emulparams/elf32fr30.sh: Likewise.
+ * emulparams/elf32frv.sh: Likewise.
+ * emulparams/elf32iq10.sh: Likewise.
+ * emulparams/elf32iq2000.sh: Likewise.
+ * emulparams/elf32mt.sh: Likewise.
+ * emulparams/mn10200.sh: Likewise.
+ * emulparams/or32.sh: Likewise.
+ * emulparams/or32elf.sh: Likewise.
+ * emulparams/pjelf.sh: Likewise.
+ * emulparams/msp430all.sh: Likewise. Extract common entries.
+ * emulparams/pjlelf.sh: Include pjelf.sh.
+ * emulparams/elf32frvfd.sh (EXTRA_EM_FILE): Unset.
+ * emulparams/mn10300.sh (EXTRA_EM_FILE): Unset.
+ * emultempl/elf-generic.em: New file.
+ * emultempl/genelf.em: New file.
+ * emultempl/elf32.em: Include elf-generic.em.
+ (gld${EMULATION_NAME}_layout_sections_again): Delete.
+ (gld${EMULATION_NAME}_finish): Call gld${EMULATION_NAME}_map_segments.
+ * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
+ (gld${EMULATION_NAME}_finish): Rename from hppaelf_finish. Call
+ gld${EMULATION_NAME}_map_segments.
+ (LDEMUL_FINISH): Update.
+ * emultempl/mmo.em: Correct comment. Include elf-bfd.h and
+ source elf-generic.em.
+ (mmo_finish): Call gld${EMULATION_NAME}_map_segments.
+ * emultempl/ppc64elf.em (ppc_layout_sections_again): Likewise.
+ (gld${EMULATION_NAME}_finish): Rename from ppc_finish. Call
+ gld${EMULATION_NAME}_map_segments.
+ (LDEMUL_FINISH): Update.
+
+2006-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (fold_name): Adjust bfd_sizeof_headers call.
+
+2006-06-14 Kevin F. Quinn <kevquinn@gentoo.org>
+
+ * ld.texinfo: Document new -z lazy option.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Handle
+ new option.
+ (gld${EMULATION_NAME}_list_options): Update help text.
+
+2006-06-12 Fred Fish <fnf@specifix.com>
+
+ * emulparams/elf32bmip.sh (OTHER_SECTIONS): Keep the
+ ".mdebug.<abi>" and ".gcc_compiled_long<size>" sections
+ generated by mips gcc.
+
+2006-06-12 Thiemo Seufer <ths@mips.com>
+
+ * emulparams/elf64bmip.sh, emulparams/elf64btsmip.sh (COMMONPAGESIZE):
+ Define.
+
+2006-06-09 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.h (lang_input_statement_type): Use bitfields for booleans.
+ * ldlang.c (struct out_section_hash_entry): Rename from
+ output_statement_hash_entry. Delete output_section_statement_type
+ entry. Add statement_union_type entry. Adjust all users.
+ (output_section_statement_table): Rename from output_statement_table.
+ Adjust all users.
+ (output_section_statement_newfunc): Rename from
+ output_statement_newfunc. Adjust all users.
+ (output_section_statement_table_init): Rename from
+ output_statement_table_init. Adjust all users.
+ (output_section_statement_table_free): Rename from
+ output_statement_table_free. Adjust all users.
+
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+
+ * po/Make-in (pdf, ps): New dummy targets.
+
+2006-06-07 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.h (enum section_type): Delete dsect_section, copy_section,
+ info_section and overlay_section. Add noalloc_section.
+ * ldlang.c (lang_add_section): Adjust.
+ * ldgram.y (type): Adjust.
+
+2006-06-06 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (init_os): Whitespace.
+ (map_input_to_output_sections): Don't init_os for lang_input_section.
+ (print_all_symbols): Remove forward declaration. Convert to ISO C.
+
+2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/Make-in (top_builddir): Define.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (exp_get_abs_int): Make error message the same as
+ others emitted in this file.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * config.in: Regenerate.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lookup_name): Delete dead code. Remove FIXMEs.
+
+2006-06-03 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (global_found): Make it a pointer.
+ (stat_needed, try_needed): Adjust.
+ (check_needed): Don't skip non-loaded as-needed entries. Only
+ consider entries with both filename and the_bfd non-null.
+ (after_open): Try loading non-loaded as-needed libs to satisfy
+ DT_NEEDED libs.
+
+2006-06-02 Joseph S. Myers <joseph@codesourcery.com>
+
+ * Makefile.am (TEXI2DVI): Add -I $(top_srcdir)/../libiberty.
+ * Makefile.in: Regenerate.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am: Replace INTLLIBS and INTLDEPS with LIBINTL
+ and LIBINTL_DEP everywhere.
+ (INTLLIBS): Remove.
+ (INCLUDES): Use @INCINTL@.
+ * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
+ Remove local code for po/Makefile.
+ * Makefile.in, configure: Regenerated.
+
+2006-05-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emulparams/arcelf.sh (MAXPAGESIZE): Changed to
+ "CONSTANT (MAXPAGESIZE)".
+ * emulparams/armelf_nbsd.sh: Likewise.
+ * emulparams/armelf_vxworks.sh: Likewise.
+ * emulparams/armnto.sh: Likewise.
+ * emulparams/armsymbian.sh: Likewise.
+ * emulparams/crislinux.sh: Likewise.
+ * emulparams/elf32_i860.sh: Likewise.
+ * emulparams/elf32_i960.sh: Likewise.
+ * emulparams/elf32am33lin.sh: Likewise.
+ * emulparams/elf32bfinfd.sh: Likewise.
+ * emulparams/elf32bmipn32-defs.sh: Likewise.
+ * emulparams/elf32frvfd.sh: Likewise.
+ * emulparams/elf32i370.sh: Likewise.
+ * emulparams/elf32lppcnto.sh: Likewise.
+ * emulparams/elf32mcore.sh: Likewise.
+ * emulparams/elf32openrisc.sh: Likewise.
+ * emulparams/elf32ppcnto.sh: Likewise.
+ * emulparams/elf32ppcwindiss.sh: Likewise.
+ * emulparams/elf32vax.sh: Likewise.
+ * emulparams/elf32xc16x.sh: Likewise.
+ * emulparams/elf32xc16xl.sh: Likewise.
+ * emulparams/elf32xc16xs.sh: Likewise.
+ * emulparams/elf64_aix.sh: Likewise.
+ * emulparams/elf64hppa.sh: Likewise.
+ * emulparams/elf64mmix.sh: Likewise.
+ * emulparams/elf_i386_be.sh: Likewise.
+ * emulparams/elf_i386_chaos.sh: Likewise.
+ * emulparams/elf_i386_ldso.sh: Likewise.
+ * emulparams/hppa64linux.sh: Likewise.
+ * emulparams/hppalinux.sh: Likewise.
+ * emulparams/hppaobsd.sh: Likewise.
+ * emulparams/i386lynx.sh: Likewise.
+ * emulparams/i386moss.sh: Likewise.
+ * emulparams/i386nto.sh: Likewise.
+ * emulparams/i386nw.sh: Likewise.
+ * emulparams/m32relf_linux.sh: Likewise.
+ * emulparams/m68kpsos.sh: Likewise.
+ * emulparams/or32elf.sh: Likewise.
+ * emulparams/pjelf.sh: Likewise.
+ * emulparams/pjlelf.sh: Likewise.
+ * emulparams/ppclynx.sh: Likewise.
+ * emulparams/ppcnw.sh: Likewise.
+ * emulparams/shelf32_nbsd.sh : Likewise.
+ * emulparams/shelf_nbsd.sh: Likewise.
+ * emulparams/shelf_nto.sh: Likewise.
+ * emulparams/shlelf_nto.sh: Likewise.
+ * emulparams/xtensa-config.sh: Likewise.
+
+ * emulparams/armelf_linux.sh (MAXPAGESIZE): Changed to
+ "CONSTANT (MAXPAGESIZE)".
+ (COMMONPAGESIZE): Changed to "CONSTANT (COMMONPAGESIZE)".
+ * emulparams/elf32_sparc.sh: Likewise.
+ * emulparams/elf32bmip.sh: Likewise.
+ * emulparams/elf32ppccommon.sh: Likewise.
+ * emulparams/elf64_ia64.sh: Likewise.
+ * emulparams/elf64_s390.sh: Likewise.
+ * emulparams/elf64_sparc.sh: Likewise.
+ * emulparams/elf64alpha.sh: Likewise.
+ * emulparams/elf64ppc.sh: Likewise.
+ * emulparams/elf_i386.sh: Likewise.
+ * emulparams/elf_i386_vxworks.sh: Likewise.
+ * emulparams/elf_s390.sh: Likewise.
+ * emulparams/elf_x86_64.sh: Likewise.
+ * emulparams/shlelf32_linux.sh: Likewise.
+ * emulparams/shlelf_linux.sh: Likewise.
+
+ * emulparams/elf32bmipn32.sh (COMMONPAGESIZE): Changed to
+ "CONSTANT (COMMONPAGESIZE)".
+ * emulparams/elf32btsmipn32.sh: Likewise.
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add
+ "-z max-page-size=" and "-z common-page-size=".
+ (gld${EMULATION_NAME}_list_options): Likewise.
+
+ * ld.h (ld_config_type): Add maxpagesize and commonpagesize.
+
+ * ld.texinfo: Document "-z max-page-size=" and
+ "-z common-page-size=".
+
+ * ldexp.c (exp_print_token): Handle CONSTANT.
+ (fold_name): Likewise.
+ * ldgram.y: Likewise.
+ * ldlex.l: Likewise.
+
+ * ldmain.c (main): Initiliaze config.maxpagesize and
+ config.commonpagesize. Call bfd_emul_set_maxpagesize if
+ config.maxpagesize isn't 0. Call bfd_emul_set_commonpagesize if
+ config.commonpagesize config.maxpagesize isn't 0.
+
+2006-05-30 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2006-05-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emulparams/elf_x86_64.sh (MAXPAGESIZE): Updated to 0x200000.
+
+2006-05-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/1485
+ * configure.in: Use ${srcdir}/../bfd/config.bfd to check 64bit
+ bfd. Support 64bit host for --enable-targets=all.
+ * configure: Regenerated.
+
+2006-05-24 Nick Clifton <nickc@redhat.com>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2006-05-24 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * configure.tgt: Add avr6 to emulation list.
+ * Makefile.am: Add eavr6.o and corresponding rule.
+ * Makefile.in: Regenerate.
+ * emulparams/avr6.sh: New file.
+ * emulparams/avrX.sh (TEMPLATE_NAME): Use elf32 instead of generic
+ for target option support.
+ (EXTRA_EM_FILE): Add reference to new em template file avrelf.
+ * scripttempl/avr.sc: Add ".trampolines" section.
+ * emultempl/avrelf.em: Add new file for target specific options.
+
+2006-05-22 Nick Clifton <nickc@redhat.com>
+
+ * scripttempl/elf32crx.sc (.rdata): Add .rodata.*.
+
+2006-05-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (lang_size_sections_1): Don't check mem regions for
+ os->ignored sections.
+
+2005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * ldlang.c (lang_size_sections): Call lang_reset_memory_regions
+ before redoing one_lang_size_sections_pass.
+
+2006-05-11 Carlos O'Donell <carlos@codesourcery.com>
+
+ * ld.texinfo: Rename "Index" to "LD Index"
+
+2006-05-11 Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * pe-dll.c (autofilter_symbollist): Add Dllmain,
+ DllMainCRTStartup, _DllMainCRTStartup and .text.
+ (autofilter_liblist): Add libcegcc.
+ (autofilter_symbolprefixlist): Add __imp_ and .idata$.
+ (generate_reloc): Do not skip sections without a SEC_LOAD flag,
+ they can still contain relocs that need processing.
+ Skip the .idata$6 section.
+ (jmp_arm_bytes): New array: Contains byte codes for an ARM jump.
+ (make_one): Use the new array.
+ (make_import_fixup_entry): Use .idata$2 instead of .idata$3.
+ * emultempl/pe.em (MajorSubsystemVersion): Set to 3 for armpe.
+
+2006-05-05 Alan Modra <amodra@bigpond.net.au>
+
+ * ld.texinfo: Document PowerPC and PowerPC64 options.
+ * gen-doc.texi: Enable.
+
+2006-05-02 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (AM_MAKEINFOFLAGS): Add libiberty.
+ (TEXI2POD): Use AM_MAKEINFOFLAGS.
+ (configdoc.texi): Don't set top_srcdir.
+ * ld.texinfo: Don't use top_srcdir.
+ * aclocal.m4, Makefile.in: Regenerated.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (wild): Tidy default_common_section loop.
+ (print_input_section): Format.
+
+ * configure: Regenerate.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/POTFILES.in: Regenerated.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config.in: Regenerated.
+
+2006-04-14 David Heine <dlheine@tensilica.com>
+ Bob Wilson <bob.wilson@acm.org>
+
+ * emultempl/xtensaelf.em (elf_xtensa_before_allocation): Call new
+ function to strip inconsistent linkonce sections.
+ (input_section_linked_worker, input_section_linked): New.
+ (is_inconsistent_linkonce_section): New.
+ (xtensa_strip_inconsistent_linkonce_sections): New.
+
+2006-04-11 Diego Pettenò <flameeyes@gentoo.org>
+
+ * emultempl/elf32.em: Add support for elf-hints.h on FreeBSD
+ and Dragonfly targets.
+ * configure.in (AC_CHECK_HEADERS): Add elf-hints.h.
+ * Makefile.am (HFILES): Add elf-hints-local.h.
+ * elf-hints-local.h: New file.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+
+2006-04-07 Bernhard Fischer <aldot@gcc.gnu.org>
+
+ * ld.texinfo: Fix typo in documentation of --check-sections.
+
+2006-04-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * ldlang.c (load_symbols): Set as_needed and add_needed according
+ to the corresponding script's fields while processing it.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.am: Add install-html, install-html-am, and
+ install-html-recursive targets.
+ * Makefile.in: Regenerate.
+ * configure.in: AC_SUBST datarootdir, docdir, htmldir.
+ * configure: Regenerate.
+ * po/Make-in: Add install-html target.
+
+2006-04-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * emultempl/ia64elf.em: Set link_info.relax_pass to 2. Remove
+ link_info.need_relax_finalize.
+
+ * ldlang.c (relax_sections): New.
+ (lang_process): Use. Call relax_sections link_info.relax_pass
+ times.
+
+ * ldmain.c (main): Set link_info.relax_pass to 1. Remove
+ link_info.need_relax_finalize.
+
+2006-04-05 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (GENSCRIPTS): Pass prefix.
+ * Makefile.in: Regenerate.
+ * genscripts.sh: Adjust for extra parameter.
+ * emultempl/elf32.em (parse_ld_so_conf): Return true iff file
+ exists.
+ (check_ld_so_conf): Use ${prefix}/etc/ld.so.conf if it exists.
+ * NEWS: Update.
+
+2006-04-05 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+
+ * configure.tgt (sparc*-*-vxworks*): New stanza.
+ * emulparams/elf32_sparc_vxworks.sh: New file.
+ * Makefile.am (ALL_EMULATIONS): Add eelf32_sparc_vxworks.o.
+ (eelf32_sparc_vxworks.c): New rule.
+ * Makefile.in: Regenerate.
+
+2006-04-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ldlang.c (lang_map): Print the list of discarded input sections.
+ (print_input_section): Change parameter and print zero-sized sections.
+ (print_statement): Adjust call to print_input_section.
+
+2006-04-01 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * deffilep.y (def_image_name): If LIBRARY or NAME statement
+ specifies an empty string, retain the name specified on command
+ line.
+ * ld.texinfo: Document above.
+
+2006-03-31 Jakub Jelinek <jakub@redhat.com>
+
+ * ldmisc.c (vfinfo): Revert 2005-10-05 changes. If
+ bfd_find_nearest_line succeeded for %C or %D, but filename
+ is NULL, print section+offset at the end.
+
+2006-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * emulparams/elf32bfinfd.sh: New file.
+ * emultempl/bfin.em: Delete.
+ * emulparams/bfin.sh: Lose reference to bfin.em.
+ * Makefile.am (eelf32bfin.c): Likewise.
+ (eelf32bfinfd.c): New.
+ * Makefile.in: Regenerate.
+ * configure.tgt (bfin-*-elf, bfin-*-uclinux): Add elf32bfinfd to
+ targ_extra_emuls.
+
+2006-03-22 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Mark Mitchell <mark@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+
+ * configure.tgt (mips*el-*-vxworks*, mips*-*-vxworks*): Use
+ separate VxWorks emulations.
+ * emulparams/elf32ebmipvxworks.sh: New file.
+ * emulparams/elf32elmipvxworks.sh: New file.
+ * Makefile.am (ALL_EMULATIONS): Add eelf32ebmipvxworks.o and
+ eelf32elmipvxworks.o.
+ (eelf32ebmipvxworks.c, eelf32elmipvxworks.c): New rules.
+ * Makefile.in: Regenerate.
+
+2006-03-16 Alan Modra <amodra@bigpond.net.au>
+
+ PR 2434
+ * ldcref.c (add_cref): Adjust bfd_hash_table_init calls.
+ * ldlang.c (output_statement_table_init, lang_init): Likewise.
+ * ldmain.c (add_ysym, add_wrap, add_keepsyms_file): Likewise.
+ (undefined_symbol): Likewise.
+
+2006-03-07 Richard Sandiford <richard@codesourcery.com>
+ Daniel Jacobowitz <dan@codesourcery.com>
+ Zack Weinberg <zack@codesourcery.com>
+ Nathan Sidwell <nathan@codesourcery.com>
+ Paul Brook <paul@codesourcery.com>
+ Ricardo Anguiano <anguiano@codesourcery.com>
+ Phil Edwards <phil@codesourcery.com>
+
+ * emulparams/armelf_vxworks.sh: Include vxworks.sh.
+ (MAXPAGESIZE): Define.
+ * emulparams/vxworks.sh: Undefine EMBEDDED.
+ * Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
+ * Makefile.in: Regenerate.
+
+2006-03-03 Bjoern Haase <bjoern.m.haase@web.de>
+
+ * scripttempl/avr.sc: Add *(.jumptables) *(.lowtext) sections.
+ Add KEEP() directives.
+ Add *(.data*) *(.rodata) and *(.rodata*) and *(.bss*) to .data and
+ .bss output sections.
+
+2006-03-03 Richard Sandiford <richard@codesourcery.com>
+
+ * emulparams/vxworks.sh (VXWORKS_BASE_EM_FILE): New variable.
+ (EXTRA_EM_FILE): Define.
+ * emultempl/vxworks.em: New file.
+ * ld.texinfo (--force-dynamic): Document.
+ * Makefile.am (eelf32ppcvxworks.cm, eelf_i386_vxworks.c): Depend
+ on vxworks.em.
+ * Makefile.in: Regenerate.
+
+2006-03-02 Richard Sandiford <richard@codesourcery.com>
+
+ * emulparams/elf32ppccommon.sh: New file, extracted from...
+ * emulparams/elf32ppc.sh: ...here.
+ * emulparams/elf32ppcvxworks.sh: Include elf32ppccommon.sh
+ instead of elf32ppc.sh.
+ (BSS_PLT): Remove override.
+ * Makefile.am (eelf32lppc.c): Depend on elf32ppccommons.h.
+ (eelf32lppcnto.c, eelf32lppcsim.c, eelf32ppcnto.c): Likewise.
+ (eelf32ppc.c, eelf32ppc_fbsd.c, eelf32ppcsimm): Likewise.
+ (eelf32ppclinux.c): Likewise.
+ (eelf32ppcvxworks.c): Likewise. Add missing vxworks.sh dependency.
+ * Makefile.in: Regenerate.
+
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.am: Add html target.
+ * Makefile.in: Regenerate.
+ * po/Make-in: Add html target.
+
+2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
+
+ * scripttemp/elf32xc16x.sc: Default linker script for tiny model.
+ * scripttemp/elf32xc16xl.sc: Default linker script for large model.
+ * scripttemp/elf32xc16xs.sc: Default linker script for small model.
+ * emulparams/elf32xc16x.sh: Emulation script for tiny model.
+ * emulparams/elf32xc16xl.sh: Emulation script for large model.
+ * emulparams/elf32xc16xs.sh: Emulation script for small model.
+ * Makefile.am: Add entry to make xc16x target.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Specify default and other emulation parameters
+ for xc16x.
+ * NEWS: Announce the support for the new target.
+
+2006-02-16 Nick Hudson <nick.hudson@dsl.pipex.com>
+
+ * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
+ Use the traditional target.
+
+2006-02-13 Joseph S. Myers <joseph@codesourcery.com>
+
+ * configure.tgt (arm*b-*-linux-gnueabi): Change to
+ arm*b-*-linux-*eabi.
+ (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi.
+
+2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/2290
+ * NEWS: Updated for the Linux linker search order change.
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_after_open): Call
+ gld${EMULATION_NAME}_check_ld_so_conf before checking default
+ search directories for DT_NEEDED entries.
+
+2006-02-07 Paul Brook <paul@codesourcery.com>
+
+ * emultempl/armelf.em: Include elf/arm.h.
+ (arm_elf_finish): Set low address bit if enty point is a Thumb
+ function.
+
+2006-02-01 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * deffilep.y (def_image_name): If the image name does not have
+ a suffix, append the default.
+ * ld.texinfo: Document NAME, LIBRARY usage in PE-COFF .def files.
+
+2006-01-31 Danny Smith dannysmith@users.sourceforge.net
+
+ * NEWS: Mention support for forward exports in PE-COFF dll's.
+ * ld.texinfo: Expand documentation of EXPORT statements in
+ PE-COFF .def files.
+
+2006-01-31 Filip Navara <navaraf@reactos.com>
+
+ * deffile.h (struct def_file_export): Add field flag_forward.
+ * pe-dll.c (process_def_file): Check for forward exports.
+ (generate_edata): Generate forward export symbols.
+ (fill_edata): Emit them.
+
+ * pe-dll.c (process_def_file): Don't crash on malformed
+ fastcall symbol names in .def file.
+
+2006-01-30 Nick Clifton <nickc@redhat.com>
+
+ * po/vi.po: Updated Vietnamese translation.
+
+2006-01-27 Yitzchak Scott-Thoennes <sthoenna@efn.org>
+
+ * pe-dll.c (pe_dll_generate_implib): Issue "Creating library
+ file:" as informational message, not a warning.
+
+2006-01-18 Roger Sayle <roger@eyesopen.com>
+
+ * emultempl/irix.em: Use lbasename instead of basename.
+
+2006-01-16 Nick Clifton <nickc@redhat.com>
+
+ * po/zh_CN.po: New Chinese (simplified) translation.
+ * configure.in (ALL_LINGUAS): Add "zh_CH".
+ * configure: Regenerate.
+
+2006-01-16 Bernhard Fischer <aldot@gcc.gnu.org>
+
+ * ld.texinfo (Options): Fix typo.
+
+For older changes see ChangeLog-2005
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
index 3f5d1a6..72dd649 100644
--- a/contrib/binutils/ld/Makefile.am
+++ b/contrib/binutils/ld/Makefile.am
@@ -1,9 +1,7 @@
## Process this file with automake to generate Makefile.in
-## FIXME: work around apparent automake bug.
-INTLLIBS = @INTLLIBS@
-
AUTOMAKE_OPTIONS = cygnus dejagnu
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = po
@@ -76,31 +74,36 @@ CC_FOR_TARGET = ` \
fi; \
fi`
-CXX = gcc
+CXX = g++
CXX_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
+ if [ -f $$r/../gcc/g++ ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
+ echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
+ echo $$r/../gcc/g++ -B$$r/../gcc/; \
fi; \
else \
if [ "@host@" = "@target@" ] ; then \
echo $(CXX); \
else \
- echo gcc | sed '$(transform)'; \
+ echo g++ | sed '$(transform)'; \
fi; \
fi`
noinst_PROGRAMS = ld-new
info_TEXINFOS = ld.texinfo
+ld_TEXINFOS = configdoc.texi
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
-AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../libiberty
-TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../libiberty
+AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
+ -I $(top_srcdir)/../libiberty
+TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
+ -I $(top_srcdir)/../libiberty
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(datadir)/locale\""
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
+ @INCINTL@ $(HDEFINES) $(CFLAGS) \
+ -DLOCALEDIR="\"$(datadir)/locale\""
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
@@ -111,6 +114,7 @@ ALL_EMULATIONS = \
ealpha.o \
earcelf.o \
earm_epoc_pe.o \
+ earm_wince_pe.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
@@ -133,8 +137,10 @@ ALL_EMULATIONS = \
eavr3.o \
eavr4.o \
eavr5.o \
+ eavr6.o \
ecoff_i860.o \
ecoff_sparc.o \
+ eelf32_spu.o \
ecrisaout.o \
ecriself.o \
ecrislinux.o \
@@ -151,6 +157,7 @@ ALL_EMULATIONS = \
eelf32b4300.o \
eelf32bfin.o \
eelf32bfinfd.o \
+ eelf32cr16.o \
eelf32cr16c.o \
eelf32bmip.o \
eelf32bmipn32.o \
@@ -176,6 +183,7 @@ ALL_EMULATIONS = \
eelf32lppcsim.o \
eelf32m32c.o \
eelf32mcore.o \
+ eelf32mep.o \
eelf32mipswindiss.o \
eelf32mt.o \
eelf32openrisc.o \
@@ -241,6 +249,7 @@ ALL_EMULATIONS = \
ei386nw.o \
ei386pe.o \
ei386pe_posix.o \
+ ei386pep.o \
elnk960.o \
em32relf.o \
em32rlelf.o \
@@ -341,6 +350,7 @@ ALL_EMULATIONS = \
eppcpe.o \
eppclynx.o \
eriscix.o \
+ escoreelf.o \
esh.o \
eshelf32.o \
eshlelf32.o \
@@ -355,6 +365,9 @@ ALL_EMULATIONS = \
eshlelf_nbsd.o \
eshelf_nto.o \
eshlelf_nto.o \
+ eshelf_uclinux.o \
+ eshelf_vxworks.o \
+ eshlelf_vxworks.o \
eshl.o \
eshlelf.o \
eshlsymbian.o \
@@ -410,15 +423,16 @@ ALL_64_EMULATIONS = \
ALL_EMUL_EXTRA_OFILES = \
deffilep.o \
- pe-dll.o
+ pe-dll.o \
+ pep-dll.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
- mri.c ldcref.c pe-dll.c
+ mri.c ldcref.c pe-dll.c pep-dll.c
HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h deffile.h pe-dll.h elf-hints-local.h
+ ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h elf-hints-local.h
GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
@@ -455,6 +469,10 @@ ldmain.o: ldmain.c config.status
-DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
$(srcdir)/ldmain.c
+eelf32_spu.o: eelf32_spu.c
+ $(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
+ eelf32_spu.c
+
ldemul-list.h: Makefile
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
for f in `echo " " ${EMULATION_OFILES} "" \
@@ -477,6 +495,8 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
+ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em
+ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em
@TDIRS@
@@ -496,55 +516,55 @@ ealpha.c: $(srcdir)/emulparams/alpha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
${GENSCRIPTS} alpha "$(tdir_alpha)"
earcelf.c: $(srcdir)/emulparams/arcelf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} arcelf "$(tdir_arcelf)"
earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf "$(tdir_armelf)"
earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb "$(tdir_armelfb)"
earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_fbsd "$(tdir_armelf_fbsd)"
earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)"
earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
$(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_linux_eabi "$(tdir_armelfb_linux_abi)"
earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
$(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/vxworks.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
$(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
${GEN_DEPENDS}
${GENSCRIPTS} armelf_vxworks "$(tdir_armelf)"
@@ -561,40 +581,47 @@ earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
earmnto.c: $(srcdir)/emulparams/armnto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnto "$(tdir_armnto)"
earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
+earm_wince_pe.c: $(srcdir)/emulparams/arm_wince_pe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} arm_wince_pe "$(tdir_armpe)"
earmpe.c: $(srcdir)/emulparams/armpe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} armpe "$(tdir_armpe)"
earmsymbian.c: $(srcdir)/emulparams/armsymbian.sh \
- $(srcdir)/emulparams/armelf.sh $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emulparams/armelf.sh $(ELF_DEPS) \
$(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/armbpabi.sc \
${GEN_DEPENDS}
${GENSCRIPTS} armsymbian "$(tdir_armelf)"
-eavr2.c: $(srcdir)/emulparams/avr2.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr2.c: $(srcdir)/emulparams/avr2.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr2 "$(tdir_avr2)"
-eavr1.c: $(srcdir)/emulparams/avr1.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr1 "$(tdir_avr2)"
-eavr3.c: $(srcdir)/emulparams/avr3.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr3 "$(tdir_avr2)"
-eavr4.c: $(srcdir)/emulparams/avr4.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr4 "$(tdir_avr2)"
-eavr5.c: $(srcdir)/emulparams/avr5.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr5 "$(tdir_avr2)"
+eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr6 "$(tdir_avr2)"
ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
@@ -605,332 +632,381 @@ 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/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} crislinux "$(tdir_cris)"
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30velf "$(tdir_d30v)"
ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30v_o "$(tdir_d30v)"
ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30v_e "$(tdir_d30v)"
edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)"
eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
- $(srcdir)/emultempl/elf32.em \
+ $(ELF_DEPS) \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh $(srcdir)/emulparams/bfin.sh \
- $(srcdir)/emultempl/elf32.em \
+ $(ELF_DEPS) \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bfinfd "$(tdir_elf32bfinfd)" elf32bfinfd
eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xc16x "$(tdir_xc16x)"
eelf32xc16xl.c: $(srcdir)/emulparams/elf32xc16xl.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xc16xl "$(tdir_xc16xl)"
eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xc16xs "$(tdir_xc16xs)"
eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)"
eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh \
- $(srcdir)/emulparams/xtensa-config.sh $(srcdir)/emultempl/elf32.em \
+eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
$(srcdir)/emultempl/xtensaelf.em $(INCDIR)/xtensa-config.h \
$(BFDDIR)/elf-bfd.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/xtensa.h \
$(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)"
eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32frv "$(tdir_frv)"
+eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
+ $(srcdir)/emulparams/elf32frv.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
+eelf32mep.c: $(srcdir)/emulparams/elf32mep.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/mep.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mep "$(tdir_mep)"
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/vxworks.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
+eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
+ $(srcdir)/emultempl/spu_ovl.o \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)"
+$(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
+ cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
+ if ../gas/as-new --version \
+ | grep 'target.*spu' >/dev/null 2>/dev/null; then \
+ ../gas/as-new -o $@ spu_ovl.s; \
+ fi
eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
+eelf32cr16.c: $(srcdir)/emulparams/elf32cr16.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/cr16elf.em \
+ $(srcdir)/scripttempl/elf32cr16.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32cr16 "$(tdir_elf32crx)"
eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
- $(srcdir)/emultempl/elf32.em \
+ $(ELF_DEPS) \
$(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) $(srcdir)/emultempl/irix.em \
+ $(srcdir)/emultempl/mipself.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}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/crxelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
$(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32crx "$(tdir_elf32crx)"
eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
$(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
- $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32btsmipn32.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32ebmipvxworks.c: $(srcdir)/emulparams/elf32ebmipvxworks.sh \
- $(srcdir)/emulparams/elf32ebmip.sh $(srcdir)/emulparams/vxworks.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/vxworks.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmipvxworks "$(tdir_elf32ebmipvxworks)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
- $(srcdir)/emulparams/elf32elmip.sh $(srcdir)/emulparams/vxworks.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/vxworks.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.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}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.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}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
+eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32m32c "$(tdir_m32c)"
+eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mt "$(tdir_mt)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
$(srcdir)/emulparams/elf32ppccommon.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcnto "$(tdir_elf32lppcnto)"
eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
$(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
eelf32ppcvxworks.c: $(srcdir)/emulparams/elf32ppcvxworks.sh \
$(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emulparams/vxworks.sh \
- $(srcdir)/emultempl/vxworks.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcvxworks "$(tdir_elf32ppcvxworks)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(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}
+ ldemul-list.h \
+ $(ELF_DEPS) $(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}
+ ldemul-list.h \
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq2000 "$(tdir_iq2000)"
eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/alphaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
$(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/alphaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha_fbsd "$(tdir_elf64alpha_fbsd)"
eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
$(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/alphaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.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}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(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/ia64elf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
$(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
$(srcdir)/emulparams/elf64_ia64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/ia64elf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
$(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64_fbsd "$(tdir_elf64_ia64_fbsd)"
eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
$(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
- $(srcdir)/emulparams/elf32bmipn32.sh $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.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 \
+ $(ELF_DEPS) $(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)/emultempl/generic.em $(srcdir)/emultempl/elf-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}
+ $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.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}
+ $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
$(srcdir)/emulparams/elf_x86_64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
$(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_fbsd "$(tdir_elf_i386_fbsd)"
eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_vxworks "$(tdir_elf_i386_vxworks)"
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
@@ -960,31 +1036,31 @@ eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxn "$(tdir_h8300sxn)"
eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300self "$(tdir_h8300self)"
eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300hnelf "$(tdir_h8300hnelf)"
eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)"
eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
eh8500.c: $(srcdir)/emulparams/h8500.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
@@ -1008,24 +1084,24 @@ ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
$(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -1046,13 +1122,13 @@ ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386linux "$(tdir_i386linux)"
ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
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/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
@@ -1061,10 +1137,10 @@ ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nto "$(tdir_i386nto)"
ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nw "$(tdir_i386nw)"
ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
@@ -1072,23 +1148,26 @@ ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
+ei386pep.c: $(srcdir)/emulparams/i386pep.sh \
+ $(srcdir)/emultempl/pep.em $(srcdir)/scripttempl/pep.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386pep "$(tdir_i386pe)"
elnk960.c: $(srcdir)/emulparams/lnk960.sh \
$(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
@@ -1104,12 +1183,12 @@ em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
$(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(ELF_DEPS) $(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 \
+ $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
@@ -1119,7 +1198,7 @@ em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
@@ -1130,270 +1209,270 @@ emaxqcoff.c: $(srcdir)/emulparams/maxqcoff.sh \
emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
-emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsbig
-emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsbsd
-emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/emultempl/generic.em \
+emipsbig.c: $(srcdir)/emulparams/mipsbig.sh $(srcdir)/emultempl/generic.em \
$(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbig "$(tdir_mipsbig)"
+emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbsd "$(tdir_mipsbsd)"
+emipsidt.c: $(srcdir)/emulparams/mipsidt.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
-emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/emultempl/generic.em \
- $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
-emipslit.c: $(srcdir)/emulparams/mipslit.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+emipslit.c: $(srcdir)/emulparams/mipslit.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipslit "$(tdir_mipslit)"
-emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
+emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslnews
-emipspe.c: $(srcdir)/emulparams/mipspe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipspe "$(tdir_mips)"
+ ${GENSCRIPTS} mipslnews "$(tdir_mipslnews)"
+emipspe.c: $(srcdir)/emulparams/mipspe.sh $(srcdir)/emultempl/pe.em \
+ $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipspe "$(tdir_mipspe)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \
$(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
emn10200.c: $(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
emsp430x1610.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1610 "$(tdir_msp430x1610)" msp430all
emsp430x1611.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1611 "$(tdir_msp430x1611)" msp430all
emsp430x1612.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all
emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x2101 "$(tdir_msp430x2101)" msp430all
emsp430x2111.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all
emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x2121 "$(tdir_msp430x2121)" msp430all
emsp430x2131.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all
emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
emsp430x415.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x415 "$(tdir_msp430x415)" msp430all
emsp430x417.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x417 "$(tdir_msp430x417)" msp430all
emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
emsp430xG437.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xG437 "$(tdir_msp430xG437)" msp430all
emsp430xG438.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xG438 "$(tdir_msp430xG438)" msp430all
emsp430xG439.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xG439 "$(tdir_msp430xG439)" msp430all
emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
enews.c: $(srcdir)/emulparams/news.sh \
@@ -1407,7 +1486,7 @@ eor32.c: $(srcdir)/emulparams/or32.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32 "$(tdir_or32)"
eor32elf.c: $(srcdir)/emulparams/or32elf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32elf "$(tdir_or32elf)"
epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -1416,111 +1495,127 @@ 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}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjelf "$(tdir_pjelf)"
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+epjlelf.c: $(srcdir)/emulparams/pjlelf.sh $(srcdir)/emulparams/pjelf.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppclynx "$(tdir_ppclynx)"
eriscix.c: $(srcdir)/emulparams/riscix.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} riscix "$(tdir_riscix)"
+escoreelf.c: $(srcdir)/emulparams/scoreelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/scoreelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} scoreelf "$(tdir_scoreelf)"
esh.c: $(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} sh "$(tdir_sh)"
eshelf.c: $(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf "$(tdir_shelf)"
eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
$(srcdir)/emulparams/shlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
+eshelf_vxworks.c: $(srcdir)/emulparams/shelf_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc \
+ $(srcdir)/emultempl/vxworks.em ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_vxworks "$(tdir_shelf_vxworks)"
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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
+eshlelf_vxworks.c: $(srcdir)/emulparams/shlelf_vxworks.sh \
+ $(srcdir)/emulparams/shelf_vxworks.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf_vxworks "$(tdir_shlelf_vxworks)"
+eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_uclinux "$(tdir_shelf_uclinux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
eshlsymbian.c: $(srcdir)/emulparams/shlsymbian.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlsymbian "$(tdir_shlelf)"
eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
$(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
$(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
$(srcdir)/emulparams/shelf64_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emulparams/sh.sh \
@@ -1581,7 +1676,7 @@ evsta.c: $(srcdir)/emulparams/vsta.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} vsta "$(tdir_vsta)"
ev850.c: $(srcdir)/emulparams/v850.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
${GENSCRIPTS} v850 "$(tdir_v850)"
ew65.c: $(srcdir)/emulparams/w65.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
@@ -1596,25 +1691,14 @@ ez8001.c: $(srcdir)/emulparams/z8001.sh \
ez8002.c: $(srcdir)/emulparams/z8002.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
${GENSCRIPTS} z8002 "$(tdir_z8002)"
-eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
- $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
-eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32m32c "$(tdir_m32c)"
-eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mt "$(tdir_mt)"
# We need this for automake to use YLWRAP.
EXTRA_ld_new_SOURCES = deffilep.y
ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
-ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
-ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL_DEP)
+ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
@@ -1636,7 +1720,7 @@ check-DEJAGNU: site.exp
CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
+ LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
$(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
@@ -1703,17 +1787,10 @@ configdoc.texi: ${DOCVER}-doc.texi
cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
chmod u+w ./configdoc.texi
-ldver.texi: $(srcdir)/../bfd/configure
- rm -f $@
- eval `grep '^ *VERSION=' $(srcdir)/../bfd/configure`; \
- echo "@set VERSION $$VERSION" > $@
-
-$(srcdir)/ld.info ld.dvi ld.html: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
-
# 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 configdoc.texi ldver.texi
+ld.1: $(srcdir)/ld.texinfo configdoc.texi
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
-($(POD2MAN) ld.pod | \
@@ -1722,7 +1799,7 @@ ld.1: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
(rm -f $@.T$$$$ && exit 1)
rm -f ld.pod
-MAINTAINERCLEANFILES = ldver.texi configdoc.texi
+MAINTAINERCLEANFILES = configdoc.texi
# We want to reconfigure if configure.host or configure.tgt changes. We
# extract version from bfd/configure.in, so we must depend on that also.
@@ -1733,7 +1810,7 @@ MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
mostlyclean-local:
-rm -rf tmpdir
-CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s
.PHONY: install-html install-html-am install-html-recursive
@@ -1812,11 +1889,11 @@ install-data-local: install-info
# Stuff that should be included in a distribution. The diststuff
# target is run by the taz target in ../Makefile.in.
-EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
+EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o $(man_MANS)
diststuff: info $(EXTRA_DIST)
all: info ld.1
-# Both info (ld.info) and ld.1 depend on configdoc.texi and ldver.texi.
+# Both info (ld.info) and ld.1 depend on configdoc.texi.
# But info isn't a direct target. Make info-recursive to depend on
# ld.1 to support parallel build.
info-recursive: ld.1
@@ -1825,6 +1902,15 @@ DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
distclean-local:
rm -rf ldscripts
+MAINTAINERCLEANFILES += ld.info
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+if GENINSRC_NEVER
+DISTCLEANFILES += ld.info
+endif
+
# 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
@@ -1872,83 +1958,93 @@ 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 \
- $(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 config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.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 \
- $(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 \
+ldctor.o: ldctor.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldexp.h \
+ ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
+ldemul.o: ldemul.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldmisc.h ldexp.h ldlang.h \
+ ldfile.h ldemul.h ldmain.h ldemul-list.h
+ldexp.o: ldexp.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
+ ldlex.h ldgram.h ldlang.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/safe-ctype.h
-ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.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 $(INCDIR)/filenames.h
-ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.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 \
+ldfile.o: ldfile.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h ldlex.h \
+ ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h
+ldlang.o: ldlang.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h \
- $(INCDIR)/hashtab.h
-ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.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 ldexp.h ldlang.h ldgram.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h
+ldmain.o: ldmain.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
+ ld.h ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
ldlex.h ldfile.h ldemul.h ldctor.h
-ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/bfdlink.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 $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
-ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ../bfd/bfdver.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 \
- $(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.o: ldmisc.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+ldver.o: ldver.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ../bfd/bfdver.h ld.h ldver.h ldexp.h ldlang.h ldfile.h \
+ ldemul.h ldmain.h
+ldwrite.o: ldwrite.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h
-lexsup.o: lexsup.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.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 \
- $(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 \
- $(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 \
+lexsup.o: lexsup.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ../bfd/bfdver.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
+ ldver.h ldemul.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
+mri.o: mri.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ld.h ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
+ldcref.o: ldcref.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/objalloc.h \
+ ld.h ldmain.h ldmisc.h ldexp.h ldlang.h
+pe-dll.o: pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
+ ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h
+pep-dll.o: pep-dll.c pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h deffile.h pe-dll.h
-ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.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)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
- ldmisc.h ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h \
- ldmain.h $(INCDIR)/libiberty.h
-deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.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
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h \
+ pep-dll.h
+ldgram.o: ldgram.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.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 sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h ldmain.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+deffilep.o: deffilep.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ld.h ldmisc.h deffile.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/ld/Makefile.in b/contrib/binutils/ld/Makefile.in
index e75b3c7..861822f 100644
--- a/contrib/binutils/ld/Makefile.in
+++ b/contrib/binutils/ld/Makefile.in
@@ -40,20 +40,31 @@ build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
noinst_PROGRAMS = ld-new$(EXEEXT)
+
+# Automake 1.9 will only build info files in the objdir if they are
+# mentioned in DISTCLEANFILES. It doesn't have to be unconditional,
+# though, so we use a bogus condition.
+@GENINSRC_NEVER_TRUE@am__append_1 = ld.info
DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub NEWS \
README ChangeLog $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
$(srcdir)/config.in $(srcdir)/../mkinstalldirs \
$(top_srcdir)/po/Make-in ldgram.h ldgram.c ldlex.c deffilep.h \
deffilep.c $(srcdir)/../ylwrap $(srcdir)/../ltmain.sh \
- $(srcdir)/../config.guess $(srcdir)/../config.sub
+ $(srcdir)/../config.guess $(srcdir)/../config.sub \
+ $(ld_TEXINFOS)
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../bfd/acinclude.m4 \
- $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
+ $(top_srcdir)/../bfd/warning.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -76,11 +87,11 @@ depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
LTLEXCOMPILE = $(LIBTOOL) --mode=compile $(LEX) $(LFLAGS) $(AM_LFLAGS)
@@ -89,7 +100,7 @@ LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \
$(AM_YFLAGS)
YLWRAP = $(top_srcdir)/../ylwrap
SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
-INFO_DEPS = $(srcdir)/ld.info
+INFO_DEPS = ld.info
TEXINFO_TEX = $(top_srcdir)/../texinfo/texinfo.tex
am__TEXINFO_TEX_DIR = $(top_srcdir)/../texinfo
DVIS = ld.dvi
@@ -117,10 +128,10 @@ DEJATOOL = $(PACKAGE)
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
DIST_SUBDIRS = $(SUBDIRS)
ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
+AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -136,6 +147,7 @@ CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -145,28 +157,30 @@ EMULATION_LIBPATH = @EMULATION_LIBPATH@
EMULATION_OFILES = @EMULATION_OFILES@
EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
EXEEXT = @EXEEXT@
-GMOFILES = @GMOFILES@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GENINSRC_NEVER_FALSE = @GENINSRC_NEVER_FALSE@
+GENINSRC_NEVER_TRUE = @GENINSRC_NEVER_TRUE@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
+GREP = @GREP@
HDEFINES = @HDEFINES@
#stuff for self hosting (can be overridden in config file).
HOSTING_CRT0 = @HOSTING_CRT0@
HOSTING_LIBS = @HOSTING_LIBS@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = `if [ -f ../flex/flex ]; then echo ../flex/flex; else echo @LEX@; fi`
LEXLIB = @LEXLIB@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -187,7 +201,9 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
NATIVE_LIB_DIRS = @NATIVE_LIB_DIRS@
+NM = @NM@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -197,9 +213,9 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRINGIFY = @STRINGIFY@
@@ -209,13 +225,14 @@ TARGET_SYSTEM_ROOT_DEFINE = @TARGET_SYSTEM_ROOT_DEFINE@
# This is the real libbfd.a created by libtool.
TESTBFDLIB = @TESTBFDLIB@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
XGETTEXT = @XGETTEXT@
YACC = `if [ -f ../bison/bison ]; then echo ../bison/bison -y -L$(srcdir)/../bison/; else echo @YACC@; fi`
+ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
@@ -244,10 +261,10 @@ htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -263,6 +280,7 @@ target_os = @target_os@
target_vendor = @target_vendor@
use_sysroot = @use_sysroot@
AUTOMAKE_OPTIONS = cygnus dejagnu
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = po
tooldir = $(exec_prefix)/$(target_alias)
YFLAGS = -d
@@ -307,28 +325,36 @@ CC_FOR_TARGET = ` \
fi; \
fi`
-CXX = gcc
+CXX = g++
CXX_FOR_TARGET = ` \
- if [ -f $$r/../gcc/xgcc ] ; then \
+ if [ -f $$r/../gcc/g++ ] ; then \
if [ -f $$r/../newlib/Makefile ] ; then \
- echo $$r/../gcc/xgcc -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
+ echo $$r/../gcc/g++ -B$$r/../gcc/ -idirafter $$r/../newlib/targ-include -idirafter $${srcroot}/../newlib/libc/include -nostdinc; \
else \
- echo $$r/../gcc/xgcc -B$$r/../gcc/; \
+ echo $$r/../gcc/g++ -B$$r/../gcc/; \
fi; \
else \
if [ "@host@" = "@target@" ] ; then \
echo $(CXX); \
else \
- echo gcc | sed '$(transform)'; \
+ echo g++ | sed '$(transform)'; \
fi; \
fi`
info_TEXINFOS = ld.texinfo
+ld_TEXINFOS = configdoc.texi
noinst_TEXINFOS = ldint.texinfo
man_MANS = ld.1
-AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../libiberty
-TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I $(top_srcdir)/../libiberty
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) -I$(top_srcdir)/../intl -I../intl $(HDEFINES) $(CFLAGS) -DLOCALEDIR="\"$(datadir)/locale\""
+AM_MAKEINFOFLAGS = -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
+ -I $(top_srcdir)/../libiberty
+
+TEXI2DVI = texi2dvi -I $(srcdir) -I $(BFDDIR)/doc -I ../bfd/doc \
+ -I $(top_srcdir)/../libiberty
+
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(BFDDIR) -I$(INCDIR) \
+ @INCINTL@ $(HDEFINES) $(CFLAGS) \
+ -DLOCALEDIR="\"$(datadir)/locale\""
+
BFDLIB = ../bfd/libbfd.la
LIBIBERTY = ../libiberty/libiberty.a
ALL_EMULATIONS = \
@@ -337,6 +363,7 @@ ALL_EMULATIONS = \
ealpha.o \
earcelf.o \
earm_epoc_pe.o \
+ earm_wince_pe.o \
earmaoutb.o \
earmaoutl.o \
earmcoff.o \
@@ -359,8 +386,10 @@ ALL_EMULATIONS = \
eavr3.o \
eavr4.o \
eavr5.o \
+ eavr6.o \
ecoff_i860.o \
ecoff_sparc.o \
+ eelf32_spu.o \
ecrisaout.o \
ecriself.o \
ecrislinux.o \
@@ -377,6 +406,7 @@ ALL_EMULATIONS = \
eelf32b4300.o \
eelf32bfin.o \
eelf32bfinfd.o \
+ eelf32cr16.o \
eelf32cr16c.o \
eelf32bmip.o \
eelf32bmipn32.o \
@@ -402,6 +432,7 @@ ALL_EMULATIONS = \
eelf32lppcsim.o \
eelf32m32c.o \
eelf32mcore.o \
+ eelf32mep.o \
eelf32mipswindiss.o \
eelf32mt.o \
eelf32openrisc.o \
@@ -468,6 +499,7 @@ ALL_EMULATIONS = \
ei386nw.o \
ei386pe.o \
ei386pe_posix.o \
+ ei386pep.o \
elnk960.o \
em32relf.o \
em32rlelf.o \
@@ -568,6 +600,7 @@ ALL_EMULATIONS = \
eppcpe.o \
eppclynx.o \
eriscix.o \
+ escoreelf.o \
esh.o \
eshelf32.o \
eshlelf32.o \
@@ -582,6 +615,9 @@ ALL_EMULATIONS = \
eshlelf_nbsd.o \
eshelf_nto.o \
eshlelf_nto.o \
+ eshelf_uclinux.o \
+ eshelf_vxworks.o \
+ eshlelf_vxworks.o \
eshl.o \
eshlelf.o \
eshlsymbian.o \
@@ -637,15 +673,16 @@ ALL_64_EMULATIONS = \
ALL_EMUL_EXTRA_OFILES = \
deffilep.o \
- pe-dll.o
+ pe-dll.o \
+ pep-dll.o
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
- mri.c ldcref.c pe-dll.c
+ mri.c ldcref.c pe-dll.c pep-dll.c
HFILES = ld.h ldctor.h ldemul.h ldexp.h ldfile.h \
ldlang.h ldlex.h ldmain.h ldmisc.h ldver.h \
- ldwrite.h mri.h deffile.h pe-dll.h elf-hints-local.h
+ ldwrite.h mri.h deffile.h pe-dll.h pep-dll.h elf-hints-local.h
GENERATED_CFILES = ldgram.c ldlex.c deffilep.c
GENERATED_HFILES = ldgram.h ldemul-list.h deffilep.h
@@ -663,15 +700,17 @@ POTFILES = $(CFILES) $(HFILES) $(EMULATION_FILES)
# These all start with e so 'make clean' can find them.
GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
+ELF_DEPS = $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/elf-generic.em
+ELF_GEN_DEPS = $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/elf-generic.em $(srcdir)/emultempl/genelf.em
# We need this for automake to use YLWRAP.
EXTRA_ld_new_SOURCES = deffilep.y
ld_new_SOURCES = ldgram.y ldlex.l lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c
-ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLDEPS)
-ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
-MAINTAINERCLEANFILES = ldver.texi configdoc.texi
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL_DEP)
+ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
+MAINTAINERCLEANFILES = configdoc.texi ld.info
# We want to reconfigure if configure.host or configure.tgt changes. We
# extract version from bfd/configure.in, so we must depend on that also.
@@ -681,33 +720,33 @@ 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
-CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
+CLEANFILES = dep.sed DEP DEPA DEP1 DEP2 spu_ovl.s
html__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
# Stuff that should be included in a distribution. The diststuff
# target is run by the taz target in ../Makefile.in.
-EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
-DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
+EXTRA_DIST = ldgram.c ldgram.h ldlex.c emultempl/spu_ovl.o $(man_MANS)
+DISTCLEANFILES = tdirs site.exp site.bak stringify.sed $(am__append_1)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-.SUFFIXES: .c .dvi .html .info .l .lo .o .obj .pdf .ps .texinfo .y
+.SUFFIXES: .c .dvi .l .lo .o .obj .ps .y
am--refresh:
@:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
- cd $(srcdir) && $(AUTOMAKE) --foreign \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --cygnus '; \
+ cd $(srcdir) && $(AUTOMAKE) --cygnus \
&& exit 0; \
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile'; \
cd $(top_srcdir) && \
- $(AUTOMAKE) --foreign Makefile
+ $(AUTOMAKE) --cygnus Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -798,42 +837,38 @@ clean-libtool:
distclean-libtool:
-rm -f libtool
-.texinfo.info:
+ld.info: ld.texinfo $(ld_TEXINFOS)
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
- am__cwd=`pwd` && cd $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
- cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $@ $<; \
+ -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo; \
then \
rc=0; \
- cd $(srcdir); \
else \
rc=$$?; \
- cd $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
-.texinfo.dvi:
+ld.dvi: ld.texinfo $(ld_TEXINFOS)
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2DVI) $<
+ $(TEXI2DVI) -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo
-.texinfo.pdf:
+ld.pdf: ld.texinfo $(ld_TEXINFOS)
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
- $(TEXI2PDF) $<
+ $(TEXI2PDF) -o $@ `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo
-.texinfo.html:
+ld.html: ld.texinfo $(ld_TEXINFOS)
rm -rf $(@:.html=.htp)
if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
- -o $(@:.html=.htp) $<; \
+ -o $(@:.html=.htp) `test -f 'ld.texinfo' || echo '$(srcdir)/'`ld.texinfo; \
then \
rm -rf $@; \
if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
@@ -843,10 +878,6 @@ distclean-libtool:
rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
exit 1; \
fi
-$(srcdir)/ld.info: ld.texinfo
-ld.dvi: ld.texinfo
-ld.pdf: ld.texinfo
-ld.html: ld.texinfo
.dvi.ps:
TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $<
@@ -1274,6 +1305,10 @@ ldmain.o: ldmain.c config.status
-DTARGET='"@target@"' @TARGET_SYSTEM_ROOT_DEFINE@ \
$(srcdir)/ldmain.c
+eelf32_spu.o: eelf32_spu.c
+ $(COMPILE) -c -DEMBEDSPU="\"`echo embedspu | sed '$(transform)'`\"" \
+ eelf32_spu.c
+
ldemul-list.h: Makefile
(echo "/* This file is automatically generated. DO NOT EDIT! */";\
for f in `echo " " ${EMULATION_OFILES} "" \
@@ -1310,55 +1345,55 @@ ealpha.c: $(srcdir)/emulparams/alpha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/alpha.sc ${GEN_DEPENDS}
${GENSCRIPTS} alpha "$(tdir_alpha)"
earcelf.c: $(srcdir)/emulparams/arcelf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} arcelf "$(tdir_arcelf)"
earmelf.c: $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf "$(tdir_armelf)"
earmelfb.c: $(srcdir)/emulparams/armelfb.sh $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb "$(tdir_armelfb)"
earmelf_fbsd.c: $(srcdir)/emulparams/armelf_fbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_fbsd "$(tdir_armelf_fbsd)"
earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
earmelf_linux_eabi.c: $(srcdir)/emulparams/armelf_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux_eabi "$(tdir_armelf_linux_abi)"
earmelfb_linux.c: $(srcdir)/emulparams/armelfb_linux.sh \
$(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_linux "$(tdir_armelfb_linux)"
earmelfb_linux_eabi.c: $(srcdir)/emulparams/armelfb_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux_eabi.sh \
$(srcdir)/emulparams/armelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_linux_eabi "$(tdir_armelfb_linux_abi)"
earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
earmelfb_nbsd.c: $(srcdir)/emulparams/armelfb_nbsd.sh \
$(srcdir)/emulparams/armelf_nbsd.sh \
$(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelfb_nbsd "$(tdir_armelfb_nbsd)"
earmelf_vxworks.c: $(srcdir)/emulparams/armelf_vxworks.sh \
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/armelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/vxworks.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/vxworks.em \
$(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/elf.sc \
${GEN_DEPENDS}
${GENSCRIPTS} armelf_vxworks "$(tdir_armelf)"
@@ -1375,40 +1410,47 @@ earmnbsd.c: $(srcdir)/emulparams/armnbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnbsd "$(tdir_armnbsd)"
earmnto.c: $(srcdir)/emulparams/armnto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armnto "$(tdir_armnto)"
earm_epoc_pe.c: $(srcdir)/emulparams/arm_epoc_pe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/epocpe.sc ${GEN_DEPENDS}
${GENSCRIPTS} arm_epoc_pe "$(tdir_armpe)"
+earm_wince_pe.c: $(srcdir)/emulparams/arm_wince_pe.sh \
+ $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} arm_wince_pe "$(tdir_armpe)"
earmpe.c: $(srcdir)/emulparams/armpe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} armpe "$(tdir_armpe)"
earmsymbian.c: $(srcdir)/emulparams/armsymbian.sh \
- $(srcdir)/emulparams/armelf.sh $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emulparams/armelf.sh $(ELF_DEPS) \
$(srcdir)/emultempl/armelf.em $(srcdir)/scripttempl/armbpabi.sc \
${GEN_DEPENDS}
${GENSCRIPTS} armsymbian "$(tdir_armelf)"
-eavr2.c: $(srcdir)/emulparams/avr2.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr2.c: $(srcdir)/emulparams/avr2.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr2 "$(tdir_avr2)"
-eavr1.c: $(srcdir)/emulparams/avr1.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr1.c: $(srcdir)/emulparams/avr1.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr1 "$(tdir_avr2)"
-eavr3.c: $(srcdir)/emulparams/avr3.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr3.c: $(srcdir)/emulparams/avr3.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr3 "$(tdir_avr2)"
-eavr4.c: $(srcdir)/emulparams/avr4.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr4.c: $(srcdir)/emulparams/avr4.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr4 "$(tdir_avr2)"
-eavr5.c: $(srcdir)/emulparams/avr5.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/avr.sc \
+eavr5.c: $(srcdir)/emulparams/avr5.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
${GEN_DEPENDS}
${GENSCRIPTS} avr5 "$(tdir_avr2)"
+eavr6.c: $(srcdir)/emulparams/avr6.sh $(srcdir)/emultempl/avrelf.em \
+ $(ELF_DEPS) $(srcdir)/scripttempl/avr.sc \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} avr6 "$(tdir_avr2)"
ecoff_i860.c: $(srcdir)/emulparams/coff_i860.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i860coff.sc ${GEN_DEPENDS}
${GENSCRIPTS} coff_i860 "$(tdir_coff_i860)"
@@ -1419,332 +1461,381 @@ 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/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} crislinux "$(tdir_cris)"
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30velf "$(tdir_d30v)"
ed30v_o.c: $(srcdir)/emulparams/d30v_o.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30v_o "$(tdir_d30v)"
ed30v_e.c: $(srcdir)/emulparams/d30v_e.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elfd30v.sc ${GEN_DEPENDS}
${GENSCRIPTS} d30v_e "$(tdir_d30v)"
edelta68.c: $(srcdir)/emulparams/delta68.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/delta68.sc ${GEN_DEPENDS}
${GENSCRIPTS} delta68 "$(tdir_delta68)"
eelf32bfin.c: $(srcdir)/emulparams/bfin.sh \
- $(srcdir)/emultempl/elf32.em \
+ $(ELF_DEPS) \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bfin "$(tdir_elf32bfin)" bfin
eelf32bfinfd.c: $(srcdir)/emulparams/elf32bfinfd.sh $(srcdir)/emulparams/bfin.sh \
- $(srcdir)/emultempl/elf32.em \
+ $(ELF_DEPS) \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bfinfd "$(tdir_elf32bfinfd)" elf32bfinfd
eelf32_dlx.c: $(srcdir)/emulparams/elf32_dlx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/dlx.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_dlx "$(tdir_elf32_dlx)"
eelf32xc16x.c: $(srcdir)/emulparams/elf32xc16x.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xc16x "$(tdir_xc16x)"
eelf32xc16xl.c: $(srcdir)/emulparams/elf32xc16xl.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xc16xl "$(tdir_xc16xl)"
eelf32xc16xs.c: $(srcdir)/emulparams/elf32xc16xs.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xc16xs "$(tdir_xc16xs)"
eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/xstormy16.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
eelf32am33lin.c: $(srcdir)/emulparams/elf32am33lin.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32am33lin "$(tdir_mn10300)"
eelf32vax.c: $(srcdir)/emulparams/elf32vax.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32vax "$(tdir_elf32vax)"
-eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh \
- $(srcdir)/emulparams/xtensa-config.sh $(srcdir)/emultempl/elf32.em \
+eelf32xtensa.c: $(srcdir)/emulparams/elf32xtensa.sh $(ELF_DEPS) \
$(srcdir)/emultempl/xtensaelf.em $(INCDIR)/xtensa-config.h \
$(BFDDIR)/elf-bfd.h $(BFDDIR)/libbfd.h $(INCDIR)/elf/xtensa.h \
$(srcdir)/scripttempl/elfxtensa.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32xtensa "$(tdir_elf32xtensa)"
eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
eelf32frv.c: $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32frv "$(tdir_frv)"
+eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
+ $(srcdir)/emulparams/elf32frv.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
eelf32mcore.c: $(srcdir)/emulparams/elf32mcore.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mcore "$(tdir_mcore)"
+eelf32mep.c: $(srcdir)/emulparams/elf32mep.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/mep.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mep "$(tdir_mep)"
em32relf.c: $(srcdir)/emulparams/m32relf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf "$(tdir_m32r)"
em32rlelf.c: $(srcdir)/emulparams/m32rlelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32rlelf "$(tdir_m32rlelf)"
em32relf_linux.c: $(srcdir)/emulparams/m32relf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32relf_linux "$(tdir_m32relf_linux)"
em32rlelf_linux.c: $(srcdir)/emulparams/m32rlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m32rlelf_linux "$(tdir_m32rlelf_linux)"
eelf32_sparc.c: $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc "$(tdir_elf32_sparc)"
eelf32_sparc_vxworks.c: $(srcdir)/emulparams/elf32_sparc_vxworks.sh \
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emulparams/elf32_sparc.sh \
- $(srcdir)/emultempl/vxworks.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_sparc_vxworks "$(tdir_elf32_sparc_vxworks)"
+eelf32_spu.c: $(srcdir)/emulparams/elf32_spu.sh $(srcdir)/emultempl/spuelf.em \
+ $(srcdir)/emultempl/spu_ovl.o \
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32_spu "$(tdir_elf32_spu)"
+$(srcdir)/emultempl/spu_ovl.o: @MAINT@ $(srcdir)/emultempl/spu_ovl.S
+ cpp -DOVLY_IRQ_SAVE $(srcdir)/emultempl/spu_ovl.S spu_ovl.s
+ if ../gas/as-new --version \
+ | grep 'target.*spu' >/dev/null 2>/dev/null; then \
+ ../gas/as-new -o $@ spu_ovl.s; \
+ fi
eelf32_i860.c: $(srcdir)/emulparams/elf32_i860.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32_i860 "$(tdir_elf32_i860)"
eelf32_i960.c: $(srcdir)/emulparams/elf32_i960.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
+eelf32cr16.c: $(srcdir)/emulparams/elf32cr16.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/cr16elf.em \
+ $(srcdir)/scripttempl/elf32cr16.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32cr16 "$(tdir_elf32crx)"
eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
- $(srcdir)/emultempl/elf32.em \
+ $(ELF_DEPS) \
$(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
-eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) $(srcdir)/emultempl/irix.em \
+ $(srcdir)/emultempl/mipself.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}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/crxelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/crxelf.em \
$(srcdir)/scripttempl/elf32crx.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32crx "$(tdir_elf32crx)"
eelf32btsmipn32.c: $(srcdir)/emulparams/elf32btsmipn32.sh \
- $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmipn32 "$(tdir_elf32btsmipn32)"
eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
$(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ltsmipn32.c: $(srcdir)/emulparams/elf32ltsmipn32.sh \
- $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32btsmipn32.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmipn32 "$(tdir_elf32ltsmipn32)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
- $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32ebmipvxworks.c: $(srcdir)/emulparams/elf32ebmipvxworks.sh \
- $(srcdir)/emulparams/elf32ebmip.sh $(srcdir)/emulparams/vxworks.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/vxworks.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmipvxworks "$(tdir_elf32ebmipvxworks)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmip "$(tdir_elf32elmip)"
eelf32elmipvxworks.c: $(srcdir)/emulparams/elf32elmipvxworks.sh \
- $(srcdir)/emulparams/elf32elmip.sh $(srcdir)/emulparams/vxworks.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/vxworks.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mipself.em \
+ $(srcdir)/emultempl/vxworks.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32elmipvxworks "$(tdir_elf32elmipvxworks)"
eelf32bmipn32.c: $(srcdir)/emulparams/elf32bmipn32.sh \
- $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.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}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.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}
+ $(srcdir)/emulparams/elf32bmip.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
-eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32mipswindiss "$(tdir_elf32mipswindiss)"
+eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
+ $(ELF_DEPS) $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32m32c "$(tdir_m32c)"
+eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32mt "$(tdir_mt)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
$(srcdir)/emulparams/elf32ppccommon.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcnto.c: $(srcdir)/emulparams/elf32lppcnto.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcnto "$(tdir_elf32lppcnto)"
eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
$(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32ppcnto.c: $(srcdir)/emulparams/elf32ppcnto.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcnto "$(tdir_elf32ppcnto)"
eelf32ppcwindiss.c: $(srcdir)/emulparams/elf32ppcwindiss.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcwindiss "$(tdir_elf32ppcwindiss)"
eelf32ppcvxworks.c: $(srcdir)/emulparams/elf32ppcvxworks.sh \
$(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emulparams/vxworks.sh \
- $(srcdir)/emultempl/vxworks.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/vxworks.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcvxworks "$(tdir_elf32ppcvxworks)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
$(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/emultempl/mipself.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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emulparams/elf32ppccommon.sh $(srcdir)/emultempl/ppc32elf.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ldemul-list.h \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppc_fbsd.c: $(srcdir)/emulparams/elf32ppc_fbsd.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc_fbsd "$(tdir_elf32ppc_fbsd)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
$(srcdir)/emulparams/elf32ppc.sh $(srcdir)/emulparams/elf32ppccommon.sh \
- $(srcdir)/emultempl/ppc32elf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/ppc32elf.em $(ELF_DEPS) \
+ ldemul-list.h \
$(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}
+ ldemul-list.h \
+ $(ELF_DEPS) $(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}
+ ldemul-list.h \
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elfi370.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32i370 "$(tdir_elf32i370)"
eelf32ip2k.c: $(srcdir)/emulparams/elf32ip2k.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/ip2k.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ip2k "$(tdir_ip2k)"
eelf32iq2000.c: $(srcdir)/emulparams/elf32iq2000.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq2000 "$(tdir_iq2000)"
eelf32iq10.c: $(srcdir)/emulparams/elf32iq10.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/iq2000.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32iq10 "$(tdir_iq10)"
eelf64alpha.c: $(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/alphaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha "$(tdir_elf64alpha)"
eelf64alpha_fbsd.c: $(srcdir)/emulparams/elf64alpha_fbsd.sh \
$(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/alphaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64alpha_fbsd "$(tdir_elf64alpha_fbsd)"
eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
$(srcdir)/emulparams/elf64alpha.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/alphaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/alphaelf.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}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(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/ia64elf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
$(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
eelf64_ia64_fbsd.c: $(srcdir)/emulparams/elf64_ia64_fbsd.sh \
$(srcdir)/emulparams/elf64_ia64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/ia64elf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/ia64elf.em \
$(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64_fbsd "$(tdir_elf64_ia64_fbsd)"
eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc "$(tdir_elf64_sparc)"
eelf64_sparc_fbsd.c: $(srcdir)/emulparams/elf64_sparc_fbsd.sh \
$(srcdir)/emulparams/elf64_sparc.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_sparc_fbsd "$(tdir_elf64_sparc_fbsd)"
eelf64bmip.c: $(srcdir)/emulparams/elf64bmip.sh \
- $(srcdir)/emulparams/elf32bmipn32.sh $(srcdir)/emultempl/irix.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/irix.em $(srcdir)/emultempl/mipself.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 \
+ $(ELF_DEPS) $(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)/emultempl/generic.em $(srcdir)/emultempl/elf-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}
+ $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.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}
+ $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf64bmip-defs.sh \
+ $(srcdir)/emulparams/elf32bmipn32-defs.sh $(ELF_DEPS) \
+ $(srcdir)/emultempl/mipself.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386 "$(tdir_elf_i386)"
eelf_x86_64.c: $(srcdir)/emulparams/elf_x86_64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64 "$(tdir_elf_x86_64)"
eelf_x86_64_fbsd.c: $(srcdir)/emulparams/elf_x86_64_fbsd.sh \
$(srcdir)/emulparams/elf_x86_64.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_x86_64_fbsd "$(tdir_elf_x86_64_fbsd)"
eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_be "$(tdir_elf_i386_be)"
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \
$(srcdir)/emulparams/elf_i386.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_fbsd "$(tdir_elf_i386_fbsd)"
eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
eelf_i386_vxworks.c: $(srcdir)/emulparams/elf_i386_vxworks.sh \
$(srcdir)/emulparams/vxworks.sh $(srcdir)/emultempl/vxworks.em \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_vxworks "$(tdir_elf_i386_vxworks)"
eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
@@ -1774,31 +1865,31 @@ eh8300sxn.c: $(srcdir)/emulparams/h8300sxn.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300sxn.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxn "$(tdir_h8300sxn)"
eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300self "$(tdir_h8300self)"
eh8300hnelf.c: $(srcdir)/emulparams/h8300hnelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300hnelf "$(tdir_h8300hnelf)"
eh8300snelf.c: $(srcdir)/emulparams/h8300snelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300snelf "$(tdir_h8300snelf)"
eh8300sxelf.c: $(srcdir)/emulparams/h8300sxelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxelf "$(tdir_h8300sxelf)"
eh8300sxnelf.c: $(srcdir)/emulparams/h8300sxnelf.sh \
$(srcdir)/emulparams/h8300elf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300sxnelf "$(tdir_h8300sxnelf)"
eh8500.c: $(srcdir)/emulparams/h8500.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
@@ -1822,24 +1913,24 @@ ehp3hpux.c: $(srcdir)/emulparams/hp3hpux.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} hp3hpux "$(tdir_hp3hpux)"
ehppaelf.c: $(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/hppaelf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppaelf "$(tdir_hppaelf)"
ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppalinux "$(tdir_hppalinux)"
ehppanbsd.c: $(srcdir)/emulparams/hppanbsd.sh \
$(srcdir)/emulparams/hppaelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppanbsd "$(tdir_hppanbsd)"
ehppaobsd.c: $(srcdir)/emulparams/hppaobsd.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \
+ $(ELF_DEPS) $(srcdir)/emultempl/hppaelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppaobsd "$(tdir_hppaobsd)"
ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)"
ei386aout.c: $(srcdir)/emulparams/i386aout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -1863,13 +1954,13 @@ ei386linux.c: $(srcdir)/emulparams/i386linux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386linux "$(tdir_i386linux)"
ei386lynx.c: $(srcdir)/emulparams/i386lynx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386lynx "$(tdir_i386lynx)"
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/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
@@ -1878,10 +1969,10 @@ ei386nbsd.c: $(srcdir)/emulparams/i386nbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nbsd "$(tdir_i386nbsd)"
ei386nto.c: $(srcdir)/emulparams/i386nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nto "$(tdir_i386nto)"
ei386nw.c: $(srcdir)/emulparams/i386nw.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386nw "$(tdir_i386nw)"
ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
@@ -1889,23 +1980,26 @@ ei386pe.c: $(srcdir)/emulparams/i386pe.sh \
ei386pe_posix.c: $(srcdir)/emulparams/i386pe_posix.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386pe_posix "$(tdir_i386pe_posix)"
+ei386pep.c: $(srcdir)/emulparams/i386pep.sh \
+ $(srcdir)/emultempl/pep.em $(srcdir)/scripttempl/pep.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} i386pep "$(tdir_i386pe)"
elnk960.c: $(srcdir)/emulparams/lnk960.sh \
$(srcdir)/emultempl/lnk960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} lnk960 "$(tdir_lnk960)"
em68hc11elf.c: $(srcdir)/emulparams/m68hc11elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc11elf "$(tdir_m68hc11)"
em68hc11elfb.c: $(srcdir)/emulparams/m68hc11elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc11.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc11elfb "$(tdir_m68hc11b)"
em68hc12elf.c: $(srcdir)/emulparams/m68hc12elf.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc12elf "$(tdir_m68hc12)"
em68hc12elfb.c: $(srcdir)/emulparams/m68hc12elfb.sh \
- $(srcdir)/emultempl/m68hc1xelf.em $(srcdir)/emultempl/elf32.em \
+ $(srcdir)/emultempl/m68hc1xelf.em $(ELF_DEPS) \
$(srcdir)/scripttempl/elfm68hc12.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68hc12elfb "$(tdir_m68hc12b)"
em68k4knbsd.c: $(srcdir)/emulparams/m68k4knbsd.sh \
@@ -1921,12 +2015,12 @@ em68kcoff.c: $(srcdir)/emulparams/m68kcoff.sh \
$(srcdir)/emultempl/m68kcoff.em $(srcdir)/scripttempl/m68kcoff.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kcoff "$(tdir_m68kcoff)"
em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(ELF_DEPS) $(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 \
+ $(ELF_DEPS) $(srcdir)/emultempl/m68kelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
@@ -1936,7 +2030,7 @@ em68knbsd.c: $(srcdir)/emulparams/m68knbsd.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68knbsd "$(tdir_m68knbsd)"
em68kpsos.c: $(srcdir)/emulparams/m68kpsos.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/psos.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kpsos "$(tdir_m68kpsos)"
em88kbcs.c: $(srcdir)/emulparams/m88kbcs.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/m88kbcs.sc ${GEN_DEPENDS}
@@ -1947,270 +2041,270 @@ emaxqcoff.c: $(srcdir)/emulparams/maxqcoff.sh \
emcorepe.c: $(srcdir)/emulparams/mcorepe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
${GENSCRIPTS} mcorepe "$(tdir_mcorepe)"
-emipsbig.c: $(srcdir)/emulparams/mipsbig.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsbig
-emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipsbsd
-emipsidt.c: $(srcdir)/emulparams/mipsidt.sh \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/emultempl/generic.em \
+emipsbig.c: $(srcdir)/emulparams/mipsbig.sh $(srcdir)/emultempl/generic.em \
$(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbig "$(tdir_mipsbig)"
+emipsbsd.c: $(srcdir)/emulparams/mipsbsd.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mipsbsd.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipsbsd "$(tdir_mipsbsd)"
+emipsidt.c: $(srcdir)/emulparams/mipsidt.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} mipsidt "$(tdir_mipsidt)"
-emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh \
- $(srcdir)/emultempl/mipsecoff.em $(srcdir)/emultempl/generic.em \
- $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+emipsidtl.c: $(srcdir)/emulparams/mipsidtl.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/emultempl/mipsecoff.em $(srcdir)/scripttempl/mips.sc \
+ ${GEN_DEPENDS}
${GENSCRIPTS} mipsidtl "$(tdir_mipsidtl)"
-emipslit.c: $(srcdir)/emulparams/mipslit.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
+emipslit.c: $(srcdir)/emulparams/mipslit.sh $(srcdir)/emultempl/generic.em \
+ $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
${GENSCRIPTS} mipslit "$(tdir_mipslit)"
-emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
+emipslnews.c: $(srcdir)/emulparams/mipslnews.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/mips.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipslnews
-emipspe.c: $(srcdir)/emulparams/mipspe.sh \
- $(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} mipspe "$(tdir_mips)"
+ ${GENSCRIPTS} mipslnews "$(tdir_mipslnews)"
+emipspe.c: $(srcdir)/emulparams/mipspe.sh $(srcdir)/emultempl/pe.em \
+ $(srcdir)/scripttempl/pe.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mipspe "$(tdir_mipspe)"
emn10300.c: $(srcdir)/emulparams/mn10300.sh \
$(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
emn10200.c: $(srcdir)/emulparams/mn10200.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10200 "$(tdir_mn10200)"
emsp430x110.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x110 "$(tdir_msp430x110)" msp430all
emsp430x112.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x112 "$(tdir_msp430x112)" msp430all
emsp430x1101.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1101 "$(tdir_msp430x1101)" msp430all
emsp430x1111.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1111 "$(tdir_msp430x1111)" msp430all
emsp430x1121.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1121 "$(tdir_msp430x1121)" msp430all
emsp430x1122.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1122 "$(tdir_msp430x1122)" msp430all
emsp430x1132.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1132 "$(tdir_msp430x1132)" msp430all
emsp430x122.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x122 "$(tdir_msp430x122)" msp430all
emsp430x123.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x123 "$(tdir_msp430x123)" msp430all
emsp430x1222.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1222 "$(tdir_msp430x1222)" msp430all
emsp430x1232.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1232 "$(tdir_msp430x1232)" msp430all
emsp430x133.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x133 "$(tdir_msp430x133)" msp430all
emsp430x135.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x135 "$(tdir_msp430x135)" msp430all
emsp430x1331.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1331 "$(tdir_msp430x1331)" msp430all
emsp430x1351.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1351 "$(tdir_msp430x1351)" msp430all
emsp430x147.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x147 "$(tdir_msp430x147)" msp430all
emsp430x148.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x148 "$(tdir_msp430x148)" msp430all
emsp430x149.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x149 "$(tdir_msp430x149)" msp430all
emsp430x155.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x155 "$(tdir_msp430x155)" msp430all
emsp430x156.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x156 "$(tdir_msp430x156)" msp430all
emsp430x157.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x157 "$(tdir_msp430x157)" msp430all
emsp430x167.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x167 "$(tdir_msp430x167)" msp430all
emsp430x168.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x168 "$(tdir_msp430x168)" msp430all
emsp430x169.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x169 "$(tdir_msp430x169)" msp430all
emsp430x1610.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1610 "$(tdir_msp430x1610)" msp430all
emsp430x1611.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1611 "$(tdir_msp430x1611)" msp430all
emsp430x1612.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x1612 "$(tdir_msp430x1612)" msp430all
emsp430x2101.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x2101 "$(tdir_msp430x2101)" msp430all
emsp430x2111.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x2111 "$(tdir_msp430x2111)" msp430all
emsp430x2121.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x2121 "$(tdir_msp430x2121)" msp430all
emsp430x2131.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x2131 "$(tdir_msp430x2131)" msp430all
emsp430x311.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x311 "$(tdir_msp430x311)" msp430all
emsp430x312.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x312 "$(tdir_msp430x312)" msp430all
emsp430x313.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x313 "$(tdir_msp430x313)" msp430all
emsp430x314.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x314 "$(tdir_msp430x314)" msp430all
emsp430x315.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x315 "$(tdir_msp430x315)" msp430all
emsp430x323.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x323 "$(tdir_msp430x323)" msp430all
emsp430x325.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x325 "$(tdir_msp430x325)" msp430all
emsp430x336.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x336 "$(tdir_msp430x336)" msp430all
emsp430x337.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430_3.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430_3.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x337 "$(tdir_msp430x337)" msp430all
emsp430x412.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x412 "$(tdir_msp430x412)" msp430all
emsp430x413.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x413 "$(tdir_msp430x413)" msp430all
emsp430x415.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x415 "$(tdir_msp430x415)" msp430all
emsp430x417.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x417 "$(tdir_msp430x417)" msp430all
emsp430xE423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE423 "$(tdir_msp430xE423)" msp430all
emsp430xE425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE425 "$(tdir_msp430xE425)" msp430all
emsp430xE427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xE427 "$(tdir_msp430xE427)" msp430all
emsp430xW423.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW423 "$(tdir_msp430xW423)" msp430all
emsp430xW425.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW425 "$(tdir_msp430xW425)" msp430all
emsp430xW427.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xW427 "$(tdir_msp430xW427)" msp430all
emsp430xG437.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xG437 "$(tdir_msp430xG437)" msp430all
emsp430xG438.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xG438 "$(tdir_msp430xG438)" msp430all
emsp430xG439.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430xG439 "$(tdir_msp430xG439)" msp430all
emsp430x435.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x435 "$(tdir_msp430x435)" msp430all
emsp430x436.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x436 "$(tdir_msp430x436)" msp430all
emsp430x437.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x437 "$(tdir_msp430x437)" msp430all
emsp430x447.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x447 "$(tdir_msp430x447)" msp430all
emsp430x448.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x448 "$(tdir_msp430x448)" msp430all
emsp430x449.c: $(srcdir)/emulparams/msp430all.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf32msp430.sc \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf32msp430.sc \
${GEN_DEPENDS}
${GENSCRIPTS} msp430x449 "$(tdir_msp430x449)" msp430all
enews.c: $(srcdir)/emulparams/news.sh \
@@ -2224,7 +2318,7 @@ eor32.c: $(srcdir)/emulparams/or32.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/or32.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32 "$(tdir_or32)"
eor32elf.c: $(srcdir)/emulparams/or32elf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} or32elf "$(tdir_or32elf)"
epc532macha.c: $(srcdir)/emulparams/pc532macha.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
@@ -2233,111 +2327,127 @@ 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}
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjelf "$(tdir_pjelf)"
-epjlelf.c: $(srcdir)/emulparams/pjlelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+epjlelf.c: $(srcdir)/emulparams/pjlelf.sh $(srcdir)/emulparams/pjelf.sh \
+ $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjlelf "$(tdir_pjlelf)"
eppcmacos.c: $(srcdir)/emulparams/ppcmacos.sh \
$(srcdir)/emultempl/aix.em $(srcdir)/scripttempl/aix.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppcmacos "$(tdir_ppcmacos)"
eppcnw.c: $(srcdir)/emulparams/ppcnw.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/nw.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppcnw "$(tdir_ppcnw)"
eppcpe.c: $(srcdir)/emulparams/ppcpe.sh \
$(srcdir)/emultempl/pe.em $(srcdir)/scripttempl/ppcpe.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppcpe "$(tdir_ppcpe)"
eppclynx.c: $(srcdir)/emulparams/ppclynx.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} ppclynx "$(tdir_ppclynx)"
eriscix.c: $(srcdir)/emulparams/riscix.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} riscix "$(tdir_riscix)"
+escoreelf.c: $(srcdir)/emulparams/scoreelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/scoreelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} scoreelf "$(tdir_scoreelf)"
esh.c: $(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} sh "$(tdir_sh)"
eshelf.c: $(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf "$(tdir_shelf)"
eshelf32.c: $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32 "$(tdir_shelf32)"
eshelf32_linux.c: $(srcdir)/emulparams/shelf32_linux.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32_linux "$(tdir_shelf32_linux)"
eshelf32_nbsd.c: $(srcdir)/emulparams/shelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf32_nbsd "$(tdir_shelf32_nbsd)"
eshelf64.c: $(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64 "$(tdir_shelf64)"
eshelf64_nbsd.c: $(srcdir)/emulparams/shelf64_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf64_nbsd "$(tdir_shelf64_nbsd)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
$(srcdir)/emulparams/shlelf_linux.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
eshelf_nto.c: $(srcdir)/emulparams/shelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_nto "$(tdir_shelf_nto)"
+eshelf_vxworks.c: $(srcdir)/emulparams/shelf_vxworks.sh \
+ $(srcdir)/emulparams/vxworks.sh $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc \
+ $(srcdir)/emultempl/vxworks.em ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_vxworks "$(tdir_shelf_vxworks)"
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}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
eshlelf_nto.c: $(srcdir)/emulparams/shlelf_nto.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_nto "$(tdir_shlelf_nto)"
+eshlelf_vxworks.c: $(srcdir)/emulparams/shlelf_vxworks.sh \
+ $(srcdir)/emulparams/shelf_vxworks.sh $(srcdir)/emulparams/vxworks.sh \
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc $(srcdir)/emultempl/vxworks.em \
+ ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf_vxworks "$(tdir_shlelf_vxworks)"
+eshelf_uclinux.c: $(srcdir)/emulparams/shelf_uclinux.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_uclinux "$(tdir_shelf_uclinux)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
eshlsymbian.c: $(srcdir)/emulparams/shlsymbian.sh \
$(srcdir)/emulparams/shelf.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf32sh-symbian.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlsymbian "$(tdir_shlelf)"
eshlelf32.c: $(srcdir)/emulparams/shlelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h $(srcdir)/emulparams/shelf32.sh \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32 "$(tdir_shlelf32)"
eshlelf32_linux.c: $(srcdir)/emulparams/shlelf32_linux.sh \
$(srcdir)/emulparams/shelf32_linux.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32_linux "$(tdir_shlelf32_linux)"
eshlelf32_nbsd.c: $(srcdir)/emulparams/shlelf32_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
$(BFDDIR)/libbfd.h $(INCDIR)/libiberty.h \
$(srcdir)/emultempl/sh64elf.em $(INCDIR)/elf/sh.h $(BFDDIR)/elf-bfd.h \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf32_nbsd "$(tdir_shlelf32_nbsd)"
eshlelf64.c: $(srcdir)/emulparams/shlelf64.sh \
$(srcdir)/emulparams/shelf64.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64 "$(tdir_shlelf64)"
eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
$(srcdir)/emulparams/shelf64_nbsd.sh \
$(srcdir)/emulparams/shelf32_nbsd.sh $(srcdir)/emulparams/shelf32.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
eshl.c: $(srcdir)/emulparams/shl.sh \
$(srcdir)/emulparams/sh.sh \
@@ -2398,7 +2508,7 @@ evsta.c: $(srcdir)/emulparams/vsta.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} vsta "$(tdir_vsta)"
ev850.c: $(srcdir)/emulparams/v850.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
+ $(ELF_DEPS) $(srcdir)/scripttempl/v850.sc ${GEN_DEPENDS}
${GENSCRIPTS} v850 "$(tdir_v850)"
ew65.c: $(srcdir)/emulparams/w65.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/w65.sc ${GEN_DEPENDS}
@@ -2413,17 +2523,6 @@ ez8001.c: $(srcdir)/emulparams/z8001.sh \
ez8002.c: $(srcdir)/emulparams/z8002.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS}
${GENSCRIPTS} z8002 "$(tdir_z8002)"
-eelf32frvfd.c: $(srcdir)/emulparams/elf32frvfd.sh \
- $(srcdir)/emulparams/elf32frv.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32frvfd "$(tdir_frv)"
-eelf32m32c.c: $(srcdir)/emulparams/elf32m32c.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
- $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32m32c "$(tdir_m32c)"
-eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
- $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
- ${GENSCRIPTS} elf32mt "$(tdir_mt)"
# The generated emulation files mostly have the same dependencies.
$(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \
@@ -2442,7 +2541,7 @@ check-DEJAGNU: site.exp
CXX="$(CXX_FOR_TARGET)" CXXFLAGS="$(CXXFLAGS)" \
CC_FOR_HOST="$(CC)" CFLAGS_FOR_HOST="$(CFLAGS)" \
OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" \
- LIBIBERTY="$(LIBIBERTY) $(INTLLIBS)" LIBS="$(LIBS)" \
+ LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
$(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
@@ -2509,17 +2608,10 @@ configdoc.texi: ${DOCVER}-doc.texi
cp ${srcdir}/${DOCVER}-doc.texi ./configdoc.texi
chmod u+w ./configdoc.texi
-ldver.texi: $(srcdir)/../bfd/configure
- rm -f $@
- eval `grep '^ *VERSION=' $(srcdir)/../bfd/configure`; \
- echo "@set VERSION $$VERSION" > $@
-
-$(srcdir)/ld.info ld.dvi ld.html: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
-
# 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 configdoc.texi ldver.texi
+ld.1: $(srcdir)/ld.texinfo configdoc.texi
touch $@
-$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
-($(POD2MAN) ld.pod | \
@@ -2605,7 +2697,7 @@ install-data-local: install-info
diststuff: info $(EXTRA_DIST)
all: info ld.1
-# Both info (ld.info) and ld.1 depend on configdoc.texi and ldver.texi.
+# Both info (ld.info) and ld.1 depend on configdoc.texi.
# But info isn't a direct target. Make info-recursive to depend on
# ld.1 to support parallel build.
info-recursive: ld.1
@@ -2659,85 +2751,95 @@ 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 \
- $(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 config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/bfdlink.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 \
- $(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 \
+ldctor.o: ldctor.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldexp.h \
+ ldlang.h ldmisc.h ldgram.h ldmain.h ldctor.h
+ldemul.o: ldemul.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldmisc.h ldexp.h ldlang.h \
+ ldfile.h ldemul.h ldmain.h ldemul-list.h
+ldexp.o: ldexp.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.h ldmain.h ldmisc.h ldexp.h \
+ ldlex.h ldgram.h ldlang.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/safe-ctype.h
-ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.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 $(INCDIR)/filenames.h
-ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.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 \
+ldfile.o: ldfile.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h ldlex.h \
+ ldemul.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/filenames.h
+ldlang.o: ldlang.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
ldexp.h ldlang.h ldgram.h ldlex.h ldmisc.h ldctor.h \
ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h \
- $(INCDIR)/hashtab.h
-ldmain.o: ldmain.c ../bfd/bfd.h $(INCDIR)/ansidecl.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 ldexp.h ldlang.h ldgram.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h
+ldmain.o: ldmain.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/progress.h $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
+ ld.h ldmain.h ldmisc.h ldwrite.h ldexp.h ldlang.h ldgram.h \
ldlex.h ldfile.h ldemul.h ldctor.h
-ldmisc.o: ldmisc.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h $(INCDIR)/bfdlink.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 $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
-ldver.o: ldver.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h ../bfd/bfdver.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 \
- $(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.o: ldmisc.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+ldver.o: ldver.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ../bfd/bfdver.h ld.h ldver.h ldexp.h ldlang.h ldfile.h \
+ ldemul.h ldmain.h
+ldwrite.o: ldwrite.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h
-lexsup.o: lexsup.c config.h ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.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 \
- $(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 \
- $(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 \
+lexsup.o: lexsup.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ../bfd/bfdver.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmain.h \
+ ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
+ ldver.h ldemul.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
+mri.o: mri.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ld.h ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
+ldcref.o: ldcref.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/demangle.h $(INCDIR)/libiberty.h $(INCDIR)/objalloc.h \
+ ld.h ldmain.h ldmisc.h ldexp.h ldlang.h
+pe-dll.o: pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
+ ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h
+pep-dll.o: pep-dll.c pe-dll.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/safe-ctype.h ld.h ldexp.h ldlang.h ldwrite.h \
ldmisc.h ldgram.h ldmain.h ldfile.h ldemul.h $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h deffile.h pe-dll.h
-ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.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)/ansidecl.h \
- $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
- ldmisc.h ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h \
- ldmain.h $(INCDIR)/libiberty.h
-deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.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
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h deffile.h pe-dll.h \
+ pep-dll.h
+ldgram.o: ldgram.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/bfdlink.h ld.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 sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h ld.h ldmisc.h \
+ ldexp.h ldlang.h ldgram.h ldfile.h ldlex.h ldmain.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
+deffilep.o: deffilep.c sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ ld.h ldmisc.h deffile.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/binutils/ld/NEWS b/contrib/binutils/ld/NEWS
index 27fb0ae..5de0b5d 100644
--- a/contrib/binutils/ld/NEWS
+++ b/contrib/binutils/ld/NEWS
@@ -1,4 +1,40 @@
-*- text -*-
+* Added support for National Semicondutor CompactRISC (ie CR16) target.
+
+* -l:foo now searches the library path for a filename called foo,
+ without converting it to libfoo.a or libfoo.so.
+
+* Add a new command line option '--default-script=FILE' or '-dT FILE'
+ which specifies a replacement for the built in, default linker
+ script.
+
+* ELF: Add -Bsymbolic-functions, --dynamic-list-cpp-new, which puts C++
+ operator new and delete on the dynamic list, and --dynamic-list-data,
+ builtin list for --dynamic-list, which puts global data symbols on the
+ dynamic list.
+
+* Add support for x86_64 PE+ target.
+
+* Add support for Score target.
+
+* ELF: Add --dynamic-list option to specify a list of global symbols
+ whose references shouldn't be bound to the definition within the
+ shared library, or a list of symbols which should be added to the
+ symbol table in the executable.
+
+* The default output section LMA has changed for allocatable sections from
+ being equal to VMA, to keeping the difference between LMA and VMA the same as
+ the previous output section in the same region. This is a more useful
+ default when using overlays and other cases where you specify an LMA
+ differing from the VMA for some sections.
+
+* New switch: --print-gc-sections to list any sections removed by garabge
+ collection.
+
+* ARM: Added --vfp11-denorm-fix option to work around an erratum in current
+VFP11 coprocessors.
+
+Changes in 2.17:
* Support for the Infineon XC16X has been added by KPIT Cummins Infosystems.
diff --git a/contrib/binutils/ld/acinclude.m4 b/contrib/binutils/ld/acinclude.m4
deleted file mode 100644
index 71b09b9..0000000
--- a/contrib/binutils/ld/acinclude.m4
+++ /dev/null
@@ -1 +0,0 @@
-sinclude(../bfd/acinclude.m4)
diff --git a/contrib/binutils/ld/aclocal.m4 b/contrib/binutils/ld/aclocal.m4
index cd42673..ef6a062 100644
--- a/contrib/binutils/ld/aclocal.m4
+++ b/contrib/binutils/ld/aclocal.m4
@@ -480,27 +480,6 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
# Free Software Foundation, Inc.
#
@@ -910,4 +889,15 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
-m4_include([acinclude.m4])
+m4_include([../bfd/acinclude.m4])
+m4_include([../bfd/warning.m4])
+m4_include([../config/depstand.m4])
+m4_include([../config/gettext-sister.m4])
+m4_include([../config/lead-dot.m4])
+m4_include([../config/nls.m4])
+m4_include([../config/po.m4])
+m4_include([../config/progtest.m4])
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
index fa2e69f..cae19e7 100644
--- a/contrib/binutils/ld/config.in
+++ b/contrib/binutils/ld/config.in
@@ -1,32 +1,12 @@
/* config.in. Generated from configure.in by autoheader. */
-/* 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 to 1 if using `alloca.c'. */
-#undef C_ALLOCA
-
-/* Define to 1 if NLS is requested */
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
#undef ENABLE_NLS
/* Additional extension a shared object might have. */
#undef EXTRA_SHLIB_EXTENSION
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
-
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define to 1 if you have the `dcgettext' function. */
-#undef HAVE_DCGETTEXT
-
/* Define to 1 if you have the declaration of `environ', and to 0 if you
don't. */
#undef HAVE_DECL_ENVIRON
@@ -54,81 +34,42 @@
*/
#undef HAVE_DIRENT_H
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
/* Define to 1 if you have the <elf-hints.h> header file. */
#undef HAVE_ELF_HINTS_H
-/* Define to 1 if you have the `getcwd' function. */
-#undef HAVE_GETCWD
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
-
/* Define to 1 if you have the `glob' function. */
#undef HAVE_GLOB
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
+/* Define to 1 if you have the `mkstemp' function. */
+#undef HAVE_MKSTEMP
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
-/* Define to 1 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
-
/* Define to 1 if you have the `realpath' function. */
#undef HAVE_REALPATH
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -155,17 +96,12 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
+/* Define to 1 if you have the `waitpid' function. */
+#undef HAVE_WAITPID
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
@@ -185,13 +121,8 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* 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
+/* The size of a `long', as computed by sizeof. */
+#undef SIZEOF_LONG
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -205,18 +136,3 @@
/* Define to 1 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 to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* 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 0cd6f5c..b317905 100755
--- a/contrib/binutils/ld/configure
+++ b/contrib/binutils/ld/configure
@@ -241,6 +241,155 @@ IFS=" $as_nl"
$as_unset CDPATH
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
@@ -309,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LN_S RANLIB ac_ct_RANLIB LIBTOOL use_sysroot TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS NO_WERROR CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l YACC LEX LEXLIB LEX_OUTPUT_ROOT MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT HDEFINES HOSTING_CRT0 HOSTING_LIBS NATIVE_LIB_DIRS STRINGIFY EMUL EMULATION_OFILES EMUL_EXTRA_OFILES LIB_PATH EMULATION_LIBPATH TESTBFDLIB datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S AR ac_ct_AR RANLIB ac_ct_RANLIB lt_ECHO CPP use_sysroot TARGET_SYSTEM_ROOT TARGET_SYSTEM_ROOT_DEFINE WARN_CFLAGS NO_WERROR USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE YACC LEX LEXLIB LEX_OUTPUT_ROOT MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT GENINSRC_NEVER_TRUE GENINSRC_NEVER_FALSE HDEFINES HOSTING_CRT0 HOSTING_LIBS NATIVE_LIB_DIRS STRINGIFY EMUL EMULATION_OFILES EMUL_EXTRA_OFILES LIB_PATH EMULATION_LIBPATH TESTBFDLIB datarootdir docdir htmldir LIBOBJS LTLIBOBJS'
ac_subst_files='TDIRS'
# Initialize some variables set by options.
@@ -852,14 +1001,17 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared=PKGS build shared libraries default=yes
- --enable-static=PKGS build static libraries default=yes
- --enable-fast-install=PKGS optimize for fast installation default=yes
+ --enable-shared[=PKGS]
+ build shared libraries [default=yes]
+ --enable-static[=PKGS]
+ build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-targets alternative target configurations
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
- --enable-werror treat compile warnings as errors
- --enable-build-warnings Enable build-time compiler warnings
+ --enable-werror treat compile warnings as errors
+ --enable-build-warnings enable build-time compiler warnings
--disable-nls do not use Native Language Support
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
@@ -867,11 +1019,11 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-gnu-ld assume the C compiler uses GNU ld default=no
- --with-pic try to use only PIC/non-PIC objects default=use both
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-lib-path=dir1:dir2... set default LIB_PATH
--with-sysroot=DIR Search for usr/lib et al within DIR.
- --with-included-gettext use the GNU gettext library included here
Some influential environment variables:
CC C compiler command
@@ -3074,73 +3226,264 @@ fi
+
+
+macro_version='2.1a'
+macro_revision='1.2435'
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Set options
+
+enable_dlopen=no
+
+
+enable_win32_dll=no
+
+
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_shared=yes
fi;
+
+
+
+
+
+
+
+
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
enableval="$enable_static"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_static=yes
fi;
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi;
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_fast_install=yes
fi;
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for fgrep" >&5
+echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
+if test "${ac_cv_prog_fgrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
+ then ac_cv_prog_fgrep='grep -F'
+ else ac_cv_prog_fgrep='fgrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
+echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
+ FGREP=$ac_cv_prog_fgrep
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -3151,8 +3494,8 @@ fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -3162,12 +3505,12 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
esac
case $ac_prog in
# Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
+ [\\/]* | ?:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -3191,22 +3534,26 @@ if test "${lt_cv_path_LD+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
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.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
test "$with_gnu_ld" != no && break
- else
+ ;;
+ *)
test "$with_gnu_ld" != yes && break
- fi
+ ;;
+ esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$lt_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
@@ -3228,32 +3575,31 @@ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${lt_cv_prog_gnu_ld+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
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
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
-else
+ ;;
+*)
lt_cv_prog_gnu_ld=no
-fi
+ ;;
+esac
fi
echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
with_gnu_ld=$lt_cv_prog_gnu_ld
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
if test "${lt_cv_path_NM+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3261,35 +3607,173 @@ else
# Let the user override the test.
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
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- 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
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+ esac
fi
- fi
+ done
+ IFS="$lt_save_ifs"
done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+ : ${lt_cv_path_NM=no}
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+echo "${ECHO_T}$DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-NM="$lt_cv_path_NM"
-echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
+ test -n "$ac_ct_DUMPBIN" && break
+done
+test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
+
+ DUMPBIN=$ac_ct_DUMPBIN
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
+if test "${lt_cv_nm_interface+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:3762: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:3765: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:3768: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+echo "${ECHO_T}$lt_cv_nm_interface" >&6
echo "$as_me:$LINENO: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
@@ -3302,8 +3786,234 @@ else
echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
+ if test -n $lt_cv_sys_max_cmd_len; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+echo "$as_me:$LINENO: result: $xsi_shell" >&5
+echo "${ECHO_T}$xsi_shell" >&6
+
+
+echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+echo "${ECHO_T}$lt_shell_append" >&6
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
if test "${lt_cv_deplibs_check_method+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3316,13 +4026,13 @@ lt_cv_deplibs_check_method='unknown'
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix*)
+aix4* | aix5*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3330,39 +4040,42 @@ beos*)
lt_cv_deplibs_check_method=pass_all
;;
-bsdi4*)
+bsdi[45]*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
- # this will be overwritten by pass_all, but leave it in just in case
- 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
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/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.*`
;;
@@ -3376,92 +4089,116 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*|hpux11*)
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
case $host_cpu in
- hppa*)
- 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
- ;;
ia64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
- 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 (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
-linux-gnu*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd* | knetbsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
fi
;;
-newsos6)
+newos6*)
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
;;
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
-sco3.2v5*)
+rdos*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
;;
-sysv5uw[78]* | sysv4*uw2*)
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
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*`
;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
@@ -3469,222 +4206,29 @@ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
- esac
-
-fi
-
-if test -n "$lt_cv_sys_max_cmd_len" ; then
- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
-
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- else
- MAGIC_CMD=:
- fi
-fi
- fi
- ;;
-esac
if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
+if test "${ac_cv_prog_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -3693,7 +4237,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -3702,27 +4246,27 @@ done
fi
fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -3731,30 +4275,43 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
+ ac_cv_prog_ac_ct_AR="ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
fi
fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- RANLIB=$ac_ct_RANLIB
+ AR=$ac_ct_AR
else
- RANLIB="$ac_cv_prog_RANLIB"
+ AR="$ac_cv_prog_AR"
fi
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
@@ -3835,483 +4392,23 @@ else
STRIP="$ac_cv_prog_STRIP"
fi
-
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+test -z "$STRIP" && STRIP=:
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
-fi;
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
-else
- pic_mode=default
-fi;
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 3872 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- lt_cv_cc_needs_belf=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-lt_cv_cc_needs_belf=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-
-
-esac
-
-
-# Save cache, so that ltconfig can load it
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-
-_ACEOF
-
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
-echo "$as_me: error: libtool configure failed" >&2;}
- { (exit 1); exit 1; }; }
-
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-
-
-
-
-
-
-
-# Check whether --with-lib-path or --without-lib-path was given.
-if test "${with_lib_path+set}" = set; then
- withval="$with_lib_path"
- LIB_PATH=$withval
-fi;
-# Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
-echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi; # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
-if test "${enable_64_bit_bfd+set}" = set; then
- enableval="$enable_64_bit_bfd"
- case "${enableval}" in
- yes) want64=true ;;
- no) want64=false ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
-echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-else
- want64=false
-fi;
-
-# Check whether --with-sysroot or --without-sysroot was given.
-if test "${with_sysroot+set}" = set; then
- withval="$with_sysroot"
-
- case ${with_sysroot} in
- yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
- *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
- esac
-
- TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
- use_sysroot=yes
-
- if test "x$exec_prefix" = xNONE; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
- else
- test_prefix=$exec_prefix
- fi
- case ${TARGET_SYSTEM_ROOT} in
- "${test_prefix}"|"${test_prefix}/"*|\
- '${exec_prefix}'|'${exec_prefix}/'*)
- t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
- TARGET_SYSTEM_ROOT_DEFINE="$t"
- ;;
- esac
-
-else
-
- use_sysroot=no
- TARGET_SYSTEM_ROOT=
- TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
-
-fi;
-
-
-
-
-
-GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-
-# Check whether --enable-werror or --disable-werror was given.
-if test "${enable_werror+set}" = set; then
- enableval="$enable_werror"
- case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
-echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
-fi;
-
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-
-NO_WERROR=
-if test "${ERROR_ON_WARNING}" = yes ; then
- GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
- NO_WERROR="-Wno-error"
-fi
-
-if test "${GCC}" = yes ; then
- WARN_CFLAGS="${GCC_WARN_CFLAGS}"
-fi
-
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
- enableval="$enable_build_warnings"
- case "${enableval}" in
- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
- no) if test "${GCC}" = yes ; then
- WARN_CFLAGS="-w"
- fi;;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-fi;
-
-if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
- echo "Setting warning flags = $WARN_CFLAGS" 6>&1
-fi
-
-
-
-
-
- ac_config_headers="$ac_config_headers config.h:config.in"
-
-
-if test -z "$target" ; then
- { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
-echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "$host" ; then
- { { echo "$as_me:$LINENO: error: Unrecognized host system type; please check config.sub." >&5
-echo "$as_me: error: Unrecognized host system type; please check config.sub." >&2;}
- { (exit 1); exit 1; }; }
-fi
-
-# host-specific stuff:
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
+if test "${ac_cv_prog_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -4320,7 +4417,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -4329,27 +4426,27 @@ done
fi
fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -4358,628 +4455,492 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- CC=$ac_ct_CC
+ RANLIB=$ac_ct_RANLIB
else
- CC="$ac_cv_prog_CC"
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
+test -z "$RANLIB" && RANLIB=:
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-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 $# != 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
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
- fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- test -n "$CC" && break
- done
-fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- test -n "$ac_ct_CC" && break
-done
- CC=$ac_ct_CC
-fi
-fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
- ;
- return 0;
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ (exit $ac_status); } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-int
-main ()
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
- ;
- return 0;
+#ifdef __cplusplus
}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-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"
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
else
- CFLAGS="-g"
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
fi
-else
- if test "$GCC" = yes; then
- CFLAGS="-O2"
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
else
- CFLAGS=
+ lt_cv_sys_global_symbol_pipe=
fi
+done
+
fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
+ echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+fi
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-fi
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
+
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 4823 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_declaration
+
int
main ()
{
-exit (42);
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -4993,199 +4954,57 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
+ lt_cv_cc_needs_belf=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-# Find a good install program. We prefer a C program (faster),
-# so one script is as good as another. But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AmigaOS /C/install, which installs bootblocks on floppy discs
-# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# OS/2's system install, which has a completely different semantic
-# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
-if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- # Account for people who put trailing slashes in PATH elements.
-case $as_dir/ in
- ./ | .// | /cC/* | \
- /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
- ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
- /usr/ucb/* ) ;;
- *)
- # OSF1 and SCO ODT 3.0 have their own names for install.
- # Don't use installbsd from OSF since it installs stuff as root
- # by default.
- for ac_prog in ginstall scoinst install; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
- done
- done
- ;;
-esac
-done
-
-
fi
- if test "${ac_cv_path_install+set}" = set; then
- INSTALL=$ac_cv_path_install
- else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
- # break other packages using the cache if that directory is
- # removed, or if the path is relative.
- INSTALL=$ac_install_sh
- fi
-fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-ALL_LINGUAS="fr sv tr es da vi zh_CN"
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+ rm -rf conftest*
+ ;;
+esac
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
+need_locks="$enable_libtool_lock"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -5422,21 +5241,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
@@ -5603,132 +5407,34 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-fi
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
+$ac_includes_default
+#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5752,47 +5458,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
+ eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- ;;
-esac
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
+fi
+done
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+for ac_header in dlfcn.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -5853,98 +5541,1364 @@ fi
done
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
-ac_cv_type_off_t=no
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:5923: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:5927: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic='-qnocommon'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6245: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6249: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ lt_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works=yes
+ fi
+ else
+ lt_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6350: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:6354: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6405: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:6409: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ 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 <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 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'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # 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 | $GREP '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
+ aix_use_runtimelinking=no
+
+ # 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 runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # 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.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$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
+ :
+ 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'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ 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
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+
int
main ()
{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -5958,51 +6912,55 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; 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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <alloca.h>
+
int
main ()
{
-char *p = (char *) alloca (2 * sizeof (int));
+
;
return 0;
}
@@ -6029,65 +6987,277 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_working_alloca_h=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
-fi
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[012])
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ ;;
+ esac
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ if test "$GCC" = yes ; then
+ if test "${lt_cv_apple_cc_single_mod+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#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
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi-module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm libconftest.dylib
+ fi
+ rm conftest.$ac_ext
+ fi
+fi
-int
-main ()
-{
-char *p = (char *) alloca (1);
- ;
- return 0;
-}
+ output_verbose_link_cmd=echo
+ if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
+ archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd=echo
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ 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'
+ else
+ 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'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -6111,122 +7281,933 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_alloca_works=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
-if test $ac_cv_func_alloca_works = yes; then
+ netbsd*)
+ 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
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
-else
- # 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.
+ *nto* | *qnx*)
+ ;;
-ALLOCA=alloca.$ac_objext
+ openbsd*)
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
-fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ 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'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+withGCC=$GCC
+if test "$withGCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ 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.
+ 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
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # 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.
+ 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}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ if test "$host_cpu" = m68k; then
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ else
+ dynamic_linker=no
+ fi
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $withGCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
int
main ()
{
-return f != $ac_func;
+
;
return 0;
}
@@ -6253,126 +8234,425 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
+ shlibpath_overrides_runpath=yes
+fi
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
- break
-fi
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
- done
-fi
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
else
- return (&dummy > addr) ? 1 : -1;
-}
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
-int
-main ()
-{
- exit (find_stack_direction () < 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
-fi
-for ac_header in stdlib.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -6386,122 +8666,41 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
+ac_cv_lib_dl_dlopen=no
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
fi
-done
-
+ ;;
-for ac_func in getpagesize
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+ *)
+ echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6510,12 +8709,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+#define shl_load innocuous_shl_load
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
+ which can conflict with char shl_load (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -6525,7 +8724,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef $ac_func
+#undef shl_load
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -6534,14 +8733,14 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
+char shl_load ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
choke me
#else
-char (*f) () = $ac_func;
+char (*f) () = shl_load;
#endif
#ifdef __cplusplus
}
@@ -6550,7 +8749,7 @@ char (*f) () = $ac_func;
int
main ()
{
-return f != $ac_func;
+return f != shl_load;
;
return 0;
}
@@ -6577,239 +8776,53 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_func_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_shl_load=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-echo "$as_me:$LINENO: checking for working mmap" >&5
-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !STDC_HEADERS && !HAVE_STDLIB_H
-char *malloc ();
-#endif
-
-/* This mess was copied from the GNU getpagesize.h. */
-#if !HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h. */
-# if !HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
int
main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize ();
-
- /* First, make a file with some known garbage in it. */
- data = (char *) malloc (pagesize);
- if (!data)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- exit (1);
- if (write (fd, data, pagesize) != pagesize)
- exit (1);
- close (fd);
-
- /* Next, try to mmap the file at a fixed address which already has
- something else allocated at it. If we can, also make sure that
- we see the same garbage. */
- fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- exit (1);
- data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- exit (1);
- data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit (1);
-
- /* Finally, make sure that changes to the mapped area do not
- percolate back to the file as seen by read(). (This is a bug on
- some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- exit (1);
- if (read (fd, data3, pagesize) != pagesize)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit (1);
- close (fd);
- exit (0);
+shl_load ();
+ ;
+ return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
-
-fi
-rm -f conftest.mmap
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -6823,132 +8836,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dld_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_dld_shl_load=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6957,12 +8869,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+#define dlopen innocuous_dlopen
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
+ which can conflict with char dlopen (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -6972,7 +8884,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef $ac_func
+#undef dlopen
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -6981,14 +8893,14 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
+char dlopen ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
choke me
#else
-char (*f) () = $ac_func;
+char (*f) () = dlopen;
#endif
#ifdef __cplusplus
}
@@ -6997,7 +8909,7 @@ char (*f) () = $ac_func;
int
main ()
{
-return f != $ac_func;
+return f != dlopen;
;
return 0;
}
@@ -7024,84 +8936,46 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_func_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
-
-for ac_func in stpcpy
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
-{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+char dlopen ();
int
main ()
{
-return f != $ac_func;
+dlopen ();
;
return 0;
}
@@ -7128,52 +9002,47 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STPCPY 1
-_ACEOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <locale.h>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
int
main ()
{
-return LC_MESSAGES
+dlopen ();
;
return 0;
}
@@ -7200,85 +9069,54 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
+ ac_cv_lib_svld_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-am_cv_val_LC_MESSAGES=no
+ac_cv_lib_svld_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
-
- fi
- fi
- echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
-else
- USE_NLS=yes
-fi;
- echo "$as_me:$LINENO: result: $USE_NLS" >&5
-echo "${ECHO_T}$USE_NLS" >&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
-echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-
-# Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
- nls_cv_force_use_gnu_gettext=no
-fi;
- echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
-echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=
-
- if test "${ac_cv_header_libintl_h+set}" = set; then
- echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking libintl.h usability" >&5
-echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <libintl.h>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7292,110 +9130,889 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dld_dld_link=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking libintl.h presence" >&5
-echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
else
- ac_cpp_err=
+ enable_dlopen=no
fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cpp_err=yes
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9202 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9302 "configure"
+#include "confdefs.h"
- ac_header_preproc=no
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+rm -fr conftest*
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+
+# Check whether --with-lib-path or --without-lib-path was given.
+if test "${with_lib_path+set}" = set; then
+ withval="$with_lib_path"
+ LIB_PATH=$withval
+fi;
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi; # Check whether --enable-64-bit-bfd or --disable-64-bit-bfd was given.
+if test "${enable_64_bit_bfd+set}" = set; then
+ enableval="$enable_64_bit_bfd"
+ case "${enableval}" in
+ yes) want64=true ;;
+ no) want64=false ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for 64-bit-bfd option" >&5
+echo "$as_me: error: bad value ${enableval} for 64-bit-bfd option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ want64=false
+fi;
+
+# Check whether --with-sysroot or --without-sysroot was given.
+if test "${with_sysroot+set}" = set; then
+ withval="$with_sysroot"
+
+ case ${with_sysroot} in
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
+ *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
+ esac
+
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
+ use_sysroot=yes
+
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ if test "x$exec_prefix" = xNONE; then
+ test_exec_prefix=$test_prefix
+ else
+ test_exec_prefix=$exec_prefix
+ fi
+ case ${TARGET_SYSTEM_ROOT} in
+ "${test_prefix}"|"${test_prefix}/"*|\
+ "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
+ '${prefix}'|'${prefix}/'*|\
+ '${exec_prefix}'|'${exec_prefix}/'*)
+ t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
+ TARGET_SYSTEM_ROOT_DEFINE="$t"
+ ;;
+ esac
+
+else
+
+ use_sysroot=no
+ TARGET_SYSTEM_ROOT=
+ TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"\"'
+
+fi;
+
+
+
+
+
+GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Check whether --enable-werror or --disable-werror was given.
+if test "${enable_werror+set}" = set; then
+ enableval="$enable_werror"
+ case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+fi;
+
+# Enable -Werror by default when using gcc
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ ERROR_ON_WARNING=yes
+fi
+
+NO_WERROR=
+if test "${ERROR_ON_WARNING}" = yes ; then
+ GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+ NO_WERROR="-Wno-error"
+fi
+
+if test "${GCC}" = yes ; then
+ WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+fi
+
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
-echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
+fi;
+
+if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
+ echo "Setting warning flags = $WARN_CFLAGS" 6>&1
+fi
+
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h:config.in"
+
+
+if test -z "$target" ; then
+ { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "$host" ; then
+ { { echo "$as_me:$LINENO: error: Unrecognized host system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized host system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# host-specific stuff:
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_header_libintl_h=$ac_header_preproc
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
fi
-if test $ac_cv_header_libintl_h = yes; then
- echo "$as_me:$LINENO: checking for gettext in libc" >&5
-echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libc+set}" = set; then
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+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 $# != 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
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7404,18 +10021,21 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <libintl.h>
+
int
main ()
{
-return (int) gettext ("")
+#ifndef __GNUC__
+ choke me
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7429,58 +10049,52 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gt_cv_func_gettext_libc=yes
+ ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gt_cv_func_gettext_libc=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+ac_compiler_gnu=no
fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bindtextdomain ();
int
main ()
{
-bindtextdomain ();
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7494,49 +10108,110 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_intl_bindtextdomain=yes
+ ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_intl_bindtextdomain=no
+ac_cv_prog_cc_g=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+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 "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
-if test $ac_cv_lib_intl_bindtextdomain = yes; then
- echo "$as_me:$LINENO: checking for gettext in libintl" >&5
-echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libintl+set}" = set; then
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
int
main ()
{
-return (int) gettext ("")
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7550,134 +10225,94 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gt_cv_func_gettext_libintl=yes
+ ac_cv_prog_cc_stdc=$ac_arg
+break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gt_cv_func_gettext_libintl=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
+fi
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- if test "$MSGFMT" != "no"; then
-for ac_func in dcgettext
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+$ac_declaration
+#include <stdlib.h>
int
main ()
{
-return f != $ac_func;
+exit (42);
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7691,127 +10326,38 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ :
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+continue
fi
-
- cat >conftest.$ac_ext <<_ACEOF
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
+$ac_declaration
int
main ()
{
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
+exit (42);
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7825,42 +10371,252 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- CATOBJEXT=.gmo
- DATADIRNAME=share
+ break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-CATOBJEXT=.mo
- DATADIRNAME=lib
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- INSTOBJEXT=.mo
- fi
- fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. We don't cache a
+ # path for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the path is relative.
+ INSTALL=$ac_install_sh
+ fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga"
+# If we haven't got the data from the intl directory,
+# assume NLS is disabled.
+USE_NLS=no
+LIBINTL=
+LIBINTL_DEP=
+INCINTL=
+XGETTEXT=
+GMSGFMT=
+POSUB=
+
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
+fi
+echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+if test x"$USE_NLS" != xyes; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS=
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
+ esac
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
+ fi
+ done
+ LINGUAS="$XLINGUAS"
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
- if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
- # Neither gettext nor catgets in included in the C library.
- # Fall back on GNU gettext library (assuming it is present).
- nls_cv_use_gnu_gettext=yes
- fi
- fi
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
+ DATADIRNAME=share
+
+ INSTOBJEXT=.mo
+
+ GENCAT=gencat
+
+ CATOBJEXT=.gmo
+
+fi
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
+
+
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -7868,27 +10624,31 @@ if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
+if test "$MSGFMT" != ":"; then
echo "$as_me:$LINENO: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
@@ -7896,7 +10656,7 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -7936,7 +10696,37 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "xgettext", so it can be a program name with args.
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -7944,27 +10734,31 @@ if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
+ ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
+if test "$XGETTEXT" != ":"; then
echo "$as_me:$LINENO: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
@@ -7972,283 +10766,104 @@ else
echo "${ECHO_T}no" >&6
fi
+ rm -f messages.po
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
-
-
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
- fi
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$as_me:$LINENO: result: $LINGUAS" >&5
-echo "${ECHO_T}$LINGUAS" >&6
- fi
-
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking linux/version.h usability" >&5
-echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <linux/version.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking linux/version.h presence" >&5
-echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <linux/version.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- ac_cpp_err=
+ PATH_SEPARATOR=:
fi
-else
- ac_cpp_err=yes
+ rm -f conf$$.sh
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+rm -f conf$$.file
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
;;
esac
-echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_linux_version_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-
fi
-if test $ac_cv_header_linux_version_h = yes; then
- msgformat=linux
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6
else
- msgformat=xopen
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
+ GMSGFMT=":"
+ fi
+ fi
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
-
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
+ XGETTEXT=":"
+ fi
+ rm -f messages.po
+ fi
- l=
+ ac_config_commands="$ac_config_commands default-1"
- 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
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
-
@@ -8596,6 +11211,16 @@ fi
+
+if false; then
+ GENINSRC_NEVER_TRUE=
+ GENINSRC_NEVER_FALSE='#'
+else
+ GENINSRC_NEVER_TRUE='#'
+ GENINSRC_NEVER_FALSE=
+fi
+
+
. ${srcdir}/configure.host
@@ -8608,7 +11233,9 @@ fi
-for ac_header in string.h strings.h stdlib.h unistd.h elf-hints.h
+
+
+for ac_header in string.h strings.h stdlib.h unistd.h elf-hints.h limits.h sys/param.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -8760,7 +11387,9 @@ done
-for ac_func in sbrk realpath glob
+
+
+for ac_func in glob mkstemp realpath sbrk waitpid
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -9713,6 +12342,15 @@ do
EMUL=$targ_emul
fi
+ if test x${want64} = xfalse; then
+ . ${srcdir}/../bfd/config.bfd
+ fi
+
+ if test x${want64} = xtrue; then
+ targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
+ targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
+ fi
+
for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
case " $all_emuls " in
*" e${i}.o "*) ;;
@@ -9755,6 +12393,425 @@ TDIRS=tdirs
if test x${all_targets} = xtrue; then
+ if test x${want64} = xfalse; then
+ echo "$as_me:$LINENO: checking for long" >&5
+echo $ECHO_N "checking for long... $ECHO_C" >&6
+if test "${ac_cv_type_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if ((long *) 0)
+ return 0;
+if (sizeof (long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_long=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
+echo "${ECHO_T}$ac_cv_type_long" >&6
+
+echo "$as_me:$LINENO: checking size of long" >&5
+echo $ECHO_N "checking size of long... $ECHO_C" >&6
+if test "${ac_cv_sizeof_long+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$ac_cv_type_long" = yes; then
+ # The cast to unsigned long works around a bug in the HP C Compiler
+ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+ # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+ # This bug is HP SR number 8606223364.
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+else
+ if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+long longval () { return (long) (sizeof (long)); }
+unsigned long ulongval () { return (long) (sizeof (long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ exit (1);
+ if (((long) (sizeof (long))) < 0)
+ {
+ long i = longval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long i = ulongval ();
+ if (i != ((long) (sizeof (long))))
+ exit (1);
+ fprintf (f, "%lu\n", i);
+ }
+ exit (ferror (f) || fclose (f) != 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+ ac_cv_sizeof_long=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+echo "${ECHO_T}$ac_cv_sizeof_long" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+ if test "x${ac_cv_sizeof_long}" = "x8"; then
+ want64=true
+ fi
+ fi
if test x${want64} = xtrue; then
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
else
@@ -9802,7 +12859,6 @@ fi
ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
- ac_config_commands="$ac_config_commands default"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -9915,6 +12971,13 @@ echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${GENINSRC_NEVER_TRUE}" && test -z "${GENINSRC_NEVER_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"GENINSRC_NEVER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
@@ -10350,6 +13413,254 @@ cat >>$CONFIG_STATUS <<_ACEOF
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
_ACEOF
@@ -10362,7 +13673,8 @@ do
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -10499,38 +13811,42 @@ s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
s,@CCDEPMODE@,$CCDEPMODE,;t t
s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s,@LIBTOOL@,$LIBTOOL,;t t
+s,@SED@,$SED,;t t
+s,@EGREP@,$EGREP,;t t
+s,@FGREP@,$FGREP,;t t
+s,@GREP@,$GREP,;t t
+s,@LD@,$LD,;t t
+s,@DUMPBIN@,$DUMPBIN,;t t
+s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
+s,@NM@,$NM,;t t
s,@LN_S@,$LN_S,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LIBTOOL@,$LIBTOOL,;t t
+s,@lt_ECHO@,$lt_ECHO,;t t
+s,@CPP@,$CPP,;t t
s,@use_sysroot@,$use_sysroot,;t t
s,@TARGET_SYSTEM_ROOT@,$TARGET_SYSTEM_ROOT,;t t
s,@TARGET_SYSTEM_ROOT_DEFINE@,$TARGET_SYSTEM_ROOT_DEFINE,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@ALLOCA@,$ALLOCA,;t t
s,@USE_NLS@,$USE_NLS,;t t
-s,@MSGFMT@,$MSGFMT,;t t
-s,@GMSGFMT@,$GMSGFMT,;t t
+s,@LIBINTL@,$LIBINTL,;t t
+s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
+s,@INCINTL@,$INCINTL,;t t
s,@XGETTEXT@,$XGETTEXT,;t t
-s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@POSUB@,$POSUB,;t t
s,@CATALOGS@,$CATALOGS,;t t
-s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@DATADIRNAME@,$DATADIRNAME,;t t
-s,@GMOFILES@,$GMOFILES,;t t
s,@INSTOBJEXT@,$INSTOBJEXT,;t t
-s,@INTLDEPS@,$INTLDEPS,;t t
-s,@INTLLIBS@,$INTLLIBS,;t t
-s,@INTLOBJS@,$INTLOBJS,;t t
-s,@POFILES@,$POFILES,;t t
-s,@POSUB@,$POSUB,;t t
-s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
-s,@GT_NO@,$GT_NO,;t t
-s,@GT_YES@,$GT_YES,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-s,@l@,$l,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@MSGMERGE@,$MSGMERGE,;t t
s,@YACC@,$YACC,;t t
s,@LEX@,$LEX,;t t
s,@LEXLIB@,$LEXLIB,;t t
@@ -10538,6 +13854,8 @@ s,@LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
s,@MAINT@,$MAINT,;t t
+s,@GENINSRC_NEVER_TRUE@,$GENINSRC_NEVER_TRUE,;t t
+s,@GENINSRC_NEVER_FALSE@,$GENINSRC_NEVER_FALSE,;t t
s,@HDEFINES@,$HDEFINES,;t t
s,@HOSTING_CRT0@,$HOSTING_CRT0,;t t
s,@HOSTING_LIBS@,$HOSTING_LIBS,;t t
@@ -11238,7 +14556,656 @@ echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
done
done
;;
- default ) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+ libtool )
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ default-1 )
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
esac
done
_ACEOF
diff --git a/contrib/binutils/ld/configure.host b/contrib/binutils/ld/configure.host
index f9f080f..be343eb 100644
--- a/contrib/binutils/ld/configure.host
+++ b/contrib/binutils/ld/configure.host
@@ -147,6 +147,12 @@ i[3-7]86-*-cygwin*)
HOSTING_LIBS="$HOSTING_LIBS"' -lcygwin -L/usr/lib/w32api -luser32 -lkernel32 -ladvapi32 -lshell32 `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
;;
+i[3-7]86-*-mingw*)
+ #We only support msvcrt.dll, crtid == 2.
+ HOSTING_CRT0='/mingw/lib/crt2.o'
+ HOSTING_LIBS='-L/mingw/lib -lmingw32 -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lmoldname -lmingwex -lmsvcrt `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi`'
+ ;;
+
ia64-*-linux-*)
HOSTING_CRT0=`echo "$HOSTING_CRT0" | sed -e "s,ld\[^ \]*\*,ld-linux-ia64,g"`
;;
diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in
index e020288..0589578 100644
--- a/contrib/binutils/ld/configure.in
+++ b/contrib/binutils/ld/configure.in
@@ -41,17 +41,20 @@ AC_ARG_WITH(sysroot,
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
use_sysroot=yes
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
if test "x$exec_prefix" = xNONE; then
- if test "x$prefix" = xNONE; then
- test_prefix=/usr/local
- else
- test_prefix=$prefix
- fi
+ test_exec_prefix=$test_prefix
else
- test_prefix=$exec_prefix
+ test_exec_prefix=$exec_prefix
fi
case ${TARGET_SYSTEM_ROOT} in
"${test_prefix}"|"${test_prefix}/"*|\
+ "${test_exec_prefix}"|"${test_exec_prefix}/"*|\
+ '${prefix}'|'${prefix}/'*|\
'${exec_prefix}'|'${exec_prefix}/'*)
t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
TARGET_SYSTEM_ROOT_DEFINE="$t"
@@ -82,8 +85,9 @@ fi
AC_PROG_CC
AC_PROG_INSTALL
-ALL_LINGUAS="fr sv tr es da vi zh_CN"
-CY_GNU_GETTEXT
+ALL_LINGUAS="fr sv tr es da vi zh_CN zh_TW ga"
+ZW_GNU_GETTEXT_SISTER_DIR
+AM_PO_SUBDIRS
AC_EXEEXT
@@ -91,6 +95,7 @@ AC_PROG_YACC
AM_PROG_LEX
AM_MAINTAINER_MODE
+AM_CONDITIONAL(GENINSRC_NEVER, false)
. ${srcdir}/configure.host
@@ -99,8 +104,8 @@ AC_SUBST(HOSTING_CRT0)
AC_SUBST(HOSTING_LIBS)
AC_SUBST(NATIVE_LIB_DIRS)
-AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h elf-hints.h)
-AC_CHECK_FUNCS(sbrk realpath glob)
+AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h elf-hints.h limits.h sys/param.h)
+AC_CHECK_FUNCS(glob mkstemp realpath sbrk waitpid)
AC_HEADER_DIRENT
AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
@@ -169,6 +174,15 @@ do
EMUL=$targ_emul
fi
+ if test x${want64} = xfalse; then
+ . ${srcdir}/../bfd/config.bfd
+ fi
+
+ if test x${want64} = xtrue; then
+ targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
+ targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
+ fi
+
for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
case " $all_emuls " in
*" e${i}.o "*) ;;
@@ -210,10 +224,13 @@ AC_SUBST(EMUL)
TDIRS=tdirs
AC_SUBST_FILE(TDIRS)
-dnl FIXME: We will build a 64 bit BFD for a 64 bit host or a 64 bit
-dnl target, and in those cases we should also build the 64 bit
-dnl emulations.
if test x${all_targets} = xtrue; then
+ if test x${want64} = xfalse; then
+ AC_CHECK_SIZEOF(long)
+ if test "x${ac_cv_sizeof_long}" = "x8"; then
+ want64=true
+ fi
+ fi
if test x${want64} = xtrue; then
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
else
@@ -258,5 +275,4 @@ AC_SUBST(datarootdir)
AC_SUBST(docdir)
AC_SUBST(htmldir)
-AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
-[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile])
+AC_OUTPUT(Makefile po/Makefile.in:po/Make-in)
diff --git a/contrib/binutils/ld/configure.tgt b/contrib/binutils/ld/configure.tgt
index d324e4e..46e05d3 100644
--- a/contrib/binutils/ld/configure.tgt
+++ b/contrib/binutils/ld/configure.tgt
@@ -9,11 +9,18 @@
# targ_extra_emuls additional linker emulations to provide
# targ_extra_libpath additional linker emulations using LIB_PATH
# targ_extra_ofiles additional objects needed by the emulation
+# targ64_extra_emuls additional linker emulations to provide if
+# --enable-64-bit-bfd is given or if host is 64 bit.
+# targ64_extra_libpath additional linker emulations using LIB_PATH if
+# --enable-64-bit-bfd is given or if host is 64 bit.
# NATIVE_LIB_DIRS library directories to search on this host
# (if we are a native or sysrooted linker)
targ_extra_emuls=
+targ_extra_libpath=
targ_extra_ofiles=
+targ64_extra_emuls=
+targ64_extra_libpath=
# Please try to keep this table in alphabetic order - it makes it
# much easier to lookup a specific archictecture. Naturally any
@@ -37,7 +44,7 @@ alpha*-*-openbsd*) targ_emul=elf64alpha
arc-*-elf*) targ_emul=arcelf
;;
arm-epoc-pe) targ_emul=arm_epoc_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
-arm-*-wince) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+arm-wince-pe | arm-*-wince) targ_emul=arm_wince_pe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
arm-*-pe) targ_emul=armpe ; targ_extra_ofiles="deffilep.o pe-dll.o" ;;
arm-*-aout | armel-*-aout) targ_emul=armaoutl ;;
armeb-*-aout) targ_emul=armaoutb ;;
@@ -60,11 +67,30 @@ arm-*-elf | arm*-*-eabi*)
arm*-*-symbianelf*) targ_emul=armsymbian;;
arm-*-kaos*) targ_emul=armelf ;;
arm9e-*-elf) targ_emul=armelf ;;
-arm*b-*-linux-*eabi) targ_emul=armelfb_linux_eabi ;;
-arm*b-*-linux-*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;;
-arm*-*-linux-*eabi) targ_emul=armelf_linux_eabi ;;
-arm*-*-linux-*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
-arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
+arm*b-*-linux-*eabi) targ_emul=armelfb_linux_eabi
+ targ_extra_emuls=armelf_linux_eabi
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arm*b-*-linux-*) targ_emul=armelfb_linux
+ targ_extra_emuls="armelfb armelf armelf_linux"
+ targ_extra_libpath="armelf_linux"
+ ;;
+arm*-*-linux-*eabi) targ_emul=armelf_linux_eabi
+ targ_extra_emuls=armelfb_linux_eabi
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arm*-*-linux-*) targ_emul=armelf_linux
+ targ_extra_emuls="armelf armelfb armelfb_linux"
+ targ_extra_libpath="armelfb_linux"
+ ;;
+arm*-*-uclinux*eabi) targ_emul=armelf_linux_eabi
+ targ_extra_emuls=armelfb_linux_eabi
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+arm*-*-uclinux*) targ_emul=armelf_linux
+ targ_extra_emuls="armelf armelfb armelfb_linux"
+ targ_extra_libpath="armelfb_linux"
+ ;;
arm-*-vxworks) targ_emul=armelf_vxworks ;;
arm*-*-conix*) targ_emul=armelf ;;
thumb-*-linux-* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;;
@@ -81,10 +107,21 @@ xscale-*-coff) targ_emul=armcoff ;;
xscale-*-elf) targ_emul=armelf
;;
avr-*-*) targ_emul=avr2
- targ_extra_emuls="avr1 avr3 avr4 avr5"
+ targ_extra_emuls="avr1 avr3 avr4 avr5 avr6"
+ ;;
+bfin-*-elf) targ_emul=elf32bfin;
+ targ_extra_emuls="elf32bfinfd"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+bfin-*-uclinux*) targ_emul=elf32bfin;
+ targ_extra_emuls="elf32bfinfd"
+ targ_extra_libpath=$targ_extra_emuls
+ ;;
+bfin-*-linux-uclibc*) targ_emul=elf32bfin;
+ targ_extra_emuls="elf32bfinfd"
+ targ_extra_libpath=$targ_extra_emuls
;;
-bfin-*-elf) targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
-bfin-*-uclinux*) targ_emul=elf32bfin; targ_extra_emuls="elf32bfinfd" ;;
+cr16-*-elf*) targ_emul=elf32cr16 ;;
cr16c-*-elf*) targ_emul=elf32cr16c
;;
cris-*-*aout*) targ_emul=crisaout
@@ -105,6 +142,7 @@ d30v-*-*) targ_emul=d30velf; targ_extra_emuls="d30v_e d30v_o"
;;
dlx-*-elf*) targ_emul=elf32_dlx
;;
+fido*-*-elf*) targ_emul=m68kelf ;;
fr30-*-*) targ_emul=elf32fr30
;;
frv-*-*linux*) targ_emul=elf32frvfd ;;
@@ -151,9 +189,8 @@ i[3-7]86-*-linux*aout*) targ_emul=i386linux
i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;;
i[3-7]86-*-linux-*) targ_emul=elf_i386
targ_extra_emuls=i386linux
- if test x${want64} = xtrue; then
- targ_extra_emuls="$targ_extra_emuls elf_x86_64"
- fi
+ targ64_extra_emuls=elf_x86_64
+ targ64_extra_libpath=elf_x86_64
tdir_i386linux=${targ_alias}aout ;;
x86_64-*-linux-*) targ_emul=elf_x86_64
targ_extra_emuls="elf_i386 i386linux"
@@ -163,10 +200,12 @@ x86_64-*-linux-*) targ_emul=elf_x86_64
i[3-7]86-*-sysv[45]*) targ_emul=elf_i386 ;;
i[3-7]86-*-solaris2*) targ_emul=elf_i386_ldso
targ_extra_emuls="elf_i386 elf_x86_64"
+ targ_extra_libpath=$targ_extra_emuls
;;
i[3-7]86-*-unixware) targ_emul=elf_i386 ;;
i[3-7]86-*-solaris*) targ_emul=elf_i386_ldso
targ_extra_emuls="elf_i386"
+ targ_extra_libpath=$targ_extra_emuls
;;
i[3-7]86-*-netbsdelf* | \
i[3-7]86-*-netbsd*-gnu* | \
@@ -200,6 +239,9 @@ i[3-7]86-*-freebsd* | i[3-7]86-*-kfreebsd*-gnu)
x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu)
targ_emul=elf_x86_64_fbsd
targ_extra_emuls="elf_i386_fbsd elf_x86_64 elf_i386"
+ targ_extra_libpath="elf_i386_fbsd"
+ tdir_elf_i386_fbsd=`echo ${targ_alias} \
+ | sed -e 's/x86_64/i386/'`
tdir_elf_i386=`echo ${targ_alias} \
| sed -e 's/x86_64/i386/'` ;;
i[3-7]86-*-sysv*) targ_emul=i386coff ;;
@@ -217,6 +259,8 @@ i[3-7]86-*-cygwin*) targ_emul=i386pe ;
test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
i[3-7]86-*-mingw32*) targ_emul=i386pe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+x86_64-*-mingw*) targ_emul=i386pep ;
+ targ_extra_ofiles="deffilep.o pep-dll.o" ;;
i[3-7]86-*-interix*) targ_emul=i386pe_posix;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
i[3-7]86-*-beospe*) targ_emul=i386beos ;;
@@ -297,6 +341,7 @@ mcore-*-pe) targ_emul=mcorepe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mcore-*-elf) targ_emul=elf32mcore
;;
+mep-*-elf) targ_emul=elf32mep ;;
mips*-*-pe) targ_emul=mipspe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;;
mips*-dec-ultrix*) targ_emul=mipslit ;;
@@ -321,6 +366,10 @@ mips*vr4100el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr4100-*-elf*) targ_emul=elf32b4300 ;;
mips*vr5000el-*-elf*) targ_emul=elf32l4300 ;;
mips*vr5000-*-elf*) targ_emul=elf32b4300 ;;
+mips*el-sde-elf*) targ_emul=elf32ltsmip
+ targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
+mips*-sde-elf*) targ_emul=elf32btsmip
+ targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
mips*el-*-elf*) targ_emul=elf32elmip ;;
mips*-*-elf*) targ_emul=elf32ebmip ;;
mips*-*-rtems*) targ_emul=elf32ebmip ;;
@@ -331,14 +380,16 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
- targ_extra_libpath="elf32ltsmip elf64ltsmip" ;;
+ targ_extra_libpath=$targ_extra_emuls ;;
mips64*-*-linux-*) targ_emul=elf32btsmipn32
targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
- targ_extra_libpath="elf32btsmip elf64btsmip" ;;
+ targ_extra_libpath=$targ_extra_emuls ;;
mips*el-*-linux-*) targ_emul=elf32ltsmip
- targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" ;;
+ targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
+ targ_extra_libpath=$targ_extra_emuls ;;
mips*-*-linux-*) targ_emul=elf32btsmip
- targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" ;;
+ targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip"
+ targ_extra_libpath=$targ_extra_emuls ;;
mips*-*-lnews*) targ_emul=mipslnews ;;
mips*-*-sysv4*) targ_emul=elf32btsmip
;;
@@ -383,10 +434,9 @@ powerpc*-*-linux*) case "${targ}" in
*) targ_emul=elf32ppclinux
targ_extra_emuls="elf32ppc elf32ppcsim"
targ_extra_libpath=elf32ppc
- if test "${want64}" = "true"; then
- targ_extra_emuls="$targ_extra_emuls elf64ppc"
- targ_extra_libpath="$targ_extra_libpath elf64ppc"
- fi ;;
+ targ64_extra_emuls=elf64ppc
+ targ64_extra_libpath=elf64ppc
+ ;;
esac ;;
powerpc*le-*-elf* | powerpc*le-*-eabi* | powerpc*le-*-solaris* \
| powerpc*le-*-sysv* | powerpc*le-*-vxworks*)
@@ -437,12 +487,11 @@ s390x-*-linux*) targ_emul=elf64_s390
s390x-*-tpf*) targ_emul=elf64_s390
tdir_elf_s390=`echo ${targ_alias} | sed -e 's/s390x/s390/'` ;;
s390-*-linux*) targ_emul=elf_s390
- if test "${want64}" = "true"; then
- targ_extra_emuls=elf64_s390
- targ_extra_libpath=$targ_extra_emuls
- tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
- fi
+ targ64_extra_emuls=elf64_s390
+ targ64_extra_libpath=elf64_s390
+ tdir_elf64_s390=`echo ${targ_alias} | sed -e 's/s390/s390x/'`
;;
+score-*-elf) targ_emul=scoreelf ;;
sh-*-linux*) targ_emul=shlelf_linux
targ_extra_emuls=shelf_linux
targ_extra_libpath=shelf_linux ;;
@@ -470,9 +519,14 @@ shle*-*-elf* | sh[1234]*le*-*-elf | shle*-*-kaos*)
targ_emul=shlelf
targ_extra_emuls="shelf shl sh" ;;
sh-*-rtemscoff*) targ_emul=sh; targ_extra_emuls=shl ;;
-sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos* | sh-*-vxworks)
+sh-*-elf* | sh[1234]*-*-elf | sh-*-rtems* | sh-*-kaos*)
targ_emul=shelf
targ_extra_emuls="shlelf sh shl" ;;
+sh-*-uclinux* | sh[12]-*-uclinux*)
+ targ_emul=shelf_uclinux
+ targ_extra_emuls="shelf shlelf sh shl" ;;
+sh-*-vxworks) targ_emul=shelf_vxworks
+ targ_extra_emuls=shlelf_vxworks ;;
sh-*-nto*) targ_emul=shelf_nto
targ_extra_emuls=shlelf_nto ;;
sh-*-pe) targ_emul=shpe ;
@@ -536,6 +590,7 @@ sparc*-*-solaris2*) targ_emul=elf32_sparc ;;
sparc*-wrs-vxworks*) targ_emul=sparcaout ;;
sparc*-*-rtems*) targ_emul=elf32_sparc
;;
+spu-*-elf*) targ_emul=elf32_spu ;;
tic30-*-*aout*) targ_emul=tic30aout ;;
tic30-*-*coff*) targ_emul=tic30coff ;;
tic4x-*-* | c4x-*-*) targ_emul=tic4xcoff ; targ_extra_emuls="tic3xcoff tic3xcoff_onchip" ;;
@@ -609,6 +664,11 @@ sparc*-*-solaris2*)
NATIVE_LIB_DIRS='/usr/local/lib /usr/ccs/lib /lib /usr/lib'
;;
+spu-*-elf*)
+ # This allows to build a pair of PPU/SPU toolchains with common sysroot.
+ NATIVE_LIB_DIRS='/usr/spu/lib'
+ ;;
+
i[03-9x]86-*-cygwin*)
NATIVE_LIB_DIRS='/usr/lib /usr/lib/w32api'
;;
diff --git a/contrib/binutils/ld/deffilep.y b/contrib/binutils/ld/deffilep.y
index 5c699f3..80efb78 100644
--- a/contrib/binutils/ld/deffilep.y
+++ b/contrib/binutils/ld/deffilep.y
@@ -1,6 +1,6 @@
%{ /* deffilep.y - parser for .def files */
-/* Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+/* Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -19,11 +19,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <stdio.h>
+#include "sysdep.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "bfd.h"
-#include "sysdep.h"
#include "ld.h"
#include "ldmisc.h"
#include "deffile.h"
diff --git a/contrib/binutils/ld/emulparams/arcelf.sh b/contrib/binutils/ld/emulparams/arcelf.sh
index b1c9c17..6c524c9 100644
--- a/contrib/binutils/ld/emulparams/arcelf.sh
+++ b/contrib/binutils/ld/emulparams/arcelf.sh
@@ -1,11 +1,12 @@
SCRIPT_NAME=elf
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=genelf
OUTPUT_FORMAT="elf32-littlearc"
LITTLE_OUTPUT_FORMAT="elf32-littlearc"
BIG_OUTPUT_FORMAT="elf32-bigarc"
TEXT_START_ADDR=0x0
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x0
ARCH=arc
MACHINE=
ENTRY=start
-#TEMPLATE_NAME=elf32
diff --git a/contrib/binutils/ld/emulparams/arm_wince_pe.sh b/contrib/binutils/ld/emulparams/arm_wince_pe.sh
new file mode 100644
index 0000000..2d0019f
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/arm_wince_pe.sh
@@ -0,0 +1,14 @@
+ARCH=arm
+SCRIPT_NAME=pe
+
+OUTPUT_FORMAT="pei-arm-wince-little"
+LITTLE_OUTPUT_FORMAT="pei-arm-wince-little"
+BIG_OUTPUT_FORMAT="pei-arm-wince-big"
+
+RELOCATEABLE_OUTPUT_FORMAT="pe-arm-wince-little"
+
+TEMPLATE_NAME=pe
+ENTRY="WinMainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/armelf.sh b/contrib/binutils/ld/emulparams/armelf.sh
index 6dc50b2..ba9fdbe 100644
--- a/contrib/binutils/ld/emulparams/armelf.sh
+++ b/contrib/binutils/ld/emulparams/armelf.sh
@@ -6,12 +6,12 @@ LITTLE_OUTPUT_FORMAT="elf32-littlearm"
TEXT_START_ADDR=0x8000
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=armelf
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer)'
OTHER_BSS_SYMBOLS='__bss_start__ = .;'
OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
OTHER_END_SYMBOLS='__end__ = . ;'
-OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
- .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }'
+OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }'
+ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }'
OTHER_READONLY_SECTIONS="
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
${RELOCATING+ __exidx_start = .; }
@@ -24,7 +24,7 @@ GENERATE_SHLIB_SCRIPT=yes
ARCH=arm
MACHINE=
-MAXPAGESIZE=256
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ENTRY=_start
EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/armelf_linux.sh b/contrib/binutils/ld/emulparams/armelf_linux.sh
index 39b7f65..e7f301f 100644
--- a/contrib/binutils/ld/emulparams/armelf_linux.sh
+++ b/contrib/binutils/ld/emulparams/armelf_linux.sh
@@ -3,15 +3,15 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-littlearm"
BIG_OUTPUT_FORMAT="elf32-bigarm"
LITTLE_OUTPUT_FORMAT="elf32-littlearm"
-MAXPAGESIZE=0x8000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
TEMPLATE_NAME=elf32
EXTRA_EM_FILE=armelf
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
DATA_START_SYMBOLS='__data_start = . ;';
-OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
+OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer)'
OTHER_BSS_SYMBOLS='__bss_start__ = .;'
OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ;'
OTHER_END_SYMBOLS='__end__ = . ;'
diff --git a/contrib/binutils/ld/emulparams/armelf_nbsd.sh b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
index 3d94839..517cd62 100644
--- a/contrib/binutils/ld/emulparams/armelf_nbsd.sh
+++ b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
@@ -1,5 +1,5 @@
. ${srcdir}/emulparams/armelf.sh
-MAXPAGESIZE=0x8000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
TEXT_START_ADDR=0x00008000
TARGET2_TYPE=got-rel
diff --git a/contrib/binutils/ld/emulparams/avr6.sh b/contrib/binutils/ld/emulparams/avr6.sh
new file mode 100644
index 0000000..5326488
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/avr6.sh
@@ -0,0 +1,11 @@
+ARCH=avr:6
+MACHINE=
+SCRIPT_NAME=avr
+OUTPUT_FORMAT="elf32-avr"
+MAXPAGESIZE=1
+EMBEDDED=yes
+TEMPLATE_NAME=elf32
+
+TEXT_LENGTH=1024K
+DATA_LENGTH=0xffa0
+EXTRA_EM_FILE=avrelf
diff --git a/contrib/binutils/ld/emulparams/elf32_sparc.sh b/contrib/binutils/ld/emulparams/elf32_sparc.sh
index af23252..d09d9dc 100644
--- a/contrib/binutils/ld/emulparams/elf32_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf32_sparc.sh
@@ -1,8 +1,11 @@
+# If you change this file, please also look at files which source this one:
+# elf32_sparc_vxworks.sh
+
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-sparc"
TEXT_START_ADDR=0x10000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x2000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x10000
ALIGNMENT=8
ARCH=sparc
diff --git a/contrib/binutils/ld/emulparams/elf32_spu.sh b/contrib/binutils/ld/emulparams/elf32_spu.sh
new file mode 100644
index 0000000..4af608c
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32_spu.sh
@@ -0,0 +1,20 @@
+SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=spuelf
+OUTPUT_FORMAT="elf32-spu"
+ARCH=spu
+MACHINE=
+ALIGNMENT=16
+TEXT_START_ADDR=0
+INITIAL_READONLY_SECTIONS='.interrupt : { KEEP(*(.interrupt)) }'
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+ .interp ${RELOCATING-0} : { *(.interp) }"
+fi
+OTHER_END_SYMBOLS='PROVIDE (__stack = 0x3fff0);'
+NO_SMALL_DATA=true
+EMBEDDED=true
+MAXPAGESIZE=0x80
+DATA_ADDR="ALIGN(${MAXPAGESIZE})"
+OTHER_BSS_SECTIONS=".toe ALIGN(128) : { *(.toe) } = 0"
+OTHER_SECTIONS=".note.spu_name 0 : { KEEP(*(.note.spu_name)) }"
diff --git a/contrib/binutils/ld/emulparams/elf32bmip.sh b/contrib/binutils/ld/emulparams/elf32bmip.sh
index 6148565..ce33674 100644
--- a/contrib/binutils/ld/emulparams/elf32bmip.sh
+++ b/contrib/binutils/ld/emulparams/elf32bmip.sh
@@ -1,5 +1,6 @@
# If you change this file, please also look at files which source this one:
# elf32b4300.sh elf32bsmip.sh elf32btsmip.sh elf32ebmip.sh elf32lmip.sh
+# elf32ebmipvxworks.sh elf32elmipvxworks.sh
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-bigmips"
@@ -7,15 +8,26 @@ BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEXT_START_ADDR=0x0400000
test -n "${EMBEDDED}" || DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x0400000
SHLIB_TEXT_START_ADDR=0x5ffe0000
TEXT_DYNAMIC=
-INITIAL_READONLY_SECTIONS="
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
.reginfo ${RELOCATING-0} : { *(.reginfo) }
"
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
+# Unlike most targets, the MIPS backend puts all dynamic relocations
+# in a single dynobj section, which it also calls ".rel.dyn". It does
+# this so that it can easily sort all dynamic relocations before the
+# output section has been populated.
+OTHER_GOT_RELOC_SECTIONS="
+ .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) }
+"
# If the output has a GOT section, there must be exactly 0x7ff0 bytes
# between .got and _gp. The ". = ." below stops the orphan code from
# inserting other sections between the assignment to _gp and the start
@@ -46,5 +58,6 @@ OTHER_SECTIONS='
ARCH=mips
MACHINE=
TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=mipself
GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh b/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
index b81ac49..49d2f85 100644
--- a/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
+++ b/contrib/binutils/ld/emulparams/elf32bmipn32-defs.sh
@@ -11,6 +11,7 @@ BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=mipself
case "$EMULATION_NAME" in
elf32*n32*) ELFSIZE=32 ;;
@@ -33,9 +34,16 @@ GENERATE_SHLIB_SCRIPT=yes
GENERATE_PIE_SCRIPT=yes
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x100000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
ENTRY=__start
+# Unlike most targets, the MIPS backend puts all dynamic relocations
+# in a single dynobj section, which it also calls ".rel.dyn". It does
+# this so that it can easily sort all dynamic relocations before the
+# output section has been populated.
+OTHER_GOT_RELOC_SECTIONS="
+ .rel.dyn ${RELOCATING-0} : { *(.rel.dyn) }
+"
# GOT-related settings.
# If the output has a GOT section, there must be exactly 0x7ff0 bytes
# between .got and _gp. The ". = ." below stops the orphan code from
@@ -56,7 +64,12 @@ TEXT_START_SYMBOLS='_ftext = . ;'
DATA_START_SYMBOLS='_fdata = . ;'
OTHER_BSS_SYMBOLS='_fbss = .;'
-INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
+ .reginfo ${RELOCATING-0} : { *(.reginfo) }"
# Discard any .MIPS.content* or .MIPS.events* sections. The linker
# doesn't know how to adjust them.
OTHER_SECTIONS="/DISCARD/ : { *(.MIPS.content*) *(.MIPS.events*) }"
diff --git a/contrib/binutils/ld/emulparams/elf32bmipn32.sh b/contrib/binutils/ld/emulparams/elf32bmipn32.sh
index a320eb2..c26b6b3 100755
--- a/contrib/binutils/ld/emulparams/elf32bmipn32.sh
+++ b/contrib/binutils/ld/emulparams/elf32bmipn32.sh
@@ -3,7 +3,7 @@ OUTPUT_FORMAT="elf32-nbigmips"
BIG_OUTPUT_FORMAT="elf32-nbigmips"
LITTLE_OUTPUT_FORMAT="elf32-nlittlemips"
SHLIB_TEXT_START_ADDR=0x5ffe0000
-COMMONPAGESIZE=0x1000
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
# IRIX6 defines these symbols. 0x34 is the size of the ELF header.
EXECUTABLE_SYMBOLS="
diff --git a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh b/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
index 5ca6797..10c5565 100644
--- a/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
+++ b/contrib/binutils/ld/emulparams/elf32btsmipn32.sh
@@ -5,7 +5,7 @@
OUTPUT_FORMAT="elf32-ntradbigmips"
BIG_OUTPUT_FORMAT="elf32-ntradbigmips"
LITTLE_OUTPUT_FORMAT="elf32-ntradlittlemips"
-COMMONPAGESIZE=0x1000
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
# Magic sections.
OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
diff --git a/contrib/binutils/ld/emulparams/elf32cr16.sh b/contrib/binutils/ld/emulparams/elf32cr16.sh
new file mode 100644
index 0000000..756d02b
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32cr16.sh
@@ -0,0 +1,6 @@
+SCRIPT_NAME=elf32cr16
+TEMPLATE_NAME=elf32
+OUTPUT_FORMAT="elf32-cr16"
+ARCH=cr16
+ENTRY=_start
+EXTRA_EM_FILE=cr16elf
diff --git a/contrib/binutils/ld/emulparams/elf32mep.sh b/contrib/binutils/ld/emulparams/elf32mep.sh
new file mode 100755
index 0000000..886ca47
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf32mep.sh
@@ -0,0 +1,55 @@
+MACHINE=
+SCRIPT_NAME=mep
+OUTPUT_FORMAT="elf32-mep"
+TEXT_START_ADDR=0x1000
+ARCH=mep
+MAXPAGESIZE=256
+ENTRY=_start
+EMBEDDED=yes
+TEMPLATE_NAME=elf32
+DATA_START_SYMBOLS='__data_start = . ;'
+OTHER_GOT_SYMBOLS='
+ . = ALIGN(4);
+ __sdabase = . + 0x8000;
+ .srodata : { *(.srodata) *(.srodata.*) *(.gnu.linkonce.srd.*) }
+'
+OTHER_SDATA_SECTIONS='
+ PROVIDE (__sdabase = .);
+ __assert_tiny_size = ASSERT ((. < __sdabase) || ((. - __sdabase) <= 0x8000),
+ "tiny section overflow");
+'
+OTHER_READONLY_SECTIONS='
+ __stack = 0x001ffff0;
+ __stack_size = 0x100000;
+ __stack0 = (__stack - (0 * (__stack_size / 1)) + 15) / 16 * 16;
+
+ .rostacktab :
+ {
+ /* Emit a table describing the location of the different stacks.
+ Only 1 processor in the default configuration. */
+ . = ALIGN(4);
+ __stack_table = .;
+ LONG (__stack0);
+ }
+'
+OTHER_END_SYMBOLS='
+ PROVIDE (__heap = _end);
+ PROVIDE (__heap_end = 0);
+'
+OTHER_TEXT_SECTIONS='
+ *(.ftext) *(.ftext.*) *(.gnu.linkonce.ft.*)
+ . = ALIGN(8);
+ *(.vftext) *(.vftext.*) *(.gnu.linkonce.vf.*)
+ *(.frodata) *(.frodata.*) *(.gnu.linkonce.frd.*)
+'
+OTHER_READWRITE_SECTIONS='
+ . = ALIGN(4);
+ __tpbase = .;
+ .based : { *(.based) *(.based.*) *(.gnu.linkonce.based.*) }
+ __assert_based_size = ASSERT ((. - __tpbase) <= 0x80, "based section overflow");
+ .far : { *(.far) *(.far.*) *(.gnu.linkonce.far.*) }
+'
+OTHER_BSS_SECTIONS='
+ __assert_near_size = ASSERT (. <= 0x1000000, "near section overflow");
+ .farbss : { PROVIDE (__farbss_start = .); *(.farbss) *(.farbss.*) PROVIDE (__farbss_end = .); }
+'
diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh
index 587b8d3..68962d7 100644
--- a/contrib/binutils/ld/emulparams/elf32ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppc.sh
@@ -1,5 +1,6 @@
# If you change this file, please also look at files which source this one:
-# elf32lppc.sh elf32ppclinux.sh elf32ppcsim.sh
+# elf32lppcnto.sh elf32lppc.sh elf32ppclinux.sh elf32ppcnto.sh
+# elf32ppcsim.sh
. ${srcdir}/emulparams/elf32ppccommon.sh
# Yes, we want duplicate .got and .plt sections. The linker chooses the
diff --git a/contrib/binutils/ld/emulparams/elf32ppccommon.sh b/contrib/binutils/ld/emulparams/elf32ppccommon.sh
index b5fbc8d..1a12890 100644
--- a/contrib/binutils/ld/emulparams/elf32ppccommon.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppccommon.sh
@@ -6,8 +6,8 @@ GENERATE_PIE_SCRIPT=yes
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpc"
TEXT_START_ADDR=0x01800000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH=powerpc:common
MACHINE=
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64.sh b/contrib/binutils/ld/emulparams/elf64_ia64.sh
index c5be56e..7e5e54d 100644
--- a/contrib/binutils/ld/emulparams/elf64_ia64.sh
+++ b/contrib/binutils/ld/emulparams/elf64_ia64.sh
@@ -6,12 +6,12 @@ EXTRA_EM_FILE=ia64elf
OUTPUT_FORMAT="elf64-ia64-little"
ARCH=ia64
MACHINE=
-MAXPAGESIZE=0x10000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
# FIXME: It interferes with linker relaxation. Disable it until it is
# fixed.
if test "0" = "1" -a -n "$CREATE_SHLIB"; then
# Optimize shared libraries for 16K page size
- COMMONPAGESIZE=0x4000
+ COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
fi
TEXT_START_ADDR="0x4000000000000000"
DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
diff --git a/contrib/binutils/ld/emulparams/elf64_s390.sh b/contrib/binutils/ld/emulparams/elf64_s390.sh
index ea75d31..a26bbb6 100644
--- a/contrib/binutils/ld/emulparams/elf64_s390.sh
+++ b/contrib/binutils/ld/emulparams/elf64_s390.sh
@@ -2,8 +2,8 @@ SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-s390"
TEXT_START_ADDR=0x80000000
-MAXPAGESIZE=0x1000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x80000000
ARCH="s390:64-bit"
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh
index 0c0f5d8..cef4bff 100644
--- a/contrib/binutils/ld/emulparams/elf64_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf64_sparc.sh
@@ -2,8 +2,8 @@ SCRIPT_NAME=elf
ELFSIZE=64
TEMPLATE_NAME=elf32
OUTPUT_FORMAT="elf64-sparc"
-MAXPAGESIZE=0x100000
-COMMONPAGESIZE=0x2000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH="sparc:v9"
MACHINE=
DATA_PLT=
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh b/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
index 232a321..21d13ab 100644
--- a/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/elf64_sparc_fbsd.sh
@@ -1,2 +1,4 @@
. ${srcdir}/emulparams/elf64_sparc.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+
+OUTPUT_FORMAT="elf64-sparc-freebsd"
diff --git a/contrib/binutils/ld/emulparams/elf64alpha.sh b/contrib/binutils/ld/emulparams/elf64alpha.sh
index 47a0bb0..2c3b7d4 100644
--- a/contrib/binutils/ld/emulparams/elf64alpha.sh
+++ b/contrib/binutils/ld/emulparams/elf64alpha.sh
@@ -5,8 +5,8 @@ TEMPLATE_NAME=elf32
EXTRA_EM_FILE=alphaelf
OUTPUT_FORMAT="elf64-alpha"
TEXT_START_ADDR="0x120000000"
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x2000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR="0x120000000"
ARCH=alpha
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf64bmip-defs.sh b/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
new file mode 100644
index 0000000..110f892
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf64bmip-defs.sh
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
+INITIAL_READONLY_SECTIONS=".MIPS.options : { *(.MIPS.options) }"
diff --git a/contrib/binutils/ld/emulparams/elf64bmip.sh b/contrib/binutils/ld/emulparams/elf64bmip.sh
index a4ce6d4..0df6528 100755
--- a/contrib/binutils/ld/emulparams/elf64bmip.sh
+++ b/contrib/binutils/ld/emulparams/elf64bmip.sh
@@ -1,4 +1,4 @@
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+. ${srcdir}/emulparams/elf64bmip-defs.sh
OUTPUT_FORMAT="elf64-bigmips"
BIG_OUTPUT_FORMAT="elf64-bigmips"
LITTLE_OUTPUT_FORMAT="elf64-littlemips"
diff --git a/contrib/binutils/ld/emulparams/elf64btsmip.sh b/contrib/binutils/ld/emulparams/elf64btsmip.sh
index 23a20c7..b9e80bb 100644
--- a/contrib/binutils/ld/emulparams/elf64btsmip.sh
+++ b/contrib/binutils/ld/emulparams/elf64btsmip.sh
@@ -1,7 +1,7 @@
# If you change this file, please also look at files which source this one:
# elf64ltsmip.sh
-. ${srcdir}/emulparams/elf32bmipn32-defs.sh
+. ${srcdir}/emulparams/elf64bmip-defs.sh
OUTPUT_FORMAT="elf64-tradbigmips"
BIG_OUTPUT_FORMAT="elf64-tradbigmips"
LITTLE_OUTPUT_FORMAT="elf64-tradlittlemips"
diff --git a/contrib/binutils/ld/emulparams/elf64ppc.sh b/contrib/binutils/ld/emulparams/elf64ppc.sh
index 8285723..2fecba8 100644
--- a/contrib/binutils/ld/emulparams/elf64ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf64ppc.sh
@@ -7,8 +7,8 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf64-powerpc"
TEXT_START_ADDR=0x10000000
#SEGMENT_SIZE=0x10000000
-MAXPAGESIZE=0x10000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
ARCH=powerpc:common64
MACHINE=
NOP=0x60000000
@@ -31,7 +31,8 @@ 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)} { KEEP (*(.opd)) }"
+ .opd ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { KEEP (*(.opd)) }
+ .branch_lt ${RELOCATING-0} :${RELOCATING+ ALIGN(8)} { *(.branch_lt) }"
# Treat a host that matches the target with the possible exception of "64"
# in the name as if it were native.
diff --git a/contrib/binutils/ld/emulparams/elf_i386.sh b/contrib/binutils/ld/emulparams/elf_i386.sh
index af7010b..bdeaebb 100644
--- a/contrib/binutils/ld/emulparams/elf_i386.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386.sh
@@ -1,8 +1,8 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08048000
-MAXPAGESIZE=0x1000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x08048000
ARCH=i386
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
index e018231..a652913 100644
--- a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=elf_chaos
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x40000000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x40000000
ARCH=i386
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
index a477a69..d62184f 100644
--- a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08048000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x08048000
ARCH=i386
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf_s390.sh b/contrib/binutils/ld/emulparams/elf_s390.sh
index 8d057dc..d958504 100644
--- a/contrib/binutils/ld/emulparams/elf_s390.sh
+++ b/contrib/binutils/ld/emulparams/elf_s390.sh
@@ -1,8 +1,8 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-s390"
TEXT_START_ADDR=0x00400000
-MAXPAGESIZE=0x1000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x00400000
ARCH="s390:31-bit"
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64.sh b/contrib/binutils/ld/emulparams/elf_x86_64.sh
index 35240df..449ccc9 100644
--- a/contrib/binutils/ld/emulparams/elf_x86_64.sh
+++ b/contrib/binutils/ld/emulparams/elf_x86_64.sh
@@ -2,8 +2,8 @@ SCRIPT_NAME=elf
ELFSIZE=64
OUTPUT_FORMAT="elf64-x86-64"
TEXT_START_ADDR=0x400000
-MAXPAGESIZE=0x100000
-COMMONPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x400000
ARCH="i386:x86-64"
MACHINE=
@@ -22,12 +22,16 @@ if [ "x${host}" = "x${target}" ]; then
esac
fi
-# Linux modify the default library search path to first include
+# Linux/Solaris modify the default library search path to first include
# a 64-bit specific directory.
case "$target" in
- x86_64*-linux*)
+ x86_64*-linux*|i[3-7]86-*-linux-*)
case "$EMULATION_NAME" in
*64*) LIBPATH_SUFFIX=64 ;;
esac
;;
+ *-*-solaris2*)
+ LIBPATH_SUFFIX=/amd64
+ ELF_INTERPRETER_NAME=\"/lib/amd64/ld.so.1\"
+ ;;
esac
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh b/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
index 34258cb..35b6a62 100644
--- a/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
+++ b/contrib/binutils/ld/emulparams/elf_x86_64_fbsd.sh
@@ -1,2 +1,3 @@
. ${srcdir}/emulparams/elf_x86_64.sh
. ${srcdir}/emulparams/elf_fbsd.sh
+OUTPUT_FORMAT="elf64-x86-64-freebsd"
diff --git a/contrib/binutils/ld/emulparams/i386moss.sh b/contrib/binutils/ld/emulparams/i386moss.sh
index eece447..659c7f2 100644
--- a/contrib/binutils/ld/emulparams/i386moss.sh
+++ b/contrib/binutils/ld/emulparams/i386moss.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x00002000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x00002000
ARCH=i386
MACHINE=
diff --git a/contrib/binutils/ld/emulparams/i386nto.sh b/contrib/binutils/ld/emulparams/i386nto.sh
index e4872ed..256d4c8 100644
--- a/contrib/binutils/ld/emulparams/i386nto.sh
+++ b/contrib/binutils/ld/emulparams/i386nto.sh
@@ -2,7 +2,7 @@ SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08048000
TEXT_START_SYMBOLS='_btext = .;'
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x08048000
#SHLIB_TEXT_START_ADDR=0xb0300000
ARCH=i386
diff --git a/contrib/binutils/ld/emulparams/i386nw.sh b/contrib/binutils/ld/emulparams/i386nw.sh
index 621b475..dd5558c 100644
--- a/contrib/binutils/ld/emulparams/i386nw.sh
+++ b/contrib/binutils/ld/emulparams/i386nw.sh
@@ -1,7 +1,7 @@
SCRIPT_NAME=nw
OUTPUT_FORMAT="elf32-i386"
TEXT_START_ADDR=0x08000000
-MAXPAGESIZE=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x08000000
ARCH=i386
NOP=0x90909090
diff --git a/contrib/binutils/ld/emulparams/i386pep.sh b/contrib/binutils/ld/emulparams/i386pep.sh
new file mode 100644
index 0000000..d20f3ab
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/i386pep.sh
@@ -0,0 +1,9 @@
+ARCH="i386:x86-64"
+SCRIPT_NAME=pep
+OUTPUT_FORMAT="pei-x86-64"
+RELOCATEABLE_OUTPUT_FORMAT="pe-x86-64"
+TEMPLATE_NAME=pep
+ENTRY="_mainCRTStartup"
+SUBSYSTEM=PE_DEF_SUBSYSTEM
+INITIAL_SYMBOL_CHAR=\"_\"
+TARGET_PAGE_SIZE=0x1000
diff --git a/contrib/binutils/ld/emulparams/ppcnw.sh b/contrib/binutils/ld/emulparams/ppcnw.sh
index c3ead43..14b2745 100644
--- a/contrib/binutils/ld/emulparams/ppcnw.sh
+++ b/contrib/binutils/ld/emulparams/ppcnw.sh
@@ -2,6 +2,6 @@ SCRIPT_NAME=nw
OUTPUT_FORMAT="elf32-powerpc"
TEXT_START_ADDR=0x0400000
DATA_ADDR=0x10000000
-MAXPAGESIZE=0x40000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
NONPAGED_TEXT_START_ADDR=0x0400000
ARCH=powerpc
diff --git a/contrib/binutils/ld/emulparams/scoreelf.sh b/contrib/binutils/ld/emulparams/scoreelf.sh
new file mode 100644
index 0000000..e138de2
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/scoreelf.sh
@@ -0,0 +1,31 @@
+MACHINE=
+SCRIPT_NAME=elf
+TEMPLATE_NAME=elf32
+OUTPUT_FORMAT="elf32-bigscore"
+BIG_OUTPUT_FORMAT="elf32-bigscore"
+LITTLE_OUTPUT_FORMAT="elf32-littlescore"
+GROUP="-lm -lc -lglsim -lgcc -lstdc++"
+
+TEXT_START_ADDR=0x00000000
+MAXPAGESIZE=256
+NONPAGED_TEXT_START_ADDR=0x0400000
+SHLIB_TEXT_START_ADDR=0x5ffe0000
+OTHER_GOT_SYMBOLS='
+ _gp = ALIGN(16) + 0x3ff0;
+'
+
+OTHER_BSS_START_SYMBOLS='_bss_start__ = . + ALIGN(4);'
+OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+DATA_START_SYMBOLS='_fdata = . ;'
+SDATA_START_SYMBOLS='_sdata_begin = . ;'
+OTHER_BSS_SYMBOLS='
+ _bss_start = ALIGN(4) ;
+'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x8000000
+
+ARCH=score
+MACHINE=
+ENTRY=_start
+EMBEDDED=yes
+GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/shelf_uclinux.sh b/contrib/binutils/ld/emulparams/shelf_uclinux.sh
new file mode 100644
index 0000000..2af5da4
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/shelf_uclinux.sh
@@ -0,0 +1,4 @@
+. ${srcdir}/emulparams/shelf.sh
+
+# We do not want a .stack section
+OTHER_SECTIONS=""
diff --git a/contrib/binutils/ld/emulparams/shelf_vxworks.sh b/contrib/binutils/ld/emulparams/shelf_vxworks.sh
new file mode 100644
index 0000000..a87d529
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/shelf_vxworks.sh
@@ -0,0 +1,19 @@
+# If you change this file, please also look at files which source this one:
+# shlelf_vxworks.sh
+
+SCRIPT_NAME=elf
+BIG_OUTPUT_FORMAT="elf32-sh-vxworks"
+LITTLE_OUTPUT_FORMAT="elf32-shl-vxworks"
+OUTPUT_FORMAT="$BIG_OUTPUT_FORMAT"
+TEXT_START_ADDR=0x1000
+MAXPAGESIZE='CONSTANT (MAXPAGESIZE)'
+ARCH=sh
+MACHINE=
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+ENTRY=__start
+SYMPREFIX=_
+GOT=".got ${RELOCATING-0} : {
+ PROVIDE(__GLOBAL_OFFSET_TABLE_ = .);
+ *(.got.plt) *(.got) }"
+. ${srcdir}/emulparams/vxworks.sh
diff --git a/contrib/binutils/ld/emulparams/shlelf_vxworks.sh b/contrib/binutils/ld/emulparams/shlelf_vxworks.sh
new file mode 100644
index 0000000..0a055b1
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/shlelf_vxworks.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/shelf_vxworks.sh
+OUTPUT_FORMAT="$LITTLE_OUTPUT_FORMAT"
diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em
index d5fd67d..a2e2c6c 100644
--- a/contrib/binutils/ld/emultempl/armcoff.em
+++ b/contrib/binutils/ld/emultempl/armcoff.em
@@ -5,7 +5,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* emulate the original gld for the given ${EMULATION_NAME}
Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "getopt.h"
@@ -154,45 +154,46 @@ gld${EMULATION_NAME}_after_open (void)
static void
gld${EMULATION_NAME}_finish (void)
{
- struct bfd_link_hash_entry * h;
-
- if (thumb_entry_symbol == NULL)
- return;
-
- h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
- FALSE, FALSE, TRUE);
-
- if (h != (struct bfd_link_hash_entry *) NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak)
- && h->u.def.section->output_section != NULL)
+ if (thumb_entry_symbol != NULL)
{
- static char buffer[32];
- bfd_vma val;
-
- /* Special procesing is required for a Thumb entry symbol. The
- bottom bit of its address must be set. */
- val = (h->u.def.value
- + bfd_get_section_vma (output_bfd,
- h->u.def.section->output_section)
- + h->u.def.section->output_offset);
-
- val |= 1;
-
- /* Now convert this value into a string and store it in entry_symbol
- where the lang_finish() function will pick it up. */
- buffer[0] = '0';
- buffer[1] = 'x';
-
- sprintf_vma (buffer + 2, val);
-
- if (entry_symbol.name != NULL && entry_from_cmdline)
- einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
- thumb_entry_symbol, entry_symbol.name);
- entry_symbol.name = buffer;
+ struct bfd_link_hash_entry * h;
+
+ h = bfd_link_hash_lookup (link_info.hash, thumb_entry_symbol,
+ FALSE, FALSE, TRUE);
+
+ if (h != (struct bfd_link_hash_entry *) NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak)
+ && h->u.def.section->output_section != NULL)
+ {
+ static char buffer[32];
+ bfd_vma val;
+
+ /* Special procesing is required for a Thumb entry symbol. The
+ bottom bit of its address must be set. */
+ val = (h->u.def.value
+ + bfd_get_section_vma (output_bfd,
+ h->u.def.section->output_section)
+ + h->u.def.section->output_offset);
+
+ val |= 1;
+
+ /* Now convert this value into a string and store it in entry_symbol
+ where the lang_finish() function will pick it up. */
+ buffer[0] = '0';
+ buffer[1] = 'x';
+
+ sprintf_vma (buffer + 2, val);
+
+ if (entry_symbol.name != NULL && entry_from_cmdline)
+ einfo (_("%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"),
+ thumb_entry_symbol, entry_symbol.name);
+ entry_symbol.name = buffer;
+ }
+ else
+ einfo (_("%P: warning: connot find thumb start symbol %s\n"),
+ thumb_entry_symbol);
}
- else
- einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
finish_default ();
}
diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em
index bd74ab5..e9f663f 100644
--- a/contrib/binutils/ld/emultempl/armelf.em
+++ b/contrib/binutils/ld/emultempl/armelf.em
@@ -35,6 +35,9 @@ static int target1_is_rel = 0${TARGET1_IS_REL};
static char *target2_type = "${TARGET2_TYPE}";
static int fix_v4bx = 0;
static int use_blx = 0;
+static bfd_arm_vfp11_fix vfp11_denorm_fix = BFD_ARM_VFP11_FIX_DEFAULT;
+static int no_enum_size_warning = 0;
+static int pic_veneer = 0;
static void
gld${EMULATION_NAME}_before_parse (void)
@@ -103,9 +106,6 @@ arm_elf_before_allocation (void)
{
bfd *tem;
- /* Call the standard elf routine. */
- gld${EMULATION_NAME}_before_allocation ();
-
if (link_info.input_bfds != NULL)
{
/* The interworking bfd must be the last one in the link. */
@@ -124,27 +124,55 @@ arm_elf_before_allocation (void)
if (bfd_for_interwork != NULL)
bfd_elf32_arm_get_bfd_for_interworking (bfd_for_interwork, &link_info);
}
- /* We should be able to set the size of the interworking stub section. */
- /* Here we rummage through the found bfds to collect glue information. */
- /* FIXME: should this be based on a command line option? krk@cygnus.com */
- {
- LANG_FOR_EACH_INPUT_STATEMENT (is)
- {
- if (!bfd_elf32_arm_process_before_allocation (is->the_bfd, & link_info,
- byteswap_code))
- {
+ bfd_elf32_arm_set_byteswap_code (&link_info, byteswap_code);
+
+ /* Choose type of VFP11 erratum fix, or warn if specified fix is unnecessary
+ due to architecture version. */
+ bfd_elf32_arm_set_vfp11_fix (output_bfd, &link_info);
+
+ /* We should be able to set the size of the interworking stub section. We
+ can't do it until later if we have dynamic sections, though. */
+ if (! elf_hash_table (&link_info)->dynamic_sections_created)
+ {
+ /* Here we rummage through the found bfds to collect glue information. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ /* Initialise mapping tables for code/data. */
+ bfd_elf32_arm_init_maps (is->the_bfd);
+
+ if (!bfd_elf32_arm_process_before_allocation (is->the_bfd,
+ &link_info)
+ || !bfd_elf32_arm_vfp11_erratum_scan (is->the_bfd, &link_info))
/* xgettext:c-format */
einfo (_("Errors encountered processing file %s"), is->filename);
- }
- }
- }
+ }
+ }
+
+ /* Call the standard elf routine. */
+ gld${EMULATION_NAME}_before_allocation ();
/* We have seen it all. Allocate it, and carry on. */
bfd_elf32_arm_allocate_interworking_sections (& link_info);
}
static void
+arm_elf_after_allocation (void)
+{
+ /* Call the standard elf routine. */
+ after_allocation_default ();
+
+ {
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ /* Figure out where VFP11 erratum veneers (and the labels returning
+ from same) have been placed. */
+ bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
+ }
+ }
+}
+
+static void
arm_elf_finish (void)
{
struct bfd_link_hash_entry * h;
@@ -207,13 +235,15 @@ arm_elf_finish (void)
thumb_entry_symbol);
}
-/* This is a convenitent point to tell BFD about target specific flags.
+/* This is a convenient point to tell BFD about target specific flags.
After the output has been created, but before inputs are read. */
static void
arm_elf_create_output_section_statements (void)
{
- bfd_elf32_arm_set_target_relocs (&link_info, target1_is_rel, target2_type,
- fix_v4bx, use_blx);
+ bfd_elf32_arm_set_target_relocs (output_bfd, &link_info, target1_is_rel,
+ target2_type, fix_v4bx, use_blx,
+ vfp11_denorm_fix, no_enum_size_warning,
+ pic_veneer);
}
EOF
@@ -229,6 +259,9 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_TARGET2 305
#define OPTION_FIX_V4BX 306
#define OPTION_USE_BLX 307
+#define OPTION_VFP11_DENORM_FIX 308
+#define OPTION_NO_ENUM_SIZE_WARNING 309
+#define OPTION_PIC_VENEER 310
'
PARSE_AND_LIST_SHORTOPTS=p
@@ -242,6 +275,9 @@ PARSE_AND_LIST_LONGOPTS='
{ "target2", required_argument, NULL, OPTION_TARGET2},
{ "fix-v4bx", no_argument, NULL, OPTION_FIX_V4BX},
{ "use-blx", no_argument, NULL, OPTION_USE_BLX},
+ { "vfp11-denorm-fix", required_argument, NULL, OPTION_VFP11_DENORM_FIX},
+ { "no-enum-size-warning", no_argument, NULL, OPTION_NO_ENUM_SIZE_WARNING},
+ { "pic-veneer", no_argument, NULL, OPTION_PIC_VENEER},
'
PARSE_AND_LIST_OPTIONS='
@@ -252,6 +288,9 @@ PARSE_AND_LIST_OPTIONS='
fprintf (file, _(" --target2=<type> Specify definition of R_ARM_TARGET2\n"));
fprintf (file, _(" --fix-v4bx Rewrite BX rn as MOV pc, rn for ARMv4\n"));
fprintf (file, _(" --use-blx Enable use of BLX instructions\n"));
+ fprintf (file, _(" --vfp11-denorm-fix Specify how to fix VFP11 denorm erratum\n"));
+ fprintf (file, _(" --no-enum-size-warning Don'\''t warn about objects with incompatible enum sizes\n"));
+ fprintf (file, _(" --pic-veneer Always generate PIC interworking veneers\n"));
'
PARSE_AND_LIST_ARGS_CASES='
@@ -286,12 +325,32 @@ PARSE_AND_LIST_ARGS_CASES='
case OPTION_USE_BLX:
use_blx = 1;
break;
+
+ case OPTION_VFP11_DENORM_FIX:
+ if (strcmp (optarg, "none") == 0)
+ vfp11_denorm_fix = BFD_ARM_VFP11_FIX_NONE;
+ else if (strcmp (optarg, "scalar") == 0)
+ vfp11_denorm_fix = BFD_ARM_VFP11_FIX_SCALAR;
+ else if (strcmp (optarg, "vector") == 0)
+ vfp11_denorm_fix = BFD_ARM_VFP11_FIX_VECTOR;
+ else
+ einfo (_("Unrecognized VFP11 fix type '\''%s'\''.\n"), optarg);
+ break;
+
+ case OPTION_NO_ENUM_SIZE_WARNING:
+ no_enum_size_warning = 1;
+ break;
+
+ case OPTION_PIC_VENEER:
+ pic_veneer = 1;
+ break;
'
# We have our own after_open and before_allocation functions, but they call
# the standard routines, so give them a different name.
LDEMUL_AFTER_OPEN=arm_elf_after_open
LDEMUL_BEFORE_ALLOCATION=arm_elf_before_allocation
+LDEMUL_AFTER_ALLOCATION=arm_elf_after_allocation
LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=arm_elf_create_output_section_statements
# Replace the elf before_parse function with our own.
diff --git a/contrib/binutils/ld/emultempl/avrelf.em b/contrib/binutils/ld/emultempl/avrelf.em
new file mode 100644
index 0000000..1f5ab5c
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/avrelf.em
@@ -0,0 +1,269 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006
+# 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., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301 USA.
+
+# This file is sourced from elf32.em, and defines extra avr-elf
+# specific routines. It is used to generate the trampolines for the avr6
+# family devices where one needs to address the issue that it is not possible
+# to reach the whole program memory by using 16 bit pointers.
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+#include "elf32-avr.h"
+#include "ldctor.h"
+
+/* The fake file and it's corresponding section meant to hold
+ the linker stubs if needed. */
+
+static lang_input_statement_type *stub_file;
+static asection *avr_stub_section;
+
+/* Variables set by the command-line parameters and transfered
+ to the bfd without use of global shared variables. */
+
+static bfd_boolean avr_no_stubs = FALSE;
+static bfd_boolean avr_debug_relax = FALSE;
+static bfd_boolean avr_debug_stubs = FALSE;
+static bfd_boolean avr_replace_call_ret_sequences = TRUE;
+static bfd_vma avr_pc_wrap_around = 0x10000000;
+
+/* Transfers information to the bfd frontend. */
+
+static void
+avr_elf_set_global_bfd_parameters (void)
+{
+ elf32_avr_setup_params (& link_info,
+ stub_file->the_bfd,
+ avr_stub_section,
+ avr_no_stubs,
+ avr_debug_stubs,
+ avr_debug_relax,
+ avr_pc_wrap_around,
+ avr_replace_call_ret_sequences);
+}
+
+
+/* Makes a conservative estimate of the trampoline section size that could
+ be corrected later on. */
+
+static void
+avr_elf_${EMULATION_NAME}_before_allocation (void)
+{
+ int ret;
+
+ gld${EMULATION_NAME}_before_allocation ();
+
+ /* We only need stubs for the avr6 family. */
+ if (strcmp ("${EMULATION_NAME}","avr6"))
+ avr_no_stubs = TRUE;
+
+ avr_elf_set_global_bfd_parameters ();
+
+ /* If generating a relocatable output file, then
+ we don't have to generate the trampolines. */
+ if (link_info.relocatable)
+ avr_no_stubs = TRUE;
+
+ if (avr_no_stubs)
+ return;
+
+ ret = elf32_avr_setup_section_lists (output_bfd, &link_info);
+
+ if (ret < 0)
+ einfo ("%X%P: can not setup the input section list: %E\n");
+
+ if (ret <= 0)
+ return;
+
+ /* Call into the BFD backend to do the real "stub"-work. */
+ if (! elf32_avr_size_stubs (output_bfd, &link_info, TRUE))
+ einfo ("%X%P: can not size stub section: %E\n");
+}
+
+/* This is called before the input files are opened. We create a new
+ fake input file to hold the stub section and generate the section itself. */
+
+static void
+avr_elf_create_output_section_statements (void)
+{
+ flagword flags;
+
+ stub_file = lang_add_input_file ("linker stubs",
+ lang_input_file_is_fake_enum,
+ NULL);
+
+ stub_file->the_bfd = bfd_create ("linker stubs", output_bfd);
+ if (stub_file->the_bfd == NULL
+ || !bfd_set_arch_mach (stub_file->the_bfd,
+ bfd_get_arch (output_bfd),
+ bfd_get_mach (output_bfd)))
+ {
+ einfo ("%X%P: can not create stub BFD %E\n");
+ return;
+ }
+
+ /* Now we add the stub section. */
+
+ avr_stub_section = bfd_make_section_anyway (stub_file->the_bfd,
+ ".trampolines");
+ if (avr_stub_section == NULL)
+ goto err_ret;
+
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
+ | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
+ if (!bfd_set_section_flags (stub_file->the_bfd, avr_stub_section, flags))
+ goto err_ret;
+
+ avr_stub_section->alignment_power = 1;
+
+ ldlang_add_file (stub_file);
+
+ return;
+
+ err_ret:
+ einfo ("%X%P: can not make stub section: %E\n");
+ return;
+}
+
+/* Re-calculates the size of the stubs so that we won't waste space. */
+
+static void
+avr_elf_finish (void)
+{
+ if (!avr_no_stubs)
+ {
+ /* Now build the linker stubs. */
+ if (stub_file->the_bfd->sections != NULL)
+ {
+ /* Call again the trampoline analyzer to initialize the trampoline
+ stubs with the correct symbol addresses. Since there could have
+ been relaxation, the symbol addresses that were found during
+ first call may no longer be correct. */
+ if (!elf32_avr_size_stubs (output_bfd, &link_info, FALSE))
+ {
+ einfo ("%X%P: can not size stub section: %E\n");
+ return;
+ }
+
+ if (!elf32_avr_build_stubs (&link_info))
+ einfo ("%X%P: can not build stubs: %E\n");
+ }
+ }
+
+ gld${EMULATION_NAME}_finish ();
+}
+
+
+EOF
+
+
+PARSE_AND_LIST_PROLOGUE='
+
+#define OPTION_NO_CALL_RET_REPLACEMENT 301
+#define OPTION_PMEM_WRAP_AROUND 302
+#define OPTION_NO_STUBS 303
+#define OPTION_DEBUG_STUBS 304
+#define OPTION_DEBUG_RELAX 305
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ { "no-call-ret-replacement", no_argument,
+ NULL, OPTION_NO_CALL_RET_REPLACEMENT},
+ { "pmem-wrap-around", required_argument,
+ NULL, OPTION_PMEM_WRAP_AROUND},
+ { "no-stubs", no_argument,
+ NULL, OPTION_NO_STUBS},
+ { "debug-stubs", no_argument,
+ NULL, OPTION_DEBUG_STUBS},
+ { "debug-relax", no_argument,
+ NULL, OPTION_DEBUG_RELAX},
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _(" --pmem-wrap-around=<val> "
+ "Make the linker relaxation machine assume that a\n"
+ " "
+ "program counter wrap-around occures at address\n"
+ " "
+ "<val>. Supported values are 8k, 16k, 32k and 64k.\n"));
+ fprintf (file, _(" --no-call-ret-replacement "
+ "The relaxation machine normally will\n"
+ " "
+ "substitute two immediately following call/ret\n"
+ " "
+ "instructions by a single jump instruction.\n"
+ " "
+ "This option disables this optimization.\n"));
+ fprintf (file, _(" --no-stubs "
+ "If the linker detects to attempt to access\n"
+ " "
+ "an instruction beyond 128k by a reloc that\n"
+ " "
+ "is limited to 128k max, it inserts a jump\n"
+ " "
+ "stub. You can de-active this with this switch.\n"));
+ fprintf (file, _(" --debug-stubs Used for debugging avr-ld.\n"));
+ fprintf (file, _(" --debug-relax Used for debugging avr-ld.\n"));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+
+ case OPTION_PMEM_WRAP_AROUND:
+ {
+ /* This variable is defined in the bfd library. */
+ if ((!strcmp (optarg,"32k")) || (!strcmp (optarg,"32K")))
+ avr_pc_wrap_around = 32768;
+ else if ((!strcmp (optarg,"8k")) || (!strcmp (optarg,"8K")))
+ avr_pc_wrap_around = 8192;
+ else if ((!strcmp (optarg,"16k")) || (!strcmp (optarg,"16K")))
+ avr_pc_wrap_around = 16384;
+ else if ((!strcmp (optarg,"64k")) || (!strcmp (optarg,"64K")))
+ avr_pc_wrap_around = 0x10000;
+ else
+ return FALSE;
+ }
+ break;
+
+ case OPTION_DEBUG_STUBS:
+ avr_debug_stubs = TRUE;
+ break;
+
+ case OPTION_DEBUG_RELAX:
+ avr_debug_relax = TRUE;
+ break;
+
+ case OPTION_NO_STUBS:
+ avr_no_stubs = TRUE;
+ break;
+
+ case OPTION_NO_CALL_RET_REPLACEMENT:
+ {
+ /* This variable is defined in the bfd library. */
+ avr_replace_call_ret_sequences = FALSE;
+ }
+ break;
+'
+
+#
+# Put these extra avr-elf routines in ld_${EMULATION_NAME}_emulation
+#
+LDEMUL_BEFORE_ALLOCATION=avr_elf_${EMULATION_NAME}_before_allocation
+LDEMUL_FINISH=avr_elf_finish
+LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=avr_elf_create_output_section_statements
diff --git a/contrib/binutils/ld/emultempl/cr16elf.em b/contrib/binutils/ld/emultempl/cr16elf.em
new file mode 100644
index 0000000..0881634
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/cr16elf.em
@@ -0,0 +1,92 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2007 Free Software Foundation, Inc.
+# Contributed by M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+#
+# This file is part of GLD, the Gnu Linker.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from elf32.em, and defines extra cr16-elf
+# specific routines.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+
+#include "ldctor.h"
+
+/* Flag for the emulation-specific "--no-relax" option. */
+static bfd_boolean disable_relaxation = FALSE;
+
+static void
+cr16elf_after_parse (void)
+{
+ /* Always behave as if called with --sort-common command line
+ option.
+ This is to emulate the CRTools' method of keeping variables
+ of different alignment in separate sections. */
+ config.sort_common = TRUE;
+
+ /* Don't create a demand-paged executable, since this feature isn't
+ meaninful in CR16 embedded systems. Moreover, when magic_demand_paged
+ is true the link sometimes fails. */
+ config.magic_demand_paged = FALSE;
+}
+
+/* This is called after the sections have been attached to output
+ sections, but before any sizes or addresses have been set. */
+
+static void
+cr16elf_before_allocation (void)
+{
+ /* Call the default first. */
+ gld${EMULATION_NAME}_before_allocation ();
+
+ /* Enable relaxation by default if the "--no-relax" option was not
+ specified. This is done here instead of in the before_parse hook
+ because there is a check in main() to prohibit use of --relax and
+ -r together. */
+
+ if (!disable_relaxation)
+ command_line.relax = TRUE;
+}
+
+EOF
+
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_NO_RELAX 301
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ { "no-relax", no_argument, NULL, OPTION_NO_RELAX},
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _(" --no-relax Do not relax branches\n"));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+ case OPTION_NO_RELAX:
+ disable_relaxation = TRUE;
+ break;
+'
+
+# Put these extra cr16-elf routines in ld_${EMULATION_NAME}_emulation
+#
+LDEMUL_AFTER_PARSE=cr16elf_after_parse
+LDEMUL_BEFORE_ALLOCATION=cr16elf_before_allocation
+
diff --git a/contrib/binutils/ld/emultempl/elf-generic.em b/contrib/binutils/ld/emultempl/elf-generic.em
new file mode 100644
index 0000000..7edee8b
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/elf-generic.em
@@ -0,0 +1,81 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006 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.,
+# 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from elf32.em and from ELF targets that use
+# generic.em.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+
+static void
+gld${EMULATION_NAME}_map_segments (bfd_boolean need_layout)
+{
+ int tries = 10;
+
+ do
+ {
+ if (need_layout)
+ {
+ lang_reset_memory_regions ();
+
+ /* Resize the sections. */
+ lang_size_sections (NULL, TRUE);
+
+ /* Redo special stuff. */
+ ldemul_after_allocation ();
+
+ /* Do the assignments again. */
+ lang_do_assignments ();
+
+ need_layout = FALSE;
+ }
+
+ if (output_bfd->xvec->flavour == bfd_target_elf_flavour
+ && !link_info.relocatable)
+ {
+ bfd_size_type phdr_size;
+
+ phdr_size = elf_tdata (output_bfd)->program_header_size;
+ /* If we don't have user supplied phdrs, throw away any
+ previous linker generated program headers. */
+ if (lang_phdr_list == NULL)
+ elf_tdata (output_bfd)->segment_map = NULL;
+ if (!_bfd_elf_map_sections_to_segments (output_bfd, &link_info))
+ einfo ("%F%P: map sections to segments failed: %E\n");
+
+ if (phdr_size != elf_tdata (output_bfd)->program_header_size)
+ {
+ if (tries > 6)
+ /* The first few times we allow any change to
+ phdr_size . */
+ need_layout = TRUE;
+ else if (phdr_size < elf_tdata (output_bfd)->program_header_size)
+ /* After that we only allow the size to grow. */
+ need_layout = TRUE;
+ else
+ elf_tdata (output_bfd)->program_header_size = phdr_size;
+ }
+ }
+ }
+ while (need_layout && --tries);
+
+ if (tries == 0)
+ einfo (_("%P%F: looping in map_segments"));
+}
+EOF
diff --git a/contrib/binutils/ld/emultempl/elf32.em b/contrib/binutils/ld/emultempl/elf32.em
index 1925979..d9f6fbb 100644
--- a/contrib/binutils/ld/emultempl/elf32.em
+++ b/contrib/binutils/ld/emultempl/elf32.em
@@ -13,7 +13,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* ${ELFSIZE} bit ELF emulation code for ${EMULATION_NAME}
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
ELF support by Ian Lance Taylor <ian@cygnus.com>
@@ -35,9 +35,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_IS_${EMULATION_NAME}
-#include "config.h"
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "getopt.h"
@@ -60,8 +59,7 @@ static void gld${EMULATION_NAME}_before_parse (void);
static void gld${EMULATION_NAME}_after_open (void);
static void gld${EMULATION_NAME}_before_allocation (void);
static bfd_boolean gld${EMULATION_NAME}_place_orphan (asection *s);
-static void gld${EMULATION_NAME}_layout_sections_again (void);
-static void gld${EMULATION_NAME}_finish (void) ATTRIBUTE_UNUSED;
+static void gld${EMULATION_NAME}_finish (void);
EOF
@@ -79,6 +77,7 @@ fi
# Import any needed special functions and/or overrides.
#
+. ${srcdir}/emultempl/elf-generic.em
if test -n "$EXTRA_EM_FILE" ; then
. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
fi
@@ -365,7 +364,7 @@ case ${target} in
struct bfd_link_needed_list *l;
for (l = needed; l != NULL; l = l->next)
- if (strncmp (l->name, "libc.so", 7) == 0)
+ if (CONST_STRNEQ (l->name, "libc.so"))
break;
if (l == NULL)
{
@@ -459,7 +458,7 @@ gld${EMULATION_NAME}_search_needed (const char *path,
{
char *filename, *sset;
- s = strchr (path, ':');
+ s = strchr (path, config.rpath_separator);
if (s == NULL)
s = path + strlen (path);
@@ -492,7 +491,8 @@ EOF
if [ "x${USE_LIBPATH}" = xyes ] ; then
cat >>e${EMULATION_NAME}.c <<EOF
-/* Add the sysroot to every entry in a colon-separated path. */
+/* Add the sysroot to every entry in a path separated by
+ config.rpath_separator. */
static char *
gld${EMULATION_NAME}_add_sysroot (const char *path)
@@ -504,7 +504,7 @@ gld${EMULATION_NAME}_add_sysroot (const char *path)
colons = 0;
i = 0;
while (path[i])
- if (path[i++] == ':')
+ if (path[i++] == config.rpath_separator)
colons++;
if (path[i])
@@ -516,7 +516,7 @@ gld${EMULATION_NAME}_add_sysroot (const char *path)
p = ret + strlen (ret);
i = 0;
while (path[i])
- if (path[i] == ':')
+ if (path[i] == config.rpath_separator)
{
*p++ = path[i++];
strcpy (p, ld_sysroot);
@@ -698,7 +698,7 @@ gld${EMULATION_NAME}_parse_ld_so_conf
if (p[0] == '\0')
continue;
- if (!strncmp (p, "include", 7) && (p[7] == ' ' || p[7] == '\t'))
+ if (CONST_STRNEQ (p, "include") && (p[7] == ' ' || p[7] == '\t'))
{
char *dir, c;
p += 8;
@@ -745,7 +745,7 @@ gld${EMULATION_NAME}_parse_ld_so_conf
info->alloc += p - dir + 256;
info->path = xrealloc (info->path, info->alloc);
}
- info->path[info->len++] = ':';
+ info->path[info->len++] = config.rpath_separator;
}
memcpy (info->path + info->len, dir, p - dir);
info->len += p - dir;
@@ -865,6 +865,42 @@ gld${EMULATION_NAME}_after_open (void)
{
struct bfd_link_needed_list *needed, *l;
+ if (link_info.eh_frame_hdr
+ && ! link_info.traditional_format
+ && ! link_info.relocatable)
+ {
+ struct elf_link_hash_table *htab;
+
+ htab = elf_hash_table (&link_info);
+ if (is_elf_hash_table (htab))
+ {
+ bfd *abfd;
+ asection *s;
+
+ for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
+ {
+ s = bfd_get_section_by_name (abfd, ".eh_frame");
+ if (s && s->size > 8 && !bfd_is_abs_section (s->output_section))
+ break;
+ }
+ if (abfd)
+ {
+ const struct elf_backend_data *bed;
+
+ bed = get_elf_backend_data (abfd);
+ s = bfd_make_section_with_flags (abfd, ".eh_frame_hdr",
+ bed->dynamic_sec_flags
+ | SEC_READONLY);
+ if (s != NULL
+ && bfd_set_section_alignment (abfd, s, 2))
+ htab->eh_info.hdr_sec = s;
+ else
+ einfo ("%P: warning: Cannot create .eh_frame_hdr section,"
+ " --eh-frame-hdr ignored.\n");
+ }
+ }
+ }
+
/* We only need to worry about this when doing a final link. */
if (link_info.relocatable || !link_info.executable)
return;
@@ -1180,10 +1216,8 @@ ${ELF_INTERPRETER_SET_DEFAULT}
{
asection *s;
bfd_size_type sz;
- bfd_size_type prefix_len;
char *msg;
bfd_boolean ret;
- const char * gnu_warning_prefix = _("warning: ");
if (is->just_syms_flag)
continue;
@@ -1193,14 +1227,12 @@ ${ELF_INTERPRETER_SET_DEFAULT}
continue;
sz = s->size;
- prefix_len = strlen (gnu_warning_prefix);
- msg = xmalloc ((size_t) (prefix_len + sz + 1));
- strcpy (msg, gnu_warning_prefix);
- if (! bfd_get_section_contents (is->the_bfd, s, msg + prefix_len,
+ msg = xmalloc ((size_t) (sz + 1));
+ if (! bfd_get_section_contents (is->the_bfd, s, msg,
(file_ptr) 0, sz))
einfo ("%F%B: Can't read contents of section .gnu.warning: %E\n",
is->the_bfd);
- msg[prefix_len + sz] = '\0';
+ msg[sz] = '\0';
ret = link_info.callbacks->warning (&link_info, msg,
(const char *) NULL,
is->the_bfd, (asection *) NULL,
@@ -1208,13 +1240,20 @@ ${ELF_INTERPRETER_SET_DEFAULT}
ASSERT (ret);
free (msg);
- /* Clobber the section size, so that we don't waste copying the
- warning into the output file. */
+ /* Clobber the section size, so that we don't waste space
+ copying the warning into the output file. If we've already
+ sized the output section, adjust its size. The adjustment
+ is on rawsize because targets that size sections early will
+ have called lang_reset_memory_regions after sizing. */
+ if (s->output_section != NULL
+ && s->output_section->rawsize >= s->size)
+ s->output_section->rawsize -= s->size;
+
s->size = 0;
- /* Also set SEC_EXCLUDE, so that symbols defined in the warning
- section don't get copied to the output. */
- s->flags |= SEC_EXCLUDE;
+ /* Also set SEC_EXCLUDE, so that local symbols defined in the
+ warning section don't get copied to the output. */
+ s->flags |= SEC_EXCLUDE | SEC_KEEP;
}
}
@@ -1326,7 +1365,7 @@ output_rel_find (asection *sec, int isdyn)
lookup = lookup->next)
{
if (lookup->constraint != -1
- && strncmp (".rel", lookup->name, 4) == 0)
+ && CONST_STRNEQ (lookup->name, ".rel"))
{
int lookrela = lookup->name[4] == 'a';
@@ -1435,7 +1474,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
default:
break;
}
- else if (strncmp (secname, ".rel", 4) == 0)
+ else if (CONST_STRNEQ (secname, ".rel"))
{
secname = secname[4] == 'a' ? ".rela.dyn" : ".rel.dyn";
isdyn = 1;
@@ -1483,7 +1522,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
sections into the .text section to get them out of the way. */
if (link_info.executable
&& ! link_info.relocatable
- && strncmp (secname, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0
+ && CONST_STRNEQ (secname, ".gnu.warning.")
&& hold[orphan_text].os != NULL)
{
lang_add_section (&hold[orphan_text].os->children, s,
@@ -1502,7 +1541,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
;
else if ((s->flags & SEC_LOAD) != 0
&& ((iself && sh_type == SHT_NOTE)
- || (!iself && strncmp (secname, ".note", 5) == 0)))
+ || (!iself && CONST_STRNEQ (secname, ".note"))))
place = &hold[orphan_interp];
else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
place = &hold[orphan_bss];
@@ -1511,7 +1550,7 @@ gld${EMULATION_NAME}_place_orphan (asection *s)
else if ((s->flags & SEC_READONLY) == 0)
place = &hold[orphan_data];
else if (((iself && (sh_type == SHT_RELA || sh_type == SHT_REL))
- || (!iself && strncmp (secname, ".rel", 4) == 0))
+ || (!iself && CONST_STRNEQ (secname, ".rel")))
&& (s->flags & SEC_LOAD) != 0)
place = &hold[orphan_rel];
else if ((s->flags & SEC_CODE) == 0)
@@ -1560,26 +1599,11 @@ if test x"$LDEMUL_FINISH" != xgld"$EMULATION_NAME"_finish; then
cat >>e${EMULATION_NAME}.c <<EOF
static void
-gld${EMULATION_NAME}_layout_sections_again (void)
-{
- lang_reset_memory_regions ();
-
- /* Resize the sections. */
- lang_size_sections (NULL, TRUE);
-
- /* Redo special stuff. */
- ldemul_after_allocation ();
-
- /* Do the assignments again. */
- lang_do_assignments ();
-}
-
-static void
gld${EMULATION_NAME}_finish (void)
{
- if (bfd_elf_discard_info (output_bfd, &link_info))
- gld${EMULATION_NAME}_layout_sections_again ();
+ bfd_boolean need_layout = bfd_elf_discard_info (output_bfd, &link_info);
+ gld${EMULATION_NAME}_map_segments (need_layout);
finish_default ();
}
EOF
@@ -1734,6 +1758,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define OPTION_GROUP (OPTION_ENABLE_NEW_DTAGS + 1)
#define OPTION_EH_FRAME_HDR (OPTION_GROUP + 1)
#define OPTION_EXCLUDE_LIBS (OPTION_EH_FRAME_HDR + 1)
+#define OPTION_HASH_STYLE (OPTION_EXCLUDE_LIBS + 1)
static void
gld${EMULATION_NAME}_add_options
@@ -1750,6 +1775,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
{"enable-new-dtags", no_argument, NULL, OPTION_ENABLE_NEW_DTAGS},
{"eh-frame-hdr", no_argument, NULL, OPTION_EH_FRAME_HDR},
{"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
+ {"hash-style", required_argument, NULL, OPTION_HASH_STYLE},
{"Bgroup", no_argument, NULL, OPTION_GROUP},
EOF
fi
@@ -1806,6 +1832,22 @@ cat >>e${EMULATION_NAME}.c <<EOF
add_excluded_libs (optarg);
break;
+ case OPTION_HASH_STYLE:
+ link_info.emit_hash = FALSE;
+ link_info.emit_gnu_hash = FALSE;
+ if (strcmp (optarg, "sysv") == 0)
+ link_info.emit_hash = TRUE;
+ else if (strcmp (optarg, "gnu") == 0)
+ link_info.emit_gnu_hash = TRUE;
+ else if (strcmp (optarg, "both") == 0)
+ {
+ link_info.emit_hash = TRUE;
+ link_info.emit_gnu_hash = TRUE;
+ }
+ else
+ einfo (_("%P%F: invalid hash style \`%s'\n"), optarg);
+ break;
+
case 'z':
if (strcmp (optarg, "initfirst") == 0)
link_info.flags_1 |= (bfd_vma) DF_1_INITFIRST;
@@ -1826,6 +1868,11 @@ cat >>e${EMULATION_NAME}.c <<EOF
link_info.flags |= (bfd_vma) DF_BIND_NOW;
link_info.flags_1 |= (bfd_vma) DF_1_NOW;
}
+ else if (strcmp (optarg, "lazy") == 0)
+ {
+ link_info.flags &= ~(bfd_vma) DF_BIND_NOW;
+ link_info.flags_1 &= ~(bfd_vma) DF_1_NOW;
+ }
else if (strcmp (optarg, "origin") == 0)
{
link_info.flags |= (bfd_vma) DF_ORIGIN;
@@ -1851,10 +1898,41 @@ cat >>e${EMULATION_NAME}.c <<EOF
link_info.noexecstack = TRUE;
link_info.execstack = FALSE;
}
+EOF
+
+ if test -n "$COMMONPAGESIZE"; then
+cat >>e${EMULATION_NAME}.c <<EOF
else if (strcmp (optarg, "relro") == 0)
link_info.relro = TRUE;
else if (strcmp (optarg, "norelro") == 0)
link_info.relro = FALSE;
+EOF
+ fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+ else if (CONST_STRNEQ (optarg, "max-page-size="))
+ {
+ char *end;
+
+ config.maxpagesize = strtoul (optarg + 14, &end, 0);
+ if (*end || (config.maxpagesize & (config.maxpagesize - 1)) != 0)
+ einfo (_("%P%F: invalid maxium page size \`%s'\n"),
+ optarg + 14);
+ ASSERT (default_target != NULL);
+ bfd_emul_set_maxpagesize (default_target, config.maxpagesize);
+ }
+ else if (CONST_STRNEQ (optarg, "common-page-size="))
+ {
+ char *end;
+ config.commonpagesize = strtoul (optarg + 17, &end, 0);
+ if (*end
+ || (config.commonpagesize & (config.commonpagesize - 1)) != 0)
+ einfo (_("%P%F: invalid common page size \`%s'\n"),
+ optarg + 17);
+ ASSERT (default_target != NULL);
+ bfd_emul_set_commonpagesize (default_target,
+ config.commonpagesize);
+ }
/* What about the other Solaris -z options? FIXME. */
break;
EOF
@@ -1888,11 +1966,13 @@ cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" --disable-new-dtags\tDisable new dynamic tags\n"));
fprintf (file, _(" --enable-new-dtags\tEnable new dynamic tags\n"));
fprintf (file, _(" --eh-frame-hdr\tCreate .eh_frame_hdr section\n"));
+ fprintf (file, _(" --hash-style=STYLE\tSet hash style to sysv, gnu or both\n"));
fprintf (file, _(" -z combreloc\t\tMerge dynamic relocs into one section and sort\n"));
fprintf (file, _(" -z defs\t\tReport unresolved symbols in object files.\n"));
fprintf (file, _(" -z execstack\t\tMark executable as requiring executable stack\n"));
fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n"));
fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n"));
+ fprintf (file, _(" -z lazy\t\tMark object lazy runtime binding (default)\n"));
fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n"));
fprintf (file, _(" -z muldefs\t\tAllow multiple definitions\n"));
fprintf (file, _(" -z nocombreloc\tDon't merge dynamic relocs into one section\n"));
@@ -1902,10 +1982,28 @@ cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" -z nodlopen\t\tMark DSO not available to dlopen\n"));
fprintf (file, _(" -z nodump\t\tMark DSO not available to dldump\n"));
fprintf (file, _(" -z noexecstack\tMark executable as not requiring executable stack\n"));
+EOF
+
+ if test -n "$COMMONPAGESIZE"; then
+cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" -z norelro\t\tDon't create RELRO program header\n"));
+EOF
+ fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" -z now\t\tMark object non-lazy runtime binding\n"));
fprintf (file, _(" -z origin\t\tMark object requiring immediate \$ORIGIN processing\n\t\t\t at runtime\n"));
+EOF
+
+ if test -n "$COMMONPAGESIZE"; then
+cat >>e${EMULATION_NAME}.c <<EOF
fprintf (file, _(" -z relro\t\tCreate RELRO program header\n"));
+EOF
+ fi
+
+cat >>e${EMULATION_NAME}.c <<EOF
+ fprintf (file, _(" -z max-page-size=SIZE\tSet maximum page size to SIZE\n"));
+ fprintf (file, _(" -z common-page-size=SIZE\n\t\t\tSet common page size to SIZE\n"));
fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n"));
EOF
fi
diff --git a/contrib/binutils/ld/emultempl/genelf.em b/contrib/binutils/ld/emultempl/genelf.em
new file mode 100644
index 0000000..dae75a1
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/genelf.em
@@ -0,0 +1,39 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from generic.em
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+#include "elf-bfd.h"
+
+EOF
+. ${srcdir}/emultempl/elf-generic.em
+cat >>e${EMULATION_NAME}.c <<EOF
+
+static void
+gld${EMULATION_NAME}_finish (void)
+{
+ gld${EMULATION_NAME}_map_segments (FALSE);
+ finish_default ();
+}
+EOF
+# Put these extra routines in ld_${EMULATION_NAME}_emulation
+#
+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em
index 985cdf8..9ea6d02 100644
--- a/contrib/binutils/ld/emultempl/generic.em
+++ b/contrib/binutils/ld/emultempl/generic.em
@@ -4,8 +4,8 @@ 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, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2004,
+ 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -26,8 +26,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "ld.h"
diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em
index 996a7ea..48ac046 100644
--- a/contrib/binutils/ld/emultempl/linux.em
+++ b/contrib/binutils/ld/emultempl/linux.em
@@ -10,7 +10,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* Linux a.out emulation code for ${EMULATION_NAME}
Copyright 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
Linux support by Eric Youngdale <ericy@cais.cais.com>
@@ -32,8 +32,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "ld.h"
diff --git a/contrib/binutils/ld/emultempl/mipself.em b/contrib/binutils/ld/emultempl/mipself.em
new file mode 100644
index 0000000..846cdc5
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/mipself.em
@@ -0,0 +1,37 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+cat >>e${EMULATION_NAME}.c <<EOF
+static void
+mips_after_parse (void)
+{
+ /* .gnu.hash and the MIPS ABI require .dynsym to be sorted in different
+ ways. .gnu.hash needs symbols to be grouped by hash code whereas the
+ MIPS ABI requires a mapping between the GOT and the symbol table. */
+ if (link_info.emit_gnu_hash)
+ {
+ einfo ("%X%P: .gnu.hash is incompatible with the MIPS ABI\n");
+ link_info.emit_hash = TRUE;
+ link_info.emit_gnu_hash = FALSE;
+ }
+ after_parse_default ();
+}
+EOF
+
+LDEMUL_AFTER_PARSE=mips_after_parse
diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em
index d4c0204..e9b316a 100644
--- a/contrib/binutils/ld/emultempl/pe.em
+++ b/contrib/binutils/ld/emultempl/pe.em
@@ -11,7 +11,7 @@ rm -f e${EMULATION_NAME}.c
cat >>e${EMULATION_NAME}.c <<EOF
/* This file is part of GLD, the Gnu Linker.
Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005 Free Software Foundation, Inc.
+ 2005, 2006, 2007 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
@@ -37,17 +37,20 @@ cat >>e${EMULATION_NAME}.c <<EOF
#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"
+#if defined(TARGET_IS_armpe) \
+ || defined(TARGET_IS_arm_epoc_pe) \
+ || defined(TARGET_IS_arm_wince_pe)
+#define bfd_arm_allocate_interworking_sections \
+ bfd_${EMULATION_NAME}_allocate_interworking_sections
+#define bfd_arm_get_bfd_for_interworking \
+ bfd_${EMULATION_NAME}_get_bfd_for_interworking
+#define bfd_arm_process_before_allocation \
+ bfd_${EMULATION_NAME}_process_before_allocation
+#endif
+
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "getopt.h"
#include "libiberty.h"
@@ -85,10 +88,12 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define PE_DEF_SECTION_ALIGNMENT ${OVERRIDE_SECTION_ALIGNMENT}
#endif
-#if defined(TARGET_IS_i386pe)
-#define DLL_SUPPORT
-#endif
-#if defined(TARGET_IS_shpe) || defined(TARGET_IS_mipspe) || defined(TARGET_IS_armpe)
+#if defined(TARGET_IS_i386pe) \
+ || defined(TARGET_IS_shpe) \
+ || defined(TARGET_IS_mipspe) \
+ || defined(TARGET_IS_armpe) \
+ || defined(TARGET_IS_arm_epoc_pe) \
+ || defined(TARGET_IS_arm_wince_pe)
#define DLL_SUPPORT
#endif
@@ -99,7 +104,8 @@ cat >>e${EMULATION_NAME}.c <<EOF
#undef PE_DEF_SECTION_ALIGNMENT
#undef PE_DEF_FILE_ALIGNMENT
#define NT_EXE_IMAGE_BASE 0x00010000
-#ifdef TARGET_IS_armpe
+
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe)
#define PE_DEF_SECTION_ALIGNMENT 0x00001000
#define PE_DEF_SUBSYSTEM 9
#else
@@ -109,6 +115,7 @@ cat >>e${EMULATION_NAME}.c <<EOF
#define PE_DEF_FILE_ALIGNMENT 0x00000200
#endif
+#define U(S) ${INITIAL_SYMBOL_CHAR} S
static struct internal_extra_pe_aouthdr pe;
static int dll;
@@ -139,7 +146,7 @@ gld_${EMULATION_NAME}_before_parse (void)
link_info.pei386_runtime_pseudo_reloc = -1;
#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
-#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
+#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe || defined TARGET_IS_arm_wince_pe
lang_default_entry ("WinMainCRTStartup");
#else
lang_default_entry ("_WinMainCRTStartup");
@@ -282,8 +289,8 @@ static definfo init[] =
D(MinorOperatingSystemVersion,"__minor_os_version__", 0),
D(MajorImageVersion,"__major_image_version__", 1),
D(MinorImageVersion,"__minor_image_version__", 0),
-#ifdef TARGET_IS_armpe
- D(MajorSubsystemVersion,"__major_subsystem_version__", 2),
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_wince_pe)
+ D(MajorSubsystemVersion,"__major_subsystem_version__", 3),
#else
D(MajorSubsystemVersion,"__major_subsystem_version__", 4),
#endif
@@ -394,7 +401,7 @@ set_pe_subsystem (void)
{ "windows", 2, "WinMainCRTStartup" },
{ "console", 3, "mainCRTStartup" },
{ "posix", 7, "__PosixProcessStartup"},
- { "wince", 9, "_WinMainCRTStartup" },
+ { "wince", 9, "WinMainCRTStartup" },
{ "xbox", 14, "mainCRTStartup" },
{ NULL, 0, NULL }
};
@@ -919,15 +926,14 @@ pe_find_data_imports (void)
for (i = 0; i < nsyms; i++)
{
- if (memcmp (symbols[i]->name, "__head_",
- sizeof ("__head_") - 1))
+ if (! CONST_STRNEQ (symbols[i]->name, U ("_head_")))
continue;
if (pe_dll_extra_pe_debug)
printf ("->%s\n", symbols[i]->name);
pe_data_import_dll = (char*) (symbols[i]->name +
- sizeof ("__head_") - 1);
+ sizeof (U ("_head_")) - 1);
break;
}
@@ -983,7 +989,7 @@ gld_${EMULATION_NAME}_after_open (void)
including an internal BFD header. */
if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == 0)
- einfo (_("%F%P: PE operations on non PE file.\n"));
+ einfo (_("%F%P: cannot perform PE operations on non PE output file '%B'.\n"), output_bfd);
pe_data (output_bfd)->pe_opthdr = pe;
pe_data (output_bfd)->dll = init[DLLOFF].value;
@@ -997,22 +1003,21 @@ gld_${EMULATION_NAME}_after_open (void)
pe_find_data_imports ();
-#if ! (defined (TARGET_IS_i386pe) || defined (TARGET_IS_armpe))
- if (link_info.shared)
-#else
+#if defined (TARGET_IS_i386pe) \
+ || defined (TARGET_IS_armpe) \
+ || defined (TARGET_IS_arm_epoc_pe) \
+ || defined (TARGET_IS_arm_wince_pe)
if (!link_info.relocatable)
-#endif
pe_dll_build_sections (output_bfd, &link_info);
-
-#ifndef TARGET_IS_i386pe
-#ifndef TARGET_IS_armpe
else
pe_exe_build_sections (output_bfd, &link_info);
+#else
+ if (link_info.shared)
+ pe_dll_build_sections (output_bfd, &link_info);
#endif
-#endif
-#endif
+#endif /* DLL_SUPPORT */
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
if (strstr (bfd_get_target (output_bfd), "arm") == NULL)
{
/* The arm backend needs special fields in the output hash structure.
@@ -1026,7 +1031,7 @@ gld_${EMULATION_NAME}_after_open (void)
/* Find a BFD that can hold the interworking stubs. */
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- if (bfd_arm_pe_get_bfd_for_interworking (is->the_bfd, & link_info))
+ if (bfd_arm_get_bfd_for_interworking (is->the_bfd, & link_info))
break;
}
}
@@ -1055,7 +1060,7 @@ gld_${EMULATION_NAME}_after_open (void)
{
if (strcmp (sec->name, ".idata\$2") == 0)
idata2 = 1;
- if (strncmp (sec->name, ".idata\$", 7) == 0)
+ if (CONST_STRNEQ (sec->name, ".idata\$"))
is_imp = 1;
reloc_count += sec->reloc_count;
}
@@ -1245,6 +1250,74 @@ gld_${EMULATION_NAME}_after_open (void)
}
}
}
+
+ {
+ /* The following chunk of code tries to identify jump stubs in
+ import libraries which are dead code and eliminates them
+ from the final link. For each exported symbol <sym>, there
+ is a object file in the import library with a .text section
+ and several .idata$* sections. The .text section contains the
+ symbol definition for <sym> which is a jump stub of the form
+ jmp *__imp_<sym>. The .idata$5 contains the symbol definition
+ for __imp_<sym> which is the address of the slot for <sym> in
+ the import address table. When a symbol is imported explicitly
+ using __declspec(dllimport) declaration, the compiler generates
+ a reference to __imp_<sym> which directly resolves to the
+ symbol in .idata$5, in which case the jump stub code is not
+ needed. The following code tries to identify jump stub sections
+ in import libraries which are not referred to by anyone and
+ marks them for exclusion from the final link. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (is->the_bfd->my_archive)
+ {
+ int is_imp = 0;
+ asection *sec, *stub_sec = NULL;
+
+ /* See if this is an import library thunk. */
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ if (strncmp (sec->name, ".idata\$", 7) == 0)
+ is_imp = 1;
+ /* The section containing the jmp stub has code
+ and has a reloc. */
+ if ((sec->flags & SEC_CODE) && sec->reloc_count)
+ stub_sec = sec;
+ }
+
+ if (is_imp && stub_sec)
+ {
+ long symsize;
+ asymbol **symbols;
+ long src_count;
+ struct bfd_link_hash_entry * blhe;
+
+ symsize = bfd_get_symtab_upper_bound (is->the_bfd);
+ symbols = xmalloc (symsize);
+ symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
+
+ for (src_count = 0; src_count < symsize; src_count++)
+ {
+ if (symbols[src_count]->section->id == stub_sec->id)
+ {
+ /* This symbol belongs to the section containing
+ the stub. */
+ blhe = bfd_link_hash_lookup (link_info.hash,
+ symbols[src_count]->name,
+ FALSE, FALSE, TRUE);
+ /* If the symbol in the stub section has no other
+ undefined references, exclude the stub section
+ from the final link. */
+ if (blhe && (blhe->type == bfd_link_hash_defined)
+ && (blhe->u.undef.next == NULL))
+ stub_sec->flags |= SEC_EXCLUDE;
+ }
+ }
+ free (symbols);
+ }
+ }
+ }
+ }
}
static void
@@ -1267,7 +1340,7 @@ gld_${EMULATION_NAME}_before_allocation (void)
ppc_allocate_toc_section (&link_info);
#endif /* TARGET_IS_ppcpe */
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
/* FIXME: we should be able to set the size of the interworking stub
section.
@@ -1277,7 +1350,7 @@ gld_${EMULATION_NAME}_before_allocation (void)
{
LANG_FOR_EACH_INPUT_STATEMENT (is)
{
- if (! bfd_arm_pe_process_before_allocation
+ if (! bfd_arm_process_before_allocation
(is->the_bfd, & link_info, support_old_code))
{
/* xgettext:c-format */
@@ -1288,8 +1361,8 @@ gld_${EMULATION_NAME}_before_allocation (void)
}
/* We have seen it all. Allocate it, and carry on. */
- bfd_arm_pe_allocate_interworking_sections (& link_info);
-#endif /* TARGET_IS_armpe */
+ bfd_arm_allocate_interworking_sections (& link_info);
+#endif /* TARGET_IS_armpe || TARGET_IS_arm_epoc_pe || TARGET_IS_arm_wince_pe */
before_allocation_default ();
}
@@ -1338,7 +1411,7 @@ gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIB
{
struct bfd_link_hash_entry *h;
- sprintf (buf, "_%s", pe_def_file->exports[i].internal_name);
+ sprintf (buf, "%s%s", U (""), pe_def_file->exports[i].internal_name);
h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
if (h == (struct bfd_link_hash_entry *) NULL)
@@ -1404,19 +1477,14 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT
#ifdef TARGET_IS_armpe
pe_dll_id_target ("pei-arm-little");
#endif
- if (bfd_get_format (entry->the_bfd) == bfd_object)
- {
- char fbuf[LD_PATHMAX + 1];
- const char *ext;
-
- if (REALPATH (entry->filename, fbuf) == NULL)
- strncpy (fbuf, entry->filename, sizeof (fbuf));
-
- ext = fbuf + strlen (fbuf) - 4;
-
- if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0)
- return pe_implied_import_dll (fbuf);
- }
+#ifdef TARGET_IS_arm_epoc_pe
+ pe_dll_id_target ("epoc-pei-arm-little");
+#endif
+#ifdef TARGET_IS_arm_wince_pe
+ pe_dll_id_target ("pei-arm-wince-little");
+#endif
+ if (pe_bfd_is_dll (entry->the_bfd))
+ return pe_implied_import_dll (entry->filename);
#endif
return FALSE;
}
@@ -1424,7 +1492,7 @@ gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUT
static void
gld_${EMULATION_NAME}_finish (void)
{
-#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe)
+#if defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe)
struct bfd_link_hash_entry * h;
if (thumb_entry_symbol != NULL)
@@ -1464,7 +1532,7 @@ gld_${EMULATION_NAME}_finish (void)
else
einfo (_("%P: warning: connot find thumb start symbol %s\n"), thumb_entry_symbol);
}
-#endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) */
+#endif /* defined(TARGET_IS_armpe) || defined(TARGET_IS_arm_epoc_pe) || defined(TARGET_IS_arm_wince_pe) */
finish_default ();
@@ -1677,87 +1745,100 @@ gld_${EMULATION_NAME}_open_dynamic_archive
(const char *arch ATTRIBUTE_UNUSED, search_dirs_type *search,
lang_input_statement_type *entry)
{
+ static const struct
+ {
+ const char * format;
+ bfd_boolean use_prefix;
+ }
+ libname_fmt [] =
+ {
+ /* Preferred explicit import library for dll's. */
+ { "lib%s.dll.a", FALSE },
+ /* Alternate explicit import library for dll's. */
+ { "%s.dll.a", FALSE },
+ /* "libfoo.a" could be either an import lib or a static lib.
+ For backwards compatibility, libfoo.a needs to precede
+ libfoo.dll and foo.dll in the search. */
+ { "lib%s.a", FALSE },
+ /* The 'native' spelling of an import lib name is "foo.lib". */
+ { "%s.lib", FALSE },
+#ifdef DLL_SUPPORT
+ /* Try "<prefix>foo.dll" (preferred dll name, if specified). */
+ { "%s%s.dll", TRUE },
+#endif
+ /* Try "libfoo.dll" (default preferred dll name). */
+ { "lib%s.dll", FALSE },
+ /* Finally try 'native' dll name "foo.dll". */
+ { "%s.dll", FALSE },
+ /* Note: If adding more formats to this table, make sure to check to
+ see if their length is longer than libname_fmt[0].format, and if
+ so, update the call to xmalloc() below. */
+ { NULL, FALSE }
+ };
+ static unsigned int format_max_len = 0;
const char * filename;
- char * string;
+ char * full_string;
+ char * base_string;
+ unsigned int i;
+
if (! entry->is_archive)
return FALSE;
filename = entry->filename;
- string = (char *) xmalloc (strlen (search->name)
- + strlen (filename)
- + sizeof "/lib.a.dll"
+ if (format_max_len == 0)
+ /* We need to allow space in the memory that we are going to allocate
+ for the characters in the format string. Since the format array is
+ static we only need to calculate this information once. In theory
+ this value could also be computed statically, but this introduces
+ the possibility for a discrepancy and hence a possible memory
+ corruption. The lengths we compute here will be too long because
+ they will include any formating characters (%s) in the strings, but
+ this will not matter. */
+ for (i = 0; libname_fmt[i].format; i++)
+ if (format_max_len < strlen (libname_fmt[i].format))
+ format_max_len = strlen (libname_fmt[i].format);
+
+ full_string = xmalloc (strlen (search->name)
+ + strlen (filename)
+ + format_max_len
#ifdef DLL_SUPPORT
- + (pe_dll_search_prefix ? strlen (pe_dll_search_prefix) : 0)
+ + (pe_dll_search_prefix
+ ? strlen (pe_dll_search_prefix) : 0)
#endif
- + 1);
+ /* Allow for the terminating NUL and for the path
+ separator character that is inserted between
+ search->name and the start of the format string. */
+ + 2);
- /* Try "libfoo.dll.a" first (preferred explicit import library for dll's. */
- sprintf (string, "%s/lib%s.dll.a", search->name, filename);
+ sprintf (full_string, "%s/", search->name);
+ base_string = full_string + strlen (full_string);
- if (! ldfile_try_open_bfd (string, entry))
+ for (i = 0; libname_fmt[i].format; i++)
{
- /* Try "foo.dll.a" next (alternate explicit import library for dll's. */
- sprintf (string, "%s/%s.dll.a", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
+#ifdef DLL_SUPPORT
+ if (libname_fmt[i].use_prefix)
{
- /* Try libfoo.a next. Normally, this would be interpreted as a static
- library, but it *could* be an import library. For backwards compatibility,
- libfoo.a needs to ==precede== libfoo.dll and foo.dll in the search,
- or sometimes errors occur when building legacy packages.
-
- Putting libfoo.a here means that in a failure case (i.e. the library
- -lfoo is not found) we will search for libfoo.a twice before
- giving up -- once here, and once when searching for a "static" lib.
- for a "static" lib. */
- /* Try "libfoo.a" (import lib, or static lib, but must
- take precedence over dll's). */
- sprintf (string, "%s/lib%s.a", search->name, filename);
- if (! ldfile_try_open_bfd (string, 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))
- {
- /* Try "libfoo.dll" (default preferred dll name). */
- sprintf (string, "%s/lib%s.dll", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- /* Finally, try "foo.dll" (alternate dll name). */
- sprintf (string, "%s/%s.dll", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- free (string);
- return FALSE;
- }
- }
- }
- }
- else /* pe_dll_search_prefix not specified. */
-#endif
- {
- /* Try "libfoo.dll" (preferred dll name). */
- sprintf (string, "%s/lib%s.dll", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- /* Finally, try "foo.dll" (alternate dll name). */
- sprintf (string, "%s/%s.dll", search->name, filename);
- if (! ldfile_try_open_bfd (string, entry))
- {
- free (string);
- return FALSE;
- }
- }
- }
- }
+ if (!pe_dll_search_prefix)
+ continue;
+ sprintf (base_string, libname_fmt[i].format, pe_dll_search_prefix, filename);
}
+ else
+#endif
+ sprintf (base_string, libname_fmt[i].format, filename);
+
+ if (ldfile_try_open_bfd (full_string, entry))
+ break;
+ }
+
+ if (!libname_fmt[i].format)
+ {
+ free (full_string);
+ return FALSE;
}
- entry->filename = string;
+ entry->filename = full_string;
return TRUE;
}
diff --git a/contrib/binutils/ld/emultempl/pep.em b/contrib/binutils/ld/emultempl/pep.em
new file mode 100644
index 0000000..f44471b
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/pep.em
@@ -0,0 +1,1706 @@
+# This shell script emits a C file. -*- C -*-
+# It does some substitutions.
+test -z "${ENTRY}" && ENTRY="_mainCRTStartup"
+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 2006, 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Kai Tietz, OneVision Software GmbH&CoKg. */
+
+/* For WINDOWS_XP64 and higher */
+/* Based on pe.em, but modified for 64 bit support. */
+
+#define TARGET_IS_${EMULATION_NAME}
+
+#define COFF_IMAGE_WITH_PE
+#define COFF_WITH_PE
+#define COFF_WITH_pex64
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bfdlink.h"
+#include "getopt.h"
+#include "libiberty.h"
+#include "ld.h"
+#include "ldmain.h"
+#include "ldexp.h"
+#include "ldlang.h"
+#include "ldfile.h"
+#include "ldemul.h"
+#include <ldgram.h>
+#include "ldlex.h"
+#include "ldmisc.h"
+#include "ldctor.h"
+#include "coff/internal.h"
+
+/* FIXME: See bfd/peXXigen.c for why we include an architecture specific
+ header in generic PE code. */
+#include "coff/x86_64.h"
+#include "coff/pe.h"
+
+/* FIXME: This is a BFD internal header file, and we should not be
+ using it here. */
+#include "../bfd/libcoff.h"
+
+#undef AOUTSZ
+#define AOUTSZ PEPAOUTSZ
+#define PEAOUTHDR PEPAOUTHDR
+
+#include "deffile.h"
+#include "pep-dll.h"
+#include "safe-ctype.h"
+
+/* Permit the emulation parameters to override the default section
+ alignment by setting OVERRIDE_SECTION_ALIGNMENT. FIXME: This makes
+ it seem that include/coff/internal.h should not define
+ PE_DEF_SECTION_ALIGNMENT. */
+#if PE_DEF_SECTION_ALIGNMENT != ${OVERRIDE_SECTION_ALIGNMENT:-PE_DEF_SECTION_ALIGNMENT}
+#undef PE_DEF_SECTION_ALIGNMENT
+#define PE_DEF_SECTION_ALIGNMENT ${OVERRIDE_SECTION_ALIGNMENT}
+#endif
+
+#ifdef TARGET_IS_i386pep
+#define DLL_SUPPORT
+#endif
+
+#if defined(TARGET_IS_i386pep) || ! defined(DLL_SUPPORT)
+#define PE_DEF_SUBSYSTEM 3
+#else
+#undef NT_EXE_IMAGE_BASE
+#define NT_EXE_IMAGE_BASE 0x00010000
+#undef PE_DEF_SECTION_ALIGNMENT
+#define PE_DEF_SUBSYSTEM 2
+#undef PE_DEF_FILE_ALIGNMENT
+#define PE_DEF_FILE_ALIGNMENT 0x00000200
+#define PE_DEF_SECTION_ALIGNMENT 0x00000400
+#endif
+
+
+static struct internal_extra_pe_aouthdr pep;
+static int dll;
+static flagword real_flags = IMAGE_FILE_LARGE_ADDRESS_AWARE;
+static int support_old_code = 0;
+static lang_assignment_statement_type *image_base_statement = 0;
+
+#ifdef DLL_SUPPORT
+static int pep_enable_stdcall_fixup = -1; /* 0=disable 1=enable. */
+static char * pep_out_def_filename = NULL;
+static char * pep_implib_filename = NULL;
+static int pep_enable_auto_image_base = 0;
+static char * pep_dll_search_prefix = NULL;
+#endif
+
+extern const char *output_filename;
+
+static void
+gld_${EMULATION_NAME}_before_parse (void)
+{
+ ldfile_set_output_arch ("${OUTPUT_ARCH}", bfd_arch_`echo ${ARCH} | sed -e 's/:.*//'`);
+ output_filename = "${EXECUTABLE_NAME:-a.exe}";
+#ifdef DLL_SUPPORT
+ config.dynamic_link = TRUE;
+ config.has_shared = 1;
+ link_info.pei386_auto_import = -1;
+ link_info.pei386_runtime_pseudo_reloc = -1;
+
+#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
+ lang_default_entry ("_WinMainCRTStartup");
+#else
+ lang_default_entry ("${ENTRY}");
+#endif
+#endif
+}
+
+/* PE format extra command line options. */
+
+/* Used for setting flags in the PE header. */
+enum options
+{
+ OPTION_BASE_FILE = 300 + 1,
+ OPTION_DLL,
+ OPTION_FILE_ALIGNMENT,
+ OPTION_IMAGE_BASE,
+ OPTION_MAJOR_IMAGE_VERSION,
+ OPTION_MAJOR_OS_VERSION,
+ OPTION_MAJOR_SUBSYSTEM_VERSION,
+ OPTION_MINOR_IMAGE_VERSION,
+ OPTION_MINOR_OS_VERSION,
+ OPTION_MINOR_SUBSYSTEM_VERSION,
+ OPTION_SECTION_ALIGNMENT,
+ OPTION_STACK,
+ OPTION_SUBSYSTEM,
+ OPTION_HEAP,
+ OPTION_SUPPORT_OLD_CODE,
+ OPTION_OUT_DEF,
+ OPTION_EXPORT_ALL,
+ OPTION_EXCLUDE_SYMBOLS,
+ OPTION_KILL_ATS,
+ OPTION_STDCALL_ALIASES,
+ OPTION_ENABLE_STDCALL_FIXUP,
+ OPTION_DISABLE_STDCALL_FIXUP,
+ OPTION_IMPLIB_FILENAME,
+ OPTION_WARN_DUPLICATE_EXPORTS,
+ OPTION_IMP_COMPAT,
+ OPTION_ENABLE_AUTO_IMAGE_BASE,
+ OPTION_DISABLE_AUTO_IMAGE_BASE,
+ OPTION_DLL_SEARCH_PREFIX,
+ OPTION_NO_DEFAULT_EXCLUDES,
+ OPTION_DLL_ENABLE_AUTO_IMPORT,
+ OPTION_DLL_DISABLE_AUTO_IMPORT,
+ OPTION_ENABLE_EXTRA_PE_DEBUG,
+ OPTION_EXCLUDE_LIBS,
+ OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC,
+ OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC
+};
+
+static void
+gld${EMULATION_NAME}_add_options
+ (int ns ATTRIBUTE_UNUSED,
+ char **shortopts ATTRIBUTE_UNUSED,
+ int nl,
+ struct option **longopts,
+ int nrl ATTRIBUTE_UNUSED,
+ struct option **really_longopts ATTRIBUTE_UNUSED)
+{
+ static const struct option xtra_long[] =
+ {
+ /* PE options */
+ {"base-file", required_argument, NULL, OPTION_BASE_FILE},
+ {"dll", no_argument, NULL, OPTION_DLL},
+ {"file-alignment", required_argument, NULL, OPTION_FILE_ALIGNMENT},
+ {"heap", required_argument, NULL, OPTION_HEAP},
+ {"image-base", required_argument, NULL, OPTION_IMAGE_BASE},
+ {"major-image-version", required_argument, NULL, OPTION_MAJOR_IMAGE_VERSION},
+ {"major-os-version", required_argument, NULL, OPTION_MAJOR_OS_VERSION},
+ {"major-subsystem-version", required_argument, NULL, OPTION_MAJOR_SUBSYSTEM_VERSION},
+ {"minor-image-version", required_argument, NULL, OPTION_MINOR_IMAGE_VERSION},
+ {"minor-os-version", required_argument, NULL, OPTION_MINOR_OS_VERSION},
+ {"minor-subsystem-version", required_argument, NULL, OPTION_MINOR_SUBSYSTEM_VERSION},
+ {"section-alignment", required_argument, NULL, OPTION_SECTION_ALIGNMENT},
+ {"stack", required_argument, NULL, OPTION_STACK},
+ {"subsystem", required_argument, NULL, OPTION_SUBSYSTEM},
+ {"support-old-code", no_argument, NULL, OPTION_SUPPORT_OLD_CODE},
+#ifdef DLL_SUPPORT
+ /* getopt allows abbreviations, so we do this to stop it
+ from treating -o as an abbreviation for this option. */
+ {"output-def", required_argument, NULL, OPTION_OUT_DEF},
+ {"output-def", required_argument, NULL, OPTION_OUT_DEF},
+ {"export-all-symbols", no_argument, NULL, OPTION_EXPORT_ALL},
+ {"exclude-symbols", required_argument, NULL, OPTION_EXCLUDE_SYMBOLS},
+ {"exclude-libs", required_argument, NULL, OPTION_EXCLUDE_LIBS},
+ {"kill-at", no_argument, NULL, OPTION_KILL_ATS},
+ {"add-stdcall-alias", no_argument, NULL, OPTION_STDCALL_ALIASES},
+ {"enable-stdcall-fixup", no_argument, NULL, OPTION_ENABLE_STDCALL_FIXUP},
+ {"disable-stdcall-fixup", no_argument, NULL, OPTION_DISABLE_STDCALL_FIXUP},
+ {"out-implib", required_argument, NULL, OPTION_IMPLIB_FILENAME},
+ {"warn-duplicate-exports", no_argument, NULL, OPTION_WARN_DUPLICATE_EXPORTS},
+ /* getopt() allows abbreviations, so we do this to stop it from
+ treating -c as an abbreviation for these --compat-implib. */
+ {"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT},
+ {"compat-implib", no_argument, NULL, OPTION_IMP_COMPAT},
+ {"enable-auto-image-base", no_argument, NULL, OPTION_ENABLE_AUTO_IMAGE_BASE},
+ {"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-pep-debug", no_argument, NULL, OPTION_ENABLE_EXTRA_PE_DEBUG},
+ {"enable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC},
+ {"disable-runtime-pseudo-reloc", no_argument, NULL, OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC},
+#endif
+ {NULL, no_argument, NULL, 0}
+ };
+
+ *longopts = xrealloc (*longopts, nl * sizeof (struct option) + sizeof (xtra_long));
+ memcpy (*longopts + nl, &xtra_long, sizeof (xtra_long));
+}
+
+/* PE/WIN32; added routines to get the subsystem type, heap and/or stack
+ parameters which may be input from the command line. */
+
+typedef struct
+{
+ void *ptr;
+ int size;
+ int value;
+ char *symbol;
+ int inited;
+} definfo;
+
+#define D(field,symbol,def) {&pep.field,sizeof(pep.field), def, symbol,0}
+
+static definfo init[] =
+{
+ /* imagebase must be first */
+#define IMAGEBASEOFF 0
+ D(ImageBase,"__image_base__", NT_EXE_IMAGE_BASE),
+#define DLLOFF 1
+ {&dll, sizeof(dll), 0, "__dll__", 0},
+#define MSIMAGEBASEOFF 2
+ D(ImageBase,"__ImageBase", NT_EXE_IMAGE_BASE),
+ D(SectionAlignment,"__section_alignment__", PE_DEF_SECTION_ALIGNMENT),
+ D(FileAlignment,"__file_alignment__", PE_DEF_FILE_ALIGNMENT),
+ D(MajorOperatingSystemVersion,"__major_os_version__", 4),
+ D(MinorOperatingSystemVersion,"__minor_os_version__", 0),
+ D(MajorImageVersion,"__major_image_version__", 0),
+ D(MinorImageVersion,"__minor_image_version__", 0),
+ D(MajorSubsystemVersion,"__major_subsystem_version__", 5),
+ D(MinorSubsystemVersion,"__minor_subsystem_version__", 2),
+ D(Subsystem,"__subsystem__", ${SUBSYSTEM}),
+ D(SizeOfStackReserve,"__size_of_stack_reserve__", 0x200000),
+ D(SizeOfStackCommit,"__size_of_stack_commit__", 0x1000),
+ D(SizeOfHeapReserve,"__size_of_heap_reserve__", 0x100000),
+ D(SizeOfHeapCommit,"__size_of_heap_commit__", 0x1000),
+ D(LoaderFlags,"__loader_flags__", 0x0),
+ { NULL, 0, 0, NULL, 0 }
+};
+
+
+static void
+gld_${EMULATION_NAME}_list_options (FILE *file)
+{
+ fprintf (file, _(" --base_file <basefile> Generate a base file for relocatable DLLs\n"));
+ fprintf (file, _(" --dll Set image base to the default for DLLs\n"));
+ fprintf (file, _(" --file-alignment <size> Set file alignment\n"));
+ fprintf (file, _(" --heap <size> Set initial size of the heap\n"));
+ fprintf (file, _(" --image-base <address> Set start address of the executable\n"));
+ fprintf (file, _(" --major-image-version <number> Set version number of the executable\n"));
+ fprintf (file, _(" --major-os-version <number> Set minimum required OS version\n"));
+ fprintf (file, _(" --major-subsystem-version <number> Set minimum required OS subsystem version\n"));
+ fprintf (file, _(" --minor-image-version <number> Set revision number of the executable\n"));
+ fprintf (file, _(" --minor-os-version <number> Set minimum required OS revision\n"));
+ fprintf (file, _(" --minor-subsystem-version <number> Set minimum required OS subsystem revision\n"));
+ fprintf (file, _(" --section-alignment <size> Set section alignment\n"));
+ fprintf (file, _(" --stack <size> Set size of the initial stack\n"));
+ fprintf (file, _(" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"));
+ fprintf (file, _(" --support-old-code Support interworking with old code\n"));
+#ifdef DLL_SUPPORT
+ fprintf (file, _(" --add-stdcall-alias Export symbols with and without @nn\n"));
+ fprintf (file, _(" --disable-stdcall-fixup Don't link _sym to _sym@nn\n"));
+ fprintf (file, _(" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"));
+ fprintf (file, _(" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"));
+ fprintf (file, _(" --exclude-libs lib,lib,... Exclude libraries from automatic export\n"));
+ fprintf (file, _(" --export-all-symbols Automatically export all globals to DLL\n"));
+ fprintf (file, _(" --kill-at Remove @nn from exported symbols\n"));
+ fprintf (file, _(" --out-implib <file> Generate import library\n"));
+ fprintf (file, _(" --output-def <file> Generate a .DEF file for the built DLL\n"));
+ fprintf (file, _(" --warn-duplicate-exports Warn about duplicate exports.\n"));
+ fprintf (file, _(" --compat-implib Create backward compatible import libs;\n\
+ 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 without\n\
+ an 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-runtime-pseudo-reloc Work around auto-import limitations by\n\
+ adding pseudo-relocations resolved at\n\
+ runtime.\n"));
+ fprintf (file, _(" --disable-runtime-pseudo-reloc Do not add runtime pseudo-relocations for\n\
+ auto-imported DATA.\n"));
+ fprintf (file, _(" --enable-extra-pep-debug Enable verbose debug output when building\n\
+ or linking to DLLs (esp. auto-import)\n"));
+#endif
+}
+
+
+static void
+set_pep_name (char *name, long val)
+{
+ int i;
+
+ /* Find the name and set it. */
+ for (i = 0; init[i].ptr; i++)
+ {
+ if (strcmp (name, init[i].symbol) == 0)
+ {
+ init[i].value = val;
+ init[i].inited = 1;
+ if (strcmp (name,"__image_base__") == 0)
+ set_pep_name ("__ImageBase", val);
+ return;
+ }
+ }
+ abort ();
+}
+
+
+static void
+set_pep_subsystem (void)
+{
+ const char *sver;
+ const char *entry;
+ const char *initial_symbol_char;
+ char *end;
+ int len;
+ int i;
+ int subsystem;
+ unsigned long temp_subsystem;
+ static const struct
+ {
+ const char *name;
+ const int value;
+ const char *entry;
+ }
+ v[] =
+ {
+ { "native", 1, "NtProcessStartup" },
+ { "windows", 2, "WinMainCRTStartup" },
+ { "console", 3, "mainCRTStartup" },
+ { "posix", 7, "__PosixProcessStartup"},
+ { "wince", 9, "_WinMainCRTStartup" },
+ { "xbox", 14, "mainCRTStartup" },
+ { NULL, 0, NULL }
+ };
+ /* Entry point name for arbitrary subsystem numbers. */
+ static const char default_entry[] = "mainCRTStartup";
+
+ /* Check for the presence of a version number. */
+ sver = strchr (optarg, ':');
+ if (sver == NULL)
+ len = strlen (optarg);
+ else
+ {
+ len = sver - optarg;
+ set_pep_name ("__major_subsystem_version__",
+ strtoul (sver + 1, &end, 0));
+ if (*end == '.')
+ set_pep_name ("__minor_subsystem_version__",
+ strtoul (end + 1, &end, 0));
+ if (*end != '\0')
+ einfo (_("%P: warning: bad version number in -subsystem option\n"));
+ }
+
+ /* Check for numeric subsystem. */
+ temp_subsystem = strtoul (optarg, & end, 0);
+ if ((*end == ':' || *end == '\0') && (temp_subsystem < 65536))
+ {
+ /* Search list for a numeric match to use its entry point. */
+ for (i = 0; v[i].name; i++)
+ if (v[i].value == (int) temp_subsystem)
+ break;
+
+ /* If no match, use the default. */
+ if (v[i].name != NULL)
+ entry = v[i].entry;
+ else
+ entry = default_entry;
+
+ /* Use this subsystem. */
+ subsystem = (int) temp_subsystem;
+ }
+ else
+ {
+ /* Search for subsystem by name. */
+ for (i = 0; v[i].name; i++)
+ if (strncmp (optarg, v[i].name, len) == 0
+ && v[i].name[len] == '\0')
+ break;
+
+ if (v[i].name == NULL)
+ {
+ einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
+ return;
+ }
+
+ entry = v[i].entry;
+ subsystem = v[i].value;
+ }
+
+ set_pep_name ("__subsystem__", subsystem);
+
+ initial_symbol_char = ${INITIAL_SYMBOL_CHAR};
+ if (*initial_symbol_char != '\0')
+ {
+ char *alc_entry;
+
+ /* lang_default_entry expects its argument to be permanently
+ allocated, so we don't free this string. */
+ alc_entry = xmalloc (strlen (initial_symbol_char)
+ + strlen (entry)
+ + 1);
+ strcpy (alc_entry, initial_symbol_char);
+ strcat (alc_entry, entry);
+ entry = alc_entry;
+ }
+
+ lang_default_entry (entry);
+
+ return;
+}
+
+
+static void
+set_pep_value (char *name)
+{
+ char *end;
+
+ set_pep_name (name, strtoul (optarg, &end, 0));
+
+ if (end == optarg)
+ einfo (_("%P%F: invalid hex number for PE parameter '%s'\n"), optarg);
+
+ optarg = end;
+}
+
+
+static void
+set_pep_stack_heap (char *resname, char *comname)
+{
+ set_pep_value (resname);
+
+ if (*optarg == ',')
+ {
+ optarg++;
+ set_pep_value (comname);
+ }
+ else if (*optarg)
+ einfo (_("%P%F: strange hex info for PE parameter '%s'\n"), optarg);
+}
+
+
+static bfd_boolean
+gld${EMULATION_NAME}_handle_option (int optc)
+{
+ switch (optc)
+ {
+ default:
+ return FALSE;
+
+ case OPTION_BASE_FILE:
+ link_info.base_file = fopen (optarg, FOPEN_WB);
+ if (link_info.base_file == NULL)
+ {
+ /* xgettext:c-format */
+ fprintf (stderr, _("%s: Can't open base file %s\n"),
+ program_name, optarg);
+ xexit (1);
+ }
+ break;
+
+ /* PE options. */
+ case OPTION_HEAP:
+ set_pep_stack_heap ("__size_of_heap_reserve__", "__size_of_heap_commit__");
+ break;
+ case OPTION_STACK:
+ set_pep_stack_heap ("__size_of_stack_reserve__", "__size_of_stack_commit__");
+ break;
+ case OPTION_SUBSYSTEM:
+ set_pep_subsystem ();
+ break;
+ case OPTION_MAJOR_OS_VERSION:
+ set_pep_value ("__major_os_version__");
+ break;
+ case OPTION_MINOR_OS_VERSION:
+ set_pep_value ("__minor_os_version__");
+ break;
+ case OPTION_MAJOR_SUBSYSTEM_VERSION:
+ set_pep_value ("__major_subsystem_version__");
+ break;
+ case OPTION_MINOR_SUBSYSTEM_VERSION:
+ set_pep_value ("__minor_subsystem_version__");
+ break;
+ case OPTION_MAJOR_IMAGE_VERSION:
+ set_pep_value ("__major_image_version__");
+ break;
+ case OPTION_MINOR_IMAGE_VERSION:
+ set_pep_value ("__minor_image_version__");
+ break;
+ case OPTION_FILE_ALIGNMENT:
+ set_pep_value ("__file_alignment__");
+ break;
+ case OPTION_SECTION_ALIGNMENT:
+ set_pep_value ("__section_alignment__");
+ break;
+ case OPTION_DLL:
+ set_pep_name ("__dll__", 1);
+ break;
+ case OPTION_IMAGE_BASE:
+ set_pep_value ("__image_base__");
+ break;
+ case OPTION_SUPPORT_OLD_CODE:
+ support_old_code = 1;
+ break;
+#ifdef DLL_SUPPORT
+ case OPTION_OUT_DEF:
+ pep_out_def_filename = xstrdup (optarg);
+ break;
+ case OPTION_EXPORT_ALL:
+ pep_dll_export_everything = 1;
+ break;
+ case OPTION_EXCLUDE_SYMBOLS:
+ pep_dll_add_excludes (optarg, 0);
+ break;
+ case OPTION_EXCLUDE_LIBS:
+ pep_dll_add_excludes (optarg, 1);
+ break;
+ case OPTION_KILL_ATS:
+ pep_dll_kill_ats = 1;
+ break;
+ case OPTION_STDCALL_ALIASES:
+ pep_dll_stdcall_aliases = 1;
+ break;
+ case OPTION_ENABLE_STDCALL_FIXUP:
+ pep_enable_stdcall_fixup = 1;
+ break;
+ case OPTION_DISABLE_STDCALL_FIXUP:
+ pep_enable_stdcall_fixup = 0;
+ break;
+ case OPTION_IMPLIB_FILENAME:
+ pep_implib_filename = xstrdup (optarg);
+ break;
+ case OPTION_WARN_DUPLICATE_EXPORTS:
+ pep_dll_warn_dup_exports = 1;
+ break;
+ case OPTION_IMP_COMPAT:
+ pep_dll_compat_implib = 1;
+ break;
+ case OPTION_ENABLE_AUTO_IMAGE_BASE:
+ pep_enable_auto_image_base = 1;
+ break;
+ case OPTION_DISABLE_AUTO_IMAGE_BASE:
+ pep_enable_auto_image_base = 0;
+ break;
+ case OPTION_DLL_SEARCH_PREFIX:
+ pep_dll_search_prefix = xstrdup (optarg);
+ break;
+ case OPTION_NO_DEFAULT_EXCLUDES:
+ pep_dll_do_default_excludes = 0;
+ break;
+ case OPTION_DLL_ENABLE_AUTO_IMPORT:
+ link_info.pei386_auto_import = 1;
+ break;
+ case OPTION_DLL_DISABLE_AUTO_IMPORT:
+ link_info.pei386_auto_import = 0;
+ break;
+ case OPTION_DLL_ENABLE_RUNTIME_PSEUDO_RELOC:
+ link_info.pei386_runtime_pseudo_reloc = 1;
+ break;
+ case OPTION_DLL_DISABLE_RUNTIME_PSEUDO_RELOC:
+ link_info.pei386_runtime_pseudo_reloc = 0;
+ break;
+ case OPTION_ENABLE_EXTRA_PE_DEBUG:
+ pep_dll_extra_pe_debug = 1;
+ break;
+#endif
+ }
+ return TRUE;
+}
+
+
+#ifdef DLL_SUPPORT
+static unsigned long
+strhash (const char *str)
+{
+ const unsigned char *s;
+ unsigned long hash;
+ unsigned int c;
+ unsigned int len;
+
+ hash = 0;
+ len = 0;
+ s = (const unsigned char *) str;
+ while ((c = *s++) != '\0')
+ {
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ ++len;
+ }
+ hash += len + (len << 17);
+ hash ^= hash >> 2;
+
+ return hash;
+}
+
+/* Use the output file to create a image base for relocatable DLLs. */
+
+static unsigned long
+compute_dll_image_base (const char *ofile)
+{
+ unsigned long hash = strhash (ofile);
+ return 0x61300000 + ((hash << 16) & 0x0FFC0000);
+}
+#endif
+
+/* Assign values to the special symbols before the linker script is
+ read. */
+
+static void
+gld_${EMULATION_NAME}_set_symbols (void)
+{
+ /* Run through and invent symbols for all the
+ names and insert the defaults. */
+ int j;
+ lang_statement_list_type *save;
+
+ if (!init[IMAGEBASEOFF].inited)
+ {
+ if (link_info.relocatable)
+ init[IMAGEBASEOFF].value = 0;
+ else if (init[DLLOFF].value || (link_info.shared && !link_info.pie))
+#ifdef DLL_SUPPORT
+ init[IMAGEBASEOFF].value = (pep_enable_auto_image_base) ?
+ compute_dll_image_base (output_filename) : NT_DLL_IMAGE_BASE;
+#else
+ init[IMAGEBASEOFF].value = NT_DLL_IMAGE_BASE;
+#endif
+ else
+ init[IMAGEBASEOFF].value = NT_EXE_IMAGE_BASE;
+ init[MSIMAGEBASEOFF].value = init[IMAGEBASEOFF].value;
+ }
+
+ /* Don't do any symbol assignments if this is a relocatable link. */
+ if (link_info.relocatable)
+ return;
+
+ /* Glue the assignments into the abs section. */
+ save = stat_ptr;
+
+ stat_ptr = &(abs_output_section->children);
+
+ for (j = 0; init[j].ptr; j++)
+ {
+ long val = init[j].value;
+ lang_assignment_statement_type *rv;
+ rv = lang_add_assignment (exp_assop ('=', init[j].symbol,
+ exp_intop (val)));
+ if (init[j].size == sizeof (short))
+ *(short *) init[j].ptr = val;
+ else if (init[j].size == sizeof (int))
+ *(int *) init[j].ptr = val;
+ else if (init[j].size == sizeof (long))
+ *(long *) init[j].ptr = val;
+ /* This might be a long long or other special type. */
+ else if (init[j].size == sizeof (bfd_vma))
+ *(bfd_vma *) init[j].ptr = val;
+ else abort ();
+ if (j == IMAGEBASEOFF)
+ image_base_statement = rv;
+ }
+ /* Restore the pointer. */
+ stat_ptr = save;
+
+ if (pep.FileAlignment > pep.SectionAlignment)
+ {
+ einfo (_("%P: warning, file alignment > section alignment.\n"));
+ }
+}
+
+/* This is called after the linker script and the command line options
+ have been read. */
+
+static void
+gld_${EMULATION_NAME}_after_parse (void)
+{
+ /* The Windows libraries are designed for the linker to treat the
+ entry point as an undefined symbol. Otherwise, the .obj that
+ defines mainCRTStartup is brought in because it is the first
+ encountered in libc.lib and it has other symbols in it which will
+ be pulled in by the link process. To avoid this, we act as
+ though the user specified -u with the entry point symbol.
+
+ This function is called after the linker script and command line
+ options have been read, so at this point we know the right entry
+ point. This function is called before the input files are
+ opened, so registering the symbol as undefined will make a
+ difference. */
+
+ if (! link_info.relocatable && entry_symbol.name != NULL)
+ ldlang_add_undef (entry_symbol.name);
+}
+
+/* pep-dll.c directly accesses pep_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 * pep_data_import_dll;
+
+#ifdef DLL_SUPPORT
+static struct bfd_link_hash_entry *pep_undef_found_sym;
+
+static bfd_boolean
+pep_undef_cdecl_match (struct bfd_link_hash_entry *h, void *inf)
+{
+ int sl;
+ char *string = inf;
+
+ sl = strlen (string);
+ if (h->type == bfd_link_hash_defined
+ && strncmp (h->root.string, string, sl) == 0
+ && h->root.string[sl] == '@')
+ {
+ pep_undef_found_sym = h;
+ return FALSE;
+ }
+ return TRUE;
+}
+
+static void
+pep_fixup_stdcalls (void)
+{
+ static int gave_warning_message = 0;
+ struct bfd_link_hash_entry *undef, *sym;
+
+ if (pep_dll_extra_pe_debug)
+ printf ("%s\n", __FUNCTION__);
+
+ for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
+ if (undef->type == bfd_link_hash_undefined)
+ {
+ char* at = strchr (undef->root.string, '@');
+ int lead_at = (*undef->root.string == '@');
+ /* For now, don't try to fixup fastcall symbols. */
+
+ if (at && !lead_at)
+ {
+ /* The symbol is a stdcall symbol, so let's look for a
+ cdecl symbol with the same name and resolve to that. */
+ char *cname = xstrdup (undef->root.string /* + lead_at */);
+ at = strchr (cname, '@');
+ *at = 0;
+ sym = bfd_link_hash_lookup (link_info.hash, cname, 0, 0, 1);
+
+ if (sym && sym->type == bfd_link_hash_defined)
+ {
+ undef->type = bfd_link_hash_defined;
+ undef->u.def.value = sym->u.def.value;
+ undef->u.def.section = sym->u.def.section;
+
+ if (pep_enable_stdcall_fixup == -1)
+ {
+ einfo (_("Warning: resolving %s by linking to %s\n"),
+ undef->root.string, cname);
+ if (! gave_warning_message)
+ {
+ gave_warning_message = 1;
+ einfo (_("Use --enable-stdcall-fixup to disable these warnings\n"));
+ einfo (_("Use --disable-stdcall-fixup to disable these fixups\n"));
+ }
+ }
+ }
+ }
+ else
+ {
+ /* The symbol is a cdecl symbol, so we look for stdcall
+ symbols - which means scanning the whole symbol table. */
+ pep_undef_found_sym = 0;
+ bfd_link_hash_traverse (link_info.hash, pep_undef_cdecl_match,
+ (char *) undef->root.string);
+ sym = pep_undef_found_sym;
+ if (sym)
+ {
+ undef->type = bfd_link_hash_defined;
+ undef->u.def.value = sym->u.def.value;
+ undef->u.def.section = sym->u.def.section;
+
+ if (pep_enable_stdcall_fixup == -1)
+ {
+ einfo (_("Warning: resolving %s by linking to %s\n"),
+ undef->root.string, sym->root.string);
+ if (! gave_warning_message)
+ {
+ gave_warning_message = 1;
+ einfo (_("Use --enable-stdcall-fixup to disable these warnings\n"));
+ einfo (_("Use --disable-stdcall-fixup to disable these fixups\n"));
+ }
+ }
+ }
+ }
+ }
+}
+
+static int
+make_import_fixup (arelent *rel, asection *s)
+{
+ struct bfd_symbol *sym = *rel->sym_ptr_ptr;
+ char addend[4];
+
+ if (pep_dll_extra_pe_debug)
+ printf ("arelent: %s@%#lx: add=%li\n", sym->name,
+ (long) rel->address, (long) rel->addend);
+
+ 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);
+
+ pep_create_import_fixup (rel, s, bfd_get_32 (s->owner, addend));
+
+ return 1;
+}
+
+static void
+pep_find_data_imports (void)
+{
+ struct bfd_link_hash_entry *undef, *sym;
+
+ if (link_info.pei386_auto_import == 0)
+ return;
+
+ for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
+ {
+ if (undef->type == bfd_link_hash_undefined)
+ {
+ /* C++ symbols are *long*. */
+ char buf[4096];
+
+ if (pep_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)
+ {
+ bfd *b = sym->u.def.section->owner;
+ asymbol **symbols;
+ int nsyms, symsize, i;
+
+ if (link_info.pei386_auto_import == -1)
+ info_msg (_("Info: resolving %s by linking to %s (auto-import)\n"),
+ undef->root.string, buf);
+
+ symsize = bfd_get_symtab_upper_bound (b);
+ symbols = xmalloc (symsize);
+ nsyms = bfd_canonicalize_symtab (b, symbols);
+
+ for (i = 0; i < nsyms; i++)
+ {
+ if (! CONST_STRNEQ (symbols[i]->name, "__head_"))
+ continue;
+
+ if (pep_dll_extra_pe_debug)
+ printf ("->%s\n", symbols[i]->name);
+
+ pep_data_import_dll = (char*) (symbols[i]->name +
+ sizeof ("__head_") - 1);
+ break;
+ }
+
+ pep_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;
+ }
+ }
+ }
+}
+
+static bfd_boolean
+pr_sym (struct bfd_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
+{
+ if (pep_dll_extra_pe_debug)
+ printf ("+%s\n", h->string);
+
+ return TRUE;
+}
+#endif /* DLL_SUPPORT */
+
+
+static void
+gld_${EMULATION_NAME}_after_open (void)
+{
+#ifdef DLL_SUPPORT
+ if (pep_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->u.undef.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);
+ }
+#endif
+
+ /* 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) == NULL || coff_data (output_bfd)->pe == 0)
+ einfo (_("%F%P: cannot perform PE operations on non PE output file '%B'.\n"), output_bfd);
+
+ pe_data (output_bfd)->pe_opthdr = pep;
+ pe_data (output_bfd)->dll = init[DLLOFF].value;
+ pe_data (output_bfd)->real_flags |= real_flags;
+
+#ifdef DLL_SUPPORT
+ if (pep_enable_stdcall_fixup) /* -1=warn or 1=disable */
+ pep_fixup_stdcalls ();
+
+ pep_process_import_defs (output_bfd, & link_info);
+
+ pep_find_data_imports ();
+
+#ifndef TARGET_IS_i386pep
+ if (link_info.shared)
+#else
+ if (!link_info.relocatable)
+#endif
+ pep_dll_build_sections (output_bfd, &link_info);
+
+#ifndef TARGET_IS_i386pep
+ else
+ pep_exe_build_sections (output_bfd, &link_info);
+#endif
+#endif /* DLL_SUPPORT */
+
+ {
+ /* This next chunk of code tries to detect the case where you have
+ two import libraries for the same DLL (specifically,
+ symbolically linking libm.a and libc.a in cygwin to
+ libcygwin.a). In those cases, it's possible for function
+ thunks from the second implib to be used but without the
+ head/tail objects, causing an improper import table. We detect
+ those cases and rename the "other" import libraries to match
+ the one the head/tail come from, so that the linker will sort
+ things nicely and produce a valid import table. */
+
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (is->the_bfd->my_archive)
+ {
+ 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)
+ {
+ if (strcmp (sec->name, ".idata\$2") == 0)
+ idata2 = 1;
+ if (CONST_STRNEQ (sec->name, ".idata\$"))
+ 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
+ from our own library. */
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ int i;
+ long symsize;
+ long relsize;
+ 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 = xmalloc (symsize);
+ symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
+ if (symsize < 0)
+ {
+ einfo ("%X%P: unable to process symbols: %E");
+ return;
+ }
+
+ relocs = xmalloc ((size_t) relsize);
+ nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec,
+ relocs, symbols);
+ if (nrelocs < 0)
+ {
+ free (relocs);
+ einfo ("%X%P: unable to process relocs: %E");
+ return;
+ }
+
+ for (i = 0; i < nrelocs; i++)
+ {
+ struct bfd_symbol *s;
+ struct bfd_link_hash_entry * blhe;
+ char *other_bfd_filename;
+ 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_filename
+ = blhe->u.def.section->owner->my_archive
+ ? bfd_get_filename (blhe->u.def.section->owner->my_archive)
+ : bfd_get_filename (blhe->u.def.section->owner);
+
+ if (strcmp (bfd_get_filename (is->the_bfd->my_archive),
+ other_bfd_filename) == 0)
+ continue;
+
+ /* Rename this implib to match the other one. */
+ n = xmalloc (strlen (other_bfd_filename) + 1);
+ strcpy (n, other_bfd_filename);
+ is->the_bfd->my_archive->filename = n;
+ }
+
+ free (relocs);
+ /* Note - we do not free the symbols,
+ they are now cached in the BFD. */
+ }
+ }
+ }
+ }
+ }
+
+ {
+ int is_ms_arch = 0;
+ bfd *cur_arch = 0;
+ lang_input_statement_type *is2;
+ lang_input_statement_type *is3;
+
+ /* Careful - this is a shell script. Watch those dollar signs! */
+ /* Microsoft import libraries have every member named the same,
+ and not in the right order for us to link them correctly. We
+ must detect these and rename the members so that they'll link
+ correctly. There are three types of objects: the head, the
+ thunks, and the sentinel(s). The head is easy; it's the one
+ with idata2. We assume that the sentinels won't have relocs,
+ and the thunks will. It's easier than checking the symbol
+ table for external references. */
+ LANG_FOR_EACH_INPUT_STATEMENT (is)
+ {
+ if (is->the_bfd->my_archive)
+ {
+ char *pnt;
+ bfd *arch = is->the_bfd->my_archive;
+
+ if (cur_arch != arch)
+ {
+ cur_arch = arch;
+ is_ms_arch = 1;
+
+ for (is3 = is;
+ is3 && is3->the_bfd->my_archive == arch;
+ is3 = (lang_input_statement_type *) is3->next)
+ {
+ /* A MS dynamic import library can also contain static
+ members, so look for the first element with a .dll
+ extension, and use that for the remainder of the
+ comparisons. */
+ pnt = strrchr (is3->the_bfd->filename, '.');
+ if (pnt != NULL && strcmp (pnt, ".dll") == 0)
+ break;
+ }
+
+ if (is3 == NULL)
+ is_ms_arch = 0;
+ else
+ {
+ /* OK, found one. Now look to see if the remaining
+ (dynamic import) members use the same name. */
+ for (is2 = is;
+ is2 && is2->the_bfd->my_archive == arch;
+ is2 = (lang_input_statement_type *) is2->next)
+ {
+ /* Skip static members, ie anything with a .obj
+ extension. */
+ pnt = strrchr (is2->the_bfd->filename, '.');
+ if (pnt != NULL && strcmp (pnt, ".obj") == 0)
+ continue;
+
+ if (strcmp (is3->the_bfd->filename,
+ is2->the_bfd->filename))
+ {
+ is_ms_arch = 0;
+ break;
+ }
+ }
+ }
+ }
+
+ /* This fragment might have come from an .obj file in a Microsoft
+ import, and not an actual import record. If this is the case,
+ then leave the filename alone. */
+ pnt = strrchr (is->the_bfd->filename, '.');
+
+ if (is_ms_arch && (strcmp (pnt, ".dll") == 0))
+ {
+ int idata2 = 0, reloc_count=0;
+ asection *sec;
+ char *new_name, seq;
+
+ for (sec = is->the_bfd->sections; sec; sec = sec->next)
+ {
+ if (strcmp (sec->name, ".idata\$2") == 0)
+ idata2 = 1;
+ reloc_count += sec->reloc_count;
+ }
+
+ if (idata2) /* .idata2 is the TOC */
+ seq = 'a';
+ else if (reloc_count > 0) /* thunks */
+ seq = 'b';
+ else /* sentinel */
+ seq = 'c';
+
+ new_name = xmalloc (strlen (is->the_bfd->filename) + 3);
+ sprintf (new_name, "%s.%c", is->the_bfd->filename, seq);
+ is->the_bfd->filename = new_name;
+
+ new_name = xmalloc (strlen (is->filename) + 3);
+ sprintf (new_name, "%s.%c", is->filename, seq);
+ is->filename = new_name;
+ }
+ }
+ }
+ }
+}
+
+static void
+gld_${EMULATION_NAME}_before_allocation (void)
+{
+ before_allocation_default ();
+}
+
+#ifdef DLL_SUPPORT
+/* This is called when an input file isn't recognized as a BFD. We
+ check here for .DEF files and pull them in automatically. */
+
+static int
+saw_option (char *option)
+{
+ int i;
+
+ for (i = 0; init[i].ptr; i++)
+ if (strcmp (init[i].symbol, option) == 0)
+ return init[i].inited;
+ return 0;
+}
+#endif /* DLL_SUPPORT */
+
+static bfd_boolean
+gld_${EMULATION_NAME}_unrecognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED)
+{
+#ifdef DLL_SUPPORT
+ const char *ext = entry->filename + strlen (entry->filename) - 4;
+
+ if (strcmp (ext, ".def") == 0 || strcmp (ext, ".DEF") == 0)
+ {
+ pep_def_file = def_file_parse (entry->filename, pep_def_file);
+
+ if (pep_def_file)
+ {
+ int i, buflen=0, len;
+ char *buf;
+
+ for (i = 0; i < pep_def_file->num_exports; i++)
+ {
+ len = strlen (pep_def_file->exports[i].internal_name);
+ if (buflen < len + 2)
+ buflen = len + 2;
+ }
+
+ buf = xmalloc (buflen);
+
+ for (i = 0; i < pep_def_file->num_exports; i++)
+ {
+ struct bfd_link_hash_entry *h;
+
+ sprintf (buf, "_%s", pep_def_file->exports[i].internal_name);
+
+ h = bfd_link_hash_lookup (link_info.hash, buf, TRUE, TRUE, TRUE);
+ if (h == (struct bfd_link_hash_entry *) NULL)
+ einfo (_("%P%F: bfd_link_hash_lookup failed: %E\n"));
+ if (h->type == bfd_link_hash_new)
+ {
+ h->type = bfd_link_hash_undefined;
+ h->u.undef.abfd = NULL;
+ bfd_link_add_undef (link_info.hash, h);
+ }
+ }
+ free (buf);
+
+ /* def_file_print (stdout, pep_def_file); */
+ if (pep_def_file->is_dll == 1)
+ link_info.shared = 1;
+
+ if (pep_def_file->base_address != (bfd_vma)(-1))
+ {
+ pep.ImageBase =
+ pe_data (output_bfd)->pe_opthdr.ImageBase =
+ init[IMAGEBASEOFF].value = pep_def_file->base_address;
+ init[IMAGEBASEOFF].inited = 1;
+ if (image_base_statement)
+ image_base_statement->exp =
+ exp_assop ('=', "__image_base__", exp_intop (pep.ImageBase));
+ }
+
+ if (pep_def_file->stack_reserve != -1
+ && ! saw_option ("__size_of_stack_reserve__"))
+ {
+ pep.SizeOfStackReserve = pep_def_file->stack_reserve;
+ if (pep_def_file->stack_commit != -1)
+ pep.SizeOfStackCommit = pep_def_file->stack_commit;
+ }
+ if (pep_def_file->heap_reserve != -1
+ && ! saw_option ("__size_of_heap_reserve__"))
+ {
+ pep.SizeOfHeapReserve = pep_def_file->heap_reserve;
+ if (pep_def_file->heap_commit != -1)
+ pep.SizeOfHeapCommit = pep_def_file->heap_commit;
+ }
+ return TRUE;
+ }
+ }
+#endif
+ return FALSE;
+}
+
+static bfd_boolean
+gld_${EMULATION_NAME}_recognized_file (lang_input_statement_type *entry ATTRIBUTE_UNUSED)
+{
+#ifdef DLL_SUPPORT
+#ifdef TARGET_IS_i386pep
+ pep_dll_id_target ("pei-x86-64");
+#endif
+ if (bfd_get_format (entry->the_bfd) == bfd_object)
+ {
+ char fbuf[LD_PATHMAX + 1];
+ const char *ext;
+
+ if (REALPATH (entry->filename, fbuf) == NULL)
+ strncpy (fbuf, entry->filename, sizeof (fbuf));
+
+ ext = fbuf + strlen (fbuf) - 4;
+
+ if (strcmp (ext, ".dll") == 0 || strcmp (ext, ".DLL") == 0)
+ return pep_implied_import_dll (fbuf);
+ }
+#endif
+ return FALSE;
+}
+
+static void
+gld_${EMULATION_NAME}_finish (void)
+{
+ finish_default ();
+
+#ifdef DLL_SUPPORT
+ if (link_info.shared
+ || (!link_info.relocatable && pep_def_file->num_exports != 0))
+ {
+ pep_dll_fill_sections (output_bfd, &link_info);
+ if (pep_implib_filename)
+ pep_dll_generate_implib (pep_def_file, pep_implib_filename);
+ }
+
+ if (pep_out_def_filename)
+ pep_dll_generate_def_file (pep_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;
+ }
+ }
+}
+
+
+/* Place an orphan section.
+
+ We use this to put sections in a reasonable place in the file, and
+ to ensure that they are aligned as required.
+
+ We handle grouped sections here as well. A section named .foo$nn
+ goes into the output section .foo. All grouped sections are sorted
+ by name.
+
+ Grouped sections for the default sections are handled by the
+ default linker script using wildcards, and are sorted by
+ sort_sections. */
+
+static bfd_boolean
+gld_${EMULATION_NAME}_place_orphan (asection *s)
+{
+ const char *secname;
+ const char *orig_secname;
+ char *dollar = NULL;
+ lang_output_section_statement_type *os;
+ lang_statement_list_type add_child;
+
+ secname = bfd_get_section_name (s->owner, s);
+
+ /* Look through the script to see where to place this section. */
+ orig_secname = secname;
+ if (!link_info.relocatable
+ && (dollar = strchr (secname, '$')) != NULL)
+ {
+ size_t len = dollar - orig_secname;
+ char *newname = xmalloc (len + 1);
+ memcpy (newname, orig_secname, len);
+ newname[len] = '\0';
+ secname = newname;
+ }
+
+ os = lang_output_section_find (secname);
+
+ lang_list_init (&add_child);
+
+ if (os != NULL
+ && (os->bfd_section == NULL
+ || os->bfd_section->flags == 0
+ || ((s->flags ^ os->bfd_section->flags)
+ & (SEC_LOAD | SEC_ALLOC)) == 0))
+ {
+ /* We already have an output section statement with this
+ name, and its bfd section, if any, has compatible flags.
+ If the section already exists but does not have any flags set,
+ then it has been created by the linker, probably as a result of
+ a --section-start command line switch. */
+ lang_add_section (&add_child, s, os);
+ }
+ else
+ {
+ static struct orphan_save hold[] =
+ {
+ { ".text",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE,
+ 0, 0, 0, 0 },
+ { ".rdata",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".data",
+ SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_DATA,
+ 0, 0, 0, 0 },
+ { ".bss",
+ SEC_ALLOC,
+ 0, 0, 0, 0 }
+ };
+ enum orphan_save_index
+ {
+ orphan_text = 0,
+ orphan_rodata,
+ orphan_data,
+ orphan_bss
+ };
+ static int orphan_init_done = 0;
+ struct orphan_save *place;
+ lang_output_section_statement_type *after;
+ etree_type *address;
+
+ if (!orphan_init_done)
+ {
+ struct orphan_save *ho;
+ for (ho = hold; ho < hold + sizeof (hold) / sizeof (hold[0]); ++ho)
+ if (ho->name != NULL)
+ {
+ ho->os = lang_output_section_find (ho->name);
+ if (ho->os != NULL && ho->os->flags == 0)
+ ho->os->flags = ho->flags;
+ }
+ orphan_init_done = 1;
+ }
+
+ /* Try to put the new output section in a reasonable place based
+ on the section name and section flags. */
+
+ place = NULL;
+ if ((s->flags & SEC_ALLOC) == 0)
+ ;
+ else if ((s->flags & (SEC_LOAD | SEC_HAS_CONTENTS)) == 0)
+ place = &hold[orphan_bss];
+ else if ((s->flags & SEC_READONLY) == 0)
+ place = &hold[orphan_data];
+ else if ((s->flags & SEC_CODE) == 0)
+ place = &hold[orphan_rodata];
+ else
+ place = &hold[orphan_text];
+
+ after = NULL;
+ if (place != NULL)
+ {
+ if (place->os == NULL)
+ place->os = lang_output_section_find (place->name);
+ after = place->os;
+ if (after == NULL)
+ after = lang_output_section_find_by_flags (s, &place->os, NULL);
+ if (after == NULL)
+ /* *ABS* is always the first output section statement. */
+ after = (&lang_output_section_statement.head
+ ->output_section_statement);
+ }
+
+ /* 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 allocatable characteristics. */
+ if (bfd_get_section_by_name (output_bfd, secname) != NULL)
+ {
+ static int count = 1;
+ secname = bfd_get_unique_section_name (output_bfd, secname, &count);
+ if (secname == NULL)
+ einfo ("%F%P: place_orphan failed: %E\n");
+ }
+
+ /* All sections in an executable must be aligned to a page boundary. */
+ address = exp_unop (ALIGN_K, exp_nameop (NAME, "__section_alignment__"));
+ os = lang_insert_orphan (s, secname, after, place, address, &add_child);
+ }
+
+ {
+ lang_statement_union_type **pl = &os->children.head;
+
+ if (dollar != NULL)
+ {
+ bfd_boolean found_dollar;
+
+ /* The section name has a '$'. Sort it with the other '$'
+ sections. */
+ found_dollar = FALSE;
+ for ( ; *pl != NULL; pl = &(*pl)->header.next)
+ {
+ lang_input_section_type *ls;
+ const char *lname;
+
+ if ((*pl)->header.type != lang_input_section_enum)
+ continue;
+
+ ls = &(*pl)->input_section;
+
+ lname = bfd_get_section_name (ls->section->owner, ls->section);
+ if (strchr (lname, '$') == NULL)
+ {
+ if (found_dollar)
+ break;
+ }
+ else
+ {
+ found_dollar = TRUE;
+ if (strcmp (orig_secname, lname) < 0)
+ break;
+ }
+ }
+ }
+
+ if (add_child.head != NULL)
+ {
+ add_child.head->header.next = *pl;
+ *pl = add_child.head;
+ }
+ }
+
+ return TRUE;
+}
+
+static bfd_boolean
+gld_${EMULATION_NAME}_open_dynamic_archive
+ (const char *arch ATTRIBUTE_UNUSED,
+ search_dirs_type *search,
+ lang_input_statement_type *entry)
+{
+ static const struct
+ {
+ const char * format;
+ bfd_boolean use_prefix;
+ }
+ libname_fmt [] =
+ {
+ /* Preferred explicit import library for dll's. */
+ { "lib%s.dll.a", FALSE },
+ /* Alternate explicit import library for dll's. */
+ { "%s.dll.a", FALSE },
+ /* "libfoo.a" could be either an import lib or a static lib.
+ For backwards compatibility, libfoo.a needs to precede
+ libfoo.dll and foo.dll in the search. */
+ { "lib%s.a", FALSE },
+ /* The 'native' spelling of an import lib name is "foo.lib". */
+ { "%s.lib", FALSE },
+#ifdef DLL_SUPPORT
+ /* Try "<prefix>foo.dll" (preferred dll name, if specified). */
+ { "%s%s.dll", TRUE },
+#endif
+ /* Try "libfoo.dll" (default preferred dll name). */
+ { "lib%s.dll", FALSE },
+ /* Finally try 'native' dll name "foo.dll". */
+ { "%s.dll", FALSE },
+ /* Note: If adding more formats to this table, make sure to check to
+ see if their length is longer than libname_fmt[0].format, and if
+ so, update the call to xmalloc() below. */
+ { NULL, FALSE }
+ };
+ static unsigned int format_max_len = 0;
+ const char * filename;
+ char * full_string;
+ char * base_string;
+ unsigned int i;
+
+
+ if (! entry->is_archive)
+ return FALSE;
+
+ filename = entry->filename;
+
+ if (format_max_len == 0)
+ /* We need to allow space in the memory that we are going to allocate
+ for the characters in the format string. Since the format array is
+ static we only need to calculate this information once. In theory
+ this value could also be computed statically, but this introduces
+ the possibility for a discrepancy and hence a possible memory
+ corruption. The lengths we compute here will be too long because
+ they will include any formating characters (%s) in the strings, but
+ this will not matter. */
+ for (i = 0; libname_fmt[i].format; i++)
+ if (format_max_len < strlen (libname_fmt[i].format))
+ format_max_len = strlen (libname_fmt[i].format);
+
+ full_string = xmalloc (strlen (search->name)
+ + strlen (filename)
+ + format_max_len
+#ifdef DLL_SUPPORT
+ + (pep_dll_search_prefix
+ ? strlen (pep_dll_search_prefix) : 0)
+#endif
+ /* Allow for the terminating NUL and for the path
+ separator character that is inserted between
+ search->name and the start of the format string. */
+ + 2);
+
+ sprintf (full_string, "%s/", search->name);
+ base_string = full_string + strlen (full_string);
+
+ for (i = 0; libname_fmt[i].format; i++)
+ {
+#ifdef DLL_SUPPORT
+ if (libname_fmt[i].use_prefix)
+ {
+ if (!pep_dll_search_prefix)
+ continue;
+ sprintf (base_string, libname_fmt[i].format, pep_dll_search_prefix, filename);
+ }
+ else
+#endif
+ sprintf (base_string, libname_fmt[i].format, filename);
+
+ if (ldfile_try_open_bfd (full_string, entry))
+ break;
+ }
+
+ if (!libname_fmt[i].format)
+ {
+ free (full_string);
+ return FALSE;
+ }
+
+ entry->filename = full_string;
+
+ return TRUE;
+}
+
+static int
+gld_${EMULATION_NAME}_find_potential_libraries
+ (char *name, lang_input_statement_type *entry)
+{
+ return ldfile_open_file_search (name, entry, "", ".lib");
+}
+
+static char *
+gld_${EMULATION_NAME}_get_script (int *isfile)
+EOF
+# Scripts compiled in.
+# sed commands to quote an ld script as a C string.
+sc="-f stringify.sed"
+
+cat >>e${EMULATION_NAME}.c <<EOF
+{
+ *isfile = 0;
+
+ if (link_info.relocatable && config.build_constructors)
+ return
+EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocatable) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
+
+cat >>e${EMULATION_NAME}.c <<EOF
+
+
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+{
+ gld_${EMULATION_NAME}_before_parse,
+ syslib_default,
+ hll_default,
+ gld_${EMULATION_NAME}_after_parse,
+ gld_${EMULATION_NAME}_after_open,
+ after_allocation_default,
+ set_output_arch_default,
+ ldemul_default_target,
+ gld_${EMULATION_NAME}_before_allocation,
+ gld_${EMULATION_NAME}_get_script,
+ "${EMULATION_NAME}",
+ "${OUTPUT_FORMAT}",
+ gld_${EMULATION_NAME}_finish,
+ NULL, /* Create output section statements. */
+ gld_${EMULATION_NAME}_open_dynamic_archive,
+ gld_${EMULATION_NAME}_place_orphan,
+ gld_${EMULATION_NAME}_set_symbols,
+ NULL, /* parse_args */
+ gld${EMULATION_NAME}_add_options,
+ gld${EMULATION_NAME}_handle_option,
+ gld_${EMULATION_NAME}_unrecognized_file,
+ gld_${EMULATION_NAME}_list_options,
+ gld_${EMULATION_NAME}_recognized_file,
+ gld_${EMULATION_NAME}_find_potential_libraries,
+ NULL /* new_vers_pattern. */
+};
+EOF
diff --git a/contrib/binutils/ld/emultempl/ppc32elf.em b/contrib/binutils/ld/emultempl/ppc32elf.em
index 10f9107..b0239e0 100644
--- a/contrib/binutils/ld/emultempl/ppc32elf.em
+++ b/contrib/binutils/ld/emultempl/ppc32elf.em
@@ -1,5 +1,5 @@
# This shell script emits a C file. -*- C -*-
-# Copyright 2003, 2005 Free Software Foundation, Inc.
+# Copyright 2003, 2005, 2007 Free Software Foundation, Inc.
#
# This file is part of GLD, the Gnu Linker.
#
@@ -45,7 +45,7 @@ static int notlsopt = 0;
static int emit_stub_syms = 0;
/* Chooses the correct place for .plt and .got. */
-static int old_plt = 0;
+static enum ppc_elf_plt_type plt_style = PLT_UNSET;
static int old_got = 0;
static void
@@ -62,7 +62,7 @@ ppc_after_open (void)
lang_output_section_statement_type *got_os[2];
emit_stub_syms |= link_info.emitrelocations;
- new_plt = ppc_elf_select_plt_layout (output_bfd, &link_info, old_plt,
+ new_plt = ppc_elf_select_plt_layout (output_bfd, &link_info, plt_style,
emit_stub_syms);
if (new_plt < 0)
einfo ("%X%P: select_plt_layout problem %E\n");
@@ -124,19 +124,40 @@ ppc_before_allocation (void)
EOF
+if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
+ cat >>e${EMULATION_NAME}.c <<EOF
+/* Special handling for embedded SPU executables. */
+extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
+static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *);
+
+static bfd_boolean
+ppc_recognized_file (lang_input_statement_type *entry)
+{
+ if (embedded_spu_file (entry, "-m32"))
+ return TRUE;
+
+ return gld${EMULATION_NAME}_load_symbols (entry);
+}
+
+EOF
+LDEMUL_RECOGNIZED_FILE=ppc_recognized_file
+fi
+
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
PARSE_AND_LIST_PROLOGUE='
#define OPTION_NO_TLS_OPT 301
-#define OPTION_OLD_PLT 302
-#define OPTION_OLD_GOT 303
-#define OPTION_STUBSYMS 304
+#define OPTION_NEW_PLT 302
+#define OPTION_OLD_PLT 303
+#define OPTION_OLD_GOT 304
+#define OPTION_STUBSYMS 305
'
PARSE_AND_LIST_LONGOPTS='
{ "emit-stub-syms", no_argument, NULL, OPTION_STUBSYMS },
{ "no-tls-optimize", no_argument, NULL, OPTION_NO_TLS_OPT },
+ { "secure-plt", no_argument, NULL, OPTION_NEW_PLT },
{ "bss-plt", no_argument, NULL, OPTION_OLD_PLT },
{ "sdata-got", no_argument, NULL, OPTION_OLD_GOT },
'
@@ -145,6 +166,7 @@ PARSE_AND_LIST_OPTIONS='
fprintf (file, _("\
--emit-stub-syms Label linker stubs with a symbol.\n\
--no-tls-optimize Don'\''t try to optimize TLS accesses.\n\
+ --secure-plt Use new-style PLT if possible.\n\
--bss-plt Force old-style BSS PLT.\n\
--sdata-got Force GOT location just before .sdata.\n"
));
@@ -159,8 +181,12 @@ PARSE_AND_LIST_ARGS_CASES='
notlsopt = 1;
break;
+ case OPTION_NEW_PLT:
+ plt_style = PLT_NEW;
+ break;
+
case OPTION_OLD_PLT:
- old_plt = 1;
+ plt_style = PLT_OLD;
break;
case OPTION_OLD_GOT:
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
index ea33771..9372f88 100644
--- a/contrib/binutils/ld/emultempl/ppc64elf.em
+++ b/contrib/binutils/ld/emultempl/ppc64elf.em
@@ -225,7 +225,7 @@ ppc_add_stub_section (const char *stub_sec_name, asection *input_section)
goto err_ret;
flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_HAS_CONTENTS | SEC_RELOC | SEC_IN_MEMORY | SEC_KEEP);
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_KEEP);
if (!bfd_set_section_flags (stub_file->the_bfd, stub_sec, flags))
goto err_ret;
@@ -258,9 +258,8 @@ ppc_layout_sections_again (void)
/* If we have changed sizes of the stub sections, then we need
to recalculate all the section offsets. This may mean we need to
add even more stubs. */
- need_laying_out = 0;
-
- gld${EMULATION_NAME}_layout_sections_again ();
+ gld${EMULATION_NAME}_map_segments (TRUE);
+ need_laying_out = -1;
}
@@ -311,7 +310,7 @@ build_section_lists (lang_statement_union_type *statement)
/* Final emulation specific call. */
static void
-ppc_finish (void)
+gld${EMULATION_NAME}_finish (void)
{
/* e_entry on PowerPC64 points to the function descriptor for
_start. If _start is missing, default to the first function
@@ -353,8 +352,8 @@ ppc_finish (void)
}
}
- if (need_laying_out)
- ppc_layout_sections_again ();
+ if (need_laying_out != -1)
+ gld${EMULATION_NAME}_map_segments (need_laying_out);
if (link_info.relocatable)
{
@@ -415,17 +414,22 @@ gld${EMULATION_NAME}_new_vers_pattern (struct bfd_elf_version_expr *entry)
unsigned int len;
char *dot_pat;
- if (!dotsyms || entry->pattern[0] == '*' || entry->pattern[0] == '.')
+ if (!dotsyms
+ || (entry->pattern != NULL
+ && (entry->pattern[0] == '*' || entry->pattern[0] == '.')))
return entry;
dot_entry = xmalloc (sizeof *dot_entry);
*dot_entry = *entry;
dot_entry->next = entry;
- len = strlen (entry->pattern) + 2;
- dot_pat = xmalloc (len);
- dot_pat[0] = '.';
- memcpy (dot_pat + 1, entry->pattern, len - 1);
- dot_entry->pattern = dot_pat;
+ if (entry->pattern != NULL)
+ {
+ len = strlen (entry->pattern) + 2;
+ dot_pat = xmalloc (len);
+ dot_pat[0] = '.';
+ memcpy (dot_pat + 1, entry->pattern, len - 1);
+ dot_entry->pattern = dot_pat;
+ }
if (entry->symbol != NULL)
{
len = strlen (entry->symbol) + 2;
@@ -460,6 +464,24 @@ ppc_lang_for_each_input_file (void (*func) (lang_input_statement_type *))
EOF
+if grep -q 'ld_elf32_spu_emulation' ldemul-list.h; then
+ cat >>e${EMULATION_NAME}.c <<EOF
+/* Special handling for embedded SPU executables. */
+extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
+static bfd_boolean gld${EMULATION_NAME}_load_symbols (lang_input_statement_type *);
+
+static bfd_boolean
+ppc64_recognized_file (lang_input_statement_type *entry)
+{
+ if (embedded_spu_file (entry, "-m64"))
+ return TRUE;
+
+ return gld${EMULATION_NAME}_load_symbols (entry);
+}
+EOF
+LDEMUL_RECOGNIZED_FILE=ppc64_recognized_file
+fi
+
# Define some shell vars to insert bits of code into the standard elf
# parse_args and list_options functions.
#
@@ -574,6 +596,6 @@ PARSE_AND_LIST_ARGS_CASES='
#
LDEMUL_BEFORE_ALLOCATION=ppc_before_allocation
LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation
-LDEMUL_FINISH=ppc_finish
+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=ppc_create_output_section_statements
LDEMUL_NEW_VERS_PATTERN=gld${EMULATION_NAME}_new_vers_pattern
diff --git a/contrib/binutils/ld/emultempl/scoreelf.em b/contrib/binutils/ld/emultempl/scoreelf.em
new file mode 100644
index 0000000..a529a1b
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/scoreelf.em
@@ -0,0 +1,74 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006 Free Software Foundation, Inc.
+# Contributed by:
+# Mei Ligang (ligang@sunnorth.com.cn)
+# Pei-Lin Tsai (pltsai@sunplus.com)
+
+# This file is part of GLD, the Gnu Linker.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+# This file is sourced from elf32.em, and defines extra score-elf
+# specific routines.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+
+static void
+gld${EMULATION_NAME}_before_parse ()
+{
+#ifndef TARGET_ /* I.e., if not generic. */
+ ldfile_set_output_arch ("`echo ${ARCH}`");
+#endif /* not TARGET_ */
+ config.dynamic_link = ${DYNAMIC_LINK-true};
+ config.has_shared = `if test -n "$GENERATE_SHLIB_SCRIPT" ; then echo true ; else echo false ; fi`;
+}
+
+static void
+score_elf_after_open (void)
+{
+ if (strstr (bfd_get_target (output_bfd), "score") == NULL)
+ {
+ /* The score backend needs special fields in the output hash structure.
+ These will only be created if the output format is an score format,
+ hence we do not support linking and changing output formats at the
+ same time. Use a link followed by objcopy to change output formats. */
+ einfo ("%F%X%P: error: cannot change output format whilst linking S+core binaries\n");
+ return;
+ }
+
+ /* Call the standard elf routine. */
+ gld${EMULATION_NAME}_after_open ();
+}
+
+EOF
+
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+PARSE_AND_LIST_PROLOGUE=''
+PARSE_AND_LIST_SHORTOPTS=
+PARSE_AND_LIST_LONGOPTS=''
+PARSE_AND_LIST_OPTIONS=''
+PARSE_AND_LIST_ARGS_CASES=''
+
+# We have our own after_open and before_allocation functions, but they call
+# the standard routines, so give them a different name.
+LDEMUL_AFTER_OPEN=score_elf_after_open
+
+# Replace the elf before_parse function with our own.
+LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
+
diff --git a/contrib/binutils/ld/emultempl/spu_ovl.S b/contrib/binutils/ld/emultempl/spu_ovl.S
new file mode 100644
index 0000000..adc6ab2
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/spu_ovl.S
@@ -0,0 +1,294 @@
+/* Overlay manager for SPU.
+
+ Copyright 2006, 2007 Free Software Foundation, Inc.
+
+ This file is part of GLD, the Gnu Linker.
+
+ GLD is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GLD is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GLD; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/**
+ * MFC DMA defn's.
+ */
+#define MFC_GET_CMD 0x40
+#define MFC_MAX_DMA_SIZE 0x4000
+#define MFC_TAG_UPDATE_ALL 2
+#define MFC_TAG_ID 0
+
+
+/**
+ * Temporary register allocations.
+ * These are saved/restored here.
+ */
+#define tab $75
+#define cgbits $75
+#define add64 $75
+#define ealo $75
+#define newmask $75
+#define tagstat $75
+#define bchn $75
+#define rv1 $75
+
+#define off $76
+#define off64 $76
+#define maxsize $76
+#define oldmask $76
+#define sz $76
+#define lnkr $76
+#define rv2 $76
+
+#define cur $77
+#define cmp $77
+#define buf $77
+#define genwi $77
+#define tagid $77
+#define cmd $77
+#define rv3 $77
+
+#define cgshuf $78
+
+#define vma $6
+
+#define map $7
+#define osize $7
+#define cmp2 $7
+
+#define ea64 $8
+#define retval $8
+
+#ifdef OVLY_IRQ_SAVE
+#define irqtmp $8
+#define irq_stat $9
+#endif
+
+ .extern _ovly_table
+ .extern _ovly_buf_table
+
+ .text
+ .align 4
+ .type __rv_pattern, @object
+ .size __rv_pattern, 16
+__rv_pattern:
+ .word 0x00010203, 0x1c1d1e1f, 0x00010203, 0x10111213
+ .type __cg_pattern, @object
+ .size __cg_pattern, 16
+__cg_pattern:
+ .word 0x04050607, 0x80808080, 0x80808080, 0x80808080
+
+/**
+ * __ovly_return - stub for returning from overlay functions.
+ *
+ * inputs:
+ * $lr link register
+ *
+ * outputs:
+ * $78 old partition number, to be reloaded
+ * $79 return address in old partion number
+ */
+ .global __ovly_return
+ .type __ovly_return, @function
+
+ .word 0
+__ovly_return:
+ shlqbyi $78, $lr, 4
+ shlqbyi $79, $lr, 8
+ biz $78, $79
+ .size __ovly_return, . - __ovly_return
+
+/**
+ * __ovly_load - copy an overlay partion to local store.
+ *
+ * inputs:
+ * $78 partition number to be loaded.
+ * $79 branch target in new partition.
+ * $lr link register, containing return addr.
+ *
+ * outputs:
+ * $lr new link register, returning through __ovly_return.
+ *
+ * Copy a new overlay partition into local store, or return
+ * immediately if the partition is already resident.
+ */
+ .global __ovly_load
+ .type __ovly_load, @function
+
+__ovly_load:
+/* Save temporary registers to stack. */
+ stqd $6, -16($sp)
+ stqd $7, -32($sp)
+ stqd $8, -48($sp)
+
+#ifdef OVLY_IRQ_SAVE
+/* Save irq state, then disable interrupts. */
+ stqd $9, -64($sp)
+ ila irqtmp, __ovly_irq_save
+ rdch irq_stat, $SPU_RdMachStat
+ bid irqtmp
+__ovly_irq_save:
+#endif
+
+/* Set branch hint to overlay target. */
+ hbr __ovly_load_ret, $79
+
+/* Get caller's overlay index by back chaining through stack frames.
+ * Loop until end of stack (back chain all-zeros) or
+ * encountered a link register we set here. */
+ lqd bchn, 0($sp)
+ ila retval, __ovly_return
+
+__ovly_backchain_loop:
+ lqd lnkr, 16(bchn)
+ lqd bchn, 0(bchn)
+ ceq cmp, lnkr, retval
+ ceqi cmp2, bchn, 0
+ or cmp, cmp, cmp2
+ brz cmp, __ovly_backchain_loop
+
+/* If we reached the zero back-chain, then lnkr is bogus. Clear the
+ * part of lnkr that we use later (slot 3). */
+ rotqbyi cmp2, cmp2, 4
+ andc lnkr, lnkr, cmp2
+
+/* Set lr = {__ovly_return, prev ovl ndx, caller return adr, callee ovl ndx}. */
+ lqd rv1, (__rv_pattern-__ovly_return+4)(retval)
+ shufb rv2, retval, lnkr, rv1
+ shufb rv3, $lr, $78, rv1
+ fsmbi rv1, 0xff
+ selb rv2, rv2, rv3, rv1
+/* If we have a tail call from one overlay function to another overlay,
+ then lr is already set up. Don't change it. */
+ ceq rv1, $lr, retval
+ fsmb rv1, rv1
+ selb $lr, rv2, $lr, rv1
+
+/* Branch to $79 if non-overlay */
+ brz $78, __ovly_load_restore
+
+/* Load values from _ovly_table[$78].
+ * extern struct {
+ * u32 vma;
+ * u32 size;
+ * u32 file_offset;
+ * u32 buf;
+ * } _ovly_table[];
+ */
+ shli off, $78, 4
+ ila tab, _ovly_table - 16
+ lqx vma, tab, off
+ rotqbyi buf, vma, 12
+
+/* Load values from _ovly_buf_table[buf].
+ * extern struct {
+ * u32 mapped;
+ * } _ovly_buf_table[];
+ */
+ ila tab, _ovly_buf_table
+ ai off, buf, -1
+ shli off, off, 2
+ lqx map, tab, off
+ rotqby cur, map, off
+
+/* Branch to $79 now if overlay is already mapped. */
+ ceq cmp, $78, cur
+ brnz cmp, __ovly_load_restore
+
+/* Marker for profiling code. If we get here, we are about to load
+ * a new overlay.
+ */
+ .global __ovly_load_event
+ .type __ovly_load_event, @function
+__ovly_load_event:
+
+/* Set _ovly_buf_table[buf].mapped = $78. */
+ cwx genwi, tab, off
+ shufb map, $78, map, genwi
+ stqx map, tab, off
+
+/* A new partition needs to be loaded. Prepare for DMA loop.
+ * _EAR_ is the 64b base EA, filled in at run time by the
+ * loader, and indicating the value for SPU executable image start.
+ */
+ lqd cgshuf, (__cg_pattern-__ovly_return+4)(retval)
+ rotqbyi osize, vma, 4
+ rotqbyi sz, vma, 8
+ lqa ea64, _EAR_
+
+__ovly_xfer_loop:
+/* 64b add to compute next ea64. */
+ rotqmbyi off64, sz, -4
+ cg cgbits, ea64, off64
+ shufb add64, cgbits, cgbits, cgshuf
+ addx add64, ea64, off64
+ ori ea64, add64, 0
+
+/* Setup DMA parameters, then issue DMA request. */
+ rotqbyi ealo, add64, 4
+ ila maxsize, MFC_MAX_DMA_SIZE
+ cgt cmp, osize, maxsize
+ selb sz, osize, maxsize, cmp
+ ila tagid, MFC_TAG_ID
+ wrch $MFC_LSA, vma
+ wrch $MFC_EAH, ea64
+ wrch $MFC_EAL, ealo
+ wrch $MFC_Size, sz
+ wrch $MFC_TagId, tagid
+ ila cmd, MFC_GET_CMD
+ wrch $MFC_Cmd, cmd
+
+/* Increment vma, decrement size, branch back as needed. */
+ a vma, vma, sz
+ sf osize, sz, osize
+ brnz osize, __ovly_xfer_loop
+
+/* Save app's tagmask, wait for DMA complete, restore mask. */
+ rdch oldmask, $MFC_RdTagMask
+#if MFC_TAG_ID < 16
+ ilh newmask, 1 << MFC_TAG_ID
+#else
+ ilhu newmask, 1 << (MFC_TAG_ID - 16)
+#endif
+ wrch $MFC_WrTagMask, newmask
+ ila tagstat, MFC_TAG_UPDATE_ALL
+ wrch $MFC_WrTagUpdate, tagstat
+ rdch tagstat, $MFC_RdTagStat
+ sync
+ wrch $MFC_WrTagMask, oldmask
+
+ .global _ovly_debug_event
+ .type _ovly_debug_event, @function
+_ovly_debug_event:
+/* GDB inserts debugger trap here. */
+ nop
+
+__ovly_load_restore:
+#ifdef OVLY_IRQ_SAVE
+/* Conditionally re-enable interrupts. */
+ andi irq_stat, irq_stat, 1
+ ila irqtmp, __ovly_irq_restore
+ binze irq_stat, irqtmp
+__ovly_irq_restore:
+ lqd $9, -64($sp)
+#endif
+
+/* Restore saved registers. */
+ lqd $8, -48($sp)
+ lqd $7, -32($sp)
+ lqd $6, -16($sp)
+
+__ovly_load_ret:
+/* Branch to target address. */
+ bi $79
+
+ .size __ovly_load, . - __ovly_load
diff --git a/contrib/binutils/ld/emultempl/spu_ovl.o b/contrib/binutils/ld/emultempl/spu_ovl.o
new file mode 100644
index 0000000..a68eea3
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/spu_ovl.o
Binary files differ
diff --git a/contrib/binutils/ld/emultempl/spuelf.em b/contrib/binutils/ld/emultempl/spuelf.em
new file mode 100644
index 0000000..05adeb8
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/spuelf.em
@@ -0,0 +1,504 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2006, 2007 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.,
+# 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+# This file is sourced from elf32.em, and defines extra spu specific
+# features.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+#include "ldctor.h"
+#include "elf32-spu.h"
+
+/* Non-zero if no overlay processing should be done. */
+static int no_overlays = 0;
+
+/* Non-zero if we want stubs on all calls out of overlay regions. */
+static int non_overlay_stubs = 0;
+
+/* Whether to emit symbols for stubs. */
+static int emit_stub_syms = 0;
+
+/* Non-zero to perform stack space analysis. */
+static int stack_analysis = 0;
+
+/* Whether to emit symbols with stack requirements for each function. */
+static int emit_stack_syms = 0;
+
+/* Range of valid addresses for loadable sections. */
+static bfd_vma local_store_lo = 0;
+static bfd_vma local_store_hi = 0x3ffff;
+
+static const char ovl_mgr[] = {
+EOF
+
+../binutils/bin2c < ${srcdir}/emultempl/spu_ovl.o >> e${EMULATION_NAME}.c
+
+cat >>e${EMULATION_NAME}.c <<EOF
+};
+
+static const struct _ovl_stream ovl_mgr_stream = {
+ ovl_mgr,
+ ovl_mgr + sizeof (ovl_mgr)
+};
+
+static asection *toe = NULL;
+
+
+static int
+is_spu_target (void)
+{
+ extern const bfd_target bfd_elf32_spu_vec;
+
+ return link_info.hash->creator == &bfd_elf32_spu_vec;
+}
+
+/* Create our note section. */
+
+static void
+spu_after_open (void)
+{
+ if (is_spu_target ()
+ && !link_info.relocatable
+ && link_info.input_bfds != NULL
+ && !spu_elf_create_sections (output_bfd, &link_info,
+ stack_analysis, emit_stack_syms))
+ einfo ("%X%P: can not create note section: %E\n");
+
+ gld${EMULATION_NAME}_after_open ();
+}
+
+/* Add section S at the end of output section OUTPUT_NAME.
+
+ Really, we should be duplicating ldlang.c map_input_to_output_sections
+ logic here, ie. using the linker script to find where the section
+ goes. That's rather a lot of code, and we don't want to run
+ map_input_to_output_sections again because most sections are already
+ mapped. So cheat, and put the section in a fixed place, ignoring any
+ attempt via a linker script to put .stub, .ovtab, and built-in
+ overlay manager code somewhere else. */
+
+static void
+spu_place_special_section (asection *s, const char *output_name)
+{
+ lang_output_section_statement_type *os;
+
+ os = lang_output_section_find (output_name);
+ if (os == NULL)
+ {
+ const char *save = s->name;
+ s->name = output_name;
+ gld${EMULATION_NAME}_place_orphan (s);
+ s->name = save;
+ }
+ else
+ lang_add_section (&os->children, s, os);
+
+ s->output_section->size += s->size;
+}
+
+/* Load built-in overlay manager, and tweak overlay section alignment. */
+
+static void
+spu_elf_load_ovl_mgr (void)
+{
+ lang_output_section_statement_type *os;
+ struct elf_link_hash_entry *h;
+
+ h = elf_link_hash_lookup (elf_hash_table (&link_info),
+ "__ovly_load", FALSE, FALSE, FALSE);
+
+ if (h != NULL
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && h->def_regular)
+ {
+ /* User supplied __ovly_load. */
+ }
+ else if (ovl_mgr_stream.start == ovl_mgr_stream.end)
+ einfo ("%F%P: no built-in overlay manager\n");
+ else
+ {
+ lang_input_statement_type *ovl_is;
+
+ ovl_is = lang_add_input_file ("builtin ovl_mgr",
+ lang_input_file_is_file_enum,
+ NULL);
+
+ if (!spu_elf_open_builtin_lib (&ovl_is->the_bfd, &ovl_mgr_stream))
+ einfo ("%X%P: can not open built-in overlay manager: %E\n");
+ else
+ {
+ asection *in;
+
+ if (!load_symbols (ovl_is, NULL))
+ einfo ("%X%P: can not load built-in overlay manager: %E\n");
+
+ /* Map overlay manager sections to output sections. */
+ for (in = ovl_is->the_bfd->sections; in != NULL; in = in->next)
+ if ((in->flags & (SEC_ALLOC | SEC_LOAD))
+ == (SEC_ALLOC | SEC_LOAD))
+ spu_place_special_section (in, ".text");
+ }
+ }
+
+ /* Ensure alignment of overlay sections is sufficient. */
+ for (os = &lang_output_section_statement.head->output_section_statement;
+ os != NULL;
+ os = os->next)
+ if (os->bfd_section != NULL
+ && spu_elf_section_data (os->bfd_section) != NULL
+ && spu_elf_section_data (os->bfd_section)->ovl_index != 0)
+ {
+ if (os->bfd_section->alignment_power < 4)
+ os->bfd_section->alignment_power = 4;
+
+ /* Also ensure size rounds up. */
+ os->block_value = 16;
+ }
+}
+
+/* Go find if we need to do anything special for overlays. */
+
+static void
+spu_before_allocation (void)
+{
+ if (is_spu_target ()
+ && !link_info.relocatable
+ && !no_overlays)
+ {
+ /* Size the sections. This is premature, but we need to know the
+ rough layout so that overlays can be found. */
+ expld.phase = lang_mark_phase_enum;
+ expld.dataseg.phase = exp_dataseg_none;
+ one_lang_size_sections_pass (NULL, TRUE);
+
+ /* Find overlays by inspecting section vmas. */
+ if (spu_elf_find_overlays (output_bfd, &link_info))
+ {
+ asection *stub, *ovtab;
+
+ if (!spu_elf_size_stubs (output_bfd, &link_info, non_overlay_stubs,
+ stack_analysis, &stub, &ovtab, &toe))
+ einfo ("%X%P: can not size overlay stubs: %E\n");
+
+ if (stub != NULL)
+ {
+ spu_place_special_section (stub, ".text");
+ spu_place_special_section (ovtab, ".data");
+ spu_place_special_section (toe, ".toe");
+
+ spu_elf_load_ovl_mgr ();
+ }
+ }
+
+ /* We must not cache anything from the preliminary sizing. */
+ lang_reset_memory_regions ();
+ }
+
+ gld${EMULATION_NAME}_before_allocation ();
+}
+
+/* Final emulation specific call. */
+
+static void
+gld${EMULATION_NAME}_finish (void)
+{
+ int need_laying_out;
+
+ need_laying_out = bfd_elf_discard_info (output_bfd, &link_info);
+
+ gld${EMULATION_NAME}_map_segments (need_laying_out);
+
+ if (is_spu_target () && local_store_lo < local_store_hi)
+ {
+ asection *s;
+
+ s = spu_elf_check_vma (output_bfd, local_store_lo, local_store_hi);
+ if (s != NULL)
+ einfo ("%X%P: %A exceeds local store range\n", s);
+ }
+
+ if (toe != NULL
+ && !spu_elf_build_stubs (&link_info,
+ emit_stub_syms || link_info.emitrelocations,
+ toe))
+ einfo ("%X%P: can not build overlay stubs: %E\n");
+
+ finish_default ();
+}
+
+EOF
+
+if grep -q 'ld_elf.*ppc.*_emulation' ldemul-list.h; then
+ cat >>e${EMULATION_NAME}.c <<EOF
+#include "filenames.h"
+#include <fcntl.h>
+#include <sys/wait.h>
+
+struct tflist {
+ struct tflist *next;
+ char name[9];
+};
+
+static struct tflist *tmp_file_list;
+
+static void clean_tmp (void)
+{
+ for (; tmp_file_list != NULL; tmp_file_list = tmp_file_list->next)
+ unlink (tmp_file_list->name);
+}
+
+static const char *
+base_name (const char *path)
+{
+ const char *file = strrchr (path, '/');
+#ifdef HAVE_DOS_BASED_FILE_SYSTEM
+ {
+ char *bslash = strrchr (path, '\\\\');
+
+ if (file == NULL || (bslash != NULL && bslash > file))
+ file = bslash;
+ if (file == NULL
+ && path[0] != '\0'
+ && path[1] == ':')
+ file = path + 1;
+ }
+#endif
+ if (file == NULL)
+ file = path;
+ else
+ ++file;
+ return file;
+}
+
+/* This function is called when building a ppc32 or ppc64 executable
+ to handle embedded spu images. */
+extern bfd_boolean embedded_spu_file (lang_input_statement_type *, const char *);
+
+bfd_boolean
+embedded_spu_file (lang_input_statement_type *entry, const char *flags)
+{
+ const char *cmd[6];
+ const char *sym;
+ char *handle, *p;
+ struct tflist *tf;
+ char *oname;
+ int fd;
+ pid_t pid;
+ int status;
+ union lang_statement_union **old_stat_tail;
+ union lang_statement_union **old_file_tail;
+ union lang_statement_union *new_ent;
+ lang_input_statement_type *search;
+
+ if (entry->the_bfd->format != bfd_object
+ || strcmp (entry->the_bfd->xvec->name, "elf32-spu") != 0
+ || (entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_EXEC
+ && entry->the_bfd->tdata.elf_obj_data->elf_header->e_type != ET_DYN))
+ return FALSE;
+
+ /* Use the filename as the symbol marking the program handle struct. */
+ sym = base_name (entry->the_bfd->filename);
+
+ handle = xstrdup (sym);
+ for (p = handle; *p; ++p)
+ if (!(ISALNUM (*p) || *p == '$' || *p == '.'))
+ *p = '_';
+
+ if (tmp_file_list == NULL)
+ atexit (clean_tmp);
+ tf = xmalloc (sizeof (*tf));
+ tf->next = tmp_file_list;
+ tmp_file_list = tf;
+ oname = tf->name;
+ memcpy (tf->name, "ldXXXXXX", sizeof (tf->name));
+
+#ifdef HAVE_MKSTEMP
+ fd = mkstemp (oname);
+#else
+ oname = mktemp (oname);
+ if (oname == NULL)
+ return FALSE;
+ fd = open (oname, O_RDWR | O_CREAT | O_EXCL, 0600);
+#endif
+ if (fd == -1)
+ return FALSE;
+ close (fd);
+
+ for (search = (lang_input_statement_type *) input_file_chain.head;
+ search != NULL;
+ search = (lang_input_statement_type *) search->next_real_file)
+ {
+ const char *infile = base_name (search->filename);
+
+ if (infile != NULL
+ && strncmp (infile, "crtbegin", 8) == 0)
+ {
+ if (infile[8] == 'S')
+ flags = concat (flags, " -fPIC", NULL);
+ else if (infile[8] == 'T')
+ flags = concat (flags, " -fpie", NULL);
+ break;
+ }
+ }
+
+ /* Use fork() and exec() rather than system() so that we don't
+ need to worry about quoting args. */
+ cmd[0] = EMBEDSPU;
+ cmd[1] = flags;
+ cmd[2] = handle;
+ cmd[3] = entry->the_bfd->filename;
+ cmd[4] = oname;
+ cmd[5] = NULL;
+ if (trace_file_tries)
+ {
+ info_msg (_("running: %s \"%s\" \"%s\" \"%s\" \"%s\"\n"),
+ cmd[0], cmd[1], cmd[2], cmd[3], cmd[4]);
+ fflush (stdout);
+ }
+
+ pid = fork ();
+ if (pid == -1)
+ return FALSE;
+ if (pid == 0)
+ {
+ execvp (cmd[0], (char *const *) cmd);
+ if (strcmp ("embedspu", EMBEDSPU) != 0)
+ {
+ cmd[0] = "embedspu";
+ execvp (cmd[0], (char *const *) cmd);
+ }
+ perror (cmd[0]);
+ _exit (127);
+ }
+#ifdef HAVE_WAITPID
+#define WAITFOR(PID, STAT) waitpid (PID, STAT, 0)
+#else
+#define WAITFOR(PID, STAT) wait (STAT)
+#endif
+ if (WAITFOR (pid, &status) != pid
+ || !WIFEXITED (status)
+ || WEXITSTATUS (status) != 0)
+ return FALSE;
+#undef WAITFOR
+
+ old_stat_tail = stat_ptr->tail;
+ old_file_tail = input_file_chain.tail;
+ if (lang_add_input_file (oname, lang_input_file_is_file_enum, NULL) == NULL)
+ return FALSE;
+
+ /* lang_add_input_file put the new list entry at the end of the statement
+ and input file lists. Move it to just after the current entry. */
+ new_ent = *old_stat_tail;
+ *old_stat_tail = NULL;
+ stat_ptr->tail = old_stat_tail;
+ *old_file_tail = NULL;
+ input_file_chain.tail = old_file_tail;
+ new_ent->header.next = entry->header.next;
+ entry->header.next = new_ent;
+ new_ent->input_statement.next_real_file = entry->next_real_file;
+ entry->next_real_file = new_ent;
+
+ /* Ensure bfd sections are excluded from the output. */
+ bfd_section_list_clear (entry->the_bfd);
+ entry->loaded = TRUE;
+ return TRUE;
+}
+
+EOF
+fi
+
+# Define some shell vars to insert bits of code into the standard elf
+# parse_args and list_options functions.
+#
+PARSE_AND_LIST_PROLOGUE='
+#define OPTION_SPU_PLUGIN 301
+#define OPTION_SPU_NO_OVERLAYS (OPTION_SPU_PLUGIN + 1)
+#define OPTION_SPU_STUB_SYMS (OPTION_SPU_NO_OVERLAYS + 1)
+#define OPTION_SPU_NON_OVERLAY_STUBS (OPTION_SPU_STUB_SYMS + 1)
+#define OPTION_SPU_LOCAL_STORE (OPTION_SPU_NON_OVERLAY_STUBS + 1)
+#define OPTION_SPU_STACK_ANALYSIS (OPTION_SPU_LOCAL_STORE + 1)
+#define OPTION_SPU_STACK_SYMS (OPTION_SPU_STACK_ANALYSIS + 1)
+'
+
+PARSE_AND_LIST_LONGOPTS='
+ { "plugin", no_argument, NULL, OPTION_SPU_PLUGIN },
+ { "no-overlays", no_argument, NULL, OPTION_SPU_NO_OVERLAYS },
+ { "emit-stub-syms", no_argument, NULL, OPTION_SPU_STUB_SYMS },
+ { "extra-overlay-stubs", no_argument, NULL, OPTION_SPU_NON_OVERLAY_STUBS },
+ { "local-store", required_argument, NULL, OPTION_SPU_LOCAL_STORE },
+ { "stack-analysis", no_argument, NULL, OPTION_SPU_STACK_ANALYSIS },
+ { "emit-stack-syms", no_argument, NULL, OPTION_SPU_STACK_SYMS },
+'
+
+PARSE_AND_LIST_OPTIONS='
+ fprintf (file, _("\
+ --plugin Make SPU plugin.\n\
+ --no-overlays No overlay handling.\n\
+ --emit-stub-syms Add symbols on overlay call stubs.\n\
+ --extra-overlay-stubs Add stubs on all calls out of overlay regions.\n\
+ --local-store=lo:hi Valid address range.\n\
+ --stack-analysis Estimate maximum stack requirement.\n\
+ --emit-stack-syms Add __stack_func giving stack needed for each func.\n"
+ ));
+'
+
+PARSE_AND_LIST_ARGS_CASES='
+ case OPTION_SPU_PLUGIN:
+ spu_elf_plugin (1);
+ break;
+
+ case OPTION_SPU_NO_OVERLAYS:
+ no_overlays = 1;
+ break;
+
+ case OPTION_SPU_STUB_SYMS:
+ emit_stub_syms = 1;
+ break;
+
+ case OPTION_SPU_NON_OVERLAY_STUBS:
+ non_overlay_stubs = 1;
+ break;
+
+ case OPTION_SPU_LOCAL_STORE:
+ {
+ char *end;
+ local_store_lo = strtoul (optarg, &end, 0);
+ if (*end == '\'':'\'')
+ {
+ local_store_hi = strtoul (end + 1, &end, 0);
+ if (*end == 0)
+ break;
+ }
+ einfo (_("%P%F: invalid --local-store address range `%s'\''\n"), optarg);
+ }
+ break;
+
+ case OPTION_SPU_STACK_ANALYSIS:
+ stack_analysis = 1;
+ break;
+
+ case OPTION_SPU_STACK_SYMS:
+ emit_stack_syms = 1;
+ break;
+'
+
+LDEMUL_AFTER_OPEN=spu_after_open
+LDEMUL_BEFORE_ALLOCATION=spu_before_allocation
+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
diff --git a/contrib/binutils/ld/emultempl/sunos.em b/contrib/binutils/ld/emultempl/sunos.em
index a480558..53a572a 100644
--- a/contrib/binutils/ld/emultempl/sunos.em
+++ b/contrib/binutils/ld/emultempl/sunos.em
@@ -10,7 +10,7 @@ cat >e${EMULATION_NAME}.c <<EOF
/* SunOS emulation code for ${EMULATION_NAME}
Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain <sac@cygnus.com>
SunOS shared library support by Ian Lance Taylor <ian@cygnus.com>
@@ -32,8 +32,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -160,7 +160,7 @@ gld${EMULATION_NAME}_find_so (lang_input_statement_type *inp)
|| ! inp->dynamic)
return;
- ASSERT (strncmp (inp->local_sym_name, "-l", 2) == 0);
+ ASSERT (CONST_STRNEQ (inp->local_sym_name, "-l"));
for (search = search_head; search != NULL; search = search->next)
{
@@ -273,7 +273,7 @@ gld${EMULATION_NAME}_search_dir
const char *s;
int found_maj, found_min;
- if (strncmp (entry->d_name, "lib", 3) != 0
+ if (! CONST_STRNEQ (entry->d_name, "lib")
|| strncmp (entry->d_name + 3, filename, len) != 0)
continue;
@@ -288,7 +288,7 @@ gld${EMULATION_NAME}_search_dir
native linker does not. This is more convenient for packages
which just generate .so files for shared libraries, as on ELF
systems. */
- if (strncmp (entry->d_name + 3 + len, ".so", 3) != 0)
+ if (! CONST_STRNEQ (entry->d_name + 3 + len, ".so"))
continue;
if (entry->d_name[6 + len] == '\0')
;
@@ -400,7 +400,7 @@ gld${EMULATION_NAME}_after_open (void)
if (global_found)
continue;
- if (strncmp (lname, "-l", 2) != 0)
+ if (! CONST_STRNEQ (lname, "-l"))
{
bfd *abfd;
@@ -586,7 +586,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
{
if (s->filename == NULL)
return;
- if (strncmp (global_needed->name, "-l", 2) != 0)
+ if (! CONST_STRNEQ (global_needed->name, "-l"))
{
if (strcmp (s->filename, global_needed->name) == 0)
global_found = TRUE;
@@ -605,7 +605,7 @@ gld${EMULATION_NAME}_check_needed (lang_input_statement_type *s)
else
++sname;
- if (strncmp (sname, "lib", 3) != 0)
+ if (! CONST_STRNEQ (sname, "lib"))
return;
sname += 3;
diff --git a/contrib/binutils/ld/emultempl/ticoff.em b/contrib/binutils/ld/emultempl/ticoff.em
index 0382bbd..113c2b4 100644
--- a/contrib/binutils/ld/emultempl/ticoff.em
+++ b/contrib/binutils/ld/emultempl/ticoff.em
@@ -3,7 +3,8 @@
(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 1999, 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2002, 2003, 2004, 2007
+ 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
@@ -24,8 +25,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#define TARGET_IS_${EMULATION_NAME}
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "getopt.h"
diff --git a/contrib/binutils/ld/emultempl/vanilla.em b/contrib/binutils/ld/emultempl/vanilla.em
index 2124852..ece005e 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, 2001, 2002, 2003
+ Copyright 1991, 1992, 1994, 2000, 2001, 2002, 2003, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -22,9 +22,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
-
+#include "bfd.h"
#include "ld.h"
#include "ldmisc.h"
diff --git a/contrib/binutils/ld/gen-doc.texi b/contrib/binutils/ld/gen-doc.texi
index 800f64e..03ab558 100644
--- a/contrib/binutils/ld/gen-doc.texi
+++ b/contrib/binutils/ld/gen-doc.texi
@@ -3,14 +3,17 @@
@set GENERIC
@c 2. Specific target machines
-@set H8300
-@set I960
@set ARM
+@set H8300
@set HPPA
+@set I960
+@set M68HC11
@set MMIX
@set MSP430
@set POWERPC
@set POWERPC64
+@set Renesas
+@set SPU
@set TICOFF
@set WIN32
@set XTENSA
diff --git a/contrib/binutils/ld/genscripts.sh b/contrib/binutils/ld/genscripts.sh
index e9d4f15..81b78a2 100755
--- a/contrib/binutils/ld/genscripts.sh
+++ b/contrib/binutils/ld/genscripts.sh
@@ -189,6 +189,14 @@ if [ "x${use_sysroot}" != "xyes" ] ; then
::) LIB_PATH=${tool_lib} ;;
*) LIB_PATH=${tool_lib}:${LIB_PATH} ;;
esac
+ # For multilib targets, search both $tool_lib dirs
+ if [ "x${LIBPATH_SUFFIX}" != "x" ] ; then
+ case :${LIB_PATH}: in
+ ::: | *:${tool_lib}${LIBPATH_SUFFIX}:*) ;;
+ ::) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX} ;;
+ *) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX}:${LIB_PATH} ;;
+ esac
+ fi
fi
LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
diff --git a/contrib/binutils/ld/ld.1 b/contrib/binutils/ld/ld.1
deleted file mode 100644
index 26003aa..0000000
--- a/contrib/binutils/ld/ld.1
+++ /dev/null
@@ -1,2071 +0,0 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
-.\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings. \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote. \*(C+ will
-.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
-.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
-.\" nothing in troff, for use with C<>.
-.tr \(*W-
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-. ds -- \(*W-
-. ds PI pi
-. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
-. ds L" ""
-. ds R" ""
-. ds C` ""
-. ds C' ""
-'br\}
-.el\{\
-. ds -- \|\(em\|
-. ds PI \(*p
-. ds L" ``
-. ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD. Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-. de IX
-. tm Index:\\$1\t\\n%\t"\\$2"
-..
-. nr % 0
-. rr F
-.\}
-.\"
-.\" For nroff, turn off justification. Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear. Run. Save yourself. No user-serviceable parts.
-. \" fudge factors for nroff and troff
-.if n \{\
-. ds #H 0
-. ds #V .8m
-. ds #F .3m
-. ds #[ \f1
-. ds #] \fP
-.\}
-.if t \{\
-. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-. ds #V .6m
-. ds #F 0
-. ds #[ \&
-. ds #] \&
-.\}
-. \" simple accents for nroff and troff
-.if n \{\
-. ds ' \&
-. ds ` \&
-. ds ^ \&
-. ds , \&
-. ds ~ ~
-. ds /
-.\}
-.if t \{\
-. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-. \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-. \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-. \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-. ds : e
-. ds 8 ss
-. ds o a
-. ds d- d\h'-1'\(ga
-. ds D- D\h'-1'\(hy
-. ds th \o'bp'
-. ds Th \o'LP'
-. ds ae ae
-. ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "LD 1"
-.TH LD 1 "2006-06-23" "binutils-2.17" "GNU Development Tools"
-.SH "NAME"
-ld \- Using LD, the GNU linker
-.SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-ld [\fBoptions\fR] \fIobjfile\fR ...
-.SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-\&\fBld\fR 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 \fBld\fR.
-.PP
-\&\fBld\fR accepts Linker Command Language files written in
-a superset of \s-1AT&T\s0's Link Editor Command Language syntax,
-to provide explicit and total control over the linking process.
-.PP
-This man page does not describe the command language; see the
-\&\fBld\fR entry in \f(CW\*(C`info\*(C'\fR, or the manual
-ld: the \s-1GNU\s0 linker, for full details on the command language and
-on other aspects of the \s-1GNU\s0 linker.
-.PP
-This version of \fBld\fR uses the general purpose \s-1BFD\s0 libraries
-to operate on object files. This allows \fBld\fR to read, combine, and
-write object files in many different formats\-\-\-for example, \s-1COFF\s0 or
-\&\f(CW\*(C`a.out\*(C'\fR. Different formats may be linked together to produce any
-available kind of object file.
-.PP
-Aside from its flexibility, the \s-1GNU\s0 linker is more helpful than other
-linkers in providing diagnostic information. Many linkers abandon
-execution immediately upon encountering an error; whenever possible,
-\&\fBld\fR continues executing, allowing you to identify other errors
-(or, in some cases, to get an output file in spite of the error).
-.PP
-The \s-1GNU\s0 linker \fBld\fR 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.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-The linker supports a plethora of command-line options, but in actual
-practice few of them are used in any particular context.
-For instance, a frequent use of \fBld\fR is to link standard Unix
-object files on a standard, supported Unix system. On such a system, to
-link a file \f(CW\*(C`hello.o\*(C'\fR:
-.PP
-.Vb 1
-\& ld \-o <output> /lib/crt0.o hello.o \-lc
-.Ve
-.PP
-This tells \fBld\fR to produce a file called \fIoutput\fR as the
-result of linking the file \f(CW\*(C`/lib/crt0.o\*(C'\fR with \f(CW\*(C`hello.o\*(C'\fR and
-the library \f(CW\*(C`libc.a\*(C'\fR, which will come from the standard search
-directories. (See the discussion of the \fB\-l\fR option below.)
-.PP
-Some of the command-line options to \fBld\fR may be specified at any
-point in the command line. However, options which refer to files, such
-as \fB\-l\fR or \fB\-T\fR, cause the file to be read at the point at
-which the option appears in the command line, relative to the object
-files and other file options. Repeating non-file options with a
-different argument will either have no further effect, or override prior
-occurrences (those further to the left on the command line) of that
-option. Options which may be meaningfully specified more than once are
-noted in the descriptions below.
-.PP
-Non-option arguments are object files or archives which are to be linked
-together. They may follow, precede, or be mixed in with command-line
-options, except that an object file argument may not be placed between
-an option and its argument.
-.PP
-Usually the linker is invoked with at least one object file, but you can
-specify other forms of binary input files using \fB\-l\fR, \fB\-R\fR,
-and the script command language. If \fIno\fR binary input files at all
-are specified, the linker does not produce any output, and issues the
-message \fBNo input files\fR.
-.PP
-If the linker cannot recognize the format of an object file, it will
-assume that it is a linker script. A script specified in this way
-augments the main linker script used for the link (either the default
-linker script or the one specified by using \fB\-T\fR). 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
-\&\f(CW\*(C`INPUT\*(C'\fR or \f(CW\*(C`GROUP\*(C'\fR to load other objects. Note that
-specifying a script in this way merely augments the main linker script;
-use the \fB\-T\fR option to replace the default linker script entirely.
-.PP
-For options whose names are a single letter,
-option arguments must either follow the option letter without intervening
-whitespace, or be given as separate arguments immediately following the
-option that requires them.
-.PP
-For options whose names are multiple letters, either one dash or two can
-precede the option name; for example, \fB\-trace\-symbol\fR and
-\&\fB\-\-trace\-symbol\fR are equivalent. Note\-\-\-there is one exception to
-this rule. Multiple letter options that start with a lower case 'o' can
-only be preceeded by two dashes. This is to reduce confusion with the
-\&\fB\-o\fR option. So for example \fB\-omagic\fR sets the output file
-name to \fBmagic\fR whereas \fB\-\-omagic\fR sets the \s-1NMAGIC\s0 flag on the
-output.
-.PP
-Arguments to multiple-letter options must either be separated from the
-option name by an equals sign, or be given as separate arguments
-immediately following the option that requires them. For example,
-\&\fB\-\-trace\-symbol foo\fR and \fB\-\-trace\-symbol=foo\fR are equivalent.
-Unique abbreviations of the names of multiple-letter options are
-accepted.
-.PP
-Note\-\-\-if the linker is being invoked indirectly, via a compiler driver
-(e.g. \fBgcc\fR) then all the linker command line options should be
-prefixed by \fB\-Wl,\fR (or whatever is appropriate for the particular
-compiler driver) like this:
-.PP
-.Vb 1
-\& gcc \-Wl,\-\-startgroup foo.o bar.o \-Wl,\-\-endgroup
-.Ve
-.PP
-This is important, because otherwise the compiler driver program may
-silently drop the linker options, resulting in a bad link.
-.PP
-Here is a table of the generic command line switches accepted by the \s-1GNU\s0
-linker:
-.IP "\fB@\fR\fIfile\fR" 4
-.IX Item "@file"
-Read command-line options from \fIfile\fR. The options read are
-inserted in place of the original @\fIfile\fR option. If \fIfile\fR
-does not exist, or cannot be read, then the option will be treated
-literally, and not removed.
-.Sp
-Options in \fIfile\fR are separated by whitespace. A whitespace
-character may be included in an option by surrounding the entire
-option in either single or double quotes. Any character (including a
-backslash) may be included by prefixing the character to be included
-with a backslash. The \fIfile\fR may itself contain additional
-@\fIfile\fR options; any such options will be processed recursively.
-.IP "\fB\-a\fR\fIkeyword\fR" 4
-.IX Item "-akeyword"
-This option is supported for \s-1HP/UX\s0 compatibility. The \fIkeyword\fR
-argument must be one of the strings \fBarchive\fR, \fBshared\fR, or
-\&\fBdefault\fR. \fB\-aarchive\fR is functionally equivalent to
-\&\fB\-Bstatic\fR, and the other two keywords are functionally equivalent
-to \fB\-Bdynamic\fR. This option may be used any number of times.
-.IP "\fB\-A\fR\fIarchitecture\fR" 4
-.IX Item "-Aarchitecture"
-.PD 0
-.IP "\fB\-\-architecture=\fR\fIarchitecture\fR" 4
-.IX Item "--architecture=architecture"
-.PD
-In the current release of \fBld\fR, this option is useful only for the
-Intel 960 family of architectures. In that \fBld\fR configuration, the
-\&\fIarchitecture\fR argument identifies the particular architecture in
-the 960 family, enabling some safeguards and modifying the
-archive-library search path.
-.Sp
-Future releases of \fBld\fR may support similar functionality for
-other architecture families.
-.IP "\fB\-b\fR \fIinput-format\fR" 4
-.IX Item "-b input-format"
-.PD 0
-.IP "\fB\-\-format=\fR\fIinput-format\fR" 4
-.IX Item "--format=input-format"
-.PD
-\&\fBld\fR may be configured to support more than one kind of object
-file. If your \fBld\fR is configured this way, you can use the
-\&\fB\-b\fR option to specify the binary format for input object files
-that follow this option on the command line. Even when \fBld\fR is
-configured to support alternative object formats, you don't usually need
-to specify this, as \fBld\fR should be configured to expect as a
-default input format the most usual format on each machine.
-\&\fIinput-format\fR is a text string, the name of a particular format
-supported by the \s-1BFD\s0 libraries. (You can list the available binary
-formats with \fBobjdump \-i\fR.)
-.Sp
-You may want to use this option if you are linking files with an unusual
-binary format. You can also use \fB\-b\fR to switch formats explicitly (when
-linking object files of different formats), by including
-\&\fB\-b\fR \fIinput-format\fR before each group of object files in a
-particular format.
-.Sp
-The default format is taken from the environment variable
-\&\f(CW\*(C`GNUTARGET\*(C'\fR.
-.Sp
-You can also define the input format from a script, using the command
-\&\f(CW\*(C`TARGET\*(C'\fR;
-.IP "\fB\-c\fR \fIMRI-commandfile\fR" 4
-.IX Item "-c MRI-commandfile"
-.PD 0
-.IP "\fB\-\-mri\-script=\fR\fIMRI-commandfile\fR" 4
-.IX Item "--mri-script=MRI-commandfile"
-.PD
-For compatibility with linkers produced by \s-1MRI\s0, \fBld\fR accepts script
-files written in an alternate, restricted command language, described in
-the \s-1MRI\s0 Compatible Script Files section of \s-1GNU\s0 ld documentation.
-Introduce \s-1MRI\s0 script files with
-the option \fB\-c\fR; use the \fB\-T\fR option to run linker
-scripts written in the general-purpose \fBld\fR scripting language.
-If \fIMRI-cmdfile\fR does not exist, \fBld\fR looks for it in the directories
-specified by any \fB\-L\fR options.
-.IP "\fB\-d\fR" 4
-.IX Item "-d"
-.PD 0
-.IP "\fB\-dc\fR" 4
-.IX Item "-dc"
-.IP "\fB\-dp\fR" 4
-.IX Item "-dp"
-.PD
-These three options are equivalent; multiple forms are supported for
-compatibility with other linkers. They assign space to common symbols
-even if a relocatable output file is specified (with \fB\-r\fR). The
-script command \f(CW\*(C`FORCE_COMMON_ALLOCATION\*(C'\fR has the same effect.
-.IP "\fB\-e\fR \fIentry\fR" 4
-.IX Item "-e entry"
-.PD 0
-.IP "\fB\-\-entry=\fR\fIentry\fR" 4
-.IX Item "--entry=entry"
-.PD
-Use \fIentry\fR as the explicit symbol for beginning execution of your
-program, rather than the default entry point. If there is no symbol
-named \fIentry\fR, the linker will try to parse \fIentry\fR as a number,
-and use that as the entry address (the number will be interpreted in
-base 10; you may use a leading \fB0x\fR for base 16, or a leading
-\&\fB0\fR for base 8).
-.IP "\fB\-\-exclude\-libs\fR \fIlib\fR\fB,\fR\fIlib\fR\fB,...\fR" 4
-.IX Item "--exclude-libs lib,lib,..."
-Specifies a list of archive libraries from which symbols should not be automatically
-exported. The library names may be delimited by commas or colons. Specifying
-\&\f(CW\*(C`\-\-exclude\-libs ALL\*(C'\fR excludes symbols in all archive libraries from
-automatic export. This option is available only for the i386 \s-1PE\s0 targeted
-port of the linker and for \s-1ELF\s0 targeted ports. For i386 \s-1PE\s0, symbols
-explicitly listed in a .def file are still exported, regardless of this
-option. For \s-1ELF\s0 targeted ports, symbols affected by this option will
-be treated as hidden.
-.IP "\fB\-E\fR" 4
-.IX Item "-E"
-.PD 0
-.IP "\fB\-\-export\-dynamic\fR" 4
-.IX Item "--export-dynamic"
-.PD
-When creating a dynamically linked executable, add all symbols to the
-dynamic symbol table. The dynamic symbol table is the set of symbols
-which are visible from dynamic objects at run time.
-.Sp
-If you do not use this option, the dynamic symbol table will normally
-contain only those symbols which are referenced by some dynamic object
-mentioned in the link.
-.Sp
-If you use \f(CW\*(C`dlopen\*(C'\fR to load a dynamic object which needs to refer
-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.
-.Sp
-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 \fB\-\-version\-script\fR in \fB\s-1VERSION\s0\fR.
-.IP "\fB\-EB\fR" 4
-.IX Item "-EB"
-Link big-endian objects. This affects the default output format.
-.IP "\fB\-EL\fR" 4
-.IX Item "-EL"
-Link little-endian objects. This affects the default output format.
-.IP "\fB\-f\fR" 4
-.IX Item "-f"
-.PD 0
-.IP "\fB\-\-auxiliary\fR \fIname\fR" 4
-.IX Item "--auxiliary name"
-.PD
-When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_AUXILIARY\s0 field
-to the specified name. This tells the dynamic linker that the symbol
-table of the shared object should be used as an auxiliary filter on the
-symbol table of the shared object \fIname\fR.
-.Sp
-If you later link a program against this filter object, then, when you
-run the program, the dynamic linker will see the \s-1DT_AUXILIARY\s0 field. If
-the dynamic linker resolves any symbols from the filter object, it will
-first check whether there is a definition in the shared object
-\&\fIname\fR. If there is one, it will be used instead of the definition
-in the filter object. The shared object \fIname\fR need not exist.
-Thus the shared object \fIname\fR may be used to provide an alternative
-implementation of certain functions, perhaps for debugging or for
-machine specific performance.
-.Sp
-This option may be specified more than once. The \s-1DT_AUXILIARY\s0 entries
-will be created in the order in which they appear on the command line.
-.IP "\fB\-F\fR \fIname\fR" 4
-.IX Item "-F name"
-.PD 0
-.IP "\fB\-\-filter\fR \fIname\fR" 4
-.IX Item "--filter name"
-.PD
-When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_FILTER\s0 field to
-the specified name. This tells the dynamic linker that the symbol table
-of the shared object which is being created should be used as a filter
-on the symbol table of the shared object \fIname\fR.
-.Sp
-If you later link a program against this filter object, then, when you
-run the program, the dynamic linker will see the \s-1DT_FILTER\s0 field. The
-dynamic linker will resolve symbols according to the symbol table of the
-filter object as usual, but it will actually link to the definitions
-found in the shared object \fIname\fR. Thus the filter object can be
-used to select a subset of the symbols provided by the object
-\&\fIname\fR.
-.Sp
-Some older linkers used the \fB\-F\fR option throughout a compilation
-toolchain for specifying object-file format for both input and output
-object files.
-The \s-1GNU\s0 linker uses other mechanisms for this purpose: the
-\&\fB\-b\fR, \fB\-\-format\fR, \fB\-\-oformat\fR options, the
-\&\f(CW\*(C`TARGET\*(C'\fR command in linker scripts, and the \f(CW\*(C`GNUTARGET\*(C'\fR
-environment variable.
-The \s-1GNU\s0 linker will ignore the \fB\-F\fR option when not
-creating an \s-1ELF\s0 shared object.
-.IP "\fB\-fini\fR \fIname\fR" 4
-.IX Item "-fini name"
-When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
-executable or shared object is unloaded, by setting \s-1DT_FINI\s0 to the
-address of the function. By default, the linker uses \f(CW\*(C`_fini\*(C'\fR as
-the function to call.
-.IP "\fB\-g\fR" 4
-.IX Item "-g"
-Ignored. Provided for compatibility with other tools.
-.IP "\fB\-G\fR\fIvalue\fR" 4
-.IX Item "-Gvalue"
-.PD 0
-.IP "\fB\-\-gpsize=\fR\fIvalue\fR" 4
-.IX Item "--gpsize=value"
-.PD
-Set the maximum size of objects to be optimized using the \s-1GP\s0 register to
-\&\fIsize\fR. This is only meaningful for object file formats such as
-\&\s-1MIPS\s0 \s-1ECOFF\s0 which supports putting large and small objects into different
-sections. This is ignored for other object file formats.
-.IP "\fB\-h\fR\fIname\fR" 4
-.IX Item "-hname"
-.PD 0
-.IP "\fB\-soname=\fR\fIname\fR" 4
-.IX Item "-soname=name"
-.PD
-When creating an \s-1ELF\s0 shared object, set the internal \s-1DT_SONAME\s0 field to
-the specified name. When an executable is linked with a shared object
-which has a \s-1DT_SONAME\s0 field, then when the executable is run the dynamic
-linker will attempt to load the shared object specified by the \s-1DT_SONAME\s0
-field rather than the using the file name given to the linker.
-.IP "\fB\-i\fR" 4
-.IX Item "-i"
-Perform an incremental link (same as option \fB\-r\fR).
-.IP "\fB\-init\fR \fIname\fR" 4
-.IX Item "-init name"
-When creating an \s-1ELF\s0 executable or shared object, call \s-1NAME\s0 when the
-executable or shared object is loaded, by setting \s-1DT_INIT\s0 to the address
-of the function. By default, the linker uses \f(CW\*(C`_init\*(C'\fR as the
-function to call.
-.IP "\fB\-l\fR\fIarchive\fR" 4
-.IX Item "-larchive"
-.PD 0
-.IP "\fB\-\-library=\fR\fIarchive\fR" 4
-.IX Item "--library=archive"
-.PD
-Add archive file \fIarchive\fR to the list of files to link. This
-option may be used any number of times. \fBld\fR will search its
-path-list for occurrences of \f(CW\*(C`lib\f(CIarchive\f(CW.a\*(C'\fR for every
-\&\fIarchive\fR specified.
-.Sp
-On systems which support shared libraries, \fBld\fR may also search for
-libraries with extensions other than \f(CW\*(C`.a\*(C'\fR. Specifically, on \s-1ELF\s0
-and SunOS systems, \fBld\fR will search a directory for a library with
-an extension of \f(CW\*(C`.so\*(C'\fR before searching for one with an extension of
-\&\f(CW\*(C`.a\*(C'\fR. By convention, a \f(CW\*(C`.so\*(C'\fR extension indicates a shared
-library.
-.Sp
-The linker will search an archive only once, at the location where it is
-specified on the command line. If the archive defines a symbol which
-was undefined in some object which appeared before the archive on the
-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.
-.Sp
-See the \fB\-(\fR option for a way to force the linker to search
-archives multiple times.
-.Sp
-You may list the same archive multiple times on the command line.
-.Sp
-This type of archive searching is standard for Unix linkers. However,
-if you are using \fBld\fR on \s-1AIX\s0, note that it is different from the
-behaviour of the \s-1AIX\s0 linker.
-.IP "\fB\-L\fR\fIsearchdir\fR" 4
-.IX Item "-Lsearchdir"
-.PD 0
-.IP "\fB\-\-library\-path=\fR\fIsearchdir\fR" 4
-.IX Item "--library-path=searchdir"
-.PD
-Add path \fIsearchdir\fR to the list of paths that \fBld\fR will search
-for archive libraries and \fBld\fR 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
-\&\fB\-L\fR options apply to all \fB\-l\fR options, regardless of the
-order in which the options appear.
-.Sp
-If \fIsearchdir\fR begins with \f(CW\*(C`=\*(C'\fR, then the \f(CW\*(C`=\*(C'\fR will be replaced
-by the \fIsysroot prefix\fR, a path specified when the linker is configured.
-.Sp
-The default set of paths searched (without being specified with
-\&\fB\-L\fR) depends on which emulation mode \fBld\fR is using, and in
-some cases also on how it was configured.
-.Sp
-The paths can also be specified in a link script with the
-\&\f(CW\*(C`SEARCH_DIR\*(C'\fR command. Directories specified this way are searched
-at the point in which the linker script appears in the command line.
-.IP "\fB\-m\fR\fIemulation\fR" 4
-.IX Item "-memulation"
-Emulate the \fIemulation\fR linker. You can list the available
-emulations with the \fB\-\-verbose\fR or \fB\-V\fR options.
-.Sp
-If the \fB\-m\fR option is not used, the emulation is taken from the
-\&\f(CW\*(C`LDEMULATION\*(C'\fR environment variable, if that is defined.
-.Sp
-Otherwise, the default emulation depends upon how the linker was
-configured.
-.IP "\fB\-M\fR" 4
-.IX Item "-M"
-.PD 0
-.IP "\fB\-\-print\-map\fR" 4
-.IX Item "--print-map"
-.PD
-Print a link map to the standard output. A link map provides
-information about the link, including the following:
-.RS 4
-.IP "*" 4
-Where object files are mapped into memory.
-.IP "*" 4
-How common symbols are allocated.
-.IP "*" 4
-All archive members included in the link, with a mention of the symbol
-which caused the archive member to be brought in.
-.IP "*" 4
-The values assigned to symbols.
-.Sp
-Note \- symbols whose values are computed by an expression which
-involves a reference to a previous value of the same symbol may not
-have correct result displayed in the link map. This is because the
-linker discards intermediate results and only retains the final value
-of an expression. Under such circumstances the linker will display
-the final value enclosed by square brackets. Thus for example a
-linker script containing:
-.Sp
-.Vb 3
-\& foo = 1
-\& foo = foo * 4
-\& foo = foo + 8
-.Ve
-.Sp
-will produce the following output in the link map if the \fB\-M\fR
-option is used:
-.Sp
-.Vb 3
-\& 0x00000001 foo = 0x1
-\& [0x0000000c] foo = (foo * 0x4)
-\& [0x0000000c] foo = (foo + 0x8)
-.Ve
-.Sp
-See \fBExpressions\fR for more information about expressions in linker
-scripts.
-.RE
-.RS 4
-.RE
-.IP "\fB\-n\fR" 4
-.IX Item "-n"
-.PD 0
-.IP "\fB\-\-nmagic\fR" 4
-.IX Item "--nmagic"
-.PD
-Turn off page alignment of sections, and mark the output as
-\&\f(CW\*(C`NMAGIC\*(C'\fR if possible.
-.IP "\fB\-N\fR" 4
-.IX Item "-N"
-.PD 0
-.IP "\fB\-\-omagic\fR" 4
-.IX Item "--omagic"
-.PD
-Set the text and data sections to be readable and writable. Also, do
-not page-align the data segment, and disable linking against shared
-libraries. If the output format supports Unix style magic numbers,
-mark the output as \f(CW\*(C`OMAGIC\*(C'\fR. Note: Although a writable text section
-is allowed for PE-COFF targets, it does not conform to the format
-specification published by Microsoft.
-.IP "\fB\-\-no\-omagic\fR" 4
-.IX Item "--no-omagic"
-This option negates most of the effects of the \fB\-N\fR option. It
-sets the text section to be read\-only, and forces the data segment to
-be page\-aligned. Note \- this option does not enable linking against
-shared libraries. Use \fB\-Bdynamic\fR for this.
-.IP "\fB\-o\fR \fIoutput\fR" 4
-.IX Item "-o output"
-.PD 0
-.IP "\fB\-\-output=\fR\fIoutput\fR" 4
-.IX Item "--output=output"
-.PD
-Use \fIoutput\fR as the name for the program produced by \fBld\fR; if this
-option is not specified, the name \fIa.out\fR is used by default. The
-script command \f(CW\*(C`OUTPUT\*(C'\fR can also specify the output file name.
-.IP "\fB\-O\fR \fIlevel\fR" 4
-.IX Item "-O level"
-If \fIlevel\fR is a numeric values greater than zero \fBld\fR optimizes
-the output. This might take significantly longer and therefore probably
-should only be enabled for the final binary.
-.IP "\fB\-q\fR" 4
-.IX Item "-q"
-.PD 0
-.IP "\fB\-\-emit\-relocs\fR" 4
-.IX Item "--emit-relocs"
-.PD
-Leave relocation sections and contents in fully linked exececutables.
-Post link analysis and optimization tools may need this information in
-order to perform correct modifications of executables. This results
-in larger executables.
-.Sp
-This option is currently only supported on \s-1ELF\s0 platforms.
-.IP "\fB\-\-force\-dynamic\fR" 4
-.IX Item "--force-dynamic"
-Force the output file to have dynamic sections. This option is specific
-to VxWorks targets.
-.IP "\fB\-r\fR" 4
-.IX Item "-r"
-.PD 0
-.IP "\fB\-\-relocatable\fR" 4
-.IX Item "--relocatable"
-.PD
-Generate relocatable output\-\-\-i.e., generate an output file that can in
-turn serve as input to \fBld\fR. This is often called \fIpartial
-linking\fR. As a side effect, in environments that support standard Unix
-magic numbers, this option also sets the output file's magic number to
-\&\f(CW\*(C`OMAGIC\*(C'\fR.
-If this option is not specified, an absolute file is produced. When
-linking \*(C+ programs, this option \fIwill not\fR resolve references to
-constructors; to do that, use \fB\-Ur\fR.
-.Sp
-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 \f(CW\*(C`a.out\*(C'\fR\-based formats do not support partial linking
-with input files in other formats at all.
-.Sp
-This option does the same thing as \fB\-i\fR.
-.IP "\fB\-R\fR \fIfilename\fR" 4
-.IX Item "-R filename"
-.PD 0
-.IP "\fB\-\-just\-symbols=\fR\fIfilename\fR" 4
-.IX Item "--just-symbols=filename"
-.PD
-Read symbol names and their addresses from \fIfilename\fR, but do not
-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.
-.Sp
-For compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option is
-followed by a directory name, rather than a file name, it is treated as
-the \fB\-rpath\fR option.
-.IP "\fB\-s\fR" 4
-.IX Item "-s"
-.PD 0
-.IP "\fB\-\-strip\-all\fR" 4
-.IX Item "--strip-all"
-.PD
-Omit all symbol information from the output file.
-.IP "\fB\-S\fR" 4
-.IX Item "-S"
-.PD 0
-.IP "\fB\-\-strip\-debug\fR" 4
-.IX Item "--strip-debug"
-.PD
-Omit debugger symbol information (but not all symbols) from the output file.
-.IP "\fB\-t\fR" 4
-.IX Item "-t"
-.PD 0
-.IP "\fB\-\-trace\fR" 4
-.IX Item "--trace"
-.PD
-Print the names of the input files as \fBld\fR processes them.
-.IP "\fB\-T\fR \fIscriptfile\fR" 4
-.IX Item "-T scriptfile"
-.PD 0
-.IP "\fB\-\-script=\fR\fIscriptfile\fR" 4
-.IX Item "--script=scriptfile"
-.PD
-Use \fIscriptfile\fR as the linker script. This script replaces
-\&\fBld\fR's default linker script (rather than adding to it), so
-\&\fIcommandfile\fR must specify everything necessary to describe the
-output file. If \fIscriptfile\fR does not exist in
-the current directory, \f(CW\*(C`ld\*(C'\fR looks for it in the directories
-specified by any preceding \fB\-L\fR options. Multiple \fB\-T\fR
-options accumulate.
-.IP "\fB\-u\fR \fIsymbol\fR" 4
-.IX Item "-u symbol"
-.PD 0
-.IP "\fB\-\-undefined=\fR\fIsymbol\fR" 4
-.IX Item "--undefined=symbol"
-.PD
-Force \fIsymbol\fR to be entered in the output file as an undefined
-symbol. Doing this may, for example, trigger linking of additional
-modules from standard libraries. \fB\-u\fR may be repeated with
-different option arguments to enter additional undefined symbols. This
-option is equivalent to the \f(CW\*(C`EXTERN\*(C'\fR linker script command.
-.IP "\fB\-Ur\fR" 4
-.IX Item "-Ur"
-For anything other than \*(C+ programs, this option is equivalent to
-\&\fB\-r\fR: it generates relocatable output\-\-\-i.e., an output file that can in
-turn serve as input to \fBld\fR. When linking \*(C+ programs, \fB\-Ur\fR
-\&\fIdoes\fR resolve references to constructors, unlike \fB\-r\fR.
-It does not work to use \fB\-Ur\fR on files that were themselves linked
-with \fB\-Ur\fR; once the constructor table has been built, it cannot
-be added to. Use \fB\-Ur\fR only for the last partial link, and
-\&\fB\-r\fR for the others.
-.IP "\fB\-\-unique[=\fR\fI\s-1SECTION\s0\fR\fB]\fR" 4
-.IX Item "--unique[=SECTION]"
-Creates a separate output section for every input section matching
-\&\fI\s-1SECTION\s0\fR, or if the optional wildcard \fI\s-1SECTION\s0\fR argument is
-missing, for every orphan input section. An orphan section is one not
-specifically mentioned in a linker script. You may use this option
-multiple times on the command line; It prevents the normal merging of
-input sections with the same name, overriding output section assignments
-in a linker script.
-.IP "\fB\-v\fR" 4
-.IX Item "-v"
-.PD 0
-.IP "\fB\-\-version\fR" 4
-.IX Item "--version"
-.IP "\fB\-V\fR" 4
-.IX Item "-V"
-.PD
-Display the version number for \fBld\fR. The \fB\-V\fR option also
-lists the supported emulations.
-.IP "\fB\-x\fR" 4
-.IX Item "-x"
-.PD 0
-.IP "\fB\-\-discard\-all\fR" 4
-.IX Item "--discard-all"
-.PD
-Delete all local symbols.
-.IP "\fB\-X\fR" 4
-.IX Item "-X"
-.PD 0
-.IP "\fB\-\-discard\-locals\fR" 4
-.IX Item "--discard-locals"
-.PD
-Delete all temporary local symbols. For most targets, this is all local
-symbols whose names begin with \fBL\fR.
-.IP "\fB\-y\fR \fIsymbol\fR" 4
-.IX Item "-y symbol"
-.PD 0
-.IP "\fB\-\-trace\-symbol=\fR\fIsymbol\fR" 4
-.IX Item "--trace-symbol=symbol"
-.PD
-Print the name of each linked file in which \fIsymbol\fR appears. This
-option may be given any number of times. On many systems it is necessary
-to prepend an underscore.
-.Sp
-This option is useful when you have an undefined symbol in your link but
-don't know where the reference is coming from.
-.IP "\fB\-Y\fR \fIpath\fR" 4
-.IX Item "-Y path"
-Add \fIpath\fR to the default library search path. This option exists
-for Solaris compatibility.
-.IP "\fB\-z\fR \fIkeyword\fR" 4
-.IX Item "-z keyword"
-The recognized keywords are:
-.RS 4
-.IP "\fBcombreloc\fR" 4
-.IX Item "combreloc"
-Combines multiple reloc sections and sorts them to make dynamic symbol
-lookup caching possible.
-.IP "\fBdefs\fR" 4
-.IX Item "defs"
-Disallows undefined symbols in object files. Undefined symbols in
-shared libraries are still allowed.
-.IP "\fBexecstack\fR" 4
-.IX Item "execstack"
-Marks the object as requiring executable stack.
-.IP "\fBinitfirst\fR" 4
-.IX Item "initfirst"
-This option is only meaningful when building a shared object.
-It marks the object so that its runtime initialization will occur
-before the runtime initialization of any other objects brought into
-the process at the same time. Similarly the runtime finalization of
-the object will occur after the runtime finalization of any other
-objects.
-.IP "\fBinterpose\fR" 4
-.IX Item "interpose"
-Marks the object that its symbol table interposes before all symbols
-but the primary executable.
-.IP "\fBloadfltr\fR" 4
-.IX Item "loadfltr"
-Marks the object that its filters be processed immediately at
-runtime.
-.IP "\fBmuldefs\fR" 4
-.IX Item "muldefs"
-Allows multiple definitions.
-.IP "\fBnocombreloc\fR" 4
-.IX Item "nocombreloc"
-Disables multiple reloc sections combining.
-.IP "\fBnocopyreloc\fR" 4
-.IX Item "nocopyreloc"
-Disables production of copy relocs.
-.IP "\fBnodefaultlib\fR" 4
-.IX Item "nodefaultlib"
-Marks the object that the search for dependencies of this object will
-ignore any default library search paths.
-.IP "\fBnodelete\fR" 4
-.IX Item "nodelete"
-Marks the object shouldn't be unloaded at runtime.
-.IP "\fBnodlopen\fR" 4
-.IX Item "nodlopen"
-Marks the object not available to \f(CW\*(C`dlopen\*(C'\fR.
-.IP "\fBnodump\fR" 4
-.IX Item "nodump"
-Marks the object can not be dumped by \f(CW\*(C`dldump\*(C'\fR.
-.IP "\fBnoexecstack\fR" 4
-.IX Item "noexecstack"
-Marks the object as not requiring executable stack.
-.IP "\fBnorelro\fR" 4
-.IX Item "norelro"
-Don't create an \s-1ELF\s0 \f(CW\*(C`PT_GNU_RELRO\*(C'\fR segment header in the object.
-.IP "\fBnow\fR" 4
-.IX Item "now"
-When generating an executable or shared library, mark it to tell the
-dynamic linker to resolve all symbols when the program is started, or
-when the shared library is linked to using dlopen, instead of
-deferring function call resolution to the point when the function is
-first called.
-.IP "\fBorigin\fR" 4
-.IX Item "origin"
-Marks the object may contain \f(CW$ORIGIN\fR.
-.IP "\fBrelro\fR" 4
-.IX Item "relro"
-Create an \s-1ELF\s0 \f(CW\*(C`PT_GNU_RELRO\*(C'\fR segment header in the object.
-.RE
-.RS 4
-.Sp
-Other keywords are ignored for Solaris compatibility.
-.RE
-.IP "\fB\-(\fR \fIarchives\fR \fB\-)\fR" 4
-.IX Item "-( archives -)"
-.PD 0
-.IP "\fB\-\-start\-group\fR \fIarchives\fR \fB\-\-end\-group\fR" 4
-.IX Item "--start-group archives --end-group"
-.PD
-The \fIarchives\fR should be a list of archive files. They may be
-either explicit file names, or \fB\-l\fR options.
-.Sp
-The specified archives are searched repeatedly until no new undefined
-references are created. Normally, an archive is searched only once in
-the order that it is specified on the command line. If a symbol in that
-archive is needed to resolve an undefined symbol referred to by an
-object in an archive that appears later on the command line, the linker
-would not be able to resolve that reference. By grouping the archives,
-they all be searched repeatedly until all possible references are
-resolved.
-.Sp
-Using this option has a significant performance cost. It is best to use
-it only when there are unavoidable circular references between two or
-more archives.
-.IP "\fB\-\-accept\-unknown\-input\-arch\fR" 4
-.IX Item "--accept-unknown-input-arch"
-.PD 0
-.IP "\fB\-\-no\-accept\-unknown\-input\-arch\fR" 4
-.IX Item "--no-accept-unknown-input-arch"
-.PD
-Tells the linker to accept input files whose architecture cannot be
-recognised. The assumption is that the user knows what they are doing
-and deliberately wants to link in these unknown input files. This was
-the default behaviour of the linker, before release 2.14. The default
-behaviour from release 2.14 onwards is to reject such input files, and
-so the \fB\-\-accept\-unknown\-input\-arch\fR option has been added to
-restore the old behaviour.
-.IP "\fB\-\-as\-needed\fR" 4
-.IX Item "--as-needed"
-.PD 0
-.IP "\fB\-\-no\-as\-needed\fR" 4
-.IX Item "--no-as-needed"
-.PD
-This option affects \s-1ELF\s0 \s-1DT_NEEDED\s0 tags for dynamic libraries mentioned
-on the command line after the \fB\-\-as\-needed\fR option. Normally,
-the linker will add a \s-1DT_NEEDED\s0 tag for each dynamic library mentioned
-on the command line, regardless of whether the library is actually
-needed. \fB\-\-as\-needed\fR causes \s-1DT_NEEDED\s0 tags to only be emitted
-for libraries that satisfy some symbol reference from regular objects
-which is undefined at the point that the library was linked.
-\&\fB\-\-no\-as\-needed\fR restores the default behaviour.
-.IP "\fB\-\-add\-needed\fR" 4
-.IX Item "--add-needed"
-.PD 0
-.IP "\fB\-\-no\-add\-needed\fR" 4
-.IX Item "--no-add-needed"
-.PD
-This option affects the treatment of dynamic libraries from \s-1ELF\s0
-\&\s-1DT_NEEDED\s0 tags in dynamic libraries mentioned on the command line after
-the \fB\-\-no\-add\-needed\fR option. Normally, the linker will add
-a \s-1DT_NEEDED\s0 tag for each dynamic library from \s-1DT_NEEDED\s0 tags.
-\&\fB\-\-no\-add\-needed\fR causes \s-1DT_NEEDED\s0 tags will never be emitted
-for those libraries from \s-1DT_NEEDED\s0 tags. \fB\-\-add\-needed\fR restores
-the default behaviour.
-.IP "\fB\-assert\fR \fIkeyword\fR" 4
-.IX Item "-assert keyword"
-This option is ignored for SunOS compatibility.
-.IP "\fB\-Bdynamic\fR" 4
-.IX Item "-Bdynamic"
-.PD 0
-.IP "\fB\-dy\fR" 4
-.IX Item "-dy"
-.IP "\fB\-call_shared\fR" 4
-.IX Item "-call_shared"
-.PD
-Link against dynamic libraries. This is only meaningful on platforms
-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
-\&\fB\-l\fR options which follow it.
-.IP "\fB\-Bgroup\fR" 4
-.IX Item "-Bgroup"
-Set the \f(CW\*(C`DF_1_GROUP\*(C'\fR flag in the \f(CW\*(C`DT_FLAGS_1\*(C'\fR 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.
-\&\fB\-\-unresolved\-symbols=report\-all\fR is implied. This option is
-only meaningful on \s-1ELF\s0 platforms which support shared libraries.
-.IP "\fB\-Bstatic\fR" 4
-.IX Item "-Bstatic"
-.PD 0
-.IP "\fB\-dn\fR" 4
-.IX Item "-dn"
-.IP "\fB\-non_shared\fR" 4
-.IX Item "-non_shared"
-.IP "\fB\-static\fR" 4
-.IX Item "-static"
-.PD
-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 \fB\-l\fR options which follow it. This
-option also implies \fB\-\-unresolved\-symbols=report\-all\fR. This
-option can be used with \fB\-shared\fR. Doing so means that a
-shared library is being created but that all of the library's external
-references must be resolved by pulling in entries from static
-libraries.
-.IP "\fB\-Bsymbolic\fR" 4
-.IX Item "-Bsymbolic"
-When creating a shared library, bind references to global symbols to the
-definition within the shared library, if any. Normally, it is possible
-for a program linked against a shared library to override the definition
-within the shared library. This option is only meaningful on \s-1ELF\s0
-platforms which support shared libraries.
-.IP "\fB\-\-check\-sections\fR" 4
-.IX Item "--check-sections"
-.PD 0
-.IP "\fB\-\-no\-check\-sections\fR" 4
-.IX Item "--no-check-sections"
-.PD
-Asks the linker \fInot\fR to check section addresses after they have
-been assigned to see if there are any overlaps. Normally the linker will
-perform this check, and if it finds any overlaps it will produce
-suitable error messages. The linker does know about, and does make
-allowances for sections in overlays. The default behaviour can be
-restored by using the command line switch \fB\-\-check\-sections\fR.
-.IP "\fB\-\-cref\fR" 4
-.IX Item "--cref"
-Output a cross reference table. If a linker map file is being
-generated, the cross reference table is printed to the map file.
-Otherwise, it is printed on the standard output.
-.Sp
-The format of the table is intentionally simple, so that it may be
-easily processed by a script if necessary. The symbols are printed out,
-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.
-.IP "\fB\-\-no\-define\-common\fR" 4
-.IX Item "--no-define-common"
-This option inhibits the assignment of addresses to common symbols.
-The script command \f(CW\*(C`INHIBIT_COMMON_ALLOCATION\*(C'\fR has the same effect.
-.Sp
-The \fB\-\-no\-define\-common\fR 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 \fB\-\-no\-define\-common\fR 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.
-.IP "\fB\-\-defsym\fR \fIsymbol\fR\fB=\fR\fIexpression\fR" 4
-.IX Item "--defsym symbol=expression"
-Create a global symbol in the output file, containing the absolute
-address given by \fIexpression\fR. You may use this option as many
-times as necessary to define multiple symbols in the command line. A
-limited form of arithmetic is supported for the \fIexpression\fR in this
-context: you may give a hexadecimal constant or the name of an existing
-symbol, or use \f(CW\*(C`+\*(C'\fR and \f(CW\*(C`\-\*(C'\fR to add or subtract hexadecimal
-constants or symbols. If you need more elaborate expressions, consider
-using the linker command language from a script. \fINote:\fR there should be no white
-space between \fIsymbol\fR, the equals sign ("\fB=\fR"), and
-\&\fIexpression\fR.
-.IP "\fB\-\-demangle[=\fR\fIstyle\fR\fB]\fR" 4
-.IX Item "--demangle[=style]"
-.PD 0
-.IP "\fB\-\-no\-demangle\fR" 4
-.IX Item "--no-demangle"
-.PD
-These options control whether to demangle symbol names in error messages
-and other output. When the linker is told to demangle, it tries to
-present symbol names in a readable fashion: it strips leading
-underscores if they are used by the object file format, and converts \*(C+
-mangled symbol names into user readable names. Different compilers have
-different mangling styles. The optional demangling style argument can be used
-to choose an appropriate demangling style for your compiler. The linker will
-demangle by default unless the environment variable \fB\s-1COLLECT_NO_DEMANGLE\s0\fR
-is set. These options may be used to override the default.
-.IP "\fB\-\-dynamic\-linker\fR \fIfile\fR" 4
-.IX Item "--dynamic-linker file"
-Set the name of the dynamic linker. This is only meaningful when
-generating dynamically linked \s-1ELF\s0 executables. The default dynamic
-linker is normally correct; don't use this unless you know what you are
-doing.
-.IP "\fB\-\-fatal\-warnings\fR" 4
-.IX Item "--fatal-warnings"
-Treat all warnings as errors.
-.IP "\fB\-\-force\-exe\-suffix\fR" 4
-.IX Item "--force-exe-suffix"
-Make sure that an output file has a .exe suffix.
-.Sp
-If a successfully built fully linked output file does not have a
-\&\f(CW\*(C`.exe\*(C'\fR or \f(CW\*(C`.dll\*(C'\fR suffix, this option forces the linker to copy
-the output file to one of the same name with a \f(CW\*(C`.exe\*(C'\fR suffix. This
-option is useful when using unmodified Unix makefiles on a Microsoft
-Windows host, since some versions of Windows won't run an image unless
-it ends in a \f(CW\*(C`.exe\*(C'\fR suffix.
-.IP "\fB\-\-no\-gc\-sections\fR" 4
-.IX Item "--no-gc-sections"
-.PD 0
-.IP "\fB\-\-gc\-sections\fR" 4
-.IX Item "--gc-sections"
-.PD
-Enable garbage collection of unused input sections. It is ignored on
-targets that do not support this option. This option is not compatible
-with \fB\-r\fR. The default behaviour (of not performing this garbage
-collection) can be restored by specifying \fB\-\-no\-gc\-sections\fR on
-the command line.
-.IP "\fB\-\-help\fR" 4
-.IX Item "--help"
-Print a summary of the command-line options on the standard output and exit.
-.IP "\fB\-\-target\-help\fR" 4
-.IX Item "--target-help"
-Print a summary of all target specific options on the standard output and exit.
-.IP "\fB\-Map\fR \fImapfile\fR" 4
-.IX Item "-Map mapfile"
-Print a link map to the file \fImapfile\fR. See the description of the
-\&\fB\-M\fR option, above.
-.IP "\fB\-\-no\-keep\-memory\fR" 4
-.IX Item "--no-keep-memory"
-\&\fBld\fR normally optimizes for speed over memory usage by caching the
-symbol tables of input files in memory. This option tells \fBld\fR to
-instead optimize for memory usage, by rereading the symbol tables as
-necessary. This may be required if \fBld\fR runs out of memory space
-while linking a large executable.
-.IP "\fB\-\-no\-undefined\fR" 4
-.IX Item "--no-undefined"
-.PD 0
-.IP "\fB\-z defs\fR" 4
-.IX Item "-z defs"
-.PD
-Report unresolved symbol references from regular object files. This
-is done even if the linker is creating a non-symbolic shared library.
-The switch \fB\-\-[no\-]allow\-shlib\-undefined\fR controls the
-behaviour for reporting unresolved references found in shared
-libraries being linked in.
-.IP "\fB\-\-allow\-multiple\-definition\fR" 4
-.IX Item "--allow-multiple-definition"
-.PD 0
-.IP "\fB\-z muldefs\fR" 4
-.IX Item "-z muldefs"
-.PD
-Normally when a symbol is defined multiple times, the linker will
-report a fatal error. These options allow multiple definitions and the
-first definition will be used.
-.IP "\fB\-\-allow\-shlib\-undefined\fR" 4
-.IX Item "--allow-shlib-undefined"
-.PD 0
-.IP "\fB\-\-no\-allow\-shlib\-undefined\fR" 4
-.IX Item "--no-allow-shlib-undefined"
-.PD
-Allows (the default) or disallows undefined symbols in shared libraries.
-This switch is similar to \fB\-\-no\-undefined\fR except that it
-determines the behaviour when the undefined symbols are in a
-shared library rather than a regular object file. It does not affect
-how undefined symbols in regular object files are handled.
-.Sp
-The reason that \fB\-\-allow\-shlib\-undefined\fR is the default is that
-the shared library being specified at link time may not be the same as
-the one that is available at load time, so the symbols might actually be
-resolvable at load time. Plus there are some systems, (eg BeOS) where
-undefined symbols in shared libraries is normal. (The kernel patches
-them at load time to select which function is most appropriate
-for the current architecture. This is used for example to dynamically
-select an appropriate memset function). Apparently it is also normal
-for \s-1HPPA\s0 shared libraries to have undefined symbols.
-.IP "\fB\-\-no\-undefined\-version\fR" 4
-.IX Item "--no-undefined-version"
-Normally when a symbol has an undefined version, the linker will ignore
-it. This option disallows symbols with undefined version and a fatal error
-will be issued instead.
-.IP "\fB\-\-default\-symver\fR" 4
-.IX Item "--default-symver"
-Create and use a default symbol version (the soname) for unversioned
-exported symbols.
-.IP "\fB\-\-default\-imported\-symver\fR" 4
-.IX Item "--default-imported-symver"
-Create and use a default symbol version (the soname) for unversioned
-imported symbols.
-.IP "\fB\-\-no\-warn\-mismatch\fR" 4
-.IX Item "--no-warn-mismatch"
-Normally \fBld\fR 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 \fBld\fR 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.
-.IP "\fB\-\-no\-whole\-archive\fR" 4
-.IX Item "--no-whole-archive"
-Turn off the effect of the \fB\-\-whole\-archive\fR option for subsequent
-archive files.
-.IP "\fB\-\-noinhibit\-exec\fR" 4
-.IX Item "--noinhibit-exec"
-Retain the executable output file whenever it is still usable.
-Normally, the linker will not produce an output file if it encounters
-errors during the link process; it exits without writing an output file
-when it issues any error whatsoever.
-.IP "\fB\-nostdlib\fR" 4
-.IX Item "-nostdlib"
-Only search library directories explicitly specified on the
-command line. Library directories specified in linker scripts
-(including linker scripts specified on the command line) are ignored.
-.IP "\fB\-\-oformat\fR \fIoutput-format\fR" 4
-.IX Item "--oformat output-format"
-\&\fBld\fR may be configured to support more than one kind of object
-file. If your \fBld\fR is configured this way, you can use the
-\&\fB\-\-oformat\fR option to specify the binary format for the output
-object file. Even when \fBld\fR is configured to support alternative
-object formats, you don't usually need to specify this, as \fBld\fR
-should be configured to produce as a default output format the most
-usual format on each machine. \fIoutput-format\fR is a text string, the
-name of a particular format supported by the \s-1BFD\s0 libraries. (You can
-list the available binary formats with \fBobjdump \-i\fR.) The script
-command \f(CW\*(C`OUTPUT_FORMAT\*(C'\fR can also specify the output format, but
-this option overrides it.
-.IP "\fB\-pie\fR" 4
-.IX Item "-pie"
-.PD 0
-.IP "\fB\-\-pic\-executable\fR" 4
-.IX Item "--pic-executable"
-.PD
-Create a position independent executable. This is currently only supported on
-\&\s-1ELF\s0 platforms. Position independent executables are similar to shared
-libraries in that they are relocated by the dynamic linker to the virtual
-address the \s-1OS\s0 chooses for them (which can vary between invocations). Like
-normal dynamically linked executables they can be executed and symbols
-defined in the executable cannot be overridden by shared libraries.
-.IP "\fB\-qmagic\fR" 4
-.IX Item "-qmagic"
-This option is ignored for Linux compatibility.
-.IP "\fB\-Qy\fR" 4
-.IX Item "-Qy"
-This option is ignored for \s-1SVR4\s0 compatibility.
-.IP "\fB\-\-relax\fR" 4
-.IX Item "--relax"
-An option with machine dependent effects.
-This option is only supported on a few targets.
-.Sp
-On some platforms, the \fB\-\-relax\fR option performs global
-optimizations that become possible when the linker resolves addressing
-in the program, such as relaxing address modes and synthesizing new
-instructions in the output object file.
-.Sp
-On some platforms these link time global optimizations may make symbolic
-debugging of the resulting executable impossible.
-This is known to be
-the case for the Matsushita \s-1MN10200\s0 and \s-1MN10300\s0 family of processors.
-.Sp
-On platforms where this is not supported, \fB\-\-relax\fR is accepted,
-but ignored.
-.IP "\fB\-\-retain\-symbols\-file\fR \fIfilename\fR" 4
-.IX Item "--retain-symbols-file filename"
-Retain \fIonly\fR the symbols listed in the file \fIfilename\fR,
-discarding all others. \fIfilename\fR is simply a flat file, with one
-symbol name per line. This option is especially useful in environments
-(such as VxWorks)
-where a large global symbol table is accumulated gradually, to conserve
-run-time memory.
-.Sp
-\&\fB\-\-retain\-symbols\-file\fR does \fInot\fR discard undefined symbols,
-or symbols needed for relocations.
-.Sp
-You may only specify \fB\-\-retain\-symbols\-file\fR once in the command
-line. It overrides \fB\-s\fR and \fB\-S\fR.
-.IP "\fB\-rpath\fR \fIdir\fR" 4
-.IX Item "-rpath dir"
-Add a directory to the runtime library search path. This is used when
-linking an \s-1ELF\s0 executable with shared objects. All \fB\-rpath\fR
-arguments are concatenated and passed to the runtime linker, which uses
-them to locate shared objects at runtime. The \fB\-rpath\fR option is
-also used when locating shared objects which are needed by shared
-objects explicitly included in the link; see the description of the
-\&\fB\-rpath\-link\fR option. If \fB\-rpath\fR is not used when linking an
-\&\s-1ELF\s0 executable, the contents of the environment variable
-\&\f(CW\*(C`LD_RUN_PATH\*(C'\fR will be used if it is defined.
-.Sp
-The \fB\-rpath\fR option may also be used on SunOS. By default, on
-SunOS, the linker will form a runtime search patch out of all the
-\&\fB\-L\fR options it is given. If a \fB\-rpath\fR option is used, the
-runtime search path will be formed exclusively using the \fB\-rpath\fR
-options, ignoring the \fB\-L\fR options. This can be useful when using
-gcc, which adds many \fB\-L\fR options which may be on \s-1NFS\s0 mounted
-filesystems.
-.Sp
-For compatibility with other \s-1ELF\s0 linkers, if the \fB\-R\fR option is
-followed by a directory name, rather than a file name, it is treated as
-the \fB\-rpath\fR option.
-.IP "\fB\-rpath\-link\fR \fI\s-1DIR\s0\fR" 4
-.IX Item "-rpath-link DIR"
-When using \s-1ELF\s0 or SunOS, one shared library may require another. This
-happens when an \f(CW\*(C`ld \-shared\*(C'\fR link includes a shared library as one
-of the input files.
-.Sp
-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 \fB\-rpath\-link\fR option
-specifies the first set of directories to search. The
-\&\fB\-rpath\-link\fR option may specify a sequence of directory names
-either by specifying a list of names separated by colons, or by
-appearing multiple times.
-.Sp
-This option should be used with caution as it overrides the search path
-that may have been hard compiled into a shared library. In such a case it
-is possible to use unintentionally a different search path than the
-runtime linker would do.
-.Sp
-The linker uses the following search paths to locate required shared
-libraries.
-.RS 4
-.IP "1." 4
-Any directories specified by \fB\-rpath\-link\fR options.
-.IP "2." 4
-Any directories specified by \fB\-rpath\fR options. The difference
-between \fB\-rpath\fR and \fB\-rpath\-link\fR is that directories
-specified by \fB\-rpath\fR options are included in the executable and
-used at runtime, whereas the \fB\-rpath\-link\fR option is only effective
-at link time. It is for the native linker only.
-.IP "3." 4
-On an \s-1ELF\s0 system, if the \fB\-rpath\fR and \f(CW\*(C`rpath\-link\*(C'\fR options
-were not used, search the contents of the environment variable
-\&\f(CW\*(C`LD_RUN_PATH\*(C'\fR. It is for the native linker only.
-.IP "4." 4
-On SunOS, if the \fB\-rpath\fR option was not used, search any
-directories specified using \fB\-L\fR options.
-.IP "5." 4
-For a native linker, the contents of the environment variable
-\&\f(CW\*(C`LD_LIBRARY_PATH\*(C'\fR.
-.IP "6." 4
-For a native \s-1ELF\s0 linker, the directories in \f(CW\*(C`DT_RUNPATH\*(C'\fR or
-\&\f(CW\*(C`DT_RPATH\*(C'\fR of a shared library are searched for shared
-libraries needed by it. The \f(CW\*(C`DT_RPATH\*(C'\fR entries are ignored if
-\&\f(CW\*(C`DT_RUNPATH\*(C'\fR entries exist.
-.IP "7." 4
-The default directories, normally \fI/lib\fR and \fI/usr/lib\fR.
-.IP "8." 4
-For a native linker on an \s-1ELF\s0 system, if the file \fI/etc/ld.so.conf\fR
-exists, the list of directories found in that file.
-.RE
-.RS 4
-.Sp
-If the required shared library is not found, the linker will issue a
-warning and continue with the link.
-.RE
-.IP "\fB\-shared\fR" 4
-.IX Item "-shared"
-.PD 0
-.IP "\fB\-Bshareable\fR" 4
-.IX Item "-Bshareable"
-.PD
-Create a shared library. This is currently only supported on \s-1ELF\s0, \s-1XCOFF\s0
-and SunOS platforms. On SunOS, the linker will automatically create a
-shared library if the \fB\-e\fR option is not used and there are
-undefined symbols in the link.
-.IP "\fB\-\-sort\-common\fR" 4
-.IX Item "--sort-common"
-This option tells \fBld\fR 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 byte, then all the four byte, and then
-everything else. This is to prevent gaps between symbols due to
-alignment constraints.
-.IP "\fB\-\-sort\-section name\fR" 4
-.IX Item "--sort-section name"
-This option will apply \f(CW\*(C`SORT_BY_NAME\*(C'\fR to all wildcard section
-patterns in the linker script.
-.IP "\fB\-\-sort\-section alignment\fR" 4
-.IX Item "--sort-section alignment"
-This option will apply \f(CW\*(C`SORT_BY_ALIGNMENT\*(C'\fR to all wildcard section
-patterns in the linker script.
-.IP "\fB\-\-split\-by\-file [\fR\fIsize\fR\fB]\fR" 4
-.IX Item "--split-by-file [size]"
-Similar to \fB\-\-split\-by\-reloc\fR but creates a new output section for
-each input file when \fIsize\fR is reached. \fIsize\fR defaults to a
-size of 1 if not given.
-.IP "\fB\-\-split\-by\-reloc [\fR\fIcount\fR\fB]\fR" 4
-.IX Item "--split-by-reloc [count]"
-Tries to creates extra sections in the output file so that no single
-output section in the file contains more than \fIcount\fR relocations.
-This is useful when generating huge relocatable files for downloading into
-certain real time kernels with the \s-1COFF\s0 object file format; since \s-1COFF\s0
-cannot represent more than 65535 relocations in a single section. Note
-that this will fail to work with object file formats which do not
-support arbitrary sections. The linker will not split up individual
-input sections for redistribution, so if a single input section contains
-more than \fIcount\fR relocations one output section will contain that
-many relocations. \fIcount\fR defaults to a value of 32768.
-.IP "\fB\-\-stats\fR" 4
-.IX Item "--stats"
-Compute and display statistics about the operation of the linker, such
-as execution time and memory usage.
-.IP "\fB\-\-sysroot=\fR\fIdirectory\fR" 4
-.IX Item "--sysroot=directory"
-Use \fIdirectory\fR as the location of the sysroot, overriding the
-configure-time default. This option is only supported by linkers
-that were configured using \fB\-\-with\-sysroot\fR.
-.IP "\fB\-\-traditional\-format\fR" 4
-.IX Item "--traditional-format"
-For some targets, the output of \fBld\fR is different in some ways from
-the output of some existing linker. This switch requests \fBld\fR to
-use the traditional format instead.
-.Sp
-For example, on SunOS, \fBld\fR 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
-\&\f(CW\*(C`dbx\*(C'\fR program can not read the resulting program (\f(CW\*(C`gdb\*(C'\fR has no
-trouble). The \fB\-\-traditional\-format\fR switch tells \fBld\fR to not
-combine duplicate entries.
-.IP "\fB\-\-section\-start\fR \fIsectionname\fR\fB=\fR\fIorg\fR" 4
-.IX Item "--section-start sectionname=org"
-Locate a section in the output file at the absolute
-address given by \fIorg\fR. You may use this option as many
-times as necessary to locate multiple sections in the command
-line.
-\&\fIorg\fR must be a single hexadecimal integer;
-for compatibility with other linkers, you may omit the leading
-\&\fB0x\fR usually associated with hexadecimal values. \fINote:\fR there
-should be no white space between \fIsectionname\fR, the equals
-sign ("\fB=\fR"), and \fIorg\fR.
-.IP "\fB\-Tbss\fR \fIorg\fR" 4
-.IX Item "-Tbss org"
-.PD 0
-.IP "\fB\-Tdata\fR \fIorg\fR" 4
-.IX Item "-Tdata org"
-.IP "\fB\-Ttext\fR \fIorg\fR" 4
-.IX Item "-Ttext org"
-.PD
-Same as \-\-section\-start, with \f(CW\*(C`.bss\*(C'\fR, \f(CW\*(C`.data\*(C'\fR or
-\&\f(CW\*(C`.text\*(C'\fR as the \fIsectionname\fR.
-.IP "\fB\-\-unresolved\-symbols=\fR\fImethod\fR" 4
-.IX Item "--unresolved-symbols=method"
-Determine how to handle unresolved symbols. There are four possible
-values for \fBmethod\fR:
-.RS 4
-.IP "\fBignore-all\fR" 4
-.IX Item "ignore-all"
-Do not report any unresolved symbols.
-.IP "\fBreport-all\fR" 4
-.IX Item "report-all"
-Report all unresolved symbols. This is the default.
-.IP "\fBignore-in-object-files\fR" 4
-.IX Item "ignore-in-object-files"
-Report unresolved symbols that are contained in shared libraries, but
-ignore them if they come from regular object files.
-.IP "\fBignore-in-shared-libs\fR" 4
-.IX Item "ignore-in-shared-libs"
-Report unresolved symbols that come from regular object files, but
-ignore them if they come from shared libraries. This can be useful
-when creating a dynamic binary and it is known that all the shared
-libraries that it should be referencing are included on the linker's
-command line.
-.RE
-.RS 4
-.Sp
-The behaviour for shared libraries on their own can also be controlled
-by the \fB\-\-[no\-]allow\-shlib\-undefined\fR option.
-.Sp
-Normally the linker will generate an error message for each reported
-unresolved symbol but the option \fB\-\-warn\-unresolved\-symbols\fR
-can change this to a warning.
-.RE
-.IP "\fB\-\-dll\-verbose\fR" 4
-.IX Item "--dll-verbose"
-.PD 0
-.IP "\fB\-\-verbose\fR" 4
-.IX Item "--verbose"
-.PD
-Display the version number for \fBld\fR and list the linker emulations
-supported. Display which input files can and cannot be opened. Display
-the linker script being used by the linker.
-.IP "\fB\-\-version\-script=\fR\fIversion-scriptfile\fR" 4
-.IX Item "--version-script=version-scriptfile"
-Specify the name of a version script to the linker. This is typically
-used when creating shared libraries to specify additional information
-about the version hierarchy for the library being created. This option
-is only meaningful on \s-1ELF\s0 platforms which support shared libraries.
-.IP "\fB\-\-warn\-common\fR" 4
-.IX Item "--warn-common"
-Warn when a common symbol is combined with another common symbol or with
-a symbol definition. Unix linkers allow this somewhat sloppy practise,
-but linkers on some other operating systems do not. This option allows
-you to find potential problems from combining global symbols.
-Unfortunately, some C libraries use this practise, so you may get some
-warnings about symbols in the libraries as well as in your programs.
-.Sp
-There are three kinds of global symbols, illustrated here by C examples:
-.RS 4
-.IP "\fBint i = 1;\fR" 4
-.IX Item "int i = 1;"
-A definition, which goes in the initialized data section of the output
-file.
-.IP "\fBextern int i;\fR" 4
-.IX Item "extern int i;"
-An undefined reference, which does not allocate space.
-There must be either a definition or a common symbol for the
-variable somewhere.
-.IP "\fBint i;\fR" 4
-.IX Item "int i;"
-A common symbol. If there are only (one or more) common symbols for a
-variable, it goes in the uninitialized data area of the output file.
-The linker merges multiple common symbols for the same variable into a
-single symbol. If they are of different sizes, it picks the largest
-size. The linker turns a common symbol into a declaration, if there is
-a definition of the same variable.
-.RE
-.RS 4
-.Sp
-The \fB\-\-warn\-common\fR option can produce five kinds of warnings.
-Each warning consists of a pair of lines: the first describes the symbol
-just encountered, and the second describes the previous symbol
-encountered with the same name. One or both of the two symbols will be
-a common symbol.
-.IP "1." 4
-Turning a common symbol into a reference, because there is already a
-definition for the symbol.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: common of `<symbol>'
-\& overridden by definition
-\& <file>(<section>): warning: defined here
-.Ve
-.IP "2." 4
-Turning a common symbol into a reference, because a later definition for
-the symbol is encountered. This is the same as the previous case,
-except that the symbols are encountered in a different order.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: definition of `<symbol>'
-\& overriding common
-\& <file>(<section>): warning: common is here
-.Ve
-.IP "3." 4
-Merging a common symbol with a previous same-sized common symbol.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: multiple common
-\& of `<symbol>'
-\& <file>(<section>): warning: previous common is here
-.Ve
-.IP "4." 4
-Merging a common symbol with a previous larger common symbol.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: common of `<symbol>'
-\& overridden by larger common
-\& <file>(<section>): warning: larger common is here
-.Ve
-.IP "5." 4
-Merging a common symbol with a previous smaller common symbol. This is
-the same as the previous case, except that the symbols are
-encountered in a different order.
-.Sp
-.Vb 3
-\& <file>(<section>): warning: common of `<symbol>'
-\& overriding smaller common
-\& <file>(<section>): warning: smaller common is here
-.Ve
-.RE
-.RS 4
-.RE
-.IP "\fB\-\-warn\-constructors\fR" 4
-.IX Item "--warn-constructors"
-Warn if any global constructors are used. This is only useful for a few
-object file formats. For formats like \s-1COFF\s0 or \s-1ELF\s0, the linker can not
-detect the use of global constructors.
-.IP "\fB\-\-warn\-multiple\-gp\fR" 4
-.IX Item "--warn-multiple-gp"
-Warn if multiple global pointer values are required in the output file.
-This is only meaningful for certain processors, such as the Alpha.
-Specifically, some processors put large-valued constants in a special
-section. A special register (the global pointer) points into the middle
-of this section, so that constants can be loaded efficiently via a
-base-register relative addressing mode. Since the offset in
-base-register relative mode is fixed and relatively small (e.g., 16
-bits), this limits the maximum size of the constant pool. Thus, in
-large programs, it is often necessary to use multiple global pointer
-values in order to be able to address all possible constants. This
-option causes a warning to be issued whenever this case occurs.
-.IP "\fB\-\-warn\-once\fR" 4
-.IX Item "--warn-once"
-Only warn once for each undefined symbol, rather than once per module
-which refers to it.
-.IP "\fB\-\-warn\-section\-align\fR" 4
-.IX Item "--warn-section-align"
-Warn if the address of an output section is changed because of
-alignment. Typically, the alignment will be set by an input section.
-The address will only be changed if it not explicitly specified; that
-is, if the \f(CW\*(C`SECTIONS\*(C'\fR command does not specify a start address for
-the section.
-.IP "\fB\-\-warn\-shared\-textrel\fR" 4
-.IX Item "--warn-shared-textrel"
-Warn if the linker adds a \s-1DT_TEXTREL\s0 to a shared object.
-.IP "\fB\-\-warn\-unresolved\-symbols\fR" 4
-.IX Item "--warn-unresolved-symbols"
-If the linker is going to report an unresolved symbol (see the option
-\&\fB\-\-unresolved\-symbols\fR) it will normally generate an error.
-This option makes it generate a warning instead.
-.IP "\fB\-\-error\-unresolved\-symbols\fR" 4
-.IX Item "--error-unresolved-symbols"
-This restores the linker's default behaviour of generating errors when
-it is reporting unresolved symbols.
-.IP "\fB\-\-whole\-archive\fR" 4
-.IX Item "--whole-archive"
-For each archive mentioned on the command line after the
-\&\fB\-\-whole\-archive\fR 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.
-.Sp
-Two notes when using this option from gcc: First, gcc doesn't know
-about this option, so you have to use \fB\-Wl,\-whole\-archive\fR.
-Second, don't forget to use \fB\-Wl,\-no\-whole\-archive\fR 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.
-.IP "\fB\-\-wrap\fR \fIsymbol\fR" 4
-.IX Item "--wrap symbol"
-Use a wrapper function for \fIsymbol\fR. Any undefined reference to
-\&\fIsymbol\fR will be resolved to \f(CW\*(C`_\|_wrap_\f(CIsymbol\f(CW\*(C'\fR. Any
-undefined reference to \f(CW\*(C`_\|_real_\f(CIsymbol\f(CW\*(C'\fR will be resolved to
-\&\fIsymbol\fR.
-.Sp
-This can be used to provide a wrapper for a system function. The
-wrapper function should be called \f(CW\*(C`_\|_wrap_\f(CIsymbol\f(CW\*(C'\fR. If it
-wishes to call the system function, it should call
-\&\f(CW\*(C`_\|_real_\f(CIsymbol\f(CW\*(C'\fR.
-.Sp
-Here is a trivial example:
-.Sp
-.Vb 6
-\& void *
-\& __wrap_malloc (size_t c)
-\& {
-\& printf ("malloc called with %zu\en", c);
-\& return __real_malloc (c);
-\& }
-.Ve
-.Sp
-If you link other code with this file using \fB\-\-wrap malloc\fR, then
-all calls to \f(CW\*(C`malloc\*(C'\fR will call the function \f(CW\*(C`_\|_wrap_malloc\*(C'\fR
-instead. The call to \f(CW\*(C`_\|_real_malloc\*(C'\fR in \f(CW\*(C`_\|_wrap_malloc\*(C'\fR will
-call the real \f(CW\*(C`malloc\*(C'\fR function.
-.Sp
-You may wish to provide a \f(CW\*(C`_\|_real_malloc\*(C'\fR function as well, so that
-links without the \fB\-\-wrap\fR option will succeed. If you do this,
-you should not put the definition of \f(CW\*(C`_\|_real_malloc\*(C'\fR in the same
-file as \f(CW\*(C`_\|_wrap_malloc\*(C'\fR; if you do, the assembler may resolve the
-call before the linker has a chance to wrap it to \f(CW\*(C`malloc\*(C'\fR.
-.IP "\fB\-\-eh\-frame\-hdr\fR" 4
-.IX Item "--eh-frame-hdr"
-Request creation of \f(CW\*(C`.eh_frame_hdr\*(C'\fR section and \s-1ELF\s0
-\&\f(CW\*(C`PT_GNU_EH_FRAME\*(C'\fR segment header.
-.IP "\fB\-\-enable\-new\-dtags\fR" 4
-.IX Item "--enable-new-dtags"
-.PD 0
-.IP "\fB\-\-disable\-new\-dtags\fR" 4
-.IX Item "--disable-new-dtags"
-.PD
-This linker can create the new dynamic tags in \s-1ELF\s0. But the older \s-1ELF\s0
-systems may not understand them. If you specify
-\&\fB\-\-enable\-new\-dtags\fR, the dynamic tags will be created as needed.
-If you specify \fB\-\-disable\-new\-dtags\fR, no new dynamic tags will be
-created. By default, the new dynamic tags are not created. Note that
-those options are only available for \s-1ELF\s0 systems.
-.IP "\fB\-\-hash\-size=\fR\fInumber\fR" 4
-.IX Item "--hash-size=number"
-Set the default size of the linker's hash tables to a prime number
-close to \fInumber\fR. Increasing this value can reduce the length of
-time it takes the linker to perform its tasks, at the expense of
-increasing the linker's memory requirements. Similarly reducing this
-value can reduce the memory requirements at the expense of speed.
-.IP "\fB\-\-reduce\-memory\-overheads\fR" 4
-.IX Item "--reduce-memory-overheads"
-This option reduces memory requirements at ld runtime, at the expense of
-linking speed. This was introduced to select the old O(n^2) algorithm
-for link map file generation, rather than the new O(n) algorithm which uses
-about 40% more memory for symbol storage.
-.Sp
-Another effect of the switch is to set the default hash table size to
-1021, which again saves memory at the cost of lengthening the linker's
-run time. This is not done however if the \fB\-\-hash\-size\fR switch
-has been used.
-.Sp
-The \fB\-\-reduce\-memory\-overheads\fR switch may be also be used to
-enable other tradeoffs in future versions of the linker.
-.PP
-The i386 \s-1PE\s0 linker supports the \fB\-shared\fR option, which causes
-the output to be a dynamically linked library (\s-1DLL\s0) instead of a
-normal executable. You should name the output \f(CW\*(C`*.dll\*(C'\fR when you
-use this option. In addition, the linker fully supports the standard
-\&\f(CW\*(C`*.def\*(C'\fR files, which may be specified on the linker command line
-like an object file (in fact, it should precede archives it exports
-symbols from, to ensure that they get linked in, just like a normal
-object file).
-.PP
-In addition to the options common to all targets, the i386 \s-1PE\s0 linker
-support additional command line options that are specific to the i386
-\&\s-1PE\s0 target. Options that take values may be separated from their
-values by either a space or an equals sign.
-.IP "\fB\-\-add\-stdcall\-alias\fR" 4
-.IX Item "--add-stdcall-alias"
-If given, symbols with a stdcall suffix (@\fInn\fR) will be exported
-as-is and also with the suffix stripped.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-base\-file\fR \fIfile\fR" 4
-.IX Item "--base-file file"
-Use \fIfile\fR as the name of a file in which to save the base
-addresses of all the relocations needed for generating DLLs with
-\&\fIdlltool\fR.
-[This is an i386 \s-1PE\s0 specific option]
-.IP "\fB\-\-dll\fR" 4
-.IX Item "--dll"
-Create a \s-1DLL\s0 instead of a regular executable. You may also use
-\&\fB\-shared\fR or specify a \f(CW\*(C`LIBRARY\*(C'\fR in a given \f(CW\*(C`.def\*(C'\fR
-file.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-stdcall\-fixup\fR" 4
-.IX Item "--enable-stdcall-fixup"
-.PD 0
-.IP "\fB\-\-disable\-stdcall\-fixup\fR" 4
-.IX Item "--disable-stdcall-fixup"
-.PD
-If the link finds a symbol that it cannot resolve, it will attempt to
-do \*(L"fuzzy linking\*(R" by looking for another defined symbol that differs
-only in the format of the symbol name (cdecl vs stdcall) and will
-resolve that symbol by linking to the match. For example, the
-undefined symbol \f(CW\*(C`_foo\*(C'\fR might be linked to the function
-\&\f(CW\*(C`_foo@12\*(C'\fR, or the undefined symbol \f(CW\*(C`_bar@16\*(C'\fR might be linked
-to the function \f(CW\*(C`_bar\*(C'\fR. 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 \fB\-\-enable\-stdcall\-fixup\fR, this
-feature is fully enabled and warnings are not printed. If you specify
-\&\fB\-\-disable\-stdcall\-fixup\fR, this feature is disabled and such
-mismatches are considered to be errors.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-export\-all\-symbols\fR" 4
-.IX Item "--export-all-symbols"
-If given, all global symbols in the objects used to build a \s-1DLL\s0 will
-be exported by the \s-1DLL\s0. Note that this is the default if there
-otherwise wouldn't be any exported symbols. When symbols are
-explicitly exported via \s-1DEF\s0 files or implicitly exported via function
-attributes, the default is to not export anything else unless this
-option is given. Note that the symbols \f(CW\*(C`DllMain@12\*(C'\fR,
-\&\f(CW\*(C`DllEntryPoint@0\*(C'\fR, \f(CW\*(C`DllMainCRTStartup@12\*(C'\fR, and
-\&\f(CW\*(C`impure_ptr\*(C'\fR will not be automatically
-exported. Also, symbols imported from other DLLs will not be
-re\-exported, nor will symbols specifying the \s-1DLL\s0's internal layout
-such as those beginning with \f(CW\*(C`_head_\*(C'\fR or ending with
-\&\f(CW\*(C`_iname\*(C'\fR. In addition, no symbols from \f(CW\*(C`libgcc\*(C'\fR,
-\&\f(CW\*(C`libstd++\*(C'\fR, \f(CW\*(C`libmingw32\*(C'\fR, or \f(CW\*(C`crtX.o\*(C'\fR will be exported.
-Symbols whose names begin with \f(CW\*(C`_\|_rtti_\*(C'\fR or \f(CW\*(C`_\|_builtin_\*(C'\fR 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: \f(CW\*(C`_cygwin_dll_entry@12\*(C'\fR,
-\&\f(CW\*(C`_cygwin_crt0_common@8\*(C'\fR, \f(CW\*(C`_cygwin_noncygwin_dll_entry@12\*(C'\fR,
-\&\f(CW\*(C`_fmode\*(C'\fR, \f(CW\*(C`_impure_ptr\*(C'\fR, \f(CW\*(C`cygwin_attach_dll\*(C'\fR,
-\&\f(CW\*(C`cygwin_premain0\*(C'\fR, \f(CW\*(C`cygwin_premain1\*(C'\fR, \f(CW\*(C`cygwin_premain2\*(C'\fR,
-\&\f(CW\*(C`cygwin_premain3\*(C'\fR, and \f(CW\*(C`environ\*(C'\fR.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-exclude\-symbols\fR \fIsymbol\fR\fB,\fR\fIsymbol\fR\fB,...\fR" 4
-.IX Item "--exclude-symbols symbol,symbol,..."
-Specifies a list of symbols which should not be automatically
-exported. The symbol names may be delimited by commas or colons.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-file\-alignment\fR" 4
-.IX Item "--file-alignment"
-Specify the file alignment. Sections in the file will always begin at
-file offsets which are multiples of this number. This defaults to
-512.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-heap\fR \fIreserve\fR" 4
-.IX Item "--heap reserve"
-.PD 0
-.IP "\fB\-\-heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
-.IX Item "--heap reserve,commit"
-.PD
-Specify the amount of memory to reserve (and optionally commit) to be
-used as heap for this program. The default is 1Mb reserved, 4K
-committed.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-image\-base\fR \fIvalue\fR" 4
-.IX Item "--image-base value"
-Use \fIvalue\fR as the base address of your program or dll. This is
-the lowest memory location that will be used when your program or dll
-is loaded. To reduce the need to relocate and improve performance of
-your dlls, each should have a unique base address and not overlap any
-other dlls. The default is 0x400000 for executables, and 0x10000000
-for dlls.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-kill\-at\fR" 4
-.IX Item "--kill-at"
-If given, the stdcall suffixes (@\fInn\fR) will be stripped from
-symbols before they are exported.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-large\-address\-aware\fR" 4
-.IX Item "--large-address-aware"
-If given, the appropriate bit in the \*(L"Charateristics\*(R" field of the \s-1COFF\s0
-header is set to indicate that this executable supports virtual addresses
-greater than 2 gigabytes. This should be used in conjuction with the /3GB
-or /USERVA=\fIvalue\fR megabytes switch in the \*(L"[operating systems]\*(R"
-section of the \s-1BOOT\s0.INI. Otherwise, this bit has no effect.
-[This option is specific to \s-1PE\s0 targeted ports of the linker]
-.IP "\fB\-\-major\-image\-version\fR \fIvalue\fR" 4
-.IX Item "--major-image-version value"
-Sets the major number of the \*(L"image version\*(R". Defaults to 1.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-major\-os\-version\fR \fIvalue\fR" 4
-.IX Item "--major-os-version value"
-Sets the major number of the \*(L"os version\*(R". Defaults to 4.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-major\-subsystem\-version\fR \fIvalue\fR" 4
-.IX Item "--major-subsystem-version value"
-Sets the major number of the \*(L"subsystem version\*(R". Defaults to 4.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-minor\-image\-version\fR \fIvalue\fR" 4
-.IX Item "--minor-image-version value"
-Sets the minor number of the \*(L"image version\*(R". Defaults to 0.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-minor\-os\-version\fR \fIvalue\fR" 4
-.IX Item "--minor-os-version value"
-Sets the minor number of the \*(L"os version\*(R". Defaults to 0.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-minor\-subsystem\-version\fR \fIvalue\fR" 4
-.IX Item "--minor-subsystem-version value"
-Sets the minor number of the \*(L"subsystem version\*(R". Defaults to 0.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-output\-def\fR \fIfile\fR" 4
-.IX Item "--output-def file"
-The linker will create the file \fIfile\fR which will contain a \s-1DEF\s0
-file corresponding to the \s-1DLL\s0 the linker is generating. This \s-1DEF\s0 file
-(which should be called \f(CW\*(C`*.def\*(C'\fR) may be used to create an import
-library with \f(CW\*(C`dlltool\*(C'\fR or may be used as a reference to
-automatically or implicitly exported symbols.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-out\-implib\fR \fIfile\fR" 4
-.IX Item "--out-implib file"
-The linker will create the file \fIfile\fR which will contain an
-import lib corresponding to the \s-1DLL\s0 the linker is generating. This
-import lib (which should be called \f(CW\*(C`*.dll.a\*(C'\fR or \f(CW\*(C`*.a\*(C'\fR
-may be used to link clients against the generated \s-1DLL\s0; this behaviour
-makes it possible to skip a separate \f(CW\*(C`dlltool\*(C'\fR import library
-creation step.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-auto\-image\-base\fR" 4
-.IX Item "--enable-auto-image-base"
-Automatically choose the image base for DLLs, unless one is specified
-using the \f(CW\*(C`\-\-image\-base\*(C'\fR argument. By using a hash generated
-from the dllname to create unique image bases for each \s-1DLL\s0, in-memory
-collisions and relocations which can delay program execution are
-avoided.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-disable\-auto\-image\-base\fR" 4
-.IX Item "--disable-auto-image-base"
-Do not automatically generate a unique image base. If there is no
-user-specified image base (\f(CW\*(C`\-\-image\-base\*(C'\fR) then use the platform
-default.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-dll\-search\-prefix\fR \fIstring\fR" 4
-.IX Item "--dll-search-prefix string"
-When linking dynamically to a dll without an import library,
-search for \f(CW\*(C`<string><basename>.dll\*(C'\fR in preference to
-\&\f(CW\*(C`lib<basename>.dll\*(C'\fR. This behaviour allows easy distinction
-between DLLs built for the various \*(L"subplatforms\*(R": native, cygwin,
-uwin, pw, etc. For instance, cygwin DLLs typically use
-\&\f(CW\*(C`\-\-dll\-search\-prefix=cyg\*(C'\fR.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-auto\-import\fR" 4
-.IX Item "--enable-auto-import"
-Do sophisticated linking of \f(CW\*(C`_symbol\*(C'\fR to \f(CW\*(C`_\|_imp_\|_symbol\*(C'\fR for
-\&\s-1DATA\s0 imports from DLLs, and create the necessary thunking symbols when
-building the import libraries with those \s-1DATA\s0 exports. Note: Use of the
-\&'auto\-import' extension will cause the text section of the image file
-to be made writable. This does not conform to the PE-COFF format
-specification published by Microsoft.
-.Sp
-Using 'auto\-import' generally will 'just work' \*(-- but sometimes you may
-see this message:
-.Sp
-"variable '<var>' can't be auto\-imported. Please read the
-documentation for ld's \f(CW\*(C`\-\-enable\-auto\-import\*(C'\fR for details."
-.Sp
-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 \s-1DLL\s0, as well as using a
-constant index into an array variable imported from a \s-1DLL\s0. 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.
-.Sp
-There are several ways to address this difficulty, regardless of the
-data type of the exported variable:
-.Sp
-One way is to use \-\-enable\-runtime\-pseudo\-reloc switch. This leaves the task
-of adjusting references in your client code for runtime environment, so
-this method works only when runtime environment supports this feature.
-.Sp
-A second 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:
-.Sp
-.Vb 3
-\& extern type extern_array[];
-\& extern_array[1] \-\->
-\& { volatile type *t=extern_array; t[1] }
-.Ve
-.Sp
-or
-.Sp
-.Vb 3
-\& extern type extern_array[];
-\& extern_array[1] \-\->
-\& { volatile int t=1; extern_array[t] }
-.Ve
-.Sp
-For structs (and most other multiword data types) the only option
-is to make the struct itself (or the long long, or the ...) variable:
-.Sp
-.Vb 3
-\& extern struct s extern_struct;
-\& extern_struct.field \-\->
-\& { volatile struct s *t=&extern_struct; t\->field }
-.Ve
-.Sp
-or
-.Sp
-.Vb 3
-\& extern long long extern_ll;
-\& extern_ll \-\->
-\& { volatile long long * local_ll=&extern_ll; *local_ll }
-.Ve
-.Sp
-A third method of dealing with this difficulty is to abandon
-\&'auto\-import' for the offending symbol and mark it with
-\&\f(CW\*(C`_\|_declspec(dllimport)\*(C'\fR. However, in practise that
-requires using compile-time #defines to indicate whether you are
-building a \s-1DLL\s0, building client code that will link to the \s-1DLL\s0, 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:
-.Sp
-Original:
-.Sp
-.Vb 7
-\& \-\-foo.h
-\& extern int arr[];
-\& \-\-foo.c
-\& #include "foo.h"
-\& void main(int argc, char **argv){
-\& printf("%d\en",arr[1]);
-\& }
-.Ve
-.Sp
-Solution 1:
-.Sp
-.Vb 9
-\& \-\-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\en",parr[1]);
-\& }
-.Ve
-.Sp
-Solution 2:
-.Sp
-.Vb 14
-\& \-\-foo.h
-\& /* Note: auto\-export is assumed (no __declspec(dllexport)) */
-\& #if (defined(_WIN32) || defined(__CYGWIN__)) && \e
-\& !(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\en",arr[1]);
-\& }
-.Ve
-.Sp
-A fourth 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. \fIset_foo()\fR and \fIget_foo()\fR accessor
-functions).
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-disable\-auto\-import\fR" 4
-.IX Item "--disable-auto-import"
-Do not attempt to do sophisticated linking of \f(CW\*(C`_symbol\*(C'\fR to
-\&\f(CW\*(C`_\|_imp_\|_symbol\*(C'\fR for \s-1DATA\s0 imports from DLLs.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-runtime\-pseudo\-reloc\fR" 4
-.IX Item "--enable-runtime-pseudo-reloc"
-If your code contains expressions described in \-\-enable\-auto\-import section,
-that is, \s-1DATA\s0 imports from \s-1DLL\s0 with non-zero offset, this switch will create
-a vector of 'runtime pseudo relocations' which can be used by runtime
-environment to adjust references to such data in your client code.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-disable\-runtime\-pseudo\-reloc\fR" 4
-.IX Item "--disable-runtime-pseudo-reloc"
-Do not create pseudo relocations for non-zero offset \s-1DATA\s0 imports from
-DLLs. This is the default.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-enable\-extra\-pe\-debug\fR" 4
-.IX Item "--enable-extra-pe-debug"
-Show additional debug info related to auto-import symbol thunking.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-section\-alignment\fR" 4
-.IX Item "--section-alignment"
-Sets the section alignment. Sections in memory will always begin at
-addresses which are a multiple of this number. Defaults to 0x1000.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-stack\fR \fIreserve\fR" 4
-.IX Item "--stack reserve"
-.PD 0
-.IP "\fB\-\-stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR" 4
-.IX Item "--stack reserve,commit"
-.PD
-Specify the amount of memory to reserve (and optionally commit) to be
-used as stack for this program. The default is 2Mb reserved, 4K
-committed.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.IP "\fB\-\-subsystem\fR \fIwhich\fR" 4
-.IX Item "--subsystem which"
-.PD 0
-.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR" 4
-.IX Item "--subsystem which:major"
-.IP "\fB\-\-subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR" 4
-.IX Item "--subsystem which:major.minor"
-.PD
-Specifies the subsystem under which your program will execute. The
-legal values for \fIwhich\fR are \f(CW\*(C`native\*(C'\fR, \f(CW\*(C`windows\*(C'\fR,
-\&\f(CW\*(C`console\*(C'\fR, \f(CW\*(C`posix\*(C'\fR, and \f(CW\*(C`xbox\*(C'\fR. You may optionally set
-the subsystem version also. Numeric values are also accepted for
-\&\fIwhich\fR.
-[This option is specific to the i386 \s-1PE\s0 targeted port of the linker]
-.PP
-The 68HC11 and 68HC12 linkers support specific options to control the
-memory bank switching mapping and trampoline code generation.
-.IP "\fB\-\-no\-trampoline\fR" 4
-.IX Item "--no-trampoline"
-This option disables the generation of trampoline. By default a trampoline
-is generated for each far function which is called using a \f(CW\*(C`jsr\*(C'\fR
-instruction (this happens when a pointer to a far function is taken).
-.IP "\fB\-\-bank\-window\fR \fIname\fR" 4
-.IX Item "--bank-window name"
-This option indicates to the linker the name of the memory region in
-the \fB\s-1MEMORY\s0\fR specification that describes the memory bank window.
-The definition of such region is then used by the linker to compute
-paging and addresses within the memory window.
-.SH "ENVIRONMENT"
-.IX Header "ENVIRONMENT"
-You can change the behaviour of \fBld\fR with the environment variables
-\&\f(CW\*(C`GNUTARGET\*(C'\fR,
-\&\f(CW\*(C`LDEMULATION\*(C'\fR and \f(CW\*(C`COLLECT_NO_DEMANGLE\*(C'\fR.
-.PP
-\&\f(CW\*(C`GNUTARGET\*(C'\fR determines the input-file object format if you don't
-use \fB\-b\fR (or its synonym \fB\-\-format\fR). Its value should be one
-of the \s-1BFD\s0 names for an input format. If there is no
-\&\f(CW\*(C`GNUTARGET\*(C'\fR in the environment, \fBld\fR uses the natural format
-of the target. If \f(CW\*(C`GNUTARGET\*(C'\fR is set to \f(CW\*(C`default\*(C'\fR then \s-1BFD\s0
-attempts to discover the input format by examining binary input files;
-this method often succeeds, but there are potential ambiguities, since
-there is no method of ensuring that the magic number used to specify
-object-file formats is unique. However, the configuration procedure for
-\&\s-1BFD\s0 on each system places the conventional format for that system first
-in the search\-list, so ambiguities are resolved in favor of convention.
-.PP
-\&\f(CW\*(C`LDEMULATION\*(C'\fR determines the default emulation if you don't use the
-\&\fB\-m\fR option. The emulation can affect various aspects of linker
-behaviour, particularly the default linker script. You can list the
-available emulations with the \fB\-\-verbose\fR or \fB\-V\fR options. If
-the \fB\-m\fR option is not used, and the \f(CW\*(C`LDEMULATION\*(C'\fR environment
-variable is not defined, the default emulation depends upon how the
-linker was configured.
-.PP
-Normally, the linker will default to demangling symbols. However, if
-\&\f(CW\*(C`COLLECT_NO_DEMANGLE\*(C'\fR is set in the environment, then it will
-default to not demangling symbols. This environment variable is used in
-a similar fashion by the \f(CW\*(C`gcc\*(C'\fR linker wrapper program. The default
-may be overridden by the \fB\-\-demangle\fR and \fB\-\-no\-demangle\fR
-options.
-.SH "SEE ALSO"
-.IX Header "SEE ALSO"
-\&\fIar\fR\|(1), \fInm\fR\|(1), \fIobjcopy\fR\|(1), \fIobjdump\fR\|(1), \fIreadelf\fR\|(1) and
-the Info entries for \fIbinutils\fR and
-\&\fIld\fR.
-.SH "COPYRIGHT"
-.IX Header "COPYRIGHT"
-Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001,
-2002, 2003, 2004 Free Software Foundation, Inc.
-.PP
-Permission is granted to copy, distribute and/or modify this document
-under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.1
-or any later version published by the Free Software Foundation;
-with no Invariant Sections, with no Front-Cover Texts, and with no
-Back-Cover Texts. A copy of the license is included in the
-section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".
diff --git a/contrib/binutils/ld/ld.h b/contrib/binutils/ld/ld.h
index b5a4f55..fd7301b 100644
--- a/contrib/binutils/ld/ld.h
+++ b/contrib/binutils/ld/ld.h
@@ -1,6 +1,6 @@
/* ld.h -- general linker header file
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -81,8 +81,6 @@ void *alloca ();
# define N_(String) (String)
#endif
-#include "bin-bugs.h"
-
/* Look in this environment name for the linker to pretend to be */
#define EMULATION_ENVIRON "LDEMULATION"
/* If in there look for the strings: */
@@ -149,22 +147,6 @@ typedef struct {
bfd_boolean inhibit_common_definition;
bfd_boolean relax;
- /* Name of runtime interpreter to invoke. */
- char *interpreter;
-
- /* Name to give runtime libary from the -soname argument. */
- char *soname;
-
- /* Runtime library search path from the -rpath argument. */
- char *rpath;
-
- /* Link time runtime library search path from the -rpath-link
- argument. */
- char *rpath_link;
-
- /* Big or little endian as set on command line. */
- enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
-
/* If TRUE, build MIPS embedded PIC relocation tables in the output
file. */
bfd_boolean embedded_relocs;
@@ -179,17 +161,10 @@ typedef struct {
files. */
bfd_boolean warn_mismatch;
- /* Name of shared object whose symbol table should be filtered with
- this shared object. From the --filter option. */
- char *filter_shlib;
+ /* Warn on attempting to open an incompatible library during a library
+ search. */
+ bfd_boolean warn_search_mismatch;
- /* Name of shared object for whose symbol table this shared object
- is an auxiliary filter. From the --auxiliary option. */
- char **auxiliary_filters;
-
- /* A version symbol to be applied to the symbol names found in the
- .exports sections. */
- char *version_exports_section;
/* If TRUE (the default) check section addresses, once compute,
fpor overlaps. */
@@ -201,10 +176,53 @@ typedef struct {
input files. */
bfd_boolean accept_unknown_input_arch;
- /* If TRUE reduce memory overheads, at the expense of speed.
- This will cause map file generation to use an O(N^2) algorithm. */
- bfd_boolean reduce_memory_overheads;
+ /* Big or little endian as set on command line. */
+ enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
+
+ /* -Bsymbolic and -Bsymbolic-functions, as set on command line. */
+ enum
+ {
+ symbolic_unset = 0,
+ symbolic,
+ symbolic_functions,
+ } symbolic;
+
+ /* --dynamic-list, --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo
+ and --dynamic-list FILE, as set on command line. */
+ enum
+ {
+ dynamic_list_unset = 0,
+ dynamic_list_data,
+ dynamic_list
+ } dynamic_list;
+
+ /* Name of runtime interpreter to invoke. */
+ char *interpreter;
+ /* Name to give runtime libary from the -soname argument. */
+ char *soname;
+
+ /* Runtime library search path from the -rpath argument. */
+ char *rpath;
+
+ /* Link time runtime library search path from the -rpath-link
+ argument. */
+ char *rpath_link;
+
+ /* Name of shared object whose symbol table should be filtered with
+ this shared object. From the --filter option. */
+ char *filter_shlib;
+
+ /* Name of shared object for whose symbol table this shared object
+ is an auxiliary filter. From the --auxiliary option. */
+ char **auxiliary_filters;
+
+ /* A version symbol to be applied to the symbol names found in the
+ .exports sections. */
+ char *version_exports_section;
+
+ /* Default linker script. */
+ char *default_script;
} args_type;
extern args_type command_line;
@@ -212,7 +230,6 @@ extern args_type command_line;
typedef int token_code_type;
typedef struct {
- bfd_size_type specified_data_size;
bfd_boolean magic_demand_paged;
bfd_boolean make_executable;
@@ -252,24 +269,35 @@ typedef struct {
bfd_boolean text_read_only;
- char *map_filename;
- FILE *map_file;
-
bfd_boolean stats;
/* If set, orphan input sections will be mapped to separate output
sections. */
bfd_boolean unique_orphan_sections;
- unsigned int split_by_reloc;
- bfd_size_type split_by_file;
-
/* If set, only search library directories explicitly selected
on the command line. */
bfd_boolean only_cmd_line_lib_dirs;
+ /* The rpath separation character. Usually ':'. */
+ char rpath_separator;
+
+ char *map_filename;
+ FILE *map_file;
+
+ unsigned int split_by_reloc;
+ bfd_size_type split_by_file;
+
+ bfd_size_type specified_data_size;
+
/* The size of the hash table to use. */
bfd_size_type hash_table_size;
+
+ /* The maximum page size for ELF. */
+ bfd_vma maxpagesize;
+
+ /* The common page size for ELF. */
+ bfd_vma commonpagesize;
} ld_config_type;
extern ld_config_type config;
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
index 07bb0c3..71273f4 100644
--- a/contrib/binutils/ld/ld.texinfo
+++ b/contrib/binutils/ld/ld.texinfo
@@ -1,12 +1,12 @@
\input texinfo
@setfilename ld.info
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+@c 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
@syncodeindex ky cp
@c man begin INCLUDE
@include configdoc.texi
@c (configdoc.texi is generated by the Makefile)
-@include ldver.texi
+@include bfdver.texi
@c man end
@c @smallbook
@@ -20,33 +20,18 @@
@c Configure for the generation of man pages
@set UsesEnvVars
@set GENERIC
-@set ARC
@set ARM
-@set D10V
-@set D30V
-@set H8/300
-@set H8/500
+@set H8300
@set HPPA
-@set I370
-@set I80386
-@set I860
@set I960
-@set M32R
@set M68HC11
-@set M680X0
-@set MCORE
-@set MIPS
@set MMIX
@set MSP430
-@set PDP11
-@set PJ
@set POWERPC
@set POWERPC64
-@set SH
-@set SPARC
-@set TIC54X
-@set V850
-@set VAX
+@set Renesas
+@set SPU
+@set TICOFF
@set WIN32
@set XTENSA
@end ifset
@@ -60,13 +45,15 @@ END-INFO-DIR-ENTRY
@end format
@end ifinfo
-@ifinfo
-This file documents the @sc{gnu} linker LD version @value{VERSION}.
-
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+@copying
+This file documents the @sc{gnu} linker LD
+@ifset VERSION_PACKAGE
+@value{VERSION_PACKAGE}
+@end ifset
+version @value{VERSION}.
-@ignore
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007 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
@@ -74,23 +61,18 @@ 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 process this file through Tex and print the
-results, provided the printed document carries copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
-
-@end ignore
-@end ifinfo
+@end copying
@iftex
@finalout
@setchapternewpage odd
-@settitle Using LD, the GNU linker
+@settitle The GNU linker
@titlepage
-@title Using ld
-@subtitle The GNU linker
+@title The GNU linker
@sp 1
-@subtitle @code{ld} version 2
+@subtitle @code{ld}
+@ifset VERSION_PACKAGE
+@subtitle @value{VERSION_PACKAGE}
+@end ifset
@subtitle Version @value{VERSION}
@author Steve Chamberlain
@author Ian Lance Taylor
@@ -100,7 +82,7 @@ notice identical to this one except for the removal of this paragraph
{\parskip=0pt
\hfill Red Hat Inc\par
\hfill nickc\@credhat.com, doc\@redhat.com\par
-\hfill {\it Using LD, the GNU linker}\par
+\hfill {\it The GNU linker}\par
\hfill Edited by Jeffrey Osier (jeffrey\@cygnus.com)\par
}
\global\parindent=0pt % Steve likes it this way.
@@ -109,7 +91,7 @@ notice identical to this one except for the removal of this paragraph
@vskip 0pt plus 1filll
@c man begin COPYRIGHT
Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001,
-2002, 2003, 2004 Free Software Foundation, Inc.
+2002, 2003, 2004, 2005, 2006, 2007 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
@@ -121,12 +103,17 @@ section entitled ``GNU Free Documentation License''.
@end titlepage
@end iftex
+@contents
@c FIXME: Talk about importance of *order* of args, cmds to linker!
@ifnottex
@node Top
-@top Using ld
-This file documents the @sc{gnu} linker ld version @value{VERSION}.
+@top LD
+This file documents the @sc{gnu} linker ld
+@ifset VERSION_PACKAGE
+@value{VERSION_PACKAGE}
+@end ifset
+version @value{VERSION}.
This document is distributed under the terms of the GNU Free
Documentation License. A copy of the license is included in the
@@ -164,6 +151,9 @@ section entitled ``GNU Free Documentation License''.
@ifset POWERPC64
* PowerPC64 ELF64:: ld and PowerPC64 64-bit ELF Support
@end ifset
+@ifset SPU
+* SPU ELF:: ld and SPU ELF Support
+@end ifset
@ifset TICOFF
* TI COFF:: ld and the TI COFF
@end ifset
@@ -182,7 +172,7 @@ section entitled ``GNU Free Documentation License''.
* Reporting Bugs:: Reporting Bugs
* MRI:: MRI Compatible Script Files
* GNU Free Documentation License:: GNU Free Documentation License
-* Index:: Index
+* LD Index:: LD Index
@end menu
@end ifnottex
@@ -216,10 +206,9 @@ 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.
+This man page does not describe the command language; see the
+@command{ld} entry in @code{info} for full details on the command
+language and on other aspects of the GNU linker.
@end ifset
@ifclear SingleFormat
@@ -322,7 +311,7 @@ For options whose names are multiple letters, either one dash or two can
precede the option name; for example, @samp{-trace-symbol} and
@samp{--trace-symbol} are equivalent. Note---there is one exception to
this rule. Multiple letter options that start with a lower case 'o' can
-only be preceeded by two dashes. This is to reduce confusion with the
+only be preceded by two dashes. This is to reduce confusion with the
@samp{-o} option. So for example @samp{-omagic} sets the output file
name to @samp{magic} whereas @samp{--omagic} sets the NMAGIC flag on the
output.
@@ -489,9 +478,9 @@ 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
+You can also use the dynamic list 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}.
+See the description of @samp{--dynamic-list}.
@ifclear SingleFormat
@cindex big-endian objects
@@ -550,7 +539,7 @@ toolchain for specifying object-file format for both input and output
object files.
@ifclear SingleFormat
The @sc{gnu} linker uses other mechanisms for this purpose: the
-@option{-b}, @option{--format}, @option{--oformat} options, the
+@option{-b}, @option{--format}, @option{--oformat} options, the
@code{TARGET} command in linker scripts, and the @code{GNUTARGET}
environment variable.
@end ifclear
@@ -604,21 +593,24 @@ of the function. By default, the linker uses @code{_init} as the
function to call.
@cindex archive files, from cmd line
-@kindex -l@var{archive}
-@kindex --library=@var{archive}
-@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. @command{ld} will search its
-path-list for occurrences of @code{lib@var{archive}.a} for every
-@var{archive} specified.
+@kindex -l@var{namespec}
+@kindex --library=@var{namespec}
+@item -l@var{namespec}
+@itemx --library=@var{namespec}
+Add the archive or object file specified by @var{namespec} to the
+list of files to link. This option may be used any number of times.
+If @var{namespec} is of the form @file{:@var{filename}}, @command{ld}
+will search the library path for a file called @var{filename}, otherise it
+will search the library path for a file called @file{lib@var{namespec}.a}.
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, @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.
+files other than @file{lib@var{namespec}.a}. Specifically, on ELF
+and SunOS systems, @command{ld} will search a directory for a library
+called @file{lib@var{namespec}.so} before searching for one called
+@file{lib@var{namespec}.a}. (By convention, a @code{.so} extension
+indicates a shared library.) Note that this behavior does not apply
+to @file{:@var{filename}}, which always specifies a file called
+@var{filename}.
The linker will search an archive only once, at the location where it is
specified on the command line. If the archive defines a symbol which
@@ -773,7 +765,7 @@ should only be enabled for the final binary.
@cindex retain relocations in final executable
@item -q
@itemx --emit-relocs
-Leave relocation sections and contents in fully linked exececutables.
+Leave relocation sections and contents in fully linked executables.
Post link analysis and optimization tools may need this information in
order to perform correct modifications of executables. This results
in larger executables.
@@ -858,6 +850,22 @@ the current directory, @code{ld} looks for it in the directories
specified by any preceding @samp{-L} options. Multiple @samp{-T}
options accumulate.
+@kindex -dT @var{script}
+@kindex --default-script=@var{script}
+@cindex script files
+@item -dT @var{scriptfile}
+@itemx --default-script=@var{scriptfile}
+Use @var{scriptfile} as the default linker script. @xref{Scripts}.
+
+This option is similar to the @option{--script} option except that
+processing of the script is delayed until after the rest of the
+command line has been processed. This allows options placed after the
+@option{--default-script} option on the command line to affect the
+behaviour of the linker script, which can be important when the linker
+command line cannot be directly controlled by the user. (eg because
+the command line is being constructed by another tool, such as
+@samp{gcc}).
+
@kindex -u @var{symbol}
@kindex --undefined=@var{symbol}
@cindex undefined symbol
@@ -911,11 +919,11 @@ Delete all local symbols.
@kindex -X
@kindex --discard-locals
@cindex local symbols, deleting
-@cindex L, deleting symbols beginning
@item -X
@itemx --discard-locals
-Delete all temporary local symbols. For most targets, this is all local
-symbols whose names begin with @samp{L}.
+Delete all temporary local symbols. (These symbols start with
+system-specific local label prefixes, typically @samp{.L} for ELF systems
+or @samp{L} for traditional a.out systems.)
@kindex -y @var{symbol}
@kindex --trace-symbol=@var{symbol}
@@ -962,6 +970,12 @@ objects.
Marks the object that its symbol table interposes before all symbols
but the primary executable.
+@item lazy
+When generating an executable or shared library, mark it to tell the
+dynamic linker to defer function call resolution to the point when
+the function is called (lazy binding), rather than at load time.
+Lazy binding is the default.
+
@item loadfltr
Marks the object that its filters be processed immediately at
runtime.
@@ -1007,9 +1021,15 @@ Marks the object may contain $ORIGIN.
@item relro
Create an ELF @code{PT_GNU_RELRO} segment header in the object.
+@item max-page-size=@var{value}
+Set the emulation maximum page size to @var{value}.
+
+@item common-page-size=@var{value}
+Set the emulation common page size to @var{value}.
+
@end table
-Other keywords are ignored for Solaris compatibility.
+Other keywords are ignored for Solaris compatibility.
@kindex -(
@cindex groups of archives
@@ -1110,7 +1130,7 @@ option also implies @option{--unresolved-symbols=report-all}. This
option can be used with @option{-shared}. Doing so means that a
shared library is being created but that all of the library's external
references must be resolved by pulling in entries from static
-libraries.
+libraries.
@kindex -Bsymbolic
@item -Bsymbolic
@@ -1120,6 +1140,39 @@ for a program linked against a shared library to override the definition
within the shared library. This option is only meaningful on ELF
platforms which support shared libraries.
+@kindex -Bsymbolic-functions
+@item -Bsymbolic-functions
+When creating a shared library, bind references to global function
+symbols to the definition within the shared library, if any.
+This option is only meaningful on ELF platforms which support shared
+libraries.
+
+@kindex --dynamic-list=@var{dynamic-list-file}
+@item --dynamic-list=@var{dynamic-list-file}
+Specify the name of a dynamic list file to the linker. This is
+typically used when creating shared libraries to specify a list of
+global symbols whose references shouldn't be bound to the definition
+within the shared library, or creating dynamically linked executables
+to specify a list of symbols which should be added to the symbol table
+in the executable. This option is only meaningful on ELF platforms
+which support shared libraries.
+
+The format of the dynamic list is the same as the version node without
+scope and node name. See @ref{VERSION} for more information.
+
+@kindex --dynamic-list-data
+@item --dynamic-list-data
+Include all global data symbols to the dynamic list.
+
+@kindex --dynamic-list-cpp-new
+@item --dynamic-list-cpp-new
+Provide the builtin dynamic list for C++ operator new and delete. It
+is mainly useful for building shared libstdc++.
+
+@kindex --dynamic-list-cpp-typeinfo
+@item --dynamic-list-cpp-typeinfo
+Provide the builtin dynamic list for C++ runtime type identification.
+
@kindex --check-sections
@kindex --no-check-sections
@item --check-sections
@@ -1220,13 +1273,25 @@ it ends in a @code{.exe} suffix.
@kindex --gc-sections
@kindex --no-gc-sections
@cindex garbage collection
-@item --no-gc-sections
-@itemx --gc-sections
+@item --gc-sections
+@itemx --no-gc-sections
Enable garbage collection of unused input sections. It is ignored on
targets that do not support this option. This option is not compatible
-with @samp{-r}. The default behaviour (of not performing this garbage
-collection) can be restored by specifying @samp{--no-gc-sections} on
-the command line.
+with @samp{-r} or @samp{--emit-relocs}. The default behaviour (of not
+performing this garbage collection) can be restored by specifying
+@samp{--no-gc-sections} on the command line.
+
+@kindex --print-gc-sections
+@kindex --no-print-gc-sections
+@cindex garbage collection
+@item --print-gc-sections
+@itemx --no-print-gc-sections
+List all sections removed by garbage collection. The listing is
+printed on stderr. This option is only effective if garbage
+collection has been enabled via the @samp{--gc-sections}) option. The
+default behaviour (of not listing the sections that are removed) can
+be restored by specifying @samp{--no-print-gc-sections} on the command
+line.
@cindex help
@cindex usage
@@ -1260,7 +1325,7 @@ Report unresolved symbol references from regular object files. This
is done even if the linker is creating a non-symbolic shared library.
The switch @option{--[no-]allow-shlib-undefined} controls the
behaviour for reporting unresolved references found in shared
-libraries being linked in.
+libraries being linked in.
@kindex --allow-multiple-definition
@kindex -z muldefs
@@ -1285,7 +1350,7 @@ the shared library being specified at link time may not be the same as
the one that is available at load time, so the symbols might actually be
resolvable at load time. Plus there are some systems, (eg BeOS) where
undefined symbols in shared libraries is normal. (The kernel patches
-them at load time to select which function is most appropriate
+them at load time to select which function is most appropriate
for the current architecture. This is used for example to dynamically
select an appropriate memset function). Apparently it is also normal
for HPPA shared libraries to have undefined symbols.
@@ -1316,6 +1381,11 @@ 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-warn-search-mismatch
+@item --no-warn-search-mismatch
+Normally @command{ld} will give a warning if it finds an incompatible
+library during a library search. This option silences the warning.
+
@kindex --no-whole-archive
@item --no-whole-archive
Turn off the effect of the @option{--whole-archive} option for subsequent
@@ -1451,7 +1521,7 @@ SunOS, the linker will form a runtime search patch out of all 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.
+file systems.
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
@@ -1481,7 +1551,7 @@ is possible to use unintentionally a different search path than the
runtime linker would do.
The linker uses the following search paths to locate required shared
-libraries.
+libraries:
@enumerate
@item
Any directories specified by @option{-rpath-link} options.
@@ -1490,7 +1560,9 @@ 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.
+at link time. Searching @option{-rpath} in this way is only supported
+by native linkers and cross linkers which have been configured with
+the @option{--with-sysroot} option.
@item
On an ELF system, if the @option{-rpath} and @code{rpath-link} options
were not used, search the contents of the environment variable
@@ -1784,7 +1856,7 @@ the section (@pxref{SECTIONS}).
@kindex --warn-shared-textrel
@item --warn-shared-textrel
-Warn if the linker adds a DT_TEXTREL to a shared object.
+Warn if the linker adds a DT_TEXTREL to a shared object.
@kindex --warn-unresolved-symbols
@item --warn-unresolved-symbols
@@ -1871,6 +1943,14 @@ time it takes the linker to perform its tasks, at the expense of
increasing the linker's memory requirements. Similarly reducing this
value can reduce the memory requirements at the expense of speed.
+@kindex --hash-style=@var{style}
+@item --hash-style=@var{style}
+Set the type of linker's hash table(s). @var{style} can be either
+@code{sysv} for classic ELF @code{.hash} section, @code{gnu} for
+new style GNU @code{.gnu.hash} section or @code{both} for both
+the classic ELF @code{.hash} and new style GNU @code{.gnu.hash}
+hash tables. The default is @code{sysv}.
+
@kindex --reduce-memory-overheads
@item --reduce-memory-overheads
This option reduces memory requirements at ld runtime, at the expense of
@@ -1958,22 +2038,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}, @code{DllMainCRTStartup@@12}, and
+@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},
+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
+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},
+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{_fmode}, @code{_impure_ptr}, @code{cygwin_attach_dll},
@code{cygwin_premain0}, @code{cygwin_premain1}, @code{cygwin_premain2},
-@code{cygwin_premain3}, and @code{environ}.
+@code{cygwin_premain3}, and @code{environ}.
[This option is specific to the i386 PE targeted port of the linker]
@kindex --exclude-symbols
@@ -2017,9 +2097,9 @@ symbols before they are exported.
@kindex --large-address-aware
@item --large-address-aware
-If given, the appropriate bit in the ``Charateristics'' field of the COFF
+If given, the appropriate bit in the ``Characteristics'' field of the COFF
header is set to indicate that this executable supports virtual addresses
-greater than 2 gigabytes. This should be used in conjuction with the /3GB
+greater than 2 gigabytes. This should be used in conjunction with the /3GB
or /USERVA=@var{value} megabytes switch in the ``[operating systems]''
section of the BOOT.INI. Otherwise, this bit has no effect.
[This option is specific to PE targeted ports of the linker]
@@ -2096,17 +2176,17 @@ default.
@kindex --dll-search-prefix
@item --dll-search-prefix @var{string}
When linking dynamically to a dll without an import library,
-search for @code{<string><basename>.dll} in preference to
+search for @code{<string><basename>.dll} in preference to
@code{lib<basename>.dll}. This behaviour 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}.
+@code{--dll-search-prefix=cyg}.
[This option is specific to the i386 PE targeted port of the linker]
@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
+Do sophisticated linking of @code{_symbol} to @code{__imp__symbol} for
+DATA imports from DLLs, and create the necessary thunking symbols when
building the import libraries with those DATA exports. Note: Use of the
'auto-import' extension will cause the text section of the image file
to be made writable. This does not conform to the PE-COFF format
@@ -2115,11 +2195,11 @@ specification published by Microsoft.
Using 'auto-import' generally will 'just work' -- but sometimes you may
see this message:
-"variable '<var>' can't be auto-imported. Please read the
+"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
+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
@@ -2661,7 +2741,7 @@ setting afterwards.
@item OUTPUT(@var{filename})
@kindex OUTPUT(@var{filename})
-@cindex output file name in linker scripot
+@cindex output file name in linker script
The @code{OUTPUT} command names the output file. Using
@code{OUTPUT(@var{filename})} in the linker script is exactly like using
@samp{-o @var{filename}} on the command line (@pxref{Options,,Command
@@ -3635,19 +3715,23 @@ scripts.
@cindex discarding sections
@cindex sections, discarding
@cindex removing sections
-The linker will not create output section which do not have any
-contents. This is for convenience when referring to input sections that
-may or may not be present in any of the input files. For example:
+The linker will not create output sections with no contents. This is
+for convenience when referring to input sections that may or may not
+be present in any of the input files. For example:
@smallexample
-.foo @{ *(.foo) @}
+.foo : @{ *(.foo) @}
@end smallexample
@noindent
will only create a @samp{.foo} section in the output file if there is a
-@samp{.foo} section in at least one input file.
+@samp{.foo} section in at least one input file, and if the input
+sections are not all empty. Other link script directives that allocate
+space in an output section will also create the output section.
-If you use anything other than an input section description as an output
-section command, such as a symbol assignment, then the output section
-will always be created, even if there are no matching input sections.
+The linker will ignore address assignments (@pxref{Output Section Address})
+on discarded output sections, except when the linker script defines
+symbols in the output section. In that case the linker will obey
+the address assignments, possibly advancing dot even though the
+section is discarded.
@cindex /DISCARD/
The special output section name @samp{/DISCARD/} may be used to discard
@@ -3732,15 +3816,20 @@ Every section has a virtual address (VMA) and a load address (LMA); see
an output section description sets the VMA (@pxref{Output Section
Address}).
-The linker will normally set the LMA equal to the VMA. You can change
-that by using the @code{AT} keyword. The expression @var{lma} that
-follows the @code{AT} keyword specifies the load address of the
-section.
+The expression @var{lma} that follows the @code{AT} keyword specifies
+the load address of the section.
Alternatively, with @samp{AT>@var{lma_region}} expression, you may
specify a memory region for the section's load address. @xref{MEMORY}.
Note that if the section has not had a VMA assigned to it then the
linker will use the @var{lma_region} as the VMA region as well.
+
+If neither @code{AT} nor @code{AT>} is specified for an allocatable
+section, the linker will set the LMA such that the difference between
+VMA and LMA for the section is the same as the preceding output
+section in the same region. If there is no preceding output section
+or the section is not allocatable, the linker will set the LMA equal
+to the VMA.
@xref{Output Section Region}.
@cindex ROM initialized data
@@ -3929,7 +4018,7 @@ section to refer directly to another. @xref{Miscellaneous Commands,
NOCROSSREFS}.
For each section within the @code{OVERLAY}, the linker automatically
-defines two symbols. The symbol @code{__load_start_@var{secname}} is
+provides two symbols. The symbol @code{__load_start_@var{secname}} is
defined as the starting load address of the section. The symbol
@code{__load_stop_@var{secname}} is defined as the final load address of
the section. Any characters within @var{secname} which are not legal
@@ -3954,7 +4043,7 @@ Here is an example. Remember that this would appear inside a
This will define both @samp{.text0} and @samp{.text1} to start at
address 0x1000. @samp{.text0} will be loaded at address 0x4000, and
@samp{.text1} will be loaded immediately after @samp{.text0}. The
-following symbols will be defined: @code{__load_start_text0},
+following symbols will be defined if referenced: @code{__load_start_text0},
@code{__load_stop_text0}, @code{__load_start_text1},
@code{__load_stop_text1}.
@@ -3976,11 +4065,11 @@ example could have been written identically as follows.
@smallexample
@group
.text0 0x1000 : AT (0x4000) @{ o1/*.o(.text) @}
- __load_start_text0 = LOADADDR (.text0);
- __load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0);
+ PROVIDE (__load_start_text0 = LOADADDR (.text0));
+ PROVIDE (__load_stop_text0 = LOADADDR (.text0) + SIZEOF (.text0));
.text1 0x1000 : AT (0x4000 + SIZEOF (.text0)) @{ o2/*.o(.text) @}
- __load_start_text1 = LOADADDR (.text1);
- __load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1);
+ PROVIDE (__load_start_text1 = LOADADDR (.text1));
+ PROVIDE (__load_stop_text1 = LOADADDR (.text1) + SIZEOF (.text1));
. = 0x1000 + MAX (SIZEOF (.text0), SIZEOF (.text1));
@end group
@end smallexample
@@ -4345,7 +4434,7 @@ 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
+Node name can be omitted, 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.
@@ -4554,7 +4643,9 @@ anywhere that an ordinary symbol is allowed in an expression.
@cindex holes
Assigning a value to @code{.} will cause the location counter to be
moved. This may be used to create holes in the output section. The
-location counter may never be moved backwards.
+location counter may not be moved backwards inside an output section,
+and may not be moved backwards outside of an output section if so
+doing creates areas with overlapping LMAs.
@smallexample
SECTIONS
@@ -4904,6 +4995,25 @@ of @code{ALIGN} is used to defines the value of a symbol.
The builtin function @code{NEXT} is closely related to @code{ALIGN}.
+@item ALIGNOF(@var{section})
+@kindex ALIGNOF(@var{section})
+@cindex section alignment
+Return the alignment in bytes of the named @var{section}, if that section has
+been allocated. If the section has not been allocated when this is
+evaluated, the linker will report an error. In the following example,
+the alignment of the @code{.output} section is stored as the first
+value in that section.
+@smallexample
+@group
+SECTIONS@{ @dots{}
+ .output @{
+ LONG (ALIGNOF (.output))
+ @dots{}
+ @}
+@dots{} @}
+@end group
+@end smallexample
+
@item BLOCK(@var{exp})
@kindex BLOCK(@var{exp})
This is a synonym for @code{ALIGN}, for compatibility with older linker
@@ -5128,6 +5238,9 @@ functionality are not listed.
@ifset POWERPC64
* PowerPC64 ELF64:: @command{ld} and PowerPC64 64-bit ELF Support
@end ifset
+@ifset SPU
+* SPU ELF:: @command{ld} and SPU ELF Support
+@end ifset
@ifset TICOFF
* TI COFF:: @command{ld} and TI COFF
@end ifset
@@ -5180,7 +5293,7 @@ page of memory, and changes them to use the 8 bit address form.
the top page of memory).
@item system control instructions
-@command{ld} finds all @code{ldc.w, stc.w} instrcutions which use the
+@command{ld} finds all @code{ldc.w, stc.w} instructions which use the
32 bit absolute address form, but refer to the top page of memory, and
changes them to use 16 bit address form.
(That is: the linker turns @samp{ldc.w @code{@@}@var{aa}:32,ccr} into
@@ -5314,6 +5427,13 @@ trampoline address instead of the function address. This is typically the
case when a pointer to a function is taken. The pointer will in fact
point to the function trampoline.
+@cindex PIC_VENEER
+@kindex --pic-veneer
+The @samp{--pic-veneer} switch makes the linker use PIC sequences for
+ARM/Thumb interworking veneers, even if the rest of the binary
+is not PIC. This avoids problems on uClinux targets where
+@samp{--emit-relocs} is used to generate relocatable binaries.
+
@ifclear GENERIC
@lowersections
@end ifclear
@@ -5325,7 +5445,7 @@ point to the function trampoline.
@cindex ARM interworking support
@kindex --support-old-code
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
+between ARM and Thumb code. These stubs only work with code that has
been compiled and assembled with the @samp{-mthumb-interwork} command
line option. If it is necessary to link with old ARM object files or
libraries, which have not been compiled with the -mthumb-interwork
@@ -5397,6 +5517,45 @@ each PLT entry. This should lead to such calls executing slightly faster.
This option is enabled implicitly for SymbianOS, so there is no need to
specify it if you are using that target.
+@cindex VFP11_DENORM_FIX
+@kindex --vfp11-denorm-fix
+The @samp{--vfp11-denorm-fix} switch enables a link-time workaround for a
+bug in certain VFP11 coprocessor hardware, which sometimes allows
+instructions with denorm operands (which must be handled by support code)
+to have those operands overwritten by subsequent instructions before
+the support code can read the intended values.
+
+The bug may be avoided in scalar mode if you allow at least one
+intervening instruction between a VFP11 instruction which uses a register
+and another instruction which writes to the same register, or at least two
+intervening instructions if vector mode is in use. The bug only affects
+full-compliance floating-point mode: you do not need this workaround if
+you are using "runfast" mode. Please contact ARM for further details.
+
+If you know you are using buggy VFP11 hardware, you can
+enable this workaround by specifying the linker option
+@samp{--vfp-denorm-fix=scalar} if you are using the VFP11 scalar
+mode only, or @samp{--vfp-denorm-fix=vector} if you are using
+vector mode (the latter also works for scalar code). The default is
+@samp{--vfp-denorm-fix=none}.
+
+If the workaround is enabled, instructions are scanned for
+potentially-troublesome sequences, and a veneer is created for each
+such sequence which may trigger the erratum. The veneer consists of the
+first instruction of the sequence and a branch back to the subsequent
+instruction. The original instruction is then replaced with a branch to
+the veneer. The extra cycles required to call and return from the veneer
+are sufficient to avoid the erratum in both the scalar and vector cases.
+
+@cindex NO_ENUM_SIZE_WARNING
+@kindex --no-enum-size-warning
+The @samp{--no-enum-size-warning} switch prevents the linker from
+warning when linking object files that specify incompatible EABI
+enumeration size attributes. For example, with this switch enabled,
+linking of an object file using 32-bit enumeration values with another
+using enumeration values fitted into the smallest possible space will
+not be diagnosed.
+
@ifclear GENERIC
@lowersections
@end ifclear
@@ -5550,6 +5709,14 @@ PLT, if all input files (including startup and static libraries) were
compiled with @samp{-msecure-plt}. @samp{--bss-plt} forces the old
BSS PLT (and GOT layout) which can give slightly better performance.
+@kindex --secure-plt
+@item --secure-plt
+@command{ld} will use the new PLT and GOT layout if it is linking new
+@samp{-fpic} or @samp{-fPIC} code, but does not do so automatically
+when linking non-PIC code. This option requests the new PLT and GOT
+layout. A warning will be given if some object file requires the old
+style BSS PLT.
+
@cindex PowerPC GOT
@kindex --sdata-got
@item --sdata-got
@@ -5696,6 +5863,87 @@ Use this option to turn off this feature.
@end ifclear
@end ifset
+@ifset SPU
+@ifclear GENERIC
+@raisesections
+@end ifclear
+
+@node SPU ELF
+@section @command{ld} and SPU ELF Support
+
+@cindex SPU ELF options
+@table @option
+
+@cindex SPU plugins
+@kindex --plugin
+@item --plugin
+This option marks an executable as a PIC plugin module.
+
+@cindex SPU overlays
+@kindex --no-overlays
+@item --no-overlays
+Normally, @command{ld} recognizes calls to functions within overlay
+regions, and redirects such calls to an overlay manager via a stub.
+@command{ld} also provides a built-in overlay manager. This option
+turns off all this special overlay handling.
+
+@cindex SPU overlay stub symbols
+@kindex --emit-stub-syms
+@item --emit-stub-syms
+This option causes @command{ld} to label overlay stubs with a local
+symbol that encodes the stub type and destination.
+
+@cindex SPU extra overlay stubs
+@kindex --extra-overlay-stubs
+@item --extra-overlay-stubs
+This option causes @command{ld} to add overlay call stubs on all
+function calls out of overlay regions. Normally stubs are not added
+on calls to non-overlay regions.
+
+@cindex SPU local store size
+@kindex --local-store=lo:hi
+@item --local-store=lo:hi
+@command{ld} usually checks that a final executable for SPU fits in
+the address range 0 to 256k. This option may be used to change the
+range. Disable the check entirely with @option{--local-store=0:0}.
+
+@cindex SPU
+@kindex --stack-analysis
+@item --stack-analysis
+SPU local store space is limited. Over-allocation of stack space
+unnecessarily limits space available for code and data, while
+under-allocation results in runtime failures. If given this option,
+@command{ld} will provide an estimate of maximum stack usage.
+@command{ld} does this by examining symbols in code sections to
+determine the extents of functions, and looking at function prologues
+for stack adjusting instructions. A call-graph is created by looking
+for relocations on branch instructions. The graph is then searched
+for the maximum stack usage path. Note that this analysis does not
+find calls made via function pointers, and does not handle recursion
+and other cycles in the call graph. Stack usage may be
+under-estimated if your code makes such calls. Also, stack usage for
+dynamic allocation, e.g. alloca, will not be detected. If a link map
+is requested, detailed information about each function's stack usage
+and calls will be given.
+
+@cindex SPU
+@kindex --emit-stack-syms
+@item --emit-stack-syms
+This option, if given along with @option{--stack-analysis} will result
+in @command{ld} emitting stack sizing symbols for each function.
+These take the form @code{__stack_<function_name>} for global
+functions, and @code{__stack_<number>_<function_name>} for static
+functions. @code{<number>} is the section id in hex. The value of
+such symbols is the stack requirement for the corresponding function.
+The symbol size will be zero, type @code{STT_NOTYPE}, binding
+@code{STB_LOCAL}, and section @code{SHN_ABS}.
+@end table
+
+@ifclear GENERIC
+@lowersections
+@end ifclear
+@end ifset
+
@ifset TICOFF
@ifclear GENERIC
@raisesections
@@ -5725,7 +5973,7 @@ header format depends on the default specified by the specific target.
@section @command{ld} and WIN32 (cygwin/mingw)
This section describes some of the win32 specific @command{ld} issues.
-See @ref{Options,,Command Line Options} for detailed decription of the
+See @ref{Options,,Command Line Options} for detailed description of the
command line options mentioned here.
@table @emph
@@ -5802,8 +6050,8 @@ The optional @code{LIBRARY <name>} command indicates the @emph{internal}
name of the output DLL. If @samp{<name>} does not include a suffix,
the default library suffix, @samp{.DLL} is appended.
-When the .DEF file is used to build an application. rather than a
-library, the @code{NAME <name>} command shoud be used instead of
+When the .DEF file is used to build an application, rather than a
+library, the @code{NAME <name>} command should be used instead of
@code{LIBRARY}. If @samp{<name>} does not include a suffix, the default
executable suffix, @samp{.EXE} is appended.
@@ -5897,7 +6145,7 @@ code the header must declare them as dllimport. There are a number
of idioms that are typically used to do this; often client code can
omit the __declspec() declaration completely. See
@samp{--enable-auto-import} and @samp{automatic data imports} for more
-imformation.
+information.
@end table
@cindex automatic data imports
@@ -5909,7 +6157,7 @@ issue. This increases the effort necessary to port existing Un*x
code to these platforms, especially for large
c++ libraries and applications. The auto-import feature, which was
initially provided by Paul Sokolovsky, allows one to omit the
-decorations to archieve a behavior that conforms to that on POSIX/Un*x
+decorations to achieve a behavior that conforms to that on POSIX/Un*x
platforms. This feature is enabled with the @samp{--enable-auto-import}
command-line option, although it is enabled by default on cygwin/mingw.
The @samp{--enable-auto-import} option itself now serves mainly to
@@ -5953,7 +6201,7 @@ enabled as needed.
The cygwin/mingw ports of @command{ld} support the direct linking,
including data symbols, to a dll without the usage of any import
libraries. This is much faster and uses much less memory than does the
-traditional import library method, expecially when linking large
+traditional import library method, especially when linking large
libraries or applications. When @command{ld} creates an import lib, each
function or variable exported from the dll is stored in its own bfd, even
though a single bfd could contain many exports. The overhead involved in
@@ -5972,12 +6220,13 @@ For instance, when ld is called with the argument @samp{-lxxx} it will attempt
to find, in the first directory of its search path,
@example
-libxxx.dll.a
-xxx.dll.a
-libxxx.a
+libxxx.dll.a
+xxx.dll.a
+libxxx.a
+xxx.lib
cygxxx.dll (*)
-libxxx.dll
-xxx.dll
+libxxx.dll
+xxx.dll
@end example
before moving on to the next directory in the search path.
@@ -6049,7 +6298,7 @@ even when auto-import features are exercised, and even when
@samp{--enable-runtime-pseudo-relocs} is used.
Given the improvements in speed and memory usage, one might justifiably
-wonder why import libraries are used at all. There are two reasons:
+wonder why import libraries are used at all. There are three reasons:
1. Until recently, the link-directly-to-dll functionality did @emph{not}
work with auto-imported data.
@@ -6060,9 +6309,14 @@ symbols that point to the exports of a dll). Again, the import lib
for the cygwin kernel makes use of this ability, and it is not
possible to do this without an import lib.
+3. Symbol aliases can only be resolved using an import lib. This is
+critical when linking against OS-supplied dll's (eg, the win32 API)
+in which symbols are usually exported as undecorated aliases of their
+stdcall-decorated assembly names.
+
So, import libs are not going away. But the ability to replace
true import libs with a simple symbolic link to (or a copy of)
-a dll, in most cases, is a useful addition to the suite of tools
+a dll, in many cases, is a useful addition to the suite of tools
binutils makes available to the win32 developer. Given the
massive improvements in memory requirements during linking, storage
requirements, and linking speed, we expect that many developers
@@ -6343,8 +6597,10 @@ You can find contact information for many support companies and
individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
+@ifset BUGURL
Otherwise, send bug reports for @command{ld} to
-@samp{bug-binutils@@gnu.org}.
+@value{BUGURL}.
+@end ifset
The fundamental principle of reporting bugs usefully is this:
@strong{report all the facts}. If you are not sure whether to state a
@@ -6428,7 +6684,7 @@ 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 @command{ld} is out of synch, or you have encountered a bug in the
+copy of @command{ld} is out of sync, 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
@@ -6629,8 +6885,8 @@ If you have more than one @code{SECT} statement for the same
@include fdl.texi
-@node Index
-@unnumbered Index
+@node LD Index
+@unnumbered LD Index
@printindex cp
@@ -6649,6 +6905,4 @@ If you have more than one @code{SECT} statement for the same
% Blame: doc@cygnus.com, 28mar91.
@end tex
-
-@contents
@bye
diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c
index ed9f869..4fa29de 100644
--- a/contrib/binutils/ld/ldcref.c
+++ b/contrib/binutils/ld/ldcref.c
@@ -1,6 +1,6 @@
/* ldcref.c -- output a cross reference table
- Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006
- Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006,
+ 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -23,10 +23,11 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
The table is used to generate cross reference reports. It is also
used to implement the NOCROSSREFS command in the linker script. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
+#include "demangle.h"
#include "objalloc.h"
#include "ld.h"
@@ -56,7 +57,7 @@ struct cref_ref {
struct cref_hash_entry {
struct bfd_hash_entry root;
/* The demangled name. */
- char *demangled;
+ const char *demangled;
/* References to and definitions of this symbol. */
struct cref_ref *refs;
};
@@ -106,6 +107,7 @@ static size_t cref_symcount;
add syms from an as-needed library. */
static struct bfd_hash_entry **old_table;
static unsigned int old_size;
+static unsigned int old_count;
static void *old_tab;
static void *alloc_mark;
static size_t tabsize, entsize, refsize;
@@ -238,6 +240,7 @@ handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
old_ref = (char *) old_ent + entsize;
old_table = cref_table.root.table;
old_size = cref_table.root.size;
+ old_count = cref_table.root.count;
old_symcount = cref_symcount;
for (i = 0; i < cref_table.root.size; i++)
@@ -278,6 +281,7 @@ handle_asneeded_cref (bfd *abfd ATTRIBUTE_UNUSED,
old_ref = (char *) old_ent + entsize;
cref_table.root.table = old_table;
cref_table.root.size = old_size;
+ cref_table.root.count = old_count;
memcpy (cref_table.root.table, old_tab, tabsize);
cref_symcount = old_symcount;
@@ -321,7 +325,10 @@ cref_fill_array (struct cref_hash_entry *h, void *data)
struct cref_hash_entry ***pph = data;
ASSERT (h->demangled == NULL);
- h->demangled = demangle (h->root.string);
+ h->demangled = bfd_demangle (output_bfd, h->root.string,
+ DMGL_ANSI | DMGL_PARAMS);
+ if (h->demangled == NULL)
+ h->demangled = h->root.string;
**pph = h;
@@ -707,11 +714,11 @@ check_reloc_refs (bfd *abfd, asection *sec, void *iarg)
| BSF_WEAK)) != 0))
|| (!global
&& ((*q->sym_ptr_ptr)->flags & (BSF_LOCAL
- | BSF_SECTION_SYM)) != 0))
+ | BSF_SECTION_SYM)) != 0
+ && 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)))
+ : ((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0))
{
/* 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 3de4ef1..ab881ad 100644
--- a/contrib/binutils/ld/ldctor.c
+++ b/contrib/binutils/ld/ldctor.c
@@ -1,6 +1,6 @@
/* ldctor.c -- constructor support routines
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
By Steve Chamberlain <sac@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -20,8 +20,8 @@ along with GLD; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "safe-ctype.h"
@@ -131,7 +131,7 @@ ctor_prio (const char *name)
while (*name == '_')
++name;
- if (strncmp (name, "GLOBAL_", sizeof "GLOBAL_" - 1) != 0)
+ if (! CONST_STRNEQ (name, "GLOBAL_"))
return -1;
name += sizeof "GLOBAL_" - 1;
diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c
index fad1f18..d4ed3d1 100644
--- a/contrib/binutils/ld/ldemul.c
+++ b/contrib/binutils/ld/ldemul.c
@@ -1,6 +1,6 @@
/* ldemul.c -- clearing house for ld emulation states
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2005
+ 2001, 2002, 2003, 2005, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -20,9 +20,8 @@ along with GLD; see the file COPYING. If not, write to the Free
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "config.h"
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "getopt.h"
#include "bfdlink.h"
diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c
index c9d707e..4f1d61d 100644
--- a/contrib/binutils/ld/ldexp.c
+++ b/contrib/binutils/ld/ldexp.c
@@ -1,6 +1,6 @@
/* This module handles expression trees.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -28,14 +28,15 @@
which contains a value, a section to which it is relative and a
valid bit. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "ld.h"
#include "ldmain.h"
#include "ldmisc.h"
#include "ldexp.h"
+#include "ldlex.h"
#include <ldgram.h>
#include "ldlang.h"
#include "libiberty.h"
@@ -96,9 +97,11 @@ exp_print_token (token_code_type code, int infix_p)
{ MAP, "MAP" },
{ ENTRY, "ENTRY" },
{ NEXT, "NEXT" },
+ { ALIGNOF, "ALIGNOF" },
{ SIZEOF, "SIZEOF" },
{ ADDR, "ADDR" },
{ LOADADDR, "LOADADDR" },
+ { CONSTANT, "CONSTANT" },
{ MAX_K, "MAX_K" },
{ REL, "relocatable" },
{ DATA_SEGMENT_ALIGN, "DATA_SEGMENT_ALIGN" },
@@ -149,6 +152,7 @@ exp_intop (bfd_vma value)
{
etree_type *new = stat_alloc (sizeof (new->value));
new->type.node_code = INT;
+ new->type.lineno = lineno;
new->value.value = value;
new->value.str = NULL;
new->type.node_class = etree_value;
@@ -160,6 +164,7 @@ exp_bigintop (bfd_vma value, char *str)
{
etree_type *new = stat_alloc (sizeof (new->value));
new->type.node_code = INT;
+ new->type.lineno = lineno;
new->value.value = value;
new->value.str = str;
new->type.node_class = etree_value;
@@ -173,6 +178,7 @@ exp_relop (asection *section, bfd_vma value)
{
etree_type *new = stat_alloc (sizeof (new->rel));
new->type.node_code = REL;
+ new->type.lineno = lineno;
new->type.node_class = etree_rel;
new->rel.section = section;
new->rel.value = value;
@@ -480,10 +486,11 @@ fold_name (etree_type *tree)
/* Don't find the real header size if only marking sections;
The bfd function may cache incorrect data. */
if (expld.phase != lang_mark_phase_enum)
- hdr_size = bfd_sizeof_headers (output_bfd, link_info.relocatable);
+ hdr_size = bfd_sizeof_headers (output_bfd, &link_info);
new_abs (hdr_size);
}
break;
+
case DEFINED:
if (expld.phase == lang_first_phase_enum)
lang_track_definedness (tree->name.name);
@@ -506,6 +513,7 @@ fold_name (etree_type *tree)
expld.result.valid_p = TRUE;
}
break;
+
case NAME:
if (expld.phase == lang_first_phase_enum)
;
@@ -562,7 +570,13 @@ fold_name (etree_type *tree)
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os != NULL && os->processed)
+ if (os == NULL)
+ {
+ if (expld.phase == lang_final_phase_enum)
+ einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
+ tree->name.name);
+ }
+ else if (os->processed_vma)
new_rel (0, NULL, os->bfd_section);
}
break;
@@ -573,27 +587,50 @@ fold_name (etree_type *tree)
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
- if (os != NULL && os->processed)
+ if (os == NULL)
+ {
+ if (expld.phase == lang_final_phase_enum)
+ einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
+ tree->name.name);
+ }
+ else if (os->processed_lma)
{
if (os->load_base == NULL)
- new_rel (0, NULL, os->bfd_section);
+ new_abs (os->bfd_section->lma);
else
- exp_fold_tree_1 (os->load_base);
+ {
+ exp_fold_tree_1 (os->load_base);
+ make_abs ();
+ }
}
}
break;
case SIZEOF:
+ case ALIGNOF:
if (expld.phase != lang_first_phase_enum)
{
- int opb = bfd_octets_per_byte (output_bfd);
lang_output_section_statement_type *os;
os = lang_output_section_find (tree->name.name);
if (os == NULL)
- new_abs (0);
- else if (os->processed)
- new_abs (os->bfd_section->size / opb);
+ {
+ if (expld.phase == lang_final_phase_enum)
+ einfo (_("%F%S: undefined section `%s' referenced in expression\n"),
+ tree->name.name);
+ new_abs (0);
+ }
+ else if (os->processed_vma)
+ {
+ bfd_vma val;
+
+ if (tree->type.node_code == SIZEOF)
+ val = os->bfd_section->size / bfd_octets_per_byte (output_bfd);
+ else
+ val = (bfd_vma)1 << os->bfd_section->alignment_power;
+
+ new_abs (val);
+ }
}
break;
@@ -623,6 +660,16 @@ fold_name (etree_type *tree)
}
break;
+ case CONSTANT:
+ if (strcmp (tree->name.name, "MAXPAGESIZE") == 0)
+ new_abs (bfd_emul_get_maxpagesize (default_target));
+ else if (strcmp (tree->name.name, "COMMONPAGESIZE") == 0)
+ new_abs (bfd_emul_get_commonpagesize (default_target));
+ else
+ einfo (_("%F%S: unknown constant `%s' referenced in expression\n"),
+ tree->name.name);
+ break;
+
default:
FAIL ();
break;
@@ -796,6 +843,7 @@ exp_binop (int code, etree_type *lhs, etree_type *rhs)
etree_type value, *new;
value.type.node_code = code;
+ value.type.lineno = lhs->type.lineno;
value.binary.lhs = lhs;
value.binary.rhs = rhs;
value.type.node_class = etree_binary;
@@ -814,6 +862,7 @@ exp_trinop (int code, etree_type *cond, etree_type *lhs, etree_type *rhs)
etree_type value, *new;
value.type.node_code = code;
+ value.type.lineno = lhs->type.lineno;
value.trinary.lhs = lhs;
value.trinary.cond = cond;
value.trinary.rhs = rhs;
@@ -833,6 +882,7 @@ exp_unop (int code, etree_type *child)
etree_type value, *new;
value.unary.type.node_code = code;
+ value.unary.type.lineno = child->type.lineno;
value.unary.child = child;
value.unary.type.node_class = etree_unary;
exp_fold_tree_no_dot (&value);
@@ -850,6 +900,7 @@ exp_nameop (int code, const char *name)
etree_type value, *new;
value.name.type.node_code = code;
+ value.name.type.lineno = lineno;
value.name.name = name;
value.name.type.node_class = etree_name;
@@ -870,6 +921,7 @@ exp_assop (int code, const char *dst, etree_type *src)
new = stat_alloc (sizeof (new->assign));
new->type.node_code = code;
+ new->type.lineno = src->type.lineno;
new->type.node_class = etree_assign;
new->assign.src = src;
new->assign.dst = dst;
@@ -885,6 +937,7 @@ exp_provide (const char *dst, etree_type *src, bfd_boolean hidden)
n = stat_alloc (sizeof (n->assign));
n->assign.type.node_code = '=';
+ n->assign.type.lineno = src->type.lineno;
n->assign.type.node_class = etree_provide;
n->assign.src = src;
n->assign.dst = dst;
@@ -901,6 +954,7 @@ exp_assert (etree_type *exp, const char *message)
n = stat_alloc (sizeof (n->assert_s));
n->assert_s.type.node_code = '!';
+ n->assert_s.type.lineno = exp->type.lineno;
n->assert_s.type.node_class = etree_assert;
n->assert_s.child = exp;
n->assert_s.message = message;
@@ -1079,7 +1133,10 @@ exp_get_abs_int (etree_type *tree, int def, char *name)
return expld.result.value;
}
else if (name != NULL && expld.phase != lang_mark_phase_enum)
- einfo (_("%F%S non constant expression for %s\n"), name);
+ {
+ lineno = tree->type.lineno;
+ einfo (_("%F%S: nonconstant expression for %s\n"), name);
+ }
}
return def;
}
diff --git a/contrib/binutils/ld/ldexp.h b/contrib/binutils/ld/ldexp.h
index fed3a0d..3534188 100644
--- a/contrib/binutils/ld/ldexp.h
+++ b/contrib/binutils/ld/ldexp.h
@@ -32,6 +32,7 @@ typedef struct {
typedef struct {
int node_code;
+ unsigned int lineno;
enum {
etree_binary,
etree_trinary,
diff --git a/contrib/binutils/ld/ldfile.c b/contrib/binutils/ld/ldfile.c
index 69d8fd9..9781aac 100644
--- a/contrib/binutils/ld/ldfile.c
+++ b/contrib/binutils/ld/ldfile.c
@@ -1,6 +1,6 @@
/* Linker file opening and searching.
Copyright 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -21,8 +21,8 @@
/* ldfile.c: look after all the file stuff. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "safe-ctype.h"
#include "ld.h"
@@ -252,8 +252,10 @@ ldfile_try_open_bfd (const char *attempt,
yyin = NULL;
if (skip)
{
- einfo (_("%P: skipping incompatible %s when searching for %s\n"),
- attempt, entry->local_sym_name);
+ if (command_line.warn_search_mismatch)
+ einfo (_("%P: skipping incompatible %s "
+ "when searching for %s\n"),
+ attempt, entry->local_sym_name);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
return FALSE;
@@ -279,8 +281,10 @@ ldfile_try_open_bfd (const char *attempt,
&& bfd_get_flavour (output_bfd) == bfd_target_xcoff_flavour
&& bfd_check_format (entry->the_bfd, bfd_archive)))
{
- einfo (_("%P: skipping incompatible %s when searching for %s\n"),
- attempt, entry->local_sym_name);
+ if (command_line.warn_search_mismatch)
+ einfo (_("%P: skipping incompatible %s "
+ "when searching for %s\n"),
+ attempt, entry->local_sym_name);
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
return FALSE;
diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y
index 3829e6a..c6f268b 100644
--- a/contrib/binutils/ld/ldgram.y
+++ b/contrib/binutils/ld/ldgram.y
@@ -1,6 +1,6 @@
/* A YACC grammar to parse a superset of the AT&T linker scripting language.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support (steve@cygnus.com).
This file is part of GNU ld.
@@ -26,8 +26,8 @@
#define DONTDECLARE_MALLOC
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "ld.h"
#include "ldexp.h"
@@ -131,14 +131,13 @@ static int error_index;
%token '{' '}'
%token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
%token INHIBIT_COMMON_ALLOCATION
-%token SIZEOF_HEADERS
%token SEGMENT_START
%token INCLUDE
-%token MEMORY DEFSYMEND
+%token MEMORY
%token NOLOAD DSECT COPY INFO OVERLAY
-%token NAME LNAME DEFINED TARGET_K SEARCH_DIR MAP ENTRY
+%token DEFINED TARGET_K SEARCH_DIR MAP ENTRY
%token <integer> NEXT
-%token SIZEOF ADDR LOADADDR MAX_K MIN_K
+%token SIZEOF ALIGNOF ADDR LOADADDR MAX_K MIN_K
%token STARTUP HLL SYSLIB FLOAT NOFLOAT NOCROSSREFS
%token ORIGIN FILL
%token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS
@@ -152,9 +151,11 @@ static int error_index;
%token GLOBAL LOCAL VERSIONK INPUT_VERSION_SCRIPT
%token KEEP ONLY_IF_RO ONLY_IF_RW SPECIAL
%token EXCLUDE_FILE
+%token CONSTANT
%type <versyms> vers_defns
%type <versnode> vers_tag
%type <deflist> verdep
+%token INPUT_DYNAMIC_LIST
%%
@@ -162,6 +163,7 @@ file:
INPUT_SCRIPT script_file
| INPUT_MRI_SCRIPT mri_script_file
| INPUT_VERSION_SCRIPT version_script_file
+ | INPUT_DYNAMIC_LIST dynamic_list_file
| INPUT_DEFSYM defsym_expr
;
@@ -278,33 +280,33 @@ casesymlist:
| casesymlist ',' NAME
;
+/* Parsed as expressions so that commas separate entries */
extern_name_list:
+ { ldlex_expression (); }
+ extern_name_list_body
+ { ldlex_popstate (); }
+
+extern_name_list_body:
NAME
{ ldlang_add_undef ($1); }
- | extern_name_list NAME
+ | extern_name_list_body NAME
{ ldlang_add_undef ($2); }
- | extern_name_list ',' NAME
+ | extern_name_list_body ',' NAME
{ ldlang_add_undef ($3); }
;
script_file:
- {
- ldlex_both();
- }
- ifile_list
- {
- ldlex_popstate();
- }
+ { ldlex_both(); }
+ ifile_list
+ { ldlex_popstate(); }
;
-
ifile_list:
- ifile_list ifile_p1
+ ifile_list ifile_p1
|
;
-
ifile_p1:
memory
| sections
@@ -571,6 +573,9 @@ statement:
{
lang_add_fill ($3);
}
+ | ASSERT_K {ldlex_expression ();} '(' exp ',' NAME ')' end
+ { ldlex_popstate ();
+ lang_add_assignment (exp_assert ($4, $6)); }
;
statement_list:
@@ -835,12 +840,16 @@ exp :
| SIZEOF_HEADERS
{ $$ = exp_nameop (SIZEOF_HEADERS,0); }
+ | ALIGNOF '(' NAME ')'
+ { $$ = exp_nameop (ALIGNOF,$3); }
| SIZEOF '(' NAME ')'
{ $$ = exp_nameop (SIZEOF,$3); }
| ADDR '(' NAME ')'
{ $$ = exp_nameop (ADDR,$3); }
| LOADADDR '(' NAME ')'
{ $$ = exp_nameop (LOADADDR,$3); }
+ | CONSTANT '(' NAME ')'
+ { $$ = exp_nameop (CONSTANT,$3); }
| ABSOLUTE '(' exp ')'
{ $$ = exp_unop (ABSOLUTE, $3); }
| ALIGN_K '(' exp ')'
@@ -960,10 +969,10 @@ section: NAME { ldlex_expression(); }
type:
NOLOAD { sectype = noload_section; }
- | DSECT { sectype = dsect_section; }
- | COPY { sectype = copy_section; }
- | INFO { sectype = info_section; }
- | OVERLAY { sectype = overlay_section; }
+ | DSECT { sectype = noalloc_section; }
+ | COPY { sectype = noalloc_section; }
+ | INFO { sectype = noalloc_section; }
+ | OVERLAY { sectype = noalloc_section; }
;
atype:
@@ -1136,6 +1145,34 @@ phdr_val:
}
;
+dynamic_list_file:
+ {
+ ldlex_version_file ();
+ PUSH_ERROR (_("dynamic list"));
+ }
+ dynamic_list_nodes
+ {
+ ldlex_popstate ();
+ POP_ERROR ();
+ }
+ ;
+
+dynamic_list_nodes:
+ dynamic_list_node
+ | dynamic_list_nodes dynamic_list_node
+ ;
+
+dynamic_list_node:
+ '{' dynamic_list_tag '}' ';'
+ ;
+
+dynamic_list_tag:
+ vers_defns ';'
+ {
+ lang_append_dynamic_list ($1);
+ }
+ ;
+
/* This syntax is used within an external version script file. */
version_script_file:
diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo
index dc6e9a6..85d736b 100644
--- a/contrib/binutils/ld/ldint.texinfo
+++ b/contrib/binutils/ld/ldint.texinfo
@@ -1,6 +1,7 @@
\input texinfo
@setfilename ldint.info
-@c Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003
+@c Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+@c 2003, 2007
@c Free Software Foundation, Inc.
@ifinfo
@@ -11,28 +12,31 @@ END-INFO-DIR-ENTRY
@end format
@end ifinfo
-@ifinfo
+@copying
This file documents the internals of the GNU linker ld.
-Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+Copyright @copyright{} 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2007
Free Software Foundation, Inc.
Contributed by Cygnus Support.
- 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 the
+Invariant Sections being ``GNU General Public License'' and ``Funding
+Free Software'', the Front-Cover texts being (a) (see below), and with
+the Back-Cover Texts being (b) (see below). 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 copying permission
-notice identical to this one except for the removal of this paragraph
-(this paragraph not being relevant to the printed manual).
+(a) The FSF's Front-Cover Text is:
-@end ignore
-@end ifinfo
+ A GNU Manual
+
+(b) The FSF's Back-Cover Text is:
+
+ You have freedom to copy and modify this GNU Manual, like GNU
+ software. Copies published by the Free Software Foundation raise
+ funds for GNU development.
+@end copying
@iftex
@finalout
@@ -179,10 +183,10 @@ as well as some conventional shell variables interpreted by the
@item SCRIPT_NAME
This is the name of the @file{scripttempl} script to use. If
@code{SCRIPT_NAME} is set to @var{script}, @file{genscripts.sh} will use
-the script @file{scriptteml/@var{script}.sc}.
+the script @file{scripttempl/@var{script}.sc}.
@item TEMPLATE_NAME
-This is the name of the @file{emultemlp} script to use. If
+This is the name of the @file{emultempl} script to use. If
@code{TEMPLATE_NAME} is set to @var{template}, @file{genscripts.sh} will
use the script @file{emultempl/@var{template}.em}. If this variable is
not set, the default value is @samp{generic}.
@@ -290,7 +294,7 @@ option. The output has an extension of
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.
+@code{GENERATE_SHLIB_SCRIPT} is defined in the @file{emulparams} 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}.
@@ -644,7 +648,7 @@ 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
+I.e., whenever client contains something like
@code{mov dll_var,%eax,}
@@ -653,7 +657,7 @@ 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
+parallel 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.
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
index 2d04ae4..5c26974 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, 2002, 2003, 2004, 2005, 2006
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -20,8 +20,8 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "libiberty.h"
#include "safe-ctype.h"
#include "obstack.h"
@@ -52,7 +52,6 @@ static struct obstack map_obstack;
#define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free
static const char *startup_file;
-static lang_statement_list_type input_file_chain;
static bfd_boolean placed_commons = FALSE;
static bfd_boolean stripped_excluded_sections = FALSE;
static lang_output_section_statement_type *default_common_section;
@@ -62,19 +61,15 @@ static lang_input_statement_type *first_file;
static const char *current_target;
static const char *output_target;
static lang_statement_list_type statement_list;
-static struct lang_phdr *lang_phdr_list;
static struct bfd_hash_table lang_definedness_table;
/* Forward declarations. */
static void exp_init_os (etree_type *);
static void init_map_userdata (bfd *, asection *, void *);
static lang_input_statement_type *lookup_name (const char *);
-static bfd_boolean load_symbols (lang_input_statement_type *,
- lang_statement_list_type *);
static struct bfd_hash_entry *lang_definedness_newfunc
(struct bfd_hash_entry *, struct bfd_hash_table *, const char *);
static void insert_undefined (const char *);
-static void print_all_symbols (asection *);
static bfd_boolean sort_def_symbol (struct bfd_link_hash_entry *, void *);
static void print_statement (lang_statement_union_type *,
lang_output_section_statement_type *);
@@ -85,12 +80,15 @@ static void print_input_section (asection *);
static bfd_boolean lang_one_common (struct bfd_link_hash_entry *, void *);
static void lang_record_phdrs (void);
static void lang_do_version_exports_section (void);
+static void lang_finalize_version_expr_head
+ (struct bfd_elf_version_expr_head *);
/* Exported variables. */
lang_output_section_statement_type *abs_output_section;
lang_statement_list_type lang_output_section_statement;
lang_statement_list_type *stat_ptr = &statement_list;
lang_statement_list_type file_chain = { NULL, NULL };
+lang_statement_list_type input_file_chain;
struct bfd_sym_chain entry_symbol = { NULL, NULL };
static const char *entry_symbol_default = "start";
const char *entry_section = ".text";
@@ -99,6 +97,7 @@ bfd_boolean lang_has_input_file = FALSE;
bfd_boolean had_output_filename = FALSE;
bfd_boolean lang_float_flag = FALSE;
bfd_boolean delete_output_file_on_failure = FALSE;
+struct lang_phdr *lang_phdr_list;
struct lang_nocrossrefs *nocrossref_list;
static struct unique_sections *unique_section_list;
static bfd_boolean ldlang_sysrooted_script = FALSE;
@@ -280,7 +279,7 @@ find_section (lang_input_statement_type *file,
{
section_iterator_callback_data cb_data = { NULL, FALSE };
- bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
+ bfd_get_section_by_name_if (file->the_bfd, sec->spec.name,
section_iterator_callback, &cb_data);
*multiple_sections_found = cb_data.multiple_sections_found;
return cb_data.found_section;
@@ -317,6 +316,124 @@ match_simple_wild (const char *pattern, const char *name)
return TRUE;
}
+/* Compare sections ASEC and BSEC according to SORT. */
+
+static int
+compare_section (sort_type sort, asection *asec, asection *bsec)
+{
+ int ret;
+
+ switch (sort)
+ {
+ default:
+ abort ();
+
+ case by_alignment_name:
+ ret = (bfd_section_alignment (bsec->owner, bsec)
+ - bfd_section_alignment (asec->owner, asec));
+ if (ret)
+ break;
+ /* Fall through. */
+
+ case by_name:
+ ret = strcmp (bfd_get_section_name (asec->owner, asec),
+ bfd_get_section_name (bsec->owner, bsec));
+ break;
+
+ case by_name_alignment:
+ ret = strcmp (bfd_get_section_name (asec->owner, asec),
+ bfd_get_section_name (bsec->owner, bsec));
+ if (ret)
+ break;
+ /* Fall through. */
+
+ case by_alignment:
+ ret = (bfd_section_alignment (bsec->owner, bsec)
+ - bfd_section_alignment (asec->owner, asec));
+ break;
+ }
+
+ return ret;
+}
+
+/* Build a Binary Search Tree to sort sections, unlike insertion sort
+ used in wild_sort(). BST is considerably faster if the number of
+ of sections are large. */
+
+static lang_section_bst_type **
+wild_sort_fast (lang_wild_statement_type *wild,
+ struct wildcard_list *sec,
+ lang_input_statement_type *file ATTRIBUTE_UNUSED,
+ asection *section)
+{
+ lang_section_bst_type **tree;
+
+ tree = &wild->tree;
+ if (!wild->filenames_sorted
+ && (sec == NULL || sec->spec.sorted == none))
+ {
+ /* Append at the right end of tree. */
+ while (*tree)
+ tree = &((*tree)->right);
+ return tree;
+ }
+
+ while (*tree)
+ {
+ /* Find the correct node to append this section. */
+ if (compare_section (sec->spec.sorted, section, (*tree)->section) < 0)
+ tree = &((*tree)->left);
+ else
+ tree = &((*tree)->right);
+ }
+
+ return tree;
+}
+
+/* Use wild_sort_fast to build a BST to sort sections. */
+
+static void
+output_section_callback_fast (lang_wild_statement_type *ptr,
+ struct wildcard_list *sec,
+ asection *section,
+ lang_input_statement_type *file,
+ void *output ATTRIBUTE_UNUSED)
+{
+ lang_section_bst_type *node;
+ lang_section_bst_type **tree;
+
+ if (unique_section_p (section))
+ return;
+
+ node = xmalloc (sizeof (lang_section_bst_type));
+ node->left = 0;
+ node->right = 0;
+ node->section = section;
+
+ tree = wild_sort_fast (ptr, sec, file, section);
+ if (tree != NULL)
+ *tree = node;
+}
+
+/* Convert a sorted sections' BST back to list form. */
+
+static void
+output_section_callback_tree_to_list (lang_wild_statement_type *ptr,
+ lang_section_bst_type *tree,
+ void *output)
+{
+ if (tree->left)
+ output_section_callback_tree_to_list (ptr, tree->left, output);
+
+ lang_add_section (&ptr->children, tree->section,
+ (lang_output_section_statement_type *) output);
+
+ if (tree->right)
+ output_section_callback_tree_to_list (ptr, tree->right, output);
+
+ free (tree);
+}
+
/* Specialized, optimized routines for handling different kinds of
wildcards */
@@ -544,6 +661,11 @@ analyze_walk_wild_section_handler (lang_wild_statement_type *ptr)
int data_counter;
ptr->walk_wild_section_handler = walk_wild_section_general;
+ ptr->handler_data[0] = NULL;
+ ptr->handler_data[1] = NULL;
+ ptr->handler_data[2] = NULL;
+ ptr->handler_data[3] = NULL;
+ ptr->tree = NULL;
/* Count how many wildcard_specs there are, and how many of those
actually use wildcards in the name. Also, bail out if any of the
@@ -669,7 +791,7 @@ walk_wild (lang_wild_statement_type *s, callback_t callback, void *data)
{
LANG_FOR_EACH_INPUT_STATEMENT (f)
{
- if (fnmatch (file_spec, f->filename, FNM_FILE_NAME) == 0)
+ if (fnmatch (file_spec, f->filename, 0) == 0)
walk_wild_file (s, f, callback, data);
}
}
@@ -791,6 +913,14 @@ new_afile (const char *name,
lang_has_input_file = TRUE;
p->target = target;
p->sysrooted = FALSE;
+
+ if (file_type == lang_input_file_is_l_enum
+ && name[0] == ':' && name[1] != '\0')
+ {
+ file_type = lang_input_file_is_search_file_enum;
+ name = name + 1;
+ }
+
switch (file_type)
{
case lang_input_file_is_symbols_only_enum:
@@ -866,7 +996,6 @@ lang_add_input_file (const char *name,
lang_input_file_enum_type file_type,
const char *target)
{
- lang_has_input_file = TRUE;
return new_afile (name, file_type, target, TRUE);
}
@@ -884,7 +1013,7 @@ static struct bfd_hash_table output_section_statement_table;
initialize the table, fill in an entry and remove the table. */
static struct bfd_hash_entry *
-output_section_statement_newfunc (struct bfd_hash_entry *entry,
+output_section_statement_newfunc (struct bfd_hash_entry *entry,
struct bfd_hash_table *table,
const char *string)
{
@@ -1034,16 +1163,17 @@ lang_memory_region_lookup (const char *const name, bfd_boolean create)
new->name = xstrdup (name);
new->next = NULL;
-
- *lang_memory_region_list_tail = new;
- lang_memory_region_list_tail = &new->next;
new->origin = 0;
- new->flags = 0;
- new->not_flags = 0;
new->length = ~(bfd_size_type) 0;
new->current = 0;
+ new->last_os = NULL;
+ new->flags = 0;
+ new->not_flags = 0;
new->had_full_message = FALSE;
+ *lang_memory_region_list_tail = new;
+ lang_memory_region_list_tail = &new->next;
+
return new;
}
@@ -1332,7 +1462,6 @@ lang_insert_orphan (asection *s,
lang_statement_list_type *old;
lang_statement_list_type add;
const char *ps;
- etree_type *load_base;
lang_output_section_statement_type *os;
lang_output_section_statement_type **os_tail;
@@ -1352,20 +1481,10 @@ lang_insert_orphan (asection *s,
if (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
address = exp_intop (0);
- load_base = NULL;
- if (after != NULL && after->load_base != NULL)
- {
- etree_type *lma_from_vma;
- lma_from_vma = exp_binop ('-', after->load_base,
- exp_nameop (ADDR, after->name));
- load_base = exp_binop ('+', lma_from_vma,
- exp_nameop (ADDR, secname));
- }
-
os_tail = ((lang_output_section_statement_type **)
lang_output_section_statement.tail);
os = lang_enter_output_section_statement (secname, address, 0, NULL, NULL,
- load_base, 0);
+ NULL, 0);
ps = NULL;
if (config.build_constructors && *os_tail == os)
@@ -1386,8 +1505,10 @@ lang_insert_orphan (asection *s,
e_align = exp_unop (ALIGN_K,
exp_intop ((bfd_vma) 1 << s->alignment_power));
lang_add_assignment (exp_assop ('=', ".", e_align));
- lang_add_assignment (exp_assop ('=', symname,
- exp_nameop (NAME, ".")));
+ lang_add_assignment (exp_provide (symname,
+ exp_unop (ABSOLUTE,
+ exp_nameop (NAME, ".")),
+ FALSE));
}
}
@@ -1397,7 +1518,7 @@ lang_insert_orphan (asection *s,
lang_leave_output_section_statement (0, "*default*", NULL, NULL);
- if (config.build_constructors && *ps == '\0')
+ if (ps != NULL && *ps == '\0')
{
char *symname;
@@ -1409,8 +1530,9 @@ lang_insert_orphan (asection *s,
symname = (char *) xmalloc (ps - secname + sizeof "__stop_" + 1);
symname[0] = bfd_get_symbol_leading_char (output_bfd);
sprintf (symname + (symname[0] != 0), "__stop_%s", secname);
- lang_add_assignment (exp_assop ('=', symname,
- exp_nameop (NAME, ".")));
+ lang_add_assignment (exp_provide (symname,
+ exp_nameop (NAME, "."),
+ FALSE));
}
/* Restore the global list pointer. */
@@ -1446,7 +1568,18 @@ lang_insert_orphan (asection *s,
place->section = &output_bfd->sections;
as = *place->section;
- if (as != snew && as->prev != snew)
+
+ if (!as)
+ {
+ /* Put the section at the end of the list. */
+
+ /* Unlink the section. */
+ bfd_section_list_remove (output_bfd, snew);
+
+ /* Now tack it back on in the right place. */
+ bfd_section_list_append (output_bfd, snew);
+ }
+ else if (as != snew && as->prev != snew)
{
/* Unlink the section. */
bfd_section_list_remove (output_bfd, snew);
@@ -1613,8 +1746,9 @@ lang_map (void)
continue;
for (s = file->the_bfd->sections; s != NULL; s = s->next)
- if (s->output_section == NULL
- || s->output_section->owner != output_bfd)
+ if ((s->output_section == NULL
+ || s->output_section->owner != output_bfd)
+ && (s->flags & (SEC_LINKER_CREATED | SEC_KEEP)) == 0)
{
if (! dis_header_printed)
{
@@ -1670,7 +1804,7 @@ lang_map (void)
fprintf (config.map_file, _("\nLinker script and memory map\n\n"));
- if (! command_line.reduce_memory_overheads)
+ if (! link_info.reduce_memory_overheads)
{
obstack_begin (&map_obstack, 1000);
for (p = link_info.input_bfds; p != (bfd *) NULL; p = p->link_next)
@@ -1728,7 +1862,8 @@ sort_def_symbol (hash_entry, info)
/* Initialize an output section. */
static void
-init_os (lang_output_section_statement_type *s, asection *isec)
+init_os (lang_output_section_statement_type *s, asection *isec,
+ flagword flags)
{
if (s->bfd_section != NULL)
return;
@@ -1738,7 +1873,8 @@ init_os (lang_output_section_statement_type *s, asection *isec)
s->bfd_section = bfd_get_section_by_name (output_bfd, s->name);
if (s->bfd_section == NULL)
- s->bfd_section = bfd_make_section (output_bfd, s->name);
+ s->bfd_section = bfd_make_section_with_flags (output_bfd, s->name,
+ flags);
if (s->bfd_section == NULL)
{
einfo (_("%P%F: output format %s cannot represent section called %s\n"),
@@ -1746,7 +1882,8 @@ init_os (lang_output_section_statement_type *s, asection *isec)
}
s->bfd_section->output_section = s->bfd_section;
s->bfd_section->output_offset = 0;
- if (!command_line.reduce_memory_overheads)
+
+ if (!link_info.reduce_memory_overheads)
{
fat_section_userdata_type *new
= stat_alloc (sizeof (fat_section_userdata_type));
@@ -1754,7 +1891,6 @@ init_os (lang_output_section_statement_type *s, asection *isec)
get_userdata (s->bfd_section) = new;
}
-
/* If there is a base address, make sure that any sections it might
mention are initialized. */
if (s->addr_tree != NULL)
@@ -1816,7 +1952,7 @@ exp_init_os (etree_type *exp)
os = lang_output_section_find (exp->name.name);
if (os != NULL && os->bfd_section == NULL)
- init_os (os, NULL);
+ init_os (os, NULL, 0);
}
}
break;
@@ -1840,7 +1976,7 @@ section_already_linked (bfd *abfd, asection *sec, void *data)
}
if (!(abfd->flags & DYNAMIC))
- bfd_section_already_linked (abfd, sec);
+ bfd_section_already_linked (abfd, sec, &link_info);
}
/* The wild routines.
@@ -1891,8 +2027,33 @@ lang_add_section (lang_statement_list_type *ptr,
lang_input_section_type *new;
flagword flags;
+ flags = section->flags;
+
+ /* We don't copy the SEC_NEVER_LOAD flag from an input section
+ to an output section, because we want to be able to include a
+ SEC_NEVER_LOAD section in the middle of an otherwise loaded
+ section (I don't know why we want to do this, but we do).
+ build_link_order in ldwrite.c handles this case by turning
+ the embedded SEC_NEVER_LOAD section into a fill. */
+
+ flags &= ~ SEC_NEVER_LOAD;
+
+ switch (output->sectype)
+ {
+ case normal_section:
+ case overlay_section:
+ break;
+ case noalloc_section:
+ flags &= ~SEC_ALLOC;
+ break;
+ case noload_section:
+ flags &= ~SEC_LOAD;
+ flags |= SEC_NEVER_LOAD;
+ break;
+ }
+
if (output->bfd_section == NULL)
- init_os (output, section);
+ init_os (output, section, flags);
first = ! output->bfd_section->linker_has_input;
output->bfd_section->linker_has_input = 1;
@@ -1916,17 +2077,6 @@ lang_add_section (lang_statement_list_type *ptr,
new->section = section;
section->output_section = output->bfd_section;
- flags = section->flags;
-
- /* We don't copy the SEC_NEVER_LOAD flag from an input section
- to an output section, because we want to be able to include a
- SEC_NEVER_LOAD section in the middle of an otherwise loaded
- section (I don't know why we want to do this, but we do).
- build_link_order in ldwrite.c handles this case by turning
- the embedded SEC_NEVER_LOAD section into a fill. */
-
- flags &= ~ SEC_NEVER_LOAD;
-
/* If final link, don't copy the SEC_LINK_ONCE flags, they've
already been processed. One reason to do this is that on pe
format targets, .text$foo sections go into .text and it's odd
@@ -1963,22 +2113,6 @@ lang_add_section (lang_statement_list_type *ptr,
if ((section->flags & SEC_READONLY) == 0)
output->bfd_section->flags &= ~SEC_READONLY;
- switch (output->sectype)
- {
- case normal_section:
- break;
- case dsect_section:
- case copy_section:
- case info_section:
- case overlay_section:
- output->bfd_section->flags &= ~SEC_ALLOC;
- break;
- case noload_section:
- output->bfd_section->flags &= ~SEC_LOAD;
- output->bfd_section->flags |= SEC_NEVER_LOAD;
- break;
- }
-
/* Copy over SEC_SMALL_DATA. */
if (section->flags & SEC_SMALL_DATA)
output->bfd_section->flags |= SEC_SMALL_DATA;
@@ -1996,46 +2130,6 @@ lang_add_section (lang_statement_list_type *ptr,
}
}
-/* Compare sections ASEC and BSEC according to SORT. */
-
-static int
-compare_section (sort_type sort, asection *asec, asection *bsec)
-{
- int ret;
-
- switch (sort)
- {
- default:
- abort ();
-
- case by_alignment_name:
- ret = (bfd_section_alignment (bsec->owner, bsec)
- - bfd_section_alignment (asec->owner, asec));
- if (ret)
- break;
- /* Fall through. */
-
- case by_name:
- ret = strcmp (bfd_get_section_name (asec->owner, asec),
- bfd_get_section_name (bsec->owner, bsec));
- break;
-
- case by_name_alignment:
- ret = strcmp (bfd_get_section_name (asec->owner, asec),
- bfd_get_section_name (bsec->owner, bsec));
- if (ret)
- break;
- /* Fall through. */
-
- case by_alignment:
- ret = (bfd_section_alignment (bsec->owner, bsec)
- - bfd_section_alignment (asec->owner, asec));
- break;
- }
-
- return ret;
-}
-
/* Handle wildcard sorting. This returns the lang_input_section which
should follow the one we are going to create for SECTION and FILE,
based on the sorting requirements of WILD. It returns NULL if the
@@ -2218,12 +2312,9 @@ lookup_name (const char *name)
/* Use the local_sym_name as the name of the file that has
already been loaded as filename might have been transformed
via the search directory lookup mechanism. */
- const char * filename = search->local_sym_name;
+ const char *filename = search->local_sym_name;
- if (filename == NULL && name == NULL)
- return search;
if (filename != NULL
- && name != NULL
&& strcmp (filename, name) == 0)
break;
}
@@ -2233,11 +2324,8 @@ lookup_name (const char *name)
default_target, FALSE);
/* If we have already added this file, or this file is not real
- (FIXME: can that ever actually happen?) or the name is NULL
- (FIXME: can that ever actually happen?) don't add this file. */
- if (search->loaded
- || ! search->real
- || search->filename == NULL)
+ don't add this file. */
+ if (search->loaded || !search->real)
return search;
if (! load_symbols (search, NULL))
@@ -2273,7 +2361,7 @@ add_excluded_libs (const char *list)
entry->name[end - p] = '\0';
excluded_libs = entry;
if (*end == '\0')
- break;
+ break;
p = end + 1;
}
}
@@ -2309,7 +2397,7 @@ check_excluded_libs (bfd *abfd)
/* Get the symbols for an input file. */
-static bfd_boolean
+bfd_boolean
load_symbols (lang_input_statement_type *entry,
lang_statement_list_type *place)
{
@@ -2460,19 +2548,33 @@ wild (lang_wild_statement_type *s,
{
struct wildcard_list *sec;
- walk_wild (s, output_section_callback, output);
-
- for (sec = s->section_list; sec != NULL; sec = sec->next)
+ if (s->handler_data[0]
+ && s->handler_data[0]->spec.sorted == by_name
+ && !s->filenames_sorted)
{
- if (default_common_section != NULL)
- break;
+ lang_section_bst_type *tree;
+
+ walk_wild (s, output_section_callback_fast, output);
+
+ tree = s->tree;
+ if (tree)
+ {
+ output_section_callback_tree_to_list (s, tree, output);
+ s->tree = NULL;
+ }
+ }
+ else
+ walk_wild (s, output_section_callback, output);
+
+ if (default_common_section == NULL)
+ for (sec = s->section_list; sec != NULL; sec = sec->next)
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;
+ break;
}
- }
}
/* Return TRUE iff target is the sought target. */
@@ -3061,7 +3163,8 @@ update_wild_statements (lang_statement_union_type *s)
case lang_wild_statement_enum:
sec = s->wild_statement.section_list;
- if (sec != NULL)
+ for (sec = s->wild_statement.section_list; sec != NULL;
+ sec = sec->next)
{
switch (sec->spec.sorted)
{
@@ -3107,6 +3210,8 @@ map_input_to_output_sections
(lang_statement_union_type *s, const char *target,
lang_output_section_statement_type *os)
{
+ flagword flags;
+
for (; s != NULL; s = s->header.next)
{
switch (s->header.type)
@@ -3156,26 +3261,29 @@ map_input_to_output_sections
/* Make sure that any sections mentioned in the expression
are initialized. */
exp_init_os (s->data_statement.exp);
- if (os != NULL && os->bfd_section == NULL)
- init_os (os, NULL);
+ flags = SEC_HAS_CONTENTS;
/* The output section gets contents, and then we inspect for
any flags set in the input script which override any ALLOC. */
- os->bfd_section->flags |= SEC_HAS_CONTENTS;
if (!(os->flags & SEC_NEVER_LOAD))
- os->bfd_section->flags |= SEC_ALLOC | SEC_LOAD;
+ flags |= SEC_ALLOC | SEC_LOAD;
+ if (os->bfd_section == NULL)
+ init_os (os, NULL, flags);
+ else
+ os->bfd_section->flags |= flags;
break;
- case lang_fill_statement_enum:
case lang_input_section_enum:
+ break;
+ case lang_fill_statement_enum:
case lang_object_symbols_statement_enum:
case lang_reloc_statement_enum:
case lang_padding_statement_enum:
case lang_input_statement_enum:
if (os != NULL && os->bfd_section == NULL)
- init_os (os, NULL);
+ init_os (os, NULL, 0);
break;
case lang_assignment_statement_enum:
if (os != NULL && os->bfd_section == NULL)
- init_os (os, NULL);
+ init_os (os, NULL, 0);
/* Make sure that any sections mentioned in the assignment
are initialized. */
@@ -3185,7 +3293,7 @@ map_input_to_output_sections
FAIL ();
break;
case lang_address_statement_enum:
- /* Mark the specified section with the supplied address.
+ /* Mark the specified section with the supplied address.
If this section was actually a segment marker, then the
directive is ignored if the linker script explicitly
@@ -3195,15 +3303,15 @@ map_input_to_output_sections
section directive semantics for backwards compatibilty;
linker scripts that do not specifically check for
SEGMENT_START automatically get the old semantics. */
- if (!s->address_statement.segment
+ if (!s->address_statement.segment
|| !s->address_statement.segment->used)
{
lang_output_section_statement_type *aos
= (lang_output_section_statement_lookup
(s->address_statement.section_name));
-
+
if (aos->bfd_section == NULL)
- init_os (aos, NULL);
+ init_os (aos, NULL, 0);
aos->addr_tree = s->address_statement.address;
}
break;
@@ -3244,7 +3352,6 @@ strip_excluded_output_sections (void)
continue;
exclude = (output_section->rawsize == 0
- && !os->section_relative_symbol
&& (output_section->flags & SEC_KEEP) == 0
&& !bfd_section_removed_from_list (output_bfd,
output_section));
@@ -3274,7 +3381,8 @@ strip_excluded_output_sections (void)
{
/* We don't set bfd_section to NULL since bfd_section of the
removed output section statement may still be used. */
- os->ignored = TRUE;
+ if (!os->section_relative_symbol)
+ os->ignored = TRUE;
output_section->flags |= SEC_EXCLUDE;
bfd_section_list_remove (output_bfd, output_section);
output_bfd->section_count--;
@@ -3315,14 +3423,8 @@ print_output_section_statement
minfo ("0x%V %W", section->vma, section->size);
- if (output_section_statement->load_base != NULL)
- {
- bfd_vma addr;
-
- addr = exp_get_abs_int (output_section_statement->load_base, 0,
- "load base");
- minfo (_(" load address 0x%V"), addr);
- }
+ if (section->vma != section->lma)
+ minfo (_(" load address 0x%V"), section->lma);
}
print_nl ();
@@ -3337,7 +3439,7 @@ print_output_section_statement
correct expression, since the value of DST that is used on
the right hand side will be its final value, not its value
just before this expression is evaluated. */
-
+
static bfd_boolean
scan_for_self_assignment (const char * dst, etree_type * rhs)
{
@@ -3494,8 +3596,7 @@ print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
}
static void
-print_all_symbols (sec)
- asection *sec;
+print_all_symbols (asection *sec)
{
struct fat_user_section_struct *ud = get_userdata (sec);
struct map_symbol_def *def;
@@ -3514,64 +3615,61 @@ static void
print_input_section (asection *i)
{
bfd_size_type size = i->size;
+ int len;
+ bfd_vma addr;
init_opb ();
- {
- int len;
- bfd_vma addr;
+ print_space ();
+ minfo ("%s", i->name);
+ len = 1 + strlen (i->name);
+ if (len >= SECTION_NAME_MAP_LENGTH - 1)
+ {
+ print_nl ();
+ len = 0;
+ }
+ while (len < SECTION_NAME_MAP_LENGTH)
+ {
print_space ();
- minfo ("%s", i->name);
-
- len = 1 + strlen (i->name);
- if (len >= SECTION_NAME_MAP_LENGTH - 1)
- {
- print_nl ();
- len = 0;
- }
- while (len < SECTION_NAME_MAP_LENGTH)
- {
- print_space ();
- ++len;
- }
+ ++len;
+ }
- if (i->output_section != NULL && i->output_section->owner == output_bfd)
- addr = i->output_section->vma + i->output_offset;
- else
- {
- addr = print_dot;
- size = 0;
- }
+ if (i->output_section != NULL && i->output_section->owner == output_bfd)
+ addr = i->output_section->vma + i->output_offset;
+ else
+ {
+ addr = print_dot;
+ size = 0;
+ }
- minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);
+ minfo ("0x%V %W %B\n", addr, TO_ADDR (size), i->owner);
- if (size != i->rawsize && i->rawsize != 0)
- {
- len = SECTION_NAME_MAP_LENGTH + 3;
+ if (size != i->rawsize && i->rawsize != 0)
+ {
+ len = SECTION_NAME_MAP_LENGTH + 3;
#ifdef BFD64
- len += 16;
+ len += 16;
#else
- len += 8;
+ len += 8;
#endif
- while (len > 0)
- {
- print_space ();
- --len;
- }
-
- minfo (_("%W (size before relaxing)\n"), i->rawsize);
+ while (len > 0)
+ {
+ print_space ();
+ --len;
}
- if (i->output_section != NULL && i->output_section->owner == output_bfd)
- {
- if (command_line.reduce_memory_overheads)
- bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
- else
- print_all_symbols (i);
+ minfo (_("%W (size before relaxing)\n"), i->rawsize);
+ }
- print_dot = addr + TO_ADDR (size);
- }
+ if (i->output_section != NULL && i->output_section->owner == output_bfd)
+ {
+ if (link_info.reduce_memory_overheads)
+ bfd_link_hash_traverse (link_info.hash, print_one_symbol, i);
+ else
+ print_all_symbols (i);
+
+ print_dot = addr + TO_ADDR (size);
}
}
@@ -4047,7 +4145,7 @@ lang_check_section_addresses (void)
sections[count] = s;
count++;
}
-
+
if (count <= 1)
return;
@@ -4064,7 +4162,7 @@ lang_check_section_addresses (void)
addresses because overlay sections can have overlapping VMAs
but they must have distinct LMAs. */
os = s;
- os_start = s_start;
+ os_start = s_start;
os_end = s_end;
s = *spp++;
s_start = bfd_section_lma (output_bfd, s);
@@ -4137,11 +4235,12 @@ lang_size_sections_1
{
bfd_vma newdot, after;
lang_output_section_statement_type *os;
+ lang_memory_region_type *r;
os = &s->output_section_statement;
if (os->addr_tree != NULL)
{
- os->processed = FALSE;
+ os->processed_vma = FALSE;
exp_fold_tree (os->addr_tree, bfd_abs_section_ptr, &dot);
if (!expld.result.valid_p
@@ -4270,24 +4369,117 @@ lang_size_sections_1
lang_size_sections_1 (os->children.head, os, &os->children.head,
os->fill, newdot, relax, check_regions);
- os->processed = TRUE;
+ os->processed_vma = TRUE;
if (bfd_is_abs_section (os->bfd_section) || os->ignored)
+ /* Except for some special linker created sections,
+ no output section should change from zero size
+ after strip_excluded_output_sections. A non-zero
+ size on an ignored section indicates that some
+ input section was not sized early enough. */
+ ASSERT (os->bfd_section->size == 0);
+ else
{
- ASSERT (os->bfd_section->size == 0);
- break;
+ dot = os->bfd_section->vma;
+
+ /* Put the section within the requested block size, or
+ align at the block boundary. */
+ after = ((dot
+ + TO_ADDR (os->bfd_section->size)
+ + os->block_value - 1)
+ & - (bfd_vma) os->block_value);
+
+ os->bfd_section->size = TO_SIZE (after - os->bfd_section->vma);
}
- dot = os->bfd_section->vma;
+ /* Set section lma. */
+ r = os->region;
+ if (r == NULL)
+ r = lang_memory_region_lookup (DEFAULT_MEMORY_REGION, FALSE);
- /* Put the section within the requested block size, or
- align at the block boundary. */
- after = ((dot
- + TO_ADDR (os->bfd_section->size)
- + os->block_value - 1)
- & - (bfd_vma) os->block_value);
+ if (os->load_base)
+ {
+ bfd_vma lma = exp_get_abs_int (os->load_base, 0, "load base");
+ os->bfd_section->lma = lma;
+ }
+ else if (os->region != NULL
+ && os->lma_region != NULL
+ && os->lma_region != os->region)
+ {
+ bfd_vma lma = os->lma_region->current;
- os->bfd_section->size = TO_SIZE (after - os->bfd_section->vma);
+ if (os->section_alignment != -1)
+ lma = align_power (lma, os->section_alignment);
+ os->bfd_section->lma = lma;
+ }
+ else if (r->last_os != NULL
+ && (os->bfd_section->flags & SEC_ALLOC) != 0)
+ {
+ bfd_vma lma;
+ asection *last;
+
+ last = r->last_os->output_section_statement.bfd_section;
+
+ /* A backwards move of dot should be accompanied by
+ an explicit assignment to the section LMA (ie.
+ os->load_base set) because backwards moves can
+ create overlapping LMAs. */
+ if (dot < last->vma
+ && os->bfd_section->size != 0
+ && dot + os->bfd_section->size <= last->vma)
+ {
+ /* If dot moved backwards then leave lma equal to
+ vma. This is the old default lma, which might
+ just happen to work when the backwards move is
+ sufficiently large. Nag if this changes anything,
+ so people can fix their linker scripts. */
+
+ if (last->vma != last->lma)
+ einfo (_("%P: warning: dot moved backwards before `%s'\n"),
+ os->name);
+ }
+ else
+ {
+ /* If this is an overlay, set the current lma to that
+ at the end of the previous section. */
+ if (os->sectype == overlay_section)
+ lma = last->lma + last->size;
+
+ /* Otherwise, keep the same lma to vma relationship
+ as the previous section. */
+ else
+ lma = dot + last->lma - last->vma;
+
+ if (os->section_alignment != -1)
+ lma = align_power (lma, os->section_alignment);
+ os->bfd_section->lma = lma;
+ }
+ }
+ os->processed_lma = TRUE;
+
+ if (bfd_is_abs_section (os->bfd_section) || os->ignored)
+ break;
+
+ /* Keep track of normal sections using the default
+ lma region. We use this to set the lma for
+ following sections. Overlays or other linker
+ script assignment to lma might mean that the
+ default lma == vma is incorrect.
+ To avoid warnings about dot moving backwards when using
+ -Ttext, don't start tracking sections until we find one
+ of non-zero size or with lma set differently to vma. */
+ if (((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
+ || (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0)
+ && (os->bfd_section->flags & SEC_ALLOC) != 0
+ && (os->bfd_section->size != 0
+ || (r->last_os == NULL
+ && os->bfd_section->vma != os->bfd_section->lma)
+ || (r->last_os != NULL
+ && dot >= (r->last_os->output_section_statement
+ .bfd_section->vma)))
+ && os->lma_region == NULL
+ && !link_info.relocatable)
+ r->last_os = s;
/* .tbss sections effectively have zero size. */
if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
@@ -4317,17 +4509,11 @@ lang_size_sections_1
os_region_check (os, os->region, os->addr_tree,
os->bfd_section->vma);
- /* If there's no load address specified, use the run
- region as the load region. */
- if (os->lma_region == NULL && os->load_base == NULL)
- os->lma_region = os->region;
-
if (os->lma_region != NULL && os->lma_region != os->region)
{
- /* Set load_base, which will be handled later. */
- os->load_base = exp_intop (os->lma_region->current);
- os->lma_region->current +=
- TO_ADDR (os->bfd_section->size);
+ os->lma_region->current
+ = os->bfd_section->lma + TO_ADDR (os->bfd_section->size);
+
if (check_regions)
os_region_check (os, os->lma_region, NULL,
os->bfd_section->lma);
@@ -4450,7 +4636,7 @@ lang_size_sections_1
&newdot);
/* This symbol is relative to this section. */
- if ((tree->type.node_class == etree_provided
+ if ((tree->type.node_class == etree_provided
|| tree->type.node_class == etree_assign)
&& (tree->assign.dst [0] != '.'
|| tree->assign.dst [1] != '\0'))
@@ -4526,6 +4712,48 @@ lang_size_sections_1
return dot;
}
+/* Callback routine that is used in _bfd_elf_map_sections_to_segments.
+ The BFD library has set NEW_SEGMENT to TRUE iff it thinks that
+ CURRENT_SECTION and PREVIOUS_SECTION ought to be placed into different
+ segments. We are allowed an opportunity to override this decision. */
+
+bfd_boolean
+ldlang_override_segment_assignment (struct bfd_link_info * info ATTRIBUTE_UNUSED,
+ bfd * abfd ATTRIBUTE_UNUSED,
+ asection * current_section,
+ asection * previous_section,
+ bfd_boolean new_segment)
+{
+ lang_output_section_statement_type * cur;
+ lang_output_section_statement_type * prev;
+
+ /* The checks below are only necessary when the BFD library has decided
+ that the two sections ought to be placed into the same segment. */
+ if (new_segment)
+ return TRUE;
+
+ /* Paranoia checks. */
+ if (current_section == NULL || previous_section == NULL)
+ return new_segment;
+
+ /* Find the memory regions associated with the two sections.
+ We call lang_output_section_find() here rather than scanning the list
+ of output sections looking for a matching section pointer because if
+ we have a large number of sections then a hash lookup is faster. */
+ cur = lang_output_section_find (current_section->name);
+ prev = lang_output_section_find (previous_section->name);
+
+ /* More paranoia. */
+ if (cur == NULL || prev == NULL)
+ return new_segment;
+
+ /* If the regions are different then force the sections to live in
+ different segments. See the email thread starting at the following
+ URL for the reasons why this is necessary:
+ http://sourceware.org/ml/binutils/2007-02/msg00216.html */
+ return cur->region != prev->region;
+}
+
void
one_lang_size_sections_pass (bfd_boolean *relax, bfd_boolean check_regions)
{
@@ -4561,6 +4789,7 @@ lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
expld.dataseg.base -= maxpage;
relro_end -= maxpage;
}
+ lang_reset_memory_regions ();
one_lang_size_sections_pass (relax, check_regions);
if (expld.dataseg.relro_end > relro_end)
{
@@ -4584,6 +4813,7 @@ lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
< old_min_base)
expld.dataseg.base += expld.dataseg.pagesize;
expld.dataseg.base -= (1 << max_alignment_power);
+ lang_reset_memory_regions ();
one_lang_size_sections_pass (relax, check_regions);
}
}
@@ -4604,6 +4834,7 @@ lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
&& first + last <= expld.dataseg.pagesize)
{
expld.dataseg.phase = exp_dataseg_adjust;
+ lang_reset_memory_regions ();
one_lang_size_sections_pass (relax, check_regions);
}
}
@@ -4614,11 +4845,10 @@ lang_size_sections (bfd_boolean *relax, bfd_boolean check_regions)
/* Worker function for lang_do_assignments. Recursiveness goes here. */
static bfd_vma
-lang_do_assignments_1
- (lang_statement_union_type *s,
- lang_output_section_statement_type *output_section_statement,
- fill_type *fill,
- bfd_vma dot)
+lang_do_assignments_1 (lang_statement_union_type *s,
+ lang_output_section_statement_type *current_os,
+ fill_type *fill,
+ bfd_vma dot)
{
for (; s != NULL; s = s->header.next)
{
@@ -4626,9 +4856,7 @@ lang_do_assignments_1
{
case lang_constructors_statement_enum:
dot = lang_do_assignments_1 (constructor_list.head,
- output_section_statement,
- fill,
- dot);
+ current_os, fill, dot);
break;
case lang_output_section_statement_enum:
@@ -4639,31 +4867,22 @@ lang_do_assignments_1
if (os->bfd_section != NULL && !os->ignored)
{
dot = os->bfd_section->vma;
+
lang_do_assignments_1 (os->children.head, os, os->fill, dot);
+
/* .tbss sections effectively have zero size. */
if ((os->bfd_section->flags & SEC_HAS_CONTENTS) != 0
|| (os->bfd_section->flags & SEC_THREAD_LOCAL) == 0
|| link_info.relocatable)
dot += TO_ADDR (os->bfd_section->size);
}
- if (os->load_base)
- {
- /* If nothing has been placed into the output section then
- it won't have a bfd_section. */
- if (os->bfd_section && !os->ignored)
- {
- os->bfd_section->lma
- = exp_get_abs_int (os->load_base, 0, "load base");
- }
- }
}
break;
case lang_wild_statement_enum:
dot = lang_do_assignments_1 (s->wild_statement.children.head,
- output_section_statement,
- fill, dot);
+ current_os, fill, dot);
break;
case lang_object_symbols_statement_enum:
@@ -4732,7 +4951,7 @@ lang_do_assignments_1
case lang_assignment_statement_enum:
exp_fold_tree (s->assignment_statement.exp,
- output_section_statement->bfd_section,
+ current_os->bfd_section,
&dot);
break;
@@ -4742,8 +4961,7 @@ lang_do_assignments_1
case lang_group_statement_enum:
dot = lang_do_assignments_1 (s->group_statement.children.head,
- output_section_statement,
- fill, dot);
+ current_os, fill, dot);
break;
default:
@@ -4939,7 +5157,7 @@ lang_check (void)
if (compatible == NULL)
{
if (command_line.warn_mismatch)
- einfo (_("%P: warning: %s architecture of input file `%B'"
+ einfo (_("%P%X: %s architecture of input file `%B'"
" is incompatible with %s output\n"),
bfd_printable_name (input_bfd), input_bfd,
bfd_printable_name (output_bfd));
@@ -5050,10 +5268,19 @@ lang_one_common (struct bfd_link_hash_entry *h, void *info)
header_printed = TRUE;
}
- name = demangle (h->root.string);
- minfo ("%s", name);
- len = strlen (name);
- free (name);
+ name = bfd_demangle (output_bfd, h->root.string,
+ DMGL_ANSI | DMGL_PARAMS);
+ if (name == NULL)
+ {
+ minfo ("%s", h->root.string);
+ len = strlen (h->root.string);
+ }
+ else
+ {
+ minfo ("%s", name);
+ len = strlen (name);
+ free (name);
+ }
if (len >= 19)
{
@@ -5209,8 +5436,6 @@ lang_for_each_file (void (*func) (lang_input_statement_type *))
void
ldlang_add_file (lang_input_statement_type *entry)
{
- bfd **pp;
-
lang_statement_append (&file_chain,
(lang_statement_union_type *) entry,
&entry->next);
@@ -5219,9 +5444,9 @@ ldlang_add_file (lang_input_statement_type *entry)
a link. */
ASSERT (entry->the_bfd->link_next == NULL);
ASSERT (entry->the_bfd != output_bfd);
- for (pp = &link_info.input_bfds; *pp != NULL; pp = &(*pp)->link_next)
- ;
- *pp = entry->the_bfd;
+
+ *link_info.input_bfds_tail = entry->the_bfd;
+ link_info.input_bfds_tail = &entry->the_bfd->link_next;
entry->the_bfd->usrdata = entry;
bfd_set_gp_size (entry->the_bfd, g_switch_value);
@@ -5328,14 +5553,17 @@ lang_reset_memory_regions (void)
for (p = lang_memory_region_list; p != NULL; p = p->next)
{
- p->old_length = (bfd_size_type) (p->current - p->origin);
p->current = p->origin;
+ p->last_os = NULL;
}
for (os = &lang_output_section_statement.head->output_section_statement;
os != NULL;
os = os->next)
- os->processed = FALSE;
+ {
+ os->processed_vma = FALSE;
+ os->processed_lma = FALSE;
+ }
for (o = output_bfd->sections; o != NULL; o = o->next)
{
@@ -5440,9 +5668,11 @@ relax_sections (void)
/* Keep relaxing until bfd_relax_section gives up. */
bfd_boolean relax_again;
+ link_info.relax_trip = -1;
do
{
- relax_again = FALSE;
+ relax_again = FALSE;
+ link_info.relax_trip++;
/* Note: pe-dll.c does something like this also. If you find
you need to change this code, you probably need to change
@@ -5466,6 +5696,10 @@ relax_sections (void)
void
lang_process (void)
{
+ /* Finalize dynamic list. */
+ if (link_info.dynamic_list)
+ lang_finalize_version_expr_head (&link_info.dynamic_list->head);
+
current_target = default_target;
/* Open the output file. */
@@ -5589,13 +5823,13 @@ lang_process (void)
lang_do_assignments ();
+ ldemul_finish ();
+
/* Make sure that the section addresses make sense. */
if (! link_info.relocatable
&& command_line.check_section_addresses)
lang_check_section_addresses ();
- /* Final stuffs. */
- ldemul_finish ();
lang_end ();
}
@@ -5998,6 +6232,7 @@ lang_record_phdrs (void)
alc = 10;
secs = xmalloc (alc * sizeof (asection *));
last = NULL;
+
for (l = lang_phdr_list; l != NULL; l = l->next)
{
unsigned int c;
@@ -6023,7 +6258,26 @@ lang_record_phdrs (void)
|| os->bfd_section == NULL
|| (os->bfd_section->flags & SEC_ALLOC) == 0)
continue;
- pl = last;
+
+ if (last)
+ pl = last;
+ else
+ {
+ lang_output_section_statement_type * tmp_os;
+
+ /* If we have not run across a section with a program
+ header assigned to it yet, then scan forwards to find
+ one. This prevents inconsistencies in the linker's
+ behaviour when a script has specified just a single
+ header and there are sections in that script which are
+ not assigned to it, and which occur before the first
+ use of that header. See here for more details:
+ http://sourceware.org/ml/binutils/2007-02/msg00291.html */
+ for (tmp_os = os; tmp_os; tmp_os = tmp_os->next)
+ if (tmp_os->phdrs)
+ break;
+ pl = tmp_os->phdrs;
+ }
}
if (os->bfd_section == NULL)
@@ -6142,7 +6396,7 @@ lang_enter_overlay_section (const char *name)
struct overlay_list *n;
etree_type *size;
- lang_enter_output_section_statement (name, overlay_vma, normal_section,
+ lang_enter_output_section_statement (name, overlay_vma, overlay_section,
0, overlay_subalign, 0, 0);
/* If this is the first section, then base the VMA of future
@@ -6197,15 +6451,17 @@ lang_leave_overlay_section (fill_type *fill,
buf = xmalloc (strlen (clean) + sizeof "__load_start_");
sprintf (buf, "__load_start_%s", clean);
- lang_add_assignment (exp_assop ('=', buf,
- exp_nameop (LOADADDR, name)));
+ lang_add_assignment (exp_provide (buf,
+ exp_nameop (LOADADDR, name),
+ FALSE));
buf = xmalloc (strlen (clean) + sizeof "__load_stop_");
sprintf (buf, "__load_stop_%s", clean);
- lang_add_assignment (exp_assop ('=', buf,
- exp_binop ('+',
- exp_nameop (LOADADDR, name),
- exp_nameop (SIZEOF, name))));
+ lang_add_assignment (exp_provide (buf,
+ exp_binop ('+',
+ exp_nameop (LOADADDR, name),
+ exp_nameop (SIZEOF, name)),
+ FALSE));
free (clean);
}
@@ -6254,12 +6510,10 @@ lang_leave_overlay (etree_type *lma_expr,
The base address is not needed (and should be null) if
an LMA region was specified. */
if (l->next == 0)
- l->os->load_base = lma_expr;
- else if (lma_region == 0)
- l->os->load_base = exp_binop ('+',
- exp_nameop (LOADADDR, l->next->os->name),
- exp_nameop (SIZEOF, l->next->os->name));
-
+ {
+ l->os->load_base = lma_expr;
+ l->os->sectype = normal_section;
+ }
if (phdrs != NULL && l->os->phdrs == NULL)
l->os->phdrs = phdrs;
@@ -6750,7 +7004,7 @@ lang_do_version_exports_section (void)
/* Do not free the contents, as we used them creating the regex. */
/* Do not include this section in the link. */
- sec->flags |= SEC_EXCLUDE;
+ sec->flags |= SEC_EXCLUDE | SEC_KEEP;
}
lreg = lang_new_vers_pattern (NULL, "*", NULL, FALSE);
@@ -6772,3 +7026,69 @@ lang_add_unique (const char *name)
ent->next = unique_section_list;
unique_section_list = ent;
}
+
+/* Append the list of dynamic symbols to the existing one. */
+
+void
+lang_append_dynamic_list (struct bfd_elf_version_expr *dynamic)
+{
+ if (link_info.dynamic_list)
+ {
+ struct bfd_elf_version_expr *tail;
+ for (tail = dynamic; tail->next != NULL; tail = tail->next)
+ ;
+ tail->next = link_info.dynamic_list->head.list;
+ link_info.dynamic_list->head.list = dynamic;
+ }
+ else
+ {
+ struct bfd_elf_dynamic_list *d;
+
+ d = xcalloc (1, sizeof *d);
+ d->head.list = dynamic;
+ d->match = lang_vers_match;
+ link_info.dynamic_list = d;
+ }
+}
+
+/* Append the list of C++ typeinfo dynamic symbols to the existing
+ one. */
+
+void
+lang_append_dynamic_list_cpp_typeinfo (void)
+{
+ const char * symbols [] =
+ {
+ "typeinfo name for*",
+ "typeinfo for*"
+ };
+ struct bfd_elf_version_expr *dynamic = NULL;
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (symbols); i++)
+ dynamic = lang_new_vers_pattern (dynamic, symbols [i], "C++",
+ FALSE);
+
+ lang_append_dynamic_list (dynamic);
+}
+
+/* Append the list of C++ operator new and delete dynamic symbols to the
+ existing one. */
+
+void
+lang_append_dynamic_list_cpp_new (void)
+{
+ const char * symbols [] =
+ {
+ "operator new*",
+ "operator delete*"
+ };
+ struct bfd_elf_version_expr *dynamic = NULL;
+ unsigned int i;
+
+ for (i = 0; i < ARRAY_SIZE (symbols); i++)
+ dynamic = lang_new_vers_pattern (dynamic, symbols [i], "C++",
+ FALSE);
+
+ lang_append_dynamic_list (dynamic);
+}
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
index 3257959..f52f46f 100644
--- a/contrib/binutils/ld/ldlang.h
+++ b/contrib/binutils/ld/ldlang.h
@@ -1,6 +1,6 @@
/* ldlang.h - linker command language support
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005
+ 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -54,7 +54,7 @@ typedef struct memory_region_struct
bfd_vma origin;
bfd_size_type length;
bfd_vma current;
- bfd_size_type old_length;
+ union lang_statement_union *last_os;
flagword flags;
flagword not_flags;
bfd_boolean had_full_message;
@@ -108,11 +108,9 @@ typedef struct lang_output_statement_struct
enum section_type
{
normal_section,
- dsect_section,
- copy_section,
+ overlay_section,
noload_section,
- info_section,
- overlay_section
+ noalloc_section
};
/* This structure holds a list of program headers describing
@@ -153,7 +151,8 @@ typedef struct lang_output_section_statement_struct
int constraint;
flagword flags;
enum section_type sectype;
- unsigned int processed : 1;
+ unsigned int processed_vma : 1;
+ unsigned int processed_lma : 1;
unsigned int all_input_readonly : 1;
/* If this section should be ignored. */
unsigned int ignored : 1;
@@ -311,6 +310,15 @@ typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
typedef bfd_boolean (*lang_match_sec_type_func) (bfd *, const asection *,
bfd *, const asection *);
+/* Binary search tree structure to efficiently sort sections by
+ name. */
+typedef struct lang_section_bst
+{
+ asection *section;
+ struct lang_section_bst *left;
+ struct lang_section_bst *right;
+} lang_section_bst_type;
+
struct lang_wild_statement_struct
{
lang_statement_header_type header;
@@ -322,6 +330,7 @@ struct lang_wild_statement_struct
walk_wild_section_handler_t walk_wild_section_handler;
struct wildcard_list *handler_data[4];
+ lang_section_bst_type *tree;
};
typedef struct lang_address_statement_struct
@@ -387,6 +396,8 @@ struct lang_phdr
etree_type *flags;
};
+extern struct lang_phdr *lang_phdr_list;
+
/* This structure is used to hold a list of sections which may not
cross reference each other. */
@@ -446,6 +457,7 @@ extern struct bfd_sym_chain entry_symbol;
extern const char *entry_section;
extern bfd_boolean entry_from_cmdline;
extern lang_statement_list_type file_chain;
+extern lang_statement_list_type input_file_chain;
extern int lang_statement_iteration;
@@ -595,6 +607,9 @@ extern struct bfd_elf_version_deps *lang_add_vers_depend
(struct bfd_elf_version_deps *, const char *);
extern void lang_register_vers_node
(const char *, struct bfd_elf_version_tree *, struct bfd_elf_version_deps *);
+extern void lang_append_dynamic_list (struct bfd_elf_version_expr *);
+extern void lang_append_dynamic_list_cpp_typeinfo (void);
+extern void lang_append_dynamic_list_cpp_new (void);
bfd_boolean unique_section_p
(const asection *);
extern void lang_add_unique
@@ -607,5 +622,11 @@ extern void lang_update_definedness
(const char *, struct bfd_link_hash_entry *);
extern void add_excluded_libs (const char *);
+extern bfd_boolean load_symbols
+ (lang_input_statement_type *, lang_statement_list_type *);
+
+extern bfd_boolean
+ldlang_override_segment_assignment
+ (struct bfd_link_info *, bfd *, asection *, asection *, bfd_boolean);
#endif
diff --git a/contrib/binutils/ld/ldlex.h b/contrib/binutils/ld/ldlex.h
index d35ead6..f274c68 100644
--- a/contrib/binutils/ld/ldlex.h
+++ b/contrib/binutils/ld/ldlex.h
@@ -30,6 +30,7 @@ typedef enum input_enum {
input_script,
input_mri_script,
input_version_script,
+ input_dynamic_list,
input_defsym
} input_type;
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
index 56ec391..b0313d9 100644
--- a/contrib/binutils/ld/ldlex.l
+++ b/contrib/binutils/ld/ldlex.l
@@ -1,7 +1,8 @@
%{
/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -25,11 +26,8 @@ This was written by steve chamberlain
sac@cygnus.com
*/
-
-#include <stdio.h>
-
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "safe-ctype.h"
#include "bfdlink.h"
#include "ld.h"
@@ -132,6 +130,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
case input_script: return INPUT_SCRIPT; break;
case input_mri_script: return INPUT_MRI_SCRIPT; break;
case input_version_script: return INPUT_VERSION_SCRIPT; break;
+ case input_dynamic_list: return INPUT_DYNAMIC_LIST; break;
case input_defsym: return INPUT_DEFSYM; break;
default: abort ();
}
@@ -255,9 +254,10 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<EXPRESSION,BOTH,SCRIPT>"DATA_SEGMENT_END" { RTOKEN(DATA_SEGMENT_END);}
<EXPRESSION,BOTH,SCRIPT>"ADDR" { RTOKEN(ADDR);}
<EXPRESSION,BOTH,SCRIPT>"LOADADDR" { RTOKEN(LOADADDR);}
+<EXPRESSION,BOTH,SCRIPT>"ALIGNOF" { RTOKEN(ALIGNOF); }
<EXPRESSION,BOTH>"MAX" { RTOKEN(MAX_K); }
<EXPRESSION,BOTH>"MIN" { RTOKEN(MIN_K); }
-<EXPRESSION,BOTH>"ASSERT" { RTOKEN(ASSERT_K); }
+<EXPRESSION,BOTH,SCRIPT>"ASSERT" { RTOKEN(ASSERT_K); }
<BOTH,SCRIPT>"ENTRY" { RTOKEN(ENTRY);}
<BOTH,SCRIPT,MRI>"EXTERN" { RTOKEN(EXTERN);}
<EXPRESSION,BOTH,SCRIPT>"NEXT" { RTOKEN(NEXT);}
@@ -316,6 +316,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
<EXPRESSION,BOTH,SCRIPT>"PROVIDE_HIDDEN" { RTOKEN(PROVIDE_HIDDEN); }
<EXPRESSION,BOTH,SCRIPT>"KEEP" { RTOKEN(KEEP); }
<EXPRESSION,BOTH,SCRIPT>"EXCLUDE_FILE" { RTOKEN(EXCLUDE_FILE); }
+<EXPRESSION,BOTH,SCRIPT>"CONSTANT" { RTOKEN(CONSTANT);}
<MRI>"#".*\n? { ++ lineno; }
<MRI>"\n" { ++ lineno; RTOKEN(NEWLINE); }
<MRI>"*".* { /* Mri comment line */ }
@@ -363,11 +364,19 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
}
-<BOTH,EXPRESSION>{FILENAMECHAR1}{FILENAMECHAR}* {
+<BOTH>{FILENAMECHAR1}{FILENAMECHAR}* {
+ yylval.name = xstrdup (yytext);
+ return NAME;
+ }
+<BOTH>"-l"{FILENAMECHAR}+ {
+ yylval.name = xstrdup (yytext + 2);
+ return LNAME;
+ }
+<EXPRESSION>{FILENAMECHAR1}{NOCFILENAMECHAR}* {
yylval.name = xstrdup (yytext);
return NAME;
}
-<BOTH,EXPRESSION>"-l"{FILENAMECHAR}+ {
+<EXPRESSION>"-l"{NOCFILENAMECHAR}+ {
yylval.name = xstrdup (yytext + 2);
return LNAME;
}
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
index fbc3081..354c41a 100644
--- a/contrib/binutils/ld/ldmain.c
+++ b/contrib/binutils/ld/ldmain.c
@@ -1,6 +1,6 @@
/* Main program of GNU linker.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006
+ 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -21,9 +21,8 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
-#include <stdio.h>
+#include "bfd.h"
#include "safe-ctype.h"
#include "libiberty.h"
#include "progress.h"
@@ -161,7 +160,10 @@ static struct bfd_link_callbacks link_callbacks =
reloc_dangerous,
unattached_reloc,
notice,
- einfo
+ einfo,
+ info_msg,
+ minfo,
+ ldlang_override_segment_assignment
};
struct bfd_link_info link_info;
@@ -240,25 +242,17 @@ main (int argc, char **argv)
}
#endif
- /* Initialize the data about options. */
- trace_files = trace_file_tries = version_printed = FALSE;
- whole_archive = FALSE;
config.build_constructors = TRUE;
- config.dynamic_link = FALSE;
- config.has_shared = FALSE;
+ config.rpath_separator = ':';
config.split_by_reloc = (unsigned) -1;
config.split_by_file = (bfd_size_type) -1;
- config.hash_table_size = 0;
- command_line.force_common_definition = FALSE;
- command_line.inhibit_common_definition = FALSE;
- command_line.interpreter = NULL;
- command_line.rpath = NULL;
+ config.make_executable = TRUE;
+ config.magic_demand_paged = TRUE;
+ config.text_read_only = TRUE;
+
command_line.warn_mismatch = TRUE;
+ command_line.warn_search_mismatch = TRUE;
command_line.check_section_addresses = TRUE;
- command_line.accept_unknown_input_arch = FALSE;
- command_line.reduce_memory_overheads = FALSE;
-
- sort_section = none;
/* We initialize DEMANGLING based on the environment variable
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
@@ -267,63 +261,22 @@ main (int argc, char **argv)
interface by default. */
demangling = getenv ("COLLECT_NO_DEMANGLE") == NULL;
- link_info.relocatable = FALSE;
- link_info.emitrelocations = FALSE;
- link_info.task_link = FALSE;
- link_info.shared = FALSE;
- link_info.pie = FALSE;
- link_info.executable = 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.unresolved_syms_in_objects = RM_NOT_YET_SET;
- link_info.unresolved_syms_in_shared_libs = RM_NOT_YET_SET;
- link_info.allow_multiple_definition = FALSE;
link_info.allow_undefined_version = TRUE;
- link_info.create_default_symver = FALSE;
- link_info.default_imported_symver = FALSE;
link_info.keep_memory = TRUE;
- link_info.notice_all = FALSE;
- link_info.nocopyreloc = FALSE;
- link_info.new_dtags = FALSE;
link_info.combreloc = TRUE;
- link_info.eh_frame_hdr = FALSE;
- link_info.relro = FALSE;
link_info.strip_discarded = TRUE;
- link_info.strip = strip_none;
- link_info.discard = discard_sec_merge;
- link_info.common_skip_ar_aymbols = bfd_link_common_skip_none;
+ link_info.emit_hash = TRUE;
link_info.callbacks = &link_callbacks;
- link_info.hash = NULL;
- link_info.keep_hash = NULL;
- link_info.notice_hash = NULL;
- link_info.wrap_hash = NULL;
- link_info.input_bfds = NULL;
- link_info.create_object_symbols_section = NULL;
- link_info.gc_sym_list = NULL;
- link_info.base_file = NULL;
+ link_info.input_bfds_tail = &link_info.input_bfds;
/* SVR4 linkers seem to set DT_INIT and DT_FINI based on magic _init
and _fini symbols. We are compatible. */
link_info.init_function = "_init";
link_info.fini_function = "_fini";
+ link_info.relax_pass = 1;
link_info.pei386_auto_import = -1;
- link_info.pei386_runtime_pseudo_reloc = FALSE;
link_info.spare_dynamic_tags = 5;
- link_info.flags = 0;
- link_info.flags_1 = 0;
- link_info.relax_pass = 1;
- link_info.warn_shared_textrel = FALSE;
- link_info.gc_sections = FALSE;
ldfile_add_arch ("");
-
- config.make_executable = TRUE;
- force_make_executable = FALSE;
- config.magic_demand_paged = TRUE;
- config.text_read_only = TRUE;
-
emulation = get_emulation (argc, argv);
ldemul_choose_mode (emulation);
default_target = ldemul_choose_target (argc, argv);
@@ -347,6 +300,43 @@ main (int argc, char **argv)
einfo (_("%P%F: -r and -shared may not be used together\n"));
}
+ /* We may have -Bsymbolic, -Bsymbolic-functions, --dynamic-list-data,
+ --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo and
+ --dynamic-list FILE. -Bsymbolic and -Bsymbolic-functions are
+ for shared libraries. -Bsymbolic overrides all others and vice
+ versa. */
+ switch (command_line.symbolic)
+ {
+ case symbolic_unset:
+ break;
+ case symbolic:
+ /* -Bsymbolic is for shared library only. */
+ if (link_info.shared)
+ {
+ link_info.symbolic = TRUE;
+ /* Should we free the unused memory? */
+ link_info.dynamic_list = NULL;
+ command_line.dynamic_list = dynamic_list_unset;
+ }
+ break;
+ case symbolic_functions:
+ /* -Bsymbolic-functions is for shared library only. */
+ if (link_info.shared)
+ command_line.dynamic_list = dynamic_list_data;
+ break;
+ }
+
+ switch (command_line.dynamic_list)
+ {
+ case dynamic_list_unset:
+ break;
+ case dynamic_list_data:
+ link_info.dynamic_data = TRUE;
+ case dynamic_list:
+ link_info.dynamic = TRUE;
+ break;
+ }
+
if (! link_info.shared)
{
if (command_line.filter_shlib)
@@ -372,6 +362,16 @@ main (int argc, char **argv)
the -L's in argv have been processed. */
set_scripts_dir ();
+ /* If we have not already opened and parsed a linker script,
+ try the default script from command line first. */
+ if (saved_script_handle == NULL
+ && command_line.default_script != NULL)
+ {
+ ldfile_open_command_file (command_line.default_script);
+ parser_input = input_script;
+ yyparse ();
+ }
+
/* If we have not already opened and parsed a linker script
read the emulation's appropriate default script. */
if (saved_script_handle == NULL)
@@ -594,7 +594,7 @@ get_sysroot (int argc, char **argv)
const char *path;
for (i = 1; i < argc; i++)
- if (strncmp (argv[i], "--sysroot=", strlen ("--sysroot=")) == 0)
+ if (CONST_STRNEQ (argv[i], "--sysroot="))
return argv[i] + strlen ("--sysroot=");
path = get_relative_sysroot (BINDIR);
@@ -623,7 +623,7 @@ get_emulation (int argc, char **argv)
for (i = 1; i < argc; i++)
{
- if (!strncmp (argv[i], "-m", 2))
+ if (CONST_STRNEQ (argv[i], "-m"))
{
if (argv[i][2] == '\0')
{
diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c
index 8af043a..292fc45 100644
--- a/contrib/binutils/ld/ldmisc.c
+++ b/contrib/binutils/ld/ldmisc.c
@@ -1,6 +1,6 @@
/* ldmisc.c
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -21,9 +21,9 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
+#include "sysdep.h"
#include "bfd.h"
#include "bfdlink.h"
-#include "sysdep.h"
#include "libiberty.h"
#include "demangle.h"
#include <stdarg.h>
@@ -144,17 +144,24 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
const char *name = va_arg (arg, const char *);
if (name == NULL || *name == 0)
- fprintf (fp, _("no symbol"));
- else if (! demangling)
- fprintf (fp, "%s", name);
- else
+ {
+ fprintf (fp, _("no symbol"));
+ break;
+ }
+ else if (demangling)
{
char *demangled;
- demangled = demangle (name);
- fprintf (fp, "%s", demangled);
- free (demangled);
+ demangled = bfd_demangle (output_bfd, name,
+ DMGL_ANSI | DMGL_PARAMS);
+ if (demangled != NULL)
+ {
+ fprintf (fp, "%s", demangled);
+ free (demangled);
+ break;
+ }
}
+ fprintf (fp, "%s", name);
}
break;
@@ -432,48 +439,6 @@ vfinfo (FILE *fp, const char *fmt, va_list arg, bfd_boolean is_warning)
xexit (1);
}
-/* Wrapper around cplus_demangle. Strips leading underscores and
- other such chars that would otherwise confuse the demangler. */
-
-char *
-demangle (const char *name)
-{
- char *res;
- const char *p;
-
- if (output_bfd != NULL
- && bfd_get_symbol_leading_char (output_bfd) == name[0])
- ++name;
-
- /* 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 to avoid
- confusing the demangler. */
- p = name;
- while (*p == '.')
- ++p;
-
- res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
- if (res)
- {
- size_t dots = p - name;
-
- /* Now put back any stripped dots. */
- if (dots != 0)
- {
- size_t len = strlen (res) + 1;
- char *add_dots = xmalloc (len + dots);
-
- memcpy (add_dots, name, dots);
- memcpy (add_dots + dots, res, len);
- free (res);
- res = add_dots;
- }
- return res;
- }
- return xstrdup (name);
-}
-
/* Format info message and print on stdout. */
/* (You would think this should be called just "info", but then you
@@ -512,11 +477,14 @@ info_assert (const char *file, unsigned int line)
void
minfo (const char *fmt, ...)
{
- va_list arg;
+ if (config.map_file != NULL)
+ {
+ va_list arg;
- va_start (arg, fmt);
- vfinfo (config.map_file, fmt, arg, FALSE);
- va_end (arg);
+ va_start (arg, fmt);
+ vfinfo (config.map_file, fmt, arg, FALSE);
+ va_end (arg);
+ }
}
void
diff --git a/contrib/binutils/ld/ldmisc.h b/contrib/binutils/ld/ldmisc.h
index cf70433..92f4e2a 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, 2001, 2003, 2004
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2001, 2003, 2004, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -40,6 +40,5 @@ do { info_assert(__FILE__,__LINE__); } while (0)
extern void print_space (void);
extern void print_nl (void);
-extern char *demangle (const char *);
#endif
diff --git a/contrib/binutils/ld/ldver.c b/contrib/binutils/ld/ldver.c
index 48b9143..776c722 100644
--- a/contrib/binutils/ld/ldver.c
+++ b/contrib/binutils/ld/ldver.c
@@ -1,6 +1,6 @@
/* ldver.c -- Print linker version.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002,
- 2003 Free Software Foundation, Inc.
+ 2003, 2007 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -18,10 +18,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <stdio.h>
+#include "sysdep.h"
#include "bfd.h"
#include "bfdver.h"
-#include "sysdep.h"
#include "ld.h"
#include "ldver.h"
@@ -35,11 +34,11 @@ void
ldversion (int noisy)
{
/* Output for noisy == 2 is intended to follow the GNU standards. */
- fprintf (stdout, _("GNU ld version %s\n"), BFD_VERSION_STRING);
+ fprintf (stdout, _("GNU ld %s\n"), BFD_VERSION_STRING);
if (noisy & 2)
{
- printf (_("Copyright 2005 Free Software Foundation, Inc.\n"));
+ printf (_("Copyright 2007 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/ld/ldver.texi b/contrib/binutils/ld/ldver.texi
deleted file mode 100644
index 11d1801..0000000
--- a/contrib/binutils/ld/ldver.texi
+++ /dev/null
@@ -1 +0,0 @@
-@set VERSION 2.17
diff --git a/contrib/binutils/ld/ldwrite.c b/contrib/binutils/ld/ldwrite.c
index ee9d74a..7c02ff6 100644
--- a/contrib/binutils/ld/ldwrite.c
+++ b/contrib/binutils/ld/ldwrite.c
@@ -1,6 +1,6 @@
/* ldwrite.c -- write out the linked file
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Steve Chamberlain sac@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -19,8 +19,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -293,7 +293,7 @@ build_link_order (lang_statement_union_type *statement)
static bfd_boolean
unsplittable_name (const char *name)
{
- if (strncmp (name, ".stab", 5) == 0)
+ if (CONST_STRNEQ (name, ".stab"))
{
/* There are several stab like string sections. We pattern match on
".stab...str" */
@@ -338,7 +338,7 @@ clone_section (bfd *abfd, asection *s, const char *name, int *count)
{
/* Some section names cannot be truncated, as the name is
used to locate some other section. */
- if (strncmp (name, ".stab", 5) == 0
+ if (CONST_STRNEQ (name, ".stab")
|| strcmp (name, "$GDB_SYMBOLS$") == 0)
{
einfo (_ ("%F%P: cannot create split section name for %s\n"), name);
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
index f4c7dda..6ef5053 100644
--- a/contrib/binutils/ld/lexsup.c
+++ b/contrib/binutils/ld/lexsup.c
@@ -1,6 +1,6 @@
/* Parse options for the GNU linker.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -20,9 +20,9 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "config.h"
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
+#include "bfdver.h"
#include "libiberty.h"
#include <stdio.h>
#include <string.h>
@@ -83,6 +83,7 @@ enum option_values
OPTION_NO_DEMANGLE,
OPTION_NO_KEEP_MEMORY,
OPTION_NO_WARN_MISMATCH,
+ OPTION_NO_WARN_SEARCH_MISMATCH,
OPTION_NOINHIBIT_EXEC,
OPTION_NON_SHARED,
OPTION_NO_WHOLE_ARCHIVE,
@@ -97,6 +98,7 @@ enum option_values
OPTION_SORT_SECTION,
OPTION_STATS,
OPTION_SYMBOLIC,
+ OPTION_SYMBOLIC_FUNCTIONS,
OPTION_TASK_LINK,
OPTION_TBSS,
OPTION_TDATA,
@@ -107,6 +109,10 @@ enum option_values
OPTION_VERSION,
OPTION_VERSION_SCRIPT,
OPTION_VERSION_EXPORTS_SECTION,
+ OPTION_DYNAMIC_LIST,
+ OPTION_DYNAMIC_LIST_CPP_NEW,
+ OPTION_DYNAMIC_LIST_CPP_TYPEINFO,
+ OPTION_DYNAMIC_LIST_DATA,
OPTION_WARN_COMMON,
OPTION_WARN_CONSTRUCTORS,
OPTION_WARN_FATAL,
@@ -124,6 +130,8 @@ enum option_values
OPTION_FORCE_EXE_SUFFIX,
OPTION_GC_SECTIONS,
OPTION_NO_GC_SECTIONS,
+ OPTION_PRINT_GC_SECTIONS,
+ OPTION_NO_PRINT_GC_SECTIONS,
OPTION_HASH_SIZE,
OPTION_CHECK_SECTIONS,
OPTION_NO_CHECK_SECTIONS,
@@ -153,7 +161,8 @@ enum option_values
OPTION_WARN_UNRESOLVED_SYMBOLS,
OPTION_ERROR_UNRESOLVED_SYMBOLS,
OPTION_WARN_SHARED_TEXTREL,
- OPTION_REDUCE_MEMORY_OVERHEADS
+ OPTION_REDUCE_MEMORY_OVERHEADS,
+ OPTION_DEFAULT_SCRIPT
};
/* The long options. This structure is used for both the option
@@ -276,6 +285,10 @@ static const struct ld_option ld_options[] =
't', NULL, N_("Trace file opens"), TWO_DASHES },
{ {"script", required_argument, NULL, 'T'},
'T', N_("FILE"), N_("Read linker script"), TWO_DASHES },
+ { {"default-script", required_argument, NULL, OPTION_DEFAULT_SCRIPT},
+ '\0', N_("FILE"), N_("Read default linker script"), TWO_DASHES },
+ { {"dT", required_argument, NULL, OPTION_DEFAULT_SCRIPT},
+ '\0', NULL, NULL, ONE_DASH },
{ {"undefined", required_argument, NULL, 'u'},
'u', N_("SYMBOL"), N_("Start with undefined reference to SYMBOL"),
TWO_DASHES },
@@ -342,6 +355,8 @@ static const struct ld_option ld_options[] =
'\0', NULL, NULL, ONE_DASH },
{ {"Bsymbolic", no_argument, NULL, OPTION_SYMBOLIC},
'\0', NULL, N_("Bind global references locally"), ONE_DASH },
+ { {"Bsymbolic-functions", no_argument, NULL, OPTION_SYMBOLIC_FUNCTIONS},
+ '\0', NULL, N_("Bind global function references locally"), ONE_DASH },
{ {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
'\0', NULL, N_("Check section addresses for overlaps (default)"),
TWO_DASHES },
@@ -370,6 +385,12 @@ static const struct ld_option ld_options[] =
{ {"no-gc-sections", no_argument, NULL, OPTION_NO_GC_SECTIONS},
'\0', NULL, N_("Don't remove unused sections (default)"),
TWO_DASHES },
+ { {"print-gc-sections", no_argument, NULL, OPTION_PRINT_GC_SECTIONS},
+ '\0', NULL, N_("List removed unused sections on stderr"),
+ TWO_DASHES },
+ { {"no-print-gc-sections", no_argument, NULL, OPTION_NO_PRINT_GC_SECTIONS},
+ '\0', NULL, N_("Do not list removed unused sections"),
+ TWO_DASHES },
{ {"hash-size=<NUMBER>", required_argument, NULL, OPTION_HASH_SIZE},
'\0', NULL, N_("Set default hash table size close to <NUMBER>"),
TWO_DASHES },
@@ -408,6 +429,10 @@ static const struct ld_option ld_options[] =
TWO_DASHES },
{ {"no-warn-mismatch", no_argument, NULL, OPTION_NO_WARN_MISMATCH},
'\0', NULL, N_("Don't warn about mismatched input files"), TWO_DASHES},
+ { {"no-warn-search-mismatch", no_argument, NULL,
+ OPTION_NO_WARN_SEARCH_MISMATCH},
+ '\0', NULL, N_("Don't warn on finding an incompatible library"),
+ TWO_DASHES},
{ {"no-whole-archive", no_argument, NULL, OPTION_NO_WHOLE_ARCHIVE},
'\0', NULL, N_("Turn off --whole-archive"), TWO_DASHES },
{ {"noinhibit-exec", no_argument, NULL, OPTION_NOINHIBIT_EXEC},
@@ -493,6 +518,14 @@ static const struct ld_option ld_options[] =
OPTION_VERSION_EXPORTS_SECTION },
'\0', N_("SYMBOL"), N_("Take export symbols list from .exports, using\n"
"\t\t\t\tSYMBOL as the version."), TWO_DASHES },
+ { {"dynamic-list-data", no_argument, NULL, OPTION_DYNAMIC_LIST_DATA},
+ '\0', NULL, N_("Add data symbols to dynamic list"), TWO_DASHES },
+ { {"dynamic-list-cpp-new", no_argument, NULL, OPTION_DYNAMIC_LIST_CPP_NEW},
+ '\0', NULL, N_("Use C++ operator new/delete dynamic list"), TWO_DASHES },
+ { {"dynamic-list-cpp-typeinfo", no_argument, NULL, OPTION_DYNAMIC_LIST_CPP_TYPEINFO},
+ '\0', NULL, N_("Use C++ typeinfo dynamic list"), TWO_DASHES },
+ { {"dynamic-list", required_argument, NULL, OPTION_DYNAMIC_LIST},
+ '\0', N_("FILE"), N_("Read dynamic list"), TWO_DASHES },
{ {"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
'\0', NULL, N_("Warn about duplicate common symbols"), TWO_DASHES },
{ {"warn-constructors", no_argument, NULL, OPTION_WARN_CONSTRUCTORS},
@@ -666,6 +699,8 @@ parse_args (unsigned argc, char **argv)
{
case '?':
einfo (_("%P: unrecognized option '%s'\n"), argv[last_optind]);
+ /* Fall through. */
+
default:
einfo (_("%P%F: use the --help option for usage information\n"));
@@ -812,6 +847,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_GC_SECTIONS:
link_info.gc_sections = TRUE;
break;
+ case OPTION_PRINT_GC_SECTIONS:
+ link_info.print_gc_sections = TRUE;
+ break;
case OPTION_HELP:
help ();
xexit (0);
@@ -855,6 +893,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_NO_GC_SECTIONS:
link_info.gc_sections = FALSE;
break;
+ case OPTION_NO_PRINT_GC_SECTIONS:
+ link_info.print_gc_sections = FALSE;
+ break;
case OPTION_NO_KEEP_MEMORY:
link_info.keep_memory = FALSE;
break;
@@ -927,6 +968,9 @@ parse_args (unsigned argc, char **argv)
case OPTION_NO_WARN_MISMATCH:
command_line.warn_mismatch = FALSE;
break;
+ case OPTION_NO_WARN_SEARCH_MISMATCH:
+ command_line.warn_search_mismatch = FALSE;
+ break;
case OPTION_NOINHIBIT_EXEC:
force_make_executable = TRUE;
break;
@@ -1008,17 +1052,14 @@ parse_args (unsigned argc, char **argv)
/* First see whether OPTARG is already in the path. */
do
{
- size_t idx = 0;
-
- while (optarg[idx] != '\0' && optarg[idx] == cp[idx])
- ++idx;
- if (optarg[idx] == '\0'
- && (cp[idx] == '\0' || cp[idx] == ':'))
+ if (strncmp (optarg, cp, optarg_len) == 0
+ && (cp[optarg_len] == 0
+ || cp[optarg_len] == config.rpath_separator))
/* We found it. */
break;
/* Not yet found. */
- cp = strchr (cp, ':');
+ cp = strchr (cp, config.rpath_separator);
if (cp != NULL)
++cp;
}
@@ -1027,7 +1068,8 @@ parse_args (unsigned argc, char **argv)
if (cp == NULL)
{
buf = xmalloc (rpath_len + optarg_len + 2);
- sprintf (buf, "%s:%s", command_line.rpath, optarg);
+ sprintf (buf, "%s%c%s", command_line.rpath,
+ config.rpath_separator, optarg);
free (command_line.rpath);
command_line.rpath = buf;
}
@@ -1043,7 +1085,8 @@ parse_args (unsigned argc, char **argv)
buf = xmalloc (strlen (command_line.rpath_link)
+ strlen (optarg)
+ 2);
- sprintf (buf, "%s:%s", command_line.rpath_link, optarg);
+ sprintf (buf, "%s%c%s", command_line.rpath_link,
+ config.rpath_separator, optarg);
free (command_line.rpath_link);
command_line.rpath_link = buf;
}
@@ -1109,7 +1152,10 @@ parse_args (unsigned argc, char **argv)
config.stats = TRUE;
break;
case OPTION_SYMBOLIC:
- link_info.symbolic = TRUE;
+ command_line.symbolic = symbolic;
+ break;
+ case OPTION_SYMBOLIC_FUNCTIONS:
+ command_line.symbolic = symbolic_functions;
break;
case 't':
trace_files = TRUE;
@@ -1119,6 +1165,9 @@ parse_args (unsigned argc, char **argv)
parser_input = input_script;
yyparse ();
break;
+ case OPTION_DEFAULT_SCRIPT:
+ command_line.default_script = optarg;
+ break;
case OPTION_SECTION_START:
{
char *optarg2;
@@ -1222,6 +1271,43 @@ parse_args (unsigned argc, char **argv)
.exports sections. */
command_line.version_exports_section = optarg;
break;
+ case OPTION_DYNAMIC_LIST_DATA:
+ command_line.dynamic_list = dynamic_list_data;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
+ break;
+ case OPTION_DYNAMIC_LIST_CPP_TYPEINFO:
+ lang_append_dynamic_list_cpp_typeinfo ();
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
+ break;
+ case OPTION_DYNAMIC_LIST_CPP_NEW:
+ lang_append_dynamic_list_cpp_new ();
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
+ break;
+ case OPTION_DYNAMIC_LIST:
+ /* This option indicates a small script that only specifies
+ a dynamic list. Read it, but don't assume that we've
+ seen a linker script. */
+ {
+ FILE *hold_script_handle;
+
+ hold_script_handle = saved_script_handle;
+ ldfile_open_command_file (optarg);
+ saved_script_handle = hold_script_handle;
+ parser_input = input_dynamic_list;
+ yyparse ();
+ }
+ if (command_line.dynamic_list != dynamic_list_data)
+ command_line.dynamic_list = dynamic_list;
+ if (command_line.symbolic == symbolic)
+ command_line.symbolic = symbolic_unset;
+ break;
case OPTION_WARN_COMMON:
config.warn_common = TRUE;
break;
@@ -1274,7 +1360,7 @@ parse_args (unsigned argc, char **argv)
link_info.discard = discard_all;
break;
case 'Y':
- if (strncmp (optarg, "P,", 2) == 0)
+ if (CONST_STRNEQ (optarg, "P,"))
optarg += 2;
if (default_dirlist != NULL)
free (default_dirlist);
@@ -1334,7 +1420,7 @@ parse_args (unsigned argc, char **argv)
break;
case OPTION_REDUCE_MEMORY_OVERHEADS:
- command_line.reduce_memory_overheads = TRUE;
+ link_info.reduce_memory_overheads = TRUE;
if (config.hash_table_size == 0)
config.hash_table_size = 1021;
break;
@@ -1552,5 +1638,6 @@ help (void)
ldemul_list_emulation_options (stdout);
printf ("\n");
- printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
+ if (REPORT_BUGS_TO[0])
+ printf (_("Report bugs to %s\n"), REPORT_BUGS_TO);
}
diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c
index 5330df3..8fe0160 100644
--- a/contrib/binutils/ld/mri.c
+++ b/contrib/binutils/ld/mri.c
@@ -1,6 +1,6 @@
/* mri.c -- handle MRI style linker scripts
Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -24,8 +24,8 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
Contributed by Steve Chamberlain <sac@cygnus.com>. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "ld.h"
#include "ldexp.h"
#include "ldlang.h"
diff --git a/contrib/binutils/ld/pe-dll.c b/contrib/binutils/ld/pe-dll.c
index d4d42e4..ab743ee 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, 2001, 2002, 2003, 2004, 2005
+ Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
@@ -20,8 +20,8 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "libiberty.h"
#include "safe-ctype.h"
@@ -42,6 +42,29 @@
#include "deffile.h"
#include "pe-dll.h"
+#ifdef pe_use_x86_64
+
+#define PE_IDATA4_SIZE 8
+#define PE_IDATA5_SIZE 8
+#include "pep-dll.h"
+#undef AOUTSZ
+#define AOUTSZ PEPAOUTSZ
+#define PEAOUTHDR PEPAOUTHDR
+
+#else
+
+#include "pe-dll.h"
+
+#endif
+
+#ifndef PE_IDATA4_SIZE
+#define PE_IDATA4_SIZE 4
+#endif
+
+#ifndef PE_IDATA5_SIZE
+#define PE_IDATA5_SIZE 4
+#endif
+
/* 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
@@ -49,7 +72,7 @@
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. */
+ See also: ld/emultempl/pe.em and ld/emultempl/pep.em. */
/* Auto-import feature by Paul Sokolovsky
@@ -95,13 +118,13 @@
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
+ IMAGE_IMPORT_DESCRIPTOR and stored in .idata$2 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
+ containing imported name. Here comes that "on 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
@@ -119,7 +142,7 @@
not, prohibiting that (detecting violation) would require more work on
behalf of loader than not doing it.
- See also: ld/emultempl/pe.em. */
+ See also: ld/emultempl/pe.em and ld/emultempl/pep.em. */
static void add_bfd_to_link (bfd *, const char *, struct bfd_link_info *);
@@ -144,38 +167,87 @@ static size_t edata_sz, reloc_sz;
static int runtime_pseudo_relocs_created = 0;
typedef struct
- {
- char *target_name;
- char *object_target;
- unsigned int imagebase_reloc;
- int pe_arch;
- int bfd_arch;
- int underscored;
- }
-pe_details_type;
+{
+ const char *name;
+ int len;
+}
+autofilter_entry_type;
typedef struct
- {
- char *name;
- int len;
- }
-autofilter_entry_type;
+{
+ const char *target_name;
+ const char *object_target;
+ unsigned int imagebase_reloc;
+ int pe_arch;
+ int bfd_arch;
+ bfd_boolean underscored;
+ const autofilter_entry_type* autofilter_symbollist;
+}
+pe_details_type;
+
+static const autofilter_entry_type autofilter_symbollist_generic[] =
+{
+ { STRING_COMMA_LEN (".text") },
+ /* Entry point symbols. */
+ { STRING_COMMA_LEN ("DllMain") },
+ { STRING_COMMA_LEN ("DllMainCRTStartup") },
+ { STRING_COMMA_LEN ("_DllMainCRTStartup") },
+ /* Runtime pseudo-reloc. */
+ { STRING_COMMA_LEN ("_pei386_runtime_relocator") },
+ { STRING_COMMA_LEN ("do_pseudo_reloc") },
+ { STRING_COMMA_LEN (NULL) }
+};
-#define PE_ARCH_i386 1
-#define PE_ARCH_sh 2
-#define PE_ARCH_mips 3
-#define PE_ARCH_arm 4
+static const autofilter_entry_type autofilter_symbollist_i386[] =
+{
+ { STRING_COMMA_LEN (".text") },
+ /* Entry point symbols, and entry hooks. */
+ { STRING_COMMA_LEN ("cygwin_crt0") },
+ { STRING_COMMA_LEN ("DllMain@12") },
+ { STRING_COMMA_LEN ("DllEntryPoint@0") },
+ { STRING_COMMA_LEN ("DllMainCRTStartup@12") },
+ { STRING_COMMA_LEN ("_cygwin_dll_entry@12") },
+ { STRING_COMMA_LEN ("_cygwin_crt0_common@8") },
+ { STRING_COMMA_LEN ("_cygwin_noncygwin_dll_entry@12") },
+ { STRING_COMMA_LEN ("cygwin_attach_dll") },
+ { STRING_COMMA_LEN ("cygwin_premain0") },
+ { STRING_COMMA_LEN ("cygwin_premain1") },
+ { STRING_COMMA_LEN ("cygwin_premain2") },
+ { STRING_COMMA_LEN ("cygwin_premain3") },
+ /* Runtime pseudo-reloc. */
+ { STRING_COMMA_LEN ("_pei386_runtime_relocator") },
+ { STRING_COMMA_LEN ("do_pseudo_reloc") },
+ /* Global vars that should not be exported. */
+ { STRING_COMMA_LEN ("impure_ptr") },
+ { STRING_COMMA_LEN ("_impure_ptr") },
+ { STRING_COMMA_LEN ("_fmode") },
+ { STRING_COMMA_LEN ("environ") },
+ { STRING_COMMA_LEN (NULL) }
+};
+
+#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
+#define PE_ARCH_arm_wince 6
-static pe_details_type pe_detail_list[] =
+static const pe_details_type pe_detail_list[] =
{
{
+#ifdef pe_use_x86_64
+ "pei-x86-64",
+ "pe-x86-64",
+ 3 /* R_IMAGEBASE */,
+#else
"pei-i386",
"pe-i386",
7 /* R_IMAGEBASE */,
+#endif
PE_ARCH_i386,
bfd_arch_i386,
- 1
+ TRUE,
+ autofilter_symbollist_i386
},
{
"pei-shl",
@@ -183,7 +255,8 @@ static pe_details_type pe_detail_list[] =
16 /* R_SH_IMAGEBASE */,
PE_ARCH_sh,
bfd_arch_sh,
- 1
+ TRUE,
+ autofilter_symbollist_generic
},
{
"pei-mips",
@@ -191,7 +264,8 @@ static pe_details_type pe_detail_list[] =
34 /* MIPS_R_RVA */,
PE_ARCH_mips,
bfd_arch_mips,
- 0
+ FALSE,
+ autofilter_symbollist_generic
},
{
"pei-arm-little",
@@ -199,7 +273,8 @@ static pe_details_type pe_detail_list[] =
11 /* ARM_RVA32 */,
PE_ARCH_arm,
bfd_arch_arm,
- 1
+ TRUE,
+ autofilter_symbollist_generic
},
{
"epoc-pei-arm-little",
@@ -207,83 +282,72 @@ static pe_details_type pe_detail_list[] =
11 /* ARM_RVA32 */,
PE_ARCH_arm_epoc,
bfd_arch_arm,
- 0
+ FALSE,
+ autofilter_symbollist_generic
+ },
+ {
+ "pei-arm-wince-little",
+ "pe-arm-wince-little",
+ 2, /* ARM_RVA32 on Windows CE, see bfd/coff-arm.c. */
+ PE_ARCH_arm_wince,
+ bfd_arch_arm,
+ FALSE,
+ autofilter_symbollist_generic
},
- { NULL, NULL, 0, 0, 0, 0 }
+ { NULL, NULL, 0, 0, 0, FALSE, NULL }
};
-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 },
- { "_pei386_runtime_relocator", 25 },
- { "do_pseudo_reloc", 15 },
- { "cygwin_crt0", 11 },
- { NULL, 0 }
-};
+static const pe_details_type *pe_details;
/* Do not specify library suffix explicitly, to allow for dllized versions. */
-static autofilter_entry_type autofilter_liblist[] =
+static const autofilter_entry_type autofilter_liblist[] =
{
- { "libcygwin", 9 },
- { "libgcc", 6 },
- { "libstdc++", 9 },
- { "libmingw32", 10 },
- { "libmingwex", 10 },
- { "libg2c", 6 },
- { "libsupc++", 9 },
- { "libobjc", 7 },
- { "libgcj", 6 },
- { NULL, 0 }
+ { STRING_COMMA_LEN ("libcegcc") },
+ { STRING_COMMA_LEN ("libcygwin") },
+ { STRING_COMMA_LEN ("libgcc") },
+ { STRING_COMMA_LEN ("libstdc++") },
+ { STRING_COMMA_LEN ("libmingw32") },
+ { STRING_COMMA_LEN ("libmingwex") },
+ { STRING_COMMA_LEN ("libg2c") },
+ { STRING_COMMA_LEN ("libsupc++") },
+ { STRING_COMMA_LEN ("libobjc") },
+ { STRING_COMMA_LEN ("libgcj") },
+ { STRING_COMMA_LEN (NULL) }
};
-static autofilter_entry_type autofilter_objlist[] =
+static const 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 },
- { "crtbegin.o", 10 },
- { "crtend.o", 8 },
- { NULL, 0 }
+ { STRING_COMMA_LEN ("crt0.o") },
+ { STRING_COMMA_LEN ("crt1.o") },
+ { STRING_COMMA_LEN ("crt2.o") },
+ { STRING_COMMA_LEN ("dllcrt1.o") },
+ { STRING_COMMA_LEN ("dllcrt2.o") },
+ { STRING_COMMA_LEN ("gcrt0.o") },
+ { STRING_COMMA_LEN ("gcrt1.o") },
+ { STRING_COMMA_LEN ("gcrt2.o") },
+ { STRING_COMMA_LEN ("crtbegin.o") },
+ { STRING_COMMA_LEN ("crtend.o") },
+ { STRING_COMMA_LEN (NULL) }
};
-static autofilter_entry_type autofilter_symbolprefixlist[] =
+static const autofilter_entry_type autofilter_symbolprefixlist[] =
{
- /* { "__imp_", 6 }, */
- /* Do __imp_ explicitly to save time. */
- { "__rtti_", 7 },
+ /* _imp_ is treated specially, as it is always underscored. */
+ /* { STRING_COMMA_LEN ("_imp_") }, */
+ /* Don't export some c++ symbols. */
+ { STRING_COMMA_LEN ("__rtti_") },
+ { STRING_COMMA_LEN ("__builtin_") },
/* Don't re-export auto-imported symbols. */
- { "_nm_", 4 },
- { "__builtin_", 10 },
+ { STRING_COMMA_LEN ("_nm_") },
/* 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 }
+ { STRING_COMMA_LEN ("_head_") },
+ { STRING_COMMA_LEN (NULL) }
};
-static autofilter_entry_type autofilter_symbolsuffixlist[] =
+static const autofilter_entry_type autofilter_symbolsuffixlist[] =
{
- { "_iname", 6 },
- { NULL, 0 }
+ { STRING_COMMA_LEN ("_iname") },
+ { STRING_COMMA_LEN (NULL) }
};
#define U(str) (pe_details->underscored ? "_" str : str)
@@ -383,6 +447,11 @@ pe_dll_add_excludes (const char *new_excludes, const int type)
free (local_copy);
}
+static bfd_boolean
+is_import (const char* n)
+{
+ return (CONST_STRNEQ (n, "__imp_"));
+}
/* abfd is a bfd containing n (or NULL)
It can be used for contextual checks. */
@@ -392,15 +461,11 @@ auto_export (bfd *abfd, def_file *d, const char *n)
{
int i;
struct exclude_list_struct *ex;
- autofilter_entry_type *afptr;
+ const autofilter_entry_type *afptr;
const char * libname = 0;
if (abfd && abfd->my_archive)
libname = lbasename (abfd->my_archive->filename);
- /* We should not re-export imported stuff. */
- if (strncmp (n, "_imp_", 5) == 0)
- return 0;
-
for (i = 0; i < d->num_exports; i++)
if (strcmp (d->exports[i].name, n) == 0)
return 0;
@@ -443,10 +508,10 @@ auto_export (bfd *abfd, def_file *d, const char *n)
/* Don't try to blindly exclude all symbols
that begin with '__'; this was tried and
- it is too restrictive. */
+ it is too restrictive. Instead we have
+ a target specific list to use: */
+ afptr = pe_details->autofilter_symbollist;
- /* Then, exclude specific symbols. */
- afptr = autofilter_symbollist;
while (afptr->name)
{
if (strcmp (n, afptr->name) == 0)
@@ -555,8 +620,12 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
/* We should not re-export imported stuff. */
{
- char *name = xmalloc (strlen (sn) + 2 + 6);
- sprintf (name, "%s%s", U("_imp_"), sn);
+ char *name;
+ if (is_import (sn))
+ continue;
+
+ name = xmalloc (strlen ("__imp_") + strlen (sn) + 1);
+ sprintf (name, "%s%s", "__imp_", sn);
blhe = bfd_link_hash_lookup (info->hash, name,
FALSE, FALSE, FALSE);
@@ -566,7 +635,7 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
continue;
}
- if (*sn == '_')
+ if (pe_details->underscored && *sn == '_')
sn++;
if (auto_export (b, pe_def_file, sn))
@@ -612,6 +681,9 @@ process_def_file (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info)
{
for (i = 0; i < NE; i++)
{
+ if (is_import (pe_def_file->exports[i].name))
+ continue;
+
if (strchr (pe_def_file->exports[i].name, '@'))
{
int lead_at = (*pe_def_file->exports[i].name == '@');
@@ -1181,6 +1253,12 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
switch BITS_AND_SHIFT (relocs[i]->howto->bitsize,
relocs[i]->howto->rightshift)
{
+#ifdef pe_use_x86_64
+ case BITS_AND_SHIFT (64, 0):
+ reloc_data[total_relocs].type = 10;
+ total_relocs++;
+ break;
+#endif
case BITS_AND_SHIFT (32, 0):
reloc_data[total_relocs].type = 3;
total_relocs++;
@@ -1646,21 +1724,21 @@ make_head (bfd *parent)
quick_reloc (abfd, 16, BFD_RELOC_RVA, 1);
save_relocs (id2);
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
+ bfd_set_section_size (abfd, id5, PE_IDATA5_SIZE);
+ d5 = xmalloc (PE_IDATA5_SIZE);
id5->contents = d5;
- memset (d5, 0, 4);
+ memset (d5, 0, PE_IDATA5_SIZE);
- bfd_set_section_size (abfd, id4, 4);
- d4 = xmalloc (4);
+ bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE);
+ d4 = xmalloc (PE_IDATA4_SIZE);
id4->contents = d4;
- memset (d4, 0, 4);
+ memset (d4, 0, PE_IDATA4_SIZE);
bfd_set_symtab (abfd, symtab, symptr);
bfd_set_section_contents (abfd, id2, d2, 0, 20);
- bfd_set_section_contents (abfd, id5, d5, 0, 4);
- bfd_set_section_contents (abfd, id4, d4, 0, 4);
+ bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
+ bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
bfd_make_readable (abfd);
return abfd;
@@ -1668,8 +1746,10 @@ make_head (bfd *parent)
/* .section .idata$4
.long 0
+ [.long 0] for PE+
.section .idata$5
.long 0
+ [.long 0] for PE+
.section idata$7
.global __my_dll_iname
__my_dll_iname:
@@ -1702,15 +1782,15 @@ make_tail (bfd *parent)
id7 = quick_section (abfd, ".idata$7", SEC_HAS_CONTENTS, 2);
quick_symbol (abfd, U (""), dll_symname, "_iname", id7, BSF_GLOBAL, 0);
- bfd_set_section_size (abfd, id4, 4);
- d4 = xmalloc (4);
+ bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE);
+ d4 = xmalloc (PE_IDATA4_SIZE);
id4->contents = d4;
- memset (d4, 0, 4);
+ memset (d4, 0, PE_IDATA4_SIZE);
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
+ bfd_set_section_size (abfd, id5, PE_IDATA5_SIZE);
+ d5 = xmalloc (PE_IDATA5_SIZE);
id5->contents = d5;
- memset (d5, 0, 4);
+ memset (d5, 0, PE_IDATA5_SIZE);
len = strlen (dll_filename) + 1;
if (len & 1)
@@ -1719,11 +1799,15 @@ make_tail (bfd *parent)
d7 = xmalloc (len);
id7->contents = d7;
strcpy ((char *) d7, dll_filename);
+ /* If len was odd, the above
+ strcpy leaves behind an undefined byte. That is harmless,
+ but we set it to 0 just so the binary dumps are pretty. */
+ d7[len - 1] = 0;
bfd_set_symtab (abfd, symtab, symptr);
- bfd_set_section_contents (abfd, id4, d4, 0, 4);
- bfd_set_section_contents (abfd, id5, d5, 0, 4);
+ bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
+ bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
bfd_set_section_contents (abfd, id7, d7, 0, len);
bfd_make_readable (abfd);
@@ -1751,7 +1835,7 @@ make_tail (bfd *parent)
.short <hint>
.asciz "function" xlate? (add underscore, kill at) */
-static unsigned char jmp_ix86_bytes[] =
+static const unsigned char jmp_ix86_bytes[] =
{
0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90
};
@@ -1763,7 +1847,7 @@ static unsigned char jmp_ix86_bytes[] =
nop
.dw __imp_function */
-static unsigned char jmp_sh_bytes[] =
+static const unsigned char jmp_sh_bytes[] =
{
0x01, 0xd0, 0x02, 0x60, 0x2b, 0x40, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00
};
@@ -1774,39 +1858,62 @@ static unsigned char jmp_sh_bytes[] =
jr $t0
nop */
-static unsigned char jmp_mips_bytes[] =
+static const unsigned char jmp_mips_bytes[] =
{
0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x08, 0x8d,
0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
};
+static const unsigned char jmp_arm_bytes[] =
+{
+ 0x00, 0xc0, 0x9f, 0xe5, /* ldr ip, [pc] */
+ 0x00, 0xf0, 0x9c, 0xe5, /* ldr pc, [ip] */
+ 0, 0, 0, 0
+};
+
+
static bfd *
-make_one (def_file_export *exp, bfd *parent)
+make_one (def_file_export *exp, bfd *parent, bfd_boolean include_jmp_stub)
{
asection *tx, *id7, *id5, *id4, *id6;
unsigned char *td = NULL, *d7, *d5, *d4, *d6 = NULL;
int len;
char *oname;
bfd *abfd;
- unsigned char *jmp_bytes = NULL;
+ const unsigned char *jmp_bytes = NULL;
int jmp_byte_count = 0;
- switch (pe_details->pe_arch)
+ /* Include the jump stub section only if it is needed. A jump
+ stub is needed if the symbol being imported <sym> is a function
+ symbol and there is at least one undefined reference to that
+ symbol. In other words, if all the import references to <sym> are
+ explicitly through _declspec(dllimport) then the jump stub is not
+ needed. */
+ if (include_jmp_stub)
{
- case PE_ARCH_i386:
- jmp_bytes = jmp_ix86_bytes;
- jmp_byte_count = sizeof (jmp_ix86_bytes);
- break;
- case PE_ARCH_sh:
- jmp_bytes = jmp_sh_bytes;
- jmp_byte_count = sizeof (jmp_sh_bytes);
- break;
- case PE_ARCH_mips:
- jmp_bytes = jmp_mips_bytes;
- jmp_byte_count = sizeof (jmp_mips_bytes);
- break;
- default:
- abort ();
+ switch (pe_details->pe_arch)
+ {
+ case PE_ARCH_i386:
+ jmp_bytes = jmp_ix86_bytes;
+ jmp_byte_count = sizeof (jmp_ix86_bytes);
+ break;
+ case PE_ARCH_sh:
+ jmp_bytes = jmp_sh_bytes;
+ jmp_byte_count = sizeof (jmp_sh_bytes);
+ break;
+ case PE_ARCH_mips:
+ jmp_bytes = jmp_mips_bytes;
+ jmp_byte_count = sizeof (jmp_mips_bytes);
+ break;
+ case PE_ARCH_arm:
+ case PE_ARCH_arm_epoc:
+ case PE_ARCH_arm_wince:
+ jmp_bytes = jmp_arm_bytes;
+ jmp_byte_count = sizeof (jmp_arm_bytes);
+ break;
+ default:
+ abort ();
+ }
}
oname = xmalloc (20);
@@ -1832,9 +1939,9 @@ make_one (def_file_export *exp, bfd *parent)
{
quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
BSF_GLOBAL, 0);
- if (! exp->flag_data)
+ if (include_jmp_stub)
quick_symbol (abfd, "", exp->internal_name, "", tx, BSF_GLOBAL, 0);
- quick_symbol (abfd, U ("_imp_"), exp->internal_name, "", id5,
+ quick_symbol (abfd, "__imp_", exp->internal_name, "", id5,
BSF_GLOBAL, 0);
/* Fastcall applies only to functions,
so no need for auto-import symbol. */
@@ -1843,22 +1950,22 @@ make_one (def_file_export *exp, bfd *parent)
{
quick_symbol (abfd, U ("_head_"), dll_symname, "", UNDSEC,
BSF_GLOBAL, 0);
- if (! exp->flag_data)
+ if (include_jmp_stub)
quick_symbol (abfd, U (""), exp->internal_name, "", tx,
BSF_GLOBAL, 0);
- quick_symbol (abfd, U ("_imp__"), exp->internal_name, "", id5,
+ quick_symbol (abfd, "__imp_", U (""), exp->internal_name, id5,
BSF_GLOBAL, 0);
/* Symbol to reference ord/name of imported
data symbol, used to implement auto-import. */
if (exp->flag_data)
- quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6,
+ quick_symbol (abfd, U ("_nm_"), U (""), 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)
+ if (include_jmp_stub)
{
bfd_set_section_size (abfd, tx, jmp_byte_count);
td = xmalloc (jmp_byte_count);
@@ -1868,7 +1975,11 @@ make_one (def_file_export *exp, bfd *parent)
switch (pe_details->pe_arch)
{
case PE_ARCH_i386:
- quick_reloc (abfd, 2, BFD_RELOC_32, 2);
+#ifdef pe_use_x86_64
+ quick_reloc (abfd, 2, BFD_RELOC_32_PCREL, 2);
+#else
+ quick_reloc (abfd, 2, BFD_RELOC_32, 2);
+#endif
break;
case PE_ARCH_sh:
quick_reloc (abfd, 8, BFD_RELOC_32, 2);
@@ -1878,11 +1989,18 @@ make_one (def_file_export *exp, bfd *parent)
quick_reloc (abfd, 0, BFD_RELOC_LO16, 0); /* MIPS_R_PAIR */
quick_reloc (abfd, 4, BFD_RELOC_LO16, 2);
break;
+ case PE_ARCH_arm:
+ case PE_ARCH_arm_epoc:
+ case PE_ARCH_arm_wince:
+ quick_reloc (abfd, 8, BFD_RELOC_32, 2);
+ break;
default:
abort ();
}
save_relocs (tx);
}
+ else
+ bfd_set_section_size (abfd, tx, 0);
bfd_set_section_size (abfd, id7, 4);
d7 = xmalloc (4);
@@ -1891,16 +2009,16 @@ make_one (def_file_export *exp, bfd *parent)
quick_reloc (abfd, 0, BFD_RELOC_RVA, 5);
save_relocs (id7);
- bfd_set_section_size (abfd, id5, 4);
- d5 = xmalloc (4);
+ bfd_set_section_size (abfd, id5, PE_IDATA5_SIZE);
+ d5 = xmalloc (PE_IDATA5_SIZE);
id5->contents = d5;
- memset (d5, 0, 4);
+ memset (d5, 0, PE_IDATA5_SIZE);
if (exp->flag_noname)
{
d5[0] = exp->ordinal;
d5[1] = exp->ordinal >> 8;
- d5[3] = 0x80;
+ d5[PE_IDATA5_SIZE - 1] = 0x80;
}
else
{
@@ -1908,16 +2026,16 @@ make_one (def_file_export *exp, bfd *parent)
save_relocs (id5);
}
- bfd_set_section_size (abfd, id4, 4);
- d4 = xmalloc (4);
+ bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE);
+ d4 = xmalloc (PE_IDATA4_SIZE);
id4->contents = d4;
- memset (d4, 0, 4);
+ memset (d4, 0, PE_IDATA4_SIZE);
if (exp->flag_noname)
{
d4[0] = exp->ordinal;
d4[1] = exp->ordinal >> 8;
- d4[3] = 0x80;
+ d4[PE_IDATA4_SIZE - 1] = 0x80;
}
else
{
@@ -1932,7 +2050,8 @@ make_one (def_file_export *exp, bfd *parent)
}
else
{
- len = strlen (exp->name) + 3;
+ /* { short, asciz } */
+ len = 2 + strlen (exp->name) + 1;
if (len & 1)
len++;
bfd_set_section_size (abfd, id6, len);
@@ -1946,10 +2065,11 @@ make_one (def_file_export *exp, bfd *parent)
bfd_set_symtab (abfd, symtab, symptr);
- bfd_set_section_contents (abfd, tx, td, 0, jmp_byte_count);
+ if (include_jmp_stub)
+ bfd_set_section_contents (abfd, tx, td, 0, jmp_byte_count);
bfd_set_section_contents (abfd, id7, d7, 0, 4);
- bfd_set_section_contents (abfd, id5, d5, 0, 4);
- bfd_set_section_contents (abfd, id4, d4, 0, 4);
+ bfd_set_section_contents (abfd, id5, d5, 0, PE_IDATA5_SIZE);
+ bfd_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE);
if (!exp->flag_noname)
bfd_set_section_contents (abfd, id6, d6, 0, len);
@@ -1983,16 +2103,17 @@ make_singleton_name_thunk (const char *import, bfd *parent)
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 = xmalloc (4);
+ /* We need space for the real thunk and for the null terminator. */
+ bfd_set_section_size (abfd, id4, PE_IDATA4_SIZE * 2);
+ d4 = xmalloc (PE_IDATA4_SIZE * 2);
id4->contents = d4;
- memset (d4, 0, 8);
+ memset (d4, 0, PE_IDATA4_SIZE * 2);
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_set_section_contents (abfd, id4, d4, 0, PE_IDATA4_SIZE * 2);
bfd_make_readable (abfd);
return abfd;
@@ -2036,19 +2157,10 @@ make_import_fixup_mark (arelent *rel)
current_sec, /* sym->section, */
rel->address, NULL, TRUE, FALSE, &bh);
- if (0)
- {
- struct coff_link_hash_entry *myh;
-
- myh = (struct coff_link_hash_entry *) bh;
- printf ("type:%d\n", myh->type);
- printf ("%s\n", myh->root.u.def.section->name);
- }
-
return fixup_name;
}
-/* .section .idata$3
+/* .section .idata$2
.rva __nm_thnk_SYM (singleton thunk with name of func)
.long 0
.long 0
@@ -2061,8 +2173,8 @@ make_import_fixup_entry (const char *name,
const char *dll_symname,
bfd *parent)
{
- asection *id3;
- unsigned char *d3;
+ asection *id2;
+ unsigned char *d2;
char *oname;
bfd *abfd;
@@ -2079,25 +2191,25 @@ make_import_fixup_entry (const char *name,
symptr = 0;
symtab = xmalloc (6 * sizeof (asymbol *));
- id3 = quick_section (abfd, ".idata$3", SEC_HAS_CONTENTS, 2);
+ id2 = quick_section (abfd, ".idata$2", SEC_HAS_CONTENTS, 2);
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 = xmalloc (20);
- id3->contents = d3;
- memset (d3, 0, 20);
+ bfd_set_section_size (abfd, id2, 20);
+ d2 = xmalloc (20);
+ id2->contents = d2;
+ memset (d2, 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);
+ save_relocs (id2);
bfd_set_symtab (abfd, symtab, symptr);
- bfd_set_section_contents (abfd, id3, d3, 0, 20);
+ bfd_set_section_contents (abfd, id2, d2, 0, 20);
bfd_make_readable (abfd);
return abfd;
@@ -2179,7 +2291,7 @@ pe_create_runtime_relocator_reference (bfd *parent)
symtab = xmalloc (2 * sizeof (asymbol *));
extern_rt_rel = quick_section (abfd, ".rdata", SEC_HAS_CONTENTS, 2);
- quick_symbol (abfd, "", "__pei386_runtime_relocator", "", UNDSEC,
+ quick_symbol (abfd, "", U ("_pei386_runtime_relocator"), "", UNDSEC,
BSF_NO_FLAGS, 0);
bfd_set_section_size (abfd, extern_rt_rel, 4);
@@ -2302,8 +2414,9 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
if (pe_def_file->exports[i].flag_private)
continue;
def->exports[i].internal_name = def->exports[i].name;
- n = make_one (def->exports + i, outarch);
- n->next = head;
+ n = make_one (def->exports + i, outarch,
+ ! (def->exports + i)->flag_data);
+ n->archive_next = head;
head = n;
def->exports[i].internal_name = internal;
}
@@ -2314,8 +2427,8 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
return;
/* Now stick them all into the archive. */
- ar_head->next = head;
- ar_tail->next = ar_head;
+ ar_head->archive_next = head;
+ ar_tail->archive_next = ar_head;
head = ar_tail;
if (! bfd_set_archive_head (outarch, head))
@@ -2326,7 +2439,7 @@ pe_dll_generate_implib (def_file *def, const char *impfilename)
while (head != NULL)
{
- bfd *n = head->next;
+ bfd *n = head->archive_next;
bfd_close (head);
head = n;
}
@@ -2378,9 +2491,10 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info)
/* See if we need this import. */
size_t len = strlen (pe_def_file->imports[i].internal_name);
char *name = xmalloc (len + 2 + 6);
+ bfd_boolean include_jmp_stub = FALSE;
if (lead_at)
- sprintf (name, "%s%s", "",
+ sprintf (name, "%s",
pe_def_file->imports[i].internal_name);
else
sprintf (name, "%s%s",U (""),
@@ -2389,18 +2503,23 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info)
blhe = bfd_link_hash_lookup (link_info->hash, name,
FALSE, FALSE, FALSE);
+ /* Include the jump stub for <sym> only if the <sym>
+ is undefined. */
if (!blhe || (blhe && blhe->type != bfd_link_hash_undefined))
{
if (lead_at)
- sprintf (name, "%s%s", U ("_imp_"),
+ sprintf (name, "%s%s", "__imp_",
pe_def_file->imports[i].internal_name);
else
- sprintf (name, "%s%s", U ("_imp__"),
+ sprintf (name, "%s%s%s", "__imp_", U (""),
pe_def_file->imports[i].internal_name);
blhe = bfd_link_hash_lookup (link_info->hash, name,
FALSE, FALSE, FALSE);
}
+ else
+ include_jmp_stub = TRUE;
+
free (name);
if (blhe && blhe->type == bfd_link_hash_undefined)
@@ -2421,7 +2540,7 @@ pe_process_import_defs (bfd *output_bfd, struct bfd_link_info *link_info)
exp.flag_constant = 0;
exp.flag_data = pe_def_file->imports[i].data;
exp.flag_noname = exp.name ? 0 : 1;
- one = make_one (&exp, output_bfd);
+ one = make_one (&exp, output_bfd, (! exp.flag_data) && include_jmp_stub);
add_bfd_to_link (one, one->filename, link_info);
}
}
@@ -2506,13 +2625,23 @@ pe_implied_import_dll (const char *filename)
/* Get pe_header, optional header and numbers of export entries. */
pe_header_offset = pe_get32 (dll, 0x3c);
opthdr_ofs = pe_header_offset + 4 + 20;
+#ifdef pe_use_x86_64
+ num_entries = pe_get32 (dll, opthdr_ofs + 92 + 4 * 4); /* & NumberOfRvaAndSizes. */
+#else
num_entries = pe_get32 (dll, opthdr_ofs + 92);
+#endif
if (num_entries < 1) /* No exports. */
return FALSE;
+#ifdef pe_use_x86_64
+ export_rva = pe_get32 (dll, opthdr_ofs + 96 + 4 * 4);
+ export_size = pe_get32 (dll, opthdr_ofs + 100 + 4 * 4);
+#else
export_rva = pe_get32 (dll, opthdr_ofs + 96);
export_size = pe_get32 (dll, opthdr_ofs + 100);
+#endif
+
nsections = pe_get16 (dll, pe_header_offset + 4 + 2);
secptr = (pe_header_offset + 4 + 20 +
pe_get16 (dll, pe_header_offset + 4 + 16));
@@ -2622,7 +2751,7 @@ pe_implied_import_dll (const char *filename)
/* Skip unwanted symbols, which are
exported in buggy auto-import releases. */
- if (strncmp (erva + name_rva, "_nm_", 4) != 0)
+ if (! CONST_STRNEQ (erva + name_rva, "_nm_"))
{
/* is_data is true if the address is in the data, rdata or bss
segment. */
@@ -2725,3 +2854,11 @@ pe_exe_fill_sections (bfd *abfd, struct bfd_link_info *info)
}
reloc_s->contents = reloc_d;
}
+
+bfd_boolean
+pe_bfd_is_dll (bfd *abfd)
+{
+ return (bfd_get_format (abfd) == bfd_object
+ && obj_pe (abfd)
+ && pe_data (abfd)->dll);
+}
diff --git a/contrib/binutils/ld/pe-dll.h b/contrib/binutils/ld/pe-dll.h
index c79e563..03b755d 100644
--- a/contrib/binutils/ld/pe-dll.h
+++ b/contrib/binutils/ld/pe-dll.h
@@ -1,5 +1,6 @@
/* pe-dll.h: Header file for routines used to build Windows DLLs.
- Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2007
+ Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -21,8 +22,8 @@
#ifndef PE_DLL_H
#define PE_DLL_H
-#include "bfd.h"
#include "sysdep.h"
+#include "bfd.h"
#include "bfdlink.h"
#include "deffile.h"
@@ -59,4 +60,7 @@ extern void pe_walk_relocs_of_symbol
(struct bfd_link_info *, const char *, int (*) (arelent *, asection *));
extern void pe_create_import_fixup
(arelent * rel, asection *, int);
+extern bfd_boolean pe_bfd_is_dll
+ (bfd *);
+
#endif /* PE_DLL_H */
diff --git a/contrib/binutils/ld/pep-dll.c b/contrib/binutils/ld/pep-dll.c
new file mode 100644
index 0000000..e1826db
--- /dev/null
+++ b/contrib/binutils/ld/pep-dll.c
@@ -0,0 +1,58 @@
+/* Routines to help build PEPI-format DLLs (Win64 etc)
+ Copyright 2006 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Kai Tietz, OneVision Software GmbH&CoKg. */
+
+#define COFF_IMAGE_WITH_PE
+#define COFF_WITH_PE
+#define COFF_WITH_pex64
+
+/* Local defined globals. */
+#define pe_def_file pep_def_file
+#define pe_details pep_details
+#define pe_dll_compat_implib pep_dll_compat_implib
+#define pe_dll_extra_pe_debug pep_dll_extra_pe_debug
+#define pe_dll_export_everything pep_dll_export_everything
+#define pe_dll_do_default_excludes pep_dll_do_default_excludes
+#define pe_dll_kill_ats pep_dll_kill_ats
+#define pe_dll_stdcall_aliases pep_dll_stdcall_aliases
+#define pe_dll_warn_dup_exports pep_dll_warn_dup_exports
+
+/* External globals. */
+#define pe_data_import_dll pep_data_import_dll
+
+/* Unique global name for functions to avoid double defined symbols. */
+#define pe_create_import_fixup pep_create_import_fixup
+#define pe_dll_generate_def_file pep_dll_generate_def_file
+#define pe_process_import_defs pep_process_import_defs
+#define pe_dll_id_target pep_dll_id_target
+#define pe_implied_import_dll pep_implied_import_dll
+#define pe_dll_build_sections pep_dll_build_sections
+#define pe_exe_build_sections pep_exe_build_sections
+#define pe_dll_fill_sections pep_dll_fill_sections
+#define pe_exe_fill_sections pep_exe_fill_sections
+#define pe_dll_generate_implib pep_dll_generate_implib
+#define pe_dll_add_excludes pep_dll_add_excludes
+#define pe_walk_relocs_of_symbol pep_walk_relocs_of_symbol
+#define pe_bfd_is_dll pep_bfd_is_dll
+
+/* Uses x86_64 PE+. */
+#define pe_use_x86_64
+
+#include "pe-dll.c"
diff --git a/contrib/binutils/ld/pep-dll.h b/contrib/binutils/ld/pep-dll.h
new file mode 100644
index 0000000..ee8a44a
--- /dev/null
+++ b/contrib/binutils/ld/pep-dll.h
@@ -0,0 +1,54 @@
+/* pep-dll.h: Header file for routines used to build Windows DLLs.
+ Copyright 2006, 2007 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+ Written by Kai Tietz, OneVision Software GmbH&CoKg. */
+
+#ifndef PEP_DLL_H
+#define PEP_DLL_H
+
+#include "sysdep.h"
+#include "bfd.h"
+#include "bfdlink.h"
+#include "deffile.h"
+
+extern def_file * pep_def_file;
+extern int pep_dll_export_everything;
+extern int pep_dll_do_default_excludes;
+extern int pep_dll_kill_ats;
+extern int pep_dll_stdcall_aliases;
+extern int pep_dll_warn_dup_exports;
+extern int pep_dll_compat_implib;
+extern int pep_dll_extra_pe_debug;
+
+extern void pep_dll_id_target (const char *);
+extern void pep_dll_add_excludes (const char *, const int);
+extern void pep_dll_generate_def_file (const char *);
+extern void pep_dll_generate_implib (def_file *, const char *);
+extern void pep_process_import_defs (bfd *, struct bfd_link_info *);
+extern bfd_boolean pep_implied_import_dll (const char *);
+extern void pep_dll_build_sections (bfd *, struct bfd_link_info *);
+extern void pep_exe_build_sections (bfd *, struct bfd_link_info *);
+extern void pep_dll_fill_sections (bfd *, struct bfd_link_info *);
+extern void pep_exe_fill_sections (bfd *, struct bfd_link_info *);
+extern void pep_walk_relocs_of_symbol
+ (struct bfd_link_info *, const char *, int (*) (arelent *, asection *));
+extern void pep_create_import_fixup (arelent * rel, asection *, int);
+extern bfd_boolean pep_bfd_is_dll (bfd *);
+
+#endif /* PEP_DLL_H */
diff --git a/contrib/binutils/ld/po/Make-in b/contrib/binutils/ld/po/Make-in
index dcd8cba..b4ffbb7 100644
--- a/contrib/binutils/ld/po/Make-in
+++ b/contrib/binutils/ld/po/Make-in
@@ -16,6 +16,7 @@ SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
+top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -72,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
$(MSGFMT) -o $@ $<
.po.gmo:
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
diff --git a/contrib/binutils/ld/po/POTFILES.in b/contrib/binutils/ld/po/POTFILES.in
index 5bb2e11..3118cfa 100644
--- a/contrib/binutils/ld/po/POTFILES.in
+++ b/contrib/binutils/ld/po/POTFILES.in
@@ -28,3 +28,5 @@ mri.c
mri.h
pe-dll.c
pe-dll.h
+pep-dll.c
+pep-dll.h
diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot
index 549ecf4..155f20e 100644
--- a/contrib/binutils/ld/po/ld.pot
+++ b/contrib/binutils/ld/po/ld.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-03-25 18:36+0100\n"
+"POT-Creation-Date: 2007-06-27 16:44+0930\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -31,167 +31,167 @@ msgstr ""
msgid "Errors encountered processing file %s"
msgstr ""
-#: emultempl/armcoff.em:190 emultempl/pe.em:1460
+#: emultempl/armcoff.em:189 emultempl/pe.em:1528
msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"
msgstr ""
-#: emultempl/armcoff.em:195 emultempl/pe.em:1465
+#: emultempl/armcoff.em:194 emultempl/pe.em:1533
msgid "%P: warning: connot find thumb start symbol %s\n"
msgstr ""
-#: emultempl/pe.em:304
+#: emultempl/pe.em:311
#, c-format
msgid ""
" --base_file <basefile> Generate a base file for relocatable "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:305
+#: emultempl/pe.em:312
#, c-format
msgid ""
" --dll Set image base to the default for DLLs\n"
msgstr ""
-#: emultempl/pe.em:306
+#: emultempl/pe.em:313
#, c-format
msgid " --file-alignment <size> Set file alignment\n"
msgstr ""
-#: emultempl/pe.em:307
+#: emultempl/pe.em:314
#, c-format
msgid " --heap <size> Set initial size of the heap\n"
msgstr ""
-#: emultempl/pe.em:308
+#: emultempl/pe.em:315
#, c-format
msgid ""
" --image-base <address> Set start address of the executable\n"
msgstr ""
-#: emultempl/pe.em:309
+#: emultempl/pe.em:316
#, c-format
msgid ""
" --major-image-version <number> Set version number of the executable\n"
msgstr ""
-#: emultempl/pe.em:310
+#: emultempl/pe.em:317
#, c-format
msgid " --major-os-version <number> Set minimum required OS version\n"
msgstr ""
-#: emultempl/pe.em:311
+#: emultempl/pe.em:318
#, c-format
msgid ""
" --major-subsystem-version <number> Set minimum required OS subsystem "
"version\n"
msgstr ""
-#: emultempl/pe.em:312
+#: emultempl/pe.em:319
#, c-format
msgid ""
" --minor-image-version <number> Set revision number of the executable\n"
msgstr ""
-#: emultempl/pe.em:313
+#: emultempl/pe.em:320
#, c-format
msgid " --minor-os-version <number> Set minimum required OS revision\n"
msgstr ""
-#: emultempl/pe.em:314
+#: emultempl/pe.em:321
#, c-format
msgid ""
" --minor-subsystem-version <number> Set minimum required OS subsystem "
"revision\n"
msgstr ""
-#: emultempl/pe.em:315
+#: emultempl/pe.em:322
#, c-format
msgid " --section-alignment <size> Set section alignment\n"
msgstr ""
-#: emultempl/pe.em:316
+#: emultempl/pe.em:323
#, c-format
msgid " --stack <size> Set size of the initial stack\n"
msgstr ""
-#: emultempl/pe.em:317
+#: emultempl/pe.em:324
#, c-format
msgid ""
" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"
msgstr ""
-#: emultempl/pe.em:318
+#: emultempl/pe.em:325
#, c-format
msgid ""
" --support-old-code Support interworking with old code\n"
msgstr ""
-#: emultempl/pe.em:319
+#: emultempl/pe.em:326
#, c-format
msgid ""
" --thumb-entry=<symbol> Set the entry point to be Thumb "
"<symbol>\n"
msgstr ""
-#: emultempl/pe.em:321
+#: emultempl/pe.em:328
#, c-format
msgid ""
" --add-stdcall-alias Export symbols with and without @nn\n"
msgstr ""
-#: emultempl/pe.em:322
+#: emultempl/pe.em:329
#, c-format
msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n"
msgstr ""
-#: emultempl/pe.em:323
+#: emultempl/pe.em:330
#, c-format
msgid ""
" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"
msgstr ""
-#: emultempl/pe.em:324
+#: emultempl/pe.em:331
#, c-format
msgid ""
" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"
msgstr ""
-#: emultempl/pe.em:325
+#: emultempl/pe.em:332
#, c-format
msgid ""
" --exclude-libs lib,lib,... Exclude libraries from automatic "
"export\n"
msgstr ""
-#: emultempl/pe.em:326
+#: emultempl/pe.em:333
#, c-format
msgid ""
" --export-all-symbols Automatically export all globals to "
"DLL\n"
msgstr ""
-#: emultempl/pe.em:327
+#: emultempl/pe.em:334
#, c-format
msgid " --kill-at Remove @nn from exported symbols\n"
msgstr ""
-#: emultempl/pe.em:328
+#: emultempl/pe.em:335
#, c-format
msgid " --out-implib <file> Generate import library\n"
msgstr ""
-#: emultempl/pe.em:329
+#: emultempl/pe.em:336
#, c-format
msgid ""
" --output-def <file> Generate a .DEF file for the built DLL\n"
msgstr ""
-#: emultempl/pe.em:330
+#: emultempl/pe.em:337
#, c-format
msgid " --warn-duplicate-exports Warn about duplicate exports.\n"
msgstr ""
-#: emultempl/pe.em:331
+#: emultempl/pe.em:338
#, c-format
msgid ""
" --compat-implib Create backward compatible import "
@@ -199,7 +199,7 @@ msgid ""
" create __imp_<SYMBOL> as well.\n"
msgstr ""
-#: emultempl/pe.em:333
+#: emultempl/pe.em:340
#, c-format
msgid ""
" --enable-auto-image-base Automatically choose image base for "
@@ -207,14 +207,14 @@ msgid ""
" unless user specifies one\n"
msgstr ""
-#: emultempl/pe.em:335
+#: emultempl/pe.em:342
#, c-format
msgid ""
" --disable-auto-image-base Do not auto-choose image base. "
"(default)\n"
msgstr ""
-#: emultempl/pe.em:336
+#: emultempl/pe.em:343
#, c-format
msgid ""
" --dll-search-prefix=<string> When linking dynamically to a dll "
@@ -224,21 +224,21 @@ msgid ""
" in preference to lib<basename>.dll \n"
msgstr ""
-#: emultempl/pe.em:339
+#: emultempl/pe.em:346
#, c-format
msgid ""
" --enable-auto-import Do sophistcated linking of _sym to\n"
" __imp_sym for DATA references\n"
msgstr ""
-#: emultempl/pe.em:341
+#: emultempl/pe.em:348
#, c-format
msgid ""
" --disable-auto-import Do not auto-import DATA items from "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:342
+#: emultempl/pe.em:349
#, c-format
msgid ""
" --enable-runtime-pseudo-reloc Work around auto-import limitations by\n"
@@ -247,7 +247,7 @@ msgid ""
" runtime.\n"
msgstr ""
-#: emultempl/pe.em:345
+#: emultempl/pe.em:352
#, c-format
msgid ""
" --disable-runtime-pseudo-reloc Do not add runtime pseudo-relocations "
@@ -255,7 +255,7 @@ msgid ""
" auto-imported DATA.\n"
msgstr ""
-#: emultempl/pe.em:347
+#: emultempl/pe.em:354
#, c-format
msgid ""
" --enable-extra-pe-debug Enable verbose debug output when "
@@ -264,89 +264,93 @@ msgid ""
"import)\n"
msgstr ""
-#: emultempl/pe.em:350
+#: emultempl/pe.em:357
#, c-format
msgid ""
" --large-address-aware Executable supports virtual addresses\n"
" greater than 2 gigabytes\n"
msgstr ""
-#: emultempl/pe.em:417
+#: emultempl/pe.em:424
msgid "%P: warning: bad version number in -subsystem option\n"
msgstr ""
-#: emultempl/pe.em:448
+#: emultempl/pe.em:455
msgid "%P%F: invalid subsystem type %s\n"
msgstr ""
-#: emultempl/pe.em:487
+#: emultempl/pe.em:494
msgid "%P%F: invalid hex number for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:504
+#: emultempl/pe.em:511
msgid "%P%F: strange hex info for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:521
+#: emultempl/pe.em:528
#, c-format
msgid "%s: Can't open base file %s\n"
msgstr ""
-#: emultempl/pe.em:737
+#: emultempl/pe.em:744
msgid "%P: warning, file alignment > section alignment.\n"
msgstr ""
-#: emultempl/pe.em:824 emultempl/pe.em:851
+#: emultempl/pe.em:831 emultempl/pe.em:858
#, c-format
msgid "Warning: resolving %s by linking to %s\n"
msgstr ""
-#: emultempl/pe.em:829 emultempl/pe.em:856
+#: emultempl/pe.em:836 emultempl/pe.em:863
msgid "Use --enable-stdcall-fixup to disable these warnings\n"
msgstr ""
-#: emultempl/pe.em:830 emultempl/pe.em:857
+#: emultempl/pe.em:837 emultempl/pe.em:864
msgid "Use --disable-stdcall-fixup to disable these fixups\n"
msgstr ""
-#: emultempl/pe.em:876
+#: emultempl/pe.em:883
#, c-format
msgid "%C: Cannot get section contents - auto-import exception\n"
msgstr ""
-#: emultempl/pe.em:913
+#: emultempl/pe.em:920
#, c-format
msgid "Info: resolving %s by linking to %s (auto-import)\n"
msgstr ""
-#: emultempl/pe.em:986
-msgid "%F%P: PE operations on non PE file.\n"
+#: emultempl/pe.em:992
+msgid "%F%P: cannot perform PE operations on non PE output file '%B'.\n"
msgstr ""
-#: emultempl/pe.em:1261
+#: emultempl/pe.em:1334
#, c-format
msgid "Errors encountered processing file %s\n"
msgstr ""
-#: emultempl/pe.em:1284
+#: emultempl/pe.em:1357
#, c-format
msgid "Errors encountered processing file %s for interworking"
msgstr ""
-#: emultempl/pe.em:1345 ldexp.c:522 ldlang.c:2946 ldlang.c:5800 ldlang.c:5831
+#: emultempl/pe.em:1418 ldexp.c:530 ldlang.c:3082 ldlang.c:6087 ldlang.c:6118
#: ldmain.c:1167
msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
msgstr ""
-#: ldcref.c:154
+#: ldcref.c:166
msgid "%X%P: bfd_hash_table_init of cref table failed: %E\n"
msgstr ""
-#: ldcref.c:160
+#: ldcref.c:172
msgid "%X%P: cref_hash_lookup failed: %E\n"
msgstr ""
-#: ldcref.c:226
+#: ldcref.c:182
+msgid "%X%P: cref alloc failed: %E\n"
+msgstr ""
+
+#: ldcref.c:362
#, c-format
msgid ""
"\n"
@@ -354,33 +358,33 @@ msgid ""
"\n"
msgstr ""
-#: ldcref.c:227
+#: ldcref.c:363
msgid "Symbol"
msgstr ""
-#: ldcref.c:235
+#: ldcref.c:371
#, c-format
msgid "File\n"
msgstr ""
-#: ldcref.c:239
+#: ldcref.c:375
#, c-format
msgid "No symbols\n"
msgstr ""
-#: ldcref.c:360 ldcref.c:482
+#: ldcref.c:496 ldcref.c:618
msgid "%B%F: could not read symbols; %E\n"
msgstr ""
-#: ldcref.c:364 ldcref.c:486 ldmain.c:1232 ldmain.c:1236
+#: ldcref.c:500 ldcref.c:622 ldmain.c:1232 ldmain.c:1236
msgid "%B%F: could not read symbols: %E\n"
msgstr ""
-#: ldcref.c:415
+#: ldcref.c:551
msgid "%P: symbol `%T' missing from main hash table\n"
msgstr ""
-#: ldcref.c:557 ldcref.c:564 ldmain.c:1279 ldmain.c:1286
+#: ldcref.c:693 ldcref.c:700 ldmain.c:1279 ldmain.c:1286
msgid "%B%F: could not read relocs: %E\n"
msgstr ""
@@ -388,7 +392,7 @@ 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:591
+#: ldcref.c:727
msgid "%X%C: prohibited cross reference from %s to `%T' in %s\n"
msgstr ""
@@ -415,85 +419,95 @@ msgid ""
"\n"
msgstr ""
-#: ldemul.c:236
+#: ldemul.c:235
#, c-format
msgid "%S SYSLIB ignored\n"
msgstr ""
-#: ldemul.c:242
+#: ldemul.c:241
#, c-format
msgid "%S HLL ignored\n"
msgstr ""
-#: ldemul.c:262
+#: ldemul.c:261
msgid "%P: unrecognised emulation mode: %s\n"
msgstr ""
-#: ldemul.c:263
+#: ldemul.c:262
msgid "Supported emulations: "
msgstr ""
-#: ldemul.c:305
+#: ldemul.c:304
#, c-format
msgid " no emulation specific options.\n"
msgstr ""
-#: ldexp.c:338
+#: ldexp.c:344
#, c-format
msgid "%F%S %% by zero\n"
msgstr ""
-#: ldexp.c:346
+#: ldexp.c:352
#, c-format
msgid "%F%S / by zero\n"
msgstr ""
-#: ldexp.c:536
+#: ldexp.c:544
#, c-format
msgid "%X%S: unresolvable symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:547
+#: ldexp.c:555
#, c-format
msgid "%F%S: undefined symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:608 ldexp.c:621
+#: ldexp.c:576 ldexp.c:593 ldexp.c:619
+#, c-format
+msgid "%F%S: undefined section `%s' referenced in expression\n"
+msgstr ""
+
+#: ldexp.c:645 ldexp.c:658
#, c-format
msgid "%F%S: undefined MEMORY region `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:683
+#: ldexp.c:669
+#, c-format
+msgid "%F%S: unknown constant `%s' referenced in expression\n"
+msgstr ""
+
+#: ldexp.c:730
#, c-format
msgid "%F%S can not PROVIDE assignment to location counter\n"
msgstr ""
-#: ldexp.c:697
+#: ldexp.c:744
#, c-format
msgid "%F%S invalid assignment to location counter\n"
msgstr ""
-#: ldexp.c:700
+#: ldexp.c:747
#, c-format
msgid "%F%S assignment to location counter invalid outside of SECTION\n"
msgstr ""
-#: ldexp.c:709
+#: ldexp.c:756
msgid "%F%S cannot move location counter backwards (from %V to %V)\n"
msgstr ""
-#: ldexp.c:748
+#: ldexp.c:795
msgid "%P%F:%s: hash creation failed\n"
msgstr ""
-#: ldexp.c:1000 ldexp.c:1025
+#: ldexp.c:1054 ldexp.c:1079
#, c-format
msgid "%F%S nonconstant expression for %s\n"
msgstr ""
-#: ldexp.c:1082
+#: ldexp.c:1138
#, c-format
-msgid "%F%S non constant expression for %s\n"
+msgid "%F%S: nonconstant expression for %s\n"
msgstr ""
#: ldfile.c:139
@@ -510,88 +524,96 @@ msgstr ""
msgid "%F%P: invalid BFD target `%s'\n"
msgstr ""
-#: ldfile.c:255 ldfile.c:282
+#: ldfile.c:256 ldfile.c:285
msgid "%P: skipping incompatible %s when searching for %s\n"
msgstr ""
-#: ldfile.c:267
+#: ldfile.c:269
msgid "%F%P: attempted static link of dynamic object `%s'\n"
msgstr ""
-#: ldfile.c:384
+#: ldfile.c:388
msgid "%F%P: %s (%s): No such file: %E\n"
msgstr ""
-#: ldfile.c:387
+#: ldfile.c:391
msgid "%F%P: %s: No such file: %E\n"
msgstr ""
-#: ldfile.c:417
+#: ldfile.c:421
msgid "%F%P: cannot find %s inside %s\n"
msgstr ""
-#: ldfile.c:420
+#: ldfile.c:424
msgid "%F%P: cannot find %s\n"
msgstr ""
-#: ldfile.c:437 ldfile.c:453
+#: ldfile.c:441 ldfile.c:457
#, c-format
msgid "cannot find script file %s\n"
msgstr ""
-#: ldfile.c:439 ldfile.c:455
+#: ldfile.c:443 ldfile.c:459
#, c-format
msgid "opened script file %s\n"
msgstr ""
-#: ldfile.c:499
+#: ldfile.c:503
msgid "%P%F: cannot open linker script file %s: %E\n"
msgstr ""
-#: ldfile.c:546
+#: ldfile.c:550
msgid "%P%F: cannot represent machine `%s'\n"
msgstr ""
-#: ldlang.c:940 ldlang.c:982 ldlang.c:2695
+#: ldlang.c:1069 ldlang.c:1111 ldlang.c:2831
msgid "%P%F: can not create hash table: %E\n"
msgstr ""
-#: ldlang.c:1025
+#: ldlang.c:1154
msgid "%P:%S: warning: redeclaration of memory region '%s'\n"
msgstr ""
-#: ldlang.c:1031
+#: ldlang.c:1160
msgid "%P:%S: warning: memory region %s not declared\n"
msgstr ""
-#: ldlang.c:1108 ldlang.c:1135
+#: ldlang.c:1240 ldlang.c:1270
msgid "%P%F: failed creating section `%s': %E\n"
msgstr ""
-#: ldlang.c:1601
+#: ldlang.c:1754
+#, c-format
+msgid ""
+"\n"
+"Discarded input sections\n"
+"\n"
+msgstr ""
+
+#: ldlang.c:1762
msgid ""
"\n"
"Memory Configuration\n"
"\n"
msgstr ""
-#: ldlang.c:1603
+#: ldlang.c:1764
msgid "Name"
msgstr ""
-#: ldlang.c:1603
+#: ldlang.c:1764
msgid "Origin"
msgstr ""
-#: ldlang.c:1603
+#: ldlang.c:1764
msgid "Length"
msgstr ""
-#: ldlang.c:1603
+#: ldlang.c:1764
msgid "Attributes"
msgstr ""
-#: ldlang.c:1643
+#: ldlang.c:1804
#, c-format
msgid ""
"\n"
@@ -599,237 +621,240 @@ msgid ""
"\n"
msgstr ""
-#: ldlang.c:1709
+#: ldlang.c:1871
msgid "%P%F: Illegal use of `%s' section\n"
msgstr ""
-#: ldlang.c:1716
+#: ldlang.c:1879
msgid "%P%F: output format %s cannot represent section called %s\n"
msgstr ""
-#: ldlang.c:2313
+#: ldlang.c:2429
msgid "%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:2314
+#: ldlang.c:2430
msgid "%B: matching formats:"
msgstr ""
-#: ldlang.c:2321
+#: ldlang.c:2437
msgid "%F%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:2385
+#: ldlang.c:2507
msgid "%F%B: member %B in archive is not an object\n"
msgstr ""
-#: ldlang.c:2396 ldlang.c:2410
+#: ldlang.c:2518 ldlang.c:2532
msgid "%F%B: could not read symbols: %E\n"
msgstr ""
-#: ldlang.c:2665
+#: ldlang.c:2801
msgid ""
"%P: warning: could not find any targets that match endianness requirement\n"
msgstr ""
-#: ldlang.c:2679
+#: ldlang.c:2815
msgid "%P%F: target %s not found\n"
msgstr ""
-#: ldlang.c:2681
+#: ldlang.c:2817
msgid "%P%F: cannot open output file %s: %E\n"
msgstr ""
-#: ldlang.c:2687
+#: ldlang.c:2823
msgid "%P%F:%s: can not make object file: %E\n"
msgstr ""
-#: ldlang.c:2691
+#: ldlang.c:2827
msgid "%P%F:%s: can not set architecture: %E\n"
msgstr ""
-#: ldlang.c:2839
+#: ldlang.c:2975
msgid "%P%F: bfd_hash_lookup failed creating symbol %s\n"
msgstr ""
-#: ldlang.c:2857
+#: ldlang.c:2993
msgid "%P%F: bfd_hash_allocate failed creating symbol %s\n"
msgstr ""
-#: ldlang.c:3288
+#: ldlang.c:3426
msgid " load address 0x%V"
msgstr ""
-#: ldlang.c:3528
+#: ldlang.c:3661
msgid "%W (size before relaxing)\n"
msgstr ""
-#: ldlang.c:3615
+#: ldlang.c:3747
#, c-format
msgid "Address of section %s set to "
msgstr ""
-#: ldlang.c:3768
+#: ldlang.c:3900
#, c-format
msgid "Fail with %d\n"
msgstr ""
-#: ldlang.c:4040
+#: ldlang.c:4172
msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
msgstr ""
-#: ldlang.c:4065
+#: ldlang.c:4197
msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
msgstr ""
-#: ldlang.c:4074
+#: ldlang.c:4206
msgid "%X%P: region %s is full (%B section %s)\n"
msgstr ""
-#: ldlang.c:4114
+#: ldlang.c:4247
#, c-format
msgid ""
"%F%S: non constant or forward reference address expression for section %s\n"
msgstr ""
-#: ldlang.c:4139
+#: ldlang.c:4272
msgid "%P%X: Internal error on COFF shared library section %s\n"
msgstr ""
-#: ldlang.c:4197
+#: ldlang.c:4331
msgid "%P%F: error: no memory region specified for loadable section `%s'\n"
msgstr ""
-#: ldlang.c:4202
+#: ldlang.c:4336
msgid "%P: warning: no memory region specified for loadable section `%s'\n"
msgstr ""
-#: ldlang.c:4224
+#: ldlang.c:4358
msgid "%P: warning: changing start of section %s by %lu bytes\n"
msgstr ""
-#: ldlang.c:4388
+#: ldlang.c:4437
+msgid "%P: warning: dot moved backwards before `%s'\n"
+msgstr ""
+
+#: ldlang.c:4609
msgid "%P%F: can't relax section: %E\n"
msgstr ""
-#: ldlang.c:4636
+#: ldlang.c:4898
msgid "%F%P: invalid data statement\n"
msgstr ""
-#: ldlang.c:4669
+#: ldlang.c:4931
msgid "%F%P: invalid reloc statement\n"
msgstr ""
-#: ldlang.c:4802
+#: ldlang.c:5063
msgid "%P%F:%s: can't set start address\n"
msgstr ""
-#: ldlang.c:4815 ldlang.c:4834
+#: ldlang.c:5076 ldlang.c:5095
msgid "%P%F: can't set start address\n"
msgstr ""
-#: ldlang.c:4827
+#: ldlang.c:5088
msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
msgstr ""
-#: ldlang.c:4839
+#: ldlang.c:5100
msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
msgstr ""
-#: ldlang.c:4888
+#: ldlang.c:5149
msgid ""
"%P%F: Relocatable linking with relocations from format %s (%B) to format %s "
"(%B) is not supported\n"
msgstr ""
-#: ldlang.c:4898
+#: ldlang.c:5159
msgid ""
-"%P: warning: %s architecture of input file `%B' is incompatible with %s "
-"output\n"
+"%P%X: %s architecture of input file `%B' is incompatible with %s output\n"
msgstr ""
-#: ldlang.c:4920
+#: ldlang.c:5181
msgid "%P%X: failed to merge target specific data of file %B\n"
msgstr ""
-#: ldlang.c:5004
+#: ldlang.c:5265
msgid ""
"\n"
"Allocating common symbols\n"
msgstr ""
-#: ldlang.c:5005
+#: ldlang.c:5266
msgid ""
"Common symbol size file\n"
"\n"
msgstr ""
-#: ldlang.c:5131
+#: ldlang.c:5401
msgid "%P%F: invalid syntax in flags\n"
msgstr ""
-#: ldlang.c:5406
+#: ldlang.c:5714
msgid "%P%F: Failed to create hash table\n"
msgstr ""
-#: ldlang.c:5722
+#: ldlang.c:6009
msgid "%P%F: multiple STARTUP files\n"
msgstr ""
-#: ldlang.c:5770
+#: ldlang.c:6057
msgid "%X%P:%S: section has both a load address and a load region\n"
msgstr ""
-#: ldlang.c:6007
+#: ldlang.c:6314
msgid "%F%P: bfd_record_phdr failed: %E\n"
msgstr ""
-#: ldlang.c:6027
+#: ldlang.c:6334
msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
msgstr ""
-#: ldlang.c:6418
+#: ldlang.c:6725
msgid "%X%P: unknown language `%s' in version information\n"
msgstr ""
-#: ldlang.c:6560
+#: ldlang.c:6867
msgid ""
"%X%P: anonymous version tag cannot be combined with other version tags\n"
msgstr ""
-#: ldlang.c:6569
+#: ldlang.c:6876
msgid "%X%P: duplicate version tag `%s'\n"
msgstr ""
-#: ldlang.c:6589 ldlang.c:6598 ldlang.c:6615 ldlang.c:6625
+#: ldlang.c:6896 ldlang.c:6905 ldlang.c:6922 ldlang.c:6932
msgid "%X%P: duplicate expression `%s' in version information\n"
msgstr ""
-#: ldlang.c:6665
+#: ldlang.c:6972
msgid "%X%P: unable to find version dependency `%s'\n"
msgstr ""
-#: ldlang.c:6687
+#: ldlang.c:6994
msgid "%X%P: unable to read .exports section contents\n"
msgstr ""
-#: ldmain.c:232
+#: ldmain.c:234
msgid "%X%P: can't set BFD default target to `%s': %E\n"
msgstr ""
-#: ldmain.c:345
+#: ldmain.c:298
msgid "%P%F: --relax and -r may not be used together\n"
msgstr ""
-#: ldmain.c:347
+#: ldmain.c:300
msgid "%P%F: -r and -shared may not be used together\n"
msgstr ""
-#: ldmain.c:353
+#: ldmain.c:343
msgid "%P%F: -F may not be used without -shared\n"
msgstr ""
-#: ldmain.c:355
+#: ldmain.c:345
msgid "%P%F: -f may not be used without -shared\n"
msgstr ""
@@ -873,7 +898,7 @@ msgstr ""
msgid "%P: Error writing file `%s'\n"
msgstr ""
-#: ldmain.c:535 pe-dll.c:1494
+#: ldmain.c:535 pe-dll.c:1572
#, c-format
msgid "%P: Error closing file `%s'\n"
msgstr ""
@@ -1051,59 +1076,59 @@ msgstr ""
msgid "%X%C: reloc refers to symbol `%T' which is not being output\n"
msgstr ""
-#: ldmisc.c:147
+#: ldmisc.c:148
#, c-format
msgid "no symbol"
msgstr ""
-#: ldmisc.c:238
+#: ldmisc.c:245
#, c-format
msgid "built in linker script:%u"
msgstr ""
-#: ldmisc.c:294 ldmisc.c:298
+#: ldmisc.c:301 ldmisc.c:305
msgid "%B%F: could not read symbols\n"
msgstr ""
-#: ldmisc.c:340
-msgid "%B: In function `%T'"
+#: ldmisc.c:347
+msgid "%B: In function `%T':\n"
msgstr ""
-#: ldmisc.c:510
+#: ldmisc.c:472
msgid "%F%P: internal error %s %d\n"
msgstr ""
-#: ldmisc.c:556
+#: ldmisc.c:521
msgid "%P: internal error: aborting at %s line %d in %s\n"
msgstr ""
-#: ldmisc.c:559
+#: ldmisc.c:524
msgid "%P: internal error: aborting at %s line %d\n"
msgstr ""
-#: ldmisc.c:561
+#: ldmisc.c:526
msgid "%P%F: please report this bug\n"
msgstr ""
#. Output for noisy == 2 is intended to follow the GNU standards.
-#: ldver.c:38
+#: ldver.c:37
#, c-format
-msgid "GNU ld version %s\n"
+msgid "GNU ld %s\n"
msgstr ""
-#: ldver.c:42
+#: ldver.c:41
#, c-format
-msgid "Copyright 2005 Free Software Foundation, Inc.\n"
+msgid "Copyright 2007 Free Software Foundation, Inc.\n"
msgstr ""
-#: ldver.c:43
+#: ldver.c:42
#, c-format
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
+#: ldver.c:51
#, c-format
msgid " Supported emulations:\n"
msgstr ""
@@ -1129,616 +1154,652 @@ msgstr ""
msgid "%F%P: final link failed: %E\n"
msgstr ""
-#: lexsup.c:196 lexsup.c:328
+#: lexsup.c:205 lexsup.c:341
msgid "KEYWORD"
msgstr ""
-#: lexsup.c:196
+#: lexsup.c:205
msgid "Shared library control for HP/UX compatibility"
msgstr ""
-#: lexsup.c:199
+#: lexsup.c:208
msgid "ARCH"
msgstr ""
-#: lexsup.c:199
+#: lexsup.c:208
msgid "Set architecture"
msgstr ""
-#: lexsup.c:201 lexsup.c:422
+#: lexsup.c:210 lexsup.c:447
msgid "TARGET"
msgstr ""
-#: lexsup.c:201
+#: lexsup.c:210
msgid "Specify target for following input files"
msgstr ""
-#: lexsup.c:204 lexsup.c:253 lexsup.c:265 lexsup.c:278 lexsup.c:381
-#: lexsup.c:434 lexsup.c:491
+#: lexsup.c:213 lexsup.c:262 lexsup.c:274 lexsup.c:287 lexsup.c:289
+#: lexsup.c:402 lexsup.c:459 lexsup.c:516 lexsup.c:528
msgid "FILE"
msgstr ""
-#: lexsup.c:204
+#: lexsup.c:213
msgid "Read MRI format linker script"
msgstr ""
-#: lexsup.c:206
+#: lexsup.c:215
msgid "Force common symbols to be defined"
msgstr ""
-#: lexsup.c:210 lexsup.c:476 lexsup.c:478 lexsup.c:480
+#: lexsup.c:219 lexsup.c:501 lexsup.c:503 lexsup.c:505
msgid "ADDRESS"
msgstr ""
-#: lexsup.c:210
+#: lexsup.c:219
msgid "Set start address"
msgstr ""
-#: lexsup.c:212
+#: lexsup.c:221
msgid "Export all dynamic symbols"
msgstr ""
-#: lexsup.c:214
+#: lexsup.c:223
msgid "Link big-endian objects"
msgstr ""
-#: lexsup.c:216
+#: lexsup.c:225
msgid "Link little-endian objects"
msgstr ""
-#: lexsup.c:218 lexsup.c:221
+#: lexsup.c:227 lexsup.c:230
msgid "SHLIB"
msgstr ""
-#: lexsup.c:218
+#: lexsup.c:227
msgid "Auxiliary filter for shared object symbol table"
msgstr ""
-#: lexsup.c:221
+#: lexsup.c:230
msgid "Filter for shared object symbol table"
msgstr ""
-#: lexsup.c:224
+#: lexsup.c:233
msgid "Ignored"
msgstr ""
-#: lexsup.c:226
+#: lexsup.c:235
msgid "SIZE"
msgstr ""
-#: lexsup.c:226
+#: lexsup.c:235
msgid "Small data size (if no size, same as --shared)"
msgstr ""
-#: lexsup.c:229
+#: lexsup.c:238
msgid "FILENAME"
msgstr ""
-#: lexsup.c:229
+#: lexsup.c:238
msgid "Set internal name of shared library"
msgstr ""
-#: lexsup.c:231
+#: lexsup.c:240
msgid "PROGRAM"
msgstr ""
-#: lexsup.c:231
+#: lexsup.c:240
msgid "Set PROGRAM as the dynamic linker to use"
msgstr ""
-#: lexsup.c:234
+#: lexsup.c:243
msgid "LIBNAME"
msgstr ""
-#: lexsup.c:234
+#: lexsup.c:243
msgid "Search for library LIBNAME"
msgstr ""
-#: lexsup.c:236
+#: lexsup.c:245
msgid "DIRECTORY"
msgstr ""
-#: lexsup.c:236
+#: lexsup.c:245
msgid "Add DIRECTORY to library search path"
msgstr ""
-#: lexsup.c:239
+#: lexsup.c:248
msgid "Override the default sysroot location"
msgstr ""
-#: lexsup.c:241
+#: lexsup.c:250
msgid "EMULATION"
msgstr ""
-#: lexsup.c:241
+#: lexsup.c:250
msgid "Set emulation"
msgstr ""
-#: lexsup.c:243
+#: lexsup.c:252
msgid "Print map file on standard output"
msgstr ""
-#: lexsup.c:245
+#: lexsup.c:254
msgid "Do not page align data"
msgstr ""
-#: lexsup.c:247
+#: lexsup.c:256
msgid "Do not page align data, do not make text readonly"
msgstr ""
-#: lexsup.c:250
+#: lexsup.c:259
msgid "Page align data, make text readonly"
msgstr ""
-#: lexsup.c:253
+#: lexsup.c:262
msgid "Set output file name"
msgstr ""
-#: lexsup.c:255
+#: lexsup.c:264
msgid "Optimize output file"
msgstr ""
-#: lexsup.c:257
+#: lexsup.c:266
msgid "Ignored for SVR4 compatibility"
msgstr ""
-#: lexsup.c:261
+#: lexsup.c:270
msgid "Generate relocatable output"
msgstr ""
-#: lexsup.c:265
+#: lexsup.c:274
msgid "Just link symbols (if directory, same as --rpath)"
msgstr ""
-#: lexsup.c:268
+#: lexsup.c:277
msgid "Strip all symbols"
msgstr ""
-#: lexsup.c:270
+#: lexsup.c:279
msgid "Strip debugging symbols"
msgstr ""
-#: lexsup.c:272
+#: lexsup.c:281
msgid "Strip symbols in discarded sections"
msgstr ""
-#: lexsup.c:274
+#: lexsup.c:283
msgid "Do not strip symbols in discarded sections"
msgstr ""
-#: lexsup.c:276
+#: lexsup.c:285
msgid "Trace file opens"
msgstr ""
-#: lexsup.c:278
+#: lexsup.c:287
msgid "Read linker script"
msgstr ""
-#: lexsup.c:280 lexsup.c:298 lexsup.c:364 lexsup.c:379 lexsup.c:469
-#: lexsup.c:494 lexsup.c:521
+#: lexsup.c:289
+msgid "Read default linker script"
+msgstr ""
+
+#: lexsup.c:293 lexsup.c:311 lexsup.c:379 lexsup.c:400 lexsup.c:494
+#: lexsup.c:519 lexsup.c:554
msgid "SYMBOL"
msgstr ""
-#: lexsup.c:280
+#: lexsup.c:293
msgid "Start with undefined reference to SYMBOL"
msgstr ""
-#: lexsup.c:283
+#: lexsup.c:296
msgid "[=SECTION]"
msgstr ""
-#: lexsup.c:284
+#: lexsup.c:297
msgid "Don't merge input [SECTION | orphan] sections"
msgstr ""
-#: lexsup.c:286
+#: lexsup.c:299
msgid "Build global constructor/destructor tables"
msgstr ""
-#: lexsup.c:288
+#: lexsup.c:301
msgid "Print version information"
msgstr ""
-#: lexsup.c:290
+#: lexsup.c:303
msgid "Print version and emulation information"
msgstr ""
-#: lexsup.c:292
+#: lexsup.c:305
msgid "Discard all local symbols"
msgstr ""
-#: lexsup.c:294
+#: lexsup.c:307
msgid "Discard temporary local symbols (default)"
msgstr ""
-#: lexsup.c:296
+#: lexsup.c:309
msgid "Don't discard any local symbols"
msgstr ""
-#: lexsup.c:298
+#: lexsup.c:311
msgid "Trace mentions of SYMBOL"
msgstr ""
-#: lexsup.c:300 lexsup.c:436 lexsup.c:438
+#: lexsup.c:313 lexsup.c:461 lexsup.c:463
msgid "PATH"
msgstr ""
-#: lexsup.c:300
+#: lexsup.c:313
msgid "Default search path for Solaris compatibility"
msgstr ""
-#: lexsup.c:303
+#: lexsup.c:316
msgid "Start a group"
msgstr ""
-#: lexsup.c:305
+#: lexsup.c:318
msgid "End a group"
msgstr ""
-#: lexsup.c:309
+#: lexsup.c:322
msgid "Accept input files whose architecture cannot be determined"
msgstr ""
-#: lexsup.c:313
+#: lexsup.c:326
msgid "Reject input files whose architecture is unknown"
msgstr ""
-#: lexsup.c:316
+#: lexsup.c:329
msgid ""
"Set DT_NEEDED tags for DT_NEEDED entries in\n"
"\t\t\t\tfollowing dynamic libs"
msgstr ""
-#: lexsup.c:319
+#: lexsup.c:332
msgid ""
"Do not set DT_NEEDED tags for DT_NEEDED entries\n"
"\t\t\t\tin following dynamic libs"
msgstr ""
-#: lexsup.c:322
+#: lexsup.c:335
msgid "Only set DT_NEEDED for following dynamic libs if used"
msgstr ""
-#: lexsup.c:325
+#: lexsup.c:338
msgid "Always set DT_NEEDED for following dynamic libs"
msgstr ""
-#: lexsup.c:328
+#: lexsup.c:341
msgid "Ignored for SunOS compatibility"
msgstr ""
-#: lexsup.c:330
+#: lexsup.c:343
msgid "Link against shared libraries"
msgstr ""
-#: lexsup.c:336
+#: lexsup.c:349
msgid "Do not link against shared libraries"
msgstr ""
-#: lexsup.c:344
+#: lexsup.c:357
msgid "Bind global references locally"
msgstr ""
-#: lexsup.c:346
+#: lexsup.c:359
+msgid "Bind global function references locally"
+msgstr ""
+
+#: lexsup.c:361
msgid "Check section addresses for overlaps (default)"
msgstr ""
-#: lexsup.c:349
+#: lexsup.c:364
msgid "Do not check section addresses for overlaps"
msgstr ""
-#: lexsup.c:352
+#: lexsup.c:367
msgid "Output cross reference table"
msgstr ""
-#: lexsup.c:354
+#: lexsup.c:369
msgid "SYMBOL=EXPRESSION"
msgstr ""
-#: lexsup.c:354
+#: lexsup.c:369
msgid "Define a symbol"
msgstr ""
-#: lexsup.c:356
+#: lexsup.c:371
msgid "[=STYLE]"
msgstr ""
-#: lexsup.c:356
+#: lexsup.c:371
msgid "Demangle symbol names [using STYLE]"
msgstr ""
-#: lexsup.c:359
+#: lexsup.c:374
msgid "Generate embedded relocs"
msgstr ""
-#: lexsup.c:361
+#: lexsup.c:376
msgid "Treat warnings as errors"
msgstr ""
-#: lexsup.c:364
+#: lexsup.c:379
msgid "Call SYMBOL at unload-time"
msgstr ""
-#: lexsup.c:366
+#: lexsup.c:381
msgid "Force generation of file with .exe suffix"
msgstr ""
-#: lexsup.c:368
+#: lexsup.c:383
msgid "Remove unused sections (on some targets)"
msgstr ""
-#: lexsup.c:371
+#: lexsup.c:386
msgid "Don't remove unused sections (default)"
msgstr ""
-#: lexsup.c:374
+#: lexsup.c:389
+msgid "List removed unused sections on stderr"
+msgstr ""
+
+#: lexsup.c:392
+msgid "Do not list removed unused sections"
+msgstr ""
+
+#: lexsup.c:395
msgid "Set default hash table size close to <NUMBER>"
msgstr ""
-#: lexsup.c:377
+#: lexsup.c:398
msgid "Print option help"
msgstr ""
-#: lexsup.c:379
+#: lexsup.c:400
msgid "Call SYMBOL at load-time"
msgstr ""
-#: lexsup.c:381
+#: lexsup.c:402
msgid "Write a map file"
msgstr ""
-#: lexsup.c:383
+#: lexsup.c:404
msgid "Do not define Common storage"
msgstr ""
-#: lexsup.c:385
+#: lexsup.c:406
msgid "Do not demangle symbol names"
msgstr ""
-#: lexsup.c:387
+#: lexsup.c:408
msgid "Use less memory and more disk I/O"
msgstr ""
-#: lexsup.c:389
+#: lexsup.c:410
msgid "Do not allow unresolved references in object files"
msgstr ""
-#: lexsup.c:392
+#: lexsup.c:413
msgid "Allow unresolved references in shared libaries"
msgstr ""
-#: lexsup.c:396
+#: lexsup.c:417
msgid "Do not allow unresolved references in shared libs"
msgstr ""
-#: lexsup.c:400
+#: lexsup.c:421
msgid "Allow multiple definitions"
msgstr ""
-#: lexsup.c:402
+#: lexsup.c:423
msgid "Disallow undefined version"
msgstr ""
-#: lexsup.c:404
+#: lexsup.c:425
msgid "Create default symbol version"
msgstr ""
-#: lexsup.c:407
+#: lexsup.c:428
msgid "Create default symbol version for imported symbols"
msgstr ""
-#: lexsup.c:410
+#: lexsup.c:431
msgid "Don't warn about mismatched input files"
msgstr ""
-#: lexsup.c:412
+#: lexsup.c:434
+msgid "Don't warn on finding an incompatible library"
+msgstr ""
+
+#: lexsup.c:437
msgid "Turn off --whole-archive"
msgstr ""
-#: lexsup.c:414
+#: lexsup.c:439
msgid "Create an output file even if errors occur"
msgstr ""
-#: lexsup.c:419
+#: lexsup.c:444
msgid ""
"Only use library directories specified on\n"
"\t\t\t\tthe command line"
msgstr ""
-#: lexsup.c:422
+#: lexsup.c:447
msgid "Specify target of output file"
msgstr ""
-#: lexsup.c:425
+#: lexsup.c:450
msgid "Ignored for Linux compatibility"
msgstr ""
-#: lexsup.c:428
+#: lexsup.c:453
msgid "Reduce memory overheads, possibly taking much longer"
msgstr ""
-#: lexsup.c:431
+#: lexsup.c:456
msgid "Relax branches on certain targets"
msgstr ""
-#: lexsup.c:434
+#: lexsup.c:459
msgid "Keep only symbols listed in FILE"
msgstr ""
-#: lexsup.c:436
+#: lexsup.c:461
msgid "Set runtime shared library search path"
msgstr ""
-#: lexsup.c:438
+#: lexsup.c:463
msgid "Set link time shared library search path"
msgstr ""
-#: lexsup.c:441
+#: lexsup.c:466
msgid "Create a shared library"
msgstr ""
-#: lexsup.c:445
+#: lexsup.c:470
msgid "Create a position independent executable"
msgstr ""
-#: lexsup.c:449
+#: lexsup.c:474
msgid "Sort common symbols by size"
msgstr ""
-#: lexsup.c:453
+#: lexsup.c:478
msgid "name|alignment"
msgstr ""
-#: lexsup.c:454
+#: lexsup.c:479
msgid "Sort sections by name or maximum alignment"
msgstr ""
-#: lexsup.c:456
+#: lexsup.c:481
msgid "COUNT"
msgstr ""
-#: lexsup.c:456
+#: lexsup.c:481
msgid "How many tags to reserve in .dynamic section"
msgstr ""
-#: lexsup.c:459
+#: lexsup.c:484
msgid "[=SIZE]"
msgstr ""
-#: lexsup.c:459
+#: lexsup.c:484
msgid "Split output sections every SIZE octets"
msgstr ""
-#: lexsup.c:462
+#: lexsup.c:487
msgid "[=COUNT]"
msgstr ""
-#: lexsup.c:462
+#: lexsup.c:487
msgid "Split output sections every COUNT relocs"
msgstr ""
-#: lexsup.c:465
+#: lexsup.c:490
msgid "Print memory usage statistics"
msgstr ""
-#: lexsup.c:467
+#: lexsup.c:492
msgid "Display target specific options"
msgstr ""
-#: lexsup.c:469
+#: lexsup.c:494
msgid "Do task level linking"
msgstr ""
-#: lexsup.c:471
+#: lexsup.c:496
msgid "Use same format as native linker"
msgstr ""
-#: lexsup.c:473
+#: lexsup.c:498
msgid "SECTION=ADDRESS"
msgstr ""
-#: lexsup.c:473
+#: lexsup.c:498
msgid "Set address of named section"
msgstr ""
-#: lexsup.c:476
+#: lexsup.c:501
msgid "Set address of .bss section"
msgstr ""
-#: lexsup.c:478
+#: lexsup.c:503
msgid "Set address of .data section"
msgstr ""
-#: lexsup.c:480
+#: lexsup.c:505
msgid "Set address of .text section"
msgstr ""
-#: lexsup.c:483
+#: lexsup.c:508
msgid ""
"How to handle unresolved symbols. <method> is:\n"
"\t\t\t\tignore-all, report-all, ignore-in-object-files,\n"
"\t\t\t\tignore-in-shared-libs"
msgstr ""
-#: lexsup.c:487
+#: lexsup.c:512
msgid "Output lots of information during link"
msgstr ""
-#: lexsup.c:491
+#: lexsup.c:516
msgid "Read version information script"
msgstr ""
-#: lexsup.c:494
+#: lexsup.c:519
msgid ""
"Take export symbols list from .exports, using\n"
"\t\t\t\tSYMBOL as the version."
msgstr ""
-#: lexsup.c:497
+#: lexsup.c:522
+msgid "Add data symbols to dynamic list"
+msgstr ""
+
+#: lexsup.c:524
+msgid "Use C++ operator new/delete dynamic list"
+msgstr ""
+
+#: lexsup.c:526
+msgid "Use C++ typeinfo dynamic list"
+msgstr ""
+
+#: lexsup.c:528
+msgid "Read dynamic list"
+msgstr ""
+
+#: lexsup.c:530
msgid "Warn about duplicate common symbols"
msgstr ""
-#: lexsup.c:499
+#: lexsup.c:532
msgid "Warn if global constructors/destructors are seen"
msgstr ""
-#: lexsup.c:502
+#: lexsup.c:535
msgid "Warn if the multiple GP values are used"
msgstr ""
-#: lexsup.c:504
+#: lexsup.c:537
msgid "Warn only once per undefined symbol"
msgstr ""
-#: lexsup.c:506
+#: lexsup.c:539
msgid "Warn if start of section changes due to alignment"
msgstr ""
-#: lexsup.c:509
+#: lexsup.c:542
msgid "Warn if shared object has DT_TEXTREL"
msgstr ""
-#: lexsup.c:513
+#: lexsup.c:546
msgid "Report unresolved symbols as warnings"
msgstr ""
-#: lexsup.c:516
+#: lexsup.c:549
msgid "Report unresolved symbols as errors"
msgstr ""
-#: lexsup.c:518
+#: lexsup.c:551
msgid "Include all objects from following archives"
msgstr ""
-#: lexsup.c:521
+#: lexsup.c:554
msgid "Use wrapper functions for SYMBOL"
msgstr ""
-#: lexsup.c:668
+#: lexsup.c:701
msgid "%P: unrecognized option '%s'\n"
msgstr ""
-#: lexsup.c:670
+#: lexsup.c:705
msgid "%P%F: use the --help option for usage information\n"
msgstr ""
-#: lexsup.c:688
+#: lexsup.c:723
msgid "%P%F: unrecognized -a option `%s'\n"
msgstr ""
-#: lexsup.c:701
+#: lexsup.c:736
msgid "%P%F: unrecognized -assert option `%s'\n"
msgstr ""
-#: lexsup.c:744
+#: lexsup.c:779
msgid "%F%P: unknown demangling style `%s'"
msgstr ""
-#: lexsup.c:806
+#: lexsup.c:841
msgid "%P%F: invalid number `%s'\n"
msgstr ""
-#: lexsup.c:898
+#: lexsup.c:939
msgid "%P%F: bad --unresolved-symbols option: %s\n"
msgstr ""
@@ -1750,92 +1811,92 @@ msgstr ""
#. 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:969
+#: lexsup.c:1013
msgid "%P%F: bad -rpath option\n"
msgstr ""
-#: lexsup.c:1081
+#: lexsup.c:1124
msgid "%P%F: -shared not supported\n"
msgstr ""
-#: lexsup.c:1090
+#: lexsup.c:1133
msgid "%P%F: -pie not supported\n"
msgstr ""
-#: lexsup.c:1100
+#: lexsup.c:1143
msgid "name"
msgstr ""
-#: lexsup.c:1102
+#: lexsup.c:1145
msgid "alignment"
msgstr ""
-#: lexsup.c:1105
+#: lexsup.c:1148
msgid "%P%F: invalid section sorting option: %s\n"
msgstr ""
-#: lexsup.c:1131
+#: lexsup.c:1180
msgid "%P%F: invalid argument to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:1138
+#: lexsup.c:1187
msgid "%P%F: missing argument(s) to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:1312
+#: lexsup.c:1398
msgid "%P%F: may not nest groups (--help for usage)\n"
msgstr ""
-#: lexsup.c:1319
+#: lexsup.c:1405
msgid "%P%F: group ended before it began (--help for usage)\n"
msgstr ""
-#: lexsup.c:1347
+#: lexsup.c:1433
msgid "%P%X: --hash-size needs a numeric argument\n"
msgstr ""
-#: lexsup.c:1398 lexsup.c:1411
+#: lexsup.c:1484 lexsup.c:1497
msgid "%P%F: invalid hex number `%s'\n"
msgstr ""
-#: lexsup.c:1447
+#: lexsup.c:1533
#, c-format
msgid "Usage: %s [options] file...\n"
msgstr ""
-#: lexsup.c:1449
+#: lexsup.c:1535
#, c-format
msgid "Options:\n"
msgstr ""
-#: lexsup.c:1527
+#: lexsup.c:1613
#, c-format
msgid " @FILE"
msgstr ""
-#: lexsup.c:1530
+#: lexsup.c:1616
#, c-format
msgid "Read options from FILE\n"
msgstr ""
#. Note: Various tools (such as libtool) depend upon the
#. format of the listings below - do not change them.
-#: lexsup.c:1535
+#: lexsup.c:1621
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: lexsup.c:1543
+#: lexsup.c:1629
#, c-format
msgid "%s: supported emulations: "
msgstr ""
-#: lexsup.c:1548
+#: lexsup.c:1634
#, c-format
msgid "%s: emulation specific options:\n"
msgstr ""
-#: lexsup.c:1552
+#: lexsup.c:1639
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
@@ -1844,73 +1905,73 @@ msgstr ""
msgid "%P%F: unknown format type %s\n"
msgstr ""
-#: pe-dll.c:303
+#: pe-dll.c:367
#, c-format
msgid "%XUnsupported PEI architecture: %s\n"
msgstr ""
-#: pe-dll.c:604
+#: pe-dll.c:673
#, c-format
msgid "%XCannot export %s: invalid export name\n"
msgstr ""
-#: pe-dll.c:657
+#: pe-dll.c:729
#, c-format
msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:664
+#: pe-dll.c:736
#, c-format
msgid "Warning, duplicate EXPORT: %s\n"
msgstr ""
-#: pe-dll.c:751
+#: pe-dll.c:823
#, c-format
msgid "%XCannot export %s: symbol not defined\n"
msgstr ""
-#: pe-dll.c:757
+#: pe-dll.c:829
#, c-format
msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:764
+#: pe-dll.c:836
#, c-format
msgid "%XCannot export %s: symbol not found\n"
msgstr ""
-#: pe-dll.c:877
+#: pe-dll.c:949
#, c-format
msgid "%XError, ordinal used twice: %d (%s vs %s)\n"
msgstr ""
-#: pe-dll.c:1219
+#: pe-dll.c:1297
#, c-format
msgid "%XError: %d-bit reloc in dll\n"
msgstr ""
-#: pe-dll.c:1347
+#: pe-dll.c:1425
#, c-format
msgid "%s: Can't open output def file %s\n"
msgstr ""
-#: pe-dll.c:1490
+#: pe-dll.c:1568
#, c-format
msgid "; no contents available\n"
msgstr ""
-#: pe-dll.c:2252
+#: pe-dll.c:2364
msgid ""
"%C: variable '%T' can't be auto-imported. Please read the documentation for "
"ld's --enable-auto-import for details.\n"
msgstr ""
-#: pe-dll.c:2282
+#: pe-dll.c:2394
#, c-format
msgid "%XCan't open .lib file: %s\n"
msgstr ""
-#: pe-dll.c:2287
+#: pe-dll.c:2399
#, c-format
msgid "Creating library file: %s\n"
msgstr ""
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc
index ac0c725..205d162 100644
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ b/contrib/binutils/ld/scripttempl/elf.sc
@@ -14,6 +14,8 @@
# (e.g., .PARISC.global)
# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
# (e.g. PPC32 .fixup, .got[12])
+# OTHER_BSS_SECTIONS - other than .bss .sbss ...
+# ATTRS_SECTIONS - at the end
# OTHER_SECTIONS - at the end
# EXECUTABLE_SYMBOLS - symbols that must be defined for an
# executable (e.g., _DYNAMIC_LINK)
@@ -52,6 +54,7 @@
# so that .got can be in the RELRO area. It should be set to
# the number of bytes in the beginning of .got.plt which can be
# in the RELRO area as well.
+# USER_LABEL_PREFIX - prefix to add to user-visible symbols.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
@@ -94,6 +97,7 @@ test -z "${ETEXT_NAME}" && ETEXT_NAME=etext
test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
+test -z "$ATTRS_SECTIONS" && ATTRS_SECTIONS=".gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }"
DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
DATA_SEGMENT_RELRO_END=""
DATA_SEGMENT_END=""
@@ -102,7 +106,9 @@ if test -n "${COMMONPAGESIZE}"; then
DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
fi
-INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
+fi
if test -z "$PLT"; then
PLT=".plt ${RELOCATING-0} : { *(.plt) }"
fi
@@ -173,13 +179,15 @@ test "${LARGE_SECTIONS}" = "yes" && REL_LARGE="
.rela.lbss ${RELOCATING-0} : { *(.rela.lbss${RELOCATING+ .rela.lbss.* .rela.gnu.linkonce.lb.*}) }
.rel.lrodata ${RELOCATING-0} : { *(.rel.lrodata${RELOCATING+ .rel.lrodata.* .rel.gnu.linkonce.lr.*}) }
.rela.lrodata ${RELOCATING-0} : { *(.rela.lrodata${RELOCATING+ .rela.lrodata.* .rela.gnu.linkonce.lr.*}) }"
-test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
+test "${LARGE_SECTIONS}" = "yes" && OTHER_BSS_SECTIONS="
+ ${OTHER_BSS_SECTIONS}
.lbss ${RELOCATING-0} :
{
*(.dynlbss)
*(.lbss${RELOCATING+ .lbss.* .gnu.linkonce.lb.*})
*(LARGE_COMMON)
- }
+ }"
+test "${LARGE_SECTIONS}" = "yes" && LARGE_SECTIONS="
.lrodata ${RELOCATING-0} ${RELOCATING+ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))} :
{
*(.lrodata${RELOCATING+ .lrodata.* .gnu.linkonce.lr.*})
@@ -202,14 +210,15 @@ CTOR=".ctors ${CONSTRUCTING-0} :
doesn't matter which directory crtbegin.o
is in. */
- KEEP (*crtbegin*.o(.ctors))
+ KEEP (*crtbegin.o(.ctors))
+ KEEP (*crtbegin?.o(.ctors))
/* We don't want to include the .ctor section from
the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
- KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}}
@@ -217,8 +226,9 @@ CTOR=".ctors ${CONSTRUCTING-0} :
DTOR=".dtors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${DTOR_START}}
- KEEP (*crtbegin*.o(.dtors))
- KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
+ KEEP (*crtbegin.o(.dtors))
+ KEEP (*crtbegin?.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o $OTHER_EXCLUDE_FILES) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
${CONSTRUCTING+${DTOR_END}}
@@ -256,10 +266,10 @@ SECTIONS
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
- ${CREATE_SHLIB-${INTERP}}
${INITIAL_READONLY_SECTIONS}
${TEXT_DYNAMIC+${DYNAMIC}}
.hash ${RELOCATING-0} : { *(.hash) }
+ .gnu.hash ${RELOCATING-0} : { *(.gnu.hash) }
.dynsym ${RELOCATING-0} : { *(.dynsym) }
.dynstr ${RELOCATING-0} : { *(.dynstr) }
.gnu.version ${RELOCATING-0} : { *(.gnu.version) }
@@ -378,23 +388,23 @@ cat <<EOF
.preinit_array ${RELOCATING-0} :
{
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_start = .);}}
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_start = .);}}
KEEP (*(.preinit_array))
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__preinit_array_end = .);}}
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__preinit_array_end = .);}}
}
.init_array ${RELOCATING-0} :
{
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_start = .);}}
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_start = .);}}
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__init_array_end = .);}}
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__init_array_end = .);}}
}
.fini_array ${RELOCATING-0} :
{
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_start = .);}}
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_start = .);}}
KEEP (*(.fini_array))
KEEP (*(SORT(.fini_array.*)))
- ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (__fini_array_end = .);}}
+ ${RELOCATING+${CREATE_SHLIB-PROVIDE_HIDDEN (${USER_LABEL_PREFIX}__fini_array_end = .);}}
}
${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
@@ -416,7 +426,7 @@ cat <<EOF
{
${RELOCATING+${DATA_START_SYMBOLS}}
*(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
- KEEP (*(.gnu.linkonce.d.*personality*))
+ ${RELOCATING+KEEP (*(.gnu.linkonce.d.*personality*))}
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
.data1 ${RELOCATING-0} : { *(.data1) }
@@ -430,7 +440,7 @@ cat <<EOF
${SDATA_GOT+${OTHER_GOT_SECTIONS}}
${SDATA}
${OTHER_SDATA_SECTIONS}
- ${RELOCATING+${DATA_END_SYMBOLS-_edata = .; PROVIDE (edata = .);}}
+ ${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
${RELOCATING+__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
${SBSS}
@@ -447,12 +457,13 @@ cat <<EOF
pad the .data section. */
${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);}
}
+ ${OTHER_BSS_SECTIONS}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
${RELOCATING+. = ALIGN(${ALIGNMENT});}
${LARGE_SECTIONS}
${RELOCATING+. = ALIGN(${ALIGNMENT});}
${RELOCATING+${OTHER_END_SYMBOLS}}
- ${RELOCATING+${END_SYMBOLS-_end = .; PROVIDE (end = .);}}
+ ${RELOCATING+${END_SYMBOLS-${USER_LABEL_PREFIX}_end = .; PROVIDE (${USER_LABEL_PREFIX}end = .);}}
${RELOCATING+${DATA_SEGMENT_END}}
/* Stabs debugging sections. */
@@ -482,7 +493,7 @@ cat <<EOF
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_info 0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*}) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
@@ -496,10 +507,15 @@ cat <<EOF
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
+ /* DWARF 3 */
+ .debug_pubtypes 0 : { *(.debug_pubtypes) }
+ .debug_ranges 0 : { *(.debug_ranges) }
+
${TINY_DATA_SECTION}
${TINY_BSS_SECTION}
${STACK_ADDR+${STACK}}
+ ${ATTRS_SECTIONS}
${OTHER_SECTIONS}
${RELOCATING+${OTHER_SYMBOLS}}
${RELOCATING+${STACKNOTE}}
diff --git a/contrib/binutils/ld/scripttempl/elf32cr16.sc b/contrib/binutils/ld/scripttempl/elf32cr16.sc
new file mode 100644
index 0000000..2e62fa2
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/elf32cr16.sc
@@ -0,0 +1,175 @@
+# Linker Script for National Semiconductor's CR16-ELF32.
+
+# The next line should be uncommented if it is desired to link
+# without libstart.o and directly enter main.
+
+# ENTRY=_main
+
+test -z "$ENTRY" && ENTRY=_start
+cat <<EOF
+
+/* Example Linker Script for linking NS CR16 elf32 files. */
+
+/* The next line forces the entry point (${ENTRY} in this script)
+ to be entered in the output file as an undefined symbol.
+ It is needed in case the entry point is not called explicitly
+ (which is the usual case) AND is in an archive. */
+
+OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+OUTPUT_ARCH(${ARCH})
+EXTERN(${ENTRY})
+ENTRY(${ENTRY})
+
+/* Define memory regions. */
+MEMORY
+{
+ rom : ORIGIN = 0x2, LENGTH = 3M
+ ram : ORIGIN = 4M, LENGTH = 10M
+}
+
+/* Many sections come in three flavours. There is the 'real' section,
+ like ".data". Then there are the per-procedure or per-variable
+ sections, generated by -ffunction-sections and -fdata-sections in GCC,
+ and useful for --gc-sections, which for a variable "foo" might be
+ ".data.foo". Then there are the linkonce sections, for which the linker
+ eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
+ The exact correspondences are:
+
+ Section Linkonce section
+ .text .gnu.linkonce.t.foo
+ .rdata .gnu.linkonce.r.foo
+ .data .gnu.linkonce.d.foo
+ .bss .gnu.linkonce.b.foo
+ .debug_info .gnu.linkonce.wi.foo */
+
+SECTIONS
+{
+ .init :
+ {
+ __INIT_START = .;
+ KEEP (*(.init))
+ __INIT_END = .;
+ } > rom
+
+ .fini :
+ {
+ __FINI_START = .;
+ KEEP (*(.fini))
+ __FINI_END = .;
+ } > rom
+
+ .jcr :
+ {
+ KEEP (*(.jcr))
+ } > rom
+
+ .text :
+ {
+ __TEXT_START = .;
+ *(.text) *(.text.*) *(.gnu.linkonce.t.*)
+ __TEXT_END = .;
+ } > rom
+
+ .rdata :
+ {
+ __RDATA_START = .;
+ *(.rdata_4) *(.rdata_2) *(.rdata_1) *(.rdata.*) *(.gnu.linkonce.r.*) *(.rodata*)
+ __RDATA_END = .;
+ } > rom
+
+ .ctor ALIGN(4) :
+ {
+ __CTOR_START = .;
+ /* The compiler uses crtbegin.o to find the start
+ of the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. */
+
+ KEEP (*crtbegin*.o(.ctors))
+
+ /* We don't want to include the .ctor section from
+ the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last */
+
+ KEEP (*(EXCLUDE_FILE (*crtend*.o) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ __CTOR_END = .;
+ } > rom
+
+ .dtor ALIGN(4) :
+ {
+ __DTOR_START = .;
+ KEEP (*crtbegin*.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend*.o) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ __DTOR_END = .;
+ } > rom
+
+ .data :
+ {
+ __DATA_START = .;
+ *(.data_4) *(.data_2) *(.data_1) *(.data) *(.data.*) *(.gnu.linkonce.d.*)
+ __DATA_END = .;
+ } > ram AT > rom
+
+ .bss (NOLOAD) :
+ {
+ __BSS_START = .;
+ *(.bss_4) *(.bss_2) *(.bss_1) *(.bss) *(COMMON) *(.bss.*) *(.gnu.linkonce.b.*)
+ __BSS_END = .;
+ } > ram
+
+/* You may change the sizes of the following sections to fit the actual
+ size your program requires.
+
+ The heap and stack are aligned to the bus width, as a speed optimization
+ for accessing data located there. */
+
+ .heap :
+ {
+ . = ALIGN(4);
+ __HEAP_START = .;
+ . += 0x2000; __HEAP_MAX = .;
+ } > ram
+
+ .stack :
+ {
+ . = ALIGN(4);
+ . += 0x6000;
+ __STACK_START = .;
+ } > ram
+
+ .istack :
+ {
+ . = ALIGN(4);
+ . += 0x100;
+ __ISTACK_START = .;
+ } > ram
+
+ .comment 0 : { *(.comment) }
+
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+}
+
+__DATA_IMAGE_START = LOADADDR(.data);
+EOF
diff --git a/contrib/binutils/ld/scripttempl/mep.sc b/contrib/binutils/ld/scripttempl/mep.sc
new file mode 100644
index 0000000..0d459c6
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/mep.sc
@@ -0,0 +1,446 @@
+#
+# Unusual variables checked by this code:
+# NOP - four byte opcode for no-op (defaults to 0)
+# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
+# empty.
+# SMALL_DATA_CTOR - .ctors contains small data.
+# SMALL_DATA_DTOR - .dtors contains small data.
+# 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 ...
+# (e.g., .PARISC.milli)
+# OTHER_TEXT_SECTIONS - these get put in .text when relocating
+# OTHER_READWRITE_SECTIONS - other than .data .bss .ctors .sdata ...
+# (e.g., .PARISC.global)
+# OTHER_RELRO_SECTIONS - other than .data.rel.ro ...
+# (e.g. PPC32 .fixup, .got[12])
+# OTHER_BSS_SECTIONS - other than .bss .sbss ...
+# OTHER_SECTIONS - at the end
+# EXECUTABLE_SYMBOLS - symbols that must be defined for an
+# executable (e.g., _DYNAMIC_LINK)
+# TEXT_START_ADDR - the first byte of the text segment, after any
+# headers.
+# TEXT_BASE_ADDRESS - the first byte of the text segment.
+# TEXT_START_SYMBOLS - symbols that appear at the start of the
+# .text section.
+# DATA_START_SYMBOLS - symbols that appear at the start of the
+# .data section.
+# OTHER_GOT_SYMBOLS - symbols defined just before .got.
+# 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.
+# PLT_BEFORE_GOT - .plt just before .got when .plt is in data segement.
+# BSS_PLT - .plt should be in bss segment
+# TEXT_DYNAMIC - .dynamic in text segment, not data segment.
+# EMBEDDED - whether this is for an embedded system.
+# SHLIB_TEXT_START_ADDR - if set, add to SIZEOF_HEADERS to set
+# start address of shared library.
+# INPUT_FILES - INPUT command of files to always include
+# WRITABLE_RODATA - if set, the .rodata section should be writable
+# INIT_START, INIT_END - statements just before and just after
+# combination of .init sections.
+# FINI_START, FINI_END - statements just before and just after
+# combination of .fini sections.
+# STACK_ADDR - start of a .stack section.
+# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
+# SEPARATE_GOTPLT - if set, .got.plt should be separate output section,
+# so that .got can be in the RELRO area. It should be set to
+# the number of bytes in the beginning of .got.plt which can be
+# in the RELRO area as well.
+#
+# When adding sections, do note that the names of some sections are used
+# when specifying the start address of the next.
+#
+
+# Many sections come in three flavours. There is the 'real' section,
+# like ".data". Then there are the per-procedure or per-variable
+# sections, generated by -ffunction-sections and -fdata-sections in GCC,
+# and useful for --gc-sections, which for a variable "foo" might be
+# ".data.foo". Then there are the linkonce sections, for which the linker
+# eliminates duplicates, which are named like ".gnu.linkonce.d.foo".
+# The exact correspondences are:
+#
+# Section Linkonce section
+# .text .gnu.linkonce.t.foo
+# .rodata .gnu.linkonce.r.foo
+# .data .gnu.linkonce.d.foo
+# .bss .gnu.linkonce.b.foo
+# .sdata .gnu.linkonce.s.foo
+# .sbss .gnu.linkonce.sb.foo
+# .sdata2 .gnu.linkonce.s2.foo
+# .sbss2 .gnu.linkonce.sb2.foo
+# .debug_info .gnu.linkonce.wi.foo
+# .tdata .gnu.linkonce.td.foo
+# .tbss .gnu.linkonce.tb.foo
+#
+# Each of these can also have corresponding .rel.* and .rela.* sections.
+
+test -z "$ENTRY" && ENTRY=_start
+test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
+test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
+if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
+test -z "${ELFSIZE}" && ELFSIZE=32
+test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
+test "$LD_FLAG" = "N" && DATA_ADDR=.
+test -n "$CREATE_SHLIB$CREATE_PIE" && test -n "$SHLIB_DATA_ADDR" && COMMONPAGESIZE=""
+test -z "$CREATE_SHLIB$CREATE_PIE" && test -n "$DATA_ADDR" && COMMONPAGESIZE=""
+test -n "$RELRO_NOW" && unset SEPARATE_GOTPLT
+DATA_SEGMENT_ALIGN="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))"
+DATA_SEGMENT_RELRO_END=""
+DATA_SEGMENT_RELRO_GOTPLT_END=""
+DATA_SEGMENT_END=""
+if test -n "${COMMONPAGESIZE}"; then
+ DATA_SEGMENT_ALIGN="ALIGN (${SEGMENT_SIZE}) - ((${MAXPAGESIZE} - .) & (${MAXPAGESIZE} - 1)); . = DATA_SEGMENT_ALIGN (${MAXPAGESIZE}, ${COMMONPAGESIZE})"
+ DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
+ if test -n "${SEPARATE_GOTPLT}"; then
+ DATA_SEGMENT_RELRO_GOTPLT_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT}, .);"
+ else
+ DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (0, .);"
+ fi
+fi
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+if test -z "$GOT"; then
+ if test -z "$SEPARATE_GOTPLT"; then
+ GOT=".got ${RELOCATING-0} : { *(.got.plt) *(.got) }"
+ else
+ GOT=".got ${RELOCATING-0} : { *(.got) }"
+ GOTPLT="${RELOCATING+${DATA_SEGMENT_RELRO_GOTPLT_END}}
+ .got.plt ${RELOCATING-0} : { *(.got.plt) }"
+ fi
+fi
+DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+DATARELRO=".data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }"
+STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }"
+if test -z "${NO_SMALL_DATA}"; then
+ SBSS=".sbss ${RELOCATING-0} :
+ {
+ ${RELOCATING+PROVIDE (__sbss_start = .);}
+ ${RELOCATING+PROVIDE (___sbss_start = .);}
+ ${CREATE_SHLIB+*(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)}
+ *(.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}}
+ ${CREATE_SHLIB+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)}
+ *(.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.*}) }"
+else
+ NO_SMALL_DATA=" "
+fi
+test -n "$SEPARATE_GOTPLT" && SEPARATE_GOTPLT=" "
+CTOR=".ctors ${CONSTRUCTING-0} :
+ {
+ ${CONSTRUCTING+${CTOR_START}}
+ /* gcc uses crtbegin.o to find the start of
+ the constructors, so we make sure it is
+ first. Because this is a wildcard, it
+ doesn't matter if the user does not
+ actually link against crtbegin.o; the
+ linker won't look for a file to match a
+ wildcard. The wildcard also means that it
+ doesn't matter which directory crtbegin.o
+ is in. */
+
+ KEEP (*crtbegin*.o(.ctors))
+
+ /* We don't want to include the .ctor section from
+ from the crtend.o file until after the sorted ctors.
+ The .ctor section from the crtend file contains the
+ end of ctors marker and it must be last */
+
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
+ KEEP (*(SORT(.ctors.*)))
+ KEEP (*(.ctors))
+ ${CONSTRUCTING+${CTOR_END}}
+ }"
+DTOR=".dtors ${CONSTRUCTING-0} :
+ {
+ ${CONSTRUCTING+${DTOR_START}}
+ KEEP (*crtbegin*.o(.dtors))
+ KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
+ KEEP (*(SORT(.dtors.*)))
+ KEEP (*(.dtors))
+ ${CONSTRUCTING+${DTOR_END}}
+ }"
+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
+ test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR} + SIZEOF_HEADERS"
+else
+ test -z "${TEXT_BASE_ADDRESS}" && TEXT_BASE_ADDRESS="${TEXT_START_ADDR}"
+fi
+
+cat <<EOF
+OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
+ "${LITTLE_OUTPUT_FORMAT}")
+OUTPUT_ARCH(${OUTPUT_ARCH})
+ENTRY(${ENTRY})
+
+${RELOCATING+${LIB_SEARCH_DIRS}}
+${RELOCATING+/* Do we need any of these for elf?
+ __DYNAMIC = 0; ${STACKZERO+${STACKZERO}} ${SHLIB_PATH+${SHLIB_PATH}} */}
+${RELOCATING+${EXECUTABLE_SYMBOLS}}
+${RELOCATING+${INPUT_FILES}}
+${RELOCATING- /* For some reason, the Solaris linker makes bad executables
+ if gld -r is used and the intermediate file has sections starting
+ at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld
+ bug. But for now assigning the zero vmas works. */}
+
+SECTIONS
+{
+ /* Read-only sections, merged into text segment: */
+ ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
+ ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
+ ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
+ ${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) }
+
+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.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
+ .rela.data.rel.ro ${RELOCATING-0} : { *(.rel.data.rel.ro${RELOCATING+*}) }
+ .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.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
+ .rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
+ .rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
+ .rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
+ .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}
+ ${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} :
+ {
+EOF
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+cat <<EOF
+ }
+ .rela.dyn ${RELOCATING-0} :
+ {
+EOF
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+cat <<EOF
+ }
+EOF
+fi
+cat <<EOF
+ .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
+ .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
+ ${OTHER_PLT_RELOC_SECTIONS}
+
+ .init ${RELOCATING-0} :
+ {
+ ${RELOCATING+${INIT_START}}
+ KEEP (*(.init))
+ ${RELOCATING+${INIT_END}}
+ } =${NOP-0}
+
+ ${DATA_PLT-${BSS_PLT-${PLT}}}
+ .text ${RELOCATING-0} :
+ {
+ ${RELOCATING+${TEXT_START_SYMBOLS}}
+ *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
+ KEEP (*(.text.*personality*))
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ ${RELOCATING+${OTHER_TEXT_SECTIONS}}
+ } =${NOP-0}
+ .fini ${RELOCATING-0} :
+ {
+ ${RELOCATING+${FINI_START}}
+ KEEP (*(.fini))
+ ${RELOCATING+${FINI_END}}
+ } =${NOP-0}
+ ${RELOCATING+PROVIDE (__etext = .);}
+ ${RELOCATING+PROVIDE (_etext = .);}
+ ${RELOCATING+PROVIDE (etext = .);}
+ ${WRITABLE_RODATA-${RODATA}}
+ .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ ${CREATE_SHLIB-${SDATA2}}
+ ${CREATE_SHLIB-${SBSS2}}
+ ${OTHER_READONLY_SECTIONS}
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
+ .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
+
+ /* 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-${CREATE_PIE-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}}
+ ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
+ ${CREATE_PIE+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}}
+
+ /* Exception handling */
+ .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
+
+ /* Thread Local Storage sections */
+ .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
+ .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
+
+ .preinit_array ${RELOCATING-0} : { KEEP (*(.preinit_array)) }
+ .init_array ${RELOCATING-0} : { KEEP (*(.init_array)) }
+ .fini_array ${RELOCATING-0} : { KEEP (*(.fini_array)) }
+
+ ${SMALL_DATA_CTOR-${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR-${RELOCATING+${DTOR}}}
+ .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
+
+ ${RELOCATING+${DATARELRO}}
+ ${OTHER_RELRO_SECTIONS}
+ ${TEXT_DYNAMIC-${DYNAMIC}}
+ ${NO_SMALL_DATA+${RELRO_NOW+${GOT}}}
+ ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
+ ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT+${GOTPLT}}}}
+ ${RELOCATING+${DATA_SEGMENT_RELRO_END}}
+ ${NO_SMALL_DATA+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
+
+ ${DATA_PLT+${PLT_BEFORE_GOT-${PLT}}}
+
+ .data ${RELOCATING-0} :
+ {
+ ${RELOCATING+${DATA_START_SYMBOLS}}
+ *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
+ KEEP (*(.gnu.linkonce.d.*personality*))
+ ${CONSTRUCTING+SORT(CONSTRUCTORS)}
+ }
+ .data1 ${RELOCATING-0} : { *(.data1) }
+ ${WRITABLE_RODATA+${RODATA}}
+ ${OTHER_READWRITE_SECTIONS}
+ ${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
+ ${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
+ ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
+ ${RELOCATING+${OTHER_GOT_SYMBOLS}}
+ ${NO_SMALL_DATA-${GOT}}
+ ${OTHER_GOT_SECTIONS}
+ ${SDATA}
+ ${OTHER_SDATA_SECTIONS}
+ ${RELOCATING+_edata = .;}
+ ${RELOCATING+PROVIDE (edata = .);}
+ ${RELOCATING+__bss_start = .;}
+ ${RELOCATING+${OTHER_BSS_SYMBOLS}}
+ ${SBSS}
+ ${BSS_PLT+${PLT}}
+ .bss ${RELOCATING-0} :
+ {
+ *(.dynbss)
+ *(.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});}
+ }
+ ${OTHER_BSS_SECTIONS}
+ ${RELOCATING+. = ALIGN(${ALIGNMENT});}
+ ${RELOCATING+_end = .;}
+ ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
+ ${RELOCATING+PROVIDE (end = .);}
+ ${RELOCATING+${DATA_SEGMENT_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.indexstr 0 : { *(.stab.indexstr) }
+
+ .comment 0 : { *(.comment) }
+
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+
+ ${STACK_ADDR+${STACK}}
+ ${OTHER_SECTIONS}
+ ${RELOCATING+${OTHER_END_SYMBOLS}}
+ ${RELOCATING+${STACKNOTE}}
+}
+EOF
diff --git a/contrib/binutils/ld/scripttempl/pep.sc b/contrib/binutils/ld/scripttempl/pep.sc
new file mode 100644
index 0000000..edad5ee
--- /dev/null
+++ b/contrib/binutils/ld/scripttempl/pep.sc
@@ -0,0 +1,272 @@
+# Linker script for PE.
+
+if test -z "${RELOCATEABLE_OUTPUT_FORMAT}"; then
+ RELOCATEABLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
+fi
+
+# We can't easily and portably get an unquoted $ in a shell
+# substitution, so we do this instead.
+# Sorting of the .foo$* sections is required by the definition of
+# grouped sections in PE.
+# Sorting of the file names in R_IDATA is required by the
+# current implementation of dlltool (this could probably be changed to
+# use grouped sections instead).
+if test "${RELOCATING}"; then
+ R_TEXT='*(SORT(.text$*))'
+ R_DATA='*(SORT(.data$*))'
+ R_RDATA='*(SORT(.rdata$*))'
+ R_IDATA='
+ SORT(*)(.idata$2)
+ SORT(*)(.idata$3)
+ /* These zeroes mark the end of the import list. */
+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
+ SORT(*)(.idata$4)
+ SORT(*)(.idata$5)
+ SORT(*)(.idata$6)
+ SORT(*)(.idata$7)'
+ R_CRT_XC='*(SORT(.CRT$XC*)) /* C initialization */'
+ R_CRT_XI='*(SORT(.CRT$XI*)) /* C++ initialization */'
+ R_CRT_XL='*(SORT(.CRT$XL*)) /* TLS callbacks */'
+ R_CRT_XP='*(SORT(.CRT$XP*)) /* Pre-termination */'
+ R_CRT_XT='*(SORT(.CRT$XT*)) /* Termination */'
+ R_TLS='
+ *(.tls)
+ *(.tls$)
+ *(SORT(.tls$*))'
+ R_RSRC='*(SORT(.rsrc$*))'
+else
+ R_TEXT=
+ R_DATA=
+ R_RDATA=
+ R_IDATA=
+ R_CRT=
+ R_RSRC=
+fi
+
+cat <<EOF
+${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
+${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
+${OUTPUT_ARCH+OUTPUT_ARCH(${OUTPUT_ARCH})}
+
+${LIB_SEARCH_DIRS}
+
+SECTIONS
+{
+ ${RELOCATING+/* Make the virtual address and file offset synced if the alignment is}
+ ${RELOCATING+ lower than the target page size. */}
+ ${RELOCATING+. = SIZEOF_HEADERS;}
+ ${RELOCATING+. = ALIGN(__section_alignment__);}
+ .text ${RELOCATING+ __image_base__ + ( __section_alignment__ < ${TARGET_PAGE_SIZE} ? . : __section_alignment__ )} :
+ {
+ ${RELOCATING+ *(.init)}
+ *(.text)
+ ${R_TEXT}
+ *(.glue_7t)
+ *(.glue_7)
+ ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
+ LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); }
+ ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
+ LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); }
+ ${RELOCATING+ *(.fini)}
+ /* ??? Why is .gcc_exc here? */
+ ${RELOCATING+ *(.gcc_exc)}
+ ${RELOCATING+PROVIDE (etext = .);}
+ *(.gcc_except_table)
+ }
+
+ /* The Cygwin32 library uses a section to avoid copying certain data
+ on fork. This used to be named ".data$nocopy". The linker used
+ to include this between __data_start__ and __data_end__, but that
+ breaks building the cygwin32 dll. Instead, we name the section
+ ".data_cygwin_nocopy" and explictly include it after __data_end__. */
+
+ .data ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ ${RELOCATING+__data_start__ = . ;}
+ *(.data)
+ *(.data2)
+ ${R_DATA}
+ *(.jcr)
+ ${RELOCATING+__data_end__ = . ;}
+ ${RELOCATING+*(.data_cygwin_nocopy)}
+ }
+
+ .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.rdata)
+ ${R_RDATA}
+ *(.eh_frame)
+ ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST__ = .;}
+ ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST__ = .;}
+ *(.rdata_runtime_pseudo_reloc)
+ ${RELOCATING+___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
+ ${RELOCATING+__RUNTIME_PSEUDO_RELOC_LIST_END__ = .;}
+ }
+
+ .pdata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.pdata)
+ }
+
+ .bss ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ ${RELOCATING+__bss_start__ = . ;}
+ *(.bss)
+ *(COMMON)
+ ${RELOCATING+__bss_end__ = . ;}
+ }
+
+ .edata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.edata)
+ }
+
+ /DISCARD/ :
+ {
+ *(.debug\$S)
+ *(.debug\$T)
+ *(.debug\$F)
+ *(.drectve)
+ }
+
+ .idata ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pep.em:sort_sections. */
+ ${R_IDATA}
+ }
+ .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ ${RELOCATING+___crt_xc_start__ = . ;}
+ ${R_CRT_XC}
+ ${RELOCATING+___crt_xc_end__ = . ;}
+ ${RELOCATING+___crt_xi_start__ = . ;}
+ ${R_CRT_XI}
+ ${RELOCATING+___crt_xi_end__ = . ;}
+ ${RELOCATING+___crt_xl_start__ = . ;}
+ ${R_CRT_XL}
+ /* ___crt_xl_end__ is defined in the TLS Directory support code */
+ ${RELOCATING+___crt_xp_start__ = . ;}
+ ${R_CRT_XP}
+ ${RELOCATING+___crt_xp_end__ = . ;}
+ ${RELOCATING+___crt_xt_start__ = . ;}
+ ${R_CRT_XT}
+ ${RELOCATING+___crt_xt_end__ = . ;}
+ }
+
+ .tls ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ ${RELOCATING+___tls_start__ = . ;}
+ ${R_TLS}
+ ${RELOCATING+___tls_end__ = . ;}
+ }
+
+ .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ /* end is deprecated, don't use it */
+ ${RELOCATING+PROVIDE (end = .);}
+ ${RELOCATING+PROVIDE ( _end = .);}
+ ${RELOCATING+ __end__ = .;}
+ }
+
+ .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.rsrc)
+ ${R_RSRC}
+ }
+
+ .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ *(.reloc)
+ }
+
+ .stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.stab)
+ }
+
+ .stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.stabstr)
+ }
+
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section. Unlike other targets that fake this by putting the
+ section VMA at 0, the PE format will not allow it. */
+
+ /* DWARF 1.1 and DWARF 2. */
+ .debug_aranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_aranges)
+ }
+
+ .debug_pubnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_pubnames)
+ }
+
+ /* DWARF 2. */
+ .debug_info ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_info) *(.gnu.linkonce.wi.*)
+ }
+
+ .debug_abbrev ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_abbrev)
+ }
+
+ .debug_line ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_line)
+ }
+
+ .debug_frame ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_frame)
+ }
+
+ .debug_str ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_str)
+ }
+
+ .debug_loc ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_loc)
+ }
+
+ .debug_macinfo ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_macinfo)
+ }
+
+ /* SGI/MIPS DWARF 2 extensions. */
+ .debug_weaknames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_weaknames)
+ }
+
+ .debug_funcnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_funcnames)
+ }
+
+ .debug_typenames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_typenames)
+ }
+
+ .debug_varnames ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_varnames)
+ }
+
+ /* DWARF 3. */
+ .debug_ranges ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
+ {
+ *(.debug_ranges)
+ }
+}
+EOF
diff --git a/contrib/binutils/libiberty/ChangeLog b/contrib/binutils/libiberty/ChangeLog
index fb328da..f700058 100644
--- a/contrib/binutils/libiberty/ChangeLog
+++ b/contrib/binutils/libiberty/ChangeLog
@@ -1,18 +1,312 @@
+2007-06-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Use ACX_PROG_CC_ALMOST_PEDANTIC too.
+ * configure: Regenerate.
+
+2007-06-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * aclocal.m4: Include config/warnings.m4.
+ * configure.ac: Use ACX_PROG_CC_WARNING_OPTS.
+ * configure: Regenerate.
+
+2007-06-07 Geoffrey Keating <geoffk@apple.com>
+
+ * configure.ac: Non-default multilibs can be cross compilations.
+ * configure: Regenerate
+
+2007-05-07 Nathan Froyd <froydnj@codesourcery.com>
+
+ * argv.c (writeargv): New function.
+
+2007-05-05 Geoffrey Keating <geoffk@apple.com>
+
+ * cp-demangle.c (d_name): Detect local-source-name.
+ (d_prefix): Likewise.
+ (d_unqualified_name): Implement local-source-name.
+
+2007-05-03 Joel Brobecker <brobecker@adacore.com>
+
+ * filename_cmp.c: Replace include of ctype.h by include of
+ safe-ctype.h.
+ (filename_cmp): Use TOLOWER instead of tolower for conversions
+ that are locale-independent.
+ * Makefile.in (filename_cmp.o): Add dependency on safe-ctype.h.
+
+2007-04-11 Thomas Neumann tneumann@users.sourceforge.net
+
+ * argv.c: Use ANSI C declarations.
+ * make-relative-prefix.c: Likewise.
+
+2007-04-06 Joel Brobecker <brobecker@adacore.com>
+
+ * filename_cmp.c (filename_cmp): Improve documentation.
+
+2007-04-02 Andreas Schwab <schwab@suse.de>
+
+ * filename_cmp.c: Include "config.h".
+
+2007-03-29 Joel Brobecker <brobecker@adacore.com>
+
+ * filename_cmp.c: New file.
+ * Makefile.in (CFILES): Add filename_cmp.c.
+ (REQUIRED_OFILES): Add filename_cmp.o
+ (filename_cmp.o): New rule.
+ * functions.texi: Regenerate.
+
+2007-03-15 Geoffrey Keating <geoffk@apple.com>
+
+ * cp-demangle.c (d_encoding): Exit early on error.
+ (d_pointer_to_member_type): Exit early if cplus_demangle_type
+ returns NULL.
+ (cplus_demangle_type): Likewise.
+ * testsuite/demangle-expected: New testcase.
+
+2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
+
+ * Makefile.in: Add install-pdf target as copied from
+ automake v1.10 rules.
+ * testsuite/Makefile.in: Add dummy install-pdf target.
+
+2007-03-01 Peter Breitenlohner <peb@mppmu.mpg.de>
+ Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR other/16513
+ * Makefile.in: Install library under $(MULTIOSDIR), not $(MULTISUBDIR).
+ Install headers in multilib independent location.
+
+2007-02-26 DJ Delorie <dj@redhat.com>
+
+ * configure.ac: add djgpp-specific results, so we don't have to
+ link during a cross compilation.
+ * configure: Regenerated.
+
+2007-01-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ * hex.c: Fix typo.
+ * choose-temp.c: Likewise.
+ * functions.texi: Regenerate.
+
+2007-01-31 Vladimir Prus <vladimir@codesourcery.com>
+
+ * pex-common.h (struct pex_obj): New fields
+ stderr_pipe and read_err.
+ * pex-common.c (pex_init_common): Initialize
+ stderr_pipe.
+ (pex_run_in_environment): Add error checking
+ for PEX_STDERR_TO_PIPE. Create a pipe
+ for stderr if necessary.
+ (pex_read_err): New.
+ (pex_free): Close read_err.
+ * pexecute.txh: Document changes.
+ * functions.texi: Regenerated.
+
+2007-01-31 Ben Elliston <bje@au.ibm.com>
+
+ * strsignal.c (psignal): Change type of signo to int.
+ * functions.texi: Regenerate.
+
+2007-01-29 Simon Baldwin <simonb@google.com>
+
+ * cp-demangle.h (cplus_demangle_operators): External definition
+ suppressed if not building for libstdc++.
+ * cp-demangle.c (__gcclibcxx_demangle_callback): Augmented interface
+ to demangling, provides a malloc-less version of __cxa_demangle.
+ (cplus_demangle_print_callback): Public callback version of
+ cplus_demangle_print.
+ (struct d_growable_string): New growable string structure.
+ (d_growable_string_init): New function, provides support for
+ growable strings separate from print info.
+ (d_growable_string_resize): Likewise.
+ (d_growable_string_append_buffer): Likewise.
+ (d_growable_string_callback_adapter):): Likewise.
+ (d_print_init): New print info initialization function.
+ (d_print_error): Macro replace by inline function.
+ (d_print_saw_error): Likewise.
+ (d_append_char): Likewise.
+ (d_append_buffer): Likewise.
+ (d_append_string): New inline function, replaces the
+ d_append_string_constant macro.
+ (d_flush_buffer): New function, flushes buffer to callback.
+ (d_demangle_callback, is_ctor_or_dtor): Malloc-based fallback
+ for unsupported dynamic arrays replaced by alloca().
+ (d_demangle): Return string length estimating removed.
+ (d_dump): Moved error case handling from call site into function.
+ (d_print_resize): Function removed.
+ (d_print_append_char): Likewise.
+ (d_print_append_buffer): Likewise.
+ (d_print_error): Likewise.
+ (d_print_comp): Added special case handling for Java arrays.
+ (java_demangle_v3): Removed string post-processing for Java arrays,
+ now replaced by special case handling in d_print_comp.
+ (cplus_demangle_v3_callback): Augmented interface to demangling,
+ provides a malloc-less version of cplus_demangle_v3.
+ (java_demangle_v3_callback): Augmented interface to demangling,
+ provides a malloc-less version of java_demangle_v3.
+
+2007-01-12 Ben Elliston <bje@au.ibm.com>
+
+ * pex-unix.c (writeerr): Cast write result to void.
+
+ * choose-temp.c (choose_temp_base): Check the result of the call
+ to mktemp rather than testing the length of the modified string.
+
+2006-12-20 Geoffrey Keating <geoffk@apple.com>
+
+ * cp-demangle.h: Add comment explaining what to do to avoid
+ overrunning string.
+ (d_check_char): New.
+ (d_next_char): Don't advance past trailing '\0'.
+ * cp-demangle.c (cplus_demangle_mangled_name): Use d_check_char.
+ (d_nested_name): Likewise.
+ (d_special_name): Likewise.
+ (d_call_offset): Likewise.
+ (d_function_type): Likewise.
+ (d_array_type): Likewise.
+ (d_pointer_to_member_type): Likewise.
+ (d_template_param): Likewise.
+ (d_template_args): Likewise.
+ (d_template_arg): Likewise.
+ (d_expr_primary): Likewise.
+ (d_local_name): Likewise.
+ (d_substitution): Likewise.
+ (d_ctor_dtor_name): Use d_advance rather than d_next_char.
+ * testsuite/test-demangle.c: Include sys/mman.h.
+ (MAP_ANONYMOUS): Define.
+ (protect_end): New.
+ (main): Use protect_end.
+ * testsuite/demangle-expected: Add testcases for overrunning
+ the end of the string.
+
+2006-11-30 Andrew Stubbs <andrew.stubbs@st.com>
+ J"orn Rennecke <joern.rennecke@st.com>
+
+ PR driver/29931
+ * make-relative-prefix.c (make_relative_prefix_1): New function,
+ broken out of make_relative_prefix. Make link resolution dependent
+ on new parameter.
+ (make_relative_prefix): Use make_relative_prefix_1.
+ (make_relative_prefix_ignore_links): New function.
+
+2006-11-08 Vladimir Prus <vladimir@codesourcery.com>
+
+ * pex-win32.c (no_suffixes): Remove.
+ (std_suffixes): Add "" as first element.
+ (find_executable): Remove detection of already-present
+ extension. Try all suffixes in std_suffixes.
+
+2006-11-07 Julian Brown <julian@codesourcery.com>
+
+ * floatformat.c (get_field): Fix segfault with little-endian word
+ order on 64-bit hosts.
+ (put_field): Likewise.
+ (min): Move definition.
+
+2006-10-26 Danny Smith <dannysmith@users.sourceforge.net>
+
+ pex-win32.c (argv_to_cmdline): Replace xmalloc with XNEWVEC.
+ (find_executable): Likewise.
+ (win32_spawn): Cast alloca return to (char**).
+ Replace malloc with XNEWVEC.
+ bcopy.c (bcopy): Add explict casts in assignments.
+
+2006-10-25 Ben Elliston <bje@au.ibm.com>
+
+ * pexecute.txh: Wrap pexecute's "flag" argument with @var {..}.
+
+2006-10-10 Brooks Moses <bmoses@stanford.edu>
+
+ * Makefile.in: Added "pdf", "libiberty.pdf" target support.
+ * testsuite/Makefile.in: Added empty "pdf" target.
+
+2006-09-22 Ian Lance Taylor <ian@airs.com>
+
+ PR other/29176
+ * cp-demangle.c (d_substitution): Check for overflow when
+ computing substitution index.
+
+2006-08-30 Corinna Vinschen <corinna@vinschen.de>
+
+ * configure.ac: Add case for Mingw as host.
+ * configure: Regenerate.
+
+2006-08-27 Ian Lance Taylor <ian@airs.com>
+
+ PR driver/27622
+ * pex-common.h (struct pex_funcs): Add toclose parameter to
+ exec_child field.
+ * pex-common.c (pex_run_in_environment): Pass toclose to
+ exec_child.
+ * pex-djgpp.c (pex_djgpp_exec_child): Add toclose parameter.
+ * pex-unix.c (pex_unix_exec_child): Likewise.
+ * pex-msdos.c (pex_msdos_exec_child): Likewise.
+ * pex-win32.c (pex_win32_exec_child): Likewise.
+
+ PR other/28797
+ * cp-demangle.c (d_pointer_to_member_type): Do add a substitution
+ for a qualified member which is not a function.
+ * testsuite/demangle-expected: Add test case.
+
+2006-07-27 Jan Hubicka <jh@suse.cz>
+
+ PR rtl-optimization/28071
+ * hashtab.c (htab_empty): Clear out n_deleted/n_elements;
+ downsize the hashtable.
+
+2006-07-04 Peter O'Gorman <peter@pogma.com>
+
+ * Makefile.in: chmod 644 before ranlib during install.
+
+2006-06-02 Mark Shinwell <shinwell@codesourcery.com>
+
+ * pex-unix.c (pex_unix_exec_child): Insert cast when assigning
+ to environ.
+
+2006-06-01 Mark Shinwell <shinwell@codesourcery.com>
+
+ * pex-common.c: New function pex_run_in_environment.
+ * pex-common.h: Add environment parameter to exec_child.
+ * pex-msdos.c: Add environment parameter to pex_msdos_exec_child.
+ * pex-djgpp.c: Add environment parameter to pex_djgpp_exec_child.
+ (pex_djgpp_exec_child): Pass environment to child process.
+ * pex-unix.c: Add environment parameter to pex_unix_exec_child.
+ (pex_unix_exec_child): Pass environment to child process.
+ * pex-win32.c: Add environment parameter to pex_win32_exec_child.
+ New function env_compare for comparing VAR=VALUE pairs.
+ (win32_spawn): Assemble environment block and pass to CreateProcess.
+ (spawn_script): Pass environment through to win32_spawn.
+ (pex_win32_exec_child): Pass environment through to spawn_script and
+ win32_spawn.
+ * functions.texi: Regenerate.
+ * pexecute.txh: Document pex_run_in_environment.
+
+2006-05-28 Mark Shinwell <shinwell@codesourcery.com>
+
+ * mkstemps.c: Open temporary files in binary mode.
+
+2006-05-12 Anton Blanchard <anton@samba.org>
+
+ * cplus-dem.c (demangle_fund_type): Ensure buf is large enough to
+ hold "int%u_t".
+
+2006-04-24 Julian Brown <julian@codesourcery.com>
+
+ * floatformat.c (floatformat_to_double): Fix (biased) exponent=0 case.
+
2006-03-29 Jim Blandy <jimb@codesourcery.com>
- * pex-common.c (pex_input_file, pex_input_pipe): New functions.
+ * pex-common.c (pex_input_file, pex_input_pipe): New functions.
(pex_init_common): Initialize obj->input_file.
(pex_run): Close any file opened by pex_input_file.
- * pexecute.txh (pex_input_file, pex_input_pipe): New docs.
- * pex-common.h (struct pex_obj): New field input_file.
+ * pexecute.txh (pex_input_file, pex_input_pipe): New docs.
+ * pex-common.h (struct pex_obj): New field input_file.
(struct pex_funcs): New function ptr fdopenw.
- * pex-unix.c (pex_unix_fdopenw): New function.
- (funcs): List it as our fdopenw function.
- * pex-win32.c (pex_win32_fdopenw): New function.
- (funcs): List it as our fdopenw function.
- * pex-djgpp.c (funcs): Leave fdopenw null.
- * pex-msdos (funcs): Same.
- * functions.texi: Regenerated.
+ * pex-unix.c (pex_unix_fdopenw): New function.
+ (funcs): List it as our fdopenw function.
+ * pex-win32.c (pex_win32_fdopenw): New function.
+ (funcs): List it as our fdopenw function.
+ * pex-djgpp.c (funcs): Leave fdopenw null.
+ * pex-msdos (funcs): Same.
+ * functions.texi: Regenerated.
2006-04-10 Jim Blandy <jimb@codesourcery.com>
@@ -6735,7 +7029,7 @@ Wed Aug 19 14:40:34 1992 Ian Lance Taylor (ian@cygnus.com)
Mon Aug 10 17:33:40 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
- * Makefile.in: clean up definition of CFILES, more comments
+ * Makefile.in: clean up definition of CFILES, more comments
Sat Aug 8 23:10:59 1992 Fred Fish (fnf@cygnus.com)
diff --git a/contrib/binutils/libiberty/Makefile.in b/contrib/binutils/libiberty/Makefile.in
index 95a8278..735f1e6 100644
--- a/contrib/binutils/libiberty/Makefile.in
+++ b/contrib/binutils/libiberty/Makefile.in
@@ -1,6 +1,6 @@
#
# Makefile
-# Copyright (C) 1990, 91-99, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Copyright (C) 1990, 91-99, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
# Free Software Foundation
#
# This file is part of the libiberty library.
@@ -131,8 +131,8 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
calloc.c choose-temp.c clock.c concat.c cp-demangle.c \
cp-demint.c cplus-dem.c \
dyn-string.c \
- fdmatch.c ffs.c fibheap.c floatformat.c fnmatch.c \
- fopen_unlocked.c \
+ fdmatch.c ffs.c fibheap.c filename_cmp.c floatformat.c \
+ fnmatch.c fopen_unlocked.c \
getcwd.c getopt.c getopt1.c getpagesize.c getpwd.c getruntime.c \
gettimeofday.c \
hashtab.c hex.c \
@@ -165,8 +165,8 @@ REQUIRED_OFILES = ./regex.o ./cplus-dem.o ./cp-demangle.o ./md5.o \
./alloca.o ./argv.o \
./choose-temp.o ./concat.o ./cp-demint.o \
./dyn-string.o \
- ./fdmatch.o ./fibheap.o ./floatformat.o ./fnmatch.o \
- ./fopen_unlocked.o \
+ ./fdmatch.o ./fibheap.o ./filename_cmp.o ./floatformat.o \
+ ./fnmatch.o ./fopen_unlocked.o \
./getopt.o ./getopt1.o ./getpwd.o ./getruntime.o \
./hashtab.o ./hex.o \
./lbasename.o ./lrealpath.o \
@@ -246,6 +246,24 @@ install-info: install-info-subdir
clean-info: clean-info-subdir
dvi: libiberty.dvi dvi-subdir
+LIBIBERTY_PDFFILES = libiberty.pdf
+
+pdf: $(LIBIBERTY_PDFFILES) pdf-subdir
+
+.PHONY: install-pdf
+
+pdf__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+
+install-pdf: $(LIBIBERTY_PDFFILES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pdfdir)" || $(mkinstalldirs) "$(DESTDIR)$(pdfdir)"
+ @list='$(LIBIBERTY_PDFFILES)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(pdf__strip_dir) \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+ done
+
# html, install-html targets
HTMLS = libiberty.html
@@ -319,6 +337,9 @@ libiberty.info : $(srcdir)/libiberty.texi $(TEXISRC)
libiberty.dvi : $(srcdir)/libiberty.texi $(TEXISRC)
texi2dvi $(srcdir)/libiberty.texi
+libiberty.pdf : $(srcdir)/libiberty.texi $(TEXISRC)
+ texi2pdf $(srcdir)/libiberty.texi
+
libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
$(MAKEINFO) --no-split --html -I$(srcdir) -o $@ $<
@@ -332,15 +353,20 @@ libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
INSTALL_DEST = @INSTALL_DEST@
install: install_to_$(INSTALL_DEST) install-subdir
+# This is tricky. Even though CC in the Makefile contains
+# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
+# default multilib, so we have to take LIBCFLAGS into account as well,
+# since it will be passed the multilib flags.
+MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory`
install_to_libdir: all
- ${mkinstalldirs} $(DESTDIR)$(libdir)$(MULTISUBDIR)
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(libdir)$(MULTISUBDIR) ; $(RANLIB) $(TARGETLIB)n )
- mv -f $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)$(MULTISUBDIR)/$(TARGETLIB)
+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR)
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n )
+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)
if test -n "${target_header_dir}"; then \
case "${target_header_dir}" in \
/*) thd=${target_header_dir};; \
- *) thd=${includedir}${MULTISUBDIR}/${target_header_dir};; \
+ *) thd=${includedir}/${target_header_dir};; \
esac; \
${mkinstalldirs} $(DESTDIR)$${thd}; \
for h in ${INSTALLED_HEADERS}; do \
@@ -349,15 +375,10 @@ install_to_libdir: all
fi
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-# This is tricky. Even though CC in the Makefile contains
-# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the
-# default multilib, so we have to take LIBCFLAGS into account as well,
-# since it will be passed the multilib flags.
-MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory`
install_to_tooldir: all
${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n
- ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; $(RANLIB) $(TARGETLIB)n )
+ ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n; $(RANLIB) $(TARGETLIB)n )
mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
@@ -434,7 +455,7 @@ mostlyclean: mostlyclean-subdir
clean: clean-subdir
$(MAKE) SUBDIRS="" mostlyclean
-rm -f *.a required-list tmpmulti.out
- -rm -f libiberty.dvi libiberty.info* libiberty.html
+ -rm -f libiberty.dvi libiberty.pdf libiberty.info* libiberty.html
@$(MULTICLEAN) multi-clean DO=clean
distclean: distclean-subdir
$(MAKE) SUBDIRS="" clean
@@ -463,7 +484,7 @@ config.status: $(srcdir)/configure
# 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 \
+install-info-subdir clean-info-subdir dvi-subdir pdf-subdir install-subdir \
etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
maintainer-clean-subdir: config.h
@subdirs='$(SUBDIRS)'; \
@@ -630,6 +651,13 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/fibheap.c $(OUTPUT_OPTION)
+./filename_cmp.o: $(srcdir)/filename_cmp.c $(INCDIR)/filenames.h \
+ $(INCDIR)/safe-ctype.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/filename_cmp.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/filename_cmp.c $(OUTPUT_OPTION)
+
./floatformat.o: $(srcdir)/floatformat.c config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/floatformat.h $(INCDIR)/libiberty.h
if [ x"$(PICFLAG)" != x ]; then \
diff --git a/contrib/binutils/libiberty/aclocal.m4 b/contrib/binutils/libiberty/aclocal.m4
index 0b49d03..643939e 100644
--- a/contrib/binutils/libiberty/aclocal.m4
+++ b/contrib/binutils/libiberty/aclocal.m4
@@ -1,5 +1,6 @@
sinclude(../config/acx.m4)
sinclude(../config/no-executables.m4)
+sinclude(../config/warnings.m4)
dnl See whether strncmp reads past the end of its string parameters.
dnl On some versions of SunOS4 at least, strncmp reads a word at a time
diff --git a/contrib/binutils/libiberty/argv.c b/contrib/binutils/libiberty/argv.c
index 11ca549..faeb72d 100644
--- a/contrib/binutils/libiberty/argv.c
+++ b/contrib/binutils/libiberty/argv.c
@@ -290,6 +290,61 @@ char **buildargv (const char *input)
/*
+@deftypefn Extension int writeargv (const char **@var{argv}, FILE *@{file})
+
+Write each member of ARGV, handling all necessary quoting, to the file
+named by FILE, separated by whitespace. Return 0 on success, non-zero
+if an error occurred while writing to FILE.
+
+@end deftypefn
+
+*/
+
+int
+writeargv (char **argv, FILE *f)
+{
+ int status = 0;
+
+ if (f == NULL)
+ return 1;
+
+ while (*argv != NULL)
+ {
+ const char *arg = *argv;
+
+ while (*arg != EOS)
+ {
+ char c = *arg;
+
+ if (ISSPACE(c) || c == '\\' || c == '\'' || c == '"')
+ if (EOF == fputc ('\\', f))
+ {
+ status = 1;
+ goto done;
+ }
+
+ if (EOF == fputc (c, f))
+ {
+ status = 1;
+ goto done;
+ }
+ arg++;
+ }
+
+ if (EOF == fputc ('\n', f))
+ {
+ status = 1;
+ goto done;
+ }
+ argv++;
+ }
+
+ done:
+ return status;
+}
+
+/*
+
@deftypefn Extension void expandargv (int *@var{argcp}, char ***@var{argvp})
The @var{argcp} and @code{argvp} arguments are pointers to the usual
@@ -312,9 +367,7 @@ operating system to free the memory when the program exits.
*/
void
-expandargv (argcp, argvp)
- int *argcp;
- char ***argvp;
+expandargv (int *argcp, char ***argvp)
{
/* The argument we are currently processing. */
int i = 0;
diff --git a/contrib/binutils/libiberty/bcopy.c b/contrib/binutils/libiberty/bcopy.c
index 1e2eca9..f9b7a8a 100644
--- a/contrib/binutils/libiberty/bcopy.c
+++ b/contrib/binutils/libiberty/bcopy.c
@@ -16,8 +16,8 @@ bcopy (const void *src, void *dest, size_t len)
{
if (dest < src)
{
- const char *firsts = src;
- char *firstd = dest;
+ const char *firsts = (const char *) src;
+ char *firstd = (char *) dest;
while (len--)
*firstd++ = *firsts++;
}
diff --git a/contrib/binutils/libiberty/choose-temp.c b/contrib/binutils/libiberty/choose-temp.c
index 0cba990..b1c2e5b 100644
--- a/contrib/binutils/libiberty/choose-temp.c
+++ b/contrib/binutils/libiberty/choose-temp.c
@@ -46,7 +46,7 @@ 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
+This function is provided for backwards compatibility only. Its use is
not recommended.
@end deftypefn
@@ -65,8 +65,7 @@ choose_temp_base (void)
strcpy (temp_filename, base);
strcpy (temp_filename + len, TEMP_FILE);
- mktemp (temp_filename);
- if (strlen (temp_filename) == 0)
+ if (mktemp (temp_filename) == 0)
abort ();
return temp_filename;
}
diff --git a/contrib/binutils/libiberty/configure b/contrib/binutils/libiberty/configure
index ed7423a..0312cc4 100755
--- a/contrib/binutils/libiberty/configure
+++ b/contrib/binutils/libiberty/configure
@@ -847,6 +847,7 @@ Optional Features:
--enable-maintainer-mode
enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
+ --enable-multilib build many library versions (default)
--enable-install-libiberty Install headers for end users
Optional Packages:
@@ -1727,6 +1728,29 @@ else
fi
+# Add --enable-multilib to configure.
+# Default to --enable-multilib
+# Check whether --enable-multilib or --disable-multilib was given.
+if test "${enable_multilib+set}" = set; then
+ enableval="$enable_multilib"
+ case "$enableval" in
+ yes) multilib=yes ;;
+ no) multilib=no ;;
+ *) { { echo "$as_me:$LINENO: error: bad value $enableval for multilib option" >&5
+echo "$as_me: error: bad value $enableval for multilib option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+else
+ multilib=yes
+fi;
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+ && test "x${with_multisubdir}" != x ; then
+ cross_compiling=maybe
+fi
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -2929,22 +2953,33 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_c_preproc_warn_flag=yes
-# Warn C++ incompatibilities if supported.
-echo "$as_me:$LINENO: checking whether ${CC} accepts -Wc++-compat" >&5
-echo $ECHO_N "checking whether ${CC} accepts -Wc++-compat... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_w_cxx_compat+set}" = set; then
+ac_libiberty_warn_cflags=
+save_CFLAGS="$CFLAGS"
+for option in -W -Wall -Wwrite-strings -Wc++-compat \
+ -Wstrict-prototypes; do
+ as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`
+
+ echo "$as_me:$LINENO: checking whether $CC supports $option" >&5
+echo $ECHO_N "checking whether $CC supports $option... $ECHO_C" >&6
+if eval "test \"\${$as_acx_Woption+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- save_CFLAGS="$CFLAGS"
- CFLAGS="-Wc++-compat"
- cat >conftest.$ac_ext <<_ACEOF
+ CFLAGS="$option"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -2968,29 +3003,91 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_prog_cc_w_cxx_compat=yes
+ eval "$as_acx_Woption=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_prog_cc_w_cxx_compat=no
+eval "$as_acx_Woption=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_w_cxx_compat" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_w_cxx_compat" >&6
+echo "$as_me:$LINENO: result: `eval echo '${'$as_acx_Woption'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_acx_Woption'}'`" >&6
+ if test `eval echo '${'$as_acx_Woption'}'` = yes; then
+ ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }$option"
+fi
+
+ done
+CFLAGS="$save_CFLAGS"
+
+if test "$GCC" = yes; then
+ echo "$as_me:$LINENO: checking whether $CC supports -pedantic " >&5
+echo $ECHO_N "checking whether $CC supports -pedantic ... $ECHO_C" >&6
+if test "${acx_cv_prog_cc_pedantic_+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ save_CFLAGS="$CFLAGS"
+CFLAGS="-pedantic "
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+int
+main ()
+{
-if test x$GCC = xyes; then
- ac_libiberty_warn_cflags='-W -Wall -pedantic -Wwrite-strings -Wstrict-prototypes'
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ acx_cv_prog_cc_pedantic_=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+acx_cv_prog_cc_pedantic_=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+CFLAGS="$save_CFLAGS"
fi
-if test $ac_cv_prog_cc_w_cxx_compat = yes ; then
- ac_libiberty_warn_cflags="${ac_libiberty_warn_cflags} -Wc++-compat"
+echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic_" >&5
+echo "${ECHO_T}$acx_cv_prog_cc_pedantic_" >&6
+if test $acx_cv_prog_cc_pedantic_ = yes; then
+ ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic "
fi
+fi
+
+
+
if test "x$CC" != xcc; then
echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
@@ -5679,6 +5776,208 @@ _ACEOF
fi
+ # If we are being configured for Mingw, we know which functions
+ # Mingw provides and which ones we will be expected to provide.
+
+ case "${host}" in
+ *-*-mingw*)
+ case $LIBOBJS in
+ "asprintf.$ac_objext" | \
+ *" asprintf.$ac_objext" | \
+ "asprintf.$ac_objext "* | \
+ *" asprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "basename.$ac_objext" | \
+ *" basename.$ac_objext" | \
+ "basename.$ac_objext "* | \
+ *" basename.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS basename.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "bcmp.$ac_objext" | \
+ *" bcmp.$ac_objext" | \
+ "bcmp.$ac_objext "* | \
+ *" bcmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS bcmp.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "bcopy.$ac_objext" | \
+ *" bcopy.$ac_objext" | \
+ "bcopy.$ac_objext "* | \
+ *" bcopy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS bcopy.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "bzero.$ac_objext" | \
+ *" bzero.$ac_objext" | \
+ "bzero.$ac_objext "* | \
+ *" bzero.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS bzero.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "clock.$ac_objext" | \
+ *" clock.$ac_objext" | \
+ "clock.$ac_objext "* | \
+ *" clock.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS clock.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "ffs.$ac_objext" | \
+ *" ffs.$ac_objext" | \
+ "ffs.$ac_objext "* | \
+ *" ffs.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS ffs.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "getpagesize.$ac_objext" | \
+ *" getpagesize.$ac_objext" | \
+ "getpagesize.$ac_objext "* | \
+ *" getpagesize.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getpagesize.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "index.$ac_objext" | \
+ *" index.$ac_objext" | \
+ "index.$ac_objext "* | \
+ *" index.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS index.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "insque.$ac_objext" | \
+ *" insque.$ac_objext" | \
+ "insque.$ac_objext "* | \
+ *" insque.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS insque.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "mempcpy.$ac_objext" | \
+ *" mempcpy.$ac_objext" | \
+ "mempcpy.$ac_objext "* | \
+ *" mempcpy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS mempcpy.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "mkstemps.$ac_objext" | \
+ *" mkstemps.$ac_objext" | \
+ "mkstemps.$ac_objext "* | \
+ *" mkstemps.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS mkstemps.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "random.$ac_objext" | \
+ *" random.$ac_objext" | \
+ "random.$ac_objext "* | \
+ *" random.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS random.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "rindex.$ac_objext" | \
+ *" rindex.$ac_objext" | \
+ "rindex.$ac_objext "* | \
+ *" rindex.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS rindex.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "sigsetmask.$ac_objext" | \
+ *" sigsetmask.$ac_objext" | \
+ "sigsetmask.$ac_objext "* | \
+ *" sigsetmask.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS sigsetmask.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "stpcpy.$ac_objext" | \
+ *" stpcpy.$ac_objext" | \
+ "stpcpy.$ac_objext "* | \
+ *" stpcpy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS stpcpy.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "stpncpy.$ac_objext" | \
+ *" stpncpy.$ac_objext" | \
+ "stpncpy.$ac_objext "* | \
+ *" stpncpy.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS stpncpy.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "strndup.$ac_objext" | \
+ *" strndup.$ac_objext" | \
+ "strndup.$ac_objext "* | \
+ *" strndup.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "strverscmp.$ac_objext" | \
+ *" strverscmp.$ac_objext" | \
+ "strverscmp.$ac_objext "* | \
+ *" strverscmp.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS strverscmp.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "vasprintf.$ac_objext" | \
+ *" vasprintf.$ac_objext" | \
+ "vasprintf.$ac_objext "* | \
+ *" vasprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS vasprintf.$ac_objext" ;;
+esac
+
+ case $LIBOBJS in
+ "waitpid.$ac_objext" | \
+ *" waitpid.$ac_objext" | \
+ "waitpid.$ac_objext "* | \
+ *" waitpid.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS waitpid.$ac_objext" ;;
+esac
+
+
+ for f in $funcs; do
+ case "$f" in
+ asprintf | basename | bcmp | bcopy | bzero | clock | ffs | getpagesize | index | insque | mempcpy | mkstemps | random | rindex | sigsetmask | stpcpy | stpncpy | strdup | strndup | strverscmp | vasprintf | waitpid)
+ ;;
+ *)
+ n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >>confdefs.h <<_ACEOF
+#define $n 1
+_ACEOF
+
+ ;;
+ esac
+ done
+
+ # Mingw doesnt provide any of the variables in $vars, so we
+ # dont have to check them here.
+
+ # Of the functions in $checkfuncs, Mingw only has strerror.
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRERROR 1
+_ACEOF
+
+
+ setobjs=yes
+ ;;
+
+ esac
+
# We may wish to install the target headers somewhere.
# Check whether --enable-install-libiberty or --disable-install-libiberty was given.
if test "${enable_install_libiberty+set}" = set; then
@@ -5840,6 +6139,26 @@ _ACEOF
setobjs=yes
;;
+ *-*-msdosdjgpp)
+ for f in atexit basename bcmp bcopy bsearch bzero calloc clock ffs \
+ getcwd getpagesize getrusage gettimeofday gettimeofday \
+ index insque memchr memcmp memcpy memmove memset psignal \
+ putenv random rename rindex sbrk setenv stpcpy strcasecmp \
+ strchr strdup strerror strncasecmp strrchr strstr strtod \
+ strtol strtoul sysconf times tmpnam vfprintf vprintf \
+ vsprintf waitpid
+ do
+ n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >>confdefs.h <<_ACEOF
+#define $n 1
+_ACEOF
+
+ done
+
+
+ setobjs=yes
+ ;;
+
esac
fi
diff --git a/contrib/binutils/libiberty/cp-demangle.c b/contrib/binutils/libiberty/cp-demangle.c
index 109d533..992b358 100644
--- a/contrib/binutils/libiberty/cp-demangle.c
+++ b/contrib/binutils/libiberty/cp-demangle.c
@@ -1,5 +1,5 @@
/* Demangler for g++ V3 ABI.
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@wasabisystems.com>.
This file is part of the libiberty library, which is part of GCC.
@@ -42,6 +42,10 @@
This file will normally define the following functions, q.v.:
char *cplus_demangle_v3(const char *mangled, int options)
char *java_demangle_v3(const char *mangled)
+ int cplus_demangle_v3_callback(const char *mangled, int options,
+ demangle_callbackref callback)
+ int java_demangle_v3_callback(const char *mangled,
+ demangle_callbackref callback)
enum gnu_v3_ctor_kinds is_gnu_v3_mangled_ctor (const char *name)
enum gnu_v3_dtor_kinds is_gnu_v3_mangled_dtor (const char *name)
@@ -50,12 +54,14 @@
defined in demangle.h:
enum demangle_component_type
struct demangle_component
+ demangle_callbackref
and these functions defined in this file:
cplus_demangle_fill_name
cplus_demangle_fill_extended_operator
cplus_demangle_fill_ctor
cplus_demangle_fill_dtor
cplus_demangle_print
+ cplus_demangle_print_callback
and other functions defined in the file cp-demint.c.
This file also defines some other functions and variables which are
@@ -64,14 +70,20 @@
Preprocessor macros you can define while compiling this file:
IN_LIBGCC2
- If defined, this file defines the following function, q.v.:
+ If defined, this file defines the following functions, q.v.:
char *__cxa_demangle (const char *mangled, char *buf, size_t *len,
int *status)
- instead of cplus_demangle_v3() and java_demangle_v3().
+ int __gcclibcxx_demangle_callback (const char *,
+ void (*)
+ (const char *, size_t, void *),
+ void *)
+ instead of cplus_demangle_v3[_callback]() and
+ java_demangle_v3[_callback]().
IN_GLIBCPP_V3
- If defined, this file defines only __cxa_demangle(), and no other
- publically visible functions or variables.
+ If defined, this file defines only __cxa_demangle() and
+ __gcclibcxx_demangle_callback(), and no other publically visible
+ functions or variables.
STANDALONE_DEMANGLER
If defined, this file defines a main() function which demangles
@@ -82,6 +94,10 @@
stdout about the mangled string. This is not generally useful.
*/
+#if defined (_AIX) && !defined (__GNUC__)
+ #pragma alloca
+#endif
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -95,6 +111,18 @@
#include <string.h>
#endif
+#ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+#else
+# ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# else
+extern char *alloca ();
+# endif /* __GNUC__ */
+# endif /* alloca */
+#endif /* HAVE_ALLOCA_H */
+
#include "ansidecl.h"
#include "libiberty.h"
#include "demangle.h"
@@ -135,6 +163,10 @@ static struct demangle_component *d_type (struct d_info *);
#define cplus_demangle_print d_print
static char *d_print (int, const struct demangle_component *, int, size_t *);
+#define cplus_demangle_print_callback d_print_callback
+static int d_print_callback (int, const struct demangle_component *,
+ demangle_callbackref, void *);
+
#define cplus_demangle_init_info d_init_info
static void d_init_info (const char *, int, size_t, struct d_info *);
@@ -162,8 +194,8 @@ static void d_init_info (const char *, int, size_t, struct d_info *);
V3 demangler code.
As of this writing this file has the following undefined references
- when compiled with -DIN_GLIBCPP_V3: malloc, realloc, free, memcpy,
- strcpy, strcat, strlen. */
+ when compiled with -DIN_GLIBCPP_V3: realloc, free, memcpy, strcpy,
+ strcat, strlen. */
#define IS_DIGIT(c) ((c) >= '0' && (c) <= '9')
#define IS_UPPER(c) ((c) >= 'A' && (c) <= 'Z')
@@ -228,58 +260,46 @@ struct d_print_mod
struct d_print_template *templates;
};
-/* We use this structure to hold information during printing. */
+/* We use these structures to hold information during printing. */
-struct d_print_info
+struct d_growable_string
{
- /* The options passed to the demangler. */
- int options;
/* Buffer holding the result. */
char *buf;
/* Current length of data in buffer. */
size_t len;
/* Allocated size of buffer. */
size_t alc;
+ /* Set to 1 if we had a memory allocation failure. */
+ int allocation_failure;
+};
+
+enum { D_PRINT_BUFFER_LENGTH = 256 };
+struct d_print_info
+{
+ /* The options passed to the demangler. */
+ int options;
+ /* Fixed-length allocated buffer for demangled data, flushed to the
+ callback with a NUL termination once full. */
+ char buf[D_PRINT_BUFFER_LENGTH];
+ /* Current length of data in buffer. */
+ size_t len;
+ /* The last character printed, saved individually so that it survives
+ any buffer flush. */
+ char last_char;
+ /* Callback function to handle demangled buffer flush. */
+ demangle_callbackref callback;
+ /* Opaque callback argument. */
+ void *opaque;
/* The current list of templates, if any. */
struct d_print_template *templates;
/* The current list of modifiers (e.g., pointer, reference, etc.),
if any. */
struct d_print_mod *modifiers;
- /* Set to 1 if we had a memory allocation failure. */
- int allocation_failure;
+ /* Set to 1 if we saw a demangling error. */
+ int demangle_failure;
};
-#define d_print_saw_error(dpi) ((dpi)->buf == NULL)
-
-#define d_append_char(dpi, c) \
- do \
- { \
- if ((dpi)->buf != NULL && (dpi)->len < (dpi)->alc) \
- (dpi)->buf[(dpi)->len++] = (c); \
- else \
- d_print_append_char ((dpi), (c)); \
- } \
- while (0)
-
-#define d_append_buffer(dpi, s, l) \
- do \
- { \
- if ((dpi)->buf != NULL && (dpi)->len + (l) <= (dpi)->alc) \
- { \
- memcpy ((dpi)->buf + (dpi)->len, (s), (l)); \
- (dpi)->len += l; \
- } \
- else \
- d_print_append_buffer ((dpi), (s), (l)); \
- } \
- while (0)
-
-#define d_append_string_constant(dpi, s) \
- d_append_buffer (dpi, (s), sizeof (s) - 1)
-
-#define d_last_char(dpi) \
- ((dpi)->buf == NULL || (dpi)->len == 0 ? '\0' : (dpi)->buf[(dpi)->len - 1])
-
#ifdef CP_DEMANGLE_DEBUG
static void d_dump (struct demangle_component *, int);
#endif
@@ -389,14 +409,34 @@ d_add_substitution (struct d_info *, struct demangle_component *);
static struct demangle_component *d_substitution (struct d_info *, int);
-static void d_print_resize (struct d_print_info *, size_t);
+static void d_growable_string_init (struct d_growable_string *, size_t);
-static void d_print_append_char (struct d_print_info *, int);
+static inline void
+d_growable_string_resize (struct d_growable_string *, size_t);
+
+static inline void
+d_growable_string_append_buffer (struct d_growable_string *,
+ const char *, size_t);
+static void
+d_growable_string_callback_adapter (const char *, size_t, void *);
static void
-d_print_append_buffer (struct d_print_info *, const char *, size_t);
+d_print_init (struct d_print_info *, int, demangle_callbackref, void *);
-static void d_print_error (struct d_print_info *);
+static inline void d_print_error (struct d_print_info *);
+
+static inline int d_print_saw_error (struct d_print_info *);
+
+static inline void d_print_flush (struct d_print_info *);
+
+static inline void d_append_char (struct d_print_info *, char);
+
+static inline void d_append_buffer (struct d_print_info *,
+ const char *, size_t);
+
+static inline void d_append_string (struct d_print_info *, const char *);
+
+static inline char d_last_char (struct d_print_info *);
static void
d_print_comp (struct d_print_info *, const struct demangle_component *);
@@ -426,6 +466,8 @@ d_print_expr_op (struct d_print_info *, const struct demangle_component *);
static void
d_print_cast (struct d_print_info *, const struct demangle_component *);
+static int d_demangle_callback (const char *, int,
+ demangle_callbackref, void *);
static char *d_demangle (const char *, int, size_t *);
#ifdef CP_DEMANGLE_DEBUG
@@ -436,7 +478,11 @@ d_dump (struct demangle_component *dc, int indent)
int i;
if (dc == NULL)
- return;
+ {
+ if (indent == 0)
+ printf ("failed demangling\n");
+ return;
+ }
for (i = 0; i < indent; ++i)
putchar (' ');
@@ -913,9 +959,9 @@ CP_STATIC_IF_GLIBCPP_V3
struct demangle_component *
cplus_demangle_mangled_name (struct d_info *di, int top_level)
{
- if (d_next_char (di) != '_')
+ if (! d_check_char (di, '_'))
return NULL;
- if (d_next_char (di) != 'Z')
+ if (! d_check_char (di, 'Z'))
return NULL;
return d_encoding (di, top_level);
}
@@ -1021,7 +1067,7 @@ d_encoding (struct d_info *di, int top_level)
}
peek = d_peek_char (di);
- if (peek == '\0' || peek == 'E')
+ if (dc == NULL || peek == '\0' || peek == 'E')
return dc;
return d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME, dc,
d_bare_function_type (di, has_return_type (dc)));
@@ -1054,6 +1100,9 @@ d_name (struct d_info *di)
case 'Z':
return d_local_name (di);
+ case 'L':
+ return d_unqualified_name (di);
+
case 'S':
{
int subst;
@@ -1123,7 +1172,7 @@ d_nested_name (struct d_info *di)
struct demangle_component *ret;
struct demangle_component **pret;
- if (d_next_char (di) != 'N')
+ if (! d_check_char (di, 'N'))
return NULL;
pret = d_cv_qualifiers (di, &ret, 1);
@@ -1134,7 +1183,7 @@ d_nested_name (struct d_info *di)
if (*pret == NULL)
return NULL;
- if (d_next_char (di) != 'E')
+ if (! d_check_char (di, 'E'))
return NULL;
return ret;
@@ -1174,7 +1223,8 @@ d_prefix (struct d_info *di)
if (IS_DIGIT (peek)
|| IS_LOWER (peek)
|| peek == 'C'
- || peek == 'D')
+ || peek == 'D'
+ || peek == 'L')
dc = d_unqualified_name (di);
else if (peek == 'S')
dc = d_substitution (di, 1);
@@ -1208,6 +1258,9 @@ d_prefix (struct d_info *di)
/* <unqualified-name> ::= <operator-name>
::= <ctor-dtor-name>
::= <source-name>
+ ::= <local-source-name>
+
+ <local-source-name> ::= L <source-name> <discriminator>
*/
static struct demangle_component *
@@ -1229,6 +1282,19 @@ d_unqualified_name (struct d_info *di)
}
else if (peek == 'C' || peek == 'D')
return d_ctor_dtor_name (di);
+ else if (peek == 'L')
+ {
+ struct demangle_component * ret;
+
+ d_advance (di, 1);
+
+ ret = d_source_name (di);
+ if (ret == NULL)
+ return NULL;
+ if (! d_discriminator (di))
+ return NULL;
+ return ret;
+ }
else
return NULL;
}
@@ -1449,11 +1515,8 @@ d_operator_name (struct d_info *di)
static struct demangle_component *
d_special_name (struct d_info *di)
{
- char c;
-
di->expansion += 20;
- c = d_next_char (di);
- if (c == 'T')
+ if (d_check_char (di, 'T'))
{
switch (d_next_char (di))
{
@@ -1502,7 +1565,7 @@ d_special_name (struct d_info *di)
offset = d_number (di);
if (offset < 0)
return NULL;
- if (d_next_char (di) != '_')
+ if (! d_check_char (di, '_'))
return NULL;
base_type = cplus_demangle_type (di);
/* We don't display the offset. FIXME: We should display
@@ -1523,7 +1586,7 @@ d_special_name (struct d_info *di)
return NULL;
}
}
- else if (c == 'G')
+ else if (d_check_char (di, 'G'))
{
switch (d_next_char (di))
{
@@ -1570,14 +1633,14 @@ d_call_offset (struct d_info *di, int c)
else if (c == 'v')
{
d_number (di);
- if (d_next_char (di) != '_')
+ if (! d_check_char (di, '_'))
return 0;
d_number (di);
}
else
return 0;
- if (d_next_char (di) != '_')
+ if (! d_check_char (di, '_'))
return 0;
return 1;
@@ -1601,13 +1664,13 @@ d_ctor_dtor_name (struct d_info *di)
else if (di->last_name->type == DEMANGLE_COMPONENT_SUB_STD)
di->expansion += di->last_name->u.s_string.len;
}
- switch (d_next_char (di))
+ switch (d_peek_char (di))
{
case 'C':
{
enum gnu_v3_ctor_kinds kind;
- switch (d_next_char (di))
+ switch (d_peek_next_char (di))
{
case '1':
kind = gnu_v3_complete_object_ctor;
@@ -1621,6 +1684,7 @@ d_ctor_dtor_name (struct d_info *di)
default:
return NULL;
}
+ d_advance (di, 2);
return d_make_ctor (di, kind, di->last_name);
}
@@ -1628,7 +1692,7 @@ d_ctor_dtor_name (struct d_info *di)
{
enum gnu_v3_dtor_kinds kind;
- switch (d_next_char (di))
+ switch (d_peek_next_char (di))
{
case '0':
kind = gnu_v3_deleting_dtor;
@@ -1642,6 +1706,7 @@ d_ctor_dtor_name (struct d_info *di)
default:
return NULL;
}
+ d_advance (di, 2);
return d_make_dtor (di, kind, di->last_name);
}
@@ -1735,7 +1800,7 @@ cplus_demangle_type (struct d_info *di)
if (pret == NULL)
return NULL;
*pret = cplus_demangle_type (di);
- if (! d_add_substitution (di, ret))
+ if (! *pret || ! d_add_substitution (di, ret))
return NULL;
return ret;
}
@@ -1925,7 +1990,7 @@ d_function_type (struct d_info *di)
{
struct demangle_component *ret;
- if (d_next_char (di) != 'F')
+ if (! d_check_char (di, 'F'))
return NULL;
if (d_peek_char (di) == 'Y')
{
@@ -1934,7 +1999,7 @@ d_function_type (struct d_info *di)
d_advance (di, 1);
}
ret = d_bare_function_type (di, 1);
- if (d_next_char (di) != 'E')
+ if (! d_check_char (di, 'E'))
return NULL;
return ret;
}
@@ -2021,7 +2086,7 @@ d_array_type (struct d_info *di)
char peek;
struct demangle_component *dim;
- if (d_next_char (di) != 'A')
+ if (! d_check_char (di, 'A'))
return NULL;
peek = d_peek_char (di);
@@ -2049,7 +2114,7 @@ d_array_type (struct d_info *di)
return NULL;
}
- if (d_next_char (di) != '_')
+ if (! d_check_char (di, '_'))
return NULL;
return d_make_comp (di, DEMANGLE_COMPONENT_ARRAY_TYPE, dim,
@@ -2065,7 +2130,7 @@ d_pointer_to_member_type (struct d_info *di)
struct demangle_component *mem;
struct demangle_component **pmem;
- if (d_next_char (di) != 'M')
+ if (! d_check_char (di, 'M'))
return NULL;
cl = cplus_demangle_type (di);
@@ -2081,12 +2146,23 @@ d_pointer_to_member_type (struct d_info *di)
g++ does not work that way. g++ treats only the CV-qualified
member function as a substitution source. FIXME. So to work
with g++, we need to pull off the CV-qualifiers here, in order to
- avoid calling add_substitution() in cplus_demangle_type(). */
+ avoid calling add_substitution() in cplus_demangle_type(). But
+ for a CV-qualified member which is not a function, g++ does
+ follow the ABI, so we need to handle that case here by calling
+ d_add_substitution ourselves. */
pmem = d_cv_qualifiers (di, &mem, 1);
if (pmem == NULL)
return NULL;
*pmem = cplus_demangle_type (di);
+ if (*pmem == NULL)
+ return NULL;
+
+ if (pmem != &mem && (*pmem)->type != DEMANGLE_COMPONENT_FUNCTION_TYPE)
+ {
+ if (! d_add_substitution (di, mem))
+ return NULL;
+ }
return d_make_comp (di, DEMANGLE_COMPONENT_PTRMEM_TYPE, cl, mem);
}
@@ -2100,7 +2176,7 @@ d_template_param (struct d_info *di)
{
long param;
- if (d_next_char (di) != 'T')
+ if (! d_check_char (di, 'T'))
return NULL;
if (d_peek_char (di) == '_')
@@ -2113,7 +2189,7 @@ d_template_param (struct d_info *di)
param += 1;
}
- if (d_next_char (di) != '_')
+ if (! d_check_char (di, '_'))
return NULL;
++di->did_subs;
@@ -2135,7 +2211,7 @@ d_template_args (struct d_info *di)
constructor or destructor. */
hold_last_name = di->last_name;
- if (d_next_char (di) != 'I')
+ if (! d_check_char (di, 'I'))
return NULL;
al = NULL;
@@ -2180,7 +2256,7 @@ d_template_arg (struct d_info *di)
case 'X':
d_advance (di, 1);
ret = d_expression (di);
- if (d_next_char (di) != 'E')
+ if (! d_check_char (di, 'E'))
return NULL;
return ret;
@@ -2307,7 +2383,7 @@ d_expr_primary (struct d_info *di)
{
struct demangle_component *ret;
- if (d_next_char (di) != 'L')
+ if (! d_check_char (di, 'L'))
return NULL;
if (d_peek_char (di) == '_')
ret = cplus_demangle_mangled_name (di, 0);
@@ -2353,7 +2429,7 @@ d_expr_primary (struct d_info *di)
}
ret = d_make_comp (di, t, type, d_make_name (di, s, d_str (di) - s));
}
- if (d_next_char (di) != 'E')
+ if (! d_check_char (di, 'E'))
return NULL;
return ret;
}
@@ -2367,12 +2443,12 @@ d_local_name (struct d_info *di)
{
struct demangle_component *function;
- if (d_next_char (di) != 'Z')
+ if (! d_check_char (di, 'Z'))
return NULL;
function = d_encoding (di, 0);
- if (d_next_char (di) != 'E')
+ if (! d_check_char (di, 'E'))
return NULL;
if (d_peek_char (di) == 's')
@@ -2477,7 +2553,7 @@ d_substitution (struct d_info *di, int prefix)
{
char c;
- if (d_next_char (di) != 'S')
+ if (! d_check_char (di, 'S'))
return NULL;
c = d_next_char (di);
@@ -2496,6 +2572,8 @@ d_substitution (struct d_info *di, int prefix)
id = id * 36 + c - 'A' + 10;
else
return NULL;
+ if (id < 0)
+ return NULL;
c = d_next_char (di);
}
while (c != '_');
@@ -2557,80 +2635,181 @@ d_substitution (struct d_info *di, int prefix)
}
}
-/* Resize the print buffer. */
+/* Initialize a growable string. */
static void
-d_print_resize (struct d_print_info *dpi, size_t add)
+d_growable_string_init (struct d_growable_string *dgs, size_t estimate)
{
- size_t need;
+ dgs->buf = NULL;
+ dgs->len = 0;
+ dgs->alc = 0;
+ dgs->allocation_failure = 0;
- if (dpi->buf == NULL)
+ if (estimate > 0)
+ d_growable_string_resize (dgs, estimate);
+}
+
+/* Grow a growable string to a given size. */
+
+static inline void
+d_growable_string_resize (struct d_growable_string *dgs, size_t need)
+{
+ size_t newalc;
+ char *newbuf;
+
+ if (dgs->allocation_failure)
return;
- need = dpi->len + add;
- while (need > dpi->alc)
- {
- size_t newalc;
- char *newbuf;
- newalc = dpi->alc * 2;
- newbuf = (char *) realloc (dpi->buf, newalc);
- if (newbuf == NULL)
- {
- free (dpi->buf);
- dpi->buf = NULL;
- dpi->allocation_failure = 1;
- return;
- }
- dpi->buf = newbuf;
- dpi->alc = newalc;
+ /* Start allocation at two bytes to avoid any possibility of confusion
+ with the special value of 1 used as a return in *palc to indicate
+ allocation failures. */
+ newalc = dgs->alc > 0 ? dgs->alc : 2;
+ while (newalc < need)
+ newalc <<= 1;
+
+ newbuf = (char *) realloc (dgs->buf, newalc);
+ if (newbuf == NULL)
+ {
+ free (dgs->buf);
+ dgs->buf = NULL;
+ dgs->len = 0;
+ dgs->alc = 0;
+ dgs->allocation_failure = 1;
+ return;
}
+ dgs->buf = newbuf;
+ dgs->alc = newalc;
}
-/* Append a character to the print buffer. */
+/* Append a buffer to a growable string. */
-static void
-d_print_append_char (struct d_print_info *dpi, int c)
+static inline void
+d_growable_string_append_buffer (struct d_growable_string *dgs,
+ const char *s, size_t l)
{
- if (dpi->buf != NULL)
- {
- if (dpi->len >= dpi->alc)
- {
- d_print_resize (dpi, 1);
- if (dpi->buf == NULL)
- return;
- }
+ size_t need;
- dpi->buf[dpi->len] = c;
- ++dpi->len;
- }
+ need = dgs->len + l + 1;
+ if (need > dgs->alc)
+ d_growable_string_resize (dgs, need);
+
+ if (dgs->allocation_failure)
+ return;
+
+ memcpy (dgs->buf + dgs->len, s, l);
+ dgs->buf[dgs->len + l] = '\0';
+ dgs->len += l;
}
-/* Append a buffer to the print buffer. */
+/* Bridge growable strings to the callback mechanism. */
static void
-d_print_append_buffer (struct d_print_info *dpi, const char *s, size_t l)
+d_growable_string_callback_adapter (const char *s, size_t l, void *opaque)
{
- if (dpi->buf != NULL)
- {
- if (dpi->len + l > dpi->alc)
- {
- d_print_resize (dpi, l);
- if (dpi->buf == NULL)
- return;
- }
+ struct d_growable_string *dgs = (struct d_growable_string*) opaque;
- memcpy (dpi->buf + dpi->len, s, l);
- dpi->len += l;
- }
+ d_growable_string_append_buffer (dgs, s, l);
}
-/* Indicate that an error occurred during printing. */
+/* Initialize a print information structure. */
static void
+d_print_init (struct d_print_info *dpi, int options,
+ demangle_callbackref callback, void *opaque)
+{
+ dpi->options = options;
+ dpi->len = 0;
+ dpi->last_char = '\0';
+ dpi->templates = NULL;
+ dpi->modifiers = NULL;
+
+ dpi->callback = callback;
+ dpi->opaque = opaque;
+
+ dpi->demangle_failure = 0;
+}
+
+/* Indicate that an error occurred during printing, and test for error. */
+
+static inline void
d_print_error (struct d_print_info *dpi)
{
- free (dpi->buf);
- dpi->buf = NULL;
+ dpi->demangle_failure = 1;
+}
+
+static inline int
+d_print_saw_error (struct d_print_info *dpi)
+{
+ return dpi->demangle_failure != 0;
+}
+
+/* Flush buffered characters to the callback. */
+
+static inline void
+d_print_flush (struct d_print_info *dpi)
+{
+ dpi->buf[dpi->len] = '\0';
+ dpi->callback (dpi->buf, dpi->len, dpi->opaque);
+ dpi->len = 0;
+}
+
+/* Append characters and buffers for printing. */
+
+static inline void
+d_append_char (struct d_print_info *dpi, char c)
+{
+ if (dpi->len == sizeof (dpi->buf) - 1)
+ d_print_flush (dpi);
+
+ dpi->buf[dpi->len++] = c;
+ dpi->last_char = c;
+}
+
+static inline void
+d_append_buffer (struct d_print_info *dpi, const char *s, size_t l)
+{
+ size_t i;
+
+ for (i = 0; i < l; i++)
+ d_append_char (dpi, s[i]);
+}
+
+static inline void
+d_append_string (struct d_print_info *dpi, const char *s)
+{
+ d_append_buffer (dpi, s, strlen (s));
+}
+
+static inline char
+d_last_char (struct d_print_info *dpi)
+{
+ return dpi->last_char;
+}
+
+/* Turn components into a human readable string. OPTIONS is the
+ options bits passed to the demangler. DC is the tree to print.
+ CALLBACK is a function to call to flush demangled string segments
+ as they fill the intermediate buffer, and OPAQUE is a generalized
+ callback argument. On success, this returns 1. On failure,
+ it returns 0, indicating a bad parse. It does not use heap
+ memory to build an output string, so cannot encounter memory
+ allocation failure. */
+
+CP_STATIC_IF_GLIBCPP_V3
+int
+cplus_demangle_print_callback (int options,
+ const struct demangle_component *dc,
+ demangle_callbackref callback, void *opaque)
+{
+ struct d_print_info dpi;
+
+ d_print_init (&dpi, options, callback, opaque);
+
+ d_print_comp (&dpi, dc);
+
+ d_print_flush (&dpi);
+
+ return ! d_print_saw_error (&dpi);
}
/* Turn components into a human readable string. OPTIONS is the
@@ -2646,34 +2825,21 @@ char *
cplus_demangle_print (int options, const struct demangle_component *dc,
int estimate, size_t *palc)
{
- struct d_print_info dpi;
+ struct d_growable_string dgs;
- dpi.options = options;
+ d_growable_string_init (&dgs, estimate);
- dpi.alc = estimate + 1;
- dpi.buf = (char *) malloc (dpi.alc);
- if (dpi.buf == NULL)
+ if (! cplus_demangle_print_callback (options, dc,
+ d_growable_string_callback_adapter,
+ &dgs))
{
- *palc = 1;
+ free (dgs.buf);
+ *palc = 0;
return NULL;
}
- dpi.len = 0;
- dpi.templates = NULL;
- dpi.modifiers = NULL;
-
- dpi.allocation_failure = 0;
-
- d_print_comp (&dpi, dc);
-
- d_append_char (&dpi, '\0');
-
- if (dpi.buf != NULL)
- *palc = dpi.alc;
- else
- *palc = dpi.allocation_failure;
-
- return dpi.buf;
+ *palc = dgs.allocation_failure ? 1 : dgs.alc;
+ return dgs.buf;
}
/* Subroutine to handle components. */
@@ -2703,7 +2869,7 @@ d_print_comp (struct d_print_info *dpi,
case DEMANGLE_COMPONENT_LOCAL_NAME:
d_print_comp (dpi, d_left (dc));
if ((dpi->options & DMGL_JAVA) == 0)
- d_append_string_constant (dpi, "::");
+ d_append_string (dpi, "::");
else
d_append_char (dpi, '.');
d_print_comp (dpi, d_right (dc));
@@ -2812,6 +2978,7 @@ d_print_comp (struct d_print_info *dpi,
case DEMANGLE_COMPONENT_TEMPLATE:
{
struct d_print_mod *hold_dpm;
+ struct demangle_component *dcl;
/* Don't push modifiers into a template definition. Doing so
could give the wrong definition for a template argument.
@@ -2820,16 +2987,32 @@ d_print_comp (struct d_print_info *dpi,
hold_dpm = dpi->modifiers;
dpi->modifiers = NULL;
- d_print_comp (dpi, d_left (dc));
- if (d_last_char (dpi) == '<')
- d_append_char (dpi, ' ');
- d_append_char (dpi, '<');
- d_print_comp (dpi, d_right (dc));
- /* Avoid generating two consecutive '>' characters, to avoid
- the C++ syntactic ambiguity. */
- if (d_last_char (dpi) == '>')
- d_append_char (dpi, ' ');
- d_append_char (dpi, '>');
+ dcl = d_left (dc);
+
+ if ((dpi->options & DMGL_JAVA) != 0
+ && dcl->type == DEMANGLE_COMPONENT_NAME
+ && dcl->u.s_name.len == 6
+ && strncmp (dcl->u.s_name.s, "JArray", 6) == 0)
+ {
+ /* Special-case Java arrays, so that JArray<TYPE> appears
+ instead as TYPE[]. */
+
+ d_print_comp (dpi, d_right (dc));
+ d_append_string (dpi, "[]");
+ }
+ else
+ {
+ d_print_comp (dpi, dcl);
+ if (d_last_char (dpi) == '<')
+ d_append_char (dpi, ' ');
+ d_append_char (dpi, '<');
+ d_print_comp (dpi, d_right (dc));
+ /* Avoid generating two consecutive '>' characters, to avoid
+ the C++ syntactic ambiguity. */
+ if (d_last_char (dpi) == '>')
+ d_append_char (dpi, ' ');
+ d_append_char (dpi, '>');
+ }
dpi->modifiers = hold_dpm;
@@ -2892,69 +3075,69 @@ d_print_comp (struct d_print_info *dpi,
return;
case DEMANGLE_COMPONENT_VTABLE:
- d_append_string_constant (dpi, "vtable for ");
+ d_append_string (dpi, "vtable for ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_VTT:
- d_append_string_constant (dpi, "VTT for ");
+ d_append_string (dpi, "VTT for ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE:
- d_append_string_constant (dpi, "construction vtable for ");
+ d_append_string (dpi, "construction vtable for ");
d_print_comp (dpi, d_left (dc));
- d_append_string_constant (dpi, "-in-");
+ d_append_string (dpi, "-in-");
d_print_comp (dpi, d_right (dc));
return;
case DEMANGLE_COMPONENT_TYPEINFO:
- d_append_string_constant (dpi, "typeinfo for ");
+ d_append_string (dpi, "typeinfo for ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_TYPEINFO_NAME:
- d_append_string_constant (dpi, "typeinfo name for ");
+ d_append_string (dpi, "typeinfo name for ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_TYPEINFO_FN:
- d_append_string_constant (dpi, "typeinfo fn for ");
+ d_append_string (dpi, "typeinfo fn for ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_THUNK:
- d_append_string_constant (dpi, "non-virtual thunk to ");
+ d_append_string (dpi, "non-virtual thunk to ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_VIRTUAL_THUNK:
- d_append_string_constant (dpi, "virtual thunk to ");
+ d_append_string (dpi, "virtual thunk to ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_COVARIANT_THUNK:
- d_append_string_constant (dpi, "covariant return thunk to ");
+ d_append_string (dpi, "covariant return thunk to ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_JAVA_CLASS:
- d_append_string_constant (dpi, "java Class for ");
+ d_append_string (dpi, "java Class for ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_GUARD:
- d_append_string_constant (dpi, "guard variable for ");
+ d_append_string (dpi, "guard variable for ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_REFTEMP:
- d_append_string_constant (dpi, "reference temporary for ");
+ d_append_string (dpi, "reference temporary for ");
d_print_comp (dpi, d_left (dc));
return;
case DEMANGLE_COMPONENT_HIDDEN_ALIAS:
- d_append_string_constant (dpi, "hidden alias for ");
+ d_append_string (dpi, "hidden alias for ");
d_print_comp (dpi, d_left (dc));
return;
@@ -3153,7 +3336,7 @@ d_print_comp (struct d_print_info *dpi,
{
d_append_char (dpi, ' ');
d_print_comp (dpi, d_left (dc));
- d_append_string_constant (dpi, "::*");
+ d_append_string (dpi, "::*");
}
dpi->modifiers = dpm.next;
@@ -3166,7 +3349,7 @@ d_print_comp (struct d_print_info *dpi,
d_print_comp (dpi, d_left (dc));
if (d_right (dc) != NULL)
{
- d_append_string_constant (dpi, ", ");
+ d_append_string (dpi, ", ");
d_print_comp (dpi, d_right (dc));
}
return;
@@ -3175,7 +3358,7 @@ d_print_comp (struct d_print_info *dpi,
{
char c;
- d_append_string_constant (dpi, "operator");
+ d_append_string (dpi, "operator");
c = dc->u.s_operator.op->name[0];
if (IS_LOWER (c))
d_append_char (dpi, ' ');
@@ -3185,12 +3368,12 @@ d_print_comp (struct d_print_info *dpi,
}
case DEMANGLE_COMPONENT_EXTENDED_OPERATOR:
- d_append_string_constant (dpi, "operator ");
+ d_append_string (dpi, "operator ");
d_print_comp (dpi, dc->u.s_extended_operator.name);
return;
case DEMANGLE_COMPONENT_CAST:
- d_append_string_constant (dpi, "operator ");
+ d_append_string (dpi, "operator ");
d_print_cast (dpi, dc);
return;
@@ -3225,9 +3408,9 @@ d_print_comp (struct d_print_info *dpi,
d_append_char (dpi, '(');
d_print_comp (dpi, d_left (d_right (dc)));
- d_append_string_constant (dpi, ") ");
+ d_append_string (dpi, ") ");
d_print_expr_op (dpi, d_left (dc));
- d_append_string_constant (dpi, " (");
+ d_append_string (dpi, " (");
d_print_comp (dpi, d_right (d_right (dc)));
d_append_char (dpi, ')');
@@ -3252,11 +3435,11 @@ d_print_comp (struct d_print_info *dpi,
}
d_append_char (dpi, '(');
d_print_comp (dpi, d_left (d_right (dc)));
- d_append_string_constant (dpi, ") ");
+ d_append_string (dpi, ") ");
d_print_expr_op (dpi, d_left (dc));
- d_append_string_constant (dpi, " (");
+ d_append_string (dpi, " (");
d_print_comp (dpi, d_left (d_right (d_right (dc))));
- d_append_string_constant (dpi, ") : (");
+ d_append_string (dpi, ") : (");
d_print_comp (dpi, d_right (d_right (d_right (dc))));
d_append_char (dpi, ')');
return;
@@ -3301,13 +3484,13 @@ d_print_comp (struct d_print_info *dpi,
d_append_char (dpi, 'l');
break;
case D_PRINT_UNSIGNED_LONG:
- d_append_string_constant (dpi, "ul");
+ d_append_string (dpi, "ul");
break;
case D_PRINT_LONG_LONG:
- d_append_string_constant (dpi, "ll");
+ d_append_string (dpi, "ll");
break;
case D_PRINT_UNSIGNED_LONG_LONG:
- d_append_string_constant (dpi, "ull");
+ d_append_string (dpi, "ull");
break;
}
return;
@@ -3322,10 +3505,10 @@ d_print_comp (struct d_print_info *dpi,
switch (d_right (dc)->u.s_name.s[0])
{
case '0':
- d_append_string_constant (dpi, "false");
+ d_append_string (dpi, "false");
return;
case '1':
- d_append_string_constant (dpi, "true");
+ d_append_string (dpi, "true");
return;
default:
break;
@@ -3464,7 +3647,7 @@ d_print_mod_list (struct d_print_info *dpi,
dpi->modifiers = hold_modifiers;
if ((dpi->options & DMGL_JAVA) == 0)
- d_append_string_constant (dpi, "::");
+ d_append_string (dpi, "::");
else
d_append_char (dpi, '.');
@@ -3497,15 +3680,15 @@ d_print_mod (struct d_print_info *dpi,
{
case DEMANGLE_COMPONENT_RESTRICT:
case DEMANGLE_COMPONENT_RESTRICT_THIS:
- d_append_string_constant (dpi, " restrict");
+ d_append_string (dpi, " restrict");
return;
case DEMANGLE_COMPONENT_VOLATILE:
case DEMANGLE_COMPONENT_VOLATILE_THIS:
- d_append_string_constant (dpi, " volatile");
+ d_append_string (dpi, " volatile");
return;
case DEMANGLE_COMPONENT_CONST:
case DEMANGLE_COMPONENT_CONST_THIS:
- d_append_string_constant (dpi, " const");
+ d_append_string (dpi, " const");
return;
case DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL:
d_append_char (dpi, ' ');
@@ -3520,16 +3703,16 @@ d_print_mod (struct d_print_info *dpi,
d_append_char (dpi, '&');
return;
case DEMANGLE_COMPONENT_COMPLEX:
- d_append_string_constant (dpi, "complex ");
+ d_append_string (dpi, "complex ");
return;
case DEMANGLE_COMPONENT_IMAGINARY:
- d_append_string_constant (dpi, "imaginary ");
+ d_append_string (dpi, "imaginary ");
return;
case DEMANGLE_COMPONENT_PTRMEM_TYPE:
if (d_last_char (dpi) != '(')
d_append_char (dpi, ' ');
d_print_comp (dpi, d_left (mod));
- d_append_string_constant (dpi, "::*");
+ d_append_string (dpi, "::*");
return;
case DEMANGLE_COMPONENT_TYPED_NAME:
d_print_comp (dpi, d_left (mod));
@@ -3662,7 +3845,7 @@ d_print_array_type (struct d_print_info *dpi,
}
if (need_paren)
- d_append_string_constant (dpi, " (");
+ d_append_string (dpi, " (");
d_print_mod_list (dpi, mods, 0);
@@ -3768,26 +3951,19 @@ cplus_demangle_init_info (const char *mangled, int options, size_t len,
di->expansion = 0;
}
-/* Entry point for the demangler. If MANGLED is a g++ v3 ABI mangled
- name, return a buffer allocated with malloc holding the demangled
- name. OPTIONS is the usual libiberty demangler options. On
- success, this sets *PALC to the allocated size of the returned
- buffer. On failure, this sets *PALC to 0 for a bad name, or 1 for
- a memory allocation failure. On failure, this returns NULL. */
+/* Internal implementation for the demangler. If MANGLED is a g++ v3 ABI
+ mangled name, return strings in repeated callback giving the demangled
+ name. OPTIONS is the usual libiberty demangler options. On success,
+ this returns 1. On failure, returns 0. */
-static char *
-d_demangle (const char* mangled, int options, size_t *palc)
+static int
+d_demangle_callback (const char *mangled, int options,
+ demangle_callbackref callback, void *opaque)
{
- size_t len;
int type;
struct d_info di;
struct demangle_component *dc;
- int estimate;
- char *ret;
-
- *palc = 0;
-
- len = strlen (mangled);
+ int status;
if (mangled[0] == '_' && mangled[1] == 'Z')
type = 0;
@@ -3796,57 +3972,41 @@ d_demangle (const char* mangled, int options, size_t *palc)
&& (mangled[9] == 'D' || mangled[9] == 'I')
&& mangled[10] == '_')
{
- char *r;
+ const char *intro;
- r = (char *) malloc (40 + len - 11);
- if (r == NULL)
- *palc = 1;
- else
- {
- if (mangled[9] == 'I')
- strcpy (r, "global constructors keyed to ");
- else
- strcpy (r, "global destructors keyed to ");
- strcat (r, mangled + 11);
- }
- return r;
+ intro = (mangled[9] == 'I')
+ ? "global constructors keyed to "
+ : "global destructors keyed to ";
+
+ callback (intro, strlen (intro), opaque);
+ callback (mangled + 11, strlen (mangled + 11), opaque);
+ return 1;
}
else
{
if ((options & DMGL_TYPES) == 0)
- return NULL;
+ return 0;
type = 1;
}
- cplus_demangle_init_info (mangled, options, len, &di);
+ cplus_demangle_init_info (mangled, options, strlen (mangled), &di);
{
#ifdef CP_DYNAMIC_ARRAYS
__extension__ struct demangle_component comps[di.num_comps];
__extension__ struct demangle_component *subs[di.num_subs];
- di.comps = &comps[0];
- di.subs = &subs[0];
+ di.comps = comps;
+ di.subs = subs;
#else
- di.comps = ((struct demangle_component *)
- malloc (di.num_comps * sizeof (struct demangle_component)));
- di.subs = ((struct demangle_component **)
- malloc (di.num_subs * sizeof (struct demangle_component *)));
- if (di.comps == NULL || di.subs == NULL)
- {
- if (di.comps != NULL)
- free (di.comps);
- if (di.subs != NULL)
- free (di.subs);
- *palc = 1;
- return NULL;
- }
+ di.comps = alloca (di.num_comps * sizeof (*di.comps));
+ di.subs = alloca (di.num_subs * sizeof (*di.subs));
#endif
- if (! type)
- dc = cplus_demangle_mangled_name (&di, 1);
- else
+ if (type)
dc = cplus_demangle_type (&di);
+ else
+ dc = cplus_demangle_mangled_name (&di, 1);
/* If DMGL_PARAMS is set, then if we didn't consume the entire
mangled string, then we didn't successfully demangle it. If
@@ -3856,46 +4016,43 @@ d_demangle (const char* mangled, int options, size_t *palc)
dc = NULL;
#ifdef CP_DEMANGLE_DEBUG
- if (dc == NULL)
- printf ("failed demangling\n");
- else
- d_dump (dc, 0);
+ d_dump (dc, 0);
#endif
- /* We try to guess the length of the demangled string, to minimize
- calls to realloc during demangling. */
- estimate = len + di.expansion + 10 * di.did_subs;
- estimate += estimate / 8;
+ status = (dc != NULL)
+ ? cplus_demangle_print_callback (options, dc, callback, opaque)
+ : 0;
+ }
- ret = NULL;
- if (dc != NULL)
- ret = cplus_demangle_print (options, dc, estimate, palc);
+ return status;
+}
-#ifndef CP_DYNAMIC_ARRAYS
- free (di.comps);
- free (di.subs);
-#endif
+/* Entry point for the demangler. If MANGLED is a g++ v3 ABI mangled
+ name, return a buffer allocated with malloc holding the demangled
+ name. OPTIONS is the usual libiberty demangler options. On
+ success, this sets *PALC to the allocated size of the returned
+ buffer. On failure, this sets *PALC to 0 for a bad name, or 1 for
+ a memory allocation failure, and returns NULL. */
-#ifdef CP_DEMANGLE_DEBUG
- if (ret != NULL)
- {
- int rlen;
-
- rlen = strlen (ret);
- if (rlen > 2 * estimate)
- printf ("*** Length %d much greater than estimate %d\n",
- rlen, estimate);
- else if (rlen > estimate)
- printf ("*** Length %d greater than estimate %d\n",
- rlen, estimate);
- else if (rlen < estimate / 2)
- printf ("*** Length %d much less than estimate %d\n",
- rlen, estimate);
- }
-#endif
- }
+static char *
+d_demangle (const char *mangled, int options, size_t *palc)
+{
+ struct d_growable_string dgs;
+ int status;
- return ret;
+ d_growable_string_init (&dgs, 0);
+
+ status = d_demangle_callback (mangled, options,
+ d_growable_string_callback_adapter, &dgs);
+ if (status == 0)
+ {
+ free (dgs.buf);
+ *palc = 0;
+ return NULL;
+ }
+
+ *palc = dgs.allocation_failure ? 1 : 0;
+ return dgs.buf;
}
#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3)
@@ -3912,7 +4069,7 @@ extern char *__cxa_demangle (const char *, char *, size_t *, int *);
OUTPUT_BUFFER may instead be NULL; in that case, the demangled name
is placed in a region of memory allocated with malloc.
- If LENGTH is non-NULL, the length of the buffer conaining the
+ If LENGTH is non-NULL, the length of the buffer containing the
demangled name, is placed in *LENGTH.
The return value is a pointer to the start of the NUL-terminated
@@ -3989,6 +4146,48 @@ __cxa_demangle (const char *mangled_name, char *output_buffer,
return demangled;
}
+extern int __gcclibcxx_demangle_callback (const char *,
+ void (*)
+ (const char *, size_t, void *),
+ void *);
+
+/* Alternative, allocationless entry point in the C++ runtime library
+ for performing demangling. MANGLED_NAME is a NUL-terminated character
+ string containing the name to be demangled.
+
+ CALLBACK is a callback function, called with demangled string
+ segments as demangling progresses; it is called at least once,
+ but may be called more than once. OPAQUE is a generalized pointer
+ used as a callback argument.
+
+ The return code is one of the following values, equivalent to
+ the STATUS values of __cxa_demangle() (excluding -1, since this
+ function performs no memory allocations):
+ 0: The demangling operation succeeded.
+ -2: MANGLED_NAME is not a valid name under the C++ ABI mangling rules.
+ -3: One of the arguments is invalid.
+
+ The demangling is performed using the C++ ABI mangling rules, with
+ GNU extensions. */
+
+int
+__gcclibcxx_demangle_callback (const char *mangled_name,
+ void (*callback) (const char *, size_t, void *),
+ void *opaque)
+{
+ int status;
+
+ if (mangled_name == NULL || callback == NULL)
+ return -3;
+
+ status = d_demangle_callback (mangled_name, DMGL_PARAMS | DMGL_TYPES,
+ callback, opaque);
+ if (status == 0)
+ return -2;
+
+ return 0;
+}
+
#else /* ! (IN_LIBGCC2 || IN_GLIBCPP_V3) */
/* Entry point for libiberty demangler. If MANGLED is a g++ v3 ABI
@@ -3996,61 +4195,41 @@ __cxa_demangle (const char *mangled_name, char *output_buffer,
demangled name. Otherwise, return NULL. */
char *
-cplus_demangle_v3 (const char* mangled, int options)
+cplus_demangle_v3 (const char *mangled, int options)
{
size_t alc;
return d_demangle (mangled, options, &alc);
}
+int
+cplus_demangle_v3_callback (const char *mangled, int options,
+ demangle_callbackref callback, void *opaque)
+{
+ return d_demangle_callback (mangled, options, callback, opaque);
+}
+
/* 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[]. */
+ This instructs the C++ demangler not to emit pointer characters ("*"), to
+ use Java's namespace separator symbol ("." instead of "::"), and to output
+ JArray<TYPE> as TYPE[]. */
char *
-java_demangle_v3 (const char* mangled)
+java_demangle_v3 (const char *mangled)
{
size_t alc;
- char *demangled;
- int nesting;
- char *from;
- char *to;
- demangled = d_demangle (mangled, DMGL_JAVA | DMGL_PARAMS | DMGL_RET_POSTFIX,
- &alc);
-
- if (demangled == NULL)
- return NULL;
-
- nesting = 0;
- from = demangled;
- to = from;
- while (*from != '\0')
- {
- if (strncmp (from, "JArray<", 7) == 0)
- {
- from += 7;
- ++nesting;
- }
- else if (nesting > 0 && *from == '>')
- {
- while (to > demangled && to[-1] == ' ')
- --to;
- *to++ = '[';
- *to++ = ']';
- --nesting;
- ++from;
- }
- else
- *to++ = *from++;
- }
-
- *to = '\0';
+ return d_demangle (mangled, DMGL_JAVA | DMGL_PARAMS | DMGL_RET_POSTFIX, &alc);
+}
- return demangled;
+int
+java_demangle_v3_callback (const char *mangled,
+ demangle_callbackref callback, void *opaque)
+{
+ return d_demangle_callback (mangled,
+ DMGL_JAVA | DMGL_PARAMS | DMGL_RET_POSTFIX,
+ callback, opaque);
}
#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */
@@ -4080,21 +4259,11 @@ is_ctor_or_dtor (const char *mangled,
__extension__ struct demangle_component comps[di.num_comps];
__extension__ struct demangle_component *subs[di.num_subs];
- di.comps = &comps[0];
- di.subs = &subs[0];
+ di.comps = comps;
+ di.subs = subs;
#else
- di.comps = ((struct demangle_component *)
- malloc (di.num_comps * sizeof (struct demangle_component)));
- di.subs = ((struct demangle_component **)
- malloc (di.num_subs * sizeof (struct demangle_component *)));
- if (di.comps == NULL || di.subs == NULL)
- {
- if (di.comps != NULL)
- free (di.comps);
- if (di.subs != NULL)
- free (di.subs);
- return 0;
- }
+ di.comps = alloca (di.num_comps * sizeof (*di.comps));
+ di.subs = alloca (di.num_subs * sizeof (*di.subs));
#endif
dc = cplus_demangle_mangled_name (&di, 1);
@@ -4133,11 +4302,6 @@ is_ctor_or_dtor (const char *mangled,
break;
}
}
-
-#ifndef CP_DYNAMIC_ARRAYS
- free (di.subs);
- free (di.comps);
-#endif
}
return ret;
diff --git a/contrib/binutils/libiberty/cp-demangle.h b/contrib/binutils/libiberty/cp-demangle.h
index 2517a57..8622f29 100644
--- a/contrib/binutils/libiberty/cp-demangle.h
+++ b/contrib/binutils/libiberty/cp-demangle.h
@@ -1,5 +1,5 @@
/* Internal demangler interface for g++ V3 ABI.
- Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@wasabisystems.com>.
This file is part of the libiberty library, which is part of GCC.
@@ -123,10 +123,16 @@ struct d_info
int expansion;
};
+/* To avoid running past the ending '\0', don't:
+ - call d_peek_next_char if d_peek_char returned '\0'
+ - call d_advance with an 'i' that is too large
+ - call d_check_char(di, '\0')
+ Everything else is safe. */
#define d_peek_char(di) (*((di)->n))
#define d_peek_next_char(di) ((di)->n[1])
#define d_advance(di, i) ((di)->n += (i))
-#define d_next_char(di) (*((di)->n++))
+#define d_check_char(di, c) (d_peek_char(di) == c ? ((di)->n++, 1) : 0)
+#define d_next_char(di) (d_peek_char(di) == '\0' ? '\0' : *((di)->n++))
#define d_str(di) ((di)->n)
/* Functions and arrays in cp-demangle.c which are referenced by
@@ -137,8 +143,9 @@ struct d_info
#define CP_STATIC_IF_GLIBCPP_V3 extern
#endif
-CP_STATIC_IF_GLIBCPP_V3
-const struct demangle_operator_info cplus_demangle_operators[];
+#ifndef IN_GLIBCPP_V3
+extern const struct demangle_operator_info cplus_demangle_operators[];
+#endif
#define D_BUILTIN_TYPE_COUNT (26)
diff --git a/contrib/binutils/libiberty/cplus-dem.c b/contrib/binutils/libiberty/cplus-dem.c
index 8b60434..1f8b1fc 100644
--- a/contrib/binutils/libiberty/cplus-dem.c
+++ b/contrib/binutils/libiberty/cplus-dem.c
@@ -3693,7 +3693,7 @@ demangle_fund_type (struct work_stuff *work,
{
int done = 0;
int success = 1;
- char buf[10];
+ char buf[INTBUF_SIZE + 5 /* 'int%u_t' */];
unsigned int dec = 0;
type_kind_t tk = tk_integral;
diff --git a/contrib/binutils/libiberty/filename_cmp.c b/contrib/binutils/libiberty/filename_cmp.c
new file mode 100644
index 0000000..0a4d0d8
--- /dev/null
+++ b/contrib/binutils/libiberty/filename_cmp.c
@@ -0,0 +1,78 @@
+/* File name comparison routine.
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+
+#include "filenames.h"
+#include "safe-ctype.h"
+
+/*
+
+@deftypefn Extension int filename_cmp (const char *@var{s1}, const char *@var{s2})
+
+Return zero if the two file names @var{s1} and @var{s2} are equivalent.
+If not equivalent, the returned value is similar to what @code{strcmp}
+would return. In other words, it returns a negative value if @var{s1}
+is less than @var{s2}, or a positive value if @var{s2} is greater than
+@var{s2}.
+
+This function does not normalize file names. As a result, this function
+will treat filenames that are spelled differently as different even in
+the case when the two filenames point to the same underlying file.
+However, it does handle the fact that on DOS-like file systems, forward
+and backward slashes are equal.
+
+@end deftypefn
+
+*/
+
+int
+filename_cmp (const char *s1, const char *s2)
+{
+#ifndef HAVE_DOS_BASED_FILE_SYSTEM
+ return strcmp(s1, s2);
+#else
+ for (;;)
+ {
+ int c1 = TOLOWER (*s1);
+ int c2 = TOLOWER (*s2);
+
+ /* On DOS-based file systems, the '/' and the '\' are equivalent. */
+ if (c1 == '/')
+ c1 = '\\';
+ if (c2 == '/')
+ c2 = '\\';
+
+ if (c1 != c2)
+ return (c1 - c2);
+
+ if (c1 == '\0')
+ return 0;
+
+ s1++;
+ s2++;
+ }
+#endif
+}
+
diff --git a/contrib/binutils/libiberty/floatformat.c b/contrib/binutils/libiberty/floatformat.c
index bd31efa..c5abbb1 100644
--- a/contrib/binutils/libiberty/floatformat.c
+++ b/contrib/binutils/libiberty/floatformat.c
@@ -249,53 +249,51 @@ const struct floatformat floatformat_ia64_quad_little =
floatformat_always_valid
};
+
+#ifndef min
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
/* Extract a field which starts at START and is LEN bits long. DATA and
TOTAL_LEN are the thing we are extracting it from, in byteorder ORDER. */
static unsigned long
get_field (const unsigned char *data, enum floatformat_byteorders order,
unsigned int total_len, unsigned int start, unsigned int len)
{
- unsigned long result;
+ unsigned long result = 0;
unsigned int cur_byte;
- int cur_bitshift;
+ int lo_bit, hi_bit, cur_bitshift = 0;
+ int nextbyte = (order == floatformat_little) ? 1 : -1;
+
+ /* Start is in big-endian bit order! Fix that first. */
+ start = total_len - (start + len);
/* Start at the least significant part of the field. */
- cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little)
- cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;
- cur_bitshift =
- ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
- result = *(data + cur_byte) >> (-cur_bitshift);
- cur_bitshift += FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- ++cur_byte;
+ cur_byte = start / FLOATFORMAT_CHAR_BIT;
else
- --cur_byte;
+ cur_byte = (total_len - start - 1) / FLOATFORMAT_CHAR_BIT;
- /* Move towards the most significant part of the field. */
- while ((unsigned int) cur_bitshift < len)
+ lo_bit = start % FLOATFORMAT_CHAR_BIT;
+ hi_bit = min (lo_bit + len, FLOATFORMAT_CHAR_BIT);
+
+ do
{
- if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
- /* This is the last byte; zero out the bits which are not part of
- this field. */
- result |=
- (*(data + cur_byte) & ((1 << (len - cur_bitshift)) - 1))
- << cur_bitshift;
- else
- result |= *(data + cur_byte) << cur_bitshift;
- cur_bitshift += FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- ++cur_byte;
- else
- --cur_byte;
+ unsigned int shifted = *(data + cur_byte) >> lo_bit;
+ unsigned int bits = hi_bit - lo_bit;
+ unsigned int mask = (1 << bits) - 1;
+ result |= (shifted & mask) << cur_bitshift;
+ len -= bits;
+ cur_bitshift += bits;
+ cur_byte += nextbyte;
+ lo_bit = 0;
+ hi_bit = min (len, FLOATFORMAT_CHAR_BIT);
}
+ while (len != 0);
+
return result;
}
-#ifndef min
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
/* Convert from FMT to a double.
FROM is the address of the extended float.
Store the double in *TO. */
@@ -394,7 +392,7 @@ floatformat_to_double (const struct floatformat *fmt,
/* Handle denormalized numbers. FIXME: What should we do for
non-IEEE formats? */
- if (exponent == 0 && mant != 0)
+ if (special_exponent && exponent == 0 && mant != 0)
dto += ldexp ((double)mant,
(- fmt->exp_bias
- mant_bits
@@ -428,43 +426,34 @@ put_field (unsigned char *data, enum floatformat_byteorders order,
unsigned long stuff_to_put)
{
unsigned int cur_byte;
- int cur_bitshift;
+ int lo_bit, hi_bit;
+ int nextbyte = (order == floatformat_little) ? 1 : -1;
+
+ /* Start is in big-endian bit order! Fix that first. */
+ start = total_len - (start + len);
/* Start at the least significant part of the field. */
- cur_byte = (start + len) / FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- cur_byte = (total_len / FLOATFORMAT_CHAR_BIT) - cur_byte - 1;
- cur_bitshift =
- ((start + len) % FLOATFORMAT_CHAR_BIT) - FLOATFORMAT_CHAR_BIT;
- *(data + cur_byte) &=
- ~(((1 << ((start + len) % FLOATFORMAT_CHAR_BIT)) - 1) << (-cur_bitshift));
- *(data + cur_byte) |=
- (stuff_to_put & ((1 << FLOATFORMAT_CHAR_BIT) - 1)) << (-cur_bitshift);
- cur_bitshift += FLOATFORMAT_CHAR_BIT;
if (order == floatformat_little)
- ++cur_byte;
+ cur_byte = start / FLOATFORMAT_CHAR_BIT;
else
- --cur_byte;
+ cur_byte = (total_len - start - 1) / FLOATFORMAT_CHAR_BIT;
- /* Move towards the most significant part of the field. */
- while ((unsigned int) cur_bitshift < len)
+ lo_bit = start % FLOATFORMAT_CHAR_BIT;
+ hi_bit = min (lo_bit + len, FLOATFORMAT_CHAR_BIT);
+
+ do
{
- if (len - cur_bitshift < FLOATFORMAT_CHAR_BIT)
- {
- /* This is the last byte. */
- *(data + cur_byte) &=
- ~((1 << (len - cur_bitshift)) - 1);
- *(data + cur_byte) |= (stuff_to_put >> cur_bitshift);
- }
- else
- *(data + cur_byte) = ((stuff_to_put >> cur_bitshift)
- & ((1 << FLOATFORMAT_CHAR_BIT) - 1));
- cur_bitshift += FLOATFORMAT_CHAR_BIT;
- if (order == floatformat_little)
- ++cur_byte;
- else
- --cur_byte;
+ unsigned char *byte_ptr = data + cur_byte;
+ unsigned int bits = hi_bit - lo_bit;
+ unsigned int mask = ((1 << bits) - 1) << lo_bit;
+ *byte_ptr = (*byte_ptr & ~mask) | ((stuff_to_put << lo_bit) & mask);
+ stuff_to_put >>= bits;
+ len -= bits;
+ cur_byte += nextbyte;
+ lo_bit = 0;
+ hi_bit = min (len, FLOATFORMAT_CHAR_BIT);
}
+ while (len != 0);
}
/* The converse: convert the double *FROM to an extended float
diff --git a/contrib/binutils/libiberty/functions.texi b/contrib/binutils/libiberty/functions.texi
index fa92d70..fd3e8e7 100644
--- a/contrib/binutils/libiberty/functions.texi
+++ b/contrib/binutils/libiberty/functions.texi
@@ -153,7 +153,7 @@ 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
+This function is provided for backwards compatibility only. Its use is
not recommended.
@end deftypefn
@@ -268,6 +268,22 @@ value 1). If @var{valu} is zero, zero is returned.
@end deftypefn
+@c filename_cmp.c:28
+@deftypefn Extension int filename_cmp (const char *@var{s1}, const char *@var{s2})
+
+Return zero if the two paths @var{s1} and @var{s2} are equivalent.
+If not equivalent, the returned value is similar to what strcmp would
+return. In other words, it returns a negative value if @var{s1} is less
+than @var{s2}, or a positive value if @var{s2} is greater than @var{s2}.
+
+This function does not normalize path names. As a result, this function
+will treat filenames that are spelled differently as different even in
+the case when the two filenames point to the same underlying file.
+However, it does handle the fact that on DOS-like file systems, forward
+and backward slashes are equal.
+
+@end deftypefn
+
@c fnmatch.txh:1
@deftypefn Replacement int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags})
@@ -420,7 +436,7 @@ or zero if it is not. Note that the value you pass will be cast to
@deftypefn Extension {unsigned int} hex_value (int @var{c})
Returns the numeric equivalent of the given character when interpreted
-as a hexidecimal digit. The result is undefined if you pass an
+as a hexadecimal digit. The result is undefined if you pass an
invalid hex digit. Note that the value you pass will be cast to
@code{unsigned char} within the macro.
@@ -650,7 +666,7 @@ Sets the first @var{count} bytes of @var{s} to the constant byte
@end deftypefn
-@c mkstemps.c:54
+@c mkstemps.c:58
@deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len})
Generate a unique temporary file name from @var{pattern}.
@@ -668,14 +684,14 @@ reading and writing.
@end deftypefn
-@c pexecute.txh:231
+@c pexecute.txh:266
@deftypefn Extension void pex_free (struct pex_obj @var{obj})
Clean up and free all data associated with @var{obj}.
@end deftypefn
-@c pexecute.txh:206
+@c pexecute.txh:241
@deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, int @var{count}, int *@var{vector})
Returns the exit status of all programs run using @var{obj}.
@@ -685,7 +701,7 @@ to @code{pex_run}. Returns 0 on error, 1 on success.
@end deftypefn
-@c pexecute.txh:215
+@c pexecute.txh:250
@deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, int @var{count}, struct pex_time *@var{vector})
Returns the process execution times of all programs run using
@@ -734,7 +750,7 @@ temporary files; it may be @code{NULL} to use a randomly chosen name.
@end deftypefn
-@c pexecute.txh:133
+@c pexecute.txh:155
@deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{in_name})
Return a stream for a temporary file to pass to the first program in
@@ -752,7 +768,7 @@ binary mode; otherwise, open it in the default mode. Including
@code{PEX_BINARY_OUTPUT} in @var{flags} has no effect on Unix.
@end deftypefn
-@c pexecute.txh:150
+@c pexecute.txh:172
@deftypefn Extension {FILE *} pex_input_pipe (struct pex_obj *@var{obj}, int @var{binary})
Return a stream @var{fp} for a pipe connected to the standard input of
@@ -797,7 +813,7 @@ the output pipe is you, but you are blocked on the input pipe.
@end deftypefn
-@c pexecute.txh:237
+@c pexecute.txh:272
@deftypefn Extension {const char *} pex_one (int @var{flags}, const char *@var{executable}, char * const *@var{argv}, const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, int *@var{status}, int *@var{err})
An interface to permit the easy execution of a
@@ -810,7 +826,20 @@ be set to the exit status of the program.
@end deftypefn
-@c pexecute.txh:194
+@c pexecute.txh:228
+@deftypefn Extension {FILE *} pex_read_err (struct pex_obj *@var{obj}, int @var{binary})
+
+Returns a @code{FILE} pointer which may be used to read the standard
+error of the last program in the pipeline. When this is used,
+@code{PEX_LAST} should not be used in a call to @code{pex_run}. After
+this is called, @code{pex_run} may no longer be called with the same
+@var{obj}. @var{binary} should be non-zero if the file should be
+opened in binary mode. Don't call @code{fclose} on the returned file;
+it will be closed by @code{pex_free}.
+
+@end deftypefn
+
+@c pexecute.txh:216
@deftypefn Extension {FILE *} pex_read_output (struct pex_obj *@var{obj}, int @var{binary})
Returns a @code{FILE} pointer which may be used to read the standard
@@ -861,14 +890,23 @@ Send the program's standard error to standard output, if possible.
@vindex PEX_BINARY_INPUT
@vindex PEX_BINARY_OUTPUT
+@vindex PEX_BINARY_ERROR
@item PEX_BINARY_INPUT
@itemx PEX_BINARY_OUTPUT
-The standard input (output) of the program should be read (written) in
+@itemx PEX_BINARY_ERROR
+The standard input (output or error) of the program should be read (written) in
binary mode rather than text mode. These flags are ignored on systems
which do not distinguish binary mode and text mode, such as Unix. For
proper behavior these flags should match appropriately---a call to
@code{pex_run} using @code{PEX_BINARY_OUTPUT} should be followed by a
call using @code{PEX_BINARY_INPUT}.
+
+@vindex PEX_STDERR_TO_PIPE
+@item PEX_STDERR_TO_PIPE
+Send the program's standard error to a pipe, if possible. This flag
+cannot be specified together with @code{PEX_STDERR_TO_STDOUT}. This
+flag can be specified only on the last program in pipeline.
+
@end table
@var{executable} is the program to execute. @var{argv} is the set of
@@ -924,8 +962,22 @@ value, or to 0 if there is no relevant @code{errno}.
@end deftypefn
-@c pexecute.txh:249
-@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)
+@c pexecute.txh:142
+@deftypefn Extension {const char *} pex_run_in_environment (struct pex_obj *@var{obj}, int @var{flags}, const char *@var{executable}, char * const *@var{argv}, char * const *@var{env}, int @var{env_size}, const char *@var{outname}, const char *@var{errname}, int *@var{err})
+
+Execute one program in a pipeline, permitting the environment for the
+program to be specified. Behaviour and parameters not listed below are
+as for @code{pex_run}.
+
+@var{env} is the environment for the child process, specified as an array of
+character pointers. Each element of the array should point to a string of the
+form @code{VAR=VALUE}, with the exception of the last element that must be
+@code{NULL}.
+
+@end deftypefn
+
+@c pexecute.txh:284
+@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 @var{flags})
This is the old interface to execute one or more programs. It is
still supported for compatibility purposes, but is no longer
@@ -934,7 +986,7 @@ documented.
@end deftypefn
@c strsignal.c:539
-@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
+@deftypefn Supplemental void psignal (int @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},
@@ -952,7 +1004,7 @@ name is unset/removed.
@end deftypefn
-@c pexecute.txh:257
+@c pexecute.txh:292
@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
Another part of the old execution interface.
diff --git a/contrib/binutils/libiberty/hashtab.c b/contrib/binutils/libiberty/hashtab.c
index a5671a0..bf34a6d 100644
--- a/contrib/binutils/libiberty/hashtab.c
+++ b/contrib/binutils/libiberty/hashtab.c
@@ -421,7 +421,28 @@ htab_empty (htab_t htab)
if (entries[i] != HTAB_EMPTY_ENTRY && entries[i] != HTAB_DELETED_ENTRY)
(*htab->del_f) (entries[i]);
- memset (entries, 0, size * sizeof (PTR));
+ /* Instead of clearing megabyte, downsize the table. */
+ if (size > 1024*1024 / sizeof (PTR))
+ {
+ int nindex = higher_prime_index (1024 / sizeof (PTR));
+ int nsize = prime_tab[nindex].prime;
+
+ if (htab->free_f != NULL)
+ (*htab->free_f) (htab->entries);
+ else if (htab->free_with_arg_f != NULL)
+ (*htab->free_with_arg_f) (htab->alloc_arg, htab->entries);
+ if (htab->alloc_with_arg_f != NULL)
+ htab->entries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize,
+ sizeof (PTR *));
+ else
+ htab->entries = (PTR *) (*htab->alloc_f) (nsize, sizeof (PTR *));
+ htab->size = nsize;
+ htab->size_prime_index = nindex;
+ }
+ else
+ memset (entries, 0, size * sizeof (PTR));
+ htab->n_deleted = 0;
+ htab->n_elements = 0;
}
/* Similar to htab_find_slot, but without several unwanted side effects:
diff --git a/contrib/binutils/libiberty/hex.c b/contrib/binutils/libiberty/hex.c
index 86ba0b5..5eeafdb 100644
--- a/contrib/binutils/libiberty/hex.c
+++ b/contrib/binutils/libiberty/hex.c
@@ -50,7 +50,7 @@ or zero if it is not. Note that the value you pass will be cast to
@deftypefn Extension {unsigned int} hex_value (int @var{c})
Returns the numeric equivalent of the given character when interpreted
-as a hexidecimal digit. The result is undefined if you pass an
+as a hexadecimal digit. The result is undefined if you pass an
invalid hex digit. Note that the value you pass will be cast to
@code{unsigned char} within the macro.
diff --git a/contrib/binutils/libiberty/make-relative-prefix.c b/contrib/binutils/libiberty/make-relative-prefix.c
index 66ddcaa..037809e 100644
--- a/contrib/binutils/libiberty/make-relative-prefix.c
+++ b/contrib/binutils/libiberty/make-relative-prefix.c
@@ -1,6 +1,6 @@
/* Relative (relocatable) prefix support.
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
This file is part of libiberty.
@@ -217,9 +217,9 @@ free_split_directories (char **dirs)
If no relative prefix can be found, return NULL. */
-char *
-make_relative_prefix (const char *progname,
- const char *bin_prefix, const char *prefix)
+static char *
+make_relative_prefix_1 (const char *progname, const char *bin_prefix,
+ const char *prefix, const int resolve_links)
{
char **prog_dirs, **bin_dirs, **prefix_dirs;
int prog_num, bin_num, prefix_num;
@@ -289,9 +289,14 @@ make_relative_prefix (const char *progname,
}
}
- full_progname = lrealpath (progname);
- if (full_progname == NULL)
- return NULL;
+ if ( resolve_links )
+ {
+ full_progname = lrealpath (progname);
+ if (full_progname == NULL)
+ return NULL;
+ }
+ else
+ full_progname = strdup(progname);
prog_dirs = split_directories (full_progname, &prog_num);
bin_dirs = split_directories (bin_prefix, &bin_num);
@@ -387,3 +392,30 @@ make_relative_prefix (const char *progname,
return ret;
}
+
+
+/* Do the full job, including symlink resolution.
+ This path will find files installed in the same place as the
+ program even when a soft link has been made to the program
+ from somwhere else. */
+
+char *
+make_relative_prefix (const char *progname, const char *bin_prefix,
+ const char *prefix)
+{
+ return make_relative_prefix_1 (progname, bin_prefix, prefix, 1);
+}
+
+/* Make the relative pathname without attempting to resolve any links.
+ '..' etc may also be left in the pathname.
+ This will find the files the user meant the program to find if the
+ installation is patched together with soft links. */
+
+char *
+make_relative_prefix_ignore_links (const char *progname,
+ const char *bin_prefix,
+ const char *prefix)
+{
+ return make_relative_prefix_1 (progname, bin_prefix, prefix, 0);
+}
+
diff --git a/contrib/binutils/libiberty/mkstemps.c b/contrib/binutils/libiberty/mkstemps.c
index 89b37d9..6c2e472 100644
--- a/contrib/binutils/libiberty/mkstemps.c
+++ b/contrib/binutils/libiberty/mkstemps.c
@@ -49,6 +49,10 @@ typedef unsigned long gcc_uint64_t;
#define TMP_MAX 16384
#endif
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
/*
@deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len})
@@ -119,7 +123,7 @@ mkstemps (char *pattern, int suffix_len)
v /= 62;
XXXXXX[5] = letters[v % 62];
- fd = open (pattern, O_RDWR|O_CREAT|O_EXCL, 0600);
+ fd = open (pattern, O_BINARY|O_RDWR|O_CREAT|O_EXCL, 0600);
if (fd >= 0)
/* The file does not exist. */
return fd;
diff --git a/contrib/binutils/libiberty/strsignal.c b/contrib/binutils/libiberty/strsignal.c
index c3a16ab..4ca9e21 100644
--- a/contrib/binutils/libiberty/strsignal.c
+++ b/contrib/binutils/libiberty/strsignal.c
@@ -9,7 +9,7 @@
/* We need to declare sys_siglist, because even if the system provides
it we can't assume that it is declared in <signal.h> (for example,
SunOS provides sys_siglist, but it does not declare it in any
- header file). fHowever, we can't declare sys_siglist portably,
+ header file). However, we can't declare sys_siglist portably,
because on some systems it is declared with const and on some
systems it is declared without const. If we were using autoconf,
we could work out the right declaration. Until, then we just
@@ -536,7 +536,7 @@ strtosigno (const char *name)
/*
-@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
+@deftypefn Supplemental void psignal (int @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},
@@ -549,7 +549,7 @@ followed by a newline.
#ifndef HAVE_PSIGNAL
void
-psignal (unsigned signo, char *message)
+psignal (int signo, char *message)
{
if (signal_names == NULL)
{
diff --git a/contrib/binutils/libtool.m4 b/contrib/binutils/libtool.m4
index cbd74d5..df40fe8 100644
--- a/contrib/binutils/libtool.m4
+++ b/contrib/binutils/libtool.m4
@@ -1,233 +1,1181 @@
-## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
-## Copyright 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
-## 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-##
-## As a special exception to the GNU General Public License, if you
-## distribute this file as part of a program that contains a
-## configuration script generated by Autoconf, you may include it under
-## the same distribution terms that you use for the rest of that program.
-
-# 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],
- [AC_LIBTOOL_CXX],
- [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
- AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
- [AC_LIBTOOL_GCJ],
- [ifdef([AC_PROG_GCJ],
- [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([A][M_PROG_GCJ],
- [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])
- ifdef([LT_AC_PROG_GCJ],
- [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
-])])])])])])
-
-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
-
-# Save cache, so that ltconfig can load it
-AC_CACHE_SAVE
-
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| AC_MSG_ERROR([libtool configure failed])
-
-# Reload cache, that may have been modified by ltconfig
-AC_CACHE_LOAD
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+])
+
+# serial 53 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+m4_require([_LT_SET_OPTIONS], [_LT_SET_OPTIONS([$1])])dnl
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
+LIBTOOL_DEPS="$ltmain"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
AC_SUBST(LIBTOOL)dnl
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# _LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
])
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
AC_REQUIRE([AC_OBJEXT])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
AC_REQUIRE([AC_EXEEXT])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-AC_LIBTOOL_SYS_MAX_CMD_LEN
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+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
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
+ _LT_PATH_MAGIC
fi
;;
esac
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$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],
-[libtool_flags="$libtool_flags --enable-win32-dll"])
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-
-AC_ARG_WITH(pic,
- [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
- pic_mode="$withval", pic_mode=default)
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_quote(m4_if([$2], [],
+ m4_quote(lt_decl_tag_varnames),
+ m4_quote(m4_shift($@)))),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
+m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
;;
esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
;;
esac
- fi
- fi
- rm -rf conftest*
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2007 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try `$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try `$[0] --help for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_XSI_SHELLFNS
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_LINKER_BOILERPLATE
+
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_REQUIRE([AC_OBJEXT])dnl
+AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
esac
fi
rm -rf conftest*
;;
-
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+*-*-irix6*)
# Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
esac
- ;;
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
esac
fi
rm -rf conftest*
@@ -238,54 +1186,177 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[AC_REQUIRE([AC_OBJEXT])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
])
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
AC_MSG_CHECKING([the maximum length of command line arguments])
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
i=0
@@ -300,6 +1371,13 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
lt_cv_sys_max_cmd_len=12288; # 12K is about right
;;
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
cygwin* | mingw*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
@@ -324,171 +1402,1220 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
elif test -x /usr/sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
else
- lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
fi
# And add a safety zone
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
+ if test -n $lt_cv_sys_max_cmd_len; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # 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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
esac
])
-if test -n "$lt_cv_sys_max_cmd_len" ; then
+if test -n $lt_cv_sys_max_cmd_len ; then
AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
else
AC_MSG_RESULT(none)
fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
-
-
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
-
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
-
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[AC_REQUIRE([AC_OBJEXT])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
-
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_case([$1],
+ [C], [withGCC=$GCC],
+ [CXX], [withGCC=$GXX],
+ [F77], [withGCC=$G77],
+ [FC], [withGCC=$ac_cv_fc_compiler_gnu],
+ [GCJ], [withGCC=$GCC],
+ [], [withGCC=$GCC
+if test "$withGCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
- IFS="$ac_save_ifs"
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi],
+[withGCC=$GCC])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
-
-
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ 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.
+ 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
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # 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.
+ 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}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
fi
- done
- IFS="$ac_save_ifs"
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ if test "$host_cpu" = m68k; then
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ else
+ dynamic_linker=no
+ fi
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $withGCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
;;
-esac],
-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_ENABLE_FAST_INSTALL(no)])
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
-# 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
-pic_mode=ifelse($#,1,$1,default)])
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"],
+ [shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
[case $MAGIC_CMD in
- /*)
+[[\\/*] | ?:[\\/]*])
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
dnl $ac_dummy forces splitting on constant user-supplied paths.
dnl POSIX.2 word splitting is done only on the output of word expansions,
dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
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
"file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
+ $EGREP "$file_magic_regex" > /dev/null; then
:
else
- cat <<EOF 1>&2
+ cat <<_LT_EOF 1>&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
@@ -499,15 +2626,15 @@ dnl not every word. This closes a longstanding sh security hole.
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
-EOF
+_LT_EOF
fi ;;
esac
fi
break
fi
done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
;;
esac])
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -516,35 +2643,51 @@ if test -n "$MAGIC_CMD"; then
else
AC_MSG_RESULT(no)
fi
-])
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
else
MAGIC_CMD=:
fi
fi
-])
+])# _LT_PATH_MAGIC
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
+ AC_MSG_CHECKING([for ld used by $CC])
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -554,12 +2697,12 @@ if test "$GCC" = yes; then
esac
case $ac_prog in
# Accept absolute paths.
- [[\\/]* | [A-Za-z]:[\\/]*)]
- re_direlt=['/[^/][^/]*/\.\./']
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -579,22 +2722,26 @@ else
fi
AC_CACHE_VAL(lt_cv_path_LD,
[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
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.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
test "$with_gnu_ld" != no && break
- else
+ ;;
+ *)
test "$with_gnu_ld" != yes && break
- fi
+ ;;
+ esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$lt_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
@@ -605,33 +2752,72 @@ else
AC_MSG_RESULT(no)
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
-AC_DEFUN([AC_PROG_LD_GNU],
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_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
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
-else
+ ;;
+*)
lt_cv_prog_gnu_ld=no
-fi])
+ ;;
+esac])
with_gnu_ld=$lt_cv_prog_gnu_ld
-])
+])# _LT_PATH_LD_GNU
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
# -- PORTME Some linkers may need a different 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'])
+m4_defun([_LT_CMD_RELOAD],
+[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
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependant libraries],
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
@@ -642,13 +2828,13 @@ lt_cv_deplibs_check_method='unknown'
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix*)
+aix4* | aix5*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -656,39 +2842,42 @@ beos*)
lt_cv_deplibs_check_method=pass_all
;;
-bsdi4*)
- lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
- # this will be overwritten by pass_all, but leave it in just in case
- 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
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/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.*`
;;
@@ -702,291 +2891,4266 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*|hpux11*)
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
case $host_cpu in
- hppa*)
- [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
- ;;
ia64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
- 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 (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
-linux-gnu*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd* | knetbsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
else
- [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
fi
;;
-newsos6)
- [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
+newos6*)
+ 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
;;
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
-sco3.2v5*)
+rdos*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
;;
-[sysv5uw[78]* | sysv4*uw2*)]
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
case $host_vendor in
+ 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*`
+ ;;
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*`
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
;;
esac
;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
])
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
-])
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
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
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- 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
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+ esac
fi
- fi
+ done
+ IFS="$lt_save_ifs"
done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+ : ${lt_cv_path_NM=no}
fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
-])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
case $host in
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm
- # on darwin the libm is a symbolic link to libSystem.dylib
+ # These system don't have libm, or don't need it
;;
*-ncr-sysv4.3*)
AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
;;
*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and INCLTDL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and INCLTDL will be prefixed with
-# '${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
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32*)
+ # 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).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix4* | aix5*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--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
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and INCLTDL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
-# with '${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.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix4* | aix5*)
+ # 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 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw*)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ _LT_TAGVAR(archive_cmds, $1)='$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)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- INCLTDL=
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # 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 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # 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 runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # 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.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$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
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=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
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ _LT_TAGVAR(archive_cmds, $1)='$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)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ # see comment about different semantics on the GNU ld section
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[[012]])
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ if test "$GCC" = yes ; then
+ AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi-module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm libconftest.dylib
+ fi
+ rm conftest.$ac_ext
+ fi])
+ output_verbose_link_cmd=echo
+ if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ _LT_TAGVAR(module_expsym_cmds, $1)='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd=echo
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
+ _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$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'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$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'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(int foo(void) {},
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ )
+ LDFLAGS="$save_LDFLAGS"
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='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'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
fi
])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-# If this macro is not defined by Autoconf, define it here.
-ifdef([AC_PROVIDE_IFELSE],
- [],
- [define([AC_PROVIDE_IFELSE],
- [ifdef([AC_PROVIDE_$1],
- [$2], [$3])])])
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
-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_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
lt_save_CC="$CC"
-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" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ 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
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # 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 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix4* | aix5*)
+ 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
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # 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 runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # 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.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = 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
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=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
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[[012]])
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GXX" = yes ; then
+ AC_CACHE_VAL([lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi-module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm libconftest.dylib
+ fi
+ rm conftest.$ac_ext
+ fi])
+ output_verbose_link_cmd=echo
+ if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd=echo
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO "$rpath/$soname"` $verstring'
+ _LT_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag,
+ # it doesn't exist in older darwin lds
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_TAGVAR(module_expsym_cmds, $1)='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd[[12]]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=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
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$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'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # 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_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 "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$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'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # 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_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$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
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # 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_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]]*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # 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_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # 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_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "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 "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$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" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # 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 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_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_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_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_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ # The `*' in the case matches for architectures that use `case' in
+ # $output_verbose_cmd can trigger glob expansion during the loop
+ # eval without this substitution.
+ output_verbose_link_cmd=`$ECHO "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
+
+ for p in `eval $output_verbose_link_cmd`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ CC=${F77-"f77"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ 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
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ CC=${FC-"f95"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ 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
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
-# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-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],[],
- [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
- [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
- [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
- [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
lt_save_CC="$CC"
-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" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" \
-file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
---build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
-|| AC_MSG_ERROR([libtool tag configuration failed])
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
CC="$lt_save_CC"
-CFLAGS="$lt_save_CFLAGS"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
-dnl old names
-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)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]+=\$[2]"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]=\$$[1]\$[2]"
+}
+_LT_EOF
+ ;;
+ esac
])
diff --git a/contrib/binutils/ltcf-c.sh b/contrib/binutils/ltcf-c.sh
deleted file mode 100644
index 7a91c40..0000000
--- a/contrib/binutils/ltcf-c.sh
+++ /dev/null
@@ -1,828 +0,0 @@
-#### This script is meant to be sourced by ltconfig.
-
-# ltcf-c.sh - Create a C compiler specific configuration
-#
-# 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
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='main(){return(0);}'
-
-## Linker Characteristics
-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
- # Microsoft Visual C++.
- if test "$with_gcc" != yes; then
- with_gnu_ld=no
- fi
- ;;
-
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # See if GNU ld supports shared libraries.
- 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.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
- 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)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can use
- # them.
- ld_shlibs=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw*)
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=yes
-
- extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
- sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
- test -f $output_objdir/impgen.exe || (cd $output_objdir && \
- if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \
- else $CC -o impgen impgen.c ; fi)~
- $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'
-
- # cygwin and mingw dlls have different entry points and sets of symbols
- # to exclude.
- # 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
- mingw*)
- # mingw values
- dll_entry=_DllMainCRTStartup@12
- dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
- ;;
- esac
-
- # mingw and cygwin differ, and it's simplest to just exclude the union
- # of the two symbol sets.
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one (in ltdll.c)
- if test "x$lt_cv_need_dllmain" = "xyes"; then
- ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
- ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
- test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
- else
- ltdll_obj=
- ltdll_cmds=
- fi
-
- # Extract the symbol export list from an `--export-all' def file,
- # then regenerate the def file from the symbol export list, so that
- # the compiled dll only exports the symbol export list.
- # Be careful not to strip the DATA tag left be newer dlltools.
- export_symbols_cmds="$ltdll_cmds"'
- $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='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 $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 -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* | knetbsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- 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
- ;;
-
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
- elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $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'
- else
- ld_shlibs=no
- fi
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- tpf*)
- ld_shlibs=yes
- ;;
-
- *)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- 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'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- case $host_os in
- cygwin* | mingw*)
- # dlltool doesn't understand --whole-archive et. al.
- whole_archive_flag_spec=
- ;;
- *)
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- ;;
- esac
- fi
-else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$with_gcc" = yes && test -z "$link_static_flag"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- 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
- 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
- # -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)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
-
- cygwin* | mingw*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9* | hpux10* | hpux11*)
- case "$host_cpu" in
- ia64*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir' ;;
- *)
- 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_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- ;;
- esac
- export_dynamic_flag_spec='${wl}-E'
- hardcode_direct=yes
- ;;
-
- irix5* | irix6*)
- if test "$with_gcc" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $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 $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- link_all_deplibs=yes
- ;;
-
- netbsd* | knetbsd*-gnu)
- 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
- fi
- 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
- ;;
-
- openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- 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}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- 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_separator=:
- ;;
-
- sco3.2v5*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ;;
-
- solaris*)
- 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
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv5*)
- no_undefined_flag=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $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'
- hardcode_libdir_flag_spec=
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4.2uw2*)
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=no
- hardcode_shlibpath_var=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
-
- 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
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-fi
-
-## Compiler Characteristics: PIC flags, static flags, etc
-if test "X${ac_cv_prog_cc_pic+set}" = Xset; then
- :
-else
- ac_cv_prog_cc_pic=
- ac_cv_prog_cc_shlib=
- ac_cv_prog_cc_wl=
- ac_cv_prog_cc_static=
- ac_cv_prog_cc_no_builtin=
- ac_cv_prog_cc_can_build_shared=$can_build_shared
-
- if test "$with_gcc" = yes; then
- ac_cv_prog_cc_wl='-Wl,'
- ac_cv_prog_cc_static='-static'
-
- 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.
- ;;
- 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'
- ;;
- 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
- ac_cv_prog_cc_pic=-Kconform_pic
- fi
- ;;
- *)
- ac_cv_prog_cc_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for PIC flags for the system compiler.
- case $host_os in
- aix*)
- # All AIX code is PIC.
- ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
- ;;
-
- hpux9* | hpux10* | hpux11*)
- # Is there a better ac_cv_prog_cc_static that works with the bundled CC?
- ac_cv_prog_cc_wl='-Wl,'
- ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
- ac_cv_prog_cc_pic='+Z'
- ;;
-
- irix5* | irix6*)
- ac_cv_prog_cc_wl='-Wl,'
- ac_cv_prog_cc_static='-non_shared'
- # PIC (with -KPIC) is the default.
- ;;
-
- 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'
- ;;
-
- 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,'
- ac_cv_prog_cc_static='-non_shared'
- ;;
-
- sco3.2v5*)
- ac_cv_prog_cc_pic='-Kpic'
- ac_cv_prog_cc_static='-dn'
- ac_cv_prog_cc_shlib='-belf'
- ;;
-
- solaris*)
- ac_cv_prog_cc_pic='-KPIC'
- ac_cv_prog_cc_static='-Bstatic'
- ac_cv_prog_cc_wl='-Wl,'
- ;;
-
- sunos4*)
- ac_cv_prog_cc_pic='-PIC'
- ac_cv_prog_cc_static='-Bstatic'
- ac_cv_prog_cc_wl='-Qoption ld '
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- ac_cv_prog_cc_pic='-KPIC'
- ac_cv_prog_cc_static='-Bstatic'
- ac_cv_prog_cc_wl='-Wl,'
- ;;
-
- uts4*)
- ac_cv_prog_cc_pic='-pic'
- ac_cv_prog_cc_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- ac_cv_prog_cc_pic='-Kconform_pic'
- ac_cv_prog_cc_static='-Bstatic'
- fi
- ;;
-
- *)
- ac_cv_prog_cc_can_build_shared=no
- ;;
- esac
- fi
- 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
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- echo $ac_n "checking whether -lc should be explicitly linked in... $ac_c" 1>&6
- if eval "test \"`echo '$''{'ac_cv_archive_cmds_needs_lc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- need_lc=$ac_cv_archive_cmds_needs_lc
- else
- $rm conftest*
- echo "static int dummy;" > conftest.$ac_ext
- if { (eval echo ltcf-c.sh:need_lc: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; }; then
- # Append any warnings to the config.log.
- cat conftest.err 1>&5
- soname=conftest
- lib=conftest
- libobjs=conftest.$objext
- deplibs=
- wl=$ac_cv_prog_cc_wl
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { (eval echo ltcf-c.sh:need_lc: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then
- need_lc=no
- fi
- allow_undefined_flag=$save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- fi
- $rm conftest*
- echo "$ac_t$need_lc" 1>&6
- ;;
- esac
-fi
-ac_cv_archive_cmds_needs_lc=$need_lc
diff --git a/contrib/binutils/ltcf-cxx.sh b/contrib/binutils/ltcf-cxx.sh
deleted file mode 100644
index fa8dbd0..0000000
--- a/contrib/binutils/ltcf-cxx.sh
+++ /dev/null
@@ -1,1024 +0,0 @@
-#### This script is meant to be sourced by ltconfig.
-
-# ltcf-cxx.sh - Create a C++ compiler specific configuration
-#
-# Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# Original C++ support by:Gary V. Vaughan <gvv@techie.com>
-# Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-# Ossama Othman <ossama@debian.org>
-# Thomas Thanner <tanner@gmx.de>
-#
-# 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
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Source file extension for C++ test sources.
-ac_ext=cc
-
-# Object file extension for compiled C++ test sources.
-objext=o
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return (0); }'
-
-# C++ compiler
-CXX=${CXX-c++}
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-CC=${CC-"$CXX"}
-CFLAGS=${CFLAGS-"$CXXFLAGS"}
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler=$2
-cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
-
-# Check if we are using GNU gcc (taken/adapted from configure script)
-# We need to check here since "--with-gcc" is set at configure time,
-# not ltconfig time!
-cat > conftest.$ac_ext <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval echo \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- with_gcc=yes
-
- # Set up default GNU C++ configuration
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used. The
- # assumption here is that the linker is going to be the same as that
- # used by the C compiler. For the purposes of GCC, this is ok, but
- # if someone uses g++ along with a non-GNU C compiler that doesn't
- # use GNU ld, we may lose. This is ok for the toolchain tree, since
- # the only users of ltcf-cxx.sh are libstdc++-v3 and libjava,
- # anyway, and those use both gcc and g++, so the settings are bound
- # to be the same.
-
- if test "$with_gnu_ld" = yes; then
- archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
- egrep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- else
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # 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
- with_gcc=no
- wlarc=
-fi
-
-# PORTME: fill in a description of your system's C++ link characteristics
-case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- 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
- 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
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- ghcx)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- esac
- ;;
- freebsd[12]*)
- # C++ shared libraries reported to be fairly broken before switch to ELF
- ld_shlibs=no
- ;;
- freebsd* | kfreebsd*-gnu)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- ld_shlibs=yes
- ;;
- gnu*)
- ;;
- hpux*)
- if test $with_gnu_ld = no; then
- case "$host_cpu" in
- ia64*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no ;;
- *)
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ;;
- esac
- hardcode_direct=yes
- hardcode_libdir_separator=:
- export_dynamic_flag_spec='${wl}-E'
- fi
- 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
- 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
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # 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_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'
- ;;
- *)
- 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' ;;
- *)
- case "$host_cpu" in
- ia64*)
- archive_cmds='$LD -b +h $soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ;;
- *)
- 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
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
- irix5* | irix6*)
- 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'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$with_gcc" = yes; then
- if test "$with_gnu_ld" = no; then
- 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='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
- fi
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- link_all_deplibs=yes
- ;;
- esac
- ;;
- linux*)
- case $cc_basename in
- KCC)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # 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_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'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- cxx)
- # Compaq C++
- archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='-rpath $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.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # 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_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
- ;;
- lynxos*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- m88k*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- mvs*)
- case $cc_basename in
- cxx)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- esac
- ;;
- netbsd* | knetbsd*-gnu)
- # NetBSD uses g++ - do we need to do anything?
- ;;
- osf3*)
- case $cc_basename in
- KCC)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- hardcode_libdir_separator=:
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- old_archive_cmds='$CC -Bstatic -o $oldlib $oldobjs'
-
- ;;
- RCC)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- 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}-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'
- 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.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # 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_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'
- ;;
- *)
- 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*)
- case $cc_basename in
- KCC)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- hardcode_libdir_separator=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- old_archive_cmds='$CC -o $oldlib $oldobjs'
- ;;
- RCC)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- cxx)
- 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
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # 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_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'
- ;;
- *)
- 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
- ;;
- psos*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- sco*)
- case $cc_basename in
- CC)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- lcc)
- # Lucid
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- esac
- ;;
- solaris*)
- case $cc_basename in
- CC)
- # Sun C++ 4.2, 5.x and Centerline C++
- 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
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The C++ compiler is used as linker so we must use $wl
- # flag to pass the commands to the underlying system
- # linker.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- link_all_deplibs=yes
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # 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_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
- # necessary to make sure instantiated templates are included
- # in the archive.
- old_archive_cmds='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx)
- # Green Hills C++ Compiler
- archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- old_archive_cmds='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # 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='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_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~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_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_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='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_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~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_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_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
- fi
-
- hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
- fi
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- esac
- ;;
- tpf*)
- ld_shlibs=yes
- ;;
- unixware*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- vxworks*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
- ;;
-esac
-
-
-## Compiler Characteristics: PIC flags, static flags, etc
-
-# We don't use cached values here since only the C compiler
-# characteristics should be cached.
-ac_cv_prog_cc_pic=
-ac_cv_prog_cc_shlib=
-ac_cv_prog_cc_wl=
-ac_cv_prog_cc_static=
-ac_cv_prog_cc_no_builtin=
-ac_cv_prog_cc_can_build_shared=$can_build_shared
-
-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
- 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.
- ;;
- 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'
- ;;
- 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
- ac_cv_prog_cc_pic=-Kconform_pic
- fi
- ;;
- *)
- ac_cv_prog_cc_pic='-fPIC'
- ;;
- esac
-else
- 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
- 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
- ;;
- dgux*)
- case $cc_basename in
- ec++)
- ac_cv_prog_cc_pic='-KPIC'
- ;;
- ghcx)
- # Green Hills C++ Compiler
- ac_cv_prog_cc_pic='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | kfreebsd*-gnu)
- # FreeBSD uses GNU C++
- ;;
- gnu*)
- ;;
- hpux9* | hpux10* | hpux11*)
- 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"
- ac_cv_prog_cc_pic='+Z'
- ;;
- aCC)
- ac_cv_prog_cc_wl='-Wl,'
- ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
- ac_cv_prog_cc_pic='+Z'
- ;;
- *)
- ;;
- esac
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC)
- ac_cv_prog_cc_wl='-Wl,'
- ac_cv_prog_cc_static='-non_shared'
- ac_cv_prog_cc_pic='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- linux*)
- case $cc_basename in
- KCC)
- # KAI C++ Compiler
- ac_cv_prog_cc_wl='--backend -Wl,'
- ac_cv_prog_cc_pic='-fPIC'
- ;;
- cxx)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- ac_cv_prog_cc_pic=
- ac_cv_prog_cc_static='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx)
- ac_cv_prog_cc_pic='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd*)
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC)
- ac_cv_prog_cc_wl='--backend -Wl,'
- ;;
- RCC)
- # Rational C++ 2.4.1
- ac_cv_prog_cc_pic='-pic'
- ;;
- cxx)
- # Digital/Compaq C++
- ac_cv_prog_cc_wl='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- ac_cv_prog_cc_pic=
- ac_cv_prog_cc_static='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- sco*)
- case $cc_basename in
- CC)
- ac_cv_prog_cc_pic='-fPIC'
- ;;
- *)
- ;;
- esac
- ;;
- solaris*)
- case $cc_basename in
- CC)
- # Sun C++ 4.2, 5.x and Centerline C++
- ac_cv_prog_cc_pic='-KPIC'
- ac_cv_prog_cc_static='-Bstatic'
- ac_cv_prog_cc_wl='-Qoption ld '
- ;;
- gcx)
- # Green Hills C++ Compiler
- ac_cv_prog_cc_pic='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC)
- # Sun C++ 4.x
- ac_cv_prog_cc_pic='-pic'
- ac_cv_prog_cc_static='-Bstatic'
- ;;
- lcc)
- # Lucid
- ac_cv_prog_cc_pic='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC)
- # NonStop-UX NCC 3.20
- ac_cv_prog_cc_pic='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- unixware*)
- ;;
- vxworks*)
- ;;
- *)
- ac_cv_prog_cc_can_build_shared=no
- ;;
- esac
-fi
-
-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
-# compiler output whening linking a shared library.
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-EOF
-
-
-if (eval $ac_compile) 2>&5; then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval $output_verbose_link_cmd`; do
-
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" \
- || test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$compiler_lib_search_path"; then
- compiler_lib_search_path="${prev}${p}"
- else
- compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$postdeps"; then
- postdeps="${prev}${p}"
- else
- postdeps="${postdeps} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$predep_objects"; then
- predep_objects="$p"
- else
- predep_objects="$predep_objects $p"
- fi
- else
- if test -z "$postdep_objects"; then
- postdep_objects="$p"
- else
- postdep_objects="$postdep_objects $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out
-else
- echo "ltcf-cxx.sh: error: problem compiling test program"
-fi
-
-$rm -f confest.$objext
-
-case " $postdeps " in
-*" -lc "*) need_lc=no ;;
-*) need_lc=yes ;;
-esac
diff --git a/contrib/binutils/ltcf-gcj.sh b/contrib/binutils/ltcf-gcj.sh
deleted file mode 100644
index 51faf04..0000000
--- a/contrib/binutils/ltcf-gcj.sh
+++ /dev/null
@@ -1,651 +0,0 @@
-#### This script is meant to be sourced by ltconfig.
-
-# ltcf-gcj.sh - Create a GCJ compiler specific configuration
-#
-# Copyright (C) 1996-1999, 2000, 2001, 2003 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# Original GCJ support by:
-# Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-#
-# 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
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
-
-## Linker Characteristics
-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
- # Microsoft Visual C++.
- if test "$with_gcc" != yes; then
- with_gnu_ld=no
- fi
- ;;
-
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # See if GNU ld supports shared libraries.
- 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.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
- 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)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can use
- # them.
- ld_shlibs=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw*)
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=yes
-
- extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
- sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/impgen.c~
- test -f $output_objdir/impgen.exe || (cd $output_objdir && \
- if test "x$BUILD_CC" != "x" ; then $BUILD_CC -o impgen impgen.c ; \
- else $CC -o impgen impgen.c ; fi)~
- $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'
-
- # cygwin and mingw dlls have different entry points and sets of symbols
- # to exclude.
- # 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
- mingw*)
- # mingw values
- dll_entry=_DllMainCRTStartup@12
- dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
- ;;
- esac
-
- # mingw and cygwin differ, and it's simplest to just exclude the union
- # of the two symbol sets.
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one (in ltdll.c)
- if test "x$lt_cv_need_dllmain" = "xyes"; then
- ltdll_obj='$output_objdir/$soname-ltdll.'"$objext "
- ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $0 > $output_objdir/$soname-ltdll.c~
- test -f $output_objdir/$soname-ltdll.$objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
- else
- ltdll_obj=
- ltdll_cmds=
- fi
-
- # Extract the symbol export list from an `--export-all' def file,
- # then regenerate the def file from the symbol export list, so that
- # the compiled dll only exports the symbol export list.
- # Be careful not to strip the DATA tag left be newer dlltools.
- export_symbols_cmds="$ltdll_cmds"'
- $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='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 $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 -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* | knetbsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- 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
- ;;
-
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
- elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $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'
- else
- ld_shlibs=no
- fi
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $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'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- case $host_os in
- cygwin* | mingw*)
- # dlltool doesn't understand --whole-archive et. al.
- whole_archive_flag_spec=
- ;;
- *)
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- ;;
- esac
- fi
-else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$with_gcc" = yes && test -z "$link_static_flag"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- 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
- 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
- # -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)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
-
- cygwin* | mingw*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | kfreebsd*-gnu)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- 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
- 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'
- ;;
-
- irix5* | irix6*)
- if test "$with_gcc" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $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 $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- link_all_deplibs=yes
- ;;
-
- netbsd* | knetbsd*-gnu)
- 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 -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='${wl}-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- 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}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- 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'
- 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'
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- sco3.2v5*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ;;
-
- solaris*)
- no_undefined_flag=' ${wl}-z ${wl}defs'
- archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_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~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_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
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv5*)
- no_undefined_flag=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $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'
- hardcode_libdir_flag_spec=
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4.2uw2*)
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=no
- hardcode_shlibpath_var=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
-
- 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
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-fi
-
-## Compiler Characteristics: PIC flags, static flags, etc
-
-# We don't use cached values here since only the C compiler
-# characteristics should be cached.
- ac_cv_prog_cc_pic=
- ac_cv_prog_cc_shlib=
- ac_cv_prog_cc_wl=
- ac_cv_prog_cc_static=
- ac_cv_prog_cc_no_builtin=
- ac_cv_prog_cc_can_build_shared=$can_build_shared
-
- ac_cv_prog_cc_wl='-Wl,'
- ac_cv_prog_cc_static='-static'
-
- case $host_os in
- 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"
- ;;
- *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).
- 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'
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- ac_cv_prog_cc_pic=-Kconform_pic
- fi
- ;;
- *)
- ac_cv_prog_cc_pic='-fPIC'
- ;;
- esac
-
-# 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
deleted file mode 100755
index 15f986c..0000000
--- a/contrib/binutils/ltconfig
+++ /dev/null
@@ -1,2856 +0,0 @@
-#! /bin/sh
-
-# ltconfig - Create a system-specific libtool.
-# 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
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A lot of this script is taken from autoconf-2.10.
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-echo=echo
-if test "X$1" = X--no-reexec; then
- # Discard the --no-reexec flag, and continue.
- shift
-elif test "X$1" = X--fallback-echo; then
- # Avoid inline document here, it may be left over
- :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
- # Yippee, $echo works!
- :
-else
- # Restart under the correct shell.
- exec "$SHELL" "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit 0
-fi
-
-# Find the correct PATH separator. Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) PATH_SEPARATOR=';' ;;
- *) PATH_SEPARATOR=':' ;;
- esac
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if (echo_test_string="`eval $cmd`") 2>/dev/null &&
- echo_test_string="`eval $cmd`" &&
- (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null; then
- break
- fi
- done
-fi
-
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
-else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
- for dir in $PATH /usr/ucb; do
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$dir/echo"
- break
- fi
- done
- IFS="$save_ifs"
-
- if test "X$echo" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- echo='print -r'
- elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running ltconfig again with it.
- ORIGINAL_CONFIG_SHELL="${CONFIG_SHELL-/bin/sh}"
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
- else
- # Try using printf.
- echo='printf %s\n'
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`("$ORIGINAL_CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL="$ORIGINAL_CONFIG_SHELL"
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- echo="$CONFIG_SHELL $0 --fallback-echo"
- elif echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`("$CONFIG_SHELL" "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- echo="$CONFIG_SHELL $0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
- if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null; then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "$0"'; then
- echo_test_string=`eval $prev`
-
- export echo_test_string
- exec "${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}}" "$0" ${1+"$@"}
- else
- # Oops. We lost completely, so just stick with echo.
- echo=echo
- fi
- fi
- fi
- fi
-fi
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# The name of this program.
-progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
-
-# Constants:
-PROGRAM=ltconfig
-PACKAGE=libtool
-VERSION=1.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"
-
-help="Try \`$progname --help' for more information."
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-enable_shared=yes
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-enable_static=yes
-enable_fast_install=yes
-enable_dlopen=unknown
-enable_win32_dll=no
-pic_mode=default
-ltmain=
-silent=
-srcdir=
-ac_config_guess=
-ac_config_sub=
-host=
-build=NONE
-nonopt=NONE
-ofile="$default_ofile"
-verify_host=yes
-tagname=
-with_gcc=no
-with_gnu_ld=no
-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=
-postdep_objects=
-predeps=
-postdeps=
-compiler_lib_search_path=
-
-## Link characteristics:
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-old_archive_from_expsyms_cmds=
-striplib=
-old_striplib=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_into_libs=no
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-link_all_deplibs=unknown
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# include_expsyms should be a list of space-separated symbols to be *always*
-# included in the symbol list
-include_expsyms=
-# exclude_expsyms can be an egrep regular expression of symbols to exclude
-# it will be wrapped by ` (' and `)$', so one must not match beginning or
-# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-# as well as any symbol that contains `d'.
-exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-# platforms (ab)use it in PIC code, but their linkers get confused if
-# the symbol is explicitly referenced. Since portable code cannot
-# rely on this symbol name, it's probably fine to never include it in
-# preloaded symbol tables.
-extract_expsyms_cmds=
-
-## Tools:
-old_AR="$AR"
-old_AR_FLAGS="$AR_FLAGS"
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-old_CPPFLAGS="$CPPFLAGS"
-old_LDFLAGS="$LDFLAGS"
-old_LIBS="$LIBS"
-old_MAGIC_CMD="$MAGIC_CMD"
-old_LD="$LD"
-old_LN_S="$LN_S"
-old_LTCC="$LTCC"
-old_NM="$NM"
-old_RANLIB="$RANLIB"
-old_STRIP="$STRIP"
-old_AS="$AS"
-old_DLLTOOL="$DLLTOOL"
-old_OBJDUMP="$OBJDUMP"
-old_OBJEXT="$OBJEXT"
-old_EXEEXT="$EXEEXT"
-old_reload_flag="$reload_flag"
-old_deplibs_check_method="$deplibs_check_method"
-old_file_magic_cmd="$file_magic_cmd"
-
-# Parse the command line options.
-args=
-prev=
-for option
-do
- case $option in
- -*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- eval "$prev=\$option"
- prev=
- continue
- fi
-
- case $option in
- --help) cat <<EOM
-Usage: $progname [OPTION]... LTMAIN [HOST]
-
-Generate a system-specific libtool script.
-
- --build configure for building on BUILD [BUILD=HOST]
- --debug enable verbose shell tracing
- --disable-shared do not build shared libraries
- --disable-static do not build static libraries
- --disable-fast-install do not optimize for fast installation
- --enable-dlopen enable dlopen support
- --enable-win32-dll enable building dlls on win32 hosts
- --help display this help and exit
- --no-verify do not verify that HOST is a valid host type
--o, --output=FILE specify the output file [default=$default_ofile]
- --quiet same as \`--silent'
- --silent do not print informational messages
- --srcdir=DIR find \`config.guess' in DIR
- --version output version information and exit
- --add-tag=TAG append an alternate configuration
- --with-gcc assume that the GNU C compiler will be used
- --with-gnu-ld assume that the C compiler uses the GNU linker
- --prefer-pic try to use only PIC objects
- --prefer-non-pic try to use only non-PIC objects
- --disable-lock disable file locking
- --cache-file=FILE configure cache file
-
-LTMAIN is the \`ltmain.sh' shell script fragment or \`ltmain.c' program
-that provides basic libtool functionality.
-
-HOST is the canonical host system name [default=guessed].
-EOM
- exit 0
- ;;
-
- --build) prev=build ;;
- --build=*) build="$optarg" ;;
-
- --debug)
- echo "$progname: enabling shell trace mode"
- set -x
- ;;
-
- --disable-shared) enable_shared=no ;;
-
- --disable-static) enable_static=no ;;
-
- --disable-fast-install) enable_fast_install=no ;;
-
- --enable-dlopen) enable_dlopen=yes ;;
-
- --enable-win32-dll) enable_win32_dll=yes ;;
-
- --quiet | --silent) silent=yes ;;
-
- --srcdir) prev=srcdir ;;
- --srcdir=*) srcdir="$optarg" ;;
-
- --no-verify) verify_host=no ;;
-
- --output | -o) prev=ofile ;;
- --output=*) ofile="$optarg" ;;
-
- --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"; exit 0 ;;
-
- --add-tag) prev=tagname ;;
- --add-tag=*) tagname="$optarg" ;;
-
- --with-gcc) with_gcc=yes ;;
- --with-gnu-ld) with_gnu_ld=yes ;;
-
- --prefer-pic) pic_mode=yes ;;
- --prefer-non-pic) pic_mode=no ;;
-
- --disable-lock) need_locks=no ;;
-
- --cache-file=*) cache_file="$optarg" ;;
-
- -*)
- echo "$progname: unrecognized option \`$option'" 1>&2
- echo "$help" 1>&2
- exit 1
- ;;
-
- *)
- if test -z "$ltmain"; then
- ltmain="$option"
- elif test -z "$host"; then
-# This generates an unnecessary warning for sparc-sun-solaris4.1.3_U1
-# if test -n "`echo $option| sed 's/[-a-z0-9.]//g'`"; then
-# echo "$progname: warning \`$option' is not a valid host type" 1>&2
-# fi
- host="$option"
- else
- echo "$progname: too many arguments" 1>&2
- echo "$help" 1>&2
- exit 1
- fi ;;
- esac
-done
-
-if test -z "$ltmain"; then
- echo "$progname: you must specify a LTMAIN file" 1>&2
- echo "$help" 1>&2
- exit 1
-fi
-
-if test ! -f "$ltmain"; then
- echo "$progname: \`$ltmain' does not exist" 1>&2
- echo "$help" 1>&2
- exit 1
-fi
-
-if test -n "$tagname"; then
- # Check whether tagname contains only valid characters
- case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
- "") ;;
- *)
- echo "$progname: invalid tag name: $tagname" 1>&2
- exit 1
- ;;
- esac
-
- if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$ofile" > /dev/null; then
- echo "$progname: tag name $tagname already exists" 1>&2
- exit 1
- fi
-
- if test ! -f "$ofile"; then
- echo "$progname: warning: output file \`$ofile' does not exist" 1>&2
- fi
-
- if test -z "$LTCC"; then
- eval "`$SHELL $ofile --config | grep '^LTCC='`"
- if test -z "$LTCC"; then
- echo "$progname: warning: output file \`$ofile' does not look like a libtool script" 1>&2
- else
- echo "$progname: warning: using \`LTCC=$LTCC', extracted from \`$ofile'" 1>&2
- fi
- fi
-fi
-
-# Quote any args containing shell metacharacters.
-ltconfig_args=
-for arg
-do
- case $arg in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ltconfig_args="$ltconfig_args '$arg'" ;;
- *) ltconfig_args="$ltconfig_args $arg" ;;
- esac
-done
-
-# A relevant subset of AC_INIT.
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 5 compiler messages saved in config.log
-# 6 checking for... messages and results
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>>./config.log
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-if test "X${LC_ALL+set}" = Xset; then LC_ALL=C; export LC_ALL; fi
-if test "X${LANG+set}" = Xset; then LANG=C; export LANG; fi
-
-if test -n "$cache_file" && test -r "$cache_file" && test -f "$cache_file"; then
- echo "loading cache $cache_file within ltconfig"
- . $cache_file
-fi
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
- fi
-else
- ac_n= ac_c='\c' ac_t=
-fi
-
-if test -z "$srcdir"; then
- # Assume the source directory is the same one as the path to LTMAIN.
- srcdir=`$echo "X$ltmain" | $Xsed -e 's%/[^/]*$%%'`
- test "$srcdir" = "$ltmain" && srcdir=.
-fi
-
-trap "$rm conftest*; exit 1" 1 2 15
-if test "$verify_host" = yes; then
- # Check for config.guess and config.sub.
- ac_aux_dir=
- for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
- if test -f $ac_dir/config.guess; then
- ac_aux_dir=$ac_dir
- break
- fi
- done
- if test -z "$ac_aux_dir"; then
- echo "$progname: cannot find config.guess in $srcdir $srcdir/.. $srcdir/../.." 1>&2
- echo "$help" 1>&2
- exit 1
- fi
- ac_config_guess=$ac_aux_dir/config.guess
- ac_config_sub=$ac_aux_dir/config.sub
-
- # Make sure we can run config.sub.
- if $SHELL $ac_config_sub sun4 >/dev/null 2>&1; then :
- else
- echo "$progname: cannot run $ac_config_sub" 1>&2
- echo "$help" 1>&2
- exit 1
- fi
-
- echo $ac_n "checking host system type""... $ac_c" 1>&6
-
- host_alias=$host
- 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
- # problems with it so do it this way for now.
- CC="$LTCC"
-
- if host_alias=`$SHELL $ac_config_guess`; then :
- else
- echo "$progname: cannot guess host type; you must specify one" 1>&2
- echo "$help" 1>&2
- exit 1
- fi
-
- # Restore the C compiler.
- CC="$old_CC"
- ;;
- esac
- host=`$SHELL $ac_config_sub $host_alias`
- echo "$ac_t$host" 1>&6
-
- # Make sure the host verified.
- test -z "$host" && exit 1
-
- # Check for the build system type
- echo $ac_n "checking build system type... $ac_c" 1>&6
-
- build_alias=$build
- case $build_alias in
- NONE)
- case $nonopt in
- NONE) build_alias=$host_alias ;;
- *) build_alias=$nonopt ;;
- esac ;;
- esac
-
- build=`$SHELL $ac_config_sub $build_alias`
- build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
- build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
- build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
- echo "$ac_t""$build" 1>&6
-
-elif test -z "$host"; then
- echo "$progname: you must specify a host type if you use \`--no-verify'" 1>&2
- echo "$help" 1>&2
- exit 1
-else
- host_alias=$host
- build_alias=$host_alias
- build=$host
-fi
-
-if test x"$host" != x"$build"; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-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
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-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
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
-fi
-
-# Source the script associated with the $tagname tag configuration.
-if test -n "$tagname"; then
- . $ltmain
-else
- # FIXME: We should use a variable here
- # Configure for a C compiler
- . $srcdir/ltcf-c.sh
-fi
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$NM" && NM=nm
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$objext" && objext=o
-
-echo $ac_n "checking for objdir... $ac_c" 1>&6
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-echo "$ac_t$objdir" 1>&6
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
-
-# We assume here that the value for ac_cv_prog_cc_pic will not be cached
-# 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: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
-else
- echo "$ac_t""$ac_cv_prog_cc_pic" 1>&6
-
- # 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: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
- else
- ac_cv_prog_cc_pic_works=yes
- $rm conftest*
- echo $lt_simple_compile_test_code > conftest.$ac_ext
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
- 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
- hpux9* | hpux10* | hpux11*)
- # On HP-UX, both CC and GCC only warn that PIC is supported... then
- # they create non-PIC objects. So, if there were any warnings, we
- # assume that PIC is not supported.
- if test -s conftest.err; then
- ac_cv_prog_cc_pic_works=no
- ac_cv_prog_cc_can_build_shared=no
- ac_cv_prog_cc_pic=
- else
- ac_cv_prog_cc_pic_works=yes
- ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
- fi
- ;;
- *)
- ac_cv_prog_cc_pic_works=yes
- ac_cv_prog_cc_pic=" $ac_cv_prog_cc_pic"
- ;;
- esac
- else
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- ac_cv_prog_cc_pic_works=no
- ac_cv_prog_cc_can_build_shared=no
- ac_cv_prog_cc_pic=
- fi
- CFLAGS="$save_CFLAGS"
- $rm conftest*
- fi
- # Belt *and* braces to stop my trousers falling down:
- if test "X$ac_cv_prog_cc_pic_works" = Xno; then
- ac_cv_prog_cc_pic=
- ac_cv_prog_cc_can_build_shared=no
- fi
- echo "$ac_t""$ac_cv_prog_cc_pic_works" 1>&6
-fi
-
-# Check for any special shared library compilation flags.
-if test -n "$ac_cv_prog_cc_shlib"; then
- echo "$progname: warning: \`$CC' requires \`$ac_cv_prog_cc_shlib' to build shared libraries" 1>&2
- if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$ac_cv_prog_cc_shlib[ ]" >/dev/null; then :
- else
- echo "$progname: add \`$ac_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
- ac_cv_prog_cc_can_build_shared=no
- fi
-fi
-
-echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
-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
-else
- $rm conftest*
- echo $lt_simple_link_test_code > conftest.$ac_ext
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
- 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
- ac_cv_prog_cc_static=
- fi
- LDFLAGS="$save_LDFLAGS"
- $rm conftest*
-fi
-# Belt *and* braces to stop my trousers falling down:
-if test "X$ac_cv_prog_cc_static_works" = Xno; then
- ac_cv_prog_cc_static=
-fi
-echo "$ac_t""$ac_cv_prog_cc_static_works" 1>&6
-pic_flag="$ac_cv_prog_cc_pic"
-special_shlib_compile_flags="$ac_cv_prog_cc_shlib"
-wl="$ac_cv_prog_cc_wl"
-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
-if test "${lt_cv_compiler_c_o+set}" = set; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- $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"
-if test "$compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- echo $ac_n "checking if we can lock with hard links... $ac_c" 1>&6
- hard_links=yes
- $rm conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- echo "$ac_t$hard_links" 1>&6
- $rm conftest*
- if test "$hard_links" = no; then
- echo "*** WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-if test "$with_gcc" = yes; then
- # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
- echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions ... $ac_c" 1>&6
- $rm conftest*
- echo $lt_simple_compile_test_code > conftest.$ac_ext
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
- 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
- if test -s conftest.err; then
- echo "$ac_t"no 1>&6
- compiler_rtti_exceptions=no
- else
- echo "$ac_t"yes 1>&6
- compiler_rtti_exceptions=yes
- fi
- else
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- compiler_rtti_exceptions=no
- echo "$ac_t"no 1>&6
- fi
- CFLAGS="$save_CFLAGS"
- $rm conftest*
-
- if test "$compiler_rtti_exceptions" = "yes"; then
- no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
- else
- no_builtin_flag=' -fno-builtin'
- fi
-
-fi
-
-# See if the linker supports building shared libraries.
-echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
-
-echo "$ac_t$ld_shlibs" 1>&6
-test "$ld_shlibs" = no && can_build_shared=no
-
-# Check hardcoding attributes.
-echo $ac_n "checking how to hardcode library paths into programs... $ac_c" 1>&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
- test -n "$runpath_var"; then
-
- # We can hardcode non-existant directories.
- if test "$hardcode_direct" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$hardcode_shlibpath_var" != no &&
- test "$hardcode_minus_L" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action=unsupported
-fi
-echo "$ac_t$hardcode_action" 1>&6
-
-echo $ac_n "checking whether stripping libraries is possible... $ac_c" 1>&6
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- echo "${ac_t}yes" 1>&6
-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
-
-# PORTME Fill in your ld.so characteristics
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-
-echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}.so$major'
- ;;
-
-aix4* | aix5*)
- version_type=linux
- 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*)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
- ;;
-
-beos*)
- library_names_spec='${libname}.so'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
-bsdi4*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- export_dynamic_flag_spec=-rdynamic
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32*)
- version_type=windows
- need_version=no
- need_lib_prefix=no
- 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'
- 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'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- lt_cv_dlopen="LoadLibrary"
- 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
- ;;
-
-freebsd*-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
- soname_spec='${libname}${release}.so${major}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU/FreeBSD ld.so'
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd*)
- objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
- need_version=no
- need_lc=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- *)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-kfreebsd*-gnu | knetbsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case "$host_cpu" in
- ia64*)
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
- soname_spec='${libname}${release}.sl$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-irix5* | irix6*)
- if test "$with_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi
- version_type=irix
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
- case $host_os in
- irix5*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-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'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
- soname_spec='${libname}${release}.so$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- 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
- need_lib_prefix=no
- need_version=no
- fi
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-os2*)
- libname_spec='$name'
- need_lib_prefix=no
- library_names_spec='$libname.dll $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_version=no
- soname_spec='${libname}${release}.so'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-sco3.2v5*)
- version_type=osf
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-tpf*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
- soname_spec='$libname.so.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-echo "$ac_t$dynamic_linker" 1>&6
-test "$dynamic_linker" = no && can_build_shared=no
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
-
-# Transform an extracted symbol line into a proper C declaration
-global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-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/^$symcode* .* \(.*\)$/extern char \1;/p'"
- ;;
-irix*)
- symcode='[BCDEGRST]'
- ;;
-solaris* | sysv5*)
- symcode='[BDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[ABCDGISTW]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Write the raw and C identifiers.
- 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
- $rm conftest*
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
-
- 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: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
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-EOF
- # Now generate the symbol file.
- eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
-
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{
-EOF
- sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr_t) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$objext conftstm.$objext
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo $progname:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
- pipe_works=yes
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- LIBS="$save_LIBS"
- else
- echo "cannot find nm_test_func in $nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&5
- fi
- else
- echo "cannot run $global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- $rm conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- global_symbol_pipe=
- fi
-done
-if test "$pipe_works" = yes; then
- echo "${ac_t}ok" 1>&6
-else
- echo "${ac_t}failed" 1>&6
-fi
-
-if test -z "$global_symbol_pipe"; then
- global_symbol_to_cdecl=
-fi
-
-# Report the final consequences.
-echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
-
-# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in
-# configure.in, otherwise build static only libraries.
-case $host_os in
-cygwin* | mingw* | pw32* | os2*)
- if test x$can_build_shared = xyes; then
- test x$enable_win32_dll = xno && can_build_shared=no
- echo "checking if package supports dlls... $can_build_shared" 1>&6
- fi
-;;
-esac
-
-echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
-aix4*)
- test "$enable_shared" = yes && enable_static=no
- ;;
-esac
-
-echo "$ac_t$enable_shared" 1>&6
-
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-
-echo "checking whether to build static libraries... $enable_static" 1>&6
-
-if test "$hardcode_action" = relink; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$with_gcc" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-# Check whether we must set pic_mode to default
-test -z "$pic_flag" && pic_mode=default
-
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-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: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 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. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-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
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if test "X$ac_cv_lib_dl_dlopen" = Xyes; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "$progname: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 1635 "ltconfig"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-dlopen();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo $progname: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
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_dlopen=no
-fi
-rm -f conftest*
-fi
-if test "X$ac_cv_func_dlopen" = Xyes; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="dlopen"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-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 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. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dlopen();
-
-int main() {
-dlopen()
-; return 0; }
-EOF
-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
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_lib_svld_dlopen=no
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-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 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. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char dld_link();
-
-int main() {
-dld_link()
-; return 0; }
-EOF
-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
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_lib_dld_dld_link=no
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if test "X$ac_cv_lib_dld_dld_link" = Xyes; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "$progname: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 1760 "ltconfig"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load(); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-shl_load();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo $progname: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
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_func_shl_load=no
-fi
-rm -f conftest*
-fi
-
-if test "X$ac_cv_func_shl_load" = Xyes; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="shl_load"
-else
- echo "$ac_t""no" 1>&6
-echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "$progname: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 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
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char shl_load();
-
-int main() {
-shl_load()
-; return 0; }
-EOF
-if { (eval echo $progname: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
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_lib_dld_shl_load=no
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if test "X$ac_cv_lib_dld_shl_load" = Xyes; then
- echo "$ac_t""yes" 1>&6
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-fi
-
-fi
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
-for ac_hdr in dlfcn.h; do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "$progname: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 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: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*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
- if test "x$ac_cv_header_dlfcn_h" = xyes; then
- CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
- fi
- eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "$progname: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
- if test "$cross_compiling" = yes; then
- lt_cv_dlopen_self=cross
- else
- cat > conftest.$ac_ext <<EOF
-#line 1918 "ltconfig"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-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: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
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- lt_cv_dlopen_self=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$lt_cv_dlopen_self" 1>&6
-
- if test "$lt_cv_dlopen_self" = yes; then
- LDFLAGS="$LDFLAGS $link_static_flag"
- echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "$progname: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
- if test "$cross_compiling" = yes; then
- lt_cv_dlopen_self_static=cross
- else
- cat > conftest.$ac_ext <<EOF
-#line 1992 "ltconfig"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LTDL_GLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LTDL_GLOBAL DL_GLOBAL
-# else
-# define LTDL_GLOBAL 0
-# endif
-#endif
-
-/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LTDL_LAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LTDL_LAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LTDL_LAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LTDL_LAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LTDL_LAZY_OR_NOW DL_NOW
-# else
-# define LTDL_LAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-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: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
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- lt_cv_dlopen_self_static=no
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
-fi
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-
-# Copy echo and quote the copy, instead of the original, because it is
-# used later.
-ltecho="$echo"
-if test "X$ltecho" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- ltecho="$CONFIG_SHELL \$0 --fallback-echo"
-fi
-LTSHELL="$SHELL"
-
-LTCONFIG_VERSION="$VERSION"
-
-# Only quote variables if we're using ltmain.sh.
-case $ltmain in
-*.sh)
- # Now quote all the things that may contain metacharacters.
- for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
- old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
- old_LN_S old_NM old_RANLIB old_STRIP \
- old_AS old_DLLTOOL old_OBJDUMP \
- old_OBJEXT old_EXEEXT old_reload_flag \
- old_deplibs_check_method old_file_magic_cmd \
- AR AR_FLAGS CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \
- reload_flag reload_cmds wl \
- pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
- thread_safe_flag_spec whole_archive_flag_spec libname_spec \
- library_names_spec soname_spec \
- RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
- old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
- postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
- predep_objects postdep_objects predeps postdeps compiler_lib_search_path \
- old_striplib striplib file_magic_cmd export_symbols_cmds \
- deplibs_check_method allow_undefined_flag no_undefined_flag \
- finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
- hardcode_libdir_flag_spec hardcode_libdir_separator \
- sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- compiler_c_o need_locks exclude_expsyms include_expsyms; do
-
- case $var in
- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
- extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
- postinstall_cmds | postuninstall_cmds | \
- finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
- # Double-quote double-evaled strings.
- eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ### testsuite: skip nested quoting test
- ;;
- *)
- eval "$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ### testsuite: skip nested quoting test
- ;;
- esac
- done
-
- case $ltecho in
- *'\$0 --fallback-echo"')
- ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
- ;;
- esac
-
- if test -z "$tagname"; then
- trap "$rm \"$ofile\"; exit 1" 1 2 15
- echo "creating $ofile"
- $rm "$ofile"
- cat <<EOF > "$ofile"
-#! $SHELL
-
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
-#
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="sed -e s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-### BEGIN LIBTOOL CONFIG
-EOF
- else
- echo "appending configuration tag \"$tagname\" to $ofile"
- echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
- fi
- cfgfile="$ofile"
- ;;
-
-*)
- # Double-quote the variables that need it (for aesthetics).
- for var in old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
- old_MAGIC_CMD old_LD old_LDFLAGS old_LIBS \
- old_LN_S old_NM old_RANLIB old_STRIP \
- old_AS old_DLLTOOL old_OBJDUMP \
- old_OBJEXT old_EXEEXT old_reload_flag \
- old_deplibs_check_method old_file_magic_cmd; do
- eval "$var=\\\"\$var\\\""
- done
-
- # Just create a config file.
- cfgfile="$ofile.cfg"
- if test -z "$tagname"; then
- trap "$rm \"$cfgfile\"; exit 1" 1 2 15
- echo "creating $cfgfile"
- $rm "$cfgfile"
- cat <<EOF > "$cfgfile"
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Libtool configuration file.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-
-### BEGIN LIBTOOL CONFIG
-EOF
- else
- echo "appending to $cfgfile"
- echo "### BEGIN LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
- fi
- ;;
-esac
-
-cat <<EOF >> "$cfgfile"
-# Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# AR=$old_AR AR_FLAGS=$old_AR_FLAGS LTCC=$old_LTCC CC=$old_CC \\
-# CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
-# MAGIC_CMD=$old_MAGIC_CMD LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
-# LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\
-# AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\
-# objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\
-# deplibs_check_method=$old_deplibs_check_method \\
-# file_magic_cmd=$old_file_magic_cmd \\
-# $0$ltconfig_args
-#
-# Compiler and other test output produced by $progname, useful for
-# debugging $progname, is in ./config.log if it exists.
-
-# The version of $progname that generated this script.
-LTCONFIG_VERSION=$LTCONFIG_VERSION
-
-# Shell to use when invoking shell scripts.
-SHELL=$LTSHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$need_lc
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-
-# An echo program that does not interpret backslashes.
-echo=$ltecho
-
-# The archiver.
-AR=$AR
-AR_FLAGS=$AR_FLAGS
-
-# A C compiler.
-LTCC=$LTCC
-
-# A language-specific compiler.
-CC=$CC
-
-# Is the compiler the GNU C compiler?
-with_gcc=$with_gcc
-
-# The linker used to build libraries.
-LD=$LD
-
-# Whether we need hard or soft links.
-LN_S=$LN_S
-
-# A BSD-compatible nm program.
-NM=$NM
-
-# A symbol stripping program
-STRIP=$STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# How to create reloadable object files.
-reload_flag=$reload_flag
-reload_cmds=$reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$wl
-
-# Object file suffix (normally "o").
-objext="$objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$pic_flag
-pic_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
-
-# Must we lock files when doing compilation ?
-need_locks=$need_locks
-
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$link_static_flag
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$no_builtin_flag
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$whole_archive_flag_spec
-
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$thread_safe_flag_spec
-
-# Library versioning type.
-version_type=$version_type
-
-# Format of library name prefix.
-libname_spec=$libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$soname_spec
-
-# Commands used to build and install an old-style archive.
-RANLIB=$RANLIB
-old_archive_cmds=$old_archive_cmds
-old_postinstall_cmds=$old_postinstall_cmds
-old_postuninstall_cmds=$old_postuninstall_cmds
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$old_archive_from_expsyms_cmds
-
-# Commands used to build and install a shared archive.
-archive_cmds=$archive_cmds
-archive_expsym_cmds=$archive_expsym_cmds
-postinstall_cmds=$postinstall_cmds
-postuninstall_cmds=$postuninstall_cmds
-
-# Commands to strip libraries.
-old_striplib=$old_striplib
-striplib=$striplib
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=$predep_objects
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=$postdep_objects
-
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$predeps
-
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$postdeps
-
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=$compiler_lib_search_path
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$deplibs_check_method
-
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$file_magic_cmd
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$allow_undefined_flag
-
-# Flag that forces no undefined symbols.
-no_undefined_flag=$no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$global_symbol_to_cdecl
-
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
-
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$hardcode_libdir_flag_spec
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$hardcode_libdir_separator
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=$sys_lib_search_path_spec
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$export_symbols_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$include_expsyms
-
-EOF
-
-if test -z "$tagname"; then
- echo '### END LIBTOOL CONFIG' >> "$ofile"
-else
- echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
-fi
-
-case $ltmain in
-*.sh)
- echo >> "$ofile"
- if test -z "$tagname"; then
- case $host_os in
- aix3*)
- cat <<\EOF >> "$ofile"
-
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-EOF
- ;;
- esac
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- cat <<'EOF' >> "$ofile"
- # This is a source program that is used to create dlls on Windows
- # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
- # This is a source program that is used to create import libraries
- # on Windows for dlls which lack them. Don't remove nor modify the
- # starting and closing comments
-# /* impgen.c starts here */
-# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
-#
-# This file is part of GNU libtool.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-# */
-#
-# #include <stdio.h> /* for printf() */
-# #include <unistd.h> /* for open(), lseek(), read() */
-# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
-# #include <string.h> /* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[2];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 2);
-# return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[4];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 4);
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-# void *ptr;
-# {
-# unsigned char *b = ptr;
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-# int argc;
-# char *argv[];
-# {
-# int dll;
-# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-# unsigned long export_rva, export_size, nsections, secptr, expptr;
-# unsigned long name_rvas, nexp;
-# unsigned char *expdata, *erva;
-# char *filename, *dll_name;
-#
-# filename = argv[1];
-#
-# dll = open(filename, O_RDONLY|O_BINARY);
-# if (dll < 1)
-# return 1;
-#
-# dll_name = filename;
-#
-# for (i=0; filename[i]; i++)
-# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
-# dll_name = filename + i +1;
-#
-# pe_header_offset = pe_get32 (dll, 0x3c);
-# opthdr_ofs = pe_header_offset + 4 + 20;
-# num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-# if (num_entries < 1) /* no exports */
-# return 1;
-#
-# export_rva = pe_get32 (dll, opthdr_ofs + 96);
-# export_size = pe_get32 (dll, opthdr_ofs + 100);
-# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-# secptr = (pe_header_offset + 4 + 20 +
-# pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-# expptr = 0;
-# for (i = 0; i < nsections; i++)
-# {
-# char sname[8];
-# unsigned long secptr1 = secptr + 40 * i;
-# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# lseek(dll, secptr1, SEEK_SET);
-# read(dll, sname, 8);
-# if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# {
-# expptr = fptr + (export_rva - vaddr);
-# if (export_rva + export_size > vaddr + vsize)
-# export_size = vsize - (export_rva - vaddr);
-# break;
-# }
-# }
-#
-# expdata = (unsigned char*)malloc(export_size);
-# lseek (dll, expptr, SEEK_SET);
-# read (dll, expdata, export_size);
-# erva = expdata - export_rva;
-#
-# nexp = pe_as32 (expdata+24);
-# name_rvas = pe_as32 (expdata+32);
-#
-# printf ("EXPORTS\n");
-# for (i = 0; i<nexp; i++)
-# {
-# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-# }
-#
-# return 0;
-# }
-# /* impgen.c ends here */
-
-EOF
- ;;
- esac
-
-
- # Append the ltmain.sh script.
- sed '$q' "$ltmain" >> "$ofile" || (rm -f "$ofile"; exit 1)
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
-
- chmod +x "$ofile"
- fi
- ;;
-
-*)
- # Compile the libtool program.
- echo "FIXME: would compile $ltmain"
- ;;
-esac
-
-# Update the list of available tags.
-if test -n "$tagname"; then
-
- # Extract list of available tagged configurations in $ofile.
- # Note that this assumes the entire list is on one line.
- available_tags=`grep "^available_tags=" $ofile | sed -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
-
- # Append the new tag name to the list of available tags.
- available_tags="$available_tags $tagname"
-
- # Now substitute the updated of available tags.
- if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' ${ofile} > ${ofile}.new"; then
- mv ${ofile}.new ${ofile}
- chmod +x "$ofile"
- else
- rm -f ${ofile}.new
- echo "$progname: unable to update list of available tagged configurations."
- exit 1
- fi
-fi
-
-# Don't cache tagged configuration!
-test -n "$cache_file" && test -z "$tagname" || exit 0
-
-# AC_CACHE_SAVE
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-
-exit 0
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
diff --git a/contrib/binutils/ltgcc.m4 b/contrib/binutils/ltgcc.m4
new file mode 100644
index 0000000..fb7b6ee
--- /dev/null
+++ b/contrib/binutils/ltgcc.m4
@@ -0,0 +1,60 @@
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'. Locally modified to
+# run its tests on C programs, because we cannot link Java programs until
+# we have finished building libjava.
+AC_DEFUN([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=c
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+_LT_TAGVAR(compiler, $1)=${GCJ-gcj}
+AC_LANG_RESTORE
+])# _LT_LANG_GCJ_CONFIG
diff --git a/contrib/binutils/ltmain.sh b/contrib/binutils/ltmain.sh
index d5173bc..8ee3afc 100644
--- a/contrib/binutils/ltmain.sh
+++ b/contrib/binutils/ltmain.sh
@@ -1,10 +1,12 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun ltconfig.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
+# Generated from ltmain.m4sh; do not edit by hand
+
+# ltmain.sh (GNU libtool 1.2435 2007/03/18 18:44:42) 2.1a
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
# 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
@@ -24,19 +26,483 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Check that we have a working $echo.
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool 1.2435 2007/03/18 18:44:42) 2.1a
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.1a
+TIMESTAMP=" 1.2435 2007/03/18 18:44:42"
+package_revision=1.2435
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+progname=`$ECHO "X$progpath" | $Xsed -e "$basename" -e 's,^-,./-,'`
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=`$ECHO "X$progpath" | $Xsed -e "$dirname"`
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"}
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "X$1" | $Xsed \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test "X$1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
- # Yippee, $echo works!
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
:
else
- # Restart under the correct shell, and then maybe $echo will work.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
fi
if test "X$1" = X--fallback-echo; then
@@ -45,426 +511,1190 @@ if test "X$1" = X--fallback-echo; then
cat <<EOF
$*
EOF
- exit 0
+ exit $EXIT_SUCCESS
fi
-# The name of this program.
-progname=`$echo "$0" | sed 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-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."
magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-SP2NL='tr \040 \012'
-NL2SP='tr \015\012 \040\040'
-
-# NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-if test "${LC_ALL+set}" = set; then
- save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
-fi
-if test "${LANG+set}" = set; then
- save_LANG="$LANG"; LANG=C; export LANG
-fi
-if test "$LTCONFIG_VERSION" != "$VERSION"; then
- echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
-fi
-
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- echo "$modename: not configured to build any kind of library" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
-fi
# Global variables.
-mode=$default_mode
+# $mode is unset
nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
execute_dlfiles=
+preserve_args=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
-taglist=
-
-# Parse our command line options once, thoroughly.
-while test $# -gt 0
-do
- arg="$1"
- shift
+extracted_archives=
+extracted_serial=0
- case $arg in
- -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
- esac
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- execute_dlfiles)
- execute_dlfiles="$execute_dlfiles $arg"
- ;;
- tag)
- tagname="$arg"
-
- # Check whether tagname contains only valid characters
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- echo "$progname: invalid tag name: $tagname" 1>&2
- exit 1
- ;;
- esac
+# 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=
- case $tagname in
- CC)
- # Don't test for the "default" C tag, as we know, it's there, but
- # not specially marked.
- taglist="$taglist $tagname"
- ;;
- *)
- 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"
- ;;
- esac
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
- prev=
- prevopt=
- continue
- fi
- # Have we seen a non-optional argument yet?
- case $arg in
- --help)
- show_help=yes
- ;;
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
- --version)
- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- exit 0
- ;;
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
- --config)
- sed -n -e '/^### BEGIN LIBTOOL CONFIG/,/^### END LIBTOOL CONFIG/p' < "$0"
# Now print the configurations for the tags.
for tagname in $taglist; do
- sed -n -e "/^### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^### END LIBTOOL TAG CONFIG: $tagname$/p" < "$0"
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
done
- exit 0
- ;;
- --debug)
- echo "$progname: enabling shell trace mode"
- set -x
- ;;
-
- --dry-run | -n)
- run=:
- ;;
+ exit $?
+}
- --features)
- echo "host: $host"
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ $ECHO "host: $host"
if test "$build_libtool_libs" = yes; then
- echo "enable shared libraries"
+ $ECHO "enable shared libraries"
else
- echo "disable shared libraries"
+ $ECHO "disable shared libraries"
fi
if test "$build_old_libs" = yes; then
- echo "enable static libraries"
+ $ECHO "enable static libraries"
else
- echo "disable static libraries"
+ $ECHO "disable static libraries"
fi
- exit 0
- ;;
- --finish) mode="finish" ;;
+ exit $?
+}
- --mode) prevopt="--mode" prev=mode ;;
- --mode=*) mode="$optarg" ;;
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
- --quiet | --silent)
- show=:
- ;;
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
- --tag) prevopt="--tag" prev=tag ;;
- --tag=*)
- set tag "$optarg" ${1+"$@"}
- shift
- prev=tag
- ;;
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
- -dlopen)
- prevopt="-dlopen"
- prev=execute_dlfiles
- ;;
- -*)
- $echo "$modename: unrecognized option \`$arg'" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
- *)
- nonopt="$arg"
- break
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+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
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -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
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -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
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+# Generated shell functions inserted here.
+
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
;;
esac
-done
-if test -n "$prevopt"; then
- $echo "$modename: option \`$prevopt' requires an argument" 1>&2
- $echo "$help" 1>&2
- exit 1
-fi
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
-# 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=
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ # Valid mode arguments:
+ clean) ;;
+ compile) ;;
+ execute) ;;
+ finish) ;;
+ install) ;;
+ link) ;;
+ relink) ;;
+ uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
-if test -z "$show_help"; then
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
- # Infer the operation mode.
- if test -z "$mode"; then
- case $nonopt in
- *cc | *++ | gcc* | *-gcc*)
- mode=link
- for arg
- do
- case $arg in
- -c)
- mode=compile
- break
- ;;
- esac
- done
- ;;
- *db | *dbx | *strace | *truss)
- mode=execute
- ;;
- *install*|cp|mv)
- mode=install
- ;;
- *rm)
- mode=uninstall
+ case $host in
+ *cygwin* | *mingw* | *pw32*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
;;
*)
- # If we have no mode, but dlfiles were specified, then do execute mode.
- test -n "$execute_dlfiles" && mode=execute
+ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+ ;;
+ esac
- # Just use the default operation mode.
- if test -z "$mode"; then
- if test -n "$nonopt"; then
- $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
- else
- $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
- fi
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
fi
- ;;
- esac
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+{
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
fi
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
# Only execute mode is allowed to have -dlopen flags.
if test -n "$execute_dlfiles" && test "$mode" != execute; then
- $echo "$modename: unrecognized option \`-dlopen'" 1>&2
- $echo "$help" 1>&2
- exit 1
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
fi
# Change the help message to a mode-specific one.
generic_help="$help"
- help="Try \`$modename --help --mode=$mode' for more information."
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
- # These modes are in order of execution frequency so that they run quickly.
- case $mode in
- # libtool compile mode
- compile)
- modename="$modename: compile"
- # Get the compilation command and the source file.
- base_compile=
- prev=
- lastarg=
- srcfile="$nonopt"
- suppress_output=
- user_target=no
- for arg
- do
- case $prev in
- "") ;;
- xcompiler)
- # Aesthetically quote the previous argument.
- prev=
- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
- 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.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -r "$1" && exec 5<&1 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 1<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
- # Add the previous argument to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_lalib_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
fi
- continue
;;
esac
+ fi
+}
- # Accept any command-line options.
- case $arg in
- -o)
- if test "$user_target" != "no"; then
- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
- exit 1
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_echo "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_echo "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_echo "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin | *mingw* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
fi
- user_target=next
- ;;
- -static)
- build_old_libs=yes
- continue
- ;;
+ for dlprefile in $dlprefiles; do
+ func_echo "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ done
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
- lastarg=
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
- # 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
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
;;
esac
- lastarg="$lastarg $arg"
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
done
- IFS="$save_ifs"
- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
- # Add the arguments to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
- continue
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" 'exit $?'
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ extracted_serial=`expr $extracted_serial + 1`
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
- case $user_target in
- next)
- # The next one is the -o target name
- user_target=yes
- continue
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_echo "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename $darwin_archive`
+ darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_echo "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ lipo -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
;;
- yes)
- # We got the output file
- user_target=set
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ mv -f "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
libobj="$arg"
+ arg_mode=normal
continue
;;
- esac
- # Accept the current argument as the source file.
- lastarg="$srcfile"
- srcfile="$arg"
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
- # Aesthetically quote the previous argument.
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
- # Backslashify any backslashes, double quotes, and dollar signs.
- # These are the only characters that are still specially
- # interpreted inside of double-quoted scrings.
- lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
- # 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
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- lastarg="\"$lastarg\""
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
;;
- esac
+ esac # case $arg_mode
- # Add the previous argument to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
- done
+ # Aesthetically quote the previous argument.
+ func_quote_for_eval "$lastarg"
+ base_compile="$base_compile $func_quote_for_eval_result"
+ done # for arg
- case $user_target in
- set)
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
;;
- no)
- # Get the name of the library object.
- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
;;
*)
- $echo "$modename: you must specify a target with \`-o'" 1>&2
- exit 1
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
;;
esac
# Recognize several different file suffixes.
# If the user specifies -o file.o, it is replaced with file.lo
- xform='[cCFSfmso]'
+ xform='[cCFSifmso]'
case $libobj in
*.ada) xform=ada ;;
*.adb) xform=adb ;;
@@ -472,82 +1702,66 @@ if test -z "$show_help"; then
*.asm) xform=asm ;;
*.c++) xform=c++ ;;
*.cc) xform=cc ;;
+ *.ii) xform=ii ;;
*.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
- *.f90) xform=f90 ;;
+ *.[fF][09]?) xform='[fF][09].' ;;
*.for) xform=for ;;
*.java) xform=java ;;
+ *.obj) xform=obj ;;
esac
- libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+ libobj=`$ECHO "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
case $libobj in
- *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
*)
- $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
- exit 1
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
;;
esac
- # Infer tagged configuration to use if any are available and
- # if one wasn't chosen via the "--tag" command line option.
- # Only attempt this if the compiler in the base compile
- # command doesn't match the default compiler.
- if test -n "$available_tags" && test -z "$tagname"; then
- case $base_compile in
- "$CC "*) ;;
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when ltconfig was run.
- "`$echo $CC` "*) ;;
- *)
- for z in $available_tags; do
- if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
- # Evaluate the configuration.
- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
- case $base_compile in
- "$CC "*)
- # The compiler in the base compile command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- "`$echo $CC` "*)
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- echo "$modename: unable to infer tagged configuration"
- echo "$modename: specify a tag with \`--tag'" 1>&2
- exit 1
-# else
-# echo "$modename: using $tagname tagged configuration"
- fi
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
;;
esac
- fi
+ done
- objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir=
- else
- xdir=$xdir/
- fi
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_basename "$obj"
+ objname="$func_basename_result"
+ func_dirname "$obj" "/" ""
+ xdir="$func_dirname_result"
lobj=${xdir}$objdir/$objname
- if test -z "$base_compile"; then
- $echo "$modename: you must specify a compilation command" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
# Delete any leftover library objects.
if test "$build_old_libs" = yes; then
@@ -556,8 +1770,8 @@ if test -z "$show_help"; then
removelist="$lobj $libobj ${libobj}T"
fi
- $run $rm $removelist
- trap "$run $rm $removelist; exit 1" 1 2 15
+ $opt_dry_run || $RM $removelist
+ trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
@@ -565,7 +1779,7 @@ if test -z "$show_help"; then
pic_mode=default
;;
esac
- if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
# non-PIC code in shared libraries is not supported
pic_mode=default
fi
@@ -573,10 +1787,10 @@ if test -z "$show_help"; then
# Calculate the filename of the output object if compiler does
# not support -o with -c
if test "$compiler_c_o" = no; then
- output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
lockfile="$output_obj.lock"
removelist="$removelist $output_obj $lockfile"
- trap "$run $rm $removelist; exit 1" 1 2 15
+ trap "$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE" 1 2 15
else
output_obj=
need_locks=no
@@ -586,13 +1800,13 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$0" "$lockfile" 2>/dev/null; do
- $show "Waiting for $lockfile to be removed"
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
sleep 2
done
elif test "$need_locks" = warn; then
if test -f "$lockfile"; then
- echo "\
+ $ECHO "\
*** ERROR, $lockfile exists and contains:
`cat $lockfile 2>/dev/null`
@@ -603,29 +1817,19 @@ repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
- $run $rm $removelist
- exit 1
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
fi
- echo $srcfile > "$lockfile"
+ $ECHO "$srcfile" > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
- $run $rm "$libobj" "${libobj}T"
-
- # Create a libtool object file (analogous to a ".la" file),
- # but don't create it if we're doing a dry run.
- test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
+ $opt_dry_run || $RM "$libobj" "${libobj}T"
# Only build a PIC object if we are building libtool libraries.
if test "$build_libtool_libs" = yes; then
@@ -633,38 +1837,27 @@ EOF
fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then
- command="$base_compile $srcfile $pic_flag"
+ command="$base_compile $qsrcfile $pic_flag"
else
# Don't build PIC code
- command="$base_compile $srcfile"
+ command="$base_compile $qsrcfile"
fi
- if test ! -d ${xdir}$objdir; then
- $show "$mkdir ${xdir}$objdir"
- $run $mkdir ${xdir}$objdir
- status=$?
- if test $status -ne 0 && test ! -d ${xdir}$objdir; then
- exit $status
- fi
- fi
+ func_mkdir_p "$xdir$objdir"
if test -z "$output_obj"; then
- # Place PIC objects in $objdir
- command="$command -o $lobj"
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
fi
- $run $rm "$lobj" "$output_obj"
+ $opt_dry_run || $RM "$lobj" "$output_obj"
- $show "$command"
- if $run eval "$command"; then :
- else
- test -n "$output_obj" && $run $rm $removelist
- exit 1
- fi
+ func_show_eval "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
if test "$need_locks" = warn &&
- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
- echo "\
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
@@ -678,45 +1871,29 @@ repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
- $run $rm $removelist
- exit 1
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
fi
# Just move the object if needed, then go on to compile the next one
- if test -n "$output_obj" && test "x$output_obj" != "x$lobj"; then
- $show "$mv $output_obj $lobj"
- if $run $mv $output_obj $lobj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
fi
- # Append the name of the PIC object to the libtool object file.
- test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
# Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
- else
- # No PIC object so indicate it doesn't exist in the libtool
- # object file.
- test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
fi
# Only build a position-dependent object if we build old libraries.
if test "$build_old_libs" = yes; then
if test "$pic_mode" != yes; then
# Don't build PIC code
- command="$base_compile $srcfile"
+ command="$base_compile $qsrcfile$pie_flag"
else
- command="$base_compile $srcfile $pic_flag"
+ command="$base_compile $qsrcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
command="$command -o $obj"
@@ -724,17 +1901,13 @@ EOF
# Suppress compiler output if we already did a PIC compilation.
command="$command$suppress_output"
- $run $rm "$obj" "$output_obj"
- $show "$command"
- if $run eval "$command"; then :
- else
- $run $rm $removelist
- exit 1
- fi
+ $opt_dry_run || $RM "$obj" "$output_obj"
+ func_show_eval "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
if test "$need_locks" = warn &&
- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
- echo "\
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
@@ -748,57 +1921,684 @@ repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."
- $run $rm $removelist
- exit 1
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
fi
# Just move the object if needed
- if test -n "$output_obj" && test "x$output_obj" != "x$obj"; then
- $show "$mv $output_obj $obj"
- if $run $mv $output_obj $obj; then :
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
else
- error=$?
- $run $rm $removelist
- exit $error
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
fi
+ done
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
-EOF
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_p "$file"; then
+ func_source "$file"
+
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
else
- # Append the name of the non-PIC object the libtool object file.
- # Only append if the libtool object file exists.
- test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ $ECHO "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
-EOF
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
fi
- $run $mv "${libobj}T" "${libobj}"
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $run $rm "$lockfile"
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $ECHO "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ $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 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"
+ $ECHO " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
+ $ECHO " during linking"
fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
- exit 0
- ;;
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $ECHO
- # libtool link mode
- link | relink)
- modename="$modename: link"
+ $ECHO "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ $ECHO "pages."
+ ;;
+ *)
+ $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname "$dest" "" "."
+ destdir="$func_dirname_result"
+ func_basename "$dest"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin*|*mingw*)
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
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
# which system we are compiling for in order to pass an extra
- # flag for every libtool invokation.
+ # flag for every libtool invocation.
# allow_undefined=no
# FIXME: Unfortunately, there are problems with the above when trying
@@ -812,10 +2612,10 @@ EOF
allow_undefined=yes
;;
esac
- libtool_args="$nonopt"
- base_compile="$nonopt"
- compile_command="$nonopt"
- finalize_command="$nonopt"
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
compile_rpath=
finalize_rpath=
@@ -829,6 +2629,8 @@ EOF
linker_flags=
dllsearchpath=
lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
avoid_version=no
dlfiles=
@@ -844,6 +2646,7 @@ EOF
no_install=no
objs=
non_pic_objects=
+ precious_files_regex=
prefer_static_libs=no
preload=no
prev=
@@ -855,27 +2658,50 @@ EOF
temp_rpath=
thread_safe=no
vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
# We need to know -static, to get the right output filenames.
for arg
do
case $arg in
- -all-static | -static)
- if test "X$arg" = "X-all-static"; then
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+ func_warning "complete static linking is impossible in this configuration"
fi
if test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
fi
- else
+ prefer_static_libs=yes
+ ;;
+ -static)
if test -z "$pic_flag" && test -n "$link_static_flag"; then
dlopen_self=$dlopen_self_static
fi
- fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
build_libtool_libs=no
build_old_libs=yes
- prefer_static_libs=yes
break
;;
esac
@@ -885,24 +2711,19 @@ EOF
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
# Go through the arguments, transforming them on the way.
- while test $# -gt 0; do
+ while test "$#" -gt 0; do
arg="$1"
- base_compile="$base_compile $arg"
shift
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
- ;;
- *) qarg=$arg ;;
- esac
- libtool_args="$libtool_args $qarg"
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
case $prev in
output)
- compile_command="$compile_command @OUTPUT@"
- finalize_command="$finalize_command @OUTPUT@"
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
;;
esac
@@ -910,8 +2731,8 @@ EOF
dlfiles|dlprefiles)
if test "$preload" = no; then
# Add the symbol object into the linking commands.
- compile_command="$compile_command @SYMFILE@"
- finalize_command="$finalize_command @SYMFILE@"
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
preload=yes
fi
case $arg in
@@ -949,10 +2770,8 @@ EOF
;;
expsyms)
export_symbols="$arg"
- if test ! -f "$arg"; then
- $echo "$modename: symbol file \`$arg' does not exist"
- exit 1
- fi
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
prev=
continue
;;
@@ -961,115 +2780,127 @@ EOF
prev=
continue
;;
- release)
- release="-$arg"
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
prev=
continue
;;
objectlist)
if test -f "$arg"; then
- save_arg=$arg
+ save_arg=$arg
moreargs=
- for fil in `cat $save_arg`
+ for fil in `cat "$save_arg"`
do
# moreargs="$moreargs $fil"
- arg=$fil
- # A libtool-controlled object.
+ 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 func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ 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
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ 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.
+ func_append 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
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
fi
done
else
- $echo "$modename: link input file \`$save_arg' does not exist"
- exit 1
+ func_fatal_error "link input file \`$arg' does not exist"
fi
- arg=$save_arg
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
prev=
continue
;;
@@ -1078,8 +2909,7 @@ EOF
case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit 1
+ func_fatal_error "only absolute run-paths are allowed"
;;
esac
if test "$prev" = rpath; then
@@ -1096,19 +2926,37 @@ EOF
prev=
continue
;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
xcompiler)
compiler_flags="$compiler_flags $qarg"
prev=
- compile_command="$compile_command $qarg"
- finalize_command="$finalize_command $qarg"
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
continue
;;
xlinker)
linker_flags="$linker_flags $qarg"
compiler_flags="$compiler_flags $wl$qarg"
prev=
- compile_command="$compile_command $wl$qarg"
- finalize_command="$finalize_command $wl$qarg"
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
continue
;;
*)
@@ -1117,23 +2965,19 @@ EOF
continue
;;
esac
- fi # test -n $prev
+ fi # test -n "$prev"
prevarg="$arg"
case $arg in
-all-static)
- if test -n "$link_static_flag"; then
- compile_command="$compile_command $link_static_flag"
- finalize_command="$finalize_command $link_static_flag"
- fi
+ # The effects of -all-static are defined in a previous loop.
continue
;;
-allow-undefined)
# FIXME: remove this flag sometime in the future.
- $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
- continue
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
;;
-avoid-version)
@@ -1158,8 +3002,7 @@ EOF
-export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: more than one -exported-symbols argument is not allowed"
- exit 1
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
fi
if test "X$arg" = "X-export-symbols"; then
prev=expsyms
@@ -1169,29 +3012,38 @@ EOF
continue
;;
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
# The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
# so, if we see these flags be careful not to treat them like -L
-L[A-Z][A-Z]*:*)
case $with_gcc/$host in
- no/*-*-irix*)
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
;;
esac
continue
;;
-L*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
- fi
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
dir="$absdir"
;;
esac
@@ -1204,10 +3056,15 @@ EOF
esac
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
continue
@@ -1216,15 +3073,39 @@ EOF
-l*)
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
- *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
# These systems don't actually have a C or math library (as such)
continue
;;
- *-*-mingw* | *-*-os2*)
+ *-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
fi
deplibs="$deplibs $arg"
continue
@@ -1235,6 +3116,33 @@ EOF
continue
;;
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
-no-fast-install)
fast_install=no
continue
@@ -1245,8 +3153,8 @@ EOF
*-*-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.
- $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
- $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
fast_install=no
;;
*) no_install=yes ;;
@@ -1266,6 +3174,11 @@ EOF
-o) prev=output ;;
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
-release)
prev=release
continue
@@ -1282,13 +3195,13 @@ EOF
;;
-R*)
- dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
- $echo "$modename: only absolute run-paths are allowed" 1>&2
- exit 1
+ func_fatal_error "only absolute run-paths are allowed"
;;
esac
case "$xrpath " in
@@ -1298,7 +3211,17 @@ EOF
continue
;;
- -static)
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
# 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
@@ -1317,41 +3240,48 @@ EOF
continue
;;
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
-Wc,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
arg=
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
+ save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $flag"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
done
IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
;;
-Wl,*)
- args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
arg=
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
+ save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
- case $flag in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- flag="\"$flag\""
- ;;
- esac
- arg="$arg $wl$flag"
- compiler_flags="$compiler_flags $wl$flag"
- linker_flags="$linker_flags $flag"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$linker_flags $func_quote_for_eval_result"
done
IFS="$save_ifs"
- arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
;;
-Xcompiler)
@@ -1364,16 +3294,35 @@ EOF
continue
;;
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
# Some other compiler flag.
-* | +*)
- # 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
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
;;
*.$objext)
@@ -1385,92 +3334,82 @@ EOF
# 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
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ 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
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
+ 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
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
+ # 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
+ if test "$prev" = dlprefiles; then
# Preload the old-style object.
dlprefiles="$dlprefiles $pic_object"
prev=
- fi
+ fi
- # A PIC object.
- libobjs="$libobjs $pic_object"
+ # A PIC object.
+ func_append libobjs " $pic_object"
arg="$pic_object"
- fi
+ fi
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
+ # 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/"
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
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
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
fi
;;
@@ -1502,113 +3441,51 @@ 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
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
;;
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"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
fi
done # argument parsing loop
- if test -n "$prev"; then
- $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- # Infer tagged configuration to use if any are available and
- # if one wasn't chosen via the "--tag" command line option.
- # Only attempt this if the compiler in the base link
- # command doesn't match the default compiler.
- if test -n "$available_tags" && test -z "$tagname"; then
- case $base_compile in
- "$CC "*) ;;
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when ltconfig was run.
- "`$echo $CC` "*) ;;
- *)
- for z in $available_tags; do
- if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
- # Evaluate the configuration.
- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`"
- case $base_compile in
- "$CC "*)
- # The compiler in $compile_command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- "`$echo $CC` "*)
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- echo "$modename: unable to infer tagged configuration"
- echo "$modename: specify a tag with \`--tag'" 1>&2
- exit 1
-# else
-# echo "$modename: using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
eval arg=\"$export_dynamic_flag_spec\"
- compile_command="$compile_command $arg"
- finalize_command="$finalize_command $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
fi
+ oldlibs=
# calculate the name of the file, without its directory
- outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ func_basename "$output"
+ outputname="$func_basename_result"
libobjs_save="$libobjs"
if test -n "$shlibpath_var"; then
# get the directories listed in $shlibpath_var
- eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
else
shlib_search_path=
fi
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
- output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$output_objdir" = "X$output"; then
- output_objdir="$objdir"
- else
- output_objdir="$output_objdir/$objdir"
- fi
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
# Create the object directory.
- if test ! -d $output_objdir; then
- $show "$mkdir $output_objdir"
- $run $mkdir $output_objdir
- status=$?
- if test $status -ne 0 && test ! -d $output_objdir; then
- exit $status
- fi
- fi
+ func_mkdir_p "$output_objdir"
# Determine the type of output
case $output in
"")
- $echo "$modename: you must specify an output file" 1>&2
- $echo "$help" 1>&2
- exit 1
+ func_fatal_help "you must specify an output file"
;;
*.$libext) linkmode=oldlib ;;
*.lo | *.$objext) linkmode=obj ;;
@@ -1617,29 +3494,34 @@ EOF
esac
specialdeplibs=
+
libs=
# Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la)
for deplib in $deplibs; do
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
+ if $opt_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
libs="$libs $deplib"
done
- if test $linkmode = lib; then
+ 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
+ if $opt_duplicate_compiler_generated_deps; then
+ 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
+ fi
pre_post_deps=
fi
@@ -1649,15 +3531,15 @@ EOF
need_relink=no # whether we're linking any 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"
+ passes="conv dlpreopen link"
for file in $dlfiles $dlprefiles; do
case $file in
*.la) ;;
*)
- $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
- exit 1
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
;;
esac
done
@@ -1673,40 +3555,98 @@ EOF
*) passes="conv"
;;
esac
+
for pass in $passes; do
- if test $linkmode = prog; then
- # Determine which files to process
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
case $pass in
- dlopen)
- libs="$dlfiles"
- save_deplibs="$deplibs" # Collect dlpreopened libraries
- deplibs=
- ;;
+ dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ 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
- -l*)
- if test $linkmode = oldlib && test $linkmode = obj; then
- $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
- continue
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
fi
- if test $pass = conv; then
- deplibs="$deplib $deplibs"
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
continue
fi
- name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
- # Search the libtool library
- lib="$searchdir/lib${name}.la"
- if test -f "$lib"; then
- found=yes
- break
- fi
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
done
if test "$found" != yes; then
# deplib doesn't seem to be a libtool library
@@ -1715,41 +3655,91 @@ EOF
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
- test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
fi
continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
fi
;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
-L*)
case $linkmode in
lib)
deplibs="$deplib $deplibs"
- test $pass = conv && continue
+ test "$pass" = conv && continue
newdependency_libs="$deplib $newdependency_libs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
;;
prog)
- if test $pass = conv; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
- if test $pass = scan; then
+ if test "$pass" = scan; then
deplibs="$deplib $deplibs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
else
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
fi
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
;;
*)
- $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
+ func_warning "\`-L' is ignored for archives/objects"
;;
esac # linkmode
continue
;; # -L
-R*)
- if test $pass = link; then
- dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
# Make sure the xrpath contains only unique directories.
case "$xrpath " in
*" $dir "*) ;;
@@ -1761,28 +3751,51 @@ EOF
;;
*.la) lib="$deplib" ;;
*.$libext)
- if test $pass = conv; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
case $linkmode in
lib)
- if test "$deplibs_check_method" != pass_all; then
- echo
- echo "*** Warning: This library needs some functionality provided by $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."
- else
- echo
- echo "*** Warning: Linking the shared library $output against the"
- echo "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $ECHO
+ $ECHO "*** Warning: Trying to link with static lib archive $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"
+ $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+ $ECHO "*** that it is just a static archive that I should not use here."
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
continue
;;
prog)
- if test $pass != link; then
+ if test "$pass" != link; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
@@ -1793,14 +3806,18 @@ EOF
esac # linkmode
;; # *.$libext
*.lo | *.$objext)
- 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"
+ 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
fi
continue
;;
@@ -1809,21 +3826,18 @@ EOF
continue
;;
esac # case $deplib
- if test $found = yes || test -f "$lib"; then :
+
+ if test "$found" = yes || test -f "$lib"; then :
else
- $echo "$modename: cannot find the library \`$lib'" 1>&2
- exit 1
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
fi
# Check to see that this really is a libtool archive.
- if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
- fi
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
- ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$ladir" = "X$lib" && ladir="."
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
dlname=
dlopen=
@@ -1831,70 +3845,90 @@ EOF
libdir=
library_names=
old_library=
+ inherited_linker_flags=
# If the library was installed with an old release of libtool,
- # it will not redefine variable installed.
+ # it will not redefine variables installed, or shouldnotlink
installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
- # Read the .la file
- case $lib in
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $inherited_linker_flags"
+ fi
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
- { test $linkmode = oldlib && test $linkmode = obj; }; then
- # Add dl[pre]opened files of deplib
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
fi
- if test $pass = conv; then
+ if test "$pass" = conv; then
# Only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit 1
+ func_fatal_error "cannot find name of link library for \`$lib'"
fi
# It is a libtool convenience library, so add in its objects.
convenience="$convenience $ladir/$objdir/$old_library"
old_convenience="$old_convenience $ladir/$objdir/$old_library"
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
case "$tmp_libs " in
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
- tmp_libs="$tmp_libs $deplib"
- done
- elif test $linkmode != prog && test $linkmode != lib; then
- $echo "$modename: \`$lib' is not a convenience library" 1>&2
- exit 1
- fi
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
continue
fi # $pass = conv
+
# Get the name of the library we link against.
linklib=
for l in $old_library $library_names; do
linklib="$l"
done
if test -z "$linklib"; then
- $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit 1
+ func_fatal_error "cannot find name of link library for \`$lib'"
fi
# This library was specified with -dlopen.
- if test $pass = dlopen; then
+ if test "$pass" = dlopen; then
if test -z "$libdir"; then
- $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
- exit 1
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
fi
- if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ 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.
- dlprefiles="$dlprefiles $lib"
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
else
newdlfiles="$newdlfiles $lib"
fi
@@ -1907,18 +3941,19 @@ EOF
*)
abs_ladir=`cd "$ladir" && pwd`
if test -z "$abs_ladir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
- $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
abs_ladir="$ladir"
fi
;;
esac
- laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ func_basename "$lib"
+ laname="$func_basename_result"
# Find the relevant object directory and library name.
if test "X$installed" = Xyes; then
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- $echo "$modename: warning: library \`$lib' was moved." 1>&2
+ func_warning "library \`$lib' was moved."
dir="$ladir"
absdir="$abs_ladir"
libdir="$abs_ladir"
@@ -1926,24 +3961,36 @@ EOF
dir="$libdir"
absdir="$libdir"
fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
fi # $installed = yes
- name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
# This library was specified with -dlpreopen.
- if test $pass = dlpreopen; then
- if test -z "$libdir"; then
- $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
- exit 1
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
fi
# Prefer using a static library (so that no silly _DYNAMIC symbols
# are required to link).
if test -n "$old_library"; then
newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
# Otherwise, use the dlname, so that lt_dlopen finds it.
elif test -n "$dlname"; then
newdlprefiles="$newdlprefiles $dir/$dlname"
@@ -1954,18 +4001,19 @@ EOF
if test -z "$libdir"; then
# Link the convenience library
- if test $linkmode = lib; then
+ 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"
+ deplibs="$lib $deplibs" # used for prog,scan pass
fi
continue
fi
- if test $linkmode = prog && test $pass != link; then
+
+ if test "$linkmode" = prog && test "$pass" != link; then
newlib_search_path="$newlib_search_path $ladir"
deplibs="$lib $deplibs"
@@ -1978,31 +4026,42 @@ EOF
tmp_libs=
for deplib in $dependency_libs; do
case $deplib in
- -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+ -L*) func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
esac
# Need to link against all dependency_libs?
- if test $linkalldeplibs = yes; then
+ if test "$linkalldeplibs" = yes; then
deplibs="$deplib $deplibs"
else
# Need to hardcode shared library paths
# or/and link against static libraries
newdependency_libs="$deplib $newdependency_libs"
fi
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
tmp_libs="$tmp_libs $deplib"
done # for deplib
continue
fi # $linkmode = prog...
- 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"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
- 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.
@@ -2024,17 +4083,6 @@ EOF
esac
;;
esac
- 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 &&
@@ -2044,25 +4092,87 @@ EOF
# We only need to search for static libraries
continue
fi
+ fi
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw*)
+ # No point in relinking DLLs because paths are not encoded
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ $ECHO
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ 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
set dummy $library_names
- realname="$2"
- shift; shift
- libname=`eval \\$echo \"$libname_spec\"`
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
# 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*)
+ *cygwin* | mingw*)
major=`expr $current - $age`
versuffix="-$major"
;;
@@ -2074,41 +4184,29 @@ EOF
# 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"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
# If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then :
else
- $show "extracting exported symbol list from \`$soname'"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- eval cmds=\"$extract_expsyms_cmds\"
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ func_echo "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
fi
# Create $newlib
if test -f "$output_objdir/$newlib"; then :; else
- $show "generating import library for \`$soname'"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- eval cmds=\"$old_archive_from_expsyms_cmds\"
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ func_echo "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
fi
# make sure the library variables are pointing to the new library
dir=$output_objdir
linklib=$newlib
- fi # test -n $old_archive_from_expsyms_cmds
+ fi # test -n "$old_archive_from_expsyms_cmds"
- if test $linkmode = prog || test "$mode" != relink; then
+ if test "$linkmode" = prog || test "$mode" != relink; then
add_shlibpath=
add_dir=
add=
@@ -2117,6 +4215,30 @@ EOF
immediate | unsupported)
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $ECHO
+ $ECHO "*** And there doesn't seem to be a static archive available"
+ $ECHO "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
elif test "$hardcode_minus_L" = no; then
case $host in
*-*-sunos*) add_shlibpath="$dir" ;;
@@ -2131,10 +4253,19 @@ EOF
fi
;;
relink)
- if test "$hardcode_direct" = yes; then
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
add_shlibpath="$dir"
@@ -2147,8 +4278,7 @@ EOF
esac
if test "$lib_linked" != yes; then
- $echo "$modename: configuration error: unsupported hardcode properties"
- exit 1
+ func_fatal_configuration "unsupported hardcode properties"
fi
if test -n "$add_shlibpath"; then
@@ -2157,14 +4287,14 @@ EOF
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
esac
fi
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
test -n "$add" && compile_deplibs="$add $compile_deplibs"
else
test -n "$add_dir" && deplibs="$add_dir $deplibs"
test -n "$add" && deplibs="$add $deplibs"
- if test "$hardcode_direct" != yes && \
- test "$hardcode_minus_L" != yes && \
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
test "$hardcode_shlibpath_var" = yes; then
case :$finalize_shlibpath: in
*":$libdir:"*) ;;
@@ -2174,12 +4304,13 @@ EOF
fi
fi
- if test $linkmode = prog || test "$mode" = relink; then
+ if test "$linkmode" = prog || test "$mode" = relink; then
add_shlibpath=
add_dir=
add=
# Finalize command for both is simple: just hardcode it.
- if test "$hardcode_direct" = yes; then
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
add="$libdir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$libdir"
@@ -2190,13 +4321,28 @@ EOF
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
else
# We cannot seem to hardcode it, guess we'll fake it.
add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
add="-l$name"
fi
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
else
@@ -2204,16 +4350,7 @@ EOF
test -n "$add" && deplibs="$add $deplibs"
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
+ elif test "$linkmode" = prog; then
# 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.
@@ -2233,45 +4370,46 @@ EOF
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
- echo
- echo "*** Warning: This library needs some functionality provided by $lib."
- 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."
+ $ECHO
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $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."
+ $ECHO "*** But as you try to build a module library, libtool will still create "
+ $ECHO "*** a static module, that should work as long as the dlopening application"
+ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
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."
+ $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
+ build_libtool_libs=module
+ build_old_libs=yes
else
- build_libtool_libs=no
+ 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 # link shared/static library?
- if test $linkmode = lib; then
+ if test "$linkmode" = lib; then
if test -n "$dependency_libs" &&
- { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
- test $link_static = yes; }; then
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
# Extract -R from dependency_libs
temp_deplibs=
for libdir in $dependency_libs; do
case $libdir in
- -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
case " $xrpath " in
*" $temp_xrpath "*) ;;
*) xrpath="$xrpath $temp_xrpath";;
@@ -2289,46 +4427,70 @@ EOF
tmp_libs=
for deplib in $dependency_libs; do
newdependency_libs="$deplib $newdependency_libs"
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
tmp_libs="$tmp_libs $deplib"
done
- if test $link_all_deplibs != no; then
+ if test "$link_all_deplibs" != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
case $deplib in
-L*) path="$deplib" ;;
*.la)
- dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$deplib" && dir="."
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
# We need an absolute path.
case $dir in
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
*)
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
- $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ func_warning "cannot determine absolute directory name of \`$dir'"
absdir="$dir"
fi
;;
esac
- if grep "^installed=no" $deplib > /dev/null; then
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`otool -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'`
+ darwin_install_name=`$ECHO $darwin_install_name`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`otool64 -L $depdepl | $SED -n -e '3q;2,2p' | $SED -e 's/(.*//'`
+ darwin_install_name=`$ECHO $darwin_install_name`
+ fi
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
path="-L$absdir/$objdir"
+ ;;
+ esac
else
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
- fi
- if test "$absdir" != "$libdir"; then
- $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
- fi
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
path="-L$absdir"
fi
;;
- *) continue ;;
esac
case " $deplibs " in
*" $path "*) ;;
@@ -2338,15 +4500,15 @@ EOF
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
- if test $pass = dlpreopen; then
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
deplibs="$deplib $deplibs"
done
fi
- if test $pass != dlopen; then
- test $pass != scan && dependency_libs="$newdependency_libs"
- if test $pass != conv; then
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
# Make sure lib_search_path contains only unique directories.
lib_search_path=
for dir in $newlib_search_path; do
@@ -2368,9 +4530,30 @@ EOF
eval tmp_libs=\"\$$var\"
new_libs=
for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
case $deplib in
-L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
*)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
case " $specialdeplibs " in
*" $deplib "*) new_libs="$deplib $new_libs" ;;
*)
@@ -2398,42 +4581,52 @@ EOF
eval $var=\"$tmp_libs\"
done # for var
fi
- if test "$pass" = "conv" &&
- { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
- libs="$deplibs" # reset libs
- deplibs=
- fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
done # for pass
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
dlprefiles="$newdlprefiles"
fi
case $linkmode in
oldlib)
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ func_warning "\`-dlopen' is ignored for archives"
fi
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
- fi
+ test -n "$deplibs" && \
+ func_warning "\`-l' and \`-L' are ignored for archives"
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
- fi
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
- fi
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
- fi
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
- if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
- $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
- fi
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
# Now set the variables for building old libraries.
build_libtool_libs=no
@@ -2445,115 +4638,146 @@ EOF
# Make sure we only generate libraries of the form `libNAME.la'.
case $outputname in
lib*)
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
;;
*)
- if test "$module" = no; then
- $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required
- name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
else
- libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
fi
;;
esac
if test -n "$objs"; then
if test "$deplibs_check_method" != pass_all; then
- $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
- exit 1
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
else
- echo
- echo "*** Warning: Linking the shared library $output against the non-libtool"
- echo "*** objects $objs is not portable!"
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
libobjs="$libobjs $objs"
fi
fi
- if test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
- fi
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
set dummy $rpath
- if test $# -gt 2; then
- $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
- fi
- install_libdir="$2"
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
oldlibs=
if test -z "$rpath"; then
if test "$build_libtool_libs" = yes; then
# Building a libtool convenience library.
# Some compilers have problems with a `.al' extension so
- # convenience libraries should have the same extension an
- # archive normally would.
+ # convenience libraries should have the same extension an
+ # archive normally would.
oldlibs="$output_objdir/$libname.$libext $oldlibs"
build_libtool_libs=convenience
build_old_libs=yes
fi
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
- fi
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
- fi
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
else
# Parse the version information argument.
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+ save_ifs="$IFS"; IFS=':'
set dummy $vinfo 0 0 0
+ shift
IFS="$save_ifs"
- if test -n "$8"; then
- $echo "$modename: too many parameters to \`-version-info'" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- current="$2"
- revision="$3"
- age="$4"
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ current=`expr $number_major + $number_minor`
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ current=`expr $number_major + $number_minor - 1`
+ age="$number_minor"
+ revision="$number_minor"
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
# Check that each of the things are valid numbers.
case $current in
- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-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
- exit 1
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
case $revision in
- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-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
- exit 1
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
case $age in
- 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-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
- exit 1
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
;;
esac
- if test $age -gt $current; then
- $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
- $echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
fi
# Calculate the version variables.
@@ -2580,19 +4804,24 @@ EOF
freebsd-elf)
major=".$current"
- versuffix=".$current";
+ versuffix=".$current"
;;
- irix)
+ irix | nonstopux)
major=`expr $current - $age + 1`
- verstring="sgi$major.$revision"
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
# Add in all the interfaces that we are compatible with.
loop=$revision
- while test $loop != 0; do
+ while test "$loop" -ne 0; do
iface=`expr $revision - $loop`
loop=`expr $loop - 1`
- verstring="sgi$major.$iface:$verstring"
+ verstring="$verstring_prefix$major.$iface:$verstring"
done
# Before this point, $major must not contain `.'.
@@ -2606,13 +4835,13 @@ EOF
;;
osf)
- major=`expr $current - $age`
+ major=.`expr $current - $age`
versuffix=".$current.$age.$revision"
verstring="$current.$age.$revision"
# Add in all the interfaces that we are compatible with.
loop=$age
- while test $loop != 0; do
+ while test "$loop" -ne 0; do
iface=`expr $current - $loop`
loop=`expr $loop - 1`
verstring="$verstring:${iface}.0"
@@ -2622,6 +4851,11 @@ EOF
verstring="$verstring:${current}.0"
;;
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
sunos)
major=".$current"
versuffix=".$current.$revision"
@@ -2635,16 +4869,23 @@ EOF
;;
*)
- $echo "$modename: unknown library version type \`$version_type'" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
+ func_fatal_configuration "unknown library version type \`$version_type'"
;;
esac
# Clear the version info if we defaulted, and they specified a release.
if test -z "$vinfo" && test -n "$release"; then
major=
- verstring="0.0"
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
if test "$need_version" = no; then
versuffix=
else
@@ -2662,7 +4903,7 @@ EOF
# Check to see if the archive will have undefined symbols.
if test "$allow_undefined" = yes; then
if test "$allow_undefined_flag" = unsupported; then
- $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ func_warning "undefined symbols not allowed in $host shared libraries"
build_libtool_libs=no
build_old_libs=yes
fi
@@ -2670,27 +4911,36 @@ EOF
# Don't allow undefined symbols.
allow_undefined_flag="$no_undefined_flag"
fi
+
fi
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
if test "$mode" != relink; then
# Remove our outputs, but don't remove object files since they
- # may have been created when compiling PIC objects.
- removelist=
- tempremovelist=`echo "$output_objdir/*"`
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
for p in $tempremovelist; do
- case $p in
- *.$objext)
- ;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- removelist="$removelist $p"
- ;;
- *) ;;
- esac
- done
- if test -n "$removelist"; then
- $show "${rm}r $removelist"
- $run ${rm}r $removelist
- fi
+ case $p in
+ *.$objext)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
fi
# Now set the variables for building old libraries.
@@ -2698,15 +4948,15 @@ EOF
oldlibs="$oldlibs $output_objdir/$libname.$libext"
# Transform .lo files to .o files.
- oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
fi
# Eliminate all temporary directories.
- 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'`
- done
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+ #done
if test -n "$xrpath"; then
# If the user specified any rpath flags, then add them.
@@ -2718,7 +4968,7 @@ EOF
*) finalize_rpath="$finalize_rpath $libdir" ;;
esac
done
- if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
dependency_libs="$temp_xrpath $dependency_libs"
fi
fi
@@ -2751,14 +5001,23 @@ EOF
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C library is in the System framework
- deplibs="$deplibs -framework System"
+ deplibs="$deplibs System.ltframework"
;;
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
- *)
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
# Add libc to deplibs on all other systems if necessary.
- if test $build_libtool_need_lc = "yes"; then
+ if test "$build_libtool_need_lc" = "yes"; then
deplibs="$deplibs -lc"
fi
;;
@@ -2785,7 +5044,7 @@ EOF
# This might be a little naive. We might want to check
# whether the library exists or not. But this is on
# osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behaviour.
+ # implementing what was already the behavior.
newdeplibs=$deplibs
;;
test_compile)
@@ -2793,69 +5052,90 @@ EOF
# limits. Maybe even breaks it. We compile a program, linking it
# against the deplibs as a proxy for the library. Then we can check
# whether they linked in statically or dynamically with ldd.
- $rm conftest.c
+ $opt_dry_run || $RM conftest.c
cat > conftest.c <<EOF
int main() { return 0; }
EOF
- $rm conftest
- $LTCC -o conftest conftest.c $deplibs
- if test $? -eq 0 ; then
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
ldd_output=`ldd conftest`
for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
+ name=`expr $i : '-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\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: This library needs some functionality provided by $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ if test "$name" != "" && test "$name" != "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which I believe you do not have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+ $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
fi
else
newdeplibs="$newdeplibs $i"
fi
done
else
- # Error occured in the first compile. Let's try to salvage the situation:
- # Compile a seperate program for each library.
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
for i in $deplibs; do
- name="`expr $i : '-l\(.*\)'`"
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- $rm conftest
- $LTCC -o conftest conftest.c $i
- # Did it work?
- if test $? -eq 0 ; then
+ name=`expr $i : '-l\(.*\)'`
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" && test "$name" != "0"; then
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
ldd_output=`ldd conftest`
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: This library needs some functionality provided by $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+ $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
fi
else
droppeddeps=yes
- echo
- echo "*** Warning! Library $i is needed by this library but I was not able to"
- echo "*** make it link in! You will probably need to install it or some"
- echo "*** library that it depends on before this library will be fully"
- echo "*** functional. Installing it before continuing would be even better."
+ $ECHO
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ $ECHO "*** make it link in! You will probably need to install it or some"
+ $ECHO "*** library that it depends on before this library will be fully"
+ $ECHO "*** functional. Installing it before continuing would be even better."
fi
else
newdeplibs="$newdeplibs $i"
@@ -2864,19 +5144,28 @@ EOF
fi
;;
file_magic*)
- set dummy $deplibs_check_method
- file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
+ 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 test "$name" != "" && test "$name" != "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; 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
# Follow soft links.
- if ls -lLd "$potent_lib" 2>/dev/null \
- | grep " -> " >/dev/null; then
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
continue
fi
# The statement above tries to avoid entering an
@@ -2886,28 +5175,36 @@ EOF
# but so what?
potlib="$potent_lib"
while test -h "$potlib" 2>/dev/null; do
- potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
case $potliblink in
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
- *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
done
- if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
- | sed 10q \
- | egrep "$file_magic_regex" > /dev/null; then
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib"
a_deplib=""
break 2
fi
- done
- done
+ done
+ done
+ fi
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."
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $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"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
fi
else
# Add a -L argument.
@@ -2916,32 +5213,49 @@ EOF
done # Gone through all deplibs.
;;
match_pattern*)
- set dummy $deplibs_check_method
- match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
for a_deplib in $deplibs; do
- name="`expr $a_deplib : '-l\(.*\)'`"
+ 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
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; 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
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
done
- done
+ fi
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."
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $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"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
fi
else
# Add a -L argument.
@@ -2951,16 +5265,23 @@ EOF
;;
none | unknown | *)
newdeplibs=""
- if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
- -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
- grep . >/dev/null; then
- echo
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $ECHO
if test "X$deplibs_check_method" = "Xnone"; then
- echo "*** Warning: inter-library dependencies are not supported in this platform."
+ $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
else
- echo "*** Warning: inter-library dependencies are not known to be supported."
+ $ECHO "*** Warning: inter-library dependencies are not known to be supported."
fi
- echo "*** All declared inter-library dependencies are being dropped."
+ $ECHO "*** All declared inter-library dependencies are being dropped."
droppeddeps=yes
fi
;;
@@ -2973,24 +5294,24 @@ EOF
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 /'`
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
;;
esac
if test "$droppeddeps" = yes; then
if test "$module" = yes; then
- echo
- echo "*** Warning: libtool could not satisfy all declared inter-library"
- echo "*** dependencies of module $libname. Therefore, libtool will create"
- echo "*** a static module, that should work as long as the dlopening"
- echo "*** application is linked with the -dlopen flag."
+ $ECHO
+ $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ $ECHO "*** a static module, that should work as long as the dlopening"
+ $ECHO "*** application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
@@ -3000,16 +5321,16 @@ EOF
build_libtool_libs=no
fi
else
- echo "*** The inter-library dependencies that have been dropped here will be"
- echo "*** automatically added whenever a program is linked with this library"
- echo "*** or is declared to -dlopen it."
-
- 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."
+ $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
@@ -3023,6 +5344,41 @@ EOF
# Done checking deplibs!
deplibs=$newdeplibs
fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
# All the library-specific variables (install_libdir is set above).
library_names=
@@ -3031,7 +5387,7 @@ EOF
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
- if test $hardcode_into_libs = yes; then
+ if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths
hardcode_libdirs=
dep_rpath=
@@ -3067,7 +5423,11 @@ EOF
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var.
@@ -3087,109 +5447,142 @@ EOF
fi
# Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
eval library_names=\"$library_names_spec\"
set dummy $library_names
- realname="$2"
- shift; shift
+ shift
+ realname="$1"
+ shift
if test -n "$soname_spec"; then
eval soname=\"$soname_spec\"
else
soname="$realname"
fi
- test -z "$dlname" && dlname=$soname
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
lib="$output_objdir/$realname"
+ linknames=
for link
do
linknames="$linknames $link"
done
-# # Ensure that we have .o objects for linkers which dislike .lo
-# # (e.g. aix) in case we are running --disable-static
-# for obj in $libobjs; do
-# xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-# if test "X$xdir" = "X$obj"; then
-# xdir="."
-# else
-# xdir="$xdir"
-# fi
-# baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
-# if test ! -f $xdir/$oldobj && test "$baseobj" != "$oldobj"; then
-# $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
-# $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
-# fi
-# done
-
# Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ delfiles="$delfiles $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- $show "generating symbol list for \`$libname.la'"
+ func_echo "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp"
- $run $rm $export_symbols
- eval cmds=\"$export_symbols_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ eval cmd=\"$cmd\"
+ if len=`expr "X$cmd" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_echo "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
done
IFS="$save_ifs"
- if test -n "$export_symbols_regex"; then
- $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
- $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- $show "$mv \"${export_symbols}T\" \"$export_symbols\""
- $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
fi
fi
fi
if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_echo "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
fi
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
if test -n "$whole_archive_flag_spec"; then
save_libobjs=$libobjs
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
else
gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
fi
fi
@@ -3200,21 +5593,36 @@ EOF
# Make a backup of the uninstalled library when relinking
if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
fi
# Do each of the archive commands.
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval cmds=\"$archive_expsym_cmds\"
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
else
- eval cmds=\"$archive_cmds\"
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
fi
- 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..."
+
+ if test "X$skipped_export" != "X:" &&
+ len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
# Save the value of $output and $libobjs because we want to
# use them later. If we have whole_archive_flag_spec, we
@@ -3227,109 +5635,238 @@ EOF
if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
save_libobjs=$libobjs
fi
- save_output=$output
+ save_output=$output
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
# 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
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_echo "creating GNU ld script: $output"
+ $ECHO 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_echo "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_echo "creating reloadable object files..."
+ output=$output_objdir/$output_la-${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" : ".*" 2>/dev/null` &&
+ 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/$output_la-${k}.$objext
+ k=`expr $k + 1`
+ output=$output_objdir/$output_la-${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 reloadable object files
+ # after they are used.
+ i=0
+ while test "$i" -lt "$k"
+ do
+ i=`expr $i + 1`
+ delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
+ done
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_echo "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ fi
+
+ test -n "$save_libobjs" &&
+ func_echo "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_echo "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
# Restore the value of output.
- output=$save_output
+ output=$save_output
if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
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"
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
# Restore the uninstalled library and exit
if test "$mode" = relink; then
- $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
- exit 0
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
fi
# Create links to the real library.
for linkname in $linknames; do
if test "$realname" != "$linkname"; then
- $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
fi
done
@@ -3342,38 +5879,33 @@ EOF
;;
obj)
- if test -n "$deplibs"; then
- $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
- fi
-
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ func_warning "\`-dlopen' is ignored for objects"
fi
- if test -n "$rpath"; then
- $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
- fi
+ test -n "$deplibs" && \
+ func_warning "\`-l' and \`-L' are ignored for objects"
- if test -n "$xrpath"; then
- $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
- fi
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
- fi
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
- fi
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
case $output in
*.lo)
- if test -n "$objs$old_deplibs"; then
- $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit 1
- fi
- libobj="$output"
- obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
;;
*)
libobj=
@@ -3382,7 +5914,7 @@ EOF
esac
# Delete the old objects.
- $run $rm $obj $libobj
+ $opt_dry_run || $RM $obj $libobj
# Objects from convenience libraries. This assumes
# single-version convenience libraries. Whenever we create
@@ -3391,148 +5923,136 @@ EOF
reload_conv_objs=
gentop=
# reload_cmds runs $LD directly, so let us get rid of
- # -Wl from whole_archive_flag_spec
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
wl=
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
- eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
else
gentop="$output_objdir/${obj}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- for xlib in $convenience; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
fi
fi
# Create the old-style object.
- reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
output="$obj"
- eval cmds=\"$reload_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
+ func_execute_cmds "$reload_cmds" 'exit $?'
# Exit if we aren't doing a library object file.
if test -z "$libobj"; then
if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
+ func_show_eval '${RM}r "$gentop"'
fi
- exit 0
+ exit $EXIT_SUCCESS
fi
if test "$build_libtool_libs" != yes; then
if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
+ func_show_eval '${RM}r "$gentop"'
fi
# Create an invalid libtool object if no PIC, so that we don't
# accidentally link it into a program.
# $show "echo timestamp > $libobj"
- # $run eval "echo timestamp > $libobj" || exit $?
- exit 0
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
fi
if test -n "$pic_flag" || test "$pic_mode" != default; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs"
output="$libobj"
- eval cmds=\"$reload_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
-# else
-# # Just create a symlink.
-# $show $rm $libobj
-# $run $rm $libobj
-# xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
-# if test "X$xdir" = "X$libobj"; then
-# xdir="."
-# else
-# xdir="$xdir"
-# fi
-# baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
-# oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
-# $show "(cd $xdir && $LN_S $oldobj $baseobj)"
-# $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+ func_execute_cmds "$reload_cmds" 'exit $?'
fi
if test -n "$gentop"; then
- $show "${rm}r $gentop"
- $run ${rm}r $gentop
+ func_show_eval '${RM}r "$gentop"'
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
prog)
case $host in
- *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
esac
- if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
- fi
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
- if test -n "$release"; then
- $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
- fi
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
- if test "$preload" = yes; then
- if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
- test "$dlopen_self_static" = unknown; then
- $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
- fi
- fi
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
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 /'`
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
;;
esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -3550,7 +6070,7 @@ EOF
# Now hardcode the library paths
rpath=
hardcode_libdirs=
- for libdir in $compile_rpath; do
+ for libdir in $compile_rpath $finalize_rpath; do
if test -n "$hardcode_libdir_flag_spec"; then
if test -n "$hardcode_libdir_separator"; then
if test -z "$hardcode_libdirs"; then
@@ -3577,10 +6097,15 @@ EOF
fi
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
;;
esac
done
@@ -3628,227 +6153,47 @@ EOF
fi
finalize_rpath="$rpath"
- dlsyms=
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- dlsyms="${outputname}S.c"
- else
- $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
- fi
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
fi
- if test -n "$dlsyms"; then
- case $dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${outputname}.nm"
-
- $show "$rm $nlist ${nlist}S ${nlist}T"
- $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
- # Parse the name list into a source file.
- $show "creating $output_objdir/$dlsyms"
-
- test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- $show "generating symbol list for \`$output'"
-
- test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
-
- # Add our own program objects to the symbol list.
- progfiles="$objs$old_deplibs"
- for arg in $progfiles; do
- $show "extracting global C symbols from \`$arg'"
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- if test -n "$export_symbols_regex"; then
- $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- $run eval '$mv "$nlist"T "$nlist"'
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$output.exp"
- $run $rm $export_symbols
- $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- else
- $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
- $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
- $run eval 'mv "$nlist"T "$nlist"'
- fi
- fi
-
- for arg in $dlprefiles; do
- $show "extracting global C symbols from \`$arg'"
- name=`echo "$arg" | sed -e 's%^.*/%%'`
- $run eval 'echo ": $name " >> "$nlist"'
- $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -z "$run"; then
- # Make sure we have at least an empty file.
- test -f "$nlist" || : > "$nlist"
-
- if test -n "$exclude_expsyms"; then
- egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
- $mv "$nlist"T "$nlist"
- fi
-
- # Try sorting and uniquifying the output.
- if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
- :
- else
- grep -v "^: " < "$nlist" > "$nlist"S
- fi
-
- if test -f "$nlist"S; then
- eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
- else
- echo '/* NONE */' >> "$output_objdir/$dlsyms"
- fi
-
- $echo >> "$output_objdir/$dlsyms" "\
-
-#undef lt_preloaded_symbols
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr_t address;
-}
-lt_preloaded_symbols[] =
-{\
-"
-
- sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
- -e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
- < "$nlist" >> "$output_objdir/$dlsyms"
-
- $echo >> "$output_objdir/$dlsyms" "\
- {0, (lt_ptr_t) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- fi
-
- pic_flag_for_symtable=
- case $host in
- # compiling the symbol table file with pic_flag works around
- # a FreeBSD bug that causes programs to crash when -lm is
- # linked before any other PIC object. But we must not use
- # pic_flag when linking with -static. The problem exists in
- # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
- *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
- esac;;
- *-*-hpux*)
- case "$compile_command " in
- *" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag";;
- esac
- esac
-
- # Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
-
- # Clean up the generated files.
- $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
- $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
-
- # Transform the symbol file into the correct name.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
- ;;
- *)
- $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit 1
- ;;
- esac
- else
- # We keep going just in case the user didn't refer to
- # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
- # really was required.
-
- # Nullify the symbol file.
- compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
- finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
fi
- if test $need_relink = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=yes
+ case $host in
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
# Replace the output file specification.
- compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
link_command="$compile_command$compile_rpath"
# We have no uninstalled library dependencies, so finalize right now.
- $show "$link_command"
- $run eval "$link_command"
- status=$?
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
# Delete the generated files.
- if test -n "$dlsyms"; then
- $show "$rm $output_objdir/${outputname}S.${objext}"
- $run $rm "$output_objdir/${outputname}S.${objext}"
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
fi
- exit $status
- fi
-
- if test -n "$shlibpath_var"; then
- # We should set the shlibpath_var
- rpath=
- for dir in $temp_rpath; do
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*)
- # Absolute path.
- rpath="$rpath$dir:"
- ;;
- *)
- # Relative path: add a thisdir entry.
- rpath="$rpath\$thisdir/$dir:"
- ;;
- esac
- done
- temp_rpath="$rpath"
+ exit $exit_status
fi
if test -n "$compile_shlibpath$finalize_shlibpath"; then
@@ -3883,13 +6228,12 @@ static const void *lt_preloaded_setup() {
# We don't need to create a wrapper script.
link_command="$compile_var$compile_command$compile_rpath"
# Replace the output file specification.
- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
# Delete the old output file.
- $run $rm $output
+ $opt_dry_run || $RM $output
# Link the executable and exit
- $show "$link_command"
- $run eval "$link_command" || exit $?
- exit 0
+ func_show_eval "$link_command" 'exit $?'
+ exit $EXIT_SUCCESS
fi
if test "$hardcode_action" = relink; then
@@ -3897,13 +6241,13 @@ static const void *lt_preloaded_setup() {
link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath"
- $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
- $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
else
if test "$fast_install" != no; then
link_command="$finalize_var$compile_command$finalize_rpath"
if test "$fast_install" = yes; then
- relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
else
# fast_install is set to needless
relink_command=
@@ -3915,65 +6259,427 @@ static const void *lt_preloaded_setup() {
fi
# Replace the output file specification.
- link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
# Delete the old output files.
- $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
- $show "$link_command"
- $run eval "$link_command" || exit $?
+ func_show_eval "$link_command" 'exit $?'
# Now create the wrapper script.
- $show "creating $output"
+ func_echo "creating $output"
# Quote the relink command for shipping.
if test -n "$relink_command"; then
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
- relink_command="cd `pwd`; $relink_command"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
fi
- # Quote $echo for shipping.
- if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
- case $0 in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
- *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
esac
- qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
else
- qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
fi
- # Only actually do things if our run command is non-null.
- if test -z "$run"; then
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
# win32 will think the script is a binary if it has
# a .exe suffix, so we strip it off here.
case $output in
- *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
- *cygwin*) exeext=.exe ;;
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
*) exeext= ;;
esac
- $rm $output
- trap "$rm $output; exit 1" 1 2 15
+ case $host in
+ *cygwin* | *mingw* )
+ output_name=`basename $output`
+ output_path=`dirname $output`
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ cat > $cwrappersource <<EOF
- $echo > $output "\
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "/bin/sh $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+/* -DDEBUG is fairly common in CFLAGS. */
+#undef DEBUG
+#if defined DEBUGWRAPPER
+# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
+#else
+# define DEBUG(format, ...)
+#endif
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+const char * base_name (const char *name);
+char * find_executable(const char *wrapper);
+int check_executable(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ DEBUG("(main) argv[0] : %s\n",argv[0]);
+ DEBUG("(main) program_name : %s\n",program_name);
+ newargz = XMALLOC(char *, argc+2);
+EOF
+
+ cat >> $cwrappersource <<EOF
+ newargz[0] = (char *) xstrdup("$SHELL");
+EOF
+
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = find_executable(argv[0]);
+ if (newargz[1] == NULL)
+ lt_fatal("Couldn't find %s", argv[0]);
+ DEBUG("(main) found exe at : %s\n",newargz[1]);
+ /* we know the script has the same name, without the .exe */
+ /* so make sure newargz[1] doesn't end in .exe */
+ strendzap(newargz[1],".exe");
+ for (i = 1; i < argc; i++)
+ newargz[i+1] = xstrdup(argv[i]);
+ newargz[argc+1] = NULL;
+
+ for (i=0; i<argc+1; i++)
+ {
+ DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
+ ;
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",(char const **)newargz);
+EOF
+ ;;
+ *)
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",newargz);
+EOF
+ ;;
+ esac
+
+ cat >> $cwrappersource <<"EOF"
+ return 127;
+}
+
+void *
+xmalloc (size_t num)
+{
+ void * p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char)name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable(const char * path)
+{
+ struct stat st;
+
+ DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0) &&
+ (
+ /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
+#if defined (S_IXOTH)
+ ((st.st_mode & S_IXOTH) == S_IXOTH) ||
+#endif
+#if defined (S_IXGRP)
+ ((st.st_mode & S_IXGRP) == S_IXGRP) ||
+#endif
+ ((st.st_mode & S_IXUSR) == S_IXUSR))
+ )
+ return 1;
+ else
+ return 0;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise */
+char *
+find_executable (const char* wrapper)
+{
+ int has_slash = 0;
+ const char* p;
+ const char* p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char* concat_name;
+
+ DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char* path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char* q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR(*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen(tmp);
+ concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable(concat_name))
+ return concat_name;
+ XFREE(concat_name);
+ return NULL;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert(str != NULL);
+ assert(pat != NULL);
+
+ len = strlen(str);
+ patlen = strlen(pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp(str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+ const char * message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+EOF
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $opt_dry_run || $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
+ ;;
+ esac
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ $ECHO > $output "\
#! $SHELL
# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# The $output program cannot be directly executed until all the libtool
# libraries that it depends on are installed.
@@ -3983,47 +6689,62 @@ static const void *lt_preloaded_setup() {
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
+Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
-if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
relink_command=\"$relink_command\"
# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variable:
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
notinst_deplibs='$notinst_deplibs'
else
- # When we are sourced in execute mode, \$file and \$echo are already set.
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
if test \"\$libtool_execute_magic\" != \"$magic\"; then
- echo=\"$qecho\"
+ ECHO=\"$qecho\"
file=\"\$0\"
# Make sure echo works.
if test \"X\$1\" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
- elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
- # Yippee, \$echo works!
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
:
else
- # Restart under the correct shell, and then maybe \$echo will work.
+ # Restart under the correct shell, and then maybe \$ECHO will work.
exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
fi
fi\
"
- $echo >> $output "\
+ $ECHO >> $output "\
# Find the directory that this script lives in.
- thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
# Follow symbolic links until we get to the real thisdir.
- file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
while test -n \"\$file\"; do
- destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+ destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
# If there was a directory component, then change thisdir.
if test \"x\$destdir\" != \"x\$file\"; then
@@ -4033,8 +6754,8 @@ else
esac
fi
- file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
- file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
done
# Try to get the absolute directory name.
@@ -4043,59 +6764,59 @@ else
"
if test "$fast_install" = yes; then
- echo >> $output "\
+ $ECHO >> $output "\
program=lt-'$outputname'$exeext
progdir=\"\$thisdir/$objdir\"
- if test ! -f \"\$progdir/\$program\" || \\
- { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
file=\"\$\$-\$program\"
if test ! -d \"\$progdir\"; then
- $mkdir \"\$progdir\"
+ $MKDIR \"\$progdir\"
else
- $rm \"\$progdir/\$file\"
+ $RM \"\$progdir/\$file\"
fi"
- echo >> $output "\
+ $ECHO >> $output "\
# relink executable if necessary
if test -n \"\$relink_command\"; then
if relink_command_output=\`eval \$relink_command 2>&1\`; then :
else
- $echo \"\$relink_command_output\" >&2
- $rm \"\$progdir/\$file\"
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
exit 1
fi
fi
- $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
- { $rm \"\$progdir/\$program\";
- $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
- $rm \"\$progdir/\$file\"
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
fi"
else
- echo >> $output "\
+ $ECHO >> $output "\
program='$outputname'
progdir=\"\$thisdir/$objdir\"
"
fi
- echo >> $output "\
+ $ECHO >> $output "\
if test -f \"\$progdir/\$program\"; then"
# Export our shlibpath_var if we have one.
if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- $echo >> $output "\
+ $ECHO >> $output "\
# Add our own library path to $shlibpath_var
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
# The second colon is a workaround for a bug in BeOS R4 sed
- $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+ $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
export $shlibpath_var
"
@@ -4103,58 +6824,46 @@ else
# fixup the dll searchpath if we need to.
if test -n "$dllsearchpath"; then
- $echo >> $output "\
+ $ECHO >> $output "\
# Add the dll search path components to the executable PATH
PATH=$dllsearchpath:\$PATH
"
fi
- $echo >> $output "\
+ $ECHO >> $output "\
if test \"\$libtool_execute_magic\" != \"$magic\"; then
# Run the actual program with our arguments.
"
case $host in
- # win32 systems need to use the prog path for dll
- # lookup to work
- *-*-cygwin* | *-*-pw32*)
- $echo >> $output "\
- exec \$progdir/\$program \${1+\"\$@\"}
-"
- ;;
-
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
- $echo >> $output "\
- exec \$progdir\\\\\$program \${1+\"\$@\"}
+ $ECHO >> $output "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
"
;;
*)
- $echo >> $output "\
- # Export the path to the program.
- PATH=\"\$progdir:\$PATH\"
- export PATH
-
- exec \$program \${1+\"\$@\"}
+ $ECHO >> $output "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
"
;;
esac
- $echo >> $output "\
- \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ $ECHO >> $output "\
+ \$ECHO \"\$0: cannot exec \$program \$*\"
exit 1
fi
else
# The program doesn't exist.
- \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
- \$echo \"This script is just a wrapper for \$program.\" 1>&2
- echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
exit 1
fi
fi\
"
chmod +x $output
- fi
- exit 0
+ }
+ exit $EXIT_SUCCESS
;;
esac
@@ -4162,7 +6871,7 @@ fi\
for oldlib in $oldlibs; do
if test "$build_libtool_libs" = convenience; then
- oldobjs="$libobjs_save"
+ oldobjs="$libobjs_save $symfileobj"
addlibs="$convenience"
build_libtool_libs=no
else
@@ -4170,69 +6879,35 @@ fi\
oldobjs="$libobjs_save"
build_libtool_libs=no
else
- oldobjs="$objs$old_deplibs $non_pic_objects"
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
fi
addlibs="$old_convenience"
fi
if test -n "$addlibs"; then
gentop="$output_objdir/${outputname}x"
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
generated="$generated $gentop"
- # Add in members from convenience archives.
- for xlib in $addlibs; do
- # Extract the objects.
- case $xlib in
- [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
- *) xabs=`pwd`"/$xlib" ;;
- esac
- xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
- xdir="$gentop/$xlib"
-
- $show "${rm}r $xdir"
- $run ${rm}r "$xdir"
- $show "$mkdir $xdir"
- $run $mkdir "$xdir"
- status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
- exit $status
- fi
- $show "(cd $xdir && $AR x $xabs)"
- $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
-
- oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print | $NL2SP`
- done
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
fi
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- eval cmds=\"$old_archive_from_new_cmds\"
+ cmds=$old_archive_from_new_cmds
else
-# # Ensure that we have .o objects in place in case we decided
-# # not to build a shared library, and have fallen back to building
-# # static libs even though --disable-static was passed!
-# for oldobj in $oldobjs; do
-# if test ! -f $oldobj; then
-# xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
-# if test "X$xdir" = "X$oldobj"; then
-# xdir="."
-# else
-# xdir="$xdir"
-# fi
-# baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
-# obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
-# $show "(cd $xdir && ${LN_S} $obj $baseobj)"
-# $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
-# fi
-# done
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
# POSIX demands no paths to be encoded in archives. We have
# to avoid creating archives with duplicate basenames if we
@@ -4240,134 +6915,123 @@ fi\
# static archive out of a convenience library, or when linking
# the entirety of a libtool archive into another (currently
# not supported by libtool).
- if (for obj in $oldobjs
+ if (for obj in $oldobjs
do
- $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
done | sort | sort -uc >/dev/null 2>&1); then
:
else
- $echo "copying selected object files to avoid basename conflicts..."
-
- if test -z "$gentop"; then
- gentop="$output_objdir/${outputname}x"
-
- $show "${rm}r $gentop"
- $run ${rm}r "$gentop"
- $show "$mkdir $gentop"
- $run $mkdir "$gentop"
- status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
- exit $status
- fi
- generated="$generated $gentop"
- fi
-
+ $ECHO "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
save_oldobjs=$oldobjs
oldobjs=
counter=1
for obj in $save_oldobjs
do
- objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ func_basename "$obj"
+ objbase="$func_basename_result"
case " $oldobjs " in
" ") oldobjs=$obj ;;
*[\ /]"$objbase "*)
while :; do
# Make sure we don't pick an alternate name that also
# overlaps.
- newobj=lt$counter-$objbase
- counter=`expr $counter + 1`
+ newobj=lt$counter-$objbase
+ counter=`expr $counter + 1`
case " $oldobjs " in
*[\ /]"$newobj "*) ;;
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
esac
done
- $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- $run ln "$obj" "$gentop/$newobj" ||
- $run cp "$obj" "$gentop/$newobj"
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
oldobjs="$oldobjs $gentop/$newobj"
;;
*) oldobjs="$oldobjs $obj" ;;
esac
done
fi
+ 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..."
+ if len=`expr "X$cmds" : ".*" 2>/dev/null` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_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
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ for obj in $save_oldobjs
+ do
+ oldobjs="$objlist $obj"
+ objlist="$objlist $obj"
+ eval test_cmds=\"$old_archive_cmds\"
+ if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
+ test "$len" -le "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
- objlist=
- fi
- done
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ fi
+ done
RANLIB=$save_RANLIB
- oldobjs=$objlist
- eval cmds=\"\$concat_cmds~$old_archive_cmds\"
- fi
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
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"
+ func_execute_cmds "$cmds" 'exit $?'
done
- if test -n "$generated"; then
- $show "${rm}r$generated"
- $run ${rm}r$generated
- fi
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
# Now create the libtool archive.
case $output in
*.la)
old_library=
test "$build_old_libs" = yes && old_library="$libname.$libext"
- $show "creating $output"
+ func_echo "creating $output"
# Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do
if eval test -z \"\${$var+set}\"; then
- relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
- var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
- relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
fi
done
# Quote the link command for shipping.
- tagopts=
- for tag in $taglist; do
- tagopts="$tagopts --tag $tag"
- done
- relink_command="(cd `pwd`; $SHELL $0$tagopts --mode=relink $libtool_args)"
- relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
# Only create the output if not a dry run.
- if test -z "$run"; then
+ $opt_dry_run || {
for installed in no yes; do
if test "$installed" = yes; then
if test -z "$install_libdir"; then
@@ -4379,12 +7043,11 @@ fi\
for deplib in $dependency_libs; do
case $deplib in
*.la)
- name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- if test -z "$libdir"; then
- $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
- fi
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
newdependency_libs="$newdependency_libs $libdir/$name"
;;
*) newdependency_libs="$newdependency_libs $deplib" ;;
@@ -4392,37 +7055,68 @@ fi\
done
dependency_libs="$newdependency_libs"
newdlfiles=
+
for lib in $dlfiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
- fi
- newdlfiles="$newdlfiles $libdir/$name"
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
done
dlfiles="$newdlfiles"
newdlprefiles=
for lib in $dlprefiles; do
- name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
- eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- if test -z "$libdir"; then
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
- fi
- newdlprefiles="$newdlprefiles $libdir/$name"
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
done
dlprefiles="$newdlprefiles"
fi
- $rm $output
+ $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 ;;
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
- $echo > $output "\
+ $ECHO > $output "\
# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
@@ -4436,9 +7130,15 @@ library_names='$library_names'
# The name of the static archive.
old_library='$old_library'
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
# Libraries that this one depends upon.
dependency_libs='$dependency_libs'
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
# Version information for $libname.
current=$current
age=$age
@@ -4447,692 +7147,39 @@ revision=$revision
# Is this an already installed library?
installed=$installed
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
# Files to dlopen/dlpreopen
dlopen='$dlfiles'
dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
- if test "$installed" = no && test $need_relink = yes; then
- $echo >> $output "\
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
relink_command=\"$relink_command\""
fi
done
- fi
+ }
# Do a symbolic link so that the libtool archive can be found in
# LD_LIBRARY_PATH before the program is installed.
- $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
- $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
- ;;
- esac
- exit 0
- ;;
-
- # libtool install mode
- install)
- modename="$modename: install"
-
- # There may be an optional sh(1) argument at the beginning of
- # install_prog (especially on Windows NT).
- if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
- # Allow the use of GNU shtool's install 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
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
- arg="\"$arg\""
- ;;
- esac
- install_prog="$arg "
- arg="$1"
- shift
- else
- install_prog=
- arg="$nonopt"
- fi
-
- # 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
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog$arg"
-
- # We need to accept at least all the BSD install flags.
- dest=
- files=
- opts=
- prev=
- install_type=
- isdir=no
- stripme=
- for arg
- do
- if test -n "$dest"; then
- files="$files $dest"
- dest="$arg"
- continue
- fi
-
- case $arg in
- -d) isdir=yes ;;
- -f) prev="-f" ;;
- -g) prev="-g" ;;
- -m) prev="-m" ;;
- -o) prev="-o" ;;
- -s)
- stripme=" -s"
- continue
- ;;
- -*) ;;
-
- *)
- # If the previous option needed an argument, then skip it.
- if test -n "$prev"; then
- prev=
- else
- dest="$arg"
- continue
- fi
- ;;
- esac
-
- # Aesthetically quote the argument.
- arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
- arg="\"$arg\""
- ;;
- esac
- install_prog="$install_prog $arg"
- done
-
- if test -z "$install_prog"; then
- $echo "$modename: you must specify an install program" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- if test -n "$prev"; then
- $echo "$modename: the \`$prev' option requires an argument" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- if test -z "$files"; then
- if test -z "$dest"; then
- $echo "$modename: no file or destination specified" 1>&2
- else
- $echo "$modename: you must specify a destination" 1>&2
- fi
- $echo "$help" 1>&2
- exit 1
- fi
-
- # Strip any trailing slash from the destination.
- dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
- test "X$destdir" = "X$dest" && destdir=.
- destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files
- if test $# -gt 2; then
- $echo "$modename: \`$dest' is not a directory" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- esac
- done
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
;;
esac
+ exit $EXIT_SUCCESS
+}
- # This variable tells wrapper scripts just to set variables rather
- # than running their programs.
- libtool_install_magic="$magic"
-
- staticlibs=
- future_libdirs=
- current_libdirs=
- for file in $files; do
-
- # Do each installation.
- case $file in
- *.$libext)
- # Do the static libraries later.
- staticlibs="$staticlibs $file"
- ;;
-
- *.la)
- # Check to see that this really is a libtool archive.
- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
- else
- $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- library_names=
- old_library=
- relink_command=
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Add the libdir to current_libdirs if it is the destination.
- if test "X$destdir" = "X$libdir"; then
- case "$current_libdirs " in
- *" $libdir "*) ;;
- *) current_libdirs="$current_libdirs $libdir" ;;
- esac
- else
- # Note the libdir as a future libdir.
- case "$future_libdirs " in
- *" $libdir "*) ;;
- *) future_libdirs="$future_libdirs $libdir" ;;
- esac
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
- test "X$dir" = "X$file/" && dir=
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- $echo "$modename: warning: relinking \`$file'" 1>&2
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- exit 1
- fi
- fi
-
- # See the names of the shared library.
- set dummy $library_names
- if test -n "$2"; then
- realname="$2"
- shift
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- $show "$install_prog $dir/$srcname $destdir/$realname"
- $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
- $show "$striplib $destdir/$realname"
- $run eval "$striplib $destdir/$realname" || exit $?
- fi
-
- if test $# -gt 0; then
- # Delete the old symlinks, and create new ones.
- for linkname
- do
- if test "$linkname" != "$realname"; then
- $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
- $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
- fi
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- eval cmds=\"$postinstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- fi
-
- # Install the pseudo-library for information purposes.
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- instname="$dir/$name"i
- $show "$install_prog $instname $destdir/$name"
- $run eval "$install_prog $instname $destdir/$name" || exit $?
-
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
-
- *.lo)
- # Install (i.e. copy) a libtool object.
-
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
- esac
-
- # Install the libtool object if requested.
- if test -n "$destfile"; then
- $show "$install_prog $file $destfile"
- $run eval "$install_prog $file $destfile" || exit $?
- fi
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
- $show "$install_prog $staticobj $staticdest"
- $run eval "$install_prog \$staticobj \$staticdest" || exit $?
- fi
- exit 0
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- destfile="$destdir/$destfile"
- fi
-
- # Do a test to see if this is really a libtool program.
- if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- notinst_deplibs=
- relink_command=
-
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Check the variables that should have been set.
- if test -z "$notinst_deplibs"; then
- $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
- exit 1
- fi
-
- finalize=yes
- 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
- */* | *\\*) . $lib ;;
- *) . ./$lib ;;
- esac
- fi
- libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
- finalize=no
- fi
- done
-
- relink_command=
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- if test "$finalize" = yes && test -z "$run"; then
- tmpdir="/tmp"
- test -n "$TMPDIR" && tmpdir="$TMPDIR"
- tmpdir="$tmpdir/libtool-$$"
- if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
- else
- $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
- continue
- fi
- file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $show "$relink_command"
- if $run eval "$relink_command"; then :
- else
- $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- ${rm}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- $echo "$modename: warning: cannot relink \`$file'" 1>&2
- fi
- else
- # Install the binary that we compiled earlier.
- file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
-
- # 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"
- ;;
- esac
- done
-
- for file in $staticlibs; do
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- $show "$install_prog $file $oldlib"
- $run eval "$install_prog \$file \$oldlib" || exit $?
-
- if test -n "$stripme" && test -n "$striplib"; then
- $show "$old_striplib $oldlib"
- $run eval "$old_striplib $oldlib" || exit $?
- fi
-
- # Do each command in the postinstall commands.
- eval cmds=\"$old_postinstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
- done
- IFS="$save_ifs"
- done
-
- if test -n "$future_libdirs"; then
- $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
- fi
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $0 --finish$current_libdirs'
- else
- exit 0
- fi
- ;;
-
- # libtool finish mode
- finish)
- modename="$modename: finish"
- libdirs="$nonopt"
- admincmds=
-
- if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
- for dir
- do
- libdirs="$libdirs $dir"
- done
-
- for libdir in $libdirs; do
- if test -n "$finish_cmds"; then
- # Do each command in the finish commands.
- eval cmds=\"$finish_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || admincmds="$admincmds
- $cmd"
- done
- IFS="$save_ifs"
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $run eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- test "$show" = ":" && exit 0
-
- echo "----------------------------------------------------------------------"
- echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- echo " $libdir"
- done
- echo
- echo "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 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"
- echo " during execution"
- fi
- if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
- echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- echo
- echo "See any operating system documentation about shared libraries for"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
- exit 0
- ;;
-
- # libtool execute mode
- execute)
- modename="$modename: execute"
-
- # The first argument is the command name.
- cmd="$nonopt"
- if test -z "$cmd"; then
- $echo "$modename: you must specify a COMMAND" 1>&2
- $echo "$help"
- exit 1
- fi
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- if test ! -f "$file"; then
- $echo "$modename: \`$file' is not a file" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- dir=
- 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 :
- else
- $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
-
- # Read the libtool library.
- dlname=
- library_names=
-
- # If there is no directory component, then add one.
- case $file in
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit 1
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- test "X$dir" = "X$file" && dir=.
- ;;
-
- *)
- $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
- continue
- ;;
- esac
-
- # Get the absolute pathname.
- absdir=`cd "$dir" && pwd`
- test -n "$absdir" && dir="$absdir"
-
- # Now add the directory to shlibpath_var.
- if eval "test -z \"\$$shlibpath_var\""; then
- eval "$shlibpath_var=\"\$dir\""
- else
- eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
- fi
- done
-
- # This variable tells wrapper scripts just to set shlibpath_var
- # rather than running their programs.
- libtool_execute_magic="$magic"
-
- # Check if any of the arguments is a wrapper script.
- args=
- for file
- do
- 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
- */* | *\\*) . $file ;;
- *) . ./$file ;;
- esac
-
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
- args="$args \"$file\""
- done
-
- if test -z "$run"; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved enviroment variables
- if test "${save_LC_ALL+set}" = set; then
- LC_ALL="$save_LC_ALL"; export LC_ALL
- fi
- if test "${save_LANG+set}" = set; then
- LANG="$save_LANG"; export LANG
- fi
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
- # Now prepare to actually exec the command.
- exec_cmd='"$cmd"$args'
- else
- # Display what would be done.
- if test -n "$shlibpath_var"; then
- eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
- $echo "export $shlibpath_var"
- fi
- $echo "$cmd$args"
- exit 0
- fi
- ;;
- # libtool clean and uninstall mode
- clean | uninstall)
- modename="$modename: $mode"
- rm="$nonopt"
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
files=
rmforce=
exit_status=0
@@ -5144,33 +7191,32 @@ relink_command=\"$relink_command\""
for arg
do
case $arg in
- -f) rm="$rm $arg"; rmforce=yes ;;
- -*) rm="$rm $arg" ;;
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
*) files="$files $arg" ;;
esac
done
- if test -z "$rm"; then
- $echo "$modename: you must specify an RM program" 1>&2
- $echo "$help" 1>&2
- exit 1
- fi
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
rmdirs=
+ origobjdir="$objdir"
for file in $files; do
- dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$file"; then
- dir=.
- objdir="$objdir"
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
else
- objdir="$dir/$objdir"
+ objdir="$dir/$origobjdir"
fi
- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- test $mode = uninstall && objdir="$dir"
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
# Remember objdir for removal later, being careful to avoid duplicates
- if test $mode = clean; then
+ if test "$mode" = clean; then
case " $rmdirs " in
*" $objdir "*) ;;
*) rmdirs="$rmdirs $objdir" ;;
@@ -5178,15 +7224,15 @@ relink_command=\"$relink_command\""
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
- :
+ 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
+ exit_status=1
continue
elif test "$rmforce" = yes; then
- continue
+ continue
fi
rmfiles="$file"
@@ -5194,312 +7240,125 @@ relink_command=\"$relink_command\""
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
- . $dir/$name
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
# Delete the libtool libraries and symlinks.
for n in $library_names; do
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- if test $mode = uninstall; then
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
- eval cmds=\"$postuninstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd"
- if test $? != 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
fi
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
- eval cmds=\"$old_postuninstall_cmds\"
- IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd"
- if test $? != 0 && test "$rmforce" != yes; then
- exit_status=1
- fi
- done
- IFS="$save_ifs"
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
fi
# FIXME: should reinstall the best remaining shared library.
- fi
+ ;;
+ esac
fi
;;
*.lo)
# Possibly a libtool object, so verify it.
- if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if func_lalib_p "$file"; then
- # Read the .lo file
- . $dir/$name
+ # Read the .lo file
+ func_source $dir/$name
# Add PIC object to the list of files to remove.
- if test -n "$pic_object" \
- && test "$pic_object" != none; then
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
rmfiles="$rmfiles $dir/$pic_object"
- fi
+ fi
# Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" \
- && test "$non_pic_object" != none; then
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
rmfiles="$rmfiles $dir/$non_pic_object"
- fi
+ fi
fi
;;
*)
- # Do a test to see if this is a libtool program.
- if test $mode = clean &&
- (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- relink_command=
- . $dir/$file
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ relink_command=
+ func_source $dir/$noexename
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
fi
fi
;;
esac
- $show "$rm $rmfiles"
- $run $rm $rmfiles || exit_status=1
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
done
+ objdir="$origobjdir"
# 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
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
fi
done
exit $exit_status
- ;;
+}
- "")
- $echo "$modename: you must specify a MODE" 1>&2
- $echo "$generic_help" 1>&2
- exit 1
- ;;
- esac
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${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"
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
if test -n "$exec_cmd"; then
- eval exec $exec_cmd
- exit 1
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
fi
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
- --config show all configuration variables
- --debug enable verbose shell tracing
--n, --dry-run display commands without modifying any files
- --features display basic configuration information and exit
- --finish same as \`--mode=finish'
- --help display this help message and exit
- --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
- --quiet same as \`--silent'
- --silent don't print informational messages
- --tag=TAG use configuration variables from tag TAG
- --version print version information
-
-MODE must be one of the following:
-
- clean remove files from the build directory
- compile compile a source file into a libtool object
- execute automatically set library path, then run a program
- finish complete the installation of libtool libraries
- install install libraries or executables
- link create a library or an executable
- uninstall remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
- exit 0
- ;;
-
-clean)
- $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
- ;;
-
-compile)
- $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-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
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
- ;;
-
-execute)
- $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
- -dlopen FILE add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
- ;;
-
-finish)
- $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges. Use
-the \`--dry-run' option if you just want to see what would be executed."
- ;;
-
-install)
- $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command. The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
-link)
- $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
-
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -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
- -static do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename. Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
- ;;
-
-uninstall)
- $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
- ;;
-
-*)
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$help" 1>&2
- exit 1
- ;;
-esac
-
-echo
-$echo "Try \`$modename --help' for more information about other modes."
+exit $exit_status
-exit 0
# The TAGs below are defined such that we never get into a situation
# in which we disable both kinds of libraries. Given conflicting
@@ -5512,16 +7371,17 @@ exit 0
# If a disable-shared tag is given, we'll fallback to a static-only
# configuration. But we'll never go from static-only to shared-only.
-### BEGIN LIBTOOL TAG CONFIG: disable-shared
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
build_libtool_libs=no
build_old_libs=yes
-### END LIBTOOL TAG CONFIG: disable-shared
+# ### END LIBTOOL TAG CONFIG: disable-shared
-### BEGIN LIBTOOL TAG CONFIG: disable-static
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-### END LIBTOOL TAG CONFIG: disable-static
+# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
# mode:shell-script
# sh-indentation:2
# End:
+# vi:sw=2
diff --git a/contrib/binutils/ltoptions.m4 b/contrib/binutils/ltoptions.m4
new file mode 100644
index 0000000..7961b9f
--- /dev/null
+++ b/contrib/binutils/ltoptions.m4
@@ -0,0 +1,342 @@
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan <gary@gnu.org>
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 3 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(NAME)
+# -----------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(NAME)
+# --------------------
+# Set option NAME, and if there is a matching handler defined,
+# dispatch to it. Other NAMEs are saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1]),
+ _LT_MANGLE_DEFUN([$1]),
+ [m4_warning([Unknown Libtool option `$1'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1]), [$2], [$3])])
+
+
+# _LT_UNLESS_OPTIONS(OPTIONS, IF-NOT-SET)
+# ---------------------------------------
+# Execute IF-NOT-SET if all OPTIONS are not set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$1])),
+ [m4_ifdef(_LT_MANGLE_OPTION(_LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$2
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Libtool options.
+# If any OPTION has a handler macro declared with LT_OPTION_DEFINE,
+# dispatch to that macro; otherwise complain about the unknown option
+# and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$1])),
+ [_LT_SET_OPTION(_LT_Option)])
+dnl
+dnl Simply set some default values (i.e off) if boolean options were not
+dnl specified:
+_LT_UNLESS_OPTIONS([dlopen], [enable_dlopen=no
+])
+_LT_UNLESS_OPTIONS([win32-dll], [enable_win32_dll=no
+])
+dnl
+dnl If no reference was made to various pairs of opposing options, then
+dnl we run the default mode handler for the pair. For example, if neither
+dnl `shared' nor `disable-shared' was passed, we enable building of shared
+dnl archives by default:
+_LT_UNLESS_OPTIONS([shared disable-shared], [_LT_ENABLE_SHARED])
+_LT_UNLESS_OPTIONS([static disable-static], [_LT_ENABLE_STATIC])
+_LT_UNLESS_OPTIONS([pic-only no-pic], [_LT_WITH_PIC])
+_LT_UNLESS_OPTIONS([fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(NAME, CODE)
+# ----------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1]), [$2])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[_LT_SET_OPTION([win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
diff --git a/contrib/binutils/ltsugar.m4 b/contrib/binutils/ltsugar.m4
new file mode 100644
index 0000000..fc51dc7
--- /dev/null
+++ b/contrib/binutils/ltsugar.m4
@@ -0,0 +1,111 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 3 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+m4_define([lt_join],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [],
+ [2], [[$2]],
+ [m4_ifval([$2],
+ [[$2][]m4_foreach(_lt_Arg, lt_car([m4_shiftn(2, $@)]),
+ [_$0([$1], _lt_Arg)])],
+ [$0([$1], m4_shiftn(2, $@))])])[]dnl
+])
+m4_define([_lt_join],
+[m4_ifval([$2],[$1][$2])[]dnl
+])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+m4_define([lt_combine],
+[m4_if([$2], [], [],
+ [m4_if([$4], [], [],
+ [lt_join(m4_quote(m4_default([$1], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2],
+ [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]),
+ [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl
+])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_bmatch($3[]m4_defn([$1])$3, $3[]m4_re_escape([$2])$3,
+ [$5],
+ [m4_append([$1], [$2], [$3])$4])],
+ [m4_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$4])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/contrib/binutils/ltversion.m4 b/contrib/binutils/ltversion.m4
new file mode 100644
index 0000000..7c82eac
--- /dev/null
+++ b/contrib/binutils/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant.
+#
+## This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in; do not edit by hand
+
+# serial 2435 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.1a])
+m4_define([LT_PACKAGE_REVISION], [1.2435])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.1a'
+macro_revision='1.2435'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/contrib/binutils/opcodes/ChangeLog b/contrib/binutils/opcodes/ChangeLog
index aa7e202..f6c6418 100644
--- a/contrib/binutils/opcodes/ChangeLog
+++ b/contrib/binutils/opcodes/ChangeLog
@@ -1,305 +1,639 @@
-2006-06-09 Nick Clifton <nickc@redhat.com>
+2007-07-03 Nathan Sidwell <nathan@codesourcery.com>
- * po/fi.po: Updated Finnish translation.
+ * m68k-dis.c (fetch_arg): Add E. Replace length switch with
+ direct masking.
+ (print_ins_arg): Add j & K operand types.
+ (match_insn_m68k): Check and skip initial '.' arg character.
+ (m68k_scan_mask): Likewise.
+ * m68k-opc.c (m68k_opcodes): Add coprocessor instructions.
-2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+2007-07-02 Alan Modra <amodra@bigpond.net.au>
- * po/Make-in (pdf, ps): New dummy targets.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * po/opcodes.pot: Regenerate.
-2006-05-30 Nick Clifton <nickc@redhat.com>
+2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
- * po/es.po: Updated Spanish translation.
+ * aclocal.m4: Regenerated.
+ * Makefile.in: Likewise.
-2006-05-26 Richard Sandiford <richard@codesourcery.com>
+2007-06-29 H.J. Lu <hongjiu.lu@intel.com>
- * m68k-opc.c (m68k_opcodes): Fix the masks of the Coldfire fmovemd
- and fmovem entries. Put register list entries before immediate
- mask entries. Use "l" rather than "L" in the fmovem entries.
- * m68k-dis.c (match_insn_m68k): Remove the PRIV argument and work it
- out from INFO.
- (m68k_scan_mask): New function, split out from...
- (print_insn_m68k): ...here. If no architecture has been set,
- first try printing an m680x0 instruction, then try a Coldfire one.
+ * i386-reg.tbl: Remove spaces before comments.
-2006-05-24 Nick Clifton <nickc@redhat.com>
+2007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
- * po/ga.po: Updated Irish translation.
+ * cr16-opc.c: New file.
+ * cr16-dis.c: New file.
+ * Makefile.am: Entries for cr16.
+ * Makefile.in: Regenerate.
+ * cofigure.in: Add cr16 target information.
+ * configure : Regenerate.
+ * disassemble.c: Add cr16 target information.
-2006-05-22 Nick Clifton <nickc@redhat.com>
+2007-06-28 H.J. Lu <hongjiu.lu@intel.com>
- * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts.
+ * Makefile.am (HFILES): Add i386-opc.h and i386-tbl.h.
+ (CFILES): Add i386-gen.c.
+ (i386-gen): New rule.
+ (i386-gen.o): Likewise.
+ (i386-tbl.h): Likewise.
+ Run "make dep-am".
+ * Makefile.in: Regenerated.
-2006-05-22 Nick Clifton <nickc@redhat.com>
+ * i386-gen.c: New file.
+ * i386-opc.tbl: Likewise.
+ * i386-reg.tbl: Likewise.
+ * i386-tbl.h: Likewise.
- * po/nl.po: Updated translation.
+ * i386-opc.c: Include "i386-tbl.h".
+ (i386_optab): Removed.
+ (i386_regtab): Likewise.
+ (i386_regtab_size): Likewise.
-2006-05-18 Alan Modra <amodra@bigpond.net.au>
+2007-06-26 Paul Brook <paul@codesourcery.com>
- * avr-dis.c (avr_operand): Warning fix.
+ * arm-dis.c (coprocessor_opcodes): Add fmxr/fmrx mvfr0/mvfr1.
-2006-05-04 Thiemo Seufer <ths@mips.com>
+2007-06-25 H.J. Lu <hongjiu.lu@intel.com>
- * mips-opc.c (mips_builtin_opcodes): Fix mftr argument order.
+ * i386-opc.h (regKludge): Renamed to ...
+ (RegKludge): This.
-2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+ * i386-opc.c (i386_optab): Replace regKludge with RegKludge.
- * po/POTFILES.in: Regenerated.
+2007-06-23 H.J. Lu <hongjiu.lu@intel.com>
-2006-04-12 Hochstein <hochstein@algo.informatik.tu-darmstadt.de>
+ PR binutils/4667
+ * i386-dis.c (EX): Removed.
+ (EMd): New.
+ (EMq): Likewise.
+ (EXd): Likewise.
+ (EXq): Likewise.
+ (EXx): Likewise.
+ (PREGRP93...PREGRP97): Likewise.
+ (dis386_twobyte): Updated.
+ (prefix_user_table): Updated. Add PREGRP93...PREGRP97.
+ (OP_EX): Remove Intel syntax handling.
- PR binutils/2454
- * avr-dis.c (avr_operand): Arrange for a comment to appear before
- the symolic form of an address, so that the output of objdump -d
- can be reassembled.
+2007-06-18 Nathan Sidwell <nathan@codesourcery.com>
-2006-04-10 DJ Delorie <dj@redhat.com>
+ * m68k-opc.c (m68k_opcodes): Add wdebugl variants.
- * m32c-asm.c: Regenerate.
+2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (ACLOCAL_AMFLAGS): Add -I ../config -I ../bfd.
+
+ * acinclude.m4: Removed.
+
+ * Makefile.in: Regenerated.
+ * doc/Makefile.in: Likewise.
+ * aclocal.m4: Likewise.
+ * configure: Likewise.
+
+2007-06-05 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (thumb32_opcodes): Display writeback ldrd/strd addresses.
+
+2007-05-24 Steve Ellcey <sje@cup.hp.com>
+
+ * Makefile.in: Regnerate.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+
+2007-05-18 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-dis.c (print_insn_powerpc): Don't skip all operands
+ after setting skip_optional.
+
+2007-05-16 Peter Bergner <bergner@vnet.ibm.com>
+
+ * ppc-dis.c (operand_value_powerpc, skip_optional_operands): New.
+ (print_insn_powerpc): Use the new operand_value_powerpc and
+ skip_optional_operands functions to omit or print all optional
+ operands as a group.
+ * ppc-opc.c (BFF, W, XFL_L, XWRA_MASK): New.
+ (XFL_MASK): Delete L and W bits from the mask.
+ (mtfsfi, mtfsfi.): Replace use of BF with BFF. Relpace use of XRA_MASK
+ with XWRA_MASK. Use W.
+ (mtfsf, mtfsf.): Use XFL_L and W.
+
+2007-05-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/4502
+ * i386-dis.c (Suffix3DNow): Replace "pfmulhrw" with "pmulhrw".
+
+2007-05-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-opc.h (ShortForm): Redefined.
+ (Jump): Likewise.
+ (JumpDword): Likewise.
+ (JumpByte): Likewise.
+ (JumpInterSegment): Likewise.
+ (FloatMF): Likewise.
+ (FloatR): Likewise.
+ (FloatD): Likewise.
+ (Size16): Likewise.
+ (Size32): Likewise.
+ (Size64): Likewise.
+ (IgnoreSize): Likewise.
+ (DefaultSize): Likewise.
+ (No_bSuf): Likewise.
+ (No_wSuf): Likewise.
+ (No_lSuf): Likewise.
+ (No_sSuf): Likewise.
+ (No_qSuf): Likewise.
+ (No_xSuf): Likewise.
+ (FWait): Likewise.
+ (IsString): Likewise.
+ (regKludge): Likewise.
+ (IsPrefix): Likewise.
+ (ImmExt): Likewise.
+ (NoRex64): Likewise.
+ (Rex64): Likewise.
+ (Ugh): Likewise.
+
+2007-05-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (threebyte_0x38_uses_DATA_prefix): Correct entries
+ for some SSE4 instructions.
+ (threebyte_0x3a_uses_DATA_prefix): Likewise.
+
+2007-05-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (CRC32_Fixup): Don't print suffix in Intel mode.
+
+ * i386-opc.c (i386_optab): Remove IgnoreSize and correct operand
+ type for crc32.
+
+2007-05-01 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (CRC32_Fixup): Properly handle Intel mode and
+ check data size prefix in 16bit mode.
+
+ * i386-opc.c (i386_optab): Default crc32 to non-8bit and
+ support Intel mode.
+
+2007-04-30 Mark Salter <msalter@redhat.com>
+
+ * frv-desc.c: Regenerate.
+ * frv-desc.h: Regenerate.
+
+2007-04-30 Alan Modra <amodra@bigpond.net.au>
+
+ PR 4436
+ * ppc-opc.c (powerpc_operands): Correct bitm for second entry of MBE.
+
+2007-04-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (modrm): Put reg before rm.
+
+2007-04-26 H.J. Lu <hongjiu.lu@intel.com>
-2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+ PR binutils/4430
+ * i386-dis.c (print_displacement): New.
+ (OP_E): Call print_displacement instead of print_operand_value
+ to output displacement when either base or index exist. Print
+ the explicit zero displacement in 16bit mode.
- * Makefile.am: Add install-html target.
+2007-04-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/4429
+ * i386-dis.c (print_insn): Also swap the order of op_riprel
+ when swapping op_index. Break when the RIP relative address
+ is printed.
+ (OP_E): Properly handle RIP relative addressing and print the
+ explicit zero displacement for Intel mode.
+
+2007-04-27 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
+ * ns32k-dis.c: Include sysdep.h first.
-2006-04-06 Nick Clifton <nickc@redhat.com>
+2007-04-24 Andreas Krebbel <krebbel1@de.ibm.com>
- * po/vi/po: Updated Vietnamese translation.
+ * opcodes/s390-opc.c (MASK_SSF_RRDRD): Fourth nybble belongs to the
+ opcode.
+ * opcodes/s390-opc.txt (pfpo, ectg, csst): Add new z9-ec instructions.
-2006-03-31 Paul Koning <ni1d@arrl.net>
+2007-04-24 Nick Clifton <nickc@redhat.com>
- * pdp11-opc.c (pdp11_opcodes): Fix opcode for SEC instruction.
+ * arm-dis.c (print_insn): Initialise type.
-2006-03-16 Bernd Schmidt <bernd.schmidt@analog.com>
+2007-04-24 Alan Modra <amodra@bigpond.net.au>
- * bfin-dis.c (decode_dsp32shiftimm_0): Simplify and correct the
- logic to identify halfword shifts.
+ * cgen-types.h: Include bfd_stdint.h, not stdint.h.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
-2006-03-16 Paul Brook <paul@codesourcery.com>
+2007-04-23 Nathan Sidwell <nathan@codesourcery.com>
- * arm-dis.c (arm_opcodes): Rename swi to svc.
- (thumb_opcodes): Ditto.
+ * m68k-opc.c: Mark mcfisa_c instructions.
-2006-03-13 DJ Delorie <dj@redhat.com>
+2007-04-21 Richard Earnshaw <rearnsha@arm.com>
- * m32c-asm.c: Regenerate.
- * m32c-desc.c: Likewise.
- * m32c-desc.h: Likewise.
- * m32c-dis.c: Likewise.
- * m32c-ibld.c: Likewise.
- * m32c-opc.c: Likewise.
- * m32c-opc.h: Likewise.
-
-2006-03-10 DJ Delorie <dj@redhat.com>
-
- * m32c-desc.c: Regenerate with mul.l, mulu.l.
- * m32c-opc.c: Likewise.
- * m32c-opc.h: Likewise.
-
-
-2006-03-09 Nick Clifton <nickc@redhat.com>
-
- * po/sv.po: Updated Swedish translation.
-
-2006-03-07 H.J. Lu <hongjiu.lu@intel.com>
-
- PR binutils/2428
- * i386-dis.c (REP_Fixup): New function.
- (AL): Remove duplicate.
- (Xbr): New.
- (Xvr): Likewise.
- (Ybr): Likewise.
- (Yvr): Likewise.
- (indirDXr): Likewise.
- (ALr): Likewise.
- (eAXr): Likewise.
- (dis386): Updated entries of ins, outs, movs, lods and stos.
-
-2006-03-05 Nick Clifton <nickc@redhat.com>
-
- * cgen-ibld.in (insert_normal): Cope with attempts to insert a
- signed 32-bit value into an unsigned 32-bit field when the host is
- a 64-bit machine.
- * fr30-ibld.c: Regenerate.
- * frv-ibld.c: Regenerate.
- * ip2k-ibld.c: Regenerate.
- * iq2000-asm.c: Regenerate.
- * iq2000-ibld.c: Regenerate.
- * m32c-ibld.c: Regenerate.
- * m32r-ibld.c: Regenerate.
- * openrisc-ibld.c: Regenerate.
- * xc16x-ibld.c: Regenerate.
- * xstormy16-ibld.c: Regenerate.
+ * arm-dis.c (arm_opcodes): Disassemble to unified syntax.
+ (thumb_opcodes): Add missing white space in adr.
+ (arm_decode_shift): New parameter, print_shift. Only decode the
+ shift parameter if set. Adjust callers.
+ (print_insn_arm): Support for operand type q with no shift decode.
-2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
+2007-04-21 Alan Modra <amodra@bigpond.net.au>
- * xc16x-asm.c: Regenerate.
- * xc16x-dis.c: Regenerate.
+ * i386-opc.c (i386_float_regtab, i386_float_regtab_size): Delete.
+ Move contents to..
+ (i386_regtab): ..here.
+ * i386-opc.h (i386_float_regtab, i386_float_regtab_size): Delete.
+
+ * ppc-opc.c (powerpc_operands): Delete duplicate entries.
+ (BA_MASK, FXM_MASK, STRM_MASK, VA_MASK, VB_MASK, VC_MASK): Delete.
+ (VD_MASK, WS_MASK, MTMSRD_L, XRT_L): Delete.
+ (powerpc_opcodes): Replace uses of MTMSRD_L and XRT_L.
-2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+2007-04-20 Nathan Sidwell <nathan@codesourcery.com>
- * po/Make-in: Add html target.
+ * m68k-dis.c (print_insn_arg): Show c04 as rambar0 and c05 as
+ rambar1.
-2006-02-27 H.J. Lu <hongjiu.lu@intel.com>
+2007-04-20 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-dis.c (print_insn_powerpc): Adjust for struct powerpc_operand
+ change.
+ * ppc-opc.c (powerpc_operands): Replace bit count with bit mask
+ in all entries. Add PPC_OPERAND_SIGNED to DE entry. Remove
+ references to following deleted functions.
+ (insert_bd, extract_bd, insert_dq, extract_dq): Delete.
+ (insert_ds, extract_ds, insert_de, extract_de): Delete.
+ (insert_des, extract_des, insert_li, extract_li): Delete.
+ (insert_nb, insert_rsq, insert_rtq, insert_ev2, extract_ev2): Delete.
+ (insert_ev4, extract_ev4, insert_ev8, extract_ev8): Delete.
+ (num_powerpc_operands): New constant.
+ (XSPRG_MASK): Remove entire SPRG field.
+ (powerpc_opcodes <bcctre, bcctrel>): Use XLBB_MASK not XLYBB_MASK.
+
+2007-04-20 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (DCM, DGM, TE, RMC, R, SP, S): Correct shift.
+ (Z2_MASK): Define.
+ (powerpc_opcodes): Use Z2_MASK in all insns taking RMC operand.
+
+2007-04-20 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-dis.c (print_insn): Only look for a mapping symbol in the section
+ being disassembled.
+
+2007-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
- * i386-dis.c (IS_3BYTE_OPCODE): New for 3-byte opcodes used by
- Intel Merom New Instructions.
- (THREE_BYTE_0): Likewise.
- (THREE_BYTE_1): Likewise.
+2007-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (powerpc_opcodes): Add cctpl, cctpm, cctph, db8cyc,
+ db10cyc, db12cyc, db16cyc.
+
+2007-04-19 Nathan Froyd <froydnj@codesourcery.com>
+
+ * ppc-opc.c (powerpc_opcodes): Recognize three-operand tlbsxe.
+
+2007-04-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (CRC32_Fixup): New.
+ (PREGRP85, PREGRP86, PREGRP87, PREGRP88, PREGRP89, PREGRP90,
+ PREGRP91): New.
+ (threebyte_0x38_uses_DATA_prefix): Updated for SSE4.2.
+ (threebyte_0x3a_uses_DATA_prefix): Likewise.
+ (prefix_user_table): Add PREGRP85, PREGRP86, PREGRP87,
+ PREGRP88, PREGRP89, PREGRP90 and PREGRP91.
(three_byte_table): Likewise.
- (dis386_twobyte): Use THREE_BYTE_0 for entry 0x38. Use
- THREE_BYTE_1 for entry 0x3a.
- (twobyte_has_modrm): Updated.
- (twobyte_uses_SSE_prefix): Likewise.
- (print_insn): Handle 3-byte opcodes used by Intel Merom New
- Instructions.
-
-2006-02-24 David S. Miller <davem@sunset.davemloft.net>
-
- * sparc-dis.c (v9_priv_reg_names): Add "gl" entry.
- (v9_hpriv_reg_names): New table.
- (print_insn_sparc): Allow values up to 16 for '?' and '!'.
- New cases '$' and '%' for read/write hyperprivileged register.
- * sparc-opc.c (sparc_opcodes): Add new entries for UA2005
- window handling and rdhpr/wrhpr instructions.
-
-2006-02-24 DJ Delorie <dj@redhat.com>
-
- * m32c-desc.c: Regenerate with linker relaxation attributes.
- * m32c-desc.h: Likewise.
- * m32c-dis.c: Likewise.
- * m32c-opc.c: Likewise.
-
-2006-02-24 Paul Brook <paul@codesourcery.com>
-
- * arm-dis.c (arm_opcodes): Add V7 instructions.
- (thumb32_opcodes): Ditto. Handle V7M MSR/MRS variants.
- (print_arm_address): New function.
- (print_insn_arm): Use it. Add 'P' and 'U' cases.
- (psr_name): New function.
- (print_insn_thumb32): Add 'U', 'C' and 'D' cases.
-
-2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
-
- * ia64-opc-i.c (bXc): New.
- (mXc): Likewise.
- (OpX2TaTbYaXcC): Likewise.
- (TF). Likewise.
- (TFCM). Likewise.
- (ia64_opcodes_i): Add instructions for tf.
-
- * ia64-opc.h (IMMU5b): New.
-
- * ia64-asmtab.c: Regenerated.
-
-2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
-
- * ia64-gen.c: Update copyright years.
- * ia64-opc-b.c: Likewise.
-
-2006-02-22 H.J. Lu <hongjiu.lu@intel.com>
-
- * ia64-gen.c (lookup_regindex): Handle ".vm".
- (print_dependency_table): Handle '\"'.
-
- * ia64-ic.tbl: Updated from SDM 2.2.
- * ia64-raw.tbl: Likewise.
- * ia64-waw.tbl: Likewise.
- * ia64-asmtab.c: Regenerated.
-
- * ia64-opc-b.c (ia64_opcodes_b): Add vmsw.0 and vmsw.1.
-
-2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
- Anil Paranjape <anilp1@kpitcummins.com>
- Shilin Shakti <shilins@kpitcummins.com>
-
- * xc16x-desc.h: New file
- * xc16x-desc.c: New file
- * xc16x-opc.h: New file
- * xc16x-opc.c: New file
- * xc16x-ibld.c: New file
- * xc16x-asm.c: New file
- * xc16x-dis.c: New file
- * Makefile.am: Entries for xc16x
- * Makefile.in: Regenerate
- * cofigure.in: Add xc16x target information.
- * configure: Regenerate.
- * disassemble.c: Add xc16x target information.
-2006-02-11 H.J. Lu <hongjiu.lu@intel.com>
+ * i386-opc.c (i386_optab): Add SSE4.2 opcodes.
- * i386-dis.c (dis386_twobyte): Use "movZ" for debug register
- moves.
+ * i386-opc.h (CpuSSE4_2): New.
+ (CpuSSE4): Likewise.
+ (CpuUnknownFlags): Add CpuSSE4_2.
-2006-02-11 H.J. Lu <hongjiu.lu@intel.com>
+2007-04-18 H.J. Lu <hongjiu.lu@intel.com>
- * i386-dis.c ('Z'): Add a new macro.
- (dis386_twobyte): Use "movZ" for control register moves.
+ * i386-dis.c (XMM_Fixup): New.
+ (Edqb): New.
+ (Edqd): New.
+ (XMM0): New.
+ (dqb_mode): New.
+ (dqd_mode): New.
+ (PREGRP39 ... PREGRP85): New.
+ (threebyte_0x38_uses_DATA_prefix): Updated for SSE4.
+ (threebyte_0x3a_uses_DATA_prefix): Likewise.
+ (prefix_user_table): Add PREGRP39 ... PREGRP85.
+ (three_byte_table): Likewise.
+ (putop): Handle 'K'.
+ (intel_operand_size): Handle dqb_mode, dqd_mode):
+ (OP_E): Likewise.
+ (OP_G): Likewise.
-2006-02-10 Nick Clifton <nickc@redhat.com>
+ * i386-opc.c (i386_optab): Add SSE4.1 opcodes.
- * iq2000-asm.c: Regenerate.
+ * i386-opc.h (CpuSSE4_1): New.
+ (CpuUnknownFlags): Add CpuSSE4_1.
+ (regKludge): Update comment.
-2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+2007-04-18 Matthias Klose <doko@ubuntu.com>
- * m68k-dis.c (print_insn_m68k): Use bfd_m68k_mach_to_features.
+ * Makefile.am (libopcodes_la_LDFLAGS): Use bfd soversion.
+ * Makefile.in: Regenerate.
+
+2007-04-14 Steve Ellcey <sje@cup.hp.com>
+
+ * Makefile.am: Add ACLOCAL_AMFLAGS.
+ * Makefile.in: Regenerate.
-2006-01-26 David Ung <davidu@mips.com>
+2007-04-13 H.J. Lu <hongjiu.lu@intel.com>
- * mips-opc.c: Add I33 masks to these MIPS32R2 instructions: prefx,
- ceil.l.d, ceil.l.s, cvt.d.l, cvt.l.d, cvt.l.s, cvt.s.l, floor.l.d,
- floor.l.s, ldxc1, lwxc1, madd.d, madd.s, msub.d, msub.s, nmadd.d,
- nmadd.s, nmsub.d, nmsub.s, recip.d, recip.s, round.l.d, rsqrt.d,
- rsqrt.s, sdxc1, swxc1, trunc.l.d, trunc.l.s.
+ * i386-dis.c: Remove trailing white spaces.
+ * i386-opc.c: Likewise.
+ * i386-opc.h: Likewise.
-2006-01-18 Arnold Metselaar <arnoldm@sourceware.org>
+2007-04-11 H.J. Lu <hongjiu.lu@intel.com>
- * z80-dis.c (struct buffer, prt_d, prt_d_n, arit_d, ld_r_d,
- ld_d_r, pref_xd_cb): Use signed char to hold data to be
- disassembled.
- * z80-dis.c (TXTSIZ): Increase buffer size to 24, this fixes
- buffer overflows when disassembling instructions like
- ld (ix+123),0x23
- * z80-dis.c (opc_ind, pref_xd_cb): Suppress '+' in an indexed
- operand, if the offset is negative.
+ PR binutils/4333
+ * i386-dis.c (GRP1a): New.
+ (GRP1b ... GRPPADLCK2): Update index.
+ (dis386): Use GRP1a for entry 0x8f.
+ (mod, rm, reg): Removed. Replaced by ...
+ (modrm): This.
+ (grps): Add GRP1a.
-2006-01-17 Arnold Metselaar <arnoldm@sourceware.org>
+2007-04-09 Kazu Hirata <kazu@codesourcery.com>
- * z80-dis.c (struct buffer, prt_d, prt_d_n, pref_xd_cb): Use
- unsigned char to hold data to be disassembled.
+ * m68k-dis.c (print_insn_m68k): Restore info->fprintf_func and
+ info->print_address_func if longjmp is called.
-2006-01-17 Andreas Schwab <schwab@suse.de>
+2007-03-29 DJ Delorie <dj@redhat.com>
- PR binutils/1486
- * disassemble.c (disassemble_init_for_target): Set
- disassembler_needs_relocs for bfd_arch_arm.
+ * m32c-desc.c: Regenerate.
+ * m32c-dis.c: Regenerate.
+ * m32c-opc.c: Regenerate.
-2006-01-16 Paul Brook <paul@codesourcery.com>
+2007-03-28 H.J. Lu <hongjiu.lu@intel.com>
- * m68k-opc.c (m68k_opcodes): Fix opcodes for ColdFire f?abss,
- f?add?, and f?sub? instructions.
+ * i386-opc.c (i386_optab): Change InvMem to RegMem for mov and
+ movq. Remove InvMem from sldt, smsw and str.
-2006-01-16 Nick Clifton <nickc@redhat.com>
+ * i386-opc.h (InvMem): Renamed to ...
+ (RegMem): Update comments.
+ (AnyMem): Remove InvMem.
- * po/zh_CN.po: New Chinese (simplified) translation.
- * configure.in (ALL_LINGUAS): Add "zh_CH".
- * configure: Regenerate.
+2007-03-27 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (thumb_opcodes): Add entry for undefined insns (0xbe??).
-2006-01-05 Paul Brook <paul@codesourcery.com>
+2007-03-24 Paul Brook <paul@codesourcery.com>
- * m68k-opc.c (m68k_opcodes): Add missing ColdFire fdsqrtd entry.
+ * arm-dis.c (coprocessor_opcodes): Remove superfluous 0x.
+ (print_insn_coprocessor): Handle %<bitfield>x.
-2006-01-06 DJ Delorie <dj@redhat.com>
+2007-03-24 Paul Brook <paul@codesourcery.com>
+ Mark Shinwell <shinwell@codesourcery.com>
+ * arm-dis.c (arm_opcodes): Print SRS base register.
+
+2007-03-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (prefix_name): Replace rex64XYZ with rex.WRXB.
+
+ * i386-opc.c (i386_optab): Add rex.wrxb.
+
+2007-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (REX_MODE64): Remove definition.
+ (REX_EXTX): Likewise.
+ (REX_EXTY): Likewise.
+ (REX_EXTZ): Likewise.
+ (USED_REX): Use REX_OPCODE instead of 0x40.
+ Replace REX_MODE64, REX_EXTX, REX_EXTY and REX_EXTZ with REX_W,
+ REX_R, REX_X and REX_B respectively.
+
+2007-03-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/4218
+ * i386-dis.c (PREGRP38): New.
+ (dis386): Use PREGRP38 for 0x90.
+ (prefix_user_table): Add PREGRP38.
+ (print_insn): Set uses_REPZ_prefix to 1 for pause.
+ (NOP_Fixup1): Properly handle REX bits.
+ (NOP_Fixup2): Likewise.
+
+ * i386-opc.c (i386_optab): Allow %eax with xchg in 64bit.
+ Allow register with nop.
+
+2007-03-20 DJ Delorie <dj@redhat.com>
+
+ * m32c-asm.c: Regenerate.
* m32c-desc.c: Regenerate.
+ * m32c-desc.h: Regenerate.
+ * m32c-dis.h: Regenerate.
+ * m32c-ibld.c: Regenerate.
* m32c-opc.c: Regenerate.
* m32c-opc.h: Regenerate.
-2006-01-03 DJ Delorie <dj@redhat.com>
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-opc.c: Include "libiberty.h".
+ (i386_regtab): Remove the last entry.
+ (i386_regtab_size): New.
+ (i386_float_regtab_size): Likewise.
+
+ * i386-opc.h (i386_regtab_size): New.
+ (i386_float_regtab_size): Likewise.
+
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.am (CFILES): Add i386-opc.c.
+ (ALL_MACHINES): Add i386-opc.lo.
+ Run "make dep-am".
+ * Makefile.in: Regenerated.
+
+ * configure.in: Add i386-opc.lo for bfd_i386_arch.
+ * configure: Regenerated.
+
+ * i386-dis.c: Include "opcode/i386.h".
+ (MAXLEN): Renamed to MAX_MNEM_SIZE. Remove definition.
+ (FWAIT_OPCODE): Remove definition.
+ (UNIXWARE_COMPAT): Renamed to SYSV386_COMPAT. Remove definition.
+ (MAX_OPERANDS): Remove definition.
+
+ * i386-opc.c: New file.
+ * i386-opc.h: Likewise.
+
+2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.in: Regenerated.
+
+2007-03-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (OP_Rd): Renamed to ...
+ (OP_R): This.
+ (Rd): Updated.
+ (Rm): Likewise.
+
+2007-03-08 Alan Modra <amodra@bigpond.net.au>
+
+ * fr30-asm.c: Regenerate.
+ * frv-asm.c: Regenerate.
+ * ip2k-asm.c: Regenerate.
+ * iq2000-asm.c: Regenerate.
+ * m32c-asm.c: Regenerate.
+ * m32r-asm.c: Regenerate.
+ * m32r-dis.c: Regenerate.
+ * mt-asm.c: Regenerate.
+ * mt-ibld.c: Regenerate.
+ * mt-opc.c: Regenerate.
+ * openrisc-asm.c: Regenerate.
+ * xc16x-asm.c: Regenerate.
+ * xstormy16-asm.c: Regenerate.
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2007-03-06 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * opcodes/s390-opc.c (INSTR_RRE_FR, INSTR_RRF_F0FF2, INSTR_RRF_F0FR,
+ INSTR_RRF_UUFF, INSTR_RRF_0UFF, INSTR_RRF_FFFU, INSTR_RRR_F0FF): New
+ instruction formats added.
+ (MASK_RRE_FR, MASK_RRF_F0FF2, MASK_RRF_F0FR, MASK_RRF_UUFF,
+ MASK_RRF_0UFF, MASK_RRF_FFFU, MASK_RRR_F0FF): New instruction format
+ masks added.
+ * opcodes/s390-opc.txt (lpdfr - tgxt): Decimal floating point
+ instructions added.
+ * opcodes/s390-mkopc.c (s390_opcode_cpu_val): S390_OPCODE_Z9_EC added.
+ (main): z9-ec cpu type option added.
+ * include/opcode/s390.h (s390_opcode_cpu_val): S390_OPCODE_Z9_EC added.
+
+2007-02-22 DJ Delorie <dj@redhat.com>
+
+ * s390-opc.c (INSTR_SS_L2RDRD): New.
+ (MASK_SS_L2RDRD): New.
+ * s390-opc.txt (pka): Use it.
+
+2007-02-20 Thiemo Seufer <ths@mips.com>
+ Chao-Ying Fu <fu@mips.com>
+
+ * mips-dis.c (mips_arch_choices): Add DSP R2 support.
+ (print_insn_args): Add support for balign instruction.
+ * mips-opc.c (D33): New shortcut for DSP R2 instructions.
+ (mips_builtin_opcodes): Add DSP R2 instructions.
+
+2007-02-19 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * s390-opc.c (INSTR_RRF_U0FR, MASK_RRF_U0FR): Removed.
+ (INSTR_RRF_U0RF, MASK_RRF_U0RF): Added.
+ * s390-opc.txt (cfxbr, cfdbr, cfebr, cgebr, cgdbr, cgxbr, cger, cgdr,
+ cgxr, cfxr, cfdr, cfer): Instruction type set to INSTR_RRF_U0RF.
+
+2007-02-19 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * s390-opc.txt ("efpc", "sfpc"): Set to RRE_RR_OPT instruction type.
+ * s390-opc.c (s390_operands): Add RO_28 as optional gpr.
+ (INSTR_RRE_RR_OPT, MASK_RRE_RR_OPT): New instruction type for efpc
+ and sfpc.
+
+2007-02-16 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/4045
+ * avr-dis.c (comment_start): New variable, contains the prefix to
+ use when printing addresses in comments.
+ (print_insn_avr): Set comment_start to an empty space if there is
+ no symbol table available as the generic address printing code
+ will prefix the numeric value of the address with 0x.
+
+2007-02-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c: Updated to use an array of MAX_OPERANDS operands
+ in struct dis386.
+
+2007-02-05 Dave Brolley <brolley@redhat.com>
+ Richard Sandiford <rsandifo@redhat.com>
+ DJ Delorie <dj@redhat.com>
+ Graydon Hoare <graydon@redhat.com>
+ Frank Ch. Eigler <fche@redhat.com>
+ Ben Elliston <bje@redhat.com>
+
+ * Makefile.am (HFILES): Add mep-desc.h mep-opc.h.
+ (CFILES): Add mep-*.c
+ (ALL_MACHINES): Add mep-*.lo.
+ (CLEANFILES): Add stamp-mep.
+ (CGEN_CPUS): Add mep.
+ (MEP_DEPS): New variable.
+ (mep-*): New targets.
+ * configure.in: Handle bfd_mep_arch.
+ * disassemble.c (ARCH_mep): New macro.
+ (disassembler): Handle bfd_arch_mep.
+ (disassemble_init_for_target): Likewise.
+ * mep-*: New files for Toshiba Media Processor (MeP).
+ * Makefile.in: Regenerated.
+ * configure: Regenerated.
+
+2007-02-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (OP_J): Undo the last change. Properly handle 64K
+ wrap around within the same segment in 16bit mode.
+
+2007-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (OP_J): Mask to 16bit only if there is a data16
+ prefix.
+
+2007-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * avr-dis.c (avr_operand): Correct PR number in comment.
+
+2007-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * disassemble.c (disassembler_usage): Call
+ print_i386_disassembler_options for i386 disassembler.
+
+ * i386-dis.c (print_i386_disassembler_options): New.
+ (print_insn): Support the new addr64 option.
+
+2007-02-02 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
+
+ * ppc-dis.c (powerpc_dialect): Handle ppc440.
+ * ppc-dis.c (print_ppc_disassembler_options): Note the -M440 can
+ be used.
+
+2007-02-02 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (insert_bdm): -Many comment.
+ (valid_bo): Add "extract" param. Accept both powerpc and power4
+ BO fields when disassembling with -Many.
+ (insert_bo, extract_bo, insert_boe, extract_boe): Adjust valid_bo call.
+
+2007-01-08 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k-opc.c (m68k_opcodes): Replace cpu32 with
+ cpu32 | fido_a except on tbl instructions.
+
+2007-01-04 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (arm_opcodes): Fix cpsie and cpsid entries.
+
+2007-01-04 Andreas Schwab <schwab@suse.de>
+
+ * m68k-opc.c: Fix encoding of signed bit in the cpu32 tbls insns.
+
+2007-01-04 Julian Brown <julian@codesourcery.com>
- * cgen-ibld.in (extract_normal): Avoid memory range errors.
- * m32c-ibld.c: Regenerated.
+ * arm-dis.c (neon_opcode): Fix disassembly for vshl, vqshl, vrshl,
+ vqrshl instructions.
-For older changes see ChangeLog-2005
+For older changes see ChangeLog-2006
Local Variables:
mode: change-log
diff --git a/contrib/binutils/opcodes/ChangeLog-2006 b/contrib/binutils/opcodes/ChangeLog-2006
new file mode 100644
index 0000000..cc5ec75d
--- /dev/null
+++ b/contrib/binutils/opcodes/ChangeLog-2006
@@ -0,0 +1,837 @@
+2006-12-27 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k-dis.c (print_insn_arg): Add support for cac and mbb.
+
+2006-12-27 Kazu Hirata <kazu@codesourcery.com>
+
+ * m68k-opc.c (m68k_opcodes): Add sleep and trapx.
+
+2006-12-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (o_mode): New for 16-byte operand.
+ (intel_operand_size): Generate "OWORD PTR " for o_mode.
+ (CMPXCHG8B_Fixup): Set bytemode to o_mode instead of x_mode.
+
+2006-12-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (CMPXCHG8B_Fixup): New.
+ (grps): Use CMPXCHG8B_Fixup for cmpxchg8b.
+
+2006-12-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (Eq): Replaced by ...
+ (Mq): New. This.
+ (Ma): Defined with OP_M instead of OP_E.
+ (grps): Updated cmpxchg8b and vmptrst for Eq -> Mq.
+ (OP_M): Added bound, cmpxchg8b and vmptrst to bad modrm list.
+
+2006-12-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/Make-in (.po.gmo): Put gmo files in objdir.
+
+2006-12-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (X86_64_1): New.
+ (X86_64_2): Likewise.
+ (X86_64_3): Likewise.
+ (dis386): Replace 0x60, 0x61 and 0x62 entries with x86-64
+ tables.
+ (x86_64_table): Add entries for 0x60, 0x61 and 0x62.
+
+2006-12-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c: Adjust white spaces.
+
+2006-12-04 Jan Beulich <jbeulich@novell.com>
+
+ * i386-dis.c (OP_J): Update used_prefixes in v_mode.
+
+2006-11-30 Jan Beulich <jbeulich@novell.com>
+
+ * i386-dis.c (SEG_Fixup): Delete.
+ (Sv): Use OP_SEG.
+ (putop): New suffix character 'D'.
+ (dis386): Use it.
+ (grps): Likewise.
+ (OP_SEG): Handle bytemode other than w_mode.
+
+2006-11-30 Jan Beulich <jbeulich@novell.com>
+
+ * i386-dis.c (zAX): New.
+ (Xz): New.
+ (Yzr): New.
+ (z_mode): New.
+ (z_mode_ax_reg): New.
+ (putop): New suffix character 'G'.
+ (dis386): Use it for in, out, ins, and outs.
+ (intel_operand_size): Handle z_mode.
+ (OP_REG): Delete unreachable case indir_dx_reg.
+ (OP_IMREG): Fix Intel syntax output for case indir_dx_reg. Handle
+ z_mode_ax_reg.
+ (OP_ESreg): Fix Intel syntax operand size handling.
+ (OP_DSreg): Likewise.
+
+2006-11-30 Jan Beulich <jbeulich@novell.com>
+
+ * i386-dis.c (dis386): Use 'R' and 'O' for cbw/cwd unconditionally.
+ (putop): For 'O' suffix, print 'q' in Intel mode, and mark data prefix
+ used. For 'R' and 'W' suffix, simplify and fix Intel mode.
+
+2006-11-29 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (coprocessor_opcodes): Fix bitfields for fconstd/fconstd.
+
+2006-11-22 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * arm-dis.c (last_is_thumb): Delete.
+ (enum map_type, last_type): New.
+ (print_insn_data): New.
+ (get_sym_code_type): Take MAP_TYPE argument. Check the type of
+ the right symbol. Handle $d.
+ (print_insn): Check for mapping symbols even without a normal
+ symbol. Adjust searching. If $d is found see how much data
+ to print. Handle data.
+
+2006-11-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k-opc.c (m68k_opcodes): Place trap instructions before set
+ conditionals. Add tpf coldfire instruction as alias for trapf.
+
+2006-11-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (print_insn): Check PREFIX_REPNZ before
+ PREFIX_DATA when prefix user table is used.
+
+2006-11-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (twobyte_uses_SSE_prefix): Renamed to ...
+ (twobyte_uses_DATA_prefix): This.
+ (twobyte_uses_REPNZ_prefix): New.
+ (twobyte_uses_REPZ_prefix): Likewise.
+ (threebyte_0x38_uses_DATA_prefix): Likewise.
+ (threebyte_0x38_uses_REPNZ_prefix): Likewise.
+ (threebyte_0x38_uses_REPZ_prefix): Likewise.
+ (threebyte_0x3a_uses_DATA_prefix): Likewise.
+ (threebyte_0x3a_uses_REPNZ_prefix): Likewise.
+ (threebyte_0x3a_uses_REPZ_prefix): Likewise.
+ (print_insn): Updated checking usages of DATA/REPNZ/REPZ
+ prefixes.
+
+2006-11-06 Troy Rollo <troy@corvu.com.au>
+
+ * ppc-opc.c: Restore COM to mfcr wrongly removed 2003-07-04.
+
+2006-11-01 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * score-opc.h (score_opcodes): Delete modifier '0x'.
+
+2006-10-30 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (last_is_thumb, last_mapping_sym, last_mapping_addr): New.
+ (get_sym_code_type): New function.
+ (print_insn): Search for mapping symbols.
+
+2006-10-31 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * score-dis.c (print_insn): Correct the error code to print
+ correct PCE instruction disassembly.
+
+2006-10-26 Ben Elliston <bje@au.ibm.com>
+ Anton Blanchard <anton@samba.org>
+ Peter Bergner <bergner@vnet.ibm.com>
+
+ * ppc-opc.c (A_L, DCM, DGM, TE, RMC, R, SP, S, SH16, XRT_L, EH,
+ AFRALFRC_MASK, Z, ZRC, Z_MASK, XLRT_MASK, XEH_MASK): Define.
+ (POWER6): Define.
+ (powerpc_opcodes): Extend "lwarx", "ldarx", "dcbf", "fres", "fres.",
+ "frsqrtes", "frsqrtes." "fre", "fre.", "frsqrte" and "frsqrte.".
+ Add "doze", "nap", "sleep", "rvwinkle", "dcbfl", "prtyw", "prtyd",
+ "mfcfar", "cmpb", "lfdpx", "stfdpx", "mtcfar", "mffgpr", "mftgpr",
+ "lwzcix", "lhzcix", "lbzcix", "ldcix", "lfiwax", "stwcix", "sthcix",
+ "stbcix", "stdcix", "lfdp", "dadd", "dadd.", "dqua", "dqua.", "dmul",
+ "dmul.", "drrnd", "drrnd.", "dscli", "dscli.", "dquai", "dquai.",
+ "dscri", "dscri.", "drintx", "drintx.", "dcmpo", "dtstex", "dtstdc",
+ "dtstdg", "dtstsf", "drintn", "drintn.", "dctdp", "dctdp.", "dctfix",
+ "dctfix.", "ddedpd", "ddedpd.", "dxex", "dxex.", "dsub", "dsub.",
+ "ddiv", "ddiv.", "dcmpu", "drsp", "drsp.", "dcffix", "dcffix.",
+ "denbcd", "denbcd.", "diex", "diex.", "stfdp", "daddq", "daddq.",
+ "dquaq", "dquaq.", "fcpsgn", "fcpsgn.", "dmulq", "dmulq.",
+ "drrndq", "drrndq.", "dscliq", "dscliq.", "dquaiq", "dquaiq.",
+ "dscriq", "dscriq.", "drintxq", "drintxq.", "dcmpoq", "dtstexq",
+ "dtstdcq", "dtstdgq", "dtstsfq", "drintnq", "drintnq.",
+ "dctqpq", "dctqpq.", "dctfixq", "dctfixq.", "ddedpdq", "ddedpdq.",
+ "dxexq", "dxexq.", "dsubq", "dsubq.", "ddivq", "ddivq.", "dcmpuq",
+ "drdpq", "drdpq.", "dcffixq", "dcffixq.", "denbcdq", "denbcdq.",
+ "diexq" and "diexq." opcodes.
+
+2006-10-26 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * h8300-dis.c (bfd_h8_disassemble): Add missing consts.
+
+2006-10-25 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
+ Yukishige Shibata <shibata@rd.scei.sony.co.jp>
+ Nobuhisa Fujinami <fnami@rd.scei.sony.co.jp>
+ Takeaki Fukuoka <fukuoka@rd.scei.sony.co.jp>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * spu-dis.c: New file.
+ * spu-opc.c: New file.
+ * configure.in: Add SPU support.
+ * disassemble.c: Likewise.
+ * Makefile.am: Likewise. Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * po/POTFILES.in: Regenerate.
+
+2006-10-24 Andrew Pinski <andrew_pinski@playstation.sony.com>
+
+ * ppc-opc.c (CELL): New define.
+ (powerpc_opcodes): Enable hrfid for Cell. Add ldbrx and stdbrx,
+ cell specific instructions. Add {st,l}x{r,l}{,l} cell specific
+ VMX instructions.
+ * ppc-dis.c (powerpc_dialect): Handle cell.
+
+2006-10-23 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+
+ * i386-dis.c (dis386): Add support for the change in POPCNT opcode in
+ amdfam10 architecture.
+ (PREGRP37): NEW.
+ (print_insn): Disallow REP prefix for POPCNT.
+
+2006-10-20 Andrew Stubbs <andrew.stubbs@st.com>
+
+ * sh-dis.c (print_insn_sh): Remove 0x from output to prevent GDB
+ duplicating it.
+
+2006-10-18 Dave Brolley <brolley@redhat.com>
+
+ * configure.in (BFD_MACHINES): Add cgen-bitset.lo for bfd_sh_arch.
+ * configure: Regenerated.
+
+2006-09-29 Alan Modra <amodra@bigpond.net.au>
+
+ * po/POTFILES.in: Regenerate.
+
+2006-09-26 Mark Shinwell <shinwell@codesourcery.com>
+ Joseph Myers <joseph@codesourcery.com>
+ Ian Lance Taylor <ian@wasabisystems.com>
+ Ben Elliston <bje@wasabisystems.com>
+
+ * arm-dis.c (coprocessor_opcodes): The X-qualifier to WMADD may
+ only be used with the default multiply-add operation, so if N is
+ set, don't bother printing X. Add new iwmmxt instructions.
+ (IWMMXT_INSN_COUNT): Update.
+ (iwmmxt_wwssnames): Qualify "wwss" names at index 2, 6, 10 and 14
+ with a 'c' suffix.
+ (print_insn_coprocessor): Check for iWMMXt2. Handle format
+ specifiers 'r', 'i'.
+
+2006-09-24 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+
+ PR binutils/3100
+ * i386-dis.c (prefix_user_table): Fix the second operand of
+ maskmovdqu instruction to allow only %xmm register instead of
+ both %xmm register and memory.
+
+2006-09-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/3235
+ * i386-dis.c (OP_OFF64): Get 32bit offset if there is an
+ address size prefix.
+
+2006-09-17 Mei Ligang <ligang@sunnorth.com.cn>
+
+ * score-dis.c: New file.
+ * score-opc.h: New file.
+ * Makefile.am: Add Score files.
+ * Makefile.in: Regenerate.
+ * configure.in: Add support for Score target.
+ * configure: Regenerate.
+ * disassemble.c: Add support for Score target.
+
+2006-09-16 Nick Clifton <nickc@redhat.com>
+ Pedro Alves <pedro_alves@portugalmail.pt>
+
+ * arm-dis.c: Make use of new STRING_COMMA_LEN and CONST_STRNEQ
+ macros defined in bfd.h.
+ * cris-dis.c: Likewise.
+ * h8300-dis.c: Likewise.
+ * i386-dis.c: Likewise.
+ * ia64-gen.c: Likewise.
+ * mips-dis: Likewise.
+
+2006-09-04 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (neon_opcode): Fix suffix on VMOVN.
+
+2006-08-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (three_byte_table): Expand to 256 elements.
+
+2006-08-04 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+
+ PR binutils/3000
+ * i386-dis.c (MXC,EMC): Define.
+ (OP_MXC): New function to handle cvt* (convert instructions) between
+ %xmm and %mm register correctly.
+ (OP_EMC): ditto.
+ (prefix_user_table): Modified cvtpi2pd,cvtpd2pi and cvttpd2pi
+ instruction operands in PREGRP2,PREGRP3,PREGRP4 appropriately
+ with EMC/MXC.
+
+2006-07-29 Richard Sandiford <richard@codesourcery.com>
+
+ * m68k-opc.c (m68k_opcodes): Fix operand specificer in the Coldfire
+ "fdaddl" entry.
+
+2006-07-19 Paul Brook <paul@codesourcery.com>
+
+ * armd-dis.c (arm_opcodes): Fix rbit opcode.
+
+2006-07-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (grps): Change "sldtQ", "strQ" and "smswQ" to
+ "sldt", "str" and "smsw".
+
+2006-07-15 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2829
+ * i386-dis.c (GRP11_C6): NEW.
+ (GRP11_C7): Likewise.
+ (GRP12): Updated.
+ (GRP13): Likewise.
+ (GRP14): Likewise.
+ (GRP15): Likewise.
+ (GRP16): Likewise.
+ (GRPAMD): Likewise.
+ (GRPPADLCK1): Likewise.
+ (GRPPADLCK2): Likewise.
+ (dis386): Use GRP11_C6 and GRP11_C7 for entres 0xc6 and 0xc7,
+ respectively.
+ (grps): Add entries for GRP11_C6 and GRP11_C7.
+
+2006-07-10 Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
+ Michael Meissner <michael.meissner@amd.com>
+
+ * i386-dis.c (dis386): Add support for 4 operand instructions. Add
+ support for amdfam10 SSE4a/ABM instructions. Modify all
+ initializer macros to have additional arguments. Disallow REP
+ prefix for non-string instructions.
+ (print_insn): Ditto.
+
+2006-07-05 Julian Brown <julian@codesourcery.com>
+
+ * arm-dis.c (coprocessor): Alter fmsrr disassembly syntax.
+
+2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (dis386_twobyte): Use "nopQ" for 0x1f.
+ (twobyte_has_modrm): Set 1 for 0x1f.
+
+2006-06-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (NOP_Fixup): Removed.
+ (NOP_Fixup1): New.
+ (NOP_Fixup2): Likewise.
+ (dis386): Use NOP_Fixup1 and NOP_Fixup2 on 0x90.
+
+2006-06-12 Julian Brown <julian@codesourcery.com>
+
+ * arm-dis.c (print_insn_neon): Disassemble 32-bit immediates as signed
+ on 64-bit hosts.
+
+2006-06-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386.c (GRP10): Renamed to ...
+ (GRP12): This.
+ (GRP11): Renamed to ...
+ (GRP13): This.
+ (GRP12): Renamed to ...
+ (GRP14): This.
+ (GRP13): Renamed to ...
+ (GRP15): This.
+ (GRP14): Renamed to ...
+ (GRP16): This.
+ (dis386_twobyte): Updated.
+ (grps): Likewise.
+
+2006-06-09 Nick Clifton <nickc@redhat.com>
+
+ * po/fi.po: Updated Finnish translation.
+
+2006-06-07 Joseph S. Myers <joseph@codesourcery.com>
+
+ * po/Make-in (pdf, ps): New dummy targets.
+
+2006-06-06 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (coprocessor_opcodes): Add %c to unconditional arm
+ instructions.
+ (neon_opcodes): Add conditional execution specifiers.
+ (thumb_opcodes): Ditto.
+ (thumb32_opcodes): Ditto.
+ (arm_conditional): Change 0xe to "al" and add "" to end.
+ (ifthen_state, ifthen_next_state, ifthen_address): New.
+ (IFTHEN_COND): Define.
+ (print_insn_coprocessor, print_insn_neon): Print thumb conditions.
+ (print_insn_arm): Change %c to use new values of arm_conditional.
+ (print_insn_thumb16): Print thumb conditions. Add %I.
+ (print_insn_thumb32): Print thumb conditions.
+ (find_ifthen_state): New function.
+ (print_insn): Track IT block state.
+
+2006-06-06 Ben Elliston <bje@au.ibm.com>
+ Anton Blanchard <anton@samba.org>
+ Peter Bergner <bergner@vnet.ibm.com>
+
+ * ppc-dis.c (powerpc_dialect): Handle power6 option.
+ (print_ppc_disassembler_options): Mention power6.
+
+2006-06-06 Thiemo Seufer <ths@mips.com>
+ Chao-ying Fu <fu@mips.com>
+
+ * mips-dis.c: Disassemble DSP64 instructions for MIPS64R2.
+ * mips-opc.c: Add DSP64 instructions.
+
+2006-06-06 Alan Modra <amodra@bigpond.net.au>
+
+ * m68hc11-dis.c (print_insn): Warning fix.
+
+2006-06-05 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/Make-in (top_builddir): Define.
+
+2006-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * config.in: Regenerate.
+
+2006-05-31 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * Makefile.am (INCLUDES): Use @INCINTL@.
+ * acinclude.m4: Include new gettext macros.
+ * configure.in: Use ZW_GNU_GETTEXT_SISTER_DIR and AM_PO_SUBDIRS.
+ Remove local code for po/Makefile.
+ * Makefile.in, aclocal.m4, configure: Regenerated.
+
+2006-05-30 Nick Clifton <nickc@redhat.com>
+
+ * po/es.po: Updated Spanish translation.
+
+2006-05-25 Richard Sandiford <richard@codesourcery.com>
+
+ * m68k-opc.c (m68k_opcodes): Fix the masks of the Coldfire fmovemd
+ and fmovem entries. Put register list entries before immediate
+ mask entries. Use "l" rather than "L" in the fmovem entries.
+ * m68k-dis.c (match_insn_m68k): Remove the PRIV argument and work it
+ out from INFO.
+ (m68k_scan_mask): New function, split out from...
+ (print_insn_m68k): ...here. If no architecture has been set,
+ first try printing an m680x0 instruction, then try a Coldfire one.
+
+2006-05-24 Nick Clifton <nickc@redhat.com>
+
+ * po/ga.po: Updated Irish translation.
+
+2006-05-22 Nick Clifton <nickc@redhat.com>
+
+ * crx-dis.c (EXTRACT): Make macro work on 64-bit hosts.
+
+2006-05-22 Nick Clifton <nickc@redhat.com>
+
+ * po/nl.po: Updated translation.
+
+2006-05-18 Alan Modra <amodra@bigpond.net.au>
+
+ * avr-dis.c: Formatting fix.
+
+2006-05-14 Thiemo Seufer <ths@mips.com>
+
+ * mips16-opc.c (I1, I32, I64): New shortcut defines.
+ (mips16_opcodes): Change membership of instructions to their
+ lowest baseline ISA.
+
+2006-05-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (grps): Update sgdt/sidt for 64bit.
+
+2006-05-05 Julian Brown <julian@codesourcery.com>
+
+ * arm-dis.c (coprocessor_opcodes): Don't interpret fldmx/fstmx as
+ vldm/vstm.
+
+2006-05-05 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips-opc.c: Add macro for cache instruction.
+
+2006-05-04 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips-dis.c (mips_arch_choices): Add smartmips instruction
+ decoding to MIPS32 and MIPS32R2. Limit DSP decoding to release
+ 2 ISAs. Add MIPS3D decoding to MIPS32R2. Add MT decoding to
+ MIPS64R2.
+ * mips-opc.c: fix random typos in comments.
+ (INSN_SMARTMIPS): New defines.
+ (mips_builtin_opcodes): Add paired single support for MIPS32R2.
+ Move bc3f, bc3fl, bc3t, bc3tl downwards. Move flushi, flushd,
+ flushid, wb upwards. Move cfc3, ctc3 downwards. Rework the
+ FP_S and FP_D flags to denote single and double register
+ accesses separately. Move dmfc3, dmtc3, mfc3, mtc3 downwards.
+ Allow jr.hb and jalr.hb for release 1 ISAs. Allow luxc1, suxc1
+ for MIPS32R2. Add SmartMIPS instructions. Add two-argument
+ variants of bc2f, bc2fl, bc2t, bc2tl. Add mfhc2, mthc2 to
+ release 2 ISAs.
+ * mips16-opc.c (mips16_opcodes): Add sdbbp instruction.
+
+2006-05-03 Thiemo Seufer <ths@mips.com>
+
+ * mips-opc.c (mips_builtin_opcodes): Fix mftr argument order.
+
+2006-05-02 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips-dis.c (print_insn_args): Force mips16 to odd addresses.
+ (print_mips16_insn_arg): Force mips16 to odd addresses.
+
+2006-04-30 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips-opc.c (mips_builtin_opcodes): Add udi instructions
+ "udi0" to "udi15".
+ * mips-dis.c (print_insn_args): Adds udi argument handling.
+
+2006-04-28 James E Wilson <wilson@specifix.com>
+
+ * m68k-dis.c (match_insn_m68k): Restore fprintf_func before printing
+ error message.
+
+2006-04-28 Thiemo Seufer <ths@mips.com>
+ David Ung <davidu@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * mips-dis.c (mips_cp0sel_names_mips3264r2): Add MT register
+ names.
+
+2006-04-28 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+ David Ung <davidu@mips.com>
+
+ * mips-dis.c (print_insn_args): Add mips_opcode argument.
+ (print_insn_mips): Adjust print_insn_args call.
+
+2006-04-28 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * mips-dis.c (print_insn_args): Print $fcc only for FP
+ instructions, use $cc elsewise.
+
+2006-04-28 Thiemo Seufer <ths@mips.com>
+ Nigel Stephens <nigel@mips.com>
+
+ * opcodes/mips-dis.c (mips16_to_32_reg_map, mips16_reg_names):
+ Map MIPS16 registers to O32 names.
+ (print_mips16_insn_arg): Use mips16_reg_names.
+
+2006-04-26 Julian Brown <julian@codesourcery.com>
+
+ * arm-dis.c (print_insn_neon): Disassemble floating-point constant
+ VMOV.
+
+2006-04-26 Nathan Sidwell <nathan@codesourcery.com>
+ Julian Brown <julian@codesourcery.com>
+
+ * opcodes/arm-dis.c (coprocessor_opcodes): Add %A, %B, %k, convert
+ %<code>[zy] into %[zy]<code>. Expand meaning of %<bitfield>['`?].
+ Add unified load/store instruction names.
+ (neon_opcode_table): New.
+ (arm_opcodes): Expand meaning of %<bitfield>['`?].
+ (arm_decode_bitfield): New.
+ (print_insn_coprocessor): Add pc argument. Add %A & %B specifiers.
+ Use arm_decode_bitfield and adjust numeric specifiers. Adjust %z & %y.
+ (print_insn_neon): New.
+ (print_insn_arm): Adjust print_insn_coprocessor call. Call
+ print_insn_neon. Use arm_decode_bitfield and adjust numeric specifiers.
+ (print_insn_thumb32): Likewise.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2006-04-19 Alan Modra <amodra@bigpond.net.au>
+
+ * avr-dis.c (avr_operand): Warning fix.
+
+ * configure: Regenerate.
+
+2006-04-16 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * po/POTFILES.in: Regenerated.
+
+2006-04-12 Hochstein <hochstein@algo.informatik.tu-darmstadt.de>
+
+ PR binutils/2454
+ * avr-dis.c (avr_operand): Arrange for a comment to appear before
+ the symolic form of an address, so that the output of objdump -d
+ can be reassembled.
+
+2006-04-10 DJ Delorie <dj@redhat.com>
+
+ * m32c-asm.c: Regenerate.
+
+2006-04-06 Carlos O'Donell <carlos@codesourcery.com>
+
+ * Makefile.am: Add install-html target.
+ * Makefile.in: Regenerate.
+
+2006-04-06 Nick Clifton <nickc@redhat.com>
+
+ * po/vi/po: Updated Vietnamese translation.
+
+2006-03-31 Paul Koning <ni1d@arrl.net>
+
+ * pdp11-opc.c (pdp11_opcodes): Fix opcode for SEC instruction.
+
+2006-03-16 Bernd Schmidt <bernd.schmidt@analog.com>
+
+ * bfin-dis.c (decode_dsp32shiftimm_0): Simplify and correct the
+ logic to identify halfword shifts.
+
+2006-03-16 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (arm_opcodes): Rename swi to svc.
+ (thumb_opcodes): Ditto.
+
+2006-03-13 DJ Delorie <dj@redhat.com>
+
+ * m32c-asm.c: Regenerate.
+ * m32c-desc.c: Likewise.
+ * m32c-desc.h: Likewise.
+ * m32c-dis.c: Likewise.
+ * m32c-ibld.c: Likewise.
+ * m32c-opc.c: Likewise.
+ * m32c-opc.h: Likewise.
+
+2006-03-10 DJ Delorie <dj@redhat.com>
+
+ * m32c-desc.c: Regenerate with mul.l, mulu.l.
+ * m32c-opc.c: Likewise.
+ * m32c-opc.h: Likewise.
+
+
+2006-03-09 Nick Clifton <nickc@redhat.com>
+
+ * po/sv.po: Updated Swedish translation.
+
+2006-03-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/2428
+ * i386-dis.c (REP_Fixup): New function.
+ (AL): Remove duplicate.
+ (Xbr): New.
+ (Xvr): Likewise.
+ (Ybr): Likewise.
+ (Yvr): Likewise.
+ (indirDXr): Likewise.
+ (ALr): Likewise.
+ (eAXr): Likewise.
+ (dis386): Updated entries of ins, outs, movs, lods and stos.
+
+2006-03-05 Nick Clifton <nickc@redhat.com>
+
+ * cgen-ibld.in (insert_normal): Cope with attempts to insert a
+ signed 32-bit value into an unsigned 32-bit field when the host is
+ a 64-bit machine.
+ * fr30-ibld.c: Regenerate.
+ * frv-ibld.c: Regenerate.
+ * ip2k-ibld.c: Regenerate.
+ * iq2000-asm.c: Regenerate.
+ * iq2000-ibld.c: Regenerate.
+ * m32c-ibld.c: Regenerate.
+ * m32r-ibld.c: Regenerate.
+ * openrisc-ibld.c: Regenerate.
+ * xc16x-ibld.c: Regenerate.
+ * xstormy16-ibld.c: Regenerate.
+
+2006-03-03 Shrirang Khisti <shrirangk@kpitcummins.com)
+
+ * xc16x-asm.c: Regenerate.
+ * xc16x-dis.c: Regenerate.
+
+2006-02-27 Carlos O'Donell <carlos@codesourcery.com>
+
+ * po/Make-in: Add html target.
+
+2006-02-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (IS_3BYTE_OPCODE): New for 3-byte opcodes used by
+ Intel Merom New Instructions.
+ (THREE_BYTE_0): Likewise.
+ (THREE_BYTE_1): Likewise.
+ (three_byte_table): Likewise.
+ (dis386_twobyte): Use THREE_BYTE_0 for entry 0x38. Use
+ THREE_BYTE_1 for entry 0x3a.
+ (twobyte_has_modrm): Updated.
+ (twobyte_uses_SSE_prefix): Likewise.
+ (print_insn): Handle 3-byte opcodes used by Intel Merom New
+ Instructions.
+
+2006-02-24 David S. Miller <davem@sunset.davemloft.net>
+
+ * sparc-dis.c (v9_priv_reg_names): Add "gl" entry.
+ (v9_hpriv_reg_names): New table.
+ (print_insn_sparc): Allow values up to 16 for '?' and '!'.
+ New cases '$' and '%' for read/write hyperprivileged register.
+ * sparc-opc.c (sparc_opcodes): Add new entries for UA2005
+ window handling and rdhpr/wrhpr instructions.
+
+2006-02-24 DJ Delorie <dj@redhat.com>
+
+ * m32c-desc.c: Regenerate with linker relaxation attributes.
+ * m32c-desc.h: Likewise.
+ * m32c-dis.c: Likewise.
+ * m32c-opc.c: Likewise.
+
+2006-02-24 Paul Brook <paul@codesourcery.com>
+
+ * arm-dis.c (arm_opcodes): Add V7 instructions.
+ (thumb32_opcodes): Ditto. Handle V7M MSR/MRS variants.
+ (print_arm_address): New function.
+ (print_insn_arm): Use it. Add 'P' and 'U' cases.
+ (psr_name): New function.
+ (print_insn_thumb32): Add 'U', 'C' and 'D' cases.
+
+2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ia64-opc-i.c (bXc): New.
+ (mXc): Likewise.
+ (OpX2TaTbYaXcC): Likewise.
+ (TF). Likewise.
+ (TFCM). Likewise.
+ (ia64_opcodes_i): Add instructions for tf.
+
+ * ia64-opc.h (IMMU5b): New.
+
+ * ia64-asmtab.c: Regenerated.
+
+2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ia64-gen.c: Update copyright years.
+ * ia64-opc-b.c: Likewise.
+
+2006-02-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ia64-gen.c (lookup_regindex): Handle ".vm".
+ (print_dependency_table): Handle '\"'.
+
+ * ia64-ic.tbl: Updated from SDM 2.2.
+ * ia64-raw.tbl: Likewise.
+ * ia64-waw.tbl: Likewise.
+ * ia64-asmtab.c: Regenerated.
+
+ * ia64-opc-b.c (ia64_opcodes_b): Add vmsw.0 and vmsw.1.
+
+2006-02-17 Shrirang Khisti <shrirangk@kpitcummins.com>
+ Anil Paranjape <anilp1@kpitcummins.com>
+ Shilin Shakti <shilins@kpitcummins.com>
+
+ * xc16x-desc.h: New file
+ * xc16x-desc.c: New file
+ * xc16x-opc.h: New file
+ * xc16x-opc.c: New file
+ * xc16x-ibld.c: New file
+ * xc16x-asm.c: New file
+ * xc16x-dis.c: New file
+ * Makefile.am: Entries for xc16x
+ * Makefile.in: Regenerate
+ * cofigure.in: Add xc16x target information.
+ * configure: Regenerate.
+ * disassemble.c: Add xc16x target information.
+
+2006-02-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c (dis386_twobyte): Use "movZ" for debug register
+ moves.
+
+2006-02-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * i386-dis.c ('Z'): Add a new macro.
+ (dis386_twobyte): Use "movZ" for control register moves.
+
+2006-02-10 Nick Clifton <nickc@redhat.com>
+
+ * iq2000-asm.c: Regenerate.
+
+2006-02-07 Nathan Sidwell <nathan@codesourcery.com>
+
+ * m68k-dis.c (print_insn_m68k): Use bfd_m68k_mach_to_features.
+
+2006-01-26 David Ung <davidu@mips.com>
+
+ * mips-opc.c: Add I33 masks to these MIPS32R2 instructions: prefx,
+ ceil.l.d, ceil.l.s, cvt.d.l, cvt.l.d, cvt.l.s, cvt.s.l, floor.l.d,
+ floor.l.s, ldxc1, lwxc1, madd.d, madd.s, msub.d, msub.s, nmadd.d,
+ nmadd.s, nmsub.d, nmsub.s, recip.d, recip.s, round.l.d, rsqrt.d,
+ rsqrt.s, sdxc1, swxc1, trunc.l.d, trunc.l.s.
+
+2006-01-18 Arnold Metselaar <arnoldm@sourceware.org>
+
+ * z80-dis.c (struct buffer, prt_d, prt_d_n, arit_d, ld_r_d,
+ ld_d_r, pref_xd_cb): Use signed char to hold data to be
+ disassembled.
+ * z80-dis.c (TXTSIZ): Increase buffer size to 24, this fixes
+ buffer overflows when disassembling instructions like
+ ld (ix+123),0x23
+ * z80-dis.c (opc_ind, pref_xd_cb): Suppress '+' in an indexed
+ operand, if the offset is negative.
+
+2006-01-17 Arnold Metselaar <arnoldm@sourceware.org>
+
+ * z80-dis.c (struct buffer, prt_d, prt_d_n, pref_xd_cb): Use
+ unsigned char to hold data to be disassembled.
+
+2006-01-17 Andreas Schwab <schwab@suse.de>
+
+ PR binutils/1486
+ * disassemble.c (disassemble_init_for_target): Set
+ disassembler_needs_relocs for bfd_arch_arm.
+
+2006-01-16 Paul Brook <paul@codesourcery.com>
+
+ * m68k-opc.c (m68k_opcodes): Fix opcodes for ColdFire f?abss,
+ f?add?, and f?sub? instructions.
+
+2006-01-16 Nick Clifton <nickc@redhat.com>
+
+ * po/zh_CN.po: New Chinese (simplified) translation.
+ * configure.in (ALL_LINGUAS): Add "zh_CH".
+ * configure: Regenerate.
+
+2006-01-05 Paul Brook <paul@codesourcery.com>
+
+ * m68k-opc.c (m68k_opcodes): Add missing ColdFire fdsqrtd entry.
+
+2006-01-06 DJ Delorie <dj@redhat.com>
+
+ * m32c-desc.c: Regenerate.
+ * m32c-opc.c: Regenerate.
+ * m32c-opc.h: Regenerate.
+
+2006-01-03 DJ Delorie <dj@redhat.com>
+
+ * cgen-ibld.in (extract_normal): Avoid memory range errors.
+ * m32c-ibld.c: Regenerated.
+
+For older changes see ChangeLog-2005
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/opcodes/Makefile.am b/contrib/binutils/opcodes/Makefile.am
index 57bdb4a..99a2b76 100644
--- a/contrib/binutils/opcodes/Makefile.am
+++ b/contrib/binutils/opcodes/Makefile.am
@@ -1,6 +1,7 @@
## Process this file with automake to generate Makefile.in
AUTOMAKE_OPTIONS = 1.9 cygnus
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = po
@@ -32,6 +33,8 @@ HFILES = \
fr30-desc.h fr30-opc.h \
frv-desc.h frv-opc.h \
h8500-opc.h \
+ i386-opc.h \
+ i386-tbl.h \
ia64-asmtab.h \
ia64-opc.h \
ip2k-desc.h ip2k-opc.h \
@@ -39,8 +42,10 @@ HFILES = \
m32c-desc.h m32c-opc.h \
m32r-desc.h m32r-opc.h \
mcore-opc.h \
+ mep-desc.h mep-opc.h \
mt-desc.h mt-opc.h \
openrisc-desc.h openrisc-opc.h \
+ score-opc.h \
sh-opc.h \
sh64-opc.h \
sysdep.h \
@@ -63,6 +68,8 @@ CFILES = \
cgen-bitset.c \
cgen-dis.c \
cgen-opc.c \
+ cr16-dis.c \
+ cr16-opc.c \
cris-dis.c \
cris-opc.c \
crx-dis.c \
@@ -91,6 +98,8 @@ CFILES = \
i370-dis.c \
i370-opc.c \
i386-dis.c \
+ i386-opc.c \
+ i386-gen.c \
i860-dis.c \
i960-dis.c \
ia64-dis.c \
@@ -131,6 +140,11 @@ CFILES = \
m88k-dis.c \
maxq-dis.c \
mcore-dis.c \
+ mep-asm.c \
+ mep-desc.c \
+ mep-dis.c \
+ mep-ibld.c \
+ mep-opc.c \
mips-dis.c \
mips-opc.c \
mips16-opc.c \
@@ -162,11 +176,14 @@ CFILES = \
s390-mkopc.c \
s390-opc.c \
s390-dis.c \
+ score-dis.c \
sh-dis.c \
sh64-dis.c \
sh64-opc.c \
sparc-dis.c \
sparc-opc.c \
+ spu-dis.c \
+ spu-opc.c \
tic30-dis.c \
tic4x-dis.c \
tic54x-dis.c \
@@ -205,6 +222,8 @@ ALL_MACHINES = \
cgen-bitset.lo \
cgen-dis.lo \
cgen-opc.lo \
+ cr16-dis.lo \
+ cr16-opc.lo \
cris-dis.lo \
cris-opc.lo \
crx-dis.lo \
@@ -228,6 +247,7 @@ ALL_MACHINES = \
h8500-dis.lo \
hppa-dis.lo \
i386-dis.lo \
+ i386-opc.lo \
i370-dis.lo \
i370-opc.lo \
i860-dis.lo \
@@ -266,6 +286,11 @@ ALL_MACHINES = \
m10300-opc.lo \
maxq-dis.lo \
mcore-dis.lo \
+ mep-asm.lo \
+ mep-desc.lo \
+ mep-dis.lo \
+ mep-ibld.lo \
+ mep-opc.lo \
mips-dis.lo \
mips-opc.lo \
mips16-opc.lo \
@@ -293,11 +318,14 @@ ALL_MACHINES = \
ppc-opc.lo \
s390-dis.lo \
s390-opc.lo \
+ score-dis.lo \
sh-dis.lo \
sh64-dis.lo \
sh64-opc.lo \
sparc-dis.lo \
sparc-opc.lo \
+ spu-dis.lo \
+ spu-opc.lo \
tic30-dis.lo \
tic4x-dis.lo \
tic54x-dis.lo \
@@ -328,7 +356,7 @@ OFILES = @BFD_MACHINES@
# that's where the version number in Makefile comes from.
CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
disassemble.lo: disassemble.c $(INCDIR)/dis-asm.h
$(LIBTOOL) --mode=compile $(COMPILE) -c @archdefs@ $(srcdir)/disassemble.c
@@ -341,7 +369,7 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
# if host != build.
libopcodes_la_DEPENDENCIES = $(OFILES)
libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
-libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
+libopcodes_la_LDFLAGS = -release `cat ../bfd/libtool-soversion` @WIN32LDFLAGS@
# libtool will build .libs/libopcodes.a. We create libopcodes.a in
# the build directory so that we don't have to convert all the
@@ -392,7 +420,7 @@ uninstall_libopcodes:
CLEANFILES = \
stamp-ip2k stamp-m32c stamp-m32r stamp-fr30 stamp-frv \
- stamp-openrisc stamp-iq2000 stamp-mt stamp-xstormy16 stamp-xc16x\
+ stamp-openrisc stamp-iq2000 stamp-mep stamp-mt stamp-xstormy16 stamp-xc16x\
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
@@ -408,7 +436,7 @@ CGENDEPS = \
$(CGENDIR)/opc-opinst.scm \
cgen-asm.in cgen-dis.in cgen-ibld.in
-CGEN_CPUS = fr30 frv ip2k m32c m32r mt openrisc xc16x xstormy16
+CGEN_CPUS = fr30 frv ip2k m32c m32r mep mt openrisc xc16x xstormy16
if CGEN_MAINT
IP2K_DEPS = stamp-ip2k
@@ -416,6 +444,7 @@ M32C_DEPS = stamp-m32c
M32R_DEPS = stamp-m32r
FR30_DEPS = stamp-fr30
FRV_DEPS = stamp-frv
+MEP_DEPS = stamp-mep
MT_DEPS = stamp-mt
OPENRISC_DEPS = stamp-openrisc
IQ2000_DEPS = stamp-iq2000
@@ -427,6 +456,7 @@ M32C_DEPS =
M32R_DEPS =
FR30_DEPS =
FRV_DEPS =
+MEP_DEPS =
MT_DEPS =
OPENRISC_DEPS =
IQ2000_DEPS =
@@ -500,6 +530,12 @@ stamp-frv: $(CGENDEPS) $(srcdir)/../cpu/frv.cpu $(srcdir)/../cpu/frv.opc
$(MAKE) run-cgen arch=frv prefix=frv options= \
archfile=$(srcdir)/../cpu/frv.cpu opcfile=$(srcdir)/../cpu/frv.opc extrafiles=
+$(srcdir)/mep-desc.h $(srcdir)/mep-desc.c $(srcdir)/mep-opc.h $(srcdir)/mep-opc.c $(srcdir)/mep-ibld.c $(srcdir)/mep-asm.c $(srcdir)/mep-dis.c: $(MEP_DEPS)
+ @true
+stamp-mep: $(CGENDEPS) $(CPUDIR)/mep.cpu $(CPUDIR)/mep-default.cpu $(CPUDIR)/mep-core.cpu $(CPUDIR)/mep-h1.cpu $(CPUDIR)/mep-ext-cop.cpu $(CPUDIR)/mep-sample-ucidsp.cpu $(CPUDIR)/mep-rhcop.cpu $(CPUDIR)/mep-fmax.cpu $(CPUDIR)/mep.opc
+ $(MAKE) run-cgen arch=mep prefix=mep options= \
+ archfile=$(CPUDIR)/mep.cpu opcfile=$(CPUDIR)/mep.opc extrafiles=
+
$(srcdir)/mt-desc.h $(srcdir)/mt-desc.c $(srcdir)/mt-opc.h $(srcdir)/mt-opc.c $(srcdir)/mt-ibld.c $(srcdir)/mt-asm.c $(srcdir)/mt-dis.c: $(MT_DEPS)
@true
stamp-mt: $(CGENDEPS) $(srcdir)/../cpu/mt.cpu $(srcdir)/../cpu/mt.opc
@@ -534,6 +570,14 @@ stamp-xc16x: $(CGENDEPS) $(CPUDIR)/xc16x.cpu $(CPUDIR)/xc16x.opc
$(MAKE) run-cgen arch=xc16x prefix=xc16x options= \
archfile=$(CPUDIR)/xc16x.cpu opcfile=$(CPUDIR)/xc16x.opc extrafiles=
+i386-gen: i386-gen.o
+ $(LINK) i386-gen.o $(LIBIBERTY)
+
+i386-gen.o: i386-gen.c i386-opc.h
+
+i386-tbl.h: @MAINT@ i386-gen i386-opc.tbl i386-reg.tbl
+ ./i386-gen --srcdir $(srcdir) > $(srcdir)/i386-tbl.h
+
ia64-gen: ia64-gen.o
$(LINK) ia64-gen.o $(LIBIBERTY)
@@ -601,131 +645,176 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/alpha.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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) $(INCDIR)/symcat.h \
- opintl.h
+ $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h opintl.h
arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/dis-asm.h $(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)/bfdlink.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h opintl.h arc-dis.h arc-ext.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/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 \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
opintl.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
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h arc-ext.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arm.h \
- opintl.h $(INCDIR)/safe-ctype.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/arm.h opintl.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/floatformat.h $(INCDIR)/ansidecl.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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)/elf/internal.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) $(INCDIR)/symcat.h opintl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/opcode/avr.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/avr.h
bfin-dis.lo: bfin-dis.c $(INCDIR)/opcode/bfin.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
opintl.h
cgen-bitset.lo: cgen-bitset.c $(INCDIR)/libiberty.h \
$(INCDIR)/ansidecl.h $(INCDIR)/opcode/cgen-bitset.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 \
- $(INCDIR)/opcode/cgen-bitset.h
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h
cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h
+cr16-dis.lo: cr16-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/cr16.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
+cr16-opc.lo: cr16-opc.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cr16.h
cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
crx-dis.lo: crx-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/opcode/crx.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/crx.h
crx-opc.lo: crx-opc.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/opcode/crx.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)/symcat.h
+ $(INCDIR)/ansidecl.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) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h
dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/dlx.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ opintl.h
dis-init.lo: dis-init.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H)
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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-bitset.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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-bitset.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
+ opintl.h
frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h $(INCDIR)/libiberty.h \
- $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/elf/frv.h \
+ $(INCDIR)/elf/reloc-macros.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- opintl.h
+ h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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) $(INCDIR)/symcat.h $(BFDDIR)/libhppa.h \
- $(INCDIR)/opcode/hppa.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/i370.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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 $(INCDIR)/symcat.h sysdep.h config.h \
- opintl.h
+ $(INCDIR)/ansidecl.h opintl.h $(INCDIR)/opcode/i386.h
+i386-opc.lo: i386-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h i386-opc.h \
+ $(INCDIR)/opcode/i386.h i386-tbl.h
+i386-gen.lo: i386-gen.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h i386-opc.h \
+ $(INCDIR)/opcode/i386.h
i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_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)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h \
+ $(BFD_H)
ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
@@ -738,288 +827,424 @@ ia64-opc-m.lo: ia64-opc-m.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-opc-d.lo: ia64-opc-d.c
ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/libiberty.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
- $(BFD_H) $(INCDIR)/symcat.h ia64-asmtab.c
+ config.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ ia64-asmtab.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h ia64-asmtab.c
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
- ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.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)/ansidecl.h $(INCDIR)/safe-ctype.h sysdep.h \
+ config.h $(INCDIR)/getopt.h ia64-opc.h $(INCDIR)/opcode/ia64.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.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
ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
+ opintl.h
ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- iq2000-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
+ opintl.h
iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
iq2000-opc.lo: iq2000-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
m32c-asm.lo: m32c-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
+ cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h opintl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
m32c-desc.lo: m32c-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
+ cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h opintl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
m32c-dis.lo: m32c-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- m32c-opc.h cgen-types.h cgen-ops.h opintl.h $(INCDIR)/elf/m32c.h \
- $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
+ cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h opintl.h \
+ $(INCDIR)/elf/m32c.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h
m32c-ibld.lo: m32c-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- m32c-opc.h cgen-types.h cgen-ops.h opintl.h $(INCDIR)/safe-ctype.h
-m32c-opc.lo: m32c-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
$(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ m32c-opc.h cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h \
+ opintl.h $(INCDIR)/safe-ctype.h
+m32c-opc.lo: m32c-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
+ cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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-bitset.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h
m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/symcat.h
+ $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/floatformat.h \
- $(INCDIR)/libiberty.h opintl.h $(INCDIR)/opcode/m68k.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/floatformat.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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)/symcat.h $(INCDIR)/opcode/m88k.h \
- opintl.h $(INCDIR)/libiberty.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/m88k.h opintl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
maxq-dis.lo: maxq-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/maxq.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/maxq.h
mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h
+mep-asm.lo: mep-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mep-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mep-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+mep-desc.lo: mep-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mep-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mep-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+mep-dis.lo: mep-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ mep-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mep-opc.h \
+ opintl.h $(INCDIR)/elf/mep.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+mep-ibld.lo: mep-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h mep-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ mep-opc.h opintl.h $(INCDIR)/safe-ctype.h
+mep-opc.lo: mep-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mep-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mep-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/elf/mep.h \
+ $(INCDIR)/elf/reloc-macros.h
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.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
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.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
mips-opc.lo: mips-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
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) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/ansidecl.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) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
m10300-opc.lo: m10300-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10300.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
+ $(INCDIR)/ansidecl.h $(BFD_H) opintl.h
mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
mt-asm.lo: mt-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h mt-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
mt-desc.lo: mt-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h mt-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
mt-dis.lo: mt-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- mt-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
+ opintl.h
mt-ibld.lo: mt-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h mt-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
mt-opc.h opintl.h $(INCDIR)/safe-ctype.h
mt-opc.lo: mt-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h mt-opc.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.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
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ns32k-dis.lo: ns32k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/dis-asm.h \
+ $(BFD_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-bitset.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/symcat.h openrisc-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
openrisc-dis.lo: openrisc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
or32-dis.lo: or32-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/or32.h \
$(INCDIR)/safe-ctype.h
or32-opc.lo: or32-opc.c $(INCDIR)/safe-ctype.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/or32.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
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/symcat.h
+ $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/ppc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/s390.h
+score-dis.lo: score-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ score-opc.h opintl.h $(BFD_H) $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h
sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- sh-opc.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/dis-asm.h
+ sh-opc.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/dis-asm.h $(BFD_H)
sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/elf32-sh64.h
+ $(INCDIR)/ansidecl.h sh64-opc.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.h
sh64-opc.lo: sh64-opc.c sh64-opc.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)/symcat.h $(INCDIR)/libiberty.h opintl.h
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h opintl.h
sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/sparc.h
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/ansidecl.h
+spu-dis.lo: spu-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/spu.h $(INCDIR)/opcode/spu-insns.h
+spu-opc.lo: spu-opc.c $(INCDIR)/opcode/spu.h $(INCDIR)/opcode/spu-insns.h \
+ $(INCDIR)/opcode/spu-insns.h
tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic30.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/tic30.h
tic4x-dis.lo: tic4x-dis.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic4x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/tic4x.h
tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h \
- $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/symcat.h
+ $(INCDIR)/ansidecl.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) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/ansidecl.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)/symcat.h
+ $(INCDIR)/ansidecl.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) $(INCDIR)/symcat.h
+ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h
+xc16x-asm.lo: xc16x-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+xc16x-desc.lo: xc16x-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+xc16x-dis.lo: xc16x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
+ opintl.h
+xc16x-ibld.lo: xc16x-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ xc16x-opc.h opintl.h $(INCDIR)/safe-ctype.h
+xc16x-opc.lo: xc16x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- xstormy16-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
xstormy16-dis.lo: xstormy16-dis.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- $(INCDIR)/libiberty.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h $(INCDIR)/opcode/cgen.h \
- xstormy16-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- xstormy16-opc.h $(INCDIR)/libiberty.h
-xc16x-asm.lo: xc16x-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen.h \
- xc16x-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
-xc16x-desc.lo: xc16x-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen.h \
- xc16x-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h
-xc16x-dis.lo: xc16x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
- xc16x-desc.h $(INCDIR)/opcode/cgen.h xc16x-opc.h opintl.h
-xc16x-ibld.lo: xc16x-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h \
- $(INCDIR)/opcode/cgen.h xc16x-opc.h opintl.h $(INCDIR)/safe-ctype.h
-xc16x-opc.lo: xc16x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen.h \
- xc16x-opc.h $(INCDIR)/libiberty.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
xtensa-dis.lo: xtensa-dis.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h sysdep.h \
- config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h
z80-dis.lo: z80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h z8k-opc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ z8k-opc.h
z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/libiberty.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 78faab9..29252e9 100644
--- a/contrib/binutils/opcodes/Makefile.in
+++ b/contrib/binutils/opcodes/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -15,8 +15,6 @@
@SET_MAKE@
-SOURCES = libopcodes.c $(libopcodes_la_SOURCES)
-
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
@@ -48,11 +46,16 @@ DIST_COMMON = $(srcdir)/../config.guess $(srcdir)/../config.sub \
$(srcdir)/../config.guess $(srcdir)/../config.sub
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/../bfd/acinclude.m4 \
- $(top_srcdir)/../config/acx.m4 $(top_srcdir)/../bfd/bfd.m4 \
- $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../libtool.m4 \
- $(top_srcdir)/../gettext.m4 $(top_srcdir)/configure.in
+am__aclocal_m4_deps = $(top_srcdir)/../bfd/acinclude.m4 \
+ $(top_srcdir)/../bfd/warning.m4 $(top_srcdir)/../config/acx.m4 \
+ $(top_srcdir)/../config/depstand.m4 \
+ $(top_srcdir)/../config/gettext-sister.m4 \
+ $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/nls.m4 $(top_srcdir)/../config/po.m4 \
+ $(top_srcdir)/../config/progtest.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -83,11 +86,11 @@ depcomp =
am__depfiles_maybe =
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = libopcodes.c $(libopcodes_la_SOURCES)
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -100,7 +103,6 @@ ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
@@ -124,18 +126,19 @@ CYGPATH_W = @CYGPATH_W@
DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
-GMOFILES = @GMOFILES@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
-GT_NO = @GT_NO@
-GT_YES = @GT_YES@
+GREP = @GREP@
HDEFINES = @HDEFINES@
-INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
+INCINTL = @INCINTL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_LIBBFD_FALSE = @INSTALL_LIBBFD_FALSE@
INSTALL_LIBBFD_TRUE = @INSTALL_LIBBFD_TRUE@
@@ -143,10 +146,10 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
INSTOBJEXT = @INSTOBJEXT@
-INTLDEPS = @INTLDEPS@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
+LD = @LD@
LDFLAGS = @LDFLAGS@
+LIBINTL = @LIBINTL@
+LIBINTL_DEP = @LIBINTL_DEP@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -158,6 +161,8 @@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
NO_WERROR = @NO_WERROR@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -167,13 +172,12 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
-POFILES = @POFILES@
POSUB = @POSUB@
RANLIB = @RANLIB@
+SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
WARN_CFLAGS = @WARN_CFLAGS@
@@ -182,6 +186,7 @@ WIN32LIBADD = @WIN32LIBADD@
XGETTEXT = @XGETTEXT@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
@@ -212,10 +217,10 @@ host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
-l = @l@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
@@ -231,6 +236,7 @@ target_noncanonical = @target_noncanonical@
target_os = @target_os@
target_vendor = @target_vendor@
AUTOMAKE_OPTIONS = 1.9 cygnus
+ACLOCAL_AMFLAGS = -I .. -I ../config -I ../bfd
SUBDIRS = po
INCDIR = $(srcdir)/../include
BFDDIR = $(srcdir)/../bfd
@@ -250,6 +256,8 @@ HFILES = \
fr30-desc.h fr30-opc.h \
frv-desc.h frv-opc.h \
h8500-opc.h \
+ i386-opc.h \
+ i386-tbl.h \
ia64-asmtab.h \
ia64-opc.h \
ip2k-desc.h ip2k-opc.h \
@@ -257,8 +265,10 @@ HFILES = \
m32c-desc.h m32c-opc.h \
m32r-desc.h m32r-opc.h \
mcore-opc.h \
+ mep-desc.h mep-opc.h \
mt-desc.h mt-opc.h \
openrisc-desc.h openrisc-opc.h \
+ score-opc.h \
sh-opc.h \
sh64-opc.h \
sysdep.h \
@@ -282,6 +292,8 @@ CFILES = \
cgen-bitset.c \
cgen-dis.c \
cgen-opc.c \
+ cr16-dis.c \
+ cr16-opc.c \
cris-dis.c \
cris-opc.c \
crx-dis.c \
@@ -310,6 +322,8 @@ CFILES = \
i370-dis.c \
i370-opc.c \
i386-dis.c \
+ i386-opc.c \
+ i386-gen.c \
i860-dis.c \
i960-dis.c \
ia64-dis.c \
@@ -350,6 +364,11 @@ CFILES = \
m88k-dis.c \
maxq-dis.c \
mcore-dis.c \
+ mep-asm.c \
+ mep-desc.c \
+ mep-dis.c \
+ mep-ibld.c \
+ mep-opc.c \
mips-dis.c \
mips-opc.c \
mips16-opc.c \
@@ -381,11 +400,14 @@ CFILES = \
s390-mkopc.c \
s390-opc.c \
s390-dis.c \
+ score-dis.c \
sh-dis.c \
sh64-dis.c \
sh64-opc.c \
sparc-dis.c \
sparc-opc.c \
+ spu-dis.c \
+ spu-opc.c \
tic30-dis.c \
tic4x-dis.c \
tic54x-dis.c \
@@ -424,6 +446,8 @@ ALL_MACHINES = \
cgen-bitset.lo \
cgen-dis.lo \
cgen-opc.lo \
+ cr16-dis.lo \
+ cr16-opc.lo \
cris-dis.lo \
cris-opc.lo \
crx-dis.lo \
@@ -447,6 +471,7 @@ ALL_MACHINES = \
h8500-dis.lo \
hppa-dis.lo \
i386-dis.lo \
+ i386-opc.lo \
i370-dis.lo \
i370-opc.lo \
i860-dis.lo \
@@ -485,6 +510,11 @@ ALL_MACHINES = \
m10300-opc.lo \
maxq-dis.lo \
mcore-dis.lo \
+ mep-asm.lo \
+ mep-desc.lo \
+ mep-dis.lo \
+ mep-ibld.lo \
+ mep-opc.lo \
mips-dis.lo \
mips-opc.lo \
mips16-opc.lo \
@@ -512,11 +542,14 @@ ALL_MACHINES = \
ppc-opc.lo \
s390-dis.lo \
s390-opc.lo \
+ score-dis.lo \
sh-dis.lo \
sh64-dis.lo \
sh64-opc.lo \
sparc-dis.lo \
sparc-opc.lo \
+ spu-dis.lo \
+ spu-opc.lo \
tic30-dis.lo \
tic4x-dis.lo \
tic54x-dis.lo \
@@ -546,7 +579,7 @@ OFILES = @BFD_MACHINES@
# We should reconfigure whenever bfd/configure.in changes, because
# that's where the version number in Makefile comes from.
CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
-INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ -I$(srcdir)/../intl -I../intl
+INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@
libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
# It's desirable to list ../bfd/libbfd.la in DEPENDENCIES and LIBADD.
# Unfortunately this causes libtool to add -L$(libdir), referring to the
@@ -555,7 +588,7 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c
# if host != build.
libopcodes_la_DEPENDENCIES = $(OFILES)
libopcodes_la_LIBADD = $(OFILES) @WIN32LIBADD@
-libopcodes_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
+libopcodes_la_LDFLAGS = -release `cat ../bfd/libtool-soversion` @WIN32LDFLAGS@
# libtool will build .libs/libopcodes.a. We create libopcodes.a in
# the build directory so that we don't have to convert all the
@@ -565,7 +598,7 @@ noinst_LIBRARIES = libopcodes.a
POTFILES = $(HFILES) $(CFILES)
CLEANFILES = \
stamp-ip2k stamp-m32c stamp-m32r stamp-fr30 stamp-frv \
- stamp-openrisc stamp-iq2000 stamp-mt stamp-xstormy16 stamp-xc16x\
+ stamp-openrisc stamp-iq2000 stamp-mep stamp-mt stamp-xstormy16 stamp-xc16x\
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
CGENDIR = @cgendir@
@@ -579,7 +612,7 @@ CGENDEPS = \
$(CGENDIR)/opc-opinst.scm \
cgen-asm.in cgen-dis.in cgen-ibld.in
-CGEN_CPUS = fr30 frv ip2k m32c m32r mt openrisc xc16x xstormy16
+CGEN_CPUS = fr30 frv ip2k m32c m32r mep mt openrisc xc16x xstormy16
@CGEN_MAINT_FALSE@IP2K_DEPS =
@CGEN_MAINT_TRUE@IP2K_DEPS = stamp-ip2k
@CGEN_MAINT_FALSE@M32C_DEPS =
@@ -590,6 +623,8 @@ CGEN_CPUS = fr30 frv ip2k m32c m32r mt openrisc xc16x xstormy16
@CGEN_MAINT_TRUE@FR30_DEPS = stamp-fr30
@CGEN_MAINT_FALSE@FRV_DEPS =
@CGEN_MAINT_TRUE@FRV_DEPS = stamp-frv
+@CGEN_MAINT_FALSE@MEP_DEPS =
+@CGEN_MAINT_TRUE@MEP_DEPS = stamp-mep
@CGEN_MAINT_FALSE@MT_DEPS =
@CGEN_MAINT_TRUE@MT_DEPS = stamp-mt
@CGEN_MAINT_FALSE@OPENRISC_DEPS =
@@ -1042,6 +1077,12 @@ stamp-frv: $(CGENDEPS) $(srcdir)/../cpu/frv.cpu $(srcdir)/../cpu/frv.opc
$(MAKE) run-cgen arch=frv prefix=frv options= \
archfile=$(srcdir)/../cpu/frv.cpu opcfile=$(srcdir)/../cpu/frv.opc extrafiles=
+$(srcdir)/mep-desc.h $(srcdir)/mep-desc.c $(srcdir)/mep-opc.h $(srcdir)/mep-opc.c $(srcdir)/mep-ibld.c $(srcdir)/mep-asm.c $(srcdir)/mep-dis.c: $(MEP_DEPS)
+ @true
+stamp-mep: $(CGENDEPS) $(CPUDIR)/mep.cpu $(CPUDIR)/mep-default.cpu $(CPUDIR)/mep-core.cpu $(CPUDIR)/mep-h1.cpu $(CPUDIR)/mep-ext-cop.cpu $(CPUDIR)/mep-sample-ucidsp.cpu $(CPUDIR)/mep-rhcop.cpu $(CPUDIR)/mep-fmax.cpu $(CPUDIR)/mep.opc
+ $(MAKE) run-cgen arch=mep prefix=mep options= \
+ archfile=$(CPUDIR)/mep.cpu opcfile=$(CPUDIR)/mep.opc extrafiles=
+
$(srcdir)/mt-desc.h $(srcdir)/mt-desc.c $(srcdir)/mt-opc.h $(srcdir)/mt-opc.c $(srcdir)/mt-ibld.c $(srcdir)/mt-asm.c $(srcdir)/mt-dis.c: $(MT_DEPS)
@true
stamp-mt: $(CGENDEPS) $(srcdir)/../cpu/mt.cpu $(srcdir)/../cpu/mt.opc
@@ -1076,6 +1117,14 @@ stamp-xc16x: $(CGENDEPS) $(CPUDIR)/xc16x.cpu $(CPUDIR)/xc16x.opc
$(MAKE) run-cgen arch=xc16x prefix=xc16x options= \
archfile=$(CPUDIR)/xc16x.cpu opcfile=$(CPUDIR)/xc16x.opc extrafiles=
+i386-gen: i386-gen.o
+ $(LINK) i386-gen.o $(LIBIBERTY)
+
+i386-gen.o: i386-gen.c i386-opc.h
+
+i386-tbl.h: @MAINT@ i386-gen i386-opc.tbl i386-reg.tbl
+ ./i386-gen --srcdir $(srcdir) > $(srcdir)/i386-tbl.h
+
ia64-gen: ia64-gen.o
$(LINK) ia64-gen.o $(LIBIBERTY)
@@ -1143,131 +1192,176 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/alpha.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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) $(INCDIR)/symcat.h \
- opintl.h
+ $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h opintl.h
arc-dis.lo: arc-dis.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/dis-asm.h $(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)/bfdlink.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h opintl.h arc-dis.h arc-ext.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/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 \
- $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/arc.h \
opintl.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
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h arc-ext.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/arm.h \
- opintl.h $(INCDIR)/safe-ctype.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/arm.h opintl.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/floatformat.h $(INCDIR)/ansidecl.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.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)/elf/internal.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) $(INCDIR)/symcat.h opintl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/opcode/avr.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/avr.h
bfin-dis.lo: bfin-dis.c $(INCDIR)/opcode/bfin.h $(INCDIR)/dis-asm.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
opintl.h
cgen-bitset.lo: cgen-bitset.c $(INCDIR)/libiberty.h \
$(INCDIR)/ansidecl.h $(INCDIR)/opcode/cgen-bitset.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 \
- $(INCDIR)/opcode/cgen-bitset.h
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h
cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
- $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h $(INCDIR)/opcode/cgen-bitset.h
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h
+cr16-dis.lo: cr16-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/cr16.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
+cr16-opc.lo: cr16-opc.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cr16.h
cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
crx-dis.lo: crx-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- $(INCDIR)/opcode/crx.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/opcode/crx.h
crx-opc.lo: crx-opc.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/symcat.h $(INCDIR)/opcode/crx.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)/symcat.h
+ $(INCDIR)/ansidecl.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) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h
dlx-dis.lo: dlx-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/dlx.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/dlx.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ opintl.h
dis-init.lo: dis-init.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H)
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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-bitset.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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-bitset.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ fr30-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h fr30-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
frv-asm.lo: frv-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
frv-desc.lo: frv-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
frv-dis.lo: frv-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- frv-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
+ opintl.h
frv-ibld.lo: frv-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h frv-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
frv-opc.h opintl.h $(INCDIR)/safe-ctype.h
frv-opc.lo: frv-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h frv-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h frv-opc.h $(INCDIR)/libiberty.h \
- $(INCDIR)/elf/frv.h $(INCDIR)/elf/reloc-macros.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ frv-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h frv-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/elf/frv.h \
+ $(INCDIR)/elf/reloc-macros.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- opintl.h
+ h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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) $(INCDIR)/symcat.h $(BFDDIR)/libhppa.h \
- $(INCDIR)/opcode/hppa.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/i370.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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 $(INCDIR)/symcat.h sysdep.h config.h \
- opintl.h
+ $(INCDIR)/ansidecl.h opintl.h $(INCDIR)/opcode/i386.h
+i386-opc.lo: i386-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h i386-opc.h \
+ $(INCDIR)/opcode/i386.h i386-tbl.h
+i386-gen.lo: i386-gen.c $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h i386-opc.h \
+ $(INCDIR)/opcode/i386.h
i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_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)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h \
+ $(BFD_H)
ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
@@ -1280,290 +1374,426 @@ ia64-opc-m.lo: ia64-opc-m.c ia64-opc.h $(INCDIR)/opcode/ia64.h \
$(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
ia64-opc-d.lo: ia64-opc-d.c
ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/libiberty.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
- $(BFD_H) $(INCDIR)/symcat.h ia64-asmtab.c
+ config.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ ia64-asmtab.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h ia64-asmtab.c
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h sysdep.h config.h $(INCDIR)/getopt.h \
- ia64-opc.h $(INCDIR)/opcode/ia64.h $(BFD_H) $(INCDIR)/symcat.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)/ansidecl.h $(INCDIR)/safe-ctype.h sysdep.h \
+ config.h $(INCDIR)/getopt.h ia64-opc.h $(INCDIR)/opcode/ia64.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.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
ip2k-asm.lo: ip2k-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
ip2k-desc.lo: ip2k-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
ip2k-dis.lo: ip2k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- ip2k-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
+ opintl.h
ip2k-ibld.lo: ip2k-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
ip2k-opc.h opintl.h $(INCDIR)/safe-ctype.h
ip2k-opc.lo: ip2k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h ip2k-opc.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ ip2k-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h ip2k-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
iq2000-asm.lo: iq2000-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
iq2000-desc.lo: iq2000-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
iq2000-dis.lo: iq2000-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- iq2000-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
+ opintl.h
iq2000-ibld.lo: iq2000-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
iq2000-opc.h opintl.h $(INCDIR)/safe-ctype.h
iq2000-opc.lo: iq2000-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h iq2000-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ iq2000-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h iq2000-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
m32c-asm.lo: m32c-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
- opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
+ cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h opintl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
m32c-desc.lo: m32c-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
- opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
+ cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h opintl.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h
m32c-dis.lo: m32c-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- m32c-opc.h cgen-types.h cgen-ops.h opintl.h $(INCDIR)/elf/m32c.h \
- $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
- $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
+ cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h opintl.h \
+ $(INCDIR)/elf/m32c.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h
m32c-ibld.lo: m32c-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32c-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- m32c-opc.h cgen-types.h cgen-ops.h opintl.h $(INCDIR)/safe-ctype.h
-m32c-opc.lo: m32c-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
$(BFD_H) $(INCDIR)/symcat.h m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32c-opc.h cgen-types.h cgen-ops.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ m32c-opc.h cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h \
+ opintl.h $(INCDIR)/safe-ctype.h
+m32c-opc.lo: m32c-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32c-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32c-opc.h \
+ cgen-types.h ../bfd/bfd_stdint.h cgen-ops.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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-bitset.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ m32r-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h m32r-opc.h
m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/symcat.h
+ $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/floatformat.h \
- $(INCDIR)/libiberty.h opintl.h $(INCDIR)/opcode/m68k.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/floatformat.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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)/symcat.h $(INCDIR)/opcode/m88k.h \
- opintl.h $(INCDIR)/libiberty.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/m88k.h opintl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h
maxq-dis.lo: maxq-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/maxq.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/maxq.h
mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h
+mep-asm.lo: mep-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mep-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mep-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+mep-desc.lo: mep-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mep-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mep-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+mep-dis.lo: mep-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ mep-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mep-opc.h \
+ opintl.h $(INCDIR)/elf/mep.h $(INCDIR)/elf/reloc-macros.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h
+mep-ibld.lo: mep-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h mep-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ mep-opc.h opintl.h $(INCDIR)/safe-ctype.h
+mep-opc.lo: mep-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mep-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mep-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/elf/mep.h \
+ $(INCDIR)/elf/reloc-macros.h
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.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
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.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
mips-opc.lo: mips-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
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) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/ansidecl.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) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h opintl.h
m10300-opc.lo: m10300-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10300.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
+ $(INCDIR)/ansidecl.h $(BFD_H) opintl.h
mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
mt-asm.lo: mt-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h mt-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
mt-desc.lo: mt-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h mt-opc.h opintl.h $(INCDIR)/libiberty.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
$(INCDIR)/xregex.h $(INCDIR)/xregex2.h
mt-dis.lo: mt-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- mt-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
+ opintl.h
mt-ibld.lo: mt-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h mt-desc.h \
- $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
mt-opc.h opintl.h $(INCDIR)/safe-ctype.h
mt-opc.lo: mt-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h mt-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h mt-opc.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.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
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ mt-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h mt-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ns32k-dis.lo: ns32k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/dis-asm.h \
+ $(BFD_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-bitset.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/symcat.h openrisc-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
openrisc-dis.lo: openrisc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h $(INCDIR)/opcode/cgen.h \
- openrisc-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h \
- $(INCDIR)/opcode/cgen.h openrisc-opc.h $(INCDIR)/libiberty.h
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ openrisc-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h openrisc-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
or32-dis.lo: or32-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/or32.h \
$(INCDIR)/safe-ctype.h
or32-opc.lo: or32-opc.c $(INCDIR)/safe-ctype.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/or32.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
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/symcat.h
+ $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/ppc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/s390.h
+score-dis.lo: score-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ score-opc.h opintl.h $(BFD_H) $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/score.h $(INCDIR)/elf/reloc-macros.h
sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- sh-opc.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/dis-asm.h
+ sh-opc.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/dis-asm.h $(BFD_H)
sh64-dis.lo: sh64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
$(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
- sh64-opc.h $(INCDIR)/libiberty.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
- $(BFDDIR)/elf32-sh64.h
+ $(INCDIR)/ansidecl.h sh64-opc.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h $(BFDDIR)/elf32-sh64.h
sh64-opc.lo: sh64-opc.c sh64-opc.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)/symcat.h $(INCDIR)/libiberty.h opintl.h
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h opintl.h
sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/sparc.h
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/ansidecl.h
+spu-dis.lo: spu-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/spu.h $(INCDIR)/opcode/spu-insns.h
+spu-opc.lo: spu-opc.c $(INCDIR)/opcode/spu.h $(INCDIR)/opcode/spu-insns.h \
+ $(INCDIR)/opcode/spu-insns.h
tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic30.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/tic30.h
tic4x-dis.lo: tic4x-dis.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic4x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/tic4x.h
tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h \
- $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.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)/symcat.h
+ $(INCDIR)/ansidecl.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) \
- $(INCDIR)/symcat.h opintl.h
+ $(INCDIR)/ansidecl.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)/symcat.h
+ $(INCDIR)/ansidecl.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) $(INCDIR)/symcat.h
+ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h
+xc16x-asm.lo: xc16x-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+xc16x-desc.lo: xc16x-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
+xc16x-dis.lo: xc16x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
+ opintl.h
+xc16x-ibld.lo: xc16x-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h \
+ xc16x-opc.h opintl.h $(INCDIR)/safe-ctype.h
+xc16x-opc.lo: xc16x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/symcat.h \
+ xc16x-desc.h $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xc16x-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- xstormy16-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
+ opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.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)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
+ opintl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
xstormy16-dis.lo: xstormy16-dis.c sysdep.h config.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
- $(INCDIR)/libiberty.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
- $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ansidecl.h xstormy16-desc.h $(INCDIR)/opcode/cgen-bitset.h \
+ $(INCDIR)/opcode/cgen.h $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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-bitset.h $(INCDIR)/opcode/cgen.h \
- xstormy16-opc.h opintl.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.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)/ansidecl.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/symcat.h xstormy16-desc.h \
$(INCDIR)/opcode/cgen-bitset.h $(INCDIR)/opcode/cgen.h \
- xstormy16-opc.h $(INCDIR)/libiberty.h
-xc16x-asm.lo: xc16x-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen.h \
- xc16x-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
- $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
-xc16x-desc.lo: xc16x-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen.h \
- xc16x-opc.h opintl.h $(INCDIR)/libiberty.h $(INCDIR)/xregex.h \
- $(INCDIR)/xregex2.h
-xc16x-dis.lo: xc16x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
- xc16x-desc.h $(INCDIR)/opcode/cgen.h xc16x-opc.h opintl.h
-xc16x-ibld.lo: xc16x-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h \
- $(INCDIR)/opcode/cgen.h xc16x-opc.h opintl.h $(INCDIR)/safe-ctype.h
-xc16x-opc.lo: xc16x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(BFD_H) $(INCDIR)/symcat.h xc16x-desc.h $(INCDIR)/opcode/cgen.h \
- xc16x-opc.h $(INCDIR)/libiberty.h
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen-bitset.h xstormy16-opc.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
xtensa-dis.lo: xtensa-dis.c $(INCDIR)/xtensa-isa.h \
- $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h sysdep.h \
- config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
+ sysdep.h config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h
z80-dis.lo: z80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h z8k-opc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ z8k-opc.h
z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/contrib/binutils/opcodes/acinclude.m4 b/contrib/binutils/opcodes/acinclude.m4
deleted file mode 100644
index 3a47b1b..0000000
--- a/contrib/binutils/opcodes/acinclude.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-sinclude(../bfd/acinclude.m4)
-
-dnl sinclude(../libtool.m4) already included in bfd/acinclude.m4
-dnl The lines below arrange for aclocal not to bring libtool.m4
-dnl AM_PROG_LIBTOOL into aclocal.m4, while still arranging for automake
-dnl to add a definition of LIBTOOL to Makefile.in.
-ifelse(yes,no,[
-AC_DEFUN([AM_PROG_LIBTOOL],)
-AC_DEFUN([AM_DISABLE_SHARED],)
-AC_SUBST(LIBTOOL)
-])
-
-dnl sinclude(../gettext.m4) already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([CY_WITH_NLS],)
-AC_SUBST(INTLLIBS)
-])
-
-dnl AM_INSTALL_LIBBFD already included in bfd/acinclude.m4
-ifelse(yes,no,[
-AC_DEFUN([AM_INSTALL_LIBBFD],)
-AC_SUBST(bfdlibdir)
-AC_SUBST(bfdincludedir)
-])
diff --git a/contrib/binutils/opcodes/aclocal.m4 b/contrib/binutils/opcodes/aclocal.m4
index d5f3158..2785579 100644
--- a/contrib/binutils/opcodes/aclocal.m4
+++ b/contrib/binutils/opcodes/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005 Free Software Foundation, Inc.
@@ -28,7 +28,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
# Call AM_AUTOMAKE_VERSION so it can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.5])])
+ [AM_AUTOMAKE_VERSION([1.9.6])])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -480,27 +480,6 @@ AC_DEFUN([AM_PROG_INSTALL_SH],
install_sh=${install_sh-"$am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
@@ -889,4 +868,16 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
-m4_include([acinclude.m4])
+m4_include([../bfd/acinclude.m4])
+m4_include([../bfd/warning.m4])
+m4_include([../config/acx.m4])
+m4_include([../config/depstand.m4])
+m4_include([../config/gettext-sister.m4])
+m4_include([../config/lead-dot.m4])
+m4_include([../config/nls.m4])
+m4_include([../config/po.m4])
+m4_include([../config/progtest.m4])
+m4_include([../libtool.m4])
+m4_include([../ltoptions.m4])
+m4_include([../ltsugar.m4])
+m4_include([../ltversion.m4])
diff --git a/contrib/binutils/opcodes/arm-dis.c b/contrib/binutils/opcodes/arm-dis.c
index bc5b52c..2af8fda 100644
--- a/contrib/binutils/opcodes/arm-dis.c
+++ b/contrib/binutils/opcodes/arm-dis.c
@@ -1,6 +1,6 @@
/* Instruction printing code for the ARM
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
- Free Software Foundation, Inc.
+ 2007, Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modification by James G. Smith (jsmith@cygnus.co.uk)
@@ -26,6 +26,7 @@
#include "opcode/arm.h"
#include "opintl.h"
#include "safe-ctype.h"
+#include "floatformat.h"
/* FIXME: This shouldn't be done here. */
#include "coff/internal.h"
@@ -61,8 +62,12 @@ struct opcode16
%% %
- %c print condition code (always bits 28-31)
+ %c print condition code (always bits 28-31 in ARM mode)
+ %q print shifter argument
+ %u print condition code (unconditional in ARM mode)
%A print address for ldc/stc/ldf/stf instruction
+ %B print vstm/vldm register list
+ %C print vstr/vldr address operand
%I print cirrus signed shift immediate: bits 0..3|4..6
%F print the COUNT field of a LFM/SFM instruction.
%P print floating point precision in arithmetic insn
@@ -71,6 +76,7 @@ struct opcode16
%<bitfield>r print as an ARM register
%<bitfield>d print the bitfield in decimal
+ %<bitfield>k print immediate for VFPv3 conversion instruction
%<bitfield>x print the bitfield in hex
%<bitfield>X print the bitfield as 1 hex digit without leading "0x"
%<bitfield>f print a floating point constant if >7 else a
@@ -78,19 +84,26 @@ struct opcode16
%<bitfield>w print as an iWMMXt width field - [bhwd]ss/us
%<bitfield>g print as an iWMMXt 64-bit register
%<bitfield>G print as an iWMMXt general purpose or control register
+ %<bitfield>D print as a NEON D register
+ %<bitfield>Q print as a NEON Q register
- %<code>y print a single precision VFP reg.
+ %y<code> 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
+ %z<code> print a double precision VFP reg
Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
- %<bitnum>'c print specified char iff bit is one
- %<bitnum>`c print specified char iff bit is zero
- %<bitnum>?ab print a if bit is one else print b
+ %<bitfield>'c print specified char iff bitfield is all ones
+ %<bitfield>`c print specified char iff bitfield is all zeroes
+ %<bitfield>?ab... select from array of values in big endian order
+
%L print as an iWMMXt N/M width field.
%Z print the Immediate of a WSHUFH instruction.
%l like 'A' except use byte offsets for 'B' & 'H'
- versions. */
+ versions.
+ %i print 5-bit immediate in bits 8,3..0
+ (print "32" when 0)
+ %r print register offset address for wldt/wstr instruction
+*/
/* Common coprocessor opcodes shared between Arm and Thumb-2. */
@@ -105,7 +118,7 @@ static const struct opcode32 coprocessor_opcodes[] =
/* Intel Wireless MMX technology instructions. */
#define FIRST_IWMMXT_INSN 0x0e130130
-#define IWMMXT_INSN_COUNT 47
+#define IWMMXT_INSN_COUNT 73
{ARM_CEXT_IWMMXT, 0x0e130130, 0x0f3f0fff, "tandc%22-23w%c\t%12-15r"},
{ARM_CEXT_XSCALE, 0x0e400010, 0x0ff00f3f, "tbcst%6-7w%c\t%16-19g, %12-15r"},
{ARM_CEXT_XSCALE, 0x0e130170, 0x0f3f0ff8, "textrc%22-23w%c\t%12-15r, #%0-2d"},
@@ -120,37 +133,63 @@ static const struct opcode32 coprocessor_opcodes[] =
{ARM_CEXT_XSCALE, 0x0e100110, 0x0ff00ff0, "tmrc%c\t%12-15r, %16-19G"},
{ARM_CEXT_XSCALE, 0x0c500000, 0x0ff00ff0, "tmrrc%c\t%12-15r, %16-19r, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e130150, 0x0f3f0fff, "torc%22-23w%c\t%12-15r"},
+ {ARM_CEXT_XSCALE, 0x0e130190, 0x0f3f0fff, "torvsc%22-23w%c\t%12-15r"},
+ {ARM_CEXT_XSCALE, 0x0e2001c0, 0x0f300fff, "wabs%22-23w%c\t%12-15g, %16-19g"},
{ARM_CEXT_XSCALE, 0x0e0001c0, 0x0f300fff, "wacc%22-23w%c\t%12-15g, %16-19g"},
{ARM_CEXT_XSCALE, 0x0e000180, 0x0f000ff0, "wadd%20-23w%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e2001a0, 0x0f300ff0, "waddbhus%22?ml%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0ea001a0, 0x0ff00ff0, "waddsubhx%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000020, 0x0f800ff0, "waligni%c\t%12-15g, %16-19g, %0-3g, #%20-22d"},
{ARM_CEXT_XSCALE, 0x0e800020, 0x0fc00ff0, "walignr%20-21d%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e200000, 0x0fe00ff0, "wand%20'n%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e800000, 0x0fa00ff0, "wavg2%22?hb%20'r%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e400000, 0x0fe00ff0, "wavg4%20'r%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000060, 0x0f300ff0, "wcmpeq%22-23w%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e100060, 0x0f100ff0, "wcmpgt%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0xfc500100, 0xfe500f00, "wldrd\t%12-15g, %r"},
{ARM_CEXT_XSCALE, 0xfc100100, 0xfe500f00, "wldrw\t%12-15G, %A"},
{ARM_CEXT_XSCALE, 0x0c100000, 0x0e100e00, "wldr%L%c\t%12-15g, %l"},
{ARM_CEXT_XSCALE, 0x0e400100, 0x0fc00ff0, "wmac%21?su%20'z%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e800100, 0x0fd00ff0, "wmadd%21?su%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e800100, 0x0fc00ff0, "wmadd%21?su%20'x%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0ec00100, 0x0fd00ff0, "wmadd%21?sun%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000160, 0x0f100ff0, "wmax%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e000080, 0x0f100fe0, "wmerge%c\t%12-15g, %16-19g, %0-3g, #%21-23d"},
+ {ARM_CEXT_XSCALE, 0x0e0000a0, 0x0f800ff0, "wmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e800120, 0x0f800ff0, "wmiaw%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e100160, 0x0f100ff0, "wmin%21?su%22-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e000100, 0x0fc00ff0, "wmul%21?su%20?ml%23'r%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0ed00100, 0x0fd00ff0, "wmul%21?sumr%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0ee000c0, 0x0fe00ff0, "wmulwsm%20`r%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0ec000c0, 0x0fe00ff0, "wmulwum%20`r%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0eb000c0, 0x0ff00ff0, "wmulwl%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e8000a0, 0x0f800ff0, "wqmia%21?tb%20?tb%22'n%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e100080, 0x0fd00ff0, "wqmulm%21'r%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0ec000e0, 0x0fd00ff0, "wqmulwm%21'r%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000000, 0x0ff00ff0, "wor%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000080, 0x0f000ff0, "wpack%20-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e300040, 0x0f300ff0, "wror%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e300148, 0x0f300ffc, "wror%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
+ {ARM_CEXT_XSCALE, 0xfe300040, 0xff300ef0, "wror%22-23w\t%12-15g, %16-19g, #%i"},
+ {ARM_CEXT_XSCALE, 0x0e300040, 0x0f300ff0, "wror%22-23w%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e300140, 0x0f300ff0, "wror%22-23wg%c\t%12-15g, %16-19g, %0-3G"},
{ARM_CEXT_XSCALE, 0x0e000120, 0x0fa00ff0, "wsad%22?hb%20'z%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e0001e0, 0x0f000ff0, "wshufh%c\t%12-15g, %16-19g, #%Z"},
+ {ARM_CEXT_XSCALE, 0xfe100040, 0xff300ef0, "wsll%22-23w\t%12-15g, %16-19g, #%i"},
{ARM_CEXT_XSCALE, 0x0e100040, 0x0f300ff0, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e100148, 0x0f300ffc, "wsll%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
+ {ARM_CEXT_XSCALE, 0xfe000040, 0xff300ef0, "wsra%22-23w\t%12-15g, %16-19g, #%i"},
{ARM_CEXT_XSCALE, 0x0e000040, 0x0f300ff0, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e000148, 0x0f300ffc, "wsra%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
+ {ARM_CEXT_XSCALE, 0xfe200040, 0xff300ef0, "wsrl%22-23w\t%12-15g, %16-19g, #%i"},
{ARM_CEXT_XSCALE, 0x0e200040, 0x0f300ff0, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e200148, 0x0f300ffc, "wsrl%22-23w%8'g%c\t%12-15g, %16-19g, %0-3G"},
+ {ARM_CEXT_XSCALE, 0xfc400100, 0xfe500f00, "wstrd\t%12-15g, %r"},
{ARM_CEXT_XSCALE, 0xfc000100, 0xfe500f00, "wstrw\t%12-15G, %A"},
{ARM_CEXT_XSCALE, 0x0c000000, 0x0e100e00, "wstr%L%c\t%12-15g, %l"},
{ARM_CEXT_XSCALE, 0x0e0001a0, 0x0f000ff0, "wsub%20-23w%c\t%12-15g, %16-19g, %0-3g"},
- {ARM_CEXT_XSCALE, 0x0e0000c0, 0x0f100fff, "wunpckeh%21?su%22-23w%c\t%12-15g, %16-19g"},
+ {ARM_CEXT_XSCALE, 0x0ed001c0, 0x0ff00ff0, "wsubaddhx%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e1001c0, 0x0f300ff0, "wabsdiff%22-23w%c\t%12-15g, %16-19g, %0-3g"},
+ {ARM_CEXT_XSCALE, 0x0e0000c0, 0x0fd00fff, "wunpckeh%21?sub%c\t%12-15g, %16-19g"},
+ {ARM_CEXT_XSCALE, 0x0e4000c0, 0x0fd00fff, "wunpckeh%21?suh%c\t%12-15g, %16-19g"},
+ {ARM_CEXT_XSCALE, 0x0e8000c0, 0x0fd00fff, "wunpckeh%21?suw%c\t%12-15g, %16-19g"},
{ARM_CEXT_XSCALE, 0x0e0000e0, 0x0f100fff, "wunpckel%21?su%22-23w%c\t%12-15g, %16-19g"},
{ARM_CEXT_XSCALE, 0x0e1000c0, 0x0f300ff0, "wunpckih%22-23w%c\t%12-15g, %16-19g, %0-3g"},
{ARM_CEXT_XSCALE, 0x0e1000e0, 0x0f300ff0, "wunpckil%22-23w%c\t%12-15g, %16-19g, %0-3g"},
@@ -201,80 +240,114 @@ static const struct opcode32 coprocessor_opcodes[] =
{FPU_FPA_EXT_V2, 0x0c000200, 0x0e100f00, "sfm%c\t%12-14f, %F, %A"},
{FPU_FPA_EXT_V2, 0x0c100200, 0x0e100f00, "lfm%c\t%12-14f, %F, %A"},
+ /* Register load/store */
+ {FPU_NEON_EXT_V1, 0x0d200b00, 0x0fb00f01, "vstmdb%c\t%16-19r%21'!, %B"},
+ {FPU_NEON_EXT_V1, 0x0d300b00, 0x0fb00f01, "vldmdb%c\t%16-19r%21'!, %B"},
+ {FPU_NEON_EXT_V1, 0x0c800b00, 0x0f900f01, "vstmia%c\t%16-19r%21'!, %B"},
+ {FPU_NEON_EXT_V1, 0x0c900b00, 0x0f900f01, "vldmia%c\t%16-19r%21'!, %B"},
+ {FPU_NEON_EXT_V1, 0x0d000b00, 0x0f300f00, "vstr%c\t%12-15,22D, %C"},
+ {FPU_NEON_EXT_V1, 0x0d100b00, 0x0f300f00, "vldr%c\t%12-15,22D, %C"},
+
+ /* Data transfer between ARM and NEON registers */
+ {FPU_NEON_EXT_V1, 0x0e800b10, 0x0ff00f70, "vdup%c.32\t%16-19,7D, %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0e800b30, 0x0ff00f70, "vdup%c.16\t%16-19,7D, %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0ea00b10, 0x0ff00f70, "vdup%c.32\t%16-19,7Q, %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0ea00b30, 0x0ff00f70, "vdup%c.16\t%16-19,7Q, %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0ec00b10, 0x0ff00f70, "vdup%c.8\t%16-19,7D, %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0ee00b10, 0x0ff00f70, "vdup%c.8\t%16-19,7Q, %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0c400b10, 0x0ff00fd0, "vmov%c\t%0-3,5D, %12-15r, %16-19r"},
+ {FPU_NEON_EXT_V1, 0x0c500b10, 0x0ff00fd0, "vmov%c\t%12-15r, %16-19r, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0x0e000b10, 0x0fd00f70, "vmov%c.32\t%16-19,7D[%21d], %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0e100b10, 0x0f500f70, "vmov%c.32\t%12-15r, %16-19,7D[%21d]"},
+ {FPU_NEON_EXT_V1, 0x0e000b30, 0x0fd00f30, "vmov%c.16\t%16-19,7D[%6,21d], %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0e100b30, 0x0f500f30, "vmov%c.%23?us16\t%12-15r, %16-19,7D[%6,21d]"},
+ {FPU_NEON_EXT_V1, 0x0e400b10, 0x0fd00f10, "vmov%c.8\t%16-19,7D[%5,6,21d], %12-15r"},
+ {FPU_NEON_EXT_V1, 0x0e500b10, 0x0f500f10, "vmov%c.%23?us8\t%12-15r, %16-19,7D[%5,6,21d]"},
+
/* Floating point coprocessor (VFP) instructions */
- {FPU_VFP_EXT_V1, 0x0eb00bc0, 0x0fff0ff0, "fabsd%c\t%1z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0eb00ac0, 0x0fbf0fd0, "fabss%c\t%1y, %0y"},
- {FPU_VFP_EXT_V1, 0x0e300b00, 0x0ff00ff0, "faddd%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e300a00, 0x0fb00f50, "fadds%c\t%1y, %2y, %0y"},
- {FPU_VFP_EXT_V1, 0x0eb40b40, 0x0fff0f70, "fcmp%7'ed%c\t%1z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0eb40a40, 0x0fbf0f50, "fcmp%7'es%c\t%1y, %0y"},
- {FPU_VFP_EXT_V1, 0x0eb50b40, 0x0fff0f70, "fcmp%7'ezd%c\t%1z"},
- {FPU_VFP_EXT_V1xD, 0x0eb50a40, 0x0fbf0f70, "fcmp%7'ezs%c\t%1y"},
- {FPU_VFP_EXT_V1, 0x0eb00b40, 0x0fff0ff0, "fcpyd%c\t%1z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0eb00a40, 0x0fbf0fd0, "fcpys%c\t%1y, %0y"},
- {FPU_VFP_EXT_V1, 0x0eb70ac0, 0x0fff0fd0, "fcvtds%c\t%1z, %0y"},
- {FPU_VFP_EXT_V1, 0x0eb70bc0, 0x0fbf0ff0, "fcvtsd%c\t%1y, %0z"},
- {FPU_VFP_EXT_V1, 0x0e800b00, 0x0ff00ff0, "fdivd%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e800a00, 0x0fb00f50, "fdivs%c\t%1y, %2y, %0y"},
- {FPU_VFP_EXT_V1, 0x0d100b00, 0x0f700f00, "fldd%c\t%1z, %A"},
- {FPU_VFP_EXT_V1xD, 0x0c900b00, 0x0fd00f00, "fldmia%0?xd%c\t%16-19r%21'!, %3z"},
- {FPU_VFP_EXT_V1xD, 0x0d300b00, 0x0ff00f00, "fldmdb%0?xd%c\t%16-19r!, %3z"},
- {FPU_VFP_EXT_V1xD, 0x0d100a00, 0x0f300f00, "flds%c\t%1y, %A"},
- {FPU_VFP_EXT_V1xD, 0x0c900a00, 0x0f900f00, "fldmias%c\t%16-19r%21'!, %3y"},
- {FPU_VFP_EXT_V1xD, 0x0d300a00, 0x0fb00f00, "fldmdbs%c\t%16-19r!, %3y"},
- {FPU_VFP_EXT_V1, 0x0e000b00, 0x0ff00ff0, "fmacd%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e000a00, 0x0fb00f50, "fmacs%c\t%1y, %2y, %0y"},
- {FPU_VFP_EXT_V1, 0x0e200b10, 0x0ff00fff, "fmdhr%c\t%2z, %12-15r"},
- {FPU_VFP_EXT_V1, 0x0e000b10, 0x0ff00fff, "fmdlr%c\t%2z, %12-15r"},
- {FPU_VFP_EXT_V2, 0x0c400b10, 0x0ff00ff0, "fmdrr%c\t%0z, %12-15r, %16-19r"},
- {FPU_VFP_EXT_V1, 0x0e300b10, 0x0ff00fff, "fmrdh%c\t%12-15r, %2z"},
- {FPU_VFP_EXT_V1, 0x0e100b10, 0x0ff00fff, "fmrdl%c\t%12-15r, %2z"},
- {FPU_VFP_EXT_V1, 0x0c500b10, 0x0ff00ff0, "fmrrd%c\t%12-15r, %16-19r, %0z"},
- {FPU_VFP_EXT_V2, 0x0c500a10, 0x0ff00fd0, "fmrrs%c\t%12-15r, %16-19r, %4y"},
- {FPU_VFP_EXT_V1xD, 0x0e100a10, 0x0ff00f7f, "fmrs%c\t%12-15r, %2y"},
{FPU_VFP_EXT_V1xD, 0x0ef1fa10, 0x0fffffff, "fmstat%c"},
- {FPU_VFP_EXT_V1xD, 0x0ef00a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpsid"},
- {FPU_VFP_EXT_V1xD, 0x0ef10a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpscr"},
- {FPU_VFP_EXT_V1xD, 0x0ef80a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpexc"},
- {FPU_VFP_EXT_V1xD, 0x0ef90a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpinst\t@ Impl def"},
- {FPU_VFP_EXT_V1xD, 0x0efa0a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpinst2\t@ Impl def"},
- {FPU_VFP_EXT_V1xD, 0x0ef00a10, 0x0ff00fff, "fmrx%c\t%12-15r, <impl def 0x%16-19x>"},
- {FPU_VFP_EXT_V1, 0x0e100b00, 0x0ff00ff0, "fmscd%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e100a00, 0x0fb00f50, "fmscs%c\t%1y, %2y, %0y"},
- {FPU_VFP_EXT_V1xD, 0x0e000a10, 0x0ff00f7f, "fmsr%c\t%2y, %12-15r"},
- {FPU_VFP_EXT_V2, 0x0c400a10, 0x0ff00fd0, "fmsrr%c\t%12-15r, %16-19r, %4y"},
- {FPU_VFP_EXT_V1, 0x0e200b00, 0x0ff00ff0, "fmuld%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e200a00, 0x0fb00f50, "fmuls%c\t%1y, %2y, %0y"},
{FPU_VFP_EXT_V1xD, 0x0ee00a10, 0x0fff0fff, "fmxr%c\tfpsid, %12-15r"},
{FPU_VFP_EXT_V1xD, 0x0ee10a10, 0x0fff0fff, "fmxr%c\tfpscr, %12-15r"},
+ {FPU_VFP_EXT_V1xD, 0x0ee60a10, 0x0fff0fff, "fmxr%c\tmvfr1, %12-15r"},
+ {FPU_VFP_EXT_V1xD, 0x0ee70a10, 0x0fff0fff, "fmxr%c\tmvfr0, %12-15r"},
{FPU_VFP_EXT_V1xD, 0x0ee80a10, 0x0fff0fff, "fmxr%c\tfpexc, %12-15r"},
{FPU_VFP_EXT_V1xD, 0x0ee90a10, 0x0fff0fff, "fmxr%c\tfpinst, %12-15r\t@ Impl def"},
{FPU_VFP_EXT_V1xD, 0x0eea0a10, 0x0fff0fff, "fmxr%c\tfpinst2, %12-15r\t@ Impl def"},
- {FPU_VFP_EXT_V1xD, 0x0ee00a10, 0x0ff00fff, "fmxr%c\t<impl def 0x%16-19x>, %12-15r"},
- {FPU_VFP_EXT_V1, 0x0eb10b40, 0x0fff0ff0, "fnegd%c\t%1z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0eb10a40, 0x0fbf0fd0, "fnegs%c\t%1y, %0y"},
- {FPU_VFP_EXT_V1, 0x0e000b40, 0x0ff00ff0, "fnmacd%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e000a40, 0x0fb00f50, "fnmacs%c\t%1y, %2y, %0y"},
- {FPU_VFP_EXT_V1, 0x0e100b40, 0x0ff00ff0, "fnmscd%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e100a40, 0x0fb00f50, "fnmscs%c\t%1y, %2y, %0y"},
- {FPU_VFP_EXT_V1, 0x0e200b40, 0x0ff00ff0, "fnmuld%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e200a40, 0x0fb00f50, "fnmuls%c\t%1y, %2y, %0y"},
- {FPU_VFP_EXT_V1, 0x0eb80bc0, 0x0fff0fd0, "fsitod%c\t%1z, %0y"},
- {FPU_VFP_EXT_V1xD, 0x0eb80ac0, 0x0fbf0fd0, "fsitos%c\t%1y, %0y"},
- {FPU_VFP_EXT_V1, 0x0eb10bc0, 0x0fff0ff0, "fsqrtd%c\t%1z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0eb10ac0, 0x0fbf0fd0, "fsqrts%c\t%1y, %0y"},
- {FPU_VFP_EXT_V1, 0x0d000b00, 0x0f700f00, "fstd%c\t%1z, %A"},
- {FPU_VFP_EXT_V1xD, 0x0c800b00, 0x0fd00f00, "fstmia%0?xd%c\t%16-19r%21'!, %3z"},
- {FPU_VFP_EXT_V1xD, 0x0d200b00, 0x0ff00f00, "fstmdb%0?xd%c\t%16-19r!, %3z"},
- {FPU_VFP_EXT_V1xD, 0x0d000a00, 0x0f300f00, "fsts%c\t%1y, %A"},
- {FPU_VFP_EXT_V1xD, 0x0c800a00, 0x0f900f00, "fstmias%c\t%16-19r%21'!, %3y"},
- {FPU_VFP_EXT_V1xD, 0x0d200a00, 0x0fb00f00, "fstmdbs%c\t%16-19r!, %3y"},
- {FPU_VFP_EXT_V1, 0x0e300b40, 0x0ff00ff0, "fsubd%c\t%1z, %2z, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0e300a40, 0x0fb00f50, "fsubs%c\t%1y, %2y, %0y"},
- {FPU_VFP_EXT_V1, 0x0ebc0b40, 0x0fbe0f70, "fto%16?sui%7'zd%c\t%1y, %0z"},
- {FPU_VFP_EXT_V1xD, 0x0ebc0a40, 0x0fbe0f50, "fto%16?sui%7'zs%c\t%1y, %0y"},
- {FPU_VFP_EXT_V1, 0x0eb80b40, 0x0fff0fd0, "fuitod%c\t%1z, %0y"},
- {FPU_VFP_EXT_V1xD, 0x0eb80a40, 0x0fbf0fd0, "fuitos%c\t%1y, %0y"},
+ {FPU_VFP_EXT_V1xD, 0x0ef00a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpsid"},
+ {FPU_VFP_EXT_V1xD, 0x0ef10a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpscr"},
+ {FPU_VFP_EXT_V1xD, 0x0ef60a10, 0x0fff0fff, "fmrx%c\t%12-15r, mvfr1"},
+ {FPU_VFP_EXT_V1xD, 0x0ef70a10, 0x0fff0fff, "fmrx%c\t%12-15r, mvfr0"},
+ {FPU_VFP_EXT_V1xD, 0x0ef80a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpexc"},
+ {FPU_VFP_EXT_V1xD, 0x0ef90a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpinst\t@ Impl def"},
+ {FPU_VFP_EXT_V1xD, 0x0efa0a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpinst2\t@ Impl def"},
+ {FPU_VFP_EXT_V1, 0x0e000b10, 0x0ff00fff, "fmdlr%c\t%z2, %12-15r"},
+ {FPU_VFP_EXT_V1, 0x0e100b10, 0x0ff00fff, "fmrdl%c\t%12-15r, %z2"},
+ {FPU_VFP_EXT_V1, 0x0e200b10, 0x0ff00fff, "fmdhr%c\t%z2, %12-15r"},
+ {FPU_VFP_EXT_V1, 0x0e300b10, 0x0ff00fff, "fmrdh%c\t%12-15r, %z2"},
+ {FPU_VFP_EXT_V1xD, 0x0ee00a10, 0x0ff00fff, "fmxr%c\t<impl def %16-19x>, %12-15r"},
+ {FPU_VFP_EXT_V1xD, 0x0ef00a10, 0x0ff00fff, "fmrx%c\t%12-15r, <impl def %16-19x>"},
+ {FPU_VFP_EXT_V1xD, 0x0e000a10, 0x0ff00f7f, "fmsr%c\t%y2, %12-15r"},
+ {FPU_VFP_EXT_V1xD, 0x0e100a10, 0x0ff00f7f, "fmrs%c\t%12-15r, %y2"},
+ {FPU_VFP_EXT_V1xD, 0x0eb50a40, 0x0fbf0f70, "fcmp%7'ezs%c\t%y1"},
+ {FPU_VFP_EXT_V1, 0x0eb50b40, 0x0fbf0f70, "fcmp%7'ezd%c\t%z1"},
+ {FPU_VFP_EXT_V1xD, 0x0eb00a40, 0x0fbf0fd0, "fcpys%c\t%y1, %y0"},
+ {FPU_VFP_EXT_V1xD, 0x0eb00ac0, 0x0fbf0fd0, "fabss%c\t%y1, %y0"},
+ {FPU_VFP_EXT_V1, 0x0eb00b40, 0x0fbf0fd0, "fcpyd%c\t%z1, %z0"},
+ {FPU_VFP_EXT_V1, 0x0eb00bc0, 0x0fbf0fd0, "fabsd%c\t%z1, %z0"},
+ {FPU_VFP_EXT_V1xD, 0x0eb10a40, 0x0fbf0fd0, "fnegs%c\t%y1, %y0"},
+ {FPU_VFP_EXT_V1xD, 0x0eb10ac0, 0x0fbf0fd0, "fsqrts%c\t%y1, %y0"},
+ {FPU_VFP_EXT_V1, 0x0eb10b40, 0x0fbf0fd0, "fnegd%c\t%z1, %z0"},
+ {FPU_VFP_EXT_V1, 0x0eb10bc0, 0x0fbf0fd0, "fsqrtd%c\t%z1, %z0"},
+ {FPU_VFP_EXT_V1, 0x0eb70ac0, 0x0fbf0fd0, "fcvtds%c\t%z1, %y0"},
+ {FPU_VFP_EXT_V1, 0x0eb70bc0, 0x0fbf0fd0, "fcvtsd%c\t%y1, %z0"},
+ {FPU_VFP_EXT_V1xD, 0x0eb80a40, 0x0fbf0fd0, "fuitos%c\t%y1, %y0"},
+ {FPU_VFP_EXT_V1xD, 0x0eb80ac0, 0x0fbf0fd0, "fsitos%c\t%y1, %y0"},
+ {FPU_VFP_EXT_V1, 0x0eb80b40, 0x0fbf0fd0, "fuitod%c\t%z1, %y0"},
+ {FPU_VFP_EXT_V1, 0x0eb80bc0, 0x0fbf0fd0, "fsitod%c\t%z1, %y0"},
+ {FPU_VFP_EXT_V1xD, 0x0eb40a40, 0x0fbf0f50, "fcmp%7'es%c\t%y1, %y0"},
+ {FPU_VFP_EXT_V1, 0x0eb40b40, 0x0fbf0f50, "fcmp%7'ed%c\t%z1, %z0"},
+ {FPU_VFP_EXT_V3, 0x0eba0a40, 0x0fbe0f50, "f%16?us%7?lhtos%c\t%y1, #%5,0-3k"},
+ {FPU_VFP_EXT_V3, 0x0eba0b40, 0x0fbe0f50, "f%16?us%7?lhtod%c\t%z1, #%5,0-3k"},
+ {FPU_VFP_EXT_V1xD, 0x0ebc0a40, 0x0fbe0f50, "fto%16?sui%7'zs%c\t%y1, %y0"},
+ {FPU_VFP_EXT_V1, 0x0ebc0b40, 0x0fbe0f50, "fto%16?sui%7'zd%c\t%y1, %z0"},
+ {FPU_VFP_EXT_V3, 0x0ebe0a40, 0x0fbe0f50, "fto%16?us%7?lhs%c\t%y1, #%5,0-3k"},
+ {FPU_VFP_EXT_V3, 0x0ebe0b40, 0x0fbe0f50, "fto%16?us%7?lhd%c\t%z1, #%5,0-3k"},
+ {FPU_VFP_EXT_V1, 0x0c500b10, 0x0fb00ff0, "fmrrd%c\t%12-15r, %16-19r, %z0"},
+ {FPU_VFP_EXT_V3, 0x0eb00a00, 0x0fb00ff0, "fconsts%c\t%y1, #%0-3,16-19d"},
+ {FPU_VFP_EXT_V3, 0x0eb00b00, 0x0fb00ff0, "fconstd%c\t%z1, #%0-3,16-19d"},
+ {FPU_VFP_EXT_V2, 0x0c400a10, 0x0ff00fd0, "fmsrr%c\t%y4, %12-15r, %16-19r"},
+ {FPU_VFP_EXT_V2, 0x0c400b10, 0x0ff00fd0, "fmdrr%c\t%z0, %12-15r, %16-19r"},
+ {FPU_VFP_EXT_V2, 0x0c500a10, 0x0ff00fd0, "fmrrs%c\t%12-15r, %16-19r, %y4"},
+ {FPU_VFP_EXT_V1xD, 0x0e000a00, 0x0fb00f50, "fmacs%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1xD, 0x0e000a40, 0x0fb00f50, "fnmacs%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1, 0x0e000b00, 0x0fb00f50, "fmacd%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1, 0x0e000b40, 0x0fb00f50, "fnmacd%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1xD, 0x0e100a00, 0x0fb00f50, "fmscs%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1xD, 0x0e100a40, 0x0fb00f50, "fnmscs%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1, 0x0e100b00, 0x0fb00f50, "fmscd%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1, 0x0e100b40, 0x0fb00f50, "fnmscd%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1xD, 0x0e200a00, 0x0fb00f50, "fmuls%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1xD, 0x0e200a40, 0x0fb00f50, "fnmuls%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1, 0x0e200b00, 0x0fb00f50, "fmuld%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1, 0x0e200b40, 0x0fb00f50, "fnmuld%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1xD, 0x0e300a00, 0x0fb00f50, "fadds%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1xD, 0x0e300a40, 0x0fb00f50, "fsubs%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1, 0x0e300b00, 0x0fb00f50, "faddd%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1, 0x0e300b40, 0x0fb00f50, "fsubd%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1xD, 0x0e800a00, 0x0fb00f50, "fdivs%c\t%y1, %y2, %y0"},
+ {FPU_VFP_EXT_V1, 0x0e800b00, 0x0fb00f50, "fdivd%c\t%z1, %z2, %z0"},
+ {FPU_VFP_EXT_V1xD, 0x0d200a00, 0x0fb00f00, "fstmdbs%c\t%16-19r!, %y3"},
+ {FPU_VFP_EXT_V1xD, 0x0d200b00, 0x0fb00f00, "fstmdb%0?xd%c\t%16-19r!, %z3"},
+ {FPU_VFP_EXT_V1xD, 0x0d300a00, 0x0fb00f00, "fldmdbs%c\t%16-19r!, %y3"},
+ {FPU_VFP_EXT_V1xD, 0x0d300b00, 0x0fb00f00, "fldmdb%0?xd%c\t%16-19r!, %z3"},
+ {FPU_VFP_EXT_V1xD, 0x0d000a00, 0x0f300f00, "fsts%c\t%y1, %A"},
+ {FPU_VFP_EXT_V1, 0x0d000b00, 0x0f300f00, "fstd%c\t%z1, %A"},
+ {FPU_VFP_EXT_V1xD, 0x0d100a00, 0x0f300f00, "flds%c\t%y1, %A"},
+ {FPU_VFP_EXT_V1, 0x0d100b00, 0x0f300f00, "fldd%c\t%z1, %A"},
+ {FPU_VFP_EXT_V1xD, 0x0c800a00, 0x0f900f00, "fstmias%c\t%16-19r%21'!, %y3"},
+ {FPU_VFP_EXT_V1xD, 0x0c800b00, 0x0f900f00, "fstmia%0?xd%c\t%16-19r%21'!, %z3"},
+ {FPU_VFP_EXT_V1xD, 0x0c900a00, 0x0f900f00, "fldmias%c\t%16-19r%21'!, %y3"},
+ {FPU_VFP_EXT_V1xD, 0x0c900b00, 0x0f900f00, "fldmia%0?xd%c\t%16-19r%21'!, %z3"},
/* Cirrus coprocessor instructions. */
{ARM_CEXT_MAVERICK, 0x0d100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
@@ -368,22 +441,300 @@ static const struct opcode32 coprocessor_opcodes[] =
{ARM_EXT_V2, 0x0e000000, 0x0f000010, "cdp%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
{ARM_EXT_V2, 0x0e100010, 0x0f100010, "mrc%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
{ARM_EXT_V2, 0x0e000010, 0x0f100010, "mcr%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
- {ARM_EXT_V2, 0x0c000000, 0x0e100000, "stc%c%22'l\t%8-11d, cr%12-15d, %A"},
- {ARM_EXT_V2, 0x0c100000, 0x0e100000, "ldc%c%22'l\t%8-11d, cr%12-15d, %A"},
+ {ARM_EXT_V2, 0x0c000000, 0x0e100000, "stc%22'l%c\t%8-11d, cr%12-15d, %A"},
+ {ARM_EXT_V2, 0x0c100000, 0x0e100000, "ldc%22'l%c\t%8-11d, cr%12-15d, %A"},
/* V6 coprocessor instructions */
- {ARM_EXT_V6, 0xfc500000, 0xfff00000, "mrrc2\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
- {ARM_EXT_V6, 0xfc400000, 0xfff00000, "mcrr2\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
+ {ARM_EXT_V6, 0xfc500000, 0xfff00000, "mrrc2%c\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
+ {ARM_EXT_V6, 0xfc400000, 0xfff00000, "mcrr2%c\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
/* V5 coprocessor instructions */
- {ARM_EXT_V5, 0xfc100000, 0xfe100000, "ldc2%22'l\t%8-11d, cr%12-15d, %A"},
- {ARM_EXT_V5, 0xfc000000, 0xfe100000, "stc2%22'l\t%8-11d, cr%12-15d, %A"},
- {ARM_EXT_V5, 0xfe000000, 0xff000010, "cdp2\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
- {ARM_EXT_V5, 0xfe000010, 0xff100010, "mcr2\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
- {ARM_EXT_V5, 0xfe100010, 0xff100010, "mrc2\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
+ {ARM_EXT_V5, 0xfc100000, 0xfe100000, "ldc2%22'l%c\t%8-11d, cr%12-15d, %A"},
+ {ARM_EXT_V5, 0xfc000000, 0xfe100000, "stc2%22'l%c\t%8-11d, cr%12-15d, %A"},
+ {ARM_EXT_V5, 0xfe000000, 0xff000010, "cdp2%c\t%8-11d, %20-23d, cr%12-15d, cr%16-19d, cr%0-3d, {%5-7d}"},
+ {ARM_EXT_V5, 0xfe000010, 0xff100010, "mcr2%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
+ {ARM_EXT_V5, 0xfe100010, 0xff100010, "mrc2%c\t%8-11d, %21-23d, %12-15r, cr%16-19d, cr%0-3d, {%5-7d}"},
+
{0, 0, 0, 0}
};
+/* Neon opcode table: This does not encode the top byte -- that is
+ checked by the print_insn_neon routine, as it depends on whether we are
+ doing thumb32 or arm32 disassembly. */
+
+/* print_insn_neon recognizes the following format control codes:
+
+ %% %
+
+ %c print condition code
+ %A print v{st,ld}[1234] operands
+ %B print v{st,ld}[1234] any one operands
+ %C print v{st,ld}[1234] single->all operands
+ %D print scalar
+ %E print vmov, vmvn, vorr, vbic encoded constant
+ %F print vtbl,vtbx register list
+
+ %<bitfield>r print as an ARM register
+ %<bitfield>d print the bitfield in decimal
+ %<bitfield>e print the 2^N - bitfield in decimal
+ %<bitfield>D print as a NEON D register
+ %<bitfield>Q print as a NEON Q register
+ %<bitfield>R print as a NEON D or Q register
+ %<bitfield>Sn print byte scaled width limited by n
+ %<bitfield>Tn print short scaled width limited by n
+ %<bitfield>Un print long scaled width limited by n
+
+ %<bitfield>'c print specified char iff bitfield is all ones
+ %<bitfield>`c print specified char iff bitfield is all zeroes
+ %<bitfield>?ab... select from array of values in big endian order */
+
+static const struct opcode32 neon_opcodes[] =
+{
+ /* Extract */
+ {FPU_NEON_EXT_V1, 0xf2b00840, 0xffb00850, "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, #%8-11d"},
+ {FPU_NEON_EXT_V1, 0xf2b00000, 0xffb00810, "vext%c.8\t%12-15,22R, %16-19,7R, %0-3,5R, #%8-11d"},
+
+ /* Move data element to all lanes */
+ {FPU_NEON_EXT_V1, 0xf3b40c00, 0xffb70f90, "vdup%c.32\t%12-15,22R, %0-3,5D[%19d]"},
+ {FPU_NEON_EXT_V1, 0xf3b20c00, 0xffb30f90, "vdup%c.16\t%12-15,22R, %0-3,5D[%18-19d]"},
+ {FPU_NEON_EXT_V1, 0xf3b10c00, 0xffb10f90, "vdup%c.8\t%12-15,22R, %0-3,5D[%17-19d]"},
+
+ /* Table lookup */
+ {FPU_NEON_EXT_V1, 0xf3b00800, 0xffb00c50, "vtbl%c.8\t%12-15,22D, %F, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf3b00840, 0xffb00c50, "vtbx%c.8\t%12-15,22D, %F, %0-3,5D"},
+
+ /* Two registers, miscellaneous */
+ {FPU_NEON_EXT_V1, 0xf2880a10, 0xfebf0fd0, "vmovl%c.%24?us8\t%12-15,22Q, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2900a10, 0xfebf0fd0, "vmovl%c.%24?us16\t%12-15,22Q, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2a00a10, 0xfebf0fd0, "vmovl%c.%24?us32\t%12-15,22Q, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf3b00500, 0xffbf0f90, "vcnt%c.8\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00580, 0xffbf0f90, "vmvn%c\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b20000, 0xffbf0f90, "vswp%c\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b20200, 0xffb30fd0, "vmovn%c.i%18-19T2\t%12-15,22D, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf3b20240, 0xffb30fd0, "vqmovun%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf3b20280, 0xffb30fd0, "vqmovn%c.s%18-19T2\t%12-15,22D, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf3b202c0, 0xffb30fd0, "vqmovn%c.u%18-19T2\t%12-15,22D, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf3b20300, 0xffb30fd0, "vshll%c.i%18-19S2\t%12-15,22Q, %0-3,5D, #%18-19S2"},
+ {FPU_NEON_EXT_V1, 0xf3bb0400, 0xffbf0e90, "vrecpe%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3bb0480, 0xffbf0e90, "vrsqrte%c.%8?fu%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00000, 0xffb30f90, "vrev64%c.%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00080, 0xffb30f90, "vrev32%c.%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00100, 0xffb30f90, "vrev16%c.%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00400, 0xffb30f90, "vcls%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00480, 0xffb30f90, "vclz%c.i%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00700, 0xffb30f90, "vqabs%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00780, 0xffb30f90, "vqneg%c.s%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b20080, 0xffb30f90, "vtrn%c.%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b20100, 0xffb30f90, "vuzp%c.%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b20180, 0xffb30f90, "vzip%c.%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b10000, 0xffb30b90, "vcgt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
+ {FPU_NEON_EXT_V1, 0xf3b10080, 0xffb30b90, "vcge%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
+ {FPU_NEON_EXT_V1, 0xf3b10100, 0xffb30b90, "vceq%c.%10?fi%18-19S2\t%12-15,22R, %0-3,5R, #0"},
+ {FPU_NEON_EXT_V1, 0xf3b10180, 0xffb30b90, "vcle%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
+ {FPU_NEON_EXT_V1, 0xf3b10200, 0xffb30b90, "vclt%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R, #0"},
+ {FPU_NEON_EXT_V1, 0xf3b10300, 0xffb30b90, "vabs%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b10380, 0xffb30b90, "vneg%c.%10?fs%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00200, 0xffb30f10, "vpaddl%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b00600, 0xffb30f10, "vpadal%c.%7?us%18-19S2\t%12-15,22R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3b30600, 0xffb30e10, "vcvt%c.%7-8?usff%18-19Sa.%7-8?ffus%18-19Sa\t%12-15,22R, %0-3,5R"},
+
+ /* Three registers of the same length */
+ {FPU_NEON_EXT_V1, 0xf2000110, 0xffb00f10, "vand%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2100110, 0xffb00f10, "vbic%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2200110, 0xffb00f10, "vorr%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2300110, 0xffb00f10, "vorn%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000110, 0xffb00f10, "veor%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3100110, 0xffb00f10, "vbsl%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3200110, 0xffb00f10, "vbit%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3300110, 0xffb00f10, "vbif%c\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000d00, 0xffa00f10, "vadd%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000d10, 0xffa00f10, "vmla%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000e00, 0xffa00f10, "vceq%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000f00, 0xffa00f10, "vmax%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000f10, 0xffa00f10, "vrecps%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2200d00, 0xffa00f10, "vsub%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2200d10, 0xffa00f10, "vmls%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2200f00, 0xffa00f10, "vmin%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2200f10, 0xffa00f10, "vrsqrts%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000d00, 0xffa00f10, "vpadd%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000d10, 0xffa00f10, "vmul%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000e00, 0xffa00f10, "vcge%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000e10, 0xffa00f10, "vacge%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000f00, 0xffa00f10, "vpmax%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3200d00, 0xffa00f10, "vabd%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3200e00, 0xffa00f10, "vcgt%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3200e10, 0xffa00f10, "vacgt%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3200f00, 0xffa00f10, "vpmin%c.f%20U0\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000800, 0xff800f10, "vadd%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000810, 0xff800f10, "vtst%c.%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000900, 0xff800f10, "vmla%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000b00, 0xff800f10, "vqdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000b10, 0xff800f10, "vpadd%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000800, 0xff800f10, "vsub%c.i%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000810, 0xff800f10, "vceq%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000900, 0xff800f10, "vmls%c.i%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf3000b00, 0xff800f10, "vqrdmulh%c.s%20-21S6\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000000, 0xfe800f10, "vhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000010, 0xfe800f10, "vqadd%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000100, 0xfe800f10, "vrhadd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000200, 0xfe800f10, "vhsub%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000210, 0xfe800f10, "vqsub%c.%24?us%20-21S3\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000300, 0xfe800f10, "vcgt%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000310, 0xfe800f10, "vcge%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000400, 0xfe800f10, "vshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
+ {FPU_NEON_EXT_V1, 0xf2000410, 0xfe800f10, "vqshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
+ {FPU_NEON_EXT_V1, 0xf2000500, 0xfe800f10, "vrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
+ {FPU_NEON_EXT_V1, 0xf2000510, 0xfe800f10, "vqrshl%c.%24?us%20-21S3\t%12-15,22R, %0-3,5R, %16-19,7R"},
+ {FPU_NEON_EXT_V1, 0xf2000600, 0xfe800f10, "vmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000610, 0xfe800f10, "vmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000700, 0xfe800f10, "vabd%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000710, 0xfe800f10, "vaba%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000910, 0xfe800f10, "vmul%c.%24?pi%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000a00, 0xfe800f10, "vpmax%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+ {FPU_NEON_EXT_V1, 0xf2000a10, 0xfe800f10, "vpmin%c.%24?us%20-21S2\t%12-15,22R, %16-19,7R, %0-3,5R"},
+
+ /* One register and an immediate value */
+ {FPU_NEON_EXT_V1, 0xf2800e10, 0xfeb80fb0, "vmov%c.i8\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800e30, 0xfeb80fb0, "vmov%c.i64\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800f10, 0xfeb80fb0, "vmov%c.f32\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800810, 0xfeb80db0, "vmov%c.i16\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800830, 0xfeb80db0, "vmvn%c.i16\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800910, 0xfeb80db0, "vorr%c.i16\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800930, 0xfeb80db0, "vbic%c.i16\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800c10, 0xfeb80eb0, "vmov%c.i32\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800c30, 0xfeb80eb0, "vmvn%c.i32\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800110, 0xfeb809b0, "vorr%c.i32\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800130, 0xfeb809b0, "vbic%c.i32\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800010, 0xfeb808b0, "vmov%c.i32\t%12-15,22R, %E"},
+ {FPU_NEON_EXT_V1, 0xf2800030, 0xfeb808b0, "vmvn%c.i32\t%12-15,22R, %E"},
+
+ /* Two registers and a shift amount */
+ {FPU_NEON_EXT_V1, 0xf2880810, 0xffb80fd0, "vshrn%c.i16\t%12-15,22D, %0-3,5Q, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880850, 0xffb80fd0, "vrshrn%c.i16\t%12-15,22D, %0-3,5Q, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880810, 0xfeb80fd0, "vqshrun%c.s16\t%12-15,22D, %0-3,5Q, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880850, 0xfeb80fd0, "vqrshrun%c.s16\t%12-15,22D, %0-3,5Q, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880910, 0xfeb80fd0, "vqshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880950, 0xfeb80fd0, "vqrshrn%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880a10, 0xfeb80fd0, "vshll%c.%24?us8\t%12-15,22D, %0-3,5Q, #%16-18d"},
+ {FPU_NEON_EXT_V1, 0xf2900810, 0xffb00fd0, "vshrn%c.i32\t%12-15,22D, %0-3,5Q, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900850, 0xffb00fd0, "vrshrn%c.i32\t%12-15,22D, %0-3,5Q, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2880510, 0xffb80f90, "vshl%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18d"},
+ {FPU_NEON_EXT_V1, 0xf3880410, 0xffb80f90, "vsri%c.8\t%12-15,22R, %0-3,5R, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf3880510, 0xffb80f90, "vsli%c.8\t%12-15,22R, %0-3,5R, #%16-18d"},
+ {FPU_NEON_EXT_V1, 0xf3880610, 0xffb80f90, "vqshlu%c.s8\t%12-15,22R, %0-3,5R, #%16-18d"},
+ {FPU_NEON_EXT_V1, 0xf2900810, 0xfeb00fd0, "vqshrun%c.s32\t%12-15,22D, %0-3,5Q, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900850, 0xfeb00fd0, "vqrshrun%c.s32\t%12-15,22D, %0-3,5Q, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900910, 0xfeb00fd0, "vqshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900950, 0xfeb00fd0, "vqrshrn%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900a10, 0xfeb00fd0, "vshll%c.%24?us16\t%12-15,22D, %0-3,5Q, #%16-19d"},
+ {FPU_NEON_EXT_V1, 0xf2880010, 0xfeb80f90, "vshr%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880110, 0xfeb80f90, "vsra%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880210, 0xfeb80f90, "vrshr%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880310, 0xfeb80f90, "vrsra%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18e"},
+ {FPU_NEON_EXT_V1, 0xf2880710, 0xfeb80f90, "vqshl%c.%24?us8\t%12-15,22R, %0-3,5R, #%16-18d"},
+ {FPU_NEON_EXT_V1, 0xf2a00810, 0xffa00fd0, "vshrn%c.i64\t%12-15,22D, %0-3,5Q, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2a00850, 0xffa00fd0, "vrshrn%c.i64\t%12-15,22D, %0-3,5Q, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2900510, 0xffb00f90, "vshl%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19d"},
+ {FPU_NEON_EXT_V1, 0xf3900410, 0xffb00f90, "vsri%c.16\t%12-15,22R, %0-3,5R, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf3900510, 0xffb00f90, "vsli%c.16\t%12-15,22R, %0-3,5R, #%16-19d"},
+ {FPU_NEON_EXT_V1, 0xf3900610, 0xffb00f90, "vqshlu%c.s16\t%12-15,22R, %0-3,5R, #%16-19d"},
+ {FPU_NEON_EXT_V1, 0xf2a00a10, 0xfea00fd0, "vshll%c.%24?us32\t%12-15,22D, %0-3,5Q, #%16-20d"},
+ {FPU_NEON_EXT_V1, 0xf2900010, 0xfeb00f90, "vshr%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900110, 0xfeb00f90, "vsra%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900210, 0xfeb00f90, "vrshr%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900310, 0xfeb00f90, "vrsra%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19e"},
+ {FPU_NEON_EXT_V1, 0xf2900710, 0xfeb00f90, "vqshl%c.%24?us16\t%12-15,22R, %0-3,5R, #%16-19d"},
+ {FPU_NEON_EXT_V1, 0xf2800810, 0xfec00fd0, "vqshrun%c.s64\t%12-15,22D, %0-3,5Q, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2800850, 0xfec00fd0, "vqrshrun%c.s64\t%12-15,22D, %0-3,5Q, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2800910, 0xfec00fd0, "vqshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2800950, 0xfec00fd0, "vqrshrn%c.%24?us64\t%12-15,22D, %0-3,5Q, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2a00510, 0xffa00f90, "vshl%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20d"},
+ {FPU_NEON_EXT_V1, 0xf3a00410, 0xffa00f90, "vsri%c.32\t%12-15,22R, %0-3,5R, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf3a00510, 0xffa00f90, "vsli%c.32\t%12-15,22R, %0-3,5R, #%16-20d"},
+ {FPU_NEON_EXT_V1, 0xf3a00610, 0xffa00f90, "vqshlu%c.s32\t%12-15,22R, %0-3,5R, #%16-20d"},
+ {FPU_NEON_EXT_V1, 0xf2a00010, 0xfea00f90, "vshr%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2a00110, 0xfea00f90, "vsra%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2a00210, 0xfea00f90, "vrshr%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2a00310, 0xfea00f90, "vrsra%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20e"},
+ {FPU_NEON_EXT_V1, 0xf2a00710, 0xfea00f90, "vqshl%c.%24?us32\t%12-15,22R, %0-3,5R, #%16-20d"},
+ {FPU_NEON_EXT_V1, 0xf2800590, 0xff800f90, "vshl%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21d"},
+ {FPU_NEON_EXT_V1, 0xf3800490, 0xff800f90, "vsri%c.64\t%12-15,22R, %0-3,5R, #%16-21e"},
+ {FPU_NEON_EXT_V1, 0xf3800590, 0xff800f90, "vsli%c.64\t%12-15,22R, %0-3,5R, #%16-21d"},
+ {FPU_NEON_EXT_V1, 0xf3800690, 0xff800f90, "vqshlu%c.s64\t%12-15,22R, %0-3,5R, #%16-21d"},
+ {FPU_NEON_EXT_V1, 0xf2800090, 0xfe800f90, "vshr%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
+ {FPU_NEON_EXT_V1, 0xf2800190, 0xfe800f90, "vsra%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
+ {FPU_NEON_EXT_V1, 0xf2800290, 0xfe800f90, "vrshr%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
+ {FPU_NEON_EXT_V1, 0xf2800390, 0xfe800f90, "vrsra%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21e"},
+ {FPU_NEON_EXT_V1, 0xf2800790, 0xfe800f90, "vqshl%c.%24?us64\t%12-15,22R, %0-3,5R, #%16-21d"},
+ {FPU_NEON_EXT_V1, 0xf2a00e10, 0xfea00e90, "vcvt%c.%24,8?usff32.%24,8?ffus32\t%12-15,22R, %0-3,5R, #%16-20e"},
+
+ /* Three registers of different lengths */
+ {FPU_NEON_EXT_V1, 0xf2800e00, 0xfea00f50, "vmull%c.p%20S0\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800400, 0xff800f50, "vaddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf2800600, 0xff800f50, "vsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf2800900, 0xff800f50, "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800b00, 0xff800f50, "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800d00, 0xff800f50, "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf3800400, 0xff800f50, "vraddhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf3800600, 0xff800f50, "vrsubhn%c.i%20-21T2\t%12-15,22D, %16-19,7Q, %0-3,5Q"},
+ {FPU_NEON_EXT_V1, 0xf2800000, 0xfe800f50, "vaddl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800100, 0xfe800f50, "vaddw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800200, 0xfe800f50, "vsubl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800300, 0xfe800f50, "vsubw%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7Q, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800500, 0xfe800f50, "vabal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800700, 0xfe800f50, "vabdl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800800, 0xfe800f50, "vmlal%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800a00, 0xfe800f50, "vmlsl%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+ {FPU_NEON_EXT_V1, 0xf2800c00, 0xfe800f50, "vmull%c.%24?us%20-21S2\t%12-15,22Q, %16-19,7D, %0-3,5D"},
+
+ /* Two registers and a scalar */
+ {FPU_NEON_EXT_V1, 0xf2800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800140, 0xff800f50, "vmla%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800340, 0xff800f50, "vqdmlal%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800540, 0xff800f50, "vmls%c.f%20-21S6\t%12-15,22D, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800740, 0xff800f50, "vqdmlsl%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22D, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800940, 0xff800f50, "vmul%c.f%20-21Sa\t%12-15,22D, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800b40, 0xff800f50, "vqdmull%c.s%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22D, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf3800040, 0xff800f50, "vmla%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
+ {FPU_NEON_EXT_V1, 0xf3800140, 0xff800f50, "vmla%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
+ {FPU_NEON_EXT_V1, 0xf3800440, 0xff800f50, "vmls%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
+ {FPU_NEON_EXT_V1, 0xf3800540, 0xff800f50, "vmls%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
+ {FPU_NEON_EXT_V1, 0xf3800840, 0xff800f50, "vmul%c.i%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
+ {FPU_NEON_EXT_V1, 0xf3800940, 0xff800f50, "vmul%c.f%20-21Sa\t%12-15,22Q, %16-19,7Q, %D"},
+ {FPU_NEON_EXT_V1, 0xf3800c40, 0xff800f50, "vqdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
+ {FPU_NEON_EXT_V1, 0xf3800d40, 0xff800f50, "vqrdmulh%c.s%20-21S6\t%12-15,22Q, %16-19,7Q, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800240, 0xfe800f50, "vmlal%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800640, 0xfe800f50, "vmlsl%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
+ {FPU_NEON_EXT_V1, 0xf2800a40, 0xfe800f50, "vmull%c.%24?us%20-21S6\t%12-15,22Q, %16-19,7D, %D"},
+
+ /* Element and structure load/store */
+ {FPU_NEON_EXT_V1, 0xf4a00fc0, 0xffb00fc0, "vld4%c.32\t%C"},
+ {FPU_NEON_EXT_V1, 0xf4a00c00, 0xffb00f00, "vld1%c.%6-7S2\t%C"},
+ {FPU_NEON_EXT_V1, 0xf4a00d00, 0xffb00f00, "vld2%c.%6-7S2\t%C"},
+ {FPU_NEON_EXT_V1, 0xf4a00e00, 0xffb00f00, "vld3%c.%6-7S2\t%C"},
+ {FPU_NEON_EXT_V1, 0xf4a00f00, 0xffb00f00, "vld4%c.%6-7S2\t%C"},
+ {FPU_NEON_EXT_V1, 0xf4000200, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000300, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000400, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000500, 0xff900f00, "v%21?ls%21?dt3%c.%6-7S2\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000600, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000700, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000800, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000900, 0xff900f00, "v%21?ls%21?dt2%c.%6-7S2\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000a00, 0xff900f00, "v%21?ls%21?dt1%c.%6-7S3\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4000000, 0xff900e00, "v%21?ls%21?dt4%c.%6-7S2\t%A"},
+ {FPU_NEON_EXT_V1, 0xf4800000, 0xff900300, "v%21?ls%21?dt1%c.%10-11S2\t%B"},
+ {FPU_NEON_EXT_V1, 0xf4800100, 0xff900300, "v%21?ls%21?dt2%c.%10-11S2\t%B"},
+ {FPU_NEON_EXT_V1, 0xf4800200, 0xff900300, "v%21?ls%21?dt3%c.%10-11S2\t%B"},
+ {FPU_NEON_EXT_V1, 0xf4800300, 0xff900300, "v%21?ls%21?dt4%c.%10-11S2\t%B"},
+
+ {0,0 ,0, 0}
+};
+
/* Opcode tables: ARM, 16-bit Thumb, 32-bit Thumb. All three are partially
ordered: they must be searched linearly from the top to obtain a correct
match. */
@@ -410,10 +761,10 @@ static const struct opcode32 coprocessor_opcodes[] =
%<bitfield>W print the bitfield plus one in decimal
%<bitfield>x print the bitfield in hex
%<bitfield>X print the bitfield as 1 hex digit without leading "0x"
-
- %<bitnum>'c print specified char iff bit is one
- %<bitnum>`c print specified char iff bit is zero
- %<bitnum>?ab print a if bit is one else print b
+
+ %<bitfield>'c print specified char iff bitfield is all ones
+ %<bitfield>`c print specified char iff bitfield is all zeroes
+ %<bitfield>?ab... select from array of values in big endian order
%e print arm SMI operand (bits 0..7,8..19).
%E print the LSB and WIDTH fields of a BFI or BFC instruction.
@@ -424,11 +775,11 @@ static const struct opcode32 arm_opcodes[] =
/* ARM instructions. */
{ARM_EXT_V1, 0xe1a00000, 0xffffffff, "nop\t\t\t(mov r0,r0)"},
{ARM_EXT_V4T | ARM_EXT_V5, 0x012FFF10, 0x0ffffff0, "bx%c\t%0-3r"},
- {ARM_EXT_V2, 0x00000090, 0x0fe000f0, "mul%c%20's\t%16-19r, %0-3r, %8-11r"},
- {ARM_EXT_V2, 0x00200090, 0x0fe000f0, "mla%c%20's\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {ARM_EXT_V2S, 0x01000090, 0x0fb00ff0, "swp%c%22'b\t%12-15r, %0-3r, [%16-19r]"},
- {ARM_EXT_V3M, 0x00800090, 0x0fa000f0, "%22?sumull%c%20's\t%12-15r, %16-19r, %0-3r, %8-11r"},
- {ARM_EXT_V3M, 0x00a00090, 0x0fa000f0, "%22?sumlal%c%20's\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V2, 0x00000090, 0x0fe000f0, "mul%20's%c\t%16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V2, 0x00200090, 0x0fe000f0, "mla%20's%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
+ {ARM_EXT_V2S, 0x01000090, 0x0fb00ff0, "swp%22'b%c\t%12-15r, %0-3r, [%16-19r]"},
+ {ARM_EXT_V3M, 0x00800090, 0x0fa000f0, "%22?sumull%20's%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
+ {ARM_EXT_V3M, 0x00a00090, 0x0fa000f0, "%22?sumlal%20's%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
/* V7 instructions. */
{ARM_EXT_V7, 0xf450f000, 0xfd70f000, "pli\t%P"},
@@ -441,11 +792,11 @@ static const struct opcode32 arm_opcodes[] =
{ARM_EXT_V6T2, 0x07c0001f, 0x0fe0007f, "bfc%c\t%12-15r, %E"},
{ARM_EXT_V6T2, 0x07c00010, 0x0fe00070, "bfi%c\t%12-15r, %0-3r, %E"},
{ARM_EXT_V6T2, 0x00600090, 0x0ff000f0, "mls%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {ARM_EXT_V6T2, 0x006000b0, 0x0f7000f0, "str%cht\t%12-15r, %s"},
- {ARM_EXT_V6T2, 0x00300090, 0x0f300090, "ldr%c%6's%5?hbt\t%12-15r, %s"},
+ {ARM_EXT_V6T2, 0x006000b0, 0x0f7000f0, "strht%c\t%12-15r, %s"},
+ {ARM_EXT_V6T2, 0x00300090, 0x0f300090, "ldr%6's%5?hbt%c\t%12-15r, %s"},
{ARM_EXT_V6T2, 0x03000000, 0x0ff00000, "movw%c\t%12-15r, %V"},
{ARM_EXT_V6T2, 0x03400000, 0x0ff00000, "movt%c\t%12-15r, %V"},
- {ARM_EXT_V6T2, 0x03ff0f30, 0x0fff0ff0, "rbit%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V6T2, 0x06ff0f30, 0x0fff0ff0, "rbit%c\t%12-15r, %0-3r"},
{ARM_EXT_V6T2, 0x07a00050, 0x0fa00070, "%22?usbfx%c\t%12-15r, %0-3r, #%7-11d, #%16-20W"},
/* ARM V6Z instructions. */
@@ -468,15 +819,15 @@ static const struct opcode32 arm_opcodes[] =
{ARM_EXT_V6K, 0x0320f000, 0x0fffff00, "nop%c\t{%0-7d}"},
/* ARM V6 instructions. */
- {ARM_EXT_V6, 0xf1080000, 0xfffdfe3f, "cpsie\t%8'a%7'i%6'f"},
- {ARM_EXT_V6, 0xf1080000, 0xfffdfe20, "cpsie\t%8'a%7'i%6'f,#%0-4d"},
- {ARM_EXT_V6, 0xf10C0000, 0xfffdfe3f, "cpsid\t%8'a%7'i%6'f"},
- {ARM_EXT_V6, 0xf10C0000, 0xfffdfe20, "cpsid\t%8'a%7'i%6'f,#%0-4d"},
+ {ARM_EXT_V6, 0xf1080000, 0xfffffe3f, "cpsie\t%8'a%7'i%6'f"},
+ {ARM_EXT_V6, 0xf10a0000, 0xfffffe20, "cpsie\t%8'a%7'i%6'f,#%0-4d"},
+ {ARM_EXT_V6, 0xf10C0000, 0xfffffe3f, "cpsid\t%8'a%7'i%6'f"},
+ {ARM_EXT_V6, 0xf10e0000, 0xfffffe20, "cpsid\t%8'a%7'i%6'f,#%0-4d"},
{ARM_EXT_V6, 0xf1000000, 0xfff1fe20, "cps\t#%0-4d"},
{ARM_EXT_V6, 0x06800010, 0x0ff00ff0, "pkhbt%c\t%12-15r, %16-19r, %0-3r"},
- {ARM_EXT_V6, 0x06800010, 0x0ff00070, "pkhbt%c\t%12-15r, %16-19r, %0-3r, LSL #%7-11d"},
- {ARM_EXT_V6, 0x06800050, 0x0ff00ff0, "pkhtb%c\t%12-15r, %16-19r, %0-3r, ASR #32"},
- {ARM_EXT_V6, 0x06800050, 0x0ff00070, "pkhtb%c\t%12-15r, %16-19r, %0-3r, ASR #%7-11d"},
+ {ARM_EXT_V6, 0x06800010, 0x0ff00070, "pkhbt%c\t%12-15r, %16-19r, %0-3r, lsl #%7-11d"},
+ {ARM_EXT_V6, 0x06800050, 0x0ff00ff0, "pkhtb%c\t%12-15r, %16-19r, %0-3r, asr #32"},
+ {ARM_EXT_V6, 0x06800050, 0x0ff00070, "pkhtb%c\t%12-15r, %16-19r, %0-3r, asr #%7-11d"},
{ARM_EXT_V6, 0x01900f9f, 0x0ff00fff, "ldrex%c\tr%12-15d, [%16-19r]"},
{ARM_EXT_V6, 0x06200f10, 0x0ff00ff0, "qadd16%c\t%12-15r, %16-19r, %0-3r"},
{ARM_EXT_V6, 0x06200f90, 0x0ff00ff0, "qadd8%c\t%12-15r, %16-19r, %0-3r"},
@@ -518,54 +869,54 @@ static const struct opcode32 arm_opcodes[] =
{ARM_EXT_V6, 0x06bf0fb0, 0x0fff0ff0, "rev16%c\t\%12-15r, %0-3r"},
{ARM_EXT_V6, 0x06ff0fb0, 0x0fff0ff0, "revsh%c\t\%12-15r, %0-3r"},
{ARM_EXT_V6, 0xf8100a00, 0xfe50ffff, "rfe%23?id%24?ba\t\%16-19r%21'!"},
- {ARM_EXT_V6, 0x06bf0070, 0x0fff0ff0, "sxth%c %12-15r,%0-3r"},
- {ARM_EXT_V6, 0x06bf0470, 0x0fff0ff0, "sxth%c %12-15r,%0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06bf0870, 0x0fff0ff0, "sxth%c %12-15r,%0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06bf0c70, 0x0fff0ff0, "sxth%c %12-15r,%0-3r, ROR #24"},
- {ARM_EXT_V6, 0x068f0070, 0x0fff0ff0, "sxtb16%c %12-15r,%0-3r"},
- {ARM_EXT_V6, 0x068f0470, 0x0fff0ff0, "sxtb16%c %12-15r,%0-3r, ROR #8"},
- {ARM_EXT_V6, 0x068f0870, 0x0fff0ff0, "sxtb16%c %12-15r,%0-3r, ROR #16"},
- {ARM_EXT_V6, 0x068f0c70, 0x0fff0ff0, "sxtb16%c %12-15r,%0-3r, ROR #24"},
- {ARM_EXT_V6, 0x06af0070, 0x0fff0ff0, "sxtb%c %12-15r,%0-3r"},
- {ARM_EXT_V6, 0x06af0470, 0x0fff0ff0, "sxtb%c %12-15r,%0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06af0870, 0x0fff0ff0, "sxtb%c %12-15r,%0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06af0c70, 0x0fff0ff0, "sxtb%c %12-15r,%0-3r, ROR #24"},
- {ARM_EXT_V6, 0x06ff0070, 0x0fff0ff0, "uxth%c %12-15r,%0-3r"},
- {ARM_EXT_V6, 0x06ff0470, 0x0fff0ff0, "uxth%c %12-15r,%0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06ff0870, 0x0fff0ff0, "uxth%c %12-15r,%0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06ff0c70, 0x0fff0ff0, "uxth%c %12-15r,%0-3r, ROR #24"},
- {ARM_EXT_V6, 0x06cf0070, 0x0fff0ff0, "uxtb16%c %12-15r,%0-3r"},
- {ARM_EXT_V6, 0x06cf0470, 0x0fff0ff0, "uxtb16%c %12-15r,%0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06cf0870, 0x0fff0ff0, "uxtb16%c %12-15r,%0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06cf0c70, 0x0fff0ff0, "uxtb16%c %12-15r,%0-3r, ROR #24"},
- {ARM_EXT_V6, 0x06ef0070, 0x0fff0ff0, "uxtb%c %12-15r,%0-3r"},
- {ARM_EXT_V6, 0x06ef0470, 0x0fff0ff0, "uxtb%c %12-15r,%0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06ef0870, 0x0fff0ff0, "uxtb%c %12-15r,%0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06ef0c70, 0x0fff0ff0, "uxtb%c %12-15r,%0-3r, ROR #24"},
+ {ARM_EXT_V6, 0x06bf0070, 0x0fff0ff0, "sxth%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V6, 0x06bf0470, 0x0fff0ff0, "sxth%c\t%12-15r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06bf0870, 0x0fff0ff0, "sxth%c\t%12-15r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06bf0c70, 0x0fff0ff0, "sxth%c\t%12-15r, %0-3r, ror #24"},
+ {ARM_EXT_V6, 0x068f0070, 0x0fff0ff0, "sxtb16%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V6, 0x068f0470, 0x0fff0ff0, "sxtb16%c\t%12-15r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x068f0870, 0x0fff0ff0, "sxtb16%c\t%12-15r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x068f0c70, 0x0fff0ff0, "sxtb16%c\t%12-15r, %0-3r, ror #24"},
+ {ARM_EXT_V6, 0x06af0070, 0x0fff0ff0, "sxtb%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V6, 0x06af0470, 0x0fff0ff0, "sxtb%c\t%12-15r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06af0870, 0x0fff0ff0, "sxtb%c\t%12-15r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06af0c70, 0x0fff0ff0, "sxtb%c\t%12-15r, %0-3r, ror #24"},
+ {ARM_EXT_V6, 0x06ff0070, 0x0fff0ff0, "uxth%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V6, 0x06ff0470, 0x0fff0ff0, "uxth%c\t%12-15r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06ff0870, 0x0fff0ff0, "uxth%c\t%12-15r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06ff0c70, 0x0fff0ff0, "uxth%c\t%12-15r, %0-3r, ror #24"},
+ {ARM_EXT_V6, 0x06cf0070, 0x0fff0ff0, "uxtb16%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V6, 0x06cf0470, 0x0fff0ff0, "uxtb16%c\t%12-15r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06cf0870, 0x0fff0ff0, "uxtb16%c\t%12-15r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06cf0c70, 0x0fff0ff0, "uxtb16%c\t%12-15r, %0-3r, ror #24"},
+ {ARM_EXT_V6, 0x06ef0070, 0x0fff0ff0, "uxtb%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V6, 0x06ef0470, 0x0fff0ff0, "uxtb%c\t%12-15r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06ef0870, 0x0fff0ff0, "uxtb%c\t%12-15r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06ef0c70, 0x0fff0ff0, "uxtb%c\t%12-15r, %0-3r, ror #24"},
{ARM_EXT_V6, 0x06b00070, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r"},
- {ARM_EXT_V6, 0x06b00470, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06b00870, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06b00c70, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
+ {ARM_EXT_V6, 0x06b00470, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06b00870, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06b00c70, 0x0ff00ff0, "sxtah%c\t%12-15r, %16-19r, %0-3r, ror #24"},
{ARM_EXT_V6, 0x06800070, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r"},
- {ARM_EXT_V6, 0x06800470, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06800870, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06800c70, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
+ {ARM_EXT_V6, 0x06800470, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06800870, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06800c70, 0x0ff00ff0, "sxtab16%c\t%12-15r, %16-19r, %0-3r, ror #24"},
{ARM_EXT_V6, 0x06a00070, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r"},
- {ARM_EXT_V6, 0x06a00470, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06a00870, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06a00c70, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
+ {ARM_EXT_V6, 0x06a00470, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06a00870, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06a00c70, 0x0ff00ff0, "sxtab%c\t%12-15r, %16-19r, %0-3r, ror #24"},
{ARM_EXT_V6, 0x06f00070, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r"},
- {ARM_EXT_V6, 0x06f00470, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06f00870, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06f00c70, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
+ {ARM_EXT_V6, 0x06f00470, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06f00870, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06f00c70, 0x0ff00ff0, "uxtah%c\t%12-15r, %16-19r, %0-3r, ror #24"},
{ARM_EXT_V6, 0x06c00070, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r"},
- {ARM_EXT_V6, 0x06c00470, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06c00870, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
+ {ARM_EXT_V6, 0x06c00470, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06c00870, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r, ror #16"},
{ARM_EXT_V6, 0x06c00c70, 0x0ff00ff0, "uxtab16%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
{ARM_EXT_V6, 0x06e00070, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r"},
- {ARM_EXT_V6, 0x06e00470, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ROR #8"},
- {ARM_EXT_V6, 0x06e00870, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ROR #16"},
- {ARM_EXT_V6, 0x06e00c70, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ROR #24"},
+ {ARM_EXT_V6, 0x06e00470, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ror #8"},
+ {ARM_EXT_V6, 0x06e00870, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ror #16"},
+ {ARM_EXT_V6, 0x06e00c70, 0x0ff00ff0, "uxtab%c\t%12-15r, %16-19r, %0-3r, ror #24"},
{ARM_EXT_V6, 0x06800fb0, 0x0ff00ff0, "sel%c\t%12-15r, %16-19r, %0-3r"},
{ARM_EXT_V6, 0xf1010000, 0xfffffc00, "setend\t%9?ble"},
{ARM_EXT_V6, 0x0700f010, 0x0ff0f0d0, "smuad%5'x%c\t%16-19r, %0-3r, %8-11r"},
@@ -577,18 +928,18 @@ static const struct opcode32 arm_opcodes[] =
{ARM_EXT_V6, 0x0750f010, 0x0ff0f0d0, "smmul%5'r%c\t%16-19r, %0-3r, %8-11r"},
{ARM_EXT_V6, 0x07500010, 0x0ff000d0, "smmla%5'r%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
{ARM_EXT_V6, 0x075000d0, 0x0ff000d0, "smmls%5'r%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
- {ARM_EXT_V6, 0xf84d0500, 0xfe5fffe0, "srs%23?id%24?ba\t#%0-4d%21'!"},
+ {ARM_EXT_V6, 0xf84d0500, 0xfe5fffe0, "srs%23?id%24?ba\t%16-19r%21'!, #%0-4d"},
{ARM_EXT_V6, 0x06a00010, 0x0fe00ff0, "ssat%c\t%12-15r, #%16-20W, %0-3r"},
- {ARM_EXT_V6, 0x06a00010, 0x0fe00070, "ssat%c\t%12-15r, #%16-20W, %0-3r, LSL #%7-11d"},
- {ARM_EXT_V6, 0x06a00050, 0x0fe00070, "ssat%c\t%12-15r, #%16-20W, %0-3r, ASR #%7-11d"},
+ {ARM_EXT_V6, 0x06a00010, 0x0fe00070, "ssat%c\t%12-15r, #%16-20W, %0-3r, lsl #%7-11d"},
+ {ARM_EXT_V6, 0x06a00050, 0x0fe00070, "ssat%c\t%12-15r, #%16-20W, %0-3r, asr #%7-11d"},
{ARM_EXT_V6, 0x06a00f30, 0x0ff00ff0, "ssat16%c\t%12-15r, #%16-19W, %0-3r"},
{ARM_EXT_V6, 0x01800f90, 0x0ff00ff0, "strex%c\t%12-15r, %0-3r, [%16-19r]"},
{ARM_EXT_V6, 0x00400090, 0x0ff000f0, "umaal%c\t%12-15r, %16-19r, %0-3r, %8-11r"},
{ARM_EXT_V6, 0x0780f010, 0x0ff0f0f0, "usad8%c\t%16-19r, %0-3r, %8-11r"},
{ARM_EXT_V6, 0x07800010, 0x0ff000f0, "usada8%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
{ARM_EXT_V6, 0x06e00010, 0x0fe00ff0, "usat%c\t%12-15r, #%16-20d, %0-3r"},
- {ARM_EXT_V6, 0x06e00010, 0x0fe00070, "usat%c\t%12-15r, #%16-20d, %0-3r, LSL #%7-11d"},
- {ARM_EXT_V6, 0x06e00050, 0x0fe00070, "usat%c\t%12-15r, #%16-20d, %0-3r, ASR #%7-11d"},
+ {ARM_EXT_V6, 0x06e00010, 0x0fe00070, "usat%c\t%12-15r, #%16-20d, %0-3r, lsl #%7-11d"},
+ {ARM_EXT_V6, 0x06e00050, 0x0fe00070, "usat%c\t%12-15r, #%16-20d, %0-3r, asr #%7-11d"},
{ARM_EXT_V6, 0x06e00f30, 0x0ff00ff0, "usat16%c\t%12-15r, #%16-19d, %0-3r"},
/* V5J instruction. */
@@ -601,8 +952,8 @@ static const struct opcode32 arm_opcodes[] =
{ARM_EXT_V5, 0x016f0f10, 0x0fff0ff0, "clz%c\t%12-15r, %0-3r"},
/* V5E "El Segundo" Instructions. */
- {ARM_EXT_V5E, 0x000000d0, 0x0e1000f0, "ldr%cd\t%12-15r, %s"},
- {ARM_EXT_V5E, 0x000000f0, 0x0e1000f0, "str%cd\t%12-15r, %s"},
+ {ARM_EXT_V5E, 0x000000d0, 0x0e1000f0, "ldrd%c\t%12-15r, %s"},
+ {ARM_EXT_V5E, 0x000000f0, 0x0e1000f0, "strd%c\t%12-15r, %s"},
{ARM_EXT_V5E, 0xf450f000, 0xfc70f000, "pld\t%a"},
{ARM_EXT_V5ExP, 0x01000080, 0x0ff000f0, "smlabb%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
{ARM_EXT_V5ExP, 0x010000a0, 0x0ff000f0, "smlatb%c\t%16-19r, %0-3r, %8-11r, %12-15r"},
@@ -631,33 +982,45 @@ static const struct opcode32 arm_opcodes[] =
{ARM_EXT_V5ExP, 0x01600050, 0x0ff00ff0, "qdsub%c\t%12-15r, %0-3r, %16-19r"},
/* ARM Instructions. */
- {ARM_EXT_V1, 0x00000090, 0x0e100090, "str%c%6's%5?hb\t%12-15r, %s"},
- {ARM_EXT_V1, 0x00100090, 0x0e100090, "ldr%c%6's%5?hb\t%12-15r, %s"},
- {ARM_EXT_V1, 0x00000000, 0x0de00000, "and%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x00200000, 0x0de00000, "eor%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x00400000, 0x0de00000, "sub%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x00600000, 0x0de00000, "rsb%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x00800000, 0x0de00000, "add%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x00a00000, 0x0de00000, "adc%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x00c00000, 0x0de00000, "sbc%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x00e00000, 0x0de00000, "rsc%c%20's\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x00000090, 0x0e100090, "str%6's%5?hb%c\t%12-15r, %s"},
+ {ARM_EXT_V1, 0x00100090, 0x0e100090, "ldr%6's%5?hb%c\t%12-15r, %s"},
+ {ARM_EXT_V1, 0x00000000, 0x0de00000, "and%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x00200000, 0x0de00000, "eor%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x00400000, 0x0de00000, "sub%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x00600000, 0x0de00000, "rsb%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x00800000, 0x0de00000, "add%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x00a00000, 0x0de00000, "adc%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x00c00000, 0x0de00000, "sbc%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x00e00000, 0x0de00000, "rsc%20's%c\t%12-15r, %16-19r, %o"},
{ARM_EXT_V3, 0x0120f000, 0x0db0f000, "msr%c\t%22?SCPSR%C, %o"},
{ARM_EXT_V3, 0x010f0000, 0x0fbf0fff, "mrs%c\t%12-15r, %22?SCPSR"},
- {ARM_EXT_V1, 0x01000000, 0x0de00000, "tst%c%p\t%16-19r, %o"},
- {ARM_EXT_V1, 0x01200000, 0x0de00000, "teq%c%p\t%16-19r, %o"},
- {ARM_EXT_V1, 0x01400000, 0x0de00000, "cmp%c%p\t%16-19r, %o"},
- {ARM_EXT_V1, 0x01600000, 0x0de00000, "cmn%c%p\t%16-19r, %o"},
- {ARM_EXT_V1, 0x01800000, 0x0de00000, "orr%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x01a00000, 0x0de00000, "mov%c%20's\t%12-15r, %o"},
- {ARM_EXT_V1, 0x01c00000, 0x0de00000, "bic%c%20's\t%12-15r, %16-19r, %o"},
- {ARM_EXT_V1, 0x01e00000, 0x0de00000, "mvn%c%20's\t%12-15r, %o"},
- {ARM_EXT_V1, 0x04000000, 0x0e100000, "str%c%22'b%t\t%12-15r, %a"},
- {ARM_EXT_V1, 0x06000000, 0x0e100ff0, "str%c%22'b%t\t%12-15r, %a"},
- {ARM_EXT_V1, 0x04000000, 0x0c100010, "str%c%22'b%t\t%12-15r, %a"},
+ {ARM_EXT_V1, 0x01000000, 0x0de00000, "tst%p%c\t%16-19r, %o"},
+ {ARM_EXT_V1, 0x01200000, 0x0de00000, "teq%p%c\t%16-19r, %o"},
+ {ARM_EXT_V1, 0x01400000, 0x0de00000, "cmp%p%c\t%16-19r, %o"},
+ {ARM_EXT_V1, 0x01600000, 0x0de00000, "cmn%p%c\t%16-19r, %o"},
+ {ARM_EXT_V1, 0x01800000, 0x0de00000, "orr%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x03a00000, 0x0fef0000, "mov%20's%c\t%12-15r, %o"},
+ {ARM_EXT_V1, 0x01a00000, 0x0def0ff0, "mov%20's%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V1, 0x01a00000, 0x0def0060, "lsl%20's%c\t%12-15r, %q"},
+ {ARM_EXT_V1, 0x01a00020, 0x0def0060, "lsr%20's%c\t%12-15r, %q"},
+ {ARM_EXT_V1, 0x01a00040, 0x0def0060, "asr%20's%c\t%12-15r, %q"},
+ {ARM_EXT_V1, 0x01a00060, 0x0def0ff0, "rrx%20's%c\t%12-15r, %0-3r"},
+ {ARM_EXT_V1, 0x01a00060, 0x0def0060, "ror%20's%c\t%12-15r, %q"},
+ {ARM_EXT_V1, 0x01c00000, 0x0de00000, "bic%20's%c\t%12-15r, %16-19r, %o"},
+ {ARM_EXT_V1, 0x01e00000, 0x0de00000, "mvn%20's%c\t%12-15r, %o"},
+ {ARM_EXT_V1, 0x052d0004, 0x0fff0fff, "push%c\t{%12-15r}\t\t; (str%c %12-15r, %a)"},
+ {ARM_EXT_V1, 0x04000000, 0x0e100000, "str%22'b%t%c\t%12-15r, %a"},
+ {ARM_EXT_V1, 0x06000000, 0x0e100ff0, "str%22'b%t%c\t%12-15r, %a"},
+ {ARM_EXT_V1, 0x04000000, 0x0c100010, "str%22'b%t%c\t%12-15r, %a"},
{ARM_EXT_V1, 0x06000010, 0x0e000010, "undefined"},
- {ARM_EXT_V1, 0x04100000, 0x0c100000, "ldr%c%22'b%t\t%12-15r, %a"},
- {ARM_EXT_V1, 0x08000000, 0x0e100000, "stm%c%23?id%24?ba\t%16-19r%21'!, %m%22'^"},
- {ARM_EXT_V1, 0x08100000, 0x0e100000, "ldm%c%23?id%24?ba\t%16-19r%21'!, %m%22'^"},
+ {ARM_EXT_V1, 0x049d0004, 0x0fff0fff, "pop%c\t{%12-15r}\t\t; (ldr%c %12-15r, %a)"},
+ {ARM_EXT_V1, 0x04100000, 0x0c100000, "ldr%22'b%t%c\t%12-15r, %a"},
+ {ARM_EXT_V1, 0x092d0000, 0x0fff0000, "push%c\t%m"},
+ {ARM_EXT_V1, 0x08800000, 0x0ff00000, "stm%c\t%16-19r%21'!, %m%22'^"},
+ {ARM_EXT_V1, 0x08000000, 0x0e100000, "stm%23?id%24?ba%c\t%16-19r%21'!, %m%22'^"},
+ {ARM_EXT_V1, 0x08bd0000, 0x0fff0000, "pop%c\t%m"},
+ {ARM_EXT_V1, 0x08900000, 0x0f900000, "ldm%c\t%16-19r%21'!, %m%22'^"},
+ {ARM_EXT_V1, 0x08100000, 0x0e100000, "ldm%23?id%24?ba%c\t%16-19r%21'!, %m%22'^"},
{ARM_EXT_V1, 0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
{ARM_EXT_V1, 0x0f000000, 0x0f000000, "svc%c\t%0-23x"},
@@ -677,6 +1040,11 @@ static const struct opcode32 arm_opcodes[] =
%M print Thumb register mask
%b print CZB's 6-bit unsigned branch destination
%s print Thumb right-shift immediate (6..10; 0 == 32).
+ %c print the condition code
+ %C print the condition code, or "s" if not conditional
+ %x print warning if conditional an not at end of IT block"
+ %X print "\t; unpredictable <IT:code>" if conditional
+ %I print IT instruction suffix and operands
%<bitfield>r print bitfield as an ARM register
%<bitfield>d print bitfield as a decimal
%<bitfield>H print (bitfield * 2) as a decimal
@@ -692,117 +1060,112 @@ static const struct opcode16 thumb_opcodes[] =
/* Thumb instructions. */
/* ARM V6K no-argument instructions. */
- {ARM_EXT_V6K, 0xbf00, 0xffff, "nop"},
- {ARM_EXT_V6K, 0xbf10, 0xffff, "yield"},
- {ARM_EXT_V6K, 0xbf20, 0xffff, "wfe"},
- {ARM_EXT_V6K, 0xbf30, 0xffff, "wfi"},
- {ARM_EXT_V6K, 0xbf40, 0xffff, "sev"},
- {ARM_EXT_V6K, 0xbf00, 0xff0f, "nop\t{%4-7d}"},
+ {ARM_EXT_V6K, 0xbf00, 0xffff, "nop%c"},
+ {ARM_EXT_V6K, 0xbf10, 0xffff, "yield%c"},
+ {ARM_EXT_V6K, 0xbf20, 0xffff, "wfe%c"},
+ {ARM_EXT_V6K, 0xbf30, 0xffff, "wfi%c"},
+ {ARM_EXT_V6K, 0xbf40, 0xffff, "sev%c"},
+ {ARM_EXT_V6K, 0xbf00, 0xff0f, "nop%c\t{%4-7d}"},
/* ARM V6T2 instructions. */
- {ARM_EXT_V6T2, 0xb900, 0xfd00, "cbnz\t%0-2r, %b"},
- {ARM_EXT_V6T2, 0xb100, 0xfd00, "cbz\t%0-2r, %b"},
- {ARM_EXT_V6T2, 0xbf08, 0xff0f, "it\t%4-7c"},
- {ARM_EXT_V6T2, 0xbf14, 0xff17, "it%3?te\t%4-7c"},
- {ARM_EXT_V6T2, 0xbf04, 0xff17, "it%3?et\t%4-7c"},
- {ARM_EXT_V6T2, 0xbf12, 0xff13, "it%3?te%2?te\t%4-7c"},
- {ARM_EXT_V6T2, 0xbf02, 0xff13, "it%3?et%2?et\t%4-7c"},
- {ARM_EXT_V6T2, 0xbf11, 0xff11, "it%3?te%2?te%1?te\t%4-7c"},
- {ARM_EXT_V6T2, 0xbf01, 0xff11, "it%3?et%2?et%1?et\t%4-7c"},
+ {ARM_EXT_V6T2, 0xb900, 0xfd00, "cbnz\t%0-2r, %b%X"},
+ {ARM_EXT_V6T2, 0xb100, 0xfd00, "cbz\t%0-2r, %b%X"},
+ {ARM_EXT_V6T2, 0xbf00, 0xff00, "it%I%X"},
/* ARM V6. */
- {ARM_EXT_V6, 0xb660, 0xfff8, "cpsie\t%2'a%1'i%0'f"},
- {ARM_EXT_V6, 0xb670, 0xfff8, "cpsid\t%2'a%1'i%0'f"},
- {ARM_EXT_V6, 0x4600, 0xffc0, "mov\t%0-2r, %3-5r"},
- {ARM_EXT_V6, 0xba00, 0xffc0, "rev\t%0-2r, %3-5r"},
- {ARM_EXT_V6, 0xba40, 0xffc0, "rev16\t%0-2r, %3-5r"},
- {ARM_EXT_V6, 0xbac0, 0xffc0, "revsh\t%0-2r, %3-5r"},
- {ARM_EXT_V6, 0xb650, 0xfff7, "setend\t%3?ble"},
- {ARM_EXT_V6, 0xb200, 0xffc0, "sxth\t%0-2r, %3-5r"},
- {ARM_EXT_V6, 0xb240, 0xffc0, "sxtb\t%0-2r, %3-5r"},
- {ARM_EXT_V6, 0xb280, 0xffc0, "uxth\t%0-2r, %3-5r"},
- {ARM_EXT_V6, 0xb2c0, 0xffc0, "uxtb\t%0-2r, %3-5r"},
+ {ARM_EXT_V6, 0xb660, 0xfff8, "cpsie\t%2'a%1'i%0'f%X"},
+ {ARM_EXT_V6, 0xb670, 0xfff8, "cpsid\t%2'a%1'i%0'f%X"},
+ {ARM_EXT_V6, 0x4600, 0xffc0, "mov%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V6, 0xba00, 0xffc0, "rev%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V6, 0xba40, 0xffc0, "rev16%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V6, 0xbac0, 0xffc0, "revsh%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V6, 0xb650, 0xfff7, "setend\t%3?ble%X"},
+ {ARM_EXT_V6, 0xb200, 0xffc0, "sxth%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V6, 0xb240, 0xffc0, "sxtb%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V6, 0xb280, 0xffc0, "uxth%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V6, 0xb2c0, 0xffc0, "uxtb%c\t%0-2r, %3-5r"},
/* ARM V5 ISA extends Thumb. */
- {ARM_EXT_V5T, 0xbe00, 0xff00, "bkpt\t%0-7x"},
+ {ARM_EXT_V5T, 0xbe00, 0xff00, "bkpt\t%0-7x"}, /* Is always unconditional. */
/* This is BLX(2). BLX(1) is a 32-bit instruction. */
- {ARM_EXT_V5T, 0x4780, 0xff87, "blx\t%3-6r"}, /* note: 4 bit register number. */
+ {ARM_EXT_V5T, 0x4780, 0xff87, "blx%c\t%3-6r%x"}, /* note: 4 bit register number. */
/* ARM V4T ISA (Thumb v1). */
- {ARM_EXT_V4T, 0x46C0, 0xFFFF, "nop\t\t\t(mov r8, r8)"},
+ {ARM_EXT_V4T, 0x46C0, 0xFFFF, "nop%c\t\t\t(mov r8, r8)"},
/* Format 4. */
- {ARM_EXT_V4T, 0x4000, 0xFFC0, "ands\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4040, 0xFFC0, "eors\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4080, 0xFFC0, "lsls\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x40C0, 0xFFC0, "lsrs\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4100, 0xFFC0, "asrs\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4140, 0xFFC0, "adcs\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4180, 0xFFC0, "sbcs\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x41C0, 0xFFC0, "rors\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4200, 0xFFC0, "tst\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4240, 0xFFC0, "negs\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4280, 0xFFC0, "cmp\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x42C0, 0xFFC0, "cmn\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4300, 0xFFC0, "orrs\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4340, 0xFFC0, "muls\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x4380, 0xFFC0, "bics\t%0-2r, %3-5r"},
- {ARM_EXT_V4T, 0x43C0, 0xFFC0, "mvns\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4000, 0xFFC0, "and%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4040, 0xFFC0, "eor%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4080, 0xFFC0, "lsl%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x40C0, 0xFFC0, "lsr%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4100, 0xFFC0, "asr%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4140, 0xFFC0, "adc%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4180, 0xFFC0, "sbc%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x41C0, 0xFFC0, "ror%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4200, 0xFFC0, "tst%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4240, 0xFFC0, "neg%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4280, 0xFFC0, "cmp%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x42C0, 0xFFC0, "cmn%c\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4300, 0xFFC0, "orr%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4340, 0xFFC0, "mul%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x4380, 0xFFC0, "bic%C\t%0-2r, %3-5r"},
+ {ARM_EXT_V4T, 0x43C0, 0xFFC0, "mvn%C\t%0-2r, %3-5r"},
/* format 13 */
- {ARM_EXT_V4T, 0xB000, 0xFF80, "add\tsp, #%0-6W"},
- {ARM_EXT_V4T, 0xB080, 0xFF80, "sub\tsp, #%0-6W"},
+ {ARM_EXT_V4T, 0xB000, 0xFF80, "add%c\tsp, #%0-6W"},
+ {ARM_EXT_V4T, 0xB080, 0xFF80, "sub%c\tsp, #%0-6W"},
/* format 5 */
- {ARM_EXT_V4T, 0x4700, 0xFF80, "bx\t%S"},
- {ARM_EXT_V4T, 0x4400, 0xFF00, "add\t%D, %S"},
- {ARM_EXT_V4T, 0x4500, 0xFF00, "cmp\t%D, %S"},
- {ARM_EXT_V4T, 0x4600, 0xFF00, "mov\t%D, %S"},
+ {ARM_EXT_V4T, 0x4700, 0xFF80, "bx%c\t%S%x"},
+ {ARM_EXT_V4T, 0x4400, 0xFF00, "add%c\t%D, %S"},
+ {ARM_EXT_V4T, 0x4500, 0xFF00, "cmp%c\t%D, %S"},
+ {ARM_EXT_V4T, 0x4600, 0xFF00, "mov%c\t%D, %S"},
/* format 14 */
- {ARM_EXT_V4T, 0xB400, 0xFE00, "push\t%N"},
- {ARM_EXT_V4T, 0xBC00, 0xFE00, "pop\t%O"},
+ {ARM_EXT_V4T, 0xB400, 0xFE00, "push%c\t%N"},
+ {ARM_EXT_V4T, 0xBC00, 0xFE00, "pop%c\t%O"},
/* format 2 */
- {ARM_EXT_V4T, 0x1800, 0xFE00, "adds\t%0-2r, %3-5r, %6-8r"},
- {ARM_EXT_V4T, 0x1A00, 0xFE00, "subs\t%0-2r, %3-5r, %6-8r"},
- {ARM_EXT_V4T, 0x1C00, 0xFE00, "adds\t%0-2r, %3-5r, #%6-8d"},
- {ARM_EXT_V4T, 0x1E00, 0xFE00, "subs\t%0-2r, %3-5r, #%6-8d"},
+ {ARM_EXT_V4T, 0x1800, 0xFE00, "add%C\t%0-2r, %3-5r, %6-8r"},
+ {ARM_EXT_V4T, 0x1A00, 0xFE00, "sub%C\t%0-2r, %3-5r, %6-8r"},
+ {ARM_EXT_V4T, 0x1C00, 0xFE00, "add%C\t%0-2r, %3-5r, #%6-8d"},
+ {ARM_EXT_V4T, 0x1E00, 0xFE00, "sub%C\t%0-2r, %3-5r, #%6-8d"},
/* format 8 */
- {ARM_EXT_V4T, 0x5200, 0xFE00, "strh\t%0-2r, [%3-5r, %6-8r]"},
- {ARM_EXT_V4T, 0x5A00, 0xFE00, "ldrh\t%0-2r, [%3-5r, %6-8r]"},
- {ARM_EXT_V4T, 0x5600, 0xF600, "ldrs%11?hb\t%0-2r, [%3-5r, %6-8r]"},
+ {ARM_EXT_V4T, 0x5200, 0xFE00, "strh%c\t%0-2r, [%3-5r, %6-8r]"},
+ {ARM_EXT_V4T, 0x5A00, 0xFE00, "ldrh%c\t%0-2r, [%3-5r, %6-8r]"},
+ {ARM_EXT_V4T, 0x5600, 0xF600, "ldrs%11?hb%c\t%0-2r, [%3-5r, %6-8r]"},
/* format 7 */
- {ARM_EXT_V4T, 0x5000, 0xFA00, "str%10'b\t%0-2r, [%3-5r, %6-8r]"},
- {ARM_EXT_V4T, 0x5800, 0xFA00, "ldr%10'b\t%0-2r, [%3-5r, %6-8r]"},
+ {ARM_EXT_V4T, 0x5000, 0xFA00, "str%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
+ {ARM_EXT_V4T, 0x5800, 0xFA00, "ldr%10'b%c\t%0-2r, [%3-5r, %6-8r]"},
/* format 1 */
- {ARM_EXT_V4T, 0x0000, 0xF800, "lsls\t%0-2r, %3-5r, #%6-10d"},
- {ARM_EXT_V4T, 0x0800, 0xF800, "lsrs\t%0-2r, %3-5r, %s"},
- {ARM_EXT_V4T, 0x1000, 0xF800, "asrs\t%0-2r, %3-5r, %s"},
+ {ARM_EXT_V4T, 0x0000, 0xF800, "lsl%C\t%0-2r, %3-5r, #%6-10d"},
+ {ARM_EXT_V4T, 0x0800, 0xF800, "lsr%C\t%0-2r, %3-5r, %s"},
+ {ARM_EXT_V4T, 0x1000, 0xF800, "asr%C\t%0-2r, %3-5r, %s"},
/* format 3 */
- {ARM_EXT_V4T, 0x2000, 0xF800, "movs\t%8-10r, #%0-7d"},
- {ARM_EXT_V4T, 0x2800, 0xF800, "cmp\t%8-10r, #%0-7d"},
- {ARM_EXT_V4T, 0x3000, 0xF800, "adds\t%8-10r, #%0-7d"},
- {ARM_EXT_V4T, 0x3800, 0xF800, "subs\t%8-10r, #%0-7d"},
+ {ARM_EXT_V4T, 0x2000, 0xF800, "mov%C\t%8-10r, #%0-7d"},
+ {ARM_EXT_V4T, 0x2800, 0xF800, "cmp%c\t%8-10r, #%0-7d"},
+ {ARM_EXT_V4T, 0x3000, 0xF800, "add%C\t%8-10r, #%0-7d"},
+ {ARM_EXT_V4T, 0x3800, 0xF800, "sub%C\t%8-10r, #%0-7d"},
/* format 6 */
- {ARM_EXT_V4T, 0x4800, 0xF800, "ldr\t%8-10r, [pc, #%0-7W]\t(%0-7a)"}, /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
+ {ARM_EXT_V4T, 0x4800, 0xF800, "ldr%c\t%8-10r, [pc, #%0-7W]\t(%0-7a)"}, /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
/* format 9 */
- {ARM_EXT_V4T, 0x6000, 0xF800, "str\t%0-2r, [%3-5r, #%6-10W]"},
- {ARM_EXT_V4T, 0x6800, 0xF800, "ldr\t%0-2r, [%3-5r, #%6-10W]"},
- {ARM_EXT_V4T, 0x7000, 0xF800, "strb\t%0-2r, [%3-5r, #%6-10d]"},
- {ARM_EXT_V4T, 0x7800, 0xF800, "ldrb\t%0-2r, [%3-5r, #%6-10d]"},
+ {ARM_EXT_V4T, 0x6000, 0xF800, "str%c\t%0-2r, [%3-5r, #%6-10W]"},
+ {ARM_EXT_V4T, 0x6800, 0xF800, "ldr%c\t%0-2r, [%3-5r, #%6-10W]"},
+ {ARM_EXT_V4T, 0x7000, 0xF800, "strb%c\t%0-2r, [%3-5r, #%6-10d]"},
+ {ARM_EXT_V4T, 0x7800, 0xF800, "ldrb%c\t%0-2r, [%3-5r, #%6-10d]"},
/* format 10 */
- {ARM_EXT_V4T, 0x8000, 0xF800, "strh\t%0-2r, [%3-5r, #%6-10H]"},
- {ARM_EXT_V4T, 0x8800, 0xF800, "ldrh\t%0-2r, [%3-5r, #%6-10H]"},
+ {ARM_EXT_V4T, 0x8000, 0xF800, "strh%c\t%0-2r, [%3-5r, #%6-10H]"},
+ {ARM_EXT_V4T, 0x8800, 0xF800, "ldrh%c\t%0-2r, [%3-5r, #%6-10H]"},
/* format 11 */
- {ARM_EXT_V4T, 0x9000, 0xF800, "str\t%8-10r, [sp, #%0-7W]"},
- {ARM_EXT_V4T, 0x9800, 0xF800, "ldr\t%8-10r, [sp, #%0-7W]"},
+ {ARM_EXT_V4T, 0x9000, 0xF800, "str%c\t%8-10r, [sp, #%0-7W]"},
+ {ARM_EXT_V4T, 0x9800, 0xF800, "ldr%c\t%8-10r, [sp, #%0-7W]"},
/* format 12 */
- {ARM_EXT_V4T, 0xA000, 0xF800, "add\t%8-10r, pc, #%0-7W\t(adr %8-10r,%0-7a)"},
- {ARM_EXT_V4T, 0xA800, 0xF800, "add\t%8-10r, sp, #%0-7W"},
+ {ARM_EXT_V4T, 0xA000, 0xF800, "add%c\t%8-10r, pc, #%0-7W\t(adr %8-10r, %0-7a)"},
+ {ARM_EXT_V4T, 0xA800, 0xF800, "add%c\t%8-10r, sp, #%0-7W"},
/* format 15 */
- {ARM_EXT_V4T, 0xC000, 0xF800, "stmia\t%8-10r!, %M"},
- {ARM_EXT_V4T, 0xC800, 0xF800, "ldmia\t%8-10r!, %M"},
+ {ARM_EXT_V4T, 0xC000, 0xF800, "stmia%c\t%8-10r!, %M"},
+ {ARM_EXT_V4T, 0xC800, 0xF800, "ldmia%c\t%8-10r!, %M"},
/* format 17 */
- {ARM_EXT_V4T, 0xDF00, 0xFF00, "svc\t%0-7d"},
+ {ARM_EXT_V4T, 0xDF00, 0xFF00, "svc%c\t%0-7d"},
/* format 16 */
- {ARM_EXT_V4T, 0xD000, 0xF000, "b%8-11c.n\t%0-7B"},
+ {ARM_EXT_V4T, 0xDE00, 0xFE00, "undefined"},
+ {ARM_EXT_V4T, 0xD000, 0xF000, "b%8-11c.n\t%0-7B%X"},
/* format 18 */
- {ARM_EXT_V4T, 0xE000, 0xF800, "b.n\t%0-10B"},
+ {ARM_EXT_V4T, 0xE000, 0xF800, "b%c.n\t%0-10B%x"},
/* The E800 .. FFFF range is unconditionally redirected to the
32-bit table, because even in pre-V6T2 ISAs, BL and BLX(1) pairs
@@ -838,15 +1201,18 @@ static const struct opcode16 thumb_opcodes[] =
%R print the rotation field of an SXT instruction
%U print barrier type.
%P print address for pli instruction.
+ %c print the condition code
+ %x print warning if conditional an not at end of IT block"
+ %X print "\t; unpredictable <IT:code>" if conditional
%<bitfield>d print bitfield in decimal
%<bitfield>W print bitfield*4 in decimal
%<bitfield>r print bitfield as an ARM register
%<bitfield>c print bitfield as a condition code
- %<bitnum>'c print "c" iff bit is one
- %<bitnum>`c print "c" iff bit is zero
- %<bitnum>?ab print "a" if bit is one, else "b"
+ %<bitfield>'c print specified char iff bitfield is all ones
+ %<bitfield>`c print specified char iff bitfield is all zeroes
+ %<bitfield>?ab... select from array of values in big endian order
With one exception at the bottom (done because BL and BLX(1) need
to come dead last), this table was machine-sorted first in
@@ -859,202 +1225,204 @@ static const struct opcode16 thumb_opcodes[] =
static const struct opcode32 thumb32_opcodes[] =
{
/* V7 instructions. */
- {ARM_EXT_V7, 0xf910f000, 0xff70f000, "pli\t%a"},
- {ARM_EXT_V7, 0xf3af80f0, 0xfffffff0, "dbg\t#%0-3d"},
- {ARM_EXT_V7, 0xf3bf8f50, 0xfffffff0, "dmb\t%U"},
- {ARM_EXT_V7, 0xf3bf8f40, 0xfffffff0, "dsb\t%U"},
- {ARM_EXT_V7, 0xf3bf8f60, 0xfffffff0, "isb\t%U"},
- {ARM_EXT_DIV, 0xfb90f0f0, 0xfff0f0f0, "sdiv\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_DIV, 0xfbb0f0f0, 0xfff0f0f0, "udiv\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V7, 0xf910f000, 0xff70f000, "pli%c\t%a"},
+ {ARM_EXT_V7, 0xf3af80f0, 0xfffffff0, "dbg%c\t#%0-3d"},
+ {ARM_EXT_V7, 0xf3bf8f50, 0xfffffff0, "dmb%c\t%U"},
+ {ARM_EXT_V7, 0xf3bf8f40, 0xfffffff0, "dsb%c\t%U"},
+ {ARM_EXT_V7, 0xf3bf8f60, 0xfffffff0, "isb%c\t%U"},
+ {ARM_EXT_DIV, 0xfb90f0f0, 0xfff0f0f0, "sdiv%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_DIV, 0xfbb0f0f0, 0xfff0f0f0, "udiv%c\t%8-11r, %16-19r, %0-3r"},
/* Instructions defined in the basic V6T2 set. */
- {ARM_EXT_V6T2, 0xf3af8000, 0xffffffff, "nop.w"},
- {ARM_EXT_V6T2, 0xf3af8001, 0xffffffff, "yield.w"},
- {ARM_EXT_V6T2, 0xf3af8002, 0xffffffff, "wfe.w"},
- {ARM_EXT_V6T2, 0xf3af8003, 0xffffffff, "wfi.w"},
- {ARM_EXT_V6T2, 0xf3af9004, 0xffffffff, "sev.w"},
- {ARM_EXT_V6T2, 0xf3af8000, 0xffffff00, "nop.w\t{%0-7d}"},
-
- {ARM_EXT_V6T2, 0xf3bf8f2f, 0xffffffff, "clrex"},
- {ARM_EXT_V6T2, 0xf3af8400, 0xffffff1f, "cpsie.w\t%7'a%6'i%5'f"},
- {ARM_EXT_V6T2, 0xf3af8600, 0xffffff1f, "cpsid.w\t%7'a%6'i%5'f"},
- {ARM_EXT_V6T2, 0xf3c08f00, 0xfff0ffff, "bxj\t%16-19r"},
- {ARM_EXT_V6T2, 0xe810c000, 0xffd0ffff, "rfedb\t%16-19r%21'!"},
- {ARM_EXT_V6T2, 0xe990c000, 0xffd0ffff, "rfeia\t%16-19r%21'!"},
- {ARM_EXT_V6T2, 0xf3ef8000, 0xffeff000, "mrs\t%8-11r, %D"},
- {ARM_EXT_V6T2, 0xf3af8100, 0xffffffe0, "cps\t#%0-4d"},
- {ARM_EXT_V6T2, 0xe8d0f000, 0xfff0fff0, "tbb\t[%16-19r, %0-3r]"},
- {ARM_EXT_V6T2, 0xe8d0f010, 0xfff0fff0, "tbh\t[%16-19r, %0-3r, lsl #1]"},
- {ARM_EXT_V6T2, 0xf3af8500, 0xffffff00, "cpsie\t%7'a%6'i%5'f, #%0-4d"},
- {ARM_EXT_V6T2, 0xf3af8700, 0xffffff00, "cpsid\t%7'a%6'i%5'f, #%0-4d"},
- {ARM_EXT_V6T2, 0xf3de8f00, 0xffffff00, "subs\tpc, lr, #%0-7d"},
- {ARM_EXT_V6T2, 0xf3808000, 0xffe0f000, "msr\t%C, %16-19r"},
- {ARM_EXT_V6T2, 0xe8500f00, 0xfff00fff, "ldrex\t%12-15r, [%16-19r]"},
- {ARM_EXT_V6T2, 0xe8d00f4f, 0xfff00fef, "ldrex%4?hb\t%12-15r, [%16-19r]"},
- {ARM_EXT_V6T2, 0xe800c000, 0xffd0ffe0, "srsdb\t#%0-4d%21'!"},
- {ARM_EXT_V6T2, 0xe980c000, 0xffd0ffe0, "srsia\t#%0-4d%21'!"},
- {ARM_EXT_V6T2, 0xfa0ff080, 0xfffff0c0, "sxth.w\t%8-11r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa1ff080, 0xfffff0c0, "uxth.w\t%8-11r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa2ff080, 0xfffff0c0, "sxtb16\t%8-11r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa3ff080, 0xfffff0c0, "uxtb16\t%8-11r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa4ff080, 0xfffff0c0, "sxtb.w\t%8-11r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa5ff080, 0xfffff0c0, "uxtb.w\t%8-11r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xe8400000, 0xfff000ff, "strex\t%8-11r, %12-15r, [%16-19r]"},
- {ARM_EXT_V6T2, 0xe8d0007f, 0xfff000ff, "ldrexd\t%12-15r, %8-11r, [%16-19r]"},
- {ARM_EXT_V6T2, 0xfa80f000, 0xfff0f0f0, "sadd8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa80f010, 0xfff0f0f0, "qadd8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa80f020, 0xfff0f0f0, "shadd8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa80f040, 0xfff0f0f0, "uadd8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa80f050, 0xfff0f0f0, "uqadd8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa80f060, 0xfff0f0f0, "uhadd8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa80f080, 0xfff0f0f0, "qadd\t%8-11r, %0-3r, %16-19r"},
- {ARM_EXT_V6T2, 0xfa80f090, 0xfff0f0f0, "qdadd\t%8-11r, %0-3r, %16-19r"},
- {ARM_EXT_V6T2, 0xfa80f0a0, 0xfff0f0f0, "qsub\t%8-11r, %0-3r, %16-19r"},
- {ARM_EXT_V6T2, 0xfa80f0b0, 0xfff0f0f0, "qdsub\t%8-11r, %0-3r, %16-19r"},
- {ARM_EXT_V6T2, 0xfa90f000, 0xfff0f0f0, "sadd16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa90f010, 0xfff0f0f0, "qadd16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa90f020, 0xfff0f0f0, "shadd16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa90f040, 0xfff0f0f0, "uadd16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa90f050, 0xfff0f0f0, "uqadd16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa90f060, 0xfff0f0f0, "uhadd16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa90f080, 0xfff0f0f0, "rev.w\t%8-11r, %16-19r"},
- {ARM_EXT_V6T2, 0xfa90f090, 0xfff0f0f0, "rev16.w\t%8-11r, %16-19r"},
- {ARM_EXT_V6T2, 0xfa90f0a0, 0xfff0f0f0, "rbit\t%8-11r, %16-19r"},
- {ARM_EXT_V6T2, 0xfa90f0b0, 0xfff0f0f0, "revsh.w\t%8-11r, %16-19r"},
- {ARM_EXT_V6T2, 0xfaa0f000, 0xfff0f0f0, "saddsubx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfaa0f010, 0xfff0f0f0, "qaddsubx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfaa0f020, 0xfff0f0f0, "shaddsubx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfaa0f040, 0xfff0f0f0, "uaddsubx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfaa0f050, 0xfff0f0f0, "uqaddsubx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfaa0f060, 0xfff0f0f0, "uhaddsubx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfaa0f080, 0xfff0f0f0, "sel\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfab0f080, 0xfff0f0f0, "clz\t%8-11r, %16-19r"},
- {ARM_EXT_V6T2, 0xfac0f000, 0xfff0f0f0, "ssub8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfac0f010, 0xfff0f0f0, "qsub8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfac0f020, 0xfff0f0f0, "shsub8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfac0f040, 0xfff0f0f0, "usub8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfac0f050, 0xfff0f0f0, "uqsub8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfac0f060, 0xfff0f0f0, "uhsub8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfad0f000, 0xfff0f0f0, "ssub16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfad0f010, 0xfff0f0f0, "qsub16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfad0f020, 0xfff0f0f0, "shsub16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfad0f040, 0xfff0f0f0, "usub16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfad0f050, 0xfff0f0f0, "uqsub16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfad0f060, 0xfff0f0f0, "uhsub16\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfae0f000, 0xfff0f0f0, "ssubaddx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfae0f010, 0xfff0f0f0, "qsubaddx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfae0f020, 0xfff0f0f0, "shsubaddx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfae0f040, 0xfff0f0f0, "usubaddx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfae0f050, 0xfff0f0f0, "uqsubaddx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfae0f060, 0xfff0f0f0, "uhsubaddx\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfb00f000, 0xfff0f0f0, "mul.w\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfb70f000, 0xfff0f0f0, "usad8\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa00f000, 0xffe0f0f0, "lsl%20's.w\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa20f000, 0xffe0f0f0, "lsr%20's.w\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa40f000, 0xffe0f0f0, "asr%20's.w\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa60f000, 0xffe0f0f0, "ror%20's.w\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xe8c00f40, 0xfff00fe0, "strex%4?hb\t%0-3r, %12-15r, [%16-19r]"},
- {ARM_EXT_V6T2, 0xf3200000, 0xfff0f0e0, "ssat16\t%8-11r, #%0-4d, %16-19r"},
- {ARM_EXT_V6T2, 0xf3a00000, 0xfff0f0e0, "usat16\t%8-11r, #%0-4d, %16-19r"},
- {ARM_EXT_V6T2, 0xfb20f000, 0xfff0f0e0, "smuad%4'x\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfb30f000, 0xfff0f0e0, "smulw%4?tb\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfb40f000, 0xfff0f0e0, "smusd%4'x\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfb50f000, 0xfff0f0e0, "smmul%4'r\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfa00f080, 0xfff0f0c0, "sxtah\t%8-11r, %16-19r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa10f080, 0xfff0f0c0, "uxtah\t%8-11r, %16-19r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa20f080, 0xfff0f0c0, "sxtab16\t%8-11r, %16-19r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa30f080, 0xfff0f0c0, "uxtab16\t%8-11r, %16-19r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa40f080, 0xfff0f0c0, "sxtab\t%8-11r, %16-19r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfa50f080, 0xfff0f0c0, "uxtab\t%8-11r, %16-19r, %0-3r%R"},
- {ARM_EXT_V6T2, 0xfb10f000, 0xfff0f0c0, "smul%5?tb%4?tb\t%8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xf36f0000, 0xffff8020, "bfc\t%8-11r, %E"},
- {ARM_EXT_V6T2, 0xea100f00, 0xfff08f00, "tst.w\t%16-19r, %S"},
- {ARM_EXT_V6T2, 0xea900f00, 0xfff08f00, "teq\t%16-19r, %S"},
- {ARM_EXT_V6T2, 0xeb100f00, 0xfff08f00, "cmn.w\t%16-19r, %S"},
- {ARM_EXT_V6T2, 0xebb00f00, 0xfff08f00, "cmp.w\t%16-19r, %S"},
- {ARM_EXT_V6T2, 0xf0100f00, 0xfbf08f00, "tst.w\t%16-19r, %M"},
- {ARM_EXT_V6T2, 0xf0900f00, 0xfbf08f00, "teq\t%16-19r, %M"},
- {ARM_EXT_V6T2, 0xf1100f00, 0xfbf08f00, "cmn.w\t%16-19r, %M"},
- {ARM_EXT_V6T2, 0xf1b00f00, 0xfbf08f00, "cmp.w\t%16-19r, %M"},
- {ARM_EXT_V6T2, 0xea4f0000, 0xffef8000, "mov%20's.w\t%8-11r, %S"},
- {ARM_EXT_V6T2, 0xea6f0000, 0xffef8000, "mvn%20's.w\t%8-11r, %S"},
- {ARM_EXT_V6T2, 0xe8c00070, 0xfff000f0, "strexd\t%0-3r, %12-15r, %8-11r, [%16-19r]"},
- {ARM_EXT_V6T2, 0xfb000000, 0xfff000f0, "mla\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfb000010, 0xfff000f0, "mls\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfb700000, 0xfff000f0, "usada8\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfb800000, 0xfff000f0, "smull\t%12-15r, %8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfba00000, 0xfff000f0, "umull\t%12-15r, %8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfbc00000, 0xfff000f0, "smlal\t%12-15r, %8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfbe00000, 0xfff000f0, "umlal\t%12-15r, %8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfbe00060, 0xfff000f0, "umaal\t%12-15r, %8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xe8500f00, 0xfff00f00, "ldrex\t%12-15r, [%16-19r, #%0-7W]"},
- {ARM_EXT_V6T2, 0xf7f08000, 0xfff0f000, "smc\t%K"},
- {ARM_EXT_V6T2, 0xf04f0000, 0xfbef8000, "mov%20's.w\t%8-11r, %M"},
- {ARM_EXT_V6T2, 0xf06f0000, 0xfbef8000, "mvn%20's.w\t%8-11r, %M"},
- {ARM_EXT_V6T2, 0xf810f000, 0xff70f000, "pld\t%a"},
- {ARM_EXT_V6T2, 0xfb200000, 0xfff000e0, "smlad%4'x\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfb300000, 0xfff000e0, "smlaw%4?tb\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfb400000, 0xfff000e0, "smlsd%4'x\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfb500000, 0xfff000e0, "smmla%4'r\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfb600000, 0xfff000e0, "smmls%4'r\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfbc000c0, 0xfff000e0, "smlald%4'x\t%12-15r, %8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xfbd000c0, 0xfff000e0, "smlsld%4'x\t%12-15r, %8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xeac00000, 0xfff08030, "pkhbt\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xeac00020, 0xfff08030, "pkhtb\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xf3400000, 0xfff08020, "sbfx\t%8-11r, %16-19r, %F"},
- {ARM_EXT_V6T2, 0xf3c00000, 0xfff08020, "ubfx\t%8-11r, %16-19r, %F"},
- {ARM_EXT_V6T2, 0xf8000e00, 0xff900f00, "str%wt\t%12-15r, %a"},
- {ARM_EXT_V6T2, 0xfb100000, 0xfff000c0, "smla%5?tb%4?tb\t%8-11r, %16-19r, %0-3r, %12-15r"},
- {ARM_EXT_V6T2, 0xfbc00080, 0xfff000c0, "smlal%5?tb%4?tb\t%12-15r, %8-11r, %16-19r, %0-3r"},
- {ARM_EXT_V6T2, 0xf3600000, 0xfff08020, "bfi\t%8-11r, %16-19r, %E"},
- {ARM_EXT_V6T2, 0xf8100e00, 0xfe900f00, "ldr%wt\t%12-15r, %a"},
- {ARM_EXT_V6T2, 0xf3000000, 0xffd08020, "ssat\t%8-11r, #%0-4d, %16-19r%s"},
- {ARM_EXT_V6T2, 0xf3800000, 0xffd08020, "usat\t%8-11r, #%0-4d, %16-19r%s"},
- {ARM_EXT_V6T2, 0xf2000000, 0xfbf08000, "addw\t%8-11r, %16-19r, %I"},
- {ARM_EXT_V6T2, 0xf2400000, 0xfbf08000, "movw\t%8-11r, %J"},
- {ARM_EXT_V6T2, 0xf2a00000, 0xfbf08000, "subw\t%8-11r, %16-19r, %I"},
- {ARM_EXT_V6T2, 0xf2c00000, 0xfbf08000, "movt\t%8-11r, %J"},
- {ARM_EXT_V6T2, 0xea000000, 0xffe08000, "and%20's.w\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xea200000, 0xffe08000, "bic%20's.w\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xea400000, 0xffe08000, "orr%20's.w\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xea600000, 0xffe08000, "orn%20's\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xea800000, 0xffe08000, "eor%20's.w\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xeb000000, 0xffe08000, "add%20's.w\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xeb400000, 0xffe08000, "adc%20's.w\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xeb600000, 0xffe08000, "sbc%20's.w\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xeba00000, 0xffe08000, "sub%20's.w\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xebc00000, 0xffe08000, "rsb%20's\t%8-11r, %16-19r, %S"},
- {ARM_EXT_V6T2, 0xe8400000, 0xfff00000, "strex\t%8-11r, %12-15r, [%16-19r, #%0-7W]"},
- {ARM_EXT_V6T2, 0xf0000000, 0xfbe08000, "and%20's.w\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf0200000, 0xfbe08000, "bic%20's.w\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf0400000, 0xfbe08000, "orr%20's.w\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf0600000, 0xfbe08000, "orn%20's\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf0800000, 0xfbe08000, "eor%20's.w\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf1000000, 0xfbe08000, "add%20's.w\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf1400000, 0xfbe08000, "adc%20's.w\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf1600000, 0xfbe08000, "sbc%20's.w\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf1a00000, 0xfbe08000, "sub%20's.w\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xf1c00000, 0xfbe08000, "rsb%20's\t%8-11r, %16-19r, %M"},
- {ARM_EXT_V6T2, 0xe8800000, 0xffd00000, "stmia.w\t%16-19r%21'!, %m"},
- {ARM_EXT_V6T2, 0xe8900000, 0xffd00000, "ldmia.w\t%16-19r%21'!, %m"},
- {ARM_EXT_V6T2, 0xe9000000, 0xffd00000, "stmdb\t%16-19r%21'!, %m"},
- {ARM_EXT_V6T2, 0xe9100000, 0xffd00000, "ldmdb\t%16-19r%21'!, %m"},
- {ARM_EXT_V6T2, 0xe9c00000, 0xffd000ff, "strd\t%12-15r, %8-11r, [%16-19r]"},
- {ARM_EXT_V6T2, 0xe9d00000, 0xffd000ff, "ldrd\t%12-15r, %8-11r, [%16-19r]"},
- {ARM_EXT_V6T2, 0xe9400000, 0xff500000, "strd\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]"},
- {ARM_EXT_V6T2, 0xe9500000, 0xff500000, "ldrd\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]"},
- {ARM_EXT_V6T2, 0xf8000000, 0xff100000, "str%w.w\t%12-15r, %a"},
- {ARM_EXT_V6T2, 0xf8100000, 0xfe100000, "ldr%w.w\t%12-15r, %a"},
+ {ARM_EXT_V6T2, 0xf3af8000, 0xffffffff, "nop%c.w"},
+ {ARM_EXT_V6T2, 0xf3af8001, 0xffffffff, "yield%c.w"},
+ {ARM_EXT_V6T2, 0xf3af8002, 0xffffffff, "wfe%c.w"},
+ {ARM_EXT_V6T2, 0xf3af8003, 0xffffffff, "wfi%c.w"},
+ {ARM_EXT_V6T2, 0xf3af9004, 0xffffffff, "sev%c.w"},
+ {ARM_EXT_V6T2, 0xf3af8000, 0xffffff00, "nop%c.w\t{%0-7d}"},
+
+ {ARM_EXT_V6T2, 0xf3bf8f2f, 0xffffffff, "clrex%c"},
+ {ARM_EXT_V6T2, 0xf3af8400, 0xffffff1f, "cpsie.w\t%7'a%6'i%5'f%X"},
+ {ARM_EXT_V6T2, 0xf3af8600, 0xffffff1f, "cpsid.w\t%7'a%6'i%5'f%X"},
+ {ARM_EXT_V6T2, 0xf3c08f00, 0xfff0ffff, "bxj%c\t%16-19r%x"},
+ {ARM_EXT_V6T2, 0xe810c000, 0xffd0ffff, "rfedb%c\t%16-19r%21'!"},
+ {ARM_EXT_V6T2, 0xe990c000, 0xffd0ffff, "rfeia%c\t%16-19r%21'!"},
+ {ARM_EXT_V6T2, 0xf3ef8000, 0xffeff000, "mrs%c\t%8-11r, %D"},
+ {ARM_EXT_V6T2, 0xf3af8100, 0xffffffe0, "cps\t#%0-4d%X"},
+ {ARM_EXT_V6T2, 0xe8d0f000, 0xfff0fff0, "tbb%c\t[%16-19r, %0-3r]%x"},
+ {ARM_EXT_V6T2, 0xe8d0f010, 0xfff0fff0, "tbh%c\t[%16-19r, %0-3r, lsl #1]%x"},
+ {ARM_EXT_V6T2, 0xf3af8500, 0xffffff00, "cpsie\t%7'a%6'i%5'f, #%0-4d%X"},
+ {ARM_EXT_V6T2, 0xf3af8700, 0xffffff00, "cpsid\t%7'a%6'i%5'f, #%0-4d%X"},
+ {ARM_EXT_V6T2, 0xf3de8f00, 0xffffff00, "subs%c\tpc, lr, #%0-7d"},
+ {ARM_EXT_V6T2, 0xf3808000, 0xffe0f000, "msr%c\t%C, %16-19r"},
+ {ARM_EXT_V6T2, 0xe8500f00, 0xfff00fff, "ldrex%c\t%12-15r, [%16-19r]"},
+ {ARM_EXT_V6T2, 0xe8d00f4f, 0xfff00fef, "ldrex%4?hb%c\t%12-15r, [%16-19r]"},
+ {ARM_EXT_V6T2, 0xe800c000, 0xffd0ffe0, "srsdb%c\t%16-19r%21'!, #%0-4d"},
+ {ARM_EXT_V6T2, 0xe980c000, 0xffd0ffe0, "srsia%c\t%16-19r%21'!, #%0-4d"},
+ {ARM_EXT_V6T2, 0xfa0ff080, 0xfffff0c0, "sxth%c.w\t%8-11r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa1ff080, 0xfffff0c0, "uxth%c.w\t%8-11r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa2ff080, 0xfffff0c0, "sxtb16%c\t%8-11r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa3ff080, 0xfffff0c0, "uxtb16%c\t%8-11r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa4ff080, 0xfffff0c0, "sxtb%c.w\t%8-11r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa5ff080, 0xfffff0c0, "uxtb%c.w\t%8-11r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xe8400000, 0xfff000ff, "strex%c\t%8-11r, %12-15r, [%16-19r]"},
+ {ARM_EXT_V6T2, 0xe8d0007f, 0xfff000ff, "ldrexd%c\t%12-15r, %8-11r, [%16-19r]"},
+ {ARM_EXT_V6T2, 0xfa80f000, 0xfff0f0f0, "sadd8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa80f010, 0xfff0f0f0, "qadd8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa80f020, 0xfff0f0f0, "shadd8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa80f040, 0xfff0f0f0, "uadd8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa80f050, 0xfff0f0f0, "uqadd8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa80f060, 0xfff0f0f0, "uhadd8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa80f080, 0xfff0f0f0, "qadd%c\t%8-11r, %0-3r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfa80f090, 0xfff0f0f0, "qdadd%c\t%8-11r, %0-3r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfa80f0a0, 0xfff0f0f0, "qsub%c\t%8-11r, %0-3r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfa80f0b0, 0xfff0f0f0, "qdsub%c\t%8-11r, %0-3r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfa90f000, 0xfff0f0f0, "sadd16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa90f010, 0xfff0f0f0, "qadd16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa90f020, 0xfff0f0f0, "shadd16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa90f040, 0xfff0f0f0, "uadd16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa90f050, 0xfff0f0f0, "uqadd16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa90f060, 0xfff0f0f0, "uhadd16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa90f080, 0xfff0f0f0, "rev%c.w\t%8-11r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfa90f090, 0xfff0f0f0, "rev16%c.w\t%8-11r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfa90f0a0, 0xfff0f0f0, "rbit%c\t%8-11r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfa90f0b0, 0xfff0f0f0, "revsh%c.w\t%8-11r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfaa0f000, 0xfff0f0f0, "saddsubx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfaa0f010, 0xfff0f0f0, "qaddsubx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfaa0f020, 0xfff0f0f0, "shaddsubx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfaa0f040, 0xfff0f0f0, "uaddsubx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfaa0f050, 0xfff0f0f0, "uqaddsubx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfaa0f060, 0xfff0f0f0, "uhaddsubx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfaa0f080, 0xfff0f0f0, "sel%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfab0f080, 0xfff0f0f0, "clz%c\t%8-11r, %16-19r"},
+ {ARM_EXT_V6T2, 0xfac0f000, 0xfff0f0f0, "ssub8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfac0f010, 0xfff0f0f0, "qsub8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfac0f020, 0xfff0f0f0, "shsub8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfac0f040, 0xfff0f0f0, "usub8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfac0f050, 0xfff0f0f0, "uqsub8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfac0f060, 0xfff0f0f0, "uhsub8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfad0f000, 0xfff0f0f0, "ssub16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfad0f010, 0xfff0f0f0, "qsub16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfad0f020, 0xfff0f0f0, "shsub16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfad0f040, 0xfff0f0f0, "usub16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfad0f050, 0xfff0f0f0, "uqsub16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfad0f060, 0xfff0f0f0, "uhsub16%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfae0f000, 0xfff0f0f0, "ssubaddx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfae0f010, 0xfff0f0f0, "qsubaddx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfae0f020, 0xfff0f0f0, "shsubaddx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfae0f040, 0xfff0f0f0, "usubaddx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfae0f050, 0xfff0f0f0, "uqsubaddx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfae0f060, 0xfff0f0f0, "uhsubaddx%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfb00f000, 0xfff0f0f0, "mul%c.w\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfb70f000, 0xfff0f0f0, "usad8%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa00f000, 0xffe0f0f0, "lsl%20's%c.w\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa20f000, 0xffe0f0f0, "lsr%20's%c.w\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa40f000, 0xffe0f0f0, "asr%20's%c.w\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa60f000, 0xffe0f0f0, "ror%20's%c.w\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xe8c00f40, 0xfff00fe0, "strex%4?hb%c\t%0-3r, %12-15r, [%16-19r]"},
+ {ARM_EXT_V6T2, 0xf3200000, 0xfff0f0e0, "ssat16%c\t%8-11r, #%0-4d, %16-19r"},
+ {ARM_EXT_V6T2, 0xf3a00000, 0xfff0f0e0, "usat16%c\t%8-11r, #%0-4d, %16-19r"},
+ {ARM_EXT_V6T2, 0xfb20f000, 0xfff0f0e0, "smuad%4'x%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfb30f000, 0xfff0f0e0, "smulw%4?tb%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfb40f000, 0xfff0f0e0, "smusd%4'x%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfb50f000, 0xfff0f0e0, "smmul%4'r%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfa00f080, 0xfff0f0c0, "sxtah%c\t%8-11r, %16-19r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa10f080, 0xfff0f0c0, "uxtah%c\t%8-11r, %16-19r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa20f080, 0xfff0f0c0, "sxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa30f080, 0xfff0f0c0, "uxtab16%c\t%8-11r, %16-19r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa40f080, 0xfff0f0c0, "sxtab%c\t%8-11r, %16-19r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfa50f080, 0xfff0f0c0, "uxtab%c\t%8-11r, %16-19r, %0-3r%R"},
+ {ARM_EXT_V6T2, 0xfb10f000, 0xfff0f0c0, "smul%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xf36f0000, 0xffff8020, "bfc%c\t%8-11r, %E"},
+ {ARM_EXT_V6T2, 0xea100f00, 0xfff08f00, "tst%c.w\t%16-19r, %S"},
+ {ARM_EXT_V6T2, 0xea900f00, 0xfff08f00, "teq%c\t%16-19r, %S"},
+ {ARM_EXT_V6T2, 0xeb100f00, 0xfff08f00, "cmn%c.w\t%16-19r, %S"},
+ {ARM_EXT_V6T2, 0xebb00f00, 0xfff08f00, "cmp%c.w\t%16-19r, %S"},
+ {ARM_EXT_V6T2, 0xf0100f00, 0xfbf08f00, "tst%c.w\t%16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf0900f00, 0xfbf08f00, "teq%c\t%16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf1100f00, 0xfbf08f00, "cmn%c.w\t%16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf1b00f00, 0xfbf08f00, "cmp%c.w\t%16-19r, %M"},
+ {ARM_EXT_V6T2, 0xea4f0000, 0xffef8000, "mov%20's%c.w\t%8-11r, %S"},
+ {ARM_EXT_V6T2, 0xea6f0000, 0xffef8000, "mvn%20's%c.w\t%8-11r, %S"},
+ {ARM_EXT_V6T2, 0xe8c00070, 0xfff000f0, "strexd%c\t%0-3r, %12-15r, %8-11r, [%16-19r]"},
+ {ARM_EXT_V6T2, 0xfb000000, 0xfff000f0, "mla%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfb000010, 0xfff000f0, "mls%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfb700000, 0xfff000f0, "usada8%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfb800000, 0xfff000f0, "smull%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfba00000, 0xfff000f0, "umull%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfbc00000, 0xfff000f0, "smlal%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfbe00000, 0xfff000f0, "umlal%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfbe00060, 0xfff000f0, "umaal%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xe8500f00, 0xfff00f00, "ldrex%c\t%12-15r, [%16-19r, #%0-7W]"},
+ {ARM_EXT_V6T2, 0xf7f08000, 0xfff0f000, "smc%c\t%K"},
+ {ARM_EXT_V6T2, 0xf04f0000, 0xfbef8000, "mov%20's%c.w\t%8-11r, %M"},
+ {ARM_EXT_V6T2, 0xf06f0000, 0xfbef8000, "mvn%20's%c.w\t%8-11r, %M"},
+ {ARM_EXT_V6T2, 0xf810f000, 0xff70f000, "pld%c\t%a"},
+ {ARM_EXT_V6T2, 0xfb200000, 0xfff000e0, "smlad%4'x%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfb300000, 0xfff000e0, "smlaw%4?tb%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfb400000, 0xfff000e0, "smlsd%4'x%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfb500000, 0xfff000e0, "smmla%4'r%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfb600000, 0xfff000e0, "smmls%4'r%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfbc000c0, 0xfff000e0, "smlald%4'x%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xfbd000c0, 0xfff000e0, "smlsld%4'x%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xeac00000, 0xfff08030, "pkhbt%c\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xeac00020, 0xfff08030, "pkhtb%c\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xf3400000, 0xfff08020, "sbfx%c\t%8-11r, %16-19r, %F"},
+ {ARM_EXT_V6T2, 0xf3c00000, 0xfff08020, "ubfx%c\t%8-11r, %16-19r, %F"},
+ {ARM_EXT_V6T2, 0xf8000e00, 0xff900f00, "str%wt%c\t%12-15r, %a"},
+ {ARM_EXT_V6T2, 0xfb100000, 0xfff000c0, "smla%5?tb%4?tb%c\t%8-11r, %16-19r, %0-3r, %12-15r"},
+ {ARM_EXT_V6T2, 0xfbc00080, 0xfff000c0, "smlal%5?tb%4?tb%c\t%12-15r, %8-11r, %16-19r, %0-3r"},
+ {ARM_EXT_V6T2, 0xf3600000, 0xfff08020, "bfi%c\t%8-11r, %16-19r, %E"},
+ {ARM_EXT_V6T2, 0xf8100e00, 0xfe900f00, "ldr%wt%c\t%12-15r, %a"},
+ {ARM_EXT_V6T2, 0xf3000000, 0xffd08020, "ssat%c\t%8-11r, #%0-4d, %16-19r%s"},
+ {ARM_EXT_V6T2, 0xf3800000, 0xffd08020, "usat%c\t%8-11r, #%0-4d, %16-19r%s"},
+ {ARM_EXT_V6T2, 0xf2000000, 0xfbf08000, "addw%c\t%8-11r, %16-19r, %I"},
+ {ARM_EXT_V6T2, 0xf2400000, 0xfbf08000, "movw%c\t%8-11r, %J"},
+ {ARM_EXT_V6T2, 0xf2a00000, 0xfbf08000, "subw%c\t%8-11r, %16-19r, %I"},
+ {ARM_EXT_V6T2, 0xf2c00000, 0xfbf08000, "movt%c\t%8-11r, %J"},
+ {ARM_EXT_V6T2, 0xea000000, 0xffe08000, "and%20's%c.w\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xea200000, 0xffe08000, "bic%20's%c.w\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xea400000, 0xffe08000, "orr%20's%c.w\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xea600000, 0xffe08000, "orn%20's%c\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xea800000, 0xffe08000, "eor%20's%c.w\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xeb000000, 0xffe08000, "add%20's%c.w\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xeb400000, 0xffe08000, "adc%20's%c.w\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xeb600000, 0xffe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xeba00000, 0xffe08000, "sub%20's%c.w\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xebc00000, 0xffe08000, "rsb%20's%c\t%8-11r, %16-19r, %S"},
+ {ARM_EXT_V6T2, 0xe8400000, 0xfff00000, "strex%c\t%8-11r, %12-15r, [%16-19r, #%0-7W]"},
+ {ARM_EXT_V6T2, 0xf0000000, 0xfbe08000, "and%20's%c.w\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf0200000, 0xfbe08000, "bic%20's%c.w\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf0400000, 0xfbe08000, "orr%20's%c.w\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf0600000, 0xfbe08000, "orn%20's%c\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf0800000, 0xfbe08000, "eor%20's%c.w\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf1000000, 0xfbe08000, "add%20's%c.w\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf1400000, 0xfbe08000, "adc%20's%c.w\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf1600000, 0xfbe08000, "sbc%20's%c.w\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf1a00000, 0xfbe08000, "sub%20's%c.w\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xf1c00000, 0xfbe08000, "rsb%20's%c\t%8-11r, %16-19r, %M"},
+ {ARM_EXT_V6T2, 0xe8800000, 0xffd00000, "stmia%c.w\t%16-19r%21'!, %m"},
+ {ARM_EXT_V6T2, 0xe8900000, 0xffd00000, "ldmia%c.w\t%16-19r%21'!, %m"},
+ {ARM_EXT_V6T2, 0xe9000000, 0xffd00000, "stmdb%c\t%16-19r%21'!, %m"},
+ {ARM_EXT_V6T2, 0xe9100000, 0xffd00000, "ldmdb%c\t%16-19r%21'!, %m"},
+ {ARM_EXT_V6T2, 0xe9c00000, 0xffd000ff, "strd%c\t%12-15r, %8-11r, [%16-19r]"},
+ {ARM_EXT_V6T2, 0xe9d00000, 0xffd000ff, "ldrd%c\t%12-15r, %8-11r, [%16-19r]"},
+ {ARM_EXT_V6T2, 0xe9400000, 0xff500000, "strd%c\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]%21'!"},
+ {ARM_EXT_V6T2, 0xe9500000, 0xff500000, "ldrd%c\t%12-15r, %8-11r, [%16-19r, #%23`-%0-7W]%21'!"},
+ {ARM_EXT_V6T2, 0xe8600000, 0xff700000, "strd%c\t%12-15r, %8-11r, [%16-19r], #%23`-%0-7W"},
+ {ARM_EXT_V6T2, 0xe8700000, 0xff700000, "ldrd%c\t%12-15r, %8-11r, [%16-19r], #%23`-%0-7W"},
+ {ARM_EXT_V6T2, 0xf8000000, 0xff100000, "str%w%c.w\t%12-15r, %a"},
+ {ARM_EXT_V6T2, 0xf8100000, 0xfe100000, "ldr%w%c.w\t%12-15r, %a"},
/* Filter out Bcc with cond=E or F, which are used for other instructions. */
{ARM_EXT_V6T2, 0xf3c08000, 0xfbc0d000, "undefined (bcc, cond=0xF)"},
{ARM_EXT_V6T2, 0xf3808000, 0xfbc0d000, "undefined (bcc, cond=0xE)"},
- {ARM_EXT_V6T2, 0xf0008000, 0xf800d000, "b%22-25c.w\t%b"},
- {ARM_EXT_V6T2, 0xf0009000, 0xf800d000, "b.w\t%B"},
+ {ARM_EXT_V6T2, 0xf0008000, 0xf800d000, "b%22-25c.w\t%b%X"},
+ {ARM_EXT_V6T2, 0xf0009000, 0xf800d000, "b%c.w\t%B%x"},
/* These have been 32-bit since the invention of Thumb. */
- {ARM_EXT_V4T, 0xf000c000, 0xf800d000, "blx\t%B"},
- {ARM_EXT_V4T, 0xf000d000, 0xf800d000, "bl\t%B"},
+ {ARM_EXT_V4T, 0xf000c000, 0xf800d000, "blx%c\t%B%x"},
+ {ARM_EXT_V4T, 0xf000d000, 0xf800d000, "bl%c\t%B%x"},
/* Fallback. */
{ARM_EXT_V1, 0x00000000, 0x00000000, "undefined"},
@@ -1063,7 +1431,7 @@ static const struct opcode32 thumb32_opcodes[] =
static const char *const arm_conditional[] =
{"eq", "ne", "cs", "cc", "mi", "pl", "vs", "vc",
- "hi", "ls", "ge", "lt", "gt", "le", "", "<und>"};
+ "hi", "ls", "ge", "lt", "gt", "le", "al", "<und>", ""};
static const char *const arm_fp_const[] =
{"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0"};
@@ -1099,10 +1467,10 @@ static const char *const iwmmxt_wwnames[] =
{"b", "h", "w", "d"};
static const char *const iwmmxt_wwssnames[] =
-{"b", "bus", "b", "bss",
- "h", "hus", "h", "hss",
- "w", "wus", "w", "wss",
- "d", "dus", "d", "dss"
+{"b", "bus", "bc", "bss",
+ "h", "hus", "hc", "hss",
+ "w", "wus", "wc", "wss",
+ "d", "dus", "dc", "dss"
};
static const char *const iwmmxt_regnames[] =
@@ -1123,6 +1491,26 @@ static unsigned int regname_selected = 1;
static bfd_boolean force_thumb = FALSE;
+/* Current IT instruction state. This contains the same state as the IT
+ bits in the CPSR. */
+static unsigned int ifthen_state;
+/* IT state for the next instruction. */
+static unsigned int ifthen_next_state;
+/* The address of the insn for which the IT state is valid. */
+static bfd_vma ifthen_address;
+#define IFTHEN_COND ((ifthen_state >> 4) & 0xf)
+
+/* Cached mapping symbol state. */
+enum map_type {
+ MAP_ARM,
+ MAP_THUMB,
+ MAP_DATA
+};
+
+enum map_type last_type;
+int last_mapping_sym = -1;
+bfd_vma last_mapping_addr = 0;
+
/* Functions. */
int
@@ -1149,8 +1537,46 @@ get_arm_regnames (int option, const char **setname, const char **setdescription,
return 16;
}
+/* Decode a bitfield of the form matching regexp (N(-N)?,)*N(-N)?.
+ Returns pointer to following character of the format string and
+ fills in *VALUEP and *WIDTHP with the extracted value and number of
+ bits extracted. WIDTHP can be NULL. */
+
+static const char *
+arm_decode_bitfield (const char *ptr, unsigned long insn,
+ unsigned long *valuep, int *widthp)
+{
+ unsigned long value = 0;
+ int width = 0;
+
+ do
+ {
+ int start, end;
+ int bits;
+
+ for (start = 0; *ptr >= '0' && *ptr <= '9'; ptr++)
+ start = start * 10 + *ptr - '0';
+ if (*ptr == '-')
+ for (end = 0, ptr++; *ptr >= '0' && *ptr <= '9'; ptr++)
+ end = end * 10 + *ptr - '0';
+ else
+ end = start;
+ bits = end - start;
+ if (bits < 0)
+ abort ();
+ value |= ((insn >> start) & ((2ul << bits) - 1)) << width;
+ width += bits + 1;
+ }
+ while (*ptr++ == ',');
+ *valuep = value;
+ if (widthp)
+ *widthp = width;
+ return ptr - 1;
+}
+
static void
-arm_decode_shift (long given, fprintf_ftype func, void *stream)
+arm_decode_shift (long given, fprintf_ftype func, void *stream,
+ int print_shift)
{
func (stream, "%s", arm_regnames[given & 0xf]);
@@ -1172,11 +1598,16 @@ arm_decode_shift (long given, fprintf_ftype func, void *stream)
amount = 32;
}
- func (stream, ", %s #%d", arm_shift[shift], amount);
+ if (print_shift)
+ func (stream, ", %s #%d", arm_shift[shift], amount);
+ else
+ func (stream, ", #%d", amount);
}
- else
+ else if (print_shift)
func (stream, ", %s %s", arm_shift[(given & 0x60) >> 5],
arm_regnames[(given & 0xf00) >> 8]);
+ else
+ func (stream, ", %s", arm_regnames[(given & 0xf00) >> 8]);
}
}
@@ -1185,7 +1616,7 @@ arm_decode_shift (long given, fprintf_ftype func, void *stream)
recognised coprocessor instruction. */
static bfd_boolean
-print_insn_coprocessor (struct disassemble_info *info, long given,
+print_insn_coprocessor (bfd_vma pc, struct disassemble_info *info, long given,
bfd_boolean thumb)
{
const struct opcode32 *insn;
@@ -1193,12 +1624,14 @@ print_insn_coprocessor (struct disassemble_info *info, long given,
fprintf_ftype func = info->fprintf_func;
unsigned long mask;
unsigned long value;
+ int cond;
for (insn = coprocessor_opcodes; insn->assembler; insn++)
{
if (insn->value == FIRST_IWMMXT_INSN
&& info->mach != bfd_mach_arm_XScale
- && info->mach != bfd_mach_arm_iWMMXt)
+ && info->mach != bfd_mach_arm_iWMMXt
+ && info->mach != bfd_mach_arm_iWMMXt2)
insn = insn + IWMMXT_INSN_COUNT;
mask = insn->mask;
@@ -1210,13 +1643,26 @@ print_insn_coprocessor (struct disassemble_info *info, long given,
encoding is the same. */
mask |= 0xf0000000;
value |= 0xe0000000;
+ if (ifthen_state)
+ cond = IFTHEN_COND;
+ else
+ cond = 16;
}
else
{
/* Only match unconditional instuctions against unconditional
patterns. */
if ((given & 0xf0000000) == 0xf0000000)
- mask |= 0xf0000000;
+ {
+ mask |= 0xf0000000;
+ cond = 16;
+ }
+ else
+ {
+ cond = (given >> 28) & 0xf;
+ if (cond == 0xe)
+ cond = 16;
+ }
}
if ((given & mask) == value)
{
@@ -1265,9 +1711,48 @@ print_insn_coprocessor (struct disassemble_info *info, long given,
}
break;
+ case 'B':
+ {
+ int regno = ((given >> 12) & 0xf) | ((given >> (22 - 4)) & 0x10);
+ int offset = (given >> 1) & 0x3f;
+
+ if (offset == 1)
+ func (stream, "{d%d}", regno);
+ else if (regno + offset > 32)
+ func (stream, "{d%d-<overflow reg d%d>}", regno, regno + offset - 1);
+ else
+ func (stream, "{d%d-d%d}", regno, regno + offset - 1);
+ }
+ break;
+
+ case 'C':
+ {
+ int rn = (given >> 16) & 0xf;
+ int offset = (given & 0xff) * 4;
+ int add = (given >> 23) & 1;
+
+ func (stream, "[%s", arm_regnames[rn]);
+
+ if (offset)
+ {
+ if (!add)
+ offset = -offset;
+ func (stream, ", #%d", offset);
+ }
+ func (stream, "]");
+ if (rn == 15)
+ {
+ func (stream, "\t; ");
+ /* FIXME: Unsure if info->bytes_per_chunk is the
+ right thing to use here. */
+ info->print_address_func (offset + pc
+ + info->bytes_per_chunk * 2, info);
+ }
+ }
+ break;
+
case 'c':
- func (stream, "%s",
- arm_conditional [(given >> 28) & 0xf]);
+ func (stream, "%s", arm_conditional[cond]);
break;
case 'I':
@@ -1360,206 +1845,163 @@ print_insn_coprocessor (struct disassemble_info *info, long given,
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
- int bitstart = *c++ - '0';
- int bitend = 0;
- while (*c >= '0' && *c <= '9')
- bitstart = (bitstart * 10) + *c++ - '0';
+ int width;
+ unsigned long value;
+
+ c = arm_decode_bitfield (c, given, &value, &width);
switch (*c)
{
- case '-':
- c++;
-
- while (*c >= '0' && *c <= '9')
- bitend = (bitend * 10) + *c++ - '0';
-
- if (!bitend)
- abort ();
+ case 'r':
+ func (stream, "%s", arm_regnames[value]);
+ break;
+ case 'D':
+ func (stream, "d%ld", value);
+ break;
+ case 'Q':
+ if (value & 1)
+ func (stream, "<illegal reg q%ld.5>", value >> 1);
+ else
+ func (stream, "q%ld", value >> 1);
+ break;
+ case 'd':
+ func (stream, "%ld", value);
+ break;
+ case 'k':
+ {
+ int from = (given & (1 << 7)) ? 32 : 16;
+ func (stream, "%ld", from - value);
+ }
+ break;
+
+ case 'f':
+ if (value > 7)
+ func (stream, "#%s", arm_fp_const[value & 7]);
+ else
+ func (stream, "f%ld", value);
+ break;
- switch (*c)
- {
- case 'r':
- {
- long reg;
+ case 'w':
+ if (width == 2)
+ func (stream, "%s", iwmmxt_wwnames[value]);
+ else
+ func (stream, "%s", iwmmxt_wwssnames[value]);
+ break;
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
+ case 'g':
+ func (stream, "%s", iwmmxt_regnames[value]);
+ break;
+ case 'G':
+ func (stream, "%s", iwmmxt_cregnames[value]);
+ break;
- func (stream, "%s", arm_regnames[reg]);
- }
- break;
- case 'd':
- {
- long reg;
+ case 'x':
+ func (stream, "0x%lx", value);
+ break;
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
+ case '`':
+ c++;
+ if (value == 0)
+ func (stream, "%c", *c);
+ break;
+ case '\'':
+ c++;
+ if (value == ((1ul << width) - 1))
+ func (stream, "%c", *c);
+ break;
+ case '?':
+ func (stream, "%c", c[(1 << width) - (int)value]);
+ c += 1 << width;
+ break;
+ default:
+ abort ();
+ }
+ break;
- func (stream, "%ld", reg);
- }
- break;
- case 'f':
+ case 'y':
+ case 'z':
+ {
+ int single = *c++ == 'y';
+ int regno;
+
+ switch (*c)
+ {
+ case '4': /* Sm pair */
+ func (stream, "{");
+ /* Fall through. */
+ case '0': /* Sm, Dm */
+ regno = given & 0x0000000f;
+ if (single)
{
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- if (reg > 7)
- func (stream, "#%s",
- arm_fp_const[reg & 7]);
- else
- func (stream, "f%ld", reg);
+ regno <<= 1;
+ regno += (given >> 5) & 1;
}
- break;
+ else
+ regno += ((given >> 5) & 1) << 4;
+ break;
- case 'w':
+ case '1': /* Sd, Dd */
+ regno = (given >> 12) & 0x0000000f;
+ if (single)
{
- long reg;
-
- if (bitstart != bitend)
- {
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
- if (bitend - bitstart == 1)
- func (stream, "%s", iwmmxt_wwnames[reg]);
- else
- func (stream, "%s", iwmmxt_wwssnames[reg]);
- }
- else
- {
- reg = (((given >> 8) & 0x1) |
- ((given >> 22) & 0x1));
- func (stream, "%s", iwmmxt_wwnames[reg]);
- }
+ regno <<= 1;
+ regno += (given >> 22) & 1;
}
- break;
+ else
+ regno += ((given >> 22) & 1) << 4;
+ break;
- case 'g':
+ case '2': /* Sn, Dn */
+ regno = (given >> 16) & 0x0000000f;
+ if (single)
{
- long reg;
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
- func (stream, "%s", iwmmxt_regnames[reg]);
+ regno <<= 1;
+ regno += (given >> 7) & 1;
}
- break;
-
- case 'G':
+ else
+ regno += ((given >> 7) & 1) << 4;
+ break;
+
+ case '3': /* List */
+ func (stream, "{");
+ regno = (given >> 12) & 0x0000000f;
+ if (single)
{
- long reg;
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
- func (stream, "%s", iwmmxt_cregnames[reg]);
+ regno <<= 1;
+ regno += (given >> 22) & 1;
}
- break;
+ else
+ regno += ((given >> 22) & 1) << 4;
+ break;
+
+ default:
+ abort ();
+ }
- default:
- abort ();
- }
- break;
+ func (stream, "%c%d", single ? 's' : 'd', regno);
- case 'y':
- case 'z':
+ if (*c == '3')
{
- int single = *c == 'y';
- int regno;
-
- switch (bitstart)
+ int count = given & 0xff;
+
+ if (single == 0)
+ count >>= 1;
+
+ if (--count)
{
- 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 + count);
}
-
- 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;
+
+ func (stream, "}");
}
-
- break;
-
- case '`':
- c++;
- if ((given & (1 << bitstart)) == 0)
- func (stream, "%c", *c);
- break;
- case '\'':
- c++;
- if ((given & (1 << bitstart)) != 0)
- func (stream, "%c", *c);
- break;
- case '?':
- ++c;
- if ((given & (1 << bitstart)) != 0)
- func (stream, "%c", *c++);
- else
- func (stream, "%c", *++c);
- break;
- default:
- abort ();
- }
+ else if (*c == '4')
+ func (stream, ", %c%d}", single ? 's' : 'd',
+ regno + 1);
+ }
break;
-
+
case 'L':
switch (given & 0x00400100)
{
@@ -1608,6 +2050,53 @@ print_insn_coprocessor (struct disassemble_info *info, long given,
}
break;
+ case 'r':
+ {
+ int imm4 = (given >> 4) & 0xf;
+ int puw_bits = ((given >> 22) & 6) | ((given >> 21) & 1);
+ int ubit = (given >> 23) & 1;
+ const char *rm = arm_regnames [given & 0xf];
+ const char *rn = arm_regnames [(given >> 16) & 0xf];
+
+ switch (puw_bits)
+ {
+ case 1:
+ /* fall through */
+ case 3:
+ func (stream, "[%s], %c%s", rn, ubit ? '+' : '-', rm);
+ if (imm4)
+ func (stream, ", lsl #%d", imm4);
+ break;
+
+ case 4:
+ /* fall through */
+ case 5:
+ /* fall through */
+ case 6:
+ /* fall through */
+ case 7:
+ func (stream, "[%s, %c%s", rn, ubit ? '+' : '-', rm);
+ if (imm4 > 0)
+ func (stream, ", lsl #%d", imm4);
+ func (stream, "]");
+ if (puw_bits == 5 || puw_bits == 7)
+ func (stream, "!");
+ break;
+
+ default:
+ func (stream, "INVALID");
+ }
+ }
+ break;
+
+ case 'i':
+ {
+ long imm5;
+ imm5 = ((given & 0x100) >> 4) | (given & 0xf);
+ func (stream, "%ld", (imm5 == 0) ? 32 : imm5);
+ }
+ break;
+
default:
abort ();
}
@@ -1683,7 +2172,7 @@ print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
func (stream, ", %s",
(((given & 0x00800000) == 0)
? "-" : ""));
- arm_decode_shift (given, func, stream);
+ arm_decode_shift (given, func, stream, 1);
}
func (stream, "]%s",
@@ -1706,12 +2195,471 @@ print_arm_address (bfd_vma pc, struct disassemble_info *info, long given)
func (stream, "], %s",
(((given & 0x00800000) == 0)
? "-" : ""));
- arm_decode_shift (given, func, stream);
+ arm_decode_shift (given, func, stream, 1);
}
}
}
}
+/* Print one neon instruction on INFO->STREAM.
+ Return TRUE if the instuction matched, FALSE if this is not a
+ recognised neon instruction. */
+
+static bfd_boolean
+print_insn_neon (struct disassemble_info *info, long given, bfd_boolean thumb)
+{
+ const struct opcode32 *insn;
+ void *stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ if (thumb)
+ {
+ if ((given & 0xef000000) == 0xef000000)
+ {
+ /* move bit 28 to bit 24 to translate Thumb2 to ARM encoding. */
+ unsigned long bit28 = given & (1 << 28);
+
+ given &= 0x00ffffff;
+ if (bit28)
+ given |= 0xf3000000;
+ else
+ given |= 0xf2000000;
+ }
+ else if ((given & 0xff000000) == 0xf9000000)
+ given ^= 0xf9000000 ^ 0xf4000000;
+ else
+ return FALSE;
+ }
+
+ for (insn = neon_opcodes; insn->assembler; insn++)
+ {
+ if ((given & insn->mask) == insn->value)
+ {
+ const char *c;
+
+ for (c = insn->assembler; *c; c++)
+ {
+ if (*c == '%')
+ {
+ switch (*++c)
+ {
+ case '%':
+ func (stream, "%%");
+ break;
+
+ case 'c':
+ if (thumb && ifthen_state)
+ func (stream, "%s", arm_conditional[IFTHEN_COND]);
+ break;
+
+ case 'A':
+ {
+ static const unsigned char enc[16] =
+ {
+ 0x4, 0x14, /* st4 0,1 */
+ 0x4, /* st1 2 */
+ 0x4, /* st2 3 */
+ 0x3, /* st3 4 */
+ 0x13, /* st3 5 */
+ 0x3, /* st1 6 */
+ 0x1, /* st1 7 */
+ 0x2, /* st2 8 */
+ 0x12, /* st2 9 */
+ 0x2, /* st1 10 */
+ 0, 0, 0, 0, 0
+ };
+ int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
+ int rn = ((given >> 16) & 0xf);
+ int rm = ((given >> 0) & 0xf);
+ int align = ((given >> 4) & 0x3);
+ int type = ((given >> 8) & 0xf);
+ int n = enc[type] & 0xf;
+ int stride = (enc[type] >> 4) + 1;
+ int ix;
+
+ func (stream, "{");
+ if (stride > 1)
+ for (ix = 0; ix != n; ix++)
+ func (stream, "%sd%d", ix ? "," : "", rd + ix * stride);
+ else if (n == 1)
+ func (stream, "d%d", rd);
+ else
+ func (stream, "d%d-d%d", rd, rd + n - 1);
+ func (stream, "}, [%s", arm_regnames[rn]);
+ if (align)
+ func (stream, ", :%d", 32 << align);
+ func (stream, "]");
+ if (rm == 0xd)
+ func (stream, "!");
+ else if (rm != 0xf)
+ func (stream, ", %s", arm_regnames[rm]);
+ }
+ break;
+
+ case 'B':
+ {
+ int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
+ int rn = ((given >> 16) & 0xf);
+ int rm = ((given >> 0) & 0xf);
+ int idx_align = ((given >> 4) & 0xf);
+ int align = 0;
+ int size = ((given >> 10) & 0x3);
+ int idx = idx_align >> (size + 1);
+ int length = ((given >> 8) & 3) + 1;
+ int stride = 1;
+ int i;
+
+ if (length > 1 && size > 0)
+ stride = (idx_align & (1 << size)) ? 2 : 1;
+
+ switch (length)
+ {
+ case 1:
+ {
+ int amask = (1 << size) - 1;
+ if ((idx_align & (1 << size)) != 0)
+ return FALSE;
+ if (size > 0)
+ {
+ if ((idx_align & amask) == amask)
+ align = 8 << size;
+ else if ((idx_align & amask) != 0)
+ return FALSE;
+ }
+ }
+ break;
+
+ case 2:
+ if (size == 2 && (idx_align & 2) != 0)
+ return FALSE;
+ align = (idx_align & 1) ? 16 << size : 0;
+ break;
+
+ case 3:
+ if ((size == 2 && (idx_align & 3) != 0)
+ || (idx_align & 1) != 0)
+ return FALSE;
+ break;
+
+ case 4:
+ if (size == 2)
+ {
+ if ((idx_align & 3) == 3)
+ return FALSE;
+ align = (idx_align & 3) * 64;
+ }
+ else
+ align = (idx_align & 1) ? 32 << size : 0;
+ break;
+
+ default:
+ abort ();
+ }
+
+ func (stream, "{");
+ for (i = 0; i < length; i++)
+ func (stream, "%sd%d[%d]", (i == 0) ? "" : ",",
+ rd + i * stride, idx);
+ func (stream, "}, [%s", arm_regnames[rn]);
+ if (align)
+ func (stream, ", :%d", align);
+ func (stream, "]");
+ if (rm == 0xd)
+ func (stream, "!");
+ else if (rm != 0xf)
+ func (stream, ", %s", arm_regnames[rm]);
+ }
+ break;
+
+ case 'C':
+ {
+ int rd = ((given >> 12) & 0xf) | (((given >> 22) & 1) << 4);
+ int rn = ((given >> 16) & 0xf);
+ int rm = ((given >> 0) & 0xf);
+ int align = ((given >> 4) & 0x1);
+ int size = ((given >> 6) & 0x3);
+ int type = ((given >> 8) & 0x3);
+ int n = type + 1;
+ int stride = ((given >> 5) & 0x1);
+ int ix;
+
+ if (stride && (n == 1))
+ n++;
+ else
+ stride++;
+
+ func (stream, "{");
+ if (stride > 1)
+ for (ix = 0; ix != n; ix++)
+ func (stream, "%sd%d[]", ix ? "," : "", rd + ix * stride);
+ else if (n == 1)
+ func (stream, "d%d[]", rd);
+ else
+ func (stream, "d%d[]-d%d[]", rd, rd + n - 1);
+ func (stream, "}, [%s", arm_regnames[rn]);
+ if (align)
+ {
+ int align = (8 * (type + 1)) << size;
+ if (type == 3)
+ align = (size > 1) ? align >> 1 : align;
+ if (type == 2 || (type == 0 && !size))
+ func (stream, ", :<bad align %d>", align);
+ else
+ func (stream, ", :%d", align);
+ }
+ func (stream, "]");
+ if (rm == 0xd)
+ func (stream, "!");
+ else if (rm != 0xf)
+ func (stream, ", %s", arm_regnames[rm]);
+ }
+ break;
+
+ case 'D':
+ {
+ int raw_reg = (given & 0xf) | ((given >> 1) & 0x10);
+ int size = (given >> 20) & 3;
+ int reg = raw_reg & ((4 << size) - 1);
+ int ix = raw_reg >> size >> 2;
+
+ func (stream, "d%d[%d]", reg, ix);
+ }
+ break;
+
+ case 'E':
+ /* Neon encoded constant for mov, mvn, vorr, vbic */
+ {
+ int bits = 0;
+ int cmode = (given >> 8) & 0xf;
+ int op = (given >> 5) & 0x1;
+ unsigned long value = 0, hival = 0;
+ unsigned shift;
+ int size = 0;
+ int isfloat = 0;
+
+ bits |= ((given >> 24) & 1) << 7;
+ bits |= ((given >> 16) & 7) << 4;
+ bits |= ((given >> 0) & 15) << 0;
+
+ if (cmode < 8)
+ {
+ shift = (cmode >> 1) & 3;
+ value = (unsigned long)bits << (8 * shift);
+ size = 32;
+ }
+ else if (cmode < 12)
+ {
+ shift = (cmode >> 1) & 1;
+ value = (unsigned long)bits << (8 * shift);
+ size = 16;
+ }
+ else if (cmode < 14)
+ {
+ shift = (cmode & 1) + 1;
+ value = (unsigned long)bits << (8 * shift);
+ value |= (1ul << (8 * shift)) - 1;
+ size = 32;
+ }
+ else if (cmode == 14)
+ {
+ if (op)
+ {
+ /* bit replication into bytes */
+ int ix;
+ unsigned long mask;
+
+ value = 0;
+ hival = 0;
+ for (ix = 7; ix >= 0; ix--)
+ {
+ mask = ((bits >> ix) & 1) ? 0xff : 0;
+ if (ix <= 3)
+ value = (value << 8) | mask;
+ else
+ hival = (hival << 8) | mask;
+ }
+ size = 64;
+ }
+ else
+ {
+ /* byte replication */
+ value = (unsigned long)bits;
+ size = 8;
+ }
+ }
+ else if (!op)
+ {
+ /* floating point encoding */
+ int tmp;
+
+ value = (unsigned long)(bits & 0x7f) << 19;
+ value |= (unsigned long)(bits & 0x80) << 24;
+ tmp = bits & 0x40 ? 0x3c : 0x40;
+ value |= (unsigned long)tmp << 24;
+ size = 32;
+ isfloat = 1;
+ }
+ else
+ {
+ func (stream, "<illegal constant %.8x:%x:%x>",
+ bits, cmode, op);
+ size = 32;
+ break;
+ }
+ switch (size)
+ {
+ case 8:
+ func (stream, "#%ld\t; 0x%.2lx", value, value);
+ break;
+
+ case 16:
+ func (stream, "#%ld\t; 0x%.4lx", value, value);
+ break;
+
+ case 32:
+ if (isfloat)
+ {
+ unsigned char valbytes[4];
+ double fvalue;
+
+ /* Do this a byte at a time so we don't have to
+ worry about the host's endianness. */
+ valbytes[0] = value & 0xff;
+ valbytes[1] = (value >> 8) & 0xff;
+ valbytes[2] = (value >> 16) & 0xff;
+ valbytes[3] = (value >> 24) & 0xff;
+
+ floatformat_to_double
+ (&floatformat_ieee_single_little, valbytes,
+ &fvalue);
+
+ func (stream, "#%.7g\t; 0x%.8lx", fvalue,
+ value);
+ }
+ else
+ func (stream, "#%ld\t; 0x%.8lx",
+ (long) ((value & 0x80000000)
+ ? value | ~0xffffffffl : value), value);
+ break;
+
+ case 64:
+ func (stream, "#0x%.8lx%.8lx", hival, value);
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ break;
+
+ case 'F':
+ {
+ int regno = ((given >> 16) & 0xf) | ((given >> (7 - 4)) & 0x10);
+ int num = (given >> 8) & 0x3;
+
+ if (!num)
+ func (stream, "{d%d}", regno);
+ else if (num + regno >= 32)
+ func (stream, "{d%d-<overflow reg d%d}", regno, regno + num);
+ else
+ func (stream, "{d%d-d%d}", regno, regno + num);
+ }
+ break;
+
+
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ int width;
+ unsigned long value;
+
+ c = arm_decode_bitfield (c, given, &value, &width);
+
+ switch (*c)
+ {
+ case 'r':
+ func (stream, "%s", arm_regnames[value]);
+ break;
+ case 'd':
+ func (stream, "%ld", value);
+ break;
+ case 'e':
+ func (stream, "%ld", (1ul << width) - value);
+ break;
+
+ case 'S':
+ case 'T':
+ case 'U':
+ /* various width encodings */
+ {
+ int base = 8 << (*c - 'S'); /* 8,16 or 32 */
+ int limit;
+ unsigned low, high;
+
+ c++;
+ if (*c >= '0' && *c <= '9')
+ limit = *c - '0';
+ else if (*c >= 'a' && *c <= 'f')
+ limit = *c - 'a' + 10;
+ else
+ abort ();
+ low = limit >> 2;
+ high = limit & 3;
+
+ if (value < low || value > high)
+ func (stream, "<illegal width %d>", base << value);
+ else
+ func (stream, "%d", base << value);
+ }
+ break;
+ case 'R':
+ if (given & (1 << 6))
+ goto Q;
+ /* FALLTHROUGH */
+ case 'D':
+ func (stream, "d%ld", value);
+ break;
+ case 'Q':
+ Q:
+ if (value & 1)
+ func (stream, "<illegal reg q%ld.5>", value >> 1);
+ else
+ func (stream, "q%ld", value >> 1);
+ break;
+
+ case '`':
+ c++;
+ if (value == 0)
+ func (stream, "%c", *c);
+ break;
+ case '\'':
+ c++;
+ if (value == ((1ul << width) - 1))
+ func (stream, "%c", *c);
+ break;
+ case '?':
+ func (stream, "%c", c[(1 << width) - (int)value]);
+ c += 1 << width;
+ break;
+ default:
+ abort ();
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ }
+ else
+ func (stream, "%c", *c);
+ }
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
/* Print one ARM instruction from PC on INFO->STREAM. */
static void
@@ -1721,7 +2669,10 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
void *stream = info->stream;
fprintf_ftype func = info->fprintf_func;
- if (print_insn_coprocessor (info, given, FALSE))
+ if (print_insn_coprocessor (pc, info, given, FALSE))
+ return;
+
+ if (print_insn_neon (info, given, FALSE))
return;
for (insn = arm_opcodes; insn->assembler; insn++)
@@ -1835,8 +2786,9 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
break;
case 'c':
- func (stream, "%s",
- arm_conditional [(given >> 28) & 0xf]);
+ if (((given >> 28) & 0xf) != 0xe)
+ func (stream, "%s",
+ arm_conditional [(given >> 28) & 0xf]);
break;
case 'm':
@@ -1857,6 +2809,10 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
}
break;
+ case 'q':
+ arm_decode_shift (given, func, stream, 0);
+ break;
+
case 'o':
if ((given & 0x02000000) != 0)
{
@@ -1867,7 +2823,7 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
func (stream, "#%d\t; 0x%x", immed, immed);
}
else
- arm_decode_shift (given, func, stream);
+ arm_decode_shift (given, func, stream, 1);
break;
case 'p':
@@ -1964,102 +2920,51 @@ print_insn_arm (bfd_vma pc, struct disassemble_info *info, long given)
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
- int bitstart = *c++ - '0';
- int bitend = 0;
- while (*c >= '0' && *c <= '9')
- bitstart = (bitstart * 10) + *c++ - '0';
+ int width;
+ unsigned long value;
+ c = arm_decode_bitfield (c, given, &value, &width);
+
switch (*c)
{
- case '-':
- c++;
-
- while (*c >= '0' && *c <= '9')
- bitend = (bitend * 10) + *c++ - '0';
-
- if (!bitend)
- abort ();
-
- switch (*c)
- {
- case 'r':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%s", arm_regnames[reg]);
- }
- break;
- case 'd':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%ld", reg);
- }
- break;
- case 'W':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%ld", reg + 1);
- }
- break;
- case 'x':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "0x%08lx", reg);
-
- /* Some SWI instructions have special
- meanings. */
- if ((given & 0x0fffffff) == 0x0FF00000)
- func (stream, "\t; IMB");
- else if ((given & 0x0fffffff) == 0x0FF00001)
- func (stream, "\t; IMBRange");
- }
- break;
- case 'X':
- {
- long reg;
-
- reg = given >> bitstart;
- reg &= (2 << (bitend - bitstart)) - 1;
-
- func (stream, "%01lx", reg & 0xf);
- }
- break;
- default:
- abort ();
- }
+ case 'r':
+ func (stream, "%s", arm_regnames[value]);
+ break;
+ case 'd':
+ func (stream, "%ld", value);
+ break;
+ case 'b':
+ func (stream, "%ld", value * 8);
+ break;
+ case 'W':
+ func (stream, "%ld", value + 1);
+ break;
+ case 'x':
+ func (stream, "0x%08lx", value);
+
+ /* Some SWI instructions have special
+ meanings. */
+ if ((given & 0x0fffffff) == 0x0FF00000)
+ func (stream, "\t; IMB");
+ else if ((given & 0x0fffffff) == 0x0FF00001)
+ func (stream, "\t; IMBRange");
+ break;
+ case 'X':
+ func (stream, "%01lx", value & 0xf);
break;
-
case '`':
c++;
- if ((given & (1 << bitstart)) == 0)
+ if (value == 0)
func (stream, "%c", *c);
break;
case '\'':
c++;
- if ((given & (1 << bitstart)) != 0)
+ if (value == ((1ul << width) - 1))
func (stream, "%c", *c);
break;
case '?':
- ++c;
- if ((given & (1 << bitstart)) != 0)
- func (stream, "%c", *c++);
- else
- func (stream, "%c", *++c);
+ func (stream, "%c", c[(1 << width) - (int)value]);
+ c += 1 << width;
break;
default:
abort ();
@@ -2145,6 +3050,40 @@ print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
func (stream, "%%");
break;
+ case 'c':
+ if (ifthen_state)
+ func (stream, "%s", arm_conditional[IFTHEN_COND]);
+ break;
+
+ case 'C':
+ if (ifthen_state)
+ func (stream, "%s", arm_conditional[IFTHEN_COND]);
+ else
+ func (stream, "s");
+ break;
+
+ case 'I':
+ {
+ unsigned int tmp;
+
+ ifthen_next_state = given & 0xff;
+ for (tmp = given << 1; tmp & 0xf; tmp <<= 1)
+ func (stream, ((given ^ tmp) & 0x10) ? "e" : "t");
+ func (stream, "\t%s", arm_conditional[(given >> 4) & 0xf]);
+ }
+ break;
+
+ case 'x':
+ if (ifthen_next_state)
+ func (stream, "\t; unpredictable branch in IT block\n");
+ break;
+
+ case 'X':
+ if (ifthen_state)
+ func (stream, "\t; unpredictable <IT:%s>",
+ arm_conditional[IFTHEN_COND]);
+ break;
+
case 'S':
{
long reg;
@@ -2293,14 +3232,7 @@ print_insn_thumb16 (bfd_vma pc, struct disassemble_info *info, long given)
break;
case 'c':
- {
- /* Must print 0xE as 'al' to distinguish
- unconditional B from conditional BAL. */
- if (reg == 0xE)
- func (stream, "al");
- else
- func (stream, "%s", arm_conditional [reg]);
- }
+ func (stream, "%s", arm_conditional [reg]);
break;
default:
@@ -2373,7 +3305,10 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
void *stream = info->stream;
fprintf_ftype func = info->fprintf_func;
- if (print_insn_coprocessor (info, given, TRUE))
+ if (print_insn_coprocessor (pc, info, given, TRUE))
+ return;
+
+ if (print_insn_neon (info, given, TRUE))
return;
for (insn = thumb32_opcodes; insn->assembler; insn++)
@@ -2394,6 +3329,22 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
func (stream, "%%");
break;
+ case 'c':
+ if (ifthen_state)
+ func (stream, "%s", arm_conditional[IFTHEN_COND]);
+ break;
+
+ case 'x':
+ if (ifthen_next_state)
+ func (stream, "\t; unpredictable branch in IT block\n");
+ break;
+
+ case 'X':
+ if (ifthen_state)
+ func (stream, "\t; unpredictable <IT:%s>",
+ arm_conditional[IFTHEN_COND]);
+ break;
+
case 'I':
{
unsigned int imm12 = 0;
@@ -2752,54 +3703,36 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
{
- int bitstart = *c++ - '0';
- int bitend = 0;
- unsigned int val;
- while (*c >= '0' && *c <= '9')
- bitstart = (bitstart * 10) + *c++ - '0';
-
- if (*c == '-')
- {
- c++;
- while (*c >= '0' && *c <= '9')
- bitend = (bitend * 10) + *c++ - '0';
- if (!bitend)
- abort ();
-
- val = given >> bitstart;
- val &= (2 << (bitend - bitstart)) - 1;
- }
- else
- val = (given >> bitstart) & 1;
+ int width;
+ unsigned long val;
+ c = arm_decode_bitfield (c, given, &val, &width);
+
switch (*c)
{
- case 'd': func (stream, "%u", val); break;
- case 'W': func (stream, "%u", val * 4); break;
+ case 'd': func (stream, "%lu", val); break;
+ case 'W': func (stream, "%lu", val * 4); break;
case 'r': func (stream, "%s", arm_regnames[val]); break;
case 'c':
- if (val == 0xE)
- func (stream, "al");
- else
- func (stream, "%s", arm_conditional[val]);
+ func (stream, "%s", arm_conditional[val]);
break;
case '\'':
- if (val)
- func (stream, "%c", c[1]);
c++;
+ if (val == ((1ul << width) - 1))
+ func (stream, "%c", *c);
break;
case '`':
- if (!val)
- func (stream, "%c", c[1]);
c++;
+ if (val == 0)
+ func (stream, "%c", *c);
break;
case '?':
- func (stream, "%c", val ? c[1] : c[2]);
- c += 2;
+ func (stream, "%c", c[(1 << width) - (int)val]);
+ c += 1 << width;
break;
default:
@@ -2819,6 +3752,28 @@ print_insn_thumb32 (bfd_vma pc, struct disassemble_info *info, long given)
abort ();
}
+/* Print data bytes on INFO->STREAM. */
+
+static void
+print_insn_data (bfd_vma pc ATTRIBUTE_UNUSED, struct disassemble_info *info,
+ long given)
+{
+ switch (info->bytes_per_chunk)
+ {
+ case 1:
+ info->fprintf_func (info->stream, ".byte\t0x%02lx", given);
+ break;
+ case 2:
+ info->fprintf_func (info->stream, ".short\t0x%04lx", given);
+ break;
+ case 4:
+ info->fprintf_func (info->stream, ".word\t0x%08lx", given);
+ break;
+ default:
+ abort ();
+ }
+}
+
/* Disallow mapping symbols ($a, $b, $d, $t etc) from
being displayed in symbol relative addresses. */
@@ -2844,7 +3799,7 @@ parse_arm_disassembler_option (char *option)
if (option == NULL)
return;
- if (strneq (option, "reg-names-", 10))
+ if (CONST_STRNEQ (option, "reg-names-"))
{
int i;
@@ -2861,9 +3816,9 @@ parse_arm_disassembler_option (char *option)
/* XXX - should break 'option' at following delimiter. */
fprintf (stderr, _("Unrecognised register name set: %s\n"), option);
}
- else if (strneq (option, "force-thumb", 11))
+ else if (CONST_STRNEQ (option, "force-thumb"))
force_thumb = 1;
- else if (strneq (option, "no-force-thumb", 14))
+ else if (CONST_STRNEQ (option, "no-force-thumb"))
force_thumb = 0;
else
/* XXX - should break 'option' at following delimiter. */
@@ -2894,6 +3849,119 @@ parse_disassembler_options (char *options)
}
}
+/* Search back through the insn stream to determine if this instruction is
+ conditionally executed. */
+static void
+find_ifthen_state (bfd_vma pc, struct disassemble_info *info,
+ bfd_boolean little)
+{
+ unsigned char b[2];
+ unsigned int insn;
+ int status;
+ /* COUNT is twice the number of instructions seen. It will be odd if we
+ just crossed an instruction boundary. */
+ int count;
+ int it_count;
+ unsigned int seen_it;
+ bfd_vma addr;
+
+ ifthen_address = pc;
+ ifthen_state = 0;
+
+ addr = pc;
+ count = 1;
+ it_count = 0;
+ seen_it = 0;
+ /* Scan backwards looking for IT instructions, keeping track of where
+ instruction boundaries are. We don't know if something is actually an
+ IT instruction until we find a definite instruction boundary. */
+ for (;;)
+ {
+ if (addr == 0 || info->symbol_at_address_func(addr, info))
+ {
+ /* A symbol must be on an instruction boundary, and will not
+ be within an IT block. */
+ if (seen_it && (count & 1))
+ break;
+
+ return;
+ }
+ addr -= 2;
+ status = info->read_memory_func (addr, (bfd_byte *)b, 2, info);
+ if (status)
+ return;
+
+ if (little)
+ insn = (b[0]) | (b[1] << 8);
+ else
+ insn = (b[1]) | (b[0] << 8);
+ if (seen_it)
+ {
+ if ((insn & 0xf800) < 0xe800)
+ {
+ /* Addr + 2 is an instruction boundary. See if this matches
+ the expected boundary based on the position of the last
+ IT candidate. */
+ if (count & 1)
+ break;
+ seen_it = 0;
+ }
+ }
+ if ((insn & 0xff00) == 0xbf00 && (insn & 0xf) != 0)
+ {
+ /* This could be an IT instruction. */
+ seen_it = insn;
+ it_count = count >> 1;
+ }
+ if ((insn & 0xf800) >= 0xe800)
+ count++;
+ else
+ count = (count + 2) | 1;
+ /* IT blocks contain at most 4 instructions. */
+ if (count >= 8 && !seen_it)
+ return;
+ }
+ /* We found an IT instruction. */
+ ifthen_state = (seen_it & 0xe0) | ((seen_it << it_count) & 0x1f);
+ if ((ifthen_state & 0xf) == 0)
+ ifthen_state = 0;
+}
+
+/* Try to infer the code type (Arm or Thumb) from a symbol.
+ Returns nonzero if *MAP_TYPE was set. */
+
+static int
+get_sym_code_type (struct disassemble_info *info, int n,
+ enum map_type *map_type)
+{
+ elf_symbol_type *es;
+ unsigned int type;
+ const char *name;
+
+ es = *(elf_symbol_type **)(info->symtab + n);
+ type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
+
+ /* If the symbol has function type then use that. */
+ if (type == STT_FUNC || type == STT_ARM_TFUNC)
+ {
+ *map_type = (type == STT_ARM_TFUNC) ? MAP_THUMB : MAP_ARM;
+ return TRUE;
+ }
+
+ /* Check for mapping symbols. */
+ name = bfd_asymbol_name(info->symtab[n]);
+ if (name[0] == '$' && (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
+ && (name[2] == 0 || name[2] == '.'))
+ {
+ *map_type = ((name[1] == 'a') ? MAP_ARM
+ : (name[1] == 't') ? MAP_THUMB
+ : MAP_DATA);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
/* NOTE: There are no checks in these routines that
the relevant number of data bytes exist. */
@@ -2903,9 +3971,11 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
unsigned char b[4];
long given;
int status;
- int is_thumb;
- int size;
+ int is_thumb = FALSE;
+ int is_data = FALSE;
+ unsigned int size = 4;
void (*printer) (bfd_vma, struct disassemble_info *, long);
+ bfd_boolean found = FALSE;
if (info->disassembler_options)
{
@@ -2915,9 +3985,91 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
info->disassembler_options = NULL;
}
- is_thumb = force_thumb;
+ /* First check the full symtab for a mapping symbol, even if there
+ are no usable non-mapping symbols for this address. */
+ if (info->symtab != NULL
+ && bfd_asymbol_flavour (*info->symtab) == bfd_target_elf_flavour)
+ {
+ bfd_vma addr;
+ int n;
+ int last_sym = -1;
+ enum map_type type = MAP_ARM;
+
+ if (pc <= last_mapping_addr)
+ last_mapping_sym = -1;
+ is_thumb = (last_type == MAP_THUMB);
+ found = FALSE;
+ /* Start scanning at the start of the function, or wherever
+ we finished last time. */
+ n = info->symtab_pos + 1;
+ if (n < last_mapping_sym)
+ n = last_mapping_sym;
+
+ /* Scan up to the location being disassembled. */
+ for (; n < info->symtab_size; n++)
+ {
+ addr = bfd_asymbol_value (info->symtab[n]);
+ if (addr > pc)
+ break;
+ if ((info->section == NULL
+ || info->section == info->symtab[n]->section)
+ && get_sym_code_type (info, n, &type))
+ {
+ last_sym = n;
+ found = TRUE;
+ }
+ }
+
+ if (!found)
+ {
+ n = info->symtab_pos;
+ if (n < last_mapping_sym - 1)
+ n = last_mapping_sym - 1;
+
+ /* No mapping symbol found at this address. Look backwards
+ for a preceeding one. */
+ for (; n >= 0; n--)
+ {
+ if (get_sym_code_type (info, n, &type))
+ {
+ last_sym = n;
+ found = TRUE;
+ break;
+ }
+ }
+ }
+
+ last_mapping_sym = last_sym;
+ last_type = type;
+ is_thumb = (last_type == MAP_THUMB);
+ is_data = (last_type == MAP_DATA);
- if (!is_thumb && info->symbols != NULL)
+ /* Look a little bit ahead to see if we should print out
+ two or four bytes of data. If there's a symbol,
+ mapping or otherwise, after two bytes then don't
+ print more. */
+ if (is_data)
+ {
+ size = 4 - (pc & 3);
+ for (n = last_sym + 1; n < info->symtab_size; n++)
+ {
+ addr = bfd_asymbol_value (info->symtab[n]);
+ if (addr > pc)
+ {
+ if (addr - pc < size)
+ size = addr - pc;
+ break;
+ }
+ }
+ /* If the next symbol is after three bytes, we need to
+ print only part of the data, so that we can use either
+ .byte or .short. */
+ if (size == 3)
+ size = (pc & 1) ? 1 : 2;
+ }
+ }
+
+ if (info->symbols != NULL)
{
if (bfd_asymbol_flavour (*info->symbols) == bfd_target_coff_flavour)
{
@@ -2930,8 +4082,11 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
|| cs->native->u.syment.n_sclass == C_THUMBEXTFUNC
|| cs->native->u.syment.n_sclass == C_THUMBSTATFUNC);
}
- else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour)
+ else if (bfd_asymbol_flavour (*info->symbols) == bfd_target_elf_flavour
+ && !found)
{
+ /* If no mapping symbol has been found then fall back to the type
+ of the function symbol. */
elf_symbol_type * es;
unsigned int type;
@@ -2942,10 +4097,30 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
}
}
- info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
+ if (force_thumb)
+ is_thumb = TRUE;
+
+ info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
info->bytes_per_line = 4;
- if (!is_thumb)
+ if (is_data)
+ {
+ int i;
+
+ /* size was already set above. */
+ info->bytes_per_chunk = size;
+ printer = print_insn_data;
+
+ status = info->read_memory_func (pc, (bfd_byte *)b, size, info);
+ given = 0;
+ if (little)
+ for (i = size - 1; i >= 0; i--)
+ given = b[i] | (given << 8);
+ else
+ for (i = 0; i < (int) size; i++)
+ given = b[i] | (given << 8);
+ }
+ else if (!is_thumb)
{
/* In ARM mode endianness is a straightforward issue: the instruction
is four bytes long and is either ordered 0123 or 3210. */
@@ -2993,6 +4168,18 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
size = 4;
}
}
+
+ if (ifthen_address != pc)
+ find_ifthen_state(pc, info, little);
+
+ if (ifthen_state)
+ {
+ if ((ifthen_state & 0xf) == 0x8)
+ ifthen_next_state = 0;
+ else
+ ifthen_next_state = (ifthen_state & 0xe0)
+ | ((ifthen_state & 0xf) << 1);
+ }
}
if (status)
@@ -3009,6 +4196,12 @@ print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
pc = 0;
printer (pc, info, given);
+
+ if (is_thumb)
+ {
+ ifthen_state = ifthen_next_state;
+ ifthen_address += size;
+ }
return size;
}
diff --git a/contrib/binutils/opcodes/config.in b/contrib/binutils/opcodes/config.in
index 9d143c3..6dec095 100644
--- a/contrib/binutils/opcodes/config.in
+++ b/contrib/binutils/opcodes/config.in
@@ -1,102 +1,34 @@
/* config.in. Generated from configure.in by autoheader. */
-/* 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 to 1 if using `alloca.c'. */
-#undef C_ALLOCA
-
-/* Define to 1 if NLS is requested */
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
#undef ENABLE_NLS
-/* Define to 1 if you have `alloca', as a function or macro. */
-#undef HAVE_ALLOCA
-
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
-#undef HAVE_ALLOCA_H
-
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
-/* Define to 1 if you have the `dcgettext' function. */
-#undef HAVE_DCGETTEXT
-
/* Define to 1 if you have the declaration of `basename', and to 0 if you
don't. */
#undef HAVE_DECL_BASENAME
-/* Define to 1 if you have the `getcwd' function. */
-#undef HAVE_GETCWD
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
-/* Define to 1 if you have the <locale.h> header file. */
-#undef HAVE_LOCALE_H
-
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
-
-/* Define to 1 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
-
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
-
-/* Define to 1 if you have the `setlocale' function. */
-#undef HAVE_SETLOCALE
-
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@@ -106,17 +38,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if you have the <values.h> header file. */
-#undef HAVE_VALUES_H
-
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
-
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
-
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
@@ -136,31 +60,8 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* 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 to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to `__inline__' or `__inline' if that's what the C compiler
- calls it, or to nothing if 'inline' is not supported under any name. */
-#ifndef __cplusplus
-#undef inline
-#endif
-
-/* 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/opcodes/configure b/contrib/binutils/opcodes/configure
index b692e83..7b91e40 100755
--- a/contrib/binutils/opcodes/configure
+++ b/contrib/binutils/opcodes/configure
@@ -241,6 +241,155 @@ IFS=" $as_nl"
$as_unset CDPATH
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
@@ -309,7 +458,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LN_S LIBTOOL WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir CPP EGREP ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT USE_INCLUDED_LIBINTL CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB INCLUDE_LOCALE_H GT_NO GT_YES MKINSTALLDIRS l CC_FOR_BUILD EXEEXT_FOR_BUILD HDEFINES CGEN_MAINT_TRUE CGEN_MAINT_FALSE cgendir WIN32LDFLAGS WIN32LIBADD archdefs BFD_MACHINES LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE AR ac_ct_AR RANLIB ac_ct_RANLIB LIBTOOL SED EGREP FGREP GREP LD DUMPBIN ac_ct_DUMPBIN NM LN_S lt_ECHO CPP WARN_CFLAGS NO_WERROR MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT INSTALL_LIBBFD_TRUE INSTALL_LIBBFD_FALSE host_noncanonical target_noncanonical bfdlibdir bfdincludedir USE_NLS LIBINTL LIBINTL_DEP INCINTL XGETTEXT GMSGFMT POSUB CATALOGS DATADIRNAME INSTOBJEXT GENCAT CATOBJEXT MKINSTALLDIRS MSGFMT MSGMERGE CC_FOR_BUILD EXEEXT_FOR_BUILD HDEFINES CGEN_MAINT_TRUE CGEN_MAINT_FALSE cgendir WIN32LDFLAGS WIN32LIBADD archdefs BFD_MACHINES LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -852,14 +1001,17 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared=PKGS build shared libraries default=no
- --enable-static=PKGS build static libraries default=yes
- --enable-fast-install=PKGS optimize for fast installation default=yes
+ --enable-shared[=PKGS]
+ build shared libraries [default=no]
+ --enable-static[=PKGS]
+ build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-targets alternative target configurations
--enable-commonbfdlib build shared BFD/opcodes/libiberty library
- --enable-werror treat compile warnings as errors
- --enable-build-warnings Enable build-time compiler warnings
+ --enable-werror treat compile warnings as errors
+ --enable-build-warnings enable build-time compiler warnings
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--enable-install-libbfd controls installation of libbfd and related headers
@@ -869,9 +1021,9 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-gnu-ld assume the C compiler uses GNU ld default=no
- --with-pic try to use only PIC/non-PIC objects default=use both
- --with-included-gettext use the GNU gettext library included here
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
Some influential environment variables:
CC C compiler command
@@ -3243,70 +3395,262 @@ fi
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_shared=yes ;;
-no) enable_shared=no ;;
-*)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_shared=no
fi;
+
+
+
+
+
+
+
+
+
+
+macro_version='2.1a'
+macro_revision='1.2435'
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+# Set options
+
+enable_dlopen=no
+
+
+enable_win32_dll=no
+
+
+
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
enableval="$enable_static"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_static=yes ;;
-no) enable_static=no ;;
-*)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_static=yes
fi;
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+ withval="$with_pic"
+ pic_mode="$withval"
+else
+ pic_mode=default
+fi;
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
-case $enableval in
-yes) enable_fast_install=yes ;;
-no) enable_fast_install=no ;;
-*)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
else
enable_fast_install=yes
fi;
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+
+fi
+
+SED=$lt_cv_path_SED
+
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for fgrep" >&5
+echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
+if test "${ac_cv_prog_fgrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo 'ab*c' | (grep -F 'ab*c') >/dev/null 2>&1
+ then ac_cv_prog_fgrep='grep -F'
+ else ac_cv_prog_fgrep='fgrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_fgrep" >&5
+echo "${ECHO_T}$ac_cv_prog_fgrep" >&6
+ FGREP=$ac_cv_prog_fgrep
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -3317,8 +3661,8 @@ fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -3328,12 +3672,12 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
esac
case $ac_prog in
# Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
+ [\\/]* | ?:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
- while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
- ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -3357,22 +3701,26 @@ if test "${lt_cv_path_LD+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
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.
+ # but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
test "$with_gnu_ld" != no && break
- else
+ ;;
+ *)
test "$with_gnu_ld" != yes && break
- fi
+ ;;
+ esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$lt_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
@@ -3394,32 +3742,31 @@ echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${lt_cv_prog_gnu_ld+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
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
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
-else
+ ;;
+*)
lt_cv_prog_gnu_ld=no
-fi
+ ;;
+esac
fi
echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
with_gnu_ld=$lt_cv_prog_gnu_ld
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6
if test "${lt_cv_path_NM+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3427,35 +3774,173 @@ else
# Let the user override the test.
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
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- 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
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ 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
+ ;;
+ esac
+ ;;
+ esac
fi
- fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+echo "${ECHO_T}$DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$DUMPBIN" && break
done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+echo "${ECHO_T}$ac_ct_DUMPBIN" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-NM="$lt_cv_path_NM"
-echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
+ test -n "$ac_ct_DUMPBIN" && break
+done
+test -n "$ac_ct_DUMPBIN" || ac_ct_DUMPBIN=":"
+
+ DUMPBIN=$ac_ct_DUMPBIN
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6
+if test "${lt_cv_nm_interface+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:3929: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:3932: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:3935: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+echo "${ECHO_T}$lt_cv_nm_interface" >&6
echo "$as_me:$LINENO: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
@@ -3468,8 +3953,234 @@ else
echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo "$as_me:$LINENO: checking how to recognise dependant libraries" >&5
-echo $ECHO_N "checking how to recognise dependant libraries... $ECHO_C" >&6
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`getconf ARG_MAX 2> /dev/null`
+ if test -n $lt_cv_sys_max_cmd_len; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # 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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+echo "$as_me:$LINENO: result: $xsi_shell" >&5
+echo "${ECHO_T}$xsi_shell" >&6
+
+
+echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+echo "${ECHO_T}$lt_shell_append" >&6
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6
if test "${lt_cv_deplibs_check_method+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3482,13 +4193,13 @@ lt_cv_deplibs_check_method='unknown'
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
-# 'file_magic [regex]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given egrep regex.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
-aix*)
+aix4* | aix5*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -3496,39 +4207,42 @@ beos*)
lt_cv_deplibs_check_method=pass_all
;;
-bsdi4*)
+bsdi[45]*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin* | mingw* |pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
;;
darwin* | rhapsody*)
- # this will be overwritten by pass_all, but leave it in just in case
- 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
lt_cv_deplibs_check_method=pass_all
;;
-freebsd* | kfreebsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/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.*`
;;
@@ -3542,92 +4256,116 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*|hpux11*)
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
case $host_cpu in
- hppa*)
- 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
- ;;
ia64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
- esac
- ;;
-
-irix5* | irix6*)
- case $host_os in
- irix5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
- 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 (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
-linux-gnu*)
+linux* | k*bsd*-gnu)
lt_cv_deplibs_check_method=pass_all
;;
-netbsd* | knetbsd*-gnu)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
- lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
fi
;;
-newsos6)
+newos6*)
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
;;
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
-sco3.2v5*)
+rdos*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
;;
-sysv5uw[78]* | sysv4*uw2*)
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+sysv4 | sysv4.3*)
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*`
;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
@@ -3635,222 +4373,29 @@ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- cygwin* | mingw*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
- esac
-
-fi
-
-if test -n "$lt_cv_sys_max_cmd_len" ; then
- echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
-
-
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- egrep "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
-fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- else
- MAGIC_CMD=:
- fi
-fi
- fi
- ;;
-esac
if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
+if test "${ac_cv_prog_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -3859,7 +4404,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
@@ -3868,27 +4413,27 @@ done
fi
fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
@@ -3897,30 +4442,43 @@ do
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
+ ac_cv_prog_ac_ct_AR="ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+ test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
fi
fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- RANLIB=$ac_ct_RANLIB
+ AR=$ac_ct_AR
else
- RANLIB="$ac_cv_prog_RANLIB"
+ AR="$ac_cv_prog_AR"
fi
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
@@ -4001,1179 +4559,555 @@ else
STRIP="$ac_cv_prog_STRIP"
fi
+test -z "$STRIP" && STRIP=:
-# Check for any special flags to pass to ltconfig.
-libtool_flags="--cache-file=$cache_file"
-test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
-test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
-test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$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.
-if test "${enable_libtool_lock+set}" = set; then
- enableval="$enable_libtool_lock"
-fi;
-test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
-test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
- withval="$with_pic"
- pic_mode="$withval"
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- pic_mode=default
-fi;
-test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
-test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 4038 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- rm -rf conftest*
- ;;
+done
+done
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- case "`/usr/bin/file conftest.o`" in
- *32-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
-
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- lt_cv_cc_needs_belf=yes
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-lt_cv_cc_needs_belf=no
+ test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ RANLIB=$ac_ct_RANLIB
+else
+ RANLIB="$ac_cv_prog_RANLIB"
fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
+test -z "$RANLIB" && RANLIB=:
-esac
-# Save cache, so that ltconfig can load it
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems. If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
-_ACEOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote
- # substitution turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
- ;;
- esac;
-} |
- sed '
- t clear
- : clear
- s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
- t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
- cat confcache >$cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
-fi
-rm -f confcache
-# Actually configure libtool. ac_aux_dir is where install-sh is found.
-AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
-LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
-AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
-objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
-deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
-${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
-$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
-|| { { echo "$as_me:$LINENO: error: libtool configure failed" >&5
-echo "$as_me: error: libtool configure failed" >&2;}
- { (exit 1); exit 1; }; }
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
-# Reload cache, that may have been modified by ltconfig
-if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
- { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
- case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
- esac
- fi
-else
- { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-# Redirect the config.log output again, so that the ltconfig log is not
-# clobbered by the next message.
-exec 5>>./config.log
-
-# Check whether --enable-targets or --disable-targets was given.
-if test "${enable_targets+set}" = set; then
- enableval="$enable_targets"
- case "${enableval}" in
- yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
-echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- no) enable_targets= ;;
- *) enable_targets=$enableval ;;
-esac
-fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
-if test "${enable_commonbfdlib+set}" = set; then
- enableval="$enable_commonbfdlib"
- case "${enableval}" in
- yes) commonbfdlib=true ;;
- no) commonbfdlib=false ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for opcodes commonbfdlib option" >&5
-echo "$as_me: error: bad value ${enableval} for opcodes commonbfdlib option" >&2;}
- { (exit 1); exit 1; }; } ;;
-esac
-fi;
-GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
-# Check whether --enable-werror or --disable-werror was given.
-if test "${enable_werror+set}" = set; then
- enableval="$enable_werror"
- case "${enableval}" in
- yes | y) ERROR_ON_WARNING="yes" ;;
- no | n) ERROR_ON_WARNING="no" ;;
- *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
-echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
-fi;
-# Enable -Werror by default when using gcc
-if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
- ERROR_ON_WARNING=yes
-fi
-NO_WERROR=
-if test "${ERROR_ON_WARNING}" = yes ; then
- GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
- NO_WERROR="-Wno-error"
-fi
-if test "${GCC}" = yes ; then
- WARN_CFLAGS="${GCC_WARN_CFLAGS}"
-fi
-# Check whether --enable-build-warnings or --disable-build-warnings was given.
-if test "${enable_build_warnings+set}" = set; then
- enableval="$enable_build_warnings"
- case "${enableval}" in
- yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
- no) if test "${GCC}" = yes ; then
- WARN_CFLAGS="-w"
- fi;;
- ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
- *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
- WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
- *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
-esac
-fi;
-if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
- echo "Setting warning flags = $WARN_CFLAGS" 6>&1
-fi
- ac_config_headers="$ac_config_headers config.h:config.in"
-if test -z "$target" ; then
- { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
-echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
- { (exit 1); exit 1; }; }
-fi
-echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
-echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
- # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then
- enableval="$enable_maintainer_mode"
- USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi;
- echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
-echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
-if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
- MAINT=$MAINTAINER_MODE_TRUE
- case ${build_alias} in
- "") build_noncanonical=${build} ;;
- *) build_noncanonical=${build_alias} ;;
-esac
- case ${host_alias} in
- "") host_noncanonical=${build_noncanonical} ;;
- *) host_noncanonical=${host_alias} ;;
-esac
- case ${target_alias} in
- "") target_noncanonical=${host_noncanonical} ;;
- *) target_noncanonical=${target_alias} ;;
-esac
-echo "$as_me:$LINENO: checking whether to install libbfd" >&5
-echo $ECHO_N "checking whether to install libbfd... $ECHO_C" >&6
- # Check whether --enable-install-libbfd or --disable-install-libbfd was given.
-if test "${enable_install_libbfd+set}" = set; then
- enableval="$enable_install_libbfd"
- install_libbfd_p=$enableval
-else
- if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
- install_libbfd_p=yes
- else
- install_libbfd_p=no
- fi
-fi;
- echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
-echo "${ECHO_T}$install_libbfd_p" >&6
-if test $install_libbfd_p = yes; then
- INSTALL_LIBBFD_TRUE=
- INSTALL_LIBBFD_FALSE='#'
-else
- INSTALL_LIBBFD_TRUE='#'
- INSTALL_LIBBFD_FALSE=
-fi
- # Need _noncanonical variables for this.
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+# Allow CC to be a program name with arguments.
+compiler=$CC
- # libbfd.a is a host library containing target dependent code
- bfdlibdir='$(libdir)'
- bfdincludedir='$(includedir)'
- if test "${host}" != "${target}"; then
- bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
- bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
- fi
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
-# host-specific stuff:
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="gcc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
fi
-done
-done
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
+ # Check to see that the pipe works correctly.
+ pipe_works=no
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="${ac_tool_prefix}cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
+ cat <<_LT_EOF >> conftest.$ac_ext
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
-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 $# != 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
- ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+ rm -f conftest* conftst*
-fi
-if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
- do
- # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
fi
done
-done
fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- test -n "$CC" && break
- done
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
fi
-if test -z "$CC"; then
- ac_ct_CC=$CC
- for ac_prog in cl
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6
else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6
fi
- test -n "$ac_ct_CC" && break
-done
- CC=$ac_ct_CC
-fi
-fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
-See \`config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
-# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
-if test "${ac_cv_c_compiler_gnu+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_compiler_gnu=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_g+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-int
-main ()
-{
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_g=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_prog_cc_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
-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 "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
- function prototypes and stuff, but not '\xHH' hex character constants.
- These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
- proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
- array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
- ;
- return 0;
-}
-_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-fi
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval="$enable_libtool_lock"
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
+fi;
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 4990 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_declaration
+
int
main ()
{
-exit (42);
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -5187,120 +5121,57 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
+ lt_cv_cc_needs_belf=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+lt_cv_cc_needs_belf=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_ext=c
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl fi vi ga zh_CN"
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$RANLIB"; then
- ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
fi
-if test -z "$ac_cv_prog_RANLIB"; then
- ac_ct_RANLIB=$RANLIB
- # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_RANLIB"; then
- ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_RANLIB="ranlib"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
fi
-done
-done
-
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
-fi
-fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *) LD="${LD-ld} -64" ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
- RANLIB=$ac_ct_RANLIB
-else
- RANLIB="$ac_cv_prog_RANLIB"
-fi
+need_locks="$enable_libtool_lock"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -5537,21 +5408,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
- fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
-
-
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
@@ -5718,132 +5574,34 @@ _ACEOF
fi
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
-int
-main ()
-{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_const=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_c_const=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
-fi
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#ifndef __cplusplus
-typedef int foo_t;
-static $ac_kw foo_t static_foo () {return 0; }
-$ac_kw foo_t foo () {return 0; }
-#endif
+$ac_includes_default
+#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5867,47 +5625,29 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
+ eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
-
-
-case $ac_cv_c_inline in
- inline | yes) ;;
- *)
- case $ac_cv_c_inline in
- no) ac_val=;;
- *) ac_val=$ac_cv_c_inline;;
- esac
- cat >>confdefs.h <<_ACEOF
-#ifndef __cplusplus
-#define inline $ac_val
-#endif
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- ;;
-esac
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
-
-
-
+fi
+done
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+for ac_header in dlfcn.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -5968,98 +5708,1364 @@ fi
done
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
- return 0;
- ;
- return 0;
-}
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+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
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
-ac_cv_type_off_t=no
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
fi
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6090: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6094: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case $cc_basename in
+ xlc*)
+ lt_prog_compiler_pic='-qnocommon'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ esac
+ ;;
+
+ mingw* | cygwin* | pw32* | 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).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6412: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6416: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
+
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_prog_compiler_static_works=yes
+ fi
+ else
+ lt_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6517: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:6521: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6572: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:6576: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ 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 <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ *)
+ tmp_sharedflag='-shared' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ 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'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ 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'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # 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 | $GREP '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
+ aix_use_runtimelinking=no
+
+ # 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 runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # 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.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$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
+ :
+ 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'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ 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
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+
int
main ()
{
-if ((size_t *) 0)
- return 0;
-if (sizeof (size_t))
- return 0;
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -6073,51 +7079,55 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type_size_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
- :
else
-
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
-_ACEOF
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; 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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <alloca.h>
+
int
main ()
{
-char *p = (char *) alloca (2 * sizeof (int));
+
;
return 0;
}
@@ -6144,65 +7154,277 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_working_alloca_h=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
-_ACEOF
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ 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)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ fi
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
-fi
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
+ darwin* | rhapsody*)
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[012])
+ allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ ;;
+ esac
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ if test "$GCC" = yes ; then
+ if test "${lt_cv_apple_cc_single_mod+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#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
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi-module to the
+ # link flags.
+ echo "int foo(void){return 1;}" > conftest.c
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib ${wl}-single_module conftest.c
+ if test -f libconftest.dylib; then
+ lt_cv_apple_cc_single_mod=yes
+ rm libconftest.dylib
+ fi
+ rm conftest.$ac_ext
+ fi
+fi
-int
-main ()
-{
-char *p = (char *) alloca (1);
- ;
- return 0;
-}
+ output_verbose_link_cmd=echo
+ if test "X$lt_cv_apple_cc_single_mod" = Xyes ; then
+ archive_cmds='$CC -dynamiclib $single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $single_module -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ module_expsym_cmds='sed -e "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case $cc_basename in
+ xlc*)
+ output_verbose_link_cmd=echo
+ archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`$ECHO $rpath/$soname` $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
+ archive_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed "s,^,_," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ 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'
+ else
+ 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'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -6226,122 +7448,933 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_alloca_works=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
-if test $ac_cv_func_alloca_works = yes; then
+ netbsd*)
+ 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
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
-_ACEOF
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
-else
- # 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.
+ *nto* | *qnx*)
+ ;;
-ALLOCA=alloca.$ac_objext
+ openbsd*)
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
-cat >>confdefs.h <<\_ACEOF
-#define C_ALLOCA 1
-_ACEOF
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$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 "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
-else
- ac_cv_os_cray=no
-fi
-rm -f conftest*
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
-fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${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}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ 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'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+withGCC=$GCC
+if test "$withGCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ 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.
+ 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
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # 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.
+ 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}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ if test "$host_cpu" = m68k; then
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ else
+ dynamic_linker=no
+ fi
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $withGCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
int
main ()
{
-return f != $ac_func;
+
;
return 0;
}
@@ -6368,126 +8401,425 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir"; then
+ shlibpath_overrides_runpath=yes
+fi
+
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
-_ACEOF
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
- break
-fi
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
- done
-fi
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-int
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
else
- return (&dummy > addr) ? 1 : -1;
-}
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
-int
-main ()
-{
- exit (find_stack_direction () < 0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
-( exit $ac_status )
-ac_cv_c_stack_direction=-1
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
fi
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-_ACEOF
-fi
-for ac_header in stdlib.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -6501,122 +8833,41 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_dl_dlopen=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
+ ;;
-for ac_func in getpagesize
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+ *)
+ echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6625,12 +8876,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+#define shl_load innocuous_shl_load
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
+ which can conflict with char shl_load (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -6640,7 +8891,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef $ac_func
+#undef shl_load
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -6649,14 +8900,14 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
+char shl_load ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_shl_load) || defined (__stub___shl_load)
choke me
#else
-char (*f) () = $ac_func;
+char (*f) () = shl_load;
#endif
#ifdef __cplusplus
}
@@ -6665,7 +8916,7 @@ char (*f) () = $ac_func;
int
main ()
{
-return f != $ac_func;
+return f != shl_load;
;
return 0;
}
@@ -6692,239 +8943,53 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_func_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_shl_load=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-echo "$as_me:$LINENO: checking for working mmap" >&5
-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !STDC_HEADERS && !HAVE_STDLIB_H
-char *malloc ();
-#endif
-
-/* This mess was copied from the GNU getpagesize.h. */
-#if !HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h. */
-# if !HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
int
main ()
{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize ();
-
- /* First, make a file with some known garbage in it. */
- data = (char *) malloc (pagesize);
- if (!data)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- exit (1);
- if (write (fd, data, pagesize) != pagesize)
- exit (1);
- close (fd);
-
- /* Next, try to mmap the file at a fixed address which already has
- something else allocated at it. If we can, also make sure that
- we see the same garbage. */
- fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- exit (1);
- data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- exit (1);
- data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit (1);
-
- /* Finally, make sure that changes to the mapped area do not
- percolate back to the file as seen by read(). (This is a bug on
- some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- exit (1);
- if (read (fd, data3, pagesize) != pagesize)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit (1);
- close (fd);
- exit (0);
+shl_load ();
+ ;
+ return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
-_ACEOF
-
-fi
-rm -f conftest.mmap
-
-
-
-
-
-
-
-
-
-
-
-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h string.h \
-unistd.h values.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -6938,132 +9003,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dld_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_dld_shl_load=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
else
- eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
-__argz_count __argz_stringify __argz_next
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7072,12 +9036,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
+#define dlopen innocuous_dlopen
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
+ which can conflict with char dlopen (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -7087,7 +9051,7 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef $ac_func
+#undef dlopen
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -7096,14 +9060,14 @@ extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
+char dlopen ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined (__stub_dlopen) || defined (__stub___dlopen)
choke me
#else
-char (*f) () = $ac_func;
+char (*f) () = dlopen;
#endif
#ifdef __cplusplus
}
@@ -7112,7 +9076,7 @@ char (*f) () = $ac_func;
int
main ()
{
-return f != $ac_func;
+return f != dlopen;
;
return 0;
}
@@ -7139,84 +9103,46 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_func_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_func_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
- if test "${ac_cv_func_stpcpy+set}" != "set"; then
-
-for ac_func in stpcpy
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
-{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+char dlopen ();
int
main ()
{
-return f != $ac_func;
+dlopen ();
;
return 0;
}
@@ -7243,52 +9169,47 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- fi
- if test "${ac_cv_func_stpcpy}" = "yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_STPCPY 1
-_ACEOF
-
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <locale.h>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
int
main ()
{
-return LC_MESSAGES
+dlopen ();
;
return 0;
}
@@ -7315,85 +9236,54 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
+ ac_cv_lib_svld_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-am_cv_val_LC_MESSAGES=no
+ac_cv_lib_svld_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
-
- fi
- fi
- echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
- USE_NLS=yes
-fi;
- echo "$as_me:$LINENO: result: $USE_NLS" >&5
-echo "${ECHO_T}$USE_NLS" >&6
-
-
- USE_INCLUDED_LIBINTL=no
-
- if test "$USE_NLS" = "yes"; then
- echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
-echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-
-# Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
-else
- nls_cv_force_use_gnu_gettext=no
-fi;
- echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
-echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- nls_cv_header_intl=
- nls_cv_header_libgt=
- CATOBJEXT=
-
- if test "${ac_cv_header_libintl_h+set}" = set; then
- echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking libintl.h usability" >&5
-echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <libintl.h>
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7407,110 +9297,914 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_header_compiler=yes
+ ac_cv_lib_dld_dld_link=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking libintl.h presence" >&5
-echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
else
- ac_cpp_err=
+ enable_dlopen=no
fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cpp_err=yes
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9369 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 9469 "configure"
+#include "confdefs.h"
- ac_header_preproc=no
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+rm -fr conftest*
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ fi
;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+ echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+ echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+# Check whether --enable-targets or --disable-targets was given.
+if test "${enable_targets+set}" = set; then
+ enableval="$enable_targets"
+ case "${enableval}" in
+ yes | "") { { echo "$as_me:$LINENO: error: enable-targets option must specify target names or 'all'" >&5
+echo "$as_me: error: enable-targets option must specify target names or 'all'" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ no) enable_targets= ;;
+ *) enable_targets=$enableval ;;
+esac
+fi; # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
+if test "${enable_commonbfdlib+set}" = set; then
+ enableval="$enable_commonbfdlib"
+ case "${enableval}" in
+ yes) commonbfdlib=true ;;
+ no) commonbfdlib=false ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for opcodes commonbfdlib option" >&5
+echo "$as_me: error: bad value ${enableval} for opcodes commonbfdlib option" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+fi;
+
+GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
+
+# Check whether --enable-werror or --disable-werror was given.
+if test "${enable_werror+set}" = set; then
+ enableval="$enable_werror"
+ case "${enableval}" in
+ yes | y) ERROR_ON_WARNING="yes" ;;
+ no | n) ERROR_ON_WARNING="no" ;;
+ *) { { echo "$as_me:$LINENO: error: bad value ${enableval} for --enable-werror" >&5
+echo "$as_me: error: bad value ${enableval} for --enable-werror" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+fi;
+
+# Enable -Werror by default when using gcc
+if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" ; then
+ ERROR_ON_WARNING=yes
+fi
+
+NO_WERROR=
+if test "${ERROR_ON_WARNING}" = yes ; then
+ GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror"
+ NO_WERROR="-Wno-error"
+fi
+
+if test "${GCC}" = yes ; then
+ WARN_CFLAGS="${GCC_WARN_CFLAGS}"
+fi
+
+# Check whether --enable-build-warnings or --disable-build-warnings was given.
+if test "${enable_build_warnings+set}" = set; then
+ enableval="$enable_build_warnings"
+ case "${enableval}" in
+ yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";;
+ no) if test "${GCC}" = yes ; then
+ WARN_CFLAGS="-w"
+ fi;;
+ ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";;
+ *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
+ WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";;
+ *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
-echo "$as_me:$LINENO: checking for libintl.h" >&5
-echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6
-if test "${ac_cv_header_libintl_h+set}" = set; then
+fi;
+
+if test x"$silent" != x"yes" && test x"$WARN_CFLAGS" != x""; then
+ echo "Setting warning flags = $WARN_CFLAGS" 6>&1
+fi
+
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h:config.in"
+
+
+if test -z "$target" ; then
+ { { echo "$as_me:$LINENO: error: Unrecognized target system type; please check config.sub." >&5
+echo "$as_me: error: Unrecognized target system type; please check config.sub." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+ # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+ enableval="$enable_maintainer_mode"
+ USE_MAINTAINER_MODE=$enableval
+else
+ USE_MAINTAINER_MODE=no
+fi;
+ echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+ MAINTAINER_MODE_TRUE=
+ MAINTAINER_MODE_FALSE='#'
+else
+ MAINTAINER_MODE_TRUE='#'
+ MAINTAINER_MODE_FALSE=
+fi
+
+ MAINT=$MAINTAINER_MODE_TRUE
+
+
+ case ${build_alias} in
+ "") build_noncanonical=${build} ;;
+ *) build_noncanonical=${build_alias} ;;
+esac
+
+ case ${host_alias} in
+ "") host_noncanonical=${build_noncanonical} ;;
+ *) host_noncanonical=${host_alias} ;;
+esac
+
+ case ${target_alias} in
+ "") target_noncanonical=${host_noncanonical} ;;
+ *) target_noncanonical=${target_alias} ;;
+esac
+
+echo "$as_me:$LINENO: checking whether to install libbfd" >&5
+echo $ECHO_N "checking whether to install libbfd... $ECHO_C" >&6
+ # Check whether --enable-install-libbfd or --disable-install-libbfd was given.
+if test "${enable_install_libbfd+set}" = set; then
+ enableval="$enable_install_libbfd"
+ install_libbfd_p=$enableval
+else
+ if test "${host}" = "${target}" || test "$enable_shared" = "yes"; then
+ install_libbfd_p=yes
+ else
+ install_libbfd_p=no
+ fi
+fi;
+ echo "$as_me:$LINENO: result: $install_libbfd_p" >&5
+echo "${ECHO_T}$install_libbfd_p" >&6
+
+
+if test $install_libbfd_p = yes; then
+ INSTALL_LIBBFD_TRUE=
+ INSTALL_LIBBFD_FALSE='#'
+else
+ INSTALL_LIBBFD_TRUE='#'
+ INSTALL_LIBBFD_FALSE=
+fi
+
+ # Need _noncanonical variables for this.
+
+
+
+
+ # libbfd.a is a host library containing target dependent code
+ bfdlibdir='$(libdir)'
+ bfdincludedir='$(includedir)'
+ if test "${host}" != "${target}"; then
+ bfdlibdir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/lib'
+ bfdincludedir='$(exec_prefix)/$(host_noncanonical)/$(target_noncanonical)/include'
+ fi
+
+
+
+
+
+
+# host-specific stuff:
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+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 $# != 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
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_header_libintl_h=$ac_header_preproc
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5
-echo "${ECHO_T}$ac_cv_header_libintl_h" >&6
+ test -n "$CC" && break
+ done
fi
-if test $ac_cv_header_libintl_h = yes; then
- echo "$as_me:$LINENO: checking for gettext in libc" >&5
-echo $ECHO_N "checking for gettext in libc... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libc+set}" = set; then
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7519,18 +10213,21 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <libintl.h>
+
int
main ()
{
-return (int) gettext ("")
+#ifndef __GNUC__
+ choke me
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7544,58 +10241,52 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gt_cv_func_gettext_libc=yes
+ ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gt_cv_func_gettext_libc=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+ac_compiler_gnu=no
fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libc" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libc" >&6
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
- if test "$gt_cv_func_gettext_libc" != "yes"; then
- echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5
-echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6
-if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lintl $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char bindtextdomain ();
int
main ()
{
-bindtextdomain ();
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7609,49 +10300,110 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_intl_bindtextdomain=yes
+ ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_intl_bindtextdomain=no
+ac_cv_prog_cc_g=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5
-echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6
-if test $ac_cv_lib_intl_bindtextdomain = yes; then
- echo "$as_me:$LINENO: checking for gettext in libintl" >&5
-echo $ECHO_N "checking for gettext in libintl... $ECHO_C" >&6
-if test "${gt_cv_func_gettext_libintl+set}" = set; then
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ 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 "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
int
main ()
{
-return (int) gettext ("")
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7665,134 +10417,94 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- gt_cv_func_gettext_libintl=yes
+ ac_cv_prog_cc_stdc=$ac_arg
+break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gt_cv_func_gettext_libintl=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gettext_libintl" >&5
-echo "${ECHO_T}$gt_cv_func_gettext_libintl" >&6
-fi
-
- fi
-
- if test "$gt_cv_func_gettext_libc" = "yes" \
- || test "$gt_cv_func_gettext_libintl" = "yes"; then
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETTEXT 1
-_ACEOF
+fi
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
- ;;
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
- if test "$MSGFMT" != "no"; then
-for ac_func in dcgettext
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+$ac_declaration
+#include <stdlib.h>
int
main ()
{
-return f != $ac_func;
+exit (42);
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7806,127 +10518,38 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ :
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+continue
fi
-
- cat >conftest.$ac_ext <<_ACEOF
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
+$ac_declaration
int
main ()
{
-extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr
+exit (42);
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
@@ -7940,42 +10563,173 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- CATOBJEXT=.gmo
- DATADIRNAME=share
+ break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-CATOBJEXT=.mo
- DATADIRNAME=lib
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- INSTOBJEXT=.mo
- fi
- fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl fi vi ga zh_CN"
+# If we haven't got the data from the intl directory,
+# assume NLS is disabled.
+USE_NLS=no
+LIBINTL=
+LIBINTL_DEP=
+INCINTL=
+XGETTEXT=
+GMSGFMT=
+POSUB=
+
+if test -f ../intl/config.intl; then
+ . ../intl/config.intl
+fi
+echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+if test x"$USE_NLS" != xyes; then
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+else
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+
+ echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
+echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
+ # Look for .po and .gmo files in the source directory.
+ CATALOGS=
+ XLINGUAS=
+ for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
+ # If there aren't any .gmo files the shell will give us the
+ # literal string "../path/to/srcdir/po/*.gmo" which has to be
+ # weeded out.
+ case "$cat" in *\**)
+ continue;;
+ esac
+ # The quadruple backslash is collapsed to a double backslash
+ # by the backticks, then collapsed again by the double quotes,
+ # leaving us with one backslash in the sed expression (right
+ # before the dot that mustn't act as a wildcard).
+ cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
+ lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
+ # The user is allowed to set LINGUAS to a list of languages to
+ # install catalogs for. If it's empty that means "all of them."
+ if test "x$LINGUAS" = x; then
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ else
+ case "$LINGUAS" in *$lang*)
+ CATALOGS="$CATALOGS $cat"
+ XLINGUAS="$XLINGUAS $lang"
+ ;;
+ esac
+ fi
+ done
+ LINGUAS="$XLINGUAS"
+ echo "$as_me:$LINENO: result: $LINGUAS" >&5
+echo "${ECHO_T}$LINGUAS" >&6
+
+
+ DATADIRNAME=share
+
+ INSTOBJEXT=.mo
+
+ GENCAT=gencat
+
+ CATOBJEXT=.gmo
+
+fi
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+
+ echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
+ # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval="$enable_nls"
+ USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi;
+ echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6
- if test x"$CATOBJEXT" = x && test -d $srcdir/../intl; then
- # Neither gettext nor catgets in included in the C library.
- # Fall back on GNU gettext library (assuming it is present).
- nls_cv_use_gnu_gettext=yes
- fi
- fi
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -7983,27 +10737,31 @@ if test "${ac_cv_path_MSGFMT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
- ;;
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
esac
fi
MSGFMT="$ac_cv_path_MSGFMT"
-if test -n "$MSGFMT"; then
+if test "$MSGFMT" != ":"; then
echo "$as_me:$LINENO: result: $MSGFMT" >&5
echo "${ECHO_T}$MSGFMT" >&6
else
@@ -8011,7 +10769,7 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8051,7 +10809,37 @@ else
echo "${ECHO_T}no" >&6
fi
- # Extract the first word of "xgettext", so it can be a program name with args.
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -8059,27 +10847,31 @@ if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
*)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
+ ;;
esac
fi
XGETTEXT="$ac_cv_path_XGETTEXT"
-if test -n "$XGETTEXT"; then
+if test "$XGETTEXT" != ":"; then
echo "$as_me:$LINENO: result: $XGETTEXT" >&5
echo "${ECHO_T}$XGETTEXT" >&6
else
@@ -8087,282 +10879,103 @@ else
echo "${ECHO_T}no" >&6
fi
-
- USE_INCLUDED_LIBINTL=yes
- CATOBJEXT=.gmo
- INSTOBJEXT=.mo
- DATADIRNAME=share
- INTLDEPS='$(top_builddir)/../intl/libintl.a'
- INTLLIBS=$INTLDEPS
- LIBS=`echo $LIBS | sed -e 's/-lintl//'`
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- echo "$as_me:$LINENO: result: found xgettext programs is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext programs is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
- else
- DATADIRNAME=share
- nls_cv_header_intl=libintl.h
- nls_cv_header_libgt=libgettext.h
- fi
-
- # If this is used in GNU gettext we have to set USE_NLS to `yes'
- # because some of the sources are only built for this goal.
- if test "$PACKAGE" = gettext; then
- USE_NLS=yes
- USE_INCLUDED_LIBINTL=yes
- fi
-
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
-
-
+ rm -f messages.po
-
-
-
-
-
-
-
- if test "x$CATOBJEXT" != "x"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define ENABLE_NLS 1
-_ACEOF
-
- fi
-
-
- if test "x$CATOBJEXT" != "x"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- echo "$as_me:$LINENO: checking for catalogs to be installed" >&5
-echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
- NEW_LINGUAS=
- for lang in ${LINGUAS=$ALL_LINGUAS}; do
- case "$ALL_LINGUAS" in
- *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
- esac
- done
- LINGUAS=$NEW_LINGUAS
- echo "$as_me:$LINENO: result: $LINGUAS" >&5
-echo "${ECHO_T}$LINGUAS" >&6
- fi
-
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- if test $ac_cv_header_locale_h = yes; then
- INCLUDE_LOCALE_H="#include <locale.h>"
- else
- INCLUDE_LOCALE_H="\
-/* The system does not provide the header <locale.h>. Take care yourself. */"
- fi
-
-
- if test -f $srcdir/po2tbl.sed.in; then
- if test "$CATOBJEXT" = ".cat"; then
- if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking linux/version.h usability" >&5
-echo $ECHO_N "checking linux/version.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <linux/version.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking linux/version.h presence" >&5
-echo $ECHO_N "checking linux/version.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <linux/version.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- ac_cpp_err=
+ PATH_SEPARATOR=:
fi
-else
- ac_cpp_err=yes
+ rm -f conf$$.sh
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+rm -f conf$$.file
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: linux/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: linux/version.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: linux/version.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: linux/version.h: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: linux/version.h: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: linux/version.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: linux/version.h: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: linux/version.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: linux/version.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists. ##
-## ------------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
;;
esac
-echo "$as_me:$LINENO: checking for linux/version.h" >&5
-echo $ECHO_N "checking for linux/version.h... $ECHO_C" >&6
-if test "${ac_cv_header_linux_version_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_header_linux_version_h=$ac_header_preproc
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_linux_version_h" >&5
-echo "${ECHO_T}$ac_cv_header_linux_version_h" >&6
-
fi
-if test $ac_cv_header_linux_version_h = yes; then
- msgformat=linux
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6
else
- msgformat=xopen
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
+ GMSGFMT=":"
+ fi
+ fi
- sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
- fi
- sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
- $srcdir/po2tbl.sed.in > po2tbl.sed
- fi
-
- if test "$PACKAGE" = "gettext"; then
- GT_NO="#NO#"
- GT_YES=
- else
- GT_NO=
- GT_YES="#YES#"
- fi
-
-
-
- MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
+ XGETTEXT=":"
+ fi
+ rm -f messages.po
+ fi
+ ac_config_commands="$ac_config_commands default-1"
- l=
-
-
- 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
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- fi
. ${srcdir}/../bfd/configure.host
@@ -8806,6 +11419,7 @@ if test x${all_targets} = xfalse ; then
bfd_arm_arch) ta="$ta arm-dis.lo" ;;
bfd_avr_arch) ta="$ta avr-dis.lo" ;;
bfd_bfin_arch) ta="$ta bfin-dis.lo" ;;
+ bfd_cr16_arch) ta="$ta cr16-dis.lo cr16-opc.lo" ;;
bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo cgen-bitset.lo" ;;
bfd_crx_arch) ta="$ta crx-dis.lo crx-opc.lo" ;;
bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
@@ -8817,7 +11431,7 @@ if test x${all_targets} = xfalse ; then
bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;;
- bfd_i386_arch) ta="$ta i386-dis.lo" ;;
+ bfd_i386_arch) ta="$ta i386-dis.lo i386-opc.lo" ;;
bfd_i860_arch) ta="$ta i860-dis.lo" ;;
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
@@ -8831,6 +11445,7 @@ if test x${all_targets} = xfalse ; then
bfd_m88k_arch) ta="$ta m88k-dis.lo" ;;
bfd_maxq_arch) ta="$ta maxq-dis.lo" ;;
bfd_mcore_arch) ta="$ta mcore-dis.lo" ;;
+ bfd_mep_arch) ta="$ta mep-asm.lo mep-desc.lo mep-dis.lo mep-ibld.lo mep-opc.lo" using_cgen=yes ;;
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" ;;
@@ -8848,6 +11463,7 @@ if test x${all_targets} = xfalse ; then
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_score_arch) ta="$ta score-dis.lo" ;;
bfd_sh_arch)
# We can't decide what we want just from the CPU family.
# We want SH5 support unless a specific version of sh is
@@ -8862,8 +11478,9 @@ if test x${all_targets} = xfalse ; then
break;;
esac;
done
- ta="$ta sh-dis.lo" ;;
+ ta="$ta sh-dis.lo cgen-bitset.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
+ bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
bfd_tic4x_arch) ta="$ta tic4x-dis.lo" ;;
@@ -8924,8 +11541,6 @@ fi
ac_config_files="$ac_config_files Makefile po/Makefile.in:po/Make-in"
- ac_config_commands="$ac_config_commands default"
-
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
@@ -9488,6 +12103,253 @@ cat >>$CONFIG_STATUS <<_ACEOF
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
_ACEOF
@@ -9500,7 +12362,8 @@ do
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in:po/Make-in" ;;
"depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+ "libtool" ) CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -9641,8 +12504,18 @@ s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@LN_S@,$LN_S,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
+s,@SED@,$SED,;t t
+s,@EGREP@,$EGREP,;t t
+s,@FGREP@,$FGREP,;t t
+s,@GREP@,$GREP,;t t
+s,@LD@,$LD,;t t
+s,@DUMPBIN@,$DUMPBIN,;t t
+s,@ac_ct_DUMPBIN@,$ac_ct_DUMPBIN,;t t
+s,@NM@,$NM,;t t
+s,@LN_S@,$LN_S,;t t
+s,@lt_ECHO@,$lt_ECHO,;t t
+s,@CPP@,$CPP,;t t
s,@WARN_CFLAGS@,$WARN_CFLAGS,;t t
s,@NO_WERROR@,$NO_WERROR,;t t
s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
@@ -9654,29 +12527,21 @@ s,@host_noncanonical@,$host_noncanonical,;t t
s,@target_noncanonical@,$target_noncanonical,;t t
s,@bfdlibdir@,$bfdlibdir,;t t
s,@bfdincludedir@,$bfdincludedir,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@ALLOCA@,$ALLOCA,;t t
s,@USE_NLS@,$USE_NLS,;t t
-s,@MSGFMT@,$MSGFMT,;t t
-s,@GMSGFMT@,$GMSGFMT,;t t
+s,@LIBINTL@,$LIBINTL,;t t
+s,@LIBINTL_DEP@,$LIBINTL_DEP,;t t
+s,@INCINTL@,$INCINTL,;t t
s,@XGETTEXT@,$XGETTEXT,;t t
-s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
+s,@GMSGFMT@,$GMSGFMT,;t t
+s,@POSUB@,$POSUB,;t t
s,@CATALOGS@,$CATALOGS,;t t
-s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@DATADIRNAME@,$DATADIRNAME,;t t
-s,@GMOFILES@,$GMOFILES,;t t
s,@INSTOBJEXT@,$INSTOBJEXT,;t t
-s,@INTLDEPS@,$INTLDEPS,;t t
-s,@INTLLIBS@,$INTLLIBS,;t t
-s,@INTLOBJS@,$INTLOBJS,;t t
-s,@POFILES@,$POFILES,;t t
-s,@POSUB@,$POSUB,;t t
-s,@INCLUDE_LOCALE_H@,$INCLUDE_LOCALE_H,;t t
-s,@GT_NO@,$GT_NO,;t t
-s,@GT_YES@,$GT_YES,;t t
+s,@GENCAT@,$GENCAT,;t t
+s,@CATOBJEXT@,$CATOBJEXT,;t t
s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-s,@l@,$l,;t t
+s,@MSGFMT@,$MSGFMT,;t t
+s,@MSGMERGE@,$MSGMERGE,;t t
s,@CC_FOR_BUILD@,$CC_FOR_BUILD,;t t
s,@EXEEXT_FOR_BUILD@,$EXEEXT_FOR_BUILD,;t t
s,@HDEFINES@,$HDEFINES,;t t
@@ -10371,7 +13236,656 @@ echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
done
done
;;
- default ) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
+ libtool )
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007 Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# 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, a copy can be downloaded from
+# http://www.gnu.org/copyleft/gpl.html, or by writing to the Free
+# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ default-1 )
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
esac
done
_ACEOF
diff --git a/contrib/binutils/opcodes/configure.in b/contrib/binutils/opcodes/configure.in
index d19d23c..104653f 100644
--- a/contrib/binutils/opcodes/configure.in
+++ b/contrib/binutils/opcodes/configure.in
@@ -61,7 +61,8 @@ AC_EXEEXT
AC_PROG_CC
ALL_LINGUAS="fr sv tr es da de id pt_BR ro nl fi vi ga zh_CN"
-CY_GNU_GETTEXT
+ZW_GNU_GETTEXT_SISTER_DIR
+AM_PO_SUBDIRS
. ${srcdir}/../bfd/configure.host
@@ -158,6 +159,7 @@ if test x${all_targets} = xfalse ; then
bfd_arm_arch) ta="$ta arm-dis.lo" ;;
bfd_avr_arch) ta="$ta avr-dis.lo" ;;
bfd_bfin_arch) ta="$ta bfin-dis.lo" ;;
+ bfd_cr16_arch) ta="$ta cr16-dis.lo cr16-opc.lo" ;;
bfd_cris_arch) ta="$ta cris-dis.lo cris-opc.lo cgen-bitset.lo" ;;
bfd_crx_arch) ta="$ta crx-dis.lo crx-opc.lo" ;;
bfd_d10v_arch) ta="$ta d10v-dis.lo d10v-opc.lo" ;;
@@ -169,7 +171,7 @@ if test x${all_targets} = xfalse ; then
bfd_h8500_arch) ta="$ta h8500-dis.lo" ;;
bfd_hppa_arch) ta="$ta hppa-dis.lo" ;;
bfd_i370_arch) ta="$ta i370-dis.lo i370-opc.lo" ;;
- bfd_i386_arch) ta="$ta i386-dis.lo" ;;
+ bfd_i386_arch) ta="$ta i386-dis.lo i386-opc.lo" ;;
bfd_i860_arch) ta="$ta i860-dis.lo" ;;
bfd_i960_arch) ta="$ta i960-dis.lo" ;;
bfd_ia64_arch) ta="$ta ia64-dis.lo ia64-opc.lo" ;;
@@ -183,6 +185,7 @@ if test x${all_targets} = xfalse ; then
bfd_m88k_arch) ta="$ta m88k-dis.lo" ;;
bfd_maxq_arch) ta="$ta maxq-dis.lo" ;;
bfd_mcore_arch) ta="$ta mcore-dis.lo" ;;
+ bfd_mep_arch) ta="$ta mep-asm.lo mep-desc.lo mep-dis.lo mep-ibld.lo mep-opc.lo" using_cgen=yes ;;
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" ;;
@@ -200,6 +203,7 @@ if test x${all_targets} = xfalse ; then
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_score_arch) ta="$ta score-dis.lo" ;;
bfd_sh_arch)
# We can't decide what we want just from the CPU family.
# We want SH5 support unless a specific version of sh is
@@ -214,8 +218,9 @@ if test x${all_targets} = xfalse ; then
break;;
esac;
done
- ta="$ta sh-dis.lo" ;;
+ ta="$ta sh-dis.lo cgen-bitset.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
+ bfd_spu_arch) ta="$ta spu-dis.lo spu-opc.lo" ;;
bfd_tahoe_arch) ;;
bfd_tic30_arch) ta="$ta tic30-dis.lo" ;;
bfd_tic4x_arch) ta="$ta tic4x-dis.lo" ;;
@@ -273,5 +278,4 @@ AC_SUBST(archdefs)
AC_SUBST(BFD_MACHINES)
AC_CONFIG_FILES([Makefile po/Makefile.in:po/Make-in])
-AC_CONFIG_COMMANDS([default],[[sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile]],[[]])
AC_OUTPUT
diff --git a/contrib/binutils/opcodes/cr16-dis.c b/contrib/binutils/opcodes/cr16-dis.c
new file mode 100644
index 0000000..724cb9b
--- /dev/null
+++ b/contrib/binutils/opcodes/cr16-dis.c
@@ -0,0 +1,820 @@
+/* Disassembler code for CR16.
+ Copyright 2007 Free Software Foundation, Inc.
+ Contributed by M R Swami Reddy (MR.Swami.Reddy@nsc.com).
+
+ This file is part of GAS, GDB and the 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, 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "dis-asm.h"
+#include "sysdep.h"
+#include "opcode/cr16.h"
+#include "libiberty.h"
+
+/* String to print when opcode was not matched. */
+#define ILLEGAL "illegal"
+ /* Escape to 16-bit immediate. */
+#define ESCAPE_16_BIT 0xB
+
+/* Extract 'n_bits' from 'a' starting from offset 'offs'. */
+#define EXTRACT(a, offs, n_bits) \
+ (n_bits == 32 ? (((a) >> (offs)) & 0xffffffffL) \
+ : (((a) >> (offs)) & ((1 << (n_bits)) -1)))
+
+/* Set Bit Mask - a mask to set all bits starting from offset 'offs'. */
+#define SBM(offs) ((((1 << (32 - offs)) -1) << (offs)))
+
+typedef unsigned long dwordU;
+typedef unsigned short wordU;
+
+typedef struct
+{
+ dwordU val;
+ int nbits;
+} parameter;
+
+/* Structure to map valid 'cinv' instruction options. */
+
+typedef struct
+ {
+ /* Cinv printed string. */
+ char *istr;
+ /* Value corresponding to the string. */
+ char *ostr;
+ }
+cinv_entry;
+
+/* CR16 'cinv' options mapping. */
+const cinv_entry cr16_cinvs[] =
+{
+ {"cinv[i]", "cinv [i]"},
+ {"cinv[i,u]", "cinv [i,u]"},
+ {"cinv[d]", "cinv [d]"},
+ {"cinv[d,u]", "cinv [d,u]"},
+ {"cinv[d,i]", "cinv [d,i]"},
+ {"cinv[d,i,u]", "cinv [d,i,u]"}
+};
+
+/* Number of valid 'cinv' instruction options. */
+static int NUMCINVS = ARRAY_SIZE (cr16_cinvs);
+
+/* Enum to distinguish different registers argument types. */
+typedef enum REG_ARG_TYPE
+ {
+ /* General purpose register (r<N>). */
+ REG_ARG = 0,
+ /*Processor register */
+ P_ARG,
+ }
+REG_ARG_TYPE;
+
+/* Current opcode table entry we're disassembling. */
+const inst *instruction;
+/* Current instruction we're disassembling. */
+ins currInsn;
+/* The current instruction is read into 3 consecutive words. */
+wordU words[3];
+/* Contains all words in appropriate order. */
+ULONGLONG allWords;
+/* Holds the current processed argument number. */
+int processing_argument_number;
+/* Nonzero means a IMM4 instruction. */
+int imm4flag;
+/* Nonzero means the instruction's original size is
+ incremented (escape sequence is used). */
+int size_changed;
+
+
+/* Print the constant expression length. */
+
+static char *
+print_exp_len (int size)
+{
+ switch (size)
+ {
+ case 4:
+ case 5:
+ case 6:
+ case 8:
+ case 14:
+ case 16:
+ return ":s";
+ case 20:
+ case 24:
+ case 32:
+ return ":m";
+ case 48:
+ return ":l";
+ default:
+ return "";
+ }
+}
+
+
+/* Retrieve the number of operands for the current assembled instruction. */
+
+static int
+get_number_of_operands (void)
+{
+ int i;
+
+ for (i = 0; instruction->operands[i].op_type && i < MAX_OPERANDS; i++)
+ ;
+
+ return i;
+}
+
+/* Return the bit size for a given operand. */
+
+static int
+getbits (operand_type op)
+{
+ if (op < MAX_OPRD)
+ return cr16_optab[op].bit_size;
+
+ return 0;
+}
+
+/* Return the argument type of a given operand. */
+
+static argtype
+getargtype (operand_type op)
+{
+ if (op < MAX_OPRD)
+ return cr16_optab[op].arg_type;
+
+ return nullargs;
+}
+
+/* Given a 'CC' instruction constant operand, return its corresponding
+ string. This routine is used when disassembling the 'CC' instruction. */
+
+static char *
+getccstring (unsigned cc)
+{
+ return (char *) cr16_b_cond_tab[cc];
+}
+
+
+/* Given a 'cinv' instruction constant operand, return its corresponding
+ string. This routine is used when disassembling the 'cinv' instruction. */
+
+static char *
+getcinvstring (char *str)
+{
+ const cinv_entry *cinv;
+
+ for (cinv = cr16_cinvs; cinv < (cr16_cinvs + NUMCINVS); cinv++)
+ if (strcmp (cinv->istr, str) == 0)
+ return cinv->ostr;
+
+ return ILLEGAL;
+}
+
+/* Given the trap index in dispatch table, return its name.
+ This routine is used when disassembling the 'excp' instruction. */
+
+static char *
+gettrapstring (unsigned int index)
+{
+ const trap_entry *trap;
+
+ for (trap = cr16_traps; trap < cr16_traps + NUMTRAPS; trap++)
+ if (trap->entry == index)
+ return trap->name;
+
+ return ILLEGAL;
+}
+
+/* Given a register enum value, retrieve its name. */
+
+static char *
+getregname (reg r)
+{
+ const reg_entry *reg = cr16_regtab + r;
+
+ if (reg->type != CR16_R_REGTYPE)
+ return ILLEGAL;
+
+ return reg->name;
+}
+
+/* Given a register pair enum value, retrieve its name. */
+
+static char *
+getregpname (reg r)
+{
+ const reg_entry *reg = cr16_regptab + r;
+
+ if (reg->type != CR16_RP_REGTYPE)
+ return ILLEGAL;
+
+ return reg->name;
+}
+
+/* Given a index register pair enum value, retrieve its name. */
+
+static char *
+getidxregpname (reg r)
+{
+ const reg_entry *reg;
+
+ switch (r)
+ {
+ case 0: r = 0; break;
+ case 1: r = 2; break;
+ case 2: r = 4; break;
+ case 3: r = 6; break;
+ case 4: r = 8; break;
+ case 5: r = 10; break;
+ case 6: r = 3; break;
+ case 7: r = 5; break;
+ default:
+ break;
+ }
+
+ reg = cr16_regptab + r;
+
+ if (reg->type != CR16_RP_REGTYPE)
+ return ILLEGAL;
+
+ return reg->name;
+}
+
+/* Getting a processor register name. */
+
+static char *
+getprocregname (int index)
+{
+ const reg_entry *r;
+
+ for (r = cr16_pregtab; r < cr16_pregtab + NUMPREGS; r++)
+ if (r->image == index)
+ return r->name;
+
+ return "ILLEGAL REGISTER";
+}
+
+/* Getting a processor register name - 32 bit size. */
+
+static char *
+getprocpregname (int index)
+{
+ const reg_entry *r;
+
+ for (r = cr16_pregptab; r < cr16_pregptab + NUMPREGPS; r++)
+ if (r->image == index)
+ return r->name;
+
+ return "ILLEGAL REGISTER";
+}
+
+/* START and END are relating 'allWords' struct, which is 48 bits size.
+
+ START|--------|END
+ +---------+---------+---------+---------+
+ | | V | A | L |
+ +---------+---------+---------+---------+
+ 0 16 32 48
+ words [0] [1] [2] */
+
+static parameter
+makelongparameter (ULONGLONG val, int start, int end)
+{
+ parameter p;
+
+ p.val = (dwordU) EXTRACT (val, 48 - end, end - start);
+ p.nbits = end - start;
+ return p;
+}
+
+/* Build a mask of the instruction's 'constant' opcode,
+ based on the instruction's printing flags. */
+
+static unsigned long
+build_mask (void)
+{
+ unsigned long mask = SBM (instruction->match_bits);
+ return mask;
+}
+
+/* Search for a matching opcode. Return 1 for success, 0 for failure. */
+
+static int
+match_opcode (void)
+{
+ unsigned long mask;
+ /* The instruction 'constant' opcode doewsn't exceed 32 bits. */
+ unsigned long doubleWord = words[1] + (words[0] << 16);
+
+ /* Start searching from end of instruction table. */
+ instruction = &cr16_instruction[NUMOPCODES - 2];
+
+ /* Loop over instruction table until a full match is found. */
+ while (instruction >= cr16_instruction)
+ {
+ mask = build_mask ();
+ if ((doubleWord & mask) == BIN (instruction->match,
+ instruction->match_bits))
+ return 1;
+ else
+ instruction--;
+ }
+ return 0;
+}
+
+/* Set the proper parameter value for different type of arguments. */
+
+static void
+make_argument (argument * a, int start_bits)
+{
+ int inst_bit_size;
+ parameter p;
+
+ if ((instruction->size == 3) && a->size >= 16)
+ inst_bit_size = 48;
+ else
+ inst_bit_size = 32;
+
+ switch (a->type)
+ {
+ case arg_r:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->r = p.val;
+ break;
+
+ case arg_rp:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->rp = p.val;
+ break;
+
+ case arg_pr:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->pr = p.val;
+ break;
+
+ case arg_prp:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->prp = p.val;
+ break;
+
+ case arg_ic:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->constant = p.val;
+ break;
+
+ case arg_cc:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + a->size),
+ inst_bit_size - start_bits);
+
+ a->cc = p.val;
+ break;
+
+ case arg_idxr:
+ if ((IS_INSN_MNEMONIC ("cbitb"))
+ || (IS_INSN_MNEMONIC ("sbitb"))
+ || (IS_INSN_MNEMONIC ("tbitb")))
+ p = makelongparameter (allWords, 8, 9);
+ else
+ p = makelongparameter (allWords, 9, 10);
+ a->i_r = p.val;
+ p = makelongparameter (allWords, inst_bit_size - a->size, inst_bit_size);
+ a->constant = p.val;
+ break;
+
+ case arg_idxrp:
+ p = makelongparameter (allWords, start_bits + 12, start_bits + 13);
+ a->i_r = p.val;
+ p = makelongparameter (allWords, start_bits + 13, start_bits + 16);
+ a->rp = p.val;
+ if (inst_bit_size > 32)
+ {
+ p = makelongparameter (allWords, inst_bit_size - start_bits - 12,
+ inst_bit_size);
+ a->constant = ((p.val & 0xffff) | (p.val >> 8 & 0xf0000));
+ }
+ else if (instruction->size == 2)
+ {
+ p = makelongparameter (allWords, inst_bit_size - 22, inst_bit_size);
+ a->constant = (p.val & 0xf) | (((p.val >>20) & 0x3) << 4)
+ | ((p.val >>14 & 0x3) << 6) | (((p.val >>7) & 0x1f) <<7);
+ }
+ else if (instruction->size == 1 && a->size == 0)
+ a->constant = 0;
+
+ break;
+
+ case arg_rbase:
+ p = makelongparameter (allWords, inst_bit_size, inst_bit_size);
+ a->constant = p.val;
+ p = makelongparameter (allWords, inst_bit_size - (start_bits + 4),
+ inst_bit_size - start_bits);
+ a->r = p.val;
+ break;
+
+ case arg_cr:
+ p = makelongparameter (allWords, start_bits + 12, start_bits + 16);
+ a->r = p.val;
+ p = makelongparameter (allWords, inst_bit_size - 16, inst_bit_size);
+ a->constant = p.val;
+ break;
+
+ case arg_crp:
+ if (instruction->size == 1)
+ p = makelongparameter (allWords, 12, 16);
+ else
+ p = makelongparameter (allWords, start_bits + 12, start_bits + 16);
+ a->rp = p.val;
+
+ if (inst_bit_size > 32)
+ {
+ p = makelongparameter (allWords, inst_bit_size - start_bits - 12,
+ inst_bit_size);
+ a->constant = ((p.val & 0xffff) | (p.val >> 8 & 0xf0000));
+ }
+ else if (instruction->size == 2)
+ {
+ p = makelongparameter (allWords, inst_bit_size - 16, inst_bit_size);
+ a->constant = p.val;
+ }
+ else if (instruction->size == 1 && a->size != 0)
+ {
+ p = makelongparameter (allWords, 4, 8);
+ if (IS_INSN_MNEMONIC ("loadw")
+ || IS_INSN_MNEMONIC ("loadd")
+ || IS_INSN_MNEMONIC ("storw")
+ || IS_INSN_MNEMONIC ("stord"))
+ a->constant = (p.val * 2);
+ else
+ a->constant = p.val;
+ }
+ else /* below case for 0x0(reg pair) */
+ a->constant = 0;
+
+ break;
+
+ case arg_c:
+
+ if ((IS_INSN_TYPE (BRANCH_INS))
+ || (IS_INSN_MNEMONIC ("bal"))
+ || (IS_INSN_TYPE (CSTBIT_INS))
+ || (IS_INSN_TYPE (LD_STOR_INS)))
+ {
+ switch (a->size)
+ {
+ case 8 :
+ p = makelongparameter (allWords, 0, start_bits);
+ a->constant = ((((p.val&0xf00)>>4)) | (p.val&0xf));
+ break;
+
+ case 24:
+ if (instruction->size == 3)
+ {
+ p = makelongparameter (allWords, 16, inst_bit_size);
+ a->constant = ((((p.val>>16)&0xf) << 20)
+ | (((p.val>>24)&0xf) << 16)
+ | (p.val & 0xffff));
+ }
+ else if (instruction->size == 2)
+ {
+ p = makelongparameter (allWords, 8, inst_bit_size);
+ a->constant = p.val;
+ }
+ break;
+
+ default:
+ p = makelongparameter (allWords, inst_bit_size - (start_bits +
+ a->size), inst_bit_size - start_bits);
+ a->constant = p.val;
+ break;
+ }
+ }
+ else
+ {
+ p = makelongparameter (allWords, inst_bit_size -
+ (start_bits + a->size),
+ inst_bit_size - start_bits);
+ a->constant = p.val;
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+/* Print a single argument. */
+
+static void
+print_arg (argument *a, bfd_vma memaddr, struct disassemble_info *info)
+{
+ LONGLONG longdisp, mask;
+ int sign_flag = 0;
+ int relative = 0;
+ bfd_vma number;
+ PTR stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ switch (a->type)
+ {
+ case arg_r:
+ func (stream, "%s", getregname (a->r));
+ break;
+
+ case arg_rp:
+ func (stream, "%s", getregpname (a->rp));
+ break;
+
+ case arg_pr:
+ func (stream, "%s", getprocregname (a->pr));
+ break;
+
+ case arg_prp:
+ func (stream, "%s", getprocpregname (a->prp));
+ break;
+
+ case arg_cc:
+ func (stream, "%s", getccstring (a->cc));
+ func (stream, "%s", "\t");
+ break;
+
+ case arg_ic:
+ if (IS_INSN_MNEMONIC ("excp"))
+ {
+ func (stream, "%s", gettrapstring (a->constant));
+ break;
+ }
+ else if ((IS_INSN_TYPE (ARITH_INS) || IS_INSN_TYPE (ARITH_BYTE_INS))
+ && ((instruction->size == 1) && (a->constant == 9)))
+ func (stream, "$%d", -1);
+ else if (INST_HAS_REG_LIST)
+ func (stream, "$0x%lx", a->constant +1);
+ else if (IS_INSN_TYPE (SHIFT_INS))
+ {
+ longdisp = a->constant;
+ mask = ((LONGLONG)1 << a->size) - 1;
+ if (longdisp & ((LONGLONG)1 << (a->size -1)))
+ {
+ sign_flag = 1;
+ longdisp = ~(longdisp) + 1;
+ }
+ a->constant = (unsigned long int) (longdisp & mask);
+ func (stream, "$%d", ((int)(sign_flag ? -a->constant :
+ a->constant)));
+ }
+ else
+ func (stream, "$0x%lx", a->constant);
+ switch (a->size)
+ {
+ case 4 : case 5 : case 6 : case 8 :
+ func (stream, "%s", ":s"); break;
+ case 16 : case 20 : func (stream, "%s", ":m"); break;
+ case 24 : case 32 : func (stream, "%s", ":l"); break;
+ default: break;
+ }
+ break;
+
+ case arg_idxr:
+ if (a->i_r == 0) func (stream, "[r12]");
+ if (a->i_r == 1) func (stream, "[r13]");
+ func (stream, "0x%lx", a->constant);
+ func (stream, "%s", print_exp_len (instruction->size * 16));
+ break;
+
+ case arg_idxrp:
+ if (a->i_r == 0) func (stream, "[r12]");
+ if (a->i_r == 1) func (stream, "[r13]");
+ func (stream, "0x%lx", a->constant);
+ func (stream, "%s", print_exp_len (instruction->size * 16));
+ func (stream, "%s", getidxregpname (a->rp));
+ break;
+
+ case arg_rbase:
+ func (stream, "(%s)", getregname (a->r));
+ break;
+
+ case arg_cr:
+ func (stream, "0x%lx", a->constant);
+ func (stream, "%s", print_exp_len (instruction->size * 16));
+ func (stream, "(%s)", getregname (a->r));
+ break;
+
+ case arg_crp:
+ func (stream, "0x%lx", a->constant);
+ func (stream, "%s", print_exp_len (instruction->size * 16));
+ func (stream, "%s", getregpname (a->rp));
+ break;
+
+ case arg_c:
+ /*Removed the *2 part as because implicit zeros are no more required.
+ Have to fix this as this needs a bit of extension in terms of branch
+ instructions. */
+ if (IS_INSN_TYPE (BRANCH_INS) || IS_INSN_MNEMONIC ("bal"))
+ {
+ relative = 1;
+ longdisp = a->constant;
+ /* REVISIT: To sync with WinIDEA and CR16 4.1tools, the below
+ line commented */
+ /* longdisp <<= 1; */
+ mask = ((LONGLONG)1 << a->size) - 1;
+ switch (a->size)
+ {
+ case 8 :
+ {
+ longdisp <<= 1;
+ if (longdisp & ((LONGLONG)1 << a->size))
+ {
+ sign_flag = 1;
+ longdisp = ~(longdisp) + 1;
+ }
+ break;
+ }
+ case 16 :
+ case 24 :
+ {
+ if (longdisp & 1)
+ {
+ sign_flag = 1;
+ longdisp = ~(longdisp) + 1;
+ }
+ break;
+ }
+ default:
+ func (stream, "Wrong offset used in branch/bal instruction");
+ break;
+ }
+ a->constant = (unsigned long int) (longdisp & mask);
+ }
+ /* For branch Neq instruction it is 2*offset + 2. */
+ else if (IS_INSN_TYPE (BRANCH_NEQ_INS))
+ a->constant = 2 * a->constant + 2;
+
+ if ((!IS_INSN_TYPE (CSTBIT_INS)) && (!IS_INSN_TYPE (LD_STOR_INS)))
+ (sign_flag) ? func (stream, "%s", "*-"): func (stream, "%s","*+");
+
+ func (stream, "%s", "0x");
+ number = ((relative ? memaddr : 0) +
+ (sign_flag ? ((- a->constant) & 0xffffffe) : a->constant));
+
+ (*info->print_address_func) ((number & ((1 << 24) - 1)), info);
+
+ func (stream, "%s", print_exp_len (instruction->size * 16));
+ break;
+
+ default:
+ break;
+ }
+}
+
+/* Print all the arguments of CURRINSN instruction. */
+
+static void
+print_arguments (ins *currInsn, bfd_vma memaddr, struct disassemble_info *info)
+{
+ int i;
+
+ /* For "pop/push/popret RA instruction only. */
+ if ((IS_INSN_MNEMONIC ("pop")
+ || (IS_INSN_MNEMONIC ("popret")
+ || (IS_INSN_MNEMONIC ("push"))))
+ && currInsn->nargs == 1)
+ {
+ info->fprintf_func (info->stream, "RA");
+ return;
+ }
+
+ for (i = 0; i < currInsn->nargs; i++)
+ {
+ processing_argument_number = i;
+
+ /* For "bal (ra), disp17" instruction only. */
+ if ((IS_INSN_MNEMONIC ("bal")) && (i == 0) && instruction->size == 2)
+ {
+ info->fprintf_func (info->stream, "(ra),");
+ continue;
+ }
+
+ if ((INST_HAS_REG_LIST) && (i == 2))
+ info->fprintf_func (info->stream, "RA");
+ else
+ print_arg (&currInsn->arg[i], memaddr, info);
+
+ if ((i != currInsn->nargs - 1) && (!IS_INSN_MNEMONIC ("b")))
+ info->fprintf_func (info->stream, ",");
+ }
+}
+
+/* Build the instruction's arguments. */
+
+static void
+make_instruction (void)
+{
+ int i;
+ unsigned int shift;
+
+ for (i = 0; i < currInsn.nargs; i++)
+ {
+ argument a;
+
+ memset (&a, 0, sizeof (a));
+ a.type = getargtype (instruction->operands[i].op_type);
+ a.size = getbits (instruction->operands[i].op_type);
+ shift = instruction->operands[i].shift;
+
+ make_argument (&a, shift);
+ currInsn.arg[i] = a;
+ }
+
+ /* Calculate instruction size (in bytes). */
+ currInsn.size = instruction->size + (size_changed ? 1 : 0);
+ /* Now in bits. */
+ currInsn.size *= 2;
+}
+
+/* Retrieve a single word from a given memory address. */
+
+static wordU
+get_word_at_PC (bfd_vma memaddr, struct disassemble_info *info)
+{
+ bfd_byte buffer[4];
+ int status;
+ wordU insn = 0;
+
+ status = info->read_memory_func (memaddr, buffer, 2, info);
+
+ if (status == 0)
+ insn = (wordU) bfd_getl16 (buffer);
+
+ return insn;
+}
+
+/* Retrieve multiple words (3) from a given memory address. */
+
+static void
+get_words_at_PC (bfd_vma memaddr, struct disassemble_info *info)
+{
+ int i;
+ bfd_vma mem;
+
+ for (i = 0, mem = memaddr; i < 3; i++, mem += 2)
+ words[i] = get_word_at_PC (mem, info);
+
+ allWords =
+ ((ULONGLONG) words[0] << 32) + ((unsigned long) words[1] << 16) + words[2];
+}
+
+/* Prints the instruction by calling print_arguments after proper matching. */
+
+int
+print_insn_cr16 (bfd_vma memaddr, struct disassemble_info *info)
+{
+ int is_decoded; /* Nonzero means instruction has a match. */
+
+ /* Initialize global variables. */
+ imm4flag = 0;
+ size_changed = 0;
+
+ /* Retrieve the encoding from current memory location. */
+ get_words_at_PC (memaddr, info);
+ /* Find a matching opcode in table. */
+ is_decoded = match_opcode ();
+ /* If found, print the instruction's mnemonic and arguments. */
+ if (is_decoded > 0 && (words[0] << 16 || words[1]) != 0)
+ {
+ if (strneq (instruction->mnemonic, "cinv", 4))
+ info->fprintf_func (info->stream,"%s", getcinvstring ((char *)instruction->mnemonic));
+ else
+ info->fprintf_func (info->stream, "%s", instruction->mnemonic);
+
+ if (((currInsn.nargs = get_number_of_operands ()) != 0)
+ && ! (IS_INSN_MNEMONIC ("b")))
+ info->fprintf_func (info->stream, "\t");
+ make_instruction ();
+ /* For push/pop/pushrtn with RA instructions. */
+ if ((INST_HAS_REG_LIST) && ((words[0] >> 7) & 0x1))
+ currInsn.nargs +=1;
+ print_arguments (&currInsn, memaddr, info);
+ return currInsn.size;
+ }
+
+ /* No match found. */
+ info->fprintf_func (info->stream,"%s ",ILLEGAL);
+ return 2;
+}
diff --git a/contrib/binutils/opcodes/cr16-opc.c b/contrib/binutils/opcodes/cr16-opc.c
new file mode 100644
index 0000000..8b8bf2f
--- /dev/null
+++ b/contrib/binutils/opcodes/cr16-opc.c
@@ -0,0 +1,611 @@
+/* cr16-opc.c -- Table of opcodes for the CR16 processor.
+ Copyright 2007 Free Software Foundation, Inc.
+ Contributed by M R Swami Reddy (MR.Swami.Reddy@nsc.com)
+
+ This file is part of GAS, GDB and the GNU binutils.
+
+ GAS, GDB, and GNU binutils is free software; you can redistribute it
+ and/or modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2, or (at your
+ option) any later version.
+
+ GAS, GDB, and GNU binutils are distributed in the hope that they will be
+ useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <stdio.h>
+#include "libiberty.h"
+#include "symcat.h"
+#include "opcode/cr16.h"
+
+const inst cr16_instruction[] =
+{
+/* Create an arithmetic instruction - INST[bw]. */
+#define ARITH_BYTE_INST(NAME, OPC, OP1) \
+ /* opc8 imm4 r */ \
+ {NAME, 1, OPC, 24, ARITH_BYTE_INS, {{uimm4_1,20}, {regr,16}}}, \
+ /* opc8 imm16 r */ \
+ {NAME, 2, (OPC<<4)+0xB, 20, ARITH_BYTE_INS, {{OP1,0}, {regr,16}}}, \
+ /* opc8 r r */ \
+ {NAME, 1, OPC+0x1, 24, ARITH_BYTE_INS, {{regr,20}, {regr,16}}}
+
+/* for Logincal operations, allow unsinged imm16 also */
+#define ARITH1_BYTE_INST(NAME, OPC, OP1) \
+ /* opc8 imm16 r */ \
+ {NAME, 2, (OPC<<4)+0xB, 20, ARITH_BYTE_INS, {{OP1,0}, {regr,16}}}
+
+
+ ARITH_BYTE_INST ("andb", 0x20, uimm16),
+ ARITH1_BYTE_INST ("andb", 0x20, imm16),
+ ARITH_BYTE_INST ("andw", 0x22, uimm16),
+ ARITH1_BYTE_INST ("andw", 0x22, imm16),
+
+ ARITH_BYTE_INST ("orb", 0x24, uimm16),
+ ARITH1_BYTE_INST ("orb", 0x24, imm16),
+ ARITH_BYTE_INST ("orw", 0x26, uimm16),
+ ARITH1_BYTE_INST ("orw", 0x26, imm16),
+
+ ARITH_BYTE_INST ("xorb", 0x28, uimm16),
+ ARITH1_BYTE_INST ("xorb", 0x28, imm16),
+ ARITH_BYTE_INST ("xorw", 0x2A, uimm16),
+ ARITH1_BYTE_INST ("xorw", 0x2A, imm16),
+
+ ARITH_BYTE_INST ("addub", 0x2C, imm16),
+ ARITH_BYTE_INST ("adduw", 0x2E, imm16),
+ ARITH_BYTE_INST ("addb", 0x30, imm16),
+ ARITH_BYTE_INST ("addw", 0x32, imm16),
+ ARITH_BYTE_INST ("addcb", 0x34, imm16),
+ ARITH_BYTE_INST ("addcw", 0x36, imm16),
+
+ ARITH_BYTE_INST ("subb", 0x38, imm16),
+ ARITH_BYTE_INST ("subw", 0x3A, imm16),
+ ARITH_BYTE_INST ("subcb", 0x3C, imm16),
+ ARITH_BYTE_INST ("subcw", 0x3E, imm16),
+
+ ARITH_BYTE_INST ("cmpb", 0x50, imm16),
+ ARITH_BYTE_INST ("cmpw", 0x52, imm16),
+
+ ARITH_BYTE_INST ("movb", 0x58, imm16),
+ ARITH_BYTE_INST ("movw", 0x5A, imm16),
+
+ ARITH_BYTE_INST ("mulb", 0x64, imm16),
+ ARITH_BYTE_INST ("mulw", 0x66, imm16),
+
+#define ARITH_BYTE_INST1(NAME, OPC) \
+ /* opc8 r r */ \
+ {NAME, 1, OPC, 24, ARITH_BYTE_INS, {{regr,20}, {regr,16}}}
+
+ ARITH_BYTE_INST1 ("movxb", 0x5C),
+ ARITH_BYTE_INST1 ("movzb", 0x5D),
+ ARITH_BYTE_INST1 ("mulsb", 0x0B),
+
+#define ARITH_BYTE_INST2(NAME, OPC) \
+ /* opc8 r rp */ \
+ {NAME, 1, OPC, 24, ARITH_BYTE_INS, {{regr,20}, {regp,16}}}
+
+ ARITH_BYTE_INST2 ("movxw", 0x5E),
+ ARITH_BYTE_INST2 ("movzw", 0x5F),
+ ARITH_BYTE_INST2 ("mulsw", 0x62),
+ ARITH_BYTE_INST2 ("muluw", 0x63),
+
+/* Create an arithmetic instruction - INST[d]- with 3 types. */
+#define ARITH_INST_D(NAME, OPC) \
+ /* opc8 imm4 rp */ \
+ {NAME, 1, OPC, 24, ARITH_INS, {{uimm4_1,20}, {regp,16}}}, \
+ /* opc8 imm16 rp */ \
+ {NAME, 2, (OPC<<4)+0xB, 20, ARITH_INS, {{imm16,0}, {regp,16}}}, \
+ /* opc8 rp rp */ \
+ {NAME, 1, OPC+1, 24, ARITH_INS, {{regp,20}, {regp,16}}}
+
+/* Create an arithmetic instruction - INST[d]-20 bit types. */
+#define ARITH_INST20(NAME, OPC) \
+ /* opc8 uimm20 rp */ \
+ {NAME, 2, OPC, 24, ARITH_INS, {{uimm20,0}, {regp,20}}}
+
+/* Create an arithmetic instruction - INST[d]-32 bit types. */
+#define ARITH_INST32(NAME, OPC, OP1) \
+ /* opc12 imm32 rp */ \
+ {NAME, 3, OPC, 20, ARITH_INS, {{OP1,0}, {regp,16}}}
+
+/* Create an arithmetic instruction - INST[d]-32bit types(reg pairs).*/
+#define ARITH_INST32RP(NAME, OPC) \
+ /* opc24 rp rp */ \
+ {NAME, 2, OPC, 12, ARITH_INS, {{regp,4}, {regp,0}}}
+
+ ARITH_INST_D ("movd", 0x54),
+ ARITH_INST20 ("movd", 0x05),
+ ARITH_INST32 ("movd", 0x007, imm32),
+ ARITH_INST_D ("addd", 0x60),
+ ARITH_INST20 ("addd", 0x04),
+ ARITH_INST32 ("addd", 0x002, imm32),
+ ARITH_INST32 ("subd", 0x003, imm32),
+ ARITH_INST32RP ("subd", 0x0014C),
+ ARITH_INST_D ("cmpd", 0x56),
+ ARITH_INST32 ("cmpd", 0x009, imm32),
+ ARITH_INST32 ("andd", 0x004, uimm32),
+ ARITH_INST32RP ("andd", 0x0014B),
+ ARITH_INST32 ("ord", 0x005, uimm32),
+ ARITH_INST32RP ("ord", 0x00149),
+ ARITH_INST32 ("xord", 0x006, uimm32),
+ ARITH_INST32RP ("xord", 0x0014A),
+
+/* Create a shift instruction. */
+#define SHIFT_INST_A(NAME, OPC1, OPC2, SHIFT, OP1, OP2) \
+ /* opc imm r */ \
+ {NAME, 1, OPC1, SHIFT, SHIFT_INS, {{OP1,20}, {OP2,16}}}, \
+ /* opc imm r */ \
+ {NAME, 1, OPC1+1, SHIFT, SHIFT_INS, {{OP1,20}, {OP2,16}}},\
+ /* opc r r */ \
+ {NAME, 1, OPC2, 24, SHIFT_INS, {{regr,20}, {OP2,16}}}
+
+ SHIFT_INST_A("ashub", 0x80, 0x41, 23, imm4, regr),
+ SHIFT_INST_A("ashud", 0x26, 0x48, 25, imm6, regp),
+ SHIFT_INST_A("ashuw", 0x42, 0x45, 24, imm5, regr),
+
+#define SHIFT_INST_L(NAME, OPC1, OPC2, SHIFT, OP1, OP2) \
+ /* opc imm r */ \
+ {NAME, 1, OPC1, SHIFT, SHIFT_INS, {{OP1,20}, {OP2,16}}}, \
+ /* opc r r */ \
+ {NAME, 1, OPC2, 24, SHIFT_INS, {{regr,20}, {OP2,16}}}
+
+ SHIFT_INST_L("lshb", 0x13, 0x44, 23, imm4, regr),
+ SHIFT_INST_L("lshd", 0x25, 0x47, 25, imm6, regp),
+ SHIFT_INST_L("lshw", 0x49, 0x46, 24, imm5, regr),
+
+/* Create a conditional branch instruction. */
+#define BRANCH_INST(NAME, OPC) \
+ /* opc4 c4 dispe9 */ \
+ {NAME, 1, OPC, 28, BRANCH_INS, {{cc,20}, {dispe9,16}}}, \
+ /* opc4 c4 disps17 */ \
+ {NAME, 2, ((OPC<<4)+0x8), 24, BRANCH_INS, {{cc,20}, {disps17,0}}}, \
+ /* opc4 c4 disps25 */ \
+ {NAME, 3, (OPC<<4), 16 , BRANCH_INS, {{cc,4}, {disps25,16}}}
+
+ BRANCH_INST ("b", 0x1),
+
+/* Create a 'Branch if Equal to 0' instruction. */
+#define BRANCH_NEQ_INST(NAME, OPC) \
+ /* opc8 disps5 r */ \
+ {NAME, 1, OPC, 24, BRANCH_NEQ_INS, {{regr,16}, {disps5,20}}}
+
+ BRANCH_NEQ_INST ("beq0b", 0x0C),
+ BRANCH_NEQ_INST ("bne0b", 0x0D),
+ BRANCH_NEQ_INST ("beq0w", 0x0E),
+ BRANCH_NEQ_INST ("bne0w", 0x0F),
+
+
+/* Create an instruction using a single register operand. */
+#define REG1_INST(NAME, OPC) \
+ /* opc8 c4 r */ \
+ {NAME, 1, OPC, 20, NO_TYPE_INS, {{regr,16}}}
+
+#define REGP1_INST(NAME, OPC) \
+ /* opc8 c4 r */ \
+ {NAME, 1, OPC, 20, NO_TYPE_INS, {{regp,16}}}
+
+/* Same as REG1_INST, with additional FLAGS. */
+#define REG1_FLAG_INST(NAME, OPC, FLAGS) \
+ /* opc8 c4 r */ \
+ {NAME, 1, OPC, 20, NO_TYPE_INS | FLAGS, {{regp,16}}}
+
+ /* JCond instructions */
+ REGP1_INST ("jeq", 0x0A0),
+ REGP1_INST ("jne", 0x0A1),
+ REGP1_INST ("jcs", 0x0A2),
+ REGP1_INST ("jcc", 0x0A3),
+ REGP1_INST ("jhi", 0x0A4),
+ REGP1_INST ("jls", 0x0A5),
+ REGP1_INST ("jgt", 0x0A6),
+ REGP1_INST ("jle", 0x0A7),
+ REGP1_INST ("jfs", 0x0A8),
+ REGP1_INST ("jfc", 0x0A9),
+ REGP1_INST ("jlo", 0x0AA),
+ REGP1_INST ("jhs", 0x0AB),
+ REGP1_INST ("jlt", 0x0AC),
+ REGP1_INST ("jge", 0x0AD),
+ REGP1_INST ("jump", 0x0AE),
+ REGP1_INST ("jusr", 0x0AF),
+
+ /* SCond instructions */
+ REG1_INST ("seq", 0x080),
+ REG1_INST ("sne", 0x081),
+ REG1_INST ("scs", 0x082),
+ REG1_INST ("scc", 0x083),
+ REG1_INST ("shi", 0x084),
+ REG1_INST ("sls", 0x085),
+ REG1_INST ("sgt", 0x086),
+ REG1_INST ("sle", 0x087),
+ REG1_INST ("sfs", 0x088),
+ REG1_INST ("sfc", 0x089),
+ REG1_INST ("slo", 0x08A),
+ REG1_INST ("shs", 0x08B),
+ REG1_INST ("slt", 0x08C),
+ REG1_INST ("sge", 0x08D),
+
+
+/* Create an instruction using two register operands. */
+#define REG3_INST(NAME, OPC) \
+ /* opc24 r r rp */ \
+ {NAME, 2, OPC, 12, NO_TYPE_INS, {{regr,4}, {regr,0}, {regp,8}}}
+
+ /* MULTIPLY INSTRUCTIONS */
+ REG3_INST ("macqw", 0x0014d),
+ REG3_INST ("macuw", 0x0014e),
+ REG3_INST ("macsw", 0x0014f),
+
+/* Create a branch instruction. */
+#define BR_INST(NAME, OPC) \
+ /* opc12 ra disps25 */ \
+ {NAME, 2, OPC, 24, NO_TYPE_INS, {{rra,0}, {disps25,0}}}
+
+#define BR_INST_RP(NAME, OPC) \
+ /* opc8 rp disps25 */ \
+ {NAME, 3, OPC, 12, NO_TYPE_INS, {{regp,4}, {disps25,16}}}
+
+ BR_INST ("bal", 0xC0),
+ BR_INST_RP ("bal", 0x00102),
+
+#define REGPP2_INST(NAME, OPC) \
+ /* opc16 rp rp */ \
+ {NAME, 2, OPC, 12, NO_TYPE_INS, {{regp,0}, {regp,4}}}
+ /* Jump and link instructions. */
+ REGP1_INST ("jal",0x00D),
+ REGPP2_INST ("jal",0x00148),
+
+
+/* Instructions including a register list (opcode is represented as a mask). */
+#define REGLIST_INST(NAME, OPC, TYPE) \
+ /* opc7 r count3 RA */ \
+ {NAME,1, (OPC<<1)+1, 23, TYPE, {{uimm3_1,20},{regr,16},{regr,0}}}, \
+ /* opc8 r count3 */ \
+ {NAME, 1, OPC, 24, TYPE, {{uimm3_1,20}, {regr,16}}}, \
+ /* opc12 RA */ \
+ {NAME, 1, (OPC<<8)+0x1E, 16, TYPE, {{regr,0}}}
+
+ REGLIST_INST ("push", 0x01, (NO_TYPE_INS | REG_LIST)),
+ REGLIST_INST ("pop", 0x02, (NO_TYPE_INS | REG_LIST)),
+ REGLIST_INST ("popret", 0x03, (NO_TYPE_INS | REG_LIST)),
+
+ {"loadm", 1, 0x14, 19, NO_TYPE_INS | REG_LIST, {{uimm3_1,16}}},
+ {"loadmp", 1, 0x15, 19, NO_TYPE_INS | REG_LIST, {{uimm3_1,16}}},
+ {"storm", 1, 0x16, 19, NO_TYPE_INS | REG_LIST, {{uimm3_1,16}}},
+ {"stormp", 1, 0x17, 19, NO_TYPE_INS | REG_LIST, {{uimm3_1,16}}},
+
+ /* Processor Regsiter Manipulation instructions */
+ /* opc16 reg, preg */
+ {"lpr", 2, 0x00140, 12, NO_TYPE_INS, {{regr,0}, {pregr,4}}},
+ /* opc16 regp, pregp */
+ {"lprd", 2, 0x00141, 12, NO_TYPE_INS, {{regp,0}, {pregrp,4}}},
+ /* opc16 preg, reg */
+ {"spr", 2, 0x00142, 12, NO_TYPE_INS, {{pregr,4}, {regr,0}}},
+ /* opc16 pregp, regp */
+ {"sprd", 2, 0x00143, 12, NO_TYPE_INS, {{pregrp,4}, {regp,0}}},
+
+ /* Miscellaneous. */
+ /* opc12 ui4 */
+ {"excp", 1, 0x00C, 20, NO_TYPE_INS, {{uimm4,16}}},
+
+/* Create a bit-b instruction. */
+#define CSTBIT_INST_B(NAME, OP, OPC1, OPC2, OPC3, OPC4) \
+ /* opcNN iN abs20 */ \
+ {NAME, 2, (OPC3+1), 23, CSTBIT_INS, {{OP,20},{abs20,0}}}, \
+ /* opcNN iN abs24 */ \
+ {NAME, 3, (OPC2+3), 12, CSTBIT_INS, {{OP,4},{abs24,16}}}, \
+ /* opcNN iN (Rindex)abs20 */ \
+ {NAME, 2, OPC1, 24, CSTBIT_INS, {{OP,20}, {rindex7_abs20,0}}}, \
+ /* opcNN iN (prp) disps14(RPbase) */ \
+ {NAME, 2, OPC4, 22, CSTBIT_INS, {{OP,4},{rpindex_disps14,0}}}, \
+ /* opcNN iN disps20(Rbase) */ \
+ {NAME, 3, OPC2, 12, CSTBIT_INS, {{OP,4}, {rbase_disps20,16}}}, \
+ /* opcNN iN (rp) disps0(RPbase) */ \
+ {NAME, 1, OPC3-2, 23, CSTBIT_INS, {{OP,20}, {rpbase_disps0,16}}}, \
+ /* opcNN iN (rp) disps16(RPBase) */ \
+ {NAME, 2, OPC3, 23, CSTBIT_INS, {{OP,20}, {rpbase_disps16,0}}}, \
+ /* opcNN iN (rp) disps20(RPBase) */ \
+ {NAME, 3, (OPC2+1), 12, CSTBIT_INS, {{OP,4}, {rpbase_disps20,16}}}, \
+ /* opcNN iN rrp (Rindex)disps20(RPbase) */ \
+ {NAME, 3, (OPC2+2), 12, CSTBIT_INS, {{OP,4}, {rpindex_disps20,16}}}
+
+ CSTBIT_INST_B ("cbitb", uimm3, 0x68, 0x00104, 0xD6, 0x1AA),
+ CSTBIT_INST_B ("sbitb", uimm3, 0x70, 0x00108, 0xE6, 0x1CA),
+ CSTBIT_INST_B ("tbitb", uimm3, 0x78, 0x0010C, 0xF6, 0x1EA),
+
+/* Create a bit-w instruction. */
+#define CSTBIT_INST_W(NAME, OP, OPC1, OPC2, OPC3, OPC4) \
+ /* opcNN iN abs20 */ \
+ {NAME, 2, OPC1+6, 24, CSTBIT_INS, {{OP,20},{abs20,0}}}, \
+ /* opcNN iN abs24 */ \
+ {NAME, 3, OPC2+3, 12, CSTBIT_INS, {{OP,4},{abs24,16}}}, \
+ /* opcNN iN (Rindex)abs20 */ \
+ {NAME, 2, OPC3, 25, CSTBIT_INS, {{OP,20}, {rindex8_abs20,0}}}, \
+ /* opcNN iN (prp) disps14(RPbase) */ \
+ {NAME, 2, OPC4, 22, CSTBIT_INS, {{OP,4},{rpindex_disps14,0}}}, \
+ /* opcNN iN disps20(Rbase) */ \
+ {NAME, 3, OPC2, 12, CSTBIT_INS, {{OP,4}, {rbase_disps20,16}}}, \
+ /* opcNN iN (rp) disps0(RPbase) */ \
+ {NAME, 1, OPC1+5, 24, CSTBIT_INS, {{OP,20}, {rpbase_disps0,16}}}, \
+ /* opcNN iN (rp) disps16(RPBase) */ \
+ {NAME, 2, OPC1, 24, CSTBIT_INS, {{OP,20}, {rpbase_disps16,0}}}, \
+ /* opcNN iN (rp) disps20(RPBase) */ \
+ {NAME, 3, OPC2+1, 12, CSTBIT_INS, {{OP,4}, {rpbase_disps20,16}}}, \
+ /* opcNN iN rrp (Rindex)disps20(RPbase) */ \
+ {NAME, 3, OPC2+2, 12, CSTBIT_INS, {{OP,4}, {rpindex_disps20,16}}}
+
+ CSTBIT_INST_W ("cbitw", uimm4, 0x69, 0x00114, 0x36, 0x1AB),
+ CSTBIT_INST_W ("sbitw", uimm4, 0x71, 0x00118, 0x3A, 0x1CB),
+ CSTBIT_INST_W ("tbitw", uimm4, 0x79, 0x0011C, 0x3E, 0x1EB),
+
+ /* tbit cnt */
+ {"tbit", 1, 0x06, 24, CSTBIT_INS, {{uimm4,20}, {regr,16}}},
+ /* tbit reg reg */
+ {"tbit", 1, 0x07, 24, CSTBIT_INS, {{regr,20}, {regr,16}}},
+
+
+/* Load instructions (from memory to register). */
+#define LD_REG_INST(NAME, OPC1, OPC2, OPC3, OPC4, OPC5, OP_S, OP_D) \
+ /* opc8 reg abs20 */ \
+ {NAME, 2, OPC3, 24, LD_STOR_INS, {{abs20,0}, {OP_D,20}}}, \
+ /* opc20 reg abs24 */ \
+ {NAME, 3, OPC1+3, 12, LD_STOR_INS, {{abs24,16}, {OP_D,4}}}, \
+ /* opc7 reg rindex8_abs20 */ \
+ {NAME, 2, OPC5, 25, LD_STOR_INS, {{rindex8_abs20,0}, {OP_D,20}}}, \
+ /* opc4 reg disps4(RPbase) */ \
+ {NAME, 1, (OPC2>>4), 28, LD_STOR_INS, {{OP_S,24}, {OP_D,20}}}, \
+ /* opcNN reg disps0(RPbase) */ \
+ {NAME, 1, OPC2, 24, LD_STOR_INS, {{rpindex_disps0,0}, {OP_D,20}}}, \
+ /* opc reg disps14(RPbase) */ \
+ {NAME, 2, OPC4, 22, LD_STOR_INS, {{rpindex_disps14,0}, {OP_D,20}}}, \
+ /* opc reg -disps20(Rbase) */ \
+ {NAME, 3, OPC1+0x60, 12, LD_STOR_INS, {{rbase_dispe20,16}, {OP_D,4}}}, \
+ /* opc reg disps20(Rbase) */ \
+ {NAME, 3, OPC1, 12, LD_STOR_INS, {{rbase_disps20,16}, {OP_D,4}}}, \
+ /* opc reg (rp) disps16(RPbase) */ \
+ {NAME, 2, OPC2+1, 24, LD_STOR_INS, {{rpbase_disps16,0}, {OP_D,20}}}, \
+ /* opc16 reg (rp) disps20(RPbase) */ \
+ {NAME, 3, OPC1+1, 12, LD_STOR_INS, {{rpbase_disps20,16}, {OP_D,4}}}, \
+ /* op reg (rp) -disps20(RPbase) */ \
+ {NAME, 3, OPC1+0x61, 12, LD_STOR_INS, {{rpbase_dispe20,16}, {OP_D,4}}}, \
+ /* opc reg rrp (Rindex)disps20(RPbase) */ \
+ {NAME, 3, (OPC1+2), 12, LD_STOR_INS, {{rpindex_disps20,16}, {OP_D,4}}}
+
+ LD_REG_INST ("loadb", 0x00124, 0xBE, 0x88, 0x219, 0x45, rpbase_disps4, regr),
+ LD_REG_INST ("loadd", 0x00128, 0xAE, 0x87, 0x21A, 0x46, rpbase_dispe4, regp),
+ LD_REG_INST ("loadw", 0x0012C, 0x9E, 0x89, 0x21B, 0x47, rpbase_dispe4, regr),
+
+/* Store instructions (from reg to memory). */
+#define ST_REG_INST(NAME, OPC1, OPC2, OPC3, OPC4, OPC5, OP_D, OP_S) \
+ /* opc8 reg abs20 */ \
+ {NAME, 2, OPC3, 24, LD_STOR_INS, {{OP_S,20}, {abs20,0}}}, \
+ /* opc20 reg abs24 */ \
+ {NAME, 3, OPC1+3, 12, LD_STOR_INS, {{OP_S,4}, {abs24,16}}}, \
+ /* opc7 reg rindex8_abs20 */ \
+ {NAME, 2, OPC5, 25, LD_STOR_INS, {{OP_S,20}, {rindex8_abs20,0}}}, \
+ /* opc4 reg disps4(RPbase) */ \
+ {NAME, 1, (OPC2>>4), 28, LD_STOR_INS, {{OP_S,20}, {OP_D,24}}}, \
+ /* opcNN reg disps0(RPbase) */ \
+ {NAME, 1, OPC2, 24, LD_STOR_INS, {{OP_S,20}, {rpindex_disps0,0}}}, \
+ /* opc reg disps14(RPbase) */ \
+ {NAME, 2, OPC4, 22, LD_STOR_INS, {{OP_S,20}, {rpindex_disps14,0}}}, \
+ /* opc reg -disps20(Rbase) */ \
+ {NAME, 3, OPC1+0x60, 12, LD_STOR_INS, {{OP_S,4}, {rbase_dispe20,16}}}, \
+ /* opc reg disps20(Rbase) */ \
+ {NAME, 3, OPC1, 12, LD_STOR_INS, {{OP_S,4}, {rbase_disps20,16}}}, \
+ /* opc reg disps16(RPbase) */ \
+ {NAME, 2, OPC2+1, 24, LD_STOR_INS, {{OP_S,20}, {rpbase_disps16,0}}}, \
+ /* opc16 reg disps20(RPbase) */ \
+ {NAME, 3, OPC1+1, 12, LD_STOR_INS, {{OP_S,4}, {rpbase_disps20,16}}}, \
+ /* op reg (rp) -disps20(RPbase) */ \
+ {NAME, 3, OPC1+0x61, 12, LD_STOR_INS, {{OP_S,4}, {rpbase_dispe20,16}}}, \
+ /* opc reg rrp (Rindex)disps20(RPbase) */ \
+ {NAME, 3, OPC1+2, 12, LD_STOR_INS, {{OP_S,4}, {rpindex_disps20,16}}}
+
+
+/* Store instructions (from imm to memory). */
+#define ST_IMM_INST(NAME, OPC1, OPC2, OPC3, OPC4) \
+ /* opcNN iN abs20 */ \
+ {NAME, 2, OPC1, 24, LD_STOR_INS, {{uimm4,20},{abs20,0}}}, \
+ /* opcNN iN abs24 */ \
+ {NAME, 3, OPC2+3, 12, LD_STOR_INS, {{uimm4,4},{abs24,16}}}, \
+ /* opcNN iN (Rindex)abs20 */ \
+ {NAME, 2, OPC3, 25, LD_STOR_INS, {{uimm4,20}, {rindex8_abs20,0}}}, \
+ /* opcNN iN (prp) disps14(RPbase) */ \
+ {NAME, 2, OPC4, 22, LD_STOR_INS, {{uimm4,4},{rpindex_disps14,0}}}, \
+ /* opcNN iN (rp) disps0(RPbase) */ \
+ {NAME, 1, OPC1+1, 24, LD_STOR_INS, {{uimm4,20}, {rpbase_disps0,16}}}, \
+ /* opcNN iN disps20(Rbase) */ \
+ {NAME, 3, OPC2, 12, LD_STOR_INS, {{uimm4,4}, {rbase_disps20,16}}}, \
+ /* opcNN iN (rp) disps16(RPBase) */ \
+ {NAME, 2, OPC1+2, 24, LD_STOR_INS, {{uimm4,20}, {rpbase_disps16,0}}}, \
+ /* opcNN iN (rp) disps20(RPBase) */ \
+ {NAME, 3, OPC2+1, 12, LD_STOR_INS, {{uimm4,4}, {rpbase_disps20,16}}}, \
+ /* opcNN iN rrp (Rindex)disps20(RPbase) */ \
+ {NAME, 3, OPC2+2, 12, LD_STOR_INS, {{uimm4,4}, {rpindex_disps20,16}}}
+
+ ST_REG_INST ("storb", 0x00134, 0xFE, 0xC8, 0x319, 0x65, rpbase_disps4, regr),
+ ST_IMM_INST ("storb", 0x81, 0x00120, 0x42, 0x218),
+ ST_REG_INST ("stord", 0x00138, 0xEE, 0xC7, 0x31A, 0x66, rpbase_dispe4, regp),
+ ST_REG_INST ("storw", 0x0013C, 0xDE, 0xC9, 0x31B, 0x67, rpbase_dispe4, regr),
+ ST_IMM_INST ("storw", 0xC1, 0x00130, 0x62, 0x318),
+
+/* Create instruction with no operands. */
+#define NO_OP_INST(NAME, OPC) \
+ /* opc16 */ \
+ {NAME, 1, OPC, 16, 0, {{0, 0}}}
+
+ NO_OP_INST ("cinv[i]", 0x000A),
+ NO_OP_INST ("cinv[i,u]", 0x000B),
+ NO_OP_INST ("cinv[d]", 0x000C),
+ NO_OP_INST ("cinv[d,u]", 0x000D),
+ NO_OP_INST ("cinv[d,i]", 0x000E),
+ NO_OP_INST ("cinv[d,i,u]", 0x000F),
+ NO_OP_INST ("nop", 0x2C00),
+ NO_OP_INST ("retx", 0x0003),
+ NO_OP_INST ("di", 0x0004),
+ NO_OP_INST ("ei", 0x0005),
+ NO_OP_INST ("wait", 0x0006),
+ NO_OP_INST ("eiwait", 0x0007),
+
+ {NULL, 0, 0, 0, 0, {{0, 0}}}
+};
+
+const unsigned int cr16_num_opcodes = ARRAY_SIZE (cr16_instruction);
+
+/* Macro to build a reg_entry, which have an opcode image :
+ For example :
+ REG(u4, 0x84, CR16_U_REGTYPE)
+ is interpreted as :
+ {"u4", u4, 0x84, CR16_U_REGTYPE} */
+#define REG(NAME, N, TYPE) {STRINGX(NAME), {NAME}, N, TYPE}
+
+#define REGP(NAME, BNAME, N, TYPE) {STRINGX(NAME), {BNAME}, N, TYPE}
+
+const reg_entry cr16_regtab[] =
+{ /* Build a general purpose register r<N>. */
+#define REG_R(N) REG(CONCAT2(r,N), N, CR16_R_REGTYPE)
+
+ REG_R(0), REG_R(1), REG_R(2), REG_R(3),
+ REG_R(4), REG_R(5), REG_R(6), REG_R(7),
+ REG_R(8), REG_R(9), REG_R(10), REG_R(11),
+ REG_R(12), REG_R(13), REG_R(14), REG_R(15),
+ REG(r12_L, 12, CR16_R_REGTYPE),
+ REG(r13_L, 13, CR16_R_REGTYPE),
+ REG(ra, 0xe, CR16_R_REGTYPE),
+ REG(sp, 0xf, CR16_R_REGTYPE),
+ REG(sp_L, 0xf, CR16_R_REGTYPE),
+ REG(RA, 0xe, CR16_R_REGTYPE),
+};
+
+const reg_entry cr16_regptab[] =
+{ /* Build a general purpose register r<N>. */
+
+#define REG_RP(M,N) REGP((CONCAT2(r,M),CONCAT2(r,N)), CONCAT2(r,N), N, CR16_RP_REGTYPE)
+
+ REG_RP(1,0), REG_RP(2,1), REG_RP(3,2), REG_RP(4,3),
+ REG_RP(5,4), REG_RP(6,5), REG_RP(7,6), REG_RP(8,7),
+ REG_RP(9,8), REG_RP(10,9), REG_RP(11,10), REG_RP(12,11),
+ REG((r12), 0xc, CR16_RP_REGTYPE),
+ REG((r13), 0xd, CR16_RP_REGTYPE),
+ //REG((r14), 0xe, CR16_RP_REGTYPE),
+ REG((ra), 0xe, CR16_RP_REGTYPE),
+ REG((sp), 0xf, CR16_RP_REGTYPE),
+};
+
+
+const unsigned int cr16_num_regs = ARRAY_SIZE (cr16_regtab) ;
+const unsigned int cr16_num_regps = ARRAY_SIZE (cr16_regptab) ;
+
+const reg_entry cr16_pregtab[] =
+{
+/* Build a processor register. */
+ REG(dbs, 0x0, CR16_P_REGTYPE),
+ REG(dsr, 0x1, CR16_P_REGTYPE),
+ REG(dcrl, 0x2, CR16_P_REGTYPE),
+ REG(dcrh, 0x3, CR16_P_REGTYPE),
+ REG(car0l, 0x4, CR16_P_REGTYPE),
+ REG(car0h, 0x5, CR16_P_REGTYPE),
+ REG(car1l, 0x6, CR16_P_REGTYPE),
+ REG(car1h, 0x7, CR16_P_REGTYPE),
+ REG(cfg, 0x8, CR16_P_REGTYPE),
+ REG(psr, 0x9, CR16_P_REGTYPE),
+ REG(intbasel, 0xa, CR16_P_REGTYPE),
+ REG(intbaseh, 0xb, CR16_P_REGTYPE),
+ REG(ispl, 0xc, CR16_P_REGTYPE),
+ REG(isph, 0xd, CR16_P_REGTYPE),
+ REG(uspl, 0xe, CR16_P_REGTYPE),
+ REG(usph, 0xf, CR16_P_REGTYPE),
+};
+
+const reg_entry cr16_pregptab[] =
+{
+ REG(dbs, 0, CR16_P_REGTYPE),
+ REG(dsr, 1, CR16_P_REGTYPE),
+ REG(dcr, 2, CR16_P_REGTYPE),
+ REG(car0, 4, CR16_P_REGTYPE),
+ REG(car1, 6, CR16_P_REGTYPE),
+ REG(cfg, 8, CR16_P_REGTYPE),
+ REG(psr, 9, CR16_P_REGTYPE),
+ REG(intbase, 10, CR16_P_REGTYPE),
+ REG(isp, 12, CR16_P_REGTYPE),
+ REG(usp, 14, CR16_P_REGTYPE),
+};
+
+const unsigned int cr16_num_pregs = ARRAY_SIZE (cr16_pregtab);
+const unsigned int cr16_num_pregps = ARRAY_SIZE (cr16_pregptab);
+
+const char *cr16_b_cond_tab[]=
+{
+ "eq","ne","cs","cc","hi","ls","gt","le","fs","fc",
+ "lo","hs","lt","ge","r", "???"
+};
+
+const unsigned int cr16_num_cc = ARRAY_SIZE (cr16_b_cond_tab);
+
+/* CR16 operands table. */
+const operand_entry cr16_optab[] =
+{
+ /* Index 0 is dummy, so we can count the instruction's operands. */
+ {0, nullargs, 0}, /* dummy */
+ {3, arg_ic, OP_SIGNED}, /* imm3 */
+ {4, arg_ic, OP_SIGNED}, /* imm4 */
+ {5, arg_ic, OP_SIGNED}, /* imm5 */
+ {6, arg_ic, OP_SIGNED}, /* imm6 */
+ {16, arg_ic, OP_SIGNED}, /* imm16 */
+ {20, arg_ic, OP_SIGNED}, /* imm20 */
+ {32, arg_ic, OP_SIGNED}, /* imm32 */
+ {3, arg_ic, OP_UNSIGNED}, /* uimm3 */
+ {3, arg_ic, OP_UNSIGNED|OP_DEC}, /* uimm3_1 */
+ {4, arg_ic, OP_UNSIGNED}, /* uimm4 */
+ {4, arg_ic, OP_UNSIGNED|OP_ESC}, /* uimm4_1 */
+ {5, arg_ic, OP_UNSIGNED}, /* uimm5 */
+ {16, arg_ic, OP_UNSIGNED}, /* uimm16 */
+ {20, arg_ic, OP_UNSIGNED}, /* uimm20 */
+ {32, arg_ic, OP_UNSIGNED}, /* uimm32 */
+ {5, arg_c, OP_EVEN|OP_SHIFT_DEC|OP_SIGNED}, /* disps5 */
+ {16, arg_c, OP_EVEN|OP_UNSIGNED}, /* disps17 */
+ {24, arg_c, OP_EVEN|OP_UNSIGNED}, /* disps25 */
+ {8, arg_c, OP_EVEN|OP_UNSIGNED}, /* dispe9 */
+ {20, arg_c, OP_UNSIGNED|OP_ABS20}, /* abs20 */
+ {24, arg_c, OP_UNSIGNED|OP_ABS24}, /* abs24 */
+ {4, arg_rp, 0}, /* rra */
+ {4, arg_rbase, 0}, /* rbase */
+ {20, arg_cr, OP_UNSIGNED}, /* rbase_disps20 */
+ {21, arg_cr, OP_NEG}, /* rbase_dispe20 */
+ {0, arg_crp, 0}, /* rpbase_disps0 */
+ {4, arg_crp, OP_EVEN|OP_SHIFT|OP_UNSIGNED|OP_ESC1},/* rpbase_dispe4 */
+ {4, arg_crp, OP_UNSIGNED|OP_ESC1}, /* rpbase_disps4 */
+ {16, arg_crp, OP_UNSIGNED}, /* rpbase_disps16 */
+ {20, arg_crp, OP_UNSIGNED}, /* rpbase_disps20 */
+ {21, arg_crp, OP_NEG}, /* rpbase_dispe20 */
+ {20, arg_idxr, OP_UNSIGNED}, /* rindex7_abs20 */
+ {20, arg_idxr, OP_UNSIGNED}, /* rindex8_abs20 */
+ {0, arg_idxrp, OP_UNSIGNED}, /* rpindex_disps0 */
+ {14, arg_idxrp, OP_UNSIGNED}, /* rpindex_disps14 */
+ {20, arg_idxrp, OP_UNSIGNED}, /* rpindex_disps20 */
+ {4, arg_r, 0}, /* regr */
+ {4, arg_rp, 0}, /* reg pair */
+ {4, arg_pr, 0}, /* proc reg */
+ {4, arg_prp, 0}, /* 32 bit proc reg */
+ {4, arg_cc, OP_UNSIGNED} /* cc - code */
+};
+
+
+/* CR16 traps/interrupts. */
+const trap_entry cr16_traps[] =
+{
+ {"svc", 5}, {"dvz", 6}, {"flg", 7}, {"bpt", 8}, {"trc", 9},
+ {"und", 10}, {"iad", 12}, {"dbg",14}, {"ise",15}
+};
+
+const unsigned int cr16_num_traps = ARRAY_SIZE (cr16_traps);
+
+/* CR16 instructions that don't have arguments. */
+const char * cr16_no_op_insn[] =
+{
+ "cinv[i]", "cinv[i,u]", "cinv[d]", "cinv[d,u]", "cinv[d,i]", "cinv[d,i,u]",
+ "di", "ei", "eiwait", "nop", "retx", "wait", NULL
+};
diff --git a/contrib/binutils/opcodes/disassemble.c b/contrib/binutils/opcodes/disassemble.c
index 3ea4583..df98dc2 100644
--- a/contrib/binutils/opcodes/disassemble.c
+++ b/contrib/binutils/opcodes/disassemble.c
@@ -1,6 +1,6 @@
/* Select disassembly routine for specified architecture.
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005 Free Software Foundation, Inc.
+ 2004, 2005, 2006 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
@@ -25,6 +25,7 @@
#define ARCH_arm
#define ARCH_avr
#define ARCH_bfin
+#define ARCH_cr16
#define ARCH_cris
#define ARCH_crx
#define ARCH_d10v
@@ -50,6 +51,7 @@
#define ARCH_m88k
#define ARCH_maxq
#define ARCH_mcore
+#define ARCH_mep
#define ARCH_mips
#define ARCH_mmix
#define ARCH_mn10200
@@ -64,8 +66,10 @@
#define ARCH_powerpc
#define ARCH_rs6000
#define ARCH_s390
+#define ARCH_score
#define ARCH_sh
#define ARCH_sparc
+#define ARCH_spu
#define ARCH_tic30
#define ARCH_tic4x
#define ARCH_tic54x
@@ -126,6 +130,11 @@ disassembler (abfd)
disassemble = print_insn_bfin;
break;
#endif
+#ifdef ARCH_cr16
+ case bfd_arch_cr16:
+ disassemble = print_insn_cr16;
+ break;
+#endif
#ifdef ARCH_cris
case bfd_arch_cris:
disassemble = cris_get_disassembler (abfd);
@@ -259,6 +268,11 @@ disassembler (abfd)
disassemble = print_insn_mcore;
break;
#endif
+#ifdef ARCH_mep
+ case bfd_arch_mep:
+ disassemble = print_insn_mep;
+ break;
+#endif
#ifdef ARCH_mips
case bfd_arch_mips:
if (bfd_big_endian (abfd))
@@ -326,6 +340,14 @@ disassembler (abfd)
disassemble = print_insn_s390;
break;
#endif
+#ifdef ARCH_score
+ case bfd_arch_score:
+ if (bfd_big_endian (abfd))
+ disassemble = print_insn_big_score;
+ else
+ disassemble = print_insn_little_score;
+ break;
+#endif
#ifdef ARCH_sh
case bfd_arch_sh:
disassemble = print_insn_sh;
@@ -336,6 +358,11 @@ disassembler (abfd)
disassemble = print_insn_sparc;
break;
#endif
+#ifdef ARCH_spu
+ case bfd_arch_spu:
+ disassemble = print_insn_spu;
+ break;
+#endif
#ifdef ARCH_tic30
case bfd_arch_tic30:
disassemble = print_insn_tic30;
@@ -433,6 +460,9 @@ disassembler_usage (stream)
#ifdef ARCH_powerpc
print_ppc_disassembler_options (stream);
#endif
+#ifdef ARCH_i386
+ print_i386_disassembler_options (stream);
+#endif
return;
}
@@ -461,6 +491,12 @@ disassemble_init_for_target (struct disassemble_info * info)
info->skip_zeroes = 32;
break;
#endif
+#ifdef ARCH_mep
+ case bfd_arch_mep:
+ info->skip_zeroes = 256;
+ info->skip_zeroes_at_end = 0;
+ break;
+#endif
#ifdef ARCH_m32c
case bfd_arch_m32c:
info->endian = BFD_ENDIAN_BIG;
diff --git a/contrib/binutils/opcodes/i386-dis.c b/contrib/binutils/opcodes/i386-dis.c
index f73e883..e84d314 100644
--- a/contrib/binutils/opcodes/i386-dis.c
+++ b/contrib/binutils/opcodes/i386-dis.c
@@ -1,6 +1,6 @@
/* Print i386 instructions for GDB, the GNU debugger.
Copyright 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GDB.
@@ -34,17 +34,10 @@
#include "dis-asm.h"
#include "sysdep.h"
#include "opintl.h"
-
-#define MAXLEN 15
+#include "opcode/i386.h"
#include <setjmp.h>
-#ifndef UNIXWARE_COMPAT
-/* Set non-zero for broken, compatible instructions. Set to zero for
- non-broken opcodes. */
-#define UNIXWARE_COMPAT 1
-#endif
-
static int fetch_data (struct disassemble_info *, bfd_byte *);
static void ckprefix (void);
static const char *prefix_name (int, int);
@@ -57,6 +50,7 @@ static void oappend (const char *);
static void append_seg (void);
static void OP_indirE (int, int);
static void print_operand_value (char *, int, bfd_vma);
+static void print_displacement (char *, bfd_vma);
static void OP_E (int, int);
static void OP_G (int, int);
static bfd_vma get64 (void);
@@ -80,18 +74,21 @@ static void OP_DSreg (int, int);
static void OP_C (int, int);
static void OP_D (int, int);
static void OP_T (int, int);
-static void OP_Rd (int, int);
+static void OP_R (int, int);
static void OP_MMX (int, int);
static void OP_XMM (int, int);
static void OP_EM (int, int);
static void OP_EX (int, int);
+static void OP_EMC (int,int);
+static void OP_MXC (int,int);
static void OP_MS (int, int);
static void OP_XS (int, int);
static void OP_M (int, int);
static void OP_VMX (int, int);
static void OP_0fae (int, int);
static void OP_0f07 (int, int);
-static void NOP_Fixup (int, int);
+static void NOP_Fixup1 (int, int);
+static void NOP_Fixup2 (int, int);
static void OP_3DNowSuffix (int, int);
static void OP_SIMD_Suffix (int, int);
static void SIMD_Fixup (int, int);
@@ -99,23 +96,21 @@ static void PNI_Fixup (int, int);
static void SVME_Fixup (int, int);
static void INVLPG_Fixup (int, int);
static void BadOp (void);
-static void SEG_Fixup (int, int);
static void VMX_Fixup (int, int);
static void REP_Fixup (int, int);
+static void CMPXCHG8B_Fixup (int, int);
+static void XMM_Fixup (int, int);
+static void CRC32_Fixup (int, int);
struct dis_private {
/* Points to first byte not fetched. */
bfd_byte *max_fetched;
- bfd_byte the_buffer[MAXLEN];
+ bfd_byte the_buffer[MAX_MNEM_SIZE];
bfd_vma insn_start;
int orig_sizeflag;
jmp_buf bailout;
};
-/* The opcode for the fwait instruction, which we treat as a prefix
- when we can. */
-#define FWAIT_OPCODE (0x9b)
-
enum address_mode
{
mode_16bit,
@@ -132,10 +127,6 @@ static int prefixes;
static int rex;
/* Bits of REX we've already used. */
static int rex_used;
-#define REX_MODE64 8
-#define REX_EXTX 4
-#define REX_EXTY 2
-#define REX_EXTZ 1
/* Mark parts used in the REX prefix. When we are testing for
empty prefix (for 8bit register REX extension), just mask it
out. Otherwise test for REX bit is excuse for existence of REX
@@ -143,9 +134,12 @@ static int rex_used;
#define USED_REX(value) \
{ \
if (value) \
- rex_used |= (rex & value) ? (value) | 0x40 : 0; \
+ { \
+ if ((rex & value)) \
+ rex_used |= (value) | REX_OPCODE; \
+ } \
else \
- rex_used |= 0x40; \
+ rex_used |= REX_OPCODE; \
}
/* Flags for prefixes which we somehow handled when printing the
@@ -180,7 +174,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
struct dis_private *priv = (struct dis_private *) info->private_data;
bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
- if (addr <= priv->the_buffer + MAXLEN)
+ if (addr <= priv->the_buffer + MAX_MNEM_SIZE)
status = (*info->read_memory_func) (start,
priv->max_fetched,
addr - priv->max_fetched,
@@ -202,130 +196,142 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
return 1;
}
-#define XX NULL, 0
-
-#define Eb OP_E, b_mode
-#define Ev OP_E, v_mode
-#define Ed OP_E, d_mode
-#define Eq OP_E, q_mode
-#define Edq OP_E, dq_mode
-#define Edqw OP_E, dqw_mode
-#define indirEv OP_indirE, stack_v_mode
-#define indirEp OP_indirE, f_mode
-#define stackEv OP_E, stack_v_mode
-#define Em OP_E, m_mode
-#define Ew OP_E, w_mode
-#define Ma OP_E, v_mode
-#define M OP_M, 0 /* lea, lgdt, etc. */
-#define Mp OP_M, f_mode /* 32 or 48 bit memory operand for LDS, LES etc */
-#define Gb OP_G, b_mode
-#define Gv OP_G, v_mode
-#define Gd OP_G, d_mode
-#define Gdq OP_G, dq_mode
-#define Gm OP_G, m_mode
-#define Gw OP_G, w_mode
-#define Rd OP_Rd, d_mode
-#define Rm OP_Rd, m_mode
-#define Ib OP_I, b_mode
-#define sIb OP_sI, b_mode /* sign extened byte */
-#define Iv OP_I, v_mode
-#define Iq OP_I, q_mode
-#define Iv64 OP_I64, v_mode
-#define Iw OP_I, w_mode
-#define I1 OP_I, const_1_mode
-#define Jb OP_J, b_mode
-#define Jv OP_J, v_mode
-#define Cm OP_C, m_mode
-#define Dm OP_D, m_mode
-#define Td OP_T, d_mode
-#define Sv SEG_Fixup, v_mode
-
-#define RMeAX OP_REG, eAX_reg
-#define RMeBX OP_REG, eBX_reg
-#define RMeCX OP_REG, eCX_reg
-#define RMeDX OP_REG, eDX_reg
-#define RMeSP OP_REG, eSP_reg
-#define RMeBP OP_REG, eBP_reg
-#define RMeSI OP_REG, eSI_reg
-#define RMeDI OP_REG, eDI_reg
-#define RMrAX OP_REG, rAX_reg
-#define RMrBX OP_REG, rBX_reg
-#define RMrCX OP_REG, rCX_reg
-#define RMrDX OP_REG, rDX_reg
-#define RMrSP OP_REG, rSP_reg
-#define RMrBP OP_REG, rBP_reg
-#define RMrSI OP_REG, rSI_reg
-#define RMrDI OP_REG, rDI_reg
-#define RMAL OP_REG, al_reg
-#define RMAL OP_REG, al_reg
-#define RMCL OP_REG, cl_reg
-#define RMDL OP_REG, dl_reg
-#define RMBL OP_REG, bl_reg
-#define RMAH OP_REG, ah_reg
-#define RMCH OP_REG, ch_reg
-#define RMDH OP_REG, dh_reg
-#define RMBH OP_REG, bh_reg
-#define RMAX OP_REG, ax_reg
-#define RMDX OP_REG, dx_reg
-
-#define eAX OP_IMREG, eAX_reg
-#define eBX OP_IMREG, eBX_reg
-#define eCX OP_IMREG, eCX_reg
-#define eDX OP_IMREG, eDX_reg
-#define eSP OP_IMREG, eSP_reg
-#define eBP OP_IMREG, eBP_reg
-#define eSI OP_IMREG, eSI_reg
-#define eDI OP_IMREG, eDI_reg
-#define AL OP_IMREG, al_reg
-#define CL OP_IMREG, cl_reg
-#define DL OP_IMREG, dl_reg
-#define BL OP_IMREG, bl_reg
-#define AH OP_IMREG, ah_reg
-#define CH OP_IMREG, ch_reg
-#define DH OP_IMREG, dh_reg
-#define BH OP_IMREG, bh_reg
-#define AX OP_IMREG, ax_reg
-#define DX OP_IMREG, dx_reg
-#define indirDX OP_IMREG, indir_dx_reg
-
-#define Sw OP_SEG, w_mode
-#define Ap OP_DIR, 0
-#define Ob OP_OFF64, b_mode
-#define Ov OP_OFF64, v_mode
-#define Xb OP_DSreg, eSI_reg
-#define Xv OP_DSreg, eSI_reg
-#define Yb OP_ESreg, eDI_reg
-#define Yv OP_ESreg, eDI_reg
-#define DSBX OP_DSreg, eBX_reg
-
-#define es OP_REG, es_reg
-#define ss OP_REG, ss_reg
-#define cs OP_REG, cs_reg
-#define ds OP_REG, ds_reg
-#define fs OP_REG, fs_reg
-#define gs OP_REG, gs_reg
-
-#define MX OP_MMX, 0
-#define XM OP_XMM, 0
-#define EM OP_EM, v_mode
-#define EX OP_EX, v_mode
-#define MS OP_MS, v_mode
-#define XS OP_XS, v_mode
-#define VM OP_VMX, q_mode
-#define OPSUF OP_3DNowSuffix, 0
-#define OPSIMD OP_SIMD_Suffix, 0
+#define XX { NULL, 0 }
+
+#define Eb { OP_E, b_mode }
+#define Ev { OP_E, v_mode }
+#define Ed { OP_E, d_mode }
+#define Edq { OP_E, dq_mode }
+#define Edqw { OP_E, dqw_mode }
+#define Edqb { OP_E, dqb_mode }
+#define Edqd { OP_E, dqd_mode }
+#define indirEv { OP_indirE, stack_v_mode }
+#define indirEp { OP_indirE, f_mode }
+#define stackEv { OP_E, stack_v_mode }
+#define Em { OP_E, m_mode }
+#define Ew { OP_E, w_mode }
+#define M { OP_M, 0 } /* lea, lgdt, etc. */
+#define Ma { OP_M, v_mode }
+#define Mp { OP_M, f_mode } /* 32 or 48 bit memory operand for LDS, LES etc */
+#define Mq { OP_M, q_mode }
+#define Gb { OP_G, b_mode }
+#define Gv { OP_G, v_mode }
+#define Gd { OP_G, d_mode }
+#define Gdq { OP_G, dq_mode }
+#define Gm { OP_G, m_mode }
+#define Gw { OP_G, w_mode }
+#define Rd { OP_R, d_mode }
+#define Rm { OP_R, m_mode }
+#define Ib { OP_I, b_mode }
+#define sIb { OP_sI, b_mode } /* sign extened byte */
+#define Iv { OP_I, v_mode }
+#define Iq { OP_I, q_mode }
+#define Iv64 { OP_I64, v_mode }
+#define Iw { OP_I, w_mode }
+#define I1 { OP_I, const_1_mode }
+#define Jb { OP_J, b_mode }
+#define Jv { OP_J, v_mode }
+#define Cm { OP_C, m_mode }
+#define Dm { OP_D, m_mode }
+#define Td { OP_T, d_mode }
+
+#define RMeAX { OP_REG, eAX_reg }
+#define RMeBX { OP_REG, eBX_reg }
+#define RMeCX { OP_REG, eCX_reg }
+#define RMeDX { OP_REG, eDX_reg }
+#define RMeSP { OP_REG, eSP_reg }
+#define RMeBP { OP_REG, eBP_reg }
+#define RMeSI { OP_REG, eSI_reg }
+#define RMeDI { OP_REG, eDI_reg }
+#define RMrAX { OP_REG, rAX_reg }
+#define RMrBX { OP_REG, rBX_reg }
+#define RMrCX { OP_REG, rCX_reg }
+#define RMrDX { OP_REG, rDX_reg }
+#define RMrSP { OP_REG, rSP_reg }
+#define RMrBP { OP_REG, rBP_reg }
+#define RMrSI { OP_REG, rSI_reg }
+#define RMrDI { OP_REG, rDI_reg }
+#define RMAL { OP_REG, al_reg }
+#define RMAL { OP_REG, al_reg }
+#define RMCL { OP_REG, cl_reg }
+#define RMDL { OP_REG, dl_reg }
+#define RMBL { OP_REG, bl_reg }
+#define RMAH { OP_REG, ah_reg }
+#define RMCH { OP_REG, ch_reg }
+#define RMDH { OP_REG, dh_reg }
+#define RMBH { OP_REG, bh_reg }
+#define RMAX { OP_REG, ax_reg }
+#define RMDX { OP_REG, dx_reg }
+
+#define eAX { OP_IMREG, eAX_reg }
+#define eBX { OP_IMREG, eBX_reg }
+#define eCX { OP_IMREG, eCX_reg }
+#define eDX { OP_IMREG, eDX_reg }
+#define eSP { OP_IMREG, eSP_reg }
+#define eBP { OP_IMREG, eBP_reg }
+#define eSI { OP_IMREG, eSI_reg }
+#define eDI { OP_IMREG, eDI_reg }
+#define AL { OP_IMREG, al_reg }
+#define CL { OP_IMREG, cl_reg }
+#define DL { OP_IMREG, dl_reg }
+#define BL { OP_IMREG, bl_reg }
+#define AH { OP_IMREG, ah_reg }
+#define CH { OP_IMREG, ch_reg }
+#define DH { OP_IMREG, dh_reg }
+#define BH { OP_IMREG, bh_reg }
+#define AX { OP_IMREG, ax_reg }
+#define DX { OP_IMREG, dx_reg }
+#define zAX { OP_IMREG, z_mode_ax_reg }
+#define indirDX { OP_IMREG, indir_dx_reg }
+
+#define Sw { OP_SEG, w_mode }
+#define Sv { OP_SEG, v_mode }
+#define Ap { OP_DIR, 0 }
+#define Ob { OP_OFF64, b_mode }
+#define Ov { OP_OFF64, v_mode }
+#define Xb { OP_DSreg, eSI_reg }
+#define Xv { OP_DSreg, eSI_reg }
+#define Xz { OP_DSreg, eSI_reg }
+#define Yb { OP_ESreg, eDI_reg }
+#define Yv { OP_ESreg, eDI_reg }
+#define DSBX { OP_DSreg, eBX_reg }
+
+#define es { OP_REG, es_reg }
+#define ss { OP_REG, ss_reg }
+#define cs { OP_REG, cs_reg }
+#define ds { OP_REG, ds_reg }
+#define fs { OP_REG, fs_reg }
+#define gs { OP_REG, gs_reg }
+
+#define MX { OP_MMX, 0 }
+#define XM { OP_XMM, 0 }
+#define EM { OP_EM, v_mode }
+#define EMd { OP_EM, d_mode }
+#define EMq { OP_EM, q_mode }
+#define EXd { OP_EX, d_mode }
+#define EXq { OP_EX, q_mode }
+#define EXx { OP_EX, x_mode }
+#define MS { OP_MS, v_mode }
+#define XS { OP_XS, v_mode }
+#define EMC { OP_EMC, v_mode }
+#define MXC { OP_MXC, 0 }
+#define VM { OP_VMX, q_mode }
+#define OPSUF { OP_3DNowSuffix, 0 }
+#define OPSIMD { OP_SIMD_Suffix, 0 }
+#define XMM0 { XMM_Fixup, 0 }
/* Used handle "rep" prefix for string instructions. */
-#define Xbr REP_Fixup, eSI_reg
-#define Xvr REP_Fixup, eSI_reg
-#define Ybr REP_Fixup, eDI_reg
-#define Yvr REP_Fixup, eDI_reg
-#define indirDXr REP_Fixup, indir_dx_reg
-#define ALr REP_Fixup, al_reg
-#define eAXr REP_Fixup, eAX_reg
-
-#define cond_jump_flag NULL, cond_jump_mode
-#define loop_jcxz_flag NULL, loop_jcxz_mode
+#define Xbr { REP_Fixup, eSI_reg }
+#define Xvr { REP_Fixup, eSI_reg }
+#define Ybr { REP_Fixup, eDI_reg }
+#define Yvr { REP_Fixup, eDI_reg }
+#define Yzr { REP_Fixup, eDI_reg }
+#define indirDXr { REP_Fixup, indir_dx_reg }
+#define ALr { REP_Fixup, al_reg }
+#define eAXr { REP_Fixup, eAX_reg }
+
+#define cond_jump_flag { NULL, cond_jump_mode }
+#define loop_jcxz_flag { NULL, loop_jcxz_mode }
/* bits in sizeflag */
#define SUFFIX_ALWAYS 4
@@ -347,6 +353,10 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define f_mode 13 /* 4- or 6-byte pointer operand */
#define const_1_mode 14
#define stack_v_mode 15 /* v_mode for stack-related opcodes. */
+#define z_mode 16 /* non-quad operand size depends on prefixes */
+#define o_mode 17 /* 16-byte operand */
+#define dqb_mode 18 /* registers like dq_mode, memory like b_mode. */
+#define dqd_mode 19 /* registers like dq_mode, memory like d_mode. */
#define es_reg 100
#define cs_reg 101
@@ -391,6 +401,7 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define rSI_reg 138
#define rDI_reg 139
+#define z_mode_ax_reg 149
#define indir_dx_reg 150
#define FLOATCODE 1
@@ -399,83 +410,154 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
#define X86_64_SPECIAL 4
#define IS_3BYTE_OPCODE 5
-#define FLOAT NULL, NULL, FLOATCODE, NULL, 0, NULL, 0
-
-#define GRP1b NULL, NULL, USE_GROUPS, NULL, 0, NULL, 0
-#define GRP1S NULL, NULL, USE_GROUPS, NULL, 1, NULL, 0
-#define GRP1Ss NULL, NULL, USE_GROUPS, NULL, 2, NULL, 0
-#define GRP2b NULL, NULL, USE_GROUPS, NULL, 3, NULL, 0
-#define GRP2S NULL, NULL, USE_GROUPS, NULL, 4, NULL, 0
-#define GRP2b_one NULL, NULL, USE_GROUPS, NULL, 5, NULL, 0
-#define GRP2S_one NULL, NULL, USE_GROUPS, NULL, 6, NULL, 0
-#define GRP2b_cl NULL, NULL, USE_GROUPS, NULL, 7, NULL, 0
-#define GRP2S_cl NULL, NULL, USE_GROUPS, NULL, 8, NULL, 0
-#define GRP3b NULL, NULL, USE_GROUPS, NULL, 9, NULL, 0
-#define GRP3S NULL, NULL, USE_GROUPS, NULL, 10, NULL, 0
-#define GRP4 NULL, NULL, USE_GROUPS, NULL, 11, NULL, 0
-#define GRP5 NULL, NULL, USE_GROUPS, NULL, 12, NULL, 0
-#define GRP6 NULL, NULL, USE_GROUPS, NULL, 13, NULL, 0
-#define GRP7 NULL, NULL, USE_GROUPS, NULL, 14, NULL, 0
-#define GRP8 NULL, NULL, USE_GROUPS, NULL, 15, NULL, 0
-#define GRP9 NULL, NULL, USE_GROUPS, NULL, 16, NULL, 0
-#define GRP10 NULL, NULL, USE_GROUPS, NULL, 17, NULL, 0
-#define GRP11 NULL, NULL, USE_GROUPS, NULL, 18, NULL, 0
-#define GRP12 NULL, NULL, USE_GROUPS, NULL, 19, NULL, 0
-#define GRP13 NULL, NULL, USE_GROUPS, NULL, 20, NULL, 0
-#define GRP14 NULL, NULL, USE_GROUPS, NULL, 21, NULL, 0
-#define GRPAMD NULL, NULL, USE_GROUPS, NULL, 22, NULL, 0
-#define GRPPADLCK1 NULL, NULL, USE_GROUPS, NULL, 23, NULL, 0
-#define GRPPADLCK2 NULL, NULL, USE_GROUPS, NULL, 24, NULL, 0
-
-#define PREGRP0 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 0, NULL, 0
-#define PREGRP1 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 1, NULL, 0
-#define PREGRP2 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 2, NULL, 0
-#define PREGRP3 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 3, NULL, 0
-#define PREGRP4 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 4, NULL, 0
-#define PREGRP5 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 5, NULL, 0
-#define PREGRP6 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 6, NULL, 0
-#define PREGRP7 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 7, NULL, 0
-#define PREGRP8 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 8, NULL, 0
-#define PREGRP9 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 9, NULL, 0
-#define PREGRP10 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 10, NULL, 0
-#define PREGRP11 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 11, NULL, 0
-#define PREGRP12 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 12, NULL, 0
-#define PREGRP13 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 13, NULL, 0
-#define PREGRP14 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 14, NULL, 0
-#define PREGRP15 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 15, NULL, 0
-#define PREGRP16 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 16, NULL, 0
-#define PREGRP17 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 17, NULL, 0
-#define PREGRP18 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 18, NULL, 0
-#define PREGRP19 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 19, NULL, 0
-#define PREGRP20 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 20, NULL, 0
-#define PREGRP21 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 21, NULL, 0
-#define PREGRP22 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 22, NULL, 0
-#define PREGRP23 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 23, NULL, 0
-#define PREGRP24 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 24, NULL, 0
-#define PREGRP25 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 25, NULL, 0
-#define PREGRP26 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 26, NULL, 0
-#define PREGRP27 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 27, NULL, 0
-#define PREGRP28 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 28, NULL, 0
-#define PREGRP29 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 29, NULL, 0
-#define PREGRP30 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 30, NULL, 0
-#define PREGRP31 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 31, NULL, 0
-#define PREGRP32 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 32, NULL, 0
-
-#define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0
-
-#define THREE_BYTE_0 NULL, NULL, IS_3BYTE_OPCODE, NULL, 0, NULL, 0
-#define THREE_BYTE_1 NULL, NULL, IS_3BYTE_OPCODE, NULL, 1, NULL, 0
+#define FLOAT NULL, { { NULL, FLOATCODE } }
+
+#define GRP1a NULL, { { NULL, USE_GROUPS }, { NULL, 0 } }
+#define GRP1b NULL, { { NULL, USE_GROUPS }, { NULL, 1 } }
+#define GRP1S NULL, { { NULL, USE_GROUPS }, { NULL, 2 } }
+#define GRP1Ss NULL, { { NULL, USE_GROUPS }, { NULL, 3 } }
+#define GRP2b NULL, { { NULL, USE_GROUPS }, { NULL, 4 } }
+#define GRP2S NULL, { { NULL, USE_GROUPS }, { NULL, 5 } }
+#define GRP2b_one NULL, { { NULL, USE_GROUPS }, { NULL, 6 } }
+#define GRP2S_one NULL, { { NULL, USE_GROUPS }, { NULL, 7 } }
+#define GRP2b_cl NULL, { { NULL, USE_GROUPS }, { NULL, 8 } }
+#define GRP2S_cl NULL, { { NULL, USE_GROUPS }, { NULL, 9 } }
+#define GRP3b NULL, { { NULL, USE_GROUPS }, { NULL, 10 } }
+#define GRP3S NULL, { { NULL, USE_GROUPS }, { NULL, 11 } }
+#define GRP4 NULL, { { NULL, USE_GROUPS }, { NULL, 12 } }
+#define GRP5 NULL, { { NULL, USE_GROUPS }, { NULL, 13 } }
+#define GRP6 NULL, { { NULL, USE_GROUPS }, { NULL, 14 } }
+#define GRP7 NULL, { { NULL, USE_GROUPS }, { NULL, 15 } }
+#define GRP8 NULL, { { NULL, USE_GROUPS }, { NULL, 16 } }
+#define GRP9 NULL, { { NULL, USE_GROUPS }, { NULL, 17 } }
+#define GRP11_C6 NULL, { { NULL, USE_GROUPS }, { NULL, 18 } }
+#define GRP11_C7 NULL, { { NULL, USE_GROUPS }, { NULL, 19 } }
+#define GRP12 NULL, { { NULL, USE_GROUPS }, { NULL, 20 } }
+#define GRP13 NULL, { { NULL, USE_GROUPS }, { NULL, 21 } }
+#define GRP14 NULL, { { NULL, USE_GROUPS }, { NULL, 22 } }
+#define GRP15 NULL, { { NULL, USE_GROUPS }, { NULL, 23 } }
+#define GRP16 NULL, { { NULL, USE_GROUPS }, { NULL, 24 } }
+#define GRPAMD NULL, { { NULL, USE_GROUPS }, { NULL, 25 } }
+#define GRPPADLCK1 NULL, { { NULL, USE_GROUPS }, { NULL, 26 } }
+#define GRPPADLCK2 NULL, { { NULL, USE_GROUPS }, { NULL, 27 } }
+
+#define PREGRP0 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 0 } }
+#define PREGRP1 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 1 } }
+#define PREGRP2 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 2 } }
+#define PREGRP3 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 3 } }
+#define PREGRP4 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 4 } }
+#define PREGRP5 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 5 } }
+#define PREGRP6 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 6 } }
+#define PREGRP7 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 7 } }
+#define PREGRP8 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 8 } }
+#define PREGRP9 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 9 } }
+#define PREGRP10 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 10 } }
+#define PREGRP11 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 11 } }
+#define PREGRP12 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 12 } }
+#define PREGRP13 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 13 } }
+#define PREGRP14 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 14 } }
+#define PREGRP15 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 15 } }
+#define PREGRP16 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 16 } }
+#define PREGRP17 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 17 } }
+#define PREGRP18 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 18 } }
+#define PREGRP19 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 19 } }
+#define PREGRP20 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 20 } }
+#define PREGRP21 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 21 } }
+#define PREGRP22 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 22 } }
+#define PREGRP23 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 23 } }
+#define PREGRP24 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 24 } }
+#define PREGRP25 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 25 } }
+#define PREGRP26 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 26 } }
+#define PREGRP27 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 27 } }
+#define PREGRP28 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 28 } }
+#define PREGRP29 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 29 } }
+#define PREGRP30 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 30 } }
+#define PREGRP31 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 31 } }
+#define PREGRP32 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 32 } }
+#define PREGRP33 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 33 } }
+#define PREGRP34 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 34 } }
+#define PREGRP35 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 35 } }
+#define PREGRP36 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 36 } }
+#define PREGRP37 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 37 } }
+#define PREGRP38 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 38 } }
+#define PREGRP39 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 39 } }
+#define PREGRP40 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 40 } }
+#define PREGRP41 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 41 } }
+#define PREGRP42 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 42 } }
+#define PREGRP43 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 43 } }
+#define PREGRP44 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 44 } }
+#define PREGRP45 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 45 } }
+#define PREGRP46 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 46 } }
+#define PREGRP47 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 47 } }
+#define PREGRP48 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 48 } }
+#define PREGRP49 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 49 } }
+#define PREGRP50 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 50 } }
+#define PREGRP51 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 51 } }
+#define PREGRP52 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 52 } }
+#define PREGRP53 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 53 } }
+#define PREGRP54 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 54 } }
+#define PREGRP55 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 55 } }
+#define PREGRP56 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 56 } }
+#define PREGRP57 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 57 } }
+#define PREGRP58 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 58 } }
+#define PREGRP59 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 59 } }
+#define PREGRP60 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 60 } }
+#define PREGRP61 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 61 } }
+#define PREGRP62 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 62 } }
+#define PREGRP63 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 63 } }
+#define PREGRP64 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 64 } }
+#define PREGRP65 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 65 } }
+#define PREGRP66 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 66 } }
+#define PREGRP67 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 67 } }
+#define PREGRP68 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 68 } }
+#define PREGRP69 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 69 } }
+#define PREGRP70 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 70 } }
+#define PREGRP71 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 71 } }
+#define PREGRP72 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 72 } }
+#define PREGRP73 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 73 } }
+#define PREGRP74 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 74 } }
+#define PREGRP75 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 75 } }
+#define PREGRP76 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 76 } }
+#define PREGRP77 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 77 } }
+#define PREGRP78 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 78 } }
+#define PREGRP79 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 79 } }
+#define PREGRP80 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 80 } }
+#define PREGRP81 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 81 } }
+#define PREGRP82 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 82 } }
+#define PREGRP83 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 83 } }
+#define PREGRP84 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 84 } }
+#define PREGRP85 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 85 } }
+#define PREGRP86 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 86 } }
+#define PREGRP87 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 87 } }
+#define PREGRP88 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 88 } }
+#define PREGRP89 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 89 } }
+#define PREGRP90 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 90 } }
+#define PREGRP91 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 91 } }
+#define PREGRP92 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 92 } }
+#define PREGRP93 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 93 } }
+#define PREGRP94 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 94 } }
+#define PREGRP95 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 95 } }
+#define PREGRP96 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 96 } }
+#define PREGRP97 NULL, { { NULL, USE_PREFIX_USER_TABLE }, { NULL, 97 } }
+
+
+#define X86_64_0 NULL, { { NULL, X86_64_SPECIAL }, { NULL, 0 } }
+#define X86_64_1 NULL, { { NULL, X86_64_SPECIAL }, { NULL, 1 } }
+#define X86_64_2 NULL, { { NULL, X86_64_SPECIAL }, { NULL, 2 } }
+#define X86_64_3 NULL, { { NULL, X86_64_SPECIAL }, { NULL, 3 } }
+
+#define THREE_BYTE_0 NULL, { { NULL, IS_3BYTE_OPCODE }, { NULL, 0 } }
+#define THREE_BYTE_1 NULL, { { NULL, IS_3BYTE_OPCODE }, { NULL, 1 } }
typedef void (*op_rtn) (int bytemode, int sizeflag);
struct dis386 {
const char *name;
- op_rtn op1;
- int bytemode1;
- op_rtn op2;
- int bytemode2;
- op_rtn op3;
- int bytemode3;
+ struct
+ {
+ op_rtn rtn;
+ int bytemode;
+ } op[MAX_OPERANDS];
};
/* Upper case letters in the instruction names here are macros.
@@ -483,25 +565,29 @@ struct dis386 {
'B' => print 'b' if suffix_always is true
'C' => print 's' or 'l' ('w' or 'd' in Intel mode) depending on operand
. size prefix
+ 'D' => print 'w' if no register operands or 'w', 'l' or 'q', if
+ . suffix_always is true
'E' => print 'e' if 32-bit form of jcxz
'F' => print 'w' or 'l' depending on address size prefix (loop insns)
+ 'G' => print 'w' or 'l' depending on operand size prefix (i/o insns)
'H' => print ",pt" or ",pn" branch hint
'I' => honor following macro letter even in Intel mode (implemented only
. for some of the macro letters)
'J' => print 'l'
+ 'K' => print 'd' or 'q' if rex prefix is present.
'L' => print 'l' if suffix_always is true
'N' => print 'n' if instruction has no wait "prefix"
- 'O' => print 'd', or 'o'
+ 'O' => print 'd' or 'o' (or 'q' in Intel mode)
'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
- 'R' => print 'w', 'l' or 'q' ("wd" or "dq" in intel mode)
+ 'R' => print 'w', 'l' or 'q' ('d' for 'l' and 'e' 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
'U' => print 'q' in 64bit mode and behave as 'Q' otherwise
'V' => print 'q' in 64bit mode and behave as 'S' otherwise
- 'W' => print 'b' or 'w' ("w" or "de" in intel mode)
+ 'W' => print 'b', 'w' or 'l' ('d' in Intel mode)
'X' => print 's', 'd' depending on data16 prefix (for XMM)
'Y' => 'q' if instruction has an REX 64bit overwrite prefix
'Z' => print 'q' in 64bit mode and behave as 'L' otherwise
@@ -517,248 +603,248 @@ struct dis386 {
static const struct dis386 dis386[] = {
/* 00 */
- { "addB", Eb, Gb, XX },
- { "addS", Ev, Gv, XX },
- { "addB", Gb, Eb, XX },
- { "addS", Gv, Ev, XX },
- { "addB", AL, Ib, XX },
- { "addS", eAX, Iv, XX },
- { "push{T|}", es, XX, XX },
- { "pop{T|}", es, XX, XX },
+ { "addB", { Eb, Gb } },
+ { "addS", { Ev, Gv } },
+ { "addB", { Gb, Eb } },
+ { "addS", { Gv, Ev } },
+ { "addB", { AL, Ib } },
+ { "addS", { eAX, Iv } },
+ { "push{T|}", { es } },
+ { "pop{T|}", { es } },
/* 08 */
- { "orB", Eb, Gb, XX },
- { "orS", Ev, Gv, XX },
- { "orB", Gb, Eb, XX },
- { "orS", Gv, Ev, XX },
- { "orB", AL, Ib, XX },
- { "orS", eAX, Iv, XX },
- { "push{T|}", cs, XX, XX },
- { "(bad)", XX, XX, XX }, /* 0x0f extended opcode escape */
+ { "orB", { Eb, Gb } },
+ { "orS", { Ev, Gv } },
+ { "orB", { Gb, Eb } },
+ { "orS", { Gv, Ev } },
+ { "orB", { AL, Ib } },
+ { "orS", { eAX, Iv } },
+ { "push{T|}", { cs } },
+ { "(bad)", { XX } }, /* 0x0f extended opcode escape */
/* 10 */
- { "adcB", Eb, Gb, XX },
- { "adcS", Ev, Gv, XX },
- { "adcB", Gb, Eb, XX },
- { "adcS", Gv, Ev, XX },
- { "adcB", AL, Ib, XX },
- { "adcS", eAX, Iv, XX },
- { "push{T|}", ss, XX, XX },
- { "pop{T|}", ss, XX, XX },
+ { "adcB", { Eb, Gb } },
+ { "adcS", { Ev, Gv } },
+ { "adcB", { Gb, Eb } },
+ { "adcS", { Gv, Ev } },
+ { "adcB", { AL, Ib } },
+ { "adcS", { eAX, Iv } },
+ { "push{T|}", { ss } },
+ { "pop{T|}", { ss } },
/* 18 */
- { "sbbB", Eb, Gb, XX },
- { "sbbS", Ev, Gv, XX },
- { "sbbB", Gb, Eb, XX },
- { "sbbS", Gv, Ev, XX },
- { "sbbB", AL, Ib, XX },
- { "sbbS", eAX, Iv, XX },
- { "push{T|}", ds, XX, XX },
- { "pop{T|}", ds, XX, XX },
+ { "sbbB", { Eb, Gb } },
+ { "sbbS", { Ev, Gv } },
+ { "sbbB", { Gb, Eb } },
+ { "sbbS", { Gv, Ev } },
+ { "sbbB", { AL, Ib } },
+ { "sbbS", { eAX, Iv } },
+ { "push{T|}", { ds } },
+ { "pop{T|}", { ds } },
/* 20 */
- { "andB", Eb, Gb, XX },
- { "andS", Ev, Gv, XX },
- { "andB", Gb, Eb, XX },
- { "andS", Gv, Ev, XX },
- { "andB", AL, Ib, XX },
- { "andS", eAX, Iv, XX },
- { "(bad)", XX, XX, XX }, /* SEG ES prefix */
- { "daa{|}", XX, XX, XX },
+ { "andB", { Eb, Gb } },
+ { "andS", { Ev, Gv } },
+ { "andB", { Gb, Eb } },
+ { "andS", { Gv, Ev } },
+ { "andB", { AL, Ib } },
+ { "andS", { eAX, Iv } },
+ { "(bad)", { XX } }, /* SEG ES prefix */
+ { "daa{|}", { XX } },
/* 28 */
- { "subB", Eb, Gb, XX },
- { "subS", Ev, Gv, XX },
- { "subB", Gb, Eb, XX },
- { "subS", Gv, Ev, XX },
- { "subB", AL, Ib, XX },
- { "subS", eAX, Iv, XX },
- { "(bad)", XX, XX, XX }, /* SEG CS prefix */
- { "das{|}", XX, XX, XX },
+ { "subB", { Eb, Gb } },
+ { "subS", { Ev, Gv } },
+ { "subB", { Gb, Eb } },
+ { "subS", { Gv, Ev } },
+ { "subB", { AL, Ib } },
+ { "subS", { eAX, Iv } },
+ { "(bad)", { XX } }, /* SEG CS prefix */
+ { "das{|}", { XX } },
/* 30 */
- { "xorB", Eb, Gb, XX },
- { "xorS", Ev, Gv, XX },
- { "xorB", Gb, Eb, XX },
- { "xorS", Gv, Ev, XX },
- { "xorB", AL, Ib, XX },
- { "xorS", eAX, Iv, XX },
- { "(bad)", XX, XX, XX }, /* SEG SS prefix */
- { "aaa{|}", XX, XX, XX },
+ { "xorB", { Eb, Gb } },
+ { "xorS", { Ev, Gv } },
+ { "xorB", { Gb, Eb } },
+ { "xorS", { Gv, Ev } },
+ { "xorB", { AL, Ib } },
+ { "xorS", { eAX, Iv } },
+ { "(bad)", { XX } }, /* SEG SS prefix */
+ { "aaa{|}", { XX } },
/* 38 */
- { "cmpB", Eb, Gb, XX },
- { "cmpS", Ev, Gv, XX },
- { "cmpB", Gb, Eb, XX },
- { "cmpS", Gv, Ev, XX },
- { "cmpB", AL, Ib, XX },
- { "cmpS", eAX, Iv, XX },
- { "(bad)", XX, XX, XX }, /* SEG DS prefix */
- { "aas{|}", XX, XX, XX },
+ { "cmpB", { Eb, Gb } },
+ { "cmpS", { Ev, Gv } },
+ { "cmpB", { Gb, Eb } },
+ { "cmpS", { Gv, Ev } },
+ { "cmpB", { AL, Ib } },
+ { "cmpS", { eAX, Iv } },
+ { "(bad)", { XX } }, /* SEG DS prefix */
+ { "aas{|}", { XX } },
/* 40 */
- { "inc{S|}", RMeAX, XX, XX },
- { "inc{S|}", RMeCX, XX, XX },
- { "inc{S|}", RMeDX, XX, XX },
- { "inc{S|}", RMeBX, XX, XX },
- { "inc{S|}", RMeSP, XX, XX },
- { "inc{S|}", RMeBP, XX, XX },
- { "inc{S|}", RMeSI, XX, XX },
- { "inc{S|}", RMeDI, XX, XX },
+ { "inc{S|}", { RMeAX } },
+ { "inc{S|}", { RMeCX } },
+ { "inc{S|}", { RMeDX } },
+ { "inc{S|}", { RMeBX } },
+ { "inc{S|}", { RMeSP } },
+ { "inc{S|}", { RMeBP } },
+ { "inc{S|}", { RMeSI } },
+ { "inc{S|}", { RMeDI } },
/* 48 */
- { "dec{S|}", RMeAX, XX, XX },
- { "dec{S|}", RMeCX, XX, XX },
- { "dec{S|}", RMeDX, XX, XX },
- { "dec{S|}", RMeBX, XX, XX },
- { "dec{S|}", RMeSP, XX, XX },
- { "dec{S|}", RMeBP, XX, XX },
- { "dec{S|}", RMeSI, XX, XX },
- { "dec{S|}", RMeDI, XX, XX },
+ { "dec{S|}", { RMeAX } },
+ { "dec{S|}", { RMeCX } },
+ { "dec{S|}", { RMeDX } },
+ { "dec{S|}", { RMeBX } },
+ { "dec{S|}", { RMeSP } },
+ { "dec{S|}", { RMeBP } },
+ { "dec{S|}", { RMeSI } },
+ { "dec{S|}", { RMeDI } },
/* 50 */
- { "pushV", RMrAX, XX, XX },
- { "pushV", RMrCX, XX, XX },
- { "pushV", RMrDX, XX, XX },
- { "pushV", RMrBX, XX, XX },
- { "pushV", RMrSP, XX, XX },
- { "pushV", RMrBP, XX, XX },
- { "pushV", RMrSI, XX, XX },
- { "pushV", RMrDI, XX, XX },
+ { "pushV", { RMrAX } },
+ { "pushV", { RMrCX } },
+ { "pushV", { RMrDX } },
+ { "pushV", { RMrBX } },
+ { "pushV", { RMrSP } },
+ { "pushV", { RMrBP } },
+ { "pushV", { RMrSI } },
+ { "pushV", { RMrDI } },
/* 58 */
- { "popV", RMrAX, XX, XX },
- { "popV", RMrCX, XX, XX },
- { "popV", RMrDX, XX, XX },
- { "popV", RMrBX, XX, XX },
- { "popV", RMrSP, XX, XX },
- { "popV", RMrBP, XX, XX },
- { "popV", RMrSI, XX, XX },
- { "popV", RMrDI, XX, XX },
+ { "popV", { RMrAX } },
+ { "popV", { RMrCX } },
+ { "popV", { RMrDX } },
+ { "popV", { RMrBX } },
+ { "popV", { RMrSP } },
+ { "popV", { RMrBP } },
+ { "popV", { RMrSI } },
+ { "popV", { RMrDI } },
/* 60 */
- { "pusha{P|}", XX, XX, XX },
- { "popa{P|}", XX, XX, XX },
- { "bound{S|}", Gv, Ma, XX },
{ X86_64_0 },
- { "(bad)", XX, XX, XX }, /* seg fs */
- { "(bad)", XX, XX, XX }, /* seg gs */
- { "(bad)", XX, XX, XX }, /* op size prefix */
- { "(bad)", XX, XX, XX }, /* adr size prefix */
+ { X86_64_1 },
+ { X86_64_2 },
+ { X86_64_3 },
+ { "(bad)", { XX } }, /* seg fs */
+ { "(bad)", { XX } }, /* seg gs */
+ { "(bad)", { XX } }, /* op size prefix */
+ { "(bad)", { XX } }, /* adr size prefix */
/* 68 */
- { "pushT", Iq, XX, XX },
- { "imulS", Gv, Ev, Iv },
- { "pushT", sIb, XX, XX },
- { "imulS", Gv, Ev, sIb },
- { "ins{b||b|}", Ybr, indirDX, XX },
- { "ins{R||R|}", Yvr, indirDX, XX },
- { "outs{b||b|}", indirDXr, Xb, XX },
- { "outs{R||R|}", indirDXr, Xv, XX },
+ { "pushT", { Iq } },
+ { "imulS", { Gv, Ev, Iv } },
+ { "pushT", { sIb } },
+ { "imulS", { Gv, Ev, sIb } },
+ { "ins{b||b|}", { Ybr, indirDX } },
+ { "ins{R||G|}", { Yzr, indirDX } },
+ { "outs{b||b|}", { indirDXr, Xb } },
+ { "outs{R||G|}", { indirDXr, Xz } },
/* 70 */
- { "joH", Jb, XX, cond_jump_flag },
- { "jnoH", Jb, XX, cond_jump_flag },
- { "jbH", Jb, XX, cond_jump_flag },
- { "jaeH", Jb, XX, cond_jump_flag },
- { "jeH", Jb, XX, cond_jump_flag },
- { "jneH", Jb, XX, cond_jump_flag },
- { "jbeH", Jb, XX, cond_jump_flag },
- { "jaH", Jb, XX, cond_jump_flag },
+ { "joH", { Jb, XX, cond_jump_flag } },
+ { "jnoH", { Jb, XX, cond_jump_flag } },
+ { "jbH", { Jb, XX, cond_jump_flag } },
+ { "jaeH", { Jb, XX, cond_jump_flag } },
+ { "jeH", { Jb, XX, cond_jump_flag } },
+ { "jneH", { Jb, XX, cond_jump_flag } },
+ { "jbeH", { Jb, XX, cond_jump_flag } },
+ { "jaH", { Jb, XX, cond_jump_flag } },
/* 78 */
- { "jsH", Jb, XX, cond_jump_flag },
- { "jnsH", Jb, XX, cond_jump_flag },
- { "jpH", Jb, XX, cond_jump_flag },
- { "jnpH", Jb, XX, cond_jump_flag },
- { "jlH", Jb, XX, cond_jump_flag },
- { "jgeH", Jb, XX, cond_jump_flag },
- { "jleH", Jb, XX, cond_jump_flag },
- { "jgH", Jb, XX, cond_jump_flag },
+ { "jsH", { Jb, XX, cond_jump_flag } },
+ { "jnsH", { Jb, XX, cond_jump_flag } },
+ { "jpH", { Jb, XX, cond_jump_flag } },
+ { "jnpH", { Jb, XX, cond_jump_flag } },
+ { "jlH", { Jb, XX, cond_jump_flag } },
+ { "jgeH", { Jb, XX, cond_jump_flag } },
+ { "jleH", { Jb, XX, cond_jump_flag } },
+ { "jgH", { Jb, XX, cond_jump_flag } },
/* 80 */
{ GRP1b },
{ GRP1S },
- { "(bad)", XX, XX, XX },
+ { "(bad)", { XX } },
{ GRP1Ss },
- { "testB", Eb, Gb, XX },
- { "testS", Ev, Gv, XX },
- { "xchgB", Eb, Gb, XX },
- { "xchgS", Ev, Gv, XX },
+ { "testB", { Eb, Gb } },
+ { "testS", { Ev, Gv } },
+ { "xchgB", { Eb, Gb } },
+ { "xchgS", { Ev, Gv } },
/* 88 */
- { "movB", Eb, Gb, XX },
- { "movS", Ev, Gv, XX },
- { "movB", Gb, Eb, XX },
- { "movS", Gv, Ev, XX },
- { "movQ", Sv, Sw, XX },
- { "leaS", Gv, M, XX },
- { "movQ", Sw, Sv, XX },
- { "popU", stackEv, XX, XX },
+ { "movB", { Eb, Gb } },
+ { "movS", { Ev, Gv } },
+ { "movB", { Gb, Eb } },
+ { "movS", { Gv, Ev } },
+ { "movD", { Sv, Sw } },
+ { "leaS", { Gv, M } },
+ { "movD", { Sw, Sv } },
+ { GRP1a },
/* 90 */
- { "nop", NOP_Fixup, 0, XX, XX },
- { "xchgS", RMeCX, eAX, XX },
- { "xchgS", RMeDX, eAX, XX },
- { "xchgS", RMeBX, eAX, XX },
- { "xchgS", RMeSP, eAX, XX },
- { "xchgS", RMeBP, eAX, XX },
- { "xchgS", RMeSI, eAX, XX },
- { "xchgS", RMeDI, eAX, XX },
+ { PREGRP38 },
+ { "xchgS", { RMeCX, eAX } },
+ { "xchgS", { RMeDX, eAX } },
+ { "xchgS", { RMeBX, eAX } },
+ { "xchgS", { RMeSP, eAX } },
+ { "xchgS", { RMeBP, eAX } },
+ { "xchgS", { RMeSI, eAX } },
+ { "xchgS", { RMeDI, eAX } },
/* 98 */
- { "cW{tR||tR|}", XX, XX, XX },
- { "cR{tO||tO|}", XX, XX, XX },
- { "Jcall{T|}", Ap, XX, XX },
- { "(bad)", XX, XX, XX }, /* fwait */
- { "pushfT", XX, XX, XX },
- { "popfT", XX, XX, XX },
- { "sahf{|}", XX, XX, XX },
- { "lahf{|}", XX, XX, XX },
+ { "cW{t||t|}R", { XX } },
+ { "cR{t||t|}O", { XX } },
+ { "Jcall{T|}", { Ap } },
+ { "(bad)", { XX } }, /* fwait */
+ { "pushfT", { XX } },
+ { "popfT", { XX } },
+ { "sahf{|}", { XX } },
+ { "lahf{|}", { XX } },
/* a0 */
- { "movB", AL, Ob, XX },
- { "movS", eAX, Ov, XX },
- { "movB", Ob, AL, XX },
- { "movS", Ov, eAX, XX },
- { "movs{b||b|}", Ybr, Xb, XX },
- { "movs{R||R|}", Yvr, Xv, XX },
- { "cmps{b||b|}", Xb, Yb, XX },
- { "cmps{R||R|}", Xv, Yv, XX },
+ { "movB", { AL, Ob } },
+ { "movS", { eAX, Ov } },
+ { "movB", { Ob, AL } },
+ { "movS", { Ov, eAX } },
+ { "movs{b||b|}", { Ybr, Xb } },
+ { "movs{R||R|}", { Yvr, Xv } },
+ { "cmps{b||b|}", { Xb, Yb } },
+ { "cmps{R||R|}", { Xv, Yv } },
/* a8 */
- { "testB", AL, Ib, XX },
- { "testS", eAX, Iv, XX },
- { "stosB", Ybr, AL, XX },
- { "stosS", Yvr, eAX, XX },
- { "lodsB", ALr, Xb, XX },
- { "lodsS", eAXr, Xv, XX },
- { "scasB", AL, Yb, XX },
- { "scasS", eAX, Yv, XX },
+ { "testB", { AL, Ib } },
+ { "testS", { eAX, Iv } },
+ { "stosB", { Ybr, AL } },
+ { "stosS", { Yvr, eAX } },
+ { "lodsB", { ALr, Xb } },
+ { "lodsS", { eAXr, Xv } },
+ { "scasB", { AL, Yb } },
+ { "scasS", { eAX, Yv } },
/* b0 */
- { "movB", RMAL, Ib, XX },
- { "movB", RMCL, Ib, XX },
- { "movB", RMDL, Ib, XX },
- { "movB", RMBL, Ib, XX },
- { "movB", RMAH, Ib, XX },
- { "movB", RMCH, Ib, XX },
- { "movB", RMDH, Ib, XX },
- { "movB", RMBH, Ib, XX },
+ { "movB", { RMAL, Ib } },
+ { "movB", { RMCL, Ib } },
+ { "movB", { RMDL, Ib } },
+ { "movB", { RMBL, Ib } },
+ { "movB", { RMAH, Ib } },
+ { "movB", { RMCH, Ib } },
+ { "movB", { RMDH, Ib } },
+ { "movB", { RMBH, Ib } },
/* b8 */
- { "movS", RMeAX, Iv64, XX },
- { "movS", RMeCX, Iv64, XX },
- { "movS", RMeDX, Iv64, XX },
- { "movS", RMeBX, Iv64, XX },
- { "movS", RMeSP, Iv64, XX },
- { "movS", RMeBP, Iv64, XX },
- { "movS", RMeSI, Iv64, XX },
- { "movS", RMeDI, Iv64, XX },
+ { "movS", { RMeAX, Iv64 } },
+ { "movS", { RMeCX, Iv64 } },
+ { "movS", { RMeDX, Iv64 } },
+ { "movS", { RMeBX, Iv64 } },
+ { "movS", { RMeSP, Iv64 } },
+ { "movS", { RMeBP, Iv64 } },
+ { "movS", { RMeSI, Iv64 } },
+ { "movS", { RMeDI, Iv64 } },
/* c0 */
{ GRP2b },
{ GRP2S },
- { "retT", Iw, XX, XX },
- { "retT", XX, XX, XX },
- { "les{S|}", Gv, Mp, XX },
- { "ldsS", Gv, Mp, XX },
- { "movA", Eb, Ib, XX },
- { "movQ", Ev, Iv, XX },
+ { "retT", { Iw } },
+ { "retT", { XX } },
+ { "les{S|}", { Gv, Mp } },
+ { "ldsS", { Gv, Mp } },
+ { GRP11_C6 },
+ { GRP11_C7 },
/* c8 */
- { "enterT", Iw, Ib, XX },
- { "leaveT", XX, XX, XX },
- { "lretP", Iw, XX, XX },
- { "lretP", XX, XX, XX },
- { "int3", XX, XX, XX },
- { "int", Ib, XX, XX },
- { "into{|}", XX, XX, XX },
- { "iretP", XX, XX, XX },
+ { "enterT", { Iw, Ib } },
+ { "leaveT", { XX } },
+ { "lretP", { Iw } },
+ { "lretP", { XX } },
+ { "int3", { XX } },
+ { "int", { Ib } },
+ { "into{|}", { XX } },
+ { "iretP", { XX } },
/* d0 */
{ GRP2b_one },
{ GRP2S_one },
{ GRP2b_cl },
{ GRP2S_cl },
- { "aam{|}", sIb, XX, XX },
- { "aad{|}", sIb, XX, XX },
- { "(bad)", XX, XX, XX },
- { "xlat", DSBX, XX, XX },
+ { "aam{|}", { sIb } },
+ { "aad{|}", { sIb } },
+ { "(bad)", { XX } },
+ { "xlat", { DSBX } },
/* d8 */
{ FLOAT },
{ FLOAT },
@@ -769,39 +855,39 @@ static const struct dis386 dis386[] = {
{ FLOAT },
{ FLOAT },
/* e0 */
- { "loopneFH", Jb, XX, loop_jcxz_flag },
- { "loopeFH", Jb, XX, loop_jcxz_flag },
- { "loopFH", Jb, XX, loop_jcxz_flag },
- { "jEcxzH", Jb, XX, loop_jcxz_flag },
- { "inB", AL, Ib, XX },
- { "inS", eAX, Ib, XX },
- { "outB", Ib, AL, XX },
- { "outS", Ib, eAX, XX },
+ { "loopneFH", { Jb, XX, loop_jcxz_flag } },
+ { "loopeFH", { Jb, XX, loop_jcxz_flag } },
+ { "loopFH", { Jb, XX, loop_jcxz_flag } },
+ { "jEcxzH", { Jb, XX, loop_jcxz_flag } },
+ { "inB", { AL, Ib } },
+ { "inG", { zAX, Ib } },
+ { "outB", { Ib, AL } },
+ { "outG", { Ib, zAX } },
/* e8 */
- { "callT", Jv, XX, XX },
- { "jmpT", Jv, XX, XX },
- { "Jjmp{T|}", Ap, XX, XX },
- { "jmp", Jb, XX, XX },
- { "inB", AL, indirDX, XX },
- { "inS", eAX, indirDX, XX },
- { "outB", indirDX, AL, XX },
- { "outS", indirDX, eAX, XX },
+ { "callT", { Jv } },
+ { "jmpT", { Jv } },
+ { "Jjmp{T|}", { Ap } },
+ { "jmp", { Jb } },
+ { "inB", { AL, indirDX } },
+ { "inG", { zAX, indirDX } },
+ { "outB", { indirDX, AL } },
+ { "outG", { indirDX, zAX } },
/* f0 */
- { "(bad)", XX, XX, XX }, /* lock prefix */
- { "icebp", XX, XX, XX },
- { "(bad)", XX, XX, XX }, /* repne */
- { "(bad)", XX, XX, XX }, /* repz */
- { "hlt", XX, XX, XX },
- { "cmc", XX, XX, XX },
+ { "(bad)", { XX } }, /* lock prefix */
+ { "icebp", { XX } },
+ { "(bad)", { XX } }, /* repne */
+ { "(bad)", { XX } }, /* repz */
+ { "hlt", { XX } },
+ { "cmc", { XX } },
{ GRP3b },
{ GRP3S },
/* f8 */
- { "clc", XX, XX, XX },
- { "stc", XX, XX, XX },
- { "cli", XX, XX, XX },
- { "sti", XX, XX, XX },
- { "cld", XX, XX, XX },
- { "std", XX, XX, XX },
+ { "clc", { XX } },
+ { "stc", { XX } },
+ { "cli", { XX } },
+ { "sti", { XX } },
+ { "cld", { XX } },
+ { "std", { XX } },
{ GRP4 },
{ GRP5 },
};
@@ -810,102 +896,102 @@ static const struct dis386 dis386_twobyte[] = {
/* 00 */
{ GRP6 },
{ GRP7 },
- { "larS", Gv, Ew, XX },
- { "lslS", Gv, Ew, XX },
- { "(bad)", XX, XX, XX },
- { "syscall", XX, XX, XX },
- { "clts", XX, XX, XX },
- { "sysretP", XX, XX, XX },
+ { "larS", { Gv, Ew } },
+ { "lslS", { Gv, Ew } },
+ { "(bad)", { XX } },
+ { "syscall", { XX } },
+ { "clts", { XX } },
+ { "sysretP", { XX } },
/* 08 */
- { "invd", XX, XX, XX },
- { "wbinvd", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "ud2a", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "invd", { XX } },
+ { "wbinvd", { XX } },
+ { "(bad)", { XX } },
+ { "ud2a", { XX } },
+ { "(bad)", { XX } },
{ GRPAMD },
- { "femms", XX, XX, XX },
- { "", MX, EM, OPSUF }, /* See OP_3DNowSuffix. */
+ { "femms", { XX } },
+ { "", { MX, EM, OPSUF } }, /* See OP_3DNowSuffix. */
/* 10 */
{ PREGRP8 },
{ PREGRP9 },
{ PREGRP30 },
- { "movlpX", EX, XM, SIMD_Fixup, 'h' },
- { "unpcklpX", XM, EX, XX },
- { "unpckhpX", XM, EX, XX },
+ { "movlpX", { EXq, XM, { SIMD_Fixup, 'h' } } },
+ { "unpcklpX", { XM, EXq } },
+ { "unpckhpX", { XM, EXq } },
{ PREGRP31 },
- { "movhpX", EX, XM, SIMD_Fixup, 'l' },
+ { "movhpX", { EXq, XM, { SIMD_Fixup, 'l' } } },
/* 18 */
- { GRP14 },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { GRP16 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "nopQ", { Ev } },
/* 20 */
- { "movZ", Rm, Cm, XX },
- { "movZ", Rm, Dm, XX },
- { "movZ", Cm, Rm, XX },
- { "movZ", Dm, Rm, XX },
- { "movL", Rd, Td, XX },
- { "(bad)", XX, XX, XX },
- { "movL", Td, Rd, XX },
- { "(bad)", XX, XX, XX },
+ { "movZ", { Rm, Cm } },
+ { "movZ", { Rm, Dm } },
+ { "movZ", { Cm, Rm } },
+ { "movZ", { Dm, Rm } },
+ { "movL", { Rd, Td } },
+ { "(bad)", { XX } },
+ { "movL", { Td, Rd } },
+ { "(bad)", { XX } },
/* 28 */
- { "movapX", XM, EX, XX },
- { "movapX", EX, XM, XX },
+ { "movapX", { XM, EXx } },
+ { "movapX", { EXx, XM } },
{ PREGRP2 },
- { "movntpX", Ev, XM, XX },
+ { PREGRP33 },
{ PREGRP4 },
{ PREGRP3 },
- { "ucomisX", XM,EX, XX },
- { "comisX", XM,EX, XX },
+ { PREGRP93 },
+ { PREGRP94 },
/* 30 */
- { "wrmsr", XX, XX, XX },
- { "rdtsc", XX, XX, XX },
- { "rdmsr", XX, XX, XX },
- { "rdpmc", XX, XX, XX },
- { "sysenter", XX, XX, XX },
- { "sysexit", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "wrmsr", { XX } },
+ { "rdtsc", { XX } },
+ { "rdmsr", { XX } },
+ { "rdpmc", { XX } },
+ { "sysenter", { XX } },
+ { "sysexit", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
/* 38 */
{ THREE_BYTE_0 },
- { "(bad)", XX, XX, XX },
+ { "(bad)", { XX } },
{ THREE_BYTE_1 },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
/* 40 */
- { "cmovo", Gv, Ev, XX },
- { "cmovno", Gv, Ev, XX },
- { "cmovb", Gv, Ev, XX },
- { "cmovae", Gv, Ev, XX },
- { "cmove", Gv, Ev, XX },
- { "cmovne", Gv, Ev, XX },
- { "cmovbe", Gv, Ev, XX },
- { "cmova", Gv, Ev, XX },
+ { "cmovo", { Gv, Ev } },
+ { "cmovno", { Gv, Ev } },
+ { "cmovb", { Gv, Ev } },
+ { "cmovae", { Gv, Ev } },
+ { "cmove", { Gv, Ev } },
+ { "cmovne", { Gv, Ev } },
+ { "cmovbe", { Gv, Ev } },
+ { "cmova", { Gv, Ev } },
/* 48 */
- { "cmovs", Gv, Ev, XX },
- { "cmovns", Gv, Ev, XX },
- { "cmovp", Gv, Ev, XX },
- { "cmovnp", Gv, Ev, XX },
- { "cmovl", Gv, Ev, XX },
- { "cmovge", Gv, Ev, XX },
- { "cmovle", Gv, Ev, XX },
- { "cmovg", Gv, Ev, XX },
+ { "cmovs", { Gv, Ev } },
+ { "cmovns", { Gv, Ev } },
+ { "cmovp", { Gv, Ev } },
+ { "cmovnp", { Gv, Ev } },
+ { "cmovl", { Gv, Ev } },
+ { "cmovge", { Gv, Ev } },
+ { "cmovle", { Gv, Ev } },
+ { "cmovg", { Gv, Ev } },
/* 50 */
- { "movmskpX", Gdq, XS, XX },
+ { "movmskpX", { Gdq, XS } },
{ PREGRP13 },
{ PREGRP12 },
{ PREGRP11 },
- { "andpX", XM, EX, XX },
- { "andnpX", XM, EX, XX },
- { "orpX", XM, EX, XX },
- { "xorpX", XM, EX, XX },
+ { "andpX", { XM, EXx } },
+ { "andnpX", { XM, EXx } },
+ { "orpX", { XM, EXx } },
+ { "xorpX", { XM, EXx } },
/* 58 */
{ PREGRP0 },
{ PREGRP10 },
@@ -916,185 +1002,185 @@ static const struct dis386 dis386_twobyte[] = {
{ PREGRP5 },
{ PREGRP6 },
/* 60 */
- { "punpcklbw", MX, EM, XX },
- { "punpcklwd", MX, EM, XX },
- { "punpckldq", MX, EM, XX },
- { "packsswb", MX, EM, XX },
- { "pcmpgtb", MX, EM, XX },
- { "pcmpgtw", MX, EM, XX },
- { "pcmpgtd", MX, EM, XX },
- { "packuswb", MX, EM, XX },
+ { PREGRP95 },
+ { PREGRP96 },
+ { PREGRP97 },
+ { "packsswb", { MX, EM } },
+ { "pcmpgtb", { MX, EM } },
+ { "pcmpgtw", { MX, EM } },
+ { "pcmpgtd", { MX, EM } },
+ { "packuswb", { MX, EM } },
/* 68 */
- { "punpckhbw", MX, EM, XX },
- { "punpckhwd", MX, EM, XX },
- { "punpckhdq", MX, EM, XX },
- { "packssdw", MX, EM, XX },
+ { "punpckhbw", { MX, EM } },
+ { "punpckhwd", { MX, EM } },
+ { "punpckhdq", { MX, EM } },
+ { "packssdw", { MX, EM } },
{ PREGRP26 },
{ PREGRP24 },
- { "movd", MX, Edq, XX },
+ { "movd", { MX, Edq } },
{ PREGRP19 },
/* 70 */
{ PREGRP22 },
- { GRP10 },
- { GRP11 },
{ GRP12 },
- { "pcmpeqb", MX, EM, XX },
- { "pcmpeqw", MX, EM, XX },
- { "pcmpeqd", MX, EM, XX },
- { "emms", XX, XX, XX },
+ { GRP13 },
+ { GRP14 },
+ { "pcmpeqb", { MX, EM } },
+ { "pcmpeqw", { MX, EM } },
+ { "pcmpeqd", { MX, EM } },
+ { "emms", { XX } },
/* 78 */
- { "vmread", Em, Gm, XX },
- { "vmwrite", Gm, Em, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { PREGRP34 },
+ { PREGRP35 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
{ PREGRP28 },
{ PREGRP29 },
{ PREGRP23 },
{ PREGRP20 },
/* 80 */
- { "joH", Jv, XX, cond_jump_flag },
- { "jnoH", Jv, XX, cond_jump_flag },
- { "jbH", Jv, XX, cond_jump_flag },
- { "jaeH", Jv, XX, cond_jump_flag },
- { "jeH", Jv, XX, cond_jump_flag },
- { "jneH", Jv, XX, cond_jump_flag },
- { "jbeH", Jv, XX, cond_jump_flag },
- { "jaH", Jv, XX, cond_jump_flag },
+ { "joH", { Jv, XX, cond_jump_flag } },
+ { "jnoH", { Jv, XX, cond_jump_flag } },
+ { "jbH", { Jv, XX, cond_jump_flag } },
+ { "jaeH", { Jv, XX, cond_jump_flag } },
+ { "jeH", { Jv, XX, cond_jump_flag } },
+ { "jneH", { Jv, XX, cond_jump_flag } },
+ { "jbeH", { Jv, XX, cond_jump_flag } },
+ { "jaH", { Jv, XX, cond_jump_flag } },
/* 88 */
- { "jsH", Jv, XX, cond_jump_flag },
- { "jnsH", Jv, XX, cond_jump_flag },
- { "jpH", Jv, XX, cond_jump_flag },
- { "jnpH", Jv, XX, cond_jump_flag },
- { "jlH", Jv, XX, cond_jump_flag },
- { "jgeH", Jv, XX, cond_jump_flag },
- { "jleH", Jv, XX, cond_jump_flag },
- { "jgH", Jv, XX, cond_jump_flag },
+ { "jsH", { Jv, XX, cond_jump_flag } },
+ { "jnsH", { Jv, XX, cond_jump_flag } },
+ { "jpH", { Jv, XX, cond_jump_flag } },
+ { "jnpH", { Jv, XX, cond_jump_flag } },
+ { "jlH", { Jv, XX, cond_jump_flag } },
+ { "jgeH", { Jv, XX, cond_jump_flag } },
+ { "jleH", { Jv, XX, cond_jump_flag } },
+ { "jgH", { Jv, XX, cond_jump_flag } },
/* 90 */
- { "seto", Eb, XX, XX },
- { "setno", Eb, XX, XX },
- { "setb", Eb, XX, XX },
- { "setae", Eb, XX, XX },
- { "sete", Eb, XX, XX },
- { "setne", Eb, XX, XX },
- { "setbe", Eb, XX, XX },
- { "seta", Eb, XX, XX },
+ { "seto", { Eb } },
+ { "setno", { Eb } },
+ { "setb", { Eb } },
+ { "setae", { Eb } },
+ { "sete", { Eb } },
+ { "setne", { Eb } },
+ { "setbe", { Eb } },
+ { "seta", { Eb } },
/* 98 */
- { "sets", Eb, XX, XX },
- { "setns", Eb, XX, XX },
- { "setp", Eb, XX, XX },
- { "setnp", Eb, XX, XX },
- { "setl", Eb, XX, XX },
- { "setge", Eb, XX, XX },
- { "setle", Eb, XX, XX },
- { "setg", Eb, XX, XX },
+ { "sets", { Eb } },
+ { "setns", { Eb } },
+ { "setp", { Eb } },
+ { "setnp", { Eb } },
+ { "setl", { Eb } },
+ { "setge", { Eb } },
+ { "setle", { Eb } },
+ { "setg", { Eb } },
/* a0 */
- { "pushT", fs, XX, XX },
- { "popT", fs, XX, XX },
- { "cpuid", XX, XX, XX },
- { "btS", Ev, Gv, XX },
- { "shldS", Ev, Gv, Ib },
- { "shldS", Ev, Gv, CL },
+ { "pushT", { fs } },
+ { "popT", { fs } },
+ { "cpuid", { XX } },
+ { "btS", { Ev, Gv } },
+ { "shldS", { Ev, Gv, Ib } },
+ { "shldS", { Ev, Gv, CL } },
{ GRPPADLCK2 },
{ GRPPADLCK1 },
/* a8 */
- { "pushT", gs, XX, XX },
- { "popT", gs, XX, XX },
- { "rsm", XX, XX, XX },
- { "btsS", Ev, Gv, XX },
- { "shrdS", Ev, Gv, Ib },
- { "shrdS", Ev, Gv, CL },
- { GRP13 },
- { "imulS", Gv, Ev, XX },
+ { "pushT", { gs } },
+ { "popT", { gs } },
+ { "rsm", { XX } },
+ { "btsS", { Ev, Gv } },
+ { "shrdS", { Ev, Gv, Ib } },
+ { "shrdS", { Ev, Gv, CL } },
+ { GRP15 },
+ { "imulS", { Gv, Ev } },
/* b0 */
- { "cmpxchgB", Eb, Gb, XX },
- { "cmpxchgS", Ev, Gv, XX },
- { "lssS", Gv, Mp, XX },
- { "btrS", Ev, Gv, XX },
- { "lfsS", Gv, Mp, XX },
- { "lgsS", Gv, Mp, XX },
- { "movz{bR|x|bR|x}", Gv, Eb, XX },
- { "movz{wR|x|wR|x}", Gv, Ew, XX }, /* yes, there really is movzww ! */
+ { "cmpxchgB", { Eb, Gb } },
+ { "cmpxchgS", { Ev, Gv } },
+ { "lssS", { Gv, Mp } },
+ { "btrS", { Ev, Gv } },
+ { "lfsS", { Gv, Mp } },
+ { "lgsS", { Gv, Mp } },
+ { "movz{bR|x|bR|x}", { Gv, Eb } },
+ { "movz{wR|x|wR|x}", { Gv, Ew } }, /* yes, there really is movzww ! */
/* b8 */
- { "(bad)", XX, XX, XX },
- { "ud2b", XX, XX, XX },
+ { PREGRP37 },
+ { "ud2b", { XX } },
{ GRP8 },
- { "btcS", Ev, Gv, XX },
- { "bsfS", Gv, Ev, XX },
- { "bsrS", Gv, Ev, XX },
- { "movs{bR|x|bR|x}", Gv, Eb, XX },
- { "movs{wR|x|wR|x}", Gv, Ew, XX }, /* yes, there really is movsww ! */
+ { "btcS", { Ev, Gv } },
+ { "bsfS", { Gv, Ev } },
+ { PREGRP36 },
+ { "movs{bR|x|bR|x}", { Gv, Eb } },
+ { "movs{wR|x|wR|x}", { Gv, Ew } }, /* yes, there really is movsww ! */
/* c0 */
- { "xaddB", Eb, Gb, XX },
- { "xaddS", Ev, Gv, XX },
+ { "xaddB", { Eb, Gb } },
+ { "xaddS", { Ev, Gv } },
{ PREGRP1 },
- { "movntiS", Ev, Gv, XX },
- { "pinsrw", MX, Edqw, Ib },
- { "pextrw", Gdq, MS, Ib },
- { "shufpX", XM, EX, Ib },
+ { "movntiS", { Ev, Gv } },
+ { "pinsrw", { MX, Edqw, Ib } },
+ { "pextrw", { Gdq, MS, Ib } },
+ { "shufpX", { XM, EXx, Ib } },
{ GRP9 },
/* c8 */
- { "bswap", RMeAX, XX, XX },
- { "bswap", RMeCX, XX, XX },
- { "bswap", RMeDX, XX, XX },
- { "bswap", RMeBX, XX, XX },
- { "bswap", RMeSP, XX, XX },
- { "bswap", RMeBP, XX, XX },
- { "bswap", RMeSI, XX, XX },
- { "bswap", RMeDI, XX, XX },
+ { "bswap", { RMeAX } },
+ { "bswap", { RMeCX } },
+ { "bswap", { RMeDX } },
+ { "bswap", { RMeBX } },
+ { "bswap", { RMeSP } },
+ { "bswap", { RMeBP } },
+ { "bswap", { RMeSI } },
+ { "bswap", { RMeDI } },
/* d0 */
{ PREGRP27 },
- { "psrlw", MX, EM, XX },
- { "psrld", MX, EM, XX },
- { "psrlq", MX, EM, XX },
- { "paddq", MX, EM, XX },
- { "pmullw", MX, EM, XX },
+ { "psrlw", { MX, EM } },
+ { "psrld", { MX, EM } },
+ { "psrlq", { MX, EM } },
+ { "paddq", { MX, EM } },
+ { "pmullw", { MX, EM } },
{ PREGRP21 },
- { "pmovmskb", Gdq, MS, XX },
+ { "pmovmskb", { Gdq, MS } },
/* d8 */
- { "psubusb", MX, EM, XX },
- { "psubusw", MX, EM, XX },
- { "pminub", MX, EM, XX },
- { "pand", MX, EM, XX },
- { "paddusb", MX, EM, XX },
- { "paddusw", MX, EM, XX },
- { "pmaxub", MX, EM, XX },
- { "pandn", MX, EM, XX },
+ { "psubusb", { MX, EM } },
+ { "psubusw", { MX, EM } },
+ { "pminub", { MX, EM } },
+ { "pand", { MX, EM } },
+ { "paddusb", { MX, EM } },
+ { "paddusw", { MX, EM } },
+ { "pmaxub", { MX, EM } },
+ { "pandn", { MX, EM } },
/* e0 */
- { "pavgb", MX, EM, XX },
- { "psraw", MX, EM, XX },
- { "psrad", MX, EM, XX },
- { "pavgw", MX, EM, XX },
- { "pmulhuw", MX, EM, XX },
- { "pmulhw", MX, EM, XX },
+ { "pavgb", { MX, EM } },
+ { "psraw", { MX, EM } },
+ { "psrad", { MX, EM } },
+ { "pavgw", { MX, EM } },
+ { "pmulhuw", { MX, EM } },
+ { "pmulhw", { MX, EM } },
{ PREGRP15 },
{ PREGRP25 },
/* e8 */
- { "psubsb", MX, EM, XX },
- { "psubsw", MX, EM, XX },
- { "pminsw", MX, EM, XX },
- { "por", MX, EM, XX },
- { "paddsb", MX, EM, XX },
- { "paddsw", MX, EM, XX },
- { "pmaxsw", MX, EM, XX },
- { "pxor", MX, EM, XX },
+ { "psubsb", { MX, EM } },
+ { "psubsw", { MX, EM } },
+ { "pminsw", { MX, EM } },
+ { "por", { MX, EM } },
+ { "paddsb", { MX, EM } },
+ { "paddsw", { MX, EM } },
+ { "pmaxsw", { MX, EM } },
+ { "pxor", { MX, EM } },
/* f0 */
{ PREGRP32 },
- { "psllw", MX, EM, XX },
- { "pslld", MX, EM, XX },
- { "psllq", MX, EM, XX },
- { "pmuludq", MX, EM, XX },
- { "pmaddwd", MX, EM, XX },
- { "psadbw", MX, EM, XX },
+ { "psllw", { MX, EM } },
+ { "pslld", { MX, EM } },
+ { "psllq", { MX, EM } },
+ { "pmuludq", { MX, EM } },
+ { "pmaddwd", { MX, EM } },
+ { "psadbw", { MX, EM } },
{ PREGRP18 },
/* f8 */
- { "psubb", MX, EM, XX },
- { "psubw", MX, EM, XX },
- { "psubd", MX, EM, XX },
- { "psubq", MX, EM, XX },
- { "paddb", MX, EM, XX },
- { "paddw", MX, EM, XX },
- { "paddd", MX, EM, XX },
- { "(bad)", XX, XX, XX }
+ { "psubb", { MX, EM } },
+ { "psubw", { MX, EM } },
+ { "psubd", { MX, EM } },
+ { "psubq", { MX, EM } },
+ { "paddb", { MX, EM } },
+ { "paddw", { MX, EM } },
+ { "paddd", { MX, EM } },
+ { "(bad)", { XX } },
};
static const unsigned char onebyte_has_modrm[256] = {
@@ -1124,7 +1210,7 @@ static const unsigned char twobyte_has_modrm[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
/* ------------------------------- */
/* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
- /* 10 */ 1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, /* 1f */
+ /* 10 */ 1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1, /* 1f */
/* 20 */ 1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1, /* 2f */
/* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
/* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
@@ -1134,7 +1220,7 @@ static const unsigned char twobyte_has_modrm[256] = {
/* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
/* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */
/* a0 */ 0,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1, /* af */
- /* b0 */ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, /* bf */
+ /* b0 */ 1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, /* bf */
/* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */
/* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */
/* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */
@@ -1143,17 +1229,17 @@ static const unsigned char twobyte_has_modrm[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
-static const unsigned char twobyte_uses_SSE_prefix[256] = {
+static const unsigned char twobyte_uses_DATA_prefix[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
/* ------------------------------- */
/* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
/* 10 */ 1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0, /* 1f */
- /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0, /* 2f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0, /* 2f */
/* 30 */ 0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0, /* 3f */
/* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
/* 50 */ 0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* 5f */
/* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1, /* 6f */
- /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1, /* 7f */
+ /* 70 */ 1,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1, /* 7f */
/* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
/* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
/* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
@@ -1166,6 +1252,196 @@ static const unsigned char twobyte_uses_SSE_prefix[256] = {
/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
};
+static const unsigned char twobyte_uses_REPNZ_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
+ /* 10 */ 1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
+ /* 70 */ 1,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+static const unsigned char twobyte_uses_REPZ_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
+ /* 10 */ 1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1, /* 6f */
+ /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0, /* bf */
+ /* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+/* This is used to determine if opcode 0f 38 XX uses DATA prefix. */
+static const unsigned char threebyte_0x38_uses_DATA_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0, /* 0f */
+ /* 10 */ 1,0,0,0,1,1,0,1,0,0,0,0,1,1,1,0, /* 1f */
+ /* 20 */ 1,1,1,1,1,1,0,0,1,1,1,1,0,0,0,0, /* 2f */
+ /* 30 */ 1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1, /* 3f */
+ /* 40 */ 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+/* This is used to determine if opcode 0f 38 XX uses REPNZ prefix. */
+static const unsigned char threebyte_0x38_uses_REPNZ_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
+ /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+/* This is used to determine if opcode 0f 38 XX uses REPZ prefix. */
+static const unsigned char threebyte_0x38_uses_REPZ_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
+ /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+/* This is used to determine if opcode 0f 3a XX uses DATA prefix. */
+static const unsigned char threebyte_0x3a_uses_DATA_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, /* 0f */
+ /* 10 */ 0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
+ /* 60 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+/* This is used to determine if opcode 0f 3a XX uses REPNZ prefix. */
+static const unsigned char threebyte_0x3a_uses_REPNZ_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
+ /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
+/* This is used to determine if opcode 0f 3a XX uses REPZ prefix. */
+static const unsigned char threebyte_0x3a_uses_REPZ_prefix[256] = {
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+ /* ------------------------------- */
+ /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */
+ /* 10 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */
+ /* 20 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 2f */
+ /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
+ /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */
+ /* 50 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 5f */
+ /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 6f */
+ /* 70 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 7f */
+ /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */
+ /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */
+ /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */
+ /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */
+ /* c0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */
+ /* d0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* df */
+ /* e0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ef */
+ /* f0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* ff */
+ /* ------------------------------- */
+ /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
+};
+
static char obuf[100];
static char *obufp;
static char scratchbuf[100];
@@ -1173,9 +1449,13 @@ static unsigned char *start_codep;
static unsigned char *insn_codep;
static unsigned char *codep;
static disassemble_info *the_info;
-static int mod;
-static int rm;
-static int reg;
+static struct
+ {
+ int mod;
+ int reg;
+ int rm;
+ }
+modrm;
static unsigned char need_modrm;
/* If we are accessing mod/rm/reg without need_modrm set, then the
@@ -1244,595 +1524,1671 @@ static const char *att_index16[] = {
};
static const struct dis386 grps[][8] = {
+ /* GRP1a */
+ {
+ { "popU", { stackEv } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ },
/* GRP1b */
{
- { "addA", Eb, Ib, XX },
- { "orA", Eb, Ib, XX },
- { "adcA", Eb, Ib, XX },
- { "sbbA", Eb, Ib, XX },
- { "andA", Eb, Ib, XX },
- { "subA", Eb, Ib, XX },
- { "xorA", Eb, Ib, XX },
- { "cmpA", Eb, Ib, XX }
+ { "addA", { Eb, Ib } },
+ { "orA", { Eb, Ib } },
+ { "adcA", { Eb, Ib } },
+ { "sbbA", { Eb, Ib } },
+ { "andA", { Eb, Ib } },
+ { "subA", { Eb, Ib } },
+ { "xorA", { Eb, Ib } },
+ { "cmpA", { Eb, Ib } },
},
/* GRP1S */
{
- { "addQ", Ev, Iv, XX },
- { "orQ", Ev, Iv, XX },
- { "adcQ", Ev, Iv, XX },
- { "sbbQ", Ev, Iv, XX },
- { "andQ", Ev, Iv, XX },
- { "subQ", Ev, Iv, XX },
- { "xorQ", Ev, Iv, XX },
- { "cmpQ", Ev, Iv, XX }
+ { "addQ", { Ev, Iv } },
+ { "orQ", { Ev, Iv } },
+ { "adcQ", { Ev, Iv } },
+ { "sbbQ", { Ev, Iv } },
+ { "andQ", { Ev, Iv } },
+ { "subQ", { Ev, Iv } },
+ { "xorQ", { Ev, Iv } },
+ { "cmpQ", { Ev, Iv } },
},
/* GRP1Ss */
{
- { "addQ", Ev, sIb, XX },
- { "orQ", Ev, sIb, XX },
- { "adcQ", Ev, sIb, XX },
- { "sbbQ", Ev, sIb, XX },
- { "andQ", Ev, sIb, XX },
- { "subQ", Ev, sIb, XX },
- { "xorQ", Ev, sIb, XX },
- { "cmpQ", Ev, sIb, XX }
+ { "addQ", { Ev, sIb } },
+ { "orQ", { Ev, sIb } },
+ { "adcQ", { Ev, sIb } },
+ { "sbbQ", { Ev, sIb } },
+ { "andQ", { Ev, sIb } },
+ { "subQ", { Ev, sIb } },
+ { "xorQ", { Ev, sIb } },
+ { "cmpQ", { Ev, sIb } },
},
/* GRP2b */
{
- { "rolA", Eb, Ib, XX },
- { "rorA", Eb, Ib, XX },
- { "rclA", Eb, Ib, XX },
- { "rcrA", Eb, Ib, XX },
- { "shlA", Eb, Ib, XX },
- { "shrA", Eb, Ib, XX },
- { "(bad)", XX, XX, XX },
- { "sarA", Eb, Ib, XX },
+ { "rolA", { Eb, Ib } },
+ { "rorA", { Eb, Ib } },
+ { "rclA", { Eb, Ib } },
+ { "rcrA", { Eb, Ib } },
+ { "shlA", { Eb, Ib } },
+ { "shrA", { Eb, Ib } },
+ { "(bad)", { XX } },
+ { "sarA", { Eb, Ib } },
},
/* GRP2S */
{
- { "rolQ", Ev, Ib, XX },
- { "rorQ", Ev, Ib, XX },
- { "rclQ", Ev, Ib, XX },
- { "rcrQ", Ev, Ib, XX },
- { "shlQ", Ev, Ib, XX },
- { "shrQ", Ev, Ib, XX },
- { "(bad)", XX, XX, XX },
- { "sarQ", Ev, Ib, XX },
+ { "rolQ", { Ev, Ib } },
+ { "rorQ", { Ev, Ib } },
+ { "rclQ", { Ev, Ib } },
+ { "rcrQ", { Ev, Ib } },
+ { "shlQ", { Ev, Ib } },
+ { "shrQ", { Ev, Ib } },
+ { "(bad)", { XX } },
+ { "sarQ", { Ev, Ib } },
},
/* GRP2b_one */
{
- { "rolA", Eb, I1, XX },
- { "rorA", Eb, I1, XX },
- { "rclA", Eb, I1, XX },
- { "rcrA", Eb, I1, XX },
- { "shlA", Eb, I1, XX },
- { "shrA", Eb, I1, XX },
- { "(bad)", XX, XX, XX },
- { "sarA", Eb, I1, XX },
+ { "rolA", { Eb, I1 } },
+ { "rorA", { Eb, I1 } },
+ { "rclA", { Eb, I1 } },
+ { "rcrA", { Eb, I1 } },
+ { "shlA", { Eb, I1 } },
+ { "shrA", { Eb, I1 } },
+ { "(bad)", { XX } },
+ { "sarA", { Eb, I1 } },
},
/* GRP2S_one */
{
- { "rolQ", Ev, I1, XX },
- { "rorQ", Ev, I1, XX },
- { "rclQ", Ev, I1, XX },
- { "rcrQ", Ev, I1, XX },
- { "shlQ", Ev, I1, XX },
- { "shrQ", Ev, I1, XX },
- { "(bad)", XX, XX, XX},
- { "sarQ", Ev, I1, XX },
+ { "rolQ", { Ev, I1 } },
+ { "rorQ", { Ev, I1 } },
+ { "rclQ", { Ev, I1 } },
+ { "rcrQ", { Ev, I1 } },
+ { "shlQ", { Ev, I1 } },
+ { "shrQ", { Ev, I1 } },
+ { "(bad)", { XX } },
+ { "sarQ", { Ev, I1 } },
},
/* GRP2b_cl */
{
- { "rolA", Eb, CL, XX },
- { "rorA", Eb, CL, XX },
- { "rclA", Eb, CL, XX },
- { "rcrA", Eb, CL, XX },
- { "shlA", Eb, CL, XX },
- { "shrA", Eb, CL, XX },
- { "(bad)", XX, XX, XX },
- { "sarA", Eb, CL, XX },
+ { "rolA", { Eb, CL } },
+ { "rorA", { Eb, CL } },
+ { "rclA", { Eb, CL } },
+ { "rcrA", { Eb, CL } },
+ { "shlA", { Eb, CL } },
+ { "shrA", { Eb, CL } },
+ { "(bad)", { XX } },
+ { "sarA", { Eb, CL } },
},
/* GRP2S_cl */
{
- { "rolQ", Ev, CL, XX },
- { "rorQ", Ev, CL, XX },
- { "rclQ", Ev, CL, XX },
- { "rcrQ", Ev, CL, XX },
- { "shlQ", Ev, CL, XX },
- { "shrQ", Ev, CL, XX },
- { "(bad)", XX, XX, XX },
- { "sarQ", Ev, CL, XX }
+ { "rolQ", { Ev, CL } },
+ { "rorQ", { Ev, CL } },
+ { "rclQ", { Ev, CL } },
+ { "rcrQ", { Ev, CL } },
+ { "shlQ", { Ev, CL } },
+ { "shrQ", { Ev, CL } },
+ { "(bad)", { XX } },
+ { "sarQ", { Ev, CL } },
},
/* GRP3b */
{
- { "testA", Eb, Ib, XX },
- { "(bad)", Eb, XX, XX },
- { "notA", Eb, XX, XX },
- { "negA", Eb, XX, XX },
- { "mulA", Eb, XX, XX }, /* Don't print the implicit %al register, */
- { "imulA", Eb, XX, XX }, /* to distinguish these opcodes from other */
- { "divA", Eb, XX, XX }, /* mul/imul opcodes. Do the same for div */
- { "idivA", Eb, XX, XX } /* and idiv for consistency. */
+ { "testA", { Eb, Ib } },
+ { "(bad)", { Eb } },
+ { "notA", { Eb } },
+ { "negA", { Eb } },
+ { "mulA", { Eb } }, /* Don't print the implicit %al register, */
+ { "imulA", { Eb } }, /* to distinguish these opcodes from other */
+ { "divA", { Eb } }, /* mul/imul opcodes. Do the same for div */
+ { "idivA", { Eb } }, /* and idiv for consistency. */
},
/* GRP3S */
{
- { "testQ", Ev, Iv, XX },
- { "(bad)", XX, XX, XX },
- { "notQ", Ev, XX, XX },
- { "negQ", Ev, XX, XX },
- { "mulQ", Ev, XX, XX }, /* Don't print the implicit register. */
- { "imulQ", Ev, XX, XX },
- { "divQ", Ev, XX, XX },
- { "idivQ", Ev, XX, XX },
+ { "testQ", { Ev, Iv } },
+ { "(bad)", { XX } },
+ { "notQ", { Ev } },
+ { "negQ", { Ev } },
+ { "mulQ", { Ev } }, /* Don't print the implicit register. */
+ { "imulQ", { Ev } },
+ { "divQ", { Ev } },
+ { "idivQ", { Ev } },
},
/* GRP4 */
{
- { "incA", Eb, XX, XX },
- { "decA", Eb, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "incA", { Eb } },
+ { "decA", { Eb } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
},
/* GRP5 */
{
- { "incQ", Ev, XX, XX },
- { "decQ", Ev, XX, XX },
- { "callT", indirEv, XX, XX },
- { "JcallT", indirEp, XX, XX },
- { "jmpT", indirEv, XX, XX },
- { "JjmpT", indirEp, XX, XX },
- { "pushU", stackEv, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "incQ", { Ev } },
+ { "decQ", { Ev } },
+ { "callT", { indirEv } },
+ { "JcallT", { indirEp } },
+ { "jmpT", { indirEv } },
+ { "JjmpT", { indirEp } },
+ { "pushU", { stackEv } },
+ { "(bad)", { XX } },
},
/* GRP6 */
{
- { "sldtQ", Ev, XX, XX },
- { "strQ", Ev, XX, XX },
- { "lldt", Ew, XX, XX },
- { "ltr", Ew, XX, XX },
- { "verr", Ew, XX, XX },
- { "verw", Ew, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX }
+ { "sldtD", { Sv } },
+ { "strD", { Sv } },
+ { "lldt", { Ew } },
+ { "ltr", { Ew } },
+ { "verr", { Ew } },
+ { "verw", { Ew } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
},
/* GRP7 */
{
- { "sgdtIQ", VMX_Fixup, 0, XX, XX },
- { "sidtIQ", PNI_Fixup, 0, XX, XX },
- { "lgdt{Q|Q||}", M, XX, XX },
- { "lidt{Q|Q||}", SVME_Fixup, 0, XX, XX },
- { "smswQ", Ev, XX, XX },
- { "(bad)", XX, XX, XX },
- { "lmsw", Ew, XX, XX },
- { "invlpg", INVLPG_Fixup, w_mode, XX, XX },
+ { "sgdt{Q|IQ||}", { { VMX_Fixup, 0 } } },
+ { "sidt{Q|IQ||}", { { PNI_Fixup, 0 } } },
+ { "lgdt{Q|Q||}", { M } },
+ { "lidt{Q|Q||}", { { SVME_Fixup, 0 } } },
+ { "smswD", { Sv } },
+ { "(bad)", { XX } },
+ { "lmsw", { Ew } },
+ { "invlpg", { { INVLPG_Fixup, w_mode } } },
},
/* GRP8 */
{
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "btQ", Ev, Ib, XX },
- { "btsQ", Ev, Ib, XX },
- { "btrQ", Ev, Ib, XX },
- { "btcQ", Ev, Ib, XX },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "btQ", { Ev, Ib } },
+ { "btsQ", { Ev, Ib } },
+ { "btrQ", { Ev, Ib } },
+ { "btcQ", { Ev, Ib } },
},
/* GRP9 */
{
- { "(bad)", XX, XX, XX },
- { "cmpxchg8b", Eq, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "", VM, XX, XX }, /* See OP_VMX. */
- { "vmptrst", Eq, XX, XX },
- },
- /* GRP10 */
- {
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "psrlw", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
- { "psraw", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
- { "psllw", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
- },
- /* GRP11 */
- {
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "psrld", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
- { "psrad", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
- { "pslld", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
+ { "(bad)", { XX } },
+ { "cmpxchg8b", { { CMPXCHG8B_Fixup, q_mode } } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "", { VM } }, /* See OP_VMX. */
+ { "vmptrst", { Mq } },
+ },
+ /* GRP11_C6 */
+ {
+ { "movA", { Eb, Ib } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ },
+ /* GRP11_C7 */
+ {
+ { "movQ", { Ev, Iv } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
},
/* GRP12 */
{
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "psrlq", MS, Ib, XX },
- { "psrldq", MS, Ib, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "psllq", MS, Ib, XX },
- { "pslldq", MS, Ib, XX },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "psrlw", { MS, Ib } },
+ { "(bad)", { XX } },
+ { "psraw", { MS, Ib } },
+ { "(bad)", { XX } },
+ { "psllw", { MS, Ib } },
+ { "(bad)", { XX } },
},
/* GRP13 */
{
- { "fxsave", Ev, XX, XX },
- { "fxrstor", Ev, XX, XX },
- { "ldmxcsr", Ev, XX, XX },
- { "stmxcsr", Ev, XX, XX },
- { "(bad)", XX, XX, XX },
- { "lfence", OP_0fae, 0, XX, XX },
- { "mfence", OP_0fae, 0, XX, XX },
- { "clflush", OP_0fae, 0, XX, XX },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "psrld", { MS, Ib } },
+ { "(bad)", { XX } },
+ { "psrad", { MS, Ib } },
+ { "(bad)", { XX } },
+ { "pslld", { MS, Ib } },
+ { "(bad)", { XX } },
},
/* GRP14 */
{
- { "prefetchnta", Ev, XX, XX },
- { "prefetcht0", Ev, XX, XX },
- { "prefetcht1", Ev, XX, XX },
- { "prefetcht2", Ev, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "psrlq", { MS, Ib } },
+ { "psrldq", { MS, Ib } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "psllq", { MS, Ib } },
+ { "pslldq", { MS, Ib } },
+ },
+ /* GRP15 */
+ {
+ { "fxsave", { Ev } },
+ { "fxrstor", { Ev } },
+ { "ldmxcsr", { Ev } },
+ { "stmxcsr", { Ev } },
+ { "(bad)", { XX } },
+ { "lfence", { { OP_0fae, 0 } } },
+ { "mfence", { { OP_0fae, 0 } } },
+ { "clflush", { { OP_0fae, 0 } } },
+ },
+ /* GRP16 */
+ {
+ { "prefetchnta", { Ev } },
+ { "prefetcht0", { Ev } },
+ { "prefetcht1", { Ev } },
+ { "prefetcht2", { Ev } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
},
/* GRPAMD */
{
- { "prefetch", Eb, XX, XX },
- { "prefetchw", Eb, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "prefetch", { Eb } },
+ { "prefetchw", { Eb } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
},
/* GRPPADLCK1 */
{
- { "xstore-rng", OP_0f07, 0, XX, XX },
- { "xcrypt-ecb", OP_0f07, 0, XX, XX },
- { "xcrypt-cbc", OP_0f07, 0, XX, XX },
- { "xcrypt-ctr", OP_0f07, 0, XX, XX },
- { "xcrypt-cfb", OP_0f07, 0, XX, XX },
- { "xcrypt-ofb", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
+ { "xstore-rng", { { OP_0f07, 0 } } },
+ { "xcrypt-ecb", { { OP_0f07, 0 } } },
+ { "xcrypt-cbc", { { OP_0f07, 0 } } },
+ { "xcrypt-ctr", { { OP_0f07, 0 } } },
+ { "xcrypt-cfb", { { OP_0f07, 0 } } },
+ { "xcrypt-ofb", { { OP_0f07, 0 } } },
+ { "(bad)", { { OP_0f07, 0 } } },
+ { "(bad)", { { OP_0f07, 0 } } },
},
/* GRPPADLCK2 */
{
- { "montmul", OP_0f07, 0, XX, XX },
- { "xsha1", OP_0f07, 0, XX, XX },
- { "xsha256", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
- { "(bad)", OP_0f07, 0, XX, XX },
+ { "montmul", { { OP_0f07, 0 } } },
+ { "xsha1", { { OP_0f07, 0 } } },
+ { "xsha256", { { OP_0f07, 0 } } },
+ { "(bad)", { { OP_0f07, 0 } } },
+ { "(bad)", { { OP_0f07, 0 } } },
+ { "(bad)", { { OP_0f07, 0 } } },
+ { "(bad)", { { OP_0f07, 0 } } },
+ { "(bad)", { { OP_0f07, 0 } } },
}
};
static const struct dis386 prefix_user_table[][4] = {
/* PREGRP0 */
{
- { "addps", XM, EX, XX },
- { "addss", XM, EX, XX },
- { "addpd", XM, EX, XX },
- { "addsd", XM, EX, XX },
+ { "addps", { XM, EXx } },
+ { "addss", { XM, EXd } },
+ { "addpd", { XM, EXx } },
+ { "addsd", { XM, EXq } },
},
/* PREGRP1 */
{
- { "", XM, EX, OPSIMD }, /* See OP_SIMD_SUFFIX. */
- { "", XM, EX, OPSIMD },
- { "", XM, EX, OPSIMD },
- { "", XM, EX, OPSIMD },
+ { "", { XM, EXx, OPSIMD } }, /* See OP_SIMD_SUFFIX. */
+ { "", { XM, EXx, OPSIMD } },
+ { "", { XM, EXx, OPSIMD } },
+ { "", { XM, EXx, OPSIMD } },
},
/* PREGRP2 */
{
- { "cvtpi2ps", XM, EM, XX },
- { "cvtsi2ssY", XM, Ev, XX },
- { "cvtpi2pd", XM, EM, XX },
- { "cvtsi2sdY", XM, Ev, XX },
+ { "cvtpi2ps", { XM, EMC } },
+ { "cvtsi2ssY", { XM, Ev } },
+ { "cvtpi2pd", { XM, EMC } },
+ { "cvtsi2sdY", { XM, Ev } },
},
/* PREGRP3 */
{
- { "cvtps2pi", MX, EX, XX },
- { "cvtss2siY", Gv, EX, XX },
- { "cvtpd2pi", MX, EX, XX },
- { "cvtsd2siY", Gv, EX, XX },
+ { "cvtps2pi", { MXC, EXx } },
+ { "cvtss2siY", { Gv, EXx } },
+ { "cvtpd2pi", { MXC, EXx } },
+ { "cvtsd2siY", { Gv, EXx } },
},
/* PREGRP4 */
{
- { "cvttps2pi", MX, EX, XX },
- { "cvttss2siY", Gv, EX, XX },
- { "cvttpd2pi", MX, EX, XX },
- { "cvttsd2siY", Gv, EX, XX },
+ { "cvttps2pi", { MXC, EXx } },
+ { "cvttss2siY", { Gv, EXx } },
+ { "cvttpd2pi", { MXC, EXx } },
+ { "cvttsd2siY", { Gv, EXx } },
},
/* PREGRP5 */
{
- { "divps", XM, EX, XX },
- { "divss", XM, EX, XX },
- { "divpd", XM, EX, XX },
- { "divsd", XM, EX, XX },
+ { "divps", { XM, EXx } },
+ { "divss", { XM, EXx } },
+ { "divpd", { XM, EXx } },
+ { "divsd", { XM, EXx } },
},
/* PREGRP6 */
{
- { "maxps", XM, EX, XX },
- { "maxss", XM, EX, XX },
- { "maxpd", XM, EX, XX },
- { "maxsd", XM, EX, XX },
+ { "maxps", { XM, EXx } },
+ { "maxss", { XM, EXx } },
+ { "maxpd", { XM, EXx } },
+ { "maxsd", { XM, EXx } },
},
/* PREGRP7 */
{
- { "minps", XM, EX, XX },
- { "minss", XM, EX, XX },
- { "minpd", XM, EX, XX },
- { "minsd", XM, EX, XX },
+ { "minps", { XM, EXx } },
+ { "minss", { XM, EXx } },
+ { "minpd", { XM, EXx } },
+ { "minsd", { XM, EXx } },
},
/* PREGRP8 */
{
- { "movups", XM, EX, XX },
- { "movss", XM, EX, XX },
- { "movupd", XM, EX, XX },
- { "movsd", XM, EX, XX },
+ { "movups", { XM, EXx } },
+ { "movss", { XM, EXx } },
+ { "movupd", { XM, EXx } },
+ { "movsd", { XM, EXx } },
},
/* PREGRP9 */
{
- { "movups", EX, XM, XX },
- { "movss", EX, XM, XX },
- { "movupd", EX, XM, XX },
- { "movsd", EX, XM, XX },
+ { "movups", { EXx, XM } },
+ { "movss", { EXx, XM } },
+ { "movupd", { EXx, XM } },
+ { "movsd", { EXx, XM } },
},
/* PREGRP10 */
{
- { "mulps", XM, EX, XX },
- { "mulss", XM, EX, XX },
- { "mulpd", XM, EX, XX },
- { "mulsd", XM, EX, XX },
+ { "mulps", { XM, EXx } },
+ { "mulss", { XM, EXx } },
+ { "mulpd", { XM, EXx } },
+ { "mulsd", { XM, EXx } },
},
/* PREGRP11 */
{
- { "rcpps", XM, EX, XX },
- { "rcpss", XM, EX, XX },
- { "(bad)", XM, EX, XX },
- { "(bad)", XM, EX, XX },
+ { "rcpps", { XM, EXx } },
+ { "rcpss", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
},
/* PREGRP12 */
{
- { "rsqrtps", XM, EX, XX },
- { "rsqrtss", XM, EX, XX },
- { "(bad)", XM, EX, XX },
- { "(bad)", XM, EX, XX },
+ { "rsqrtps",{ XM, EXx } },
+ { "rsqrtss",{ XM, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
},
/* PREGRP13 */
{
- { "sqrtps", XM, EX, XX },
- { "sqrtss", XM, EX, XX },
- { "sqrtpd", XM, EX, XX },
- { "sqrtsd", XM, EX, XX },
+ { "sqrtps", { XM, EXx } },
+ { "sqrtss", { XM, EXx } },
+ { "sqrtpd", { XM, EXx } },
+ { "sqrtsd", { XM, EXx } },
},
/* PREGRP14 */
{
- { "subps", XM, EX, XX },
- { "subss", XM, EX, XX },
- { "subpd", XM, EX, XX },
- { "subsd", XM, EX, XX },
+ { "subps", { XM, EXx } },
+ { "subss", { XM, EXx } },
+ { "subpd", { XM, EXx } },
+ { "subsd", { XM, EXx } },
},
/* PREGRP15 */
{
- { "(bad)", XM, EX, XX },
- { "cvtdq2pd", XM, EX, XX },
- { "cvttpd2dq", XM, EX, XX },
- { "cvtpd2dq", XM, EX, XX },
+ { "(bad)", { XM, EXx } },
+ { "cvtdq2pd", { XM, EXq } },
+ { "cvttpd2dq", { XM, EXx } },
+ { "cvtpd2dq", { XM, EXx } },
},
/* PREGRP16 */
{
- { "cvtdq2ps", XM, EX, XX },
- { "cvttps2dq",XM, EX, XX },
- { "cvtps2dq",XM, EX, XX },
- { "(bad)", XM, EX, XX },
+ { "cvtdq2ps", { XM, EXx } },
+ { "cvttps2dq", { XM, EXx } },
+ { "cvtps2dq", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
},
/* PREGRP17 */
{
- { "cvtps2pd", XM, EX, XX },
- { "cvtss2sd", XM, EX, XX },
- { "cvtpd2ps", XM, EX, XX },
- { "cvtsd2ss", XM, EX, XX },
+ { "cvtps2pd", { XM, EXq } },
+ { "cvtss2sd", { XM, EXx } },
+ { "cvtpd2ps", { XM, EXx } },
+ { "cvtsd2ss", { XM, EXx } },
},
/* PREGRP18 */
{
- { "maskmovq", MX, MS, XX },
- { "(bad)", XM, EX, XX },
- { "maskmovdqu", XM, EX, XX },
- { "(bad)", XM, EX, XX },
+ { "maskmovq", { MX, MS } },
+ { "(bad)", { XM, EXx } },
+ { "maskmovdqu", { XM, XS } },
+ { "(bad)", { XM, EXx } },
},
/* PREGRP19 */
{
- { "movq", MX, EM, XX },
- { "movdqu", XM, EX, XX },
- { "movdqa", XM, EX, XX },
- { "(bad)", XM, EX, XX },
+ { "movq", { MX, EM } },
+ { "movdqu", { XM, EXx } },
+ { "movdqa", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
},
/* PREGRP20 */
{
- { "movq", EM, MX, XX },
- { "movdqu", EX, XM, XX },
- { "movdqa", EX, XM, XX },
- { "(bad)", EX, XM, XX },
+ { "movq", { EM, MX } },
+ { "movdqu", { EXx, XM } },
+ { "movdqa", { EXx, XM } },
+ { "(bad)", { EXx, XM } },
},
/* PREGRP21 */
{
- { "(bad)", EX, XM, XX },
- { "movq2dq", XM, MS, XX },
- { "movq", EX, XM, XX },
- { "movdq2q", MX, XS, XX },
+ { "(bad)", { EXx, XM } },
+ { "movq2dq",{ XM, MS } },
+ { "movq", { EXx, XM } },
+ { "movdq2q",{ MX, XS } },
},
/* PREGRP22 */
{
- { "pshufw", MX, EM, Ib },
- { "pshufhw", XM, EX, Ib },
- { "pshufd", XM, EX, Ib },
- { "pshuflw", XM, EX, Ib },
+ { "pshufw", { MX, EM, Ib } },
+ { "pshufhw",{ XM, EXx, Ib } },
+ { "pshufd", { XM, EXx, Ib } },
+ { "pshuflw",{ XM, EXx, Ib } },
},
/* PREGRP23 */
{
- { "movd", Edq, MX, XX },
- { "movq", XM, EX, XX },
- { "movd", Edq, XM, XX },
- { "(bad)", Ed, XM, XX },
+ { "movd", { Edq, MX } },
+ { "movq", { XM, EXx } },
+ { "movd", { Edq, XM } },
+ { "(bad)", { Ed, XM } },
},
/* PREGRP24 */
{
- { "(bad)", MX, EX, XX },
- { "(bad)", XM, EX, XX },
- { "punpckhqdq", XM, EX, XX },
- { "(bad)", XM, EX, XX },
+ { "(bad)", { MX, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "punpckhqdq", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
},
/* PREGRP25 */
{
- { "movntq", EM, MX, XX },
- { "(bad)", EM, XM, XX },
- { "movntdq", EM, XM, XX },
- { "(bad)", EM, XM, XX },
+ { "movntq", { EM, MX } },
+ { "(bad)", { EM, XM } },
+ { "movntdq",{ EM, XM } },
+ { "(bad)", { EM, XM } },
},
/* PREGRP26 */
{
- { "(bad)", MX, EX, XX },
- { "(bad)", XM, EX, XX },
- { "punpcklqdq", XM, EX, XX },
- { "(bad)", XM, EX, XX },
+ { "(bad)", { MX, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "punpcklqdq", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
},
/* PREGRP27 */
{
- { "(bad)", MX, EX, XX },
- { "(bad)", XM, EX, XX },
- { "addsubpd", XM, EX, XX },
- { "addsubps", XM, EX, XX },
+ { "(bad)", { MX, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "addsubpd", { XM, EXx } },
+ { "addsubps", { XM, EXx } },
},
/* PREGRP28 */
{
- { "(bad)", MX, EX, XX },
- { "(bad)", XM, EX, XX },
- { "haddpd", XM, EX, XX },
- { "haddps", XM, EX, XX },
+ { "(bad)", { MX, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "haddpd", { XM, EXx } },
+ { "haddps", { XM, EXx } },
},
/* PREGRP29 */
{
- { "(bad)", MX, EX, XX },
- { "(bad)", XM, EX, XX },
- { "hsubpd", XM, EX, XX },
- { "hsubps", XM, EX, XX },
+ { "(bad)", { MX, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "hsubpd", { XM, EXx } },
+ { "hsubps", { XM, EXx } },
},
/* PREGRP30 */
{
- { "movlpX", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */
- { "movsldup", XM, EX, XX },
- { "movlpd", XM, EX, XX },
- { "movddup", XM, EX, XX },
+ { "movlpX", { XM, EXq, { SIMD_Fixup, 'h' } } }, /* really only 2 operands */
+ { "movsldup", { XM, EXx } },
+ { "movlpd", { XM, EXq } },
+ { "movddup", { XM, EXq } },
},
/* PREGRP31 */
{
- { "movhpX", XM, EX, SIMD_Fixup, 'l' },
- { "movshdup", XM, EX, XX },
- { "movhpd", XM, EX, XX },
- { "(bad)", XM, EX, XX },
+ { "movhpX", { XM, EXq, { SIMD_Fixup, 'l' } } },
+ { "movshdup", { XM, EXx } },
+ { "movhpd", { XM, EXq } },
+ { "(bad)", { XM, EXq } },
},
/* PREGRP32 */
{
- { "(bad)", XM, EX, XX },
- { "(bad)", XM, EX, XX },
- { "(bad)", XM, EX, XX },
- { "lddqu", XM, M, XX },
+ { "(bad)", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "(bad)", { XM, EXx } },
+ { "lddqu", { XM, M } },
+ },
+ /* PREGRP33 */
+ {
+ {"movntps", { Ev, XM } },
+ {"movntss", { Ev, XM } },
+ {"movntpd", { Ev, XM } },
+ {"movntsd", { Ev, XM } },
+ },
+
+ /* PREGRP34 */
+ {
+ {"vmread", { Em, Gm } },
+ {"(bad)", { XX } },
+ {"extrq", { XS, Ib, Ib } },
+ {"insertq", { XM, XS, Ib, Ib } },
+ },
+
+ /* PREGRP35 */
+ {
+ {"vmwrite", { Gm, Em } },
+ {"(bad)", { XX } },
+ {"extrq", { XM, XS } },
+ {"insertq", { XM, XS } },
+ },
+
+ /* PREGRP36 */
+ {
+ { "bsrS", { Gv, Ev } },
+ { "lzcntS", { Gv, Ev } },
+ { "bsrS", { Gv, Ev } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP37 */
+ {
+ { "(bad)", { XX } },
+ { "popcntS", { Gv, Ev } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP38 */
+ {
+ { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
+ { "pause", { XX } },
+ { "xchgS", { { NOP_Fixup1, eAX_reg }, { NOP_Fixup2, eAX_reg } } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP39 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pblendvb", {XM, EXx, XMM0 } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP40 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "blendvps", {XM, EXx, XMM0 } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP41 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "blendvpd", { XM, EXx, XMM0 } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP42 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "ptest", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP43 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovsxbw", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP44 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovsxbd", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP45 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovsxbq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP46 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovsxwd", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP47 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovsxwq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP48 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovsxdq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP49 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmuldq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP50 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pcmpeqq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP51 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "movntdqa", { XM, EM } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP52 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "packusdw", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP53 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovzxbw", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP54 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovzxbd", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP55 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovzxbq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP56 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovzxwd", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP57 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovzxwq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP58 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmovzxdq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP59 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pminsb", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP60 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pminsd", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP61 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pminuw", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP62 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pminud", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP63 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmaxsb", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP64 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmaxsd", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP65 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmaxuw", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP66 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmaxud", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP67 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pmulld", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP68 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "phminposuw", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP69 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "roundps", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP70 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "roundpd", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP71 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "roundss", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP72 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "roundsd", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP73 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "blendps", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP74 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "blendpd", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP75 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pblendw", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP76 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pextrb", { Edqb, XM, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP77 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pextrw", { Edqw, XM, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP78 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pextrK", { Edq, XM, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP79 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "extractps", { Edqd, XM, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP80 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pinsrb", { XM, Edqb, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP81 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "insertps", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP82 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pinsrK", { XM, Edq, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP83 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "dpps", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP84 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "dppd", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP85 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "mpsadbw", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP86 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pcmpgtq", { XM, EXx } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP87 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "crc32", { Gdq, { CRC32_Fixup, b_mode } } },
+ },
+
+ /* PREGRP88 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "crc32", { Gdq, { CRC32_Fixup, v_mode } } },
+ },
+
+ /* PREGRP89 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pcmpestrm", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP90 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pcmpestri", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP91 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pcmpistrm", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP92 */
+ {
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pcmpistri", { XM, EXx, Ib } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP93 */
+ {
+ { "ucomiss",{ XM, EXd } },
+ { "(bad)", { XX } },
+ { "ucomisd",{ XM, EXq } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP94 */
+ {
+ { "comiss", { XM, EXd } },
+ { "(bad)", { XX } },
+ { "comisd", { XM, EXq } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP95 */
+ {
+ { "punpcklbw",{ MX, EMd } },
+ { "(bad)", { XX } },
+ { "punpcklbw",{ MX, EMq } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP96 */
+ {
+ { "punpcklwd",{ MX, EMd } },
+ { "(bad)", { XX } },
+ { "punpcklwd",{ MX, EMq } },
+ { "(bad)", { XX } },
+ },
+
+ /* PREGRP97 */
+ {
+ { "punpckldq",{ MX, EMd } },
+ { "(bad)", { XX } },
+ { "punpckldq",{ MX, EMq } },
+ { "(bad)", { XX } },
},
};
static const struct dis386 x86_64_table[][2] = {
{
- { "arpl", Ew, Gw, XX },
- { "movs{||lq|xd}", Gv, Ed, XX },
+ { "pusha{P|}", { XX } },
+ { "(bad)", { XX } },
+ },
+ {
+ { "popa{P|}", { XX } },
+ { "(bad)", { XX } },
+ },
+ {
+ { "bound{S|}", { Gv, Ma } },
+ { "(bad)", { XX } },
+ },
+ {
+ { "arpl", { Ew, Gw } },
+ { "movs{||lq|xd}", { Gv, Ed } },
},
};
-static const struct dis386 three_byte_table[][32] = {
+static const struct dis386 three_byte_table[][256] = {
/* THREE_BYTE_0 */
{
- { "pshufb", MX, EM, XX },
- { "phaddw", MX, EM, XX },
- { "phaddd", MX, EM, XX },
- { "phaddsw", MX, EM, XX },
- { "pmaddubsw", MX, EM, XX },
- { "phsubw", MX, EM, XX },
- { "phsubd", MX, EM, XX },
- { "phsubsw", MX, EM, XX },
- { "psignb", MX, EM, XX },
- { "psignw", MX, EM, XX },
- { "psignd", MX, EM, XX },
- { "pmulhrsw", MX, EM, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "pabsb", MX, EM, XX },
- { "pabsw", MX, EM, XX },
- { "pabsd", MX, EM, XX },
- { "(bad)", XX, XX, XX }
+ /* 00 */
+ { "pshufb", { MX, EM } },
+ { "phaddw", { MX, EM } },
+ { "phaddd", { MX, EM } },
+ { "phaddsw", { MX, EM } },
+ { "pmaddubsw", { MX, EM } },
+ { "phsubw", { MX, EM } },
+ { "phsubd", { MX, EM } },
+ { "phsubsw", { MX, EM } },
+ /* 08 */
+ { "psignb", { MX, EM } },
+ { "psignw", { MX, EM } },
+ { "psignd", { MX, EM } },
+ { "pmulhrsw", { MX, EM } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 10 */
+ { PREGRP39 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { PREGRP40 },
+ { PREGRP41 },
+ { "(bad)", { XX } },
+ { PREGRP42 },
+ /* 18 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "pabsb", { MX, EM } },
+ { "pabsw", { MX, EM } },
+ { "pabsd", { MX, EM } },
+ { "(bad)", { XX } },
+ /* 20 */
+ { PREGRP43 },
+ { PREGRP44 },
+ { PREGRP45 },
+ { PREGRP46 },
+ { PREGRP47 },
+ { PREGRP48 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 28 */
+ { PREGRP49 },
+ { PREGRP50 },
+ { PREGRP51 },
+ { PREGRP52 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 30 */
+ { PREGRP53 },
+ { PREGRP54 },
+ { PREGRP55 },
+ { PREGRP56 },
+ { PREGRP57 },
+ { PREGRP58 },
+ { "(bad)", { XX } },
+ { PREGRP86 },
+ /* 38 */
+ { PREGRP59 },
+ { PREGRP60 },
+ { PREGRP61 },
+ { PREGRP62 },
+ { PREGRP63 },
+ { PREGRP64 },
+ { PREGRP65 },
+ { PREGRP66 },
+ /* 40 */
+ { PREGRP67 },
+ { PREGRP68 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 48 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 50 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 58 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 60 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 68 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 70 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 78 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 80 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 88 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 90 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 98 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* a0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* a8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* b0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* b8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* c0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* c8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* d0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* d8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* e0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* e8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* f0 */
+ { PREGRP87 },
+ { PREGRP88 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* f8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
},
/* THREE_BYTE_1 */
{
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "palignr", MX, EM, Ib },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX }
- },
+ /* 00 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 08 */
+ { PREGRP69 },
+ { PREGRP70 },
+ { PREGRP71 },
+ { PREGRP72 },
+ { PREGRP73 },
+ { PREGRP74 },
+ { PREGRP75 },
+ { "palignr", { MX, EM, Ib } },
+ /* 10 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { PREGRP76 },
+ { PREGRP77 },
+ { PREGRP78 },
+ { PREGRP79 },
+ /* 18 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 20 */
+ { PREGRP80 },
+ { PREGRP81 },
+ { PREGRP82 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 28 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 30 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 38 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 40 */
+ { PREGRP83 },
+ { PREGRP84 },
+ { PREGRP85 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 48 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 50 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 58 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 60 */
+ { PREGRP89 },
+ { PREGRP90 },
+ { PREGRP91 },
+ { PREGRP92 },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 68 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 70 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 78 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 80 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 88 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 90 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* 98 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* a0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* a8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* b0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* b8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* c0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* c8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* d0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* d8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* e0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* e8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* f0 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ /* f8 */
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ }
};
#define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>")
@@ -1938,41 +3294,46 @@ ckprefix (void)
static const char *
prefix_name (int pref, int sizeflag)
{
+ static const char *rexes [16] =
+ {
+ "rex", /* 0x40 */
+ "rex.B", /* 0x41 */
+ "rex.X", /* 0x42 */
+ "rex.XB", /* 0x43 */
+ "rex.R", /* 0x44 */
+ "rex.RB", /* 0x45 */
+ "rex.RX", /* 0x46 */
+ "rex.RXB", /* 0x47 */
+ "rex.W", /* 0x48 */
+ "rex.WB", /* 0x49 */
+ "rex.WX", /* 0x4a */
+ "rex.WXB", /* 0x4b */
+ "rex.WR", /* 0x4c */
+ "rex.WRB", /* 0x4d */
+ "rex.WRX", /* 0x4e */
+ "rex.WRXB", /* 0x4f */
+ };
+
switch (pref)
{
/* REX prefixes family. */
case 0x40:
- return "rex";
case 0x41:
- return "rexZ";
case 0x42:
- return "rexY";
case 0x43:
- return "rexYZ";
case 0x44:
- return "rexX";
case 0x45:
- return "rexXZ";
case 0x46:
- return "rexXY";
case 0x47:
- return "rexXYZ";
case 0x48:
- return "rex64";
case 0x49:
- return "rex64Z";
case 0x4a:
- return "rex64Y";
case 0x4b:
- return "rex64YZ";
case 0x4c:
- return "rex64X";
case 0x4d:
- return "rex64XZ";
case 0x4e:
- return "rex64XY";
case 0x4f:
- return "rex64XYZ";
+ return rexes [pref - 0x40];
case 0xf3:
return "repz";
case 0xf2:
@@ -2005,13 +3366,13 @@ prefix_name (int pref, int sizeflag)
}
}
-static char op1out[100], op2out[100], op3out[100];
-static int op_ad, op_index[3];
+static char op_out[MAX_OPERANDS][100];
+static int op_ad, op_index[MAX_OPERANDS];
static int two_source_ops;
-static bfd_vma op_address[3];
-static bfd_vma op_riprel[3];
+static bfd_vma op_address[MAX_OPERANDS];
+static bfd_vma op_riprel[MAX_OPERANDS];
static bfd_vma start_pc;
-
+
/*
* On the 386's of 1988, the maximum length of an instruction is 15 bytes.
* (see topic "Redundant prefixes" in the "Differences from 8086"
@@ -2054,17 +3415,39 @@ print_insn_i386 (bfd_vma pc, disassemble_info *info)
return print_insn (pc, info);
}
+void
+print_i386_disassembler_options (FILE *stream)
+{
+ fprintf (stream, _("\n\
+The following i386/x86-64 specific disassembler options are supported for use\n\
+with the -M switch (multiple options should be separated by commas):\n"));
+
+ fprintf (stream, _(" x86-64 Disassemble in 64bit mode\n"));
+ fprintf (stream, _(" i386 Disassemble in 32bit mode\n"));
+ fprintf (stream, _(" i8086 Disassemble in 16bit mode\n"));
+ fprintf (stream, _(" att Display instruction in AT&T syntax\n"));
+ fprintf (stream, _(" intel Display instruction in Intel syntax\n"));
+ fprintf (stream, _(" addr64 Assume 64bit address size\n"));
+ fprintf (stream, _(" addr32 Assume 32bit address size\n"));
+ fprintf (stream, _(" addr16 Assume 16bit address size\n"));
+ fprintf (stream, _(" data32 Assume 32bit data size\n"));
+ fprintf (stream, _(" data16 Assume 16bit data size\n"));
+ fprintf (stream, _(" suffix Always display instruction suffix in AT&T syntax\n"));
+}
+
static int
print_insn (bfd_vma pc, disassemble_info *info)
{
const struct dis386 *dp;
int i;
- char *first, *second, *third;
+ char *op_txt[MAX_OPERANDS];
int needcomma;
- unsigned char uses_SSE_prefix, uses_LOCK_prefix;
+ unsigned char uses_DATA_prefix, uses_LOCK_prefix;
+ unsigned char uses_REPNZ_prefix, uses_REPZ_prefix;
int sizeflag;
const char *p;
struct dis_private priv;
+ unsigned char op;
if (info->mach == bfd_mach_x86_64_intel_syntax
|| info->mach == bfd_mach_x86_64)
@@ -2088,44 +3471,54 @@ print_insn (bfd_vma pc, disassemble_info *info)
for (p = info->disassembler_options; p != NULL; )
{
- if (strncmp (p, "x86-64", 6) == 0)
+ if (CONST_STRNEQ (p, "x86-64"))
{
address_mode = mode_64bit;
priv.orig_sizeflag = AFLAG | DFLAG;
}
- else if (strncmp (p, "i386", 4) == 0)
+ else if (CONST_STRNEQ (p, "i386"))
{
address_mode = mode_32bit;
priv.orig_sizeflag = AFLAG | DFLAG;
}
- else if (strncmp (p, "i8086", 5) == 0)
+ else if (CONST_STRNEQ (p, "i8086"))
{
address_mode = mode_16bit;
priv.orig_sizeflag = 0;
}
- else if (strncmp (p, "intel", 5) == 0)
+ else if (CONST_STRNEQ (p, "intel"))
{
intel_syntax = 1;
}
- else if (strncmp (p, "att", 3) == 0)
+ else if (CONST_STRNEQ (p, "att"))
{
intel_syntax = 0;
}
- else if (strncmp (p, "addr", 4) == 0)
+ else if (CONST_STRNEQ (p, "addr"))
{
- if (p[4] == '1' && p[5] == '6')
- priv.orig_sizeflag &= ~AFLAG;
- else if (p[4] == '3' && p[5] == '2')
- priv.orig_sizeflag |= AFLAG;
+ if (address_mode == mode_64bit)
+ {
+ if (p[4] == '3' && p[5] == '2')
+ priv.orig_sizeflag &= ~AFLAG;
+ else if (p[4] == '6' && p[5] == '4')
+ priv.orig_sizeflag |= AFLAG;
+ }
+ else
+ {
+ 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)
+ else if (CONST_STRNEQ (p, "data"))
{
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)
+ else if (CONST_STRNEQ (p, "suffix"))
priv.orig_sizeflag |= SUFFIX_ALWAYS;
p = strchr (p, ',');
@@ -2171,11 +3564,11 @@ print_insn (bfd_vma pc, disassemble_info *info)
priv.insn_start = pc;
obuf[0] = 0;
- op1out[0] = 0;
- op2out[0] = 0;
- op3out[0] = 0;
-
- op_index[0] = op_index[1] = op_index[2] = -1;
+ for (i = 0; i < MAX_OPERANDS; ++i)
+ {
+ op_out[i][0] = 0;
+ op_index[i] = -1;
+ }
the_info = info;
start_pc = pc;
@@ -2231,33 +3624,63 @@ print_insn (bfd_vma pc, disassemble_info *info)
return 1;
}
+ op = 0;
if (*codep == 0x0f)
{
+ unsigned char threebyte;
FETCH_DATA (info, codep + 2);
- dp = &dis386_twobyte[*++codep];
+ threebyte = *++codep;
+ dp = &dis386_twobyte[threebyte];
need_modrm = twobyte_has_modrm[*codep];
- uses_SSE_prefix = twobyte_uses_SSE_prefix[*codep];
+ uses_DATA_prefix = twobyte_uses_DATA_prefix[*codep];
+ uses_REPNZ_prefix = twobyte_uses_REPNZ_prefix[*codep];
+ uses_REPZ_prefix = twobyte_uses_REPZ_prefix[*codep];
uses_LOCK_prefix = (*codep & ~0x02) == 0x20;
+ codep++;
+ if (dp->name == NULL && dp->op[0].bytemode == IS_3BYTE_OPCODE)
+ {
+ FETCH_DATA (info, codep + 2);
+ op = *codep++;
+ switch (threebyte)
+ {
+ case 0x38:
+ uses_DATA_prefix = threebyte_0x38_uses_DATA_prefix[op];
+ uses_REPNZ_prefix = threebyte_0x38_uses_REPNZ_prefix[op];
+ uses_REPZ_prefix = threebyte_0x38_uses_REPZ_prefix[op];
+ break;
+ case 0x3a:
+ uses_DATA_prefix = threebyte_0x3a_uses_DATA_prefix[op];
+ uses_REPNZ_prefix = threebyte_0x3a_uses_REPNZ_prefix[op];
+ uses_REPZ_prefix = threebyte_0x3a_uses_REPZ_prefix[op];
+ break;
+ default:
+ break;
+ }
+ }
}
else
{
dp = &dis386[*codep];
need_modrm = onebyte_has_modrm[*codep];
- uses_SSE_prefix = 0;
+ uses_DATA_prefix = 0;
+ uses_REPNZ_prefix = 0;
+ /* pause is 0xf3 0x90. */
+ uses_REPZ_prefix = *codep == 0x90;
uses_LOCK_prefix = 0;
+ codep++;
}
- codep++;
- if (!uses_SSE_prefix && (prefixes & PREFIX_REPZ))
+ if (!uses_REPZ_prefix && (prefixes & PREFIX_REPZ))
{
oappend ("repz ");
used_prefixes |= PREFIX_REPZ;
}
- if (!uses_SSE_prefix && (prefixes & PREFIX_REPNZ))
+ if (!uses_REPNZ_prefix && (prefixes & PREFIX_REPNZ))
{
oappend ("repnz ");
used_prefixes |= PREFIX_REPNZ;
}
+
if (!uses_LOCK_prefix && (prefixes & PREFIX_LOCK))
{
oappend ("lock ");
@@ -2267,7 +3690,7 @@ print_insn (bfd_vma pc, disassemble_info *info)
if (prefixes & PREFIX_ADDR)
{
sizeflag ^= AFLAG;
- if (dp->bytemode3 != loop_jcxz_mode || intel_syntax)
+ if (dp->op[2].bytemode != loop_jcxz_mode || intel_syntax)
{
if ((sizeflag & AFLAG) || address_mode == mode_64bit)
oappend ("addr32 ");
@@ -2277,11 +3700,11 @@ print_insn (bfd_vma pc, disassemble_info *info)
}
}
- if (!uses_SSE_prefix && (prefixes & PREFIX_DATA))
+ if (!uses_DATA_prefix && (prefixes & PREFIX_DATA))
{
sizeflag ^= DFLAG;
- if (dp->bytemode3 == cond_jump_mode
- && dp->bytemode1 == v_mode
+ if (dp->op[2].bytemode == cond_jump_mode
+ && dp->op[0].bytemode == v_mode
&& !intel_syntax)
{
if (sizeflag & DFLAG)
@@ -2292,23 +3715,22 @@ print_insn (bfd_vma pc, disassemble_info *info)
}
}
- if (dp->name == NULL && dp->bytemode1 == IS_3BYTE_OPCODE)
+ if (dp->name == NULL && dp->op[0].bytemode == IS_3BYTE_OPCODE)
{
- FETCH_DATA (info, codep + 2);
- dp = &three_byte_table[dp->bytemode2][*codep++];
- mod = (*codep >> 6) & 3;
- reg = (*codep >> 3) & 7;
- rm = *codep & 7;
+ dp = &three_byte_table[dp->op[1].bytemode][op];
+ modrm.mod = (*codep >> 6) & 3;
+ modrm.reg = (*codep >> 3) & 7;
+ modrm.rm = *codep & 7;
}
else if (need_modrm)
{
FETCH_DATA (info, codep + 1);
- mod = (*codep >> 6) & 3;
- reg = (*codep >> 3) & 7;
- rm = *codep & 7;
+ modrm.mod = (*codep >> 6) & 3;
+ modrm.reg = (*codep >> 3) & 7;
+ modrm.rm = *codep & 7;
}
- if (dp->name == NULL && dp->bytemode1 == FLOATCODE)
+ if (dp->name == NULL && dp->op[0].bytemode == FLOATCODE)
{
dofloat (sizeflag);
}
@@ -2317,10 +3739,10 @@ print_insn (bfd_vma pc, disassemble_info *info)
int index;
if (dp->name == NULL)
{
- switch (dp->bytemode1)
+ switch (dp->op[0].bytemode)
{
case USE_GROUPS:
- dp = &grps[dp->bytemode2][reg];
+ dp = &grps[dp->op[1].bytemode][modrm.reg];
break;
case USE_PREFIX_USER_TABLE:
@@ -2330,22 +3752,24 @@ print_insn (bfd_vma pc, disassemble_info *info)
index = 1;
else
{
- used_prefixes |= (prefixes & PREFIX_DATA);
- if (prefixes & PREFIX_DATA)
- index = 2;
+ /* We should check PREFIX_REPNZ and PREFIX_REPZ
+ before PREFIX_DATA. */
+ used_prefixes |= (prefixes & PREFIX_REPNZ);
+ if (prefixes & PREFIX_REPNZ)
+ index = 3;
else
{
- used_prefixes |= (prefixes & PREFIX_REPNZ);
- if (prefixes & PREFIX_REPNZ)
- index = 3;
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ if (prefixes & PREFIX_DATA)
+ index = 2;
}
}
- dp = &prefix_user_table[dp->bytemode2][index];
+ dp = &prefix_user_table[dp->op[1].bytemode][index];
break;
case X86_64_SPECIAL:
index = address_mode == mode_64bit ? 1 : 0;
- dp = &x86_64_table[dp->bytemode2][index];
+ dp = &x86_64_table[dp->op[1].bytemode][index];
break;
default:
@@ -2355,21 +3779,14 @@ print_insn (bfd_vma pc, disassemble_info *info)
}
if (putop (dp->name, sizeflag) == 0)
- {
- obufp = op1out;
- op_ad = 2;
- if (dp->op1)
- (*dp->op1) (dp->bytemode1, sizeflag);
-
- obufp = op2out;
- op_ad = 1;
- if (dp->op2)
- (*dp->op2) (dp->bytemode2, sizeflag);
-
- obufp = op3out;
- op_ad = 0;
- if (dp->op3)
- (*dp->op3) (dp->bytemode3, sizeflag);
+ {
+ for (i = 0; i < MAX_OPERANDS; ++i)
+ {
+ obufp = op_out[i];
+ op_ad = MAX_OPERANDS - 1 - i;
+ if (dp->op[i].rtn)
+ (*dp->op[i].rtn) (dp->op[i].bytemode, sizeflag);
+ }
}
}
@@ -2406,53 +3823,47 @@ print_insn (bfd_vma pc, disassemble_info *info)
order as the intel book; everything else is printed in reverse order. */
if (intel_syntax || two_source_ops)
{
- first = op1out;
- second = op2out;
- third = op3out;
- op_ad = op_index[0];
- op_index[0] = op_index[2];
- op_index[2] = op_ad;
+ bfd_vma riprel;
+
+ for (i = 0; i < MAX_OPERANDS; ++i)
+ op_txt[i] = op_out[i];
+
+ for (i = 0; i < (MAX_OPERANDS >> 1); ++i)
+ {
+ op_ad = op_index[i];
+ op_index[i] = op_index[MAX_OPERANDS - 1 - i];
+ op_index[MAX_OPERANDS - 1 - i] = op_ad;
+ riprel = op_riprel[i];
+ op_riprel[i] = op_riprel [MAX_OPERANDS - 1 - i];
+ op_riprel[MAX_OPERANDS - 1 - i] = riprel;
+ }
}
else
{
- first = op3out;
- second = op2out;
- third = op1out;
+ for (i = 0; i < MAX_OPERANDS; ++i)
+ op_txt[MAX_OPERANDS - 1 - i] = op_out[i];
}
+
needcomma = 0;
- if (*first)
- {
- if (op_index[0] != -1 && !op_riprel[0])
- (*info->print_address_func) ((bfd_vma) op_address[op_index[0]], info);
- else
- (*info->fprintf_func) (info->stream, "%s", first);
- needcomma = 1;
- }
- if (*second)
- {
- if (needcomma)
- (*info->fprintf_func) (info->stream, ",");
- if (op_index[1] != -1 && !op_riprel[1])
- (*info->print_address_func) ((bfd_vma) op_address[op_index[1]], info);
- else
- (*info->fprintf_func) (info->stream, "%s", second);
- needcomma = 1;
- }
- if (*third)
- {
- if (needcomma)
- (*info->fprintf_func) (info->stream, ",");
- if (op_index[2] != -1 && !op_riprel[2])
- (*info->print_address_func) ((bfd_vma) op_address[op_index[2]], info);
- else
- (*info->fprintf_func) (info->stream, "%s", third);
- }
- for (i = 0; i < 3; i++)
+ for (i = 0; i < MAX_OPERANDS; ++i)
+ if (*op_txt[i])
+ {
+ if (needcomma)
+ (*info->fprintf_func) (info->stream, ",");
+ if (op_index[i] != -1 && !op_riprel[i])
+ (*info->print_address_func) ((bfd_vma) op_address[op_index[i]], info);
+ else
+ (*info->fprintf_func) (info->stream, "%s", op_txt[i]);
+ needcomma = 1;
+ }
+
+ for (i = 0; i < MAX_OPERANDS; i++)
if (op_index[i] != -1 && op_riprel[i])
{
(*info->fprintf_func) (info->stream, " # ");
(*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
+ op_address[op_index[i]]), info);
+ break;
}
return codep - priv.the_buffer;
}
@@ -2607,37 +4018,37 @@ static const unsigned char float_mem_mode[] = {
q_mode
};
-#define ST OP_ST, 0
-#define STi OP_STi, 0
+#define ST { OP_ST, 0 }
+#define STi { OP_STi, 0 }
-#define FGRPd9_2 NULL, NULL, 0, NULL, 0, NULL, 0
-#define FGRPd9_4 NULL, NULL, 1, NULL, 0, NULL, 0
-#define FGRPd9_5 NULL, NULL, 2, NULL, 0, NULL, 0
-#define FGRPd9_6 NULL, NULL, 3, NULL, 0, NULL, 0
-#define FGRPd9_7 NULL, NULL, 4, NULL, 0, NULL, 0
-#define FGRPda_5 NULL, NULL, 5, NULL, 0, NULL, 0
-#define FGRPdb_4 NULL, NULL, 6, NULL, 0, NULL, 0
-#define FGRPde_3 NULL, NULL, 7, NULL, 0, NULL, 0
-#define FGRPdf_4 NULL, NULL, 8, NULL, 0, NULL, 0
+#define FGRPd9_2 NULL, { { NULL, 0 } }
+#define FGRPd9_4 NULL, { { NULL, 1 } }
+#define FGRPd9_5 NULL, { { NULL, 2 } }
+#define FGRPd9_6 NULL, { { NULL, 3 } }
+#define FGRPd9_7 NULL, { { NULL, 4 } }
+#define FGRPda_5 NULL, { { NULL, 5 } }
+#define FGRPdb_4 NULL, { { NULL, 6 } }
+#define FGRPde_3 NULL, { { NULL, 7 } }
+#define FGRPdf_4 NULL, { { NULL, 8 } }
static const struct dis386 float_reg[][8] = {
/* d8 */
{
- { "fadd", ST, STi, XX },
- { "fmul", ST, STi, XX },
- { "fcom", STi, XX, XX },
- { "fcomp", STi, XX, XX },
- { "fsub", ST, STi, XX },
- { "fsubr", ST, STi, XX },
- { "fdiv", ST, STi, XX },
- { "fdivr", ST, STi, XX },
+ { "fadd", { ST, STi } },
+ { "fmul", { ST, STi } },
+ { "fcom", { STi } },
+ { "fcomp", { STi } },
+ { "fsub", { ST, STi } },
+ { "fsubr", { ST, STi } },
+ { "fdiv", { ST, STi } },
+ { "fdivr", { ST, STi } },
},
/* d9 */
{
- { "fld", STi, XX, XX },
- { "fxch", STi, XX, XX },
+ { "fld", { STi } },
+ { "fxch", { STi } },
{ FGRPd9_2 },
- { "(bad)", XX, XX, XX },
+ { "(bad)", { XX } },
{ FGRPd9_4 },
{ FGRPd9_5 },
{ FGRPd9_6 },
@@ -2645,83 +4056,83 @@ static const struct dis386 float_reg[][8] = {
},
/* da */
{
- { "fcmovb", ST, STi, XX },
- { "fcmove", ST, STi, XX },
- { "fcmovbe",ST, STi, XX },
- { "fcmovu", ST, STi, XX },
- { "(bad)", XX, XX, XX },
+ { "fcmovb", { ST, STi } },
+ { "fcmove", { ST, STi } },
+ { "fcmovbe",{ ST, STi } },
+ { "fcmovu", { ST, STi } },
+ { "(bad)", { XX } },
{ FGRPda_5 },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
},
/* db */
{
- { "fcmovnb",ST, STi, XX },
- { "fcmovne",ST, STi, XX },
- { "fcmovnbe",ST, STi, XX },
- { "fcmovnu",ST, STi, XX },
+ { "fcmovnb",{ ST, STi } },
+ { "fcmovne",{ ST, STi } },
+ { "fcmovnbe",{ ST, STi } },
+ { "fcmovnu",{ ST, STi } },
{ FGRPdb_4 },
- { "fucomi", ST, STi, XX },
- { "fcomi", ST, STi, XX },
- { "(bad)", XX, XX, XX },
+ { "fucomi", { ST, STi } },
+ { "fcomi", { ST, STi } },
+ { "(bad)", { XX } },
},
/* dc */
{
- { "fadd", STi, ST, XX },
- { "fmul", STi, ST, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
-#if UNIXWARE_COMPAT
- { "fsub", STi, ST, XX },
- { "fsubr", STi, ST, XX },
- { "fdiv", STi, ST, XX },
- { "fdivr", STi, ST, XX },
+ { "fadd", { STi, ST } },
+ { "fmul", { STi, ST } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+#if SYSV386_COMPAT
+ { "fsub", { STi, ST } },
+ { "fsubr", { STi, ST } },
+ { "fdiv", { STi, ST } },
+ { "fdivr", { STi, ST } },
#else
- { "fsubr", STi, ST, XX },
- { "fsub", STi, ST, XX },
- { "fdivr", STi, ST, XX },
- { "fdiv", STi, ST, XX },
+ { "fsubr", { STi, ST } },
+ { "fsub", { STi, ST } },
+ { "fdivr", { STi, ST } },
+ { "fdiv", { STi, ST } },
#endif
},
/* dd */
{
- { "ffree", STi, XX, XX },
- { "(bad)", XX, XX, XX },
- { "fst", STi, XX, XX },
- { "fstp", STi, XX, XX },
- { "fucom", STi, XX, XX },
- { "fucomp", STi, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "ffree", { STi } },
+ { "(bad)", { XX } },
+ { "fst", { STi } },
+ { "fstp", { STi } },
+ { "fucom", { STi } },
+ { "fucomp", { STi } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
},
/* de */
{
- { "faddp", STi, ST, XX },
- { "fmulp", STi, ST, XX },
- { "(bad)", XX, XX, XX },
+ { "faddp", { STi, ST } },
+ { "fmulp", { STi, ST } },
+ { "(bad)", { XX } },
{ FGRPde_3 },
-#if UNIXWARE_COMPAT
- { "fsubp", STi, ST, XX },
- { "fsubrp", STi, ST, XX },
- { "fdivp", STi, ST, XX },
- { "fdivrp", STi, ST, XX },
+#if SYSV386_COMPAT
+ { "fsubp", { STi, ST } },
+ { "fsubrp", { STi, ST } },
+ { "fdivp", { STi, ST } },
+ { "fdivrp", { STi, ST } },
#else
- { "fsubrp", STi, ST, XX },
- { "fsubp", STi, ST, XX },
- { "fdivrp", STi, ST, XX },
- { "fdivp", STi, ST, XX },
+ { "fsubrp", { STi, ST } },
+ { "fsubp", { STi, ST } },
+ { "fdivrp", { STi, ST } },
+ { "fdivp", { STi, ST } },
#endif
},
/* df */
{
- { "ffreep", STi, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
- { "(bad)", XX, XX, XX },
+ { "ffreep", { STi } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
+ { "(bad)", { XX } },
{ FGRPdf_4 },
- { "fucomip",ST, STi, XX },
- { "fcomip", ST, STi, XX },
- { "(bad)", XX, XX, XX },
+ { "fucomip", { ST, STi } },
+ { "fcomip", { ST, STi } },
+ { "(bad)", { XX } },
},
};
@@ -2781,12 +4192,12 @@ dofloat (int sizeflag)
floatop = codep[-1];
- if (mod != 3)
+ if (modrm.mod != 3)
{
- int fp_indx = (floatop - 0xd8) * 8 + reg;
+ int fp_indx = (floatop - 0xd8) * 8 + modrm.reg;
putop (float_mem[fp_indx], sizeflag);
- obufp = op1out;
+ obufp = op_out[0];
op_ad = 2;
OP_E (float_mem_mode[fp_indx], sizeflag);
return;
@@ -2795,28 +4206,28 @@ dofloat (int sizeflag)
MODRM_CHECK;
codep++;
- dp = &float_reg[floatop - 0xd8][reg];
+ dp = &float_reg[floatop - 0xd8][modrm.reg];
if (dp->name == NULL)
{
- putop (fgrps[dp->bytemode1][rm], sizeflag);
+ putop (fgrps[dp->op[0].bytemode][modrm.rm], sizeflag);
/* Instruction fnstsw is only one with strange arg. */
if (floatop == 0xdf && codep[-1] == 0xe0)
- strcpy (op1out, names16[0]);
+ strcpy (op_out[0], names16[0]);
}
else
{
putop (dp->name, sizeflag);
- obufp = op1out;
+ obufp = op_out[0];
op_ad = 2;
- if (dp->op1)
- (*dp->op1) (dp->bytemode1, sizeflag);
+ if (dp->op[0].rtn)
+ (*dp->op[0].rtn) (dp->op[0].bytemode, sizeflag);
- obufp = op2out;
+ obufp = op_out[1];
op_ad = 1;
- if (dp->op2)
- (*dp->op2) (dp->bytemode2, sizeflag);
+ if (dp->op[1].rtn)
+ (*dp->op[1].rtn) (dp->op[1].bytemode, sizeflag);
}
}
@@ -2829,7 +4240,7 @@ OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
static void
OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
- sprintf (scratchbuf, "%%st(%d)", rm);
+ sprintf (scratchbuf, "%%st(%d)", modrm.rm);
oappend (scratchbuf + intel_syntax);
}
@@ -2885,7 +4296,7 @@ putop (const char *template, int sizeflag)
case 'A':
if (intel_syntax)
break;
- if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
+ if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
*obufp++ = 'b';
break;
case 'B':
@@ -2906,6 +4317,23 @@ putop (const char *template, int sizeflag)
used_prefixes |= (prefixes & PREFIX_DATA);
}
break;
+ case 'D':
+ if (intel_syntax || !(sizeflag & SUFFIX_ALWAYS))
+ break;
+ USED_REX (REX_W);
+ if (modrm.mod == 3)
+ {
+ if (rex & REX_W)
+ *obufp++ = 'q';
+ else if (sizeflag & DFLAG)
+ *obufp++ = intel_syntax ? 'd' : 'l';
+ else
+ *obufp++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
+ else
+ *obufp++ = 'w';
+ break;
case 'E': /* For jcxz/jecxz */
if (address_mode == mode_64bit)
{
@@ -2931,6 +4359,16 @@ putop (const char *template, int sizeflag)
used_prefixes |= (prefixes & PREFIX_ADDR);
}
break;
+ case 'G':
+ if (intel_syntax || (obufp[-1] != 's' && !(sizeflag & SUFFIX_ALWAYS)))
+ break;
+ if ((rex & REX_W) || (sizeflag & DFLAG))
+ *obufp++ = 'l';
+ else
+ *obufp++ = 'w';
+ if (!(rex & REX_W))
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
case 'H':
if (intel_syntax)
break;
@@ -2951,6 +4389,13 @@ putop (const char *template, int sizeflag)
break;
*obufp++ = 'l';
break;
+ case 'K':
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ *obufp++ = 'q';
+ else
+ *obufp++ = 'd';
+ break;
case 'Z':
if (intel_syntax)
break;
@@ -2973,11 +4418,15 @@ putop (const char *template, int sizeflag)
used_prefixes |= PREFIX_FWAIT;
break;
case 'O':
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ USED_REX (REX_W);
+ if (rex & REX_W)
*obufp++ = 'o';
+ else if (intel_syntax && (sizeflag & DFLAG))
+ *obufp++ = 'q';
else
*obufp++ = 'd';
+ if (!(rex & REX_W))
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
case 'T':
if (intel_syntax)
@@ -2992,11 +4441,11 @@ putop (const char *template, int sizeflag)
if (intel_syntax)
break;
if ((prefixes & PREFIX_DATA)
- || (rex & REX_MODE64)
+ || (rex & REX_W)
|| (sizeflag & SUFFIX_ALWAYS))
{
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ USED_REX (REX_W);
+ if (rex & REX_W)
*obufp++ = 'q';
else
{
@@ -3013,7 +4462,7 @@ putop (const char *template, int sizeflag)
break;
if (address_mode == mode_64bit && (sizeflag & DFLAG))
{
- if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
+ if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
*obufp++ = 'q';
break;
}
@@ -3021,10 +4470,10 @@ putop (const char *template, int sizeflag)
case 'Q':
if (intel_syntax && !alt)
break;
- USED_REX (REX_MODE64);
- if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
+ USED_REX (REX_W);
+ if (modrm.mod != 3 || (sizeflag & SUFFIX_ALWAYS))
{
- if (rex & REX_MODE64)
+ if (rex & REX_W)
*obufp++ = 'q';
else
{
@@ -3037,35 +4486,22 @@ putop (const char *template, int sizeflag)
}
break;
case 'R':
- USED_REX (REX_MODE64);
- if (intel_syntax)
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ *obufp++ = 'q';
+ else if (sizeflag & DFLAG)
{
- if (rex & REX_MODE64)
- {
- *obufp++ = 'q';
- *obufp++ = 't';
- }
- else if (sizeflag & DFLAG)
- {
+ if (intel_syntax)
*obufp++ = 'd';
- *obufp++ = 'q';
- }
else
- {
- *obufp++ = 'w';
- *obufp++ = 'd';
- }
+ *obufp++ = 'l';
}
else
- {
- if (rex & REX_MODE64)
- *obufp++ = 'q';
- else if (sizeflag & DFLAG)
- *obufp++ = 'l';
- else
- *obufp++ = 'w';
- }
- if (!(rex & REX_MODE64))
+ *obufp++ = 'w';
+ if (intel_syntax && !p[1]
+ && ((rex & REX_W) || (sizeflag & DFLAG)))
+ *obufp++ = 'e';
+ if (!(rex & REX_W))
used_prefixes |= (prefixes & PREFIX_DATA);
break;
case 'V':
@@ -3083,7 +4519,7 @@ putop (const char *template, int sizeflag)
break;
if (sizeflag & SUFFIX_ALWAYS)
{
- if (rex & REX_MODE64)
+ if (rex & REX_W)
*obufp++ = 'q';
else
{
@@ -3105,40 +4541,28 @@ putop (const char *template, int sizeflag)
case 'Y':
if (intel_syntax)
break;
- if (rex & REX_MODE64)
+ if (rex & REX_W)
{
- USED_REX (REX_MODE64);
+ USED_REX (REX_W);
*obufp++ = 'q';
}
break;
/* implicit operand size 'l' for i386 or 'q' for x86-64 */
case 'W':
/* operand size flag for cwtl, cbtw */
- USED_REX (0);
- if (rex)
- *obufp++ = 'l';
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ {
+ if (intel_syntax)
+ *obufp++ = 'd';
+ else
+ *obufp++ = 'l';
+ }
else if (sizeflag & DFLAG)
*obufp++ = 'w';
else
*obufp++ = 'b';
- if (intel_syntax)
- {
- if (rex)
- {
- *obufp++ = 'q';
- *obufp++ = 'e';
- }
- if (sizeflag & DFLAG)
- {
- *obufp++ = 'd';
- *obufp++ = 'e';
- }
- else
- {
- *obufp++ = 'w';
- }
- }
- if (!rex)
+ if (!(rex & REX_W))
used_prefixes |= (prefixes & PREFIX_DATA);
break;
}
@@ -3255,12 +4679,57 @@ print_operand_value (char *buf, int hex, bfd_vma disp)
}
}
+/* Put DISP in BUF as signed hex number. */
+
+static void
+print_displacement (char *buf, bfd_vma disp)
+{
+ bfd_signed_vma val = disp;
+ char tmp[30];
+ int i, j = 0;
+
+ if (val < 0)
+ {
+ buf[j++] = '-';
+ val = -disp;
+
+ /* Check for possible overflow. */
+ if (val < 0)
+ {
+ switch (address_mode)
+ {
+ case mode_64bit:
+ strcpy (buf + j, "0x8000000000000000");
+ break;
+ case mode_32bit:
+ strcpy (buf + j, "0x80000000");
+ break;
+ case mode_16bit:
+ strcpy (buf + j, "0x8000");
+ break;
+ }
+ return;
+ }
+ }
+
+ buf[j++] = '0';
+ buf[j++] = 'x';
+
+ sprintf_vma (tmp, val);
+ for (i = 0; tmp[i] == '0'; i++)
+ continue;
+ if (tmp[i] == '\0')
+ i--;
+ strcpy (buf + j, tmp + i);
+}
+
static void
intel_operand_size (int bytemode, int sizeflag)
{
switch (bytemode)
{
case b_mode:
+ case dqb_mode:
oappend ("BYTE PTR ");
break;
case w_mode:
@@ -3277,8 +4746,8 @@ intel_operand_size (int bytemode, int sizeflag)
/* FALLTHRU */
case v_mode:
case dq_mode:
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ USED_REX (REX_W);
+ if (rex & REX_W)
oappend ("QWORD PTR ");
else if ((sizeflag & DFLAG) || bytemode == dq_mode)
oappend ("DWORD PTR ");
@@ -3286,7 +4755,15 @@ intel_operand_size (int bytemode, int sizeflag)
oappend ("WORD PTR ");
used_prefixes |= (prefixes & PREFIX_DATA);
break;
+ case z_mode:
+ if ((rex & REX_W) || (sizeflag & DFLAG))
+ *obufp++ = 'D';
+ oappend ("WORD PTR ");
+ if (!(rex & REX_W))
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
case d_mode:
+ case dqd_mode:
oappend ("DWORD PTR ");
break;
case q_mode:
@@ -3311,6 +4788,9 @@ intel_operand_size (int bytemode, int sizeflag)
case x_mode:
oappend ("XMMWORD PTR ");
break;
+ case o_mode:
+ oappend ("OWORD PTR ");
+ break;
default:
break;
}
@@ -3322,44 +4802,44 @@ OP_E (int bytemode, int sizeflag)
bfd_vma disp;
int add = 0;
int riprel = 0;
- USED_REX (REX_EXTZ);
- if (rex & REX_EXTZ)
+ USED_REX (REX_B);
+ if (rex & REX_B)
add += 8;
/* Skip mod/rm byte. */
MODRM_CHECK;
codep++;
- if (mod == 3)
+ if (modrm.mod == 3)
{
switch (bytemode)
{
case b_mode:
USED_REX (0);
if (rex)
- oappend (names8rex[rm + add]);
+ oappend (names8rex[modrm.rm + add]);
else
- oappend (names8[rm + add]);
+ oappend (names8[modrm.rm + add]);
break;
case w_mode:
- oappend (names16[rm + add]);
+ oappend (names16[modrm.rm + add]);
break;
case d_mode:
- oappend (names32[rm + add]);
+ oappend (names32[modrm.rm + add]);
break;
case q_mode:
- oappend (names64[rm + add]);
+ oappend (names64[modrm.rm + add]);
break;
case m_mode:
if (address_mode == mode_64bit)
- oappend (names64[rm + add]);
+ oappend (names64[modrm.rm + add]);
else
- oappend (names32[rm + add]);
+ oappend (names32[modrm.rm + add]);
break;
case stack_v_mode:
if (address_mode == mode_64bit && (sizeflag & DFLAG))
{
- oappend (names64[rm + add]);
+ oappend (names64[modrm.rm + add]);
used_prefixes |= (prefixes & PREFIX_DATA);
break;
}
@@ -3367,14 +4847,16 @@ OP_E (int bytemode, int sizeflag)
/* FALLTHRU */
case v_mode:
case dq_mode:
+ case dqb_mode:
+ case dqd_mode:
case dqw_mode:
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
- oappend (names64[rm + add]);
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ oappend (names64[modrm.rm + add]);
else if ((sizeflag & DFLAG) || bytemode != v_mode)
- oappend (names32[rm + add]);
+ oappend (names32[modrm.rm + add]);
else
- oappend (names16[rm + add]);
+ oappend (names16[modrm.rm + add]);
used_prefixes |= (prefixes & PREFIX_DATA);
break;
case 0:
@@ -3391,8 +4873,10 @@ OP_E (int bytemode, int sizeflag)
intel_operand_size (bytemode, sizeflag);
append_seg ();
- if ((sizeflag & AFLAG) || address_mode == mode_64bit) /* 32 bit address mode */
+ if ((sizeflag & AFLAG) || address_mode == mode_64bit)
{
+ /* 32/64 bit address mode */
+ int havedisp;
int havesib;
int havebase;
int base;
@@ -3401,7 +4885,7 @@ OP_E (int bytemode, int sizeflag)
havesib = 0;
havebase = 1;
- base = rm;
+ base = modrm.rm;
if (base == 4)
{
@@ -3412,14 +4896,14 @@ OP_E (int bytemode, int sizeflag)
/* When INDEX == 0x4 in 32 bit mode, SCALE is ignored. */
scale = (*codep >> 6) & 3;
base = *codep & 7;
- USED_REX (REX_EXTY);
- if (rex & REX_EXTY)
+ USED_REX (REX_X);
+ if (rex & REX_X)
index += 8;
codep++;
}
base += add;
- switch (mod)
+ switch (modrm.mod)
{
case 0:
if ((base & 7) == 5)
@@ -3441,10 +4925,15 @@ OP_E (int bytemode, int sizeflag)
break;
}
+ havedisp = havebase || (havesib && (index != 4 || scale != 0));
+
if (!intel_syntax)
- if (mod != 0 || (base & 7) == 5)
+ if (modrm.mod != 0 || (base & 7) == 5)
{
- print_operand_value (scratchbuf, !riprel, disp);
+ if (havedisp || riprel)
+ print_displacement (scratchbuf, disp);
+ else
+ print_operand_value (scratchbuf, 1, disp);
oappend (scratchbuf);
if (riprel)
{
@@ -3453,11 +4942,14 @@ OP_E (int bytemode, int sizeflag)
}
}
- if (havebase || (havesib && (index != 4 || scale != 0)))
+ if (havedisp || (intel_syntax && riprel))
{
*obufp++ = open_char;
if (intel_syntax && riprel)
- oappend ("rip + ");
+ {
+ set_op (disp, 1);
+ oappend ("rip");
+ }
*obufp = '\0';
if (havebase)
oappend (address_mode == mode_64bit && (sizeflag & AFLAG)
@@ -3482,21 +4974,22 @@ OP_E (int bytemode, int sizeflag)
oappend (scratchbuf);
}
}
- if (intel_syntax && disp)
+ if (intel_syntax
+ && (disp || modrm.mod != 0 || (base & 7) == 5))
{
- if ((bfd_signed_vma) disp > 0)
+ if ((bfd_signed_vma) disp >= 0)
{
*obufp++ = '+';
*obufp = '\0';
}
- else if (mod != 1)
+ else if (modrm.mod != 1)
{
*obufp++ = '-';
*obufp = '\0';
disp = - (bfd_signed_vma) disp;
}
- print_operand_value (scratchbuf, mod != 1, disp);
+ print_displacement (scratchbuf, disp);
oappend (scratchbuf);
}
@@ -3505,7 +4998,7 @@ OP_E (int bytemode, int sizeflag)
}
else if (intel_syntax)
{
- if (mod != 0 || (base & 7) == 5)
+ if (modrm.mod != 0 || (base & 7) == 5)
{
if (prefixes & (PREFIX_CS | PREFIX_SS | PREFIX_DS
| PREFIX_ES | PREFIX_FS | PREFIX_GS))
@@ -3522,10 +5015,10 @@ OP_E (int bytemode, int sizeflag)
}
else
{ /* 16 bit address mode */
- switch (mod)
+ switch (modrm.mod)
{
case 0:
- if (rm == 6)
+ if (modrm.rm == 6)
{
disp = get16 ();
if ((disp & 0x8000) != 0)
@@ -3546,32 +5039,33 @@ OP_E (int bytemode, int sizeflag)
}
if (!intel_syntax)
- if (mod != 0 || rm == 6)
+ if (modrm.mod != 0 || modrm.rm == 6)
{
- print_operand_value (scratchbuf, 0, disp);
+ print_displacement (scratchbuf, disp);
oappend (scratchbuf);
}
- if (mod != 0 || rm != 6)
+ if (modrm.mod != 0 || modrm.rm != 6)
{
*obufp++ = open_char;
*obufp = '\0';
- oappend (index16[rm]);
- if (intel_syntax && disp)
+ oappend (index16[modrm.rm]);
+ if (intel_syntax
+ && (disp || modrm.mod != 0 || modrm.rm == 6))
{
- if ((bfd_signed_vma) disp > 0)
+ if ((bfd_signed_vma) disp >= 0)
{
*obufp++ = '+';
*obufp = '\0';
}
- else if (mod != 1)
+ else if (modrm.mod != 1)
{
*obufp++ = '-';
*obufp = '\0';
disp = - (bfd_signed_vma) disp;
}
- print_operand_value (scratchbuf, mod != 1, disp);
+ print_displacement (scratchbuf, disp);
oappend (scratchbuf);
}
@@ -3598,44 +5092,46 @@ static void
OP_G (int bytemode, int sizeflag)
{
int add = 0;
- USED_REX (REX_EXTX);
- if (rex & REX_EXTX)
+ USED_REX (REX_R);
+ if (rex & REX_R)
add += 8;
switch (bytemode)
{
case b_mode:
USED_REX (0);
if (rex)
- oappend (names8rex[reg + add]);
+ oappend (names8rex[modrm.reg + add]);
else
- oappend (names8[reg + add]);
+ oappend (names8[modrm.reg + add]);
break;
case w_mode:
- oappend (names16[reg + add]);
+ oappend (names16[modrm.reg + add]);
break;
case d_mode:
- oappend (names32[reg + add]);
+ oappend (names32[modrm.reg + add]);
break;
case q_mode:
- oappend (names64[reg + add]);
+ oappend (names64[modrm.reg + add]);
break;
case v_mode:
case dq_mode:
+ case dqb_mode:
+ case dqd_mode:
case dqw_mode:
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
- oappend (names64[reg + add]);
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ oappend (names64[modrm.reg + add]);
else if ((sizeflag & DFLAG) || bytemode != v_mode)
- oappend (names32[reg + add]);
+ oappend (names32[modrm.reg + add]);
else
- oappend (names16[reg + add]);
+ oappend (names16[modrm.reg + add]);
used_prefixes |= (prefixes & PREFIX_DATA);
break;
case m_mode:
if (address_mode == mode_64bit)
- oappend (names64[reg + add]);
+ oappend (names64[modrm.reg + add]);
else
- oappend (names32[reg + add]);
+ oappend (names32[modrm.reg + add]);
break;
default:
oappend (INTERNAL_DISASSEMBLER_ERROR);
@@ -3730,18 +5226,12 @@ OP_REG (int code, int sizeflag)
{
const char *s;
int add = 0;
- USED_REX (REX_EXTZ);
- if (rex & REX_EXTZ)
+ USED_REX (REX_B);
+ if (rex & REX_B)
add = 8;
switch (code)
{
- case indir_dx_reg:
- if (intel_syntax)
- s = "[dx]";
- else
- s = "(%dx)";
- break;
case ax_reg: case cx_reg: case dx_reg: case bx_reg:
case sp_reg: case bp_reg: case si_reg: case di_reg:
s = names16[code - ax_reg + add];
@@ -3769,8 +5259,8 @@ OP_REG (int code, int sizeflag)
/* Fall through. */
case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ USED_REX (REX_W);
+ if (rex & REX_W)
s = names64[code - eAX_reg + add];
else if (sizeflag & DFLAG)
s = names32[code - eAX_reg + add];
@@ -3794,7 +5284,7 @@ OP_IMREG (int code, int sizeflag)
{
case indir_dx_reg:
if (intel_syntax)
- s = "[dx]";
+ s = "dx";
else
s = "(%dx)";
break;
@@ -3816,8 +5306,8 @@ OP_IMREG (int code, int sizeflag)
break;
case eAX_reg: case eCX_reg: case eDX_reg: case eBX_reg:
case eSP_reg: case eBP_reg: case eSI_reg: case eDI_reg:
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ USED_REX (REX_W);
+ if (rex & REX_W)
s = names64[code - eAX_reg];
else if (sizeflag & DFLAG)
s = names32[code - eAX_reg];
@@ -3825,6 +5315,14 @@ OP_IMREG (int code, int sizeflag)
s = names16[code - eAX_reg];
used_prefixes |= (prefixes & PREFIX_DATA);
break;
+ case z_mode_ax_reg:
+ if ((rex & REX_W) || (sizeflag & DFLAG))
+ s = *names32;
+ else
+ s = *names16;
+ if (!(rex & REX_W))
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
default:
s = INTERNAL_DISASSEMBLER_ERROR;
break;
@@ -3853,8 +5351,8 @@ OP_I (int bytemode, int sizeflag)
}
/* Fall through. */
case v_mode:
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ USED_REX (REX_W);
+ if (rex & REX_W)
op = get32s ();
else if (sizeflag & DFLAG)
{
@@ -3908,8 +5406,8 @@ OP_I64 (int bytemode, int sizeflag)
mask = 0xff;
break;
case v_mode:
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ USED_REX (REX_W);
+ if (rex & REX_W)
op = get64 ();
else if (sizeflag & DFLAG)
{
@@ -3955,8 +5453,8 @@ OP_sI (int bytemode, int sizeflag)
mask = 0xffffffff;
break;
case v_mode:
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
+ USED_REX (REX_W);
+ if (rex & REX_W)
op = get32s ();
else if (sizeflag & DFLAG)
{
@@ -3993,6 +5491,7 @@ OP_J (int bytemode, int sizeflag)
{
bfd_vma disp;
bfd_vma mask = -1;
+ bfd_vma segment = 0;
switch (bytemode)
{
@@ -4003,31 +5502,41 @@ OP_J (int bytemode, int sizeflag)
disp -= 0x100;
break;
case v_mode:
- if ((sizeflag & DFLAG) || (rex & REX_MODE64))
+ if ((sizeflag & DFLAG) || (rex & REX_W))
disp = get32s ();
else
{
disp = get16 ();
- /* For some reason, a data16 prefix on a jump instruction
- means that the pc is masked to 16 bits after the
- displacement is added! */
+ if ((disp & 0x8000) != 0)
+ disp -= 0x10000;
+ /* In 16bit mode, address is wrapped around at 64k within
+ the same segment. Otherwise, a data16 prefix on a jump
+ instruction means that the pc is masked to 16 bits after
+ the displacement is added! */
mask = 0xffff;
+ if ((prefixes & PREFIX_DATA) == 0)
+ segment = ((start_pc + codep - start_codep)
+ & ~((bfd_vma) 0xffff));
}
+ used_prefixes |= (prefixes & PREFIX_DATA);
break;
default:
oappend (INTERNAL_DISASSEMBLER_ERROR);
return;
}
- disp = (start_pc + codep - start_codep + disp) & mask;
+ disp = ((start_pc + codep - start_codep + disp) & mask) | segment;
set_op (disp, 0);
print_operand_value (scratchbuf, 1, disp);
oappend (scratchbuf);
}
static void
-OP_SEG (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
+OP_SEG (int bytemode, int sizeflag)
{
- oappend (names_seg[reg]);
+ if (bytemode == w_mode)
+ oappend (names_seg[modrm.reg]);
+ else
+ OP_E (modrm.mod == 3 ? bytemode : w_mode, sizeflag);
}
static void
@@ -4085,7 +5594,8 @@ OP_OFF64 (int bytemode, int sizeflag)
{
bfd_vma off;
- if (address_mode != mode_64bit)
+ if (address_mode != mode_64bit
+ || (prefixes & PREFIX_ADDR))
{
OP_OFF (bytemode, sizeflag);
return;
@@ -4137,7 +5647,22 @@ static void
OP_ESreg (int code, int sizeflag)
{
if (intel_syntax)
- intel_operand_size (codep[-1] & 1 ? v_mode : b_mode, sizeflag);
+ {
+ switch (codep[-1])
+ {
+ case 0x6d: /* insw/insl */
+ intel_operand_size (z_mode, sizeflag);
+ break;
+ case 0xa5: /* movsw/movsl/movsq */
+ case 0xa7: /* cmpsw/cmpsl/cmpsq */
+ case 0xab: /* stosw/stosl */
+ case 0xaf: /* scasw/scasl */
+ intel_operand_size (v_mode, sizeflag);
+ break;
+ default:
+ intel_operand_size (b_mode, sizeflag);
+ }
+ }
oappend ("%es:" + intel_syntax);
ptr_reg (code, sizeflag);
}
@@ -4146,10 +5671,21 @@ static void
OP_DSreg (int code, int sizeflag)
{
if (intel_syntax)
- intel_operand_size (codep[-1] != 0xd7 && (codep[-1] & 1)
- ? v_mode
- : b_mode,
- sizeflag);
+ {
+ switch (codep[-1])
+ {
+ case 0x6f: /* outsw/outsl */
+ intel_operand_size (z_mode, sizeflag);
+ break;
+ case 0xa5: /* movsw/movsl/movsq */
+ case 0xa7: /* cmpsw/cmpsl/cmpsq */
+ case 0xad: /* lodsw/lodsl/lodsq */
+ intel_operand_size (v_mode, sizeflag);
+ break;
+ default:
+ intel_operand_size (b_mode, sizeflag);
+ }
+ }
if ((prefixes
& (PREFIX_CS
| PREFIX_DS
@@ -4166,9 +5702,9 @@ static void
OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
- if (rex & REX_EXTX)
+ if (rex & REX_R)
{
- USED_REX (REX_EXTX);
+ USED_REX (REX_R);
add = 8;
}
else if (address_mode != mode_64bit && (prefixes & PREFIX_LOCK))
@@ -4176,7 +5712,7 @@ OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
used_prefixes |= PREFIX_LOCK;
add = 8;
}
- sprintf (scratchbuf, "%%cr%d", reg + add);
+ sprintf (scratchbuf, "%%cr%d", modrm.reg + add);
oappend (scratchbuf + intel_syntax);
}
@@ -4184,27 +5720,27 @@ static void
OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
- USED_REX (REX_EXTX);
- if (rex & REX_EXTX)
+ USED_REX (REX_R);
+ if (rex & REX_R)
add = 8;
if (intel_syntax)
- sprintf (scratchbuf, "db%d", reg + add);
+ sprintf (scratchbuf, "db%d", modrm.reg + add);
else
- sprintf (scratchbuf, "%%db%d", reg + add);
+ sprintf (scratchbuf, "%%db%d", modrm.reg + add);
oappend (scratchbuf);
}
static void
OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
- sprintf (scratchbuf, "%%tr%d", reg);
+ sprintf (scratchbuf, "%%tr%d", modrm.reg);
oappend (scratchbuf + intel_syntax);
}
static void
-OP_Rd (int bytemode, int sizeflag)
+OP_R (int bytemode, int sizeflag)
{
- if (mod == 3)
+ if (modrm.mod == 3)
OP_E (bytemode, sizeflag);
else
BadOp ();
@@ -4217,13 +5753,13 @@ OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
if (prefixes & PREFIX_DATA)
{
int add = 0;
- USED_REX (REX_EXTX);
- if (rex & REX_EXTX)
+ USED_REX (REX_R);
+ if (rex & REX_R)
add = 8;
- sprintf (scratchbuf, "%%xmm%d", reg + add);
+ sprintf (scratchbuf, "%%xmm%d", modrm.reg + add);
}
else
- sprintf (scratchbuf, "%%mm%d", reg);
+ sprintf (scratchbuf, "%%mm%d", modrm.reg);
oappend (scratchbuf + intel_syntax);
}
@@ -4231,17 +5767,17 @@ static void
OP_XMM (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
{
int add = 0;
- USED_REX (REX_EXTX);
- if (rex & REX_EXTX)
+ USED_REX (REX_R);
+ if (rex & REX_R)
add = 8;
- sprintf (scratchbuf, "%%xmm%d", reg + add);
+ sprintf (scratchbuf, "%%xmm%d", modrm.reg + add);
oappend (scratchbuf + intel_syntax);
}
static void
OP_EM (int bytemode, int sizeflag)
{
- if (mod != 3)
+ if (modrm.mod != 3)
{
if (intel_syntax && bytemode == v_mode)
{
@@ -4260,51 +5796,75 @@ OP_EM (int bytemode, int sizeflag)
{
int add = 0;
- USED_REX (REX_EXTZ);
- if (rex & REX_EXTZ)
+ USED_REX (REX_B);
+ if (rex & REX_B)
add = 8;
- sprintf (scratchbuf, "%%xmm%d", rm + add);
+ sprintf (scratchbuf, "%%xmm%d", modrm.rm + add);
}
else
- sprintf (scratchbuf, "%%mm%d", rm);
+ sprintf (scratchbuf, "%%mm%d", modrm.rm);
oappend (scratchbuf + intel_syntax);
}
+/* cvt* are the only instructions in sse2 which have
+ both SSE and MMX operands and also have 0x66 prefix
+ in their opcode. 0x66 was originally used to differentiate
+ between SSE and MMX instruction(operands). So we have to handle the
+ cvt* separately using OP_EMC and OP_MXC */
static void
-OP_EX (int bytemode, int sizeflag)
+OP_EMC (int bytemode, int sizeflag)
{
- int add = 0;
- if (mod != 3)
+ if (modrm.mod != 3)
{
if (intel_syntax && bytemode == v_mode)
{
- switch (prefixes & (PREFIX_DATA|PREFIX_REPZ|PREFIX_REPNZ))
- {
- case 0: bytemode = x_mode; break;
- case PREFIX_REPZ: bytemode = d_mode; used_prefixes |= PREFIX_REPZ; break;
- case PREFIX_DATA: bytemode = x_mode; used_prefixes |= PREFIX_DATA; break;
- case PREFIX_REPNZ: bytemode = q_mode; used_prefixes |= PREFIX_REPNZ; break;
- default: bytemode = 0; break;
- }
- }
+ bytemode = (prefixes & PREFIX_DATA) ? x_mode : q_mode;
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ }
OP_E (bytemode, sizeflag);
return;
}
- USED_REX (REX_EXTZ);
- if (rex & REX_EXTZ)
+
+ /* Skip mod/rm byte. */
+ MODRM_CHECK;
+ codep++;
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ sprintf (scratchbuf, "%%mm%d", modrm.rm);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_MXC (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
+{
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ sprintf (scratchbuf, "%%mm%d", modrm.reg);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+OP_EX (int bytemode, int sizeflag)
+{
+ int add = 0;
+ if (modrm.mod != 3)
+ {
+ OP_E (bytemode, sizeflag);
+ return;
+ }
+ USED_REX (REX_B);
+ if (rex & REX_B)
add = 8;
/* Skip mod/rm byte. */
MODRM_CHECK;
codep++;
- sprintf (scratchbuf, "%%xmm%d", rm + add);
+ sprintf (scratchbuf, "%%xmm%d", modrm.rm + add);
oappend (scratchbuf + intel_syntax);
}
static void
OP_MS (int bytemode, int sizeflag)
{
- if (mod == 3)
+ if (modrm.mod == 3)
OP_EM (bytemode, sizeflag);
else
BadOp ();
@@ -4313,7 +5873,7 @@ OP_MS (int bytemode, int sizeflag)
static void
OP_XS (int bytemode, int sizeflag)
{
- if (mod == 3)
+ if (modrm.mod == 3)
OP_EX (bytemode, sizeflag);
else
BadOp ();
@@ -4322,8 +5882,9 @@ OP_XS (int bytemode, int sizeflag)
static void
OP_M (int bytemode, int sizeflag)
{
- if (mod == 3)
- BadOp (); /* bad lea,lds,les,lfs,lgs,lss modrm */
+ if (modrm.mod == 3)
+ /* bad bound,lea,lds,les,lfs,lgs,lss,cmpxchg8b,vmptrst modrm */
+ BadOp ();
else
OP_E (bytemode, sizeflag);
}
@@ -4331,7 +5892,7 @@ OP_M (int bytemode, int sizeflag)
static void
OP_0f07 (int bytemode, int sizeflag)
{
- if (mod != 3 || rm != 0)
+ if (modrm.mod != 3 || modrm.rm != 0)
BadOp ();
else
OP_E (bytemode, sizeflag);
@@ -4340,18 +5901,18 @@ OP_0f07 (int bytemode, int sizeflag)
static void
OP_0fae (int bytemode, int sizeflag)
{
- if (mod == 3)
+ if (modrm.mod == 3)
{
- if (reg == 7)
+ if (modrm.reg == 7)
strcpy (obuf + strlen (obuf) - sizeof ("clflush") + 1, "sfence");
- if (reg < 5 || rm != 0)
+ if (modrm.reg < 5 || modrm.rm != 0)
{
BadOp (); /* bad sfence, mfence, or lfence */
return;
}
}
- else if (reg != 7)
+ else if (modrm.reg != 7)
{
BadOp (); /* bad clflush */
return;
@@ -4360,12 +5921,29 @@ OP_0fae (int bytemode, int sizeflag)
OP_E (bytemode, sizeflag);
}
+/* NOP is an alias of "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
+ 32bit mode and "xchg %rax,%rax" in 64bit mode. */
+
+static void
+NOP_Fixup1 (int bytemode, int sizeflag)
+{
+ if ((prefixes & PREFIX_DATA) != 0
+ || (rex != 0
+ && rex != 0x48
+ && address_mode == mode_64bit))
+ OP_REG (bytemode, sizeflag);
+ else
+ strcpy (obuf, "nop");
+}
+
static void
-NOP_Fixup (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
+NOP_Fixup2 (int bytemode, int sizeflag)
{
- /* NOP with REPZ prefix is called PAUSE. */
- if (prefixes == PREFIX_REPZ)
- strcpy (obuf, "pause");
+ if ((prefixes & PREFIX_DATA) != 0
+ || (rex != 0
+ && rex != 0x48
+ && address_mode == mode_64bit))
+ OP_IMREG (bytemode, sizeflag);
}
static const char *const Suffix3DNow[] = {
@@ -4414,7 +5992,7 @@ static const char *const Suffix3DNow[] = {
/* A8 */ NULL, NULL, "pfsubr", NULL,
/* AC */ NULL, NULL, "pfacc", NULL,
/* B0 */ "pfcmpeq", NULL, NULL, NULL,
-/* B4 */ "pfmul", NULL, "pfrcpit2", "pfmulhrw",
+/* B4 */ "pfmul", NULL, "pfrcpit2", "pmulhrw",
/* B8 */ NULL, NULL, NULL, "pswapd",
/* BC */ NULL, NULL, NULL, "pavgusb",
/* C0 */ NULL, NULL, NULL, NULL,
@@ -4454,8 +6032,8 @@ OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
of the opcode (0x0f0f) and the opcode suffix, we need to do
all the modrm processing first, and don't know until now that
we have a bad opcode. This necessitates some cleaning up. */
- op1out[0] = '\0';
- op2out[0] = '\0';
+ op_out[0][0] = '\0';
+ op_out[1][0] = '\0';
BadOp ();
}
}
@@ -4505,8 +6083,8 @@ OP_SIMD_Suffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED)
else
{
/* We have a bad extension byte. Clean up. */
- op1out[0] = '\0';
- op2out[0] = '\0';
+ op_out[0][0] = '\0';
+ op_out[1][0] = '\0';
BadOp ();
}
}
@@ -4516,7 +6094,7 @@ SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED)
{
/* Change movlps/movhps to movhlps/movlhps for 2 register operand
forms of these instructions. */
- if (mod == 3)
+ if (modrm.mod == 3)
{
char *p = obuf + strlen (obuf);
*(p + 1) = '\0';
@@ -4530,7 +6108,7 @@ SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED)
static void
PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
{
- if (mod == 3 && reg == 1 && rm <= 1)
+ if (modrm.mod == 3 && modrm.reg == 1 && modrm.rm <= 1)
{
/* Override "sidt". */
size_t olen = strlen (obuf);
@@ -4547,17 +6125,17 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
&& (prefixes & PREFIX_ADDR)
&& olen >= (4 + 7)
&& *(p - 1) == ' '
- && strncmp (p - 7, "addr", 4) == 0
- && (strncmp (p - 3, "16", 2) == 0
- || strncmp (p - 3, "32", 2) == 0))
+ && CONST_STRNEQ (p - 7, "addr")
+ && (CONST_STRNEQ (p - 3, "16")
+ || CONST_STRNEQ (p - 3, "32")))
p -= 7;
- if (rm)
+ if (modrm.rm)
{
/* mwait %eax,%ecx */
strcpy (p, "mwait");
if (!intel_syntax)
- strcpy (op1out, names[0]);
+ strcpy (op_out[0], names[0]);
}
else
{
@@ -4575,13 +6153,13 @@ PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
? names32 : names16);
used_prefixes |= PREFIX_ADDR;
}
- strcpy (op1out, op1_names[0]);
- strcpy (op3out, names[2]);
+ strcpy (op_out[0], op1_names[0]);
+ strcpy (op_out[2], names[2]);
}
}
if (!intel_syntax)
{
- strcpy (op2out, names[1]);
+ strcpy (op_out[1], names[1]);
two_source_ops = 1;
}
@@ -4642,7 +6220,7 @@ SVME_Fixup (int bytemode, int sizeflag)
switch (*codep++)
{
case 0xdf:
- strcpy (op2out, names32[1]);
+ strcpy (op_out[1], names32[1]);
two_source_ops = 1;
/* Fall through. */
case 0xd8:
@@ -4692,58 +6270,12 @@ BadOp (void)
}
static void
-SEG_Fixup (int extrachar, int sizeflag)
-{
- if (mod == 3)
- {
- /* We need to add a proper suffix with
-
- movw %ds,%ax
- movl %ds,%eax
- movq %ds,%rax
- movw %ax,%ds
- movl %eax,%ds
- movq %rax,%ds
- */
- const char *suffix;
-
- if (prefixes & PREFIX_DATA)
- suffix = "w";
- else
- {
- USED_REX (REX_MODE64);
- if (rex & REX_MODE64)
- suffix = "q";
- else
- suffix = "l";
- }
- strcat (obuf, suffix);
- }
- else
- {
- /* We need to fix the suffix for
-
- movw %ds,(%eax)
- movw %ds,(%rax)
- movw (%eax),%ds
- movw (%rax),%ds
-
- Override "mov[l|q]". */
- char *p = obuf + strlen (obuf) - 1;
-
- /* We might not have a suffix. */
- if (*p == 'v')
- ++p;
- *p = 'w';
- }
-
- OP_E (extrachar, sizeflag);
-}
-
-static void
VMX_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
{
- if (mod == 3 && reg == 0 && rm >=1 && rm <= 4)
+ if (modrm.mod == 3
+ && modrm.reg == 0
+ && modrm.rm >=1
+ && modrm.rm <= 4)
{
/* Override "sgdt". */
char *p = obuf + strlen (obuf) - 4;
@@ -4752,7 +6284,7 @@ VMX_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag)
if (*p == 'g')
--p;
- switch (rm)
+ switch (modrm.rm)
{
case 1:
strcpy (p, "vmcall");
@@ -4795,7 +6327,7 @@ REP_Fixup (int bytemode, int sizeflag)
size_t ilen = 0;
if (prefixes & PREFIX_REPZ)
- switch (*insn_codep)
+ switch (*insn_codep)
{
case 0x6e: /* outsb */
case 0x6f: /* outsw/outsl */
@@ -4859,3 +6391,90 @@ REP_Fixup (int bytemode, int sizeflag)
break;
}
}
+
+static void
+CMPXCHG8B_Fixup (int bytemode, int sizeflag)
+{
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ {
+ /* Change cmpxchg8b to cmpxchg16b. */
+ char *p = obuf + strlen (obuf) - 2;
+ strcpy (p, "16b");
+ bytemode = o_mode;
+ }
+ OP_M (bytemode, sizeflag);
+}
+
+static void
+XMM_Fixup (int reg, int sizeflag ATTRIBUTE_UNUSED)
+{
+ sprintf (scratchbuf, "%%xmm%d", reg);
+ oappend (scratchbuf + intel_syntax);
+}
+
+static void
+CRC32_Fixup (int bytemode, int sizeflag)
+{
+ /* Add proper suffix to "crc32". */
+ char *p = obuf + strlen (obuf);
+
+ switch (bytemode)
+ {
+ case b_mode:
+ if (intel_syntax)
+ break;
+
+ *p++ = 'b';
+ break;
+ case v_mode:
+ if (intel_syntax)
+ break;
+
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ *p++ = 'q';
+ else if (sizeflag & DFLAG)
+ *p++ = 'l';
+ else
+ *p++ = 'w';
+ used_prefixes |= (prefixes & PREFIX_DATA);
+ break;
+ default:
+ oappend (INTERNAL_DISASSEMBLER_ERROR);
+ break;
+ }
+ *p = '\0';
+
+ if (modrm.mod == 3)
+ {
+ int add;
+
+ /* Skip mod/rm byte. */
+ MODRM_CHECK;
+ codep++;
+
+ USED_REX (REX_B);
+ add = (rex & REX_B) ? 8 : 0;
+ if (bytemode == b_mode)
+ {
+ USED_REX (0);
+ if (rex)
+ oappend (names8rex[modrm.rm + add]);
+ else
+ oappend (names8[modrm.rm + add]);
+ }
+ else
+ {
+ USED_REX (REX_W);
+ if (rex & REX_W)
+ oappend (names64[modrm.rm + add]);
+ else if ((prefixes & PREFIX_DATA))
+ oappend (names16[modrm.rm + add]);
+ else
+ oappend (names32[modrm.rm + add]);
+ }
+ }
+ else
+ OP_E (bytemode, sizeflag);
+}
diff --git a/contrib/binutils/opcodes/i386-gen.c b/contrib/binutils/opcodes/i386-gen.c
new file mode 100644
index 0000000..80d414f
--- /dev/null
+++ b/contrib/binutils/opcodes/i386-gen.c
@@ -0,0 +1,394 @@
+/* Copyright 2007 Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
+
+ 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., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include "getopt.h"
+#include "libiberty.h"
+#include "safe-ctype.h"
+
+#include "i386-opc.h"
+
+#include <libintl.h>
+#define _(String) gettext (String)
+
+static const char *program_name = NULL;
+static int debug = 0;
+
+static void
+fail (const char *message, ...)
+{
+ va_list args;
+
+ va_start (args, message);
+ fprintf (stderr, _("%s: Error: "), program_name);
+ vfprintf (stderr, message, args);
+ va_end (args);
+ xexit (1);
+}
+
+/* Remove leading white spaces. */
+
+static char *
+remove_leading_whitespaces (char *str)
+{
+ while (ISSPACE (*str))
+ str++;
+ return str;
+}
+
+/* Remove trailing white spaces. */
+
+static void
+remove_trailing_whitespaces (char *str)
+{
+ size_t last = strlen (str);
+
+ if (last == 0)
+ return;
+
+ do
+ {
+ last--;
+ if (ISSPACE (str [last]))
+ str[last] = '\0';
+ else
+ break;
+ }
+ while (last != 0);
+}
+
+/* Find next field separated by '.' and terminate it. Return a
+ pointer to the one after it. */
+
+static char *
+next_field (char *str, char **next)
+{
+ char *p;
+
+ p = remove_leading_whitespaces (str);
+ for (str = p; *str != ',' && *str != '\0'; str++);
+
+ *str = '\0';
+ remove_trailing_whitespaces (p);
+
+ *next = str + 1;
+
+ return p;
+}
+
+static void
+process_i386_opcodes (void)
+{
+ FILE *fp = fopen ("i386-opc.tbl", "r");
+ char buf[2048];
+ unsigned int i;
+ char *str, *p, *last;
+ char *name, *operands, *base_opcode, *extension_opcode;
+ char *cpu_flags, *opcode_modifier, *operand_types [MAX_OPERANDS];
+
+ if (fp == NULL)
+ fail (_("can't find i386-opc.tbl for reading\n"));
+
+ printf ("\n/* i386 opcode table. */\n\n");
+ printf ("const template i386_optab[] =\n{\n");
+
+ while (!feof (fp))
+ {
+ if (fgets (buf, sizeof (buf), fp) == NULL)
+ break;
+
+ p = remove_leading_whitespaces (buf);
+
+ /* Skip comments. */
+ str = strstr (p, "//");
+ if (str != NULL)
+ str[0] = '\0';
+
+ /* Remove trailing white spaces. */
+ remove_trailing_whitespaces (p);
+
+ switch (p[0])
+ {
+ case '#':
+ printf ("%s\n", p);
+ case '\0':
+ continue;
+ break;
+ default:
+ break;
+ }
+
+ last = p + strlen (p);
+
+ /* Find name. */
+ name = next_field (p, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Find number of operands. */
+ operands = next_field (str, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Find base_opcode. */
+ base_opcode = next_field (str, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Find extension_opcode. */
+ extension_opcode = next_field (str, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Find cpu_flags. */
+ cpu_flags = next_field (str, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Find opcode_modifier. */
+ opcode_modifier = next_field (str, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Remove the first {. */
+ str = remove_leading_whitespaces (str);
+ if (*str != '{')
+ abort ();
+ str = remove_leading_whitespaces (str + 1);
+
+ i = strlen (str);
+
+ /* There are at least "X}". */
+ if (i < 2)
+ abort ();
+
+ /* Remove trailing white spaces and }. */
+ do
+ {
+ i--;
+ if (ISSPACE (str[i]) || str[i] == '}')
+ str[i] = '\0';
+ else
+ break;
+ }
+ while (i != 0);
+
+ last = str + i;
+
+ /* Find operand_types. */
+ for (i = 0; i < ARRAY_SIZE (operand_types); i++)
+ {
+ if (str >= last)
+ {
+ operand_types [i] = NULL;
+ break;
+ }
+
+ operand_types [i] = next_field (str, &str);
+ if (*operand_types[i] == '0')
+ {
+ if (i != 0)
+ operand_types[i] = NULL;
+ break;
+ }
+ }
+
+ printf (" { \"%s\", %s, %s, %s, %s,\n",
+ name, operands, base_opcode, extension_opcode,
+ cpu_flags);
+
+ printf (" %s,\n", opcode_modifier);
+
+ printf (" { ");
+
+ for (i = 0; i < ARRAY_SIZE (operand_types); i++)
+ {
+ if (operand_types[i] == NULL
+ || *operand_types[i] == '0')
+ {
+ if (i == 0)
+ printf ("0");
+ break;
+ }
+
+ if (i != 0)
+ printf (",\n ");
+
+ printf ("%s", operand_types[i]);
+ }
+ printf (" } },\n");
+ }
+
+ printf (" { NULL, 0, 0, 0, 0, 0, { 0 } }\n");
+ printf ("};\n");
+}
+
+static void
+process_i386_registers (void)
+{
+ FILE *fp = fopen ("i386-reg.tbl", "r");
+ char buf[2048];
+ char *str, *p, *last;
+ char *reg_name, *reg_type, *reg_flags, *reg_num;
+
+ if (fp == NULL)
+ fail (_("can't find i386-reg.tbl for reading\n"));
+
+ printf ("\n/* i386 register table. */\n\n");
+ printf ("const reg_entry i386_regtab[] =\n{\n");
+
+ while (!feof (fp))
+ {
+ if (fgets (buf, sizeof (buf), fp) == NULL)
+ break;
+
+ p = remove_leading_whitespaces (buf);
+
+ /* Skip comments. */
+ str = strstr (p, "//");
+ if (str != NULL)
+ str[0] = '\0';
+
+ /* Remove trailing white spaces. */
+ remove_trailing_whitespaces (p);
+
+ switch (p[0])
+ {
+ case '#':
+ printf ("%s\n", p);
+ case '\0':
+ continue;
+ break;
+ default:
+ break;
+ }
+
+ last = p + strlen (p);
+
+ /* Find reg_name. */
+ reg_name = next_field (p, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Find reg_type. */
+ reg_type = next_field (str, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Find reg_flags. */
+ reg_flags = next_field (str, &str);
+
+ if (str >= last)
+ abort ();
+
+ /* Find reg_num. */
+ reg_num = next_field (str, &str);
+
+ printf (" { \"%s\", %s, %s, %s },\n",
+ reg_name, reg_type, reg_flags, reg_num);
+ }
+
+ printf ("};\n");
+
+ printf ("\nconst unsigned int i386_regtab_size = ARRAY_SIZE (i386_regtab);\n");
+}
+
+/* Program options. */
+#define OPTION_SRCDIR 200
+
+struct option long_options[] =
+{
+ {"srcdir", required_argument, NULL, OPTION_SRCDIR},
+ {"debug", no_argument, NULL, 'd'},
+ {"version", no_argument, NULL, 'V'},
+ {"help", no_argument, NULL, 'h'},
+ {0, no_argument, NULL, 0}
+};
+
+static void
+print_version (void)
+{
+ printf ("%s: version 1.0\n", program_name);
+ xexit (0);
+}
+
+static void
+usage (FILE * stream, int status)
+{
+ fprintf (stream, "Usage: %s [-V | --version] [-d | --debug] [--srcdir=dirname] [--help]\n",
+ program_name);
+ xexit (status);
+}
+
+int
+main (int argc, char **argv)
+{
+ extern int chdir (char *);
+ char *srcdir = NULL;
+ int c;
+
+ program_name = *argv;
+ xmalloc_set_program_name (program_name);
+
+ while ((c = getopt_long (argc, argv, "vVdh", long_options, 0)) != EOF)
+ switch (c)
+ {
+ case OPTION_SRCDIR:
+ srcdir = optarg;
+ break;
+ case 'V':
+ case 'v':
+ print_version ();
+ break;
+ case 'd':
+ debug = 1;
+ break;
+ case 'h':
+ case '?':
+ usage (stderr, 0);
+ default:
+ case 0:
+ break;
+ }
+
+ if (optind != argc)
+ usage (stdout, 1);
+
+ if (srcdir != NULL)
+ if (chdir (srcdir) != 0)
+ fail (_("unable to change directory to \"%s\", errno = %s\n"),
+ srcdir, strerror (errno));
+
+ printf ("/* This file is automatically generated by i386-gen. Do not edit! */\n");
+
+ process_i386_opcodes ();
+ process_i386_registers ();
+
+ exit (0);
+}
diff --git a/contrib/binutils/binutils/budemang.h b/contrib/binutils/opcodes/i386-opc.c
index 17df9f5..2018488 100644
--- a/contrib/binutils/binutils/budemang.h
+++ b/contrib/binutils/opcodes/i386-opc.c
@@ -1,7 +1,8 @@
-/* demangle.h -- A wrapper calling libiberty cplus_demangle
- Copyright 2002, 2003 Free Software Foundation, Inc.
+/* Intel 80386 opcode table
+ Copyright 2007
+ Free Software Foundation, Inc.
- This file is part of GNU Binutils.
+ This file is part of GAS, the GNU Assembler, and GDB, the GNU Debugger.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,11 +16,17 @@
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., 51 Franklin Street - Fifth Floor, Boston, MA
- 02110-1301, USA. */
-#ifndef BUDEMANG_H
-#define BUDEMANG_H
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-char *demangle (bfd *, const char *);
+#include "sysdep.h"
+#include "libiberty.h"
+#include "i386-opc.h"
+#include "i386-tbl.h"
-#endif
+/* Segment stuff. */
+const seg_entry cs = { "cs", 0x2e };
+const seg_entry ds = { "ds", 0x3e };
+const seg_entry ss = { "ss", 0x36 };
+const seg_entry es = { "es", 0x26 };
+const seg_entry fs = { "fs", 0x64 };
+const seg_entry gs = { "gs", 0x65 };
diff --git a/contrib/binutils/opcodes/i386-opc.h b/contrib/binutils/opcodes/i386-opc.h
new file mode 100644
index 0000000..5372d4a
--- /dev/null
+++ b/contrib/binutils/opcodes/i386-opc.h
@@ -0,0 +1,239 @@
+/* Declarations for Intel 80386 opcode table
+ Copyright 2007
+ Free Software Foundation, Inc.
+
+ This file is part of GAS, the GNU Assembler.
+
+ GAS is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ GAS is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GAS; see the file COPYING. If not, write to the Free
+ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include "opcode/i386.h"
+
+typedef struct template
+{
+ /* instruction name sans width suffix ("mov" for movl insns) */
+ char *name;
+
+ /* how many operands */
+ unsigned int operands;
+
+ /* base_opcode is the fundamental opcode byte without optional
+ prefix(es). */
+ unsigned int base_opcode;
+#define Opcode_D 0x2 /* Direction bit:
+ set if Reg --> Regmem;
+ unset if Regmem --> Reg. */
+#define Opcode_FloatR 0x8 /* Bit to swap src/dest for float insns. */
+#define Opcode_FloatD 0x400 /* Direction bit for float insns. */
+
+ /* extension_opcode is the 3 bit extension for group <n> insns.
+ This field is also used to store the 8-bit opcode suffix for the
+ AMD 3DNow! instructions.
+ If this template has no extension opcode (the usual case) use None */
+ unsigned int extension_opcode;
+#define None 0xffff /* If no extension_opcode is possible. */
+
+ /* cpu feature flags */
+ unsigned int cpu_flags;
+#define Cpu186 0x1 /* i186 or better required */
+#define Cpu286 0x2 /* i286 or better required */
+#define Cpu386 0x4 /* i386 or better required */
+#define Cpu486 0x8 /* i486 or better required */
+#define Cpu586 0x10 /* i585 or better required */
+#define Cpu686 0x20 /* i686 or better required */
+#define CpuP4 0x40 /* Pentium4 or better required */
+#define CpuK6 0x80 /* AMD K6 or better required*/
+#define CpuSledgehammer 0x100 /* Sledgehammer or better required */
+#define CpuMMX 0x200 /* MMX support required */
+#define CpuMMX2 0x400 /* extended MMX support (with SSE or 3DNow!Ext) required */
+#define CpuSSE 0x800 /* Streaming SIMD extensions required */
+#define CpuSSE2 0x1000 /* Streaming SIMD extensions 2 required */
+#define Cpu3dnow 0x2000 /* 3dnow! support required */
+#define Cpu3dnowA 0x4000 /* 3dnow!Extensions support required */
+#define CpuSSE3 0x8000 /* Streaming SIMD extensions 3 required */
+#define CpuPadLock 0x10000 /* VIA PadLock required */
+#define CpuSVME 0x20000 /* AMD Secure Virtual Machine Ext-s required */
+#define CpuVMX 0x40000 /* VMX Instructions required */
+#define CpuSSSE3 0x80000 /* Supplemental Streaming SIMD extensions 3 required */
+#define CpuSSE4a 0x100000 /* SSE4a New Instuctions required */
+#define CpuABM 0x200000 /* ABM New Instructions required */
+#define CpuSSE4_1 0x400000 /* SSE4.1 Instructions required */
+#define CpuSSE4_2 0x800000 /* SSE4.2 Instructions required */
+
+/* SSE4.1/4.2 Instructions required */
+#define CpuSSE4 (CpuSSE4_1|CpuSSE4_2)
+
+ /* These flags are set by gas depending on the flag_code. */
+#define Cpu64 0x4000000 /* 64bit support required */
+#define CpuNo64 0x8000000 /* Not supported in the 64bit mode */
+
+ /* The default value for unknown CPUs - enable all features to avoid problems. */
+#define CpuUnknownFlags (Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686 \
+ |CpuP4|CpuSledgehammer|CpuMMX|CpuMMX2|CpuSSE|CpuSSE2|CpuSSE3|CpuVMX \
+ |Cpu3dnow|Cpu3dnowA|CpuK6|CpuPadLock|CpuSVME|CpuSSSE3|CpuSSE4_1 \
+ |CpuSSE4_2|CpuABM|CpuSSE4a)
+
+ /* the bits in opcode_modifier are used to generate the final opcode from
+ the base_opcode. These bits also are used to detect alternate forms of
+ the same instruction */
+ unsigned int opcode_modifier;
+
+ /* opcode_modifier bits: */
+#define D 0x1 /* has direction bit. */
+#define W 0x2 /* set if operands can be words or dwords
+ encoded the canonical way */
+#define Modrm 0x4 /* insn has a modrm byte. */
+#define ShortForm 0x8 /* register is in low 3 bits of opcode */
+#define Jump 0x10 /* special case for jump insns. */
+#define JumpDword 0x20 /* call and jump */
+#define JumpByte 0x40 /* loop and jecxz */
+#define JumpInterSegment 0x80 /* special case for intersegment leaps/calls */
+#define FloatMF 0x100 /* FP insn memory format bit, sized by 0x4 */
+#define FloatR 0x200 /* src/dest swap for floats. */
+#define FloatD 0x400 /* has float insn direction bit. */
+#define Size16 0x800 /* needs size prefix if in 32-bit mode */
+#define Size32 0x1000 /* needs size prefix if in 16-bit mode */
+#define Size64 0x2000 /* needs size prefix if in 64-bit mode */
+#define IgnoreSize 0x4000 /* instruction ignores operand size prefix */
+#define DefaultSize 0x8000 /* default insn size depends on mode */
+#define No_bSuf 0x10000 /* b suffix on instruction illegal */
+#define No_wSuf 0x20000 /* w suffix on instruction illegal */
+#define No_lSuf 0x40000 /* l suffix on instruction illegal */
+#define No_sSuf 0x80000 /* s suffix on instruction illegal */
+#define No_qSuf 0x100000 /* q suffix on instruction illegal */
+#define No_xSuf 0x200000 /* x suffix on instruction illegal */
+#define FWait 0x400000 /* instruction needs FWAIT */
+#define IsString 0x800000 /* quick test for string instructions */
+#define RegKludge 0x1000000 /* fake an extra reg operand for clr, imul
+ and special register processing for
+ some instructions. */
+#define IsPrefix 0x2000000 /* opcode is a prefix */
+#define ImmExt 0x4000000 /* instruction has extension in 8 bit imm */
+#define NoRex64 0x8000000 /* instruction don't need Rex64 prefix. */
+#define Rex64 0x10000000 /* instruction require Rex64 prefix. */
+#define Ugh 0x20000000 /* deprecated fp insn, gets a warning */
+
+ /* operand_types[i] describes the type of operand i. This is made
+ by OR'ing together all of the possible type masks. (e.g.
+ 'operand_types[i] = Reg|Imm' specifies that operand i can be
+ either a register or an immediate operand. */
+ unsigned int operand_types[MAX_OPERANDS];
+
+ /* operand_types[i] bits */
+ /* register */
+#define Reg8 0x1 /* 8 bit reg */
+#define Reg16 0x2 /* 16 bit reg */
+#define Reg32 0x4 /* 32 bit reg */
+#define Reg64 0x8 /* 64 bit reg */
+ /* immediate */
+#define Imm8 0x10 /* 8 bit immediate */
+#define Imm8S 0x20 /* 8 bit immediate sign extended */
+#define Imm16 0x40 /* 16 bit immediate */
+#define Imm32 0x80 /* 32 bit immediate */
+#define Imm32S 0x100 /* 32 bit immediate sign extended */
+#define Imm64 0x200 /* 64 bit immediate */
+#define Imm1 0x400 /* 1 bit immediate */
+ /* memory */
+#define BaseIndex 0x800
+ /* Disp8,16,32 are used in different ways, depending on the
+ instruction. For jumps, they specify the size of the PC relative
+ displacement, for baseindex type instructions, they specify the
+ size of the offset relative to the base register, and for memory
+ offset instructions such as `mov 1234,%al' they specify the size of
+ the offset relative to the segment base. */
+#define Disp8 0x1000 /* 8 bit displacement */
+#define Disp16 0x2000 /* 16 bit displacement */
+#define Disp32 0x4000 /* 32 bit displacement */
+#define Disp32S 0x8000 /* 32 bit signed displacement */
+#define Disp64 0x10000 /* 64 bit displacement */
+ /* specials */
+#define InOutPortReg 0x20000 /* register to hold in/out port addr = dx */
+#define ShiftCount 0x40000 /* register to hold shift count = cl */
+#define Control 0x80000 /* Control register */
+#define Debug 0x100000 /* Debug register */
+#define Test 0x200000 /* Test register */
+#define FloatReg 0x400000 /* Float register */
+#define FloatAcc 0x800000 /* Float stack top %st(0) */
+#define SReg2 0x1000000 /* 2 bit segment register */
+#define SReg3 0x2000000 /* 3 bit segment register */
+#define Acc 0x4000000 /* Accumulator %al or %ax or %eax */
+#define JumpAbsolute 0x8000000
+#define RegMMX 0x10000000 /* MMX register */
+#define RegXMM 0x20000000 /* XMM registers in PIII */
+#define EsSeg 0x40000000 /* String insn operand with fixed es segment */
+
+ /* RegMem is for instructions with a modrm byte where the register
+ destination operand should be encoded in the mod and regmem fields.
+ Normally, it will be encoded in the reg field. We add a RegMem
+ flag to the destination register operand to indicate that it should
+ be encoded in the regmem field. */
+#define RegMem 0x80000000
+
+#define Reg (Reg8|Reg16|Reg32|Reg64) /* gen'l register */
+#define WordReg (Reg16|Reg32|Reg64)
+#define ImplicitRegister (InOutPortReg|ShiftCount|Acc|FloatAcc)
+#define Imm (Imm8|Imm8S|Imm16|Imm32S|Imm32|Imm64) /* gen'l immediate */
+#define EncImm (Imm8|Imm16|Imm32|Imm32S) /* Encodable gen'l immediate */
+#define Disp (Disp8|Disp16|Disp32|Disp32S|Disp64) /* General displacement */
+#define AnyMem (Disp8|Disp16|Disp32|Disp32S|BaseIndex) /* General memory */
+ /* The following aliases are defined because the opcode table
+ carefully specifies the allowed memory types for each instruction.
+ At the moment we can only tell a memory reference size by the
+ instruction suffix, so there's not much point in defining Mem8,
+ Mem16, Mem32 and Mem64 opcode modifiers - We might as well just use
+ the suffix directly to check memory operands. */
+#define LLongMem AnyMem /* 64 bits (or more) */
+#define LongMem AnyMem /* 32 bit memory ref */
+#define ShortMem AnyMem /* 16 bit memory ref */
+#define WordMem AnyMem /* 16, 32 or 64 bit memory ref */
+#define ByteMem AnyMem /* 8 bit memory ref */
+}
+template;
+
+extern const template i386_optab[];
+
+/* these are for register name --> number & type hash lookup */
+typedef struct
+{
+ char *reg_name;
+ unsigned int reg_type;
+ unsigned int reg_flags;
+#define RegRex 0x1 /* Extended register. */
+#define RegRex64 0x2 /* Extended 8 bit register. */
+ unsigned int reg_num;
+}
+reg_entry;
+
+/* Entries in i386_regtab. */
+#define REGNAM_AL 1
+#define REGNAM_AX 25
+#define REGNAM_EAX 41
+
+extern const reg_entry i386_regtab[];
+extern const unsigned int i386_regtab_size;
+
+typedef struct
+{
+ char *seg_name;
+ unsigned int seg_prefix;
+}
+seg_entry;
+
+extern const seg_entry cs;
+extern const seg_entry ds;
+extern const seg_entry ss;
+extern const seg_entry es;
+extern const seg_entry fs;
+extern const seg_entry gs;
diff --git a/contrib/binutils/opcodes/i386-opc.tbl b/contrib/binutils/opcodes/i386-opc.tbl
new file mode 100644
index 0000000..5465608
--- /dev/null
+++ b/contrib/binutils/opcodes/i386-opc.tbl
@@ -0,0 +1,1489 @@
+// i386 opcode table.
+
+// Move instructions.
+// We put the 64bit displacement first and we only mark constants
+// larger than 32bit as Disp64.
+mov, 2, 0xa0, None, Cpu64, D|W|No_sSuf|No_xSuf, { Disp64, Acc }
+mov, 2, 0xa0, None, CpuNo64, D|W|No_sSuf|No_qSuf|No_xSuf, { Disp16|Disp32, Acc }
+mov, 2, 0x88, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+// In the 64bit mode the short form mov immediate is redefined to have
+// 64bit value.
+mov, 2, 0xb0, None, 0, W|ShortForm|No_sSuf|No_qSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32 }
+mov, 2, 0xc6, 0x0, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+mov, 2, 0xb0, None, Cpu64, W|ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { Imm64, Reg64 }
+// The segment register moves accept WordReg so that a segment register
+// can be copied to a 32 bit register, and vice versa, without using a
+// size prefix. When moving to a 32 bit register, the upper 16 bits
+// are set to an implementation defined value (on the Pentium Pro, the
+// implementation defined value is zero).
+mov, 2, 0x8c, None, 0, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { SReg2, Reg16|Reg32|Reg64|RegMem }
+mov, 2, 0x8c, None, 0, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { SReg2, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+mov, 2, 0x8c, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { SReg3, Reg16|Reg32|Reg64|RegMem }
+mov, 2, 0x8c, None, Cpu386, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { SReg3, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+mov, 2, 0x8e, None, 0, Modrm|IgnoreSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64, SReg2 }
+mov, 2, 0x8e, None, 0, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, SReg2 }
+mov, 2, 0x8e, None, Cpu386, Modrm|IgnoreSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64, SReg3 }
+mov, 2, 0x8e, None, Cpu386, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, SReg3 }
+// Move to/from control debug registers. In the 16 or 32bit modes
+// they are 32bit. In the 64bit mode they are 64bit.
+mov, 2, 0xf20, None, Cpu386|CpuNo64, D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf, { Control, Reg32|RegMem }
+mov, 2, 0xf20, None, Cpu64, D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Control, Reg64|RegMem }
+mov, 2, 0xf21, None, Cpu386|CpuNo64, D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf, { Debug, Reg32|RegMem }
+mov, 2, 0xf21, None, Cpu64, D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Debug, Reg64|RegMem }
+mov, 2, 0xf24, None, Cpu386|CpuNo64, D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf, { Test, Reg32|RegMem }
+movabs, 2, 0xa0, None, Cpu64, D|W|No_sSuf|No_xSuf, { Disp64, Acc }
+movabs, 2, 0xb0, None, Cpu64, W|ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { Imm64, Reg64 }
+
+// Move with sign extend.
+// "movsbl" & "movsbw" must not be unified into "movsb" to avoid
+// conflict with the "movs" string move instruction.
+movsbl, 2, 0xfbe, None, Cpu386, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+movsbw, 2, 0xfbe, None, Cpu386, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16 }
+movswl, 2, 0xfbf, None, Cpu386, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+movsbq, 2, 0xfbe, None, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+movswq, 2, 0xfbf, None, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+movslq, 2, 0x63, None, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64, { Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+// Intel Syntax next 3 insns
+movsx, 2, 0xfbe, None, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+movsx, 2, 0xfbf, None, Cpu386, Modrm|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32|Reg64 }
+movsx, 2, 0x63, None, Cpu64, Modrm|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Rex64, { Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+
+// Move with zero extend. We can't remove "movzb" since existing
+// assembly codes may use it.
+movzb, 2, 0xfb6, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+// "movzbl" & "movzbw" should not be unified into "movzb" for
+// consistency with the sign extending moves above.
+movzbl, 2, 0xfb6, None, Cpu386, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+movzbw, 2, 0xfb6, None, Cpu386, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16 }
+movzwl, 2, 0xfb7, None, Cpu386, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+// These instructions are not particulary useful, since the zero extend
+// 32->64 is implicit, but we can encode them.
+movzbq, 2, 0xfb6, None, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+movzwq, 2, 0xfb7, None, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+// Intel Syntax next 2 insns (the 64-bit variants are not particulary
+// useful since the zero extend 32->64 is implicit, but we can encode them).
+movzx, 2, 0xfb6, None, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+movzx, 2, 0xfb7, None, Cpu386, Modrm|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32|Reg64 }
+
+// Push instructions.
+push, 1, 0x50, None, CpuNo64, ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64 }
+push, 1, 0xff, 0x6, CpuNo64, Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+push, 1, 0x6a, None, Cpu186|CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8S }
+push, 1, 0x68, None, Cpu186|CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Imm16|Imm32 }
+push, 1, 0x6, None, CpuNo64, ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { SReg2 }
+push, 1, 0xfa0, None, Cpu386|CpuNo64, ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { SReg3 }
+// In 64bit mode, the operand size is implicitly 64bit.
+push, 1, 0x50, None, Cpu64, ShortForm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Reg16|Reg64 }
+push, 1, 0xff, 0x6, Cpu64, Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Reg16|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+push, 1, 0x6a, None, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Imm8S }
+push, 1, 0x68, None, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Imm16|Imm32S }
+push, 1, 0xfa0, None, Cpu64, ShortForm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { SReg3 }
+
+pusha, 0, 0x60, None, Cpu186|CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// Pop instructions.
+pop, 1, 0x58, None, CpuNo64, ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64 }
+pop, 1, 0x8f, 0x0, CpuNo64, Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+pop, 1, 0x7, None, CpuNo64, ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { SReg2 }
+pop, 1, 0xfa1, None, Cpu386|CpuNo64, ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { SReg3 }
+// In 64bit mode, the operand size is implicitly 64bit.
+pop, 1, 0x58, None, Cpu64, ShortForm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Reg16|Reg64 }
+pop, 1, 0x8f, 0x0, Cpu64, Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Reg16|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+pop, 1, 0xfa1, None, Cpu64, ShortForm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { SReg3 }
+
+popa, 0, 0x61, None, Cpu186|CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// Exchange instructions.
+// xchg commutes: we allow both operand orders.
+
+// In the 64bit code, xchg rax, rax is reused for new nop instruction.
+xchg, 2, 0x90, None, 0, ShortForm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64, Acc }
+xchg, 2, 0x90, None, 0, ShortForm|No_bSuf|No_sSuf|No_xSuf, { Acc, Reg16|Reg32|Reg64 }
+xchg, 2, 0x86, None, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+xchg, 2, 0x86, None, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg8|Reg16|Reg32|Reg64 }
+
+// In/out from ports.
+// XXX should reject %rax
+in, 2, 0xe4, None, 0, W|No_sSuf|No_qSuf|No_xSuf, { Imm8, Acc }
+in, 2, 0xec, None, 0, W|No_sSuf|No_qSuf|No_xSuf, { InOutPortReg, Acc }
+in, 1, 0xe4, None, 0, W|No_sSuf|No_qSuf|No_xSuf, { Imm8 }
+in, 1, 0xec, None, 0, W|No_sSuf|No_qSuf|No_xSuf, { InOutPortReg }
+out, 2, 0xe6, None, 0, W|No_sSuf|No_qSuf|No_xSuf, { Acc, Imm8 }
+out, 2, 0xee, None, 0, W|No_sSuf|No_qSuf|No_xSuf, { Acc, InOutPortReg }
+out, 1, 0xe6, None, 0, W|No_sSuf|No_qSuf|No_xSuf, { Imm8 }
+out, 1, 0xee, None, 0, W|No_sSuf|No_qSuf|No_xSuf, { InOutPortReg }
+
+// Load effective address.
+lea, 2, 0x8d, None, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+
+// Load segment registers from memory.
+lds, 2, 0xc5, None, CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+les, 2, 0xc4, None, CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+lfs, 2, 0xfb4, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+lgs, 2, 0xfb5, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+lss, 2, 0xfb2, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+
+// Flags register instructions.
+clc, 0, 0xf8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cld, 0, 0xfc, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cli, 0, 0xfa, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+clts, 0, 0xf06, None, Cpu286, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cmc, 0, 0xf5, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+lahf, 0, 0x9f, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+sahf, 0, 0x9e, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+pushf, 0, 0x9c, None, CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+pushf, 0, 0x9c, None, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { 0 }
+popf, 0, 0x9d, None, CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+popf, 0, 0x9d, None, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { 0 }
+stc, 0, 0xf9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+std, 0, 0xfd, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+sti, 0, 0xfb, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// Arithmetic.
+add, 2, 0x0, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+add, 2, 0x83, 0x0, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+add, 2, 0x4, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+add, 2, 0x80, 0x0, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+inc, 1, 0x40, None, CpuNo64, ShortForm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64 }
+inc, 1, 0xfe, 0x0, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+sub, 2, 0x28, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sub, 2, 0x83, 0x5, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sub, 2, 0x2c, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+sub, 2, 0x80, 0x5, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+dec, 1, 0x48, None, CpuNo64, ShortForm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64 }
+dec, 1, 0xfe, 0x1, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+sbb, 2, 0x18, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sbb, 2, 0x83, 0x3, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sbb, 2, 0x1c, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+sbb, 2, 0x80, 0x3, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+cmp, 2, 0x38, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+cmp, 2, 0x83, 0x7, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+cmp, 2, 0x3c, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+cmp, 2, 0x80, 0x7, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+test, 2, 0x84, None, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+test, 2, 0x84, None, 0, W|Modrm|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg8|Reg16|Reg32|Reg64 }
+test, 2, 0xa8, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+test, 2, 0xf6, 0x0, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+and, 2, 0x20, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+and, 2, 0x83, 0x4, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+and, 2, 0x24, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+and, 2, 0x80, 0x4, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+or, 2, 0x8, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+or, 2, 0x83, 0x1, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+or, 2, 0xc, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+or, 2, 0x80, 0x1, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+xor, 2, 0x30, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+xor, 2, 0x83, 0x6, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+xor, 2, 0x34, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+xor, 2, 0x80, 0x6, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// clr with 1 operand is really xor with 2 operands.
+clr, 1, 0x30, None, 0, W|Modrm|No_sSuf|No_xSuf|RegKludge, { Reg8|Reg16|Reg32|Reg64 }
+
+adc, 2, 0x10, None, 0, D|W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+adc, 2, 0x83, 0x2, 0, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+adc, 2, 0x14, None, 0, W|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Acc }
+adc, 2, 0x80, 0x2, 0, W|Modrm|No_sSuf|No_xSuf, { Imm8|Imm16|Imm32|Imm32S, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+neg, 1, 0xf6, 0x3, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+not, 1, 0xf6, 0x2, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+aaa, 0, 0x37, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+aas, 0, 0x3f, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+daa, 0, 0x27, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+das, 0, 0x2f, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+aad, 0, 0xd50a, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+aad, 1, 0xd5, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8 }
+aam, 0, 0xd40a, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+aam, 1, 0xd4, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8 }
+
+// Conversion insns.
+// Intel naming
+cbw, 0, 0x98, None, 0, Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cdqe, 0, 0x98, None, Cpu64, Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cwde, 0, 0x98, None, 0, Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cwd, 0, 0x99, None, 0, Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cdq, 0, 0x99, None, 0, Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cqo, 0, 0x99, None, Cpu64, Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+// AT&T naming
+cbtw, 0, 0x98, None, 0, Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cltq, 0, 0x98, None, Cpu64, Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cwtl, 0, 0x98, None, 0, Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cwtd, 0, 0x99, None, 0, Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cltd, 0, 0x99, None, 0, Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cqto, 0, 0x99, None, Cpu64, Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// Warning! the mul/imul (opcode 0xf6) must only have 1 operand! They are
+// expanding 64-bit multiplies, and *cannot* be selected to accomplish
+// 'imul %ebx, %eax' (opcode 0x0faf must be used in this case)
+// These multiplies can only be selected with single operand forms.
+mul, 1, 0xf6, 0x4, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+imul, 1, 0xf6, 0x5, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+imul, 2, 0xfaf, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+imul, 3, 0x6b, None, Cpu186, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+imul, 3, 0x69, None, Cpu186, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm16|Imm32|Imm32S, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+// imul with 2 operands mimics imul with 3 by putting the register in
+// both i.rm.reg & i.rm.regmem fields. RegKludge enables this
+// transformation.
+imul, 2, 0x6b, None, Cpu186, Modrm|No_bSuf|No_sSuf|No_xSuf|RegKludge, { Imm8S, Reg16|Reg32|Reg64 }
+imul, 2, 0x69, None, Cpu186, Modrm|No_bSuf|No_sSuf|No_xSuf|RegKludge, { Imm16|Imm32|Imm32S, Reg16|Reg32|Reg64 }
+
+div, 1, 0xf6, 0x6, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+div, 2, 0xf6, 0x6, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Acc }
+idiv, 1, 0xf6, 0x7, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+idiv, 2, 0xf6, 0x7, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Acc }
+
+rol, 2, 0xd0, 0x0, 0, W|Modrm|No_sSuf|No_xSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rol, 2, 0xc0, 0x0, Cpu186, W|Modrm|No_sSuf|No_xSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rol, 2, 0xd2, 0x0, 0, W|Modrm|No_sSuf|No_xSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rol, 1, 0xd0, 0x0, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+ror, 2, 0xd0, 0x1, 0, W|Modrm|No_sSuf|No_xSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+ror, 2, 0xc0, 0x1, Cpu186, W|Modrm|No_sSuf|No_xSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+ror, 2, 0xd2, 0x1, 0, W|Modrm|No_sSuf|No_xSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+ror, 1, 0xd0, 0x1, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+rcl, 2, 0xd0, 0x2, 0, W|Modrm|No_sSuf|No_xSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rcl, 2, 0xc0, 0x2, Cpu186, W|Modrm|No_sSuf|No_xSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rcl, 2, 0xd2, 0x2, 0, W|Modrm|No_sSuf|No_xSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rcl, 1, 0xd0, 0x2, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+rcr, 2, 0xd0, 0x3, 0, W|Modrm|No_sSuf|No_xSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rcr, 2, 0xc0, 0x3, Cpu186, W|Modrm|No_sSuf|No_xSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rcr, 2, 0xd2, 0x3, 0, W|Modrm|No_sSuf|No_xSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rcr, 1, 0xd0, 0x3, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+sal, 2, 0xd0, 0x4, 0, W|Modrm|No_sSuf|No_xSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sal, 2, 0xc0, 0x4, Cpu186, W|Modrm|No_sSuf|No_xSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sal, 2, 0xd2, 0x4, 0, W|Modrm|No_sSuf|No_xSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sal, 1, 0xd0, 0x4, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+shl, 2, 0xd0, 0x4, 0, W|Modrm|No_sSuf|No_xSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shl, 2, 0xc0, 0x4, Cpu186, W|Modrm|No_sSuf|No_xSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shl, 2, 0xd2, 0x4, 0, W|Modrm|No_sSuf|No_xSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shl, 1, 0xd0, 0x4, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+shr, 2, 0xd0, 0x5, 0, W|Modrm|No_sSuf|No_xSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shr, 2, 0xc0, 0x5, Cpu186, W|Modrm|No_sSuf|No_xSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shr, 2, 0xd2, 0x5, 0, W|Modrm|No_sSuf|No_xSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shr, 1, 0xd0, 0x5, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+sar, 2, 0xd0, 0x7, 0, W|Modrm|No_sSuf|No_xSuf, { Imm1, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sar, 2, 0xc0, 0x7, Cpu186, W|Modrm|No_sSuf|No_xSuf, { Imm8, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sar, 2, 0xd2, 0x7, 0, W|Modrm|No_sSuf|No_xSuf, { ShiftCount, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sar, 1, 0xd0, 0x7, 0, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+shld, 3, 0xfa4, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shld, 3, 0xfa5, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { ShiftCount, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shld, 2, 0xfa5, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+shrd, 3, 0xfac, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shrd, 3, 0xfad, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { ShiftCount, Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+shrd, 2, 0xfad, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// Control transfer instructions.
+call, 1, 0xe8, None, CpuNo64, JumpDword|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Disp16|Disp32 }
+call, 1, 0xe8, None, Cpu64, JumpDword|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Disp16|Disp32 }
+call, 1, 0xff, 0x2, CpuNo64, Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
+call, 1, 0xff, 0x2, Cpu64, Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Reg16|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
+// Intel Syntax
+call, 2, 0x9a, None, CpuNo64, JumpInterSegment|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Imm16, Imm16|Imm32 }
+// Intel Syntax
+call, 1, 0xff, 0x3, 0, Modrm|DefaultSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
+lcall, 2, 0x9a, None, CpuNo64, JumpInterSegment|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Imm16, Imm16|Imm32 }
+lcall, 1, 0xff, 0x3, 0, Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
+
+jmp, 1, 0xeb, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jmp, 1, 0xff, 0x4, CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
+jmp, 1, 0xff, 0x4, Cpu64, Modrm|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Reg16|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
+// Intel Syntax.
+jmp, 2, 0xea, None, CpuNo64, JumpInterSegment|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Imm16, Imm16|Imm32 }
+// Intel Syntax.
+jmp, 1, 0xff, 0x5, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
+ljmp, 2, 0xea, None, CpuNo64, JumpInterSegment|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Imm16, Imm16|Imm32 }
+ljmp, 1, 0xff, 0x5, 0, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute }
+
+ret, 0, 0xc3, None, CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+ret, 1, 0xc2, None, CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Imm16 }
+ret, 0, 0xc3, None, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { 0 }
+ret, 1, 0xc2, None, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Imm16 }
+lret, 0, 0xcb, None, 0, DefaultSize|No_bSuf|No_sSuf|No_xSuf, { 0 }
+lret, 1, 0xca, None, 0, DefaultSize|No_bSuf|No_sSuf|No_xSuf, { Imm16 }
+enter, 2, 0xc8, None, Cpu186|CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Imm16, Imm8 }
+enter, 2, 0xc8, None, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Imm16, Imm8 }
+leave, 0, 0xc9, None, Cpu186|CpuNo64, DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+leave, 0, 0xc9, None, Cpu64, DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { 0 }
+
+// Conditional jumps.
+jo, 1, 0x70, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jno, 1, 0x71, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jb, 1, 0x72, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jc, 1, 0x72, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnae, 1, 0x72, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnb, 1, 0x73, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnc, 1, 0x73, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jae, 1, 0x73, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+je, 1, 0x74, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jz, 1, 0x74, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jne, 1, 0x75, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnz, 1, 0x75, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jbe, 1, 0x76, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jna, 1, 0x76, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnbe, 1, 0x77, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+ja, 1, 0x77, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+js, 1, 0x78, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jns, 1, 0x79, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jp, 1, 0x7a, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jpe, 1, 0x7a, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnp, 1, 0x7b, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jpo, 1, 0x7b, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jl, 1, 0x7c, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnge, 1, 0x7c, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnl, 1, 0x7d, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jge, 1, 0x7d, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jle, 1, 0x7e, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jng, 1, 0x7e, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jnle, 1, 0x7f, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jg, 1, 0x7f, None, 0, Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+
+// jcxz vs. jecxz is chosen on the basis of the address size prefix.
+jcxz, 1, 0xe3, None, CpuNo64, JumpByte|Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jecxz, 1, 0xe3, None, CpuNo64, JumpByte|Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jecxz, 1, 0x67e3, None, Cpu64, JumpByte|Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+jrcxz, 1, 0xe3, None, Cpu64, JumpByte|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+
+// The loop instructions also use the address size prefix to select
+// %cx rather than %ecx for the loop count, so the `w' form of these
+// instructions emit an address size prefix rather than a data size
+// prefix.
+loop, 1, 0xe2, None, CpuNo64, JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loop, 1, 0xe2, None, Cpu64, JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loopz, 1, 0xe1, None, CpuNo64, JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loopz, 1, 0xe1, None, Cpu64, JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loope, 1, 0xe1, None, CpuNo64, JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loope, 1, 0xe1, None, Cpu64, JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loopnz, 1, 0xe0, None, CpuNo64, JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loopnz, 1, 0xe0, None, Cpu64, JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loopne, 1, 0xe0, None, CpuNo64, JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+loopne, 1, 0xe0, None, Cpu64, JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64, { Disp8|Disp16|Disp32|Disp32S|Disp64 }
+
+// Set byte on flag instructions.
+seto, 1, 0xf90, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setno, 1, 0xf91, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setb, 1, 0xf92, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setc, 1, 0xf92, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnae, 1, 0xf92, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnb, 1, 0xf93, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnc, 1, 0xf93, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setae, 1, 0xf93, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sete, 1, 0xf94, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setz, 1, 0xf94, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setne, 1, 0xf95, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnz, 1, 0xf95, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setbe, 1, 0xf96, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setna, 1, 0xf96, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnbe, 1, 0xf97, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+seta, 1, 0xf97, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sets, 1, 0xf98, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setns, 1, 0xf99, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setp, 1, 0xf9a, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setpe, 1, 0xf9a, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnp, 1, 0xf9b, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setpo, 1, 0xf9b, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setl, 1, 0xf9c, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnge, 1, 0xf9c, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnl, 1, 0xf9d, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setge, 1, 0xf9d, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setle, 1, 0xf9e, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setng, 1, 0xf9e, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setnle, 1, 0xf9f, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+setg, 1, 0xf9f, 0x0, Cpu386, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// String manipulation.
+cmps, 0, 0xa6, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+cmps, 2, 0xa6, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+scmp, 0, 0xa6, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+scmp, 2, 0xa6, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+ins, 0, 0x6c, None, Cpu186, W|No_sSuf|No_qSuf|No_xSuf|IsString, { 0 }
+ins, 2, 0x6c, None, Cpu186, W|No_sSuf|No_qSuf|No_xSuf|IsString, { InOutPortReg, BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+outs, 0, 0x6e, None, Cpu186, W|No_sSuf|No_qSuf|No_xSuf|IsString, { 0 }
+outs, 2, 0x6e, None, Cpu186, W|No_sSuf|No_qSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, InOutPortReg }
+lods, 0, 0xac, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+lods, 1, 0xac, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lods, 2, 0xac, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Acc }
+slod, 0, 0xac, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+slod, 1, 0xac, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+slod, 2, 0xac, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Acc }
+movs, 0, 0xa4, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+movs, 2, 0xa4, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+smov, 0, 0xa4, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+smov, 2, 0xa4, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+scas, 0, 0xae, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+scas, 1, 0xae, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+scas, 2, 0xae, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg, Acc }
+ssca, 0, 0xae, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+ssca, 1, 0xae, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+ssca, 2, 0xae, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg, Acc }
+stos, 0, 0xaa, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+stos, 1, 0xaa, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+stos, 2, 0xaa, None, 0, W|No_sSuf|No_xSuf|IsString, { Acc, BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+ssto, 0, 0xaa, None, 0, W|No_sSuf|No_xSuf|IsString, { 0 }
+ssto, 1, 0xaa, None, 0, W|No_sSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+ssto, 2, 0xaa, None, 0, W|No_sSuf|No_xSuf|IsString, { Acc, BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+xlat, 0, 0xd7, None, 0, No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString, { 0 }
+xlat, 1, 0xd7, None, 0, No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// Bit manipulation.
+bsf, 2, 0xfbc, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+bsr, 2, 0xfbd, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+bt, 2, 0xfa3, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+bt, 2, 0xfba, 0x4, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+btc, 2, 0xfbb, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+btc, 2, 0xfba, 0x7, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+btr, 2, 0xfb3, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+btr, 2, 0xfba, 0x6, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+bts, 2, 0xfab, None, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+bts, 2, 0xfba, 0x5, Cpu386, Modrm|No_bSuf|No_sSuf|No_xSuf, { Imm8, Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// Interrupts & op. sys insns.
+// See gas/config/tc-i386.c for conversion of 'int $3' into the special
+// int 3 insn.
+int, 1, 0xcd, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8 }
+int3, 0, 0xcc, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+into, 0, 0xce, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+iret, 0, 0xcf, None, 0, DefaultSize|No_bSuf|No_sSuf|No_xSuf, { 0 }
+// i386sl, i486sl, later 486, and Pentium.
+rsm, 0, 0xfaa, None, Cpu386, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+bound, 2, 0x62, None, Cpu186|CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|Reg64, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+hlt, 0, 0xf4, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+nop, 1, 0xf1f, 0x0, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// nop is actually "xchg %ax,%ax" in 16bit mode, "xchg %eax,%eax" in
+// 32bit mode and "xchg %rax,%rax" in 64bit mode.
+nop, 0, 0x90, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// Protection control.
+arpl, 2, 0x63, None, Cpu286|CpuNo64, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16, Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lar, 2, 0xf02, None, Cpu286, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+lgdt, 1, 0xf01, 0x2, Cpu286|CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lgdt, 1, 0xf01, 0x2, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lidt, 1, 0xf01, 0x3, Cpu286|CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lidt, 1, 0xf01, 0x3, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lldt, 1, 0xf00, 0x2, Cpu286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lmsw, 1, 0xf01, 0x6, Cpu286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lsl, 2, 0xf03, None, Cpu286, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+ltr, 1, 0xf00, 0x3, Cpu286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+sgdt, 1, 0xf01, 0x0, Cpu286|CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sgdt, 1, 0xf01, 0x0, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sidt, 1, 0xf01, 0x1, Cpu286|CpuNo64, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sidt, 1, 0xf01, 0x1, Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+sldt, 1, 0xf00, 0x0, Cpu286, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64 }
+sldt, 1, 0xf00, 0x0, Cpu286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+smsw, 1, 0xf01, 0x4, Cpu286, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64 }
+smsw, 1, 0xf01, 0x4, Cpu286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+str, 1, 0xf00, 0x1, Cpu286, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64 }
+str, 1, 0xf00, 0x1, Cpu286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+verr, 1, 0xf00, 0x4, Cpu286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+verw, 1, 0xf00, 0x5, Cpu286, Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// Floating point instructions.
+
+// load
+fld, 1, 0xd9c0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fld, 1, 0xd9, 0x0, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fld, 1, 0xd9c0, None, 0, ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg }
+// Intel Syntax
+fld, 1, 0xdb, 0x5, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fild, 1, 0xdf, 0x0, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fild, 1, 0xdf, 0x5, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fildll, 1, 0xdf, 0x5, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fldt, 1, 0xdb, 0x5, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fbld, 1, 0xdf, 0x4, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// store (no pop)
+fst, 1, 0xddd0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fst, 1, 0xd9, 0x2, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fst, 1, 0xddd0, None, 0, ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg }
+fist, 1, 0xdf, 0x2, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// store (with pop)
+fstp, 1, 0xddd8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fstp, 1, 0xd9, 0x3, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fstp, 1, 0xddd8, None, 0, ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg }
+// Intel Syntax
+fstp, 1, 0xdb, 0x7, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fistp, 1, 0xdf, 0x3, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fistp, 1, 0xdf, 0x7, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fistpll, 1, 0xdf, 0x7, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fstpt, 1, 0xdb, 0x7, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fbstp, 1, 0xdf, 0x6, 0, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// exchange %st<n> with %st0
+fxch, 1, 0xd9c8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+// alias for fxch %st(1)
+fxch, 0, 0xd9c9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// comparison (without pop)
+fcom, 1, 0xd8d0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+// alias for fcom %st(1)
+fcom, 0, 0xd8d1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fcom, 1, 0xd8, 0x2, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fcom, 1, 0xd8d0, None, 0, ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg }
+ficom, 1, 0xde, 0x2, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// comparison (with pop)
+fcomp, 1, 0xd8d8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+// alias for fcomp %st(1)
+fcomp, 0, 0xd8d9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fcomp, 1, 0xd8, 0x3, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fcomp, 1, 0xd8d8, None, 0, ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg }
+ficomp, 1, 0xde, 0x3, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fcompp, 0, 0xded9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// unordered comparison (with pop)
+fucom, 1, 0xdde0, None, Cpu286, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+// alias for fucom %st(1)
+fucom, 0, 0xdde1, None, Cpu286, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fucomp, 1, 0xdde8, None, Cpu286, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+// alias for fucomp %st(1)
+fucomp, 0, 0xdde9, None, Cpu286, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fucompp, 0, 0xdae9, None, Cpu286, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+ftst, 0, 0xd9e4, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fxam, 0, 0xd9e5, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// load constants into %st0
+fld1, 0, 0xd9e8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fldl2t, 0, 0xd9e9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fldl2e, 0, 0xd9ea, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fldpi, 0, 0xd9eb, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fldlg2, 0, 0xd9ec, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fldln2, 0, 0xd9ed, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fldz, 0, 0xd9ee, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// Arithmetic.
+
+// add
+fadd, 2, 0xd8c0, None, 0, ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+// alias for fadd %st(i), %st
+fadd, 1, 0xd8c0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+#if SYSV386_COMPAT
+// alias for faddp
+fadd, 0, 0xdec1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { 0 }
+#endif
+fadd, 1, 0xd8, 0x0, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fiadd, 1, 0xde, 0x0, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+faddp, 2, 0xdec0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatAcc, FloatReg }
+faddp, 1, 0xdec0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+// alias for faddp %st, %st(1)
+faddp, 0, 0xdec1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+faddp, 2, 0xdec0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg, FloatAcc }
+
+// subtract
+fsub, 1, 0xd8e0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+#if SYSV386_COMPAT
+fsub, 2, 0xd8e0, None, 0, ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+// alias for fsubp
+fsub, 0, 0xdee1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { 0 }
+#else
+fsub, 2, 0xd8e0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm|FloatD|FloatR, { FloatReg, FloatAcc }
+#endif
+fsub, 1, 0xd8, 0x4, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fisub, 1, 0xde, 0x4, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+#if SYSV386_COMPAT
+fsubp, 2, 0xdee0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatAcc, FloatReg }
+fsubp, 1, 0xdee0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fsubp, 0, 0xdee1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+#if OLDGCC_COMPAT
+fsubp, 2, 0xdee0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg, FloatAcc }
+#endif
+#else
+fsubp, 2, 0xdee8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm, { FloatAcc, FloatReg }
+fsubp, 1, 0xdee8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm, { FloatReg }
+fsubp, 0, 0xdee9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf, { 0 }
+#endif
+
+// subtract reverse
+fsubr, 1, 0xd8e8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+#if SYSV386_COMPAT
+fsubr, 2, 0xd8e8, None, 0, ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+// alias for fsubrp
+fsubr, 0, 0xdee9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { 0 }
+#else
+fsubr, 2, 0xd8e8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm|FloatD|FloatR, { FloatReg, FloatAcc }
+#endif
+fsubr, 1, 0xd8, 0x5, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fisubr, 1, 0xde, 0x5, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+#if SYSV386_COMPAT
+fsubrp, 2, 0xdee8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatAcc, FloatReg }
+fsubrp, 1, 0xdee8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fsubrp, 0, 0xdee9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+#if OLDGCC_COMPAT
+fsubrp, 2, 0xdee8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg, FloatAcc }
+#endif
+#else
+fsubrp, 2, 0xdee0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm, { FloatAcc, FloatReg }
+fsubrp, 1, 0xdee0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm, { FloatReg }
+fsubrp, 0, 0xdee1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf, { 0 }
+#endif
+
+// multiply
+fmul, 2, 0xd8c8, None, 0, ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fmul, 1, 0xd8c8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+#if SYSV386_COMPAT
+// alias for fmulp
+fmul, 0, 0xdec9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { 0 }
+#endif
+fmul, 1, 0xd8, 0x1, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fimul, 1, 0xde, 0x1, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+fmulp, 2, 0xdec8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatAcc, FloatReg }
+fmulp, 1, 0xdec8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fmulp, 0, 0xdec9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fmulp, 2, 0xdec8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg, FloatAcc }
+
+// divide
+fdiv, 1, 0xd8f0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+#if SYSV386_COMPAT
+fdiv, 2, 0xd8f0, None, 0, ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+// alias for fdivp
+fdiv, 0, 0xdef1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { 0 }
+#else
+fdiv, 2, 0xd8f0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm|FloatD|FloatR, { FloatReg, FloatAcc }
+#endif
+fdiv, 1, 0xd8, 0x6, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fidiv, 1, 0xde, 0x6, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+#if SYSV386_COMPAT
+fdivp, 2, 0xdef0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatAcc, FloatReg }
+fdivp, 1, 0xdef0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fdivp, 0, 0xdef1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+#if OLDGCC_COMPAT
+fdivp, 2, 0xdef0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg, FloatAcc }
+#endif
+#else
+fdivp, 2, 0xdef8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm, { FloatAcc, FloatReg }
+fdivp, 1, 0xdef8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm, { FloatReg }
+fdivp, 0, 0xdef9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf, { 0 }
+#endif
+
+// divide reverse
+fdivr, 1, 0xd8f8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+#if SYSV386_COMPAT
+fdivr, 2, 0xd8f8, None, 0, ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+// alias for fdivrp
+fdivr, 0, 0xdef9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { 0 }
+#else
+fdivr, 2, 0xd8f8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm|FloatD|FloatR, { FloatReg, FloatAcc }
+#endif
+fdivr, 1, 0xd8, 0x7, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fidivr, 1, 0xde, 0x7, 0, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+#if SYSV386_COMPAT
+fdivrp, 2, 0xdef8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatAcc, FloatReg }
+fdivrp, 1, 0xdef8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fdivrp, 0, 0xdef9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+#if OLDGCC_COMPAT
+fdivrp, 2, 0xdef8, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh, { FloatReg, FloatAcc }
+#endif
+#else
+fdivrp, 2, 0xdef0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm, { FloatAcc, FloatReg }
+fdivrp, 1, 0xdef0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm, { FloatReg }
+fdivrp, 0, 0xdef1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf, { 0 }
+#endif
+
+f2xm1, 0, 0xd9f0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fyl2x, 0, 0xd9f1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fptan, 0, 0xd9f2, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fpatan, 0, 0xd9f3, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fxtract, 0, 0xd9f4, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fprem1, 0, 0xd9f5, None, Cpu286, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fdecstp, 0, 0xd9f6, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fincstp, 0, 0xd9f7, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fprem, 0, 0xd9f8, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fyl2xp1, 0, 0xd9f9, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fsqrt, 0, 0xd9fa, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fsincos, 0, 0xd9fb, None, Cpu286, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+frndint, 0, 0xd9fc, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fscale, 0, 0xd9fd, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fsin, 0, 0xd9fe, None, Cpu286, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fcos, 0, 0xd9ff, None, Cpu286, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fchs, 0, 0xd9e0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fabs, 0, 0xd9e1, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// processor control
+fninit, 0, 0xdbe3, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+finit, 0, 0xdbe3, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait, { 0 }
+fldcw, 1, 0xd9, 0x5, 0, Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fnstcw, 1, 0xd9, 0x7, 0, Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fstcw, 1, 0xd9, 0x7, 0, Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+// XXX should reject %al, %eax, and %rax
+fnstsw, 1, 0xdfe0, None, 0, IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Acc }
+fnstsw, 1, 0xdd, 0x7, 0, Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fnstsw, 0, 0xdfe0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+// XXX should reject %al, %eax, and %rax
+fstsw, 1, 0xdfe0, None, 0, IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait, { Acc }
+fstsw, 1, 0xdd, 0x7, 0, Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fstsw, 0, 0xdfe0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait, { 0 }
+fnclex, 0, 0xdbe2, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fclex, 0, 0xdbe2, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait, { 0 }
+// Short forms of fldenv, fstenv use data size prefix.
+fnstenv, 1, 0xd9, 0x6, 0, Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fstenv, 1, 0xd9, 0x6, 0, Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf|FWait, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fldenv, 1, 0xd9, 0x4, 0, Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fnsave, 1, 0xdd, 0x6, 0, Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fsave, 1, 0xdd, 0x6, 0, Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf|FWait, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+frstor, 1, 0xdd, 0x4, 0, Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+ffree, 1, 0xddc0, None, 0, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+// P6:free st(i), pop st
+ffreep, 1, 0xdfc0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fnop, 0, 0xd9d0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fwait, 0, 0x9b, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// Opcode prefixes; we allow them as separate insns too.
+
+addr16, 0, 0x67, None, Cpu386|CpuNo64, Size16|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+addr32, 0, 0x67, None, Cpu386, Size32|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+aword, 0, 0x67, None, Cpu386|CpuNo64, Size16|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+adword, 0, 0x67, None, Cpu386, Size32|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+data16, 0, 0x66, None, Cpu386, Size16|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+data32, 0, 0x66, None, Cpu386|CpuNo64, Size32|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+word, 0, 0x66, None, Cpu386, Size16|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+dword, 0, 0x66, None, Cpu386|CpuNo64, Size32|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+lock, 0, 0xf0, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+wait, 0, 0x9b, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+cs, 0, 0x2e, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+ds, 0, 0x3e, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+es, 0, 0x26, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+fs, 0, 0x64, None, Cpu386, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+gs, 0, 0x65, None, Cpu386, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+ss, 0, 0x36, None, CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rep, 0, 0xf3, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+repe, 0, 0xf3, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+repz, 0, 0xf3, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+repne, 0, 0xf2, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+repnz, 0, 0xf2, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+ht, 0, 0x3e, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+hnt, 0, 0x2e, None, 0, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex, 0, 0x40, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rexz, 0, 0x41, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rexy, 0, 0x42, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rexyz, 0, 0x43, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rexx, 0, 0x44, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rexxz, 0, 0x45, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rexxy, 0, 0x46, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rexxyz, 0, 0x47, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex64, 0, 0x48, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex64z, 0, 0x49, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex64y, 0, 0x4a, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex64yz, 0, 0x4b, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex64x, 0, 0x4c, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex64xz, 0, 0x4d, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex64xy, 0, 0x4e, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex64xyz, 0, 0x4f, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.b, 0, 0x41, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.x, 0, 0x42, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.xb, 0, 0x43, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.r, 0, 0x44, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.rb, 0, 0x45, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.rx, 0, 0x46, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.rxb, 0, 0x47, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.w, 0, 0x48, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.wb, 0, 0x49, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.wx, 0, 0x4a, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.wxb, 0, 0x4b, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.wr, 0, 0x4c, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.wrb, 0, 0x4d, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.wrx, 0, 0x4e, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+rex.wrxb, 0, 0x4f, None, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix, { 0 }
+
+// 486 extensions.
+
+bswap, 1, 0xfc8, None, Cpu486, ShortForm|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { Reg32|Reg64 }
+xadd, 2, 0xfc0, None, Cpu486, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+cmpxchg, 2, 0xfb0, None, Cpu486, W|Modrm|No_sSuf|No_xSuf, { Reg8|Reg16|Reg32|Reg64, Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+invd, 0, 0xf08, None, Cpu486, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+wbinvd, 0, 0xf09, None, Cpu486, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+invlpg, 1, 0xf01, 0x7, Cpu486, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// 586 and late 486 extensions.
+cpuid, 0, 0xfa2, None, Cpu486, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// Pentium extensions.
+wrmsr, 0, 0xf30, None, Cpu586, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+rdtsc, 0, 0xf31, None, Cpu586, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+rdmsr, 0, 0xf32, None, Cpu586, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+cmpxchg8b, 1, 0xfc7, 0x1, Cpu586, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// Pentium II/Pentium Pro extensions.
+sysenter, 0, 0xf34, None, Cpu686, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+sysexit, 0, 0xf35, None, Cpu686, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fxsave, 1, 0xfae, 0x0, Cpu686, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fxrstor, 1, 0xfae, 0x1, Cpu686, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+rdpmc, 0, 0xf33, None, Cpu686, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+// official undefined instr.
+ud2, 0, 0xf0b, None, Cpu686, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+// alias for ud2
+ud2a, 0, 0xf0b, None, Cpu686, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+// 2nd. official undefined instr.
+ud2b, 0, 0xfb9, None, Cpu686, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+cmovo, 2, 0xf40, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovno, 2, 0xf41, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovb, 2, 0xf42, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovc, 2, 0xf42, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnae, 2, 0xf42, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovae, 2, 0xf43, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnc, 2, 0xf43, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnb, 2, 0xf43, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmove, 2, 0xf44, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovz, 2, 0xf44, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovne, 2, 0xf45, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnz, 2, 0xf45, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovbe, 2, 0xf46, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovna, 2, 0xf46, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmova, 2, 0xf47, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnbe, 2, 0xf47, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovs, 2, 0xf48, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovns, 2, 0xf49, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovp, 2, 0xf4a, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnp, 2, 0xf4b, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovl, 2, 0xf4c, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnge, 2, 0xf4c, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovge, 2, 0xf4d, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnl, 2, 0xf4d, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovle, 2, 0xf4e, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovng, 2, 0xf4e, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovg, 2, 0xf4f, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+cmovnle, 2, 0xf4f, None, Cpu686, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+
+fcmovb, 2, 0xdac0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovnae, 2, 0xdac0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmove, 2, 0xdac8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovbe, 2, 0xdad0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovna, 2, 0xdad0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovu, 2, 0xdad8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovae, 2, 0xdbc0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovnb, 2, 0xdbc0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovne, 2, 0xdbc8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmova, 2, 0xdbd0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovnbe, 2, 0xdbd0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcmovnu, 2, 0xdbd8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+
+fcomi, 2, 0xdbf0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcomi, 0, 0xdbf1, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fcomi, 1, 0xdbf0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fucomi, 2, 0xdbe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fucomi, 0, 0xdbe9, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fucomi, 1, 0xdbe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fcomip, 2, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcompi, 2, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fcompi, 0, 0xdff1, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fcompi, 1, 0xdff0, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+fucomip, 2, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fucompi, 2, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg, FloatAcc }
+fucompi, 0, 0xdfe9, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+fucompi, 1, 0xdfe8, None, Cpu686, ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { FloatReg }
+
+// Pentium4 extensions.
+
+movnti, 2, 0xfc3, None, CpuP4, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+clflush, 1, 0xfae, 0x7, CpuP4, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+lfence, 0, 0xfae, 0xe8, CpuP4, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+mfence, 0, 0xfae, 0xf0, CpuP4, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+pause, 0, 0xf390, None, CpuP4, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+
+// MMX/SSE2 instructions.
+
+emms, 0, 0xf77, None, CpuMMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+// These really shouldn't allow for Reg64 (movq is the right mnemonic for
+// copying between Reg64/Mem64 and RegXMM/RegMMX, as is mandated by Intel's
+// spec). AMD's spec, having been in existence for much longer, failed to
+// recognize that and specified movd for 32- and 64-bit operations.
+movd, 2, 0xf6e, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegMMX }
+movd, 2, 0xf7e, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegMMX, Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movd, 2, 0x660f6e, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+movd, 2, 0x660f7e, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+// In the 64bit mode the short form mov immediate is redefined to have
+// 64bit displacement value.
+movq, 2, 0xf6f, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+movq, 2, 0xf7f, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { RegMMX, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX }
+movq, 2, 0xf30f7e, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movq, 2, 0x660fd6, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+movq, 2, 0xf6e, None, Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegMMX }
+movq, 2, 0xf7e, None, Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegMMX, Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movq, 2, 0x660f6e, None, Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+movq, 2, 0x660f7e, None, Cpu64, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+// We put the 64bit displacement first and we only mark constants
+// larger than 32bit as Disp64.
+movq, 2, 0xa0, None, Cpu64, D|W|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Disp64, Acc }
+movq, 2, 0x88, None, Cpu64, D|W|Modrm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg64, Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movq, 2, 0xc6, 0x0, Cpu64, W|Modrm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm32S, Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movq, 2, 0xb0, None, Cpu64, W|ShortForm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm64, Reg64 }
+// The segment register moves accept Reg64 so that a segment register
+// can be copied to a 64 bit register, and vice versa.
+movq, 2, 0x8c, None, Cpu64, Modrm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { SReg2|SReg3, Reg64|RegMem }
+movq, 2, 0x8e, None, Cpu64, Modrm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg64, SReg2|SReg3 }
+// Move to/from control debug registers. In the 16 or 32bit modes they
+// are 32bit. In the 64bit mode they are 64bit.
+movq, 2, 0xf20, None, Cpu64, D|Modrm|Size64|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { Control, Reg64|RegMem }
+movq, 2, 0xf21, None, Cpu64, D|Modrm|Size64|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { Debug, Reg64|RegMem }
+// Real MMX instructions.
+packssdw, 2, 0xf6b, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+packssdw, 2, 0x660f6b, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+packsswb, 2, 0xf63, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+packsswb, 2, 0x660f63, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+packuswb, 2, 0xf67, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+packuswb, 2, 0x660f67, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+paddb, 2, 0xffc, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+paddb, 2, 0x660ffc, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+paddw, 2, 0xffd, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+paddw, 2, 0x660ffd, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+paddd, 2, 0xffe, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+paddd, 2, 0x660ffe, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+paddq, 2, 0xfd4, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+paddq, 2, 0x660fd4, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+paddsb, 2, 0xfec, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+paddsb, 2, 0x660fec, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+paddsw, 2, 0xfed, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+paddsw, 2, 0x660fed, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+paddusb, 2, 0xfdc, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+paddusb, 2, 0x660fdc, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+paddusw, 2, 0xfdd, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+paddusw, 2, 0x660fdd, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pand, 2, 0xfdb, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pand, 2, 0x660fdb, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pandn, 2, 0xfdf, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pandn, 2, 0x660fdf, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpeqb, 2, 0xf74, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pcmpeqb, 2, 0x660f74, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpeqw, 2, 0xf75, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pcmpeqw, 2, 0x660f75, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpeqd, 2, 0xf76, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pcmpeqd, 2, 0x660f76, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpgtb, 2, 0xf64, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pcmpgtb, 2, 0x660f64, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpgtw, 2, 0xf65, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pcmpgtw, 2, 0x660f65, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpgtd, 2, 0xf66, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pcmpgtd, 2, 0x660f66, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmaddwd, 2, 0xff5, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmaddwd, 2, 0x660ff5, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmulhw, 2, 0xfe5, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmulhw, 2, 0x660fe5, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmullw, 2, 0xfd5, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmullw, 2, 0x660fd5, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+por, 2, 0xfeb, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+por, 2, 0x660feb, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psllw, 2, 0xff1, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psllw, 2, 0x660ff1, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psllw, 2, 0xf71, 0x6, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegMMX }
+psllw, 2, 0x660f71, 0x6, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+pslld, 2, 0xff2, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pslld, 2, 0x660ff2, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pslld, 2, 0xf72, 0x6, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegMMX }
+pslld, 2, 0x660f72, 0x6, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+psllq, 2, 0xff3, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psllq, 2, 0x660ff3, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psllq, 2, 0xf73, 0x6, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegMMX }
+psllq, 2, 0x660f73, 0x6, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+psraw, 2, 0xfe1, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psraw, 2, 0x660fe1, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psraw, 2, 0xf71, 0x4, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegMMX }
+psraw, 2, 0x660f71, 0x4, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+psrad, 2, 0xfe2, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psrad, 2, 0x660fe2, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psrad, 2, 0xf72, 0x4, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegMMX }
+psrad, 2, 0x660f72, 0x4, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+psrlw, 2, 0xfd1, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psrlw, 2, 0x660fd1, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psrlw, 2, 0xf71, 0x2, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegMMX }
+psrlw, 2, 0x660f71, 0x2, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+psrld, 2, 0xfd2, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psrld, 2, 0x660fd2, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psrld, 2, 0xf72, 0x2, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegMMX }
+psrld, 2, 0x660f72, 0x2, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+psrlq, 2, 0xfd3, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psrlq, 2, 0x660fd3, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psrlq, 2, 0xf73, 0x2, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegMMX }
+psrlq, 2, 0x660f73, 0x2, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+psubb, 2, 0xff8, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psubb, 2, 0x660ff8, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psubw, 2, 0xff9, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psubw, 2, 0x660ff9, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psubd, 2, 0xffa, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psubd, 2, 0x660ffa, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psubq, 2, 0xffb, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psubq, 2, 0x660ffb, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psubsb, 2, 0xfe8, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psubsb, 2, 0x660fe8, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psubsw, 2, 0xfe9, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psubsw, 2, 0x660fe9, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psubusb, 2, 0xfd8, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psubusb, 2, 0x660fd8, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psubusw, 2, 0xfd9, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psubusw, 2, 0x660fd9, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+punpckhbw, 2, 0xf68, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+punpckhbw, 2, 0x660f68, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+punpckhwd, 2, 0xf69, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+punpckhwd, 2, 0x660f69, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+punpckhdq, 2, 0xf6a, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+punpckhdq, 2, 0x660f6a, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+punpcklbw, 2, 0xf60, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+punpcklbw, 2, 0x660f60, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+punpcklwd, 2, 0xf61, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+punpcklwd, 2, 0x660f61, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+punpckldq, 2, 0xf62, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+punpckldq, 2, 0x660f62, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pxor, 2, 0xfef, None, CpuMMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pxor, 2, 0x660fef, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+
+// PIII Katmai New Instructions / SIMD instructions.
+
+addps, 2, 0xf58, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+addss, 2, 0xf30f58, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+andnps, 2, 0xf55, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+andps, 2, 0xf54, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpeqps, 2, 0xfc2, 0x0, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpeqss, 2, 0xf30fc2, 0x0, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpleps, 2, 0xfc2, 0x2, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpless, 2, 0xf30fc2, 0x2, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpltps, 2, 0xfc2, 0x1, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpltss, 2, 0xf30fc2, 0x1, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpneqps, 2, 0xfc2, 0x4, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpneqss, 2, 0xf30fc2, 0x4, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpnleps, 2, 0xfc2, 0x6, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpnless, 2, 0xf30fc2, 0x6, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpnltps, 2, 0xfc2, 0x5, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpnltss, 2, 0xf30fc2, 0x5, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpordps, 2, 0xfc2, 0x7, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpordss, 2, 0xf30fc2, 0x7, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpunordps, 2, 0xfc2, 0x3, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpunordss, 2, 0xf30fc2, 0x3, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpps, 3, 0xfc2, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpss, 3, 0xf30fc2, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+comiss, 2, 0xf2f, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtpi2ps, 2, 0xf2a, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegXMM }
+cvtps2pi, 2, 0xf2d, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegMMX }
+cvtsi2ss, 2, 0xf30f2a, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+cvtss2si, 2, 0xf30f2d, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, Reg32|Reg64 }
+cvttps2pi, 2, 0xf2c, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegMMX }
+cvttss2si, 2, 0xf30f2c, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, Reg32|Reg64 }
+divps, 2, 0xf5e, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+divss, 2, 0xf30f5e, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+ldmxcsr, 1, 0xfae, 0x2, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+maskmovq, 2, 0xff7, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegMMX, RegMMX }
+maxps, 2, 0xf5f, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+maxss, 2, 0xf30f5f, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+minps, 2, 0xf5d, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+minss, 2, 0xf30f5d, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movaps, 2, 0xf28, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movaps, 2, 0xf29, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+movhlps, 2, 0xf12, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, RegXMM }
+movhps, 2, 0xf16, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+movhps, 2, 0xf17, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movlhps, 2, 0xf16, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, RegXMM }
+movlps, 2, 0xf12, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+movlps, 2, 0xf13, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movmskps, 2, 0xf50, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { RegXMM, Reg32|Reg64 }
+movntps, 2, 0xf2b, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movntq, 2, 0xfe7, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegMMX, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movntdq, 2, 0x660fe7, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movss, 2, 0xf30f10, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movss, 2, 0xf30f11, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+movups, 2, 0xf10, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movups, 2, 0xf11, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+mulps, 2, 0xf59, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+mulss, 2, 0xf30f59, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+orps, 2, 0xf56, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pavgb, 2, 0xfe0, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pavgb, 2, 0x660fe0, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pavgw, 2, 0xfe3, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pavgw, 2, 0x660fe3, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pextrw, 3, 0xfc5, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { Imm8, RegMMX, Reg32|Reg64 }
+pextrw, 3, 0x660fc5, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { Imm8, RegXMM, Reg32|Reg64 }
+
+// Streaming SIMD extensions 4.1 Instructions.
+pextrw, 3, 0x660f3a15, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM, Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+pinsrw, 3, 0xfc4, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { Imm8, Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegMMX }
+pinsrw, 3, 0x660fc4, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { Imm8, Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+pmaxsw, 2, 0xfee, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmaxsw, 2, 0x660fee, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmaxub, 2, 0xfde, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmaxub, 2, 0x660fde, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pminsw, 2, 0xfea, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pminsw, 2, 0x660fea, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pminub, 2, 0xfda, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pminub, 2, 0x660fda, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovmskb, 2, 0xfd7, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { RegMMX, Reg32|Reg64 }
+pmovmskb, 2, 0x660fd7, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { RegXMM, Reg32|Reg64 }
+pmulhuw, 2, 0xfe4, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmulhuw, 2, 0x660fe4, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+prefetchnta, 1, 0xf18, 0x0, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+prefetcht0, 1, 0xf18, 0x1, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+prefetcht1, 1, 0xf18, 0x2, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+prefetcht2, 1, 0xf18, 0x3, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+psadbw, 2, 0xff6, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psadbw, 2, 0x660ff6, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pshufw, 3, 0xf70, None, CpuMMX2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+rcpps, 2, 0xf53, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+rcpss, 2, 0xf30f53, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+rsqrtps, 2, 0xf52, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+rsqrtss, 2, 0xf30f52, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+sfence, 0, 0xfae, 0xf8, CpuMMX2, IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+shufps, 3, 0xfc6, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+sqrtps, 2, 0xf51, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+sqrtss, 2, 0xf30f51, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+stmxcsr, 1, 0xfae, 0x3, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+subps, 2, 0xf5c, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+subss, 2, 0xf30f5c, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+ucomiss, 2, 0xf2e, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+unpckhps, 2, 0xf15, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+unpcklps, 2, 0xf14, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+xorps, 2, 0xf57, None, CpuSSE, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+
+// SSE-2 instructions.
+
+addpd, 2, 0x660f58, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+addsd, 2, 0xf20f58, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+andnpd, 2, 0x660f55, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+andpd, 2, 0x660f54, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpeqpd, 2, 0x660fc2, 0x0, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpeqsd, 2, 0xf20fc2, 0x0, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmplepd, 2, 0x660fc2, 0x2, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmplesd, 2, 0xf20fc2, 0x2, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpltpd, 2, 0x660fc2, 0x1, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpltsd, 2, 0xf20fc2, 0x1, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpneqpd, 2, 0x660fc2, 0x4, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpneqsd, 2, 0xf20fc2, 0x4, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpnlepd, 2, 0x660fc2, 0x6, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpnlesd, 2, 0xf20fc2, 0x6, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpnltpd, 2, 0x660fc2, 0x5, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpnltsd, 2, 0xf20fc2, 0x5, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpordpd, 2, 0x660fc2, 0x7, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpordsd, 2, 0xf20fc2, 0x7, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpunordpd, 2, 0x660fc2, 0x3, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpunordsd, 2, 0xf20fc2, 0x3, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmppd, 3, 0x660fc2, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+// Intel mode string compare.
+cmpsd, 0, 0xa7, None, 0, Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString, { 0 }
+cmpsd, 2, 0xa7, None, 0, Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+cmpsd, 3, 0xf20fc2, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+comisd, 2, 0x660f2f, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtpi2pd, 2, 0x660f2a, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegXMM }
+cvtsi2sd, 2, 0xf20f2a, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+divpd, 2, 0x660f5e, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+divsd, 2, 0xf20f5e, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+maxpd, 2, 0x660f5f, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+maxsd, 2, 0xf20f5f, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+minpd, 2, 0x660f5d, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+minsd, 2, 0xf20f5d, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movapd, 2, 0x660f28, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movapd, 2, 0x660f29, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+movhpd, 2, 0x660f16, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+movhpd, 2, 0x660f17, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movlpd, 2, 0x660f12, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+movlpd, 2, 0x660f13, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movmskpd, 2, 0x660f50, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { RegXMM, Reg32|Reg64 }
+movntpd, 2, 0x660f2b, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+// Intel mode string move.
+movsd, 0, 0xa5, None, 0, Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString, { 0 }
+movsd, 2, 0xa5, None, 0, Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg }
+movsd, 2, 0xf20f10, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movsd, 2, 0xf20f11, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+movupd, 2, 0x660f10, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movupd, 2, 0x660f11, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+mulpd, 2, 0x660f59, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+mulsd, 2, 0xf20f59, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+orpd, 2, 0x660f56, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+shufpd, 3, 0x660fc6, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+sqrtpd, 2, 0x660f51, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+sqrtsd, 2, 0xf20f51, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+subpd, 2, 0x660f5c, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+subsd, 2, 0xf20f5c, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+ucomisd, 2, 0x660f2e, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+unpckhpd, 2, 0x660f15, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+unpcklpd, 2, 0x660f14, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+xorpd, 2, 0x660f57, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtdq2pd, 2, 0xf30fe6, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtpd2dq, 2, 0xf20fe6, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtdq2ps, 2, 0xf5b, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtpd2pi, 2, 0x660f2d, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegMMX }
+cvtpd2ps, 2, 0x660f5a, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtps2pd, 2, 0xf5a, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtps2dq, 2, 0x660f5b, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtsd2si, 2, 0xf20f2d, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, Reg32|Reg64 }
+cvtsd2ss, 2, 0xf20f5a, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvtss2sd, 2, 0xf30f5a, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvttpd2pi, 2, 0x660f2c, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegMMX }
+cvttsd2si, 2, 0xf20f2c, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, Reg32|Reg64 }
+cvttpd2dq, 2, 0x660fe6, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cvttps2dq, 2, 0xf30f5b, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+maskmovdqu, 2, 0x660ff7, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, RegXMM }
+movdqa, 2, 0x660f6f, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movdqa, 2, 0x660f7f, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+movdqu, 2, 0xf30f6f, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movdqu, 2, 0xf30f7f, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM }
+movdq2q, 2, 0xf20fd6, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, RegMMX }
+movq2dq, 2, 0xf30fd6, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegMMX, RegXMM }
+pmuludq, 2, 0xff4, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmuludq, 2, 0x660ff4, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pshufd, 3, 0x660f70, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pshufhw, 3, 0xf30f70, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pshuflw, 3, 0xf20f70, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pslldq, 2, 0x660f73, 0x7, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+psrldq, 2, 0x660f73, 0x3, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM }
+punpckhqdq, 2, 0x660f6d, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+punpcklqdq, 2, 0x660f6c, None, CpuSSE2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+
+// SSE-3 instructions.
+
+addsubpd, 2, 0x660fd0, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+addsubps, 2, 0xf20fd0, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+cmpxchg16b, 1, 0xfc7, 0x1, CpuSSE3|Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fisttp, 1, 0xdf, 0x1, CpuSSE3, Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fisttp, 1, 0xdd, 0x1, CpuSSE3, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+fisttpll, 1, 0xdd, 0x1, CpuSSE3, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+haddpd, 2, 0x660f7c, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+haddps, 2, 0xf20f7c, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+hsubpd, 2, 0x660f7d, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+hsubps, 2, 0xf20f7d, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+lddqu, 2, 0xf20ff0, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+monitor, 0, 0xf01, 0xc8, CpuSSE3, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+// monitor is very special. CX and DX are always 64bits with zero upper
+// 32bits in 64bit mode, and 32bits in 16bit and 32bit modes. The
+// address size override prefix can be used to overrride the AX size in
+// all modes.
+// Need to ensure only "monitor %eax/%ax,%ecx,%edx" is accepted.
+monitor, 3, 0xf01, 0xc8, CpuSSE3|CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { Reg16|Reg32, Reg32, Reg32 }
+// Need to ensure only "monitor %rax/%eax,%rcx,%rdx" is accepted.
+monitor, 3, 0xf01, 0xc8, CpuSSE3|Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt|NoRex64, { Reg32|Reg64, Reg64, Reg64 }
+movddup, 2, 0xf20f12, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movshdup, 2, 0xf30f16, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movsldup, 2, 0xf30f12, None, CpuSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+mwait, 0, 0xf01, 0xc9, CpuSSE3, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+// mwait is very special. AX and CX are always 64bits with zero upper
+// 32bits in 64bit mode, and 32bits in 16bit and 32bit modes.
+// Need to ensure only "mwait %eax,%ecx" is accepted.
+mwait, 2, 0xf01, 0xc9, CpuSSE3|CpuNo64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { Reg32, Reg32 }
+// Need to ensure only "mwait %rax,%rcx" is accepted.
+mwait, 2, 0xf01, 0xc9, CpuSSE3|Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt|NoRex64, { Reg64, Reg64 }
+
+// VMX instructions.
+vmcall, 0, 0xf01, 0xc1, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmclear, 1, 0x660fc7, 0x6, CpuVMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+vmlaunch, 0, 0xf01, 0xc2, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmresume, 0, 0xf01, 0xc3, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmptrld, 1, 0xfc7, 0x6, CpuVMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+vmptrst, 1, 0xfc7, 0x7, CpuVMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+vmread, 2, 0xf78, None, CpuVMX|CpuNo64, Modrm|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf, { Reg32, Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+vmread, 2, 0xf78, None, CpuVMX|Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Reg64, Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+vmwrite, 2, 0xf79, None, CpuVMX|CpuNo64, Modrm|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf, { Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+vmwrite, 2, 0xf79, None, CpuVMX|Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64, { Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+vmxoff, 0, 0xf01, 0xc4, CpuVMX, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmxon, 1, 0xf30fc7, 0x6, CpuVMX, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+// Supplemental Streaming SIMD extensions 3 Instructions.
+
+phaddw, 2, 0xf3801, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+phaddw, 2, 0x660f3801, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+phaddd, 2, 0xf3802, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+phaddd, 2, 0x660f3802, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+phaddsw, 2, 0xf3803, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+phaddsw, 2, 0x660f3803, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+phsubw, 2, 0xf3805, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+phsubw, 2, 0x660f3805, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+phsubd, 2, 0xf3806, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+phsubd, 2, 0x660f3806, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+phsubsw, 2, 0xf3807, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+phsubsw, 2, 0x660f3807, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmaddubsw, 2, 0xf3804, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmaddubsw, 2, 0x660f3804, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmulhrsw, 2, 0xf380b, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmulhrsw, 2, 0x660f380b, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pshufb, 2, 0xf3800, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pshufb, 2, 0x660f3800, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psignb, 2, 0xf3808, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psignb, 2, 0x660f3808, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psignw, 2, 0xf3809, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psignw, 2, 0x660f3809, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+psignd, 2, 0xf380a, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+psignd, 2, 0x660f380a, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+palignr, 3, 0xf3a0f, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+palignr, 3, 0x660f3a0f, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pabsb, 2, 0xf381c, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pabsb, 2, 0x660f381c, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pabsw, 2, 0xf381d, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pabsw, 2, 0x660f381d, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pabsd, 2, 0xf381e, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pabsd, 2, 0x660f381e, None, CpuSSSE3, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+
+// Streaming SIMD extensions 4.1 Instructions.
+
+blendpd, 3, 0x660f3a0d, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+blendps, 3, 0x660f3a0c, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+blendvpd, 3, 0x660f3815, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|RegKludge, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+blendvps, 3, 0x660f3814, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|RegKludge, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+dppd, 3, 0x660f3a41, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+dpps, 3, 0x660f3a40, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+extractps, 3, 0x660f3a17, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM, Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+insertps, 3, 0x660f3a21, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+movntdqa, 2, 0x660f382a, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+mpsadbw, 3, 0x660f3a42, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+packusdw, 2, 0x660f382b, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pblendvb, 3, 0x660f3810, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|RegKludge, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pblendw, 3, 0x660f3a0e, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpeqq, 2, 0x660f3829, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pextrb, 3, 0x660f3a14, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM, Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+pextrd, 3, 0x660f3a16, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM, Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+pextrq, 3, 0x660f3a16, None, CpuSSE4_1|Cpu64, Modrm|Size64|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, RegXMM, Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+phminposuw, 2, 0x660f3841, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pinsrb, 3, 0x660f3a20, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+pinsrd, 3, 0x660f3a22, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+pinsrq, 3, 0x660f3a22, None, CpuSSE4_1|Cpu64, Modrm|Size64|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, RegXMM }
+pmaxsb, 2, 0x660f383c, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmaxsd, 2, 0x660f383d, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmaxud, 2, 0x660f383f, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmaxuw, 2, 0x660f383e, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pminsb, 2, 0x660f3838, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pminsd, 2, 0x660f3839, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pminud, 2, 0x660f383b, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pminuw, 2, 0x660f383a, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovsxbw, 2, 0x660f3820, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovsxbd, 2, 0x660f3821, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovsxbq, 2, 0x660f3822, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovsxwd, 2, 0x660f3823, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovsxwq, 2, 0x660f3824, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovsxdq, 2, 0x660f3825, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovzxbw, 2, 0x660f3830, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovzxbd, 2, 0x660f3831, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovzxbq, 2, 0x660f3832, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovzxwd, 2, 0x660f3833, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovzxwq, 2, 0x660f3834, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmovzxdq, 2, 0x660f3835, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmuldq, 2, 0x660f3828, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pmulld, 2, 0x660f3840, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+ptest, 2, 0x660f3817, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+roundpd, 3, 0x660f3a09, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+roundps, 3, 0x660f3a08, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+roundsd, 3, 0x660f3a0b, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+roundss, 3, 0x660f3a0a, None, CpuSSE4_1, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+
+// Streaming SIMD extensions 4.2 Instructions.
+
+pcmpgtq, 2, 0x660f3837, None, CpuSSE4_2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpestri, 3, 0x660f3a61, None, CpuSSE4_2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpestrm, 3, 0x660f3a60, None, CpuSSE4_2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpistri, 3, 0x660f3a63, None, CpuSSE4_2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+pcmpistrm, 3, 0x660f3a62, None, CpuSSE4_2, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM, RegXMM }
+// We put non-8bit version before 8bit so that crc32 with memory operand
+// defaults to non-8bit.
+crc32, 2, 0xf20f38f1, None, CpuSSE4_2, Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf, { Reg16|Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+crc32, 2, 0xf20f38f1, None, CpuSSE4_2|Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|Rex64, { Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+crc32, 2, 0xf20f38f0, None, CpuSSE4_2, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+crc32, 2, 0xf20f38f0, None, CpuSSE4_2|Cpu64, Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64, { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg64 }
+
+// AMD 3DNow! instructions.
+
+prefetch, 1, 0xf0d, 0x0, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+prefetchw, 1, 0xf0d, 0x1, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+femms, 0, 0xf0e, None, Cpu3dnow, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+pavgusb, 2, 0xf0f, 0xbf, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pf2id, 2, 0xf0f, 0x1d, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pf2iw, 2, 0xf0f, 0x1c, Cpu3dnowA, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfacc, 2, 0xf0f, 0xae, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfadd, 2, 0xf0f, 0x9e, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfcmpeq, 2, 0xf0f, 0xb0, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfcmpge, 2, 0xf0f, 0x90, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfcmpgt, 2, 0xf0f, 0xa0, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfmax, 2, 0xf0f, 0xa4, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfmin, 2, 0xf0f, 0x94, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfmul, 2, 0xf0f, 0xb4, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfnacc, 2, 0xf0f, 0x8a, Cpu3dnowA, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfpnacc, 2, 0xf0f, 0x8e, Cpu3dnowA, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfrcp, 2, 0xf0f, 0x96, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfrcpit1, 2, 0xf0f, 0xa6, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfrcpit2, 2, 0xf0f, 0xb6, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfrsqit1, 2, 0xf0f, 0xa7, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfrsqrt, 2, 0xf0f, 0x97, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfsub, 2, 0xf0f, 0x9a, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pfsubr, 2, 0xf0f, 0xaa, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pi2fd, 2, 0xf0f, 0xd, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pi2fw, 2, 0xf0f, 0xc, Cpu3dnowA, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pmulhrw, 2, 0xf0f, 0xb7, Cpu3dnow, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+pswapd, 2, 0xf0f, 0xbb, Cpu3dnowA, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX, RegMMX }
+
+// AMD extensions.
+syscall, 0, 0xf05, None, CpuK6, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { 0 }
+sysret, 0, 0xf07, None, CpuK6, DefaultSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf, { 0 }
+swapgs, 0, 0xf01, 0xf8, Cpu64, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+rdtscp, 0, 0xf01, 0xf9, CpuSledgehammer, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+
+// AMD Pacifica additions.
+clgi, 0, 0xf01, 0xdd, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+invlpga, 0, 0xf01, 0xdf, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+// Need to ensure only "invlpga ...,%ecx" is accepted.
+invlpga, 2, 0xf01, 0xdf, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg32 }
+skinit, 0, 0xf01, 0xde, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+skinit, 1, 0xf01, 0xde, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+stgi, 0, 0xf01, 0xdc, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmload, 0, 0xf01, 0xda, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmload, 1, 0xf01, 0xda, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+vmmcall, 0, 0xf01, 0xd9, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmrun, 0, 0xf01, 0xd8, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmrun, 1, 0xf01, 0xd8, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+vmsave, 0, 0xf01, 0xdb, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { 0 }
+vmsave, 1, 0xf01, 0xdb, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt, { BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+
+
+// SSE4a instructions
+movntsd, 2, 0xf20f2b, None, CpuSSE4a, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+movntss, 2, 0xf30f2b, None, CpuSSE4a, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+extrq, 3, 0x660f78, 0x0, CpuSSE4a, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, Imm8, RegXMM }
+extrq, 2, 0x660f79, None, CpuSSE4a, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, RegXMM }
+insertq, 2, 0xf20f79, None, CpuSSE4a, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { RegXMM, RegXMM }
+insertq, 4, 0xf20f78, None, CpuSSE4a, Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf, { Imm8, Imm8, RegXMM, RegXMM }
+
+// ABM instructions
+popcnt, 2, 0xf30fb8, None, CpuABM|CpuSSE4_2, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+lzcnt, 2, 0xf30fbd, None, CpuABM, Modrm|No_bSuf|No_sSuf|No_xSuf, { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S, Reg16|Reg32|Reg64 }
+
+
+// VIA PadLock extensions.
+xstore-rng, 0, 0xfa7, 0xc0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcrypt-ecb, 0, 0xf30fa7, 0xc8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcrypt-cbc, 0, 0xf30fa7, 0xd0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcrypt-ctr, 0, 0xf30fa7, 0xd8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcrypt-cfb, 0, 0xf30fa7, 0xe0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcrypt-ofb, 0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+montmul, 0, 0xf30fa6, 0xc0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xsha1, 0, 0xf30fa6, 0xc8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xsha256, 0, 0xf30fa6, 0xd0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+// Aliases without hyphens.
+xstorerng, 0, 0xfa7, 0xc0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcryptecb, 0, 0xf30fa7, 0xc8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcryptcbc, 0, 0xf30fa7, 0xd0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcryptctr, 0, 0xf30fa7, 0xd8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcryptcfb, 0, 0xf30fa7, 0xe0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+xcryptofb, 0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
+// Alias for xstore-rng.
+xstore, 0, 0xfa7, 0xc0, Cpu686|CpuPadLock, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt, { 0 }
diff --git a/contrib/binutils/opcodes/i386-reg.tbl b/contrib/binutils/opcodes/i386-reg.tbl
new file mode 100644
index 0000000..7240a10
--- /dev/null
+++ b/contrib/binutils/opcodes/i386-reg.tbl
@@ -0,0 +1,182 @@
+// i386 register table.
+
+// Make %st first as we test for it.
+st, FloatReg|FloatAcc, 0, 0
+// 8 bit regs
+al, Reg8|Acc, 0, 0
+cl, Reg8|ShiftCount, 0, 1
+dl, Reg8, 0, 2
+bl, Reg8, 0, 3
+ah, Reg8, 0, 4
+ch, Reg8, 0, 5
+dh, Reg8, 0, 6
+bh, Reg8, 0, 7
+axl, Reg8|Acc, RegRex64, 0
+cxl, Reg8, RegRex64, 1
+dxl, Reg8, RegRex64, 2
+bxl, Reg8, RegRex64, 3
+spl, Reg8, RegRex64, 4
+bpl, Reg8, RegRex64, 5
+sil, Reg8, RegRex64, 6
+dil, Reg8, RegRex64, 7
+r8b, Reg8, RegRex|RegRex64, 0
+r9b, Reg8, RegRex|RegRex64, 1
+r10b, Reg8, RegRex|RegRex64, 2
+r11b, Reg8, RegRex|RegRex64, 3
+r12b, Reg8, RegRex|RegRex64, 4
+r13b, Reg8, RegRex|RegRex64, 5
+r14b, Reg8, RegRex|RegRex64, 6
+r15b, Reg8, RegRex|RegRex64, 7
+// 16 bit regs
+ax, Reg16|Acc, 0, 0
+cx, Reg16, 0, 1
+dx, Reg16|InOutPortReg, 0, 2
+bx, Reg16|BaseIndex, 0, 3
+sp, Reg16, 0, 4
+bp, Reg16|BaseIndex, 0, 5
+si, Reg16|BaseIndex, 0, 6
+di, Reg16|BaseIndex, 0, 7
+r8w, Reg16, RegRex, 0
+r9w, Reg16, RegRex, 1
+r10w, Reg16, RegRex, 2
+r11w, Reg16, RegRex, 3
+r12w, Reg16, RegRex, 4
+r13w, Reg16, RegRex, 5
+r14w, Reg16, RegRex, 6
+r15w, Reg16, RegRex, 7
+// 32 bit regs
+eax, Reg32|BaseIndex|Acc, 0, 0
+ecx, Reg32|BaseIndex, 0, 1
+edx, Reg32|BaseIndex, 0, 2
+ebx, Reg32|BaseIndex, 0, 3
+esp, Reg32, 0, 4
+ebp, Reg32|BaseIndex, 0, 5
+esi, Reg32|BaseIndex, 0, 6
+edi, Reg32|BaseIndex, 0, 7
+r8d, Reg32|BaseIndex, RegRex, 0
+r9d, Reg32|BaseIndex, RegRex, 1
+r10d, Reg32|BaseIndex, RegRex, 2
+r11d, Reg32|BaseIndex, RegRex, 3
+r12d, Reg32|BaseIndex, RegRex, 4
+r13d, Reg32|BaseIndex, RegRex, 5
+r14d, Reg32|BaseIndex, RegRex, 6
+r15d, Reg32|BaseIndex, RegRex, 7
+rax, Reg64|BaseIndex|Acc, 0, 0
+rcx, Reg64|BaseIndex, 0, 1
+rdx, Reg64|BaseIndex, 0, 2
+rbx, Reg64|BaseIndex, 0, 3
+rsp, Reg64, 0, 4
+rbp, Reg64|BaseIndex, 0, 5
+rsi, Reg64|BaseIndex, 0, 6
+rdi, Reg64|BaseIndex, 0, 7
+r8, Reg64|BaseIndex, RegRex, 0
+r9, Reg64|BaseIndex, RegRex, 1
+r10, Reg64|BaseIndex, RegRex, 2
+r11, Reg64|BaseIndex, RegRex, 3
+r12, Reg64|BaseIndex, RegRex, 4
+r13, Reg64|BaseIndex, RegRex, 5
+r14, Reg64|BaseIndex, RegRex, 6
+r15, Reg64|BaseIndex, RegRex, 7
+// Segment registers.
+es, SReg2, 0, 0
+cs, SReg2, 0, 1
+ss, SReg2, 0, 2
+ds, SReg2, 0, 3
+fs, SReg3, 0, 4
+gs, SReg3, 0, 5
+// Control registers.
+cr0, Control, 0, 0
+cr1, Control, 0, 1
+cr2, Control, 0, 2
+cr3, Control, 0, 3
+cr4, Control, 0, 4
+cr5, Control, 0, 5
+cr6, Control, 0, 6
+cr7, Control, 0, 7
+cr8, Control, RegRex, 0
+cr9, Control, RegRex, 1
+cr10, Control, RegRex, 2
+cr11, Control, RegRex, 3
+cr12, Control, RegRex, 4
+cr13, Control, RegRex, 5
+cr14, Control, RegRex, 6
+cr15, Control, RegRex, 7
+// Debug registers.
+db0, Debug, 0, 0
+db1, Debug, 0, 1
+db2, Debug, 0, 2
+db3, Debug, 0, 3
+db4, Debug, 0, 4
+db5, Debug, 0, 5
+db6, Debug, 0, 6
+db7, Debug, 0, 7
+db8, Debug, RegRex, 0
+db9, Debug, RegRex, 1
+db10, Debug, RegRex, 2
+db11, Debug, RegRex, 3
+db12, Debug, RegRex, 4
+db13, Debug, RegRex, 5
+db14, Debug, RegRex, 6
+db15, Debug, RegRex, 7
+dr0, Debug, 0, 0
+dr1, Debug, 0, 1
+dr2, Debug, 0, 2
+dr3, Debug, 0, 3
+dr4, Debug, 0, 4
+dr5, Debug, 0, 5
+dr6, Debug, 0, 6
+dr7, Debug, 0, 7
+dr8, Debug, RegRex, 0
+dr9, Debug, RegRex, 1
+dr10, Debug, RegRex, 2
+dr11, Debug, RegRex, 3
+dr12, Debug, RegRex, 4
+dr13, Debug, RegRex, 5
+dr14, Debug, RegRex, 6
+dr15, Debug, RegRex, 7
+// Test registers.
+tr0, Test, 0, 0
+tr1, Test, 0, 1
+tr2, Test, 0, 2
+tr3, Test, 0, 3
+tr4, Test, 0, 4
+tr5, Test, 0, 5
+tr6, Test, 0, 6
+tr7, Test, 0, 7
+// MMX and simd registers.
+mm0, RegMMX, 0, 0
+mm1, RegMMX, 0, 1
+mm2, RegMMX, 0, 2
+mm3, RegMMX, 0, 3
+mm4, RegMMX, 0, 4
+mm5, RegMMX, 0, 5
+mm6, RegMMX, 0, 6
+mm7, RegMMX, 0, 7
+xmm0, RegXMM, 0, 0
+xmm1, RegXMM, 0, 1
+xmm2, RegXMM, 0, 2
+xmm3, RegXMM, 0, 3
+xmm4, RegXMM, 0, 4
+xmm5, RegXMM, 0, 5
+xmm6, RegXMM, 0, 6
+xmm7, RegXMM, 0, 7
+xmm8, RegXMM, RegRex, 0
+xmm9, RegXMM, RegRex, 1
+xmm10, RegXMM, RegRex, 2
+xmm11, RegXMM, RegRex, 3
+xmm12, RegXMM, RegRex, 4
+xmm13, RegXMM, RegRex, 5
+xmm14, RegXMM, RegRex, 6
+xmm15, RegXMM, RegRex, 7
+// No type will make this register rejected for all purposes except
+// for addressing. This saves creating one extra type for RIP.
+rip, BaseIndex, 0, 0
+// fp regs.
+st(0), FloatReg|FloatAcc, 0, 0
+st(1), FloatReg, 0, 1
+st(2), FloatReg, 0, 2
+st(3), FloatReg, 0, 3
+st(4), FloatReg, 0, 4
+st(5), FloatReg, 0, 5
+st(6), FloatReg, 0, 6
+st(7), FloatReg, 0, 7
diff --git a/contrib/binutils/opcodes/i386-tbl.h b/contrib/binutils/opcodes/i386-tbl.h
new file mode 100644
index 0000000..fa843b3
--- /dev/null
+++ b/contrib/binutils/opcodes/i386-tbl.h
@@ -0,0 +1,4468 @@
+/* This file is automatically generated by i386-gen. Do not edit! */
+
+/* i386 opcode table. */
+
+const template i386_optab[] =
+{
+ { "mov", 2, 0xa0, None, Cpu64,
+ D|W|No_sSuf|No_xSuf,
+ { Disp64,
+ Acc } },
+ { "mov", 2, 0xa0, None, CpuNo64,
+ D|W|No_sSuf|No_qSuf|No_xSuf,
+ { Disp16|Disp32,
+ Acc } },
+ { "mov", 2, 0x88, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "mov", 2, 0xb0, None, 0,
+ W|ShortForm|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32 } },
+ { "mov", 2, 0xc6, 0x0, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "mov", 2, 0xb0, None, Cpu64,
+ W|ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
+ { Imm64,
+ Reg64 } },
+ { "mov", 2, 0x8c, None, 0,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg2,
+ Reg16|Reg32|Reg64|RegMem } },
+ { "mov", 2, 0x8c, None, 0,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg2,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "mov", 2, 0x8c, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg3,
+ Reg16|Reg32|Reg64|RegMem } },
+ { "mov", 2, 0x8c, None, Cpu386,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg3,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "mov", 2, 0x8e, None, 0,
+ Modrm|IgnoreSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ SReg2 } },
+ { "mov", 2, 0x8e, None, 0,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ SReg2 } },
+ { "mov", 2, 0x8e, None, Cpu386,
+ Modrm|IgnoreSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ SReg3 } },
+ { "mov", 2, 0x8e, None, Cpu386,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ SReg3 } },
+ { "mov", 2, 0xf20, None, Cpu386|CpuNo64,
+ D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Control,
+ Reg32|RegMem } },
+ { "mov", 2, 0xf20, None, Cpu64,
+ D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Control,
+ Reg64|RegMem } },
+ { "mov", 2, 0xf21, None, Cpu386|CpuNo64,
+ D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Debug,
+ Reg32|RegMem } },
+ { "mov", 2, 0xf21, None, Cpu64,
+ D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Debug,
+ Reg64|RegMem } },
+ { "mov", 2, 0xf24, None, Cpu386|CpuNo64,
+ D|Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Test,
+ Reg32|RegMem } },
+ { "movabs", 2, 0xa0, None, Cpu64,
+ D|W|No_sSuf|No_xSuf,
+ { Disp64,
+ Acc } },
+ { "movabs", 2, 0xb0, None, Cpu64,
+ W|ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
+ { Imm64,
+ Reg64 } },
+ { "movsbl", 2, 0xfbe, None, Cpu386,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32 } },
+ { "movsbw", 2, 0xfbe, None, Cpu386,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16 } },
+ { "movswl", 2, 0xfbf, None, Cpu386,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32 } },
+ { "movsbq", 2, 0xfbe, None, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "movswq", 2, 0xfbf, None, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "movslq", 2, 0x63, None, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64,
+ { Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "movsx", 2, 0xfbe, None, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "movsx", 2, 0xfbf, None, Cpu386,
+ Modrm|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32|Reg64 } },
+ { "movsx", 2, 0x63, None, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Rex64,
+ { Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "movzb", 2, 0xfb6, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "movzbl", 2, 0xfb6, None, Cpu386,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32 } },
+ { "movzbw", 2, 0xfb6, None, Cpu386,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16 } },
+ { "movzwl", 2, 0xfb7, None, Cpu386,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32 } },
+ { "movzbq", 2, 0xfb6, None, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "movzwq", 2, 0xfb7, None, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "movzx", 2, 0xfb6, None, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "movzx", 2, 0xfb7, None, Cpu386,
+ Modrm|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32|Reg64 } },
+ { "push", 1, 0x50, None, CpuNo64,
+ ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64 } },
+ { "push", 1, 0xff, 0x6, CpuNo64,
+ Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "push", 1, 0x6a, None, Cpu186|CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8S } },
+ { "push", 1, 0x68, None, Cpu186|CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm16|Imm32 } },
+ { "push", 1, 0x6, None, CpuNo64,
+ ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg2 } },
+ { "push", 1, 0xfa0, None, Cpu386|CpuNo64,
+ ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg3 } },
+ { "push", 1, 0x50, None, Cpu64,
+ ShortForm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Reg16|Reg64 } },
+ { "push", 1, 0xff, 0x6, Cpu64,
+ Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Reg16|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "push", 1, 0x6a, None, Cpu64,
+ DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Imm8S } },
+ { "push", 1, 0x68, None, Cpu64,
+ DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Imm16|Imm32S } },
+ { "push", 1, 0xfa0, None, Cpu64,
+ ShortForm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { SReg3 } },
+ { "pusha", 0, 0x60, None, Cpu186|CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "pop", 1, 0x58, None, CpuNo64,
+ ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64 } },
+ { "pop", 1, 0x8f, 0x0, CpuNo64,
+ Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "pop", 1, 0x7, None, CpuNo64,
+ ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg2 } },
+ { "pop", 1, 0xfa1, None, Cpu386|CpuNo64,
+ ShortForm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg3 } },
+ { "pop", 1, 0x58, None, Cpu64,
+ ShortForm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Reg16|Reg64 } },
+ { "pop", 1, 0x8f, 0x0, Cpu64,
+ Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Reg16|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "pop", 1, 0xfa1, None, Cpu64,
+ ShortForm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { SReg3 } },
+ { "popa", 0, 0x61, None, Cpu186|CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "xchg", 2, 0x90, None, 0,
+ ShortForm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ Acc } },
+ { "xchg", 2, 0x90, None, 0,
+ ShortForm|No_bSuf|No_sSuf|No_xSuf,
+ { Acc,
+ Reg16|Reg32|Reg64 } },
+ { "xchg", 2, 0x86, None, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "xchg", 2, 0x86, None, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg8|Reg16|Reg32|Reg64 } },
+ { "in", 2, 0xe4, None, 0,
+ W|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ Acc } },
+ { "in", 2, 0xec, None, 0,
+ W|No_sSuf|No_qSuf|No_xSuf,
+ { InOutPortReg,
+ Acc } },
+ { "in", 1, 0xe4, None, 0,
+ W|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8 } },
+ { "in", 1, 0xec, None, 0,
+ W|No_sSuf|No_qSuf|No_xSuf,
+ { InOutPortReg } },
+ { "out", 2, 0xe6, None, 0,
+ W|No_sSuf|No_qSuf|No_xSuf,
+ { Acc,
+ Imm8 } },
+ { "out", 2, 0xee, None, 0,
+ W|No_sSuf|No_qSuf|No_xSuf,
+ { Acc,
+ InOutPortReg } },
+ { "out", 1, 0xe6, None, 0,
+ W|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8 } },
+ { "out", 1, 0xee, None, 0,
+ W|No_sSuf|No_qSuf|No_xSuf,
+ { InOutPortReg } },
+ { "lea", 2, 0x8d, None, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "lds", 2, 0xc5, None, CpuNo64,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "les", 2, 0xc4, None, CpuNo64,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "lfs", 2, 0xfb4, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "lgs", 2, 0xfb5, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "lss", 2, 0xfb2, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "clc", 0, 0xf8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cld", 0, 0xfc, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cli", 0, 0xfa, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "clts", 0, 0xf06, None, Cpu286,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cmc", 0, 0xf5, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "lahf", 0, 0x9f, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "sahf", 0, 0x9e, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "pushf", 0, 0x9c, None, CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "pushf", 0, 0x9c, None, Cpu64,
+ DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { 0 } },
+ { "popf", 0, 0x9d, None, CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "popf", 0, 0x9d, None, Cpu64,
+ DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { 0 } },
+ { "stc", 0, 0xf9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "std", 0, 0xfd, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "sti", 0, 0xfb, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "add", 2, 0x0, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "add", 2, 0x83, 0x0, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "add", 2, 0x4, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "add", 2, 0x80, 0x0, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "inc", 1, 0x40, None, CpuNo64,
+ ShortForm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64 } },
+ { "inc", 1, 0xfe, 0x0, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sub", 2, 0x28, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sub", 2, 0x83, 0x5, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sub", 2, 0x2c, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "sub", 2, 0x80, 0x5, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "dec", 1, 0x48, None, CpuNo64,
+ ShortForm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64 } },
+ { "dec", 1, 0xfe, 0x1, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sbb", 2, 0x18, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sbb", 2, 0x83, 0x3, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sbb", 2, 0x1c, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "sbb", 2, 0x80, 0x3, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "cmp", 2, 0x38, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "cmp", 2, 0x83, 0x7, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "cmp", 2, 0x3c, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "cmp", 2, 0x80, 0x7, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "test", 2, 0x84, None, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "test", 2, 0x84, None, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg8|Reg16|Reg32|Reg64 } },
+ { "test", 2, 0xa8, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "test", 2, 0xf6, 0x0, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "and", 2, 0x20, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "and", 2, 0x83, 0x4, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "and", 2, 0x24, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "and", 2, 0x80, 0x4, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "or", 2, 0x8, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "or", 2, 0x83, 0x1, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "or", 2, 0xc, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "or", 2, 0x80, 0x1, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "xor", 2, 0x30, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "xor", 2, 0x83, 0x6, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "xor", 2, 0x34, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "xor", 2, 0x80, 0x6, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "clr", 1, 0x30, None, 0,
+ W|Modrm|No_sSuf|No_xSuf|RegKludge,
+ { Reg8|Reg16|Reg32|Reg64 } },
+ { "adc", 2, 0x10, None, 0,
+ D|W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "adc", 2, 0x83, 0x2, 0,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "adc", 2, 0x14, None, 0,
+ W|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Acc } },
+ { "adc", 2, 0x80, 0x2, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8|Imm16|Imm32|Imm32S,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "neg", 1, 0xf6, 0x3, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "not", 1, 0xf6, 0x2, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "aaa", 0, 0x37, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "aas", 0, 0x3f, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "daa", 0, 0x27, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "das", 0, 0x2f, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "aad", 0, 0xd50a, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "aad", 1, 0xd5, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8 } },
+ { "aam", 0, 0xd40a, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "aam", 1, 0xd4, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8 } },
+ { "cbw", 0, 0x98, None, 0,
+ Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cdqe", 0, 0x98, None, Cpu64,
+ Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cwde", 0, 0x98, None, 0,
+ Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cwd", 0, 0x99, None, 0,
+ Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cdq", 0, 0x99, None, 0,
+ Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cqo", 0, 0x99, None, Cpu64,
+ Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cbtw", 0, 0x98, None, 0,
+ Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cltq", 0, 0x98, None, Cpu64,
+ Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cwtl", 0, 0x98, None, 0,
+ Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cwtd", 0, 0x99, None, 0,
+ Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cltd", 0, 0x99, None, 0,
+ Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cqto", 0, 0x99, None, Cpu64,
+ Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "mul", 1, 0xf6, 0x4, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "imul", 1, 0xf6, 0x5, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "imul", 2, 0xfaf, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "imul", 3, 0x6b, None, Cpu186,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "imul", 3, 0x69, None, Cpu186,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm16|Imm32|Imm32S,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "imul", 2, 0x6b, None, Cpu186,
+ Modrm|No_bSuf|No_sSuf|No_xSuf|RegKludge,
+ { Imm8S,
+ Reg16|Reg32|Reg64 } },
+ { "imul", 2, 0x69, None, Cpu186,
+ Modrm|No_bSuf|No_sSuf|No_xSuf|RegKludge,
+ { Imm16|Imm32|Imm32S,
+ Reg16|Reg32|Reg64 } },
+ { "div", 1, 0xf6, 0x6, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "div", 2, 0xf6, 0x6, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Acc } },
+ { "idiv", 1, 0xf6, 0x7, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "idiv", 2, 0xf6, 0x7, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Acc } },
+ { "rol", 2, 0xd0, 0x0, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm1,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rol", 2, 0xc0, 0x0, Cpu186,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rol", 2, 0xd2, 0x0, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rol", 1, 0xd0, 0x0, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "ror", 2, 0xd0, 0x1, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm1,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "ror", 2, 0xc0, 0x1, Cpu186,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "ror", 2, 0xd2, 0x1, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "ror", 1, 0xd0, 0x1, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rcl", 2, 0xd0, 0x2, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm1,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rcl", 2, 0xc0, 0x2, Cpu186,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rcl", 2, 0xd2, 0x2, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rcl", 1, 0xd0, 0x2, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rcr", 2, 0xd0, 0x3, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm1,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rcr", 2, 0xc0, 0x3, Cpu186,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rcr", 2, 0xd2, 0x3, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rcr", 1, 0xd0, 0x3, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sal", 2, 0xd0, 0x4, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm1,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sal", 2, 0xc0, 0x4, Cpu186,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sal", 2, 0xd2, 0x4, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sal", 1, 0xd0, 0x4, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shl", 2, 0xd0, 0x4, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm1,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shl", 2, 0xc0, 0x4, Cpu186,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shl", 2, 0xd2, 0x4, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shl", 1, 0xd0, 0x4, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shr", 2, 0xd0, 0x5, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm1,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shr", 2, 0xc0, 0x5, Cpu186,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shr", 2, 0xd2, 0x5, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shr", 1, 0xd0, 0x5, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sar", 2, 0xd0, 0x7, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm1,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sar", 2, 0xc0, 0x7, Cpu186,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sar", 2, 0xd2, 0x7, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sar", 1, 0xd0, 0x7, 0,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shld", 3, 0xfa4, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shld", 3, 0xfa5, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shld", 2, 0xfa5, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shrd", 3, 0xfac, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shrd", 3, 0xfad, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { ShiftCount,
+ Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "shrd", 2, 0xfad, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "call", 1, 0xe8, None, CpuNo64,
+ JumpDword|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp16|Disp32 } },
+ { "call", 1, 0xe8, None, Cpu64,
+ JumpDword|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Disp16|Disp32 } },
+ { "call", 1, 0xff, 0x2, CpuNo64,
+ Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute } },
+ { "call", 1, 0xff, 0x2, Cpu64,
+ Modrm|DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Reg16|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute } },
+ { "call", 2, 0x9a, None, CpuNo64,
+ JumpInterSegment|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm16,
+ Imm16|Imm32 } },
+ { "call", 1, 0xff, 0x3, 0,
+ Modrm|DefaultSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute } },
+ { "lcall", 2, 0x9a, None, CpuNo64,
+ JumpInterSegment|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm16,
+ Imm16|Imm32 } },
+ { "lcall", 1, 0xff, 0x3, 0,
+ Modrm|DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute } },
+ { "jmp", 1, 0xeb, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jmp", 1, 0xff, 0x4, CpuNo64,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute } },
+ { "jmp", 1, 0xff, 0x4, Cpu64,
+ Modrm|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Reg16|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute } },
+ { "jmp", 2, 0xea, None, CpuNo64,
+ JumpInterSegment|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm16,
+ Imm16|Imm32 } },
+ { "jmp", 1, 0xff, 0x5, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute } },
+ { "ljmp", 2, 0xea, None, CpuNo64,
+ JumpInterSegment|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm16,
+ Imm16|Imm32 } },
+ { "ljmp", 1, 0xff, 0x5, 0,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|JumpAbsolute } },
+ { "ret", 0, 0xc3, None, CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "ret", 1, 0xc2, None, CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm16 } },
+ { "ret", 0, 0xc3, None, Cpu64,
+ DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { 0 } },
+ { "ret", 1, 0xc2, None, Cpu64,
+ DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Imm16 } },
+ { "lret", 0, 0xcb, None, 0,
+ DefaultSize|No_bSuf|No_sSuf|No_xSuf,
+ { 0 } },
+ { "lret", 1, 0xca, None, 0,
+ DefaultSize|No_bSuf|No_sSuf|No_xSuf,
+ { Imm16 } },
+ { "enter", 2, 0xc8, None, Cpu186|CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm16,
+ Imm8 } },
+ { "enter", 2, 0xc8, None, Cpu64,
+ DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Imm16,
+ Imm8 } },
+ { "leave", 0, 0xc9, None, Cpu186|CpuNo64,
+ DefaultSize|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "leave", 0, 0xc9, None, Cpu64,
+ DefaultSize|No_bSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { 0 } },
+ { "jo", 1, 0x70, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jno", 1, 0x71, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jb", 1, 0x72, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jc", 1, 0x72, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnae", 1, 0x72, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnb", 1, 0x73, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnc", 1, 0x73, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jae", 1, 0x73, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "je", 1, 0x74, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jz", 1, 0x74, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jne", 1, 0x75, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnz", 1, 0x75, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jbe", 1, 0x76, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jna", 1, 0x76, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnbe", 1, 0x77, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "ja", 1, 0x77, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "js", 1, 0x78, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jns", 1, 0x79, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jp", 1, 0x7a, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jpe", 1, 0x7a, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnp", 1, 0x7b, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jpo", 1, 0x7b, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jl", 1, 0x7c, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnge", 1, 0x7c, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnl", 1, 0x7d, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jge", 1, 0x7d, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jle", 1, 0x7e, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jng", 1, 0x7e, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jnle", 1, 0x7f, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jg", 1, 0x7f, None, 0,
+ Jump|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jcxz", 1, 0xe3, None, CpuNo64,
+ JumpByte|Size16|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jecxz", 1, 0xe3, None, CpuNo64,
+ JumpByte|Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jecxz", 1, 0x67e3, None, Cpu64,
+ JumpByte|Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "jrcxz", 1, 0xe3, None, Cpu64,
+ JumpByte|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loop", 1, 0xe2, None, CpuNo64,
+ JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loop", 1, 0xe2, None, Cpu64,
+ JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loopz", 1, 0xe1, None, CpuNo64,
+ JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loopz", 1, 0xe1, None, Cpu64,
+ JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loope", 1, 0xe1, None, CpuNo64,
+ JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loope", 1, 0xe1, None, Cpu64,
+ JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loopnz", 1, 0xe0, None, CpuNo64,
+ JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loopnz", 1, 0xe0, None, Cpu64,
+ JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loopne", 1, 0xe0, None, CpuNo64,
+ JumpByte|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "loopne", 1, 0xe0, None, Cpu64,
+ JumpByte|No_bSuf|No_wSuf|No_sSuf|No_xSuf|NoRex64,
+ { Disp8|Disp16|Disp32|Disp32S|Disp64 } },
+ { "seto", 1, 0xf90, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setno", 1, 0xf91, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setb", 1, 0xf92, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setc", 1, 0xf92, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnae", 1, 0xf92, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnb", 1, 0xf93, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnc", 1, 0xf93, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setae", 1, 0xf93, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sete", 1, 0xf94, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setz", 1, 0xf94, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setne", 1, 0xf95, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnz", 1, 0xf95, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setbe", 1, 0xf96, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setna", 1, 0xf96, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnbe", 1, 0xf97, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "seta", 1, 0xf97, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sets", 1, 0xf98, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setns", 1, 0xf99, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setp", 1, 0xf9a, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setpe", 1, 0xf9a, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnp", 1, 0xf9b, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setpo", 1, 0xf9b, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setl", 1, 0xf9c, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnge", 1, 0xf9c, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnl", 1, 0xf9d, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setge", 1, 0xf9d, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setle", 1, 0xf9e, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setng", 1, 0xf9e, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setnle", 1, 0xf9f, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "setg", 1, 0xf9f, 0x0, Cpu386,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "cmps", 0, 0xa6, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "cmps", 2, 0xa6, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "scmp", 0, 0xa6, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "scmp", 2, 0xa6, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "ins", 0, 0x6c, None, Cpu186,
+ W|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { 0 } },
+ { "ins", 2, 0x6c, None, Cpu186,
+ W|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { InOutPortReg,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "outs", 0, 0x6e, None, Cpu186,
+ W|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { 0 } },
+ { "outs", 2, 0x6e, None, Cpu186,
+ W|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ InOutPortReg } },
+ { "lods", 0, 0xac, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "lods", 1, 0xac, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lods", 2, 0xac, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Acc } },
+ { "slod", 0, 0xac, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "slod", 1, 0xac, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "slod", 2, 0xac, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Acc } },
+ { "movs", 0, 0xa4, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "movs", 2, 0xa4, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "smov", 0, 0xa4, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "smov", 2, 0xa4, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "scas", 0, 0xae, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "scas", 1, 0xae, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "scas", 2, 0xae, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg,
+ Acc } },
+ { "ssca", 0, 0xae, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "ssca", 1, 0xae, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "ssca", 2, 0xae, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg,
+ Acc } },
+ { "stos", 0, 0xaa, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "stos", 1, 0xaa, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "stos", 2, 0xaa, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { Acc,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "ssto", 0, 0xaa, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { 0 } },
+ { "ssto", 1, 0xaa, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "ssto", 2, 0xaa, None, 0,
+ W|No_sSuf|No_xSuf|IsString,
+ { Acc,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "xlat", 0, 0xd7, None, 0,
+ No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { 0 } },
+ { "xlat", 1, 0xd7, None, 0,
+ No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "bsf", 2, 0xfbc, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "bsr", 2, 0xfbd, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "bt", 2, 0xfa3, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "bt", 2, 0xfba, 0x4, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "btc", 2, 0xfbb, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "btc", 2, 0xfba, 0x7, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "btr", 2, 0xfb3, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "btr", 2, 0xfba, 0x6, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "bts", 2, 0xfab, None, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "bts", 2, 0xfba, 0x5, Cpu386,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "int", 1, 0xcd, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8 } },
+ { "int3", 0, 0xcc, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "into", 0, 0xce, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "iret", 0, 0xcf, None, 0,
+ DefaultSize|No_bSuf|No_sSuf|No_xSuf,
+ { 0 } },
+ { "rsm", 0, 0xfaa, None, Cpu386,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "bound", 2, 0x62, None, Cpu186|CpuNo64,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "hlt", 0, 0xf4, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "nop", 1, 0xf1f, 0x0, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "nop", 0, 0x90, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "arpl", 2, 0x63, None, Cpu286|CpuNo64,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16,
+ Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lar", 2, 0xf02, None, Cpu286,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "lgdt", 1, 0xf01, 0x2, Cpu286|CpuNo64,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lgdt", 1, 0xf01, 0x2, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lidt", 1, 0xf01, 0x3, Cpu286|CpuNo64,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lidt", 1, 0xf01, 0x3, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lldt", 1, 0xf00, 0x2, Cpu286,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lmsw", 1, 0xf01, 0x6, Cpu286,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lsl", 2, 0xf03, None, Cpu286,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "ltr", 1, 0xf00, 0x3, Cpu286,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sgdt", 1, 0xf01, 0x0, Cpu286|CpuNo64,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sgdt", 1, 0xf01, 0x0, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sidt", 1, 0xf01, 0x1, Cpu286|CpuNo64,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sidt", 1, 0xf01, 0x1, Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sldt", 1, 0xf00, 0x0, Cpu286,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64 } },
+ { "sldt", 1, 0xf00, 0x0, Cpu286,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "smsw", 1, 0xf01, 0x4, Cpu286,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64 } },
+ { "smsw", 1, 0xf01, 0x4, Cpu286,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "str", 1, 0xf00, 0x1, Cpu286,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64 } },
+ { "str", 1, 0xf00, 0x1, Cpu286,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "verr", 1, 0xf00, 0x4, Cpu286,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "verw", 1, 0xf00, 0x5, Cpu286,
+ Modrm|IgnoreSize|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fld", 1, 0xd9c0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fld", 1, 0xd9, 0x0, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fld", 1, 0xd9c0, None, 0,
+ ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg } },
+ { "fld", 1, 0xdb, 0x5, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fild", 1, 0xdf, 0x0, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fild", 1, 0xdf, 0x5, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fildll", 1, 0xdf, 0x5, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fldt", 1, 0xdb, 0x5, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fbld", 1, 0xdf, 0x4, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fst", 1, 0xddd0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fst", 1, 0xd9, 0x2, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fst", 1, 0xddd0, None, 0,
+ ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg } },
+ { "fist", 1, 0xdf, 0x2, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fstp", 1, 0xddd8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fstp", 1, 0xd9, 0x3, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fstp", 1, 0xddd8, None, 0,
+ ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg } },
+ { "fstp", 1, 0xdb, 0x7, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fistp", 1, 0xdf, 0x3, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fistp", 1, 0xdf, 0x7, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fistpll", 1, 0xdf, 0x7, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fstpt", 1, 0xdb, 0x7, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fbstp", 1, 0xdf, 0x6, 0,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fxch", 1, 0xd9c8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fxch", 0, 0xd9c9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fcom", 1, 0xd8d0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fcom", 0, 0xd8d1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fcom", 1, 0xd8, 0x2, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fcom", 1, 0xd8d0, None, 0,
+ ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg } },
+ { "ficom", 1, 0xde, 0x2, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fcomp", 1, 0xd8d8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fcomp", 0, 0xd8d9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fcomp", 1, 0xd8, 0x3, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fcomp", 1, 0xd8d8, None, 0,
+ ShortForm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg } },
+ { "ficomp", 1, 0xde, 0x3, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fcompp", 0, 0xded9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fucom", 1, 0xdde0, None, Cpu286,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fucom", 0, 0xdde1, None, Cpu286,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fucomp", 1, 0xdde8, None, Cpu286,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fucomp", 0, 0xdde9, None, Cpu286,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fucompp", 0, 0xdae9, None, Cpu286,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "ftst", 0, 0xd9e4, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fxam", 0, 0xd9e5, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fld1", 0, 0xd9e8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fldl2t", 0, 0xd9e9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fldl2e", 0, 0xd9ea, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fldpi", 0, 0xd9eb, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fldlg2", 0, 0xd9ec, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fldln2", 0, 0xd9ed, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fldz", 0, 0xd9ee, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fadd", 2, 0xd8c0, None, 0,
+ ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fadd", 1, 0xd8c0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+#if SYSV386_COMPAT
+ { "fadd", 0, 0xdec1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { 0 } },
+#endif
+ { "fadd", 1, 0xd8, 0x0, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fiadd", 1, 0xde, 0x0, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "faddp", 2, 0xdec0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatAcc,
+ FloatReg } },
+ { "faddp", 1, 0xdec0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "faddp", 0, 0xdec1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "faddp", 2, 0xdec0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg,
+ FloatAcc } },
+ { "fsub", 1, 0xd8e0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+#if SYSV386_COMPAT
+ { "fsub", 2, 0xd8e0, None, 0,
+ ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fsub", 0, 0xdee1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { 0 } },
+#else
+ { "fsub", 2, 0xd8e0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm|FloatD|FloatR,
+ { FloatReg,
+ FloatAcc } },
+#endif
+ { "fsub", 1, 0xd8, 0x4, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fisub", 1, 0xde, 0x4, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+#if SYSV386_COMPAT
+ { "fsubp", 2, 0xdee0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatAcc,
+ FloatReg } },
+ { "fsubp", 1, 0xdee0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fsubp", 0, 0xdee1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+#if OLDGCC_COMPAT
+ { "fsubp", 2, 0xdee0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg,
+ FloatAcc } },
+#endif
+#else
+ { "fsubp", 2, 0xdee8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm,
+ { FloatAcc,
+ FloatReg } },
+ { "fsubp", 1, 0xdee8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm,
+ { FloatReg } },
+ { "fsubp", 0, 0xdee9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf,
+ { 0 } },
+#endif
+ { "fsubr", 1, 0xd8e8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+#if SYSV386_COMPAT
+ { "fsubr", 2, 0xd8e8, None, 0,
+ ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fsubr", 0, 0xdee9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { 0 } },
+#else
+ { "fsubr", 2, 0xd8e8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm|FloatD|FloatR,
+ { FloatReg,
+ FloatAcc } },
+#endif
+ { "fsubr", 1, 0xd8, 0x5, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fisubr", 1, 0xde, 0x5, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+#if SYSV386_COMPAT
+ { "fsubrp", 2, 0xdee8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatAcc,
+ FloatReg } },
+ { "fsubrp", 1, 0xdee8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fsubrp", 0, 0xdee9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+#if OLDGCC_COMPAT
+ { "fsubrp", 2, 0xdee8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg,
+ FloatAcc } },
+#endif
+#else
+ { "fsubrp", 2, 0xdee0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm,
+ { FloatAcc,
+ FloatReg } },
+ { "fsubrp", 1, 0xdee0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm,
+ { FloatReg } },
+ { "fsubrp", 0, 0xdee1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf,
+ { 0 } },
+#endif
+ { "fmul", 2, 0xd8c8, None, 0,
+ ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fmul", 1, 0xd8c8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+#if SYSV386_COMPAT
+ { "fmul", 0, 0xdec9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { 0 } },
+#endif
+ { "fmul", 1, 0xd8, 0x1, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fimul", 1, 0xde, 0x1, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fmulp", 2, 0xdec8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatAcc,
+ FloatReg } },
+ { "fmulp", 1, 0xdec8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fmulp", 0, 0xdec9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fmulp", 2, 0xdec8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg,
+ FloatAcc } },
+ { "fdiv", 1, 0xd8f0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+#if SYSV386_COMPAT
+ { "fdiv", 2, 0xd8f0, None, 0,
+ ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fdiv", 0, 0xdef1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { 0 } },
+#else
+ { "fdiv", 2, 0xd8f0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm|FloatD|FloatR,
+ { FloatReg,
+ FloatAcc } },
+#endif
+ { "fdiv", 1, 0xd8, 0x6, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fidiv", 1, 0xde, 0x6, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+#if SYSV386_COMPAT
+ { "fdivp", 2, 0xdef0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatAcc,
+ FloatReg } },
+ { "fdivp", 1, 0xdef0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fdivp", 0, 0xdef1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+#if OLDGCC_COMPAT
+ { "fdivp", 2, 0xdef0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg,
+ FloatAcc } },
+#endif
+#else
+ { "fdivp", 2, 0xdef8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm,
+ { FloatAcc,
+ FloatReg } },
+ { "fdivp", 1, 0xdef8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm,
+ { FloatReg } },
+ { "fdivp", 0, 0xdef9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf,
+ { 0 } },
+#endif
+ { "fdivr", 1, 0xd8f8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+#if SYSV386_COMPAT
+ { "fdivr", 2, 0xd8f8, None, 0,
+ ShortForm|FloatD|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fdivr", 0, 0xdef9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { 0 } },
+#else
+ { "fdivr", 2, 0xd8f8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm|FloatD|FloatR,
+ { FloatReg,
+ FloatAcc } },
+#endif
+ { "fdivr", 1, 0xd8, 0x7, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fidivr", 1, 0xde, 0x7, 0,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+#if SYSV386_COMPAT
+ { "fdivrp", 2, 0xdef8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatAcc,
+ FloatReg } },
+ { "fdivrp", 1, 0xdef8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fdivrp", 0, 0xdef9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+#if OLDGCC_COMPAT
+ { "fdivrp", 2, 0xdef8, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Ugh,
+ { FloatReg,
+ FloatAcc } },
+#endif
+#else
+ { "fdivrp", 2, 0xdef0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm,
+ { FloatAcc,
+ FloatReg } },
+ { "fdivrp", 1, 0xdef0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf|ShortForm,
+ { FloatReg } },
+ { "fdivrp", 0, 0xdef1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|No_qSuf,
+ { 0 } },
+#endif
+ { "f2xm1", 0, 0xd9f0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fyl2x", 0, 0xd9f1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fptan", 0, 0xd9f2, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fpatan", 0, 0xd9f3, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fxtract", 0, 0xd9f4, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fprem1", 0, 0xd9f5, None, Cpu286,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fdecstp", 0, 0xd9f6, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fincstp", 0, 0xd9f7, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fprem", 0, 0xd9f8, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fyl2xp1", 0, 0xd9f9, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fsqrt", 0, 0xd9fa, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fsincos", 0, 0xd9fb, None, Cpu286,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "frndint", 0, 0xd9fc, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fscale", 0, 0xd9fd, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fsin", 0, 0xd9fe, None, Cpu286,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fcos", 0, 0xd9ff, None, Cpu286,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fchs", 0, 0xd9e0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fabs", 0, 0xd9e1, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fninit", 0, 0xdbe3, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "finit", 0, 0xdbe3, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait,
+ { 0 } },
+ { "fldcw", 1, 0xd9, 0x5, 0,
+ Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fnstcw", 1, 0xd9, 0x7, 0,
+ Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fstcw", 1, 0xd9, 0x7, 0,
+ Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fnstsw", 1, 0xdfe0, None, 0,
+ IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Acc } },
+ { "fnstsw", 1, 0xdd, 0x7, 0,
+ Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fnstsw", 0, 0xdfe0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fstsw", 1, 0xdfe0, None, 0,
+ IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait,
+ { Acc } },
+ { "fstsw", 1, 0xdd, 0x7, 0,
+ Modrm|FloatMF|No_bSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fstsw", 0, 0xdfe0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait,
+ { 0 } },
+ { "fnclex", 0, 0xdbe2, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fclex", 0, 0xdbe2, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|FWait,
+ { 0 } },
+ { "fnstenv", 1, 0xd9, 0x6, 0,
+ Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fstenv", 1, 0xd9, 0x6, 0,
+ Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf|FWait,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fldenv", 1, 0xd9, 0x4, 0,
+ Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fnsave", 1, 0xdd, 0x6, 0,
+ Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fsave", 1, 0xdd, 0x6, 0,
+ Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf|FWait,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "frstor", 1, 0xdd, 0x4, 0,
+ Modrm|DefaultSize|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "ffree", 1, 0xddc0, None, 0,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "ffreep", 1, 0xdfc0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fnop", 0, 0xd9d0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fwait", 0, 0x9b, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "addr16", 0, 0x67, None, Cpu386|CpuNo64,
+ Size16|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "addr32", 0, 0x67, None, Cpu386,
+ Size32|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "aword", 0, 0x67, None, Cpu386|CpuNo64,
+ Size16|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "adword", 0, 0x67, None, Cpu386,
+ Size32|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "data16", 0, 0x66, None, Cpu386,
+ Size16|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "data32", 0, 0x66, None, Cpu386|CpuNo64,
+ Size32|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "word", 0, 0x66, None, Cpu386,
+ Size16|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "dword", 0, 0x66, None, Cpu386|CpuNo64,
+ Size32|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "lock", 0, 0xf0, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "wait", 0, 0x9b, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "cs", 0, 0x2e, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "ds", 0, 0x3e, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "es", 0, 0x26, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "fs", 0, 0x64, None, Cpu386,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "gs", 0, 0x65, None, Cpu386,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "ss", 0, 0x36, None, CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rep", 0, 0xf3, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "repe", 0, 0xf3, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "repz", 0, 0xf3, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "repne", 0, 0xf2, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "repnz", 0, 0xf2, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "ht", 0, 0x3e, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "hnt", 0, 0x2e, None, 0,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex", 0, 0x40, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rexz", 0, 0x41, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rexy", 0, 0x42, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rexyz", 0, 0x43, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rexx", 0, 0x44, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rexxz", 0, 0x45, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rexxy", 0, 0x46, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rexxyz", 0, 0x47, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex64", 0, 0x48, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex64z", 0, 0x49, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex64y", 0, 0x4a, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex64yz", 0, 0x4b, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex64x", 0, 0x4c, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex64xz", 0, 0x4d, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex64xy", 0, 0x4e, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex64xyz", 0, 0x4f, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.b", 0, 0x41, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.x", 0, 0x42, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.xb", 0, 0x43, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.r", 0, 0x44, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.rb", 0, 0x45, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.rx", 0, 0x46, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.rxb", 0, 0x47, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.w", 0, 0x48, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.wb", 0, 0x49, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.wx", 0, 0x4a, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.wxb", 0, 0x4b, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.wr", 0, 0x4c, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.wrb", 0, 0x4d, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.wrx", 0, 0x4e, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "rex.wrxb", 0, 0x4f, None, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsPrefix,
+ { 0 } },
+ { "bswap", 1, 0xfc8, None, Cpu486,
+ ShortForm|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { Reg32|Reg64 } },
+ { "xadd", 2, 0xfc0, None, Cpu486,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "cmpxchg", 2, 0xfb0, None, Cpu486,
+ W|Modrm|No_sSuf|No_xSuf,
+ { Reg8|Reg16|Reg32|Reg64,
+ Reg8|Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "invd", 0, 0xf08, None, Cpu486,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "wbinvd", 0, 0xf09, None, Cpu486,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "invlpg", 1, 0xf01, 0x7, Cpu486,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "cpuid", 0, 0xfa2, None, Cpu486,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "wrmsr", 0, 0xf30, None, Cpu586,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "rdtsc", 0, 0xf31, None, Cpu586,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "rdmsr", 0, 0xf32, None, Cpu586,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cmpxchg8b", 1, 0xfc7, 0x1, Cpu586,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "sysenter", 0, 0xf34, None, Cpu686,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "sysexit", 0, 0xf35, None, Cpu686,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fxsave", 1, 0xfae, 0x0, Cpu686,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fxrstor", 1, 0xfae, 0x1, Cpu686,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "rdpmc", 0, 0xf33, None, Cpu686,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "ud2", 0, 0xf0b, None, Cpu686,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "ud2a", 0, 0xf0b, None, Cpu686,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "ud2b", 0, 0xfb9, None, Cpu686,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "cmovo", 2, 0xf40, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovno", 2, 0xf41, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovb", 2, 0xf42, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovc", 2, 0xf42, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnae", 2, 0xf42, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovae", 2, 0xf43, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnc", 2, 0xf43, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnb", 2, 0xf43, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmove", 2, 0xf44, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovz", 2, 0xf44, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovne", 2, 0xf45, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnz", 2, 0xf45, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovbe", 2, 0xf46, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovna", 2, 0xf46, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmova", 2, 0xf47, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnbe", 2, 0xf47, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovs", 2, 0xf48, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovns", 2, 0xf49, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovp", 2, 0xf4a, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnp", 2, 0xf4b, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovl", 2, 0xf4c, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnge", 2, 0xf4c, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovge", 2, 0xf4d, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnl", 2, 0xf4d, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovle", 2, 0xf4e, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovng", 2, 0xf4e, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovg", 2, 0xf4f, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "cmovnle", 2, 0xf4f, None, Cpu686,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "fcmovb", 2, 0xdac0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovnae", 2, 0xdac0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmove", 2, 0xdac8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovbe", 2, 0xdad0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovna", 2, 0xdad0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovu", 2, 0xdad8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovae", 2, 0xdbc0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovnb", 2, 0xdbc0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovne", 2, 0xdbc8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmova", 2, 0xdbd0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovnbe", 2, 0xdbd0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcmovnu", 2, 0xdbd8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcomi", 2, 0xdbf0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcomi", 0, 0xdbf1, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fcomi", 1, 0xdbf0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fucomi", 2, 0xdbe8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fucomi", 0, 0xdbe9, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fucomi", 1, 0xdbe8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fcomip", 2, 0xdff0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcompi", 2, 0xdff0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fcompi", 0, 0xdff1, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fcompi", 1, 0xdff0, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "fucomip", 2, 0xdfe8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fucompi", 2, 0xdfe8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg,
+ FloatAcc } },
+ { "fucompi", 0, 0xdfe9, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "fucompi", 1, 0xdfe8, None, Cpu686,
+ ShortForm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { FloatReg } },
+ { "movnti", 2, 0xfc3, None, CpuP4,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "clflush", 1, 0xfae, 0x7, CpuP4,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "lfence", 0, 0xfae, 0xe8, CpuP4,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "mfence", 0, 0xfae, 0xf0, CpuP4,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "pause", 0, 0xf390, None, CpuP4,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "emms", 0, 0xf77, None, CpuMMX,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "movd", 2, 0xf6e, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegMMX } },
+ { "movd", 2, 0xf7e, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegMMX,
+ Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movd", 2, 0x660f6e, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "movd", 2, 0x660f7e, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movq", 2, 0xf6f, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "movq", 2, 0xf7f, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { RegMMX,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX } },
+ { "movq", 2, 0xf30f7e, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movq", 2, 0x660fd6, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "movq", 2, 0xf6e, None, Cpu64,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegMMX } },
+ { "movq", 2, 0xf7e, None, Cpu64,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegMMX,
+ Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movq", 2, 0x660f6e, None, Cpu64,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "movq", 2, 0x660f7e, None, Cpu64,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movq", 2, 0xa0, None, Cpu64,
+ D|W|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Disp64,
+ Acc } },
+ { "movq", 2, 0x88, None, Cpu64,
+ D|W|Modrm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg64,
+ Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movq", 2, 0xc6, 0x0, Cpu64,
+ W|Modrm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm32S,
+ Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movq", 2, 0xb0, None, Cpu64,
+ W|ShortForm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm64,
+ Reg64 } },
+ { "movq", 2, 0x8c, None, Cpu64,
+ Modrm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { SReg2|SReg3,
+ Reg64|RegMem } },
+ { "movq", 2, 0x8e, None, Cpu64,
+ Modrm|Size64|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg64,
+ SReg2|SReg3 } },
+ { "movq", 2, 0xf20, None, Cpu64,
+ D|Modrm|Size64|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { Control,
+ Reg64|RegMem } },
+ { "movq", 2, 0xf21, None, Cpu64,
+ D|Modrm|Size64|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { Debug,
+ Reg64|RegMem } },
+ { "packssdw", 2, 0xf6b, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "packssdw", 2, 0x660f6b, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "packsswb", 2, 0xf63, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "packsswb", 2, 0x660f63, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "packuswb", 2, 0xf67, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "packuswb", 2, 0x660f67, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "paddb", 2, 0xffc, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "paddb", 2, 0x660ffc, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "paddw", 2, 0xffd, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "paddw", 2, 0x660ffd, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "paddd", 2, 0xffe, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "paddd", 2, 0x660ffe, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "paddq", 2, 0xfd4, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "paddq", 2, 0x660fd4, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "paddsb", 2, 0xfec, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "paddsb", 2, 0x660fec, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "paddsw", 2, 0xfed, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "paddsw", 2, 0x660fed, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "paddusb", 2, 0xfdc, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "paddusb", 2, 0x660fdc, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "paddusw", 2, 0xfdd, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "paddusw", 2, 0x660fdd, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pand", 2, 0xfdb, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pand", 2, 0x660fdb, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pandn", 2, 0xfdf, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pandn", 2, 0x660fdf, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpeqb", 2, 0xf74, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pcmpeqb", 2, 0x660f74, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpeqw", 2, 0xf75, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pcmpeqw", 2, 0x660f75, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpeqd", 2, 0xf76, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pcmpeqd", 2, 0x660f76, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpgtb", 2, 0xf64, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pcmpgtb", 2, 0x660f64, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpgtw", 2, 0xf65, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pcmpgtw", 2, 0x660f65, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpgtd", 2, 0xf66, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pcmpgtd", 2, 0x660f66, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmaddwd", 2, 0xff5, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmaddwd", 2, 0x660ff5, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmulhw", 2, 0xfe5, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmulhw", 2, 0x660fe5, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmullw", 2, 0xfd5, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmullw", 2, 0x660fd5, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "por", 2, 0xfeb, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "por", 2, 0x660feb, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psllw", 2, 0xff1, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psllw", 2, 0x660ff1, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psllw", 2, 0xf71, 0x6, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegMMX } },
+ { "psllw", 2, 0x660f71, 0x6, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "pslld", 2, 0xff2, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pslld", 2, 0x660ff2, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pslld", 2, 0xf72, 0x6, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegMMX } },
+ { "pslld", 2, 0x660f72, 0x6, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "psllq", 2, 0xff3, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psllq", 2, 0x660ff3, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psllq", 2, 0xf73, 0x6, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegMMX } },
+ { "psllq", 2, 0x660f73, 0x6, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "psraw", 2, 0xfe1, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psraw", 2, 0x660fe1, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psraw", 2, 0xf71, 0x4, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegMMX } },
+ { "psraw", 2, 0x660f71, 0x4, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "psrad", 2, 0xfe2, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psrad", 2, 0x660fe2, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psrad", 2, 0xf72, 0x4, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegMMX } },
+ { "psrad", 2, 0x660f72, 0x4, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "psrlw", 2, 0xfd1, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psrlw", 2, 0x660fd1, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psrlw", 2, 0xf71, 0x2, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegMMX } },
+ { "psrlw", 2, 0x660f71, 0x2, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "psrld", 2, 0xfd2, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psrld", 2, 0x660fd2, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psrld", 2, 0xf72, 0x2, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegMMX } },
+ { "psrld", 2, 0x660f72, 0x2, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "psrlq", 2, 0xfd3, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psrlq", 2, 0x660fd3, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psrlq", 2, 0xf73, 0x2, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegMMX } },
+ { "psrlq", 2, 0x660f73, 0x2, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "psubb", 2, 0xff8, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psubb", 2, 0x660ff8, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psubw", 2, 0xff9, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psubw", 2, 0x660ff9, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psubd", 2, 0xffa, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psubd", 2, 0x660ffa, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psubq", 2, 0xffb, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psubq", 2, 0x660ffb, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psubsb", 2, 0xfe8, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psubsb", 2, 0x660fe8, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psubsw", 2, 0xfe9, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psubsw", 2, 0x660fe9, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psubusb", 2, 0xfd8, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psubusb", 2, 0x660fd8, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psubusw", 2, 0xfd9, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psubusw", 2, 0x660fd9, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "punpckhbw", 2, 0xf68, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "punpckhbw", 2, 0x660f68, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "punpckhwd", 2, 0xf69, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "punpckhwd", 2, 0x660f69, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "punpckhdq", 2, 0xf6a, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "punpckhdq", 2, 0x660f6a, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "punpcklbw", 2, 0xf60, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "punpcklbw", 2, 0x660f60, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "punpcklwd", 2, 0xf61, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "punpcklwd", 2, 0x660f61, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "punpckldq", 2, 0xf62, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "punpckldq", 2, 0x660f62, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pxor", 2, 0xfef, None, CpuMMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pxor", 2, 0x660fef, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "addps", 2, 0xf58, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "addss", 2, 0xf30f58, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "andnps", 2, 0xf55, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "andps", 2, 0xf54, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpeqps", 2, 0xfc2, 0x0, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpeqss", 2, 0xf30fc2, 0x0, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpleps", 2, 0xfc2, 0x2, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpless", 2, 0xf30fc2, 0x2, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpltps", 2, 0xfc2, 0x1, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpltss", 2, 0xf30fc2, 0x1, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpneqps", 2, 0xfc2, 0x4, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpneqss", 2, 0xf30fc2, 0x4, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpnleps", 2, 0xfc2, 0x6, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpnless", 2, 0xf30fc2, 0x6, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpnltps", 2, 0xfc2, 0x5, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpnltss", 2, 0xf30fc2, 0x5, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpordps", 2, 0xfc2, 0x7, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpordss", 2, 0xf30fc2, 0x7, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpunordps", 2, 0xfc2, 0x3, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpunordss", 2, 0xf30fc2, 0x3, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpps", 3, 0xfc2, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpss", 3, 0xf30fc2, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "comiss", 2, 0xf2f, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtpi2ps", 2, 0xf2a, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegXMM } },
+ { "cvtps2pi", 2, 0xf2d, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegMMX } },
+ { "cvtsi2ss", 2, 0xf30f2a, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "cvtss2si", 2, 0xf30f2d, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ Reg32|Reg64 } },
+ { "cvttps2pi", 2, 0xf2c, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegMMX } },
+ { "cvttss2si", 2, 0xf30f2c, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ Reg32|Reg64 } },
+ { "divps", 2, 0xf5e, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "divss", 2, 0xf30f5e, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "ldmxcsr", 1, 0xfae, 0x2, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "maskmovq", 2, 0xff7, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegMMX,
+ RegMMX } },
+ { "maxps", 2, 0xf5f, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "maxss", 2, 0xf30f5f, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "minps", 2, 0xf5d, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "minss", 2, 0xf30f5d, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movaps", 2, 0xf28, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movaps", 2, 0xf29, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "movhlps", 2, 0xf12, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ RegXMM } },
+ { "movhps", 2, 0xf16, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "movhps", 2, 0xf17, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movlhps", 2, 0xf16, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ RegXMM } },
+ { "movlps", 2, 0xf12, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "movlps", 2, 0xf13, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movmskps", 2, 0xf50, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { RegXMM,
+ Reg32|Reg64 } },
+ { "movntps", 2, 0xf2b, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movntq", 2, 0xfe7, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegMMX,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movntdq", 2, 0x660fe7, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movss", 2, 0xf30f10, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movss", 2, 0xf30f11, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "movups", 2, 0xf10, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movups", 2, 0xf11, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "mulps", 2, 0xf59, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "mulss", 2, 0xf30f59, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "orps", 2, 0xf56, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pavgb", 2, 0xfe0, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pavgb", 2, 0x660fe0, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pavgw", 2, 0xfe3, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pavgw", 2, 0x660fe3, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pextrw", 3, 0xfc5, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ RegMMX,
+ Reg32|Reg64 } },
+ { "pextrw", 3, 0x660fc5, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ RegXMM,
+ Reg32|Reg64 } },
+ { "pextrw", 3, 0x660f3a15, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM,
+ Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "pinsrw", 3, 0xfc4, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegMMX } },
+ { "pinsrw", 3, 0x660fc4, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { Imm8,
+ Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "pmaxsw", 2, 0xfee, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmaxsw", 2, 0x660fee, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmaxub", 2, 0xfde, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmaxub", 2, 0x660fde, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pminsw", 2, 0xfea, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pminsw", 2, 0x660fea, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pminub", 2, 0xfda, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pminub", 2, 0x660fda, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovmskb", 2, 0xfd7, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { RegMMX,
+ Reg32|Reg64 } },
+ { "pmovmskb", 2, 0x660fd7, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { RegXMM,
+ Reg32|Reg64 } },
+ { "pmulhuw", 2, 0xfe4, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmulhuw", 2, 0x660fe4, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "prefetchnta", 1, 0xf18, 0x0, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "prefetcht0", 1, 0xf18, 0x1, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "prefetcht1", 1, 0xf18, 0x2, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "prefetcht2", 1, 0xf18, 0x3, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "psadbw", 2, 0xff6, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psadbw", 2, 0x660ff6, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pshufw", 3, 0xf70, None, CpuMMX2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "rcpps", 2, 0xf53, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "rcpss", 2, 0xf30f53, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "rsqrtps", 2, 0xf52, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "rsqrtss", 2, 0xf30f52, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "sfence", 0, 0xfae, 0xf8, CpuMMX2,
+ IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "shufps", 3, 0xfc6, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "sqrtps", 2, 0xf51, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "sqrtss", 2, 0xf30f51, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "stmxcsr", 1, 0xfae, 0x3, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "subps", 2, 0xf5c, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "subss", 2, 0xf30f5c, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "ucomiss", 2, 0xf2e, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "unpckhps", 2, 0xf15, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "unpcklps", 2, 0xf14, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "xorps", 2, 0xf57, None, CpuSSE,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "addpd", 2, 0x660f58, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "addsd", 2, 0xf20f58, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "andnpd", 2, 0x660f55, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "andpd", 2, 0x660f54, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpeqpd", 2, 0x660fc2, 0x0, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpeqsd", 2, 0xf20fc2, 0x0, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmplepd", 2, 0x660fc2, 0x2, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmplesd", 2, 0xf20fc2, 0x2, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpltpd", 2, 0x660fc2, 0x1, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpltsd", 2, 0xf20fc2, 0x1, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpneqpd", 2, 0x660fc2, 0x4, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpneqsd", 2, 0xf20fc2, 0x4, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpnlepd", 2, 0x660fc2, 0x6, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpnlesd", 2, 0xf20fc2, 0x6, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpnltpd", 2, 0x660fc2, 0x5, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpnltsd", 2, 0xf20fc2, 0x5, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpordpd", 2, 0x660fc2, 0x7, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpordsd", 2, 0xf20fc2, 0x7, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpunordpd", 2, 0x660fc2, 0x3, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpunordsd", 2, 0xf20fc2, 0x3, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmppd", 3, 0x660fc2, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpsd", 0, 0xa7, None, 0,
+ Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { 0 } },
+ { "cmpsd", 2, 0xa7, None, 0,
+ Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "cmpsd", 3, 0xf20fc2, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "comisd", 2, 0x660f2f, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtpi2pd", 2, 0x660f2a, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegXMM } },
+ { "cvtsi2sd", 2, 0xf20f2a, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "divpd", 2, 0x660f5e, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "divsd", 2, 0xf20f5e, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "maxpd", 2, 0x660f5f, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "maxsd", 2, 0xf20f5f, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "minpd", 2, 0x660f5d, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "minsd", 2, 0xf20f5d, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movapd", 2, 0x660f28, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movapd", 2, 0x660f29, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "movhpd", 2, 0x660f16, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "movhpd", 2, 0x660f17, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movlpd", 2, 0x660f12, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "movlpd", 2, 0x660f13, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movmskpd", 2, 0x660f50, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { RegXMM,
+ Reg32|Reg64 } },
+ { "movntpd", 2, 0x660f2b, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movsd", 0, 0xa5, None, 0,
+ Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { 0 } },
+ { "movsd", 2, 0xa5, None, 0,
+ Size32|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|EsSeg } },
+ { "movsd", 2, 0xf20f10, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movsd", 2, 0xf20f11, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "movupd", 2, 0x660f10, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movupd", 2, 0x660f11, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "mulpd", 2, 0x660f59, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "mulsd", 2, 0xf20f59, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "orpd", 2, 0x660f56, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "shufpd", 3, 0x660fc6, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "sqrtpd", 2, 0x660f51, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "sqrtsd", 2, 0xf20f51, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "subpd", 2, 0x660f5c, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "subsd", 2, 0xf20f5c, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "ucomisd", 2, 0x660f2e, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "unpckhpd", 2, 0x660f15, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "unpcklpd", 2, 0x660f14, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "xorpd", 2, 0x660f57, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtdq2pd", 2, 0xf30fe6, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtpd2dq", 2, 0xf20fe6, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtdq2ps", 2, 0xf5b, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtpd2pi", 2, 0x660f2d, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegMMX } },
+ { "cvtpd2ps", 2, 0x660f5a, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtps2pd", 2, 0xf5a, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtps2dq", 2, 0x660f5b, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtsd2si", 2, 0xf20f2d, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ Reg32|Reg64 } },
+ { "cvtsd2ss", 2, 0xf20f5a, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvtss2sd", 2, 0xf30f5a, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvttpd2pi", 2, 0x660f2c, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegMMX } },
+ { "cvttsd2si", 2, 0xf20f2c, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ Reg32|Reg64 } },
+ { "cvttpd2dq", 2, 0x660fe6, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cvttps2dq", 2, 0xf30f5b, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "maskmovdqu", 2, 0x660ff7, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ RegXMM } },
+ { "movdqa", 2, 0x660f6f, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movdqa", 2, 0x660f7f, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "movdqu", 2, 0xf30f6f, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movdqu", 2, 0xf30f7f, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM } },
+ { "movdq2q", 2, 0xf20fd6, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ RegMMX } },
+ { "movq2dq", 2, 0xf30fd6, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegMMX,
+ RegXMM } },
+ { "pmuludq", 2, 0xff4, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmuludq", 2, 0x660ff4, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pshufd", 3, 0x660f70, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pshufhw", 3, 0xf30f70, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pshuflw", 3, 0xf20f70, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pslldq", 2, 0x660f73, 0x7, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "psrldq", 2, 0x660f73, 0x3, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM } },
+ { "punpckhqdq", 2, 0x660f6d, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "punpcklqdq", 2, 0x660f6c, None, CpuSSE2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "addsubpd", 2, 0x660fd0, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "addsubps", 2, 0xf20fd0, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "cmpxchg16b", 1, 0xfc7, 0x1, CpuSSE3|Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fisttp", 1, 0xdf, 0x1, CpuSSE3,
+ Modrm|FloatMF|No_bSuf|No_wSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fisttp", 1, 0xdd, 0x1, CpuSSE3,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "fisttpll", 1, 0xdd, 0x1, CpuSSE3,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "haddpd", 2, 0x660f7c, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "haddps", 2, 0xf20f7c, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "hsubpd", 2, 0x660f7d, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "hsubps", 2, 0xf20f7d, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "lddqu", 2, 0xf20ff0, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "monitor", 0, 0xf01, 0xc8, CpuSSE3,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "monitor", 3, 0xf01, 0xc8, CpuSSE3|CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { Reg16|Reg32,
+ Reg32,
+ Reg32 } },
+ { "monitor", 3, 0xf01, 0xc8, CpuSSE3|Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt|NoRex64,
+ { Reg32|Reg64,
+ Reg64,
+ Reg64 } },
+ { "movddup", 2, 0xf20f12, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movshdup", 2, 0xf30f16, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movsldup", 2, 0xf30f12, None, CpuSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "mwait", 0, 0xf01, 0xc9, CpuSSE3,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "mwait", 2, 0xf01, 0xc9, CpuSSE3|CpuNo64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { Reg32,
+ Reg32 } },
+ { "mwait", 2, 0xf01, 0xc9, CpuSSE3|Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt|NoRex64,
+ { Reg64,
+ Reg64 } },
+ { "vmcall", 0, 0xf01, 0xc1, CpuVMX,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmclear", 1, 0x660fc7, 0x6, CpuVMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "vmlaunch", 0, 0xf01, 0xc2, CpuVMX,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmresume", 0, 0xf01, 0xc3, CpuVMX,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmptrld", 1, 0xfc7, 0x6, CpuVMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "vmptrst", 1, 0xfc7, 0x7, CpuVMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "vmread", 2, 0xf78, None, CpuVMX|CpuNo64,
+ Modrm|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg32,
+ Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "vmread", 2, 0xf78, None, CpuVMX|Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Reg64,
+ Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "vmwrite", 2, 0xf79, None, CpuVMX|CpuNo64,
+ Modrm|No_bSuf|No_wSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32 } },
+ { "vmwrite", 2, 0xf79, None, CpuVMX|Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|NoRex64,
+ { Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "vmxoff", 0, 0xf01, 0xc4, CpuVMX,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmxon", 1, 0xf30fc7, 0x6, CpuVMX,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|NoRex64,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "phaddw", 2, 0xf3801, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "phaddw", 2, 0x660f3801, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "phaddd", 2, 0xf3802, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "phaddd", 2, 0x660f3802, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "phaddsw", 2, 0xf3803, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "phaddsw", 2, 0x660f3803, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "phsubw", 2, 0xf3805, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "phsubw", 2, 0x660f3805, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "phsubd", 2, 0xf3806, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "phsubd", 2, 0x660f3806, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "phsubsw", 2, 0xf3807, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "phsubsw", 2, 0x660f3807, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmaddubsw", 2, 0xf3804, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmaddubsw", 2, 0x660f3804, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmulhrsw", 2, 0xf380b, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmulhrsw", 2, 0x660f380b, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pshufb", 2, 0xf3800, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pshufb", 2, 0x660f3800, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psignb", 2, 0xf3808, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psignb", 2, 0x660f3808, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psignw", 2, 0xf3809, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psignw", 2, 0x660f3809, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "psignd", 2, 0xf380a, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "psignd", 2, 0x660f380a, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "palignr", 3, 0xf3a0f, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "palignr", 3, 0x660f3a0f, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pabsb", 2, 0xf381c, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pabsb", 2, 0x660f381c, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pabsw", 2, 0xf381d, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pabsw", 2, 0x660f381d, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pabsd", 2, 0xf381e, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pabsd", 2, 0x660f381e, None, CpuSSSE3,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "blendpd", 3, 0x660f3a0d, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "blendps", 3, 0x660f3a0c, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "blendvpd", 3, 0x660f3815, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|RegKludge,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "blendvps", 3, 0x660f3814, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|RegKludge,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "dppd", 3, 0x660f3a41, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "dpps", 3, 0x660f3a40, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "extractps", 3, 0x660f3a17, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM,
+ Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "insertps", 3, 0x660f3a21, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "movntdqa", 2, 0x660f382a, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "mpsadbw", 3, 0x660f3a42, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "packusdw", 2, 0x660f382b, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pblendvb", 3, 0x660f3810, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|RegKludge,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pblendw", 3, 0x660f3a0e, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpeqq", 2, 0x660f3829, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pextrb", 3, 0x660f3a14, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM,
+ Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "pextrd", 3, 0x660f3a16, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM,
+ Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "pextrq", 3, 0x660f3a16, None, CpuSSE4_1|Cpu64,
+ Modrm|Size64|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ RegXMM,
+ Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "phminposuw", 2, 0x660f3841, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pinsrb", 3, 0x660f3a20, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "pinsrd", 3, 0x660f3a22, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "pinsrq", 3, 0x660f3a22, None, CpuSSE4_1|Cpu64,
+ Modrm|Size64|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ RegXMM } },
+ { "pmaxsb", 2, 0x660f383c, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmaxsd", 2, 0x660f383d, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmaxud", 2, 0x660f383f, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmaxuw", 2, 0x660f383e, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pminsb", 2, 0x660f3838, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pminsd", 2, 0x660f3839, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pminud", 2, 0x660f383b, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pminuw", 2, 0x660f383a, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovsxbw", 2, 0x660f3820, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovsxbd", 2, 0x660f3821, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovsxbq", 2, 0x660f3822, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovsxwd", 2, 0x660f3823, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovsxwq", 2, 0x660f3824, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovsxdq", 2, 0x660f3825, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovzxbw", 2, 0x660f3830, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovzxbd", 2, 0x660f3831, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovzxbq", 2, 0x660f3832, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovzxwd", 2, 0x660f3833, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovzxwq", 2, 0x660f3834, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmovzxdq", 2, 0x660f3835, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmuldq", 2, 0x660f3828, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pmulld", 2, 0x660f3840, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "ptest", 2, 0x660f3817, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "roundpd", 3, 0x660f3a09, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "roundps", 3, 0x660f3a08, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "roundsd", 3, 0x660f3a0b, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "roundss", 3, 0x660f3a0a, None, CpuSSE4_1,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpgtq", 2, 0x660f3837, None, CpuSSE4_2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpestri", 3, 0x660f3a61, None, CpuSSE4_2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpestrm", 3, 0x660f3a60, None, CpuSSE4_2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpistri", 3, 0x660f3a63, None, CpuSSE4_2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "pcmpistrm", 3, 0x660f3a62, None, CpuSSE4_2,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegXMM,
+ RegXMM } },
+ { "crc32", 2, 0xf20f38f1, None, CpuSSE4_2,
+ Modrm|No_bSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg16|Reg32|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32 } },
+ { "crc32", 2, 0xf20f38f1, None, CpuSSE4_2|Cpu64,
+ Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_xSuf|Rex64,
+ { Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "crc32", 2, 0xf20f38f0, None, CpuSSE4_2,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32 } },
+ { "crc32", 2, 0xf20f38f0, None, CpuSSE4_2|Cpu64,
+ Modrm|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|Rex64,
+ { Reg8|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg64 } },
+ { "prefetch", 1, 0xf0d, 0x0, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "prefetchw", 1, 0xf0d, 0x1, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "femms", 0, 0xf0e, None, Cpu3dnow,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "pavgusb", 2, 0xf0f, 0xbf, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pf2id", 2, 0xf0f, 0x1d, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pf2iw", 2, 0xf0f, 0x1c, Cpu3dnowA,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfacc", 2, 0xf0f, 0xae, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfadd", 2, 0xf0f, 0x9e, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfcmpeq", 2, 0xf0f, 0xb0, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfcmpge", 2, 0xf0f, 0x90, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfcmpgt", 2, 0xf0f, 0xa0, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfmax", 2, 0xf0f, 0xa4, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfmin", 2, 0xf0f, 0x94, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfmul", 2, 0xf0f, 0xb4, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfnacc", 2, 0xf0f, 0x8a, Cpu3dnowA,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfpnacc", 2, 0xf0f, 0x8e, Cpu3dnowA,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfrcp", 2, 0xf0f, 0x96, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfrcpit1", 2, 0xf0f, 0xa6, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfrcpit2", 2, 0xf0f, 0xb6, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfrsqit1", 2, 0xf0f, 0xa7, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfrsqrt", 2, 0xf0f, 0x97, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfsub", 2, 0xf0f, 0x9a, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pfsubr", 2, 0xf0f, 0xaa, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pi2fd", 2, 0xf0f, 0xd, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pi2fw", 2, 0xf0f, 0xc, Cpu3dnowA,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pmulhrw", 2, 0xf0f, 0xb7, Cpu3dnow,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "pswapd", 2, 0xf0f, 0xbb, Cpu3dnowA,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S|RegMMX,
+ RegMMX } },
+ { "syscall", 0, 0xf05, None, CpuK6,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { 0 } },
+ { "sysret", 0, 0xf07, None, CpuK6,
+ DefaultSize|No_bSuf|No_wSuf|No_sSuf|No_xSuf,
+ { 0 } },
+ { "swapgs", 0, 0xf01, 0xf8, Cpu64,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "rdtscp", 0, 0xf01, 0xf9, CpuSledgehammer,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "clgi", 0, 0xf01, 0xdd, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "invlpga", 0, 0xf01, 0xdf, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "invlpga", 2, 0xf01, 0xdf, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg32 } },
+ { "skinit", 0, 0xf01, 0xde, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "skinit", 1, 0xf01, 0xde, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "stgi", 0, 0xf01, 0xdc, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmload", 0, 0xf01, 0xda, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmload", 1, 0xf01, 0xda, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "vmmcall", 0, 0xf01, 0xd9, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmrun", 0, 0xf01, 0xd8, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmrun", 1, 0xf01, 0xd8, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "vmsave", 0, 0xf01, 0xdb, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { 0 } },
+ { "vmsave", 1, 0xf01, 0xdb, CpuSVME,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|ImmExt,
+ { BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movntsd", 2, 0xf20f2b, None, CpuSSE4a,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "movntss", 2, 0xf30f2b, None, CpuSSE4a,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ BaseIndex|Disp8|Disp16|Disp32|Disp32S } },
+ { "extrq", 3, 0x660f78, 0x0, CpuSSE4a,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ Imm8,
+ RegXMM } },
+ { "extrq", 2, 0x660f79, None, CpuSSE4a,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ RegXMM } },
+ { "insertq", 2, 0xf20f79, None, CpuSSE4a,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { RegXMM,
+ RegXMM } },
+ { "insertq", 4, 0xf20f78, None, CpuSSE4a,
+ Modrm|IgnoreSize|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf,
+ { Imm8,
+ Imm8,
+ RegXMM,
+ RegXMM } },
+ { "popcnt", 2, 0xf30fb8, None, CpuABM|CpuSSE4_2,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "lzcnt", 2, 0xf30fbd, None, CpuABM,
+ Modrm|No_bSuf|No_sSuf|No_xSuf,
+ { Reg16|Reg32|Reg64|BaseIndex|Disp8|Disp16|Disp32|Disp32S,
+ Reg16|Reg32|Reg64 } },
+ { "xstore-rng", 0, 0xfa7, 0xc0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcrypt-ecb", 0, 0xf30fa7, 0xc8, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcrypt-cbc", 0, 0xf30fa7, 0xd0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcrypt-ctr", 0, 0xf30fa7, 0xd8, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcrypt-cfb", 0, 0xf30fa7, 0xe0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcrypt-ofb", 0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "montmul", 0, 0xf30fa6, 0xc0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xsha1", 0, 0xf30fa6, 0xc8, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xsha256", 0, 0xf30fa6, 0xd0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xstorerng", 0, 0xfa7, 0xc0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcryptecb", 0, 0xf30fa7, 0xc8, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcryptcbc", 0, 0xf30fa7, 0xd0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcryptctr", 0, 0xf30fa7, 0xd8, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcryptcfb", 0, 0xf30fa7, 0xe0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xcryptofb", 0, 0xf30fa7, 0xe8, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { "xstore", 0, 0xfa7, 0xc0, Cpu686|CpuPadLock,
+ No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_xSuf|IsString|ImmExt,
+ { 0 } },
+ { NULL, 0, 0, 0, 0, 0, { 0 } }
+};
+
+/* i386 register table. */
+
+const reg_entry i386_regtab[] =
+{
+ { "st", FloatReg|FloatAcc, 0, 0 },
+ { "al", Reg8|Acc, 0, 0 },
+ { "cl", Reg8|ShiftCount, 0, 1 },
+ { "dl", Reg8, 0, 2 },
+ { "bl", Reg8, 0, 3 },
+ { "ah", Reg8, 0, 4 },
+ { "ch", Reg8, 0, 5 },
+ { "dh", Reg8, 0, 6 },
+ { "bh", Reg8, 0, 7 },
+ { "axl", Reg8|Acc, RegRex64, 0 },
+ { "cxl", Reg8, RegRex64, 1 },
+ { "dxl", Reg8, RegRex64, 2 },
+ { "bxl", Reg8, RegRex64, 3 },
+ { "spl", Reg8, RegRex64, 4 },
+ { "bpl", Reg8, RegRex64, 5 },
+ { "sil", Reg8, RegRex64, 6 },
+ { "dil", Reg8, RegRex64, 7 },
+ { "r8b", Reg8, RegRex|RegRex64, 0 },
+ { "r9b", Reg8, RegRex|RegRex64, 1 },
+ { "r10b", Reg8, RegRex|RegRex64, 2 },
+ { "r11b", Reg8, RegRex|RegRex64, 3 },
+ { "r12b", Reg8, RegRex|RegRex64, 4 },
+ { "r13b", Reg8, RegRex|RegRex64, 5 },
+ { "r14b", Reg8, RegRex|RegRex64, 6 },
+ { "r15b", Reg8, RegRex|RegRex64, 7 },
+ { "ax", Reg16|Acc, 0, 0 },
+ { "cx", Reg16, 0, 1 },
+ { "dx", Reg16|InOutPortReg, 0, 2 },
+ { "bx", Reg16|BaseIndex, 0, 3 },
+ { "sp", Reg16, 0, 4 },
+ { "bp", Reg16|BaseIndex, 0, 5 },
+ { "si", Reg16|BaseIndex, 0, 6 },
+ { "di", Reg16|BaseIndex, 0, 7 },
+ { "r8w", Reg16, RegRex, 0 },
+ { "r9w", Reg16, RegRex, 1 },
+ { "r10w", Reg16, RegRex, 2 },
+ { "r11w", Reg16, RegRex, 3 },
+ { "r12w", Reg16, RegRex, 4 },
+ { "r13w", Reg16, RegRex, 5 },
+ { "r14w", Reg16, RegRex, 6 },
+ { "r15w", Reg16, RegRex, 7 },
+ { "eax", Reg32|BaseIndex|Acc, 0, 0 },
+ { "ecx", Reg32|BaseIndex, 0, 1 },
+ { "edx", Reg32|BaseIndex, 0, 2 },
+ { "ebx", Reg32|BaseIndex, 0, 3 },
+ { "esp", Reg32, 0, 4 },
+ { "ebp", Reg32|BaseIndex, 0, 5 },
+ { "esi", Reg32|BaseIndex, 0, 6 },
+ { "edi", Reg32|BaseIndex, 0, 7 },
+ { "r8d", Reg32|BaseIndex, RegRex, 0 },
+ { "r9d", Reg32|BaseIndex, RegRex, 1 },
+ { "r10d", Reg32|BaseIndex, RegRex, 2 },
+ { "r11d", Reg32|BaseIndex, RegRex, 3 },
+ { "r12d", Reg32|BaseIndex, RegRex, 4 },
+ { "r13d", Reg32|BaseIndex, RegRex, 5 },
+ { "r14d", Reg32|BaseIndex, RegRex, 6 },
+ { "r15d", Reg32|BaseIndex, RegRex, 7 },
+ { "rax", Reg64|BaseIndex|Acc, 0, 0 },
+ { "rcx", Reg64|BaseIndex, 0, 1 },
+ { "rdx", Reg64|BaseIndex, 0, 2 },
+ { "rbx", Reg64|BaseIndex, 0, 3 },
+ { "rsp", Reg64, 0, 4 },
+ { "rbp", Reg64|BaseIndex, 0, 5 },
+ { "rsi", Reg64|BaseIndex, 0, 6 },
+ { "rdi", Reg64|BaseIndex, 0, 7 },
+ { "r8", Reg64|BaseIndex, RegRex, 0 },
+ { "r9", Reg64|BaseIndex, RegRex, 1 },
+ { "r10", Reg64|BaseIndex, RegRex, 2 },
+ { "r11", Reg64|BaseIndex, RegRex, 3 },
+ { "r12", Reg64|BaseIndex, RegRex, 4 },
+ { "r13", Reg64|BaseIndex, RegRex, 5 },
+ { "r14", Reg64|BaseIndex, RegRex, 6 },
+ { "r15", Reg64|BaseIndex, RegRex, 7 },
+ { "es", SReg2, 0, 0 },
+ { "cs", SReg2, 0, 1 },
+ { "ss", SReg2, 0, 2 },
+ { "ds", SReg2, 0, 3 },
+ { "fs", SReg3, 0, 4 },
+ { "gs", SReg3, 0, 5 },
+ { "cr0", Control, 0, 0 },
+ { "cr1", Control, 0, 1 },
+ { "cr2", Control, 0, 2 },
+ { "cr3", Control, 0, 3 },
+ { "cr4", Control, 0, 4 },
+ { "cr5", Control, 0, 5 },
+ { "cr6", Control, 0, 6 },
+ { "cr7", Control, 0, 7 },
+ { "cr8", Control, RegRex, 0 },
+ { "cr9", Control, RegRex, 1 },
+ { "cr10", Control, RegRex, 2 },
+ { "cr11", Control, RegRex, 3 },
+ { "cr12", Control, RegRex, 4 },
+ { "cr13", Control, RegRex, 5 },
+ { "cr14", Control, RegRex, 6 },
+ { "cr15", Control, RegRex, 7 },
+ { "db0", Debug, 0, 0 },
+ { "db1", Debug, 0, 1 },
+ { "db2", Debug, 0, 2 },
+ { "db3", Debug, 0, 3 },
+ { "db4", Debug, 0, 4 },
+ { "db5", Debug, 0, 5 },
+ { "db6", Debug, 0, 6 },
+ { "db7", Debug, 0, 7 },
+ { "db8", Debug, RegRex, 0 },
+ { "db9", Debug, RegRex, 1 },
+ { "db10", Debug, RegRex, 2 },
+ { "db11", Debug, RegRex, 3 },
+ { "db12", Debug, RegRex, 4 },
+ { "db13", Debug, RegRex, 5 },
+ { "db14", Debug, RegRex, 6 },
+ { "db15", Debug, RegRex, 7 },
+ { "dr0", Debug, 0, 0 },
+ { "dr1", Debug, 0, 1 },
+ { "dr2", Debug, 0, 2 },
+ { "dr3", Debug, 0, 3 },
+ { "dr4", Debug, 0, 4 },
+ { "dr5", Debug, 0, 5 },
+ { "dr6", Debug, 0, 6 },
+ { "dr7", Debug, 0, 7 },
+ { "dr8", Debug, RegRex, 0 },
+ { "dr9", Debug, RegRex, 1 },
+ { "dr10", Debug, RegRex, 2 },
+ { "dr11", Debug, RegRex, 3 },
+ { "dr12", Debug, RegRex, 4 },
+ { "dr13", Debug, RegRex, 5 },
+ { "dr14", Debug, RegRex, 6 },
+ { "dr15", Debug, RegRex, 7 },
+ { "tr0", Test, 0, 0 },
+ { "tr1", Test, 0, 1 },
+ { "tr2", Test, 0, 2 },
+ { "tr3", Test, 0, 3 },
+ { "tr4", Test, 0, 4 },
+ { "tr5", Test, 0, 5 },
+ { "tr6", Test, 0, 6 },
+ { "tr7", Test, 0, 7 },
+ { "mm0", RegMMX, 0, 0 },
+ { "mm1", RegMMX, 0, 1 },
+ { "mm2", RegMMX, 0, 2 },
+ { "mm3", RegMMX, 0, 3 },
+ { "mm4", RegMMX, 0, 4 },
+ { "mm5", RegMMX, 0, 5 },
+ { "mm6", RegMMX, 0, 6 },
+ { "mm7", RegMMX, 0, 7 },
+ { "xmm0", RegXMM, 0, 0 },
+ { "xmm1", RegXMM, 0, 1 },
+ { "xmm2", RegXMM, 0, 2 },
+ { "xmm3", RegXMM, 0, 3 },
+ { "xmm4", RegXMM, 0, 4 },
+ { "xmm5", RegXMM, 0, 5 },
+ { "xmm6", RegXMM, 0, 6 },
+ { "xmm7", RegXMM, 0, 7 },
+ { "xmm8", RegXMM, RegRex, 0 },
+ { "xmm9", RegXMM, RegRex, 1 },
+ { "xmm10", RegXMM, RegRex, 2 },
+ { "xmm11", RegXMM, RegRex, 3 },
+ { "xmm12", RegXMM, RegRex, 4 },
+ { "xmm13", RegXMM, RegRex, 5 },
+ { "xmm14", RegXMM, RegRex, 6 },
+ { "xmm15", RegXMM, RegRex, 7 },
+ { "rip", BaseIndex, 0, 0 },
+ { "st(0)", FloatReg|FloatAcc, 0, 0 },
+ { "st(1)", FloatReg, 0, 1 },
+ { "st(2)", FloatReg, 0, 2 },
+ { "st(3)", FloatReg, 0, 3 },
+ { "st(4)", FloatReg, 0, 4 },
+ { "st(5)", FloatReg, 0, 5 },
+ { "st(6)", FloatReg, 0, 6 },
+ { "st(7)", FloatReg, 0, 7 },
+};
+
+const unsigned int i386_regtab_size = ARRAY_SIZE (i386_regtab);
diff --git a/contrib/binutils/opcodes/ia64-gen.c b/contrib/binutils/opcodes/ia64-gen.c
index 5562283..b1d0225 100644
--- a/contrib/binutils/opcodes/ia64-gen.c
+++ b/contrib/binutils/opcodes/ia64-gen.c
@@ -467,7 +467,7 @@ fetch_insn_class (const char *full_name, int create)
int ind;
int is_class = 0;
- if (strncmp (full_name, "IC:", 3) == 0)
+ if (CONST_STRNEQ (full_name, "IC:"))
{
name = xstrdup (full_name + 3);
is_class = 1;
@@ -749,7 +749,7 @@ parse_resource_users (ref, usersp, nusersp, notesp)
are read. Only create new classes if it's *not* an insn class,
or if it's a composite class (which wouldn't necessarily be in the IC
table). */
- if (strncmp (name, "IC:", 3) != 0 || xsect != NULL)
+ if (! CONST_STRNEQ (name, "IC:") || xsect != NULL)
create = 1;
iclass = fetch_insn_class (name, create);
@@ -1034,7 +1034,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
if (ic->comment)
{
- if (!strncmp (ic->comment, "Format", 6))
+ if (CONST_STRNEQ (ic->comment, "Format"))
{
/* Assume that the first format seen is the most restrictive, and
only keep a later one if it looks like it's more restrictive. */
@@ -1050,7 +1050,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
else
format = ic->comment;
}
- else if (!strncmp (ic->comment, "Field", 5))
+ else if (CONST_STRNEQ (ic->comment, "Field"))
{
if (field)
warn (_("overlapping field %s->%s\n"),
@@ -1064,7 +1064,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
instructions. */
if (ic->nsubs == 0 && ic->nxsubs == 0)
{
- int is_mov = strncmp (idesc->name, "mov", 3) == 0;
+ int is_mov = CONST_STRNEQ (idesc->name, "mov");
int plain_mov = strcmp (idesc->name, "mov") == 0;
int len = strlen(ic->name);
@@ -1123,32 +1123,32 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
if (resolved && format)
{
- if (strncmp (idesc->name, "dep", 3) == 0
+ if (CONST_STRNEQ (idesc->name, "dep")
&& strstr (format, "I13") != NULL)
resolved = idesc->operands[1] == IA64_OPND_IMM8;
- else if (strncmp (idesc->name, "chk", 3) == 0
+ else if (CONST_STRNEQ (idesc->name, "chk")
&& strstr (format, "M21") != NULL)
resolved = idesc->operands[0] == IA64_OPND_F2;
- else if (strncmp (idesc->name, "lfetch", 6) == 0)
+ else if (CONST_STRNEQ (idesc->name, "lfetch"))
resolved = (strstr (format, "M14 M15") != NULL
&& (idesc->operands[1] == IA64_OPND_R2
|| idesc->operands[1] == IA64_OPND_IMM9b));
- else if (strncmp (idesc->name, "br.call", 7) == 0
+ else if (CONST_STRNEQ (idesc->name, "br.call")
&& strstr (format, "B5") != NULL)
resolved = idesc->operands[1] == IA64_OPND_B2;
- else if (strncmp (idesc->name, "br.call", 7) == 0
+ else if (CONST_STRNEQ (idesc->name, "br.call")
&& strstr (format, "B3") != NULL)
resolved = idesc->operands[1] == IA64_OPND_TGT25c;
- else if (strncmp (idesc->name, "brp", 3) == 0
+ else if (CONST_STRNEQ (idesc->name, "brp")
&& strstr (format, "B7") != NULL)
resolved = idesc->operands[0] == IA64_OPND_B2;
else if (strcmp (ic->name, "invala") == 0)
resolved = strcmp (idesc->name, ic->name) == 0;
- else if (strncmp (idesc->name, "st", 2) == 0
+ else if (CONST_STRNEQ (idesc->name, "st")
&& (strstr (format, "M5") != NULL
|| strstr (format, "M10") != NULL))
resolved = idesc->flags & IA64_OPCODE_POSTINC;
- else if (strncmp (idesc->name, "ld", 2) == 0
+ else if (CONST_STRNEQ (idesc->name, "ld")
&& (strstr (format, "M2 M3") != NULL
|| strstr (format, "M12") != NULL
|| strstr (format, "M7 M8") != NULL))
@@ -1161,7 +1161,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
plain brl matches brl.cond. */
if (!resolved
&& (strcmp (idesc->name, "brl") == 0
- || strncmp (idesc->name, "brl.", 4) == 0)
+ || CONST_STRNEQ (idesc->name, "brl."))
&& strcmp (ic->name, "brl.cond") == 0)
{
resolved = 1;
@@ -1170,7 +1170,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
/* Misc br variations ('.cond' is optional). */
if (!resolved
&& (strcmp (idesc->name, "br") == 0
- || strncmp (idesc->name, "br.", 3) == 0)
+ || CONST_STRNEQ (idesc->name, "br."))
&& strcmp (ic->name, "br.cond") == 0)
{
if (format)
@@ -1183,7 +1183,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
}
/* probe variations. */
- if (!resolved && strncmp (idesc->name, "probe", 5) == 0)
+ if (!resolved && CONST_STRNEQ (idesc->name, "probe"))
{
resolved = strcmp (ic->name, "probe") == 0
&& !((strstr (idesc->name, "fault") != NULL)
@@ -1217,7 +1217,7 @@ in_iclass (struct ia64_opcode *idesc, struct iclass *ic,
}
/* Some variants of mov and mov.[im]. */
- if (!resolved && strncmp (ic->name, "mov_", 4) == 0)
+ if (!resolved && CONST_STRNEQ (ic->name, "mov_"))
resolved = in_iclass_mov_x (idesc, ic, format, field);
}
@@ -1476,13 +1476,13 @@ lookup_specifier (const char *name)
warn (_("Don't know how to specify # dependency %s\n"),
name);
}
- else if (strncmp (name, "AR[FPSR]", 8) == 0)
+ else if (CONST_STRNEQ (name, "AR[FPSR]"))
return IA64_RS_AR_FPSR;
- else if (strncmp (name, "AR[", 3) == 0)
+ else if (CONST_STRNEQ (name, "AR["))
return IA64_RS_ARX;
- else if (strncmp (name, "CR[", 3) == 0)
+ else if (CONST_STRNEQ (name, "CR["))
return IA64_RS_CRX;
- else if (strncmp (name, "PSR.", 4) == 0)
+ else if (CONST_STRNEQ (name, "PSR."))
return IA64_RS_PSR;
else if (strcmp (name, "InService*") == 0)
return IA64_RS_INSERVICE;
@@ -2448,7 +2448,7 @@ insert_opcode_dependencies (opc, cmp)
int j;
if (strcmp (opc->name, "cmp.eq.and") == 0
- && strncmp (rs->name, "PR%", 3) == 0
+ && CONST_STRNEQ (rs->name, "PR%")
&& rs->mode == 1)
no_class_found = 99;
@@ -2459,7 +2459,7 @@ insert_opcode_dependencies (opc, cmp)
if (in_iclass (opc, ics[rs->regs[j]], NULL, NULL, &ic_note))
{
/* We can ignore ic_note 11 for non PR resources. */
- if (ic_note == 11 && strncmp (rs->name, "PR", 2) != 0)
+ if (ic_note == 11 && ! CONST_STRNEQ (rs->name, "PR"))
ic_note = 0;
if (ic_note != 0 && rs->regnotes[j] != 0
@@ -2487,7 +2487,7 @@ insert_opcode_dependencies (opc, cmp)
if (in_iclass (opc, ics[rs->chks[j]], NULL, NULL, &ic_note))
{
/* We can ignore ic_note 11 for non PR resources. */
- if (ic_note == 11 && strncmp (rs->name, "PR", 2) != 0)
+ if (ic_note == 11 && ! CONST_STRNEQ (rs->name, "PR"))
ic_note = 0;
if (ic_note != 0 && rs->chknotes[j] != 0
diff --git a/contrib/binutils/opcodes/mep-asm.c b/contrib/binutils/opcodes/mep-asm.c
new file mode 100644
index 0000000..66f20a7
--- /dev/null
+++ b/contrib/binutils/opcodes/mep-asm.c
@@ -0,0 +1,1398 @@
+/* Assembler interface for targets using CGEN. -*- C -*-
+ CGEN: Cpu tools GENerator
+
+ THIS FILE IS MACHINE GENERATED WITH CGEN.
+ - the resultant file is machine generated, cgen-asm.in isn't
+
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005
+ Free Software Foundation, Inc.
+
+ This file is part of the GNU Binutils and GDB, the GNU debugger.
+
+ 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.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* ??? Eventually more and more of this stuff can go to cpu-independent files.
+ Keep that in mind. */
+
+#include "sysdep.h"
+#include <stdio.h>
+#include "ansidecl.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "mep-desc.h"
+#include "mep-opc.h"
+#include "opintl.h"
+#include "xregex.h"
+#include "libiberty.h"
+#include "safe-ctype.h"
+
+#undef min
+#define min(a,b) ((a) < (b) ? (a) : (b))
+#undef max
+#define max(a,b) ((a) > (b) ? (a) : (b))
+
+static const char * parse_insn_normal
+ (CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *);
+
+/* -- assembler routines inserted here. */
+
+/* -- asm.c */
+
+#define CGEN_VALIDATE_INSN_SUPPORTED
+
+ const char * parse_csrn (CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *);
+ const char * parse_tpreg (CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *);
+ const char * parse_spreg (CGEN_CPU_DESC, const char **, CGEN_KEYWORD *, long *);
+ const char * parse_mep_align (CGEN_CPU_DESC, const char **, enum cgen_operand_type, long *);
+ const char * parse_mep_alignu (CGEN_CPU_DESC, const char **, enum cgen_operand_type, unsigned long *);
+static const char * parse_signed16 (CGEN_CPU_DESC, const char **, int, long *);
+static const char * parse_unsigned16 (CGEN_CPU_DESC, const char **, int, unsigned long *);
+static const char * parse_lo16 (CGEN_CPU_DESC, const char **, int, long *, long);
+static const char * parse_unsigned7 (CGEN_CPU_DESC, const char **, enum cgen_operand_type, unsigned long *);
+static const char * parse_zero (CGEN_CPU_DESC, const char **, int, long *);
+
+const char *
+parse_csrn (CGEN_CPU_DESC cd, const char **strp,
+ CGEN_KEYWORD *keyword_table, long *field)
+{
+ const char *err;
+ unsigned long value;
+
+ err = cgen_parse_keyword (cd, strp, keyword_table, field);
+ if (!err)
+ return NULL;
+
+ err = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_CSRN_IDX, & value);
+ if (err)
+ return err;
+ *field = value;
+ return NULL;
+}
+
+/* begin-cop-ip-parse-handlers */
+static const char *
+parse_fmax_cr (CGEN_CPU_DESC cd,
+ const char **strp,
+ CGEN_KEYWORD *keyword_table ATTRIBUTE_UNUSED,
+ long *field)
+{
+ return cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_cr_fmax, field);
+}
+static const char *
+parse_fmax_ccr (CGEN_CPU_DESC cd,
+ const char **strp,
+ CGEN_KEYWORD *keyword_table ATTRIBUTE_UNUSED,
+ long *field)
+{
+ return cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_ccr_fmax, field);
+}
+/* end-cop-ip-parse-handlers */
+
+const char *
+parse_tpreg (CGEN_CPU_DESC cd, const char ** strp,
+ CGEN_KEYWORD *keyword_table, long *field)
+{
+ const char *err;
+
+ err = cgen_parse_keyword (cd, strp, keyword_table, field);
+ if (err)
+ return err;
+ if (*field != 13)
+ return _("Only $tp or $13 allowed for this opcode");
+ return NULL;
+}
+
+const char *
+parse_spreg (CGEN_CPU_DESC cd, const char ** strp,
+ CGEN_KEYWORD *keyword_table, long *field)
+{
+ const char *err;
+
+ err = cgen_parse_keyword (cd, strp, keyword_table, field);
+ if (err)
+ return err;
+ if (*field != 15)
+ return _("Only $sp or $15 allowed for this opcode");
+ return NULL;
+}
+
+const char *
+parse_mep_align (CGEN_CPU_DESC cd, const char ** strp,
+ enum cgen_operand_type type, long *field)
+{
+ long lsbs = 0;
+ const char *err;
+
+ switch (type)
+ {
+ case MEP_OPERAND_PCREL8A2:
+ case MEP_OPERAND_PCREL12A2:
+ case MEP_OPERAND_PCREL17A2:
+ case MEP_OPERAND_PCREL24A2:
+ case MEP_OPERAND_CDISP8A2:
+ case MEP_OPERAND_CDISP8A4:
+ case MEP_OPERAND_CDISP8A8:
+ err = cgen_parse_signed_integer (cd, strp, type, field);
+ break;
+ case MEP_OPERAND_PCABS24A2:
+ case MEP_OPERAND_UDISP7:
+ case MEP_OPERAND_UDISP7A2:
+ case MEP_OPERAND_UDISP7A4:
+ case MEP_OPERAND_UIMM7A4:
+ case MEP_OPERAND_ADDR24A4:
+ err = cgen_parse_unsigned_integer (cd, strp, type, (unsigned long *) field);
+ break;
+ default:
+ abort();
+ }
+ if (err)
+ return err;
+ switch (type)
+ {
+ case MEP_OPERAND_UDISP7:
+ lsbs = 0;
+ break;
+ case MEP_OPERAND_PCREL8A2:
+ case MEP_OPERAND_PCREL12A2:
+ case MEP_OPERAND_PCREL17A2:
+ case MEP_OPERAND_PCREL24A2:
+ case MEP_OPERAND_PCABS24A2:
+ case MEP_OPERAND_UDISP7A2:
+ case MEP_OPERAND_CDISP8A2:
+ lsbs = *field & 1;
+ break;
+ case MEP_OPERAND_UDISP7A4:
+ case MEP_OPERAND_UIMM7A4:
+ case MEP_OPERAND_ADDR24A4:
+ case MEP_OPERAND_CDISP8A4:
+ lsbs = *field & 3;
+ break;
+ case MEP_OPERAND_CDISP8A8:
+ lsbs = *field & 7;
+ break;
+ default:
+ /* Safe assumption? */
+ abort ();
+ }
+ if (lsbs)
+ return "Value is not aligned enough";
+ return NULL;
+}
+
+const char *
+parse_mep_alignu (CGEN_CPU_DESC cd, const char ** strp,
+ enum cgen_operand_type type, unsigned long *field)
+{
+ return parse_mep_align (cd, strp, type, (long *) field);
+}
+
+
+/* Handle %lo(), %tpoff(), %sdaoff(), %hi(), and other signed
+ constants in a signed context. */
+
+static const char *
+parse_signed16 (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ long *valuep)
+{
+ return parse_lo16 (cd, strp, opindex, valuep, 1);
+}
+
+static const char *
+parse_lo16 (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ long *valuep,
+ long signedp)
+{
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ if (strncasecmp (*strp, "%lo(", 4) == 0)
+ {
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_LOW16,
+ & result_type, & value);
+ if (**strp != ')')
+ return _("missing `)'");
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value &= 0xffff;
+ if (signedp)
+ *valuep = (long)(short) value;
+ else
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (strncasecmp (*strp, "%hi(", 4) == 0)
+ {
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_HI16S,
+ & result_type, & value);
+ if (**strp != ')')
+ return _("missing `)'");
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value = (value + 0x8000) >> 16;
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (strncasecmp (*strp, "%uhi(", 5) == 0)
+ {
+ *strp += 5;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_HI16U,
+ & result_type, & value);
+ if (**strp != ')')
+ return _("missing `)'");
+ ++*strp;
+ if (errmsg == NULL
+ && result_type == CGEN_PARSE_OPERAND_RESULT_NUMBER)
+ value = value >> 16;
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (strncasecmp (*strp, "%sdaoff(", 8) == 0)
+ {
+ *strp += 8;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_GPREL,
+ NULL, & value);
+ if (**strp != ')')
+ return _("missing `)'");
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (strncasecmp (*strp, "%tpoff(", 7) == 0)
+ {
+ *strp += 7;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_TPREL,
+ NULL, & value);
+ if (**strp != ')')
+ return _("missing `)'");
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (**strp == '%')
+ return _("invalid %function() here");
+
+ return cgen_parse_signed_integer (cd, strp, opindex, valuep);
+}
+
+static const char *
+parse_unsigned16 (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ unsigned long *valuep)
+{
+ return parse_lo16 (cd, strp, opindex, (long *) valuep, 0);
+}
+
+/* A special case of parse_signed16 which accepts only the value zero. */
+
+static const char *
+parse_zero (CGEN_CPU_DESC cd, const char **strp, int opindex, long *valuep)
+{
+ const char *errmsg;
+ enum cgen_parse_operand_result result_type;
+ bfd_vma value;
+
+ /*fprintf(stderr, "dj: signed parse opindex `%s'\n", *strp);*/
+
+ /* Prevent ($ry) from being attempted as an expression on 'sw $rx,($ry)'.
+ It will fail and cause ry to be listed as an undefined symbol in the
+ listing. */
+ if (strncmp (*strp, "($", 2) == 0)
+ return "not zero"; /* any string will do -- will never be seen. */
+
+ if (strncasecmp (*strp, "%lo(", 4) == 0)
+ {
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_LOW16,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ if (errmsg == NULL
+ && (result_type != CGEN_PARSE_OPERAND_RESULT_NUMBER || value != 0))
+ return "not zero"; /* any string will do -- will never be seen. */
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (strncasecmp (*strp, "%hi(", 4) == 0)
+ {
+ *strp += 4;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_HI16S,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ if (errmsg == NULL
+ && (result_type != CGEN_PARSE_OPERAND_RESULT_NUMBER || value != 0))
+ return "not zero"; /* any string will do -- will never be seen. */
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (strncasecmp (*strp, "%uhi(", 5) == 0)
+ {
+ *strp += 5;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_HI16U,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ if (errmsg == NULL
+ && (result_type != CGEN_PARSE_OPERAND_RESULT_NUMBER || value != 0))
+ return "not zero"; /* any string will do -- will never be seen. */
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (strncasecmp (*strp, "%sdaoff(", 8) == 0)
+ {
+ *strp += 8;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_GPREL,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ if (errmsg == NULL
+ && (result_type != CGEN_PARSE_OPERAND_RESULT_NUMBER || value != 0))
+ return "not zero"; /* any string will do -- will never be seen. */
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (strncasecmp (*strp, "%tpoff(", 7) == 0)
+ {
+ *strp += 7;
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_MEP_TPREL,
+ &result_type, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ if (errmsg == NULL
+ && (result_type != CGEN_PARSE_OPERAND_RESULT_NUMBER || value != 0))
+ return "not zero"; /* any string will do -- will never be seen. */
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (**strp == '%')
+ return "invalid %function() here";
+
+ errmsg = cgen_parse_address (cd, strp, opindex, BFD_RELOC_NONE,
+ &result_type, &value);
+ if (errmsg == NULL
+ && (result_type != CGEN_PARSE_OPERAND_RESULT_NUMBER || value != 0))
+ return "not zero"; /* any string will do -- will never be seen. */
+
+ return errmsg;
+}
+
+static const char *
+parse_unsigned7 (CGEN_CPU_DESC cd, const char **strp,
+ enum cgen_operand_type opindex, unsigned long *valuep)
+{
+ const char *errmsg;
+ bfd_vma value;
+
+ /* fprintf(stderr, "dj: unsigned7 parse `%s'\n", *strp); */
+
+ if (strncasecmp (*strp, "%tpoff(", 7) == 0)
+ {
+ int reloc;
+ *strp += 7;
+ switch (opindex)
+ {
+ case MEP_OPERAND_UDISP7:
+ reloc = BFD_RELOC_MEP_TPREL7;
+ break;
+ case MEP_OPERAND_UDISP7A2:
+ reloc = BFD_RELOC_MEP_TPREL7A2;
+ break;
+ case MEP_OPERAND_UDISP7A4:
+ reloc = BFD_RELOC_MEP_TPREL7A4;
+ break;
+ default:
+ /* Safe assumption? */
+ abort ();
+ }
+ errmsg = cgen_parse_address (cd, strp, opindex, reloc,
+ NULL, &value);
+ if (**strp != ')')
+ return "missing `)'";
+ ++*strp;
+ *valuep = value;
+ return errmsg;
+ }
+
+ if (**strp == '%')
+ return _("invalid %function() here");
+
+ return parse_mep_alignu (cd, strp, opindex, valuep);
+}
+
+/* BEGIN LIGHTWEIGHT MACRO PROCESSOR. */
+
+#define MAXARGS 9
+
+typedef struct
+{
+ char *name;
+ char *expansion;
+} macro;
+
+typedef struct
+{
+ const char *start;
+ int len;
+} arg;
+
+macro macros[] =
+{
+ { "sizeof", "(`1.end + (- `1))"},
+ { "startof", "(`1 | 0)" },
+ { "align4", "(`1&(~3))"},
+/*{ "hi", "(((`1+0x8000)>>16) & 0xffff)" }, */
+/*{ "lo", "(`1 & 0xffff)" }, */
+/*{ "sdaoff", "((`1-__sdabase) & 0x7f)"}, */
+/*{ "tpoff", "((`1-__tpbase) & 0x7f)"}, */
+ { 0,0 }
+};
+
+static char * expand_string (const char *, int);
+
+static const char *
+mep_cgen_expand_macros_and_parse_operand
+ (CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *);
+
+static char *
+str_append (char *dest, const char *input, int len)
+{
+ char *new_dest;
+ int oldlen;
+
+ if (len == 0)
+ return dest;
+ /* printf("str_append: <<%s>>, <<%s>>, %d\n", dest, input, len); */
+ oldlen = (dest ? strlen(dest) : 0);
+ new_dest = realloc (dest, oldlen + len + 1);
+ memset (new_dest + oldlen, 0, len + 1);
+ return strncat (new_dest, input, len);
+}
+
+static macro *
+lookup_macro (const char *name)
+{
+ macro *m;
+
+ for (m = macros; m->name; ++m)
+ if (strncmp (m->name, name, strlen(m->name)) == 0)
+ return m;
+
+ return 0;
+}
+
+static char *
+expand_macro (arg *args, int narg, macro *mac)
+{
+ char *result = 0, *rescanned_result = 0;
+ char *e = mac->expansion;
+ char *mark = e;
+ int arg = 0;
+
+ /* printf("expanding macro %s with %d args\n", mac->name, narg + 1); */
+ while (*e)
+ {
+ if (*e == '`' &&
+ (*e+1) &&
+ ((*(e + 1) - '1') <= MAXARGS) &&
+ ((*(e + 1) - '1') <= narg))
+ {
+ result = str_append (result, mark, e - mark);
+ arg = (*(e + 1) - '1');
+ /* printf("replacing `%d with %s\n", arg+1, args[arg].start); */
+ result = str_append (result, args[arg].start, args[arg].len);
+ ++e;
+ mark = e+1;
+ }
+ ++e;
+ }
+
+ if (mark != e)
+ result = str_append (result, mark, e - mark);
+
+ if (result)
+ {
+ rescanned_result = expand_string (result, 0);
+ free (result);
+ return rescanned_result;
+ }
+ else
+ return result;
+}
+
+#define IN_TEXT 0
+#define IN_ARGS 1
+
+static char *
+expand_string (const char *in, int first_only)
+{
+ int num_expansions = 0;
+ int depth = 0;
+ int narg = -1;
+ arg args[MAXARGS];
+ int state = IN_TEXT;
+ const char *mark = in;
+ macro *macro = 0;
+
+ char *expansion = 0;
+ char *result = 0;
+
+ while (*in)
+ {
+ switch (state)
+ {
+ case IN_TEXT:
+ if (*in == '%' && *(in + 1) && (!first_only || num_expansions == 0))
+ {
+ macro = lookup_macro (in + 1);
+ if (macro)
+ {
+ /* printf("entering state %d at '%s'...\n", state, in); */
+ result = str_append (result, mark, in - mark);
+ mark = in;
+ in += 1 + strlen (macro->name);
+ while (*in == ' ') ++in;
+ if (*in != '(')
+ {
+ state = IN_TEXT;
+ macro = 0;
+ }
+ else
+ {
+ state = IN_ARGS;
+ narg = 0;
+ args[narg].start = in + 1;
+ args[narg].len = 0;
+ mark = in + 1;
+ }
+ }
+ }
+ break;
+ case IN_ARGS:
+ if (depth == 0)
+ {
+ switch (*in)
+ {
+ case ',':
+ narg++;
+ args[narg].start = (in + 1);
+ args[narg].len = 0;
+ break;
+ case ')':
+ state = IN_TEXT;
+ /* printf("entering state %d at '%s'...\n", state, in); */
+ if (macro)
+ {
+ expansion = 0;
+ expansion = expand_macro (args, narg, macro);
+ num_expansions++;
+ if (expansion)
+ {
+ result = str_append (result, expansion, strlen (expansion));
+ free (expansion);
+ }
+ }
+ else
+ {
+ result = str_append (result, mark, in - mark);
+ }
+ macro = 0;
+ mark = in + 1;
+ break;
+ case '(':
+ depth++;
+ default:
+ args[narg].len++;
+ break;
+ }
+ }
+ else
+ {
+ if (*in == ')')
+ depth--;
+ if (narg > -1)
+ args[narg].len++;
+ }
+
+ }
+ ++in;
+ }
+
+ if (mark != in)
+ result = str_append (result, mark, in - mark);
+
+ return result;
+}
+
+#undef IN_ARGS
+#undef IN_TEXT
+#undef MAXARGS
+
+
+/* END LIGHTWEIGHT MACRO PROCESSOR. */
+
+const char * mep_cgen_parse_operand
+ (CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *);
+
+const char *
+mep_cgen_expand_macros_and_parse_operand (CGEN_CPU_DESC cd, int opindex,
+ const char ** strp_in, CGEN_FIELDS * fields)
+{
+ const char * errmsg = NULL;
+ char *str = 0, *hold = 0;
+ const char **strp = 0;
+
+ /* Set up a new pointer to macro-expanded string. */
+ str = expand_string (*strp_in, 1);
+ /* fprintf (stderr, " expanded <<%s>> to <<%s>>\n", *strp_in, str); */
+
+ hold = str;
+ strp = (const char **)(&str);
+
+ errmsg = mep_cgen_parse_operand (cd, opindex, strp, fields);
+
+ /* Now work out the advance. */
+ if (strlen (str) == 0)
+ *strp_in += strlen (*strp_in);
+
+ else
+ {
+ if (strstr (*strp_in, str))
+ /* A macro-expansion was pulled off the front. */
+ *strp_in = strstr (*strp_in, str);
+ else
+ /* A non-macro-expansion was pulled off the front. */
+ *strp_in += (str - hold);
+ }
+
+ if (hold)
+ free (hold);
+
+ return errmsg;
+}
+
+#define CGEN_ASM_INIT_HOOK (cd->parse_operand = mep_cgen_expand_macros_and_parse_operand);
+
+/* -- dis.c */
+
+const char * mep_cgen_parse_operand
+ (CGEN_CPU_DESC, int, const char **, CGEN_FIELDS *);
+
+/* Main entry point for operand parsing.
+
+ This function is basically just a big switch statement. Earlier versions
+ used tables to look up the function to use, but
+ - if the table contains both assembler and disassembler functions then
+ the disassembler contains much of the assembler and vice-versa,
+ - there's a lot of inlining possibilities as things grow,
+ - using a switch statement avoids the function call overhead.
+
+ This function could be moved into `parse_insn_normal', but keeping it
+ separate makes clear the interface between `parse_insn_normal' and each of
+ the handlers. */
+
+const char *
+mep_cgen_parse_operand (CGEN_CPU_DESC cd,
+ int opindex,
+ const char ** strp,
+ CGEN_FIELDS * fields)
+{
+ const char * errmsg = NULL;
+ /* Used by scalar operands that still need to be parsed. */
+ long junk ATTRIBUTE_UNUSED;
+
+ switch (opindex)
+ {
+ case MEP_OPERAND_ADDR24A4 :
+ errmsg = parse_mep_alignu (cd, strp, MEP_OPERAND_ADDR24A4, (unsigned long *) (& fields->f_24u8a4n));
+ break;
+ case MEP_OPERAND_CALLNUM :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_CALLNUM, (unsigned long *) (& fields->f_callnum));
+ break;
+ case MEP_OPERAND_CCCC :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_CCCC, (unsigned long *) (& fields->f_rm));
+ break;
+ case MEP_OPERAND_CCRN :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_ccr, & fields->f_ccrn);
+ break;
+ case MEP_OPERAND_CDISP8 :
+ errmsg = cgen_parse_signed_integer (cd, strp, MEP_OPERAND_CDISP8, (long *) (& fields->f_8s24));
+ break;
+ case MEP_OPERAND_CDISP8A2 :
+ errmsg = parse_mep_align (cd, strp, MEP_OPERAND_CDISP8A2, (long *) (& fields->f_8s24a2));
+ break;
+ case MEP_OPERAND_CDISP8A4 :
+ errmsg = parse_mep_align (cd, strp, MEP_OPERAND_CDISP8A4, (long *) (& fields->f_8s24a4));
+ break;
+ case MEP_OPERAND_CDISP8A8 :
+ errmsg = parse_mep_align (cd, strp, MEP_OPERAND_CDISP8A8, (long *) (& fields->f_8s24a8));
+ break;
+ case MEP_OPERAND_CIMM4 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_CIMM4, (unsigned long *) (& fields->f_rn));
+ break;
+ case MEP_OPERAND_CIMM5 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_CIMM5, (unsigned long *) (& fields->f_5u24));
+ break;
+ case MEP_OPERAND_CODE16 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_CODE16, (unsigned long *) (& fields->f_16u16));
+ break;
+ case MEP_OPERAND_CODE24 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_CODE24, (unsigned long *) (& fields->f_24u4n));
+ break;
+ case MEP_OPERAND_CP_FLAG :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_ccr, & junk);
+ break;
+ case MEP_OPERAND_CRN :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_cr, & fields->f_crn);
+ break;
+ case MEP_OPERAND_CRN64 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_cr64, & fields->f_crn);
+ break;
+ case MEP_OPERAND_CRNX :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_cr, & fields->f_crnx);
+ break;
+ case MEP_OPERAND_CRNX64 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_cr64, & fields->f_crnx);
+ break;
+ case MEP_OPERAND_CSRN :
+ errmsg = parse_csrn (cd, strp, & mep_cgen_opval_h_csr, & fields->f_csrn);
+ break;
+ case MEP_OPERAND_CSRN_IDX :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_CSRN_IDX, (unsigned long *) (& fields->f_csrn));
+ break;
+ case MEP_OPERAND_DBG :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_DEPC :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_EPC :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_EXC :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_FMAX_CCRN :
+ errmsg = parse_fmax_ccr (cd, strp, & mep_cgen_opval_h_ccr, & fields->f_fmax_4_4);
+ break;
+ case MEP_OPERAND_FMAX_FRD :
+ errmsg = parse_fmax_cr (cd, strp, & mep_cgen_opval_h_cr, & fields->f_fmax_frd);
+ break;
+ case MEP_OPERAND_FMAX_FRD_INT :
+ errmsg = parse_fmax_cr (cd, strp, & mep_cgen_opval_h_cr, & fields->f_fmax_frd);
+ break;
+ case MEP_OPERAND_FMAX_FRM :
+ errmsg = parse_fmax_cr (cd, strp, & mep_cgen_opval_h_cr, & fields->f_fmax_frm);
+ break;
+ case MEP_OPERAND_FMAX_FRN :
+ errmsg = parse_fmax_cr (cd, strp, & mep_cgen_opval_h_cr, & fields->f_fmax_frn);
+ break;
+ case MEP_OPERAND_FMAX_FRN_INT :
+ errmsg = parse_fmax_cr (cd, strp, & mep_cgen_opval_h_cr, & fields->f_fmax_frn);
+ break;
+ case MEP_OPERAND_FMAX_RM :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_fmax_rm);
+ break;
+ case MEP_OPERAND_HI :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_LO :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_LP :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_MB0 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_MB1 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_ME0 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_ME1 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_NPC :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_OPT :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_PCABS24A2 :
+ errmsg = parse_mep_alignu (cd, strp, MEP_OPERAND_PCABS24A2, (unsigned long *) (& fields->f_24u5a2n));
+ break;
+ case MEP_OPERAND_PCREL12A2 :
+ errmsg = parse_mep_align (cd, strp, MEP_OPERAND_PCREL12A2, (long *) (& fields->f_12s4a2));
+ break;
+ case MEP_OPERAND_PCREL17A2 :
+ errmsg = parse_mep_align (cd, strp, MEP_OPERAND_PCREL17A2, (long *) (& fields->f_17s16a2));
+ break;
+ case MEP_OPERAND_PCREL24A2 :
+ errmsg = parse_mep_align (cd, strp, MEP_OPERAND_PCREL24A2, (long *) (& fields->f_24s5a2n));
+ break;
+ case MEP_OPERAND_PCREL8A2 :
+ errmsg = parse_mep_align (cd, strp, MEP_OPERAND_PCREL8A2, (long *) (& fields->f_8s8a2));
+ break;
+ case MEP_OPERAND_PSW :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_R0 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & junk);
+ break;
+ case MEP_OPERAND_R1 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & junk);
+ break;
+ case MEP_OPERAND_RL :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rl);
+ break;
+ case MEP_OPERAND_RM :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rm);
+ break;
+ case MEP_OPERAND_RMA :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rm);
+ break;
+ case MEP_OPERAND_RN :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RN3 :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3C :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3L :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3S :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3UC :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3UL :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3US :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RNC :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNL :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNS :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNUC :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNUL :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNUS :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & fields->f_rn);
+ break;
+ case MEP_OPERAND_SAR :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_csr, & junk);
+ break;
+ case MEP_OPERAND_SDISP16 :
+ errmsg = parse_signed16 (cd, strp, MEP_OPERAND_SDISP16, (long *) (& fields->f_16s16));
+ break;
+ case MEP_OPERAND_SIMM16 :
+ errmsg = parse_signed16 (cd, strp, MEP_OPERAND_SIMM16, (long *) (& fields->f_16s16));
+ break;
+ case MEP_OPERAND_SIMM6 :
+ errmsg = cgen_parse_signed_integer (cd, strp, MEP_OPERAND_SIMM6, (long *) (& fields->f_6s8));
+ break;
+ case MEP_OPERAND_SIMM8 :
+ errmsg = cgen_parse_signed_integer (cd, strp, MEP_OPERAND_SIMM8, (long *) (& fields->f_8s8));
+ break;
+ case MEP_OPERAND_SP :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & junk);
+ break;
+ case MEP_OPERAND_SPR :
+ errmsg = parse_spreg (cd, strp, & mep_cgen_opval_h_gpr, & junk);
+ break;
+ case MEP_OPERAND_TP :
+ errmsg = cgen_parse_keyword (cd, strp, & mep_cgen_opval_h_gpr, & junk);
+ break;
+ case MEP_OPERAND_TPR :
+ errmsg = parse_tpreg (cd, strp, & mep_cgen_opval_h_gpr, & junk);
+ break;
+ case MEP_OPERAND_UDISP2 :
+ errmsg = cgen_parse_signed_integer (cd, strp, MEP_OPERAND_UDISP2, (long *) (& fields->f_2u6));
+ break;
+ case MEP_OPERAND_UDISP7 :
+ errmsg = parse_unsigned7 (cd, strp, MEP_OPERAND_UDISP7, (unsigned long *) (& fields->f_7u9));
+ break;
+ case MEP_OPERAND_UDISP7A2 :
+ errmsg = parse_unsigned7 (cd, strp, MEP_OPERAND_UDISP7A2, (unsigned long *) (& fields->f_7u9a2));
+ break;
+ case MEP_OPERAND_UDISP7A4 :
+ errmsg = parse_unsigned7 (cd, strp, MEP_OPERAND_UDISP7A4, (unsigned long *) (& fields->f_7u9a4));
+ break;
+ case MEP_OPERAND_UIMM16 :
+ errmsg = parse_unsigned16 (cd, strp, MEP_OPERAND_UIMM16, (unsigned long *) (& fields->f_16u16));
+ break;
+ case MEP_OPERAND_UIMM2 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_UIMM2, (unsigned long *) (& fields->f_2u10));
+ break;
+ case MEP_OPERAND_UIMM24 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_UIMM24, (unsigned long *) (& fields->f_24u8n));
+ break;
+ case MEP_OPERAND_UIMM3 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_UIMM3, (unsigned long *) (& fields->f_3u5));
+ break;
+ case MEP_OPERAND_UIMM4 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_UIMM4, (unsigned long *) (& fields->f_4u8));
+ break;
+ case MEP_OPERAND_UIMM5 :
+ errmsg = cgen_parse_unsigned_integer (cd, strp, MEP_OPERAND_UIMM5, (unsigned long *) (& fields->f_5u8));
+ break;
+ case MEP_OPERAND_UIMM7A4 :
+ errmsg = parse_mep_alignu (cd, strp, MEP_OPERAND_UIMM7A4, (unsigned long *) (& fields->f_7u9a4));
+ break;
+ case MEP_OPERAND_ZERO :
+ errmsg = parse_zero (cd, strp, MEP_OPERAND_ZERO, (long *) (& junk));
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while parsing.\n"), opindex);
+ abort ();
+ }
+
+ return errmsg;
+}
+
+cgen_parse_fn * const mep_cgen_parse_handlers[] =
+{
+ parse_insn_normal,
+};
+
+void
+mep_cgen_init_asm (CGEN_CPU_DESC cd)
+{
+ mep_cgen_init_opcode_table (cd);
+ mep_cgen_init_ibld_table (cd);
+ cd->parse_handlers = & mep_cgen_parse_handlers[0];
+ cd->parse_operand = mep_cgen_parse_operand;
+#ifdef CGEN_ASM_INIT_HOOK
+CGEN_ASM_INIT_HOOK
+#endif
+}
+
+
+
+/* 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 mep_cgen_assemble_insn
+
+ Returns NULL for success, an error message for failure. */
+
+char *
+mep_cgen_build_insn_regex (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.
+
+ The syntax string is scanned and operands are parsed and stored in FIELDS.
+ Relocs are queued as we go via other callbacks.
+
+ ??? Note that this is currently an all-or-nothing parser. If we fail to
+ parse the instruction, we return 0 and the caller will start over from
+ the beginning. Backtracking will be necessary in parsing subexpressions,
+ 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. */
+
+static const char *
+parse_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ const char **strp,
+ CGEN_FIELDS *fields)
+{
+ /* ??? Runtime added insns not handled yet. */
+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
+ const char *str = *strp;
+ const char *errmsg;
+ const char *p;
+ const CGEN_SYNTAX_CHAR_TYPE * syn;
+#ifdef CGEN_MNEMONIC_OPERANDS
+ /* FIXME: wip */
+ int past_opcode_p;
+#endif
+
+ /* For now we assume the mnemonic is first (there are no leading operands).
+ We can parse it without needing to set up operand parsing.
+ 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))
+ ++p, ++str;
+
+ if (* p)
+ return _("unrecognized instruction");
+
+#ifndef CGEN_MNEMONIC_OPERANDS
+ if (* str && ! ISSPACE (* str))
+ return _("unrecognized instruction");
+#endif
+
+ CGEN_INIT_PARSE (cd);
+ cgen_init_parse_operand (cd);
+#ifdef CGEN_MNEMONIC_OPERANDS
+ past_opcode_p = 0;
+#endif
+
+ /* We don't check for (*str != '\0') here because we want to parse
+ any trailing fake arguments in the syntax string. */
+ syn = CGEN_SYNTAX_STRING (syntax);
+
+ /* Mnemonics come first for now, ensure valid string. */
+ if (! CGEN_SYNTAX_MNEMONIC_P (* syn))
+ abort ();
+
+ ++syn;
+
+ while (* syn != 0)
+ {
+ /* Non operand chars must match exactly. */
+ if (CGEN_SYNTAX_CHAR_P (* syn))
+ {
+ /* FIXME: While we allow for non-GAS callers above, we assume the
+ 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)))
+ {
+#ifdef CGEN_MNEMONIC_OPERANDS
+ if (CGEN_SYNTAX_CHAR(* syn) == ' ')
+ past_opcode_p = 1;
+#endif
+ ++ syn;
+ ++ str;
+ }
+ else if (*str)
+ {
+ /* 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);
+ return msg;
+ }
+ else
+ {
+ /* 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));
+ return msg;
+ }
+ continue;
+ }
+
+ /* We have an operand of some sort. */
+ errmsg = cd->parse_operand (cd, CGEN_SYNTAX_FIELD (*syn),
+ &str, fields);
+ if (errmsg)
+ return errmsg;
+
+ /* Done with this operand, continue with next one. */
+ ++ syn;
+ }
+
+ /* If we're at the end of the syntax string, we're done. */
+ if (* syn == 0)
+ {
+ /* FIXME: For the moment we assume a valid `str' can only contain
+ 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))
+ ++ str;
+
+ if (* str != '\0')
+ return _("junk at end of line"); /* FIXME: would like to include `str' */
+
+ return NULL;
+ }
+
+ /* We couldn't parse it. */
+ return _("unrecognized instruction");
+}
+
+/* Main entry point.
+ This routine is called for each instruction to be assembled.
+ STR points to the insn to be assembled.
+ We assume all necessary tables have been initialized.
+ The assembled instruction, less any fixups, is stored in BUF.
+ Remember that if CGEN_INT_INSN_P then BUF is an int and thus the value
+ still needs to be converted to target byte order, otherwise BUF is an array
+ of bytes in target byte order.
+ The result is a pointer to the insn's entry in the opcode table,
+ or NULL if an error occured (an error message will have already been
+ printed).
+
+ Note that when processing (non-alias) macro-insns,
+ this function recurses.
+
+ ??? It's possible to make this cpu-independent.
+ One would have to deal with a few minor things.
+ At this point in time doing so would be more of a curiosity than useful
+ [for example this file isn't _that_ big], but keeping the possibility in
+ mind helps keep the design clean. */
+
+const CGEN_INSN *
+mep_cgen_assemble_insn (CGEN_CPU_DESC cd,
+ const char *str,
+ CGEN_FIELDS *fields,
+ CGEN_INSN_BYTES_PTR buf,
+ char **errmsg)
+{
+ const char *start;
+ 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))
+ ++ str;
+
+ /* The instructions are stored in hashed lists.
+ Get the first in the list. */
+ 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. */
+ /* Is this insn supported by the selected cpu? */
+ if (! mep_cgen_insn_supported (cd, insn))
+ continue;
+#endif
+ /* If the RELAXED attribute is set, this is an insn that shouldn't be
+ chosen immediately. Instead, it is used during assembler/linker
+ relaxation if possible. */
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_RELAXED) != 0)
+ continue;
+
+ 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);
+
+ parse_errmsg = CGEN_PARSE_FN (cd, insn) (cd, insn, & str, fields);
+ if (parse_errmsg != NULL)
+ continue;
+
+ /* ??? 0 is passed for `pc'. */
+ insert_errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf,
+ (bfd_vma) 0);
+ if (insert_errmsg != NULL)
+ continue;
+
+ /* It is up to the caller to actually output the insn and any
+ queued relocs. */
+ return insn;
+ }
+
+ {
+ static char errbuf[150];
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
+ const char *tmp_errmsg;
+
+ /* If requesting verbose error messages, use insert_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)
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s...'", tmp_errmsg, start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, "%s `%.50s'", tmp_errmsg, start);
+#else
+ if (strlen (start) > 50)
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s...'"), start);
+ else
+ /* xgettext:c-format */
+ sprintf (errbuf, _("bad instruction `%.50s'"), start);
+#endif
+
+ *errmsg = errbuf;
+ return NULL;
+ }
+}
diff --git a/contrib/binutils/opcodes/mep-desc.c b/contrib/binutils/opcodes/mep-desc.c
new file mode 100644
index 0000000..ab0f9bd
--- /dev/null
+++ b/contrib/binutils/opcodes/mep-desc.c
@@ -0,0 +1,2729 @@
+/* CPU data for mep.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996-2005 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+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.,
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#include "sysdep.h"
+#include <stdio.h>
+#include <stdarg.h>
+#include "ansidecl.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "mep-desc.h"
+#include "mep-opc.h"
+#include "opintl.h"
+#include "libiberty.h"
+#include "xregex.h"
+
+/* Attributes. */
+
+static const CGEN_ATTR_ENTRY bool_attr[] =
+{
+ { "#f", 0 },
+ { "#t", 1 },
+ { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY MACH_attr[] ATTRIBUTE_UNUSED =
+{
+ { "base", MACH_BASE },
+ { "mep", MACH_MEP },
+ { "h1", MACH_H1 },
+ { "max", MACH_MAX },
+ { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY ISA_attr[] ATTRIBUTE_UNUSED =
+{
+ { "mep", ISA_MEP },
+ { "ext_core1", ISA_EXT_CORE1 },
+ { "ext_core2", ISA_EXT_CORE2 },
+ { "ext_cop2_16", ISA_EXT_COP2_16 },
+ { "ext_cop2_32", ISA_EXT_COP2_32 },
+ { "ext_cop2_48", ISA_EXT_COP2_48 },
+ { "ext_cop2_64", ISA_EXT_COP2_64 },
+ { "max", ISA_MAX },
+ { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY CDATA_attr[] ATTRIBUTE_UNUSED =
+{
+ { "LABEL", CDATA_LABEL },
+ { "REGNUM", CDATA_REGNUM },
+ { "FMAX_FLOAT", CDATA_FMAX_FLOAT },
+ { "FMAX_INT", CDATA_FMAX_INT },
+ { "POINTER", CDATA_POINTER },
+ { "LONG", CDATA_LONG },
+ { "ULONG", CDATA_ULONG },
+ { "SHORT", CDATA_SHORT },
+ { "USHORT", CDATA_USHORT },
+ { "CHAR", CDATA_CHAR },
+ { "UCHAR", CDATA_UCHAR },
+ { "CP_DATA_BUS_INT", CDATA_CP_DATA_BUS_INT },
+ { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY ALIGN_attr [] ATTRIBUTE_UNUSED =
+{
+ {"integer", 1},
+ { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY LATENCY_attr [] ATTRIBUTE_UNUSED =
+{
+ {"integer", 0},
+ { 0, 0 }
+};
+
+static const CGEN_ATTR_ENTRY CONFIG_attr[] ATTRIBUTE_UNUSED =
+{
+ { "NONE", CONFIG_NONE },
+ { "simple", CONFIG_SIMPLE },
+ { "fmax", CONFIG_FMAX },
+ { 0, 0 }
+};
+
+const CGEN_ATTR_TABLE mep_cgen_ifield_attr_table[] =
+{
+ { "MACH", & MACH_attr[0], & MACH_attr[0] },
+ { "ISA", & ISA_attr[0], & ISA_attr[0] },
+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
+ { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "RESERVED", &bool_attr[0], &bool_attr[0] },
+ { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
+ { "SIGNED", &bool_attr[0], &bool_attr[0] },
+ { 0, 0, 0 }
+};
+
+const CGEN_ATTR_TABLE mep_cgen_hardware_attr_table[] =
+{
+ { "MACH", & MACH_attr[0], & MACH_attr[0] },
+ { "ISA", & ISA_attr[0], & ISA_attr[0] },
+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
+ { "CACHE-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "PC", &bool_attr[0], &bool_attr[0] },
+ { "PROFILE", &bool_attr[0], &bool_attr[0] },
+ { "IS_FLOAT", &bool_attr[0], &bool_attr[0] },
+ { 0, 0, 0 }
+};
+
+const CGEN_ATTR_TABLE mep_cgen_operand_attr_table[] =
+{
+ { "MACH", & MACH_attr[0], & MACH_attr[0] },
+ { "ISA", & ISA_attr[0], & ISA_attr[0] },
+ { "CDATA", & CDATA_attr[0], & CDATA_attr[0] },
+ { "ALIGN", & ALIGN_attr[0], & ALIGN_attr[0] },
+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
+ { "PCREL-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "ABS-ADDR", &bool_attr[0], &bool_attr[0] },
+ { "SIGN-OPT", &bool_attr[0], &bool_attr[0] },
+ { "SIGNED", &bool_attr[0], &bool_attr[0] },
+ { "NEGATIVE", &bool_attr[0], &bool_attr[0] },
+ { "RELAX", &bool_attr[0], &bool_attr[0] },
+ { "SEM-ONLY", &bool_attr[0], &bool_attr[0] },
+ { "RELOC_IMPLIES_OVERFLOW", &bool_attr[0], &bool_attr[0] },
+ { 0, 0, 0 }
+};
+
+const CGEN_ATTR_TABLE mep_cgen_insn_attr_table[] =
+{
+ { "MACH", & MACH_attr[0], & MACH_attr[0] },
+ { "ISA", & ISA_attr[0], & ISA_attr[0] },
+ { "LATENCY", & LATENCY_attr[0], & LATENCY_attr[0] },
+ { "CONFIG", & CONFIG_attr[0], & CONFIG_attr[0] },
+ { "ALIAS", &bool_attr[0], &bool_attr[0] },
+ { "VIRTUAL", &bool_attr[0], &bool_attr[0] },
+ { "UNCOND-CTI", &bool_attr[0], &bool_attr[0] },
+ { "COND-CTI", &bool_attr[0], &bool_attr[0] },
+ { "SKIP-CTI", &bool_attr[0], &bool_attr[0] },
+ { "DELAY-SLOT", &bool_attr[0], &bool_attr[0] },
+ { "RELAXABLE", &bool_attr[0], &bool_attr[0] },
+ { "RELAXED", &bool_attr[0], &bool_attr[0] },
+ { "NO-DIS", &bool_attr[0], &bool_attr[0] },
+ { "PBB", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_BIT_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_MUL_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_DIV_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_DEBUG_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_LDZ_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_ABS_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_AVE_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_MINMAX_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_CLIP_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_SAT_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_UCI_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_DSP_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_CP_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_CP64_INSN", &bool_attr[0], &bool_attr[0] },
+ { "OPTIONAL_VLIW64", &bool_attr[0], &bool_attr[0] },
+ { "MAY_TRAP", &bool_attr[0], &bool_attr[0] },
+ { "VLIW_ALONE", &bool_attr[0], &bool_attr[0] },
+ { "VLIW_NO_CORE_NOP", &bool_attr[0], &bool_attr[0] },
+ { "VLIW_NO_COP_NOP", &bool_attr[0], &bool_attr[0] },
+ { "VLIW64_NO_MATCHING_NOP", &bool_attr[0], &bool_attr[0] },
+ { "VLIW32_NO_MATCHING_NOP", &bool_attr[0], &bool_attr[0] },
+ { "VOLATILE", &bool_attr[0], &bool_attr[0] },
+ { 0, 0, 0 }
+};
+
+/* Instruction set variants. */
+
+static const CGEN_ISA mep_cgen_isa_table[] = {
+ { "mep", 32, 32, 16, 32 },
+ { "ext_core1", 32, 32, 16, 32 },
+ { "ext_core2", 32, 32, 16, 32 },
+ { "ext_cop2_16", 32, 32, 65535, 0 },
+ { "ext_cop2_32", 32, 32, 65535, 0 },
+ { "ext_cop2_48", 32, 32, 65535, 0 },
+ { "ext_cop2_64", 32, 32, 65535, 0 },
+ { 0, 0, 0, 0, 0 }
+};
+
+/* Machine variants. */
+
+static const CGEN_MACH mep_cgen_mach_table[] = {
+ { "mep", "mep", MACH_MEP, 16 },
+ { "h1", "h1", MACH_H1, 16 },
+ { 0, 0, 0, 0 }
+};
+
+static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_gpr_entries[] =
+{
+ { "$0", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$1", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$2", 2, {0, {{{0, 0}}}}, 0, 0 },
+ { "$3", 3, {0, {{{0, 0}}}}, 0, 0 },
+ { "$4", 4, {0, {{{0, 0}}}}, 0, 0 },
+ { "$5", 5, {0, {{{0, 0}}}}, 0, 0 },
+ { "$6", 6, {0, {{{0, 0}}}}, 0, 0 },
+ { "$7", 7, {0, {{{0, 0}}}}, 0, 0 },
+ { "$8", 8, {0, {{{0, 0}}}}, 0, 0 },
+ { "$9", 9, {0, {{{0, 0}}}}, 0, 0 },
+ { "$10", 10, {0, {{{0, 0}}}}, 0, 0 },
+ { "$11", 11, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fp", 8, {0, {{{0, 0}}}}, 0, 0 },
+ { "$tp", 13, {0, {{{0, 0}}}}, 0, 0 },
+ { "$gp", 14, {0, {{{0, 0}}}}, 0, 0 },
+ { "$sp", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$12", 12, {0, {{{0, 0}}}}, 0, 0 },
+ { "$13", 13, {0, {{{0, 0}}}}, 0, 0 },
+ { "$14", 14, {0, {{{0, 0}}}}, 0, 0 },
+ { "$15", 15, {0, {{{0, 0}}}}, 0, 0 }
+};
+
+CGEN_KEYWORD mep_cgen_opval_h_gpr =
+{
+ & mep_cgen_opval_h_gpr_entries[0],
+ 20,
+ 0, 0, 0, 0, ""
+};
+
+static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_csr_entries[] =
+{
+ { "$pc", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$lp", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$sar", 2, {0, {{{0, 0}}}}, 0, 0 },
+ { "$rpb", 4, {0, {{{0, 0}}}}, 0, 0 },
+ { "$rpe", 5, {0, {{{0, 0}}}}, 0, 0 },
+ { "$rpc", 6, {0, {{{0, 0}}}}, 0, 0 },
+ { "$hi", 7, {0, {{{0, 0}}}}, 0, 0 },
+ { "$lo", 8, {0, {{{0, 0}}}}, 0, 0 },
+ { "$mb0", 12, {0, {{{0, 0}}}}, 0, 0 },
+ { "$me0", 13, {0, {{{0, 0}}}}, 0, 0 },
+ { "$mb1", 14, {0, {{{0, 0}}}}, 0, 0 },
+ { "$me1", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$psw", 16, {0, {{{0, 0}}}}, 0, 0 },
+ { "$id", 17, {0, {{{0, 0}}}}, 0, 0 },
+ { "$tmp", 18, {0, {{{0, 0}}}}, 0, 0 },
+ { "$epc", 19, {0, {{{0, 0}}}}, 0, 0 },
+ { "$exc", 20, {0, {{{0, 0}}}}, 0, 0 },
+ { "$cfg", 21, {0, {{{0, 0}}}}, 0, 0 },
+ { "$npc", 23, {0, {{{0, 0}}}}, 0, 0 },
+ { "$dbg", 24, {0, {{{0, 0}}}}, 0, 0 },
+ { "$depc", 25, {0, {{{0, 0}}}}, 0, 0 },
+ { "$opt", 26, {0, {{{0, 0}}}}, 0, 0 },
+ { "$rcfg", 27, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccfg", 28, {0, {{{0, 0}}}}, 0, 0 }
+};
+
+CGEN_KEYWORD mep_cgen_opval_h_csr =
+{
+ & mep_cgen_opval_h_csr_entries[0],
+ 24,
+ 0, 0, 0, 0, ""
+};
+
+static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_cr64_entries[] =
+{
+ { "$c0", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c1", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c2", 2, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c3", 3, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c4", 4, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c5", 5, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c6", 6, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c7", 7, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c8", 8, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c9", 9, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c10", 10, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c11", 11, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c12", 12, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c13", 13, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c14", 14, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c15", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c16", 16, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c17", 17, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c18", 18, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c19", 19, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c20", 20, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c21", 21, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c22", 22, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c23", 23, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c24", 24, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c25", 25, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c26", 26, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c27", 27, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c28", 28, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c29", 29, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c30", 30, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c31", 31, {0, {{{0, 0}}}}, 0, 0 }
+};
+
+CGEN_KEYWORD mep_cgen_opval_h_cr64 =
+{
+ & mep_cgen_opval_h_cr64_entries[0],
+ 32,
+ 0, 0, 0, 0, ""
+};
+
+static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_cr_entries[] =
+{
+ { "$c0", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c1", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c2", 2, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c3", 3, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c4", 4, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c5", 5, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c6", 6, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c7", 7, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c8", 8, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c9", 9, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c10", 10, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c11", 11, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c12", 12, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c13", 13, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c14", 14, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c15", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c16", 16, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c17", 17, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c18", 18, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c19", 19, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c20", 20, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c21", 21, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c22", 22, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c23", 23, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c24", 24, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c25", 25, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c26", 26, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c27", 27, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c28", 28, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c29", 29, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c30", 30, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c31", 31, {0, {{{0, 0}}}}, 0, 0 }
+};
+
+CGEN_KEYWORD mep_cgen_opval_h_cr =
+{
+ & mep_cgen_opval_h_cr_entries[0],
+ 32,
+ 0, 0, 0, 0, ""
+};
+
+static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_ccr_entries[] =
+{
+ { "$ccr0", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr1", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr2", 2, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr3", 3, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr4", 4, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr5", 5, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr6", 6, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr7", 7, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr8", 8, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr9", 9, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr10", 10, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr11", 11, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr12", 12, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr13", 13, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr14", 14, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr15", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr16", 16, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr17", 17, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr18", 18, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr19", 19, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr20", 20, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr21", 21, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr22", 22, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr23", 23, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr24", 24, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr25", 25, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr26", 26, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr27", 27, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr28", 28, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr29", 29, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr30", 30, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr31", 31, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr32", 32, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr33", 33, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr34", 34, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr35", 35, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr36", 36, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr37", 37, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr38", 38, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr39", 39, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr40", 40, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr41", 41, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr42", 42, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr43", 43, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr44", 44, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr45", 45, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr46", 46, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr47", 47, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr48", 48, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr49", 49, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr50", 50, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr51", 51, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr52", 52, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr53", 53, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr54", 54, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr55", 55, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr56", 56, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr57", 57, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr58", 58, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr59", 59, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr60", 60, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr61", 61, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr62", 62, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr63", 63, {0, {{{0, 0}}}}, 0, 0 }
+};
+
+CGEN_KEYWORD mep_cgen_opval_h_ccr =
+{
+ & mep_cgen_opval_h_ccr_entries[0],
+ 64,
+ 0, 0, 0, 0, ""
+};
+
+static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_cr_fmax_entries[] =
+{
+ { "$fr0", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr1", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr2", 2, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr3", 3, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr4", 4, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr5", 5, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr6", 6, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr7", 7, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr8", 8, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr9", 9, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr10", 10, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr11", 11, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr12", 12, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr13", 13, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr14", 14, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr15", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr16", 16, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr17", 17, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr18", 18, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr19", 19, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr20", 20, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr21", 21, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr22", 22, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr23", 23, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr24", 24, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr25", 25, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr26", 26, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr27", 27, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr28", 28, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr29", 29, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr30", 30, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fr31", 31, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c0", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c1", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c2", 2, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c3", 3, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c4", 4, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c5", 5, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c6", 6, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c7", 7, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c8", 8, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c9", 9, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c10", 10, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c11", 11, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c12", 12, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c13", 13, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c14", 14, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c15", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c16", 16, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c17", 17, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c18", 18, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c19", 19, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c20", 20, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c21", 21, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c22", 22, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c23", 23, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c24", 24, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c25", 25, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c26", 26, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c27", 27, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c28", 28, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c29", 29, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c30", 30, {0, {{{0, 0}}}}, 0, 0 },
+ { "$c31", 31, {0, {{{0, 0}}}}, 0, 0 }
+};
+
+CGEN_KEYWORD mep_cgen_opval_h_cr_fmax =
+{
+ & mep_cgen_opval_h_cr_fmax_entries[0],
+ 64,
+ 0, 0, 0, 0, ""
+};
+
+static CGEN_KEYWORD_ENTRY mep_cgen_opval_h_ccr_fmax_entries[] =
+{
+ { "$cirr", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fcr0", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr0", 0, {0, {{{0, 0}}}}, 0, 0 },
+ { "$cbcr", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fcr1", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr1", 1, {0, {{{0, 0}}}}, 0, 0 },
+ { "$cerr", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$fcr15", 15, {0, {{{0, 0}}}}, 0, 0 },
+ { "$ccr15", 15, {0, {{{0, 0}}}}, 0, 0 }
+};
+
+CGEN_KEYWORD mep_cgen_opval_h_ccr_fmax =
+{
+ & mep_cgen_opval_h_ccr_fmax_entries[0],
+ 9,
+ 0, 0, 0, 0, ""
+};
+
+
+/* The hardware table. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_HW_##a)
+#else
+#define A(a) (1 << CGEN_HW_/**/a)
+#endif
+
+const CGEN_HW_ENTRY mep_cgen_hw_table[] =
+{
+ { "h-memory", HW_H_MEMORY, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-sint", HW_H_SINT, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-uint", HW_H_UINT, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-addr", HW_H_ADDR, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-iaddr", HW_H_IADDR, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-pc", HW_H_PC, CGEN_ASM_NONE, 0, { 0|A(PROFILE)|A(PC), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-gpr", HW_H_GPR, CGEN_ASM_KEYWORD, (PTR) & mep_cgen_opval_h_gpr, { 0|A(PROFILE)|A(CACHE_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-csr", HW_H_CSR, CGEN_ASM_KEYWORD, (PTR) & mep_cgen_opval_h_csr, { 0|A(PROFILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-cr64", HW_H_CR64, CGEN_ASM_KEYWORD, (PTR) & mep_cgen_opval_h_cr64, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-cr", HW_H_CR, CGEN_ASM_KEYWORD, (PTR) & mep_cgen_opval_h_cr, { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-ccr", HW_H_CCR, CGEN_ASM_KEYWORD, (PTR) & mep_cgen_opval_h_ccr, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { "h-cr-fmax", HW_H_CR_FMAX, CGEN_ASM_KEYWORD, (PTR) & mep_cgen_opval_h_cr_fmax, { 0|A(IS_FLOAT)|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { "h-ccr-fmax", HW_H_CCR_FMAX, CGEN_ASM_KEYWORD, (PTR) & mep_cgen_opval_h_ccr_fmax, { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { "h-fmax-compare-i-p", HW_H_FMAX_COMPARE_I_P, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { 0, 0, CGEN_ASM_NONE, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } }
+};
+
+#undef A
+
+
+/* The instruction field table. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_IFLD_##a)
+#else
+#define A(a) (1 << CGEN_IFLD_/**/a)
+#endif
+
+const CGEN_IFLD mep_cgen_ifld_table[] =
+{
+ { MEP_F_NIL, "f-nil", 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } },
+ { MEP_F_ANYOF, "f-anyof", 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } },
+ { MEP_F_MAJOR, "f-major", 0, 32, 0, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_RN, "f-rn", 0, 32, 4, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_RN3, "f-rn3", 0, 32, 5, 3, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_RM, "f-rm", 0, 32, 8, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_RL, "f-rl", 0, 32, 12, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_SUB2, "f-sub2", 0, 32, 14, 2, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_SUB3, "f-sub3", 0, 32, 13, 3, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_SUB4, "f-sub4", 0, 32, 12, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_EXT, "f-ext", 0, 32, 16, 8, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CRN, "f-crn", 0, 32, 4, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CSRN_HI, "f-csrn-hi", 0, 32, 15, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CSRN_LO, "f-csrn-lo", 0, 32, 8, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CSRN, "f-csrn", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CRNX_HI, "f-crnx-hi", 0, 32, 28, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CRNX_LO, "f-crnx-lo", 0, 32, 4, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CRNX, "f-crnx", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_0, "f-0", 0, 32, 0, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_1, "f-1", 0, 32, 1, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_2, "f-2", 0, 32, 2, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_3, "f-3", 0, 32, 3, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_4, "f-4", 0, 32, 4, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_5, "f-5", 0, 32, 5, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_6, "f-6", 0, 32, 6, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_7, "f-7", 0, 32, 7, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_8, "f-8", 0, 32, 8, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_9, "f-9", 0, 32, 9, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_10, "f-10", 0, 32, 10, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_11, "f-11", 0, 32, 11, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_12, "f-12", 0, 32, 12, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_13, "f-13", 0, 32, 13, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_14, "f-14", 0, 32, 14, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_15, "f-15", 0, 32, 15, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_16, "f-16", 0, 32, 16, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_17, "f-17", 0, 32, 17, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_18, "f-18", 0, 32, 18, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_19, "f-19", 0, 32, 19, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_20, "f-20", 0, 32, 20, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_21, "f-21", 0, 32, 21, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_22, "f-22", 0, 32, 22, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_23, "f-23", 0, 32, 23, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_24, "f-24", 0, 32, 24, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_25, "f-25", 0, 32, 25, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_26, "f-26", 0, 32, 26, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_27, "f-27", 0, 32, 27, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_28, "f-28", 0, 32, 28, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_29, "f-29", 0, 32, 29, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_30, "f-30", 0, 32, 30, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_31, "f-31", 0, 32, 31, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } } } } },
+ { MEP_F_8S8A2, "f-8s8a2", 0, 32, 8, 7, { 0|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_12S4A2, "f-12s4a2", 0, 32, 4, 11, { 0|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_17S16A2, "f-17s16a2", 0, 32, 16, 16, { 0|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24S5A2N_HI, "f-24s5a2n-hi", 0, 32, 16, 16, { 0|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24S5A2N_LO, "f-24s5a2n-lo", 0, 32, 5, 7, { 0|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24S5A2N, "f-24s5a2n", 0, 0, 0, 0,{ 0|A(PCREL_ADDR)|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U5A2N_HI, "f-24u5a2n-hi", 0, 32, 16, 16, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U5A2N_LO, "f-24u5a2n-lo", 0, 32, 5, 7, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U5A2N, "f-24u5a2n", 0, 0, 0, 0,{ 0|A(ABS_ADDR)|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_2U6, "f-2u6", 0, 32, 6, 2, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_7U9, "f-7u9", 0, 32, 9, 7, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_7U9A2, "f-7u9a2", 0, 32, 9, 6, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_7U9A4, "f-7u9a4", 0, 32, 9, 5, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_16S16, "f-16s16", 0, 32, 16, 16, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_2U10, "f-2u10", 0, 32, 10, 2, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_3U5, "f-3u5", 0, 32, 5, 3, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_4U8, "f-4u8", 0, 32, 8, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_5U8, "f-5u8", 0, 32, 8, 5, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_5U24, "f-5u24", 0, 32, 24, 5, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_6S8, "f-6s8", 0, 32, 8, 6, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_8S8, "f-8s8", 0, 32, 8, 8, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_16U16, "f-16u16", 0, 32, 16, 16, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_12U16, "f-12u16", 0, 32, 16, 12, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_3U29, "f-3u29", 0, 32, 29, 3, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_8S24, "f-8s24", 0, 32, 24, 8, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_8S24A2, "f-8s24a2", 0, 32, 24, 7, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_8S24A4, "f-8s24a4", 0, 32, 24, 6, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_8S24A8, "f-8s24a8", 0, 32, 24, 5, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U8A4N_HI, "f-24u8a4n-hi", 0, 32, 16, 16, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U8A4N_LO, "f-24u8a4n-lo", 0, 32, 8, 6, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U8A4N, "f-24u8a4n", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U8N_HI, "f-24u8n-hi", 0, 32, 16, 16, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U8N_LO, "f-24u8n-lo", 0, 32, 8, 8, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U8N, "f-24u8n", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U4N_HI, "f-24u4n-hi", 0, 32, 4, 8, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U4N_LO, "f-24u4n-lo", 0, 32, 16, 16, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_24U4N, "f-24u4n", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CALLNUM, "f-callnum", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CCRN_HI, "f-ccrn-hi", 0, 32, 28, 2, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CCRN_LO, "f-ccrn-lo", 0, 32, 4, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_CCRN, "f-ccrn", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } } } } },
+ { MEP_F_FMAX_0_4, "f-fmax-0-4", 0, 32, 0, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_4_4, "f-fmax-4-4", 0, 32, 4, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_8_4, "f-fmax-8-4", 0, 32, 8, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_12_4, "f-fmax-12-4", 0, 32, 12, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_16_4, "f-fmax-16-4", 0, 32, 16, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_20_4, "f-fmax-20-4", 0, 32, 20, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_24_4, "f-fmax-24-4", 0, 32, 24, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_28_1, "f-fmax-28-1", 0, 32, 28, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_29_1, "f-fmax-29-1", 0, 32, 29, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_30_1, "f-fmax-30-1", 0, 32, 30, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_31_1, "f-fmax-31-1", 0, 32, 31, 1, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_FRD, "f-fmax-frd", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_FRN, "f-fmax-frn", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_FRM, "f-fmax-frm", 0, 0, 0, 0,{ 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { MEP_F_FMAX_RM, "f-fmax-rm", 0, 32, 8, 4, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } } } } },
+ { 0, 0, 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } } }
+};
+
+#undef A
+
+
+
+/* multi ifield declarations */
+
+const CGEN_MAYBE_MULTI_IFLD MEP_F_CSRN_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_CRNX_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24S5A2N_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24U5A2N_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24U8A4N_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24U8N_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24U4N_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_CALLNUM_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_CCRN_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_FMAX_FRD_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_FMAX_FRN_MULTI_IFIELD [];
+const CGEN_MAYBE_MULTI_IFLD MEP_F_FMAX_FRM_MULTI_IFIELD [];
+
+
+/* multi ifield definitions */
+
+const CGEN_MAYBE_MULTI_IFLD MEP_F_CSRN_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_CSRN_HI] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_CSRN_LO] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_CRNX_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_CRNX_HI] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_CRNX_LO] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24S5A2N_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24S5A2N_HI] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24S5A2N_LO] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24U5A2N_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24U5A2N_HI] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24U5A2N_LO] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24U8A4N_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24U8A4N_HI] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24U8A4N_LO] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24U8N_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24U8N_HI] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24U8N_LO] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_24U4N_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24U4N_HI] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_24U4N_LO] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_CALLNUM_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_5] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_6] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_7] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_11] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_CCRN_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_CCRN_HI] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_CCRN_LO] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_FMAX_FRD_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_FMAX_28_1] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_FMAX_4_4] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_FMAX_FRN_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_FMAX_29_1] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_FMAX_20_4] } },
+ { 0, { (const PTR) 0 } }
+};
+const CGEN_MAYBE_MULTI_IFLD MEP_F_FMAX_FRM_MULTI_IFIELD [] =
+{
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_FMAX_30_1] } },
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_FMAX_24_4] } },
+ { 0, { (const PTR) 0 } }
+};
+
+/* The operand table. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_OPERAND_##a)
+#else
+#define A(a) (1 << CGEN_OPERAND_/**/a)
+#endif
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define OPERAND(op) MEP_OPERAND_##op
+#else
+#define OPERAND(op) MEP_OPERAND_/**/op
+#endif
+
+const CGEN_OPERAND mep_cgen_operand_table[] =
+{
+/* pc: program counter */
+ { "pc", MEP_OPERAND_PC, HW_H_PC, 0, 0,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_NIL] } },
+ { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* r0: register 0 */
+ { "r0", MEP_OPERAND_R0, HW_H_GPR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* rn: register Rn */
+ { "rn", MEP_OPERAND_RN, HW_H_GPR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* rm: register Rm */
+ { "rm", MEP_OPERAND_RM, HW_H_GPR, 8, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RM] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* rl: register Rl */
+ { "rl", MEP_OPERAND_RL, HW_H_GPR, 12, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RL] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* rn3: register 0-7 */
+ { "rn3", MEP_OPERAND_RN3, HW_H_GPR, 5, 3,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN3] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* rma: register Rm holding pointer */
+ { "rma", MEP_OPERAND_RMA, HW_H_GPR, 8, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RM] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_POINTER, 0 } }, { { 1, 0 } } } } },
+/* rnc: register Rn holding char */
+ { "rnc", MEP_OPERAND_RNC, HW_H_GPR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_CHAR, 0 } }, { { 1, 0 } } } } },
+/* rnuc: register Rn holding unsigned char */
+ { "rnuc", MEP_OPERAND_RNUC, HW_H_GPR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_UCHAR, 0 } }, { { 1, 0 } } } } },
+/* rns: register Rn holding short */
+ { "rns", MEP_OPERAND_RNS, HW_H_GPR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_SHORT, 0 } }, { { 1, 0 } } } } },
+/* rnus: register Rn holding unsigned short */
+ { "rnus", MEP_OPERAND_RNUS, HW_H_GPR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_USHORT, 0 } }, { { 1, 0 } } } } },
+/* rnl: register Rn holding long */
+ { "rnl", MEP_OPERAND_RNL, HW_H_GPR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* rnul: register Rn holding unsigned long */
+ { "rnul", MEP_OPERAND_RNUL, HW_H_GPR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_ULONG, 0 } }, { { 1, 0 } } } } },
+/* rn3c: register 0-7 holding unsigned char */
+ { "rn3c", MEP_OPERAND_RN3C, HW_H_GPR, 5, 3,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN3] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_CHAR, 0 } }, { { 1, 0 } } } } },
+/* rn3uc: register 0-7 holding byte */
+ { "rn3uc", MEP_OPERAND_RN3UC, HW_H_GPR, 5, 3,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN3] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_UCHAR, 0 } }, { { 1, 0 } } } } },
+/* rn3s: register 0-7 holding unsigned short */
+ { "rn3s", MEP_OPERAND_RN3S, HW_H_GPR, 5, 3,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN3] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_SHORT, 0 } }, { { 1, 0 } } } } },
+/* rn3us: register 0-7 holding short */
+ { "rn3us", MEP_OPERAND_RN3US, HW_H_GPR, 5, 3,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN3] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_USHORT, 0 } }, { { 1, 0 } } } } },
+/* rn3l: register 0-7 holding unsigned long */
+ { "rn3l", MEP_OPERAND_RN3L, HW_H_GPR, 5, 3,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN3] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* rn3ul: register 0-7 holding long */
+ { "rn3ul", MEP_OPERAND_RN3UL, HW_H_GPR, 5, 3,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN3] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_ULONG, 0 } }, { { 1, 0 } } } } },
+/* lp: link pointer */
+ { "lp", MEP_OPERAND_LP, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* sar: shift amount register */
+ { "sar", MEP_OPERAND_SAR, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* hi: high result */
+ { "hi", MEP_OPERAND_HI, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* lo: low result */
+ { "lo", MEP_OPERAND_LO, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* mb0: modulo begin register 0 */
+ { "mb0", MEP_OPERAND_MB0, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* me0: modulo end register 0 */
+ { "me0", MEP_OPERAND_ME0, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* mb1: modulo begin register 1 */
+ { "mb1", MEP_OPERAND_MB1, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* me1: modulo end register 1 */
+ { "me1", MEP_OPERAND_ME1, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* psw: program status word */
+ { "psw", MEP_OPERAND_PSW, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* epc: exception prog counter */
+ { "epc", MEP_OPERAND_EPC, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* exc: exception cause */
+ { "exc", MEP_OPERAND_EXC, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* npc: nmi program counter */
+ { "npc", MEP_OPERAND_NPC, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* dbg: debug register */
+ { "dbg", MEP_OPERAND_DBG, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* depc: debug exception pc */
+ { "depc", MEP_OPERAND_DEPC, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* opt: option register */
+ { "opt", MEP_OPERAND_OPT, HW_H_CSR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* r1: register 1 */
+ { "r1", MEP_OPERAND_R1, HW_H_GPR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* tp: tiny data area pointer */
+ { "tp", MEP_OPERAND_TP, HW_H_GPR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* sp: stack pointer */
+ { "sp", MEP_OPERAND_SP, HW_H_GPR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* tpr: comment */
+ { "tpr", MEP_OPERAND_TPR, HW_H_GPR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* spr: comment */
+ { "spr", MEP_OPERAND_SPR, HW_H_GPR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* csrn: control/special register */
+ { "csrn", MEP_OPERAND_CSRN, HW_H_CSR, 8, 5,
+ { 2, { (const PTR) &MEP_F_CSRN_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_REGNUM, 0 } }, { { 1, 0 } } } } },
+/* csrn-idx: control/special reg idx */
+ { "csrn-idx", MEP_OPERAND_CSRN_IDX, HW_H_UINT, 8, 5,
+ { 2, { (const PTR) &MEP_F_CSRN_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* crn64: copro Rn (64-bit) */
+ { "crn64", MEP_OPERAND_CRN64, HW_H_CR64, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_CRN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_CP_DATA_BUS_INT, 0 } }, { { 1, 0 } } } } },
+/* crn: copro Rn (32-bit) */
+ { "crn", MEP_OPERAND_CRN, HW_H_CR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_CRN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_CP_DATA_BUS_INT, 0 } }, { { 1, 0 } } } } },
+/* crnx64: copro Rn (0-31, 64-bit) */
+ { "crnx64", MEP_OPERAND_CRNX64, HW_H_CR64, 4, 5,
+ { 2, { (const PTR) &MEP_F_CRNX_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_CP_DATA_BUS_INT, 0 } }, { { 1, 0 } } } } },
+/* crnx: copro Rn (0-31, 32-bit) */
+ { "crnx", MEP_OPERAND_CRNX, HW_H_CR, 4, 5,
+ { 2, { (const PTR) &MEP_F_CRNX_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_CP_DATA_BUS_INT, 0 } }, { { 1, 0 } } } } },
+/* ccrn: copro control reg CCRn */
+ { "ccrn", MEP_OPERAND_CCRN, HW_H_CCR, 4, 6,
+ { 2, { (const PTR) &MEP_F_CCRN_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_REGNUM, 0 } }, { { 1, 0 } } } } },
+/* cccc: copro flags */
+ { "cccc", MEP_OPERAND_CCCC, HW_H_UINT, 8, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RM] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* pcrel8a2: comment */
+ { "pcrel8a2", MEP_OPERAND_PCREL8A2, HW_H_SINT, 8, 7,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_8S8A2] } },
+ { 0|A(RELAX)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LABEL, 0 } }, { { 1, 0 } } } } },
+/* pcrel12a2: comment */
+ { "pcrel12a2", MEP_OPERAND_PCREL12A2, HW_H_SINT, 4, 11,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_12S4A2] } },
+ { 0|A(RELAX)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LABEL, 0 } }, { { 1, 0 } } } } },
+/* pcrel17a2: comment */
+ { "pcrel17a2", MEP_OPERAND_PCREL17A2, HW_H_SINT, 16, 16,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_17S16A2] } },
+ { 0|A(RELAX)|A(PCREL_ADDR), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LABEL, 0 } }, { { 1, 0 } } } } },
+/* pcrel24a2: comment */
+ { "pcrel24a2", MEP_OPERAND_PCREL24A2, HW_H_SINT, 5, 23,
+ { 2, { (const PTR) &MEP_F_24S5A2N_MULTI_IFIELD[0] } },
+ { 0|A(PCREL_ADDR)|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LABEL, 0 } }, { { 1, 0 } } } } },
+/* pcabs24a2: comment */
+ { "pcabs24a2", MEP_OPERAND_PCABS24A2, HW_H_UINT, 5, 23,
+ { 2, { (const PTR) &MEP_F_24U5A2N_MULTI_IFIELD[0] } },
+ { 0|A(ABS_ADDR)|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LABEL, 0 } }, { { 1, 0 } } } } },
+/* sdisp16: comment */
+ { "sdisp16", MEP_OPERAND_SDISP16, HW_H_SINT, 16, 16,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_16S16] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* simm16: comment */
+ { "simm16", MEP_OPERAND_SIMM16, HW_H_SINT, 16, 16,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_16S16] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* uimm16: comment */
+ { "uimm16", MEP_OPERAND_UIMM16, HW_H_UINT, 16, 16,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_16U16] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* code16: uci/dsp code (16 bits) */
+ { "code16", MEP_OPERAND_CODE16, HW_H_UINT, 16, 16,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_16U16] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* udisp2: SSARB addend (2 bits) */
+ { "udisp2", MEP_OPERAND_UDISP2, HW_H_SINT, 6, 2,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_2U6] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* uimm2: interrupt (2 bits) */
+ { "uimm2", MEP_OPERAND_UIMM2, HW_H_UINT, 10, 2,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_2U10] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* simm6: add const (6 bits) */
+ { "simm6", MEP_OPERAND_SIMM6, HW_H_SINT, 8, 6,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_6S8] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* simm8: mov const (8 bits) */
+ { "simm8", MEP_OPERAND_SIMM8, HW_H_SINT, 8, 8,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_8S8] } },
+ { 0|A(RELOC_IMPLIES_OVERFLOW), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* addr24a4: comment */
+ { "addr24a4", MEP_OPERAND_ADDR24A4, HW_H_UINT, 8, 22,
+ { 2, { (const PTR) &MEP_F_24U8A4N_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 4, 0 } } } } },
+/* code24: coprocessor code */
+ { "code24", MEP_OPERAND_CODE24, HW_H_UINT, 4, 24,
+ { 2, { (const PTR) &MEP_F_24U4N_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* callnum: system call number */
+ { "callnum", MEP_OPERAND_CALLNUM, HW_H_UINT, 5, 4,
+ { 4, { (const PTR) &MEP_F_CALLNUM_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* uimm3: bit immediate (3 bits) */
+ { "uimm3", MEP_OPERAND_UIMM3, HW_H_UINT, 5, 3,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_3U5] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* uimm4: bCC const (4 bits) */
+ { "uimm4", MEP_OPERAND_UIMM4, HW_H_UINT, 8, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_4U8] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* uimm5: bit/shift val (5 bits) */
+ { "uimm5", MEP_OPERAND_UIMM5, HW_H_UINT, 8, 5,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_5U8] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* udisp7: comment */
+ { "udisp7", MEP_OPERAND_UDISP7, HW_H_UINT, 9, 7,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_7U9] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* udisp7a2: comment */
+ { "udisp7a2", MEP_OPERAND_UDISP7A2, HW_H_UINT, 9, 6,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_7U9A2] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 2, 0 } } } } },
+/* udisp7a4: comment */
+ { "udisp7a4", MEP_OPERAND_UDISP7A4, HW_H_UINT, 9, 5,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_7U9A4] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 4, 0 } } } } },
+/* uimm7a4: comment */
+ { "uimm7a4", MEP_OPERAND_UIMM7A4, HW_H_UINT, 9, 5,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_7U9A4] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 4, 0 } } } } },
+/* uimm24: immediate (24 bits) */
+ { "uimm24", MEP_OPERAND_UIMM24, HW_H_UINT, 8, 24,
+ { 2, { (const PTR) &MEP_F_24U8N_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* cimm4: cache immed'te (4 bits) */
+ { "cimm4", MEP_OPERAND_CIMM4, HW_H_UINT, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_RN] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* cimm5: clip immediate (5 bits) */
+ { "cimm5", MEP_OPERAND_CIMM5, HW_H_UINT, 24, 5,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_5U24] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* cdisp8: copro addend (8 bits) */
+ { "cdisp8", MEP_OPERAND_CDISP8, HW_H_SINT, 24, 8,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_8S24] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* cdisp8a2: comment */
+ { "cdisp8a2", MEP_OPERAND_CDISP8A2, HW_H_SINT, 24, 7,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_8S24A2] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 2, 0 } } } } },
+/* cdisp8a4: comment */
+ { "cdisp8a4", MEP_OPERAND_CDISP8A4, HW_H_SINT, 24, 6,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_8S24A4] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 4, 0 } } } } },
+/* cdisp8a8: comment */
+ { "cdisp8a8", MEP_OPERAND_CDISP8A8, HW_H_SINT, 24, 5,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_8S24A8] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 8, 0 } } } } },
+/* zero: Zero operand */
+ { "zero", MEP_OPERAND_ZERO, HW_H_SINT, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* cp_flag: branch condition register */
+ { "cp_flag", MEP_OPERAND_CP_FLAG, HW_H_CCR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xfe" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* fmax-FRd: FRd */
+ { "fmax-FRd", MEP_OPERAND_FMAX_FRD, HW_H_CR, 4, 5,
+ { 2, { (const PTR) &MEP_F_FMAX_FRD_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_FMAX_FLOAT, 0 } }, { { 1, 0 } } } } },
+/* fmax-FRn: FRn */
+ { "fmax-FRn", MEP_OPERAND_FMAX_FRN, HW_H_CR, 20, 5,
+ { 2, { (const PTR) &MEP_F_FMAX_FRN_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_FMAX_FLOAT, 0 } }, { { 1, 0 } } } } },
+/* fmax-FRm: FRm */
+ { "fmax-FRm", MEP_OPERAND_FMAX_FRM, HW_H_CR, 24, 5,
+ { 2, { (const PTR) &MEP_F_FMAX_FRM_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_FMAX_FLOAT, 0 } }, { { 1, 0 } } } } },
+/* fmax-FRd-int: FRd as an integer */
+ { "fmax-FRd-int", MEP_OPERAND_FMAX_FRD_INT, HW_H_CR, 4, 5,
+ { 2, { (const PTR) &MEP_F_FMAX_FRD_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_FMAX_INT, 0 } }, { { 1, 0 } } } } },
+/* fmax-FRn-int: FRn as an integer */
+ { "fmax-FRn-int", MEP_OPERAND_FMAX_FRN_INT, HW_H_CR, 20, 5,
+ { 2, { (const PTR) &MEP_F_FMAX_FRN_MULTI_IFIELD[0] } },
+ { 0|A(VIRTUAL), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_FMAX_INT, 0 } }, { { 1, 0 } } } } },
+/* fmax-CCRn: CCRn */
+ { "fmax-CCRn", MEP_OPERAND_FMAX_CCRN, HW_H_CCR, 4, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_FMAX_4_4] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_REGNUM, 0 } }, { { 1, 0 } } } } },
+/* fmax-CIRR: CIRR */
+ { "fmax-CIRR", MEP_OPERAND_FMAX_CIRR, HW_H_CCR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* fmax-CBCR: CBCR */
+ { "fmax-CBCR", MEP_OPERAND_FMAX_CBCR, HW_H_CCR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* fmax-CERR: CERR */
+ { "fmax-CERR", MEP_OPERAND_FMAX_CERR, HW_H_CCR, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* fmax-Rm: Rm */
+ { "fmax-Rm", MEP_OPERAND_FMAX_RM, HW_H_GPR, 8, 4,
+ { 0, { (const PTR) &mep_cgen_ifld_table[MEP_F_FMAX_RM] } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* fmax-Compare-i-p: flag */
+ { "fmax-Compare-i-p", MEP_OPERAND_FMAX_COMPARE_I_P, HW_H_FMAX_COMPARE_I_P, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0|A(SEM_ONLY), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } },
+/* sentinel */
+ { 0, 0, 0, 0, 0,
+ { 0, { (const PTR) 0 } },
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } }, { { CDATA_LONG, 0 } }, { { 1, 0 } } } } }
+};
+
+#undef A
+
+
+/* The instruction table. */
+
+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_INSN_##a)
+#else
+#define A(a) (1 << CGEN_INSN_/**/a)
+#endif
+
+static const CGEN_IBASE mep_cgen_insn_table[MAX_INSNS] =
+{
+ /* Special null first entry.
+ A `num' value of zero is thus invalid.
+ Also, the special `invalid' insn resides here. */
+ { 0, 0, 0, 0, { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } } },
+/* sb $rnc,($rma) */
+ {
+ MEP_INSN_SB, "sb", "sb", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sh $rns,($rma) */
+ {
+ MEP_INSN_SH, "sh", "sh", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sw $rnl,($rma) */
+ {
+ MEP_INSN_SW, "sw", "sw", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lb $rnc,($rma) */
+ {
+ MEP_INSN_LB, "lb", "lb", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lh $rns,($rma) */
+ {
+ MEP_INSN_LH, "lh", "lh", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lw $rnl,($rma) */
+ {
+ MEP_INSN_LW, "lw", "lw", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lbu $rnuc,($rma) */
+ {
+ MEP_INSN_LBU, "lbu", "lbu", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lhu $rnus,($rma) */
+ {
+ MEP_INSN_LHU, "lhu", "lhu", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sw $rnl,$udisp7a4($spr) */
+ {
+ MEP_INSN_SW_SP, "sw-sp", "sw", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lw $rnl,$udisp7a4($spr) */
+ {
+ MEP_INSN_LW_SP, "lw-sp", "lw", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sb $rn3c,$udisp7($tpr) */
+ {
+ MEP_INSN_SB_TP, "sb-tp", "sb", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sh $rn3s,$udisp7a2($tpr) */
+ {
+ MEP_INSN_SH_TP, "sh-tp", "sh", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sw $rn3l,$udisp7a4($tpr) */
+ {
+ MEP_INSN_SW_TP, "sw-tp", "sw", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lb $rn3c,$udisp7($tpr) */
+ {
+ MEP_INSN_LB_TP, "lb-tp", "lb", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lh $rn3s,$udisp7a2($tpr) */
+ {
+ MEP_INSN_LH_TP, "lh-tp", "lh", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lw $rn3l,$udisp7a4($tpr) */
+ {
+ MEP_INSN_LW_TP, "lw-tp", "lw", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lbu $rn3uc,$udisp7($tpr) */
+ {
+ MEP_INSN_LBU_TP, "lbu-tp", "lbu", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lhu $rn3us,$udisp7a2($tpr) */
+ {
+ MEP_INSN_LHU_TP, "lhu-tp", "lhu", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sb $rnc,$sdisp16($rma) */
+ {
+ MEP_INSN_SB16, "sb16", "sb", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sh $rns,$sdisp16($rma) */
+ {
+ MEP_INSN_SH16, "sh16", "sh", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sw $rnl,$sdisp16($rma) */
+ {
+ MEP_INSN_SW16, "sw16", "sw", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lb $rnc,$sdisp16($rma) */
+ {
+ MEP_INSN_LB16, "lb16", "lb", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lh $rns,$sdisp16($rma) */
+ {
+ MEP_INSN_LH16, "lh16", "lh", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lw $rnl,$sdisp16($rma) */
+ {
+ MEP_INSN_LW16, "lw16", "lw", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lbu $rnuc,$sdisp16($rma) */
+ {
+ MEP_INSN_LBU16, "lbu16", "lbu", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lhu $rnus,$sdisp16($rma) */
+ {
+ MEP_INSN_LHU16, "lhu16", "lhu", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sw $rnl,($addr24a4) */
+ {
+ MEP_INSN_SW24, "sw24", "sw", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lw $rnl,($addr24a4) */
+ {
+ MEP_INSN_LW24, "lw24", "lw", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* extb $rn */
+ {
+ MEP_INSN_EXTB, "extb", "extb", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* exth $rn */
+ {
+ MEP_INSN_EXTH, "exth", "exth", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* extub $rn */
+ {
+ MEP_INSN_EXTUB, "extub", "extub", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* extuh $rn */
+ {
+ MEP_INSN_EXTUH, "extuh", "extuh", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ssarb $udisp2($rm) */
+ {
+ MEP_INSN_SSARB, "ssarb", "ssarb", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* mov $rn,$rm */
+ {
+ MEP_INSN_MOV, "mov", "mov", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* mov $rn,$simm8 */
+ {
+ MEP_INSN_MOVI8, "movi8", "mov", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* mov $rn,$simm16 */
+ {
+ MEP_INSN_MOVI16, "movi16", "mov", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* movu $rn3,$uimm24 */
+ {
+ MEP_INSN_MOVU24, "movu24", "movu", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* movu $rn,$uimm16 */
+ {
+ MEP_INSN_MOVU16, "movu16", "movu", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* movh $rn,$uimm16 */
+ {
+ MEP_INSN_MOVH, "movh", "movh", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* add3 $rl,$rn,$rm */
+ {
+ MEP_INSN_ADD3, "add3", "add3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* add $rn,$simm6 */
+ {
+ MEP_INSN_ADD, "add", "add", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* add3 $rn,$spr,$uimm7a4 */
+ {
+ MEP_INSN_ADD3I, "add3i", "add3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* advck3 \$0,$rn,$rm */
+ {
+ MEP_INSN_ADVCK3, "advck3", "advck3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sub $rn,$rm */
+ {
+ MEP_INSN_SUB, "sub", "sub", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sbvck3 \$0,$rn,$rm */
+ {
+ MEP_INSN_SBVCK3, "sbvck3", "sbvck3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* neg $rn,$rm */
+ {
+ MEP_INSN_NEG, "neg", "neg", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* slt3 \$0,$rn,$rm */
+ {
+ MEP_INSN_SLT3, "slt3", "slt3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sltu3 \$0,$rn,$rm */
+ {
+ MEP_INSN_SLTU3, "sltu3", "sltu3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* slt3 \$0,$rn,$uimm5 */
+ {
+ MEP_INSN_SLT3I, "slt3i", "slt3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sltu3 \$0,$rn,$uimm5 */
+ {
+ MEP_INSN_SLTU3I, "sltu3i", "sltu3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sl1ad3 \$0,$rn,$rm */
+ {
+ MEP_INSN_SL1AD3, "sl1ad3", "sl1ad3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sl2ad3 \$0,$rn,$rm */
+ {
+ MEP_INSN_SL2AD3, "sl2ad3", "sl2ad3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* add3 $rn,$rm,$simm16 */
+ {
+ MEP_INSN_ADD3X, "add3x", "add3", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* slt3 $rn,$rm,$simm16 */
+ {
+ MEP_INSN_SLT3X, "slt3x", "slt3", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sltu3 $rn,$rm,$uimm16 */
+ {
+ MEP_INSN_SLTU3X, "sltu3x", "sltu3", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* or $rn,$rm */
+ {
+ MEP_INSN_OR, "or", "or", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* and $rn,$rm */
+ {
+ MEP_INSN_AND, "and", "and", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* xor $rn,$rm */
+ {
+ MEP_INSN_XOR, "xor", "xor", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* nor $rn,$rm */
+ {
+ MEP_INSN_NOR, "nor", "nor", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* or3 $rn,$rm,$uimm16 */
+ {
+ MEP_INSN_OR3, "or3", "or3", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* and3 $rn,$rm,$uimm16 */
+ {
+ MEP_INSN_AND3, "and3", "and3", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* xor3 $rn,$rm,$uimm16 */
+ {
+ MEP_INSN_XOR3, "xor3", "xor3", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sra $rn,$rm */
+ {
+ MEP_INSN_SRA, "sra", "sra", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* srl $rn,$rm */
+ {
+ MEP_INSN_SRL, "srl", "srl", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sll $rn,$rm */
+ {
+ MEP_INSN_SLL, "sll", "sll", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sra $rn,$uimm5 */
+ {
+ MEP_INSN_SRAI, "srai", "sra", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* srl $rn,$uimm5 */
+ {
+ MEP_INSN_SRLI, "srli", "srl", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sll $rn,$uimm5 */
+ {
+ MEP_INSN_SLLI, "slli", "sll", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sll3 \$0,$rn,$uimm5 */
+ {
+ MEP_INSN_SLL3, "sll3", "sll3", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fsft $rn,$rm */
+ {
+ MEP_INSN_FSFT, "fsft", "fsft", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bra $pcrel12a2 */
+ {
+ MEP_INSN_BRA, "bra", "bra", 16,
+ { 0|A(RELAXABLE)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* beqz $rn,$pcrel8a2 */
+ {
+ MEP_INSN_BEQZ, "beqz", "beqz", 16,
+ { 0|A(RELAXABLE)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bnez $rn,$pcrel8a2 */
+ {
+ MEP_INSN_BNEZ, "bnez", "bnez", 16,
+ { 0|A(RELAXABLE)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* beqi $rn,$uimm4,$pcrel17a2 */
+ {
+ MEP_INSN_BEQI, "beqi", "beqi", 32,
+ { 0|A(RELAXABLE)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bnei $rn,$uimm4,$pcrel17a2 */
+ {
+ MEP_INSN_BNEI, "bnei", "bnei", 32,
+ { 0|A(RELAXABLE)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* blti $rn,$uimm4,$pcrel17a2 */
+ {
+ MEP_INSN_BLTI, "blti", "blti", 32,
+ { 0|A(RELAXABLE)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bgei $rn,$uimm4,$pcrel17a2 */
+ {
+ MEP_INSN_BGEI, "bgei", "bgei", 32,
+ { 0|A(RELAXABLE)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* beq $rn,$rm,$pcrel17a2 */
+ {
+ MEP_INSN_BEQ, "beq", "beq", 32,
+ { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bne $rn,$rm,$pcrel17a2 */
+ {
+ MEP_INSN_BNE, "bne", "bne", 32,
+ { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bsr $pcrel12a2 */
+ {
+ MEP_INSN_BSR12, "bsr12", "bsr", 16,
+ { 0|A(RELAXABLE)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bsr $pcrel24a2 */
+ {
+ MEP_INSN_BSR24, "bsr24", "bsr", 32,
+ { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* jmp $rm */
+ {
+ MEP_INSN_JMP, "jmp", "jmp", 16,
+ { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* jmp $pcabs24a2 */
+ {
+ MEP_INSN_JMP24, "jmp24", "jmp", 32,
+ { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* jsr $rm */
+ {
+ MEP_INSN_JSR, "jsr", "jsr", 16,
+ { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ret */
+ {
+ MEP_INSN_RET, "ret", "ret", 16,
+ { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* repeat $rn,$pcrel17a2 */
+ {
+ MEP_INSN_REPEAT, "repeat", "repeat", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* erepeat $pcrel17a2 */
+ {
+ MEP_INSN_EREPEAT, "erepeat", "erepeat", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* stc $rn,\$lp */
+ {
+ MEP_INSN_STC_LP, "stc_lp", "stc", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* stc $rn,\$hi */
+ {
+ MEP_INSN_STC_HI, "stc_hi", "stc", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* stc $rn,\$lo */
+ {
+ MEP_INSN_STC_LO, "stc_lo", "stc", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* stc $rn,$csrn */
+ {
+ MEP_INSN_STC, "stc", "stc", 16,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ldc $rn,\$lp */
+ {
+ MEP_INSN_LDC_LP, "ldc_lp", "ldc", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ldc $rn,\$hi */
+ {
+ MEP_INSN_LDC_HI, "ldc_hi", "ldc", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ldc $rn,\$lo */
+ {
+ MEP_INSN_LDC_LO, "ldc_lo", "ldc", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ldc $rn,$csrn */
+ {
+ MEP_INSN_LDC, "ldc", "ldc", 16,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 2, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* di */
+ {
+ MEP_INSN_DI, "di", "di", 16,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ei */
+ {
+ MEP_INSN_EI, "ei", "ei", 16,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* reti */
+ {
+ MEP_INSN_RETI, "reti", "reti", 16,
+ { 0|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* halt */
+ {
+ MEP_INSN_HALT, "halt", "halt", 16,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sleep */
+ {
+ MEP_INSN_SLEEP, "sleep", "sleep", 16,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* swi $uimm2 */
+ {
+ MEP_INSN_SWI, "swi", "swi", 16,
+ { 0|A(VOLATILE)|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* break */
+ {
+ MEP_INSN_BREAK, "break", "break", 16,
+ { 0|A(VOLATILE)|A(MAY_TRAP)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* syncm */
+ {
+ MEP_INSN_SYNCM, "syncm", "syncm", 16,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* stcb $rn,$uimm16 */
+ {
+ MEP_INSN_STCB, "stcb", "stcb", 32,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ldcb $rn,$uimm16 */
+ {
+ MEP_INSN_LDCB, "ldcb", "ldcb", 32,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 3, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bsetm ($rma),$uimm3 */
+ {
+ MEP_INSN_BSETM, "bsetm", "bsetm", 16,
+ { 0|A(OPTIONAL_BIT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bclrm ($rma),$uimm3 */
+ {
+ MEP_INSN_BCLRM, "bclrm", "bclrm", 16,
+ { 0|A(OPTIONAL_BIT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bnotm ($rma),$uimm3 */
+ {
+ MEP_INSN_BNOTM, "bnotm", "bnotm", 16,
+ { 0|A(OPTIONAL_BIT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* btstm \$0,($rma),$uimm3 */
+ {
+ MEP_INSN_BTSTM, "btstm", "btstm", 16,
+ { 0|A(OPTIONAL_BIT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* tas $rn,($rma) */
+ {
+ MEP_INSN_TAS, "tas", "tas", 16,
+ { 0|A(OPTIONAL_BIT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* cache $cimm4,($rma) */
+ {
+ MEP_INSN_CACHE, "cache", "cache", 16,
+ { 0|A(VOLATILE), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* mul $rn,$rm */
+ {
+ MEP_INSN_MUL, "mul", "mul", 16,
+ { 0|A(OPTIONAL_MUL_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* mulu $rn,$rm */
+ {
+ MEP_INSN_MULU, "mulu", "mulu", 16,
+ { 0|A(OPTIONAL_MUL_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* mulr $rn,$rm */
+ {
+ MEP_INSN_MULR, "mulr", "mulr", 16,
+ { 0|A(OPTIONAL_MUL_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 3, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* mulru $rn,$rm */
+ {
+ MEP_INSN_MULRU, "mulru", "mulru", 16,
+ { 0|A(OPTIONAL_MUL_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 3, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* madd $rn,$rm */
+ {
+ MEP_INSN_MADD, "madd", "madd", 32,
+ { 0|A(OPTIONAL_MUL_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* maddu $rn,$rm */
+ {
+ MEP_INSN_MADDU, "maddu", "maddu", 32,
+ { 0|A(OPTIONAL_MUL_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* maddr $rn,$rm */
+ {
+ MEP_INSN_MADDR, "maddr", "maddr", 32,
+ { 0|A(OPTIONAL_MUL_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 3, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* maddru $rn,$rm */
+ {
+ MEP_INSN_MADDRU, "maddru", "maddru", 32,
+ { 0|A(OPTIONAL_MUL_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 3, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* div $rn,$rm */
+ {
+ MEP_INSN_DIV, "div", "div", 16,
+ { 0|A(MAY_TRAP)|A(OPTIONAL_DIV_INSN)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 34, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* divu $rn,$rm */
+ {
+ MEP_INSN_DIVU, "divu", "divu", 16,
+ { 0|A(MAY_TRAP)|A(OPTIONAL_DIV_INSN)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 34, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* dret */
+ {
+ MEP_INSN_DRET, "dret", "dret", 16,
+ { 0|A(OPTIONAL_DEBUG_INSN)|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* dbreak */
+ {
+ MEP_INSN_DBREAK, "dbreak", "dbreak", 16,
+ { 0|A(VOLATILE)|A(MAY_TRAP)|A(OPTIONAL_DEBUG_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ldz $rn,$rm */
+ {
+ MEP_INSN_LDZ, "ldz", "ldz", 32,
+ { 0|A(OPTIONAL_LDZ_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* abs $rn,$rm */
+ {
+ MEP_INSN_ABS, "abs", "abs", 32,
+ { 0|A(OPTIONAL_ABS_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ave $rn,$rm */
+ {
+ MEP_INSN_AVE, "ave", "ave", 32,
+ { 0|A(OPTIONAL_AVE_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* min $rn,$rm */
+ {
+ MEP_INSN_MIN, "min", "min", 32,
+ { 0|A(OPTIONAL_MINMAX_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* max $rn,$rm */
+ {
+ MEP_INSN_MAX, "max", "max", 32,
+ { 0|A(OPTIONAL_MINMAX_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* minu $rn,$rm */
+ {
+ MEP_INSN_MINU, "minu", "minu", 32,
+ { 0|A(OPTIONAL_MINMAX_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* maxu $rn,$rm */
+ {
+ MEP_INSN_MAXU, "maxu", "maxu", 32,
+ { 0|A(OPTIONAL_MINMAX_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* clip $rn,$cimm5 */
+ {
+ MEP_INSN_CLIP, "clip", "clip", 32,
+ { 0|A(OPTIONAL_CLIP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* clipu $rn,$cimm5 */
+ {
+ MEP_INSN_CLIPU, "clipu", "clipu", 32,
+ { 0|A(OPTIONAL_CLIP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sadd $rn,$rm */
+ {
+ MEP_INSN_SADD, "sadd", "sadd", 32,
+ { 0|A(OPTIONAL_SAT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ssub $rn,$rm */
+ {
+ MEP_INSN_SSUB, "ssub", "ssub", 32,
+ { 0|A(OPTIONAL_SAT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* saddu $rn,$rm */
+ {
+ MEP_INSN_SADDU, "saddu", "saddu", 32,
+ { 0|A(OPTIONAL_SAT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ssubu $rn,$rm */
+ {
+ MEP_INSN_SSUBU, "ssubu", "ssubu", 32,
+ { 0|A(OPTIONAL_SAT_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* swcp $crn,($rma) */
+ {
+ MEP_INSN_SWCP, "swcp", "swcp", 16,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lwcp $crn,($rma) */
+ {
+ MEP_INSN_LWCP, "lwcp", "lwcp", 16,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* smcp $crn64,($rma) */
+ {
+ MEP_INSN_SMCP, "smcp", "smcp", 16,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lmcp $crn64,($rma) */
+ {
+ MEP_INSN_LMCP, "lmcp", "lmcp", 16,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* swcpi $crn,($rma+) */
+ {
+ MEP_INSN_SWCPI, "swcpi", "swcpi", 16,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lwcpi $crn,($rma+) */
+ {
+ MEP_INSN_LWCPI, "lwcpi", "lwcpi", 16,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* smcpi $crn64,($rma+) */
+ {
+ MEP_INSN_SMCPI, "smcpi", "smcpi", 16,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lmcpi $crn64,($rma+) */
+ {
+ MEP_INSN_LMCPI, "lmcpi", "lmcpi", 16,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* swcp $crn,$sdisp16($rma) */
+ {
+ MEP_INSN_SWCP16, "swcp16", "swcp", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lwcp $crn,$sdisp16($rma) */
+ {
+ MEP_INSN_LWCP16, "lwcp16", "lwcp", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* smcp $crn64,$sdisp16($rma) */
+ {
+ MEP_INSN_SMCP16, "smcp16", "smcp", 32,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lmcp $crn64,$sdisp16($rma) */
+ {
+ MEP_INSN_LMCP16, "lmcp16", "lmcp", 32,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sbcpa $crn,($rma+),$cdisp8 */
+ {
+ MEP_INSN_SBCPA, "sbcpa", "sbcpa", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lbcpa $crn,($rma+),$cdisp8 */
+ {
+ MEP_INSN_LBCPA, "lbcpa", "lbcpa", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* shcpa $crn,($rma+),$cdisp8a2 */
+ {
+ MEP_INSN_SHCPA, "shcpa", "shcpa", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lhcpa $crn,($rma+),$cdisp8a2 */
+ {
+ MEP_INSN_LHCPA, "lhcpa", "lhcpa", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* swcpa $crn,($rma+),$cdisp8a4 */
+ {
+ MEP_INSN_SWCPA, "swcpa", "swcpa", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lwcpa $crn,($rma+),$cdisp8a4 */
+ {
+ MEP_INSN_LWCPA, "lwcpa", "lwcpa", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* smcpa $crn64,($rma+),$cdisp8a8 */
+ {
+ MEP_INSN_SMCPA, "smcpa", "smcpa", 32,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lmcpa $crn64,($rma+),$cdisp8a8 */
+ {
+ MEP_INSN_LMCPA, "lmcpa", "lmcpa", 32,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sbcpm0 $crn,($rma+),$cdisp8 */
+ {
+ MEP_INSN_SBCPM0, "sbcpm0", "sbcpm0", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lbcpm0 $crn,($rma+),$cdisp8 */
+ {
+ MEP_INSN_LBCPM0, "lbcpm0", "lbcpm0", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* shcpm0 $crn,($rma+),$cdisp8a2 */
+ {
+ MEP_INSN_SHCPM0, "shcpm0", "shcpm0", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lhcpm0 $crn,($rma+),$cdisp8a2 */
+ {
+ MEP_INSN_LHCPM0, "lhcpm0", "lhcpm0", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* swcpm0 $crn,($rma+),$cdisp8a4 */
+ {
+ MEP_INSN_SWCPM0, "swcpm0", "swcpm0", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lwcpm0 $crn,($rma+),$cdisp8a4 */
+ {
+ MEP_INSN_LWCPM0, "lwcpm0", "lwcpm0", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* smcpm0 $crn64,($rma+),$cdisp8a8 */
+ {
+ MEP_INSN_SMCPM0, "smcpm0", "smcpm0", 32,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lmcpm0 $crn64,($rma+),$cdisp8a8 */
+ {
+ MEP_INSN_LMCPM0, "lmcpm0", "lmcpm0", 32,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sbcpm1 $crn,($rma+),$cdisp8 */
+ {
+ MEP_INSN_SBCPM1, "sbcpm1", "sbcpm1", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lbcpm1 $crn,($rma+),$cdisp8 */
+ {
+ MEP_INSN_LBCPM1, "lbcpm1", "lbcpm1", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* shcpm1 $crn,($rma+),$cdisp8a2 */
+ {
+ MEP_INSN_SHCPM1, "shcpm1", "shcpm1", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lhcpm1 $crn,($rma+),$cdisp8a2 */
+ {
+ MEP_INSN_LHCPM1, "lhcpm1", "lhcpm1", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* swcpm1 $crn,($rma+),$cdisp8a4 */
+ {
+ MEP_INSN_SWCPM1, "swcpm1", "swcpm1", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lwcpm1 $crn,($rma+),$cdisp8a4 */
+ {
+ MEP_INSN_LWCPM1, "lwcpm1", "lwcpm1", 32,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* smcpm1 $crn64,($rma+),$cdisp8a8 */
+ {
+ MEP_INSN_SMCPM1, "smcpm1", "smcpm1", 32,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lmcpm1 $crn64,($rma+),$cdisp8a8 */
+ {
+ MEP_INSN_LMCPM1, "lmcpm1", "lmcpm1", 32,
+ { 0|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bcpeq $cccc,$pcrel17a2 */
+ {
+ MEP_INSN_BCPEQ, "bcpeq", "bcpeq", 32,
+ { 0|A(RELAXABLE)|A(OPTIONAL_CP_INSN)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bcpne $cccc,$pcrel17a2 */
+ {
+ MEP_INSN_BCPNE, "bcpne", "bcpne", 32,
+ { 0|A(RELAXABLE)|A(OPTIONAL_CP_INSN)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bcpat $cccc,$pcrel17a2 */
+ {
+ MEP_INSN_BCPAT, "bcpat", "bcpat", 32,
+ { 0|A(RELAXABLE)|A(OPTIONAL_CP_INSN)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bcpaf $cccc,$pcrel17a2 */
+ {
+ MEP_INSN_BCPAF, "bcpaf", "bcpaf", 32,
+ { 0|A(RELAXABLE)|A(OPTIONAL_CP_INSN)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* synccp */
+ {
+ MEP_INSN_SYNCCP, "synccp", "synccp", 16,
+ { 0|A(OPTIONAL_CP_INSN), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* jsrv $rm */
+ {
+ MEP_INSN_JSRV, "jsrv", "jsrv", 16,
+ { 0|A(OPTIONAL_CP_INSN)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* bsrv $pcrel24a2 */
+ {
+ MEP_INSN_BSRV, "bsrv", "bsrv", 32,
+ { 0|A(OPTIONAL_CP_INSN)|A(COND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --unused-- */
+ {
+ MEP_INSN_SIM_SYSCALL, "sim-syscall", "--unused--", 16,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_0, "ri-0", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_1, "ri-1", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_2, "ri-2", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_3, "ri-3", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_4, "ri-4", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_5, "ri-5", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_6, "ri-6", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_7, "ri-7", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_8, "ri-8", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_9, "ri-9", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_10, "ri-10", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_11, "ri-11", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_12, "ri-12", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_13, "ri-13", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_14, "ri-14", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_15, "ri-15", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_17, "ri-17", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_20, "ri-20", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_21, "ri-21", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_22, "ri-22", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_23, "ri-23", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_24, "ri-24", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_25, "ri-25", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_26, "ri-26", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_16, "ri-16", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_18, "ri-18", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* --reserved-- */
+ {
+ MEP_INSN_RI_19, "ri-19", "--reserved--", 16,
+ { 0|A(UNCOND_CTI), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fadds ${fmax-FRd},${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FADDS, "fadds", "fadds", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fsubs ${fmax-FRd},${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FSUBS, "fsubs", "fsubs", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fmuls ${fmax-FRd},${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FMULS, "fmuls", "fmuls", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fdivs ${fmax-FRd},${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FDIVS, "fdivs", "fdivs", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fsqrts ${fmax-FRd},${fmax-FRn} */
+ {
+ MEP_INSN_FSQRTS, "fsqrts", "fsqrts", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fabss ${fmax-FRd},${fmax-FRn} */
+ {
+ MEP_INSN_FABSS, "fabss", "fabss", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fnegs ${fmax-FRd},${fmax-FRn} */
+ {
+ MEP_INSN_FNEGS, "fnegs", "fnegs", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fmovs ${fmax-FRd},${fmax-FRn} */
+ {
+ MEP_INSN_FMOVS, "fmovs", "fmovs", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* froundws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ MEP_INSN_FROUNDWS, "froundws", "froundws", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ftruncws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ MEP_INSN_FTRUNCWS, "ftruncws", "ftruncws", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fceilws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ MEP_INSN_FCEILWS, "fceilws", "fceilws", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* ffloorws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ MEP_INSN_FFLOORWS, "ffloorws", "ffloorws", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcvtws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ MEP_INSN_FCVTWS, "fcvtws", "fcvtws", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcvtsw ${fmax-FRd},${fmax-FRn-int} */
+ {
+ MEP_INSN_FCVTSW, "fcvtsw", "fcvtsw", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpfs ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPFS, "fcmpfs", "fcmpfs", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpus ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPUS, "fcmpus", "fcmpus", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpes ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPES, "fcmpes", "fcmpes", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpues ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPUES, "fcmpues", "fcmpues", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpls ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPLS, "fcmpls", "fcmpls", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpuls ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPULS, "fcmpuls", "fcmpuls", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmples ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPLES, "fcmples", "fcmples", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpules ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPULES, "fcmpules", "fcmpules", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpfis ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPFIS, "fcmpfis", "fcmpfis", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpuis ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPUIS, "fcmpuis", "fcmpuis", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpeis ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPEIS, "fcmpeis", "fcmpeis", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpueis ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPUEIS, "fcmpueis", "fcmpueis", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmplis ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPLIS, "fcmplis", "fcmplis", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpulis ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPULIS, "fcmpulis", "fcmpulis", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpleis ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPLEIS, "fcmpleis", "fcmpleis", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* fcmpuleis ${fmax-FRn},${fmax-FRm} */
+ {
+ MEP_INSN_FCMPULEIS, "fcmpuleis", "fcmpuleis", 32,
+ { 0|A(MAY_TRAP), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* cmov ${fmax-FRd-int},${fmax-Rm} */
+ {
+ MEP_INSN_CMOV_FRN_RM, "cmov-frn-rm", "cmov", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* cmov ${fmax-Rm},${fmax-FRd-int} */
+ {
+ MEP_INSN_CMOV_RM_FRN, "cmov-rm-frn", "cmov", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* cmovc ${fmax-CCRn},${fmax-Rm} */
+ {
+ MEP_INSN_CMOVC_CCRN_RM, "cmovc-ccrn-rm", "cmovc", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* cmovc ${fmax-Rm},${fmax-CCRn} */
+ {
+ MEP_INSN_CMOVC_RM_CCRN, "cmovc-rm-ccrn", "cmovc", 32,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x20" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+};
+
+#undef OP
+#undef A
+
+/* Initialize anything needed to be done once, before any cpu_open call. */
+
+static void
+init_tables (void)
+{
+}
+
+static const CGEN_MACH * lookup_mach_via_bfd_name (const CGEN_MACH *, const char *);
+static void build_hw_table (CGEN_CPU_TABLE *);
+static void build_ifield_table (CGEN_CPU_TABLE *);
+static void build_operand_table (CGEN_CPU_TABLE *);
+static void build_insn_table (CGEN_CPU_TABLE *);
+static void mep_cgen_rebuild_tables (CGEN_CPU_TABLE *);
+
+/* Subroutine of mep_cgen_cpu_open to look up a mach via its bfd name. */
+
+static const CGEN_MACH *
+lookup_mach_via_bfd_name (const CGEN_MACH *table, const char *name)
+{
+ while (table->name)
+ {
+ if (strcmp (name, table->bfd_name) == 0)
+ return table;
+ ++table;
+ }
+ abort ();
+}
+
+/* Subroutine of mep_cgen_cpu_open to build the hardware table. */
+
+static void
+build_hw_table (CGEN_CPU_TABLE *cd)
+{
+ int i;
+ int machs = cd->machs;
+ const CGEN_HW_ENTRY *init = & mep_cgen_hw_table[0];
+ /* MAX_HW is only an upper bound on the number of selected entries.
+ However each entry is indexed by it's enum so there can be holes in
+ the table. */
+ const CGEN_HW_ENTRY **selected =
+ (const CGEN_HW_ENTRY **) xmalloc (MAX_HW * sizeof (CGEN_HW_ENTRY *));
+
+ cd->hw_table.init_entries = init;
+ cd->hw_table.entry_size = sizeof (CGEN_HW_ENTRY);
+ memset (selected, 0, MAX_HW * sizeof (CGEN_HW_ENTRY *));
+ /* ??? For now we just use machs to determine which ones we want. */
+ for (i = 0; init[i].name != NULL; ++i)
+ if (CGEN_HW_ATTR_VALUE (&init[i], CGEN_HW_MACH)
+ & machs)
+ selected[init[i].type] = &init[i];
+ cd->hw_table.entries = selected;
+ cd->hw_table.num_entries = MAX_HW;
+}
+
+/* Subroutine of mep_cgen_cpu_open to build the hardware table. */
+
+static void
+build_ifield_table (CGEN_CPU_TABLE *cd)
+{
+ cd->ifld_table = & mep_cgen_ifld_table[0];
+}
+
+/* Subroutine of mep_cgen_cpu_open to build the hardware table. */
+
+static void
+build_operand_table (CGEN_CPU_TABLE *cd)
+{
+ int i;
+ int machs = cd->machs;
+ const CGEN_OPERAND *init = & mep_cgen_operand_table[0];
+ /* MAX_OPERANDS is only an upper bound on the number of selected entries.
+ However each entry is indexed by it's enum so there can be holes in
+ the table. */
+ const CGEN_OPERAND **selected = xmalloc (MAX_OPERANDS * sizeof (* selected));
+
+ cd->operand_table.init_entries = init;
+ cd->operand_table.entry_size = sizeof (CGEN_OPERAND);
+ memset (selected, 0, MAX_OPERANDS * sizeof (CGEN_OPERAND *));
+ /* ??? For now we just use mach to determine which ones we want. */
+ for (i = 0; init[i].name != NULL; ++i)
+ if (CGEN_OPERAND_ATTR_VALUE (&init[i], CGEN_OPERAND_MACH)
+ & machs)
+ selected[init[i].type] = &init[i];
+ cd->operand_table.entries = selected;
+ cd->operand_table.num_entries = MAX_OPERANDS;
+}
+
+/* Subroutine of mep_cgen_cpu_open to build the hardware table.
+ ??? This could leave out insns not supported by the specified mach/isa,
+ but that would cause errors like "foo only supported by bar" to become
+ "unknown insn", so for now we include all insns and require the app to
+ do the checking later.
+ ??? On the other hand, parsing of such insns may require their hardware or
+ operand elements to be in the table [which they mightn't be]. */
+
+static void
+build_insn_table (CGEN_CPU_TABLE *cd)
+{
+ int i;
+ const CGEN_IBASE *ib = & mep_cgen_insn_table[0];
+ CGEN_INSN *insns = xmalloc (MAX_INSNS * sizeof (CGEN_INSN));
+
+ memset (insns, 0, MAX_INSNS * sizeof (CGEN_INSN));
+ for (i = 0; i < MAX_INSNS; ++i)
+ insns[i].base = &ib[i];
+ cd->insn_table.init_entries = insns;
+ cd->insn_table.entry_size = sizeof (CGEN_IBASE);
+ cd->insn_table.num_init_entries = MAX_INSNS;
+}
+
+/* Subroutine of mep_cgen_cpu_open to rebuild the tables. */
+
+static void
+mep_cgen_rebuild_tables (CGEN_CPU_TABLE *cd)
+{
+ int i;
+ CGEN_BITSET *isas = cd->isas;
+ unsigned int machs = cd->machs;
+
+ cd->int_insn_p = CGEN_INT_INSN_P;
+
+ /* Data derived from the isa spec. */
+#define UNSET (CGEN_SIZE_UNKNOWN + 1)
+ cd->default_insn_bitsize = UNSET;
+ cd->base_insn_bitsize = UNSET;
+ cd->min_insn_bitsize = 65535; /* Some ridiculously big number. */
+ cd->max_insn_bitsize = 0;
+ for (i = 0; i < MAX_ISAS; ++i)
+ if (cgen_bitset_contains (isas, i))
+ {
+ const CGEN_ISA *isa = & mep_cgen_isa_table[i];
+
+ /* Default insn sizes of all selected isas must be
+ equal or we set the result to 0, meaning "unknown". */
+ if (cd->default_insn_bitsize == UNSET)
+ cd->default_insn_bitsize = isa->default_insn_bitsize;
+ else if (isa->default_insn_bitsize == cd->default_insn_bitsize)
+ ; /* This is ok. */
+ else
+ cd->default_insn_bitsize = CGEN_SIZE_UNKNOWN;
+
+ /* Base insn sizes of all selected isas must be equal
+ or we set the result to 0, meaning "unknown". */
+ if (cd->base_insn_bitsize == UNSET)
+ cd->base_insn_bitsize = isa->base_insn_bitsize;
+ else if (isa->base_insn_bitsize == cd->base_insn_bitsize)
+ ; /* This is ok. */
+ else
+ cd->base_insn_bitsize = CGEN_SIZE_UNKNOWN;
+
+ /* Set min,max insn sizes. */
+ if (isa->min_insn_bitsize < cd->min_insn_bitsize)
+ cd->min_insn_bitsize = isa->min_insn_bitsize;
+ if (isa->max_insn_bitsize > cd->max_insn_bitsize)
+ cd->max_insn_bitsize = isa->max_insn_bitsize;
+ }
+
+ /* Data derived from the mach spec. */
+ for (i = 0; i < MAX_MACHS; ++i)
+ if (((1 << i) & machs) != 0)
+ {
+ const CGEN_MACH *mach = & mep_cgen_mach_table[i];
+
+ if (mach->insn_chunk_bitsize != 0)
+ {
+ if (cd->insn_chunk_bitsize != 0 && cd->insn_chunk_bitsize != mach->insn_chunk_bitsize)
+ {
+ fprintf (stderr, "mep_cgen_rebuild_tables: conflicting insn-chunk-bitsize values: `%d' vs. `%d'\n",
+ cd->insn_chunk_bitsize, mach->insn_chunk_bitsize);
+ abort ();
+ }
+
+ cd->insn_chunk_bitsize = mach->insn_chunk_bitsize;
+ }
+ }
+
+ /* Determine which hw elements are used by MACH. */
+ build_hw_table (cd);
+
+ /* Build the ifield table. */
+ build_ifield_table (cd);
+
+ /* Determine which operands are used by MACH/ISA. */
+ build_operand_table (cd);
+
+ /* Build the instruction table. */
+ build_insn_table (cd);
+}
+
+/* Initialize a cpu table and return a descriptor.
+ It's much like opening a file, and must be the first function called.
+ The arguments are a set of (type/value) pairs, terminated with
+ CGEN_CPU_OPEN_END.
+
+ Currently supported values:
+ CGEN_CPU_OPEN_ISAS: bitmap of values in enum isa_attr
+ CGEN_CPU_OPEN_MACHS: bitmap of values in enum mach_attr
+ CGEN_CPU_OPEN_BFDMACH: specify 1 mach using bfd name
+ CGEN_CPU_OPEN_ENDIAN: specify endian choice
+ CGEN_CPU_OPEN_END: terminates arguments
+
+ ??? Simultaneous multiple isas might not make sense, but it's not (yet)
+ precluded.
+
+ ??? We only support ISO C stdargs here, not K&R.
+ Laziness, plus experiment to see if anything requires K&R - eventually
+ K&R will no longer be supported - e.g. GDB is currently trying this. */
+
+CGEN_CPU_DESC
+mep_cgen_cpu_open (enum cgen_cpu_open_arg arg_type, ...)
+{
+ CGEN_CPU_TABLE *cd = (CGEN_CPU_TABLE *) xmalloc (sizeof (CGEN_CPU_TABLE));
+ static int init_p;
+ CGEN_BITSET *isas = 0; /* 0 = "unspecified" */
+ unsigned int machs = 0; /* 0 = "unspecified" */
+ enum cgen_endian endian = CGEN_ENDIAN_UNKNOWN;
+ va_list ap;
+
+ if (! init_p)
+ {
+ init_tables ();
+ init_p = 1;
+ }
+
+ memset (cd, 0, sizeof (*cd));
+
+ va_start (ap, arg_type);
+ while (arg_type != CGEN_CPU_OPEN_END)
+ {
+ switch (arg_type)
+ {
+ case CGEN_CPU_OPEN_ISAS :
+ isas = va_arg (ap, CGEN_BITSET *);
+ break;
+ case CGEN_CPU_OPEN_MACHS :
+ machs = va_arg (ap, unsigned int);
+ break;
+ case CGEN_CPU_OPEN_BFDMACH :
+ {
+ const char *name = va_arg (ap, const char *);
+ const CGEN_MACH *mach =
+ lookup_mach_via_bfd_name (mep_cgen_mach_table, name);
+
+ machs |= 1 << mach->num;
+ break;
+ }
+ case CGEN_CPU_OPEN_ENDIAN :
+ endian = va_arg (ap, enum cgen_endian);
+ break;
+ default :
+ fprintf (stderr, "mep_cgen_cpu_open: unsupported argument `%d'\n",
+ arg_type);
+ abort (); /* ??? return NULL? */
+ }
+ arg_type = va_arg (ap, enum cgen_cpu_open_arg);
+ }
+ va_end (ap);
+
+ /* Mach unspecified means "all". */
+ if (machs == 0)
+ machs = (1 << MAX_MACHS) - 1;
+ /* Base mach is always selected. */
+ machs |= 1;
+ if (endian == CGEN_ENDIAN_UNKNOWN)
+ {
+ /* ??? If target has only one, could have a default. */
+ fprintf (stderr, "mep_cgen_cpu_open: no endianness specified\n");
+ abort ();
+ }
+
+ cd->isas = cgen_bitset_copy (isas);
+ cd->machs = machs;
+ cd->endian = endian;
+ /* FIXME: for the sparc case we can determine insn-endianness statically.
+ The worry here is where both data and insn endian can be independently
+ chosen, in which case this function will need another argument.
+ Actually, will want to allow for more arguments in the future anyway. */
+ cd->insn_endian = endian;
+
+ /* Table (re)builder. */
+ cd->rebuild_tables = mep_cgen_rebuild_tables;
+ mep_cgen_rebuild_tables (cd);
+
+ /* Default to not allowing signed overflow. */
+ cd->signed_overflow_ok_p = 0;
+
+ return (CGEN_CPU_DESC) cd;
+}
+
+/* Cover fn to mep_cgen_cpu_open to handle the simple case of 1 isa, 1 mach.
+ MACH_NAME is the bfd name of the mach. */
+
+CGEN_CPU_DESC
+mep_cgen_cpu_open_1 (const char *mach_name, enum cgen_endian endian)
+{
+ return mep_cgen_cpu_open (CGEN_CPU_OPEN_BFDMACH, mach_name,
+ CGEN_CPU_OPEN_ENDIAN, endian,
+ CGEN_CPU_OPEN_END);
+}
+
+/* Close a cpu table.
+ ??? This can live in a machine independent file, but there's currently
+ no place to put this file (there's no libcgen). libopcodes is the wrong
+ place as some simulator ports use this but they don't use libopcodes. */
+
+void
+mep_cgen_cpu_close (CGEN_CPU_DESC cd)
+{
+ unsigned int i;
+ const CGEN_INSN *insns;
+
+ if (cd->macro_insn_table.init_entries)
+ {
+ insns = cd->macro_insn_table.init_entries;
+ for (i = 0; i < cd->macro_insn_table.num_init_entries; ++i, ++insns)
+ if (CGEN_INSN_RX ((insns)))
+ regfree (CGEN_INSN_RX (insns));
+ }
+
+ if (cd->insn_table.init_entries)
+ {
+ insns = cd->insn_table.init_entries;
+ for (i = 0; i < cd->insn_table.num_init_entries; ++i, ++insns)
+ if (CGEN_INSN_RX (insns))
+ regfree (CGEN_INSN_RX (insns));
+ }
+
+ if (cd->macro_insn_table.init_entries)
+ free ((CGEN_INSN *) cd->macro_insn_table.init_entries);
+
+ if (cd->insn_table.init_entries)
+ free ((CGEN_INSN *) cd->insn_table.init_entries);
+
+ if (cd->hw_table.entries)
+ free ((CGEN_HW_ENTRY *) cd->hw_table.entries);
+
+ if (cd->operand_table.entries)
+ free ((CGEN_HW_ENTRY *) cd->operand_table.entries);
+
+ free (cd);
+}
+
diff --git a/contrib/binutils/opcodes/mep-desc.h b/contrib/binutils/opcodes/mep-desc.h
new file mode 100644
index 0000000..606d347
--- /dev/null
+++ b/contrib/binutils/opcodes/mep-desc.h
@@ -0,0 +1,342 @@
+/* CPU data header for mep.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996-2005 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+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.,
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef MEP_CPU_H
+#define MEP_CPU_H
+
+#include "opcode/cgen-bitset.h"
+
+#define CGEN_ARCH mep
+
+/* Given symbol S, return mep_cgen_<S>. */
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define CGEN_SYM(s) mep##_cgen_##s
+#else
+#define CGEN_SYM(s) mep/**/_cgen_/**/s
+#endif
+
+
+/* Selected cpu families. */
+#define HAVE_CPU_MEPF
+
+#define CGEN_INSN_LSB0_P 0
+
+/* Minimum size of any insn (in bytes). */
+#define CGEN_MIN_INSN_SIZE 2
+
+/* Maximum size of any insn (in bytes). */
+#define CGEN_MAX_INSN_SIZE 4
+
+#define CGEN_INT_INSN_P 1
+
+/* Maximum number of syntax elements in an instruction. */
+#define CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS 17
+
+/* CGEN_MNEMONIC_OPERANDS is defined if mnemonics have operands.
+ e.g. In "b,a foo" the ",a" is an operand. If mnemonics have operands
+ we can't hash on everything up to the space. */
+#define CGEN_MNEMONIC_OPERANDS
+
+/* Maximum number of fields in an instruction. */
+#define CGEN_ACTUAL_MAX_IFMT_OPERANDS 11
+
+/* Enums. */
+
+/* Enum declaration for major opcodes. */
+typedef enum major {
+ MAJ_0, MAJ_1, MAJ_2, MAJ_3
+ , MAJ_4, MAJ_5, MAJ_6, MAJ_7
+ , MAJ_8, MAJ_9, MAJ_10, MAJ_11
+ , MAJ_12, MAJ_13, MAJ_14, MAJ_15
+} MAJOR;
+
+/* Enum declaration for condition opcode enum. */
+typedef enum fmax_cond {
+ FMAX_F, FMAX_U, FMAX_E, FMAX_UE
+ , FMAX_L, FMAX_UL, FMAX_LE, FMAX_ULE
+ , FMAX_FI, FMAX_UI, FMAX_EI, FMAX_UEI
+ , FMAX_LI, FMAX_ULI, FMAX_LEI, FMAX_ULEI
+} FMAX_COND;
+
+/* Attributes. */
+
+/* Enum declaration for machine type selection. */
+typedef enum mach_attr {
+ MACH_BASE, MACH_MEP, MACH_H1, MACH_MAX
+} MACH_ATTR;
+
+/* Enum declaration for instruction set selection. */
+typedef enum isa_attr {
+ ISA_MEP, ISA_EXT_CORE1, ISA_EXT_CORE2, ISA_EXT_COP2_16
+ , ISA_EXT_COP2_32, ISA_EXT_COP2_48, ISA_EXT_COP2_64, ISA_MAX
+} ISA_ATTR;
+
+/* Enum declaration for datatype to use for C intrinsics mapping. */
+typedef enum cdata_attr {
+ CDATA_LABEL, CDATA_REGNUM, CDATA_FMAX_FLOAT, CDATA_FMAX_INT
+ , CDATA_POINTER, CDATA_LONG, CDATA_ULONG, CDATA_SHORT
+ , CDATA_USHORT, CDATA_CHAR, CDATA_UCHAR, CDATA_CP_DATA_BUS_INT
+} CDATA_ATTR;
+
+/* Enum declaration for . */
+typedef enum config_attr {
+ CONFIG_NONE, CONFIG_SIMPLE, CONFIG_FMAX
+} CONFIG_ATTR;
+
+/* Number of architecture variants. */
+#define MAX_ISAS ((int) ISA_MAX)
+#define MAX_MACHS ((int) MACH_MAX)
+
+/* Ifield support. */
+
+/* Ifield attribute indices. */
+
+/* Enum declaration for cgen_ifld attrs. */
+typedef enum cgen_ifld_attr {
+ CGEN_IFLD_VIRTUAL, CGEN_IFLD_PCREL_ADDR, CGEN_IFLD_ABS_ADDR, CGEN_IFLD_RESERVED
+ , CGEN_IFLD_SIGN_OPT, CGEN_IFLD_SIGNED, CGEN_IFLD_END_BOOLS, CGEN_IFLD_START_NBOOLS = 31
+ , CGEN_IFLD_MACH, CGEN_IFLD_ISA, CGEN_IFLD_END_NBOOLS
+} CGEN_IFLD_ATTR;
+
+/* Number of non-boolean elements in cgen_ifld_attr. */
+#define CGEN_IFLD_NBOOL_ATTRS (CGEN_IFLD_END_NBOOLS - CGEN_IFLD_START_NBOOLS - 1)
+
+/* cgen_ifld attribute accessor macros. */
+#define CGEN_ATTR_CGEN_IFLD_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_IFLD_MACH-CGEN_IFLD_START_NBOOLS-1].nonbitset)
+#define CGEN_ATTR_CGEN_IFLD_ISA_VALUE(attrs) ((attrs)->nonbool[CGEN_IFLD_ISA-CGEN_IFLD_START_NBOOLS-1].bitset)
+#define CGEN_ATTR_CGEN_IFLD_VIRTUAL_VALUE(attrs) (((attrs)->bool & (1 << CGEN_IFLD_VIRTUAL)) != 0)
+#define CGEN_ATTR_CGEN_IFLD_PCREL_ADDR_VALUE(attrs) (((attrs)->bool & (1 << CGEN_IFLD_PCREL_ADDR)) != 0)
+#define CGEN_ATTR_CGEN_IFLD_ABS_ADDR_VALUE(attrs) (((attrs)->bool & (1 << CGEN_IFLD_ABS_ADDR)) != 0)
+#define CGEN_ATTR_CGEN_IFLD_RESERVED_VALUE(attrs) (((attrs)->bool & (1 << CGEN_IFLD_RESERVED)) != 0)
+#define CGEN_ATTR_CGEN_IFLD_SIGN_OPT_VALUE(attrs) (((attrs)->bool & (1 << CGEN_IFLD_SIGN_OPT)) != 0)
+#define CGEN_ATTR_CGEN_IFLD_SIGNED_VALUE(attrs) (((attrs)->bool & (1 << CGEN_IFLD_SIGNED)) != 0)
+
+/* Enum declaration for mep ifield types. */
+typedef enum ifield_type {
+ MEP_F_NIL, MEP_F_ANYOF, MEP_F_MAJOR, MEP_F_RN
+ , MEP_F_RN3, MEP_F_RM, MEP_F_RL, MEP_F_SUB2
+ , MEP_F_SUB3, MEP_F_SUB4, MEP_F_EXT, MEP_F_CRN
+ , MEP_F_CSRN_HI, MEP_F_CSRN_LO, MEP_F_CSRN, MEP_F_CRNX_HI
+ , MEP_F_CRNX_LO, MEP_F_CRNX, MEP_F_0, MEP_F_1
+ , MEP_F_2, MEP_F_3, MEP_F_4, MEP_F_5
+ , MEP_F_6, MEP_F_7, MEP_F_8, MEP_F_9
+ , MEP_F_10, MEP_F_11, MEP_F_12, MEP_F_13
+ , MEP_F_14, MEP_F_15, MEP_F_16, MEP_F_17
+ , MEP_F_18, MEP_F_19, MEP_F_20, MEP_F_21
+ , MEP_F_22, MEP_F_23, MEP_F_24, MEP_F_25
+ , MEP_F_26, MEP_F_27, MEP_F_28, MEP_F_29
+ , MEP_F_30, MEP_F_31, MEP_F_8S8A2, MEP_F_12S4A2
+ , MEP_F_17S16A2, MEP_F_24S5A2N_HI, MEP_F_24S5A2N_LO, MEP_F_24S5A2N
+ , MEP_F_24U5A2N_HI, MEP_F_24U5A2N_LO, MEP_F_24U5A2N, MEP_F_2U6
+ , MEP_F_7U9, MEP_F_7U9A2, MEP_F_7U9A4, MEP_F_16S16
+ , MEP_F_2U10, MEP_F_3U5, MEP_F_4U8, MEP_F_5U8
+ , MEP_F_5U24, MEP_F_6S8, MEP_F_8S8, MEP_F_16U16
+ , MEP_F_12U16, MEP_F_3U29, MEP_F_8S24, MEP_F_8S24A2
+ , MEP_F_8S24A4, MEP_F_8S24A8, MEP_F_24U8A4N_HI, MEP_F_24U8A4N_LO
+ , MEP_F_24U8A4N, MEP_F_24U8N_HI, MEP_F_24U8N_LO, MEP_F_24U8N
+ , MEP_F_24U4N_HI, MEP_F_24U4N_LO, MEP_F_24U4N, MEP_F_CALLNUM
+ , MEP_F_CCRN_HI, MEP_F_CCRN_LO, MEP_F_CCRN, MEP_F_FMAX_0_4
+ , MEP_F_FMAX_4_4, MEP_F_FMAX_8_4, MEP_F_FMAX_12_4, MEP_F_FMAX_16_4
+ , MEP_F_FMAX_20_4, MEP_F_FMAX_24_4, MEP_F_FMAX_28_1, MEP_F_FMAX_29_1
+ , MEP_F_FMAX_30_1, MEP_F_FMAX_31_1, MEP_F_FMAX_FRD, MEP_F_FMAX_FRN
+ , MEP_F_FMAX_FRM, MEP_F_FMAX_RM, MEP_F_MAX
+} IFIELD_TYPE;
+
+#define MAX_IFLD ((int) MEP_F_MAX)
+
+/* Hardware attribute indices. */
+
+/* Enum declaration for cgen_hw attrs. */
+typedef enum cgen_hw_attr {
+ CGEN_HW_VIRTUAL, CGEN_HW_CACHE_ADDR, CGEN_HW_PC, CGEN_HW_PROFILE
+ , CGEN_HW_IS_FLOAT, CGEN_HW_END_BOOLS, CGEN_HW_START_NBOOLS = 31, CGEN_HW_MACH
+ , CGEN_HW_ISA, CGEN_HW_END_NBOOLS
+} CGEN_HW_ATTR;
+
+/* Number of non-boolean elements in cgen_hw_attr. */
+#define CGEN_HW_NBOOL_ATTRS (CGEN_HW_END_NBOOLS - CGEN_HW_START_NBOOLS - 1)
+
+/* cgen_hw attribute accessor macros. */
+#define CGEN_ATTR_CGEN_HW_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_HW_MACH-CGEN_HW_START_NBOOLS-1].nonbitset)
+#define CGEN_ATTR_CGEN_HW_ISA_VALUE(attrs) ((attrs)->nonbool[CGEN_HW_ISA-CGEN_HW_START_NBOOLS-1].bitset)
+#define CGEN_ATTR_CGEN_HW_VIRTUAL_VALUE(attrs) (((attrs)->bool & (1 << CGEN_HW_VIRTUAL)) != 0)
+#define CGEN_ATTR_CGEN_HW_CACHE_ADDR_VALUE(attrs) (((attrs)->bool & (1 << CGEN_HW_CACHE_ADDR)) != 0)
+#define CGEN_ATTR_CGEN_HW_PC_VALUE(attrs) (((attrs)->bool & (1 << CGEN_HW_PC)) != 0)
+#define CGEN_ATTR_CGEN_HW_PROFILE_VALUE(attrs) (((attrs)->bool & (1 << CGEN_HW_PROFILE)) != 0)
+#define CGEN_ATTR_CGEN_HW_IS_FLOAT_VALUE(attrs) (((attrs)->bool & (1 << CGEN_HW_IS_FLOAT)) != 0)
+
+/* Enum declaration for mep hardware types. */
+typedef enum cgen_hw_type {
+ HW_H_MEMORY, HW_H_SINT, HW_H_UINT, HW_H_ADDR
+ , HW_H_IADDR, HW_H_PC, HW_H_GPR, HW_H_CSR
+ , HW_H_CR64, HW_H_CR, HW_H_CCR, HW_H_CR_FMAX
+ , HW_H_CCR_FMAX, HW_H_FMAX_COMPARE_I_P, HW_MAX
+} CGEN_HW_TYPE;
+
+#define MAX_HW ((int) HW_MAX)
+
+/* Operand attribute indices. */
+
+/* Enum declaration for cgen_operand attrs. */
+typedef enum cgen_operand_attr {
+ CGEN_OPERAND_VIRTUAL, CGEN_OPERAND_PCREL_ADDR, CGEN_OPERAND_ABS_ADDR, CGEN_OPERAND_SIGN_OPT
+ , CGEN_OPERAND_SIGNED, CGEN_OPERAND_NEGATIVE, CGEN_OPERAND_RELAX, CGEN_OPERAND_SEM_ONLY
+ , CGEN_OPERAND_RELOC_IMPLIES_OVERFLOW, CGEN_OPERAND_END_BOOLS, CGEN_OPERAND_START_NBOOLS = 31, CGEN_OPERAND_MACH
+ , CGEN_OPERAND_ISA, CGEN_OPERAND_CDATA, CGEN_OPERAND_ALIGN, CGEN_OPERAND_END_NBOOLS
+} CGEN_OPERAND_ATTR;
+
+/* Number of non-boolean elements in cgen_operand_attr. */
+#define CGEN_OPERAND_NBOOL_ATTRS (CGEN_OPERAND_END_NBOOLS - CGEN_OPERAND_START_NBOOLS - 1)
+
+/* cgen_operand attribute accessor macros. */
+#define CGEN_ATTR_CGEN_OPERAND_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_OPERAND_MACH-CGEN_OPERAND_START_NBOOLS-1].nonbitset)
+#define CGEN_ATTR_CGEN_OPERAND_ISA_VALUE(attrs) ((attrs)->nonbool[CGEN_OPERAND_ISA-CGEN_OPERAND_START_NBOOLS-1].bitset)
+#define CGEN_ATTR_CGEN_OPERAND_CDATA_VALUE(attrs) ((attrs)->nonbool[CGEN_OPERAND_CDATA-CGEN_OPERAND_START_NBOOLS-1].nonbitset)
+#define CGEN_ATTR_CGEN_OPERAND_ALIGN_VALUE(attrs) ((attrs)->nonbool[CGEN_OPERAND_ALIGN-CGEN_OPERAND_START_NBOOLS-1].nonbitset)
+#define CGEN_ATTR_CGEN_OPERAND_VIRTUAL_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_VIRTUAL)) != 0)
+#define CGEN_ATTR_CGEN_OPERAND_PCREL_ADDR_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_PCREL_ADDR)) != 0)
+#define CGEN_ATTR_CGEN_OPERAND_ABS_ADDR_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_ABS_ADDR)) != 0)
+#define CGEN_ATTR_CGEN_OPERAND_SIGN_OPT_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_SIGN_OPT)) != 0)
+#define CGEN_ATTR_CGEN_OPERAND_SIGNED_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_SIGNED)) != 0)
+#define CGEN_ATTR_CGEN_OPERAND_NEGATIVE_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_NEGATIVE)) != 0)
+#define CGEN_ATTR_CGEN_OPERAND_RELAX_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_RELAX)) != 0)
+#define CGEN_ATTR_CGEN_OPERAND_SEM_ONLY_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_SEM_ONLY)) != 0)
+#define CGEN_ATTR_CGEN_OPERAND_RELOC_IMPLIES_OVERFLOW_VALUE(attrs) (((attrs)->bool & (1 << CGEN_OPERAND_RELOC_IMPLIES_OVERFLOW)) != 0)
+
+/* Enum declaration for mep operand types. */
+typedef enum cgen_operand_type {
+ MEP_OPERAND_PC, MEP_OPERAND_R0, MEP_OPERAND_RN, MEP_OPERAND_RM
+ , MEP_OPERAND_RL, MEP_OPERAND_RN3, MEP_OPERAND_RMA, MEP_OPERAND_RNC
+ , MEP_OPERAND_RNUC, MEP_OPERAND_RNS, MEP_OPERAND_RNUS, MEP_OPERAND_RNL
+ , MEP_OPERAND_RNUL, MEP_OPERAND_RN3C, MEP_OPERAND_RN3UC, MEP_OPERAND_RN3S
+ , MEP_OPERAND_RN3US, MEP_OPERAND_RN3L, MEP_OPERAND_RN3UL, MEP_OPERAND_LP
+ , MEP_OPERAND_SAR, MEP_OPERAND_HI, MEP_OPERAND_LO, MEP_OPERAND_MB0
+ , MEP_OPERAND_ME0, MEP_OPERAND_MB1, MEP_OPERAND_ME1, MEP_OPERAND_PSW
+ , MEP_OPERAND_EPC, MEP_OPERAND_EXC, MEP_OPERAND_NPC, MEP_OPERAND_DBG
+ , MEP_OPERAND_DEPC, MEP_OPERAND_OPT, MEP_OPERAND_R1, MEP_OPERAND_TP
+ , MEP_OPERAND_SP, MEP_OPERAND_TPR, MEP_OPERAND_SPR, MEP_OPERAND_CSRN
+ , MEP_OPERAND_CSRN_IDX, MEP_OPERAND_CRN64, MEP_OPERAND_CRN, MEP_OPERAND_CRNX64
+ , MEP_OPERAND_CRNX, MEP_OPERAND_CCRN, MEP_OPERAND_CCCC, MEP_OPERAND_PCREL8A2
+ , MEP_OPERAND_PCREL12A2, MEP_OPERAND_PCREL17A2, MEP_OPERAND_PCREL24A2, MEP_OPERAND_PCABS24A2
+ , MEP_OPERAND_SDISP16, MEP_OPERAND_SIMM16, MEP_OPERAND_UIMM16, MEP_OPERAND_CODE16
+ , MEP_OPERAND_UDISP2, MEP_OPERAND_UIMM2, MEP_OPERAND_SIMM6, MEP_OPERAND_SIMM8
+ , MEP_OPERAND_ADDR24A4, MEP_OPERAND_CODE24, MEP_OPERAND_CALLNUM, MEP_OPERAND_UIMM3
+ , MEP_OPERAND_UIMM4, MEP_OPERAND_UIMM5, MEP_OPERAND_UDISP7, MEP_OPERAND_UDISP7A2
+ , MEP_OPERAND_UDISP7A4, MEP_OPERAND_UIMM7A4, MEP_OPERAND_UIMM24, MEP_OPERAND_CIMM4
+ , MEP_OPERAND_CIMM5, MEP_OPERAND_CDISP8, MEP_OPERAND_CDISP8A2, MEP_OPERAND_CDISP8A4
+ , MEP_OPERAND_CDISP8A8, MEP_OPERAND_ZERO, MEP_OPERAND_CP_FLAG, MEP_OPERAND_FMAX_FRD
+ , MEP_OPERAND_FMAX_FRN, MEP_OPERAND_FMAX_FRM, MEP_OPERAND_FMAX_FRD_INT, MEP_OPERAND_FMAX_FRN_INT
+ , MEP_OPERAND_FMAX_CCRN, MEP_OPERAND_FMAX_CIRR, MEP_OPERAND_FMAX_CBCR, MEP_OPERAND_FMAX_CERR
+ , MEP_OPERAND_FMAX_RM, MEP_OPERAND_FMAX_COMPARE_I_P, MEP_OPERAND_MAX
+} CGEN_OPERAND_TYPE;
+
+/* Number of operands types. */
+#define MAX_OPERANDS 90
+
+/* Maximum number of operands referenced by any insn. */
+#define MAX_OPERAND_INSTANCES 8
+
+/* Insn attribute indices. */
+
+/* Enum declaration for cgen_insn attrs. */
+typedef enum cgen_insn_attr {
+ CGEN_INSN_ALIAS, CGEN_INSN_VIRTUAL, CGEN_INSN_UNCOND_CTI, CGEN_INSN_COND_CTI
+ , CGEN_INSN_SKIP_CTI, CGEN_INSN_DELAY_SLOT, CGEN_INSN_RELAXABLE, CGEN_INSN_RELAXED
+ , CGEN_INSN_NO_DIS, CGEN_INSN_PBB, CGEN_INSN_OPTIONAL_BIT_INSN, CGEN_INSN_OPTIONAL_MUL_INSN
+ , CGEN_INSN_OPTIONAL_DIV_INSN, CGEN_INSN_OPTIONAL_DEBUG_INSN, CGEN_INSN_OPTIONAL_LDZ_INSN, CGEN_INSN_OPTIONAL_ABS_INSN
+ , CGEN_INSN_OPTIONAL_AVE_INSN, CGEN_INSN_OPTIONAL_MINMAX_INSN, CGEN_INSN_OPTIONAL_CLIP_INSN, CGEN_INSN_OPTIONAL_SAT_INSN
+ , CGEN_INSN_OPTIONAL_UCI_INSN, CGEN_INSN_OPTIONAL_DSP_INSN, CGEN_INSN_OPTIONAL_CP_INSN, CGEN_INSN_OPTIONAL_CP64_INSN
+ , CGEN_INSN_OPTIONAL_VLIW64, CGEN_INSN_MAY_TRAP, CGEN_INSN_VLIW_ALONE, CGEN_INSN_VLIW_NO_CORE_NOP
+ , CGEN_INSN_VLIW_NO_COP_NOP, CGEN_INSN_VLIW64_NO_MATCHING_NOP, CGEN_INSN_VLIW32_NO_MATCHING_NOP, CGEN_INSN_VOLATILE
+ , CGEN_INSN_END_BOOLS, CGEN_INSN_START_NBOOLS = 31, CGEN_INSN_MACH, CGEN_INSN_ISA
+ , CGEN_INSN_LATENCY, CGEN_INSN_CONFIG, CGEN_INSN_END_NBOOLS
+} CGEN_INSN_ATTR;
+
+/* Number of non-boolean elements in cgen_insn_attr. */
+#define CGEN_INSN_NBOOL_ATTRS (CGEN_INSN_END_NBOOLS - CGEN_INSN_START_NBOOLS - 1)
+
+/* cgen_insn attribute accessor macros. */
+#define CGEN_ATTR_CGEN_INSN_MACH_VALUE(attrs) ((attrs)->nonbool[CGEN_INSN_MACH-CGEN_INSN_START_NBOOLS-1].nonbitset)
+#define CGEN_ATTR_CGEN_INSN_ISA_VALUE(attrs) ((attrs)->nonbool[CGEN_INSN_ISA-CGEN_INSN_START_NBOOLS-1].bitset)
+#define CGEN_ATTR_CGEN_INSN_LATENCY_VALUE(attrs) ((attrs)->nonbool[CGEN_INSN_LATENCY-CGEN_INSN_START_NBOOLS-1].nonbitset)
+#define CGEN_ATTR_CGEN_INSN_CONFIG_VALUE(attrs) ((attrs)->nonbool[CGEN_INSN_CONFIG-CGEN_INSN_START_NBOOLS-1].nonbitset)
+#define CGEN_ATTR_CGEN_INSN_ALIAS_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_ALIAS)) != 0)
+#define CGEN_ATTR_CGEN_INSN_VIRTUAL_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_VIRTUAL)) != 0)
+#define CGEN_ATTR_CGEN_INSN_UNCOND_CTI_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_UNCOND_CTI)) != 0)
+#define CGEN_ATTR_CGEN_INSN_COND_CTI_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_COND_CTI)) != 0)
+#define CGEN_ATTR_CGEN_INSN_SKIP_CTI_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_SKIP_CTI)) != 0)
+#define CGEN_ATTR_CGEN_INSN_DELAY_SLOT_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_DELAY_SLOT)) != 0)
+#define CGEN_ATTR_CGEN_INSN_RELAXABLE_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_RELAXABLE)) != 0)
+#define CGEN_ATTR_CGEN_INSN_RELAXED_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_RELAXED)) != 0)
+#define CGEN_ATTR_CGEN_INSN_NO_DIS_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_NO_DIS)) != 0)
+#define CGEN_ATTR_CGEN_INSN_PBB_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_PBB)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_BIT_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_BIT_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_MUL_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_MUL_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_DIV_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_DIV_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_DEBUG_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_DEBUG_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_LDZ_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_LDZ_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_ABS_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_ABS_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_AVE_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_AVE_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_MINMAX_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_MINMAX_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_CLIP_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_CLIP_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_SAT_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_SAT_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_UCI_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_UCI_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_DSP_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_DSP_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_CP_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_CP_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_CP64_INSN_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_CP64_INSN)) != 0)
+#define CGEN_ATTR_CGEN_INSN_OPTIONAL_VLIW64_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_OPTIONAL_VLIW64)) != 0)
+#define CGEN_ATTR_CGEN_INSN_MAY_TRAP_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_MAY_TRAP)) != 0)
+#define CGEN_ATTR_CGEN_INSN_VLIW_ALONE_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_VLIW_ALONE)) != 0)
+#define CGEN_ATTR_CGEN_INSN_VLIW_NO_CORE_NOP_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_VLIW_NO_CORE_NOP)) != 0)
+#define CGEN_ATTR_CGEN_INSN_VLIW_NO_COP_NOP_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_VLIW_NO_COP_NOP)) != 0)
+#define CGEN_ATTR_CGEN_INSN_VLIW64_NO_MATCHING_NOP_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_VLIW64_NO_MATCHING_NOP)) != 0)
+#define CGEN_ATTR_CGEN_INSN_VLIW32_NO_MATCHING_NOP_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_VLIW32_NO_MATCHING_NOP)) != 0)
+#define CGEN_ATTR_CGEN_INSN_VOLATILE_VALUE(attrs) (((attrs)->bool & (1 << CGEN_INSN_VOLATILE)) != 0)
+
+/* cgen.h uses things we just defined. */
+#include "opcode/cgen.h"
+
+extern const struct cgen_ifld mep_cgen_ifld_table[];
+
+/* Attributes. */
+extern const CGEN_ATTR_TABLE mep_cgen_hardware_attr_table[];
+extern const CGEN_ATTR_TABLE mep_cgen_ifield_attr_table[];
+extern const CGEN_ATTR_TABLE mep_cgen_operand_attr_table[];
+extern const CGEN_ATTR_TABLE mep_cgen_insn_attr_table[];
+
+/* Hardware decls. */
+
+extern CGEN_KEYWORD mep_cgen_opval_h_gpr;
+extern CGEN_KEYWORD mep_cgen_opval_h_csr;
+extern CGEN_KEYWORD mep_cgen_opval_h_cr64;
+extern CGEN_KEYWORD mep_cgen_opval_h_cr;
+extern CGEN_KEYWORD mep_cgen_opval_h_ccr;
+extern CGEN_KEYWORD mep_cgen_opval_h_cr_fmax;
+extern CGEN_KEYWORD mep_cgen_opval_h_ccr_fmax;
+
+extern const CGEN_HW_ENTRY mep_cgen_hw_table[];
+
+
+
+#endif /* MEP_CPU_H */
diff --git a/contrib/binutils/opcodes/mep-dis.c b/contrib/binutils/opcodes/mep-dis.c
new file mode 100644
index 0000000..769a80a
--- /dev/null
+++ b/contrib/binutils/opcodes/mep-dis.c
@@ -0,0 +1,1205 @@
+/* Disassembler interface for targets using CGEN. -*- C -*-
+ CGEN: Cpu tools GENerator
+
+ THIS FILE IS MACHINE GENERATED WITH CGEN.
+ - the resultant file is machine generated, cgen-dis.in isn't
+
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+ Free Software Foundation, Inc.
+
+ This file is part of the GNU Binutils and GDB, the GNU debugger.
+
+ 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.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* ??? Eventually more and more of this stuff can go to cpu-independent files.
+ Keep that in mind. */
+
+#include "sysdep.h"
+#include <stdio.h>
+#include "ansidecl.h"
+#include "dis-asm.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "libiberty.h"
+#include "mep-desc.h"
+#include "mep-opc.h"
+#include "opintl.h"
+
+/* Default text to print if an instruction isn't recognized. */
+#define UNKNOWN_INSN_MSG _("*unknown*")
+
+static void print_normal
+ (CGEN_CPU_DESC, void *, long, unsigned int, bfd_vma, int);
+static void print_address
+ (CGEN_CPU_DESC, void *, bfd_vma, unsigned int, bfd_vma, int) ATTRIBUTE_UNUSED;
+static void print_keyword
+ (CGEN_CPU_DESC, void *, CGEN_KEYWORD *, long, unsigned int) ATTRIBUTE_UNUSED;
+static void print_insn_normal
+ (CGEN_CPU_DESC, void *, const CGEN_INSN *, CGEN_FIELDS *, bfd_vma, int);
+static int print_insn
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, bfd_byte *, unsigned);
+static int default_print_insn
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *) ATTRIBUTE_UNUSED;
+static int read_insn
+ (CGEN_CPU_DESC, bfd_vma, disassemble_info *, bfd_byte *, int, CGEN_EXTRACT_INFO *,
+ unsigned long *);
+
+/* -- disassembler routines inserted here. */
+
+/* -- dis.c */
+
+#include "elf/mep.h"
+#include "elf-bfd.h"
+
+#define CGEN_VALIDATE_INSN_SUPPORTED
+
+static void print_tpreg (CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int);
+static void print_spreg (CGEN_CPU_DESC, PTR, CGEN_KEYWORD *, long, unsigned int);
+
+static void
+print_tpreg (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, PTR dis_info,
+ CGEN_KEYWORD *table ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED,
+ unsigned int flags ATTRIBUTE_UNUSED)
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+
+ (*info->fprintf_func) (info->stream, "$tp");
+}
+
+static void
+print_spreg (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED, PTR dis_info,
+ CGEN_KEYWORD *table ATTRIBUTE_UNUSED, long val ATTRIBUTE_UNUSED,
+ unsigned int flags ATTRIBUTE_UNUSED)
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+
+ (*info->fprintf_func) (info->stream, "$sp");
+}
+
+/* begin-cop-ip-print-handlers */
+static void
+print_fmax_cr (CGEN_CPU_DESC cd,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table ATTRIBUTE_UNUSED,
+ long value,
+ unsigned int attrs)
+{
+ print_keyword (cd, dis_info, & mep_cgen_opval_h_cr_fmax, value, attrs);
+}
+static void
+print_fmax_ccr (CGEN_CPU_DESC cd,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table ATTRIBUTE_UNUSED,
+ long value,
+ unsigned int attrs)
+{
+ print_keyword (cd, dis_info, & mep_cgen_opval_h_ccr_fmax, value, attrs);
+}
+/* end-cop-ip-print-handlers */
+
+/************************************************************\
+*********************** Experimental *************************
+\************************************************************/
+
+#undef CGEN_PRINT_INSN
+#define CGEN_PRINT_INSN mep_print_insn
+
+static int
+mep_print_vliw_insns (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info,
+ bfd_byte *buf, int corelength, int copro1length,
+ int copro2length ATTRIBUTE_UNUSED)
+{
+ int i;
+ int status = 0;
+ /* char insnbuf[CGEN_MAX_INSN_SIZE]; */
+ bfd_byte insnbuf[64];
+
+ /* If corelength > 0 then there is a core insn present. It
+ will be at the beginning of the buffer. After printing
+ the core insn, we need to print the + on the next line. */
+ if (corelength > 0)
+ {
+ int my_status = 0;
+
+ for (i = 0; i < corelength; i++ )
+ insnbuf[i] = buf[i];
+ cd->isas = & MEP_CORE_ISA;
+
+ my_status = print_insn (cd, pc, info, insnbuf, corelength);
+ if (my_status != corelength)
+ {
+ (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
+ my_status = corelength;
+ }
+ status += my_status;
+
+ /* Print the + to indicate that the following copro insn is */
+ /* part of a vliw group. */
+ if (copro1length > 0)
+ (*info->fprintf_func) (info->stream, " + ");
+ }
+
+ /* Now all that is left to be processed is the coprocessor insns
+ In vliw mode, there will always be one. Its positioning will
+ be from byte corelength to byte corelength+copro1length -1.
+ No need to check for existence. Also, the first vliw insn,
+ will, as spec'd, always be at least as long as the core insn
+ so we don't need to flush the buffer. */
+ if (copro1length > 0)
+ {
+ int my_status = 0;
+
+ for (i = corelength; i < corelength + copro1length; i++ )
+ insnbuf[i - corelength] = buf[i];
+
+ switch (copro1length)
+ {
+ case 0:
+ break;
+ case 2:
+ cd->isas = & MEP_COP16_ISA;
+ break;
+ case 4:
+ cd->isas = & MEP_COP32_ISA;
+ break;
+ case 6:
+ cd->isas = & MEP_COP48_ISA;
+ break;
+ case 8:
+ cd->isas = & MEP_COP64_ISA;
+ break;
+ default:
+ /* Shouldn't be anything but 16,32,48,64. */
+ break;
+ }
+
+ my_status = print_insn (cd, pc, info, insnbuf, copro1length);
+
+ if (my_status != copro1length)
+ {
+ (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
+ my_status = copro1length;
+ }
+ status += my_status;
+ }
+
+#if 0
+ /* Now we need to process the second copro insn if it exists. We
+ have no guarantee that the second copro insn will be longer
+ than the first, so we have to flush the buffer if we are have
+ a second copro insn to process. If present, this insn will
+ be in the position from byte corelength+copro1length to byte
+ corelength+copro1length+copro2length-1 (which better equal 8
+ or else we're in big trouble. */
+ if (copro2length > 0)
+ {
+ int my_status = 0;
+
+ for (i = 0; i < 64 ; i++)
+ insnbuf[i] = 0;
+
+ for (i = corelength + copro1length; i < 64; i++)
+ insnbuf[i - (corelength + copro1length)] = buf[i];
+
+ switch (copro2length)
+ {
+ case 2:
+ cd->isas = 1 << ISA_EXT_COP1_16;
+ break;
+ case 4:
+ cd->isas = 1 << ISA_EXT_COP1_32;
+ break;
+ case 6:
+ cd->isas = 1 << ISA_EXT_COP1_48;
+ break;
+ case 8:
+ cd->isas = 1 << ISA_EXT_COP1_64;
+ break;
+ default:
+ /* Shouldn't be anything but 16,32,48,64. */
+ break;
+ }
+
+ my_status = print_insn (cd, pc, info, insnbuf, copro2length);
+
+ if (my_status != copro2length)
+ {
+ (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
+ my_status = copro2length;
+ }
+
+ status += my_status;
+ }
+#endif
+
+ /* Status should now be the number of bytes that were printed
+ which should be 4 for VLIW32 mode and 64 for VLIW64 mode. */
+
+ if ((!MEP_VLIW64 && (status != 4)) || (MEP_VLIW64 && (status != 8)))
+ return -1;
+ else
+ return status;
+}
+
+/* The two functions mep_examine_vliw[32,64]_insns are used find out
+ which vliw combinaion (16 bit core with 48 bit copro, 32 bit core
+ with 32 bit copro, etc.) is present. Later on, when internally
+ parallel coprocessors are handled, only these functions should
+ need to be changed.
+
+ At this time only the following combinations are supported:
+
+ VLIW32 Mode:
+ 16 bit core insn (core) and 16 bit coprocessor insn (cop1)
+ 32 bit core insn (core)
+ 32 bit coprocessor insn (cop1)
+ Note: As of this time, I do not believe we have enough information
+ to distinguish a 32 bit core insn from a 32 bit cop insn. Also,
+ no 16 bit coprocessor insns have been specified.
+
+ VLIW64 Mode:
+ 16 bit core insn (core) and 48 bit coprocessor insn (cop1)
+ 32 bit core insn (core) and 32 bit coprocessor insn (cop1)
+ 64 bit coprocessor insn (cop1)
+
+ The framework for an internally parallel coprocessor is also
+ present (2nd coprocessor insn is cop2), but at this time it
+ is not used. This only appears to be valid in VLIW64 mode. */
+
+static int
+mep_examine_vliw32_insns (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
+{
+ int status;
+ int buflength;
+ int corebuflength;
+ int cop1buflength;
+ int cop2buflength;
+ bfd_byte buf[CGEN_MAX_INSN_SIZE];
+ char indicator16[1];
+ char indicatorcop32[2];
+
+ /* At this time we're not supporting internally parallel coprocessors,
+ so cop2buflength will always be 0. */
+ cop2buflength = 0;
+
+ /* Read in 32 bits. */
+ buflength = 4; /* VLIW insn spans 4 bytes. */
+ status = (*info->read_memory_func) (pc, buf, buflength, info);
+
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, pc, info);
+ return -1;
+ }
+
+ /* Put the big endian representation of the bytes to be examined
+ in the temporary buffers for examination. */
+
+ if (info->endian == BFD_ENDIAN_BIG)
+ {
+ indicator16[0] = buf[0];
+ indicatorcop32[0] = buf[0];
+ indicatorcop32[1] = buf[1];
+ }
+ else
+ {
+ indicator16[0] = buf[1];
+ indicatorcop32[0] = buf[1];
+ indicatorcop32[1] = buf[0];
+ }
+
+ /* If the two high order bits are 00, 01 or 10, we have a 16 bit
+ core insn and a 48 bit copro insn. */
+
+ if ((indicator16[0] & 0x80) && (indicator16[0] & 0x40))
+ {
+ if ((indicatorcop32[0] & 0xf0) == 0xf0 && (indicatorcop32[1] & 0x07) == 0x07)
+ {
+ /* We have a 32 bit copro insn. */
+ corebuflength = 0;
+ /* All 4 4ytes are one copro insn. */
+ cop1buflength = 4;
+ }
+ else
+ {
+ /* We have a 32 bit core. */
+ corebuflength = 4;
+ cop1buflength = 0;
+ }
+ }
+ else
+ {
+ /* We have a 16 bit core insn and a 16 bit copro insn. */
+ corebuflength = 2;
+ cop1buflength = 2;
+ }
+
+ /* Now we have the distrubution set. Print them out. */
+ status = mep_print_vliw_insns (cd, pc, info, buf, corebuflength,
+ cop1buflength, cop2buflength);
+
+ return status;
+}
+
+static int
+mep_examine_vliw64_insns (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
+{
+ int status;
+ int buflength;
+ int corebuflength;
+ int cop1buflength;
+ int cop2buflength;
+ bfd_byte buf[CGEN_MAX_INSN_SIZE];
+ char indicator16[1];
+ char indicator64[4];
+
+ /* At this time we're not supporting internally parallel
+ coprocessors, so cop2buflength will always be 0. */
+ cop2buflength = 0;
+
+ /* Read in 64 bits. */
+ buflength = 8; /* VLIW insn spans 8 bytes. */
+ status = (*info->read_memory_func) (pc, buf, buflength, info);
+
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, pc, info);
+ return -1;
+ }
+
+ /* We have all 64 bits in the buffer now. We have to figure out
+ what combination of instruction sizes are present. The two
+ high order bits will indicate whether or not we have a 16 bit
+ core insn or not. If not, then we have to look at the 7,8th
+ bytes to tell whether we have 64 bit copro insn or a 32 bit
+ core insn with a 32 bit copro insn. Endianness will make a
+ difference here. */
+
+ /* Put the big endian representation of the bytes to be examined
+ in the temporary buffers for examination. */
+
+ /* indicator16[0] = buf[0]; */
+ if (info->endian == BFD_ENDIAN_BIG)
+ {
+ indicator16[0] = buf[0];
+ indicator64[0] = buf[0];
+ indicator64[1] = buf[1];
+ indicator64[2] = buf[2];
+ indicator64[3] = buf[3];
+ }
+ else
+ {
+ indicator16[0] = buf[1];
+ indicator64[0] = buf[1];
+ indicator64[1] = buf[0];
+ indicator64[2] = buf[3];
+ indicator64[3] = buf[2];
+ }
+
+ /* If the two high order bits are 00, 01 or 10, we have a 16 bit
+ core insn and a 48 bit copro insn. */
+
+ if ((indicator16[0] & 0x80) && (indicator16[0] & 0x40))
+ {
+ if ((indicator64[0] & 0xf0) == 0xf0 && (indicator64[1] & 0x07) == 0x07
+ && ((indicator64[2] & 0xfe) != 0xf0 || (indicator64[3] & 0xf4) != 0))
+ {
+ /* We have a 64 bit copro insn. */
+ corebuflength = 0;
+ /* All 8 bytes are one copro insn. */
+ cop1buflength = 8;
+ }
+ else
+ {
+ /* We have a 32 bit core insn and a 32 bit copro insn. */
+ corebuflength = 4;
+ cop1buflength = 4;
+ }
+ }
+ else
+ {
+ /* We have a 16 bit core insn and a 48 bit copro insn. */
+ corebuflength = 2;
+ cop1buflength = 6;
+ }
+
+ /* Now we have the distrubution set. Print them out. */
+ status = mep_print_vliw_insns (cd, pc, info, buf, corebuflength,
+ cop1buflength, cop2buflength);
+
+ return status;
+}
+
+static int
+mep_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
+{
+ int status;
+
+ /* Extract and adapt to configuration number, if available. */
+ if (info->section && info->section->owner)
+ {
+ bfd *abfd = info->section->owner;
+ mep_config_index = abfd->tdata.elf_obj_data->elf_header->e_flags & EF_MEP_INDEX_MASK;
+ /* This instantly redefines MEP_CONFIG, MEP_OMASK, .... MEP_VLIW64 */
+ }
+
+ /* Picking the right ISA bitmask for the current context is tricky. */
+ if (info->section)
+ {
+ if (info->section->flags & SEC_MEP_VLIW)
+ {
+ /* Are we in 32 or 64 bit vliw mode? */
+ if (MEP_VLIW64)
+ status = mep_examine_vliw64_insns (cd, pc, info);
+ else
+ status = mep_examine_vliw32_insns (cd, pc, info);
+ /* Both the above branches set their own isa bitmasks. */
+ }
+ else
+ {
+ cd->isas = & MEP_CORE_ISA;
+ status = default_print_insn (cd, pc, info);
+ }
+ }
+ else /* sid or gdb */
+ {
+ status = default_print_insn (cd, pc, info);
+ }
+
+ return status;
+}
+
+
+/* -- opc.c */
+
+void mep_cgen_print_operand
+ (CGEN_CPU_DESC, int, PTR, CGEN_FIELDS *, void const *, bfd_vma, int);
+
+/* Main entry point for printing operands.
+ XINFO is a `void *' and not a `disassemble_info *' to not put a requirement
+ of dis-asm.h on cgen.h.
+
+ This function is basically just a big switch statement. Earlier versions
+ used tables to look up the function to use, but
+ - if the table contains both assembler and disassembler functions then
+ the disassembler contains much of the assembler and vice-versa,
+ - there's a lot of inlining possibilities as things grow,
+ - using a switch statement avoids the function call overhead.
+
+ This function could be moved into `print_insn_normal', but keeping it
+ separate makes clear the interface between `print_insn_normal' and each of
+ the handlers. */
+
+void
+mep_cgen_print_operand (CGEN_CPU_DESC cd,
+ int opindex,
+ void * xinfo,
+ CGEN_FIELDS *fields,
+ void const *attrs ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ int length)
+{
+ disassemble_info *info = (disassemble_info *) xinfo;
+
+ switch (opindex)
+ {
+ case MEP_OPERAND_ADDR24A4 :
+ print_normal (cd, info, fields->f_24u8a4n, 0|(1<<CGEN_OPERAND_VIRTUAL), pc, length);
+ break;
+ case MEP_OPERAND_CALLNUM :
+ print_normal (cd, info, fields->f_callnum, 0|(1<<CGEN_OPERAND_VIRTUAL), pc, length);
+ break;
+ case MEP_OPERAND_CCCC :
+ print_normal (cd, info, fields->f_rm, 0, pc, length);
+ break;
+ case MEP_OPERAND_CCRN :
+ print_keyword (cd, info, & mep_cgen_opval_h_ccr, fields->f_ccrn, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_CDISP8 :
+ print_normal (cd, info, fields->f_8s24, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+ case MEP_OPERAND_CDISP8A2 :
+ print_normal (cd, info, fields->f_8s24a2, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+ case MEP_OPERAND_CDISP8A4 :
+ print_normal (cd, info, fields->f_8s24a4, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+ case MEP_OPERAND_CDISP8A8 :
+ print_normal (cd, info, fields->f_8s24a8, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+ case MEP_OPERAND_CIMM4 :
+ print_normal (cd, info, fields->f_rn, 0, pc, length);
+ break;
+ case MEP_OPERAND_CIMM5 :
+ print_normal (cd, info, fields->f_5u24, 0, pc, length);
+ break;
+ case MEP_OPERAND_CODE16 :
+ print_normal (cd, info, fields->f_16u16, 0, pc, length);
+ break;
+ case MEP_OPERAND_CODE24 :
+ print_normal (cd, info, fields->f_24u4n, 0|(1<<CGEN_OPERAND_VIRTUAL), pc, length);
+ break;
+ case MEP_OPERAND_CP_FLAG :
+ print_keyword (cd, info, & mep_cgen_opval_h_ccr, 0, 0);
+ break;
+ case MEP_OPERAND_CRN :
+ print_keyword (cd, info, & mep_cgen_opval_h_cr, fields->f_crn, 0);
+ break;
+ case MEP_OPERAND_CRN64 :
+ print_keyword (cd, info, & mep_cgen_opval_h_cr64, fields->f_crn, 0);
+ break;
+ case MEP_OPERAND_CRNX :
+ print_keyword (cd, info, & mep_cgen_opval_h_cr, fields->f_crnx, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_CRNX64 :
+ print_keyword (cd, info, & mep_cgen_opval_h_cr64, fields->f_crnx, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_CSRN :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, fields->f_csrn, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_CSRN_IDX :
+ print_normal (cd, info, fields->f_csrn, 0|(1<<CGEN_OPERAND_VIRTUAL), pc, length);
+ break;
+ case MEP_OPERAND_DBG :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_DEPC :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_EPC :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_EXC :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_FMAX_CCRN :
+ print_fmax_ccr (cd, info, & mep_cgen_opval_h_ccr, fields->f_fmax_4_4, 0);
+ break;
+ case MEP_OPERAND_FMAX_FRD :
+ print_fmax_cr (cd, info, & mep_cgen_opval_h_cr, fields->f_fmax_frd, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_FMAX_FRD_INT :
+ print_fmax_cr (cd, info, & mep_cgen_opval_h_cr, fields->f_fmax_frd, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_FMAX_FRM :
+ print_fmax_cr (cd, info, & mep_cgen_opval_h_cr, fields->f_fmax_frm, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_FMAX_FRN :
+ print_fmax_cr (cd, info, & mep_cgen_opval_h_cr, fields->f_fmax_frn, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_FMAX_FRN_INT :
+ print_fmax_cr (cd, info, & mep_cgen_opval_h_cr, fields->f_fmax_frn, 0|(1<<CGEN_OPERAND_VIRTUAL));
+ break;
+ case MEP_OPERAND_FMAX_RM :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_fmax_rm, 0);
+ break;
+ case MEP_OPERAND_HI :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_LO :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_LP :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_MB0 :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_MB1 :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_ME0 :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_ME1 :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_NPC :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_OPT :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_PCABS24A2 :
+ print_address (cd, info, fields->f_24u5a2n, 0|(1<<CGEN_OPERAND_ABS_ADDR)|(1<<CGEN_OPERAND_VIRTUAL), pc, length);
+ break;
+ case MEP_OPERAND_PCREL12A2 :
+ print_address (cd, info, fields->f_12s4a2, 0|(1<<CGEN_OPERAND_SIGNED)|(1<<CGEN_OPERAND_RELAX)|(1<<CGEN_OPERAND_PCREL_ADDR), pc, length);
+ break;
+ case MEP_OPERAND_PCREL17A2 :
+ print_address (cd, info, fields->f_17s16a2, 0|(1<<CGEN_OPERAND_SIGNED)|(1<<CGEN_OPERAND_RELAX)|(1<<CGEN_OPERAND_PCREL_ADDR), pc, length);
+ break;
+ case MEP_OPERAND_PCREL24A2 :
+ print_address (cd, info, fields->f_24s5a2n, 0|(1<<CGEN_OPERAND_SIGNED)|(1<<CGEN_OPERAND_PCREL_ADDR)|(1<<CGEN_OPERAND_VIRTUAL), pc, length);
+ break;
+ case MEP_OPERAND_PCREL8A2 :
+ print_address (cd, info, fields->f_8s8a2, 0|(1<<CGEN_OPERAND_SIGNED)|(1<<CGEN_OPERAND_RELAX)|(1<<CGEN_OPERAND_PCREL_ADDR), pc, length);
+ break;
+ case MEP_OPERAND_PSW :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_R0 :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, 0, 0);
+ break;
+ case MEP_OPERAND_R1 :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, 0, 0);
+ break;
+ case MEP_OPERAND_RL :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rl, 0);
+ break;
+ case MEP_OPERAND_RM :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rm, 0);
+ break;
+ case MEP_OPERAND_RMA :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rm, 0);
+ break;
+ case MEP_OPERAND_RN :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn, 0);
+ break;
+ case MEP_OPERAND_RN3 :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn3, 0);
+ break;
+ case MEP_OPERAND_RN3C :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn3, 0);
+ break;
+ case MEP_OPERAND_RN3L :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn3, 0);
+ break;
+ case MEP_OPERAND_RN3S :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn3, 0);
+ break;
+ case MEP_OPERAND_RN3UC :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn3, 0);
+ break;
+ case MEP_OPERAND_RN3UL :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn3, 0);
+ break;
+ case MEP_OPERAND_RN3US :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn3, 0);
+ break;
+ case MEP_OPERAND_RNC :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn, 0);
+ break;
+ case MEP_OPERAND_RNL :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn, 0);
+ break;
+ case MEP_OPERAND_RNS :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn, 0);
+ break;
+ case MEP_OPERAND_RNUC :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn, 0);
+ break;
+ case MEP_OPERAND_RNUL :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn, 0);
+ break;
+ case MEP_OPERAND_RNUS :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, fields->f_rn, 0);
+ break;
+ case MEP_OPERAND_SAR :
+ print_keyword (cd, info, & mep_cgen_opval_h_csr, 0, 0);
+ break;
+ case MEP_OPERAND_SDISP16 :
+ print_normal (cd, info, fields->f_16s16, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+ case MEP_OPERAND_SIMM16 :
+ print_normal (cd, info, fields->f_16s16, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+ case MEP_OPERAND_SIMM6 :
+ print_normal (cd, info, fields->f_6s8, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+ case MEP_OPERAND_SIMM8 :
+ print_normal (cd, info, fields->f_8s8, 0|(1<<CGEN_OPERAND_SIGNED)|(1<<CGEN_OPERAND_RELOC_IMPLIES_OVERFLOW), pc, length);
+ break;
+ case MEP_OPERAND_SP :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, 0, 0);
+ break;
+ case MEP_OPERAND_SPR :
+ print_spreg (cd, info, & mep_cgen_opval_h_gpr, 0, 0);
+ break;
+ case MEP_OPERAND_TP :
+ print_keyword (cd, info, & mep_cgen_opval_h_gpr, 0, 0);
+ break;
+ case MEP_OPERAND_TPR :
+ print_tpreg (cd, info, & mep_cgen_opval_h_gpr, 0, 0);
+ break;
+ case MEP_OPERAND_UDISP2 :
+ print_normal (cd, info, fields->f_2u6, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+ case MEP_OPERAND_UDISP7 :
+ print_normal (cd, info, fields->f_7u9, 0, pc, length);
+ break;
+ case MEP_OPERAND_UDISP7A2 :
+ print_normal (cd, info, fields->f_7u9a2, 0, pc, length);
+ break;
+ case MEP_OPERAND_UDISP7A4 :
+ print_normal (cd, info, fields->f_7u9a4, 0, pc, length);
+ break;
+ case MEP_OPERAND_UIMM16 :
+ print_normal (cd, info, fields->f_16u16, 0, pc, length);
+ break;
+ case MEP_OPERAND_UIMM2 :
+ print_normal (cd, info, fields->f_2u10, 0, pc, length);
+ break;
+ case MEP_OPERAND_UIMM24 :
+ print_normal (cd, info, fields->f_24u8n, 0|(1<<CGEN_OPERAND_VIRTUAL), pc, length);
+ break;
+ case MEP_OPERAND_UIMM3 :
+ print_normal (cd, info, fields->f_3u5, 0, pc, length);
+ break;
+ case MEP_OPERAND_UIMM4 :
+ print_normal (cd, info, fields->f_4u8, 0, pc, length);
+ break;
+ case MEP_OPERAND_UIMM5 :
+ print_normal (cd, info, fields->f_5u8, 0, pc, length);
+ break;
+ case MEP_OPERAND_UIMM7A4 :
+ print_normal (cd, info, fields->f_7u9a4, 0, pc, length);
+ break;
+ case MEP_OPERAND_ZERO :
+ print_normal (cd, info, 0, 0|(1<<CGEN_OPERAND_SIGNED), pc, length);
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while printing insn.\n"),
+ opindex);
+ abort ();
+ }
+}
+
+cgen_print_fn * const mep_cgen_print_handlers[] =
+{
+ print_insn_normal,
+};
+
+
+void
+mep_cgen_init_dis (CGEN_CPU_DESC cd)
+{
+ mep_cgen_init_opcode_table (cd);
+ mep_cgen_init_ibld_table (cd);
+ cd->print_handlers = & mep_cgen_print_handlers[0];
+ cd->print_operand = mep_cgen_print_operand;
+}
+
+
+/* Default print handler. */
+
+static void
+print_normal (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ long value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+
+#ifdef CGEN_PRINT_NORMAL
+ CGEN_PRINT_NORMAL (cd, info, value, attrs, pc, length);
+#endif
+
+ /* Print the operand as directed by the attributes. */
+ if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
+ ; /* nothing to do */
+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED))
+ (*info->fprintf_func) (info->stream, "%ld", value);
+ else
+ (*info->fprintf_func) (info->stream, "0x%lx", value);
+}
+
+/* Default address handler. */
+
+static void
+print_address (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ bfd_vma value,
+ unsigned int attrs,
+ bfd_vma pc ATTRIBUTE_UNUSED,
+ int length ATTRIBUTE_UNUSED)
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+
+#ifdef CGEN_PRINT_ADDRESS
+ CGEN_PRINT_ADDRESS (cd, info, value, attrs, pc, length);
+#endif
+
+ /* Print the operand as directed by the attributes. */
+ if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SEM_ONLY))
+ ; /* Nothing to do. */
+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_PCREL_ADDR))
+ (*info->print_address_func) (value, info);
+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_ABS_ADDR))
+ (*info->print_address_func) (value, info);
+ else if (CGEN_BOOL_ATTR (attrs, CGEN_OPERAND_SIGNED))
+ (*info->fprintf_func) (info->stream, "%ld", (long) value);
+ else
+ (*info->fprintf_func) (info->stream, "0x%lx", (long) value);
+}
+
+/* Keyword print handler. */
+
+static void
+print_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ void *dis_info,
+ CGEN_KEYWORD *keyword_table,
+ long value,
+ unsigned int attrs ATTRIBUTE_UNUSED)
+{
+ disassemble_info *info = (disassemble_info *) dis_info;
+ const CGEN_KEYWORD_ENTRY *ke;
+
+ ke = cgen_keyword_lookup_value (keyword_table, value);
+ if (ke != NULL)
+ (*info->fprintf_func) (info->stream, "%s", ke->name);
+ else
+ (*info->fprintf_func) (info->stream, "???");
+}
+
+/* Default insn printer.
+
+ DIS_INFO is defined as `void *' so the disassembler needn't know anything
+ about disassemble_info. */
+
+static void
+print_insn_normal (CGEN_CPU_DESC cd,
+ void *dis_info,
+ const CGEN_INSN *insn,
+ CGEN_FIELDS *fields,
+ bfd_vma pc,
+ int length)
+{
+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
+ disassemble_info *info = (disassemble_info *) dis_info;
+ const CGEN_SYNTAX_CHAR_TYPE *syn;
+
+ CGEN_INIT_PRINT (cd);
+
+ for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
+ {
+ if (CGEN_SYNTAX_MNEMONIC_P (*syn))
+ {
+ (*info->fprintf_func) (info->stream, "%s", CGEN_INSN_MNEMONIC (insn));
+ continue;
+ }
+ if (CGEN_SYNTAX_CHAR_P (*syn))
+ {
+ (*info->fprintf_func) (info->stream, "%c", CGEN_SYNTAX_CHAR (*syn));
+ continue;
+ }
+
+ /* We have an operand. */
+ mep_cgen_print_operand (cd, CGEN_SYNTAX_FIELD (*syn), info,
+ fields, CGEN_INSN_ATTRS (insn), 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 (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ bfd_vma pc,
+ disassemble_info *info,
+ bfd_byte *buf,
+ int buflen,
+ CGEN_EXTRACT_INFO *ex_info,
+ unsigned long *insn_value)
+{
+ int status = (*info->read_memory_func) (pc, buf, buflen, info);
+
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, pc, info);
+ return -1;
+ }
+
+ ex_info->dis_info = info;
+ ex_info->valid = (1 << buflen) - 1;
+ ex_info->insn_bytes = buf;
+
+ *insn_value = bfd_get_bits (buf, buflen * 8, info->endian == BFD_ENDIAN_BIG);
+ return 0;
+}
+
+/* Utility to print an insn.
+ BUF is the base part of the insn, target byte order, BUFLEN bytes long.
+ The result is the size of the insn in bytes or zero for an unknown insn
+ or -1 if an error occurs fetching data (memory_error_func will have
+ been called). */
+
+static int
+print_insn (CGEN_CPU_DESC cd,
+ bfd_vma pc,
+ disassemble_info *info,
+ bfd_byte *buf,
+ unsigned int buflen)
+{
+ 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);
+
+
+ /* 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. */
+
+ insn_list = CGEN_DIS_LOOKUP_INSN (cd, (char *) buf, insn_value);
+ while (insn_list != NULL)
+ {
+ 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. */
+ /* Supported by this cpu? */
+ if (! mep_cgen_insn_supported (cd, insn))
+ {
+ insn_list = CGEN_DIS_NEXT_INSN (insn_list);
+ continue;
+ }
+#endif
+
+ /* Basic bit mask must be correct. */
+ /* ??? May wish to allow target to defer this check until the extract
+ handler. */
+
+ /* 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
+ machine insn and extracts the fields. The second pass prints
+ them. */
+
+ /* Make sure the entire insn is loaded into insn_value, if it
+ can fit. */
+ 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,
+ CGEN_INSN_BITSIZE (insn) / 8,
+ & ex_info, & full_insn_value);
+ if (rc != 0)
+ return rc;
+ length = CGEN_EXTRACT_FN (cd, insn)
+ (cd, insn, &ex_info, full_insn_value, &fields, pc);
+ }
+ else
+ length = CGEN_EXTRACT_FN (cd, insn)
+ (cd, insn, &ex_info, insn_value_cropped, &fields, pc);
+
+ /* Length < 0 -> error. */
+ if (length < 0)
+ return length;
+ if (length > 0)
+ {
+ CGEN_PRINT_FN (cd, insn) (cd, info, insn, &fields, pc, length);
+ /* Length is in bits, result is in bytes. */
+ return length / 8;
+ }
+ }
+
+ insn_list = CGEN_DIS_NEXT_INSN (insn_list);
+ }
+
+ return 0;
+}
+
+/* Default value for CGEN_PRINT_INSN.
+ The result is the size of the insn in bytes or zero for an unknown insn
+ or -1 if an error occured fetching bytes. */
+
+#ifndef CGEN_PRINT_INSN
+#define CGEN_PRINT_INSN default_print_insn
+#endif
+
+static int
+default_print_insn (CGEN_CPU_DESC cd, bfd_vma pc, disassemble_info *info)
+{
+ bfd_byte buf[CGEN_MAX_INSN_SIZE];
+ int buflen;
+ int status;
+
+ /* 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);
+ }
+
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, pc, info);
+ return -1;
+ }
+
+ return print_insn (cd, pc, info, buf, buflen);
+}
+
+/* Main entry point.
+ Print one instruction from PC on INFO->STREAM.
+ Return the size of the instruction (in bytes). */
+
+typedef struct cpu_desc_list
+{
+ struct cpu_desc_list *next;
+ CGEN_BITSET *isa;
+ int mach;
+ int endian;
+ CGEN_CPU_DESC cd;
+} cpu_desc_list;
+
+int
+print_insn_mep (bfd_vma pc, disassemble_info *info)
+{
+ static cpu_desc_list *cd_list = 0;
+ cpu_desc_list *cl = 0;
+ static CGEN_CPU_DESC cd = 0;
+ static CGEN_BITSET *prev_isa;
+ static int prev_mach;
+ static int prev_endian;
+ int length;
+ CGEN_BITSET *isa;
+ int mach;
+ int endian = (info->endian == BFD_ENDIAN_BIG
+ ? CGEN_ENDIAN_BIG
+ : CGEN_ENDIAN_LITTLE);
+ enum bfd_architecture arch;
+
+ /* ??? gdb will set mach but leave the architecture as "unknown" */
+#ifndef CGEN_BFD_ARCH
+#define CGEN_BFD_ARCH bfd_arch_mep
+#endif
+ arch = info->arch;
+ if (arch == bfd_arch_unknown)
+ arch = CGEN_BFD_ARCH;
+
+ /* 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
+ {
+ static CGEN_BITSET *permanent_isa;
+
+ if (!permanent_isa)
+ permanent_isa = cgen_bitset_create (MAX_ISAS);
+ isa = permanent_isa;
+ cgen_bitset_clear (isa);
+ cgen_bitset_add (isa, CGEN_COMPUTE_ISA (info));
+ }
+#else
+ isa = info->insn_sets;
+#endif
+
+ /* If we've switched cpu's, try to find a handle we've used before */
+ if (cd
+ && (cgen_bitset_compare (isa, prev_isa) != 0
+ || mach != prev_mach
+ || endian != prev_endian))
+ {
+ cd = 0;
+ for (cl = cd_list; cl; cl = cl->next)
+ {
+ if (cgen_bitset_compare (cl->isa, isa) == 0 &&
+ cl->mach == mach &&
+ cl->endian == endian)
+ {
+ cd = cl->cd;
+ prev_isa = cd->isas;
+ break;
+ }
+ }
+ }
+
+ /* If we haven't initialized yet, initialize the opcode table. */
+ if (! cd)
+ {
+ const bfd_arch_info_type *arch_type = bfd_lookup_arch (arch, mach);
+ const char *mach_name;
+
+ if (!arch_type)
+ abort ();
+ mach_name = arch_type->printable_name;
+
+ prev_isa = cgen_bitset_copy (isa);
+ prev_mach = mach;
+ prev_endian = endian;
+ cd = mep_cgen_cpu_open (CGEN_CPU_OPEN_ISAS, prev_isa,
+ CGEN_CPU_OPEN_BFDMACH, mach_name,
+ CGEN_CPU_OPEN_ENDIAN, prev_endian,
+ CGEN_CPU_OPEN_END);
+ if (!cd)
+ abort ();
+
+ /* Save this away for future reference. */
+ cl = xmalloc (sizeof (struct cpu_desc_list));
+ cl->cd = cd;
+ cl->isa = prev_isa;
+ cl->mach = mach;
+ cl->endian = endian;
+ cl->next = cd_list;
+ cd_list = cl;
+
+ mep_cgen_init_dis (cd);
+ }
+
+ /* We try to have as much common code as possible.
+ But at this point some targets need to take over. */
+ /* ??? Some targets may need a hook elsewhere. Try to avoid this,
+ but if not possible try to move this hook elsewhere rather than
+ have two hooks. */
+ length = CGEN_PRINT_INSN (cd, pc, info);
+ if (length > 0)
+ return length;
+ if (length < 0)
+ return -1;
+
+ (*info->fprintf_func) (info->stream, UNKNOWN_INSN_MSG);
+ return cd->default_insn_bitsize / 8;
+}
diff --git a/contrib/binutils/opcodes/mep-ibld.c b/contrib/binutils/opcodes/mep-ibld.c
new file mode 100644
index 0000000..7dd6496
--- /dev/null
+++ b/contrib/binutils/opcodes/mep-ibld.c
@@ -0,0 +1,2541 @@
+/* Instruction building/extraction support for mep. -*- C -*-
+
+ THIS FILE IS MACHINE GENERATED WITH CGEN: Cpu tools GENerator.
+ - the resultant file is machine generated, cgen-ibld.in isn't
+
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This file is part of the GNU Binutils and GDB, the GNU debugger.
+
+ 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.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* ??? Eventually more and more of this stuff can go to cpu-independent files.
+ Keep that in mind. */
+
+#include "sysdep.h"
+#include <stdio.h>
+#include "ansidecl.h"
+#include "dis-asm.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "mep-desc.h"
+#include "mep-opc.h"
+#include "opintl.h"
+#include "safe-ctype.h"
+
+#undef min
+#define min(a,b) ((a) < (b) ? (a) : (b))
+#undef max
+#define max(a,b) ((a) > (b) ? (a) : (b))
+
+/* Used by the ifield rtx function. */
+#define FLD(f) (fields->f)
+
+static const char * insert_normal
+ (CGEN_CPU_DESC, long, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, unsigned int, CGEN_INSN_BYTES_PTR);
+static const char * insert_insn_normal
+ (CGEN_CPU_DESC, const CGEN_INSN *,
+ CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
+static int extract_normal
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
+ unsigned int, unsigned int, unsigned int, unsigned int,
+ unsigned int, unsigned int, bfd_vma, long *);
+static int extract_insn_normal
+ (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
+ (CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT);
+#endif
+#if ! CGEN_INT_INSN_P
+static CGEN_INLINE void insert_1
+ (CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *);
+static CGEN_INLINE int fill_cache
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma);
+static CGEN_INLINE long extract_1
+ (CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int, unsigned char *, bfd_vma);
+#endif
+
+/* Operand insertion. */
+
+#if ! CGEN_INT_INSN_P
+
+/* Subroutine of insert_normal. */
+
+static CGEN_INLINE void
+insert_1 (CGEN_CPU_DESC cd,
+ unsigned long value,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp)
+{
+ unsigned long x,mask;
+ int shift;
+
+ x = cgen_get_insn_value (cd, bufp, word_length);
+
+ /* Written this way to avoid undefined behaviour. */
+ mask = (((1L << (length - 1)) - 1) << 1) | 1;
+ if (CGEN_INSN_LSB0_P)
+ shift = (start + 1) - length;
+ else
+ shift = (word_length - (start + length));
+ x = (x & ~(mask << shift)) | ((value & mask) << shift);
+
+ cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
+}
+
+#endif /* ! CGEN_INT_INSN_P */
+
+/* Default insertion routine.
+
+ ATTRS is a mask of the boolean attributes.
+ WORD_OFFSET is the offset in bits from the start of the insn of the value.
+ WORD_LENGTH is the length of the word in bits in which the value resides.
+ START is the starting bit number in the word, architecture origin.
+ LENGTH is the length of VALUE in bits.
+ TOTAL_LENGTH is the total length of the insn in bits.
+
+ The result is an error message or NULL if success. */
+
+/* ??? This duplicates functionality with bfd's howto table and
+ bfd_install_relocation. */
+/* ??? This doesn't handle bfd_vma's. Create another function when
+ necessary. */
+
+static const char *
+insert_normal (CGEN_CPU_DESC cd,
+ long value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+ CGEN_INSN_BYTES_PTR buffer)
+{
+ static char errbuf[100];
+ /* Written this way to avoid undefined behaviour. */
+ unsigned long mask = (((1L << (length - 1)) - 1) << 1) | 1;
+
+ /* If LENGTH is zero, this operand doesn't contribute to the value. */
+ if (length == 0)
+ return NULL;
+
+ if (word_length > 32)
+ abort ();
+
+ /* For architectures with insns smaller than the base-insn-bitsize,
+ word_length may be too big. */
+ if (cd->min_insn_bitsize < cd->base_insn_bitsize)
+ {
+ if (word_offset == 0
+ && word_length > total_length)
+ word_length = total_length;
+ }
+
+ /* Ensure VALUE will fit. */
+ 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;
+ unsigned long val = (unsigned long) value;
+
+ /* For hosts with a word size > 32 check to see if value has been sign
+ extended beyond 32 bits. If so then ignore these higher sign bits
+ as the user is attempting to store a 32-bit signed value into an
+ unsigned 32-bit field which is allowed. */
+ if (sizeof (unsigned long) > 4 && ((value >> 32) == -1))
+ val &= 0xFFFFFFFF;
+
+ if (val > maxval)
+ {
+ /* xgettext:c-format */
+ sprintf (errbuf,
+ _("operand out of range (0x%lx not between 0 and 0x%lx)"),
+ val, maxval);
+ return errbuf;
+ }
+ }
+ else
+ {
+ if (! cgen_signed_overflow_ok_p (cd))
+ {
+ long minval = - (1L << (length - 1));
+ long maxval = (1L << (length - 1)) - 1;
+
+ if (value < minval || value > maxval)
+ {
+ sprintf
+ /* xgettext:c-format */
+ (errbuf, _("operand out of range (%ld not between %ld and %ld)"),
+ value, minval, maxval);
+ return errbuf;
+ }
+ }
+ }
+
+#if CGEN_INT_INSN_P
+
+ {
+ int shift;
+
+ if (CGEN_INSN_LSB0_P)
+ shift = (word_offset + start + 1) - length;
+ else
+ shift = total_length - (word_offset + start + length);
+ *buffer = (*buffer & ~(mask << shift)) | ((value & mask) << shift);
+ }
+
+#else /* ! CGEN_INT_INSN_P */
+
+ {
+ unsigned char *bufp = (unsigned char *) buffer + word_offset / 8;
+
+ insert_1 (cd, value, start, length, word_length, bufp);
+ }
+
+#endif /* ! CGEN_INT_INSN_P */
+
+ return NULL;
+}
+
+/* Default insn builder (insert handler).
+ 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 *
+insert_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN * insn,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc)
+{
+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
+ unsigned long value;
+ const CGEN_SYNTAX_CHAR_TYPE * syn;
+
+ CGEN_INIT_INSERT (cd);
+ value = CGEN_INSN_BASE_VALUE (insn);
+
+ /* If we're recording insns as numbers (rather than a string of bytes),
+ target byte order handling is deferred until later. */
+
+#if CGEN_INT_INSN_P
+
+ put_insn_int_value (cd, buffer, cd->base_insn_bitsize,
+ CGEN_FIELDS_BITSIZE (fields), value);
+
+#else
+
+ cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
+ (unsigned) CGEN_FIELDS_BITSIZE (fields)),
+ value);
+
+#endif /* ! CGEN_INT_INSN_P */
+
+ /* ??? It would be better to scan the format's fields.
+ Still need to be able to insert a value based on the operand though;
+ e.g. storing a branch displacement that got resolved later.
+ Needs more thought first. */
+
+ for (syn = CGEN_SYNTAX_STRING (syntax); * syn; ++ syn)
+ {
+ const char *errmsg;
+
+ if (CGEN_SYNTAX_CHAR_P (* syn))
+ continue;
+
+ errmsg = (* cd->insert_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
+ fields, buffer, pc);
+ if (errmsg)
+ return errmsg;
+ }
+
+ 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 (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_INSN_BYTES_PTR buf,
+ int length,
+ int insn_length,
+ CGEN_INSN_INT value)
+{
+ /* For architectures with insns smaller than the base-insn-bitsize,
+ length may be too big. */
+ if (length > insn_length)
+ *buf = value;
+ else
+ {
+ int shift = insn_length - length;
+ /* Written this way to avoid undefined behaviour. */
+ CGEN_INSN_INT mask = (((1L << (length - 1)) - 1) << 1) | 1;
+
+ *buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
+ }
+}
+#endif
+
+/* Operand extraction. */
+
+#if ! CGEN_INT_INSN_P
+
+/* Subroutine of extract_normal.
+ Ensure sufficient bytes are cached in EX_INFO.
+ OFFSET is the offset in bytes from the start of the insn of the value.
+ BYTES is the length of the needed value.
+ Returns 1 for success, 0 for failure. */
+
+static CGEN_INLINE int
+fill_cache (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ CGEN_EXTRACT_INFO *ex_info,
+ int offset,
+ int bytes,
+ bfd_vma pc)
+{
+ /* It's doubtful that the middle part has already been fetched so
+ we don't optimize that case. kiss. */
+ unsigned int mask;
+ disassemble_info *info = (disassemble_info *) ex_info->dis_info;
+
+ /* First do a quick check. */
+ mask = (1 << bytes) - 1;
+ if (((ex_info->valid >> offset) & mask) == mask)
+ return 1;
+
+ /* Search for the first byte we need to read. */
+ for (mask = 1 << offset; bytes > 0; --bytes, ++offset, mask <<= 1)
+ if (! (mask & ex_info->valid))
+ break;
+
+ if (bytes)
+ {
+ int status;
+
+ pc += offset;
+ status = (*info->read_memory_func)
+ (pc, ex_info->insn_bytes + offset, bytes, info);
+
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, pc, info);
+ return 0;
+ }
+
+ ex_info->valid |= ((1 << bytes) - 1) << offset;
+ }
+
+ return 1;
+}
+
+/* Subroutine of extract_normal. */
+
+static CGEN_INLINE long
+extract_1 (CGEN_CPU_DESC cd,
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+ int start,
+ int length,
+ int word_length,
+ unsigned char *bufp,
+ bfd_vma pc ATTRIBUTE_UNUSED)
+{
+ unsigned long x;
+ int shift;
+
+ x = cgen_get_insn_value (cd, bufp, word_length);
+
+ if (CGEN_INSN_LSB0_P)
+ shift = (start + 1) - length;
+ else
+ shift = (word_length - (start + length));
+ return x >> shift;
+}
+
+#endif /* ! CGEN_INT_INSN_P */
+
+/* Default extraction routine.
+
+ INSN_VALUE is the first base_insn_bitsize bits of the insn in host order,
+ or sometimes less for cases like the m32r where the base insn size is 32
+ but some insns are 16 bits.
+ ATTRS is a mask of the boolean attributes. We only need `SIGNED',
+ but for generality we take a bitmask of all of them.
+ WORD_OFFSET is the offset in bits from the start of the insn of the value.
+ WORD_LENGTH is the length of the word in bits in which the value resides.
+ START is the starting bit number in the word, architecture origin.
+ LENGTH is the length of VALUE in bits.
+ TOTAL_LENGTH is the total length of the insn in bits.
+
+ Returns 1 for success, 0 for failure. */
+
+/* ??? The return code isn't properly used. wip. */
+
+/* ??? This doesn't handle bfd_vma's. Create another function when
+ necessary. */
+
+static int
+extract_normal (CGEN_CPU_DESC cd,
+#if ! CGEN_INT_INSN_P
+ CGEN_EXTRACT_INFO *ex_info,
+#else
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED,
+#endif
+ CGEN_INSN_INT insn_value,
+ unsigned int attrs,
+ unsigned int word_offset,
+ unsigned int start,
+ unsigned int length,
+ unsigned int word_length,
+ unsigned int total_length,
+#if ! CGEN_INT_INSN_P
+ bfd_vma pc,
+#else
+ bfd_vma pc ATTRIBUTE_UNUSED,
+#endif
+ long *valuep)
+{
+ long value, mask;
+
+ /* If LENGTH is zero, this operand doesn't contribute to the value
+ so give it a standard value of zero. */
+ if (length == 0)
+ {
+ *valuep = 0;
+ return 1;
+ }
+
+ if (word_length > 32)
+ abort ();
+
+ /* For architectures with insns smaller than the insn-base-bitsize,
+ word_length may be too big. */
+ if (cd->min_insn_bitsize < cd->base_insn_bitsize)
+ {
+ if (word_offset + word_length > total_length)
+ word_length = total_length - word_offset;
+ }
+
+ /* Does the value reside in INSN_VALUE, and at the right alignment? */
+
+ 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);
+ else
+ value = insn_value >> (total_length - ( word_offset + start + length));
+ }
+
+#if ! CGEN_INT_INSN_P
+
+ else
+ {
+ unsigned char *bufp = ex_info->insn_bytes + word_offset / 8;
+
+ if (word_length > 32)
+ abort ();
+
+ if (fill_cache (cd, ex_info, word_offset / 8, word_length / 8, pc) == 0)
+ return 0;
+
+ value = extract_1 (cd, ex_info, start, length, word_length, bufp, pc);
+ }
+
+#endif /* ! CGEN_INT_INSN_P */
+
+ /* Written this way to avoid undefined behaviour. */
+ mask = (((1L << (length - 1)) - 1) << 1) | 1;
+
+ value &= mask;
+ /* sign extend? */
+ if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED)
+ && (value & (1L << (length - 1))))
+ value |= ~mask;
+
+ *valuep = value;
+
+ return 1;
+}
+
+/* Default insn extractor.
+
+ INSN_VALUE is the first base_insn_bitsize bits, translated to host order.
+ The extracted fields are stored in FIELDS.
+ EX_INFO is used to handle reading variable length insns.
+ Return the length of the insn in bits, or 0 if no match,
+ or -1 if an error occurs fetching data (memory_error_func will have
+ been called). */
+
+static int
+extract_insn_normal (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insn,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS *fields,
+ bfd_vma pc)
+{
+ const CGEN_SYNTAX *syntax = CGEN_INSN_SYNTAX (insn);
+ const CGEN_SYNTAX_CHAR_TYPE *syn;
+
+ CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
+
+ CGEN_INIT_EXTRACT (cd);
+
+ for (syn = CGEN_SYNTAX_STRING (syntax); *syn; ++syn)
+ {
+ int length;
+
+ if (CGEN_SYNTAX_CHAR_P (*syn))
+ continue;
+
+ length = (* cd->extract_operand) (cd, CGEN_SYNTAX_FIELD (*syn),
+ ex_info, insn_value, fields, pc);
+ if (length <= 0)
+ return length;
+ }
+
+ /* We recognized and successfully extracted this insn. */
+ return CGEN_INSN_BITSIZE (insn);
+}
+
+/* Machine generated code added here. */
+
+const char * mep_cgen_insert_operand
+ (CGEN_CPU_DESC, int, CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma);
+
+/* Main entry point for operand insertion.
+
+ This function is basically just a big switch statement. Earlier versions
+ used tables to look up the function to use, but
+ - if the table contains both assembler and disassembler functions then
+ the disassembler contains much of the assembler and vice-versa,
+ - there's a lot of inlining possibilities as things grow,
+ - using a switch statement avoids the function call overhead.
+
+ This function could be moved into `parse_insn_normal', but keeping it
+ separate makes clear the interface between `parse_insn_normal' and each of
+ the handlers. It's also needed by GAS to insert operands that couldn't be
+ resolved during parsing. */
+
+const char *
+mep_cgen_insert_operand (CGEN_CPU_DESC cd,
+ int opindex,
+ CGEN_FIELDS * fields,
+ CGEN_INSN_BYTES_PTR buffer,
+ bfd_vma pc ATTRIBUTE_UNUSED)
+{
+ const char * errmsg = NULL;
+ unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
+
+ switch (opindex)
+ {
+ case MEP_OPERAND_ADDR24A4 :
+ {
+{
+ FLD (f_24u8a4n_hi) = ((unsigned int) (FLD (f_24u8a4n)) >> (8));
+ FLD (f_24u8a4n_lo) = ((unsigned int) (((FLD (f_24u8a4n)) & (252))) >> (2));
+}
+ errmsg = insert_normal (cd, fields->f_24u8a4n_hi, 0, 0, 16, 16, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_24u8a4n_lo, 0, 0, 8, 6, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_CALLNUM :
+ {
+{
+ FLD (f_5) = ((((unsigned int) (FLD (f_callnum)) >> (3))) & (1));
+ FLD (f_6) = ((((unsigned int) (FLD (f_callnum)) >> (2))) & (1));
+ FLD (f_7) = ((((unsigned int) (FLD (f_callnum)) >> (1))) & (1));
+ FLD (f_11) = ((FLD (f_callnum)) & (1));
+}
+ errmsg = insert_normal (cd, fields->f_5, 0, 0, 5, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_6, 0, 0, 6, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_7, 0, 0, 7, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_11, 0, 0, 11, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_CCCC :
+ errmsg = insert_normal (cd, fields->f_rm, 0, 0, 8, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_CCRN :
+ {
+{
+ FLD (f_ccrn_hi) = ((((unsigned int) (FLD (f_ccrn)) >> (4))) & (3));
+ FLD (f_ccrn_lo) = ((FLD (f_ccrn)) & (15));
+}
+ errmsg = insert_normal (cd, fields->f_ccrn_hi, 0, 0, 28, 2, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_ccrn_lo, 0, 0, 4, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_CDISP8 :
+ errmsg = insert_normal (cd, fields->f_8s24, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_CDISP8A2 :
+ {
+ long value = fields->f_8s24a2;
+ value = ((int) (value) >> (1));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 7, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_CDISP8A4 :
+ {
+ long value = fields->f_8s24a4;
+ value = ((int) (value) >> (2));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 6, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_CDISP8A8 :
+ {
+ long value = fields->f_8s24a8;
+ value = ((int) (value) >> (3));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 5, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_CIMM4 :
+ errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_CIMM5 :
+ errmsg = insert_normal (cd, fields->f_5u24, 0, 0, 24, 5, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_CODE16 :
+ errmsg = insert_normal (cd, fields->f_16u16, 0, 0, 16, 16, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_CODE24 :
+ {
+{
+ FLD (f_24u4n_hi) = ((unsigned int) (FLD (f_24u4n)) >> (16));
+ FLD (f_24u4n_lo) = ((FLD (f_24u4n)) & (65535));
+}
+ errmsg = insert_normal (cd, fields->f_24u4n_hi, 0, 0, 4, 8, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_24u4n_lo, 0, 0, 16, 16, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_CP_FLAG :
+ break;
+ case MEP_OPERAND_CRN :
+ errmsg = insert_normal (cd, fields->f_crn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_CRN64 :
+ errmsg = insert_normal (cd, fields->f_crn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_CRNX :
+ {
+{
+ FLD (f_crnx_lo) = ((FLD (f_crnx)) & (15));
+ FLD (f_crnx_hi) = ((unsigned int) (FLD (f_crnx)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_crnx_hi, 0, 0, 28, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_crnx_lo, 0, 0, 4, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_CRNX64 :
+ {
+{
+ FLD (f_crnx_lo) = ((FLD (f_crnx)) & (15));
+ FLD (f_crnx_hi) = ((unsigned int) (FLD (f_crnx)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_crnx_hi, 0, 0, 28, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_crnx_lo, 0, 0, 4, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_CSRN :
+ {
+{
+ FLD (f_csrn_lo) = ((FLD (f_csrn)) & (15));
+ FLD (f_csrn_hi) = ((unsigned int) (FLD (f_csrn)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_csrn_hi, 0, 0, 15, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_csrn_lo, 0, 0, 8, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_CSRN_IDX :
+ {
+{
+ FLD (f_csrn_lo) = ((FLD (f_csrn)) & (15));
+ FLD (f_csrn_hi) = ((unsigned int) (FLD (f_csrn)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_csrn_hi, 0, 0, 15, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_csrn_lo, 0, 0, 8, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_DBG :
+ break;
+ case MEP_OPERAND_DEPC :
+ break;
+ case MEP_OPERAND_EPC :
+ break;
+ case MEP_OPERAND_EXC :
+ break;
+ case MEP_OPERAND_FMAX_CCRN :
+ errmsg = insert_normal (cd, fields->f_fmax_4_4, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_FMAX_FRD :
+ {
+{
+ FLD (f_fmax_4_4) = ((FLD (f_fmax_frd)) & (15));
+ FLD (f_fmax_28_1) = ((unsigned int) (FLD (f_fmax_frd)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_fmax_28_1, 0, 0, 28, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_fmax_4_4, 0, 0, 4, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_FMAX_FRD_INT :
+ {
+{
+ FLD (f_fmax_4_4) = ((FLD (f_fmax_frd)) & (15));
+ FLD (f_fmax_28_1) = ((unsigned int) (FLD (f_fmax_frd)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_fmax_28_1, 0, 0, 28, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_fmax_4_4, 0, 0, 4, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_FMAX_FRM :
+ {
+{
+ FLD (f_fmax_24_4) = ((FLD (f_fmax_frm)) & (15));
+ FLD (f_fmax_30_1) = ((unsigned int) (FLD (f_fmax_frm)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_fmax_30_1, 0, 0, 30, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_fmax_24_4, 0, 0, 24, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_FMAX_FRN :
+ {
+{
+ FLD (f_fmax_20_4) = ((FLD (f_fmax_frn)) & (15));
+ FLD (f_fmax_29_1) = ((unsigned int) (FLD (f_fmax_frn)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_fmax_29_1, 0, 0, 29, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_fmax_20_4, 0, 0, 20, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_FMAX_FRN_INT :
+ {
+{
+ FLD (f_fmax_20_4) = ((FLD (f_fmax_frn)) & (15));
+ FLD (f_fmax_29_1) = ((unsigned int) (FLD (f_fmax_frn)) >> (4));
+}
+ errmsg = insert_normal (cd, fields->f_fmax_29_1, 0, 0, 29, 1, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_fmax_20_4, 0, 0, 20, 4, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_FMAX_RM :
+ errmsg = insert_normal (cd, fields->f_fmax_rm, 0, 0, 8, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_HI :
+ break;
+ case MEP_OPERAND_LO :
+ break;
+ case MEP_OPERAND_LP :
+ break;
+ case MEP_OPERAND_MB0 :
+ break;
+ case MEP_OPERAND_MB1 :
+ break;
+ case MEP_OPERAND_ME0 :
+ break;
+ case MEP_OPERAND_ME1 :
+ break;
+ case MEP_OPERAND_NPC :
+ break;
+ case MEP_OPERAND_OPT :
+ break;
+ case MEP_OPERAND_PCABS24A2 :
+ {
+{
+ FLD (f_24u5a2n_lo) = ((unsigned int) (((FLD (f_24u5a2n)) & (255))) >> (1));
+ FLD (f_24u5a2n_hi) = ((unsigned int) (FLD (f_24u5a2n)) >> (8));
+}
+ errmsg = insert_normal (cd, fields->f_24u5a2n_hi, 0, 0, 16, 16, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_24u5a2n_lo, 0, 0, 5, 7, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_PCREL12A2 :
+ {
+ long value = fields->f_12s4a2;
+ value = ((int) (((value) - (pc))) >> (1));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 4, 11, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_PCREL17A2 :
+ {
+ long value = fields->f_17s16a2;
+ value = ((int) (((value) - (pc))) >> (1));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 16, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_PCREL24A2 :
+ {
+{
+ FLD (f_24s5a2n) = ((FLD (f_24s5a2n)) - (pc));
+ FLD (f_24s5a2n_lo) = ((unsigned int) (((FLD (f_24s5a2n)) & (254))) >> (1));
+ FLD (f_24s5a2n_hi) = ((int) (FLD (f_24s5a2n)) >> (8));
+}
+ errmsg = insert_normal (cd, fields->f_24s5a2n_hi, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 16, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_24s5a2n_lo, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 7, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_PCREL8A2 :
+ {
+ long value = fields->f_8s8a2;
+ value = ((int) (((value) - (pc))) >> (1));
+ errmsg = insert_normal (cd, value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 7, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_PSW :
+ break;
+ case MEP_OPERAND_R0 :
+ break;
+ case MEP_OPERAND_R1 :
+ break;
+ case MEP_OPERAND_RL :
+ errmsg = insert_normal (cd, fields->f_rl, 0, 0, 12, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RM :
+ errmsg = insert_normal (cd, fields->f_rm, 0, 0, 8, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RMA :
+ errmsg = insert_normal (cd, fields->f_rm, 0, 0, 8, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RN :
+ errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RN3 :
+ errmsg = insert_normal (cd, fields->f_rn3, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RN3C :
+ errmsg = insert_normal (cd, fields->f_rn3, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RN3L :
+ errmsg = insert_normal (cd, fields->f_rn3, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RN3S :
+ errmsg = insert_normal (cd, fields->f_rn3, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RN3UC :
+ errmsg = insert_normal (cd, fields->f_rn3, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RN3UL :
+ errmsg = insert_normal (cd, fields->f_rn3, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RN3US :
+ errmsg = insert_normal (cd, fields->f_rn3, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RNC :
+ errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RNL :
+ errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RNS :
+ errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RNUC :
+ errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RNUL :
+ errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_RNUS :
+ errmsg = insert_normal (cd, fields->f_rn, 0, 0, 4, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_SAR :
+ break;
+ case MEP_OPERAND_SDISP16 :
+ errmsg = insert_normal (cd, fields->f_16s16, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_SIMM16 :
+ errmsg = insert_normal (cd, fields->f_16s16, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_SIMM6 :
+ errmsg = insert_normal (cd, fields->f_6s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 6, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_SIMM8 :
+ errmsg = insert_normal (cd, fields->f_8s8, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_SP :
+ break;
+ case MEP_OPERAND_SPR :
+ break;
+ case MEP_OPERAND_TP :
+ break;
+ case MEP_OPERAND_TPR :
+ break;
+ case MEP_OPERAND_UDISP2 :
+ errmsg = insert_normal (cd, fields->f_2u6, 0, 0, 6, 2, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_UDISP7 :
+ errmsg = insert_normal (cd, fields->f_7u9, 0, 0, 9, 7, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_UDISP7A2 :
+ {
+ long value = fields->f_7u9a2;
+ value = ((unsigned int) (value) >> (1));
+ errmsg = insert_normal (cd, value, 0, 0, 9, 6, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_UDISP7A4 :
+ {
+ long value = fields->f_7u9a4;
+ value = ((unsigned int) (value) >> (2));
+ errmsg = insert_normal (cd, value, 0, 0, 9, 5, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_UIMM16 :
+ errmsg = insert_normal (cd, fields->f_16u16, 0, 0, 16, 16, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_UIMM2 :
+ errmsg = insert_normal (cd, fields->f_2u10, 0, 0, 10, 2, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_UIMM24 :
+ {
+{
+ FLD (f_24u8n_hi) = ((unsigned int) (FLD (f_24u8n)) >> (8));
+ FLD (f_24u8n_lo) = ((FLD (f_24u8n)) & (255));
+}
+ errmsg = insert_normal (cd, fields->f_24u8n_hi, 0, 0, 16, 16, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ errmsg = insert_normal (cd, fields->f_24u8n_lo, 0, 0, 8, 8, 32, total_length, buffer);
+ if (errmsg)
+ break;
+ }
+ break;
+ case MEP_OPERAND_UIMM3 :
+ errmsg = insert_normal (cd, fields->f_3u5, 0, 0, 5, 3, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_UIMM4 :
+ errmsg = insert_normal (cd, fields->f_4u8, 0, 0, 8, 4, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_UIMM5 :
+ errmsg = insert_normal (cd, fields->f_5u8, 0, 0, 8, 5, 32, total_length, buffer);
+ break;
+ case MEP_OPERAND_UIMM7A4 :
+ {
+ long value = fields->f_7u9a4;
+ value = ((unsigned int) (value) >> (2));
+ errmsg = insert_normal (cd, value, 0, 0, 9, 5, 32, total_length, buffer);
+ }
+ break;
+ case MEP_OPERAND_ZERO :
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while building insn.\n"),
+ opindex);
+ abort ();
+ }
+
+ return errmsg;
+}
+
+int mep_cgen_extract_operand
+ (CGEN_CPU_DESC, int, CGEN_EXTRACT_INFO *, CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma);
+
+/* Main entry point for operand extraction.
+ The result is <= 0 for error, >0 for success.
+ ??? Actual values aren't well defined right now.
+
+ This function is basically just a big switch statement. Earlier versions
+ used tables to look up the function to use, but
+ - if the table contains both assembler and disassembler functions then
+ the disassembler contains much of the assembler and vice-versa,
+ - there's a lot of inlining possibilities as things grow,
+ - using a switch statement avoids the function call overhead.
+
+ This function could be moved into `print_insn_normal', but keeping it
+ separate makes clear the interface between `print_insn_normal' and each of
+ the handlers. */
+
+int
+mep_cgen_extract_operand (CGEN_CPU_DESC cd,
+ int opindex,
+ CGEN_EXTRACT_INFO *ex_info,
+ CGEN_INSN_INT insn_value,
+ CGEN_FIELDS * fields,
+ bfd_vma pc)
+{
+ /* Assume success (for those operands that are nops). */
+ int length = 1;
+ unsigned int total_length = CGEN_FIELDS_BITSIZE (fields);
+
+ switch (opindex)
+ {
+ case MEP_OPERAND_ADDR24A4 :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_24u8a4n_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 6, 32, total_length, pc, & fields->f_24u8a4n_lo);
+ if (length <= 0) break;
+ FLD (f_24u8a4n) = ((((FLD (f_24u8a4n_hi)) << (8))) | (((FLD (f_24u8a4n_lo)) << (2))));
+ }
+ break;
+ case MEP_OPERAND_CALLNUM :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 1, 32, total_length, pc, & fields->f_5);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 6, 1, 32, total_length, pc, & fields->f_6);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 7, 1, 32, total_length, pc, & fields->f_7);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 11, 1, 32, total_length, pc, & fields->f_11);
+ if (length <= 0) break;
+ FLD (f_callnum) = ((((FLD (f_5)) << (3))) | (((((FLD (f_6)) << (2))) | (((((FLD (f_7)) << (1))) | (FLD (f_11)))))));
+ }
+ break;
+ case MEP_OPERAND_CCCC :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_rm);
+ break;
+ case MEP_OPERAND_CCRN :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 28, 2, 32, total_length, pc, & fields->f_ccrn_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_ccrn_lo);
+ if (length <= 0) break;
+ FLD (f_ccrn) = ((((FLD (f_ccrn_hi)) << (4))) | (FLD (f_ccrn_lo)));
+ }
+ break;
+ case MEP_OPERAND_CDISP8 :
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 8, 32, total_length, pc, & fields->f_8s24);
+ break;
+ case MEP_OPERAND_CDISP8A2 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 7, 32, total_length, pc, & value);
+ value = ((value) << (1));
+ fields->f_8s24a2 = value;
+ }
+ break;
+ case MEP_OPERAND_CDISP8A4 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 6, 32, total_length, pc, & value);
+ value = ((value) << (2));
+ fields->f_8s24a4 = value;
+ }
+ break;
+ case MEP_OPERAND_CDISP8A8 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 24, 5, 32, total_length, pc, & value);
+ value = ((value) << (3));
+ fields->f_8s24a8 = value;
+ }
+ break;
+ case MEP_OPERAND_CIMM4 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn);
+ break;
+ case MEP_OPERAND_CIMM5 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 5, 32, total_length, pc, & fields->f_5u24);
+ break;
+ case MEP_OPERAND_CODE16 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_16u16);
+ break;
+ case MEP_OPERAND_CODE24 :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 8, 32, total_length, pc, & fields->f_24u4n_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_24u4n_lo);
+ if (length <= 0) break;
+ FLD (f_24u4n) = ((((FLD (f_24u4n_hi)) << (16))) | (FLD (f_24u4n_lo)));
+ }
+ break;
+ case MEP_OPERAND_CP_FLAG :
+ break;
+ case MEP_OPERAND_CRN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_crn);
+ break;
+ case MEP_OPERAND_CRN64 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_crn);
+ break;
+ case MEP_OPERAND_CRNX :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 28, 1, 32, total_length, pc, & fields->f_crnx_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_crnx_lo);
+ if (length <= 0) break;
+ FLD (f_crnx) = ((((FLD (f_crnx_hi)) << (4))) | (FLD (f_crnx_lo)));
+ }
+ break;
+ case MEP_OPERAND_CRNX64 :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 28, 1, 32, total_length, pc, & fields->f_crnx_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_crnx_lo);
+ if (length <= 0) break;
+ FLD (f_crnx) = ((((FLD (f_crnx_hi)) << (4))) | (FLD (f_crnx_lo)));
+ }
+ break;
+ case MEP_OPERAND_CSRN :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_csrn_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_csrn_lo);
+ if (length <= 0) break;
+ FLD (f_csrn) = ((((FLD (f_csrn_hi)) << (4))) | (FLD (f_csrn_lo)));
+ }
+ break;
+ case MEP_OPERAND_CSRN_IDX :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 15, 1, 32, total_length, pc, & fields->f_csrn_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_csrn_lo);
+ if (length <= 0) break;
+ FLD (f_csrn) = ((((FLD (f_csrn_hi)) << (4))) | (FLD (f_csrn_lo)));
+ }
+ break;
+ case MEP_OPERAND_DBG :
+ break;
+ case MEP_OPERAND_DEPC :
+ break;
+ case MEP_OPERAND_EPC :
+ break;
+ case MEP_OPERAND_EXC :
+ break;
+ case MEP_OPERAND_FMAX_CCRN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_fmax_4_4);
+ break;
+ case MEP_OPERAND_FMAX_FRD :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 28, 1, 32, total_length, pc, & fields->f_fmax_28_1);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_fmax_4_4);
+ if (length <= 0) break;
+ FLD (f_fmax_frd) = ((((FLD (f_fmax_28_1)) << (4))) | (FLD (f_fmax_4_4)));
+ }
+ break;
+ case MEP_OPERAND_FMAX_FRD_INT :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 28, 1, 32, total_length, pc, & fields->f_fmax_28_1);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_fmax_4_4);
+ if (length <= 0) break;
+ FLD (f_fmax_frd) = ((((FLD (f_fmax_28_1)) << (4))) | (FLD (f_fmax_4_4)));
+ }
+ break;
+ case MEP_OPERAND_FMAX_FRM :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 30, 1, 32, total_length, pc, & fields->f_fmax_30_1);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 24, 4, 32, total_length, pc, & fields->f_fmax_24_4);
+ if (length <= 0) break;
+ FLD (f_fmax_frm) = ((((FLD (f_fmax_30_1)) << (4))) | (FLD (f_fmax_24_4)));
+ }
+ break;
+ case MEP_OPERAND_FMAX_FRN :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 29, 1, 32, total_length, pc, & fields->f_fmax_29_1);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 4, 32, total_length, pc, & fields->f_fmax_20_4);
+ if (length <= 0) break;
+ FLD (f_fmax_frn) = ((((FLD (f_fmax_29_1)) << (4))) | (FLD (f_fmax_20_4)));
+ }
+ break;
+ case MEP_OPERAND_FMAX_FRN_INT :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 29, 1, 32, total_length, pc, & fields->f_fmax_29_1);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 20, 4, 32, total_length, pc, & fields->f_fmax_20_4);
+ if (length <= 0) break;
+ FLD (f_fmax_frn) = ((((FLD (f_fmax_29_1)) << (4))) | (FLD (f_fmax_20_4)));
+ }
+ break;
+ case MEP_OPERAND_FMAX_RM :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_fmax_rm);
+ break;
+ case MEP_OPERAND_HI :
+ break;
+ case MEP_OPERAND_LO :
+ break;
+ case MEP_OPERAND_LP :
+ break;
+ case MEP_OPERAND_MB0 :
+ break;
+ case MEP_OPERAND_MB1 :
+ break;
+ case MEP_OPERAND_ME0 :
+ break;
+ case MEP_OPERAND_ME1 :
+ break;
+ case MEP_OPERAND_NPC :
+ break;
+ case MEP_OPERAND_OPT :
+ break;
+ case MEP_OPERAND_PCABS24A2 :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_24u5a2n_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 7, 32, total_length, pc, & fields->f_24u5a2n_lo);
+ if (length <= 0) break;
+ FLD (f_24u5a2n) = ((((FLD (f_24u5a2n_hi)) << (8))) | (((FLD (f_24u5a2n_lo)) << (1))));
+ }
+ break;
+ case MEP_OPERAND_PCREL12A2 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 4, 11, 32, total_length, pc, & value);
+ value = ((((value) << (1))) + (pc));
+ fields->f_12s4a2 = value;
+ }
+ break;
+ case MEP_OPERAND_PCREL17A2 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 16, 32, total_length, pc, & value);
+ value = ((((value) << (1))) + (pc));
+ fields->f_17s16a2 = value;
+ }
+ break;
+ case MEP_OPERAND_PCREL24A2 :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 16, 16, 32, total_length, pc, & fields->f_24s5a2n_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_PCREL_ADDR), 0, 5, 7, 32, total_length, pc, & fields->f_24s5a2n_lo);
+ if (length <= 0) break;
+ FLD (f_24s5a2n) = ((((((FLD (f_24s5a2n_hi)) << (8))) | (((FLD (f_24s5a2n_lo)) << (1))))) + (pc));
+ }
+ break;
+ case MEP_OPERAND_PCREL8A2 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED)|(1<<CGEN_IFLD_PCREL_ADDR), 0, 8, 7, 32, total_length, pc, & value);
+ value = ((((value) << (1))) + (pc));
+ fields->f_8s8a2 = value;
+ }
+ break;
+ case MEP_OPERAND_PSW :
+ break;
+ case MEP_OPERAND_R0 :
+ break;
+ case MEP_OPERAND_R1 :
+ break;
+ case MEP_OPERAND_RL :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 12, 4, 32, total_length, pc, & fields->f_rl);
+ break;
+ case MEP_OPERAND_RM :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_rm);
+ break;
+ case MEP_OPERAND_RMA :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_rm);
+ break;
+ case MEP_OPERAND_RN :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RN3 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3C :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3L :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3S :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3UC :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3UL :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RN3US :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_rn3);
+ break;
+ case MEP_OPERAND_RNC :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNL :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNS :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNUC :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNUL :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn);
+ break;
+ case MEP_OPERAND_RNUS :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 4, 4, 32, total_length, pc, & fields->f_rn);
+ break;
+ case MEP_OPERAND_SAR :
+ break;
+ case MEP_OPERAND_SDISP16 :
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & fields->f_16s16);
+ break;
+ case MEP_OPERAND_SIMM16 :
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 16, 16, 32, total_length, pc, & fields->f_16s16);
+ break;
+ case MEP_OPERAND_SIMM6 :
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 6, 32, total_length, pc, & fields->f_6s8);
+ break;
+ case MEP_OPERAND_SIMM8 :
+ length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 0, 8, 8, 32, total_length, pc, & fields->f_8s8);
+ break;
+ case MEP_OPERAND_SP :
+ break;
+ case MEP_OPERAND_SPR :
+ break;
+ case MEP_OPERAND_TP :
+ break;
+ case MEP_OPERAND_TPR :
+ break;
+ case MEP_OPERAND_UDISP2 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 6, 2, 32, total_length, pc, & fields->f_2u6);
+ break;
+ case MEP_OPERAND_UDISP7 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 7, 32, total_length, pc, & fields->f_7u9);
+ break;
+ case MEP_OPERAND_UDISP7A2 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 6, 32, total_length, pc, & value);
+ value = ((value) << (1));
+ fields->f_7u9a2 = value;
+ }
+ break;
+ case MEP_OPERAND_UDISP7A4 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 5, 32, total_length, pc, & value);
+ value = ((value) << (2));
+ fields->f_7u9a4 = value;
+ }
+ break;
+ case MEP_OPERAND_UIMM16 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_16u16);
+ break;
+ case MEP_OPERAND_UIMM2 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & fields->f_2u10);
+ break;
+ case MEP_OPERAND_UIMM24 :
+ {
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 16, 16, 32, total_length, pc, & fields->f_24u8n_hi);
+ if (length <= 0) break;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 8, 32, total_length, pc, & fields->f_24u8n_lo);
+ if (length <= 0) break;
+ FLD (f_24u8n) = ((((FLD (f_24u8n_hi)) << (8))) | (FLD (f_24u8n_lo)));
+ }
+ break;
+ case MEP_OPERAND_UIMM3 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 5, 3, 32, total_length, pc, & fields->f_3u5);
+ break;
+ case MEP_OPERAND_UIMM4 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 4, 32, total_length, pc, & fields->f_4u8);
+ break;
+ case MEP_OPERAND_UIMM5 :
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 8, 5, 32, total_length, pc, & fields->f_5u8);
+ break;
+ case MEP_OPERAND_UIMM7A4 :
+ {
+ long value;
+ length = extract_normal (cd, ex_info, insn_value, 0, 0, 9, 5, 32, total_length, pc, & value);
+ value = ((value) << (2));
+ fields->f_7u9a4 = value;
+ }
+ break;
+ case MEP_OPERAND_ZERO :
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while decoding insn.\n"),
+ opindex);
+ abort ();
+ }
+
+ return length;
+}
+
+cgen_insert_fn * const mep_cgen_insert_handlers[] =
+{
+ insert_insn_normal,
+};
+
+cgen_extract_fn * const mep_cgen_extract_handlers[] =
+{
+ extract_insn_normal,
+};
+
+int mep_cgen_get_int_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
+bfd_vma mep_cgen_get_vma_operand (CGEN_CPU_DESC, int, const CGEN_FIELDS *);
+
+/* Getting values from cgen_fields is handled by a collection of functions.
+ They are distinguished by the type of the VALUE argument they return.
+ TODO: floating point, inlining support, remove cases where result type
+ not appropriate. */
+
+int
+mep_cgen_get_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ int opindex,
+ const CGEN_FIELDS * fields)
+{
+ int value;
+
+ switch (opindex)
+ {
+ case MEP_OPERAND_ADDR24A4 :
+ value = fields->f_24u8a4n;
+ break;
+ case MEP_OPERAND_CALLNUM :
+ value = fields->f_callnum;
+ break;
+ case MEP_OPERAND_CCCC :
+ value = fields->f_rm;
+ break;
+ case MEP_OPERAND_CCRN :
+ value = fields->f_ccrn;
+ break;
+ case MEP_OPERAND_CDISP8 :
+ value = fields->f_8s24;
+ break;
+ case MEP_OPERAND_CDISP8A2 :
+ value = fields->f_8s24a2;
+ break;
+ case MEP_OPERAND_CDISP8A4 :
+ value = fields->f_8s24a4;
+ break;
+ case MEP_OPERAND_CDISP8A8 :
+ value = fields->f_8s24a8;
+ break;
+ case MEP_OPERAND_CIMM4 :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_CIMM5 :
+ value = fields->f_5u24;
+ break;
+ case MEP_OPERAND_CODE16 :
+ value = fields->f_16u16;
+ break;
+ case MEP_OPERAND_CODE24 :
+ value = fields->f_24u4n;
+ break;
+ case MEP_OPERAND_CP_FLAG :
+ value = 0;
+ break;
+ case MEP_OPERAND_CRN :
+ value = fields->f_crn;
+ break;
+ case MEP_OPERAND_CRN64 :
+ value = fields->f_crn;
+ break;
+ case MEP_OPERAND_CRNX :
+ value = fields->f_crnx;
+ break;
+ case MEP_OPERAND_CRNX64 :
+ value = fields->f_crnx;
+ break;
+ case MEP_OPERAND_CSRN :
+ value = fields->f_csrn;
+ break;
+ case MEP_OPERAND_CSRN_IDX :
+ value = fields->f_csrn;
+ break;
+ case MEP_OPERAND_DBG :
+ value = 0;
+ break;
+ case MEP_OPERAND_DEPC :
+ value = 0;
+ break;
+ case MEP_OPERAND_EPC :
+ value = 0;
+ break;
+ case MEP_OPERAND_EXC :
+ value = 0;
+ break;
+ case MEP_OPERAND_FMAX_CCRN :
+ value = fields->f_fmax_4_4;
+ break;
+ case MEP_OPERAND_FMAX_FRD :
+ value = fields->f_fmax_frd;
+ break;
+ case MEP_OPERAND_FMAX_FRD_INT :
+ value = fields->f_fmax_frd;
+ break;
+ case MEP_OPERAND_FMAX_FRM :
+ value = fields->f_fmax_frm;
+ break;
+ case MEP_OPERAND_FMAX_FRN :
+ value = fields->f_fmax_frn;
+ break;
+ case MEP_OPERAND_FMAX_FRN_INT :
+ value = fields->f_fmax_frn;
+ break;
+ case MEP_OPERAND_FMAX_RM :
+ value = fields->f_fmax_rm;
+ break;
+ case MEP_OPERAND_HI :
+ value = 0;
+ break;
+ case MEP_OPERAND_LO :
+ value = 0;
+ break;
+ case MEP_OPERAND_LP :
+ value = 0;
+ break;
+ case MEP_OPERAND_MB0 :
+ value = 0;
+ break;
+ case MEP_OPERAND_MB1 :
+ value = 0;
+ break;
+ case MEP_OPERAND_ME0 :
+ value = 0;
+ break;
+ case MEP_OPERAND_ME1 :
+ value = 0;
+ break;
+ case MEP_OPERAND_NPC :
+ value = 0;
+ break;
+ case MEP_OPERAND_OPT :
+ value = 0;
+ break;
+ case MEP_OPERAND_PCABS24A2 :
+ value = fields->f_24u5a2n;
+ break;
+ case MEP_OPERAND_PCREL12A2 :
+ value = fields->f_12s4a2;
+ break;
+ case MEP_OPERAND_PCREL17A2 :
+ value = fields->f_17s16a2;
+ break;
+ case MEP_OPERAND_PCREL24A2 :
+ value = fields->f_24s5a2n;
+ break;
+ case MEP_OPERAND_PCREL8A2 :
+ value = fields->f_8s8a2;
+ break;
+ case MEP_OPERAND_PSW :
+ value = 0;
+ break;
+ case MEP_OPERAND_R0 :
+ value = 0;
+ break;
+ case MEP_OPERAND_R1 :
+ value = 0;
+ break;
+ case MEP_OPERAND_RL :
+ value = fields->f_rl;
+ break;
+ case MEP_OPERAND_RM :
+ value = fields->f_rm;
+ break;
+ case MEP_OPERAND_RMA :
+ value = fields->f_rm;
+ break;
+ case MEP_OPERAND_RN :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RN3 :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3C :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3L :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3S :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3UC :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3UL :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3US :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RNC :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNL :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNS :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNUC :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNUL :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNUS :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_SAR :
+ value = 0;
+ break;
+ case MEP_OPERAND_SDISP16 :
+ value = fields->f_16s16;
+ break;
+ case MEP_OPERAND_SIMM16 :
+ value = fields->f_16s16;
+ break;
+ case MEP_OPERAND_SIMM6 :
+ value = fields->f_6s8;
+ break;
+ case MEP_OPERAND_SIMM8 :
+ value = fields->f_8s8;
+ break;
+ case MEP_OPERAND_SP :
+ value = 0;
+ break;
+ case MEP_OPERAND_SPR :
+ value = 0;
+ break;
+ case MEP_OPERAND_TP :
+ value = 0;
+ break;
+ case MEP_OPERAND_TPR :
+ value = 0;
+ break;
+ case MEP_OPERAND_UDISP2 :
+ value = fields->f_2u6;
+ break;
+ case MEP_OPERAND_UDISP7 :
+ value = fields->f_7u9;
+ break;
+ case MEP_OPERAND_UDISP7A2 :
+ value = fields->f_7u9a2;
+ break;
+ case MEP_OPERAND_UDISP7A4 :
+ value = fields->f_7u9a4;
+ break;
+ case MEP_OPERAND_UIMM16 :
+ value = fields->f_16u16;
+ break;
+ case MEP_OPERAND_UIMM2 :
+ value = fields->f_2u10;
+ break;
+ case MEP_OPERAND_UIMM24 :
+ value = fields->f_24u8n;
+ break;
+ case MEP_OPERAND_UIMM3 :
+ value = fields->f_3u5;
+ break;
+ case MEP_OPERAND_UIMM4 :
+ value = fields->f_4u8;
+ break;
+ case MEP_OPERAND_UIMM5 :
+ value = fields->f_5u8;
+ break;
+ case MEP_OPERAND_UIMM7A4 :
+ value = fields->f_7u9a4;
+ break;
+ case MEP_OPERAND_ZERO :
+ value = 0;
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while getting int operand.\n"),
+ opindex);
+ abort ();
+ }
+
+ return value;
+}
+
+bfd_vma
+mep_cgen_get_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ int opindex,
+ const CGEN_FIELDS * fields)
+{
+ bfd_vma value;
+
+ switch (opindex)
+ {
+ case MEP_OPERAND_ADDR24A4 :
+ value = fields->f_24u8a4n;
+ break;
+ case MEP_OPERAND_CALLNUM :
+ value = fields->f_callnum;
+ break;
+ case MEP_OPERAND_CCCC :
+ value = fields->f_rm;
+ break;
+ case MEP_OPERAND_CCRN :
+ value = fields->f_ccrn;
+ break;
+ case MEP_OPERAND_CDISP8 :
+ value = fields->f_8s24;
+ break;
+ case MEP_OPERAND_CDISP8A2 :
+ value = fields->f_8s24a2;
+ break;
+ case MEP_OPERAND_CDISP8A4 :
+ value = fields->f_8s24a4;
+ break;
+ case MEP_OPERAND_CDISP8A8 :
+ value = fields->f_8s24a8;
+ break;
+ case MEP_OPERAND_CIMM4 :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_CIMM5 :
+ value = fields->f_5u24;
+ break;
+ case MEP_OPERAND_CODE16 :
+ value = fields->f_16u16;
+ break;
+ case MEP_OPERAND_CODE24 :
+ value = fields->f_24u4n;
+ break;
+ case MEP_OPERAND_CP_FLAG :
+ value = 0;
+ break;
+ case MEP_OPERAND_CRN :
+ value = fields->f_crn;
+ break;
+ case MEP_OPERAND_CRN64 :
+ value = fields->f_crn;
+ break;
+ case MEP_OPERAND_CRNX :
+ value = fields->f_crnx;
+ break;
+ case MEP_OPERAND_CRNX64 :
+ value = fields->f_crnx;
+ break;
+ case MEP_OPERAND_CSRN :
+ value = fields->f_csrn;
+ break;
+ case MEP_OPERAND_CSRN_IDX :
+ value = fields->f_csrn;
+ break;
+ case MEP_OPERAND_DBG :
+ value = 0;
+ break;
+ case MEP_OPERAND_DEPC :
+ value = 0;
+ break;
+ case MEP_OPERAND_EPC :
+ value = 0;
+ break;
+ case MEP_OPERAND_EXC :
+ value = 0;
+ break;
+ case MEP_OPERAND_FMAX_CCRN :
+ value = fields->f_fmax_4_4;
+ break;
+ case MEP_OPERAND_FMAX_FRD :
+ value = fields->f_fmax_frd;
+ break;
+ case MEP_OPERAND_FMAX_FRD_INT :
+ value = fields->f_fmax_frd;
+ break;
+ case MEP_OPERAND_FMAX_FRM :
+ value = fields->f_fmax_frm;
+ break;
+ case MEP_OPERAND_FMAX_FRN :
+ value = fields->f_fmax_frn;
+ break;
+ case MEP_OPERAND_FMAX_FRN_INT :
+ value = fields->f_fmax_frn;
+ break;
+ case MEP_OPERAND_FMAX_RM :
+ value = fields->f_fmax_rm;
+ break;
+ case MEP_OPERAND_HI :
+ value = 0;
+ break;
+ case MEP_OPERAND_LO :
+ value = 0;
+ break;
+ case MEP_OPERAND_LP :
+ value = 0;
+ break;
+ case MEP_OPERAND_MB0 :
+ value = 0;
+ break;
+ case MEP_OPERAND_MB1 :
+ value = 0;
+ break;
+ case MEP_OPERAND_ME0 :
+ value = 0;
+ break;
+ case MEP_OPERAND_ME1 :
+ value = 0;
+ break;
+ case MEP_OPERAND_NPC :
+ value = 0;
+ break;
+ case MEP_OPERAND_OPT :
+ value = 0;
+ break;
+ case MEP_OPERAND_PCABS24A2 :
+ value = fields->f_24u5a2n;
+ break;
+ case MEP_OPERAND_PCREL12A2 :
+ value = fields->f_12s4a2;
+ break;
+ case MEP_OPERAND_PCREL17A2 :
+ value = fields->f_17s16a2;
+ break;
+ case MEP_OPERAND_PCREL24A2 :
+ value = fields->f_24s5a2n;
+ break;
+ case MEP_OPERAND_PCREL8A2 :
+ value = fields->f_8s8a2;
+ break;
+ case MEP_OPERAND_PSW :
+ value = 0;
+ break;
+ case MEP_OPERAND_R0 :
+ value = 0;
+ break;
+ case MEP_OPERAND_R1 :
+ value = 0;
+ break;
+ case MEP_OPERAND_RL :
+ value = fields->f_rl;
+ break;
+ case MEP_OPERAND_RM :
+ value = fields->f_rm;
+ break;
+ case MEP_OPERAND_RMA :
+ value = fields->f_rm;
+ break;
+ case MEP_OPERAND_RN :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RN3 :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3C :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3L :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3S :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3UC :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3UL :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RN3US :
+ value = fields->f_rn3;
+ break;
+ case MEP_OPERAND_RNC :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNL :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNS :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNUC :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNUL :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_RNUS :
+ value = fields->f_rn;
+ break;
+ case MEP_OPERAND_SAR :
+ value = 0;
+ break;
+ case MEP_OPERAND_SDISP16 :
+ value = fields->f_16s16;
+ break;
+ case MEP_OPERAND_SIMM16 :
+ value = fields->f_16s16;
+ break;
+ case MEP_OPERAND_SIMM6 :
+ value = fields->f_6s8;
+ break;
+ case MEP_OPERAND_SIMM8 :
+ value = fields->f_8s8;
+ break;
+ case MEP_OPERAND_SP :
+ value = 0;
+ break;
+ case MEP_OPERAND_SPR :
+ value = 0;
+ break;
+ case MEP_OPERAND_TP :
+ value = 0;
+ break;
+ case MEP_OPERAND_TPR :
+ value = 0;
+ break;
+ case MEP_OPERAND_UDISP2 :
+ value = fields->f_2u6;
+ break;
+ case MEP_OPERAND_UDISP7 :
+ value = fields->f_7u9;
+ break;
+ case MEP_OPERAND_UDISP7A2 :
+ value = fields->f_7u9a2;
+ break;
+ case MEP_OPERAND_UDISP7A4 :
+ value = fields->f_7u9a4;
+ break;
+ case MEP_OPERAND_UIMM16 :
+ value = fields->f_16u16;
+ break;
+ case MEP_OPERAND_UIMM2 :
+ value = fields->f_2u10;
+ break;
+ case MEP_OPERAND_UIMM24 :
+ value = fields->f_24u8n;
+ break;
+ case MEP_OPERAND_UIMM3 :
+ value = fields->f_3u5;
+ break;
+ case MEP_OPERAND_UIMM4 :
+ value = fields->f_4u8;
+ break;
+ case MEP_OPERAND_UIMM5 :
+ value = fields->f_5u8;
+ break;
+ case MEP_OPERAND_UIMM7A4 :
+ value = fields->f_7u9a4;
+ break;
+ case MEP_OPERAND_ZERO :
+ value = 0;
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while getting vma operand.\n"),
+ opindex);
+ abort ();
+ }
+
+ return value;
+}
+
+void mep_cgen_set_int_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, int);
+void mep_cgen_set_vma_operand (CGEN_CPU_DESC, int, CGEN_FIELDS *, bfd_vma);
+
+/* Stuffing values in cgen_fields is handled by a collection of functions.
+ They are distinguished by the type of the VALUE argument they accept.
+ TODO: floating point, inlining support, remove cases where argument type
+ not appropriate. */
+
+void
+mep_cgen_set_int_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ int opindex,
+ CGEN_FIELDS * fields,
+ int value)
+{
+ switch (opindex)
+ {
+ case MEP_OPERAND_ADDR24A4 :
+ fields->f_24u8a4n = value;
+ break;
+ case MEP_OPERAND_CALLNUM :
+ fields->f_callnum = value;
+ break;
+ case MEP_OPERAND_CCCC :
+ fields->f_rm = value;
+ break;
+ case MEP_OPERAND_CCRN :
+ fields->f_ccrn = value;
+ break;
+ case MEP_OPERAND_CDISP8 :
+ fields->f_8s24 = value;
+ break;
+ case MEP_OPERAND_CDISP8A2 :
+ fields->f_8s24a2 = value;
+ break;
+ case MEP_OPERAND_CDISP8A4 :
+ fields->f_8s24a4 = value;
+ break;
+ case MEP_OPERAND_CDISP8A8 :
+ fields->f_8s24a8 = value;
+ break;
+ case MEP_OPERAND_CIMM4 :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_CIMM5 :
+ fields->f_5u24 = value;
+ break;
+ case MEP_OPERAND_CODE16 :
+ fields->f_16u16 = value;
+ break;
+ case MEP_OPERAND_CODE24 :
+ fields->f_24u4n = value;
+ break;
+ case MEP_OPERAND_CP_FLAG :
+ break;
+ case MEP_OPERAND_CRN :
+ fields->f_crn = value;
+ break;
+ case MEP_OPERAND_CRN64 :
+ fields->f_crn = value;
+ break;
+ case MEP_OPERAND_CRNX :
+ fields->f_crnx = value;
+ break;
+ case MEP_OPERAND_CRNX64 :
+ fields->f_crnx = value;
+ break;
+ case MEP_OPERAND_CSRN :
+ fields->f_csrn = value;
+ break;
+ case MEP_OPERAND_CSRN_IDX :
+ fields->f_csrn = value;
+ break;
+ case MEP_OPERAND_DBG :
+ break;
+ case MEP_OPERAND_DEPC :
+ break;
+ case MEP_OPERAND_EPC :
+ break;
+ case MEP_OPERAND_EXC :
+ break;
+ case MEP_OPERAND_FMAX_CCRN :
+ fields->f_fmax_4_4 = value;
+ break;
+ case MEP_OPERAND_FMAX_FRD :
+ fields->f_fmax_frd = value;
+ break;
+ case MEP_OPERAND_FMAX_FRD_INT :
+ fields->f_fmax_frd = value;
+ break;
+ case MEP_OPERAND_FMAX_FRM :
+ fields->f_fmax_frm = value;
+ break;
+ case MEP_OPERAND_FMAX_FRN :
+ fields->f_fmax_frn = value;
+ break;
+ case MEP_OPERAND_FMAX_FRN_INT :
+ fields->f_fmax_frn = value;
+ break;
+ case MEP_OPERAND_FMAX_RM :
+ fields->f_fmax_rm = value;
+ break;
+ case MEP_OPERAND_HI :
+ break;
+ case MEP_OPERAND_LO :
+ break;
+ case MEP_OPERAND_LP :
+ break;
+ case MEP_OPERAND_MB0 :
+ break;
+ case MEP_OPERAND_MB1 :
+ break;
+ case MEP_OPERAND_ME0 :
+ break;
+ case MEP_OPERAND_ME1 :
+ break;
+ case MEP_OPERAND_NPC :
+ break;
+ case MEP_OPERAND_OPT :
+ break;
+ case MEP_OPERAND_PCABS24A2 :
+ fields->f_24u5a2n = value;
+ break;
+ case MEP_OPERAND_PCREL12A2 :
+ fields->f_12s4a2 = value;
+ break;
+ case MEP_OPERAND_PCREL17A2 :
+ fields->f_17s16a2 = value;
+ break;
+ case MEP_OPERAND_PCREL24A2 :
+ fields->f_24s5a2n = value;
+ break;
+ case MEP_OPERAND_PCREL8A2 :
+ fields->f_8s8a2 = value;
+ break;
+ case MEP_OPERAND_PSW :
+ break;
+ case MEP_OPERAND_R0 :
+ break;
+ case MEP_OPERAND_R1 :
+ break;
+ case MEP_OPERAND_RL :
+ fields->f_rl = value;
+ break;
+ case MEP_OPERAND_RM :
+ fields->f_rm = value;
+ break;
+ case MEP_OPERAND_RMA :
+ fields->f_rm = value;
+ break;
+ case MEP_OPERAND_RN :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RN3 :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3C :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3L :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3S :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3UC :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3UL :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3US :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RNC :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNL :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNS :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNUC :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNUL :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNUS :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_SAR :
+ break;
+ case MEP_OPERAND_SDISP16 :
+ fields->f_16s16 = value;
+ break;
+ case MEP_OPERAND_SIMM16 :
+ fields->f_16s16 = value;
+ break;
+ case MEP_OPERAND_SIMM6 :
+ fields->f_6s8 = value;
+ break;
+ case MEP_OPERAND_SIMM8 :
+ fields->f_8s8 = value;
+ break;
+ case MEP_OPERAND_SP :
+ break;
+ case MEP_OPERAND_SPR :
+ break;
+ case MEP_OPERAND_TP :
+ break;
+ case MEP_OPERAND_TPR :
+ break;
+ case MEP_OPERAND_UDISP2 :
+ fields->f_2u6 = value;
+ break;
+ case MEP_OPERAND_UDISP7 :
+ fields->f_7u9 = value;
+ break;
+ case MEP_OPERAND_UDISP7A2 :
+ fields->f_7u9a2 = value;
+ break;
+ case MEP_OPERAND_UDISP7A4 :
+ fields->f_7u9a4 = value;
+ break;
+ case MEP_OPERAND_UIMM16 :
+ fields->f_16u16 = value;
+ break;
+ case MEP_OPERAND_UIMM2 :
+ fields->f_2u10 = value;
+ break;
+ case MEP_OPERAND_UIMM24 :
+ fields->f_24u8n = value;
+ break;
+ case MEP_OPERAND_UIMM3 :
+ fields->f_3u5 = value;
+ break;
+ case MEP_OPERAND_UIMM4 :
+ fields->f_4u8 = value;
+ break;
+ case MEP_OPERAND_UIMM5 :
+ fields->f_5u8 = value;
+ break;
+ case MEP_OPERAND_UIMM7A4 :
+ fields->f_7u9a4 = value;
+ break;
+ case MEP_OPERAND_ZERO :
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while setting int operand.\n"),
+ opindex);
+ abort ();
+ }
+}
+
+void
+mep_cgen_set_vma_operand (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ int opindex,
+ CGEN_FIELDS * fields,
+ bfd_vma value)
+{
+ switch (opindex)
+ {
+ case MEP_OPERAND_ADDR24A4 :
+ fields->f_24u8a4n = value;
+ break;
+ case MEP_OPERAND_CALLNUM :
+ fields->f_callnum = value;
+ break;
+ case MEP_OPERAND_CCCC :
+ fields->f_rm = value;
+ break;
+ case MEP_OPERAND_CCRN :
+ fields->f_ccrn = value;
+ break;
+ case MEP_OPERAND_CDISP8 :
+ fields->f_8s24 = value;
+ break;
+ case MEP_OPERAND_CDISP8A2 :
+ fields->f_8s24a2 = value;
+ break;
+ case MEP_OPERAND_CDISP8A4 :
+ fields->f_8s24a4 = value;
+ break;
+ case MEP_OPERAND_CDISP8A8 :
+ fields->f_8s24a8 = value;
+ break;
+ case MEP_OPERAND_CIMM4 :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_CIMM5 :
+ fields->f_5u24 = value;
+ break;
+ case MEP_OPERAND_CODE16 :
+ fields->f_16u16 = value;
+ break;
+ case MEP_OPERAND_CODE24 :
+ fields->f_24u4n = value;
+ break;
+ case MEP_OPERAND_CP_FLAG :
+ break;
+ case MEP_OPERAND_CRN :
+ fields->f_crn = value;
+ break;
+ case MEP_OPERAND_CRN64 :
+ fields->f_crn = value;
+ break;
+ case MEP_OPERAND_CRNX :
+ fields->f_crnx = value;
+ break;
+ case MEP_OPERAND_CRNX64 :
+ fields->f_crnx = value;
+ break;
+ case MEP_OPERAND_CSRN :
+ fields->f_csrn = value;
+ break;
+ case MEP_OPERAND_CSRN_IDX :
+ fields->f_csrn = value;
+ break;
+ case MEP_OPERAND_DBG :
+ break;
+ case MEP_OPERAND_DEPC :
+ break;
+ case MEP_OPERAND_EPC :
+ break;
+ case MEP_OPERAND_EXC :
+ break;
+ case MEP_OPERAND_FMAX_CCRN :
+ fields->f_fmax_4_4 = value;
+ break;
+ case MEP_OPERAND_FMAX_FRD :
+ fields->f_fmax_frd = value;
+ break;
+ case MEP_OPERAND_FMAX_FRD_INT :
+ fields->f_fmax_frd = value;
+ break;
+ case MEP_OPERAND_FMAX_FRM :
+ fields->f_fmax_frm = value;
+ break;
+ case MEP_OPERAND_FMAX_FRN :
+ fields->f_fmax_frn = value;
+ break;
+ case MEP_OPERAND_FMAX_FRN_INT :
+ fields->f_fmax_frn = value;
+ break;
+ case MEP_OPERAND_FMAX_RM :
+ fields->f_fmax_rm = value;
+ break;
+ case MEP_OPERAND_HI :
+ break;
+ case MEP_OPERAND_LO :
+ break;
+ case MEP_OPERAND_LP :
+ break;
+ case MEP_OPERAND_MB0 :
+ break;
+ case MEP_OPERAND_MB1 :
+ break;
+ case MEP_OPERAND_ME0 :
+ break;
+ case MEP_OPERAND_ME1 :
+ break;
+ case MEP_OPERAND_NPC :
+ break;
+ case MEP_OPERAND_OPT :
+ break;
+ case MEP_OPERAND_PCABS24A2 :
+ fields->f_24u5a2n = value;
+ break;
+ case MEP_OPERAND_PCREL12A2 :
+ fields->f_12s4a2 = value;
+ break;
+ case MEP_OPERAND_PCREL17A2 :
+ fields->f_17s16a2 = value;
+ break;
+ case MEP_OPERAND_PCREL24A2 :
+ fields->f_24s5a2n = value;
+ break;
+ case MEP_OPERAND_PCREL8A2 :
+ fields->f_8s8a2 = value;
+ break;
+ case MEP_OPERAND_PSW :
+ break;
+ case MEP_OPERAND_R0 :
+ break;
+ case MEP_OPERAND_R1 :
+ break;
+ case MEP_OPERAND_RL :
+ fields->f_rl = value;
+ break;
+ case MEP_OPERAND_RM :
+ fields->f_rm = value;
+ break;
+ case MEP_OPERAND_RMA :
+ fields->f_rm = value;
+ break;
+ case MEP_OPERAND_RN :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RN3 :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3C :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3L :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3S :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3UC :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3UL :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RN3US :
+ fields->f_rn3 = value;
+ break;
+ case MEP_OPERAND_RNC :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNL :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNS :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNUC :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNUL :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_RNUS :
+ fields->f_rn = value;
+ break;
+ case MEP_OPERAND_SAR :
+ break;
+ case MEP_OPERAND_SDISP16 :
+ fields->f_16s16 = value;
+ break;
+ case MEP_OPERAND_SIMM16 :
+ fields->f_16s16 = value;
+ break;
+ case MEP_OPERAND_SIMM6 :
+ fields->f_6s8 = value;
+ break;
+ case MEP_OPERAND_SIMM8 :
+ fields->f_8s8 = value;
+ break;
+ case MEP_OPERAND_SP :
+ break;
+ case MEP_OPERAND_SPR :
+ break;
+ case MEP_OPERAND_TP :
+ break;
+ case MEP_OPERAND_TPR :
+ break;
+ case MEP_OPERAND_UDISP2 :
+ fields->f_2u6 = value;
+ break;
+ case MEP_OPERAND_UDISP7 :
+ fields->f_7u9 = value;
+ break;
+ case MEP_OPERAND_UDISP7A2 :
+ fields->f_7u9a2 = value;
+ break;
+ case MEP_OPERAND_UDISP7A4 :
+ fields->f_7u9a4 = value;
+ break;
+ case MEP_OPERAND_UIMM16 :
+ fields->f_16u16 = value;
+ break;
+ case MEP_OPERAND_UIMM2 :
+ fields->f_2u10 = value;
+ break;
+ case MEP_OPERAND_UIMM24 :
+ fields->f_24u8n = value;
+ break;
+ case MEP_OPERAND_UIMM3 :
+ fields->f_3u5 = value;
+ break;
+ case MEP_OPERAND_UIMM4 :
+ fields->f_4u8 = value;
+ break;
+ case MEP_OPERAND_UIMM5 :
+ fields->f_5u8 = value;
+ break;
+ case MEP_OPERAND_UIMM7A4 :
+ fields->f_7u9a4 = value;
+ break;
+ case MEP_OPERAND_ZERO :
+ break;
+
+ default :
+ /* xgettext:c-format */
+ fprintf (stderr, _("Unrecognized field %d while setting vma operand.\n"),
+ opindex);
+ abort ();
+ }
+}
+
+/* Function to call before using the instruction builder tables. */
+
+void
+mep_cgen_init_ibld_table (CGEN_CPU_DESC cd)
+{
+ cd->insert_handlers = & mep_cgen_insert_handlers[0];
+ cd->extract_handlers = & mep_cgen_extract_handlers[0];
+
+ cd->insert_operand = mep_cgen_insert_operand;
+ cd->extract_operand = mep_cgen_extract_operand;
+
+ cd->get_int_operand = mep_cgen_get_int_operand;
+ cd->set_int_operand = mep_cgen_set_int_operand;
+ cd->get_vma_operand = mep_cgen_get_vma_operand;
+ cd->set_vma_operand = mep_cgen_set_vma_operand;
+}
diff --git a/contrib/binutils/opcodes/mep-opc.c b/contrib/binutils/opcodes/mep-opc.c
new file mode 100644
index 0000000..ab5cf4a
--- /dev/null
+++ b/contrib/binutils/opcodes/mep-opc.c
@@ -0,0 +1,2274 @@
+/* Instruction opcode table for mep.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996-2005 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+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.,
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#include "sysdep.h"
+#include "ansidecl.h"
+#include "bfd.h"
+#include "symcat.h"
+#include "mep-desc.h"
+#include "mep-opc.h"
+#include "libiberty.h"
+
+/* -- opc.c */
+#include "elf/mep.h"
+
+/* A mask for all ISAs executed by the core. */
+CGEN_ATTR_VALUE_BITSET_TYPE mep_all_core_isas_mask = {0, 0};
+
+void
+init_mep_all_core_isas_mask (void)
+{
+ if (mep_all_core_isas_mask.length != 0)
+ return;
+ cgen_bitset_init (& mep_all_core_isas_mask, ISA_MAX);
+ cgen_bitset_set (& mep_all_core_isas_mask, ISA_MEP);
+ /* begin-all-core-isas */
+ cgen_bitset_add (& mep_all_core_isas_mask, ISA_EXT_CORE1);
+ cgen_bitset_add (& mep_all_core_isas_mask, ISA_EXT_CORE2);
+ /* end-all-core-isas */
+}
+
+CGEN_ATTR_VALUE_BITSET_TYPE mep_all_cop_isas_mask = {0, 0};
+
+void
+init_mep_all_cop_isas_mask (void)
+{
+ if (mep_all_cop_isas_mask.length != 0)
+ return;
+ cgen_bitset_init (& mep_all_cop_isas_mask, ISA_MAX);
+ /* begin-all-cop-isas */
+ cgen_bitset_add (& mep_all_cop_isas_mask, ISA_EXT_COP2_16);
+ cgen_bitset_add (& mep_all_cop_isas_mask, ISA_EXT_COP2_32);
+ cgen_bitset_add (& mep_all_cop_isas_mask, ISA_EXT_COP2_48);
+ cgen_bitset_add (& mep_all_cop_isas_mask, ISA_EXT_COP2_64);
+ /* end-all-cop-isas */
+}
+
+int
+mep_insn_supported_by_isa (const CGEN_INSN *insn, CGEN_ATTR_VALUE_BITSET_TYPE *isa_mask)
+{
+ CGEN_BITSET insn_isas = CGEN_INSN_BITSET_ATTR_VALUE (insn, CGEN_INSN_ISA);
+ return cgen_bitset_intersect_p (& insn_isas, isa_mask);
+}
+
+#define OPTION_MASK \
+ ( (1 << CGEN_INSN_OPTIONAL_BIT_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_MUL_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_DIV_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_DEBUG_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_LDZ_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_ABS_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_AVE_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_MINMAX_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_CLIP_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_SAT_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_UCI_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_DSP_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_CP_INSN) \
+ | (1 << CGEN_INSN_OPTIONAL_CP64_INSN) )
+
+
+mep_config_map_struct mep_config_map[] =
+{
+ /* config-map-start */
+ /* Default entry: mep core only, all options enabled. */
+ { "", 0, EF_MEP_CPU_C2, 1, 0, {1,"\x0"}, {1,"\x0"}, {1,"\x0"}, {1,"\x0"}, {1,"\x0"}, {1,"\x80"}, OPTION_MASK },
+ { "simple", CONFIG_SIMPLE, EF_MEP_CPU_C2, 1, 0, { 1, "\x0" }, { 1, "\x0" }, { 1, "\x0" }, { 1, "\x0" }, { 1, "\x0" }, { 1, "\xc0" },
+ 0 },
+ { "fmax", CONFIG_FMAX, EF_MEP_CPU_C2, 1, 0, { 1, "\x10" }, { 1, "\x8" }, { 1, "\x4" }, { 1, "\x2" }, { 1, "\x1e" }, { 1, "\xa0" },
+ 0
+ | (1 << CGEN_INSN_OPTIONAL_CP_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_MUL_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_DIV_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_BIT_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_LDZ_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_ABS_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_AVE_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_MINMAX_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_CLIP_INSN)
+ | (1 << CGEN_INSN_OPTIONAL_SAT_INSN) },
+ /* config-map-end */
+ { 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, 0 }
+};
+
+int mep_config_index = 0;
+
+static int
+check_configured_mach (int machs)
+{
+ /* All base insns are supported. */
+ int mach = 1 << MACH_BASE;
+ switch (MEP_CPU)
+ {
+ case EF_MEP_CPU_C2:
+ case EF_MEP_CPU_C3:
+ mach |= (1 << MACH_MEP);
+ break;
+ case EF_MEP_CPU_H1:
+ mach |= (1 << MACH_H1);
+ break;
+ default:
+ break;
+ }
+ return machs & mach;
+}
+
+int
+mep_cgen_insn_supported (CGEN_CPU_DESC cd, const CGEN_INSN *insn)
+{
+ int iconfig = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_CONFIG);
+ int machs = CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_MACH);
+ CGEN_BITSET isas = CGEN_INSN_BITSET_ATTR_VALUE (insn, CGEN_INSN_ISA);
+ int ok1;
+ int ok2;
+ int ok3;
+
+ /* If the insn has an option bit set that we don't want,
+ reject it. */
+ if (CGEN_INSN_ATTRS (insn)->bool & OPTION_MASK & ~MEP_OMASK)
+ return 0;
+
+ /* If attributes are absent, assume no restriction. */
+ if (machs == 0)
+ machs = ~0;
+
+ ok1 = ((machs & cd->machs) && cgen_bitset_intersect_p (& isas, cd->isas));
+ /* If the insn is config-specific, make sure it matches. */
+ ok2 = (iconfig == 0 || iconfig == MEP_CONFIG);
+ /* Make sure the insn is supported by the configured mach */
+ ok3 = check_configured_mach (machs);
+
+ return (ok1 && ok2 && ok3);
+}
+/* The hash functions are recorded here to help keep assembler code out of
+ the disassembler and vice versa. */
+
+static int asm_hash_insn_p (const CGEN_INSN *);
+static unsigned int asm_hash_insn (const char *);
+static int dis_hash_insn_p (const CGEN_INSN *);
+static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT);
+
+/* Instruction formats. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define F(f) & mep_cgen_ifld_table[MEP_##f]
+#else
+#define F(f) & mep_cgen_ifld_table[MEP_/**/f]
+#endif
+static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED = {
+ 0, 0, 0x0, { { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sb ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sh ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sw ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lbu ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lhu ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sw_sp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf083, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_8) }, { F (F_7U9A4) }, { F (F_SUB2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sb_tp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf880, { { F (F_MAJOR) }, { F (F_4) }, { F (F_RN3) }, { F (F_8) }, { F (F_7U9) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sh_tp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf881, { { F (F_MAJOR) }, { F (F_4) }, { F (F_RN3) }, { F (F_8) }, { F (F_7U9A2) }, { F (F_15) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sw_tp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf883, { { F (F_MAJOR) }, { F (F_4) }, { F (F_RN3) }, { F (F_8) }, { F (F_7U9A4) }, { F (F_SUB2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lbu_tp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf880, { { F (F_MAJOR) }, { F (F_4) }, { F (F_RN3) }, { F (F_8) }, { F (F_7U9) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lhu_tp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf881, { { F (F_MAJOR) }, { F (F_4) }, { F (F_RN3) }, { F (F_8) }, { F (F_7U9A2) }, { F (F_15) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sb16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sh16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sw16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lbu16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lhu16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sw24 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0030000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_24U8A4N) }, { F (F_SUB2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_extb ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf0ff, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_ssarb ATTRIBUTE_UNUSED = {
+ 16, 16, 0xfc0f, { { F (F_MAJOR) }, { F (F_4) }, { F (F_5) }, { F (F_2U6) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_mov ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_movi8 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_8S8) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_movi16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0ff0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_movu24 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf8000000, { { F (F_MAJOR) }, { F (F_4) }, { F (F_RN3) }, { F (F_24U8N) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_movu16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0ff0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16U16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_add3 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_RL) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_add ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf003, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_6S8) }, { F (F_SUB2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_add3i ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf083, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_8) }, { F (F_7U9A4) }, { F (F_SUB2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_slt3i ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf007, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_5U8) }, { F (F_SUB3) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_add3x ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sltu3x ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16U16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_bra ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf001, { { F (F_MAJOR) }, { F (F_12S4A2) }, { F (F_15) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_beqz ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf001, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_8S8A2) }, { F (F_15) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_beqi ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_4U8) }, { F (F_SUB4) }, { F (F_17S16A2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_beq ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_17S16A2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_bsr24 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf80f0000, { { F (F_MAJOR) }, { F (F_4) }, { F (F_24S5A2N) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_jmp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xff0f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_jmp24 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf80f0000, { { F (F_MAJOR) }, { F (F_4) }, { F (F_24U5A2N) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_ret ATTRIBUTE_UNUSED = {
+ 16, 16, 0xffff, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_repeat ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0ff0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_17S16A2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_erepeat ATTRIBUTE_UNUSED = {
+ 32, 32, 0xffff0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_17S16A2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_stc_lp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf0ff, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_CSRN_LO) }, { F (F_12) }, { F (F_13) }, { F (F_14) }, { F (F_CSRN_HI) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_stc ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00e, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_CSRN) }, { F (F_12) }, { F (F_13) }, { F (F_14) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_swi ATTRIBUTE_UNUSED = {
+ 16, 16, 0xffcf, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_8) }, { F (F_9) }, { F (F_2U10) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_bsetm ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf80f, { { F (F_MAJOR) }, { F (F_4) }, { F (F_3U5) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_tas ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cache ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_madd ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00fffff, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16U16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_clip ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0ffff07, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_EXT) }, { F (F_5U24) }, { F (F_29) }, { F (F_30) }, { F (F_31) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_swcp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_smcp ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_swcp16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_smcp16 ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00f0000, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_16S16) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sbcpa ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00fff00, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_EXT) }, { F (F_8S24) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_shcpa ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00fff01, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_EXT) }, { F (F_8S24A2) }, { F (F_31) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_swcpa ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00fff03, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_EXT) }, { F (F_8S24A4) }, { F (F_30) }, { F (F_31) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_smcpa ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00fff07, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_EXT) }, { F (F_8S24A8) }, { F (F_29) }, { F (F_30) }, { F (F_31) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_bcpeq ATTRIBUTE_UNUSED = {
+ 32, 32, 0xff0f0000, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { F (F_17S16A2) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sim_syscall ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf8ef, { { F (F_MAJOR) }, { F (F_4) }, { F (F_CALLNUM) }, { F (F_8) }, { F (F_9) }, { F (F_10) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_fadds ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0fff001, { { F (F_FMAX_0_4) }, { F (F_FMAX_FRD) }, { F (F_FMAX_8_4) }, { F (F_FMAX_12_4) }, { F (F_FMAX_16_4) }, { F (F_FMAX_FRN) }, { F (F_FMAX_FRM) }, { F (F_FMAX_31_1) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_fsqrts ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0fff0f3, { { F (F_FMAX_0_4) }, { F (F_FMAX_FRD) }, { F (F_FMAX_8_4) }, { F (F_FMAX_12_4) }, { F (F_FMAX_16_4) }, { F (F_FMAX_FRN) }, { F (F_FMAX_24_4) }, { F (F_FMAX_30_1) }, { F (F_FMAX_31_1) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_froundws ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0fff0f3, { { F (F_FMAX_0_4) }, { F (F_FMAX_FRD) }, { F (F_FMAX_8_4) }, { F (F_FMAX_12_4) }, { F (F_FMAX_16_4) }, { F (F_FMAX_FRN) }, { F (F_FMAX_24_4) }, { F (F_FMAX_30_1) }, { F (F_FMAX_31_1) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_fcvtsw ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf0fff0f3, { { F (F_FMAX_0_4) }, { F (F_FMAX_FRD) }, { F (F_FMAX_8_4) }, { F (F_FMAX_12_4) }, { F (F_FMAX_16_4) }, { F (F_FMAX_FRN) }, { F (F_FMAX_24_4) }, { F (F_FMAX_30_1) }, { F (F_FMAX_31_1) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_fcmpfs ATTRIBUTE_UNUSED = {
+ 32, 32, 0xfffff009, { { F (F_FMAX_0_4) }, { F (F_FMAX_4_4) }, { F (F_FMAX_8_4) }, { F (F_FMAX_12_4) }, { F (F_FMAX_16_4) }, { F (F_FMAX_FRN) }, { F (F_FMAX_FRM) }, { F (F_FMAX_28_1) }, { F (F_FMAX_31_1) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmov_frn_rm ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00ffff7, { { F (F_FMAX_0_4) }, { F (F_FMAX_FRD) }, { F (F_FMAX_RM) }, { F (F_FMAX_12_4) }, { F (F_FMAX_16_4) }, { F (F_FMAX_20_4) }, { F (F_FMAX_24_4) }, { F (F_FMAX_29_1) }, { F (F_FMAX_30_1) }, { F (F_FMAX_31_1) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_cmovc_ccrn_rm ATTRIBUTE_UNUSED = {
+ 32, 32, 0xf00fffff, { { F (F_FMAX_0_4) }, { F (F_FMAX_4_4) }, { F (F_FMAX_RM) }, { F (F_FMAX_12_4) }, { F (F_FMAX_16_4) }, { F (F_FMAX_20_4) }, { F (F_FMAX_24_4) }, { F (F_FMAX_28_1) }, { F (F_FMAX_29_1) }, { F (F_FMAX_30_1) }, { F (F_FMAX_31_1) }, { 0 } }
+};
+
+#undef F
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_INSN_##a)
+#else
+#define A(a) (1 << CGEN_INSN_/**/a)
+#endif
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define OPERAND(op) MEP_OPERAND_##op
+#else
+#define OPERAND(op) MEP_OPERAND_/**/op
+#endif
+#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
+
+/* The instruction table. */
+
+static const CGEN_OPCODE mep_cgen_insn_opcode_table[MAX_INSNS] =
+{
+ /* Special null first entry.
+ A `num' value of zero is thus invalid.
+ Also, the special `invalid' insn resides here. */
+ { { 0, 0, 0, 0 }, {{0}}, 0, {0}},
+/* sb $rnc,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNC), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_sb, { 0x8 }
+ },
+/* sh $rns,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNS), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_sh, { 0x9 }
+ },
+/* sw $rnl,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_sw, { 0xa }
+ },
+/* lb $rnc,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNC), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_sb, { 0xc }
+ },
+/* lh $rns,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNS), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_sh, { 0xd }
+ },
+/* lw $rnl,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_sw, { 0xe }
+ },
+/* lbu $rnuc,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNUC), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_lbu, { 0xb }
+ },
+/* lhu $rnus,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNUS), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_lhu, { 0xf }
+ },
+/* sw $rnl,$udisp7a4($spr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', OP (UDISP7A4), '(', OP (SPR), ')', 0 } },
+ & ifmt_sw_sp, { 0x4002 }
+ },
+/* lw $rnl,$udisp7a4($spr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', OP (UDISP7A4), '(', OP (SPR), ')', 0 } },
+ & ifmt_sw_sp, { 0x4003 }
+ },
+/* sb $rn3c,$udisp7($tpr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3C), ',', OP (UDISP7), '(', OP (TPR), ')', 0 } },
+ & ifmt_sb_tp, { 0x8000 }
+ },
+/* sh $rn3s,$udisp7a2($tpr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3S), ',', OP (UDISP7A2), '(', OP (TPR), ')', 0 } },
+ & ifmt_sh_tp, { 0x8080 }
+ },
+/* sw $rn3l,$udisp7a4($tpr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3L), ',', OP (UDISP7A4), '(', OP (TPR), ')', 0 } },
+ & ifmt_sw_tp, { 0x4082 }
+ },
+/* lb $rn3c,$udisp7($tpr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3C), ',', OP (UDISP7), '(', OP (TPR), ')', 0 } },
+ & ifmt_sb_tp, { 0x8800 }
+ },
+/* lh $rn3s,$udisp7a2($tpr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3S), ',', OP (UDISP7A2), '(', OP (TPR), ')', 0 } },
+ & ifmt_sh_tp, { 0x8880 }
+ },
+/* lw $rn3l,$udisp7a4($tpr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3L), ',', OP (UDISP7A4), '(', OP (TPR), ')', 0 } },
+ & ifmt_sw_tp, { 0x4083 }
+ },
+/* lbu $rn3uc,$udisp7($tpr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3UC), ',', OP (UDISP7), '(', OP (TPR), ')', 0 } },
+ & ifmt_lbu_tp, { 0x4880 }
+ },
+/* lhu $rn3us,$udisp7a2($tpr) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3US), ',', OP (UDISP7A2), '(', OP (TPR), ')', 0 } },
+ & ifmt_lhu_tp, { 0x8881 }
+ },
+/* sb $rnc,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNC), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_sb16, { 0xc0080000 }
+ },
+/* sh $rns,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNS), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_sh16, { 0xc0090000 }
+ },
+/* sw $rnl,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_sw16, { 0xc00a0000 }
+ },
+/* lb $rnc,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNC), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_sb16, { 0xc00c0000 }
+ },
+/* lh $rns,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNS), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_sh16, { 0xc00d0000 }
+ },
+/* lw $rnl,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_sw16, { 0xc00e0000 }
+ },
+/* lbu $rnuc,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNUC), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_lbu16, { 0xc00b0000 }
+ },
+/* lhu $rnus,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNUS), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_lhu16, { 0xc00f0000 }
+ },
+/* sw $rnl,($addr24a4) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', '(', OP (ADDR24A4), ')', 0 } },
+ & ifmt_sw24, { 0xe0020000 }
+ },
+/* lw $rnl,($addr24a4) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', '(', OP (ADDR24A4), ')', 0 } },
+ & ifmt_sw24, { 0xe0030000 }
+ },
+/* extb $rn */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), 0 } },
+ & ifmt_extb, { 0x100d }
+ },
+/* exth $rn */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), 0 } },
+ & ifmt_extb, { 0x102d }
+ },
+/* extub $rn */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), 0 } },
+ & ifmt_extb, { 0x108d }
+ },
+/* extuh $rn */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), 0 } },
+ & ifmt_extb, { 0x10ad }
+ },
+/* ssarb $udisp2($rm) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (UDISP2), '(', OP (RM), ')', 0 } },
+ & ifmt_ssarb, { 0x100c }
+ },
+/* mov $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x0 }
+ },
+/* mov $rn,$simm8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (SIMM8), 0 } },
+ & ifmt_movi8, { 0x5000 }
+ },
+/* mov $rn,$simm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (SIMM16), 0 } },
+ & ifmt_movi16, { 0xc0010000 }
+ },
+/* movu $rn3,$uimm24 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN3), ',', OP (UIMM24), 0 } },
+ & ifmt_movu24, { 0xd0000000 }
+ },
+/* movu $rn,$uimm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM16), 0 } },
+ & ifmt_movu16, { 0xc0110000 }
+ },
+/* movh $rn,$uimm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM16), 0 } },
+ & ifmt_movu16, { 0xc0210000 }
+ },
+/* add3 $rl,$rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RL), ',', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_add3, { 0x9000 }
+ },
+/* add $rn,$simm6 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (SIMM6), 0 } },
+ & ifmt_add, { 0x6000 }
+ },
+/* add3 $rn,$spr,$uimm7a4 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (SPR), ',', OP (UIMM7A4), 0 } },
+ & ifmt_add3i, { 0x4000 }
+ },
+/* advck3 \$0,$rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x7 }
+ },
+/* sub $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x4 }
+ },
+/* sbvck3 \$0,$rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x5 }
+ },
+/* neg $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1 }
+ },
+/* slt3 \$0,$rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x2 }
+ },
+/* sltu3 \$0,$rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x3 }
+ },
+/* slt3 \$0,$rn,$uimm5 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (UIMM5), 0 } },
+ & ifmt_slt3i, { 0x6001 }
+ },
+/* sltu3 \$0,$rn,$uimm5 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (UIMM5), 0 } },
+ & ifmt_slt3i, { 0x6005 }
+ },
+/* sl1ad3 \$0,$rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x2006 }
+ },
+/* sl2ad3 \$0,$rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x2007 }
+ },
+/* add3 $rn,$rm,$simm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), ',', OP (SIMM16), 0 } },
+ & ifmt_add3x, { 0xc0000000 }
+ },
+/* slt3 $rn,$rm,$simm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), ',', OP (SIMM16), 0 } },
+ & ifmt_add3x, { 0xc0020000 }
+ },
+/* sltu3 $rn,$rm,$uimm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), ',', OP (UIMM16), 0 } },
+ & ifmt_sltu3x, { 0xc0030000 }
+ },
+/* or $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1000 }
+ },
+/* and $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1001 }
+ },
+/* xor $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1002 }
+ },
+/* nor $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1003 }
+ },
+/* or3 $rn,$rm,$uimm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), ',', OP (UIMM16), 0 } },
+ & ifmt_sltu3x, { 0xc0040000 }
+ },
+/* and3 $rn,$rm,$uimm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), ',', OP (UIMM16), 0 } },
+ & ifmt_sltu3x, { 0xc0050000 }
+ },
+/* xor3 $rn,$rm,$uimm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), ',', OP (UIMM16), 0 } },
+ & ifmt_sltu3x, { 0xc0060000 }
+ },
+/* sra $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x200d }
+ },
+/* srl $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x200c }
+ },
+/* sll $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x200e }
+ },
+/* sra $rn,$uimm5 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM5), 0 } },
+ & ifmt_slt3i, { 0x6003 }
+ },
+/* srl $rn,$uimm5 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM5), 0 } },
+ & ifmt_slt3i, { 0x6002 }
+ },
+/* sll $rn,$uimm5 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM5), 0 } },
+ & ifmt_slt3i, { 0x6006 }
+ },
+/* sll3 \$0,$rn,$uimm5 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', OP (RN), ',', OP (UIMM5), 0 } },
+ & ifmt_slt3i, { 0x6007 }
+ },
+/* fsft $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x200f }
+ },
+/* bra $pcrel12a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (PCREL12A2), 0 } },
+ & ifmt_bra, { 0xb000 }
+ },
+/* beqz $rn,$pcrel8a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (PCREL8A2), 0 } },
+ & ifmt_beqz, { 0xa000 }
+ },
+/* bnez $rn,$pcrel8a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (PCREL8A2), 0 } },
+ & ifmt_beqz, { 0xa001 }
+ },
+/* beqi $rn,$uimm4,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM4), ',', OP (PCREL17A2), 0 } },
+ & ifmt_beqi, { 0xe0000000 }
+ },
+/* bnei $rn,$uimm4,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM4), ',', OP (PCREL17A2), 0 } },
+ & ifmt_beqi, { 0xe0040000 }
+ },
+/* blti $rn,$uimm4,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM4), ',', OP (PCREL17A2), 0 } },
+ & ifmt_beqi, { 0xe00c0000 }
+ },
+/* bgei $rn,$uimm4,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM4), ',', OP (PCREL17A2), 0 } },
+ & ifmt_beqi, { 0xe0080000 }
+ },
+/* beq $rn,$rm,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), ',', OP (PCREL17A2), 0 } },
+ & ifmt_beq, { 0xe0010000 }
+ },
+/* bne $rn,$rm,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), ',', OP (PCREL17A2), 0 } },
+ & ifmt_beq, { 0xe0050000 }
+ },
+/* bsr $pcrel12a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (PCREL12A2), 0 } },
+ & ifmt_bra, { 0xb001 }
+ },
+/* bsr $pcrel24a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (PCREL24A2), 0 } },
+ & ifmt_bsr24, { 0xd8090000 }
+ },
+/* jmp $rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RM), 0 } },
+ & ifmt_jmp, { 0x100e }
+ },
+/* jmp $pcabs24a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (PCABS24A2), 0 } },
+ & ifmt_jmp24, { 0xd8080000 }
+ },
+/* jsr $rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RM), 0 } },
+ & ifmt_jmp, { 0x100f }
+ },
+/* ret */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7002 }
+ },
+/* repeat $rn,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (PCREL17A2), 0 } },
+ & ifmt_repeat, { 0xe0090000 }
+ },
+/* erepeat $pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (PCREL17A2), 0 } },
+ & ifmt_erepeat, { 0xe0190000 }
+ },
+/* stc $rn,\$lp */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', '$', 'l', 'p', 0 } },
+ & ifmt_stc_lp, { 0x7018 }
+ },
+/* stc $rn,\$hi */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', '$', 'h', 'i', 0 } },
+ & ifmt_stc_lp, { 0x7078 }
+ },
+/* stc $rn,\$lo */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', '$', 'l', 'o', 0 } },
+ & ifmt_stc_lp, { 0x7088 }
+ },
+/* stc $rn,$csrn */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (CSRN), 0 } },
+ & ifmt_stc, { 0x7008 }
+ },
+/* ldc $rn,\$lp */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', '$', 'l', 'p', 0 } },
+ & ifmt_stc_lp, { 0x701a }
+ },
+/* ldc $rn,\$hi */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', '$', 'h', 'i', 0 } },
+ & ifmt_stc_lp, { 0x707a }
+ },
+/* ldc $rn,\$lo */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', '$', 'l', 'o', 0 } },
+ & ifmt_stc_lp, { 0x708a }
+ },
+/* ldc $rn,$csrn */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (CSRN), 0 } },
+ & ifmt_stc, { 0x700a }
+ },
+/* di */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7000 }
+ },
+/* ei */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7010 }
+ },
+/* reti */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7012 }
+ },
+/* halt */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7022 }
+ },
+/* sleep */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7062 }
+ },
+/* swi $uimm2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (UIMM2), 0 } },
+ & ifmt_swi, { 0x7006 }
+ },
+/* break */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7032 }
+ },
+/* syncm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7011 }
+ },
+/* stcb $rn,$uimm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM16), 0 } },
+ & ifmt_movu16, { 0xf0040000 }
+ },
+/* ldcb $rn,$uimm16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (UIMM16), 0 } },
+ & ifmt_movu16, { 0xf0140000 }
+ },
+/* bsetm ($rma),$uimm3 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '(', OP (RMA), ')', ',', OP (UIMM3), 0 } },
+ & ifmt_bsetm, { 0x2000 }
+ },
+/* bclrm ($rma),$uimm3 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '(', OP (RMA), ')', ',', OP (UIMM3), 0 } },
+ & ifmt_bsetm, { 0x2001 }
+ },
+/* bnotm ($rma),$uimm3 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '(', OP (RMA), ')', ',', OP (UIMM3), 0 } },
+ & ifmt_bsetm, { 0x2002 }
+ },
+/* btstm \$0,($rma),$uimm3 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', '$', '0', ',', '(', OP (RMA), ')', ',', OP (UIMM3), 0 } },
+ & ifmt_bsetm, { 0x2003 }
+ },
+/* tas $rn,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_tas, { 0x2004 }
+ },
+/* cache $cimm4,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CIMM4), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_cache, { 0x7004 }
+ },
+/* mul $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1004 }
+ },
+/* mulu $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1005 }
+ },
+/* mulr $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1006 }
+ },
+/* mulru $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1007 }
+ },
+/* madd $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0013004 }
+ },
+/* maddu $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0013005 }
+ },
+/* maddr $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0013006 }
+ },
+/* maddru $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0013007 }
+ },
+/* div $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1008 }
+ },
+/* divu $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_mov, { 0x1009 }
+ },
+/* dret */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7013 }
+ },
+/* dbreak */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7033 }
+ },
+/* ldz $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010000 }
+ },
+/* abs $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010003 }
+ },
+/* ave $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010002 }
+ },
+/* min $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010004 }
+ },
+/* max $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010005 }
+ },
+/* minu $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010006 }
+ },
+/* maxu $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010007 }
+ },
+/* clip $rn,$cimm5 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (CIMM5), 0 } },
+ & ifmt_clip, { 0xf0011000 }
+ },
+/* clipu $rn,$cimm5 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (CIMM5), 0 } },
+ & ifmt_clip, { 0xf0011001 }
+ },
+/* sadd $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010008 }
+ },
+/* ssub $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf001000a }
+ },
+/* saddu $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf0010009 }
+ },
+/* ssubu $rn,$rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RN), ',', OP (RM), 0 } },
+ & ifmt_madd, { 0xf001000b }
+ },
+/* swcp $crn,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_swcp, { 0x3008 }
+ },
+/* lwcp $crn,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_swcp, { 0x3009 }
+ },
+/* smcp $crn64,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_smcp, { 0x300a }
+ },
+/* lmcp $crn64,($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), ')', 0 } },
+ & ifmt_smcp, { 0x300b }
+ },
+/* swcpi $crn,($rma+) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', 0 } },
+ & ifmt_swcp, { 0x3000 }
+ },
+/* lwcpi $crn,($rma+) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', 0 } },
+ & ifmt_swcp, { 0x3001 }
+ },
+/* smcpi $crn64,($rma+) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), '+', ')', 0 } },
+ & ifmt_smcp, { 0x3002 }
+ },
+/* lmcpi $crn64,($rma+) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), '+', ')', 0 } },
+ & ifmt_smcp, { 0x3003 }
+ },
+/* swcp $crn,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_swcp16, { 0xf00c0000 }
+ },
+/* lwcp $crn,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_swcp16, { 0xf00d0000 }
+ },
+/* smcp $crn64,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_smcp16, { 0xf00e0000 }
+ },
+/* lmcp $crn64,$sdisp16($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', OP (SDISP16), '(', OP (RMA), ')', 0 } },
+ & ifmt_smcp16, { 0xf00f0000 }
+ },
+/* sbcpa $crn,($rma+),$cdisp8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8), 0 } },
+ & ifmt_sbcpa, { 0xf0050000 }
+ },
+/* lbcpa $crn,($rma+),$cdisp8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8), 0 } },
+ & ifmt_sbcpa, { 0xf0054000 }
+ },
+/* shcpa $crn,($rma+),$cdisp8a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A2), 0 } },
+ & ifmt_shcpa, { 0xf0051000 }
+ },
+/* lhcpa $crn,($rma+),$cdisp8a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A2), 0 } },
+ & ifmt_shcpa, { 0xf0055000 }
+ },
+/* swcpa $crn,($rma+),$cdisp8a4 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A4), 0 } },
+ & ifmt_swcpa, { 0xf0052000 }
+ },
+/* lwcpa $crn,($rma+),$cdisp8a4 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A4), 0 } },
+ & ifmt_swcpa, { 0xf0056000 }
+ },
+/* smcpa $crn64,($rma+),$cdisp8a8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A8), 0 } },
+ & ifmt_smcpa, { 0xf0053000 }
+ },
+/* lmcpa $crn64,($rma+),$cdisp8a8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A8), 0 } },
+ & ifmt_smcpa, { 0xf0057000 }
+ },
+/* sbcpm0 $crn,($rma+),$cdisp8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8), 0 } },
+ & ifmt_sbcpa, { 0xf0050800 }
+ },
+/* lbcpm0 $crn,($rma+),$cdisp8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8), 0 } },
+ & ifmt_sbcpa, { 0xf0054800 }
+ },
+/* shcpm0 $crn,($rma+),$cdisp8a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A2), 0 } },
+ & ifmt_shcpa, { 0xf0051800 }
+ },
+/* lhcpm0 $crn,($rma+),$cdisp8a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A2), 0 } },
+ & ifmt_shcpa, { 0xf0055800 }
+ },
+/* swcpm0 $crn,($rma+),$cdisp8a4 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A4), 0 } },
+ & ifmt_swcpa, { 0xf0052800 }
+ },
+/* lwcpm0 $crn,($rma+),$cdisp8a4 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A4), 0 } },
+ & ifmt_swcpa, { 0xf0056800 }
+ },
+/* smcpm0 $crn64,($rma+),$cdisp8a8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A8), 0 } },
+ & ifmt_smcpa, { 0xf0053800 }
+ },
+/* lmcpm0 $crn64,($rma+),$cdisp8a8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A8), 0 } },
+ & ifmt_smcpa, { 0xf0057800 }
+ },
+/* sbcpm1 $crn,($rma+),$cdisp8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8), 0 } },
+ & ifmt_sbcpa, { 0xf0050c00 }
+ },
+/* lbcpm1 $crn,($rma+),$cdisp8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8), 0 } },
+ & ifmt_sbcpa, { 0xf0054c00 }
+ },
+/* shcpm1 $crn,($rma+),$cdisp8a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A2), 0 } },
+ & ifmt_shcpa, { 0xf0051c00 }
+ },
+/* lhcpm1 $crn,($rma+),$cdisp8a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A2), 0 } },
+ & ifmt_shcpa, { 0xf0055c00 }
+ },
+/* swcpm1 $crn,($rma+),$cdisp8a4 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A4), 0 } },
+ & ifmt_swcpa, { 0xf0052c00 }
+ },
+/* lwcpm1 $crn,($rma+),$cdisp8a4 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A4), 0 } },
+ & ifmt_swcpa, { 0xf0056c00 }
+ },
+/* smcpm1 $crn64,($rma+),$cdisp8a8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A8), 0 } },
+ & ifmt_smcpa, { 0xf0053c00 }
+ },
+/* lmcpm1 $crn64,($rma+),$cdisp8a8 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', '(', OP (RMA), '+', ')', ',', OP (CDISP8A8), 0 } },
+ & ifmt_smcpa, { 0xf0057c00 }
+ },
+/* bcpeq $cccc,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CCCC), ',', OP (PCREL17A2), 0 } },
+ & ifmt_bcpeq, { 0xd8040000 }
+ },
+/* bcpne $cccc,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CCCC), ',', OP (PCREL17A2), 0 } },
+ & ifmt_bcpeq, { 0xd8050000 }
+ },
+/* bcpat $cccc,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CCCC), ',', OP (PCREL17A2), 0 } },
+ & ifmt_bcpeq, { 0xd8060000 }
+ },
+/* bcpaf $cccc,$pcrel17a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CCCC), ',', OP (PCREL17A2), 0 } },
+ & ifmt_bcpeq, { 0xd8070000 }
+ },
+/* synccp */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_ret, { 0x7021 }
+ },
+/* jsrv $rm */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RM), 0 } },
+ & ifmt_jmp, { 0x180f }
+ },
+/* bsrv $pcrel24a2 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (PCREL24A2), 0 } },
+ & ifmt_bsr24, { 0xd80b0000 }
+ },
+/* --unused-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_sim_syscall, { 0x7800 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x6 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x100a }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x100b }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x2005 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x2008 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x2009 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x200a }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x200b }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x3004 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x3005 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x3006 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x3007 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x300c }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x300d }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x300e }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x300f }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x7007 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x700e }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x700f }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0xc007 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0xe00d }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0xf003 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0xf006 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0xf008 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x7005 }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x700c }
+ },
+/* --reserved-- */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_mov, { 0x700d }
+ },
+/* fadds ${fmax-FRd},${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fadds, { 0xf0070000 }
+ },
+/* fsubs ${fmax-FRd},${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fadds, { 0xf0170000 }
+ },
+/* fmuls ${fmax-FRd},${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fadds, { 0xf0270000 }
+ },
+/* fdivs ${fmax-FRd},${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fadds, { 0xf0370000 }
+ },
+/* fsqrts ${fmax-FRd},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_fsqrts, { 0xf0470000 }
+ },
+/* fabss ${fmax-FRd},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_fsqrts, { 0xf0570000 }
+ },
+/* fnegs ${fmax-FRd},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_fsqrts, { 0xf0770000 }
+ },
+/* fmovs ${fmax-FRd},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_fsqrts, { 0xf0670000 }
+ },
+/* froundws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD_INT), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_froundws, { 0xf0c70000 }
+ },
+/* ftruncws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD_INT), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_froundws, { 0xf0d70000 }
+ },
+/* fceilws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD_INT), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_froundws, { 0xf0e70000 }
+ },
+/* ffloorws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD_INT), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_froundws, { 0xf0f70000 }
+ },
+/* fcvtws ${fmax-FRd-int},${fmax-FRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD_INT), ',', OP (FMAX_FRN), 0 } },
+ & ifmt_froundws, { 0xf0471000 }
+ },
+/* fcvtsw ${fmax-FRd},${fmax-FRn-int} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD), ',', OP (FMAX_FRN_INT), 0 } },
+ & ifmt_fcvtsw, { 0xf0079000 }
+ },
+/* fcmpfs ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0072000 }
+ },
+/* fcmpus ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0172000 }
+ },
+/* fcmpes ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0272000 }
+ },
+/* fcmpues ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0372000 }
+ },
+/* fcmpls ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0472000 }
+ },
+/* fcmpuls ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0572000 }
+ },
+/* fcmples ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0672000 }
+ },
+/* fcmpules ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0772000 }
+ },
+/* fcmpfis ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0872000 }
+ },
+/* fcmpuis ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0972000 }
+ },
+/* fcmpeis ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0a72000 }
+ },
+/* fcmpueis ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0b72000 }
+ },
+/* fcmplis ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0c72000 }
+ },
+/* fcmpulis ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0d72000 }
+ },
+/* fcmpleis ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0e72000 }
+ },
+/* fcmpuleis ${fmax-FRn},${fmax-FRm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRN), ',', OP (FMAX_FRM), 0 } },
+ & ifmt_fcmpfs, { 0xf0f72000 }
+ },
+/* cmov ${fmax-FRd-int},${fmax-Rm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_FRD_INT), ',', OP (FMAX_RM), 0 } },
+ & ifmt_cmov_frn_rm, { 0xf007f000 }
+ },
+/* cmov ${fmax-Rm},${fmax-FRd-int} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_RM), ',', OP (FMAX_FRD_INT), 0 } },
+ & ifmt_cmov_frn_rm, { 0xf007f001 }
+ },
+/* cmovc ${fmax-CCRn},${fmax-Rm} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_CCRN), ',', OP (FMAX_RM), 0 } },
+ & ifmt_cmovc_ccrn_rm, { 0xf007f002 }
+ },
+/* cmovc ${fmax-Rm},${fmax-CCRn} */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (FMAX_RM), ',', OP (FMAX_CCRN), 0 } },
+ & ifmt_cmovc_ccrn_rm, { 0xf007f003 }
+ },
+};
+
+#undef A
+#undef OPERAND
+#undef MNEM
+#undef OP
+
+/* Formats for ALIAS macro-insns. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define F(f) & mep_cgen_ifld_table[MEP_##f]
+#else
+#define F(f) & mep_cgen_ifld_table[MEP_/**/f]
+#endif
+static const CGEN_IFMT ifmt_nop ATTRIBUTE_UNUSED = {
+ 16, 16, 0xffff, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sb16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sh16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_sw16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lb16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lh16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lw16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lbu16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lhu16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_RN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_swcp16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lwcp16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_smcp16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+static const CGEN_IFMT ifmt_lmcp16_0 ATTRIBUTE_UNUSED = {
+ 16, 16, 0xf00f, { { F (F_MAJOR) }, { F (F_CRN) }, { F (F_RM) }, { F (F_SUB4) }, { 0 } }
+};
+
+#undef F
+
+/* Each non-simple macro entry points to an array of expansion possibilities. */
+
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define A(a) (1 << CGEN_INSN_##a)
+#else
+#define A(a) (1 << CGEN_INSN_/**/a)
+#endif
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#define OPERAND(op) MEP_OPERAND_##op
+#else
+#define OPERAND(op) MEP_OPERAND_/**/op
+#endif
+#define MNEM CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
+#define OP(field) CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
+
+/* The macro instruction table. */
+
+static const CGEN_IBASE mep_cgen_macro_insn_table[] =
+{
+/* nop */
+ {
+ -1, "nop", "nop", 16,
+ { 0|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sb $rnc,$zero($rma) */
+ {
+ -1, "sb16-0", "sb", 16,
+ { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sh $rns,$zero($rma) */
+ {
+ -1, "sh16-0", "sh", 16,
+ { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* sw $rnl,$zero($rma) */
+ {
+ -1, "sw16-0", "sw", 16,
+ { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lb $rnc,$zero($rma) */
+ {
+ -1, "lb16-0", "lb", 16,
+ { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lh $rns,$zero($rma) */
+ {
+ -1, "lh16-0", "lh", 16,
+ { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lw $rnl,$zero($rma) */
+ {
+ -1, "lw16-0", "lw", 16,
+ { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lbu $rnuc,$zero($rma) */
+ {
+ -1, "lbu16-0", "lbu", 16,
+ { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lhu $rnus,$zero($rma) */
+ {
+ -1, "lhu16-0", "lhu", 16,
+ { 0|A(NO_DIS)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* swcp $crn,$zero($rma) */
+ {
+ -1, "swcp16-0", "swcp", 16,
+ { 0|A(NO_DIS)|A(OPTIONAL_CP_INSN)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lwcp $crn,$zero($rma) */
+ {
+ -1, "lwcp16-0", "lwcp", 16,
+ { 0|A(NO_DIS)|A(OPTIONAL_CP_INSN)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* smcp $crn64,$zero($rma) */
+ {
+ -1, "smcp16-0", "smcp", 16,
+ { 0|A(NO_DIS)|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+/* lmcp $crn64,$zero($rma) */
+ {
+ -1, "lmcp16-0", "lmcp", 16,
+ { 0|A(NO_DIS)|A(OPTIONAL_CP64_INSN)|A(OPTIONAL_CP_INSN)|A(ALIAS), { { { (1<<MACH_BASE), 0 } }, { { 1, "\xe0" } }, { { 0, 0 } }, { { CONFIG_NONE, 0 } } } }
+ },
+};
+
+/* The macro instruction opcode table. */
+
+static const CGEN_OPCODE mep_cgen_macro_insn_opcode_table[] =
+{
+/* nop */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, 0 } },
+ & ifmt_nop, { 0x0 }
+ },
+/* sb $rnc,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNC), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_sb16_0, { 0x8 }
+ },
+/* sh $rns,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNS), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_sh16_0, { 0x9 }
+ },
+/* sw $rnl,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_sw16_0, { 0xa }
+ },
+/* lb $rnc,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNC), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_lb16_0, { 0xc }
+ },
+/* lh $rns,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNS), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_lh16_0, { 0xd }
+ },
+/* lw $rnl,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNL), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_lw16_0, { 0xe }
+ },
+/* lbu $rnuc,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNUC), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_lbu16_0, { 0xb }
+ },
+/* lhu $rnus,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (RNUS), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_lhu16_0, { 0xf }
+ },
+/* swcp $crn,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_swcp16_0, { 0x3008 }
+ },
+/* lwcp $crn,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_lwcp16_0, { 0x3009 }
+ },
+/* smcp $crn64,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_smcp16_0, { 0x300a }
+ },
+/* lmcp $crn64,$zero($rma) */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (CRN64), ',', OP (ZERO), '(', OP (RMA), ')', 0 } },
+ & ifmt_lmcp16_0, { 0x300b }
+ },
+};
+
+#undef A
+#undef OPERAND
+#undef MNEM
+#undef OP
+
+#ifndef CGEN_ASM_HASH_P
+#define CGEN_ASM_HASH_P(insn) 1
+#endif
+
+#ifndef CGEN_DIS_HASH_P
+#define CGEN_DIS_HASH_P(insn) 1
+#endif
+
+/* Return non-zero if INSN is to be added to the hash table.
+ Targets are free to override CGEN_{ASM,DIS}_HASH_P in the .opc file. */
+
+static int
+asm_hash_insn_p (insn)
+ const CGEN_INSN *insn ATTRIBUTE_UNUSED;
+{
+ return CGEN_ASM_HASH_P (insn);
+}
+
+static int
+dis_hash_insn_p (insn)
+ const CGEN_INSN *insn;
+{
+ /* If building the hash table and the NO-DIS attribute is present,
+ ignore. */
+ if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS))
+ return 0;
+ return CGEN_DIS_HASH_P (insn);
+}
+
+#ifndef CGEN_ASM_HASH
+#define CGEN_ASM_HASH_SIZE 127
+#ifdef CGEN_MNEMONIC_OPERANDS
+#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)
+#else
+#define CGEN_ASM_HASH(mnem) (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE) /*FIXME*/
+#endif
+#endif
+
+/* It doesn't make much sense to provide a default here,
+ but while this is under development we do.
+ BUFFER is a pointer to the bytes of the insn, target order.
+ VALUE is the first base_insn_bitsize bits as an int in host order. */
+
+#ifndef CGEN_DIS_HASH
+#define CGEN_DIS_HASH_SIZE 256
+#define CGEN_DIS_HASH(buf, value) (*(unsigned char *) (buf))
+#endif
+
+/* The result is the hash value of the insn.
+ Targets are free to override CGEN_{ASM,DIS}_HASH in the .opc file. */
+
+static unsigned int
+asm_hash_insn (mnem)
+ const char * mnem;
+{
+ return CGEN_ASM_HASH (mnem);
+}
+
+/* BUF is a pointer to the bytes of the insn, target order.
+ VALUE is the first base_insn_bitsize bits as an int in host order. */
+
+static unsigned int
+dis_hash_insn (buf, value)
+ const char * buf ATTRIBUTE_UNUSED;
+ CGEN_INSN_INT value ATTRIBUTE_UNUSED;
+{
+ return CGEN_DIS_HASH (buf, value);
+}
+
+/* Set the recorded length of the insn in the CGEN_FIELDS struct. */
+
+static void
+set_fields_bitsize (CGEN_FIELDS *fields, int size)
+{
+ CGEN_FIELDS_BITSIZE (fields) = size;
+}
+
+/* Function to call before using the operand instance table.
+ This plugs the opcode entries and macro instructions into the cpu table. */
+
+void
+mep_cgen_init_opcode_table (CGEN_CPU_DESC cd)
+{
+ int i;
+ int num_macros = (sizeof (mep_cgen_macro_insn_table) /
+ sizeof (mep_cgen_macro_insn_table[0]));
+ const CGEN_IBASE *ib = & mep_cgen_macro_insn_table[0];
+ const CGEN_OPCODE *oc = & mep_cgen_macro_insn_opcode_table[0];
+ CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));
+
+ memset (insns, 0, num_macros * sizeof (CGEN_INSN));
+ for (i = 0; i < num_macros; ++i)
+ {
+ insns[i].base = &ib[i];
+ insns[i].opcode = &oc[i];
+ mep_cgen_build_insn_regex (& insns[i]);
+ }
+ cd->macro_insn_table.init_entries = insns;
+ cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE);
+ cd->macro_insn_table.num_init_entries = num_macros;
+
+ oc = & mep_cgen_insn_opcode_table[0];
+ insns = (CGEN_INSN *) cd->insn_table.init_entries;
+ for (i = 0; i < MAX_INSNS; ++i)
+ {
+ insns[i].opcode = &oc[i];
+ mep_cgen_build_insn_regex (& insns[i]);
+ }
+
+ cd->sizeof_fields = sizeof (CGEN_FIELDS);
+ cd->set_fields_bitsize = set_fields_bitsize;
+
+ cd->asm_hash_p = asm_hash_insn_p;
+ cd->asm_hash = asm_hash_insn;
+ cd->asm_hash_size = CGEN_ASM_HASH_SIZE;
+
+ cd->dis_hash_p = dis_hash_insn_p;
+ cd->dis_hash = dis_hash_insn;
+ cd->dis_hash_size = CGEN_DIS_HASH_SIZE;
+}
diff --git a/contrib/binutils/opcodes/mep-opc.h b/contrib/binutils/opcodes/mep-opc.h
new file mode 100644
index 0000000..d9dbd4b
--- /dev/null
+++ b/contrib/binutils/opcodes/mep-opc.h
@@ -0,0 +1,294 @@
+/* Instruction opcode header for mep.
+
+THIS FILE IS MACHINE GENERATED WITH CGEN.
+
+Copyright 1996-2005 Free Software Foundation, Inc.
+
+This file is part of the GNU Binutils and/or GDB, the GNU debugger.
+
+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.,
+51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+
+*/
+
+#ifndef MEP_OPC_H
+#define MEP_OPC_H
+
+/* -- opc.h */
+
+#undef CGEN_DIS_HASH_SIZE
+#define CGEN_DIS_HASH_SIZE 1
+
+#undef CGEN_DIS_HASH
+#define CGEN_DIS_HASH(buffer, insn) 0
+
+#define CGEN_VERBOSE_ASSEMBLER_ERRORS
+
+typedef struct
+{
+ char * name;
+ int config_enum;
+ unsigned cpu_flag;
+ int big_endian;
+ int vliw_bits;
+ CGEN_ATTR_VALUE_BITSET_TYPE cop16_isa;
+ CGEN_ATTR_VALUE_BITSET_TYPE cop32_isa;
+ CGEN_ATTR_VALUE_BITSET_TYPE cop48_isa;
+ CGEN_ATTR_VALUE_BITSET_TYPE cop64_isa;
+ CGEN_ATTR_VALUE_BITSET_TYPE cop_isa;
+ CGEN_ATTR_VALUE_BITSET_TYPE core_isa;
+ unsigned int option_mask;
+} mep_config_map_struct;
+
+extern mep_config_map_struct mep_config_map[];
+extern int mep_config_index;
+
+extern void init_mep_all_core_isas_mask (void);
+extern void init_mep_all_cop_isas_mask (void);
+extern CGEN_ATTR_VALUE_BITSET_TYPE mep_cop_isa (void);
+
+#define MEP_CONFIG (mep_config_map[mep_config_index].config_enum)
+#define MEP_CPU (mep_config_map[mep_config_index].cpu_flag)
+#define MEP_OMASK (mep_config_map[mep_config_index].option_mask)
+#define MEP_VLIW (mep_config_map[mep_config_index].vliw_bits > 0)
+#define MEP_VLIW32 (mep_config_map[mep_config_index].vliw_bits == 32)
+#define MEP_VLIW64 (mep_config_map[mep_config_index].vliw_bits == 64)
+#define MEP_COP16_ISA (mep_config_map[mep_config_index].cop16_isa)
+#define MEP_COP32_ISA (mep_config_map[mep_config_index].cop32_isa)
+#define MEP_COP48_ISA (mep_config_map[mep_config_index].cop48_isa)
+#define MEP_COP64_ISA (mep_config_map[mep_config_index].cop64_isa)
+#define MEP_COP_ISA (mep_config_map[mep_config_index].cop_isa)
+#define MEP_CORE_ISA (mep_config_map[mep_config_index].core_isa)
+
+extern int mep_insn_supported_by_isa (const CGEN_INSN *, CGEN_ATTR_VALUE_BITSET_TYPE *);
+
+/* A mask for all ISAs executed by the core. */
+#define MEP_ALL_CORE_ISAS_MASK mep_all_core_isas_mask
+extern CGEN_ATTR_VALUE_BITSET_TYPE mep_all_core_isas_mask;
+
+#define MEP_INSN_CORE_P(insn) ( \
+ init_mep_all_core_isas_mask (), \
+ mep_insn_supported_by_isa (insn, & MEP_ALL_CORE_ISAS_MASK) \
+)
+
+/* A mask for all ISAs executed by a VLIW coprocessor. */
+#define MEP_ALL_COP_ISAS_MASK mep_all_cop_isas_mask
+extern CGEN_ATTR_VALUE_BITSET_TYPE mep_all_cop_isas_mask;
+
+#define MEP_INSN_COP_P(insn) ( \
+ init_mep_all_cop_isas_mask (), \
+ mep_insn_supported_by_isa (insn, & MEP_ALL_COP_ISAS_MASK) \
+)
+
+extern int mep_cgen_insn_supported (CGEN_CPU_DESC, const CGEN_INSN *);
+
+/* -- asm.c */
+/* Enum declaration for mep instruction types. */
+typedef enum cgen_insn_type {
+ MEP_INSN_INVALID, MEP_INSN_SB, MEP_INSN_SH, MEP_INSN_SW
+ , MEP_INSN_LB, MEP_INSN_LH, MEP_INSN_LW, MEP_INSN_LBU
+ , MEP_INSN_LHU, MEP_INSN_SW_SP, MEP_INSN_LW_SP, MEP_INSN_SB_TP
+ , MEP_INSN_SH_TP, MEP_INSN_SW_TP, MEP_INSN_LB_TP, MEP_INSN_LH_TP
+ , MEP_INSN_LW_TP, MEP_INSN_LBU_TP, MEP_INSN_LHU_TP, MEP_INSN_SB16
+ , MEP_INSN_SH16, MEP_INSN_SW16, MEP_INSN_LB16, MEP_INSN_LH16
+ , MEP_INSN_LW16, MEP_INSN_LBU16, MEP_INSN_LHU16, MEP_INSN_SW24
+ , MEP_INSN_LW24, MEP_INSN_EXTB, MEP_INSN_EXTH, MEP_INSN_EXTUB
+ , MEP_INSN_EXTUH, MEP_INSN_SSARB, MEP_INSN_MOV, MEP_INSN_MOVI8
+ , MEP_INSN_MOVI16, MEP_INSN_MOVU24, MEP_INSN_MOVU16, MEP_INSN_MOVH
+ , MEP_INSN_ADD3, MEP_INSN_ADD, MEP_INSN_ADD3I, MEP_INSN_ADVCK3
+ , MEP_INSN_SUB, MEP_INSN_SBVCK3, MEP_INSN_NEG, MEP_INSN_SLT3
+ , MEP_INSN_SLTU3, MEP_INSN_SLT3I, MEP_INSN_SLTU3I, MEP_INSN_SL1AD3
+ , MEP_INSN_SL2AD3, MEP_INSN_ADD3X, MEP_INSN_SLT3X, MEP_INSN_SLTU3X
+ , MEP_INSN_OR, MEP_INSN_AND, MEP_INSN_XOR, MEP_INSN_NOR
+ , MEP_INSN_OR3, MEP_INSN_AND3, MEP_INSN_XOR3, MEP_INSN_SRA
+ , MEP_INSN_SRL, MEP_INSN_SLL, MEP_INSN_SRAI, MEP_INSN_SRLI
+ , MEP_INSN_SLLI, MEP_INSN_SLL3, MEP_INSN_FSFT, MEP_INSN_BRA
+ , MEP_INSN_BEQZ, MEP_INSN_BNEZ, MEP_INSN_BEQI, MEP_INSN_BNEI
+ , MEP_INSN_BLTI, MEP_INSN_BGEI, MEP_INSN_BEQ, MEP_INSN_BNE
+ , MEP_INSN_BSR12, MEP_INSN_BSR24, MEP_INSN_JMP, MEP_INSN_JMP24
+ , MEP_INSN_JSR, MEP_INSN_RET, MEP_INSN_REPEAT, MEP_INSN_EREPEAT
+ , MEP_INSN_STC_LP, MEP_INSN_STC_HI, MEP_INSN_STC_LO, MEP_INSN_STC
+ , MEP_INSN_LDC_LP, MEP_INSN_LDC_HI, MEP_INSN_LDC_LO, MEP_INSN_LDC
+ , MEP_INSN_DI, MEP_INSN_EI, MEP_INSN_RETI, MEP_INSN_HALT
+ , MEP_INSN_SLEEP, MEP_INSN_SWI, MEP_INSN_BREAK, MEP_INSN_SYNCM
+ , MEP_INSN_STCB, MEP_INSN_LDCB, MEP_INSN_BSETM, MEP_INSN_BCLRM
+ , MEP_INSN_BNOTM, MEP_INSN_BTSTM, MEP_INSN_TAS, MEP_INSN_CACHE
+ , MEP_INSN_MUL, MEP_INSN_MULU, MEP_INSN_MULR, MEP_INSN_MULRU
+ , MEP_INSN_MADD, MEP_INSN_MADDU, MEP_INSN_MADDR, MEP_INSN_MADDRU
+ , MEP_INSN_DIV, MEP_INSN_DIVU, MEP_INSN_DRET, MEP_INSN_DBREAK
+ , MEP_INSN_LDZ, MEP_INSN_ABS, MEP_INSN_AVE, MEP_INSN_MIN
+ , MEP_INSN_MAX, MEP_INSN_MINU, MEP_INSN_MAXU, MEP_INSN_CLIP
+ , MEP_INSN_CLIPU, MEP_INSN_SADD, MEP_INSN_SSUB, MEP_INSN_SADDU
+ , MEP_INSN_SSUBU, MEP_INSN_SWCP, MEP_INSN_LWCP, MEP_INSN_SMCP
+ , MEP_INSN_LMCP, MEP_INSN_SWCPI, MEP_INSN_LWCPI, MEP_INSN_SMCPI
+ , MEP_INSN_LMCPI, MEP_INSN_SWCP16, MEP_INSN_LWCP16, MEP_INSN_SMCP16
+ , MEP_INSN_LMCP16, MEP_INSN_SBCPA, MEP_INSN_LBCPA, MEP_INSN_SHCPA
+ , MEP_INSN_LHCPA, MEP_INSN_SWCPA, MEP_INSN_LWCPA, MEP_INSN_SMCPA
+ , MEP_INSN_LMCPA, MEP_INSN_SBCPM0, MEP_INSN_LBCPM0, MEP_INSN_SHCPM0
+ , MEP_INSN_LHCPM0, MEP_INSN_SWCPM0, MEP_INSN_LWCPM0, MEP_INSN_SMCPM0
+ , MEP_INSN_LMCPM0, MEP_INSN_SBCPM1, MEP_INSN_LBCPM1, MEP_INSN_SHCPM1
+ , MEP_INSN_LHCPM1, MEP_INSN_SWCPM1, MEP_INSN_LWCPM1, MEP_INSN_SMCPM1
+ , MEP_INSN_LMCPM1, MEP_INSN_BCPEQ, MEP_INSN_BCPNE, MEP_INSN_BCPAT
+ , MEP_INSN_BCPAF, MEP_INSN_SYNCCP, MEP_INSN_JSRV, MEP_INSN_BSRV
+ , MEP_INSN_SIM_SYSCALL, MEP_INSN_RI_0, MEP_INSN_RI_1, MEP_INSN_RI_2
+ , MEP_INSN_RI_3, MEP_INSN_RI_4, MEP_INSN_RI_5, MEP_INSN_RI_6
+ , MEP_INSN_RI_7, MEP_INSN_RI_8, MEP_INSN_RI_9, MEP_INSN_RI_10
+ , MEP_INSN_RI_11, MEP_INSN_RI_12, MEP_INSN_RI_13, MEP_INSN_RI_14
+ , MEP_INSN_RI_15, MEP_INSN_RI_17, MEP_INSN_RI_20, MEP_INSN_RI_21
+ , MEP_INSN_RI_22, MEP_INSN_RI_23, MEP_INSN_RI_24, MEP_INSN_RI_25
+ , MEP_INSN_RI_26, MEP_INSN_RI_16, MEP_INSN_RI_18, MEP_INSN_RI_19
+ , MEP_INSN_FADDS, MEP_INSN_FSUBS, MEP_INSN_FMULS, MEP_INSN_FDIVS
+ , MEP_INSN_FSQRTS, MEP_INSN_FABSS, MEP_INSN_FNEGS, MEP_INSN_FMOVS
+ , MEP_INSN_FROUNDWS, MEP_INSN_FTRUNCWS, MEP_INSN_FCEILWS, MEP_INSN_FFLOORWS
+ , MEP_INSN_FCVTWS, MEP_INSN_FCVTSW, MEP_INSN_FCMPFS, MEP_INSN_FCMPUS
+ , MEP_INSN_FCMPES, MEP_INSN_FCMPUES, MEP_INSN_FCMPLS, MEP_INSN_FCMPULS
+ , MEP_INSN_FCMPLES, MEP_INSN_FCMPULES, MEP_INSN_FCMPFIS, MEP_INSN_FCMPUIS
+ , MEP_INSN_FCMPEIS, MEP_INSN_FCMPUEIS, MEP_INSN_FCMPLIS, MEP_INSN_FCMPULIS
+ , MEP_INSN_FCMPLEIS, MEP_INSN_FCMPULEIS, MEP_INSN_CMOV_FRN_RM, MEP_INSN_CMOV_RM_FRN
+ , MEP_INSN_CMOVC_CCRN_RM, MEP_INSN_CMOVC_RM_CCRN
+} CGEN_INSN_TYPE;
+
+/* Index of `invalid' insn place holder. */
+#define CGEN_INSN_INVALID MEP_INSN_INVALID
+
+/* Total number of insns in table. */
+#define MAX_INSNS ((int) MEP_INSN_CMOVC_RM_CCRN + 1)
+
+/* This struct records data prior to insertion or after extraction. */
+struct cgen_fields
+{
+ int length;
+ long f_nil;
+ long f_anyof;
+ long f_major;
+ long f_rn;
+ long f_rn3;
+ long f_rm;
+ long f_rl;
+ long f_sub2;
+ long f_sub3;
+ long f_sub4;
+ long f_ext;
+ long f_crn;
+ long f_csrn_hi;
+ long f_csrn_lo;
+ long f_csrn;
+ long f_crnx_hi;
+ long f_crnx_lo;
+ long f_crnx;
+ long f_0;
+ long f_1;
+ long f_2;
+ long f_3;
+ long f_4;
+ long f_5;
+ long f_6;
+ long f_7;
+ long f_8;
+ long f_9;
+ long f_10;
+ long f_11;
+ long f_12;
+ long f_13;
+ long f_14;
+ long f_15;
+ long f_16;
+ long f_17;
+ long f_18;
+ long f_19;
+ long f_20;
+ long f_21;
+ long f_22;
+ long f_23;
+ long f_24;
+ long f_25;
+ long f_26;
+ long f_27;
+ long f_28;
+ long f_29;
+ long f_30;
+ long f_31;
+ long f_8s8a2;
+ long f_12s4a2;
+ long f_17s16a2;
+ long f_24s5a2n_hi;
+ long f_24s5a2n_lo;
+ long f_24s5a2n;
+ long f_24u5a2n_hi;
+ long f_24u5a2n_lo;
+ long f_24u5a2n;
+ long f_2u6;
+ long f_7u9;
+ long f_7u9a2;
+ long f_7u9a4;
+ long f_16s16;
+ long f_2u10;
+ long f_3u5;
+ long f_4u8;
+ long f_5u8;
+ long f_5u24;
+ long f_6s8;
+ long f_8s8;
+ long f_16u16;
+ long f_12u16;
+ long f_3u29;
+ long f_8s24;
+ long f_8s24a2;
+ long f_8s24a4;
+ long f_8s24a8;
+ long f_24u8a4n_hi;
+ long f_24u8a4n_lo;
+ long f_24u8a4n;
+ long f_24u8n_hi;
+ long f_24u8n_lo;
+ long f_24u8n;
+ long f_24u4n_hi;
+ long f_24u4n_lo;
+ long f_24u4n;
+ long f_callnum;
+ long f_ccrn_hi;
+ long f_ccrn_lo;
+ long f_ccrn;
+ long f_fmax_0_4;
+ long f_fmax_4_4;
+ long f_fmax_8_4;
+ long f_fmax_12_4;
+ long f_fmax_16_4;
+ long f_fmax_20_4;
+ long f_fmax_24_4;
+ long f_fmax_28_1;
+ long f_fmax_29_1;
+ long f_fmax_30_1;
+ long f_fmax_31_1;
+ long f_fmax_frd;
+ long f_fmax_frn;
+ long f_fmax_frm;
+ long f_fmax_rm;
+};
+
+#define CGEN_INIT_PARSE(od) \
+{\
+}
+#define CGEN_INIT_INSERT(od) \
+{\
+}
+#define CGEN_INIT_EXTRACT(od) \
+{\
+}
+#define CGEN_INIT_PRINT(od) \
+{\
+}
+
+
+#endif /* MEP_OPC_H */
diff --git a/contrib/binutils/opcodes/mips-dis.c b/contrib/binutils/opcodes/mips-dis.c
index 2329a9f..b8e2257 100644
--- a/contrib/binutils/opcodes/mips-dis.c
+++ b/contrib/binutils/opcodes/mips-dis.c
@@ -58,12 +58,15 @@ struct mips_cp0sel_name
const char * const name;
};
-/* The mips16 register names. */
-static const char * const mips16_reg_names[] =
+/* The mips16 registers. */
+static const unsigned int mips16_to_32_reg_map[] =
{
- "s0", "s1", "v0", "v1", "a0", "a1", "a2", "a3"
+ 16, 17, 2, 3, 4, 5, 6, 7
};
+#define mips16_reg_names(rn) mips_gpr_names[mips16_to_32_reg_map[rn]]
+
+
static const char * const mips_gpr_names_numeric[32] =
{
"$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7",
@@ -188,7 +191,28 @@ static const char * const mips_cp0_names_mips3264r2[32] =
static const struct mips_cp0sel_name mips_cp0sel_names_mips3264r2[] =
{
{ 4, 1, "c0_contextconfig" },
+ { 0, 1, "c0_mvpcontrol" },
+ { 0, 2, "c0_mvpconf0" },
+ { 0, 3, "c0_mvpconf1" },
+ { 1, 1, "c0_vpecontrol" },
+ { 1, 2, "c0_vpeconf0" },
+ { 1, 3, "c0_vpeconf1" },
+ { 1, 4, "c0_yqmask" },
+ { 1, 5, "c0_vpeschedule" },
+ { 1, 6, "c0_vpeschefback" },
+ { 2, 1, "c0_tcstatus" },
+ { 2, 2, "c0_tcbind" },
+ { 2, 3, "c0_tcrestart" },
+ { 2, 4, "c0_tchalt" },
+ { 2, 5, "c0_tccontext" },
+ { 2, 6, "c0_tcschedule" },
+ { 2, 7, "c0_tcschefback" },
{ 5, 1, "c0_pagegrain" },
+ { 6, 1, "c0_srsconf0" },
+ { 6, 2, "c0_srsconf1" },
+ { 6, 3, "c0_srsconf2" },
+ { 6, 4, "c0_srsconf3" },
+ { 6, 5, "c0_srsconf4" },
{ 12, 1, "c0_intctl" },
{ 12, 2, "c0_srsctl" },
{ 12, 3, "c0_srsmap" },
@@ -407,26 +431,28 @@ const struct mips_arch_choice mips_arch_choices[] =
MIPS32 Architecture_ (MIPS Document Number MD00082, Revision 0.95),
page 1. */
{ "mips32", 1, bfd_mach_mipsisa32, CPU_MIPS32,
- ISA_MIPS32 | INSN_MIPS16 | INSN_DSP,
+ ISA_MIPS32 | INSN_MIPS16 | INSN_SMARTMIPS,
mips_cp0_names_mips3264,
mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264),
mips_hwr_names_numeric },
{ "mips32r2", 1, bfd_mach_mipsisa32r2, CPU_MIPS32R2,
- ISA_MIPS32R2 | INSN_MIPS16 | INSN_DSP | INSN_MT,
+ (ISA_MIPS32R2 | INSN_MIPS16 | INSN_SMARTMIPS | INSN_DSP | INSN_DSPR2
+ | INSN_MIPS3D | INSN_MT),
mips_cp0_names_mips3264r2,
mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
mips_hwr_names_mips3264r2 },
/* For stock MIPS64, disassemble all applicable MIPS-specified ASEs. */
{ "mips64", 1, bfd_mach_mipsisa64, CPU_MIPS64,
- ISA_MIPS64 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX | INSN_DSP,
+ ISA_MIPS64 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX,
mips_cp0_names_mips3264,
mips_cp0sel_names_mips3264, ARRAY_SIZE (mips_cp0sel_names_mips3264),
mips_hwr_names_numeric },
{ "mips64r2", 1, bfd_mach_mipsisa64r2, CPU_MIPS64R2,
- ISA_MIPS64R2 | INSN_MIPS16 | INSN_MIPS3D | INSN_MDMX | INSN_DSP,
+ (ISA_MIPS64R2 | INSN_MIPS16 | INSN_MIPS3D | INSN_DSP | INSN_DSPR2
+ | INSN_DSP64 | INSN_MT | INSN_MDMX),
mips_cp0_names_mips3264r2,
mips_cp0sel_names_mips3264r2, ARRAY_SIZE (mips_cp0sel_names_mips3264r2),
mips_hwr_names_mips3264r2 },
@@ -602,7 +628,7 @@ parse_mips_dis_option (const char *option, unsigned int len)
}
/* Try to match options that are simple flags */
- if (strncmp (option, "no-aliases", 10) == 0)
+ if (CONST_STRNEQ (option, "no-aliases"))
{
no_aliases = 1;
return;
@@ -741,7 +767,8 @@ static void
print_insn_args (const char *d,
register unsigned long int l,
bfd_vma pc,
- struct disassemble_info *info)
+ struct disassemble_info *info,
+ const struct mips_opcode *opp)
{
int op, delta;
unsigned int lsb, msb, msbd;
@@ -781,6 +808,26 @@ print_insn_args (const char *d,
(*info->fprintf_func) (info->stream, "0x%x", msb - lsb + 1);
break;
+ case '1':
+ (*info->fprintf_func) (info->stream, "0x%lx",
+ (l >> OP_SH_UDI1) & OP_MASK_UDI1);
+ break;
+
+ case '2':
+ (*info->fprintf_func) (info->stream, "0x%lx",
+ (l >> OP_SH_UDI2) & OP_MASK_UDI2);
+ break;
+
+ case '3':
+ (*info->fprintf_func) (info->stream, "0x%lx",
+ (l >> OP_SH_UDI3) & OP_MASK_UDI3);
+ break;
+
+ case '4':
+ (*info->fprintf_func) (info->stream, "0x%lx",
+ (l >> OP_SH_UDI4) & OP_MASK_UDI4);
+ break;
+
case 'C':
case 'H':
msbd = (l >> OP_SH_EXTMSBD) & OP_MASK_EXTMSBD;
@@ -861,6 +908,11 @@ print_insn_args (const char *d,
}
break;
+ case '2':
+ (*info->fprintf_func) (info->stream, "0x%lx",
+ (l >> OP_SH_BP) & OP_MASK_BP);
+ break;
+
case '3':
(*info->fprintf_func) (info->stream, "0x%lx",
(l >> OP_SH_SA3) & OP_MASK_SA3);
@@ -992,6 +1044,10 @@ print_insn_args (const char *d,
case 'a':
info->target = (((pc + 4) & ~(bfd_vma) 0x0fffffff)
| (((l >> OP_SH_TARGET) & OP_MASK_TARGET) << 2));
+ /* For gdb disassembler, force odd address on jalx. */
+ if (info->flavour == bfd_target_unknown_flavour
+ && strcmp (opp->name, "jalx") == 0)
+ info->target |= 1;
(*info->print_address_func) (info->target, info);
break;
@@ -1138,7 +1194,9 @@ print_insn_args (const char *d,
break;
case 'N':
- (*info->fprintf_func) (info->stream, "$fcc%ld",
+ (*info->fprintf_func) (info->stream,
+ ((opp->pinfo & (FP_D | FP_S)) != 0
+ ? "$fcc%ld" : "$cc%ld"),
(l >> OP_SH_BCC) & OP_MASK_BCC);
break;
@@ -1337,7 +1395,7 @@ print_insn_mips (bfd_vma memaddr,
if (d != NULL && *d != '\0')
{
(*info->fprintf_func) (info->stream, "\t");
- print_insn_args (d, word, memaddr, info);
+ print_insn_args (d, word, memaddr, info, op);
}
return INSNLEN;
@@ -1373,27 +1431,27 @@ print_mips16_insn_arg (char type,
case 'y':
case 'w':
(*info->fprintf_func) (info->stream, "%s",
- mips16_reg_names[((l >> MIPS16OP_SH_RY)
- & MIPS16OP_MASK_RY)]);
+ mips16_reg_names(((l >> MIPS16OP_SH_RY)
+ & MIPS16OP_MASK_RY)));
break;
case 'x':
case 'v':
(*info->fprintf_func) (info->stream, "%s",
- mips16_reg_names[((l >> MIPS16OP_SH_RX)
- & MIPS16OP_MASK_RX)]);
+ mips16_reg_names(((l >> MIPS16OP_SH_RX)
+ & MIPS16OP_MASK_RX)));
break;
case 'z':
(*info->fprintf_func) (info->stream, "%s",
- mips16_reg_names[((l >> MIPS16OP_SH_RZ)
- & MIPS16OP_MASK_RZ)]);
+ mips16_reg_names(((l >> MIPS16OP_SH_RZ)
+ & MIPS16OP_MASK_RZ)));
break;
case 'Z':
(*info->fprintf_func) (info->stream, "%s",
- mips16_reg_names[((l >> MIPS16OP_SH_MOVE32Z)
- & MIPS16OP_MASK_MOVE32Z)]);
+ mips16_reg_names(((l >> MIPS16OP_SH_MOVE32Z)
+ & MIPS16OP_MASK_MOVE32Z)));
break;
case '0':
@@ -1675,15 +1733,26 @@ print_mips16_insn_arg (char type,
}
}
info->target = (baseaddr & ~((1 << shift) - 1)) + immed;
+ if (pcrel && branch
+ && info->flavour == bfd_target_unknown_flavour)
+ /* For gdb disassembler, maintain odd address. */
+ info->target |= 1;
(*info->print_address_func) (info->target, info);
}
}
break;
case 'a':
- if (! use_extend)
- extend = 0;
- l = ((l & 0x1f) << 23) | ((l & 0x3e0) << 13) | (extend << 2);
+ {
+ int jalx = l & 0x400;
+
+ if (! use_extend)
+ extend = 0;
+ l = ((l & 0x1f) << 23) | ((l & 0x3e0) << 13) | (extend << 2);
+ if (!jalx && info->flavour == bfd_target_unknown_flavour)
+ /* For gdb disassembler, maintain odd address. */
+ l |= 1;
+ }
info->target = ((memaddr + 4) & ~(bfd_vma) 0x0fffffff) | l;
(*info->print_address_func) (info->target, info);
info->insn_type = dis_jsr;
diff --git a/contrib/binutils/opcodes/mips-opc.c b/contrib/binutils/opcodes/mips-opc.c
index 145b254..69a6b75 100644
--- a/contrib/binutils/opcodes/mips-opc.c
+++ b/contrib/binutils/opcodes/mips-opc.c
@@ -92,12 +92,15 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US
/* Octeon specific instructions. */
#define IOCTEON INSN_OCTEON
-/* MIPS64 MIPS-3D ASE support. */
+/* MIPS16 ASE support. */
#define I16 INSN_MIPS16
/* MIPS64 MIPS-3D ASE support. */
#define M3D INSN_MIPS3D
+/* MIPS32 SmartMIPS ASE support. */
+#define SMT INSN_SMARTMIPS
+
/* MIPS64 MDMX ASE support. */
#define MX INSN_MDMX
@@ -128,29 +131,31 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US
of original HI and LO. $ac1, $ac2 and $ac3 are new registers, and have
the same structure as $ac0 (HI + LO). For DSP instructions that write or
read accumulators (that may be $ac0), we add WR_a (WR_HILO) or RD_a
- (RD_HILO) attritubes, such that HILO dependences are maintained
+ (RD_HILO) attributes, such that HILO dependencies are maintained
conservatively.
2. For some mul. instructions that use integer registers as destinations
- but destroy HI+LO as side-effect, we add WR_HILO to their attritubes.
+ but destroy HI+LO as side-effect, we add WR_HILO to their attributes.
3. MIPS DSP ASE includes a new DSP control register, which has 6 fields
(ccond, outflag, EFI, c, scount, pos). Many DSP instructions read or write
certain fields of the DSP control register. For simplicity, we decide not
- to track dependences of these fields.
+ to track dependencies of these fields.
However, "bposge32" is a branch instruction that depends on the "pos"
field. In order to make sure that GAS does not reorder DSP instructions
that writes the "pos" field and "bposge32", we add DSP_VOLA (INSN_TRAP)
- attritube to those instructions that write the "pos" field. */
+ attribute to those instructions that write the "pos" field. */
#define WR_a WR_HILO /* Write dsp accumulators (reuse WR_HILO) */
#define RD_a RD_HILO /* Read dsp accumulators (reuse RD_HILO) */
#define MOD_a WR_a|RD_a
#define DSP_VOLA INSN_TRAP
-#define D32 (INSN_DSP)
+#define D32 INSN_DSP
+#define D33 INSN_DSPR2
+#define D64 INSN_DSP64
/* MIPS MT ASE support. */
-#define MT32 (INSN_MT)
+#define MT32 INSN_MT
/* The order of overloaded instructions matters. Label arguments and
register arguments look the same. Instructions that can have either
@@ -190,7 +195,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"abs", "d,v", 0, (int) M_ABS, INSN_MACRO, 0, I1 },
{"abs.s", "D,V", 0x46000005, 0xffff003f, WR_D|RD_S|FP_S, 0, I1 },
{"abs.d", "D,V", 0x46200005, 0xffff003f, WR_D|RD_S|FP_D, 0, I1 },
-{"abs.ps", "D,V", 0x46c00005, 0xffff003f, WR_D|RD_S|FP_D, 0, I5 },
+{"abs.ps", "D,V", 0x46c00005, 0xffff003f, WR_D|RD_S|FP_D, 0, I5|I33 },
{"add", "d,v,t", 0x00000020, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I1 },
{"add", "t,r,I", 0, (int) M_ADD_I, INSN_MACRO, 0, I1 },
{"add.s", "D,V,T", 0x46000000, 0xffe0003f, WR_D|RD_S|RD_T|FP_S, 0, I1 },
@@ -199,7 +204,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"add.ob", "D,S,T", 0x4ac0000b, 0xffe0003f, WR_D|RD_S|RD_T, 0, N54 },
{"add.ob", "D,S,T[e]", 0x4800000b, 0xfe20003f, WR_D|RD_S|RD_T, 0, N54 },
{"add.ob", "D,S,k", 0x4bc0000b, 0xffe0003f, WR_D|RD_S|RD_T, 0, N54 },
-{"add.ps", "D,V,T", 0x46c00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
+{"add.ps", "D,V,T", 0x46c00000, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5|I33 },
{"add.qh", "X,Y,Q", 0x7820000b, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX },
{"adda.ob", "Y,Q", 0x78000037, 0xfc2007ff, RD_S|RD_T|FP_D, WR_MACC, MX|SB1 },
{"adda.qh", "Y,Q", 0x78200037, 0xfc2007ff, RD_S|RD_T|FP_D, WR_MACC, MX },
@@ -213,7 +218,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"alni.ob", "X,Y,Z,O", 0x78000018, 0xff00003f, WR_D|RD_S|RD_T|FP_D, 0, MX|SB1 },
{"alni.ob", "D,S,T,%", 0x48000018, 0xff00003f, WR_D|RD_S|RD_T, 0, N54 },
{"alni.qh", "X,Y,Z,O", 0x7800001a, 0xff00003f, WR_D|RD_S|RD_T|FP_D, 0, MX },
-{"alnv.ps", "D,V,T,s", 0x4c00001e, 0xfc00003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
+{"alnv.ps", "D,V,T,s", 0x4c00001e, 0xfc00003f, WR_D|RD_S|RD_T|FP_D, 0, I5|I33 },
{"alnv.ob", "X,Y,Z,s", 0x78000019, 0xfc00003f, WR_D|RD_S|RD_T|RD_s|FP_D, 0, MX|SB1 },
{"alnv.qh", "X,Y,Z,s", 0x7800001b, 0xfc00003f, WR_D|RD_S|RD_T|RD_s|FP_D, 0, MX },
{"and", "d,v,t", 0x00000024, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I1 },
@@ -247,10 +252,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"bc1tl", "p", 0x45030000, 0xffff0000, CBL|RD_CC|FP_S, 0, I2|T3 },
{"bc1tl", "N,p", 0x45030000, 0xffe30000, CBL|RD_CC|FP_S, 0, I4|I32 },
/* bc2* are at the bottom of the table. */
-{"bc3f", "p", 0x4d000000, 0xffff0000, CBD|RD_CC, 0, I1 },
-{"bc3fl", "p", 0x4d020000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
-{"bc3t", "p", 0x4d010000, 0xffff0000, CBD|RD_CC, 0, I1 },
-{"bc3tl", "p", 0x4d030000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
+/* bc3* are at the bottom of the table. */
{"beqz", "s,p", 0x10000000, 0xfc1f0000, CBD|RD_s, 0, I1 },
{"beqzl", "s,p", 0x50000000, 0xfc1f0000, CBL|RD_s, 0, I2|T3 },
{"beq", "s,t,p", 0x10000000, 0xfc000000, CBD|RD_s|RD_t, 0, I1 },
@@ -314,14 +316,14 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"c.f.d", "M,S,T", 0x46200030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.f.s", "S,T", 0x46000030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.f.s", "M,S,T", 0x46000030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.f.ps", "S,T", 0x46c00030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.f.ps", "M,S,T", 0x46c00030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.f.ps", "S,T", 0x46c00030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.f.ps", "M,S,T", 0x46c00030, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.un.d", "S,T", 0x46200031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.un.d", "M,S,T", 0x46200031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.un.s", "S,T", 0x46000031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.un.s", "M,S,T", 0x46000031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.un.ps", "S,T", 0x46c00031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.un.ps", "M,S,T", 0x46c00031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.un.ps", "S,T", 0x46c00031, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.un.ps", "M,S,T", 0x46c00031, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.eq.d", "S,T", 0x46200032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.eq.d", "M,S,T", 0x46200032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.eq.s", "S,T", 0x46000032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
@@ -330,63 +332,63 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"c.eq.ob", "S,T", 0x4ac00001, 0xffe007ff, WR_CC|RD_S|RD_T, 0, N54 },
{"c.eq.ob", "S,T[e]", 0x48000001, 0xfe2007ff, WR_CC|RD_S|RD_T, 0, N54 },
{"c.eq.ob", "S,k", 0x4bc00001, 0xffe007ff, WR_CC|RD_S|RD_T, 0, N54 },
-{"c.eq.ps", "S,T", 0x46c00032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.eq.ps", "M,S,T", 0x46c00032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.eq.ps", "S,T", 0x46c00032, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.eq.ps", "M,S,T", 0x46c00032, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.eq.qh", "Y,Q", 0x78200001, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, 0, MX },
{"c.ueq.d", "S,T", 0x46200033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.ueq.d", "M,S,T", 0x46200033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.ueq.s", "S,T", 0x46000033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.ueq.s", "M,S,T", 0x46000033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.ueq.ps","S,T", 0x46c00033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.ueq.ps","M,S,T", 0x46c00033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.ueq.ps","S,T", 0x46c00033, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.ueq.ps","M,S,T", 0x46c00033, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.olt.d", "S,T", 0x46200034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.olt.d", "M,S,T", 0x46200034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.olt.s", "S,T", 0x46000034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.olt.s", "M,S,T", 0x46000034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.olt.ps","S,T", 0x46c00034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.olt.ps","M,S,T", 0x46c00034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.olt.ps","S,T", 0x46c00034, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.olt.ps","M,S,T", 0x46c00034, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.ult.d", "S,T", 0x46200035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.ult.d", "M,S,T", 0x46200035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.ult.s", "S,T", 0x46000035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.ult.s", "M,S,T", 0x46000035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.ult.ps","S,T", 0x46c00035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.ult.ps","M,S,T", 0x46c00035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.ult.ps","S,T", 0x46c00035, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.ult.ps","M,S,T", 0x46c00035, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.ole.d", "S,T", 0x46200036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.ole.d", "M,S,T", 0x46200036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.ole.s", "S,T", 0x46000036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.ole.s", "M,S,T", 0x46000036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.ole.ps","S,T", 0x46c00036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.ole.ps","M,S,T", 0x46c00036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.ole.ps","S,T", 0x46c00036, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.ole.ps","M,S,T", 0x46c00036, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.ule.d", "S,T", 0x46200037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.ule.d", "M,S,T", 0x46200037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.ule.s", "S,T", 0x46000037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.ule.s", "M,S,T", 0x46000037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.ule.ps","S,T", 0x46c00037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.ule.ps","M,S,T", 0x46c00037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.ule.ps","S,T", 0x46c00037, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.ule.ps","M,S,T", 0x46c00037, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.sf.d", "S,T", 0x46200038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.sf.d", "M,S,T", 0x46200038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.sf.s", "S,T", 0x46000038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.sf.s", "M,S,T", 0x46000038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.sf.ps", "S,T", 0x46c00038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.sf.ps", "M,S,T", 0x46c00038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.sf.ps", "S,T", 0x46c00038, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.sf.ps", "M,S,T", 0x46c00038, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.ngle.d","S,T", 0x46200039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.ngle.d","M,S,T", 0x46200039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.ngle.s","S,T", 0x46000039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.ngle.s","M,S,T", 0x46000039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.ngle.ps","S,T", 0x46c00039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.ngle.ps","M,S,T", 0x46c00039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.ngle.ps","S,T", 0x46c00039, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.ngle.ps","M,S,T", 0x46c00039, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.seq.d", "S,T", 0x4620003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.seq.d", "M,S,T", 0x4620003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.seq.s", "S,T", 0x4600003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.seq.s", "M,S,T", 0x4600003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.seq.ps","S,T", 0x46c0003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.seq.ps","M,S,T", 0x46c0003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.seq.ps","S,T", 0x46c0003a, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.seq.ps","M,S,T", 0x46c0003a, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.ngl.d", "S,T", 0x4620003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.ngl.d", "M,S,T", 0x4620003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.ngl.s", "S,T", 0x4600003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.ngl.s", "M,S,T", 0x4600003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.ngl.ps","S,T", 0x46c0003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.ngl.ps","M,S,T", 0x46c0003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.ngl.ps","S,T", 0x46c0003b, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.ngl.ps","M,S,T", 0x46c0003b, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.lt.d", "S,T", 0x4620003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.lt.d", "M,S,T", 0x4620003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.lt.s", "S,T", 0x4600003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
@@ -395,15 +397,15 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"c.lt.ob", "S,T", 0x4ac00004, 0xffe007ff, WR_CC|RD_S|RD_T, 0, N54 },
{"c.lt.ob", "S,T[e]", 0x48000004, 0xfe2007ff, WR_CC|RD_S|RD_T, 0, N54 },
{"c.lt.ob", "S,k", 0x4bc00004, 0xffe007ff, WR_CC|RD_S|RD_T, 0, N54 },
-{"c.lt.ps", "S,T", 0x46c0003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.lt.ps", "M,S,T", 0x46c0003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.lt.ps", "S,T", 0x46c0003c, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.lt.ps", "M,S,T", 0x46c0003c, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.lt.qh", "Y,Q", 0x78200004, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, 0, MX },
{"c.nge.d", "S,T", 0x4620003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.nge.d", "M,S,T", 0x4620003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.nge.s", "S,T", 0x4600003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.nge.s", "M,S,T", 0x4600003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.nge.ps","S,T", 0x46c0003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.nge.ps","M,S,T", 0x46c0003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.nge.ps","S,T", 0x46c0003d, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.nge.ps","M,S,T", 0x46c0003d, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.le.d", "S,T", 0x4620003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.le.d", "M,S,T", 0x4620003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.le.s", "S,T", 0x4600003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
@@ -412,15 +414,15 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"c.le.ob", "S,T", 0x4ac00005, 0xffe007ff, WR_CC|RD_S|RD_T, 0, N54 },
{"c.le.ob", "S,T[e]", 0x48000005, 0xfe2007ff, WR_CC|RD_S|RD_T, 0, N54 },
{"c.le.ob", "S,k", 0x4bc00005, 0xffe007ff, WR_CC|RD_S|RD_T, 0, N54 },
-{"c.le.ps", "S,T", 0x46c0003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.le.ps", "M,S,T", 0x46c0003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.le.ps", "S,T", 0x46c0003e, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.le.ps", "M,S,T", 0x46c0003e, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"c.le.qh", "Y,Q", 0x78200005, 0xfc2007ff, WR_CC|RD_S|RD_T|FP_D, 0, MX },
{"c.ngt.d", "S,T", 0x4620003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I1 },
{"c.ngt.d", "M,S,T", 0x4620003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I4|I32 },
{"c.ngt.s", "S,T", 0x4600003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_S, 0, I1 },
{"c.ngt.s", "M,S,T", 0x4600003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, I4|I32 },
-{"c.ngt.ps","S,T", 0x46c0003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
-{"c.ngt.ps","M,S,T", 0x46c0003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5 },
+{"c.ngt.ps","S,T", 0x46c0003f, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
+{"c.ngt.ps","M,S,T", 0x46c0003f, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, I5|I33 },
{"cabs.eq.d", "M,S,T", 0x46200072, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, M3D },
{"cabs.eq.ps", "M,S,T", 0x46c00072, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, M3D },
{"cabs.eq.s", "M,S,T", 0x46000072, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, M3D },
@@ -469,7 +471,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"cabs.un.d", "M,S,T", 0x46200071, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, M3D },
{"cabs.un.ps", "M,S,T", 0x46c00071, 0xffe000ff, RD_S|RD_T|WR_CC|FP_D, 0, M3D },
{"cabs.un.s", "M,S,T", 0x46000071, 0xffe000ff, RD_S|RD_T|WR_CC|FP_S, 0, M3D },
+/* CW4010 instructions which are aliases for the cache instruction. */
+{"flushi", "", 0xbc010000, 0xffffffff, 0, 0, L1 },
+{"flushd", "", 0xbc020000, 0xffffffff, 0, 0, L1 },
+{"flushid", "", 0xbc030000, 0xffffffff, 0, 0, L1 },
+{"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, 0, L1 },
{"cache", "k,o(b)", 0xbc000000, 0xfc000000, RD_b, 0, I3|I32|T3},
+{"cache", "k,A(b)", 0, (int) M_CACHE_AB, INSN_MACRO, 0, I3|I32|T3},
{"ceil.l.d", "D,S", 0x4620000a, 0xffff003f, WR_D|RD_S|FP_D, 0, I3|I33 },
{"ceil.l.s", "D,S", 0x4600000a, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3|I33 },
{"ceil.w.d", "D,S", 0x4620000e, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I2 },
@@ -478,7 +486,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"cfc1", "t,G", 0x44400000, 0xffe007ff, LCD|WR_t|RD_C1|FP_S, 0, I1 },
{"cfc1", "t,S", 0x44400000, 0xffe007ff, LCD|WR_t|RD_C1|FP_S, 0, I1 },
/* cfc2 is at the bottom of the table. */
-{"cfc3", "t,G", 0x4c400000, 0xffe007ff, LCD|WR_t|RD_C3, 0, I1 },
+/* cfc3 is at the bottom of the table. */
{"cftc1", "d,E", 0x41000023, 0xffe007ff, TRAP|LCD|WR_d|RD_C1|FP_S, 0, MT32 },
{"cftc1", "d,T", 0x41000023, 0xffe007ff, TRAP|LCD|WR_d|RD_C1|FP_S, 0, MT32 },
{"cftc2", "d,E", 0x41000025, 0xffe007ff, TRAP|LCD|WR_d|RD_C2, 0, MT32 },
@@ -491,7 +499,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"ctc1", "t,G", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, 0, I1 },
{"ctc1", "t,S", 0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S, 0, I1 },
/* ctc2 is at the bottom of the table. */
-{"ctc3", "t,G", 0x4cc00000, 0xffe007ff, COD|RD_t|WR_CC, 0, I1 },
+/* ctc3 is at the bottom of the table. */
{"cttc1", "t,g", 0x41800023, 0xffe007ff, TRAP|COD|RD_t|WR_CC|FP_S, 0, MT32 },
{"cttc1", "t,S", 0x41800023, 0xffe007ff, TRAP|COD|RD_t|WR_CC|FP_S, 0, MT32 },
{"cttc2", "t,g", 0x41800025, 0xffe007ff, TRAP|COD|RD_t|WR_CC, 0, MT32 },
@@ -499,16 +507,16 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"cvt.d.s", "D,S", 0x46000021, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I1 },
{"cvt.d.w", "D,S", 0x46800021, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I1 },
{"cvt.l.d", "D,S", 0x46200025, 0xffff003f, WR_D|RD_S|FP_D, 0, I3|I33 },
-{"cvt.l.s", "D,S", 0x46000025, 0xffff003f, WR_D|RD_S|FP_S|FP_S, 0, I3|I33 },
-{"cvt.s.l", "D,S", 0x46a00020, 0xffff003f, WR_D|RD_S|FP_S|FP_S, 0, I3|I33 },
+{"cvt.l.s", "D,S", 0x46000025, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3|I33 },
+{"cvt.s.l", "D,S", 0x46a00020, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3|I33 },
{"cvt.s.d", "D,S", 0x46200020, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I1 },
{"cvt.s.w", "D,S", 0x46800020, 0xffff003f, WR_D|RD_S|FP_S, 0, I1 },
-{"cvt.s.pl","D,S", 0x46c00028, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I5 },
-{"cvt.s.pu","D,S", 0x46c00020, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I5 },
+{"cvt.s.pl","D,S", 0x46c00028, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I5|I33 },
+{"cvt.s.pu","D,S", 0x46c00020, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I5|I33 },
{"cvt.w.d", "D,S", 0x46200024, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I1 },
{"cvt.w.s", "D,S", 0x46000024, 0xffff003f, WR_D|RD_S|FP_S, 0, I1 },
{"cvt.ps.pw", "D,S", 0x46800026, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, M3D },
-{"cvt.ps.s","D,V,T", 0x46000026, 0xffe0003f, WR_D|RD_S|RD_T|FP_S|FP_D, 0, I5 },
+{"cvt.ps.s","D,V,T", 0x46000026, 0xffe0003f, WR_D|RD_S|RD_T|FP_S|FP_D, 0, I5|I33 },
{"cvt.pw.ps", "D,S", 0x46c00024, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, M3D },
{"dabs", "d,v", 0, (int) M_DABS, INSN_MACRO, 0, I3 },
{"dadd", "d,v,t", 0x0000002c, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I3 },
@@ -586,10 +594,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dmtc1", "t,G", 0x44a00000, 0xffe007ff, COD|RD_t|WR_S|FP_D, 0, I3 },
/* dmfc2 is at the bottom of the table. */
/* dmtc2 is at the bottom of the table. */
-{"dmfc3", "t,G", 0x4c200000, 0xffe007ff, LCD|WR_t|RD_C3, 0, I3 },
-{"dmfc3", "t,G,H", 0x4c200000, 0xffe007f8, LCD|WR_t|RD_C3, 0, I64 },
-{"dmtc3", "t,G", 0x4ca00000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, 0, I3 },
-{"dmtc3", "t,G,H", 0x4ca00000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, 0, I64 },
+/* dmfc3 is at the bottom of the table. */
+/* dmtc3 is at the bottom of the table. */
{"dmul", "d,v,t", 0x70000003, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, IOCTEON },
{"dmul", "d,v,t", 0, (int) M_DMUL, INSN_MACRO, 0, I3 },
{"dmul", "d,v,I", 0, (int) M_DMUL_I, INSN_MACRO, 0, I3 },
@@ -657,16 +663,15 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"exts", "t,r,>,h", 0x7000003b, 0xfc00003f, WR_t|RD_s, 0, IOCTEON }, /* exts32 */
{"exts", "t,r,<,h", 0x7000003a, 0xfc00003f, WR_t|RD_s, 0, IOCTEON },
{"floor.l.d", "D,S", 0x4620000b, 0xffff003f, WR_D|RD_S|FP_D, 0, I3|I33 },
-{"floor.l.s", "D,S", 0x4600000b, 0xffff003f, WR_D|RD_S|FP_S|FP_S, 0, I3|I33 },
+{"floor.l.s", "D,S", 0x4600000b, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3|I33 },
{"floor.w.d", "D,S", 0x4620000f, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I2 },
{"floor.w.s", "D,S", 0x4600000f, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 },
-{"flushi", "", 0xbc010000, 0xffffffff, 0, 0, L1 },
-{"flushd", "", 0xbc020000, 0xffffffff, 0, 0, L1 },
-{"flushid", "", 0xbc030000, 0xffffffff, 0, 0, L1 },
{"hibernate","", 0x42000023, 0xffffffff, 0, 0, V1 },
{"ins", "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s, 0, I33 },
{"jr", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 },
-{"jr.hb", "s", 0x00000408, 0xfc1fffff, UBD|RD_s, 0, I33 },
+/* jr.hb is officially MIPS{32,64}R2, but it works on R1 as jr with
+ the same hazard barrier effect. */
+{"jr.hb", "s", 0x00000408, 0xfc1fffff, UBD|RD_s, 0, I32 },
{"j", "s", 0x00000008, 0xfc1fffff, UBD|RD_s, 0, I1 }, /* jr */
/* SVR4 PIC code requires special handling for j, so it must be a
macro. */
@@ -677,8 +682,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"j", "a", 0x08000000, 0xfc000000, UBD, 0, I1 },
{"jalr", "s", 0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d, 0, I1 },
{"jalr", "d,s", 0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d, 0, I1 },
-{"jalr.hb", "s", 0x0000fc09, 0xfc1fffff, UBD|RD_s|WR_d, 0, I33 },
-{"jalr.hb", "d,s", 0x00000409, 0xfc1f07ff, UBD|RD_s|WR_d, 0, I33 },
+/* jalr.hb is officially MIPS{32,64}R2, but it works on R1 as jalr
+ with the same hazard barrier effect. */
+{"jalr.hb", "s", 0x0000fc09, 0xfc1fffff, UBD|RD_s|WR_d, 0, I32 },
+{"jalr.hb", "d,s", 0x00000409, 0xfc1f07ff, UBD|RD_s|WR_d, 0, I32 },
/* SVR4 PIC code requires special handling for jal, so it must be a
macro. */
{"jal", "d,s", 0, (int) M_JAL_2, INSN_MACRO, 0, I1 },
@@ -728,7 +735,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"lld", "t,o(b)", 0xd0000000, 0xfc000000, LDD|RD_b|WR_t, 0, I3 },
{"lld", "t,A(b)", 0, (int) M_LLD_AB, INSN_MACRO, 0, I3 },
{"lui", "t,u", 0x3c000000, 0xffe00000, WR_t, 0, I1 },
-{"luxc1", "D,t(b)", 0x4c000005, 0xfc00f83f, LDD|WR_D|RD_t|RD_b, 0, I5|N55 },
+{"luxc1", "D,t(b)", 0x4c000005, 0xfc00f83f, LDD|WR_D|RD_t|RD_b|FP_D, 0, I5|I33|N55},
{"lw", "t,o(b)", 0x8c000000, 0xfc000000, LDD|RD_b|WR_t, 0, I1 },
{"lw", "t,A(b)", 0, (int) M_LW_AB, INSN_MACRO, 0, I1 },
{"lwc0", "E,o(b)", 0xc0000000, 0xfc000000, CLD|RD_b|WR_CC, 0, I1 },
@@ -755,6 +762,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"lwu", "t,o(b)", 0x9c000000, 0xfc000000, LDD|RD_b|WR_t, 0, I3 },
{"lwu", "t,A(b)", 0, (int) M_LWU_AB, INSN_MACRO, 0, I3 },
{"lwxc1", "D,t(b)", 0x4c000000, 0xfc00f83f, LDD|WR_D|RD_t|RD_b|FP_D, 0, I4|I33 },
+{"lwxs", "d,t(b)", 0x70000088, 0xfc0007ff, LDD|RD_b|RD_t|WR_d, 0, SMT },
{"macc", "d,s,t", 0x00000028, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0, N412 },
{"macc", "d,s,t", 0x00000158, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0, N5 },
{"maccs", "d,s,t", 0x00000428, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0, N412 },
@@ -771,14 +779,17 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"madu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, P3 },
{"madd.d", "D,R,S,T", 0x4c000021, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I4|I33 },
{"madd.s", "D,R,S,T", 0x4c000020, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, 0, I4|I33 },
-{"madd.ps", "D,R,S,T", 0x4c000026, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5 },
-{"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
-{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55},
-{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
-{"madd", "d,s,t", 0x70000000, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
-{"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
-{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55},
+{"madd.ps", "D,R,S,T", 0x4c000026, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5|I33 },
+{"madd", "s,t", 0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
+{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
+{"madd", "s,t", 0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
+{"madd", "7,s,t", 0x70000000, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"madd", "d,s,t", 0x70000000, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
+{"maddp", "s,t", 0x70000441, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, SMT },
+{"maddu", "s,t", 0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
+{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
{"maddu", "s,t", 0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, G1 },
+{"maddu", "7,s,t", 0x70000001, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
{"maddu", "d,s,t", 0x70000001, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
{"madd16", "s,t", 0x00000028, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, N411 },
{"max.ob", "X,Y,Q", 0x78000007, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX|SB1 },
@@ -815,13 +826,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mfhc1", "t,G", 0x44600000, 0xffe007ff, LCD|WR_t|RD_S|FP_D, 0, I33 },
/* mfc2 is at the bottom of the table. */
/* mfhc2 is at the bottom of the table. */
-{"mfc3", "t,G", 0x4c000000, 0xffe007ff, LCD|WR_t|RD_C3, 0, I1 },
-{"mfc3", "t,G,H", 0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, 0, I32 },
+/* mfc3 is at the bottom of the table. */
{"mfdr", "t,G", 0x7000003d, 0xffe007ff, LCD|WR_t|RD_C0, 0, N5 },
{"mfhi", "d", 0x00000010, 0xffff07ff, WR_d|RD_HI, 0, I1 },
{"mfhi", "d,9", 0x00000010, 0xff9f07ff, WR_d|RD_HI, 0, D32 },
{"mflo", "d", 0x00000012, 0xffff07ff, WR_d|RD_LO, 0, I1 },
{"mflo", "d,9", 0x00000012, 0xff9f07ff, WR_d|RD_LO, 0, D32 },
+{"mflhxu", "d", 0x00000052, 0xffff07ff, WR_d|MOD_HILO, 0, SMT },
{"min.ob", "X,Y,Q", 0x78000006, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX|SB1 },
{"min.ob", "D,S,T", 0x4ac00006, 0xffe0003f, WR_D|RD_S|RD_T, 0, N54 },
{"min.ob", "D,S,T[e]", 0x48000006, 0xfe20003f, WR_D|RD_S|RD_T, 0, N54 },
@@ -829,33 +840,33 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"min.qh", "X,Y,Q", 0x78200006, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX },
{"mov.d", "D,S", 0x46200006, 0xffff003f, WR_D|RD_S|FP_D, 0, I1 },
{"mov.s", "D,S", 0x46000006, 0xffff003f, WR_D|RD_S|FP_S, 0, I1 },
-{"mov.ps", "D,S", 0x46c00006, 0xffff003f, WR_D|RD_S|FP_D, 0, I5 },
+{"mov.ps", "D,S", 0x46c00006, 0xffff003f, WR_D|RD_S|FP_D, 0, I5|I33 },
{"movf", "d,s,N", 0x00000001, 0xfc0307ff, WR_d|RD_s|RD_CC|FP_S|FP_D, 0, I4|I32 },
{"movf.d", "D,S,N", 0x46200011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I4|I32 },
{"movf.l", "D,S,N", 0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
{"movf.l", "X,Y,N", 0x46a00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
{"movf.s", "D,S,N", 0x46000011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, 0, I4|I32 },
-{"movf.ps", "D,S,N", 0x46c00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5 },
+{"movf.ps", "D,S,N", 0x46c00011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5|I33 },
{"movn", "d,v,t", 0x0000000b, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4|I32 },
{"ffc", "d,v", 0x0000000b, 0xfc1f07ff, WR_d|RD_s, 0, L1 },
{"movn.d", "D,S,t", 0x46200013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I4|I32 },
{"movn.l", "D,S,t", 0x46a00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, MX|SB1 },
{"movn.l", "X,Y,t", 0x46a00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, MX|SB1 },
{"movn.s", "D,S,t", 0x46000013, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, 0, I4|I32 },
-{"movn.ps", "D,S,t", 0x46c00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I5 },
+{"movn.ps", "D,S,t", 0x46c00013, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I5|I33 },
{"movt", "d,s,N", 0x00010001, 0xfc0307ff, WR_d|RD_s|RD_CC|FP_S|FP_D, 0, I4|I32 },
{"movt.d", "D,S,N", 0x46210011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I4|I32 },
{"movt.l", "D,S,N", 0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
{"movt.l", "X,Y,N", 0x46a10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, MX|SB1 },
{"movt.s", "D,S,N", 0x46010011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_S, 0, I4|I32 },
-{"movt.ps", "D,S,N", 0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5 },
+{"movt.ps", "D,S,N", 0x46c10011, 0xffe3003f, WR_D|RD_S|RD_CC|FP_D, 0, I5|I33 },
{"movz", "d,v,t", 0x0000000a, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I4|I32 },
{"ffs", "d,v", 0x0000000a, 0xfc1f07ff, WR_d|RD_s, 0, L1 },
{"movz.d", "D,S,t", 0x46200012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I4|I32 },
{"movz.l", "D,S,t", 0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, MX|SB1 },
{"movz.l", "X,Y,t", 0x46a00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, MX|SB1 },
{"movz.s", "D,S,t", 0x46000012, 0xffe0003f, WR_D|RD_S|RD_t|FP_S, 0, I4|I32 },
-{"movz.ps", "D,S,t", 0x46c00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I5 },
+{"movz.ps", "D,S,t", 0x46c00012, 0xffe0003f, WR_D|RD_S|RD_t|FP_D, 0, I5|I33 },
{"msac", "d,s,t", 0x000001d8, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0, N5 },
{"msacu", "d,s,t", 0x000001d9, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0, N5 },
{"msachi", "d,s,t", 0x000003d8, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0, N5 },
@@ -864,11 +875,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"msgn.qh", "X,Y,Q", 0x78200000, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX },
{"msub.d", "D,R,S,T", 0x4c000029, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I4|I33 },
{"msub.s", "D,R,S,T", 0x4c000028, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, 0, I4|I33 },
-{"msub.ps", "D,R,S,T", 0x4c00002e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5 },
+{"msub.ps", "D,R,S,T", 0x4c00002e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5|I33 },
{"msub", "s,t", 0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
{"msub", "s,t", 0x70000004, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
+{"msub", "7,s,t", 0x70000004, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
{"msubu", "s,t", 0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO, 0, L1 },
{"msubu", "s,t", 0x70000005, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, I32|N55 },
+{"msubu", "7,s,t", 0x70000005, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
{"mtpc", "t,P", 0x4080c801, 0xffe0ffc1, COD|RD_t|WR_C0, 0, M1|N5 },
{"mtps", "t,P", 0x4080c800, 0xffe0ffc1, COD|RD_t|WR_C0, 0, M1|N5 },
{"mtc0", "t,G", 0x40800000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC, 0, I1 },
@@ -880,13 +893,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mthc1", "t,G", 0x44e00000, 0xffe007ff, COD|RD_t|WR_S|FP_D, 0, I33 },
/* mtc2 is at the bottom of the table. */
/* mthc2 is at the bottom of the table. */
-{"mtc3", "t,G", 0x4c800000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, 0, I1 },
-{"mtc3", "t,G,H", 0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, 0, I32 },
+/* mtc3 is at the bottom of the table. */
{"mtdr", "t,G", 0x7080003d, 0xffe007ff, COD|RD_t|WR_C0, 0, N5 },
{"mthi", "s", 0x00000011, 0xfc1fffff, RD_s|WR_HI, 0, I1 },
{"mthi", "s,7", 0x00000011, 0xfc1fe7ff, RD_s|WR_HI, 0, D32 },
{"mtlo", "s", 0x00000013, 0xfc1fffff, RD_s|WR_LO, 0, I1 },
{"mtlo", "s,7", 0x00000013, 0xfc1fe7ff, RD_s|WR_LO, 0, D32 },
+{"mtlhx", "s", 0x00000053, 0xfc1fffff, RD_s|MOD_HILO, 0, SMT },
{"mtm0", "s", 0x70000008, 0xfc1fffff, RD_s, 0, IOCTEON },
{"mtm1", "s", 0x7000000c, 0xfc1fffff, RD_s, 0, IOCTEON },
{"mtm2", "s", 0x7000000d, 0xfc1fffff, RD_s, 0, IOCTEON },
@@ -917,7 +930,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mul.ob", "D,S,T", 0x4ac00030, 0xffe0003f, WR_D|RD_S|RD_T, 0, N54 },
{"mul.ob", "D,S,T[e]", 0x48000030, 0xfe20003f, WR_D|RD_S|RD_T, 0, N54 },
{"mul.ob", "D,S,k", 0x4bc00030, 0xffe0003f, WR_D|RD_S|RD_T, 0, N54 },
-{"mul.ps", "D,V,T", 0x46c00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
+{"mul.ps", "D,V,T", 0x46c00002, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5|I33 },
{"mul.qh", "X,Y,Q", 0x78200030, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX },
{"mul", "d,v,t", 0x70000002, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, I32|P3|N55},
{"mul", "d,s,t", 0x00000058, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0, N54 },
@@ -955,21 +968,24 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"mulsl.ob", "S,k", 0x4bc00432, 0xffe007ff, WR_CC|RD_S|RD_T, 0, N54 },
{"mulsl.qh", "Y,Q", 0x78200432, 0xfc2007ff, RD_S|RD_T|FP_D, WR_MACC, MX },
{"mult", "s,t", 0x00000018, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, I1 },
+{"mult", "7,s,t", 0x00000018, 0xfc00e7ff, WR_a|RD_s|RD_t, 0, D33 },
{"mult", "d,s,t", 0x00000018, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
+{"multp", "s,t", 0x00000459, 0xfc00ffff, RD_s|RD_t|MOD_HILO, 0, SMT },
{"multu", "s,t", 0x00000019, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0, I1 },
+{"multu", "7,s,t", 0x00000019, 0xfc00e7ff, WR_a|RD_s|RD_t, 0, D33 },
{"multu", "d,s,t", 0x00000019, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0, G1 },
{"mulu", "d,s,t", 0x00000059, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0, N5 },
{"neg", "d,w", 0x00000022, 0xffe007ff, WR_d|RD_t, 0, I1 }, /* sub 0 */
{"negu", "d,w", 0x00000023, 0xffe007ff, WR_d|RD_t, 0, I1 }, /* subu 0 */
{"neg.d", "D,V", 0x46200007, 0xffff003f, WR_D|RD_S|FP_D, 0, I1 },
{"neg.s", "D,V", 0x46000007, 0xffff003f, WR_D|RD_S|FP_S, 0, I1 },
-{"neg.ps", "D,V", 0x46c00007, 0xffff003f, WR_D|RD_S|FP_D, 0, I5 },
+{"neg.ps", "D,V", 0x46c00007, 0xffff003f, WR_D|RD_S|FP_D, 0, I5|I33 },
{"nmadd.d", "D,R,S,T", 0x4c000031, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I4|I33 },
{"nmadd.s", "D,R,S,T", 0x4c000030, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, 0, I4|I33 },
-{"nmadd.ps","D,R,S,T", 0x4c000036, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5 },
+{"nmadd.ps","D,R,S,T", 0x4c000036, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5|I33 },
{"nmsub.d", "D,R,S,T", 0x4c000039, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I4|I33 },
{"nmsub.s", "D,R,S,T", 0x4c000038, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_S, 0, I4|I33 },
-{"nmsub.ps","D,R,S,T", 0x4c00003e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5 },
+{"nmsub.ps","D,R,S,T", 0x4c00003e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0, I5|I33 },
/* nop is at the start of the table. */
{"nor", "d,v,t", 0x00000027, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I1 },
{"nor", "t,r,I", 0, (int) M_NOR_I, INSN_MACRO, 0, I1 },
@@ -1000,12 +1016,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"pickt.ob", "D,S,T[e]",0x48000003, 0xfe20003f, WR_D|RD_S|RD_T, 0, N54 },
{"pickt.ob", "D,S,k", 0x4bc00003, 0xffe0003f, WR_D|RD_S|RD_T, 0, N54 },
{"pickt.qh", "X,Y,Q", 0x78200003, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX },
-{"pll.ps", "D,V,T", 0x46c0002c, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
-{"plu.ps", "D,V,T", 0x46c0002d, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
+{"pll.ps", "D,V,T", 0x46c0002c, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5|I33 },
+{"plu.ps", "D,V,T", 0x46c0002d, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5|I33 },
{"pop", "d,s", 0x7000002c, 0xfc1f07ff, WR_d|RD_s, 0, IOCTEON },
/* pref and prefx are at the start of the table. */
-{"pul.ps", "D,V,T", 0x46c0002e, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
-{"puu.ps", "D,V,T", 0x46c0002f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
+{"pul.ps", "D,V,T", 0x46c0002e, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5|I33 },
+{"puu.ps", "D,V,T", 0x46c0002f, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5|I33 },
+{"pperm", "s,t", 0x70000481, 0xfc00ffff, MOD_HILO|RD_s|RD_t, 0, SMT },
{"rach.ob", "X", 0x7a00003f, 0xfffff83f, WR_D|FP_D, RD_MACC, MX|SB1 },
{"rach.ob", "D", 0x4a00003f, 0xfffff83f, WR_D, 0, N54 },
{"rach.qh", "X", 0x7a20003f, 0xfffff83f, WR_D|FP_D, RD_MACC, MX },
@@ -1043,15 +1060,15 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"rol", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I1 },
{"ror", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I1 },
{"ror", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I1 },
-{"ror", "d,w,<", 0x00200002, 0xffe0003f, WR_d|RD_t, 0, N5|I33 },
-{"rorv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, N5|I33 },
-{"rotl", "d,v,t", 0, (int) M_ROL, INSN_MACRO, 0, I33 },
-{"rotl", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I33 },
-{"rotr", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I33 },
-{"rotr", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I33 },
-{"rotrv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, I33 },
+{"ror", "d,w,<", 0x00200002, 0xffe0003f, WR_d|RD_t, 0, N5|I33|SMT },
+{"rorv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, N5|I33|SMT },
+{"rotl", "d,v,t", 0, (int) M_ROL, INSN_MACRO, 0, I33|SMT },
+{"rotl", "d,v,I", 0, (int) M_ROL_I, INSN_MACRO, 0, I33|SMT },
+{"rotr", "d,v,t", 0, (int) M_ROR, INSN_MACRO, 0, I33|SMT },
+{"rotr", "d,v,I", 0, (int) M_ROR_I, INSN_MACRO, 0, I33|SMT },
+{"rotrv", "d,t,s", 0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d, 0, I33|SMT },
{"round.l.d", "D,S", 0x46200008, 0xffff003f, WR_D|RD_S|FP_D, 0, I3|I33 },
-{"round.l.s", "D,S", 0x46000008, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3 },
+{"round.l.s", "D,S", 0x46000008, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I3|I33 },
{"round.w.d", "D,S", 0x4620000c, 0xffff003f, WR_D|RD_S|FP_S|FP_D, 0, I2 },
{"round.w.s", "D,S", 0x4600000c, 0xffff003f, WR_D|RD_S|FP_S, 0, I2 },
{"rsqrt.d", "D,S", 0x46200016, 0xffff003f, WR_D|RD_S|FP_D, 0, I4|I33 },
@@ -1179,7 +1196,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"sub.ob", "D,S,T", 0x4ac0000a, 0xffe0003f, WR_D|RD_S|RD_T, 0, N54 },
{"sub.ob", "D,S,T[e]", 0x4800000a, 0xfe20003f, WR_D|RD_S|RD_T, 0, N54 },
{"sub.ob", "D,S,k", 0x4bc0000a, 0xffe0003f, WR_D|RD_S|RD_T, 0, N54 },
-{"sub.ps", "D,V,T", 0x46c00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5 },
+{"sub.ps", "D,V,T", 0x46c00001, 0xffe0003f, WR_D|RD_S|RD_T|FP_D, 0, I5|I33 },
{"sub.qh", "X,Y,Q", 0x7820000a, 0xfc20003f, WR_D|RD_S|RD_T|FP_D, 0, MX },
{"suba.ob", "Y,Q", 0x78000036, 0xfc2007ff, RD_S|RD_T|FP_D, WR_MACC, MX|SB1 },
{"suba.qh", "Y,Q", 0x78200036, 0xfc2007ff, RD_S|RD_T|FP_D, WR_MACC, MX },
@@ -1188,7 +1205,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"subu", "d,v,t", 0x00000023, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I1 },
{"subu", "d,v,I", 0, (int) M_SUBU_I, INSN_MACRO, 0, I1 },
{"suspend", "", 0x42000022, 0xffffffff, 0, 0, V1 },
-{"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, SM|RD_S|RD_t|RD_b, 0, I5|N55 },
+{"suxc1", "S,t(b)", 0x4c00000d, 0xfc0007ff, SM|RD_S|RD_t|RD_b, 0, I5|I33|N55},
{"sw", "t,o(b)", 0xac000000, 0xfc000000, SM|RD_t|RD_b, 0, I1 },
{"sw", "t,A(b)", 0, (int) M_SW_AB, INSN_MACRO, 0, I1 },
{"swc0", "E,o(b)", 0xe0000000, 0xfc000000, SM|RD_C0|RD_b, 0, I1 },
@@ -1296,7 +1313,6 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"wait", "", 0x42000020, 0xffffffff, TRAP, 0, I3|I32 },
{"wait", "J", 0x42000020, 0xfe00003f, TRAP, 0, I32|N55 },
{"waiti", "", 0x42000020, 0xffffffff, TRAP, 0, L1 },
-{"wb", "o(b)", 0xbc040000, 0xfc1f0000, SM|RD_b, 0, L1 },
{"wrpgpr", "d,w", 0x41c00000, 0xffe007ff, RD_t, 0, I33 },
{"wsbh", "d,w", 0x7c0000a0, 0xffe007ff, WR_d|RD_t, 0, I33 },
{"xor", "d,v,t", 0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t, 0, I1 },
@@ -1310,12 +1326,82 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"yield", "s", 0x7c000009, 0xfc1fffff, TRAP|RD_s, 0, MT32 },
{"yield", "d,s", 0x7c000009, 0xfc1f07ff, TRAP|WR_d|RD_s, 0, MT32 },
+/* User Defined Instruction. */
+{"udi0", "s,t,d,+1",0x70000010, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi0", "s,t,+2", 0x70000010, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi0", "s,+3", 0x70000010, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi0", "+4", 0x70000010, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi1", "s,t,d,+1",0x70000011, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi1", "s,t,+2", 0x70000011, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi1", "s,+3", 0x70000011, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi1", "+4", 0x70000011, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi2", "s,t,d,+1",0x70000012, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi2", "s,t,+2", 0x70000012, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi2", "s,+3", 0x70000012, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi2", "+4", 0x70000012, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi3", "s,t,d,+1",0x70000013, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi3", "s,t,+2", 0x70000013, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi3", "s,+3", 0x70000013, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi3", "+4", 0x70000013, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi4", "s,t,d,+1",0x70000014, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi4", "s,t,+2", 0x70000014, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi4", "s,+3", 0x70000014, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi4", "+4", 0x70000014, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi5", "s,t,d,+1",0x70000015, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi5", "s,t,+2", 0x70000015, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi5", "s,+3", 0x70000015, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi5", "+4", 0x70000015, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi6", "s,t,d,+1",0x70000016, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi6", "s,t,+2", 0x70000016, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi6", "s,+3", 0x70000016, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi6", "+4", 0x70000016, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi7", "s,t,d,+1",0x70000017, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi7", "s,t,+2", 0x70000017, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi7", "s,+3", 0x70000017, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi7", "+4", 0x70000017, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi8", "s,t,d,+1",0x70000018, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi8", "s,t,+2", 0x70000018, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi8", "s,+3", 0x70000018, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi8", "+4", 0x70000018, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi9", "s,t,d,+1",0x70000019, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi9", "s,t,+2", 0x70000019, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi9", "s,+3", 0x70000019, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi9", "+4", 0x70000019, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi10", "s,t,d,+1",0x7000001a, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi10", "s,t,+2", 0x7000001a, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi10", "s,+3", 0x7000001a, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi10", "+4", 0x7000001a, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi11", "s,t,d,+1",0x7000001b, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi11", "s,t,+2", 0x7000001b, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi11", "s,+3", 0x7000001b, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi11", "+4", 0x7000001b, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi12", "s,t,d,+1",0x7000001c, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi12", "s,t,+2", 0x7000001c, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi12", "s,+3", 0x7000001c, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi12", "+4", 0x7000001c, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi13", "s,t,d,+1",0x7000001d, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi13", "s,t,+2", 0x7000001d, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi13", "s,+3", 0x7000001d, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi13", "+4", 0x7000001d, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi14", "s,t,d,+1",0x7000001e, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi14", "s,t,+2", 0x7000001e, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi14", "s,+3", 0x7000001e, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi14", "+4", 0x7000001e, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi15", "s,t,d,+1",0x7000001f, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi15", "s,t,+2", 0x7000001f, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi15", "s,+3", 0x7000001f, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+{"udi15", "+4", 0x7000001f, 0xfc00003f, WR_d|RD_s|RD_t, 0, I33 },
+
/* Coprocessor 2 move/branch operations overlap with VR5400 .ob format
instructions so they are here for the latters to take precedence. */
{"bc2f", "p", 0x49000000, 0xffff0000, CBD|RD_CC, 0, I1 },
+{"bc2f", "N,p", 0x49000000, 0xffe30000, CBD|RD_CC, 0, I32 },
{"bc2fl", "p", 0x49020000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
+{"bc2fl", "N,p", 0x49020000, 0xffe30000, CBL|RD_CC, 0, I32 },
{"bc2t", "p", 0x49010000, 0xffff0000, CBD|RD_CC, 0, I1 },
+{"bc2t", "N,p", 0x49010000, 0xffe30000, CBD|RD_CC, 0, I32 },
{"bc2tl", "p", 0x49030000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
+{"bc2tl", "N,p", 0x49030000, 0xffe30000, CBL|RD_CC, 0, I32 },
{"cfc2", "t,G", 0x48400000, 0xffe007ff, LCD|WR_t|RD_C2, 0, I1 },
{"ctc2", "t,G", 0x48c00000, 0xffe007ff, COD|RD_t|WR_CC, 0, I1 },
{"dmfc2", "t,i", 0x48200000, 0xffe00000, LCD|WR_t|RD_C2, 0, IOCTEON },
@@ -1326,11 +1412,30 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"dmtc2", "t,G,H", 0x48a00000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, 0, I64 },
{"mfc2", "t,G", 0x48000000, 0xffe007ff, LCD|WR_t|RD_C2, 0, I1 },
{"mfc2", "t,G,H", 0x48000000, 0xffe007f8, LCD|WR_t|RD_C2, 0, I32 },
+{"mfhc2", "t,G", 0x48600000, 0xffe007ff, LCD|WR_t|RD_C2, 0, I33 },
+{"mfhc2", "t,G,H", 0x48600000, 0xffe007f8, LCD|WR_t|RD_C2, 0, I33 },
{"mfhc2", "t,i", 0x48600000, 0xffe00000, LCD|WR_t|RD_C2, 0, I33 },
{"mtc2", "t,G", 0x48800000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, 0, I1 },
{"mtc2", "t,G,H", 0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, 0, I32 },
+{"mthc2", "t,G", 0x48e00000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC, 0, I33 },
+{"mthc2", "t,G,H", 0x48e00000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC, 0, I33 },
{"mthc2", "t,i", 0x48e00000, 0xffe00000, COD|RD_t|WR_C2|WR_CC, 0, I33 },
+/* Coprocessor 3 move/branch operations overlap with MIPS IV COP1X
+ instructions, so they are here for the latters to take precedence. */
+{"bc3f", "p", 0x4d000000, 0xffff0000, CBD|RD_CC, 0, I1 },
+{"bc3fl", "p", 0x4d020000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
+{"bc3t", "p", 0x4d010000, 0xffff0000, CBD|RD_CC, 0, I1 },
+{"bc3tl", "p", 0x4d030000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
+{"cfc3", "t,G", 0x4c400000, 0xffe007ff, LCD|WR_t|RD_C3, 0, I1 },
+{"ctc3", "t,G", 0x4cc00000, 0xffe007ff, COD|RD_t|WR_CC, 0, I1 },
+{"dmfc3", "t,G", 0x4c200000, 0xffe007ff, LCD|WR_t|RD_C3, 0, I3 },
+{"dmtc3", "t,G", 0x4ca00000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, 0, I3 },
+{"mfc3", "t,G", 0x4c000000, 0xffe007ff, LCD|WR_t|RD_C3, 0, I1 },
+{"mfc3", "t,G,H", 0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3, 0, I32 },
+{"mtc3", "t,G", 0x4c800000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC, 0, I1 },
+{"mtc3", "t,G,H", 0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC, 0, I32 },
+
/* No hazard protection on coprocessor instructions--they shouldn't
change the state of the processor and if they do it's up to the
user to put in nops as necessary. These are at the end so that the
@@ -1343,40 +1448,94 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"cop1", "C", 0, (int) M_COP1, INSN_MACRO, 0, I1 },
{"cop2", "C", 0, (int) M_COP2, INSN_MACRO, 0, I1 },
{"cop3", "C", 0, (int) M_COP3, INSN_MACRO, 0, I1 },
-
/* Conflicts with the 4650's "mul" instruction. Nobody's using the
4010 any more, so move this insn out of the way. If the object
format gave us more info, we could do this right. */
{"addciu", "t,r,j", 0x70000000, 0xfc000000, WR_t|RD_s, 0, L1 },
/* MIPS DSP ASE */
{"absq_s.ph", "d,t", 0x7c000252, 0xffe007ff, WR_d|RD_t, 0, D32 },
+{"absq_s.pw", "d,t", 0x7c000456, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"absq_s.qh", "d,t", 0x7c000256, 0xffe007ff, WR_d|RD_t, 0, D64 },
{"absq_s.w", "d,t", 0x7c000452, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"addq.ph", "d,s,t", 0x7c000290, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"addq.pw", "d,s,t", 0x7c000494, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"addq.qh", "d,s,t", 0x7c000294, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"addq_s.ph", "d,s,t", 0x7c000390, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"addq_s.pw", "d,s,t", 0x7c000594, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"addq_s.qh", "d,s,t", 0x7c000394, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"addq_s.w", "d,s,t", 0x7c000590, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
{"addsc", "d,s,t", 0x7c000410, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"addu.ob", "d,s,t", 0x7c000014, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"addu.qb", "d,s,t", 0x7c000010, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"addu_s.ob", "d,s,t", 0x7c000114, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"addu_s.qb", "d,s,t", 0x7c000110, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
{"addwc", "d,s,t", 0x7c000450, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
{"bitrev", "d,t", 0x7c0006d2, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"bposge32", "p", 0x041c0000, 0xffff0000, CBD, 0, D32 },
+{"bposge64", "p", 0x041d0000, 0xffff0000, CBD, 0, D64 },
{"cmp.eq.ph", "s,t", 0x7c000211, 0xfc00ffff, RD_s|RD_t, 0, D32 },
+{"cmp.eq.pw", "s,t", 0x7c000415, 0xfc00ffff, RD_s|RD_t, 0, D64 },
+{"cmp.eq.qh", "s,t", 0x7c000215, 0xfc00ffff, RD_s|RD_t, 0, D64 },
+{"cmpgu.eq.ob", "d,s,t", 0x7c000115, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"cmpgu.eq.qb", "d,s,t", 0x7c000111, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"cmpgu.le.ob", "d,s,t", 0x7c000195, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"cmpgu.le.qb", "d,s,t", 0x7c000191, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"cmpgu.lt.ob", "d,s,t", 0x7c000155, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"cmpgu.lt.qb", "d,s,t", 0x7c000151, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
{"cmp.le.ph", "s,t", 0x7c000291, 0xfc00ffff, RD_s|RD_t, 0, D32 },
+{"cmp.le.pw", "s,t", 0x7c000495, 0xfc00ffff, RD_s|RD_t, 0, D64 },
+{"cmp.le.qh", "s,t", 0x7c000295, 0xfc00ffff, RD_s|RD_t, 0, D64 },
{"cmp.lt.ph", "s,t", 0x7c000251, 0xfc00ffff, RD_s|RD_t, 0, D32 },
+{"cmp.lt.pw", "s,t", 0x7c000455, 0xfc00ffff, RD_s|RD_t, 0, D64 },
+{"cmp.lt.qh", "s,t", 0x7c000255, 0xfc00ffff, RD_s|RD_t, 0, D64 },
+{"cmpu.eq.ob", "s,t", 0x7c000015, 0xfc00ffff, RD_s|RD_t, 0, D64 },
{"cmpu.eq.qb", "s,t", 0x7c000011, 0xfc00ffff, RD_s|RD_t, 0, D32 },
+{"cmpu.le.ob", "s,t", 0x7c000095, 0xfc00ffff, RD_s|RD_t, 0, D64 },
{"cmpu.le.qb", "s,t", 0x7c000091, 0xfc00ffff, RD_s|RD_t, 0, D32 },
+{"cmpu.lt.ob", "s,t", 0x7c000055, 0xfc00ffff, RD_s|RD_t, 0, D64 },
{"cmpu.lt.qb", "s,t", 0x7c000051, 0xfc00ffff, RD_s|RD_t, 0, D32 },
+{"dextpdp", "t,7,6", 0x7c0002bc, 0xfc00e7ff, WR_t|RD_a|DSP_VOLA, 0, D64 },
+{"dextpdpv", "t,7,s", 0x7c0002fc, 0xfc00e7ff, WR_t|RD_a|RD_s|DSP_VOLA, 0, D64 },
+{"dextp", "t,7,6", 0x7c0000bc, 0xfc00e7ff, WR_t|RD_a, 0, D64 },
+{"dextpv", "t,7,s", 0x7c0000fc, 0xfc00e7ff, WR_t|RD_a|RD_s, 0, D64 },
+{"dextr.l", "t,7,6", 0x7c00043c, 0xfc00e7ff, WR_t|RD_a, 0, D64 },
+{"dextr_r.l", "t,7,6", 0x7c00053c, 0xfc00e7ff, WR_t|RD_a, 0, D64 },
+{"dextr_rs.l", "t,7,6", 0x7c0005bc, 0xfc00e7ff, WR_t|RD_a, 0, D64 },
+{"dextr_rs.w", "t,7,6", 0x7c0001bc, 0xfc00e7ff, WR_t|RD_a, 0, D64 },
+{"dextr_r.w", "t,7,6", 0x7c00013c, 0xfc00e7ff, WR_t|RD_a, 0, D64 },
+{"dextr_s.h", "t,7,6", 0x7c0003bc, 0xfc00e7ff, WR_t|RD_a, 0, D64 },
+{"dextrv.l", "t,7,s", 0x7c00047c, 0xfc00e7ff, WR_t|RD_a|RD_s, 0, D64 },
+{"dextrv_r.l", "t,7,s", 0x7c00057c, 0xfc00e7ff, WR_t|RD_a|RD_s, 0, D64 },
+{"dextrv_rs.l", "t,7,s", 0x7c0005fc, 0xfc00e7ff, WR_t|RD_a|RD_s, 0, D64 },
+{"dextrv_rs.w", "t,7,s", 0x7c0001fc, 0xfc00e7ff, WR_t|RD_a|RD_s, 0, D64 },
+{"dextrv_r.w", "t,7,s", 0x7c00017c, 0xfc00e7ff, WR_t|RD_a|RD_s, 0, D64 },
+{"dextrv_s.h", "t,7,s", 0x7c0003fc, 0xfc00e7ff, WR_t|RD_a|RD_s, 0, D64 },
+{"dextrv.w", "t,7,s", 0x7c00007c, 0xfc00e7ff, WR_t|RD_a|RD_s, 0, D64 },
+{"dextr.w", "t,7,6", 0x7c00003c, 0xfc00e7ff, WR_t|RD_a, 0, D64 },
+{"dinsv", "t,s", 0x7c00000d, 0xfc00ffff, WR_t|RD_s, 0, D64 },
+{"dmadd", "7,s,t", 0x7c000674, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"dmaddu", "7,s,t", 0x7c000774, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"dmsub", "7,s,t", 0x7c0006f4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"dmsubu", "7,s,t", 0x7c0007f4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"dmthlip", "s,7", 0x7c0007fc, 0xfc1fe7ff, RD_s|MOD_a|DSP_VOLA, 0, D64 },
+{"dpaq_sa.l.pw", "7,s,t", 0x7c000334, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
{"dpaq_sa.l.w", "7,s,t", 0x7c000330, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"dpaq_s.w.ph", "7,s,t", 0x7c000130, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+{"dpaq_s.w.qh", "7,s,t", 0x7c000134, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"dpau.h.obl", "7,s,t", 0x7c0000f4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"dpau.h.obr", "7,s,t", 0x7c0001f4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
{"dpau.h.qbl", "7,s,t", 0x7c0000f0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"dpau.h.qbr", "7,s,t", 0x7c0001f0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+{"dpsq_sa.l.pw", "7,s,t", 0x7c000374, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
{"dpsq_sa.l.w", "7,s,t", 0x7c000370, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"dpsq_s.w.ph", "7,s,t", 0x7c000170, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+{"dpsq_s.w.qh", "7,s,t", 0x7c000174, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"dpsu.h.obl", "7,s,t", 0x7c0002f4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"dpsu.h.obr", "7,s,t", 0x7c0003f4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
{"dpsu.h.qbl", "7,s,t", 0x7c0002f0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"dpsu.h.qbr", "7,s,t", 0x7c0003f0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+{"dshilo", "7,:", 0x7c0006bc, 0xfc07e7ff, MOD_a, 0, D64 },
+{"dshilov", "7,s", 0x7c0006fc, 0xfc1fe7ff, MOD_a|RD_s, 0, D64 },
{"extpdp", "t,7,6", 0x7c0002b8, 0xfc00e7ff, WR_t|RD_a|DSP_VOLA, 0, D32 },
{"extpdpv", "t,7,s", 0x7c0002f8, 0xfc00e7ff, WR_t|RD_a|RD_s|DSP_VOLA, 0, D32 },
{"extp", "t,7,6", 0x7c0000b8, 0xfc00e7ff, WR_t|RD_a, 0, D32 },
@@ -1391,69 +1550,191 @@ const struct mips_opcode mips_builtin_opcodes[] =
{"extr.w", "t,7,6", 0x7c000038, 0xfc00e7ff, WR_t|RD_a, 0, D32 },
{"insv", "t,s", 0x7c00000c, 0xfc00ffff, WR_t|RD_s, 0, D32 },
{"lbux", "d,t(b)", 0x7c00018a, 0xfc0007ff, LDD|WR_d|RD_t|RD_b, 0, D32 },
+{"ldx", "d,t(b)", 0x7c00020a, 0xfc0007ff, LDD|WR_d|RD_t|RD_b, 0, D64 },
{"lhx", "d,t(b)", 0x7c00010a, 0xfc0007ff, LDD|WR_d|RD_t|RD_b, 0, D32 },
{"lwx", "d,t(b)", 0x7c00000a, 0xfc0007ff, LDD|WR_d|RD_t|RD_b, 0, D32 },
{"maq_sa.w.phl", "7,s,t", 0x7c000430, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"maq_sa.w.phr", "7,s,t", 0x7c0004b0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+{"maq_sa.w.qhll", "7,s,t", 0x7c000434, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"maq_sa.w.qhlr", "7,s,t", 0x7c000474, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"maq_sa.w.qhrl", "7,s,t", 0x7c0004b4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"maq_sa.w.qhrr", "7,s,t", 0x7c0004f4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"maq_s.l.pwl", "7,s,t", 0x7c000734, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"maq_s.l.pwr", "7,s,t", 0x7c0007b4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
{"maq_s.w.phl", "7,s,t", 0x7c000530, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
{"maq_s.w.phr", "7,s,t", 0x7c0005b0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+{"maq_s.w.qhll", "7,s,t", 0x7c000534, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"maq_s.w.qhlr", "7,s,t", 0x7c000574, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"maq_s.w.qhrl", "7,s,t", 0x7c0005b4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
+{"maq_s.w.qhrr", "7,s,t", 0x7c0005f4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
{"modsub", "d,s,t", 0x7c000490, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
{"mthlip", "s,7", 0x7c0007f8, 0xfc1fe7ff, RD_s|MOD_a|DSP_VOLA, 0, D32 },
+{"muleq_s.pw.qhl", "d,s,t", 0x7c000714, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D64 },
+{"muleq_s.pw.qhr", "d,s,t", 0x7c000754, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D64 },
{"muleq_s.w.phl", "d,s,t", 0x7c000710, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D32 },
{"muleq_s.w.phr", "d,s,t", 0x7c000750, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D32 },
{"muleu_s.ph.qbl", "d,s,t", 0x7c000190, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D32 },
{"muleu_s.ph.qbr", "d,s,t", 0x7c0001d0, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D32 },
+{"muleu_s.qh.obl", "d,s,t", 0x7c000194, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D64 },
+{"muleu_s.qh.obr", "d,s,t", 0x7c0001d4, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D64 },
{"mulq_rs.ph", "d,s,t", 0x7c0007d0, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D32 },
+{"mulq_rs.qh", "d,s,t", 0x7c0007d4, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D64 },
+{"mulsaq_s.l.pw", "7,s,t", 0x7c0003b4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
{"mulsaq_s.w.ph", "7,s,t", 0x7c0001b0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D32 },
+{"mulsaq_s.w.qh", "7,s,t", 0x7c0001b4, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D64 },
{"packrl.ph", "d,s,t", 0x7c000391, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"packrl.pw", "d,s,t", 0x7c000395, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"pick.ob", "d,s,t", 0x7c0000d5, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"pick.ph", "d,s,t", 0x7c0002d1, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"pick.pw", "d,s,t", 0x7c0004d5, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"pick.qb", "d,s,t", 0x7c0000d1, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"pick.qh", "d,s,t", 0x7c0002d5, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"preceq.pw.qhla", "d,t", 0x7c000396, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"preceq.pw.qhl", "d,t", 0x7c000316, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"preceq.pw.qhra", "d,t", 0x7c0003d6, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"preceq.pw.qhr", "d,t", 0x7c000356, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"preceq.s.l.pwl", "d,t", 0x7c000516, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"preceq.s.l.pwr", "d,t", 0x7c000556, 0xffe007ff, WR_d|RD_t, 0, D64 },
{"precequ.ph.qbla", "d,t", 0x7c000192, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"precequ.ph.qbl", "d,t", 0x7c000112, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"precequ.ph.qbra", "d,t", 0x7c0001d2, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"precequ.ph.qbr", "d,t", 0x7c000152, 0xffe007ff, WR_d|RD_t, 0, D32 },
+{"precequ.pw.qhla", "d,t", 0x7c000196, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"precequ.pw.qhl", "d,t", 0x7c000116, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"precequ.pw.qhra", "d,t", 0x7c0001d6, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"precequ.pw.qhr", "d,t", 0x7c000156, 0xffe007ff, WR_d|RD_t, 0, D64 },
{"preceq.w.phl", "d,t", 0x7c000312, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"preceq.w.phr", "d,t", 0x7c000352, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"preceu.ph.qbla", "d,t", 0x7c000792, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"preceu.ph.qbl", "d,t", 0x7c000712, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"preceu.ph.qbra", "d,t", 0x7c0007d2, 0xffe007ff, WR_d|RD_t, 0, D32 },
{"preceu.ph.qbr", "d,t", 0x7c000752, 0xffe007ff, WR_d|RD_t, 0, D32 },
+{"preceu.qh.obla", "d,t", 0x7c000796, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"preceu.qh.obl", "d,t", 0x7c000716, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"preceu.qh.obra", "d,t", 0x7c0007d6, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"preceu.qh.obr", "d,t", 0x7c000756, 0xffe007ff, WR_d|RD_t, 0, D64 },
+{"precrq.ob.qh", "d,s,t", 0x7c000315, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"precrq.ph.w", "d,s,t", 0x7c000511, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"precrq.pw.l", "d,s,t", 0x7c000715, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"precrq.qb.ph", "d,s,t", 0x7c000311, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"precrq.qh.pw", "d,s,t", 0x7c000515, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"precrq_rs.ph.w", "d,s,t", 0x7c000551, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"precrq_rs.qh.pw", "d,s,t", 0x7c000555, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"precrqu_s.ob.qh", "d,s,t", 0x7c0003d5, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"precrqu_s.qb.ph", "d,s,t", 0x7c0003d1, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"raddu.l.ob", "d,s", 0x7c000514, 0xfc1f07ff, WR_d|RD_s, 0, D64 },
{"raddu.w.qb", "d,s", 0x7c000510, 0xfc1f07ff, WR_d|RD_s, 0, D32 },
{"rddsp", "d", 0x7fff04b8, 0xffff07ff, WR_d, 0, D32 },
{"rddsp", "d,'", 0x7c0004b8, 0xffc007ff, WR_d, 0, D32 },
+{"repl.ob", "d,5", 0x7c000096, 0xff0007ff, WR_d, 0, D64 },
{"repl.ph", "d,@", 0x7c000292, 0xfc0007ff, WR_d, 0, D32 },
+{"repl.pw", "d,@", 0x7c000496, 0xfc0007ff, WR_d, 0, D64 },
{"repl.qb", "d,5", 0x7c000092, 0xff0007ff, WR_d, 0, D32 },
+{"repl.qh", "d,@", 0x7c000296, 0xfc0007ff, WR_d, 0, D64 },
+{"replv.ob", "d,t", 0x7c0000d6, 0xffe007ff, WR_d|RD_t, 0, D64 },
{"replv.ph", "d,t", 0x7c0002d2, 0xffe007ff, WR_d|RD_t, 0, D32 },
+{"replv.pw", "d,t", 0x7c0004d6, 0xffe007ff, WR_d|RD_t, 0, D64 },
{"replv.qb", "d,t", 0x7c0000d2, 0xffe007ff, WR_d|RD_t, 0, D32 },
+{"replv.qh", "d,t", 0x7c0002d6, 0xffe007ff, WR_d|RD_t, 0, D64 },
{"shilo", "7,0", 0x7c0006b8, 0xfc0fe7ff, MOD_a, 0, D32 },
{"shilov", "7,s", 0x7c0006f8, 0xfc1fe7ff, MOD_a|RD_s, 0, D32 },
+{"shll.ob", "d,t,3", 0x7c000017, 0xff0007ff, WR_d|RD_t, 0, D64 },
{"shll.ph", "d,t,4", 0x7c000213, 0xfe0007ff, WR_d|RD_t, 0, D32 },
+{"shll.pw", "d,t,6", 0x7c000417, 0xfc0007ff, WR_d|RD_t, 0, D64 },
{"shll.qb", "d,t,3", 0x7c000013, 0xff0007ff, WR_d|RD_t, 0, D32 },
+{"shll.qh", "d,t,4", 0x7c000217, 0xfe0007ff, WR_d|RD_t, 0, D64 },
{"shll_s.ph", "d,t,4", 0x7c000313, 0xfe0007ff, WR_d|RD_t, 0, D32 },
+{"shll_s.pw", "d,t,6", 0x7c000517, 0xfc0007ff, WR_d|RD_t, 0, D64 },
+{"shll_s.qh", "d,t,4", 0x7c000317, 0xfe0007ff, WR_d|RD_t, 0, D64 },
{"shll_s.w", "d,t,6", 0x7c000513, 0xfc0007ff, WR_d|RD_t, 0, D32 },
+{"shllv.ob", "d,t,s", 0x7c000097, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"shllv.ph", "d,t,s", 0x7c000293, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"shllv.pw", "d,t,s", 0x7c000497, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"shllv.qb", "d,t,s", 0x7c000093, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"shllv.qh", "d,t,s", 0x7c000297, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"shllv_s.ph", "d,t,s", 0x7c000393, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"shllv_s.pw", "d,t,s", 0x7c000597, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"shllv_s.qh", "d,t,s", 0x7c000397, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"shllv_s.w", "d,t,s", 0x7c000593, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
{"shra.ph", "d,t,4", 0x7c000253, 0xfe0007ff, WR_d|RD_t, 0, D32 },
+{"shra.pw", "d,t,6", 0x7c000457, 0xfc0007ff, WR_d|RD_t, 0, D64 },
+{"shra.qh", "d,t,4", 0x7c000257, 0xfe0007ff, WR_d|RD_t, 0, D64 },
{"shra_r.ph", "d,t,4", 0x7c000353, 0xfe0007ff, WR_d|RD_t, 0, D32 },
+{"shra_r.pw", "d,t,6", 0x7c000557, 0xfc0007ff, WR_d|RD_t, 0, D64 },
+{"shra_r.qh", "d,t,4", 0x7c000357, 0xfe0007ff, WR_d|RD_t, 0, D64 },
{"shra_r.w", "d,t,6", 0x7c000553, 0xfc0007ff, WR_d|RD_t, 0, D32 },
{"shrav.ph", "d,t,s", 0x7c0002d3, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"shrav.pw", "d,t,s", 0x7c0004d7, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"shrav.qh", "d,t,s", 0x7c0002d7, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"shrav_r.ph", "d,t,s", 0x7c0003d3, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"shrav_r.pw", "d,t,s", 0x7c0005d7, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"shrav_r.qh", "d,t,s", 0x7c0003d7, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"shrav_r.w", "d,t,s", 0x7c0005d3, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"shrl.ob", "d,t,3", 0x7c000057, 0xff0007ff, WR_d|RD_t, 0, D64 },
{"shrl.qb", "d,t,3", 0x7c000053, 0xff0007ff, WR_d|RD_t, 0, D32 },
+{"shrlv.ob", "d,t,s", 0x7c0000d7, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"shrlv.qb", "d,t,s", 0x7c0000d3, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
{"subq.ph", "d,s,t", 0x7c0002d0, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"subq.pw", "d,s,t", 0x7c0004d4, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"subq.qh", "d,s,t", 0x7c0002d4, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"subq_s.ph", "d,s,t", 0x7c0003d0, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"subq_s.pw", "d,s,t", 0x7c0005d4, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
+{"subq_s.qh", "d,s,t", 0x7c0003d4, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"subq_s.w", "d,s,t", 0x7c0005d0, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"subu.ob", "d,s,t", 0x7c000054, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"subu.qb", "d,s,t", 0x7c000050, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
+{"subu_s.ob", "d,s,t", 0x7c000154, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D64 },
{"subu_s.qb", "d,s,t", 0x7c000150, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D32 },
{"wrdsp", "s", 0x7c1ffcf8, 0xfc1fffff, RD_s|DSP_VOLA, 0, D32 },
{"wrdsp", "s,8", 0x7c0004f8, 0xfc1e07ff, RD_s|DSP_VOLA, 0, D32 },
+/* MIPS DSP ASE Rev2 */
+{"absq_s.qb", "d,t", 0x7c000052, 0xffe007ff, WR_d|RD_t, 0, D33 },
+{"addu.ph", "d,s,t", 0x7c000210, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"addu_s.ph", "d,s,t", 0x7c000310, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"adduh.qb", "d,s,t", 0x7c000018, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"adduh_r.qb", "d,s,t", 0x7c000098, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"append", "t,s,h", 0x7c000031, 0xfc0007ff, WR_t|RD_t|RD_s, 0, D33 },
+{"balign", "t,s,I", 0, (int) M_BALIGN, INSN_MACRO, 0, D33 },
+{"balign", "t,s,2", 0x7c000431, 0xfc00e7ff, WR_t|RD_t|RD_s, 0, D33 },
+{"cmpgdu.eq.qb", "d,s,t", 0x7c000611, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"cmpgdu.lt.qb", "d,s,t", 0x7c000651, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"cmpgdu.le.qb", "d,s,t", 0x7c000691, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"dpa.w.ph", "7,s,t", 0x7c000030, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"dps.w.ph", "7,s,t", 0x7c000070, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"mul.ph", "d,s,t", 0x7c000318, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D33 },
+{"mul_s.ph", "d,s,t", 0x7c000398, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D33 },
+{"mulq_rs.w", "d,s,t", 0x7c0005d8, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D33 },
+{"mulq_s.ph", "d,s,t", 0x7c000790, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D33 },
+{"mulq_s.w", "d,s,t", 0x7c000598, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0, D33 },
+{"mulsa.w.ph", "7,s,t", 0x7c0000b0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"precr.qb.ph", "d,s,t", 0x7c000351, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"precr_sra.ph.w", "t,s,h", 0x7c000791, 0xfc0007ff, WR_t|RD_t|RD_s, 0, D33 },
+{"precr_sra_r.ph.w", "t,s,h", 0x7c0007d1, 0xfc0007ff, WR_t|RD_t|RD_s, 0, D33 },
+{"prepend", "t,s,h", 0x7c000071, 0xfc0007ff, WR_t|RD_t|RD_s, 0, D33 },
+{"shra.qb", "d,t,3", 0x7c000113, 0xff0007ff, WR_d|RD_t, 0, D33 },
+{"shra_r.qb", "d,t,3", 0x7c000153, 0xff0007ff, WR_d|RD_t, 0, D33 },
+{"shrav.qb", "d,t,s", 0x7c000193, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"shrav_r.qb", "d,t,s", 0x7c0001d3, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"shrl.ph", "d,t,4", 0x7c000653, 0xfe0007ff, WR_d|RD_t, 0, D33 },
+{"shrlv.ph", "d,t,s", 0x7c0006d3, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"subu.ph", "d,s,t", 0x7c000250, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"subu_s.ph", "d,s,t", 0x7c000350, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"subuh.qb", "d,s,t", 0x7c000058, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"subuh_r.qb", "d,s,t", 0x7c0000d8, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"addqh.ph", "d,s,t", 0x7c000218, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"addqh_r.ph", "d,s,t", 0x7c000298, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"addqh.w", "d,s,t", 0x7c000418, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"addqh_r.w", "d,s,t", 0x7c000498, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"subqh.ph", "d,s,t", 0x7c000258, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"subqh_r.ph", "d,s,t", 0x7c0002d8, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"subqh.w", "d,s,t", 0x7c000458, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"subqh_r.w", "d,s,t", 0x7c0004d8, 0xfc0007ff, WR_d|RD_s|RD_t, 0, D33 },
+{"dpax.w.ph", "7,s,t", 0x7c000230, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"dpsx.w.ph", "7,s,t", 0x7c000270, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"dpaqx_s.w.ph", "7,s,t", 0x7c000630, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"dpaqx_sa.w.ph", "7,s,t", 0x7c0006b0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"dpsqx_s.w.ph", "7,s,t", 0x7c000670, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
+{"dpsqx_sa.w.ph", "7,s,t", 0x7c0006f0, 0xfc00e7ff, MOD_a|RD_s|RD_t, 0, D33 },
/* Move bc0* after mftr and mttr to avoid opcode collision. */
{"bc0f", "p", 0x41000000, 0xffff0000, CBD|RD_CC, 0, I1 },
{"bc0fl", "p", 0x41020000, 0xffff0000, CBL|RD_CC, 0, I2|T3 },
diff --git a/contrib/binutils/opcodes/mips16-opc.c b/contrib/binutils/opcodes/mips16-opc.c
index 4e5ae44..8144986 100644
--- a/contrib/binutils/opcodes/mips16-opc.c
+++ b/contrib/binutils/opcodes/mips16-opc.c
@@ -58,58 +58,61 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
#define TRAP INSN_TRAP
+#define I1 INSN_ISA1
#define I3 INSN_ISA3
-
-#define T3 INSN_3900
+#define I32 INSN_ISA32
+#define I64 INSN_ISA64
+#define T3 INSN_3900
const struct mips_opcode mips16_opcodes[] =
{
-{"nop", "", 0x6500, 0xffff, RD_Z, 0, 0 }, /* move $0,$Z */
-{"la", "x,A", 0x0800, 0xf800, WR_x|RD_PC, 0, 0 },
-{"abs", "x,w", 0, (int) M_ABS, INSN_MACRO, 0, 0 },
-{"addiu", "y,x,4", 0x4000, 0xf810, WR_y|RD_x, 0, 0 },
-{"addiu", "x,k", 0x4800, 0xf800, WR_x|RD_x, 0, 0 },
-{"addiu", "S,K", 0x6300, 0xff00, WR_SP|RD_SP, 0, 0 },
-{"addiu", "S,S,K", 0x6300, 0xff00, WR_SP|RD_SP, 0, 0 },
-{"addiu", "x,P,V", 0x0800, 0xf800, WR_x|RD_PC, 0, 0 },
-{"addiu", "x,S,V", 0x0000, 0xf800, WR_x|RD_SP, 0, 0 },
-{"addu", "z,v,y", 0xe001, 0xf803, WR_z|RD_x|RD_y, 0, 0 },
-{"addu", "y,x,4", 0x4000, 0xf810, WR_y|RD_x, 0, 0 },
-{"addu", "x,k", 0x4800, 0xf800, WR_x|RD_x, 0, 0 },
-{"addu", "S,K", 0x6300, 0xff00, WR_SP|RD_SP, 0, 0 },
-{"addu", "S,S,K", 0x6300, 0xff00, WR_SP|RD_SP, 0, 0 },
-{"addu", "x,P,V", 0x0800, 0xf800, WR_x|RD_PC, 0, 0 },
-{"addu", "x,S,V", 0x0000, 0xf800, WR_x|RD_SP, 0, 0 },
-{"and", "x,y", 0xe80c, 0xf81f, WR_x|RD_x|RD_y, 0, 0 },
-{"b", "q", 0x1000, 0xf800, BR, 0, 0 },
-{"beq", "x,y,p", 0, (int) M_BEQ, INSN_MACRO, 0, 0 },
-{"beq", "x,U,p", 0, (int) M_BEQ_I, INSN_MACRO, 0, 0 },
-{"beqz", "x,p", 0x2000, 0xf800, BR|RD_x, 0, 0 },
-{"bge", "x,y,p", 0, (int) M_BGE, INSN_MACRO, 0, 0 },
-{"bge", "x,8,p", 0, (int) M_BGE_I, INSN_MACRO, 0, 0 },
-{"bgeu", "x,y,p", 0, (int) M_BGEU, INSN_MACRO, 0, 0 },
-{"bgeu", "x,8,p", 0, (int) M_BGEU_I, INSN_MACRO, 0, 0 },
-{"bgt", "x,y,p", 0, (int) M_BGT, INSN_MACRO, 0, 0 },
-{"bgt", "x,8,p", 0, (int) M_BGT_I, INSN_MACRO, 0, 0 },
-{"bgtu", "x,y,p", 0, (int) M_BGTU, INSN_MACRO, 0, 0 },
-{"bgtu", "x,8,p", 0, (int) M_BGTU_I, INSN_MACRO, 0, 0 },
-{"ble", "x,y,p", 0, (int) M_BLE, INSN_MACRO, 0, 0 },
-{"ble", "x,8,p", 0, (int) M_BLE_I, INSN_MACRO, 0, 0 },
-{"bleu", "x,y,p", 0, (int) M_BLEU, INSN_MACRO, 0, 0 },
-{"bleu", "x,8,p", 0, (int) M_BLEU_I, INSN_MACRO, 0, 0 },
-{"blt", "x,y,p", 0, (int) M_BLT, INSN_MACRO, 0, 0 },
-{"blt", "x,8,p", 0, (int) M_BLT_I, INSN_MACRO, 0, 0 },
-{"bltu", "x,y,p", 0, (int) M_BLTU, INSN_MACRO, 0, 0 },
-{"bltu", "x,8,p", 0, (int) M_BLTU_I, INSN_MACRO, 0, 0 },
-{"bne", "x,y,p", 0, (int) M_BNE, INSN_MACRO, 0, 0 },
-{"bne", "x,U,p", 0, (int) M_BNE_I, INSN_MACRO, 0, 0 },
-{"bnez", "x,p", 0x2800, 0xf800, BR|RD_x, 0, 0 },
-{"break", "6", 0xe805, 0xf81f, TRAP, 0, 0 },
-{"bteqz", "p", 0x6000, 0xff00, BR|RD_T, 0, 0 },
-{"btnez", "p", 0x6100, 0xff00, BR|RD_T, 0, 0 },
-{"cmpi", "x,U", 0x7000, 0xf800, WR_T|RD_x, 0, 0 },
-{"cmp", "x,y", 0xe80a, 0xf81f, WR_T|RD_x|RD_y, 0, 0 },
-{"cmp", "x,U", 0x7000, 0xf800, WR_T|RD_x, 0, 0 },
+/* name, args, match, mask, pinfo, pinfo2, membership */
+{"nop", "", 0x6500, 0xffff, RD_Z, 0, I1 }, /* move $0,$Z */
+{"la", "x,A", 0x0800, 0xf800, WR_x|RD_PC, 0, I1 },
+{"abs", "x,w", 0, (int) M_ABS, INSN_MACRO, 0, I1 },
+{"addiu", "y,x,4", 0x4000, 0xf810, WR_y|RD_x, 0, I1 },
+{"addiu", "x,k", 0x4800, 0xf800, WR_x|RD_x, 0, I1 },
+{"addiu", "S,K", 0x6300, 0xff00, WR_SP|RD_SP, 0, I1 },
+{"addiu", "S,S,K", 0x6300, 0xff00, WR_SP|RD_SP, 0, I1 },
+{"addiu", "x,P,V", 0x0800, 0xf800, WR_x|RD_PC, 0, I1 },
+{"addiu", "x,S,V", 0x0000, 0xf800, WR_x|RD_SP, 0, I1 },
+{"addu", "z,v,y", 0xe001, 0xf803, WR_z|RD_x|RD_y, 0, I1 },
+{"addu", "y,x,4", 0x4000, 0xf810, WR_y|RD_x, 0, I1 },
+{"addu", "x,k", 0x4800, 0xf800, WR_x|RD_x, 0, I1 },
+{"addu", "S,K", 0x6300, 0xff00, WR_SP|RD_SP, 0, I1 },
+{"addu", "S,S,K", 0x6300, 0xff00, WR_SP|RD_SP, 0, I1 },
+{"addu", "x,P,V", 0x0800, 0xf800, WR_x|RD_PC, 0, I1 },
+{"addu", "x,S,V", 0x0000, 0xf800, WR_x|RD_SP, 0, I1 },
+{"and", "x,y", 0xe80c, 0xf81f, WR_x|RD_x|RD_y, 0, I1 },
+{"b", "q", 0x1000, 0xf800, BR, 0, I1 },
+{"beq", "x,y,p", 0, (int) M_BEQ, INSN_MACRO, 0, I1 },
+{"beq", "x,U,p", 0, (int) M_BEQ_I, INSN_MACRO, 0, I1 },
+{"beqz", "x,p", 0x2000, 0xf800, BR|RD_x, 0, I1 },
+{"bge", "x,y,p", 0, (int) M_BGE, INSN_MACRO, 0, I1 },
+{"bge", "x,8,p", 0, (int) M_BGE_I, INSN_MACRO, 0, I1 },
+{"bgeu", "x,y,p", 0, (int) M_BGEU, INSN_MACRO, 0, I1 },
+{"bgeu", "x,8,p", 0, (int) M_BGEU_I, INSN_MACRO, 0, I1 },
+{"bgt", "x,y,p", 0, (int) M_BGT, INSN_MACRO, 0, I1 },
+{"bgt", "x,8,p", 0, (int) M_BGT_I, INSN_MACRO, 0, I1 },
+{"bgtu", "x,y,p", 0, (int) M_BGTU, INSN_MACRO, 0, I1 },
+{"bgtu", "x,8,p", 0, (int) M_BGTU_I, INSN_MACRO, 0, I1 },
+{"ble", "x,y,p", 0, (int) M_BLE, INSN_MACRO, 0, I1 },
+{"ble", "x,8,p", 0, (int) M_BLE_I, INSN_MACRO, 0, I1 },
+{"bleu", "x,y,p", 0, (int) M_BLEU, INSN_MACRO, 0, I1 },
+{"bleu", "x,8,p", 0, (int) M_BLEU_I, INSN_MACRO, 0, I1 },
+{"blt", "x,y,p", 0, (int) M_BLT, INSN_MACRO, 0, I1 },
+{"blt", "x,8,p", 0, (int) M_BLT_I, INSN_MACRO, 0, I1 },
+{"bltu", "x,y,p", 0, (int) M_BLTU, INSN_MACRO, 0, I1 },
+{"bltu", "x,8,p", 0, (int) M_BLTU_I, INSN_MACRO, 0, I1 },
+{"bne", "x,y,p", 0, (int) M_BNE, INSN_MACRO, 0, I1 },
+{"bne", "x,U,p", 0, (int) M_BNE_I, INSN_MACRO, 0, I1 },
+{"bnez", "x,p", 0x2800, 0xf800, BR|RD_x, 0, I1 },
+{"break", "6", 0xe805, 0xf81f, TRAP, 0, I1 },
+{"bteqz", "p", 0x6000, 0xff00, BR|RD_T, 0, I1 },
+{"btnez", "p", 0x6100, 0xff00, BR|RD_T, 0, I1 },
+{"cmpi", "x,U", 0x7000, 0xf800, WR_T|RD_x, 0, I1 },
+{"cmp", "x,y", 0xe80a, 0xf81f, WR_T|RD_x|RD_y, 0, I1 },
+{"cmp", "x,U", 0x7000, 0xf800, WR_T|RD_x, 0, I1 },
{"dla", "y,E", 0xfe00, 0xff00, WR_y|RD_PC, 0, I3 },
{"daddiu", "y,x,4", 0x4010, 0xf810, WR_y|RD_x, 0, I3 },
{"daddiu", "y,j", 0xfd00, 0xff00, WR_y|RD_y, 0, I3 },
@@ -125,20 +128,20 @@ const struct mips_opcode mips16_opcodes[] =
{"daddu", "y,P,W", 0xfe00, 0xff00, WR_y|RD_PC, 0, I3 },
{"daddu", "y,S,W", 0xff00, 0xff00, WR_y|RD_SP, 0, I3 },
{"ddiv", "0,x,y", 0xe81e, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I3 },
-{"ddiv", "z,v,y", 0, (int) M_DDIV_3, INSN_MACRO, 0, 0 },
+{"ddiv", "z,v,y", 0, (int) M_DDIV_3, INSN_MACRO, 0, I1 },
{"ddivu", "0,x,y", 0xe81f, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I3 },
-{"ddivu", "z,v,y", 0, (int) M_DDIVU_3, INSN_MACRO, 0, 0 },
-{"div", "0,x,y", 0xe81a, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, 0 },
-{"div", "z,v,y", 0, (int) M_DIV_3, INSN_MACRO, 0, 0 },
-{"divu", "0,x,y", 0xe81b, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, 0 },
-{"divu", "z,v,y", 0, (int) M_DIVU_3, INSN_MACRO, 0, 0 },
+{"ddivu", "z,v,y", 0, (int) M_DDIVU_3, INSN_MACRO, 0, I1 },
+{"div", "0,x,y", 0xe81a, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I1 },
+{"div", "z,v,y", 0, (int) M_DIV_3, INSN_MACRO, 0, I1 },
+{"divu", "0,x,y", 0xe81b, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I1 },
+{"divu", "z,v,y", 0, (int) M_DIVU_3, INSN_MACRO, 0, I1 },
{"dmul", "z,v,y", 0, (int) M_DMUL, INSN_MACRO, 0, I3 },
{"dmult", "x,y", 0xe81c, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I3 },
{"dmultu", "x,y", 0xe81d, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I3 },
{"drem", "0,x,y", 0xe81e, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I3 },
-{"drem", "z,v,y", 0, (int) M_DREM_3, INSN_MACRO, 0, 0 },
+{"drem", "z,v,y", 0, (int) M_DREM_3, INSN_MACRO, 0, I1 },
{"dremu", "0,x,y", 0xe81f, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I3 },
-{"dremu", "z,v,y", 0, (int) M_DREMU_3, INSN_MACRO, 0, 0 },
+{"dremu", "z,v,y", 0, (int) M_DREMU_3, INSN_MACRO, 0, I1 },
{"dsllv", "y,x", 0xe814, 0xf81f, WR_y|RD_y|RD_x, 0, I3 },
{"dsll", "x,w,[", 0x3001, 0xf803, WR_x|RD_y, 0, I3 },
{"dsll", "y,x", 0xe814, 0xf81f, WR_y|RD_y|RD_x, 0, I3 },
@@ -149,91 +152,92 @@ const struct mips_opcode mips16_opcodes[] =
{"dsrl", "y,]", 0xe808, 0xf81f, WR_y|RD_y, 0, I3 },
{"dsrl", "y,x", 0xe816, 0xf81f, WR_y|RD_y|RD_x, 0, I3 },
{"dsubu", "z,v,y", 0xe002, 0xf803, WR_z|RD_x|RD_y, 0, I3 },
-{"dsubu", "y,x,4", 0, (int) M_DSUBU_I, INSN_MACRO, 0, 0 },
-{"dsubu", "y,j", 0, (int) M_DSUBU_I_2, INSN_MACRO, 0, 0 },
-{"exit", "L", 0xed09, 0xff1f, TRAP, 0, 0 },
-{"exit", "L", 0xee09, 0xff1f, TRAP, 0, 0 },
-{"exit", "L", 0xef09, 0xff1f, TRAP, 0, 0 },
-{"entry", "l", 0xe809, 0xf81f, TRAP, 0, 0 },
-{"extend", "e", 0xf000, 0xf800, 0, 0, 0 },
-{"jalr", "x", 0xe840, 0xf8ff, UBD|WR_31|RD_x, 0, 0 },
-{"jalr", "R,x", 0xe840, 0xf8ff, UBD|WR_31|RD_x, 0, 0 },
-{"jal", "x", 0xe840, 0xf8ff, UBD|WR_31|RD_x, 0, 0 },
-{"jal", "R,x", 0xe840, 0xf8ff, UBD|WR_31|RD_x, 0, 0 },
-{"jal", "a", 0x1800, 0xfc00, UBD|WR_31, 0, 0 },
-{"jalx", "a", 0x1c00, 0xfc00, UBD|WR_31, 0, 0 },
-{"jr", "x", 0xe800, 0xf8ff, UBD|RD_x, 0, 0 },
-{"jr", "R", 0xe820, 0xffff, UBD|RD_31, 0, 0 },
-{"j", "x", 0xe800, 0xf8ff, UBD|RD_x, 0, 0 },
-{"j", "R", 0xe820, 0xffff, UBD|RD_31, 0, 0 },
-{"lb", "y,5(x)", 0x8000, 0xf800, WR_y|RD_x, 0, 0 },
-{"lbu", "y,5(x)", 0xa000, 0xf800, WR_y|RD_x, 0, 0 },
+{"dsubu", "y,x,4", 0, (int) M_DSUBU_I, INSN_MACRO, 0, I1 },
+{"dsubu", "y,j", 0, (int) M_DSUBU_I_2, INSN_MACRO, 0, I1 },
+{"exit", "L", 0xed09, 0xff1f, TRAP, 0, I1 },
+{"exit", "L", 0xee09, 0xff1f, TRAP, 0, I1 },
+{"exit", "L", 0xef09, 0xff1f, TRAP, 0, I1 },
+{"entry", "l", 0xe809, 0xf81f, TRAP, 0, I1 },
+{"extend", "e", 0xf000, 0xf800, 0, 0, I1 },
+{"jalr", "x", 0xe840, 0xf8ff, UBD|WR_31|RD_x, 0, I1 },
+{"jalr", "R,x", 0xe840, 0xf8ff, UBD|WR_31|RD_x, 0, I1 },
+{"jal", "x", 0xe840, 0xf8ff, UBD|WR_31|RD_x, 0, I1 },
+{"jal", "R,x", 0xe840, 0xf8ff, UBD|WR_31|RD_x, 0, I1 },
+{"jal", "a", 0x1800, 0xfc00, UBD|WR_31, 0, I1 },
+{"jalx", "a", 0x1c00, 0xfc00, UBD|WR_31, 0, I1 },
+{"jr", "x", 0xe800, 0xf8ff, UBD|RD_x, 0, I1 },
+{"jr", "R", 0xe820, 0xffff, UBD|RD_31, 0, I1 },
+{"j", "x", 0xe800, 0xf8ff, UBD|RD_x, 0, I1 },
+{"j", "R", 0xe820, 0xffff, UBD|RD_31, 0, I1 },
+{"lb", "y,5(x)", 0x8000, 0xf800, WR_y|RD_x, 0, I1 },
+{"lbu", "y,5(x)", 0xa000, 0xf800, WR_y|RD_x, 0, I1 },
{"ld", "y,D(x)", 0x3800, 0xf800, WR_y|RD_x, 0, I3 },
{"ld", "y,B", 0xfc00, 0xff00, WR_y|RD_PC, 0, I3 },
{"ld", "y,D(P)", 0xfc00, 0xff00, WR_y|RD_PC, 0, I3 },
{"ld", "y,D(S)", 0xf800, 0xff00, WR_y|RD_SP, 0, I3 },
-{"lh", "y,H(x)", 0x8800, 0xf800, WR_y|RD_x, 0, 0 },
-{"lhu", "y,H(x)", 0xa800, 0xf800, WR_y|RD_x, 0, 0 },
-{"li", "x,U", 0x6800, 0xf800, WR_x, 0, 0 },
-{"lw", "y,W(x)", 0x9800, 0xf800, WR_y|RD_x, 0, 0 },
-{"lw", "x,A", 0xb000, 0xf800, WR_x|RD_PC, 0, 0 },
-{"lw", "x,V(P)", 0xb000, 0xf800, WR_x|RD_PC, 0, 0 },
-{"lw", "x,V(S)", 0x9000, 0xf800, WR_x|RD_SP, 0, 0 },
+{"lh", "y,H(x)", 0x8800, 0xf800, WR_y|RD_x, 0, I1 },
+{"lhu", "y,H(x)", 0xa800, 0xf800, WR_y|RD_x, 0, I1 },
+{"li", "x,U", 0x6800, 0xf800, WR_x, 0, I1 },
+{"lw", "y,W(x)", 0x9800, 0xf800, WR_y|RD_x, 0, I1 },
+{"lw", "x,A", 0xb000, 0xf800, WR_x|RD_PC, 0, I1 },
+{"lw", "x,V(P)", 0xb000, 0xf800, WR_x|RD_PC, 0, I1 },
+{"lw", "x,V(S)", 0x9000, 0xf800, WR_x|RD_SP, 0, I1 },
{"lwu", "y,W(x)", 0xb800, 0xf800, WR_y|RD_x, 0, I3 },
-{"mfhi", "x", 0xe810, 0xf8ff, WR_x|RD_HI, 0, 0 },
-{"mflo", "x", 0xe812, 0xf8ff, WR_x|RD_LO, 0, 0 },
-{"move", "y,X", 0x6700, 0xff00, WR_y|RD_X, 0, 0 },
-{"move", "Y,Z", 0x6500, 0xff00, WR_Y|RD_Z, 0, 0 },
-{"mul", "z,v,y", 0, (int) M_MUL, INSN_MACRO, 0, 0 },
-{"mult", "x,y", 0xe818, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, 0 },
-{"multu", "x,y", 0xe819, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, 0 },
-{"neg", "x,w", 0xe80b, 0xf81f, WR_x|RD_y, 0, 0 },
-{"not", "x,w", 0xe80f, 0xf81f, WR_x|RD_y, 0, 0 },
-{"or", "x,y", 0xe80d, 0xf81f, WR_x|RD_x|RD_y, 0, 0 },
-{"rem", "0,x,y", 0xe81a, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, 0 },
-{"rem", "z,v,y", 0, (int) M_REM_3, INSN_MACRO, 0, 0 },
-{"remu", "0,x,y", 0xe81b, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, 0 },
-{"remu", "z,v,y", 0, (int) M_REMU_3, INSN_MACRO, 0, 0 },
-{"sb", "y,5(x)", 0xc000, 0xf800, RD_y|RD_x, 0, 0 },
+{"mfhi", "x", 0xe810, 0xf8ff, WR_x|RD_HI, 0, I1 },
+{"mflo", "x", 0xe812, 0xf8ff, WR_x|RD_LO, 0, I1 },
+{"move", "y,X", 0x6700, 0xff00, WR_y|RD_X, 0, I1 },
+{"move", "Y,Z", 0x6500, 0xff00, WR_Y|RD_Z, 0, I1 },
+{"mul", "z,v,y", 0, (int) M_MUL, INSN_MACRO, 0, I1 },
+{"mult", "x,y", 0xe818, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I1 },
+{"multu", "x,y", 0xe819, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I1 },
+{"neg", "x,w", 0xe80b, 0xf81f, WR_x|RD_y, 0, I1 },
+{"not", "x,w", 0xe80f, 0xf81f, WR_x|RD_y, 0, I1 },
+{"or", "x,y", 0xe80d, 0xf81f, WR_x|RD_x|RD_y, 0, I1 },
+{"rem", "0,x,y", 0xe81a, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I1 },
+{"rem", "z,v,y", 0, (int) M_REM_3, INSN_MACRO, 0, I1 },
+{"remu", "0,x,y", 0xe81b, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0, I1 },
+{"remu", "z,v,y", 0, (int) M_REMU_3, INSN_MACRO, 0, I1 },
+{"sb", "y,5(x)", 0xc000, 0xf800, RD_y|RD_x, 0, I1 },
{"sd", "y,D(x)", 0x7800, 0xf800, RD_y|RD_x, 0, I3 },
{"sd", "y,D(S)", 0xf900, 0xff00, RD_y|RD_PC, 0, I3 },
-{"sd", "R,C(S)", 0xfa00, 0xff00, RD_31|RD_PC, 0, 0 },
-{"sh", "y,H(x)", 0xc800, 0xf800, RD_y|RD_x, 0, 0 },
-{"sllv", "y,x", 0xe804, 0xf81f, WR_y|RD_y|RD_x, 0, 0 },
-{"sll", "x,w,<", 0x3000, 0xf803, WR_x|RD_y, 0, 0 },
-{"sll", "y,x", 0xe804, 0xf81f, WR_y|RD_y|RD_x, 0, 0 },
-{"slti", "x,8", 0x5000, 0xf800, WR_T|RD_x, 0, 0 },
-{"slt", "x,y", 0xe802, 0xf81f, WR_T|RD_x|RD_y, 0, 0 },
-{"slt", "x,8", 0x5000, 0xf800, WR_T|RD_x, 0, 0 },
-{"sltiu", "x,8", 0x5800, 0xf800, WR_T|RD_x, 0, 0 },
-{"sltu", "x,y", 0xe803, 0xf81f, WR_T|RD_x|RD_y, 0, 0 },
-{"sltu", "x,8", 0x5800, 0xf800, WR_T|RD_x, 0, 0 },
-{"srav", "y,x", 0xe807, 0xf81f, WR_y|RD_y|RD_x, 0, 0 },
-{"sra", "x,w,<", 0x3003, 0xf803, WR_x|RD_y, 0, 0 },
-{"sra", "y,x", 0xe807, 0xf81f, WR_y|RD_y|RD_x, 0, 0 },
-{"srlv", "y,x", 0xe806, 0xf81f, WR_y|RD_y|RD_x, 0, 0 },
-{"srl", "x,w,<", 0x3002, 0xf803, WR_x|RD_y, 0, 0 },
-{"srl", "y,x", 0xe806, 0xf81f, WR_y|RD_y|RD_x, 0, 0 },
-{"subu", "z,v,y", 0xe003, 0xf803, WR_z|RD_x|RD_y, 0, 0 },
-{"subu", "y,x,4", 0, (int) M_SUBU_I, INSN_MACRO, 0, 0 },
-{"subu", "x,k", 0, (int) M_SUBU_I_2, INSN_MACRO,0, 0 },
-{"sw", "y,W(x)", 0xd800, 0xf800, RD_y|RD_x, 0, 0 },
-{"sw", "x,V(S)", 0xd000, 0xf800, RD_x|RD_SP, 0, 0 },
-{"sw", "R,V(S)", 0x6200, 0xff00, RD_31|RD_SP, 0, 0 },
-{"xor", "x,y", 0xe80e, 0xf81f, WR_x|RD_x|RD_y, 0, 0 },
+{"sd", "R,C(S)", 0xfa00, 0xff00, RD_31|RD_PC, 0, I1 },
+{"sh", "y,H(x)", 0xc800, 0xf800, RD_y|RD_x, 0, I1 },
+{"sllv", "y,x", 0xe804, 0xf81f, WR_y|RD_y|RD_x, 0, I1 },
+{"sll", "x,w,<", 0x3000, 0xf803, WR_x|RD_y, 0, I1 },
+{"sll", "y,x", 0xe804, 0xf81f, WR_y|RD_y|RD_x, 0, I1 },
+{"slti", "x,8", 0x5000, 0xf800, WR_T|RD_x, 0, I1 },
+{"slt", "x,y", 0xe802, 0xf81f, WR_T|RD_x|RD_y, 0, I1 },
+{"slt", "x,8", 0x5000, 0xf800, WR_T|RD_x, 0, I1 },
+{"sltiu", "x,8", 0x5800, 0xf800, WR_T|RD_x, 0, I1 },
+{"sltu", "x,y", 0xe803, 0xf81f, WR_T|RD_x|RD_y, 0, I1 },
+{"sltu", "x,8", 0x5800, 0xf800, WR_T|RD_x, 0, I1 },
+{"srav", "y,x", 0xe807, 0xf81f, WR_y|RD_y|RD_x, 0, I1 },
+{"sra", "x,w,<", 0x3003, 0xf803, WR_x|RD_y, 0, I1 },
+{"sra", "y,x", 0xe807, 0xf81f, WR_y|RD_y|RD_x, 0, I1 },
+{"srlv", "y,x", 0xe806, 0xf81f, WR_y|RD_y|RD_x, 0, I1 },
+{"srl", "x,w,<", 0x3002, 0xf803, WR_x|RD_y, 0, I1 },
+{"srl", "y,x", 0xe806, 0xf81f, WR_y|RD_y|RD_x, 0, I1 },
+{"subu", "z,v,y", 0xe003, 0xf803, WR_z|RD_x|RD_y, 0, I1 },
+{"subu", "y,x,4", 0, (int) M_SUBU_I, INSN_MACRO, 0, I1 },
+{"subu", "x,k", 0, (int) M_SUBU_I_2, INSN_MACRO,0, I1 },
+{"sw", "y,W(x)", 0xd800, 0xf800, RD_y|RD_x, 0, I1 },
+{"sw", "x,V(S)", 0xd000, 0xf800, RD_x|RD_SP, 0, I1 },
+{"sw", "R,V(S)", 0x6200, 0xff00, RD_31|RD_SP, 0, I1 },
+{"xor", "x,y", 0xe80e, 0xf81f, WR_x|RD_x|RD_y, 0, I1 },
/* MIPS16e additions */
-{"jalrc", "x", 0xe8c0, 0xf8ff, WR_31|RD_x|TRAP, 0, 0 },
-{"jalrc", "R,x", 0xe8c0, 0xf8ff, WR_31|RD_x|TRAP, 0, 0 },
-{"jrc", "x", 0xe880, 0xf8ff, RD_x|TRAP, 0, 0 },
-{"jrc", "R", 0xe8a0, 0xffff, RD_31|TRAP, 0, 0 },
-{"restore", "M", 0x6400, 0xff80, WR_31|RD_SP|WR_SP|TRAP, 0, 0 },
-{"save", "m", 0x6480, 0xff80, RD_31|RD_SP|WR_SP|TRAP, 0, 0 },
-{"seb", "x", 0xe891, 0xf8ff, WR_x|RD_x, 0, 0 },
-{"seh", "x", 0xe8b1, 0xf8ff, WR_x|RD_x, 0, 0 },
-{"sew", "x", 0xe8d1, 0xf8ff, WR_x|RD_x, 0, I3 },
-{"zeb", "x", 0xe811, 0xf8ff, WR_x|RD_x, 0, 0 },
-{"zeh", "x", 0xe831, 0xf8ff, WR_x|RD_x, 0, 0 },
-{"zew", "x", 0xe851, 0xf8ff, WR_x|RD_x, 0, I3 },
+{"jalrc", "x", 0xe8c0, 0xf8ff, WR_31|RD_x|TRAP, 0, I32 },
+{"jalrc", "R,x", 0xe8c0, 0xf8ff, WR_31|RD_x|TRAP, 0, I32 },
+{"jrc", "x", 0xe880, 0xf8ff, RD_x|TRAP, 0, I32 },
+{"jrc", "R", 0xe8a0, 0xffff, RD_31|TRAP, 0, I32 },
+{"restore", "M", 0x6400, 0xff80, WR_31|RD_SP|WR_SP|TRAP, 0, I32 },
+{"save", "m", 0x6480, 0xff80, RD_31|RD_SP|WR_SP|TRAP, 0, I32 },
+{"sdbbp", "6", 0xe801, 0xf81f, TRAP, 0, I32 },
+{"seb", "x", 0xe891, 0xf8ff, WR_x|RD_x, 0, I32 },
+{"seh", "x", 0xe8b1, 0xf8ff, WR_x|RD_x, 0, I32 },
+{"sew", "x", 0xe8d1, 0xf8ff, WR_x|RD_x, 0, I64 },
+{"zeb", "x", 0xe811, 0xf8ff, WR_x|RD_x, 0, I32 },
+{"zeh", "x", 0xe831, 0xf8ff, WR_x|RD_x, 0, I32 },
+{"zew", "x", 0xe851, 0xf8ff, WR_x|RD_x, 0, I64 },
};
const int bfd_mips16_num_opcodes =
diff --git a/contrib/binutils/opcodes/po/Make-in b/contrib/binutils/opcodes/po/Make-in
index 199100d..9bc5bb1 100644
--- a/contrib/binutils/opcodes/po/Make-in
+++ b/contrib/binutils/opcodes/po/Make-in
@@ -16,6 +16,7 @@ SHELL = /bin/sh
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
+top_builddir = @top_builddir@
prefix = @prefix@
exec_prefix = @exec_prefix@
@@ -72,7 +73,7 @@ INSTOBJEXT = @INSTOBJEXT@
$(MSGFMT) -o $@ $<
.po.gmo:
- file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+ file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
diff --git a/contrib/binutils/opcodes/po/POTFILES.in b/contrib/binutils/opcodes/po/POTFILES.in
index 67e98c4..c8837a0 100644
--- a/contrib/binutils/opcodes/po/POTFILES.in
+++ b/contrib/binutils/opcodes/po/POTFILES.in
@@ -12,6 +12,8 @@ cgen-dis.c
cgen-opc.c
cgen-ops.h
cgen-types.h
+cr16-dis.c
+cr16-opc.c
cris-dis.c
cris-opc.c
crx-dis.c
@@ -45,6 +47,10 @@ hppa-dis.c
i370-dis.c
i370-opc.c
i386-dis.c
+i386-gen.c
+i386-opc.c
+i386-opc.h
+i386-tbl.h
i860-dis.c
i960-dis.c
ia64-asmtab.c
@@ -100,6 +106,13 @@ m88k-dis.c
maxq-dis.c
mcore-dis.c
mcore-opc.h
+mep-asm.c
+mep-desc.c
+mep-desc.h
+mep-dis.c
+mep-ibld.c
+mep-opc.c
+mep-opc.h
mips16-opc.c
mips-dis.c
mips-opc.c
@@ -131,6 +144,8 @@ ppc-opc.c
s390-dis.c
s390-mkopc.c
s390-opc.c
+score-dis.c
+score-opc.h
sh64-dis.c
sh64-opc.c
sh64-opc.h
@@ -138,6 +153,8 @@ sh-dis.c
sh-opc.h
sparc-dis.c
sparc-opc.c
+spu-dis.c
+spu-opc.c
sysdep.h
tic30-dis.c
tic4x-dis.c
diff --git a/contrib/binutils/opcodes/po/opcodes.pot b/contrib/binutils/opcodes/po/opcodes.pot
index e387290..a988933 100644
--- a/contrib/binutils/opcodes/po/opcodes.pot
+++ b/contrib/binutils/opcodes/po/opcodes.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-10-25 10:50+0930\n"
+"POT-Creation-Date: 2007-07-01 13:40+0930\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -110,23 +110,23 @@ msgstr ""
msgid "must specify .jd or no nullify suffix"
msgstr ""
-#: arm-dis.c:1302
+#: arm-dis.c:1807
msgid "<illegal precision>"
msgstr ""
#. XXX - should break 'option' at following delimiter.
-#: arm-dis.c:2746
+#: arm-dis.c:3817
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr ""
#. XXX - should break 'option' at following delimiter.
-#: arm-dis.c:2754
+#: arm-dis.c:3825
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr ""
-#: arm-dis.c:2916
+#: arm-dis.c:4225
#, c-format
msgid ""
"\n"
@@ -134,24 +134,24 @@ msgid ""
"the -M switch:\n"
msgstr ""
-#: avr-dis.c:109 avr-dis.c:119
+#: avr-dis.c:112 avr-dis.c:122
#, c-format
msgid "undefined"
msgstr ""
-#: avr-dis.c:176
+#: avr-dis.c:184
#, c-format
msgid "Internal disassembler error"
msgstr ""
-#: avr-dis.c:225
+#: avr-dis.c:233
#, c-format
msgid "unknown constraint `%c'"
msgstr ""
-#: cgen-asm.c:336 fr30-ibld.c:192 frv-ibld.c:192 ip2k-ibld.c:192
-#: iq2000-ibld.c:192 m32c-ibld.c:192 m32r-ibld.c:192 ms1-ibld.c:192
-#: openrisc-ibld.c:192 xstormy16-ibld.c:192
+#: cgen-asm.c:336 fr30-ibld.c:200 frv-ibld.c:200 ip2k-ibld.c:200
+#: iq2000-ibld.c:200 m32c-ibld.c:200 m32r-ibld.c:200 mep-ibld.c:200
+#: mt-ibld.c:200 openrisc-ibld.c:200 xc16x-ibld.c:200 xstormy16-ibld.c:200
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr ""
@@ -177,7 +177,7 @@ msgstr ""
msgid "Address 0x%s is out of bounds.\n"
msgstr ""
-#: fr30-asm.c:92 m32c-asm.c:782 m32c-asm.c:789
+#: fr30-asm.c:92 m32c-asm.c:876 m32c-asm.c:883
msgid "Register number is not valid"
msgstr ""
@@ -189,141 +189,144 @@ msgstr ""
msgid "Register must be between r8 and r15"
msgstr ""
-#: fr30-asm.c:115 m32c-asm.c:820
+#: fr30-asm.c:115 m32c-asm.c:914
msgid "Register list is not valid"
msgstr ""
-#: fr30-asm.c:309 frv-asm.c:1262 ip2k-asm.c:510 iq2000-asm.c:456
-#: m32c-asm.c:1476 m32r-asm.c:323 ms1-asm.c:546 openrisc-asm.c:240
-#: xstormy16-asm.c:275
+#: fr30-asm.c:309 frv-asm.c:1262 ip2k-asm.c:510 iq2000-asm.c:458
+#: m32c-asm.c:1588 m32r-asm.c:327 mep-asm.c:1000 mt-asm.c:594
+#: openrisc-asm.c:240 xc16x-asm.c:375 xstormy16-asm.c:275
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr ""
-#: fr30-asm.c:357 frv-asm.c:1310 ip2k-asm.c:558 iq2000-asm.c:504
-#: m32c-asm.c:1524 m32r-asm.c:371 ms1-asm.c:594 openrisc-asm.c:288
-#: xstormy16-asm.c:323
+#: fr30-asm.c:360 frv-asm.c:1313 ip2k-asm.c:561 iq2000-asm.c:509
+#: m32c-asm.c:1639 m32r-asm.c:378 mep-asm.c:1051 mt-asm.c:645
+#: openrisc-asm.c:291 xc16x-asm.c:426 xstormy16-asm.c:326
msgid "missing mnemonic in syntax string"
msgstr ""
#. We couldn't parse it.
-#: fr30-asm.c:492 fr30-asm.c:496 fr30-asm.c:583 fr30-asm.c:684 frv-asm.c:1445
-#: frv-asm.c:1449 frv-asm.c:1536 frv-asm.c:1637 ip2k-asm.c:693 ip2k-asm.c:697
-#: ip2k-asm.c:784 ip2k-asm.c:885 iq2000-asm.c:639 iq2000-asm.c:643
-#: iq2000-asm.c:730 iq2000-asm.c:831 m32c-asm.c:1659 m32c-asm.c:1663
-#: m32c-asm.c:1750 m32c-asm.c:1851 m32r-asm.c:506 m32r-asm.c:510
-#: m32r-asm.c:597 m32r-asm.c:698 ms1-asm.c:729 ms1-asm.c:733 ms1-asm.c:820
-#: ms1-asm.c:921 openrisc-asm.c:423 openrisc-asm.c:427 openrisc-asm.c:514
-#: openrisc-asm.c:615 xstormy16-asm.c:458 xstormy16-asm.c:462
-#: xstormy16-asm.c:549 xstormy16-asm.c:650
+#: fr30-asm.c:495 fr30-asm.c:499 fr30-asm.c:586 fr30-asm.c:687 frv-asm.c:1448
+#: frv-asm.c:1452 frv-asm.c:1539 frv-asm.c:1640 ip2k-asm.c:696 ip2k-asm.c:700
+#: ip2k-asm.c:787 ip2k-asm.c:888 iq2000-asm.c:644 iq2000-asm.c:648
+#: iq2000-asm.c:735 iq2000-asm.c:836 m32c-asm.c:1774 m32c-asm.c:1778
+#: m32c-asm.c:1865 m32c-asm.c:1966 m32r-asm.c:513 m32r-asm.c:517
+#: m32r-asm.c:604 m32r-asm.c:705 mep-asm.c:1186 mep-asm.c:1190 mep-asm.c:1277
+#: mep-asm.c:1378 mt-asm.c:780 mt-asm.c:784 mt-asm.c:871 mt-asm.c:972
+#: openrisc-asm.c:426 openrisc-asm.c:430 openrisc-asm.c:517 openrisc-asm.c:618
+#: xc16x-asm.c:561 xc16x-asm.c:565 xc16x-asm.c:652 xc16x-asm.c:753
+#: xstormy16-asm.c:461 xstormy16-asm.c:465 xstormy16-asm.c:552
+#: xstormy16-asm.c:653
msgid "unrecognized instruction"
msgstr ""
-#: fr30-asm.c:539 frv-asm.c:1492 ip2k-asm.c:740 iq2000-asm.c:686
-#: m32c-asm.c:1706 m32r-asm.c:553 ms1-asm.c:776 openrisc-asm.c:470
-#: xstormy16-asm.c:505
+#: fr30-asm.c:542 frv-asm.c:1495 ip2k-asm.c:743 iq2000-asm.c:691
+#: m32c-asm.c:1821 m32r-asm.c:560 mep-asm.c:1233 mt-asm.c:827
+#: openrisc-asm.c:473 xc16x-asm.c:608 xstormy16-asm.c:508
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr ""
-#: fr30-asm.c:549 frv-asm.c:1502 ip2k-asm.c:750 iq2000-asm.c:696
-#: m32c-asm.c:1716 m32r-asm.c:563 ms1-asm.c:786 openrisc-asm.c:480
-#: xstormy16-asm.c:515
+#: fr30-asm.c:552 frv-asm.c:1505 ip2k-asm.c:753 iq2000-asm.c:701
+#: m32c-asm.c:1831 m32r-asm.c:570 mep-asm.c:1243 mt-asm.c:837
+#: openrisc-asm.c:483 xc16x-asm.c:618 xstormy16-asm.c:518
#, c-format
msgid "syntax error (expected char `%c', found end of instruction)"
msgstr ""
-#: fr30-asm.c:577 frv-asm.c:1530 ip2k-asm.c:778 iq2000-asm.c:724
-#: m32c-asm.c:1744 m32r-asm.c:591 ms1-asm.c:814 openrisc-asm.c:508
-#: xstormy16-asm.c:543
+#: fr30-asm.c:580 frv-asm.c:1533 ip2k-asm.c:781 iq2000-asm.c:729
+#: m32c-asm.c:1859 m32r-asm.c:598 mep-asm.c:1271 mt-asm.c:865
+#: openrisc-asm.c:511 xc16x-asm.c:646 xstormy16-asm.c:546
msgid "junk at end of line"
msgstr ""
-#: fr30-asm.c:683 frv-asm.c:1636 ip2k-asm.c:884 iq2000-asm.c:830
-#: m32c-asm.c:1850 m32r-asm.c:697 ms1-asm.c:920 openrisc-asm.c:614
-#: xstormy16-asm.c:649
+#: fr30-asm.c:686 frv-asm.c:1639 ip2k-asm.c:887 iq2000-asm.c:835
+#: m32c-asm.c:1965 m32r-asm.c:704 mep-asm.c:1377 mt-asm.c:971
+#: openrisc-asm.c:617 xc16x-asm.c:752 xstormy16-asm.c:652
msgid "unrecognized form of instruction"
msgstr ""
-#: fr30-asm.c:695 frv-asm.c:1648 ip2k-asm.c:896 iq2000-asm.c:842
-#: m32c-asm.c:1862 m32r-asm.c:709 ms1-asm.c:932 openrisc-asm.c:626
-#: xstormy16-asm.c:661
+#: fr30-asm.c:698 frv-asm.c:1651 ip2k-asm.c:899 iq2000-asm.c:847
+#: m32c-asm.c:1977 m32r-asm.c:716 mep-asm.c:1389 mt-asm.c:983
+#: openrisc-asm.c:629 xc16x-asm.c:764 xstormy16-asm.c:664
#, c-format
msgid "bad instruction `%.50s...'"
msgstr ""
-#: fr30-asm.c:698 frv-asm.c:1651 ip2k-asm.c:899 iq2000-asm.c:845
-#: m32c-asm.c:1865 m32r-asm.c:712 ms1-asm.c:935 openrisc-asm.c:629
-#: xstormy16-asm.c:664
+#: fr30-asm.c:701 frv-asm.c:1654 ip2k-asm.c:902 iq2000-asm.c:850
+#: m32c-asm.c:1980 m32r-asm.c:719 mep-asm.c:1392 mt-asm.c:986
+#: openrisc-asm.c:632 xc16x-asm.c:767 xstormy16-asm.c:667
#, c-format
msgid "bad instruction `%.50s'"
msgstr ""
#. Default text to print if an instruction isn't recognized.
#: fr30-dis.c:41 frv-dis.c:41 ip2k-dis.c:41 iq2000-dis.c:41 m32c-dis.c:41
-#: m32r-dis.c:41 mmix-dis.c:278 ms1-dis.c:41 openrisc-dis.c:41
-#: xstormy16-dis.c:41
+#: m32r-dis.c:41 mep-dis.c:41 mmix-dis.c:278 mt-dis.c:41 openrisc-dis.c:41
+#: xc16x-dis.c:41 xstormy16-dis.c:41
msgid "*unknown*"
msgstr ""
-#: fr30-dis.c:299 frv-dis.c:396 ip2k-dis.c:288 iq2000-dis.c:189 m32c-dis.c:860
-#: m32r-dis.c:256 ms1-dis.c:258 openrisc-dis.c:135 xstormy16-dis.c:168
+#: fr30-dis.c:299 frv-dis.c:396 ip2k-dis.c:288 iq2000-dis.c:189 m32c-dis.c:891
+#: m32r-dis.c:256 mep-dis.c:776 mt-dis.c:290 openrisc-dis.c:135
+#: xc16x-dis.c:375 xstormy16-dis.c:168
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr ""
#: fr30-ibld.c:163 frv-ibld.c:163 ip2k-ibld.c:163 iq2000-ibld.c:163
-#: m32c-ibld.c:163 m32r-ibld.c:163 ms1-ibld.c:163 openrisc-ibld.c:163
-#: xstormy16-ibld.c:163
+#: m32c-ibld.c:163 m32r-ibld.c:163 mep-ibld.c:163 mt-ibld.c:163
+#: openrisc-ibld.c:163 xc16x-ibld.c:163 xstormy16-ibld.c:163
#, c-format
msgid "operand out of range (%ld not between %ld and %lu)"
msgstr ""
-#: fr30-ibld.c:176 frv-ibld.c:176 ip2k-ibld.c:176 iq2000-ibld.c:176
-#: m32c-ibld.c:176 m32r-ibld.c:176 ms1-ibld.c:176 openrisc-ibld.c:176
-#: xstormy16-ibld.c:176
+#: fr30-ibld.c:184 frv-ibld.c:184 ip2k-ibld.c:184 iq2000-ibld.c:184
+#: m32c-ibld.c:184 m32r-ibld.c:184 mep-ibld.c:184 mt-ibld.c:184
+#: openrisc-ibld.c:184 xc16x-ibld.c:184 xstormy16-ibld.c:184
#, c-format
-msgid "operand out of range (%lu not between 0 and %lu)"
+msgid "operand out of range (0x%lx not between 0 and 0x%lx)"
msgstr ""
-#: fr30-ibld.c:719 frv-ibld.c:845 ip2k-ibld.c:596 iq2000-ibld.c:702
-#: m32c-ibld.c:1668 m32r-ibld.c:654 ms1-ibld.c:713 openrisc-ibld.c:622
-#: xstormy16-ibld.c:667
+#: fr30-ibld.c:726 frv-ibld.c:852 ip2k-ibld.c:603 iq2000-ibld.c:709
+#: m32c-ibld.c:1727 m32r-ibld.c:661 mep-ibld.c:1024 mt-ibld.c:745
+#: openrisc-ibld.c:629 xc16x-ibld.c:748 xstormy16-ibld.c:674
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr ""
-#: fr30-ibld.c:924 frv-ibld.c:1162 ip2k-ibld.c:671 iq2000-ibld.c:877
-#: m32c-ibld.c:2780 m32r-ibld.c:791 ms1-ibld.c:907 openrisc-ibld.c:722
-#: xstormy16-ibld.c:813
+#: fr30-ibld.c:931 frv-ibld.c:1169 ip2k-ibld.c:678 iq2000-ibld.c:884
+#: m32c-ibld.c:2888 m32r-ibld.c:798 mep-ibld.c:1444 mt-ibld.c:965
+#: openrisc-ibld.c:729 xc16x-ibld.c:968 xstormy16-ibld.c:820
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr ""
-#: fr30-ibld.c:1070 frv-ibld.c:1440 ip2k-ibld.c:745 iq2000-ibld.c:1008
-#: m32c-ibld.c:3379 m32r-ibld.c:904 ms1-ibld.c:1086 openrisc-ibld.c:799
-#: xstormy16-ibld.c:923
+#: fr30-ibld.c:1077 frv-ibld.c:1447 ip2k-ibld.c:752 iq2000-ibld.c:1015
+#: m32c-ibld.c:3505 m32r-ibld.c:911 mep-ibld.c:1737 mt-ibld.c:1165
+#: openrisc-ibld.c:806 xc16x-ibld.c:1189 xstormy16-ibld.c:930
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1198 frv-ibld.c:1700 ip2k-ibld.c:801 iq2000-ibld.c:1121
-#: m32c-ibld.c:3960 m32r-ibld.c:999 ms1-ibld.c:1247 openrisc-ibld.c:858
-#: xstormy16-ibld.c:1015
+#: fr30-ibld.c:1205 frv-ibld.c:1707 ip2k-ibld.c:808 iq2000-ibld.c:1128
+#: m32c-ibld.c:4104 m32r-ibld.c:1006 mep-ibld.c:2012 mt-ibld.c:1347
+#: openrisc-ibld.c:865 xc16x-ibld.c:1392 xstormy16-ibld.c:1022
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr ""
-#: fr30-ibld.c:1329 frv-ibld.c:1967 ip2k-ibld.c:860 iq2000-ibld.c:1241
-#: m32c-ibld.c:4529 m32r-ibld.c:1100 ms1-ibld.c:1415 openrisc-ibld.c:924
-#: xstormy16-ibld.c:1114
+#: fr30-ibld.c:1336 frv-ibld.c:1974 ip2k-ibld.c:867 iq2000-ibld.c:1248
+#: m32c-ibld.c:4691 m32r-ibld.c:1107 mep-ibld.c:2271 mt-ibld.c:1536
+#: openrisc-ibld.c:931 xc16x-ibld.c:1596 xstormy16-ibld.c:1121
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1450 frv-ibld.c:2224 ip2k-ibld.c:909 iq2000-ibld.c:1351
-#: m32c-ibld.c:5088 m32r-ibld.c:1191 ms1-ibld.c:1573 openrisc-ibld.c:980
-#: xstormy16-ibld.c:1203
+#: fr30-ibld.c:1457 frv-ibld.c:2231 ip2k-ibld.c:916 iq2000-ibld.c:1358
+#: m32c-ibld.c:5268 m32r-ibld.c:1198 mep-ibld.c:2520 mt-ibld.c:1715
+#: openrisc-ibld.c:987 xc16x-ibld.c:1790 xstormy16-ibld.c:1210
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr ""
@@ -346,8 +349,9 @@ msgstr ""
#. -- assembler routines inserted here.
#. -- asm.c
-#: frv-asm.c:971 iq2000-asm.c:55 m32c-asm.c:140 m32c-asm.c:211 m32c-asm.c:253
-#: m32c-asm.c:312 m32c-asm.c:334 m32r-asm.c:52 openrisc-asm.c:53
+#: frv-asm.c:971 iq2000-asm.c:55 m32c-asm.c:140 m32c-asm.c:236 m32c-asm.c:278
+#: m32c-asm.c:337 m32c-asm.c:359 m32r-asm.c:52 mep-asm.c:231 mep-asm.c:249
+#: mep-asm.c:264 mep-asm.c:279 mep-asm.c:291 openrisc-asm.c:53
msgid "missing `)'"
msgstr ""
@@ -372,116 +376,188 @@ msgstr ""
msgid "%02x\t\t*unknown*"
msgstr ""
-#: i386-dis.c:1742
+#: i386-dis.c:3194
msgid "<internal disassembler error>"
msgstr ""
-#: ia64-gen.c:297
+#: i386-dis.c:3421
+#, c-format
+msgid ""
+"\n"
+"The following i386/x86-64 specific disassembler options are supported for "
+"use\n"
+"with the -M switch (multiple options should be separated by commas):\n"
+msgstr ""
+
+#: i386-dis.c:3425
+#, c-format
+msgid " x86-64 Disassemble in 64bit mode\n"
+msgstr ""
+
+#: i386-dis.c:3426
+#, c-format
+msgid " i386 Disassemble in 32bit mode\n"
+msgstr ""
+
+#: i386-dis.c:3427
+#, c-format
+msgid " i8086 Disassemble in 16bit mode\n"
+msgstr ""
+
+#: i386-dis.c:3428
+#, c-format
+msgid " att Display instruction in AT&T syntax\n"
+msgstr ""
+
+#: i386-dis.c:3429
+#, c-format
+msgid " intel Display instruction in Intel syntax\n"
+msgstr ""
+
+#: i386-dis.c:3430
+#, c-format
+msgid " addr64 Assume 64bit address size\n"
+msgstr ""
+
+#: i386-dis.c:3431
+#, c-format
+msgid " addr32 Assume 32bit address size\n"
+msgstr ""
+
+#: i386-dis.c:3432
+#, c-format
+msgid " addr16 Assume 16bit address size\n"
+msgstr ""
+
+#: i386-dis.c:3433
+#, c-format
+msgid " data32 Assume 32bit data size\n"
+msgstr ""
+
+#: i386-dis.c:3434
+#, c-format
+msgid " data16 Assume 16bit data size\n"
+msgstr ""
+
+#: i386-dis.c:3435
+#, c-format
+msgid " suffix Always display instruction suffix in AT&T syntax\n"
+msgstr ""
+
+#: i386-gen.c:41 ia64-gen.c:306
#, c-format
msgid "%s: Error: "
msgstr ""
-#: ia64-gen.c:310
+#: i386-gen.c:108
+msgid "can't find i386-opc.tbl for reading\n"
+msgstr ""
+
+#: i386-gen.c:259
+msgid "can't find i386-reg.tbl for reading\n"
+msgstr ""
+
+#: i386-gen.c:385 ia64-gen.c:2840
+#, c-format
+msgid "unable to change directory to \"%s\", errno = %s\n"
+msgstr ""
+
+#: ia64-gen.c:319
#, c-format
msgid "%s: Warning: "
msgstr ""
-#: ia64-gen.c:496 ia64-gen.c:730
+#: ia64-gen.c:505 ia64-gen.c:739
#, c-format
msgid "multiple note %s not handled\n"
msgstr ""
-#: ia64-gen.c:607
+#: ia64-gen.c:616
msgid "can't find ia64-ic.tbl for reading\n"
msgstr ""
-#: ia64-gen.c:812
+#: ia64-gen.c:821
#, c-format
msgid "can't find %s for reading\n"
msgstr ""
-#: ia64-gen.c:1036
+#: ia64-gen.c:1045
#, c-format
msgid ""
"most recent format '%s'\n"
"appears more restrictive than '%s'\n"
msgstr ""
-#: ia64-gen.c:1047
+#: ia64-gen.c:1056
#, c-format
msgid "overlapping field %s->%s\n"
msgstr ""
-#: ia64-gen.c:1244
+#: ia64-gen.c:1253
#, c-format
msgid "overwriting note %d with note %d (IC:%s)\n"
msgstr ""
-#: ia64-gen.c:1443
+#: ia64-gen.c:1454
#, c-format
msgid "don't know how to specify %% dependency %s\n"
msgstr ""
-#: ia64-gen.c:1465
+#: ia64-gen.c:1476
#, c-format
msgid "Don't know how to specify # dependency %s\n"
msgstr ""
-#: ia64-gen.c:1504
+#: ia64-gen.c:1515
#, c-format
msgid "IC:%s [%s] has no terminals or sub-classes\n"
msgstr ""
-#: ia64-gen.c:1507
+#: ia64-gen.c:1518
#, c-format
msgid "IC:%s has no terminals or sub-classes\n"
msgstr ""
-#: ia64-gen.c:1516
+#: ia64-gen.c:1527
#, c-format
msgid "no insns mapped directly to terminal IC %s [%s]"
msgstr ""
-#: ia64-gen.c:1519
+#: ia64-gen.c:1530
#, c-format
msgid "no insns mapped directly to terminal IC %s\n"
msgstr ""
-#: ia64-gen.c:1530
+#: ia64-gen.c:1541
#, c-format
msgid "class %s is defined but not used\n"
msgstr ""
-#: ia64-gen.c:1541
+#: ia64-gen.c:1552
#, c-format
msgid "Warning: rsrc %s (%s) has no chks%s\n"
msgstr ""
-#: ia64-gen.c:1545
+#: ia64-gen.c:1556
#, c-format
msgid "rsrc %s (%s) has no regs\n"
msgstr ""
-#: ia64-gen.c:2444
+#: ia64-gen.c:2468
#, c-format
msgid "IC note %d in opcode %s (IC:%s) conflicts with resource %s note %d\n"
msgstr ""
-#: ia64-gen.c:2472
+#: ia64-gen.c:2496
#, c-format
msgid "IC note %d for opcode %s (IC:%s) conflicts with resource %s note %d\n"
msgstr ""
-#: ia64-gen.c:2486
+#: ia64-gen.c:2510
#, c-format
msgid "opcode %s has no class (ops %d %d %d)\n"
msgstr ""
-#: ia64-gen.c:2816
-#, c-format
-msgid "unable to change directory to \"%s\", errno = %s\n"
-msgstr ""
-
#. We've been passed a w. Return with an error message so that
#. cgen will try the next parsing option.
#: ip2k-asm.c:80
@@ -565,7 +641,7 @@ msgstr ""
msgid "%dsp8() takes a symbolic address, not a number"
msgstr ""
-#: m32c-asm.c:159 m32c-asm.c:163 m32c-asm.c:229
+#: m32c-asm.c:159 m32c-asm.c:163 m32c-asm.c:254
msgid "dsp:8 immediate is out of range"
msgstr ""
@@ -573,57 +649,69 @@ msgstr ""
msgid "Immediate is out of range -8 to 7"
msgstr ""
-#: m32c-asm.c:259
+#: m32c-asm.c:209 m32c-asm.c:213
+msgid "Immediate is out of range -7 to 8"
+msgstr ""
+
+#: m32c-asm.c:284
#, c-format
msgid "%dsp16() takes a symbolic address, not a number"
msgstr ""
-#: m32c-asm.c:282 m32c-asm.c:289 m32c-asm.c:352
+#: m32c-asm.c:307 m32c-asm.c:314 m32c-asm.c:377
msgid "dsp:16 immediate is out of range"
msgstr ""
-#: m32c-asm.c:378
+#: m32c-asm.c:403
msgid "dsp:20 immediate is out of range"
msgstr ""
-#: m32c-asm.c:404
+#: m32c-asm.c:429 m32c-asm.c:449
msgid "dsp:24 immediate is out of range"
msgstr ""
-#: m32c-asm.c:437
+#: m32c-asm.c:482
msgid "immediate is out of range 1-2"
msgstr ""
-#: m32c-asm.c:455
+#: m32c-asm.c:500
msgid "immediate is out of range 1-8"
msgstr ""
-#: m32c-asm.c:491
+#: m32c-asm.c:518
+msgid "immediate is out of range 0-7"
+msgstr ""
+
+#: m32c-asm.c:554
msgid "immediate is out of range 2-9"
msgstr ""
-#: m32c-asm.c:509
+#: m32c-asm.c:572
msgid "Bit number for indexing general register is out of range 0-15"
msgstr ""
-#: m32c-asm.c:541 m32c-asm.c:576
+#: m32c-asm.c:610 m32c-asm.c:666
msgid "bit,base is out of range"
msgstr ""
-#: m32c-asm.c:712
+#: m32c-asm.c:617 m32c-asm.c:622 m32c-asm.c:670
+msgid "bit,base out of range for symbol"
+msgstr ""
+
+#: m32c-asm.c:806
msgid "not a valid r0l/r0h pair"
msgstr ""
-#: m32c-asm.c:742
+#: m32c-asm.c:836
msgid "Invalid size specifier"
msgstr ""
-#: m68k-dis.c:1162
+#: m68k-dis.c:1167
#, c-format
msgid "<function code %d>"
msgstr ""
-#: m68k-dis.c:1313
+#: m68k-dis.c:1322
#, c-format
msgid "<internal error in opcode table: %s %s>\n"
msgstr ""
@@ -633,26 +721,39 @@ msgstr ""
msgid "# <dis error: %08lx>"
msgstr ""
-#: mips-dis.c:718
+#: mep-asm.c:113
+msgid "Only $tp or $13 allowed for this opcode"
+msgstr ""
+
+#: mep-asm.c:127
+msgid "Only $sp or $15 allowed for this opcode"
+msgstr ""
+
+#: mep-asm.c:298 mep-asm.c:454
+#, c-format
+msgid "invalid %function() here"
+msgstr ""
+
+#: mips-dis.c:745
msgid "# internal error, incomplete extension sequence (+)"
msgstr ""
-#: mips-dis.c:805
+#: mips-dis.c:852
#, c-format
msgid "# internal error, undefined extension sequence (+%c)"
msgstr ""
-#: mips-dis.c:1153
+#: mips-dis.c:1211
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr ""
-#: mips-dis.c:1663
+#: mips-dis.c:1818
#, c-format
msgid "# internal disassembler error, unrecognised modifier (%c)"
msgstr ""
-#: mips-dis.c:1894
+#: mips-dis.c:2049
#, c-format
msgid ""
"\n"
@@ -660,7 +761,7 @@ msgid ""
"with the -M switch (multiple options should be separated by commas):\n"
msgstr ""
-#: mips-dis.c:1898
+#: mips-dis.c:2053
#, c-format
msgid ""
"\n"
@@ -668,7 +769,7 @@ msgid ""
" Default: based on binary being disassembled.\n"
msgstr ""
-#: mips-dis.c:1902
+#: mips-dis.c:2057
#, c-format
msgid ""
"\n"
@@ -676,7 +777,7 @@ msgid ""
" Default: numeric.\n"
msgstr ""
-#: mips-dis.c:1906
+#: mips-dis.c:2061
#, c-format
msgid ""
"\n"
@@ -685,7 +786,7 @@ msgid ""
" Default: based on binary being disassembled.\n"
msgstr ""
-#: mips-dis.c:1911
+#: mips-dis.c:2066
#, c-format
msgid ""
"\n"
@@ -694,7 +795,7 @@ msgid ""
" Default: based on binary being disassembled.\n"
msgstr ""
-#: mips-dis.c:1916
+#: mips-dis.c:2071
#, c-format
msgid ""
"\n"
@@ -702,7 +803,7 @@ msgid ""
" specified ABI.\n"
msgstr ""
-#: mips-dis.c:1920
+#: mips-dis.c:2075
#, c-format
msgid ""
"\n"
@@ -710,7 +811,7 @@ msgid ""
" specified architecture.\n"
msgstr ""
-#: mips-dis.c:1924
+#: mips-dis.c:2079
#, c-format
msgid ""
"\n"
@@ -718,12 +819,12 @@ msgid ""
" "
msgstr ""
-#: mips-dis.c:1929 mips-dis.c:1937 mips-dis.c:1939
+#: mips-dis.c:2084 mips-dis.c:2092 mips-dis.c:2094
#, c-format
msgid "\n"
msgstr ""
-#: mips-dis.c:1931
+#: mips-dis.c:2086
#, c-format
msgid ""
"\n"
@@ -750,20 +851,20 @@ msgstr ""
msgid "*unknown operands type: %d*"
msgstr ""
-#: ms1-asm.c:84 ms1-asm.c:162
+#: mt-asm.c:109 mt-asm.c:189
msgid "Operand out of range. Must be between -32768 and 32767."
msgstr ""
-#: ms1-asm.c:121
+#: mt-asm.c:148
msgid "Biiiig Trouble in parse_imm16!"
msgstr ""
-#: ms1-asm.c:129
+#: mt-asm.c:156
#, c-format
msgid "%operator operand is not a symbol"
msgstr ""
-#: ms1-asm.c:367
+#: mt-asm.c:394
msgid "invalid operand. type may have values 0,1,2 only."
msgstr ""
@@ -777,111 +878,63 @@ msgstr ""
msgid "$<undefined>"
msgstr ""
-#: ppc-opc.c:800 ppc-opc.c:828
+#: ppc-opc.c:782 ppc-opc.c:810
msgid "invalid conditional option"
msgstr ""
-#: ppc-opc.c:830
+#: ppc-opc.c:812
msgid "attempt to set y bit when using + or - modifier"
msgstr ""
-#: ppc-opc.c:858
-msgid "offset not a multiple of 16"
-msgstr ""
-
-#: ppc-opc.c:877
-msgid "offset not a multiple of 2"
-msgstr ""
-
-#: ppc-opc.c:879
-msgid "offset greater than 62"
-msgstr ""
-
-#: ppc-opc.c:898 ppc-opc.c:943 ppc-opc.c:987
-msgid "offset not a multiple of 4"
-msgstr ""
-
-#: ppc-opc.c:900
-msgid "offset greater than 124"
-msgstr ""
-
-#: ppc-opc.c:919
-msgid "offset not a multiple of 8"
-msgstr ""
-
-#: ppc-opc.c:921
-msgid "offset greater than 248"
-msgstr ""
-
-#: ppc-opc.c:964
-msgid "offset not between -2048 and 2047"
-msgstr ""
-
-#: ppc-opc.c:985
-msgid "offset not between -8192 and 8191"
-msgstr ""
-
-#: ppc-opc.c:1013
+#: ppc-opc.c:844
msgid "invalid mask field"
msgstr ""
-#: ppc-opc.c:1039
+#: ppc-opc.c:870
msgid "ignoring invalid mfcr mask"
msgstr ""
-#: ppc-opc.c:1081
-msgid "ignoring least significant bits in branch offset"
-msgstr ""
-
-#: ppc-opc.c:1111 ppc-opc.c:1146
+#: ppc-opc.c:920 ppc-opc.c:955
msgid "illegal bitmask"
msgstr ""
-#: ppc-opc.c:1211
-msgid "value out of range"
-msgstr ""
-
-#: ppc-opc.c:1279
+#: ppc-opc.c:1075
msgid "index register in load range"
msgstr ""
-#: ppc-opc.c:1295
+#: ppc-opc.c:1091
msgid "source and target register operands must be different"
msgstr ""
-#: ppc-opc.c:1310
+#: ppc-opc.c:1106
msgid "invalid register operand when updating"
msgstr ""
-#: ppc-opc.c:1349
-msgid "target register operand must be even"
-msgstr ""
-
-#: ppc-opc.c:1363
-msgid "source register operand must be even"
+#: ppc-opc.c:1188
+msgid "invalid sprg number"
msgstr ""
-#: ppc-opc.c:1420
-msgid "invalid sprg number"
+#: score-dis.c:220 score-dis.c:383
+msgid "<illegal instruction>"
msgstr ""
-#: sparc-dis.c:269
+#: sparc-dis.c:280
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:280
+#: sparc-dis.c:291
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:330
+#: sparc-dis.c:341
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr ""
#. Mark as non-valid instruction.
-#: sparc-dis.c:984
+#: sparc-dis.c:1011
msgid "unknown"
msgstr ""
@@ -944,6 +997,30 @@ msgstr ""
msgid "immediate value must be even"
msgstr ""
+#: xc16x-asm.c:65
+msgid "Missing '#' prefix"
+msgstr ""
+
+#: xc16x-asm.c:81
+msgid "Missing '.' prefix"
+msgstr ""
+
+#: xc16x-asm.c:97
+msgid "Missing 'pof:' prefix"
+msgstr ""
+
+#: xc16x-asm.c:113
+msgid "Missing 'pag:' prefix"
+msgstr ""
+
+#: xc16x-asm.c:129
+msgid "Missing 'sof:' prefix"
+msgstr ""
+
+#: xc16x-asm.c:145
+msgid "Missing 'seg:' prefix"
+msgstr ""
+
#: xstormy16-asm.c:70
msgid "Bad register in preincrement"
msgstr ""
diff --git a/contrib/binutils/opcodes/ppc-dis.c b/contrib/binutils/opcodes/ppc-dis.c
index 35875d1..2545a36 100644
--- a/contrib/binutils/opcodes/ppc-dis.c
+++ b/contrib/binutils/opcodes/ppc-dis.c
@@ -1,5 +1,5 @@
/* ppc-dis.c -- Disassemble PowerPC instructions
- Copyright 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 1994, 1995, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
@@ -61,6 +61,10 @@ powerpc_dialect (struct disassemble_info *info)
else if (info->disassembler_options
&& strstr (info->disassembler_options, "e300") != NULL)
dialect |= PPC_OPCODE_E300 | PPC_OPCODE_CLASSIC | PPC_OPCODE_COMMON;
+ else if (info->disassembler_options
+ && strstr (info->disassembler_options, "440") != NULL)
+ dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_32
+ | PPC_OPCODE_440 | PPC_OPCODE_ISEL | PPC_OPCODE_RFMCI;
else
dialect |= (PPC_OPCODE_403 | PPC_OPCODE_601 | PPC_OPCODE_CLASSIC
| PPC_OPCODE_COMMON | PPC_OPCODE_ALTIVEC);
@@ -74,6 +78,14 @@ powerpc_dialect (struct disassemble_info *info)
dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5;
if (info->disassembler_options
+ && strstr (info->disassembler_options, "cell") != NULL)
+ dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_CELL | PPC_OPCODE_ALTIVEC;
+
+ if (info->disassembler_options
+ && strstr (info->disassembler_options, "power6") != NULL)
+ dialect |= PPC_OPCODE_POWER4 | PPC_OPCODE_POWER5 | PPC_OPCODE_POWER6 | PPC_OPCODE_ALTIVEC;
+
+ if (info->disassembler_options
&& strstr (info->disassembler_options, "any") != NULL)
dialect |= PPC_OPCODE_ANY;
@@ -115,6 +127,56 @@ print_insn_rs6000 (bfd_vma memaddr, struct disassemble_info *info)
return print_insn_powerpc (memaddr, info, 1, PPC_OPCODE_POWER);
}
+/* Extract the operand value from the PowerPC or POWER instruction. */
+
+static long
+operand_value_powerpc (const struct powerpc_operand *operand,
+ unsigned long insn, int dialect)
+{
+ long value;
+ int invalid;
+ /* Extract the value from the instruction. */
+ if (operand->extract)
+ value = (*operand->extract) (insn, dialect, &invalid);
+ else
+ {
+ value = (insn >> operand->shift) & operand->bitm;
+ if ((operand->flags & PPC_OPERAND_SIGNED) != 0)
+ {
+ /* BITM is always some number of zeros followed by some
+ number of ones, followed by some numer of zeros. */
+ unsigned long top = operand->bitm;
+ /* top & -top gives the rightmost 1 bit, so this
+ fills in any trailing zeros. */
+ top |= (top & -top) - 1;
+ top &= ~(top >> 1);
+ value = (value ^ top) - top;
+ }
+ }
+
+ return value;
+}
+
+/* Determine whether the optional operand(s) should be printed. */
+
+static int
+skip_optional_operands (const unsigned char *opindex,
+ unsigned long insn, int dialect)
+{
+ const struct powerpc_operand *operand;
+
+ for (; *opindex != 0; opindex++)
+ {
+ operand = &powerpc_operands[*opindex];
+ if ((operand->flags & PPC_OPERAND_NEXT) != 0
+ || ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
+ && operand_value_powerpc (operand, insn, dialect) != 0))
+ return 0;
+ }
+
+ return 1;
+}
+
/* Print a PowerPC or POWER instruction. */
static int
@@ -160,6 +222,7 @@ print_insn_powerpc (bfd_vma memaddr,
int invalid;
int need_comma;
int need_paren;
+ int skip_optional;
table_op = PPC_OP (opcode->opcode);
if (op < table_op)
@@ -193,6 +256,7 @@ print_insn_powerpc (bfd_vma memaddr,
/* Now extract and print the operands. */
need_comma = 0;
need_paren = 0;
+ skip_optional = -1;
for (opindex = opcode->operands; *opindex != 0; opindex++)
{
long value;
@@ -205,23 +269,18 @@ print_insn_powerpc (bfd_vma memaddr,
if ((operand->flags & PPC_OPERAND_FAKE) != 0)
continue;
- /* Extract the value from the instruction. */
- if (operand->extract)
- value = (*operand->extract) (insn, dialect, &invalid);
- else
+ /* If all of the optional operands have the value zero,
+ then don't print any of them. */
+ if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0)
{
- value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
- if ((operand->flags & PPC_OPERAND_SIGNED) != 0
- && (value & (1 << (operand->bits - 1))) != 0)
- value -= 1 << operand->bits;
+ if (skip_optional < 0)
+ skip_optional = skip_optional_operands (opindex, insn,
+ dialect);
+ if (skip_optional)
+ continue;
}
- /* If the operand is optional, and the value is zero, don't
- print anything. */
- if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
- && (operand->flags & PPC_OPERAND_NEXT) == 0
- && value == 0)
- continue;
+ value = operand_value_powerpc (operand, insn, dialect);
if (need_comma)
{
@@ -246,7 +305,7 @@ print_insn_powerpc (bfd_vma memaddr,
(*info->fprintf_func) (info->stream, "%ld", value);
else
{
- if (operand->bits == 3)
+ if (operand->bitm == 7)
(*info->fprintf_func) (info->stream, "cr%ld", value);
else
{
@@ -303,9 +362,11 @@ the -M switch:\n");
fprintf (stream, " booke|booke32|booke64 Disassemble the BookE instructions\n");
fprintf (stream, " e300 Disassemble the e300 instructions\n");
fprintf (stream, " e500|e500x2 Disassemble the e500 instructions\n");
+ fprintf (stream, " 440 Disassemble the 440 instructions\n");
fprintf (stream, " efs Disassemble the EFS instructions\n");
fprintf (stream, " power4 Disassemble the Power4 instructions\n");
fprintf (stream, " power5 Disassemble the Power5 instructions\n");
+ fprintf (stream, " power6 Disassemble the Power6 instructions\n");
fprintf (stream, " 32 Do not disassemble 64-bit instructions\n");
fprintf (stream, " 64 Allow disassembly of 64-bit instructions\n");
}
diff --git a/contrib/binutils/opcodes/ppc-opc.c b/contrib/binutils/opcodes/ppc-opc.c
index 84e6d6a..5995f81 100644
--- a/contrib/binutils/opcodes/ppc-opc.c
+++ b/contrib/binutils/opcodes/ppc-opc.c
@@ -1,6 +1,6 @@
/* ppc-opc.c -- PowerPC opcode list
Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
- 2005 Free Software Foundation, Inc.
+ 2005, 2006, 2007 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -42,8 +42,6 @@ static unsigned long insert_bat (unsigned long, long, int, const char **);
static long extract_bat (unsigned long, int, int *);
static unsigned long insert_bba (unsigned long, long, int, const char **);
static long extract_bba (unsigned long, int, int *);
-static unsigned long insert_bd (unsigned long, long, int, const char **);
-static long extract_bd (unsigned long, int, int *);
static unsigned long insert_bdm (unsigned long, long, int, const char **);
static long extract_bdm (unsigned long, int, int *);
static unsigned long insert_bdp (unsigned long, long, int, const char **);
@@ -52,23 +50,12 @@ static unsigned long insert_bo (unsigned long, long, int, const char **);
static long extract_bo (unsigned long, int, int *);
static unsigned long insert_boe (unsigned long, long, int, const char **);
static long extract_boe (unsigned long, int, int *);
-static unsigned long insert_dq (unsigned long, long, int, const char **);
-static long extract_dq (unsigned long, int, int *);
-static unsigned long insert_ds (unsigned long, long, int, const char **);
-static long extract_ds (unsigned long, int, int *);
-static unsigned long insert_de (unsigned long, long, int, const char **);
-static long extract_de (unsigned long, int, int *);
-static unsigned long insert_des (unsigned long, long, int, const char **);
-static long extract_des (unsigned long, int, int *);
static unsigned long insert_fxm (unsigned long, long, int, const char **);
static long extract_fxm (unsigned long, int, int *);
-static unsigned long insert_li (unsigned long, long, int, const char **);
-static long extract_li (unsigned long, int, int *);
static unsigned long insert_mbe (unsigned long, long, int, const char **);
static long extract_mbe (unsigned long, int, int *);
static unsigned long insert_mb6 (unsigned long, long, int, const char **);
static long extract_mb6 (unsigned long, int, int *);
-static unsigned long insert_nb (unsigned long, long, int, const char **);
static long extract_nb (unsigned long, int, int *);
static unsigned long insert_nsi (unsigned long, long, int, const char **);
static long extract_nsi (unsigned long, int, int *);
@@ -78,8 +65,6 @@ static unsigned long insert_raq (unsigned long, long, int, const char **);
static unsigned long insert_ras (unsigned long, long, int, const char **);
static unsigned long insert_rbs (unsigned long, long, int, const char **);
static long extract_rbs (unsigned long, int, int *);
-static unsigned long insert_rsq (unsigned long, long, int, const char **);
-static unsigned long insert_rtq (unsigned long, long, int, const char **);
static unsigned long insert_sh6 (unsigned long, long, int, const char **);
static long extract_sh6 (unsigned long, int, int *);
static unsigned long insert_spr (unsigned long, long, int, const char **);
@@ -88,16 +73,10 @@ static unsigned long insert_sprg (unsigned long, long, int, const char **);
static long extract_sprg (unsigned long, int, int *);
static unsigned long insert_tbr (unsigned long, long, int, const char **);
static long extract_tbr (unsigned long, int, int *);
-static unsigned long insert_ev2 (unsigned long, long, int, const char **);
-static long extract_ev2 (unsigned long, int, int *);
-static unsigned long insert_ev4 (unsigned long, long, int, const char **);
-static long extract_ev4 (unsigned long, int, int *);
-static unsigned long insert_ev8 (unsigned long, long, int, const char **);
-static long extract_ev8 (unsigned long, int, int *);
/* The operands table.
- The fields are bits, shift, insert, extract, flags.
+ The fields are bitm, shift, insert, extract, flags.
We used to put parens around the various additions, like the one
for BA just below. However, that caused trouble with feeble
@@ -115,302 +94,298 @@ const struct powerpc_operand powerpc_operands[] =
/* The BA field in an XL form instruction. */
#define BA UNUSED + 1
-#define BA_MASK (0x1f << 16)
- { 5, 16, NULL, NULL, PPC_OPERAND_CR },
+ /* The BI field in a B form or XL form instruction. */
+#define BI BA
+#define BI_MASK (0x1f << 16)
+ { 0x1f, 16, NULL, NULL, PPC_OPERAND_CR },
/* The BA field in an XL form instruction when it must be the same
as the BT field in the same instruction. */
#define BAT BA + 1
- { 5, 16, insert_bat, extract_bat, PPC_OPERAND_FAKE },
+ { 0x1f, 16, insert_bat, extract_bat, PPC_OPERAND_FAKE },
/* The BB field in an XL form instruction. */
#define BB BAT + 1
#define BB_MASK (0x1f << 11)
- { 5, 11, NULL, NULL, PPC_OPERAND_CR },
+ { 0x1f, 11, NULL, NULL, PPC_OPERAND_CR },
/* The BB field in an XL form instruction when it must be the same
as the BA field in the same instruction. */
#define BBA BB + 1
- { 5, 11, insert_bba, extract_bba, PPC_OPERAND_FAKE },
+ { 0x1f, 11, insert_bba, extract_bba, PPC_OPERAND_FAKE },
/* The BD field in a B form instruction. The lower two bits are
forced to zero. */
#define BD BBA + 1
- { 16, 0, insert_bd, extract_bd, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+ { 0xfffc, 0, NULL, NULL, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
/* The BD field in a B form instruction when absolute addressing is
used. */
#define BDA BD + 1
- { 16, 0, insert_bd, extract_bd, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+ { 0xfffc, 0, NULL, NULL, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
/* The BD field in a B form instruction when the - modifier is used.
This sets the y bit of the BO field appropriately. */
#define BDM BDA + 1
- { 16, 0, insert_bdm, extract_bdm,
+ { 0xfffc, 0, insert_bdm, extract_bdm,
PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
/* The BD field in a B form instruction when the - modifier is used
and absolute address is used. */
#define BDMA BDM + 1
- { 16, 0, insert_bdm, extract_bdm,
+ { 0xfffc, 0, insert_bdm, extract_bdm,
PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
/* The BD field in a B form instruction when the + modifier is used.
This sets the y bit of the BO field appropriately. */
#define BDP BDMA + 1
- { 16, 0, insert_bdp, extract_bdp,
+ { 0xfffc, 0, insert_bdp, extract_bdp,
PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
/* The BD field in a B form instruction when the + modifier is used
and absolute addressing is used. */
#define BDPA BDP + 1
- { 16, 0, insert_bdp, extract_bdp,
+ { 0xfffc, 0, insert_bdp, extract_bdp,
PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
/* The BF field in an X or XL form instruction. */
#define BF BDPA + 1
- { 3, 23, NULL, NULL, PPC_OPERAND_CR },
+ /* The CRFD field in an X form instruction. */
+#define CRFD BF
+ { 0x7, 23, NULL, NULL, PPC_OPERAND_CR },
+
+ /* The BF field in an X or XL form instruction. */
+#define BFF BF + 1
+ { 0x7, 23, NULL, NULL, 0 },
/* An optional BF field. This is used for comparison instructions,
in which an omitted BF field is taken as zero. */
-#define OBF BF + 1
- { 3, 23, NULL, NULL, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+#define OBF BFF + 1
+ { 0x7, 23, NULL, NULL, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
/* The BFA field in an X or XL form instruction. */
#define BFA OBF + 1
- { 3, 18, NULL, NULL, PPC_OPERAND_CR },
-
- /* The BI field in a B form or XL form instruction. */
-#define BI BFA + 1
-#define BI_MASK (0x1f << 16)
- { 5, 16, NULL, NULL, PPC_OPERAND_CR },
+ { 0x7, 18, NULL, NULL, PPC_OPERAND_CR },
/* The BO field in a B form instruction. Certain values are
illegal. */
-#define BO BI + 1
+#define BO BFA + 1
#define BO_MASK (0x1f << 21)
- { 5, 21, insert_bo, extract_bo, 0 },
+ { 0x1f, 21, insert_bo, extract_bo, 0 },
/* The BO field in a B form instruction when the + or - modifier is
used. This is like the BO field, but it must be even. */
#define BOE BO + 1
- { 5, 21, insert_boe, extract_boe, 0 },
+ { 0x1e, 21, insert_boe, extract_boe, 0 },
#define BH BOE + 1
- { 2, 11, NULL, NULL, PPC_OPERAND_OPTIONAL },
+ { 0x3, 11, NULL, NULL, PPC_OPERAND_OPTIONAL },
/* The BT field in an X or XL form instruction. */
#define BT BH + 1
- { 5, 21, NULL, NULL, PPC_OPERAND_CR },
+ { 0x1f, 21, NULL, NULL, PPC_OPERAND_CR },
/* The condition register number portion of the BI field in a B form
or XL form instruction. This is used for the extended
conditional branch mnemonics, which set the lower two bits of the
BI field. This field is optional. */
#define CR BT + 1
- { 3, 18, NULL, NULL, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+ { 0x7, 18, NULL, NULL, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
/* The CRB field in an X form instruction. */
#define CRB CR + 1
- { 5, 6, NULL, NULL, 0 },
-
- /* The CRFD field in an X form instruction. */
-#define CRFD CRB + 1
- { 3, 23, NULL, NULL, PPC_OPERAND_CR },
+ /* The MB field in an M form instruction. */
+#define MB CRB
+#define MB_MASK (0x1f << 6)
+ { 0x1f, 6, NULL, NULL, 0 },
/* The CRFS field in an X form instruction. */
-#define CRFS CRFD + 1
- { 3, 0, NULL, NULL, PPC_OPERAND_CR },
+#define CRFS CRB + 1
+ { 0x7, 0, NULL, NULL, PPC_OPERAND_CR },
/* The CT field in an X form instruction. */
#define CT CRFS + 1
- { 5, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
+ /* The MO field in an mbar instruction. */
+#define MO CT
+ { 0x1f, 21, NULL, NULL, 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 CT + 1
- { 16, 0, NULL, NULL, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+ { 0xffff, 0, NULL, NULL, 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 },
+ { 0xfff, 4, NULL, NULL, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
/* 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 },
+ { 0x3ffc, 2, NULL, NULL, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
/* The DQ field in a DQ form instruction. This is like D, but the
lower four bits are forced to zero. */
#define DQ DES + 1
- { 16, 0, insert_dq, extract_dq,
- PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DQ },
+ { 0xfff0, 0, NULL, NULL,
+ PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DQ },
/* The DS field in a DS form instruction. This is like D, but the
lower two bits are forced to zero. */
#define DS DQ + 1
- { 16, 0, insert_ds, extract_ds,
- PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DS },
+ { 0xfffc, 0, NULL, NULL,
+ PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DS },
/* The E field in a wrteei instruction. */
#define E DS + 1
- { 1, 15, NULL, NULL, 0 },
+ { 0x1, 15, NULL, NULL, 0 },
/* The FL1 field in a POWER SC form instruction. */
#define FL1 E + 1
- { 4, 12, NULL, NULL, 0 },
+ /* The U field in an X form instruction. */
+#define U FL1
+ { 0xf, 12, NULL, NULL, 0 },
/* The FL2 field in a POWER SC form instruction. */
#define FL2 FL1 + 1
- { 3, 2, NULL, NULL, 0 },
+ { 0x7, 2, NULL, NULL, 0 },
/* The FLM field in an XFL form instruction. */
#define FLM FL2 + 1
- { 8, 17, NULL, NULL, 0 },
+ { 0xff, 17, NULL, NULL, 0 },
/* The FRA field in an X or A form instruction. */
#define FRA FLM + 1
#define FRA_MASK (0x1f << 16)
- { 5, 16, NULL, NULL, PPC_OPERAND_FPR },
+ { 0x1f, 16, NULL, NULL, PPC_OPERAND_FPR },
/* The FRB field in an X or A form instruction. */
#define FRB FRA + 1
#define FRB_MASK (0x1f << 11)
- { 5, 11, NULL, NULL, PPC_OPERAND_FPR },
+ { 0x1f, 11, NULL, NULL, PPC_OPERAND_FPR },
/* The FRC field in an A form instruction. */
#define FRC FRB + 1
#define FRC_MASK (0x1f << 6)
- { 5, 6, NULL, NULL, PPC_OPERAND_FPR },
+ { 0x1f, 6, NULL, NULL, PPC_OPERAND_FPR },
/* The FRS field in an X form instruction or the FRT field in a D, X
or A form instruction. */
#define FRS FRC + 1
#define FRT FRS
- { 5, 21, NULL, NULL, PPC_OPERAND_FPR },
+ { 0x1f, 21, NULL, NULL, PPC_OPERAND_FPR },
/* The FXM field in an XFX instruction. */
#define FXM FRS + 1
-#define FXM_MASK (0xff << 12)
- { 8, 12, insert_fxm, extract_fxm, 0 },
+ { 0xff, 12, insert_fxm, extract_fxm, 0 },
/* Power4 version for mfcr. */
#define FXM4 FXM + 1
- { 8, 12, insert_fxm, extract_fxm, PPC_OPERAND_OPTIONAL },
+ { 0xff, 12, insert_fxm, extract_fxm, PPC_OPERAND_OPTIONAL },
/* The L field in a D or X form instruction. */
#define L FXM4 + 1
- { 1, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
+ { 0x1, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
/* The LEV field in a POWER SVC form instruction. */
#define SVC_LEV L + 1
- { 7, 5, NULL, NULL, 0 },
+ { 0x7f, 5, NULL, NULL, 0 },
/* The LEV field in an SC form instruction. */
#define LEV SVC_LEV + 1
- { 7, 5, NULL, NULL, PPC_OPERAND_OPTIONAL },
+ { 0x7f, 5, NULL, NULL, PPC_OPERAND_OPTIONAL },
/* The LI field in an I form instruction. The lower two bits are
forced to zero. */
#define LI LEV + 1
- { 26, 0, insert_li, extract_li, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
+ { 0x3fffffc, 0, NULL, NULL, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
/* The LI field in an I form instruction when used as an absolute
address. */
#define LIA LI + 1
- { 26, 0, insert_li, extract_li, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+ { 0x3fffffc, 0, NULL, NULL, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
/* The LS field in an X (sync) form instruction. */
#define LS LIA + 1
- { 2, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
-
- /* The MB field in an M form instruction. */
-#define MB LS + 1
-#define MB_MASK (0x1f << 6)
- { 5, 6, NULL, NULL, 0 },
+ { 0x3, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
/* The ME field in an M form instruction. */
-#define ME MB + 1
+#define ME LS + 1
#define ME_MASK (0x1f << 1)
- { 5, 1, NULL, NULL, 0 },
+ { 0x1f, 1, NULL, NULL, 0 },
/* The MB and ME fields in an M form instruction expressed a single
operand which is a bitmask indicating which bits to select. This
is a two operand form using PPC_OPERAND_NEXT. See the
description in opcode/ppc.h for what this means. */
#define MBE ME + 1
- { 5, 6, NULL, NULL, PPC_OPERAND_OPTIONAL | PPC_OPERAND_NEXT },
- { 32, 0, insert_mbe, extract_mbe, 0 },
+ { 0x1f, 6, NULL, NULL, PPC_OPERAND_OPTIONAL | PPC_OPERAND_NEXT },
+ { -1, 0, insert_mbe, extract_mbe, 0 },
/* The MB or ME field in an MD or MDS form instruction. The high
bit is wrapped to the low end. */
#define MB6 MBE + 2
#define ME6 MB6
#define MB6_MASK (0x3f << 5)
- { 6, 5, insert_mb6, extract_mb6, 0 },
-
- /* The MO field in an mbar instruction. */
-#define MO MB6 + 1
- { 5, 21, NULL, NULL, PPC_OPERAND_OPTIONAL },
+ { 0x3f, 5, insert_mb6, extract_mb6, 0 },
/* The NB field in an X form instruction. The value 32 is stored as
0. */
-#define NB MO + 1
- { 6, 11, insert_nb, extract_nb, 0 },
+#define NB MB6 + 1
+ { 0x1f, 11, NULL, extract_nb, PPC_OPERAND_PLUS1 },
/* The NSI field in a D form instruction. This is the same as the
SI field, only negated. */
#define NSI NB + 1
- { 16, 0, insert_nsi, extract_nsi,
+ { 0xffff, 0, insert_nsi, extract_nsi,
PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
/* The RA field in an D, DS, DQ, X, XO, M, or MDS form instruction. */
#define RA NSI + 1
#define RA_MASK (0x1f << 16)
- { 5, 16, NULL, NULL, PPC_OPERAND_GPR },
+ { 0x1f, 16, NULL, NULL, PPC_OPERAND_GPR },
/* As above, but 0 in the RA field means zero, not r0. */
#define RA0 RA + 1
- { 5, 16, NULL, NULL, PPC_OPERAND_GPR_0 },
+ { 0x1f, 16, NULL, NULL, PPC_OPERAND_GPR_0 },
/* The RA field in the DQ form lq instruction, which has special
value restrictions. */
#define RAQ RA0 + 1
- { 5, 16, insert_raq, NULL, PPC_OPERAND_GPR_0 },
+ { 0x1f, 16, insert_raq, NULL, PPC_OPERAND_GPR_0 },
/* The RA field in a D or X form instruction which is an updating
load, which means that the RA field may not be zero and may not
equal the RT field. */
#define RAL RAQ + 1
- { 5, 16, insert_ral, NULL, PPC_OPERAND_GPR_0 },
+ { 0x1f, 16, insert_ral, NULL, PPC_OPERAND_GPR_0 },
/* The RA field in an lmw instruction, which has special value
restrictions. */
#define RAM RAL + 1
- { 5, 16, insert_ram, NULL, PPC_OPERAND_GPR_0 },
+ { 0x1f, 16, insert_ram, NULL, PPC_OPERAND_GPR_0 },
/* The RA field in a D or X form instruction which is an updating
store or an updating floating point load, which means that the RA
field may not be zero. */
#define RAS RAM + 1
- { 5, 16, insert_ras, NULL, PPC_OPERAND_GPR_0 },
+ { 0x1f, 16, insert_ras, NULL, PPC_OPERAND_GPR_0 },
/* The RA field of the tlbwe instruction, which is optional. */
#define RAOPT RAS + 1
- { 5, 16, NULL, NULL, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL },
+ { 0x1f, 16, NULL, NULL, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL },
/* The RB field in an X, XO, M, or MDS form instruction. */
#define RB RAOPT + 1
#define RB_MASK (0x1f << 11)
- { 5, 11, NULL, NULL, PPC_OPERAND_GPR },
+ { 0x1f, 11, NULL, NULL, PPC_OPERAND_GPR },
/* The RB field in an X form instruction when it must be the same as
the RS field in the instruction. This is used for extended
mnemonics like mr. */
#define RBS RB + 1
- { 5, 1, insert_rbs, extract_rbs, PPC_OPERAND_FAKE },
+ { 0x1f, 11, insert_rbs, extract_rbs, PPC_OPERAND_FAKE },
/* The RS field in a D, DS, X, XFX, XS, M, MD or MDS form
instruction or the RT field in a D, DS, X, XFX or XO form
@@ -418,153 +393,168 @@ const struct powerpc_operand powerpc_operands[] =
#define RS RBS + 1
#define RT RS
#define RT_MASK (0x1f << 21)
- { 5, 21, NULL, NULL, PPC_OPERAND_GPR },
+ { 0x1f, 21, NULL, NULL, PPC_OPERAND_GPR },
- /* The RS field of the DS form stq instruction, which has special
- value restrictions. */
+ /* The RS and RT fields of the DS form stq instruction, which have
+ special value restrictions. */
#define RSQ RS + 1
- { 5, 21, insert_rsq, NULL, PPC_OPERAND_GPR_0 },
-
- /* The RT field of the DQ form lq instruction, which has special
- value restrictions. */
-#define RTQ RSQ + 1
- { 5, 21, insert_rtq, NULL, PPC_OPERAND_GPR_0 },
+#define RTQ RSQ
+ { 0x1e, 21, NULL, NULL, PPC_OPERAND_GPR_0 },
/* The RS field of the tlbwe instruction, which is optional. */
-#define RSO RTQ + 1
+#define RSO RSQ + 1
#define RTO RSO
- { 5, 21, NULL, NULL, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL },
+ { 0x1f, 21, NULL, NULL, PPC_OPERAND_GPR | PPC_OPERAND_OPTIONAL },
/* The SH field in an X or M form instruction. */
#define SH RSO + 1
#define SH_MASK (0x1f << 11)
- { 5, 11, NULL, NULL, 0 },
+ /* The other UIMM field in a EVX form instruction. */
+#define EVUIMM SH
+ { 0x1f, 11, NULL, NULL, 0 },
/* The SH field in an MD form instruction. This is split. */
#define SH6 SH + 1
#define SH6_MASK ((0x1f << 11) | (1 << 1))
- { 6, 1, insert_sh6, extract_sh6, 0 },
+ { 0x3f, -1, insert_sh6, extract_sh6, 0 },
/* The SH field of the tlbwe instruction, which is optional. */
#define SHO SH6 + 1
- { 5, 11,NULL, NULL, PPC_OPERAND_OPTIONAL },
+ { 0x1f, 11, NULL, NULL, PPC_OPERAND_OPTIONAL },
/* The SI field in a D form instruction. */
#define SI SHO + 1
- { 16, 0, NULL, NULL, PPC_OPERAND_SIGNED },
+ { 0xffff, 0, NULL, NULL, PPC_OPERAND_SIGNED },
/* The SI field in a D form instruction when we accept a wide range
of positive values. */
#define SISIGNOPT SI + 1
- { 16, 0, NULL, NULL, PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
+ { 0xffff, 0, NULL, NULL, PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
/* The SPR field in an XFX form instruction. This is flipped--the
lower 5 bits are stored in the upper 5 and vice- versa. */
#define SPR SISIGNOPT + 1
#define PMR SPR
#define SPR_MASK (0x3ff << 11)
- { 10, 11, insert_spr, extract_spr, 0 },
+ { 0x3ff, 11, insert_spr, extract_spr, 0 },
/* The BAT index number in an XFX form m[ft]ibat[lu] instruction. */
#define SPRBAT SPR + 1
#define SPRBAT_MASK (0x3 << 17)
- { 2, 17, NULL, NULL, 0 },
+ { 0x3, 17, NULL, NULL, 0 },
/* The SPRG register number in an XFX form m[ft]sprg instruction. */
#define SPRG SPRBAT + 1
- { 5, 16, insert_sprg, extract_sprg, 0 },
+ { 0x1f, 16, insert_sprg, extract_sprg, 0 },
/* The SR field in an X form instruction. */
#define SR SPRG + 1
- { 4, 16, NULL, NULL, 0 },
+ { 0xf, 16, NULL, NULL, 0 },
/* The STRM field in an X AltiVec form instruction. */
#define STRM SR + 1
-#define STRM_MASK (0x3 << 21)
- { 2, 21, NULL, NULL, 0 },
+ { 0x3, 21, NULL, NULL, 0 },
/* The SV field in a POWER SC form instruction. */
#define SV STRM + 1
- { 14, 2, NULL, NULL, 0 },
+ { 0x3fff, 2, NULL, NULL, 0 },
/* The TBR field in an XFX form instruction. This is like the SPR
field, but it is optional. */
#define TBR SV + 1
- { 10, 11, insert_tbr, extract_tbr, PPC_OPERAND_OPTIONAL },
+ { 0x3ff, 11, insert_tbr, extract_tbr, PPC_OPERAND_OPTIONAL },
/* The TO field in a D or X form instruction. */
#define TO TBR + 1
#define TO_MASK (0x1f << 21)
- { 5, 21, NULL, NULL, 0 },
-
- /* The U field in an X form instruction. */
-#define U TO + 1
- { 4, 12, NULL, NULL, 0 },
+ { 0x1f, 21, NULL, NULL, 0 },
/* The UI field in a D form instruction. */
-#define UI U + 1
- { 16, 0, NULL, NULL, 0 },
+#define UI TO + 1
+ { 0xffff, 0, NULL, NULL, 0 },
/* The VA field in a VA, VX or VXR form instruction. */
#define VA UI + 1
-#define VA_MASK (0x1f << 16)
- { 5, 16, NULL, NULL, PPC_OPERAND_VR },
+ { 0x1f, 16, NULL, NULL, 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, NULL, NULL, PPC_OPERAND_VR },
+ { 0x1f, 11, NULL, NULL, PPC_OPERAND_VR },
/* The VC field in a VA form instruction. */
#define VC VB + 1
-#define VC_MASK (0x1f << 6)
- { 5, 6, NULL, NULL, PPC_OPERAND_VR },
+ { 0x1f, 6, NULL, NULL, 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, NULL, NULL, PPC_OPERAND_VR },
+ { 0x1f, 21, NULL, NULL, PPC_OPERAND_VR },
/* The SIMM field in a VX form instruction. */
#define SIMM VD + 1
- { 5, 16, NULL, NULL, PPC_OPERAND_SIGNED},
+ { 0x1f, 16, NULL, NULL, PPC_OPERAND_SIGNED},
- /* The UIMM field in a VX form instruction. */
+ /* The UIMM field in a VX form instruction, and TE in Z form. */
#define UIMM SIMM + 1
- { 5, 16, NULL, NULL, 0 },
+#define TE UIMM
+ { 0x1f, 16, NULL, NULL, 0 },
/* The SHB field in a VA form instruction. */
#define SHB UIMM + 1
- { 4, 6, NULL, NULL, 0 },
-
- /* The other UIMM field in a EVX form instruction. */
-#define EVUIMM SHB + 1
- { 5, 11, NULL, NULL, 0 },
+ { 0xf, 6, NULL, NULL, 0 },
/* The other UIMM field in a half word EVX form instruction. */
-#define EVUIMM_2 EVUIMM + 1
- { 32, 11, insert_ev2, extract_ev2, PPC_OPERAND_PARENS },
+#define EVUIMM_2 SHB + 1
+ { 0x3e, 10, NULL, NULL, PPC_OPERAND_PARENS },
/* The other UIMM field in a word EVX form instruction. */
#define EVUIMM_4 EVUIMM_2 + 1
- { 32, 11, insert_ev4, extract_ev4, PPC_OPERAND_PARENS },
+ { 0x7c, 9, NULL, NULL, PPC_OPERAND_PARENS },
/* The other UIMM field in a double EVX form instruction. */
#define EVUIMM_8 EVUIMM_4 + 1
- { 32, 11, insert_ev8, extract_ev8, PPC_OPERAND_PARENS },
+ { 0xf8, 8, NULL, NULL, PPC_OPERAND_PARENS },
/* The WS field. */
#define WS EVUIMM_8 + 1
-#define WS_MASK (0x7 << 11)
- { 3, 11, NULL, NULL, 0 },
+ { 0x7, 11, NULL, NULL, 0 },
+
+ /* The L field in an mtmsrd or A form instruction or W in an X form. */
+#define A_L WS + 1
+#define W A_L
+ { 0x1, 16, NULL, NULL, PPC_OPERAND_OPTIONAL },
+
+#define RMC A_L + 1
+ { 0x3, 9, NULL, NULL, 0 },
+
+#define R RMC + 1
+ { 0x1, 16, NULL, NULL, 0 },
- /* The L field in an mtmsrd instruction */
-#define MTMSRD_L WS + 1
- { 1, 16, NULL, NULL, PPC_OPERAND_OPTIONAL },
+#define SP R + 1
+ { 0x3, 19, NULL, NULL, 0 },
+#define S SP + 1
+ { 0x1, 20, NULL, NULL, 0 },
+
+ /* SH field starting at bit position 16. */
+#define SH16 S + 1
+ /* The DCM and DGM fields in a Z form instruction. */
+#define DCM SH16
+#define DGM DCM
+ { 0x3f, 10, NULL, NULL, 0 },
+
+ /* The EH field in larx instruction. */
+#define EH SH16 + 1
+ { 0x1, 0, NULL, NULL, PPC_OPERAND_OPTIONAL },
+
+ /* The L field in an mtfsf or XFL form instruction. */
+#define XFL_L EH + 1
+ { 0x1, 25, NULL, NULL, PPC_OPERAND_OPTIONAL},
};
+const unsigned int num_powerpc_operands = (sizeof (powerpc_operands)
+ / sizeof (powerpc_operands[0]));
+
/* The functions used to insert and extract complicated operands. */
/* The BA field in an XL form instruction when it must be the same as
@@ -617,26 +607,6 @@ extract_bba (unsigned long insn,
return 0;
}
-/* The BD field in a B form instruction. The lower two bits are
- forced to zero. */
-
-static unsigned long
-insert_bd (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg ATTRIBUTE_UNUSED)
-{
- return insn | (value & 0xfffc);
-}
-
-static long
-extract_bd (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- 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.
For chips built to versions of the architecture prior to version 2
@@ -648,7 +618,11 @@ extract_bd (unsigned long insn,
the "y" bit. "at" == 00 => no hint, "at" == 01 => unpredictable,
"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. We only handle the taken/not-taken hint here. */
+ for branch on CTR. We only handle the taken/not-taken hint here.
+ Note that we don't relax the conditions tested here when
+ disassembling with -Many because insns using extract_bdm and
+ extract_bdp always occur in pairs. One or the other will always
+ be valid. */
static unsigned long
insert_bdm (unsigned long insn,
@@ -739,10 +713,11 @@ extract_bdp (unsigned long insn,
/* Check for legal values of a BO field. */
static int
-valid_bo (long value, int dialect)
+valid_bo (long value, int dialect, int extract)
{
if ((dialect & PPC_OPCODE_POWER4) == 0)
{
+ int valid;
/* Certain encodings have bits that are required to be zero.
These are (z must be zero, y may be anything):
001zy
@@ -755,36 +730,43 @@ valid_bo (long value, int dialect)
{
default:
case 0:
- return 1;
+ valid = 1;
+ break;
case 0x4:
- return (value & 0x2) == 0;
+ valid = (value & 0x2) == 0;
+ break;
case 0x10:
- return (value & 0x8) == 0;
+ valid = (value & 0x8) == 0;
+ break;
case 0x14:
- return value == 0x14;
+ valid = value == 0x14;
+ break;
}
+ /* When disassembling with -Many, accept power4 encodings too. */
+ if (valid
+ || (dialect & PPC_OPCODE_ANY) == 0
+ || !extract)
+ return valid;
}
+
+ /* 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
- {
- /* 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;
- }
+ return 1;
}
/* The BO field in a B form instruction. Warn about attempts to set
@@ -796,7 +778,7 @@ insert_bo (unsigned long insn,
int dialect,
const char **errmsg)
{
- if (!valid_bo (value, dialect))
+ if (!valid_bo (value, dialect, 0))
*errmsg = _("invalid conditional option");
return insn | ((value & 0x1f) << 21);
}
@@ -809,7 +791,7 @@ extract_bo (unsigned long insn,
long value;
value = (insn >> 21) & 0x1f;
- if (!valid_bo (value, dialect))
+ if (!valid_bo (value, dialect, 1))
*invalid = 1;
return value;
}
@@ -824,7 +806,7 @@ insert_boe (unsigned long insn,
int dialect,
const char **errmsg)
{
- if (!valid_bo (value, dialect))
+ if (!valid_bo (value, dialect, 0))
*errmsg = _("invalid conditional option");
else if ((value & 1) != 0)
*errmsg = _("attempt to set y bit when using + or - modifier");
@@ -840,162 +822,11 @@ extract_boe (unsigned long insn,
long value;
value = (insn >> 21) & 0x1f;
- if (!valid_bo (value, dialect))
+ if (!valid_bo (value, dialect, 1))
*invalid = 1;
return value & 0x1e;
}
-/* The DQ field in a DQ form instruction. This is like D, but the
- lower four bits are forced to zero. */
-
-static unsigned long
-insert_dq (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if ((value & 0xf) != 0)
- *errmsg = _("offset not a multiple of 16");
- return insn | (value & 0xfff0);
-}
-
-static long
-extract_dq (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- return ((insn & 0xfff0) ^ 0x8000) - 0x8000;
-}
-
-static unsigned long
-insert_ev2 (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if ((value & 1) != 0)
- *errmsg = _("offset not a multiple of 2");
- if ((value > 62) != 0)
- *errmsg = _("offset greater than 62");
- return insn | ((value & 0x3e) << 10);
-}
-
-static long
-extract_ev2 (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- return (insn >> 10) & 0x3e;
-}
-
-static unsigned long
-insert_ev4 (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if ((value & 3) != 0)
- *errmsg = _("offset not a multiple of 4");
- if ((value > 124) != 0)
- *errmsg = _("offset greater than 124");
- return insn | ((value & 0x7c) << 9);
-}
-
-static long
-extract_ev4 (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- return (insn >> 9) & 0x7c;
-}
-
-static unsigned long
-insert_ev8 (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if ((value & 7) != 0)
- *errmsg = _("offset not a multiple of 8");
- if ((value > 248) != 0)
- *errmsg = _("offset greater than 248");
- return insn | ((value & 0xf8) << 8);
-}
-
-static long
-extract_ev8 (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- return (insn >> 8) & 0xf8;
-}
-
-/* The DS field in a DS form instruction. This is like D, but the
- lower two bits are forced to zero. */
-
-static unsigned long
-insert_ds (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if ((value & 3) != 0)
- *errmsg = _("offset not a multiple of 4");
- return insn | (value & 0xfffc);
-}
-
-static long
-extract_ds (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
-}
-
-/* The DE field in a DE form instruction. */
-
-static unsigned long
-insert_de (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if (value > 2047 || value < -2048)
- *errmsg = _("offset not between -2048 and 2047");
- return insn | ((value << 4) & 0xfff0);
-}
-
-static long
-extract_de (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- return (insn & 0xfff0) >> 4;
-}
-
-/* The DES field in a DES form instruction. */
-
-static unsigned long
-insert_des (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if (value > 8191 || value < -8192)
- *errmsg = _("offset not between -8192 and 8191");
- else if ((value & 3) != 0)
- *errmsg = _("offset not a multiple of 4");
- return insn | ((value << 2) & 0xfff0);
-}
-
-static long
-extract_des (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- return (((insn >> 2) & 0x3ffc) ^ 0x2000) - 0x2000;
-}
-
/* FXM mask in mfcr and mtcrf instructions. */
static unsigned long
@@ -1068,28 +899,6 @@ extract_fxm (unsigned long insn,
return mask;
}
-/* The LI field in an I form instruction. The lower two bits are
- forced to zero. */
-
-static unsigned long
-insert_li (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if ((value & 3) != 0)
- *errmsg = _("ignoring least significant bits in branch offset");
- return insn | (value & 0x3fffffc);
-}
-
-static long
-extract_li (unsigned long insn,
- int dialect ATTRIBUTE_UNUSED,
- int *invalid ATTRIBUTE_UNUSED)
-{
- return ((insn & 0x3fffffc) ^ 0x2000000) - 0x2000000;
-}
-
/* The MB and ME fields in an M form instruction expressed as a single
operand which is itself a bitmask. The extraction function always
marks it as invalid, since we never want to recognize an
@@ -1201,19 +1010,6 @@ extract_mb6 (unsigned long insn,
/* The NB field in an X form instruction. The value 32 is stored as
0. */
-static unsigned long
-insert_nb (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if (value < 0 || value > 32)
- *errmsg = _("value out of range");
- if (value == 32)
- value = 0;
- return insn | ((value & 0x1f) << 11);
-}
-
static long
extract_nb (unsigned long insn,
int dialect ATTRIBUTE_UNUSED,
@@ -1336,34 +1132,6 @@ extract_rbs (unsigned long insn,
return 0;
}
-/* The RT field of the DQ form lq instruction, which has special
- value restrictions. */
-
-static unsigned long
-insert_rtq (unsigned long insn,
- long value,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if ((value & 1) != 0)
- *errmsg = _("target register operand must be even");
- return insn | ((value & 0x1f) << 21);
-}
-
-/* The RS field of the DS form stq instruction, which has special
- value restrictions. */
-
-static unsigned long
-insert_rsq (unsigned long insn,
- long value ATTRIBUTE_UNUSED,
- int dialect ATTRIBUTE_UNUSED,
- const char **errmsg)
-{
- if ((value & 1) != 0)
- *errmsg = _("source register operand must be even");
- return insn | ((value & 0x1f) << 21);
-}
-
/* The SH field in an MD form instruction. This is split. */
static unsigned long
@@ -1509,6 +1277,9 @@ extract_tbr (unsigned long insn,
/* An A_MASK with the FRA and FRC fields fixed. */
#define AFRAFRC_MASK (A_MASK | FRA_MASK | FRC_MASK)
+/* An AFRAFRC_MASK, but with L bit clear. */
+#define AFRALFRC_MASK (AFRAFRC_MASK & ~((unsigned long) 1 << 16))
+
/* A B form instruction. */
#define B(op, aa, lk) (OP (op) | ((((unsigned long)(aa)) & 1) << 1) | ((lk) & 1))
#define B_MASK B (0x3f, 1, 1)
@@ -1619,21 +1390,37 @@ extract_tbr (unsigned long insn,
/* An X form instruction. */
#define X(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
+/* A Z form instruction. */
+#define Z(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 1))
+
/* An X form instruction with the RC bit specified. */
#define XRC(op, xop, rc) (X ((op), (xop)) | ((rc) & 1))
+/* A Z form instruction with the RC bit specified. */
+#define ZRC(op, xop, rc) (Z ((op), (xop)) | ((rc) & 1))
+
/* The mask for an X form instruction. */
#define X_MASK XRC (0x3f, 0x3ff, 1)
+/* The mask for a Z form instruction. */
+#define Z_MASK ZRC (0x3f, 0x1ff, 1)
+#define Z2_MASK ZRC (0x3f, 0xff, 1)
+
/* An X_MASK with the RA field fixed. */
#define XRA_MASK (X_MASK | RA_MASK)
+/* An XRA_MASK with the W field clear. */
+#define XWRA_MASK (XRA_MASK & ~((unsigned long) 1 << 16))
+
/* An X_MASK with the RB field fixed. */
#define XRB_MASK (X_MASK | RB_MASK)
/* An X_MASK with the RT field fixed. */
#define XRT_MASK (X_MASK | RT_MASK)
+/* An XRT_MASK mask with the L bits clear. */
+#define XLRT_MASK (XRT_MASK & ~((unsigned long) 0x3 << 21))
+
/* An X_MASK with the RA and RB fields fixed. */
#define XRARB_MASK (X_MASK | RA_MASK | RB_MASK)
@@ -1670,13 +1457,16 @@ extract_tbr (unsigned long insn,
/* An X form sync instruction with everything filled in except the LS field. */
#define XSYNC_MASK (0xff9fffff)
+/* An X_MASK, but with the EH bit clear. */
+#define XEH_MASK (X_MASK & ~((unsigned long )1))
+
/* 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))
+#define XFL_MASK XFL (0x3f, 0x3ff, 1)
/* An X form isel instruction. */
#define XISEL(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1))
@@ -1752,7 +1542,7 @@ extract_tbr (unsigned long insn,
/* An XFX form instruction with the SPR field filled in except for the
SPRG field. */
-#define XSPRG_MASK (XSPR_MASK & ~(0x17 << 16))
+#define XSPRG_MASK (XSPR_MASK & ~(0x1f << 16))
/* An X form instruction with everything filled in except the E field. */
#define XE_MASK (0xffff7fff)
@@ -1823,6 +1613,8 @@ extract_tbr (unsigned long insn,
#define NOPOWER4 PPC_OPCODE_NOPOWER4 | PPCCOM
#define POWER4 PPC_OPCODE_POWER4
#define POWER5 PPC_OPCODE_POWER5
+#define POWER6 PPC_OPCODE_POWER6
+#define CELL PPC_OPCODE_CELL
#define PPC32 PPC_OPCODE_32 | PPC_OPCODE_PPC
#define PPC64 PPC_OPCODE_64 | PPC_OPCODE_PPC
#define PPC403 PPC_OPCODE_403
@@ -3014,16 +2806,23 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "crand", XL(19,257), XL_MASK, COM, { BT, BA, BB } },
-{ "hrfid", XL(19,274), 0xffffffff, POWER5, { 0 } },
+{ "hrfid", XL(19,274), 0xffffffff, POWER5 | CELL, { 0 } },
{ "crset", XL(19,289), XL_MASK, PPCCOM, { BT, BAT, BBA } },
{ "creqv", XL(19,289), XL_MASK, COM, { BT, BA, BB } },
+{ "doze", XL(19,402), 0xffffffff, POWER6, { 0 } },
+
{ "crorc", XL(19,417), XL_MASK, COM, { BT, BA, BB } },
+{ "nap", XL(19,434), 0xffffffff, POWER6, { 0 } },
+
{ "crmove", XL(19,449), XL_MASK, PPCCOM, { BT, BA, BBA } },
{ "cror", XL(19,449), XL_MASK, COM, { BT, BA, BB } },
+{ "sleep", XL(19,466), 0xffffffff, POWER6, { 0 } },
+{ "rvwinkle", XL(19,498), 0xffffffff, POWER6, { 0 } },
+
{ "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 } },
@@ -3174,8 +2973,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bcctrl", XLLK(19,528,1), XLBH_MASK, PPCCOM, { BO, BI, BH } },
{ "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 } },
+{ "bcctre", XLLK(19,529,0), XLBB_MASK, BOOKE64, { BO, BI } },
+{ "bcctrel", XLLK(19,529,1), XLBB_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 } },
@@ -3321,10 +3120,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "isel", XISEL(31,15), XISEL_MASK, PPCISEL, { RT, RA, RB, CRB } },
{ "mfocrf", XFXM(31,19,0,1), XFXFXM_MASK, COM, { RT, FXM } },
-{ "mfcr", X(31,19), XRARB_MASK, NOPOWER4, { RT } },
+{ "mfcr", X(31,19), XRARB_MASK, NOPOWER4 | COM, { RT } },
{ "mfcr", X(31,19), XFXFXM_MASK, POWER4, { RT, FXM4 } },
-{ "lwarx", X(31,20), X_MASK, PPC, { RT, RA0, RB } },
+{ "lwarx", X(31,20), XEH_MASK, PPC, { RT, RA0, RB, EH } },
{ "ldx", X(31,21), X_MASK, PPC64, { RT, RA0, RB } },
@@ -3417,9 +3216,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfmsr", X(31,83), XRARB_MASK, COM, { RT } },
-{ "ldarx", X(31,84), X_MASK, PPC64, { RT, RA0, RB } },
+{ "ldarx", X(31,84), XEH_MASK, PPC64, { RT, RA0, RB, EH } },
-{ "dcbf", X(31,86), XRT_MASK, PPC, { RA, RB } },
+{ "dcbfl", XOPL(31,86,1), XRT_MASK, POWER5, { RA, RB } },
+{ "dcbf", X(31,86), XLRT_MASK, PPC, { RA, RB, L } },
{ "lbzx", X(31,87), X_MASK, COM, { RT, RA0, RB } },
@@ -3501,12 +3301,14 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sle", XRC(31,153,0), X_MASK, M601, { RA, RS, RB } },
{ "sle.", XRC(31,153,1), X_MASK, M601, { RA, RS, RB } },
+{ "prtyw", X(31,154), XRB_MASK, POWER6, { RA, RS } },
+
{ "wrteei", X(31,163), XE_MASK, PPC403 | BOOKE, { E } },
{ "dcbtls", X(31,166), X_MASK, PPCCHLK, { CT, RA, RB }},
{ "dcbtlse", X(31,174), X_MASK, PPCCHLK64, { CT, RA, RB }},
-{ "mtmsrd", X(31,178), XRLARB_MASK, PPC64, { RS, MTMSRD_L } },
+{ "mtmsrd", X(31,178), XRLARB_MASK, PPC64, { RS, A_L } },
{ "stdux", X(31,181), X_MASK, PPC64, { RS, RAS, RB } },
@@ -3516,6 +3318,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 } },
+{ "prtyd", X(31,186), XRB_MASK, POWER6, { RA, RS } },
+
{ "stwuxe", X(31,191), X_MASK, BOOKE64, { RS, RAS, RB } },
{ "subfze", XO(31,200,0,0), XORB_MASK, PPCCOM, { RT, RA } },
@@ -3622,7 +3426,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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), X_MASK, PPC, { CT, RA, RB } },
+{ "dcbt", X(31,278), X_MASK, PPC, { CT, RA, RB } },
{ "lhzx", X(31,279), X_MASK, COM, { RT, RA0, RB } },
@@ -3703,6 +3507,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfsdr1", XSPR(31,339,25), XSPR_MASK, COM, { RT } },
{ "mfsrr0", XSPR(31,339,26), XSPR_MASK, COM, { RT } },
{ "mfsrr1", XSPR(31,339,27), XSPR_MASK, COM, { RT } },
+{ "mfcfar", XSPR(31,339,28), XSPR_MASK, POWER6, { RT } },
{ "mfpid", XSPR(31,339,48), XSPR_MASK, BOOKE, { RT } },
{ "mfpid", XSPR(31,339,945), XSPR_MASK, PPC403, { RT } },
{ "mfcsrr0", XSPR(31,339,58), XSPR_MASK, BOOKE, { RT } },
@@ -3924,12 +3729,18 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sthx", X(31,407), X_MASK, COM, { RS, RA0, RB } },
+{ "cmpb", X(31,508), X_MASK, POWER6, { RA, RS, RB } },
+
{ "lfqx", X(31,791), X_MASK, POWER2, { FRT, RA, RB } },
+{ "lfdpx", X(31,791), X_MASK, POWER6, { FRT, RA, RB } },
+
{ "lfqux", X(31,823), X_MASK, POWER2, { FRT, RA, RB } },
{ "stfqx", X(31,919), X_MASK, POWER2, { FRS, RA, RB } },
+{ "stfdpx", X(31,919), X_MASK, POWER6, { FRS, RA, RB } },
+
{ "stfqux", X(31,951), X_MASK, POWER2, { FRS, RA, RB } },
{ "orc", XRC(31,412,0), X_MASK, COM, { RA, RS, RB } },
@@ -3948,6 +3759,13 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sthuxe", X(31,447), X_MASK, BOOKE64, { RS, RAS, RB } },
+{ "cctpl", 0x7c210b78, 0xffffffff, CELL, { 0 }},
+{ "cctpm", 0x7c421378, 0xffffffff, CELL, { 0 }},
+{ "cctph", 0x7c631b78, 0xffffffff, CELL, { 0 }},
+{ "db8cyc", 0x7f9ce378, 0xffffffff, CELL, { 0 }},
+{ "db10cyc", 0x7fbdeb78, 0xffffffff, CELL, { 0 }},
+{ "db12cyc", 0x7fdef378, 0xffffffff, CELL, { 0 }},
+{ "db16cyc", 0x7ffffb78, 0xffffffff, CELL, { 0 }},
{ "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 } },
@@ -4019,6 +3837,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtsdr1", XSPR(31,467,25), XSPR_MASK, COM, { RS } },
{ "mtsrr0", XSPR(31,467,26), XSPR_MASK, COM, { RS } },
{ "mtsrr1", XSPR(31,467,27), XSPR_MASK, COM, { RS } },
+{ "mtcfar", XSPR(31,467,28), XSPR_MASK, POWER6, { RS } },
{ "mtpid", XSPR(31,467,48), XSPR_MASK, BOOKE, { RS } },
{ "mtpid", XSPR(31,467,945), XSPR_MASK, PPC403, { RS } },
{ "mtdecar", XSPR(31,467,54), XSPR_MASK, BOOKE, { RS } },
@@ -4206,6 +4025,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "clcs", X(31,531), XRB_MASK, M601, { RT, RA } },
+{ "ldbrx", X(31,532), X_MASK, CELL, { RT, RA0, RB } },
+
{ "lswx", X(31,533), X_MASK, PPCCOM, { RT, RA0, RB } },
{ "lsx", X(31,533), X_MASK, PWRCOM, { RT, RA, RB } },
@@ -4255,6 +4076,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lfdxe", X(31,607), X_MASK, BOOKE64, { FRT, RA0, RB } },
+{ "mffgpr", XRC(31,607,0), XRA_MASK, POWER6, { FRT, RB } },
+
{ "mfsri", X(31,627), X_MASK, PWRCOM, { RT, RA, RB } },
{ "dclst", X(31,630), XRB_MASK, PWRCOM, { RS, RA } },
@@ -4265,6 +4088,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfsrin", X(31,659), XRA_MASK, PPC32, { RT, RB } },
+{ "stdbrx", X(31,660), X_MASK, CELL, { RS, RA0, RB } },
+
{ "stswx", X(31,661), X_MASK, PPCCOM, { RS, RA0, RB } },
{ "stsx", X(31,661), X_MASK, PWRCOM, { RS, RA0, RB } },
@@ -4303,6 +4128,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stfdxe", X(31,735), X_MASK, BOOKE64, { FRS, RA0, RB } },
+{ "mftgpr", XRC(31,735,0), XRA_MASK, POWER6, { RT, FRB } },
+
{ "dcba", X(31,758), XRT_MASK, PPC405 | BOOKE, { RA, RB } },
{ "stfdux", X(31,759), X_MASK, COM, { FRS, RAS, RB } },
@@ -4317,6 +4144,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbivax", X(31,786), XRT_MASK, BOOKE, { RA, RB } },
{ "tlbivaxe",X(31,787), XRT_MASK, BOOKE64, { RA, RB } },
+{ "lwzcix", X(31,789), X_MASK, POWER6, { RT, RA0, RB } },
+
{ "lhbrx", X(31,790), X_MASK, COM, { RT, RA0, RB } },
{ "sraw", XRC(31,792,0), X_MASK, PPCCOM, { RA, RS, RB } },
@@ -4334,6 +4163,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "rac", X(31,818), X_MASK, PWRCOM, { RT, RA, RB } },
+{ "lhzcix", X(31,821), X_MASK, POWER6, { RT, RA0, RB } },
+
{ "dss", XDSS(31,822,0), XDSS_MASK, PPCVEC, { STRM } },
{ "dssall", XDSS(31,822,1), XDSS_MASK, PPCVEC, { 0 } },
@@ -4344,16 +4175,24 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "slbmfev", X(31,851), XRA_MASK, PPC64, { RT, RB } },
+{ "lbzcix", X(31,853), X_MASK, POWER6, { RT, RA0, RB } },
+
{ "mbar", X(31,854), X_MASK, BOOKE, { MO } },
{ "eieio", X(31,854), 0xffffffff, PPC, { 0 } },
+{ "lfiwax", X(31,855), X_MASK, POWER6, { FRT, RA0, RB } },
+
+{ "ldcix", X(31,885), X_MASK, POWER6, { RT, RA0, RB } },
+
{ "tlbsx", XRC(31,914,0), X_MASK, PPC403|BOOKE, { RTO, RA, RB } },
{ "tlbsx.", XRC(31,914,1), X_MASK, PPC403|BOOKE, { RTO, RA, RB } },
-{ "tlbsxe", XRC(31,915,0), X_MASK, BOOKE64, { RA, RB } },
-{ "tlbsxe.", XRC(31,915,1), X_MASK, BOOKE64, { RA, RB } },
+{ "tlbsxe", XRC(31,915,0), X_MASK, BOOKE64, { RTO, RA, RB } },
+{ "tlbsxe.", XRC(31,915,1), X_MASK, BOOKE64, { RTO, RA, RB } },
{ "slbmfee", X(31,915), XRA_MASK, PPC64, { RT, RB } },
+{ "stwcix", X(31,917), X_MASK, POWER6, { RS, RA0, RB } },
+
{ "sthbrx", X(31,918), X_MASK, COM, { RS, RA0, RB } },
{ "sraq", XRC(31,920,0), X_MASK, M601, { RA, RS, RB } },
@@ -4375,6 +4214,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbre", X(31,946), X_MASK, PPC403|BOOKE, { RSO, RAOPT, SHO } },
+{ "sthcix", X(31,949), X_MASK, POWER6, { RS, RA0, RB } },
+
{ "sraiq", XRC(31,952,0), X_MASK, M601, { RA, RS, SH } },
{ "sraiq.", XRC(31,952,1), X_MASK, M601, { RA, RS, SH } },
@@ -4390,6 +4231,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbwe", X(31,978), X_MASK, PPC403|BOOKE, { RSO, RAOPT, SHO } },
{ "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } },
+{ "stbcix", X(31,981), X_MASK, POWER6, { RS, RA0, RB } },
+
{ "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } },
{ "stfiwx", X(31,983), X_MASK, PPC, { FRS, RA0, RB } },
@@ -4404,6 +4247,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbli", X(31,1010), XRTRA_MASK, PPC, { RB } },
+{ "stdcix", X(31,1013), X_MASK, POWER6, { RS, RA0, RB } },
+
{ "dcbzl", XOPL(31,1014,1), XRT_MASK,POWER4, { RA, RB } },
{ "dcbz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
{ "dclz", X(31,1014), XRT_MASK, PPC, { RA, RB } },
@@ -4423,6 +4268,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stvx", X(31, 231), X_MASK, PPCVEC, { VS, RA, RB } },
{ "stvxl", X(31, 487), X_MASK, PPCVEC, { VS, RA, RB } },
+/* New load/store left/right index vector instructions that are in the Cell only. */
+{ "lvlx", X(31, 519), X_MASK, CELL, { VD, RA0, RB } },
+{ "lvlxl", X(31, 775), X_MASK, CELL, { VD, RA0, RB } },
+{ "lvrx", X(31, 551), X_MASK, CELL, { VD, RA0, RB } },
+{ "lvrxl", X(31, 807), X_MASK, CELL, { VD, RA0, RB } },
+{ "stvlx", X(31, 647), X_MASK, CELL, { VS, RA0, RB } },
+{ "stvlxl", X(31, 903), X_MASK, CELL, { VS, RA0, RB } },
+{ "stvrx", X(31, 679), X_MASK, CELL, { VS, RA0, RB } },
+{ "stvrxl", X(31, 935), X_MASK, CELL, { VS, RA0, RB } },
+
{ "lwz", OP(32), OP_MASK, PPCCOM, { RT, D, RA0 } },
{ "l", OP(32), OP_MASK, PWRCOM, { RT, D, RA0 } },
@@ -4483,6 +4338,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA0 } },
+{ "lfdp", OP(57), OP_MASK, POWER6, { FRT, D, RA0 } },
+
{ "lbze", DEO(58,0), DE_MASK, BOOKE64, { RT, DE, RA0 } },
{ "lbzue", DEO(58,1), DE_MASK, BOOKE64, { RT, DE, RAL } },
{ "lhze", DEO(58,2), DE_MASK, BOOKE64, { RT, DE, RA0 } },
@@ -4504,6 +4361,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lwa", DSO(58,2), DS_MASK, PPC64, { RT, DS, RA0 } },
+{ "dadd", XRC(59,2,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "dadd.", XRC(59,2,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
+{ "dqua", ZRC(59,3,0), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+{ "dqua.", ZRC(59,3,1), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+
{ "fdivs", A(59,18,0), AFRC_MASK, PPC, { FRT, FRA, FRB } },
{ "fdivs.", A(59,18,1), AFRC_MASK, PPC, { FRT, FRA, FRB } },
@@ -4516,14 +4379,14 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fsqrts", A(59,22,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
{ "fsqrts.", A(59,22,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
-{ "fres", A(59,24,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
-{ "fres.", A(59,24,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "fres", A(59,24,0), AFRALFRC_MASK, PPC, { FRT, FRB, A_L } },
+{ "fres.", A(59,24,1), AFRALFRC_MASK, PPC, { FRT, FRB, A_L } },
{ "fmuls", A(59,25,0), AFRB_MASK, PPC, { FRT, FRA, FRC } },
{ "fmuls.", A(59,25,1), AFRB_MASK, PPC, { FRT, FRA, FRC } },
-{ "frsqrtes", A(59,26,0), AFRAFRC_MASK, POWER5, { FRT, FRB } },
-{ "frsqrtes.",A(59,26,1), AFRAFRC_MASK, POWER5, { FRT, FRB } },
+{ "frsqrtes", A(59,26,0), AFRALFRC_MASK,POWER5, { FRT, FRB, A_L } },
+{ "frsqrtes.",A(59,26,1), AFRALFRC_MASK,POWER5, { FRT, FRB, A_L } },
{ "fmsubs", A(59,28,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
{ "fmsubs.", A(59,28,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
@@ -4537,10 +4400,73 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fnmadds", A(59,31,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
{ "fnmadds.",A(59,31,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
+{ "dmul", XRC(59,34,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "dmul.", XRC(59,34,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
+{ "drrnd", ZRC(59,35,0), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+{ "drrnd.", ZRC(59,35,1), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+
+{ "dscli", ZRC(59,66,0), Z_MASK, POWER6, { FRT, FRA, SH16 } },
+{ "dscli.", ZRC(59,66,1), Z_MASK, POWER6, { FRT, FRA, SH16 } },
+
+{ "dquai", ZRC(59,67,0), Z2_MASK, POWER6, { TE, FRT, FRB, RMC } },
+{ "dquai.", ZRC(59,67,1), Z2_MASK, POWER6, { TE, FRT, FRB, RMC } },
+
+{ "dscri", ZRC(59,98,0), Z_MASK, POWER6, { FRT, FRA, SH16 } },
+{ "dscri.", ZRC(59,98,1), Z_MASK, POWER6, { FRT, FRA, SH16 } },
+
+{ "drintx", ZRC(59,99,0), Z2_MASK, POWER6, { R, FRT, FRB, RMC } },
+{ "drintx.", ZRC(59,99,1), Z2_MASK, POWER6, { R, FRT, FRB, RMC } },
+
+{ "dcmpo", X(59,130), X_MASK, POWER6, { BF, FRA, FRB } },
+
+{ "dtstex", X(59,162), X_MASK, POWER6, { BF, FRA, FRB } },
+{ "dtstdc", Z(59,194), Z_MASK, POWER6, { BF, FRA, DCM } },
+{ "dtstdg", Z(59,226), Z_MASK, POWER6, { BF, FRA, DGM } },
+
+{ "drintn", ZRC(59,227,0), Z2_MASK, POWER6, { R, FRT, FRB, RMC } },
+{ "drintn.", ZRC(59,227,1), Z2_MASK, POWER6, { R, FRT, FRB, RMC } },
+
+{ "dctdp", XRC(59,258,0), X_MASK, POWER6, { FRT, FRB } },
+{ "dctdp.", XRC(59,258,1), X_MASK, POWER6, { FRT, FRB } },
+
+{ "dctfix", XRC(59,290,0), X_MASK, POWER6, { FRT, FRB } },
+{ "dctfix.", XRC(59,290,1), X_MASK, POWER6, { FRT, FRB } },
+
+{ "ddedpd", XRC(59,322,0), X_MASK, POWER6, { SP, FRT, FRB } },
+{ "ddedpd.", XRC(59,322,1), X_MASK, POWER6, { SP, FRT, FRB } },
+
+{ "dxex", XRC(59,354,0), X_MASK, POWER6, { FRT, FRB } },
+{ "dxex.", XRC(59,354,1), X_MASK, POWER6, { FRT, FRB } },
+
+{ "dsub", XRC(59,514,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "dsub.", XRC(59,514,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
+{ "ddiv", XRC(59,546,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "ddiv.", XRC(59,546,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
+{ "dcmpu", X(59,642), X_MASK, POWER6, { BF, FRA, FRB } },
+
+{ "dtstsf", X(59,674), X_MASK, POWER6, { BF, FRA, FRB } },
+
+{ "drsp", XRC(59,770,0), X_MASK, POWER6, { FRT, FRB } },
+{ "drsp.", XRC(59,770,1), X_MASK, POWER6, { FRT, FRB } },
+
+{ "dcffix", XRC(59,802,0), X_MASK, POWER6, { FRT, FRB } },
+{ "dcffix.", XRC(59,802,1), X_MASK, POWER6, { FRT, FRB } },
+
+{ "denbcd", XRC(59,834,0), X_MASK, POWER6, { S, FRT, FRB } },
+{ "denbcd.", XRC(59,834,1), X_MASK, POWER6, { S, FRT, FRB } },
+
+{ "diex", XRC(59,866,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "diex.", XRC(59,866,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
{ "stfq", OP(60), OP_MASK, POWER2, { FRS, D, RA } },
{ "stfqu", OP(61), OP_MASK, POWER2, { FRS, D, RA } },
+{ "stfdp", OP(61), OP_MASK, POWER6, { FRT, D, RA0 } },
+
{ "lde", DEO(62,0), DE_MASK, BOOKE64, { RT, DES, RA0 } },
{ "ldue", DEO(62,1), DE_MASK, BOOKE64, { RT, DES, RA0 } },
{ "lfse", DEO(62,4), DE_MASK, BOOKE64, { FRT, DES, RA0 } },
@@ -4562,6 +4488,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fcmpu", X(63,0), X_MASK|(3<<21), COM, { BF, FRA, FRB } },
+{ "daddq", XRC(63,2,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "daddq.", XRC(63,2,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
+{ "dquaq", ZRC(63,3,0), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+{ "dquaq.", ZRC(63,3,1), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+
+{ "fcpsgn", XRC(63,8,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "fcpsgn.", XRC(63,8,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
{ "frsp", XRC(63,12,0), XRA_MASK, COM, { FRT, FRB } },
{ "frsp.", XRC(63,12,1), XRA_MASK, COM, { FRT, FRB } },
@@ -4596,16 +4531,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fsel", A(63,23,0), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
{ "fsel.", A(63,23,1), A_MASK, PPC, { FRT,FRA,FRC,FRB } },
-{ "fre", A(63,24,0), AFRAFRC_MASK, POWER5, { FRT, FRB } },
-{ "fre.", A(63,24,1), AFRAFRC_MASK, POWER5, { FRT, FRB } },
+{ "fre", A(63,24,0), AFRALFRC_MASK, POWER5, { FRT, FRB, A_L } },
+{ "fre.", A(63,24,1), AFRALFRC_MASK, POWER5, { FRT, FRB, A_L } },
{ "fmul", A(63,25,0), AFRB_MASK, PPCCOM, { FRT, FRA, FRC } },
{ "fm", A(63,25,0), AFRB_MASK, PWRCOM, { FRT, FRA, FRC } },
{ "fmul.", A(63,25,1), AFRB_MASK, PPCCOM, { FRT, FRA, FRC } },
{ "fm.", A(63,25,1), AFRB_MASK, PWRCOM, { FRT, FRA, FRC } },
-{ "frsqrte", A(63,26,0), AFRAFRC_MASK, PPC, { FRT, FRB } },
-{ "frsqrte.",A(63,26,1), AFRAFRC_MASK, PPC, { FRT, FRB } },
+{ "frsqrte", A(63,26,0), AFRALFRC_MASK, PPC, { FRT, FRB, A_L } },
+{ "frsqrte.",A(63,26,1), AFRALFRC_MASK, PPC, { FRT, FRB, A_L } },
{ "fmsub", A(63,28,0), A_MASK, PPCCOM, { FRT,FRA,FRC,FRB } },
{ "fms", A(63,28,0), A_MASK, PWRCOM, { FRT,FRA,FRC,FRB } },
@@ -4629,6 +4564,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fcmpo", X(63,32), X_MASK|(3<<21), COM, { BF, FRA, FRB } },
+{ "dmulq", XRC(63,34,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "dmulq.", XRC(63,34,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
+{ "drrndq", ZRC(63,35,0), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+{ "drrndq.", ZRC(63,35,1), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+
{ "mtfsb1", XRC(63,38,0), XRARB_MASK, COM, { BT } },
{ "mtfsb1.", XRC(63,38,1), XRARB_MASK, COM, { BT } },
@@ -4637,21 +4578,54 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mcrfs", X(63,64), XRB_MASK|(3<<21)|(3<<16), COM, { BF, BFA } },
+{ "dscliq", ZRC(63,66,0), Z_MASK, POWER6, { FRT, FRA, SH16 } },
+{ "dscliq.", ZRC(63,66,1), Z_MASK, POWER6, { FRT, FRA, SH16 } },
+
+{ "dquaiq", ZRC(63,67,0), Z2_MASK, POWER6, { TE, FRT, FRB, RMC } },
+{ "dquaiq.", ZRC(63,67,1), Z2_MASK, POWER6, { FRT, FRA, FRB, RMC } },
+
{ "mtfsb0", XRC(63,70,0), XRARB_MASK, COM, { BT } },
{ "mtfsb0.", XRC(63,70,1), XRARB_MASK, COM, { BT } },
{ "fmr", XRC(63,72,0), XRA_MASK, COM, { FRT, FRB } },
{ "fmr.", XRC(63,72,1), XRA_MASK, COM, { FRT, FRB } },
-{ "mtfsfi", XRC(63,134,0), XRA_MASK|(3<<21)|(1<<11), COM, { BF, U } },
-{ "mtfsfi.", XRC(63,134,1), XRA_MASK|(3<<21)|(1<<11), COM, { BF, U } },
+{ "dscriq", ZRC(63,98,0), Z_MASK, POWER6, { FRT, FRA, SH16 } },
+{ "dscriq.", ZRC(63,98,1), Z_MASK, POWER6, { FRT, FRA, SH16 } },
+
+{ "drintxq", ZRC(63,99,0), Z2_MASK, POWER6, { R, FRT, FRB, RMC } },
+{ "drintxq.",ZRC(63,99,1), Z2_MASK, POWER6, { R, FRT, FRB, RMC } },
+
+{ "dcmpoq", X(63,130), X_MASK, POWER6, { BF, FRA, FRB } },
+
+{ "mtfsfi", XRC(63,134,0), XWRA_MASK|(3<<21)|(1<<11), COM, { BFF, U, W } },
+{ "mtfsfi.", XRC(63,134,1), XWRA_MASK|(3<<21)|(1<<11), COM, { BFF, U, W } },
{ "fnabs", XRC(63,136,0), XRA_MASK, COM, { FRT, FRB } },
{ "fnabs.", XRC(63,136,1), XRA_MASK, COM, { FRT, FRB } },
+{ "dtstexq", X(63,162), X_MASK, POWER6, { BF, FRA, FRB } },
+{ "dtstdcq", Z(63,194), Z_MASK, POWER6, { BF, FRA, DCM } },
+{ "dtstdgq", Z(63,226), Z_MASK, POWER6, { BF, FRA, DGM } },
+
+{ "drintnq", ZRC(63,227,0), Z2_MASK, POWER6, { R, FRT, FRB, RMC } },
+{ "drintnq.",ZRC(63,227,1), Z2_MASK, POWER6, { R, FRT, FRB, RMC } },
+
+{ "dctqpq", XRC(63,258,0), X_MASK, POWER6, { FRT, FRB } },
+{ "dctqpq.", XRC(63,258,1), X_MASK, POWER6, { FRT, FRB } },
+
{ "fabs", XRC(63,264,0), XRA_MASK, COM, { FRT, FRB } },
{ "fabs.", XRC(63,264,1), XRA_MASK, COM, { FRT, FRB } },
+{ "dctfixq", XRC(63,290,0), X_MASK, POWER6, { FRT, FRB } },
+{ "dctfixq.",XRC(63,290,1), X_MASK, POWER6, { FRT, FRB } },
+
+{ "ddedpdq", XRC(63,322,0), X_MASK, POWER6, { SP, FRT, FRB } },
+{ "ddedpdq.",XRC(63,322,1), X_MASK, POWER6, { SP, FRT, FRB } },
+
+{ "dxexq", XRC(63,354,0), X_MASK, POWER6, { FRT, FRB } },
+{ "dxexq.", XRC(63,354,1), X_MASK, POWER6, { FRT, FRB } },
+
{ "frin", XRC(63,392,0), XRA_MASK, POWER5, { FRT, FRB } },
{ "frin.", XRC(63,392,1), XRA_MASK, POWER5, { FRT, FRB } },
{ "friz", XRC(63,424,0), XRA_MASK, POWER5, { FRT, FRB } },
@@ -4661,11 +4635,27 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "frim", XRC(63,488,0), XRA_MASK, POWER5, { FRT, FRB } },
{ "frim.", XRC(63,488,1), XRA_MASK, POWER5, { FRT, FRB } },
+{ "dsubq", XRC(63,514,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "dsubq.", XRC(63,514,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
+{ "ddivq", XRC(63,546,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "ddivq.", XRC(63,546,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
{ "mffs", XRC(63,583,0), XRARB_MASK, COM, { FRT } },
{ "mffs.", XRC(63,583,1), XRARB_MASK, COM, { FRT } },
-{ "mtfsf", XFL(63,711,0), XFL_MASK, COM, { FLM, FRB } },
-{ "mtfsf.", XFL(63,711,1), XFL_MASK, COM, { FLM, FRB } },
+{ "dcmpuq", X(63,642), X_MASK, POWER6, { BF, FRA, FRB } },
+
+{ "dtstsfq", X(63,674), X_MASK, POWER6, { BF, FRA, FRB } },
+
+{ "mtfsf", XFL(63,711,0), XFL_MASK, COM, { FLM, FRB, XFL_L, W } },
+{ "mtfsf.", XFL(63,711,1), XFL_MASK, COM, { FLM, FRB, XFL_L, W } },
+
+{ "drdpq", XRC(63,770,0), X_MASK, POWER6, { FRT, FRB } },
+{ "drdpq.", XRC(63,770,1), X_MASK, POWER6, { FRT, FRB } },
+
+{ "dcffixq", XRC(63,802,0), X_MASK, POWER6, { FRT, FRB } },
+{ "dcffixq.",XRC(63,802,1), X_MASK, POWER6, { FRT, FRB } },
{ "fctid", XRC(63,814,0), XRA_MASK, PPC64, { FRT, FRB } },
{ "fctid.", XRC(63,814,1), XRA_MASK, PPC64, { FRT, FRB } },
@@ -4673,9 +4663,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "fctidz", XRC(63,815,0), XRA_MASK, PPC64, { FRT, FRB } },
{ "fctidz.", XRC(63,815,1), XRA_MASK, PPC64, { FRT, FRB } },
+{ "denbcdq", XRC(63,834,0), X_MASK, POWER6, { S, FRT, FRB } },
+{ "denbcdq.",XRC(63,834,1), X_MASK, POWER6, { S, FRT, FRB } },
+
{ "fcfid", XRC(63,846,0), XRA_MASK, PPC64, { FRT, FRB } },
{ "fcfid.", XRC(63,846,1), XRA_MASK, PPC64, { FRT, FRB } },
+{ "diexq", XRC(63,866,0), X_MASK, POWER6, { FRT, FRA, FRB } },
+{ "diexq.", XRC(63,866,1), X_MASK, POWER6, { FRT, FRA, FRB } },
+
};
const int powerpc_num_opcodes =
diff --git a/contrib/binutils/opcodes/s390-mkopc.c b/contrib/binutils/opcodes/s390-mkopc.c
index 5a794fd..9e94f24 100644
--- a/contrib/binutils/opcodes/s390-mkopc.c
+++ b/contrib/binutils/opcodes/s390-mkopc.c
@@ -36,7 +36,8 @@ enum s390_opcode_cpu_val
S390_OPCODE_G6,
S390_OPCODE_Z900,
S390_OPCODE_Z990,
- S390_OPCODE_Z9_109
+ S390_OPCODE_Z9_109,
+ S390_OPCODE_Z9_EC
};
struct op_struct
@@ -198,6 +199,8 @@ main (void)
min_cpu = S390_OPCODE_Z990;
else if (strcmp (cpu_string, "z9-109") == 0)
min_cpu = S390_OPCODE_Z9_109;
+ else if (strcmp (cpu_string, "z9-ec") == 0)
+ min_cpu = S390_OPCODE_Z9_EC;
else {
fprintf (stderr, "Couldn't parse cpu string %s\n", cpu_string);
exit (1);
diff --git a/contrib/binutils/opcodes/s390-opc.c b/contrib/binutils/opcodes/s390-opc.c
index aa2e5a3..a443fcf 100644
--- a/contrib/binutils/opcodes/s390-opc.c
+++ b/contrib/binutils/opcodes/s390-opc.c
@@ -133,7 +133,10 @@ const struct s390_operand s390_operands[] =
#define U32_16 41 /* 32 bit unsigned value starting at 16 */
{ 32, 16, 0 },
#define M_16 42 /* 4 bit optional mask starting at 16 */
- { 4, 16, S390_OPERAND_OPTIONAL }
+ { 4, 16, S390_OPERAND_OPTIONAL },
+#define RO_28 43 /* optional GPR starting at position 28 */
+ { 4, 28, (S390_OPERAND_GPR | S390_OPERAND_OPTIONAL) }
+
};
@@ -202,13 +205,21 @@ const struct s390_operand s390_operands[] =
#define INSTR_RRE_RA 4, { R_24,A_28,0,0,0,0 } /* e.g. ear */
#define INSTR_RRE_RF 4, { R_24,F_28,0,0,0,0 } /* e.g. cefbr */
#define INSTR_RRE_RR 4, { R_24,R_28,0,0,0,0 } /* e.g. lura */
+#define INSTR_RRE_FR 4, { F_24,R_28,0,0,0,0 } /* e.g. ldgr */
+/* Actually efpc and sfpc do not take an optional operand.
+ This is just a workaround for existing code e.g. glibc. */
+#define INSTR_RRE_RR_OPT 4, { R_24,RO_28,0,0,0,0 } /* efpc, sfpc */
#define INSTR_RRF_F0FF 4, { F_16,F_24,F_28,0,0,0 } /* e.g. madbr */
+#define INSTR_RRF_F0FF2 4, { F_24,F_16,F_28,0,0,0 } /* e.g. cpsdr */
+#define INSTR_RRF_F0FR 4, { F_24,F_16,R_28,0,0,0 } /* e.g. iedtr */
#define INSTR_RRF_FUFF 4, { F_24,F_16,F_28,U4_20,0,0 } /* e.g. didbr */
#define INSTR_RRF_RURR 4, { R_24,R_28,R_16,U4_20,0,0 } /* e.g. .insn */
#define INSTR_RRF_R0RR 4, { R_24,R_28,R_16,0,0,0 } /* e.g. idte */
-#define INSTR_RRF_U0FF 4, { F_24,U4_16,F_28,0,0,0 } /* e.g. cfxbr */
-#define INSTR_RRF_U0FR 4, { F_24,U4_16,R_28,0,0,0 } /* e.g. cfebr */
-#define INSTR_RRF_U0FR 4, { F_24,U4_16,R_28,0,0,0 } /* e.g. cfxbr */
+#define INSTR_RRF_U0FF 4, { F_24,U4_16,F_28,0,0,0 } /* e.g. fixr */
+#define INSTR_RRF_U0RF 4, { R_24,U4_16,F_28,0,0,0 } /* e.g. cfebr */
+#define INSTR_RRF_UUFF 4, { F_24,U4_16,F_28,U4_20,0,0 } /* e.g. fidtr */
+#define INSTR_RRF_0UFF 4, { F_24,F_28,U4_20,0,0,0 } /* e.g. ldetr */
+#define INSTR_RRF_FFFU 4, { F_24,F_16,F_28,U4_20,0,0 } /* e.g. qadtr */
#define INSTR_RRF_M0RR 4, { R_24,R_28,M_16,0,0,0 } /* e.g. sske */
#define INSTR_RR_0R 2, { R_12, 0,0,0,0,0 } /* e.g. br */
#define INSTR_RR_FF 2, { F_8,F_12,0,0,0,0 } /* e.g. adr */
@@ -216,6 +227,7 @@ const struct s390_operand s390_operands[] =
#define INSTR_RR_RR 2, { R_8,R_12,0,0,0,0 } /* e.g. lr */
#define INSTR_RR_U0 2, { U8_8, 0,0,0,0,0 } /* e.g. svc */
#define INSTR_RR_UR 2, { U4_8,R_12,0,0,0,0 } /* e.g. bcr */
+#define INSTR_RRR_F0FF 4, { F_24,F_28,F_16,0,0,0 } /* e.g. ddtr */
#define INSTR_RSE_RRRD 6, { R_8,R_12,D_20,B_16,0,0 } /* e.g. lmh */
#define INSTR_RSE_CCRD 6, { C_8,C_12,D_20,B_16,0,0 } /* e.g. lmh */
#define INSTR_RSE_RURD 6, { R_8,U4_12,D_20,B_16,0,0 } /* e.g. icmh */
@@ -244,6 +256,7 @@ const struct s390_operand s390_operands[] =
#define INSTR_SIY_URD 6, { D20_20,B_16,U8_8,0,0,0 } /* e.g. tmy */
#define INSTR_SSE_RDRD 6, { D_20,B_16,D_36,B_32,0,0 } /* e.g. mvsdk */
#define INSTR_SS_L0RDRD 6, { D_20,L8_8,B_16,D_36,B_32,0 } /* e.g. mvc */
+#define INSTR_SS_L2RDRD 6, { D_20,B_16,D_36,L8_8,B_32,0 } /* e.g. pka */
#define INSTR_SS_LIRDRD 6, { D_20,L4_8,B_16,D_36,B_32,U4_12 } /* e.g. srp */
#define INSTR_SS_LLRDRD 6, { D_20,L4_8,B_16,D_36,L4_12,B_32 } /* e.g. pack */
#define INSTR_SS_RRRDRD 6, { D_20,R_8,B_16,D_36,B_32,R_12 } /* e.g. mvck */
@@ -275,13 +288,19 @@ const struct s390_operand s390_operands[] =
#define MASK_RRE_RA { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
#define MASK_RRE_RF { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
#define MASK_RRE_RR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
+#define MASK_RRE_FR { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
+#define MASK_RRE_RR_OPT { 0xff, 0xff, 0xff, 0x00, 0x00, 0x00 }
#define MASK_RRF_F0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
+#define MASK_RRF_F0FF2 { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
+#define MASK_RRF_F0FR { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
#define MASK_RRF_FUFF { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RRF_RURR { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RRF_R0RR { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RRF_U0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
-#define MASK_RRF_U0FR { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
-#define MASK_RRF_U0FR { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
+#define MASK_RRF_U0RF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
+#define MASK_RRF_UUFF { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RRF_0UFF { 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00 }
+#define MASK_RRF_FFFU { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RRF_M0RR { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
#define MASK_RR_0R { 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RR_FF { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
@@ -289,6 +308,7 @@ const struct s390_operand s390_operands[] =
#define MASK_RR_RR { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RR_U0 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_RR_UR { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_RRR_F0FF { 0xff, 0xff, 0x0f, 0x00, 0x00, 0x00 }
#define MASK_RSE_RRRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSE_CCRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_RSE_RURD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
@@ -317,6 +337,7 @@ const struct s390_operand s390_operands[] =
#define MASK_SIY_URD { 0xff, 0x00, 0x00, 0x00, 0x00, 0xff }
#define MASK_SSE_RDRD { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
#define MASK_SS_L0RDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SS_L2RDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_SS_LIRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_SS_LLRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_SS_RRRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
@@ -324,7 +345,7 @@ const struct s390_operand s390_operands[] =
#define MASK_SS_RRRDRD3 { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
#define MASK_S_00 { 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
#define MASK_S_RD { 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }
-#define MASK_SSF_RRDRD { 0xff, 0x00, 0x00, 0x00, 0x00, 0x00 }
+#define MASK_SSF_RRDRD { 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00 }
/* The opcode formats table (blueprints for .insn pseudo mnemonic). */
diff --git a/contrib/binutils/opcodes/s390-opc.txt b/contrib/binutils/opcodes/s390-opc.txt
index bbe1588..865e264 100644
--- a/contrib/binutils/opcodes/s390-opc.txt
+++ b/contrib/binutils/opcodes/s390-opc.txt
@@ -344,9 +344,9 @@ ed0000000008 keb RXE_FRRD "compare and signal short bfp" g5 esa,zarch
b396 cxfbr RRE_RF "convert from fixed 32 to extended bfp" g5 esa,zarch
b395 cdfbr RRE_RF "convert from fixed 32 to long bfp" g5 esa,zarch
b394 cefbr RRE_RF "convert from fixed 32 to short bfp" g5 esa,zarch
-b39a cfxbr RRF_U0FR "convert to fixed extended bfp to 32" g5 esa,zarch
-b399 cfdbr RRF_U0FR "convert to fixed long bfp to 32" g5 esa,zarch
-b398 cfebr RRF_U0FR "convert to fixed short bfp to 32" g5 esa,zarch
+b39a cfxbr RRF_U0RF "convert to fixed extended bfp to 32" g5 esa,zarch
+b399 cfdbr RRF_U0RF "convert to fixed long bfp to 32" g5 esa,zarch
+b398 cfebr RRF_U0RF "convert to fixed short bfp to 32" g5 esa,zarch
b34d dxbr RRE_FF "divide extended bfp" g5 esa,zarch
b31d ddbr RRE_FF "divide long bfp" g5 esa,zarch
ed000000001d ddb RXE_FRRD "divide long bfp" g5 esa,zarch
@@ -354,7 +354,7 @@ b30d debr RRE_FF "divide short bfp" g5 esa,zarch
ed000000000d deb RXE_FRRD "divide short bfp" g5 esa,zarch
b35b didbr RRF_FUFF "divide to integer long bfp" g5 esa,zarch
b353 diebr RRF_FUFF "divide to integer short bfp" g5 esa,zarch
-b38c efpc RRE_RR "extract fpc" g5 esa,zarch
+b38c efpc RRE_RR_OPT "extract fpc" g5 esa,zarch
b342 ltxbr RRE_FF "load and test extended bfp" g5 esa,zarch
b312 ltdbr RRE_FF "load and test long bfp" g5 esa,zarch
b302 ltebr RRE_FF "load and test short bfp" g5 esa,zarch
@@ -397,7 +397,7 @@ b31f msdbr RRF_F0FF "multiply and subtract long bfp" g5 esa,zarch
ed000000001f msdb RXF_FRRDF "multiply and subtract long bfp" g5 esa,zarch
b30f msebr RRF_F0FF "multiply and subtract short bfp" g5 esa,zarch
ed000000000f mseb RXF_FRRDF "multiply and subtract short bfp" g5 esa,zarch
-b384 sfpc RRE_RR "set fpc" g5 esa,zarch
+b384 sfpc RRE_RR_OPT "set fpc" g5 esa,zarch
b299 srnm S_RD "set rounding mode" g5 esa,zarch
b316 sqxbr RRE_FF "square root extended bfp" g5 esa,zarch
b315 sqdbr RRE_FF "square root long bfp" g5 esa,zarch
@@ -428,7 +428,7 @@ a701 tmll RI_RU "test under mask low low" g5 esa,zarch
b278 stcke S_RD "store clock extended" g5 esa,zarch
b2a5 tre RRE_RR "translate extended" g5 esa,zarch
eb000000008e mvclu RSE_RRRD "move long unicode" g5 esa,zarch
-e9 pka SS_L0RDRD "pack ascii" g5 esa,zarch
+e9 pka SS_L2RDRD "pack ascii" g5 esa,zarch
e1 pku SS_L0RDRD "pack unicode" g5 esa,zarch
b993 troo RRE_RR "translate one to one" g5 esa,zarch
b992 trot RRE_RR "translate one to two" g5 esa,zarch
@@ -555,15 +555,15 @@ b91c msgfr RRE_RR "multiply single 64<32" z900 zarch
b3a4 cegbr RRE_RR "convert from fixed 64 to short bfp" z900 zarch
b3a5 cdgbr RRE_RR "convert from fixed 64 to long bfp" z900 zarch
b3a6 cxgbr RRE_RR "convert from fixed 64 to extended bfp" z900 zarch
-b3a8 cgebr RRF_U0FR "convert to fixed short bfd to 64" z900 zarch
-b3a9 cgdbr RRF_U0FR "convert to fixed long bfp to 64" z900 zarch
-b3aa cgxbr RRF_U0FR "convert to fixed extended bfp to 64" z900 zarch
+b3a8 cgebr RRF_U0RF "convert to fixed short bfd to 64" z900 zarch
+b3a9 cgdbr RRF_U0RF "convert to fixed long bfp to 64" z900 zarch
+b3aa cgxbr RRF_U0RF "convert to fixed extended bfp to 64" z900 zarch
b3c4 cegr RRE_RR "convert from fixed 64 to short hfp" z900 zarch
b3c5 cdgr RRE_RR "convert from fixed 64 to long hfp" z900 zarch
b3c6 cxgr RRE_RR "convert from fixed 64 to extended hfp" z900 zarch
-b3c8 cger RRF_U0FR "convert to fixed short hfp to 64" z900 zarch
-b3c9 cgdr RRF_U0FR "convert to fixed long hfp to 64" z900 zarch
-b3ca cgxr RRF_U0FR "convert to fixed extended hfp to 64" z900 zarch
+b3c8 cger RRF_U0RF "convert to fixed short hfp to 64" z900 zarch
+b3c9 cgdr RRF_U0RF "convert to fixed long hfp to 64" z900 zarch
+b3ca cgxr RRF_U0RF "convert to fixed extended hfp to 64" z900 zarch
010b tam E "test addressing mode" z900 esa,zarch
010c sam24 E "set addressing mode 24" z900 esa,zarch
010d sam31 E "set addressing mode 31" z900 esa,zarch
@@ -631,9 +631,9 @@ b369 cxr RRE_FF "compare extended hfp" g5 esa,zarch
b3b6 cxfr RRE_RF "convert from fixed 32 to extended hfp" g5 esa,zarch
b3b5 cdfr RRE_RF "convert from fixed 32 to long hfp" g5 esa,zarch
b3b4 cefr RRE_RF "convert from fixed 32 to short hfp" g5 esa,zarch
-b3ba cfxr RRF_U0FR "convert to fixed extended hfp to 32" z900 zarch
-b3b9 cfdr RRF_U0FR "convert to fixed long hfp to 32" z900 zarch
-b3b8 cfer RRF_U0FR "convert to fixed short hfp to 32" z900 zarch
+b3ba cfxr RRF_U0RF "convert to fixed extended hfp to 32" z900 zarch
+b3b9 cfdr RRF_U0RF "convert to fixed long hfp to 32" z900 zarch
+b3b8 cfer RRF_U0RF "convert to fixed short hfp to 32" z900 zarch
b362 ltxr RRE_FF "load and test extended hfp" g5 esa,zarch
b363 lcxr RRE_FF "load complement extended hfp" g5 esa,zarch
b367 fixr RRF_U0FF "load fp integer extended hfp" g5 esa,zarch
@@ -863,3 +863,69 @@ b338 maylr RRF_F0FF "multiply and add unnormalized long hfp low" z9-109 zarch
ed000000003a may RXF_FRRDF "multiply and add unnormalized long hfp" z9-109 zarch
ed000000003c mayh RXF_FRRDF "multiply and add unnormalized long hfp high" z9-109 zarch
ed0000000038 mayl RXF_FRRDF "multiply and add unnormalized long hfp low" z9-109 zarch
+b370 lpdfr RRE_FF "load positive no cc" z9-ec zarch
+b371 lndfr RRE_FF "load negative no cc" z9-ec zarch
+b372 cpsdr RRF_F0FF2 "copy sign" z9-ec zarch
+b373 lcdfr RRE_FF "load complement no cc" z9-ec zarch
+b3c1 ldgr RRE_FR "load fpr from gr" z9-ec zarch
+b3cd lgdr RRE_RF "load gr from fpr" z9-ec zarch
+b3d2 adtr RRR_F0FF "add long dfp" z9-ec zarch
+b3da axtr RRR_F0FF "add extended dfp" z9-ec zarch
+b3e4 cdtr RRE_FF "compare long dfp" z9-ec zarch
+b3ec cxtr RRE_FF "compare extended dfp" z9-ec zarch
+b3e0 kdtr RRE_FF "compare and signal long dfp" z9-ec zarch
+b3e8 kxtr RRE_FF "compare and signal extended dfp" z9-ec zarch
+b3f4 cedtr RRE_FF "compare exponent long dfp" z9-ec zarch
+b3fc cextr RRE_FF "compare exponent extended dfp" z9-ec zarch
+b3f1 cdgtr RRE_FR "convert from fixed long dfp" z9-ec zarch
+b3f9 cxgtr RRE_FR "convert from fixed extended dfp" z9-ec zarch
+b3f3 cdstr RRE_FR "convert from signed bcd long dfp" z9-ec zarch
+b3fb cxstr RRE_FR "convert from signed bcd extended dfp" z9-ec zarch
+b3f2 cdutr RRE_FR "convert from unsigned bcd to long dfp" z9-ec zarch
+b3fa cxutr RRE_FR "convert from unsigned bcd to extended dfp" z9-ec zarch
+b3e1 cgdtr RRF_U0RF "convert from long dfp to fixed" z9-ec zarch
+b3e9 cgxtr RRF_U0RF "convert from extended dfp to fixed" z9-ec zarch
+b3e3 csdtr RRE_RF "convert from long dfp to signed bcd" z9-ec zarch
+b3eb csxtr RRE_RF "convert from extended dfp to signed bcd" z9-ec zarch
+b3e2 cudtr RRE_RF "convert from long dfp to unsigned bcd" z9-ec zarch
+b3ea cuxtr RRE_RF "convert from extended dfp to unsigned bcd" z9-ec zarch
+b3d1 ddtr RRR_F0FF "divide long dfp" z9-ec zarch
+b3d9 dxtr RRR_F0FF "divide extended dfp" z9-ec zarch
+b3e5 eedtr RRE_RF "extract biased exponent from long dfp" z9-ec zarch
+b3ed eextr RRE_RF "extract biased exponent from extended dfp" z9-ec zarch
+b3e7 esdtr RRE_RF "extract significance from long dfp" z9-ec zarch
+b3ef esxtr RRE_RF "extract significance from extended dfp" z9-ec zarch
+b3f6 iedtr RRF_F0FR "insert biased exponent long dfp" z9-ec zarch
+b3fe iextr RRF_F0FR "insert biased exponent extended dfp" z9-ec zarch
+b3d6 ltdtr RRE_FF "load and test long dfp" z9-ec zarch
+b3de ltxtr RRE_FF "load and test extended dfp" z9-ec zarch
+b3d7 fidtr RRF_UUFF "load fp integer long dfp" z9-ec zarch
+b3df fixtr RRF_UUFF "load fp integer extended dfp" z9-ec zarch
+b2bd lfas S_RD "load fpd and signal" z9-ec zarch
+b3d4 ldetr RRF_0UFF "load lengthened long dfp" z9-ec zarch
+b3dc lxdtr RRF_0UFF "load lengthened extended dfp" z9-ec zarch
+b3d5 ledtr RRF_UUFF "load rounded long dfp" z9-ec zarch
+b3dd ldxtr RRF_UUFF "load rounded extended dfp" z9-ec zarch
+b3d0 mdtr RRR_F0FF "multiply long dfp" z9-ec zarch
+b3d8 mxtr RRR_F0FF "multiply extended dfp" z9-ec zarch
+b3f5 qadtr RRF_FFFU "Quantize long dfp" z9-ec zarch
+b3fd qaxtr RRF_FFFU "Quantize extended dfp" z9-ec zarch
+b3f7 rrdtr RRF_FFFU "Reround long dfp" z9-ec zarch
+b3ff rrxtr RRF_FFFU "Reround extended dfp" z9-ec zarch
+b2b9 srnmt S_RD "set rounding mode dfp" z9-ec zarch
+b385 sfasr RRE_R0 "set fpc and signal" z9-ec zarch
+ed0000000040 sldt RXF_FRRDF "shift coefficient left long dfp" z9-ec zarch
+ed0000000048 slxt RXF_FRRDF "shift coefficient left extended dfp" z9-ec zarch
+ed0000000041 srdt RXF_FRRDF "shift coefficient right long dfp" z9-ec zarch
+ed0000000049 srxt RXF_FRRDF "shift coefficient right extended dfp" z9-ec zarch
+b3d3 sdtr RRR_F0FF "subtract long dfp" z9-ec zarch
+b3db sxtr RRR_F0FF "subtract extended dfp" z9-ec zarch
+ed0000000050 tcet RXE_FRRD "test data class short dfp" z9-ec zarch
+ed0000000054 tcdt RXE_FRRD "test data class long dfp" z9-ec zarch
+ed0000000058 tcxt RXE_FRRD "test data class extended dfp" z9-ec zarch
+ed0000000051 tget RXE_FRRD "test data group short dfp" z9-ec zarch
+ed0000000055 tgdt RXE_FRRD "test data group long dfp" z9-ec zarch
+ed0000000059 tgxt RXE_FRRD "test data group extended dfp" z9-ec zarch
+010a pfpo E "perform floating point operation" z9-ec zarch
+c801 ectg SSF_RRDRD "extract cpu time" z9-ec zarch
+c802 csst SSF_RRDRD "compare and swap and store" z9-ec zarch
diff --git a/contrib/binutils/opcodes/score-dis.c b/contrib/binutils/opcodes/score-dis.c
new file mode 100644
index 0000000..96d1ec4
--- /dev/null
+++ b/contrib/binutils/opcodes/score-dis.c
@@ -0,0 +1,504 @@
+/* Instruction printing code for Score
+ Copyright 2006 Free Software Foundation, Inc.
+ Contributed by:
+ Mei Ligang (ligang@sunnorth.com.cn)
+ Pei-Lin Tsai (pltsai@sunplus.com)
+
+ This file is part of libopcodes.
+
+ This program is free software; you can redistribute it and/or modify it under
+ the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+#include "sysdep.h"
+#include "dis-asm.h"
+#define DEFINE_TABLE
+#include "score-opc.h"
+#include "opintl.h"
+#include "bfd.h"
+
+/* FIXME: This shouldn't be done here. */
+#include "elf-bfd.h"
+#include "elf/internal.h"
+#include "elf/score.h"
+
+#ifndef streq
+#define streq(a,b) (strcmp ((a), (b)) == 0)
+#endif
+
+#ifndef strneq
+#define strneq(a,b,n) (strncmp ((a), (b), (n)) == 0)
+#endif
+
+#ifndef NUM_ELEM
+#define NUM_ELEM(a) (sizeof (a) / sizeof (a)[0])
+#endif
+
+typedef struct
+{
+ const char *name;
+ const char *description;
+ const char *reg_names[32];
+} score_regname;
+
+static score_regname regnames[] =
+{
+ {"gcc", "Select register names used by GCC",
+ {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
+ "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20",
+ "r21", "r22", "r23", "r24", "r25", "r26", "r27", "gp", "r29", "r30", "r31"}},
+};
+
+static unsigned int regname_selected = 0;
+
+#define NUM_SCORE_REGNAMES NUM_ELEM (regnames)
+#define score_regnames regnames[regname_selected].reg_names
+
+/* Print one instruction from PC on INFO->STREAM.
+ Return the size of the instruction. */
+static int
+print_insn_score32 (bfd_vma pc, struct disassemble_info *info, long given)
+{
+ struct score_opcode *insn;
+ void *stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ for (insn = score_opcodes; insn->assembler; insn++)
+ {
+ if ((insn->mask & 0xffff0000) && (given & insn->mask) == insn->value)
+ {
+ char *c;
+
+ for (c = insn->assembler; *c; c++)
+ {
+ if (*c == '%')
+ {
+ switch (*++c)
+ {
+ case 'j':
+ {
+ int target;
+
+ if (info->flags & INSN_HAS_RELOC)
+ pc = 0;
+ target = (pc & 0xfe000000) | (given & 0x01fffffe);
+ (*info->print_address_func) (target, info);
+ }
+ break;
+ case 'b':
+ {
+ /* Sign-extend a 20-bit number. */
+#define SEXT20(x) ((((x) & 0xfffff) ^ (~ 0x7ffff)) + 0x80000)
+ int disp = ((given & 0x01ff8000) >> 5) | (given & 0x3fe);
+ int target = (pc + SEXT20 (disp));
+
+ (*info->print_address_func) (target, info);
+ }
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ {
+ int bitstart = *c++ - '0';
+ int bitend = 0;
+
+ while (*c >= '0' && *c <= '9')
+ bitstart = (bitstart * 10) + *c++ - '0';
+
+ switch (*c)
+ {
+ case '-':
+ c++;
+ while (*c >= '0' && *c <= '9')
+ bitend = (bitend * 10) + *c++ - '0';
+
+ if (!bitend)
+ abort ();
+
+ switch (*c)
+ {
+ case 'r':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "%s", score_regnames[reg]);
+ }
+ break;
+ case 'd':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "%ld", reg);
+ }
+ break;
+ case 'i':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+ reg = ((reg ^ (1 << (bitend - bitstart))) -
+ (1 << (bitend - bitstart)));
+
+ if (((given & insn->mask) == 0x0c00000a) /* ldc1 */
+ || ((given & insn->mask) == 0x0c000012) /* ldc2 */
+ || ((given & insn->mask) == 0x0c00001c) /* ldc3 */
+ || ((given & insn->mask) == 0x0c00000b) /* stc1 */
+ || ((given & insn->mask) == 0x0c000013) /* stc2 */
+ || ((given & insn->mask) == 0x0c00001b)) /* stc3 */
+ reg <<= 2;
+
+ func (stream, "%ld", reg);
+ }
+ break;
+ case 'x':
+ {
+ long reg;
+
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+
+ func (stream, "%lx", reg);
+ }
+ break;
+ default:
+ abort ();
+ }
+ break;
+ case '`':
+ c++;
+ if ((given & (1 << bitstart)) == 0)
+ func (stream, "%c", *c);
+ break;
+ case '\'':
+ c++;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c);
+ break;
+ default:
+ abort ();
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+ }
+ else
+ func (stream, "%c", *c);
+ }
+ return 4;
+ }
+ }
+
+#if (SCORE_SIMULATOR_ACTIVE)
+ func (stream, _("<illegal instruction>"));
+ return 4;
+#endif
+
+ abort ();
+}
+
+static void
+print_insn_parallel_sym (struct disassemble_info *info)
+{
+ void *stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ /* 10: 0000 nop!
+ 4 space + 1 colon + 1 space + 1 tab + 8 opcode + 2 space + 1 tab.
+ FIXME: the space number is not accurate. */
+ func (stream, "%s", " ||\n \t \t");
+}
+
+/* Print one instruction from PC on INFO->STREAM.
+ Return the size of the instruction. */
+static int
+print_insn_score16 (bfd_vma pc, struct disassemble_info *info, long given)
+{
+ struct score_opcode *insn;
+ void *stream = info->stream;
+ fprintf_ftype func = info->fprintf_func;
+
+ given &= 0xffff;
+ for (insn = score_opcodes; insn->assembler; insn++)
+ {
+ if (!(insn->mask & 0xffff0000) && (given & insn->mask) == insn->value)
+ {
+ char *c = insn->assembler;
+
+ info->bytes_per_chunk = 2;
+ info->bytes_per_line = 4;
+ given &= 0xffff;
+
+ for (; *c; c++)
+ {
+ if (*c == '%')
+ {
+ switch (*++c)
+ {
+
+ case 'j':
+ {
+ int target;
+
+ if (info->flags & INSN_HAS_RELOC)
+ pc = 0;
+
+ target = (pc & 0xfffff000) | (given & 0x00000ffe);
+ (*info->print_address_func) (target, info);
+ }
+ break;
+ case 'b':
+ {
+ /* Sign-extend a 9-bit number. */
+#define SEXT9(x) ((((x) & 0x1ff) ^ (~ 0xff)) + 0x100)
+ int disp = (given & 0xff) << 1;
+ int target = (pc + SEXT9 (disp));
+
+ (*info->print_address_func) (target, info);
+ }
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ {
+ int bitstart = *c++ - '0';
+ int bitend = 0;
+
+ while (*c >= '0' && *c <= '9')
+ bitstart = (bitstart * 10) + *c++ - '0';
+
+ switch (*c)
+ {
+ case '-':
+ {
+ long reg;
+
+ c++;
+ while (*c >= '0' && *c <= '9')
+ bitend = (bitend * 10) + *c++ - '0';
+ if (!bitend)
+ abort ();
+ reg = given >> bitstart;
+ reg &= (2 << (bitend - bitstart)) - 1;
+ switch (*c)
+ {
+ case 'R':
+ func (stream, "%s", score_regnames[reg + 16]);
+ break;
+ case 'r':
+ func (stream, "%s", score_regnames[reg]);
+ break;
+ case 'd':
+ if (*(c + 1) == '\0')
+ func (stream, "%ld", reg);
+ else
+ {
+ c++;
+ if (*c == '1')
+ func (stream, "%ld", reg << 1);
+ else if (*c == '2')
+ func (stream, "%ld", reg << 2);
+ }
+ break;
+
+ case 'x':
+ if (*(c + 1) == '\0')
+ func (stream, "%lx", reg);
+ else
+ {
+ c++;
+ if (*c == '1')
+ func (stream, "%lx", reg << 1);
+ else if (*c == '2')
+ func (stream, "%lx", reg << 2);
+ }
+ break;
+ case 'i':
+ reg = ((reg ^ (1 << bitend)) - (1 << bitend));
+ func (stream, "%ld", reg);
+ break;
+ default:
+ abort ();
+ }
+ }
+ break;
+
+ case '\'':
+ c++;
+ if ((given & (1 << bitstart)) != 0)
+ func (stream, "%c", *c);
+ break;
+ default:
+ abort ();
+ }
+ }
+ break;
+ default:
+ abort ();
+ }
+ }
+ else
+ func (stream, "%c", *c);
+ }
+
+ return 2;
+ }
+ }
+#if (SCORE_SIMULATOR_ACTIVE)
+ func (stream, _("<illegal instruction>"));
+ return 2;
+#endif
+ /* No match. */
+ abort ();
+}
+
+/* NOTE: There are no checks in these routines that
+ the relevant number of data bytes exist. */
+static int
+print_insn (bfd_vma pc, struct disassemble_info *info, bfd_boolean little)
+{
+ unsigned char b[4];
+ long given;
+ long ridparity;
+ int status;
+ bfd_boolean insn_pce_p = FALSE;
+ bfd_boolean insn_16_p = FALSE;
+
+ info->display_endian = little ? BFD_ENDIAN_LITTLE : BFD_ENDIAN_BIG;
+
+ if (pc & 0x2)
+ {
+ info->bytes_per_chunk = 2;
+ status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
+ b[3] = b[2] = 0;
+ insn_16_p = TRUE;
+ }
+ else
+ {
+ info->bytes_per_chunk = 4;
+ status = info->read_memory_func (pc, (bfd_byte *) & b[0], 4, info);
+ if (status != 0)
+ {
+ info->bytes_per_chunk = 2;
+ status = info->read_memory_func (pc, (bfd_byte *) b, 2, info);
+ b[3] = b[2] = 0;
+ insn_16_p = TRUE;
+ }
+ }
+
+ if (status != 0)
+ {
+ info->memory_error_func (status, pc, info);
+ return -1;
+ }
+
+ if (little)
+ {
+ given = (b[0]) | (b[1] << 8) | (b[2] << 16) | (b[3] << 24);
+ }
+ else
+ {
+ given = (b[0] << 24) | (b[1] << 16) | (b[2] << 8) | (b[3]);
+ }
+
+ if ((given & 0x80008000) == 0x80008000)
+ {
+ insn_pce_p = FALSE;
+ insn_16_p = FALSE;
+ }
+ else if ((given & 0x8000) == 0x8000)
+ {
+ insn_pce_p = TRUE;
+ }
+ else
+ {
+ insn_16_p = TRUE;
+ }
+
+ /* 16 bit instruction. */
+ if (insn_16_p)
+ {
+ if (little)
+ {
+ given = b[0] | (b[1] << 8);
+ }
+ else
+ {
+ given = (b[0] << 8) | b[1];
+ }
+
+ status = print_insn_score16 (pc, info, given);
+ }
+ /* pce instruction. */
+ else if (insn_pce_p)
+ {
+ long other;
+
+ other = given & 0xFFFF;
+ given = (given & 0xFFFF0000) >> 16;
+
+ status = print_insn_score16 (pc, info, given);
+ print_insn_parallel_sym (info);
+ status += print_insn_score16 (pc, info, other);
+ /* disassemble_bytes() will output 4 byte per chunk for pce instructio. */
+ info->bytes_per_chunk = 4;
+ }
+ /* 32 bit instruction. */
+ else
+ {
+ /* Get rid of parity. */
+ ridparity = (given & 0x7FFF);
+ ridparity |= (given & 0x7FFF0000) >> 1;
+ given = ridparity;
+ status = print_insn_score32 (pc, info, given);
+ }
+
+ return status;
+}
+
+int
+print_insn_big_score (bfd_vma pc, struct disassemble_info *info)
+{
+ return print_insn (pc, info, FALSE);
+}
+
+int
+print_insn_little_score (bfd_vma pc, struct disassemble_info *info)
+{
+ return print_insn (pc, info, TRUE);
+}
diff --git a/contrib/binutils/opcodes/score-opc.h b/contrib/binutils/opcodes/score-opc.h
new file mode 100644
index 0000000..20437d7
--- /dev/null
+++ b/contrib/binutils/opcodes/score-opc.h
@@ -0,0 +1,487 @@
+/* Copyright 2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+struct score_opcode
+{
+ unsigned long value;
+ unsigned long mask; /* Recognise instruction if (op & mask) == value. */
+ char *assembler; /* Disassembly string. */
+};
+
+/* Note: There is a partial ordering in this table - it must be searched from
+ the top to obtain a correct match. */
+
+static struct score_opcode score_opcodes[] =
+{
+ /* Score Instructions. */
+ {0x3800000a, 0x3e007fff, "abs\t\t%20-24r, %15-19r"},
+ {0x3800004b, 0x3e007fff, "abs.s\t\t%20-24r, %15-19r"},
+ {0x00000010, 0x3e0003ff, "add\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000011, 0x3e0003ff, "add.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x38000048, 0x3e0003ff, "add.s\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000012, 0x3e0003ff, "addc\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000013, 0x3e0003ff, "addc.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x02000000, 0x3e0e0001, "addi\t\t%20-24r, %1-16i"},
+ {0x02000001, 0x3e0e0001, "addi.c\t\t%20-24r, %1-16i"},
+ {0x0a000000, 0x3e0e0001, "addis\t\t%20-24r, %1-16d(0x%1-16x)"},
+ {0x0a000001, 0x3e0e0001, "addis.c\t\t%20-24r, %1-16d(0x%1-16x)"},
+ {0x10000000, 0x3e000001, "addri\t\t%20-24r, %15-19r, %1-14i"},
+ {0x10000001, 0x3e000001, "addri.c\t\t%20-24r, %15-19r, %1-14i"},
+ {0x00000009, 0x0000700f, "addc!\t\t%8-11r, %4-7r"},
+ {0x00002000, 0x0000700f, "add!\t\t%8-11r, %4-7r"},
+ {0x00006000, 0x00007087, "addei!\t\t%8-11r, %3-6d"},
+ {0x00000020, 0x3e0003ff, "and\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000021, 0x3e0003ff, "and.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x02080000, 0x3e0e0001, "andi\t\t%20-24r, 0x%1-16x"},
+ {0x02080001, 0x3e0e0001, "andi.c\t\t%20-24r, 0x%1-16x"},
+ {0x0a080000, 0x3e0e0001, "andis\t\t%20-24r, 0x%1-16x"},
+ {0x0a080001, 0x3e0e0001, "andis.c\t\t%20-24r, 0x%1-16x"},
+ {0x18000000, 0x3e000001, "andri\t\t%20-24r, %15-19r, 0x%1-14x"},
+ {0x18000001, 0x3e000001, "andri.c\t\t%20-24r, %15-19r,0x%1-14x"},
+ {0x00002004, 0x0000700f, "and!\t\t%8-11r, %4-7r"},
+ {0x08000000, 0x3e007c01, "bcs\t\t%b" },
+ {0x08000400, 0x3e007c01, "bcc\t\t%b" },
+ {0x08003800, 0x3e007c01, "bcnz\t\t%b" },
+ {0x08000001, 0x3e007c01, "bcsl\t\t%b" },
+ {0x08000401, 0x3e007c01, "bccl\t\t%b" },
+ {0x08003801, 0x3e007c01, "bcnzl\t\t%b" },
+ {0x00004000, 0x00007f00, "bcs!\t\t%b" },
+ {0x00004100, 0x00007f00, "bcc!\t\t%b" },
+ {0x00004e00, 0x00007f00, "bcnz!\t\t%b" },
+ {0x08001000, 0x3e007c01, "beq\t\t%b" },
+ {0x08001001, 0x3e007c01, "beql\t\t%b" },
+ {0x00004400, 0x00007f00, "beq!\t\t%b" },
+ {0x08000800, 0x3e007c01, "bgtu\t\t%b" },
+ {0x08001800, 0x3e007c01, "bgt\t\t%b" },
+ {0x08002000, 0x3e007c01, "bge\t\t%b" },
+ {0x08000801, 0x3e007c01, "bgtul\t\t%b" },
+ {0x08001801, 0x3e007c01, "bgtl\t\t%b" },
+ {0x08002001, 0x3e007c01, "bgel\t\t%b" },
+ {0x00004200, 0x00007f00, "bgtu!\t\t%b" },
+ {0x00004600, 0x00007f00, "bgt!\t\t%b" },
+ {0x00004800, 0x00007f00, "bge!\t\t%b" },
+ {0x00000029, 0x3e0003ff, "bitclr.c\t%20-24r, %15-19r, 0x%10-14x"},
+ {0x0000002b, 0x3e0003ff, "bitset.c\t%20-24r, %15-19r, 0x%10-14x"},
+ {0x0000002d, 0x3e0003ff, "bittst.c\t%15-19r, 0x%10-14x"},
+ {0x0000002f, 0x3e0003ff, "bittgl.c\t%20-24r, %15-19r, 0x%10-14x"},
+ {0x00006004, 0x00007007, "bitclr!\t\t%8-11r, 0x%3-7x"},
+ {0x3800000c, 0x3e0003ff, "bitrev\t\t%20-24r, %15-19r,%10-14r"},
+ {0x00006005, 0x00007007, "bitset!\t\t%8-11r, 0x%3-7x"},
+ {0x00006006, 0x00007007, "bittst!\t\t%8-11r, 0x%3-7x"},
+ {0x00006007, 0x00007007, "bittgl!\t\t%8-11r, 0x%3-7x"},
+ {0x08000c00, 0x3e007c01, "bleu\t\t%b" },
+ {0x08001c00, 0x3e007c01, "ble\t\t%b" },
+ {0x08002400, 0x3e007c01, "blt\t\t%b" },
+ {0x08000c01, 0x3e007c01, "bleul\t\t%b" },
+ {0x08001c01, 0x3e007c01, "blel\t\t%b" },
+ {0x08002401, 0x3e007c01, "bltl\t\t%b" },
+ {0x08003c01, 0x3e007c01, "bl\t\t%b" },
+ {0x00004300, 0x00007f00, "bleu!\t\t%b" },
+ {0x00004700, 0x00007f00, "ble!\t\t%b" },
+ {0x00004900, 0x00007f00, "blt!\t\t%b" },
+ {0x08002800, 0x3e007c01, "bmi\t\t%b" },
+ {0x08002801, 0x3e007c01, "bmil\t\t%b" },
+ {0x00004a00, 0x00007f00, "bmi!\t\t%b" },
+ {0x08001400, 0x3e007c01, "bne\t\t%b" },
+ {0x08001401, 0x3e007c01, "bnel\t\t%b" },
+ {0x00004500, 0x00007f00, "bne!\t\t%b" },
+ {0x08002c00, 0x3e007c01, "bpl\t\t%b" },
+ {0x08002c01, 0x3e007c01, "bpll\t\t%b" },
+ {0x00004b00, 0x00007f00, "bpl!\t\t%b" },
+ {0x00000008, 0x3e007fff, "brcs\t\t%15-19r" },
+ {0x00000408, 0x3e007fff, "brcc\t\t%15-19r" },
+ {0x00000808, 0x3e007fff, "brgtu\t\t%15-19r" },
+ {0x00000c08, 0x3e007fff, "brleu\t\t%15-19r" },
+ {0x00001008, 0x3e007fff, "breq\t\t%15-19r" },
+ {0x00001408, 0x3e007fff, "brne\t\t%15-19r" },
+ {0x00001808, 0x3e007fff, "brgt\t\t%15-19r" },
+ {0x00001c08, 0x3e007fff, "brle\t\t%15-19r" },
+ {0x00002008, 0x3e007fff, "brge\t\t%15-19r" },
+ {0x00002408, 0x3e007fff, "brlt\t\t%15-19r" },
+ {0x00002808, 0x3e007fff, "brmi\t\t%15-19r" },
+ {0x00002c08, 0x3e007fff, "brpl\t\t%15-19r" },
+ {0x00003008, 0x3e007fff, "brvs\t\t%15-19r" },
+ {0x00003408, 0x3e007fff, "brvc\t\t%15-19r" },
+ {0x00003808, 0x3e007fff, "brcnz\t\t%15-19r" },
+ {0x00003c08, 0x3e007fff, "br\t\t%15-19r" },
+ {0x00000009, 0x3e007fff, "brcsl\t\t%15-19r" },
+ {0x00000409, 0x3e007fff, "brccl\t\t%15-19r" },
+ {0x00000809, 0x3e007fff, "brgtul\t\t%15-19r" },
+ {0x00000c09, 0x3e007fff, "brleul\t\t%15-19r" },
+ {0x00001009, 0x3e007fff, "breql\t\t%15-19r" },
+ {0x00001409, 0x3e007fff, "brnel\t\t%15-19r" },
+ {0x00001809, 0x3e007fff, "brgtl\t\t%15-19r" },
+ {0x00001c09, 0x3e007fff, "brlel\t\t%15-19r" },
+ {0x00002009, 0x3e007fff, "brgel\t\t%15-19r" },
+ {0x00002409, 0x3e007fff, "brltl\t\t%15-19r" },
+ {0x00002809, 0x3e007fff, "brmil\t\t%15-19r" },
+ {0x00002c09, 0x3e007fff, "brpll\t\t%15-19r" },
+ {0x00003009, 0x3e007fff, "brvsl\t\t%15-19r" },
+ {0x00003409, 0x3e007fff, "brvcl\t\t%15-19r" },
+ {0x00003809, 0x3e007fff, "brcnzl\t\t%15-19r" },
+ {0x00003c09, 0x3e007fff, "brl\t\t%15-19r" },
+ {0x00000004, 0x00007f0f, "brcs!\t\t%4-7r" },
+ {0x00000104, 0x00007f0f, "brcc!\t\t%4-7r" },
+ {0x00000204, 0x00007f0f, "brgtu!\t\t%4-7r" },
+ {0x00000304, 0x00007f0f, "brleu!\t\t%4-7r" },
+ {0x00000404, 0x00007f0f, "breq!\t\t%4-7r" },
+ {0x00000504, 0x00007f0f, "brne!\t\t%4-7r" },
+ {0x00000604, 0x00007f0f, "brgt!\t\t%4-7r" },
+ {0x00000704, 0x00007f0f, "brle!\t\t%4-7r" },
+ {0x00000804, 0x00007f0f, "brge!\t\t%4-7r" },
+ {0x00000904, 0x00007f0f, "brlt!\t\t%4-7r" },
+ {0x00000a04, 0x00007f0f, "brmi!\t\t%4-7r" },
+ {0x00000b04, 0x00007f0f, "brpl!\t\t%4-7r" },
+ {0x00000c04, 0x00007f0f, "brvs!\t\t%4-7r" },
+ {0x00000d04, 0x00007f0f, "brvc!\t\t%4-7r" },
+ {0x00000e04, 0x00007f0f, "brcnz!\t\t%4-7r" },
+ {0x00000f04, 0x00007f0f, "br!\t\t%4-7r" },
+ {0x0000000c, 0x00007f0f, "brcsl!\t\t%4-7r" },
+ {0x0000010c, 0x00007f0f, "brccl!\t\t%4-7r" },
+ {0x0000020c, 0x00007f0f, "brgtul!\t\t%4-7r" },
+ {0x0000030c, 0x00007f0f, "brleul!\t\t%4-7r" },
+ {0x0000040c, 0x00007f0f, "breql!\t\t%4-7r" },
+ {0x0000050c, 0x00007f0f, "brnel!\t\t%4-7r" },
+ {0x0000060c, 0x00007f0f, "brgtl!\t\t%4-7r" },
+ {0x0000070c, 0x00007f0f, "brlel!\t\t%4-7r" },
+ {0x0000080c, 0x00007f0f, "brgel!\t\t%4-7r" },
+ {0x0000090c, 0x00007f0f, "brltl!\t\t%4-7r" },
+ {0x00000a0c, 0x00007f0f, "brmil!\t\t%4-7r" },
+ {0x00000b0c, 0x00007f0f, "brpll!\t\t%4-7r" },
+ {0x00000c0c, 0x00007f0f, "brvsl!\t\t%4-7r" },
+ {0x00000d0c, 0x00007f0f, "brvcl!\t\t%4-7r" },
+ {0x00000e0c, 0x00007f0f, "brcnzl!\t\t%4-7r" },
+ {0x00000f0c, 0x00007f0f, "brl!\t\t%4-7r" },
+ {0x08003000, 0x3e007c01, "bvs\t\t%b" },
+ {0x08003400, 0x3e007c01, "bvc\t\t%b" },
+ {0x08003001, 0x3e007c01, "bvsl\t\t%b" },
+ {0x08003401, 0x3e007c01, "bvcl\t\t%b" },
+ {0x00004c00, 0x00007f00, "bvs!\t\t%b" },
+ {0x00004d00, 0x00007f00, "bvc!\t\t%b" },
+ {0x00004f00, 0x00007f00, "b!\t\t%b" },
+ {0x08003c00, 0x3e007c01, "b\t\t%b" },
+ {0x30000000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30100000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30200000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30300000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30400000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30800000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30900000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30a00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30b00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30c00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30d00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x30e00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31000000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31100000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31800000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31a00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31b00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31c00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31d00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31e00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x31f00000, 0x3ff00000, "cache\t\t%20-24d, [%15-19r, %0-14i]"},
+ {0x38000000, 0x3ff003ff, "mad\t\t%15-19r, %10-14r"},
+ {0x38000020, 0x3ff003ff, "madu\t\t%15-19r, %10-14r"},
+ {0x38000080, 0x3ff003ff, "mad.f\t\t%15-19r, %10-14r"},
+ {0x38000001, 0x3ff003ff, "msb\t\t%15-19r, %10-14r"},
+ {0x38000021, 0x3ff003ff, "msbu\t\t%15-19r, %10-14r"},
+ {0x38000081, 0x3ff003ff, "msb.f\t\t%15-19r, %10-14r"},
+ {0x38000102, 0x3ff003ff, "mazl\t\t%15-19r, %10-14r"},
+ {0x38000182, 0x3ff003ff, "mazl.f\t\t%15-19r, %10-14r"},
+ {0x38000002, 0x3ff003ff, "madl\t\t%15-19r, %10-14r"},
+ {0x380000c2, 0x3ff003ff, "madl.fs\t\t%15-19r, %10-14r"},
+ {0x38000303, 0x3ff003ff, "mazh\t\t%15-19r, %10-14r"},
+ {0x38000383, 0x3ff003ff, "mazh.f\t\t%15-19r, %10-14r"},
+ {0x38000203, 0x3ff003ff, "madh\t\t%15-19r, %10-14r"},
+ {0x380002c3, 0x3ff003ff, "madh.fs\t\t%15-19r, %10-14r"},
+ {0x38000007, 0x3e0003ff, "max\t\t%20-24r, %15-19r, %10-14r"},
+ {0x38000006, 0x3e0003ff, "min\t\t%20-24r, %15-19r, %10-14r"},
+ {0x38000104, 0x3ff003ff, "mszl\t\t%15-19r, %10-14r"},
+ {0x38000184, 0x3ff003ff, "mszl.f\t\t%15-19r, %10-14r"},
+ {0x38000004, 0x3ff003ff, "msbl\t\t%15-19r, %10-14r"},
+ {0x380000c4, 0x3ff003ff, "msbl.fs\t\t%15-19r, %10-14r"},
+ {0x38000305, 0x3ff003ff, "mszh\t\t%15-19r, %10-14r"},
+ {0x38000385, 0x3ff003ff, "mszh.f\t\t%15-19r, %10-14r"},
+ {0x38000205, 0x3ff003ff, "msbh\t\t%15-19r, %10-14r"},
+ {0x380002c5, 0x3ff003ff, "msbh.fs\t\t%15-19r, %10-14r"},
+ {0x3800004e, 0x3e0003ff, "sll.s\t\t%20-24r, %15-19r, %10-14r"},
+ {0x38000049, 0x3e0003ff, "sub.s\t\t%20-24r, %15-19r, %10-14r"},
+ {0x3800000d, 0x3e007fff, "clz\t\t%20-24r, %15-19r"},
+ {0x38000000, 0x3e000000, "ceinst\t\t%20-24d, %15-19r, %10-14r, %5-9d, %0-4d"},
+ {0x00000019, 0x3ff003ff, "cmpteq.c\t\t%15-19r, %10-14r"},
+ {0x00100019, 0x3ff003ff, "cmptmi.c\t\t%15-19r, %10-14r"},
+ {0x00300019, 0x3ff003ff, "cmp.c\t\t%15-19r, %10-14r"},
+ {0x0000001b, 0x3ff07fff, "cmpzteq.c\t%15-19r"},
+ {0x0010001b, 0x3ff07fff, "cmpztmi.c\t%15-19r"},
+ {0x0030001b, 0x3ff07fff, "cmpz.c\t\t%15-19r"},
+ {0x02040001, 0x3e0e0001, "cmpi.c\t\t%20-24r, %1-16i"},
+ {0x00002003, 0x0000700f, "cmp!\t\t%8-11r, %4-7r"},
+ {0x0c00000c, 0x3e00001f, "cop1\t\tc%20-24r, c%15-19r, c%10-14r, %5-9d"},
+ {0x0c000014, 0x3e00001f, "cop2\t\tc%20-24r, c%15-19r, c%10-14r, %5-9d"},
+ {0x0c00001c, 0x3e00001f, "cop3\t\tc%20-24r, c%15-19r, c%10-14r, %5-9d"},
+ {0x00000044, 0x3e0003ff, "div\t\t%15-19r, %10-14r"},
+ {0x00000046, 0x3e0003ff, "divu\t\t%15-19r, %10-14r"},
+ {0x0c0000a4, 0x3e0003ff, "drte" },
+ {0x00000058, 0x3e0003ff, "extsb\t\t%20-24r, %15-19r"},
+ {0x00000059, 0x3e0003ff, "extsb.c\t\t%20-24r, %15-19r"},
+ {0x0000005a, 0x3e0003ff, "extsh\t\t%20-24r, %15-19r"},
+ {0x0000005b, 0x3e0003ff, "extsh.c\t\t%20-24r, %15-19r"},
+ {0x0000005c, 0x3e0003ff, "extzb\t\t%20-24r, %15-19r"},
+ {0x0000005d, 0x3e0003ff, "extzb.c\t\t%20-24r, %15-19r"},
+ {0x0000005e, 0x3e0003ff, "extzh\t\t%20-24r, %15-19r"},
+ {0x0000005f, 0x3e0003ff, "extzh.c\t\t%20-24r, %15-19r"},
+ {0x04000001, 0x3e000001, "jl\t\t%j"},
+ {0x00003001, 0x00007001, "jl!\t\t%j" },
+ {0x00003000, 0x00007001, "j!\t\t%j" },
+ {0x04000000, 0x3e000001, "j\t\t%j"},
+ {0x26000000, 0x3e000000, "lb\t\t%20-24r, [%15-19r, %0-14i]"},
+ {0x2c000000, 0x3e000000, "lbu\t\t%20-24r, [%15-19r, %0-14i]"},
+ {0x06000003, 0x3e000007, "lb\t\t%20-24r, [%15-19r, %3-14i]+"},
+ {0x06000006, 0x3e000007, "lbu\t\t%20-24r, [%15-19r, %3-14i]+"},
+ {0x0e000003, 0x3e000007, "lb\t\t%20-24r, [%15-19r]+, %3-14i"},
+ {0x0e000006, 0x3e000007, "lbu\t\t%20-24r, [%15-19r]+, %3-14i"},
+ {0x0000200b, 0x0000700f, "lbu!\t\t%8-11r, [%4-7r]"},
+ {0x00007003, 0x00007007, "lbup!\t\t%8-11r, %3-7d"},
+ {0x00000060, 0x3e0003ff, "lcb\t\t[%15-19r]+"},
+ {0x00000062, 0x3e0003ff, "lcw\t\t%20-24r, [%15-19r]+"},
+ {0x00000066, 0x3e0003ff, "lce\t\t%20-24r, [%15-19r]+"},
+ {0x0c00000a, 0x3e00001f, "ldc1\t\tc%15-19r, [%20-24r, %5-14i]"},
+ {0x0c000012, 0x3e00001f, "ldc2\t\tc%15-19r, [%20-24r, %5-14i]"},
+ {0x0c00001a, 0x3e00001f, "ldc3\t\tc%15-19r, [%20-24r, %5-14i]"},
+ {0x22000000, 0x3e000000, "lh\t\t%20-24r, [%15-19r, %0-14i]"},
+ {0x24000000, 0x3e000000, "lhu\t\t%20-24r, [%15-19r, %0-14i]"},
+ {0x06000001, 0x3e000007, "lh\t\t%20-24r, [%15-19r, %3-14i]+"},
+ {0x06000002, 0x3e000007, "lhu\t\t%20-24r, [%15-19r, %3-14i]+"},
+ {0x0e000001, 0x3e000007, "lh\t\t%20-24r, [%15-19r]+, %3-14i"},
+ {0x0e000002, 0x3e000007, "lhu\t\t%20-24r, [%15-19r]+, %3-14i"},
+ {0x00002009, 0x0000700f, "lh!\t\t%8-11r, [%4-7r]"},
+ {0x00007001, 0x00007007, "lhp!\t\t%8-11r, %3-7d1"},
+ {0x020c0000, 0x3e0e0000, "ldi\t\t%20-24r, 0x%1-16x(%1-16i)"},
+ {0x0a0c0000, 0x3e0e0000, "ldis\t\t%20-24r, 0x%1-16x(%1-16i)"},
+ {0x00005000, 0x00007000, "ldiu!\t\t%8-11r, %0-7d"},
+ {0x0000000c, 0x3e0003ff, "alw\t\t%20-24r, [%15-19r]"},
+ {0x20000000, 0x3e000000, "lw\t\t%20-24r, [%15-19r, %0-14i]"},
+ {0x06000000, 0x3e000007, "lw\t\t%20-24r, [%15-19r, %3-14i]+"},
+ {0x0e000000, 0x3e000007, "lw\t\t%20-24r, [%15-19r]+, %3-14i"},
+ {0x00002008, 0x0000700f, "lw!\t\t%8-11r, [%4-7r]"},
+ {0x00007000, 0x00007007, "lwp!\t\t%8-11r, %3-7d2"},
+ {0x0000100b, 0x0000700f, "madh.fs!\t\t%8-11r, %4-7r"},
+ {0x0000100a, 0x0000700f, "madl.fs!\t\t%8-11r, %4-7r"},
+ {0x00001005, 0x0000700f, "madu!\t\t%8-11r, %4-7r"},
+ {0x00001004, 0x0000700f, "mad.f!\t\t%8-11r, %4-7r"},
+ {0x00001009, 0x0000700f, "mazh.f!\t\t%8-11r, %4-7r"},
+ {0x00001008, 0x0000700f, "mazl.f!\t\t%8-11r, %4-7r"},
+ {0x00000448, 0x3e007fff, "mfcel\t\t%20-24r"},
+ {0x00001001, 0x00007f0f, "mfcel!\t\t%4-7r"},
+ {0x00000848, 0x3e007fff, "mfceh\t\t%20-24r"},
+ {0x00001101, 0x00007f0f, "mfceh!\t\t%4-7r"},
+ {0x00000c48, 0x3e007fff, "mfcehl\t\t%20-24r, %15-19r"},
+ {0x00000048, 0x3e0003ff, "mfce\t\t%20-24r, er%10-14d"},
+ {0x00000050, 0x3e0003ff, "mfsr\t\t%20-24r, sr%10-14d"},
+ {0x0c000001, 0x3e00001f, "mfcr\t\t%20-24r, c%15-19r"},
+ {0x0c000009, 0x3e00001f, "mfc1\t\t%20-24r, c%15-19r"},
+ {0x0c000011, 0x3e00001f, "mfc2\t\t%20-24r, c%15-19r"},
+ {0x0c000019, 0x3e00001f, "mfc3\t\t%20-24r, c%15-19r"},
+ {0x0c00000f, 0x3e00001f, "mfcc1\t\t%20-24r, c%15-19r"},
+ {0x0c000017, 0x3e00001f, "mfcc2\t\t%20-24r, c%15-19r"},
+ {0x0c00001f, 0x3e00001f, "mfcc3\t\t%20-24r, c%15-19r"},
+ {0x00000002, 0x0000700f, "mhfl!\t\t%8-11R, %4-7r"},
+ {0x00000001, 0x0000700f, "mlfh!\t\t%8-11r, %4-7R"},
+ {0x00001006, 0x0000700f, "msb.f!\t\t%8-11r, %4-7r"},
+ {0x0000100f, 0x0000700f, "msbh.fs!\t\t%8-11r, %4-7r"},
+ {0x0000100e, 0x0000700f, "msbl.fs!\t\t%8-11r, %4-7r"},
+ {0x00001007, 0x0000700f, "msbu!\t\t%8-11r, %4-7r"},
+ {0x0000100d, 0x0000700f, "mszh.f!\t\t%8-11r, %4-7r"},
+ {0x0000100c, 0x0000700f, "mszl.f!\t\t%8-11r, %4-7r"},
+ {0x0000044a, 0x3e007fff, "mtcel\t\t%20-24r"},
+ {0x00001000, 0x00007f0f, "mtcel!\t\t%4-7r"},
+ {0x0000084a, 0x3e007fff, "mtceh\t\t%20-24r"},
+ {0x00001100, 0x00007f0f, "mtceh!\t\t%4-7r"},
+ {0x00000c4a, 0x3e007fff, "mtcehl\t\t%20-24r, %15-19r"},
+ {0x0000004a, 0x3e0003ff, "mtce\t\t%20-24r, er%10-14d"},
+ {0x00000052, 0x3e0003ff, "mtsr\t\t%15-19r, sr%10-14d"},
+ {0x0c000000, 0x3e00001f, "mtcr\t\t%20-24r, c%15-19r"},
+ {0x0c000008, 0x3e00001f, "mtc1\t\t%20-24r, c%15-19r"},
+ {0x0c000010, 0x3e00001f, "mtc2\t\t%20-24r, c%15-19r"},
+ {0x0c000018, 0x3e00001f, "mtc3\t\t%20-24r, c%15-19r"},
+ {0x0c00000e, 0x3e00001f, "mtcc1\t\t%20-24r, c%15-19r"},
+ {0x0c000016, 0x3e00001f, "mtcc2\t\t%20-24r, c%15-19r"},
+ {0x0c00001e, 0x3e00001f, "mtcc3\t\t%20-24r, c%15-19r"},
+ {0x00000040, 0x3e0003ff, "mul\t\t%15-19r, %10-14r"},
+ {0x00000040, 0x3e0003ff, "maz\t\t%15-19r, %10-14r"},
+ {0x00000041, 0x3e0003ff, "mul.f\t\t%15-19r, %10-14r"},
+ {0x00000041, 0x3e0003ff, "maz.f\t\t%15-19r, %10-14r"},
+ {0x00001002, 0x0000700f, "mul.f!\t\t%8-11r, %4-7r"},
+ {0x00000042, 0x3e0003ff, "mulu\t\t%15-19r, %10-14r"},
+ {0x00000042, 0x3e0003ff, "mazu\t\t%15-19r, %10-14r"},
+ {0x00001003, 0x0000700f, "mulu!\t\t%8-11r, %4-7r"},
+ {0x00000056, 0x3e007fff, "mvcs\t\t%20-24r, %15-19r"},
+ {0x00000456, 0x3e007fff, "mvcc\t\t%20-24r, %15-19r"},
+ {0x00000856, 0x3e007fff, "mvgtu\t\t%20-24r, %15-19r"},
+ {0x00000c56, 0x3e007fff, "mvleu\t\t%20-24r, %15-19r"},
+ {0x00001056, 0x3e007fff, "mveq\t\t%20-24r, %15-19r"},
+ {0x00001456, 0x3e007fff, "mvne\t\t%20-24r, %15-19r"},
+ {0x00001856, 0x3e007fff, "mvgt\t\t%20-24r, %15-19r"},
+ {0x00001c56, 0x3e007fff, "mvle\t\t%20-24r, %15-19r"},
+ {0x00002056, 0x3e007fff, "mvge\t\t%20-24r, %15-19r"},
+ {0x00002456, 0x3e007fff, "mvlt\t\t%20-24r, %15-19r"},
+ {0x00002856, 0x3e007fff, "mvmi\t\t%20-24r, %15-19r"},
+ {0x00002c56, 0x3e007fff, "mvpl\t\t%20-24r, %15-19r"},
+ {0x00003056, 0x3e007fff, "mvvs\t\t%20-24r, %15-19r"},
+ {0x00003456, 0x3e007fff, "mvvc\t\t%20-24r, %15-19r"},
+ {0x00003c56, 0x3e007fff, "mv\t\t%20-24r, %15-19r"},
+ {0x00000003, 0x0000700f, "mv!\t\t%8-11r, %4-7r"},
+ {0x0000001e, 0x3e0003ff, "neg\t\t%20-24r, %10-14r" },
+ {0x0000001f, 0x3e0003ff, "neg.c\t\t%20-24r, %10-14r" },
+ {0x00002002, 0x0000700f, "neg!\t\t%8-11r, %4-7r"},
+ {0x00000000, 0x3e0003ff, "nop" },
+ {0x00000024, 0x3e0003ff, "not\t\t%20-24r, %15-19r" },
+ {0x00000025, 0x3e0003ff, "not.c\t\t%20-24r, %15-19r" },
+ {0x00000000, 0x0000700f, "nop!" },
+ {0x00002006, 0x0000700f, "not!\t\t%8-11r, %4-7r"},
+ {0x00000022, 0x3e0003ff, "or\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000023, 0x3e0003ff, "or.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x020a0000, 0x3e0e0001, "ori\t\t%20-24r, 0x%1-16x"},
+ {0x020a0001, 0x3e0e0001, "ori.c\t\t%20-24r, 0x%1-16x"},
+ {0x0a0a0000, 0x3e0e0001, "oris\t\t%20-24r, 0x%1-16x"},
+ {0x0a0a0001, 0x3e0e0001, "oris.c\t\t%20-24r, 0x%1-16x"},
+ {0x1a000000, 0x3e000001, "orri\t\t%20-24r, %15-19r, 0x%1-14x"},
+ {0x1a000001, 0x3e000001, "orri.c\t\t%20-24r, %15-19r, 0x%1-14x"},
+ {0x00002005, 0x0000700f, "or!\t\t%8-11r, %4-7r"},
+ {0x0000000a, 0x3e0003ff, "pflush"},
+ {0x0000208a, 0x0000708f, "pop!\t\t%8-11R, [%4-6r]"},
+ {0x0000200a, 0x0000700f, "pop!\t\t%8-11r, [%4-7r]"},
+ {0x0000208e, 0x0000708f, "push!\t\t%8-11R, [%4-6r]"},
+ {0x0000200e, 0x0000700f, "push!\t\t%8-11r, [%4-7r]"},
+ {0x00000038, 0x3e0003ff, "ror\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000039, 0x3e0003ff, "ror.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x0000003b, 0x3e0003ff, "rorc.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x0000003c, 0x3e0003ff, "rol\t\t%20-24r, %15-19r, %10-14r"},
+ {0x0000003d, 0x3e0003ff, "rol.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x0000003f, 0x3e0003ff, "rolc.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000078, 0x3e0003ff, "rori\t\t%20-24r, %15-19r, %10-14d"},
+ {0x00000079, 0x3e0003ff, "rori.c\t\t%20-24r, %15-19r, %10-14d"},
+ {0x0000007b, 0x3e0003ff, "roric.c\t\t%20-24r, %15-19r, %10-14d"},
+ {0x0000007c, 0x3e0003ff, "roli\t\t%20-24r, %15-19r, %10-14d"},
+ {0x0000007d, 0x3e0003ff, "roli.c\t\t%20-24r, %15-19r, %10-14d"},
+ {0x0000007f, 0x3e0003ff, "rolic.c\t\t%20-24r, %15-19r, %10-14d"},
+ {0x0c000084, 0x3e0003ff, "rte" },
+ {0x2e000000, 0x3e000000, "sb\t\t%20-24r, [%15-19r, %0-14i]"},
+ {0x06000007, 0x3e000007, "sb\t\t%20-24r, [%15-19r, %3-14i]+"},
+ {0x0e000007, 0x3e000007, "sb\t\t%20-24r, [%15-19r]+, %3-14i"},
+ {0x0000200f, 0x0000700f, "sb!\t\t%8-11r, [%4-7r]"},
+ {0x00007007, 0x00007007, "sbp!\t\t%8-11r, %3-7d"},
+ {0x0000000e, 0x3e0003ff, "asw\t\t%20-24r, [%15-19r]"},
+ {0x00000068, 0x3e0003ff, "scb\t\t%20-24r, [%15-19r]+"},
+ {0x0000006a, 0x3e0003ff, "scw\t\t%20-24r, [%15-19r]+"},
+ {0x0000006e, 0x3e0003ff, "sce\t\t[%15-19r]+"},
+ {0x00000006, 0x3e0003ff, "sdbbp\t\t%15-19d"},
+ {0x00006002, 0x00007007, "sdbbp!\t\t%3-7d"},
+ {0x2a000000, 0x3e000000, "sh\t\t%20-24r, [%15-19r, %0-14i]"},
+ {0x06000005, 0x3e000007, "sh\t\t%20-24r, [%15-19r, %3-14i]+"},
+ {0x0e000005, 0x3e000007, "sh\t\t%20-24r, [%15-19r]+, %3-14i"},
+ {0x0000200d, 0x0000700f, "sh!\t\t%8-11r, [%4-7r]"},
+ {0x00007005, 0x00007007, "shp!\t\t%8-11r, %3-7d1"},
+ {0x0c0000c4, 0x3e0003ff, "sleep" },
+ {0x00000030, 0x3e0003ff, "sll\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000031, 0x3e0003ff, "sll.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000070, 0x3e0003ff, "slli\t\t%20-24r, %15-19r, %10-14d"},
+ {0x00000071, 0x3e0003ff, "slli.c\t\t%20-24r, %15-19r, %10-14d"},
+ {0x00000008, 0x0000700f, "sll!\t\t%8-11r, %4-7r"},
+ {0x00006001, 0x00007007, "slli!\t\t%8-11r, %3-7d"},
+ {0x00000034, 0x3e0003ff, "srl\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000035, 0x3e0003ff, "srl.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000036, 0x3e0003ff, "sra\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000037, 0x3e0003ff, "sra.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000074, 0x3e0003ff, "srli\t\t%20-24r, %15-19r, %10-14d"},
+ {0x00000075, 0x3e0003ff, "srli.c\t\t%20-24r, %15-19r, %10-14d"},
+ {0x00000076, 0x3e0003ff, "srai\t\t%20-24r, %15-19r, %10-14d"},
+ {0x00000077, 0x3e0003ff, "srai.c\t\t%20-24r, %15-19r, %10-14d"},
+ {0x0000000a, 0x0000700f, "srl!\t\t%8-11r, %4-7r"},
+ {0x00006003, 0x00007007, "srli!\t\t%8-11r, %3-7d"},
+ {0x0000000b, 0x0000700f, "sra!\t\t%8-11r, %4-7r"},
+ {0x0c00000b, 0x3e00001f, "stc1\t\tc%15-19r, [%20-24r, %5-14i]"},
+ {0x0c000013, 0x3e00001f, "stc2\t\tc%15-19r, [%20-24r, %5-14i]"},
+ {0x0c00001b, 0x3e00001f, "stc3\t\tc%15-19r, [%20-24r, %5-14i]"},
+ {0x00000014, 0x3e0003ff, "sub\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000015, 0x3e0003ff, "sub.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000016, 0x3e0003ff, "subc\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000017, 0x3e0003ff, "subc.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00002001, 0x0000700f, "sub!\t\t%8-11r, %4-7r"},
+ {0x00006080, 0x00007087, "subei!\t\t%8-11r, %3-6d"},
+ {0x28000000, 0x3e000000, "sw\t\t%20-24r, [%15-19r, %0-14i]"},
+ {0x06000004, 0x3e000007, "sw\t\t%20-24r, [%15-19r, %3-14i]+"},
+ {0x0e000004, 0x3e000007, "sw\t\t%20-24r, [%15-19r]+, %3-14i"},
+ {0x0000200c, 0x0000700f, "sw!\t\t%8-11r, [%4-7r]"},
+ {0x00007004, 0x00007007, "swp!\t\t%8-11r, %3-7d2"},
+ {0x00000002, 0x3e0003ff, "syscall\t\t%10-24d"},
+ {0x00000054, 0x3e007fff, "tcs" },
+ {0x00000454, 0x3e007fff, "tcc" },
+ {0x00003854, 0x3e007fff, "tcnz" },
+ {0x00000005, 0x00007f0f, "tcs!" },
+ {0x00000105, 0x00007f0f, "tcc!" },
+ {0x00000e05, 0x00007f0f, "tcnz!" },
+ {0x00001054, 0x3e007fff, "teq" },
+ {0x00000405, 0x00007f0f, "teq!" },
+ {0x00000854, 0x3e007fff, "tgtu" },
+ {0x00001854, 0x3e007fff, "tgt" },
+ {0x00002054, 0x3e007fff, "tge" },
+ {0x00000205, 0x00007f0f, "tgtu!" },
+ {0x00000605, 0x00007f0f, "tgt!" },
+ {0x00000805, 0x00007f0f, "tge!" },
+ {0x00000c54, 0x3e007fff, "tleu" },
+ {0x00001c54, 0x3e007fff, "tle" },
+ {0x00002454, 0x3e007fff, "tlt" },
+ {0x0c000004, 0x3e0003ff, "stlb" },
+ {0x0c000024, 0x3e0003ff, "mftlb" },
+ {0x0c000044, 0x3e0003ff, "mtptlb" },
+ {0x0c000064, 0x3e0003ff, "mtrtlb" },
+ {0x00000305, 0x00007f0f, "tleu!" },
+ {0x00000705, 0x00007f0f, "tle!" },
+ {0x00000905, 0x00007f0f, "tlt!" },
+ {0x00002854, 0x3e007fff, "tmi" },
+ {0x00000a05, 0x00007f0f, "tmi!" },
+ {0x00001454, 0x3e007fff, "tne" },
+ {0x00000505, 0x00007f0f, "tne!" },
+ {0x00002c54, 0x3e007fff, "tpl" },
+ {0x00000b05, 0x00007f0f, "tpl!" },
+ {0x00000004, 0x3e007fff, "trapcs\t\t%15-19d"},
+ {0x00000404, 0x3e007fff, "trapcc\t\t%15-19d"},
+ {0x00000804, 0x3e007fff, "trapgtu\t\t%15-19d"},
+ {0x00000c04, 0x3e007fff, "trapleu\t\t%15-19d"},
+ {0x00001004, 0x3e007fff, "trapeq\t\t%15-19d"},
+ {0x00001404, 0x3e007fff, "trapne\t\t%15-19d"},
+ {0x00001804, 0x3e007fff, "trapgt\t\t%15-19d"},
+ {0x00001c04, 0x3e007fff, "traple\t\t%15-19d"},
+ {0x00002004, 0x3e007fff, "trapge\t\t%15-19d"},
+ {0x00002404, 0x3e007fff, "traplt\t\t%15-19d"},
+ {0x00002804, 0x3e007fff, "trapmi\t\t%15-19d"},
+ {0x00002c04, 0x3e007fff, "trappl\t\t%15-19d"},
+ {0x00003004, 0x3e007fff, "trapvs\t\t%15-19d"},
+ {0x00003404, 0x3e007fff, "trapvc\t\t%15-19d"},
+ {0x00003c04, 0x3e007fff, "trap\t\t%15-19d"},
+ {0x00003c54, 0x3e007fff, "tset" },
+ {0x00000f05, 0x00007f0f, "tset!" },
+ {0x00003054, 0x3e007fff, "tvs" },
+ {0x00003454, 0x3e007fff, "tvc" },
+ {0x00000c05, 0x00007f0f, "tvs!" },
+ {0x00000d05, 0x00007f0f, "tvc!" },
+ {0x00000026, 0x3e0003ff, "xor\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00000027, 0x3e0003ff, "xor.c\t\t%20-24r, %15-19r, %10-14r"},
+ {0x00002007, 0x0000700f, "xor!\t\t%8-11r, %4-7r"}
+};
diff --git a/contrib/binutils/opcodes/sh-dis.c b/contrib/binutils/opcodes/sh-dis.c
index 381fa4d..0dee910 100644
--- a/contrib/binutils/opcodes/sh-dis.c
+++ b/contrib/binutils/opcodes/sh-dis.c
@@ -924,11 +924,11 @@ print_insn_sh (bfd_vma memaddr, struct disassemble_info *info)
}
if ((*info->symbol_at_address_func) (val, info))
{
- fprintf_fn (stream, "\t! 0x");
+ fprintf_fn (stream, "\t! ");
(*info->print_address_func) (val, info);
}
else
- fprintf_fn (stream, "\t! 0x%x", val);
+ fprintf_fn (stream, "\t! %x", val);
}
}
diff --git a/contrib/binutils/opcodes/spu-dis.c b/contrib/binutils/opcodes/spu-dis.c
new file mode 100644
index 0000000..a0dd1a0
--- /dev/null
+++ b/contrib/binutils/opcodes/spu-dis.c
@@ -0,0 +1,260 @@
+/* Disassemble SPU instructions
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This file is part of GDB, GAS, and the GNU binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <stdio.h>
+#include "sysdep.h"
+#include "dis-asm.h"
+#include "opcode/spu.h"
+
+/* This file provides a disassembler function which uses
+ the disassembler interface defined in dis-asm.h. */
+
+extern const struct spu_opcode spu_opcodes[];
+extern const int spu_num_opcodes;
+
+static const struct spu_opcode *spu_disassemble_table[(1<<11)];
+
+static void
+init_spu_disassemble (void)
+{
+ int i;
+
+ /* If two instructions have the same opcode then we prefer the first
+ * one. In most cases it is just an alternate mnemonic. */
+ for (i = 0; i < spu_num_opcodes; i++)
+ {
+ int o = spu_opcodes[i].opcode;
+ if (o >= (1 << 11))
+ abort ();
+ if (spu_disassemble_table[o] == 0)
+ spu_disassemble_table[o] = &spu_opcodes[i];
+ }
+}
+
+/* Determine the instruction from the 10 least significant bits. */
+static const struct spu_opcode *
+get_index_for_opcode (unsigned int insn)
+{
+ const struct spu_opcode *index;
+ unsigned int opcode = insn >> (32-11);
+
+ /* Init the table. This assumes that element 0/opcode 0 (currently
+ * NOP) is always used */
+ if (spu_disassemble_table[0] == 0)
+ init_spu_disassemble ();
+
+ if ((index = spu_disassemble_table[opcode & 0x780]) != 0
+ && index->insn_type == RRR)
+ return index;
+
+ if ((index = spu_disassemble_table[opcode & 0x7f0]) != 0
+ && (index->insn_type == RI18 || index->insn_type == LBT))
+ return index;
+
+ if ((index = spu_disassemble_table[opcode & 0x7f8]) != 0
+ && index->insn_type == RI10)
+ return index;
+
+ if ((index = spu_disassemble_table[opcode & 0x7fc]) != 0
+ && (index->insn_type == RI16))
+ return index;
+
+ if ((index = spu_disassemble_table[opcode & 0x7fe]) != 0
+ && (index->insn_type == RI8))
+ return index;
+
+ if ((index = spu_disassemble_table[opcode & 0x7ff]) != 0)
+ return index;
+
+ return 0;
+}
+
+/* Print a Spu instruction. */
+
+int
+print_insn_spu (bfd_vma memaddr, struct disassemble_info *info)
+{
+ bfd_byte buffer[4];
+ int value;
+ int hex_value;
+ int status;
+ unsigned int insn;
+ const struct spu_opcode *index;
+ enum spu_insns tag;
+
+ status = (*info->read_memory_func) (memaddr, buffer, 4, info);
+ if (status != 0)
+ {
+ (*info->memory_error_func) (status, memaddr, info);
+ return -1;
+ }
+
+ insn = bfd_getb32 (buffer);
+
+ index = get_index_for_opcode (insn);
+
+ if (index == 0)
+ {
+ (*info->fprintf_func) (info->stream, ".long 0x%x", insn);
+ }
+ else
+ {
+ int i;
+ int paren = 0;
+ tag = (enum spu_insns)(index - spu_opcodes);
+ (*info->fprintf_func) (info->stream, "%s", index->mnemonic);
+ if (tag == M_BI || tag == M_BISL || tag == M_IRET || tag == M_BISLED
+ || tag == M_BIHNZ || tag == M_BIHZ || tag == M_BINZ || tag == M_BIZ
+ || tag == M_SYNC || tag == M_HBR)
+ {
+ int fb = (insn >> (32-18)) & 0x7f;
+ if (fb & 0x40)
+ (*info->fprintf_func) (info->stream, tag == M_SYNC ? "c" : "p");
+ if (fb & 0x20)
+ (*info->fprintf_func) (info->stream, "d");
+ if (fb & 0x10)
+ (*info->fprintf_func) (info->stream, "e");
+ }
+ if (index->arg[0] != 0)
+ (*info->fprintf_func) (info->stream, "\t");
+ hex_value = 0;
+ for (i = 1; i <= index->arg[0]; i++)
+ {
+ int arg = index->arg[i];
+ if (arg != A_P && !paren && i > 1)
+ (*info->fprintf_func) (info->stream, ",");
+
+ switch (arg)
+ {
+ case A_T:
+ (*info->fprintf_func) (info->stream, "$%d",
+ DECODE_INSN_RT (insn));
+ break;
+ case A_A:
+ (*info->fprintf_func) (info->stream, "$%d",
+ DECODE_INSN_RA (insn));
+ break;
+ case A_B:
+ (*info->fprintf_func) (info->stream, "$%d",
+ DECODE_INSN_RB (insn));
+ break;
+ case A_C:
+ (*info->fprintf_func) (info->stream, "$%d",
+ DECODE_INSN_RC (insn));
+ break;
+ case A_S:
+ (*info->fprintf_func) (info->stream, "$sp%d",
+ DECODE_INSN_RA (insn));
+ break;
+ case A_H:
+ (*info->fprintf_func) (info->stream, "$ch%d",
+ DECODE_INSN_RA (insn));
+ break;
+ case A_P:
+ paren++;
+ (*info->fprintf_func) (info->stream, "(");
+ break;
+ case A_U7A:
+ (*info->fprintf_func) (info->stream, "%d",
+ 173 - DECODE_INSN_U8 (insn));
+ break;
+ case A_U7B:
+ (*info->fprintf_func) (info->stream, "%d",
+ 155 - DECODE_INSN_U8 (insn));
+ break;
+ case A_S3:
+ case A_S6:
+ case A_S7:
+ case A_S7N:
+ case A_U3:
+ case A_U5:
+ case A_U6:
+ case A_U7:
+ hex_value = DECODE_INSN_I7 (insn);
+ (*info->fprintf_func) (info->stream, "%d", hex_value);
+ break;
+ case A_S11:
+ (*info->print_address_func) (memaddr + DECODE_INSN_I9a (insn) * 4,
+ info);
+ break;
+ case A_S11I:
+ (*info->print_address_func) (memaddr + DECODE_INSN_I9b (insn) * 4,
+ info);
+ break;
+ case A_S10:
+ case A_S10B:
+ hex_value = DECODE_INSN_I10 (insn);
+ (*info->fprintf_func) (info->stream, "%d", hex_value);
+ break;
+ case A_S14:
+ hex_value = DECODE_INSN_I10 (insn) * 16;
+ (*info->fprintf_func) (info->stream, "%d", hex_value);
+ break;
+ case A_S16:
+ hex_value = DECODE_INSN_I16 (insn);
+ (*info->fprintf_func) (info->stream, "%d", hex_value);
+ break;
+ case A_X16:
+ hex_value = DECODE_INSN_U16 (insn);
+ (*info->fprintf_func) (info->stream, "%u", hex_value);
+ break;
+ case A_R18:
+ value = DECODE_INSN_I16 (insn) * 4;
+ if (value == 0)
+ (*info->fprintf_func) (info->stream, "%d", value);
+ else
+ {
+ hex_value = memaddr + value;
+ (*info->print_address_func) (hex_value & 0x3ffff, info);
+ }
+ break;
+ case A_S18:
+ value = DECODE_INSN_U16 (insn) * 4;
+ if (value == 0)
+ (*info->fprintf_func) (info->stream, "%d", value);
+ else
+ (*info->print_address_func) (value, info);
+ break;
+ case A_U18:
+ value = DECODE_INSN_U18 (insn);
+ if (value == 0 || !(*info->symbol_at_address_func)(0, info))
+ {
+ hex_value = value;
+ (*info->fprintf_func) (info->stream, "%u", value);
+ }
+ else
+ (*info->print_address_func) (value, info);
+ break;
+ case A_U14:
+ hex_value = DECODE_INSN_U14 (insn);
+ (*info->fprintf_func) (info->stream, "%u", hex_value);
+ break;
+ }
+ if (arg != A_P && paren)
+ {
+ (*info->fprintf_func) (info->stream, ")");
+ paren--;
+ }
+ }
+ if (hex_value > 16)
+ (*info->fprintf_func) (info->stream, "\t# %x", hex_value);
+ }
+ return 4;
+}
diff --git a/contrib/binutils/opcodes/spu-opc.c b/contrib/binutils/opcodes/spu-opc.c
new file mode 100644
index 0000000..683f96f
--- /dev/null
+++ b/contrib/binutils/opcodes/spu-opc.c
@@ -0,0 +1,44 @@
+/* SPU opcode list
+
+ Copyright 2006 Free Software Foundation, Inc.
+
+ This file is part of GDB, GAS, and the GNU binutils.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include "opcode/spu.h"
+
+/* This file holds the Spu opcode table */
+
+
+/*
+ Example contents of spu-insn.h
+ id_tag mode mode type opcode mnemonic asmtype dependency FPU L/S? branch? instruction
+ QUAD WORD (0,RC,RB,RA,RT) latency
+ APUOP(M_LQD, 1, 0, RI9, 0x1f8, "lqd", ASM_RI9IDX, 00012, FXU, 1, 0) Load Quadword d-form
+ */
+
+const struct spu_opcode spu_opcodes[] = {
+#define APUOP(TAG,MACFORMAT,OPCODE,MNEMONIC,ASMFORMAT,DEP,PIPE) \
+ { MACFORMAT, OPCODE, MNEMONIC, ASMFORMAT },
+#define APUOPFB(TAG,MACFORMAT,OPCODE,FB,MNEMONIC,ASMFORMAT,DEP,PIPE) \
+ { MACFORMAT, OPCODE, MNEMONIC, ASMFORMAT },
+#include "opcode/spu-insns.h"
+#undef APUOP
+#undef APUOPFB
+};
+
+const int spu_num_opcodes =
+ sizeof (spu_opcodes) / sizeof (spu_opcodes[0]);
OpenPOWER on IntegriCloud